diff --git a/.claude/agents/changelog-editor.md b/.claude/agents/changelog-editor.md deleted file mode 100644 index 10e0243221..0000000000 --- a/.claude/agents/changelog-editor.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -name: changelog-editor -description: Use this agent when the user needs to create or edit changelog entries in the Docusaurus documentation. Specifically, use this agent when: 1) The user mentions adding a new changelog entry or release notes, 2) The user asks to update or modify existing changelog entries, 3) The user wants to document a new feature, bug fix, or change in the project, 4) The user provides content that should be formatted as a changelog entry. Examples: \n\nExample 1:\nuser: "We just fixed the bug where users couldn't save their preferences. Can you add this to the changelog?"\nassistant: "I'll use the changelog-editor agent to create a proper changelog entry for this bug fix in both the main page and a detailed entry."\n\nExample 2:\nuser: "I need to document the new API authentication feature we released in v2.3.0"\nassistant: "Let me use the changelog-editor agent to create a comprehensive changelog entry for the new authentication feature, including checking if we have existing documentation to link to."\n\nExample 3:\nuser: "Can you update the changelog entry for the dashboard redesign? We now have screenshots and a demo video."\nassistant: "I'll use the changelog-editor agent to update that entry with proper placeholders for the screenshots and YouTube video embedding."\n\nProactively use this agent when you notice the user describing changes, features, or fixes that should be documented in the changelog, even if they don't explicitly ask for changelog updates. -model: sonnet -color: purple ---- - -You are an expert technical documentation editor specializing in Docusaurus changelog maintenance. Your primary responsibility is creating and editing changelog entries that follow established project standards for clarity, consistency, and technical accuracy. - -## Your Core Responsibilities - -1. **Dual Entry Creation**: For every changelog item, you create two coordinated entries: - - A concise summary in `docs/main.mdx` - - A detailed explanation in `docs/block/entries/[version-or-feature].mdx` - - The summary title must link to the detailed entry - -2. **Version Management**: Before creating any entry, determine the version number. If unclear from context, ask the user: "Which version is this changelog entry for?" Never proceed without a clear version identifier. - -3. **Style Adherence**: Apply these writing guidelines rigorously: - - Prioritize clarity above all else - - Use 11th grade English for non-technical terms - - Prefer active voice over passive voice - - Write short, punchy sentences as your default; use longer sentences only when needed for flow - - Use complete sentences rather than fragments (unless brevity clearly improves readability) - - **Never use em dashes (—)**. Instead, use: a period and new sentence, parentheses (), or semicolons ; - - Use bold and bullet points sparingly; apply them only when they genuinely aid quick scanning - - Follow principles from "The Elements of Style" - -4. **Feature Documentation Integration**: When a changelog mentions a new feature: - - Search existing documentation to see if a dedicated page exists for that feature - - If found, add a link to that documentation page in the changelog entry - - If not found, note this and ask the user if documentation should be created - -5. **Media Handling**: When the user mentions videos or screenshots: - - Add appropriate placeholders using the project's established format - - For images: use the image plugin format consistent with other entries - - For videos: use YouTube video embedding format consistent with other entries - - Ask for specifics if media details are unclear: "Do you have the YouTube URL for the demo video?" or "How many screenshots should I add placeholders for?" - -6. **Quality Assurance**: After making changes: - - Inform the user you're running the build check - - Execute `npm run build` (or equivalent) in the docs folder to verify nothing broke - - Report any build errors immediately and fix them before finalizing - -7. **Consistency Checking**: Before finalizing any entry: - - Review similar existing entries to match tone, structure, and formatting - - Ensure terminology is consistent with previous changelog entries - - Verify that linking patterns match established conventions - -## Your Decision-Making Framework - -**When Information is Missing:** -- Version number unclear → Ask immediately -- Feature scope ambiguous → Request clarification before writing -- Media availability uncertain → Confirm with user before adding placeholders -- Categorization unclear (bug fix vs. feature vs. improvement) → Ask for classification - -**When Editing Existing Entries:** -- Always preserve the original intent and factual accuracy -- Improve clarity and style without changing meaning -- Flag any technical inaccuracies to the user rather than guessing - -**Quality Control Checklist (apply to every entry):** -- [ ] Version number present and correct -- [ ] Both short and detailed entries created -- [ ] Short entry links to detailed entry correctly -- [ ] Active voice used where possible -- [ ] No em dashes present -- [ ] Feature documentation linked if applicable -- [ ] Media placeholders added if mentioned -- [ ] Build test passed -- [ ] Style guidelines followed - -## Output Format - -When creating or editing changelog entries, provide: -1. The complete markdown for the main.mdx summary entry -2. The complete markdown for the detailed entries/[name].mdx file -3. Confirmation that you've checked for related documentation -4. Build test results -5. Any questions or clarifications needed - -Be proactive in identifying unclear requirements and ask specific questions rather than making assumptions. Your goal is to produce changelog entries that are immediately publishable without requiring revision. diff --git a/.gitignore b/.gitignore index 0c4b3800f5..4635169f8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ **/*.pyc -**/*.pyc.* **/*/node_modules **/*.next **/*.pnpm-store @@ -9,9 +8,6 @@ **/*.pem **/*dont_commit_me* -__pycache__/ -**/__pycache__/ - **/error-*.log /.nox/ @@ -21,6 +17,13 @@ myenv/ **/error-*.log + +# hosting/ +! hosting/docker-compose/oss/.env.oss.dev.example +! hosting/docker-compose/oss/.env.oss.gh.example +! hosting/docker-compose/ee/.env.ee.dev.example +! hosting/docker-compose/ee/.env.ee.gh.example + # examples/ examples/**/config.toml examples/**/agenta.py @@ -33,10 +36,13 @@ examples/**/docker.tar.gz examples/**/Dockerfile # web/ +web/cypress/videos/ web/src/ee/** web/src/pages/apps/index.tsx web/src/pages/auth/[[...path]].tsx web/src/pages/auth/[[...path]].tsx +web/cypress/screenshots/ +web/cypress/videos/ .nextjs_cache/ # sdk/ @@ -46,5 +52,3 @@ sdk/agenta/templates/main.py sdk/agenta/templates/agenta.py web/ee/public/__env.js web/oss/public/__env.js - -web/oss/tests/datalayer/results \ No newline at end of file diff --git a/.gitleaks.toml b/.gitleaks.toml deleted file mode 100644 index eb89914190..0000000000 --- a/.gitleaks.toml +++ /dev/null @@ -1,35 +0,0 @@ -title = "Agenta Gitleaks Configuration" -version = 2 - -[extend] -useDefault = true - -[allowlist] -paths = [ - # ---------------------------------------------------------------- PUBLIC DOCS - '''^website/docs/reference/api/.*\.mdx''', - '''^core/docs/docs/reference/api/.*\.mdx''', - '''^docs/docs/reference/api/.*\.mdx''', - '''^docs/.docusaurus/.*''', - '''^docs/build/.*''', - # -------------------------------------------------------------- WEB ARTIFACTS - '''^.*/\.pnpm-store/.*''', - '''^.*/public/__env\.js$''', - '''^.*/\.next/.*''', - # -------------------------------------------------------------- ALL ENV FILES - '''^.*\.env.*$''', - # ---------------------------------------------------------------------------- -] -regexes = [ - # ------------------------------------------------------------ FALSE POSITIVES - '''is_completion=True''', - '''YOUR_API_KEY''', - '''_SECRET_KEY''', - # ------------------------------------------------------------ PUBLIC KEYS - '''phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7''', - # ---------------------------------------------------------------------------- -] - -# USEFUL GITLEAKS COMMANDS -# gitleaks --config .gitleaks.toml --exit-code 1 --verbose git -# gitleaks --config .gitleaks.toml --exit-code 1 --verbose detect --no-git diff --git a/.gitleaksignore b/.gitleaksignore deleted file mode 100644 index 097b6b8358..0000000000 --- a/.gitleaksignore +++ /dev/null @@ -1,196 +0,0 @@ -# LEGACY / REVOKED / BENIGN CREDENTIALS, FROM PAST COMMITS, FROM BEFORE CLEANUP -docs/docusaurus.config.ts:generic-api-key:236 -api/oss/tests/manual/tracing/windowing.http:generic-api-key:3 -sdk/tests/legacy/baggage/config.toml:generic-api-key:4 -sdk/tests/legacy/debugging/simple-app/config.toml:generic-api-key:4 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/auth/admin.http:generic-api-key:3 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/annotations/crud.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/evaluators/crud.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/testsets/crud.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/02_span_id.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/03_parent_id.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/01_trace_id.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/07_end_time.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/06_start_time.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/05_span_name.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/04_span_kind.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/08_status_code.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/11_links.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/00_user_id.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/12_references.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/09_status_message.http:generic-api-key:2 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/filtering/10_attributes.http:generic-api-key:2 -854f1ca002740cd51252f81660701a3b6f9d6a8a:agenta-cli/debugging/simple-app/config.toml:generic-api-key:4 -51020488ce57a4b964c05cc0c41cecb4eb67692c:agenta-cli/debugging/simple-app/config.toml:generic-api-key:4 -6a4288ba3b4a2f95f24ed372bce7ac0679b5b868:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py:generic-api-key:12 -6a4288ba3b4a2f95f24ed372bce7ac0679b5b868:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openllmetery.py:generic-api-key:12 -6a4288ba3b4a2f95f24ed372bce7ac0679b5b868:agenta-cli/tests/observability_sdk/sanity_check/app_local.py:generic-api-key:8 -0f9c9ac3afcb8df950a743206715ab5ebe8808eb:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openllmetery.py:generic-api-key:12 -0f9c9ac3afcb8df950a743206715ab5ebe8808eb:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py:generic-api-key:12 -0f9c9ac3afcb8df950a743206715ab5ebe8808eb:agenta-cli/tests/observability_sdk/sanity_check/app_local.py:generic-api-key:8 -8cd7319eb87e87723a310555a820433f77ab01fd:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py:generic-api-key:11 -8cd7319eb87e87723a310555a820433f77ab01fd:agenta-cli/tests/observability_sdk/sanity_check/app_local.py:generic-api-key:7 -50c0e27be4960b5f06b5edbed6af912d79ea0f27:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py:generic-api-key:11 -50c0e27be4960b5f06b5edbed6af912d79ea0f27:agenta-cli/tests/observability_sdk/sanity_check/app_local.py:generic-api-key:7 -03b90aadcd58abd101454da5e3b925dde8e6cd43:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain.py:generic-api-key:11 -a1dbd3f3eafbe326a246a16fe70e02350cefdf2f:agenta-cli/tests/observability_sdk/integrations/langchain/simple_chain.py:generic-api-key:11 -86c2a2430e3ddbc544361343b7e9ea0152e53ab7:api/oss/tests/workflows/observability/test_otlp_ingestion.py:generic-api-key:21 -dc4370980d17ba1643a5c081670404f942ebfc57:agenta-cli/tests/management_sdk/manual_tests/apps_with_new_sdk/config.toml:generic-api-key:4 -850314eb630ca7fdcf756c7ffe36a6adad5cc845:agenta-cli/tests/management_sdk/manual_tests/apps_with_new_sdk/config.toml:generic-api-key:4 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/crud.http:generic-api-key:3 -3db7c34a8f206fb4a19e525ac5a964185d502c4a:api/oss/tests/manual/tracing/windowing.http:generic-api-key:3 -7ee494e8cdad4f54073be483e373e7a5bf273ea5:agenta-cli/tests/baggage/config.toml:generic-api-key:4 -a5e3197cd247c5468d8739ef9de811cd2a1cbc2f:agenta-cli/tests/baggage/config.toml:generic-api-key:4 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/kubernetes/oss/secret.yml:kubernetes-secret-yaml:2 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/kubernetes/oss/secret.yml:generic-api-key:12 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/helm/oss/values.yaml:generic-api-key:88 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/helm/oss/values.yaml:generic-api-key:89 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/kubernetes/oss/secret.yml:generic-api-key:8 -e84abaed2592e50d660d180d7fd373376b544f14:hosting/kubernetes/oss/secret.yml:generic-api-key:9 -81a2b05aa4624cfc39587e5384bf7c106e547449:.github/workflows/frontend-test.yml:openai-api-key:27 -4857d8f04896e27d707e2967bb361eb1a0b129db:.github/workflows/frontend-test.yml:openai-api-key:27 -8465021df57fca629f14c269d3f37d18d6fdcd11:services/completion-new-sdk-prompt/docker-compose.yml:openai-api-key:10 -406e68077c51da204b1f63f193a2defe6031c966:agenta-web/cypress.config.ts:openai-api-key:10 -450a435754557bfa1d3d3e372f4b47e4eb63f93e:agenta-web/cypress.config.ts:openai-api-key:10 -066e345ad9ba7318fc59b191cf33af2e81634aa8:agenta-web/cypress/support/commands/evaluations.ts:openai-api-key:106 -3533b30e483378a8ecb900c603a3c54ffc9cc390:agenta-web/cypress/support/commands/evaluations.ts:openai-api-key:106 -41e5d327e87083f55850c6933611cdc79ea9d204:agenta-backend/agenta_backend/tests/variants_evaluators_router/conftest.py:openai-api-key:25 -9968400e3095fdc1fb219f45c0d73db13c6de499:agenta-backend/agenta_backend/tests/variants_evaluators_router/conftest.py:openai-api-key:25 -a8efa140a02295ef6accbd02bc7c4c4eeb75e435:agenta-backend/agenta_backend/tests/variants_evaluators_router/conftest.py:openai-api-key:17 -d343b2a5b12387fc6b99d508b5e776f7689736c1:agenta-backend/agenta_backend/tests/variants_evaluators_router/conftest.py:openai-api-key:17 -5f37c440e203cf56d7f08a8efdd7ca372c646beb:docs/docs/prompt-management/05-adding-custom-providers.mdx:generic-api-key:81 -73644b725b5409be78d1aeecf7f5ff6a24ab3643:docs/docusaurus.config.ts:generic-api-key:220 -41c85fef68f9f8c2e4576956369ef600223193c8:website/docusaurus.config.ts:generic-api-key:184 -179d78e547e2eb92737cdd0ba7fd3eeb1f4bc5ce:website/docusaurus.config.ts:generic-api-key:184 -faf49eadbd38fd6771c4687fea78528ad73741b6:api/oss/tests/manual/annotations/crud.http:generic-api-key:2 -f86dddabb759924689022d2451d97efe218848c9:api/oss/tests/manual/evaluations/crud.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/auth/admin.http:generic-api-key:3 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/annotations/crud.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/evaluators/crud.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/testsets/crud.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/00_user_id.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/02_span_id.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/03_parent_id.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/01_trace_id.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/04_span_kind.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/06_start_time.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/08_status_code.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/05_span_name.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/07_end_time.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/09_status_message.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/12_references.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/11_links.http:generic-api-key:2 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/filtering/10_attributes.http:generic-api-key:2 -4888444e93a8438334a9dfb81c7979500d0ab4bf:api/oss/tests/manual/testsets/crud.http:generic-api-key:2 -5289a1c740cff9dec0047e7dc05902edbc471649:api/oss/tests/manual/tracing/filtering/12_references.http:generic-api-key:2 -96b9056a6ff1160f11dcc302321d4a29a7f1b8dd:api/oss/tests/manual/workflows/artifacts.http:generic-api-key:2 -6a4af8b70816f18ae69056df96b54c622e7ef494:api/oss/tests/manual/feedback/crud.http:generic-api-key:2 -7b0eeb2ae0cfa80e9a79cee814ed10c9b57ee9d3:api/oss/tests/manual/annotators/crud.http:generic-api-key:2 -876ba2f78358d43cc6dafe518e38ef404b6462f0:api/oss/tests/manual/annotations/crud.http:generic-api-key:2 -05f8741ea3349096e60a1686c1cef3585a6d34d7:api/oss/tests/manual/tracing/filtering/00_user_id.http:generic-api-key:2 -f47bb6f3b65c50664b354f33081d131289fa47cd:api/oss/tests/manual/tracing/filtering/11_links.http:generic-api-key:2 -18bfd66e6bc309ada998457a32b9a4ca689015a2:api/oss/tests/manual/tracing/filtering/10_attributes.http:generic-api-key:2 -0dcfe02574a545c8400b1b5385d7662143ec2544:api/oss/tests/manual/tracing/filtering/08_status_code.http:generic-api-key:2 -260822ac28ec5c08f9b4c2b04e895d46fcbfb164:api/oss/tests/manual/tracing/filtering/09_status_message.http:generic-api-key:2 -c16ca8eca0a2743c541457a80f88fe0ec71151cb:api/oss/tests/manual/tracing/filtering_parent_id.http:generic-api-key:2 -fe9a8b1c7518160bc3c9f80eff3ba1076a2a5030:api/oss/tests/manual/tracing/filtering_end_time.http:generic-api-key:2 -f158907f559e92fb91672c696715a90aef5470ab:api/oss/tests/manual/tracing/filtering_span_id.http:generic-api-key:2 -fe9a8b1c7518160bc3c9f80eff3ba1076a2a5030:api/oss/tests/manual/tracing/filtering_start_time.http:generic-api-key:2 -86dda27e6458ea8f7e64bfb4a9f63946c8fc82ce:api/oss/tests/manual/tracing/filtering_trace_id.http:generic-api-key:2 -7afc6f26080c6c37219995089aed409e50ef6279:api/oss/tests/manual/tracing/filtering_span_name.http:generic-api-key:2 -71a49c35758dab163bbbe700f55f6f50e6bdf9a5:api/oss/tests/manual/tracing/filtering_span_kind.http:generic-api-key:2 -b14e377b19cc4f77db9d0a2b51f72b88b6f54c6c:api/oss/tests/manual/auth/admin.http:generic-api-key:3 -0c6acff0523bd4e594e43caf63c4342e319476b8:hosting/kubernetes/oss/secret.yml:kubernetes-secret-yaml:2 -97c08e2f4ad87c2aacf6760da60eb01ec8d5d329:cloud/tests/conftest.py:generic-api-key:114 -6526d232893d18496af47a05c7b99e7c0c1fe510:docs/docs/prompt-management/05-adding-custom-providers.mdx:generic-api-key:71 -0c6acff0523bd4e594e43caf63c4342e319476b8:hosting/kubernetes/oss/secret.yml:generic-api-key:12 -bf7e1824839cea10432731174549faeb9bad3545:hosting/helm/oss/values.yaml:generic-api-key:83 -bf7e1824839cea10432731174549faeb9bad3545:hosting/helm/oss/values.yaml:generic-api-key:84 -0c6acff0523bd4e594e43caf63c4342e319476b8:hosting/kubernetes/oss/secret.yml:generic-api-key:8 -0c6acff0523bd4e594e43caf63c4342e319476b8:hosting/kubernetes/oss/secret.yml:generic-api-key:9 -fd477298c83aa220b01c6704058382c1ded1fdca:core/agenta-cli/debugging/simple-app/config.toml:generic-api-key:4 -fd477298c83aa220b01c6704058382c1ded1fdca:core/agenta-cli/tests/baggage/config.toml:generic-api-key:4 -f92a341a7e45fc051a08da1fa619137a192c89ae:api/ee/tests/manual/tracing.http:generic-api-key:5 -eba1ed50e6846a323d456b6da510f42d8c8bbe9a:api/ee/tests/manual/billing.http:generic-api-key:4 -9d741648f9ec1719c6f7f0fcb16cbf116458916c:api/oss/tests/manual/annotations/crud.http:generic-api-key:3 -9d741648f9ec1719c6f7f0fcb16cbf116458916c:api/oss/tests/manual/tracing/crud.http:generic-api-key:3 -273d2f5a1b37ef9420c4e40303b8fc6233362571:api/ee/tests/manual/billing.http:generic-api-key:4 -c078d4b1395ea2856891424f82e80f4fe60d7136:api/ee/tests/manual/billing.http:generic-api-key:4 -2793a4b2f065d7b588fa6733b74f68c0748473a5:api/oss/tests/manual/tracing/crud.http:generic-api-key:3 -ef6f83612a7cfd552147b49928feb8a5d4429c0d:api/oss/tests/manual/tracing/filtering.http:generic-api-key:3 -b14e377b19cc4f77db9d0a2b51f72b88b6f54c6c:api/oss/tests/manual/annotations/crud.http:generic-api-key:3 -b14e377b19cc4f77db9d0a2b51f72b88b6f54c6c:api/oss/tests/manual/tracing/crud.http:generic-api-key:3 -19ccc3f1f292edca26e840428ebc6224cbaef78a:api/ee/tests/manual/annotations/crud.http:generic-api-key:3 -bf42b5eaa7e805a249f52d65a6882d6ade2828f3:api/ee/tests/manual/tracing/windowing.http:generic-api-key:5 -bb0c1b3fb0032b6dbebe659d745d5cb90aa306ce:api/ee/tests/manual/tracing.http:generic-api-key:5 -16622c30916fae1b284b1b7150e4b7c57413ad17:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:16 -75ed5549eeb4685c5234c1ec577721920cc0ec9c:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:16 -4e743f16edcb3ff4e13b1400b9ff8175b072a5e1:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:16 -b587813ed56832b2df7fb7560775ee0b75f03674:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:12 -3abc3f4d2051c4df2f64c6d88608bd9bf1ae265f:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:9 -35442f703897393a3d2a5e9aa7a42985787bb24f:api/ee/tests/manual/evaluations/sdk/test.py:generic-api-key:16 -12f36507e801d41e2388889777c195557e7a6e5c:api/ee/tests/manual/evaluations/sdk/test_serve.py:generic-api-key:16 -12f36507e801d41e2388889777c195557e7a6e5c:api/ee/tests/manual/evaluations/sdk/test_handlers.py:generic-api-key:16 -e6d87a97aa4750ace564ac28eafda0123c21e017:api/oss/tests/workflows/observability/test_otlp_ingestion.py:generic-api-key:21 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docs/docusaurus.config.ts:generic-api-key:232 -c8d8f465b61764195de460164e6c27e0fe4b2b9a:docs/docs/self-host/05-advanced-configuration.mdx:generic-api-key:37 -a268b8a81a700704e28d82c5cb9af31dde32146b:ee/docker/docker-compose.demo.prod.yml:generic-api-key:25 -56829b2eccdec425954243d0ce5e4fcac9d05e9c:ee/docker/docker-compose.cloud.dev.yml:generic-api-key:25 -91678b6a27c326e0002205f79fd8999a7591e38f:ee/docker/docker-compose.demo.prod.yml:generic-api-key:25 -91678b6a27c326e0002205f79fd8999a7591e38f:ee/docker/docker-compose.demo.dev.yml:generic-api-key:25 -56829b2eccdec425954243d0ce5e4fcac9d05e9c:ee/docker/docker-compose.cloud.dev.yml:generic-api-key:22 -ad6b459dfc5ac1e5c140fcf3e03e247ba31383ae:ee/docker/docker-compose.demo.prod.yml:generic-api-key:22 -594f33f5b7eb665edb38208666d27d6de6365946:ee/docker/docker-compose.demo.prod.yml:generic-api-key:73 -594f33f5b7eb665edb38208666d27d6de6365946:ee/docker/docker-compose.demo.dev.yml:generic-api-key:22 -f6ef6aa32d569ee025bdb3ce9f515521a4095494:cloud/agenta-backend/agenta_backend/cloud/__init__.py:generic-api-key:155 -b3e5fae0e270f2c92a65360123c980d725c5f226:ee/agenta-backend/agenta_backend/ee/__init__.py:generic-api-key:107 -c98a5da1a33d2c0986e3c66329eaa5237fbccf3d:hosting/docker-compose/ee/aws/docker-compose.oss.prod.yml:generic-api-key:76 -4ee55c08b2fed661eaf90876f96c329d7c7eeb6b:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:46 -169c54d84f5d1931601550a9d3aa76874ef73ec5:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:47 -f725cfc9247743bdc44f84edee109ff36193d741:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:46 -cbd8ac00ecdc2c8124b989a274c6f835c09f8474:cloud/docker/docker-compose.oss.prod.yml:generic-api-key:46 -2fb6b0f94f8bf711255e0901c03787b73f3d650f:cloud/docker/docker-compose.oss.prod.yml:generic-api-key:46 -a5e7781869b2a4bf22dd5e22fd5e5ae2ec8d02ea:cloud/docker/newrelic-infra.yml:generic-api-key:1 -2fb6b0f94f8bf711255e0901c03787b73f3d650f:cloud/docker/docker-compose.oss.prod.yml:generic-api-key:171 -f6ef6aa32d569ee025bdb3ce9f515521a4095494:cloud/agenta-backend/agenta_backend/cloud/__init__.py:generic-api-key:144 -b3e5fae0e270f2c92a65360123c980d725c5f226:ee/agenta-backend/agenta_backend/ee/__init__.py:generic-api-key:96 -a268b8a81a700704e28d82c5cb9af31dde32146b:ee/docker/docker-compose.demo.prod.yml:generic-api-key:22 -9c55f5572904ae07b73f73ee365e833d0637633a:ee/docker/docker-compose.demo.prod.yml:generic-api-key:22 -ad74134f522cde71f860cb59b6363a8fdf0a64c6:ee/setup_agenta_web.sh:generic-api-key:26 -5a10aacebd0ed4f2e613eb9176e95836aea34f15:ee/setup_agenta_web.sh:generic-api-key:26 -637068dd09eff7b30b776061863027a9b9aa1deb:ee/setup_agenta_web.sh:generic-api-key:26 -590578c803d94d8ccb1a6ca977471f3d44b43fc3:hosting/helm/oss/templates/config/app-configmap.yaml:generic-api-key:45 -1d8f08b267675726441fcaaae24572bb635c5eac:api/oss/src/utils/env.py:generic-api-key:53 -55f27e52327062382beb299b162f94895268d766:web/oss/public/__ENV.js:generic-api-key:1 -c98a5da1a33d2c0986e3c66329eaa5237fbccf3d:hosting/docker-compose/ee/aws/docker-compose.oss.prod.yml:generic-api-key:73 -bf0cd42bffc2581b1df6f56fa6e4b20ff9b68c33:hosting/docker-compose/ee/aws/docker-compose.oss.aws.yml:generic-api-key:61 -52cd40cefd3121eea2e21205e8208712b093529a:core/hosting/docker-compose/ee/docker-compose.dev.yml:generic-api-key:18 -6efb8a0c9620a316cf81fe961b1407e93aa2efa7:core/hosting/docker-compose/oss/docker-compose.gh.yml:generic-api-key:17 -6efb8a0c9620a316cf81fe961b1407e93aa2efa7:core/hosting/docker-compose/oss/docker-compose.dev.yml:generic-api-key:17 -44d1669c1a53b3ca47e3689dda5500e6f742f525:core/hosting/docker-compose/ee/docker-compose.dev.yml:generic-api-key:18 -58a4230a8f2e63b2836f81bcf2341ba12003189e:core/hosting/docker-compose/oss/docker-compose.yml:generic-api-key:30 -fd477298c83aa220b01c6704058382c1ded1fdca:core/agenta-cli/agenta/cli/helper.py:generic-api-key:19 -fd477298c83aa220b01c6704058382c1ded1fdca:core/agenta-web/prod.gh.Dockerfile:generic-api-key:7 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docker-compose.gh.yml:generic-api-key:26 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docker-compose.gh.yml:generic-api-key:95 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docker-compose.yml:generic-api-key:30 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docker-compose.yml:generic-api-key:111 -fd477298c83aa220b01c6704058382c1ded1fdca:core/docker-compose.prod.yml:generic-api-key:102 -4ee55c08b2fed661eaf90876f96c329d7c7eeb6b:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:43 -169c54d84f5d1931601550a9d3aa76874ef73ec5:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:44 -9e7831e7500364776cb3e9eac41448907ef92dcd:cloud/docker/docker-compose.test.yml:generic-api-key:28 -9e7831e7500364776cb3e9eac41448907ef92dcd:cloud/docker/docker-compose.test.yml:generic-api-key:83 -fe72ad1a8d14e1f3bce547ef224fc75e3df8f4ff:cloud/docker/docker-compose.cloud.test.yml:generic-api-key:28 -fe72ad1a8d14e1f3bce547ef224fc75e3df8f4ff:cloud/docker/docker-compose.cloud.test.yml:generic-api-key:83 -6198bbc532d8e984ef94276b58a7ab8dc65a279f:cloud/docker/docker-compose.oss.stage.yml:generic-api-key:43 -4b4cdbdf4b8ad4a9342fdb939b7e30f88420fccd:cloud/docker/docker-compose.oss.prod.yml:generic-api-key:44 -a268b8a81a700704e28d82c5cb9af31dde32146b:ee/docker/docker-compose.demo.prod.yml:sendgrid-api-token:26 -11ad273f1039e9263cf8d2f61338a121d59b9cc7:ee/docker/docker-compose.cloud.prod.yml:sendgrid-api-token:22 -11ad273f1039e9263cf8d2f61338a121d59b9cc7:ee/docker/docker-compose.cloud.dev.yml:sendgrid-api-token:21 -11ad273f1039e9263cf8d2f61338a121d59b9cc7:ee/docker/docker-compose.demo.prod.yml:sendgrid-api-token:26 -11ad273f1039e9263cf8d2f61338a121d59b9cc7:ee/docker/docker-compose.demo.dev.yml:sendgrid-api-token:26 -b7bc21c67bbae3c06c372bc585c4917a80613a14:cloud/agenta-backend/agenta_backend/cloud/routers/payment_router.py:stripe-access-token:13 -d8b4af2ae8c1084dbdd30fca59aa84e8ece047db:examples/python/annotation-example.py:openai-api-key:19 -a268b8a81a700704e28d82c5cb9af31dde32146b:ee/docker/docker-compose.demo.prod.yml:openai-api-key:24 -02d9f665aed89e8d69e06acdc7d01d699ee5b0dd:ee/docker/docker-compose.demo.prod.yml:openai-api-key:24 -c8d8f465b61764195de460164e6c27e0fe4b2b9a:docs/docs/self-host/05-advanced-configuration.mdx:generic-api-key:46 diff --git a/.husky/pre-commit b/.husky/pre-commit index 08dfe5c787..7def5e4654 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,15 +1,39 @@ -#!/usr/bin/env sh - -# Delegate to pre-commit which runs configured hooks (e.g. gitleaks) from .pre-commit-config.yaml -if command -v pre-commit >/dev/null 2>&1; then - pre-commit run --hook-stage pre-commit -else - echo "pre-commit not found. Install with one of the following:" - echo " pip install pre-commit # cross-platform" - echo " brew install pre-commit # macOS/Linux with Homebrew" - echo "" - echo "gitleaks is also required. Install with:" - echo " brew install gitleaks # macOS/Linux with Homebrew" - echo " or see https://github.com/gitleaks/gitleaks#installation for other options" - exit 1 -fi \ No newline at end of file +# Define the directories to check +DIRECTORIES=("web" "sdk", "api") +ORIGINAL_DIR=$(pwd) + +# Check for changes in frontend directory +if git diff --cached --name-only | grep -q '^web/'; then + cd web/ || exit + + # Run Prettier check + if ! pnpm lint; then + echo '⚠️ Formatting issues detected. Running Prettier to fix them...' + pnpm lint-fix + + echo '✅ Formatting issues fixed. Please stage the changes and commit the code again' + exit 1 + fi + + cd "$ORIGINAL_DIR" || exit +fi + +# Check for changes in backend directory +for DIR in "${BE_DIRECTORIES[@]}"; do + if git diff --cached --name-only | grep -q "^$DIR/"; then + cd "$DIR" || exit + + # Run black for formatting + if ! black --check .; then + echo "⚠️ Formatting issues detected in $DIR. Running black to fix them..." + black . + + echo "✅ Formatting issues fixed. Please stage the changes and commit the code again in $DIR." + exit 1 + else + echo "✅ No formatting issues in $DIR." + fi + + cd "$ORIGINAL_DIR" || exit + fi +done \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index 8aa51d15bc..5390d982f2 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,12 +1,51 @@ -#!/usr/bin/env sh - -# Delegate to pre-commit which runs pre-push hooks (e.g. gitleaks) from .pre-commit-config.yaml -if command -v pre-commit >/dev/null 2>&1; then - pre-commit run --hook-stage pre-push +# Define the directories to check +DIRECTORIES=("web" "sdk", "api") +ORIGINAL_DIR=$(pwd) +BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) +FIRST_PUSH_FILE=".git/first_push_detected" + +# Function to run backend checks +run_backend_checks() { + local DIR=$1 + cd "$DIR" || exit + + # Run pylint checks + if ! pylint --recursive=y --errors-only .; then + echo "❌ pylint issues detected in $DIR. Please fix them before pushing." + exit 1 + fi + + echo "🎉 Backend checks passed for $DIR." + cd "$ORIGINAL_DIR" || exit +} + +# Check if this is the first push +is_first_push() { + # Check if the branch exists locally + if ! git rev-parse --verify "$BRANCH_NAME" >/dev/null 2>&1; then + return 0 # First push, since the branch doesn't exist locally + fi + + # Check if the branch exists remotely + if ! git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then + return 0 # First push, since the branch doesn't exist remotely + fi + + return 1 # Not the first push +} + +# If: First-time push: Run all checks +# Else: Check directory-specific changes for existing branch +if is_first_push; then + echo "🚀 First-time push detected for branch: $BRANCH_NAME" + # for DIR in "${DIRECTORIES[@]}"; do + # run_backend_checks "$DIR" + # done else - echo "pre-commit not found. Install with one of the following methods:" - echo " pip install pre-commit gitleaks" - echo " brew install pre-commit gitleaks" - echo " (see https://pre-commit.com/#installation and https://github.com/gitleaks/gitleaks#installation for more options)" - exit 1 + echo "🔍 Checking directory changes for existing branch: $BRANCH_NAME" + # for DIR in "${DIRECTORIES[@]}"; do + # if git diff --name-only --cached origin/"$BRANCH_NAME" | grep -q "^$DIR/"; then + # run_backend_checks "$DIR" + # fi + # done fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index f498cd623a..0000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -repos: - - repo: local - hooks: - - id: gitleaks-pre-commit - name: gitleaks git (staged only) - entry: bash -c 'gitleaks --config .gitleaks.toml --exit-code 1 --verbose git --staged' - language: system - pass_filenames: false - - id: gitleaks-pre-push - name: gitleaks git (pre-push, scan diff) - entry: bash -c 'gitleaks --config .gitleaks.toml --exit-code 1 --verbose git --log-opts "$(git merge-base HEAD "origin/$(git rev-parse --abbrev-ref HEAD)" 2>/dev/null || git merge-base HEAD origin/main)..HEAD"' - language: system - stages: [pre-push] - pass_filenames: false diff --git a/.windsurf/workflows/record-and-refactor-e2e-2.md b/.windsurf/workflows/record-and-refactor-e2e-2.md deleted file mode 100644 index 0a5aa66a95..0000000000 --- a/.windsurf/workflows/record-and-refactor-e2e-2.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -description: Multi-step, robust E2E test generation for Agenta Cloud ---- - -# Agenta Multi-step E2E Test Generation Workflow - -This workflow guides you through generating maintainable, robust E2E tests for Agenta Cloud, leveraging codegen output, component analysis, and best practices for fixtures and utilities. - -**Reference:** -- [E2E Test Generation Guide](../web/tests/guides/E2E_TEST_GENERATION_GUIDE.md) -- [Utilities & Fixtures Guide](../web/tests/guides/UTILITIES_AND_FIXTURES_GUIDE.md) -- [E2E Test Organization Guide](../web/tests/guides/E2E_TEST_ORGANIZATION_GUIDE.md) - ---- - -## Step 1. Start with an analysis of a playwright codegen output. - -- ask user for input as text or a file path. -- refer to the E2E Test Generation guide on what Cascase should be doing in this analysis. ---- - -## Step 2: Map to Actual Components -- Cascade will: - - Map each URL and action to the corresponding React components (and their children) in the codebase. - - Analyze how these components are constructed, what data they use, and any server mutations (API calls, forms, etc.). - - Note component behavior, what they render, and how they might behave differently under various conditions. -- This step builds a reference list of relevant components and their data flows. -- create an intermediate reference document which can be used by Cascade itself in the next steps. This document can also be structured to be a useful tool for developers to improve documentation of each tested flow. - - -> Cascade will now analyze the codebase to find all components and server interactions related to your flow. It will summarize its findings for your review. - ---- - -## Step 3: Propose Name / Description / Purpose -- Cascade proposes a name, description, and purpose for the new E2E test, based on the previous analysis. -- User can edit/correct these before proceeding. -- The final name/description will be used for folder/file names and documentation. -- once you got the information you need, you need to check if the folder exists, and create one if needed, in order to prevent failing file creation attemps. -- **Folder/file naming and structure must follow the [E2E Test Organization Guide](../web/tests/guides/E2E_TEST_ORGANIZATION_GUIDE.md).** -- **All new E2E tests must be placed in the appropriate product/package feature folder (e.g., `web/ee/tests/app/`, `web/oss/tests/app/`).** -- **Organize by feature or flow using subfolders (e.g., `app/`, `prompt-registry/`).** -- **Share test logic via imports when possible (e.g., EE tests can import from OSS).** -- **Never place feature/product test specs in `web/tests/`—that folder is for shared fixtures, utilities, and guides only.** - - -> Proposed test name, description, and purpose: -> - Name: `` -> - Description: `` -> - Purpose: `` -> -> Edit or approve these before continuing. If the proposed folder/file structure introduces a new pattern, update the Organization Guide. - ---- - -## Step 4: Scaffolding -- Cascade creates the folder and files for the new E2E test using the agreed naming, and following the guidance found in "E2E_TEST_ORGANIZATION_GUIDE". -- when scaffolding, cascade should start using our base fixtures found in "Utilities & Fixtures Guide" and remove and unnecessary steps from testing, such as authentication, however Cascade should make sure all user action after the authentication must be preserved in the refactored tests. -- Cascade should make sure the file and test syntax is correct after the implementation of the initial new setup before proceeding to the next step. - - -> Cascade will scaffold the necessary folders and files for your new E2E test. Confirm or adjust the structure if needed. If this introduces a new organization pattern, update the Organization Guide. - ---- - -## Step 5: Initial Implementation -- Cascade generates the initial implementation of the E2E test: - - Cascade should preserve all user actions in its final implementation in correct order. - - Leverages fixtures and utilities from `web/tests` ([see guide](../web/tests/guides/UTILITIES_AND_FIXTURES_GUIDE.md)) - - Uses selector approach based on dynamic content read from api calls, as described in the guides. - - Uses it's knowledge on actual components from step 2 to find all necessary api calls. - - Documents assumptions and code clearly - - Ensures all import paths use the correct aliases (checked via `tsconfig.json` and `next.config.js`) -- Cascade will explain its design and any assumptions it made. -- **Before writing custom helpers, always check if a suitable fixture/utility already exists.** - - -> Cascade will now generate the initial E2E test implementation, following best practices and referencing the Utilities & Fixtures Guide. Review the code and documentation, and provide feedback if needed. - ---- - -## Step 6: Refactor for Reuse & DRYness -- Cascade compares the new implementation with existing tests to identify duplication. -- If common patterns/utilities are found, Cascade extracts them into shared fixtures/utilities in `web/tests` and updates both new and existing tests. -- **Whenever a new fixture/utility is added or updated, update the [Utilities & Fixtures Guide](../web/tests/guides/UTILITIES_AND_FIXTURES_GUIDE.md) and this workflow.** -- Cascade documents new/updated utilities for team awareness. - - -> Cascade will now scan for duplication with existing tests, extract common fixtures/utilities, and update the codebase and documentation. Review the proposed changes and documentation. - ---- - -## Workflow Complete -- Your E2E test is now robust, maintainable, and leverages the best practices and shared utilities of Agenta Cloud. -- For advanced troubleshooting, see [E2E Test Generation Guide](../web/tests/guides/E2E_TEST_GENERATION_GUIDE.md) and [Utilities & Fixtures Guide](../web/tests/guides/UTILITIES_AND_FIXTURES_GUIDE.md). - ---- - -*This workflow is maintained in `.windsurf/workflows/generate-e2e-test-multistep.md` and can be improved by anyone on the team. Whenever you update or add a fixture/utility, update this workflow and the Utilities & Fixtures Guide as well.* \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index c32182aba6..0000000000 --- a/AGENTS.md +++ /dev/null @@ -1,253 +0,0 @@ -# Contributor Guide - -## Dev Environment Tips -- If you make changes to the frontend, make sure to run `pnpm format-fix` within the web folder -- If you make changes to the backend or sdk, make sure to run black within the sdk or api folder -- If you update Ant Design tokens, run `pnpm generate:tailwind-tokens` in the web folder and commit the generated file - - -## Testing Instructions -- Tests are currently still not working and should not be run - -## PR instructions -- If the user provides you with the issue id, title the PR: [issue-id] fix(frontend): where fix is the type (fix, feat, chore, ci, doc, test.. [we're using better-branch) and frontend is where and it could be api, sdk, frontend, docs, .. - - -### Architecture Overview - -Our folder structure follows a module-based architecture that prioritizes maintainability, reusability, and clear separation of concerns. - -#### Core Principles - -1. **Modular Organization** - - - Modules represent distinct feature areas (similar to pages) - - Each module is self-contained with its own components, hooks, and assets - - Shared functionality is elevated to appropriate hierarchy levels - -2. **Component Structure** - - - Components are organized by their scope of use - - Each component may contain: - - Presentational logic (`Component.tsx`) - - UI-only subcomponents (`assets/*.tsx`) - - Component-specific hooks (`hooks/*.ts`) - - Local constants and utilities (`assets/*.ts`) - - Type definitions (`types.d.ts`) - -3. **Code Movement Guidelines** - The following rules determine where code should live: - - Module-specific code stays within the module - - Components used across multiple modules move to root `/components` - - Hooks used across multiple modules move to root `/hooks` - - UI elements, constants, or utilities used across modules move to root `/assets` - - Types used across modules move to root `types.d.ts` - -#### State Management - -1. **Store Organization** - - - Each module can have its own `store` folder containing: - - Jotai atoms for reactive state - - Context providers for complex state/dependency injection - - Global store at root level for cross-module state - -2. **State Movement Guidelines** - - - State used only within a component stays as local state - - State shared between components in a module uses module-level store - - State shared across modules moves to root `/store` - - Consider these factors when choosing state location: - - Scope of state usage - - Frequency of updates - - Performance implications - - Data persistence requirements - -3. **State Management Tools** - - Prefer Jotai atoms for simple reactive state - - Use Context for complex state with multiple consumers - - Local component state for UI-only concerns - -#### Implementation Strategy - -- **Current Approach**: Gradual adoption during regular development -- **Migration**: Update components to follow this structure as they are modified -- **No Big Bang**: Avoid large-scale refactoring -- **Progressive Enhancement**: Easy to implement incrementally - -This structure supports: - -- Clear ownership and responsibility -- Easy code review and modification -- Identification of reusable patterns -- Natural code organization based on usage -- Scalable architecture that grows with the application - -### Data Fetching Best Practices - -We recommend using SWR with Axios for data fetching instead of useEffect patterns. This helps achieve cleaner code while, - -- simplifying management of fetch states. -- handling cache better -- having a more interactive UI by revalidating in background -- utilizing optimistic mutations. - -#### Example: Converting useEffect Data Fetching to SWR with Axios - -❌ **Avoid this pattern:** - -```javascript -useEffect(() => { - fetchData1() - .then((data1) => { - setData1(data1) - }) - .catch((error) => { - setError1(error) - }) - - fetchData2() - .then((data2) => { - setData2(data2) - }) - .catch((error) => { - setError2(error) - }) -}, []) -``` - -✅ **Use this pattern:** - -We configure SWR globally with our pre-configured Axios instance: - -```javascript -// src/utils/swrConfig.js -import axios from "@/oss/lib/helpers/axios" -import useSWR from "swr" - -const fetcher = (url) => axios.get(url).then((res) => res.data) - -export const swrConfig = { - fetcher, -} -``` - -To ensure SWR configuration is applied globally, wrap your application with SWRConfig in `_app.tsx`: - -```javascript -// src/pages/_app.tsx -import {SWRConfig} from "swr" -import {swrConfig} from "../utils/swrConfig" - -function MyApp({Component, pageProps}) { - return ( - <SWRConfig value={swrConfig}> - <Component {...pageProps} /> - </SWRConfig> - ) -} - -export default MyApp -``` - -and data can be then be fetched in a way that fits react mental model inside the component: - -```javascript -import useSWR from "swr" - -function Component() { - const {data: data1, error: error1, loading: loadingData1} = useSWR("/api/data1") - const {data: data2, error: error2, loading: loadingData2} = useSWR("/api/data2") - - if (error1 || error2) return <div>Error loading data</div> - if (!data1 || !data2) return <div>Loading...</div> - - return ( - <div> - <div>Data 1: {data1}</div> - <div>Data 2: {data2}</div> - </div> - ) -} -``` - -Mutations can be triggered via Swr in the following way - -```javascript -import useSWRMutation from 'swr/mutation' - -async function sendRequest(url, { arg }: { arg: { username: string }}) { - return fetch(url, { - method: 'POST', - body: JSON.stringify(arg) - }).then(res => res.json()) -} - -function App() { - const { trigger, isMutating } = useSWRMutation('/api/user', sendRequest, /* options */) - - return ( - <button - disabled={isMutating} - onClick={async () => { - try { - const result = await trigger({ username: 'johndoe' }, /* options */) - } catch (e) { - // error handling - } - }} - > - Create User - </button> - ) -} -``` - -### React Best Practices - -#### Avoiding Inline Array Props - -Passing inline arrays of objects with heavy content such as JSX is considered a bad practice in React. This is because it can lead to unnecessary re-renders and performance issues. When you pass an inline array, a new array is created every time the component renders, causing React to think that the prop has changed even if the content is the same. - -For example, in the `AccordionTreePanel` component, the `items` prop is passed an inline array of objects with JSX content: - -❌ **Avoid this pattern:** - -```javascript - -<AccordionTreePanel - items={[ - { - title: "Item 1", - content: <div>Content 1</div>, - }, - { - title: "Item 2", - content: <div>Content 2</div>, - }, - ]} -/> - -``` - -✅ **Use this pattern:** - -```javascript -import {useMemo} from "react" - -const items = useMemo( - () => [ - { - title: "Item 1", - content: <div>Content 1</div>, - }, - { - title: "Item 2", - content: <div>Content 2</div>, - }, - ], - [], -) - -<AccordionTreePanel items={items} /> -``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5810643c7c..5cfd9357c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,9 +40,4 @@ We had many zombie issues and PRs (assigned but inactive) in the past. We want t - An issue may only be assigned to one person for up to one week (three days for very simple issues). If the issue remains unsolved after a week, it will be unassigned and made available to others. - Any pull request (PR) left inactive by the author for over a week will be closed. The author can reopen it if they wish to continue. -We look forward to seeing your contributions to Agenta! - -## Contributor License Agreement -If you want to contribute, we need you to sign a Contributor License Agreement. We need this to avoid potential intellectual property problems in the future. You can sign the agreement by clicking a button. Here is how it works: - -After you open a PR, a bot will automatically comment asking you to sign the agreement. Click on the link in the comment, login with your Github account, and sign the agreement. \ No newline at end of file +We look forward to seeing your contributions to Agenta! \ No newline at end of file diff --git a/LICENSE b/LICENSE index 1fff9c4444..79b3725428 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,7 @@ -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” - -Portions of this software are licensed as follows: - -- All content that resides under any "ee/" directory of this repository, if -such directories exist, are licensed under the license defined in "ee/LICENSE". -- All third party components incorporated into the Agenta Software are licensed -under the original license provided by the owner of the applicable component. -- Content outside of the above mentioned directories or restrictions above is -available under the "MIT Expat" license as defined below. - The MIT License +Copyright (c) Agentatech UG (haftungsbeschränkt) + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/README.md b/README.md index d07ac59e52..8eb9ce65a0 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,11 @@ <p align="center"> <a href="https://agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme"> <picture > - <source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/97e31bfc-b1fc-4d19-b443-5aedf6029017" > - <source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/fdc5f23f-2095-4cfc-9511-14c6851c1262" > + <source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/Agenta-AI/agenta/assets/4510758/cdddf5ad-2352-4920-b1d9-ae7f8d9d7735" > + <source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/Agenta-AI/agenta/assets/4510758/ab75cbac-b807-496f-aab3-57463a33f726" > <img alt="Shows the logo of agenta" src="https://github.com/Agenta-AI/agenta/assets/4510758/68e055d4-d7b8-4943-992f-761558c64253" > </picture> </a> - <div align="center"> <strong> <h1> The Open-source LLMOps Platform </h1></strong> Build reliable LLM applications faster with integrated prompt management, evaluation, and observability. @@ -51,7 +50,7 @@ </p> <p align="center"> - <a href="https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw"> + <a href="https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ"> <img src="https://img.shields.io/badge/JOIN US ON SLACK-4A154B?style=for-the-badge&logo=slack&logoColor=white" /> </a> <a href="https://www.linkedin.com/company/agenta-ai/"> @@ -84,15 +83,15 @@ Agenta is a platform for building production-grade LLM applications. It helps ** Collaborate with Subject Matter Experts (SMEs) on prompt engineering and make sure nothing breaks in production. - **Interactive Playground**: Compare prompts side by side against your test cases -- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://docs.agenta.ai/prompt-engineering/playground/custom-providers?utm_source=github&utm_medium=referral&utm_campaign=readme) +- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://docs.agenta.ai/prompt-engineering/playground/adding-custom-providers?utm_source=github&utm_medium=referral&utm_campaign=readme) - **Version Control**: Version prompts and configurations with branching and environments - **Complex Configurations**: Enable SMEs to collaborate on [complex configuration schemas](https://docs.agenta.ai/custom-workflows/overview?utm_source=github&utm_medium=referral&utm_campaign=readme) beyond simple prompts -[Explore prompt management →](https://docs.agenta.ai/prompt-engineering/concepts?utm_source=github&utm_medium=referral&utm_campaign=readme) +[Explore prompt management →](https://docs.agenta.ai/prompt-engineering/overview?utm_source=github&utm_medium=referral&utm_campaign=readme) ### 📊 Evaluation & Testing Evaluate your LLM applications systematically with both human and automated feedback. -- **Flexible Testsets**: Create testcases from production data, playground experiments, or upload CSVs +- **Flexible Test Sets**: Create test cases from production data, playground experiments, or upload CSVs - **Pre-built and Custom Evaluators**: Use LLM-as-judge, one of our 20+ pre-built evaluators, or you custom evaluators - **UI and API Access**: Run evaluations via UI (for SMEs) or programmatically (for engineers) - **Human Feedback Integration**: Collect and incorporate expert annotations @@ -141,7 +140,7 @@ git clone https://github.com/Agenta-AI/agenta && cd agenta 2. Start Agenta services: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` 3. Access Agenta at `http://localhost`. @@ -156,7 +155,7 @@ Find help, explore resources, or get involved: - **📚 [Documentation](https://docs.agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Full guides and API reference - **📋 [Changelog](https://docs.agenta.ai/changelog/main?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Track recent updates -- **💬 [Slack Community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw)** – Ask questions and get support +- **💬 [Slack Community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ)** – Ask questions and get support ### 🤝 Contribute @@ -267,4 +266,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/ ## Disabling Anonymized Tracking -By default, Agenta automatically reports anonymized basic usage statistics. This helps us understand how Agenta is used and track its overall usage and growth. This data does not include any sensitive information. To disable anonymized telemetry set `AGENTA_TELEMETRY_ENABLED` to `false` in your `.env` file. +By default, Agenta automatically reports anonymized basic usage statistics. This helps us understand how Agenta is used and track its overall usage and growth. This data does not include any sensitive information. To disable anonymized telemetry set `AGENTA_TELEMETRY_ENABLED` to `false` in your `.env` file. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index fabf40c910..f45e7a7624 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,76 +1,19 @@ # Security Policy - ## Reporting a Vulnerability If you believe you have found a security vulnerability in any Agenta repository, please report it to us through coordinated disclosure. -**Do not** report security vulnerabilities via public GitHub issues, pull requests, or discussions. - -Instead, please send an email to **security@agenta.ai**. - ---- - -## Information to Include - -Please include as much of the following as you can to help us reproduce and resolve the issue: - -- Type of issue (e.g., buffer overflow, SQL injection, cross-site scripting). -- Full paths of source files related to the issue. -- The location of the affected source code (tag, branch, commit SHA, or direct URL). -- Any special configuration or environment required to reproduce. -- Step-by-step instructions to reproduce. -- Proof-of-concept or exploit code (if possible). -- Expected vs actual behaviour and potential impact. -- Your contact details and disclosure timeline preference. - ---- - -## Our Process - -- **Acknowledgement**: We will acknowledge receipt within **3 business days**. -- **Triage**: We aim to complete an initial triage within **7 calendar days** and will share severity and next steps. -- **Remediation & Disclosure**: For critical vulnerabilities we aim to release a fix or mitigation within **30 days**. For other issues, typically within **90 days**. We will coordinate any public disclosure with you. -- We will provide status updates as needed during remediation. - ---- - -## Safe Harbor - -We respect and protect good-faith security research. If you follow this policy: - -- We will not initiate legal action against you for good-faith testing conducted as part of coordinated disclosure. -- Do not access, modify, or exfiltrate data beyond what is necessary to demonstrate the issue. -- Do not disrupt production services or attempt destructive actions. - ---- - -## Scope Exclusions - -The following are **out of scope**: - -- Third-party services not operated by Agenta. -- Physical security attacks or social engineering of personnel. -- Low-risk informational issues without security impact (e.g., generic version banners). -- Denial-of-service attacks (**we will not accept DoS testing against production**). - ---- - -## Recognition & Credits - -If you report a valid vulnerability and want public recognition, tell us how you wish to be credited (full name, handle, company, or anonymous). Recognition is discretionary and will be coordinated with you. - ---- - -## Emergency / Out-of-band - -If email is unavailable and you need an immediate or urgent channel, contact our general line: **team@agenta.ai** (monitored during business hours). For truly critical emergencies, include “EMERGENCY / SECURITY” in the subject line of your email. +Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests. ---- +Instead, please send an email to team@agenta.ai. -## Contact retention & privacy +Please include as much of the information listed below as you can to help us better understand and resolve the issue: -- Report metadata will be retained for incident tracking and compliance. -- Personal data you provide will be handled according to our privacy policy. -- We will only share reporter data internally on a need-to-know basis. + The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) + Full paths of source file(s) related to the manifestation of the issue + The location of the affected source code (tag/branch/commit or direct URL) + Any special configuration required to reproduce the issue + Step-by-step instructions to reproduce the issue + Proof-of-concept or exploit code (if possible) + Impact of the issue, including how an attacker might exploit the issue ---- diff --git a/api/db.schema b/api/db.schema new file mode 100644 index 0000000000..4afc58ddd2 --- /dev/null +++ b/api/db.schema @@ -0,0 +1,388 @@ +// Organizations +Table organizations [headercolor: #990D0D] { + id UUID [pk, unique, not null] + name VARCHAR [default: "agenta"] + description VARCHAR [default: "The open-source LLM developer platform for cross-functional teams."] + type VARCHAR + owner VARCHAR + created_at TIMESTAMP + updated_at TIMESTAMP + is_paying BOOLEAN [default: false] +} + +// Projects +Table projects [headercolor: #990D0D] { + id UUID [pk, unique, not null] + project_name VARCHAR [not null] + is_default BOOLEAN [default: false] + organization_id UUID [ref: > organizations.id] + workspace_id UUID [ref: > workspaces.id] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Users +Table users [headercolor: #990D0D] { + id UUID [pk, unique, not null] + uid VARCHAR [unique] + username VARCHAR [default: "agenta"] + email VARCHAR [unique, default: "demo@agenta.ai"] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Workspaces +Table workspaces [headercolor: #990D0D] { + id UUID [pk, unique, not null] + name VARCHAR + type VARCHAR + description VARCHAR + organization_id UUID [ref: > organizations.id] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Workspace Members +Table workspace_members [headercolor: #990D0D] { + id UUID [pk, unique, not null] + user_id UUID [ref: > users.id] + workspace_id UUID [ref: > workspaces.id] + role VARCHAR [default: "viewer"] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Organization Members +Table organization_members [headercolor: #990D0D] { + id UUID [pk, unique, not null] + user_id UUID [ref: > users.id] + organization_id UUID [ref: > organizations.id] +} + +// API Keys +Table api_keys [headercolor: #990D0D] { + id UUID [pk, unique, not null] + prefix VARCHAR + hashed_key VARCHAR + user_id VARCHAR + workspace_id VARCHAR + rate_limit INTEGER [default: 0] + hidden BOOLEAN [default: false] + expiration_date TIMESTAMP + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Project Members +Table project_members [headercolor: #990D0D] { + id UUID [pk, unique, not null] + user_id UUID [ref: > users.id] + project_id UUID [ref: > projects.id] + role VARCHAR [default: "viewer"] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// Project Invitations +Table invitations [headercolor: #990D0D] { + id UUID [pk, unique, not null] + token VARCHAR [unique, not null] + email VARCHAR [not null] + used BOOLEAN [default: false] + role VARCHAR + user_id UUID [ref: > users.id] + project_id UUID [ref: > projects.id] + expiration_date TIMESTAMP + created_at TIMESTAMP +} + +// Apps +Table app_db { + id UUID [pk, unique, not null] + app_name VARCHAR + user_id UUID [ref: > users.id] + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Deployments +Table deployments { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + project_id UUID [ref: > projects.id] + uri VARCHAR + status VARCHAR + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Variant Bases +Table bases { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + project_id UUID [ref: > projects.id] + base_name VARCHAR + deployment_id UUID [ref: > deployments.id] + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// App Variants +Table app_variants { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + variant_name VARCHAR + revision INTEGER + project_id UUID [ref: > projects.id] + modified_by_id UUID [ref: > users.id] + base_name VARCHAR + base_id UUID [ref: > bases.id] + config_name VARCHAR [not null] + config_parameters JSONB [not null] + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// App Variant Revisions +Table app_variant_revisions { + id UUID [pk, unique, not null] + variant_id UUID [ref: > app_variants.id] + revision INTEGER + project_id UUID [ref: > projects.id] + modified_by_id UUID [ref: > users.id] + base_id UUID [ref: > bases.id] + config_name VARCHAR [not null] + config_parameters JSONB [not null] + created_at TIMESTAMP + updated_at TIMESTAMP +} + +// App Environments +Table environments { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + name VARCHAR + project_id UUID [ref: > projects.id] + revision INTEGER + deployed_app_variant_id UUID [ref: > app_variants.id] + deployed_app_variant_revision_id UUID [ref: > app_variant_revisions.id] + deployment_id UUID [ref: > deployments.id] + created_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// App Environment Revisions +Table environments_revisions { + id UUID [pk, unique, not null] + environment_id UUID [ref: > environments.id] + project_id UUID [ref: > projects.id] + revision INTEGER + modified_by_id UUID [ref: > users.id] + deployed_app_variant_revision_id UUID [ref: > app_variant_revisions.id] + deployment_id UUID [ref: > deployments.id] + created_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Test Sets +Table testsets { + id UUID [pk, unique, not null] + name VARCHAR + project_id UUID [ref: > projects.id] + csvdata JSONB + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Evaluator Configurations +Table evaluators_configs [headercolor: #79AD51] { + id UUID [pk, unique, not null] + project_id UUID [ref: > projects.id] + name VARCHAR + evaluator_key VARCHAR + settings_values JSONB + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Human Evaluations +Table human_evaluations [headercolor: #79AD51] { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + project_id UUID [ref: > projects.id] + status VARCHAR + evaluation_type VARCHAR + testset_id UUID [ref: > testsets.id] + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Human Evaluation Scenarios +Table human_evaluations_scenarios [headercolor: #79AD51] { + id UUID [pk, unique, not null] + project_id UUID [ref: > projects.id] + evaluation_id UUID [ref: > human_evaluations.id] + inputs JSONB + outputs JSONB + vote VARCHAR + score VARCHAR + correct_answer VARCHAR + created_at TIMESTAMP + updated_at TIMESTAMP + is_pinned BOOLEAN + note VARCHAR + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Evaluations +Table evaluations [headercolor: #79AD51] { + id UUID [pk, unique, not null] + app_id UUID [ref: > app_db.id] + project_id UUID [ref: > projects.id] + status JSONB + testset_id UUID [ref: > testsets.id] + variant_id UUID [ref: > app_variants.id] + variant_revision_id UUID [ref: > app_variant_revisions.id] + average_cost JSONB + total_cost JSONB + average_latency JSONB + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +// Evaluation Scenarios +Table evaluation_scenarios [headercolor: #79AD51] { + id UUID [pk, unique, not null] + project_id UUID [ref: > projects.id] + evaluation_id UUID [ref: > evaluations.id] + variant_id UUID [ref: > app_variants.id] + inputs JSONB + outputs JSONB + correct_answers JSONB + is_pinned BOOLEAN + note VARCHAR + latency INTEGER + cost INTEGER + created_at TIMESTAMP + updated_at TIMESTAMP + workspace_id UUID [ref: > workspaces.id] + organization_id UUID [ref: > organizations.id] +} + +Table ids_mapping { + id UUID [pk, unique, not null] + table_name VARCHAR [not null] + objectid VARCHAR [not null] + uuid UUID [not null] +} + +Table human_evaluation_variants [headercolor: #79AD51] { + id UUID [pk, unique, not null] + human_evaluation_id UUID [ref: > human_evaluations.id] + variant_id UUID [ref: > app_variants.id] + variant_revision_id UUID [ref: > app_variant_revisions.id] +} + +Table evaluation_aggregated_results [headercolor: #79AD51] { + id UUID [pk, unique, not null] + evaluation_id UUID [ref: > evaluations.id] + evaluator_config_id UUID [ref: > evaluators_configs.id] + result JSONB +} + +Table evaluation_evaluator_configs [headercolor: #79AD51] { + id UUID [pk, unique, not null] + evaluation_id UUID [ref: > evaluations.id] + evaluator_config_id UUID [ref: > evaluators_configs.id] +} + +Table evaluation_scenario_results [headercolor: #79AD51] { + id UUID [pk, unique, not null] + evaluation_scenario_id UUID [ref: > evaluation_scenarios.id] + evaluator_config_id UUID [ref: > evaluators_configs.id] + result JSONB +} + +Table spans [headercolor: #E4A62E] { + id UUID [pk, unique, not null] + app_id VARCHAR [not null] + project_id VARCHAR + variant_id VARCHAR + variant_name VARCHAR + inputs JSONB + outputs JSONB + config JSONB + environment VARCHAR + tags JSONB + token_consumption INTEGER + feedbacks JSONB + name VARCHAR [not null] + trace VARCHAR + parent_span_id VARCHAR + attributes JSONB + spankind ENUM + status ENUM + user VARCHAR + start_time TIMESTAMP [not null] + end_time TIMESTAMP [not null] + tokens JSONB + cost FLOAT + created_at TIMESTAMP [default: `now()`] +} + +Table nodes [headercolor: #E4A62E] { + // Project Scope + project_id UUID [not null, ref: > projects.id] + // Lifecycle + created_at TIMESTAMP [not null] + updated_at TIMESTAMP + updated_by_id UUID + // Hierarchical Structure + root_id UUID [not null] + tree_id UUID [not null] + tree_type SQLEnum(TreeType) + node_id UUID [not null] + node_type SQLEnum(NodeType) + node_name String + parent_id UUID [ref: > nodes.node_id] + // Time + time_start TIMESTAMP [not null] + time_end TIMESTAMP [not null] + // Status + status JSONB + // Attributes + data JSONB + metrics JSONB + meta JSONB + refs JSONB + // Events + exception JSONB + // Links + links JSONB + // OTel (extra) + otel JSONB + // Full-Text Search + content String +} + + +Ref: "evaluation_scenarios"."inputs" < "evaluation_scenarios"."is_pinned" diff --git a/api/ee/LICENSE b/api/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/api/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/api_keys.py b/api/ee/databases/postgres/migrations/core/data_migrations/api_keys.py index 769b6b8157..72aef39f8a 100644 --- a/api/ee/databases/postgres/migrations/core/data_migrations/api_keys.py +++ b/api/ee/databases/postgres/migrations/core/data_migrations/api_keys.py @@ -38,8 +38,8 @@ def update_api_key_to_make_use_of_project_id(session: Connection): TOTAL_MIGRATED = 0 SKIPPED_RECORDS = 0 - # Count total rows with user_id & workspace_id isnot NULL and project_id is NULL - stmt = ( + # Count total rows with user_id & workspace_id isnot NULL & project_id is NULL + total_query = ( select(func.count()) .select_from(DeprecatedAPIKeyDB) .filter( @@ -48,14 +48,14 @@ def update_api_key_to_make_use_of_project_id(session: Connection): DeprecatedAPIKeyDB.project_id.is_(None), ) ) - result = session.execute(stmt).scalar() + result = session.execute(total_query).scalar() TOTAL_API_KEYS_WITH_USER_AND_WORKSPACE_ID = result if result is not None else 0 print( f"Total rows in api_keys table with user_id and workspace_id not been NULL is {TOTAL_API_KEYS_WITH_USER_AND_WORKSPACE_ID}" ) while True: - # Fetch a batch of api_keys with user_id & workspace_id not been NULL + # Fetch a batch of api_keys with user_id and workspace_id not been NULL records = session.execute( select(DeprecatedAPIKeyDB) .filter( @@ -154,12 +154,12 @@ def update_api_key_to_make_use_of_project_id(session: Connection): break # Count total rows with user_id and/or workspace_id been NULL - stmt = ( + query = ( select(func.count()) .select_from(DeprecatedAPIKeyDB) .filter(DeprecatedAPIKeyDB.project_id.is_(None)) ) - result = session.execute(stmt).scalar() + result = session.execute(query).scalar() TOTAL_API_KEYS_WITH_NO_USER_AND_WORKSPACE_ID = ( result if result is not None else 0 ) @@ -191,7 +191,7 @@ def revert_api_key_to_make_use_of_workspace_id(session: Connection): SKIPPED_RECORDS = 0 # Count total rows with created_by_id & project_id isnot NULL - stmt = ( + total_query = ( select(func.count()) .select_from(DeprecatedAPIKeyDB) .filter( @@ -200,7 +200,7 @@ def revert_api_key_to_make_use_of_workspace_id(session: Connection): DeprecatedAPIKeyDB.workspace_id.is_(None), ) ) - result = session.execute(stmt).scalar() + result = session.execute(total_query).scalar() TOTAL_API_KEYS_WITH_USER_AND_PROJECT_ID = result if result is not None else 0 print( f"Total rows in api_keys table with created_by_id and project_id not been NULL is {TOTAL_API_KEYS_WITH_USER_AND_PROJECT_ID}" @@ -256,7 +256,7 @@ def revert_api_key_to_make_use_of_workspace_id(session: Connection): ) # Count total rows with created_by_id and/or project_id been NULL - stmt = ( + query = ( select(func.count()) .select_from(DeprecatedAPIKeyDB) .filter( @@ -266,7 +266,7 @@ def revert_api_key_to_make_use_of_workspace_id(session: Connection): ), ) ) - result = session.execute(stmt).scalar() + result = session.execute(query).scalar() TOTAL_API_KEYS_WITH_NO_USER_AND_PROJECT_ID = result if result is not None else 0 print( f"Total rows in api_keys table with created_by_id and project_id been NULL is {TOTAL_API_KEYS_WITH_NO_USER_AND_PROJECT_ID}" diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/applications.py b/api/ee/databases/postgres/migrations/core/data_migrations/applications.py index 95353642ec..defb42f889 100644 --- a/api/ee/databases/postgres/migrations/core/data_migrations/applications.py +++ b/api/ee/databases/postgres/migrations/core/data_migrations/applications.py @@ -7,8 +7,8 @@ from sqlalchemy.future import select from sqlalchemy import delete, Connection, update, func -from oss.src.models.deprecated_models import ( # type: ignore - DeprecatedEvaluatorConfigDBwApp as DeprecatedEvaluatorConfigDB, +from ee.src.models.extended.deprecated_models import ( # type: ignore + DeprecatedEvaluatorConfigDB, DeprecatedAppDB, ) @@ -94,12 +94,12 @@ def update_evaluators_with_app_name(session: Connection): break # Delete deprecated evaluator configs with app_id as None - stmt = ( + query = ( select(func.count()) .select_from(DeprecatedEvaluatorConfigDB) .filter(DeprecatedEvaluatorConfigDB.app_id.is_(None)) ) - result = session.execute(stmt).scalar() + result = session.execute(query).scalar() TOTAL_EVALUATOR_CONFIGS_WITH_NO_APPID = result if result is not None else 0 print( f"Total rows in evaluator_configs table with no app_id: {TOTAL_EVALUATOR_CONFIGS_WITH_NO_APPID}. Deleting these rows..." diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/evaluators.py b/api/ee/databases/postgres/migrations/core/data_migrations/evaluators.py deleted file mode 100644 index c6b82d338c..0000000000 --- a/api/ee/databases/postgres/migrations/core/data_migrations/evaluators.py +++ /dev/null @@ -1,195 +0,0 @@ -import uuid -import asyncio -import traceback -from typing import Optional - -import click -from sqlalchemy.future import select -from sqlalchemy import func -from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine - - -from ee.src.models.db_models import WorkspaceMemberDB as WorkspaceMemberDBE -from oss.src.models.db_models import ProjectDB as ProjectDBE -from oss.src.dbs.postgres.workflows.dbes import ( - WorkflowArtifactDBE, - WorkflowVariantDBE, - WorkflowRevisionDBE, -) -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.core.evaluators.service import SimpleEvaluatorsService, EvaluatorsService -from oss.src.models.deprecated_models import ( - DeprecatedAutoEvaluatorConfigDBwProject as DeprecatedEvaluatorConfigDBwProject, -) -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.tracing.service import TracingService -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.dbs.postgres.tracing.dao import TracingDAO - - -# Define constants -DEFAULT_BATCH_SIZE = 200 - -# Initialize plug-ins for migration -tracing_service = TracingService( - tracing_dao=TracingDAO(), -) -tracing = TracingRouter( - tracing_service=tracing_service, -) -evaluators_service = EvaluatorsService( - workflows_service=WorkflowsService( - workflows_dao=GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, - ), - ) -) -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, -) - - -async def _fetch_project_owner( - *, - project_id: uuid.UUID, - connection: AsyncConnection, -) -> Optional[uuid.UUID]: - """Fetch the owner user ID for a given project.""" - workspace_owner_query = ( - select(WorkspaceMemberDBE.user_id) - .select_from(WorkspaceMemberDBE, ProjectDBE) - .where( - WorkspaceMemberDBE.workspace_id == ProjectDBE.workspace_id, - WorkspaceMemberDBE.role == "owner", - ProjectDBE.id == project_id, - ) - ) - result = await connection.execute(workspace_owner_query) - owner = result.scalar_one_or_none() - return owner - - -async def migration_old_evaluator_configs_to_new_evaluator_configs( - connection: AsyncConnection, -): - """Migrate old evaluator configurations to new workflow-based system.""" - try: - offset = 0 - total_migrated = 0 - skipped_records = 0 - - # Count total rows with a non-null project_id - total_query = ( - select(func.count()) - .select_from(DeprecatedEvaluatorConfigDBwProject) - .filter(DeprecatedEvaluatorConfigDBwProject.project_id.isnot(None)) - ) - result = await connection.execute(total_query) - total_rows = result.scalar() - total_evaluators = total_rows or 0 - - click.echo( - click.style( - f"Total rows in evaluator_configs with project_id: {total_evaluators}", - fg="yellow", - ) - ) - - while offset < total_evaluators: - # STEP 1: Fetch evaluator configurations with non-null project_id - result = await connection.execute( - select(DeprecatedEvaluatorConfigDBwProject) - .filter(DeprecatedEvaluatorConfigDBwProject.project_id.isnot(None)) - .offset(offset) - .limit(DEFAULT_BATCH_SIZE) - ) - evaluator_configs_rows = result.fetchall() - - if not evaluator_configs_rows: - break - - # Process and transfer records to evaluator workflows - for old_evaluator in evaluator_configs_rows: - try: - # STEP 2: Get owner from project_id - owner = await _fetch_project_owner( - project_id=old_evaluator.project_id, # type: ignore - connection=connection, - ) - if not owner: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {old_evaluator.id} due to missing owner in workspace member table", - fg="yellow", - ) - ) - continue - - # STEP 3: Migrate records using transfer_* util function - new_evaluator = await simple_evaluators_service.transfer( - project_id=old_evaluator.project_id, - user_id=owner, - evaluator_id=old_evaluator.id, - ) - if not new_evaluator: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {old_evaluator.id} due to old evaluator not existing in database table", - fg="yellow", - ) - ) - continue - - except Exception as e: - click.echo( - click.style( - f"Failed to migrate evaluator {old_evaluator.id}: {str(e)}", - fg="red", - ) - ) - click.echo(click.style(traceback.format_exc(), fg="red")) - skipped_records += 1 - continue - - # Update progress tracking for current batch - batch_migrated = len(evaluator_configs_rows) - offset += DEFAULT_BATCH_SIZE - total_migrated += batch_migrated - - click.echo( - click.style( - f"Processed {batch_migrated} records in this batch.", - fg="yellow", - ) - ) - - # Update progress tracking for all batches - remaining_records = total_evaluators - total_migrated - click.echo(click.style(f"Total migrated: {total_migrated}", fg="yellow")) - click.echo(click.style(f"Skipped records: {skipped_records}", fg="yellow")) - click.echo( - click.style(f"Records left to migrate: {remaining_records}", fg="yellow") - ) - - except Exception as e: - click.echo(f"Error occurred: {e}") - click.echo(click.style(traceback.format_exc(), fg="red")) - - -def run_migration(sqlalchemy_url: str): - import concurrent.futures - - async def _start(): - connection = create_async_engine(url=sqlalchemy_url) - async with connection.connect() as connection: - await migration_old_evaluator_configs_to_new_evaluator_configs( - connection=connection - ) - - with concurrent.futures.ThreadPoolExecutor() as executor: - future = executor.submit(asyncio.run, _start()) - future.result() diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/invitations.py b/api/ee/databases/postgres/migrations/core/data_migrations/invitations.py index 802f2ef4fe..8eaeafb2c4 100644 --- a/api/ee/databases/postgres/migrations/core/data_migrations/invitations.py +++ b/api/ee/databases/postgres/migrations/core/data_migrations/invitations.py @@ -124,19 +124,20 @@ def revert_invitations_transfer_from_new_table_to_old_table(session: Connection) TOTAL_MIGRATED = 0 # Count total rows in invitations table - stmt = select(func.count()).select_from(InvitationDB) - result = session.execute(stmt).scalar() + query = select(func.count()).select_from(InvitationDB) + result = session.execute(query).scalar() TOTAL_INVITATIONS = result if result is not None else 0 print(f"Total rows in project_invitations table is {TOTAL_INVITATIONS}") while True: # Retrieve a batch of project invitations - project_invitations = session.execute( + query = session.execute( select(InvitationDB) .offset(offset) .limit(BATCH_SIZE) .options(joinedload(InvitationDB.project)) - ).fetchall() + ) + project_invitations = query.fetchall() if not project_invitations: break diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/projects.py b/api/ee/databases/postgres/migrations/core/data_migrations/projects.py index f3178a3085..293b05f52a 100644 --- a/api/ee/databases/postgres/migrations/core/data_migrations/projects.py +++ b/api/ee/databases/postgres/migrations/core/data_migrations/projects.py @@ -21,7 +21,7 @@ EvaluatorConfigDB, HumanEvaluationDB, HumanEvaluationScenarioDB, - TestsetDB, + TestSetDB, ) @@ -38,7 +38,7 @@ EvaluatorConfigDB, # have workspace_id HumanEvaluationDB, # have workspace_id HumanEvaluationScenarioDB, # have workspace_id - TestsetDB, # have workspace_id + TestSetDB, # have workspace_id ] diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/testsets.py b/api/ee/databases/postgres/migrations/core/data_migrations/testsets.py deleted file mode 100644 index 35a8e82cb1..0000000000 --- a/api/ee/databases/postgres/migrations/core/data_migrations/testsets.py +++ /dev/null @@ -1,191 +0,0 @@ -import uuid -import asyncio -import traceback -from typing import Optional - -import click -from sqlalchemy.future import select -from sqlalchemy import func -from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine - -from ee.src.models.db_models import WorkspaceMemberDB as WorkspaceMemberDBE -from oss.src.models.db_models import ProjectDB as ProjectDBE -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.blobs.dao import BlobsDAO -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.core.testcases.service import TestcasesService -from oss.src.models.deprecated_models import DeprecatedTestsetDB -from oss.src.core.testsets.service import TestsetsService, SimpleTestsetsService - - -# Define constants -DEFAULT_BATCH_SIZE = 200 - -# Initialize plug-ins for migration -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, -) -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - - -async def _fetch_project_owner( - *, - project_id: uuid.UUID, - connection: AsyncConnection, -) -> Optional[uuid.UUID]: - """Fetch the owner user ID for a given project.""" - workspace_owner_query = ( - select(WorkspaceMemberDBE.user_id) - .select_from(WorkspaceMemberDBE, ProjectDBE) - .where( - WorkspaceMemberDBE.workspace_id == ProjectDBE.workspace_id, - WorkspaceMemberDBE.role == "owner", - ProjectDBE.id == project_id, - ) - ) - result = await connection.execute(workspace_owner_query) - owner = result.scalar_one_or_none() - return owner - - -async def migration_old_testsets_to_new_testsets( - connection: AsyncConnection, -): - """Migrate old testsets to new testsets system.""" - try: - offset = 0 - total_migrated = 0 - skipped_records = 0 - - # Count total rows with a non-null project_id - total_query = ( - select(func.count()) - .select_from(DeprecatedTestsetDB) - .filter(DeprecatedTestsetDB.project_id.isnot(None)) - ) - result = await connection.execute(total_query) - total_rows = result.scalar() - total_testsets = total_rows or 0 - - click.echo( - click.style( - f"Total rows in testsets with project_id: {total_testsets}", - fg="yellow", - ) - ) - - while offset < total_testsets: - # STEP 1: Fetch evaluator configurations with non-null project_id - result = await connection.execute( - select(DeprecatedTestsetDB) - .filter(DeprecatedTestsetDB.project_id.isnot(None)) - .offset(offset) - .limit(DEFAULT_BATCH_SIZE) - ) - testsets_rows = result.fetchall() - - if not testsets_rows: - break - - # Process and transfer records to testset workflows - for testset in testsets_rows: - try: - # STEP 2: Get owner from project_id - owner = await _fetch_project_owner( - project_id=testset.project_id, # type: ignore - connection=connection, - ) - if not owner: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {testset.id} due to missing owner in workspace member table", - fg="yellow", - ) - ) - continue - - # STEP 3: Migrate records using transfer_* util function - new_testset = await simple_testsets_service.transfer( - project_id=testset.project_id, - user_id=owner, - testset_id=testset.id, - ) - if not new_testset: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {testset.id} due to old testset not existing in database table", - fg="yellow", - ) - ) - continue - - except Exception as e: - click.echo( - click.style( - f"Failed to migrate testset {testset.id}: {str(e)}", - fg="red", - ) - ) - click.echo(click.style(traceback.format_exc(), fg="red")) - skipped_records += 1 - continue - - # Update progress tracking for current batch - batch_migrated = len(testsets_rows) - offset += DEFAULT_BATCH_SIZE - total_migrated += batch_migrated - - click.echo( - click.style( - f"Processed {batch_migrated} records in this batch.", - fg="yellow", - ) - ) - - # Update progress tracking for all batches - remaining_records = total_testsets - total_migrated - click.echo(click.style(f"Total migrated: {total_migrated}", fg="yellow")) - click.echo(click.style(f"Skipped records: {skipped_records}", fg="yellow")) - click.echo( - click.style(f"Records left to migrate: {remaining_records}", fg="yellow") - ) - - except Exception as e: - click.echo(f"Error occurred: {e}") - click.echo(click.style(traceback.format_exc(), fg="red")) - - -def run_migration(sqlalchemy_url: str): - import concurrent.futures - - async def _start(): - connection = create_async_engine(url=sqlalchemy_url) - async with connection.connect() as connection: - await migration_old_testsets_to_new_testsets(connection=connection) - - with concurrent.futures.ThreadPoolExecutor() as executor: - future = executor.submit(asyncio.run, _start()) - future.result() diff --git a/api/ee/databases/postgres/migrations/core/data_migrations/workspaces.py b/api/ee/databases/postgres/migrations/core/data_migrations/workspaces.py index 2c5a241acc..ea371ae679 100644 --- a/api/ee/databases/postgres/migrations/core/data_migrations/workspaces.py +++ b/api/ee/databases/postgres/migrations/core/data_migrations/workspaces.py @@ -4,7 +4,7 @@ from sqlalchemy.future import select from sqlalchemy import delete, Connection, insert, func -from ee.src.models.db_models import ProjectDB, WorkspaceDB +from oss.src.models.db_models import ProjectDB, WorkspaceDB from ee.src.models.db_models import ( WorkspaceMemberDB, ProjectMemberDB, @@ -39,16 +39,17 @@ def create_default_project_for_workspaces(session: Connection): TOTAL_MIGRATED = 0 # Count total rows in workspaces table - stmt = select(func.count()).select_from(WorkspaceDB) - result = session.execute(stmt).scalar() + query = select(func.count()).select_from(WorkspaceDB) + result = session.execute(query).scalar() TOTAL_WORKSPACES = result if result is not None else 0 print(f"Total rows in workspaces table is {TOTAL_WORKSPACES}") while True: # Retrieve a batch of workspaces without a project - workspaces = session.execute( + query = session.execute( select(WorkspaceDB).offset(offset).limit(BATCH_SIZE) - ).fetchall() + ) + workspaces = query.fetchall() actual_batch_size = len(workspaces) if not workspaces: break @@ -104,16 +105,17 @@ def create_default_project_memberships(session: Connection): SKIPPED_RECORDS = 0 # Count total rows in workspaces_members table - stmt = select(func.count()).select_from(WorkspaceMemberDB) - result = session.execute(stmt).scalar() + query = select(func.count()).select_from(WorkspaceMemberDB) + result = session.execute(query).scalar() TOTAL_WORKSPACES_MEMBERS = result if result is not None else 0 print(f"Total rows in workspaces_members table is {TOTAL_WORKSPACES_MEMBERS}") while True: # Retrieve a batch of workspace members - workspace_members = session.execute( + query = session.execute( select(WorkspaceMemberDB).offset(offset).limit(BATCH_SIZE) - ).fetchall() + ) + workspace_members = query.fetchall() actual_batch_size = len(workspace_members) if not workspace_members: break @@ -187,23 +189,24 @@ def remove_default_projects_from_workspaces(session: Connection): TOTAL_MIGRATED = 0 # Count total rows in projects table - stmt = ( + query = ( select(func.count()) .select_from(ProjectDB) .where(ProjectDB.is_default == True) ) - result = session.execute(stmt).scalar() + result = session.execute(query).scalar() TOTAL_PROJECTS = result if result is not None else 0 print(f"Total rows in projects table is {TOTAL_PROJECTS}") while True: # Retrieve a batch of workspaces with a default project - projects_to_delete = session.execute( + query = session.execute( select(ProjectDB) .where(ProjectDB.is_default == True) .offset(offset) .limit(BATCH_SIZE) # type: ignore - ).fetchall() + ) + projects_to_delete = query.fetchall() actual_batch_size = len(projects_to_delete) if not projects_to_delete: break diff --git a/api/ee/databases/postgres/migrations/core/env.py b/api/ee/databases/postgres/migrations/core/env.py index e5e251f801..86d8524ec3 100644 --- a/api/ee/databases/postgres/migrations/core/env.py +++ b/api/ee/databases/postgres/migrations/core/env.py @@ -8,13 +8,13 @@ from alembic import context -from oss.src.dbs.postgres.shared.engine import engine +from oss.src.models.db.postgres_engine import db_engine # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config -config.set_main_option("sqlalchemy.url", engine.postgres_uri_core) # type: ignore +config.set_main_option("sqlalchemy.url", db_engine.postgres_uri_core) # type: ignore # Interpret the config file for Python logging. @@ -26,15 +26,9 @@ # for 'autogenerate' support from oss.src.dbs.postgres.shared.base import Base -import oss.src.dbs.postgres.secrets.dbes -import oss.src.dbs.postgres.observability.dbes -import oss.src.dbs.postgres.tracing.dbes -import oss.src.dbs.postgres.testcases.dbes -import oss.src.dbs.postgres.testsets.dbes -import oss.src.dbs.postgres.queries.dbes +import oss.src.dbs.secrets.dbes import oss.src.dbs.postgres.workflows.dbes -import oss.src.dbs.postgres.evaluations.dbes - +import oss.src.dbs.postgres.observability.dbes import ee.src.dbs.postgres.meters.dbes import ee.src.dbs.postgres.subscriptions.dbes diff --git a/api/ee/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py b/api/ee/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py deleted file mode 100644 index 43be6c1579..0000000000 --- a/api/ee/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py +++ /dev/null @@ -1,32 +0,0 @@ -"""migrate old testsets to new testsets data structure - -Revision ID: 80910d2fa9a4 -Revises: ... -Create Date: 2025-07-25 07:35:57.319449 - -""" - -from typing import Sequence, Union - -from alembic import context -from ee.databases.postgres.migrations.core.data_migrations.testsets import ( - run_migration, -) - -# revision identifiers, used by Alembic. -revision: str = "80910d2fa9a4" -down_revision: Union[str, None] = "..." -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - run_migration(sqlalchemy_url=context.config.get_main_option("sqlalchemy.url")) - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - pass - # ### end Alembic commands ### diff --git a/api/ee/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py b/api/ee/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py deleted file mode 100644 index da71b370bb..0000000000 --- a/api/ee/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py +++ /dev/null @@ -1,32 +0,0 @@ -"""migrate old evaluators to new evaluators data structure - -Revision ID: bd7937ee784d -Revises: ... -Create Date: 2025-07-25 07:35:57.319449 - -""" - -from typing import Sequence, Union - -from alembic import context -from ee.databases.postgres.migrations.core.data_migrations.evaluators import ( - run_migration, -) - -# revision identifiers, used by Alembic. -revision: str = "bd7937ee784d" -down_revision: Union[str, None] = "..." -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - run_migration(sqlalchemy_url=context.config.get_main_option("sqlalchemy.url")) - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - pass - # ### end Alembic commands ### diff --git a/api/ee/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py b/api/ee/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py index dd76961a2f..e22f7c03b9 100644 --- a/api/ee/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py +++ b/api/ee/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py @@ -1,5 +1,4 @@ """Extend app_type - Revision ID: 0f086ebc2f83 Revises: 0f086ebc2f82 Create Date: 2025-01-08 10:24:00 diff --git a/api/ee/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py b/api/ee/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py deleted file mode 100644 index 735a859ce0..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py +++ /dev/null @@ -1,403 +0,0 @@ -"""add tables for queries (artifacts, variants, & revisions) - -Revision ID: 30dcf07de96a -Revises: aa1b2c3d4e5f -Create Date: 2025-07-30 14:55:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "30dcf07de96a" -down_revision: Union[str, None] = "aa1b2c3d4e5f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - ARTIFACTS -------------------------------------------------------------- - - op.create_table( - "query_artifacts", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_artifacts_project_id_slug", - "project_id", - "slug", - ), - ) - - # -------------------------------------------------------------------------- - - # - VARIANTS --------------------------------------------------------------- - - op.create_table( - "query_variants", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "artifact_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_variants_project_id_slug", - "project_id", - "slug", - ), - sa.Index( - "ix_query_variants_project_id_artifact_id", - "project_id", - "artifact_id", - ), - ) - - # -------------------------------------------------------------------------- - - # - REVISIONS -------------------------------------------------------------- - - op.create_table( - "query_revisions", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "artifact_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "variant_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "version", - sa.String(), - nullable=True, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.Column( - "message", - sa.String(), - nullable=True, - ), - sa.Column( - "author", - sa.UUID(), - nullable=False, - ), - sa.Column( - "date", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "variant_id"], - ["query_variants.project_id", "query_variants.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_revisions_project_id_slug", - "project_id", - "slug", - ), - sa.Index( - "ix_query_revisions_project_id_artifact_id", - "project_id", - "artifact_id", - ), - sa.Index( - "ix_query_revisions_project_id_variant_id", - "project_id", - "variant_id", - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - REVISIONS -------------------------------------------------------------- - - op.drop_table("query_revisions") - - # -------------------------------------------------------------------------- - - # - VARIANTS --------------------------------------------------------------- - - op.drop_table("query_variants") - - # -------------------------------------------------------------------------- - - # - ARTIFACTS -------------------------------------------------------------- - - op.drop_table("query_artifacts") - - # -------------------------------------------------------------------------- diff --git a/api/ee/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py b/api/ee/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py deleted file mode 100644 index bb43067ccb..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Populate runs references - -Revision ID: 3b5f5652f611 -Revises: b3f15a7140ab -Create Date: 2025-10-07 12:00:00 -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa -import json - -# revision identifiers, used by Alembic. -revision: str = "3b5f5652f611" -down_revision: Union[str, None] = "b3f15a7140ab" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - conn = op.get_bind() - - rows = conn.execute( - sa.text('SELECT id, data, "references" FROM evaluation_runs') - ).fetchall() - - for run_id, data, existing_refs in rows: - if existing_refs not in (None, [], {}): - continue - if not data or "steps" not in data: - continue - - refs_out = [] - seen = set() - - for step in data.get("steps", []): - refs = step.get("references", {}) - if not isinstance(refs, dict): - continue - - for key, ref in refs.items(): - if not isinstance(ref, dict): - continue - - entry = {"key": key} - - if ref.get("id") is not None: - entry["id"] = ref["id"] - if ref.get("slug") is not None: - entry["slug"] = ref["slug"] - if ref.get("version") is not None: - entry["version"] = ref["version"] - - dedup_key = ( - entry.get("id"), - entry["key"], - entry.get("slug"), - entry.get("version"), - ) - if dedup_key in seen: - continue - seen.add(dedup_key) - - refs_out.append(entry) - - if refs_out: - conn.execute( - sa.text( - 'UPDATE evaluation_runs SET "references" = :refs WHERE id = :id' - ), - {"refs": json.dumps(refs_out), "id": run_id}, - ) - - -def downgrade() -> None: - conn = op.get_bind() - conn.execute(sa.text('UPDATE evaluation_runs SET "references" = NULL')) diff --git a/api/ee/databases/postgres/migrations/core/versions/425c68e8de6c_add_secrets_dbe_model.py b/api/ee/databases/postgres/migrations/core/versions/425c68e8de6c_add_secrets_dbe_model.py index b58d9cc9ce..02cd5422f3 100644 --- a/api/ee/databases/postgres/migrations/core/versions/425c68e8de6c_add_secrets_dbe_model.py +++ b/api/ee/databases/postgres/migrations/core/versions/425c68e8de6c_add_secrets_dbe_model.py @@ -11,7 +11,7 @@ from alembic import op import sqlalchemy as sa -from oss.src.dbs.postgres.secrets.custom_fields import PGPString +from oss.src.dbs.secrets.custom_fields import PGPString # revision identifiers, used by Alembic. revision: str = "425c68e8de6c" diff --git a/api/ee/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py b/api/ee/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py deleted file mode 100644 index f8549687ce..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py +++ /dev/null @@ -1,514 +0,0 @@ -"""add tables for evaluations - -Revision ID: 54e81e9eed88 -Revises: 9698355c7650 -Create Date: 2025-04-24 07:27:45.801481 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "54e81e9eed88" -down_revision: Union[str, None] = "9698355c7650" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.rename_table( - "evaluation_aggregated_results", - "auto_evaluation_aggregated_results", - ) - op.rename_table( - "evaluation_evaluator_configs", - "auto_evaluation_evaluator_configs", - ) - op.rename_table( - "evaluation_scenario_results", - "auto_evaluation_scenario_results", - ) - op.rename_table( - "evaluation_scenarios", - "auto_evaluation_scenarios", - ) - op.rename_table( - "evaluations", - "auto_evaluations", - ) - op.rename_table( - "evaluators_configs", - "auto_evaluator_configs", - ) - - op.create_table( - "evaluation_runs", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_runs_project_id", - "project_id", - ), - ) - - op.create_table( - "evaluation_scenarios", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_scenarios_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_scenarios_run_id", - "run_id", - ), - ) - - op.create_table( - "evaluation_steps", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "timestamp", - sa.TIMESTAMP(timezone=True), - nullable=False, - ), - sa.Column( - "key", - sa.String(), - nullable=False, - ), - sa.Column( - "repeat_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "retry_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "hash_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "trace_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "testcase_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "error", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "scenario_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), - sa.UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - "key", - "retry_id", - "retry_id", - ), - sa.Index( - "ix_evaluation_steps_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_steps_scenario_id", - "scenario_id", - ), - sa.Index( - "ix_evaluation_steps_run_id", - "run_id", - ), - ) - - op.create_table( - "evaluation_metrics", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "scenario_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), - sa.UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - ), - sa.Index( - "ix_evaluation_metrics_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_metrics_run_id", - "run_id", - ), - sa.Index( - "ix_evaluation_metrics_scenario_id", - "scenario_id", - ), - ) - - -def downgrade() -> None: - op.drop_table("evaluation_metrics") - op.drop_table("evaluation_steps") - op.drop_table("evaluation_scenarios") - op.drop_table("evaluation_runs") - - op.rename_table( - "auto_evaluator_configs", - "evaluators_configs", - ) - - op.rename_table( - "auto_evaluations", - "evaluations", - ) - op.rename_table( - "auto_evaluation_scenarios", - "evaluation_scenarios", - ) - op.rename_table( - "auto_evaluation_scenario_results", - "evaluation_scenario_results", - ) - op.rename_table( - "auto_evaluation_evaluator_configs", - "evaluation_evaluator_configs", - ) - op.rename_table( - "auto_evaluation_aggregated_results", - "evaluation_aggregated_results", - ) diff --git a/api/ee/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py b/api/ee/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py deleted file mode 100644 index 62d244d1e1..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py +++ /dev/null @@ -1,426 +0,0 @@ -"""fix all preview schemas - -Revision ID: 5a71b3f140ab -Revises: 8089ee7692d1 -Create Date: 2025-09-03 14:28:06.362553 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -revision: str = "5a71b3f140ab" -down_revision: Union[str, None] = "8089ee7692d1" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # EVALUATION RUNS ---------------------------------------------------------- - - op.add_column( - "evaluation_runs", - sa.Column( - "references", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - - op.create_index( - "ix_evaluation_runs_references", - "evaluation_runs", - ["references"], - unique=False, - postgresql_using="gin", - postgresql_ops={"references": "jsonb_path_ops"}, - ) - op.create_index( - "ix_evaluation_runs_flags", - "evaluation_runs", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_runs_tags", - "evaluation_runs", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.add_column( - "evaluation_scenarios", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.create_index( - "ix_evaluation_scenarios_timestamp_interval", - "evaluation_scenarios", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_scenarios_flags", - "evaluation_scenarios", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_scenarios_tags", - "evaluation_scenarios", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION RESULTS ------------------------------------------------------- - - op.alter_column( - "evaluation_steps", - "timestamp", - existing_type=postgresql.TIMESTAMP(timezone=True), - nullable=True, - ) - op.add_column( - "evaluation_steps", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.create_unique_constraint( - "uq_evaluation_steps_project_run_scenario_step_repeat", - "evaluation_steps", - ["project_id", "run_id", "scenario_id", "step_key", "repeat_idx"], - ) - - op.create_index( - "ix_evaluation_steps_tags", - "evaluation_steps", - ["tags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_steps_flags", - "evaluation_steps", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_steps_timestamp_interval", - "evaluation_steps", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_steps_repeat_idx", - "evaluation_steps", - ["repeat_idx"], - unique=False, - ) - op.create_index( - "ix_evaluation_steps_step_key", - "evaluation_steps", - ["step_key"], - unique=False, - ) - - op.rename_table("evaluation_steps", "evaluation_results") - - op.execute( - "ALTER TABLE evaluation_results RENAME CONSTRAINT " - "uq_evaluation_steps_project_run_scenario_step_repeat TO " - "uq_evaluation_results_project_run_scenario_step_repeat" - ) - - op.execute( - "ALTER INDEX ix_evaluation_steps_project_id RENAME TO ix_evaluation_results_project_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_run_id RENAME TO ix_evaluation_results_run_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_scenario_id RENAME TO ix_evaluation_results_scenario_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_step_key RENAME TO ix_evaluation_results_step_key" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_repeat_idx RENAME TO ix_evaluation_results_repeat_idx" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_timestamp_interval RENAME TO ix_evaluation_results_timestamp_interval" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_flags RENAME TO ix_evaluation_results_flags" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_tags RENAME TO ix_evaluation_results_tags" - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.add_column( - "evaluation_metrics", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.drop_constraint( - op.f("evaluation_metrics_project_id_run_id_scenario_id_key"), - "evaluation_metrics", - type_="unique", - ) - - op.create_unique_constraint( - "uq_evaluation_metrics_project_run_scenario_timestamp_interval", - "evaluation_metrics", - ["project_id", "run_id", "scenario_id", "timestamp", "interval"], - ) - - op.create_index( - "ix_evaluation_metrics_timestamp_interval", - "evaluation_metrics", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_metrics_flags", - "evaluation_metrics", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_metrics_tags", - "evaluation_metrics", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION QUEUES -------------------------------------------------------- - - op.add_column( - "evaluation_queues", - sa.Column( - "name", - sa.String(), - nullable=True, - ), - ) - op.add_column( - "evaluation_queues", - sa.Column( - "description", - sa.String(), - nullable=True, - ), - ) - op.add_column( - "evaluation_queues", - sa.Column( - "status", - sa.VARCHAR(), - nullable=False, - server_default=sa.text("'pending'::varchar"), - ), - ) - - op.create_index( - "ix_evaluation_queues_flags", - "evaluation_queues", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_queues_tags", - "evaluation_queues", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # EVALUATION QUEUES -------------------------------------------------------- - - op.drop_index( - "ix_evaluation_queues_tags", - table_name="evaluation_queues", - ) - op.drop_index( - "ix_evaluation_queues_flags", - table_name="evaluation_queues", - ) - - op.drop_column( - "evaluation_queues", - "status", - ) - op.drop_column( - "evaluation_queues", - "description", - ) - op.drop_column( - "evaluation_queues", - "name", - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.drop_index( - "ix_evaluation_metrics_tags", - table_name="evaluation_metrics", - ) - op.drop_index( - "ix_evaluation_metrics_flags", - table_name="evaluation_metrics", - ) - op.drop_index( - "ix_evaluation_metrics_timestamp_interval", - table_name="evaluation_metrics", - ) - - op.drop_constraint( - "uq_evaluation_metrics_project_run_scenario_timestamp_interval", - "evaluation_metrics", - type_="unique", - ) - - op.create_unique_constraint( - op.f("evaluation_metrics_project_id_run_id_scenario_id_key"), - "evaluation_metrics", - ["project_id", "run_id", "scenario_id"], - postgresql_nulls_not_distinct=False, - ) - - op.drop_column("evaluation_metrics", "interval") - - # EVALUATION RESULTS ------------------------------------------------------- - - op.execute( - "ALTER INDEX ix_evaluation_results_tags RENAME TO ix_evaluation_steps_tags" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_flags RENAME TO ix_evaluation_steps_flags" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_timestamp_interval RENAME TO ix_evaluation_steps_timestamp_interval" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_repeat_idx RENAME TO ix_evaluation_steps_repeat_idx" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_step_key RENAME TO ix_evaluation_steps_step_key" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_scenario_id RENAME TO ix_evaluation_steps_scenario_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_run_id RENAME TO ix_evaluation_steps_run_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_project_id RENAME TO ix_evaluation_steps_project_id" - ) - - op.execute( - "ALTER TABLE evaluation_results RENAME CONSTRAINT uq_evaluation_results_project_run_scenario_step_repeat " - "TO uq_evaluation_steps_project_run_scenario_step_repeat" - ) - - op.rename_table("evaluation_results", "evaluation_steps") - - op.drop_index( - "ix_evaluation_steps_tags", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_flags", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_timestamp_interval", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_repeat_idx", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_step_key", - table_name="evaluation_steps", - ) - - op.drop_constraint( - "uq_evaluation_steps_project_run_scenario_step_repeat", - "evaluation_steps", - type_="unique", - ) - - op.alter_column( - "evaluation_steps", - "timestamp", - existing_type=postgresql.TIMESTAMP(timezone=True), - nullable=False, - ) - - op.drop_column("evaluation_steps", "interval") - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.drop_index( - "ix_evaluation_scenarios_tags", - table_name="evaluation_scenarios", - ) - op.drop_index( - "ix_evaluation_scenarios_flags", - table_name="evaluation_scenarios", - ) - op.drop_index( - "ix_evaluation_scenarios_timestamp_interval", - table_name="evaluation_scenarios", - ) - - op.drop_column("evaluation_scenarios", "interval") - - # EVALUATION RUNS ---------------------------------------------------------- - - op.drop_index( - "ix_evaluation_runs_tags", - table_name="evaluation_runs", - ) - op.drop_index( - "ix_evaluation_runs_flags", - table_name="evaluation_runs", - ) - op.drop_index( - "ix_evaluation_runs_references", - table_name="evaluation_runs", - ) - - op.drop_column("evaluation_runs", "references") - - # -------------------------------------------------------------------------- diff --git a/api/ee/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py b/api/ee/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py deleted file mode 100644 index 36e9e4edd4..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py +++ /dev/null @@ -1,168 +0,0 @@ -"""clean up preview entities - -Revision ID: 8089ee7692d1 -Revises: fa07e07350bf -Create Date: 2025-08-20 16:00:00.00000000 - -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa - -# revision identifiers, used by Alembic. -revision: str = "8089ee7692d1" -down_revision: Union[str, None] = "fa07e07350bf" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -TABLES_WITH_DATA_MIGRATION = [ - "evaluation_runs", - "evaluation_metrics", - "evaluation_queues", - "testcase_blobs", - "testset_revisions", - "query_revisions", - "workflow_revisions", -] - -TABLES_WITH_META_MIGRATION = [ - "evaluation_runs", - "evaluation_scenarios", - "evaluation_steps", - "evaluation_metrics", - "evaluation_queues", - "testcase_blobs", - "testset_artifacts", - "testset_variants", - "testset_revisions", - "query_artifacts", - "query_variants", - "query_revisions", - "workflow_artifacts", - "workflow_variants", - "workflow_revisions", -] - - -def upgrade() -> None: - # Convert jsonb -> json for data columns - for table in TABLES_WITH_DATA_MIGRATION: - op.alter_column( - table_name=table, - column_name="data", - type_=sa.JSON(), - postgresql_using="data::json", - ) - - # Convert jsonb -> json for meta columns - for table in TABLES_WITH_META_MIGRATION: - op.alter_column( - table_name=table, - column_name="meta", - type_=sa.JSON(), - postgresql_using="meta::json", - ) - - # Add new timestamp column - op.add_column( - "evaluation_scenarios", - sa.Column( - "timestamp", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - - # Add repeat_idx and drop old repeat_id + retry_id - op.add_column( - "evaluation_steps", - sa.Column( - "repeat_idx", - sa.Integer(), - nullable=True, - ), - ) - op.drop_column( - "evaluation_steps", - "repeat_id", - ) - op.drop_column( - "evaluation_steps", - "retry_id", - ) - - # Rename key -> step_key - op.alter_column( - "evaluation_steps", - "key", - new_column_name="step_key", - existing_type=sa.String(), # adjust if needed - existing_nullable=False, - ) - - op.drop_column( - "evaluation_metrics", - "interval", - ) - - -def downgrade() -> None: - op.add_column( - "evaluation_metrics", - sa.Column( - "interval", - sa.Integer(), - nullable=True, - ), - ) - - # Rename step_key back to key - op.alter_column( - "evaluation_steps", - "step_key", - new_column_name="key", - existing_type=sa.String(), # adjust if needed - existing_nullable=False, - ) - - # Recreate repeat_id and retry_id columns - op.add_column( - "evaluation_steps", - sa.Column("repeat_id", sa.UUID(), nullable=False), - ) - op.add_column( - "evaluation_steps", - sa.Column("retry_id", sa.UUID(), nullable=False), - ) - - # Drop repeat_idx column - op.drop_column( - "evaluation_steps", - "repeat_idx", - ) - - # Drop timestamp column - op.drop_column( - "evaluation_scenarios", - "timestamp", - ) - - # Convert meta columns back to jsonb - for table in TABLES_WITH_META_MIGRATION: - op.alter_column( - table_name=table, - column_name="meta", - type_=sa.dialects.postgresql.JSONB(), - postgresql_using="meta::jsonb", - ) - - # Convert data columns back to jsonb - for table in TABLES_WITH_DATA_MIGRATION: - op.alter_column( - table_name=table, - column_name="data", - type_=sa.dialects.postgresql.JSONB(), - postgresql_using="data::jsonb", - ) diff --git a/api/ee/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py b/api/ee/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py deleted file mode 100644 index 7a52c3d62a..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Extend app_type - -Revision ID: 863f8ebc200f -Revises: 3b5f5652f611 -Create Date: 2025-01-08 10:24:00 -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision: str = "863f8ebc200f" -down_revision: Union[str, None] = "3b5f5652f611" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -# The table/column that uses the enum -TABLE = "app_db" -COLUMN = "app_type" -TYPE_NAME = "app_type_enum" -TYPE_TEMP = "app_type_enum_temp" - -# Exact labels -ORIGINAL = ( - "CHAT_TEMPLATE", - "COMPLETION_TEMPLATE", - "CHAT_SERVICE", - "COMPLETION_SERVICE", - "CUSTOM", -) -EXTENDED = ORIGINAL + ("SDK_CUSTOM",) - - -def _create_enum(name: str, labels: tuple[str, ...]) -> None: - labels_sql = ",".join(f"'{v}'" for v in labels) - op.execute(f"CREATE TYPE {name} AS ENUM ({labels_sql})") - - -def _retype_column(to_type: str) -> None: - op.execute( - f""" - ALTER TABLE {TABLE} - ALTER COLUMN {COLUMN} - TYPE {to_type} - USING {COLUMN}::text::{to_type} - """ - ) - - -def upgrade(): - # 1) Create the replacement enum with ALL desired values - _create_enum(TYPE_TEMP, EXTENDED) - - # 2) Point the column to the tmp type - _retype_column(TYPE_TEMP) - - # 3) Drop old type and rename tmp to the canonical name - op.execute(f"DROP TYPE {TYPE_NAME}") - op.execute(f"ALTER TYPE {TYPE_TEMP} RENAME TO {TYPE_NAME}") - - -def downgrade(): - # 1) Recreate the enum WITHOUT the added values - _create_enum(TYPE_TEMP, ORIGINAL) - - # 2) Point the column back to the original label set - _retype_column(TYPE_TEMP) - - # 3) Drop current type and rename tmp back to the canonical name - op.execute(f"DROP TYPE {TYPE_NAME}") - op.execute(f"ALTER TYPE {TYPE_TEMP} RENAME TO {TYPE_NAME}") diff --git a/api/ee/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py b/api/ee/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py index 1baa0b36fe..bfd56ead5c 100644 --- a/api/ee/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py +++ b/api/ee/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py @@ -1,5 +1,4 @@ """Fix ag_config - Revision ID: 91d3b4a8c27f Revises: 7990f1e12f47 Create Date: 2025-04-24 11:00:00 diff --git a/api/ee/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py b/api/ee/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py deleted file mode 100644 index e0da80ce6b..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py +++ /dev/null @@ -1,132 +0,0 @@ -"""Migrate config_parameters from JSONB to JSON - -Revision ID: aa1b2c3d4e5f -Revises: d5d4d6bf738f -Create Date: 2025-07-11 12:00:00 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - - -# revision identifiers, used by Alembic. -revision: str = "aa1b2c3d4e5f" -down_revision: Union[str, None] = "d5d4d6bf738f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade(): - """ - Migrate config_parameters from JSONB to JSON type to preserve key ordering. - This involves: - 1. Creating new JSON columns - 2. Copying data from JSONB to JSON - 3. Dropping old JSONB columns - 4. Renaming new columns to original names - """ - - # Step 1: Add new JSON columns with temporary names - op.add_column( - "app_variants", - sa.Column("config_parameters_json_temp", sa.JSON(), nullable=True), - ) - - op.add_column( - "app_variant_revisions", - sa.Column("config_parameters_json_temp", sa.JSON(), nullable=True), - ) - - # Step 2: Copy data from JSONB to JSON columns - # For app_variants table - op.execute( - """ - UPDATE app_variants - SET config_parameters_json_temp = config_parameters::json - """ - ) - - # For app_variant_revisions table - op.execute( - """ - UPDATE app_variant_revisions - SET config_parameters_json_temp = config_parameters::json - """ - ) - - # Step 3: Drop the old JSONB columns - op.drop_column("app_variants", "config_parameters") - op.drop_column("app_variant_revisions", "config_parameters") - - # Step 4: Rename the new JSON columns to the original names - op.alter_column( - "app_variants", - "config_parameters_json_temp", - new_column_name="config_parameters", - nullable=False, - server_default="{}", - ) - - op.alter_column( - "app_variant_revisions", - "config_parameters_json_temp", - new_column_name="config_parameters", - nullable=False, - ) - - -def downgrade(): - """ - Migrate config_parameters from JSON back to JSONB type. - """ - - # Step 1: Add new JSONB columns with temporary names - op.add_column( - "app_variants", - sa.Column("config_parameters_jsonb_temp", postgresql.JSONB(), nullable=True), - ) - - op.add_column( - "app_variant_revisions", - sa.Column("config_parameters_jsonb_temp", postgresql.JSONB(), nullable=True), - ) - - # Step 2: Copy data from JSON to JSONB columns - # For app_variants table - op.execute( - """ - UPDATE app_variants - SET config_parameters_jsonb_temp = config_parameters::jsonb - """ - ) - - # For app_variant_revisions table - op.execute( - """ - UPDATE app_variant_revisions - SET config_parameters_jsonb_temp = config_parameters::jsonb - """ - ) - - # Step 3: Drop the old JSON columns - op.drop_column("app_variants", "config_parameters") - op.drop_column("app_variant_revisions", "config_parameters") - - # Step 4: Rename the new JSONB columns to the original names - op.alter_column( - "app_variants", - "config_parameters_jsonb_temp", - new_column_name="config_parameters", - nullable=False, - ) - - op.alter_column( - "app_variant_revisions", - "config_parameters_jsonb_temp", - new_column_name="config_parameters", - nullable=False, - ) diff --git a/api/ee/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py b/api/ee/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py deleted file mode 100644 index f6a9d6a9af..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py +++ /dev/null @@ -1,107 +0,0 @@ -"""Add version to evaluation entities - -Revision ID: b3f15a7140ab -Revises: 5a71b3f140ab -Create Date: 2025-10-03 14:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -revision: str = "b3f15a7140ab" -down_revision: Union[str, None] = "5a71b3f140ab" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # BASED ON - # version = Column( - # String, - # nullable=True, - # ) - - # EVALUATION RUNS ---------------------------------------------------------- - - op.add_column( - "evaluation_runs", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.add_column( - "evaluation_scenarios", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION RESULTS ------------------------------------------------------- - - op.add_column( - "evaluation_results", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.add_column( - "evaluation_metrics", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION QUEUES -------------------------------------------------------- - - op.add_column( - "evaluation_queues", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # EVALUATION QUEUES -------------------------------------------------------- - - op.drop_column("evaluation_queues", "version") - - # EVALUATION METRICS ------------------------------------------------------- - - op.drop_column("evaluation_metrics", "version") - - # EVALUATION RESULTS ------------------------------------------------------- - - op.drop_column("evaluation_results", "version") - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.drop_column("evaluation_scenarios", "version") - - # EVALUATION RUNS ---------------------------------------------------------- - - op.drop_column("evaluation_runs", "version") - - # -------------------------------------------------------------------------- diff --git a/api/ee/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py b/api/ee/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py deleted file mode 100644 index 7363127679..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py +++ /dev/null @@ -1,63 +0,0 @@ -"""migrate data.script from string to object - -Revision ID: baa02d66a365 -Revises: 863f8ebc200f -Create Date: 2025-11-06 15:49:00 -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision: str = "baa02d66a365" -down_revision: Union[str, None] = "863f8ebc200f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # Convert data.script from a JSON string to: - # {"content": <old string>, "runtime": "python"} - op.execute( - sa.text( - """ - UPDATE public.workflow_revisions - SET data = jsonb_set( - data::jsonb, - '{script}', - jsonb_build_object( - 'content', data->>'script', - 'runtime', 'python' - ) - )::json - WHERE data->>'script' IS NOT NULL - AND json_typeof(data->'script') = 'string'; - """ - ) - ) - - -def downgrade() -> None: - # Revert only objects shaped like: - # {"content": <string>, "runtime": "python"} -> "<string>" - op.execute( - sa.text( - """ - UPDATE public.workflow_revisions - SET data = jsonb_set( - data::jsonb, - '{script}', - to_jsonb( (data->'script'->>'content') ) - )::json - WHERE json_typeof(data->'script') = 'object' - AND (data->'script') ? 'content' - AND json_typeof(data->'script'->'content') = 'string' - AND ( - (data->'script' ? 'runtime') IS FALSE - OR (data->'script'->>'runtime') = 'python' - ); - """ - ) - ) diff --git a/api/ee/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py b/api/ee/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py deleted file mode 100644 index 6d39d973aa..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py +++ /dev/null @@ -1,116 +0,0 @@ -"""add evaluation queues - -Revision ID: d5d4d6bf738f -Revises: fd77265d65dc -Create Date: 2025-07-10 17:04:00.000000 -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "d5d4d6bf738f" -down_revision: Union[str, None] = "fd77265d65dc" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.create_table( - "evaluation_queues", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_queues_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_queues_run_id", - "run_id", - ), - ) - - -def downgrade() -> None: - op.drop_table("evaluation_queues") diff --git a/api/ee/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py b/api/ee/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py deleted file mode 100644 index c6d85c7467..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py +++ /dev/null @@ -1,34 +0,0 @@ -"""add timestamp to metrics - -Revision ID: fa07e07350bf -Revises: 30dcf07de96a -Create Date: 2025-07-30 14:55:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa - -# revision identifiers, used by Alembic. -revision: str = "fa07e07350bf" -down_revision: Union[str, None] = "30dcf07de96a" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.add_column( - "evaluation_metrics", - sa.Column("timestamp", sa.TIMESTAMP(timezone=True), nullable=True), - ) - op.add_column( - "evaluation_metrics", - sa.Column("interval", sa.INTEGER(), nullable=True), - ) - - -def downgrade() -> None: - op.drop_column("evaluation_metrics", "interval") - op.drop_column("evaluation_metrics", "timestamp") diff --git a/api/ee/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py b/api/ee/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py deleted file mode 100644 index 0e4666cc84..0000000000 --- a/api/ee/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py +++ /dev/null @@ -1,232 +0,0 @@ -"""fix previw entities - -Revision ID: fd77265d65dc -Revises: 54e81e9eed88 -Create Date: 2025-05-29 16:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "fd77265d65dc" -down_revision: Union[str, None] = "54e81e9eed88" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - WORKFLOWS -------------------------------------------------------------- - - op.add_column( - "workflow_artifacts", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "workflow_variants", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "workflow_revisions", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # - TESTSETS --------------------------------------------------------------- - - op.add_column( - "testset_artifacts", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testset_variants", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testset_revisions", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # - TESTCASES -------------------------------------------------------------- - - op.add_column( - "testcase_blobs", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.drop_column("testcase_blobs", "slug") - op.add_column( - "testcase_blobs", - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - ) - - # - EVALUATIONS ------------------------------------------------------------ - - op.add_column( - "evaluation_runs", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_scenarios", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_steps", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_metrics", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - WORKFLOWS -------------------------------------------------------------- - - op.drop_column("workflow_artifacts", "tags") - op.drop_column("workflow_variants", "tags") - op.drop_column("workflow_revisions", "tags") - - # - TESTSETS --------------------------------------------------------------- - - op.drop_column("testset_artifacts", "tags") - op.drop_column("testset_variants", "tags") - op.drop_column("testset_revisions", "tags") - - # - TESTCASES -------------------------------------------------------------- - - op.drop_column("testcase_blobs", "flags") - op.drop_column("testcase_blobs", "tags") - op.drop_column("testcase_blobs", "meta") - op.add_column( - "testcase_blobs", - sa.Column( - "slug", - sa.String(), - nullable=True, - ), - ) - op.drop_column("testcase_blobs", "created_at") - op.drop_column("testcase_blobs", "updated_at") - op.drop_column("testcase_blobs", "deleted_at") - op.drop_column("testcase_blobs", "created_by_id") - op.drop_column("testcase_blobs", "updated_by_id") - op.drop_column("testcase_blobs", "deleted_by_id") - - # - EVALUATIONS ------------------------------------------------------------ - - op.drop_column("evaluation_runs", "tags") - op.drop_column("evaluation_scenarios", "tags") - op.drop_column("evaluation_steps", "tags") - op.drop_column("evaluation_metrics", "tags") - - # -------------------------------------------------------------------------- diff --git a/api/ee/databases/postgres/migrations/runner.py b/api/ee/databases/postgres/migrations/runner.py deleted file mode 100644 index 14baed1924..0000000000 --- a/api/ee/databases/postgres/migrations/runner.py +++ /dev/null @@ -1,21 +0,0 @@ -import asyncio - -from ee.databases.postgres.migrations.utils import ( - split_core_and_tracing, - copy_nodes_from_core_to_tracing, -) -from ee.databases.postgres.migrations.core.utils import ( - run_alembic_migration as migrate_core, -) -from ee.databases.postgres.migrations.tracing.utils import ( - run_alembic_migration as migrate_tracing, -) - - -if __name__ == "__main__": - loop = asyncio.get_event_loop() - - loop.run_until_complete(split_core_and_tracing()) - migrate_core() - migrate_tracing() - loop.run_until_complete(copy_nodes_from_core_to_tracing()) diff --git a/api/ee/databases/postgres/migrations/tracing/env.py b/api/ee/databases/postgres/migrations/tracing/env.py index 9376d4486d..379d8c4ae9 100644 --- a/api/ee/databases/postgres/migrations/tracing/env.py +++ b/api/ee/databases/postgres/migrations/tracing/env.py @@ -8,13 +8,13 @@ from alembic import context -from oss.src.dbs.postgres.shared.engine import engine +from oss.src.models.db.postgres_engine import db_engine # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config -config.set_main_option("sqlalchemy.url", engine.postgres_uri_tracing) # type: ignore +config.set_main_option("sqlalchemy.url", db_engine.postgres_uri_tracing) # type: ignore # Interpret the config file for Python logging. diff --git a/api/ee/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py b/api/ee/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py index 4b6903973b..30be9c9a30 100644 --- a/api/ee/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py +++ b/api/ee/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py @@ -1,7 +1,7 @@ """add_nodes_dbe Revision ID: 847972cfa14a -Revises: 58b1b61e5d6c +Revises: 320a4a7ee0c7 Create Date: 2024-11-07 12:21:19.080345 """ diff --git a/api/ee/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py b/api/ee/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py deleted file mode 100644 index 6cb4e3f963..0000000000 --- a/api/ee/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py +++ /dev/null @@ -1,202 +0,0 @@ -"""fix spans - -Revision ID: fd77265d65dc -Revises: 847972cfa14a -Create Date: 2025-05-29 16:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -from oss.src.core.tracing.dtos import SpanType -from oss.src.core.tracing.dtos import TraceType - -# revision identifiers, used by Alembic. -revision: str = "fd77265d65dc" -down_revision: Union[str, None] = "847972cfa14a" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - SPANS ------------------------------------------------------------------ - trace_type_enum = sa.Enum(TraceType, name="tracetype") - span_type_enum = sa.Enum(SpanType, name="spantype") - - trace_type_enum.create(op.get_bind(), checkfirst=True) - span_type_enum.create(op.get_bind(), checkfirst=True) - - op.add_column( - "spans", - sa.Column( - "trace_type", - trace_type_enum, - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "span_type", - span_type_enum, - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "hashes", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "exception", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - op.create_index( - "ix_spans_project_id_trace_type", - "spans", - ["project_id", "trace_type"], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_span_type", - "spans", - ["project_id", "span_type"], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_trace_id_created_at", - "spans", - ["project_id", "trace_id", sa.text("created_at DESC")], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_trace_id_start_time", - "spans", - ["project_id", "trace_id", sa.text("start_time DESC")], - if_not_exists=True, - ) - op.create_index( - "ix_hashes_gin", - "spans", - ["hashes"], - postgresql_using="gin", - postgresql_ops={"hashes": "jsonb_path_ops"}, - if_not_exists=True, - ) - op.drop_index( - "ix_events_gin", - table_name="spans", - if_exists=True, - ) - op.create_index( - "ix_events_gin", - "spans", # replace with your table name - ["events"], - postgresql_using="gin", - postgresql_ops={"events": "jsonb_path_ops"}, - if_not_exists=True, - ) - op.create_index( - "ix_spans_fts_attributes_gin", - "spans", - [sa.text("to_tsvector('simple', attributes)")], - postgresql_using="gin", - if_not_exists=True, - ) - op.create_index( - "ix_spans_fts_events_gin", - "spans", - [sa.text("to_tsvector('simple', events)")], - postgresql_using="gin", - if_not_exists=True, - ) - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - SPANS ------------------------------------------------------------------ - op.drop_index( - "ix_spans_fts_events_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_fts_attributes_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_events_gin", - table_name="spans", - if_exists=True, - ) - op.create_index( - "ix_events_gin", - "spans", - ["events"], - postgresql_using="gin", - if_not_exists=True, - ) - op.drop_index( - "ix_hashes_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_id_start_time", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_id_created_at", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_span_type", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_type", - table_name="spans", - if_exists=True, - ) - op.drop_column( - "spans", - "exception", - if_exists=True, - ) - op.drop_column( - "spans", - "hashes", - if_exists=True, - ) - op.drop_column( - "spans", - "span_type", - if_exists=True, - ) - op.drop_column( - "spans", - "trace_type", - if_exists=True, - ) - - span_type_enum = sa.Enum(SpanType, name="spantype") - trace_type_enum = sa.Enum(TraceType, name="tracetype") - - span_type_enum.drop(op.get_bind(), checkfirst=True) - trace_type_enum.drop(op.get_bind(), checkfirst=True) - # -------------------------------------------------------------------------- diff --git a/api/ee/databases/postgres/migrations/utils.py b/api/ee/databases/postgres/migrations/utils.py index f3874da1c8..393ac80d57 100644 --- a/api/ee/databases/postgres/migrations/utils.py +++ b/api/ee/databases/postgres/migrations/utils.py @@ -3,8 +3,6 @@ import tempfile from sqlalchemy import create_engine, text -from sqlalchemy.ext.asyncio import create_async_engine - from sqlalchemy.exc import ProgrammingError from oss.src.utils.env import env @@ -15,9 +13,9 @@ os.getenv("POSTGRES_URI") or env.POSTGRES_URI_CORE or env.POSTGRES_URI_TRACING - or "postgresql+asyncpg://username:password@localhost:5432/agenta_ee" + or "postgresql://username:password@localhost:5432/agenta_ee" ) -DB_PROTOCOL = POSTGRES_URI.split("://")[0] # .replace("+asyncpg", "") +DB_PROTOCOL = POSTGRES_URI.split("://")[0].replace("+asyncpg", "") DB_USER = POSTGRES_URI.split("://")[1].split(":")[0] DB_PASS = POSTGRES_URI.split("://")[1].split(":")[1].split("@")[0] DB_HOST = POSTGRES_URI.split("@")[1].split(":")[0] @@ -41,37 +39,31 @@ } -async def copy_nodes_from_core_to_tracing(): - engine = create_async_engine( +def copy_nodes_from_core_to_tracing(): + engine = create_engine( POSTGRES_URI_POSTGRES, isolation_level="AUTOCOMMIT", ) - async with engine.begin() as conn: + with engine.connect() as conn: for old_name, new_name in NODES_TF.items(): - old_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": old_name}, - ) + old_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": old_name}, ).scalar() - new_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": new_name}, - ) + new_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": new_name}, ).scalar() if old_exists and new_exists: # Check if the nodes table exists in old_name database check_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{old_name}" - check_engine = create_async_engine(check_url) - async with check_engine.begin() as conn: - result = ( - await conn.execute( - text("SELECT to_regclass('public.nodes')"), - ) + check_engine = create_engine(check_url) + with check_engine.connect() as conn: + result = conn.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() if result is None: print( @@ -79,10 +71,8 @@ async def copy_nodes_from_core_to_tracing(): ) return - count = ( - await conn.execute( - text("SELECT COUNT(*) FROM public.nodes"), - ) + count = conn.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() if count == 0: @@ -92,18 +82,14 @@ async def copy_nodes_from_core_to_tracing(): return check_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" - check_engine = create_async_engine(check_url) + check_engine = create_engine(check_url) - async with check_engine.begin() as conn: - count = ( - await conn.execute( - text( - "SELECT COUNT(*) FROM public.nodes", - ) - ) + with check_engine.connect() as conn: + count = conn.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() - if (count or 0) > 0: + if count > 0: print( f"⚠️ Table 'nodes' already exists in '{new_name}' with {count} rows. Skipping copy." ) @@ -163,26 +149,21 @@ async def copy_nodes_from_core_to_tracing(): print(f"✔ Restored 'nodes' table into '{new_name}'") # Step 3: Verify 'nodes' exists in both DBs, then drop from old - source_engine = create_async_engine( + source_engine = create_engine( f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{old_name}" ) - dest_engine = create_async_engine( + dest_engine = create_engine( f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" ) - async with source_engine.begin() as src, dest_engine.begin() as dst: - src = await src.execution_options(isolation_level="AUTOCOMMIT") - dst = await dst.execution_options(isolation_level="AUTOCOMMIT") - - src_exists = ( - await src.execute( - text("SELECT to_regclass('public.nodes')") - ) + with source_engine.connect().execution_options( + autocommit=True + ) as src, dest_engine.connect() as dst: + src_exists = src.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() - dst_exists = ( - await dst.execute( - text("SELECT to_regclass('public.nodes')"), - ) + dst_exists = dst.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() if src_exists and dst_exists: @@ -204,10 +185,8 @@ async def copy_nodes_from_core_to_tracing(): env={**os.environ, "PGPASSWORD": DB_PASS}, ) - count = ( - await src.execute( - text("SELECT COUNT(*) FROM public.nodes"), - ) + count = src.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() print(f"✅ Remaining rows: {count}") @@ -219,32 +198,28 @@ async def copy_nodes_from_core_to_tracing(): os.remove(dump_file) -async def split_core_and_tracing(): - engine = create_async_engine( +def split_core_and_tracing(): + engine = create_engine( POSTGRES_URI_POSTGRES, isolation_level="AUTOCOMMIT", ) - async with engine.begin() as conn: + with engine.connect() as conn: for old_name, new_name in RENAME_MAP.items(): - old_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": old_name}, - ) + old_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": old_name}, ).scalar() - new_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": new_name}, - ) + new_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": new_name}, ).scalar() if old_exists and not new_exists: print(f"Renaming database '{old_name}' → '{new_name}'...") try: - await conn.execute( + conn.execute( text(f"ALTER DATABASE {old_name} RENAME TO {new_name}") ) print(f"✔ Renamed '{old_name}' to '{new_name}'") @@ -262,7 +237,7 @@ async def split_core_and_tracing(): ) try: # Ensure the role exists - await conn.execute( + conn.execute( text( f""" DO $$ @@ -278,11 +253,11 @@ async def split_core_and_tracing(): print(f"✔ Ensured role '{DB_USER}' exists") # Create the new database - await conn.execute(text(f"CREATE DATABASE {new_name}")) + conn.execute(text(f"CREATE DATABASE {new_name}")) print(f"✔ Created database '{new_name}'") # Grant privileges on the database to the role - await conn.execute( + conn.execute( text( f"GRANT ALL PRIVILEGES ON DATABASE {new_name} TO {DB_USER}" ) @@ -292,12 +267,12 @@ async def split_core_and_tracing(): ) # Connect to the new database to grant schema permissions - new_db_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" + new_db_url = f"postgresql://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" - async with create_async_engine( + with create_engine( new_db_url, isolation_level="AUTOCOMMIT" - ).begin() as new_db_conn: - await new_db_conn.execute( + ).connect() as new_db_conn: + new_db_conn.execute( text(f"GRANT ALL ON SCHEMA public TO {DB_USER}") ) print( diff --git a/api/ee/docker/Dockerfile.dev b/api/ee/docker/Dockerfile.dev index 2074141a18..c66c5b3021 100644 --- a/api/ee/docker/Dockerfile.dev +++ b/api/ee/docker/Dockerfile.dev @@ -18,13 +18,9 @@ RUN pip install --upgrade pip \ COPY ./ee /app/ee/ COPY ./oss /app/oss/ COPY ./entrypoint.py ./pyproject.toml /app/ -# RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi -# - -ENV PYTHONPATH=/sdk:$PYTHONPATH COPY ./ee/src/crons/meters.sh /meters.sh COPY ./ee/src/crons/meters.txt /etc/cron.d/meters-cron @@ -34,12 +30,4 @@ RUN cat -A /etc/cron.d/meters-cron RUN chmod +x /meters.sh \ && chmod 0644 /etc/cron.d/meters-cron -COPY ./oss/src/crons/queries.sh /queries.sh -COPY ./oss/src/crons/queries.txt /etc/cron.d/queries-cron -RUN sed -i -e '$a\' /etc/cron.d/queries-cron -RUN cat -A /etc/cron.d/queries-cron - -RUN chmod +x /queries.sh \ - && chmod 0644 /etc/cron.d/queries-cron - -EXPOSE 8000 +EXPOSE 8000 \ No newline at end of file diff --git a/api/ee/docker/Dockerfile.gh b/api/ee/docker/Dockerfile.gh index ab3a06b2ff..c66c5b3021 100644 --- a/api/ee/docker/Dockerfile.gh +++ b/api/ee/docker/Dockerfile.gh @@ -18,13 +18,9 @@ RUN pip install --upgrade pip \ COPY ./ee /app/ee/ COPY ./oss /app/oss/ COPY ./entrypoint.py ./pyproject.toml /app/ -COPY ./sdk /sdk/ RUN poetry config virtualenvs.create false \ - && poetry install --no-interaction --no-ansi \ - && pip install --force-reinstall --upgrade /sdk/ - -# + && poetry install --no-interaction --no-ansi COPY ./ee/src/crons/meters.sh /meters.sh COPY ./ee/src/crons/meters.txt /etc/cron.d/meters-cron @@ -34,12 +30,4 @@ RUN cat -A /etc/cron.d/meters-cron RUN chmod +x /meters.sh \ && chmod 0644 /etc/cron.d/meters-cron -COPY ./oss/src/crons/queries.sh /queries.sh -COPY ./oss/src/crons/queries.txt /etc/cron.d/queries-cron -RUN sed -i -e '$a\' /etc/cron.d/queries-cron -RUN cat -A /etc/cron.d/queries-cron - -RUN chmod +x /queries.sh \ - && chmod 0644 /etc/cron.d/queries-cron - -EXPOSE 8000 +EXPOSE 8000 \ No newline at end of file diff --git a/api/ee/src/apis/fastapi/billing/router.py b/api/ee/src/apis/fastapi/billing/router.py index 08762eaa76..0fcf42b5f2 100644 --- a/api/ee/src/apis/fastapi/billing/router.py +++ b/api/ee/src/apis/fastapi/billing/router.py @@ -1,25 +1,21 @@ -from typing import Any, Dict from os import environ from json import loads, decoder from uuid import getnode from datetime import datetime, timezone -from dateutil.relativedelta import relativedelta from fastapi import APIRouter, Request, status, HTTPException, Query from fastapi.responses import JSONResponse import stripe -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - from oss.src.services.db_manager import ( get_user_with_id, get_organization_by_id, ) +from oss.src.apis.fastapi.shared.utils import handle_exceptions + from ee.src.utils.permissions import check_action_access from ee.src.models.shared_models import Permission from ee.src.core.entitlements.types import ENTITLEMENTS, CATALOG, Tracker, Quota @@ -49,6 +45,8 @@ class SubscriptionsRouter: + VERSION = "1.0.0" + def __init__( self, subscription_service: SubscriptionsService, @@ -156,7 +154,7 @@ def __init__( # HANDLERS - @intercept_exceptions() + @handle_exceptions() async def handle_events( self, request: Request, @@ -571,146 +569,76 @@ async def fetch_subscription( organization_id=organization_id, ) - if not subscription or not subscription.plan: - return JSONResponse( - status_code=status.HTTP_404_NOT_FOUND, - content={ - "status": "error", - "message": "Subscription (Agenta) not found", - }, - ) - plan = subscription.plan anchor = subscription.anchor - _status: Dict[str, Any] = dict( - plan=plan.value, - type="standard", - ) - - if plan == Plan.CLOUD_V0_HOBBY: - return _status - - if not subscription.subscription_id: - return JSONResponse( - status_code=status.HTTP_404_NOT_FOUND, - content={ - "status": "error", - "message": "Subscription (Agenta) not found", - }, - ) - - if not stripe.api_key: - return JSONResponse( - status_code=status.HTTP_403_FORBIDDEN, - content={ - "status": "error", - "message": "Missing Stripe API Key", - }, - ) - - try: - _subscription = stripe.Subscription.retrieve( - id=subscription.subscription_id, - ) - except Exception: - _subscription = None - - if _subscription: - _status["period_start"] = int(_subscription.current_period_start) - _status["period_end"] = int(_subscription.current_period_end) - _status["free_trial"] = _subscription.status == "trialing" + _status = {"plan": plan.value, "type": "standard"} - return _status - - if not anchor or anchor < 1 or anchor > 31: - anchor = now.day - - last_day_this_month = ( - datetime( - now.year, - now.month, - 1, - tzinfo=timezone.utc, - ) - + relativedelta( - months=+1, - days=-1, - ) - ).day - - day_this_month = min(anchor, last_day_this_month) - - if now.day < anchor: - prev_month = now + relativedelta( - months=-1, - ) - - last_day_prev_month = ( - datetime( - prev_month.year, - prev_month.month, - 1, - tzinfo=timezone.utc, - ) - + relativedelta( - months=+1, - days=-1, + if plan != Plan.CLOUD_V0_HOBBY: + if not stripe.api_key: + return JSONResponse( + status_code=status.HTTP_403_FORBIDDEN, + content={"status": "error", "message": "Missing Stripe API Key"}, ) - ).day - - day_prev_month = min(anchor, last_day_prev_month) - period_start = datetime( - year=prev_month.year, - month=prev_month.month, - day=day_prev_month, - tzinfo=timezone.utc, - ) - period_end = datetime( - year=now.year, - month=now.month, - day=day_this_month, - tzinfo=timezone.utc, - ) - else: - period_start = datetime( - year=now.year, - month=now.month, - day=day_this_month, - tzinfo=timezone.utc, - ) - - next_month = now + relativedelta( - months=+1, - ) - - last_day_next_month = ( - datetime( - next_month.year, - next_month.month, - 1, - tzinfo=timezone.utc, - ) - + relativedelta( - months=+1, - days=-1, + if not subscription: + return JSONResponse( + status_code=status.HTTP_404_NOT_FOUND, + content={ + "status": "error", + "message": "Subscription (Agenta) not found", + }, ) - ).day - day_next_month = min(anchor, last_day_next_month) + try: + subscription = stripe.Subscription.retrieve( + id=subscription.subscription_id, + ) + except: # pylint: disable=bare-except + subscription = None - period_end = datetime( - year=next_month.year, - month=next_month.month, - day=day_next_month, - tzinfo=timezone.utc, - ) + if not subscription: + if now.day < anchor: + _status["period_start"] = int( + datetime( + year=(now.year + (now.month - 2) // 12), + month=(now.month - 2) % 12 + 1, + day=anchor, + tzinfo=timezone.utc, + ).timestamp() + ) + _status["period_end"] = int( + datetime( + year=now.year, + month=now.month, + day=anchor, + tzinfo=timezone.utc, + ).timestamp() + ) + else: + _status["period_start"] = int( + datetime( + year=now.year, + month=now.month, + day=anchor, + tzinfo=timezone.utc, + ).timestamp() + ) + _status["period_end"] = int( + datetime( + year=(now.year + (now.month) // 12), + month=(now.month + 1) % 12, + day=anchor, + tzinfo=timezone.utc, + ).timestamp() + ) - _status["period_start"] = int(period_start.timestamp()) - _status["period_end"] = int(period_end.timestamp()) - _status["free_trial"] = False - _status["type"] = "custom" + _status["free_trial"] = False + _status["type"] = "custom" + else: + _status["period_start"] = subscription.current_period_start + _status["period_end"] = subscription.current_period_end + _status["free_trial"] = subscription.status == "trialing" return _status @@ -803,7 +731,7 @@ async def fetch_usage( return usage - @intercept_exceptions() + @handle_exceptions() async def report_usage( self, ): @@ -819,24 +747,23 @@ async def report_usage( # ROUTES - @intercept_exceptions() + @handle_exceptions() async def create_portal_user_route( self, request: Request, ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.create_portal( organization_id=request.state.organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def create_portal_admin_route( self, organization_id: str = Query(...), @@ -845,20 +772,19 @@ async def create_portal_admin_route( organization_id=organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def create_checkout_user_route( self, request: Request, plan: Plan = Query(...), success_url: str = Query(...), # find a way to make this optional or moot ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.create_checkout( organization_id=request.state.organization_id, @@ -866,7 +792,7 @@ async def create_checkout_user_route( success_url=success_url, ) - @intercept_exceptions() + @handle_exceptions() async def create_checkout_admin_route( self, organization_id: str = Query(...), @@ -879,43 +805,41 @@ async def create_checkout_admin_route( success_url=success_url, ) - @intercept_exceptions() + @handle_exceptions() async def fetch_plan_user_route( self, request: Request, ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.VIEW_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.fetch_plans( organization_id=request.state.organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def switch_plans_user_route( self, request: Request, plan: Plan = Query(...), ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.switch_plans( organization_id=request.state.organization_id, plan=plan, ) - @intercept_exceptions() + @handle_exceptions() async def switch_plans_admin_route( self, organization_id: str = Query(...), @@ -926,41 +850,39 @@ async def switch_plans_admin_route( plan=plan, ) - @intercept_exceptions() + @handle_exceptions() async def fetch_subscription_user_route( self, request: Request, ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.VIEW_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.fetch_subscription( organization_id=request.state.organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def cancel_subscription_user_route( self, request: Request, ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.cancel_subscription( organization_id=request.state.organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def cancel_subscription_admin_route( self, organization_id: str = Query(...), @@ -969,18 +891,17 @@ async def cancel_subscription_admin_route( organization_id=organization_id, ) - @intercept_exceptions() + @handle_exceptions() async def fetch_usage_user_route( self, request: Request, ): - if is_ee(): - if not await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_BILLING, - ): - return FORBIDDEN_RESPONSE + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.VIEW_BILLING, + ): + return FORBIDDEN_RESPONSE return await self.fetch_usage( organization_id=request.state.organization_id, diff --git a/api/ee/src/core/entitlements/types.py b/api/ee/src/core/entitlements/types.py index e346f11c57..fa8ec29577 100644 --- a/api/ee/src/core/entitlements/types.py +++ b/api/ee/src/core/entitlements/types.py @@ -60,9 +60,9 @@ class Probe(BaseModel): }, }, "features": [ - "Unlimited prompts", - "20 evaluations/month", + "2 prompts", "5k traces/month", + "20 evaluations/month", "2 seats", ], }, @@ -109,9 +109,9 @@ class Probe(BaseModel): }, "features": [ "Unlimited prompts", + "10k traces/month", "Unlimited evaluations", - "10k free traces/month", - "3 free seats", + "3 seats included", "Up to 10 seats", ], }, @@ -119,39 +119,19 @@ class Probe(BaseModel): "title": "Business", "description": "For scale, security, and support.", "type": "standard", - "plan": Plan.CLOUD_V0_BUSINESS.value, "price": { "base": { "type": "flat", "currency": "USD", "amount": 399.00, - }, - "traces": { - "type": "tiered", - "currency": "USD", - "tiers": [ - { - "limit": 1_000_000, - "amount": 0.00, - }, - { - "amount": 5.00, - "rate": 10_000, - }, - ], + "starting_at": True, }, }, "features": [ - "Everything in Pro", + "Unlimited prompts", + "Unlimited traces", + "Unlimited evaluations", "Unlimited seats", - "1M free traces/month", - "Multiple workspaces [soon]", - "Roles and RBAC", - "SSO and MFA [soon]", - "SOC 2 reports", - "HIPAA BAA [soon]", - "Private Slack Channel", - "Business SLA", ], }, { @@ -160,15 +140,13 @@ class Probe(BaseModel): "type": "standard", "features": [ "Everything in Business", - "Custom roles", - "Enterprise SSO", - "Audit logs", - "Self-hosting options", - "Bring Your Own Cloud (BYOC)", + "Enterprise-grade security", + "SOC 2 reports", "Security reviews", "Dedicated support", - "Custom SLA", + "Custom SLAs", "Custom terms", + "Self-hosted deployment options", ], }, { @@ -212,7 +190,7 @@ class Probe(BaseModel): }, Tracker.GAUGES: { Gauge.USERS: Quota(limit=2, strict=True, free=2), - Gauge.APPLICATIONS: Quota(strict=True), + Gauge.APPLICATIONS: Quota(limit=2, strict=True, free=2), }, }, Plan.CLOUD_V0_PRO: { @@ -229,20 +207,6 @@ class Probe(BaseModel): Gauge.APPLICATIONS: Quota(strict=True), }, }, - Plan.CLOUD_V0_BUSINESS: { - Tracker.FLAGS: { - Flag.HOOKS: True, - Flag.RBAC: True, - }, - Tracker.COUNTERS: { - Counter.TRACES: Quota(monthly=True, free=1_000_000), - Counter.EVALUATIONS: Quota(monthly=True, strict=True), - }, - Tracker.GAUGES: { - Gauge.USERS: Quota(strict=True), - Gauge.APPLICATIONS: Quota(strict=True), - }, - }, Plan.CLOUD_V0_HUMANITY_LABS: { Tracker.FLAGS: { Flag.HOOKS: True, diff --git a/api/ee/src/core/subscriptions/types.py b/api/ee/src/core/subscriptions/types.py index 719133b654..1f55dbe386 100644 --- a/api/ee/src/core/subscriptions/types.py +++ b/api/ee/src/core/subscriptions/types.py @@ -11,7 +11,6 @@ class Plan(str, Enum): CLOUD_V0_HOBBY = "cloud_v0_hobby" CLOUD_V0_PRO = "cloud_v0_pro" - CLOUD_V0_BUSINESS = "cloud_v0_business" # CLOUD_V0_HUMANITY_LABS = "cloud_v0_humanity_labs" CLOUD_V0_X_LABS = "cloud_v0_x_labs" diff --git a/api/ee/src/crons/meters.sh b/api/ee/src/crons/meters.sh index c0f7d8c5ae..0550fdab98 100644 --- a/api/ee/src/crons/meters.sh +++ b/api/ee/src/crons/meters.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -eu AGENTA_AUTH_KEY=$(tr '\0' '\n' < /proc/1/environ | grep ^AGENTA_AUTH_KEY= | cut -d= -f2-) @@ -12,6 +11,6 @@ curl \ -w "\nHTTP_STATUS:%{http_code}\n" \ -X POST \ -H "Authorization: Access ${AGENTA_AUTH_KEY}" \ - "http://api:8000/admin/billing/usage/report" || echo "❌ CURL failed" + "http://api:8000/admin/billing/usage/report" || echo "❌ Curl failed" echo "[$(date)] meters.sh done" >> /proc/1/fd/1 \ No newline at end of file diff --git a/api/ee/src/crons/meters.txt b/api/ee/src/crons/meters.txt index f3acd78570..5574cf68d7 100644 --- a/api/ee/src/crons/meters.txt +++ b/api/ee/src/crons/meters.txt @@ -1,2 +1,2 @@ -* * * * * root echo "cron test $(date)" >> /proc/1/fd/1 2>&1 0 * * * * root sh /meters.sh >> /proc/1/fd/1 2>&1 +* * * * * root echo "cron test $(date)" >> /proc/1/fd/1 2>&1 diff --git a/api/ee/src/dbs/postgres/meters/dbas.py b/api/ee/src/dbs/postgres/meters/dbas.py index 450e517d28..e42a0443ac 100644 --- a/api/ee/src/dbs/postgres/meters/dbas.py +++ b/api/ee/src/dbs/postgres/meters/dbas.py @@ -8,8 +8,8 @@ class PeriodDBA: __abstract__ = True - year = Column(SmallInteger, nullable=False) - month = Column(SmallInteger, nullable=False) + year = Column(SmallInteger, nullable=True) + month = Column(SmallInteger, nullable=True) class MeterDBA( diff --git a/api/ee/tests/manual/evaluations/sdk/__init__.py b/api/ee/src/dbs/postgres/shared/__init__.py similarity index 100% rename from api/ee/tests/manual/evaluations/sdk/__init__.py rename to api/ee/src/dbs/postgres/shared/__init__.py diff --git a/api/ee/src/dbs/tps/aws/dao.py b/api/ee/src/dbs/tps/aws/dao.py new file mode 100644 index 0000000000..d1c610a37b --- /dev/null +++ b/api/ee/src/dbs/tps/aws/dao.py @@ -0,0 +1,28 @@ +from abc import ABC, abstractmethod +from typing import Optional, Union, Dict + + +class SystemSecretDAOInterface(ABC): + """ + Interface for interacting with a system secrets dao. + """ + + def __init__(self, **kwargs): + raise NotImplementedError + + @abstractmethod + def fetch_secret( + self, credentials: str, secret_key: Optional[str] = None + ) -> Optional[Union[Dict[str, str], str]]: + """ + Fetch a secret by its credentials. + + Args: + credentials (str): Required credentials to fetch the secret + secret_key (Optional[str]): Specific key to retrieve (in the case the secret comes as a dictionary) + + Returns: + Secret value or None if retrieval fails. + """ + + raise NotImplementedError diff --git a/api/ee/src/main.py b/api/ee/src/main.py index 036bda6f0f..7938a1b9dc 100644 --- a/api/ee/src/main.py +++ b/api/ee/src/main.py @@ -2,83 +2,70 @@ from oss.src.utils.logging import get_module_logger -from ee.src.routers import workspace_router, organization_router +from ee.src.routers import ( # type: ignore + admin_router, + workspace_router, + organization_router, + evaluation_router, + human_evaluation_router, +) -from ee.src.dbs.postgres.meters.dao import MetersDAO from ee.src.dbs.postgres.subscriptions.dao import SubscriptionsDAO - -from ee.src.core.meters.service import MetersService from ee.src.core.subscriptions.service import SubscriptionsService - from ee.src.apis.fastapi.billing.router import SubscriptionsRouter +from ee.src.dbs.postgres.meters.dao import MetersDAO +from ee.src.core.meters.service import MetersService -# DBS -------------------------------------------------------------------------- - -meters_dao = MetersDAO() - -subscriptions_dao = SubscriptionsDAO() - -# CORE ------------------------------------------------------------------------- - -meters_service = MetersService( - meters_dao=meters_dao, -) - -subscription_service = SubscriptionsService( - subscriptions_dao=subscriptions_dao, - meters_service=meters_service, -) - -# APIS ------------------------------------------------------------------------- - -subscriptions_router = SubscriptionsRouter( - subscription_service=subscription_service, -) - - -log = get_module_logger(__name__) +log = get_module_logger(__file__) def extend_main(app: FastAPI): - # ROUTES ------------------------------------------------------------------- + app.include_router(admin_router.router, prefix="/admin", tags=["Admin"]) + app.include_router(organization_router.router, prefix="/organizations") + app.include_router(workspace_router.router, prefix="/workspaces") + app.include_router( + evaluation_router.router, prefix="/evaluations", tags=["Evaluations"] + ) + app.include_router( + human_evaluation_router.router, + prefix="/human-evaluations", + tags=["Human-Evaluations"], + ) + + subscriptions_router = SubscriptionsRouter( + subscription_service=SubscriptionsService( + subscriptions_dao=SubscriptionsDAO(), + meters_service=MetersService( + meters_dao=MetersDAO(), + ), + ), + ) app.include_router( router=subscriptions_router.router, prefix="/billing", tags=["Billing"], ) - app.include_router( router=subscriptions_router.admin_router, prefix="/admin/billing", tags=["Admin", "Billing"], ) - # ROUTES (more) ------------------------------------------------------------ - - app.include_router( - organization_router.router, - prefix="/organizations", - ) - - app.include_router( - workspace_router.router, - prefix="/workspaces", - ) - - # -------------------------------------------------------------------------- - return app def extend_app_schema(app: FastAPI): - app.openapi()["info"]["title"] = "Agenta API" - app.openapi()["info"]["description"] = "Agenta API" + app.openapi()["info"]["title"] = "Agenta Backend" + app.openapi()["info"]["description"] = "Agenta Backend API" app.openapi()["info"]["contact"] = { "name": "Agenta", "url": "https://agenta.ai", "email": "team@agenta.ai", } + + APIKeyHeader = {"APIKeyHeader": []} # type: ignore + app.openapi()["components"]["securitySchemes"] = { "APIKeyHeader": { "type": "apiKey", @@ -86,15 +73,8 @@ def extend_app_schema(app: FastAPI): "in": "header", } } - app.openapi()["security"] = [ - { - "APIKeyHeader": [], - }, - ] - app.openapi()["servers"] = [ - { - "url": "https://cloud.agenta.ai/api", - }, - ] + + app.openapi()["security"] = [APIKeyHeader] + app.openapi()["servers"] = [{"url": "https://cloud.agenta.ai/api"}] return app diff --git a/api/ee/src/models/db_models.py b/api/ee/src/models/db_models.py index b05b633659..7e5d55382f 100644 --- a/api/ee/src/models/db_models.py +++ b/api/ee/src/models/db_models.py @@ -29,11 +29,6 @@ class OrganizationDB(OssOrganizationDB): organization_members = relationship( "OrganizationMemberDB", back_populates="organization" ) - project = relationship( - "ee.src.models.db_models.ProjectDB", - back_populates="organization", - overlaps="organization", - ) class WorkspaceDB(OssWorkspaceDB): @@ -103,8 +98,7 @@ class ProjectDB(OssProjectDB): overlaps="projects", ) organization = relationship( - "ee.src.models.db_models.OrganizationDB", - back_populates="project", + "ee.src.models.db_models.OrganizationDB", backref="project" ) project_members = relationship( "ProjectMemberDB", cascade="all, delete-orphan", back_populates="project" @@ -252,3 +246,264 @@ class ProjectMemberDB(Base): class DeploymentDB(OssDeploymentDB): pass + + +class HumanEvaluationVariantDB(Base): + __tablename__ = "human_evaluation_variants" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + human_evaluation_id = Column( + UUID(as_uuid=True), ForeignKey("human_evaluations.id", ondelete="CASCADE") + ) + variant_id = Column( + UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") + ) + variant_revision_id = Column( + UUID(as_uuid=True), ForeignKey("app_variant_revisions.id", ondelete="SET NULL") + ) + + variant = relationship("AppVariantDB", backref="evaluation_variant") + variant_revision = relationship( + "AppVariantRevisionsDB", backref="evaluation_variant_revision" + ) + + +class HumanEvaluationDB(Base): + __tablename__ = "human_evaluations" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + app_id = Column(UUID(as_uuid=True), ForeignKey("app_db.id", ondelete="CASCADE")) + project_id = Column( + UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") + ) + status = Column(String) + evaluation_type = Column(String) + testset_id = Column(UUID(as_uuid=True), ForeignKey("testsets.id")) + created_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + updated_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + + testset = relationship("TestSetDB") + evaluation_variant = relationship( + "HumanEvaluationVariantDB", + cascade=CASCADE_ALL_DELETE, + backref="human_evaluation", + ) + evaluation_scenario = relationship( + "HumanEvaluationScenarioDB", + cascade=CASCADE_ALL_DELETE, + backref="evaluation_scenario", + ) + + +class HumanEvaluationScenarioDB(Base): + __tablename__ = "human_evaluations_scenarios" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + project_id = Column( + UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") + ) + evaluation_id = Column( + UUID(as_uuid=True), ForeignKey("human_evaluations.id", ondelete="CASCADE") + ) + inputs = Column( + mutable_json_type(dbtype=JSONB, nested=True) + ) # List of HumanEvaluationScenarioInput + outputs = Column( + mutable_json_type(dbtype=JSONB, nested=True) + ) # List of HumanEvaluationScenarioOutput + vote = Column(String) + score = Column(String) + correct_answer = Column(String) + created_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + updated_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + is_pinned = Column(Boolean) + note = Column(String) + + +class EvaluationAggregatedResultDB(Base): + __tablename__ = "evaluation_aggregated_results" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + evaluation_id = Column( + UUID(as_uuid=True), ForeignKey("evaluations.id", ondelete="CASCADE") + ) + evaluator_config_id = Column( + UUID(as_uuid=True), ForeignKey("evaluators_configs.id", ondelete="SET NULL") + ) + result = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + + evaluator_config = relationship("EvaluatorConfigDB", backref="evaluator_config") + + +class EvaluationScenarioResultDB(Base): + __tablename__ = "evaluation_scenario_results" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + evaluation_scenario_id = Column( + UUID(as_uuid=True), ForeignKey("evaluation_scenarios.id", ondelete="CASCADE") + ) + evaluator_config_id = Column( + UUID(as_uuid=True), ForeignKey("evaluators_configs.id", ondelete="SET NULL") + ) + result = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + + +class EvaluationDB(Base): + __tablename__ = "evaluations" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + app_id = Column(UUID(as_uuid=True), ForeignKey("app_db.id", ondelete="CASCADE")) + project_id = Column( + UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") + ) + status = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + testset_id = Column( + UUID(as_uuid=True), ForeignKey("testsets.id", ondelete="SET NULL") + ) + variant_id = Column( + UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") + ) + variant_revision_id = Column( + UUID(as_uuid=True), ForeignKey("app_variant_revisions.id", ondelete="SET NULL") + ) + average_cost = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + total_cost = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + average_latency = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result + created_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + updated_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + + project = relationship("ee.src.models.db_models.ProjectDB") + testset = relationship("TestSetDB") + variant = relationship("AppVariantDB") + variant_revision = relationship("AppVariantRevisionsDB") + aggregated_results = relationship( + "EvaluationAggregatedResultDB", + cascade=CASCADE_ALL_DELETE, + backref="evaluation", + ) + evaluation_scenarios = relationship( + "EvaluationScenarioDB", cascade=CASCADE_ALL_DELETE, backref="evaluation" + ) + evaluator_configs = relationship( + "EvaluationEvaluatorConfigDB", + cascade=CASCADE_ALL_DELETE, + backref="evaluation", + ) + + +class EvaluationEvaluatorConfigDB(Base): + __tablename__ = "evaluation_evaluator_configs" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + evaluation_id = Column( + UUID(as_uuid=True), + ForeignKey("evaluations.id", ondelete="CASCADE"), + primary_key=True, + ) + evaluator_config_id = Column( + UUID(as_uuid=True), + ForeignKey("evaluators_configs.id", ondelete="SET NULL"), + primary_key=True, + ) + + +class EvaluationScenarioDB(Base): + __tablename__ = "evaluation_scenarios" + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + project_id = Column( + UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") + ) + evaluation_id = Column( + UUID(as_uuid=True), ForeignKey("evaluations.id", ondelete="CASCADE") + ) + variant_id = Column( + UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") + ) + inputs = Column( + mutable_json_type(dbtype=JSONB, nested=True) + ) # List of EvaluationScenarioInput + outputs = Column( + mutable_json_type(dbtype=JSONB, nested=True) + ) # List of EvaluationScenarioOutput + correct_answers = Column( + mutable_json_type(dbtype=JSONB, nested=True) + ) # List of CorrectAnswer + is_pinned = Column(Boolean) + note = Column(String) + latency = Column(Integer) + cost = Column(Integer) + created_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + updated_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + + project = relationship("ee.src.models.db_models.ProjectDB") + variant = relationship("AppVariantDB") + results = relationship( + "EvaluationScenarioResultDB", + cascade=CASCADE_ALL_DELETE, + backref="evaluation_scenario", + ) diff --git a/api/ee/src/models/extended/deprecated_models.py b/api/ee/src/models/extended/deprecated_models.py index c68a07e851..ac3b94c2ab 100644 --- a/api/ee/src/models/extended/deprecated_models.py +++ b/api/ee/src/models/extended/deprecated_models.py @@ -1,6 +1,7 @@ from datetime import datetime, timezone import uuid_utils.compat as uuid +from sqlalchemy_json import mutable_json_type from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.ext.declarative import declarative_base @@ -32,6 +33,30 @@ class DeprecatedAppDB(DeprecatedBase): ) +class DeprecatedEvaluatorConfigDB(DeprecatedBase): + __tablename__ = "evaluators_configs" + __table_args__ = {"extend_existing": True} + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + + app_id = Column(UUID(as_uuid=True), ForeignKey("app_db.id", ondelete="SET NULL")) + name = Column(String) + evaluator_key = Column(String) + settings_values = Column(mutable_json_type(dbtype=JSONB, nested=True), default=dict) + created_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + updated_at = Column( + DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) + ) + + class DeprecatedAPIKeyDB(DeprecatedBase): __tablename__ = "api_keys" diff --git a/api/ee/src/models/extended/deprecated_transfer_models.py b/api/ee/src/models/extended/deprecated_transfer_models.py index bf8a4a3038..3657dddacd 100644 --- a/api/ee/src/models/extended/deprecated_transfer_models.py +++ b/api/ee/src/models/extended/deprecated_transfer_models.py @@ -325,7 +325,7 @@ class HumanEvaluationScenarioDB(DeprecatedBase): ) -class TestsetDB(DeprecatedBase): +class TestSetDB(DeprecatedBase): __tablename__ = "testsets" __table_args__ = {"extend_existing": True} diff --git a/api/ee/src/models/shared_models.py b/api/ee/src/models/shared_models.py index 4f7ed234da..1698c02400 100644 --- a/api/ee/src/models/shared_models.py +++ b/api/ee/src/models/shared_models.py @@ -1,5 +1,6 @@ from enum import Enum from typing import List +from functools import lru_cache from pydantic import BaseModel, Field @@ -34,14 +35,14 @@ class Permission(str, Enum): READ_SYSTEM = "read_system" # App and variants - VIEW_APPLICATIONS = "view_applications" - EDIT_APPLICATIONS = "edit_application" - + VIEW_APPLICATION = "view_application" + EDIT_APPLICATION = "edit_application" + CREATE_APPLICATION = "create_application" + DELETE_APPLICATION = "delete_application" CREATE_APP_VARIANT = "create_app_variant" DELETE_APP_VARIANT = "delete_app_variant" - MODIFY_VARIANT_CONFIGURATIONS = "modify_variant_configurations" - EDIT_APPLICATIONS_VARIANT = "delete_application_variant" + DELETE_APPLICATION_VARIANT = "delete_application_variant" # Service RUN_SERVICE = "run_service" @@ -96,16 +97,11 @@ class Permission(str, Enum): # Workflows VIEW_WORKFLOWS = "view_workflows" EDIT_WORKFLOWS = "edit_workflows" - RUN_WORKFLOWS = "run_workflows" # Evaluators VIEW_EVALUATORS = "view_evaluators" EDIT_EVALUATORS = "edit_evaluators" - # Queries - VIEW_QUERIES = "view_queries" - EDIT_QUERIES = "edit_queries" - # Testsets VIEW_TESTSETS = "view_testsets" EDIT_TESTSETS = "edit_testsets" @@ -113,32 +109,14 @@ class Permission(str, Enum): # Annotations VIEW_ANNOTATIONS = "view_annotations" EDIT_ANNOTATIONS = "edit_annotations" - - # Invocations - VIEW_INVOCATIONS = "view_invocations" - EDIT_INVOCATIONS = "edit_invocations" - - # Evaluations - VIEW_EVALUATION_RUNS = "view_evaluation_runs" - EDIT_EVALUATION_RUNS = "edit_evaluation_runs" - - VIEW_EVALUATION_SCENARIOS = "view_evaluation_scenarios" - EDIT_EVALUATION_SCENARIOS = "edit_evaluation_scenarios" - - VIEW_EVALUATION_RESULTS = "view_evaluation_results" - EDIT_EVALUATION_RESULTS = "edit_evaluation_results" - - VIEW_EVALUATION_METRICS = "view_evaluation_metrics" - EDIT_EVALUATION_METRICS = "edit_evaluation_metrics" - - VIEW_EVALUATION_QUEUES = "view_evaluation_queues" - EDIT_EVALUATION_QUEUES = "edit_evaluation_queues" + DELETE_ANNOTATIONS = "delete_annotations" @classmethod + @lru_cache(maxsize=None) def default_permissions(cls, role): VIEWER_PERMISSIONS = [ cls.READ_SYSTEM, - cls.VIEW_APPLICATIONS, + cls.VIEW_APPLICATION, cls.VIEW_SECRET, cls.VIEW_APP_ENVIRONMENT_DEPLOYMENT, cls.VIEW_TESTSET, @@ -167,7 +145,7 @@ def default_permissions(cls, role): cls.EDIT_ORGANIZATION, cls.DELETE_EVALUATION, cls.MODIFY_USER_ROLES, - cls.EDIT_APPLICATIONS, + cls.DELETE_APPLICATION, cls.DELETE_ORGANIZATION, cls.ADD_USER_TO_WORKSPACE, cls.ADD_USER_TO_ORGANIZATION, diff --git a/api/ee/src/routers/admin_router.py b/api/ee/src/routers/admin_router.py new file mode 100644 index 0000000000..5189cdd227 --- /dev/null +++ b/api/ee/src/routers/admin_router.py @@ -0,0 +1,458 @@ +from typing import Optional, List, Dict +from uuid import UUID, uuid4 +from traceback import print_exc +import random, string + +from pydantic import BaseModel + +from fastapi.responses import JSONResponse + + +from oss.src.utils.common import APIRouter + +from ee.src.core.meters.service import MetersService +from ee.src.dbs.postgres.meters.dao import MetersDAO +from ee.src.core.subscriptions.types import SubscriptionDTO +from ee.src.dbs.postgres.subscriptions.dao import SubscriptionsDAO +from ee.src.core.subscriptions.service import SubscriptionsService + +from ee.src.core.subscriptions.types import Event, Plan +from ee.src.services.admin_manager import ( + Reference, + # + UserRequest, + # + OrganizationRequest, + WorkspaceRequest, + ProjectRequest, + # + OrganizationMembershipRequest, + WorkspaceMembershipRequest, + ProjectMembershipRequest, + # + OrganizationRole, + WorkspaceRole, + ProjectRole, + # + Tier, + Credentials, + # + check_user, + # + create_user, + # + create_organization, + create_workspace, + create_project, + # + create_organization_membership, + create_workspace_membership, + create_project_membership, + # + create_credentials, +) + +from oss.src.services.user_service import create_new_user +from ee.src.services.selectors import user_exists +from ee.src.services.commoners import add_user_to_demos +from oss.src.services.api_key_service import ( + create_api_key, +) +from ee.src.services.db_manager_ee import ( + fetch_project_memberships_by_user_id, + create_organization as legacy_create_organization, +) +from ee.src.models.api.organization_models import ( + CreateOrganization, +) + +router = APIRouter() + + +class EntitiesRequestModel(BaseModel): + users: Dict[str, UserRequest] + # + organizations: Dict[str, OrganizationRequest] + workspaces: Dict[str, WorkspaceRequest] + projects: Dict[str, ProjectRequest] + # + organization_memberships: Dict[str, OrganizationMembershipRequest] + workspace_memberships: Dict[str, WorkspaceMembershipRequest] + project_memberships: Dict[str, ProjectMembershipRequest] + + +class ProjectScope(BaseModel): + credentials: Credentials + role: ProjectRole + tier: Tier + # role: Union[OrganizationRole, WorkspaceRole, ProjectRole] + # + user: Reference + project: Reference + workspace: Reference + organization: Reference + + +class ScopesResponseModel(BaseModel): + projects: Dict[str, Dict[str, ProjectScope]] = {} + # workspaces: Dict[str, Dict[str, WorkspaceScope]] = {} + # organizations: Dict[str, Dict[str, OrganizationScope]] = {} + + +class ReferenceTracker(BaseModel): + users: Dict[str, UUID] = {} + # + organizations: Dict[str, UUID] = {} + workspaces: Dict[str, UUID] = {} + projects: Dict[str, UUID] = {} + # + organization_memberships: Dict[str, UUID] = {} + workspace_memberships: Dict[str, UUID] = {} + project_memberships: Dict[str, UUID] = {} + + +@router.post( + "/accounts", + operation_id="create_accounts", + response_model=ScopesResponseModel, +) +async def create_accounts( + entities: EntitiesRequestModel, +): + try: + references = ReferenceTracker() + scopes = ScopesResponseModel() + + # 1. MANAGE USERS + for slug, request in entities.users.items(): + # MAKE USER REFERENCE + reference = Reference(slug=slug) + # CHECK USER DUPLICATE + ref = await check_user(request=request) + # CREATE USER ENTITY + if not ref: + ref = await create_user(request=request) + # TRACK USER REFERENCE + references.users[reference.slug] = ref.id + + # 2.1. MANAGE ORGANIZATIONS + for slug, request in entities.organizations.items(): + # MAKE ORGANIZATION REFERENCE + reference = Reference(slug=slug) + # CREATE ORGANIZATION ENTITY + ref = await create_organization(request=request) + # TRACK ORGANIZATION REFERENCE + references.organizations[reference.slug] = ref.id + + # 2.2. MANAGE WORKSPACES + for slug, request in entities.workspaces.items(): + # MAKE WORKSPACE REFERENCE + reference = Reference(slug=slug) + # FIX ORGANIZATION REFERENCE + request.organization_ref = Reference( + slug=request.organization_ref.slug, + id=references.organizations[request.organization_ref.slug], + ) + # CREATE WORKSPACE ENTITY + ref = await create_workspace(request=request) + # TRACK WORKSPACE REFERENCE + references.workspaces[reference.slug] = ref.id + + # 2.3. MANAGE PROJECTS + for slug, request in entities.projects.items(): + # MAKE PROJECT REFERENCE + reference = Reference(slug=slug) + # FIX ORGANIZATION REFERENCE + request.organization_ref = Reference( + slug=request.organization_ref.slug, + id=references.organizations[request.organization_ref.slug], + ) + # FIX WORKSPACE REFERENCE + request.workspace_ref = Reference( + slug=request.workspace_ref.slug, + id=references.workspaces[request.workspace_ref.slug], + ) + # CREATE PROJECT ENTITY + ref = await create_project(request=request) + # TRACK PROJECT REFERENCE + references.projects[reference.slug] = ref.id + + # 3.1. MANAGE ORGANIZATION MEMBERSHIPS + for slug, request in entities.organization_memberships.items(): + # MAKE ORGANIZATION MEMBERSHIP REFERENCE + reference = Reference(slug=slug) + # FIX ORGANIZATION REFERENCE + request.organization_ref = Reference( + slug=request.organization_ref.slug, + id=references.organizations[request.organization_ref.slug], + ) + # FIX USER REFERENCE + request.user_ref = Reference( + slug=request.user_ref.slug, + id=references.users[request.user_ref.slug], + ) + # CREATE ORGANIZATION MEMBERSHIP ENTITY + ref = await create_organization_membership(request=request) + # TRACK ORGANIZATION MEMBERSHIP REFERENCE + references.organization_memberships[reference.slug] = ref.id + + # 3.2. MANAGE WORKSPACE MEMBERSHIPS + for slug, request in entities.workspace_memberships.items(): + # MAKE WORKSPACE MEMBERSHIP REFERENCE + reference = Reference(slug=slug) + # FIX WORKSPACE REFERENCE + request.workspace_ref = Reference( + slug=request.workspace_ref.slug, + id=references.workspaces[request.workspace_ref.slug], + ) + # FIX USER REFERENCE + request.user_ref = Reference( + slug=request.user_ref.slug, + id=references.users[request.user_ref.slug], + ) + # CREATE WORKSPACE MEMBERSHIP ENTITY + ref = await create_workspace_membership(request=request) + # TRACK WORKSPACE MEMBERSHIP REFERENCE + references.workspace_memberships[reference.slug] = ref.id + + # 3.3. MANAGE PROJECT MEMBERSHIPS + for slug, request in entities.project_memberships.items(): + # MAKE PROJECT MEMBERSHIP REFERENCE + reference = Reference(slug=slug) + # FIX PROJECT REFERENCE + request.project_ref = Reference( + slug=request.project_ref.slug, + id=references.projects[request.project_ref.slug], + ) + # FIX USER REFERENCE + request.user_ref = Reference( + slug=request.user_ref.slug, + id=references.users[request.user_ref.slug], + ) + # CREATE PROJECT MEMBERSHIP ENTITY + ref = await create_project_membership(request=request) + # TRACK PROJECT MEMBERSHIP REFERENCE + references.project_memberships[reference.slug] = ref.id + + # 4. MANAGE SCOPES + for reference, request in entities.project_memberships.items(): + # CREATE CREDENTIALS + credentials = await create_credentials( + user_id=references.users[request.user_ref.slug], + project_id=references.projects[request.project_ref.slug], + ) + # GET WORKSPACE AND ORGANIZATION + project = entities.projects[request.project_ref.slug] + workspace = entities.workspaces[project.workspace_ref.slug] + organization = entities.organizations[workspace.organization_ref.slug] + # CREATE PROJECT SCOPE + scope = ProjectScope( + credentials=credentials, + role=request.role, + tier="free" if organization.is_paying is False else "paying", + # + user=request.user_ref, + project=request.project_ref, + workspace=project.workspace_ref, + organization=workspace.organization_ref, + ) + # INITIALIZE PROJECT SCOPES + if request.user_ref.slug not in scopes.projects: + scopes.projects[request.user_ref.slug] = {} + if request.project_ref.slug not in scopes.projects[request.user_ref.slug]: + scopes.projects[request.user_ref.slug][request.project_ref.slug] = {} + # TRACK PROJECT SCOPE + scopes.projects[request.user_ref.slug][request.project_ref.slug] = scope + + return scopes + + except: # pylint: disable=bare-except + print_exc() + + return JSONResponse( + status_code=500, + content="Could not create accounts.", + ) + + +class LegacyUserRequest(BaseModel): + name: Optional[str] = None + email: Optional[str] = None + + +class LegacyScopeRequest(BaseModel): + name: Optional[str] = None + + +class LegacySubscriptionRequest(BaseModel): + plan: Optional[str] = None + + +class AccountRequest(BaseModel): + user: Optional[LegacyUserRequest] = None + scope: Optional[LegacyScopeRequest] = None + subscription: Optional[LegacySubscriptionRequest] = None + + +class LegacyUserResponse(BaseModel): + id: Optional[UUID] = None + + +class LegacyScopesResponse(BaseModel): + organization_id: Optional[UUID] = None + organization_name: Optional[str] = None + + workspace_id: Optional[UUID] = None + workspace_name: Optional[str] = None + + project_id: Optional[UUID] = None + project_name: Optional[str] = None + is_demo: Optional[bool] = None + + user_role: Optional[str] = None + + credentials: Optional[str] = None + + +class AccountResponse(BaseModel): + user: Optional[LegacyUserResponse] = None + scopes: Optional[List[LegacyScopesResponse]] = None + + +subscription_service = SubscriptionsService( + subscriptions_dao=SubscriptionsDAO(), + meters_service=MetersService( + meters_dao=MetersDAO(), + ), +) + + +@router.post( + "/account", + operation_id="create_account", + response_model=AccountResponse, +) +async def create_account( + account: Optional[AccountRequest] = None, +): + prefix = "".join(random.choices(string.ascii_letters + string.digits, k=8)) + + if not account: + account = AccountRequest() + + if not account.user: + account.user = LegacyUserRequest() + + if not account.user.name: + account.user.name = prefix + + if not account.user.email: + account.user.email = prefix + "@test.agenta.ai" + + if not account.scope: + account.scope = LegacyScopeRequest() + + if not account.scope.name: + account.scope.name = prefix + + if not account.subscription: + account.subscription = LegacySubscriptionRequest() + + if not account.subscription.plan: + account.subscription.plan = Plan.CLOUD_V0_HOBBY + + try: + user_db = None + + exists = await user_exists( + user_email=account.user.email, + ) + + if exists: + return JSONResponse( + status_code=409, + content="Already exists.", + ) + + user_db = await create_new_user( + payload={ + "uid": str(uuid4()), + "username": account.user.name, + "email": account.user.email, + } + ) + + user = LegacyUserResponse(id=str(user_db.id)) + + create_org_payload = CreateOrganization( + name=account.scope.name, + owner=str(user.id), + type="default", + ) + + organization_db = await legacy_create_organization( + create_org_payload, + user_db, + ) + + subscription = SubscriptionDTO( + organization_id=organization_db.id, + plan=account.subscription.plan, + active=True, + anchor=1, + ) + + subscription = await subscription_service.create( + subscription=subscription, + ) + + await add_user_to_demos( + str(user.id), + ) + + _project_memberships = await fetch_project_memberships_by_user_id( + user_id=str(user.id), + ) + + if not _project_memberships: + return JSONResponse( + status_code=404, + content={"message": "No scopes found."}, + ) + + scopes = [] + + for project_membership in _project_memberships: + credentials = await create_api_key( + user_id=str(user.id), + project_id=str(project_membership.project.id), + ) + + scope = LegacyScopesResponse( + organization_id=project_membership.project.organization.id, + organization_name=project_membership.project.organization.name, + workspace_id=project_membership.project.workspace.id, + workspace_name=project_membership.project.workspace.name, + project_id=project_membership.project.id, + project_name=project_membership.project.project_name, + is_demo=project_membership.is_demo, + user_role=project_membership.role, + credentials=f"ApiKey {credentials}", + ) + + scopes.append(scope) + + account = AccountResponse( + user=user, + scopes=scopes, + ) + + return account + + except: # pylint: disable=bare-except + print_exc() + + return JSONResponse( + status_code=404, + content="Could not create account.", + ) diff --git a/api/ee/src/routers/evaluation_router.py b/api/ee/src/routers/evaluation_router.py new file mode 100644 index 0000000000..52b6970c55 --- /dev/null +++ b/api/ee/src/routers/evaluation_router.py @@ -0,0 +1,486 @@ +import random +from typing import Any, List + +from fastapi.responses import JSONResponse +from fastapi import HTTPException, Request, status, Response, Query + +from oss.src.utils.logging import get_module_logger +from oss.src.utils.caching import get_cache, set_cache + +from oss.src.services import helpers +from ee.src.services import converters +from ee.src.services import evaluation_service + +from ee.src.tasks.evaluations import evaluate +from oss.src.utils.common import APIRouter, is_ee +from oss.src.models.api.evaluation_model import ( + Evaluation, + EvaluationScenario, + NewEvaluation, + DeleteEvaluation, +) +from ee.src.services import db_manager_ee +from oss.src.services import app_manager, db_manager + +if is_ee(): + from ee.src.models.shared_models import Permission + from ee.src.utils.permissions import check_action_access + from ee.src.utils.entitlements import ( + check_entitlements, + Tracker, + Counter, + NOT_ENTITLED_RESPONSE, + ) + +from oss.src.routers.testset_router import ( + _validate_testset_limits, +) + +router = APIRouter() + +log = get_module_logger(__name__) + + +@router.get( + "/by_resource/", + response_model=List[str], +) +async def fetch_evaluation_ids( + resource_type: str, + request: Request, + resource_ids: List[str] = Query(None), +): + """Fetches evaluation ids for a given resource type and id. + + Arguments: + app_id (str): The ID of the app for which to fetch evaluations. + resource_type (str): The type of resource for which to fetch evaluations. + resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. + + Raises: + HTTPException: If the resource_type is invalid or access is denied. + + Returns: + List[str]: A list of evaluation ids. + """ + + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + evaluations = await db_manager_ee.fetch_evaluations_by_resource( + resource_type, + request.state.project_id, + resource_ids, + ) + return list(map(lambda x: str(x.id), evaluations)) + + +@router.post("/", response_model=List[Evaluation], operation_id="create_evaluation") +async def create_evaluation( + payload: NewEvaluation, + request: Request, +): + """Creates a new comparison table document + Raises: + HTTPException: _description_ + Returns: + _description_ + """ + + try: + app = await db_manager.fetch_app_by_id(app_id=payload.app_id) + if app is None: + raise HTTPException(status_code=404, detail="App not found") + + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(app.project_id), + permission=Permission.CREATE_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + check, _, _ = await check_entitlements( + organization_id=request.state.organization_id, + key=Counter.EVALUATIONS, + delta=1, + ) + + if not check: + return NOT_ENTITLED_RESPONSE(Tracker.COUNTERS) + + testset = await db_manager.fetch_testset_by_id( + testset_id=payload.testset_id, + ) + + if testset is None: + raise HTTPException(status_code=404, detail="Testset not found") + + _validate_testset_limits(testset.csvdata) + + evaluations = [] + + for revision_id in payload.revisions_ids: + evaluation = await evaluation_service.create_new_evaluation( + app_id=payload.app_id, + project_id=str(app.project_id), + revision_id=revision_id, + testset_id=payload.testset_id, + ) + + evaluate.delay( + app_id=payload.app_id, + user_id=str(request.state.user_id), + project_id=str(request.state.project_id), + revision_id=revision_id, + evaluators_config_ids=payload.evaluators_configs, + testset_id=payload.testset_id, + evaluation_id=evaluation.id, + rate_limit_config=payload.rate_limit.model_dump(), + ) + evaluations.append(evaluation) + + # Update last_modified_by app information + await app_manager.update_last_modified_by( + user_uid=request.state.user_id, + object_id=payload.app_id, + object_type="app", + project_id=str(app.project_id), + ) + + return evaluations + except KeyError: + raise HTTPException( + status_code=400, + detail="columns in the test set should match the names of the inputs in the variant", + ) + + +@router.get("/{evaluation_id}/status/", operation_id="fetch_evaluation_status") +async def fetch_evaluation_status( + evaluation_id: str, + request: Request, +): + """Fetches the status of the evaluation. + + Args: + evaluation_id (str): the evaluation id + request (Request): the request object + + Returns: + (str): the evaluation status + """ + + cache_key = { + "evaluation_id": evaluation_id, + } + + evaluation_status = await get_cache( + project_id=request.state.project_id, + user_id=request.state.user_id, + namespace="fetch_evaluation_status", + key=cache_key, + ) + + if evaluation_status is not None: + return {"status": evaluation_status} + + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + evaluation_status = await db_manager_ee.fetch_evaluation_status_by_id( + project_id=request.state.project_id, + evaluation_id=evaluation_id, + ) + + await set_cache( + project_id=request.state.project_id, + user_id=request.state.user_id, + namespace="fetch_evaluation_status", + key=cache_key, + value=evaluation_status, + ttl=0.05, # seconds + ) + + return {"status": evaluation_status} + + +@router.get("/{evaluation_id}/results/", operation_id="fetch_evaluation_results") +async def fetch_evaluation_results( + evaluation_id: str, + request: Request, +): + """Fetches the results of the evaluation + + Args: + evaluation_id (str): the evaluation id + request (Request): the request object + + Returns: + _type_: _description_ + """ + + evaluation = await db_manager_ee.fetch_evaluation_by_id( + project_id=request.state.project_id, + evaluation_id=evaluation_id, + ) + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(evaluation.project_id), + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + results = converters.aggregated_result_of_evaluation_to_pydantic( + evaluation.aggregated_results # type: ignore + ) + return {"results": results, "evaluation_id": evaluation_id} + + +@router.get( + "/{evaluation_id}/evaluation_scenarios/", + response_model=List[EvaluationScenario], + operation_id="fetch_evaluation_scenarios", +) +async def fetch_evaluation_scenarios( + evaluation_id: str, + request: Request, +): + """Fetches evaluation scenarios for a given evaluation ID. + + Arguments: + evaluation_id (str): The ID of the evaluation for which to fetch scenarios. + + Raises: + HTTPException: If the evaluation is not found or access is denied. + + Returns: + List[EvaluationScenario]: A list of evaluation scenarios. + """ + + evaluation = await db_manager_ee.fetch_evaluation_by_id( + project_id=request.state.project_id, + evaluation_id=evaluation_id, + ) + if not evaluation: + raise HTTPException( + status_code=404, detail=f"Evaluation with id {evaluation_id} not found" + ) + + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(evaluation.project_id), + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + eval_scenarios = await evaluation_service.fetch_evaluation_scenarios_for_evaluation( + evaluation_id=str(evaluation.id), project_id=str(evaluation.project_id) + ) + return eval_scenarios + + +@router.get("/", response_model=List[Evaluation]) +async def fetch_list_evaluations( + app_id: str, + request: Request, +): + """Fetches a list of evaluations, optionally filtered by an app ID. + + Args: + app_id (Optional[str]): An optional app ID to filter the evaluations. + + Returns: + List[Evaluation]: A list of evaluations. + """ + + app = await db_manager.fetch_app_by_id(app_id) + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(app.project_id), + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + return await evaluation_service.fetch_list_evaluations(app, str(app.project_id)) + + +@router.get( + "/{evaluation_id}/", response_model=Evaluation, operation_id="fetch_evaluation" +) +async def fetch_evaluation( + evaluation_id: str, + request: Request, +): + """Fetches a single evaluation based on its ID. + + Args: + evaluation_id (str): The ID of the evaluation to fetch. + + Returns: + Evaluation: The fetched evaluation. + """ + + evaluation = await db_manager_ee.fetch_evaluation_by_id( + project_id=request.state.project_id, + evaluation_id=evaluation_id, + ) + if not evaluation: + raise HTTPException( + status_code=404, detail=f"Evaluation with id {evaluation_id} not found" + ) + + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(evaluation.project_id), + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + return await converters.evaluation_db_to_pydantic(evaluation) + + +@router.delete("/", response_model=List[str], operation_id="delete_evaluations") +async def delete_evaluations( + payload: DeleteEvaluation, + request: Request, +): + """ + Delete specific comparison tables based on their unique IDs. + + Args: + delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. + + Returns: + A list of the deleted comparison tables' IDs. + """ + + evaluation = await db_manager_ee.fetch_evaluation_by_id( + project_id=request.state.project_id, + evaluation_id=payload.evaluations_ids[0], + ) + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(evaluation.project_id), + permission=Permission.DELETE_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + # Update last_modified_by app information + await app_manager.update_last_modified_by( + user_uid=request.state.user_id, + object_id=random.choice(payload.evaluations_ids), + object_type="evaluation", + project_id=str(evaluation.project_id), + ) + + await evaluation_service.delete_evaluations(payload.evaluations_ids) + return Response(status_code=status.HTTP_204_NO_CONTENT) + + +@router.get( + "/evaluation_scenarios/comparison-results/", + response_model=Any, +) +async def fetch_evaluation_scenarios( + evaluations_ids: str, + request: Request, +): + """Fetches evaluation scenarios for a given evaluation ID. + + Arguments: + evaluation_id (str): The ID of the evaluation for which to fetch scenarios. + + Raises: + HTTPException: If the evaluation is not found or access is denied. + + Returns: + List[EvaluationScenario]: A list of evaluation scenarios. + """ + + evaluations_ids_list = evaluations_ids.split(",") + evaluation = await db_manager_ee.fetch_evaluation_by_id( + project_id=request.state.project_id, + evaluation_id=evaluations_ids_list[0], + ) + if is_ee(): + has_permission = await check_action_access( + user_uid=request.state.user_id, + project_id=str(evaluation.project_id), + permission=Permission.VIEW_EVALUATION, + ) + if not has_permission: + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." + log.error(error_msg) + return JSONResponse( + {"detail": error_msg}, + status_code=403, + ) + + eval_scenarios = await evaluation_service.compare_evaluations_scenarios( + evaluations_ids_list, str(evaluation.project_id) + ) + + return eval_scenarios diff --git a/api/oss/src/routers/human_evaluation_router.py b/api/ee/src/routers/human_evaluation_router.py similarity index 91% rename from api/oss/src/routers/human_evaluation_router.py rename to api/ee/src/routers/human_evaluation_router.py index 681f7588bf..3b2904062c 100644 --- a/api/oss/src/routers/human_evaluation_router.py +++ b/api/ee/src/routers/human_evaluation_router.py @@ -2,10 +2,11 @@ from fastapi import HTTPException, Body, Request, status, Response from oss.src.utils.logging import get_module_logger -from oss.src.services import converters +from ee.src.services import converters from oss.src.services import db_manager -from oss.src.services import results_service -from oss.src.services import evaluation_service +from ee.src.services import db_manager_ee +from ee.src.services import results_service +from ee.src.services import evaluation_service from oss.src.utils.common import APIRouter, is_ee from oss.src.models.api.evaluation_model import ( DeleteEvaluation, @@ -18,7 +19,7 @@ NewHumanEvaluation, SimpleEvaluationOutput, ) -from oss.src.services.evaluation_service import ( +from ee.src.services.evaluation_service import ( update_human_evaluation_scenario, update_human_evaluation_service, ) @@ -78,7 +79,7 @@ async def create_human_evaluation( except KeyError: raise HTTPException( status_code=400, - detail="columns in the testset should match the names of the inputs in the variant", + detail="columns in the test set should match the names of the inputs in the variant", ) @@ -129,7 +130,7 @@ async def fetch_human_evaluation( HumanEvaluation: The fetched evaluation. """ - human_evaluation = await db_manager.fetch_human_evaluation_by_id(evaluation_id) + human_evaluation = await db_manager_ee.fetch_human_evaluation_by_id(evaluation_id) if not human_evaluation: raise HTTPException(status_code=404, detail="Evaluation not found") @@ -170,7 +171,7 @@ async def fetch_human_evaluation_scenarios( List[EvaluationScenario]: A list of evaluation scenarios. """ - human_evaluation = await db_manager.fetch_human_evaluation_by_id(evaluation_id) + human_evaluation = await db_manager_ee.fetch_human_evaluation_by_id(evaluation_id) if human_evaluation is None: raise HTTPException( status_code=404, @@ -208,14 +209,16 @@ async def update_human_evaluation( """Updates an evaluation's status. Raises: - HTTPException: If the columns in the testset do not match with the inputs in the variant. + HTTPException: If the columns in the test set do not match with the inputs in the variant. Returns: None: A 204 No Content status code, indicating that the update was successful. """ try: - human_evaluation = await db_manager.fetch_human_evaluation_by_id(evaluation_id) + human_evaluation = await db_manager_ee.fetch_human_evaluation_by_id( + evaluation_id + ) if not human_evaluation: raise HTTPException(status_code=404, detail="Evaluation not found") @@ -238,7 +241,7 @@ async def update_human_evaluation( except KeyError: raise HTTPException( status_code=400, - detail="columns in the testset should match the names of the inputs in the variant", + detail="columns in the test set should match the names of the inputs in the variant", ) @@ -261,7 +264,7 @@ async def update_evaluation_scenario_router( None: 204 No Content status code upon successful update. """ - evaluation_scenario_db = await db_manager.fetch_human_evaluation_scenario_by_id( + evaluation_scenario_db = await db_manager_ee.fetch_human_evaluation_scenario_by_id( evaluation_scenario_id ) if evaluation_scenario_db is None: @@ -306,7 +309,7 @@ async def get_evaluation_scenario_score_router( Dictionary containing the scenario ID and its score. """ - evaluation_scenario = db_manager.fetch_evaluation_scenario_by_id( + evaluation_scenario = db_manager_ee.fetch_evaluation_scenario_by_id( evaluation_scenario_id ) if evaluation_scenario is None: @@ -349,7 +352,7 @@ async def update_evaluation_scenario_score_router( None: 204 No Content status code upon successful update. """ - evaluation_scenario = await db_manager.fetch_evaluation_scenario_by_id( + evaluation_scenario = await db_manager_ee.fetch_evaluation_scenario_by_id( evaluation_scenario_id ) if evaluation_scenario is None: @@ -392,7 +395,7 @@ async def fetch_results( _description_ """ - evaluation = await db_manager.fetch_human_evaluation_by_id(evaluation_id) + evaluation = await db_manager_ee.fetch_human_evaluation_by_id(evaluation_id) if evaluation is None: raise HTTPException( status_code=404, @@ -437,7 +440,7 @@ async def delete_evaluations( A list of the deleted comparison tables' IDs. """ - evaluation = await db_manager.fetch_human_evaluation_by_id( + evaluation = await db_manager_ee.fetch_human_evaluation_by_id( payload.evaluations_ids[0] ) if is_ee(): diff --git a/api/ee/src/routers/organization_router.py b/api/ee/src/routers/organization_router.py index 739894b7b8..ac509cd4a0 100644 --- a/api/ee/src/routers/organization_router.py +++ b/api/ee/src/routers/organization_router.py @@ -36,6 +36,7 @@ log = get_module_logger(__name__) + @router.get("/own/", response_model=OrganizationOutput, operation_id="get_own_org") async def get_user_organization( request: Request, @@ -53,9 +54,9 @@ async def get_user_organization( raise HTTPException(status_code=500, detail=str(e)) -@router.get("/{organization_id}/", operation_id="fetch_ee_organization_details") +@router.get("/{org_id}/", operation_id="fetch_ee_organization_details") async def fetch_organization_details( - organization_id: str, + org_id: str, request: Request, ): """Get an organization's details. @@ -70,7 +71,7 @@ async def fetch_organization_details( try: workspace_id = await db_manager_ee.get_default_workspace_id_from_organization( - organization_id=organization_id + organization_id=org_id ) project_id = await db_manager.get_default_project_id_from_workspace( @@ -96,16 +97,14 @@ async def fetch_organization_details( user_org_workspace_data = await get_user_org_and_workspace_id( request.state.user_id ) - has_permission = await check_user_org_access( - user_org_workspace_data, organization_id - ) + has_permission = await check_user_org_access(user_org_workspace_data, org_id) if not has_permission: return JSONResponse( status_code=403, content={"detail": "You do not have access to this organization"}, ) - organization = await get_organization_details(organization_id) + organization = await get_organization_details(org_id) if membership.role == "viewer" or membership.is_demo: if "default_workspace" in organization: @@ -123,9 +122,9 @@ async def fetch_organization_details( ) -@router.put("/{organization_id}/", operation_id="update_organization") +@router.put("/{org_id}/", operation_id="update_organization") async def update_organization( - organization_id: str, + org_id: str, payload: OrganizationUpdate, request: Request, ): @@ -140,7 +139,7 @@ async def update_organization( request.state.user_id ) has_permission = await check_user_org_access( - user_org_workspace_data, organization_id, check_owner=True + user_org_workspace_data, org_id, check_owner=True ) if not has_permission: return JSONResponse( @@ -148,7 +147,7 @@ async def update_organization( status_code=403, ) - organization = await update_an_organization(organization_id, payload) + organization = await update_an_organization(org_id, payload) return organization @@ -160,12 +159,12 @@ async def update_organization( @router.post( - "/{organization_id}/workspaces/", + "/{org_id}/workspaces/", operation_id="create_workspace", response_model=WorkspaceResponse, ) async def create_workspace( - organization_id: str, + org_id: str, payload: CreateWorkspace, request: Request, ) -> WorkspaceResponse: @@ -174,7 +173,7 @@ async def create_workspace( request.state.user_id ) has_permission = await check_user_org_access( - user_org_workspace_data, organization_id, check_owner=True + user_org_workspace_data, org_id, check_owner=True ) if not has_permission: return JSONResponse( @@ -188,7 +187,7 @@ async def create_workspace( status_code=400, ) workspace = await workspace_manager.create_new_workspace( - payload, organization_id, user_org_workspace_data["uid"] + payload, org_id, user_org_workspace_data["uid"] ) return workspace @@ -200,12 +199,12 @@ async def create_workspace( @router.put( - "/{organization_id}/workspaces/{workspace_id}/", + "/{org_id}/workspaces/{workspace_id}/", operation_id="update_workspace", response_model=WorkspaceResponse, ) async def update_workspace( - organization_id: str, + org_id: str, workspace_id: str, payload: UpdateWorkspace, request: Request, diff --git a/api/ee/src/routers/workspace_router.py b/api/ee/src/routers/workspace_router.py index db14403946..40e0e17885 100644 --- a/api/ee/src/routers/workspace_router.py +++ b/api/ee/src/routers/workspace_router.py @@ -110,7 +110,7 @@ async def assign_role_to_user( @router.delete("/{workspace_id}/roles/", operation_id="unassign_role_from_user") async def unassign_role_from_user( email: str, - organization_id: str, + org_id: str, role: str, workspace_id: str, request: Request, @@ -121,7 +121,7 @@ async def unassign_role_from_user( Args: workspace_id (str): The ID of the workspace. email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. role (str): The role to remove from the user. request (Request): The FastAPI request object. @@ -153,7 +153,7 @@ async def unassign_role_from_user( payload = UserRole( email=email, - organization_id=organization_id, + organization_id=org_id, role=role, ) diff --git a/api/ee/src/services/admin_manager.py b/api/ee/src/services/admin_manager.py index 57af9d8ef6..94a6a9d15b 100644 --- a/api/ee/src/services/admin_manager.py +++ b/api/ee/src/services/admin_manager.py @@ -1,5 +1,6 @@ -from typing import Optional, Literal, Any +from typing import Any from uuid import UUID +from typing import Optional, Literal from pydantic import BaseModel import uuid_utils.compat as uuid @@ -7,12 +8,7 @@ from oss.src.utils.logging import get_module_logger from oss.src.utils.common import is_ee - -from oss.src.dbs.postgres.shared.engine import engine - -from oss.src.models.db_models import UserDB -from oss.src.services.api_key_service import create_api_key - +from oss.src.models.db.postgres_engine import db_engine from ee.src.models.db_models import ( WorkspaceDB, ProjectDB, @@ -21,6 +17,12 @@ WorkspaceMemberDB as WorkspaceMembershipDB, OrganizationMemberDB as OrganizationMembershipDB, ) +from oss.src.models.db_models import ( + UserDB, +) +from oss.src.services.api_key_service import ( + create_api_key, +) log = get_module_logger(__name__) @@ -139,7 +141,7 @@ class ProjectMembershipRequest(BaseModel): async def check_user( request: UserRequest, ) -> Optional[UserRequest]: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(UserDB).filter_by( email=request.email, @@ -156,7 +158,7 @@ async def check_user( async def create_user( request: UserRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: user_db = UserDB( # id=uuid7() # use default # @@ -182,7 +184,7 @@ async def create_user( async def create_organization( request: OrganizationRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: organization_db = OrganizationDB( # id=uuid7() # use default # @@ -213,7 +215,7 @@ async def create_organization( async def create_workspace( request: WorkspaceRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: workspace_db = WorkspaceDB( # id=uuid7() # use default # @@ -242,7 +244,7 @@ async def create_workspace( async def create_project( request: ProjectRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: project_db = ProjectDB( # id=uuid7() # use default # @@ -273,7 +275,7 @@ async def create_project( async def create_organization_membership( request: OrganizationMembershipRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: membership_db = OrganizationMembershipDB( # id=uuid7() # use default # @@ -316,7 +318,7 @@ async def create_organization_membership( async def create_workspace_membership( request: WorkspaceMembershipRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: workspace = await session.execute( select(WorkspaceDB).filter_by( id=request.workspace_ref.id, @@ -354,7 +356,7 @@ async def create_workspace_membership( async def create_project_membership( request: ProjectMembershipRequest, ) -> Reference: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: project = await session.execute( select(ProjectDB).filter_by( id=request.project_ref.id, diff --git a/api/ee/src/services/commoners.py b/api/ee/src/services/commoners.py index 961857b942..a060c27ee4 100644 --- a/api/ee/src/services/commoners.py +++ b/api/ee/src/services/commoners.py @@ -123,17 +123,17 @@ async def create_accounts(payload: dict): user = await db_manager.get_user_with_email(email=user_dict["email"]) if user is None: - log.info("[scopes] Yey! A new user is signing up!") + log.info("Yey! A new user is signing up!") # Create user first user = await create_new_user(user_dict) - log.info("[scopes] User [%s] created", user.id) + log.info("User [%s] created", user.id) # Prepare payload to create organization create_org_payload = CreateOrganization( name=user_dict["username"], - description="Default Organization", + description="My Default Organization", owner=str(user.id), type="default", ) @@ -144,7 +144,7 @@ async def create_accounts(payload: dict): user=user, ) - log.info("[scopes] Organization [%s] created", organization.id) + log.info("Organization [%s] created", organization.id) # Add the user to demos await add_user_to_demos(str(user.id)) @@ -169,7 +169,7 @@ async def create_accounts(payload: dict): delta=1, ) - log.info("[scopes] User [%s] authenticated", user.id) + log.info("User [%s] authenticated", user.id) if is_ee(): try: diff --git a/api/ee/src/services/converters.py b/api/ee/src/services/converters.py index 2bfc1d330b..5b120899fc 100644 --- a/api/ee/src/services/converters.py +++ b/api/ee/src/services/converters.py @@ -3,9 +3,28 @@ from datetime import datetime, timezone from oss.src.services import db_manager +from oss.src.models.api.evaluation_model import ( + CorrectAnswer, + Evaluation, + HumanEvaluation, + EvaluationScenario, + SimpleEvaluationOutput, + EvaluationScenarioInput, + HumanEvaluationScenario, + EvaluationScenarioOutput, +) from ee.src.services import db_manager_ee -from ee.src.models.api.workspace_models import WorkspaceRole, WorkspaceResponse +from ee.src.models.api.workspace_models import ( + WorkspaceRole, + WorkspaceResponse, +) from ee.src.models.shared_models import Permission +from ee.src.models.db_models import ( + EvaluationDB, + HumanEvaluationDB, + EvaluationScenarioDB, + HumanEvaluationScenarioDB, +) from oss.src.models.db_models import WorkspaceDB @@ -130,3 +149,173 @@ def get_all_workspace_permissions_by_role(role_name: str) -> Dict[str, List[Any] getattr(WorkspaceRole, role_name.upper()) ) return workspace_permissions + + +async def human_evaluation_db_to_simple_evaluation_output( + human_evaluation_db: HumanEvaluationDB, +) -> SimpleEvaluationOutput: + evaluation_variants = await db_manager_ee.fetch_human_evaluation_variants( + human_evaluation_id=str(human_evaluation_db.id) + ) + return SimpleEvaluationOutput( + id=str(human_evaluation_db.id), + app_id=str(human_evaluation_db.app_id), + project_id=str(human_evaluation_db.project_id), + status=human_evaluation_db.status, # type: ignore + evaluation_type=human_evaluation_db.evaluation_type, # type: ignore + variant_ids=[ + str(evaluation_variant.variant_id) + for evaluation_variant in evaluation_variants + ], + ) + + +async def evaluation_db_to_pydantic( + evaluation_db: EvaluationDB, +) -> Evaluation: + variant_name = ( + evaluation_db.variant.variant_name + if evaluation_db.variant.variant_name + else str(evaluation_db.variant_id) + ) + aggregated_results = aggregated_result_of_evaluation_to_pydantic( + evaluation_db.aggregated_results + ) + + return Evaluation( + id=str(evaluation_db.id), + app_id=str(evaluation_db.app_id), + project_id=str(evaluation_db.project_id), + status=evaluation_db.status, + variant_ids=[str(evaluation_db.variant_id)], + variant_revision_ids=[str(evaluation_db.variant_revision_id)], + revisions=[str(evaluation_db.variant_revision.revision)], + variant_names=[variant_name], + testset_id=str(evaluation_db.testset_id), + testset_name=evaluation_db.testset.name, + aggregated_results=aggregated_results, + created_at=str(evaluation_db.created_at), + updated_at=str(evaluation_db.updated_at), + average_cost=evaluation_db.average_cost, + total_cost=evaluation_db.total_cost, + average_latency=evaluation_db.average_latency, + ) + + +async def human_evaluation_db_to_pydantic( + evaluation_db: HumanEvaluationDB, +) -> HumanEvaluation: + evaluation_variants = await db_manager_ee.fetch_human_evaluation_variants( + human_evaluation_id=str(evaluation_db.id) # type: ignore + ) + + revisions = [] + variants_ids = [] + variants_names = [] + variants_revision_ids = [] + for evaluation_variant in evaluation_variants: + variant_name = ( + evaluation_variant.variant.variant_name + if isinstance(evaluation_variant.variant_id, uuid.UUID) + else str(evaluation_variant.variant_id) + ) + variants_names.append(str(variant_name)) + variants_ids.append(str(evaluation_variant.variant_id)) + variant_revision = ( + str(evaluation_variant.variant_revision.revision) + if isinstance(evaluation_variant.variant_revision_id, uuid.UUID) + else " None" + ) + revisions.append(variant_revision) + variants_revision_ids.append(str(evaluation_variant.variant_revision_id)) + + return HumanEvaluation( + id=str(evaluation_db.id), + app_id=str(evaluation_db.app_id), + project_id=str(evaluation_db.project_id), + status=evaluation_db.status, # type: ignore + evaluation_type=evaluation_db.evaluation_type, # type: ignore + variant_ids=variants_ids, + variant_names=variants_names, + testset_id=str(evaluation_db.testset_id), + testset_name=evaluation_db.testset.name, + variants_revision_ids=variants_revision_ids, + revisions=revisions, + created_at=str(evaluation_db.created_at), # type: ignore + updated_at=str(evaluation_db.updated_at), # type: ignore + ) + + +def human_evaluation_scenario_db_to_pydantic( + evaluation_scenario_db: HumanEvaluationScenarioDB, evaluation_id: str +) -> HumanEvaluationScenario: + return HumanEvaluationScenario( + id=str(evaluation_scenario_db.id), + evaluation_id=evaluation_id, + inputs=evaluation_scenario_db.inputs, # type: ignore + outputs=evaluation_scenario_db.outputs, # type: ignore + vote=evaluation_scenario_db.vote, # type: ignore + score=evaluation_scenario_db.score, # type: ignore + correct_answer=evaluation_scenario_db.correct_answer, # type: ignore + is_pinned=evaluation_scenario_db.is_pinned or False, # type: ignore + note=evaluation_scenario_db.note or "", # type: ignore + ) + + +def aggregated_result_of_evaluation_to_pydantic( + evaluation_aggregated_results: List, +) -> List[dict]: + transformed_results = [] + for aggregated_result in evaluation_aggregated_results: + evaluator_config_dict = ( + { + "id": str(aggregated_result.evaluator_config.id), + "name": aggregated_result.evaluator_config.name, + "evaluator_key": aggregated_result.evaluator_config.evaluator_key, + "settings_values": aggregated_result.evaluator_config.settings_values, + "created_at": str(aggregated_result.evaluator_config.created_at), + "updated_at": str(aggregated_result.evaluator_config.updated_at), + } + if isinstance(aggregated_result.evaluator_config_id, uuid.UUID) + else None + ) + transformed_results.append( + { + "evaluator_config": ( + {} if evaluator_config_dict is None else evaluator_config_dict + ), + "result": aggregated_result.result, + } + ) + return transformed_results + + +async def evaluation_scenario_db_to_pydantic( + evaluation_scenario_db: EvaluationScenarioDB, evaluation_id: str +) -> EvaluationScenario: + scenario_results = [ + { + "evaluator_config": str(scenario_result.evaluator_config_id), + "result": scenario_result.result, + } + for scenario_result in evaluation_scenario_db.results + ] + return EvaluationScenario( + id=str(evaluation_scenario_db.id), + evaluation_id=evaluation_id, + inputs=[ + EvaluationScenarioInput(**scenario_input) # type: ignore + for scenario_input in evaluation_scenario_db.inputs + ], + outputs=[ + EvaluationScenarioOutput(**scenario_output) # type: ignore + for scenario_output in evaluation_scenario_db.outputs + ], + correct_answers=[ + CorrectAnswer(**correct_answer) # type: ignore + for correct_answer in evaluation_scenario_db.correct_answers + ], + is_pinned=evaluation_scenario_db.is_pinned or False, # type: ignore + note=evaluation_scenario_db.note or "", # type: ignore + results=scenario_results, # type: ignore + ) diff --git a/api/ee/src/services/db_manager.py b/api/ee/src/services/db_manager.py index 0d8e36c384..edae60d2af 100644 --- a/api/ee/src/services/db_manager.py +++ b/api/ee/src/services/db_manager.py @@ -1,7 +1,7 @@ import uuid -from oss.src.dbs.postgres.shared.engine import engine -from ee.src.models.db_models import DeploymentDB +from oss.src.models.db.postgres_engine import db_engine +from ee.src.models.db_models import DeploymentDB_ as DeploymentDB async def create_deployment( @@ -18,7 +18,7 @@ async def create_deployment( DeploymentDB: The created deployment. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: try: deployment = DeploymentDB( app_id=uuid.UUID(app_id), diff --git a/api/ee/src/services/db_manager_ee.py b/api/ee/src/services/db_manager_ee.py index bc174918b6..b5f4db2ffc 100644 --- a/api/ee/src/services/db_manager_ee.py +++ b/api/ee/src/services/db_manager_ee.py @@ -1,18 +1,20 @@ import uuid -from typing import List, Union, NoReturn, Optional, Tuple +from typing import List, Dict, Union, Any, NoReturn, Optional, Tuple import sendgrid from fastapi import HTTPException +from sendgrid.helpers.mail import Mail +from sqlalchemy import func from sqlalchemy.future import select from sqlalchemy.ext.asyncio import AsyncSession -from sqlalchemy.orm import joinedload, load_only +from sqlalchemy.orm import joinedload, load_only, aliased from sqlalchemy.exc import NoResultFound, MultipleResultsFound from oss.src.utils.logging import get_module_logger from oss.src.utils.common import is_ee - from oss.src.dbs.postgres.shared.engine import engine +from oss.src.models.db.postgres_engine import db_engine from oss.src.services import db_manager, evaluator_manager from ee.src.models.api.workspace_models import ( UserRole, @@ -29,14 +31,36 @@ from ee.src.models.db_models import ( ProjectDB, WorkspaceDB, + EvaluationDB, OrganizationDB, ProjectMemberDB, WorkspaceMemberDB, + HumanEvaluationDB, OrganizationMemberDB, + EvaluationScenarioDB, + HumanEvaluationScenarioDB, + HumanEvaluationVariantDB, + EvaluationScenarioResultDB, + EvaluationEvaluatorConfigDB, + EvaluationAggregatedResultDB, ) from oss.src.models.db_models import ( + AppVariantDB, UserDB, + AppDB, + TestSetDB, InvitationDB, + EvaluatorConfigDB, + AppVariantRevisionsDB, +) +from oss.src.models.shared_models import ( + Result, + CorrectAnswer, + AggregatedResult, + EvaluationScenarioResult, + EvaluationScenarioInput, + EvaluationScenarioOutput, + HumanEvaluationScenarioInput, ) from ee.src.services.converters import get_workspace_in_format from ee.src.services.selectors import get_org_default_workspace @@ -61,7 +85,7 @@ async def get_organization(organization_id: str) -> OrganizationDB: OrganizationDB: The fetched organization. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(OrganizationDB).filter_by(id=uuid.UUID(organization_id)) ) @@ -80,10 +104,8 @@ async def get_organizations_by_list_ids(organization_ids: List) -> List[Organiza List: A list of dictionaries representing the retrieved organizations. """ - async with engine.core_session() as session: - organization_uuids = [ - uuid.UUID(organization_id) for organization_id in organization_ids - ] + async with db_engine.get_core_session() as session: + organization_uuids = [uuid.UUID(org_id) for org_id in organization_ids] query = select(OrganizationDB).where(OrganizationDB.id.in_(organization_uuids)) result = await session.execute(query) organizations = result.scalars().all() @@ -101,7 +123,7 @@ async def get_default_workspace_id(user_id: str) -> str: str: The default workspace ID. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(WorkspaceMemberDB) .filter_by(user_id=uuid.UUID(user_id), role=WorkspaceRole.OWNER) @@ -119,7 +141,7 @@ async def get_organization_workspaces(organization_id: str): organization_id (str): The ID of the organization """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(WorkspaceDB) .filter_by(organization_id=uuid.UUID(organization_id)) @@ -203,7 +225,7 @@ async def create_default_project( """ project_db = await create_project( - "Default Project", + "Default", workspace_id=workspace_id, organization_id=organization_id, session=session, @@ -224,7 +246,7 @@ async def get_default_workspace_id_from_organization( str: The default (first) workspace ID. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: workspace_query = await session.execute( select(WorkspaceDB) .where( @@ -251,7 +273,7 @@ async def get_project_by_workspace(workspace_id: str) -> ProjectDB: """ assert workspace_id is not None, "Workspace ID is required to retrieve project" - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: project_query = await session.execute( select(ProjectDB).where( ProjectDB.workspace_id == uuid.UUID(workspace_id), @@ -306,7 +328,7 @@ async def create_project_member( async def fetch_project_memberships_by_user_id( user_id: str, ) -> List[ProjectMemberDB]: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(ProjectMemberDB) .filter_by(user_id=uuid.UUID(user_id)) @@ -325,7 +347,6 @@ async def create_workspace_db_object( payload: CreateWorkspace, organization: OrganizationDB, user: UserDB, - return_wrk_prj: bool = False, ) -> WorkspaceDB: """Create a new workspace. @@ -398,10 +419,6 @@ async def create_workspace_db_object( await evaluator_manager.create_ready_to_use_evaluators( project_id=str(project_db.id) ) - - if return_wrk_prj: - return workspace, project_db - return workspace @@ -424,7 +441,7 @@ async def create_workspace( user = await db_manager.get_user(user_uid) organization = await get_organization(organization_id) - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: user_result = await session.execute(select(UserDB).filter_by(uid=user_uid)) user = user_result.scalars().first() @@ -454,14 +471,14 @@ async def update_workspace( payload (UpdateWorkspace): The data to update the workspace with. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute(select(WorkspaceDB).filter_by(id=workspace.id)) workspace = result.scalars().first() if not workspace: raise NoResultFound(f"Workspace with id {str(workspace.id)} not found") - for key, value in payload.dict(exclude_unset=True).items(): + for key, value in payload.dict(exclude_unset=True): if hasattr(workspace, key): setattr(workspace, key, value) @@ -483,7 +500,7 @@ async def check_user_in_workspace_with_email(email: str, workspace_id: str) -> b Exception: If there is an error checking if the user belongs to the workspace. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(WorkspaceMemberDB) .join(UserDB, UserDB.id == WorkspaceMemberDB.user_id) @@ -521,7 +538,7 @@ async def update_user_roles( workspace_id=workspace_id ) - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: # Ensure that an admin can not remove the owner of the workspace/project project_owner_result = await session.execute( select(ProjectMemberDB) @@ -581,7 +598,7 @@ async def add_user_to_workspace_and_org( project_id: str, role: str, ) -> bool: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: # create joined organization for user user_organization = OrganizationMemberDB( user_id=user.id, organization_id=organization.id @@ -644,7 +661,7 @@ async def remove_user_from_workspace( ) project = await db_manager.get_project_by_id(project_id=project_id) - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: if ( not user ): # User is an invited user who has not yet created an account and therefore does not have a user object @@ -756,13 +773,8 @@ async def remove_user_from_workspace( async def create_organization( payload: CreateOrganization, user: UserDB, - return_org_wrk: Optional[bool] = False, - return_org_wrk_prj: Optional[bool] = False, -) -> Union[ - OrganizationDB, - Tuple[OrganizationDB, WorkspaceDB], - Tuple[OrganizationDB, WorkspaceDB, ProjectDB], -]: + return_org_workspace: bool = False, +) -> Union[OrganizationDB, Tuple[OrganizationDB, WorkspaceDB]]: """Create a new organization. Args: @@ -770,13 +782,13 @@ async def create_organization( Returns: Organization: The created organization. - Optional[Workspace]: The created workspace if return_org_wrk is True. + Optional[Workspace]: The created workspace if return_org_workspace is True. Raises: Exception: If there is an error creating the organization. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: create_org_data = payload.model_dump(exclude_unset=True) if "owner" not in create_org_data: create_org_data["owner"] = str(user.id) @@ -812,29 +824,19 @@ async def create_organization( name=payload.name, type=payload.type if payload.type else "", description=( - "Default Workspace" + "My Default Workspace" if payload.type == "default" - else payload.description - if payload.description - else "" + else payload.description if payload.description else "" ), ) # create workspace - workspace, project = await create_workspace_db_object( - session, - workspace_payload, - organization_db, - user, - return_wrk_prj=True, + workspace = await create_workspace_db_object( + session, workspace_payload, organization_db, user ) - if return_org_wrk_prj: - return organization_db, workspace, project - - if return_org_wrk: - return organization_db, workspace - + if return_org_workspace: + return (organization_db, workspace) return organization_db @@ -855,7 +857,7 @@ async def update_organization( Exception: If there is an error updating the organization. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(OrganizationDB).filter_by(id=uuid.UUID(organization_id)) ) @@ -864,11 +866,11 @@ async def update_organization( if not organization: raise NoResultFound(f"Organization with id {organization_id} not found") - for key, value in payload.model_dump(exclude_unset=True).items(): + for key, value in payload.model_dump(exclude_unset=True): if hasattr(organization, key): setattr(organization, key, value) - await session.commit() + await session.commit(organization) await session.refresh(organization) return organization @@ -884,7 +886,7 @@ async def delete_invitation(invitation_id: str) -> bool: bool: True if the invitation was successfully deleted, False otherwise. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(InvitationDB).filter_by(id=uuid.UUID(invitation_id)) ) @@ -945,7 +947,7 @@ async def mark_invitation_as_used( HTTPException: If there is an error marking the invitation as used. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(InvitationDB).filter_by( project_id=uuid.UUID(project_id), token=invitation.token @@ -1024,7 +1026,7 @@ async def get_organization_invitations(organization_id: str): organization_id (str): The ID of the organization """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(InvitationDB).filter_by(organization_id=organization_id) ) @@ -1040,14 +1042,14 @@ async def get_project_invitations(project_id: str, **kwargs): project_id (str): The ID of the project """ - async with engine.core_session() as session: - stmt = select(InvitationDB).filter( + async with db_engine.get_core_session() as session: + query = select(InvitationDB).filter( InvitationDB.project_id == uuid.UUID(project_id) ) if kwargs.get("has_pending", False): - stmt = stmt.filter(InvitationDB.used == kwargs["invitation_used"]) + query = query.filter(InvitationDB.used == kwargs["invitation_used"]) - result = await session.execute(stmt) + result = await session.execute(query) invitations = result.scalars().all() return invitations @@ -1060,7 +1062,7 @@ async def get_all_pending_invitations(email: str): email (str): The email address of the user. """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(InvitationDB).filter( InvitationDB.email == email, @@ -1085,7 +1087,7 @@ async def get_project_invitation( InvitationDB: invitation object """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(InvitationDB).filter_by( project_id=uuid.UUID(project_id), token=token, email=email @@ -1102,7 +1104,7 @@ async def get_project_members(project_id: str): project_id (str): The ID of the project """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: members_query = await session.execute( select(ProjectMemberDB) .filter(ProjectMemberDB.project_id == uuid.UUID(project_id)) @@ -1146,7 +1148,7 @@ async def create_org_workspace_invitation( if not project: raise Exception(f"No project found with ID {project_id}") - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: invitation = InvitationDB( token=token, email=email, @@ -1183,12 +1185,91 @@ async def get_all_workspace_roles() -> List[WorkspaceRole]: return workspace_roles +# async def get_project_id_from_db_entity( +# object_id: str, type: str, project_id: str +# ) -> dict: +# """ +# Get the project id of the object. + +# Args: +# object_id (str): The ID of the object. +# type (str): The type of the object. + +# Returns: +# dict: The project_id of the object. + +# Raises: +# ValueError: If the object type is unknown. +# Exception: If there is an error retrieving the project_id. +# """ +# try: +# if type == "app": +# app = await db_manager.fetch_app_by_id(object_id) +# project_id = app.project_id + +# elif type == "app_variant": +# app_variant = await db_manager.fetch_app_variant_by_id(object_id) +# project_id = app_variant.project_id + +# elif type == "base": +# base = await db_manager.fetch_base_by_id(object_id) +# project_id = base.project_id + +# elif type == "deployment": +# deployment = await db_manager.get_deployment_by_id(object_id) +# project_id = deployment.project_id + +# elif type == "testset": +# testset = await db_manager.fetch_testset_by_id(object_id) +# project_id = testset.project_id + +# elif type == "evaluation": +# evaluation = await db_manager.fetch_evaluation_by_id(object_id) +# project_id = evaluation.project_id + +# elif type == "evaluation_scenario": +# evaluation_scenario = await db_manager.fetch_evaluation_scenario_by_id( +# object_id +# ) +# project_id = evaluation_scenario.project_id + +# elif type == "evaluator_config": +# evaluator_config = await db_manager.fetch_evaluator_config(object_id) +# project_id = evaluator_config.project_id + +# elif type == "human_evaluation": +# human_evaluation = await db_manager.fetch_human_evaluation_by_id(object_id) +# project_id = human_evaluation.project_id + +# elif type == "human_evaluation_scenario": +# human_evaluation_scenario = ( +# await db_manager.fetch_human_evaluation_scenario_by_id(object_id) +# ) +# project_id = human_evaluation_scenario.project_id + +# elif type == "human_evaluation_scenario_by_evaluation_id": +# human_evaluation_scenario_by_evaluation = ( +# await db_manager.fetch_human_evaluation_scenario_by_evaluation_id( +# object_id +# ) +# ) +# project_id = human_evaluation_scenario_by_evaluation.project_id + +# else: +# raise ValueError(f"Unknown object type: {type}") + +# return str(project_id) + +# except Exception as e: +# raise e + + async def add_user_to_organization( organization_id: str, user_id: str, # is_demo: bool = False, ) -> None: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: organization_member = OrganizationMemberDB( user_id=user_id, organization_id=organization_id, @@ -1212,7 +1293,7 @@ async def add_user_to_workspace( role: str, # is_demo: bool = False, ) -> None: - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: # fetch workspace by workspace_id (SQL) stmt = select(WorkspaceDB).filter_by(id=workspace_id) workspace = await session.execute(stmt) @@ -1254,7 +1335,7 @@ async def add_user_to_project( if not project: raise Exception(f"No project found with ID {project_id}") - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: project_member = ProjectMemberDB( user_id=user_id, project_id=project_id, @@ -1274,3 +1355,755 @@ async def add_user_to_project( ) await session.commit() + + +async def fetch_evaluation_status_by_id( + project_id: str, + evaluation_id: str, +) -> Optional[str]: + """Fetch only the status of an evaluation by its ID.""" + assert evaluation_id is not None, "evaluation_id cannot be None" + + async with engine.core_session() as session: + query = ( + select(EvaluationDB) + .filter_by(project_id=project_id, id=uuid.UUID(evaluation_id)) + .options(load_only(EvaluationDB.status)) + ) + + result = await session.execute(query) + evaluation = result.scalars().first() + return evaluation.status if evaluation else None + + +async def fetch_evaluation_by_id( + project_id: str, + evaluation_id: str, +) -> Optional[EvaluationDB]: + """Fetches a evaluation by its ID. + + Args: + evaluation_id (str): The ID of the evaluation to fetch. + + Returns: + EvaluationDB: The fetched evaluation, or None if no evaluation was found. + """ + + assert evaluation_id is not None, "evaluation_id cannot be None" + async with engine.core_session() as session: + base_query = select(EvaluationDB).filter_by( + project_id=project_id, + id=uuid.UUID(evaluation_id), + ) + query = base_query.options( + joinedload(EvaluationDB.testset.of_type(TestSetDB)).load_only(TestSetDB.id, TestSetDB.name), # type: ignore + ) + + result = await session.execute( + query.options( + joinedload(EvaluationDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore + joinedload(EvaluationDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.revision), # type: ignore + joinedload( + EvaluationDB.aggregated_results.of_type( + EvaluationAggregatedResultDB + ) + ).joinedload(EvaluationAggregatedResultDB.evaluator_config), + ) + ) + evaluation = result.unique().scalars().first() + return evaluation + + +async def list_human_evaluations(app_id: str, project_id: str): + """ + Fetches human evaluations belonging to an App. + + Args: + app_id (str): The application identifier + """ + + async with engine.core_session() as session: + base_query = ( + select(HumanEvaluationDB) + .filter_by(app_id=uuid.UUID(app_id), project_id=uuid.UUID(project_id)) + .filter(HumanEvaluationDB.testset_id.isnot(None)) + ) + query = base_query.options( + joinedload(HumanEvaluationDB.testset.of_type(TestSetDB)).load_only(TestSetDB.id, TestSetDB.name), # type: ignore + ) + + result = await session.execute(query) + human_evaluations = result.scalars().all() + return human_evaluations + + +async def create_human_evaluation( + app: AppDB, + status: str, + evaluation_type: str, + testset_id: str, + variants_ids: List[str], +): + """ + Creates a human evaluation. + + Args: + app (AppDB: The app object + status (str): The status of the evaluation + evaluation_type (str): The evaluation type + testset_id (str): The ID of the evaluation testset + variants_ids (List[str]): The IDs of the variants for the evaluation + """ + + async with engine.core_session() as session: + human_evaluation = HumanEvaluationDB( + app_id=app.id, + project_id=app.project_id, + status=status, + evaluation_type=evaluation_type, + testset_id=testset_id, + ) + + session.add(human_evaluation) + await session.commit() + await session.refresh(human_evaluation, attribute_names=["testset"]) + + # create variants for human evaluation + await create_human_evaluation_variants( + human_evaluation_id=str(human_evaluation.id), + variants_ids=variants_ids, + ) + return human_evaluation + + +async def fetch_human_evaluation_variants(human_evaluation_id: str): + """ + Fetches human evaluation variants. + + Args: + human_evaluation_id (str): The human evaluation ID + + Returns: + The human evaluation variants. + """ + + async with engine.core_session() as session: + base_query = select(HumanEvaluationVariantDB).filter_by( + human_evaluation_id=uuid.UUID(human_evaluation_id) + ) + query = base_query.options( + joinedload(HumanEvaluationVariantDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore + joinedload(HumanEvaluationVariantDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.id, AppVariantRevisionsDB.revision), # type: ignore + ) + + result = await session.execute(query) + evaluation_variants = result.scalars().all() + return evaluation_variants + + +async def create_human_evaluation_variants( + human_evaluation_id: str, variants_ids: List[str] +): + """ + Creates human evaluation variants. + + Args: + human_evaluation_id (str): The human evaluation identifier + variants_ids (List[str]): The variants identifiers + project_id (str): The project ID + """ + + variants_dict = {} + for variant_id in variants_ids: + variant = await db_manager.fetch_app_variant_by_id(app_variant_id=variant_id) + if variant: + variants_dict[variant_id] = variant + + variants_revisions_dict = {} + for variant_id, variant in variants_dict.items(): + variant_revision = await db_manager.fetch_app_variant_revision_by_variant( + app_variant_id=str(variant.id), project_id=str(variant.project_id), revision=variant.revision # type: ignore + ) + if variant_revision: + variants_revisions_dict[variant_id] = variant_revision + + if set(variants_dict.keys()) != set(variants_revisions_dict.keys()): + raise ValueError("Mismatch between variants and their revisions") + + async with engine.core_session() as session: + for variant_id in variants_ids: + variant = variants_dict[variant_id] + variant_revision = variants_revisions_dict[variant_id] + human_evaluation_variant = HumanEvaluationVariantDB( + human_evaluation_id=uuid.UUID(human_evaluation_id), + variant_id=variant.id, # type: ignore + variant_revision_id=variant_revision.id, # type: ignore + ) + session.add(human_evaluation_variant) + + await session.commit() + + +async def fetch_human_evaluation_by_id( + evaluation_id: str, +) -> Optional[HumanEvaluationDB]: + """ + Fetches a evaluation by its ID. + + Args: + evaluation_id (str): The ID of the evaluation to fetch. + + Returns: + EvaluationDB: The fetched evaluation, or None if no evaluation was found. + """ + + assert evaluation_id is not None, "evaluation_id cannot be None" + async with engine.core_session() as session: + base_query = select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) + query = base_query.options( + joinedload(HumanEvaluationDB.testset.of_type(TestSetDB)).load_only(TestSetDB.id, TestSetDB.name), # type: ignore + ) + result = await session.execute(query) + evaluation = result.scalars().first() + return evaluation + + +async def update_human_evaluation(evaluation_id: str, values_to_update: dict): + """Updates human evaluation with the specified values. + + Args: + evaluation_id (str): The evaluation ID + values_to_update (dict): The values to update + + Exceptions: + NoResultFound: if human evaluation is not found + """ + + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) + ) + human_evaluation = result.scalars().first() + if not human_evaluation: + raise NoResultFound(f"Human evaluation with id {evaluation_id} not found") + + for key, value in values_to_update.items(): + if hasattr(human_evaluation, key): + setattr(human_evaluation, key, value) + + await session.commit() + await session.refresh(human_evaluation) + + +async def delete_human_evaluation(evaluation_id: str): + """Delete the evaluation by its ID. + + Args: + evaluation_id (str): The ID of the evaluation to delete. + """ + + assert evaluation_id is not None, "evaluation_id cannot be None" + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) + ) + evaluation = result.scalars().first() + if not evaluation: + raise NoResultFound(f"Human evaluation with id {evaluation_id} not found") + + await session.delete(evaluation) + await session.commit() + + +async def create_human_evaluation_scenario( + inputs: List[HumanEvaluationScenarioInput], + project_id: str, + evaluation_id: str, + evaluation_extend: Dict[str, Any], +): + """ + Creates a human evaluation scenario. + + Args: + inputs (List[HumanEvaluationScenarioInput]): The inputs. + evaluation_id (str): The evaluation identifier. + evaluation_extend (Dict[str, any]): An extended required payload for the evaluation scenario. Contains score, vote, and correct_answer. + """ + + async with engine.core_session() as session: + evaluation_scenario = HumanEvaluationScenarioDB( + **evaluation_extend, + project_id=uuid.UUID(project_id), + evaluation_id=uuid.UUID(evaluation_id), + inputs=[input.model_dump() for input in inputs], + outputs=[], + ) + + session.add(evaluation_scenario) + await session.commit() + + +async def update_human_evaluation_scenario( + evaluation_scenario_id: str, values_to_update: dict +): + """Updates human evaluation scenario with the specified values. + + Args: + evaluation_scenario_id (str): The evaluation scenario ID + values_to_update (dict): The values to update + + Exceptions: + NoResultFound: if human evaluation scenario is not found + """ + + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationScenarioDB).filter_by( + id=uuid.UUID(evaluation_scenario_id) + ) + ) + human_evaluation_scenario = result.scalars().first() + if not human_evaluation_scenario: + raise NoResultFound( + f"Human evaluation scenario with id {evaluation_scenario_id} not found" + ) + + for key, value in values_to_update.items(): + if hasattr(human_evaluation_scenario, key): + setattr(human_evaluation_scenario, key, value) + + await session.commit() + await session.refresh(human_evaluation_scenario) + + +async def fetch_human_evaluation_scenarios(evaluation_id: str): + """ + Fetches human evaluation scenarios. + + Args: + evaluation_id (str): The evaluation identifier + + Returns: + The evaluation scenarios. + """ + + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationScenarioDB).filter_by( + evaluation_id=uuid.UUID(evaluation_id) + ) + ) + evaluation_scenarios = result.scalars().all() + return evaluation_scenarios + + +async def fetch_evaluation_scenarios(evaluation_id: str, project_id: str): + """ + Fetches evaluation scenarios. + + Args: + evaluation_id (str): The evaluation identifier + project_id (str): The ID of the project + + Returns: + The evaluation scenarios. + """ + + async with engine.core_session() as session: + result = await session.execute( + select(EvaluationScenarioDB) + .filter_by( + evaluation_id=uuid.UUID(evaluation_id), project_id=uuid.UUID(project_id) + ) + .options(joinedload(EvaluationScenarioDB.results)) + ) + evaluation_scenarios = result.unique().scalars().all() + return evaluation_scenarios + + +async def fetch_evaluation_scenario_by_id( + evaluation_scenario_id: str, +) -> Optional[EvaluationScenarioDB]: + """Fetches and evaluation scenario by its ID. + + Args: + evaluation_scenario_id (str): The ID of the evaluation scenario to fetch. + + Returns: + EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. + """ + + assert evaluation_scenario_id is not None, "evaluation_scenario_id cannot be None" + async with engine.core_session() as session: + result = await session.execute( + select(EvaluationScenarioDB).filter_by(id=uuid.UUID(evaluation_scenario_id)) + ) + evaluation_scenario = result.scalars().first() + return evaluation_scenario + + +async def fetch_human_evaluation_scenario_by_id( + evaluation_scenario_id: str, +) -> Optional[HumanEvaluationScenarioDB]: + """Fetches and evaluation scenario by its ID. + + Args: + evaluation_scenario_id (str): The ID of the evaluation scenario to fetch. + + Returns: + EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. + """ + + assert evaluation_scenario_id is not None, "evaluation_scenario_id cannot be None" + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationScenarioDB).filter_by( + id=uuid.UUID(evaluation_scenario_id) + ) + ) + evaluation_scenario = result.scalars().first() + return evaluation_scenario + + +async def fetch_human_evaluation_scenario_by_evaluation_id( + evaluation_id: str, +) -> Optional[HumanEvaluationScenarioDB]: + """Fetches and evaluation scenario by its ID. + Args: + evaluation_id (str): The ID of the evaluation object to use in fetching the human evaluation. + Returns: + EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. + """ + + evaluation = await fetch_human_evaluation_by_id(evaluation_id) + async with engine.core_session() as session: + result = await session.execute( + select(HumanEvaluationScenarioDB).filter_by( + evaluation_id=evaluation.id # type: ignore + ) + ) + human_eval_scenario = result.scalars().first() + return human_eval_scenario + + +async def create_new_evaluation( + app: AppDB, + project_id: str, + testset: TestSetDB, + status: Result, + variant: str, + variant_revision: str, +) -> EvaluationDB: + """Create a new evaluation scenario. + Returns: + EvaluationScenarioDB: The created evaluation scenario. + """ + + async with engine.core_session() as session: + evaluation = EvaluationDB( + app_id=app.id, + project_id=uuid.UUID(project_id), + testset_id=testset.id, + status=status.model_dump(), + variant_id=uuid.UUID(variant), + variant_revision_id=uuid.UUID(variant_revision), + ) + + session.add(evaluation) + await session.commit() + await session.refresh( + evaluation, + attribute_names=[ + "testset", + "variant", + "variant_revision", + "aggregated_results", + ], + ) + + return evaluation + + +async def list_evaluations(app_id: str, project_id: str): + """Retrieves evaluations of the specified app from the db. + + Args: + app_id (str): The ID of the app + project_id (str): The ID of the project + """ + + async with engine.core_session() as session: + base_query = select(EvaluationDB).filter_by( + app_id=uuid.UUID(app_id), project_id=uuid.UUID(project_id) + ) + query = base_query.options( + joinedload(EvaluationDB.testset.of_type(TestSetDB)).load_only(TestSetDB.id, TestSetDB.name), # type: ignore + ) + + result = await session.execute( + query.options( + joinedload(EvaluationDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore + joinedload(EvaluationDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.revision), # type: ignore + joinedload( + EvaluationDB.aggregated_results.of_type( + EvaluationAggregatedResultDB + ) + ).joinedload(EvaluationAggregatedResultDB.evaluator_config), + ) + ) + evaluations = result.unique().scalars().all() + return evaluations + + +async def fetch_evaluations_by_resource( + resource_type: str, project_id: str, resource_ids: List[str] +): + """ + Fetches an evaluations by resource. + + Args: + resource_type (str): The resource type + project_id (str): The ID of the project + resource_ids (List[str]): The resource identifiers + + Returns: + The evaluations by resource. + + Raises: + HTTPException:400 resource_type {type} is not supported + """ + + ids = list(map(uuid.UUID, resource_ids)) + + async with engine.core_session() as session: + if resource_type == "variant": + result_evaluations = await session.execute( + select(EvaluationDB) + .filter( + EvaluationDB.variant_id.in_(ids), + EvaluationDB.project_id == uuid.UUID(project_id), + ) + .options(load_only(EvaluationDB.id)) # type: ignore + ) + result_human_evaluations = await session.execute( + select(HumanEvaluationDB) + .join(HumanEvaluationVariantDB) + .filter( + HumanEvaluationVariantDB.variant_id.in_(ids), + HumanEvaluationDB.project_id == uuid.UUID(project_id), + ) + .options(load_only(HumanEvaluationDB.id)) # type: ignore + ) + res_evaluations = result_evaluations.scalars().all() + res_human_evaluations = result_human_evaluations.scalars().all() + return res_evaluations + res_human_evaluations + + elif resource_type == "testset": + result_evaluations = await session.execute( + select(EvaluationDB) + .filter( + EvaluationDB.testset_id.in_(ids), + EvaluationDB.project_id == uuid.UUID(project_id), + ) + .options(load_only(EvaluationDB.id)) # type: ignore + ) + result_human_evaluations = await session.execute( + select(HumanEvaluationDB) + .filter( + HumanEvaluationDB.testset_id.in_(ids), + HumanEvaluationDB.project_id + == uuid.UUID(project_id), # Fixed to match HumanEvaluationDB + ) + .options(load_only(HumanEvaluationDB.id)) # type: ignore + ) + res_evaluations = result_evaluations.scalars().all() + res_human_evaluations = result_human_evaluations.scalars().all() + return res_evaluations + res_human_evaluations + + elif resource_type == "evaluator_config": + query = ( + select(EvaluationDB) + .join(EvaluationDB.evaluator_configs) + .filter( + EvaluationEvaluatorConfigDB.evaluator_config_id.in_(ids), + EvaluationDB.project_id == uuid.UUID(project_id), + ) + ) + result = await session.execute(query) + res = result.scalars().all() + return res + + raise HTTPException( + status_code=400, + detail=f"resource_type {resource_type} is not supported", + ) + + +async def delete_evaluations(evaluation_ids: List[str]) -> None: + """Delete evaluations based on the ids provided from the db. + + Args: + evaluations_ids (list[str]): The IDs of the evaluation + """ + + async with engine.core_session() as session: + query = select(EvaluationDB).where(EvaluationDB.id.in_(evaluation_ids)) + result = await session.execute(query) + evaluations = result.scalars().all() + for evaluation in evaluations: + await session.delete(evaluation) + await session.commit() + + +async def create_new_evaluation_scenario( + project_id: str, + evaluation_id: str, + variant_id: str, + inputs: List[EvaluationScenarioInput], + outputs: List[EvaluationScenarioOutput], + correct_answers: Optional[List[CorrectAnswer]], + is_pinned: Optional[bool], + note: Optional[str], + results: List[EvaluationScenarioResult], +) -> EvaluationScenarioDB: + """Create a new evaluation scenario. + + Returns: + EvaluationScenarioDB: The created evaluation scenario. + """ + + async with engine.core_session() as session: + evaluation_scenario = EvaluationScenarioDB( + project_id=uuid.UUID(project_id), + evaluation_id=uuid.UUID(evaluation_id), + variant_id=uuid.UUID(variant_id), + inputs=[input.model_dump() for input in inputs], + outputs=[output.model_dump() for output in outputs], + correct_answers=( + [correct_answer.model_dump() for correct_answer in correct_answers] + if correct_answers is not None + else [] + ), + is_pinned=is_pinned, + note=note, + ) + + session.add(evaluation_scenario) + await session.commit() + await session.refresh(evaluation_scenario) + + # create evaluation scenario result + for result in results: + evaluation_scenario_result = EvaluationScenarioResultDB( + evaluation_scenario_id=evaluation_scenario.id, + evaluator_config_id=uuid.UUID(result.evaluator_config), + result=result.result.model_dump(), + ) + + session.add(evaluation_scenario_result) + + await session.commit() # ensures that scenario results insertion is committed + await session.refresh(evaluation_scenario) + + return evaluation_scenario + + +async def update_evaluation_with_aggregated_results( + evaluation_id: str, aggregated_results: List[AggregatedResult] +): + async with engine.core_session() as session: + for result in aggregated_results: + aggregated_result = EvaluationAggregatedResultDB( + evaluation_id=uuid.UUID(evaluation_id), + evaluator_config_id=uuid.UUID(result.evaluator_config), + result=result.result.model_dump(), + ) + session.add(aggregated_result) + + await session.commit() + + +async def fetch_eval_aggregated_results(evaluation_id: str): + """ + Fetches an evaluation aggregated results by evaluation identifier. + + Args: + evaluation_id (str): The evaluation identifier + + Returns: + The evaluation aggregated results by evaluation identifier. + """ + + async with engine.core_session() as session: + base_query = select(EvaluationAggregatedResultDB).filter_by( + evaluation_id=uuid.UUID(evaluation_id) + ) + query = base_query.options( + joinedload( + EvaluationAggregatedResultDB.evaluator_config.of_type(EvaluatorConfigDB) + ).load_only( + EvaluatorConfigDB.id, # type: ignore + EvaluatorConfigDB.name, # type: ignore + EvaluatorConfigDB.evaluator_key, # type: ignore + EvaluatorConfigDB.settings_values, # type: ignore + EvaluatorConfigDB.created_at, # type: ignore + EvaluatorConfigDB.updated_at, # type: ignore + ) + ) + + result = await session.execute(query) + aggregated_results = result.scalars().all() + return aggregated_results + + +async def update_evaluation( + evaluation_id: str, project_id: str, updates: Dict[str, Any] +) -> EvaluationDB: + """ + Update an evaluator configuration in the database with the provided id. + + Arguments: + evaluation_id (str): The ID of the evaluator configuration to be updated. + project_id (str): The ID of the project. + updates (Dict[str, Any]): The updates to apply to the evaluator configuration. + + Returns: + EvaluatorConfigDB: The updated evaluator configuration object. + """ + + async with engine.core_session() as session: + result = await session.execute( + select(EvaluationDB).filter_by( + id=uuid.UUID(evaluation_id), project_id=uuid.UUID(project_id) + ) + ) + evaluation = result.scalars().first() + for key, value in updates.items(): + if hasattr(evaluation, key): + setattr(evaluation, key, value) + + await session.commit() + await session.refresh(evaluation) + + return evaluation + + +async def check_if_evaluation_contains_failed_evaluation_scenarios( + evaluation_id: str, +) -> bool: + async with engine.core_session() as session: + EvaluationResultAlias = aliased(EvaluationScenarioResultDB) + query = ( + select(func.count(EvaluationScenarioDB.id)) + .join(EvaluationResultAlias, EvaluationScenarioDB.results) + .where( + EvaluationScenarioDB.evaluation_id == uuid.UUID(evaluation_id), + EvaluationResultAlias.result["type"].astext == "error", + ) + ) + + result = await session.execute(query) + count = result.scalar() + if not count: + return False + return count > 0 diff --git a/api/oss/src/services/evaluation_service.py b/api/ee/src/services/evaluation_service.py similarity index 91% rename from api/oss/src/services/evaluation_service.py rename to api/ee/src/services/evaluation_service.py index ca40a70cef..e2cd9a2d8f 100644 --- a/api/oss/src/services/evaluation_service.py +++ b/api/ee/src/services/evaluation_service.py @@ -3,8 +3,9 @@ from fastapi import HTTPException from oss.src.utils.logging import get_module_logger -from oss.src.services import converters +from ee.src.services import converters from oss.src.services import db_manager +from ee.src.services import db_manager_ee from oss.src.models.api.evaluation_model import ( Evaluation, @@ -17,7 +18,7 @@ NewHumanEvaluation, ) from oss.src.models.db_models import AppDB -from oss.src.models.db_models import ( +from ee.src.models.db_models import ( EvaluationDB, HumanEvaluationDB, HumanEvaluationScenarioDB, @@ -58,20 +59,20 @@ async def prepare_csvdata_and_create_evaluation_scenario( """ for datum in csvdata: - # Check whether the inputs in the testset match the inputs in the variant + # Check whether the inputs in the test set match the inputs in the variant try: inputs = [ {"input_name": name, "input_value": datum[name]} for name in payload_inputs ] except KeyError: - await db_manager.delete_human_evaluation( + await db_manager_ee.delete_human_evaluation( evaluation_id=str(new_evaluation.id) ) msg = f""" - Columns in the testset should match the names of the inputs in the variant. + Columns in the test set should match the names of the inputs in the variant. Inputs names in variant are: {[variant_input for variant_input in payload_inputs]} while - columns in testset are: {[col for col in datum.keys() if col != 'correct_answer']} + columns in test set are: {[col for col in datum.keys() if col != 'correct_answer']} """ raise HTTPException( status_code=400, @@ -91,7 +92,7 @@ async def prepare_csvdata_and_create_evaluation_scenario( **_extend_with_evaluation(evaluation_type), **_extend_with_correct_answer(evaluation_type, datum), } - await db_manager.create_human_evaluation_scenario( + await db_manager_ee.create_human_evaluation_scenario( inputs=list_of_scenario_input, project_id=project_id, evaluation_id=str(new_evaluation.id), @@ -111,7 +112,7 @@ async def update_human_evaluation_service( """ # Update the evaluation - await db_manager.update_human_evaluation( + await db_manager_ee.update_human_evaluation( evaluation_id=str(evaluation.id), values_to_update=update_payload.model_dump() ) @@ -130,7 +131,7 @@ async def fetch_evaluation_scenarios_for_evaluation( List[EvaluationScenario]: A list of evaluation scenarios. """ - evaluation_scenarios = await db_manager.fetch_evaluation_scenarios( + evaluation_scenarios = await db_manager_ee.fetch_evaluation_scenarios( evaluation_id=evaluation_id, project_id=project_id ) return [ @@ -156,7 +157,7 @@ async def fetch_human_evaluation_scenarios_for_evaluation( Returns: List[EvaluationScenario]: A list of evaluation scenarios. """ - human_evaluation_scenarios = await db_manager.fetch_human_evaluation_scenarios( + human_evaluation_scenarios = await db_manager_ee.fetch_human_evaluation_scenarios( evaluation_id=str(human_evaluation.id) ) eval_scenarios = [ @@ -224,7 +225,7 @@ async def update_human_evaluation_scenario( if "correct_answer" in payload: values_to_update["correct_answer"] = payload["correct_answer"] - await db_manager.update_human_evaluation_scenario( + await db_manager_ee.update_human_evaluation_scenario( evaluation_scenario_id=str(evaluation_scenario_db.id), values_to_update=values_to_update, ) @@ -259,7 +260,7 @@ async def fetch_list_evaluations(app: AppDB, project_id: str) -> List[Evaluation List[Evaluation]: A list of evaluations. """ - evaluations_db = await db_manager.list_evaluations( + evaluations_db = await db_manager_ee.list_evaluations( app_id=str(app.id), project_id=project_id ) return [ @@ -282,7 +283,7 @@ async def fetch_list_human_evaluations( List[Evaluation]: A list of evaluations. """ - evaluations_db = await db_manager.list_human_evaluations( + evaluations_db = await db_manager_ee.list_human_evaluations( app_id=app_id, project_id=project_id ) return [ @@ -318,7 +319,7 @@ async def delete_human_evaluations(evaluation_ids: List[str]) -> None: """ for evaluation_id in evaluation_ids: - await db_manager.delete_human_evaluation(evaluation_id=evaluation_id) + await db_manager_ee.delete_human_evaluation(evaluation_id=evaluation_id) async def delete_evaluations(evaluation_ids: List[str]) -> None: @@ -332,7 +333,7 @@ async def delete_evaluations(evaluation_ids: List[str]) -> None: HTTPException: If evaluation not found or access denied. """ - await db_manager.delete_evaluations(evaluation_ids=evaluation_ids) + await db_manager_ee.delete_evaluations(evaluation_ids=evaluation_ids) async def create_new_human_evaluation(payload: NewHumanEvaluation) -> HumanEvaluationDB: @@ -353,7 +354,7 @@ async def create_new_human_evaluation(payload: NewHumanEvaluation) -> HumanEvalu detail=f"App with id {payload.app_id} does not exist", ) - human_evaluation = await db_manager.create_human_evaluation( + human_evaluation = await db_manager_ee.create_human_evaluation( app=app, status=payload.status, evaluation_type=payload.evaluation_type, @@ -395,11 +396,7 @@ async def create_new_evaluation( """ app = await db_manager.fetch_app_by_id(app_id=app_id) - testset = await db_manager.fetch_testset_by_id( - project_id=project_id, - # - testset_id=testset_id, - ) + testset = await db_manager.fetch_testset_by_id(testset_id=testset_id) variant_revision = await db_manager.fetch_app_variant_revision_by_id( variant_revision_id=revision_id ) @@ -408,9 +405,7 @@ async def create_new_evaluation( variant_revision and variant_revision.revision is not None ), f"Variant revision with {revision_id} cannot be None" - assert testset is not None, f"Testset with id {testset_id} does not exist" - - evaluation_db = await db_manager.create_new_evaluation( + evaluation_db = await db_manager_ee.create_new_evaluation( app=app, project_id=project_id, testset=testset, @@ -424,7 +419,7 @@ async def create_new_evaluation( async def compare_evaluations_scenarios(evaluations_ids: List[str], project_id: str): - evaluation = await db_manager.fetch_evaluation_by_id( + evaluation = await db_manager_ee.fetch_evaluation_by_id( project_id=project_id, evaluation_id=evaluations_ids[0], ) diff --git a/api/ee/src/services/organization_service.py b/api/ee/src/services/organization_service.py index 73488353b4..df24ded12a 100644 --- a/api/ee/src/services/organization_service.py +++ b/api/ee/src/services/organization_service.py @@ -1,5 +1,3 @@ -from urllib.parse import quote - from ee.src.services import db_manager_ee from oss.src.services import email_service from oss.src.models.db_models import UserDB @@ -15,9 +13,9 @@ async def update_an_organization( - organization_id: str, payload: OrganizationUpdate + org_id: str, payload: OrganizationUpdate ) -> OrganizationDB: - org = await db_manager_ee.get_organization(organization_id) + org = await db_manager_ee.get_organization(org_id) if org is not None: await db_manager_ee.update_organization(str(org.id), payload) return org @@ -53,30 +51,11 @@ async def send_invitation_email( """ html_template = email_service.read_email_template("./templates/send_email.html") - - token_param = quote(token, safe="") - email_param = quote(email, safe="") - org_param = quote(str(organization.id), safe="") - workspace_param = quote(str(workspace.id), safe="") - project_param = quote(project_id, safe="") - - invite_link = ( - f"{env.AGENTA_WEB_URL}/auth" - f"?token={token_param}" - f"&email={email_param}" - f"&organization_id={org_param}" - f"&workspace_id={workspace_param}" - f"&project_id={project_param}" - ) - html_content = html_template.format( username_placeholder=user.username, action_placeholder="invited you to join", workspace_placeholder=workspace.name, - call_to_action=( - "Click the link below to accept the invitation:</p><br>" - f'<a href="{invite_link}">Accept Invitation</a>' - ), + call_to_action=f'Click the link below to accept the invitation:</p><br><a href="{env.AGENTA_WEB_URL}/auth?token={token}&email={email}&org_id={organization.id}&workspace_id={workspace.id}&project_id={project_id}">Accept Invitation</a>', ) await email_service.send_email( @@ -120,6 +99,6 @@ async def notify_org_admin_invitation(workspace: WorkspaceDB, user: UserDB) -> b return True -async def get_organization_details(organization_id: str) -> dict: - organization = await db_manager_ee.get_organization(organization_id) +async def get_organization_details(org_id: str) -> dict: + organization = await db_manager_ee.get_organization(org_id) return await db_manager_ee.get_org_details(organization) diff --git a/api/oss/src/services/results_service.py b/api/ee/src/services/results_service.py similarity index 91% rename from api/oss/src/services/results_service.py rename to api/ee/src/services/results_service.py index cccb32164d..ca52151315 100644 --- a/api/oss/src/services/results_service.py +++ b/api/ee/src/services/results_service.py @@ -1,16 +1,16 @@ import uuid from typing import Sequence, Dict, Any -from oss.src.services import db_manager +from ee.src.services import db_manager_ee from oss.src.models.api.evaluation_model import EvaluationType -from oss.src.models.db_models import ( +from ee.src.models.db_models import ( HumanEvaluationDB, EvaluationScenarioDB, ) async def fetch_results_for_evaluation(evaluation: HumanEvaluationDB): - evaluation_scenarios = await db_manager.fetch_human_evaluation_scenarios( + evaluation_scenarios = await db_manager_ee.fetch_human_evaluation_scenarios( evaluation_id=str(evaluation.id) ) @@ -18,7 +18,7 @@ async def fetch_results_for_evaluation(evaluation: HumanEvaluationDB): if len(evaluation_scenarios) == 0: return results - evaluation_variants = await db_manager.fetch_human_evaluation_variants( + evaluation_variants = await db_manager_ee.fetch_human_evaluation_variants( human_evaluation_id=str(evaluation.id) ) results["variants"] = [ @@ -99,7 +99,7 @@ async def _compute_stats_for_human_a_b_testing_evaluation( async def fetch_results_for_single_model_test(evaluation_id: str): - evaluation_scenarios = await db_manager.fetch_human_evaluation_scenarios( + evaluation_scenarios = await db_manager_ee.fetch_human_evaluation_scenarios( evaluation_id=str(evaluation_id) ) scores_and_counts: Dict[str, Any] = {} diff --git a/api/ee/src/services/selectors.py b/api/ee/src/services/selectors.py index f8a10ceecb..1d8f3c53b2 100644 --- a/api/ee/src/services/selectors.py +++ b/api/ee/src/services/selectors.py @@ -1,3 +1,4 @@ +import uuid from typing import Dict, List, Union from sqlalchemy.future import select @@ -6,8 +7,7 @@ from oss.src.services import db_manager from oss.src.utils.logging import get_module_logger - -from oss.src.dbs.postgres.shared.engine import engine +from oss.src.models.db.postgres_engine import db_engine # type: ignore from ee.src.models.api.organization_models import Organization from ee.src.models.db_models import ( WorkspaceDB, @@ -38,7 +38,7 @@ async def get_user_org_and_workspace_id(user_uid) -> Dict[str, Union[str, List[s { "id": "123", "uid": "user123", "organization_ids": [], "workspace_ids": []} """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: user = await db_manager.get_user_with_id(user_id=user_uid) if not user: raise NoResultFound(f"User with uid {user_uid} not found") @@ -94,14 +94,14 @@ async def get_user_own_org(user_uid: str) -> OrganizationDB: """ user = await db_manager.get_user_with_id(user_id=user_uid) - async with engine.core_session() as session: - result = await session.execute( + async with db_engine.get_core_session() as session: + org_query = await session.execute( select(OrganizationDB).filter_by( owner=str(user.id), type="default", ) ) - org = result.scalars().first() + org = org_query.scalars().first() return org @@ -115,7 +115,7 @@ async def get_org_default_workspace(organization: Organization) -> WorkspaceDB: WorkspaceDB: Instance of WorkspaceDB """ - async with engine.core_session() as session: + async with db_engine.get_core_session() as session: result = await session.execute( select(WorkspaceDB) .filter_by(organization_id=organization.id, type="default") diff --git a/api/ee/src/services/utils.py b/api/ee/src/services/utils.py new file mode 100644 index 0000000000..0eaedde4ff --- /dev/null +++ b/api/ee/src/services/utils.py @@ -0,0 +1,21 @@ +# Stdlib Imports +import asyncio +from functools import partial +from typing import Callable, Coroutine + + +async def run_in_separate_thread(func: Callable, *args, **kwargs) -> Coroutine: + """ + Run a synchronous function in a separate thread. + + Args: + func (callable): The synchronous function to be executed. + args (tuple): Positional arguments to be passed to `func`. + kwargs (dict): Keyword arguments to be passed to `func`. + + Returns: + The result of the synchronous function. + """ + + loop = asyncio.get_event_loop() + return await loop.run_in_executor(None, partial(func, *args, **kwargs)) diff --git a/api/ee/src/services/workspace_manager.py b/api/ee/src/services/workspace_manager.py index 5bbebc78e6..f4a2a3d206 100644 --- a/api/ee/src/services/workspace_manager.py +++ b/api/ee/src/services/workspace_manager.py @@ -128,7 +128,7 @@ async def get_all_workspace_permissions() -> List[Permission]: async def invite_user_to_workspace( payload: List[InviteRequest], - organization_id: str, + org_id: str, project_id: str, workspace_id: str, user_uid: str, @@ -138,7 +138,7 @@ async def invite_user_to_workspace( Args: user_uid (str): The user uid. - organization_id (str): The ID of the organization that the workspace belongs to. + org_id (str): The ID of the organization that the workspace belongs to. project_id (str): The ID of the project that belongs to the workspace. workspace_id (str): The ID of the workspace. payload (InviteRequest): The payload containing the email address of the user to invite. @@ -152,7 +152,7 @@ async def invite_user_to_workspace( try: workspace = await get_workspace(workspace_id) - organization = await db_manager_ee.get_organization(organization_id) + organization = await db_manager_ee.get_organization(org_id) user_performing_action = await db_manager.get_user(user_uid) for payload_invite in payload: @@ -173,10 +173,10 @@ async def invite_user_to_workspace( ) # Check if the email address already has a valid, unused invitation for the workspace - existing_invitation, existing_role = await check_existing_invitation( + existing_invitation = await check_existing_invitation( project_id, payload_invite.email ) - if not existing_invitation and not existing_role: + if not existing_invitation: # Create a new invitation invitation = await create_invitation( payload_invite.roles[0], project_id, payload_invite.email @@ -216,7 +216,7 @@ async def invite_user_to_workspace( async def resend_user_workspace_invite( payload: ReseendInviteRequest, project_id: str, - organization_id: str, + org_id: str, workspace_id: str, user_uid: str, ) -> JSONResponse: @@ -224,7 +224,7 @@ async def resend_user_workspace_invite( Resend an invitation to a user to a workspace. Args: - organization_id (str): The ID of the organization that the workspace belongs to. + org_id (str): The ID of the organization that the workspace belongs to. project_id (str): The ID of the project. workspace_id (str): The ID of the workspace. payload (ReseendInviteRequest): The payload containing the email address of the user to invite. @@ -238,24 +238,17 @@ async def resend_user_workspace_invite( try: workspace = await get_workspace(workspace_id) - organization = await db_manager_ee.get_organization(organization_id) + organization = await db_manager_ee.get_organization(org_id) user_performing_action = await db_manager.get_user(user_uid) # Check if the email address already has a valid, unused invitation for the workspace - existing_invitation, existing_role = await check_existing_invitation( - project_id, payload.email - ) - if existing_invitation: + existing_invitation = await check_existing_invitation(project_id, payload.email) + if existing_invitation is not None: invitation = existing_invitation - elif existing_role: + else: # Create a new invitation invitation = await create_invitation( - existing_role, project_id, payload.email - ) - else: - raise HTTPException( - status_code=404, - detail="No existing invitation found for the user", + payload.roles[0], project_id, payload.email ) # Send the invitation email @@ -310,10 +303,7 @@ async def accept_workspace_invitation( if await db_manager_ee.check_user_in_workspace_with_email( user.email, str(workspace.id) ): - raise HTTPException( - status_code=409, - detail="User is already a member of the workspace", - ) + raise Exception("User is already a member of the workspace") invitation = await check_valid_invitation(project_id, user.email, token) if invitation is not None: diff --git a/api/ee/src/tasks/evaluations.py b/api/ee/src/tasks/evaluations.py new file mode 100644 index 0000000000..f2952d183e --- /dev/null +++ b/api/ee/src/tasks/evaluations.py @@ -0,0 +1,609 @@ +import asyncio +import traceback +from typing import Any, Dict, List + +from celery import shared_task, states + +from json import dumps + +from oss.src.services import helpers +from oss.src.utils.helpers import parse_url +from oss.src.utils.logging import get_module_logger +from oss.src.services.auth_helper import sign_secret_token +from oss.src.services import ( + evaluators_service, + llm_apps_service, + aggregation_service, +) +from oss.src.models.api.evaluation_model import EvaluationStatusEnum +from oss.src.models.shared_models import ( + AggregatedResult, + CorrectAnswer, + EvaluationScenarioInput, + EvaluationScenarioOutput, + EvaluationScenarioResult, + InvokationResult, + Error, + Result, +) +from oss.src.services.db_manager import ( + fetch_app_by_id, + fetch_app_variant_revision_by_id, + fetch_evaluator_config, + fetch_testset_by_id, + get_deployment_by_id, + get_project_by_id, +) +from ee.src.services.db_manager_ee import ( + update_evaluation, + EvaluationScenarioResult, + create_new_evaluation_scenario, + update_evaluation_with_aggregated_results, + check_if_evaluation_contains_failed_evaluation_scenarios, +) +from oss.src.services.evaluator_manager import get_evaluators +from oss.src.core.secrets.utils import get_llm_providers_secrets +from ee.src.utils.entitlements import check_entitlements, Counter + + +log = get_module_logger(__name__) + +# Fetch all evaluators and pre-compute ground truth keys +all_evaluators = get_evaluators() +ground_truth_keys_dict = { + evaluator.key: [ + key + for key, value in evaluator.settings_template.items() + if value.get("ground_truth_key") is True + ] + for evaluator in all_evaluators +} + + +@shared_task(queue="src.tasks.evaluations.evaluate", bind=True) +def evaluate( + self, + app_id: str, + user_id: str, + project_id: str, + revision_id: str, + evaluators_config_ids: List[str], + testset_id: str, + evaluation_id: str, + rate_limit_config: Dict[str, int], +): + """ + Evaluates an app variant using the provided evaluators and testset, and saves the results in the database. + + Args: + self: The task instance. + app_id (str): The ID of the app. + project_id (str): The ID of the project. + revision_id (str): The ID of the variant revision. + evaluators_config_ids (List[str]): The IDs of the evaluators configurations to be used. + testset_id (str): The ID of the testset. + evaluation_id (str): The ID of the evaluation. + rate_limit_config (Dict[str, int]): Configuration for rate limiting. + + Returns: + None + """ + + log.info( + "Starting evaluation:", + evaluation_id=evaluation_id, + project_id=project_id, + testset_id=testset_id, + application_id=app_id, + revision_id=revision_id, + ) + + loop = asyncio.get_event_loop() + + try: + # 0. Update evaluation status to STARTED + loop.run_until_complete( + update_evaluation( + evaluation_id, + project_id, + { + "status": Result( + type="status", value=EvaluationStatusEnum.EVALUATION_STARTED + ).model_dump() + }, + ) + ) + + # 1. Fetch data from the database + app = loop.run_until_complete(fetch_app_by_id(app_id)) + variant_revision_db = loop.run_until_complete( + fetch_app_variant_revision_by_id(revision_id) + ) + assert ( + variant_revision_db is not None + ), f"Variant revision with id {revision_id} not found!" + revision_parameters = variant_revision_db.config_parameters + testset_db = loop.run_until_complete(fetch_testset_by_id(testset_id)) + evaluator_config_dbs = [] + for evaluator_config_id in evaluators_config_ids: + evaluator_config = loop.run_until_complete( + fetch_evaluator_config(evaluator_config_id) + ) + evaluator_config_dbs.append(evaluator_config) + + deployment_db = loop.run_until_complete( + get_deployment_by_id(str(variant_revision_db.base.deployment_id)) + ) + uri = parse_url(url=deployment_db.uri) # type: ignore + + # 2. Initialize vars + evaluators_aggregated_data = { + str(evaluator_config_db.id): { + "evaluator_key": evaluator_config_db.evaluator_key, + "results": [], + } + for evaluator_config_db in evaluator_config_dbs + } + + log.info( + "Starting batches:", + evaluation_id=evaluation_id, + project_id=project_id, + testset_id=testset_id, + count=len(testset_db.csvdata), + size=len(dumps(testset_db.csvdata).encode("utf-8")), + ) + + # 3. Invoke the app + app_outputs: List[InvokationResult] = loop.run_until_complete( + llm_apps_service.batch_invoke( + uri, + testset_db.csvdata, # type: ignore + revision_parameters, # type: ignore + rate_limit_config, + user_id, + project_id, + application_id=str( + app.id + ), #! NOTE: removing this will break observability + ) + ) + + # 4. Get provider keys from vault + providers_keys_from_vault: Dict[str, Any] = loop.run_until_complete( + get_llm_providers_secrets(project_id) + ) + + project = loop.run_until_complete( + get_project_by_id( + project_id=project_id, + ) + ) + + # 5. Signin secret token and prepare headers for authentication + headers = {} + secret_token = loop.run_until_complete( + sign_secret_token( + user_id=str(user_id), + project_id=str(project_id), + workspace_id=str(project.workspace_id), + organization_id=str(project.organization_id), + ) + ) + if secret_token: + headers = {"Authorization": f"Secret {secret_token}"} + headers["ngrok-skip-browser-warning"] = "1" + + openapi_parameters = None + max_recursive_depth = 5 + runtime_prefix = uri + route_path = "" + + while max_recursive_depth > 0 and not openapi_parameters: + try: + openapi_parameters = loop.run_until_complete( + llm_apps_service.get_parameters_from_openapi( + runtime_prefix + "/openapi.json", + route_path, + headers, + ), + ) + except Exception as e: + openapi_parameters = None + + if not openapi_parameters: + max_recursive_depth -= 1 + if not runtime_prefix.endswith("/"): + route_path = "/" + runtime_prefix.split("/")[-1] + route_path + runtime_prefix = "/".join(runtime_prefix.split("/")[:-1]) + else: + route_path = "" + runtime_prefix = runtime_prefix[:-1] + + openapi_parameters = loop.run_until_complete( + llm_apps_service.get_parameters_from_openapi( + runtime_prefix + "/openapi.json", + route_path, + headers, + ), + ) + + for data_point, app_output in zip(testset_db.csvdata, app_outputs): # type: ignore + # 1. We prepare the inputs + list_inputs = get_app_inputs(revision_parameters, openapi_parameters) + + inputs = [ + EvaluationScenarioInput( + name=input_item["name"], + type="text", + value=data_point.get( + ( + input_item["name"] + if input_item["type"] != "messages" + else "chat" + ), + "", + ), # TODO: We need to remove the hardcoding of chat as name for chat inputs from the FE + ) + for input_item in list_inputs + if input_item["name"] != "ag_config" + ] + + # 2. We skip the iteration if error invoking the llm-app + if app_output.result.error: + log.error( + "There is an error when invoking the llm app so we need to skip" + ) + error_results = [ + EvaluationScenarioResult( + evaluator_config=str(evaluator_config_db.id), + result=Result( + type=app_output.result.type, + value=None, + error=Error( + message=app_output.result.error.message, + stacktrace=app_output.result.error.stacktrace, + ), + ), + ) + for evaluator_config_db in evaluator_config_dbs + ] + + loop.run_until_complete( + create_new_evaluation_scenario( + project_id=project_id, + evaluation_id=evaluation_id, + variant_id=str(variant_revision_db.variant_id), + inputs=inputs, + outputs=[ + EvaluationScenarioOutput( + result=Result( + type="error", + value=None, + error=Error( + message=app_output.result.error.message, + stacktrace=app_output.result.error.stacktrace, + ), + ) + ) + ], + correct_answers=None, + is_pinned=False, + note="", + results=error_results, + ) + ) + continue + + # 3. We evaluate + evaluators_results: List[EvaluationScenarioResult] = [] + + # Loop over each evaluator configuration to gather the correct answers and evaluate + ground_truth_column_names = [] # type: ignore + for evaluator_config_db in evaluator_config_dbs: + ground_truth_keys = ground_truth_keys_dict.get( + evaluator_config_db.evaluator_key, [] + ) + ground_truth_column_names.extend( + evaluator_config_db.settings_values.get(key, "") + for key in ground_truth_keys + ) + + result = loop.run_until_complete( + evaluators_service.evaluate( + evaluator_key=evaluator_config_db.evaluator_key, + output=app_output.result.value, + data_point=data_point, + settings_values=evaluator_config_db.settings_values, + app_params=revision_parameters, # type: ignore + inputs=data_point, + lm_providers_keys=providers_keys_from_vault, + ) + ) + + # Update evaluators aggregated data + evaluator_results: List[Result] = evaluators_aggregated_data[ + str(evaluator_config_db.id) + ]["results"] + evaluator_results.append(result) + + result_object = EvaluationScenarioResult( + evaluator_config=str(evaluator_config_db.id), + result=result, + ) + + evaluators_results.append(result_object) + + all_correct_answers = [ + ( + CorrectAnswer( + key=ground_truth_column_name, + value=data_point[ground_truth_column_name], + ) + if ground_truth_column_name in data_point + else CorrectAnswer(key=ground_truth_column_name, value="") + ) + for ground_truth_column_name in ground_truth_column_names + ] + + # 4. We save the result of the eval scenario in the db + loop.run_until_complete( + create_new_evaluation_scenario( + project_id=project_id, + evaluation_id=evaluation_id, + variant_id=str(variant_revision_db.variant_id), + inputs=inputs, + outputs=[ + EvaluationScenarioOutput( + result=Result( + type="text", value=app_output.result.value["data"] + ), + latency=app_output.latency, + cost=app_output.cost, + ) + ], + correct_answers=all_correct_answers, + is_pinned=False, + note="", + results=evaluators_results, + ) + ) + + # Add average cost and latency + average_latency = aggregation_service.aggregate_float_from_llm_app_response( + app_outputs, "latency" + ) + average_cost = aggregation_service.aggregate_float_from_llm_app_response( + app_outputs, "cost" + ) + total_cost = aggregation_service.sum_float_from_llm_app_response( + app_outputs, "cost" + ) + loop.run_until_complete( + update_evaluation( + evaluation_id, + project_id, + { + "average_latency": average_latency.model_dump(), + "average_cost": average_cost.model_dump(), + "total_cost": total_cost.model_dump(), + }, + ) + ) + + except Exception as e: + try: + loop.run_until_complete( + check_entitlements( + organization_id=project.organization_id, + key=Counter.EVALUATIONS, + delta=-1, + ) + ) + except: # pylint: disable=bare-except + pass + + log.error(f"An error occurred during evaluation: {e}") + traceback.print_exc() + loop.run_until_complete( + update_evaluation( + evaluation_id, + project_id, + { + "status": Result( + type="status", + value="EVALUATION_FAILED", + error=Error( + message="Evaluation Failed", + stacktrace=str(traceback.format_exc()), + ), + ).model_dump() + }, + ) + ) + self.update_state(state=states.FAILURE) + return + + try: + aggregated_results = loop.run_until_complete( + aggregate_evaluator_results(evaluators_aggregated_data) + ) + + loop.run_until_complete( + update_evaluation_with_aggregated_results(evaluation_id, aggregated_results) + ) + + failed_evaluation_scenarios = loop.run_until_complete( + check_if_evaluation_contains_failed_evaluation_scenarios(evaluation_id) + ) + + evaluation_status = Result( + type="status", value=EvaluationStatusEnum.EVALUATION_FINISHED, error=None + ) + + if failed_evaluation_scenarios: + evaluation_status = Result( + type="status", + value=EvaluationStatusEnum.EVALUATION_FINISHED_WITH_ERRORS, + error=None, + ) + + loop.run_until_complete( + update_evaluation( + evaluation_id=evaluation_id, + project_id=project_id, + updates={"status": evaluation_status.model_dump()}, + ) + ) + + except Exception as e: + log.error(f"An error occurred during evaluation aggregation: {e}") + traceback.print_exc() + loop.run_until_complete( + update_evaluation( + evaluation_id, + project_id, + { + "status": Result( + type="status", + value="EVALUATION_AGGREGATION_FAILED", + error=Error( + message="Evaluation Aggregation Failed", + stacktrace=str(traceback.format_exc()), + ), + ).model_dump() + }, + ) + ) + self.update_state(state=states.FAILURE) + return + + +async def aggregate_evaluator_results( + evaluators_aggregated_data: dict, +) -> List[AggregatedResult]: + """ + Aggregate the results of the evaluation evaluator. + + Args: + evaluators_aggregated_data (dict): The evaluators aggregated data + + Returns: + the aggregated result of the evaluation evaluator + """ + + aggregated_results = [] + for config_id, val in evaluators_aggregated_data.items(): + evaluator_key = val["evaluator_key"] or "" + results = val["results"] or [] + + if not results: + result = Result(type="error", value=None, error=Error(message="-")) + continue + + if evaluator_key == "auto_ai_critique": + result = aggregation_service.aggregate_ai_critique(results) + + elif evaluator_key == "auto_regex_test": + result = aggregation_service.aggregate_binary(results) + + elif evaluator_key in [ + "auto_exact_match", + "auto_similarity_match", + "field_match_test", + "auto_webhook_test", + "auto_custom_code_run", + "auto_starts_with", + "auto_ends_with", + "auto_contains", + "auto_contains_any", + "auto_contains_all", + "auto_contains_json", + "auto_json_diff", + "auto_semantic_similarity", + "auto_levenshtein_distance", + "rag_faithfulness", + "rag_context_relevancy", + ]: + result = aggregation_service.aggregate_float(results) + + else: + result = Result( + type="error", value=None, error=Error(message="Aggregation failed") + ) + + aggregated_result = AggregatedResult( + evaluator_config=config_id, + result=result, + ) + aggregated_results.append(aggregated_result) + return aggregated_results + + +def get_app_inputs(parameters, openapi_parameters) -> List[Dict[str, str]]: + """ + Get a list of application inputs based on the app variant parameters and openapi parameters. + + Args: + parameters (dict): A dictionary containing the app variant parameters. + openapi_parameters (list): A list of openapi parameters. + + Returns: + list: A list of dictionaries representing the application inputs, where each dictionary contains the input name and type. + """ + # --- + inputs = [] + # --- + + for param in openapi_parameters: + if param["type"] == "input": + # --- + item = {"name": param["name"], "type": "input"} + inputs.append(item) + # --- + + # in case of dynamic inputs (as in our templates) + elif param["type"] == "dict": + # let's get the list of the dynamic inputs + if ( + param["name"] in parameters + ): # in case we have modified in the playground the default list of inputs (e.g. country_name) + input_names = [_["name"] for _ in parameters[param["name"]]] + else: # otherwise we use the default from the openapi + input_names = param["default"] + + for input_name in input_names: + # --- + item = {"name": input_name, "type": "dict_input"} + inputs.append(item) + # --- + + elif param["type"] == "messages": + # TODO: Right now the FE is saving chats always under the column name chats. The whole logic for handling chats and dynamic inputs is convoluted and needs rework in time. + # --- + item = {"name": "chat", "type": "messages"} + inputs.append(item) + # --- + elif param["type"] == "file_url": + # --- + item = {"name": param["name"], "type": "file_url"} + inputs.append(item) + # --- + else: + # if param["name"] in parameters: # hotfix + # # --- + # item = {"name": param["name"], "type": param["type"]} + # inputs.append(item) + # # --- + pass + + try: + input_keys = helpers.find_key_occurrences(parameters, "input_keys") or [] + items = [{"name": input_key, "type": "input"} for input_key in input_keys] + inputs.extend(items) + reserved_keys = ["inputs"] + inputs = [input for input in inputs if input["name"] not in reserved_keys] + except Exception as e: # pylint: disable=broad-exception-caught + log.warn(f"Error making payload: {e}") + + return inputs diff --git a/api/ee/src/utils/entitlements.py b/api/ee/src/utils/entitlements.py index 13360aad77..97e53702b1 100644 --- a/api/ee/src/utils/entitlements.py +++ b/api/ee/src/utils/entitlements.py @@ -2,21 +2,13 @@ from uuid import UUID from oss.src.utils.logging import get_module_logger -from oss.src.utils.caching import get_cache, set_cache log = get_module_logger(__name__) from fastapi.responses import JSONResponse from ee.src.core.subscriptions.service import SubscriptionsService -from ee.src.core.entitlements.types import ( - Tracker, - Flag, - Counter, - Gauge, - Plan, - ENTITLEMENTS, -) +from ee.src.core.entitlements.types import Tracker, Flag, Counter, Gauge, ENTITLEMENTS from ee.src.core.meters.service import MetersService from ee.src.core.meters.types import MeterDTO from ee.src.dbs.postgres.meters.dao import MetersDAO @@ -84,36 +76,15 @@ async def check_entitlements( if flag is None and counter is None and gauge is None: raise EntitlementsException(f"Invalid key [{key}]") - cache_key = { - "organization_id": organization_id, - } - - subscription_data = await get_cache( - namespace="entitlements:subscription", - key=cache_key, - ) - - if subscription_data is None: - subscription = await subscriptions_service.read(organization_id=organization_id) - - if not subscription: - raise EntitlementsException( - f"No subscription found for organization [{organization_id}]" - ) - - subscription_data = { - "plan": subscription.plan.value, - "anchor": subscription.anchor, - } + subscription = await subscriptions_service.read(organization_id=organization_id) - await set_cache( - namespace="entitlements:subscription", - key=cache_key, - value=subscription_data, + if not subscription: + raise EntitlementsException( + f"No subscription found for organization [{organization_id}]" ) - plan = Plan(subscription_data.get("plan")) - anchor = subscription_data.get("anchor") + plan = subscription.plan + anchor = subscription.anchor if plan not in ENTITLEMENTS: raise EntitlementsException(f"Missing plan [{plan}] in entitlements") diff --git a/api/ee/src/utils/permissions.py b/api/ee/src/utils/permissions.py index 312bcb05b6..74f71c426f 100644 --- a/api/ee/src/utils/permissions.py +++ b/api/ee/src/utils/permissions.py @@ -152,51 +152,52 @@ async def check_action_access( namespace="check_action_access", key=cache_key, value=has_permission, + ttl=5 * 60, # seconds ) return has_permission -# async def check_apikey_action_access( -# api_key: str, user_id: str, permission: Permission -# ): -# """ -# Check if an api key belongs to a user for a workspace and has the right permission. - -# Args: -# api_key (str): The api key -# user_id (str): The user (owner) ID of the api_key -# permission (Permission): The permission to check for. -# """ - -# api_key_prefix = api_key.split(".")[0] -# api_key_db = await db_manager.get_user_api_key_by_prefix( -# api_key_prefix=api_key_prefix, user_id=user_id -# ) -# if api_key_db is None: -# raise HTTPException( -# 404, {"message": f"API Key with prefix {api_key_prefix} not found"} -# ) - -# project_db = await db_manager.get_project_by_id( -# project_id=str(api_key_db.project_id) -# ) -# if project_db is None: -# raise HTTPException( -# 404, -# {"message": f"Project with ID {str(api_key_db.workspace_id)} not found"}, -# ) - -# has_access = await check_project_has_role_or_permission( -# project_db, str(api_key_db.created_by_id), None, permission -# ) -# if not has_access: -# raise HTTPException( -# 403, -# { -# "message": "You do not have access to perform this action. Please contact your organization admin." -# }, -# ) +async def check_apikey_action_access( + api_key: str, user_id: str, permission: Permission +): + """ + Check if an api key belongs to a user for a workspace and has the right permission. + + Args: + api_key (str): The api key + user_id (str): The user (owner) ID of the api_key + permission (Permission): The permission to check for. + """ + + api_key_prefix = api_key.split(".")[0] + api_key_db = await db_manager.get_user_api_key_by_prefix( + api_key_prefix=api_key_prefix, user_id=user_id + ) + if api_key_db is None: + raise HTTPException( + 404, {"message": f"API Key with prefix {api_key_prefix} not found"} + ) + + project_db = await db_manager.get_project_by_id( + project_id=str(api_key_db.project_id) + ) + if project_db is None: + raise HTTPException( + 404, + {"message": f"Project with ID {str(api_key_db.workspace_id)} not found"}, + ) + + has_access = await check_project_has_role_or_permission( + project_db, str(api_key_db.created_by_id), None, permission + ) + if not has_access: + raise HTTPException( + 403, + { + "message": "You do not have access to perform this action. Please contact your organization admin." + }, + ) async def check_rbac_permission( diff --git a/api/ee/tests/manual/evaluations/sdk/openai_agent.py b/api/ee/tests/manual/evaluations/sdk/openai_agent.py deleted file mode 100644 index 575e370c7d..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/openai_agent.py +++ /dev/null @@ -1,98 +0,0 @@ -# /// script -# dependencies = ["agenta", "openai-agents", "openinference-instrumentation-openai-agents", "ipdb", "opentelemetry-api", "opentelemetry-sdk"] -# /// - -from agents import ( - Agent, - InputGuardrail, - GuardrailFunctionOutput, - Runner, - WebSearchTool, - run_demo_loop, -) -from agents.exceptions import InputGuardrailTripwireTriggered -from pydantic import BaseModel -import asyncio -from dotenv import load_dotenv -import os - -load_dotenv() -import agenta as ag - -# from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor -# from opentelemetry import trace -# from opentelemetry.sdk.trace.export import ConsoleSpanExporter, BatchSpanProcessor -# from opentelemetry.sdk.trace import ReadableSpan -# from opentelemetry.sdk.trace.export import SpanProcessor -# from opentelemetry.trace import Span -from typing import Optional - -# os.environ["AGENTA_API_KEY"] = "" - -# ag.init() -# OpenAIAgentsInstrumentor().instrument() - - -class AgentaQuestionOutput(BaseModel): - is_agenta_question: bool - reasoning: str - - -guardrail_agent = Agent( - name="Guardrail check", - instructions="Check if the user is asking something about Agenta, the LLMOps platform. Their question might be ambiguous, so you need to be careful.", - output_type=AgentaQuestionOutput, - model="gpt-4o-mini", -) - -web_research_agent = Agent( - name="Web Research Agent", - handoff_description="Specialist agent for web research. You will use this agent to research the user's question when the documentation is not enough. You mainly search the websites agenta.ai and docs.agenta.ai", - instructions="You will search the web to answer the user's question about Agenta, the LLMOps platform.", - tools=[ - WebSearchTool(), - ], - model="gpt-4o-mini", -) - - -async def guardrail_function(ctx, agent, input_data): - result = await Runner.run(guardrail_agent, input_data, context=ctx.context) - final_output = result.final_output_as(AgentaQuestionOutput) - return GuardrailFunctionOutput( - output_info=final_output, - tripwire_triggered=not final_output.is_agenta_question, - ) - - -triage_agent = Agent( - name="Triage Agent", - instructions="You determine which agent to use based on the user's question on agenta", - handoffs=[web_research_agent], - input_guardrails=[ - InputGuardrail(guardrail_function=guardrail_function), - ], - model="gpt-4o-mini", -) - -# async def main(): -# # Example 1: History question -# # agent = Agent(name="Assistant", instructions="You are a helpful assistant.") -# await run_demo_loop(triage_agent) - -# # try: -# # result = await Runner.run(triage_agent, "What is the meaning of life?") -# # import ipdb; ipdb.set_trace() -# # print(result.final_output) -# # except InputGuardrailTripwireTriggered as e: -# # print("Guardrail blocked this input:", e) - -# # # Example 2: General/philosophical question -# # try: -# # result = await Runner.run(triage_agent, "What is the meaning of life?") -# # print(result.final_output) -# # except InputGuardrailTripwireTriggered as e: -# # print("Guardrail blocked this input:", e) - -# if __name__ == "__main__": -# asyncio.run(main()) diff --git a/api/ee/tests/manual/evaluations/sdk/quick_start.py b/api/ee/tests/manual/evaluations/sdk/quick_start.py deleted file mode 100644 index a60fdebfc9..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/quick_start.py +++ /dev/null @@ -1,206 +0,0 @@ -""" -Agenta SDK Quick Start Tutorial -================================ - -This tutorial demonstrates how to: -1. Create a simple application that returns country capitals -2. Create evaluators to check if the application's output is correct -3. Run an evaluation to test your application - -The new @application and @evaluator decorators make this simple and intuitive! -""" - -from dotenv import load_dotenv - -load_dotenv() - -import asyncio -import random - -from agenta.sdk.evaluations import aevaluate, display - -import agenta as ag -from agenta.sdk.workflows import builtin - -# Initialize Agenta SDK -ag.init() - - -# Test data: countries and their capitals -my_testcases_data = [ - {"country": "Germany", "capital": "Berlin"}, - {"country": "France", "capital": "Paris"}, - {"country": "Spain", "capital": "Madrid"}, - {"country": "Italy", "capital": "Rome"}, -] - - -# ============================================================================ -# STEP 1: Define your application -# ============================================================================ - - -@ag.application( - slug="capital_quiz_app", - # - name="Capital Quiz Application", - description="Returns the capital of a given country (sometimes incorrectly for testing)", -) -async def capital_quiz_app(capital: str, country: str): - """ - A simple application that returns country capitals. - - Args: - capital: The expected capital (from testcase) - country: The country name (from testcase) - - Returns: - The capital city name (sometimes wrong for testing purposes) - """ - # Randomly return wrong answer for testing - chance = random.choice([True, False, True]) - return capital if chance else "Aloha" - - -# ============================================================================ -# STEP 2: Define your evaluators -# ============================================================================ - - -@ag.evaluator( - slug="exact_match_evaluator", - # - name="Exact Match Evaluator", - description="Checks if the application's output exactly matches the expected capital", -) -async def exact_match_evaluator(capital: str, outputs: str): - """ - Evaluates if the application's output matches the expected answer. - - Args: - capital: The expected capital (from testcase) - outputs: What the application returned - - Returns: - Dictionary with score and success flag - """ - is_correct = outputs == capital - return { - "score": 1 if is_correct else 0, - "success": is_correct, - } - - -@ag.evaluator( - slug="random_score_evaluator", - # - name="Random Score Evaluator", - description="Assigns a random score (for demonstration purposes)", -) -async def random_score_evaluator(capital: str): - """ - A demo evaluator that assigns random scores. - - Args: - capital: The expected capital (from testcase, not used but shows it's available) - - Returns: - Dictionary with random score - """ - score = random.randint(0, 100) - return { - "myscore": score, - "success": score > 30, - } - - -# ============================================================================ -# STEP 3: Use builtin evaluators -# ============================================================================ - -# You can also use Agenta's builtin evaluators like LLM-as-a-judge -llm_judge_evaluator = builtin.auto_ai_critique( - slug="llm_judge_evaluator", - # - name="LLM Judge Evaluator", - description="Uses an LLM to judge if the answer is correct", - # - correct_answer_key="capital", - prompt_template=[ - { - "role": "system", - "content": "You are a judge that evaluates geography knowledge.", - }, - { - "role": "user", - "content": ( - "The correct capital is: {{capital}}\n" - "The student's answer is: {{outputs}}\n\n" - "Is the student's answer correct?\n" - "Respond with ONLY a number from 0.0 (completely wrong) to 1.0 (completely correct).\n" - "Nothing else - just the number." - ), - }, - ], -) - - -# ============================================================================ -# STEP 4: Run the evaluation -# ============================================================================ - - -async def run_evaluation(): - """Create a testset and run evaluation with your app and evaluators.""" - - # Create a testset from your test data - print("Creating testset...") - my_testset = await ag.testsets.aupsert( - name="Country Capitals", - data=my_testcases_data, - ) - - if not my_testset or not my_testset.id: - print("❌ Failed to create testset") - return None - - print(f"✅ Testset created with {len(my_testcases_data)} test cases\n") - - # Run evaluation - print("Running evaluation...") - eval_result = await aevaluate( - testsets=[my_testset.id], - applications=[capital_quiz_app], - evaluators=[ - exact_match_evaluator, - random_score_evaluator, - llm_judge_evaluator, - ], - ) - - return eval_result - - -async def main(): - """Main entry point.""" - print("=" * 70) - print("Agenta SDK Quick Start Tutorial") - print("=" * 70) - print() - - eval_data = await run_evaluation() - - if not eval_data: - print("❌ Evaluation failed") - exit(1) - - print("\n" + "=" * 70) - print("Evaluation Results") - print("=" * 70) - # await display(eval_data) - - print("\n✅ Tutorial complete!") - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/api/ee/tests/manual/evaluations/sdk/requirements.txt b/api/ee/tests/manual/evaluations/sdk/requirements.txt deleted file mode 100644 index 3d152e9bfe..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -openai-agents -openinference-instrumentation-openai-agents -dotenv \ No newline at end of file diff --git a/api/ee/tests/manual/evaluations/sdk/test_handlers.py b/api/ee/tests/manual/evaluations/sdk/test_handlers.py deleted file mode 100644 index 4808a14421..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_handlers.py +++ /dev/null @@ -1,202 +0,0 @@ -import os - -from dotenv import load_dotenv - -load_dotenv() - -from fastapi import FastAPI - -os.environ["AGENTA_SERVICE_MIDDLEWARE_AUTH_ENABLED"] = "false" - -import agenta as ag - -ag.init() - - -from agenta.sdk.models.workflows import ( - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, - WorkflowServiceRequestData, - WorkflowServiceResponseData, -) -from agenta.sdk.decorators.routing import ( - route, - default_app, - create_app, -) -from agenta.sdk.decorators.running import ( - WorkflowServiceRequest, - workflow, -) - -custom_app = create_app() - -public_app = FastAPI() - -public_app.mount("/services", app=default_app) - -app = public_app - - -@route("/tokens-async", app=default_app) -async def async_gen(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 3)): - yield {"async_token": chr(97 + i)} - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-async/invoke -""" - -""" -curl -i -N \ - -H "Accept: text/event-stream" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-async/invoke -""" - - -@route("/tokens-sync", app=default_app) -def sync_tokens(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 2)): - yield {"async_token": chr(120 + i)} - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-sync/invoke -""" - -""" -curl -i -N \ - -H "Accept: text/event-stream" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-sync/invoke -""" - - -@route("/tokens-batch", app=default_app) -@workflow(aggregate=True) -def batch_tokens(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 2)): - yield {"token": chr(ord("A") + i)} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-batch/invoke -""" - - -@route("/greet-async", app=default_app) -async def greet(request: WorkflowServiceRequest): - name = (request.data.inputs or {}).get("name", "world") - return {"message": f"Hello, {name}!"} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"name": "Agenta"}}}' \ - http://127.0.0.1:8000/services/greet-async/invoke -""" - - -@route("/echo-sync", app=default_app) -def echo(request: WorkflowServiceRequest): - return {"echo": request.data.inputs} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/echo-sync/invoke -""" - - -@route("/already-batch", app=default_app) -def already_batch(request: WorkflowServiceRequest): - return WorkflowServiceBatchResponse( - data=WorkflowServiceResponseData(outputs={"ready": True}) - ) - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/already-batch/invoke -""" - - -@route("/already-stream", app=default_app) -def already_stream(request: WorkflowServiceRequest): - async def iterator(): - yield {"ready": "no"} - yield {"ready": "go"} - - return WorkflowServiceStreamResponse(generator=iterator) - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/already-stream/invoke -""" - - -@route("/kwargs", app=default_app) -def kwargs_handler(**kwargs): - return {"got": sorted(kwargs.keys())} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/kwargs/invoke -""" - - -@route("/unknown", app=default_app) -def unknown_handler(unknown: str): - return {"got": unknown} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/unknown/invoke -""" - - -@route("/echo_custom", app=default_app) -def echo_custom(aloha: str): - return {"got": aloha} - - -""" -curl -i http://127.0.0.1:8000/services/echo_custom/inspect -""" - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/echo_custom/invoke -""" diff --git a/api/ee/tests/manual/evaluations/sdk/test_local.py b/api/ee/tests/manual/evaluations/sdk/test_local.py deleted file mode 100644 index 579770c6a9..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_local.py +++ /dev/null @@ -1,680 +0,0 @@ -import asyncio - -from dotenv import load_dotenv - -load_dotenv() - -import agenta as ag - -ag.init() - -from agenta.sdk.models.workflows import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, -) -from agenta.sdk.decorators.running import workflow -from agenta.sdk.decorators.tracing import instrument -from agenta.sdk.workflows import builtin - -print("-----------------------------------------------------------------------") - -from agenta.sdk.workflows.handlers import echo_v0 - - -@instrument(annotate=True) -def echo_custom(aloha: str): - return {"got": aloha} - - -echo_manual = workflow(uri="echo")() - - -print(echo_custom(aloha="mahalo"), echo_custom) -print(echo_v0(aloha="mahalo"), echo_v0) -print(echo_manual(aloha="mahalo"), echo_manual) - - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_exact_match = builtin.auto_exact_match() - -print( - builtin_auto_exact_match( - inputs={"correct_answer": "mahalo"}, - outputs="mahalo", - ), - builtin_auto_exact_match, -) -print( - builtin_auto_exact_match( - inputs={"correct_answer": "mahalo"}, - outputs="mahala", - ), - builtin_auto_exact_match, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_exact_match.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - - -builtin_auto_regex_test = builtin.auto_regex_test( - regex_pattern="^ma.*o$", -) - -print( - builtin_auto_regex_test( - outputs="mahalo", - ), - builtin_auto_regex_test, -) - -print( - builtin_auto_regex_test( - outputs="mahala", - ), - builtin_auto_regex_test, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_regex_test.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_field_match_test = builtin.field_match_test( - json_field="answer", - correct_answer_key="aloha", -) - -print( - builtin_field_match_test( - inputs={"aloha": "mahalo"}, - outputs={"answer": "mahalo"}, - ), - builtin_field_match_test, -) - -print( - builtin_field_match_test( - inputs={"aloha": "mahalo"}, - outputs={"answer": "mahala"}, - ), - builtin_field_match_test, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_field_match_test.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -print("auto_webhook_test") - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_custom_code_run = builtin.auto_custom_code_run( - code="evaluate = lambda app_params, inputs, output, correct_answer: 1.0 if output in correct_answer else 0.0", -) - -print( - asyncio.run( - builtin_auto_custom_code_run( - inputs={"correct_answer": "mahalo"}, - outputs="mahalo", - ) - ), - builtin_auto_custom_code_run, -) - - -print( - asyncio.run( - builtin_auto_custom_code_run( - inputs={"correct_answer": "mahalo"}, - outputs="mahala", - ) - ), - builtin_auto_custom_code_run, -) - - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_custom_code_run.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_ai_critique = builtin.auto_ai_critique( - prompt_template=[ - { - "role": "system", - "content": "You are an evaluator grading an LLM App.\nYou will be given INPUTS, the LLM APP OUTPUT, the CORRECT ANSWER used in the LLM APP.\n<grade_criteria>\n- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER\n</grade_criteria>\n\n<score_criteria>\n-The score should be between 0 and 1 with one decimal point\n-A score of 1 means that the answer is perfect. This is the highest (best) score. Only when perfect match, otherwise something betweeen 0 and 1.\nA score of 0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n</score_criteria>\n\n<output_format>\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n</output_format>", - }, - { - "role": "user", - "content": "<correct_answer>{{correct_answer}}</correct_answer>\n<llm_app_output>{{prediction}}</llm_app_output>", - }, - ], -) - -print( - asyncio.run( - builtin_ai_critique( - inputs={ - "country": "Germany", - "correct_answer": "Berlin", - }, - outputs="Berlin", - ) - ), - builtin_ai_critique, -) - -print( - asyncio.run( - builtin_ai_critique( - inputs={ - "country": "Germany", - "correct_answer": "Berlin", - }, - outputs="Paris", - ) - ), - builtin_ai_critique, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_ai_critique.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run( - builtin_ai_critique.invoke( - request=WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs={ - "country": "Germany", - "correct_answer": "Berlin", - }, - outputs="Berlin", - ) - ) - ) - ).model_dump(mode="json", exclude_none=True), - builtin_ai_critique, -) - -print( - asyncio.run( - builtin_ai_critique.invoke( - request=WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs={ - "country": "Germany", - "correct_answer": "Berlin", - }, - outputs="Paris", - ) - ) - ) - ).model_dump(mode="json", exclude_none=True), - builtin_ai_critique, -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_starts_with = builtin.auto_starts_with( - prefix="ma", -) - -print( - builtin_auto_starts_with( - outputs="mahalo", - ), - builtin_auto_starts_with, -) - -print( - builtin_auto_starts_with( - outputs="mohalo", - ), - builtin_auto_starts_with, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_starts_with.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_ends_with = builtin.auto_ends_with( - suffix="lo", -) - -print( - builtin_auto_ends_with( - outputs="mahalo", - ), - builtin_auto_ends_with, -) - -print( - builtin_auto_ends_with( - outputs="mahala", - ), - builtin_auto_ends_with, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_ends_with.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_contains = builtin.auto_contains( - substring="ha", -) - -print( - builtin_auto_contains( - outputs="mahalo", - ), - builtin_auto_contains, -) - -print( - builtin_auto_contains( - outputs="maala", - ), - builtin_auto_contains, -) - - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_contains.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_contains_any = builtin.auto_contains_any( - substrings=["maha", "lo"], -) - -print( - builtin_auto_contains_any( - outputs="mahalo", - ), - builtin_auto_contains_any, -) - -print( - builtin_auto_contains_any( - outputs="mohala", - ), - builtin_auto_contains_any, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_contains_any.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_contains_all = builtin.auto_contains_all( - substrings=["maha", "lo"], -) - -print( - builtin_auto_contains_all( - outputs="mahalo", - ), - builtin_auto_contains_all, -) - -print( - builtin_auto_contains_all( - outputs="mahala", - ), - builtin_auto_contains_all, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_contains_all.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_contains_json = builtin.auto_contains_json() - -print( - builtin_auto_contains_json( - outputs='{"aloha": "mahalo"}', - ), - builtin_auto_contains_json, -) - -print( - builtin_auto_contains_json( - outputs={"aloha": "mahalo"}, - ), - builtin_auto_contains_json, -) - -print( - builtin_auto_contains_json( - outputs="mahala", - ), - builtin_auto_contains_json, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_contains_json.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_json_diff = builtin.auto_json_diff() - -print( - builtin_auto_json_diff( - inputs={"correct_answer": {"aloha": "mahalo"}}, - outputs={"aloha": "mahalo"}, - ), - builtin_auto_json_diff, -) - -print( - builtin_auto_json_diff( - inputs={"correct_answer": {"aloha": "mahalo"}}, - outputs={"mahalo": "aloha"}, - ), - builtin_auto_json_diff, -) - - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_json_diff.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - - -builtin_auto_levenshtein_distance = builtin.auto_levenshtein_distance( - threshold=0.9, -) - -print( - builtin_auto_levenshtein_distance( - inputs={"correct_answer": "mahalo"}, - outputs="mahalo", - ), - builtin_auto_levenshtein_distance, -) - -print( - builtin_auto_levenshtein_distance( - inputs={"correct_answer": "mahalo"}, - outputs="mahala", - ), - builtin_auto_levenshtein_distance, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_levenshtein_distance.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_similarity_match = builtin.auto_similarity_match( - threshold=0.9, -) - -print( - builtin_auto_similarity_match( - inputs={"correct_answer": "mahalo"}, - outputs="mahalo", - ), - builtin_auto_similarity_match, -) - -print( - builtin_auto_similarity_match( - inputs={"correct_answer": "mahalo"}, - outputs="mohala", - ), - builtin_auto_similarity_match, -) - - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_similarity_match.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_auto_semantic_similarity = builtin.auto_semantic_similarity( - threshold=0.9, -) - -print( - asyncio.run( - builtin_auto_semantic_similarity( - inputs={"correct_answer": "mahalo"}, - outputs="mahalo", - ) - ), - builtin_auto_semantic_similarity, -) - -print( - asyncio.run( - builtin_auto_semantic_similarity( - inputs={"correct_answer": "mahalo"}, - outputs="mohala", - ) - ), - builtin_auto_semantic_similarity, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_auto_semantic_similarity.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_completion = builtin.completion( - config=builtin.SinglePromptConfig( - **{ - "prompt": { - "messages": [ - { - "role": "user", - "content": "What's the capital of {{country}}?", - } - ] - } - } # type: ignore - ), -) - -print( - asyncio.run( - builtin_completion( - inputs={"country": "Germany"}, - ) - ), - builtin_completion, -) - - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_completion.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - - -print("-----------------------------------------------------------------------") -print() -print("-----------------------------------------------------------------------") - -builtin_chat = builtin.chat( - config=builtin.SinglePromptConfig( - **{ - "prompt": { - "messages": [ - { - "role": "assistant", - "content": "Always respond in uppercase.", - } - ] - } - } - ), -) - -print( - asyncio.run( - builtin_chat( - messages=[ - { - "role": "user", - "content": "What's the capital of Germany?", - } - ] - ) - ), - builtin_chat, -) - -print("-----------------------------------------------------------------------") - -print( - asyncio.run(builtin_chat.inspect()).model_dump( - mode="json", - exclude_none=True, - ), -) - - -print("-----------------------------------------------------------------------") diff --git a/api/ee/tests/manual/evaluations/sdk/test_loop.py b/api/ee/tests/manual/evaluations/sdk/test_loop.py deleted file mode 100644 index 0e933ee24d..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_loop.py +++ /dev/null @@ -1,152 +0,0 @@ -import asyncio -import random - -from dotenv import load_dotenv - -load_dotenv() - -import agenta as ag - -ag.init() - -from agenta.sdk.decorators import application, evaluator -from agenta.sdk.workflows import builtin -from agenta.sdk.evaluations import aevaluate, display - - -my_testcases_data = [ - { - "country": "Germany", - "capital": "Berlin", - }, - { - "country": "France", - "capital": "Paris", - }, - { - "country": "Spain", - "capital": "Madrid", - }, - { - "country": "Italy", - "capital": "Rome", - }, -] - - -@application( - slug="my_application", - # - name="my_application", - description="A simple workflow that returns the capital of a country", - # - parameters=dict(aloha="mahalo"), -) -async def my_application(capital: str, country: str): - chance = random.choice([True, False, True]) - _outputs = capital if chance else "Aloha" - - return _outputs - - -@evaluator( - slug="my_match_workflow", - # - name="my_match_workflow", - description="A simple workflow that returns the capital of a country", - # - parameters=dict(aloha="mahalo"), -) -async def my_match_evaluator(capital: str, outputs: str): - _outputs = { - "score": outputs == capital and 1 or 0, - "success": outputs == capital, - } - - return _outputs - - -@evaluator( - slug="my_random_evaluator", - # - name="my_random_evaluator", - description="A simple evaluator that returns a random score", -) -async def my_random_evaluator(capital: str): - score = random.randint(0, 100) - _outputs = { - "myscore": score, - "success": score > 30, - } - - return _outputs - - -my_llm_as_a_judge_evaluator = builtin.auto_ai_critique( - slug="my_llm_as_a_judge_evaluator", - # - name="my_llm_as_a_judge_evaluator", - description="Use an LLM to judge if the previous answer is correct", - # - correct_answer_key="capital", - model="openai/gpt-4o-mini", - prompt_template=[ - { - "role": "system", - "content": "You are a judge that evaluates if the previous answer is correct.", - }, - { - "role": "user", - "content": ( - "The correct answer is {{capital}}.\n" - "The previous answer is {{outputs}}.\n" - "Is the previous answer correct? Answer with a decimal 'score' from 0.0 to 1.0. " - "Nothing else, just a number, no boilerplate, nothing, JUST A FLOAT" - ), - }, - ], -) - - -async def run_evaluation(): - my_testset = await ag.testsets.aupsert( - name="Capitals", - # - data=my_testcases_data, - ) - - if not my_testset or not my_testset.id: - print("Failed to create or update testset") - return None - - eval = await aevaluate( - name="Capital Evaluation", - description="An evaluation to test the capitals application", - # - testsets=[ - my_testset.id, - ], - applications=[ - my_application, - ], - evaluators=[ - my_match_evaluator, - my_random_evaluator, - my_llm_as_a_judge_evaluator, - ], - ) - - return eval - - -async def main(): - eval_data = await run_evaluation() - - if not eval_data: - exit(1) - - # await display(eval_data) - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/api/ee/tests/manual/evaluations/sdk/test_loop_agent.py b/api/ee/tests/manual/evaluations/sdk/test_loop_agent.py deleted file mode 100644 index 05627865f0..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_loop_agent.py +++ /dev/null @@ -1,208 +0,0 @@ -import asyncio -import random - -from dotenv import load_dotenv - -load_dotenv() - -import agenta as ag - -ag.init() - -from agenta.sdk.decorators import application, evaluator -from agenta.sdk.workflows import builtin -from agenta.sdk.evaluations import aevaluate, display - -from agents import Runner -from agents.exceptions import InputGuardrailTripwireTriggered - -from openai_agent import triage_agent - -from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor - -OpenAIAgentsInstrumentor().instrument() - - -my_testcases_data = [ - { - "question": "What is agenta?", - "rubic": "The answer should mention llmops platform and open-source", - "guardrail": False, - }, - { - "question": "How much does agenta cost?", - "rubic": "The answer should mention the three pricing tiers, the cost in usd, how much traces costs, retention periods, features, and the free tier", - "guardrail": False, - }, - { - "question": "How do I use azure in Agenta?", - "rubic": "The answer should mention the azure provider and the steps to set it up in the model hub", - "guardrail": False, - }, - { - "question": "What is the meaning of life?", - "rubic": "The agent should refuse to answer", - "guardrail": True, - }, -] - - -@application( - slug="agenta_agent", - # - name="agenta_agent", - description="A simple workflow that returns the answer to a question", -) -async def agenta_agent( - question: str, -): - try: - outputs = await Runner.run(triage_agent, question) - return outputs.final_output - except InputGuardrailTripwireTriggered as e: - return "I'm sorry, I can't answer that question." - - -@evaluator( - slug="my_random_evaluator", - # - name="my_random_evaluator", - description="A simple evaluator that returns a random score", -) -async def my_random_evaluator(question: str, outputs: str): - # inputs: dict = request.data.inputs # type:ignore - score = random.randint(0, 100) - _outputs = { - "myscore": score, - "success": score > 30, - } - - return _outputs - - -@evaluator( - slug="guardrail_span_evaluator", - # - name="guardrail_span_evaluator", - description="Evaluates if the agent's guardrail logic was correctly triggered by inspecting the trace for the 'is_agenta_question' flag.", -) -async def guardrail_span_evaluator(question: str, guardrail: bool, trace): - # Flexibly search: Guardrail check -> response -> is_agenta_question - def find_span_by_name(obj, name: str): - if isinstance(obj, dict): - if obj.get("span_name") == name: - return obj - for value in obj.values(): - found = find_span_by_name(value, name) - if found is not None: - return found - elif isinstance(obj, list): - for item in obj: - found = find_span_by_name(item, name) - if found is not None: - return found - return None - - def find_value_by_key(obj, key: str): - if isinstance(obj, dict): - if key in obj: - return obj[key] - for value in obj.values(): - found = find_value_by_key(value, key) - if found is not None: - return found - elif isinstance(obj, list): - for item in obj: - found = find_value_by_key(item, key) - if found is not None: - return found - return None - - guardrail_span = find_span_by_name(trace, "Guardrail check") - response_span = ( - find_span_by_name(guardrail_span, "response") if guardrail_span else None - ) - detected_is_agenta = ( - find_value_by_key(response_span, "is_agenta_question") - if response_span - else None - ) - - expected_is_agenta = not bool(guardrail) - success = ( - detected_is_agenta is not None - and bool(detected_is_agenta) == expected_is_agenta - ) - - return { - "success": success, - "score": 1 if success else 0, - } - - -my_llm_as_a_judge_evaluator = builtin.auto_ai_critique( - slug="my_llm_as_a_judge_evaluator", - # - name="my_llm_as_a_judge_evaluator", - description="Use an LLM to judge if the previous answer meets the rubric criteria", - # - correct_answer_key="rubic", - model="gpt-4o-mini", - prompt_template=[ - { - "role": "system", - "content": "You are an expert evaluator that judges answers based on given rubric criteria.", - }, - { - "role": "user", - "content": ( - "Question: {{question}}\n" - "Rubric criteria: {{rubic}}\n" - "Answer provided: {{outputs}}\n\n" - "Evaluate if the answer meets the rubric criteria. Answer with a decimal 'score' from 0.0 to 1.0. " - "Nothing else, just a number, no boilerplate, nothing, JUST A FLOAT" - ), - }, - ], -) - - -async def run_evaluation(): - my_testset = await ag.testsets.aupsert( - name="Agenta Questions", - # - data=my_testcases_data, - ) - - if not my_testset or not my_testset.id: - print("Failed to create or update testset") - return None - - eval = await aevaluate( - testsets=[ - my_testset.id, - ], - applications=[ - agenta_agent, - ], - evaluators=[ - my_random_evaluator, - guardrail_span_evaluator, - my_llm_as_a_judge_evaluator, - ], - ) - - return eval - - -async def main(): - eval_data = await run_evaluation() - - if not eval_data: - exit(1) - - # await display(eval_data) - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/api/ee/tests/manual/evaluations/sdk/test_openai_agent_evaluator.py b/api/ee/tests/manual/evaluations/sdk/test_openai_agent_evaluator.py deleted file mode 100644 index 2900bf2982..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_openai_agent_evaluator.py +++ /dev/null @@ -1,323 +0,0 @@ -# /// script -# dependencies = ["openai-agents", "litellm"] -# /// -from dotenv import load_dotenv - -load_dotenv() - -from agents import Runner -import asyncio -import json -from typing import Optional, Dict, Any, List -from uuid import uuid4 -from agents.exceptions import InputGuardrailTripwireTriggered - -from pydantic import BaseModel, Field -from litellm import acompletion - -import agenta as ag - -ag.init() - -from agenta.sdk.evaluations import aevaluate, display - -from agenta.sdk.models.workflows import ( - ApplicationRevision, - ApplicationServiceRequest, - EvaluatorRevision, - EvaluatorServiceRequest, -) - -from openai_agent import triage_agent - - -class EvaluationOutput(BaseModel): - score: int = Field(..., ge=0, le=5, description="Score between 0-5") - reasoning: str = Field(..., description="Detailed reasoning for the score") - - -async def llm_judge( - prompt: str, - inputs: Dict[str, Any], - outputs: Any, - input_keys: Optional[List[str]] = None, - output_key: Optional[str] = None, - model: str = "gpt-4o-mini", - temperature: float = 0.1, - json_schema: Optional[BaseModel] = None, - max_tokens: int = 500, -) -> Dict[str, Any]: - """ - Generic LLM judge function for evaluations. - - Args: - prompt: The evaluation prompt template (without variables) - inputs: Input data dictionary - outputs: Output data from the trace - input_keys: List of input keys to include in the prompt. If None, includes all - output_key: Key from outputs to include. If None, includes the entire outputs - model: LLM model to use (default: gpt-4o-mini) - temperature: Temperature for LLM generation (default: 0.1) - json_schema: Pydantic model for structured output (default: EvaluationOutput) - max_tokens: Maximum tokens for response (default: 500) - - Returns: - Dictionary containing the evaluation results - """ - # Use default schema if none provided - if json_schema is None: - json_schema = EvaluationOutput - - # Build the dynamic variables section - variables_section = [] - - # Add input variables - if input_keys is None: - # Include all inputs - for key, value in inputs.items(): - variables_section.append(f"{key}: {value}") - else: - # Include only specified input keys - for key in input_keys: - if key in inputs: - variables_section.append(f"{key}: {inputs[key]}") - - # Add output variable - if output_key is not None and isinstance(outputs, dict): - variables_section.append(f"{output_key}: {outputs.get(output_key, '')}") - else: - variables_section.append( - f"output: {outputs if not isinstance(outputs, dict) else str(outputs)}" - ) - - # Combine prompt with dynamic variables - full_prompt = prompt + "\n\n" + "\n".join(variables_section) - - try: - # Call OpenAI via LiteLLM with structured output - response = await acompletion( - model=model, - messages=[ - { - "role": "system", - "content": "You are an expert evaluator. Always provide fair and detailed evaluations based on the given criteria.", - }, - {"role": "user", "content": full_prompt}, - ], - response_format=json_schema, - temperature=temperature, - max_tokens=max_tokens, - ) - - # Extract the structured response - evaluation = response.choices[0].message.content - evaluation = json.loads(evaluation) - - # Convert to dictionary and add success field - outputs = evaluation.dict() if hasattr(evaluation, "dict") else evaluation - if "score" in outputs: - outputs["success"] = outputs["score"] >= 3 # Consider score >= 3 as success - - return outputs - - except Exception as e: - # Fallback if LLM call fails - return { - "score": 0, - "reasoning": f"LLM evaluation failed: {str(e)}", - "success": False, - } - - -def create_llm_evaluator( - prompt: str, - input_keys: Optional[List[str]] = None, - output_key: Optional[str] = None, - model: str = "gpt-4o-mini", - temperature: float = 0.1, - json_schema: Optional[BaseModel] = None, - max_tokens: int = 500, - *, - name: Optional[str] = None, -): - """ - Factory function to create LLM evaluator functions with different configurations. - - Args: - prompt: The evaluation prompt template (static, without variables) - input_keys: List of input keys to include. If None, includes all - output_key: Key from outputs to include. If None, includes entire outputs - model: LLM model to use - temperature: Temperature for LLM generation - json_schema: Pydantic model for structured output - max_tokens: Maximum tokens for response - - Returns: - An evaluator function that can be used in run_evaluation - """ - - async def evaluator( - request: EvaluatorServiceRequest, - inputs: Dict[str, Any], - outputs: Dict[str, Any], - **kwargs, - ): - return await llm_judge( - prompt=prompt, - inputs=inputs, - outputs=outputs, - input_keys=input_keys, - output_key=output_key, - model=model, - temperature=temperature, - json_schema=json_schema, - max_tokens=max_tokens, - ) - - # Ensure unique function identity for handler registry - unique_name = name or f"llm_evaluator_{uuid4().hex[:8]}" - try: - evaluator.__name__ = unique_name # type: ignore[attr-defined] - evaluator.__qualname__ = unique_name # type: ignore[attr-defined] - except Exception: - pass - - return evaluator - - -my_testcases_data = [ - { - "question": "What is agenta?", - "rubic": "The answer should mention llmops platform and open-source", - }, - { - "question": "How much does agenta cost?", - "rubic": "The answer should mention the three pricing tiers, the cost in usd, how much traces costs, retention periods, features, and the free tier", - }, - { - "question": "How do I use azure in Agenta?", - "rubic": "The answer should mention the azure provider and the steps to set it up in the model hub", - }, - { - "question": "What is the meaning of life?", - "rubic": "The agent should refuse to answer", - }, -] - - -async def agenta_agent( - request: ApplicationServiceRequest, - inputs: Dict[str, Any], - **kwargs, -): - try: - outputs = await Runner.run(triage_agent, inputs.get("question")) - return outputs.final_output - except InputGuardrailTripwireTriggered as e: - return "I'm sorry, I can't answer that question." - - -async def llm_as_a_judge( - request: EvaluatorServiceRequest, - inputs: Dict[str, Any], - outputs: Dict[str, Any], - **kwargs, -): - # Define the evaluation prompt template (static, without variables) - prompt = """You are an expert evaluator. Please evaluate the following answer based on the given rubric. - -Please provide a score from 0-5 and detailed reasoning for your evaluation. The score should reflect how well the answer meets the criteria specified in the rubric. - -Score guidelines: -- 0: Incorrect. the rubic is not met at all. -- 1: Mostly incorrect with minimal relevance -- 2: Partially correct but missing key elements -- 3: Generally correct but could be more complete -- 4: Good answer with minor omissions -- 5: Excellent answer that fully meets the rubric criteria""" - - # Use the reusable LLM judge function - return await llm_judge( - prompt=prompt, - inputs=inputs, - outputs=outputs, - input_keys=["question", "rubic"], - output_key="output", - ) - - -async def run_evaluation(): - # Define evaluation prompts - rubric_evaluation_prompt = """You are an expert evaluator. Please evaluate the following answer based on the given rubric. - -Please provide a score from 0-5 and detailed reasoning for your evaluation. The score should reflect how well the answer meets the criteria specified in the rubric. - -Score guidelines: -- 0: Incorrect. the rubic is not met at all. -- 1: Mostly incorrect with minimal relevance -- 2: Partially correct but missing key elements -- 3: Generally correct but could be more complete -- 4: Good answer with minor omissions -- 5: Excellent answer that fully meets the rubric criteria""" - - length_evaluation_prompt = """You are an expert evaluator. Please evaluate the length of the following answer. - -Please provide a score from 0-5 and detailed reasoning for your evaluation. The score should reflect how appropriate the length is for a chatbot response. - -Score guidelines: -- 0: Extremely long (multiple paragraphs, verbose) -- 1: Too long (more than 2-3 sentences, unnecessarily detailed) -- 2: Somewhat long (could be more concise) -- 3: Appropriate length (1-2 sentences, concise but complete) -- 4: Good length (brief but informative) -- 5: Perfect length (concise, clear, and to the point) - -The ideal chatbot response should be concise, clear, and typically no more than 1-2 sentences unless the question requires more detail.""" - - my_testset = await ag.testsets.aupsert( - name="Capitals", - # - data=my_testcases_data, - ) - - specs = dict( - testsets=[ - my_testset.id, - ], - applications=[ - agenta_agent, - ], - evaluators=[ - # Rubric evaluation - create_llm_evaluator( - prompt=rubric_evaluation_prompt, - input_keys=["question", "rubic"], - output_key="output", - name="rubric_evaluator", - ), - # Length evaluation (checks if answers are appropriately concise) - create_llm_evaluator( - prompt=length_evaluation_prompt, - input_keys=[], # Only evaluate the output length - output_key="output", # Evaluate the chatbot's output - name="length_evaluator", - ), - ], - ) - - eval = await aevaluate(**specs) - - return eval - - -async def main(): - eval_data = await run_evaluation() - - if not eval_data: - exit(1) - - # await display(eval_data) - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/api/ee/tests/manual/evaluations/sdk/test_serve.py b/api/ee/tests/manual/evaluations/sdk/test_serve.py deleted file mode 100644 index 35047a36ae..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/test_serve.py +++ /dev/null @@ -1,692 +0,0 @@ -from typing import Optional -import os - -from dotenv import load_dotenv - -load_dotenv() - -from fastapi import FastAPI - -os.environ["AGENTA_SERVICE_MIDDLEWARE_AUTH_ENABLED"] = "false" - -import agenta as ag - -ag.init( - api_url="http://localhost", - api_key="...", -) - - -from agenta.sdk.models.workflows import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, -) -from agenta.sdk.decorators.routing import ( - route, - default_app, - create_app, -) -from agenta.sdk.decorators.running import ( - WorkflowServiceRequest, - workflow, -) -from agenta.sdk.decorators.tracing import ( - instrument, -) - -from agenta.sdk.workflows import builtin - -from agenta.sdk.workflows.utils import HANDLER_REGISTRY - -custom_app = create_app() - -public_app = FastAPI() - -public_app.mount("/services", app=default_app) - -app = public_app - - -@route("/tokens-async", app=default_app) -async def async_gen(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 3)): - yield {"async_token": chr(97 + i)} - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-async/invoke -""" - -""" -curl -i -N \ - -H "Accept: text/event-stream" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-async/invoke -""" - - -@route("/tokens-sync", app=default_app) -def sync_tokens(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 2)): - yield {"async_token": chr(120 + i)} - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-sync/invoke -""" - -""" -curl -i -N \ - -H "Accept: text/event-stream" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-sync/invoke -""" - - -@route("/tokens-batch", app=default_app) -@workflow(aggregate=True) -def batch_tokens(request: WorkflowServiceRequest): - for i in range((request.data.inputs or {}).get("count", 2)): - yield {"token": chr(ord("A") + i)} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"prompt": "hello"}}}' \ - http://127.0.0.1:8000/services/tokens-batch/invoke -""" - - -@route("/greet-async", app=default_app) -async def greet(request: WorkflowServiceRequest): - name = (request.data.inputs or {}).get("name", "world") - return {"message": f"Hello, {name}!"} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"name": "Agenta"}}}' \ - http://127.0.0.1:8000/services/greet-async/invoke -""" - - -@route("/echo-sync", app=default_app) -def echo(request: WorkflowServiceRequest): - return {"echo": request.data.inputs} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/echo-sync/invoke -""" - - -@route("/already-batch", app=default_app) -def already_batch(request: WorkflowServiceRequest): - return WorkflowServiceBatchResponse( - data=WorkflowServiceResponseData(outputs={"ready": True}) - ) - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/already-batch/invoke -""" - - -@route("/already-stream", app=default_app) -def already_stream(request: WorkflowServiceRequest): - async def iterator(): - yield {"ready": "no"} - yield {"ready": "go"} - - return WorkflowServiceStreamResponse(generator=iterator) - - -""" -curl -i -N \ - -H "Accept: application/json" \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/already-stream/invoke -""" - - -@route("/kwargs", app=default_app) -def kwargs_handler(**kwargs): - return {"got": sorted(kwargs.keys())} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/kwargs/invoke -""" - - -@route("/unknown", app=default_app) -def unknown_handler(unknown: str): - return {"got": unknown} - - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/unknown/invoke -""" - - -@route("/echo_custom", app=default_app) -def echo_custom(aloha: str): - return {"got": aloha} - - -""" -curl -i http://127.0.0.1:8000/services/echo_custom/inspect -""" - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/echo_custom/invoke -""" - - -echo_manual = workflow(uri="echo")() - -route("/echo_manual", app=default_app)(echo_manual) - -builtin_echo = builtin.echo() - -route("/echo", app=default_app)(builtin_echo) - - -""" -curl -i http://127.0.0.1:8000/services/echo/inspect -""" - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"inputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/echo/invoke -""" - -route("/auto_exact_match", app=default_app)(builtin.auto_exact_match()) - - -""" -curl -i http://127.0.0.1:8000/services/auto_exact_match/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_exact_match/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_exact_match/invoke -""" - -route("/auto_regex_test", app=default_app)( - builtin.auto_regex_test( - regex_pattern="^ma.*o$", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_regex_test/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"regex_pattern": "^ma.*o$"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_regex_test/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"regex_pattern": "^ma.*o$"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_regex_test/invoke -""" - -route("/field_match_test", app=default_app)( - builtin.field_match_test( - json_field="answer", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/field_match_test/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"json_field": "answer", "correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": {"answer": "mahalo"}}}' \ - http://127.0.0.1:8000/services/field_match_test/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"json_field": "answer", "correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": {"answer": "mahala"}}}' \ - http://127.0.0.1:8000/services/field_match_test/invoke -""" - - -@public_app.post("/my_webhook") -async def my_webhook( - inputs: Optional[dict] = None, - output: Optional[str] = None, - correct_answer: Optional[str] = None, -): - return {"score": 1 if output == correct_answer else 0} - - -""" curl on http://127.0.0.1:8000/my_webhook -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"inputs": {"correct_answer": "mahalo"}, "output": "mahalo", "correct_answer": "mahalo"}' \ - http://127.0.0.1:8000/my_webhook -""" - -route("/auto_webhook_test", app=default_app)( - builtin.auto_webhook_test( - webhook_url="http://127.0.0.1:8000/my_webhook", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_webhook_test/inspect -""" - - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer", "webhook_url": "http://127.0.0.1:8000/my_webhook"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_webhook_test/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer", "webhook_url": "http://127.0.0.1:8000/my_webhook"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_webhook_test/invoke -""" - -route("/auto_custom_code_run", app=default_app)( - builtin.auto_custom_code_run( - code="evaluate = lambda app_params, inputs, output, correct_answer: 1.0 if output in correct_answer else 0.0", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_custom_code_run/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer", "code": "evaluate = lambda app_params, inputs, output, correct_answer: 1.0 if output in correct_answer else 0.0"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_custom_code_run/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer", "code": "evaluate = lambda app_params, inputs, output, correct_answer: 1.0 if output in correct_answer else 0.0"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_custom_code_run/invoke -""" - -route("/auto_ai_critique", app=default_app)( - builtin.auto_ai_critique( - prompt_template=[ - { - "role": "system", - "content": "You are an evaluator grading an LLM App.\nYou will be given INPUTS, the LLM APP OUTPUT, the CORRECT ANSWER used in the LLM APP.\n<grade_criteria>\n- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER\n</grade_criteria>\n\n<score_criteria>\n-The score should be between 0 and 1\n-A score of 1 means that the answer is perfect. This is the highest (best) score.\nA score of 0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n</score_criteria>\n\n<output_format>\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n</output_format>", - }, - { - "role": "user", - "content": "<correct_answer>{{correct_answer}}</correct_answer>\n<llm_app_output>{{prediction}}</llm_app_output>", - }, - ] - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_ai_critique/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":1,0,"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -H "Authorization: ApiKey ZKoZDbEr.856b25f9d620e3a5b090d2eb0db92b9c915b4551f404c092d076e0dab9268a31" \ - -d '{ - "data": { - "inputs": { - "country": "Germany", - "correct_answer": "Berlin" - }, - "outputs": "Berlin", - "parameters": { - "correct_answer_key": "correct_answer", - "prompt_template": [ - { - "role": "system", - "content": "You are an evaluator grading an LLM App.\nYou will be given INPUTS, the LLM APP OUTPUT, the CORRECT ANSWER used in the LLM APP.\n<grade_criteria>\n- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER\n</grade_criteria>\n\n<score_criteria>\n-The score should be between 0 and 1\n-A score of 1 means that the answer is perfect. This is the highest (best) score.\nA score of 0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n</score_criteria>\n\n<output_format>\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n</output_format>" - }, - { - "role": "user", - "content": "<correct_answer>{{correct_answer}}</correct_answer>\n<llm_app_output>{{prediction}}</llm_app_output>" - } - ] - } - } - }' \ - http://127.0.0.1:8000/services/auto_ai_critique/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":0.0,"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -H "Authorization: ApiKey ZKoZDbEr.856b25f9d620e3a5b090d2eb0db92b9c915b4551f404c092d076e0dab9268a31" \ - -d '{ - "data": { - "inputs": { - "country": "Germany", - "correct_answer": "Berlin" - }, - "outputs": "Kyoto", - "parameters": { - "correct_answer_key": "correct_answer", - "prompt_template": [ - { - "role": "system", - "content": "You are an evaluator grading an LLM App.\nYou will be given INPUTS, the LLM APP OUTPUT, the CORRECT ANSWER used in the LLM APP.\n<grade_criteria>\n- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER\n</grade_criteria>\n\n<score_criteria>\n-The score should be between 0 and 1\n-A score of 1 means that the answer is perfect. This is the highest (best) score.\nA score of 0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n</score_criteria>\n\n<output_format>\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n</output_format>" - }, - { - "role": "user", - "content": "<correct_answer>{{correct_answer}}</correct_answer>\n<llm_app_output>{{prediction}}</llm_app_output>" - } - ] - } - } - }' \ - http://127.0.0.1:8000/services/auto_ai_critique/invoke -""" - -route("/auto_starts_with", app=default_app)( - builtin.auto_starts_with( - prefix="ma", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_starts_with/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"prefix": "ma"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_starts_with/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"prefix": "ma"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mohalo"}}' \ - http://127.0.0.1:8000/services/auto_starts_with/invoke -""" - -route("/auto_ends_with", app=default_app)( - builtin.auto_ends_with( - suffix="lo", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_ends_with/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"suffix": "lo"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_ends_with/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"suffix": "lo"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_ends_with/invoke -""" - -route("/auto_contains", app=default_app)( - builtin.auto_contains( - substring="ha", - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_contains/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substring": "mahalo"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_contains/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substring": "mahalo"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_contains/invoke -""" - -route("/auto_contains_any", app=default_app)( - builtin.auto_contains_any( - substrings=["maha", "lo"], - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_contains_any/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substrings": ["maha","lo"]}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_contains_any/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substrings": ["moha","lo"]}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_contains_any/invoke -""" - -route("/auto_contains_all", app=default_app)( - builtin.auto_contains_all( - substrings=["maha", "lo"], - ) -) - -""" -curl -i http://127.0.0.1:8000/services/auto_contains_all/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substrings": ["maha","lo"]}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_contains_all/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"substrings": ["maha","lo"]}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahala"}}' \ - http://127.0.0.1:8000/services/auto_contains_all/invoke -""" - -route("/auto_contains_json", app=default_app)(builtin.auto_contains_json()) - -""" -curl -i http://127.0.0.1:8000/services/auto_contains_json/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"outputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/auto_contains_json/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_contains_json/invoke -""" - -route("/auto_json_diff", app=default_app)(builtin.auto_json_diff()) - -""" -curl -i http://127.0.0.1:8000/services/auto_json_diff/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":1.0,"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": {"aloha": "mahalo"}}, "outputs": {"aloha": "mahalo"}}}' \ - http://127.0.0.1:8000/services/auto_json_diff/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":1.0,"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": {"aloha": "mahalo"}}, "outputs": {"mahalo": "aloha"}}}' \ - http://127.0.0.1:8000/services/auto_json_diff/invoke -""" - -route("/auto_levenshtein_distance", app=default_app)( - builtin.auto_levenshtein_distance() -) - -""" -curl -i http://127.0.0.1:8000/services/auto_levenshtein_distance/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":1.0,"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_levenshtein_distance/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":0.166,"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "aloha"}}' \ - http://127.0.0.1:8000/services/auto_levenshtein_distance/invoke -""" - -route("/auto_similarity_match", app=default_app)(builtin.auto_similarity_match()) - -""" -curl -i http://127.0.0.1:8000/services/auto_similarity_match/inspect -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":1.0,"success":true}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "mahalo"}}' \ - http://127.0.0.1:8000/services/auto_similarity_match/invoke -""" - -""" {"version":"2025.07.14","data":{"outputs":{"score":0.462,"success":false}}} -curl -i -N \ - -H "Content-Type: application/json" \ - -d '{"data": {"parameters": {"correct_answer_key": "correct_answer"}, "inputs": {"correct_answer": "mahalo"}, "outputs": "aloooha"}}' \ - http://127.0.0.1:8000/services/auto_similarity_match/invoke -""" - -route("/auto_semantic_similarity", app=default_app)(builtin.auto_semantic_similarity()) - -""" -curl -i http://127.0.0.1:8000/services/auto_semantic_similarity/inspect -""" - - -route("/completion", app=default_app)( - builtin.completion( - config=builtin.SinglePromptConfig(), - ) -) - -""" -curl -i http://127.0.0.1:8000/services/completion/inspect -""" - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -H "Authorization: ApiKey ZKoZDbEr.856b25f9d620e3a5b090d2eb0db92b9c915b4551f404c092d076e0dab9268a31" \ - -d '{"data": {"inputs": {"country": "Germany"}, "parameters": {"prompt": {"messages": [{"role": "assistant", "content": "What's the capital of {{country}}?"}]}}}}' \ - http://127.0.0.1:8000/services/completion/invoke -""" - - -route("/chat", app=default_app)( - builtin.chat( - config=builtin.SinglePromptConfig(), - ) -) - -""" -curl -i http://127.0.0.1:8000/services/chat/inspect -""" - -""" -curl -i -N \ - -H "Content-Type: application/json" \ - -H "Authorization: ApiKey ZKoZDbEr.856b25f9d620e3a5b090d2eb0db92b9c915b4551f404c092d076e0dab9268a31" \ - -d '{"data": {"inputs": {"country": "Germany"}, "parameters": {"prompt": {"messages": [{"role": "user", "content": "Hello, world!"}]}}}}' \ - http://127.0.0.1:8000/services/chat/invoke -""" diff --git a/api/ee/tests/manual/evaluations/sdk/testset-management.ipynb b/api/ee/tests/manual/evaluations/sdk/testset-management.ipynb deleted file mode 100644 index e121df8f7e..0000000000 --- a/api/ee/tests/manual/evaluations/sdk/testset-management.ipynb +++ /dev/null @@ -1,543 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "7b9164c8", - "metadata": {}, - "source": [ - "# Managing Testsets with Agenta SDK\n", - "\n", - "This notebook demonstrates how to create, list, and retrieve testsets using the Agenta SDK for evaluation purposes.\n" - ] - }, - { - "cell_type": "markdown", - "id": "2430bced", - "metadata": {}, - "source": [ - "## Initialize Agenta\n", - "\n", - "First, let's set up the Agenta client with your API credentials:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d102b221", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2025-10-23T16:46:06.701Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - SDK version: 0.51.2 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-10-23T16:46:06.702Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - Host: http://144.76.237.122 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-10-23T16:46:06.702Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - OLTP URL: http://144.76.237.122/api/otlp/v1/traces \u001b[38;5;245m[agenta.sdk.tracing.tracing]\u001b[0m \n" - ] - } - ], - "source": [ - "import os\n", - "\n", - "os.environ[\"AGENTA_API_KEY\"] = \"\"\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai/api\"\n", - "\n", - "import agenta as ag\n", - "from getpass import getpass\n", - "\n", - "# Get API key from environment or prompt user\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " os.environ[\"AGENTA_API_KEY\"] = getpass(\"Enter your Agenta API key: \")\n", - "\n", - "# Initialize the Agenta client\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "id": "60a6619e", - "metadata": {}, - "source": [ - "## Setup\n", - "\n", - "First, let's import the necessary functions from our entities module:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d226403f", - "metadata": {}, - "outputs": [], - "source": [ - "from uuid import UUID" - ] - }, - { - "cell_type": "markdown", - "id": "ceec8441", - "metadata": {}, - "source": [ - "## Creating a Testset\n", - "\n", - "Let's create a testset with some sample data about countries and their capitals:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e2b89655", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "✅ Created testset with ID: 019a11f7-b329-7d50-a256-395834f4864c\n", - " Name: Country Capitals\n", - " Slug: 395834f4864c\n", - " Description: A testset of countries and their capitals for geography evaluation\n" - ] - } - ], - "source": [ - "# Create a testset with simple data\n", - "testset = await ag.testsets.acreate(\n", - " data=[\n", - " {\"country\": \"Germany\", \"capital\": \"Berlin\"},\n", - " {\"country\": \"France\", \"capital\": \"Paris\"},\n", - " {\"country\": \"Spain\", \"capital\": \"Madrid\"},\n", - " {\"country\": \"Italy\", \"capital\": \"Rome\"},\n", - " {\"country\": \"Japan\", \"capital\": \"Tokyo\"},\n", - " ],\n", - " name=\"Country Capitals\",\n", - " description=\"A testset of countries and their capitals for geography evaluation\",\n", - ")\n", - "\n", - "print(f\"✅ Created testset with ID: {testset.id}\")\n", - "print(f\" Name: {testset.name}\")\n", - "print(f\" Slug: {testset.slug}\")\n", - "print(f\" Description: {testset.description}\")\n", - "\n", - "# Save the ID for later use\n", - "testset_id = testset.id" - ] - }, - { - "cell_type": "markdown", - "id": "852d13a8", - "metadata": {}, - "source": [ - "**Expected Output:**\n", - "```\n", - "✅ Created testset with ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n", - " Name: Country Capitals\n", - " Slug: 3ad5d688da6c\n", - " Description: A testset of countries and their capitals for geography evaluation\n", - "```\n", - "\n", - "The `create_testset` function returns a `SimpleTestset` object with the following fields:\n", - "- `id`: Unique UUID for the testset\n", - "- `name`: The name you provided\n", - "- `slug`: A shortened identifier\n", - "- `description`: Your description\n", - "- `data`: The test data in a structured format\n" - ] - }, - { - "cell_type": "markdown", - "id": "ac02ab05", - "metadata": {}, - "source": [ - "## Listing All Testsets\n", - "\n", - "Now let's retrieve all testsets in our project:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b52e8ae2", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "📋 Found 12 testset(s):\n", - "============================================================\n", - "\n", - " 📦 completion_testset\n", - " ID: 0199bec6-b13c-7ea2-999e-8bc9432f5ee0\n", - " Slug: 8bc9432f5ee0\n", - "\n", - " 📦 Agenta Questions\n", - " ID: 0199ca28-8f74-7d52-8b9f-11a58ea131c7\n", - " Slug: 11a58ea131c7\n", - "\n", - " 📦 Agenta Questions\n", - " ID: 0199ec05-dcea-7c02-bb46-cde0731b3da5\n", - " Slug: cde0731b3da5\n", - "\n", - " 📦 Capitals\n", - " ID: 0199ec08-48f8-7cc1-9850-c47d631c7f05\n", - " Slug: c47d631c7f05\n", - "\n", - " 📦 Capitals\n", - " ID: 0199ec0a-2c1c-7be1-bcdb-8599afb38b8e\n", - " Slug: 8599afb38b8e\n", - "\n", - " 📦 Agenta Questions\n", - " ID: 0199ec27-a638-7762-987d-37fa94b0bf83\n", - " Slug: 37fa94b0bf83\n", - "\n", - " 📦 chat-testing\n", - " ID: 019a0cfc-0452-76c2-b0c8-98ab72c444c0\n", - " Slug: 98ab72c444c0\n", - "\n", - " 📦 Capitals\n", - " ID: 019a113e-5412-7822-8dce-7f329ba484a4\n", - " Slug: 7f329ba484a4\n", - "\n", - " 📦 Country Capitals\n", - " ID: 019a11d8-4a06-7d72-8814-b4d9ad81f547\n", - " Slug: b4d9ad81f547\n", - "\n", - " 📦 Country Capitals\n", - " ID: 019a11f2-fbe2-76d1-8d28-7bae8983edcc\n", - " Slug: 7bae8983edcc\n", - "\n", - " 📦 Country Capitals\n", - " ID: 019a11f5-002b-73c1-9042-e4c448a0d9e0\n", - " Slug: e4c448a0d9e0\n", - "\n", - " 📦 Country Capitals\n", - " ID: 019a11f7-b329-7d50-a256-395834f4864c\n", - " Slug: 395834f4864c\n" - ] - } - ], - "source": [ - "# List all testsets\n", - "testsets = await ag.testsets.alist()\n", - "\n", - "print(f\"\\n📋 Found {len(testsets)} testset(s):\")\n", - "print(\"=\" * 60)\n", - "\n", - "for ts in testsets:\n", - " print(f\"\\n 📦 {ts.name}\")\n", - " print(f\" ID: {ts.id}\")\n", - " print(f\" Slug: {ts.slug}\")" - ] - }, - { - "cell_type": "markdown", - "id": "1640d671", - "metadata": {}, - "source": [ - "**Expected Output:**\n", - "```\n", - "📋 Found 3 testset(s):\n", - "============================================================\n", - "\n", - " 📦 Country Capitals\n", - " ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n", - " Slug: country-capitals\n", - "\n", - " 📦 Math Problems\n", - " ID: 01963520-4e4a-8761-91df-4be6e799eb7d\n", - " Slug: math-problems\n", - "```\n" - ] - }, - { - "cell_type": "markdown", - "id": "0cdcd188", - "metadata": {}, - "source": [ - "## Retrieving a Testset by ID\n", - "\n", - "Let's retrieve a specific testset using its ID:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "752d9ad6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "✅ Retrieved testset: 019a11f7-b329-7d50-a256-395834f4864c\n", - " Testset ID: 019a11f7-b329-7d50-a256-395834f4864c\n", - " Slug: 395834f4864c\n", - " Version: 1\n", - "\n", - " 📊 Contains 5 testcase(s)\n", - "\n", - " Sample testcases:\n", - " 1. {'capital': 'Berlin', 'country': 'Germany'}\n", - " 2. {'capital': 'Paris', 'country': 'France'}\n", - " 3. {'capital': 'Madrid', 'country': 'Spain'}\n" - ] - } - ], - "source": [ - "# Retrieve the testset we just created\n", - "retrieved_testset = await ag.testsets.aretrieve(testset_id=testset_id)\n", - "\n", - "if retrieved_testset:\n", - " print(f\"\\n✅ Retrieved testset: {retrieved_testset.id}\")\n", - " print(f\" Testset ID: {retrieved_testset.testset_id}\")\n", - " print(f\" Slug: {retrieved_testset.slug}\")\n", - " print(f\" Version: {retrieved_testset.version}\")\n", - "\n", - " # Access the testcases\n", - " if retrieved_testset.data and retrieved_testset.data.testcases:\n", - " print(f\"\\n 📊 Contains {len(retrieved_testset.data.testcases)} testcase(s)\")\n", - " print(\"\\n Sample testcases:\")\n", - " for i, testcase in enumerate(retrieved_testset.data.testcases[:3], 1):\n", - " print(f\" {i}. {testcase.data}\")\n", - "else:\n", - " print(\"❌ Testset not found\")" - ] - }, - { - "cell_type": "markdown", - "id": "a78f38ba", - "metadata": {}, - "source": [ - "**Expected Output:**\n", - "```\n", - "✅ Retrieved testset: 01963413-3d39-7650-80ce-3ad5d688da6c\n", - " Testset ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n", - " Slug: country-capitals\n", - " Version: 1\n", - "\n", - " 📊 Contains 5 testcase(s)\n", - "\n", - " Sample testcases:\n", - " 1. {'country': 'Germany', 'capital': 'Berlin'}\n", - " 2. {'country': 'France', 'capital': 'Paris'}\n", - " 3. {'country': 'Spain', 'capital': 'Madrid'}\n", - "```\n" - ] - }, - { - "cell_type": "markdown", - "id": "19e8dc07", - "metadata": {}, - "source": [ - "## Retrieving a Testset by Name\n", - "\n", - "You can find a testset by name by filtering the results from `get_testsets`:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "71ea54d7", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "🔍 Found testset by name: 'Country Capitals'\n", - " ID: 019a11d8-4a06-7d72-8814-b4d9ad81f547\n", - " Slug: b4d9ad81f547\n" - ] - } - ], - "source": [ - "async def get_testset_by_name(name: str):\n", - " \"\"\"Helper function to find a testset by name.\"\"\"\n", - " testsets = await ag.testsets.alist()\n", - "\n", - " if not testsets:\n", - " return None\n", - "\n", - " for testset in testsets:\n", - " if testset.name == name:\n", - " return testset\n", - "\n", - " return None\n", - "\n", - "\n", - "# Usage example\n", - "found_testset = await get_testset_by_name(\"Country Capitals\")\n", - "\n", - "if found_testset:\n", - " print(f\"\\n🔍 Found testset by name: '{found_testset.name}'\")\n", - " print(f\" ID: {found_testset.id}\")\n", - " print(f\" Slug: {found_testset.slug}\")\n", - "else:\n", - " print(\"\\n❌ Testset not found\")" - ] - }, - { - "cell_type": "markdown", - "id": "f48579b0", - "metadata": {}, - "source": [ - "**Expected Output:**\n", - "```\n", - "🔍 Found testset by name: 'Country Capitals'\n", - " ID: 01963413-3d39-7650-80ce-3ad5d688da6c\n", - " Slug: country-capitals\n", - "```\n" - ] - }, - { - "cell_type": "markdown", - "id": "a8e8a8fb", - "metadata": {}, - "source": [ - "## Working with Test Data\n", - "\n", - "Once you have a testset, you can iterate through its testcases for evaluation:\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fad427d9", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "🔬 Processing testcases:\n", - "============================================================\n", - "\n", - " Testcase 1:\n", - " Input: Germany\n", - " Expected Output: Berlin\n", - "\n", - " Testcase 2:\n", - " Input: France\n", - " Expected Output: Paris\n", - "\n", - " Testcase 3:\n", - " Input: Spain\n", - " Expected Output: Madrid\n", - "\n", - " Testcase 4:\n", - " Input: Italy\n", - " Expected Output: Rome\n", - "\n", - " Testcase 5:\n", - " Input: Japan\n", - " Expected Output: Tokyo\n", - "\n", - "✅ All testcases processed\n" - ] - } - ], - "source": [ - "# Retrieve the testset\n", - "testset = await ag.testsets.aretrieve(testset_id=testset_id)\n", - "\n", - "if testset and testset.data and testset.data.testcases:\n", - " print(\"\\n🔬 Processing testcases:\")\n", - " print(\"=\" * 60)\n", - "\n", - " for i, testcase in enumerate(testset.data.testcases, 1):\n", - " country = testcase.data.get(\"country\")\n", - " capital = testcase.data.get(\"capital\")\n", - "\n", - " print(f\"\\n Testcase {i}:\")\n", - " print(f\" Input: {country}\")\n", - " print(f\" Expected Output: {capital}\")\n", - "\n", - " # In a real evaluation, you would:\n", - " # 1. Pass the input to your LLM application\n", - " # 2. Compare the output with the expected result\n", - " # 3. Score the result using an evaluator\n", - "\n", - " print(\"\\n✅ All testcases processed\")" - ] - }, - { - "cell_type": "markdown", - "id": "e30ebfe2", - "metadata": {}, - "source": [ - "**Expected Output:**\n", - "```\n", - "🔬 Processing testcases:\n", - "============================================================\n", - "\n", - " Testcase 1:\n", - " Input: Germany\n", - " Expected Output: Berlin\n", - "\n", - " Testcase 2:\n", - " Input: France\n", - " Expected Output: Paris\n", - "\n", - " Testcase 3:\n", - " Input: Spain\n", - " Expected Output: Madrid\n", - "...\n", - "\n", - "✅ All testcases processed\n", - "```\n" - ] - }, - { - "cell_type": "markdown", - "id": "ab7a8db7", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "In this notebook, we've covered:\n", - "\n", - "1. **Creating testsets** with `ag.testsets.acreate()` - Pass simple dictionaries of test data\n", - "2. **Listing testsets** with `ag.testsets.alist()` - Get all testsets in your project\n", - "3. **Retrieving by ID** with `ag.testsets.aretrieve()` - Get a specific testset with all its data\n", - "4. **Finding by name** - Use a helper pattern to filter testsets by name\n", - "5. **Working with test data** - Iterate through testcases for evaluation\n", - "\n", - "### Next Steps\n", - "\n", - "Now that you can manage testsets, you can:\n", - "- Configure evaluators to assess your application outputs\n", - "- Run evaluations using these testsets\n", - "- Analyze evaluation results to improve your LLM application\n", - "\n", - "Check out the other notebooks in this series to learn more about the complete evaluation workflow!\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/api/oss/tests/manual/evaluators/human-evaluator.http b/api/ee/tests/manual/evaluators/human-evaluator.http similarity index 100% rename from api/oss/tests/manual/evaluators/human-evaluator.http rename to api/ee/tests/manual/evaluators/human-evaluator.http diff --git a/api/ee/tests/requirements.txt b/api/ee/tests/requirements.txt deleted file mode 100644 index 510e3b3b6f..0000000000 --- a/api/ee/tests/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --r ../../oss/tests/requirements.txt \ No newline at end of file diff --git a/api/entrypoint.py b/api/entrypoint.py index 36b37b699c..73a13a3458 100644 --- a/api/entrypoint.py +++ b/api/entrypoint.py @@ -1,6 +1,6 @@ from contextlib import asynccontextmanager -from celery import Celery, signals +from celery import Celery from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from supertokens_python import get_all_cors_headers as get_all_supertokens_cors_headers @@ -8,131 +8,92 @@ get_middleware as get_supertokens_middleware, ) -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.helpers import warn_deprecated_env_vars, validate_required_env_vars - +from oss.src.routers import ( + app_router, + environment_router, + evaluators_router, + testset_router, + user_profile, + variants_router, + bases_router, + configs_router, + health_router, + permissions_router, + projects_router, + api_key_router, + organization_router, + workspace_router, + container_router, +) +from oss.src.utils.common import is_ee from oss.src.open_api import open_api_tags_metadata - from oss.databases.postgres.migrations.core.utils import ( - check_for_new_migrations as check_for_new_core_migrations, + check_for_new_migrations as check_for_new_entities_migratons, ) from oss.databases.postgres.migrations.tracing.utils import ( check_for_new_migrations as check_for_new_tracing_migrations, ) - +from oss.src.utils.helpers import warn_deprecated_env_vars, validate_required_env_vars +from oss.src.dbs.secrets.dao import SecretsDAO +from oss.src.core.secrets.services import VaultService +from oss.src.apis.fastapi.vault.router import VaultRouter from oss.src.services.auth_helper import authentication_middleware from oss.src.services.analytics_service import analytics_middleware +from oss.src.dbs.postgres.observability.dao import ObservabilityDAO +from oss.src.core.observability.service import ObservabilityService +from oss.src.apis.fastapi.observability.router import ObservabilityRouter -from oss.src.routers import evaluation_router, human_evaluation_router +from oss.src.dbs.postgres.tracing.dao import TracingDAO +from oss.src.dbs.postgres.git.dao import GitDAO +from oss.src.dbs.postgres.blobs.dao import BlobDAO -# DBEs -from oss.src.dbs.postgres.queries.dbes import ( - QueryArtifactDBE, - QueryVariantDBE, - QueryRevisionDBE, -) -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) +from oss.src.apis.fastapi.workflows.router import WorkflowsRouter +from oss.src.core.workflows.service import WorkflowsService from oss.src.dbs.postgres.workflows.dbes import ( WorkflowArtifactDBE, WorkflowVariantDBE, WorkflowRevisionDBE, ) - -# DAOs -from oss.src.dbs.postgres.secrets.dao import SecretsDAO -from oss.src.dbs.postgres.observability.dao import ObservabilityDAO -from oss.src.dbs.postgres.tracing.dao import TracingDAO -from oss.src.dbs.postgres.blobs.dao import BlobsDAO from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.dbs.postgres.evaluations.dao import EvaluationsDAO - -# Services -from oss.src.core.secrets.services import VaultService -from oss.src.core.observability.service import ObservabilityService -from oss.src.core.tracing.service import TracingService -from oss.src.core.invocations.service import InvocationsService -from oss.src.core.annotations.service import AnnotationsService -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.testsets.service import TestsetsService -from oss.src.core.testsets.service import SimpleTestsetsService -from oss.src.core.queries.service import QueriesService -from oss.src.core.queries.service import SimpleQueriesService -from oss.src.core.applications.service import LegacyApplicationsService from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService -from oss.src.core.evaluations.service import EvaluationsService -from oss.src.core.evaluations.service import SimpleEvaluationsService - -# Routers -from oss.src.apis.fastapi.vault.router import VaultRouter -from oss.src.apis.fastapi.observability.router import ObservabilityRouter -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.invocations.router import InvocationsRouter -from oss.src.apis.fastapi.annotations.router import AnnotationsRouter -from oss.src.apis.fastapi.testcases.router import TestcasesRouter -from oss.src.apis.fastapi.testsets.router import TestsetsRouter -from oss.src.apis.fastapi.testsets.router import SimpleTestsetsRouter -from oss.src.apis.fastapi.queries.router import QueriesRouter -from oss.src.apis.fastapi.queries.router import SimpleQueriesRouter -from oss.src.apis.fastapi.applications.router import LegacyApplicationsRouter from oss.src.apis.fastapi.workflows.router import WorkflowsRouter from oss.src.apis.fastapi.evaluators.router import EvaluatorsRouter -from oss.src.apis.fastapi.evaluators.router import SimpleEvaluatorsRouter -from oss.src.apis.fastapi.evaluations.router import EvaluationsRouter -from oss.src.apis.fastapi.evaluations.router import SimpleEvaluationsRouter -from oss.src.routers import ( - admin_router, - app_router, - environment_router, - evaluators_router, - testset_router, - user_profile, - variants_router, - bases_router, - configs_router, - health_router, - permissions_router, - projects_router, - api_key_router, - organization_router, - workspace_router, - container_router, -) +from oss.src.apis.fastapi.tracing.router import TracingRouter +from oss.src.core.tracing.service import TracingService -from oss.src.utils.env import env +from oss.src.apis.fastapi.annotations.router import AnnotationsRouter -import agenta as ag -ag.init( - api_url=env.AGENTA_API_URL, +from oss.src.apis.fastapi.testsets.router import TestsetsRouter +from oss.src.core.testsets.service import TestsetsService +from oss.src.dbs.postgres.testcases.dbes import TestcaseBlobDBE +from oss.src.dbs.postgres.testsets.dbes import ( + TestsetArtifactDBE, + TestsetVariantDBE, + TestsetRevisionDBE, ) -ee = None -if is_ee(): - import ee.src.main as ee # type: ignore +origins = [ + "http://localhost:3000", + "http://localhost:3001", + "http://0.0.0.0:3000", + "http://0.0.0.0:3001", + "https://docs.agenta.ai", +] -log = get_module_logger(__name__) +celery_app = Celery("agenta_app") +celery_app.config_from_object("oss.src.celery_config") -@signals.setup_logging.connect -def on_celery_setup_logging(**kwargs): - pass # effectively no-op, preventing celery from reconfiguring logging +log = get_module_logger(__name__) @asynccontextmanager -async def lifespan(*args, **kwargs): +async def lifespan(application: FastAPI, cache=True): """ Lifespan initializes the database engine and load the default llm services. @@ -141,7 +102,7 @@ async def lifespan(*args, **kwargs): cache: A boolean value that indicates whether to use the cached data or not. """ - await check_for_new_core_migrations() + await check_for_new_entities_migratons() await check_for_new_tracing_migrations() warn_deprecated_env_vars() @@ -150,239 +111,116 @@ async def lifespan(*args, **kwargs): yield -celery_app = Celery("agenta_app") - -celery_app.config_from_object("oss.src.celery_config") - -app = FastAPI( - lifespan=lifespan, - openapi_tags=open_api_tags_metadata, - root_path="/api", -) -# MIDDLEWARE ------------------------------------------------------------------- +app = FastAPI(lifespan=lifespan, openapi_tags=open_api_tags_metadata) app.middleware("http")(authentication_middleware) - app.middleware("http")(analytics_middleware) -app.add_middleware( - get_supertokens_middleware(), -) +if is_ee(): + import ee.src.main as ee + + app = ee.extend_main(app) + +app.add_middleware(get_supertokens_middleware()) +allow_headers = ["Content-Type"] + get_all_supertokens_cors_headers() app.add_middleware( CORSMiddleware, - allow_origins=[ - "http://localhost:3000", - "http://localhost:3001", - "http://0.0.0.0:3000", - "http://0.0.0.0:3001", - "https://docs.agenta.ai", - ], + allow_origins=origins, allow_origin_regex=r"https://.*\.vercel\.app", allow_credentials=True, allow_methods=["*"], - allow_headers=["Content-Type"] + get_all_supertokens_cors_headers(), -) - -if ee and is_ee(): - app = ee.extend_main(app) - -# DAOS ------------------------------------------------------------------------- - -secrets_dao = SecretsDAO() - -observability_dao = ObservabilityDAO() - -tracing_dao = TracingDAO() - -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, + allow_headers=allow_headers, ) -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) - -queries_dao = GitDAO( - ArtifactDBE=QueryArtifactDBE, - VariantDBE=QueryVariantDBE, - RevisionDBE=QueryRevisionDBE, -) - -workflows_dao = GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, -) - -evaluations_dao = EvaluationsDAO() - -# SERVICES --------------------------------------------------------------------- - -vault_service = VaultService( - secrets_dao=secrets_dao, -) - -observability_service = ObservabilityService( - observability_dao=observability_dao, -) - -tracing_service = TracingService( - tracing_dao=tracing_dao, -) - -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) - -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) - -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - -queries_service = QueriesService( - queries_dao=queries_dao, -) - -simple_queries_service = SimpleQueriesService( - queries_service=queries_service, -) - -legacy_applications_service = LegacyApplicationsService() - -workflows_service = WorkflowsService( - workflows_dao=workflows_dao, -) - -evaluators_service = EvaluatorsService( - workflows_service=workflows_service, -) - -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, +app.include_router(health_router.router, prefix="/health") +app.include_router( + permissions_router.router, prefix="/permissions", tags=["Access Control"] ) +app.include_router(projects_router.router, prefix="/projects", tags=["Scopes"]) +app.include_router(user_profile.router, prefix="/profile") +app.include_router(app_router.router, prefix="/apps", tags=["Apps"]) +app.include_router(variants_router.router, prefix="/variants", tags=["Variants"]) +app.include_router(container_router.router, prefix="/containers", tags=["Containers"]) -evaluations_service = EvaluationsService( - evaluations_dao=evaluations_dao, - tracing_service=tracing_service, - queries_service=queries_service, - testsets_service=testsets_service, - evaluators_service=evaluators_service, +app.include_router(evaluators_router.router, prefix="/evaluators", tags=["Evaluators"]) +app.include_router(testset_router.router, prefix="/testsets", tags=["Testsets"]) +app.include_router( + environment_router.router, prefix="/environments", tags=["Environments"] ) - -simple_evaluations_service = SimpleEvaluationsService( - queries_service=queries_service, - testsets_service=testsets_service, - evaluators_service=evaluators_service, - evaluations_service=evaluations_service, - simple_testsets_service=simple_testsets_service, - simple_evaluators_service=simple_evaluators_service, +app.include_router(bases_router.router, prefix="/bases", tags=["Bases"]) +app.include_router(configs_router.router, prefix="/configs", tags=["Configs"]) +app.include_router(api_key_router.router, prefix="/keys", tags=["Api Keys"]) +app.include_router( + organization_router.router, prefix="/organizations", tags=["Organization"] ) +app.include_router(workspace_router.router, prefix="/workspaces", tags=["Workspace"]) -# ROUTERS ---------------------------------------------------------------------- -secrets = VaultRouter( - vault_service=vault_service, +vault_router = VaultRouter( + vault_service=VaultService( + secrets_dao=SecretsDAO(), + ), ) observability = ObservabilityRouter( - observability_service=observability_service, - tracing_service=tracing_service, -) - -tracing = TracingRouter( - tracing_service=tracing_service, -) - -testcases = TestcasesRouter( - testcases_service=testcases_service, -) - -testsets = TestsetsRouter( - testsets_service=testsets_service, -) - -simple_testsets = SimpleTestsetsRouter( - simple_testsets_service=simple_testsets_service, -) - -queries = QueriesRouter( - queries_service=queries_service, -) - -simple_queries = SimpleQueriesRouter( - simple_queries_service=simple_queries_service, -) - -legacy_applications = LegacyApplicationsRouter( - legacy_applications_service=legacy_applications_service, -) - -workflows = WorkflowsRouter( - workflows_service=workflows_service, + observability_service=ObservabilityService( + observability_dao=ObservabilityDAO(), + ) ) evaluators = EvaluatorsRouter( - evaluators_service=evaluators_service, + workflows_service=WorkflowsService( + workflows_dao=GitDAO( + ArtifactDBE=WorkflowArtifactDBE, + VariantDBE=WorkflowVariantDBE, + RevisionDBE=WorkflowRevisionDBE, + ) + ), ) -simple_evaluators = SimpleEvaluatorsRouter( - simple_evaluators_service=simple_evaluators_service, -) - -evaluations = EvaluationsRouter( - evaluations_service=evaluations_service, - queries_service=queries_service, -) - -simple_evaluations = SimpleEvaluationsRouter( - simple_evaluations_service=simple_evaluations_service, -) - -invocations_service = InvocationsService( - legacy_applications_service=legacy_applications_service, - tracing_router=tracing, -) - -annotations_service = AnnotationsService( - tracing_router=tracing, - evaluators_service=evaluators_service, - simple_evaluators_service=simple_evaluators_service, -) - -invocations = InvocationsRouter( - invocations_service=invocations_service, +tracing = TracingRouter( + tracing_service=TracingService( + tracing_dao=TracingDAO(), + ) ) annotations = AnnotationsRouter( - annotations_service=annotations_service, + workflows_service=WorkflowsService( + workflows_dao=GitDAO( + ArtifactDBE=WorkflowArtifactDBE, + VariantDBE=WorkflowVariantDBE, + RevisionDBE=WorkflowRevisionDBE, + ) + ), + tracing_service=TracingService( + tracing_dao=TracingDAO(), + ), ) -# MOUNTING ROUTERS TO APP ROUTES ----------------------------------------------- - -app.include_router( - secrets.router, - prefix="/vault/v1", - tags=["Secrets"], +workflows = WorkflowsRouter( + workflows_service=WorkflowsService( + workflows_dao=GitDAO( + ArtifactDBE=WorkflowArtifactDBE, + VariantDBE=WorkflowVariantDBE, + RevisionDBE=WorkflowRevisionDBE, + ) + ), ) -app.include_router( - router=observability.otlp, - prefix="/otlp", - tags=["Observability"], +testsets = TestsetsRouter( + testsets_service=TestsetsService( + git_dao=GitDAO( + ArtifactDBE=TestsetArtifactDBE, + VariantDBE=TestsetVariantDBE, + RevisionDBE=TestsetRevisionDBE, + ), + blobs_dao=BlobDAO( + BlobDBE=TestcaseBlobDBE, + ), + ) ) -app.include_router( - router=observability.router, - prefix="/observability/v1", - tags=["Observability"], -) app.include_router( router=tracing.router, @@ -391,202 +229,52 @@ async def lifespan(*args, **kwargs): ) app.include_router( - router=invocations.router, - prefix="/preview/invocations", - tags=["Invocations"], + router=evaluators.router, + prefix="/preview/evaluators", + tags=["Evals"], ) app.include_router( router=annotations.router, prefix="/preview/annotations", - tags=["Annotations"], -) - -app.include_router( - router=testcases.router, - prefix="/preview/testcases", - tags=["Testcases"], -) - -app.include_router( - router=testsets.router, - prefix="/preview/testsets", - tags=["Testsets"], + tags=["Evals"], ) app.include_router( - router=simple_testsets.router, - prefix="/preview/simple/testsets", - tags=["Testsets"], -) - -app.include_router( - router=queries.router, - prefix="/preview/queries", - tags=["Queries"], -) - -app.include_router( - router=simple_queries.router, - prefix="/preview/simple/queries", - tags=["Queries"], -) - -app.include_router( - router=legacy_applications.router, - prefix="/preview/legacy/applications", - tags=["Applications"], + router=annotations.router, + prefix="/preview/annotations", + tags=["Evals"], ) app.include_router( router=workflows.router, - prefix="/preview/workflows", + prefix="/preview/base/workflows", tags=["Workflows"], ) app.include_router( - router=evaluators.router, - prefix="/preview/evaluators", - tags=["Evaluators"], -) - -app.include_router( - router=simple_evaluators.router, - prefix="/preview/simple/evaluators", - tags=["Evaluators"], -) - -app.include_router( - router=evaluations.admin_router, - prefix="/admin/evaluations", - tags=["Evaluations", "Admin"], -) - -app.include_router( - router=evaluations.router, - prefix="/preview/evaluations", - tags=["Evaluations"], -) - -app.include_router( - router=simple_evaluations.router, - prefix="/preview/simple/evaluations", - tags=["Evaluations"], -) - -app.include_router( - evaluation_router.router, - prefix="/evaluations", - tags=["Evaluations"], -) - -app.include_router( - human_evaluation_router.router, - prefix="/human-evaluations", - tags=["Human-Evaluations"], -) - -app.include_router( - admin_router.router, - prefix="/admin", - tags=["Admin"], -) - -app.include_router( - health_router.router, - prefix="/health", -) - -app.include_router( - permissions_router.router, - prefix="/permissions", - tags=["Access Control"], -) - -app.include_router( - projects_router.router, - prefix="/projects", - tags=["Scopes"], -) - -app.include_router( - user_profile.router, - prefix="/profile", -) - -app.include_router( - app_router.router, - prefix="/apps", - tags=["Apps"], -) - -app.include_router( - variants_router.router, - prefix="/variants", - tags=["Variants"], -) - -app.include_router( - container_router.router, - prefix="/containers", - tags=["Containers"], -) - -app.include_router( - evaluators_router.router, - prefix="/evaluators", - tags=["Evaluators"], -) - -app.include_router( - testset_router.router, - prefix="/testsets", + router=testsets.router, + prefix="/preview/testsets", tags=["Testsets"], ) app.include_router( - environment_router.router, - prefix="/environments", - tags=["Environments"], -) - -app.include_router( - bases_router.router, - prefix="/bases", - tags=["Bases"], -) - -app.include_router( - configs_router.router, - prefix="/configs", - tags=["Configs"], -) - -app.include_router( - api_key_router.router, - prefix="/keys", - tags=["Api Keys"], + router=observability.otlp, + prefix="/otlp", + tags=["Observability"], ) - app.include_router( - organization_router.router, - prefix="/organizations", - tags=["Organization"], + router=observability.router, + prefix="/observability/v1", + tags=["Observability"], ) - app.include_router( - workspace_router.router, - prefix="/workspaces", - tags=["Workspace"], + vault_router.router, + prefix="/vault/v1", + tags=["Vault"], ) -# ------------------------------------------------------------------------------ - - -import oss.src.tasks.evaluations.live -import oss.src.tasks.evaluations.legacy -import oss.src.tasks.evaluations.batch - +if is_ee(): + import ee.src.main as ee -if ee and is_ee(): app = ee.extend_app_schema(app) diff --git a/api/oss/databases/postgres/migrations/core/data_migrations/applications.py b/api/oss/databases/postgres/migrations/core/data_migrations/applications.py index 3c55b3ddea..8adfeb17b3 100644 --- a/api/oss/databases/postgres/migrations/core/data_migrations/applications.py +++ b/api/oss/databases/postgres/migrations/core/data_migrations/applications.py @@ -10,7 +10,7 @@ from sqlalchemy.orm import sessionmaker, Session from oss.src.models.deprecated_models import ( - DeprecatedEvaluatorConfigDBwApp as DeprecatedEvaluatorConfigDB, + DeprecatedEvaluatorConfigDB, DeprecatedAppDB, ) diff --git a/api/oss/databases/postgres/migrations/core/data_migrations/evaluators.py b/api/oss/databases/postgres/migrations/core/data_migrations/evaluators.py deleted file mode 100644 index f70c0bb683..0000000000 --- a/api/oss/databases/postgres/migrations/core/data_migrations/evaluators.py +++ /dev/null @@ -1,195 +0,0 @@ -import uuid -import asyncio -import traceback -from uuid import UUID -from typing import Optional - -import click -from sqlalchemy.future import select -from sqlalchemy import func -from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine - -from oss.src.models.db_models import ProjectDB as ProjectDBE -from oss.src.dbs.postgres.workflows.dbes import ( - WorkflowArtifactDBE, - WorkflowVariantDBE, - WorkflowRevisionDBE, -) -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.core.evaluators.service import SimpleEvaluatorsService, EvaluatorsService -from oss.src.models.deprecated_models import ( - DeprecatedAutoEvaluatorConfigDBwProject as DeprecatedEvaluatorConfigDBwProject, - DeprecatedOrganizationDB, -) -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.tracing.service import TracingService -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.dbs.postgres.tracing.dao import TracingDAO - - -# Define constants -DEFAULT_BATCH_SIZE = 200 - -# Initialize plug-ins for migration -tracing_service = TracingService( - tracing_dao=TracingDAO(), -) -tracing = TracingRouter( - tracing_service=tracing_service, -) -evaluators_service = EvaluatorsService( - workflows_service=WorkflowsService( - workflows_dao=GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, - ), - ) -) -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, -) - - -async def _fetch_project_owner( - *, - project_id: uuid.UUID, - connection: AsyncConnection, -) -> Optional[uuid.UUID]: - """Fetch the owner user ID for a given project.""" - organization_owner_query = ( - select(DeprecatedOrganizationDB.owner) - .select_from(ProjectDBE) - .join( - DeprecatedOrganizationDB, - ProjectDBE.organization_id == DeprecatedOrganizationDB.id, - ) - .where(ProjectDBE.id == project_id) - ) - result = await connection.execute(organization_owner_query) - owner = result.scalar_one_or_none() - return UUID(owner) if owner is not None else None - - -async def migration_old_evaluator_configs_to_new_evaluator_configs( - connection: AsyncConnection, -): - """Migrate old evaluator configurations to new workflow-based system.""" - try: - offset = 0 - total_migrated = 0 - skipped_records = 0 - - # Count total rows with a non-null project_id - total_query = ( - select(func.count()) - .select_from(DeprecatedEvaluatorConfigDBwProject) - .filter(DeprecatedEvaluatorConfigDBwProject.project_id.isnot(None)) - ) - result = await connection.execute(total_query) - total_rows = result.scalar() - total_evaluators = total_rows or 0 - - click.echo( - click.style( - f"Total rows in evaluator_configs with project_id: {total_evaluators}", - fg="yellow", - ) - ) - - while offset < total_evaluators: - # STEP 1: Fetch evaluator configurations with non-null project_id - result = await connection.execute( - select(DeprecatedEvaluatorConfigDBwProject) - .filter(DeprecatedEvaluatorConfigDBwProject.project_id.isnot(None)) - .offset(offset) - .limit(DEFAULT_BATCH_SIZE) - ) - evaluator_configs_rows = result.fetchall() - - if not evaluator_configs_rows: - break - - # Process and transfer records to evaluator workflows - for old_evaluator in evaluator_configs_rows: - try: - # STEP 2: Get owner from project_id - owner = await _fetch_project_owner( - project_id=old_evaluator.project_id, # type: ignore - connection=connection, - ) - if not owner: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {old_evaluator.id} due to missing owner in workspace member table", - fg="yellow", - ) - ) - continue - - # STEP 3: Migrate records using transfer_* util function - new_evaluator = await simple_evaluators_service.transfer( - project_id=old_evaluator.project_id, - user_id=owner, - evaluator_id=old_evaluator.id, - ) - if not new_evaluator: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {old_evaluator.id} due to old evaluator not existing in database table", - fg="yellow", - ) - ) - continue - - except Exception as e: - click.echo( - click.style( - f"Failed to migrate evaluator {old_evaluator.id}: {str(e)}", - fg="red", - ) - ) - click.echo(click.style(traceback.format_exc(), fg="red")) - skipped_records += 1 - continue - - # Update progress tracking for current batch - batch_migrated = len(evaluator_configs_rows) - offset += DEFAULT_BATCH_SIZE - total_migrated += batch_migrated - - click.echo( - click.style( - f"Processed {batch_migrated} records in this batch.", - fg="yellow", - ) - ) - - # Update progress tracking for all batches - remaining_records = total_evaluators - total_migrated - click.echo(click.style(f"Total migrated: {total_migrated}", fg="yellow")) - click.echo(click.style(f"Skipped records: {skipped_records}", fg="yellow")) - click.echo( - click.style(f"Records left to migrate: {remaining_records}", fg="yellow") - ) - - except Exception as e: - click.echo(f"Error occurred: {e}") - click.echo(click.style(traceback.format_exc(), fg="red")) - - -def run_migration(sqlalchemy_url: str): - import concurrent.futures - - async def _start(): - connection = create_async_engine(url=sqlalchemy_url) - async with connection.connect() as connection: - await migration_old_evaluator_configs_to_new_evaluator_configs( - connection=connection - ) - - with concurrent.futures.ThreadPoolExecutor() as executor: - future = executor.submit(asyncio.run, _start()) - future.result() diff --git a/api/oss/databases/postgres/migrations/core/data_migrations/projects.py b/api/oss/databases/postgres/migrations/core/data_migrations/projects.py index 5ed91ee5f9..6285aa58be 100644 --- a/api/oss/databases/postgres/migrations/core/data_migrations/projects.py +++ b/api/oss/databases/postgres/migrations/core/data_migrations/projects.py @@ -18,7 +18,6 @@ DeprecatedEvaluationScenarioDB as EvaluationScenarioDB, DeprecatedHumanEvaluationScenarioDB as HumanEvaluationScenarioDB, DeprecatedHumanEvaluationDB as HumanEvaluationDB, - DeprecatedEvaluatorConfigDBwProject as EvaluatorConfigDB, DeprecatedEvaluationDB as EvaluationDB, DeprecatedAppVariantRevisionsDB as AppVariantRevisionsDB, DeprecatedAppEnvironmentRevisionDB as AppEnvironmentRevisionDB, @@ -27,7 +26,8 @@ VariantBaseDB, DeploymentDB, AppEnvironmentDB, - TestsetDB, + EvaluatorConfigDB, + TestSetDB, ) @@ -45,7 +45,7 @@ EvaluatorConfigDB, HumanEvaluationDB, HumanEvaluationScenarioDB, - TestsetDB, + TestSetDB, ] @@ -101,7 +101,7 @@ def add_completion_testset_to_project(session: Session, project_id: str): "name": f"completion_testset", "csvdata": csvdata, } - testset_db = TestsetDB( + testset_db = TestSetDB( **testset, project_id=uuid.UUID(project_id), ) diff --git a/api/oss/databases/postgres/migrations/core/data_migrations/secrets.py b/api/oss/databases/postgres/migrations/core/data_migrations/secrets.py index 6970f6c4e1..d03ac99144 100644 --- a/api/oss/databases/postgres/migrations/core/data_migrations/secrets.py +++ b/api/oss/databases/postgres/migrations/core/data_migrations/secrets.py @@ -6,7 +6,7 @@ from sqlalchemy import Connection, update, func from oss.src.utils.env import env -from oss.src.dbs.postgres.secrets.dbes import SecretsDBE +from oss.src.dbs.secrets.dbes import SecretsDBE from oss.src.core.secrets.dtos import ( StandardProviderDTO, StandardProviderSettingsDTO, @@ -38,11 +38,11 @@ def rename_and_update_secrets_data_schema(session: Connection): while True: with set_data_encryption_key(data_encryption_key=encryption_key): # Fetch a batch of records using keyset pagination (ID-based) - stmt = select(SecretsDBE).order_by(SecretsDBE.id).limit(BATCH_SIZE) + query = select(SecretsDBE).order_by(SecretsDBE.id).limit(BATCH_SIZE) if last_processed_id: - stmt = stmt.where(SecretsDBE.id > last_processed_id) + query = query.where(SecretsDBE.id > last_processed_id) - secrets_dbes = session.execute(stmt).fetchall() + secrets_dbes = session.execute(query).fetchall() if not secrets_dbes: break # No more records to process @@ -124,11 +124,11 @@ def revert_rename_and_update_secrets_data_schema(session: Connection): while True: with set_data_encryption_key(data_encryption_key=encryption_key): # Fetch a batch of records using keyset pagination - stmt = select(SecretsDBE).order_by(SecretsDBE.id).limit(BATCH_SIZE) + query = select(SecretsDBE).order_by(SecretsDBE.id).limit(BATCH_SIZE) if last_processed_id: - stmt = stmt.where(SecretsDBE.id > last_processed_id) + query = query.where(SecretsDBE.id > last_processed_id) - secrets_dbes = session.execute(stmt).fetchall() + secrets_dbes = session.execute(query).fetchall() if not secrets_dbes: break # No more records to process diff --git a/api/oss/databases/postgres/migrations/core/data_migrations/testsets.py b/api/oss/databases/postgres/migrations/core/data_migrations/testsets.py deleted file mode 100644 index 38ec03bc24..0000000000 --- a/api/oss/databases/postgres/migrations/core/data_migrations/testsets.py +++ /dev/null @@ -1,194 +0,0 @@ -import uuid -import asyncio -import traceback -from uuid import UUID -from typing import Optional - -import click -from sqlalchemy.future import select -from sqlalchemy import func -from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine - -from oss.src.models.db_models import ProjectDB as ProjectDBE -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.blobs.dao import BlobsDAO -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.testsets.service import TestsetsService, SimpleTestsetsService -from oss.src.models.deprecated_models import ( - DeprecatedTestsetDB, - DeprecatedOrganizationDB, -) - - -# Define constants -DEFAULT_BATCH_SIZE = 200 - -# Initialize plug-ins for migration -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, -) -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - - -async def _fetch_project_owner( - *, - project_id: uuid.UUID, - connection: AsyncConnection, -) -> Optional[uuid.UUID]: - """Fetch the owner user ID for a given project.""" - organization_owner_query = ( - select(DeprecatedOrganizationDB.owner) - .select_from(ProjectDBE) - .join( - DeprecatedOrganizationDB, - ProjectDBE.organization_id == DeprecatedOrganizationDB.id, - ) - .where(ProjectDBE.id == project_id) - ) - result = await connection.execute(organization_owner_query) - owner = result.scalar_one_or_none() - return UUID(owner) if owner is not None else None - - -async def migration_old_testsets_to_new_testsets( - connection: AsyncConnection, -): - """Migrate old testsets to new testsets system.""" - try: - offset = 0 - total_migrated = 0 - skipped_records = 0 - - # Count total rows with a non-null project_id - total_query = ( - select(func.count()) - .select_from(DeprecatedTestsetDB) - .filter(DeprecatedTestsetDB.project_id.isnot(None)) - ) - result = await connection.execute(total_query) - total_rows = result.scalar() - total_testsets = total_rows or 0 - - click.echo( - click.style( - f"Total rows in testsets with project_id: {total_testsets}", - fg="yellow", - ) - ) - - while offset < total_testsets: - # STEP 1: Fetch evaluator configurations with non-null project_id - result = await connection.execute( - select(DeprecatedTestsetDB) - .filter(DeprecatedTestsetDB.project_id.isnot(None)) - .offset(offset) - .limit(DEFAULT_BATCH_SIZE) - ) - testsets_rows = result.fetchall() - - if not testsets_rows: - break - - # Process and transfer records to testset workflows - for testset in testsets_rows: - try: - # STEP 2: Get owner from project_id - owner = await _fetch_project_owner( - project_id=testset.project_id, # type: ignore - connection=connection, - ) - if not owner: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {testset.id} due to missing owner in workspace member table", - fg="yellow", - ) - ) - continue - - # STEP 3: Migrate records using transfer_* util function - new_testset = await simple_testsets_service.transfer( - project_id=testset.project_id, - user_id=owner, - testset_id=testset.id, - ) - if not new_testset: - skipped_records += 1 - click.echo( - click.style( - f"Skipping record with ID {testset.id} due to old testset not existing in database table", - fg="yellow", - ) - ) - continue - - except Exception as e: - click.echo( - click.style( - f"Failed to migrate testset {testset.id}: {str(e)}", - fg="red", - ) - ) - click.echo(click.style(traceback.format_exc(), fg="red")) - skipped_records += 1 - continue - - # Update progress tracking for current batch - batch_migrated = len(testsets_rows) - offset += DEFAULT_BATCH_SIZE - total_migrated += batch_migrated - - click.echo( - click.style( - f"Processed {batch_migrated} records in this batch.", - fg="yellow", - ) - ) - - # Update progress tracking for all batches - remaining_records = total_testsets - total_migrated - click.echo(click.style(f"Total migrated: {total_migrated}", fg="yellow")) - click.echo(click.style(f"Skipped records: {skipped_records}", fg="yellow")) - click.echo( - click.style(f"Records left to migrate: {remaining_records}", fg="yellow") - ) - - except Exception as e: - click.echo(f"Error occurred: {e}") - click.echo(click.style(traceback.format_exc(), fg="red")) - - -def run_migration(sqlalchemy_url: str): - import concurrent.futures - - async def _start(): - connection = create_async_engine(url=sqlalchemy_url) - async with connection.connect() as connection: - await migration_old_testsets_to_new_testsets(connection=connection) - - with concurrent.futures.ThreadPoolExecutor() as executor: - future = executor.submit(asyncio.run, _start()) - future.result() diff --git a/api/oss/databases/postgres/migrations/core/env.py b/api/oss/databases/postgres/migrations/core/env.py index 3c6e049969..eb764ba127 100644 --- a/api/oss/databases/postgres/migrations/core/env.py +++ b/api/oss/databases/postgres/migrations/core/env.py @@ -16,7 +16,7 @@ config.set_main_option("sqlalchemy.url", POSTGRES_URI_CORE) # type: ignore -import oss.src.dbs.postgres.secrets.dbes +import oss.src.dbs.secrets.dbes import oss.src.dbs.postgres.observability.dbes # Interpret the config file for Python logging. @@ -28,7 +28,7 @@ # for 'autogenerate' support from oss.src.dbs.postgres.shared.base import Base -import oss.src.dbs.postgres.secrets.dbes +import oss.src.dbs.secrets.dbes import oss.src.dbs.postgres.observability.dbes # from myapp import mymodel diff --git a/api/oss/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py b/api/oss/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py deleted file mode 100644 index a22dad5b2e..0000000000 --- a/api/oss/databases/postgres/migrations/core/temp/80910d2fa9a4_migrate_old_testsets_to_new_.py +++ /dev/null @@ -1,32 +0,0 @@ -"""migrate old testsets to new testsets data structure - -Revision ID: 80910d2fa9a4 -Revises: ... -Create Date: 2025-07-25 07:35:57.319449 - -""" - -from typing import Sequence, Union - -from alembic import context -from oss.databases.postgres.migrations.core.data_migrations.testsets import ( - run_migration, -) - -# revision identifiers, used by Alembic. -revision: str = "80910d2fa9a4" -down_revision: Union[str, None] = "..." -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - run_migration(sqlalchemy_url=context.config.get_main_option("sqlalchemy.url")) - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - pass - # ### end Alembic commands ### diff --git a/api/oss/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py b/api/oss/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py deleted file mode 100644 index e9d905297c..0000000000 --- a/api/oss/databases/postgres/migrations/core/temp/bd7937ee784d_migrate_old_evaluators_to_new_.py +++ /dev/null @@ -1,32 +0,0 @@ -"""migrate old evaluators to new evaluators data structure - -Revision ID: bd7937ee784d -Revises: ... -Create Date: 2025-07-25 07:35:57.319449 - -""" - -from typing import Sequence, Union - -from alembic import context -from oss.databases.postgres.migrations.core.data_migrations.evaluators import ( - run_migration, -) - -# revision identifiers, used by Alembic. -revision: str = "bd7937ee784d" -down_revision: Union[str, None] = "..." -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - run_migration(sqlalchemy_url=context.config.get_main_option("sqlalchemy.url")) - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - pass - # ### end Alembic commands ### diff --git a/api/oss/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py b/api/oss/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py index c112db0d1a..9b2552911a 100644 --- a/api/oss/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py +++ b/api/oss/databases/postgres/migrations/core/versions/0f086ebc2f83_extend_app_type.py @@ -1,5 +1,4 @@ """Extend app_type - Revision ID: 0f086ebc2f83 Revises: 0f086ebc2f82 Create Date: 2025-01-08 10:24:00 diff --git a/api/oss/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py b/api/oss/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py deleted file mode 100644 index fb5ccf5b83..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/30dcf07de96a_add_tables_for_queries.py +++ /dev/null @@ -1,403 +0,0 @@ -"""add tables for queries (artifacts, variants, & revisions) - -Revision ID: 30dcf07de96a -Revises: 37e1d1e8b181 -Create Date: 2025-07-30 14:55:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "30dcf07de96a" -down_revision: Union[str, None] = "37e1d1e8b181" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - ARTIFACTS -------------------------------------------------------------- - - op.create_table( - "query_artifacts", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_artifacts_project_id_slug", - "project_id", - "slug", - ), - ) - - # -------------------------------------------------------------------------- - - # - VARIANTS --------------------------------------------------------------- - - op.create_table( - "query_variants", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "artifact_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_variants_project_id_slug", - "project_id", - "slug", - ), - sa.Index( - "ix_query_variants_project_id_artifact_id", - "project_id", - "artifact_id", - ), - ) - - # -------------------------------------------------------------------------- - - # - REVISIONS -------------------------------------------------------------- - - op.create_table( - "query_revisions", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "artifact_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "variant_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "slug", - sa.String(), - nullable=False, - ), - sa.Column( - "version", - sa.String(), - nullable=True, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.Column( - "message", - sa.String(), - nullable=True, - ), - sa.Column( - "author", - sa.UUID(), - nullable=False, - ), - sa.Column( - "date", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.UniqueConstraint( - "project_id", - "slug", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "variant_id"], - ["query_variants.project_id", "query_variants.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_query_revisions_project_id_slug", - "project_id", - "slug", - ), - sa.Index( - "ix_query_revisions_project_id_artifact_id", - "project_id", - "artifact_id", - ), - sa.Index( - "ix_query_revisions_project_id_variant_id", - "project_id", - "variant_id", - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - REVISIONS -------------------------------------------------------------- - - op.drop_table("query_revisions") - - # -------------------------------------------------------------------------- - - # - VARIANTS --------------------------------------------------------------- - - op.drop_table("query_variants") - - # -------------------------------------------------------------------------- - - # - ARTIFACTS -------------------------------------------------------------- - - op.drop_table("query_artifacts") - - # -------------------------------------------------------------------------- diff --git a/api/oss/databases/postgres/migrations/core/versions/362gbs21a2ee_add_default_project.py b/api/oss/databases/postgres/migrations/core/versions/362gbs21a2ee_add_default_project.py new file mode 100644 index 0000000000..5e307d8b59 --- /dev/null +++ b/api/oss/databases/postgres/migrations/core/versions/362gbs21a2ee_add_default_project.py @@ -0,0 +1,36 @@ +"""Add default project to database + +Revision ID: 362gbs21a2ee +Revises: c5ae28e37102 +Create Date: 2024-09-04 14:28:06.934841 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa + +from oss.databases.postgres.migrations.core.data_migrations.projects import ( + create_default_project, + remove_default_project, +) + + +# revision identifiers, used by Alembic. +revision: str = "362gbs21a2ee" +down_revision: Union[str, None] = "c5ae28e37102" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### custom command ### + create_default_project() + # ### end custom command ### + + +def downgrade() -> None: + # ### custom command ### + remove_default_project() + # ### end custom command ### diff --git a/api/oss/databases/postgres/migrations/core/versions/37e1d1e8b181_renamed_evaluator_configs_table.py b/api/oss/databases/postgres/migrations/core/versions/37e1d1e8b181_renamed_evaluator_configs_table.py deleted file mode 100644 index f7e154aecc..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/37e1d1e8b181_renamed_evaluator_configs_table.py +++ /dev/null @@ -1,31 +0,0 @@ -"""rename evaluator configs table - -Revision ID: 37e1d1e8b181 -Revises: aa1b2c3d4e5f -Create Date: 2025-07-31 10:17:45.613091 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "37e1d1e8b181" -down_revision: Union[str, None] = "aa1b2c3d4e5f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - op.rename_table("evaluators_configs", "auto_evaluator_configs") - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - op.rename_table("auto_evaluator_configs", "evaluators_configs") - # ### end Alembic commands ### diff --git a/api/oss/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py b/api/oss/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py deleted file mode 100644 index bb43067ccb..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/3b5f5652f611_populate_runs_references.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Populate runs references - -Revision ID: 3b5f5652f611 -Revises: b3f15a7140ab -Create Date: 2025-10-07 12:00:00 -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa -import json - -# revision identifiers, used by Alembic. -revision: str = "3b5f5652f611" -down_revision: Union[str, None] = "b3f15a7140ab" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - conn = op.get_bind() - - rows = conn.execute( - sa.text('SELECT id, data, "references" FROM evaluation_runs') - ).fetchall() - - for run_id, data, existing_refs in rows: - if existing_refs not in (None, [], {}): - continue - if not data or "steps" not in data: - continue - - refs_out = [] - seen = set() - - for step in data.get("steps", []): - refs = step.get("references", {}) - if not isinstance(refs, dict): - continue - - for key, ref in refs.items(): - if not isinstance(ref, dict): - continue - - entry = {"key": key} - - if ref.get("id") is not None: - entry["id"] = ref["id"] - if ref.get("slug") is not None: - entry["slug"] = ref["slug"] - if ref.get("version") is not None: - entry["version"] = ref["version"] - - dedup_key = ( - entry.get("id"), - entry["key"], - entry.get("slug"), - entry.get("version"), - ) - if dedup_key in seen: - continue - seen.add(dedup_key) - - refs_out.append(entry) - - if refs_out: - conn.execute( - sa.text( - 'UPDATE evaluation_runs SET "references" = :refs WHERE id = :id' - ), - {"refs": json.dumps(refs_out), "id": run_id}, - ) - - -def downgrade() -> None: - conn = op.get_bind() - conn.execute(sa.text('UPDATE evaluation_runs SET "references" = NULL')) diff --git a/api/oss/databases/postgres/migrations/core/versions/3dc71d61f764_add_secrets_dbe_model.py b/api/oss/databases/postgres/migrations/core/versions/3dc71d61f764_add_secrets_dbe_model.py index 6a93b73283..9b6aadf9cb 100644 --- a/api/oss/databases/postgres/migrations/core/versions/3dc71d61f764_add_secrets_dbe_model.py +++ b/api/oss/databases/postgres/migrations/core/versions/3dc71d61f764_add_secrets_dbe_model.py @@ -11,7 +11,7 @@ from alembic import op import sqlalchemy as sa -from oss.src.dbs.postgres.secrets.custom_fields import PGPString +from oss.src.dbs.secrets.custom_fields import PGPString # revision identifiers, used by Alembic. diff --git a/api/oss/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py b/api/oss/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py deleted file mode 100644 index 42a09ece47..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/54e81e9eed88_add_tables_for_evaluations.py +++ /dev/null @@ -1,505 +0,0 @@ -"""add tables for evaluations - -Revision ID: 54e81e9eed88 -Revises: 9698355c7650 -Create Date: 2025-04-24 07:27:45.801481 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "54e81e9eed88" -down_revision: Union[str, None] = "9698355c7650" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.rename_table( - "evaluation_aggregated_results", - "auto_evaluation_aggregated_results", - ) - op.rename_table( - "evaluation_evaluator_configs", - "auto_evaluation_evaluator_configs", - ) - op.rename_table( - "evaluation_scenario_results", - "auto_evaluation_scenario_results", - ) - op.rename_table( - "evaluation_scenarios", - "auto_evaluation_scenarios", - ) - op.rename_table( - "evaluations", - "auto_evaluations", - ) - - op.create_table( - "evaluation_runs", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "name", - sa.String(), - nullable=True, - ), - sa.Column( - "description", - sa.String(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_runs_project_id", - "project_id", - ), - ) - - op.create_table( - "evaluation_scenarios", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_scenarios_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_scenarios_run_id", - "run_id", - ), - ) - - op.create_table( - "evaluation_steps", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "timestamp", - sa.TIMESTAMP(timezone=True), - nullable=False, - ), - sa.Column( - "key", - sa.String(), - nullable=False, - ), - sa.Column( - "repeat_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "retry_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "hash_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "trace_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "testcase_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "error", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "scenario_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), - sa.UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - "key", - "retry_id", - "retry_id", - ), - sa.Index( - "ix_evaluation_steps_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_steps_scenario_id", - "scenario_id", - ), - sa.Index( - "ix_evaluation_steps_run_id", - "run_id", - ), - ) - - op.create_table( - "evaluation_metrics", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "status", - sa.VARCHAR, - nullable=False, - ), - sa.Column( - "scenario_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), - sa.UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - ), - sa.Index( - "ix_evaluation_metrics_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_metrics_run_id", - "run_id", - ), - sa.Index( - "ix_evaluation_metrics_scenario_id", - "scenario_id", - ), - ) - - -def downgrade() -> None: - op.drop_table("evaluation_metrics") - op.drop_table("evaluation_steps") - op.drop_table("evaluation_scenarios") - op.drop_table("evaluation_runs") - - op.rename_table( - "auto_evaluations", - "evaluations", - ) - op.rename_table( - "auto_evaluation_scenarios", - "evaluation_scenarios", - ) - op.rename_table( - "auto_evaluation_scenario_results", - "evaluation_scenario_results", - ) - op.rename_table( - "auto_evaluation_evaluator_configs", - "evaluation_evaluator_configs", - ) - op.rename_table( - "auto_evaluation_aggregated_results", - "evaluation_aggregated_results", - ) diff --git a/api/oss/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py b/api/oss/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py deleted file mode 100644 index 62d244d1e1..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/5a71b3f140ab_fix_all_preview_schemas.py +++ /dev/null @@ -1,426 +0,0 @@ -"""fix all preview schemas - -Revision ID: 5a71b3f140ab -Revises: 8089ee7692d1 -Create Date: 2025-09-03 14:28:06.362553 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -revision: str = "5a71b3f140ab" -down_revision: Union[str, None] = "8089ee7692d1" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # EVALUATION RUNS ---------------------------------------------------------- - - op.add_column( - "evaluation_runs", - sa.Column( - "references", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - - op.create_index( - "ix_evaluation_runs_references", - "evaluation_runs", - ["references"], - unique=False, - postgresql_using="gin", - postgresql_ops={"references": "jsonb_path_ops"}, - ) - op.create_index( - "ix_evaluation_runs_flags", - "evaluation_runs", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_runs_tags", - "evaluation_runs", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.add_column( - "evaluation_scenarios", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.create_index( - "ix_evaluation_scenarios_timestamp_interval", - "evaluation_scenarios", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_scenarios_flags", - "evaluation_scenarios", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_scenarios_tags", - "evaluation_scenarios", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION RESULTS ------------------------------------------------------- - - op.alter_column( - "evaluation_steps", - "timestamp", - existing_type=postgresql.TIMESTAMP(timezone=True), - nullable=True, - ) - op.add_column( - "evaluation_steps", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.create_unique_constraint( - "uq_evaluation_steps_project_run_scenario_step_repeat", - "evaluation_steps", - ["project_id", "run_id", "scenario_id", "step_key", "repeat_idx"], - ) - - op.create_index( - "ix_evaluation_steps_tags", - "evaluation_steps", - ["tags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_steps_flags", - "evaluation_steps", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_steps_timestamp_interval", - "evaluation_steps", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_steps_repeat_idx", - "evaluation_steps", - ["repeat_idx"], - unique=False, - ) - op.create_index( - "ix_evaluation_steps_step_key", - "evaluation_steps", - ["step_key"], - unique=False, - ) - - op.rename_table("evaluation_steps", "evaluation_results") - - op.execute( - "ALTER TABLE evaluation_results RENAME CONSTRAINT " - "uq_evaluation_steps_project_run_scenario_step_repeat TO " - "uq_evaluation_results_project_run_scenario_step_repeat" - ) - - op.execute( - "ALTER INDEX ix_evaluation_steps_project_id RENAME TO ix_evaluation_results_project_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_run_id RENAME TO ix_evaluation_results_run_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_scenario_id RENAME TO ix_evaluation_results_scenario_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_step_key RENAME TO ix_evaluation_results_step_key" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_repeat_idx RENAME TO ix_evaluation_results_repeat_idx" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_timestamp_interval RENAME TO ix_evaluation_results_timestamp_interval" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_flags RENAME TO ix_evaluation_results_flags" - ) - op.execute( - "ALTER INDEX ix_evaluation_steps_tags RENAME TO ix_evaluation_results_tags" - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.add_column( - "evaluation_metrics", - sa.Column( - "interval", - postgresql.INTEGER(), - nullable=True, - ), - ) - - op.drop_constraint( - op.f("evaluation_metrics_project_id_run_id_scenario_id_key"), - "evaluation_metrics", - type_="unique", - ) - - op.create_unique_constraint( - "uq_evaluation_metrics_project_run_scenario_timestamp_interval", - "evaluation_metrics", - ["project_id", "run_id", "scenario_id", "timestamp", "interval"], - ) - - op.create_index( - "ix_evaluation_metrics_timestamp_interval", - "evaluation_metrics", - ["timestamp", "interval"], - unique=False, - ) - op.create_index( - "ix_evaluation_metrics_flags", - "evaluation_metrics", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_metrics_tags", - "evaluation_metrics", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # EVALUATION QUEUES -------------------------------------------------------- - - op.add_column( - "evaluation_queues", - sa.Column( - "name", - sa.String(), - nullable=True, - ), - ) - op.add_column( - "evaluation_queues", - sa.Column( - "description", - sa.String(), - nullable=True, - ), - ) - op.add_column( - "evaluation_queues", - sa.Column( - "status", - sa.VARCHAR(), - nullable=False, - server_default=sa.text("'pending'::varchar"), - ), - ) - - op.create_index( - "ix_evaluation_queues_flags", - "evaluation_queues", - ["flags"], - unique=False, - postgresql_using="gin", - ) - op.create_index( - "ix_evaluation_queues_tags", - "evaluation_queues", - ["tags"], - unique=False, - postgresql_using="gin", - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # EVALUATION QUEUES -------------------------------------------------------- - - op.drop_index( - "ix_evaluation_queues_tags", - table_name="evaluation_queues", - ) - op.drop_index( - "ix_evaluation_queues_flags", - table_name="evaluation_queues", - ) - - op.drop_column( - "evaluation_queues", - "status", - ) - op.drop_column( - "evaluation_queues", - "description", - ) - op.drop_column( - "evaluation_queues", - "name", - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.drop_index( - "ix_evaluation_metrics_tags", - table_name="evaluation_metrics", - ) - op.drop_index( - "ix_evaluation_metrics_flags", - table_name="evaluation_metrics", - ) - op.drop_index( - "ix_evaluation_metrics_timestamp_interval", - table_name="evaluation_metrics", - ) - - op.drop_constraint( - "uq_evaluation_metrics_project_run_scenario_timestamp_interval", - "evaluation_metrics", - type_="unique", - ) - - op.create_unique_constraint( - op.f("evaluation_metrics_project_id_run_id_scenario_id_key"), - "evaluation_metrics", - ["project_id", "run_id", "scenario_id"], - postgresql_nulls_not_distinct=False, - ) - - op.drop_column("evaluation_metrics", "interval") - - # EVALUATION RESULTS ------------------------------------------------------- - - op.execute( - "ALTER INDEX ix_evaluation_results_tags RENAME TO ix_evaluation_steps_tags" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_flags RENAME TO ix_evaluation_steps_flags" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_timestamp_interval RENAME TO ix_evaluation_steps_timestamp_interval" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_repeat_idx RENAME TO ix_evaluation_steps_repeat_idx" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_step_key RENAME TO ix_evaluation_steps_step_key" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_scenario_id RENAME TO ix_evaluation_steps_scenario_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_run_id RENAME TO ix_evaluation_steps_run_id" - ) - op.execute( - "ALTER INDEX ix_evaluation_results_project_id RENAME TO ix_evaluation_steps_project_id" - ) - - op.execute( - "ALTER TABLE evaluation_results RENAME CONSTRAINT uq_evaluation_results_project_run_scenario_step_repeat " - "TO uq_evaluation_steps_project_run_scenario_step_repeat" - ) - - op.rename_table("evaluation_results", "evaluation_steps") - - op.drop_index( - "ix_evaluation_steps_tags", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_flags", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_timestamp_interval", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_repeat_idx", - table_name="evaluation_steps", - ) - op.drop_index( - "ix_evaluation_steps_step_key", - table_name="evaluation_steps", - ) - - op.drop_constraint( - "uq_evaluation_steps_project_run_scenario_step_repeat", - "evaluation_steps", - type_="unique", - ) - - op.alter_column( - "evaluation_steps", - "timestamp", - existing_type=postgresql.TIMESTAMP(timezone=True), - nullable=False, - ) - - op.drop_column("evaluation_steps", "interval") - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.drop_index( - "ix_evaluation_scenarios_tags", - table_name="evaluation_scenarios", - ) - op.drop_index( - "ix_evaluation_scenarios_flags", - table_name="evaluation_scenarios", - ) - op.drop_index( - "ix_evaluation_scenarios_timestamp_interval", - table_name="evaluation_scenarios", - ) - - op.drop_column("evaluation_scenarios", "interval") - - # EVALUATION RUNS ---------------------------------------------------------- - - op.drop_index( - "ix_evaluation_runs_tags", - table_name="evaluation_runs", - ) - op.drop_index( - "ix_evaluation_runs_flags", - table_name="evaluation_runs", - ) - op.drop_index( - "ix_evaluation_runs_references", - table_name="evaluation_runs", - ) - - op.drop_column("evaluation_runs", "references") - - # -------------------------------------------------------------------------- diff --git a/api/oss/databases/postgres/migrations/core/versions/6cfe239894fb_set_user_id_column_in_db_entities_to_be_.py b/api/oss/databases/postgres/migrations/core/versions/6cfe239894fb_set_user_id_column_in_db_entities_to_be_.py index c8a712221f..244cbf6759 100644 --- a/api/oss/databases/postgres/migrations/core/versions/6cfe239894fb_set_user_id_column_in_db_entities_to_be_.py +++ b/api/oss/databases/postgres/migrations/core/versions/6cfe239894fb_set_user_id_column_in_db_entities_to_be_.py @@ -1,7 +1,7 @@ """Set user_id column in db entities to be optional --- prep for project_id scoping Revision ID: 6cfe239894fb -Revises: 911e6034d05e +Revises: 362gbs21a2ee Create Date: 2024-09-12 15:25:29.462793 """ @@ -14,7 +14,7 @@ # revision identifiers, used by Alembic. revision: str = "6cfe239894fb" -down_revision: Union[str, None] = "911e6034d05e" +down_revision: Union[str, None] = "362gbs21a2ee" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None diff --git a/api/oss/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py b/api/oss/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py deleted file mode 100644 index 36e9e4edd4..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/8089ee7692d1_cleanup_preview_entities.py +++ /dev/null @@ -1,168 +0,0 @@ -"""clean up preview entities - -Revision ID: 8089ee7692d1 -Revises: fa07e07350bf -Create Date: 2025-08-20 16:00:00.00000000 - -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa - -# revision identifiers, used by Alembic. -revision: str = "8089ee7692d1" -down_revision: Union[str, None] = "fa07e07350bf" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -TABLES_WITH_DATA_MIGRATION = [ - "evaluation_runs", - "evaluation_metrics", - "evaluation_queues", - "testcase_blobs", - "testset_revisions", - "query_revisions", - "workflow_revisions", -] - -TABLES_WITH_META_MIGRATION = [ - "evaluation_runs", - "evaluation_scenarios", - "evaluation_steps", - "evaluation_metrics", - "evaluation_queues", - "testcase_blobs", - "testset_artifacts", - "testset_variants", - "testset_revisions", - "query_artifacts", - "query_variants", - "query_revisions", - "workflow_artifacts", - "workflow_variants", - "workflow_revisions", -] - - -def upgrade() -> None: - # Convert jsonb -> json for data columns - for table in TABLES_WITH_DATA_MIGRATION: - op.alter_column( - table_name=table, - column_name="data", - type_=sa.JSON(), - postgresql_using="data::json", - ) - - # Convert jsonb -> json for meta columns - for table in TABLES_WITH_META_MIGRATION: - op.alter_column( - table_name=table, - column_name="meta", - type_=sa.JSON(), - postgresql_using="meta::json", - ) - - # Add new timestamp column - op.add_column( - "evaluation_scenarios", - sa.Column( - "timestamp", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - - # Add repeat_idx and drop old repeat_id + retry_id - op.add_column( - "evaluation_steps", - sa.Column( - "repeat_idx", - sa.Integer(), - nullable=True, - ), - ) - op.drop_column( - "evaluation_steps", - "repeat_id", - ) - op.drop_column( - "evaluation_steps", - "retry_id", - ) - - # Rename key -> step_key - op.alter_column( - "evaluation_steps", - "key", - new_column_name="step_key", - existing_type=sa.String(), # adjust if needed - existing_nullable=False, - ) - - op.drop_column( - "evaluation_metrics", - "interval", - ) - - -def downgrade() -> None: - op.add_column( - "evaluation_metrics", - sa.Column( - "interval", - sa.Integer(), - nullable=True, - ), - ) - - # Rename step_key back to key - op.alter_column( - "evaluation_steps", - "step_key", - new_column_name="key", - existing_type=sa.String(), # adjust if needed - existing_nullable=False, - ) - - # Recreate repeat_id and retry_id columns - op.add_column( - "evaluation_steps", - sa.Column("repeat_id", sa.UUID(), nullable=False), - ) - op.add_column( - "evaluation_steps", - sa.Column("retry_id", sa.UUID(), nullable=False), - ) - - # Drop repeat_idx column - op.drop_column( - "evaluation_steps", - "repeat_idx", - ) - - # Drop timestamp column - op.drop_column( - "evaluation_scenarios", - "timestamp", - ) - - # Convert meta columns back to jsonb - for table in TABLES_WITH_META_MIGRATION: - op.alter_column( - table_name=table, - column_name="meta", - type_=sa.dialects.postgresql.JSONB(), - postgresql_using="meta::jsonb", - ) - - # Convert data columns back to jsonb - for table in TABLES_WITH_DATA_MIGRATION: - op.alter_column( - table_name=table, - column_name="data", - type_=sa.dialects.postgresql.JSONB(), - postgresql_using="data::jsonb", - ) diff --git a/api/oss/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py b/api/oss/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py deleted file mode 100644 index 7a52c3d62a..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/863f8ebc200f_extend_app_type_again.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Extend app_type - -Revision ID: 863f8ebc200f -Revises: 3b5f5652f611 -Create Date: 2025-01-08 10:24:00 -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision: str = "863f8ebc200f" -down_revision: Union[str, None] = "3b5f5652f611" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -# The table/column that uses the enum -TABLE = "app_db" -COLUMN = "app_type" -TYPE_NAME = "app_type_enum" -TYPE_TEMP = "app_type_enum_temp" - -# Exact labels -ORIGINAL = ( - "CHAT_TEMPLATE", - "COMPLETION_TEMPLATE", - "CHAT_SERVICE", - "COMPLETION_SERVICE", - "CUSTOM", -) -EXTENDED = ORIGINAL + ("SDK_CUSTOM",) - - -def _create_enum(name: str, labels: tuple[str, ...]) -> None: - labels_sql = ",".join(f"'{v}'" for v in labels) - op.execute(f"CREATE TYPE {name} AS ENUM ({labels_sql})") - - -def _retype_column(to_type: str) -> None: - op.execute( - f""" - ALTER TABLE {TABLE} - ALTER COLUMN {COLUMN} - TYPE {to_type} - USING {COLUMN}::text::{to_type} - """ - ) - - -def upgrade(): - # 1) Create the replacement enum with ALL desired values - _create_enum(TYPE_TEMP, EXTENDED) - - # 2) Point the column to the tmp type - _retype_column(TYPE_TEMP) - - # 3) Drop old type and rename tmp to the canonical name - op.execute(f"DROP TYPE {TYPE_NAME}") - op.execute(f"ALTER TYPE {TYPE_TEMP} RENAME TO {TYPE_NAME}") - - -def downgrade(): - # 1) Recreate the enum WITHOUT the added values - _create_enum(TYPE_TEMP, ORIGINAL) - - # 2) Point the column back to the original label set - _retype_column(TYPE_TEMP) - - # 3) Drop current type and rename tmp back to the canonical name - op.execute(f"DROP TYPE {TYPE_NAME}") - op.execute(f"ALTER TYPE {TYPE_TEMP} RENAME TO {TYPE_NAME}") diff --git a/api/oss/databases/postgres/migrations/core/versions/911e6034d05e_add_default_project.py b/api/oss/databases/postgres/migrations/core/versions/911e6034d05e_add_default_project.py deleted file mode 100644 index 4abb6c9f3f..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/911e6034d05e_add_default_project.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Add default project to database - -Revision ID: 911e6034d05e -Revises: c5ae28e37102 -Create Date: 2024-09-04 14:28:06.934841 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa - -from oss.databases.postgres.migrations.core.data_migrations.projects import ( - create_default_project, - remove_default_project, -) - - -# revision identifiers, used by Alembic. -revision: str = "911e6034d05e" -down_revision: Union[str, None] = "c5ae28e37102" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # ### custom command ### - create_default_project() - # ### end custom command ### - - -def downgrade() -> None: - # ### custom command ### - remove_default_project() - # ### end custom command ### diff --git a/api/oss/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py b/api/oss/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py index 147cd042f8..50efe3b02e 100644 --- a/api/oss/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py +++ b/api/oss/databases/postgres/migrations/core/versions/91d3b4a8c27f_fix_ag_config.py @@ -1,5 +1,4 @@ """Fix ag_config - Revision ID: 91d3b4a8c27f Revises: 7cc66fc40298 Create Date: 2025-04-24 11:00:00 diff --git a/api/oss/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py b/api/oss/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py deleted file mode 100644 index b8a00e90c0..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/aa1b2c3d4e5f_migrate_config_parameters_jsonb_to_json.py +++ /dev/null @@ -1,132 +0,0 @@ -"""Migrate config_parameters from JSONB to JSON - -Revision ID: aa1b2c3d4e5f -Revises: d5d4d6bf738f -Create Date: 2025-01-08 12:00:00 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - - -# revision identifiers, used by Alembic. -revision: str = "aa1b2c3d4e5f" -down_revision: Union[str, None] = "d5d4d6bf738f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade(): - """ - Migrate config_parameters from JSONB to JSON type to preserve key ordering. - This involves: - 1. Creating new JSON columns - 2. Copying data from JSONB to JSON - 3. Dropping old JSONB columns - 4. Renaming new columns to original names - """ - - # Step 1: Add new JSON columns with temporary names - op.add_column( - "app_variants", - sa.Column("config_parameters_json_temp", sa.JSON(), nullable=True), - ) - - op.add_column( - "app_variant_revisions", - sa.Column("config_parameters_json_temp", sa.JSON(), nullable=True), - ) - - # Step 2: Copy data from JSONB to JSON columns - # For app_variants table - op.execute( - """ - UPDATE app_variants - SET config_parameters_json_temp = config_parameters::json - """ - ) - - # For app_variant_revisions table - op.execute( - """ - UPDATE app_variant_revisions - SET config_parameters_json_temp = config_parameters::json - """ - ) - - # Step 3: Drop the old JSONB columns - op.drop_column("app_variants", "config_parameters") - op.drop_column("app_variant_revisions", "config_parameters") - - # Step 4: Rename the new JSON columns to the original names - op.alter_column( - "app_variants", - "config_parameters_json_temp", - new_column_name="config_parameters", - nullable=False, - server_default="{}", - ) - - op.alter_column( - "app_variant_revisions", - "config_parameters_json_temp", - new_column_name="config_parameters", - nullable=False, - ) - - -def downgrade(): - """ - Migrate config_parameters from JSON back to JSONB type. - """ - - # Step 1: Add new JSONB columns with temporary names - op.add_column( - "app_variants", - sa.Column("config_parameters_jsonb_temp", postgresql.JSONB(), nullable=True), - ) - - op.add_column( - "app_variant_revisions", - sa.Column("config_parameters_jsonb_temp", postgresql.JSONB(), nullable=True), - ) - - # Step 2: Copy data from JSON to JSONB columns - # For app_variants table - op.execute( - """ - UPDATE app_variants - SET config_parameters_jsonb_temp = config_parameters::jsonb - """ - ) - - # For app_variant_revisions table - op.execute( - """ - UPDATE app_variant_revisions - SET config_parameters_jsonb_temp = config_parameters::jsonb - """ - ) - - # Step 3: Drop the old JSON columns - op.drop_column("app_variants", "config_parameters") - op.drop_column("app_variant_revisions", "config_parameters") - - # Step 4: Rename the new JSONB columns to the original names - op.alter_column( - "app_variants", - "config_parameters_jsonb_temp", - new_column_name="config_parameters", - nullable=False, - ) - - op.alter_column( - "app_variant_revisions", - "config_parameters_jsonb_temp", - new_column_name="config_parameters", - nullable=False, - ) diff --git a/api/oss/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py b/api/oss/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py deleted file mode 100644 index f6a9d6a9af..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/b3f15a7140ab_add_version_to_eval_entities.py +++ /dev/null @@ -1,107 +0,0 @@ -"""Add version to evaluation entities - -Revision ID: b3f15a7140ab -Revises: 5a71b3f140ab -Create Date: 2025-10-03 14:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -revision: str = "b3f15a7140ab" -down_revision: Union[str, None] = "5a71b3f140ab" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # BASED ON - # version = Column( - # String, - # nullable=True, - # ) - - # EVALUATION RUNS ---------------------------------------------------------- - - op.add_column( - "evaluation_runs", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.add_column( - "evaluation_scenarios", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION RESULTS ------------------------------------------------------- - - op.add_column( - "evaluation_results", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION METRICS ------------------------------------------------------- - - op.add_column( - "evaluation_metrics", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # EVALUATION QUEUES -------------------------------------------------------- - - op.add_column( - "evaluation_queues", - sa.Column( - "version", - sa.String(), - nullable=True, - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # EVALUATION QUEUES -------------------------------------------------------- - - op.drop_column("evaluation_queues", "version") - - # EVALUATION METRICS ------------------------------------------------------- - - op.drop_column("evaluation_metrics", "version") - - # EVALUATION RESULTS ------------------------------------------------------- - - op.drop_column("evaluation_results", "version") - - # EVALUATION SCENARIOS ----------------------------------------------------- - - op.drop_column("evaluation_scenarios", "version") - - # EVALUATION RUNS ---------------------------------------------------------- - - op.drop_column("evaluation_runs", "version") - - # -------------------------------------------------------------------------- diff --git a/api/oss/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py b/api/oss/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py deleted file mode 100644 index 7363127679..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/baa02d66a365_migrate_code_evaluators.py +++ /dev/null @@ -1,63 +0,0 @@ -"""migrate data.script from string to object - -Revision ID: baa02d66a365 -Revises: 863f8ebc200f -Create Date: 2025-11-06 15:49:00 -""" - -from typing import Sequence, Union -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision: str = "baa02d66a365" -down_revision: Union[str, None] = "863f8ebc200f" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # Convert data.script from a JSON string to: - # {"content": <old string>, "runtime": "python"} - op.execute( - sa.text( - """ - UPDATE public.workflow_revisions - SET data = jsonb_set( - data::jsonb, - '{script}', - jsonb_build_object( - 'content', data->>'script', - 'runtime', 'python' - ) - )::json - WHERE data->>'script' IS NOT NULL - AND json_typeof(data->'script') = 'string'; - """ - ) - ) - - -def downgrade() -> None: - # Revert only objects shaped like: - # {"content": <string>, "runtime": "python"} -> "<string>" - op.execute( - sa.text( - """ - UPDATE public.workflow_revisions - SET data = jsonb_set( - data::jsonb, - '{script}', - to_jsonb( (data->'script'->>'content') ) - )::json - WHERE json_typeof(data->'script') = 'object' - AND (data->'script') ? 'content' - AND json_typeof(data->'script'->'content') = 'string' - AND ( - (data->'script' ? 'runtime') IS FALSE - OR (data->'script'->>'runtime') = 'python' - ); - """ - ) - ) diff --git a/api/oss/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py b/api/oss/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py deleted file mode 100644 index 6d39d973aa..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/d5d4d6bf738f_add_evaluation_queues.py +++ /dev/null @@ -1,116 +0,0 @@ -"""add evaluation queues - -Revision ID: d5d4d6bf738f -Revises: fd77265d65dc -Create Date: 2025-07-10 17:04:00.000000 -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "d5d4d6bf738f" -down_revision: Union[str, None] = "fd77265d65dc" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.create_table( - "evaluation_queues", - sa.Column( - "project_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "data", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - sa.Column( - "run_id", - sa.UUID(), - nullable=False, - ), - sa.PrimaryKeyConstraint( - "project_id", - "id", - ), - sa.ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), - sa.Index( - "ix_evaluation_queues_project_id", - "project_id", - ), - sa.Index( - "ix_evaluation_queues_run_id", - "run_id", - ), - ) - - -def downgrade() -> None: - op.drop_table("evaluation_queues") diff --git a/api/oss/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py b/api/oss/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py deleted file mode 100644 index c6d85c7467..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/fa07e07350bf_add_timestamp_to_metrics.py +++ /dev/null @@ -1,34 +0,0 @@ -"""add timestamp to metrics - -Revision ID: fa07e07350bf -Revises: 30dcf07de96a -Create Date: 2025-07-30 14:55:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa - -# revision identifiers, used by Alembic. -revision: str = "fa07e07350bf" -down_revision: Union[str, None] = "30dcf07de96a" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - op.add_column( - "evaluation_metrics", - sa.Column("timestamp", sa.TIMESTAMP(timezone=True), nullable=True), - ) - op.add_column( - "evaluation_metrics", - sa.Column("interval", sa.INTEGER(), nullable=True), - ) - - -def downgrade() -> None: - op.drop_column("evaluation_metrics", "interval") - op.drop_column("evaluation_metrics", "timestamp") diff --git a/api/oss/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py b/api/oss/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py deleted file mode 100644 index 0e4666cc84..0000000000 --- a/api/oss/databases/postgres/migrations/core/versions/fd77265d65dc_fix_preview_entities.py +++ /dev/null @@ -1,232 +0,0 @@ -"""fix previw entities - -Revision ID: fd77265d65dc -Revises: 54e81e9eed88 -Create Date: 2025-05-29 16:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision: str = "fd77265d65dc" -down_revision: Union[str, None] = "54e81e9eed88" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - WORKFLOWS -------------------------------------------------------------- - - op.add_column( - "workflow_artifacts", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "workflow_variants", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "workflow_revisions", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # - TESTSETS --------------------------------------------------------------- - - op.add_column( - "testset_artifacts", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testset_variants", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testset_revisions", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # - TESTCASES -------------------------------------------------------------- - - op.add_column( - "testcase_blobs", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "flags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "meta", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.drop_column("testcase_blobs", "slug") - op.add_column( - "testcase_blobs", - sa.Column( - "created_at", - sa.TIMESTAMP(timezone=True), - server_default=sa.text("CURRENT_TIMESTAMP"), - nullable=False, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "updated_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "deleted_at", - sa.TIMESTAMP(timezone=True), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "created_by_id", - sa.UUID(), - nullable=False, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "updated_by_id", - sa.UUID(), - nullable=True, - ), - ) - op.add_column( - "testcase_blobs", - sa.Column( - "deleted_by_id", - sa.UUID(), - nullable=True, - ), - ) - - # - EVALUATIONS ------------------------------------------------------------ - - op.add_column( - "evaluation_runs", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_scenarios", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_steps", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - op.add_column( - "evaluation_metrics", - sa.Column( - "tags", - postgresql.JSONB(none_as_null=True), - nullable=True, - ), - ) - - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - WORKFLOWS -------------------------------------------------------------- - - op.drop_column("workflow_artifacts", "tags") - op.drop_column("workflow_variants", "tags") - op.drop_column("workflow_revisions", "tags") - - # - TESTSETS --------------------------------------------------------------- - - op.drop_column("testset_artifacts", "tags") - op.drop_column("testset_variants", "tags") - op.drop_column("testset_revisions", "tags") - - # - TESTCASES -------------------------------------------------------------- - - op.drop_column("testcase_blobs", "flags") - op.drop_column("testcase_blobs", "tags") - op.drop_column("testcase_blobs", "meta") - op.add_column( - "testcase_blobs", - sa.Column( - "slug", - sa.String(), - nullable=True, - ), - ) - op.drop_column("testcase_blobs", "created_at") - op.drop_column("testcase_blobs", "updated_at") - op.drop_column("testcase_blobs", "deleted_at") - op.drop_column("testcase_blobs", "created_by_id") - op.drop_column("testcase_blobs", "updated_by_id") - op.drop_column("testcase_blobs", "deleted_by_id") - - # - EVALUATIONS ------------------------------------------------------------ - - op.drop_column("evaluation_runs", "tags") - op.drop_column("evaluation_scenarios", "tags") - op.drop_column("evaluation_steps", "tags") - op.drop_column("evaluation_metrics", "tags") - - # -------------------------------------------------------------------------- diff --git a/api/oss/databases/postgres/migrations/find_head.py b/api/oss/databases/postgres/migrations/find_head.py index c435c485a9..9f024bc62f 100644 --- a/api/oss/databases/postgres/migrations/find_head.py +++ b/api/oss/databases/postgres/migrations/find_head.py @@ -43,6 +43,4 @@ # head(s) = revisions that are not anyone's down_revision heads = [rev for rev in revisions if rev not in all_down_revisions] -print("---------") -print() print("Heads:", heads) diff --git a/api/oss/databases/postgres/migrations/runner.py b/api/oss/databases/postgres/migrations/runner.py deleted file mode 100644 index f2b5fbbfb9..0000000000 --- a/api/oss/databases/postgres/migrations/runner.py +++ /dev/null @@ -1,21 +0,0 @@ -import asyncio - -from oss.databases.postgres.migrations.utils import ( - split_core_and_tracing, - copy_nodes_from_core_to_tracing, -) -from oss.databases.postgres.migrations.core.utils import ( - run_alembic_migration as migrate_core, -) -from oss.databases.postgres.migrations.tracing.utils import ( - run_alembic_migration as migrate_tracing, -) - - -if __name__ == "__main__": - loop = asyncio.get_event_loop() - - loop.run_until_complete(split_core_and_tracing()) - migrate_core() - migrate_tracing() - loop.run_until_complete(copy_nodes_from_core_to_tracing()) diff --git a/api/oss/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py b/api/oss/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py index 4b6903973b..30be9c9a30 100644 --- a/api/oss/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py +++ b/api/oss/databases/postgres/migrations/tracing/versions/847972cfa14a_add_nodes.py @@ -1,7 +1,7 @@ """add_nodes_dbe Revision ID: 847972cfa14a -Revises: 58b1b61e5d6c +Revises: 320a4a7ee0c7 Create Date: 2024-11-07 12:21:19.080345 """ diff --git a/api/oss/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py b/api/oss/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py deleted file mode 100644 index 6cb4e3f963..0000000000 --- a/api/oss/databases/postgres/migrations/tracing/versions/fd77265d65dc_fix_spans.py +++ /dev/null @@ -1,202 +0,0 @@ -"""fix spans - -Revision ID: fd77265d65dc -Revises: 847972cfa14a -Create Date: 2025-05-29 16:30:00.000000 - -""" - -from typing import Sequence, Union - -from alembic import op -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql - -from oss.src.core.tracing.dtos import SpanType -from oss.src.core.tracing.dtos import TraceType - -# revision identifiers, used by Alembic. -revision: str = "fd77265d65dc" -down_revision: Union[str, None] = "847972cfa14a" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - # - SPANS ------------------------------------------------------------------ - trace_type_enum = sa.Enum(TraceType, name="tracetype") - span_type_enum = sa.Enum(SpanType, name="spantype") - - trace_type_enum.create(op.get_bind(), checkfirst=True) - span_type_enum.create(op.get_bind(), checkfirst=True) - - op.add_column( - "spans", - sa.Column( - "trace_type", - trace_type_enum, - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "span_type", - span_type_enum, - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "hashes", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - op.add_column( - "spans", - sa.Column( - "exception", - postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), - nullable=True, - ), - ) - op.create_index( - "ix_spans_project_id_trace_type", - "spans", - ["project_id", "trace_type"], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_span_type", - "spans", - ["project_id", "span_type"], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_trace_id_created_at", - "spans", - ["project_id", "trace_id", sa.text("created_at DESC")], - if_not_exists=True, - ) - op.create_index( - "ix_spans_project_id_trace_id_start_time", - "spans", - ["project_id", "trace_id", sa.text("start_time DESC")], - if_not_exists=True, - ) - op.create_index( - "ix_hashes_gin", - "spans", - ["hashes"], - postgresql_using="gin", - postgresql_ops={"hashes": "jsonb_path_ops"}, - if_not_exists=True, - ) - op.drop_index( - "ix_events_gin", - table_name="spans", - if_exists=True, - ) - op.create_index( - "ix_events_gin", - "spans", # replace with your table name - ["events"], - postgresql_using="gin", - postgresql_ops={"events": "jsonb_path_ops"}, - if_not_exists=True, - ) - op.create_index( - "ix_spans_fts_attributes_gin", - "spans", - [sa.text("to_tsvector('simple', attributes)")], - postgresql_using="gin", - if_not_exists=True, - ) - op.create_index( - "ix_spans_fts_events_gin", - "spans", - [sa.text("to_tsvector('simple', events)")], - postgresql_using="gin", - if_not_exists=True, - ) - # -------------------------------------------------------------------------- - - -def downgrade() -> None: - # - SPANS ------------------------------------------------------------------ - op.drop_index( - "ix_spans_fts_events_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_fts_attributes_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_events_gin", - table_name="spans", - if_exists=True, - ) - op.create_index( - "ix_events_gin", - "spans", - ["events"], - postgresql_using="gin", - if_not_exists=True, - ) - op.drop_index( - "ix_hashes_gin", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_id_start_time", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_id_created_at", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_span_type", - table_name="spans", - if_exists=True, - ) - op.drop_index( - "ix_spans_project_id_trace_type", - table_name="spans", - if_exists=True, - ) - op.drop_column( - "spans", - "exception", - if_exists=True, - ) - op.drop_column( - "spans", - "hashes", - if_exists=True, - ) - op.drop_column( - "spans", - "span_type", - if_exists=True, - ) - op.drop_column( - "spans", - "trace_type", - if_exists=True, - ) - - span_type_enum = sa.Enum(SpanType, name="spantype") - trace_type_enum = sa.Enum(TraceType, name="tracetype") - - span_type_enum.drop(op.get_bind(), checkfirst=True) - trace_type_enum.drop(op.get_bind(), checkfirst=True) - # -------------------------------------------------------------------------- diff --git a/api/oss/databases/postgres/migrations/utils.py b/api/oss/databases/postgres/migrations/utils.py index 12450b767d..1147d9e5c7 100644 --- a/api/oss/databases/postgres/migrations/utils.py +++ b/api/oss/databases/postgres/migrations/utils.py @@ -1,10 +1,8 @@ import os -import subprocess import tempfile +import subprocess from sqlalchemy import create_engine, text -from sqlalchemy.ext.asyncio import create_async_engine - from sqlalchemy.exc import ProgrammingError from oss.src.utils.env import env @@ -15,9 +13,9 @@ os.getenv("POSTGRES_URI") or env.POSTGRES_URI_CORE or env.POSTGRES_URI_TRACING - or "postgresql+asyncpg://username:password@localhost:5432/agenta_oss" + or "postgresql://username:password@localhost:5432/agenta_oss" ) -DB_PROTOCOL = POSTGRES_URI.split("://")[0] # .replace("+asyncpg", "") +DB_PROTOCOL = POSTGRES_URI.split("://")[0].replace("+asyncpg", "") DB_USER = POSTGRES_URI.split("://")[1].split(":")[0] DB_PASS = POSTGRES_URI.split("://")[1].split(":")[1].split("@")[0] DB_HOST = POSTGRES_URI.split("@")[1].split(":")[0] @@ -35,43 +33,36 @@ "agenta_oss_tracing": "agenta_oss_tracing", } - NODES_TF = { "agenta_oss_core": "agenta_oss_tracing", } -async def copy_nodes_from_core_to_tracing(): - engine = create_async_engine( +def copy_nodes_from_core_to_tracing(): + engine = create_engine( POSTGRES_URI_POSTGRES, isolation_level="AUTOCOMMIT", ) - async with engine.begin() as conn: + with engine.connect() as conn: for old_name, new_name in NODES_TF.items(): - old_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": old_name}, - ) + old_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": old_name}, ).scalar() - new_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": new_name}, - ) + new_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": new_name}, ).scalar() if old_exists and new_exists: # Check if the nodes table exists in old_name database check_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{old_name}" - check_engine = create_async_engine(check_url) - async with check_engine.begin() as conn: - result = ( - await conn.execute( - text("SELECT to_regclass('public.nodes')"), - ) + check_engine = create_engine(check_url) + with check_engine.connect() as conn: + result = conn.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() if result is None: print( @@ -79,10 +70,8 @@ async def copy_nodes_from_core_to_tracing(): ) return - count = ( - await conn.execute( - text("SELECT COUNT(*) FROM public.nodes"), - ) + count = conn.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() if count == 0: @@ -92,18 +81,14 @@ async def copy_nodes_from_core_to_tracing(): return check_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" - check_engine = create_async_engine(check_url) + check_engine = create_engine(check_url) - async with check_engine.begin() as conn: - count = ( - await conn.execute( - text( - "SELECT COUNT(*) FROM public.nodes", - ) - ) + with check_engine.connect() as conn: + count = conn.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() - if (count or 0) > 0: + if count > 0: print( f"⚠️ Table 'nodes' already exists in '{new_name}' with {count} rows. Skipping copy." ) @@ -163,26 +148,21 @@ async def copy_nodes_from_core_to_tracing(): print(f"✔ Restored 'nodes' table into '{new_name}'") # Step 3: Verify 'nodes' exists in both DBs, then drop from old - source_engine = create_async_engine( + source_engine = create_engine( f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{old_name}" ) - dest_engine = create_async_engine( + dest_engine = create_engine( f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" ) - async with source_engine.begin() as src, dest_engine.begin() as dst: - src = await src.execution_options(isolation_level="AUTOCOMMIT") - dst = await dst.execution_options(isolation_level="AUTOCOMMIT") - - src_exists = ( - await src.execute( - text("SELECT to_regclass('public.nodes')") - ) + with source_engine.connect().execution_options( + autocommit=True + ) as src, dest_engine.connect() as dst: + src_exists = src.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() - dst_exists = ( - await dst.execute( - text("SELECT to_regclass('public.nodes')"), - ) + dst_exists = dst.execute( + text("SELECT to_regclass('public.nodes')") ).scalar() if src_exists and dst_exists: @@ -204,10 +184,8 @@ async def copy_nodes_from_core_to_tracing(): env={**os.environ, "PGPASSWORD": DB_PASS}, ) - count = ( - await src.execute( - text("SELECT COUNT(*) FROM public.nodes"), - ) + count = src.execute( + text("SELECT COUNT(*) FROM public.nodes") ).scalar() print(f"✅ Remaining rows: {count}") @@ -219,32 +197,28 @@ async def copy_nodes_from_core_to_tracing(): os.remove(dump_file) -async def split_core_and_tracing(): - engine = create_async_engine( +def split_core_and_tracing(): + engine = create_engine( POSTGRES_URI_POSTGRES, isolation_level="AUTOCOMMIT", ) - async with engine.begin() as conn: + with engine.connect() as conn: for old_name, new_name in RENAME_MAP.items(): - old_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": old_name}, - ) + old_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": old_name}, ).scalar() - new_exists = ( - await conn.execute( - text("SELECT 1 FROM pg_database WHERE datname = :name"), - {"name": new_name}, - ) + new_exists = conn.execute( + text("SELECT 1 FROM pg_database WHERE datname = :name"), + {"name": new_name}, ).scalar() if old_exists and not new_exists: print(f"Renaming database '{old_name}' → '{new_name}'...") try: - await conn.execute( + conn.execute( text(f"ALTER DATABASE {old_name} RENAME TO {new_name}") ) print(f"✔ Renamed '{old_name}' to '{new_name}'") @@ -262,7 +236,7 @@ async def split_core_and_tracing(): ) try: # Ensure the role exists - await conn.execute( + conn.execute( text( f""" DO $$ @@ -278,11 +252,11 @@ async def split_core_and_tracing(): print(f"✔ Ensured role '{DB_USER}' exists") # Create the new database - await conn.execute(text(f"CREATE DATABASE {new_name}")) + conn.execute(text(f"CREATE DATABASE {new_name}")) print(f"✔ Created database '{new_name}'") # Grant privileges on the database to the role - await conn.execute( + conn.execute( text( f"GRANT ALL PRIVILEGES ON DATABASE {new_name} TO {DB_USER}" ) @@ -292,12 +266,12 @@ async def split_core_and_tracing(): ) # Connect to the new database to grant schema permissions - new_db_url = f"{DB_PROTOCOL}://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" + new_db_url = f"postgresql://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{new_name}" - async with create_async_engine( + with create_engine( new_db_url, isolation_level="AUTOCOMMIT" - ).begin() as new_db_conn: - await new_db_conn.execute( + ).connect() as new_db_conn: + new_db_conn.execute( text(f"GRANT ALL ON SCHEMA public TO {DB_USER}") ) print( diff --git a/api/oss/docker/Dockerfile.dev b/api/oss/docker/Dockerfile.dev index 8b500fd96e..1f25f8f92d 100644 --- a/api/oss/docker/Dockerfile.dev +++ b/api/oss/docker/Dockerfile.dev @@ -15,31 +15,10 @@ RUN apt-get update && \ RUN pip install --upgrade pip \ && pip install poetry -# COPY ./oss /app/oss/ COPY ./entrypoint.py ./pyproject.toml /app/ -# RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi -# - -ENV PYTHONPATH=/sdk:$PYTHONPATH - -# -# -# -# - -# -# - -COPY ./oss/src/crons/queries.sh /queries.sh -COPY ./oss/src/crons/queries.txt /etc/cron.d/queries-cron -RUN sed -i -e '$a\' /etc/cron.d/queries-cron -RUN cat -A /etc/cron.d/queries-cron - -RUN chmod +x /queries.sh \ - && chmod 0644 /etc/cron.d/queries-cron -EXPOSE 8000 +EXPOSE 8000 \ No newline at end of file diff --git a/api/oss/docker/Dockerfile.gh b/api/oss/docker/Dockerfile.gh index a9bd7c8365..d8c2477835 100644 --- a/api/oss/docker/Dockerfile.gh +++ b/api/oss/docker/Dockerfile.gh @@ -15,31 +15,10 @@ RUN apt-get update && \ RUN pip install --upgrade pip \ && pip install poetry -# COPY ./oss /app/oss/ COPY ./entrypoint.py ./pyproject.toml /app/ -COPY ./sdk /sdk/ RUN poetry config virtualenvs.create false \ - && poetry install --no-interaction --no-ansi \ - && pip install --force-reinstall --upgrade /sdk/ + && poetry install --no-interaction --no-ansi -# - -# -# -# -# - -# -# - -COPY ./oss/src/crons/queries.sh /queries.sh -COPY ./oss/src/crons/queries.txt /etc/cron.d/queries-cron -RUN sed -i -e '$a\' /etc/cron.d/queries-cron -RUN cat -A /etc/cron.d/queries-cron - -RUN chmod +x /queries.sh \ - && chmod 0644 /etc/cron.d/queries-cron - -EXPOSE 8000 +EXPOSE 8000 \ No newline at end of file diff --git a/api/oss/src/__init__.py b/api/oss/src/__init__.py index 65fef7aadf..60bef7a5b0 100644 --- a/api/oss/src/__init__.py +++ b/api/oss/src/__init__.py @@ -1,5 +1,5 @@ from urllib.parse import urlparse -from typing import Optional, Any, Dict, Union, List, Set +from typing import Optional, Any, Dict, Union, List from supertokens_python.types import AccountInfo from supertokens_python.asyncio import list_users_by_account_info @@ -42,12 +42,9 @@ SignUpPostOkResult as EmailPasswordSignUpPostOkResult, ) -import posthog - -from oss.src.utils.caching import get_cache, set_cache from oss.src.utils.env import env from oss.src.utils.common import is_ee -from oss.src.services.exceptions import UnauthorizedException +from oss.src.services.exceptions import SuperTokensNotAllowedException from oss.src.services.db_manager import ( get_user_with_email, check_if_user_invitation_exists, @@ -59,121 +56,6 @@ is_input_email, ) - -async def _get_blocked_domains() -> Set[str]: - # 1. If env var is defined and is not empty, always use it - if env.AGENTA_BLOCKED_DOMAINS: - return env.AGENTA_BLOCKED_DOMAINS - - # 2. Else, try PostHog feature flags if API key is present - if env.POSTHOG_API_KEY: - feature_flag = "blocked-domains" - cache_key = { - "ff": feature_flag, - } - - # Try cache first - flag_blocked_domains: Optional[Set[str]] = await get_cache( - namespace="posthog:flags", - key=cache_key, - retry=False, - ) - - if flag_blocked_domains is not None: - return set(flag_blocked_domains) - - # Fetch from PostHog if not cached - flag_blocked_domains = posthog.get_feature_flag( - feature_flag, - "user distinct id", - ) - - # Normalize to set - blocked_set = list( - {e.strip().lower() for e in flag_blocked_domains} - if isinstance(flag_blocked_domains, (list, set, tuple)) - else set() - ) - - # Cache the result - await set_cache( - namespace="posthog:flags", - key=cache_key, - value=blocked_set, - ) - - return set(blocked_set) - - # 3. Else, return empty set - return set() - - -async def _get_blocked_emails() -> Set[str]: - # 1. If env var is defined and is not empty, always use it - if env.AGENTA_BLOCKED_EMAILS: - return env.AGENTA_BLOCKED_EMAILS - - # 2. Else, try PostHog feature flags if API key is present - if env.POSTHOG_API_KEY: - feature_flag = "blocked-emails" - cache_key = { - "ff": feature_flag, - } - - # Try cache first - flag_blocked_emails: Optional[Set[str]] = await get_cache( - namespace="posthog:flags", - key=cache_key, - retry=False, - ) - - if flag_blocked_emails is not None: - return set(flag_blocked_emails) - - # Fetch from PostHog if not cached - flag_blocked_emails = posthog.get_feature_flag( - feature_flag, - "user distinct id", - ) - - # Normalize to set - blocked_set = list( - {e.strip().lower() for e in flag_blocked_emails} - if isinstance(flag_blocked_emails, (list, set, tuple)) - else set() - ) - - # Cache the result - await set_cache( - namespace="posthog:flags", - key=cache_key, - value=blocked_set, - ) - - return set(blocked_set) - - # 3. Else, return empty set - return set() - - -async def _is_blocked(email: str) -> bool: - email = email.lower() - domain = email.split("@")[-1] if "@" in email else "" - allowed_domains = env.AGENTA_ALLOWED_DOMAINS - is_domain_allowed = allowed_domains and domain in allowed_domains - - if allowed_domains and not is_domain_allowed: - return True - - if email and email in await _get_blocked_emails(): - return True - - if domain and domain in await _get_blocked_domains() and not is_domain_allowed: - return True - - return False - - if is_ee(): from ee.src.services.commoners import create_accounts else: @@ -209,18 +91,11 @@ async def consume_code_post( # Post sign up response, we check if it was successful if isinstance(response, ConsumeCodeOkResult): - if is_ee() and await _is_blocked(response.user.emails[0]): - raise UnauthorizedException(detail="This email is not allowed.") payload = { "uid": response.user.id, "email": response.user.emails[0], } - if is_ee(): - await create_accounts(payload) - else: - raise Exception( - "passwordless account creation is not available in OSS." - ) + await create_accounts(payload) return response @@ -254,18 +129,11 @@ async def thirdparty_sign_in_up_post( ) if isinstance(response, SignInUpPostOkResult): - if is_ee() and await _is_blocked(response.user.emails[0]): - raise UnauthorizedException(detail="This email is not allowed.") payload = { "uid": response.user.id, "email": response.user.emails[0], } - if is_ee(): - await create_accounts(payload) - else: - raise Exception( - "third-party-api account creation is not available in OSS." - ) + await create_accounts(payload) return response @@ -287,8 +155,6 @@ async def sign_in_post( user_context: Dict[str, Any], ): if form_fields[0].id == "email" and is_input_email(form_fields[0].value): - if is_ee() and await _is_blocked(form_fields[0].value): - raise UnauthorizedException(detail="This email is not allowed.") user_id = await get_user_with_email(form_fields[0].value) if user_id is not None: supertokens_user = await get_user_from_supertokens(user_id) @@ -324,8 +190,6 @@ async def sign_up_post( ): # FLOW 1: Sign in email = form_fields[0].value - if is_ee() and await _is_blocked(email): - raise UnauthorizedException(detail="This email is not allowed.") user_info_from_st = await list_users_by_account_info( tenant_id="public", account_info=AccountInfo(email=email) ) @@ -350,8 +214,8 @@ async def sign_up_post( organization_id=str(organization_db.id), ) if not user_invitation_exists: - raise UnauthorizedException( - detail="You need to be invited by the organization owner to gain access." + return SuperTokensNotAllowedException( + message="You need to be invited by the organization owner to gain access." ) response = await og_sign_up_post( diff --git a/api/oss/src/apis/fastapi/annotations/models.py b/api/oss/src/apis/fastapi/annotations/models.py index 0d7444e203..f010c8fb1c 100644 --- a/api/oss/src/apis/fastapi/annotations/models.py +++ b/api/oss/src/apis/fastapi/annotations/models.py @@ -1,20 +1,77 @@ -from typing import Optional, List +from typing import Optional, List, Dict +from datetime import datetime +from enum import Enum -from pydantic import BaseModel +from pydantic import BaseModel, Field -from oss.src.core.shared.dtos import ( - Link, - Windowing, -) -from oss.src.core.annotations.types import ( - Annotation, - AnnotationCreate, - AnnotationEdit, - AnnotationQuery, -) +from oss.src.core.shared.dtos import Reference, Lifecycle, Data, Meta +from oss.src.core.tracing.dtos import Link -# ANNOTATIONS ------------------------------------------------------------------ +class AnnotationReference(Reference): + attributes: dict = Field(default=None, exclude=True) + + +class AnnotationLink(Link): + attributes: dict = Field(default=None, exclude=True) + + +AnnotationLinks = Dict[str, AnnotationLink] +AnnotationLifecycle = Lifecycle +AnnotationData = Data +AnnotationMeta = Meta + + +class AnnotationKind(str, Enum): + CUSTOM = "custom" # EXTERNAL + HUMAN = "human" + AUTO = "auto" + + +class AnnotationSource(str, Enum): + WEB = "web" + SDK = "sdk" # python vs typescript ? + API = "api" # http vs otlp ? + + +class AnnotationReferences(BaseModel): + # environment: Optional[AnnotationReference] = None + evaluator: AnnotationReference + testset: Optional[AnnotationReference] = None + testcase: Optional[AnnotationReference] = None + + +class Annotation(AnnotationLink, AnnotationLifecycle): + kind: AnnotationKind = AnnotationKind.CUSTOM + source: AnnotationSource = AnnotationSource.API + data: AnnotationData + meta: Optional[AnnotationMeta] = None + references: AnnotationReferences + links: AnnotationLinks + + +class AnnotationCreate(BaseModel): + kind: AnnotationKind = AnnotationKind.CUSTOM + source: AnnotationSource = AnnotationSource.API + data: AnnotationData + meta: Optional[AnnotationMeta] = None + references: AnnotationReferences + links: AnnotationLinks + + +class AnnotationEdit(BaseModel): + data: AnnotationData + meta: Optional[AnnotationMeta] = None + + +class AnnotationQuery(BaseModel): + trace_id: Optional[str] = None + span_id: Optional[str] = None + kind: Optional[AnnotationKind] = AnnotationKind.CUSTOM + source: Optional[AnnotationSource] = AnnotationSource.API + meta: Optional[AnnotationMeta] = None + references: Optional[AnnotationReferences] = None + links: Optional[AnnotationLinks] = None class AnnotationCreateRequest(BaseModel): @@ -27,27 +84,18 @@ class AnnotationEditRequest(BaseModel): class AnnotationQueryRequest(BaseModel): annotation: Optional[AnnotationQuery] = None - # - annotation_links: Optional[List[Link]] = None - # - windowing: Optional[Windowing] = None class AnnotationResponse(BaseModel): - count: int = 0 annotation: Optional[Annotation] = None class AnnotationsResponse(BaseModel): - count: int = 0 + count: int + oldest: Optional[datetime] = None + limit: Optional[int] = None annotations: List[Annotation] = [] class AnnotationLinkResponse(BaseModel): - count: int = 0 - annotation_link: Optional[Link] = None - - -class AnnotationLinksResponse(BaseModel): - count: int = 0 - annotation_links: List[Link] = [] + annotation: AnnotationLink diff --git a/api/oss/src/apis/fastapi/annotations/router.py b/api/oss/src/apis/fastapi/annotations/router.py index 85e67ec633..5024a679af 100644 --- a/api/oss/src/apis/fastapi/annotations/router.py +++ b/api/oss/src/apis/fastapi/annotations/router.py @@ -1,27 +1,68 @@ -from typing import Optional, Union -from uuid import UUID +from typing import Optional, List +from uuid import uuid4, UUID -from fastapi import APIRouter, Request, Response, status +from genson import SchemaBuilder +from jsonschema import ( + Draft202012Validator, + Draft7Validator, + Draft4Validator, + Draft6Validator, + Draft201909Validator, +) + +from fastapi import Request, status, HTTPException, Response -from oss.src.utils.common import is_ee +from oss.src.utils.common import APIRouter, is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache -from oss.src.core.shared.dtos import ( - Link, +from oss.src.core.shared.dtos import Reference, Meta +from oss.src.core.tracing.dtos import Link, Focus, Format, Query, Formatting, Filtering +from oss.src.core.workflows.dtos import WorkflowFlags, WorkflowData +from oss.src.core.workflows.service import WorkflowsService +from oss.src.core.tracing.service import TracingService +from oss.src.apis.fastapi.tracing.router import TracingRouter +from oss.src.apis.fastapi.shared.utils import handle_exceptions + +from oss.src.apis.fastapi.tracing.models import ( + OTelFlatSpan, + OTelTracingRequest, + OTelTracingResponse, ) -from oss.src.core.annotations.service import ( - AnnotationsService, + +from oss.src.core.workflows.dtos import ( + WorkflowArtifact, + WorkflowVariant, + WorkflowRevision, +) + +from oss.src.apis.fastapi.evaluators.models import Evaluator +from oss.src.apis.fastapi.annotations.models import Annotation + +from oss.src.apis.fastapi.annotations.utils import ( + parse_into_attributes, + parse_from_attributes, ) from oss.src.apis.fastapi.annotations.models import ( AnnotationCreateRequest, AnnotationEditRequest, - AnnotationQueryRequest, AnnotationResponse, AnnotationsResponse, + AnnotationQueryRequest, AnnotationLinkResponse, + Annotation, + AnnotationKind, + AnnotationSource, + AnnotationData, + AnnotationMeta, + AnnotationReference, + AnnotationReferences, + AnnotationLink, + AnnotationLinks, +) + +from oss.src.apis.fastapi.annotations.utils import ( + AnnotationFlags, ) if is_ee(): @@ -32,19 +73,94 @@ log = get_module_logger(__name__) +def get_jsonschema_validator(format: dict): + schema_uri = format.get("$schema", "https://json-schema.org/draft/2020-12/schema") + + if "2020-12" in schema_uri: + return Draft202012Validator + elif "2019-09" in schema_uri: + return Draft201909Validator + elif "draft-07" in schema_uri: + return Draft7Validator + elif "draft-06" in schema_uri: + return Draft6Validator + elif "draft-04" in schema_uri: + return Draft4Validator + return Draft202012Validator # fallback + + +def validate_data_against_schema( + data: dict, + schema: dict, # pylint: disable=redefined-builtin +): + validator_class = get_jsonschema_validator(schema) + validator = validator_class(schema) + + errors = list(validator.iter_errors(data)) + + if errors: + details = [] + for e in errors: + loc = list(e.absolute_path) + msg = e.message + details.append( + { + "loc": ["body", "annotation", "data"] + loc, + "msg": msg, + "type": "value_error.json_schema", + } + ) + + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=details + ) + + +def format_validation_error(e, request_body=None): + formatted_errors = [] + + for error in e.errors(): + loc = error.get("loc", []) + + if not loc or loc[0] != "body": + loc = ["body"] + list(loc) + + error_detail = { + "type": error.get("type", "value_error"), + "loc": loc, + "msg": error.get("msg", "Validation error"), + } + + if "input" in error: + error_detail["input"] = error.get("input") + elif request_body is not None: + error_detail["input"] = request_body + + formatted_errors.append(error_detail) + + return formatted_errors + + class AnnotationsRouter: + VERSION = "1.0.0" + def __init__( self, *, - annotations_service: AnnotationsService, + tracing_service: TracingService, + workflows_service: WorkflowsService, ): - self.annotations_service = annotations_service + self.tracing_service = tracing_service + self.workflows_service = workflows_service - self.router = APIRouter() + # Needed until we clean up the router/service # FIX ME / REMOVE ME # + self.tracing_router = TracingRouter( + tracing_service=self.tracing_service, + ) - # ANNOTATIONS ---------------------------------------------------------- + self.router = APIRouter() - # POST /api/annotations/ + # POST /api/v1/annotations/ self.router.add_api_route( "/", self.create_annotation, @@ -55,18 +171,7 @@ def __init__( response_model_exclude_none=True, ) - # GET /api/annotations/{trace_id} - self.router.add_api_route( - "/{trace_id}", - self.fetch_annotation, - methods=["GET"], - operation_id="fetch_annotation_by_trace_id", - status_code=status.HTTP_200_OK, - response_model=AnnotationResponse, - response_model_exclude_none=True, - ) - - # GET /api/annotations/{trace_id}/{span_id} + # GET /api/v1/annotations/{trace_id}/{span_id} self.router.add_api_route( "/{trace_id}/{span_id}", self.fetch_annotation, @@ -76,19 +181,7 @@ def __init__( response_model=AnnotationResponse, response_model_exclude_none=True, ) - - # PUT /api/annotations/{trace_id} - self.router.add_api_route( - "/{trace_id}", - self.edit_annotation, - methods=["PATCH"], - operation_id="edit_annotation_by_trace_id", - status_code=status.HTTP_200_OK, - response_model=AnnotationResponse, - response_model_exclude_none=True, - ) - - # PUT /api/annotations/{trace_id}/{span_id} + # PUT /api/v1/annotations/{trace_id}/{span_id} self.router.add_api_route( "/{trace_id}/{span_id}", self.edit_annotation, @@ -99,29 +192,29 @@ def __init__( response_model_exclude_none=True, ) - # DELETE /api/annotations/{trace_id} + # DELETE /api/v1/annotations/{trace_id}/{span_id} self.router.add_api_route( - "/{trace_id}", + "/{trace_id}/{span_id}", self.delete_annotation, methods=["DELETE"], - operation_id="delete_annotation_by_trace_id", + operation_id="delete_annotation", status_code=status.HTTP_200_OK, response_model=AnnotationLinkResponse, response_model_exclude_none=True, ) - # DELETE /api/annotations/{trace_id}/{span_id} + # GET /api/v1/annotations/?... self.router.add_api_route( - "/{trace_id}/{span_id}", - self.delete_annotation, - methods=["DELETE"], - operation_id="delete_annotation", + "/", + self.query_annotations, + methods=["GET"], + operation_id="query_annotations", status_code=status.HTTP_200_OK, - response_model=AnnotationLinkResponse, + response_model=AnnotationResponse, response_model_exclude_none=True, ) - # POST /api/annotations/query # FIX ME / REMOVE ME # + # POST /api/v1/annotations/query # FIX ME / REMOVE ME # self.router.add_api_route( "/query", self.query_annotations, @@ -132,159 +225,299 @@ def __init__( response_model_exclude_none=True, ) - # ANNOTATIONS -------------------------------------------------------------- - - @intercept_exceptions() + @handle_exceptions() async def create_annotation( self, - request: Request, *, - annotation_create_request: AnnotationCreateRequest, + request: Request, + annotation_request: AnnotationCreateRequest, ) -> AnnotationResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_ANNOTATIONS, # type: ignore + permission=Permission.EDIT_ANNOTATIONS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION + + project_id = UUID(request.state.project_id) + user_id = UUID(request.state.user_id) - annotation = await self.annotations_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), + cache_key = { + "project_id": project_id, + "evaluator_slug": annotation_request.annotation.references.evaluator.slug, + } + + evaluator_flags = WorkflowFlags( + is_evaluator=True, + is_custom=annotation_request.annotation.kind == AnnotationKind.CUSTOM, + is_human=annotation_request.annotation.kind == AnnotationKind.HUMAN, + ) + + evaluator: Optional[Evaluator] = await self._fetch_evaluator( + project_id=project_id, # - annotation_create=annotation_create_request.annotation, + evaluator_slug=annotation_request.annotation.references.evaluator.slug, + ) + + if evaluator is None: + builder = SchemaBuilder() + builder.add_object(annotation_request.annotation.data) + evaluator_format = builder.to_schema() # pylint: disable=redefined-builtin + + evaluator: Optional[Evaluator] = await self._create_evaluator( + project_id=project_id, + user_id=user_id, + # + evaluator_slug=annotation_request.annotation.references.evaluator.slug, + # + evaluator_flags=evaluator_flags, + evaluator_meta=annotation_request.annotation.meta, + evaluator_format=evaluator_format, + ) + + if evaluator is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) + + validate_data_against_schema( + annotation_request.annotation.data, + evaluator.data.service.get("format", {}), + ) + + annotation_request.annotation.references.evaluator = Reference( + id=evaluator.id, + slug=evaluator.slug, + ) + + annotation_flags = AnnotationFlags( + is_evaluator=True, + is_custom=evaluator_flags.is_custom, + is_human=evaluator_flags.is_human, + is_sdk=annotation_request.annotation.source == AnnotationSource.SDK, + is_web=annotation_request.annotation.source == AnnotationSource.WEB, + ) + + annotation_link: Optional[Link] = await self._create_annotation( + request=request, + annotation_data=annotation_request.annotation.data, + annotation_meta=annotation_request.annotation.meta, + annotation_references=annotation_request.annotation.references, + annotation_links=annotation_request.annotation.links, + annotation_flags=annotation_flags, + ) + + if annotation_link is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create annotation. Please try again or contact support.", + ) + + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, ) + if annotation is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to fetch annotation. Please try again or contact support.", + ) + annotation_response = AnnotationResponse( - count=1 if annotation else 0, annotation=annotation, ) return annotation_response - @intercept_exceptions() - @suppress_exceptions(default=AnnotationResponse()) + @handle_exceptions() async def fetch_annotation( self, - request: Request, *, + request: Request, trace_id: str, - span_id: Optional[str] = None, - ) -> Union[Response, AnnotationResponse]: + span_id: str, + ) -> AnnotationResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_ANNOTATIONS, # type: ignore + permission=Permission.VIEW_ANNOTATIONS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - annotation = await self.annotations_service.fetch( - project_id=UUID(request.state.project_id), - # + annotation_link = AnnotationLink( trace_id=trace_id, span_id=span_id, ) + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, + ) + + if annotation is None: + return Response(status_code=status.HTTP_404_NOT_FOUND) + annotation_response = AnnotationResponse( - count=1 if annotation else 0, annotation=annotation, ) return annotation_response - @intercept_exceptions() + @handle_exceptions() async def edit_annotation( self, - request: Request, *, + request: Request, trace_id: str, - span_id: Optional[str] = None, - # - annotation_edit_request: AnnotationEditRequest, + span_id: str, + annotation_request: AnnotationEditRequest, ) -> AnnotationResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_ANNOTATIONS, # type: ignore + permission=Permission.EDIT_ANNOTATIONS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - annotation = await self.annotations_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # + annotation_link = AnnotationLink( trace_id=trace_id, span_id=span_id, - # - annotation_edit=annotation_edit_request.annotation, ) + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, + ) + + if annotation is None: + return Response(status_code=status.HTTP_404_NOT_FOUND) + + annotation_link = AnnotationLink( + trace_id=annotation.trace_id, + span_id=annotation.span_id, + ) + + annotation_flags = AnnotationFlags( + is_evaluator=True, + is_custom=annotation.kind == AnnotationKind.CUSTOM, + is_human=annotation.kind == AnnotationKind.HUMAN, + is_sdk=annotation.source == AnnotationSource.SDK, + is_web=annotation.source == AnnotationSource.WEB, + ) + + annotation_link: Optional[Link] = await self._edit_annotation( + request=request, + annotation_link=annotation_link, + annotation_data=annotation_request.annotation.data, + annotation_meta=annotation_request.annotation.meta, + annotation_references=annotation.references, + annotation_links=annotation.links, + annotation_flags=annotation_flags, + ) + + if annotation_link is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create annotation. Please try again or contact support.", + ) + + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, + ) + + if annotation is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to fetch annotation. Please try again or contact support.", + ) + annotation_response = AnnotationResponse( - count=1 if annotation else 0, annotation=annotation, ) return annotation_response - @intercept_exceptions() + @handle_exceptions() async def delete_annotation( self, - request: Request, *, + request: Request, trace_id: str, - span_id: Optional[str] = None, + span_id: str, ) -> AnnotationLinkResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_ANNOTATIONS, # type: ignore + permission=Permission.DELETE_ANNOTATIONS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - annotation_link: Optional[Link] = await self.annotations_service.delete( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # + annotation_link = AnnotationLink( trace_id=trace_id, span_id=span_id, ) - annotation_link_response = AnnotationLinkResponse( - count=1 if annotation_link else 0, + annotation: Optional[Annotation] = await self._delete_annotation( + request=request, annotation_link=annotation_link, ) + if annotation is None: + return Response(status_code=status.HTTP_204_NO_CONTENT) + + annotation_link_response = AnnotationLinkResponse( + annotation=annotation_link, + ) + return annotation_link_response - @intercept_exceptions() - @suppress_exceptions(default=AnnotationsResponse()) + @handle_exceptions() async def query_annotations( self, - request: Request, *, - annotation_query_request: AnnotationQueryRequest, - ) -> AnnotationsResponse: + request: Request, + query_request: Optional[AnnotationQueryRequest] = None, + ) -> AnnotationResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_ANNOTATIONS, # type: ignore + permission=Permission.VIEW_ANNOTATIONS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - annotations = await self.annotations_service.query( - project_id=UUID(request.state.project_id), - # - annotation_query=annotation_query_request.annotation, - # - annotation_links=annotation_query_request.annotation_links, - # - windowing=annotation_query_request.windowing, - ) + annotations = [] + + if query_request is None or query_request.annotation is None: + annotations = await self._query_annotation( + request=request, + ) + + else: + annotation_flags = AnnotationFlags( + is_evaluator=True, + is_custom=query_request.annotation.kind == AnnotationKind.CUSTOM, + is_human=query_request.annotation.kind == AnnotationKind.HUMAN, + is_sdk=query_request.annotation.source == AnnotationSource.SDK, + is_web=query_request.annotation.source == AnnotationSource.WEB, + ) + + annotations = await self._query_annotation( + request=request, + trace_id=query_request.annotation.trace_id, + span_id=query_request.annotation.span_id, + flags=annotation_flags, + meta=query_request.annotation.meta, + references=query_request.annotation.references, + links=query_request.annotation.links, + ) annotations_response = AnnotationsResponse( count=len(annotations), @@ -292,3 +525,641 @@ async def query_annotations( ) return annotations_response + + # - EVALUATORS ------------------------------------------------------------- + + @handle_exceptions() + async def _create_evaluator( + self, + *, + project_id: UUID, + user_id: UUID, + evaluator_slug: str, + evaluator_format: dict, + evaluator_flags: Optional[WorkflowFlags] = None, + evaluator_meta: Optional[Meta] = None, + ) -> Optional[Evaluator]: + workflow_revision_data = WorkflowData( + service=dict( + agenta="v0.1.0", + format=evaluator_format, + ) + ) + + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.create_artifact( + project_id=project_id, + user_id=user_id, + # + artifact_slug=evaluator_slug, + # + artifact_flags=evaluator_flags, + artifact_meta=evaluator_meta, + ) + ) + + if workflow_artifact is None: + return None + + workflow_variant_slug = uuid4().hex + + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.create_variant( + project_id=project_id, + user_id=user_id, + # + artifact_id=workflow_artifact.id, + # + variant_slug=workflow_variant_slug, + # + variant_flags=evaluator_flags, + variant_meta=evaluator_meta, + ) + ) + + if workflow_variant is None: + return None + + workflow_revision_slug = uuid4().hex + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.create_revision( + project_id=project_id, + user_id=user_id, + # + artifact_id=workflow_artifact.id, + variant_id=workflow_variant.id, + # + revision_slug=workflow_revision_slug, + # + revision_flags=evaluator_flags, + revision_meta=evaluator_meta, + ) + ) + + if workflow_revision is None: + return None + + workflow_revision_slug = uuid4().hex + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.commit_revision( + project_id=project_id, + user_id=user_id, + # + variant_id=workflow_variant.id, + # + revision_slug=workflow_revision_slug, + # + revision_flags=evaluator_flags, + revision_meta=evaluator_meta, + revision_data=workflow_revision_data, + ) + ) + + if workflow_revision is None: + # do something + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) + + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, + # + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, + ) + + return evaluator + + @handle_exceptions() + async def _fetch_evaluator( + self, + *, + project_id: UUID, + evaluator_slug: str, # Added evaluator_slug parameter + ) -> Optional[Evaluator]: + workflow_artifact_ref = Reference( + slug=evaluator_slug, + ) + + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.fetch_artifact( + project_id=project_id, + # + artifact_ref=workflow_artifact_ref, + ) + ) + + if workflow_artifact is None: + return None + + workflow_artifact_ref = Reference( + id=workflow_artifact.id, + ) + + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.fetch_variant( + project_id=project_id, + # + artifact_ref=workflow_artifact_ref, + ) + ) + + if workflow_variant is None: + return None + + workflow_variant_ref = Reference( + id=workflow_variant.id, + ) + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.fetch_revision( + project_id=project_id, + # + variant_ref=workflow_variant_ref, + ) + ) + + if workflow_revision is None: + return None + + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, + # + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, + ) + + return evaluator + + # - ANNOTATIONS ------------------------------------------------------------ + + @handle_exceptions() + async def _create_annotation( + self, + *, + request: Request, + annotation_data: AnnotationData, + annotation_meta: Optional[AnnotationMeta] = None, + annotation_references: AnnotationReferences, + annotation_links: AnnotationLinks, + annotation_flags: AnnotationFlags, + ) -> Optional[Link]: + trace_id = uuid4().hex + span_id = uuid4().hex[16:] + + _references = [ + Reference( + id=reference.get("id"), + slug=reference.get("slug"), + version=reference.get("version"), + attributes={key: True, "key": key}, + ).model_dump() + for key, reference in annotation_references.model_dump().items() + if reference + ] + + _links = [ + Link( + trace_id=link.trace_id, + span_id=link.span_id, + attributes={key: True, "key": key}, + ).model_dump() + for key, link in annotation_links.items() + ] + + _flags = annotation_flags.model_dump(exclude_none=True) + + _attributes = parse_into_attributes( + data=annotation_data, + meta=annotation_meta, + references=_references, + flags=_flags, + ) + + trace_request = OTelTracingRequest( + spans=[ + OTelFlatSpan( + trace_id=trace_id, + span_id=span_id, + attributes=_attributes, + links=_links, + ) + ] + ) + + _links_response = await self.tracing_router.add_trace( + request=request, + trace_request=trace_request, + ) + + return _links_response.links[0] if _links_response.links else None + + @handle_exceptions() + async def _fetch_annotation( + self, + *, + request: Request, + annotation_link: Link, + ) -> Optional[Annotation]: + trace_response: OTelTracingResponse = await self.tracing_router.fetch_trace( + request=request, + trace_id=annotation_link.trace_id, + ) + + if trace_response.count == 0: + return None + + traces = list(trace_response.traces.values()) + trace = traces[0] if traces else None + + spans = list(trace.spans.values()) + root_span = spans[0] if spans else None + + ( + data, + meta, + references, + flags, + ) = parse_from_attributes(root_span.attributes) + + _references = ( + { + reference.get("attributes").get("key"): AnnotationReference( + id=reference.get("id"), + slug=reference.get("slug"), + version=reference.get("version"), + ) + for reference in references + if reference.get("attributes") + and reference.get("attributes").get("key") + } + if references and isinstance(references, list) + else None + ) + + _links = ( + { + link.attributes.get("key"): AnnotationLink( + trace_id=link.trace_id, + span_id=link.span_id, + ) + for link in root_span.links + if link.attributes.get("key") + } + if root_span.links and isinstance(root_span.links, list) + else None + ) + + _kind = ( + flags.get("is_custom") + and AnnotationKind.CUSTOM + or flags.get("is_human") + and AnnotationKind.HUMAN + or AnnotationKind.AUTO + ) + + _source = ( + flags.get("is_sdk") + and AnnotationSource.SDK + or flags.get("is_web") + and AnnotationSource.WEB + or AnnotationSource.API + ) + + annotation = Annotation( + trace_id=root_span.trace_id, + span_id=root_span.span_id, + created_at=root_span.created_at, + updated_at=root_span.updated_at, + deleted_at=root_span.deleted_at, + created_by_id=root_span.created_by_id, + updated_by_id=root_span.updated_by_id, + deleted_by_id=root_span.deleted_by_id, + kind=_kind, + source=_source, + data=data, + meta=meta, + references=_references, + links=_links, + ) + + return annotation + + @handle_exceptions() + async def _edit_annotation( + self, + *, + request: Request, + annotation_link: Link, + annotation_data: AnnotationData, + annotation_meta: Optional[AnnotationMeta] = None, + annotation_references: AnnotationReferences, + annotation_links: AnnotationLinks, + annotation_flags: AnnotationFlags, + ) -> Optional[Annotation]: + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, + ) + + if annotation is None: + return None + + _references = [ + Reference( + id=reference.get("id"), + slug=reference.get("slug"), + version=reference.get("version"), + attributes={key: True, "key": key}, + ).model_dump() + for key, reference in annotation_references.model_dump().items() + if reference + ] + + _links = [ + Link( + trace_id=link.trace_id, + span_id=link.span_id, + attributes={key: True, "key": key}, + ).model_dump() + for key, link in annotation_links.items() + ] + + _flags = annotation_flags.model_dump(exclude_none=True) + + _attributes = parse_into_attributes( + data=annotation_data, + meta=annotation_meta, + references=_references, + flags=_flags, + ) + + trace_request = OTelTracingRequest( + spans=[ + OTelFlatSpan( + trace_id=annotation_link.trace_id, + span_id=annotation_link.span_id, + attributes=_attributes, + links=_links, + ) + ] + ) + + _links_response = await self.tracing_router.edit_trace( + request=request, + trace_request=trace_request, + ) + + return _links_response.links[0] if _links_response.links else None + + @handle_exceptions() + async def _delete_annotation( + self, + *, + request: Request, + annotation_link: Link, + ) -> Optional[Annotation]: + annotation: Optional[Annotation] = await self._fetch_annotation( + request=request, + annotation_link=annotation_link, + ) + + if annotation is None: + return None + + link_response = await self.tracing_router.remove_trace( + request=request, + trace_id=annotation_link.trace_id, + ) + + annotation_link = link_response.links[0] if link_response.links else None + + if annotation_link is None: + return None + + return annotation + + @handle_exceptions() + async def _query_annotation( + self, + *, + request: Request, + trace_id: Optional[str] = None, + span_id: Optional[str] = None, + flags: Optional[AnnotationFlags] = None, + meta: Optional[AnnotationMeta] = None, + references: Optional[AnnotationReferences] = None, + links: Optional[AnnotationLinks] = None, + # flags: Optional[WorkflowFlags] = None, + ) -> List[Annotation]: + formatting = Formatting( + focus=Focus.TRACE, + format=Format.AGENTA, + ) + + filtering = Filtering() + + conditions = [] + + if trace_id: + conditions.append( + { + "field": "trace_id", + "value": trace_id, + "operator": "is", + } + ) + + if span_id: + conditions.append( + { + "field": "span_id", + "value": span_id, + "operator": "is", + } + ) + + if flags: + for key, value in flags.model_dump(exclude_none=True).items(): + conditions.append( + { + "field": "attributes", + "key": f"agenta.flags.{key}", + "value": value, + "operator": "is", + } + ) + + if meta: + for key, value in meta.items(): + conditions.append( + { + "field": "attributes", + "key": f"agenta.meta.{key}", + "value": value, + "operator": "is", + } + ) + + if references: + for _, reference in references.model_dump().items(): + if reference: + ref_id = str(reference.get("id")) if reference.get("id") else None + ref_slug = ( + str(reference.get("slug")) if reference.get("slug") else None + ) + ref_version = ( + str(reference.get("version")) + if reference.get("version") + else None + ) + + conditions.append( + { + "field": "references", + "value": [ + { + "id": ref_id, + "slug": ref_slug, + "version": ref_version, + } + ], + "operator": "in", + } + ) + + if links: + for _, link in links.items(): + if link: + conditions.append( + { + "field": "links", + "value": [ + { + "trace_id": link.trace_id, + "span_id": link.span_id, + } + ], + "operator": "in", + } + ) + + if conditions: + filtering = Filtering( + operator="and", + conditions=conditions, + ) + + query = Query( + formatting=formatting, + filtering=filtering, + ) + + spans_response: OTelTracingResponse = await self.tracing_router.query_spans( + request=request, + query=query, + ) + + traces = list(spans_response.traces.values()) + + annotations = [] + + for trace in traces: + spans = list(trace.spans.values()) + + root_span = spans[0] if spans else None + + ( + data, + meta, + references, + flags, + ) = parse_from_attributes(root_span.attributes) + + _references = ( + { + reference.get("attributes").get("key"): AnnotationReference( + id=reference.get("id"), + slug=reference.get("slug"), + version=reference.get("version"), + ) + for reference in references + if reference.get("attributes") + and reference.get("attributes").get("key") + } + if references and isinstance(references, list) + else None + ) + + _links = ( + { + link.attributes.get("key"): AnnotationLink( + trace_id=link.trace_id, + span_id=link.span_id, + ) + for link in root_span.links + if link.attributes.get("key") + } + if root_span.links and isinstance(root_span.links, list) + else None + ) + + _kind = ( + flags.get("is_custom") + and AnnotationKind.CUSTOM + or flags.get("is_human") + and AnnotationKind.HUMAN + or AnnotationKind.AUTO + ) + + _source = ( + flags.get("is_sdk") + and AnnotationSource.SDK + or flags.get("is_web") + and AnnotationSource.WEB + or AnnotationSource.API + ) + + annotation = Annotation( + trace_id=root_span.trace_id, + span_id=root_span.span_id, + created_at=root_span.created_at, + updated_at=root_span.updated_at, + deleted_at=root_span.deleted_at, + created_by_id=root_span.created_by_id, + updated_by_id=root_span.updated_by_id, + deleted_by_id=root_span.deleted_by_id, + kind=_kind, + source=_source, + data=data, + meta=meta, + references=_references, + links=_links, + ) + + annotations.append(annotation) + + return annotations diff --git a/api/oss/src/apis/fastapi/annotations/utils.py b/api/oss/src/apis/fastapi/annotations/utils.py new file mode 100644 index 0000000000..43d6e1ec2d --- /dev/null +++ b/api/oss/src/apis/fastapi/annotations/utils.py @@ -0,0 +1,63 @@ +from typing import Optional, Tuple + + +from oss.src.utils.logging import get_module_logger + +from oss.src.core.shared.dtos import References, Flags, Data, Meta +from oss.src.core.tracing.dtos import Attributes +from oss.src.core.workflows.dtos import WorkflowFlags + + +log = get_module_logger(__name__) + + +def parse_into_attributes( + data: Optional[Data] = None, + meta: Optional[Meta] = None, + references: Optional[References] = None, + flags: Optional[Flags] = None, +) -> Attributes: + # TODO - add error handling + + attributes: Attributes = dict( + agenta=( + dict( + data=data, + meta=meta, + references=references, + flags=flags, + ) + if (data or meta or references or flags) + else None + ) + ) + + return attributes + + +def parse_from_attributes( + attributes: Attributes, +) -> Tuple[ + Optional[Data], # data + Optional[Meta], # meta + Optional[References], # references + Optional[Flags], # flags +]: + # TODO - add error handling + agenta: dict = attributes.get("agenta", {}) + data: dict = agenta.get("data") + meta: dict = agenta.get("meta") + references = agenta.get("references") + flags: dict = agenta.get("flags") + + return ( + data, + meta, + references, + flags, + ) + + +class AnnotationFlags(WorkflowFlags): + is_sdk: Optional[bool] = False + is_web: Optional[bool] = False diff --git a/api/oss/src/apis/fastapi/applications/models.py b/api/oss/src/apis/fastapi/applications/models.py deleted file mode 100644 index 09e67ffdfc..0000000000 --- a/api/oss/src/apis/fastapi/applications/models.py +++ /dev/null @@ -1,155 +0,0 @@ -from typing import Optional, List - -from pydantic import BaseModel - -from oss.src.core.shared.dtos import ( - Reference, - Windowing, -) -from oss.src.core.applications.dtos import ( - Application, - ApplicationCreate, - ApplicationEdit, - ApplicationQuery, - # - ApplicationVariant, - ApplicationVariantCreate, - ApplicationVariantEdit, - ApplicationVariantQuery, - # - ApplicationRevision, - ApplicationRevisionCreate, - ApplicationRevisionEdit, - ApplicationRevisionQuery, - ApplicationRevisionCommit, - # - LegacyApplication, - LegacyApplicationCreate, - LegacyApplicationEdit, -) - -# APPLICATIONS ----------------------------------------------------------------- - - -class ApplicationCreateRequest(BaseModel): - application: ApplicationCreate - - -class ApplicationEditRequest(BaseModel): - application: ApplicationEdit - - -class ApplicationQueryRequest(BaseModel): - application: Optional[ApplicationQuery] = None - # - application_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class ApplicationResponse(BaseModel): - count: int = 0 - application: Optional[Application] = None - - -class ApplicationsResponse(BaseModel): - count: int = 0 - applications: List[Application] = [] - - -# APPLICATION VARIANTS --------------------------------------------------------- - - -class ApplicationVariantCreateRequest(BaseModel): - application_variant: ApplicationVariantCreate - - -class ApplicationVariantEditRequest(BaseModel): - application_variant: ApplicationVariantEdit - - -class ApplicationVariantQueryRequest(BaseModel): - application_variant: Optional[ApplicationVariantQuery] = None - # - application_refs: Optional[List[Reference]] = None - application_variant_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class ApplicationVariantResponse(BaseModel): - count: int = 0 - application_variant: Optional[ApplicationVariant] = None - - -class ApplicationVariantsResponse(BaseModel): - count: int = 0 - application_variants: List[ApplicationVariant] = [] - - -# APPLICATION REVISIONS -------------------------------------------------------- - - -class ApplicationRevisionCreateRequest(BaseModel): - application_revision: ApplicationRevisionCreate - - -class ApplicationRevisionEditRequest(BaseModel): - application_revision: ApplicationRevisionEdit - - -class ApplicationRevisionQueryRequest(BaseModel): - application_revision: Optional[ApplicationRevisionQuery] = None - # - application_refs: Optional[List[Reference]] = None - application_variant_refs: Optional[List[Reference]] = None - application_revision_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class ApplicationRevisionCommitRequest(BaseModel): - application_revision_commit: ApplicationRevisionCommit - - -class ApplicationRevisionRetrieveRequest(BaseModel): - application_ref: Optional[Reference] = None - application_variant_ref: Optional[Reference] = None - application_revision_ref: Optional[Reference] = None - - -class ApplicationRevisionResponse(BaseModel): - count: int = 0 - application_revision: Optional[ApplicationRevision] = None - - -class ApplicationRevisionsResponse(BaseModel): - count: int = 0 - application_revisions: List[ApplicationRevision] = [] - - -# LEGACY APPLICATIONS ---------------------------------------------------------- - - -class LegacyApplicationCreateRequest(BaseModel): - application: LegacyApplicationCreate - - -class LegacyApplicationEditRequest(BaseModel): - application: LegacyApplicationEdit - - -class LegacyApplicationResponse(BaseModel): - count: int = 0 - application: Optional[LegacyApplication] = None - - -class LegacyApplicationsResponse(BaseModel): - count: int = 0 - applications: List[LegacyApplication] = [] diff --git a/api/oss/src/apis/fastapi/applications/router.py b/api/oss/src/apis/fastapi/applications/router.py deleted file mode 100644 index e179e0f04c..0000000000 --- a/api/oss/src/apis/fastapi/applications/router.py +++ /dev/null @@ -1,250 +0,0 @@ -from uuid import UUID -from typing import Optional - -from fastapi import APIRouter, status, Request, Depends - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - - -from oss.src.core.applications.dtos import ( - ApplicationRevision, -) -from oss.src.core.applications.service import ( - LegacyApplicationsService, -) - -from oss.src.apis.fastapi.applications.models import ( - ApplicationRevisionRetrieveRequest, - ApplicationRevisionResponse, - # - LegacyApplicationCreateRequest, - LegacyApplicationEditRequest, - LegacyApplicationResponse, -) -from oss.src.apis.fastapi.applications.utils import ( - parse_application_revision_retrieve_request_from_params, - parse_application_revision_retrieve_request_from_body, -) - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION - - -log = get_module_logger(__name__) - - -class LegacyApplicationsRouter: - def __init__( - self, - *, - legacy_applications_service: LegacyApplicationsService, - ): - self.legacy_applications_service = legacy_applications_service - - self.router = APIRouter() - - # APPLICATION REVISIONS ------------------------------------------------ - - self.router.add_api_route( - "/revisions/retrieve", - self.retrieve_application_revision, - methods=["POST"], - operation_id="retrieve_application_revision", - status_code=status.HTTP_200_OK, - response_model=ApplicationRevisionResponse, - response_model_exclude_none=True, - ) - - # LEGACY APPLICATIONS -------------------------------------------------- - - self.router.add_api_route( - "/", - self.create_legacy_application, - methods=["POST"], - response_model=LegacyApplicationResponse, - status_code=status.HTTP_200_OK, - summary="Create Application", - description="Create a new application using workflow data stored in legacy format", - operation_id="create_legacy_application", - ) - - self.router.add_api_route( - "/{application_id}", - self.fetch_legacy_application, - methods=["GET"], - response_model=LegacyApplicationResponse, - status_code=status.HTTP_200_OK, - summary="Fetch Application", - description="Get an application using workflow data stored in legacy format", - operation_id="fetch_legacy_application", - ) - - self.router.add_api_route( - "/{application_id}", - self.edit_legacy_application, - methods=["PUT"], - response_model=LegacyApplicationResponse, - status_code=status.HTTP_200_OK, - summary="Update Application", - description="Update an application using workflow data stored in legacy format", - operation_id="edit_legacy_application", - ) - - # APPLICATION REVISIONS ---------------------------------------------------- - - @intercept_exceptions() - @suppress_exceptions(default=ApplicationRevisionResponse()) - async def retrieve_application_revision( - self, - request: Request, - *, - application_revision_retrieve_request: ApplicationRevisionRetrieveRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - project_id=request.state.project_id, - user_uid=request.state.user_id, - # - permission=Permission.VIEW_APPLICATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - cache_key = { - "artifact_ref": application_revision_retrieve_request.application_ref, # type: ignore - "variant_ref": application_revision_retrieve_request.application_variant_ref, # type: ignore - "revision_ref": application_revision_retrieve_request.application_revision_ref, # type: ignore - } - - application_revision = None - # application_revision = await get_cache( - # namespace="applications:retrieve", - # project_id=request.state.project_id, - # user_id=request.state.user_id, - # key=cache_key, - # model=ApplicationRevision, - # ) - - if not application_revision: - application_revision = await self.legacy_applications_service.retrieve( - project_id=UUID(request.state.project_id), - # - application_ref=application_revision_retrieve_request.application_ref, # type: ignore - application_variant_ref=application_revision_retrieve_request.application_variant_ref, # type: ignore - application_revision_ref=application_revision_retrieve_request.application_revision_ref, # type: ignore - ) - - await set_cache( - namespace="applications:retrieve", - project_id=request.state.project_id, - user_id=request.state.user_id, - key=cache_key, - value=application_revision, - ) - - application_revision_response = ApplicationRevisionResponse( - count=1 if application_revision else 0, - application_revision=application_revision, - ) - - return application_revision_response - - # LEGACY APPLICATIONS ------------------------------------------------------ - - @intercept_exceptions() - async def create_legacy_application( - self, - request: Request, - *, - legacy_application_create_request: LegacyApplicationCreateRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - project_id=request.state.project_id, - user_uid=request.state.user_id, - # - permission=Permission.EDIT_APPLICATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - legacy_application = await self.legacy_applications_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - legacy_application_create=legacy_application_create_request.application, - ) - - legacy_application_response = LegacyApplicationResponse( - count=1 if legacy_application else 0, - application=legacy_application, - ) - - return legacy_application_response - - @intercept_exceptions() - @suppress_exceptions(default=LegacyApplicationResponse()) - async def fetch_legacy_application( - self, - request: Request, - *, - application_id: UUID, - ): - if is_ee(): - if not await check_action_access( # type: ignore - project_id=request.state.project_id, - user_uid=request.state.user_id, - # - permission=Permission.VIEW_APPLICATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - legacy_application = await self.legacy_applications_service.fetch( - project_id=UUID(request.state.project_id), - # - application_id=application_id, - ) - - legacy_application_response = LegacyApplicationResponse( - count=1 if legacy_application else 0, - application=legacy_application, - ) - - return legacy_application_response - - @intercept_exceptions() - async def edit_legacy_application( - self, - request: Request, - *, - application_id: UUID, - # - legacy_application_edit_request: LegacyApplicationEditRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - project_id=request.state.project_id, - user_uid=request.state.user_id, - # - permission=Permission.EDIT_APPLICATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(application_id) != str(legacy_application_edit_request.application.id): - return LegacyApplicationResponse() - - legacy_application = await self.legacy_applications_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - legacy_application_edit=legacy_application_edit_request.application, - ) - - legacy_application_response = LegacyApplicationResponse( - count=1 if legacy_application else 0, - application=legacy_application, - ) - - return legacy_application_response diff --git a/api/oss/src/apis/fastapi/applications/utils.py b/api/oss/src/apis/fastapi/applications/utils.py deleted file mode 100644 index 12a613b5bb..0000000000 --- a/api/oss/src/apis/fastapi/applications/utils.py +++ /dev/null @@ -1,90 +0,0 @@ -from uuid import UUID -from typing import Optional - -from oss.src.core.shared.dtos import ( - Reference, -) - -from oss.src.apis.fastapi.applications.models import ( - ApplicationRevisionRetrieveRequest, -) - - -def parse_application_revision_retrieve_request_from_params( - application_id: Optional[UUID] = None, - application_slug: Optional[str] = None, - # - application_variant_id: Optional[UUID] = None, - application_variant_slug: Optional[str] = None, - # - application_revision_id: Optional[UUID] = None, - application_revision_slug: Optional[str] = None, - application_revision_version: Optional[str] = None, -): - return parse_application_revision_retrieve_request_from_body( - application_id=application_id, - application_slug=application_slug, - # - application_variant_id=application_variant_id, - application_variant_slug=application_variant_slug, - # - application_revision_id=application_revision_id, - application_revision_slug=application_revision_slug, - application_revision_version=application_revision_version, - ) - - -def parse_application_revision_retrieve_request_from_body( - application_id: Optional[UUID] = None, - application_slug: Optional[str] = None, - # - application_variant_id: Optional[UUID] = None, - application_variant_slug: Optional[str] = None, - # - application_revision_id: Optional[UUID] = None, - application_revision_slug: Optional[str] = None, - application_revision_version: Optional[str] = None, -) -> Optional[ApplicationRevisionRetrieveRequest]: - return ( - ApplicationRevisionRetrieveRequest( - application_ref=( - Reference( - id=application_id, - slug=application_slug, - ) - if application_id or application_slug - else None - ), - # - application_variant_ref=( - Reference( - id=application_variant_id, - slug=application_variant_slug, - ) - if application_variant_id or application_variant_slug - else None - ), - # - application_revision_ref=( - Reference( - id=application_revision_id, - slug=application_revision_slug, - version=application_revision_version, - ) - if application_revision_id - or application_revision_slug - or application_revision_version - else None - ), - ) - if ( - application_id - or application_slug - or application_variant_id - or application_variant_slug - or application_revision_id - or application_revision_slug - or application_revision_version - ) - else None - ) diff --git a/api/oss/src/apis/fastapi/evaluations/models.py b/api/oss/src/apis/fastapi/evaluations/models.py deleted file mode 100644 index c4e740740b..0000000000 --- a/api/oss/src/apis/fastapi/evaluations/models.py +++ /dev/null @@ -1,322 +0,0 @@ -from typing import Optional, List -from uuid import UUID - -from pydantic import BaseModel -from fastapi import HTTPException - -from oss.src.core.shared.dtos import ( - Windowing, -) -from oss.src.core.evaluations.types import ( - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationRunQuery, - # - EvaluationScenario, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationScenarioQuery, - # - EvaluationResult, - EvaluationResultCreate, - EvaluationResultEdit, - EvaluationResultQuery, - # - EvaluationMetrics, - EvaluationMetricsCreate, - EvaluationMetricsEdit, - EvaluationMetricsQuery, - # - EvaluationQueue, - EvaluationQueueCreate, - EvaluationQueueEdit, - EvaluationQueueQuery, - # - SimpleEvaluation, - SimpleEvaluationCreate, - SimpleEvaluationEdit, - SimpleEvaluationQuery, -) - - -class EvaluationClosedException(HTTPException): - """Exception raised when trying to modify a closed evaluation.""" - - def __init__( - self, - message: str = "Cannot modify a closed evaluation.", - run_id: Optional[UUID] = None, - scenario_id: Optional[UUID] = None, - result_id: Optional[UUID] = None, - metrics_id: Optional[UUID] = None, - queue_id: Optional[UUID] = None, - ): - details = dict(message=message) - - if run_id: - details["run_id"] = str(run_id) - if scenario_id: - details["scenario_id"] = str(scenario_id) - if result_id: - details["result_id"] = str(result_id) - if metrics_id: - details["metrics_id"] = str(metrics_id) - if queue_id: - details["queue_id"] = str(queue_id) - - super().__init__(status_code=409, detail=details) - - self.run_id = run_id - self.scenario_id = scenario_id - self.result_id = result_id - self.metrics_id = metrics_id - self.queue_id = queue_id - - -# EVALUATION RUNS -------------------------------------------------------------- - - -class EvaluationRunsCreateRequest(BaseModel): - runs: List[EvaluationRunCreate] - - -class EvaluationRunEditRequest(BaseModel): - run: EvaluationRunEdit - - -class EvaluationRunsEditRequest(BaseModel): - runs: List[EvaluationRunEdit] - - -class EvaluationRunQueryRequest(BaseModel): - run: Optional[EvaluationRunQuery] = None - # - windowing: Optional[Windowing] = None - - -class EvaluationRunIdsRequest(BaseModel): - run_ids: List[UUID] - - -class EvaluationRunResponse(BaseModel): - count: int = 0 - run: Optional[EvaluationRun] = None - - -class EvaluationRunsResponse(BaseModel): - count: int = 0 - runs: List[EvaluationRun] = [] - - -class EvaluationRunIdResponse(BaseModel): - count: int = 0 - run_id: Optional[UUID] = None - - -class EvaluationRunIdsResponse(BaseModel): - count: int = 0 - run_ids: List[UUID] = [] - - -# - EVALUATION SCENARIOS ------------------------------------------------------- - - -class EvaluationScenariosCreateRequest(BaseModel): - scenarios: List[EvaluationScenarioCreate] - - -class EvaluationScenarioEditRequest(BaseModel): - scenario: EvaluationScenarioEdit - - -class EvaluationScenariosEditRequest(BaseModel): - scenarios: List[EvaluationScenarioEdit] - - -class EvaluationScenarioQueryRequest(BaseModel): - scenario: Optional[EvaluationScenarioQuery] = None - # - windowing: Optional[Windowing] = None - - -class EvaluationScenarioIdsRequest(BaseModel): - scenario_ids: List[UUID] - - -class EvaluationScenarioResponse(BaseModel): - count: int = 0 - scenario: Optional[EvaluationScenario] = None - - -class EvaluationScenariosResponse(BaseModel): - count: int = 0 - scenarios: List[EvaluationScenario] = [] - - -class EvaluationScenarioIdResponse(BaseModel): - count: int = 0 - scenario_id: Optional[UUID] = None - - -class EvaluationScenarioIdsResponse(BaseModel): - count: int = 0 - scenario_ids: List[UUID] = [] - - -# - EVALUATION RESULTS --------------------------------------------------------- - - -class EvaluationResultsCreateRequest(BaseModel): - results: List[EvaluationResultCreate] - - -class EvaluationResultEditRequest(BaseModel): - result: EvaluationResultEdit - - -class EvaluationResultsEditRequest(BaseModel): - results: List[EvaluationResultEdit] - - -class EvaluationResultQueryRequest(BaseModel): - result: Optional[EvaluationResultQuery] = None - # - windowing: Optional[Windowing] = None - - -class EvaluationResultIdsRequest(BaseModel): - result_ids: List[UUID] - - -class EvaluationResultResponse(BaseModel): - count: int = 0 - result: Optional[EvaluationResult] = None - - -class EvaluationResultsResponse(BaseModel): - count: int = 0 - results: List[EvaluationResult] = [] - - -class EvaluationResultIdResponse(BaseModel): - count: int = 0 - result_id: Optional[UUID] = None - - -class EvaluationResultIdsResponse(BaseModel): - count: int = 0 - result_ids: List[UUID] = [] - - -# - EVALUATION METRICS --------------------------------------------------------- - - -class EvaluationMetricsCreateRequest(BaseModel): - metrics: List[EvaluationMetricsCreate] - - -class EvaluationMetricsEditRequest(BaseModel): - metrics: List[EvaluationMetricsEdit] - - -class EvaluationMetricsQueryRequest(BaseModel): - metrics: Optional[EvaluationMetricsQuery] = None - # - windowing: Optional[Windowing] = None - - -class EvaluationMetricsIdsRequest(BaseModel): - metrics_ids: List[UUID] - - -class EvaluationMetricsResponse(BaseModel): - count: int = 0 - metrics: List[EvaluationMetrics] = [] - - -class EvaluationMetricsIdsResponse(BaseModel): - count: int = 0 - metrics_ids: List[UUID] = [] - - -# - EVALUATION QUEUES ---------------------------------------------------------- - - -class EvaluationQueuesCreateRequest(BaseModel): - queues: List[EvaluationQueueCreate] - - -class EvaluationQueueEditRequest(BaseModel): - queue: EvaluationQueueEdit - - -class EvaluationQueuesEditRequest(BaseModel): - queues: List[EvaluationQueueEdit] - - -class EvaluationQueueQueryRequest(BaseModel): - queue: Optional[EvaluationQueueQuery] = None - # - windowing: Optional[Windowing] = None - - -class EvaluationQueueIdsRequest(BaseModel): - queue_ids: List[UUID] - - -class EvaluationQueueResponse(BaseModel): - count: int = 0 - queue: Optional[EvaluationQueue] = None - - -class EvaluationQueuesResponse(BaseModel): - count: int = 0 - queues: List[EvaluationQueue] = [] - - -class EvaluationQueueIdResponse(BaseModel): - count: int = 0 - queue_id: Optional[UUID] = None - - -class EvaluationQueueIdsResponse(BaseModel): - count: int = 0 - queue_ids: List[UUID] = [] - - -class EvaluationQueueScenarioIdsResponse(BaseModel): - count: int = 0 - scenario_ids: List[List[UUID]] = [] - - -# - SIMPLE EVALUATIONS --------------------------------------------------------- - - -class SimpleEvaluationCreateRequest(BaseModel): - evaluation: SimpleEvaluationCreate - - -class SimpleEvaluationEditRequest(BaseModel): - evaluation: SimpleEvaluationEdit - - -class SimpleEvaluationQueryRequest(BaseModel): - evaluation: Optional[SimpleEvaluationQuery] = None - # - windowing: Optional[Windowing] = None - - -class SimpleEvaluationResponse(BaseModel): - count: int = 0 - evaluation: Optional[SimpleEvaluation] = None - - -class SimpleEvaluationsResponse(BaseModel): - count: int = 0 - evaluations: List[SimpleEvaluation] = [] - - -class SimpleEvaluationIdResponse(BaseModel): - count: int = 0 - evaluation_id: Optional[UUID] = None diff --git a/api/oss/src/apis/fastapi/evaluations/router.py b/api/oss/src/apis/fastapi/evaluations/router.py deleted file mode 100644 index 0c31333196..0000000000 --- a/api/oss/src/apis/fastapi/evaluations/router.py +++ /dev/null @@ -1,2074 +0,0 @@ -from typing import Optional -from uuid import UUID -from datetime import datetime, timedelta - -from fastapi import APIRouter, Request, Query - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - -from oss.src.core.queries.service import ( - QueriesService, -) -from oss.src.core.evaluations.service import ( - EvaluationStatus, - EvaluationsService, - SimpleEvaluationsService, -) - -from oss.src.apis.fastapi.evaluations.models import ( - # EVALUATION RUNS - EvaluationRunsCreateRequest, - EvaluationRunEditRequest, - EvaluationRunsEditRequest, - EvaluationRunQueryRequest, - EvaluationRunIdsRequest, - EvaluationRunResponse, - EvaluationRunsResponse, - EvaluationRunIdResponse, - EvaluationRunIdsResponse, - # EVALUATION SCENARIOS - EvaluationScenariosCreateRequest, - EvaluationScenarioEditRequest, - EvaluationScenariosEditRequest, - EvaluationScenarioQueryRequest, - EvaluationScenarioIdsRequest, - EvaluationScenarioResponse, - EvaluationScenariosResponse, - EvaluationScenarioIdResponse, - EvaluationScenarioIdsResponse, - # EVALUATION RESULTS - EvaluationResultsCreateRequest, - EvaluationResultEditRequest, - EvaluationResultsEditRequest, - EvaluationResultQueryRequest, - EvaluationResultIdsRequest, - EvaluationResultResponse, - EvaluationResultsResponse, - EvaluationResultIdResponse, - EvaluationResultIdsResponse, - # EVALUATION METRICS - EvaluationMetricsCreateRequest, - EvaluationMetricsEditRequest, - EvaluationMetricsQueryRequest, - EvaluationMetricsIdsRequest, - EvaluationMetricsResponse, - EvaluationMetricsIdsResponse, - # EVALUATION QUEUES - EvaluationQueuesCreateRequest, - EvaluationQueueEditRequest, - EvaluationQueuesEditRequest, - EvaluationQueueQueryRequest, - EvaluationQueueIdsRequest, - EvaluationQueueResponse, - EvaluationQueuesResponse, - EvaluationQueueIdResponse, - EvaluationQueueIdsResponse, - # - EvaluationQueueScenarioIdsResponse, - # - SimpleEvaluationCreateRequest, - SimpleEvaluationEditRequest, - SimpleEvaluationQueryRequest, - SimpleEvaluationResponse, - SimpleEvaluationsResponse, - SimpleEvaluationIdResponse, -) -from oss.src.apis.fastapi.evaluations.utils import ( - handle_evaluation_closed_exception, -) - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION - - -log = get_module_logger(__name__) - - -class EvaluationsRouter: - def __init__( - self, - *, - evaluations_service: EvaluationsService, - queries_service: QueriesService, - ): - self.evaluations_service = evaluations_service - self.queries_service = queries_service - - self.router = APIRouter() - - self.admin_router = APIRouter() - - # EVALUATION RUNS ------------------------------------------------------ - - # POST /api/evaluations/runs/refresh - self.admin_router.add_api_route( - path="/runs/refresh", - methods=["POST"], - endpoint=self.refresh_runs, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/ - self.router.add_api_route( - path="/runs/", - methods=["POST"], - endpoint=self.create_runs, - response_model=EvaluationRunsResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/runs/ - self.router.add_api_route( - path="/runs/", - methods=["PATCH"], - endpoint=self.edit_runs, - response_model=EvaluationRunsResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/runs/ - self.router.add_api_route( - path="/runs/", - methods=["DELETE"], - endpoint=self.delete_runs, - response_model=EvaluationRunIdsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/query - self.router.add_api_route( - path="/runs/query", - methods=["POST"], - endpoint=self.query_runs, - response_model=EvaluationRunsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/close - self.router.add_api_route( - path="/runs/close", - methods=["POST"], - endpoint=self.close_runs, - response_model=EvaluationRunsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/open - self.router.add_api_route( - path="/runs/open", - methods=["POST"], - endpoint=self.open_runs, - response_model=EvaluationRunsResponse, - response_model_exclude_none=True, - ) - - # GET /api/evaluations/runs/{run_id} - self.router.add_api_route( - path="/runs/{run_id}", - methods=["GET"], - endpoint=self.fetch_run, - response_model=EvaluationRunResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/runs/{run_id} - self.router.add_api_route( - path="/runs/{run_id}", - methods=["PATCH"], - endpoint=self.edit_run, - response_model=EvaluationRunResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/runs/{run_id} - self.router.add_api_route( - path="/runs/{run_id}", - methods=["DELETE"], - endpoint=self.delete_run, - response_model=EvaluationRunIdResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/{run_id}/close - self.router.add_api_route( - path="/runs/{run_id}/close", - methods=["POST"], - endpoint=self.close_run, - response_model=EvaluationRunResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/{run_id}/close/{status} - self.router.add_api_route( - path="/runs/{run_id}/close/{status}", - methods=["POST"], - endpoint=self.close_run, - response_model=EvaluationRunResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/runs/{run_id}/open - self.router.add_api_route( - path="/runs/{run_id}/open", - methods=["POST"], - endpoint=self.open_run, - response_model=EvaluationRunResponse, - response_model_exclude_none=True, - ) - - # EVALUATION SCENARIOS ------------------------------------------------- - - # POST /api/evaluations/scenarios/ - self.router.add_api_route( - path="/scenarios/", - methods=["POST"], - endpoint=self.create_scenarios, - response_model=EvaluationScenariosResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/scenarios/ - self.router.add_api_route( - path="/scenarios/", - methods=["PATCH"], - endpoint=self.edit_scenarios, - response_model=EvaluationScenariosResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/scenarios/ - self.router.add_api_route( - path="/scenarios/", - methods=["DELETE"], - endpoint=self.delete_scenarios, - response_model=EvaluationScenarioIdsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/scenarios/query - self.router.add_api_route( - path="/scenarios/query", - methods=["POST"], - endpoint=self.query_scenarios, - response_model=EvaluationScenariosResponse, - response_model_exclude_none=True, - ) - - # GET /api/evaluations/scenarios/{scenario_id} - self.router.add_api_route( - path="/scenarios/{scenario_id}", - methods=["GET"], - endpoint=self.fetch_scenario, - response_model=EvaluationScenarioResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/scenarios/{scenario_id} - self.router.add_api_route( - path="/scenarios/{scenario_id}", - methods=["PATCH"], - endpoint=self.edit_scenario, - response_model=EvaluationScenarioResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/scenarios/{scenario_id} - self.router.add_api_route( - path="/scenarios/{scenario_id}", - methods=["DELETE"], - endpoint=self.delete_scenario, - response_model=EvaluationScenarioIdResponse, - response_model_exclude_none=True, - ) - - # EVALUATION RESULTS --------------------------------------------------- - - # POST /api/evaluations/results/ - self.router.add_api_route( - path="/results/", - methods=["POST"], - endpoint=self.create_results, - response_model=EvaluationResultsResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/results/ - self.router.add_api_route( - path="/results/", - methods=["PATCH"], - endpoint=self.edit_results, - response_model=EvaluationResultsResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/results/ - self.router.add_api_route( - path="/results/", - methods=["DELETE"], - endpoint=self.delete_results, - response_model=EvaluationResultIdsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/results/query - self.router.add_api_route( - path="/results/query", - methods=["POST"], - endpoint=self.query_results, - response_model=EvaluationResultsResponse, - response_model_exclude_none=True, - ) - - # GET /api/evaluations/results/{result_id} - self.router.add_api_route( - path="/results/{result_id}", - methods=["GET"], - endpoint=self.fetch_result, - response_model=EvaluationResultResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/results/{result_id} - self.router.add_api_route( - path="/results/{result_id}", - methods=["PATCH"], - endpoint=self.edit_result, - response_model=EvaluationResultResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/results/{result_id} - self.router.add_api_route( - path="/results/{result_id}", - methods=["DELETE"], - endpoint=self.delete_result, - response_model=EvaluationResultIdResponse, - response_model_exclude_none=True, - ) - - # EVALUATION METRICS --------------------------------------------------- - - # POST /api/evaluations/metrics/refresh - self.router.add_api_route( - path="/metrics/refresh", - methods=["POST"], - endpoint=self.refresh_metrics, - response_model=EvaluationMetricsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/metrics/ - self.router.add_api_route( - path="/metrics/", - methods=["POST"], - endpoint=self.create_metrics, - response_model=EvaluationMetricsResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/metrics/ - self.router.add_api_route( - path="/metrics/", - methods=["PATCH"], - endpoint=self.edit_metrics, - response_model=EvaluationMetricsResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/metrics/ - self.router.add_api_route( - path="/metrics/", - methods=["DELETE"], - endpoint=self.delete_metrics, - response_model=EvaluationMetricsIdsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/metrics/query - self.router.add_api_route( - path="/metrics/query", - methods=["POST"], - endpoint=self.query_metrics, - response_model=EvaluationMetricsResponse, - response_model_exclude_none=True, - ) - - # EVALUATION QUEUES ---------------------------------------------------- - - # POST /api/evaluations/queues/ - self.router.add_api_route( - path="/queues/", - methods=["POST"], - endpoint=self.create_queues, - response_model=EvaluationQueuesResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/queues/ - self.router.add_api_route( - path="/queues/", - methods=["PATCH"], - endpoint=self.edit_queues, - response_model=EvaluationQueuesResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/queues/ - self.router.add_api_route( - path="/queues/", - methods=["DELETE"], - endpoint=self.delete_queues, - response_model=EvaluationQueueIdsResponse, - response_model_exclude_none=True, - ) - - # POST /api/evaluations/queues/query - self.router.add_api_route( - path="/queues/query", - methods=["POST"], - endpoint=self.query_queues, - response_model=EvaluationQueuesResponse, - response_model_exclude_none=True, - ) - - # GET /api/evaluations/queues/{queue_id} - self.router.add_api_route( - path="/queues/{queue_id}", - methods=["GET"], - endpoint=self.fetch_queue, - response_model=EvaluationQueueResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/evaluations/queues/{queue_id} - self.router.add_api_route( - path="/queues/{queue_id}", - methods=["PATCH"], - endpoint=self.edit_queue, - response_model=EvaluationQueueResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/evaluations/queues/{queue_id} - self.router.add_api_route( - path="/queues/{queue_id}", - methods=["DELETE"], - endpoint=self.delete_queue, - response_model=EvaluationQueueIdResponse, - response_model_exclude_none=True, - ) - - # GET /api/evaluations/queues/{queue_id}/scenarios/ - self.router.add_api_route( - path="/queues/{queue_id}/scenarios", - methods=["GET"], - endpoint=self.fetch_queue_scenarios, - response_model=EvaluationQueueScenarioIdsResponse, - response_model_exclude_none=True, - ) - - # EVALUATION RUNS ---------------------------------------------------------- - - # POST /evaluations/runs/refresh - @intercept_exceptions() - async def refresh_runs( - self, - *, - trigger_interval: Optional[int] = Query(1, ge=1, le=60), - trigger_datetime: Optional[datetime] = Query(None), - ): - # ---------------------------------------------------------------------- - # THIS IS AN ADMIN ENDPOINT - # NO CHECK FOR PERMISSIONS / ENTITLEMENTS - # ---------------------------------------------------------------------- - - if not trigger_datetime or not trigger_interval: - return {"status": "error"} - - timestamp = trigger_datetime - timedelta(minutes=trigger_interval) - interval = trigger_interval - - check = await self.evaluations_service.refresh_runs( - timestamp=timestamp, - interval=interval, - ) - - if not check: - return {"status": "failure"} - - return {"status": "success"} - - # POST /evaluations/runs/ - @intercept_exceptions() - async def create_runs( - self, - request: Request, - *, - runs_create_request: EvaluationRunsCreateRequest, - ) -> EvaluationRunsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - runs = await self.evaluations_service.create_runs( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - runs=runs_create_request.runs, - ) - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - # PATCH /evaluations/runs/ - @intercept_exceptions() - async def edit_runs( - self, - request: Request, - *, - runs_edit_request: EvaluationRunsEditRequest, - ) -> EvaluationRunsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - runs = await self.evaluations_service.edit_runs( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - runs=runs_edit_request.runs, - ) - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - # DELETE /evaluations/runs/ - @intercept_exceptions() - async def delete_runs( - self, - request: Request, - *, - run_ids_request: EvaluationRunIdsRequest, - ) -> EvaluationRunIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - run_ids = await self.evaluations_service.delete_runs( - project_id=UUID(request.state.project_id), - # - run_ids=run_ids_request.run_ids, - ) - - run_ids_response = EvaluationRunIdsResponse( - count=len(run_ids), - run_ids=run_ids, - ) - - return run_ids_response - - # POST /evaluations/runs/query - @intercept_exceptions() - @suppress_exceptions(default=EvaluationRunsResponse()) - async def query_runs( - self, - request: Request, - *, - run_query_request: EvaluationRunQueryRequest, - ) -> EvaluationRunsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - runs = await self.evaluations_service.query_runs( - project_id=UUID(request.state.project_id), - # - run=run_query_request.run, - # - windowing=run_query_request.windowing, - ) - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - # POST /evaluations/runs/close - @intercept_exceptions() - async def close_runs( - self, - request: Request, - *, - run_ids_request: EvaluationRunIdsRequest, - ) -> EvaluationRunsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - runs = await self.evaluations_service.close_runs( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run_ids=run_ids_request.run_ids, - ) - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - # POST /evaluations/runs/open - @intercept_exceptions() - async def open_runs( - self, - request: Request, - *, - run_ids_request: EvaluationRunIdsRequest, - ) -> EvaluationRunsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - runs = await self.evaluations_service.open_runs( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run_ids=run_ids_request.run_ids, - ) - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - # GET /evaluations/runs/{run_id} - @intercept_exceptions() - @suppress_exceptions(default=EvaluationRunResponse()) - async def fetch_run( - self, - request: Request, - *, - run_id: UUID, - ) -> EvaluationRunResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - run = await self.evaluations_service.fetch_run( - project_id=UUID(request.state.project_id), - # - run_id=run_id, - ) - - run_response = EvaluationRunResponse( - count=1 if run else 0, - run=run, - ) - - return run_response - - # PATCH /evaluations/runs/{run_id} - @intercept_exceptions() - async def edit_run( - self, - request: Request, - *, - run_id: UUID, - # - run_edit_request: EvaluationRunEditRequest, - ) -> EvaluationRunResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(run_id) != str(run_edit_request.run.id): - return EvaluationRunResponse() - - run = await self.evaluations_service.edit_run( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run=run_edit_request.run, - ) - - run_response = EvaluationRunResponse( - count=1 if run else 0, - run=run, - ) - - return run_response - - # DELETE /evaluations/runs/{run_id} - @intercept_exceptions() - async def delete_run( - self, - request: Request, - *, - run_id: UUID, - ) -> EvaluationRunIdResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - _run_id = await self.evaluations_service.delete_run( - project_id=UUID(request.state.project_id), - # - run_id=run_id, - ) - - run_id_response = EvaluationRunIdResponse( - count=1 if _run_id else 0, - run_id=_run_id, - ) - - return run_id_response - - # POST /evaluations/runs/{run_id}/close - # POST /evaluations/runs/{run_id}/close/{status} - @intercept_exceptions() - async def close_run( - self, - request: Request, - *, - run_id: UUID, - # - status: Optional[EvaluationStatus] = None, - ) -> EvaluationRunResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - run = await self.evaluations_service.close_run( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run_id=run_id, - # - status=status, - ) - - run_response = EvaluationRunResponse( - count=1 if run else 0, - run=run, - ) - - return run_response - - # POST /evaluations/runs/{run_id}/open - @intercept_exceptions() - async def open_run( - self, - request: Request, - *, - run_id: UUID, - ) -> EvaluationRunResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - run = await self.evaluations_service.open_run( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run_id=run_id, - ) - - run_response = EvaluationRunResponse( - count=1 if run else 0, - run=run, - ) - - return run_response - - # EVALUATION SCENARIOS ----------------------------------------------------- - - # POST /evaluations/scenarios/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def create_scenarios( - self, - request: Request, - *, - scenarios_create_request: EvaluationScenariosCreateRequest, - ) -> EvaluationScenariosResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenarios = await self.evaluations_service.create_scenarios( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - scenarios=scenarios_create_request.scenarios, - ) - - scenarios_response = EvaluationScenariosResponse( - count=len(scenarios), - scenarios=scenarios, - ) - - return scenarios_response - - # PATCH /evaluations/scenarios/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_scenarios( - self, - request: Request, - *, - scenarios_edit_request: EvaluationScenariosEditRequest, - ) -> EvaluationScenariosResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenarios = await self.evaluations_service.edit_scenarios( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - scenarios=scenarios_edit_request.scenarios, - ) - - scenarios_response = EvaluationScenariosResponse( - count=len(scenarios), - scenarios=scenarios, - ) - - return scenarios_response - - # DELETE /evaluations/scenarios/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_scenarios( - self, - request: Request, - *, - scenario_ids_request: EvaluationScenarioIdsRequest, - ) -> EvaluationScenarioIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenario_ids = await self.evaluations_service.delete_scenarios( - project_id=UUID(request.state.project_id), - # - scenario_ids=scenario_ids_request.scenario_ids, - ) - - scenario_ids_response = EvaluationScenarioIdsResponse( - count=len(scenario_ids), - scenario_ids=scenario_ids, - ) - - return scenario_ids_response - - # POST /evaluations/scenarios/query - @intercept_exceptions() - @suppress_exceptions(default=EvaluationScenariosResponse()) - async def query_scenarios( - self, - request: Request, - *, - scenario_query_request: EvaluationScenarioQueryRequest, - ) -> EvaluationScenariosResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenarios = await self.evaluations_service.query_scenarios( - project_id=UUID(request.state.project_id), - # - scenario=scenario_query_request.scenario, - # - windowing=scenario_query_request.windowing, - ) - - scenarios_response = EvaluationScenariosResponse( - count=len(scenarios), - scenarios=scenarios, - ) - - return scenarios_response - - # GET /evaluations/scenarios/{scenario_id} - @intercept_exceptions() - @suppress_exceptions(default=EvaluationScenarioResponse()) - async def fetch_scenario( - self, - request: Request, - *, - scenario_id: UUID, - ) -> EvaluationScenarioResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenario = await self.evaluations_service.fetch_scenario( - project_id=UUID(request.state.project_id), - # - scenario_id=scenario_id, - ) - - scenario_response = EvaluationScenarioResponse( - count=1 if scenario else 0, - scenario=scenario, - ) - - return scenario_response - - # PATCH /evaluations/scenarios/{scenario_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_scenario( - self, - request: Request, - *, - scenario_id: UUID, - # - scenario_edit_request: EvaluationScenarioEditRequest, - ) -> EvaluationScenarioResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(scenario_id) != scenario_edit_request.scenario.id: - return EvaluationScenarioResponse() - - scenario = await self.evaluations_service.edit_scenario( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - scenario=scenario_edit_request.scenario, - ) - - scenario_response = EvaluationScenarioResponse( - count=1 if scenario else 0, - scenario=scenario, - ) - - return scenario_response - - # DELETE /evaluations/scenarios/{scenario_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_scenario( - self, - request: Request, - *, - scenario_id: UUID, - ) -> EvaluationScenarioIdResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_SCENARIOS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - _scenario_id = await self.evaluations_service.delete_scenario( - project_id=UUID(request.state.project_id), - # - scenario_id=scenario_id, - ) - - scenario_id_response = EvaluationScenarioIdResponse( - count=1 if _scenario_id else 0, - scenario_id=_scenario_id, - ) - - return scenario_id_response - - # EVALAUTION RESULTS ------------------------------------------------------- - - # POST /evaluations/results/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def create_results( - self, - request: Request, - *, - results_create_request: EvaluationResultsCreateRequest, - ) -> EvaluationResultsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - results = await self.evaluations_service.create_results( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - results=results_create_request.results, - ) - - results_response = EvaluationResultsResponse( - count=len(results), - results=results, - ) - - return results_response - - # PATCH /evaluations/results/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_results( - self, - request: Request, - *, - results_edit_request: EvaluationResultsEditRequest, - ) -> EvaluationResultsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - results = await self.evaluations_service.edit_results( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - results=results_edit_request.results, - ) - - results_response = EvaluationResultsResponse( - count=len(results), - results=results, - ) - - return results_response - - # DELETE /evaluations/results/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_results( - self, - request: Request, - *, - result_ids_request: EvaluationResultIdsRequest, - ) -> EvaluationResultIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - result_ids = await self.evaluations_service.delete_results( - project_id=UUID(request.state.project_id), - # - result_ids=result_ids_request.result_ids, - ) - - result_ids_response = EvaluationResultIdsResponse( - count=len(result_ids), - result_ids=result_ids, - ) - - return result_ids_response - - # POST /evaluations/results/query - @intercept_exceptions() - @suppress_exceptions(default=EvaluationResultsResponse()) - async def query_results( - self, - request: Request, - *, - result_query_request: EvaluationResultQueryRequest, - ) -> EvaluationResultsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - results = await self.evaluations_service.query_results( - project_id=UUID(request.state.project_id), - # - result=result_query_request.result, - # - windowing=result_query_request.windowing, - ) - - results_response = EvaluationResultsResponse( - count=len(results), - results=results, - ) - - return results_response - - # GET /evaluations/results/{result_id} - @intercept_exceptions() - @suppress_exceptions(default=EvaluationResultResponse()) - async def fetch_result( - self, - request: Request, - *, - result_id: UUID, - ) -> EvaluationResultResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - result = await self.evaluations_service.fetch_result( - project_id=UUID(request.state.project_id), - # - result_id=result_id, - ) - - result_response = EvaluationResultResponse( - count=1 if result else 0, - result=result, - ) - - return result_response - - # PATCH /evaluations/results/{result_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_result( - self, - request: Request, - *, - result_id: UUID, - # - result_edit_request: EvaluationResultEditRequest, - ) -> EvaluationResultResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(result_id) != result_edit_request.result.id: - return EvaluationResultResponse() - - result = await self.evaluations_service.edit_result( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - result=result_edit_request.result, - ) - - result_response = EvaluationResultResponse( - count=1 if result else 0, - result=result, - ) - - return result_response - - # DELETE /evaluations/results/{result_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_result( - self, - request: Request, - *, - result_id: UUID, - ) -> EvaluationResultIdResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RESULTS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - _result_id = await self.evaluations_service.delete_result( - project_id=UUID(request.state.project_id), - # - result_id=result_id, - ) - - result_id_response = EvaluationResultIdResponse( - count=1 if _result_id else 0, - result_id=_result_id, - ) - - return result_id_response - - # EVALUATION METRICS ------------------------------------------------------- - - # POST /evaluations/metrics/refresh - @intercept_exceptions() - @suppress_exceptions(default=EvaluationMetricsResponse()) - async def refresh_metrics( - self, - request: Request, - *, - run_id: UUID, - scenario_id: Optional[UUID] = None, - timestamp: Optional[datetime] = None, - interval: Optional[int] = None, - ) -> EvaluationMetricsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_METRICS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - metrics = await self.evaluations_service.refresh_metrics( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - run_id=run_id, - scenario_id=scenario_id, - timestamp=timestamp, - interval=interval, - ) - - metrics_response = EvaluationMetricsResponse( - count=len(metrics), - metrics=metrics, - ) - - return metrics_response - - # POST /evaluations/metrics/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def create_metrics( - self, - request: Request, - *, - metrics_create_request: EvaluationMetricsCreateRequest, - ) -> EvaluationMetricsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_METRICS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - metrics = await self.evaluations_service.create_metrics( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - metrics=metrics_create_request.metrics, - ) - - metrics_response = EvaluationMetricsResponse( - count=len(metrics), - metrics=metrics, - ) - - return metrics_response - - # PATCH /evaluations/metrics/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_metrics( - self, - request: Request, - *, - metrics_edit_request: EvaluationMetricsEditRequest, - ) -> EvaluationMetricsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_METRICS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - metrics = await self.evaluations_service.edit_metrics( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - metrics=metrics_edit_request.metrics, - ) - - metrics_response = EvaluationMetricsResponse( - count=len(metrics), - metrics=metrics, - ) - - return metrics_response - - # DELETE /evaluations/metrics/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_metrics( - self, - request: Request, - *, - metrics_ids_request: EvaluationMetricsIdsRequest, - ) -> EvaluationMetricsIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_METRICS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - metrics_ids = await self.evaluations_service.delete_metrics( - project_id=UUID(request.state.project_id), - # - metrics_ids=metrics_ids_request.metrics_ids, - ) - - metrics_ids_response = EvaluationMetricsIdsResponse( - count=len(metrics_ids), - metrics_ids=metrics_ids, - ) - - return metrics_ids_response - - # POST /evaluations/metrics/query - @intercept_exceptions() - @suppress_exceptions(default=EvaluationMetricsResponse()) - async def query_metrics( - self, - request: Request, - *, - metric_query_request: EvaluationMetricsQueryRequest, - ) -> EvaluationMetricsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_METRICS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - metrics = await self.evaluations_service.query_metrics( - project_id=UUID(request.state.project_id), - # - metric=metric_query_request.metrics, - # - windowing=metric_query_request.windowing, - ) - - metrics_response = EvaluationMetricsResponse( - count=len(metrics), - metrics=metrics, - ) - - return metrics_response - - # EVALUATION QUEUES -------------------------------------------------------- - - # POST /evaluations/queues/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def create_queues( - self, - request: Request, - *, - queues_create_request: EvaluationQueuesCreateRequest, - ) -> EvaluationQueuesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - queues = await self.evaluations_service.create_queues( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - queues=queues_create_request.queues, - ) - - queues_response = EvaluationQueuesResponse( - count=len(queues), - queues=queues, - ) - - return queues_response - - # PATCH /evaluations/queues/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_queues( - self, - request: Request, - *, - queues_edit_request: EvaluationQueuesEditRequest, - ) -> EvaluationQueuesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - queues = await self.evaluations_service.edit_queues( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # s - queues=queues_edit_request.queues, - ) - - queues_response = EvaluationQueuesResponse( - count=len(queues), - queues=queues, - ) - - return queues_response - - # DELETE /evaluations/queues/ - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_queues( - self, - request: Request, - *, - queue_ids_request: EvaluationQueueIdsRequest, - ) -> EvaluationQueueIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - queue_ids = await self.evaluations_service.delete_queues( - project_id=UUID(request.state.project_id), - # - queue_ids=queue_ids_request.queue_ids, - ) - - queue_ids_response = EvaluationQueueIdsResponse( - count=len(queue_ids), - queue_ids=queue_ids, - ) - - return queue_ids_response - - # POST /evaluations/queues/query - @intercept_exceptions() - @suppress_exceptions(default=EvaluationQueuesResponse()) - async def query_queues( - self, - request: Request, - *, - queue_query_request: EvaluationQueueQueryRequest, - ) -> EvaluationQueuesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - queues = await self.evaluations_service.query_queues( - project_id=UUID(request.state.project_id), - # - queue=queue_query_request.queue, - # - windowing=queue_query_request.windowing, - ) - - queues_response = EvaluationQueuesResponse( - count=len(queues), - queues=queues, - ) - - return queues_response - - # GET /evaluations/queues/{queue_id} - @intercept_exceptions() - @suppress_exceptions(default=EvaluationQueueResponse()) - async def fetch_queue( - self, - request: Request, - *, - queue_id: UUID, - ) -> EvaluationQueueResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - queue = await self.evaluations_service.fetch_queue( - project_id=UUID(request.state.project_id), - # - queue_id=queue_id, - ) - - queue_response = EvaluationQueueResponse( - count=1 if queue else 0, - queue=queue, - ) - - return queue_response - - # PATCH /evaluations/queues/{queue_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def edit_queue( - self, - request: Request, - *, - queue_id: UUID, - # - queue_edit_request: EvaluationQueueEditRequest, - ) -> EvaluationQueueResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(queue_id) != queue_edit_request.queue.id: - return EvaluationQueueResponse() - - queue = await self.evaluations_service.edit_queue( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - queue=queue_edit_request.queue, - ) - - queue_response = EvaluationQueueResponse( - count=1 if queue else 0, - queue=queue, - ) - - return queue_response - - # DELETE /evaluations/queues/{queue_id} - @intercept_exceptions() - @handle_evaluation_closed_exception() - async def delete_queue( - self, - request: Request, - *, - queue_id: UUID, - ) -> EvaluationQueueIdResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - _queue_id = await self.evaluations_service.delete_queue( - project_id=UUID(request.state.project_id), - # - queue_id=queue_id, - ) - - queue_id_response = EvaluationQueueIdResponse( - count=1 if _queue_id else 0, - queue_id=_queue_id, - ) - - return queue_id_response - - # GET /evaluations/queues/{queue_id}/scenarios - @intercept_exceptions() - @suppress_exceptions(default=EvaluationQueueScenarioIdsResponse()) - async def fetch_queue_scenarios( - self, - request: Request, - *, - queue_id: UUID, - # - user_id: Optional[UUID] = Query(None), - ) -> EvaluationQueueScenarioIdsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_QUEUES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - scenario_ids = await self.evaluations_service.fetch_queue_scenarios( - project_id=UUID(request.state.project_id), - user_id=user_id, - # - queue_id=queue_id, - ) - - scenario_ids_response = EvaluationQueueScenarioIdsResponse( - count=len(scenario_ids), - scenario_ids=scenario_ids, - ) - - return scenario_ids_response - - -class SimpleEvaluationsRouter: - def __init__( - self, - *, - simple_evaluations_service: SimpleEvaluationsService, - ): - self.simple_evaluations_service = simple_evaluations_service - - self.router = APIRouter() - - # SIMPLE EVALUATIONS --------------------------------------------------- - - # POST /api/simple/evaluations/ - self.router.add_api_route( - path="/", - methods=["POST"], - endpoint=self.create_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # GET /api/simple/evaluations/{evaluation_id} - self.router.add_api_route( - path="/{evaluation_id}", - methods=["GET"], - endpoint=self.fetch_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # PATCH /api/simple/evaluations/{evaluation_id} - self.router.add_api_route( - path="/{evaluation_id}", - methods=["PATCH"], - endpoint=self.edit_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/simple/evaluations/{evaluation_id} - self.router.add_api_route( - path="/{evaluation_id}", - methods=["DELETE"], - endpoint=self.delete_evaluation, - response_model=SimpleEvaluationIdResponse, - response_model_exclude_none=True, - ) - - # POST /api/simple/evaluations/query - self.router.add_api_route( - path="/query", - methods=["POST"], - endpoint=self.query_evaluations, - response_model=SimpleEvaluationsResponse, - response_model_exclude_none=True, - ) - - # POST /api/simple/evaluations/{evaluation_id}/start - self.router.add_api_route( - path="/{evaluation_id}/start", - methods=["POST"], - endpoint=self.start_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # POST /api/simple/evaluations/{evaluation_id}/stop - self.router.add_api_route( - path="/{evaluation_id}/stop", - methods=["POST"], - endpoint=self.stop_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # POST /api/simpleEvaluations/{evaluation_id}/close - self.router.add_api_route( - path="/{evaluation_id}/close", - methods=["POST"], - endpoint=self.close_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # POST /api/simple/evaluations/{evaluation_id}/open - self.router.add_api_route( - path="/{evaluation_id}/open", - methods=["POST"], - endpoint=self.open_evaluation, - response_model=SimpleEvaluationResponse, - response_model_exclude_none=True, - ) - - # SIMPLE EVALUATIONS ------------------------------------------------------- - - # POST /api/simple/evaluations/ - @intercept_exceptions() - async def create_evaluation( - self, - request: Request, - *, - evaluation_create_request: SimpleEvaluationCreateRequest, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation=evaluation_create_request.evaluation, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # GET /api/simple/evaluations/{evaluation_id} - @intercept_exceptions() - @suppress_exceptions(default=SimpleEvaluationResponse()) - async def fetch_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.fetch( - project_id=UUID(request.state.project_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # PATCH /api/simple/evaluations/{evaluation_id} - @intercept_exceptions() - async def edit_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - # - evaluation_edit_request: SimpleEvaluationEditRequest, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(evaluation_id) != evaluation_edit_request.evaluation.id: - return SimpleEvaluationResponse() - - evaluation = await self.simple_evaluations_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation=evaluation_edit_request.evaluation, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # DELETE /api/simple/evaluations/{evaluation_id} - @intercept_exceptions() - async def delete_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationIdResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - deleted_evaluation_id = await self.simple_evaluations_service.delete( - project_id=UUID(request.state.project_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationIdResponse( - count=1 if deleted_evaluation_id else 0, - evaluation_id=deleted_evaluation_id, - ) - - return response - - # POST /api/simple/evaluations/query - @intercept_exceptions() - @suppress_exceptions(default=SimpleEvaluationsResponse()) - async def query_evaluations( - self, - request: Request, - *, - evaluation_query_request: SimpleEvaluationQueryRequest, - ) -> SimpleEvaluationsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluations = await self.simple_evaluations_service.query( - project_id=UUID(request.state.project_id), - # - query=evaluation_query_request.evaluation, - ) - - response = SimpleEvaluationsResponse( - count=len(evaluations), - evaluations=evaluations, - ) - - return response - - # POST /api/simple/evaluations/{evaluation_id}/start - @intercept_exceptions() - async def start_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.start( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # POST /api/simple/evaluations/{evaluation_id}/stop - @intercept_exceptions() - async def stop_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.stop( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # POST /api/simple/evaluations/{evaluation_id}/close - @intercept_exceptions() - async def close_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.close( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response - - # POST /api/simple/evaluations/{evaluation_id}/open - @intercept_exceptions() - async def open_evaluation( - self, - request: Request, - *, - evaluation_id: UUID, - ) -> SimpleEvaluationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATION_RUNS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluation = await self.simple_evaluations_service.open( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluation_id=evaluation_id, - ) - - response = SimpleEvaluationResponse( - count=1 if evaluation else 0, - evaluation=evaluation, - ) - - return response diff --git a/api/oss/src/apis/fastapi/evaluations/utils.py b/api/oss/src/apis/fastapi/evaluations/utils.py deleted file mode 100644 index c625678a8f..0000000000 --- a/api/oss/src/apis/fastapi/evaluations/utils.py +++ /dev/null @@ -1,344 +0,0 @@ -from typing import Optional, List, Literal -from uuid import UUID -from datetime import datetime -from functools import wraps - -from fastapi import Query - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.dtos import ( - Windowing, -) -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationRunFlags, - EvaluationQueueFlags, - # - EvaluationClosedConflict, -) - -from oss.src.apis.fastapi.shared.utils import ( - parse_metadata, -) -from oss.src.apis.fastapi.evaluations.models import ( - EvaluationRunQuery, - EvaluationRunQueryRequest, - # - EvaluationScenarioQuery, - EvaluationScenarioQueryRequest, - # - EvaluationResultQuery, - EvaluationResultQueryRequest, - # - EvaluationMetricsQuery, - EvaluationMetricsQueryRequest, - # - EvaluationQueueQuery, - EvaluationQueueQueryRequest, - # - EvaluationClosedException, -) - -log = get_module_logger(__name__) - - -def handle_evaluation_closed_exception(): - def decorator(func): - @wraps(func) - async def wrapper(*args, **kwargs): - try: - return await func(*args, **kwargs) - except EvaluationClosedConflict as e: - raise EvaluationClosedException( - message=e.message, - run_id=e.run_id, - scenario_id=e.scenario_id, - result_id=e.result_id, - metrics_id=e.metrics_id, - ) from e - except Exception as e: - raise e - - return wrapper - - return decorator - - -async def parse_run_query_request( - ids: Optional[List[UUID]] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - status: Optional[EvaluationStatus] = Query(None), - statuses: Optional[List[EvaluationStatus]] = Query(None), - # WINDOWING - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - next: Optional[UUID] = Query(None), # pylint: disable=redefined-builtin - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluationRunQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = None - try: - __flags = EvaluationRunFlags(**_flags) if _flags else None # type: ignore - except: - pass - - run_query_request = EvaluationRunQueryRequest( - run=EvaluationRunQuery( - flags=__flags, - tags=_tags, - meta=_meta, - # - status=status, - statuses=statuses, - # - ids=ids, - ), - # - windowing=Windowing( - newest=newest, - oldest=oldest, - next=next, - limit=limit, - order=order, - ), - ) - - return run_query_request - - -async def parse_scenario_query_request( - ids: Optional[List[UUID]] = Query(None), - # - run_id: Optional[UUID] = Query(None), - run_ids: Optional[List[UUID]] = Query(None), - timestamp: Optional[datetime] = Query(None), - timestamps: Optional[List[datetime]] = Query(None), - interval: Optional[int] = Query(None), - intervals: Optional[List[int]] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - status: Optional[EvaluationStatus] = Query(None), - statuses: Optional[List[EvaluationStatus]] = Query(None), - # WINDOWING - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - next: Optional[UUID] = Query(None), # pylint: disable=redefined-builtin - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluationScenarioQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - scenario_query_request = EvaluationScenarioQueryRequest( - scenario=EvaluationScenarioQuery( - flags=_flags, - tags=_tags, - meta=_meta, - # - status=status, - statuses=statuses, - # - interval=interval, - intervals=intervals, - timestamp=timestamp, - timestamps=timestamps, - run_id=run_id, - run_ids=run_ids, - # - ids=ids, - ), - windowing=Windowing( - newest=newest, - oldest=oldest, - next=next, - limit=limit, - order=order, - ), - ) - - return scenario_query_request - - -async def parse_result_query_request( - ids: Optional[List[UUID]] = Query(None), - # - run_id: Optional[UUID] = Query(None), - run_ids: Optional[List[UUID]] = Query(None), - scenario_id: Optional[UUID] = Query(None), - scenario_ids: Optional[List[UUID]] = Query(None), - step_key: Optional[str] = Query(None), - step_keys: Optional[List[str]] = Query(None), - repeat_idx: Optional[int] = Query(None), - repeat_idxs: Optional[List[int]] = Query(None), - timestamp: Optional[datetime] = Query(None), - timestamps: Optional[List[datetime]] = Query(None), - interval: Optional[int] = Query(None), - intervals: Optional[List[int]] = Query(None), - # - status: Optional[EvaluationStatus] = Query(None), - statuses: Optional[List[EvaluationStatus]] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # WINDOWING - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - next: Optional[UUID] = Query(None), # pylint: disable=redefined-builtin - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluationResultQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - result_query_request = EvaluationResultQueryRequest( - result=EvaluationResultQuery( - flags=_flags, - tags=_tags, - meta=_meta, - # - status=status, - statuses=statuses, - # - interval=interval, - intervals=intervals, - timestamp=timestamp, - timestamps=timestamps, - repeat_idx=repeat_idx, - repeat_idxs=repeat_idxs, - step_key=step_key, - step_keys=step_keys, - scenario_id=scenario_id, - scenario_ids=scenario_ids, - run_id=run_id, - run_ids=run_ids, - # - ids=ids, - ), - windowing=Windowing( - newest=newest, - oldest=oldest, - next=next, - limit=limit, - order=order, - ), - ) - - return result_query_request - - -async def parse_metrics_query_request( - ids: Optional[List[UUID]] = Query(None), - # - run_id: Optional[UUID] = Query(None), - run_ids: Optional[List[UUID]] = Query(None), - scenario_id: Optional[UUID] = Query(None), - scenario_ids: Optional[List[UUID]] = Query(None), - timestamp: Optional[datetime] = Query(None), - timestamps: Optional[List[datetime]] = Query(None), - interval: Optional[int] = Query(None), - intervals: Optional[List[int]] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - status: Optional[EvaluationStatus] = Query(None), - statuses: Optional[List[EvaluationStatus]] = Query(None), - # WINDOWING - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - next: Optional[UUID] = Query(None), # pylint: disable=redefined-builtin - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluationMetricsQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - metrics_query_request = EvaluationMetricsQueryRequest( - metrics=EvaluationMetricsQuery( - flags=_flags, - tags=_tags, - meta=_meta, - # - status=status, - statuses=statuses, - # - interval=interval, - intervals=intervals, - timestamp=timestamp, - timestamps=timestamps, - scenario_id=scenario_id, - scenario_ids=scenario_ids, - run_id=run_id, - run_ids=run_ids, - # - ids=ids, - ), - windowing=Windowing( - newest=newest, - oldest=oldest, - next=next, - limit=limit, - order=order, - ), - ) - - return metrics_query_request - - -async def parse_queue_query_request( - ids: Optional[List[UUID]] = Query(None), - # - run_id: Optional[UUID] = Query(None), - run_ids: Optional[List[UUID]] = Query(None), - user_id: Optional[UUID] = Query(None), - user_ids: Optional[List[UUID]] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # WINDOWING - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - next: Optional[UUID] = Query(None), # pylint: disable=redefined-builtin - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluationQueueQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = None - try: - __flags = EvaluationQueueFlags(**_flags) if _flags else None # type: ignore - except: - pass - - queue_query_request = EvaluationQueueQueryRequest( - queue=EvaluationQueueQuery( - flags=__flags, - tags=_tags, - meta=_meta, - # - run_id=run_id, - run_ids=run_ids, - user_id=user_id, - user_ids=user_ids, - ids=ids, - ), - windowing=Windowing( - newest=newest, - oldest=oldest, - next=next, - limit=limit, - order=order, - ), - ) - - return queue_query_request diff --git a/api/oss/src/apis/fastapi/evaluators/models.py b/api/oss/src/apis/fastapi/evaluators/models.py index dd31edf1f3..0c03d717ea 100644 --- a/api/oss/src/apis/fastapi/evaluators/models.py +++ b/api/oss/src/apis/fastapi/evaluators/models.py @@ -3,183 +3,49 @@ from pydantic import BaseModel from oss.src.core.shared.dtos import ( - Windowing, - Reference, + Identifier, + Slug, + Lifecycle, + Meta, + Header, ) -from oss.src.core.evaluators.dtos import ( - Evaluator, - EvaluatorCreate, - EvaluatorEdit, - EvaluatorQuery, - EvaluatorFork, - EvaluatorRevisionsLog, - # - EvaluatorVariant, - EvaluatorVariantCreate, - EvaluatorVariantEdit, - EvaluatorVariantQuery, - # - EvaluatorRevision, - EvaluatorRevisionCreate, - EvaluatorRevisionEdit, - EvaluatorRevisionQuery, - EvaluatorRevisionCommit, - # - SimpleEvaluator, - SimpleEvaluatorCreate, - SimpleEvaluatorEdit, - SimpleEvaluatorQuery, + +from oss.src.core.workflows.dtos import ( + WorkflowData, + WorkflowFlags, ) -# EVALUATORS ------------------------------------------------------------------- +class EvaluatorFlags(WorkflowFlags): + def __init__(self, **data): + data["is_evaluator"] = True + super().__init__(**data) -class EvaluatorCreateRequest(BaseModel): - evaluator: EvaluatorCreate +class Evaluator(Identifier, Slug, Lifecycle, Header): + flags: Optional[EvaluatorFlags] = None + meta: Optional[Meta] = None + data: Optional[WorkflowData] = None -class EvaluatorEditRequest(BaseModel): - evaluator: EvaluatorEdit +class EvaluatorRequest(BaseModel): + evaluator: Evaluator -class EvaluatorQueryRequest(BaseModel): - evaluator: Optional[EvaluatorQuery] = None - # - evaluator_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None +class EvaluatorQuery(BaseModel): + flags: Optional[EvaluatorFlags] = None + meta: Optional[Meta] = None -class EvaluatorForkRequest(BaseModel): - evaluator: EvaluatorFork +class EvaluatorQueryRequest(BaseModel): + evaluator: EvaluatorQuery class EvaluatorResponse(BaseModel): - count: int = 0 + count: int evaluator: Optional[Evaluator] = None class EvaluatorsResponse(BaseModel): - count: int = 0 - evaluators: List[Evaluator] = [] - - -# EVALUATOR VARIANTS ----------------------------------------------------------- - - -class EvaluatorVariantCreateRequest(BaseModel): - evaluator_variant: EvaluatorVariantCreate - - -class EvaluatorVariantEditRequest(BaseModel): - evaluator_variant: EvaluatorVariantEdit - - -class EvaluatorVariantQueryRequest(BaseModel): - evaluator_variant: Optional[EvaluatorVariantQuery] = None - # - evaluator_refs: Optional[List[Reference]] = None - evaluator_variant_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class EvaluatorVariantForkRequest(BaseModel): # TODO: FIX ME - source_evaluator_variant_ref: Reference - target_evaluator_ref: Reference - slug: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - - -class EvaluatorRevisionsLogRequest(BaseModel): - evaluator: EvaluatorRevisionsLog - - -class EvaluatorVariantResponse(BaseModel): - count: int = 0 - evaluator_variant: Optional[EvaluatorVariant] = None - - -class EvaluatorVariantsResponse(BaseModel): - count: int = 0 - evaluator_variants: List[EvaluatorVariant] = [] - - -# EVALUATOR REVISIONS ---------------------------------------------------------- - - -class EvaluatorRevisionCreateRequest(BaseModel): - evaluator_revision: EvaluatorRevisionCreate - - -class EvaluatorRevisionEditRequest(BaseModel): - evaluator_revision: EvaluatorRevisionEdit - - -class EvaluatorRevisionQueryRequest(BaseModel): - evaluator_revision: Optional[EvaluatorRevisionQuery] = None - # - evaluator_refs: Optional[List[Reference]] = None - evaluator_variant_refs: Optional[List[Reference]] = None - evaluator_revision_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class EvaluatorRevisionCommitRequest(BaseModel): - evaluator_revision_commit: EvaluatorRevisionCommit - - -class EvaluatorRevisionRetrieveRequest(BaseModel): - evaluator_ref: Optional[Reference] = None - evaluator_variant_ref: Optional[Reference] = None - evaluator_revision_ref: Optional[Reference] = None - - -class EvaluatorRevisionResponse(BaseModel): - count: int = 0 - evaluator_revision: Optional[EvaluatorRevision] = None - - -class EvaluatorRevisionsResponse(BaseModel): - count: int = 0 - evaluator_revisions: List[EvaluatorRevision] = [] - - -# SIMPLE EVALUATORS ------------------------------------------------------------ - - -class SimpleEvaluatorCreateRequest(BaseModel): - evaluator: SimpleEvaluatorCreate - - -class SimpleEvaluatorEditRequest(BaseModel): - evaluator: SimpleEvaluatorEdit - - -class SimpleEvaluatorQueryRequest(BaseModel): - evaluator: Optional[SimpleEvaluatorQuery] = None - # - evaluator_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = False - # - windowing: Optional[Windowing] = None - - -class SimpleEvaluatorResponse(BaseModel): - count: int = 0 - evaluator: Optional[SimpleEvaluator] = None - - -class SimpleEvaluatorsResponse(BaseModel): - count: int = 0 - evaluators: List[SimpleEvaluator] = [] + count: int + evaluator: List[Evaluator] = [] diff --git a/api/oss/src/apis/fastapi/evaluators/router.py b/api/oss/src/apis/fastapi/evaluators/router.py index 4ee7f5cbd8..cbc29ae44e 100644 --- a/api/oss/src/apis/fastapi/evaluators/router.py +++ b/api/oss/src/apis/fastapi/evaluators/router.py @@ -1,77 +1,30 @@ -from typing import Optional, List -from uuid import UUID +from typing import Union, Optional, List +from uuid import uuid4, UUID -from fastapi import APIRouter, Request, status, Depends +from fastapi import Request, status, HTTPException -from oss.src.utils.common import is_ee +from oss.src.utils.common import APIRouter, is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache -from oss.src.core.shared.dtos import ( - Reference, -) -from oss.src.core.evaluators.dtos import ( - EvaluatorFlags, - EvaluatorQueryFlags, - # - EvaluatorQuery, - # - EvaluatorRevision, - # - SimpleEvaluatorData, - SimpleEvaluatorQuery, - SimpleEvaluator, - # - SimpleEvaluatorFlags, - SimpleEvaluatorQueryFlags, -) -from oss.src.core.evaluators.service import ( - SimpleEvaluatorsService, - EvaluatorsService, +from oss.src.core.shared.dtos import Reference +from oss.src.core.workflows.dtos import WorkflowFlags +from oss.src.core.workflows.service import WorkflowsService +from oss.src.apis.fastapi.shared.utils import handle_exceptions + +from oss.src.core.workflows.dtos import ( + WorkflowArtifact, + WorkflowVariant, + WorkflowRevision, + WorkflowFlags, ) from oss.src.apis.fastapi.evaluators.models import ( - EvaluatorCreateRequest, - EvaluatorEditRequest, EvaluatorQueryRequest, - EvaluatorForkRequest, - EvaluatorRevisionsLogRequest, + EvaluatorRequest, EvaluatorResponse, EvaluatorsResponse, - # - EvaluatorVariantCreateRequest, - EvaluatorVariantEditRequest, - EvaluatorVariantQueryRequest, - EvaluatorVariantResponse, - EvaluatorVariantsResponse, - # - EvaluatorRevisionCreateRequest, - EvaluatorRevisionEditRequest, - EvaluatorRevisionQueryRequest, - EvaluatorRevisionCommitRequest, - EvaluatorRevisionRetrieveRequest, - EvaluatorRevisionResponse, - EvaluatorRevisionsResponse, - # - SimpleEvaluatorCreateRequest, - SimpleEvaluatorEditRequest, - SimpleEvaluatorQueryRequest, - SimpleEvaluatorResponse, - SimpleEvaluatorsResponse, -) -from oss.src.apis.fastapi.evaluators.utils import ( - parse_evaluator_query_request_from_params, - parse_evaluator_query_request_from_body, - merge_evaluator_query_requests, - parse_evaluator_variant_query_request_from_params, - parse_evaluator_variant_query_request_from_body, - merge_evaluator_variant_query_requests, - parse_evaluator_revision_query_request_from_params, - parse_evaluator_revision_query_request_from_body, - merge_evaluator_revision_query_requests, - parse_evaluator_revision_retrieve_request_from_params, - parse_evaluator_revision_retrieve_request_from_body, + Evaluator, + EvaluatorFlags, ) if is_ee(): @@ -83,1500 +36,751 @@ class EvaluatorsRouter: - def __init__( - self, - *, - evaluators_service: EvaluatorsService, - ): - self.evaluators_service = evaluators_service - - self.router = APIRouter() - - # EVALUATORS ----------------------------------------------------------- - - self.router.add_api_route( - "/", - self.create_evaluator, - methods=["POST"], - operation_id="create_evaluator", - status_code=status.HTTP_200_OK, - response_model=EvaluatorResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{evaluator_id}", - self.fetch_evaluator, - methods=["GET"], - operation_id="fetch_evaluator", - status_code=status.HTTP_200_OK, - response_model=EvaluatorResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{evaluator_id}", - self.edit_evaluator, - methods=["PUT"], - operation_id="edit_evaluator", - status_code=status.HTTP_200_OK, - response_model=EvaluatorResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{evaluator_id}/archive", - self.archive_evaluator, - methods=["POST"], - operation_id="archive_evaluator", - status_code=status.HTTP_200_OK, - response_model=EvaluatorResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{evaluator_id}/unarchive", - self.unarchive_evaluator, - methods=["POST"], - operation_id="unarchive_evaluator", - status_code=status.HTTP_200_OK, - response_model=EvaluatorResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/query", - self.query_evaluators, - methods=["POST"], - operation_id="query_evaluators", - status_code=status.HTTP_200_OK, - response_model=EvaluatorsResponse, - response_model_exclude_none=True, - ) - - # EVALUATOR VARIANTS --------------------------------------------------- - - self.router.add_api_route( - "/variants/", - self.create_evaluator_variant, - methods=["POST"], - operation_id="create_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{evaluator_variant_id}", - self.fetch_evaluator_variant, - methods=["GET"], - operation_id="fetch_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{evaluator_variant_id}", - self.edit_evaluator_variant, - methods=["PUT"], - operation_id="edit_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{evaluator_variant_id}/archive", - self.archive_evaluator_variant, - methods=["POST"], - operation_id="archive_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{evaluator_variant_id}/unarchive", - self.unarchive_evaluator_variant, - methods=["POST"], - operation_id="unarchive_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/query", - self.query_evaluator_variants, - methods=["POST"], - operation_id="query_evaluator_variants", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantsResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/fork", - self.fork_evaluator_variant, - methods=["POST"], - operation_id="fork_evaluator_variant", - status_code=status.HTTP_200_OK, - response_model=EvaluatorVariantResponse, - response_model_exclude_none=True, - ) - - # EVALUATOR REVISIONS -------------------------------------------------- - - self.router.add_api_route( - "/revisions/retrieve", - self.retrieve_evaluator_revision, - methods=["POST"], - operation_id="retrieve_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/", - self.create_evaluator_revision, - methods=["POST"], - operation_id="create_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{evaluator_revision_id}", - self.fetch_evaluator_revision, - methods=["GET"], - operation_id="fetch_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{evaluator_revision_id}", - self.edit_evaluator_revision, - methods=["PUT"], - operation_id="edit_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{evaluator_revision_id}/archive", - self.archive_evaluator_revision, - methods=["POST"], - operation_id="archive_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{evaluator_revision_id}/unarchive", - self.unarchive_evaluator_revision, - methods=["POST"], - operation_id="unarchive_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/query", - self.query_evaluator_revisions, - methods=["POST"], - operation_id="query_evaluator_revisions", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionsResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/commit", - self.commit_evaluator_revision, - methods=["POST"], - operation_id="commit_evaluator_revision", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/log", - self.log_evaluator_revisions, - methods=["POST"], - operation_id="log_evaluator_revisions", - status_code=status.HTTP_200_OK, - response_model=EvaluatorRevisionsResponse, - response_model_exclude_none=True, - ) - - # EVALUATORS --------------------------------------------------------------- - - @intercept_exceptions() - async def create_evaluator( - self, - request: Request, - *, - evaluator_id: Optional[UUID] = None, - # - evaluator_create_request: EvaluatorCreateRequest, - ) -> EvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator = await self.evaluators_service.create_evaluator( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator_id, - # - evaluator_create=evaluator_create_request.evaluator, - ) - - return EvaluatorResponse( - count=1 if evaluator else 0, - evaluator=evaluator, - ) - - @intercept_exceptions() - @suppress_exceptions(default=EvaluatorResponse()) - async def fetch_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - ) -> EvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator = await self.evaluators_service.fetch_evaluator( - project_id=UUID(request.state.project_id), - # - evaluator_ref=Reference(id=evaluator_id), - ) - - return EvaluatorResponse( - count=1 if evaluator else 0, - evaluator=evaluator, - ) - - @intercept_exceptions() - async def edit_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - # - evaluator_edit_request: EvaluatorEditRequest, - ) -> EvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(evaluator_id) != str(evaluator_edit_request.evaluator.id): - return EvaluatorResponse() - - evaluator = await self.evaluators_service.edit_evaluator( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_edit=evaluator_edit_request.evaluator, - ) - - return EvaluatorResponse( - count=1 if evaluator else 0, - evaluator=evaluator, - ) - - @intercept_exceptions() - async def archive_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - ) -> EvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator = await self.evaluators_service.archive_evaluator( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator_id, - ) - - return EvaluatorResponse( - count=1 if evaluator else 0, - evaluator=evaluator, - ) - - @intercept_exceptions() - async def unarchive_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - ) -> EvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator = await self.evaluators_service.unarchive_evaluator( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator_id, - ) - - return EvaluatorResponse( - count=1 if evaluator else 0, - evaluator=evaluator, - ) - - @intercept_exceptions() - @suppress_exceptions(default=EvaluatorsResponse()) - async def query_evaluators( - self, - request: Request, - *, - evaluator_query_request: EvaluatorQueryRequest, - ) -> EvaluatorsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluators = await self.evaluators_service.query_evaluators( - project_id=UUID(request.state.project_id), - # - evaluator_query=evaluator_query_request.evaluator, - # - evaluator_refs=evaluator_query_request.evaluator_refs, - # - include_archived=evaluator_query_request.include_archived, - # - windowing=evaluator_query_request.windowing, - ) - - evaluators_response = EvaluatorsResponse( - count=len(evaluators), - evaluators=evaluators, - ) - - return evaluators_response - - # EVALUATOR VARIANTS ------------------------------------------------------- - - @intercept_exceptions() - async def create_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_create_request: EvaluatorVariantCreateRequest, - ) -> EvaluatorVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_variant = await self.evaluators_service.create_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_create=evaluator_variant_create_request.evaluator_variant, - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - @intercept_exceptions() - async def fetch_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_id: UUID, - ) -> EvaluatorVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_variant = await self.evaluators_service.fetch_evaluator_variant( - project_id=UUID(request.state.project_id), - # - evaluator_variant_ref=Reference(id=evaluator_variant_id), - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - @intercept_exceptions() - async def edit_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_id: UUID, - # - evaluator_variant_edit_request: EvaluatorVariantEditRequest, - ) -> EvaluatorVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(evaluator_variant_id) != str( - evaluator_variant_edit_request.evaluator_variant.id - ): - return EvaluatorVariantResponse() - - evaluator_variant = await self.evaluators_service.edit_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_edit=evaluator_variant_edit_request.evaluator_variant, - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - @intercept_exceptions() - async def archive_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_id: UUID, - ) -> EvaluatorVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_variant = await self.evaluators_service.archive_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_id=evaluator_variant_id, - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - @intercept_exceptions() - async def unarchive_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_id: UUID, - ) -> EvaluatorVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_variant = await self.evaluators_service.unarchive_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_id=evaluator_variant_id, - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - @intercept_exceptions() - async def query_evaluator_variants( - self, - request: Request, - *, - query_request_params: Optional[EvaluatorVariantQueryRequest] = Depends( - parse_evaluator_variant_query_request_from_params - ), - ) -> EvaluatorVariantsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - body_json = None - query_request_body = None - - try: - body_json = await request.json() - - if body_json: - query_request_body = parse_evaluator_variant_query_request_from_body( - **body_json - ) - - except: - pass - - workflow_variant_query_request = merge_evaluator_variant_query_requests( - query_request_params, - query_request_body, - ) - - evaluator_variants = await self.evaluators_service.query_evaluator_variants( - project_id=UUID(request.state.project_id), - # - evaluator_variant_query=workflow_variant_query_request.evaluator_variant, - # - evaluator_refs=workflow_variant_query_request.evaluator_refs, - evaluator_variant_refs=workflow_variant_query_request.evaluator_variant_refs, - # - include_archived=workflow_variant_query_request.include_archived, - # - windowing=workflow_variant_query_request.windowing, - ) - - evaluator_variants_response = EvaluatorVariantsResponse( - count=len(evaluator_variants), - evaluator_variants=evaluator_variants, - ) - - return evaluator_variants_response - - @intercept_exceptions() # TODO: FIX ME - async def fork_evaluator_variant( - self, - request: Request, - *, - evaluator_variant_id: UUID, - # - evaluator_variant_fork_request: EvaluatorForkRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_variant = await self.evaluators_service.fork_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_fork=evaluator_variant_fork_request.evaluator, - ) - - evaluator_variant_response = EvaluatorVariantResponse( - count=1 if evaluator_variant else 0, - evaluator_variant=evaluator_variant, - ) - - return evaluator_variant_response - - # EVALUATOR REVISIONS ------------------------------------------------------ - - @intercept_exceptions() - async def retrieve_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_retrieve_request: EvaluatorRevisionRetrieveRequest, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - project_id=request.state.project_id, - user_uid=request.state.user_id, - # - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - cache_key = { - "artifact_ref": evaluator_revision_retrieve_request.evaluator_ref, # type: ignore - "variant_ref": evaluator_revision_retrieve_request.evaluator_variant_ref, # type: ignore - "revision_ref": evaluator_revision_retrieve_request.evaluator_revision_ref, # type: ignore - } - - evaluator_revision = None - # evaluator_revision = await get_cache( - # namespace="evaluators:retrieve", - # project_id=request.state.project_id, - # user_id=request.state.user_id, - # key=cache_key, - # model=EvaluatorRevision, - # ) - - if not evaluator_revision: - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=UUID(request.state.project_id), - # - evaluator_ref=evaluator_revision_retrieve_request.evaluator_ref, # type: ignore - evaluator_variant_ref=evaluator_revision_retrieve_request.evaluator_variant_ref, # type: ignore - evaluator_revision_ref=evaluator_revision_retrieve_request.evaluator_revision_ref, # type: ignore - ) - - await set_cache( - namespace="evaluators:retrieve", - project_id=request.state.project_id, - user_id=request.state.user_id, - key=cache_key, - value=evaluator_revision, - ) - - evaluator_revision_response = EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - return evaluator_revision_response - - @intercept_exceptions() - async def create_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_create_request: EvaluatorRevisionCreateRequest, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revision = await self.evaluators_service.create_evaluator_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_revision_create=evaluator_revision_create_request.evaluator_revision, - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - @suppress_exceptions(default=EvaluatorRevisionResponse()) - async def fetch_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_id: UUID, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=UUID(request.state.project_id), - # - evaluator_revision_ref=Reference(id=evaluator_revision_id), - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - async def edit_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_id: UUID, - # - evaluator_revision_edit_request: EvaluatorRevisionEditRequest, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(evaluator_revision_id) != str( - evaluator_revision_edit_request.evaluator_revision.id - ): - return EvaluatorRevisionResponse() - - evaluator_revision = await self.evaluators_service.edit_evaluator_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_revision_edit=evaluator_revision_edit_request.evaluator_revision, - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - async def archive_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_id: UUID, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revision = await self.evaluators_service.archive_evaluator_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_revision_id=evaluator_revision_id, - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - async def unarchive_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_id: UUID, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revision = await self.evaluators_service.unarchive_evaluator_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_revision_id=evaluator_revision_id, - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - @suppress_exceptions(default=EvaluatorRevisionsResponse()) - async def query_evaluator_revisions( - self, - request: Request, - *, - evaluator_revision_query_request: EvaluatorRevisionQueryRequest, - ) -> EvaluatorRevisionsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revisions = await self.evaluators_service.query_evaluator_revisions( - project_id=UUID(request.state.project_id), - # - evaluator_revision_query=evaluator_revision_query_request.evaluator_revision, - # - evaluator_refs=evaluator_revision_query_request.evaluator_refs, - evaluator_variant_refs=evaluator_revision_query_request.evaluator_variant_refs, - evaluator_revision_refs=evaluator_revision_query_request.evaluator_revision_refs, - # - include_archived=evaluator_revision_query_request.include_archived, - # - windowing=evaluator_revision_query_request.windowing, - ) - - return EvaluatorRevisionsResponse( - count=len(evaluator_revisions), - evaluator_revisions=evaluator_revisions, - ) - - @intercept_exceptions() - async def commit_evaluator_revision( - self, - request: Request, - *, - evaluator_revision_commit_request: EvaluatorRevisionCommitRequest, - ) -> EvaluatorRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revision = await self.evaluators_service.commit_evaluator_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_revision_commit=evaluator_revision_commit_request.evaluator_revision_commit, - ) - - return EvaluatorRevisionResponse( - count=1 if evaluator_revision else 0, - evaluator_revision=evaluator_revision, - ) - - @intercept_exceptions() - async def log_evaluator_revisions( - self, - request: Request, - *, - evaluator_revisions_log_request: EvaluatorRevisionsLogRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - evaluator_revisions = await self.evaluators_service.log_evaluator_revisions( - project_id=UUID(request.state.project_id), - # - evaluator_revisions_log=evaluator_revisions_log_request.evaluator, - ) - - revisions_response = EvaluatorRevisionsResponse( - count=len(evaluator_revisions), - evaluator_revisions=evaluator_revisions, - ) - - return revisions_response - + VERSION = "1.0.0" -class SimpleEvaluatorsRouter: def __init__( self, *, - simple_evaluators_service: SimpleEvaluatorsService, + workflows_service: WorkflowsService, ): - self.simple_evaluators_service = simple_evaluators_service - self.evaluators_service = self.simple_evaluators_service.evaluators_service + self.workflows_service = workflows_service self.router = APIRouter() - # SIMPLE EVALUATORS ---------------------------------------------------- + ### CRUD self.router.add_api_route( "/", - self.create_simple_evaluator, + self.create_evaluator, methods=["POST"], - operation_id="create_simple_evaluator", + operation_id="create_evaluator", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorResponse, response_model_exclude_none=True, ) self.router.add_api_route( "/{evaluator_id}", - self.fetch_simple_evaluator, + self.fetch_evaluator, methods=["GET"], - operation_id="fetch_simple_evaluator", + operation_id="fetch_evaluator", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorResponse, response_model_exclude_none=True, ) self.router.add_api_route( "/{evaluator_id}", - self.edit_simple_evaluator, + self.edit_evaluator, methods=["PUT"], - operation_id="edit_simple_evaluator", + operation_id="edit_evaluator", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorResponse, response_model_exclude_none=True, ) + ### RPC + self.router.add_api_route( "/{evaluator_id}/archive", - self.archive_simple_evaluator, + self.archive_evaluator, methods=["POST"], - operation_id="archive_simple_evaluator", + operation_id="archive_evaluator", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorResponse, response_model_exclude_none=True, ) self.router.add_api_route( "/{evaluator_id}/unarchive", - self.unarchive_simple_evaluator, + self.unarchive_evaluator, methods=["POST"], - operation_id="unarchive_simple_evaluator", + operation_id="unarchive_evaluator", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorResponse, response_model_exclude_none=True, ) self.router.add_api_route( - "/query", - self.query_simple_evaluators, - methods=["POST"], - operation_id="query_simple_evaluators", + "/", + self.query_evaluators, + methods=["GET"], + operation_id="list_evaluators", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorsResponse, + response_model=EvaluatorsResponse, response_model_exclude_none=True, ) self.router.add_api_route( - "/{evaluator_id}/transfer", - self.transfer_simple_evaluator, + "/query", + self.query_evaluators, methods=["POST"], - operation_id="transfer_simple_evaluator", + operation_id="query_evaluators", status_code=status.HTTP_200_OK, - response_model=SimpleEvaluatorResponse, + response_model=EvaluatorsResponse, response_model_exclude_none=True, ) - # SIMPLE EVALUATORS -------------------------------------------------------- - - @intercept_exceptions() - async def create_simple_evaluator( + @handle_exceptions() + async def create_evaluator( self, - request: Request, *, - evaluator_id: Optional[UUID] = None, - # - simple_evaluator_create_request: SimpleEvaluatorCreateRequest, - ) -> SimpleEvaluatorResponse: + request: Request, + evaluator_request: EvaluatorRequest, + ) -> EvaluatorResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.EDIT_EVALUATORS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - simple_evaluator = await self.simple_evaluators_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator_id, - # - simple_evaluator_create=simple_evaluator_create_request.evaluator, + # TODO: VALIDATE DATA + + evaluator_flags = EvaluatorFlags( + **( + evaluator_request.evaluator.flags.model_dump() + if evaluator_request.evaluator.flags + else {} + ) ) - simple_evaluator_response = SimpleEvaluatorResponse( - count=1 if simple_evaluator else 0, - evaluator=simple_evaluator, + workflow_flags = WorkflowFlags(**evaluator_flags.model_dump()) + + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.create_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_slug=evaluator_request.evaluator.slug, + # + artifact_flags=workflow_flags, + artifact_meta=evaluator_request.evaluator.meta, + artifact_name=evaluator_request.evaluator.name, + artifact_description=evaluator_request.evaluator.description, + ) ) - return simple_evaluator_response + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) - @intercept_exceptions() - @suppress_exceptions(default=SimpleEvaluatorResponse()) - async def fetch_simple_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - ) -> SimpleEvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + workflow_variant_slug = uuid4().hex - simple_evaluator = await self.simple_evaluators_service.fetch( - project_id=UUID(request.state.project_id), - # - evaluator_id=evaluator_id, + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.create_variant( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=workflow_artifact.id, + # + variant_slug=workflow_variant_slug, + # + variant_flags=workflow_flags, + variant_meta=evaluator_request.evaluator.meta, + ) ) - simple_evaluator_response = SimpleEvaluatorResponse( - count=1 if simple_evaluator else 0, - evaluator=simple_evaluator, + if workflow_variant is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) + + workflow_revision_slug = uuid4().hex + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.create_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=workflow_artifact.id, + variant_id=workflow_variant.id, + # + revision_slug=workflow_revision_slug, + # + revision_flags=workflow_flags, + revision_meta=evaluator_request.evaluator.meta, + ) ) - return simple_evaluator_response + if workflow_revision is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) - @intercept_exceptions() - async def edit_simple_evaluator( - self, - request: Request, - *, - evaluator_id: UUID, - # - simple_evaluator_edit_request: SimpleEvaluatorEditRequest, - ) -> SimpleEvaluatorResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + workflow_revision_slug = uuid4().hex + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.commit_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=workflow_variant.id, + # + revision_slug=workflow_revision_slug, + # + revision_flags=workflow_flags, + revision_meta=evaluator_request.evaluator.meta, + revision_data=evaluator_request.evaluator.data, + ) + ) - if str(evaluator_id) != str(simple_evaluator_edit_request.evaluator.id): - return SimpleEvaluatorResponse() + if workflow_revision is None: + # do something + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create evaluator. Please try again or contact support.", + ) - simple_evaluator = await self.simple_evaluators_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, # - simple_evaluator_edit=simple_evaluator_edit_request.evaluator, + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + flags=evaluator_flags, + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, ) - simple_evaluator_response = SimpleEvaluatorResponse( - count=1 if simple_evaluator else 0, - evaluator=simple_evaluator, + evaluator_response = EvaluatorResponse( + count=1, + evaluator=evaluator, ) - return simple_evaluator_response + return evaluator_response - @intercept_exceptions() - async def archive_simple_evaluator( # TODO: FIX ME + @handle_exceptions() + async def fetch_evaluator( self, - request: Request, *, - evaluator_id: UUID, - ) -> SimpleEvaluatorResponse: + request: Request, + evaluator_id: Union[UUID, str], + ) -> EvaluatorResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.VIEW_EVALUATORS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - evaluator = await self.evaluators_service.fetch_evaluator( - project_id=UUID(request.state.project_id), - # - evaluator_ref=Reference(id=evaluator_id), + workflow_artifact_ref = Reference( + id=evaluator_id, ) - if not evaluator or not evaluator.id: - return SimpleEvaluatorResponse() - - evaluator = await self.evaluators_service.archive_evaluator( # type: ignore - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator.id, + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) ) - if not evaluator or not evaluator.id: - return SimpleEvaluatorResponse() + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) - evaluator_variant = await self.evaluators_service.fetch_evaluator_variant( - project_id=UUID(request.state.project_id), - # - evaluator_ref=Reference(id=evaluator.id), + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) ) - if evaluator_variant is None: - return SimpleEvaluatorResponse() + if workflow_variant is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) - evaluator_variant = await self.evaluators_service.archive_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_id=evaluator_variant.id, # type: ignore + workflow_variant_ref = Reference( + id=workflow_variant.id, ) - if evaluator_variant is None: - return SimpleEvaluatorResponse() + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=workflow_variant_ref, + ) + ) - simple_evaluator_flags = ( - SimpleEvaluatorFlags( - **evaluator.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ), + if workflow_revision is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", ) - if evaluator.flags - else SimpleEvaluatorFlags() + + evaluator_flags = EvaluatorFlags( + **(workflow_artifact.flags.model_dump() if workflow_artifact.flags else {}) ) - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, + flags=evaluator_flags, + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, ) - simple_evaluator_response = SimpleEvaluatorResponse( + evaluator_response = EvaluatorResponse( count=1, - evaluator=simple_evaluator, + evaluator=evaluator, ) - return simple_evaluator_response + return evaluator_response - @intercept_exceptions() - async def unarchive_simple_evaluator( # TODO: FIX ME + @handle_exceptions() + async def edit_evaluator( self, *, request: Request, - evaluator_id: UUID, - ) -> SimpleEvaluatorResponse: + evaluator_id: Union[UUID, str], + evaluator_request: EvaluatorRequest, + ) -> EvaluatorResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.EDIT_EVALUATORS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - evaluator_ref = Reference( - id=evaluator_id, - ) + # TODO: VALIDATE DATA - evaluator = await self.evaluators_service.fetch_evaluator( - project_id=UUID(request.state.project_id), - # - evaluator_ref=evaluator_ref, + evaluator_flags = EvaluatorFlags( + **( + evaluator_request.evaluator.flags.model_dump() + if evaluator_request.evaluator.flags + else {} + ) ) - if evaluator is None or not evaluator.id: - return SimpleEvaluatorResponse() + workflow_flags = WorkflowFlags(**evaluator_flags.model_dump()) - evaluator = await self.evaluators_service.unarchive_evaluator( # type: ignore - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_id=evaluator.id, + if str(evaluator_id) != str(evaluator_request.evaluator.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {evaluator_id} != {evaluator_request.evaluator.id}", + ) + + workflow_artifact_ref = Reference( + id=evaluator_request.evaluator.id, ) - if evaluator is None: - return SimpleEvaluatorResponse() + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) + ) - evaluator_variant = await self.evaluators_service.fetch_evaluator_variant( - project_id=UUID(request.state.project_id), - # - evaluator_ref=evaluator_ref, + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) + + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.edit_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=evaluator_request.evaluator.id, + # + artifact_flags=workflow_flags, + artifact_meta=evaluator_request.evaluator.meta, + artifact_name=evaluator_request.evaluator.name, + artifact_description=evaluator_request.evaluator.description, + ) ) - if evaluator_variant is None: - return SimpleEvaluatorResponse() + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit evaluator. Please try again or contact support.", + ) - evaluator_variant = await self.evaluators_service.unarchive_evaluator_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - evaluator_variant_id=evaluator_variant.id, # type: ignore + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) ) - if evaluator_variant is None: - return SimpleEvaluatorResponse() + if workflow_variant is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) - simple_evaluator_flags = ( - SimpleEvaluatorFlags( - **evaluator.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ), + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.edit_variant( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=workflow_variant.id, + # + variant_flags=workflow_flags, + variant_meta=evaluator_request.evaluator.meta, ) - if evaluator.flags - else SimpleEvaluatorFlags() ) - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, - # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, - # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, + if workflow_variant is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit evaluator. Please try again or contact support.", + ) + + workflow_variant_ref = Reference( + id=workflow_variant.id, ) - simple_evaluator_response = SimpleEvaluatorResponse( - count=1 if simple_evaluator else 0, - evaluator=simple_evaluator, + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=workflow_variant_ref, + ) ) - return simple_evaluator_response + if workflow_revision is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) + + workflow_revision_slug = uuid4().hex - @intercept_exceptions() - @suppress_exceptions(default=SimpleEvaluatorsResponse()) - async def list_simple_evaluators( - self, - request: Request, - ) -> SimpleEvaluatorsResponse: - simple_evaluator_query_request = SimpleEvaluatorQueryRequest( - evaluator=SimpleEvaluatorQuery( - flags=SimpleEvaluatorQueryFlags( - is_evaluator=True, - ) + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.commit_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=workflow_variant.id, + # + revision_slug=workflow_revision_slug, + # + revision_flags=workflow_flags, + revision_meta=evaluator_request.evaluator.meta, + revision_data=evaluator_request.evaluator.data, ) ) - return await self.query_simple_evaluators( - request=request, + if workflow_revision is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit evaluator. Please try again or contact support.", + ) + + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, # - simple_evaluator_query_request=simple_evaluator_query_request, + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + flags=evaluator_flags, + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, + ) + + evaluator_response = EvaluatorResponse( + count=1, + evaluator=evaluator, ) - @intercept_exceptions() - @suppress_exceptions(default=SimpleEvaluatorsResponse()) - async def query_simple_evaluators( # TODO: FIX ME + return evaluator_response + + @handle_exceptions() + async def archive_evaluator( self, - request: Request, *, - simple_evaluator_query_request: SimpleEvaluatorQueryRequest, - ) -> SimpleEvaluatorsResponse: + request: Request, + evaluator_id: Union[UUID, str], + ) -> EvaluatorResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATORS, # type: ignore + permission=Permission.EDIT_EVALUATORS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - simple_evaluator_flags = ( - simple_evaluator_query_request.evaluator.flags - if simple_evaluator_query_request.evaluator - else None + workflow_artifact_ref = Reference( + id=evaluator_id, ) - flags = EvaluatorQueryFlags( - is_custom=( - simple_evaluator_flags.is_custom if simple_evaluator_flags else None - ), - is_evaluator=True, - is_human=( - simple_evaluator_flags.is_human if simple_evaluator_flags else None - ), + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) ) - evaluator_query = EvaluatorQuery( - flags=flags, - tags=( - simple_evaluator_query_request.evaluator.tags - if simple_evaluator_query_request.evaluator - else None - ), - meta=( - simple_evaluator_query_request.evaluator.meta - if simple_evaluator_query_request.evaluator - else None - ), - # + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", + ) + + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.archive_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=evaluator_id, + ) ) - evaluators = await self.evaluators_service.query_evaluators( - project_id=UUID(request.state.project_id), - # - evaluator_query=evaluator_query, - # - evaluator_refs=simple_evaluator_query_request.evaluator_refs, + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to archive evaluator. Please try again or contact support.", + ) + + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, # - include_archived=simple_evaluator_query_request.include_archived, + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, # - windowing=simple_evaluator_query_request.windowing, + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, ) - simple_evaluators: List[SimpleEvaluator] = [] + evaluator_response = EvaluatorResponse( + count=1, + evaluator=evaluator, + ) - for evaluator in evaluators: - evaluator_ref = Reference( - id=evaluator.id, - ) + return evaluator_response + + @handle_exceptions() + async def unarchive_evaluator( + self, + *, + request: Request, + evaluator_id: Union[UUID, str], + ) -> EvaluatorResponse: + if is_ee(): + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_EVALUATORS, + ): + raise FORBIDDEN_EXCEPTION + + workflow_artifact_ref = Reference( + id=evaluator_id, + ) - evaluator_variant = await self.evaluators_service.fetch_evaluator_variant( + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.fetch_artifact( project_id=UUID(request.state.project_id), # - evaluator_ref=evaluator_ref, + artifact_ref=workflow_artifact_ref, ) + ) - if evaluator_variant is None: - continue - - evaluator_variant_ref = Reference( - id=evaluator_variant.id, + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic evaluator not found. Please check the ID and try again.", ) - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( + workflow_artifact: Optional[WorkflowArtifact] = ( + await self.workflows_service.unarchive_artifact( project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), # - evaluator_ref=evaluator_ref, - evaluator_variant_ref=evaluator_variant_ref, - ) - - if evaluator_revision is None: - continue - - simple_evaluator_flags = ( - SimpleEvaluatorFlags( - **evaluator.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ), - ) - if evaluator.flags - else SimpleEvaluatorFlags() + artifact_id=evaluator_id, ) + ) - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, - # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, - # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, - # - data=SimpleEvaluatorData( - **( - evaluator_revision.data.model_dump(mode="json") - if evaluator_revision.data - else {} - ), - ), + if workflow_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to unarchive evaluator. Please try again or contact support.", ) - simple_evaluators.append(simple_evaluator) + evaluator = Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, + # + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + ) - simple_evaluators_response = SimpleEvaluatorsResponse( - count=len(simple_evaluators), - evaluators=simple_evaluators, + evaluator_response = EvaluatorResponse( + count=1, + evaluator=evaluator, ) - return simple_evaluators_response + return evaluator_response - @intercept_exceptions() - async def transfer_simple_evaluator( + @handle_exceptions() + async def query_evaluators( self, *, request: Request, - evaluator_id: UUID, - ) -> SimpleEvaluatorResponse: + evaluator_query_request: Optional[EvaluatorQueryRequest] = None, + ) -> EvaluatorsResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.VIEW_EVALUATORS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION + + evaluators: List[Evaluator] = [] + + evaluator_flags = ( + evaluator_query_request.evaluator.flags if evaluator_query_request else None + ) + + flags = WorkflowFlags( + is_evaluator=True, + is_custom=evaluator_flags.is_custom if evaluator_flags else None, + is_human=evaluator_flags.is_human if evaluator_flags else None, + ) + + meta = ( + evaluator_query_request.evaluator.meta if evaluator_query_request else None + ) + + log.debug( + flags=flags, + meta=meta, + ) - simple_evaluator = await self.simple_evaluators_service.transfer( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - evaluator_id=evaluator_id, + workflow_artifacts: List[WorkflowArtifact] = ( + await self.workflows_service.query_artifacts( + project_id=UUID(request.state.project_id), + # + artifact_flags=flags, + artifact_meta=meta, + ) ) - simple_evaluator_response = SimpleEvaluatorResponse( - count=1 if simple_evaluator else 0, - evaluator=simple_evaluator, + if workflow_artifacts is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to query evaluators. Please try again or contact support.", + ) + + for workflow_artifact in workflow_artifacts: + workflow_artifact_ref = Reference( + id=workflow_artifact.id, + ) + + workflow_variant: Optional[WorkflowVariant] = ( + await self.workflows_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=workflow_artifact_ref, + ) + ) + + if workflow_variant is None: + continue + + workflow_variant_ref = Reference( + id=workflow_variant.id, + ) + + workflow_revision: Optional[WorkflowRevision] = ( + await self.workflows_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=workflow_variant_ref, + ) + ) + + if workflow_revision is None: + continue + + evaluator_flags = EvaluatorFlags( + **( + workflow_artifact.flags.model_dump() + if workflow_artifact.flags + else {} + ) + ) + + evaluators.append( + Evaluator( + id=workflow_artifact.id, + slug=workflow_artifact.slug, + # + created_at=workflow_artifact.created_at, + updated_at=workflow_artifact.updated_at, + deleted_at=workflow_artifact.deleted_at, + created_by_id=workflow_artifact.created_by_id, + updated_by_id=workflow_artifact.updated_by_id, + deleted_by_id=workflow_artifact.deleted_by_id, + # + flags=evaluator_flags, + meta=workflow_artifact.meta, + name=workflow_artifact.name, + description=workflow_artifact.description, + data=workflow_revision.data, + ) + ) + + evaluators_response = EvaluatorsResponse( + count=len(evaluators), + evaluator=evaluators, ) - return simple_evaluator_response + return evaluators_response diff --git a/api/oss/src/apis/fastapi/evaluators/utils.py b/api/oss/src/apis/fastapi/evaluators/utils.py deleted file mode 100644 index 04b46dc7e8..0000000000 --- a/api/oss/src/apis/fastapi/evaluators/utils.py +++ /dev/null @@ -1,632 +0,0 @@ -from typing import Optional, Literal, List -from uuid import UUID -from datetime import datetime - -from fastapi import Query - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.dtos import ( - Windowing, - Reference, -) -from oss.src.core.evaluators.dtos import ( - EvaluatorFlags, - EvaluatorQueryFlags, - # - EvaluatorQuery, - EvaluatorVariantQuery, - EvaluatorRevisionQuery, -) - -from oss.src.apis.fastapi.shared.utils import ( - parse_metadata, -) -from oss.src.apis.fastapi.evaluators.models import ( - EvaluatorQueryRequest, - EvaluatorVariantQueryRequest, - EvaluatorRevisionQueryRequest, - EvaluatorRevisionRetrieveRequest, -) - - -log = get_module_logger(__name__) - - -def parse_evaluator_query_request_from_params( - evaluator_id: Optional[UUID] = Query(None), - evaluator_ids: Optional[List[UUID]] = Query(None), - evaluator_slug: Optional[str] = Query(None), - evaluator_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluatorQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = EvaluatorQueryFlags(**_flags) if _flags else None - - evaluator = ( - EvaluatorQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - evaluator_refs = ( - ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - ] - if evaluator_id or evaluator_slug - else [] - ) - + ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - for evaluator_id, evaluator_slug in zip( - evaluator_ids, - evaluator_slugs, - ) - ] - if evaluator_ids and evaluator_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_evaluator_query_request_from_body( - evaluator=evaluator, - # - evaluator_refs=evaluator_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_evaluator_query_request_from_body( - evaluator: Optional[EvaluatorQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> EvaluatorQueryRequest: - evaluator_query_request = None - - try: - evaluator_query_request = EvaluatorQueryRequest( - evaluator=evaluator, - # - evaluator_refs=evaluator_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - except Exception as e: # pylint: disable=broad-except - evaluator_query_request = EvaluatorQueryRequest() - - return evaluator_query_request - - -def merge_evaluator_query_requests( - query_request_params: Optional[EvaluatorQueryRequest] = None, - query_request_body: Optional[EvaluatorQueryRequest] = None, -) -> EvaluatorQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return EvaluatorQueryRequest( - evaluator=query_request_body.evaluator or query_request_params.evaluator, - # - evaluator_refs=query_request_body.evaluator_refs - or query_request_params.evaluator_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return EvaluatorQueryRequest() - - -def parse_evaluator_variant_query_request_from_params( - evaluator_id: Optional[UUID] = Query(None), - evaluator_ids: Optional[List[UUID]] = Query(None), - evaluator_slug: Optional[str] = Query(None), - evaluator_slugs: Optional[List[str]] = Query(None), - # - evaluator_variant_id: Optional[UUID] = Query(None), - evaluator_variant_ids: Optional[List[UUID]] = Query(None), - evaluator_variant_slug: Optional[str] = Query(None), - evaluator_variant_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluatorVariantQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = EvaluatorQueryFlags(**_flags) if _flags else None - - evaluator_variant = ( - EvaluatorVariantQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - evaluator_refs = ( - ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - ] - if evaluator_id or evaluator_slug - else [] - ) - + ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - for evaluator_id, evaluator_slug in zip( - evaluator_ids, - evaluator_slugs, - ) - ] - if evaluator_ids and evaluator_slugs - else [] - ) - ) or None - - evaluator_variant_refs = ( - ( - [ - Reference( - id=evaluator_variant_id, - slug=evaluator_variant_slug, - ) - ] - if evaluator_variant_id or evaluator_variant_slug - else [] - ) - + ( - [ - Reference( - id=evaluator_variant_id, - slug=evaluator_variant_slug, - ) - for evaluator_variant_id, evaluator_variant_slug in zip( - evaluator_variant_ids, - evaluator_variant_slugs, - ) - ] - if evaluator_variant_ids and evaluator_variant_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_evaluator_variant_query_request_from_body( - evaluator_variant=evaluator_variant, - # - evaluator_refs=evaluator_refs or None, - evaluator_variant_refs=evaluator_variant_refs or None, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_evaluator_variant_query_request_from_body( - evaluator_variant: Optional[EvaluatorVariantQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - evaluator_variant_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> EvaluatorVariantQueryRequest: - evaluator_variant_query_request = None - - try: - evaluator_variant_query_request = EvaluatorVariantQueryRequest( - evaluator_variant=evaluator_variant, - # - evaluator_refs=evaluator_refs, - evaluator_variant_refs=evaluator_variant_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - except Exception as e: # pylint: disable=broad-except - evaluator_variant_query_request = EvaluatorVariantQueryRequest() - - return evaluator_variant_query_request - - -def merge_evaluator_variant_query_requests( - query_request_params: Optional[EvaluatorVariantQueryRequest] = None, - query_request_body: Optional[EvaluatorVariantQueryRequest] = None, -) -> EvaluatorVariantQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return EvaluatorVariantQueryRequest( - evaluator_variant=query_request_body.evaluator_variant - or query_request_params.evaluator_variant, - # - evaluator_refs=query_request_body.evaluator_refs - or query_request_params.evaluator_refs, - evaluator_variant_refs=query_request_body.evaluator_variant_refs - or query_request_params.evaluator_variant_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return EvaluatorVariantQueryRequest() - - -def parse_evaluator_revision_query_request_from_params( - evaluator_id: Optional[UUID] = Query(None), - evaluator_ids: Optional[List[UUID]] = Query(None), - evaluator_slug: Optional[str] = Query(None), - evaluator_slugs: Optional[List[str]] = Query(None), - # - evaluator_variant_id: Optional[UUID] = Query(None), - evaluator_variant_ids: Optional[List[UUID]] = Query(None), - evaluator_variant_slug: Optional[str] = Query(None), - evaluator_variant_slugs: Optional[List[str]] = Query(None), - # - evaluator_revision_id: Optional[UUID] = Query(None), - evaluator_revision_ids: Optional[List[UUID]] = Query(None), - evaluator_revision_slug: Optional[str] = Query(None), - evaluator_revision_slugs: Optional[List[str]] = Query(None), - evaluator_revision_version: Optional[str] = Query(None), - evaluator_revision_versions: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> EvaluatorRevisionQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = EvaluatorQueryFlags(**_flags) if _flags else None - - evaluator_revision = ( - EvaluatorRevisionQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - evaluator_refs = ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - ] - if evaluator_id or evaluator_slug - else [] - ) + ( - [ - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - for evaluator_id, evaluator_slug in zip( - evaluator_ids, - evaluator_slugs, - ) - ] - if evaluator_ids and evaluator_slugs - else [] - ) - - evaluator_variant_refs = ( - [ - Reference( - id=evaluator_variant_id, - slug=evaluator_variant_slug, - ) - ] - if evaluator_variant_id or evaluator_variant_slug - else [] - ) + ( - [ - Reference( - id=evaluator_variant_id, - slug=evaluator_variant_slug, - ) - for evaluator_variant_id, evaluator_variant_slug in zip( - evaluator_variant_ids, - evaluator_variant_slugs, - ) - ] - if evaluator_variant_ids and evaluator_variant_slugs - else [] - ) - - evaluator_revision_refs = ( - [ - Reference( - id=evaluator_revision_id, - slug=evaluator_revision_slug, - version=evaluator_revision_version, - ) - ] - if evaluator_revision_id - or evaluator_revision_slug - or evaluator_revision_version - else [] - ) + ( - [ - Reference( - id=evaluator_revision_id, - slug=evaluator_revision_slug, - version=evaluator_revision_version, - ) - for evaluator_revision_id, evaluator_revision_slug, evaluator_revision_version in zip( - evaluator_revision_ids, - evaluator_revision_slugs, - evaluator_revision_versions, - ) - ] - if evaluator_revision_ids - and evaluator_revision_slugs - and evaluator_revision_versions - else [] - ) - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_evaluator_revision_query_request_from_body( - evaluator_revision=evaluator_revision, - # - evaluator_refs=evaluator_refs, - evaluator_variant_refs=evaluator_variant_refs, - evaluator_revision_refs=evaluator_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_evaluator_revision_query_request_from_body( - evaluator_revision: Optional[EvaluatorRevisionQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - evaluator_variant_refs: Optional[List[Reference]] = None, - evaluator_revision_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> EvaluatorRevisionQueryRequest: - evaluator_revision_query_request = None - - try: - evaluator_revision_query_request = EvaluatorRevisionQueryRequest( - evaluator_revision=evaluator_revision, - # - evaluator_refs=evaluator_refs, - evaluator_variant_refs=evaluator_variant_refs, - evaluator_revision_refs=evaluator_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - except Exception as e: # pylint: disable=broad-except - log.warn(e) - - evaluator_revision_query_request = EvaluatorRevisionQueryRequest() - - return evaluator_revision_query_request - - -def merge_evaluator_revision_query_requests( - query_request_params: Optional[EvaluatorRevisionQueryRequest] = None, - query_request_body: Optional[EvaluatorRevisionQueryRequest] = None, -) -> EvaluatorRevisionQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return EvaluatorRevisionQueryRequest( - evaluator_revision=query_request_body.evaluator_revision - or query_request_params.evaluator_revision, - # - evaluator_refs=query_request_body.evaluator_refs - or query_request_params.evaluator_refs, - evaluator_variant_refs=query_request_body.evaluator_variant_refs - or query_request_params.evaluator_variant_refs, - evaluator_revision_refs=query_request_body.evaluator_revision_refs - or query_request_params.evaluator_revision_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return EvaluatorRevisionQueryRequest() - - -def parse_evaluator_revision_retrieve_request_from_params( - evaluator_id: Optional[UUID] = Query(None), - evaluator_slug: Optional[str] = Query(None), - # - evaluator_variant_id: Optional[UUID] = Query(None), - evaluator_variant_slug: Optional[str] = Query(None), - # - evaluator_revision_id: Optional[UUID] = Query(None), - evaluator_revision_slug: Optional[str] = Query(None), - evaluator_revision_version: Optional[str] = Query(None), -): - evaluator_ref = ( - Reference( - id=evaluator_id, - slug=evaluator_slug, - ) - if evaluator_id or evaluator_slug - else None - ) - - evaluator_variant_ref = ( - Reference( - id=evaluator_variant_id, - slug=evaluator_variant_slug, - ) - if evaluator_variant_id or evaluator_variant_slug - else None - ) - - evaluator_revision_ref = ( - Reference( - id=evaluator_revision_id, - slug=evaluator_revision_slug, - version=evaluator_revision_version, - ) - if evaluator_revision_id - or evaluator_revision_slug - or evaluator_revision_version - else None - ) - - return parse_evaluator_revision_retrieve_request_from_body( - evaluator_ref=evaluator_ref, - evaluator_variant_ref=evaluator_variant_ref, - evaluator_revision_ref=evaluator_revision_ref, - ) - - -def parse_evaluator_revision_retrieve_request_from_body( - evaluator_ref: Optional[Reference] = None, - evaluator_variant_ref: Optional[Reference] = None, - evaluator_revision_ref: Optional[Reference] = None, -) -> EvaluatorRevisionRetrieveRequest: - return EvaluatorRevisionRetrieveRequest( - evaluator_ref=evaluator_ref, - evaluator_variant_ref=evaluator_variant_ref, - evaluator_revision_ref=evaluator_revision_ref, - ) diff --git a/api/oss/src/apis/fastapi/invocations/models.py b/api/oss/src/apis/fastapi/invocations/models.py deleted file mode 100644 index 8554ba88ee..0000000000 --- a/api/oss/src/apis/fastapi/invocations/models.py +++ /dev/null @@ -1,52 +0,0 @@ -from typing import Optional, List - -from pydantic import BaseModel - -from oss.src.core.shared.dtos import ( - Link, - Windowing, -) -from oss.src.core.invocations.types import ( - Invocation, - InvocationCreate, - InvocationEdit, - InvocationQuery, -) - -# INVOCATIONS ------------------------------------------------------------------ - - -class InvocationCreateRequest(BaseModel): - invocation: InvocationCreate - - -class InvocationEditRequest(BaseModel): - invocation: InvocationEdit - - -class InvocationQueryRequest(BaseModel): - invocation: Optional[InvocationQuery] = None - # - invocation_links: Optional[List[Link]] = None - # - windowing: Optional[Windowing] = None - - -class InvocationResponse(BaseModel): - count: int = 0 - invocation: Optional[Invocation] = None - - -class InvocationsResponse(BaseModel): - count: int = 0 - invocations: List[Invocation] = [] - - -class InvocationLinkResponse(BaseModel): - count: int = 0 - invocation_link: Optional[Link] = None - - -class InvocationLinksResponse(BaseModel): - count: int = 0 - invocation_links: List[Link] = [] diff --git a/api/oss/src/apis/fastapi/invocations/router.py b/api/oss/src/apis/fastapi/invocations/router.py deleted file mode 100644 index b4ff285f40..0000000000 --- a/api/oss/src/apis/fastapi/invocations/router.py +++ /dev/null @@ -1,294 +0,0 @@ -from typing import Optional, Union -from uuid import UUID - -from fastapi import APIRouter, Request, status, Response - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - -from oss.src.core.invocations.service import ( - InvocationsService, -) -from oss.src.core.shared.dtos import ( - Link, -) - -from oss.src.apis.fastapi.invocations.models import ( - InvocationCreateRequest, - InvocationEditRequest, - InvocationResponse, - InvocationsResponse, - InvocationQueryRequest, - InvocationLinkResponse, -) - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION - - -log = get_module_logger(__name__) - - -class InvocationsRouter: - def __init__( - self, - *, - invocations_service: InvocationsService, - ): - self.invocations_service = invocations_service - - self.router = APIRouter() - - # INVOCATIONS ---------------------------------------------------------- - - # POST /api/invocations/ - self.router.add_api_route( - "/", - self.create_invocation, - methods=["POST"], - operation_id="create_invocation", - status_code=status.HTTP_200_OK, - response_model=InvocationResponse, - response_model_exclude_none=True, - ) - - # GET /api/invocations/{trace_id} - self.router.add_api_route( - "/{trace_id}", - self.fetch_invocation, - methods=["GET"], - operation_id="fetch_invocation_by_trace_id", - status_code=status.HTTP_200_OK, - response_model=InvocationResponse, - response_model_exclude_none=True, - ) - - # GET /api/invocations/{trace_id}/{span_id} - self.router.add_api_route( - "/{trace_id}/{span_id}", - self.fetch_invocation, - methods=["GET"], - operation_id="fetch_invocation", - status_code=status.HTTP_200_OK, - response_model=InvocationResponse, - response_model_exclude_none=True, - ) - - # PUT /api/invocations/{trace_id} - self.router.add_api_route( - "/{trace_id}", - self.edit_invocation, - methods=["PATCH"], - operation_id="edit_invocation_by_trace_id", - status_code=status.HTTP_200_OK, - response_model=InvocationResponse, - response_model_exclude_none=True, - ) - - # PUT /api/invocations/{trace_id}/{span_id} - self.router.add_api_route( - "/{trace_id}/{span_id}", - self.edit_invocation, - methods=["PATCH"], - operation_id="edit_invocation", - status_code=status.HTTP_200_OK, - response_model=InvocationResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/invocations/{trace_id} - self.router.add_api_route( - "/{trace_id}", - self.delete_invocation, - methods=["DELETE"], - operation_id="delete_invocation_by_trace_id", - status_code=status.HTTP_200_OK, - response_model=InvocationLinkResponse, - response_model_exclude_none=True, - ) - - # DELETE /api/invocations/{trace_id}/{span_id} - self.router.add_api_route( - "/{trace_id}/{span_id}", - self.delete_invocation, - methods=["DELETE"], - operation_id="delete_invocation", - status_code=status.HTTP_200_OK, - response_model=InvocationLinkResponse, - response_model_exclude_none=True, - ) - - # POST /api/invocations/query - self.router.add_api_route( - "/query", - self.query_invocations, - methods=["POST"], - operation_id="query_invocations", - status_code=status.HTTP_200_OK, - response_model=InvocationsResponse, - response_model_exclude_none=True, - ) - - # INVOCATIONS -------------------------------------------------------------- - - @intercept_exceptions() - async def create_invocation( - self, - request: Request, - *, - invocation_create_request: InvocationCreateRequest, - ) -> InvocationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_INVOCATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - invocation = await self.invocations_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - invocation_create=invocation_create_request.invocation, - ) - - invocation_response = InvocationResponse( - count=1 if invocation else 0, - invocation=invocation, - ) - - return invocation_response - - @intercept_exceptions() - @suppress_exceptions(default=InvocationResponse()) - async def fetch_invocation( - self, - request: Request, - *, - trace_id: str, - span_id: Optional[str] = None, - ) -> Union[Response, InvocationResponse]: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_INVOCATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - invocation = await self.invocations_service.fetch( - project_id=UUID(request.state.project_id), - # - trace_id=trace_id, - span_id=span_id, - ) - - invocation_response = InvocationResponse( - count=1 if invocation else 0, - invocation=invocation, - ) - - return invocation_response - - @intercept_exceptions() - async def edit_invocation( - self, - request: Request, - *, - trace_id: str, - span_id: Optional[str] = None, - # - invocation_edit_request: InvocationEditRequest, - ) -> InvocationResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_INVOCATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - invocation = await self.invocations_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - trace_id=trace_id, - span_id=span_id, - # - invocation_edit=invocation_edit_request.invocation, - ) - - invocation_response = InvocationResponse( - count=1 if invocation else 0, - invocation=invocation, - ) - - return invocation_response - - @intercept_exceptions() - async def delete_invocation( - self, - request: Request, - *, - trace_id: str, - span_id: Optional[str] = None, - ) -> InvocationLinkResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_INVOCATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - invocation_link: Optional[Link] = await self.invocations_service.delete( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - trace_id=trace_id, - span_id=span_id, - ) - - invocation_link_response = InvocationLinkResponse( - count=1 if invocation_link else 0, - invocation_link=invocation_link, - ) - - return invocation_link_response - - @intercept_exceptions() - @suppress_exceptions(default=InvocationsResponse()) - async def query_invocations( - self, - request: Request, - *, - invocation_query_request: InvocationQueryRequest, - ) -> InvocationsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_INVOCATIONS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - invocations = await self.invocations_service.query( - project_id=UUID(request.state.project_id), - # - invocation_query=invocation_query_request.invocation, - # - invocation_links=invocation_query_request.invocation_links, - # - windowing=invocation_query_request.windowing, - ) - - invocations_response = InvocationsResponse( - count=len(invocations), - invocations=invocations, - ) - - return invocations_response diff --git a/api/oss/src/apis/fastapi/observability/extractors/adapter_registry.py b/api/oss/src/apis/fastapi/observability/extractors/adapter_registry.py index 693349bdb2..7bb3669d8f 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/adapter_registry.py +++ b/api/oss/src/apis/fastapi/observability/extractors/adapter_registry.py @@ -1,8 +1,7 @@ -from typing import List - +from typing import Dict, List, Optional, Type, Any from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) from oss.src.apis.fastapi.observability.extractors.base_adapter import BaseAdapter from oss.src.apis.fastapi.observability.extractors.canonical_attributes import ( diff --git a/api/oss/src/apis/fastapi/observability/extractors/adapters/default_agenta_adapter.py b/api/oss/src/apis/fastapi/observability/extractors/adapters/default_agenta_adapter.py index f9664d80ba..0c654e1be2 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/adapters/default_agenta_adapter.py +++ b/api/oss/src/apis/fastapi/observability/extractors/adapters/default_agenta_adapter.py @@ -1,3 +1,5 @@ +from typing import Any, Dict, Tuple + from oss.src.apis.fastapi.observability.extractors.base_adapter import BaseAdapter from oss.src.apis.fastapi.observability.extractors.canonical_attributes import ( CanonicalAttributes, @@ -10,7 +12,7 @@ ) from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) class DefaultAgentaAdapter(BaseAdapter): @@ -68,14 +70,3 @@ def process(self, attributes: CanonicalAttributes, features: SpanFeatures) -> No if "attributes" not in features.exception: features.exception["attributes"] = {} features.exception["attributes"][attr_key] = decoded_attr_val - - try: - features.links = attributes.links - except Exception as e: - log.error( - "Failed to set links on features. Links from attributes: %s. Error: %s", - attributes.links, - str(e), - exc_info=True, - ) - pass diff --git a/api/oss/src/apis/fastapi/observability/extractors/adapters/logfire_adapter.py b/api/oss/src/apis/fastapi/observability/extractors/adapters/logfire_adapter.py index c1106e118d..28f94bf54e 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/adapters/logfire_adapter.py +++ b/api/oss/src/apis/fastapi/observability/extractors/adapters/logfire_adapter.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Any, Tuple +from typing import Dict, Optional, List, Any, Tuple from json import loads from oss.src.apis.fastapi.observability.extractors.base_adapter import BaseAdapter @@ -13,7 +13,7 @@ NAMESPACE_PREFIX_FEATURE_MAPPING, ) -log = get_module_logger(__name__) +log = get_module_logger(__file__) GENAI_SEMCONV_ATTRIBUTES_EXACT: List[Tuple[str, str]] = [ # Core Data @@ -95,12 +95,9 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: and transformed_attributes.get("ag.metrics.unit.tokens.completion") and not transformed_attributes.get("ag.metrics.unit.tokens.total") ): - transformed_attributes[ - "ag.metrics.unit.tokens.total" - ] = transformed_attributes.get( - "ag.metrics.unit.tokens.prompt" - ) + transformed_attributes.get( - "ag.metrics.unit.tokens.completion" + transformed_attributes["ag.metrics.unit.tokens.total"] = ( + transformed_attributes.get("ag.metrics.unit.tokens.prompt") + + transformed_attributes.get("ag.metrics.unit.tokens.completion") ) if not has_logfire_data: return @@ -145,7 +142,7 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: prompt_messages.append(message) if prompt_messages: - features.data["inputs"] = {"prompt": prompt_messages} + features.mdata["inputs"] = {"prompt": prompt_messages} if output_event: # Format output event as completion @@ -164,7 +161,7 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: completion_messages.append(completion_message) if completion_messages: - features.data["outputs"] = {"completion": completion_messages} + features.mdata["outputs"] = {"completion": completion_messages} def _parse_events(self, events_str: str) -> List[Dict[str, Any]]: """Parse events string into a list of events.""" diff --git a/api/oss/src/apis/fastapi/observability/extractors/adapters/openinference_adapter.py b/api/oss/src/apis/fastapi/observability/extractors/adapters/openinference_adapter.py index 71fc43f644..ffaf62ef6a 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/adapters/openinference_adapter.py +++ b/api/oss/src/apis/fastapi/observability/extractors/adapters/openinference_adapter.py @@ -1,4 +1,4 @@ -from typing import Dict, Any, Tuple, List +from typing import Dict, Optional, Any, Tuple, List import re from oss.src.apis.fastapi.observability.extractors.base_adapter import BaseAdapter @@ -12,7 +12,7 @@ ) from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) # Semantic Convention Mappings for OpenInference OPENINFERENCE_ATTRIBUTES_EXACT: List[Tuple[str, str]] = [ @@ -136,11 +136,11 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: transformed_attributes["ag.type.node"] = mapped_kind has_data = True else: - log.warn( + log.warning( f"OpenInferenceAdapter: Unknown or unmapped openinference.span.kind '{value}'" ) else: - log.warn( + log.warning( f"OpenInferenceAdapter: Expected string for openinference.span.kind, got {type(value)}" ) continue # Move to next attribute @@ -168,13 +168,13 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: ) if new_suffix != suffix: suffix = new_suffix - log.warn( + log.debug( f"OpenInferenceAdapter: Stripped '.message.' from suffix for {key}, new suffix: {suffix}" ) else: # Log if pattern didn't match for a key that might be expected to have it. # This could happen for new, unexpected sub-structures under messages. - log.warn( + log.debug( f"OpenInferenceAdapter: Suffix '{suffix}' for prefix '{otel_prefix}' did not match '.message.' stripping pattern for key '{key}'. Using original suffix." ) @@ -197,7 +197,7 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: if has_input_messages and "ag.data.inputs" in transformed_attributes: # If we have structured messages, remove the generic 'input.value' mapping del transformed_attributes["ag.data.inputs"] - log.warn( + log.debug( f"OpenInferenceAdapter: For node type '{current_node_type}', removed generic 'ag.data.inputs' (from input.value) in favor of message-based inputs." ) @@ -209,7 +209,7 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: if has_output_messages and "ag.data.outputs" in transformed_attributes: # If we have structured messages, remove the generic 'output.value' mapping del transformed_attributes["ag.data.outputs"] - log.warn( + log.debug( f"OpenInferenceAdapter: For node type '{current_node_type}', removed generic 'ag.data.outputs' (from output.value) in favor of message-based outputs." ) diff --git a/api/oss/src/apis/fastapi/observability/extractors/adapters/openllmetry_adapter.py b/api/oss/src/apis/fastapi/observability/extractors/adapters/openllmetry_adapter.py index 65989d9fa7..33f8fde568 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/adapters/openllmetry_adapter.py +++ b/api/oss/src/apis/fastapi/observability/extractors/adapters/openllmetry_adapter.py @@ -1,5 +1,5 @@ -from typing import Dict, Optional, Any, Callable, Tuple, List from json import loads +from typing import Dict, Optional, Any, Callable, Tuple, List from oss.src.apis.fastapi.observability.extractors.base_adapter import BaseAdapter from oss.src.apis.fastapi.observability.extractors.canonical_attributes import ( @@ -12,7 +12,7 @@ ) from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) OPENLLMETRY_ATTRIBUTES_EXACT: List[Tuple[str, str]] = [ ("llm.headers", "ag.meta.request.headers"), @@ -103,7 +103,7 @@ def process(self, bag: CanonicalAttributes, features: SpanFeatures) -> None: transformed_attributes[ag_key] = transformed_value has_openllmetry_data = True except Exception as e: - log.warn( + log.debug( f"OpenLLMmetryAdapter: Error in dynamic transform for {key}: {e}" ) diff --git a/api/oss/src/apis/fastapi/observability/extractors/base_adapter.py b/api/oss/src/apis/fastapi/observability/extractors/base_adapter.py index 29e8ccf1df..80c6a566fb 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/base_adapter.py +++ b/api/oss/src/apis/fastapi/observability/extractors/base_adapter.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import Dict, Optional, Protocol from oss.src.apis.fastapi.observability.extractors.canonical_attributes import ( CanonicalAttributes, SpanFeatures, diff --git a/api/oss/src/apis/fastapi/observability/extractors/canonical_attributes.py b/api/oss/src/apis/fastapi/observability/extractors/canonical_attributes.py index 6d91a3d5fb..248183c908 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/canonical_attributes.py +++ b/api/oss/src/apis/fastapi/observability/extractors/canonical_attributes.py @@ -1,6 +1,5 @@ from typing import Any, Dict, List, Optional from datetime import datetime - from pydantic import BaseModel, Field from oss.src.core.observability.dtos import ( @@ -10,7 +9,12 @@ class SpanFeatures(BaseModel): - data: Dict[str, Any] = Field(default_factory=dict) # marshalled data + data: Dict[str, Any] = Field( + default_factory=dict + ) # unmarshalled data to be used with tracing + mdata: Dict[str, Any] = Field( + default_factory=dict + ) # marshalled data to be used with nodes metrics: Dict[str, Any] = Field(default_factory=dict) meta: Dict[str, Any] = Field(default_factory=dict) refs: Dict[str, Any] = Field(default_factory=dict) @@ -20,7 +24,6 @@ class SpanFeatures(BaseModel): links: List[Any] = Field(default_factory=list) exception: Dict[str, Any] = Field(default_factory=dict) type: Dict[str, Any] = Field(default_factory=dict) - flags: Dict[str, Any] = Field(default_factory=dict) tags: Dict[str, Any] = Field(default_factory=dict) diff --git a/api/oss/src/apis/fastapi/observability/extractors/normalizer.py b/api/oss/src/apis/fastapi/observability/extractors/normalizer.py index 02348d2948..e3724cb09b 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/normalizer.py +++ b/api/oss/src/apis/fastapi/observability/extractors/normalizer.py @@ -1,4 +1,4 @@ -from typing import List, Optional +from typing import Any, Dict, List, Optional from copy import copy from datetime import datetime, timezone @@ -13,7 +13,7 @@ ) from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) class Normalizer: @@ -48,7 +48,7 @@ def normalize(self, otel_span_dto: OTelSpanDTO) -> CanonicalAttributes: except ValueError: # Fallback or error handling for non-ISO timestamps if necessary # For now, let's assume UTC now as a fallback, or log an error - # log.warn(f"Could not parse event timestamp: {event_dto.timestamp}") + # log.warning(f"Could not parse event timestamp: {event_dto.timestamp}") dt_timestamp = datetime.now(timezone.utc) events_data.append( @@ -94,8 +94,8 @@ def normalize(self, otel_span_dto: OTelSpanDTO) -> CanonicalAttributes: ), # Ensure default status_message=otel_span_dto.status_message, span_attributes=copy(otel_span_dto.attributes), - events=copy(events_data), - links=copy(links_data), + events=events_data, + links=links_data, ) return attributes diff --git a/api/oss/src/apis/fastapi/observability/extractors/span_data_builders.py b/api/oss/src/apis/fastapi/observability/extractors/span_data_builders.py index 86e5d6c1aa..f84f60d55b 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/span_data_builders.py +++ b/api/oss/src/apis/fastapi/observability/extractors/span_data_builders.py @@ -1,17 +1,7 @@ -from typing import Any from abc import ABC, abstractmethod +from typing import Any from uuid import UUID - -from oss.src.core.tracing.dtos import OTelSpan, OTelFlatSpan, OTelEvent, OTelLink -from oss.src.core.tracing.utils import ( - parse_trace_id_to_uuid, - parse_span_id_to_uuid, - parse_timestamp_to_datetime, - parse_span_kind_to_enum, - parse_status_code_to_enum, -) - from oss.src.core.observability.dtos import ( OTelSpanDTO, SpanDTO, @@ -29,10 +19,7 @@ ) from oss.src.utils.logging import get_module_logger -from oss.src.apis.fastapi.tracing.utils import _parse_span_from_request - - -log = get_module_logger(__name__) +log = get_module_logger(__file__) class SpanDataBuilder(ABC): @@ -154,7 +141,7 @@ def build(self, otel_span_dto: OTelSpanDTO, features: SpanFeatures) -> SpanDTO: attributes=features.exception.get("attributes"), ) - data = features.data + data = features.mdata metrics = features.metrics metrics["acc.duration.total"] = duration @@ -163,11 +150,12 @@ def build(self, otel_span_dto: OTelSpanDTO, features: SpanFeatures) -> SpanDTO: refs = features.refs - # links = features.links - links = [] + links = features.links otel = OTelExtraDTO( - kind=(otel_span_dto.kind.value if otel_span_dto.kind else None), + kind=( + otel_span_dto.kind.value if otel_span_dto.kind else None + ), attributes=otel_span_dto.attributes, events=otel_span_dto.events, links=otel_span_dto.links, @@ -200,191 +188,3 @@ def build(self, otel_span_dto: OTelSpanDTO, features: SpanFeatures) -> SpanDTO: ) raise e return span_dto - - -class OTelFlatSpanBuilder(SpanDataBuilder): - """ - Concrete implementation that builds a OTelFlatSpan. - """ - - @property - def name(self) -> str: - return "otel_flat_span_builder" - - def build( - self, - otel_span_dto: OTelSpanDTO, - features: SpanFeatures, - ) -> OTelFlatSpan: - # IDS ------------------------------------------------------------------ - trace_id = otel_span_dto.context.trace_id[2:] - span_id = otel_span_dto.context.span_id[2:] - parent_id = otel_span_dto.parent.span_id[2:] if otel_span_dto.parent else None - - try: - trace_id = parse_trace_id_to_uuid(trace_id) - span_id = parse_span_id_to_uuid(span_id) - parent_id = parse_span_id_to_uuid(parent_id) if parent_id else None - except ValueError as e: - log.error( - f"OTelFlatSpanBuilder: Error creating UUIDs from trace_id '{trace_id}', span_id '{span_id}', parent_id '{parent_id}'. Error: {e}." - ) - raise ValueError( - f"Invalid hex string for trace_id: {trace_id} or span_id: {span_id} or parent_id: {parent_id}." - ) from e - # ---------------------------------------------------------------------- - - # KIND ---------------------------------------------------------------- - span_kind = otel_span_dto.kind.value - - try: - span_kind = parse_span_kind_to_enum(span_kind) - except ValueError as e: - log.error( - f"OTelFlatSpanBuilder: Error parsing span kind '{span_kind}'. Error: {e}." - ) - raise ValueError(f"Invalid span kind: {span_kind}") from e - # ---------------------------------------------------------------------- - - # NAME ----------------------------------------------------------------- - span_name = otel_span_dto.name - # ---------------------------------------------------------------------- - - # TIME ----------------------------------------------------------------- - start_time = parse_timestamp_to_datetime(otel_span_dto.start_time) - end_time = parse_timestamp_to_datetime(otel_span_dto.end_time) - # ---------------------------------------------------------------------- - - # STATUS --------------------------------------------------------------- - status_code = otel_span_dto.status_code.value - status_message = otel_span_dto.status_message or None - - try: - status_code = parse_status_code_to_enum(status_code) - except ValueError as e: - log.error( - f"OTelFlatSpanBuilder: Error parsing status code '{status_code}'. Error: {e}." - ) - raise ValueError(f"Invalid status code: {status_code}") from e - # ---------------------------------------------------------------------- - - # ATTRIBUTES ----------------------------------------------------------- - attributes = dict(otel_span_dto.attributes or {}) - - attributes.update(**{f"ag.data.{k}": v for k, v in features.data.items()}) - - attributes.update(**{f"ag.flags.{k}": v for k, v in features.flags.items()}) - attributes.update(**{f"ag.tags.{k}": v for k, v in features.tags.items()}) - attributes.update(**{f"ag.meta.{k}": v for k, v in features.meta.items()}) - - attributes.update(**{f"ag.references.{k}": v for k, v in features.refs.items()}) - - ## TYPES --------------------------------------------------------------- - attributes.update(**{f"ag.type.{k}": v for k, v in features.type.items()}) - - for k, v in features.type.items(): - del attributes[f"ag.type.{k}"] - - if k == "tree": - attributes["ag.type.trace"] = v.lower() if v else None - elif k == "node": - attributes["ag.type.span"] = v.lower() if v else None - ## --------------------------------------------------------------------- - - ## METRICS ------------------------------------------------------------- - attributes.update(**{f"ag.metrics.{k}": v for k, v in features.metrics.items()}) - - for k, v in features.metrics.items(): - del attributes[f"ag.metrics.{k}"] - - k = k.replace("acc.costs.", "costs.cumulative.") - k = k.replace("unit.costs.", "costs.incremental.") - k = k.replace("acc.tokens.", "tokens.cumulative.") - k = k.replace("unit.tokens.", "tokens.incremental.") - - attributes[f"ag.metrics.{k}"] = v - - if "acc.duration.total" in features.metrics: - del attributes["ag.metrics.acc.duration.total"] - ## --------------------------------------------------------------------- - - # ---------------------------------------------------------------------- - - # LINKS ---------------------------------------------------------------- - links = [] - - if features.links: - for link in features.links: - try: - links.append( - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes=link.attributes, - ) - ) - except Exception as e: - log.warn( - f"OTelFlatSpanBuilder: Error creating OTelLink from link: {link}. Error: {e}." - ) - - # ---------------------------------------------------------------------- - - # EVENTS --------------------------------------------------------------- - events = [] - - if otel_span_dto.events: - for event in otel_span_dto.events: - try: - events.append( - OTelEvent( - name=event.name, - timestamp=parse_timestamp_to_datetime(event.timestamp), - attributes=event.attributes, - ) - ) - except Exception as e: - log.warn( - f"OTelFlatSpanBuilder: Error creating OTelEvent from event: {event}. Error: {e}." - ) - - # ---------------------------------------------------------------------- - - try: - span_dto = OTelSpan( - # IDS - trace_id=trace_id, - span_id=span_id, - parent_id=parent_id, - # KIND - span_kind=span_kind, - # NAME - span_name=span_name, - # TIME - start_time=start_time, - end_time=end_time, - # STATUS - status_code=status_code, - status_message=status_message, - # ATTRIBUTES - attributes=attributes, - # LINKS - links=links, - # EVENTS - events=events, - ) - - span_dtos = _parse_span_from_request(span_dto) - - otel_flat_span = span_dtos[0] if span_dtos else None - - except Exception as e: - log.error( - "OTelFlatSpanBuilder: Failed to create OTelFlatSpan from span. Error: %s. SpanFeatures: %s. Span: %s.", - str(e), - features, - otel_span_dto, - ) - raise e - - return otel_flat_span diff --git a/api/oss/src/apis/fastapi/observability/extractors/span_processor.py b/api/oss/src/apis/fastapi/observability/extractors/span_processor.py index a17fd7baa6..143509efd3 100644 --- a/api/oss/src/apis/fastapi/observability/extractors/span_processor.py +++ b/api/oss/src/apis/fastapi/observability/extractors/span_processor.py @@ -1,7 +1,5 @@ -from typing import Dict, List, Any, Optional - +from typing import Dict, List, Any from oss.src.utils.logging import get_module_logger - from oss.src.core.observability.dtos import OTelSpanDTO from oss.src.apis.fastapi.observability.extractors.normalizer import Normalizer from oss.src.apis.fastapi.observability.extractors.adapter_registry import ( @@ -10,7 +8,7 @@ from .span_data_builders import SpanDataBuilder -log = get_module_logger(__name__) +log = get_module_logger(__file__) class SpanProcessor: @@ -33,16 +31,12 @@ def __init__(self, builders: List[SpanDataBuilder]): self.normalizer = Normalizer() self.adapter_registry = AdapterRegistry() if not builders: - log.warn( + log.warning( "SpanProcessor initialized with no builders. Process method will return an empty dict." ) self.builders = builders - def process( - self, - otel_span_dto: OTelSpanDTO, - flag_create_spans_from_nodes: Optional[bool] = False, - ) -> Dict[str, Any]: + def process(self, otel_span_dto: OTelSpanDTO) -> Dict[str, Any]: """Process an OpenTelemetry span using all configured builders. Args: @@ -57,11 +51,6 @@ def process( results: Dict[str, Any] = {} for builder in self.builders: - if ( - not flag_create_spans_from_nodes - and builder.name == "otel_flat_span_builder" - ): - continue try: processed_data = builder.build(otel_span_dto, features) results[builder.name] = processed_data @@ -86,7 +75,7 @@ def process( ) if not results and self.builders: - log.warn( + log.warning( "All builders failed or returned no data for span_id %s (trace_id %s). OTelSpan: %s", otel_span_dto.context.span_id[2:] if otel_span_dto.context else "N/A", otel_span_dto.context.trace_id[2:] if otel_span_dto.context else "N/A", diff --git a/api/oss/src/apis/fastapi/observability/models.py b/api/oss/src/apis/fastapi/observability/models.py index 1620585aed..c43dc8cb8e 100644 --- a/api/oss/src/apis/fastapi/observability/models.py +++ b/api/oss/src/apis/fastapi/observability/models.py @@ -1,7 +1,9 @@ from typing import List, Optional from datetime import datetime -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel + +from oss.src.apis.fastapi.shared.models import VersionedModel from oss.src.core.observability.dtos import ( OTelSpanDTO, @@ -12,16 +14,14 @@ ) -class CollectStatusResponse(BaseModel): +class CollectStatusResponse(VersionedModel): status: str -class OTelTracingResponse(BaseModel): +class OTelTracingResponse(VersionedModel): count: Optional[int] = None spans: List[OTelSpanDTO] - model_config = ConfigDict(title="OTelTracingDataResponse") - class AgentaNodeDTO(SpanDTO): pass @@ -37,11 +37,6 @@ class AgentaTreeDTO(BaseModel): nodes: List[AgentaNodeDTO] -class AgentaVersionedTreeDTO(BaseModel): - version: str - nodes: List[AgentaNodeDTO] - - class AgentaTreesDTO(BaseModel): trees: Optional[List[AgentaTreeDTO]] = [] @@ -56,15 +51,15 @@ class AgentaRootsDTO(BaseModel): roots: Optional[List[AgentaRootDTO]] = [] -class AgentaNodesResponse(AgentaNodesDTO): +class AgentaNodesResponse(VersionedModel, AgentaNodesDTO): count: Optional[int] = None -class AgentaTreesResponse(AgentaTreesDTO): +class AgentaTreesResponse(VersionedModel, AgentaTreesDTO): count: Optional[int] = None -class AgentaRootsResponse(AgentaRootsDTO): +class AgentaRootsResponse(VersionedModel, AgentaRootsDTO): count: Optional[int] = None @@ -91,6 +86,6 @@ class LegacyAnalyticsResponse(LegacySummary): data: List[LegacyDataPoint] -class OldAnalyticsResponse(BaseModel): +class AnalyticsResponse(VersionedModel): count: Optional[int] = None buckets: List[BucketDTO] diff --git a/api/oss/src/apis/fastapi/observability/opentelemetry/otlp.py b/api/oss/src/apis/fastapi/observability/opentelemetry/otlp.py index f7ef6cd6a4..a1f94ed0ba 100644 --- a/api/oss/src/apis/fastapi/observability/opentelemetry/otlp.py +++ b/api/oss/src/apis/fastapi/observability/opentelemetry/otlp.py @@ -2,14 +2,12 @@ from datetime import datetime import gzip import zlib +import posthog from google.protobuf.json_format import MessageToDict -# Use official OpenTelemetry proto definitions -from opentelemetry.proto.trace.v1 import trace_pb2 as Trace_Proto -from opentelemetry.proto.collector.trace.v1 import ( - trace_service_pb2 as TraceService_Proto, -) +# from opentelemetry.proto.trace.v1 import trace_pb2 as Trace_Proto +import oss.src.apis.fastapi.observability.opentelemetry.traces_proto as Trace_Proto from oss.src.utils.logging import get_module_logger from oss.src.core.observability.dtos import ( @@ -85,13 +83,20 @@ def _decode_value(any_value): elif which is None: return None else: - log.warn(f"Unknown value type at _decode_value: {which}") + log.warning(f"Unknown value type at _decode_value: {which}") return str(any_value) def _parse_attribute(attribute): """Parse an attribute key-value pair, properly handling all protobuf value types.""" + # is_fix_protobuff_handling = posthog.feature_enabled('fix-protobuff-handling', 'user distinct id') + # if is_fix_protobuff_handling: return (attribute.key, _decode_value(attribute.value)) + # else: + # raw_value = attribute.value + # value_type = list(MessageToDict(raw_value).keys())[0].replace("V", "_v") + # clean_value = getattr(raw_value, value_type) + # return (attribute.key, clean_value) def _parse_timestamp(timestamp_ns: int) -> str: @@ -106,28 +111,13 @@ def parse_otlp_stream(otlp_stream: bytes) -> List[OTelSpanDTO]: except (OSError, zlib.error) as e: log.error("Decompression failed: {%s}", e) - # According to OTLP spec, the HTTP payload is an ExportTraceServiceRequest. - # We first try to parse using that message. If that fails (e.g. legacy - # clients sending raw TracesData) we fall back to the older TracesData - # message for backward-compatibility. - - export_request = TraceService_Proto.ExportTraceServiceRequest() + proto = Trace_Proto.TracesData() - try: - export_request.ParseFromString(otlp_stream) - resource_spans_iterable = export_request.resource_spans - except Exception: - # Fallback to legacy TracesData parser. - legacy_proto = getattr(Trace_Proto, "TracesData", None) - if legacy_proto is None: - raise - legacy_msg = legacy_proto() - legacy_msg.ParseFromString(otlp_stream) - resource_spans_iterable = legacy_msg.resource_spans + proto.ParseFromString(otlp_stream) otel_span_dtos = [] - for resource_span in resource_spans_iterable: + for resource_span in proto.resource_spans: for scope_span in resource_span.scope_spans: for span in scope_span.spans: # SPAN CONTEXT @@ -135,12 +125,6 @@ def parse_otlp_stream(otlp_stream: bytes) -> List[OTelSpanDTO]: s_span_id = "0x" + span.span_id.hex() s_context = OTelContextDTO(trace_id=s_trace_id, span_id=s_span_id) - # log.debug( - # "[SPAN] [PARSE] ", - # trace_id=s_trace_id[2:], - # span_id=s_span_id[2:], - # ) - # SPAN PARENT CONTEXT s_parent_id = span.parent_span_id.hex() s_parent_id = "0x" + s_parent_id if s_parent_id else None diff --git a/api/oss/src/apis/fastapi/observability/router.py b/api/oss/src/apis/fastapi/observability/router.py index 2c96b9a000..764f19140f 100644 --- a/api/oss/src/apis/fastapi/observability/router.py +++ b/api/oss/src/apis/fastapi/observability/router.py @@ -1,16 +1,12 @@ -from typing import Dict, List, Union, Literal, Optional -from uuid import UUID +import posthog -from fastapi import APIRouter, Request, Depends, Query, status, HTTPException -from fastapi.responses import Response +from typing import Dict, List, Union, Literal +from uuid import UUID -import posthog +from fastapi import Request, Depends, Query, status, HTTPException +from fastapi.responses import JSONResponse -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - from oss.src.core.observability.service import ObservabilityService from oss.src.core.observability.dtos import ( QueryDTO, @@ -22,19 +18,19 @@ ConditionDTO, Focus, ) +from oss.src.utils.caching import get_cache, set_cache -from oss.src.core.tracing.dtos import OTelFlatSpan - -from oss.src.core.tracing.service import TracingService from oss.src.core.observability.utils import FilteringException +from oss.src.apis.fastapi.shared.utils import handle_exceptions from oss.src.apis.fastapi.observability.opentelemetry.otlp import ( parse_otlp_stream, ) from oss.src.apis.fastapi.observability.utils.processing import ( - parse_query_from_params_request, + parse_query_request, parse_analytics_dto, parse_from_otel_span_dto, + _parse_from_otel_span_dto_legacy, parse_to_otel_span_dto, parse_to_agenta_span_dto, parse_legacy_analytics_dto, @@ -50,49 +46,30 @@ AgentaTreeDTO, AgentaRootDTO, LegacyAnalyticsResponse, - OldAnalyticsResponse, + AnalyticsResponse, ) -if is_ee(): - from ee.src.utils.entitlements import check_entitlements, Counter - -# OTLP Protobuf response message for full success -from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ( - ExportTraceServiceResponse, -) - -# Protobuf Status for error responses -from google.rpc.status_pb2 import Status as ProtoStatus - -from oss.src.utils.env import env - -MAX_OTLP_BATCH_SIZE = env.AGENTA_OTLP_MAX_BATCH_BYTES -MAX_OTLP_BATCH_SIZE_MB = MAX_OTLP_BATCH_SIZE // (1024 * 1024) +from oss.src.utils.common import APIRouter, is_ee +if is_ee(): + from ee.src.utils.entitlements import ( + check_entitlements, + Tracker, + Counter, + NOT_ENTITLED_RESPONSE, + ) log = get_module_logger(__name__) -POSTHOG_API_KEY = env.POSTHOG_API_KEY -POSTHOG_HOST = env.POSTHOG_HOST - - -if POSTHOG_API_KEY: - posthog.api_key = POSTHOG_API_KEY - posthog.host = POSTHOG_HOST - log.info("PostHog initialized with host %s", POSTHOG_HOST) -else: - log.warn("PostHog API key not found in environment variables") - - class ObservabilityRouter: + VERSION = "1.0.0" + def __init__( self, observability_service: ObservabilityService, - tracing_service: Optional[TracingService] = None, ): self.service = observability_service - self.tracing = tracing_service self.router = APIRouter() @@ -106,7 +83,7 @@ def __init__( methods=["POST"], operation_id="otlp_v1_traces", summary="Receive /v1/traces via OTLP", - status_code=status.HTTP_200_OK, + status_code=status.HTTP_202_ACCEPTED, response_model=CollectStatusResponse, ) @@ -128,7 +105,7 @@ def __init__( methods=["POST"], operation_id="otlp_receiver", summary="Receive traces via OTLP", - status_code=status.HTTP_200_OK, + status_code=status.HTTP_202_ACCEPTED, response_model=CollectStatusResponse, ) @@ -159,7 +136,7 @@ def __init__( status_code=status.HTTP_200_OK, response_model=Union[ LegacyAnalyticsResponse, - OldAnalyticsResponse, + AnalyticsResponse, ], response_model_exclude_none=True, ) @@ -194,15 +171,15 @@ def __init__( ### OTLP - @intercept_exceptions() + @handle_exceptions() async def otlp_status(self): """ Status of OTLP endpoint. """ - return CollectStatusResponse(status="ready") + return CollectStatusResponse(version=self.VERSION, status="ready") - @intercept_exceptions() + @handle_exceptions() async def otlp_receiver( self, request: Request, @@ -211,6 +188,31 @@ async def otlp_receiver( Receive traces via OTLP. """ + cache_key = { + "feature_flag": "new-span-processor", + } + + flag_use_new_span_processor = await get_cache( + project_id="system", + user_id="system", + namespace="posthog_feature_flags", + key=cache_key, + ) + + if flag_use_new_span_processor is None: + flag_use_new_span_processor = posthog.feature_enabled("new-span-processor", "user distinct id") + + await set_cache( + project_id="system", + user_id="system", + namespace="posthog_feature_flags", + key=cache_key, + value=flag_use_new_span_processor, + ttl=60, + ) + + log.debug("Using new span processor: %s", flag_use_new_span_processor) + otlp_stream = None try: # ---------------------------------------------------------------- # @@ -218,34 +220,14 @@ async def otlp_receiver( # ---------------------------------------------------------------- # except Exception as e: log.error( - "Failed to process OTLP stream from project %s with error:", + "Failed to process OTLP stream from project %s with error %s", request.state.project_id, - exc_info=True, - ) - err_status = ProtoStatus( - message="Invalid request body: not a valid OTLP stream." - ) - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_400_BAD_REQUEST, - ) - - if len(otlp_stream) > MAX_OTLP_BATCH_SIZE: - log.error( - "OTLP batch too large (%s bytes > %s bytes) from project %s", - len(otlp_stream), - MAX_OTLP_BATCH_SIZE, - request.state.project_id, - ) - err_status = ProtoStatus( - message=f"OTLP batch size exceeds {MAX_OTLP_BATCH_SIZE_MB}MB limit." - ) - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_413_REQUEST_ENTITY_TOO_LARGE, + str(e), ) + raise HTTPException( + status_code=400, + detail="Invalid request body: not a valid OTLP stream.", + ) from e otel_spans = None try: @@ -254,83 +236,36 @@ async def otlp_receiver( # ---------------------------------------------------------------- # except Exception as e: log.error( - "Failed to parse OTLP stream from project %s with error:", + "Failed to parse OTLP stream from project %s with error %s", request.state.project_id, - exc_info=True, + str(e), ) log.error( "OTLP stream: %s", otlp_stream, ) - err_status = ProtoStatus(message="Failed to parse OTLP stream.") - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - ) - - # -------------------------------------------------------------------- # - feature_flag = "create-spans-from-nodes" - - cache_key = { - "feature_flag": feature_flag, - } - - flag_create_spans_from_nodes = await get_cache( - namespace="posthog:flags", - key=cache_key, - retry=False, - ) - - if flag_create_spans_from_nodes is None: - if env.POSTHOG_API_KEY: - flag_create_spans_from_nodes = posthog.feature_enabled( - feature_flag, - "user distinct id", - ) - - await set_cache( - namespace="posthog:flags", - key=cache_key, - value=flag_create_spans_from_nodes, - ) - # -------------------------------------------------------------------- # - - # for otel_span in otel_spans: - # log.debug( - # "Receiving trace... ", - # project_id=request.state.project_id, - # trace_id=str(UUID(otel_span.context.trace_id[2:])), - # ) + raise HTTPException( + status_code=500, + detail="Failed to parse OTLP stream.", + ) from e span_dtos = None try: # ---------------------------------------------------------------- # - parsed_spans = [ - parse_from_otel_span_dto( - otel_span, - flag_create_spans_from_nodes, - ) - for otel_span in otel_spans - ] - - span_dtos = [ - parsed_span.get("nodes") - for parsed_span in parsed_spans - if parsed_span.get("nodes") - ] - tracing_spans = [ - parsed_span.get("spans") - for parsed_span in parsed_spans - if parsed_span.get("spans") - ] - + if flag_use_new_span_processor: + span_dtos = [ + parse_from_otel_span_dto(otel_span) for otel_span in otel_spans + ] + else: + span_dtos = [ + _parse_from_otel_span_dto_legacy(otel_span) for otel_span in otel_spans + ] # ---------------------------------------------------------------- # except Exception as e: log.error( - "Failed to parse spans from project %s with error:", + "Failed to parse spans from project %s with error %s", request.state.project_id, - exc_info=True, + str(e), ) for otel_span in otel_spans: log.error( @@ -338,12 +273,10 @@ async def otlp_receiver( UUID(otel_span.context.trace_id[2:]), otel_span, ) - err_status = ProtoStatus(message="Failed to parse OTEL span.") - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - ) + raise HTTPException( + status_code=500, + detail="Failed to parse OTEL span.", + ) from e # -------------------------------------------------------------------- # delta = sum([1 for span_dto in span_dtos if span_dto.parent is None]) @@ -356,14 +289,7 @@ async def otlp_receiver( ) if not check: - err_status = ProtoStatus( - message="You have reached your quota limit. Please upgrade your plan to continue." - ) - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_403_FORBIDDEN, - ) + return NOT_ENTITLED_RESPONSE(Tracker.COUNTERS) # -------------------------------------------------------------------- # try: @@ -375,9 +301,9 @@ async def otlp_receiver( # ---------------------------------------------------------------- # except Exception as e: log.error( - "Failed to ingest spans from project %s with error:", + "Failed to ingest spans from project %s with error %s", request.state.project_id, - exc_info=True, + str(e), ) for span_dto in span_dtos: log.error( @@ -385,59 +311,20 @@ async def otlp_receiver( span_dto.tree.id, span_dto, ) - err_status = ProtoStatus(message="Failed to ingest spans.") - return Response( - content=err_status.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - ) - - try: - # ---------------------------------------------------------------- # - if flag_create_spans_from_nodes: - await self.tracing.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - span_dtos=tracing_spans, - ) - # ---------------------------------------------------------------- # - except Exception as e: - log.warn( - "Failed to create spans from project %s with error:", - request.state.project_id, - exc_info=True, - ) - for span in tracing_spans: - span: OTelFlatSpan - log.warn( - "Span: [%s] %s", - span.trace_id, - span, - ) - - # ------------------------------------------------------------------ # - # According to the OTLP/HTTP spec a full-success response must be an - # HTTP 200 with a serialized ExportTraceServiceResponse protobuf and - # the same Content-Type that the client used (we only support binary - # protobuf at the moment). - # ------------------------------------------------------------------ # - - export_response = ExportTraceServiceResponse() # empty == full success + raise HTTPException( + status_code=500, + detail="Failed to ingest spans.", + ) from e - return Response( - content=export_response.SerializeToString(), - media_type="application/x-protobuf", - status_code=status.HTTP_200_OK, - ) + return CollectStatusResponse(version=self.VERSION, status="processing") ### QUERIES - @intercept_exceptions() - @suppress_exceptions(default=AgentaNodesResponse()) + @handle_exceptions() async def query_traces( self, request: Request, - query_dto: QueryDTO = Depends(parse_query_from_params_request), + query_dto: QueryDTO = Depends(parse_query_request), format: Literal[ # pylint: disable=W0622 "opentelemetry", "agenta", @@ -468,6 +355,7 @@ async def query_traces( spans = [parse_to_otel_span_dto(span_dto) for span_dto in span_dtos] return OTelTracingResponse( + version=self.VERSION, count=count, spans=spans, ) @@ -494,6 +382,7 @@ async def query_traces( # focus = tree if query_dto.grouping.focus.value == "tree": return AgentaTreesResponse( + version=self.VERSION, count=count, trees=[ AgentaTreeDTO( @@ -521,6 +410,7 @@ async def query_traces( _nodes_by_root[nodes[0].root.id].append( AgentaTreeDTO( + version=self.VERSION, tree=TreeDTO( id=tree_id, type=_types_by_tree[tree_id], @@ -532,6 +422,7 @@ async def query_traces( ) return AgentaRootsResponse( + version=self.VERSION, count=count, roots=[ AgentaRootDTO( @@ -544,11 +435,12 @@ async def query_traces( # focus = node return AgentaNodesResponse( + version=self.VERSION, count=count, nodes=[AgentaNodeDTO(**span.model_dump()) for span in spans], ) - @intercept_exceptions() + @handle_exceptions() async def query_analytics( self, request: Request, @@ -576,7 +468,8 @@ async def query_analytics( **summary.model_dump(), ) - return OldAnalyticsResponse( + return AnalyticsResponse( + version=self.VERSION, count=count, buckets=bucket_dtos, ) @@ -587,7 +480,7 @@ async def query_analytics( detail=str(e), ) from e - @intercept_exceptions() + @handle_exceptions() async def fetch_trace_by_id( self, request: Request, @@ -646,7 +539,7 @@ async def fetch_trace_by_id( ### MUTATIONS - @intercept_exceptions() + @handle_exceptions() async def delete_traces( self, request: Request, @@ -663,4 +556,4 @@ async def delete_traces( node_ids=node_ids, ) - return CollectStatusResponse(status="deleted") + return CollectStatusResponse(version=self.VERSION, status="deleted") diff --git a/api/oss/src/apis/fastapi/observability/utils/marshalling.py b/api/oss/src/apis/fastapi/observability/utils/marshalling.py index 0e0bd7cc96..b9532b7606 100644 --- a/api/oss/src/apis/fastapi/observability/utils/marshalling.py +++ b/api/oss/src/apis/fastapi/observability/utils/marshalling.py @@ -1,9 +1,4 @@ -from typing import Any, Dict, Union - -from oss.src.utils.logging import get_module_logger - -log = get_module_logger(__name__) - +from typing import Any, Dict, List, Union def marshall( d: Union[Dict[str, Any], list], @@ -72,11 +67,11 @@ def unmarshall( return items -def unmarshall_attributes( +def unmarshal_attributes( marshalled: Dict[str, Any], ) -> Dict[str, Any]: """ - Unmarshalls a dictionary of marshalled attributes into a nested dictionary + Unmarshals a dictionary of marshalled attributes into a nested dictionary Example: marshalled = { @@ -102,38 +97,46 @@ def unmarshall_attributes( } } """ - unmarshalled = {} for key, value in marshalled.items(): keys = key.split(".") - current = unmarshalled - for i, key in enumerate(keys): - is_last = i == len(keys) - 1 - next_key = keys[i + 1] if not is_last else None - is_index = key.isdigit() - key = int(key) if is_index else key + level = unmarshalled + + for i, part in enumerate(keys[:-1]): + if part.isdigit(): + part = int(part) + + if not isinstance(level, list): + level = [] + + while len(level) <= part: + level.append({}) + + level = level[part] - if is_last: - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append(None) - current[key] = value - elif isinstance(current, dict): - current[key] = value else: - next_is_index = next_key.isdigit() if next_key else False + if part not in level: + level[part] = {} if not keys[i + 1].isdigit() else [] - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append([] if next_is_index else {}) - if current[key] is None: - current[key] = [] if next_is_index else {} - current = current[key] - elif isinstance(current, dict): - if key not in current: - current[key] = [] if next_is_index else {} - current = current[key] + level = level[part] + + last_key = keys[-1] + + if last_key.isdigit(): + last_key = int(last_key) + + if not isinstance(level, list): + level = [] + + while len(level) <= last_key: + level.append(None) + + level[last_key] = value + + else: + level[last_key] = value return unmarshalled + diff --git a/api/oss/src/apis/fastapi/observability/utils/processing.py b/api/oss/src/apis/fastapi/observability/utils/processing.py index 54c019702e..9b81d85d94 100644 --- a/api/oss/src/apis/fastapi/observability/utils/processing.py +++ b/api/oss/src/apis/fastapi/observability/utils/processing.py @@ -1,6 +1,7 @@ -from typing import Optional, Tuple, List +from typing import Optional, Tuple, Any, List, Dict +from uuid import UUID from collections import OrderedDict -from json import loads, JSONDecodeError +from json import loads, JSONDecodeError, dumps from copy import copy from datetime import datetime, timedelta, time @@ -9,16 +10,10 @@ from oss.src.apis.fastapi.observability.opentelemetry.semconv import CODEX from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) +log = get_module_logger(__file__) -from oss.src.apis.fastapi.observability.utils.serialization import ( - decode_key, - decode_value, - encode_key, -) -from oss.src.apis.fastapi.observability.utils.marshalling import unmarshall_attributes - -from oss.src.core.tracing.dtos import OTelFlatSpan +from oss.src.apis.fastapi.observability.utils.serialization import decode_key, decode_value, encode_key +from oss.src.apis.fastapi.observability.utils.marshalling import unmarshal_attributes from oss.src.apis.fastapi.observability.models import ( LegacyDataPoint, @@ -55,20 +50,10 @@ ConditionDTO, ) from oss.src.apis.fastapi.observability.extractors.span_processor import SpanProcessor -from oss.src.apis.fastapi.observability.extractors.span_data_builders import ( - NodeBuilder, - OTelFlatSpanBuilder, -) - +from oss.src.apis.fastapi.observability.extractors.span_data_builders import NodeBuilder node_builder_instance = NodeBuilder() -otel_flat_span_builder_instance = OTelFlatSpanBuilder() -span_processor = SpanProcessor( - builders=[ - node_builder_instance, - otel_flat_span_builder_instance, - ] -) +span_processor = SpanProcessor(builders=[node_builder_instance]) # --- PARSE QUERY / ANALYTICS DTO --- @@ -77,12 +62,12 @@ def _parse_windowing( oldest: Optional[str] = None, newest: Optional[str] = None, - interval: Optional[int] = None, + window: Optional[int] = None, ) -> Optional[WindowingDTO]: _windowing = None if oldest or newest: - _windowing = WindowingDTO(oldest=oldest, newest=newest, interval=interval) + _windowing = WindowingDTO(oldest=oldest, newest=newest, window=window) return _windowing @@ -153,7 +138,7 @@ def _parse_pagination( return _pagination -def parse_query_from_params_request( +def parse_query_request( # GROUPING # - Option 2: Flat query parameters focus: Optional[str] = Query(None), @@ -187,14 +172,14 @@ def parse_analytics_dto( # - Option 2: Flat query parameters oldest: Optional[str] = Query(None), newest: Optional[str] = Query(None), - interval: Optional[int] = Query(None), + window: Optional[int] = Query(None), # FILTERING # - Option 1: Single query parameter as JSON filtering: Optional[str] = Query(None), ) -> AnalyticsDTO: return AnalyticsDTO( grouping=_parse_grouping(focus=focus), - windowing=_parse_windowing(oldest=oldest, newest=newest, interval=interval), + windowing=_parse_windowing(oldest=oldest, newest=newest, window=window), filtering=_parse_filtering(filtering=filtering), ) @@ -202,9 +187,184 @@ def parse_analytics_dto( # --- PARSE SPAN DTO --- +def _get_attributes( + attributes: Attributes, + namespace: str, +): + return { + decode_key(namespace, key): decode_value(value) + for key, value in attributes.items() + if key != decode_key(namespace, key) + } + + +def _parse_from_types( + otel_span_dto: OTelSpanDTO, +) -> dict: + types = _get_attributes(otel_span_dto.attributes, "type") + + if types.get("tree"): + del otel_span_dto.attributes[encode_key("type", "tree")] + + if types.get("node"): + del otel_span_dto.attributes[encode_key("type", "node")] + + return types + + +def _parse_from_semconv( + attributes: Attributes, +) -> None: + _attributes = copy(attributes) + + for old_key, value in _attributes.items(): + if old_key in CODEX["keys"]["attributes"]["exact"]["from"]: + new_key = CODEX["maps"]["attributes"]["exact"]["from"][old_key] + + attributes[new_key] = value + + del attributes[old_key] + + else: + for prefix_key in CODEX["keys"]["attributes"]["prefix"]["from"]: + if old_key.startswith(prefix_key): + prefix = CODEX["maps"]["attributes"]["prefix"]["from"][prefix_key] + + new_key = old_key.replace(prefix_key, prefix) + + attributes[new_key] = value + + del attributes[old_key] + + for dynamic_key in CODEX["keys"]["attributes"]["dynamic"]["from"]: + if old_key == dynamic_key: + try: + new_key, new_value = CODEX["maps"]["attributes"]["dynamic"][ + "from" + ][dynamic_key](value) + + attributes[new_key] = new_value + + except: # pylint: disable=bare-except + pass + + +def _parse_from_links( + otel_span_dto: OTelSpanDTO, +) -> dict: + # LINKS + links = None + otel_links = None + + if otel_span_dto.links: + links = list() + otel_links = list() + + for link in otel_span_dto.links: + _links = _get_attributes(link.attributes, "type") + + if _links: + link_type = _links.get("link") + link_tree_id = str(UUID(link.context.trace_id[2:])) + link_node_id = str( + UUID(link.context.trace_id[2 + 16 :] + link.context.span_id[2:]) + ) + + links.append( + LinkDTO( + type=link_type, + tree_id=link_tree_id, + id=link_node_id, + ) + ) + else: + otel_links.append(link) + + links = links if links else None + otel_links = otel_links if otel_links else None + + otel_span_dto.links = otel_links + + return links + + +def _parse_from_attributes( + otel_span_dto: OTelSpanDTO, +) -> Tuple[dict, dict, dict, dict, dict]: + # DATA + _data = _get_attributes(otel_span_dto.attributes, "data") + + for key in _data.keys(): + del otel_span_dto.attributes[encode_key("data", key)] + + # _data = unmarshal_attributes(_data) + _data = _data if _data else None + + # METRICS + _metrics = _get_attributes(otel_span_dto.attributes, "metrics") + + for key in _metrics.keys(): + del otel_span_dto.attributes[encode_key("metrics", key)] + + # _metrics = unmarshal_attributes(_metrics) + _metrics = _metrics if _metrics else None + + # META + _meta = _get_attributes(otel_span_dto.attributes, "meta") + + for key in _meta.keys(): + del otel_span_dto.attributes[encode_key("meta", key)] + + # _meta = unmarshal_attributes(_meta) + _meta = _meta if _meta else None + + # REFS + _refs = _get_attributes(otel_span_dto.attributes, "refs") + + for key in _refs.keys(): + del otel_span_dto.attributes[encode_key("refs", key)] + + _refs = _refs if _refs else None + + if len(otel_span_dto.attributes.keys()) < 1: + otel_span_dto.attributes = None + + return _data, _metrics, _meta, _refs + + +def _parse_from_events( + otel_span_dto: OTelSpanDTO, +) -> Optional[ExceptionDTO]: + exception = None + + _other_events = list() + + if otel_span_dto.events: + for event in otel_span_dto.events: + if event.name == "exception": + exception = ExceptionDTO( + timestamp=event.timestamp, + type=event.attributes.get("exception.type"), + message=event.attributes.get("exception.message"), + stacktrace=event.attributes.get("exception.stacktrace"), + attributes=event.attributes, + ) + + del event.attributes["exception.type"] + del event.attributes["exception.message"] + del event.attributes["exception.stacktrace"] + + else: + _other_events.append(event) + + otel_span_dto.events = _other_events if _other_events else None + + return exception + + + def parse_from_otel_span_dto( otel_span_dto: OTelSpanDTO, - flag_create_spans_from_nodes: Optional[bool] = False, ) -> SpanDTO: """ Process an OpenTelemetry span into a SpanDTO using the new architecture. @@ -213,12 +373,8 @@ def parse_from_otel_span_dto( SpanProcessor internally (with NodeBuilder) for better handling of different data formats. The result from the processor is a dictionary, from which the 'node_builder' output is extracted. """ - processed_results = span_processor.process( - otel_span_dto, - flag_create_spans_from_nodes, - ) + processed_results = span_processor.process(otel_span_dto) span_dto = processed_results.get("node_builder") - otel_flat_span = processed_results.get("otel_flat_span_builder") if not isinstance(span_dto, SpanDTO): log.error( @@ -226,19 +382,139 @@ def parse_from_otel_span_dto( f"span_id {otel_span_dto.context.span_id}. Processor results: {processed_results}" ) - if flag_create_spans_from_nodes: - if not isinstance(otel_flat_span, OTelFlatSpan): - log.error( - f"OTelFlatSpanBuilder did not produce a valid OTelFlatSpan for trace_id {otel_span_dto.context.trace_id}, " - f"span_id {otel_span_dto.context.span_id}. Processor results: {processed_results}" + return span_dto + + +def _parse_from_otel_span_dto_legacy( + otel_span_dto: OTelSpanDTO, +) -> SpanDTO: + """Legacy implementation of parse_from_otel_span_dto for fallback.""" + + trace_id = otel_span_dto.context.trace_id[2:] + span_id = otel_span_dto.context.span_id[2:] + + try: + _parse_from_semconv(otel_span_dto.attributes) + except: # pylint: disable=bare-except + pass + + types = {} + try: + types = _parse_from_types(otel_span_dto) + except: # pylint: disable=bare-except + pass + + tree_id = UUID(trace_id) + tree_type = None + try: + tree_type: str = types.get("tree") + tree_type = TreeType(tree_type.lower()) if tree_type else None + except: # pylint: disable=bare-except + pass + + tree = TreeDTO( + id=tree_id, + type=tree_type, + ) + + node_id = UUID(trace_id[16:] + span_id) + + node_type = NodeType.TASK + try: + node_type: str = types.get("node") + node_type = NodeType(node_type.lower()) if node_type else None + except: # pylint: disable=bare-except + pass + + node = NodeDTO( + id=node_id, + type=node_type, + name=otel_span_dto.name, + ) + + parent = ( + ParentDTO( + id=( + UUID( + otel_span_dto.parent.trace_id[2 + 16 :] + + otel_span_dto.parent.span_id[2:] + ) ) + ) + if otel_span_dto.parent + else None + ) - parsed_spans = { - "nodes": span_dto, - "spans": otel_flat_span, - } + time = TimeDTO( + start=otel_span_dto.start_time, + end=otel_span_dto.end_time, + ) + + duration = round((time.end - time.start).total_seconds() * 1_000, 3) # milliseconds + + status = StatusDTO( + code=( + otel_span_dto.status_code.value.replace("STATUS_CODE_", "") + if otel_span_dto.status_code + else None + ), + message=otel_span_dto.status_message, + ) + + links = None + try: + links = _parse_from_links(otel_span_dto) + except: # pylint: disable=bare-except + pass + + data, metrics, meta, refs = None, None, None, None + try: + data, metrics, meta, refs = _parse_from_attributes(otel_span_dto) + except: # pylint: disable=bare-except + pass + if metrics is None: + metrics = dict() + + metrics["acc.duration.total"] = duration + + exception = None + try: + exception = _parse_from_events(otel_span_dto) + except: # pylint: disable=bare-except + pass + + root_id = refs.get("scenario.id", str(tree.id)) if refs else str(tree.id) + + root = RootDTO( + id=UUID(root_id), + ) - return parsed_spans + otel = OTelExtraDTO( + kind=otel_span_dto.kind.value, + attributes=otel_span_dto.attributes, + events=otel_span_dto.events, + links=otel_span_dto.links, + ) + + span_dto = SpanDTO( + trace_id=trace_id, + span_id=span_id, + root=root, + tree=tree, + node=node, + parent=parent, + time=time, + status=status, + exception=exception, + data=data, + metrics=metrics, + meta=meta, + refs=refs, + links=links, + otel=otel, + ) + + return span_dto def _parse_to_attributes( @@ -407,7 +683,7 @@ def parse_to_agenta_span_dto( ) -> SpanDTO: # DATA if span_dto.data: - span_dto.data = unmarshall_attributes(span_dto.data) + span_dto.data = unmarshal_attributes(span_dto.data) if "outputs" in span_dto.data: if ( @@ -418,19 +694,19 @@ def parse_to_agenta_span_dto( # METRICS if span_dto.metrics: - span_dto.metrics = unmarshall_attributes(span_dto.metrics) + span_dto.metrics = unmarshal_attributes(span_dto.metrics) # META if span_dto.meta: - span_dto.meta = unmarshall_attributes(span_dto.meta) + span_dto.meta = unmarshal_attributes(span_dto.meta) # REFS if span_dto.refs: - span_dto.refs = unmarshall_attributes(span_dto.refs) + span_dto.refs = unmarshal_attributes(span_dto.refs) # EXCEPTION if span_dto.exception: - span_dto.exception.attributes = unmarshall_attributes( + span_dto.exception.attributes = unmarshal_attributes( span_dto.exception.attributes ) @@ -466,9 +742,9 @@ def parse_to_agenta_span_dto( def _parse_time_range( - interval_text: str, + window_text: str, ) -> Tuple[datetime, datetime, int]: - quantity, unit = interval_text.split("_") + quantity, unit = window_text.split("_") quantity = int(quantity) today = datetime.now() @@ -476,13 +752,13 @@ def _parse_time_range( if unit == "hours": oldest = newest - timedelta(hours=quantity) - interval = 60 # 1 hour - return newest, oldest, interval + window = 60 # 1 hour + return newest, oldest, window elif unit == "days": oldest = newest - timedelta(days=quantity) - interval = 1440 # 1 day - return newest, oldest, interval + window = 1440 # 1 day + return newest, oldest, window else: raise ValueError(f"Unknown time unit: {unit}") @@ -539,8 +815,8 @@ def parse_legacy_analytics_dto( windowing = None if timeRange: - newest, oldest, interval = _parse_time_range(timeRange) - windowing = WindowingDTO(newest=newest, oldest=oldest, interval=interval) + newest, oldest, window = _parse_time_range(timeRange) + windowing = WindowingDTO(newest=newest, oldest=oldest, window=window) grouping = GroupingDTO(focus="tree") diff --git a/api/oss/src/apis/fastapi/observability/utils/serialization.py b/api/oss/src/apis/fastapi/observability/utils/serialization.py index 5d697953da..193770c1a4 100644 --- a/api/oss/src/apis/fastapi/observability/utils/serialization.py +++ b/api/oss/src/apis/fastapi/observability/utils/serialization.py @@ -2,25 +2,21 @@ from json import loads, JSONDecodeError from oss.src.utils.logging import get_module_logger -log = get_module_logger(__name__) - -NAMESPACE_PREFIX_FEATURE_MAPPING = { - "ag.data.": "data", - "ag.metrics.": "metrics", - "ag.flags.": "flags", - "ag.meta.": "meta", - "ag.refs.": "refs", - "ag.type.": "type", - "ag.links.": "links", - "ag.exception.": "exception", -} +log = get_module_logger(__file__) +NAMESPACE_PREFIX_FEATURE_MAPPING = {"ag.data.": "mdata", + "ag.metrics.": "metrics", + "ag.meta.": "meta", + "ag.refs.": "refs", + "ag.type.": "type", + "ag.links.": "links", + "ag.exception.": "exception"} def process_attribute(attribute: Tuple[str, Any], prefix: str) -> Dict[str, Any]: - """Process a single attribute (key, value) by removing the prefix to the key and decoding the value.""" + """Process a single attribute (key, value) by removing the prefix to the key and decoding the value. + """ return {remove_prefix(prefix, attribute[0]): decode_value(attribute[1])} - def remove_prefix(prefix: str, key: str): """Decode a prefixd key by removing the prefix prefix. Example: ag.meta.request.model -> request.model @@ -29,7 +25,6 @@ def remove_prefix(prefix: str, key: str): return key[len(prefix) :] return key - def decode_key(namespace, key: str): """Decode a namespaced key by removing the namespace prefix. Example: ag.meta.request.model -> request.model @@ -39,7 +34,6 @@ def decode_key(namespace, key: str): return key[len(prefix) :] return key - def decode_value( value: Any, ) -> Any: @@ -58,13 +52,12 @@ def decode_value( value = loads(encoded) return value try: - value = value + value = loads(value) except JSONDecodeError: pass return value return value - def encode_key( namespace, key: str, diff --git a/api/oss/src/apis/fastapi/queries/models.py b/api/oss/src/apis/fastapi/queries/models.py deleted file mode 100644 index 710b3282d4..0000000000 --- a/api/oss/src/apis/fastapi/queries/models.py +++ /dev/null @@ -1,182 +0,0 @@ -from typing import Optional, List - -from pydantic import BaseModel - -from oss.src.core.shared.dtos import ( - Reference, - Windowing, -) -from oss.src.core.queries.dtos import ( - Query, - QueryCreate, - QueryEdit, - QueryQuery, - # - QueryVariant, - QueryVariantCreate, - QueryVariantEdit, - QueryVariantQuery, - # - QueryRevision, - QueryRevisionCreate, - QueryRevisionEdit, - QueryRevisionQuery, - QueryRevisionCommit, - QueryRevisionsLog, - # - SimpleQuery, - SimpleQueryCreate, - SimpleQueryEdit, - SimpleQueryQuery, -) - - -# QUERIES ---------------------------------------------------------------------- - - -class QueryCreateRequest(BaseModel): - query: QueryCreate - - -class QueryEditRequest(BaseModel): - query: QueryEdit - - -class QueryQueryRequest(BaseModel): - query: Optional[QueryQuery] = None - # - query_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class QueryResponse(BaseModel): - count: int = 0 - query: Optional[Query] = None - - -class QueriesResponse(BaseModel): - count: int = 0 - queries: List[Query] = [] - - -# QUERY VARIANTS --------------------------------------------------------------- - - -class QueryVariantCreateRequest(BaseModel): - query_variant: QueryVariantCreate - - -class QueryVariantEditRequest(BaseModel): - query_variant: QueryVariantEdit - - -class QueryVariantQueryRequest(BaseModel): - query_variant: Optional[QueryVariantQuery] = None - # - query_refs: Optional[List[Reference]] = None - query_variant_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class QueryVariantForkRequest(BaseModel): - source_query_variant_ref: Reference - target_query_ref: Reference - # - slug: Optional[str] = None - # - name: Optional[str] = None - description: Optional[str] = None - - -class QueryVariantResponse(BaseModel): - count: int = 0 - query_variant: Optional[QueryVariant] = None - - -class QueryVariantsResponse(BaseModel): - count: int = 0 - query_variants: List[QueryVariant] = [] - - -# QUERY REVISIONS -------------------------------------------------------------- - - -class QueryRevisionCreateRequest(BaseModel): - query_revision: QueryRevisionCreate - - -class QueryRevisionEditRequest(BaseModel): - query_revision: QueryRevisionEdit - - -class QueryRevisionQueryRequest(BaseModel): - query_revision: Optional[QueryRevisionQuery] = None - # - query_refs: Optional[List[Reference]] = None - query_variant_refs: Optional[List[Reference]] = None - query_revision_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class QueryRevisionCommitRequest(BaseModel): - query_revision_commit: QueryRevisionCommit - - -class QueryRevisionsLogRequest(BaseModel): - query_revisions: QueryRevisionsLog - - -class QueryRevisionRetrieveRequest(BaseModel): - query_ref: Optional[Reference] = None - query_variant_ref: Optional[Reference] = None - query_revision_ref: Optional[Reference] = None - - -class QueryRevisionResponse(BaseModel): - count: int = 0 - query_revision: Optional[QueryRevision] = None - - -class QueryRevisionsResponse(BaseModel): - count: int = 0 - query_revisions: List[QueryRevision] = [] - - -# SIMPLE QUERIES --------------------------------------------------------------- - - -class SimpleQueryCreateRequest(BaseModel): - query: SimpleQueryCreate - - -class SimpleQueryEditRequest(BaseModel): - query: SimpleQueryEdit - - -class SimpleQueryQueryRequest(BaseModel): - query: Optional[SimpleQueryQuery] = None - # - query_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = False - # - windowing: Optional[Windowing] = None - - -class SimpleQueryResponse(BaseModel): - count: int = 0 - query: Optional[SimpleQuery] = None - - -class SimpleQueriesResponse(BaseModel): - count: int = 0 - queries: List[SimpleQuery] = [] diff --git a/api/oss/src/apis/fastapi/queries/router.py b/api/oss/src/apis/fastapi/queries/router.py deleted file mode 100644 index 3d684f5081..0000000000 --- a/api/oss/src/apis/fastapi/queries/router.py +++ /dev/null @@ -1,989 +0,0 @@ -from typing import Optional -from uuid import UUID - -from fastapi import APIRouter, Request, status, Depends - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - -from oss.src.core.shared.dtos import ( - Reference, -) -from oss.src.core.queries.service import ( - QueriesService, - SimpleQueriesService, -) - -from oss.src.apis.fastapi.queries.models import ( - QueryCreateRequest, - QueryEditRequest, - QueryQueryRequest, - QueryResponse, - QueriesResponse, - # - QueryRevisionCreateRequest, - QueryRevisionEditRequest, - QueryRevisionQueryRequest, - QueryRevisionCommitRequest, - QueryRevisionRetrieveRequest, - QueryRevisionsLogRequest, - QueryRevisionResponse, - QueryRevisionsResponse, - # - SimpleQueryCreateRequest, - SimpleQueryEditRequest, - SimpleQueryQueryRequest, - SimpleQueryResponse, - SimpleQueriesResponse, -) - -from oss.src.apis.fastapi.queries.utils import ( - parse_query_query_request_from_params, - parse_query_query_request_from_body, - merge_query_query_requests, - parse_query_variant_query_request_from_params, - parse_query_variant_query_request_from_body, - merge_query_variant_query_requests, - parse_query_revision_query_request_from_params, - parse_query_revision_query_request_from_body, - merge_query_revision_query_requests, - parse_query_revision_retrieve_request_from_params, - parse_query_revision_retrieve_request_from_body, -) - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION - - -log = get_module_logger(__name__) - - -class QueriesRouter: - def __init__(self, *, queries_service: QueriesService): - self.queries_service = queries_service - self.router = APIRouter() - - # QUERIES -------------------------------------------------------------- - - self.router.add_api_route( - "/", - self.create_query, - methods=["POST"], - operation_id="create_query", - status_code=status.HTTP_200_OK, - response_model=QueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}", - self.fetch_query, - methods=["GET"], - operation_id="fetch_query", - status_code=status.HTTP_200_OK, - response_model=QueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}", - self.edit_query, - methods=["PUT"], - operation_id="edit_query", - status_code=status.HTTP_200_OK, - response_model=QueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}/archive", - self.archive_query, - methods=["POST"], - operation_id="archive_query", - status_code=status.HTTP_200_OK, - response_model=QueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}/unarchive", - self.unarchive_query, - methods=["POST"], - operation_id="unarchive_query", - status_code=status.HTTP_200_OK, - response_model=QueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/query", - self.query_queries, - methods=["POST"], - operation_id="query_queries", - status_code=status.HTTP_200_OK, - response_model=QueriesResponse, - response_model_exclude_none=True, - ) - - # QUERY VARIANTS ------------------------------------------------------- - - # TODO: IMPLEMENT ME - - # QUERY REVISIONS ------------------------------------------------------ - - self.router.add_api_route( - "/revisions/retrieve", - self.retrieve_query_revision, - methods=["POST"], - operation_id="retrieve_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/", - self.create_query_revision, - methods=["POST"], - operation_id="create_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{query_revision_id}", - self.fetch_query_revision, - methods=["GET"], - operation_id="fetch_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{query_revision_id}", - self.edit_query_revision, - methods=["PUT"], - operation_id="edit_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{query_revision_id}/archive", - self.archive_query_revision, - methods=["POST"], - operation_id="archive_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/{query_revision_id}/unarchive", - self.unarchive_query_revision, - methods=["POST"], - operation_id="unarchive_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/query", - self.query_query_revisions, - methods=["POST"], - operation_id="query_query_revisions", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionsResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/commit", - self.commit_query_revision, - methods=["POST"], - operation_id="commit_query_revision", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/revisions/log", - self.log_query_revisions, - methods=["POST"], - operation_id="log_query_revisions", - status_code=status.HTTP_200_OK, - response_model=QueryRevisionsResponse, - response_model_exclude_none=True, - ) - - # QUERIES ------------------------------------------------------------------ - - @intercept_exceptions() - async def create_query( - self, - request: Request, - *, - query_id: Optional[UUID] = None, - # - query_create_request: QueryCreateRequest, - ) -> QueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query = await self.queries_service.create_query( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - # - query_create=query_create_request.query, - ) - - query_response = QueryResponse( - count=1 if query else 0, - query=query, - ) - - return query_response - - @intercept_exceptions() - @suppress_exceptions(default=QueryResponse()) - async def fetch_query( - self, - request: Request, - *, - query_id: UUID, - ) -> QueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query = await self.queries_service.fetch_query( - project_id=UUID(request.state.project_id), - # - query_ref=Reference(id=query_id), - ) - - query_response = QueryResponse( - count=1 if query else 0, - query=query, - ) - - return query_response - - @intercept_exceptions() - async def edit_query( - self, - request: Request, - *, - query_edit_request: QueryEditRequest, - # - query_id: UUID, - ) -> QueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(query_id) != str(query_edit_request.query.id): - return QueryResponse() - - query = await self.queries_service.edit_query( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_edit=query_edit_request.query, - ) - - query_response = QueryResponse( - count=1 if query else 0, - query=query, - ) - - return query_response - - @intercept_exceptions() - async def archive_query( - self, - request: Request, - *, - query_id: UUID, - ) -> QueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query = await self.queries_service.archive_query( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - ) - - return QueryResponse( - count=1 if query else 0, - query=query, - ) - - @intercept_exceptions() - async def unarchive_query( - self, - request: Request, - *, - query_id: UUID, - ) -> QueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query = await self.queries_service.unarchive_query( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - ) - - query_response = QueryResponse( - count=1 if query else 0, - query=query, - ) - - return query_response - - @intercept_exceptions() - @suppress_exceptions(default=QueriesResponse()) - async def query_queries( - self, - request: Request, - *, - query_request_params: QueryQueryRequest = Depends( - parse_query_query_request_from_params - ), - ) -> QueriesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - body_json = None - query_request_body = None - - try: - body_json = await request.json() - - if body_json: - query_request_body = parse_query_query_request_from_body(**body_json) - - except: # pylint: disable=bare-except - pass - - query_query_request = query_request_params or query_request_body - - queries = await self.queries_service.query_queries( - project_id=UUID(request.state.project_id), - # - query=query_query_request.query if query_query_request else None, - # - query_refs=query_query_request.query_refs if query_query_request else None, - # - include_archived=( - query_query_request.include_archived if query_query_request else None - ), - # - windowing=query_query_request.windowing if query_query_request else None, - ) - - queries_response = QueriesResponse( - count=len(queries), - queries=queries, - ) - - return queries_response - - # QUERY REVISIONS ---------------------------------------------------------- - - @intercept_exceptions() - async def create_query_revision( - self, - request: Request, - *, - query_revision_create_request: QueryRevisionCreateRequest, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.create_query_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_revision_create=query_revision_create_request.query_revision, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - @suppress_exceptions(default=QueryRevisionResponse()) - async def fetch_query_revision( - self, - request: Request, - *, - query_revision_id: UUID, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.fetch_query_revision( - project_id=UUID(request.state.project_id), - # - query_revision_ref=Reference(id=query_revision_id), - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - async def edit_query_revision( - self, - request: Request, - *, - query_revision_edit_request: QueryRevisionEditRequest, - # - query_revision_id: UUID, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(query_revision_id) != str(query_revision_edit_request.query_revision.id): - return QueryRevisionResponse() - - query_revision = await self.queries_service.edit_query_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_revision_edit=query_revision_edit_request.query_revision, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - async def archive_query_revision( - self, - request: Request, - *, - query_revision_id: UUID, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.archive_query_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_revision_id=query_revision_id, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - async def unarchive_query_revision( - self, - request: Request, - *, - query_revision_id: UUID, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.unarchive_query_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_revision_id=query_revision_id, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - @suppress_exceptions(default=QueryRevisionsResponse()) - async def query_query_revisions( - self, - request: Request, - *, - query_revision_query_request: QueryRevisionQueryRequest, - ) -> QueryRevisionsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revisions = await self.queries_service.query_query_revisions( - project_id=UUID(request.state.project_id), - # - query_revision=query_revision_query_request.query_revision, - # - query_refs=query_revision_query_request.query_refs, - query_variant_refs=query_revision_query_request.query_variant_refs, - query_revision_refs=query_revision_query_request.query_revision_refs, - # - include_archived=query_revision_query_request.include_archived, - # - windowing=query_revision_query_request.windowing, - ) - - query_revisions_response = QueryRevisionsResponse( - count=len(query_revisions), - query_revisions=query_revisions, - ) - - return query_revisions_response - - @intercept_exceptions() - async def commit_query_revision( - self, - request: Request, - *, - query_revision_commit_request: QueryRevisionCommitRequest, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.commit_query_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_revision_commit=query_revision_commit_request.query_revision_commit, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - @intercept_exceptions() - @suppress_exceptions(default=QueryRevisionsResponse()) - async def log_query_revisions( - self, - request: Request, - *, - query_revisions_log_request: QueryRevisionsLogRequest, - ) -> QueryRevisionsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revisions = await self.queries_service.log_query_revisions( - project_id=UUID(request.state.project_id), - # - query_revisions_log=query_revisions_log_request.query_revisions, - ) - - revisions_response = QueryRevisionsResponse( - count=len(query_revisions), - query_revisions=query_revisions, - ) - - return revisions_response - - @intercept_exceptions() - @suppress_exceptions(default=QueryRevisionResponse()) - async def retrieve_query_revision( - self, - request: Request, - *, - query_revision_retrieve_request: QueryRevisionRetrieveRequest, - ) -> QueryRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - query_revision = await self.queries_service.fetch_query_revision( - project_id=UUID(request.state.project_id), - # - query_ref=query_revision_retrieve_request.query_ref, - query_variant_ref=query_revision_retrieve_request.query_variant_ref, - query_revision_ref=query_revision_retrieve_request.query_revision_ref, - ) - - query_revision_response = QueryRevisionResponse( - count=1 if query_revision else 0, - query_revision=query_revision, - ) - - return query_revision_response - - -class SimpleQueriesRouter: - def __init__( - self, - *, - simple_queries_service: SimpleQueriesService, - ): - self.simple_queries_service = simple_queries_service - - self.router = APIRouter() - - # SIMPLE QUERIES ------------------------------------------------------- - - self.router.add_api_route( - "/", - self.create_simple_query, - methods=["POST"], - operation_id="create_simple_query", - status_code=status.HTTP_200_OK, - response_model=SimpleQueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}", - self.fetch_simple_query, - methods=["GET"], - operation_id="fetch_simple_query", - status_code=status.HTTP_200_OK, - response_model=SimpleQueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}", - self.edit_simple_query, - methods=["PUT"], - operation_id="edit_simple_query", - status_code=status.HTTP_200_OK, - response_model=SimpleQueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}/archive", - self.archive_simple_query, - methods=["POST"], - operation_id="archive_simple_query", - status_code=status.HTTP_200_OK, - response_model=SimpleQueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/{query_id}/unarchive", - self.unarchive_simple_query, - methods=["POST"], - operation_id="unarchive_simple_query", - status_code=status.HTTP_200_OK, - response_model=SimpleQueryResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/query", - self.query_simple_queries, - methods=["POST"], - operation_id="query_simple_queries", - status_code=status.HTTP_200_OK, - response_model=SimpleQueriesResponse, - response_model_exclude_none=True, - ) - - # SIMPLE QUERIES ----------------------------------------------------------- - - @intercept_exceptions() - async def create_simple_query( - self, - request: Request, - *, - query_id: Optional[UUID] = None, - # - simple_query_create_request: SimpleQueryCreateRequest, - ) -> SimpleQueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_query = await self.simple_queries_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - # - simple_query_create=simple_query_create_request.query, - ) - - simple_query_response = SimpleQueryResponse( - count=1 if simple_query else 0, - query=simple_query, - ) - - return simple_query_response - - @intercept_exceptions() - @suppress_exceptions(default=SimpleQueryResponse()) - async def fetch_simple_query( - self, - request: Request, - *, - query_id: UUID, - ) -> SimpleQueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_query = await self.simple_queries_service.fetch( - project_id=UUID(request.state.project_id), - # - query_id=query_id, - ) - - simple_query_response = SimpleQueryResponse( - count=1 if simple_query else 0, - query=simple_query, - ) - - return simple_query_response - - @intercept_exceptions() - async def edit_simple_query( - self, - request: Request, - *, - query_id: UUID, - # - simple_query_edit_request: SimpleQueryEditRequest, - ) -> SimpleQueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_query = await self.simple_queries_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - # - simple_query_edit=simple_query_edit_request.query, - ) - - simple_query_response = SimpleQueryResponse( - count=1 if simple_query else 0, - query=simple_query, - ) - - return simple_query_response - - @intercept_exceptions() - async def archive_simple_query( - self, - request: Request, - *, - query_id: UUID, - ) -> SimpleQueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_query = await self.simple_queries_service.archive( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - ) - - simple_query_response = SimpleQueryResponse( - count=1 if simple_query else 0, - query=simple_query, - ) - - return simple_query_response - - @intercept_exceptions() - async def unarchive_simple_query( - self, - request: Request, - *, - query_id: UUID, - ) -> SimpleQueryResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_query = await self.simple_queries_service.unarchive( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - query_id=query_id, - ) - - simple_query_response = SimpleQueryResponse( - count=1 if simple_query else 0, - query=simple_query, - ) - - return simple_query_response - - @intercept_exceptions() - @suppress_exceptions(default=SimpleQueriesResponse()) - async def query_simple_queries( - self, - *, - request: Request, - # - simple_query_query_request: SimpleQueryQueryRequest, - ) -> SimpleQueriesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - # - permission=Permission.VIEW_QUERIES, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_queries = await self.simple_queries_service.query( - project_id=UUID(request.state.project_id), - # - query=simple_query_query_request.query, - # - query_refs=simple_query_query_request.query_refs, - # - include_archived=simple_query_query_request.include_archived, - # - windowing=simple_query_query_request.windowing, - ) - - simple_queries_response = SimpleQueriesResponse( - count=len(simple_queries), - queries=simple_queries, - ) - - return simple_queries_response diff --git a/api/oss/src/apis/fastapi/queries/utils.py b/api/oss/src/apis/fastapi/queries/utils.py deleted file mode 100644 index 99ecc5a0bb..0000000000 --- a/api/oss/src/apis/fastapi/queries/utils.py +++ /dev/null @@ -1,622 +0,0 @@ -from typing import Optional, Literal, List -from uuid import UUID -from datetime import datetime - -from fastapi import Query - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.dtos import ( - Windowing, - Reference, -) -from oss.src.core.queries.dtos import ( - # QueryFlags, - # - QueryQuery, - QueryVariantQuery, - QueryRevisionQuery, -) - -from oss.src.apis.fastapi.shared.utils import ( - parse_metadata, -) -from oss.src.apis.fastapi.queries.models import ( - QueryQueryRequest, - QueryVariantQueryRequest, - QueryRevisionQueryRequest, - QueryRevisionRetrieveRequest, -) - - -log = get_module_logger(__name__) - - -def parse_query_query_request_from_params( - query_id: Optional[UUID] = Query(None), - query_ids: Optional[List[UUID]] = Query(None), - query_slug: Optional[str] = Query(None), - query_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> QueryQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = _flags # QueryFlags(**_flags) if _flags else None - - query = ( - QueryQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - query_refs = ( - ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - ] - if query_id or query_slug - else [] - ) - + ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - for query_id, query_slug in zip( - query_ids, - query_slugs, - ) - ] - if query_ids and query_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_query_query_request_from_body( - query=query, - # - query_refs=query_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_query_query_request_from_body( - query: Optional[QueryQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> QueryQueryRequest: - query_query_request = None - - try: - query_query_request = QueryQueryRequest( - query=query, - # - query_refs=query_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - except Exception as e: # pylint: disable=broad-except - query_query_request = QueryQueryRequest() - - return query_query_request - - -def merge_query_query_requests( - query_request_params: Optional[QueryQueryRequest] = None, - query_request_body: Optional[QueryQueryRequest] = None, -) -> QueryQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return QueryQueryRequest( - query=query_request_body.query or query_request_params.query, - # - query_refs=query_request_body.query_refs or query_request_params.query_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return QueryQueryRequest() - - -def parse_query_variant_query_request_from_params( - query_id: Optional[UUID] = Query(None), - query_ids: Optional[List[UUID]] = Query(None), - query_slug: Optional[str] = Query(None), - query_slugs: Optional[List[str]] = Query(None), - # - query_variant_id: Optional[UUID] = Query(None), - query_variant_ids: Optional[List[UUID]] = Query(None), - query_variant_slug: Optional[str] = Query(None), - query_variant_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> QueryVariantQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = _flags # QueryFlags(**_flags) if _flags else None - - query_variant = ( - QueryVariantQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - query_refs = ( - ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - ] - if query_id or query_slug - else [] - ) - + ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - for query_id, query_slug in zip( - query_ids, - query_slugs, - ) - ] - if query_ids and query_slugs - else [] - ) - ) or None - - query_variant_refs = ( - ( - [ - Reference( - id=query_variant_id, - slug=query_variant_slug, - ) - ] - if query_variant_id or query_variant_slug - else [] - ) - + ( - [ - Reference( - id=query_variant_id, - slug=query_variant_slug, - ) - for query_variant_id, query_variant_slug in zip( - query_variant_ids, - query_variant_slugs, - ) - ] - if query_variant_ids and query_variant_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_query_variant_query_request_from_body( - query_variant=query_variant, - # - query_refs=query_refs or None, - query_variant_refs=query_variant_refs or None, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_query_variant_query_request_from_body( - query_variant: Optional[QueryVariantQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - query_variant_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> QueryVariantQueryRequest: - query_variant_query_request = None - - try: - query_variant_query_request = QueryVariantQueryRequest( - query_variant=query_variant, - # - query_refs=query_refs, - query_variant_refs=query_variant_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - except Exception as e: # pylint: disable=broad-except - query_variant_query_request = QueryVariantQueryRequest() - - return query_variant_query_request - - -def merge_query_variant_query_requests( - query_request_params: Optional[QueryVariantQueryRequest] = None, - query_request_body: Optional[QueryVariantQueryRequest] = None, -) -> QueryVariantQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return QueryVariantQueryRequest( - query_variant=query_request_body.query_variant - or query_request_params.query_variant, - # - query_refs=query_request_body.query_refs or query_request_params.query_refs, - query_variant_refs=query_request_body.query_variant_refs - or query_request_params.query_variant_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return QueryVariantQueryRequest() - - -def parse_query_revision_query_request_from_params( - query_id: Optional[UUID] = Query(None), - query_ids: Optional[List[UUID]] = Query(None), - query_slug: Optional[str] = Query(None), - query_slugs: Optional[List[str]] = Query(None), - # - query_variant_id: Optional[UUID] = Query(None), - query_variant_ids: Optional[List[UUID]] = Query(None), - query_variant_slug: Optional[str] = Query(None), - query_variant_slugs: Optional[List[str]] = Query(None), - # - query_revision_id: Optional[UUID] = Query(None), - query_revision_ids: Optional[List[UUID]] = Query(None), - query_revision_slug: Optional[str] = Query(None), - query_revision_slugs: Optional[List[str]] = Query(None), - query_revision_version: Optional[str] = Query(None), - query_revision_versions: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> QueryRevisionQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = _flags # QueryFlags(**_flags) if _flags else None - - query_revision = ( - QueryRevisionQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - query_refs = ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - ] - if query_id or query_slug - else [] - ) + ( - [ - Reference( - id=query_id, - slug=query_slug, - ) - for query_id, query_slug in zip( - query_ids, - query_slugs, - ) - ] - if query_ids and query_slugs - else [] - ) - - query_variant_refs = ( - [ - Reference( - id=query_variant_id, - slug=query_variant_slug, - ) - ] - if query_variant_id or query_variant_slug - else [] - ) + ( - [ - Reference( - id=query_variant_id, - slug=query_variant_slug, - ) - for query_variant_id, query_variant_slug in zip( - query_variant_ids, - query_variant_slugs, - ) - ] - if query_variant_ids and query_variant_slugs - else [] - ) - - query_revision_refs = ( - [ - Reference( - id=query_revision_id, - slug=query_revision_slug, - version=query_revision_version, - ) - ] - if query_revision_id or query_revision_slug or query_revision_version - else [] - ) + ( - [ - Reference( - id=query_revision_id, - slug=query_revision_slug, - version=query_revision_version, - ) - for query_revision_id, query_revision_slug, query_revision_version in zip( - query_revision_ids, - query_revision_slugs, - query_revision_versions, - ) - ] - if query_revision_ids and query_revision_slugs and query_revision_versions - else [] - ) - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_query_revision_query_request_from_body( - query_revision=query_revision, - # - query_refs=query_refs, - query_variant_refs=query_variant_refs, - query_revision_refs=query_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - -def parse_query_revision_query_request_from_body( - query_revision: Optional[QueryRevisionQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - query_variant_refs: Optional[List[Reference]] = None, - query_revision_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> QueryRevisionQueryRequest: - query_revision_query_request = None - - try: - query_revision_query_request = QueryRevisionQueryRequest( - query_revision=query_revision, - # - query_refs=query_refs, - query_variant_refs=query_variant_refs, - query_revision_refs=query_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - except Exception as e: # pylint: disable=broad-except - log.warn(e) - - query_revision_query_request = QueryRevisionQueryRequest() - - return query_revision_query_request - - -def merge_query_revision_query_requests( - query_request_params: Optional[QueryRevisionQueryRequest] = None, - query_request_body: Optional[QueryRevisionQueryRequest] = None, -) -> QueryRevisionQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return QueryRevisionQueryRequest( - query_revision=query_request_body.query_revision - or query_request_params.query_revision, - # - query_refs=query_request_body.query_refs or query_request_params.query_refs, - query_variant_refs=query_request_body.query_variant_refs - or query_request_params.query_variant_refs, - query_revision_refs=query_request_body.query_revision_refs - or query_request_params.query_revision_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return QueryRevisionQueryRequest() - - -def parse_query_revision_retrieve_request_from_params( - query_id: Optional[UUID] = Query(None), - query_slug: Optional[str] = Query(None), - # - query_variant_id: Optional[UUID] = Query(None), - query_variant_slug: Optional[str] = Query(None), - # - query_revision_id: Optional[UUID] = Query(None), - query_revision_slug: Optional[str] = Query(None), - query_revision_version: Optional[str] = Query(None), -): - query_ref = ( - Reference( - id=query_id, - slug=query_slug, - ) - if query_id or query_slug - else None - ) - - query_variant_ref = ( - Reference( - id=query_variant_id, - slug=query_variant_slug, - ) - if query_variant_id or query_variant_slug - else None - ) - - query_revision_ref = ( - Reference( - id=query_revision_id, - slug=query_revision_slug, - version=query_revision_version, - ) - if query_revision_id or query_revision_slug or query_revision_version - else None - ) - - return parse_query_revision_retrieve_request_from_body( - query_ref=query_ref, - query_variant_ref=query_variant_ref, - query_revision_ref=query_revision_ref, - ) - - -def parse_query_revision_retrieve_request_from_body( - query_ref: Optional[Reference] = None, - query_variant_ref: Optional[Reference] = None, - query_revision_ref: Optional[Reference] = None, -) -> QueryRevisionRetrieveRequest: - return QueryRevisionRetrieveRequest( - query_ref=query_ref, - query_variant_ref=query_variant_ref, - query_revision_ref=query_revision_ref, - ) diff --git a/api/oss/src/apis/fastapi/shared/models.py b/api/oss/src/apis/fastapi/shared/models.py new file mode 100644 index 0000000000..53cb9c3ab2 --- /dev/null +++ b/api/oss/src/apis/fastapi/shared/models.py @@ -0,0 +1,5 @@ +from pydantic import BaseModel + + +class VersionedModel(BaseModel): + version: str diff --git a/api/oss/src/apis/fastapi/shared/utils.py b/api/oss/src/apis/fastapi/shared/utils.py index b9accb73b9..132b085cdb 100644 --- a/api/oss/src/apis/fastapi/shared/utils.py +++ b/api/oss/src/apis/fastapi/shared/utils.py @@ -1,34 +1,30 @@ -from typing import Optional, Tuple -from json import loads +from functools import wraps +from traceback import print_exc +from fastapi import HTTPException +from uuid import uuid4 -from oss.src.core.shared.dtos import ( - Flags, - Tags, - Meta, -) +from oss.src.utils.logging import get_module_logger +log = get_module_logger(__name__) -def parse_metadata( - flags: Optional[str] = None, - tags: Optional[str] = None, - meta: Optional[str] = None, -) -> Tuple[Optional[Flags], Optional[Tags], Optional[Meta],]: - _flags = None - try: - _flags = loads(flags) if flags else None - except Exception: # pylint: disable=broad-exception-caught - pass - _tags = None - try: - _tags = loads(tags) if tags else None - except Exception: # pylint: disable=broad-exception-caught - pass +def handle_exceptions(): + def decorator(func): + @wraps(func) + async def wrapper(*args, **kwargs): + try: + return await func(*args, **kwargs) + except HTTPException as e: + raise e + except Exception: + support_id = str(uuid4()) + log.error("ERROR", support_id=support_id, operation_id=func.__name__) + print_exc() + raise HTTPException( + status_code=500, + detail=f"An unexpected error occurred with operation_id={func.__name__}. Please contact support with support_id={support_id}.", + ) - _meta = None - try: - _meta = loads(meta) if meta else None - except Exception: # pylint: disable=broad-exception-caught - pass + return wrapper - return _flags, _tags, _meta + return decorator diff --git a/api/oss/src/apis/fastapi/testcases/models.py b/api/oss/src/apis/fastapi/testcases/models.py deleted file mode 100644 index a6a1c76e27..0000000000 --- a/api/oss/src/apis/fastapi/testcases/models.py +++ /dev/null @@ -1,32 +0,0 @@ -from typing import Optional, List -from uuid import UUID - -from pydantic import BaseModel - -from oss.src.core.shared.dtos import ( - Windowing, -) -from oss.src.core.testcases.dtos import ( - Testcase, -) - - -# TESTCASES -------------------------------------------------------------------- - - -class TestcasesQueryRequest(BaseModel): - testcase_ids: Optional[List[UUID]] = None - # - testset_id: Optional[UUID] = None - # - windowing: Optional[Windowing] = None - - -class TestcaseResponse(BaseModel): - count: int = 0 - testcase: Optional[Testcase] = None - - -class TestcasesResponse(BaseModel): - count: int = 0 - testcases: List[Testcase] = [] diff --git a/api/oss/src/apis/fastapi/testcases/router.py b/api/oss/src/apis/fastapi/testcases/router.py deleted file mode 100644 index e7fc999aa5..0000000000 --- a/api/oss/src/apis/fastapi/testcases/router.py +++ /dev/null @@ -1,137 +0,0 @@ -from uuid import UUID - -from fastapi import APIRouter, Request, status - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - -from oss.src.core.testcases.service import ( - TestcasesService, -) - -from oss.src.apis.fastapi.testcases.models import ( - TestcasesQueryRequest, - TestcaseResponse, - TestcasesResponse, -) - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION - - -log = get_module_logger(__name__) - - -class TestcasesRouter: - """ - FastAPI router for testcase endpoints. - """ - - def __init__( - self, - *, - testcases_service: TestcasesService, - ): - self.testcases_service = testcases_service - self.router = APIRouter() - - # TESTCASES ------------------------------------------------------------ - - self.router.add_api_route( - "/{testcase_id}", - self.fetch_testcase, - methods=["GET"], - status_code=status.HTTP_200_OK, - response_model=TestcaseResponse, - ) - - self.router.add_api_route( - "/query", - self.query_testcases, - methods=["POST"], - status_code=status.HTTP_200_OK, - response_model=TestcasesResponse, - ) - - # TESTCASES ---------------------------------------------------------------- - - @intercept_exceptions() - @suppress_exceptions(default=TestcaseResponse()) - async def fetch_testcase( - self, - request: Request, - *, - testcase_id: UUID, - ) -> TestcaseResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_TESTSETS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testcases = await self.testcases_service.fetch_testcases( - project_id=UUID(request.state.project_id), - # - testcase_ids=[testcase_id], - ) - - testcase = testcases[0] if len(testcases) > 0 else None - - testcase_response = TestcaseResponse( - count=1 if testcase else 0, - testcase=testcase, - ) - - return testcase_response - - @intercept_exceptions() - @suppress_exceptions(default=TestcasesResponse()) - async def list_testcases( - self, - request: Request, - ) -> TestcasesResponse: - testcase_query_request = TestcasesQueryRequest() - - return await self.query_testcases( - request=request, - # - testcases_query_request=testcase_query_request, - ) - - @intercept_exceptions() - @suppress_exceptions(default=TestcasesResponse()) - async def query_testcases( - self, - request: Request, - *, - testcases_query_request: TestcasesQueryRequest, - ) -> TestcasesResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_TESTSETS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testcases = await self.testcases_service.fetch_testcases( - project_id=UUID(request.state.project_id), - # - testcase_ids=testcases_query_request.testcase_ids, - # - testset_id=testcases_query_request.testset_id, - # - windowing=testcases_query_request.windowing, - ) - - testcase_response = TestcasesResponse( - count=len(testcases), - testcases=testcases if testcases else [], - ) - - return testcase_response diff --git a/api/oss/src/apis/fastapi/testsets/models.py b/api/oss/src/apis/fastapi/testsets/models.py index df293019b4..efc9a7bcc4 100644 --- a/api/oss/src/apis/fastapi/testsets/models.py +++ b/api/oss/src/apis/fastapi/testsets/models.py @@ -3,170 +3,38 @@ from pydantic import BaseModel from oss.src.core.shared.dtos import ( - Windowing, - Reference, + Identifier, + Slug, + Lifecycle, + Meta, + Header, + Data as Testcase, ) -from oss.src.core.testsets.dtos import ( - Testset, - TestsetCreate, - TestsetEdit, - TestsetQuery, - TestsetLog, - # - TestsetVariant, - TestsetVariantCreate, - TestsetVariantEdit, - TestsetVariantQuery, - # - TestsetRevision, - TestsetRevisionQuery, - TestsetRevisionCreate, - TestsetRevisionEdit, - TestsetRevisionCommit, - # - SimpleTestset, - SimpleTestsetCreate, - SimpleTestsetEdit, - SimpleTestsetQuery, -) - - -# TESTSETS --------------------------------------------------------------------- -class TestsetCreateRequest(BaseModel): - testset: TestsetCreate +class Testset(Identifier, Slug, Lifecycle, Header): + testcases: Optional[List[Testcase]] = None + meta: Optional[Meta] = None -class TestsetEditRequest(BaseModel): - testset: TestsetEdit +class TestsetRequest(BaseModel): + testset: Testset -class TestsetQueryRequest(BaseModel): - testset: Optional[TestsetQuery] = None - # - testset_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class TestsetLogRequest(BaseModel): - testset: TestsetLog +class MetaRequest(BaseModel): + meta: Meta class TestsetResponse(BaseModel): - count: int = 0 + count: int testset: Optional[Testset] = None class TestsetsResponse(BaseModel): - count: int = 0 + count: int testsets: List[Testset] = [] -# TESTSET VARIANTS ------------------------------------------------------------- - - -class TestsetVariantCreateRequest(BaseModel): - testset_variant: TestsetVariantCreate - - -class TestsetVariantEditRequest(BaseModel): - testset_variant: TestsetVariantEdit - - -class TestsetVariantQueryRequest(BaseModel): - testset_variant: Optional[TestsetVariantQuery] = None - # - testset_refs: Optional[List[Reference]] = None - testset_variant_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class TestsetVariantResponse(BaseModel): - count: int = 0 - testset_variant: Optional[TestsetVariant] = None - - -class TestsetVariantsResponse(BaseModel): - count: int = 0 - testset_variants: List[TestsetVariant] = [] - - -# TESTSET REVISIONS ------------------------------------------------------------ - - -class TestsetRevisionCreateRequest(BaseModel): - testset_revision: TestsetRevisionCreate - - -class TestsetRevisionEditRequest(BaseModel): - testset_revision: TestsetRevisionEdit - - -class TestsetRevisionQueryRequest(BaseModel): - testset_revision: Optional[TestsetRevisionQuery] = None - # - testset_refs: Optional[List[Reference]] = None - testset_variant_refs: Optional[List[Reference]] = None - testset_revision_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class TestsetRevisionCommitRequest(BaseModel): - testset_revision_commit: TestsetRevisionCommit - - -class TestsetRevisionRetrieveRequest(BaseModel): - testset_ref: Optional[Reference] = None - testset_variant_ref: Optional[Reference] = None - testset_revision_ref: Optional[Reference] = None - - -class TestsetRevisionResponse(BaseModel): - count: int = 0 - testset_revision: Optional[TestsetRevision] = None - - -class TestsetRevisionsResponse(BaseModel): - count: int = 0 - testset_revisions: List[TestsetRevision] = [] - - -# SIMPLE TESTSETS -------------------------------------------------------------- - - -class SimpleTestsetCreateRequest(BaseModel): - testset: SimpleTestsetCreate - - -class SimpleTestsetEditRequest(BaseModel): - testset: SimpleTestsetEdit - - -class SimpleTestsetQueryRequest(BaseModel): - testset: Optional[SimpleTestsetQuery] = None - # - testset_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class SimpleTestsetResponse(BaseModel): - count: int = 0 - testset: Optional[SimpleTestset] = None - - -class SimpleTestsetsResponse(BaseModel): - count: int = 0 - testsets: List[SimpleTestset] = [] +class TestcaseResponse(BaseModel): + count: int + testcase: Optional[Testcase] = None diff --git a/api/oss/src/apis/fastapi/testsets/router.py b/api/oss/src/apis/fastapi/testsets/router.py index 9fcd8bcab6..819e32a3ad 100644 --- a/api/oss/src/apis/fastapi/testsets/router.py +++ b/api/oss/src/apis/fastapi/testsets/router.py @@ -1,99 +1,44 @@ -from typing import Optional, List, Literal, Dict, Any +from typing import Union, Optional, List, Literal from uuid import uuid4, UUID -from json import loads, JSONDecodeError -from io import BytesIO +from tempfile import TemporaryDirectory +from os import path as os_path -import orjson -import pandas as pd from pydantic import ValidationError -from fastapi.responses import StreamingResponse -from fastapi import ( - APIRouter, - Request, - status, - UploadFile, - File, - Form, - Depends, - HTTPException, -) +from fastapi import Request, status, HTTPException, UploadFile, File, Form, Query +from fastapi.responses import FileResponse -from oss.src.utils.common import is_ee +from oss.src.utils.common import APIRouter, is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache -from oss.src.core.shared.dtos import ( - Reference, -) -from oss.src.core.testcases.dtos import ( - Testcase, -) +from oss.src.core.shared.dtos import Reference +from oss.src.core.testsets.dtos import TestsetFlags, TestsetData +from oss.src.core.testsets.service import TestsetsService +from oss.src.apis.fastapi.shared.utils import handle_exceptions + from oss.src.core.testsets.dtos import ( - TestsetFlags, - Testset, - TestsetCreate, - TestsetEdit, - TestsetQuery, - # + TestsetArtifact, TestsetVariant, - TestsetVariantCreate, - TestsetVariantEdit, - TestsetVariantQuery, - # - TestsetRevisionData, TestsetRevision, - TestsetRevisionCreate, - TestsetRevisionEdit, - TestsetRevisionQuery, - TestsetRevisionCommit, - # - SimpleTestset, - SimpleTestsetCreate, - SimpleTestsetEdit, - SimpleTestsetQuery, -) -from oss.src.core.testsets.service import ( - TestsetsService, - SimpleTestsetsService, ) from oss.src.apis.fastapi.testsets.models import ( - TestsetCreateRequest, - TestsetEditRequest, - TestsetQueryRequest, - TestsetLogRequest, + MetaRequest, + TestsetRequest, TestsetResponse, TestsetsResponse, - # - TestsetVariantCreateRequest, - TestsetVariantEditRequest, - TestsetVariantQueryRequest, - TestsetVariantResponse, - TestsetVariantsResponse, - # - TestsetRevisionCreateRequest, - TestsetRevisionEditRequest, - TestsetRevisionQueryRequest, - TestsetRevisionRetrieveRequest, - TestsetRevisionCommitRequest, - TestsetRevisionResponse, - TestsetRevisionsResponse, - # - SimpleTestsetCreateRequest, - SimpleTestsetEditRequest, - SimpleTestsetQueryRequest, - SimpleTestsetResponse, - SimpleTestsetsResponse, + TestcaseResponse, + Testset, + Testcase, ) + from oss.src.apis.fastapi.testsets.utils import ( - parse_testset_revision_retrieve_request_from_params, - parse_testset_revision_retrieve_request_from_body, - # csv_file_to_json_array, json_file_to_json_array, json_array_to_json_object, + json_array_to_csv_file, + json_array_to_json_file, + format_validation_error, validate_testset_limits, TESTSETS_SIZE_EXCEPTION, TESTSETS_SIZE_LIMIT, @@ -106,20 +51,32 @@ log = get_module_logger(__name__) +# --- LATER +# TODO: ADD TESTCASE_ID_KEY OPTION +# TODO: ADD DEDUPLICATION +# TODO: ADD DEDUPLICATION_ID_KEY OPTION +# TODO: ADD METADATA +# TODO: ADD METADATA_KEY OPTION + class TestsetsRouter: + VERSION = "1.0.0" + TESTCASES_FLAGS = TestsetFlags( has_testcases=True, - has_traces=False, + has_links=False, ) - def __init__(self, *, testsets_service: TestsetsService): + def __init__( + self, + *, + testsets_service: TestsetsService, + ): self.testsets_service = testsets_service self.router = APIRouter() - # TESTSETS ------------------------------------------------------------- - + # POST /api/v1/testsets/ self.router.add_api_route( "/", self.create_testset, @@ -130,6 +87,7 @@ def __init__(self, *, testsets_service: TestsetsService): response_model_exclude_none=True, ) + # GET /api/v1/testsets/{testset_id} self.router.add_api_route( "/{testset_id}", self.fetch_testset, @@ -140,6 +98,7 @@ def __init__(self, *, testsets_service: TestsetsService): response_model_exclude_none=True, ) + # PUT /api/v1/testsets/{testset_id} self.router.add_api_route( "/{testset_id}", self.edit_testset, @@ -150,6 +109,7 @@ def __init__(self, *, testsets_service: TestsetsService): response_model_exclude_none=True, ) + # POST /api/v1/testsets/{testset_id}/archive self.router.add_api_route( "/{testset_id}/archive", self.archive_testset, @@ -160,6 +120,7 @@ def __init__(self, *, testsets_service: TestsetsService): response_model_exclude_none=True, ) + # POST /api/v1/testsets/{testset_id}/unarchive self.router.add_api_route( "/{testset_id}/unarchive", self.unarchive_testset, @@ -170,1322 +131,757 @@ def __init__(self, *, testsets_service: TestsetsService): response_model_exclude_none=True, ) + # GET /api/v1/testsets/ self.router.add_api_route( - "/query", + "/", self.query_testsets, - methods=["POST"], - operation_id="query_testsets", - status_code=status.HTTP_200_OK, - response_model=TestsetsResponse, - response_model_exclude_none=True, - ) - - # TESTSET VARIANTS ----------------------------------------------------- - - self.router.add_api_route( - "/variants/", - self.create_testset_variant, - methods=["POST"], - operation_id="create_testset_variant", - status_code=status.HTTP_201_CREATED, - response_model=TestsetVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{testset_variant_id}", - self.fetch_testset_variant, methods=["GET"], - operation_id="fetch_testset_variant", - status_code=status.HTTP_200_OK, - response_model=TestsetVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{testset_variant_id}", - self.edit_testset_variant, - methods=["PUT"], - operation_id="edit_testset_variant", - status_code=status.HTTP_200_OK, - response_model=TestsetVariantResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/variants/{testset_variant_id}/archive", - self.archive_testset_variant, - methods=["PUT"], - operation_id="archive_testset_variant", + operation_id="list_testsets", status_code=status.HTTP_200_OK, - response_model=TestsetVariantResponse, + response_model=TestsetResponse, response_model_exclude_none=True, ) + # POST /api/v1/testsets/query self.router.add_api_route( - "/variants/{testset_variant_id}/unarchive", - self.unarchive_testset_variant, - methods=["PUT"], - operation_id="unarchive_testset_variant", + "/query", + self.query_testsets, + methods=["POST"], + operation_id="query_testsets", status_code=status.HTTP_200_OK, - response_model=TestsetVariantResponse, + response_model=TestsetsResponse, response_model_exclude_none=True, ) + # POST /api/v1/testsets/upload self.router.add_api_route( - "/variants/query", - self.query_testset_variants, + "/upload", + self.create_testset_from_file, methods=["POST"], - operation_id="query_testset_variants", + operation_id="create_testset_from_file", status_code=status.HTTP_200_OK, - response_model=TestsetVariantsResponse, + response_model=TestsetResponse, response_model_exclude_none=True, ) - # TESTSET REVISIONS ---------------------------------------------------- - + # POST /api/v1/testsets/{testset_id}/upload self.router.add_api_route( - "/revisions/retrieve", - self.retrieve_testset_revision, + "/{testset_id}/upload", + self.update_testset_from_file, methods=["POST"], - operation_id="retrieve_testset_revision", + operation_id="update_testset_from_file", status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, + response_model=TestsetResponse, response_model_exclude_none=True, ) + # POST /api/v1/testsets/{testset_id}/download self.router.add_api_route( - "/revisions/", - self.create_testset_revision, + "/{testset_id}/download", + self.fetch_testset_to_file, methods=["POST"], - operation_id="create_testset_revision", + operation_id="fetch_testset_to_file", status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, + response_model=TestsetResponse, response_model_exclude_none=True, ) + # GET /api/v1/testcases/{testcase_id} self.router.add_api_route( - "/revisions/{testset_revision_id}", - self.fetch_testset_revision, + "/testcases/{testcase_id}", + self.fetch_testcase, methods=["GET"], - operation_id="fetch_testset_revision", + operation_id="fetch_testcase", status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, + response_model=TestcaseResponse, response_model_exclude_none=True, ) - self.router.add_api_route( - "/revisions/{testset_revision_id}", - self.edit_testset_revision, - methods=["PUT"], - operation_id="edit_testset_revision", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, - response_model_exclude_none=True, - ) + @handle_exceptions() + async def create_testset( + self, + *, + request: Request, + testset_request: TestsetRequest, + ) -> TestsetResponse: + if is_ee(): + if not await check_action_access( + user_uid=request.state.user_id, + project_id=request.state.project_id, + permission=Permission.EDIT_TESTSETS, + ): + raise FORBIDDEN_EXCEPTION - self.router.add_api_route( - "/revisions/{testset_revision_id}/archive", - self.archive_testset_revision, - methods=["POST"], - operation_id="archive_testset_revision", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, - response_model_exclude_none=True, - ) + try: + testcases = json_array_to_json_object( + data=testset_request.testset.testcases, + ).values() - self.router.add_api_route( - "/revisions/{testset_revision_id}/unarchive", - self.unarchive_testset_revision, - methods=["POST"], - operation_id="unarchive_testset_revision", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, - response_model_exclude_none=True, - ) + validate_testset_limits(testcases) - self.router.add_api_route( - "/revisions/query", - self.query_testset_revisions, - methods=["POST"], - operation_id="query_testset_revisions", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionsResponse, - response_model_exclude_none=True, + except Exception as e: + raise HTTPException( + status_code=400, + detail=f"Failed to parse testcases as JSON array: {e}", + ) from e + + try: + testset_revision_data = TestsetData( + testcases=testcases, + ) + + except ValidationError as e: + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, + detail=format_validation_error(e, testset_request.model_dump()), + ) from e + + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.create_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_slug=testset_request.testset.slug, + # + artifact_flags=self.TESTCASES_FLAGS, + artifact_meta=testset_request.testset.meta, + artifact_name=testset_request.testset.name, + artifact_description=testset_request.testset.description, + ) ) - self.router.add_api_route( - "/revisions/commit", - self.commit_testset_revision, - methods=["POST"], - operation_id="commit_testset_revision", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionResponse, - response_model_exclude_none=True, + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create testset. Please try again or contact support.", + ) + + testset_variant_slug = uuid4().hex + + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.create_variant( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=testset_artifact.id, + # + variant_slug=testset_variant_slug, + # + variant_flags=self.TESTCASES_FLAGS, + variant_meta=testset_request.testset.meta, + ) ) - self.router.add_api_route( - "/revisions/log", - self.log_testset_revisions, - methods=["POST"], - operation_id="log_testset_revisions", - status_code=status.HTTP_200_OK, - response_model=TestsetRevisionsResponse, - response_model_exclude_none=True, + if testset_variant is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create testset. Please try again or contact support.", + ) + + testset_revision_slug = uuid4().hex + + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.create_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=testset_variant.id, + # + revision_slug=testset_revision_slug, + # + revision_flags=self.TESTCASES_FLAGS, + revision_meta=testset_request.testset.meta, + ) ) - # TESTSETS ----------------------------------------------------------------- + if testset_revision is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create testset. Please try again or contact support.", + ) - async def create_testset( - self, - request: Request, - *, - testset_id: Optional[UUID] = None, - # - testset_create_request: TestsetCreateRequest, - ) -> TestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + testset_revision_slug = uuid4().hex - testset = await self.testsets_service.create_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.commit_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=testset_variant.id, + # + revision_slug=testset_revision_slug, + # + revision_flags=self.TESTCASES_FLAGS, + revision_meta=testset_request.testset.meta, + revision_data=testset_revision_data, + ) + ) + + if testset_revision is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to create testset. Please try again or contact support.", + ) + + testset = Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, # - testset_id=testset_id, + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, # - testset_create=testset_create_request.testset, + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, + testcases=testset_revision.data.testcases, ) testset_response = TestsetResponse( - count=1 if testset else 0, + count=1, testset=testset, ) return testset_response + @handle_exceptions() async def fetch_testset( self, - request: Request, *, - testset_id: UUID, + request: Request, + testset_id: Union[UUID, str], ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.VIEW_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - testset = await self.testsets_service.fetch_testset( - project_id=UUID(request.state.project_id), - # - testset_ref=Reference(id=testset_id), + testset_artifact_ref = Reference( + id=testset_id, ) - testset_response = TestsetResponse( - count=1 if testset else 0, - testset=testset, + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - return testset_response + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - async def edit_testset( - self, - request: Request, - *, - testset_id: UUID, - # - testset_edit_request: TestsetEditRequest, - ) -> TestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) + ) - if str(testset_id) != str(testset_edit_request.testset.id): - return TestsetResponse() + if testset_variant is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - testset = await self.testsets_service.edit_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_edit=testset_edit_request.testset, + testset_variant_ref = Reference( + id=testset_variant.id, ) - testset_response = TestsetResponse( - count=1 if testset else 0, - testset=testset, + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=testset_variant_ref, + ) ) - return testset_response - - async def archive_testset( - self, - request: Request, - *, - testset_id: UUID, - ) -> TestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + if testset_revision is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - testset = await self.testsets_service.archive_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), + testset = Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, # - testset_id=testset_id, + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, + # + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, + testcases=testset_revision.data.testcases, ) testset_response = TestsetResponse( - count=1 if testset else 0, + count=1, testset=testset, ) return testset_response - async def unarchive_testset( + @handle_exceptions() + async def edit_testset( self, - request: Request, *, - testset_id: UUID, + request: Request, + testset_id: Union[UUID, str], + testset_request: TestsetRequest, ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore + permission=Permission.EDIT_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - testset = await self.testsets_service.unarchive_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_id=testset_id, - ) + try: + testcases = json_array_to_json_object( + data=testset_request.testset.testcases, + ).values() - testset_response = TestsetResponse( - count=1 if testset else 0, - testset=testset, - ) + validate_testset_limits(testcases) - return testset_response + except Exception as e: + raise HTTPException( + status_code=400, + detail=f"Failed to parse testcases as JSON array: {e}", + ) from e - async def query_testsets( - self, - request: Request, - *, - testset_query_request: TestsetQueryRequest, - ) -> TestsetsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + try: + testset_revision_data = TestsetData( + testcases=testcases, + ) - testsets = await self.testsets_service.query_testsets( - project_id=UUID(request.state.project_id), - # - testset_query=testset_query_request.testset, - # - testset_refs=testset_query_request.testset_refs, - # - include_archived=testset_query_request.include_archived, - # - windowing=testset_query_request.windowing, - ) + except ValidationError as e: + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, + detail=format_validation_error(e, testset_request.model_dump()), + ) from e - testsets_response = TestsetsResponse( - count=len(testsets), - testsets=testsets, - ) - - return testsets_response - - # TESTSET VARIANTS --------------------------------------------------------- - - async def create_testset_variant( - self, - request: Request, - *, - testset_variant_create_request: TestsetVariantCreateRequest, - ) -> TestsetVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_variant = await self.testsets_service.create_testset_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_variant_create=testset_variant_create_request.testset_variant, - ) - - testset_variant_response = TestsetVariantResponse( - count=1 if testset_variant else 0, - testset_variant=testset_variant, - ) - - return testset_variant_response - - async def fetch_testset_variant( - self, request: Request, *, testset_variant_id: UUID - ) -> TestsetVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_variant = await self.testsets_service.fetch_testset_variant( - project_id=UUID(request.state.project_id), - # - testset_variant_ref=Reference(id=testset_variant_id), - ) - - testset_variant_response = TestsetVariantResponse( - count=1 if testset_variant else 0, - testset_variant=testset_variant, - ) - - return testset_variant_response - - async def edit_testset_variant( - self, - request: Request, - *, - testset_variant_id: UUID, - # - testset_variant_edit_request: TestsetVariantEditRequest, - ) -> TestsetVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(testset_variant_id) not in request.state.user_id: - return TestsetVariantResponse() - - testset_variant = await self.testsets_service.edit_testset_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_variant_edit=testset_variant_edit_request.testset_variant, - ) - - testset_variant_response = TestsetVariantResponse( - count=1 if testset_variant else 0, - testset_variant=testset_variant, - ) - - return testset_variant_response - - async def archive_testset_variant( - self, - request: Request, - *, - testset_variant_id: UUID, - ) -> TestsetVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_variant = await self.testsets_service.archive_testset_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_variant_id=testset_variant_id, - ) - - testset_variant_response = TestsetVariantResponse( - count=1 if testset_variant else 0, - testset_variant=testset_variant, - ) - - return testset_variant_response - - async def unarchive_testset_variant( - self, - request: Request, - *, - testset_variant_id: UUID, - ) -> TestsetVariantResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_variant = await self.testsets_service.unarchive_testset_variant( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_variant_id=testset_variant_id, - ) - - testset_variant_response = TestsetVariantResponse( - count=1 if testset_variant else 0, - testset_variant=testset_variant, - ) - - return testset_variant_response - - async def query_testset_variants( - self, - request: Request, - *, - testset_variant_query_request: TestsetVariantQueryRequest, - ) -> TestsetVariantsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_variants = await self.testsets_service.query_variants( - project_id=UUID(request.state.project_id), - # - testset_variant_query=testset_variant_query_request.testset_variant, - # - include_archived=testset_variant_query_request.include_archived, - # - windowing=testset_variant_query_request.windowing, - ) + if str(testset_id) != str(testset_request.testset.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {testset_id} != {testset_request.testset.id}", + ) - testset_variant_response = TestsetVariantsResponse( - count=len(testset_variants), - testset_variants=testset_variants, + testset_artifact_ref = Reference( + id=testset_request.testset.id, ) - return testset_variant_response - - # TESTSET REVISIONS -------------------------------------------------------- - - async def retrieve_testset_revision( - self, - request: Request, - *, - testset_revision_retrieve_request: TestsetRevisionRetrieveRequest, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - cache_key = { - "artifact_ref": testset_revision_retrieve_request.testset_ref, # type: ignore - "variant_ref": testset_revision_retrieve_request.testset_variant_ref, # type: ignore - "revision_ref": testset_revision_retrieve_request.testset_revision_ref, # type: ignore - } - - testset_revision = None - # testset_revision = await get_cache( - # namespace="testsets:retrieve", - # project_id=request.state.project_id, - # user_id=request.state.user_id, - # key=cache_key, - # model=TestsetRevision, - # ) - - if not testset_revision: - testset_revision = await self.testsets_service.fetch_testset_revision( + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.fetch_artifact( project_id=UUID(request.state.project_id), # - testset_ref=testset_revision_retrieve_request.testset_ref, # type: ignore - testset_variant_ref=testset_revision_retrieve_request.testset_variant_ref, # type: ignore - testset_revision_ref=testset_revision_retrieve_request.testset_revision_ref, # type: ignore - ) - - await set_cache( - namespace="testsets:retrieve", - project_id=request.state.project_id, - user_id=request.state.user_id, - key=cache_key, - value=testset_revision, + artifact_ref=testset_artifact_ref, ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def create_testset_revision( - self, - request: Request, - *, - testset_revision_create_request: TestsetRevisionCreateRequest, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revision = await self.testsets_service.create_testset_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_revision_create=testset_revision_create_request.testset_revision, - ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def fetch_testset_revision( - self, - request: Request, - *, - testset_revision_id: UUID, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revision = await self.testsets_service.fetch_testset_revision( - project_id=UUID(request.state.project_id), - # - testset_revision_ref=Reference(id=testset_revision_id), - ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def edit_testset_revision( - self, - request: Request, - *, - testset_revision_id: UUID, - # - testset_revision_edit_request: TestsetRevisionEditRequest, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - if str(testset_revision_id) != str( - testset_revision_edit_request.testset_revision.id - ): - return TestsetRevisionResponse() - - testset_revision = await self.testsets_service.edit_testset_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_revision_edit=testset_revision_edit_request.testset_revision, - ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def archive_testset_revision( - self, - request: Request, - *, - testset_revision_id: UUID, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revision = await self.testsets_service.archive_testset_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_revision_id=testset_revision_id, ) - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def unarchive_testset_revision( - self, - request: Request, - *, - testset_revision_id: UUID, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revision = await self.testsets_service.unarchive_testset_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_revision_id=testset_revision_id, - ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def query_testset_revisions( - self, - request: Request, - *, - testset_revision_query_request: TestsetRevisionQueryRequest, - ) -> TestsetRevisionsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revisions = await self.testsets_service.query_testset_revisions( - project_id=UUID(request.state.project_id), - # - testset_revision_query=testset_revision_query_request.testset_revision, - ) - - testset_revisions_response = TestsetRevisionsResponse( - count=len(testset_revisions), - testset_revisions=testset_revisions, - ) - - return testset_revisions_response - - async def commit_testset_revision( - self, - request: Request, - *, - testset_revision_commit_request: TestsetRevisionCommitRequest, - ) -> TestsetRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revision = await self.testsets_service.commit_testset_revision( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_revision_commit=testset_revision_commit_request.testset_revision_commit, - ) - - testset_revision_response = TestsetRevisionResponse( - count=1 if testset_revision else 0, - testset_revision=testset_revision, - ) - - return testset_revision_response - - async def log_testset_revisions( - self, - request: Request, - *, - testset_log_request: TestsetLogRequest, - ) -> TestsetRevisionsResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_EVALUATORS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - testset_revisions = await self.testsets_service.log_testset_revisions( - project_id=UUID(request.state.project_id), - # - testset_log=testset_log_request.testset, - ) - - testset_revisions_response = TestsetRevisionsResponse( - count=len(testset_revisions), - testset_revisions=testset_revisions, - ) - - return testset_revisions_response - - -class SimpleTestsetsRouter: - TESTCASES_FLAGS = TestsetFlags( - has_testcases=True, - has_traces=False, - ) - - def __init__( - self, - *, - simple_testsets_service: SimpleTestsetsService, - ): - self.simple_testsets_service = simple_testsets_service - - self.router = APIRouter() - - # SIMPLE TESTSETS ------------------------------------------------------ - - # POST /api/preview/simple/testsets/ - self.router.add_api_route( - "/", - self.create_simple_testset, - methods=["POST"], - operation_id="create_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) - - # GET /api/preview/simple/testsets/{testset_id} - self.router.add_api_route( - "/{testset_id}", - self.fetch_simple_testset, - methods=["GET"], - operation_id="fetch_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) - - # PUT /api/preview/simple/testsets/{testset_id} - self.router.add_api_route( - "/{testset_id}", - self.edit_simple_testset, - methods=["PUT"], - operation_id="edit_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) - - # POST /api/preview/simple/testsets/{testset_id}/archive - self.router.add_api_route( - "/{testset_id}/archive", - self.archive_simple_testset, - methods=["POST"], - operation_id="archive_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) - - # POST /api/preview/simple/testsets/{testset_id}/unarchive - self.router.add_api_route( - "/{testset_id}/unarchive", - self.unarchive_simple_testset, - methods=["POST"], - operation_id="unarchive_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) - - # POST /api/preview/simple/testsets/query - self.router.add_api_route( - "/query", - self.query_simple_testsets, - methods=["POST"], - operation_id="query_simple_testsets", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetsResponse, - response_model_exclude_none=True, - ) - - # POST /api/preview/simple/testsets/upload - self.router.add_api_route( - "/upload", - self.create_simple_testset_from_file, - methods=["POST"], - operation_id="create_simple_testset_from_file", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - # POST /api/preview/simple/testsets/{testset_id}/upload - self.router.add_api_route( - "/{testset_id}/upload", - self.edit_simple_testset_from_file, - methods=["POST"], - operation_id="edit_simple_testset_from_file", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.edit_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=testset_request.testset.id, + # + artifact_flags=self.TESTCASES_FLAGS, + artifact_meta=testset_request.testset.meta, + artifact_name=testset_request.testset.name, + artifact_description=testset_request.testset.description, + ) ) - # POST /api/preview/simple/testsets/{testset_id}/download - self.router.add_api_route( - "/{testset_id}/download", - self.fetch_simple_testset_to_file, - methods=["POST"], - operation_id="fetch_simple_testset_to_file", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, - ) + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit testset. Please try again or contact support.", + ) - # POST /api/preview/simple/testsets/{testset_id}/transfer - self.router.add_api_route( - "/{testset_id}/transfer", - self.transfer_simple_testset, - methods=["POST"], - operation_id="transfer_simple_testset", - status_code=status.HTTP_200_OK, - response_model=SimpleTestsetResponse, - response_model_exclude_none=True, + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - # SIMPLE TESTSETS ---------------------------------------------------------- - - @intercept_exceptions() - async def create_simple_testset( - self, - request: Request, - *, - testset_id: Optional[UUID] = None, - # - simple_testset_create_request: SimpleTestsetCreateRequest, - ) -> SimpleTestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - simple_testset = await self.simple_testsets_service.create( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_id=testset_id, - # - simple_testset_create_request=simple_testset_create_request, - ) + if testset_variant is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.edit_variant( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=testset_variant.id, + # + variant_flags=self.TESTCASES_FLAGS, + variant_meta=testset_request.testset.meta, + ) ) - return simple_testset_response - - @intercept_exceptions() - @suppress_exceptions(default=SimpleTestsetResponse()) - async def fetch_simple_testset( - self, - request: Request, - *, - testset_id: UUID, - ) -> SimpleTestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_TESTSETS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + if testset_variant is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit testset. Please try again or contact support.", + ) - testset = await self.simple_testsets_service.testsets_service.fetch_testset( - project_id=UUID(request.state.project_id), - # - testset_ref=Reference(id=testset_id), + testset_variant_ref = Reference( + id=testset_variant.id, ) - if testset is None: - return SimpleTestsetResponse() - - testset_variant = await self.simple_testsets_service.testsets_service.fetch_testset_variant( - project_id=UUID(request.state.project_id), - # - testset_ref=Reference(id=testset.id), + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=testset_variant_ref, + ) ) - if testset_variant is None: - return SimpleTestsetResponse() + if testset_revision is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - testset_revision = await self.simple_testsets_service.testsets_service.fetch_testset_revision( - project_id=UUID(request.state.project_id), - # - testset_variant_ref=Reference(id=testset_variant.id), + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.commit_revision( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + variant_id=testset_variant.id, + # + revision_slug=testset_revision.slug, + # + revision_flags=self.TESTCASES_FLAGS, + revision_meta=testset_request.testset.meta, + revision_data=testset_revision_data, + ) ) if testset_revision is None: - return SimpleTestsetResponse() + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to edit testset. Please try again or contact support.", + ) - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, + testset = Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, # - name=testset.name, - description=testset.description, + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, # - # flags = - tags=testset.tags, - meta=testset.meta, - # - data=testset_revision.data, + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, + testcases=testset_revision.data.testcases, ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, + testset_response = TestsetResponse( + count=1, + testset=testset, ) - return simple_testset_response + return testset_response - @intercept_exceptions() - async def edit_simple_testset( + @handle_exceptions() + async def archive_testset( self, - request: Request, *, - testset_id: UUID, - # - simple_testset_edit_request: SimpleTestsetEditRequest, - ) -> SimpleTestsetResponse: + request: Request, + testset_id: Union[UUID, str], + ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore + permission=Permission.EDIT_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if str(testset_id) != str(simple_testset_edit_request.testset.id): - return SimpleTestsetResponse() - - simple_testset: Optional[ - SimpleTestset - ] = await self.simple_testsets_service.edit( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - simple_testset_edit_request=simple_testset_edit_request, + testset_artifact_ref = Reference( + id=testset_id, ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - return simple_testset_response - - @intercept_exceptions() - async def archive_simple_testset( - self, - request: Request, - *, - testset_id: UUID, - ) -> SimpleTestsetResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - testset = await self.simple_testsets_service.testsets_service.archive_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_id=testset_id, + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.archive_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=testset_id, + ) ) - if not testset: - return SimpleTestsetResponse() + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to archive testset. Please try again or contact support.", + ) - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, + testset = Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, # - name=testset.name, - description=testset.description, + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, # - # flags = - tags=testset.tags, - meta=testset.meta, + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, + testset_response = TestsetResponse( + count=1, + testset=testset, ) - return simple_testset_response + return testset_response - @intercept_exceptions() - async def unarchive_simple_testset( + @handle_exceptions() + async def unarchive_testset( self, - request: Request, *, - testset_id: UUID, - ) -> SimpleTestsetResponse: + request: Request, + testset_id: Union[UUID, str], + ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore + permission=Permission.EDIT_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - testset = await self.simple_testsets_service.testsets_service.unarchive_testset( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - testset_id=testset_id, + testset_artifact_ref = Reference( + id=testset_id, ) - if not testset: - return SimpleTestsetResponse() - - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, - # - name=testset.name, - description=testset.description, - # - # flags = - tags=testset.tags, - meta=testset.meta, + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, - ) + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", + ) - return simple_testset_response + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.unarchive_artifact( + project_id=UUID(request.state.project_id), + user_id=UUID(request.state.user_id), + # + artifact_id=testset_id, + ) + ) - @intercept_exceptions() - @suppress_exceptions(default=SimpleTestsetsResponse()) - async def list_simple_testsets( - self, - request: Request, - ) -> SimpleTestsetsResponse: - simple_testset_query_request = SimpleTestsetQueryRequest() + if testset_artifact is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to unarchive testset. Please try again or contact support.", + ) - return await self.query_simple_testsets( - request=request, + testset = Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, # - simple_testset_query_request=simple_testset_query_request, + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, + # + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, + ) + + testset_response = TestsetResponse( + count=1, + testset=testset, ) - @intercept_exceptions() - @suppress_exceptions(default=SimpleTestsetsResponse()) - async def query_simple_testsets( + return testset_response + + @handle_exceptions() + async def query_testsets( self, - request: Request, *, - simple_testset_query_request: SimpleTestsetQueryRequest, - ) -> SimpleTestsetsResponse: + request: Request, + meta_request: Optional[MetaRequest] = None, + ) -> TestsetsResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_TESTSETS, # type: ignore + permission=Permission.VIEW_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - testsets = await self.simple_testsets_service.testsets_service.query_testsets( - project_id=UUID(request.state.project_id), - # - testset_query=simple_testset_query_request.testset, - # - testset_refs=simple_testset_query_request.testset_refs, - # - include_archived=simple_testset_query_request.include_archived, - # - windowing=simple_testset_query_request.windowing, - ) + testsets: List[Testset] = [] - simple_testsets: List[SimpleTestset] = [] + meta = meta_request.meta if meta_request else None - for testset in testsets: - testset_variant = await self.simple_testsets_service.testsets_service.fetch_testset_variant( + testset_artifacts: List[TestsetArtifact] = ( + await self.testsets_service.query_artifacts( project_id=UUID(request.state.project_id), # - testset_ref=Reference(id=testset.id), + artifact_flags=self.TESTCASES_FLAGS, + artifact_meta=meta, + ) + ) + + if testset_artifacts is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail="Failed to query testsets. Please try again or contact support.", + ) + + for testset_artifact in testset_artifacts: + testset_artifact_ref = Reference( + id=testset_artifact.id, + ) + + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - if not testset_variant: + if testset_variant is None: continue - testset_revision = await self.simple_testsets_service.testsets_service.fetch_testset_revision( - project_id=UUID(request.state.project_id), - # - testset_variant_ref=Reference(id=testset_variant.id), + testset_variant_ref = Reference( + id=testset_variant.id, + ) + + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=testset_variant_ref, + ) ) if testset_revision is None: continue - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, - # - name=testset.name, - description=testset.description, - # - # flags = - tags=testset.tags, - meta=testset.meta, - # - data=testset_revision.data, + testsets.append( + Testset( + id=testset_artifact.id, + slug=testset_artifact.slug, + # + created_at=testset_artifact.created_at, + updated_at=testset_artifact.updated_at, + deleted_at=testset_artifact.deleted_at, + created_by_id=testset_artifact.created_by_id, + updated_by_id=testset_artifact.updated_by_id, + deleted_by_id=testset_artifact.deleted_by_id, + # + meta=testset_artifact.meta, + name=testset_artifact.name, + description=testset_artifact.description, + testcases=testset_revision.data.testcases, + ) ) - simple_testsets.append(simple_testset) - - simple_testsets_response = SimpleTestsetsResponse( - count=len(simple_testsets), - testsets=simple_testsets, + testsets_response = TestsetsResponse( + count=len(testsets), + testsets=testsets, ) - return simple_testsets_response + return testsets_response - @intercept_exceptions() - async def create_simple_testset_from_file( + @handle_exceptions() + async def create_testset_from_file( self, - request: Request, *, + request: Request, file: UploadFile = File(...), - file_type: Literal["csv", "json"] = Form("csv"), + file_type: Literal["CSV", "JSON"] = Form(None), testset_slug: Optional[str] = Form(None), testset_name: Optional[str] = File(None), testset_description: Optional[str] = Form(None), - testset_tags: Optional[str] = Form(None), - testset_meta: Optional[str] = Form(None), - ) -> SimpleTestsetResponse: + testset_meta: Optional[List[str]] = Form(None), + ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore + permission=Permission.EDIT_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if file_type is None or file_type not in ["csv", "json"]: + if file_type is None or file_type not in ["CSV", "JSON"]: raise HTTPException( status_code=400, - detail="Invalid file type. Supported types are 'csv' and 'json'.", + detail="Invalid file type. Supported types are 'CSV' and 'JSON'.", ) - if (file.size or 0) > TESTSETS_SIZE_LIMIT: # Preemptively check file size + if file.size > TESTSETS_SIZE_LIMIT: # Preemptively check file size raise TESTSETS_SIZE_EXCEPTION - # deserialize tags and meta if provided - try: - _testset_tags = loads(testset_tags) if testset_tags else None - _testset_meta = loads(testset_meta) if testset_meta else None - except JSONDecodeError as e: - log.error(e) - raise HTTPException( - status_code=400, - detail=f"Failed to parse tags or meta as JSON: {e}", - ) from e - testcases = [] - testcases_data = {} - if file_type.lower() == "json": + if file_type == "JSON": try: - testcases_data = await json_file_to_json_array(file) + testcases = json_file_to_json_array(file) except Exception as e: raise HTTPException( @@ -1493,9 +889,9 @@ async def create_simple_testset_from_file( detail=f"Failed to read JSON file: {e}", ) from e - elif file_type.lower() == "csv": + elif file_type == "CSV": try: - testcases_data = await csv_file_to_json_array(file) + testcases = csv_file_to_json_array(file) except Exception as e: raise HTTPException( @@ -1504,121 +900,58 @@ async def create_simple_testset_from_file( ) from e else: - log.error(e) raise HTTPException( status_code=400, detail="Invalid file type. Supported types are 'csv' and 'json'.", ) - try: - testcases_data = json_array_to_json_object( - data=testcases_data, - testcase_id_key="__id__", - testcase_dedup_id_key="__dedup_id__", - ) - - validate_testset_limits(testcases_data) - - for testcase_data in testcases_data.values(): - testcase_flags = testcase_data.pop("__flags__", None) - testcase_tags = testcase_data.pop("__tags__", None) - testcase_meta = testcase_data.pop("__meta__", None) - - testcases.append( - Testcase( - id=testcase_data.pop("__id__", None), - data=testcase_data, - flags=testcase_flags, - tags=testcase_tags, - meta=testcase_meta, - ) - ) - - except Exception as e: - log.error(e) - raise HTTPException( - status_code=400, - detail=f"Failed to parse testcases as JSON array: {e}", - ) from e - - try: - testset_revision_data = TestsetRevisionData( - testcases=testcases, - ) - - except ValidationError as e: - log.error(e) - raise HTTPException( - status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, - ) from e - - simple_testset_create_request = SimpleTestsetCreateRequest( - testset=SimpleTestsetCreate( - slug=testset_slug or uuid4().hex[-12:], + testset_request = TestsetRequest( + testset=Testset( + slug=testset_slug, # - name=testset_name or testset_slug or None, + meta=testset_meta, + name=testset_name, description=testset_description, - # - # flags = - tags=_testset_tags, - meta=_testset_meta, - # - data=testset_revision_data, + testcases=testcases, ) ) - return await self.create_simple_testset( + return await self.create_testset( request=request, - simple_testset_create_request=simple_testset_create_request, + testset_request=testset_request, ) - @intercept_exceptions() - async def edit_simple_testset_from_file( + @handle_exceptions() + async def update_testset_from_file( self, - request: Request, *, - testset_id: UUID, - # + request: Request, + testset_id: Union[UUID, str], file: UploadFile = File(...), - file_type: Literal["csv", "json"] = Form("csv"), - testset_name: Optional[str] = File(None), - testset_description: Optional[str] = Form(None), - testset_tags: Optional[str] = Form(None), - testset_meta: Optional[str] = Form(None), - ) -> SimpleTestsetResponse: + file_type: Literal["CSV", "JSON"] = Form(None), + ) -> TestsetResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore + permission=Permission.EDIT_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if file_type is None or file_type not in ["csv", "json"]: + if file_type is None or file_type not in ["CSV", "JSON"]: raise HTTPException( status_code=400, detail="Invalid file type. Supported types are 'CSV' and 'JSON'.", ) - if (file.size or 0) > TESTSETS_SIZE_LIMIT: # Preemptively check file size + if file.size > TESTSETS_SIZE_LIMIT: # Preemptively check file size raise TESTSETS_SIZE_EXCEPTION - # deserialize tags and meta if provided - try: - _testset_tags = loads(testset_tags) if testset_tags else None - _testset_meta = loads(testset_meta) if testset_meta else None - except JSONDecodeError as e: - raise HTTPException( - status_code=400, - detail=f"Failed to parse tags or meta as JSON: {e}", - ) from e - testcases = [] - testcases_data = {} - if file_type.lower() == "json": + if file_type == "JSON": try: - testcases_data = await json_file_to_json_array(json_file=file) + testcases = json_file_to_json_array(file) except Exception as e: raise HTTPException( @@ -1626,9 +959,9 @@ async def edit_simple_testset_from_file( detail=f"Failed to read JSON file: {e}", ) from e - elif file_type.lower() == "csv": + elif file_type == "CSV": try: - testcases_data = await csv_file_to_json_array(csv_file=file) + testcases = csv_file_to_json_array(file) except Exception as e: raise HTTPException( @@ -1642,185 +975,163 @@ async def edit_simple_testset_from_file( detail="Invalid file type. Supported types are 'csv' and 'json'.", ) - try: - testcases_data = json_array_to_json_object( - data=testcases_data, - testcase_id_key="__id__", - testcase_dedup_id_key="__dedup_id__", - ) - - validate_testset_limits(testcases_data) - - for testcase_data in testcases_data.values(): - testcase_flags = testcase_data.pop("__flags__", None) - testcase_tags = testcase_data.pop("__tags__", None) - testcase_meta = testcase_data.pop("__meta__", None) - - testcases.append( - Testcase( - id=testcase_data.pop("__id__", None), - data=testcase_data, - flags=testcase_flags, - tags=testcase_tags, - meta=testcase_meta, - ) - ) - - except Exception as e: - raise HTTPException( - status_code=400, - detail=f"Failed to parse testcases as JSON array: {e}", - ) from e - - try: - testset_revision_data = TestsetRevisionData( - testcases=testcases, - ) - - except ValidationError as e: - raise HTTPException( - status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, - ) from e - - simple_testset_response = await self.fetch_simple_testset( + testset_response = await self.fetch_testset( request=request, testset_id=testset_id, ) - if simple_testset_response.testset is None: + if testset_response.testset is None: raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail="Testset not found. Please check the testset_id and try again.", ) - simple_testset_edit_request = SimpleTestsetEditRequest( - testset=SimpleTestsetEdit( + testset_request = TestsetRequest( + testset=Testset( id=testset_id, # - name=testset_name or simple_testset_response.testset.name, - description=testset_description - or simple_testset_response.testset.description, - # - # flags = - tags=_testset_tags or simple_testset_response.testset.tags, - meta=_testset_meta or simple_testset_response.testset.meta, - # - data=testset_revision_data, + meta=testset_response.testset.meta, + name=testset_response.testset.name, + description=testset_response.testset.description, + testcases=testcases, ) ) - return await self.edit_simple_testset( + return await self.edit_testset( request=request, - # testset_id=testset_id, - # - simple_testset_edit_request=simple_testset_edit_request, + testset_request=testset_request, ) - @intercept_exceptions() - async def fetch_simple_testset_to_file( + @handle_exceptions() + async def fetch_testset_to_file( self, - request: Request, *, - testset_id: UUID, - # - file_type: Optional[Literal["csv", "json"]] = None, - file_name: Optional[str] = None, - ) -> StreamingResponse: # type: ignore + request: Request, + testset_id: Union[UUID, str], + file_type: Literal["CSV", "JSON"] = Query(None), + ) -> ...: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_TESTSETS, # type: ignore + permission=Permission.VIEW_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if file_type is None or file_type not in ["csv", "json"]: + if file_type is None or file_type not in ["CSV", "JSON"]: raise HTTPException( status_code=400, - detail="Invalid file type. Supported types are 'csv' and 'json'.", + detail="Invalid file type. Supported types are 'CSV' and 'JSON'.", ) - simple_testset_response = await self.fetch_simple_testset( - request=request, - # - testset_id=testset_id, + testset_artifact_ref = Reference( + id=testset_id, + ) + + testset_artifact: Optional[TestsetArtifact] = ( + await self.testsets_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, + ) ) - if not simple_testset_response.count and not simple_testset_response.testset: + if testset_artifact is None: raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, - detail="Simple testset not found. Please check the testset_id and try again.", + detail="Basic testset not found. Please check the ID and try again.", + ) + + testset_variant: Optional[TestsetVariant] = ( + await self.testsets_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=testset_artifact_ref, ) + ) - testset = simple_testset_response.testset - - filename = (file_name or f"testset_{testset_id}") + f".{file_type.lower()}" - testcases = testset.data.testcases - - testcases_data = [ - { - **testcase.data, - "__id__": testcase.id, - "__flags__": testcase.flags, - "__tags__": testcase.tags, - "__meta__": testcase.meta, - } - for testcase in testcases or [] - ] - - if file_type.lower() == "json": - buffer = BytesIO(orjson.dumps(testcases_data)) - - return StreamingResponse( - buffer, - media_type="application/json", - headers={"Content-Disposition": f"attachment; filename={filename}"}, + if testset_variant is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", ) - elif file_type.lower() == "csv": - buffer = BytesIO() - pd.DataFrame(testcases_data).to_csv(buffer, index=False) - buffer.seek(0) + testset_variant_ref = Reference( + id=testset_variant.id, + ) - return StreamingResponse( - buffer, - media_type="text/csv", - headers={"Content-Disposition": f"attachment; filename={filename}"}, + testset_revision: Optional[TestsetRevision] = ( + await self.testsets_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=testset_variant_ref, ) + ) - else: + if testset_revision is None: raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Invalid file type. Supported types are 'csv' and 'json'.", + status_code=status.HTTP_404_NOT_FOUND, + detail="Basic testset not found. Please check the ID and try again.", ) - @intercept_exceptions() - @suppress_exceptions(default=SimpleTestsetResponse()) - async def transfer_simple_testset( + filename = f"testset_{testset_id}.{file_type.lower()}" + testcases = testset_revision.data.testcases + + with TemporaryDirectory() as tmpdir: + output_path = os_path.join(tmpdir, filename) + + if file_type == "JSON": + json_array_to_json_file(output_path, testcases) + + return FileResponse( + output_path, + media_type="application/json", + filename=filename, + ) + + elif file_type == "CSV": + json_array_to_csv_file(testcases, output_path) + + return FileResponse( + output_path, + media_type="text/csv", + filename=filename, + ) + + else: + raise HTTPException(status_code=400, detail="Invalid file type.") + + @handle_exceptions() + async def fetch_testcase( self, - request: Request, *, - testset_id: UUID, - ) -> SimpleTestsetResponse: + request: Request, + testcase_id: UUID, + ) -> TestcaseResponse: if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_TESTSETS, # type: ignore + permission=Permission.VIEW_TESTSETS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - simple_testset = await self.simple_testsets_service.transfer( + testcases = await self.testsets_service.load_testcases( project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), # - testset_id=testset_id, + testcase_ids=[testcase_id], ) - simple_testset_response = SimpleTestsetResponse( - count=1 if simple_testset else 0, - testset=simple_testset, + testcase_response = TestcaseResponse( + count=0, + testcase=None, ) - return simple_testset_response + if testcases is not None: + testcase_response = TestcaseResponse( + count=len(testcases), + testcase=testcases[0] if len(testcases) > 0 else None, + ) + + return testcase_response diff --git a/api/oss/src/apis/fastapi/testsets/utils.py b/api/oss/src/apis/fastapi/testsets/utils.py index 46c77b0d80..a2aba74930 100644 --- a/api/oss/src/apis/fastapi/testsets/utils.py +++ b/api/oss/src/apis/fastapi/testsets/utils.py @@ -1,698 +1,374 @@ -from typing import Optional, Literal, List -from uuid import UUID -from datetime import datetime +from typing import Optional, List, Dict, Any +from json import loads, dumps +from uuid import UUID, uuid4 + +import orjson +import dask -from fastapi import Query +from fastapi import Query, HTTPException from oss.src.utils.logging import get_module_logger +from oss.src.core.shared.dtos import Reference, Tags +from oss.src.core.testsets.dtos import TestsetFlags, TestsetQuery + + +log = get_module_logger(__name__) -from oss.src.core.shared.dtos import ( - Windowing, - Reference, -) -from oss.src.core.testsets.dtos import ( - TestsetFlags, - # - TestsetQuery, - TestsetVariantQuery, - TestsetRevisionQuery, -) -from oss.src.apis.fastapi.shared.utils import ( - parse_metadata, +TESTSETS_COUNT_LIMIT = 10 * 1_000 # 10,000 testcases per testset +TESTSETS_SIZE_LIMIT = 10 * 1024 * 1024 # 10 MB per testset + +TESTSETS_COUNT_WARNING = f"Test set exceeds the maximum count of {TESTSETS_COUNT_LIMIT} test cases per test set." +TESTSETS_SIZE_WARNING = f"Test set exceeds the maximum size of {TESTSETS_SIZE_LIMIT // (1024 * 1024)} MB per test set." + +TESTSETS_SIZE_EXCEPTION = HTTPException( + status_code=400, + detail=TESTSETS_SIZE_WARNING, ) -from oss.src.apis.fastapi.testsets.models import ( - TestsetQueryRequest, - TestsetVariantQueryRequest, - TestsetRevisionQueryRequest, - TestsetRevisionRetrieveRequest, + +TESTSETS_COUNT_EXCEPTION = HTTPException( + status_code=400, + detail=TESTSETS_COUNT_WARNING, ) -log = get_module_logger(__name__) +def validate_testset_limits(rows: List[dict]) -> tuple[int, int]: + total_size = 2 + for i, row in enumerate(rows): + row_str = dumps(row) + total_size += len(row_str.encode("utf-8")) + + if i > 0: + total_size += 1 + if i + 1 > TESTSETS_COUNT_LIMIT: + log.error(TESTSETS_COUNT_WARNING) + raise TESTSETS_COUNT_EXCEPTION -def parse_testset_query_request_from_params( - testset_id: Optional[UUID] = Query(None), - testset_ids: Optional[List[UUID]] = Query(None), - testset_slug: Optional[str] = Query(None), - testset_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # + if total_size > TESTSETS_SIZE_LIMIT: + log.error(TESTSETS_SIZE_WARNING) + raise TESTSETS_SIZE_EXCEPTION + + return i + 1, total_size + + +def format_validation_error(e, request_body=None): + formatted_errors = [] + + for error in e.errors(): + loc = error.get("loc", []) + + if not loc or loc[0] != "body": + loc = ["body"] + list(loc) + + error_detail = { + "type": error.get("type", "value_error"), + "loc": loc, + "msg": error.get("msg", "Validation error"), + } + + if "input" in error: + error_detail["input"] = error.get("input") + elif request_body is not None: + error_detail["input"] = request_body + + formatted_errors.append(error_detail) + + return formatted_errors + + +def parse_testset_query_request( + testset_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + testset_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), + testset_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> TestsetQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = TestsetFlags(**_flags) if _flags else None # type: ignore - - testset = ( - TestsetQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) +) -> TestsetQuery: + if testset_ref: + try: + testset_ref = Reference(**loads(testset_ref)) + except Exception: # pylint: disable=broad-except + testset_ref = None - testset_refs = ( - ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - ] - if testset_id or testset_slug - else [] - ) - + ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - for testset_id, testset_slug in zip( - testset_ids, - testset_slugs, - ) - ] - if testset_ids and testset_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) + log.error("Failed to parse testset_ref (%s)", testset_ref) + + if testset_flags: + try: + testset_flags = TestsetFlags(**loads(testset_flags)) + except Exception: # pylint: disable=broad-except + testset_flags = None + + log.error("Failed to parse testset_flags (%s)", testset_flags) + + if testset_meta: + try: + testset_meta = loads(testset_meta) + except Exception: # pylint: disable=broad-except + testset_meta = None - return parse_testset_query_request_from_body( - testset=testset, + log.error(f"Failed to parse testset_meta ({testset_meta})") + + return parse_testset_body_request( + testset_ref=testset_ref, # - testset_refs=testset_refs, + testset_flags=testset_flags, + testset_meta=testset_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_testset_query_request_from_body( - testset: Optional[TestsetQuery] = None, +def parse_testset_body_request( + testset_ref: Optional[Reference] = None, # - testset_refs: Optional[List[Reference]] = None, + testset_flags: Optional[TestsetFlags] = None, + testset_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> TestsetQueryRequest: - testset_query_request = None +) -> TestsetQuery: + _query = None try: - testset_query_request = TestsetQueryRequest( - testset=testset, + _query = TestsetQuery( + testset_ref=testset_ref, # - testset_refs=testset_refs, + flags=testset_flags, + meta=testset_meta, # include_archived=include_archived, - # - windowing=windowing, ) except Exception as e: # pylint: disable=broad-except - testset_query_request = TestsetQueryRequest() - - return testset_query_request - + log.warn("Error parsing testset body request: %s", e) + + _query = None + + return _query + + +def parse_variant_query_request( + testset_ref: Optional[str] = Query( + None, + description='JSON string of reference, e.g. {"key": value}', + ), + variant_ref: Optional[str] = Query( + None, + description='JSON string of reference, e.g. {"key": value}', + ), + variant_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), + variant_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), + include_archived: Optional[bool] = Query(None), +) -> TestsetQuery: + if testset_ref: + try: + testset_ref = Reference(**loads(testset_ref)) + except Exception: # pylint: disable=broad-except + testset_ref = None -def merge_testset_query_requests( - query_request_params: Optional[TestsetQueryRequest] = None, - query_request_body: Optional[TestsetQueryRequest] = None, -) -> TestsetQueryRequest: - if query_request_params and not query_request_body: - return query_request_params + log.error("Failed to parse testset_ref (%s)", testset_ref) - if not query_request_params and query_request_body: - return query_request_body + if variant_ref: + try: + variant_ref = Reference(**loads(variant_ref)) + except Exception: # pylint: disable=broad-except + variant_ref = None - if query_request_params and query_request_body: - return TestsetQueryRequest( - testset=query_request_body.testset or query_request_params.testset, - # - testset_refs=query_request_body.testset_refs - or query_request_params.testset_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) + log.error("Failed to parse variant_ref (%s)", variant_ref) - return TestsetQueryRequest() + if variant_flags: + try: + variant_flags = TestsetFlags(**loads(variant_flags)) + except Exception: # pylint: disable=broad-except + variant_flags = None + log.error("Failed to parse variant_flags (%s)", variant_flags) -def parse_testset_variant_query_request_from_params( - testset_id: Optional[UUID] = Query(None), - testset_ids: Optional[List[UUID]] = Query(None), - testset_slug: Optional[str] = Query(None), - testset_slugs: Optional[List[str]] = Query(None), - # - testset_variant_id: Optional[UUID] = Query(None), - testset_variant_ids: Optional[List[UUID]] = Query(None), - testset_variant_slug: Optional[str] = Query(None), - testset_variant_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> TestsetVariantQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = TestsetFlags(**_flags) if _flags else None # type: ignore - - testset_variant = ( - TestsetVariantQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) + if variant_meta: + try: + variant_meta = loads(variant_meta) + except Exception: # pylint: disable=broad-except + variant_meta = None - testset_refs = ( - ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - ] - if testset_id or testset_slug - else [] - ) - + ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - for testset_id, testset_slug in zip( - testset_ids, - testset_slugs, - ) - ] - if testset_ids and testset_slugs - else [] - ) - ) or None - - testset_variant_refs = ( - ( - [ - Reference( - id=testset_variant_id, - slug=testset_variant_slug, - ) - ] - if testset_variant_id or testset_variant_slug - else [] - ) - + ( - [ - Reference( - id=testset_variant_id, - slug=testset_variant_slug, - ) - for testset_variant_id, testset_variant_slug in zip( - testset_variant_ids, - testset_variant_slugs, - ) - ] - if testset_variant_ids and testset_variant_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) + log.error(f"Failed to parse variant_meta ({variant_meta})") - return parse_testset_variant_query_request_from_body( - testset_variant=testset_variant, + return parse_variant_body_request( + testset_ref=testset_ref, + variant_ref=variant_ref, # - testset_refs=testset_refs or None, - testset_variant_refs=testset_variant_refs or None, + variant_flags=variant_flags, + variant_meta=variant_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_testset_variant_query_request_from_body( - testset_variant: Optional[TestsetVariantQuery] = None, +def parse_variant_body_request( + testset_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, # - testset_refs: Optional[List[Reference]] = None, - testset_variant_refs: Optional[List[Reference]] = None, + variant_flags: Optional[TestsetFlags] = None, + variant_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> TestsetVariantQueryRequest: - testset_variant_query_request = None +) -> TestsetQuery: + _query = None try: - testset_variant_query_request = TestsetVariantQueryRequest( - testset_variant=testset_variant, + _query = TestsetQuery( + artifact_ref=testset_ref, + variant_ref=variant_ref, # - testset_refs=testset_refs, - testset_variant_refs=testset_variant_refs, + flags=variant_flags, + meta=variant_meta, # include_archived=include_archived, - # - windowing=windowing, ) except Exception as e: # pylint: disable=broad-except - testset_variant_query_request = TestsetVariantQueryRequest() - - return testset_variant_query_request - - -def merge_testset_variant_query_requests( - query_request_params: Optional[TestsetVariantQueryRequest] = None, - query_request_body: Optional[TestsetVariantQueryRequest] = None, -) -> TestsetVariantQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return TestsetVariantQueryRequest( - testset_variant=query_request_body.testset_variant - or query_request_params.testset_variant, - # - testset_refs=query_request_body.testset_refs - or query_request_params.testset_refs, - testset_variant_refs=query_request_body.testset_variant_refs - or query_request_params.testset_variant_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) + log.warn("Error parsing variant body request: %s", e) + + _query = None + + return _query + + +def parse_revision_query_request( + variant_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + revision_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + revision_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), + revision_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), + include_archived: Optional[bool] = Query(None), +) -> TestsetQuery: + if variant_ref: + try: + variant_ref = Reference(**loads(variant_ref)) + except Exception: # pylint: disable=broad-except + variant_ref = None - return TestsetVariantQueryRequest() + log.error("Failed to parse variant_ref (%s)", variant_ref) + if revision_ref: + try: + revision_ref = Reference(**loads(revision_ref)) + except Exception: # pylint: disable=broad-except + revision_ref = None -def parse_testset_revision_query_request_from_params( - testset_id: Optional[UUID] = Query(None), - testset_ids: Optional[List[UUID]] = Query(None), - testset_slug: Optional[str] = Query(None), - testset_slugs: Optional[List[str]] = Query(None), - # - testset_variant_id: Optional[UUID] = Query(None), - testset_variant_ids: Optional[List[UUID]] = Query(None), - testset_variant_slug: Optional[str] = Query(None), - testset_variant_slugs: Optional[List[str]] = Query(None), - # - testset_revision_id: Optional[UUID] = Query(None), - testset_revision_ids: Optional[List[UUID]] = Query(None), - testset_revision_slug: Optional[str] = Query(None), - testset_revision_slugs: Optional[List[str]] = Query(None), - testset_revision_version: Optional[str] = Query(None), - testset_revision_versions: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> TestsetRevisionQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = TestsetFlags(**_flags) if _flags else None # type: ignore - - testset_revision = ( - TestsetRevisionQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) + log.error("Failed to parse revision_ref (%s)", revision_ref) - testset_refs = ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - ] - if testset_id or testset_slug - else [] - ) + ( - [ - Reference( - id=testset_id, - slug=testset_slug, - ) - for testset_id, testset_slug in zip( - testset_ids, - testset_slugs, - ) - ] - if testset_ids and testset_slugs - else [] - ) + if revision_flags: + try: + revision_flags = TestsetFlags(**loads(revision_flags)) + except Exception: # pylint: disable=broad-except + revision_flags = None - testset_variant_refs = ( - [ - Reference( - id=testset_variant_id, - slug=testset_variant_slug, - ) - ] - if testset_variant_id or testset_variant_slug - else [] - ) + ( - [ - Reference( - id=testset_variant_id, - slug=testset_variant_slug, - ) - for testset_variant_id, testset_variant_slug in zip( - testset_variant_ids, - testset_variant_slugs, - ) - ] - if testset_variant_ids and testset_variant_slugs - else [] - ) + log.error("Failed to parse revision_flags (%s)", revision_flags) - testset_revision_refs = ( - [ - Reference( - id=testset_revision_id, - slug=testset_revision_slug, - version=testset_revision_version, - ) - ] - if testset_revision_id or testset_revision_slug or testset_revision_version - else [] - ) + ( - [ - Reference( - id=testset_revision_id, - slug=testset_revision_slug, - version=testset_revision_version, - ) - for testset_revision_id, testset_revision_slug, testset_revision_version in zip( - testset_revision_ids, - testset_revision_slugs, - testset_revision_versions, - ) - ] - if testset_revision_ids and testset_revision_slugs and testset_revision_versions - else [] - ) + if revision_meta: + try: + revision_meta = loads(revision_meta) + except Exception: # pylint: disable=broad-except + revision_meta = None - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) + log.error(f"Failed to parse revision_meta ({revision_meta})") - return parse_testset_revision_query_request_from_body( - testset_revision=testset_revision, + return parse_revision_body_request( + variant_ref=variant_ref, + revision_ref=revision_ref, # - testset_refs=testset_refs, - testset_variant_refs=testset_variant_refs, - testset_revision_refs=testset_revision_refs, + revision_flags=revision_flags, + revision_meta=revision_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_testset_revision_query_request_from_body( - testset_revision: Optional[TestsetRevisionQuery] = None, +def parse_revision_body_request( + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, # - testset_refs: Optional[List[Reference]] = None, - testset_variant_refs: Optional[List[Reference]] = None, - testset_revision_refs: Optional[List[Reference]] = None, + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> TestsetRevisionQueryRequest: - testset_revision_query_request = None +) -> TestsetQuery: + _query = None try: - testset_revision_query_request = TestsetRevisionQueryRequest( - testset_revision=testset_revision, + _query = TestsetQuery( + variant_ref=variant_ref, + revision_ref=revision_ref, # - testset_refs=testset_refs, - testset_variant_refs=testset_variant_refs, - testset_revision_refs=testset_revision_refs, + flags=revision_flags, + meta=revision_meta, # include_archived=include_archived, - # - windowing=windowing, ) - except Exception as e: # pylint: disable=broad-except log.warn(e) - testset_revision_query_request = TestsetRevisionQueryRequest() - - return testset_revision_query_request - - -def merge_testset_revision_query_requests( - query_request_params: Optional[TestsetRevisionQueryRequest] = None, - query_request_body: Optional[TestsetRevisionQueryRequest] = None, -) -> TestsetRevisionQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return TestsetRevisionQueryRequest( - testset_revision=query_request_body.testset_revision - or query_request_params.testset_revision, - # - testset_refs=query_request_body.testset_refs - or query_request_params.testset_refs, - testset_variant_refs=query_request_body.testset_variant_refs - or query_request_params.testset_variant_refs, - testset_revision_refs=query_request_body.testset_revision_refs - or query_request_params.testset_revision_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return TestsetRevisionQueryRequest() - + _query = None -def parse_testset_revision_retrieve_request_from_params( - testset_id: Optional[UUID] = Query(None), - testset_slug: Optional[str] = Query(None), - # - testset_variant_id: Optional[UUID] = Query(None), - testset_variant_slug: Optional[str] = Query(None), - # - testset_revision_id: Optional[UUID] = Query(None), - testset_revision_slug: Optional[str] = Query(None), - testset_revision_version: Optional[str] = Query(None), -): - testset_ref = ( - Reference( - id=testset_id, - slug=testset_slug, - ) - if testset_id or testset_slug - else None - ) - - testset_variant_ref = ( - Reference( - id=testset_variant_id, - slug=testset_variant_slug, - ) - if testset_variant_id or testset_variant_slug - else None - ) + return _query - testset_revision_ref = ( - Reference( - id=testset_revision_id, - slug=testset_revision_slug, - version=testset_revision_version, - ) - if testset_revision_id or testset_revision_slug or testset_revision_version - else None - ) - return parse_testset_revision_retrieve_request_from_body( - testset_ref=testset_ref, - testset_variant_ref=testset_variant_ref, - testset_revision_ref=testset_revision_ref, - ) +def merge_requests( + query_param: Optional[TestsetQuery] = None, + query_body: Optional[TestsetQuery] = None, +) -> TestsetQuery: + if query_body is None: + return query_param + if query_param is None: + return query_body -def parse_testset_revision_retrieve_request_from_body( - testset_ref: Optional[Reference] = None, - testset_variant_ref: Optional[Reference] = None, - testset_revision_ref: Optional[Reference] = None, -) -> TestsetRevisionRetrieveRequest: - return TestsetRevisionRetrieveRequest( - testset_ref=testset_ref, - testset_variant_ref=testset_variant_ref, - testset_revision_ref=testset_revision_ref, + return TestsetQuery( + artifact_ref=query_body.artifact_ref or query_param.artifact_ref, + variant_ref=query_body.variant_ref or query_param.variant_ref, + revision_ref=query_body.revision_ref or query_param.revision_ref, + # + flags=query_body.flags or query_param.flags, + meta=query_body.meta or query_param.meta, + # + include_archived=query_body.include_archived or query_param.include_archived, ) -# ---------------------------------------------------------------------------- # - -from typing import Dict, Any -from uuid import uuid4 -from json import loads, dumps -from io import BytesIO -from hashlib import blake2b as digest - -import orjson -import pandas - -from fastapi import HTTPException - -from oss.src.core.blobs.utils import compute_blob_id - - -TESTSETS_COUNT_LIMIT = 10 * 1_000 # 10,000 testcases per testset -TESTSETS_SIZE_LIMIT = 10 * 1024 * 1024 # 10 MB per testset - -TESTSETS_COUNT_WARNING = f"Testset exceeds the maximum count of {TESTSETS_COUNT_LIMIT} testcases per testset." -TESTSETS_SIZE_WARNING = f"Testset exceeds the maximum size of {TESTSETS_SIZE_LIMIT // (1024 * 1024)} MB per testset." - -TESTSETS_SIZE_EXCEPTION = HTTPException( - status_code=400, - detail=TESTSETS_SIZE_WARNING, -) - -TESTSETS_COUNT_EXCEPTION = HTTPException( - status_code=400, - detail=TESTSETS_COUNT_WARNING, -) - - -def validate_testset_limits(rows: List[dict]) -> tuple[int, int]: - i = -1 - total_size = 2 - for i, row in enumerate(rows): - row_str = dumps(row) - total_size += len(row_str.encode("utf-8")) - if i > 0: - total_size += 1 - if i + 1 > TESTSETS_COUNT_LIMIT: - log.error(TESTSETS_COUNT_WARNING) - raise TESTSETS_COUNT_EXCEPTION - if total_size > TESTSETS_SIZE_LIMIT: - log.error(TESTSETS_SIZE_WARNING) - raise TESTSETS_SIZE_EXCEPTION - return i + 1, total_size - - -def to_uuid(id, data): +def to_uuid(value): """Ensure value is a valid UUID; generate a new one if missing/invalid.""" try: - return str(UUID(str(id))) # Convert valid UUID to string + return str(UUID(str(value))) # Convert valid UUID to string except ValueError: - return str(compute_blob_id(blob_data=data)) + return str(uuid4()) # Generate a new UUID -async def json_file_to_json_array( +def json_file_to_json_array( json_file, ): - """Reads a JSON file from path or UploadFile and returns the parsed data.""" + """Reads a JSON file and returns the parsed data.""" try: - if hasattr(json_file, "read"): # Covers UploadFile or similar - content = await json_file.read() # Read async - return orjson.loads(content) + if isinstance(json_file, str): + with open(json_file, "rb") as f: + return orjson.loads(f.read()) # Efficiently load JSON else: - raise TypeError("Unsupported file type") + return orjson.loads(json_file) except orjson.JSONDecodeError as e: print(f"Error: Invalid JSON format - {e}") raise e @@ -722,7 +398,6 @@ def json_array_to_json_file( def json_array_to_json_object( data, testcase_id_key="testcase_id", - testcase_dedup_id_key="testcase_dedup_id", ): """ Transforms a list of JSON objects into a dictionary using `testcase_id` as key. @@ -742,30 +417,14 @@ def json_array_to_json_object( transformed_data = {} - for testcase_idx, testcase_data in enumerate(data): - if not isinstance(testcase_data, dict): + for obj in data: + if not isinstance(obj, dict): continue # Ignore non-dict entries - testcase_dedup_id = testcase_data.pop(testcase_dedup_id_key, None) - - testcase_id_str = testcase_data.pop(testcase_id_key, None) - - testcase_id = to_uuid(testcase_id_str, testcase_data) - - testcase_dedup_id = ( - testcase_dedup_id - or digest( - f"{testcase_id}:{testcase_idx}".encode(), - digest_size=6, - ).hexdigest() - ) - - if testcase_dedup_id_key is not None: - testcase_data[testcase_dedup_id_key] = testcase_dedup_id - - testcase_id = to_uuid(testcase_id_str, testcase_data) - - transformed_data[testcase_id] = testcase_data + testcase_id = to_uuid( + obj.pop(testcase_id_key, None) + ) # Remove `testcase_id` after extracting it + transformed_data[testcase_id] = obj # Store object without `testcase_id` return transformed_data @@ -795,7 +454,7 @@ def json_object_to_json_array( ] -async def csv_file_to_json_array( +def csv_file_to_json_array( csv_file, column_types=None, ): @@ -811,14 +470,19 @@ async def csv_file_to_json_array( list: A list of dictionaries representing the CSV rows. """ try: - try: - data = await csv_file.read() - df = pandas.read_csv(BytesIO(data), dtype=str) - return df.to_dict(orient="records") - except Exception as e: - print(f"Error: Could not read CSV file - {e}") - raise e + df = dask.dataframe.read_csv( + csv_file, + dtype=str, + ).compute() # Read as string for flexibility + if column_types: + for col, dtype in column_types.items(): + if col in df.columns: + df[col] = df[col].astype(dtype) # Convert column to specified type + + return df.to_dict( + orient="records" + ) # Convert to list of dictionaries (JSON array) except Exception as e: print(f"Error: Could not read CSV file - {e}") raise e @@ -843,7 +507,11 @@ def json_array_to_csv_file( return None try: - df = pandas.DataFrame(json_array) + # Convert JSON array to Dask Bag + bag = dask.bag.from_sequence(json_array) + + # Convert to DataFrame + df = bag.to_dataframe() # Apply type conversion if specified if column_types: @@ -851,8 +519,8 @@ def json_array_to_csv_file( if col in df.columns: df[col] = df[col].astype(dtype) - # Write directly to CSV using Pandas - df.to_csv(output_csv_file, index=False) + # Write directly to CSV using Dask + df.to_csv(output_csv_file, index=False, single_file=True) except Exception as e: print(f"Error: Could not convert JSON array to CSV file - {e}") @@ -860,8 +528,7 @@ def json_array_to_csv_file( def csv_data_to_json_array( - csv_data: List[Dict[str, Any]], - column_types: Dict[str, type] = {}, + csv_data: List[Dict[str, Any]], column_types: Dict[str, type] = None ) -> List[Dict[str, Any]]: """ Converts CSV-like data (list of dictionaries) into a JSON array, preserving JSON types if specified. @@ -877,7 +544,7 @@ def csv_data_to_json_array( isinstance(row, dict) for row in csv_data ): print("Error: Expected a list of dictionaries (CSV-like structure).") - return [] + return None # Convert column types if specified if column_types: diff --git a/api/oss/src/apis/fastapi/tracing/models.py b/api/oss/src/apis/fastapi/tracing/models.py index a5b4f3f0b5..e396961770 100644 --- a/api/oss/src/apis/fastapi/tracing/models.py +++ b/api/oss/src/apis/fastapi/tracing/models.py @@ -1,17 +1,15 @@ -from typing import Optional, List +from typing import Optional +from datetime import datetime from pydantic import BaseModel +from oss.src.apis.fastapi.shared.models import VersionedModel from oss.src.core.tracing.dtos import ( OTelLink, # needed for annotations at the moment OTelLinks, OTelFlatSpan, # needed for annotations at the moment OTelFlatSpans, OTelTraceTree, - Bucket, - MetricsBucket, - TracingQuery, - MetricSpec, ) @@ -20,25 +18,14 @@ class OTelTracingRequest(BaseModel): traces: Optional[OTelTraceTree] = None -class OTelLinksResponse(BaseModel): - count: int = 0 +class OTelLinksResponse(VersionedModel): + count: int links: Optional[OTelLinks] = None -class OTelTracingResponse(BaseModel): - count: int = 0 +class OTelTracingResponse(VersionedModel): + count: int + oldest: Optional[datetime] = None + newest: Optional[datetime] = None spans: Optional[OTelFlatSpans] = None traces: Optional[OTelTraceTree] = None - - -class OldAnalyticsResponse(BaseModel): - count: int = 0 - buckets: List[Bucket] = [] - - -class AnalyticsResponse(BaseModel): - count: int = 0 - buckets: List[MetricsBucket] = [] - # - query: TracingQuery = TracingQuery() - specs: List[MetricSpec] = [] diff --git a/api/oss/src/apis/fastapi/tracing/router.py b/api/oss/src/apis/fastapi/tracing/router.py index 72faaed9d6..bd98375725 100644 --- a/api/oss/src/apis/fastapi/tracing/router.py +++ b/api/oss/src/apis/fastapi/tracing/router.py @@ -1,30 +1,24 @@ -from typing import Optional, List, Tuple, Dict, Union +from typing import Union, Optional from uuid import UUID from fastapi import APIRouter, Request, Depends, status, HTTPException -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - +from oss.src.apis.fastapi.shared.utils import handle_exceptions from oss.src.apis.fastapi.tracing.utils import ( merge_queries, - parse_query_from_params_request, - parse_query_from_body_request, + parse_query_request, + parse_body_request, parse_trace_id_to_uuid, parse_spans_from_request, parse_spans_into_response, - parse_analytics_from_params_request, - parse_analytics_from_body_request, - merge_analytics, ) from oss.src.apis.fastapi.tracing.models import ( OTelLinksResponse, OTelTracingRequest, OTelTracingResponse, - OldAnalyticsResponse, - AnalyticsResponse, + OTelTracingRequest, + OTelTracingResponse, ) from oss.src.core.tracing.service import TracingService from oss.src.core.tracing.utils import FilteringException @@ -32,19 +26,19 @@ OTelLinks, OTelSpan, OTelFlatSpans, - OTelFlatSpan, OTelTraceTree, - TracingQuery, + OTelSpansTree, + Query, Focus, Format, - MetricType, - MetricSpec, ) log = get_module_logger(__name__) class TracingRouter: + VERSION = "1.0.0" + def __init__( self, tracing_service: TracingService, @@ -57,9 +51,9 @@ def __init__( self.router.add_api_route( "/traces/", - self.create_trace, + self.add_trace, methods=["POST"], - operation_id="create_trace", + operation_id="add_trace", status_code=status.HTTP_202_ACCEPTED, response_model=OTelLinksResponse, response_model_exclude_none=True, @@ -76,7 +70,7 @@ def __init__( ) self.router.add_api_route( - "/traces/{trace_id}", + "/traces/", self.edit_trace, methods=["PUT"], operation_id="edit_trace", @@ -87,9 +81,9 @@ def __init__( self.router.add_api_route( "/traces/{trace_id}", - self.delete_trace, + self.remove_trace, methods=["DELETE"], - operation_id="delete_trace", + operation_id="remove_trace", status_code=status.HTTP_202_ACCEPTED, response_model=OTelLinksResponse, response_model_exclude_none=True, @@ -118,32 +112,22 @@ def __init__( ) self.router.add_api_route( - "/spans/query", + "/spans/", self.query_spans, - methods=["POST"], - operation_id="query_spans_rpc", + methods=["GET"], + operation_id="query_spans", status_code=status.HTTP_200_OK, response_model=OTelTracingResponse, response_model_exclude_none=True, ) self.router.add_api_route( - "/spans/analytics", - self.fetch_legacy_analytics, - methods=["POST"], - operation_id="fetch_analytics", - status_code=status.HTTP_200_OK, - response_model=OldAnalyticsResponse, - response_model_exclude_none=True, - ) - - self.router.add_api_route( - "/analytics/query", - self.fetch_analytics, + "/spans/query", + self.query_spans, methods=["POST"], - operation_id="fetch_new_analytics", + operation_id="query_spans_rpc", status_code=status.HTTP_200_OK, - response_model=AnalyticsResponse, + response_model=OTelTracingResponse, response_model_exclude_none=True, ) @@ -152,39 +136,22 @@ def __init__( async def _upsert( self, project_id: UUID, - user_id: UUID, - # spans: Optional[OTelFlatSpans] = None, traces: Optional[OTelTraceTree] = None, strict: Optional[bool] = False, + user_id: Optional[UUID] = None, ) -> OTelLinks: - _spans: Dict[str, Union[OTelSpan, OTelFlatSpans]] = dict() + _spans = {} if spans: - _spans = { - "spans": [ - OTelFlatSpan( - **span.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - ) - for span in spans - ] - } + _spans = {"spans": [OTelSpan(**span.model_dump()) for span in spans]} + elif traces: - for spans_tree in traces.values(): - if spans_tree.spans: - for span in spans_tree.spans.values(): - if not isinstance(span, list): - _spans[span.span_id] = OTelSpan( - **span.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - ) + for spans in traces.values(): + spans: OTelSpansTree + + for span in spans.spans.values(): + _spans[span.span_id] = OTelSpan(**span.model_dump()) span_dtos = parse_spans_from_request(_spans) @@ -192,9 +159,8 @@ async def _upsert( links = ( await self.service.create( project_id=project_id, - user_id=user_id, - # span_dtos=span_dtos, + user_id=user_id, ) or [] ) @@ -202,9 +168,8 @@ async def _upsert( links = ( await self.service.update( project_id=project_id, - user_id=user_id, - # span_dtos=span_dtos, + user_id=user_id, ) or [] ) @@ -213,8 +178,8 @@ async def _upsert( ### CRUD ON TRACES - @intercept_exceptions() - async def create_trace( # CREATE + @handle_exceptions() + async def add_trace( # CREATE self, request: Request, trace_request: OTelTracingRequest, @@ -223,15 +188,15 @@ async def create_trace( # CREATE if trace_request.traces: if len(trace_request.traces) == 0: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing trace", + detail="Missing trace.", ) if len(trace_request.traces) > 1: - raise HTTPException( + return HTTPException( status_code=400, - detail="Too many traces", + detail="Too many traces.", ) spans = list(trace_request.traces.values())[0].spans @@ -240,57 +205,56 @@ async def create_trace( # CREATE spans = {span.span_id: span for span in trace_request.spans} else: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing spans", + detail="Missing spans.", ) - if not spans: - raise HTTPException( + if len(spans) == 0: + return HTTPException( status_code=400, - detail="Missing spans", + detail="Missing spans.", ) root_spans = 0 for span in spans.values(): - if not isinstance(span, list) and span.parent_id is None: + if span.parent_id is None: root_spans += 1 if root_spans == 0: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing root span", + detail="Missing root span.", ) if root_spans > 1: - raise HTTPException( + return HTTPException( status_code=400, - detail="Too many root spans", + detail="Too many root spans.", ) links = await self._upsert( project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # spans=trace_request.spans, traces=trace_request.traces, strict=True, + user_id=UUID(request.state.user_id), ) link_response = OTelLinksResponse( - count=len(links), + version=self.VERSION, links=links, + count=len(links), ) return link_response - @intercept_exceptions() - @suppress_exceptions(default=OTelTracingResponse()) + @handle_exceptions() async def fetch_trace( # READ self, request: Request, - trace_id: str, + trace_id: Union[str, int], ) -> OTelTracingResponse: try: trace_id = parse_trace_id_to_uuid(trace_id) @@ -300,11 +264,13 @@ async def fetch_trace( # READ spans = await self.service.read( project_id=UUID(request.state.project_id), - # - trace_id=UUID(trace_id), + trace_id=trace_id, ) - trace_response = OTelTracingResponse() + trace_response = OTelTracingResponse( + version=self.VERSION, + count=0, + ) if spans is not None: traces = parse_spans_into_response( @@ -313,38 +279,33 @@ async def fetch_trace( # READ format=Format.AGENTA, ) - if not traces or isinstance(traces, list): - return OTelTracingResponse() - trace_response = OTelTracingResponse( - count=len(traces.keys()), + version=self.VERSION, traces=traces, + count=len(traces.values()), ) return trace_response - @intercept_exceptions() + @handle_exceptions() async def edit_trace( # UPDATE self, request: Request, - # trace_request: OTelTracingRequest, - # - trace_id: str, ) -> OTelLinksResponse: spans = None if trace_request.traces: if len(trace_request.traces) == 0: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing trace", + detail="Missing trace.", ) if len(trace_request.traces) > 1: - raise HTTPException( + return HTTPException( status_code=400, - detail="Too many traces", + detail="Too many traces.", ) spans = list(trace_request.traces.values())[0].spans @@ -353,82 +314,80 @@ async def edit_trace( # UPDATE spans = {span.span_id: span for span in trace_request.spans} else: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing spans", + detail="Missing spans.", ) - if not spans: - raise HTTPException( + if len(spans) == 0: + return HTTPException( status_code=400, - detail="Missing spans", + detail="Missing spans.", ) root_spans = 0 for span in spans.values(): - if not isinstance(span, list) and span.parent_id is None: + if span.parent_id is None: root_spans += 1 if root_spans == 0: - raise HTTPException( + return HTTPException( status_code=400, - detail="Missing root span", + detail="Missing root span.", ) if root_spans > 1: - raise HTTPException( + return HTTPException( status_code=400, - detail="Too many root spans", + detail="Too many root spans.", ) links = await self._upsert( project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # spans=trace_request.spans, traces=trace_request.traces, strict=False, + user_id=UUID(request.state.user_id), ) link_response = OTelLinksResponse( - count=len(links), + version=self.VERSION, links=links, + count=len(links), ) return link_response - @intercept_exceptions() - async def delete_trace( # DELETE + @handle_exceptions() + async def remove_trace( # DELETE self, request: Request, - trace_id: str, + trace_id: Union[str, int], ) -> OTelLinksResponse: try: trace_id = parse_trace_id_to_uuid(trace_id) except Exception as e: - raise HTTPException( - status_code=400, - detail="Invalid trace_id", - ) from e + raise HTTPException(status_code=400, detail="Invalid trace_id.") from e links = await self.service.delete( project_id=UUID(request.state.project_id), - # - trace_id=UUID(trace_id), + trace_id=trace_id, + user_id=UUID(request.state.user_id), ) link_response = OTelLinksResponse( - count=len(links), + version=self.VERSION, links=links, + count=len(links) if links else 0, ) return link_response ### RPC ON SPANS - @intercept_exceptions() + @handle_exceptions() async def ingest_spans( # MUTATION self, request: Request, @@ -436,26 +395,25 @@ async def ingest_spans( # MUTATION ) -> OTelLinksResponse: links = await self._upsert( project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # spans=spans_request.spans, traces=spans_request.traces, strict=True, + user_id=UUID(request.state.user_id), ) link_response = OTelLinksResponse( - count=len(links), + version=self.VERSION, links=links, + count=len(links), ) return link_response - @intercept_exceptions() - @suppress_exceptions(default=OTelTracingResponse()) + @handle_exceptions() async def query_spans( # QUERY self, request: Request, - query: Optional[TracingQuery] = Depends(parse_query_from_params_request), + query: Optional[Query] = Depends(parse_query_request), ) -> OTelTracingResponse: body_json = None query_from_body = None @@ -464,9 +422,9 @@ async def query_spans( # QUERY body_json = await request.json() if body_json: - query_from_body = parse_query_from_body_request(**body_json) + query_from_body = parse_body_request(**body_json) - except: + except: # pylint: disable=bare-except pass merged_query = merge_queries(query, query_from_body) @@ -474,7 +432,6 @@ async def query_spans( # QUERY try: span_dtos = await self.service.query( project_id=UUID(request.state.project_id), - # query=merged_query, ) except FilteringException as e: @@ -483,150 +440,45 @@ async def query_spans( # QUERY detail=str(e), ) from e - spans_or_traces = parse_spans_into_response( + oldest = None + newest = None + + for span in span_dtos: + if oldest is None or span.start_time < oldest: + oldest = span.start_time + + if newest is None or span.start_time > newest: + newest = span.start_time + + _spans_or_traces = parse_spans_into_response( span_dtos, - focus=(merged_query.formatting.focus if merged_query.formatting else None) - or Focus.TRACE, - format=(merged_query.formatting.format if merged_query.formatting else None) - or Format.AGENTA, + focus=query.formatting.focus, + format=query.formatting.format, ) - spans: Optional[OTelFlatSpans] = None - traces: Optional[OTelTraceTree] = None + spans: OTelFlatSpans = None + traces: OTelTraceTree = None - if isinstance(spans_or_traces, list): - count = len(spans_or_traces) - spans = spans_or_traces + if isinstance(_spans_or_traces, list): + spans = _spans_or_traces traces = None - elif isinstance(spans_or_traces, dict): - count = len(spans_or_traces.values()) + count = len(_spans_or_traces) + elif isinstance(_spans_or_traces, dict): spans = None - traces = spans_or_traces + traces = _spans_or_traces + count = len(_spans_or_traces.values()) else: - count = 0 spans = None traces = None + count = 0 spans_response = OTelTracingResponse( - count=count, + version=self.VERSION, spans=spans, traces=traces, + count=count, + oldest=oldest, + newest=newest, ) return spans_response - - @intercept_exceptions() - @suppress_exceptions(default=OldAnalyticsResponse()) - async def fetch_legacy_analytics( - self, - request: Request, - query: Optional[TracingQuery] = Depends(parse_query_from_params_request), - ) -> OldAnalyticsResponse: - body_json = None - query_from_body = None - - try: - body_json = await request.json() - - if body_json: - query_from_body = parse_query_from_body_request( - **body_json, - ) - - except: # pylint: disable=bare-except - pass - - merged_query = merge_queries( - query, - query_from_body, - ) - - # DEBUGGING - # log.trace(merged_query.model_dump(mode="json", exclude_none=True)) - # --------- - - buckets = await self.service.legacy_analytics( - project_id=UUID(request.state.project_id), - query=merged_query, - ) - - # DEBUGGING - # log.trace([b.model_dump(mode="json", exclude_none=True) for b in buckets]) - # --------- - - return OldAnalyticsResponse( - count=len(buckets), - buckets=buckets, - ) - - @intercept_exceptions() - @suppress_exceptions(default=AnalyticsResponse()) - async def fetch_analytics( - self, - request: Request, - analytics: Tuple[Optional[TracingQuery], Optional[List[MetricSpec]]] = Depends( - parse_analytics_from_params_request - ), - ) -> AnalyticsResponse: - body_json = None - analytics_from_body = (None, None) - - try: - body_json = await request.json() - - if body_json: - analytics_from_body = parse_analytics_from_body_request( - **body_json, - ) - - except: # pylint: disable=bare-except - pass - - ( - query, - specs, - ) = merge_analytics( - analytics, - analytics_from_body, - ) - - if not specs: - specs = [ - MetricSpec( - type=MetricType.NUMERIC_CONTINUOUS, - path="attributes.ag.metrics.duration.cumulative", - ), - MetricSpec( - type=MetricType.NUMERIC_CONTINUOUS, - path="attributes.ag.metrics.errors.cumulative", - ), - MetricSpec( - type=MetricType.NUMERIC_CONTINUOUS, - path="attributes.ag.metrics.costs.cumulative.total", - ), - MetricSpec( - type=MetricType.NUMERIC_CONTINUOUS, - path="attributes.ag.metrics.tokens.cumulative.total", - ), - MetricSpec( - type=MetricType.CATEGORICAL_SINGLE, - path="attributes.ag.type.trace", - ), - MetricSpec( - type=MetricType.CATEGORICAL_SINGLE, - path="attributes.ag.type.span", - ), - ] - - buckets = await self.service.analytics( - project_id=UUID(request.state.project_id), - query=query, - specs=specs, - ) - - return AnalyticsResponse( - count=len(buckets), - buckets=buckets, - query=query, - specs=specs, - ) diff --git a/api/oss/src/apis/fastapi/tracing/utils.py b/api/oss/src/apis/fastapi/tracing/utils.py index d67c3ca542..37143adefa 100644 --- a/api/oss/src/apis/fastapi/tracing/utils.py +++ b/api/oss/src/apis/fastapi/tracing/utils.py @@ -1,28 +1,11 @@ -from typing import Optional, Union, Dict, Tuple, List -from json import loads, dumps -from copy import deepcopy -from hashlib import blake2b -from traceback import format_exc -from datetime import datetime +from typing import Optional, Union, Dict +from json import loads -from fastapi import Query +from fastapi import Query as _Query from oss.src.utils.logging import get_module_logger from oss.src.core.tracing.dtos import ( - TraceType, - SpanType, - AgMetricEntryAttributes, - AgMetricsAttributes, - AgTypeAttributes, - AgDataAttributes, - AgAttributes, -) - - -from oss.src.core.tracing.dtos import ( - OTelHash, - OTelReference, OTelAttributes, OTelSpan, OTelNestedSpans, @@ -31,60 +14,39 @@ Formatting, Windowing, Filtering, - TracingQuery, + Query, Focus, Format, - MetricSpec, ) from oss.src.core.tracing.utils import ( - parse_ref_id_to_uuid, - parse_ref_slug_to_str, parse_timestamp_to_datetime, parse_trace_id_to_uuid, parse_span_id_to_uuid, parse_trace_id_from_uuid, parse_span_id_from_uuid, - unmarshall_attributes, + unmarshal_attributes, parse_span_idx_to_span_id_tree, connect_children, ) log = get_module_logger(__name__) -TRACE_DEFAULT_KEY = "__default__" - # --- PARSE QUERY DTO --- def _parse_windowing( - oldest: Optional[Union[str, int, datetime]] = None, - newest: Optional[Union[str, int, datetime]] = None, + oldest: Optional[Union[str, int]] = None, + newest: Optional[Union[str, int]] = None, limit: Optional[int] = None, - interval: Optional[int] = None, - rate: Optional[float] = None, ) -> Optional[Windowing]: - if all( - [ - oldest is None, - newest is None, - limit is None, - interval is None, - rate is None, - ] - ): - return None + # if not oldest and not newest: + # oldest = (datetime.now(timezone.utc) - timedelta(days=1)).isoformat() oldest = parse_timestamp_to_datetime(oldest) newest = parse_timestamp_to_datetime(newest) - _windowing = Windowing( - oldest=oldest, - newest=newest, - limit=limit, - interval=interval, - rate=rate, - ) + _windowing = Windowing(oldest=oldest, newest=newest, limit=limit) return _windowing @@ -116,45 +78,39 @@ def _parse_filtering( def _parse_formatting( - focus: Focus = Focus.TRACE, - format: Format = Format.AGENTA, # pylint: disable=redefined-builtin + focus: Optional[Focus] = Focus.TRACE, + format: Optional[Format] = Format.AGENTA, # pylint: disable=redefined-builtin ) -> Optional[Formatting]: _formatting = Formatting( - focus=focus or Focus.TRACE, + focus=focus or Focus.SPAN, format=format or Format.AGENTA, ) return _formatting -def parse_query_from_params_request( +def parse_query_request( # GROUPING - focus: Optional[Focus] = Query(None), - format: Optional[Format] = Query(None), # pylint: disable=redefined-builtin + focus: Optional[Focus] = _Query(None), + format: Optional[Format] = _Query(None), # pylint: disable=redefined-builtin # WINDOWING - oldest: Optional[Union[str, int]] = Query(None), - newest: Optional[Union[str, int]] = Query(None), - limit: Optional[int] = Query(None), - interval: Optional[int] = Query(None), - rate: Optional[float] = Query(None), + oldest: Optional[Union[str, int]] = _Query(None), + newest: Optional[Union[str, int]] = _Query(None), + limit: Optional[int] = _Query(None), # FILTERING - filter=Query(None), # pylint: disable=redefined-builtin -) -> TracingQuery: - return parse_query_from_body_request( + filter=_Query(None), # pylint: disable=redefined-builtin +) -> Query: + return parse_body_request( focus=focus, format=format, - # oldest=oldest, newest=newest, limit=limit, - interval=interval, - rate=rate, - # filter=filter, ) -def parse_query_from_body_request( +def parse_body_request( # GROUPING focus: Optional[Focus] = None, format: Optional[Format] = None, # pylint: disable=redefined-builtin @@ -162,366 +118,53 @@ def parse_query_from_body_request( oldest: Optional[Union[str, int]] = None, newest: Optional[Union[str, int]] = None, limit: Optional[int] = None, - interval: Optional[int] = None, - rate: Optional[float] = None, # FILTERING filter: Optional[Union[dict, str]] = None, # pylint: disable=redefined-builtin -) -> TracingQuery: +) -> Query: try: - _query = TracingQuery( - formatting=_parse_formatting( - focus=focus, - format=format, - ), - windowing=_parse_windowing( - oldest=oldest, - newest=newest, - limit=limit, - interval=interval, - rate=rate, - ), - filtering=_parse_filtering( - filter=filter, - ), + _query = Query( + formatting=_parse_formatting(focus=focus, format=format), + windowing=_parse_windowing(oldest=oldest, newest=newest, limit=limit), + filtering=_parse_filtering(filter=filter), ) except Exception as e: # pylint: disable=broad-except log.warn(e) - _query = TracingQuery() + _query = None return _query def merge_queries( - query_param: Optional[TracingQuery] = None, - query_body: Optional[TracingQuery] = None, -) -> TracingQuery: - if query_param is None and query_body is None: - return TracingQuery( - formatting=_parse_formatting(), - windowing=_parse_windowing(), - filtering=_parse_filtering(), - ) - - if query_body is None and query_param is not None: - query_param.filtering = query_param.filtering or Filtering() - + query_param: Optional[Query] = None, + query_body: Optional[Query] = None, +) -> Query: + if query_body is None: + if query_param.filtering is None: + query_param.filtering = Filtering() return query_param - if query_param is None and query_body is not None: - query_body.filtering = query_body.filtering or Filtering() - + if query_param is None: + if query_body.filtering is None: + query_body.filtering = Filtering() return query_body - if query_param is not None and query_body is not None: - return TracingQuery( - formatting=query_body.formatting or query_param.formatting or Formatting(), - windowing=query_body.windowing or query_param.windowing or Windowing(), - filtering=query_body.filtering or query_param.filtering or Filtering(), - ) - - return TracingQuery( - formatting=_parse_formatting(), - windowing=_parse_windowing(), - filtering=_parse_filtering(), + return Query( + formatting=query_param.formatting or query_body.formatting or Formatting(), + windowing=query_param.windowing or query_body.windowing or Windowing(), + filtering=query_param.filtering or query_body.filtering or Filtering(), ) -# --- PARSE SPANS --- - - -def ensure_nested_dict(d: dict, *keys: str) -> dict: - """Ensure nested structure exists in dictionary `d`.""" - for key in keys: - if key not in d or not isinstance(d[key], dict): - d[key] = {} - d = d[key] - return d - - -"""Ensure `ag` is present and populate required structure, putting extra fields under 'unsupported'. - -Providing this: -{ - "ag": { - "type": { - "trace": "undefined", - "span": "undefined", - "extra_type": "x", # unsupported - }, - "flags": {"env": "True"}, - "tags": {"foo": "bar"}, - "meta": {"service": "api"}, - "data": { - "inputs": {"text": "hello"}, - "outputs": "world", - "internals": {"debug": True}, - "extra_data": 42, # unsupported - }, - "metrics": { - "duration": { - "cumulative": 12.5, - "incremental": None, - "extra_duration": "bad", # unsupported - }, - "errors": { - "incremental": 1 - }, - "tokens": { - "cumulative": 100 - }, - "costs": { - "incremental": 0.02 - }, - "extra_metric": { # unsupported full metric - "cumulative": 999 - }, - }, - "references": {"trace_id": "abc"}, - "exception": {"message": "boom"}, - "custom": "oops", # unsupported top-level - } -} - -should return this: -{ - "ag": { - "type": { - "trace": "undefined", - "span": "undefined" - }, - "flags": {"env": "True"}, - "tags": {"foo": "bar"}, - "meta": {"service": "api"}, - "data": { - "inputs": {"text": "hello"}, - "outputs": "world", - "internals": {"debug": True} - }, - "metrics": { - "duration": { - "cumulative": 12.5 - }, - "errors": { - "incremental": 1 - }, - "tokens": { - "cumulative": 100 - }, - "costs": { - "incremental": 0.02 - } - }, - "references": {"trace_id": "abc"}, - "exception": {"message": "boom"}, - "unsupported": { - "type": { - "extra_type": "x" - }, - "data": { - "extra_data": 42 - }, - "metrics": { - "duration": { - "extra_duration": "bad" - }, - "extra_metric": { - "cumulative": 999 - } - }, - "custom": "oops" - } - } -} -""" - - -def initialize_ag_attributes(attributes: Optional[dict]) -> dict: - """Ensure structured and validated 'ag' block is always present and complete.""" - if not attributes or not isinstance(attributes, dict): - attributes = {} - - ag = deepcopy(attributes.get("ag", {})) or {} - unsupported = deepcopy(ag.get("unsupported", {})) or {} - cleaned_ag = {} - - # --- type --- - type_dict = ensure_nested_dict(ag, "type") - cleaned_type = { - key: type_dict.get(key, None) for key in AgTypeAttributes.model_fields - } - for key in type_dict: - if key not in AgTypeAttributes.model_fields: - unsupported.setdefault("type", {})[key] = type_dict[key] - cleaned_ag["type"] = cleaned_type - - # --- data --- - data_dict = ensure_nested_dict(ag, "data") - cleaned_data = { - key: data_dict.get(key, None) for key in AgDataAttributes.model_fields - } - for key in data_dict: - if key not in AgDataAttributes.model_fields: - unsupported.setdefault("data", {})[key] = data_dict[key] - cleaned_ag["data"] = cleaned_data - - # --- metrics --- - metrics_dict = ensure_nested_dict(ag, "metrics") - cleaned_metrics = {} - - for metric_key in AgMetricsAttributes.model_fields: - raw_entry = ensure_nested_dict(metrics_dict, metric_key) - cleaned_entry = { - subkey: raw_entry.get(subkey, None) - for subkey in AgMetricEntryAttributes.model_fields - } - cleaned_metrics[metric_key] = cleaned_entry - - # remove unexpected subkeys from metric entry - for subkey in list(raw_entry.keys()): - if subkey not in AgMetricEntryAttributes.model_fields: - unsupported.setdefault("metrics", {}).setdefault(metric_key, {})[ - subkey - ] = raw_entry[subkey] - - # detect fully unsupported metric keys - for metric_key in list(metrics_dict.keys()): - if metric_key not in AgMetricsAttributes.model_fields: - unsupported.setdefault("metrics", {})[metric_key] = metrics_dict[metric_key] - - cleaned_ag["metrics"] = cleaned_metrics - - # --- references --- - references_dict = ensure_nested_dict(ag, "references") - cleaned_references = {} - - if isinstance(references_dict, dict): - for key in references_dict: - if key in REFERENCE_KEYS: - entry = {} - if references_dict[key].get("id") is not None: - entry["id"] = str(references_dict[key]["id"]) - if references_dict[key].get("slug") is not None: - entry["slug"] = str(references_dict[key]["slug"]) - if references_dict[key].get("version") is not None: - entry["version"] = str(references_dict[key]["version"]) - - cleaned_references[key] = entry - - cleaned_ag["references"] = cleaned_references or None - - # --- passthrough simple optional fields --- - for key in ["flags", "tags", "meta", "exception", "hashes"]: - cleaned_ag[key] = ag.get(key, None) - - # --- move ag.meta.configuration to ag.data.parameters --- - if "meta" in cleaned_ag and cleaned_ag["meta"] is not None: - if "configuration" in cleaned_ag["meta"]: - if cleaned_ag["data"]["parameters"] is None: - cleaned_ag["data"]["parameters"] = cleaned_ag["meta"]["configuration"] - del cleaned_ag["meta"]["configuration"] - if not cleaned_ag["meta"]: - cleaned_ag["meta"] = None - - # --- unsupported top-level --- - for key in ag: - if key not in AgAttributes.model_fields: - if key == "refs": - continue - unsupported[key] = ag[key] - - cleaned_ag["unsupported"] = unsupported or None - - cleaned_ag = AgAttributes(**cleaned_ag).model_dump(mode="json", exclude_none=True) - - attributes["ag"] = cleaned_ag - - return attributes - - -REFERENCE_KEYS = [ - "testcase", - "testset", - "testset_variant", - "testset_revision", - "query", - "query_variant", - "query_revision", - "workflow", - "workflow_variant", - "workflow_revision", - "application", - "application_variant", - "application_revision", - "evaluator", - "evaluator_variant", - "evaluator_revision", - "environment", - "environment_variant", - "environment_revision", - "snippet", - "snippet_variant", - "snippet_revision", -] - - -def extract_references_and_links_from_span(span: OTelSpan) -> Tuple[Dict, Dict]: - references = { - ref.attributes["key"]: { - "id": str(ref.id) if ref.id else None, - "slug": str(ref.slug) if ref.slug else None, - } - for ref in span.references or [] - if ref.attributes.get("key") in REFERENCE_KEYS - } - links = { - link.attributes["key"]: { - "trace_id": parse_trace_id_from_uuid(link.trace_id), - "span_id": parse_span_id_from_uuid(link.span_id), - } - for link in span.links or [] - if link.attributes.get("key") - } - return references, links - - -def make_hash_id( - *, - references: Optional[Dict[str, Dict[str, str]]] = None, - links: Optional[Dict[str, Dict[str, str]]] = None, -) -> str: - if not references and not links: - return None - - payload = dict() - - for k, v in (references or {}).items(): - if k in REFERENCE_KEYS: - entry = {} - if v.get("id") is not None: - entry["id"] = v["id"] - if v.get("slug") is not None: - entry["slug"] = v["slug"] - payload[k] = entry - - for k, v in (links or {}).items(): - payload[k] = {"span_id": v.get("span_id"), "trace_id": v.get("trace_id")} - - hasher = blake2b(digest_size=16) - - serialized = dumps(payload, sort_keys=True).encode("utf-8").replace(b" ", b"") - - hasher.update(serialized) - - digest = hasher.hexdigest() - - return digest - - -def _parse_span_from_request(raw_span: OTelSpan) -> Optional[OTelFlatSpans]: +# --- PARSE TRACE/SPAN/PARENT ID --- + + +def _parse_span_from_request( + raw_span: OTelSpan, +) -> Optional[OTelFlatSpans]: raw_span_dtos: OTelFlatSpans = [] - # --- IDs --- + # HANDLE IDs (TRACE, SPAN, PARENT, LINKS) raw_span.trace_id = parse_trace_id_to_uuid(raw_span.trace_id) raw_span.span_id = parse_span_id_to_uuid(raw_span.span_id) @@ -533,89 +176,45 @@ def _parse_span_from_request(raw_span: OTelSpan) -> Optional[OTelFlatSpans]: link.trace_id = parse_trace_id_to_uuid(link.trace_id) link.span_id = parse_span_id_to_uuid(link.span_id) - # --- Timestamps --- + # HANDLE TIMESTAMPS raw_span.start_time = parse_timestamp_to_datetime(raw_span.start_time) raw_span.end_time = parse_timestamp_to_datetime(raw_span.end_time) - # --- Attributes --- - raw_span.attributes = unmarshall_attributes(raw_span.attributes or {}) - raw_span.attributes = initialize_ag_attributes(raw_span.attributes) - - ag = raw_span.attributes["ag"] + # HANDLE ATTRIBUTES + if not raw_span.attributes: + raw_span.attributes = dict() - # --- Types --- - raw_span.trace_type = TraceType(ag["type"].get("trace") or TraceType.INVOCATION) - raw_span.span_type = SpanType(ag["type"].get("span") or SpanType.TASK) + raw_span.attributes = unmarshal_attributes(raw_span.attributes) - # --- Latency --- - if raw_span.start_time and raw_span.end_time: - duration_s = (raw_span.end_time - raw_span.start_time).total_seconds() - duration_ms = round(duration_s * 1_000, 3) - duration_ms = duration_ms if duration_ms > 0 else None + # HANDLE LATENCY + if not "agenta" in raw_span.attributes: + raw_span.attributes["agenta"] = {} + if not "metrics" in raw_span.attributes["agenta"]: + raw_span.attributes["agenta"]["metrics"] = {} - if duration_ms is not None: - ag["metrics"]["duration"] = {"cumulative": duration_ms} + raw_span.attributes["agenta"]["metrics"]["latency"] = round( + (raw_span.end_time - raw_span.start_time).total_seconds() * 1_000, + 3, + ) # milliseconds - # --- Events / Exceptions --- + # HANDLE EVENTS (TIMESTAMPS AND EXCEPTIONS) if raw_span.events: - errors = ag["metrics"]["errors"] = {"incremental": 0} - for event in raw_span.events: event.timestamp = parse_timestamp_to_datetime(event.timestamp) - if event.name == "exception": - errors["incremental"] = (errors.get("incremental") or 0) + 1 - - raw_span.exception = { - "message": event.attributes.get("message"), - "type": event.attributes.get("type"), - "stacktrace": event.attributes.get("stacktrace"), - } - - # --- References --- - ag_references = ag.get("references") - if isinstance(ag_references, dict): - raw_span.references = [] - for ref_key, ref_value in ag_references.items(): - if isinstance(ref_value, dict): - raw_span.references.append( - OTelReference( - id=( - parse_ref_id_to_uuid(ref_value.get("id")) - if ref_value.get("id") - else None - ), - slug=( - parse_ref_slug_to_str(ref_value.get("slug")) - if ref_value.get("slug") - else None - ), - attributes={"key": ref_key}, - ) - ) - - # --- Hashes --- - if raw_span.references or raw_span.links: - references, links = extract_references_and_links_from_span(raw_span) - if references or links: - hash_id = make_hash_id(references=references, links=links) - - if hash_id: - hashes = OTelHash( - id=hash_id, - attributes={ - "key": "indirect", - }, - ) + if event.name == "exception": + if not "agenta" in raw_span.attributes: + raw_span.attributes["agenta"] = {} + if not "metrics" in raw_span.attributes["agenta"]: + raw_span.attributes["agenta"]["metrics"] = {} - raw_span.hashes = [hashes] + raw_span.attributes["agenta"]["metrics"]["errors"] = 1 - # --- Children --- - if isinstance(raw_span, OTelSpan) and raw_span.spans is not None: + # HANDLE CHILDREN + if raw_span.spans: raw_span_dtos.extend(parse_spans_from_request(raw_span.spans)) raw_span.spans = None - # --- Final Append --- raw_span_dtos.append(raw_span) return raw_span_dtos @@ -638,8 +237,8 @@ def parse_spans_from_request( for span in raw_span_dtos: span_dtos.extend(_parse_span_from_request(span)) - except Exception: # pylint:disable=broad-exception-caught - log.error(f"Error processing spans:\n {format_exc()}") + except Exception as e: # pylint:disable=broad-exception-caught + log.error(f"Error processing spans: {e}") span_dtos = [] # FULL RESET OR RETURN PARTIAL? @@ -669,20 +268,13 @@ def _parse_span_into_response( if marshall: pass # TODO: MARSHALL ATTRIBUTES - ag = span_dto.attributes.get("ag") - if ag: - data = ag.get("data") if isinstance(ag, dict) else None - outputs = data.get("outputs") if isinstance(data, dict) else None - if isinstance(outputs, dict) and TRACE_DEFAULT_KEY in outputs: - data["outputs"] = outputs[TRACE_DEFAULT_KEY] - return span_dto def parse_spans_into_response( span_dtos: OTelFlatSpans, - focus: Focus = Focus.TRACE, - format: Format = Format.AGENTA, + focus: Focus, + format: Format, ) -> Optional[Union[OTelFlatSpans, OTelTraceTree]]: clean_span_dtos: OTelFlatSpans = [] @@ -716,8 +308,8 @@ def parse_spans_into_response( else: spans: OTelFlatSpans = clean_span_dtos - except Exception: # pylint:disable=broad-exception-caught - log.error(f"Error processing spans:\n {format_exc()}") + except Exception as e: # pylint:disable=broad-exception-caught + log.error(f"Error processing spans: {e}") if format == Format.AGENTA and focus == Focus.TRACE: traces: OTelTraceTree = {} # FULL RESET OR RETURN PARTIAL? @@ -725,112 +317,3 @@ def parse_spans_into_response( spans: OTelFlatSpans = [] return spans if spans else traces - - -# -- ANALYTICS - - -def parse_specs_from_body_request( - specs: Optional[Union[list, str]] = None, -) -> Optional[List[MetricSpec]]: - if not specs: - return None - - if isinstance(specs, str): - try: - specs = loads(specs) - except Exception as e: # pylint: disable=broad-except - log.warn(f"Error parsing specs string to JSON: {e}") - return None - - if isinstance(specs, list): - return [MetricSpec(**spec) for spec in specs if isinstance(spec, dict)] - - log.warn("Specs should be a list or a JSON string") - - return None - - -def merge_specs( - specs_params: Optional[List[MetricSpec]], - specs_body: Optional[List[MetricSpec]], -) -> List[MetricSpec]: - if not specs_params and not specs_body: - return [] - if not specs_params: - return specs_body or [] - if not specs_body: - return specs_params or [] - - return [] - - -def parse_analytics_from_params_request( - # GROUPING - focus: Optional[Focus] = Query(None), - format: Optional[Format] = Query(None), # pylint: disable=redefined-builtin - # WINDOWING - oldest: Optional[Union[str, int]] = Query(None), - newest: Optional[Union[str, int]] = Query(None), - interval: Optional[int] = Query(None), - rate: Optional[float] = Query(None), - # FILTERING - filter=Query(None), # pylint: disable=redefined-builtin - # METRICS SPECS - specs=Query(None), -) -> Tuple[Optional[TracingQuery], Optional[List[MetricSpec]]]: - return parse_analytics_from_body_request( - focus=focus, - format=format, - # - oldest=oldest, - newest=newest, - interval=interval, - rate=rate, - # - filter=filter, - # - specs=specs, - ) - - -def parse_analytics_from_body_request( - # GROUPING - focus: Optional[Focus] = None, - format: Optional[Format] = None, # pylint: disable=redefined-builtin - # WINDOWING - oldest: Optional[Union[str, int]] = None, - newest: Optional[Union[str, int]] = None, - interval: Optional[int] = None, - rate: Optional[float] = None, - # FILTERING - filter: Optional[Union[dict, str]] = None, # pylint: disable=redefined-builtin - # METRICS SPECS - specs: Optional[Union[list, str]] = None, -) -> Tuple[Optional[TracingQuery], Optional[List[MetricSpec]]]: - return ( - parse_query_from_body_request( - focus=focus, - format=format, - # - oldest=oldest, - newest=newest, - interval=interval, - rate=rate, - # - filter=filter, - ), - parse_specs_from_body_request( - specs=specs, - ), - ) - - -def merge_analytics( - analytics_params: Tuple[Optional[TracingQuery], Optional[List[MetricSpec]]], - analytics_body: Tuple[Optional[TracingQuery], Optional[List[MetricSpec]]], -) -> Tuple[TracingQuery, List[MetricSpec]]: - return ( - merge_queries(analytics_params[0], analytics_body[0]), - merge_specs(analytics_params[1], analytics_body[1]), - ) diff --git a/api/oss/src/apis/fastapi/vault/router.py b/api/oss/src/apis/fastapi/vault/router.py index 38ff0d9ec6..6d30f14201 100644 --- a/api/oss/src/apis/fastapi/vault/router.py +++ b/api/oss/src/apis/fastapi/vault/router.py @@ -4,12 +4,12 @@ from fastapi.responses import JSONResponse from fastapi import APIRouter, Request, status, HTTPException -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache +from oss.src.utils.caching import get_cache, set_cache +from oss.src.utils.common import is_ee from oss.src.core.secrets.services import VaultService +from oss.src.apis.fastapi.shared.utils import handle_exceptions from oss.src.core.secrets.dtos import ( CreateSecretDTO, UpdateSecretDTO, @@ -31,7 +31,7 @@ def __init__(self, vault_service: VaultService): self.router = APIRouter() self.router.add_api_route( - "/secrets/", + "/secrets", self.create_secret, methods=["POST"], operation_id="create_secret", @@ -39,7 +39,7 @@ def __init__(self, vault_service: VaultService): response_model=SecretResponseDTO, ) self.router.add_api_route( - "/secrets/", + "/secrets", self.list_secrets, methods=["GET"], operation_id="list_secrets", @@ -70,7 +70,7 @@ def __init__(self, vault_service: VaultService): operation_id="delete_secret", ) - @intercept_exceptions() + @handle_exceptions() async def create_secret(self, request: Request, body: CreateSecretDTO): if is_ee(): has_permission = await check_action_access( @@ -90,17 +90,15 @@ async def create_secret(self, request: Request, body: CreateSecretDTO): project_id=UUID(request.state.project_id), create_secret_dto=body, ) - await invalidate_cache( - project_id=request.state.project_id, - ) return vault_secret - @intercept_exceptions() + @handle_exceptions() async def list_secrets(self, request: Request): cache_key = {} secrets_dtos = await get_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_secrets", key=cache_key, model=SecretResponseDTO, @@ -130,14 +128,16 @@ async def list_secrets(self, request: Request): await set_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_secrets", key=cache_key, value=secrets_dtos, + ttl=0.05, # seconds ) return secrets_dtos - @intercept_exceptions() + @handle_exceptions() async def read_secret(self, request: Request, secret_id: str): if is_ee(): has_permission = await check_action_access( @@ -163,7 +163,7 @@ async def read_secret(self, request: Request, secret_id: str): ) return secrets_dto - @intercept_exceptions() + @handle_exceptions() async def update_secret( self, request: Request, secret_id: str, body: UpdateSecretDTO ): @@ -190,12 +190,9 @@ async def update_secret( raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail="Secret not found" ) - await invalidate_cache( - project_id=request.state.project_id, - ) return secrets_dto - @intercept_exceptions() + @handle_exceptions() async def delete_secret(self, request: Request, secret_id: str): if is_ee(): has_permission = await check_action_access( @@ -215,7 +212,4 @@ async def delete_secret(self, request: Request, secret_id: str): project_id=UUID(request.state.project_id), secret_id=UUID(secret_id), ) - await invalidate_cache( - project_id=request.state.project_id, - ) return status.HTTP_204_NO_CONTENT diff --git a/api/oss/src/apis/fastapi/workflows/models.py b/api/oss/src/apis/fastapi/workflows/models.py index 6f00e38005..3321eac80f 100644 --- a/api/oss/src/apis/fastapi/workflows/models.py +++ b/api/oss/src/apis/fastapi/workflows/models.py @@ -2,141 +2,50 @@ from pydantic import BaseModel -from oss.src.core.shared.dtos import ( - Windowing, - Reference, -) from oss.src.core.workflows.dtos import ( - # - Workflow, - WorkflowCreate, - WorkflowEdit, - WorkflowQuery, - WorkflowFork, - WorkflowRevisionsLog, - # + WorkflowArtifact as Workflow, WorkflowVariant, - WorkflowVariantCreate, - WorkflowVariantEdit, - WorkflowVariantQuery, - # WorkflowRevision, - WorkflowRevisionCreate, - WorkflowRevisionEdit, - WorkflowRevisionQuery, - WorkflowRevisionCommit, ) -# WORKFLOWS -------------------------------------------------------------------- - - -class WorkflowCreateRequest(BaseModel): - workflow: WorkflowCreate - - -class WorkflowEditRequest(BaseModel): - workflow: WorkflowEdit - - -class WorkflowQueryRequest(BaseModel): - workflow: Optional[WorkflowQuery] = None - # - workflow_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class WorkflowForkRequest(BaseModel): - workflow: WorkflowFork +class WorkflowRequest(BaseModel): + workflow: Workflow class WorkflowResponse(BaseModel): - count: int = 0 + count: int workflow: Optional[Workflow] = None class WorkflowsResponse(BaseModel): - count: int = 0 + count: int workflows: List[Workflow] = [] -# WORKFLOW VARIANTS ------------------------------------------------------------ - - -class WorkflowVariantCreateRequest(BaseModel): - workflow_variant: WorkflowVariantCreate - - -class WorkflowVariantEditRequest(BaseModel): - workflow_variant: WorkflowVariantEdit - - -class WorkflowVariantQueryRequest(BaseModel): - workflow_variant: Optional[WorkflowVariantQuery] = None - # - workflow_refs: Optional[List[Reference]] = None - workflow_variant_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None +class WorkflowVariantRequest(BaseModel): + variant: WorkflowVariant class WorkflowVariantResponse(BaseModel): - count: int = 0 - workflow_variant: Optional[WorkflowVariant] = None + count: int + variant: Optional[WorkflowVariant] = None class WorkflowVariantsResponse(BaseModel): - count: int = 0 - workflow_variants: List[WorkflowVariant] = [] - - -# WORKFLOW REVISIONS ----------------------------------------------------------- - - -class WorkflowRevisionCreateRequest(BaseModel): - workflow_revision: WorkflowRevisionCreate - - -class WorkflowRevisionEditRequest(BaseModel): - workflow_revision: WorkflowRevisionEdit - - -class WorkflowRevisionQueryRequest(BaseModel): - workflow_revision: Optional[WorkflowRevisionQuery] = None - # - workflow_refs: Optional[List[Reference]] = None - workflow_variant_refs: Optional[List[Reference]] = None - workflow_revision_refs: Optional[List[Reference]] = None - # - include_archived: Optional[bool] = None - # - windowing: Optional[Windowing] = None - - -class WorkflowRevisionCommitRequest(BaseModel): - workflow_revision: WorkflowRevisionCommit - - -class WorkflowRevisionRetrieveRequest(BaseModel): - workflow_ref: Optional[Reference] = None - workflow_variant_ref: Optional[Reference] = None - workflow_revision_ref: Optional[Reference] = None + count: int + variants: List[WorkflowVariant] = [] -class WorkflowRevisionsLogRequest(BaseModel): - workflow: WorkflowRevisionsLog +class WorkflowRevisionRequest(BaseModel): + revision: WorkflowRevision class WorkflowRevisionResponse(BaseModel): - count: int = 0 - workflow_revision: Optional[WorkflowRevision] = None + count: int + revision: Optional[WorkflowRevision] = None class WorkflowRevisionsResponse(BaseModel): - count: int = 0 - workflow_revisions: List[WorkflowRevision] = [] + count: int + revisions: List[WorkflowRevision] = [] diff --git a/api/oss/src/apis/fastapi/workflows/router.py b/api/oss/src/apis/fastapi/workflows/router.py index 0481e6a2fb..50a1785096 100644 --- a/api/oss/src/apis/fastapi/workflows/router.py +++ b/api/oss/src/apis/fastapi/workflows/router.py @@ -1,72 +1,32 @@ -from typing import Optional, Union +from typing import Optional from uuid import UUID -from fastapi import APIRouter, Request, status, HTTPException, Depends -from fastapi.responses import Response, JSONResponse, StreamingResponse - -from oss.src.utils.common import is_ee -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache - -from oss.src.core.shared.dtos import ( - Reference, -) -from oss.src.core.workflows.dtos import ( - WorkflowRevisionData, - WorkflowRevision, -) -from oss.src.core.workflows.service import ( - WorkflowsService, -) +from fastapi import Request, status, HTTPException, Depends +from oss.src.core.shared.dtos import Reference +from oss.src.utils.common import APIRouter, is_ee +from oss.src.core.workflows.dtos import WorkflowQuery +from oss.src.core.workflows.service import WorkflowsService +from oss.src.apis.fastapi.shared.utils import handle_exceptions from oss.src.apis.fastapi.workflows.models import ( - WorkflowCreateRequest, - WorkflowEditRequest, - WorkflowQueryRequest, - WorkflowForkRequest, + WorkflowRequest, WorkflowResponse, WorkflowsResponse, - # - WorkflowVariantCreateRequest, - WorkflowVariantEditRequest, - WorkflowVariantQueryRequest, + WorkflowVariantRequest, WorkflowVariantResponse, WorkflowVariantsResponse, - # - WorkflowRevisionCreateRequest, - WorkflowRevisionEditRequest, - WorkflowRevisionQueryRequest, - WorkflowRevisionCommitRequest, - WorkflowRevisionRetrieveRequest, - WorkflowRevisionsLogRequest, + WorkflowRevisionRequest, WorkflowRevisionResponse, WorkflowRevisionsResponse, ) from oss.src.apis.fastapi.workflows.utils import ( - parse_workflow_query_request_from_params, - parse_workflow_query_request_from_body, - merge_workflow_query_requests, - parse_workflow_variant_query_request_from_params, - parse_workflow_variant_query_request_from_body, - merge_workflow_variant_query_requests, - parse_workflow_revision_query_request_from_params, - parse_workflow_revision_query_request_from_body, - merge_workflow_revision_query_requests, - parse_workflow_revision_retrieve_request_from_params, - parse_workflow_revision_retrieve_request_from_body, -) - -from agenta.sdk.models.workflows import ( - WorkflowServiceRequest, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, -) -from agenta.sdk.decorators.routing import ( - handle_invoke_success, - handle_invoke_failure, - handle_inspect_success, - handle_inspect_failure, + parse_workflow_query_request, + parse_workflow_body_request, + parse_variant_query_request, + parse_variant_body_request, + parse_revision_query_request, + parse_revision_body_request, + merge_requests, ) if is_ee(): @@ -74,10 +34,9 @@ from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION -log = get_module_logger(__name__) - - class WorkflowsRouter: + VERSION = "1.0.0" + def __init__( self, workflows_service: WorkflowsService, @@ -86,7 +45,7 @@ def __init__( self.router = APIRouter() - # WORKFLOWS ------------------------------------------------------------ + # — artifacts —————————————————————————————————————————————————————————— self.router.add_api_route( "/", @@ -138,6 +97,16 @@ def __init__( response_model_exclude_none=True, ) + self.router.add_api_route( + "/", + self.query_workflows, + methods=["GET"], + operation_id="list_workflows", + status_code=status.HTTP_200_OK, + response_model=WorkflowsResponse, + response_model_exclude_none=True, + ) + self.router.add_api_route( "/query", self.query_workflows, @@ -148,7 +117,9 @@ def __init__( response_model_exclude_none=True, ) - # WORKFLOW VARIANTS ---------------------------------------------------- + # —————————————————————————————————————————————————————————————————————— + + # — variants ——————————————————————————————————————————————————————————— self.router.add_api_route( "/variants/", @@ -161,7 +132,7 @@ def __init__( ) self.router.add_api_route( - "/variants/{workflow_variant_id}", + "/variants/{variant_id}", self.fetch_workflow_variant, methods=["GET"], operation_id="fetch_workflow_variant", @@ -171,7 +142,7 @@ def __init__( ) self.router.add_api_route( - "/variants/{workflow_variant_id}", + "/variants/{variant_id}", self.edit_workflow_variant, methods=["PUT"], operation_id="edit_workflow_variant", @@ -181,7 +152,7 @@ def __init__( ) self.router.add_api_route( - "/variants/{workflow_variant_id}/archive", + "/variants/{variant_id}/archive", self.archive_workflow_variant, methods=["POST"], operation_id="archive_workflow_variant", @@ -191,7 +162,7 @@ def __init__( ) self.router.add_api_route( - "/variants/{workflow_variant_id}/unarchive", + "/variants/{variant_id}/unarchive", self.unarchive_workflow_variant, methods=["POST"], operation_id="unarchive_workflow_variant", @@ -200,6 +171,16 @@ def __init__( response_model_exclude_none=True, ) + self.router.add_api_route( + "/variants/", + self.query_workflow_variants, + methods=["GET"], + operation_id="list_workflow_variants", + status_code=status.HTTP_200_OK, + response_model=WorkflowVariantsResponse, + response_model_exclude_none=True, + ) + self.router.add_api_route( "/variants/query", self.query_workflow_variants, @@ -210,28 +191,32 @@ def __init__( response_model_exclude_none=True, ) + # ---------------------------------------------------------------------- + self.router.add_api_route( - "/variants/fork", - self.fork_workflow_variant, + "/variants/{variant_id}/commit", + self.commit_workflow_revision, methods=["POST"], - operation_id="fork_workflow_variant", + operation_id="commit_workflow_revision_by_variant_id", status_code=status.HTTP_200_OK, - response_model=WorkflowVariantResponse, + response_model=WorkflowRevisionResponse, response_model_exclude_none=True, ) - # WORKFLOW REVISIONS --------------------------------------------------- - self.router.add_api_route( - "/revisions/retrieve", - self.retrieve_workflow_revision, - methods=["GET"], - operation_id="retrieve_workflow_revision", + "/variants/{variant_id}/fork", + self.fork_workflow_variant, + methods=["POST"], + operation_id="fork_workflow_variant", status_code=status.HTTP_200_OK, - response_model=WorkflowRevisionResponse, + response_model=WorkflowVariantResponse, response_model_exclude_none=True, ) + # —————————————————————————————————————————————————————————————————————— + + # — revisions —————————————————————————————————————————————————————————— + self.router.add_api_route( "/revisions/", self.create_workflow_revision, @@ -243,7 +228,7 @@ def __init__( ) self.router.add_api_route( - "/revisions/{workflow_revision_id}", + "/revisions/{revision_id}", self.fetch_workflow_revision, methods=["GET"], operation_id="fetch_workflow_revision", @@ -253,7 +238,7 @@ def __init__( ) self.router.add_api_route( - "/revisions/{workflow_revision_id}", + "/revisions/{revision_id}", self.edit_workflow_revision, methods=["PUT"], operation_id="edit_workflow_revision", @@ -263,7 +248,7 @@ def __init__( ) self.router.add_api_route( - "/revisions/{workflow_revision_id}/archive", + "/revisions/{revision_id}/archive", self.archive_workflow_revision, methods=["POST"], operation_id="archive_workflow_revision_rpc", @@ -273,7 +258,7 @@ def __init__( ) self.router.add_api_route( - "/revisions/{workflow_revision_id}/unarchive", + "/revisions/{revision_id}/unarchive", self.unarchive_workflow_revision, methods=["POST"], operation_id="unarchive_workflow_revision_rpc", @@ -283,891 +268,886 @@ def __init__( ) self.router.add_api_route( - "/revisions/query", + "/revisions/", self.query_workflow_revisions, - methods=["POST"], - operation_id="query_workflow_revisions", + methods=["GET"], + operation_id="list_workflow_revisions", status_code=status.HTTP_200_OK, response_model=WorkflowRevisionsResponse, response_model_exclude_none=True, ) self.router.add_api_route( - "/revisions/commit", - self.commit_workflow_revision, + "/revisions/query", + self.query_workflow_revisions, methods=["POST"], - operation_id="commit_workflow_revision", + operation_id="query_workflow_revisions", status_code=status.HTTP_200_OK, - response_model=WorkflowRevisionResponse, + response_model=WorkflowRevisionsResponse, response_model_exclude_none=True, ) + # ---------------------------------------------------------------------- + self.router.add_api_route( - "/revisions/log", - self.log_workflow_revisions, + "/revisions/{revision_id}/fork", + self.fork_workflow_variant, methods=["POST"], - operation_id="log_workflow_revisions", + operation_id="fork_workflow_variant_by_revision_id", status_code=status.HTTP_200_OK, - response_model=WorkflowRevisionsResponse, + response_model=WorkflowVariantResponse, response_model_exclude_none=True, ) - # WORKFLOW SERVICES ---------------------------------------------------- - self.router.add_api_route( - "/invoke", - self.invoke_workflow, + "/revisions/commit", + self.commit_workflow_revision, methods=["POST"], - operation_id="invoke_workflow", + operation_id="commit_workflow_revision", status_code=status.HTTP_200_OK, - response_model=Union[ - WorkflowServiceBatchResponse, WorkflowServiceStreamResponse - ], + response_model=WorkflowRevisionResponse, response_model_exclude_none=True, ) self.router.add_api_route( - "/inspect", - self.inspect_workflow, + "/revisions/log", + self.log_workflow_revisions, methods=["POST"], - operation_id="inspect_workflow", + operation_id="log_workflow_revisions", status_code=status.HTTP_200_OK, - response_model=WorkflowServiceRequest, + response_model=WorkflowRevisionsResponse, response_model_exclude_none=True, ) - # WORKFLOWS ---------------------------------------------------------------- + # —————————————————————————————————————————————————————————————————————— - @intercept_exceptions() + # — artifacts —————————————————————————————————————————————————————————————— + + @handle_exceptions() async def create_workflow( self, request: Request, *, - workflow_create_request: WorkflowCreateRequest, - ) -> WorkflowResponse: + workflow_request: WorkflowRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow = await self.workflows_service.create_workflow( + artifact = await self.workflows_service.create_artifact( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_create=workflow_create_request.workflow, + artifact_slug=workflow_request.workflow.slug, + # + artifact_flags=workflow_request.workflow.flags, + artifact_meta=workflow_request.workflow.meta, + artifact_name=workflow_request.workflow.name, + artifact_description=workflow_request.workflow.description, ) - workflow_response = WorkflowResponse( - count=1 if workflow else 0, - workflow=workflow, + artifact_response = WorkflowResponse( + count=1 if artifact is not None else 0, + artifact=artifact, ) - return workflow_response + return artifact_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowResponse()) + @handle_exceptions() async def fetch_workflow( self, request: Request, *, - workflow_id: UUID, - ) -> WorkflowResponse: + artifact_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow = await self.workflows_service.fetch_workflow( + artifact = await self.workflows_service.fetch_artifact( project_id=UUID(request.state.project_id), # - workflow_ref=Reference(id=workflow_id), + artifact_ref=Reference(id=artifact_id), ) - workflow_response = WorkflowResponse( - count=1 if workflow else 0, - workflow=workflow, + artifact_response = WorkflowResponse( + count=1 if artifact is not None else 0, + artifact=artifact, ) - return workflow_response + return artifact_response - @intercept_exceptions() + @handle_exceptions() async def edit_workflow( self, request: Request, *, workflow_id: UUID, - # - workflow_edit_request: WorkflowEditRequest, - ) -> WorkflowResponse: + workflow_request: WorkflowRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if str(workflow_id) != str(workflow_edit_request.workflow.id): - return WorkflowResponse() + if str(workflow_id) != str(workflow_request.workflow.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {workflow_id} != {workflow_request.workflow.id}", + ) - workflow = await self.workflows_service.edit_workflow( + artifact = await self.workflows_service.edit_artifact( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_edit=workflow_edit_request.workflow, + artifact_id=workflow_request.workflow.id, + # + artifact_flags=workflow_request.workflow.flags, + artifact_meta=workflow_request.workflow.meta, + artifact_name=workflow_request.workflow.name, + artifact_description=workflow_request.workflow.description, ) - workflow_response = WorkflowResponse( - count=1 if workflow else 0, - workflow=workflow, + artifact_response = WorkflowResponse( + count=1 if artifact is not None else 0, + artifact=artifact, ) - return workflow_response + return artifact_response - @intercept_exceptions() + @handle_exceptions() async def archive_workflow( self, request: Request, *, - workflow_id: UUID, - ) -> WorkflowResponse: + artifact_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow = await self.workflows_service.archive_workflow( + artifact = await self.workflows_service.archive_artifact( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_id=workflow_id, + artifact_id=artifact_id, ) - workflow_response = WorkflowResponse( - count=1 if workflow else 0, - workflow=workflow, + artifact_response = WorkflowResponse( + count=1 if artifact is not None else 0, + artifact=artifact, ) - return workflow_response + return artifact_response - @intercept_exceptions() + @handle_exceptions() async def unarchive_workflow( self, request: Request, *, - workflow_id: UUID, - ) -> WorkflowResponse: + artifact_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow = await self.workflows_service.unarchive_workflow( + artifact = await self.workflows_service.unarchive_artifact( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_id=workflow_id, + artifact_id=artifact_id, ) - workflow_response = WorkflowResponse( - count=1 if workflow else 0, - workflow=workflow, + artifact_response = WorkflowResponse( + count=1 if artifact is not None else 0, + artifact=artifact, ) - return workflow_response + return artifact_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowsResponse()) + @handle_exceptions() async def query_workflows( self, request: Request, *, - query_request_params: Optional[WorkflowQueryRequest] = Depends( - parse_workflow_query_request_from_params - ), - ) -> WorkflowsResponse: + query: Optional[WorkflowQuery] = Depends(parse_workflow_query_request), + ): body_json = None - query_request_body = None + query_from_body = None try: body_json = await request.json() if body_json: - query_request_body = parse_workflow_query_request_from_body(**body_json) + query_from_body = parse_workflow_body_request(**body_json) except: # pylint: disable=bare-except pass - workflow_query_request = merge_workflow_query_requests( - query_request_params, - query_request_body, - ) + _query = merge_requests(query, query_from_body) if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflows = await self.workflows_service.query_workflows( - project_id=UUID(request.state.project_id), - # - workflow_query=workflow_query_request.workflow, - # - workflow_refs=workflow_query_request.workflow_refs, - # - include_archived=workflow_query_request.include_archived, - # - windowing=workflow_query_request.windowing, - ) + artifacts = [] + + if _query.artifact_ref: + artifact = await self.workflows_service.fetch_artifact( + project_id=UUID(request.state.project_id), + # + artifact_ref=_query.artifact_ref, + ) + + artifacts = [artifact] + + else: + artifacts = await self.workflows_service.query_artifacts( + project_id=UUID(request.state.project_id), + # + artifact_flags=_query.flags, + artifact_meta=_query.meta, + # + include_archived=_query.include_archived, + ) - workflows_response = WorkflowsResponse( - count=len(workflows), - workflows=workflows, + artifacts_response = WorkflowsResponse( + count=len(artifacts), + artifacts=artifacts, ) - return workflows_response + return artifacts_response - # WORKFLOW VARIANTS -------------------------------------------------------- + # —————————————————————————————————————————————————————————————————————————— - @intercept_exceptions() + # — variants ——————————————————————————————————————————————————————————————— + + @handle_exceptions() async def create_workflow_variant( self, request: Request, *, - workflow_variant_create_request: WorkflowVariantCreateRequest, - ) -> WorkflowVariantResponse: + variant_request: WorkflowVariantRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_variant = await self.workflows_service.create_workflow_variant( + variant = await self.workflows_service.create_variant( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_variant_create=workflow_variant_create_request.workflow_variant, + artifact_id=variant_request.variant.artifact_id, + # + variant_slug=variant_request.variant.slug, + # + variant_flags=variant_request.variant.flags, + variant_meta=variant_request.variant.meta, + variant_name=variant_request.variant.name, + variant_description=variant_request.variant.description, ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowVariantResponse()) + @handle_exceptions() async def fetch_workflow_variant( self, request: Request, *, - workflow_variant_id: UUID, - ) -> WorkflowVariantResponse: + variant_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_variant = await self.workflows_service.fetch_workflow_variant( + variant = await self.workflows_service.fetch_variant( project_id=UUID(request.state.project_id), # - workflow_variant_ref=Reference(id=workflow_variant_id), + variant_ref=Reference(id=variant_id), ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response - @intercept_exceptions() + @handle_exceptions() async def edit_workflow_variant( self, request: Request, *, - workflow_variant_id: UUID, - # - workflow_variant_edit_request: WorkflowVariantEditRequest, - ) -> WorkflowVariantResponse: + variant_id: UUID, + variant_request: WorkflowVariantRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if str(workflow_variant_id) != str( - workflow_variant_edit_request.workflow_variant.id - ): - return WorkflowVariantResponse() + if str(variant_id) != str(variant_request.variant.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {variant_id} != {variant_request.variant.id}", + ) - workflow_variant = await self.workflows_service.edit_workflow_variant( + variant = await self.workflows_service.edit_variant( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_variant_edit=workflow_variant_edit_request.workflow_variant, + variant_id=variant_request.variant.id, + # + variant_flags=variant_request.variant.flags, + variant_meta=variant_request.variant.meta, + variant_name=variant_request.variant.name, + variant_description=variant_request.variant.description, ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response - @intercept_exceptions() + @handle_exceptions() async def archive_workflow_variant( self, request: Request, *, - workflow_variant_id: UUID, - ) -> WorkflowVariantResponse: + variant_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_variant = await self.workflows_service.archive_workflow_variant( + variant = await self.workflows_service.archive_variant( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_variant_id=workflow_variant_id, + variant_id=variant_id, ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response - @intercept_exceptions() + @handle_exceptions() async def unarchive_workflow_variant( self, request: Request, *, - workflow_variant_id: UUID, - ) -> WorkflowVariantResponse: + variant_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_variant = await self.workflows_service.unarchive_workflow_variant( + variant = await self.workflows_service.unarchive_variant( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_variant_id=workflow_variant_id, + variant_id=variant_id, ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowVariantsResponse()) + @handle_exceptions() async def query_workflow_variants( self, request: Request, *, - query_request_params: Optional[WorkflowVariantQueryRequest] = Depends( - parse_workflow_variant_query_request_from_params - ), - ) -> WorkflowVariantsResponse: + query: Optional[WorkflowQuery] = Depends(parse_variant_query_request), + ): body_json = None - query_request_body = None + query_from_body = None try: body_json = await request.json() if body_json: - query_request_body = parse_workflow_variant_query_request_from_body( - **body_json - ) + query_from_body = parse_variant_body_request(**body_json) except: # pylint: disable=bare-except pass - workflow_variant_query_request = merge_workflow_variant_query_requests( - query_request_params, - query_request_body, - ) + _query = merge_requests(query, query_from_body) if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_variants = await self.workflows_service.query_workflow_variants( - project_id=UUID(request.state.project_id), - # - workflow_variant_query=workflow_variant_query_request.workflow_variant, - # - workflow_refs=workflow_variant_query_request.workflow_refs, - workflow_variant_refs=workflow_variant_query_request.workflow_variant_refs, - # - include_archived=workflow_variant_query_request.include_archived, - # - windowing=workflow_variant_query_request.windowing, - ) + variants = [] - workflow_variants_response = WorkflowVariantsResponse( - count=len(workflow_variants), - workflow_variants=workflow_variants, + if _query.artifact_ref or _query.variant_ref: + variant = await self.workflows_service.fetch_variant( + project_id=UUID(request.state.project_id), + # + artifact_ref=_query.artifact_ref, + variant_ref=_query.variant_ref, + ) + + variants = [variant] + + else: + variants = await self.workflows_service.query_variants( + project_id=UUID(request.state.project_id), + # + variant_flags=_query.flags, + variant_meta=_query.meta, + # + include_archived=_query.include_archived, + ) + + variants_response = WorkflowVariantsResponse( + count=len(variants), + variants=variants, ) - return workflow_variants_response + return variants_response - @intercept_exceptions() + # -------------------------------------------------------------------------- + + @handle_exceptions() async def fork_workflow_variant( self, request: Request, *, - workflow_fork_request: WorkflowForkRequest, - ) -> WorkflowVariantResponse: + revision_request: WorkflowRevisionRequest, + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION + + if variant_id: + if str(variant_id) != str(revision_request.revision.variant_id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {variant_id} != {revision_request.revision.variant_id}", + ) + + if revision_request.revision.variant: + if ( + revision_request.revision.variant_id + != revision_request.revision.variant.id + ): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between revision and variant: {revision_request.revision.variant_id} != {revision_request.revision.variant.id}", + ) + + if revision_id: + if str(revision_id) != str(revision_request.revision.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {revision_id} != {revision_request.revision.id}", + ) - workflow_variant = await self.workflows_service.fork_workflow_variant( + if not revision_request.revision.variant: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail="Missing variant in revision request", + ) + + variant = await self.workflows_service.fork_variant( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_fork=workflow_fork_request.workflow, + variant_slug=revision_request.revision.variant.slug, + revision_slug=revision_request.revision.slug, + # + variant_id=revision_request.revision.variant_id, + revision_id=revision_request.revision.id, + # depth=depth, + # + variant_flags=revision_request.revision.variant.flags, + variant_meta=revision_request.revision.variant.meta, + variant_name=revision_request.revision.variant.name, + variant_description=revision_request.revision.variant.description, + # + revision_flags=revision_request.revision.flags, + revision_meta=revision_request.revision.meta, + revision_name=revision_request.revision.name, + revision_description=revision_request.revision.description, + revision_message=revision_request.revision.message, ) - workflow_variant_response = WorkflowVariantResponse( - count=1 if workflow_variant else 0, - workflow_variant=workflow_variant, + variant_response = WorkflowVariantResponse( + count=1 if variant is not None else 0, + variant=variant, ) - return workflow_variant_response + return variant_response + + # —————————————————————————————————————————————————————————————————————————— - # WORKFLOW REVISIONS ------------------------------------------------------- + # — revisions —————————————————————————————————————————————————————————————— - @intercept_exceptions() + @handle_exceptions() async def create_workflow_revision( self, request: Request, *, - workflow_revision_create_request: WorkflowRevisionCreateRequest, - ) -> WorkflowRevisionResponse: + revision_request: WorkflowRevisionRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revision = await self.workflows_service.create_workflow_revision( + revision = await self.workflows_service.create_revision( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_revision_create=workflow_revision_create_request.workflow_revision, + artifact_id=revision_request.revision.artifact_id, + variant_id=revision_request.revision.variant_id, + # + revision_slug=revision_request.revision.slug, + # + revision_flags=revision_request.revision.flags, + revision_meta=revision_request.revision.meta, + revision_name=revision_request.revision.name, + revision_description=revision_request.revision.description, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowRevisionResponse()) + @handle_exceptions() async def fetch_workflow_revision( self, request: Request, *, - workflow_revision_id: UUID, - ) -> WorkflowRevisionResponse: + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revision = await self.workflows_service.fetch_workflow_revision( + revision = await self.workflows_service.fetch_revision( project_id=UUID(request.state.project_id), # - workflow_revision_ref=Reference(id=workflow_revision_id), + variant_ref=variant_ref, + revision_ref=revision_ref, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() + @handle_exceptions() async def edit_workflow_revision( self, request: Request, *, - workflow_revision_id: UUID, - # - workflow_revision_request: WorkflowRevisionEditRequest, - ) -> WorkflowRevisionResponse: + revision_id: UUID, + revision_request: WorkflowRevisionRequest, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if str(workflow_revision_id) != str( - workflow_revision_request.workflow_revision.id - ): - return WorkflowRevisionResponse() + if str(revision_id) != str(revision_request.revision.id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {revision_id} != {revision_request.revision.id}", + ) - workflow_revision = await self.workflows_service.edit_workflow_revision( + revision = await self.workflows_service.edit_revision( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_revision_edit=workflow_revision_request.workflow_revision, + revision_id=revision_request.revision.id, + # + revision_flags=revision_request.revision.flags, + revision_meta=revision_request.revision.meta, + revision_name=revision_request.revision.name, + revision_description=revision_request.revision.description, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() + @handle_exceptions() async def archive_workflow_revision( self, request: Request, *, - workflow_revision_id: UUID, - ) -> WorkflowRevisionResponse: + revision_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revision = await self.workflows_service.archive_workflow_revision( + revision = await self.workflows_service.archive_revision( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_revision_id=workflow_revision_id, + revision_id=revision_id, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() + @handle_exceptions() async def unarchive_workflow_revision( self, request: Request, *, - workflow_revision_id: UUID, - ) -> WorkflowRevisionResponse: + revision_id: UUID, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revision = await self.workflows_service.unarchive_workflow_revision( + revision = await self.workflows_service.unarchive_revision( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_revision_id=workflow_revision_id, + revision_id=revision_id, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowRevisionsResponse()) + @handle_exceptions() async def query_workflow_revisions( self, request: Request, - query_request_params: Optional[WorkflowRevisionQueryRequest] = Depends( - parse_workflow_revision_query_request_from_params - ), - ) -> WorkflowRevisionsResponse: + query: Optional[WorkflowQuery] = Depends(parse_revision_query_request), + ): body_json = None - query_request_body = None + query_from_body = None try: body_json = await request.json() if body_json: - query_request_body = parse_workflow_revision_query_request_from_body( - **body_json - ) + query_from_body = parse_revision_body_request(**body_json) except: # pylint: disable=bare-except pass - workflow_revision_query_request = merge_workflow_revision_query_requests( - query_request_params, query_request_body - ) + _query = merge_requests(query, query_from_body) if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revisions = await self.workflows_service.query_workflow_revisions( - project_id=UUID(request.state.project_id), - # - workflow_revision_query=workflow_revision_query_request.workflow_revision, - # - workflow_refs=workflow_revision_query_request.workflow_refs, - workflow_variant_refs=workflow_revision_query_request.workflow_variant_refs, - workflow_revision_refs=workflow_revision_query_request.workflow_revision_refs, - # - include_archived=workflow_revision_query_request.include_archived, - # - windowing=workflow_revision_query_request.windowing, - ) + revisions = [] + + if _query.variant_ref or _query.revision_ref: + revision = await self.workflows_service.fetch_revision( + project_id=UUID(request.state.project_id), + # + variant_ref=_query.variant_ref, + revision_ref=_query.revision_ref, + ) + + revisions = [revision] - workflow_revisions_response = WorkflowRevisionsResponse( - count=len(workflow_revisions), - workflow_revisions=workflow_revisions, + else: + revisions = await self.workflows_service.query_revisions( + project_id=UUID(request.state.project_id), + # + revision_flags=_query.flags, + revision_meta=_query.meta, + # + include_archived=_query.include_archived, + ) + + revisions_response = WorkflowRevisionsResponse( + count=len(revisions), + revisions=revisions, ) - return workflow_revisions_response + return revisions_response - @intercept_exceptions() + # -------------------------------------------------------------------------- + + @handle_exceptions() async def commit_workflow_revision( self, request: Request, *, - workflow_variant_id: Optional[UUID] = None, - # - workflow_revision_commit_request: WorkflowRevisionCommitRequest, - ) -> WorkflowRevisionResponse: + revision_request: WorkflowRevisionRequest, + variant_id: Optional[UUID] = None, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.EDIT_WORKFLOWS, # type: ignore + permission=Permission.EDIT_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - if str(workflow_variant_id) != str( - workflow_revision_commit_request.workflow_revision.workflow_variant_id - ): - return WorkflowRevisionResponse() + if variant_id: + if str(variant_id) != str(revision_request.revision.variant_id): + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"ID mismatch between path params and body params: {variant_id} != {revision_request.revision.variant_id}", + ) - workflow_revision = await self.workflows_service.commit_workflow_revision( + revision = await self.workflows_service.commit_revision( project_id=UUID(request.state.project_id), user_id=UUID(request.state.user_id), # - workflow_revision_commit=workflow_revision_commit_request.workflow_revision, + variant_id=revision_request.revision.variant_id, + # + revision_flags=revision_request.revision.flags, + revision_meta=revision_request.revision.meta, + revision_name=revision_request.revision.name, + revision_description=revision_request.revision.description, + revision_message=revision_request.revision.message, + revision_data=revision_request.revision.data, ) - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revision_response = WorkflowRevisionResponse( + count=1 if revision is not None else 0, + revision=revision, ) - return workflow_revision_response + return revision_response - @intercept_exceptions() - @suppress_exceptions(default=WorkflowRevisionsResponse()) + @handle_exceptions() async def log_workflow_revisions( self, request: Request, *, - workflow_revisions_log_request: WorkflowRevisionsLogRequest, - ) -> WorkflowRevisionsResponse: + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + depth: Optional[int] = None, + ): if is_ee(): - if not await check_action_access( # type: ignore + if not await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore + permission=Permission.VIEW_WORKFLOWS, ): - raise FORBIDDEN_EXCEPTION # type: ignore + raise FORBIDDEN_EXCEPTION - workflow_revisions = await self.workflows_service.log_workflow_revisions( + revisions = await self.workflows_service.log_revisions( project_id=UUID(request.state.project_id), # - workflow_revisions_log=workflow_revisions_log_request.workflow, + variant_ref=variant_ref, + revision_ref=revision_ref, + depth=depth, ) - workflow_revisions_response = WorkflowRevisionsResponse( - count=len(workflow_revisions), - workflow_revisions=workflow_revisions, - ) - - return workflow_revisions_response - - @intercept_exceptions() - @suppress_exceptions(default=WorkflowRevisionResponse()) - async def retrieve_workflow_revision( - self, - request: Request, - *, - workflow_revision_retrieve_request: WorkflowRevisionRetrieveRequest, - ) -> WorkflowRevisionResponse: - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - cache_key = { - "artifact_ref": workflow_revision_retrieve_request.workflow_ref, - "variant_ref": workflow_revision_retrieve_request.workflow_variant_ref, - "revision_ref": workflow_revision_retrieve_request.workflow_revision_ref, - } - - workflow_revision = None - # workflow_revision = await get_cache( - # namespace="workflows:retrieve", - # project_id=request.state.project_id, - # user_id=request.state.user_id, - # key=cache_key, - # model=WorkflowRevision, - # ) - - if not workflow_revision: - workflow_revision = await self.workflows_service.fetch_workflow_revision( - project_id=UUID(request.state.project_id), - # - workflow_ref=workflow_revision_retrieve_request.workflow_ref, - workflow_variant_ref=workflow_revision_retrieve_request.workflow_variant_ref, - workflow_revision_ref=workflow_revision_retrieve_request.workflow_revision_ref, - ) - - await set_cache( - namespace="workflows:retrieve", - project_id=request.state.project_id, - user_id=request.state.user_id, - key=cache_key, - value=workflow_revision, - ) - - workflow_revision_response = WorkflowRevisionResponse( - count=1 if workflow_revision else 0, - workflow_revision=workflow_revision, + revisions_response = WorkflowRevisionsResponse( + count=len(revisions), + revisions=revisions, ) - return workflow_revision_response - - # WORKFLOW SERVICES -------------------------------------------------------- - - @intercept_exceptions() - @suppress_exceptions(default=WorkflowServiceBatchResponse()) - async def invoke_workflow( - self, - request: Request, - *, - workflow_service_request: WorkflowServiceRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.RUN_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - try: - response = await self.workflows_service.invoke_workflow( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - request=workflow_service_request, - ) - - return await handle_invoke_success(request, response) - - except Exception as exception: - return await handle_invoke_failure(exception) - - @intercept_exceptions() - @suppress_exceptions(default=WorkflowServiceRequest()) - async def inspect_workflow( - self, - request: Request, - *, - workflow_service_request: WorkflowServiceRequest, - ): - if is_ee(): - if not await check_action_access( # type: ignore - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_WORKFLOWS, # type: ignore - ): - raise FORBIDDEN_EXCEPTION # type: ignore - - try: - workflow_service_request = await self.workflows_service.inspect_workflow( - project_id=UUID(request.state.project_id), - user_id=UUID(request.state.user_id), - # - request=workflow_service_request, - ) - - return await handle_inspect_success(workflow_service_request) + return revisions_response - except Exception as exception: - return await handle_inspect_failure(exception) + # —————————————————————————————————————————————————————————————————————————— diff --git a/api/oss/src/apis/fastapi/workflows/utils.py b/api/oss/src/apis/fastapi/workflows/utils.py index adcc3b2163..9e411a80d7 100644 --- a/api/oss/src/apis/fastapi/workflows/utils.py +++ b/api/oss/src/apis/fastapi/workflows/utils.py @@ -1,628 +1,285 @@ -from typing import Optional, Literal, List -from uuid import UUID -from datetime import datetime +from typing import Optional +from json import loads from fastapi import Query from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.dtos import ( - Windowing, - Reference, -) -from oss.src.core.workflows.dtos import ( - WorkflowFlags, - WorkflowQueryFlags, - # - WorkflowQuery, - WorkflowVariantQuery, - WorkflowRevisionQuery, -) - -from oss.src.apis.fastapi.shared.utils import ( - parse_metadata, -) -from oss.src.apis.fastapi.workflows.models import ( - WorkflowQueryRequest, - WorkflowVariantQueryRequest, - WorkflowRevisionQueryRequest, - WorkflowRevisionRetrieveRequest, -) +from oss.src.core.shared.dtos import Reference, Tags +from oss.src.core.workflows.dtos import WorkflowFlags, WorkflowQuery log = get_module_logger(__name__) -def parse_workflow_query_request_from_params( - workflow_id: Optional[UUID] = Query(None), - workflow_ids: Optional[List[UUID]] = Query(None), - workflow_slug: Optional[str] = Query(None), - workflow_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # +def parse_workflow_query_request( + workflow_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + workflow_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), + workflow_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> WorkflowQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = WorkflowQueryFlags(**_flags) if _flags else None # type: ignore - - workflow = ( - WorkflowQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) +) -> WorkflowQuery: + if workflow_ref: + try: + workflow_ref = Reference(**loads(workflow_ref)) + except Exception: # pylint: disable=broad-except + workflow_ref = None - workflow_refs = ( - ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - ] - if workflow_id or workflow_slug - else [] - ) - + ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - for workflow_id, workflow_slug in zip( - workflow_ids, - workflow_slugs, - ) - ] - if workflow_ids and workflow_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) + log.error("Failed to parse workflow_ref (%s)", workflow_ref) + + if workflow_flags: + try: + workflow_flags = WorkflowFlags(**loads(workflow_flags)) + except Exception: # pylint: disable=broad-except + workflow_flags = None - return parse_workflow_query_request_from_body( - workflow=workflow, + log.error("Failed to parse workflow_flags (%s)", workflow_flags) + + if workflow_meta: + try: + workflow_meta = loads(workflow_meta) + except Exception: # pylint: disable=broad-except + workflow_meta = None + + log.error(f"Failed to parse workflow_meta ({workflow_meta})") + + return parse_workflow_body_request( + workflow_ref=workflow_ref, # - workflow_refs=workflow_refs, + workflow_flags=workflow_flags, + workflow_meta=workflow_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_workflow_query_request_from_body( - workflow: Optional[WorkflowQuery] = None, +def parse_workflow_body_request( + workflow_ref: Optional[Reference] = None, # - workflow_refs: Optional[List[Reference]] = None, + workflow_flags: Optional[WorkflowFlags] = None, + workflow_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> WorkflowQueryRequest: - workflow_query_request = None +) -> WorkflowQuery: + _query = None try: - workflow_query_request = WorkflowQueryRequest( - workflow=workflow, + _query = WorkflowQuery( + workflow_ref=workflow_ref, # - workflow_refs=workflow_refs, + flags=workflow_flags, + meta=workflow_meta, # include_archived=include_archived, - # - windowing=windowing, ) except Exception as e: # pylint: disable=broad-except - workflow_query_request = WorkflowQueryRequest() + log.warn("Error parsing workflow body request: %s", e) + + _query = None + + return _query + + +def parse_variant_query_request( + workflow_ref: Optional[str] = Query( + None, + description='JSON string of reference, e.g. {"key": value}', + ), + variant_ref: Optional[str] = Query( + None, + description='JSON string of reference, e.g. {"key": value}', + ), + variant_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), + variant_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), + include_archived: Optional[bool] = Query(None), +) -> WorkflowQuery: + if workflow_ref: + try: + workflow_ref = Reference(**loads(workflow_ref)) + except Exception: # pylint: disable=broad-except + workflow_ref = None - return workflow_query_request + log.error("Failed to parse workflow_ref (%s)", workflow_ref) + if variant_ref: + try: + variant_ref = Reference(**loads(variant_ref)) + except Exception: # pylint: disable=broad-except + variant_ref = None -def merge_workflow_query_requests( - query_request_params: Optional[WorkflowQueryRequest] = None, - query_request_body: Optional[WorkflowQueryRequest] = None, -) -> WorkflowQueryRequest: - if query_request_params and not query_request_body: - return query_request_params + log.error("Failed to parse variant_ref (%s)", variant_ref) - if not query_request_params and query_request_body: - return query_request_body + if variant_flags: + try: + variant_flags = WorkflowFlags(**loads(variant_flags)) + except Exception: # pylint: disable=broad-except + variant_flags = None - if query_request_params and query_request_body: - return WorkflowQueryRequest( - workflow=query_request_body.workflow or query_request_params.workflow, - # - workflow_refs=query_request_body.workflow_refs - or query_request_params.workflow_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) + log.error("Failed to parse variant_flags (%s)", variant_flags) - return WorkflowQueryRequest() + if variant_meta: + try: + variant_meta = loads(variant_meta) + except Exception: # pylint: disable=broad-except + variant_meta = None + log.error(f"Failed to parse variant_meta ({variant_meta})") -def parse_workflow_variant_query_request_from_params( - workflow_id: Optional[UUID] = Query(None), - workflow_ids: Optional[List[UUID]] = Query(None), - workflow_slug: Optional[str] = Query(None), - workflow_slugs: Optional[List[str]] = Query(None), - # - workflow_variant_id: Optional[UUID] = Query(None), - workflow_variant_ids: Optional[List[UUID]] = Query(None), - workflow_variant_slug: Optional[str] = Query(None), - workflow_variant_slugs: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # - include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> WorkflowVariantQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = WorkflowQueryFlags(**_flags) if _flags else None # type: ignore - - workflow_variant = ( - WorkflowVariantQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - workflow_refs = ( - ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - ] - if workflow_id or workflow_slug - else [] - ) - + ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - for workflow_id, workflow_slug in zip( - workflow_ids, - workflow_slugs, - ) - ] - if workflow_ids and workflow_slugs - else [] - ) - ) or None - - workflow_variant_refs = ( - ( - [ - Reference( - id=workflow_variant_id, - slug=workflow_variant_slug, - ) - ] - if workflow_variant_id or workflow_variant_slug - else [] - ) - + ( - [ - Reference( - id=workflow_variant_id, - slug=workflow_variant_slug, - ) - for workflow_variant_id, workflow_variant_slug in zip( - workflow_variant_ids, - workflow_variant_slugs, - ) - ] - if workflow_variant_ids and workflow_variant_slugs - else [] - ) - ) or None - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_workflow_variant_query_request_from_body( - workflow_variant=workflow_variant, + return parse_variant_body_request( + workflow_ref=workflow_ref, + variant_ref=variant_ref, # - workflow_refs=workflow_refs or None, - workflow_variant_refs=workflow_variant_refs or None, + variant_flags=variant_flags, + variant_meta=variant_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_workflow_variant_query_request_from_body( - workflow_variant: Optional[WorkflowVariantQuery] = None, +def parse_variant_body_request( + workflow_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, # - workflow_refs: Optional[List[Reference]] = None, - workflow_variant_refs: Optional[List[Reference]] = None, + variant_flags: Optional[WorkflowFlags] = None, + variant_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> WorkflowVariantQueryRequest: - workflow_variant_query_request = None +) -> WorkflowQuery: + _query = None try: - workflow_variant_query_request = WorkflowVariantQueryRequest( - workflow_variant=workflow_variant, + _query = WorkflowQuery( + artifact_ref=workflow_ref, + variant_ref=variant_ref, # - workflow_refs=workflow_refs, - workflow_variant_refs=workflow_variant_refs, + flags=variant_flags, + meta=variant_meta, # include_archived=include_archived, - # - windowing=windowing, ) except Exception as e: # pylint: disable=broad-except - workflow_variant_query_request = WorkflowVariantQueryRequest() - - return workflow_variant_query_request - - -def merge_workflow_variant_query_requests( - query_request_params: Optional[WorkflowVariantQueryRequest] = None, - query_request_body: Optional[WorkflowVariantQueryRequest] = None, -) -> WorkflowVariantQueryRequest: - if query_request_params and not query_request_body: - return query_request_params - - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return WorkflowVariantQueryRequest( - workflow_variant=query_request_body.workflow_variant - or query_request_params.workflow_variant, - # - workflow_refs=query_request_body.workflow_refs - or query_request_params.workflow_refs, - workflow_variant_refs=query_request_body.workflow_variant_refs - or query_request_params.workflow_variant_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) - - return WorkflowVariantQueryRequest() - - -def parse_workflow_revision_query_request_from_params( - workflow_id: Optional[UUID] = Query(None), - workflow_ids: Optional[List[UUID]] = Query(None), - workflow_slug: Optional[str] = Query(None), - workflow_slugs: Optional[List[str]] = Query(None), - # - workflow_variant_id: Optional[UUID] = Query(None), - workflow_variant_ids: Optional[List[UUID]] = Query(None), - workflow_variant_slug: Optional[str] = Query(None), - workflow_variant_slugs: Optional[List[str]] = Query(None), - # - workflow_revision_id: Optional[UUID] = Query(None), - workflow_revision_ids: Optional[List[UUID]] = Query(None), - workflow_revision_slug: Optional[str] = Query(None), - workflow_revision_slugs: Optional[List[str]] = Query(None), - workflow_revision_version: Optional[str] = Query(None), - workflow_revision_versions: Optional[List[str]] = Query(None), - # - name: Optional[str] = Query(None), - description: Optional[str] = Query(None), - # - flags: Optional[str] = Query(None), - tags: Optional[str] = Query(None), - meta: Optional[str] = Query(None), - # + log.warn("Error parsing variant body request: %s", e) + + _query = None + + return _query + + +def parse_revision_query_request( + variant_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + revision_ref: Optional[str] = Query( + None, + description='JSON string of ref, e.g. {"key": value}', + ), + revision_meta: Optional[str] = Query( + None, description='JSON string of meta, e.g. {"key": value}' + ), + revision_flags: Optional[str] = Query( + None, description='JSON string of flags, e.g. {"key": value}' + ), include_archived: Optional[bool] = Query(None), - # - next: Optional[UUID] = Query(None), # pylint disable=redefined-builtin - newest: Optional[datetime] = Query(None), - oldest: Optional[datetime] = Query(None), - limit: Optional[int] = Query(None), - order: Optional[Literal["ascending", "descending"]] = Query(None), -) -> WorkflowRevisionQueryRequest: - _flags, _tags, _meta = parse_metadata(flags, tags, meta) - - __flags = WorkflowQueryFlags(**_flags) if _flags else None # type: ignore - - workflow_revision = ( - WorkflowRevisionQuery( - name=name, - description=description, - # - flags=__flags, - meta=_meta, - tags=_tags, - ) - if __flags or _meta or _tags - else None - ) - - workflow_refs = ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - ] - if workflow_id or workflow_slug - else [] - ) + ( - [ - Reference( - id=workflow_id, - slug=workflow_slug, - ) - for workflow_id, workflow_slug in zip( - workflow_ids, - workflow_slugs, - ) - ] - if workflow_ids and workflow_slugs - else [] - ) - - workflow_variant_refs = ( - [ - Reference( - id=workflow_variant_id, - slug=workflow_variant_slug, - ) - ] - if workflow_variant_id or workflow_variant_slug - else [] - ) + ( - [ - Reference( - id=workflow_variant_id, - slug=workflow_variant_slug, - ) - for workflow_variant_id, workflow_variant_slug in zip( - workflow_variant_ids, - workflow_variant_slugs, - ) - ] - if workflow_variant_ids and workflow_variant_slugs - else [] - ) - - workflow_revision_refs = ( - [ - Reference( - id=workflow_revision_id, - slug=workflow_revision_slug, - version=workflow_revision_version, - ) - ] - if workflow_revision_id or workflow_revision_slug or workflow_revision_version - else [] - ) + ( - [ - Reference( - id=workflow_revision_id, - slug=workflow_revision_slug, - version=workflow_revision_version, - ) - for workflow_revision_id, workflow_revision_slug, workflow_revision_version in zip( - workflow_revision_ids, - workflow_revision_slugs, - workflow_revision_versions, - ) - ] - if workflow_revision_ids - and workflow_revision_slugs - and workflow_revision_versions - else [] - ) - - windowing = ( - Windowing( - next=next, - newest=newest, - oldest=oldest, - limit=limit, - order=order, - ) - if next or newest or oldest or limit or order - else None - ) - - return parse_workflow_revision_query_request_from_body( - workflow_revision=workflow_revision, +) -> WorkflowQuery: + if variant_ref: + try: + variant_ref = Reference(**loads(variant_ref)) + except Exception: # pylint: disable=broad-except + variant_ref = None + + log.error("Failed to parse variant_ref (%s)", variant_ref) + + if revision_ref: + try: + revision_ref = Reference(**loads(revision_ref)) + except Exception: # pylint: disable=broad-except + revision_ref = None + + log.error("Failed to parse revision_ref (%s)", revision_ref) + + if revision_flags: + try: + revision_flags = WorkflowFlags(**loads(revision_flags)) + except Exception: # pylint: disable=broad-except + revision_flags = None + + log.error("Failed to parse revision_flags (%s)", revision_flags) + + if revision_meta: + try: + revision_meta = loads(revision_meta) + except Exception: # pylint: disable=broad-except + revision_meta = None + + log.error(f"Failed to parse revision_meta ({revision_meta})") + + return parse_revision_body_request( + variant_ref=variant_ref, + revision_ref=revision_ref, # - workflow_refs=workflow_refs, - workflow_variant_refs=workflow_variant_refs, - workflow_revision_refs=workflow_revision_refs, + revision_flags=revision_flags, + revision_meta=revision_meta, # include_archived=include_archived, - # - windowing=windowing, ) -def parse_workflow_revision_query_request_from_body( - workflow_revision: Optional[WorkflowRevisionQuery] = None, +def parse_revision_body_request( + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, # - workflow_refs: Optional[List[Reference]] = None, - workflow_variant_refs: Optional[List[Reference]] = None, - workflow_revision_refs: Optional[List[Reference]] = None, + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, -) -> WorkflowRevisionQueryRequest: - workflow_revision_query_request = None +) -> WorkflowQuery: + _query = None try: - workflow_revision_query_request = WorkflowRevisionQueryRequest( - workflow_revision=workflow_revision, + _query = WorkflowQuery( + variant_ref=variant_ref, + revision_ref=revision_ref, # - workflow_refs=workflow_refs, - workflow_variant_refs=workflow_variant_refs, - workflow_revision_refs=workflow_revision_refs, + flags=revision_flags, + meta=revision_meta, # include_archived=include_archived, - # - windowing=windowing, ) - except Exception as e: # pylint: disable=broad-except log.warn(e) - workflow_revision_query_request = WorkflowRevisionQueryRequest() - - return workflow_revision_query_request - - -def merge_workflow_revision_query_requests( - query_request_params: Optional[WorkflowRevisionQueryRequest] = None, - query_request_body: Optional[WorkflowRevisionQueryRequest] = None, -) -> WorkflowRevisionQueryRequest: - if query_request_params and not query_request_body: - return query_request_params + _query = None - if not query_request_params and query_request_body: - return query_request_body - - if query_request_params and query_request_body: - return WorkflowRevisionQueryRequest( - workflow_revision=query_request_body.workflow_revision - or query_request_params.workflow_revision, - # - workflow_refs=query_request_body.workflow_refs - or query_request_params.workflow_refs, - workflow_variant_refs=query_request_body.workflow_variant_refs - or query_request_params.workflow_variant_refs, - workflow_revision_refs=query_request_body.workflow_revision_refs - or query_request_params.workflow_revision_refs, - # - include_archived=query_request_body.include_archived - or query_request_params.include_archived, - # - windowing=query_request_body.windowing or query_request_params.windowing, - ) + return _query - return WorkflowRevisionQueryRequest() +def merge_requests( + query_param: Optional[WorkflowQuery] = None, + query_body: Optional[WorkflowQuery] = None, +) -> WorkflowQuery: + if query_body is None: + return query_param -def parse_workflow_revision_retrieve_request_from_params( - workflow_id: Optional[UUID] = Query(None), - workflow_slug: Optional[str] = Query(None), - # - workflow_variant_id: Optional[UUID] = Query(None), - workflow_variant_slug: Optional[str] = Query(None), - # - workflow_revision_id: Optional[UUID] = Query(None), - workflow_revision_slug: Optional[str] = Query(None), - workflow_revision_version: Optional[str] = Query(None), -): - workflow_ref = ( - Reference( - id=workflow_id, - slug=workflow_slug, - ) - if workflow_id or workflow_slug - else None - ) + if query_param is None: + return query_body - workflow_variant_ref = ( - Reference( - id=workflow_variant_id, - slug=workflow_variant_slug, - ) - if workflow_variant_id or workflow_variant_slug - else None - ) - - workflow_revision_ref = ( - Reference( - id=workflow_revision_id, - slug=workflow_revision_slug, - version=workflow_revision_version, - ) - if workflow_revision_id or workflow_revision_slug or workflow_revision_version - else None - ) - - return parse_workflow_revision_retrieve_request_from_body( - workflow_ref=workflow_ref, - workflow_variant_ref=workflow_variant_ref, - workflow_revision_ref=workflow_revision_ref, - ) - - -def parse_workflow_revision_retrieve_request_from_body( - workflow_ref: Optional[Reference] = None, - workflow_variant_ref: Optional[Reference] = None, - workflow_revision_ref: Optional[Reference] = None, -) -> WorkflowRevisionRetrieveRequest: - return WorkflowRevisionRetrieveRequest( - workflow_ref=workflow_ref, - workflow_variant_ref=workflow_variant_ref, - workflow_revision_ref=workflow_revision_ref, + return WorkflowQuery( + artifact_ref=query_body.artifact_ref or query_param.artifact_ref, + variant_ref=query_body.variant_ref or query_param.variant_ref, + revision_ref=query_body.revision_ref or query_param.revision_ref, + # + flags=query_body.flags or query_param.flags, + meta=query_body.meta or query_param.meta, + # + include_archived=query_body.include_archived or query_param.include_archived, ) diff --git a/api/oss/src/celery_config.py b/api/oss/src/celery_config.py index 5e60096278..6bb3890b15 100644 --- a/api/oss/src/celery_config.py +++ b/api/oss/src/celery_config.py @@ -3,22 +3,18 @@ from oss.src.utils.env import env -broker_url = env.CELERY_BROKER_URL -result_backend = env.CELERY_RESULT_BACKEND -task_serializer = "json" -accept_content = ["json"] -result_serializer = "json" -timezone = "UTC" -worker_hijack_root_logger = False -# CELERY_TASK_TRACK_STARTED = True +BROKER_URL = env.CELERY_BROKER_URL +CELERY_RESULT_BACKEND = env.CELERY_RESULT_BACKEND +CELERY_TASK_SERIALIZER = "json" +CELERY_ACCEPT_CONTENT = ["json"] +CELERY_RESULT_SERIALIZER = "json" +CELERY_TIMEZONE = "UTC" +CELERY_TASK_TRACK_STARTED = True -TASK_NAMES = [ - "src.tasks.evaluations.legacy.annotate", - "src.tasks.evaluations.live.evaluate", - "src.tasks.evaluations.batch.evaluate_queries", - "src.tasks.evaluations.batch.evaluate_testsets", -] - -task_routes = {name: {"queue": name, "routing_key": name} for name in TASK_NAMES} - -task_queues = [Queue(name, Exchange(name), routing_key=name) for name in TASK_NAMES] +CELERY_QUEUES = ( + Queue( + "src.tasks.evaluations.evaluate", + Exchange("src.tasks.evaluations.evaluate"), + routing_key="src.tasks.evaluations.evaluate", + ), +) diff --git a/api/oss/src/core/annotations/service.py b/api/oss/src/core/annotations/service.py deleted file mode 100644 index c7229ffbdc..0000000000 --- a/api/oss/src/core/annotations/service.py +++ /dev/null @@ -1,1165 +0,0 @@ -from typing import Optional, List, Dict, Any, Union -from uuid import UUID, uuid4 - -from fastapi import Request -from genson import SchemaBuilder - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService - -from oss.src.core.shared.dtos import ( - Tags, - Meta, - Data, - Reference, - Link, - Windowing, -) -from oss.src.core.tracing.dtos import ( - Focus, - Format, - TracingQuery, - Formatting, - Condition, - Filtering, - OTelReference, - OTelLink, - LogicalOperator, - ComparisonOperator, - ListOperator, - TraceType, - SpanType, -) -from oss.src.core.evaluators.dtos import ( - SimpleEvaluatorFlags, - SimpleEvaluatorQueryFlags, - # - SimpleEvaluatorData, -) - - -from oss.src.core.tracing.utils import ( - parse_into_attributes, - parse_from_attributes, -) -from oss.src.core.annotations.types import ( - AnnotationOrigin, - AnnotationKind, - AnnotationChannel, - AnnotationReferences, - AnnotationLinks, - AnnotationFlags, - AnnotationQueryFlags, - # - Annotation, - AnnotationCreate, - AnnotationEdit, - AnnotationQuery, -) - -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.tracing.models import ( - OTelFlatSpan, - OTelTracingRequest, - OTelTracingResponse, -) -from oss.src.apis.fastapi.evaluators.models import SimpleEvaluatorCreate - -from oss.src.core.annotations.utils import validate_data_against_schema - - -log = get_module_logger(__name__) - - -class AnnotationsService: - def __init__( - self, - *, - evaluators_service: EvaluatorsService, - simple_evaluators_service: SimpleEvaluatorsService, - tracing_router: TracingRouter, - ): - self.evaluators_service = evaluators_service - self.simple_evaluators_service = simple_evaluators_service - self.tracing_router = tracing_router - - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - annotation_create: AnnotationCreate, - ) -> Optional[Annotation]: - simple_evaluator_slug = ( - annotation_create.references.evaluator.slug - if annotation_create.references.evaluator - else None - ) or uuid4().hex[-12:] - - simple_evaluator_flags = SimpleEvaluatorFlags( - is_evaluator=True, - is_custom=annotation_create.origin == AnnotationOrigin.CUSTOM, - is_human=annotation_create.origin == AnnotationOrigin.HUMAN, - ) - - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_ref=annotation_create.references.evaluator, - evaluator_variant_ref=annotation_create.references.evaluator_variant, - evaluator_revision_ref=annotation_create.references.evaluator_revision, - ) - - if evaluator_revision is None: - builder = SchemaBuilder() - builder.add_object(annotation_create.data) - evaluator_outputs_schema: Dict[str, Any] = builder.to_schema() - - simple_evaluator_data = SimpleEvaluatorData( - schemas=dict( - outputs=evaluator_outputs_schema, - ), - service=dict( - agenta="v0.1.0", - format=evaluator_outputs_schema, - ), - ) - - simple_evaluator_create = SimpleEvaluatorCreate( - slug=simple_evaluator_slug, - # - name=simple_evaluator_slug, - # - flags=simple_evaluator_flags, - # - data=simple_evaluator_data, - ) - - simple_evaluator = await self.simple_evaluators_service.create( - project_id=project_id, - user_id=user_id, - # - simple_evaluator_create=simple_evaluator_create, - ) - - if simple_evaluator: - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_ref=Reference(id=simple_evaluator.id), - ) - elif evaluator_revision.evaluator_id: - simple_evaluator = await self.simple_evaluators_service.fetch( - project_id=project_id, - evaluator_id=evaluator_revision.evaluator_id, - ) - else: - simple_evaluator = None - - if not evaluator_revision or not evaluator_revision.data: - return None - - validate_data_against_schema( - annotation_create.data, - ( - evaluator_revision.data.service.get("format", {}) - if evaluator_revision.data.service - else {} - ), - ) - - annotation_create.references.evaluator = Reference( - id=evaluator_revision.evaluator_id, - slug=( - annotation_create.references.evaluator.slug - if annotation_create.references.evaluator - else None - ), - ) - - annotation_create.references.evaluator_variant = Reference( - id=evaluator_revision.evaluator_variant_id, - slug=( - annotation_create.references.evaluator_variant.slug - if annotation_create.references.evaluator_variant - else None - ), - ) - - annotation_create.references.evaluator_revision = Reference( - id=evaluator_revision.id, - slug=evaluator_revision.slug, - version=evaluator_revision.version, - ) - - annotation_flags = AnnotationFlags( - is_evaluator=True, - is_custom=annotation_create.origin == AnnotationOrigin.CUSTOM, - is_human=annotation_create.origin == AnnotationOrigin.HUMAN, - is_sdk=annotation_create.channel == AnnotationChannel.SDK, - is_web=annotation_create.channel == AnnotationChannel.WEB, - is_evaluation=annotation_create.kind == AnnotationKind.EVAL, - ) - - annotation_references = AnnotationReferences( - **annotation_create.references.model_dump(), - ) - - annotation_link = await self._create_annotation( - project_id=project_id, - user_id=user_id, - # - name=simple_evaluator.name if simple_evaluator else None, - # - flags=annotation_flags, - tags=annotation_create.tags, - meta=annotation_create.meta, - # - data=annotation_create.data, - # - references=annotation_references, - links=annotation_create.links, - ) - - if annotation_link is None: - return None - - annotation = await self._fetch_annotation( - project_id=project_id, - # - annotation_link=annotation_link, - ) - - return annotation - - async def fetch( - self, - *, - project_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - ): - annotation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - annotation: Optional[Annotation] = await self._fetch_annotation( - project_id=project_id, - # - annotation_link=annotation_link, - ) - return annotation - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - # - annotation_edit: AnnotationEdit, - ): - annotation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - annotation: Optional[Annotation] = await self._fetch_annotation( - project_id=project_id, - # - annotation_link=annotation_link, - ) - - if annotation is None: - return None - - simple_evaluator_slug = ( - annotation.references.evaluator.slug - if annotation.references.evaluator - else None - ) or uuid4().hex[-12:] - - simple_evaluator_flags = SimpleEvaluatorFlags( - is_evaluator=True, - is_custom=annotation.origin == AnnotationOrigin.CUSTOM, - is_human=annotation.origin == AnnotationOrigin.HUMAN, - ) - - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_ref=annotation.references.evaluator, - evaluator_variant_ref=annotation.references.evaluator_variant, - evaluator_revision_ref=annotation.references.evaluator_revision, - ) - - if not evaluator_revision: - builder = SchemaBuilder() - builder.add_object(annotation_edit.data) - evaluator_outputs_schema: Dict[str, Any] = builder.to_schema() - - simple_evaluator_data = SimpleEvaluatorData( - schemas=dict( - outputs=evaluator_outputs_schema, - ), - service=dict( - agenta="v0.1.0", - format=evaluator_outputs_schema, - ), - ) - - simple_evaluator_create = SimpleEvaluatorCreate( - slug=simple_evaluator_slug, - # - name=simple_evaluator_slug, - # - flags=simple_evaluator_flags, - # - data=simple_evaluator_data, - ) - - simple_evaluator = await self.simple_evaluators_service.create( - project_id=project_id, - user_id=user_id, - # - simple_evaluator_create=simple_evaluator_create, - ) - - if simple_evaluator: - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_ref=Reference(id=simple_evaluator.id), - ) - - if not evaluator_revision or not evaluator_revision.data: - return None - - validate_data_against_schema( - annotation_edit.data, - ( - evaluator_revision.data.service.get("format", {}) - if evaluator_revision.data.service - else {} - ), - ) - - if evaluator_revision: - annotation.references.evaluator = Reference( - id=evaluator_revision.evaluator_id, - slug=( - annotation.references.evaluator.slug - if annotation.references.evaluator - else None - ), - ) - - annotation.references.evaluator_variant = Reference( - id=evaluator_revision.evaluator_variant_id, - slug=( - annotation.references.evaluator_variant.slug - if annotation.references.evaluator_variant - else None - ), - ) - - annotation.references.evaluator_revision = Reference( - id=evaluator_revision.id, - slug=evaluator_revision.slug, - version=evaluator_revision.version, - ) - - annotation_flags = AnnotationFlags( - is_evaluator=True, - is_custom=annotation.origin == AnnotationOrigin.CUSTOM, - is_human=annotation.origin == AnnotationOrigin.HUMAN, - is_sdk=annotation.channel == AnnotationChannel.SDK, - is_web=annotation.channel == AnnotationChannel.WEB, - is_evaluation=annotation.kind == AnnotationKind.EVAL, - ) - - annotation_references = AnnotationReferences( - **annotation.references.model_dump(), - ) - - annotation_link = await self._edit_annotation( - project_id=project_id, - user_id=user_id, - # - annotation=annotation, - # - flags=annotation_flags, - tags=annotation_edit.tags, - meta=annotation_edit.meta, - # - data=annotation_edit.data, - # - references=annotation_references, - links=annotation.links, - ) - - if annotation_link is None: - return None - - annotation = await self._fetch_annotation( - project_id=project_id, - # - annotation_link=annotation_link, - ) - - return annotation - - async def delete( - self, - *, - project_id: UUID, - user_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - ): - annotation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - annotation_link = await self._delete_annotation( - project_id=project_id, - user_id=user_id, - # - annotation_link=annotation_link, - ) - - return annotation_link - - async def query( - self, - *, - project_id: UUID, - # - annotation_query: Optional[AnnotationQuery] = None, - # - annotation_links: Optional[AnnotationLinks] = None, - # - windowing: Optional[Windowing] = None, - ): - annotation = annotation_query if annotation_query else None - annotation_flags = AnnotationQueryFlags(is_evaluator=True) - - if annotation: - if annotation.origin: - annotation_flags.is_custom = ( - annotation.origin == AnnotationOrigin.CUSTOM - ) - annotation_flags.is_human = annotation.origin == AnnotationOrigin.HUMAN - - if annotation.channel: - annotation_flags.is_sdk = annotation.channel == AnnotationChannel.SDK - annotation_flags.is_web = annotation.channel == AnnotationChannel.WEB - - if annotation.kind: - annotation_flags.is_evaluation = annotation.kind == AnnotationKind.EVAL - - annotation_tags = annotation.tags if annotation else None - annotation_meta = annotation.meta if annotation else None - - annotation_references = ( - AnnotationReferences( - **annotation.references.model_dump(), - ) - if annotation and annotation.references - else None - ) - - _annotation_links = annotation.links if annotation else None - - annotations = await self._query_annotation( - project_id=project_id, - # - flags=annotation_flags, - tags=annotation_tags, - meta=annotation_meta, - # - references=annotation_references, - links=_annotation_links, - # - annotation_links=annotation_links, - # - windowing=windowing, - ) - return annotations - - # -------- Internal Functions ------------------------------------------------------------------- - - async def _create_annotation( - self, - *, - project_id: UUID, - user_id: UUID, - # - name: Optional[str], - # - flags: AnnotationFlags, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - data: Data, - # - references: AnnotationReferences, - links: AnnotationLinks, - ) -> Optional[Link]: - trace_id = uuid4().hex - trace_type = TraceType.ANNOTATION - - span_id = uuid4().hex[16:] - span_type = SpanType.TASK - span_name = name or references.evaluator.slug or "annotation" - - _references = references.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - - if isinstance(links, dict): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": key}, # type: ignore - ) - for key, link in links.items() - if link.trace_id and link.span_id - ] - elif isinstance(links, list): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": "key"}, # type: ignore - ) - for link in links - if link.trace_id and link.span_id - ] - - else: - _links = None - - _flags = flags.model_dump(mode="json", exclude_none=True) - - _type = { - "trace": "annotation", - "span": "task", - } - - _attributes = parse_into_attributes( - type=_type, - flags=_flags, - tags=tags, - meta=meta, - data=data, - references=_references, - ) - - trace_request = OTelTracingRequest( - spans=[ - OTelFlatSpan( - trace_id=trace_id, - trace_type=trace_type, - span_id=span_id, - span_type=span_type, - span_name=span_name, - attributes=_attributes, - links=_links, - ) - ] - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - _links_response = await self.tracing_router.create_trace( - request=request, - # - trace_request=trace_request, - ) - - _link = ( - Link( - trace_id=_links_response.links[0].trace_id, - span_id=_links_response.links[0].span_id, - ) - if _links_response.links and len(_links_response.links) > 0 - else None - ) - - return _link - - async def _fetch_annotation( - self, - *, - project_id: UUID, - user_id: Optional[UUID] = None, - # - annotation_link: Link, - ) -> Optional[Annotation]: - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) if user_id else None - - if not annotation_link.trace_id: - return None - - trace_response: OTelTracingResponse = await self.tracing_router.fetch_trace( - request=request, - # - trace_id=annotation_link.trace_id, - ) - - if not trace_response or not trace_response.traces: - return None - - traces = list(trace_response.traces.values()) - trace = traces[0] if traces else None - - if not trace or not trace.spans: - return None - - spans = list(trace.spans.values()) - root_span = spans[0] if spans else None - - if not root_span or isinstance(root_span, list): - return None - - ( - type, - flags, - tags, - meta, - data, - references, - ) = parse_from_attributes(root_span.attributes or {}) - - if not data: - return None - - _references = AnnotationReferences( - **{ - key: Reference( - id=ref.get("id"), - slug=ref.get("slug"), - version=ref.get("version"), - ) - for key, ref in (references or {}).items() - } - ) - - _links = dict( - **{ - str(link.attributes["key"]): Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - for link in root_span.links or [] - if link.attributes and "key" in link.attributes - } - ) - - _origin = ( - ( - flags.get("is_custom") - and AnnotationOrigin.CUSTOM - or flags.get("is_human") - and AnnotationOrigin.HUMAN - or AnnotationOrigin.AUTO - ) - if flags - else AnnotationOrigin.CUSTOM - ) - - _kind = ( - (flags.get("is_evaluation") and AnnotationKind.EVAL or AnnotationKind.ADHOC) - if flags - else AnnotationKind.ADHOC - ) - - _channel = ( - ( - flags.get("is_sdk") - and AnnotationChannel.SDK - or flags.get("is_web") - and AnnotationChannel.WEB - or AnnotationChannel.API - ) - if flags - else AnnotationChannel.API - ) - - annotation = Annotation( - trace_id=root_span.trace_id, - span_id=root_span.span_id, - # - created_at=root_span.created_at, - updated_at=root_span.updated_at, - deleted_at=root_span.deleted_at, - created_by_id=root_span.created_by_id, - updated_by_id=root_span.updated_by_id, - deleted_by_id=root_span.deleted_by_id, - # - origin=_origin, - kind=_kind, - channel=_channel, - # - tags=tags, - meta=meta, - # - data=data, - # - references=_references, - links=_links, - ) - - return annotation - - async def _edit_annotation( - self, - *, - project_id: UUID, - user_id: UUID, - # - annotation: Annotation, - # - flags: AnnotationFlags, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - data: Data, - # - references: AnnotationReferences, - links: AnnotationLinks, - ) -> Optional[Link]: - if not annotation.trace_id or not annotation.span_id: - return None - - _references = references.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - - if isinstance(links, dict): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": key}, # type: ignore - ) - for key, link in links.items() - if link.trace_id and link.span_id - ] - elif isinstance(links, list): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": "key"}, # type: ignore - ) - for link in links - if link.trace_id and link.span_id - ] - else: - _links = None - - _flags = flags.model_dump(mode="json", exclude_none=True) - - _type = { - "trace": "annotation", - "span": "task", - } - - _attributes = parse_into_attributes( - type=_type, - flags=_flags, - tags=tags, - meta=meta, - data=data, - references=_references, - ) - - trace_request = OTelTracingRequest( - spans=[ - OTelFlatSpan( - trace_id=annotation.trace_id, - span_id=annotation.span_id, - attributes=_attributes, - links=_links, - ) - ] - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - _links_response = await self.tracing_router.edit_trace( - request=request, - # - trace_id=annotation.trace_id, - # - trace_request=trace_request, - ) - - _link = ( - Link( - trace_id=_links_response.links[0].trace_id, - span_id=_links_response.links[0].span_id, - ) - if _links_response.links and len(_links_response.links) > 0 - else None - ) - - return _link - - async def _delete_annotation( - self, - *, - project_id: UUID, - user_id: UUID, - # - annotation_link: Link, - ) -> Optional[Link]: - if not annotation_link.trace_id: - return None - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - link_response = await self.tracing_router.delete_trace( - request=request, - # - trace_id=annotation_link.trace_id, - ) - - link = link_response.links[0] if link_response.links else None - - if not link or not link.trace_id or not link.span_id: - return None - - annotation_link = Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - - return annotation_link - - async def _query_annotation( - self, - *, - project_id: UUID, - user_id: Optional[UUID] = None, - # - flags: Optional[AnnotationFlags] = None, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - references: Optional[AnnotationReferences] = None, - links: Optional[AnnotationLinks] = None, - # - annotation_links: Optional[List[Link]] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Annotation]: - formatting = Formatting( - focus=Focus.TRACE, - format=Format.AGENTA, - ) - - filtering = Filtering() - - conditions: List[Union[Condition, Filtering]] = [ - Condition( - field="attributes", - key="ag.type.trace", - value="annotation", - operator=ComparisonOperator.IS, - ) - ] - - trace_ids = ( - [annotation_link.trace_id for annotation_link in annotation_links] - if annotation_links - else None - ) - - # span_ids = ( - # [annotation_link.span_id for annotation_link in annotation_links] - # if annotation_links - # else None - # ) - - if trace_ids: - conditions.append( - Condition( - field="trace_id", - value=trace_ids, - operator=ListOperator.IN, - ) - ) - - # if span_ids: - # conditions.append( - # Condition( - # field="span_id", - # value=span_ids, - # operator=ListOperator.IN, - # ) - # ) - - if flags: - for key, value in flags.model_dump(mode="json", exclude_none=True).items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.flags.{key}", - value=value, - operator=ComparisonOperator.IS, - ) - ) - - if tags: - for key, value in tags.items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.tags.{key}", - value=value, # type:ignore - operator=ComparisonOperator.IS, - ) - ) - - if meta: - for key, value in meta.items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.meta.{key}", - value=value, # type:ignore - operator=ComparisonOperator.IS, - ) - ) - - if references: - for _, reference in references.model_dump(mode="json").items(): - if reference: - ref_id = str(reference.get("id")) if reference.get("id") else None - ref_slug = ( - str(reference.get("slug")) if reference.get("slug") else None - ) - conditions.append( - Condition( - field="references", - value=[ - {"id": ref_id, "slug": ref_slug}, - ], - operator=ListOperator.IN, - ) - ) - - if links: - if isinstance(links, dict): - for _, link in links.items(): - if link: - conditions.append( - Condition( - field="links", - value=[ - { - "trace_id": link.trace_id, - "span_id": link.span_id, - }, - ], - operator=ListOperator.IN, - ) - ) - elif isinstance(links, list): - _conditions = [] - for link in links: - if link: - _conditions.append( - Condition( - field="links", - value=[ - { - "trace_id": link.trace_id, - "span_id": link.span_id, - }, - ], - operator=ListOperator.IN, - ) - ) - if _conditions: - conditions.append( - Filtering( - operator=LogicalOperator.OR, - conditions=_conditions, - ) - ) - - if conditions: - filtering = Filtering( - operator=LogicalOperator.AND, - conditions=conditions, - ) - - query = TracingQuery( - formatting=formatting, - filtering=filtering, - windowing=windowing, - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) if user_id else None - - spans_response: OTelTracingResponse = await self.tracing_router.query_spans( - request=request, - # - query=query, - ) - - if not spans_response or not spans_response.traces: - return [] - - traces = list(spans_response.traces.values()) - - annotations = [] - - for trace in traces: - if not trace or not trace.spans: - continue - - spans = list(trace.spans.values()) - root_span = spans[0] if spans else None - - if not root_span or isinstance(root_span, list): - continue - - ( - __type, - __flags, - __tags, - __meta, - __data, - __references, - ) = parse_from_attributes(root_span.attributes or {}) - - if not __data: - continue - - _references = AnnotationReferences( - **{ - key: Reference( - id=ref.get("id"), - slug=ref.get("slug"), - version=ref.get("version"), - ) - for key, ref in (__references or {}).items() - } - ) - - _links = dict( - **{ - str(link.attributes["key"]): Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - for link in root_span.links or [] - if link.attributes and "key" in link.attributes - } - ) - - _origin = ( - ( - __flags.get("is_custom") - and AnnotationOrigin.CUSTOM - or __flags.get("is_human") - and AnnotationOrigin.HUMAN - or AnnotationOrigin.AUTO - ) - if __flags - else AnnotationOrigin.CUSTOM - ) - - _kind = ( - ( - __flags.get("is_evaluation") - and AnnotationKind.EVAL - or AnnotationKind.ADHOC - ) - if __flags - else AnnotationKind.ADHOC - ) - - _channel = ( - ( - __flags.get("is_sdk") - and AnnotationChannel.SDK - or __flags.get("is_web") - and AnnotationChannel.WEB - or AnnotationChannel.API - ) - if __flags - else AnnotationChannel.API - ) - - annotation = Annotation( - trace_id=root_span.trace_id, - span_id=root_span.span_id, - # - created_at=root_span.created_at, - updated_at=root_span.updated_at, - deleted_at=root_span.deleted_at, - created_by_id=root_span.created_by_id, - updated_by_id=root_span.updated_by_id, - deleted_by_id=root_span.deleted_by_id, - # - origin=_origin, - kind=_kind, - channel=_channel, - # - tags=__tags, - meta=__meta, - # - data=__data, - # - references=_references, - links=_links, - ) - - annotations.append(annotation) - - return annotations diff --git a/api/oss/src/core/annotations/types.py b/api/oss/src/core/annotations/types.py deleted file mode 100644 index c40a9355ff..0000000000 --- a/api/oss/src/core/annotations/types.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional - -from oss.src.core.shared.dtos import Reference -from oss.src.core.workflows.dtos import ( - WorkflowFlags, - WorkflowQueryFlags, -) -from oss.src.core.tracing.dtos import ( - SimpleTraceOrigin, - SimpleTraceKind, - SimpleTraceChannel, - SimpleTraceReferences, - SimpleTraceLinks, - # - SimpleTrace, - SimpleTraceCreate, - SimpleTraceEdit, - SimpleTraceQuery, -) - - -AnnotationOrigin = SimpleTraceOrigin -AnnotationKind = SimpleTraceKind -AnnotationChannel = SimpleTraceChannel -AnnotationLinks = SimpleTraceLinks - - -class AnnotationFlags(WorkflowFlags): - is_sdk: bool = False - is_web: bool = False - is_evaluation: bool = False - - -class AnnotationQueryFlags(WorkflowQueryFlags): - is_sdk: Optional[bool] = None - is_web: Optional[bool] = None - is_evaluation: Optional[bool] = None - - -class AnnotationReferences(SimpleTraceReferences): - evaluator: Reference # type: ignore - - -class Annotation(SimpleTrace): - pass - - -class AnnotationCreate(SimpleTraceCreate): - pass - - -class AnnotationEdit(SimpleTraceEdit): - pass - - -class AnnotationQuery(SimpleTraceQuery): - pass diff --git a/api/oss/src/core/annotations/utils.py b/api/oss/src/core/annotations/utils.py deleted file mode 100644 index ba9f178897..0000000000 --- a/api/oss/src/core/annotations/utils.py +++ /dev/null @@ -1,57 +0,0 @@ -from jsonschema import ( - Draft202012Validator, - Draft7Validator, - Draft4Validator, - Draft6Validator, - Draft201909Validator, -) - -from fastapi import status, HTTPException - - -def _get_jsonschema_validator( - format: dict, # pylint: disable=redefined-builtin -): - schema_uri = format.get( - "$schema", - "https://json-schema.org/draft/2020-12/schema", - ) - - if "2020-12" in schema_uri: - return Draft202012Validator - elif "2019-09" in schema_uri: - return Draft201909Validator - elif "draft-07" in schema_uri: - return Draft7Validator - elif "draft-06" in schema_uri: - return Draft6Validator - elif "draft-04" in schema_uri: - return Draft4Validator - return Draft202012Validator # fallback - - -def validate_data_against_schema( - data: dict, - schema: dict, # pylint: disable=redefined-builtin -): - validator_class = _get_jsonschema_validator(schema) - validator = validator_class(schema) - - errors = list(validator.iter_errors(data)) - - if errors: - details = [] - for e in errors: - loc = list(e.absolute_path) - msg = e.message - details.append( - { - "loc": ["body", "annotation", "data"] + loc, - "msg": msg, - "type": "value_error.json_schema", - } - ) - - raise HTTPException( - status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=details - ) diff --git a/api/oss/src/core/applications/dtos.py b/api/oss/src/core/applications/dtos.py deleted file mode 100644 index 1e38c8462f..0000000000 --- a/api/oss/src/core/applications/dtos.py +++ /dev/null @@ -1,234 +0,0 @@ -from typing import Optional -from uuid import UUID - -from pydantic import Field - -from oss.src.core.shared.dtos import sync_alias, AliasConfig -from oss.src.core.shared.dtos import ( - Identifier, - Slug, - Lifecycle, - Header, - Metadata, -) -from oss.src.core.workflows.dtos import ( - WorkflowFlags, - WorkflowQueryFlags, - # - Workflow, - WorkflowCreate, - WorkflowEdit, - WorkflowQuery, - # - WorkflowVariant, - WorkflowVariantCreate, - WorkflowVariantEdit, - WorkflowVariantQuery, - # - WorkflowRevisionData, - # - WorkflowRevision, - WorkflowRevisionCreate, - WorkflowRevisionEdit, - WorkflowRevisionQuery, - WorkflowRevisionCommit, - WorkflowRevisionsLog, -) - - -# aliases ---------------------------------------------------------------------- - - -class ApplicationIdAlias(AliasConfig): - application_id: Optional[UUID] = None - workflow_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_id", - ) - - -class ApplicationVariantIdAlias(AliasConfig): - application_variant_id: Optional[UUID] = None - workflow_variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_variant_id", - ) - - -class ApplicationRevisionIdAlias(AliasConfig): - application_revision_id: Optional[UUID] = None - workflow_revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_revision_id", - ) - - -# globals ---------------------------------------------------------------------- - - -class ApplicationFlags(WorkflowFlags): - def __init__(self, **data): - data["is_evaluator"] = True - - super().__init__(**data) - - -# applications ------------------------------------------------------------------- - - -class Application(Workflow): - flags: Optional[ApplicationFlags] = None - - -class ApplicationCreate(WorkflowCreate): - flags: Optional[ApplicationFlags] = None - - -class ApplicationEdit(WorkflowEdit): - flags: Optional[ApplicationFlags] = None - - -class ApplicationQuery(WorkflowQuery): - flags: Optional[ApplicationFlags] = None - - -# application variants ----------------------------------------------------------- - - -class ApplicationVariant( - WorkflowVariant, - ApplicationIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - - -class ApplicationVariantCreate( - WorkflowVariantCreate, - ApplicationIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - - -class ApplicationVariantEdit(WorkflowVariantEdit): - flags: Optional[ApplicationFlags] = None - - -class ApplicationVariantQuery(WorkflowVariantQuery): - flags: Optional[ApplicationFlags] = None - - -# application revisions ----------------------------------------------------- - - -class ApplicationRevisionData(WorkflowRevisionData): - pass - - -class ApplicationRevision( - WorkflowRevision, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - data: Optional[ApplicationRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionCreate( - WorkflowRevisionCreate, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionEdit(WorkflowRevisionEdit): - flags: Optional[ApplicationFlags] = None - - -class ApplicationRevisionQuery(WorkflowRevisionQuery): - flags: Optional[ApplicationFlags] = None - - -class ApplicationRevisionCommit( - WorkflowRevisionCommit, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - data: Optional[ApplicationRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionsLog( - WorkflowRevisionsLog, - ApplicationIdAlias, - ApplicationVariantIdAlias, - ApplicationRevisionIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - sync_alias("application_revision_id", "workflow_revision_id", self) - - -# simple applications ------------------------------------------------------------ - - -class LegacyApplicationFlags(WorkflowFlags): - pass - - -class LegacyApplicationData(WorkflowRevisionData): - pass - - -class LegacyApplication(Identifier, Slug, Lifecycle, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationCreate(Slug, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationEdit(Identifier, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationQuery( - Identifier, - Slug, - Lifecycle, - ApplicationQuery, -): - data: Optional[LegacyApplicationData] = None - - -# ------------------------------------------------------------------------------ diff --git a/api/oss/src/core/applications/service.py b/api/oss/src/core/applications/service.py deleted file mode 100644 index 0b7eb03a34..0000000000 --- a/api/oss/src/core/applications/service.py +++ /dev/null @@ -1,744 +0,0 @@ -from uuid import UUID, uuid4 -from typing import Optional, Dict, Any - -from pydantic import ValidationError - -from oss.src.services import db_manager -from oss.src.utils.logging import get_module_logger -from oss.src.core.shared.dtos import Reference -from oss.src.core.workflows.dtos import WorkflowRevisionData -from oss.src.core.applications.dtos import ( - LegacyApplicationFlags, - # - LegacyApplication, - LegacyApplicationCreate, - LegacyApplicationEdit, - LegacyApplicationData, - # - ApplicationFlags, - # - Application, - ApplicationCreate, - ApplicationEdit, - # - ApplicationVariant, - ApplicationVariantCreate, - # - ApplicationRevision, - ApplicationRevisionData, - ApplicationRevisionCommit, -) -from oss.src.services import db_manager - -from oss.src.models.shared_models import AppType -from oss.src.utils.helpers import get_slug_from_name_and_id - - -log = get_module_logger(__name__) - -# Constants -WORKFLOW_MARKER_KEY = "__workflow__" - - -class LegacyApplicationsService: - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - legacy_application_create: LegacyApplicationCreate, - ) -> Optional[LegacyApplication]: - # ------------------------------------------------------------------ - # Application - # ------------------------------------------------------------------ - application_create = ApplicationCreate( - slug=legacy_application_create.slug, - # - name=legacy_application_create.name, - # - flags=( - ApplicationFlags( - **legacy_application_create.flags.model_dump( - mode="json", exclude_none=True - ) - ) - if legacy_application_create.flags - else ApplicationFlags() - ), - ) - - user = await db_manager.get_user_with_id( - user_id=str(user_id), - ) - - if not user: - return None - - # Create app and initialize environments - app_db = await db_manager.create_app_and_envs( - project_id=str(project_id), - # - app_name=application_create.slug - or application_create.name - or uuid4().hex[-12:], - # - template_key=AppType.SDK_CUSTOM, - # - user_id=str(user_id), - ) - - # Create variant config - config_db = await db_manager.create_new_config( - config_name="default", - # - parameters={}, - ) - - # Create variant base - db_base = await db_manager.create_new_variant_base( - project_id=str(project_id), - # - base_name="app", - # - app=app_db, - ) - - # ------------------------------------------------------------------ - # Application variant - # ------------------------------------------------------------------ - application_variant_slug = uuid4().hex[-12:] - - application_variant_create = ApplicationVariantCreate( - slug=application_variant_slug, - # - name=application_create.name or uuid4().hex[-12:], - # - flags=application_create.flags, - # - application_id=app_db.id, # type: ignore[arg-type] - ) - - # Create default app variant - app_variant_db = await db_manager.create_new_app_variant( - project_id=str(project_id), - # - variant_name="default", # type: ignore - # - base_name=db_base.base_name, # type: ignore - commit_message="initial commit", - # - user=user, - base=db_base, - config=config_db, - app=app_db, - ) - - # ----------------------------------------------------------------- - # Second revision commit - # ------------------------------------------------------------------ - application_revision_slug = uuid4().hex[-12:] - - application_revision_commit = ApplicationRevisionCommit( - slug=application_revision_slug, - # - # name=application_create.name or uuid4().hex[-12:], - # - flags=application_create.flags, - # - data=ApplicationRevisionData( - **( - legacy_application_create.data.model_dump(mode="json") - if legacy_application_create.data - else {} - ), - ), - # - application_id=app_db.id, # type: ignore - application_variant_id=app_variant_db.id, # type: ignore - ) - - # Serialize application revision data with marker - serialized_data = {} - - if application_revision_commit.data: - serialized_data = self._serialize_workflow_data( - workflow_data=application_revision_commit.data, - ) - - # Create deployment - url = application_revision_commit.data.url - - deployment = await db_manager.create_deployment( - project_id=str(project_id), - # - app_id=str(app_variant_db.app.id), - uri="" if app_db.app_type == AppType.SDK_CUSTOM else url, # type: ignore - ) - - # Update variant base - await db_manager.update_base( - str(app_variant_db.base_id), - # - deployment_id=deployment.id, # type: ignore - ) - - # Update variant parameters (creates a new revision) - app_variant_db = await db_manager.update_variant_parameters( - project_id=str(project_id), - user_uid=str(user.id), - # - app_variant_id=str(app_variant_db.id), - # - parameters=serialized_data, - # commit_message="...", - ) - - # Deserialize the data back to return application revision - application_revision_data = None - - if serialized_data and WORKFLOW_MARKER_KEY in serialized_data: - data_copy = serialized_data.copy() - del data_copy[WORKFLOW_MARKER_KEY] - - try: - application_revision_data = LegacyApplicationData(**data_copy) - application_revision_data.version = str(app_variant_db.revision) # type: ignore - - except ValidationError as e: - log.warning(f"Failed to deserialize application data: {e}") - - legacy_application = LegacyApplication( - id=app_db.id, # type: ignore - slug=app_db.app_name, # type: ignore - # - name=app_db.app_name, # type: ignore - # - created_at=app_db.created_at, # type: ignore - updated_at=app_db.updated_at, # type: ignore - created_by_id=app_db.modified_by_id, # type: ignore - # - flags={"is_custom": True}, # type: ignore - # - data=application_revision_data, - ) - - return legacy_application - - async def fetch( - self, - *, - project_id: UUID, - # - application_id: UUID, - ) -> Optional[LegacyApplication]: - # Fetch application details ---------------------------------------------------------- - app_db = await db_manager.fetch_app_by_id( - app_id=str(application_id), - ) - - application = Application( - id=app_db.id, # type: ignore - slug=app_db.app_name, # type: ignore - # - name=app_db.app_name, # type: ignore - # - created_at=app_db.created_at, # type: ignore - updated_at=app_db.updated_at, # type: ignore - created_by_id=app_db.modified_by_id, # type: ignore - ) - - # Fetch application variant details -------------------------------------------------- - app_variant_db = await db_manager.fetch_latest_app_variant( - app_id=str(app_db.id) - ) - if not app_variant_db: - return None - - application_variant_slug = get_slug_from_name_and_id( - str(app_variant_db.variant_name), - UUID(str(app_variant_db.id)), - ) - - application_variant = ApplicationVariant( - id=app_variant_db.id, # type: ignore - slug=application_variant_slug, # type: ignore - # - name=app_variant_db.variant_name, # type:ignore - # - created_at=app_variant_db.created_at, # type: ignore - updated_at=app_variant_db.updated_at, # type: ignore - deleted_at=app_variant_db.updated_at if app_variant_db.hidden else None, # type: ignore - created_by_id=app_variant_db.modified_by_id, # type: ignore - updated_by_id=( - app_variant_db.modified_by_id # type: ignore - if app_variant_db.updated_at # type: ignore - else None - ), - deleted_by_id=( - app_variant_db.modified_by_id # type: ignore - if app_variant_db.hidden # type: ignore - else None - ), - # - flags=application.flags, - # - application_id=application.id, - ) - - # Fetch application variant revision details ------------------------------------------ - variant_revision_db = await db_manager.fetch_app_variant_revision( - app_variant=str(app_variant_db.id), - revision_number=app_variant_db.revision, # type: ignore - ) - - if not variant_revision_db: - return None - - # Deserialize data if marked as workflow ---------------------------------------------- - application_revision_data: Optional[LegacyApplicationData] = None - - if isinstance(variant_revision_db.config_parameters, dict): - wf_data = self._deserialize_workflow_data( - variant_revision_db.config_parameters - ) - if wf_data is not None: - try: - application_revision_data = LegacyApplicationData( - **wf_data.model_dump(mode="json") - ) - application_revision_data.version = str(app_variant_db.revision) # type: ignore - except ValidationError as e: - log.warning( - f"Failed to cast workflow data to LegacyApplicationData: {e}" - ) - - application_revision_slug = get_slug_from_name_and_id( - str(variant_revision_db.config_name), - UUID(str(variant_revision_db.id)), - ) - - application_revision = ApplicationRevision( - id=variant_revision_db.id, # type: ignore - slug=application_revision_slug, # type: ignore - # - name=variant_revision_db.config_name, # type: ignore - # - created_at=variant_revision_db.created_at, # type: ignore - updated_at=variant_revision_db.updated_at, # type: ignore - deleted_at=( - variant_revision_db.updated_at # type: ignore - if variant_revision_db.hidden # type: ignore - else None - ), - created_by_id=variant_revision_db.modified_by_id, # type: ignore - updated_by_id=( - variant_revision_db.modified_by_id # type: ignore - if variant_revision_db.updated_at # type: ignore - else None - ), - deleted_by_id=( - variant_revision_db.modified_by_id # type: ignore - if variant_revision_db.hidden # type: ignore - else None - ), - # - flags=application_variant.flags, - # - data=ApplicationRevisionData( - **( - application_revision_data.model_dump(mode="json") - if application_revision_data - else {} - ), - ), - # - application_id=application.id, - application_variant_id=application_variant.id, - ) - - legacy_application = LegacyApplication( - id=application.id, - slug=application.slug, - # - name=application.name, - # - created_at=application.created_at, - updated_at=application.updated_at, - created_by_id=application.created_by_id, - # - flags={"is_custom": True}, # type: ignore - # - data=LegacyApplicationData( - **( - application_revision_data.model_dump(mode="json") - if application_revision_data - else {} - ), - ), - ) - - return legacy_application - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - legacy_application_edit: LegacyApplicationEdit, - ) -> Optional[LegacyApplication]: - # Ensure user (for commit) -------------------------------------------- - user = await db_manager.get_user_with_id(user_id=str(user_id)) - - if not user: - return None - - # Edit application (name, etc.) --------------------------------------- - application_edit = ApplicationEdit( - id=legacy_application_edit.id, - # - name=legacy_application_edit.name, - ) - - app_db = await db_manager.update_app( - app_id=str(application_edit.id), - values_to_update=application_edit.model_dump( - mode="json", - exclude_none=True, - exclude={ - "flags", - "meta", - "tags", - "id", - }, - ), - ) - if app_db is None: - return None - - app_variant_db = await db_manager.fetch_latest_app_variant( - app_id=str(app_db.id) - ) - if not app_variant_db: - return None - - # ----------------------------------------------------------------- - # Second revision commit - # ------------------------------------------------------------------ - application_revision_slug = uuid4().hex[-12:] - - application_revision_commit = ApplicationRevisionCommit( - slug=application_revision_slug, - # - name=application_edit.name, - # - data=ApplicationRevisionData( - **( - legacy_application_edit.data.model_dump() - if legacy_application_edit.data - else {} - ) - ), - # - application_id=app_db.id, # type: ignore - application_variant_id=app_variant_db.id, # type: ignore - ) - - # Serialize application revision data with marker - serialized_data = {} - - if application_revision_commit.data: - serialized_data = application_revision_commit.data.model_dump(mode="json") - serialized_data[WORKFLOW_MARKER_KEY] = True - - # Update variant parameters (creates a new revision) - app_variant_db = await db_manager.update_variant_parameters( - project_id=str(project_id), - user_uid=str(user.id), - # - app_variant_id=str(app_variant_db.id), - # - parameters=serialized_data, - # commit_message="...", - ) - - # Deserialize the data back to return application revision - application_revision_data = None - - if serialized_data and WORKFLOW_MARKER_KEY in serialized_data: - data_copy = serialized_data.copy() - del data_copy[WORKFLOW_MARKER_KEY] - try: - application_revision_data = LegacyApplicationData(**data_copy) - application_revision_data.version = str(app_variant_db.revision) # type: ignore - except ValidationError as e: - log.warning(f"Failed to deserialize application data: {e}") - - legacy_application = LegacyApplication( - id=app_db.id, # type: ignore - slug=app_db.app_name, # type: ignore - # - name=app_db.app_name, # type: ignore - # - created_at=app_db.created_at, # type: ignore - updated_at=app_db.updated_at, # type: ignore - created_by_id=app_db.modified_by_id, # type: ignore - # - flags={"is_custom": True}, # type: ignore - # - data=application_revision_data, - ) - - return legacy_application - - async def retrieve( - self, - *, - project_id: UUID, - # - application_ref: Optional[Reference] = None, - application_variant_ref: Optional[Reference] = None, - application_revision_ref: Optional[Reference] = None, - ) -> Optional[ApplicationRevision]: - if ( - application_variant_ref - and not application_variant_ref.id - or application_revision_ref - and not application_revision_ref.id - ): - return None - - if application_revision_ref: - if application_revision_ref.id: - # Fetch application revision details -------------------------------------------------- - variant_revision_db = await db_manager.fetch_app_variant_revision_by_id( - variant_revision_id=str(application_revision_ref.id) - ) - if not variant_revision_db: - return None - - # Fetch application variant details --------------------------------------------------- - app_variant_db = await db_manager.fetch_app_variant_by_id( - app_variant_id=str(variant_revision_db.variant_id) - ) - if not app_variant_db: - return None - - # Fetch application details ---------------------------------------------------------- - app_db = await db_manager.fetch_app_by_id( - app_id=str(app_variant_db.app_id) - ) - if not app_db: - return None - - elif application_ref: - if application_ref.id: - # Fetch application details ---------------------------------------------------------- - app_db = await db_manager.fetch_app_by_id( - app_id=str(application_ref.id) - ) - if not app_db: - return None - - # Fetch application variant details --------------------------------------------------- - app_variant_db = await db_manager.fetch_latest_app_variant( - app_id=str(app_db.id) - ) - if not app_variant_db: - return None - - # Fetch application revision details -------------------------------------------------- - variant_revision_db = await db_manager.fetch_app_variant_revision( - app_variant=str(app_variant_db.id), - revision_number=app_variant_db.revision, # type: ignore - ) - if not variant_revision_db: - return None - elif application_ref.slug: - # Fetch application details ---------------------------------------------------------- - app_db = await db_manager.fetch_app_by_name( - project_id=str(project_id), - app_name=application_ref.slug, - ) - if not app_db: - return None - - # Fetch application variant details --------------------------------------------------- - app_variant_db = await db_manager.fetch_latest_app_variant( - app_id=str(app_db.id) - ) - if not app_variant_db: - return None - - # Fetch application revision details -------------------------------------------------- - variant_revision_db = await db_manager.fetch_app_variant_revision( - app_variant=str(app_variant_db.id), - revision_number=app_variant_db.revision, # type: ignore - ) - if not variant_revision_db: - return None - - elif application_variant_ref and application_variant_ref.id: - # Fetch application variant details --------------------------------------------------- - app_variant_db = await db_manager.fetch_app_variant_by_id( - app_variant_id=str(application_variant_ref.id) - ) - if not app_variant_db: - return None - - # Fetch application details ---------------------------------------------------------- - app_db = await db_manager.fetch_app_by_id(app_id=str(app_variant_db.app_id)) - if not app_db: - return None - - # Fetch application revision details ------------------------------------------------- - variant_revision_db = await db_manager.fetch_app_variant_revision( - app_variant=str(app_variant_db.id), - revision_number=app_variant_db.revision, # type: ignore - ) - if not variant_revision_db: - return None - - application = Application( - id=app_db.id, # type: ignore - slug=app_db.app_name, # type: ignore - name=app_db.app_name, # type: ignore - created_at=app_db.created_at, # type: ignore - updated_at=app_db.updated_at, # type: ignore - created_by_id=app_db.modified_by_id, # type: ignore - flags={"is_custom": True}, # type: ignore - ) - - application_variant_slug = get_slug_from_name_and_id( - str(app_variant_db.variant_name), - UUID(str(app_variant_db.id)), - ) - - application_variant = ApplicationVariant( - id=app_variant_db.id, # type: ignore - slug=application_variant_slug, # type: ignore - name=app_variant_db.variant_name, - created_at=app_variant_db.created_at, # type: ignore - updated_at=app_variant_db.updated_at, # type: ignore - deleted_at=app_variant_db.updated_at if app_variant_db.hidden else None, # type: ignore - created_by_id=app_variant_db.modified_by_id, # type: ignore - updated_by_id=( - app_variant_db.modified_by_id # type: ignore - if app_variant_db.updated_at # type: ignore - else None - ), - deleted_by_id=( - app_variant_db.modified_by_id # type: ignore - if app_variant_db.hidden # type: ignore - else None - ), - flags=application.flags, - application_id=application.id, - ) - - application_revision_slug = get_slug_from_name_and_id( - str(variant_revision_db.config_name), - UUID(str(variant_revision_db.id)), - ) - - application_revision = ApplicationRevision( - id=variant_revision_db.id, # type: ignore - slug=application_revision_slug, # type: ignore - name=variant_revision_db.config_name, # type: ignore - created_at=variant_revision_db.created_at, # type: ignore - updated_at=variant_revision_db.updated_at, # type: ignore - deleted_at=( - variant_revision_db.updated_at # type: ignore - if variant_revision_db.hidden # type: ignore - else None - ), - created_by_id=variant_revision_db.modified_by_id, # type: ignore - updated_by_id=( - variant_revision_db.modified_by_id # type: ignore - if variant_revision_db.updated_at # type: ignore - else None - ), - deleted_by_id=( - variant_revision_db.modified_by_id # type: ignore - if variant_revision_db.hidden # type: ignore - else None - ), - flags=application_variant.flags, - application_id=application.id, - application_variant_id=application_variant.id, - ) - - # Deserialize data if marked as workflow - application_revision_data: Optional[ApplicationRevisionData] = None - - if isinstance(variant_revision_db.config_parameters, dict): - wf_data = self._deserialize_workflow_data( - variant_revision_db.config_parameters - ) - if wf_data is not None: - try: - application_revision_data = ApplicationRevisionData( - **wf_data.model_dump(mode="json") - ) - application_revision_data.version = str(app_variant_db.revision) # type: ignore - except ValidationError as e: - log.warning( - f"Failed to cast workflow data to ApplicationRevisionData: {e}" - ) - - # Set the data field if we have deserialized data - if application_revision_data: - application_revision.data = application_revision_data - else: - application_revision.data = ApplicationRevisionData() - - return application_revision - - def _is_workflow_data( - self, - config_parameters: Dict[str, Any], - ) -> bool: - """ - Check if the config_parameters contains workflow data (has marker key). - """ - - return ( - isinstance(config_parameters, dict) - and config_parameters.get(WORKFLOW_MARKER_KEY) is True - ) - - def _serialize_workflow_data( - self, - workflow_data: WorkflowRevisionData, - ) -> Dict[str, Any]: - """ - Serialize workflow revision data with marker for legacy storage. - """ - - serialized = workflow_data.model_dump(mode="json") - serialized[WORKFLOW_MARKER_KEY] = True - - return serialized - - def _deserialize_workflow_data( - self, - config_parameters: Dict[str, Any], - ) -> Optional[WorkflowRevisionData]: - """ - Deserialize workflow revision data from legacy storage. - Returns None if not workflow data or if deserialization fails. - """ - - if not self._is_workflow_data(config_parameters): - return None - - try: - data_copy = config_parameters.copy() - del data_copy[WORKFLOW_MARKER_KEY] - - return WorkflowRevisionData(**data_copy) - - except ValidationError as e: - log.warning(f"Failed to deserialize workflow data: {e}") - return None diff --git a/api/oss/src/core/blobs/dtos.py b/api/oss/src/core/blobs/dtos.py index f8ef43361c..95efc67490 100644 --- a/api/oss/src/core/blobs/dtos.py +++ b/api/oss/src/core/blobs/dtos.py @@ -1,49 +1,10 @@ -from typing import Optional, List +from typing import Optional from uuid import UUID -from pydantic import BaseModel +from oss.src.core.shared.dtos import Identifier, Slug, Data -from oss.src.core.shared.dtos import ( - Identifier, - Lifecycle, - Data, - Flags, - Tags, - Meta, - Windowing, -) - - -class Blob(Identifier, Lifecycle): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None +class Blob(Identifier, Slug): data: Optional[Data] = None set_id: Optional[UUID] = None - - -class BlobCreate(BaseModel): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Optional[Data] = None - - set_id: Optional[UUID] = None - - -class BlobEdit(Identifier): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - -class BlobQuery(BaseModel): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - set_ids: Optional[List[UUID]] = None - blob_ids: Optional[List[UUID]] = None diff --git a/api/oss/src/core/blobs/interfaces.py b/api/oss/src/core/blobs/interfaces.py index 82b9885d23..09caf3f7a6 100644 --- a/api/oss/src/core/blobs/interfaces.py +++ b/api/oss/src/core/blobs/interfaces.py @@ -1,16 +1,16 @@ from typing import Optional, List, TypeVar, Type from uuid import UUID -from abc import ABC, abstractmethod +from abc import abstractmethod -from oss.src.core.shared.dtos import Windowing -from oss.src.core.blobs.dtos import Blob, BlobCreate, BlobEdit, BlobQuery +from oss.src.core.shared.dtos import Reference +from oss.src.core.blobs.dtos import Blob T = TypeVar("T") -class BlobsDAOInterface(ABC): +class BlobDAOInterface: def __init__( self, *, @@ -25,9 +25,8 @@ async def add_blob( self, *, project_id: UUID, - user_id: UUID, # - blob_create: BlobCreate, + blob: Blob, ) -> Optional[Blob]: raise NotImplementedError @@ -37,18 +36,7 @@ async def fetch_blob( *, project_id: UUID, # - blob_id: UUID, - ) -> Optional[Blob]: - raise NotImplementedError - - @abstractmethod - async def edit_blob( - self, - *, - project_id: UUID, - user_id: UUID, - # - blob_edit: BlobEdit, + blob_ref: Optional[Reference] = None, ) -> Optional[Blob]: raise NotImplementedError @@ -67,9 +55,8 @@ async def add_blobs( self, *, project_id: UUID, - user_id: UUID, # - blob_creates: List[BlobCreate], + blobs: List[Blob], ) -> List[Blob]: raise NotImplementedError @@ -79,7 +66,11 @@ async def fetch_blobs( *, project_id: UUID, # - blob_ids: List[UUID], + set_id: Optional[UUID] = None, + # + blob_refs: Optional[List[Reference]] = None, + # + limit: Optional[int] = None, ) -> List[Blob]: raise NotImplementedError @@ -93,16 +84,4 @@ async def remove_blobs( ) -> List[Blob]: raise NotImplementedError - @abstractmethod - async def query_blobs( - self, - *, - project_id: UUID, - # - blob_query: BlobQuery, - # - windowing: Optional[Windowing] = None, - ) -> List[Blob]: - raise NotImplementedError - ## ------------------------------------------------------------------------- diff --git a/api/oss/src/core/blobs/utils.py b/api/oss/src/core/blobs/utils.py deleted file mode 100644 index 1ebeaf20c4..0000000000 --- a/api/oss/src/core/blobs/utils.py +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Optional, Dict, Any -from uuid import UUID -from hashlib import blake2b -from json import dumps - - -def compute_blob_id( - *, - blob_data: Optional[Dict[str, Any]] = None, - set_id: Optional[UUID] = None, -) -> UUID: - # Deterministically serialize the blob data - json_blob_data = ( - dumps( - blob_data, - sort_keys=True, - separators=(",", ":"), - ) - if blob_data - else "" - ) - - # Combine with set_id - unhashed = f"{str(set_id)}{json_blob_data}".encode("utf-8") - - # Blake2b with 16-byte digest - hashed = bytearray(blake2b(unhashed, digest_size=16).digest()) - - # Force version 5 (set the version bits: 0101) - hashed[6] = (hashed[6] & 0x0F) | 0x50 - - # Force variant RFC 4122 (bits 10xx) - hashed[8] = (hashed[8] & 0x3F) | 0x80 - - return UUID(bytes=bytes(hashed)) diff --git a/api/oss/src/core/evaluations/interfaces.py b/api/oss/src/core/evaluations/interfaces.py deleted file mode 100644 index 5f467b0829..0000000000 --- a/api/oss/src/core/evaluations/interfaces.py +++ /dev/null @@ -1,539 +0,0 @@ -from typing import Optional, List, Tuple -from uuid import UUID -from abc import ABC, abstractmethod - -from oss.src.core.shared.dtos import Windowing -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationRunQuery, - EvaluationScenario, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationScenarioQuery, - EvaluationResult, - EvaluationResultCreate, - EvaluationResultEdit, - EvaluationResultQuery, - EvaluationMetrics, - EvaluationMetricsCreate, - EvaluationMetricsEdit, - EvaluationMetricsQuery, - EvaluationQueue, - EvaluationQueueCreate, - EvaluationQueueEdit, - EvaluationQueueQuery, -) - - -class EvaluationsDAOInterface(ABC): - def __init__( - self, - ): - raise NotImplementedError - - # - EVALUATION RUN --------------------------------------------------------- - - @abstractmethod - async def create_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunCreate, - ) -> Optional[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def create_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunCreate], - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def fetch_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def fetch_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def edit_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunEdit, - ) -> Optional[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def edit_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunEdit], - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def delete_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[UUID]: - raise NotImplementedError - - @abstractmethod - async def delete_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[UUID]: - raise NotImplementedError - - @abstractmethod - async def close_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - status: Optional[EvaluationStatus] = None, - ) -> Optional[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def close_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def open_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def open_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def query_runs( - self, - *, - project_id: UUID, - # - run: Optional[EvaluationRunQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationRun]: - raise NotImplementedError - - @abstractmethod - async def fetch_live_runs( - self, - *, - windowing: Optional[Windowing] = None, - ) -> List[Tuple[UUID, EvaluationRun]]: - raise NotImplementedError - - # - EVALUATION SCENARIO ---------------------------------------------------- - - @abstractmethod - async def create_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioCreate, - ) -> Optional[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def create_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioCreate], - ) -> List[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def fetch_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def fetch_scenarios( - self, - *, - project_id: UUID, - # - scenario_ids: List[UUID], - ) -> List[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def edit_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioEdit, - ) -> Optional[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def edit_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioEdit], - ) -> List[EvaluationScenario]: - raise NotImplementedError - - @abstractmethod - async def delete_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[UUID]: - raise NotImplementedError - - @abstractmethod - async def delete_scenarios( - self, - *, - project_id: UUID, - # - scenario_ids: List[UUID], - ) -> List[UUID]: - raise NotImplementedError - - @abstractmethod - async def query_scenarios( - self, - *, - project_id: UUID, - # - scenario: Optional[EvaluationScenarioQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationScenario]: - raise NotImplementedError - - # - EVALUATION RESULT ------------------------------------------------------ - - @abstractmethod - async def create_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultCreate, - ) -> Optional[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def create_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultCreate], - ) -> List[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def fetch_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def fetch_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def edit_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultEdit, - ) -> Optional[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def edit_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultEdit], - ) -> List[EvaluationResult]: - raise NotImplementedError - - @abstractmethod - async def delete_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[UUID]: - raise NotImplementedError - - @abstractmethod - async def delete_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[UUID]: - raise NotImplementedError - - @abstractmethod - async def query_results( - self, - *, - project_id: UUID, - # - result: Optional[EvaluationResultQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationResult]: - raise NotImplementedError - - # - EVALUATION METRICS ----------------------------------------------------- - - @abstractmethod - async def create_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsCreate], - ) -> List[EvaluationMetrics]: - raise NotImplementedError - - @abstractmethod - async def fetch_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: List[UUID], - ) -> List[EvaluationMetrics]: - raise NotImplementedError - - @abstractmethod - async def edit_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsEdit], - ) -> List[EvaluationMetrics]: - raise NotImplementedError - - @abstractmethod - async def delete_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: Optional[List[UUID]] = None, - ) -> List[UUID]: - raise NotImplementedError - - @abstractmethod - async def query_metrics( - self, - *, - project_id: UUID, - # - metric: Optional[EvaluationMetricsQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationMetrics]: - raise NotImplementedError - - # - EVALUATION QUEUE ------------------------------------------------------- - - @abstractmethod - async def create_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueCreate, - ) -> Optional[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def create_queues( - self, - *, - project_id: UUID, - user_id: UUID, - # - queues: List[EvaluationQueueCreate], - ) -> List[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def fetch_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def fetch_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def edit_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueEdit, - ) -> Optional[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def edit_queues( - self, - *, - project_id: UUID, - user_id: UUID, - # - queues: List[EvaluationQueueEdit], - ) -> List[EvaluationQueue]: - raise NotImplementedError - - @abstractmethod - async def delete_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[UUID]: - raise NotImplementedError - - @abstractmethod - async def delete_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[UUID]: - raise NotImplementedError - - @abstractmethod - async def query_queues( - self, - *, - project_id: UUID, - # - queue: Optional[EvaluationQueueQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationQueue]: - raise NotImplementedError - - # -------------------------------------------------------------------------- diff --git a/api/oss/src/core/evaluations/service.py b/api/oss/src/core/evaluations/service.py deleted file mode 100644 index b36a9d47ef..0000000000 --- a/api/oss/src/core/evaluations/service.py +++ /dev/null @@ -1,2526 +0,0 @@ -from typing import List, Optional, Tuple, Dict, Any -from uuid import UUID -from asyncio import sleep -from copy import deepcopy -from datetime import datetime, timedelta, timezone - -from celery import current_app as celery_dispatch - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.dtos import Reference, Windowing, Tags, Meta, Data -from oss.src.core.evaluations.interfaces import EvaluationsDAOInterface -from oss.src.core.evaluations.types import ( - EvaluationStatus, - # EVALUATION RUN - EvaluationRunFlags, - EvaluationRunDataMappingColumn, - EvaluationRunDataMappingStep, - EvaluationRunDataMapping, - EvaluationRunDataStepInput, - EvaluationRunDataStep, - EvaluationRunData, - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationRunQuery, - # EVALUATION SCENARIO - EvaluationScenario, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationScenarioQuery, - # EVALUATION RESULT - EvaluationResult, - EvaluationResultCreate, - EvaluationResultEdit, - EvaluationResultQuery, - # EVALUATION METRICS - EvaluationMetrics, - EvaluationMetricsCreate, - EvaluationMetricsEdit, - EvaluationMetricsQuery, - # EVALUATION QUEUE - EvaluationQueue, - EvaluationQueueCreate, - EvaluationQueueEdit, - EvaluationQueueQuery, -) -from oss.src.core.evaluations.types import ( - Target, - Origin, - # - SimpleEvaluationFlags, - SimpleEvaluationData, - SimpleEvaluationStatus, - # - SimpleEvaluation, - SimpleEvaluationCreate, - SimpleEvaluationEdit, - SimpleEvaluationQuery, -) -from oss.src.core.evaluations.types import CURRENT_VERSION -from oss.src.core.tracing.dtos import ( - TracingQuery, - Filtering, - Condition, - ListOperator, - MetricsBucket, - MetricSpec, - MetricType, -) -from oss.src.core.tracing.service import TracingService - -from oss.src.core.evaluators.service import EvaluatorsService - -from oss.src.core.queries.dtos import QueryRevision -from oss.src.core.testcases.dtos import Testcase -from oss.src.core.testsets.dtos import TestsetRevision -from oss.src.core.evaluators.dtos import EvaluatorRevision -from oss.src.core.queries.service import QueriesService -from oss.src.core.testsets.service import TestsetsService -from oss.src.core.testsets.service import SimpleTestsetsService -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService - -from oss.src.core.evaluations.utils import filter_scenario_ids - -from oss.src.models.db_models import AppVariantRevisionsDB - -from oss.src.services.db_manager import ( - fetch_app_by_id, - fetch_app_variant_by_id, - fetch_app_variant_revision_by_id, -) -from oss.src.utils.helpers import get_slug_from_name_and_id -from oss.src.core.evaluations.utils import get_metrics_keys_from_schema - - -log = get_module_logger(__name__) - - -SAFE_CLOSE_DELAY = 1 # seconds -DEFAULT_ORIGIN_QUERIES = "custom" -DEFAULT_ORIGIN_TESTSETS = "custom" -DEFAULT_ORIGIN_APPLICATIONS = "custom" -DEFAULT_ORIGIN_EVALUATORS = "custom" -DEFAULT_ORIGIN = dict( - queries=DEFAULT_ORIGIN_QUERIES, - testsets=DEFAULT_ORIGIN_TESTSETS, - applications=DEFAULT_ORIGIN_APPLICATIONS, - evaluators=DEFAULT_ORIGIN_EVALUATORS, -) - -DEFAULT_METRICS = [ - { - "path": "attributes.ag.metrics.duration.cumulative", - "type": "numeric/continuous", - }, - { - "path": "attributes.ag.metrics.errors.cumulative", - "type": "numeric/continuous", - }, - { - "path": "attributes.ag.metrics.costs.cumulative.total", - "type": "numeric/continuous", - }, - { - "path": "attributes.ag.metrics.tokens.cumulative.total", - "type": "numeric/continuous", - }, -] - -DEFAULT_REFRESH_INTERVAL = 1 # minute(s) - - -class EvaluationsService: - def __init__( - self, - evaluations_dao: EvaluationsDAOInterface, - tracing_service: TracingService, - queries_service: QueriesService, - testsets_service: TestsetsService, - evaluators_service: EvaluatorsService, - ): - self.evaluations_dao = evaluations_dao - - self.tracing_service = tracing_service - self.queries_service = queries_service - self.testsets_service = testsets_service - self.evaluators_service = evaluators_service - - ### CRUD - - # - EVALUATION RUN --------------------------------------------------------- - - async def refresh_runs( - self, - *, - timestamp: datetime, - interval: int = DEFAULT_REFRESH_INTERVAL, - ) -> bool: - log.info(f"[LIVE] Refreshing runs at {timestamp} every {interval} minute(s)") - - if not timestamp: - return False - - newest = timestamp + timedelta(minutes=interval or 0) - oldest = timestamp - - try: - ext_runs = await self.fetch_live_runs() - except Exception as e: - log.error(f"[LIVE] Error fetching live runs: {e}", exc_info=True) - log.error(e, exc_info=True) - return False - - for project_id, run in ext_runs: - user_id = run.created_by_id - - try: - log.info( - "[LIVE] Dispatching...", - project_id=project_id, - run_id=run.id, - # - newest=newest, - oldest=oldest, - ) - - celery_dispatch.send_task( # type: ignore - "src.tasks.evaluations.live.evaluate", - kwargs=dict( - project_id=project_id, - user_id=user_id, - # - run_id=run.id, - # - newest=newest, - oldest=oldest, - ), - ) - - log.info( - "[LIVE] Dispatched. ", - project_id=project_id, - run_id=run.id, - ) - - except Exception as e: # pylint: disable=broad-exception-caught - log.error(f"[LIVE] Error refreshing run {run.id}: {e}", exc_info=True) - - return True - - async def fetch_live_runs( - self, - *, - windowing: Optional[Windowing] = None, - ) -> List[Tuple[UUID, EvaluationRun]]: - ext_runs = await self.evaluations_dao.fetch_live_runs( - windowing=windowing, - ) - - return ext_runs - - async def create_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunCreate, - ) -> Optional[EvaluationRun]: - run.version = CURRENT_VERSION - - return await self.evaluations_dao.create_run( - project_id=project_id, - user_id=user_id, - # - run=run, - ) - - async def create_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunCreate], - ) -> List[EvaluationRun]: - for run in runs: - run.version = CURRENT_VERSION - - return await self.evaluations_dao.create_runs( - project_id=project_id, - user_id=user_id, - # - runs=runs, - ) - - async def fetch_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - return await self.evaluations_dao.fetch_run( - project_id=project_id, - # - run_id=run_id, - ) - - async def fetch_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - return await self.evaluations_dao.fetch_runs( - project_id=project_id, - # - run_ids=run_ids, - ) - - async def edit_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunEdit, - ) -> Optional[EvaluationRun]: - run.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_run( - project_id=project_id, - user_id=user_id, - # - run=run, - ) - - async def edit_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunEdit], - ) -> List[EvaluationRun]: - for run in runs: - run.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_runs( - project_id=project_id, - user_id=user_id, - # - runs=runs, - ) - - async def delete_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[UUID]: - return await self.evaluations_dao.delete_run( - project_id=project_id, - # - run_id=run_id, - ) - - async def delete_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[UUID]: - return await self.evaluations_dao.delete_runs( - project_id=project_id, - # - run_ids=run_ids, - ) - - async def close_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - status: Optional[EvaluationStatus] = None, - ) -> Optional[EvaluationRun]: - return await self.evaluations_dao.close_run( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - # - status=status, - ) - - async def close_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - return await self.evaluations_dao.close_runs( - project_id=project_id, - user_id=user_id, - # - run_ids=run_ids, - ) - - async def open_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - return await self.evaluations_dao.open_run( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - ) - - async def open_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - return await self.evaluations_dao.open_runs( - project_id=project_id, - user_id=user_id, - # - run_ids=run_ids, - ) - - async def query_runs( - self, - *, - project_id: UUID, - # - run: Optional[EvaluationRunQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationRun]: - return await self.evaluations_dao.query_runs( - project_id=project_id, - # - run=run, - # - windowing=windowing, - ) - - # - EVALUATION SCENARIO ---------------------------------------------------- - - async def create_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioCreate, - ) -> Optional[EvaluationScenario]: - scenario.version = CURRENT_VERSION - - return await self.evaluations_dao.create_scenario( - project_id=project_id, - user_id=user_id, - # - scenario=scenario, - ) - - async def create_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioCreate], - ) -> List[EvaluationScenario]: - for scenario in scenarios: - scenario.version = CURRENT_VERSION - - return await self.evaluations_dao.create_scenarios( - project_id=project_id, - user_id=user_id, - # - scenarios=scenarios, - ) - - async def fetch_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[EvaluationScenario]: - return await self.evaluations_dao.fetch_scenario( - project_id=project_id, - # - scenario_id=scenario_id, - ) - - async def fetch_scenarios( - self, - *, - project_id: UUID, - # - scenario_ids: List[UUID], - ) -> List[EvaluationScenario]: - return await self.evaluations_dao.fetch_scenarios( - project_id=project_id, - # - scenario_ids=scenario_ids, - ) - - async def edit_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioEdit, - ) -> Optional[EvaluationScenario]: - scenario.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_scenario( - project_id=project_id, - user_id=user_id, - # - scenario=scenario, - ) - - async def edit_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioEdit], - ) -> List[EvaluationScenario]: - for scenario in scenarios: - scenario.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_scenarios( - project_id=project_id, - user_id=user_id, - # - scenarios=scenarios, - ) - - async def delete_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[UUID]: - return await self.evaluations_dao.delete_scenario( - project_id=project_id, - # - scenario_id=scenario_id, - ) - - async def delete_scenarios( - self, - *, - project_id: UUID, - scenario_ids: List[UUID], - ) -> List[UUID]: - return await self.evaluations_dao.delete_scenarios( - project_id=project_id, - scenario_ids=scenario_ids, - ) - - async def query_scenarios( - self, - *, - project_id: UUID, - # - scenario: Optional[EvaluationScenarioQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationScenario]: - return await self.evaluations_dao.query_scenarios( - project_id=project_id, - # - scenario=scenario, - # - windowing=windowing, - ) - - # - EVALUATION RESULT ------------------------------------------------------ - - async def create_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultCreate, - ) -> Optional[EvaluationResult]: - result.version = CURRENT_VERSION - - return await self.evaluations_dao.create_result( - project_id=project_id, - user_id=user_id, - # - result=result, - ) - - async def create_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultCreate], - ) -> List[EvaluationResult]: - for result in results: - result.version = CURRENT_VERSION - - return await self.evaluations_dao.create_results( - project_id=project_id, - user_id=user_id, - # - results=results, - ) - - async def fetch_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[EvaluationResult]: - return await self.evaluations_dao.fetch_result( - project_id=project_id, - # - result_id=result_id, - ) - - async def fetch_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[EvaluationResult]: - return await self.evaluations_dao.fetch_results( - project_id=project_id, - # - result_ids=result_ids, - ) - - async def edit_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultEdit, - ) -> Optional[EvaluationResult]: - result.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_result( - project_id=project_id, - user_id=user_id, - # - result=result, - ) - - async def edit_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultEdit], - ) -> List[EvaluationResult]: - for result in results: - result.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_results( - project_id=project_id, - user_id=user_id, - # - results=results, - ) - - async def delete_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[UUID]: - return await self.evaluations_dao.delete_result( - project_id=project_id, - # - result_id=result_id, - ) - - async def delete_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[UUID]: - return await self.evaluations_dao.delete_results( - project_id=project_id, - # - result_ids=result_ids, - ) - - async def query_results( - self, - *, - project_id: UUID, - # - result: Optional[EvaluationResultQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationResult]: - return await self.evaluations_dao.query_results( - project_id=project_id, - # - result=result, - # - windowing=windowing, - ) - - # - EVALUATION METRIC ------------------------------------------------------ - - async def create_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsCreate], - ) -> List[EvaluationMetrics]: - for metric in metrics: - metric.version = CURRENT_VERSION - - return await self.evaluations_dao.create_metrics( - project_id=project_id, - user_id=user_id, - # - metrics=metrics, - ) - - async def fetch_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: List[UUID], - ) -> List[EvaluationMetrics]: - return await self.evaluations_dao.fetch_metrics( - project_id=project_id, - # - metrics_ids=metrics_ids, - ) - - async def edit_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsEdit], - ) -> List[EvaluationMetrics]: - for metric in metrics: - metric.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_metrics( - project_id=project_id, - user_id=user_id, - # - metrics=metrics, - ) - - async def delete_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: List[UUID], - ) -> List[UUID]: - return await self.evaluations_dao.delete_metrics( - project_id=project_id, - # - metrics_ids=metrics_ids, - ) - - async def query_metrics( - self, - *, - project_id: UUID, - # - metric: Optional[EvaluationMetricsQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationMetrics]: - return await self.evaluations_dao.query_metrics( - project_id=project_id, - # - metric=metric, - # - windowing=windowing, - ) - - async def refresh_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - scenario_id: Optional[UUID] = None, - timestamp: Optional[datetime] = None, - interval: Optional[int] = None, - ) -> List[EvaluationMetrics]: - metrics_data: Dict[str, Any] = dict() - - run = await self.fetch_run( - project_id=project_id, - # - run_id=run_id, - ) - - if not run or not run.data or not run.data.steps: - log.warning("[WARN] run or run.data or run.data.steps not found") - return [] - - steps_metrics_keys: Dict[str, List[Dict[str, str]]] = dict() - - for step in run.data.steps: - steps_metrics_keys[step.key] = DEFAULT_METRICS - - if step.type == "annotation": - evaluator_revision_ref = step.references.get("evaluator_revision") - - if not evaluator_revision_ref: - log.warning("[WARN] Evaluator revision reference not found") - continue - - evaluator_revision = ( - await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - evaluator_revision_ref=evaluator_revision_ref, - ) - ) - - if not evaluator_revision: - log.warning("[WARN] Evaluator revision not found") - continue - - if evaluator_revision.data and evaluator_revision.data.schemas: - metrics_keys = get_metrics_keys_from_schema( - schema=(evaluator_revision.data.schemas.get("outputs")), - ) - - steps_metrics_keys[step.key] += [ - { - "path": "ag.data.outputs." + metric_key.get("path", ""), - "type": metric_key.get("type", ""), - } - for metric_key in metrics_keys - ] - - if not steps_metrics_keys: - log.warning("[WARN] No steps metrics keys found") - return [] - - step_keys = list(steps_metrics_keys.keys()) - - steps_trace_ids: Dict[str, List[str]] = dict() - - for step_key in step_keys: - results = await self.query_results( - project_id=project_id, - result=EvaluationResultQuery( - run_id=run_id, - scenario_id=scenario_id, - step_key=step_key, - timestamp=timestamp, - interval=interval, - ), - ) - - if not results: - # log.warning("[WARN] No results found") - continue - - trace_ids = [result.trace_id for result in results if result.trace_id] - - if trace_ids: - steps_trace_ids[step_key] = trace_ids - - for step_key in steps_metrics_keys.keys() & steps_trace_ids.keys(): - step_metrics_keys = steps_metrics_keys[step_key] - step_trace_ids = steps_trace_ids[step_key] - - try: - query = TracingQuery( - filtering=Filtering( - conditions=[ - Condition( - field="trace_id", - operator=ListOperator.IN, - value=step_trace_ids, - ) - ] - ) - ) - - specs = [ - MetricSpec( - type=MetricType(metric.get("type")), - path=metric.get("path") or "*", - ) - for metric in step_metrics_keys - ] + [ - MetricSpec( - type=MetricType.JSON, - path="atttributes.ag", - ) - ] - - buckets = await self.tracing_service.analytics( - project_id=project_id, - # - query=query, - specs=specs, - ) - - if len(buckets) != 1: - log.warning("[WARN] There should be one and only one bucket") - log.warning("[WARN] Buckets:", buckets) - continue - - bucket = buckets[0] - - if not bucket.metrics: - log.warning("[WARN] Bucket metrics should not be empty") - log.warning("[WARN] Bucket:", bucket) - continue - - metrics_data |= {step_key: bucket.metrics} - - except Exception as e: - log.error(e, exc_info=True) - - if not metrics_data: - # log.warning("[WARN] No metrics data: no metrics will be stored") - return [] - - metrics_create = [ - EvaluationMetricsCreate( - run_id=run_id, - scenario_id=scenario_id, - timestamp=timestamp, - interval=interval, - # - status=EvaluationStatus.SUCCESS, - # - data=metrics_data, - ) - ] - - metrics = await self.create_metrics( - project_id=project_id, - user_id=user_id, - # - metrics=metrics_create, - ) - - return metrics - - # - EVALUATION QUEUE ------------------------------------------------------- - - async def create_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueCreate, - ) -> Optional[EvaluationQueue]: - queue.version = CURRENT_VERSION - - return await self.evaluations_dao.create_queue( - project_id=project_id, - user_id=user_id, - # - queue=queue, - ) - - async def create_queues( - self, - *, - project_id: UUID, - user_id: UUID, - # - queues: List[EvaluationQueueCreate], - ) -> List[EvaluationQueue]: - for queue in queues: - queue.version = CURRENT_VERSION - - return await self.evaluations_dao.create_queues( - project_id=project_id, - user_id=user_id, - # - queues=queues, - ) - - async def fetch_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[EvaluationQueue]: - return await self.evaluations_dao.fetch_queue( - project_id=project_id, - # - queue_id=queue_id, - ) - - async def fetch_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[EvaluationQueue]: - return await self.evaluations_dao.fetch_queues( - project_id=project_id, - # - queue_ids=queue_ids, - ) - - async def edit_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueEdit, - ) -> Optional[EvaluationQueue]: - queue.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_queue( - project_id=project_id, - user_id=user_id, - # - queue=queue, - ) - - async def edit_queues( - self, - *, - project_id: UUID, - user_id: UUID, - # - queues: List[EvaluationQueueEdit], - ) -> List[EvaluationQueue]: - for queue in queues: - queue.version = CURRENT_VERSION - - return await self.evaluations_dao.edit_queues( - project_id=project_id, - user_id=user_id, - # - queues=queues, - ) - - async def delete_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[UUID]: - return await self.evaluations_dao.delete_queue( - project_id=project_id, - # - queue_id=queue_id, - ) - - async def delete_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[UUID]: - return await self.evaluations_dao.delete_queues( - project_id=project_id, - # - queue_ids=queue_ids, - ) - - async def query_queues( - self, - *, - project_id: UUID, - # - queue: Optional[EvaluationQueueQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationQueue]: - return await self.evaluations_dao.query_queues( - project_id=project_id, - # - queue=queue, - # - windowing=windowing, - ) - - async def fetch_queue_scenarios( - self, - *, - project_id: UUID, - user_id: Optional[UUID] = None, - # - queue_id: UUID, - # - ) -> List[List[UUID]]: - queue = await self.fetch_queue( - project_id=project_id, - queue_id=queue_id, - ) - - if not queue: - return [] - - queue_scenario_ids = queue.data.scenario_ids if queue.data else None - - scenarios = await self.query_scenarios( - project_id=project_id, - scenario=EvaluationScenarioQuery( - run_id=queue.run_id, - ids=queue_scenario_ids, - ), - ) - - run_scenario_ids = [scenario.id for scenario in scenarios] - run_scenario_ids = [id for id in run_scenario_ids if id is not None] - - queue_user_ids = queue.data.user_ids if queue.data else None - - if not queue_user_ids: - return [run_scenario_ids] - - is_sequential = queue.flags and queue.flags.is_sequential or False - - user_scenario_ids = filter_scenario_ids( - user_id, - queue_user_ids, - run_scenario_ids, - is_sequential, - ) - - return user_scenario_ids - - -class SimpleEvaluationsService: - def __init__( - self, - queries_service: QueriesService, - testsets_service: TestsetsService, - evaluators_service: EvaluatorsService, - evaluations_service: EvaluationsService, - simple_testsets_service: SimpleTestsetsService, - simple_evaluators_service: SimpleEvaluatorsService, - ): - self.queries_service = queries_service - self.testsets_service = testsets_service - self.evaluators_service = evaluators_service - self.evaluations_service = evaluations_service - self.simple_testsets_service = simple_testsets_service - self.simple_evaluators_service = simple_evaluators_service - - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation: SimpleEvaluationCreate, - ) -> Optional[SimpleEvaluation]: - evaluation.flags = evaluation.flags or SimpleEvaluationFlags( - is_closed=False, - is_live=False, - is_active=True, - ) - - if not evaluation.data: - log.info("[EVAL] [failure] missing simple evaluation data") - return None - - # ---------------------------------------------------------------------- - log.info("[EVAL] [create]") - log.info("[EVAL] [scope] ", project_id=project_id, user_id=user_id) - log.info("[EVAL] [flags] ", ids=evaluation.flags.model_dump(mode="json")) - log.info("[EVAL] [status] ", ids=evaluation.data.status) - log.info("[EVAL] [queries] ", ids=evaluation.data.query_steps) - log.info("[EVAL] [testsets] ", ids=evaluation.data.testset_steps) - log.info("[EVAL] [applications]", ids=evaluation.data.application_steps) - log.info("[EVAL] [evaluators] ", ids=evaluation.data.evaluator_steps) - log.info("[EVAL] [repeats] ", repeats=evaluation.data.repeats) - # ---------------------------------------------------------------------- - - try: - run_flags = await self._make_evaluation_run_flags( - is_closed=False, - is_live=evaluation.flags.is_live, - is_active=False, - ) - - if not run_flags: - log.info("[EVAL] [failure] invalid simple evaluation flags") - return None - - evaluation_jit = evaluation.jit or {"testsets": True, "evaluators": True} - - run_data = await self._make_evaluation_run_data( - project_id=project_id, - user_id=user_id, - # - query_steps=evaluation.data.query_steps, - testset_steps=evaluation.data.testset_steps, - application_steps=evaluation.data.application_steps, - evaluator_steps=evaluation.data.evaluator_steps, - # - repeats=evaluation.data.repeats, - # - jit=evaluation_jit, - ) - - if not run_data: - log.error("[EVAL] [failure] missing or invalid simple evaluation data") - return None - - run_create = EvaluationRunCreate( - name=evaluation.name, - description=evaluation.description, - # - flags=run_flags, - tags=evaluation.tags, - meta=evaluation.meta, - # - status=evaluation.data.status or EvaluationStatus.PENDING, - # - data=run_data, - ) - - run = await self.evaluations_service.create_run( - project_id=project_id, - user_id=user_id, - # - run=run_create, - ) - - if not run or not run.id: - log.error("[EVAL] [failure] could not create evaluation run") - return None - - log.info("[EVAL] [run] ", id=run.id) - - log.info("[EVAL] [start] ", id=run.id) - - _evaluation = await self.start( - project_id=project_id, - user_id=user_id, - evaluation_id=run.id, - # - just_created=True, - ) - - if not _evaluation: - log.error("[EVAL] [failure] could not start evaluation run") - return None - - log.info("[EVAL] [success] ", id=run.id) - return _evaluation - - except: # pylint: disable=bare-except - log.error("[EVAL] [failure] ", exc_info=True) - return None - - async def fetch( - self, - *, - project_id: UUID, - # - evaluation_id: UUID, - ) -> Optional[SimpleEvaluation]: - run = await self.evaluations_service.fetch_run( - project_id=project_id, - # - run_id=evaluation_id, - ) - - if not run: - return None - - evaluation = await self._parse_evaluation_run(run=run) - - return evaluation - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation: SimpleEvaluationEdit, - ) -> Optional[SimpleEvaluation]: - evaluation.flags = evaluation.flags or SimpleEvaluationFlags( - is_closed=False, - is_live=False, - is_active=True, - ) - - if not evaluation.id: - log.info("[EVAL] [failure] missing simple evaluation id") - return None - - if not evaluation.flags: - log.info("") - return None - - if not evaluation.data: - log.info("[EVAL] [failure] missing simple evaluation data") - return None - - # ---------------------------------------------------------------------- - log.info("[EVAL] [edit] ", run_id=evaluation.id) - log.info("[EVAL] [scope] ", project_id=project_id, user_id=user_id) - log.info("[EVAL] [flags] ", ids=evaluation.flags.model_dump(mode="json")) - log.info("[EVAL] [queries] ", ids=evaluation.data.query_steps) - log.info("[EVAL] [testsets] ", ids=evaluation.data.testset_steps) - log.info("[EVAL] [applications]", ids=evaluation.data.application_steps) - log.info("[EVAL] [evaluators] ", ids=evaluation.data.evaluator_steps) - log.info("[EVAL] [repeats] ", repeats=evaluation.data.repeats) - # ---------------------------------------------------------------------- - - try: - _evaluation = await self.fetch( - project_id=project_id, - # - evaluation_id=evaluation.id, - ) - - if not _evaluation or not _evaluation.id: - log.error("[EVAL] [failure] could not find evaluation run") - return None - - if not _evaluation.flags: - _evaluation.flags = SimpleEvaluationFlags() - - if not _evaluation.data: - _evaluation.data = SimpleEvaluationData() - - if _evaluation.flags.is_closed: - log.error("[EVAL] [failure] cannot edit closed evaluation run") - return None - - was_active = _evaluation.flags.is_active - - run_status = _evaluation.data.status - - if was_active: - log.info("[EVAL] [stop] ", run_id=_evaluation.id) - _evaluation = await self.stop( - project_id=project_id, - user_id=user_id, - # - evaluation_id=_evaluation.id, - ) - - if not _evaluation or not _evaluation.id: - log.error("[EVAL] [failure] could not stop evaluation run") - return None - - if not _evaluation.flags: - _evaluation.flags = SimpleEvaluationFlags() - - if not _evaluation.data: - _evaluation.data = SimpleEvaluationData() - - await sleep(SAFE_CLOSE_DELAY) - - run_flags = await self._make_evaluation_run_flags( - is_closed=_evaluation.flags.is_closed, - is_live=_evaluation.flags.is_live, - is_active=_evaluation.flags.is_active, - ) - - run_data = await self._make_evaluation_run_data( - project_id=project_id, - user_id=user_id, - # - query_steps=evaluation.data.query_steps, - testset_steps=evaluation.data.testset_steps, - application_steps=evaluation.data.application_steps, - evaluator_steps=evaluation.data.evaluator_steps, - # - repeats=_evaluation.data.repeats, - ) - - run_edit = EvaluationRunEdit( - id=_evaluation.id, - name=evaluation.name, - description=evaluation.description, - # - flags=run_flags, - tags=evaluation.tags, - meta=evaluation.meta, - # - status=run_status, - # - data=run_data, - ) - - run = await self.evaluations_service.edit_run( - project_id=project_id, - user_id=user_id, - # - run=run_edit, - ) - - if not run: - log.error("[EVAL] [failure] could not edit evaluation run") - return None - - if was_active: - log.info("[EVAL] [start] ", run_id=_evaluation.id) - - _evaluation = await self.start( - project_id=project_id, - user_id=user_id, - # - evaluation_id=_evaluation.id, - ) - - if not _evaluation or not _evaluation.id: - log.error("[EVAL] [failure] could not start evaluation run") - return None - - else: - _evaluation = await self.fetch( - project_id=project_id, - # - evaluation_id=_evaluation.id, - ) - - if not _evaluation or not _evaluation.id: - log.error("[EVAL] [failure] could not find evaluation run") - return None - - log.info("[EVAL] [success] ", run_id=_evaluation.id) - - return _evaluation - - except: # pylint: disable=bare-except - log.error("[EVAL] [failure] ", exc_info=True) - return None - - async def delete( - self, - *, - project_id: UUID, - # - evaluation_id: UUID, - ) -> Optional[UUID]: - await self.evaluations_service.delete_run( - project_id=project_id, - # - run_id=evaluation_id, - ) - - return evaluation_id - - async def query( - self, - *, - project_id: UUID, - # - query: Optional[SimpleEvaluationQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[SimpleEvaluation]: - run_query = await self._make_evaluation_run_query( - is_closed=query.flags.is_closed if query and query.flags else None, - is_live=query.flags.is_live if query and query.flags else None, - is_active=query.flags.is_active if query and query.flags else None, - # - tags=query.tags if query else None, - meta=query.meta if query else None, - ) - - runs = await self.evaluations_service.query_runs( - project_id=project_id, - # - run=run_query, - # - windowing=windowing, - ) - - _evaluations = [ - _evaluation - for _evaluation in [ - await self._parse_evaluation_run(run=run) for run in runs if run - ] - if _evaluation - ] - - return _evaluations - - async def start( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation_id: UUID, - # - just_created: Optional[bool] = None, - ) -> Optional[SimpleEvaluation]: - try: - _evaluation = await self.fetch( - project_id=project_id, - # - evaluation_id=evaluation_id, - ) - - if not _evaluation or not _evaluation.id: - return None - - if not _evaluation.flags: - _evaluation.flags = SimpleEvaluationFlags() - - if not _evaluation.data: - _evaluation.data = SimpleEvaluationData() - - if _evaluation.flags.is_live and _evaluation.data.query_steps: - run = await self._activate_evaluation_run( - project_id=project_id, - user_id=user_id, - # - run_id=_evaluation.id, - # - just_created=just_created, - ) - - if not run or not run.id: - log.error( - "[EVAL] [start] [failure] could not activate evaluation run" - ) - return None - - _evaluation = await self._parse_evaluation_run(run=run) - - elif ( - not _evaluation.flags.is_live - and _evaluation.data.evaluator_steps - and (_evaluation.data.query_steps or _evaluation.data.testset_steps) - ): - run = await self._activate_evaluation_run( - project_id=project_id, - user_id=user_id, - # - run_id=_evaluation.id, - # - just_created=just_created, - ) - - if not run or not run.id: - log.error( - "[EVAL] [start] [failure] could not activate evaluation run" - ) - return None - - if _evaluation.data.query_steps: - celery_dispatch.send_task( # type: ignore - "src.tasks.evaluations.batch.evaluate_queries", - kwargs=dict( - project_id=project_id, - user_id=user_id, - # - run_id=run.id, - ), - ) - - elif _evaluation.data.testset_steps: - celery_dispatch.send_task( # type: ignore - "src.tasks.evaluations.batch.evaluate_testsets", - kwargs=dict( - project_id=project_id, - user_id=user_id, - # - run_id=run.id, - ), - ) - - return _evaluation - - log.info("[EVAL] [start] [success]") - - return _evaluation - - except: # pylint: disable=bare-except - log.error("[EVAL] [start] [failure]", exc_info=True) - return None - - async def stop( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation_id: UUID, - ) -> Optional[SimpleEvaluation]: - run = await self._deactivate_evaluation_run( - project_id=project_id, - user_id=user_id, - # - run_id=evaluation_id, - ) - - if not run or not run.id: - log.error("[EVAL] [stop] [failure] could not stop evaluation run") - return None - - _evaluation = await self._parse_evaluation_run(run=run) - - return _evaluation - - async def close( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation_id: UUID, - ) -> Optional[SimpleEvaluation]: - run = await self.evaluations_service.close_run( - project_id=project_id, - user_id=user_id, - # - run_id=evaluation_id, - ) - - if not run or not run.id: - log.error("[EVAL] [close] [failure] could not close evaluation run") - return None - - evaluation = await self._parse_evaluation_run(run=run) - - return evaluation - - async def open( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluation_id: UUID, - ) -> Optional[SimpleEvaluation]: - run = await self.evaluations_service.open_run( - project_id=project_id, - user_id=user_id, - # - run_id=evaluation_id, - ) - - if not run or not run.id: - log.error("[EVAL] [open] [failure] could not open evaluation run") - return None - - evaluation = await self._parse_evaluation_run(run=run) - - return evaluation - - async def _make_evaluation_run_data( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_steps: Optional[Target] = None, - testset_steps: Optional[Target] = None, - application_steps: Optional[Target] = None, - evaluator_steps: Optional[Target] = None, - # - repeats: Optional[int] = None, - # - jit: Optional[Dict[str, bool]] = None, - ) -> Optional[EvaluationRunData]: - # IMPLICIT FLAG: is_multivariate=False - # IMPLICIT FLAG: all_inputs=True - # IMPLICIT FLAG: full_references=True - - try: - # fetch queries ---------------------------------------------------- - query_input_steps_keys: List[str] = list() - query_references: Dict[str, Dict[str, Reference]] = dict() - query_revisions: Dict[str, QueryRevision] = dict() - query_origins: Dict[str, Origin] = dict() - - if isinstance(query_steps, list): - query_steps = { - query_revision_id: DEFAULT_ORIGIN_QUERIES - for query_revision_id in query_steps - } - - for query_revision_id, origin in (query_steps or {}).items(): - query_revision_ref = Reference(id=query_revision_id) - - query_revision = await self.queries_service.fetch_query_revision( - project_id=project_id, - # - query_revision_ref=query_revision_ref, - ) - - if not query_revision or not query_revision.slug: - log.warn( - "[EVAL] [run] [make] [failure] could not find query revision", - id=query_revision_ref.id, - ) - return None - - query_variant_ref = Reference(id=query_revision.variant_id) - - query_variant = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_variant_ref=query_variant_ref, - ) - - if not query_variant: - log.warn( - "[EVAL] [run] [make] [failure] could not find query variant", - id=query_variant_ref.id, - ) - return None - - query_ref = Reference(id=query_variant.query_id) - - query = await self.queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - log.warn( - "[EVAL] [run] [make] [failure] could not find query", - id=query_ref.id, - ) - return None - - step_key = "query-" + query_revision.slug - - query_input_steps_keys.append(step_key) - - query_references[step_key] = dict( - query=Reference( - id=query.id, - slug=query.slug, - ), - query_variant=Reference( - id=query_variant.id, - slug=query_variant.slug, - ), - query_revision=Reference( - id=query_revision.id, - slug=query_revision.slug, - version=query_revision.version, - ), - ) - - query_revisions[step_key] = query_revision - - query_origins[step_key] = origin - - # ------------------------------------------------------------------ - - # fetch testsets --------------------------------------------------- - testset_input_steps_keys: List[str] = list() - testset_references: Dict[str, Dict[str, Reference]] = dict() - testset_revisions: Dict[str, TestsetRevision] = dict() - testset_origins: Dict[str, Origin] = dict() - testcases: Dict[str, List[Testcase]] = dict() - - if isinstance(testset_steps, list): - testset_steps = { - testset_revision_id: DEFAULT_ORIGIN_TESTSETS - for testset_revision_id in testset_steps - } - - # JIT MIGRATION ================================================== # - if jit and jit.get("testsets"): - _testset_steps = deepcopy(testset_steps or {}) - testset_steps = dict() - - for testset_id, origin in _testset_steps.items(): - testset_ref = Reference(id=testset_id) - - simple_testset = await self.simple_testsets_service.transfer( - project_id=project_id, - user_id=user_id, - # - testset_id=testset_id, - ) - - if ( - not simple_testset - or not simple_testset.id - or not simple_testset.slug - ): - log.warn( - "[EVAL] [run] [make] [failure] could not transfer simple testset", - id=testset_ref.id, - ) - return None - - testset_revision = await self.testsets_service.fetch_testset_revision( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if ( - not testset_revision - or not testset_revision.id - or not testset_revision.slug - ): - log.warn( - "[EVAL] [run] [make] [failure] could not find testset revision", - id=testset_ref.id, - ) - return None - - testset_steps[testset_revision.id] = origin - # ================================================================ # - - for testset_revision_id, origin in (testset_steps or {}).items(): - testset_revision_ref = Reference(id=testset_revision_id) - - testset_revision = await self.testsets_service.fetch_testset_revision( - project_id=project_id, - # - testset_revision_ref=testset_revision_ref, - ) - - if not testset_revision or not testset_revision.slug: - log.warn( - "[EVAL] [run] [make] [failure] could not find testset revision", - id=testset_revision_ref.id, - ) - return None - - if not testset_revision.data or not testset_revision.data.testcases: - log.warn( - "[EVAL] [run] [make] [failure] invalid testset revision", - id=testset_revision_ref.id, - ) - return None - - testset_variant_ref = Reference(id=testset_revision.variant_id) - - testset_variant = await self.testsets_service.fetch_testset_variant( - project_id=project_id, - # - testset_variant_ref=testset_variant_ref, - ) - - if not testset_variant: - log.warn( - "[EVAL] [run] [make] [failure] could not find testset variant", - id=testset_variant_ref.id, - ) - return None - - testset_ref = Reference(id=testset_variant.testset_id) - - testset = await self.testsets_service.fetch_testset( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if not testset: - log.warn( - "[EVAL] [run] [make] [failure] could not find testset", - id=testset_ref.id, - ) - return None - - step_key = "testset-" + testset_revision.slug - - testset_input_steps_keys.append(step_key) - - testset_references[step_key] = dict( - testset=Reference( - id=testset.id, - slug=testset.slug, - ), - testset_variant=Reference( - id=testset_variant.id, - slug=testset_variant.slug, - ), - testset_revision=Reference( - id=testset_revision.id, - slug=testset_revision.slug, - version=testset_revision.version, - ), - ) - - testset_revisions[step_key] = testset_revision - - testset_origins[step_key] = origin - - testcases[step_key] = testset_revision.data.testcases - - if any(not testcase.data for testcase in testcases[step_key]): - log.warn( - "[EVAL] [run] [make] [failure] invalid testset revision", - id=testset_revision_ref.id, - ) - return None - # ------------------------------------------------------------------ - - # fetch applications ----------------------------------------------- - application_invocation_steps_keys: List[str] = list() - application_references: Dict[str, Dict[str, Reference]] = dict() - application_revisions: Dict[str, AppVariantRevisionsDB] = dict() - application_origins: Dict[str, Origin] = dict() - - if isinstance(application_steps, list): - application_steps = { - application_revision_id: DEFAULT_ORIGIN_APPLICATIONS - for application_revision_id in application_steps - } - - for application_revision_id, origin in (application_steps or {}).items(): - application_revision_ref = Reference(id=application_revision_id) - - application_revision = await fetch_app_variant_revision_by_id( - variant_revision_id=str(application_revision_ref.id), - ) - - if not application_revision: - log.warn( - "[EVAL] [run] [make] [failure] could not find application revision", - id=application_revision_ref.id, - ) - return None - - application_variant_ref = Reference( - id=UUID(str(application_revision.variant_id)) - ) - - application_variant = await fetch_app_variant_by_id( - app_variant_id=str(application_variant_ref.id), - ) - - if not application_variant: - log.warn( - "[EVAL] [run] [make] [failure] could not find application variant", - id=application_variant_ref.id, - ) - return None - - application_ref = Reference(id=UUID(str(application_variant.app_id))) - - application = await fetch_app_by_id( - app_id=str(application_ref.id), - ) - - if not application: - log.warn( - "[EVAL] [run] [make] [failure] could not find application", - id=application_ref.id, - ) - return None - - application_revision_slug = get_slug_from_name_and_id( - str(application_revision.config_name), - UUID(str(application_revision.id)), - ) - - step_key = "application-" + application_revision_slug - - application_invocation_steps_keys.append(step_key) - - application_references[step_key] = dict( - application=Reference( - id=application_ref.id, - slug=str(application.app_name), - ), - application_variant=Reference( - id=application_variant_ref.id, - slug=str(application_variant.variant_name), - ), - application_revision=Reference( - id=application_revision_ref.id, - slug=str(application_revision.config_name), - version=str(application_revision.revision), - ), - ) - - application_revisions[step_key] = application_revision - - application_origins[step_key] = origin - - # ------------------------------------------------------------------ - - # fetch evaluators ------------------------------------------------- - evaluator_annotation_steps_keys: List[str] = list() - evaluator_references: Dict[str, Dict[str, Reference]] = dict() - evaluator_revisions: Dict[str, EvaluatorRevision] = dict() - evaluator_origins: Dict[str, Origin] = dict() - evaluator_metrics_keys: Dict[str, List[Dict[str, str]]] = dict() - - if isinstance(evaluator_steps, list): - evaluator_steps = { - evaluator_revision_id: DEFAULT_ORIGIN_EVALUATORS - for evaluator_revision_id in evaluator_steps - } - - # JIT MIGRATION ================================================== # - if jit and jit.get("evaluators"): - _evaluator_steps = deepcopy(evaluator_steps or {}) - evaluator_steps = dict() - - for evaluator_id, origin in _evaluator_steps.items(): - evaluator_ref = Reference(id=evaluator_id) - - simple_evaluator = await self.simple_evaluators_service.transfer( - project_id=project_id, - user_id=user_id, - # - evaluator_id=evaluator_id, - ) - - if ( - not simple_evaluator - or not simple_evaluator.id - or not simple_evaluator.slug - ): - log.warn( - "[EVAL] [run] [make] [failure] could not transfer simple evaluator", - id=evaluator_ref.id, - ) - return None - - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if ( - not evaluator_revision - or not evaluator_revision.id - or not evaluator_revision.slug - ): - log.warn( - "[EVAL] [run] [make] [failure] could not find evaluator revision", - id=evaluator_ref.id, - ) - return None - - evaluator_steps[evaluator_revision.id] = origin - # ================================================================ # - - for evaluator_revision_id, origin in (evaluator_steps or {}).items(): - evaluator_revision_ref = Reference(id=evaluator_revision_id) - - evaluator_revision = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_revision_ref=evaluator_revision_ref, - ) - - if not evaluator_revision or not evaluator_revision.slug: - log.warn( - "[EVAL] [run] [make] [failure] could not find evaluator revision", - id=evaluator_revision_ref.id, - ) - return None - - if not evaluator_revision.data: - log.warn( - "[EVAL] [run] [make] [failure] invalid evaluator revision", - id=evaluator_revision_ref.id, - ) - return None - - evaluator_variant_ref = Reference(id=evaluator_revision.variant_id) - - evaluator_variant = await self.evaluators_service.fetch_evaluator_variant( - project_id=project_id, - # - evaluator_variant_ref=evaluator_variant_ref, - ) - - if not evaluator_variant: - log.warn( - "[EVAL] [run] [make] [failure] could not find evaluator variant", - id=evaluator_variant_ref.id, - ) - return None - - evaluator_ref = Reference(id=evaluator_variant.evaluator_id) - - evaluator = await self.evaluators_service.fetch_evaluator( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if not evaluator: - log.warn( - "[EVAL] [run] [make] [failure] could not find evaluator", - id=evaluator_ref.id, - ) - return None - - step_key = "evaluator-" + evaluator_revision.slug - - evaluator_annotation_steps_keys.append(step_key) - - evaluator_references[step_key] = dict( - evaluator=Reference( - id=evaluator.id, - slug=evaluator.slug, - ), - evaluator_variant=Reference( - id=evaluator_variant.id, - slug=evaluator_variant.slug, - ), - evaluator_revision=Reference( - id=evaluator_revision.id, - slug=evaluator_revision.slug, - version=evaluator_revision.version, - ), - ) - - evaluator_revisions[step_key] = evaluator_revision - - evaluator_origins[step_key] = origin - - if evaluator_revision.data.schemas: - metrics_keys = get_metrics_keys_from_schema( - schema=(evaluator_revision.data.schemas.get("outputs")), - ) - - evaluator_metrics_keys[step_key] = [ - { - "path": metric_key.get("path", ""), - "type": metric_key.get("type", ""), - } - for metric_key in metrics_keys - ] - else: - evaluator_metrics_keys[step_key] = [ - { - "path": "outputs", - "type": "json", - } - ] - # ------------------------------------------------------------------ - - # make run steps --------------------------------------------------- - query_inputs_steps: List[EvaluationRunDataStep] = [ - EvaluationRunDataStep( - key=step_key, - type="input", - origin=query_origins[step_key], - # IMPLICIT FLAG: full_references=True - references=query_references[step_key], - ) - for step_key in query_input_steps_keys - ] - - testset_inputs_steps: List[EvaluationRunDataStep] = [ - EvaluationRunDataStep( - key=step_key, - type="input", - origin=testset_origins[step_key], - # IMPLICIT FLAG: full_references=True - references=testset_references[step_key], - ) - for step_key in testset_input_steps_keys - ] - - application_invocation_steps: List[EvaluationRunDataStep] = [ - EvaluationRunDataStep( - key=step_key, - type="invocation", - origin=application_origins[step_key], - references=application_references[step_key], - inputs=[ - # IMPLICIT FLAG: all_inputs=True - EvaluationRunDataStepInput(key="__all_inputs__"), - ], - ) - for step_key in application_invocation_steps_keys - ] - - evaluator_annotation_steps: List[EvaluationRunDataStep] = [ - EvaluationRunDataStep( - key=step_key, - type="annotation", - origin=evaluator_origins[step_key], - references=evaluator_references[step_key], - inputs=( - [ - # IMPLICIT FLAG: is_multivariate=False - EvaluationRunDataStepInput(key="__all_invocations__"), - # IMPLICIT FLAG: all_inputs=True - EvaluationRunDataStepInput(key="__all_inputs__"), - ] - if not query_steps - else [ - # IMPLICIT FLAG: all_inputs=True - EvaluationRunDataStepInput(key="__all_inputs__"), - ] - ), - ) - for step_key in evaluator_annotation_steps_keys - ] - - steps: List[EvaluationRunDataStep] = ( - query_inputs_steps - + testset_inputs_steps - + application_invocation_steps - + evaluator_annotation_steps - ) - # ------------------------------------------------------------------ - - # make run mappings ------------------------------------------------ - query_input_mappings: List[EvaluationRunDataMapping] = list( # type: ignore - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="query", - name="data", - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path="attributes.ag.data", - ), - ) - for step_key in query_input_steps_keys - ) - - testset_input_mappings: List[EvaluationRunDataMapping] = list( # type: ignore - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="testset", - name=key, - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path=f"data.{key}", - ), - ) - for step_key in testset_input_steps_keys - for key in testcases[step_key][0].data.keys() # type: ignore - ) - - application_invocation_mappings: List[EvaluationRunDataMapping] = list( # type: ignore - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="invocation", - name="outputs", - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path="attributes.ag.data.outputs", - ), - ) - for step_key in application_invocation_steps_keys - ) - - evaluator_annotation_mappings: List[EvaluationRunDataMapping] = list( # type: ignore - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="annotation", - name=metric_key.get("path", ""), - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path=f"attributes.ag.data.outputs{('.' + metric_key.get('path', '')) if metric_key.get('path') else ''}", - ), - ) - for step_key in evaluator_annotation_steps_keys - for metric_key in evaluator_metrics_keys[step_key] - ) - - mappings: List[EvaluationRunDataMapping] = ( - query_input_mappings - + testset_input_mappings - + application_invocation_mappings - + evaluator_annotation_mappings - ) - # ------------------------------------------------------------------ - - return EvaluationRunData( - steps=steps, - mappings=mappings, - repeats=repeats or 1, - ) - - except: # pylint: disable=bare-except - log.error("[EVAL] [run] [make] [failure]", exc_info=True) - - return None - - async def _make_evaluation_run_flags( - self, - *, - is_closed: Optional[bool] = None, - is_live: Optional[bool] = None, - is_active: Optional[bool] = None, - ) -> EvaluationRunFlags: - return EvaluationRunFlags( - is_closed=is_closed, - is_live=is_live, - is_active=is_active, - ) - - async def _make_evaluation_run_query( - self, - *, - is_closed: Optional[bool] = None, - is_live: Optional[bool] = None, - is_active: Optional[bool] = None, - # - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - ): - run_flags = await self._make_evaluation_run_flags( - is_closed=is_closed, - is_live=is_live, - is_active=is_active, - ) - - run_query = EvaluationRunQuery( - flags=run_flags, - tags=tags, - meta=meta, - ) - - return run_query - - async def _activate_evaluation_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - just_created: Optional[bool] = None, - ) -> Optional[EvaluationRun]: - run = await self.evaluations_service.fetch_run( - project_id=project_id, - # - run_id=run_id, - ) - - if not run or not run.id: - log.error("[EVAL] [activate] [failure] could not find evaluation run") - return None - - if not run.flags: - run.flags = EvaluationRunFlags() - - run.flags.is_active = True - - run = await self.evaluations_service.edit_run( - project_id=project_id, - user_id=user_id, - # - run=EvaluationRunEdit( - id=run.id, - # - name=run.name, - description=run.description, - # - flags=run.flags, - tags=run.tags, - meta=run.meta, - # - status=EvaluationStatus.RUNNING if just_created else run.status, - # - data=run.data, - ), - ) - - return run - - async def _deactivate_evaluation_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - run = await self.evaluations_service.fetch_run( - project_id=project_id, - # - run_id=run_id, - ) - - if not run or not run.id: - log.error("[EVAL] [deactivate] [failure] could not find evaluation run") - return None - - if not run.flags: - run.flags = EvaluationRunFlags() - - run.flags.is_active = False - - run = await self.evaluations_service.edit_run( - project_id=project_id, - user_id=user_id, - # - run=EvaluationRunEdit( - id=run.id, - # - name=run.name, - description=run.description, - # - flags=run.flags, - tags=run.tags, - meta=run.meta, - # - status=run.status, - # - data=run.data, - ), - ) - - return run - - async def _parse_evaluation_run( - self, - *, - run: EvaluationRun, - ) -> Optional[SimpleEvaluation]: - try: - if not run: - return None - - if not run.flags: - run.flags = EvaluationRunFlags() - - if not run.data: - run.data = EvaluationRunData() - - steps = run.data.steps if run.data.steps else [] - - query_steps: Target = dict() - testset_steps: Target = dict() - application_steps: Target = dict() - evaluator_steps: Target = dict() - - repeats = run.data.repeats if run.data and run.data.repeats else None - - for step in steps: - step_type = step.type - step_origin = step.origin - step_references = step.references - step_id = None - - if step_type == "input": - if "query_revision" in step_references: - step_ref = step_references["query_revision"] - if not isinstance(step_ref, Reference): - continue - step_id = step_ref.id - query_steps[step_id] = step_origin # type: ignore - elif "testset_revision" in step_references: - step_ref = step_references["testset_revision"] - if not isinstance(step_ref, Reference): - continue - step_id = step_ref.id - testset_steps[step_id] = step_origin # type: ignore - elif step_type == "invocation": - if "application_revision" in step_references: - step_ref = step_references["application_revision"] - if not isinstance(step_ref, Reference): - continue - step_id = step_ref.id - application_steps[step_id] = step_origin # type: ignore - elif step_type == "annotation": - if "evaluator_revision" in step_references: - step_ref = step_references["evaluator_revision"] - if not isinstance(step_ref, Reference): - continue - step_id = step_ref.id - evaluator_steps[step_id] = step_origin # type: ignore - - evaluation_flags = SimpleEvaluationFlags(**run.flags.model_dump()) - - evaluation_status = SimpleEvaluationStatus(run.status) - - evaluation_data = SimpleEvaluationData( - status=evaluation_status, - # - query_steps=query_steps, - testset_steps=testset_steps, - application_steps=application_steps, - evaluator_steps=evaluator_steps, - # - repeats=repeats, - ) - - return SimpleEvaluation( - id=run.id, - # - name=run.name, - description=run.description, - # - created_at=run.created_at, - updated_at=run.updated_at, - deleted_at=run.deleted_at, - created_by_id=run.created_by_id, - updated_by_id=run.updated_by_id, - deleted_by_id=run.deleted_by_id, - # - flags=evaluation_flags, - tags=run.tags, - meta=run.meta, - # - data=evaluation_data, - ) - - except: # pylint: disable=bare-except - log.error("[EVAL] [run] [parse] [failure]", exc_info=True) - return None diff --git a/api/oss/src/core/evaluations/types.py b/api/oss/src/core/evaluations/types.py deleted file mode 100644 index 5ab35ea610..0000000000 --- a/api/oss/src/core/evaluations/types.py +++ /dev/null @@ -1,445 +0,0 @@ -from typing import Optional, Dict, List, Union, Literal -from enum import Enum -from uuid import UUID -from datetime import datetime - -from pydantic import BaseModel, field_validator - -from oss.src.core.tracing.dtos import ( - MetricSpec, - TracingQuery, -) - -from oss.src.core.shared.dtos import ( - Version, - Identifier, - Lifecycle, - Header, - Metadata, - Data, - Reference, - Link, -) - -References = Dict[str, Reference] -Links = Dict[str, Link] - -Type = Literal["input", "invocation", "annotation"] -Origin = Literal["custom", "human", "auto"] -Target = Union[List[UUID], Dict[UUID, Origin]] - -CURRENT_VERSION = "2025-07-14" - - -class EvaluationStatus(str, Enum): - PENDING = "pending" - QUEUED = "queued" - RUNNING = "running" - SUCCESS = "success" - FAILURE = "failure" - ERRORS = "errors" - CANCELLED = "cancelled" - - -class EvaluationClosedConflict(Exception): - """Exception raised when trying to modify a closed evaluation.""" - - def __init__( - self, - message: str = "Cannot modify a closed evaluation.", - run_id: Optional[UUID] = None, - scenario_id: Optional[UUID] = None, - result_id: Optional[UUID] = None, - metrics_id: Optional[UUID] = None, - ): - super().__init__(message) - - self.message = message - self.run_id = run_id - self.scenario_id = scenario_id - self.result_id = result_id - self.metrics_id = metrics_id - - def __str__(self): - _message = self.message - - if self.run_id: - _message += f" run_id={self.run_id}" - if self.scenario_id: - _message += f" scenario_id={self.scenario_id}" - if self.result_id: - _message += f" result_id={self.result_id}" - if self.metrics_id: - _message += f" metrics_id={self.metrics_id}" - - return _message - - -# - EVALUATION RUN ------------------------------------------------------------- - - -class EvaluationRunFlags(BaseModel): - is_closed: Optional[bool] = None # Indicates if the run is modifiable - is_live: Optional[bool] = None # Indicates if the run has live queries - is_active: Optional[bool] = None # Indicates if the run is currently active - - -class EvaluationRunDataStepInput(BaseModel): - key: str - - -class EvaluationRunDataStep(BaseModel): - key: str - type: Type - origin: Origin - references: Dict[str, Reference] - inputs: Optional[List[EvaluationRunDataStepInput]] = None - - -class EvaluationRunDataMappingColumn(BaseModel): - kind: str - name: str - - -class EvaluationRunDataMappingStep(BaseModel): - key: str - path: str - - -class EvaluationRunDataMapping(BaseModel): - column: EvaluationRunDataMappingColumn - step: EvaluationRunDataMappingStep - - -class EvaluationRunData(BaseModel): - steps: Optional[List[EvaluationRunDataStep]] = None - repeats: Optional[int] = 1 - mappings: Optional[List[EvaluationRunDataMapping]] = None - - @field_validator("repeats") - def set_repeats(cls, v): - if v is None: - return 1 - return v - - -class EvaluationRun(Version, Identifier, Lifecycle, Header, Metadata): - flags: Optional[EvaluationRunFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = EvaluationStatus.PENDING - - data: Optional[EvaluationRunData] = None - - -class EvaluationRunCreate(Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[EvaluationRunFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = None - - data: Optional[EvaluationRunData] = None - - -class EvaluationRunEdit(Identifier, Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[EvaluationRunFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = None - - data: Optional[EvaluationRunData] = None - - -class EvaluationRunQuery(Header, Metadata): - flags: Optional[EvaluationRunFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = None - statuses: Optional[List[EvaluationStatus]] = None - - references: Optional[List[References]] = None - - ids: Optional[List[UUID]] = None - - -# - EVALUATION SCENARIO -------------------------------------------------------- - - -class EvaluationScenario(Version, Identifier, Lifecycle, Metadata): - status: Optional[EvaluationStatus] = EvaluationStatus.PENDING - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - run_id: UUID - - -class EvaluationScenarioCreate(Metadata): - version: str = CURRENT_VERSION - - status: Optional[EvaluationStatus] = None - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - run_id: UUID - - -class EvaluationScenarioEdit(Identifier, Metadata): - version: str = CURRENT_VERSION - - status: Optional[EvaluationStatus] = None - - -class EvaluationScenarioQuery(Metadata): - status: Optional[EvaluationStatus] = None - statuses: Optional[List[EvaluationStatus]] = None - - interval: Optional[int] = None - intervals: Optional[List[int]] = None - - timestamp: Optional[datetime] = None - timestamps: Optional[List[datetime]] = None - - run_id: Optional[UUID] = None - run_ids: Optional[List[UUID]] = None - - ids: Optional[List[UUID]] = None - - -# - EVALUATION RESULT ---------------------------------------------------------- - - -class EvaluationResult(Version, Identifier, Lifecycle, Metadata): - hash_id: Optional[UUID] = None - trace_id: Optional[str] = None - testcase_id: Optional[UUID] = None - error: Optional[Data] = None - - status: Optional[EvaluationStatus] = EvaluationStatus.PENDING - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - repeat_idx: Optional[int] = 0 - step_key: str - scenario_id: UUID - run_id: UUID - - -class EvaluationResultCreate(Metadata): - version: str = CURRENT_VERSION - - hash_id: Optional[UUID] = None - trace_id: Optional[str] = None - testcase_id: Optional[UUID] = None - error: Optional[Data] = None - - status: Optional[EvaluationStatus] = None - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - repeat_idx: Optional[int] = 0 - step_key: str - scenario_id: UUID - run_id: UUID - - -class EvaluationResultEdit(Identifier, Metadata): - version: str = CURRENT_VERSION - - hash_id: Optional[UUID] = None - trace_id: Optional[str] = None - testcase_id: Optional[UUID] = None - error: Optional[Data] = None - - status: Optional[EvaluationStatus] = None - - -class EvaluationResultQuery(Metadata): - status: Optional[EvaluationStatus] = None - statuses: Optional[List[EvaluationStatus]] = None - - interval: Optional[int] = None - intervals: Optional[List[int]] = None - - timestamp: Optional[datetime] = None - timestamps: Optional[List[datetime]] = None - - repeat_idx: Optional[int] = None - repeat_idxs: Optional[List[int]] = None - - step_key: Optional[str] = None - step_keys: Optional[List[str]] = None - - scenario_id: Optional[UUID] = None - scenario_ids: Optional[List[UUID]] = None - - run_id: Optional[UUID] = None - run_ids: Optional[List[UUID]] = None - - ids: Optional[List[UUID]] = None - - -# - EVALUATION METRICS --------------------------------------------------------- - - -class EvaluationMetrics(Version, Identifier, Lifecycle, Metadata): - status: Optional[EvaluationStatus] = EvaluationStatus.PENDING - - data: Optional[Data] = None - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - scenario_id: Optional[UUID] = None - run_id: UUID - - -class EvaluationMetricsCreate(Metadata): - version: str = CURRENT_VERSION - - status: Optional[EvaluationStatus] = None - - data: Optional[Data] = None - - interval: Optional[int] = None - timestamp: Optional[datetime] = None - scenario_id: Optional[UUID] = None - run_id: UUID - - -class EvaluationMetricsEdit(Identifier, Metadata): - version: str = CURRENT_VERSION - - status: Optional[EvaluationStatus] = None - - data: Optional[Data] = None - - -class EvaluationMetricsQuery(Metadata): - status: Optional[EvaluationStatus] = None - statuses: Optional[List[EvaluationStatus]] = None - - interval: Optional[int] = None - intervals: Optional[List[int]] = None - - timestamp: Optional[datetime] = None - timestamps: Optional[List[datetime]] = None - - scenario_id: Optional[UUID] = None - scenario_ids: Optional[List[UUID]] = None - - run_id: Optional[UUID] = None - run_ids: Optional[List[UUID]] = None - - ids: Optional[List[UUID]] = None - - -class EvaluationMetricsRefresh(BaseModel): - query: Optional[TracingQuery] = None - specs: Optional[List[MetricSpec]] = None - - ids: Optional[List[UUID]] = None - - -# - EVALUATION QUEUE ----------------------------------------------------------- - - -class EvaluationQueueFlags(BaseModel): - is_sequential: bool = False - - -class EvaluationQueueData(BaseModel): - user_ids: Optional[List[List[UUID]]] = None - scenario_ids: Optional[List[UUID]] = None - step_keys: Optional[List[str]] = None - - -class EvaluationQueue(Version, Identifier, Lifecycle, Header, Metadata): - flags: Optional[EvaluationQueueFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = EvaluationStatus.PENDING - - data: Optional[EvaluationQueueData] = None - - run_id: UUID - - -class EvaluationQueueCreate(Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[EvaluationQueueFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = None - - data: Optional[EvaluationQueueData] = None - - run_id: UUID - - -class EvaluationQueueEdit(Identifier, Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[EvaluationQueueFlags] = None # type: ignore - - status: Optional[EvaluationStatus] = None - - data: Optional[EvaluationQueueData] = None - - -class EvaluationQueueQuery(Header, Metadata): - flags: Optional[EvaluationQueueFlags] = None # type: ignore - - user_id: Optional[UUID] = None - user_ids: Optional[List[UUID]] = None - - run_id: Optional[UUID] = None - run_ids: Optional[List[UUID]] = None - - ids: Optional[List[UUID]] = None - - -# - SIMPLE EVALUATION ---------------------------------------------------------- - - -SimpleEvaluationFlags = EvaluationRunFlags - -SimpleEvaluationStatus = EvaluationStatus - - -class SimpleEvaluationData(BaseModel): - status: Optional[SimpleEvaluationStatus] = None - - query_steps: Optional[Target] = None - testset_steps: Optional[Target] = None - application_steps: Optional[Target] = None - evaluator_steps: Optional[Target] = None - - repeats: Optional[int] = None - - -class SimpleEvaluation(Version, Identifier, Lifecycle, Header, Metadata): - flags: Optional[SimpleEvaluationFlags] = None # type: ignore - - data: Optional[SimpleEvaluationData] = None - - -class SimpleEvaluationCreate(Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[SimpleEvaluationFlags] = None # type: ignore - - data: Optional[SimpleEvaluationData] = None - - jit: Optional[Dict[str, bool]] = None - - -class SimpleEvaluationEdit(Identifier, Header, Metadata): - version: str = CURRENT_VERSION - - flags: Optional[SimpleEvaluationFlags] = None # type: ignore - - data: Optional[SimpleEvaluationData] = None - - -class SimpleEvaluationQuery(Header, Metadata): - flags: Optional[SimpleEvaluationFlags] = None # type: ignore - - ids: Optional[List[UUID]] = None diff --git a/api/oss/src/core/evaluations/utils.py b/api/oss/src/core/evaluations/utils.py deleted file mode 100644 index eb4f899ff7..0000000000 --- a/api/oss/src/core/evaluations/utils.py +++ /dev/null @@ -1,153 +0,0 @@ -from typing import List, Tuple, Dict, Optional -from uuid import UUID -from asyncio import sleep - -from oss.src.core.tracing.dtos import OTelSpansTree - -# Divides cleanly into 1, 2, 3, 4, 5, 6, 8, 10, ... -BLOCKS = 1 * 2 * 3 * 4 * 5 - - -def filter_scenario_ids( - user_id: UUID, - user_ids: List[List[UUID]], - scenario_ids: List[UUID], - is_sequential: bool, - offset: int = 0, -) -> List[List[UUID]]: - user_scenario_ids: List[List[UUID]] = [] - - MOD = min(len(scenario_ids), BLOCKS) - - for repeat_user_ids in user_ids: - if not repeat_user_ids: - user_scenario_ids.append([]) - - else: - repeat_user_bounds = _get_bounds( - repeat_user_ids, - user_id, - MOD, - ) - - if not repeat_user_bounds: - user_scenario_ids.append([]) - - else: - repeat_scenario_ids = [] - for scenario_idx, scenario_id in enumerate(scenario_ids): - mod = ( - (offset + scenario_idx) if is_sequential else int(scenario_id) - ) % MOD - - if any( - lower <= mod < upper for (lower, upper) in repeat_user_bounds - ): - repeat_scenario_ids.append(scenario_id) - - if not repeat_scenario_ids: - user_scenario_ids.append([]) - - else: - user_scenario_ids.append(repeat_scenario_ids) - - return user_scenario_ids - - -def _get_bounds( - assignments: List[UUID], - target: UUID, - blocks: int, -) -> List[Tuple[int, int]]: - bounds: List[Tuple[int, int]] = [] - - n = len(assignments) - - if n == 0 or blocks <= 0: - return bounds - - q, r = divmod(blocks, n) # base size and remainder - - block_sizes = [q + 1 if i < r else q for i in range(n)] - - start = 0 - - for i, size in enumerate(block_sizes): - end = start + size - 1 - - if str(assignments[i]) == str(target): - bounds.append((start, end + 1)) # half-open bounds [start, end) - - start = end + 1 # next block starts here - - return bounds - # -------------------------------------------------------------------------- - - -def get_metrics_keys_from_schema( - schema=None, - path=(), -) -> List[Dict[str, str]]: - metrics: List[Dict[str, str]] = list() - - if not isinstance(schema, dict) or "type" not in schema: - return metrics - - metric_type = None - - t = schema["type"] - - if t == "object": - if "properties" in schema: - for key, prop in schema["properties"].items(): - metrics.extend(get_metrics_keys_from_schema(prop, path + (key,))) - else: - metric_type = "json" - - elif t == "array" and "items" in schema: - if schema["items"].get("type") == "string" and "enum" in schema["items"]: - metric_type = "categorical/multiple" - - elif t == "boolean": - metric_type = "binary" - - elif t == "string": - metric_type = "categorical/single" if "enum" in schema else "string" - - elif t == "number": - metric_type = "numeric/continuous" - - elif t == "integer": - metric_type = "numeric/discrete" - - if metric_type: - metrics.append({"path": ".".join(path), "type": metric_type}) - - return metrics - - -async def fetch_trace( - tracing_router, - request, - # - trace_id: str, - max_retries: int = 15, - delay: float = 1.0, -) -> Optional[OTelSpansTree]: - for attempt in range(max_retries): - try: - response = await tracing_router.fetch_trace( - request=request, - trace_id=trace_id, - ) - - if response and response.traces: - return next(iter(response.traces.values()), None) - - except Exception: - pass - - if attempt < max_retries - 1: - await sleep(delay) - - return None diff --git a/api/oss/src/core/evaluators/dtos.py b/api/oss/src/core/evaluators/dtos.py deleted file mode 100644 index 169b5d298f..0000000000 --- a/api/oss/src/core/evaluators/dtos.py +++ /dev/null @@ -1,300 +0,0 @@ -from typing import Optional -from uuid import UUID - -from pydantic import Field - -from oss.src.core.shared.dtos import sync_alias, AliasConfig -from oss.src.core.shared.dtos import ( - Identifier, - Slug, - Lifecycle, - Header, - Metadata, -) -from oss.src.core.workflows.dtos import ( - ArtifactFork, - VariantFork, - RevisionFork, - # - WorkflowFlags, - WorkflowQueryFlags, - # - Workflow, - WorkflowCreate, - WorkflowEdit, - WorkflowQuery, - WorkflowFork, - # - WorkflowVariant, - WorkflowVariantCreate, - WorkflowVariantEdit, - WorkflowVariantQuery, - WorkflowVariantFork, - # - WorkflowRevisionData, - # - WorkflowRevision, - WorkflowRevisionCreate, - WorkflowRevisionEdit, - WorkflowRevisionQuery, - WorkflowRevisionFork, - WorkflowRevisionCommit, - WorkflowRevisionsLog, -) - - -# aliases ---------------------------------------------------------------------- - - -class EvaluatorIdAlias(AliasConfig): - evaluator_id: Optional[UUID] = None - workflow_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="evaluator_id", - ) - - -class EvaluatorVariantIdAlias(AliasConfig): - evaluator_variant_id: Optional[UUID] = None - workflow_variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="evaluator_variant_id", - ) - - -class EvaluatorRevisionIdAlias(AliasConfig): - evaluator_revision_id: Optional[UUID] = None - workflow_revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="evaluator_revision_id", - ) - - -# globals ---------------------------------------------------------------------- - - -class EvaluatorFlags(WorkflowFlags): - def __init__(self, **data): - data["is_evaluator"] = True - - super().__init__(**data) - - -class EvaluatorQueryFlags(WorkflowQueryFlags): - def __init__(self, **data): - data["is_evaluator"] = True - - super().__init__(**data) - - -# evaluators ------------------------------------------------------------------- - - -class Evaluator(Workflow): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorCreate(WorkflowCreate): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorEdit(WorkflowEdit): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorQuery(WorkflowQuery): - flags: Optional[EvaluatorQueryFlags] = None - - -# evaluator variants ----------------------------------------------------------- - - -class EvaluatorVariant( - WorkflowVariant, - EvaluatorIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - - -class EvaluatorVariantCreate( - WorkflowVariantCreate, - EvaluatorIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - - -class EvaluatorVariantEdit(WorkflowVariantEdit): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorVariantQuery(WorkflowVariantQuery): - flags: Optional[EvaluatorQueryFlags] = None - - -# evaluator revisions ---------------------------------------------------------- - - -class EvaluatorRevisionData(WorkflowRevisionData): - pass - - -class EvaluatorRevision( - WorkflowRevision, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - data: Optional[EvaluatorRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - sync_alias("evaluator_variant_id", "workflow_variant_id", self) - - -class EvaluatorRevisionCreate( - WorkflowRevisionCreate, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - sync_alias("evaluator_variant_id", "workflow_variant_id", self) - - -class EvaluatorRevisionEdit(WorkflowRevisionEdit): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorRevisionQuery(WorkflowRevisionQuery): - flags: Optional[EvaluatorQueryFlags] = None - - -class EvaluatorRevisionCommit( - WorkflowRevisionCommit, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - data: Optional[EvaluatorRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - sync_alias("evaluator_variant_id", "workflow_variant_id", self) - - -class EvaluatorRevisionsLog( - WorkflowRevisionsLog, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, - EvaluatorRevisionIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "workflow_id", self) - sync_alias("evaluator_variant_id", "workflow_variant_id", self) - sync_alias("evaluator_revision_id", "workflow_revision_id", self) - - -# forks ------------------------------------------------------------------------ - - -class EvaluatorRevisionFork(WorkflowRevisionFork): - flags: Optional[EvaluatorFlags] = None - - data: Optional[EvaluatorRevisionData] = None - - -class EvaluatorVariantFork(WorkflowVariantFork): - flags: Optional[EvaluatorFlags] = None - - -class EvaluatorRevisionForkAlias(AliasConfig): - evaluator_revision: Optional[EvaluatorRevisionFork] = None - - revision: Optional[RevisionFork] = Field( - default=None, - exclude=True, - alias="evaluator_revision", - ) - - -class EvaluatorVariantForkAlias(AliasConfig): - evaluator_variant: Optional[EvaluatorVariantFork] = None - - variant: Optional[VariantFork] = Field( - default=None, - exclude=True, - alias="evaluator_variant", - ) - - -class EvaluatorFork( - WorkflowFork, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, - EvaluatorVariantForkAlias, - EvaluatorRevisionIdAlias, - EvaluatorRevisionForkAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("evaluator_id", "artifact_id", self) - sync_alias("evaluator_variant_id", "variant_id", self) - sync_alias("evaluator_variant", "variant", self) - sync_alias("evaluator_revision_id", "revision_id", self) - sync_alias("evaluator_revision", "revision", self) - - -# evaluator services ----------------------------------------------------------- - -# TODO: Implement ? - -# simple evaluators ------------------------------------------------------------ - - -class SimpleEvaluatorFlags(EvaluatorFlags): - pass - - -class SimpleEvaluatorQueryFlags(EvaluatorQueryFlags): - pass - - -class SimpleEvaluatorData(EvaluatorRevisionData): - pass - - -class SimpleEvaluator(Identifier, Slug, Lifecycle, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorCreate(Slug, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorEdit(Identifier, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorQuery(Metadata): - flags: Optional[SimpleEvaluatorQueryFlags] = None - - -# ------------------------------------------------------------------------------ diff --git a/api/oss/src/core/evaluators/service.py b/api/oss/src/core/evaluators/service.py deleted file mode 100644 index 6e547addfe..0000000000 --- a/api/oss/src/core/evaluators/service.py +++ /dev/null @@ -1,1519 +0,0 @@ -from typing import Optional, List -from uuid import UUID, uuid4 -from json import loads - -from oss.src.utils.helpers import get_slug_from_name_and_id -from oss.src.services.db_manager import fetch_evaluator_config -from oss.src.core.workflows.dtos import ( - WorkflowFlags, - WorkflowQueryFlags, - # - WorkflowCreate, - WorkflowEdit, - WorkflowQuery, - WorkflowFork, - # - WorkflowVariantCreate, - WorkflowVariantEdit, - WorkflowVariantQuery, - # - WorkflowRevisionData, - # - WorkflowRevisionCreate, - WorkflowRevisionEdit, - WorkflowRevisionCommit, - WorkflowRevisionQuery, - WorkflowRevisionsLog, - # -) -from oss.src.core.shared.dtos import Windowing -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.evaluators.dtos import ( - SimpleEvaluatorData, - SimpleEvaluator, - SimpleEvaluatorCreate, - SimpleEvaluatorEdit, - SimpleEvaluatorQuery, - SimpleEvaluatorFlags, - SimpleEvaluatorQueryFlags, - # - EvaluatorFlags, - EvaluatorQueryFlags, - # - Evaluator, - EvaluatorQuery, - EvaluatorRevisionsLog, - EvaluatorCreate, - EvaluatorEdit, - EvaluatorFork, - # - EvaluatorVariant, - EvaluatorVariantCreate, - EvaluatorVariantEdit, - EvaluatorVariantQuery, - # - EvaluatorRevision, - EvaluatorRevisionCreate, - EvaluatorRevisionData, - EvaluatorRevisionEdit, - EvaluatorRevisionCommit, - EvaluatorRevisionQuery, -) -from oss.src.core.shared.dtos import Reference -from oss.src.utils.logging import get_module_logger -from oss.src.models.db_models import EvaluatorConfigDB - - -log = get_module_logger(__name__) - - -class EvaluatorsService: - def __init__( - self, - workflows_service: WorkflowsService, - ): - self.workflows_service = workflows_service - - # evaluators --------------------------------------------------------------- - - async def create_evaluator( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_create: EvaluatorCreate, - # - evaluator_id: Optional[UUID] = None, - ) -> Optional[Evaluator]: - workflow_create = WorkflowCreate( - **evaluator_create.model_dump( - mode="json", - ), - ) - - workflow = await self.workflows_service.create_workflow( - project_id=project_id, - user_id=user_id, - # - workflow_create=workflow_create, - # - workflow_id=evaluator_id, - ) - - if not workflow: - return None - - evaluator = Evaluator( - **workflow.model_dump( - mode="json", - ) - ) - - return evaluator - - async def fetch_evaluator( - self, - *, - project_id: UUID, - # - evaluator_ref: Reference, - ) -> Optional[Evaluator]: - workflow = await self.workflows_service.fetch_workflow( - project_id=project_id, - # - workflow_ref=evaluator_ref, - ) - - if not workflow: - return None - - evaluator = Evaluator( - **workflow.model_dump( - mode="json", - ) - ) - - return evaluator - - async def edit_evaluator( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_edit: EvaluatorEdit, - ) -> Optional[Evaluator]: - workflow_edit = WorkflowEdit( - **evaluator_edit.model_dump( - mode="json", - ), - ) - - workflow = await self.workflows_service.edit_workflow( - project_id=project_id, - user_id=user_id, - # - workflow_edit=workflow_edit, - ) - - if not workflow: - return None - - evaluator = Evaluator( - **workflow.model_dump( - mode="json", - ) - ) - - return evaluator - - async def archive_evaluator( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_id: UUID, - ) -> Optional[Evaluator]: - workflow = await self.workflows_service.archive_workflow( - project_id=project_id, - user_id=user_id, - # - workflow_id=evaluator_id, - ) - - if not workflow: - return None - - evaluator = Evaluator( - **workflow.model_dump( - mode="json", - ) - ) - - return evaluator - - async def unarchive_evaluator( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_id: UUID, - ) -> Optional[Evaluator]: - workflow = await self.workflows_service.unarchive_workflow( - project_id=project_id, - user_id=user_id, - # - workflow_id=evaluator_id, - ) - - if not workflow: - return None - - evaluator = Evaluator( - **workflow.model_dump( - mode="json", - ) - ) - - return evaluator - - async def query_evaluators( - self, - *, - project_id: UUID, - # - evaluator_query: Optional[EvaluatorQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Evaluator]: - workflow_query = ( - WorkflowQuery( - **evaluator_query.model_dump( - mode="json", - ), - ) - if evaluator_query - else WorkflowQuery() - ) - - workflows = await self.workflows_service.query_workflows( - project_id=project_id, - # - workflow_query=workflow_query, - # - workflow_refs=evaluator_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - evaluators = [ - Evaluator( - **workflow.model_dump( - mode="json", - ), - ) - for workflow in workflows - ] - - return evaluators - - # evaluator variants ------------------------------------------------------- - - async def create_evaluator_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_variant_create: EvaluatorVariantCreate, - ) -> Optional[EvaluatorVariant]: - workflow_variant_create = WorkflowVariantCreate( - **evaluator_variant_create.model_dump( - mode="json", - ), - ) - - workflow_variant = await self.workflows_service.create_workflow_variant( - project_id=project_id, - user_id=user_id, - # - workflow_variant_create=workflow_variant_create, - ) - - if not workflow_variant: - return None - - evaluator_variant = EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - async def fetch_evaluator_variant( - self, - *, - project_id: UUID, - # - evaluator_ref: Optional[Reference] = None, - evaluator_variant_ref: Optional[Reference] = None, - ) -> Optional[EvaluatorVariant]: - workflow_variant = await self.workflows_service.fetch_workflow_variant( - project_id=project_id, - # - workflow_ref=evaluator_ref, - workflow_variant_ref=evaluator_variant_ref, - ) - - if not workflow_variant: - return None - - evaluator_variant = EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - async def edit_evaluator_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_variant_edit: EvaluatorVariantEdit, - ) -> Optional[EvaluatorVariant]: - workflow_variant_edit = WorkflowVariantEdit( - **evaluator_variant_edit.model_dump( - mode="json", - ) - ) - - evaluator_variant = await self.workflows_service.edit_workflow_variant( - project_id=project_id, - user_id=user_id, - # - workflow_variant_edit=workflow_variant_edit, - ) - - if not evaluator_variant: - return None - - evaluator_variant = EvaluatorVariant( - **evaluator_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - async def archive_evaluator_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_variant_id: UUID, - ) -> Optional[EvaluatorVariant]: - workflow_variant = await self.workflows_service.archive_workflow_variant( - project_id=project_id, - user_id=user_id, - # - workflow_variant_id=evaluator_variant_id, - ) - - if not workflow_variant: - return None - - evaluator_variant = EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - async def unarchive_evaluator_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_variant_id: UUID, - ) -> Optional[EvaluatorVariant]: - workflow_variant = await self.workflows_service.unarchive_workflow_variant( - project_id=project_id, - user_id=user_id, - # - workflow_variant_id=evaluator_variant_id, - ) - - if not workflow_variant: - return None - - evaluator_variant = EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - async def query_evaluator_variants( - self, - *, - project_id: UUID, - # - evaluator_variant_query: Optional[EvaluatorVariantQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - evaluator_variant_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluatorVariant]: - workflow_variant_query = ( - WorkflowVariantQuery( - **evaluator_variant_query.model_dump( - mode="json", - ) - ) - if evaluator_variant_query - else WorkflowVariantQuery() - ) - - workflow_variants = await self.workflows_service.query_workflow_variants( - project_id=project_id, - # - workflow_variant_query=workflow_variant_query, - # - workflow_refs=evaluator_refs, - workflow_variant_refs=evaluator_variant_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - if not workflow_variants: - return [] - - evaluator_variants = [ - EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - for workflow_variant in workflow_variants - ] - - return evaluator_variants - - async def fork_evaluator_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_fork: EvaluatorFork, - ) -> Optional[EvaluatorVariant]: - workflow_fork = WorkflowFork( - **evaluator_fork.model_dump( - mode="json", - ) - ) - - workflow_variant = await self.workflows_service.fork_workflow_variant( - project_id=project_id, - user_id=user_id, - # - workflow_fork=workflow_fork, - ) - - if not workflow_variant: - return None - - evaluator_variant = EvaluatorVariant( - **workflow_variant.model_dump( - mode="json", - ) - ) - - return evaluator_variant - - # evaluator revisions ------------------------------------------------------ - - async def create_evaluator_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_revision_create: EvaluatorRevisionCreate, - ) -> Optional[EvaluatorRevision]: - workflow_revision_create = WorkflowRevisionCreate( - **evaluator_revision_create.model_dump( - mode="json", - ) - ) - - workflow_revision = await self.workflows_service.create_workflow_revision( - project_id=project_id, - user_id=user_id, - # - workflow_revision_create=workflow_revision_create, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def fetch_evaluator_revision( - self, - *, - project_id: UUID, - # - evaluator_ref: Optional[Reference] = None, - evaluator_variant_ref: Optional[Reference] = None, - evaluator_revision_ref: Optional[Reference] = None, - ) -> Optional[EvaluatorRevision]: - workflow_revision = await self.workflows_service.fetch_workflow_revision( - project_id=project_id, - # - workflow_ref=evaluator_ref, - workflow_variant_ref=evaluator_variant_ref, - workflow_revision_ref=evaluator_revision_ref, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def edit_evaluator_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_revision_edit: EvaluatorRevisionEdit, - ) -> Optional[EvaluatorRevision]: - workflow_revision_edit = WorkflowRevisionEdit( - **evaluator_revision_edit.model_dump( - mode="json", - ) - ) - - workflow_revision = await self.workflows_service.edit_workflow_revision( - project_id=project_id, - user_id=user_id, - # - workflow_revision_edit=workflow_revision_edit, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def archive_evaluator_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_revision_id: UUID, - ) -> Optional[EvaluatorRevision]: - workflow_revision = await self.workflows_service.archive_workflow_revision( - project_id=project_id, - user_id=user_id, - # - workflow_revision_id=evaluator_revision_id, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def unarchive_evaluator_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_revision_id: UUID, - ) -> Optional[EvaluatorRevision]: - workflow_revision = await self.workflows_service.unarchive_workflow_revision( - project_id=project_id, - user_id=user_id, - # - workflow_revision_id=evaluator_revision_id, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def query_evaluator_revisions( - self, - *, - project_id: UUID, - # - evaluator_revision_query: Optional[EvaluatorRevisionQuery] = None, - # - evaluator_refs: Optional[List[Reference]] = None, - evaluator_variant_refs: Optional[List[Reference]] = None, - evaluator_revision_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluatorRevision]: - workflow_revision_query = ( - WorkflowRevisionQuery( - **evaluator_revision_query.model_dump( - mode="json", - ) - ) - if evaluator_revision_query - else WorkflowRevisionQuery() - ) - - workflow_revisions = await self.workflows_service.query_workflow_revisions( - project_id=project_id, - # - workflow_revision_query=workflow_revision_query, - # - workflow_refs=evaluator_refs, - workflow_variant_refs=evaluator_variant_refs, - workflow_revision_refs=evaluator_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - if not workflow_revisions: - return [] - - evaluator_revisions = [ - EvaluatorRevision( - **revision.model_dump( - mode="json", - ) - ) - for revision in workflow_revisions - ] - - return evaluator_revisions - - async def commit_evaluator_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_revision_commit: EvaluatorRevisionCommit, - ) -> Optional[EvaluatorRevision]: - workflow_revision_commit = WorkflowRevisionCommit( - **evaluator_revision_commit.model_dump( - mode="json", - ) - ) - - workflow_revision = await self.workflows_service.commit_workflow_revision( - project_id=project_id, - user_id=user_id, - # - workflow_revision_commit=workflow_revision_commit, - ) - - if not workflow_revision: - return None - - evaluator_revision = EvaluatorRevision( - **workflow_revision.model_dump( - mode="json", - ) - ) - - return evaluator_revision - - async def log_evaluator_revisions( - self, - *, - project_id: UUID, - # - evaluator_revisions_log: EvaluatorRevisionsLog, - ) -> List[EvaluatorRevision]: - workflow_revisions_log = WorkflowRevisionsLog( - **evaluator_revisions_log.model_dump( - mode="json", - ) - ) - - workflow_revisions = await self.workflows_service.log_workflow_revisions( - project_id=project_id, - # - workflow_revisions_log=workflow_revisions_log, - ) - - if not workflow_revisions: - return [] - - evaluator_revisions = [ - EvaluatorRevision( - **revision.model_dump( - mode="json", - ) - ) - for revision in workflow_revisions - ] - - return evaluator_revisions - - # evaluator services ------------------------------------------------------- - - # TODO: Implement ? - - # -------------------------------------------------------------------------- - - -class SimpleEvaluatorsService: - def __init__( - self, - *, - evaluators_service: EvaluatorsService, - ): - self.evaluators_service = evaluators_service - - # public ------------------------------------------------------------------- - - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - simple_evaluator_create: SimpleEvaluatorCreate, - # - evaluator_id: Optional[UUID] = None, - ) -> Optional[SimpleEvaluator]: - simple_evaluator_flags = ( - SimpleEvaluatorFlags( - **( - simple_evaluator_create.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - exclude={"is_evaluator"}, - ) - ), - is_evaluator=True, - ) - if simple_evaluator_create.flags - else SimpleEvaluatorFlags( - is_evaluator=True, - ) - ) - - evaluator_flags = EvaluatorFlags( - **simple_evaluator_flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ), - ) - - evaluator_create = EvaluatorCreate( - slug=simple_evaluator_create.slug, - # - name=simple_evaluator_create.name, - description=simple_evaluator_create.description, - # - flags=evaluator_flags, - meta=simple_evaluator_create.meta, - tags=simple_evaluator_create.tags, - ) - - evaluator: Optional[Evaluator] = await self.evaluators_service.create_evaluator( - project_id=project_id, - user_id=user_id, - # - evaluator_create=evaluator_create, - # - evaluator_id=evaluator_id, - ) - - if evaluator is None: - return None - - evaluator_variant_slug = uuid4().hex[-12:] - - evaluator_variant_create = EvaluatorVariantCreate( - slug=evaluator_variant_slug, - # - name=evaluator_create.name, - description=evaluator_create.description, - # - flags=evaluator_flags, - tags=evaluator_create.tags, - meta=evaluator_create.meta, - # - evaluator_id=evaluator.id, - ) - - evaluator_variant: Optional[ - EvaluatorVariant - ] = await self.evaluators_service.create_evaluator_variant( - project_id=project_id, - user_id=user_id, - # - evaluator_variant_create=evaluator_variant_create, - ) - - if evaluator_variant is None: - return None - - evaluator_revision_slug = uuid4().hex[-12:] - - evaluator_revision_commit = EvaluatorRevisionCommit( - slug=evaluator_revision_slug, - # - name=evaluator_create.name, - description=evaluator_create.description, - # - flags=evaluator_flags, - tags=evaluator_create.tags, - meta=evaluator_create.meta, - # - data=None, - # - message="Initial commit", - # - evaluator_id=evaluator.id, - evaluator_variant_id=evaluator_variant.id, - ) - - evaluator_revision: Optional[ - EvaluatorRevision - ] = await self.evaluators_service.commit_evaluator_revision( - project_id=project_id, - user_id=user_id, - evaluator_revision_commit=evaluator_revision_commit, - ) - - if evaluator_revision is None: - return None - - evaluator_revision_slug = uuid4().hex[-12:] - - evaluator_revision_commit = EvaluatorRevisionCommit( - slug=evaluator_revision_slug, - # - name=evaluator_create.name, - description=evaluator_create.description, - # - flags=evaluator_flags, - tags=evaluator_create.tags, - meta=evaluator_create.meta, - # - data=simple_evaluator_create.data, - # - evaluator_id=evaluator.id, - evaluator_variant_id=evaluator_variant.id, - ) - - evaluator_revision: Optional[ - EvaluatorRevision - ] = await self.evaluators_service.commit_evaluator_revision( - project_id=project_id, - user_id=user_id, - evaluator_revision_commit=evaluator_revision_commit, - ) - - if evaluator_revision is None: - return None - - simple_evaluator_data = SimpleEvaluatorData( - **( - evaluator_revision.data.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator_revision.data - else {} - ), - ) - - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, - # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, - # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, - # - data=simple_evaluator_data, - ) - - return simple_evaluator - - async def fetch( - self, - *, - project_id: UUID, - # - evaluator_id: UUID, - ) -> Optional[SimpleEvaluator]: - evaluator_ref = Reference( - id=evaluator_id, - ) - - evaluator: Optional[Evaluator] = await self.evaluators_service.fetch_evaluator( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if evaluator is None: - return None - - evaluator_variant: Optional[ - EvaluatorVariant - ] = await self.evaluators_service.fetch_evaluator_variant( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if evaluator_variant is None: - return None - - evaluator_variant_ref = Reference( - id=evaluator_variant.id, - ) - - evaluator_revision: Optional[ - EvaluatorRevision - ] = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_variant_ref=evaluator_variant_ref, - ) - - if evaluator_revision is None: - return None - - simple_evaluator_flags = SimpleEvaluatorFlags( - **( - evaluator.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator.flags - else {} - ) - ) - - simple_evaluator_data = SimpleEvaluatorData( - **( - evaluator_revision.data.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator_revision.data - else {} - ), - ) - - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, - # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, - # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, - # - data=simple_evaluator_data, - ) - return simple_evaluator - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - simple_evaluator_edit: SimpleEvaluatorEdit, - ) -> Optional[SimpleEvaluator]: - simple_evaluator_flags = ( - SimpleEvaluatorFlags( - **( - simple_evaluator_edit.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - exclude={"is_evaluator"}, - ) - ), - is_evaluator=True, - ) - if simple_evaluator_edit.flags - else SimpleEvaluatorFlags() - ) - - evaluator_flags = EvaluatorFlags( - **simple_evaluator_flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - ) - - evaluator_ref = Reference( - id=simple_evaluator_edit.id, - ) - - evaluator: Optional[Evaluator] = await self.evaluators_service.fetch_evaluator( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if evaluator is None: - return None - - evaluator_edit = EvaluatorEdit( - id=evaluator.id, - # - name=simple_evaluator_edit.name, - description=simple_evaluator_edit.description, - # - flags=evaluator_flags, - tags=simple_evaluator_edit.tags, - meta=simple_evaluator_edit.meta, - ) - - evaluator = await self.evaluators_service.edit_evaluator( - project_id=project_id, - user_id=user_id, - # - evaluator_edit=evaluator_edit, - ) - - if evaluator is None: - return None - - evaluator_variant: Optional[ - EvaluatorVariant - ] = await self.evaluators_service.fetch_evaluator_variant( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if evaluator_variant is None: - return None - - evaluator_variant_edit = EvaluatorVariantEdit( - id=evaluator_variant.id, - # - name=evaluator_edit.name, - description=evaluator_edit.description, - # - flags=evaluator_flags, - tags=evaluator_edit.tags, - meta=evaluator_edit.meta, - # - ) - - evaluator_variant = await self.evaluators_service.edit_evaluator_variant( - project_id=project_id, - user_id=user_id, - # - evaluator_variant_edit=evaluator_variant_edit, - ) - - if evaluator_variant is None: - return None - - evaluator_revision_slug = uuid4().hex[-12:] - - evaluator_revision_commit = EvaluatorRevisionCommit( - slug=evaluator_revision_slug, - # - name=evaluator_edit.name, - description=evaluator_edit.description, - # - flags=evaluator_flags, - tags=evaluator_edit.tags, - meta=evaluator_edit.meta, - # - data=simple_evaluator_edit.data, - # - evaluator_id=evaluator.id, - evaluator_variant_id=evaluator_variant.id, - ) - - evaluator_revision: Optional[ - EvaluatorRevision - ] = await self.evaluators_service.commit_evaluator_revision( - project_id=project_id, - user_id=user_id, - # - evaluator_revision_commit=evaluator_revision_commit, - ) - - if evaluator_revision is None: - return None - - simple_evaluator_data = SimpleEvaluatorData( - **( - evaluator_revision.data.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator_revision.data - else {} - ), - ) - - simple_evaluator = SimpleEvaluator( - id=evaluator.id, - slug=evaluator.slug, - # - created_at=evaluator.created_at, - updated_at=evaluator.updated_at, - deleted_at=evaluator.deleted_at, - created_by_id=evaluator.created_by_id, - updated_by_id=evaluator.updated_by_id, - deleted_by_id=evaluator.deleted_by_id, - # - name=evaluator.name, - description=evaluator.description, - # - flags=simple_evaluator_flags, - tags=evaluator.tags, - meta=evaluator.meta, - # - data=simple_evaluator_data, - ) - - return simple_evaluator - - async def transfer( - self, - *, - project_id: UUID, - user_id: UUID, - # - evaluator_id: UUID, - ) -> Optional[SimpleEvaluator]: - old_evaluator = await fetch_evaluator_config( - evaluator_config_id=str(evaluator_id), - ) - - if old_evaluator is None: - return None - - evaluator_revision_data = self._transfer_evaluator_revision_data( - old_evaluator=old_evaluator, - ) - - evaluator_ref = Reference(id=evaluator_id) - - new_evaluator = await self.evaluators_service.fetch_evaluator( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if new_evaluator is None: - name = str(old_evaluator.name) - slug = get_slug_from_name_and_id( - name=name, - id=evaluator_id, - ) - - evaluator_create = SimpleEvaluatorCreate( - slug=slug, - name=name, - description=None, - flags=SimpleEvaluatorFlags( - is_evaluator=True, - ), - tags=None, - meta=None, - data=SimpleEvaluatorData( - **evaluator_revision_data.model_dump( - mode="json", - ) - ), - ) - simple_evaluator = await self.create( - project_id=project_id, - user_id=user_id, - simple_evaluator_create=evaluator_create, - evaluator_id=evaluator_id, - ) - - return simple_evaluator - - evaluator_edit = SimpleEvaluatorEdit( - id=evaluator_id, - name=new_evaluator.name, - description=new_evaluator.description, - flags=( - SimpleEvaluatorFlags( - **new_evaluator.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - ) - if new_evaluator.flags - else None - ), - tags=new_evaluator.tags, - meta=new_evaluator.meta, - data=SimpleEvaluatorData( - **evaluator_revision_data.model_dump( - mode="json", - ) - ), - ) - - simple_evaluator = await self.edit( - project_id=project_id, - user_id=user_id, - simple_evaluator_edit=evaluator_edit, - ) - - return simple_evaluator - - async def query( - self, - *, - project_id: UUID, - # - simple_evaluator_query: Optional[SimpleEvaluatorQuery] = None, - # - simple_evaluator_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[SimpleEvaluator]: - evaluator_query = EvaluatorQuery( - **( - simple_evaluator_query.model_dump( - mode="json", - ) - if simple_evaluator_query - else {} - ), - ) - - evaluator_queries = await self.evaluators_service.query_evaluators( - project_id=project_id, - # - evaluator_query=evaluator_query, - # - evaluator_refs=simple_evaluator_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - if not evaluator_queries: - return [] - - simple_evaluators: List[SimpleEvaluator] = [] - - for evaluator_query in evaluator_queries: - evaluator_ref = Reference( - id=evaluator_query.id, - ) - - evaluator_variant: Optional[ - EvaluatorVariant - ] = await self.evaluators_service.fetch_evaluator_variant( - project_id=project_id, - # - evaluator_ref=evaluator_ref, - ) - - if not evaluator_variant: - continue - - evaluator_variant_ref = Reference( - id=evaluator_variant.id, - ) - - evaluator_revision: Optional[ - EvaluatorRevision - ] = await self.evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_variant_ref=evaluator_variant_ref, - ) - - if not evaluator_revision: - continue - - simple_evaluator_flags = SimpleEvaluatorFlags( - **( - evaluator_query.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - exclude={"is_evaluator"}, - ) - if evaluator_query.flags - else {} - ), - is_evaluator=True, - ) - - simple_evaluator_data = SimpleEvaluatorData( - **( - evaluator_revision.data.model_dump( - mode="json", - ) - if evaluator_revision.data - else {} - ), - ) - - evaluator_query = SimpleEvaluator( - id=evaluator_query.id, - slug=evaluator_query.slug, - # - created_at=evaluator_query.created_at, - updated_at=evaluator_query.updated_at, - deleted_at=evaluator_query.deleted_at, - created_by_id=evaluator_query.created_by_id, - updated_by_id=evaluator_query.updated_by_id, - deleted_by_id=evaluator_query.deleted_by_id, - # - name=evaluator_query.name, - description=evaluator_query.description, - # - flags=simple_evaluator_flags, - tags=evaluator_query.tags, - meta=evaluator_query.meta, - # - data=simple_evaluator_data, - ) - - simple_evaluators.append(evaluator_query) - - return simple_evaluators - - # internals ---------------------------------------------------------------- - - def _transfer_evaluator_revision_data( - self, - old_evaluator: EvaluatorConfigDB, - ) -> EvaluatorRevisionData: - version = "2025.07.14" - uri = f"agenta:built-in:{old_evaluator.evaluator_key}:v0" - url = ( - old_evaluator.settings_values.get("webhook_url", None) - if old_evaluator.evaluator_key == "auto_webhook_test" # type: ignore - else None - ) - headers = None - outputs_schema = None - if str(old_evaluator.evaluator_key) == "auto_ai_critique": - json_schema = old_evaluator.settings_values.get("json_schema", None) - if json_schema and isinstance(json_schema, dict): - outputs_schema = json_schema.get("schema", None) - if not outputs_schema: - properties = ( - {"score": {"type": "number"}, "success": {"type": "boolean"}} - if old_evaluator.evaluator_key - in ( - "auto_levenshtein_distance", - "auto_semantic_similarity", - "auto_similarity_match", - "auto_json_diff", - "auto_webhook_test", - "auto_custom_code_run", - "auto_ai_critique", - "rag_faithfulness", - "rag_context_relevancy", - ) - else {"success": {"type": "boolean"}} - ) - required = ( - list(properties.keys()) - if old_evaluator.evaluator_key - not in ( - "auto_levenshtein_distance", - "auto_semantic_similarity", - "auto_similarity_match", - "auto_json_diff", - "auto_webhook_test", - "auto_custom_code_run", - "auto_ai_critique", - "rag_faithfulness", - "rag_context_relevancy", - ) - else [] - ) - outputs_schema = { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": properties, - "required": required, - "additionalProperties": False, - } - schemas = {"outputs": outputs_schema} - script = ( - { - "content": old_evaluator.settings_values.get("code", None), - "runtime": "python", - } - if old_evaluator.evaluator_key == "auto_custom_code_run" # type: ignore - else None - ) - parameters = old_evaluator.settings_values - service = { - "agenta": "0.1.0", - "format": { - "type": "object", - "$schema": "http://json-schema.org/schema#", - "required": ["outputs"], - "properties": { - "outputs": schemas["outputs"], - }, - }, - } - configuration = parameters - - return EvaluatorRevisionData( - version=version, - uri=uri, - url=url, - headers=headers, - schemas=schemas, - script=script, - parameters=parameters, # type: ignore - # LEGACY - service=service, - configuration=configuration, # type: ignore - ) - - # -------------------------------------------------------------------------- diff --git a/api/oss/src/core/git/dtos.py b/api/oss/src/core/git/dtos.py index ff49f5ba89..cf56eb140f 100644 --- a/api/oss/src/core/git/dtos.py +++ b/api/oss/src/core/git/dtos.py @@ -1,4 +1,4 @@ -from typing import Optional, List +from typing import Optional from uuid import UUID from datetime import datetime @@ -9,113 +9,40 @@ Slug, Version, Lifecycle, + Flags, + Meta, Header, - Metadata, Data, - Commit, ) -# artifacts -------------------------------------------------------------------- - - -class Artifact(Identifier, Slug, Lifecycle, Header, Metadata): - pass - - -class ArtifactCreate(Slug, Header, Metadata): - pass - - -class ArtifactEdit(Identifier, Header, Metadata): - pass - - -class ArtifactQuery(Header, Metadata): - pass - - -# variants --------------------------------------------------------------------- - - -class Variant(Identifier, Slug, Lifecycle, Header, Metadata): - artifact_id: Optional[UUID] = None - - -class VariantCreate(Slug, Header, Metadata): - artifact_id: Optional[UUID] = None - - -class VariantEdit(Identifier, Header, Metadata): - pass - - -class VariantQuery(Header, Metadata): - pass - - -# revisions -------------------------------------------------------------------- - - -class Revision(Identifier, Slug, Version, Lifecycle, Header, Metadata, Commit): - data: Optional[Data] = None - - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - - -class RevisionCreate(Slug, Header, Metadata): - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - - -class RevisionEdit(Identifier, Header, Metadata): - pass - - -class RevisionQuery(Header, Metadata): +class Commit(BaseModel): author: Optional[UUID] = None - authors: Optional[List[UUID]] = None - date: Optional[datetime] = None - dates: Optional[List[datetime]] = None - message: Optional[str] = None -class RevisionCommit(Slug, Header, Metadata): - data: Optional[Data] = None +class Artifact(Identifier, Slug, Lifecycle, Header): + flags: Optional[Flags] = None + meta: Optional[Meta] = None - message: Optional[str] = None - - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None +class Variant(Identifier, Slug, Lifecycle, Header): + flags: Optional[Flags] = None + meta: Optional[Meta] = None -class RevisionsLog(BaseModel): artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - revision_id: Optional[UUID] = None - - depth: Optional[int] = None + artifact: Optional[Artifact] = None -# forks ------------------------------------------------------------------------ +class Revision(Identifier, Slug, Version, Lifecycle, Header, Commit): + flags: Optional[Flags] = None + meta: Optional[Meta] = None - -class RevisionFork(Slug, Header, Metadata): data: Optional[Data] = None - message: Optional[str] = None - - -class VariantFork(Slug, Header, Metadata): - pass - - -class ArtifactFork(RevisionsLog): - variant: Optional[VariantFork] = None - revision: Optional[RevisionFork] = None - + artifact_id: Optional[UUID] = None + artifact: Optional[Artifact] = None -# ------------------------------------------------------------------------------ + variant_id: Optional[UUID] = None + variant: Optional[Variant] = None diff --git a/api/oss/src/core/git/interfaces.py b/api/oss/src/core/git/interfaces.py index e2bb39957d..55a4a786a8 100644 --- a/api/oss/src/core/git/interfaces.py +++ b/api/oss/src/core/git/interfaces.py @@ -1,32 +1,16 @@ from typing import Optional, List, TypeVar, Type from uuid import UUID -from abc import ABC, abstractmethod - - -from oss.src.core.shared.dtos import Reference, Windowing -from oss.src.core.git.dtos import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - RevisionsLog, - ArtifactFork, - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, -) +from abc import abstractmethod + + +from oss.src.core.shared.dtos import Reference, Meta, Flags, Data +from oss.src.core.git.dtos import Commit, Artifact, Variant, Revision T = TypeVar("T") -class GitDAOInterface(ABC): +class GitDAOInterface: def __init__( self, *, @@ -47,9 +31,12 @@ async def create_artifact( project_id: UUID, user_id: UUID, # - artifact_create: ArtifactCreate, + artifact_slug: str, # - artifact_id: Optional[UUID] = None, + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, ) -> Optional[Artifact]: raise NotImplementedError @@ -59,7 +46,7 @@ async def fetch_artifact( *, project_id: UUID, # - artifact_ref: Reference, + artifact_ref: Optional[Reference] = None, ) -> Optional[Artifact]: raise NotImplementedError @@ -70,7 +57,12 @@ async def edit_artifact( project_id: UUID, user_id: UUID, # - artifact_edit: ArtifactEdit, + artifact_id: UUID, + # + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, ) -> Optional[Artifact]: raise NotImplementedError @@ -102,13 +94,10 @@ async def query_artifacts( *, project_id: UUID, # - artifact_query: ArtifactQuery, - # - artifact_refs: Optional[List[Reference]] = None, + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Artifact]: raise NotImplementedError @@ -123,7 +112,14 @@ async def create_variant( project_id: UUID, user_id: UUID, # - variant_create: VariantCreate, + artifact_id: UUID, + # + variant_slug: str, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[Variant]: raise NotImplementedError @@ -145,7 +141,12 @@ async def edit_variant( project_id: UUID, user_id: UUID, # - variant_edit: VariantEdit, + variant_id: UUID, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[Variant]: raise NotImplementedError @@ -177,14 +178,10 @@ async def query_variants( *, project_id: UUID, # - variant_query: VariantQuery, - # - artifact_refs: Optional[List[Reference]] = None, - variant_refs: Optional[List[Reference]] = None, + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Variant]: raise NotImplementedError @@ -197,7 +194,23 @@ async def fork_variant( project_id: UUID, user_id: UUID, # - artifact_fork: ArtifactFork, + variant_slug: str, + revision_slug: str, + # + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + depth: Optional[int] = None, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, ) -> Optional[Variant]: raise NotImplementedError @@ -212,7 +225,15 @@ async def create_revision( project_id: UUID, user_id: UUID, # - revision_create: RevisionCreate, + artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[Revision]: raise NotImplementedError @@ -234,7 +255,12 @@ async def edit_revision( project_id: UUID, user_id: UUID, # - revision_edit: RevisionEdit, + revision_id: UUID, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[Revision]: raise NotImplementedError @@ -266,15 +292,10 @@ async def query_revisions( *, project_id: UUID, # - revision_query: RevisionQuery, - # - artifact_refs: Optional[List[Reference]] = None, - variant_refs: Optional[List[Reference]] = None, - revision_refs: Optional[List[Reference]] = None, + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Revision]: raise NotImplementedError @@ -287,7 +308,17 @@ async def commit_revision( project_id: UUID, user_id: UUID, # - revision_commit: RevisionCommit, + artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, + revision_data: Optional[Data] = None, ) -> Optional[Revision]: raise NotImplementedError @@ -297,7 +328,9 @@ async def log_revisions( *, project_id: UUID, # - revisions_log: RevisionsLog, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + depth: Optional[int] = None, ) -> List[Revision]: raise NotImplementedError diff --git a/api/oss/src/core/invocations/service.py b/api/oss/src/core/invocations/service.py deleted file mode 100644 index c6b73ed18d..0000000000 --- a/api/oss/src/core/invocations/service.py +++ /dev/null @@ -1,1059 +0,0 @@ -from typing import Optional, List, Union -from uuid import UUID, uuid4 - -from fastapi import Request - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.applications.service import LegacyApplicationsService - -from oss.src.core.shared.dtos import ( - Tags, - Meta, - Data, - Reference, - Link, - Windowing, -) -from oss.src.core.tracing.dtos import ( - Focus, - Format, - TracingQuery, - Formatting, - Condition, - Filtering, - OTelReference, - OTelLink, - LogicalOperator, - ComparisonOperator, - ListOperator, - TraceType, - SpanType, -) -from oss.src.core.applications.dtos import ( - LegacyApplicationFlags, - LegacyApplicationData, -) - - -from oss.src.core.tracing.utils import ( - parse_into_attributes, - parse_from_attributes, -) -from oss.src.core.invocations.types import ( - InvocationOrigin, - InvocationKind, - InvocationChannel, - InvocationReferences, - InvocationLinks, - InvocationFlags, - # - Invocation, - InvocationCreate, - InvocationEdit, - InvocationQuery, -) - -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.tracing.models import ( - OTelFlatSpan, - OTelTracingRequest, - OTelTracingResponse, -) -from oss.src.apis.fastapi.applications.models import LegacyApplicationCreate - - -log = get_module_logger(__name__) - - -class InvocationsService: - def __init__( - self, - *, - legacy_applications_service: LegacyApplicationsService, - tracing_router: TracingRouter, - ): - self.legacy_applications_service = legacy_applications_service - self.tracing_router = tracing_router - - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - invocation_create: InvocationCreate, - ) -> Optional[Invocation]: - legacy_application_slug = ( - invocation_create.references.application.slug - if invocation_create.references.application - else None - ) or uuid4().hex[-12:] - - legacy_application_flags = LegacyApplicationFlags() - - application_revision = await self.legacy_applications_service.retrieve( - project_id=project_id, - # - application_ref=invocation_create.references.application, - application_variant_ref=invocation_create.references.application_variant, - application_revision_ref=invocation_create.references.application_revision, - ) - - if not application_revision: - legacy_application_create = LegacyApplicationCreate( - slug=legacy_application_slug, - # - name=legacy_application_slug, - # - flags=legacy_application_flags, - ) - - legacy_application = await self.legacy_applications_service.create( - project_id=project_id, - user_id=user_id, - # - legacy_application_create=legacy_application_create, - ) - - if legacy_application: - application_revision = await self.legacy_applications_service.retrieve( - project_id=project_id, - # - application_ref=Reference(id=legacy_application.id), - ) - - if not application_revision or not application_revision.data: - return None - - if application_revision: - invocation_create.references.application = Reference( - id=application_revision.application_id, - slug=( - invocation_create.references.application.slug - if invocation_create.references.application - else None - ), - ) - - invocation_create.references.application_variant = Reference( - id=application_revision.application_variant_id, - slug=( - invocation_create.references.application_variant.slug - if invocation_create.references.application_variant - else None - ), - ) - - invocation_create.references.application_revision = Reference( - id=application_revision.id, - slug=application_revision.slug, - version=application_revision.version, - ) - - invocation_flags = InvocationFlags( - is_sdk=invocation_create.channel == InvocationChannel.SDK, - is_web=invocation_create.channel == InvocationChannel.WEB, - is_evaluation=invocation_create.kind == InvocationKind.EVAL, - ) - - invocation_references = InvocationReferences( - **invocation_create.references.model_dump(), - ) - - invocation_link = await self._create_invocation( - project_id=project_id, - user_id=user_id, - # - name=legacy_application.name, - # - flags=invocation_flags, - tags=invocation_create.tags, - meta=invocation_create.meta, - # - data=invocation_create.data, - # - references=invocation_references, - links=invocation_create.links, - ) - - if invocation_link is None: - return None - - invocation = await self._fetch_invocation( - project_id=project_id, - # - invocation_link=invocation_link, - ) - - return invocation - - async def fetch( - self, - *, - project_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - ): - invocation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - invocation: Optional[Invocation] = await self._fetch_invocation( - project_id=project_id, - # - invocation_link=invocation_link, - ) - return invocation - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - # - invocation_edit: InvocationEdit, - ): - invocation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - invocation: Optional[Invocation] = await self._fetch_invocation( - project_id=project_id, - # - invocation_link=invocation_link, - ) - - if invocation is None: - return None - - legacy_application_slug = ( - invocation.references.application.slug - if invocation.references.application - else None - ) or uuid4().hex - - legacy_application_flags = LegacyApplicationFlags() - - application_revision = await self.legacy_applications_service.retrieve( - project_id=project_id, - # - application_ref=invocation.references.application, - application_variant_ref=invocation.references.application_variant, - application_revision_ref=invocation.references.application_revision, - ) - - if not application_revision: - legacy_application_create = LegacyApplicationCreate( - slug=legacy_application_slug, - # - name=legacy_application_slug, - # - flags=legacy_application_flags, - ) - - legacy_application = await self.legacy_applications_service.create( - project_id=project_id, - user_id=user_id, - # - legacy_application_create=legacy_application_create, - ) - - if legacy_application: - application_revision = await self.legacy_applications_service.retrieve( - project_id=project_id, - # - application_ref=Reference(id=legacy_application.id), - ) - - if not application_revision or not application_revision.data: - return None - - if application_revision: - invocation.references.application = Reference( - id=application_revision.application_id, - slug=( - invocation.references.application.slug - if invocation.references.application - else None - ), - ) - - invocation.references.application_variant = Reference( - id=application_revision.application_variant_id, - slug=( - invocation.references.application_variant.slug - if invocation.references.application_variant - else None - ), - ) - - invocation.references.application_revision = Reference( - id=application_revision.id, - slug=application_revision.slug, - version=application_revision.version, - ) - - invocation_flags = InvocationFlags( - is_sdk=invocation.channel == InvocationChannel.SDK, - is_web=invocation.channel == InvocationChannel.WEB, - is_evaluation=invocation.kind == InvocationKind.EVAL, - ) - - invocation_references = InvocationReferences( - **invocation.references.model_dump(), - ) - - invocation_link = await self._edit_invocation( - project_id=project_id, - user_id=user_id, - # - invocation=invocation, - # - flags=invocation_flags, - tags=invocation_edit.tags, - meta=invocation_edit.meta, - # - data=invocation_edit.data, - # - references=invocation_references, - links=invocation.links, - ) - - if invocation_link is None: - return None - - invocation = await self._fetch_invocation( - project_id=project_id, - # - invocation_link=invocation_link, - ) - - return invocation - - async def delete( - self, - *, - project_id: UUID, - user_id: UUID, - # - trace_id: str, - span_id: Optional[str] = None, - ): - invocation_link = Link( - trace_id=trace_id, - span_id=span_id, - ) - - invocation_link = await self._delete_invocation( - project_id=project_id, - user_id=user_id, - # - invocation_link=invocation_link, - ) - - return invocation_link - - async def query( - self, - *, - project_id: UUID, - # - invocation_query: Optional[InvocationQuery] = None, - # - invocation_links: Optional[List[Link]] = None, - # - windowing: Optional[Windowing] = None, - ): - invocation = invocation_query if invocation_query else None - invocation_flags = InvocationFlags(is_evaluator=True) - - if invocation: - if invocation.channel: - invocation_flags.is_sdk = invocation.channel == InvocationChannel.SDK - invocation_flags.is_web = invocation.channel == InvocationChannel.WEB - - if invocation.kind: - invocation_flags.is_evaluation = invocation.kind == InvocationKind.EVAL - - invocation_tags = invocation.tags if invocation else None - invocation_meta = invocation.meta if invocation else None - - invocation_references = ( - InvocationReferences( - **invocation.references.model_dump(), - ) - if invocation and invocation.references - else None - ) - - _invocation_links = invocation.links if invocation else None - - invocations = await self._query_invocation( - project_id=project_id, - # - flags=invocation_flags, - tags=invocation_tags, - meta=invocation_meta, - # - references=invocation_references, - links=_invocation_links, - # - invocation_links=invocation_links, - # - windowing=windowing, - ) - return invocations - - # -------- Internal Functions ------------------------------------------------------------------- - - async def _create_invocation( - self, - *, - project_id: UUID, - user_id: UUID, - # - name: Optional[str], - # - flags: InvocationFlags, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - data: Data, - # - references: InvocationReferences, - links: Optional[InvocationLinks], - ) -> Optional[Link]: - trace_id = uuid4().hex - trace_type = TraceType.INVOCATION - - span_id = uuid4().hex[16:] - span_type = SpanType.TASK - span_name = name or references.application.slug or "invocation" - - _references = references.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - - if isinstance(links, dict): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": key}, # type: ignore - ) - for key, link in links.items() - if link.trace_id and link.span_id - ] - elif isinstance(links, list): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": "key"}, # type: ignore - ) - for link in links - if link.trace_id and link.span_id - ] - else: - _links = None - - _flags = flags.model_dump(mode="json", exclude_none=True) - - _type = { - "trace": "invocation", - "span": "task", - } - - _attributes = parse_into_attributes( - type=_type, - flags=_flags, - tags=tags, - meta=meta, - data=data, - references=_references, - ) - - trace_request = OTelTracingRequest( - spans=[ - OTelFlatSpan( - trace_id=trace_id, - trace_type=trace_type, - span_id=span_id, - span_type=span_type, - span_name=span_name, - attributes=_attributes, - links=_links, - ) - ] - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - _links_response = await self.tracing_router.create_trace( - request=request, - # - trace_request=trace_request, - ) - - _link = ( - Link( - trace_id=_links_response.links[0].trace_id, - span_id=_links_response.links[0].span_id, - ) - if _links_response.links and len(_links_response.links) > 0 - else None - ) - - return _link - - async def _fetch_invocation( - self, - *, - project_id: UUID, - user_id: Optional[UUID] = None, - # - invocation_link: Link, - ) -> Optional[Invocation]: - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) if user_id else None - - if not invocation_link.trace_id: - return None - - trace_response: OTelTracingResponse = await self.tracing_router.fetch_trace( - request=request, - # - trace_id=invocation_link.trace_id, - ) - - if not trace_response or not trace_response.traces: - return None - - traces = list(trace_response.traces.values()) - trace = traces[0] if traces else None - - if not trace or not trace.spans: - return None - - spans = list(trace.spans.values()) - root_span = spans[0] if spans else None - - if not root_span or isinstance(root_span, list): - return None - - ( - type, - flags, - tags, - meta, - data, - references, - ) = parse_from_attributes(root_span.attributes or {}) - - if not data: - return None - - _references = InvocationReferences( - **{ - key: Reference( - id=ref.get("id"), - slug=ref.get("slug"), - version=ref.get("version"), - ) - for key, ref in (references or {}).items() - } - ) - - _links = dict( - **{ - str(link.attributes["key"]): Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - for link in root_span.links or [] - if link.attributes and "key" in link.attributes - } - ) - - _origin = InvocationOrigin.CUSTOM - - _kind = ( - (flags.get("is_evaluation") and InvocationKind.EVAL or InvocationKind.ADHOC) - if flags - else InvocationKind.ADHOC - ) - - _channel = ( - ( - flags.get("is_sdk") - and InvocationChannel.SDK - or flags.get("is_web") - and InvocationChannel.WEB - or InvocationChannel.API - ) - if flags - else InvocationChannel.API - ) - - invocation = Invocation( - trace_id=root_span.trace_id, - span_id=root_span.span_id, - # - created_at=root_span.created_at, - updated_at=root_span.updated_at, - deleted_at=root_span.deleted_at, - created_by_id=root_span.created_by_id, - updated_by_id=root_span.updated_by_id, - deleted_by_id=root_span.deleted_by_id, - # - origin=_origin, - kind=_kind, - channel=_channel, - # - tags=tags, - meta=meta, - # - data=data, - # - references=_references, - links=_links, - ) - - return invocation - - async def _edit_invocation( - self, - *, - project_id: UUID, - user_id: UUID, - # - invocation: Invocation, - # - flags: InvocationFlags, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - data: Data, - # - references: InvocationReferences, - links: InvocationLinks, - ) -> Optional[Link]: - if not invocation.trace_id or not invocation.span_id: - return None - - _references = references.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - - if isinstance(links, dict): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": key}, # type: ignore - ) - for key, link in links.items() - if link.trace_id and link.span_id - ] - elif isinstance(links, list): - _links = [ - OTelLink( - trace_id=link.trace_id, - span_id=link.span_id, - attributes={"key": "key"}, # type: ignore - ) - for link in links - if link.trace_id and link.span_id - ] - else: - _links = None - - _flags = flags.model_dump(mode="json", exclude_none=True) - - _type = { - "trace": "invocation", - "span": "task", - } - - _attributes = parse_into_attributes( - type=_type, - flags=_flags, - tags=tags, - meta=meta, - data=data, - references=_references, - ) - - trace_request = OTelTracingRequest( - spans=[ - OTelFlatSpan( - trace_id=invocation.trace_id, - span_id=invocation.span_id, - attributes=_attributes, - links=_links, - ) - ] - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - _links_response = await self.tracing_router.edit_trace( - request=request, - # - trace_id=invocation.trace_id, - # - trace_request=trace_request, - ) - - _link = ( - Link( - trace_id=_links_response.links[0].trace_id, - span_id=_links_response.links[0].span_id, - ) - if _links_response.links and len(_links_response.links) > 0 - else None - ) - - return _link - - async def _delete_invocation( - self, - *, - project_id: UUID, - user_id: UUID, - # - invocation_link: Link, - ) -> Optional[Link]: - if not invocation_link.trace_id: - return None - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - link_response = await self.tracing_router.delete_trace( - request=request, - # - trace_id=invocation_link.trace_id, - ) - - link = link_response.links[0] if link_response.links else None - - if not link or not link.trace_id or not link.span_id: - return None - - invocation_link = Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - - return invocation_link - - async def _query_invocation( - self, - *, - project_id: UUID, - user_id: Optional[UUID] = None, - # - flags: Optional[InvocationFlags] = None, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - # - references: Optional[InvocationReferences] = None, - links: Optional[InvocationLinks] = None, - # - invocation_links: Optional[List[Link]] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Invocation]: - formatting = Formatting( - focus=Focus.TRACE, - format=Format.AGENTA, - ) - - filtering = Filtering() - - conditions: List[Union[Condition, Filtering]] = [ - Condition( - field="attributes", - key="ag.type.trace", - value="invocation", - operator=ComparisonOperator.IS, - ) - ] - - trace_ids = ( - [invocation_link.trace_id for invocation_link in invocation_links] - if invocation_links - else None - ) - - # span_ids = ( - # [invocation_link.span_id for invocation_link in invocation_links] - # if invocation_links - # else None - # ) - - if trace_ids: - conditions.append( - Condition( - field="trace_id", - value=trace_ids, - operator=ListOperator.IN, - ) - ) - - # if span_ids: - # conditions.append( - # Condition( - # field="span_id", - # value=span_ids, - # operator=ListOperator.IN, - # ) - # ) - - if flags: - for key, value in flags.model_dump(mode="json", exclude_none=True).items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.flags.{key}", - value=value, - operator=ComparisonOperator.IS, - ) - ) - - if tags: - for key, value in tags.items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.tags.{key}", - value=value, # type:ignore - operator=ComparisonOperator.IS, - ) - ) - - if meta: - for key, value in meta.items(): - conditions.append( - Condition( - field="attributes", - key=f"ag.meta.{key}", - value=value, # type:ignore - operator=ComparisonOperator.IS, - ) - ) - - if references: - for _, reference in references.model_dump(mode="json").items(): - if reference: - ref_id = str(reference.get("id")) if reference.get("id") else None - ref_slug = ( - str(reference.get("slug")) if reference.get("slug") else None - ) - conditions.append( - Condition( - field="references", - value=[ - {"id": ref_id, "slug": ref_slug}, - ], - operator=ListOperator.IN, - ) - ) - - if links: - if isinstance(links, dict): - for _, link in links.items(): - if link: - conditions.append( - Condition( - field="links", - value=[ - { - "trace_id": link.trace_id, - "span_id": link.span_id, - }, - ], - operator=ListOperator.IN, - ) - ) - elif isinstance(links, list): - _conditions = [] - for link in links: - if link: - _conditions.append( - Condition( - field="links", - value=[ - { - "trace_id": link.trace_id, - "span_id": link.span_id, - }, - ], - operator=ListOperator.IN, - ) - ) - if _conditions: - conditions.append( - Filtering( - operator=LogicalOperator.OR, - conditions=_conditions, - ) - ) - - if conditions: - filtering = Filtering( - operator=LogicalOperator.AND, - conditions=conditions, - ) - - query = TracingQuery( - formatting=formatting, - filtering=filtering, - windowing=windowing, - ) - - request = Request( - scope={"type": "http", "http_version": "1.1", "scheme": "http"} - ) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) if user_id else None - - spans_response: OTelTracingResponse = await self.tracing_router.query_spans( - request=request, - # - query=query, - ) - - if not spans_response or not spans_response.traces: - return [] - - traces = list(spans_response.traces.values()) - - invocations = [] - - for trace in traces: - if not trace or not trace.spans: - continue - - spans = list(trace.spans.values()) - root_span = spans[0] if spans else None - - if not root_span or isinstance(root_span, list): - continue - - ( - __type, - __flags, - __tags, - __meta, - __data, - __references, - ) = parse_from_attributes(root_span.attributes or {}) - - if not __data: - continue - - _references = InvocationReferences( - **{ - key: Reference( - id=ref.get("id"), - slug=ref.get("slug"), - version=ref.get("version"), - ) - for key, ref in (__references or {}).items() - } - ) - - _links = dict( - **{ - str(link.attributes["key"]): Link( - trace_id=link.trace_id, - span_id=link.span_id, - ) - for link in root_span.links or [] - if link.attributes and "key" in link.attributes - } - ) - - _origin = InvocationOrigin.CUSTOM - - _kind = ( - ( - __flags.get("is_evaluation") - and InvocationKind.EVAL - or InvocationKind.ADHOC - ) - if __flags - else InvocationKind.ADHOC - ) - - _channel = ( - ( - __flags.get("is_sdk") - and InvocationChannel.SDK - or __flags.get("is_web") - and InvocationChannel.WEB - or InvocationChannel.API - ) - if __flags - else InvocationChannel.API - ) - - invocation = Invocation( - trace_id=root_span.trace_id, - span_id=root_span.span_id, - # - created_at=root_span.created_at, - updated_at=root_span.updated_at, - deleted_at=root_span.deleted_at, - created_by_id=root_span.created_by_id, - updated_by_id=root_span.updated_by_id, - deleted_by_id=root_span.deleted_by_id, - # - origin=_origin, - kind=_kind, - channel=_channel, - # - tags=__tags, - meta=__meta, - # - data=__data, - # - references=_references, - links=_links, - ) - - invocations.append(invocation) - - return invocations diff --git a/api/oss/src/core/invocations/types.py b/api/oss/src/core/invocations/types.py deleted file mode 100644 index 575855fca1..0000000000 --- a/api/oss/src/core/invocations/types.py +++ /dev/null @@ -1,48 +0,0 @@ -from typing import Optional - -from oss.src.core.shared.dtos import Reference -from oss.src.core.workflows.dtos import WorkflowFlags -from oss.src.core.tracing.dtos import ( - SimpleTraceOrigin, - SimpleTraceKind, - SimpleTraceChannel, - SimpleTraceReferences, - SimpleTraceLinks, - # - SimpleTrace, - SimpleTraceCreate, - SimpleTraceEdit, - SimpleTraceQuery, -) - - -InvocationOrigin = SimpleTraceOrigin -InvocationKind = SimpleTraceKind -InvocationChannel = SimpleTraceChannel -InvocationLinks = SimpleTraceLinks - - -class InvocationFlags(WorkflowFlags): - is_sdk: Optional[bool] = None - is_web: Optional[bool] = None - is_evaluation: Optional[bool] = None - - -class InvocationReferences(SimpleTraceReferences): - application: Reference # type: ignore - - -class Invocation(SimpleTrace): - links: Optional[InvocationLinks] - - -class InvocationCreate(SimpleTraceCreate): - links: Optional[InvocationLinks] - - -class InvocationEdit(SimpleTraceEdit): - pass - - -class InvocationQuery(SimpleTraceQuery): - pass diff --git a/api/oss/src/core/invocations/utils.py b/api/oss/src/core/invocations/utils.py deleted file mode 100644 index 0ad3df24d2..0000000000 --- a/api/oss/src/core/invocations/utils.py +++ /dev/null @@ -1,57 +0,0 @@ -from jsonschema import ( - Draft202012Validator, - Draft7Validator, - Draft4Validator, - Draft6Validator, - Draft201909Validator, -) - -from fastapi import status, HTTPException - - -def _get_jsonschema_validator( - format: dict, # pylint: disable=redefined-builtin -): - schema_uri = format.get( - "$schema", - "https://json-schema.org/draft/2020-12/schema", - ) - - if "2020-12" in schema_uri: - return Draft202012Validator - elif "2019-09" in schema_uri: - return Draft201909Validator - elif "draft-07" in schema_uri: - return Draft7Validator - elif "draft-06" in schema_uri: - return Draft6Validator - elif "draft-04" in schema_uri: - return Draft4Validator - return Draft202012Validator # fallback - - -def validate_data_against_schema( - data: dict, - schema: dict, # pylint: disable=redefined-builtin -): - validator_class = _get_jsonschema_validator(schema) - validator = validator_class(schema) - - errors = list(validator.iter_errors(data)) - - if errors: - details = [] - for e in errors: - loc = list(e.absolute_path) - msg = e.message - details.append( - { - "loc": ["body", "invocation", "data"] + loc, - "msg": msg, - "type": "value_error.json_schema", - } - ) - - raise HTTPException( - status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=details - ) diff --git a/api/oss/src/core/observability/dtos.py b/api/oss/src/core/observability/dtos.py index bce3b2cdcf..dcad25b5b9 100644 --- a/api/oss/src/core/observability/dtos.py +++ b/api/oss/src/core/observability/dtos.py @@ -5,7 +5,7 @@ from pydantic import BaseModel -from oss.src.core.shared.dtos import LegacyLifecycleDTO, Windowing +from oss.src.core.shared.dtos import LifecycleDTO ## --- SUB-ENTITIES --- ## @@ -16,10 +16,9 @@ class RootDTO(BaseModel): class TreeType(Enum): + # --- VARIANTS --- # INVOCATION = "invocation" - ANNOTATION = "annotation" - # - UNKNOWN = "unknown" + # --- VARIANTS --- # class TreeDTO(BaseModel): @@ -160,7 +159,7 @@ class SpanDTO(BaseModel): trace_id: str span_id: str - lifecycle: Optional[LegacyLifecycleDTO] = None + lifecycle: Optional[LifecycleDTO] = None root: RootDTO tree: TreeDTO @@ -184,19 +183,18 @@ class SpanDTO(BaseModel): nodes: Optional[Dict[str, Union["SpanDTO", List["SpanDTO"]]]] = None - model_config = { - "json_encoders": { - UUID: lambda v: str(v), + class Config: + json_encoders = { + UUID: lambda v: str(v), # pylint: disable=unnecessary-lambda datetime: lambda dt: dt.isoformat(), - }, - } + } def encode(self, data: Any) -> Any: if isinstance(data, dict): return {k: self.encode(v) for k, v in data.items()} elif isinstance(data, list): return [self.encode(item) for item in data] - for type_, encoder in self.model_config["json_encoders"].items(): # type: ignore + for type_, encoder in self.Config.json_encoders.items(): if isinstance(data, type_): return encoder(data) return data @@ -233,8 +231,10 @@ class OTelSpanDTO(BaseModel): ## --- QUERY --- ## -class WindowingDTO(Windowing): - pass +class WindowingDTO(BaseModel): + oldest: Optional[datetime] = None + newest: Optional[datetime] = None + window: Optional[int] = None class LogicalOperator(Enum): @@ -306,9 +306,8 @@ class FilteringDTO(BaseModel): conditions: List[Union[ConditionDTO, "FilteringDTO"]] - model_config = { - "arbitrary_types_allowed": True, - } + class Config: + arbitrary_types_allowed = True class Focus(Enum): @@ -359,6 +358,6 @@ def plus(self, other: "MetricsDTO") -> "MetricsDTO": class BucketDTO(BaseModel): timestamp: datetime - interval: int + window: int total: MetricsDTO error: MetricsDTO diff --git a/api/oss/src/core/observability/utils.py b/api/oss/src/core/observability/utils.py index 01e72c7825..cb78cd3192 100644 --- a/api/oss/src/core/observability/utils.py +++ b/api/oss/src/core/observability/utils.py @@ -158,7 +158,7 @@ def parse_ingest_value( ) -> None: try: attributes[key] = to_type(attributes[key]) - except (ValueError, TypeError): + except ValueError: print_exc() log.warn( "Failed to parse attributes:", diff --git a/api/oss/src/core/queries/dtos.py b/api/oss/src/core/queries/dtos.py deleted file mode 100644 index a6c2c113d4..0000000000 --- a/api/oss/src/core/queries/dtos.py +++ /dev/null @@ -1,246 +0,0 @@ -from typing import Optional -from uuid import UUID - -from pydantic import BaseModel, Field - - -from oss.src.core.tracing.dtos import Filtering -from oss.src.core.shared.dtos import ( - Identifier, - Slug, - Lifecycle, - Header, - Flags, - Tags, - Meta, - Windowing, -) -from oss.src.core.shared.dtos import sync_alias, AliasConfig -from oss.src.core.git.dtos import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - RevisionsLog, - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - VariantFork, - Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, - RevisionFork, -) - - -class QueryIdAlias(AliasConfig): - query_id: Optional[UUID] = None - artifact_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="query_id", - ) - - -class QueryVariantIdAlias(AliasConfig): - query_variant_id: Optional[UUID] = None - variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="query_variant_id", - ) - - -class QueryRevisionIdAlias(AliasConfig): - query_revision_id: Optional[UUID] = None - revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="query_revision_id", - ) - - -class Query(Artifact): - pass - - -class QueryCreate(ArtifactCreate): - pass - - -class QueryEdit(ArtifactEdit): - pass - - -class QueryQuery(ArtifactQuery): - pass - - -class QueryVariant( - Variant, - QueryIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - - -class QueryVariantCreate( - VariantCreate, - QueryIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - - -class QueryVariantEdit(VariantEdit): - pass - - -class QueryVariantQuery(VariantQuery): - pass - - -class QueryRevisionData(BaseModel): - windowing: Optional[Windowing] = None - filtering: Optional[Filtering] = None - - -class QueryRevision( - Revision, - QueryIdAlias, - QueryVariantIdAlias, -): - data: Optional[QueryRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - sync_alias("query_variant_id", "variant_id", self) - - -class QueryRevisionCreate( - RevisionCreate, - QueryIdAlias, - QueryVariantIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - sync_alias("query_variant_id", "variant_id", self) - - -class QueryRevisionEdit(RevisionEdit): - pass - - -class QueryRevisionQuery(RevisionQuery): - pass - - -class QueryRevisionCommit( - RevisionCommit, - QueryIdAlias, - QueryVariantIdAlias, -): - data: Optional[QueryRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - sync_alias("query_variant_id", "variant_id", self) - - -class QueryRevisionsLog( - RevisionsLog, - QueryIdAlias, - QueryVariantIdAlias, - QueryRevisionIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("query_id", "artifact_id", self) - sync_alias("query_variant_id", "variant_id", self) - sync_alias("query_revision_id", "revision_id", self) - - -class QueryRevisionFork(RevisionFork): - data: Optional[QueryRevisionData] = None - - -class QueryVariantFork(VariantFork): - pass - - -class QueryVariantForkAlias(AliasConfig): - query_variant: Optional[QueryVariantFork] = None - - variant: Optional[VariantFork] = Field( - default=None, - exclude=True, - alias="query_variant", - ) - - -class QueryRevisionForkAlias(AliasConfig): - query_revision: Optional[QueryRevisionFork] = None - - revision: Optional[RevisionFork] = Field( - default=None, - exclude=True, - alias="query_revision", - ) - - -class QueryFork( - ArtifactFork, - QueryVariantIdAlias, - QueryRevisionIdAlias, - QueryVariantForkAlias, - QueryRevisionForkAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("query_variant", "variant", self) - sync_alias("query_revision", "revision", self) - sync_alias("query_variant_id", "variant_id", self) - sync_alias("query_revision_id", "revision_id", self) - - -class SimpleQuery( - Identifier, - Slug, - Lifecycle, - Header, -): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Optional[QueryRevisionData] = None - - -class SimpleQueryCreate( - Slug, - Header, -): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Optional[QueryRevisionData] = None - - -class SimpleQueryEdit( - Identifier, - Header, -): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Optional[QueryRevisionData] = None - - -class SimpleQueryQuery(BaseModel): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None diff --git a/api/oss/src/core/queries/service.py b/api/oss/src/core/queries/service.py deleted file mode 100644 index 61c7caef6e..0000000000 --- a/api/oss/src/core/queries/service.py +++ /dev/null @@ -1,1336 +0,0 @@ -from typing import Optional, List -from uuid import UUID, uuid4 - -from oss.src.utils.logging import get_module_logger - -from oss.src.core.git.interfaces import GitDAOInterface -from oss.src.core.shared.dtos import Reference, Windowing -from oss.src.core.git.dtos import ( - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - RevisionsLog, - # - VariantCreate, - VariantEdit, - VariantQuery, - # - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, -) -from oss.src.core.queries.dtos import ( - Query, - QueryCreate, - QueryEdit, - QueryQuery, - QueryFork, - # - QueryVariant, - QueryVariantCreate, - QueryVariantEdit, - QueryVariantQuery, - # - QueryRevision, - QueryRevisionCreate, - QueryRevisionEdit, - QueryRevisionQuery, - QueryRevisionCommit, - QueryRevisionsLog, - # - SimpleQuery, - SimpleQueryCreate, - SimpleQueryEdit, - SimpleQueryQuery, -) - - -log = get_module_logger(__name__) - - -class QueriesService: - def __init__( - self, - *, - queries_dao: GitDAOInterface, - ): - self.queries_dao = queries_dao - - ## -- artifacts ------------------------------------------------------------ - - async def create_query( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_create: QueryCreate, - # - query_id: Optional[UUID] = None, - ) -> Optional[Query]: - _artifact_create = ArtifactCreate( - **query_create.model_dump(mode="json"), - ) - - artifact = await self.queries_dao.create_artifact( - project_id=project_id, - user_id=user_id, - # - artifact_create=_artifact_create, - # - artifact_id=query_id, - ) - - if not artifact: - return None - - _query = Query(**artifact.model_dump(mode="json")) - - return _query - - async def fetch_query( - self, - *, - project_id: UUID, - # - query_ref: Reference, - ) -> Optional[Query]: - artifact = await self.queries_dao.fetch_artifact( - project_id=project_id, - # - artifact_ref=query_ref, - ) - - if not artifact: - return None - - _query = Query(**artifact.model_dump(mode="json")) - - return _query - - async def edit_query( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_edit: QueryEdit, - ) -> Optional[Query]: - _artifact_edit = ArtifactEdit( - **query_edit.model_dump(mode="json"), - ) - - artifact = await self.queries_dao.edit_artifact( - project_id=project_id, - user_id=user_id, - # - artifact_edit=_artifact_edit, - ) - - if not artifact: - return None - - _query = Query(**artifact.model_dump(mode="json")) - - return _query - - async def archive_query( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_id: UUID, - ) -> Optional[Query]: - artifact = await self.queries_dao.archive_artifact( - project_id=project_id, - user_id=user_id, - # - artifact_id=query_id, - ) - - if not artifact: - return None - - _query = Query(**artifact.model_dump(mode="json")) - - return _query - - async def unarchive_query( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_id: UUID, - ) -> Optional[Query]: - artifact = await self.queries_dao.unarchive_artifact( - project_id=project_id, - user_id=user_id, - # - artifact_id=query_id, - ) - - if not artifact: - return None - - _query = Query(**artifact.model_dump(mode="json")) - - return _query - - async def query_queries( - self, - *, - project_id: UUID, - # - query: Optional[QueryQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Query]: - _artifact_query = ( - ArtifactQuery( - **query.model_dump(mode="json", exclude_none=True), - ) - if query - else ArtifactQuery() - ) - - artifacts = await self.queries_dao.query_artifacts( - project_id=project_id, - # - artifact_query=_artifact_query, - # - artifact_refs=query_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - _queries = [ - Query( - **artifact.model_dump(mode="json"), - ) - for artifact in artifacts - ] - - return _queries - - ## ------------------------------------------------------------------------- - - ## -- variants ------------------------------------------------------------- - - async def create_query_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_variant_create: QueryVariantCreate, - ) -> Optional[QueryVariant]: - _variant_create = VariantCreate( - **query_variant_create.model_dump(mode="json"), - ) - - variant = await self.queries_dao.create_variant( - project_id=project_id, - user_id=user_id, - # - variant_create=_variant_create, - ) - - if not variant: - return None - - _query_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _query_variant - - async def fetch_query_variant( - self, - *, - project_id: UUID, - # - query_ref: Optional[Reference] = None, - query_variant_ref: Optional[Reference] = None, - ) -> Optional[QueryVariant]: - variant = await self.queries_dao.fetch_variant( - project_id=project_id, - # - artifact_ref=query_ref, - variant_ref=query_variant_ref, - ) - - if not variant: - return None - - _query_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _query_variant - - async def edit_query_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_variant_edit: QueryVariantEdit, - ) -> Optional[QueryVariant]: - _variant_edit = VariantEdit( - **query_variant_edit.model_dump(mode="json"), - ) - - variant = await self.queries_dao.edit_variant( - project_id=project_id, - user_id=user_id, - # - variant_edit=_variant_edit, - ) - - if not variant: - return None - - _query_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _query_variant - - async def archive_query_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_variant_id: UUID, - ) -> Optional[QueryVariant]: - variant = await self.queries_dao.archive_variant( - project_id=project_id, - user_id=user_id, - # - variant_id=query_variant_id, - ) - - if not variant: - return None - - _query_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _query_variant - - async def unarchive_query_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_variant_id: UUID, - ) -> Optional[QueryVariant]: - variant = await self.queries_dao.unarchive_variant( - project_id=project_id, - user_id=user_id, - # - variant_id=query_variant_id, - ) - - if not variant: - return None - - _workdlow_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _workdlow_variant - - async def query_query_variants( - self, - *, - project_id: UUID, - # - query_variant_query: Optional[QueryVariantQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - query_variant_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[QueryVariant]: - _variant_query = ( - VariantQuery( - **query_variant_query.model_dump(mode="json", exclude_none=True), - ) - if query_variant_query - else VariantQuery() - ) - - variants = await self.queries_dao.query_variants( - project_id=project_id, - # - variant_query=_variant_query, - # - artifact_refs=query_refs, - variant_refs=query_variant_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - _query_variants = [ - QueryVariant( - **variant.model_dump(mode="json"), - ) - for variant in variants - ] - - return _query_variants - - ## ......................................................................... - - async def fork_query_variant( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_fork: QueryFork, - ) -> Optional[QueryVariant]: - _artifact_fork = ArtifactFork( - **query_fork.model_dump(mode="json"), - ) - - variant = await self.queries_dao.fork_variant( - project_id=project_id, - user_id=user_id, - # - artifact_fork=_artifact_fork, - ) - - if not variant: - return None - - _query_variant = QueryVariant( - **variant.model_dump(mode="json"), - ) - - return _query_variant - - ## ------------------------------------------------------------------------- - - ## -- revisions ------------------------------------------------------------ - - async def create_query_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_revision_create: QueryRevisionCreate, - ) -> Optional[QueryRevision]: - _revision_create = RevisionCreate( - **query_revision_create.model_dump(mode="json"), - ) - - revision = await self.queries_dao.create_revision( - project_id=project_id, - user_id=user_id, - # - revision_create=_revision_create, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def fetch_query_revision( - self, - *, - project_id: UUID, - # - query_ref: Optional[Reference] = None, - query_variant_ref: Optional[Reference] = None, - query_revision_ref: Optional[Reference] = None, - ) -> Optional[QueryRevision]: - if not query_ref and not query_variant_ref and not query_revision_ref: - return None - - if query_ref and not query_variant_ref and not query_revision_ref: - query = await self.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - return None - - query_ref = Reference( - id=query.id, - slug=query.slug, - ) - - query_variant = await self.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - return None - - query_variant_ref = Reference( - id=query_variant.id, - slug=query_variant.slug, - ) - - revision = await self.queries_dao.fetch_revision( - project_id=project_id, - # - variant_ref=query_variant_ref, - revision_ref=query_revision_ref, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def edit_query_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_revision_edit: QueryRevisionEdit, - ) -> Optional[QueryRevision]: - _query_revision_edit = RevisionEdit( - **query_revision_edit.model_dump(mode="json"), - ) - - revision = await self.queries_dao.edit_revision( - project_id=project_id, - user_id=user_id, - # - revision_edit=_query_revision_edit, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def archive_query_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_revision_id: UUID, - ) -> Optional[QueryRevision]: - revision = await self.queries_dao.archive_revision( - project_id=project_id, - user_id=user_id, - # - revision_id=query_revision_id, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def unarchive_query_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_revision_id: UUID, - ) -> Optional[QueryRevision]: - revision = await self.queries_dao.unarchive_revision( - project_id=project_id, - user_id=user_id, - # - revision_id=query_revision_id, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def query_query_revisions( - self, - *, - project_id: UUID, - # - query_revision: Optional[QueryRevisionQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - query_variant_refs: Optional[List[Reference]] = None, - query_revision_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[QueryRevision]: - _revision_query = ( - RevisionQuery( - **query_revision.model_dump(mode="json", exclude_none=True), - ) - if query_revision - else RevisionQuery() - ) - - revisions = await self.queries_dao.query_revisions( - project_id=project_id, - # - revision_query=_revision_query, - # - artifact_refs=query_refs, - variant_refs=query_variant_refs, - revision_refs=query_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - _query_revisions = [ - QueryRevision( - **revision.model_dump(mode="json"), - ) - for revision in revisions - ] - - return _query_revisions - - ## ......................................................................... - - async def commit_query_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_revision_commit: QueryRevisionCommit, - ) -> Optional[QueryRevision]: - _revision_commit = RevisionCommit( - **query_revision_commit.model_dump(mode="json"), - ) - - if not _revision_commit.artifact_id: - if not _revision_commit.variant_id: - return None - - variant = await self.queries_dao.fetch_variant( - project_id=project_id, - # - variant_ref=Reference(id=_revision_commit.variant_id), - ) - - if not variant: - return None - - _revision_commit.artifact_id = variant.artifact_id - - revision = await self.queries_dao.commit_revision( - project_id=project_id, - user_id=user_id, - # - revision_commit=_revision_commit, - ) - - if not revision: - return None - - _query_revision = QueryRevision( - **revision.model_dump(mode="json"), - ) - - return _query_revision - - async def log_query_revisions( - self, - *, - project_id: UUID, - # - query_revisions_log: QueryRevisionsLog, - # - ) -> List[QueryRevision]: - _revisions_log = RevisionsLog( - **query_revisions_log.model_dump(mode="json"), - ) - - revisions = await self.queries_dao.log_revisions( - project_id=project_id, - # - revisions_log=_revisions_log, - ) - - _query_revisions = [ - QueryRevision( - **revision.model_dump(mode="json"), - ) - for revision in revisions - ] - - return _query_revisions - - ## ------------------------------------------------------------------------- - - -class SimpleQueriesService: - def __init__( - self, - queries_service: QueriesService, - ): - self.queries_service = queries_service - - async def create( - self, - *, - project_id: UUID, - user_id: UUID, - # - simple_query_create: SimpleQueryCreate, - # - query_id: Optional[UUID] = None, - ) -> Optional[SimpleQuery]: - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - _query_create = QueryCreate( - slug=simple_query_create.slug, - # - name=simple_query_create.name, - description=simple_query_create.description, - # - flags=simple_query_create.flags, - tags=simple_query_create.tags, - meta=simple_query_create.meta, - ) - - query: Optional[Query] = await self.queries_service.create_query( - project_id=project_id, - user_id=user_id, - # - query_create=_query_create, - # - query_id=query_id, - ) - - if not query: - return None - - # ---------------------------------------------------------------------- - # Query variant - # ---------------------------------------------------------------------- - query_variant_slug = uuid4().hex[-12:] - - _query_variant_create = QueryVariantCreate( - slug=query_variant_slug, - # - name=simple_query_create.name, - description=simple_query_create.description, - # - flags=simple_query_create.flags, - tags=simple_query_create.tags, - meta=simple_query_create.meta, - # - query_id=query.id, # type: ignore[arg-type] - ) - - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.create_query_variant( - project_id=project_id, - user_id=user_id, - # - query_variant_create=_query_variant_create, - ) - - if not query_variant: - return None - - # ---------------------------------------------------------------------- - # Query revision - # ---------------------------------------------------------------------- - query_revision_slug = uuid4().hex[-12:] - - _query_revision_commit = QueryRevisionCommit( - slug=query_revision_slug, - # - name=simple_query_create.name, - description=simple_query_create.description, - # - flags=simple_query_create.flags, - tags=simple_query_create.tags, - meta=simple_query_create.meta, - # - data=simple_query_create.data, - # - query_id=query.id, - query_variant_id=query_variant.id, - ) - - query_revision: Optional[ - QueryRevision - ] = await self.queries_service.commit_query_revision( - project_id=project_id, - user_id=user_id, - query_revision_commit=_query_revision_commit, - ) - - if not query_revision: - return None - - # ---------------------------------------------------------------------- - # Simple Query - # ---------------------------------------------------------------------- - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - # - data=query_revision.data, - ) - - return simple_query - - async def fetch( - self, - *, - project_id: UUID, - # - query_id: Optional[UUID] = None, - ) -> Optional[SimpleQuery]: - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - query_ref = Reference( - id=query_id, - ) - - query: Optional[Query] = await self.queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - return None - - # ---------------------------------------------------------------------- - # Query variant - # ---------------------------------------------------------------------- - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - return None - - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - - query_variant_ref = Reference( - id=query_variant.id, - ) - query_revision: Optional[ - QueryRevision - ] = await self.queries_service.fetch_query_revision( - project_id=project_id, - # - query_variant_ref=query_variant_ref, - ) - - if not query_revision: - return None - - # ---------------------------------------------------------------------- - # Simple Query - # ---------------------------------------------------------------------- - - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - # - data=query_revision.data, - ) - - return simple_query - - async def edit( - self, - *, - project_id: UUID, - user_id: UUID, - # - simple_query_edit: SimpleQueryEdit, - # - query_id: UUID, - ) -> Optional[SimpleQuery]: - if str(query_id) != str(simple_query_edit.id): - return None - - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - query_ref = Reference(id=simple_query_edit.id) - - query: Optional[Query] = await self.queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - return None - - _query_edit = QueryEdit( - id=query.id, - # - name=simple_query_edit.name, - description=simple_query_edit.description, - # - flags=simple_query_edit.flags, - tags=simple_query_edit.tags, - meta=simple_query_edit.meta, - ) - - query = await self.queries_service.edit_query( - project_id=project_id, - user_id=user_id, - # - query_edit=_query_edit, - ) - - if not query: - return None - - # ---------------------------------------------------------------------- - # Query variant - # ---------------------------------------------------------------------- - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - return None - - _query_variant_edit = QueryVariantEdit( - id=query_variant.id, - # - name=simple_query_edit.name, - description=simple_query_edit.description, - # - flags=simple_query_edit.flags, - tags=simple_query_edit.tags, - meta=simple_query_edit.meta, - ) - - query_variant = await self.queries_service.edit_query_variant( - project_id=project_id, - user_id=user_id, - # - query_variant_edit=_query_variant_edit, - ) - - if not query_variant: - return None - - # ---------------------------------------------------------------------- - # Query revision - # ---------------------------------------------------------------------- - query_revision_slug = uuid4().hex[-12:] - - _query_revision_commit = QueryRevisionCommit( - slug=query_revision_slug, - # - name=simple_query_edit.name, - description=simple_query_edit.description, - # - flags=simple_query_edit.flags, - tags=simple_query_edit.tags, - meta=simple_query_edit.meta, - # - data=simple_query_edit.data, - # - query_id=query.id, - query_variant_id=query_variant.id, - ) - - query_revision: Optional[ - QueryRevision - ] = await self.queries_service.commit_query_revision( - project_id=project_id, - user_id=user_id, - # - query_revision_commit=_query_revision_commit, - ) - - if not query_revision: - return None - - # ---------------------------------------------------------------------- - # Simple Query - # ---------------------------------------------------------------------- - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - # - data=query_revision.data, - ) - - return simple_query - - async def query( - self, - *, - project_id: UUID, - # - query: Optional[SimpleQueryQuery] = None, - # - query_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[SimpleQuery]: - # ---------------------------------------------------------------------- - # Queries - # ---------------------------------------------------------------------- - queries: List[Query] = await self.queries_service.query_queries( - project_id=project_id, - # - query=query, - # - query_refs=query_refs, - # - include_archived=include_archived, - # - windowing=windowing, - ) - - if not queries: - return [] - - simple_queries: List[SimpleQuery] = [] - - for query in queries: - # ------------------------------------------------------------------ - # Query variants - # ------------------------------------------------------------------ - query_ref = Reference( - id=query.id, - ) - - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - continue - - # ------------------------------------------------------------------ - # Query revisions - # ------------------------------------------------------------------ - query_variant_ref = Reference( - id=query_variant.id, - ) - - query_revision: Optional[ - QueryRevision - ] = await self.queries_service.fetch_query_revision( - project_id=project_id, - # - query_variant_ref=query_variant_ref, - ) - - if not query_revision: - continue - - # ------------------------------------------------------------------ - # Simple Queries - # ------------------------------------------------------------------ - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - # - data=query_revision.data, - ) - - simple_queries.append(simple_query) - - return simple_queries - - async def archive( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_id: Optional[UUID] = None, - ) -> Optional[SimpleQuery]: - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - query_ref = Reference( - id=query_id, - ) - - query: Optional[Query] = await self.queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - return None - - query: Optional[Query] = await self.queries_service.archive_query( - project_id=project_id, - user_id=user_id, - # - query_id=query_id, - ) - - if not query: - return None - - # ---------------------------------------------------------------------- - # Query variant - # ---------------------------------------------------------------------- - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - return None - - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.archive_query_variant( - project_id=project_id, - user_id=user_id, - # - query_variant_id=query_variant.id, - ) - - if not query_variant: - return None - - # ---------------------------------------------------------------------- - # Simple Query - # ---------------------------------------------------------------------- - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - ) - - return simple_query - - async def unarchive( - self, - *, - project_id: UUID, - user_id: UUID, - # - query_id: Optional[UUID] = None, - ) -> Optional[SimpleQuery]: - # ---------------------------------------------------------------------- - # Query - # ---------------------------------------------------------------------- - query_ref = Reference( - id=query_id, - ) - - query: Optional[Query] = await self.queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query: - return None - - query: Optional[Query] = await self.queries_service.unarchive_query( - project_id=project_id, - user_id=user_id, - # - query_id=query_id, - ) - - if not query: - return None - - # ---------------------------------------------------------------------- - # Query variant - # ---------------------------------------------------------------------- - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.fetch_query_variant( - project_id=project_id, - # - query_ref=query_ref, - ) - - if not query_variant: - return None - - query_variant: Optional[ - QueryVariant - ] = await self.queries_service.unarchive_query_variant( - project_id=project_id, - user_id=user_id, - # - query_variant_id=query_variant.id, - ) - - if not query_variant: - return None - - # ---------------------------------------------------------------------- - # Simple Query - # ---------------------------------------------------------------------- - simple_query = SimpleQuery( - id=query.id, - slug=query.slug, - # - created_at=query.created_at, - updated_at=query.updated_at, - deleted_at=query.deleted_at, - created_by_id=query.created_by_id, - updated_by_id=query.updated_by_id, - deleted_by_id=query.deleted_by_id, - # - name=query.name, - description=query.description, - # - flags=query.flags, - tags=query.tags, - meta=query.meta, - ) - - return simple_query diff --git a/api/oss/src/core/secrets/dtos.py b/api/oss/src/core/secrets/dtos.py index 7286701488..c2385f43a8 100644 --- a/api/oss/src/core/secrets/dtos.py +++ b/api/oss/src/core/secrets/dtos.py @@ -10,7 +10,7 @@ from oss.src.core.shared.dtos import ( Identifier, Header, - LegacyLifecycleDTO, + LifecycleDTO, ) @@ -52,7 +52,7 @@ class SecretDTO(BaseModel): @model_validator(mode="before") def validate_secret_data_based_on_kind(cls, values: Dict[str, Any]): kind = values.get("kind") - data = values.get("data", {}) + data = values.get("data") if kind == SecretKind.PROVIDER_KEY.value: if not isinstance(data, dict): @@ -69,11 +69,6 @@ def validate_secret_data_based_on_kind(cls, values: Dict[str, Any]): ) elif kind == SecretKind.CUSTOM_PROVIDER.value: - # Fix inconsistent API naming - Users might enter 'togetherai' but the API requires 'together_ai' - # This ensures compatibility with LiteLLM which requires the provider in "together_ai" format - if data.get("kind", "") == "togetherai": - data["kind"] = "together_ai" - if not isinstance(data, dict): raise ValueError( "The provided request secret dto is not a valid type for CustomProviderDTO" @@ -137,7 +132,7 @@ def update_provider_slug_with_header_name(cls, values): class SecretResponseDTO(Identifier, SecretDTO): header: Header - lifecycle: Optional[LegacyLifecycleDTO] = None + lifecycle: Optional[LifecycleDTO] = None @model_validator(mode="before") def build_up_model_keys(cls, values: Dict[str, Any]) -> Dict[str, Any]: diff --git a/api/oss/src/core/secrets/enums.py b/api/oss/src/core/secrets/enums.py index ef16b43e79..750c697b4f 100644 --- a/api/oss/src/core/secrets/enums.py +++ b/api/oss/src/core/secrets/enums.py @@ -16,7 +16,7 @@ class StandardProviderKind(str, Enum): MISTRALAI = "mistralai" ANTHROPIC = "anthropic" PERPLEXITYAI = "perplexityai" - TOGETHERAI = "together_ai" + TOGETHERAI = "togetherai" OPENROUTER = "openrouter" GEMINI = "gemini" @@ -26,7 +26,7 @@ class CustomProviderKind(str, Enum): AZURE = "azure" BEDROCK = "bedrock" SAGEMAKER = "sagemaker" - VERTEX = "vertex_ai" + VERTEX = "vertex" OPENAI = "openai" COHERE = "cohere" ANYSCALE = "anyscale" @@ -36,6 +36,6 @@ class CustomProviderKind(str, Enum): MISTRALAI = "mistralai" ANTHROPIC = "anthropic" PERPLEXITYAI = "perplexityai" - TOGETHERAI = "together_ai" + TOGETHERAI = "togetherai" OPENROUTER = "openrouter" GEMINI = "gemini" diff --git a/api/oss/src/core/secrets/utils.py b/api/oss/src/core/secrets/utils.py index 9edc02035f..8f11471ba7 100644 --- a/api/oss/src/core/secrets/utils.py +++ b/api/oss/src/core/secrets/utils.py @@ -2,7 +2,7 @@ from uuid import UUID from typing import Dict, Any -from oss.src.dbs.postgres.secrets.dao import SecretsDAO +from oss.src.dbs.secrets.dao import SecretsDAO from oss.src.core.secrets.services import VaultService from oss.src.models.api.evaluation_model import LMProvidersEnum @@ -44,20 +44,18 @@ async def get_user_llm_providers_secrets(project_id: str) -> Dict[str, Any]: # 3: convert secrets to readable format readable_secrets = {} for secret in secrets: - kind = secret["data"].get("kind") - provider_slug = kind.value if kind else "" + provider_slug = str(secret["data"].get("kind", "")) secret_name = f"{provider_slug.upper()}_API_KEY" if provider_slug: - provider = secret["data"].get("provider") - readable_secrets[secret_name] = provider.get("key") if provider else None + readable_secrets[secret_name] = secret["data"].get("key") return readable_secrets -async def get_llm_providers_secrets(project_id: str) -> Dict[str, Any]: +async def get_llm_providers_secrets(provider_id: str) -> Dict[str, Any]: """ Fetches LLM providers secrets from system and vault. """ system_llm_secrets = await get_system_llm_providers_secrets() - user_llm_secrets = await get_user_llm_providers_secrets(project_id) + user_llm_secrets = await get_user_llm_providers_secrets(provider_id) return {**system_llm_secrets, **user_llm_secrets} diff --git a/api/oss/src/core/shared/dtos.py b/api/oss/src/core/shared/dtos.py index f56c6b093c..ffbda767ce 100644 --- a/api/oss/src/core/shared/dtos.py +++ b/api/oss/src/core/shared/dtos.py @@ -1,49 +1,160 @@ -from typing import Optional +from typing import Optional, Dict, List, Union, Any +from uuid import UUID +from datetime import datetime + from pydantic import BaseModel +from typing_extensions import TypeAliasType + + +# --- Recursive Named TypeAliases using TypeAliasType --- + + +StringJson: TypeAliasType = TypeAliasType( + "StringJson", + Union[str, Dict[str, "StringJson"]], +) + +FullJson: TypeAliasType = TypeAliasType( + "FullJson", + Union[str, int, float, bool, None, Dict[str, "FullJson"], List["FullJson"]], +) -from agenta.sdk.models.shared import ( - BoolJson, - StringJson, - FullJson, - NumericJson, - NoListJson, - LabelJson, - # - Json, - Data, - Metadata, - Flags, - Tags, - Meta, - Hashes, - Metrics, - Schema, - # - Lifecycle, - Header, - # - TraceID, - SpanID, - Link, - # - Identifier, - Slug, - Version, - Reference, - # - AliasConfig, - sync_alias, - # - Commit, - # - Windowing, +NumericJson: TypeAliasType = TypeAliasType( + "NumericJson", + Union[int, float, List[int], List[float], Dict[str, "NumericJson"]], ) +Json = Dict[str, FullJson] + +Data = Dict[str, FullJson] + +Meta = Dict[str, FullJson] + +Tags = Dict[str, StringJson] + +Metrics = Dict[str, NumericJson] + +Flags = Dict[str, bool] + + +class LifecycleDTO(BaseModel): + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + updated_by_id: Optional[UUID] = None + + class Config: + json_encoders = { + UUID: str, + datetime: lambda v: v.isoformat() if v else None, + } + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + kwargs.setdefault("exclude_none", True) + + return self.encode(super().model_dump(*args, **kwargs)) + + +class Lifecycle(BaseModel): + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + + created_by_id: Optional[UUID] = None + updated_by_id: Optional[UUID] = None + deleted_by_id: Optional[UUID] = None + + class Config: + json_encoders = { + UUID: str, + datetime: lambda v: v.isoformat() if v else None, + } + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + kwargs.setdefault("exclude_none", True) + + return self.encode(super().model_dump(*args, **kwargs)) + + +class Identifier(BaseModel): + id: Optional[UUID] = None + + class Config: + json_encoders = {UUID: str} + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + kwargs.setdefault("exclude_none", True) + + return self.encode(super().model_dump(*args, **kwargs)) + + +class Slug(BaseModel): + slug: Optional[str] = None + + +class Version(BaseModel): + version: Optional[str] = None + + +class Header(BaseModel): + name: Optional[str] = None + description: Optional[str] = None + + +class Reference(BaseModel): + id: Optional[UUID] = None + slug: Optional[str] = None + version: Optional[str] = None + attributes: Optional[Json] = None + + class Config: + json_encoders = {UUID: str} + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + kwargs.setdefault("exclude_none", True) + + return self.encode(super().model_dump(*args, **kwargs)) + -class LegacyLifecycleDTO(BaseModel): - created_at: Optional[str] = None - updated_at: Optional[str] = None - updated_by_id: Optional[str] = None - # DEPRECATING - updated_by: Optional[str] = None # email +References = List[Reference] diff --git a/api/oss/src/core/shared/exceptions.py b/api/oss/src/core/shared/exceptions.py deleted file mode 100644 index fc903492b4..0000000000 --- a/api/oss/src/core/shared/exceptions.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Optional, Dict, Any - - -class EntityCreationConflict(Exception): - """Exception raised when trying to create an entity that already exists.""" - - def __init__( - self, - entity: str = "Entity", - message: str = "{{entity}} with same keys already exists.", - conflict: Optional[Dict[str, Any]] = None, - ): - super().__init__(message) - - self.message = message.replace("{{entity}}", entity) - self.conflict = conflict - - def __str__(self): - _message = self.message - - for key, value in self.conflict.items(): - _message += f" {key}={value}" - - return _message diff --git a/api/oss/src/core/testcases/dtos.py b/api/oss/src/core/testcases/dtos.py index 5ab5063289..1342a1f901 100644 --- a/api/oss/src/core/testcases/dtos.py +++ b/api/oss/src/core/testcases/dtos.py @@ -1,22 +1,5 @@ -from typing import Optional -from uuid import UUID - -from pydantic import Field - from oss.src.core.blobs.dtos import Blob -from oss.src.core.shared.dtos import sync_alias, AliasConfig - - -class TestsetIdAlias(AliasConfig): - testset_id: Optional[UUID] = None - set_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_id", - ) - -class Testcase(Blob, TestsetIdAlias): - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "set_id", self) +class Testcase(Blob): + pass diff --git a/api/oss/src/core/testcases/service.py b/api/oss/src/core/testcases/service.py index 3afd298dd4..6c2847da0d 100644 --- a/api/oss/src/core/testcases/service.py +++ b/api/oss/src/core/testcases/service.py @@ -1,93 +1,618 @@ -from typing import List, Optional +from typing import Optional, List from uuid import UUID -from oss.src.utils.logging import get_module_logger -from oss.src.core.blobs.interfaces import BlobsDAOInterface -from oss.src.core.blobs.dtos import BlobCreate, BlobQuery, Windowing -from oss.src.core.testcases.dtos import Testcase +from oss.src.core.git.interfaces import GitDAOInterface +from oss.src.core.shared.dtos import Reference, Tags +from oss.src.core.workflows.dtos import ( + WorkflowData, + WorkflowFlags, + WorkflowArtifact, + WorkflowVariant, + WorkflowRevision, +) -log = get_module_logger(__name__) - -class TestcasesService: +class WorkflowsService: def __init__( self, *, - testcases_dao: BlobsDAOInterface, + workflows_dao: GitDAOInterface, ): - self.testcases_dao = testcases_dao + self.workflows_dao = workflows_dao + + ## -- artifacts ------------------------------------------------------------ - async def create_testcases( + async def create_artifact( self, *, project_id: UUID, user_id: UUID, # - testcases: List[Testcase], - ) -> List[Testcase]: - blob_creates = [ - BlobCreate( - **testcase.model_dump(mode="json", exclude_none=True), - ) - for testcase in testcases - ] + artifact_slug: str, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + artifact_tags: Optional[Tags] = None, + artifact_flags: Optional[WorkflowFlags] = None, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.create_artifact( + project_id=project_id, + user_id=user_id, + # + artifact_slug=artifact_slug, + artifact_name=artifact_name, + artifact_description=artifact_description, + artifact_tags=artifact_tags, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + ) + + if not artifact: + return None + + artifact = WorkflowArtifact(**artifact.model_dump()) + + return artifact + + async def fetch_artifact( + self, + *, + project_id: UUID, + # + artifact_ref: Reference, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.fetch_artifact( + project_id=project_id, + # + artifact_ref=artifact_ref, + ) + + if not artifact: + return None + + artifact = WorkflowArtifact(**artifact.model_dump()) + + return artifact + + async def edit_artifact( + self, + *, + project_id: UUID, + user_id: UUID, + # + artifact_id: UUID, + artifact_slug: Optional[str] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + artifact_tags: Optional[Tags] = None, + artifact_flags: Optional[WorkflowFlags] = None, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.edit_artifact( + project_id=project_id, + user_id=user_id, + # + artifact_id=artifact_id, + artifact_slug=artifact_slug, + artifact_name=artifact_name, + artifact_description=artifact_description, + artifact_tags=artifact_tags, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + ) + + if not artifact: + return None - blobs = await self.testcases_dao.add_blobs( + artifact = WorkflowArtifact(**artifact.model_dump()) + + return artifact + + async def archive_artifact( + self, + *, + project_id: UUID, + user_id: UUID, + # + artifact_id: UUID, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.archive_artifact( + project_id=project_id, + user_id=user_id, + # + artifact_id=artifact_id, + ) + + if not artifact: + return None + + artifact = WorkflowArtifact(**artifact.model_dump()) + + return artifact + + async def unarchive_artifact( + self, + *, + project_id: UUID, + user_id: UUID, + # + artifact_id: UUID, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.unarchive_artifact( project_id=project_id, user_id=user_id, # - blob_creates=blob_creates, + artifact_id=artifact_id, ) - if not blobs: - return [] + if not artifact: + return None + + artifact = WorkflowArtifact(**artifact.model_dump()) + + return artifact + + async def query_artifacts( + self, + *, + project_id: UUID, + # + artifact_tags: Optional[Tags] = None, + artifact_flags: Optional[WorkflowFlags] = None, + include_archived: Optional[bool] = None, + ) -> List[WorkflowArtifact]: + artifacts = await self.workflows_dao.query_artifacts( + project_id=project_id, + # + artifact_tags=artifact_tags, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + include_archived=include_archived, + ) - _testcases = [ - Testcase( - **blob.model_dump(mode="json"), - ) - for blob in blobs + artifacts = [ + WorkflowArtifact(**artifact.model_dump()) for artifact in artifacts ] - return _testcases + return artifacts + + ## ------------------------------------------------------------------------- + + ## -- variants ------------------------------------------------------------- + + async def create_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + artifact_id: UUID, + variant_slug: str, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + variant_tags: Optional[Tags] = None, + variant_flags: Optional[WorkflowFlags] = None, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.create_variant( + project_id=project_id, + user_id=user_id, + # + artifact_id=artifact_id, + # + variant_slug=variant_slug, + # + variant_name=variant_name, + variant_description=variant_description, + variant_tags=variant_tags, + variant_flags=(variant_flags.model_dump() if variant_flags else None), + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) + + return variant + + async def fetch_variant( + self, + *, + project_id: UUID, + # + artifact_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.fetch_variant( + project_id=project_id, + # + artifact_ref=artifact_ref, + variant_ref=variant_ref, + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) + + return variant + + async def edit_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_id: UUID, + variant_slug: Optional[str] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + variant_tags: Optional[Tags] = None, + variant_flags: Optional[WorkflowFlags] = None, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.edit_variant( + project_id=project_id, + user_id=user_id, + # + variant_id=variant_id, + # + variant_slug=variant_slug, + variant_name=variant_name, + variant_description=variant_description, + variant_tags=variant_tags, + variant_flags=(variant_flags.model_dump() if variant_flags else None), + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) + + return variant + + async def archive_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_id: UUID, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.archive_variant( + project_id=project_id, + user_id=user_id, + # + variant_id=variant_id, + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) + + return variant + + async def unarchive_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_id: UUID, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.unarchive_variant( + project_id=project_id, + user_id=user_id, + # + variant_id=variant_id, + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) + + return variant + + async def query_variants( + self, + *, + project_id: UUID, + # + variant_tags: Optional[Tags] = None, + variant_flags: Optional[WorkflowFlags] = None, + include_archived: Optional[bool] = None, + ) -> List[WorkflowVariant]: + variants = await self.workflows_dao.query_variants( + project_id=project_id, + # + variant_tags=variant_tags, + variant_flags=(variant_flags.model_dump() if variant_flags else None), + include_archived=include_archived, + ) + + variants = [WorkflowVariant(**variant.model_dump()) for variant in variants] + + return variants + + ## ......................................................................... + + async def fork_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_slug: str, + revision_slug: str, + # + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + depth: Optional[int] = None, + # + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + variant_tags: Optional[Tags] = None, + variant_flags: Optional[WorkflowFlags] = None, + # + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_tags: Optional[Tags] = None, + revision_flags: Optional[WorkflowFlags] = None, + revision_message: Optional[str] = None, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.fork_variant( + project_id=project_id, + user_id=user_id, + # + variant_slug=variant_slug, + revision_slug=revision_slug, + # + variant_id=variant_id, + revision_id=revision_id, + depth=depth, + # + variant_name=variant_name, + variant_description=variant_description, + variant_tags=variant_tags, + variant_flags=(variant_flags.model_dump() if variant_flags else None), + # + revision_name=revision_name, + revision_description=revision_description, + revision_tags=revision_tags, + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_message=revision_message, + ) + + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) - async def fetch_testcases( + return variant + + ## ------------------------------------------------------------------------- + + ## -- revisions ------------------------------------------------------------ + + async def create_revision( self, *, project_id: UUID, + user_id: UUID, # - testcase_ids: Optional[List[UUID]] = None, + variant_id: UUID, # - testset_id: Optional[UUID] = None, + revision_slug: str, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_tags: Optional[Tags] = None, + revision_flags: Optional[WorkflowFlags] = None, + revision_message: Optional[str] = None, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.create_revision( + project_id=project_id, + user_id=user_id, + # + variant_id=variant_id, + # + revision_slug=revision_slug, + revision_name=revision_name, + revision_description=revision_description, + revision_tags=revision_tags, + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_message=revision_message, + ) + + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def fetch_revision( + self, + *, + project_id: UUID, # - windowing: Optional[Windowing] = None, - ) -> List[Testcase]: - _blob_query = ( - BlobQuery( - set_ids=[testset_id] if testset_id else None, - blob_ids=testcase_ids if testcase_ids else None, - ) - if testcase_ids or testset_id - else BlobQuery() + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.fetch_revision( + project_id=project_id, + # + variant_ref=variant_ref, + revision_ref=revision_ref, ) - blobs = await self.testcases_dao.query_blobs( + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def edit_revision( + self, + *, + project_id: UUID, + user_id: UUID, + # + revision_id: UUID, + # + revision_slug: Optional[str] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_tags: Optional[Tags] = None, + revision_flags: Optional[WorkflowFlags] = None, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.edit_revision( project_id=project_id, + user_id=user_id, # - blob_query=_blob_query, + revision_id=revision_id, # - windowing=windowing, + revision_slug=revision_slug, + revision_name=revision_name, + revision_description=revision_description, + revision_tags=revision_tags, + revision_flags=(revision_flags.model_dump() if revision_flags else None), ) - if not blobs: - return [] + if not revision: + return None - _testcases = [ - Testcase( - **blob.model_dump(mode="json"), - ) - for blob in blobs + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def archive_revision( + self, + *, + project_id: UUID, + user_id: UUID, + # + revision_id: UUID, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.archive_revision( + project_id=project_id, + user_id=user_id, + # + revision_id=revision_id, + ) + + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def unarchive_revision( + self, + *, + project_id: UUID, + user_id: UUID, + # + revision_id: UUID, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.unarchive_revision( + project_id=project_id, + user_id=user_id, + # + revision_id=revision_id, + ) + + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def query_revisions( + self, + *, + project_id: UUID, + # + revision_tags: Optional[Tags] = None, + revision_flags: Optional[WorkflowFlags] = None, + include_archived: Optional[bool] = None, + ) -> List[WorkflowRevision]: + revisions = await self.workflows_dao.query_revisions( + project_id=project_id, + # + # + revision_tags=revision_tags, + revision_flags=(revision_flags.model_dump() if revision_flags else None), + include_archived=include_archived, + ) + + revisions = [ + WorkflowRevision(**revision.model_dump()) for revision in revisions ] - return _testcases + return revisions + + ## ......................................................................... + + async def commit_revision( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_id: UUID, + # + revision_slug: str, + # + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_tags: Optional[Tags] = None, + revision_flags: Optional[WorkflowFlags] = None, + revision_message: Optional[str] = None, + revision_data: Optional[WorkflowData] = None, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.commit_revision( + project_id=project_id, + user_id=user_id, + # + variant_id=variant_id, + # + revision_slug=revision_slug, + # + revision_name=revision_name, + revision_description=revision_description, + revision_tags=revision_tags, + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_message=revision_message, + revision_data=(revision_data.model_dump() if revision_data else None), + ) + + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) + + return revision + + async def log_revisions( + self, + *, + project_id: UUID, + # + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + depth: Optional[int] = None, + ) -> List[WorkflowRevision]: + revisions = await self.workflows_dao.log_revisions( + project_id=project_id, + # + variant_ref=variant_ref, + revision_ref=revision_ref, + depth=depth, + ) + + revisions = [ + WorkflowRevision(**revision.model_dump()) for revision in revisions + ] + + return revisions + + ## ------------------------------------------------------------------------- diff --git a/api/oss/src/core/testsets/dtos.py b/api/oss/src/core/testsets/dtos.py index df0915f2b2..a44656932a 100644 --- a/api/oss/src/core/testsets/dtos.py +++ b/api/oss/src/core/testsets/dtos.py @@ -1,204 +1,73 @@ -from typing import Optional, List, Dict +from typing import Optional, List, Dict, Any from uuid import UUID -from pydantic import BaseModel, Field - -from oss.src.core.shared.dtos import ( - sync_alias, - AliasConfig, -) -from oss.src.core.shared.dtos import ( - Identifier, - Slug, - Lifecycle, - Header, - Metadata, -) -from oss.src.core.git.dtos import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - # - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - # - Revision, - RevisionsLog, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, -) -from oss.src.core.testcases.dtos import ( - Testcase, -) - - -class TestsetIdAlias(AliasConfig): - testset_id: Optional[UUID] = None - artifact_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_id", - ) - - -class TestsetVariantIdAlias(AliasConfig): - testset_variant_id: Optional[UUID] = None - variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_variant_id", - ) - - -class TestsetRevisionIdAlias(AliasConfig): - testset_revision_id: Optional[UUID] = None - revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_revision_id", - ) - - -class TestsetLog( - RevisionsLog, - TestsetVariantIdAlias, - TestsetRevisionIdAlias, -): - testset_variant_id: Optional[UUID] = None - - def model_post_init(self, _context) -> None: - sync_alias("testset_variant_id", "variant_id", self) - sync_alias("testset_revision_id", "revision_id", self) +from pydantic import BaseModel +from oss.src.core.shared.dtos import Tags, Data +from oss.src.core.git.dtos import Artifact, Variant, Revision +from oss.src.core.tracing.dtos import Link +from oss.src.core.blobs.dtos import Blob -class TestsetFlags(BaseModel): - has_testcases: Optional[bool] = None - has_traces: Optional[bool] = None - - -class Testset(Artifact): - flags: Optional[TestsetFlags] = None - - -class TestsetCreate(ArtifactCreate): - flags: Optional[TestsetFlags] = None - - -class TestsetEdit(ArtifactEdit): - flags: Optional[TestsetFlags] = None +class Testcase(Blob): + pass -class TestsetQuery(ArtifactQuery): - flags: Optional[TestsetFlags] = None - - -class TestsetVariant( - Variant, - TestsetIdAlias, -): - flags: Optional[TestsetFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) +class TestsetData(BaseModel): + testcase_ids: Optional[List[UUID]] = None + testcases: Optional[List[Data]] = None + links: Optional[List[Link]] = None + mapping: Optional[Dict[str, str]] = None -class TestsetVariantCreate( - VariantCreate, - TestsetIdAlias, -): - flags: Optional[TestsetFlags] = None + class Config: + json_encoders = {UUID: str} - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + def model_dump(self, *args, **kwargs) -> dict: + kwargs.setdefault("exclude_none", True) -class TestsetVariantEdit(VariantEdit): - flags: Optional[TestsetFlags] = None + return self.encode(super().model_dump(*args, **kwargs)) -class TestsetVariantQuery(VariantQuery): - flags: Optional[TestsetFlags] = None - - -class TestsetRevisionData(BaseModel): - testcase_ids: Optional[List[UUID]] = None - testcases: Optional[List[Testcase]] = None - - # trace_ids: Optional[List[str]] = None - # traces: Optional[List[Link]] = None - # mappings: Optional[Dict[str, str]] = None +class TestsetFlags(BaseModel): + has_testcases: bool = False + has_links: bool = False -class TestsetRevision( - Revision, - TestsetIdAlias, - TestsetVariantIdAlias, -): +class TestsetArtifact(Artifact): flags: Optional[TestsetFlags] = None - data: Optional[TestsetRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) - sync_alias("testset_variant_id", "variant_id", self) - -class TestsetRevisionCreate( - RevisionCreate, - TestsetIdAlias, - TestsetVariantIdAlias, -): +class TestsetVariant(Variant): flags: Optional[TestsetFlags] = None - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) - sync_alias("testset_variant_id", "variant_id", self) + artifact_id: Optional[UUID] = None + artifact: Optional[TestsetArtifact] = None -class TestsetRevisionEdit(RevisionEdit): +class TestsetRevision(Revision): + data: Optional[TestsetData] = None flags: Optional[TestsetFlags] = None + variant_id: Optional[UUID] = None + variant: Optional[TestsetVariant] = None -class TestsetRevisionQuery(RevisionQuery): - flags: Optional[TestsetFlags] = None +class TestsetQuery(BaseModel): + artifact_ref: Optional[TestsetArtifact] = None + variant_ref: Optional[TestsetVariant] = None + revision_ref: Optional[TestsetRevision] = None -class TestsetRevisionCommit( - RevisionCommit, - TestsetIdAlias, - TestsetVariantIdAlias, -): + tags: Optional[Tags] = None flags: Optional[TestsetFlags] = None - data: Optional[TestsetRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) - sync_alias("testset_variant_id", "variant_id", self) - - -class SimpleTestset(Identifier, Slug, Lifecycle, Header, Metadata): - flags: Optional[TestsetFlags] = None # type: ignore - - data: Optional[TestsetRevisionData] = None - - -class SimpleTestsetCreate(Slug, Header, Metadata): - flags: Optional[TestsetFlags] = None # type: ignore - - data: Optional[TestsetRevisionData] = None - - -class SimpleTestsetEdit(Identifier, Header, Metadata): - flags: Optional[TestsetFlags] = None # type: ignore - - data: Optional[TestsetRevisionData] = None - - -class SimpleTestsetQuery(Metadata): - flags: Optional[TestsetFlags] = None # type: ignore + include_archived: Optional[bool] = None diff --git a/api/oss/src/core/testsets/service.py b/api/oss/src/core/testsets/service.py index 0d34def73d..daf0e05834 100644 --- a/api/oss/src/core/testsets/service.py +++ b/api/oss/src/core/testsets/service.py @@ -1,65 +1,17 @@ from typing import Optional, List -from uuid import UUID, uuid4 +from uuid import UUID from oss.src.utils.logging import get_module_logger from oss.src.core.git.interfaces import GitDAOInterface -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.shared.dtos import Reference, Windowing -from oss.src.core.git.dtos import ( - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - # - VariantCreate, - VariantEdit, - VariantQuery, - VariantFork, - # - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, -) -from oss.src.models.db_models import TestsetDB -from oss.src.core.testcases.dtos import Testcase -from oss.src.services.db_manager import fetch_testset_by_id -from oss.src.utils.helpers import get_slug_from_name_and_id -from oss.src.apis.fastapi.testsets.models import ( - SimpleTestset, - SimpleTestsetCreate, - SimpleTestsetEdit, - # - SimpleTestsetCreateRequest, - SimpleTestsetEditRequest, -) +from oss.src.core.blobs.interfaces import BlobDAOInterface +from oss.src.core.shared.dtos import Reference, Tags, Data +from oss.src.core.blobs.dtos import Blob from oss.src.core.testsets.dtos import ( - Testset, - TestsetCreate, - TestsetEdit, - TestsetQuery, - TestsetLog, - # + TestsetData, + TestsetFlags, + TestsetArtifact, TestsetVariant, - TestsetVariantCreate, - TestsetVariantEdit, - TestsetVariantQuery, - # TestsetRevision, - TestsetRevisionData, - TestsetRevisionCreate, - TestsetRevisionEdit, - TestsetRevisionQuery, - TestsetRevisionCommit, -) -from oss.src.apis.fastapi.testsets.utils import ( - csv_file_to_json_array, - json_file_to_json_array, - json_array_to_json_object, - json_array_to_csv_file, - json_array_to_json_file, - validate_testset_limits, - TESTSETS_SIZE_EXCEPTION, - TESTSETS_SIZE_LIMIT, ) log = get_module_logger(__name__) @@ -69,1203 +21,745 @@ class TestsetsService: def __init__( self, *, - testsets_dao: GitDAOInterface, - testcases_service: TestcasesService, + git_dao: GitDAOInterface, + blobs_dao: BlobDAOInterface, ): - self.testsets_dao = testsets_dao - self.testcases_service = testcases_service + self.git_dao = git_dao + self.blobs_dao = blobs_dao - ## -- testset -------------------------------------------------------------- + ## -- artifacts ------------------------------------------------------------ - async def create_testset( + async def create_artifact( self, *, project_id: UUID, user_id: UUID, # - testset_create: TestsetCreate, + artifact_slug: str, # - testset_id: Optional[UUID] = None, - ) -> Optional[Testset]: - artifact_create = ArtifactCreate( - **testset_create.model_dump( - mode="json", - ), - ) - - artifact = await self.testsets_dao.create_artifact( + artifact_flags: Optional[TestsetFlags] = None, + artifact_meta: Optional[Tags] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + ) -> Optional[TestsetArtifact]: + artifact = await self.git_dao.create_artifact( project_id=project_id, user_id=user_id, # - artifact_create=artifact_create, + artifact_slug=artifact_slug, # - artifact_id=testset_id, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + artifact_meta=artifact_meta, + artifact_name=artifact_name, + artifact_description=artifact_description, ) if not artifact: return None - testset = Testset( - **artifact.model_dump( - mode="json", - ), - ) + artifact = TestsetArtifact(**artifact.model_dump()) - return testset + return artifact - async def fetch_testset( + async def fetch_artifact( self, *, project_id: UUID, # - testset_ref: Reference, - ) -> Optional[Testset]: - artifact = await self.testsets_dao.fetch_artifact( + artifact_ref: Reference, + ) -> Optional[TestsetArtifact]: + artifact = await self.git_dao.fetch_artifact( project_id=project_id, # - artifact_ref=testset_ref, + artifact_ref=artifact_ref, ) if not artifact: return None - testset = Testset( - **artifact.model_dump( - mode="json", - ), - ) + artifact = TestsetArtifact(**artifact.model_dump()) - return testset + return artifact - async def edit_testset( + async def edit_artifact( self, *, project_id: UUID, user_id: UUID, # - testset_edit: TestsetEdit, - ) -> Optional[Testset]: - artifact_edit = ArtifactEdit( - **testset_edit.model_dump( - mode="json", - ), - ) - - artifact = await self.testsets_dao.edit_artifact( + artifact_id: UUID, + # + artifact_flags: Optional[TestsetFlags] = None, + artifact_meta: Optional[Tags] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + ) -> Optional[TestsetArtifact]: + artifact = await self.git_dao.edit_artifact( project_id=project_id, user_id=user_id, # - artifact_edit=artifact_edit, + artifact_id=artifact_id, + # + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + artifact_meta=artifact_meta, + artifact_name=artifact_name, + artifact_description=artifact_description, ) if not artifact: return None - testset = Testset( - **artifact.model_dump( - mode="json", - ), - ) + artifact = TestsetArtifact(**artifact.model_dump()) - return testset + return artifact - async def archive_testset( + async def archive_artifact( self, *, project_id: UUID, user_id: UUID, # - testset_id: UUID, - ) -> Optional[Testset]: - artifact = await self.testsets_dao.archive_artifact( + artifact_id: UUID, + ) -> Optional[TestsetArtifact]: + artifact = await self.git_dao.archive_artifact( project_id=project_id, user_id=user_id, # - artifact_id=testset_id, + artifact_id=artifact_id, ) if not artifact: return None - testset = Testset( - **artifact.model_dump( - mode="json", - ), - ) + artifact = TestsetArtifact(**artifact.model_dump()) - return testset + return artifact - async def unarchive_testset( + async def unarchive_artifact( self, *, project_id: UUID, user_id: UUID, # - testset_id: UUID, - ) -> Optional[Testset]: - artifact = await self.testsets_dao.unarchive_artifact( + artifact_id: UUID, + ) -> Optional[TestsetArtifact]: + artifact = await self.git_dao.unarchive_artifact( project_id=project_id, user_id=user_id, # - artifact_id=testset_id, + artifact_id=artifact_id, ) if not artifact: return None - testset = Testset( - **artifact.model_dump( - mode="json", - ), - ) + artifact = TestsetArtifact(**artifact.model_dump()) - return testset + return artifact - async def query_testsets( + async def query_artifacts( self, *, project_id: UUID, # - testset_query: Optional[TestsetQuery] = None, - # - testset_refs: Optional[List[Reference]] = None, + artifact_flags: Optional[TestsetFlags] = None, + artifact_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Testset]: - artifact_query = ( - ArtifactQuery( - **testset_query.model_dump( - mode="json", - ), - ) - if testset_query - else ArtifactQuery() - ) - - artifacts = await self.testsets_dao.query_artifacts( + ) -> List[TestsetArtifact]: + artifacts = await self.git_dao.query_artifacts( project_id=project_id, # - artifact_query=artifact_query, - # - artifact_refs=testset_refs, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + artifact_meta=artifact_meta, # include_archived=include_archived, - # - windowing=windowing, ) - testsets = [ - Testset( - **artifact.model_dump( - mode="json", - ), - ) - for artifact in artifacts - ] + artifacts = [TestsetArtifact(**artifact.model_dump()) for artifact in artifacts] - return testsets + return artifacts ## ------------------------------------------------------------------------- ## -- variants ------------------------------------------------------------- - async def create_testset_variant( + async def create_variant( self, *, project_id: UUID, user_id: UUID, # - testset_variant_create: TestsetVariantCreate, + artifact_id: UUID, + # + variant_slug: str, + # + variant_flags: Optional[TestsetFlags] = None, + variant_meta: Optional[Tags] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[TestsetVariant]: - variant_create = VariantCreate( - **testset_variant_create.model_dump( - mode="json", - ), - ) - - variant = await self.testsets_dao.create_variant( + variant = await self.git_dao.create_variant( project_id=project_id, user_id=user_id, # - variant_create=variant_create, + artifact_id=artifact_id, + # + variant_slug=variant_slug, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name, + variant_description=variant_description, ) if not variant: return None - testset_variant = TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) + variant = TestsetVariant(**variant.model_dump()) - return testset_variant + return variant - async def fetch_testset_variant( + async def fetch_variant( self, *, project_id: UUID, # - testset_ref: Optional[Reference] = None, - testset_variant_ref: Optional[Reference] = None, + artifact_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, ) -> Optional[TestsetVariant]: - variant = await self.testsets_dao.fetch_variant( + variant = await self.git_dao.fetch_variant( project_id=project_id, # - artifact_ref=testset_ref, - variant_ref=testset_variant_ref, + artifact_ref=artifact_ref, + variant_ref=variant_ref, ) if not variant: return None - testset_variant = TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) + variant = TestsetVariant(**variant.model_dump()) - return testset_variant + return variant - async def edit_testset_variant( + async def edit_variant( self, *, project_id: UUID, user_id: UUID, # - testset_variant_edit: TestsetVariantEdit, + variant_id: UUID, + # + variant_flags: Optional[TestsetFlags] = None, + variant_meta: Optional[Tags] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[TestsetVariant]: - variant_edit = VariantEdit( - **testset_variant_edit.model_dump( - mode="json", - ), - ) - - variant = await self.testsets_dao.edit_variant( + variant = await self.git_dao.edit_variant( project_id=project_id, user_id=user_id, # - variant_edit=variant_edit, + variant_id=variant_id, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name, + variant_description=variant_description, ) if not variant: return None - testset_variant = TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) + variant = TestsetVariant(**variant.model_dump()) - return testset_variant + return variant - async def archive_testset_variant( + async def archive_variant( self, *, project_id: UUID, user_id: UUID, # - testset_variant_id: UUID, + variant_id: UUID, ) -> Optional[TestsetVariant]: - variant = await self.testsets_dao.archive_variant( + variant = await self.git_dao.archive_variant( project_id=project_id, user_id=user_id, # - variant_id=testset_variant_id, + variant_id=variant_id, ) if not variant: return None - testset_variant = TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) + variant = TestsetVariant(**variant.model_dump()) - return testset_variant + return variant - async def unarchive_testset_variant( + async def unarchive_variant( self, *, project_id: UUID, user_id: UUID, # - testset_variant_id: UUID, + variant_id: UUID, ) -> Optional[TestsetVariant]: - variant = await self.testsets_dao.unarchive_variant( + variant = await self.git_dao.unarchive_variant( project_id=project_id, user_id=user_id, # - variant_id=testset_variant_id, + variant_id=variant_id, ) if not variant: return None - testset_variant = TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) + variant = TestsetVariant(**variant.model_dump()) - return testset_variant + return variant async def query_variants( self, *, project_id: UUID, # - testset_variant_query: Optional[TestsetVariantQuery] = None, + variant_flags: Optional[TestsetFlags] = None, + variant_meta: Optional[Tags] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[TestsetVariant]: - variant_query = ( - VariantQuery( - **testset_variant_query.model_dump( - mode="json", - ), - ) - if testset_variant_query - else VariantQuery() + variants = await self.git_dao.query_variants( + project_id=project_id, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + # + include_archived=include_archived, ) - variants = await self.testsets_dao.query_variants( + variants = [TestsetVariant(**variant.model_dump()) for variant in variants] + + return variants + + ## ......................................................................... + + async def fork_variant( + self, + *, + project_id: UUID, + user_id: UUID, + # + variant_slug: str, + revision_slug: str, + # + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + depth: Optional[int] = None, + # + variant_flags: Optional[TestsetFlags] = None, + variant_meta: Optional[Tags] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + # + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, + ) -> Optional[TestsetVariant]: + variant = await self.git_dao.fork_variant( project_id=project_id, + user_id=user_id, # - variant_query=variant_query, + variant_slug=variant_slug, + revision_slug=revision_slug, # - include_archived=include_archived, + variant_id=variant_id, + revision_id=revision_id, + depth=depth, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name, + variant_description=variant_description, # - windowing=windowing, + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name, + revision_description=revision_description, + revision_message=revision_message, ) - testset_variants = [ - TestsetVariant( - **variant.model_dump( - mode="json", - ), - ) - for variant in variants - ] + if not variant: + return None + + variant = TestsetVariant(**variant.model_dump()) - return testset_variants + return variant ## ------------------------------------------------------------------------- ## -- revisions ------------------------------------------------------------ - async def create_testset_revision( + async def create_revision( self, *, project_id: UUID, user_id: UUID, # - testset_revision_create: TestsetRevisionCreate, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[TestsetRevision]: - revision_create = RevisionCreate( - **testset_revision_create.model_dump( - mode="json", - ), - ) - - revision = await self.testsets_dao.create_revision( + revision = await self.git_dao.create_revision( project_id=project_id, user_id=user_id, # - revision_create=revision_create, + variant_id=variant_id, + # + revision_slug=revision_slug, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name if revision_name else revision_slug, + revision_description=revision_description, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + revision = TestsetRevision(**revision.model_dump()) - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( - project_id=project_id, - # - testcase_ids=testset_revision.data.testcase_ids, - ) - - return testset_revision + return revision - async def fetch_testset_revision( + async def fetch_revision( self, *, project_id: UUID, # - testset_ref: Optional[Reference] = None, - testset_variant_ref: Optional[Reference] = None, - testset_revision_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, ) -> Optional[TestsetRevision]: - if not testset_ref and not testset_variant_ref and not testset_revision_ref: - return None - - if testset_ref and not testset_variant_ref and not testset_revision_ref: - testset = await self.fetch_testset( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if not testset: - return None - - testset_ref = Reference( - id=testset.id, - slug=testset.slug, - ) - - testset_variant = await self.fetch_testset_variant( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if not testset_variant: - return None - - testset_variant_ref = Reference( - id=testset_variant.id, - slug=testset_variant.slug, - ) - - revision = await self.testsets_dao.fetch_revision( + revision = await self.git_dao.fetch_revision( project_id=project_id, # - variant_ref=testset_variant_ref, - revision_ref=testset_revision_ref, + variant_ref=variant_ref, + revision_ref=revision_ref, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + if revision.data: + testcase_ids = revision.data.get("testcase_ids") - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( + testcases = await self.load_testcases( project_id=project_id, # - testcase_ids=testset_revision.data.testcase_ids, + testcase_ids=testcase_ids, + ) + + revision.data = TestsetData( + testcases=testcases, ) - return testset_revision + revision = TestsetRevision(**revision.model_dump()) + + return revision - async def edit_testset_revision( + async def edit_revision( self, *, project_id: UUID, user_id: UUID, # - testset_revision_edit: TestsetRevisionEdit, + revision_id: UUID, + # + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[TestsetRevision]: - revision_edit = TestsetRevisionEdit( - **testset_revision_edit.model_dump( - mode="json", - ), - ) - - revision = await self.testsets_dao.edit_revision( + revision = await self.git_dao.edit_revision( project_id=project_id, user_id=user_id, # - revision_edit=revision_edit, + revision_id=revision_id, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name, + revision_description=revision_description, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) - - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( - project_id=project_id, - # - testcase_ids=testset_revision.data.testcase_ids, - ) + revision = TestsetRevision(**revision.model_dump()) - return testset_revision + return revision - async def archive_testset_revision( + async def archive_revision( self, *, project_id: UUID, user_id: UUID, # - testset_revision_id: UUID, + revision_id: UUID, ) -> Optional[TestsetRevision]: - revision = await self.testsets_dao.archive_revision( + revision = await self.git_dao.archive_revision( project_id=project_id, user_id=user_id, # - revision_id=testset_revision_id, + revision_id=revision_id, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + revision = TestsetRevision(**revision.model_dump()) - return testset_revision + return revision - async def unarchive_testset_revision( + async def unarchive_revision( self, *, project_id: UUID, user_id: UUID, # - testset_revision_id: UUID, + revision_id: UUID, ) -> Optional[TestsetRevision]: - revision = await self.testsets_dao.unarchive_revision( + revision = await self.git_dao.unarchive_revision( project_id=project_id, user_id=user_id, # - revision_id=testset_revision_id, + revision_id=revision_id, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + revision = TestsetRevision(**revision.model_dump()) - return testset_revision + return revision - async def query_testset_revisions( + async def query_revisions( self, *, project_id: UUID, # - testset_revision_query: Optional[TestsetRevisionQuery], + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, + # + include_archived: Optional[bool] = None, ) -> List[TestsetRevision]: - revision_query = ( - RevisionQuery( - **testset_revision_query.model_dump( - mode="json", - ), - ) - if testset_revision_query - else RevisionQuery() - ) - - revisions = await self.testsets_dao.query_revisions( + revisions = await self.git_dao.query_revisions( project_id=project_id, # - revision_query=revision_query, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + # + include_archived=include_archived, ) - if not revisions: - return [] - - testset_revisions = [] + revisions = [TestsetRevision(**revision.model_dump()) for revision in revisions] for revision in revisions: - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + if revision.data: + testcase_ids = revision.data.get("testcase_ids") - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( + testcases = await self.load_testcases( project_id=project_id, # - testcase_ids=testset_revision.data.testcase_ids, + testcase_ids=testcase_ids, + ) + revision.data = TestsetData( + testcases=testcases, ) - testset_revisions.append(testset_revision) - - return testset_revisions + return revisions ## ......................................................................... - async def commit_testset_revision( + async def commit_revision( self, *, project_id: UUID, user_id: UUID, # - testset_revision_commit: TestsetRevisionCommit, + # artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[TestsetFlags] = None, + revision_meta: Optional[Tags] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, + revision_data: Optional[TestsetData] = None, ) -> Optional[TestsetRevision]: - if testset_revision_commit.data and testset_revision_commit.data.testcases: - if testset_revision_commit.data.testcases: - for testcase in testset_revision_commit.data.testcases: - testcase.set_id = testset_revision_commit.testset_id + variant = await self.git_dao.fetch_variant( + project_id=project_id, + # + variant_ref=Reference(id=variant_id), + ) + + if not variant: + return None + + testset_data = None - testcases = await self.testcases_service.create_testcases( + if revision_data and revision_data.testcases: + testcases = revision_data.testcases + + testcase_ids = await self.save_testcases( project_id=project_id, - user_id=user_id, # - testcases=testset_revision_commit.data.testcases, + testset_id=variant.artifact_id, + # + testcases=testcases, ) - testset_revision_commit.data.testcase_ids = [ - testcase.id for testcase in testcases - ] - - testset_revision_commit.data.testcases = None - - revision_commit = RevisionCommit( - **testset_revision_commit.model_dump(mode="json", exclude_none=True), - ) + testset_data = TestsetData( + testcase_ids=testcase_ids, + ) - revision = await self.testsets_dao.commit_revision( + revision = await self.git_dao.commit_revision( project_id=project_id, user_id=user_id, # - revision_commit=revision_commit, + artifact_id=variant.artifact_id, + variant_id=variant_id, + # + revision_slug=revision_slug, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name, + revision_description=revision_description, + revision_message=revision_message, + revision_data=testset_data.model_dump() if testset_data else None, ) if not revision: return None - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + if revision.data: + testcase_ids = revision.data.get("testcase_ids") - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( + testcases = await self.load_testcases( project_id=project_id, # - testcase_ids=testset_revision.data.testcase_ids, + testcase_ids=testcase_ids, + ) + + revision.data = TestsetData( + testcases=testcases, ) - return testset_revision + revision = TestsetRevision(**revision.model_dump()) + + return revision - async def log_testset_revisions( + async def log_revisions( self, *, project_id: UUID, # - testset_log: TestsetLog, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, depth: Optional[int] = None, ) -> List[TestsetRevision]: - revisions = await self.testsets_dao.log_revisions( + revisions = await self.git_dao.log_revisions( project_id=project_id, # - revisions_log=testset_log, + variant_ref=variant_ref, + revision_ref=revision_ref, + depth=depth, ) - if not revisions: - return [] - - testset_revisions = [] + revisions = [TestsetRevision(**revision.model_dump()) for revision in revisions] for revision in revisions: - testset_revision = TestsetRevision( - **revision.model_dump( - mode="json", - ), - ) + if revision.data: + testcase_ids = revision.data.get("testcase_ids") - if testset_revision.data and testset_revision.data.testcase_ids: - testset_revision.data.testcases = await self.testcases_service.fetch_testcases( + testcases = await self.load_testcases( project_id=project_id, # - testcase_ids=testset_revision.data.testcase_ids, + testcase_ids=testcase_ids, + ) + revision.data = TestsetData( + testcases=testcases, ) - testset_revisions.append(testset_revision) - - return testset_revisions + return revisions ## ------------------------------------------------------------------------- + ## -- testcases ------------------------------------------------------------ -class SimpleTestsetsService: - def __init__( - self, - *, - testsets_service: TestsetsService, - ): - self.testsets_service = testsets_service - - async def create( + async def save_testcases( self, *, project_id: UUID, - user_id: UUID, # - simple_testset_create_request: SimpleTestsetCreateRequest, + testset_id: UUID, # - testset_id: Optional[UUID] = None, - ): - try: - testcases = simple_testset_create_request.testset.data.testcases - - testcases_data = [testcase.data for testcase in testcases] - - testcases_data = json_array_to_json_object( - data=testcases_data, + testcases: List[Data], + ) -> List[UUID]: + blobs = [ + Blob( + data=testcase, + set_id=testset_id, ) + for testcase in testcases + ] - validate_testset_limits(testcases_data) - - for i, testcase_data in enumerate(testcases_data.values()): - simple_testset_create_request.testset.data.testcases[ - i - ].data = testcase_data - - except Exception as e: - return None - - try: - testset_revision_data = TestsetRevisionData( - testcases=simple_testset_create_request.testset.data.testcases, - ) - - except Exception as e: - return None - - testset_create = TestsetCreate( - slug=simple_testset_create_request.testset.slug, - # - name=simple_testset_create_request.testset.name, - description=simple_testset_create_request.testset.description, - # - # flags = - tags=simple_testset_create_request.testset.tags, - meta=simple_testset_create_request.testset.meta, - ) - - testset: Optional[Testset] = await self.testsets_service.create_testset( - project_id=project_id, - user_id=user_id, - # - testset_create=testset_create, - # - testset_id=testset_id, - ) - - if testset is None: - return None - - testset_variant_slug = uuid4().hex[-12:] - - testset_variant_create = TestsetVariantCreate( - slug=testset_variant_slug, - # - name=simple_testset_create_request.testset.name, - description=simple_testset_create_request.testset.description, - # - # flags = - tags=simple_testset_create_request.testset.tags, - meta=simple_testset_create_request.testset.meta, - # - testset_id=testset.id, - ) - - testset_variant: Optional[ - TestsetVariant - ] = await self.testsets_service.create_testset_variant( - project_id=project_id, - user_id=user_id, - # - testset_variant_create=testset_variant_create, - ) - - if testset_variant is None: - return None - - testset_revision_slug = uuid4().hex[-12:] - - testset_revision_create = TestsetRevisionCreate( - slug=testset_revision_slug, - # - name=simple_testset_create_request.testset.name, - description=simple_testset_create_request.testset.description, - # - # flags = - tags=simple_testset_create_request.testset.tags, - meta=simple_testset_create_request.testset.meta, - # - testset_id=testset.id, - testset_variant_id=testset_variant.id, - ) - - testset_revision: Optional[ - TestsetRevision - ] = await self.testsets_service.create_testset_revision( - project_id=project_id, - user_id=user_id, - # - testset_revision_create=testset_revision_create, - ) - - if testset_revision is None: - return None - - testset_revision_slug = uuid4().hex[-12:] - - testset_revision_commit = TestsetRevisionCommit( - slug=testset_revision_slug, - # - name=simple_testset_create_request.testset.name, - description=simple_testset_create_request.testset.description, - # - # flags = - tags=simple_testset_create_request.testset.tags, - meta=simple_testset_create_request.testset.meta, - # - data=testset_revision_data, - # - testset_id=testset.id, - testset_variant_id=testset_variant.id, - ) - - testset_revision = await self.testsets_service.commit_testset_revision( + testcase_blobs = await self.blobs_dao.add_blobs( project_id=project_id, - user_id=user_id, # - testset_revision_commit=testset_revision_commit, + blobs=blobs, ) - if testset_revision is None: - return None + if not testcase_blobs: + return [] - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, - # - name=testset.name, - description=testset.description, - # - # flags = - tags=testset.tags, - meta=testset.meta, - # - data=testset_revision.data, - ) + testcase_ids = [testcase_blob.id for testcase_blob in testcase_blobs] - return simple_testset + return testcase_ids - async def edit( + async def load_testcases( self, *, project_id: UUID, - user_id: UUID, # - simple_testset_edit_request: SimpleTestsetEditRequest, - ) -> Optional[SimpleTestset]: - try: - testcases = simple_testset_edit_request.testset.data.testcases - - testcases_data = [testcase.data for testcase in testcases] - - testcases_data = json_array_to_json_object( - data=testcases_data, - ) - - validate_testset_limits(testcases_data) - - for i, testcase_data in enumerate(testcases_data.values()): - simple_testset_edit_request.testset.data.testcases[ - i - ].data = testcase_data - - except Exception as e: - return None - - try: - testset_revision_data = TestsetRevisionData( - testcases=testcases, - ) - - except Exception as e: - return None - - testset_ref = Reference( - id=simple_testset_edit_request.testset.id, - ) - - testset: Optional[Testset] = await self.testsets_service.fetch_testset( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if testset is None: - return None - - has_changes = ( - testset.name != simple_testset_edit_request.testset.name - or testset.description != simple_testset_edit_request.testset.description - or testset.tags != simple_testset_edit_request.testset.tags - or testset.meta != simple_testset_edit_request.testset.meta - ) - - if has_changes: - testset_edit = TestsetEdit( - id=testset.id, - # - name=simple_testset_edit_request.testset.name, - description=simple_testset_edit_request.testset.description, - # - # flags = - tags=simple_testset_edit_request.testset.tags, - meta=simple_testset_edit_request.testset.meta, - ) - - testset: Optional[Testset] = await self.testsets_service.edit_testset( # type: ignore - project_id=project_id, - user_id=user_id, - # - testset_edit=testset_edit, - ) - - if testset is None: - return None - - testset_variant: Optional[ - TestsetVariant - ] = await self.testsets_service.fetch_testset_variant( - project_id=project_id, - # - testset_ref=testset_ref, - ) - - if testset_variant is None: - return None - - has_changes = ( - testset_variant.name != simple_testset_edit_request.testset.name - or testset_variant.description - != simple_testset_edit_request.testset.description - or testset_variant.tags != simple_testset_edit_request.testset.tags - or testset_variant.meta != simple_testset_edit_request.testset.meta - ) - - if has_changes: - testset_variant_edit = TestsetVariant( - id=testset_variant.id, - # - name=simple_testset_edit_request.testset.name, - description=simple_testset_edit_request.testset.description, - # - # flags = - tags=simple_testset_edit_request.testset.tags, - meta=simple_testset_edit_request.testset.meta, - ) - - testset_variant: Optional[TestsetVariant] = ( # type: ignore - await self.testsets_service.edit_testset_variant( - project_id=project_id, - user_id=user_id, - # - testset_variant_edit=testset_variant_edit, - ) - ) - - if testset_variant is None: - return None - - testset_variant_ref = Reference( - id=testset_variant.id, - ) - - testset_revision: Optional[ - TestsetRevision - ] = await self.testsets_service.fetch_testset_revision( + testcase_ids: List[UUID], + ) -> List[Data]: + testcase_blobs = await self.blobs_dao.fetch_blobs( project_id=project_id, # - testset_variant_ref=testset_variant_ref, + blob_ids=testcase_ids, ) - if testset_revision is None: - return None - - old_testcase_ids = [ - testcase.data for testcase in testset_revision.data.testcases - ] + if not testcase_blobs: + return [] - new_testcase_ids = [ - testcase.data - for testcase in simple_testset_edit_request.testset.data.testcases + testcases = [ + { + "testcase_id": str(testcase_blob.id), + **testcase_blob.data, + } + for testcase_blob in testcase_blobs ] - has_changes = ( - testset_revision.name != simple_testset_edit_request.testset.name - or testset_revision.description - != simple_testset_edit_request.testset.description - or testset_revision.tags != simple_testset_edit_request.testset.tags - or testset_revision.meta != simple_testset_edit_request.testset.meta - or old_testcase_ids != new_testcase_ids - ) - - if has_changes: - testset_revision_slug = uuid4().hex[-12:] - - testset_revision_commit = TestsetRevisionCommit( - slug=testset_revision_slug, - # - name=simple_testset_edit_request.testset.name, - description=simple_testset_edit_request.testset.description, - # - # flags = - tags=simple_testset_edit_request.testset.tags, - meta=simple_testset_edit_request.testset.meta, - # - data=testset_revision_data, - # - testset_id=testset.id, - testset_variant_id=testset_variant.id, - ) - - testset_revision: Optional[TestsetRevision] = ( # type: ignore - await self.testsets_service.commit_testset_revision( - project_id=project_id, - user_id=user_id, - # - testset_revision_commit=testset_revision_commit, - ) - ) - - if testset_revision is None: - return None - - simple_testset = SimpleTestset( - id=testset.id, - slug=testset.slug, - # - created_at=testset.created_at, - updated_at=testset.updated_at, - deleted_at=testset.deleted_at, - created_by_id=testset.created_by_id, - updated_by_id=testset.updated_by_id, - deleted_by_id=testset.deleted_by_id, - # - name=testset.name, - description=testset.description, - # - # flags = - tags=testset.tags, - meta=testset.meta, - # - data=testset_revision.data, - ) - - return simple_testset + return testcases - async def transfer( - self, - *, - project_id: UUID, - user_id: UUID, - # - testset_id: UUID, - ): - old_testset = await fetch_testset_by_id( - project_id=str(project_id), - # - testset_id=str(testset_id), - ) - - if old_testset is None: - return None - - testset_revision_data = self._transfer_simple_testset_revision_data( - old_testset=old_testset, - ) - - new_testset = await self.testsets_service.fetch_testset( - project_id=project_id, - # - testset_ref=Reference(id=testset_id), - ) - - if not new_testset: - name = str(old_testset.name) - slug = get_slug_from_name_and_id( - name=name, - id=testset_id, - ) - - simple_testset_create_request = SimpleTestsetCreateRequest( - testset=SimpleTestsetCreate( - slug=slug, - name=name, - description=None, - # flags=None, - tags=None, - meta=None, - data=testset_revision_data, - ) - ) - - testset = await self.create( - project_id=project_id, - user_id=user_id, - # - simple_testset_create_request=simple_testset_create_request, - # - testset_id=testset_id, - ) - - else: - simple_testset_edit_request = SimpleTestsetEditRequest( - testset=SimpleTestsetEdit( - id=testset_id, - # - name=new_testset.name, - description=new_testset.description, - # - # flags=new_testset.flags, - tags=new_testset.tags, - meta=new_testset.meta, - # - data=testset_revision_data, - ) - ) - - testset = await self.edit( - project_id=project_id, - user_id=user_id, - # - simple_testset_edit_request=simple_testset_edit_request, - ) - - return testset - - def _transfer_simple_testset_revision_data( - self, - *, - old_testset: TestsetDB, - ) -> TestsetRevisionData: - return TestsetRevisionData( - testcases=[ - Testcase(data=testcase_data) for testcase_data in old_testset.csvdata - ], - ) + ## ------------------------------------------------------------------------- diff --git a/api/oss/src/core/tracing/dtos.py b/api/oss/src/core/tracing/dtos.py index fa838cfa8d..f674d5f9d5 100644 --- a/api/oss/src/core/tracing/dtos.py +++ b/api/oss/src/core/tracing/dtos.py @@ -1,98 +1,26 @@ -from typing import List, Dict, Any, Union, Optional -from datetime import datetime, timezone -from uuid import uuid4 +import random +import string from enum import Enum +from uuid import UUID +from datetime import datetime, timezone +from typing import List, Dict, Any, Union, Optional +from typing_extensions import TypeAliasType -from pydantic import BaseModel, model_validator, Field - -from oss.src.core.shared.dtos import ( - Identifier, - Lifecycle, - Metrics, - Json, - Flags, - Tags, - Meta, - Data, - Reference, - Hashes, - Windowing, - FullJson, - Link, -) - - -# 'ag.' attributes ------------------------------------------------------------- - - -class TraceType(Enum): - INVOCATION = "invocation" - ANNOTATION = "annotation" - # - UNKNOWN = "unknown" - - -class SpanType(Enum): - AGENT = "agent" - CHAIN = "chain" - WORKFLOW = "workflow" - TASK = "task" - TOOL = "tool" - EMBEDDING = "embedding" - QUERY = "query" - LLM = "llm" - COMPLETION = "completion" - CHAT = "chat" - RERANK = "rerank" - # - UNKNOWN = "unknown" - - -class AgMetricEntryAttributes(BaseModel): - # cumulative: 'cum' can't be used though - cumulative: Optional[Metrics] = None - # incremental 'inc' could be used, since 'unit' may be confusing - incremental: Optional[Metrics] = None - - model_config = {"ser_json_exclude_none": True} - - -class AgMetricsAttributes(BaseModel): - duration: Optional[AgMetricEntryAttributes] = None - errors: Optional[AgMetricEntryAttributes] = None - tokens: Optional[AgMetricEntryAttributes] = None - costs: Optional[AgMetricEntryAttributes] = None - - model_config = {"ser_json_exclude_none": True} - - -class AgTypeAttributes(BaseModel): - trace: Optional[TraceType] = TraceType.INVOCATION - span: Optional[SpanType] = SpanType.TASK - - -class AgDataAttributes(BaseModel): - parameters: Optional[Dict[str, Any]] = None - inputs: Optional[Any] = None - outputs: Optional[Any] = None - internals: Optional[Dict[str, Any]] = None - - model_config = {"ser_json_exclude_none": True} +from pydantic import BaseModel, model_validator +from oss.src.core.shared.dtos import Tags, Metrics, Json, Lifecycle -class AgAttributes(BaseModel): - type: AgTypeAttributes = Field(default_factory=AgTypeAttributes) - data: AgDataAttributes = Field(default_factory=AgDataAttributes) +# --- Recursive Named TypeAliases using TypeAliasType --- - metrics: Optional[AgMetricsAttributes] = None - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - exception: Optional[Data] = None - references: Optional[Dict[str, "OTelReference"]] = None - unsupported: Optional[Data] = None +OTelJson: TypeAliasType = TypeAliasType( + "OTelJson", + Union[str, int, float, bool, None, Dict[str, "OTelJson"], List["OTelJson"]], +) - model_config = {"ser_json_exclude_none": True} +OTelNumericJson: TypeAliasType = TypeAliasType( + "OTelNumericJson", + Union[int, float, Dict[str, "OTelNumericJson"], List["OTelNumericJson"]], +) ## --- SUB-ENTITIES --- ## @@ -126,6 +54,28 @@ class OTelEvent(BaseModel): attributes: Optional[OTelAttributes] = None + class Config: + json_encoders = {datetime: lambda dt: dt.isoformat()} + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + return self.encode( + super().model_dump( + *args, + **kwargs, + exclude_none=True, + ) + ) + OTelEvents = List[OTelEvent] @@ -138,26 +88,39 @@ class SpanID(BaseModel): span_id: str -class OTelHash(Identifier): - attributes: Optional[OTelAttributes] = None - - -OTelHashes = List[OTelHash] - - class OTelLink(TraceID, SpanID): attributes: Optional[OTelAttributes] = None - -OTelLinks = List[OTelLink] - - -class OTelReference(Reference): - attributes: Optional[OTelAttributes] = None + model_config = { + "json_encoders": { + UUID: lambda u: str(u), + } + } + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.model_config["json_encoders"].items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + return self.encode( + super().model_dump( + *args, + **kwargs, + exclude_none=True, + ) + ) -OTelReferences = List[OTelReference] +OTelLinks = List[OTelLink] +Link = OTelLink +Links = OTelLinks ## --- ENTITIES --- ## @@ -174,9 +137,6 @@ class OTelFlatSpan(Lifecycle): span_id: str parent_id: Optional[str] = None - trace_type: Optional[TraceType] = None - span_type: Optional[SpanType] = None - span_kind: Optional[OTelSpanKind] = None span_name: Optional[str] = None @@ -187,20 +147,37 @@ class OTelFlatSpan(Lifecycle): status_message: Optional[str] = None attributes: Optional[OTelAttributes] = None - references: Optional[OTelReferences] = None + events: Optional[OTelEvents] = None links: Optional[OTelLinks] = None - hashes: Optional[OTelHashes] = None - exception: Optional[Data] = None - - events: Optional[OTelEvents] = None + class Config: + json_encoders = { + datetime: lambda dt: dt.isoformat(), + Enum: lambda e: e.value, + UUID: lambda u: str(u), + } + + def encode(self, data: Any) -> Any: + if isinstance(data, dict): + return {k: self.encode(v) for k, v in data.items()} + elif isinstance(data, list): + return [self.encode(item) for item in data] + for type_, encoder in self.Config.json_encoders.items(): + if isinstance(data, type_): + return encoder(data) + return data + + def model_dump(self, *args, **kwargs) -> dict: + return self.encode( + super().model_dump( + *args, + **kwargs, + exclude_none=True, + ) + ) @model_validator(mode="after") def set_defaults(self): - if self.trace_type is None: - self.trace_type = TraceType.INVOCATION - if self.span_type is None: - self.span_type = SpanType.TASK if self.span_kind is None: self.span_kind = OTelSpanKind.SPAN_KIND_UNSPECIFIED if self.status_code is None: @@ -214,7 +191,9 @@ def set_defaults(self): self.start_time = now self.end_time = now if self.span_name is None: - self.span_name = uuid4().hex[-12:] + self.span_name = "".join( + random.choices(string.ascii_letters + string.digits, k=8) + ) return self @@ -233,9 +212,7 @@ class OTelSpan(OTelFlatSpan, OTelSpansTree): class Fields(str, Enum): TRACE_ID = "trace_id" - TRACE_TYPE = "trace_type" SPAN_ID = "span_id" - SPAN_TYPE = "span_type" PARENT_ID = "parent_id" SPAN_NAME = "span_name" SPAN_KIND = "span_kind" @@ -253,7 +230,6 @@ class Fields(str, Enum): CREATED_BY_ID = "created_by_id" UPDATED_BY_ID = "updated_by_id" DELETED_BY_ID = "deleted_by_id" - CONTENT = "content" class LogicalOperator(str, Enum): @@ -329,7 +305,7 @@ class Condition(BaseModel): class Filtering(BaseModel): - operator: LogicalOperator = LogicalOperator.AND + operator: Optional[LogicalOperator] = LogicalOperator.AND conditions: List[Union[Condition, "Filtering"]] = list() @@ -343,12 +319,18 @@ class Format(str, Enum): OPENTELEMETRY = "opentelemetry" +class Windowing(BaseModel): + oldest: Optional[datetime] = None + newest: Optional[datetime] = None + limit: Optional[int] = None + + class Formatting(BaseModel): - focus: Optional[Focus] = None - format: Optional[Format] = None + focus: Optional[Focus] = Focus.SPAN + format: Optional[Format] = Format.AGENTA -class TracingQuery(BaseModel): +class Query(BaseModel): formatting: Optional[Formatting] = None windowing: Optional[Windowing] = None filtering: Optional[Filtering] = None @@ -364,147 +346,3 @@ class TracingQuery(BaseModel): class FilteringException(Exception): pass - - -class Analytics(BaseModel): - count: Optional[int] = 0 - duration: Optional[float] = 0.0 - costs: Optional[float] = 0.0 - tokens: Optional[float] = 0.0 - - def plus(self, other: "Analytics") -> "Analytics": - self.count += other.count - self.duration += other.duration - self.costs += other.costs - self.tokens += other.tokens - - return self - - -class Bucket(BaseModel): - timestamp: datetime - interval: int - total: Analytics - errors: Analytics - - -class MetricType(str, Enum): - NUMERIC_CONTINUOUS = "numeric/continuous" - NUMERIC_DISCRETE = "numeric/discrete" - BINARY = "binary" - CATEGORICAL_SINGLE = "categorical/single" - CATEGORICAL_MULTIPLE = "categorical/multiple" - STRING = "string" - JSON = "json" - NONE = "none" - WILDCARD = "*" - - -class MetricSpec(BaseModel): - type: MetricType = MetricType.NONE - path: str = "*" - # OPTS - bins: Optional[int] = None - vmin: Optional[float] = None - vmax: Optional[float] = None - edge: Optional[bool] = None - - -class MetricsBucket(BaseModel): - timestamp: datetime - interval: int - metrics: Optional[Dict[str, FullJson]] = None - - -# WORKFLOWS -------------------------------------------------------------------- - - -Trace = OTelSpansTree - - -# SIMPLE TRACE: INVOCATIONS & ANNOTATIONS -------------------------------------- - - -class SimpleTraceOrigin(str, Enum): - CUSTOM = "custom" # custom - HUMAN = "human" # human - AUTO = "auto" # automatic - - -class SimpleTraceKind(str, Enum): - ADHOC = "adhoc" # adhoc - EVAL = "eval" # evaluation - PLAY = "play" # playground - - -class SimpleTraceChannel(str, Enum): - OTLP = "otlp" # otlp - WEB = "web" # react - SDK = "sdk" # python vs typescript ? - API = "api" # http - - -class SimpleTraceReferences(BaseModel): - query: Optional[Reference] = None - query_variant: Optional[Reference] = None - query_revision: Optional[Reference] = None - testset: Optional[Reference] = None - testset_variant: Optional[Reference] = None - testset_revision: Optional[Reference] = None - application: Optional[Reference] = None - application_variant: Optional[Reference] = None - application_revision: Optional[Reference] = None - evaluator: Optional[Reference] = None - evaluator_variant: Optional[Reference] = None - evaluator_revision: Optional[Reference] = None - testcase: Optional[Reference] = None - - -SimpleTraceLinks = Union[Dict[str, Link], List[Link]] - - -class SimpleTrace(Link, Lifecycle): - origin: SimpleTraceOrigin = SimpleTraceOrigin.CUSTOM - kind: SimpleTraceKind = SimpleTraceKind.ADHOC - channel: SimpleTraceChannel = SimpleTraceChannel.API - - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Data - - references: SimpleTraceReferences - links: SimpleTraceLinks - - -class SimpleTraceCreate(BaseModel): - origin: SimpleTraceOrigin = SimpleTraceOrigin.CUSTOM - kind: SimpleTraceKind = SimpleTraceKind.ADHOC - channel: SimpleTraceChannel = SimpleTraceChannel.API - - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Data - - references: SimpleTraceReferences - links: SimpleTraceLinks - - -class SimpleTraceEdit(BaseModel): - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - data: Data - - -class SimpleTraceQuery(BaseModel): - origin: Optional[SimpleTraceOrigin] = None - kind: Optional[SimpleTraceKind] = None - channel: Optional[SimpleTraceChannel] = None - - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - references: Optional[SimpleTraceReferences] = None - links: Optional[SimpleTraceLinks] = None diff --git a/api/oss/src/core/tracing/interfaces.py b/api/oss/src/core/tracing/interfaces.py index 05aeda2c63..1f8081d158 100644 --- a/api/oss/src/core/tracing/interfaces.py +++ b/api/oss/src/core/tracing/interfaces.py @@ -1,180 +1,133 @@ -from typing import List, Optional, Dict, Any from uuid import UUID -from abc import ABC, abstractmethod +from typing import List, Optional from oss.src.core.tracing.dtos import ( OTelLink, + OTelLinks, OTelFlatSpan, - TracingQuery, - Bucket, - MetricSpec, - MetricsBucket, + OTelFlatSpans, + Query, ) -class TracingDAOInterface(ABC): +class TracingDAOInterface: def __init__(self): raise NotImplementedError ### CRUD on spans - @abstractmethod async def create_span( self, *, project_id: UUID, - user_id: UUID, - # span_dto: OTelFlatSpan, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: raise NotImplementedError - @abstractmethod async def create_spans( self, *, project_id: UUID, - user_id: UUID, - # - span_dtos: List[OTelFlatSpan], - ) -> List[OTelLink]: + span_dtos: OTelFlatSpans, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: raise NotImplementedError - @abstractmethod async def read_span( self, *, project_id: UUID, - # span_id: UUID, ) -> Optional[OTelFlatSpan]: raise NotImplementedError - @abstractmethod async def read_spans( self, *, project_id: UUID, - # span_ids: List[UUID], - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: raise NotImplementedError - @abstractmethod async def update_span( self, *, project_id: UUID, - user_id: UUID, - # span_dto: OTelFlatSpan, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: raise NotImplementedError - @abstractmethod async def update_spans( self, *, project_id: UUID, - user_id: UUID, - # - span_dtos: List[OTelFlatSpan], - ) -> List[OTelLink]: + span_dtos: OTelFlatSpans, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: raise NotImplementedError - @abstractmethod async def delete_span( self, *, project_id: UUID, - # span_id: UUID, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: raise NotImplementedError - @abstractmethod async def delete_spans( self, *, project_id: UUID, - # span_ids: List[UUID], - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: raise NotImplementedError ### .R.D on traces - @abstractmethod async def read_trace( self, *, project_id: UUID, - # trace_id: UUID, - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: raise NotImplementedError - @abstractmethod async def read_traces( self, *, project_id: UUID, - # trace_ids: List[UUID], - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: raise NotImplementedError - @abstractmethod async def delete_trace( self, *, project_id: UUID, - # trace_id: UUID, - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: raise NotImplementedError - @abstractmethod async def delete_traces( self, *, project_id: UUID, - # trace_ids: List[UUID], - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: raise NotImplementedError - ### QUERY + ### RPC - @abstractmethod async def query( self, *, project_id: UUID, - # - query: TracingQuery, - ) -> List[OTelFlatSpan]: - raise NotImplementedError - - ### ANALYTICS - - @abstractmethod - async def legacy_analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - ) -> List[Bucket]: - raise NotImplementedError - - @abstractmethod - async def analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - specs: List[MetricSpec], - ) -> List[MetricsBucket]: + query: Query, + ) -> Optional[OTelFlatSpans]: raise NotImplementedError diff --git a/api/oss/src/core/tracing/service.py b/api/oss/src/core/tracing/service.py index 193dda6a62..ee8e11a680 100644 --- a/api/oss/src/core/tracing/service.py +++ b/api/oss/src/core/tracing/service.py @@ -1,29 +1,21 @@ -from typing import List, Optional, Dict, Any from uuid import UUID - +from typing import List, Optional from oss.src.utils.logging import get_module_logger from oss.src.core.tracing.interfaces import TracingDAOInterface -from oss.src.core.tracing.utils import parse_query, parse_ingest from oss.src.core.tracing.dtos import ( OTelLink, + OTelLinks, OTelFlatSpan, - TracingQuery, - Bucket, - MetricSpec, - MetricsBucket, + OTelFlatSpans, + Query, ) - from oss.src.core.tracing.utils import ( - parse_span_dtos_to_span_idx, - parse_span_idx_to_span_id_tree, - calculate_costs, - cumulate_costs, - cumulate_tokens, + parse_query, + parse_ingest, ) - log = get_module_logger(__name__) @@ -34,63 +26,48 @@ def __init__( ): self.tracing_dao = tracing_dao + ### CRUD + async def create( self, *, project_id: UUID, - user_id: UUID, - # span_dto: Optional[OTelFlatSpan] = None, - span_dtos: Optional[List[OTelFlatSpan]] = None, - ) -> List[OTelLink]: - span_idx = parse_span_dtos_to_span_idx( - [span_dto] if span_dto else span_dtos or [] - ) - - span_id_tree = parse_span_idx_to_span_id_tree(span_idx) - - calculate_costs(span_idx) - - cumulate_costs(span_id_tree, span_idx) - - cumulate_tokens(span_id_tree, span_idx) - + span_dtos: Optional[OTelFlatSpans] = None, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: if span_dto: link = await self.tracing_dao.create_span( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) - return [link] if link else [] + return [link] if link else None if span_dtos: links = await self.tracing_dao.create_spans( project_id=project_id, - user_id=user_id, - # span_dtos=span_dtos, + user_id=user_id, ) return links - return [] + return None async def read( self, *, project_id: UUID, - # trace_id: Optional[UUID] = None, trace_ids: Optional[List[UUID]] = None, span_id: Optional[UUID] = None, span_ids: Optional[List[UUID]] = None, - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: if trace_id: span_dtos = await self.tracing_dao.read_trace( project_id=project_id, - # trace_id=trace_id, ) @@ -99,7 +76,6 @@ async def read( if trace_ids: span_dtos = await self.tracing_dao.read_traces( project_id=project_id, - # trace_ids=trace_ids, ) @@ -108,69 +84,64 @@ async def read( if span_id: span_dtos = await self.tracing_dao.read_span( project_id=project_id, - # span_id=span_id, ) - return [span_dtos] if span_dtos else [] + return [span_dtos] if span_dtos else None if span_ids: span_dtos = await self.tracing_dao.read_spans( project_id=project_id, - # span_ids=span_ids, ) return span_dtos - return [] + return None async def update( self, *, project_id: UUID, - user_id: UUID, - # span_dto: Optional[OTelFlatSpan] = None, - span_dtos: Optional[List[OTelFlatSpan]] = None, - ) -> List[OTelLink]: + span_dtos: Optional[OTelFlatSpans] = None, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: if span_dto: link = await self.tracing_dao.update_span( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) - return [link] if link else [] + return [link] if link else None if span_dtos: links = await self.tracing_dao.update_spans( project_id=project_id, - user_id=user_id, - # span_dtos=span_dtos, + user_id=user_id, ) return links - return [] + return None async def delete( self, *, project_id: UUID, - # trace_id: Optional[UUID] = None, trace_ids: Optional[List[UUID]] = None, span_id: Optional[UUID] = None, span_ids: Optional[List[UUID]] = None, - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: if trace_id: links = await self.tracing_dao.delete_trace( project_id=project_id, - # trace_id=trace_id, + user_id=user_id, ) return links @@ -178,8 +149,8 @@ async def delete( if trace_ids: links = await self.tracing_dao.delete_traces( project_id=project_id, - # trace_ids=trace_ids, + user_id=user_id, ) return links @@ -187,72 +158,36 @@ async def delete( if span_id: link = await self.tracing_dao.delete_span( project_id=project_id, - # span_id=span_id, + user_id=user_id, ) - return [link] if link else [] + return [link] if link else None if span_ids: links = await self.tracing_dao.delete_spans( project_id=project_id, - # span_ids=span_ids, + user_id=user_id, ) return links - return [] + return None - async def query( + ### RPC ON SPANS + + async def query( # QUERY self, *, project_id: UUID, - # - query: TracingQuery, - ) -> List[OTelFlatSpan]: + query: Query, + ) -> Optional[OTelFlatSpans]: parse_query(query) span_dtos = await self.tracing_dao.query( project_id=project_id, - # query=query, ) return span_dtos - - async def legacy_analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - ) -> List[Bucket]: - parse_query(query) - - bucket_dtos = await self.tracing_dao.legacy_analytics( - project_id=project_id, - # - query=query, - ) - - return bucket_dtos - - async def analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - specs: List[MetricSpec], - ) -> List[MetricsBucket]: - parse_query(query) - - bucket_dtos = await self.tracing_dao.analytics( - project_id=project_id, - # - query=query, - specs=specs, - ) - - return bucket_dtos diff --git a/api/oss/src/core/tracing/utils.py b/api/oss/src/core/tracing/utils.py index d62edb6ba9..c51647d7ed 100644 --- a/api/oss/src/core/tracing/utils.py +++ b/api/oss/src/core/tracing/utils.py @@ -1,32 +1,20 @@ -from typing import Dict, Union, Any, Optional, Tuple, List +from typing import Dict, Union, Any from uuid import UUID from datetime import datetime from collections import OrderedDict -from litellm import cost_calculator - - from oss.src.utils.logging import get_module_logger -from oss.src.core.shared.dtos import ( - Flags, - Tags, - Meta, - Data, - Reference, - Link, -) +from oss.src.core.shared.dtos import Reference from oss.src.core.tracing.dtos import ( - Attributes, OTelSpanKind, OTelStatusCode, OTelSpan, - OTelReference, - OTelFlatSpan, OTelLink, OTelFlatSpans, - TracingQuery, + Link, + Query, FilteringException, Filtering, Condition, @@ -37,8 +25,6 @@ DictOperator, ExistenceOperator, Fields, - TraceType, - SpanType, _C_OPS, _N_OPS, _S_OPS, @@ -55,11 +41,11 @@ # ATTRIBUTES -def unmarshall_attributes( +def unmarshal_attributes( marshalled: OTelAttributes, ) -> OTelAttributes: """ - Unmarshalls a dictionary of marshalled attributes into a nested dictionary + Unmarshals a dictionary of marshalled attributes into a nested dictionary Example: marshalled = { @@ -89,34 +75,42 @@ def unmarshall_attributes( for key, value in marshalled.items(): keys = key.split(".") - current = unmarshalled - for i, key in enumerate(keys): - is_last = i == len(keys) - 1 - next_key = keys[i + 1] if not is_last else None - is_index = key.isdigit() - key = int(key) if is_index else key + level = unmarshalled + + for i, part in enumerate(keys[:-1]): + if part.isdigit(): + part = int(part) + + if not isinstance(level, list): + level = [] + + while len(level) <= part: + level.append({}) + + level = level[part] - if is_last: - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append(None) - current[key] = value - elif isinstance(current, dict): - current[key] = value else: - next_is_index = next_key.isdigit() if next_key else False + if part not in level: + level[part] = {} if not keys[i + 1].isdigit() else [] - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append([] if next_is_index else {}) - if current[key] is None: - current[key] = [] if next_is_index else {} - current = current[key] - elif isinstance(current, dict): - if key not in current: - current[key] = [] if next_is_index else {} - current = current[key] + level = level[part] + + last_key = keys[-1] + + if last_key.isdigit(): + last_key = int(last_key) + + if not isinstance(level, list): + level = [] + + while len(level) <= last_key: + level.append(None) + + level[last_key] = value + + else: + level[last_key] = value return unmarshalled @@ -191,21 +185,13 @@ def unmarshall( # TREE -def parse_span_dtos_to_span_idx( - span_dtos: List[OTelFlatSpan], -) -> Dict[str, OTelFlatSpan]: - span_idx = {span.span_id: span for span in span_dtos} - - return span_idx - - def parse_span_idx_to_span_id_tree( - span_idx: Dict[str, OTelFlatSpan], + span_idx: Dict[str, OTelSpan], ) -> OrderedDict: span_id_tree = OrderedDict() index = {} - def push(span_dto: OTelFlatSpan) -> None: + def push(span_dto: OTelSpan) -> None: if span_dto.parent_id is None: span_id_tree[span_dto.span_id] = OrderedDict() index[span_dto.span_id] = span_id_tree[span_dto.span_id] @@ -255,361 +241,6 @@ def _connect_tree_dfs( parent_span.spans = None -def cumulate_costs( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, OTelFlatSpan], -) -> None: - def _get_incremental(span: OTelFlatSpan): - _costs = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.attributes is None: - return _costs - - attr: dict = span.attributes - - return { - "prompt": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("incremental", {}) - .get("prompt", 0.0) - ), - "completion": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("incremental", {}) - .get("completion", 0.0) - ), - "total": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("incremental", {}) - .get("total", 0.0) - ), - } - - def _get_cumulative(span: OTelFlatSpan): - _costs = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.attributes is None: - return _costs - - attr: dict = span.attributes - - return { - "prompt": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("cumulative", {}) - .get("prompt", 0.0) - ), - "completion": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("cumulative", {}) - .get("completion", 0.0) - ), - "total": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("costs", {}) - .get("cumulative", {}) - .get("total", 0.0) - ), - } - - def _accumulate(a: dict, b: dict): - return { - "prompt": a.get("prompt", 0.0) + b.get("prompt", 0.0), - "completion": a.get("completion", 0.0) + b.get("completion", 0.0), - "total": a.get("total", 0.0) + b.get("total", 0.0), - } - - def _set_cumulative(span: OTelFlatSpan, costs: dict): - if span.attributes is None: - span.attributes = {} - - if ( - costs.get("prompt", 0.0) != 0.0 - or costs.get("completion", 0.0) != 0.0 - or costs.get("total", 0.0) != 0.0 - ): - if "ag" not in span.attributes or not isinstance( - span.attributes["ag"], - dict, - ): - span.attributes["ag"] = {} - - if "metrics" not in span.attributes["ag"] or not isinstance( - span.attributes["ag"]["metrics"], - dict, - ): - span.attributes["ag"]["metrics"] = {} - - if "costs" not in span.attributes["ag"]["metrics"] or not isinstance( - span.attributes["ag"]["metrics"]["costs"], - dict, - ): - span.attributes["ag"]["metrics"]["costs"] = {} - - span.attributes["ag"]["metrics"]["costs"]["cumulative"] = costs - - _cumulate_tree_dfs( - spans_id_tree, - spans_idx, - _get_incremental, - _get_cumulative, - _accumulate, - _set_cumulative, - ) - - -def cumulate_tokens( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, OTelFlatSpan], -) -> None: - def _get_incremental(span: OTelFlatSpan): - _tokens = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.attributes is None: - return _tokens - - attr: dict = span.attributes - - return { - "prompt": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("incremental", {}) - .get("prompt", 0.0) - ), - "completion": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("incremental", {}) - .get("completion", 0.0) - ), - "total": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("incremental", {}) - .get("total", 0.0) - ), - } - - def _get_cumulative(span: OTelFlatSpan): - _tokens = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.attributes is None: - return _tokens - - attr: dict = span.attributes - - return { - "prompt": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("cumulative", {}) - .get("prompt", 0.0) - ), - "completion": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("cumulative", {}) - .get("completion", 0.0) - ), - "total": ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("cumulative", {}) - .get("total", 0.0) - ), - } - - def _accumulate(a: dict, b: dict): - return { - "prompt": a.get("prompt", 0.0) + b.get("prompt", 0.0), - "completion": a.get("completion", 0.0) + b.get("completion", 0.0), - "total": a.get("total", 0.0) + b.get("total", 0.0), - } - - def _set_cumulative(span: OTelFlatSpan, tokens: dict): - if span.attributes is None: - span.attributes = {} - - if ( - tokens.get("prompt", 0.0) != 0.0 - or tokens.get("completion", 0.0) != 0.0 - or tokens.get("total", 0.0) != 0.0 - ): - if "ag" not in span.attributes or not isinstance( - span.attributes["ag"], - dict, - ): - span.attributes["ag"] = {} - - if "metrics" not in span.attributes["ag"] or not isinstance( - span.attributes["ag"]["metrics"], - dict, - ): - span.attributes["ag"]["metrics"] = {} - - if "tokens" not in span.attributes["ag"]["metrics"] or not isinstance( - span.attributes["ag"]["metrics"]["tokens"], - dict, - ): - span.attributes["ag"]["metrics"]["tokens"] = {} - - span.attributes["ag"]["metrics"]["tokens"]["cumulative"] = tokens - - _cumulate_tree_dfs( - spans_id_tree, - spans_idx, - _get_incremental, - _get_cumulative, - _accumulate, - _set_cumulative, - ) - - -def _cumulate_tree_dfs( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, OTelFlatSpan], - get_incremental, - get_cumulative, - accumulate, - set_cumulative, -): - for span_id, children_spans_id_tree in spans_id_tree.items(): - children_spans_id_tree: OrderedDict - - cumulated_metric = get_incremental(spans_idx[span_id]) - - _cumulate_tree_dfs( - children_spans_id_tree, - spans_idx, - get_incremental, - get_cumulative, - accumulate, - set_cumulative, - ) - - for child_span_id in children_spans_id_tree.keys(): - marginal_metric = get_cumulative(spans_idx[child_span_id]) - cumulated_metric = accumulate(cumulated_metric, marginal_metric) - - set_cumulative(spans_idx[span_id], cumulated_metric) - - -TYPES_WITH_COSTS = [ - "embedding", - "query", - "completion", - "chat", - "rerank", -] - - -def calculate_costs(span_idx: Dict[str, OTelFlatSpan]): - for span in span_idx.values(): - if ( - span.span_type - and span.span_type.name.lower() in TYPES_WITH_COSTS - and span.attributes - ): - attr: dict = span.attributes - model = attr.get("ag", {}).get("meta", {}).get("response", {}).get( - "model" - ) or attr.get("ag", {}).get("data", {}).get("parameters", {}).get("model") - - prompt_tokens = ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("incremental", {}) - .get("prompt", 0.0) - ) - - completion_tokens = ( - attr.get("ag", {}) - .get("metrics", {}) - .get("tokens", {}) - .get("incremental", {}) - .get("completion", 0.0) - ) - - try: - costs = cost_calculator.cost_per_token( - model=model, - prompt_tokens=prompt_tokens, - completion_tokens=completion_tokens, - ) - - if not costs: - continue - - prompt_cost, completion_cost = costs - total_cost = prompt_cost + completion_cost - - if "ag" not in span.attributes or not isinstance( - span.attributes["ag"], - dict, - ): - span.attributes["ag"] = {} - if "metrics" not in span.attributes["ag"] or not isinstance( - span.attributes["ag"]["metrics"], - dict, - ): - span.attributes["ag"]["metrics"] = {} - - if "costs" not in span.attributes["ag"]["metrics"] or not isinstance( - span.attributes["ag"]["metrics"]["costs"], - dict, - ): - span.attributes["ag"]["metrics"]["costs"] = {} - - span.attributes["ag"]["metrics"]["costs"]["incremental"] = { - "prompt": prompt_cost, - "completion": completion_cost, - "total": total_cost, - } - - except: # pylint: disable=bare-except - log.warn( - "Failed to calculate costs", - model=model, - prompt_tokens=prompt_tokens, - completion_tokens=completion_tokens, - ) - - # VALUES @@ -655,42 +286,6 @@ def parse_ref_slug_to_str( return clean_ref_slug -def parse_ref_version_to_str( - ref_version: str, -): - clean_ref_version = None - - try: - clean_ref_version = str(ref_version) - except Exception as e: - log.error( - "ref_version must be a string, got %s [%s]", - type(ref_version), - ref_version, - ) - raise TypeError() from e - - return clean_ref_version - - -def parse_evt_name_to_str( - evt_name: str, -): - clean_evt_name = None - - try: - clean_evt_name = str(evt_name) - except Exception as e: - log.error( - "evt_name must be a string, got %s [%s]", - type(evt_name), - evt_name, - ) - raise TypeError() from e - - return clean_evt_name - - def parse_trace_id_to_uuid( trace_id: str, ): @@ -800,9 +395,7 @@ def parse_value_to_enum(value: str, enum: type) -> type: ) from e -def parse_timestamp_to_datetime( - ts: Optional[Union[str, int, datetime]], -) -> Optional[datetime]: +def parse_timestamp_to_datetime(ts): if isinstance(ts, datetime): return ts @@ -810,7 +403,7 @@ def parse_timestamp_to_datetime( try: ts = int(ts) except ValueError: - return datetime.fromisoformat(str(ts)) + return datetime.fromisoformat(ts) if isinstance(ts, int): digits = len(str(ts)) @@ -937,7 +530,7 @@ def _parse_links_condition(condition: Condition) -> None: condition.value[i] = Link( trace_id=parse_trace_id_to_uuid(trace_id) if trace_id else None, span_id=parse_span_id_to_uuid(span_id) if span_id else None, - ).model_dump(mode="json") + ).model_dump() except Exception as e: # pylint: disable=broad-exception-caught raise FilteringException( "'links' value must be one or more (possibly partial) links.", @@ -997,27 +590,19 @@ def _parse_references_condition(condition: Condition) -> None: ref_id = v.get("id") ref_slug = v.get("slug") - ref_version = v.get("version") if ref_id: _values.append( Reference( id=parse_ref_id_to_uuid(ref_id), - ).model_dump(mode="json", exclude_none=True) + ).model_dump(exclude_none=True) ) if ref_slug: _values.append( Reference( slug=parse_ref_slug_to_str(ref_slug), - ).model_dump(mode="json", exclude_none=True) - ) - - if ref_version: - _values.append( - Reference( - version=parse_ref_version_to_str(ref_version), - ).model_dump(mode="json", exclude_none=True) + ).model_dump(exclude_none=True) ) condition.value = _values @@ -1035,68 +620,7 @@ def _parse_references_condition(condition: Condition) -> None: ) from e -def _parse_events_condition(condition: Condition) -> None: - if condition.operator not in _L_OPS + _D_OPS + _E_OPS: - raise FilteringException( - "'events' only supports list, dict, and existence operators.", - ) - - if condition.operator in _L_OPS + _E_OPS and condition.key is not None: - raise FilteringException( - "'events' key is only supported for dict operators.", - ) - - if condition.operator in _E_OPS and condition.value is not None: - raise FilteringException( - "'events' value is not supported for existence operators.", - ) - - if condition.operator in _L_OPS: - if not isinstance(condition.value, list): - raise FilteringException( - "'events' value must be one or more (possibly partial) events.", - ) - - if not all(isinstance(v, dict) for v in condition.value): - raise FilteringException( - "'events' value must be one or more (possibly partial) events.", - ) - - if condition.operator in _D_OPS: - if not isinstance(condition.key, str) or not condition.key.startswith( - "attributes." - ): - raise FilteringException( - "'events' key must be a string in dot notation starting with 'attributes'.", - ) - - if condition.operator in _E_OPS: - pass - elif condition.operator in _L_OPS: - try: - _values = [] - - for v in condition.value: - v: dict - - name = v.get("name") - - if name: - _values.append(dict(name=parse_evt_name_to_str(name))) - - condition.value = _values - except Exception as e: # pylint: disable=broad-exception-caught - log.error(e) - raise FilteringException( - "'events' value must be one or more (possibly partial) events.", - ) from e - elif condition.operator in _D_OPS: - try: - unmarshall({condition.key: condition.value}) - except Exception as e: # pylint: disable=broad-exception-caught - raise FilteringException( - "'events' key must be a string in dot notation.", - ) from e +# def _parse_events_condition(condition: Condition) -> None: ... def _parse_enum_field_condition(condition: Condition, enum: type) -> None: @@ -1179,32 +703,10 @@ def _parse_uuid_field_condition(condition: Condition) -> None: condition.value = parse_trace_id_to_uuid(condition.value) -def _parse_fts_field_condition(condition: Condition) -> None: - if condition.operator != StringOperator.CONTAINS: - raise FilteringException( - f"'{condition.field}' only supports full-text search operator: 'contains'.", - ) - - if condition.value is None: - raise FilteringException( - f"'{condition.field}' value is required and thus never null for full-text search.", - ) - - if not isinstance(condition.value, str): - raise FilteringException( - f"'{condition.field}' value must be a string for full-text search.", - ) - - # FILTERING / CONDITION -def parse_filtering( - filtering: Optional[Filtering] = None, -) -> None: - if filtering is None: - return - +def parse_filtering(filtering: Filtering) -> None: for condition in filtering.conditions: if isinstance(condition, Filtering): parse_filtering(condition) @@ -1216,20 +718,11 @@ def parse_filtering( ) -def parse_condition( - condition: Optional[Condition] = None, -) -> None: - if condition is None: - return - +def parse_condition(condition: Condition) -> None: if condition.field == Fields.TRACE_ID: _parse_trace_id_condition(condition) - elif condition.field == Fields.TRACE_TYPE: - _parse_enum_field_condition(condition, TraceType) elif condition.field == Fields.SPAN_ID: _parse_span_id_condition(condition) - elif condition.field == Fields.SPAN_TYPE: - _parse_enum_field_condition(condition, SpanType) elif condition.field == Fields.PARENT_ID: _parse_parent_id_condition(condition) elif condition.field == Fields.SPAN_KIND: @@ -1250,8 +743,8 @@ def parse_condition( _parse_links_condition(condition) elif condition.field == Fields.REFERENCES: _parse_references_condition(condition) - elif condition.field == Fields.EVENTS: - _parse_events_condition(condition) + # elif condition.field == Fields.EVENTS: + # _parse_events_condition(condition) elif condition.field == Fields.CREATED_AT: _parse_timestamp_field_condition(condition) elif condition.field == Fields.UPDATED_AT: @@ -1264,13 +757,10 @@ def parse_condition( _parse_uuid_field_condition(condition) elif condition.field == Fields.DELETED_BY_ID: _parse_uuid_field_condition(condition) - elif condition.field == Fields.CONTENT: - _parse_fts_field_condition(condition) else: - # raise FilteringException( - # f"Unsupported condition field '{condition.field}'.", - # ) - log.warning(f"Unsupported condition field: {condition.field}") + raise FilteringException( + f"Unsupported condition field '{condition.field}'.", + ) # INGEST / QUERY @@ -1280,64 +770,5 @@ def parse_ingest(span_dtos: OTelFlatSpans) -> None: pass -def parse_query(query: TracingQuery) -> None: +def parse_query(query: Query) -> None: parse_filtering(query.filtering) - - -# INVOCATIONS / ANNOTATIONS - - -def parse_into_attributes( - *, - type: Optional[Dict[str, str]] = None, - flags: Optional[Flags] = None, - tags: Optional[Tags] = None, - meta: Optional[Meta] = None, - data: Optional[Data] = None, - references: Optional[Dict[str, Dict[str, Any]]] = None, -) -> Attributes: - attributes = dict( - ag=( - dict( - type=type, - flags=flags, - tags=tags, - meta=meta, - data=data, - references=references, - ) - if type or flags or tags or meta or data or references - else None - ) - ) - - return attributes # type: ignore - - -def parse_from_attributes( - attributes: Attributes, -) -> Tuple[ - Optional[Dict[str, str]], # type - Optional[Flags], # flags - Optional[Tags], # tags - Optional[Meta], # meta - Optional[Data], # data - Optional[Dict[str, Dict[str, Any]]], # references -]: - # TODO - add error handling - ag: dict = attributes.get("ag", {}) # type: ignore - type: dict = ag.get("type", {}) # type: ignore - flags: dict = ag.get("flags") # type: ignore - tags: dict = ag.get("tags") # type: ignore - meta: dict = ag.get("meta") # type: ignore - data: dict = ag.get("data") # type: ignore - references = ag.get("references") # type: ignore - - return ( - type, - flags, - tags, - meta, - data, - references, - ) diff --git a/api/oss/src/core/workflows/dtos.py b/api/oss/src/core/workflows/dtos.py index c6b71caccf..0502afc511 100644 --- a/api/oss/src/core/workflows/dtos.py +++ b/api/oss/src/core/workflows/dtos.py @@ -1,13 +1,8 @@ -from typing import Optional, Dict, Any, Union -from uuid import UUID, uuid4 +from typing import Optional from urllib.parse import urlparse +from uuid import UUID -from pydantic import ( - BaseModel, - Field, - model_validator, - ValidationError, -) +from pydantic import BaseModel, model_validator, ValidationError from jsonschema import ( Draft202012Validator, @@ -18,188 +13,25 @@ ) from jsonschema.exceptions import SchemaError -from oss.src.core.git.dtos import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - # - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - VariantFork, - # - Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionFork, - RevisionCommit, - RevisionsLog, -) - -from oss.src.core.shared.dtos import sync_alias, AliasConfig -from oss.src.core.shared.dtos import ( - Identifier, - Slug, - Version, - Header, - Data, - Metadata, - Reference, - Link, - Schema, - # Credentials, - # Secret, -) - -from oss.src.core.tracing.dtos import Trace -from oss.src.apis.fastapi.observability.models import AgentaVersionedTreeDTO as Tree - -from agenta.sdk.models.workflows import ( - WorkflowServiceRequestData, # export - WorkflowServiceResponseData, # export - WorkflowServiceRequest, # export - WorkflowServiceResponse, # export - WorkflowServiceBatchResponse, # export - WorkflowServiceStreamResponse, # export -) - -# aliases ---------------------------------------------------------------------- - - -class WorkflowIdAlias(AliasConfig): - workflow_id: Optional[UUID] = None - artifact_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_id", - ) - - -class WorkflowVariantIdAlias(AliasConfig): - workflow_variant_id: Optional[UUID] = None - variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_variant_id", - ) - - -class WorkflowRevisionIdAlias(AliasConfig): - workflow_revision_id: Optional[UUID] = None - revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_revision_id", - ) - - -# globals ---------------------------------------------------------------------- - - -class WorkflowFlags(BaseModel): - is_custom: bool = False - is_evaluator: bool = False - is_human: bool = False - - -class WorkflowQueryFlags(BaseModel): - is_custom: Optional[bool] = None - is_evaluator: Optional[bool] = None - is_human: Optional[bool] = None - - -# workflows -------------------------------------------------------------------- - - -class Workflow(Artifact): - flags: Optional[WorkflowFlags] = None - - -class WorkflowCreate(ArtifactCreate): - flags: Optional[WorkflowFlags] = None - - -class WorkflowEdit(ArtifactEdit): - flags: Optional[WorkflowFlags] = None - - -class WorkflowQuery(ArtifactQuery): - flags: Optional[WorkflowQueryFlags] = None - - -# workflow variants ------------------------------------------------------------ - - -class WorkflowVariant( - Variant, - WorkflowIdAlias, -): - flags: Optional[WorkflowFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - - -class WorkflowVariantCreate( - VariantCreate, - WorkflowIdAlias, -): - flags: Optional[WorkflowFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - - -class WorkflowVariantEdit(VariantEdit): - flags: Optional[WorkflowFlags] = None - - -class WorkflowVariantQuery(VariantQuery): - flags: Optional[WorkflowQueryFlags] = None - +from oss.src.core.shared.dtos import Tags -# workflow revisions ----------------------------------------------------------- +from oss.src.core.git.dtos import Artifact, Variant, Revision -class WorkflowServiceVersion(BaseModel): - version: Optional[str] = None - - -class WorkflowServiceInterface(WorkflowServiceVersion): - uri: Optional[str] = None # str (Enum) w/ validation - url: Optional[str] = None # str w/ validation - headers: Optional[ - Dict[str, Union[Reference, str]] - ] = None # either hardcoded or a secret - # handler: Optional[Callable] = None - - schemas: Optional[Dict[str, Schema]] = None # json-schema instead of pydantic - - -class WorkflowServiceConfiguration(WorkflowServiceInterface): - script: Optional[Data] = None # str w/ validation - parameters: Optional[Data] = None # configuration values - - -class WorkflowRevisionData(WorkflowServiceConfiguration): - # LEGACY FIELDS +class WorkflowData(BaseModel): service: Optional[dict] = None # url, schema, kind, etc configuration: Optional[dict] = None # parameters, variables, etc @model_validator(mode="after") - def validate_all(self) -> "WorkflowRevisionData": + def validate_all(self) -> "WorkflowData": errors = [] if self.service and self.service.get("agenta") and self.service.get("format"): - _format = self.service.get("format") # pylint: disable=redefined-builtin + format = self.service.get("format") # pylint: disable=redefined-builtin try: - validator_class = self._get_validator_class_from_schema(_format) # type: ignore - validator_class.check_schema(_format) # type: ignore + validator_class = self._get_validator_class_from_schema(format) + validator_class.check_schema(format) except SchemaError as e: errors.append( { @@ -207,7 +39,7 @@ def validate_all(self) -> "WorkflowRevisionData": "msg": f"Invalid JSON Schema: {e.message}", "type": "value_error", "ctx": {"error": str(e)}, - "input": _format, + "input": format, } ) @@ -260,110 +92,37 @@ def _is_valid_http_url(url: str) -> bool: return parsed.scheme in ("http", "https") and bool(parsed.netloc) -class WorkflowRevision( - Revision, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): - flags: Optional[WorkflowFlags] = None - - data: Optional[WorkflowRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) +class WorkflowFlags(BaseModel): + is_custom: Optional[bool] = None + is_evaluator: Optional[bool] = None + is_human: Optional[bool] = None -class WorkflowRevisionCreate( - RevisionCreate, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): +class WorkflowArtifact(Artifact): flags: Optional[WorkflowFlags] = None - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - -class WorkflowRevisionEdit(RevisionEdit): +class WorkflowVariant(Variant): flags: Optional[WorkflowFlags] = None - -class WorkflowRevisionQuery(RevisionQuery): - flags: Optional[WorkflowQueryFlags] = None + artifact_id: Optional[UUID] = None + artifact: Optional[WorkflowArtifact] = None -class WorkflowRevisionCommit( - RevisionCommit, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): +class WorkflowRevision(Revision): + data: Optional[WorkflowData] = None flags: Optional[WorkflowFlags] = None - data: Optional[WorkflowRevisionData] = None + variant_id: Optional[UUID] = None + variant: Optional[WorkflowVariant] = None - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) +class WorkflowQuery(BaseModel): + artifact_ref: Optional[WorkflowArtifact] = None + variant_ref: Optional[WorkflowVariant] = None + revision_ref: Optional[WorkflowRevision] = None -class WorkflowRevisionsLog( - RevisionsLog, - WorkflowIdAlias, - WorkflowVariantIdAlias, - WorkflowRevisionIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - sync_alias("workflow_revision_id", "revision_id", self) - - -# forks ------------------------------------------------------------------------ - - -class WorkflowRevisionFork(RevisionFork): flags: Optional[WorkflowFlags] = None + meta: Optional[Tags] = None - data: Optional[WorkflowRevisionData] = None - - -class WorkflowRevisionForkAlias(AliasConfig): - workflow_revision: Optional[WorkflowRevisionFork] = None - - revision: Optional[RevisionFork] = Field( - default=None, - exclude=True, - alias="workflow_revision", - ) - - -class WorkflowVariantFork(VariantFork): - flags: Optional[WorkflowFlags] = None - - -class WorkflowVariantForkAlias(AliasConfig): - workflow_variant: Optional[WorkflowVariantFork] = None - - variant: Optional[VariantFork] = Field( - default=None, - exclude=True, - alias="workflow_variant", - ) - - -class WorkflowFork( - ArtifactFork, - WorkflowIdAlias, - WorkflowVariantIdAlias, - WorkflowVariantForkAlias, - WorkflowRevisionIdAlias, - WorkflowRevisionForkAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - sync_alias("workflow_variant", "variant", self) - sync_alias("workflow_revision_id", "revision_id", self) - sync_alias("workflow_revision", "revision", self) + include_archived: Optional[bool] = None diff --git a/api/oss/src/core/workflows/service.py b/api/oss/src/core/workflows/service.py index 18e4835b97..55c898e5c7 100644 --- a/api/oss/src/core/workflows/service.py +++ b/api/oss/src/core/workflows/service.py @@ -1,72 +1,16 @@ -from typing import Optional, List, Tuple, Union +from typing import Optional, List from uuid import UUID -from oss.src.utils.logging import get_module_logger from oss.src.core.git.interfaces import GitDAOInterface -from oss.src.core.shared.dtos import Reference, Windowing -from oss.src.core.git.dtos import ( - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - # - VariantCreate, - VariantEdit, - VariantQuery, - # - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, - RevisionsLog, -) +from oss.src.core.shared.dtos import Reference, Meta from oss.src.core.workflows.dtos import ( - Workflow, - WorkflowCreate, - WorkflowEdit, - WorkflowQuery, - WorkflowFork, - WorkflowRevisionsLog, - # + WorkflowData, + WorkflowFlags, + WorkflowArtifact, WorkflowVariant, - WorkflowVariantCreate, - WorkflowVariantEdit, - WorkflowVariantQuery, - # WorkflowRevision, - WorkflowRevisionCreate, - WorkflowRevisionEdit, - WorkflowRevisionQuery, - WorkflowRevisionCommit, - # - WorkflowServiceInterface, - WorkflowServiceRequest, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, - # - WorkflowRevisionData, - WorkflowServiceRequestData, - WorkflowServiceResponseData, -) - -from oss.src.services.auth_helper import sign_secret_token -from oss.src.services.db_manager import get_project_by_id - -from agenta.sdk.decorators.running import ( - invoke_workflow as _invoke_workflow, - inspect_workflow as _inspect_workflow, ) -from agenta.sdk.models.workflows import ( - WorkflowServiceRequest, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, -) - -log = get_module_logger(__name__) - - -# ------------------------------------------------------------------------------ class WorkflowsService: @@ -77,693 +21,620 @@ def __init__( ): self.workflows_dao = workflows_dao - # workflows ---------------------------------------------------------------- + ## -- artifacts ------------------------------------------------------------ - async def create_workflow( + async def create_artifact( self, *, project_id: UUID, user_id: UUID, # - workflow_create: WorkflowCreate, + artifact_slug: str, # - workflow_id: Optional[UUID] = None, - ) -> Optional[Workflow]: - artifact_create = ArtifactCreate( - **workflow_create.model_dump(mode="json", exclude_none=True), - ) - + artifact_flags: Optional[WorkflowFlags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + ) -> Optional[WorkflowArtifact]: artifact = await self.workflows_dao.create_artifact( project_id=project_id, user_id=user_id, # - artifact_create=artifact_create, + artifact_slug=artifact_slug, # - artifact_id=workflow_id, + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + artifact_meta=artifact_meta, + artifact_name=artifact_name or artifact_slug, + artifact_description=artifact_description, ) if not artifact: return None - workflow = Workflow(**artifact.model_dump(mode="json")) + artifact = WorkflowArtifact(**artifact.model_dump()) - return workflow + return artifact - async def fetch_workflow( + async def fetch_artifact( self, *, project_id: UUID, # - workflow_ref: Reference, - ) -> Optional[Workflow]: + artifact_ref: Reference, + ) -> Optional[WorkflowArtifact]: artifact = await self.workflows_dao.fetch_artifact( project_id=project_id, # - artifact_ref=workflow_ref, + artifact_ref=artifact_ref, ) if not artifact: return None - workflow = Workflow(**artifact.model_dump(mode="json")) + artifact = WorkflowArtifact(**artifact.model_dump()) - return workflow + return artifact - async def edit_workflow( + async def edit_artifact( self, *, project_id: UUID, user_id: UUID, # - workflow_edit: WorkflowEdit, - ) -> Optional[Workflow]: - artifact_edit = ArtifactEdit( - **workflow_edit.model_dump(mode="json", exclude_none=True), - ) - + artifact_id: UUID, + # + artifact_flags: Optional[WorkflowFlags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, + ) -> Optional[WorkflowArtifact]: artifact = await self.workflows_dao.edit_artifact( project_id=project_id, user_id=user_id, # - artifact_edit=artifact_edit, + artifact_id=artifact_id, + # + artifact_flags=(artifact_flags.model_dump() if artifact_flags else None), + artifact_meta=artifact_meta, + artifact_name=artifact_name, + artifact_description=artifact_description, ) if not artifact: return None - workflow = Workflow(**artifact.model_dump(mode="json")) + artifact = WorkflowArtifact(**artifact.model_dump()) - return workflow + return artifact - async def query_workflows( + async def archive_artifact( self, *, project_id: UUID, + user_id: UUID, # - workflow_query: Optional[WorkflowQuery] = None, - # - workflow_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[Workflow]: - artifact_query = ( - ArtifactQuery( - **workflow_query.model_dump(mode="json", exclude_none=True), - ) - if workflow_query - else ArtifactQuery() - ) - - artifacts = await self.workflows_dao.query_artifacts( + artifact_id: UUID, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.archive_artifact( project_id=project_id, + user_id=user_id, # - artifact_query=artifact_query, - # - artifact_refs=workflow_refs, - # - include_archived=include_archived, - # - windowing=windowing, + artifact_id=artifact_id, ) - workflows = [ - Workflow( - **artifact.model_dump(mode="json"), - ) - for artifact in artifacts - ] + if not artifact: + return None + + artifact = WorkflowArtifact(**artifact.model_dump()) - return workflows + return artifact - async def archive_workflow( + async def unarchive_artifact( self, *, project_id: UUID, user_id: UUID, # - workflow_id: UUID, - ) -> Optional[Workflow]: - artifact = await self.workflows_dao.archive_artifact( + artifact_id: UUID, + ) -> Optional[WorkflowArtifact]: + artifact = await self.workflows_dao.unarchive_artifact( project_id=project_id, user_id=user_id, # - artifact_id=workflow_id, + artifact_id=artifact_id, ) if not artifact: return None - _workflow = Workflow(**artifact.model_dump(mode="json")) + artifact = WorkflowArtifact(**artifact.model_dump()) - return _workflow + return artifact - async def unarchive_workflow( + async def query_artifacts( self, *, project_id: UUID, - user_id: UUID, # - workflow_id: UUID, - ) -> Optional[Workflow]: - artifact = await self.workflows_dao.unarchive_artifact( + artifact_flags: Optional[WorkflowFlags] = None, + artifact_meta: Optional[Meta] = None, + # + include_archived: Optional[bool] = None, + ) -> List[WorkflowArtifact]: + artifacts = await self.workflows_dao.query_artifacts( project_id=project_id, - user_id=user_id, # - artifact_id=workflow_id, + artifact_flags=( + artifact_flags.model_dump(exclude_none=True) if artifact_flags else None + ), + artifact_meta=artifact_meta, + # + include_archived=include_archived, ) - if not artifact: - return None + artifacts = [ + WorkflowArtifact(**artifact.model_dump()) for artifact in artifacts + ] - _workflow = Workflow(**artifact.model_dump(mode="json")) + return artifacts - return _workflow + ## ------------------------------------------------------------------------- - # workflow variants -------------------------------------------------------- + ## -- variants ------------------------------------------------------------- - async def create_workflow_variant( + async def create_variant( self, *, project_id: UUID, user_id: UUID, # - workflow_variant_create: WorkflowVariantCreate, + artifact_id: UUID, + # + variant_slug: str, + # + variant_flags: Optional[WorkflowFlags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[WorkflowVariant]: - _variant_create = VariantCreate( - **workflow_variant_create.model_dump(mode="json", exclude_none=True), - ) - variant = await self.workflows_dao.create_variant( project_id=project_id, user_id=user_id, # - variant_create=_variant_create, + artifact_id=artifact_id, + # + variant_slug=variant_slug, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name or variant_slug, + variant_description=variant_description, ) if not variant: return None - _workflow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + variant = WorkflowVariant(**variant.model_dump()) - return _workflow_variant + return variant - async def fetch_workflow_variant( + async def fetch_variant( self, *, project_id: UUID, # - workflow_ref: Optional[Reference] = None, - workflow_variant_ref: Optional[Reference] = None, + artifact_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, ) -> Optional[WorkflowVariant]: variant = await self.workflows_dao.fetch_variant( project_id=project_id, # - artifact_ref=workflow_ref, - variant_ref=workflow_variant_ref, + artifact_ref=artifact_ref, + variant_ref=variant_ref, ) if not variant: return None - _workflow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + variant = WorkflowVariant(**variant.model_dump()) - return _workflow_variant + return variant - async def edit_workflow_variant( + async def edit_variant( self, *, project_id: UUID, user_id: UUID, # - workflow_variant_edit: WorkflowVariantEdit, + variant_id: UUID, + # + variant_flags: Optional[WorkflowFlags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[WorkflowVariant]: - _variant_edit = VariantEdit( - **workflow_variant_edit.model_dump(mode="json", exclude_none=True), - ) - variant = await self.workflows_dao.edit_variant( project_id=project_id, user_id=user_id, # - variant_edit=_variant_edit, + variant_id=variant_id, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name, + variant_description=variant_description, ) if not variant: return None - _workflow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + variant = WorkflowVariant(**variant.model_dump()) - return _workflow_variant + return variant - async def query_workflow_variants( + async def archive_variant( self, *, project_id: UUID, + user_id: UUID, # - workflow_variant_query: Optional[WorkflowVariantQuery] = None, - # - workflow_refs: Optional[List[Reference]] = None, - workflow_variant_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[WorkflowVariant]: - _variant_query = ( - VariantQuery( - **workflow_variant_query.model_dump(mode="json", exclude_none=True), - ) - if workflow_variant_query - else VariantQuery() - ) - - variants = await self.workflows_dao.query_variants( + variant_id: UUID, + ) -> Optional[WorkflowVariant]: + variant = await self.workflows_dao.archive_variant( project_id=project_id, + user_id=user_id, # - variant_query=_variant_query, - # - artifact_refs=workflow_refs, - variant_refs=workflow_variant_refs, - # - include_archived=include_archived, - # - windowing=windowing, + variant_id=variant_id, ) - _workflow_variants = [ - WorkflowVariant( - **variant.model_dump(mode="json"), - ) - for variant in variants - ] + if not variant: + return None + + variant = WorkflowVariant(**variant.model_dump()) - return _workflow_variants + return variant - async def fork_workflow_variant( + async def unarchive_variant( self, *, project_id: UUID, user_id: UUID, # - workflow_fork: WorkflowFork, + variant_id: UUID, ) -> Optional[WorkflowVariant]: - _artifact_fork = ArtifactFork( - **workflow_fork.model_dump(mode="json"), - ) - - variant = await self.workflows_dao.fork_variant( + variant = await self.workflows_dao.unarchive_variant( project_id=project_id, user_id=user_id, # - artifact_fork=_artifact_fork, + variant_id=variant_id, ) if not variant: return None - _workflow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + variant = WorkflowVariant(**variant.model_dump()) - return _workflow_variant + return variant - async def archive_workflow_variant( + async def query_variants( self, *, project_id: UUID, - user_id: UUID, # - workflow_variant_id: UUID, - ) -> Optional[WorkflowVariant]: - variant = await self.workflows_dao.archive_variant( + variant_flags: Optional[WorkflowFlags] = None, + variant_meta: Optional[Meta] = None, + # + include_archived: Optional[bool] = None, + ) -> List[WorkflowVariant]: + variants = await self.workflows_dao.query_variants( project_id=project_id, - user_id=user_id, # - variant_id=workflow_variant_id, + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + # + include_archived=include_archived, ) - if not variant: - return None + variants = [WorkflowVariant(**variant.model_dump()) for variant in variants] - _workflow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + return variants - return _workflow_variant + ## ......................................................................... - async def unarchive_workflow_variant( + async def fork_variant( self, *, project_id: UUID, user_id: UUID, # - workflow_variant_id: UUID, + variant_slug: str, + revision_slug: str, + # + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + depth: Optional[int] = None, + # + variant_flags: Optional[WorkflowFlags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + # + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, ) -> Optional[WorkflowVariant]: - variant = await self.workflows_dao.unarchive_variant( + variant = await self.workflows_dao.fork_variant( project_id=project_id, user_id=user_id, # - variant_id=workflow_variant_id, + variant_slug=variant_slug, + revision_slug=revision_slug, + # + variant_id=variant_id, + revision_id=revision_id, + depth=depth, + # + variant_flags=(variant_flags.model_dump() if variant_flags else None), + variant_meta=variant_meta, + variant_name=variant_name or variant_slug, + variant_description=variant_description, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name or revision_slug, + revision_description=revision_description, + revision_message=revision_message, ) if not variant: return None - _workdlow_variant = WorkflowVariant( - **variant.model_dump(mode="json"), - ) + variant = WorkflowVariant(**variant.model_dump()) + + return variant - return _workdlow_variant + ## ------------------------------------------------------------------------- - # workflow revisions ------------------------------------------------------- + ## -- revisions ------------------------------------------------------------ - async def create_workflow_revision( + async def create_revision( self, *, project_id: UUID, user_id: UUID, # - workflow_revision_create: WorkflowRevisionCreate, + artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[WorkflowRevision]: - _revision_create = RevisionCreate( - **workflow_revision_create.model_dump(mode="json", exclude_none=True), - ) - revision = await self.workflows_dao.create_revision( project_id=project_id, user_id=user_id, # - revision_create=_revision_create, + artifact_id=artifact_id, + variant_id=variant_id, + # + revision_slug=revision_slug, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name or revision_slug, + revision_description=revision_description, ) if not revision: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) + revision = WorkflowRevision(**revision.model_dump()) - return _workflow_revision + return revision - async def fetch_workflow_revision( + async def fetch_revision( self, *, project_id: UUID, # - workflow_ref: Optional[Reference] = None, - workflow_variant_ref: Optional[Reference] = None, - workflow_revision_ref: Optional[Reference] = None, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, ) -> Optional[WorkflowRevision]: - if not workflow_ref and not workflow_variant_ref and not workflow_revision_ref: - return None - - if workflow_ref and not workflow_variant_ref and not workflow_revision_ref: - workflow = await self.fetch_workflow( - project_id=project_id, - # - workflow_ref=workflow_ref, - ) - - if not workflow: - return None - - workflow_ref = Reference( - id=workflow.id, - slug=workflow.slug, - ) - - workflow_variant = await self.fetch_workflow_variant( - project_id=project_id, - # - workflow_ref=workflow_ref, - ) - - if not workflow_variant: - return None - - workflow_variant_ref = Reference( - id=workflow_variant.id, - slug=workflow_variant.slug, - ) - revision = await self.workflows_dao.fetch_revision( project_id=project_id, # - variant_ref=workflow_variant_ref, - revision_ref=workflow_revision_ref, + variant_ref=variant_ref, + revision_ref=revision_ref, ) if not revision: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) + revision = WorkflowRevision(**revision.model_dump()) - return _workflow_revision + return revision - async def edit_workflow_revision( + async def edit_revision( self, *, project_id: UUID, user_id: UUID, # - workflow_revision_edit: WorkflowRevisionEdit, + revision_id: UUID, + # + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[WorkflowRevision]: - _workflow_revision_edit = RevisionEdit( - **workflow_revision_edit.model_dump(mode="json", exclude_none=True), - ) - revision = await self.workflows_dao.edit_revision( project_id=project_id, user_id=user_id, # - revision_edit=_workflow_revision_edit, + revision_id=revision_id, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name, + revision_description=revision_description, ) if not revision: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) + revision = WorkflowRevision(**revision.model_dump()) - return _workflow_revision + return revision - async def query_workflow_revisions( + async def archive_revision( self, *, project_id: UUID, + user_id: UUID, # - workflow_revision_query: Optional[WorkflowRevisionQuery] = None, - # - workflow_refs: Optional[List[Reference]] = None, - workflow_variant_refs: Optional[List[Reference]] = None, - workflow_revision_refs: Optional[List[Reference]] = None, - # - include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[WorkflowRevision]: - _revision_query = ( - RevisionQuery( - **workflow_revision_query.model_dump(mode="json", exclude_none=True), - ) - if workflow_revision_query - else RevisionQuery() - ) - - revisions = await self.workflows_dao.query_revisions( + revision_id: UUID, + ) -> Optional[WorkflowRevision]: + revision = await self.workflows_dao.archive_revision( project_id=project_id, + user_id=user_id, # - revision_query=_revision_query, - # - artifact_refs=workflow_refs, - variant_refs=workflow_variant_refs, - revision_refs=workflow_revision_refs, - # - include_archived=include_archived, - # - windowing=windowing, + revision_id=revision_id, ) - _workflow_revisions = [ - WorkflowRevision( - **revision.model_dump(mode="json"), - ) - for revision in revisions - ] + if not revision: + return None + + revision = WorkflowRevision(**revision.model_dump()) - return _workflow_revisions + return revision - async def commit_workflow_revision( + async def unarchive_revision( self, *, project_id: UUID, user_id: UUID, # - workflow_revision_commit: WorkflowRevisionCommit, + revision_id: UUID, ) -> Optional[WorkflowRevision]: - _revision_commit = RevisionCommit( - **workflow_revision_commit.model_dump(mode="json", exclude_none=True), - ) - - if not _revision_commit.artifact_id: - if not _revision_commit.variant_id: - return None - - variant = await self.workflows_dao.fetch_variant( - project_id=project_id, - # - variant_ref=Reference(id=_revision_commit.variant_id), - ) - - if not variant: - return None - - _revision_commit.artifact_id = variant.artifact_id - - revision = await self.workflows_dao.commit_revision( + revision = await self.workflows_dao.unarchive_revision( project_id=project_id, user_id=user_id, # - revision_commit=_revision_commit, + revision_id=revision_id, ) if not revision: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) + revision = WorkflowRevision(**revision.model_dump()) - return _workflow_revision + return revision - async def log_workflow_revisions( + async def query_revisions( self, *, project_id: UUID, # - workflow_revisions_log: WorkflowRevisionsLog, + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Meta] = None, + # + include_archived: Optional[bool] = None, ) -> List[WorkflowRevision]: - _revisions_log = RevisionsLog( - **workflow_revisions_log.model_dump(mode="json"), - ) - - revisions = await self.workflows_dao.log_revisions( + revisions = await self.workflows_dao.query_revisions( project_id=project_id, # - revisions_log=_revisions_log, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + # + include_archived=include_archived, ) - _workflow_revisions = [ - WorkflowRevision( - **revision.model_dump(mode="json"), - ) - for revision in revisions + revisions = [ + WorkflowRevision(**revision.model_dump()) for revision in revisions ] - return _workflow_revisions + return revisions + + ## ......................................................................... - async def archive_workflow_revision( + async def commit_revision( self, *, project_id: UUID, user_id: UUID, # - workflow_revision_id: UUID, + # artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[WorkflowFlags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, + revision_data: Optional[WorkflowData] = None, ) -> Optional[WorkflowRevision]: - revision = await self.workflows_dao.archive_revision( + variant = await self.workflows_dao.fetch_variant( project_id=project_id, - user_id=user_id, # - revision_id=workflow_revision_id, + variant_ref=Reference(id=variant_id), ) - if not revision: + if not variant: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) - - return _workflow_revision - - async def unarchive_workflow_revision( - self, - *, - project_id: UUID, - user_id: UUID, - # - workflow_revision_id: UUID, - ) -> Optional[WorkflowRevision]: - revision = await self.workflows_dao.unarchive_revision( + revision = await self.workflows_dao.commit_revision( project_id=project_id, user_id=user_id, # - revision_id=workflow_revision_id, + artifact_id=variant.artifact_id, + variant_id=variant_id, + # + revision_slug=revision_slug, + # + revision_flags=(revision_flags.model_dump() if revision_flags else None), + revision_meta=revision_meta, + revision_name=revision_name or revision_slug, + revision_description=revision_description, + revision_message=revision_message, + revision_data=(revision_data.model_dump() if revision_data else None), ) if not revision: return None - _workflow_revision = WorkflowRevision( - **revision.model_dump(mode="json"), - ) - - return _workflow_revision + revision = WorkflowRevision(**revision.model_dump()) - # workflow services -------------------------------------------------------- + return revision - async def invoke_workflow( + async def log_revisions( self, *, project_id: UUID, - user_id: UUID, # - request: WorkflowServiceRequest, - # - **kwargs, - ) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse,]: - project = await get_project_by_id( - project_id=str(project_id), - ) - - secret_token = await sign_secret_token( - user_id=str(user_id), - project_id=str(project_id), - workspace_id=str(project.workspace_id), - organization_id=str(project.organization_id), - ) - - credentials = f"Secret {secret_token}" - - return await _invoke_workflow( - request=request, - # - credentials=credentials, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + depth: Optional[int] = None, + ) -> List[WorkflowRevision]: + revisions = await self.workflows_dao.log_revisions( + project_id=project_id, # - **kwargs, + variant_ref=variant_ref, + revision_ref=revision_ref, + depth=depth, ) - async def inspect_workflow( - self, - *, - project_id: UUID, - user_id: UUID, - # - request: WorkflowServiceRequest, - ) -> WorkflowServiceRequest: - return await _inspect_workflow( - request=request, - ) + revisions = [ + WorkflowRevision(**revision.model_dump()) for revision in revisions + ] + + return revisions - # -------------------------------------------------------------------------- + ## ------------------------------------------------------------------------- diff --git a/api/oss/src/crons/queries.sh b/api/oss/src/crons/queries.sh deleted file mode 100644 index b9e8c7a6e1..0000000000 --- a/api/oss/src/crons/queries.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -eu - -AGENTA_AUTH_KEY=$(tr '\0' '\n' < /proc/1/environ | grep ^AGENTA_AUTH_KEY= | cut -d= -f2-) -TRIGGER_INTERVAL=$(awk 'NR==2 {split($1, a, "/"); print (a[2] ? a[2] : 1)}' /etc/cron.d/queries-cron) -NOW_UTC=$(date -u "+%Y-%m-%dT%H:%M:00Z") -MINUTE=$(date -u "+%M" | sed 's/^0*//') -ROUNDED_MINUTE=$(( (MINUTE / TRIGGER_INTERVAL) * TRIGGER_INTERVAL )) -TRIGGER_DATETIME=$(date -u "+%Y-%m-%dT%H") -TRIGGER_DATETIME="${TRIGGER_DATETIME}:$(printf "%02d" $ROUNDED_MINUTE):00Z" - - -echo "--------------------------------------------------------" -echo "[$(date)] queries.sh running from cron" >> /proc/1/fd/1 - -# Make POST request, show status and response -curl \ - -s \ - -w "\nHTTP_STATUS:%{http_code}\n" \ - -X POST \ - -H "Authorization: Access ${AGENTA_AUTH_KEY}" \ - "http://api:8000/admin/evaluations/runs/refresh?trigger_interval=${TRIGGER_INTERVAL}&trigger_datetime=${TRIGGER_DATETIME}" || echo "❌ CURL failed" - -echo "[$(date)] queries.sh done" >> /proc/1/fd/1 \ No newline at end of file diff --git a/api/oss/src/crons/queries.txt b/api/oss/src/crons/queries.txt deleted file mode 100644 index 586a61af8e..0000000000 --- a/api/oss/src/crons/queries.txt +++ /dev/null @@ -1,2 +0,0 @@ -* * * * * root echo "cron test $(date)" >> /proc/1/fd/1 2>&1 -*/1 * * * * root sh /queries.sh >> /proc/1/fd/1 2>&1 diff --git a/api/oss/src/dbs/postgres/blobs/dao.py b/api/oss/src/dbs/postgres/blobs/dao.py index 6ca13bb348..65ffb03d06 100644 --- a/api/oss/src/dbs/postgres/blobs/dao.py +++ b/api/oss/src/dbs/postgres/blobs/dao.py @@ -1,23 +1,21 @@ from typing import Optional, List, TypeVar, Type -from uuid import UUID -from datetime import datetime, timezone +from uuid import UUID, uuid4 +from json import dumps +from hashlib import blake2b -from sqlalchemy import select +from sqlalchemy import select, or_ from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import suppress_exceptions - -from oss.src.core.shared.exceptions import EntityCreationConflict -from oss.src.core.shared.dtos import Windowing -from oss.src.core.blobs.dtos import Blob, BlobCreate, BlobEdit, BlobQuery -from oss.src.core.blobs.interfaces import BlobsDAOInterface -from oss.src.core.blobs.utils import compute_blob_id - -from oss.src.dbs.postgres.shared.utils import apply_windowing -from oss.src.dbs.postgres.shared.exceptions import check_entity_creation_conflict +from oss.src.dbs.postgres.shared.utils import suppress_exceptions from oss.src.dbs.postgres.shared.engine import engine -from oss.src.dbs.postgres.blobs.mappings import map_dbe_to_dto, map_dto_to_dbe +from oss.src.core.blobs.interfaces import BlobDAOInterface +from oss.src.core.blobs.dtos import Blob +from oss.src.core.shared.dtos import Reference +from oss.src.dbs.postgres.blobs.mappings import ( + map_dbe_to_dto, + map_dto_to_dbe, +) log = get_module_logger(__name__) @@ -25,7 +23,7 @@ T = TypeVar("T") -class BlobsDAO(BlobsDAOInterface): +class BlobDAO(BlobDAOInterface): def __init__( self, *, @@ -35,86 +33,44 @@ def __init__( # ─ blobs ────────────────────────────────────────────────────────────────── - @suppress_exceptions(exclude=[EntityCreationConflict]) + @suppress_exceptions() async def add_blob( self, *, project_id: UUID, - user_id: UUID, # - blob_create: BlobCreate, + blob: Blob, ) -> Optional[Blob]: - blob = Blob( - id=compute_blob_id( - blob_data=blob_create.data, - set_id=blob_create.set_id, - ), - # - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - # - flags=blob_create.flags, - tags=blob_create.tags, - meta=blob_create.meta, - # - data=blob_create.data, - # - set_id=blob_create.set_id, + blob.id = self._blob_id( + blob_data=blob.data, + set_id=blob.set_id, ) + blob.slug = blob.slug or uuid4().hex - try: - async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( - self.BlobDBE.project_id == project_id, # type: ignore - ) - - stmt = select(self.BlobDBE).filter( - self.BlobDBE.id == blob.id, # type: ignore - ) - - result = await session.execute(stmt) - - existing_dbe = result.scalar_one_or_none() - - if not existing_dbe: - blob_dbe = map_dto_to_dbe( - DBE=self.BlobDBE, # type: ignore - project_id=project_id, - dto=blob, - ) - session.add(blob_dbe) + async with engine.core_session() as session: + stmt = select(self.BlobDBE).filter( + self.BlobDBE.project_id == project_id, + self.BlobDBE.id == blob.id, + ) + result = await session.execute(stmt) - await session.commit() + existing_dbe = result.scalar_one_or_none() - return await self.fetch_blob( + if not existing_dbe: + blob_dbe = map_dto_to_dbe( + DBE=self.BlobDBE, # type: ignore project_id=project_id, - # - blob_id=blob.id, # type: ignore + dto=blob, ) + session.add(blob_dbe) - except Exception as e: - log.warn(f"Failed to add blob: {e}") - check_entity_creation_conflict(e) - - raise + await session.commit() - @suppress_exceptions() - async def fetch_blob( - self, - *, - project_id: UUID, - # - blob_id: UUID, - ) -> Optional[Blob]: - async with engine.core_session() as session: stmt = select(self.BlobDBE).filter( - self.BlobDBE.project_id == project_id, # type: ignore + self.BlobDBE.project_id == project_id, + self.BlobDBE.id == blob.id, ) - stmt = stmt.filter(self.BlobDBE.id == blob_id) # type: ignore - - stmt = stmt.limit(1) - result = await session.execute(stmt) blob_dbe = result.scalar_one_or_none() @@ -123,47 +79,40 @@ async def fetch_blob( return None blob = map_dbe_to_dto( - DTO=Blob, - dbe=blob_dbe, # type: ignore + DTO=Blob, # type: ignore + dbe=blob_dbe, ) return blob @suppress_exceptions() - async def edit_blob( + async def fetch_blob( self, *, project_id: UUID, - user_id: UUID, # - blob_edit: BlobEdit, + blob_ref: Optional[Reference] = None, ) -> Optional[Blob]: async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( + query = select(self.BlobDBE).filter( self.BlobDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.BlobDBE.id == blob_edit.id) # type: ignore + if blob_ref: + if blob_ref.id: + query = query.filter(self.BlobDBE.id == blob_ref.id) + elif blob_ref.slug: + query = query.filter(self.BlobDBE.slug == blob_ref.slug) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) blob_dbe = result.scalar_one_or_none() if not blob_dbe: return None - for key, value in blob_edit.model_dump(exclude_unset=True).items(): - setattr(blob_dbe, key, value) - - blob_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - blob_dbe.updated_by_id = user_id # type: ignore - - await session.commit() - - await session.refresh(blob_dbe) - blob = map_dbe_to_dto( DTO=Blob, dbe=blob_dbe, # type: ignore @@ -180,15 +129,15 @@ async def remove_blob( blob_id: UUID, ) -> Optional[Blob]: async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( + query = select(self.BlobDBE).filter( self.BlobDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.BlobDBE.id == blob_id) # type: ignore + query = query.filter(self.BlobDBE.id == blob_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) blob_dbe = result.scalar_one_or_none() @@ -206,162 +155,112 @@ async def remove_blob( return blob - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) + @suppress_exceptions() async def add_blobs( self, *, project_id: UUID, - user_id: UUID, # - blob_creates: List[BlobCreate], + blobs: List[Blob], ) -> List[Blob]: - blobs: List[Blob] = [ - Blob( - id=compute_blob_id( - blob_data=blob_create.data, - set_id=blob_create.set_id, - ), - # - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - # - flags=blob_create.flags, - tags=blob_create.tags, - meta=blob_create.meta, - # - data=blob_create.data, - # - set_id=blob_create.set_id, + for blob in blobs: + blob.id = self._blob_id( + blob_data=blob.data, + set_id=blob.set_id, ) - for blob_create in blob_creates - ] + blob.slug = blob.slug or uuid4().hex blob_ids = [blob.id for blob in blobs] - try: - async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( - self.BlobDBE.project_id == project_id, # type: ignore - ) - - stmt = select(self.BlobDBE).filter( - self.BlobDBE.id.in_(blob_ids), # type: ignore - ) - - existing = await session.execute(stmt) - - existing_dbes = existing.scalars().all() - - existing_ids = {b.id for b in existing_dbes} # type: ignore + async with engine.core_session() as session: + stmt = select(self.BlobDBE).filter( + self.BlobDBE.project_id == project_id, + self.BlobDBE.id.in_(blob_ids), + ) - new_blobs = list( - { - blob.id: blob for blob in blobs if blob.id not in existing_ids - }.values() - ) + existing = await session.execute(stmt) - blob_dbes = [ - map_dto_to_dbe( - DBE=self.BlobDBE, # type: ignore - project_id=project_id, - dto=blob, - ) - for blob in new_blobs - ] + existing_dbes = existing.scalars().all() - session.add_all(blob_dbes) + existing_ids = {b.id for b in existing_dbes} - await session.commit() + new_blobs = [blob for blob in blobs if blob.id not in existing_ids] - all_blobs = await self.fetch_blobs( + blob_dbes = [ + map_dto_to_dbe( + DBE=self.BlobDBE, # type: ignore project_id=project_id, - # - blob_ids=blob_ids, # type: ignore + dto=blob, ) + for blob in new_blobs + ] - return all_blobs - - except Exception as e: - log.warn(f"Failed to add blobs: {e}") - check_entity_creation_conflict(e) + session.add_all(blob_dbes) - raise + await session.commit() - @suppress_exceptions() - async def fetch_blobs( - self, - *, - project_id: UUID, - # - blob_ids: List[UUID], - ) -> List[Blob]: - async with engine.core_session() as session: stmt = select(self.BlobDBE).filter( - self.BlobDBE.project_id == project_id, # type: ignore + self.BlobDBE.project_id == project_id, + self.BlobDBE.id.in_(blob_ids), ) - stmt = stmt.filter(self.BlobDBE.id.in_(blob_ids)) # type: ignore - result = await session.execute(stmt) blob_dbes = result.scalars().all() - if not blob_dbes: - return [] - - _blobs = { - blob_dbe.id: map_dbe_to_dto( # type: ignore - DTO=Blob, - dbe=blob_dbe, # type: ignore + blobs = [ + map_dbe_to_dto( + DTO=Blob, # type: ignore + dbe=dbe, ) - for blob_dbe in blob_dbes - } - - blobs = [_blobs.get(blob_id) for blob_id in blob_ids if blob_id in _blobs] - blobs = [blob for blob in blobs if blob is not None] + for dbe in blob_dbes + ] return blobs @suppress_exceptions() - async def edit_blobs( + async def fetch_blobs( self, *, project_id: UUID, - user_id: UUID, # - blob_edits: List[BlobEdit], + set_id: Optional[UUID] = None, + # + blob_refs: Optional[List[Reference]] = None, + # + limit: Optional[int] = None, ) -> List[Blob]: async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( + query = select(self.BlobDBE).filter( self.BlobDBE.project_id == project_id, # type: ignore ) - blob_ids = [blob_edit.id for blob_edit in blob_edits] + if set_id: + query = query.filter(self.BlobDBE.set_id == set_id) - stmt = stmt.filter(self.BlobDBE.id.in_(blob_ids)) # type: ignore + if blob_refs: + blob_ids = [blob_ref.id for blob_ref in blob_refs if blob_ref.id] + blob_slugs = [blob_ref.slug for blob_ref in blob_refs if blob_ref.slug] - stmt = stmt.limit(len(blob_edits)) + if blob_ids or blob_slugs: + filters = [] - result = await session.execute(stmt) - - blob_dbes = result.scalars().all() + if blob_ids: + filters.append(self.BlobDBE.id.in_(blob_ids)) + if blob_slugs: + filters.append(self.BlobDBE.slug.in_(blob_slugs)) - if not blob_dbes: - return [] + query = query.filter(or_(*filters)) - for blob_dbe in blob_dbes: - for blob_edit in blob_edits: - if blob_dbe.id == blob_edit.id: # type: ignore - for key, value in blob_edit.model_dump().items(): - setattr(blob_dbe, key, value) + if limit: + query = query.limit(limit) - blob_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - blob_dbe.updated_by_id = user_id # type: ignore + result = await session.execute(query) - await session.commit() + blob_dbes = result.scalars().all() - for blob_dbe in blob_dbes: - await session.refresh(blob_dbe) + if not blob_dbes: + return [] blobs = [ map_dbe_to_dto( @@ -382,15 +281,15 @@ async def remove_blobs( blob_ids: List[UUID], ) -> List[Blob]: async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( + query = select(self.BlobDBE).filter( self.BlobDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.BlobDBE.id.in_(blob_ids)) # type: ignore + query = query.filter(self.BlobDBE.id.in_(blob_ids)) - stmt = stmt.limit(len(blob_ids)) + query = query.limit(len(blob_ids)) - result = await session.execute(stmt) + result = await session.execute(query) blob_dbes = result.scalars().all() @@ -412,66 +311,31 @@ async def remove_blobs( return blobs - @suppress_exceptions() - async def query_blobs( - self, - *, - project_id: UUID, - # - blob_query: BlobQuery, - # - windowing: Optional[Windowing] = None, - ) -> List[Blob]: - async with engine.core_session() as session: - stmt = select(self.BlobDBE).filter( - self.BlobDBE.project_id == project_id, # type: ignore - ) - - if blob_query.set_ids: - stmt = stmt.filter(self.BlobDBE.set_id.in_(blob_query.set_ids)) # type: ignore - - if blob_query.blob_ids: - stmt = stmt.filter(self.BlobDBE.id.in_(blob_query.blob_ids)) # type: ignore - - if blob_query.flags: - stmt = stmt.filter( - self.BlobDBE.flags.contains(blob_query.flags), # type: ignore - ) - - if blob_query.tags: - stmt = stmt.filter( - self.BlobDBE.tags.contains(blob_query.tags), # type: ignore - ) + # ────────────────────────────────────────────────────────────────────────── - if blob_query.meta: - stmt = stmt.filter( - self.BlobDBE.meta.contains(blob_query.meta), # type: ignore - ) + # ─ helpers ──────────────────────────────────────────────────────────────── - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=self.BlobDBE, - attribute="created_at", # UUID4 - order="ascending", # data-style - windowing=windowing, - ) + def _blob_id( + self, + *, + blob_data: dict, + set_id: UUID, + ) -> UUID: + # Deterministically serialize the blob data + json_blob_data = dumps(blob_data, sort_keys=True, separators=(",", ":")) - result = await session.execute(stmt) + # Combine with set_id + unhashed = f"{set_id}{json_blob_data}".encode("utf-8") - blob_dbes = result.scalars().all() + # Blake2b with 16-byte digest + hashed = bytearray(blake2b(unhashed, digest_size=16).digest()) - if not blob_dbes: - return [] + # Force version 5 (set the version bits: 0101) + hashed[6] = (hashed[6] & 0x0F) | 0x50 - blobs = [ - map_dbe_to_dto( - DTO=Blob, - dbe=blob_dbe, # type: ignore - ) - for blob_dbe in blob_dbes - ] + # Force variant RFC 4122 (bits 10xx) + hashed[8] = (hashed[8] & 0x3F) | 0x80 - return blobs + return UUID(bytes=bytes(hashed)) # ────────────────────────────────────────────────────────────────────────── diff --git a/api/oss/src/dbs/postgres/blobs/dbas.py b/api/oss/src/dbs/postgres/blobs/dbas.py index e6ea2486b8..250392b628 100644 --- a/api/oss/src/dbs/postgres/blobs/dbas.py +++ b/api/oss/src/dbs/postgres/blobs/dbas.py @@ -1,23 +1,9 @@ from sqlalchemy import Column, UUID -from oss.src.dbs.postgres.shared.dbas import ( - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - DataDBA, -) +from oss.src.dbs.postgres.shared.dbas import IdentifierDBA, SlugDBA, DataDBA -class BlobDBA( - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - DataDBA, -): +class BlobDBA(IdentifierDBA, SlugDBA, DataDBA): __abstract__ = True set_id = Column( diff --git a/api/oss/src/dbs/postgres/evaluations/dao.py b/api/oss/src/dbs/postgres/evaluations/dao.py deleted file mode 100644 index 9f6535dbf5..0000000000 --- a/api/oss/src/dbs/postgres/evaluations/dao.py +++ /dev/null @@ -1,2694 +0,0 @@ -from typing import Optional, List, Tuple, Dict -from uuid import UUID -from datetime import datetime, timezone - -from sqlalchemy.ext.asyncio import AsyncSession -from sqlalchemy.future import select -from sqlalchemy import not_ -import sqlalchemy -from sqlalchemy.orm.attributes import flag_modified - - -from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import suppress_exceptions - -from oss.src.core.shared.exceptions import EntityCreationConflict -from oss.src.core.shared.dtos import Windowing, Reference -from oss.src.core.evaluations.interfaces import EvaluationsDAOInterface -from oss.src.core.evaluations.types import EvaluationClosedConflict -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationRunFlags, - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationRunQuery, - # - EvaluationScenario, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationScenarioQuery, - # - EvaluationResult, - EvaluationResultCreate, - EvaluationResultEdit, - EvaluationResultQuery, - # - EvaluationMetrics, - EvaluationMetricsCreate, - EvaluationMetricsEdit, - EvaluationMetricsQuery, - # - EvaluationQueue, - EvaluationQueueCreate, - EvaluationQueueEdit, - EvaluationQueueQuery, -) - -from oss.src.dbs.postgres.shared.utils import apply_windowing -from oss.src.dbs.postgres.shared.exceptions import check_entity_creation_conflict -from oss.src.dbs.postgres.shared.engine import engine -from oss.src.dbs.postgres.evaluations.mappings import ( - create_dbe_from_dto, - edit_dbe_from_dto, - create_dto_from_dbe, -) -from oss.src.dbs.postgres.evaluations.dbes import ( - EvaluationRunDBE, - EvaluationScenarioDBE, - EvaluationResultDBE, - EvaluationMetricsDBE, - EvaluationQueueDBE, -) - - -log = get_module_logger(__name__) - - -class EvaluationsDAO(EvaluationsDAOInterface): - def __init__(self): - pass - - # - EVALUATION RUN --------------------------------------------------------- - - @suppress_exceptions(exclude=[EntityCreationConflict]) - async def create_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunCreate, - ) -> Optional[EvaluationRun]: - _run = EvaluationRun( - **run.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - - run_references: List[dict] = [] - - if _run and _run.data and _run.data.steps: - _references: Dict[str, dict] = {} - - for step in _run.data.steps: - if not step.references: - continue - - for key, ref in step.references.items(): - _key = getattr(ref, "id", None) or key - _references[_key] = ref.model_dump( - mode="json", - exclude_none=True, - ) | {"key": str(key)} - - run_references = list(_references.values()) - - run_dbe = create_dbe_from_dto( - DBE=EvaluationRunDBE, - project_id=project_id, - dto=_run, - # - references=run_references, - ) - - if _run.data: - run_dbe.data = _run.data.model_dump(mode="json") # type: ignore - - try: - async with engine.core_session() as session: - session.add(run_dbe) - - await session.commit() - - _run = create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - - return _run - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) - async def create_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunCreate], - ) -> List[EvaluationRun]: - _runs = [ - EvaluationRun( - **run.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - for run in runs - ] - - runs_references: List[List[dict]] = [] - - for _run in _runs: - run_references: List[dict] = [] - - if _run and _run.data and _run.data.steps: - _references: Dict[str, dict] = {} - - for step in _run.data.steps: - if not step.references: - continue - - for key, ref in step.references.items(): - _key = getattr(ref, "id", None) or key - _references[_key] = ref.model_dump( - mode="json", - exclude_none=True, - ) | {"key": str(key)} - - run_references = list(_references.values()) - - runs_references.append(run_references) - - run_dbes = [] - - for i, _run in enumerate(_runs): - run_dbe = create_dbe_from_dto( - DBE=EvaluationRunDBE, - project_id=project_id, - dto=_run, - # - references=runs_references[i], - ) - - if _run.data: - run_dbe.data = _run.data.model_dump(mode="json") # type: ignore - - run_dbes.append(run_dbe) - - try: - async with engine.core_session() as session: - session.add_all(run_dbes) - - await session.commit() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions() - async def fetch_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id == run_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - run_dbe = res.scalars().first() - - if run_dbe is None: - return None - - _run = create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - - return _run - - @suppress_exceptions(default=[]) - async def fetch_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id.in_(run_ids), - ) - - stmt = stmt.limit(len(run_ids)) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - @suppress_exceptions() - async def edit_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run: EvaluationRunEdit, - ) -> Optional[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id == run.id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - run_dbe = res.scalars().first() - - if run_dbe is None: - return None - - run_flags = run_dbe.flags or {} - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=run.id, - ) - - run_references: List[dict] = [] - - if run and run.data and run.data.steps: - _references: Dict[str, dict] = {} - - for step in run.data.steps: - if not step.references: - continue - - for key, ref in step.references.items(): - _key = getattr(ref, "id", None) or key - _references[_key] = ref.model_dump( - mode="json", - exclude_none=True, - ) | {"key": str(key)} - - run_references = list(_references.values()) - - run_dbe = edit_dbe_from_dto( - dbe=run_dbe, - dto=run, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - references=run_references, - ) - - if run.data: - run_dbe.data = run.data.model_dump(mode="json") # type: ignore - - await session.commit() - - _run = create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - - return _run - - @suppress_exceptions(default=[]) - async def edit_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - runs: List[EvaluationRunEdit], - ) -> List[EvaluationRun]: - run_ids = [run.id for run in runs] - - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id.in_(run_ids), - ) - - stmt = stmt.limit(len(run_ids)) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - if not run_dbes: - return [] - - for run_dbe in run_dbes: - run_flags = run_dbe.flags or {} - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=run_dbe.id, # type: ignore - ) - - run = next( - (r for r in runs if r.id == run_dbe.id), - None, - ) - - if run is None: - continue - - run_references: List[dict] = [] - - if run and run.data and run.data.steps: - _references: Dict[str, dict] = {} - - for step in run.data.steps: - if not step.references: - continue - - for key, ref in step.references.items(): - _key = getattr(ref, "id", None) or key - _references[_key] = ref.model_dump( - mode="json", - exclude_none=True, - ) | {"key": str(key)} - - run_references = list(_references.values()) - - run_dbe = edit_dbe_from_dto( - dbe=run_dbe, - dto=run, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - references=run_references, - ) - - if run.data: - run_dbe.data = run.data.model_dump(mode="json") # type: ignore - - await session.commit() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - @suppress_exceptions() - async def delete_run( - self, - *, - project_id: UUID, - # - run_id: UUID, - ) -> Optional[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id == run_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - run_dbe = res.scalars().first() - - if run_dbe is None: - return None - - await session.delete(run_dbe) - - await session.commit() - - return run_id - - @suppress_exceptions(default=[]) - async def delete_runs( - self, - *, - project_id: UUID, - # - run_ids: List[UUID], - ) -> List[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id.in_(run_ids), - ) - - stmt = stmt.limit(len(run_ids)) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - if not run_dbes: - return [] - - for run_dbe in run_dbes: - await session.delete(run_dbe) - - await session.commit() - - run_ids = [run_dbe.id for run_dbe in run_dbes] # type: ignore - - return run_ids - - @suppress_exceptions() - async def close_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - status: Optional[EvaluationStatus] = None, - ) -> Optional[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id == run_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - run_dbe = res.scalars().first() - - if run_dbe is None: - return None - - if status: - run_dbe.status = status.value - flag_modified(run_dbe, "status") - - if run_dbe.flags is None: - run_dbe.flags = EvaluationRunFlags().model_dump( # type: ignore - mode="json", - exclude_none=True, - ) - - # run_dbe.flags["is_closed"] = True # type: ignore - flag_modified(run_dbe, "flags") - - run_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - run_dbe.updated_by_id = user_id # type: ignore - - await session.commit() - - _run = create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - - return _run - - @suppress_exceptions(default=[]) - async def close_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id.in_(run_ids), - ) - - stmt = stmt.limit(len(run_ids)) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - if not run_dbes: - return [] - - for run_dbe in run_dbes: - if run_dbe.flags is None: - run_dbe.flags = EvaluationRunFlags().model_dump( # type: ignore - mode="json", - exclude_none=True, - ) - - # run_dbe.flags["is_closed"] = True # type: ignore - flag_modified(run_dbe, "flags") - - run_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - run_dbe.updated_by_id = user_id # type: ignore - - await session.commit() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - @suppress_exceptions() - async def open_run( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - ) -> Optional[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id == run_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - run_dbe = res.scalars().first() - - if run_dbe is None: - return None - - if run_dbe.flags is None: - run_dbe.flags = EvaluationRunFlags().model_dump( # type: ignore - mode="json", - exclude_none=True, - ) - - run_dbe.flags["is_closed"] = False # type: ignore - flag_modified(run_dbe, "flags") - - run_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - run_dbe.updated_by_id = user_id # type: ignore - - await session.commit() - - _run = create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - - return _run - - @suppress_exceptions(default=[]) - async def open_runs( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_ids: List[UUID], - ) -> List[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.id.in_(run_ids), - ) - - stmt = stmt.limit(len(run_ids)) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - if not run_dbes: - return [] - - for run_dbe in run_dbes: - if run_dbe.flags is None: - run_dbe.flags = EvaluationRunFlags().model_dump( # type: ignore - mode="json", - exclude_none=True, - ) - - run_dbe.flags["is_closed"] = False # type: ignore - flag_modified(run_dbe, "flags") - - run_dbe.updated_at = datetime.now(timezone.utc) # type: ignore - run_dbe.updated_by_id = user_id # type: ignore - - await session.commit() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - @suppress_exceptions(default=[]) - async def query_runs( - self, - *, - project_id: UUID, - # - run: Optional[EvaluationRunQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationRun]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE).filter( - EvaluationRunDBE.project_id == project_id, - ) - - if run is not None: - if run.ids is not None: - stmt = stmt.filter( - EvaluationRunDBE.id.in_(run.ids), - ) - - if run.references is not None: - run_references: List[dict] = list() - - for _references in run.references: - for key, ref in _references.items(): - # _key = getattr(ref, "id", None) or key - run_references.append( - ref.model_dump( - mode="json", - exclude_none=True, - ) - # | {"key": str(key)} - ) - - stmt = stmt.filter( - EvaluationRunDBE.references.contains(run_references), - ) - - if run.flags is not None: - run_flags = run.flags.model_dump( - mode="json", - exclude_none=True, - ) - - stmt = stmt.filter( - EvaluationRunDBE.flags.contains(run_flags), - ) - - if run.tags is not None: - stmt = stmt.filter( - EvaluationRunDBE.tags.contains(run.tags), - ) - - if run.meta is not None: - stmt = stmt.filter( - EvaluationRunDBE.meta.contains(run.meta), - ) - - if run.status is not None: - stmt = stmt.filter( - EvaluationRunDBE.status == run.status, - ) - - if run.statuses is not None: - stmt = stmt.filter( - EvaluationRunDBE.status.in_(run.statuses), - ) - - if run.name is not None: - stmt = stmt.filter( - EvaluationRunDBE.name.ilike(f"%{run.name}%"), - ) - - if run.description is not None: - stmt = stmt.filter( - EvaluationRunDBE.description.ilike(f"%{run.description}%"), - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationRunDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - _runs = [ - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ) - for run_dbe in run_dbes - ] - - return _runs - - @suppress_exceptions(default=[]) - async def fetch_live_runs( - self, - *, - windowing: Optional[Windowing] = None, - ) -> List[Tuple[UUID, EvaluationRun]]: - async with engine.core_session() as session: - stmt = select(EvaluationRunDBE) - - stmt = stmt.filter( - not_(EvaluationRunDBE.flags.contains({"is_closed": True})), - ) - - stmt = stmt.filter( - EvaluationRunDBE.flags.contains({"is_live": True}), - ) - - stmt = stmt.filter( - EvaluationRunDBE.flags.contains({"is_active": True}), - ) - - stmt = stmt.filter( - EvaluationRunDBE.status == "running", - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationRunDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - run_dbes = res.scalars().all() - - _runs = [ - ( - UUID(str(run_dbe.project_id)), - create_dto_from_dbe( - DTO=EvaluationRun, - dbe=run_dbe, - ), - ) - for run_dbe in run_dbes - ] - - return _runs - - # - EVALUATION SCENARIO ---------------------------------------------------- - - @suppress_exceptions(exclude=[EntityCreationConflict]) - async def create_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioCreate, - ) -> Optional[EvaluationScenario]: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=scenario.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario.run_id, - ) - - _scenario = EvaluationScenario( - **scenario.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - - scenario_dbe = create_dbe_from_dto( - DBE=EvaluationScenarioDBE, - project_id=project_id, - dto=_scenario, - ) - - try: - async with engine.core_session() as session: - session.add(scenario_dbe) - - await session.commit() - - _scenario = create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - - return _scenario - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) - async def create_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioCreate], - ) -> List[EvaluationScenario]: - for scenario in scenarios: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=scenario.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario.run_id, - ) - - _scenarios = [ - EvaluationScenario( - **scenario.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - for scenario in scenarios - ] - - scenario_dbes = [ - create_dbe_from_dto( - DBE=EvaluationScenarioDBE, - project_id=project_id, - dto=_scenario, - ) - for _scenario in _scenarios - ] - - try: - async with engine.core_session() as session: - session.add_all(scenario_dbes) - - await session.commit() - - _scenarios = [ - create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - for scenario_dbe in scenario_dbes - ] - - return _scenarios - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions() - async def fetch_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[EvaluationScenario]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id == scenario_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - scenario_dbe = res.scalars().first() - - if scenario_dbe is None: - return None - - _scenario = create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - - return _scenario - - @suppress_exceptions(default=[]) - async def fetch_scenarios( - self, - *, - project_id: UUID, - # - scenario_ids: List[UUID], - ) -> List[EvaluationScenario]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id.in_(scenario_ids), - ) - - stmt = stmt.limit(len(scenario_ids)) - - res = await session.execute(stmt) - - scenario_dbes = res.scalars().all() - - _scenarios = [ - create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - for scenario_dbe in scenario_dbes - ] - - return _scenarios - - @suppress_exceptions() - async def edit_scenario( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenario: EvaluationScenarioEdit, - ) -> Optional[EvaluationScenario]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id == scenario.id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - scenario_dbe = res.scalars().first() - - if scenario_dbe is None: - return None - - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=scenario_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario_dbe.run_id, # type: ignore - scenario_id=scenario_dbe.id, # type: ignore - ) - - scenario_dbe = edit_dbe_from_dto( - dbe=scenario_dbe, - dto=scenario, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _scenario = create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - - return _scenario - - @suppress_exceptions(default=[]) - async def edit_scenarios( - self, - *, - project_id: UUID, - user_id: UUID, - # - scenarios: List[EvaluationScenarioEdit], - ) -> List[EvaluationScenario]: - scenario_ids = [scenario.id for scenario in scenarios] - - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id.in_(scenario_ids), - ) - - stmt = stmt.limit(len(scenario_ids)) - - res = await session.execute(stmt) - - scenario_dbes = res.scalars().all() - - if not scenario_dbes: - return [] - - for scenario_dbe in scenario_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=scenario_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario_dbe.run_id, # type: ignore - scenario_id=scenario_dbe.id, # type: ignore - ) - - scenario = next( - (s for s in scenarios if s.id == scenario_dbe.id), - None, - ) - - if scenario is not None: - scenario_dbe = edit_dbe_from_dto( - dbe=scenario_dbe, - dto=scenario, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _scenarios = [ - create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - for scenario_dbe in scenario_dbes - ] - - return _scenarios - - @suppress_exceptions() - async def delete_scenario( - self, - *, - project_id: UUID, - # - scenario_id: UUID, - ) -> Optional[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id == scenario_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - scenario_dbe = res.scalars().first() - - if not scenario_dbe: - return None - - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=scenario_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario_dbe.run_id, # type: ignore - scenario_id=scenario_dbe.id, # type: ignore - ) - - await session.delete(scenario_dbe) - - await session.commit() - - return scenario_id - - @suppress_exceptions(default=[]) - async def delete_scenarios( - self, - *, - project_id: UUID, - # - scenario_ids: List[UUID], - ) -> List[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.id.in_(scenario_ids), - ) - - stmt = stmt.limit(len(scenario_ids)) - - res = await session.execute(stmt) - - scenario_dbes = res.scalars().all() - - if not scenario_dbes: - return [] - - for scenario_dbe in scenario_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=scenario_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=scenario_dbe.run_id, # type: ignore - scenario_id=scenario_dbe.id, # type: ignore - ) - - await session.delete(scenario_dbe) - - await session.commit() - - scenario_ids = [scenario_dbe.id for scenario_dbe in scenario_dbes] # type: ignore - - return scenario_ids - - @suppress_exceptions(default=[]) - async def query_scenarios( - self, - *, - project_id: UUID, - # - scenario: Optional[EvaluationScenarioQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationScenario]: - async with engine.core_session() as session: - stmt = select(EvaluationScenarioDBE).filter( - EvaluationScenarioDBE.project_id == project_id, - ) - - if scenario is not None: - if scenario.ids is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.id.in_(scenario.ids), - ) - - if scenario.run_id is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.run_id == scenario.run_id, - ) - - if scenario.run_ids is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.run_id.in_(scenario.run_ids), - ) - - if scenario.timestamp is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.timestamp == scenario.timestamp, - ) - - if scenario.timestamps is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.timestamp.in_(scenario.timestamps), - ) - - if scenario.interval is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.interval == scenario.interval, - ) - - if scenario.intervals is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.interval.in_(scenario.intervals), - ) - - if scenario.flags is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.flags.contains(scenario.flags), - ) - - if scenario.tags is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.tags.contains(scenario.tags), - ) - - if scenario.meta is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.meta.contains(scenario.meta), - ) - - if scenario.status is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.status == scenario.status, - ) - - if scenario.statuses is not None: - stmt = stmt.filter( - EvaluationScenarioDBE.status.in_(scenario.statuses), - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationScenarioDBE, - attribute="id", # UUID7 - order="ascending", # data-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - scenario_dbes = res.scalars().all() - - _scenarios = [ - create_dto_from_dbe( - DTO=EvaluationScenario, - dbe=scenario_dbe, - ) - for scenario_dbe in scenario_dbes - ] - - return _scenarios - - # - EVALUATION RESULT ------------------------------------------------------ - - @suppress_exceptions(exclude=[EntityCreationConflict]) - async def create_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultCreate, - ) -> Optional[EvaluationResult]: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=result.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result.run_id, - ) - - _result = EvaluationResult( - **result.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - - result_dbe = create_dbe_from_dto( - DBE=EvaluationResultDBE, - project_id=project_id, - dto=_result, - ) - - try: - async with engine.core_session() as session: - session.add(result_dbe) - - await session.commit() - - _result = create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - - return _result - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) - async def create_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultCreate], - ) -> List[EvaluationResult]: - for result in results: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=result.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result.run_id, - ) - - async with engine.core_session() as session: - _results = [ - EvaluationResult( - **result.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - for result in results - ] - - result_dbes = [ - create_dbe_from_dto( - DBE=EvaluationResultDBE, - project_id=project_id, - dto=_result, - ) - for _result in _results - ] - - session.add_all(result_dbes) - - await session.commit() - - _results = [ - create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - for result_dbe in result_dbes - ] - - return _results - - @suppress_exceptions() - async def fetch_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[EvaluationResult]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id == result_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - result_dbe = res.scalars().first() - - if result_dbe is None: - return None - - _result = create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - - return _result - - @suppress_exceptions(default=[]) - async def fetch_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[EvaluationResult]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id.in_(result_ids), - ) - - stmt = stmt.limit(len(result_ids)) - - res = await session.execute(stmt) - - result_dbes = res.scalars().all() - - _results = [ - create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - for result_dbe in result_dbes - ] - - return _results - - @suppress_exceptions() - async def edit_result( - self, - *, - project_id: UUID, - user_id: UUID, - # - result: EvaluationResultEdit, - ) -> Optional[EvaluationResult]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id == result.id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - result_dbe = res.scalars().first() - - if result_dbe is None: - return None - - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=result_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result_dbe.run_id, # type: ignore - scenario_id=result_dbe.scenario_id, # type: ignore - result_id=result_dbe.id, # type: ignore - ) - - result_dbe = edit_dbe_from_dto( - dbe=result_dbe, - dto=result, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _result = create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - - return _result - - @suppress_exceptions(default=[]) - async def edit_results( - self, - *, - project_id: UUID, - user_id: UUID, - # - results: List[EvaluationResultEdit], - ) -> List[EvaluationResult]: - result_ids = [result.id for result in results] - - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id.in_(result_ids), - ) - - stmt = stmt.limit(len(result_ids)) - - res = await session.execute(stmt) - - result_dbes = res.scalars().all() - - if not result_dbes: - return [] - - for result_dbe in result_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=result_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result_dbe.run_id, # type: ignore - scenario_id=result_dbe.scenario_id, # type: ignore - result_id=result_dbe.id, # type: ignore - ) - - result = next( - (s for s in results if s.id == result_dbe.id), - None, - ) - - if result is not None: - result_dbe = edit_dbe_from_dto( - dbe=result_dbe, - dto=result, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _results = [ - create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - for result_dbe in result_dbes - ] - - return _results - - @suppress_exceptions() - async def delete_result( - self, - *, - project_id: UUID, - # - result_id: UUID, - ) -> Optional[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id == result_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - result_dbe = res.scalars().first() - - if result_dbe is None: - return None - - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=result_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result_dbe.run_id, # type: ignore - scenario_id=result_dbe.scenario_id, # type: ignore - result_id=result_dbe.id, # type: ignore - ) - - await session.delete(result_dbe) - - await session.commit() - - return result_id - - @suppress_exceptions(default=[]) - async def delete_results( - self, - *, - project_id: UUID, - # - result_ids: List[UUID], - ) -> List[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.id.in_(result_ids), - ) - - stmt = stmt.limit(len(result_ids)) - - res = await session.execute(stmt) - - result_dbes = res.scalars().all() - - if not result_dbes: - return [] - - for result_dbe in result_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=result_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=result_dbe.run_id, # type: ignore - scenario_id=result_dbe.scenario_id, # type: ignore - result_id=result_dbe.id, # type: ignore - ) - - await session.delete(result_dbe) - - await session.commit() - - return result_ids - - @suppress_exceptions(default=[]) - async def query_results( - self, - *, - project_id: UUID, - # - result: Optional[EvaluationResultQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationResult]: - async with engine.core_session() as session: - stmt = select(EvaluationResultDBE).filter( - EvaluationResultDBE.project_id == project_id, - ) - - if result is not None: - if result.ids is not None: - stmt = stmt.filter( - EvaluationResultDBE.id.in_(result.ids), - ) - - if result.run_id is not None: - stmt = stmt.filter( - EvaluationResultDBE.run_id == result.run_id, - ) - - if result.run_ids is not None: - stmt = stmt.filter( - EvaluationResultDBE.run_id.in_(result.run_ids), - ) - - if result.scenario_id is not None: - stmt = stmt.filter( - EvaluationResultDBE.scenario_id == result.scenario_id, - ) - - if result.scenario_ids is not None: - stmt = stmt.filter( - EvaluationResultDBE.scenario_id.in_(result.scenario_ids), - ) - - if result.step_key is not None: - stmt = stmt.filter( - EvaluationResultDBE.step_key == result.step_key, - ) - - if result.step_keys is not None: - stmt = stmt.filter( - EvaluationResultDBE.step_key.in_(result.step_keys), - ) - - if result.repeat_idx is not None: - stmt = stmt.filter( - EvaluationResultDBE.repeat_idx == result.repeat_idx, - ) - - if result.repeat_idxs is not None: - stmt = stmt.filter( - EvaluationResultDBE.repeat_idx.in_(result.repeat_idxs), - ) - - if result.timestamp is not None: - stmt = stmt.filter( - EvaluationResultDBE.timestamp == result.timestamp, - ) - - if result.timestamps is not None: - stmt = stmt.filter( - EvaluationResultDBE.timestamp.in_(result.timestamps), - ) - - if result.interval is not None: - stmt = stmt.filter( - EvaluationResultDBE.interval == result.interval, - ) - - if result.intervals is not None: - stmt = stmt.filter( - EvaluationResultDBE.interval.in_(result.intervals), - ) - - if result.flags is not None: - stmt = stmt.filter( - EvaluationResultDBE.flags.contains(result.flags), - ) - - if result.tags is not None: - stmt = stmt.filter( - EvaluationResultDBE.tags.contains(result.tags), - ) - - if result.meta is not None: - stmt = stmt.filter( - EvaluationResultDBE.meta.contains(result.meta), - ) - - if result.status is not None: - stmt = stmt.filter( - EvaluationResultDBE.status == result.status, - ) - - if result.statuses is not None: - stmt = stmt.filter( - EvaluationResultDBE.status.in_(result.statuses), - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationResultDBE, - attribute="id", # UUID7 - order="ascending", # data-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - result_dbes = res.scalars().all() - - results = [ - create_dto_from_dbe( - DTO=EvaluationResult, - dbe=result_dbe, - ) - for result_dbe in result_dbes - ] - - return results - - # - EVALUATION METRICS ----------------------------------------------------- - - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) - async def create_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsCreate], - ) -> List[EvaluationMetrics]: - for metric in metrics: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=metric.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=metric.run_id, - ) - - _metrics = [ - EvaluationMetrics( - **metric.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - for metric in metrics - ] - - metric_dbes = [ - create_dbe_from_dto( - DBE=EvaluationMetricsDBE, - project_id=project_id, - dto=_metric, - ) - for _metric in _metrics - ] - - try: - async with engine.core_session() as session: - session.add_all(metric_dbes) - - await session.commit() - - _metrics = [ - create_dto_from_dbe( - DTO=EvaluationMetrics, - dbe=metric_dbe, - ) - for metric_dbe in metric_dbes - ] - - return _metrics - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions(default=[]) - async def fetch_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: List[UUID], - ) -> List[EvaluationMetrics]: - async with engine.core_session() as session: - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.project_id == project_id, - ) - - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.id.in_(metrics_ids), - ) - - stmt = stmt.limit(len(metrics_ids)) - - res = await session.execute(stmt) - - metric_dbes = res.scalars().all() - - _metrics = [ - create_dto_from_dbe( - DTO=EvaluationMetrics, - dbe=metric_dbe, - ) - for metric_dbe in metric_dbes - ] - - return _metrics - - @suppress_exceptions(default=[]) - async def edit_metrics( - self, - *, - project_id: UUID, - user_id: UUID, - # - metrics: List[EvaluationMetricsEdit], - ) -> List[EvaluationMetrics]: - metrics_ids = [metric.id for metric in metrics] - - async with engine.core_session() as session: - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.project_id == project_id, - ) - - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.id.in_(metrics_ids), - ) - - stmt = stmt.limit(len(metrics_ids)) - - res = await session.execute(stmt) - - metric_dbes = res.scalars().all() - - if not metric_dbes: - return [] - - for metric_dbe in metric_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=metric_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=metric_dbe.run_id, # type: ignore - scenario_id=metric_dbe.scenario_id, # type: ignore - metrics_id=metric_dbe.id, # type: ignore - ) - - metric = next( - (m for m in metrics if m.id == metric_dbe.id), - None, - ) - - if metric is not None: - metric_dbe = edit_dbe_from_dto( - dbe=metric_dbe, - dto=metric, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _metrics = [ - create_dto_from_dbe( - DTO=EvaluationMetrics, - dbe=metric_dbe, - ) - for metric_dbe in metric_dbes - ] - - return _metrics - - @suppress_exceptions(default=[]) - async def delete_metrics( - self, - *, - project_id: UUID, - # - metrics_ids: Optional[List[UUID]] = None, - ) -> List[UUID]: - async with engine.core_session() as session: - if metrics_ids is None: - return [] - - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.project_id == project_id, - ) - - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.id.in_(metrics_ids), - ) - - stmt = stmt.limit(len(metrics_ids)) - - res = await session.execute(stmt) - - metric_dbes = res.scalars().all() - - if not metric_dbes: - return [] - - for metric_dbe in metric_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=metric_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=metric_dbe.run_id, # type: ignore - scenario_id=metric_dbe.scenario_id, # type: ignore - metrics_id=metric_dbe.id, # type: ignore - ) - - await session.delete(metric_dbe) - - await session.commit() - - return metrics_ids - - @suppress_exceptions(default=[]) - async def query_metrics( - self, - *, - project_id: UUID, - # - metric: Optional[EvaluationMetricsQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationMetrics]: - async with engine.core_session() as session: - stmt = select(EvaluationMetricsDBE).filter( - EvaluationMetricsDBE.project_id == project_id, - ) - - if metric is not None: - if metric.ids is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.id.in_(metric.ids), - ) - - if metric.run_id is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.run_id == metric.run_id, - ) - - if metric.run_ids is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.run_id.in_(metric.run_ids), - ) - - if metric.scenario_id is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.scenario_id == metric.scenario_id, - ) - - if metric.scenario_ids is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.scenario_id.in_(metric.scenario_ids), - ) - - if metric.timestamp is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.timestamp == metric.timestamp, - ) - - if metric.timestamps is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.timestamp.in_(metric.timestamps), - ) - - if metric.interval is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.interval == metric.interval, - ) - - if metric.intervals is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.interval.in_(metric.intervals), - ) - - if metric.flags is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.flags.contains(metric.flags), - ) - - if metric.tags is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.tags.contains(metric.tags), - ) - - if metric.meta is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.meta.contains(metric.meta), - ) - - if metric.status is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.status == metric.status, - ) - - if metric.statuses is not None: - stmt = stmt.filter( - EvaluationMetricsDBE.status.in_(metric.statuses), - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationMetricsDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - metric_dbes = res.scalars().all() - - metrics = [ - create_dto_from_dbe( - DTO=EvaluationMetrics, - dbe=metric_dbe, - ) - for metric_dbe in metric_dbes - ] - - return metrics - - # - EVALUATION QUEUE ------------------------------------------------------- - - @suppress_exceptions(exclude=[EntityCreationConflict]) - async def create_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueCreate, - ) -> Optional[EvaluationQueue]: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=queue.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=queue.run_id, - ) - - _queue = EvaluationQueue( - **queue.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - - if _queue.data and _queue.data.user_ids: - _queue.data.user_ids = [ # type: ignore - [str(repeat_user_id) for repeat_user_id in repeat_user_ids] - for repeat_user_ids in _queue.data.user_ids - ] - - queue_dbe = create_dbe_from_dto( - DBE=EvaluationQueueDBE, - project_id=project_id, - dto=queue, - ) - - try: - async with engine.core_session() as session: - session.add(queue_dbe) - - await session.commit() - - _queue = create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - - return _queue - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) - async def create_queues( - self, - *, - project_id: UUID, - user_id: UUID, - queues: List[EvaluationQueueCreate], - ) -> List[EvaluationQueue]: - for queue in queues: - run_flags = await _get_run_flags( - project_id=project_id, - run_id=queue.run_id, - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=queue.run_id, - ) - - _queues = [ - EvaluationQueue( - **queue.model_dump( - mode="json", - exclude_none=True, - ), - created_at=datetime.now(timezone.utc), - created_by_id=user_id, - ) - for queue in queues - ] - - for _queue in _queues: - if _queue.data and _queue.data.user_ids: - _queue.data.user_ids = [ # type: ignore - [str(repeat_user_id) for repeat_user_id in repeat_user_ids] - for repeat_user_ids in _queue.data.user_ids - ] - - queue_dbes = [ - create_dbe_from_dto( - DBE=EvaluationQueueDBE, - project_id=project_id, - dto=queue, - ) - for queue in queues - ] - - try: - async with engine.core_session() as session: - session.add_all(queue_dbes) - - await session.commit() - - _queues = [ - create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - for queue_dbe in queue_dbes - ] - - return _queues - - except Exception as e: - check_entity_creation_conflict(e) - - raise - - @suppress_exceptions() - async def fetch_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[EvaluationQueue]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id == queue_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - queue_dbe = res.scalars().first() - - if queue_dbe is None: - return None - - _queue = create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - - return _queue - - @suppress_exceptions(default=[]) - async def fetch_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[EvaluationQueue]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id.in_(queue_ids), - ) - - stmt = stmt.limit(len(queue_ids)) - - res = await session.execute(stmt) - - queue_dbes = res.scalars().all() - - _queues = [ - create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - for queue_dbe in queue_dbes - ] - - return _queues - - @suppress_exceptions() - async def edit_queue( - self, - *, - project_id: UUID, - user_id: UUID, - # - queue: EvaluationQueueEdit, - ) -> Optional[EvaluationQueue]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id == queue.id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - queue_dbe = res.scalars().first() - - if queue_dbe is None: - return None - - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=queue_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=queue_dbe.run_id, - queue_id=queue_dbe.id, # type: ignore - ) - - queue_dbe = edit_dbe_from_dto( - dbe=queue_dbe, - dto=queue, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _queue = create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - - return _queue - - @suppress_exceptions(default=[]) - async def edit_queues( - self, - *, - project_id: UUID, - user_id: UUID, - queues: List[EvaluationQueueEdit], - ) -> List[EvaluationQueue]: - queue_ids = [queue.id for queue in queues] - - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id.in_(queue_ids), - ) - - stmt = stmt.limit(len(queue_ids)) - - res = await session.execute(stmt) - - queue_dbes = res.scalars().all() - - if not queue_dbes: - return [] - - for queue_dbe in queue_dbes: - run_flags = await _get_run_flags( - session=session, - project_id=project_id, - run_id=queue_dbe.run_id, # type: ignore - ) - - if run_flags.get("is_closed", False): - raise EvaluationClosedConflict( - run_id=queue_dbe.run_id, - queue_id=queue_dbe.id, # type: ignore - ) - - queue = next( - (q for q in queues if q.id == queue_dbe.id), - None, - ) - - if queue is not None: - queue_dbe = edit_dbe_from_dto( - dbe=queue_dbe, - dto=queue, - updated_at=datetime.now(timezone.utc), - updated_by_id=user_id, - ) - - await session.commit() - - _queues = [ - create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - for queue_dbe in queue_dbes - ] - - return _queues - - @suppress_exceptions() - async def delete_queue( - self, - *, - project_id: UUID, - # - queue_id: UUID, - ) -> Optional[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id == queue_id, - ) - - stmt = stmt.limit(1) - - res = await session.execute(stmt) - - queue_dbe = res.scalars().first() - - if queue_dbe is None: - return None - - await session.delete(queue_dbe) - - await session.commit() - - return queue_id - - @suppress_exceptions(default=[]) - async def delete_queues( - self, - *, - project_id: UUID, - # - queue_ids: List[UUID], - ) -> List[UUID]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.id.in_(queue_ids), - ) - - stmt = stmt.limit(len(queue_ids)) - - res = await session.execute(stmt) - - queue_dbes = res.scalars().all() - - if not queue_dbes: - return [] - - for queue_dbe in queue_dbes: - await session.delete(queue_dbe) - - await session.commit() - - return queue_ids - - @suppress_exceptions(default=[]) - async def query_queues( - self, - *, - project_id: UUID, - # - queue: Optional[EvaluationQueueQuery] = None, - # - windowing: Optional[Windowing] = None, - ) -> List[EvaluationQueue]: - async with engine.core_session() as session: - stmt = select(EvaluationQueueDBE).filter( - EvaluationQueueDBE.project_id == project_id, - ) - - if queue is not None: - if queue.ids is not None: - stmt = stmt.filter( - EvaluationQueueDBE.id.in_(queue.ids), - ) - - if queue.run_id is not None: - stmt = stmt.filter( - EvaluationQueueDBE.run_id == queue.run_id, - ) - - if queue.run_ids is not None: - stmt = stmt.filter( - EvaluationQueueDBE.run_id.in_(queue.run_ids), - ) - - if queue.flags is not None: - stmt = stmt.filter( - EvaluationQueueDBE.flags.contains(queue.flags), - ) - - if queue.tags is not None: - stmt = stmt.filter( - EvaluationQueueDBE.tags.contains(queue.tags), - ) - - if queue.meta is not None: - stmt = stmt.filter( - EvaluationQueueDBE.meta.contains(queue.meta), - ) - - if queue.name is not None: - stmt = stmt.filter( - EvaluationQueueDBE.name.contains(queue.name), - ) - - if queue.description is not None: - stmt = stmt.filter( - EvaluationQueueDBE.description.contains(queue.description), - ) - - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=EvaluationQueueDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) - - res = await session.execute(stmt) - - queue_dbes = res.scalars().all() - - queues = [ - create_dto_from_dbe( - DTO=EvaluationQueue, - dbe=queue_dbe, - ) - for queue_dbe in queue_dbes - ] - - return queues - - # -------------------------------------------------------------------------- - - -async def _get_run_flags( - *, - project_id: UUID, - run_id: UUID, - session: Optional[AsyncSession] = None, -) -> dict: - if session is None: - async with engine.core_session() as session: - return await _get_run_flags( - project_id=project_id, - run_id=run_id, - session=session, - ) - - stmt = select(EvaluationRunDBE.flags).filter( - EvaluationRunDBE.project_id == project_id, - ) - stmt = select(EvaluationRunDBE.flags).filter( - EvaluationRunDBE.id == run_id, - ) - - res = await session.execute(stmt) - - run_flags = res.scalars().first() - - return run_flags or {} diff --git a/api/oss/src/dbs/postgres/evaluations/dbas.py b/api/oss/src/dbs/postgres/evaluations/dbas.py deleted file mode 100644 index 85bd700721..0000000000 --- a/api/oss/src/dbs/postgres/evaluations/dbas.py +++ /dev/null @@ -1,180 +0,0 @@ -from sqlalchemy.dialects.postgresql import JSONB -from sqlalchemy import Column, UUID, VARCHAR, TIMESTAMP, INTEGER - -from oss.src.dbs.postgres.shared.dbas import ( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - HeaderDBA, - DataDBA, -) - - -class EvaluationRunDBA( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - HeaderDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - DataDBA, # steps, mappings -): - __abstract__ = True - - status = Column( - VARCHAR, - nullable=False, - ) - - references = Column( - JSONB(none_as_null=True), - nullable=True, - ) - - -class EvaluationScenarioDBA( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, -): - __abstract__ = True - - status = Column( - VARCHAR, - nullable=False, - ) - - interval = Column( - INTEGER, - nullable=True, - ) - timestamp = Column( - TIMESTAMP(timezone=True), - nullable=True, - ) - run_id = Column( - UUID(as_uuid=True), - nullable=False, - ) - - -class EvaluationResultDBA( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, -): - __abstract__ = True - - hash_id = Column( - UUID(as_uuid=True), - nullable=True, - ) - trace_id = Column( - UUID(as_uuid=True), - nullable=True, - ) - testcase_id = Column( - UUID(as_uuid=True), - nullable=True, - ) - error = Column( - JSONB(none_as_null=True), - nullable=True, - ) - - status = Column( - VARCHAR, - nullable=False, - ) - - interval = Column( - INTEGER, - nullable=True, - ) - timestamp = Column( - TIMESTAMP(timezone=True), - nullable=True, - ) - repeat_idx = Column( - INTEGER, - nullable=True, - ) - step_key = Column( - VARCHAR, - nullable=False, - ) - scenario_id = Column( - UUID(as_uuid=True), - nullable=False, - ) - run_id = Column( - UUID(as_uuid=True), - nullable=False, - ) - - -class EvaluationMetricsDBA( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - DataDBA, -): - __abstract__ = True - - status = Column( - VARCHAR, - nullable=False, - ) - - interval = Column( - INTEGER, - nullable=True, - ) - timestamp = Column( - TIMESTAMP(timezone=True), - nullable=True, - ) - scenario_id = Column( - UUID(as_uuid=True), - nullable=True, - ) - run_id = Column( - UUID(as_uuid=True), - nullable=False, - ) - - -class EvaluationQueueDBA( - VersionDBA, - IdentifierDBA, - LifecycleDBA, - HeaderDBA, - FlagsDBA, - TagsDBA, - MetaDBA, - DataDBA, -): - __abstract__ = True - - status = Column( - VARCHAR, - nullable=False, - ) - - run_id = Column( - UUID(as_uuid=True), - nullable=False, - ) diff --git a/api/oss/src/dbs/postgres/evaluations/dbes.py b/api/oss/src/dbs/postgres/evaluations/dbes.py deleted file mode 100644 index 2476d77ab4..0000000000 --- a/api/oss/src/dbs/postgres/evaluations/dbes.py +++ /dev/null @@ -1,282 +0,0 @@ -from sqlalchemy import ( - PrimaryKeyConstraint, - ForeignKeyConstraint, - UniqueConstraint, - Index, -) - -from oss.src.dbs.postgres.shared.base import Base -from oss.src.dbs.postgres.shared.dbas import ProjectScopeDBA -from oss.src.dbs.postgres.evaluations.dbas import ( - EvaluationRunDBA, - EvaluationScenarioDBA, - EvaluationResultDBA, - EvaluationMetricsDBA, - EvaluationQueueDBA, -) - - -class EvaluationRunDBE( - Base, - ProjectScopeDBA, - EvaluationRunDBA, -): - __tablename__ = "evaluation_runs" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), # for uniqueness - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), # for project scope - Index( - "ix_evaluation_runs_project_id", - "project_id", - ), # for filtering - Index( - "ix_evaluation_runs_flags", - "flags", - postgresql_using="gin", - ), # for filtering§ - Index( - "ix_evaluation_runs_tags", - "tags", - postgresql_using="gin", - ), # for filtering - Index( - "ix_evaluation_runs_references", - "references", - postgresql_using="gin", - postgresql_ops={"references": "jsonb_path_ops"}, - ), # for filtering - ) - - -class EvaluationScenarioDBE( - Base, - ProjectScopeDBA, - EvaluationScenarioDBA, -): - __tablename__ = "evaluation_scenarios" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), # for uniqueness - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), # for project scope - Index( - "ix_evaluation_scenarios_project_id", - "project_id", - ), # for filtering - Index( - "ix_evaluation_scenarios_run_id", - "run_id", - ), # for filtering - Index( - "ix_evaluation_scenarios_timestamp_interval", - "timestamp", - "interval", - ), # for filtering - Index( - "ix_evaluation_scenarios_flags", - "flags", - postgresql_using="gin", - ), # for filtering - Index( - "ix_evaluation_scenarios_tags", - "tags", - postgresql_using="gin", - ), # for filtering - ) - - -class EvaluationResultDBE( - Base, - ProjectScopeDBA, - EvaluationResultDBA, -): - __tablename__ = "evaluation_results" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), # for uniqueness - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), # for project scope - UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - "step_key", - "repeat_idx", - ), # for uniqueness - Index( - "ix_evaluation_results_project_id", - "project_id", - ), # for filtering - Index( - "ix_evaluation_results_run_id", - "run_id", - ), # for filtering - Index( - "ix_evaluation_results_scenario_id", - "scenario_id", - ), # for filtering - Index( - "ix_evaluation_results_step_key", - "step_key", - ), # for filtering - Index( - "ix_evaluation_results_repeat_idx", - "repeat_idx", - ), # for filtering - Index( - "ix_evaluation_results_timestamp_interval", - "timestamp", - "interval", - ), # for filtering - Index( - "ix_evaluation_results_flags", - "flags", - postgresql_using="gin", - ), # for filtering - Index( - "ix_evaluation_results_tags", - "tags", - postgresql_using="gin", - ), # for filtering - ) - - -class EvaluationMetricsDBE( - Base, - ProjectScopeDBA, - EvaluationMetricsDBA, -): - __tablename__ = "evaluation_metrics" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), # for uniqueness - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "scenario_id"], - ["evaluation_scenarios.project_id", "evaluation_scenarios.id"], - ondelete="CASCADE", - ), # for project scope - UniqueConstraint( - "project_id", - "run_id", - "scenario_id", - "timestamp", - ), # for uniqueness - Index( - "ix_evaluation_metrics_project_id", - "project_id", - ), # for filtering - Index( - "ix_evaluation_metrics_run_id", - "run_id", - ), # for filtering - Index( - "ix_evaluation_metrics_scenario_id", - "scenario_id", - ), # for filtering - Index( - "ix_evaluation_metrics_timestamp_interval", - "timestamp", - "interval", - ), # for filtering - Index( - "ix_evaluation_metrics_flags", - "flags", - postgresql_using="gin", - ), # for filtering - Index( - "ix_evaluation_metrics_tags", - "tags", - postgresql_using="gin", - ), # for filtering - ) - - -class EvaluationQueueDBE( - Base, - ProjectScopeDBA, - EvaluationQueueDBA, -): - __tablename__ = "evaluation_queues" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), # for uniqueness - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), # for project scope - ForeignKeyConstraint( - ["project_id", "run_id"], - ["evaluation_runs.project_id", "evaluation_runs.id"], - ondelete="CASCADE", - ), # for project scope - Index( - "ix_evaluation_queues_project_id", - "project_id", - ), # for filtering - Index( - "ix_evaluation_queues_run_id", - "run_id", - ), # for filtering - Index( - "ix_evaluation_queues_flags", - "flags", - postgresql_using="gin", - ), # for filtering - Index( - "ix_evaluation_queues_tags", - "tags", - postgresql_using="gin", - ), # for filtering - ) diff --git a/api/oss/src/dbs/postgres/evaluations/mappings.py b/api/oss/src/dbs/postgres/evaluations/mappings.py deleted file mode 100644 index bad6183fcc..0000000000 --- a/api/oss/src/dbs/postgres/evaluations/mappings.py +++ /dev/null @@ -1,71 +0,0 @@ -from typing import TypeVar, Type, Optional -from uuid import UUID -from datetime import datetime - -from oss.src.utils.logging import get_module_logger - -log = get_module_logger(__name__) - - -DBE_T = TypeVar("DBE_T") # pylint: disable=invalid-name -DTO_T = TypeVar("DTO_T") # pylint: disable=invalid-name - - -def create_dbe_from_dto( - *, - DBE: Type[DBE_T], - project_id: UUID, - dto: DTO_T, - **kwargs, -) -> DBE_T: - """Map a Pydantic DTO instance to a SQLAlchemy DBE, with extra project_id.""" - - attributes = dto.model_dump( - # mode="json", - exclude_none=True, - ) - attributes["project_id"] = project_id - - dbe = DBE(**attributes, **kwargs) - - return dbe - - -def edit_dbe_from_dto( - *, - dbe: DBE_T, - dto: DTO_T, - **kwargs, -) -> DBE_T: - """Edit a SQLAlchemy DBE instance with a Pydantic DTO.""" - - for field, value in dto.model_dump( - # mode="json", - ).items(): - setattr(dbe, field, value) - - for field, value in kwargs.items(): - if hasattr(dbe, field): - setattr(dbe, field, value) - - return dbe - - -def create_dto_from_dbe( - *, - DTO: Type[DTO_T], - dbe: DBE_T, -) -> DTO_T: - """Map a SQLAlchemy DBE instance to a Pydantic DTO.""" - - dbe_fields = {column.name for column in dbe.__table__.columns} - dto_fields = set(DTO.model_fields.keys()) - - attributes = {field: getattr(dbe, field) for field in dbe_fields & dto_fields} - - if attributes.get("trace_id") is not None: - attributes["trace_id"] = str(attributes["trace_id"]) - - dto = DTO(**attributes) - - return dto diff --git a/api/oss/src/dbs/postgres/git/dao.py b/api/oss/src/dbs/postgres/git/dao.py index f1bb94f45f..5534dba8b6 100644 --- a/api/oss/src/dbs/postgres/git/dao.py +++ b/api/oss/src/dbs/postgres/git/dao.py @@ -5,40 +5,23 @@ from sqlalchemy import select, func, update from oss.src.utils.logging import get_module_logger - -from oss.src.core.shared.exceptions import EntityCreationConflict -from oss.src.core.shared.dtos import Reference, Windowing +from oss.src.dbs.postgres.shared.utils import suppress_exceptions +from oss.src.dbs.postgres.shared.engine import engine from oss.src.core.git.interfaces import GitDAOInterface +from oss.src.core.shared.dtos import Reference from oss.src.core.git.dtos import ( + Flags, + Meta, + Data, Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - RevisionsLog, - # Variant, - VariantCreate, - VariantEdit, - VariantQuery, - # Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, ) - -from oss.src.dbs.postgres.shared.utils import apply_windowing -from oss.src.dbs.postgres.shared.exceptions import check_entity_creation_conflict -from oss.src.utils.exceptions import suppress_exceptions -from oss.src.dbs.postgres.shared.engine import engine from oss.src.dbs.postgres.git.mappings import ( map_dbe_to_dto, map_dto_to_dbe, ) - log = get_module_logger(__name__) @@ -59,32 +42,31 @@ def __init__( # ─ artifacts ────────────────────────────────────────────────────────────── - @suppress_exceptions(exclude=[EntityCreationConflict]) + @suppress_exceptions() async def create_artifact( self, *, project_id: UUID, user_id: UUID, # - artifact_create: ArtifactCreate, + artifact_slug: str, # - artifact_id: Optional[UUID] = None, + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, ) -> Optional[Artifact]: artifact = Artifact( project_id=project_id, # - id=artifact_id, - slug=artifact_create.slug, + slug=artifact_slug, # - created_at=datetime.now(timezone.utc), created_by_id=user_id, # - flags=artifact_create.flags, - tags=artifact_create.tags, - meta=artifact_create.meta, - # - name=artifact_create.name, - description=artifact_create.description, + flags=artifact_flags, + meta=artifact_meta, + name=artifact_name, + description=artifact_description, ) artifact_dbe = map_dto_to_dbe( @@ -93,26 +75,20 @@ async def create_artifact( dto=artifact, ) - try: - async with engine.core_session() as session: - session.add(artifact_dbe) - - await session.commit() - - if not artifact_dbe: - return None + async with engine.core_session() as session: + session.add(artifact_dbe) - artifact = map_dbe_to_dto( - DTO=Artifact, - dbe=artifact_dbe, # type: ignore - ) + await session.commit() - return artifact + if not artifact_dbe: + return None - except Exception as e: - check_entity_creation_conflict(e) + artifact = map_dbe_to_dto( + DTO=Artifact, + dbe=artifact_dbe, # type: ignore + ) - raise + return artifact @suppress_exceptions() async def fetch_artifact( @@ -120,26 +96,26 @@ async def fetch_artifact( *, project_id: UUID, # - artifact_ref: Reference, + artifact_ref: Optional[Reference] = None, ) -> Optional[Artifact]: if not artifact_ref: return None async with engine.core_session() as session: - stmt = select(self.ArtifactDBE).filter( + query = select(self.ArtifactDBE).filter( self.ArtifactDBE.project_id == project_id, # type: ignore ) if artifact_ref.id: - stmt = stmt.filter(self.ArtifactDBE.id == artifact_ref.id) # type: ignore + query = query.filter(self.ArtifactDBE.id == artifact_ref.id) # type: ignore elif artifact_ref.slug: - stmt = stmt.filter(self.ArtifactDBE.slug == artifact_ref.slug) # type: ignore + query = query.filter(self.ArtifactDBE.slug == artifact_ref.slug) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - artifact_dbe = result.scalars().first() + artifact_dbe = result.scalar_one_or_none() if not artifact_dbe: return None @@ -158,39 +134,39 @@ async def edit_artifact( project_id: UUID, user_id: UUID, # - artifact_edit: ArtifactEdit, + artifact_id: UUID, + # + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, + artifact_name: Optional[str] = None, + artifact_description: Optional[str] = None, ) -> Optional[Artifact]: async with engine.core_session() as session: - stmt = select(self.ArtifactDBE).filter( + query = select(self.ArtifactDBE).filter( self.ArtifactDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.ArtifactDBE.id == artifact_edit.id) # type: ignore + query = query.filter(self.ArtifactDBE.id == artifact_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - artifact_dbe = result.scalars().first() + artifact_dbe = result.scalar_one_or_none() if not artifact_dbe: return None now = datetime.now(timezone.utc) - artifact_dbe.updated_at = now # type: ignore - artifact_dbe.updated_by_id = user_id # type: ignore - # - artifact_dbe.flags = artifact_edit.flags # type: ignore - artifact_dbe.tags = artifact_edit.tags # type: ignore - artifact_dbe.meta = artifact_edit.meta # type: ignore - # - artifact_dbe.name = artifact_edit.name # type: ignore - artifact_dbe.description = artifact_edit.description # type: ignore + artifact_dbe.updated_at = now + artifact_dbe.updated_by_id = user_id + artifact_dbe.flags = artifact_flags + artifact_dbe.meta = artifact_meta + artifact_dbe.name = artifact_name + artifact_dbe.description = artifact_description await session.commit() - await session.refresh(artifact_dbe) - artifact = map_dbe_to_dto( DTO=Artifact, dbe=artifact_dbe, # type: ignore @@ -208,31 +184,29 @@ async def archive_artifact( artifact_id: UUID, ) -> Optional[Artifact]: async with engine.core_session() as session: - stmt = select(self.ArtifactDBE).filter( + query = select(self.ArtifactDBE).filter( self.ArtifactDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.ArtifactDBE.id == artifact_id) # type: ignore + query = query.filter(self.ArtifactDBE.id == artifact_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - artifact_dbe = result.scalars().first() + artifact_dbe = result.scalar_one_or_none() if not artifact_dbe: return None now = datetime.now(timezone.utc) artifact_dbe.updated_at = now - artifact_dbe.deleted_at = now artifact_dbe.updated_by_id = user_id + artifact_dbe.deleted_at = now artifact_dbe.deleted_by_id = user_id await session.commit() - await session.refresh(artifact_dbe) - artifact = map_dbe_to_dto( DTO=Artifact, dbe=artifact_dbe, # type: ignore @@ -250,31 +224,29 @@ async def unarchive_artifact( artifact_id: UUID, ) -> Optional[Artifact]: async with engine.core_session() as session: - stmt = select(self.ArtifactDBE).filter( + query = select(self.ArtifactDBE).filter( self.ArtifactDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.ArtifactDBE.id == artifact_id) # type: ignore + query = query.filter(self.ArtifactDBE.id == artifact_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - artifact_dbe = result.scalars().first() + artifact_dbe = result.scalar_one_or_none() if not artifact_dbe: return None now = datetime.now(timezone.utc) artifact_dbe.updated_at = now - artifact_dbe.deleted_at = None artifact_dbe.updated_by_id = user_id + artifact_dbe.deleted_at = None artifact_dbe.deleted_by_id = None await session.commit() - await session.refresh(artifact_dbe) - artifact = map_dbe_to_dto( DTO=Artifact, dbe=artifact_dbe, # type: ignore @@ -288,82 +260,38 @@ async def query_artifacts( *, project_id: UUID, # - artifact_query: ArtifactQuery, - # - artifact_refs: Optional[List[Reference]] = None, + artifact_flags: Optional[Flags] = None, + artifact_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Artifact]: async with engine.core_session() as session: - stmt = select(self.ArtifactDBE).filter( + query = select(self.ArtifactDBE).filter( self.ArtifactDBE.project_id == project_id, # type: ignore ) - if artifact_refs: - artifact_ids = [ - artifact.id for artifact in artifact_refs if artifact.id - ] - - if artifact_ids: - stmt = stmt.filter( - self.ArtifactDBE.id.in_(artifact_ids) # type: ignore - ) - - artifact_slugs = [ - artifact.slug for artifact in artifact_refs if artifact.slug - ] - - if artifact_slugs: - stmt = stmt.filter( - self.ArtifactDBE.slug.in_(artifact_slugs) # type: ignore - ) - - if artifact_query.flags: - stmt = stmt.filter( - self.ArtifactDBE.flags.contains(artifact_query.flags) # type: ignore + if artifact_flags: + query = query.filter( + self.ArtifactDBE.flags.contains(artifact_flags) # type: ignore ) - if artifact_query.tags: - stmt = stmt.filter( - self.ArtifactDBE.tags.contains(artifact_query.tags) # type: ignore - ) - - if artifact_query.meta: - stmt = stmt.filter( - self.ArtifactDBE.meta.contains(artifact_query.meta) # type: ignore - ) - - if artifact_query.name: - stmt = stmt.filter( - self.ArtifactDBE.name.ilike(f"%{artifact_query.name}%"), # type: ignore - ) - - if artifact_query.description: - stmt = stmt.filter( - self.ArtifactDBE.description.ilike(f"%{artifact_query.description}%"), # type: ignore + if artifact_meta: + query = query.filter( + self.ArtifactDBE.meta.contains(artifact_meta) # type: ignore ) + # using include_* means defaulting to non-archived only + # using exclude_* means defaulting to all if include_archived is not True: - stmt = stmt.filter( + query = query.filter( self.ArtifactDBE.deleted_at.is_(None) # type: ignore ) - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=self.ArtifactDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) - - result = await session.execute(stmt) + result = await session.execute(query) artifact_dbes = result.scalars().all() - artifacts = [ + artifact = [ map_dbe_to_dto( DTO=Artifact, dbe=artifact_dbe, @@ -371,37 +299,41 @@ async def query_artifacts( for artifact_dbe in artifact_dbes ] - return artifacts + return artifact # ────────────────────────────────────────────────────────────────────────── # ─ variants ─────────────────────────────────────────────────────────────── - @suppress_exceptions(exclude=[EntityCreationConflict]) + @suppress_exceptions() async def create_variant( self, *, project_id: UUID, user_id: UUID, # - variant_create: VariantCreate, + artifact_id: UUID, + # + variant_slug: str, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[Variant]: variant = Variant( project_id=project_id, # - artifact_id=variant_create.artifact_id, + artifact_id=artifact_id, # - slug=variant_create.slug, + slug=variant_slug, # - created_at=datetime.now(timezone.utc), created_by_id=user_id, # - flags=variant_create.flags, - tags=variant_create.tags, - meta=variant_create.meta, - # - name=variant_create.name, - description=variant_create.description, + flags=variant_flags, + meta=variant_meta, + name=variant_name, + description=variant_description, ) variant_dbe = map_dto_to_dbe( @@ -410,26 +342,22 @@ async def create_variant( dto=variant, ) - try: - async with engine.core_session() as session: - session.add(variant_dbe) - - await session.commit() + async with engine.core_session() as session: + session.add(variant_dbe) - if not variant_dbe: - return None + await session.commit() - variant = map_dbe_to_dto( - DTO=Variant, - dbe=variant_dbe, # type: ignore - ) + # await session.refresh(variant_dbe, ["artifact"]) - return variant + if not variant_dbe: + return None - except Exception as e: - check_entity_creation_conflict(e) + variant = map_dbe_to_dto( + DTO=Variant, + dbe=variant_dbe, # type: ignore + ) - raise + return variant @suppress_exceptions() async def fetch_variant( @@ -444,24 +372,28 @@ async def fetch_variant( return None async with engine.core_session() as session: - stmt = select(self.VariantDBE).filter( + query = select(self.VariantDBE).filter( self.VariantDBE.project_id == project_id, # type: ignore ) if variant_ref: if variant_ref.id: - stmt = stmt.filter(self.VariantDBE.id == variant_ref.id) # type: ignore + query = query.filter(self.VariantDBE.id == variant_ref.id) # type: ignore elif variant_ref.slug: - stmt = stmt.filter(self.VariantDBE.slug == variant_ref.slug) # type: ignore + query = query.filter(self.VariantDBE.slug == variant_ref.slug) # type: ignore elif artifact_ref: if artifact_ref.id: - stmt = stmt.filter(self.VariantDBE.artifact_id == artifact_ref.id) # type: ignore + query = query.filter(self.VariantDBE.artifact_id == artifact_ref.id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + # query = query.options( + # joinedload(self.VariantDBE.artifact), # type: ignore + # ) + + result = await session.execute(query) - variant_dbe = result.scalars().first() + variant_dbe = result.scalar_one_or_none() if not variant_dbe: return None @@ -480,20 +412,25 @@ async def edit_variant( project_id: UUID, user_id: UUID, # - variant_edit: VariantEdit, + variant_id: UUID, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, ) -> Optional[Variant]: async with engine.core_session() as session: - stmt = select(self.VariantDBE).filter( + query = select(self.VariantDBE).filter( self.VariantDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.VariantDBE.id == variant_edit.id) # type: ignore + query = query.filter(self.VariantDBE.id == variant_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - variant_dbe = result.scalars().first() + variant_dbe = result.scalar_one_or_none() if not variant_dbe: return None @@ -501,17 +438,14 @@ async def edit_variant( now = datetime.now(timezone.utc) variant_dbe.updated_at = now variant_dbe.updated_by_id = user_id - # - variant_dbe.flags = variant_edit.flags - variant_dbe.tags = variant_edit.tags - variant_dbe.meta = variant_edit.meta - # - variant_dbe.name = variant_edit.name - variant_dbe.description = variant_edit.description + variant_dbe.flags = variant_flags + variant_dbe.meta = variant_meta + variant_dbe.name = variant_name + variant_dbe.description = variant_description await session.commit() - await session.refresh(variant_dbe) + # await session.refresh(variant_dbe, ["artifact"]) variant = map_dbe_to_dto( DTO=Variant, @@ -530,17 +464,17 @@ async def archive_variant( variant_id: UUID, ) -> Optional[Variant]: async with engine.core_session() as session: - stmt = select(self.VariantDBE).filter( + query = select(self.VariantDBE).filter( self.VariantDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.VariantDBE.id == variant_id) # type: ignore + query = query.filter(self.VariantDBE.id == variant_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - variant_dbe = result.scalars().first() + variant_dbe = result.scalar_one_or_none() if not variant_dbe: return None @@ -553,7 +487,7 @@ async def archive_variant( await session.commit() - await session.refresh(variant_dbe) + # await session.refresh(variant_dbe, ["artifact"]) variant = map_dbe_to_dto( DTO=Variant, @@ -572,30 +506,30 @@ async def unarchive_variant( variant_id: UUID, ) -> Optional[Variant]: async with engine.core_session() as session: - stmt = select(self.VariantDBE).filter( + query = select(self.VariantDBE).filter( self.VariantDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.VariantDBE.id == variant_id) # type: ignore + query = query.filter(self.VariantDBE.id == variant_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - variant_dbe = result.scalars().first() + variant_dbe = result.scalar_one_or_none() if not variant_dbe: return None now = datetime.now(timezone.utc) variant_dbe.updated_at = now - variant_dbe.deleted_at = None variant_dbe.updated_by_id = user_id + variant_dbe.deleted_at = None variant_dbe.deleted_by_id = None await session.commit() - await session.refresh(variant_dbe) + # await session.refresh(variant_dbe, ["artifact"]) variant = map_dbe_to_dto( DTO=Variant, @@ -610,91 +544,42 @@ async def query_variants( *, project_id: UUID, # - variant_query: VariantQuery, - # - artifact_refs: Optional[List[Reference]] = None, - variant_refs: Optional[List[Reference]] = None, + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Variant]: async with engine.core_session() as session: - stmt = select(self.VariantDBE).filter( + query = select(self.VariantDBE).filter( self.VariantDBE.project_id == project_id, # type: ignore ) - if artifact_refs: - artifact_ids = [ - artifact.id for artifact in artifact_refs if artifact.id - ] - - if artifact_ids: - stmt = stmt.filter( - self.VariantDBE.artifact_id.in_(artifact_ids) # type: ignore - ) - - if variant_refs: - variant_ids = [variant.id for variant in variant_refs if variant.id] - - if variant_ids: - stmt = stmt.filter( - self.VariantDBE.id.in_(variant_ids) # type: ignore - ) - - variant_slugs = [ - variant.slug for variant in variant_refs if variant.slug - ] - - if variant_slugs: - stmt = stmt.filter( - self.VariantDBE.slug.in_(variant_slugs) # type: ignore - ) - - if variant_query.flags: - stmt = stmt.filter( - self.VariantDBE.flags.contains(variant_query.flags) # type: ignore - ) - - if variant_query.tags: - stmt = stmt.filter( - self.VariantDBE.tags.contains(variant_query.tags) # type: ignore - ) - - if variant_query.meta: - stmt = stmt.filter( - self.VariantDBE.meta.contains(variant_query.meta) # type: ignore + if variant_flags: + query = query.filter( + self.VariantDBE.flags.contains(variant_flags) # type: ignore ) - if variant_query.name: - stmt = stmt.filter( - self.VariantDBE.name.ilike(f"%{variant_query.name}%"), # type: ignore - ) - - if variant_query.description: - stmt = stmt.filter( - self.VariantDBE.description.ilike(f"%{variant_query.description}%"), # type: ignore + if variant_meta: + query = query.filter( + self.VariantDBE.meta.contains(variant_meta) # type: ignore ) + # using include_* means defaulting to non-archived only + # using exclude_* means defaulting to all if include_archived is not True: - stmt = stmt.filter( - self.VariantDBE.deleted_at.is_(None), # type: ignore + query = query.filter( + self.VariantDBE.deleted_at.is_(None) # type: ignore ) - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=self.VariantDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) + # query = query.options( + # joinedload(self.VariantDBE.artifact), # type: ignore + # ) - result = await session.execute(stmt) + result = await session.execute(query) variant_dbes = result.scalars().all() - variants = [ + variant = [ map_dbe_to_dto( DTO=Variant, dbe=variant_dbe, @@ -702,7 +587,7 @@ async def query_variants( for variant_dbe in variant_dbes ] - return variants + return variant # -------------------------------------------------------------------------- @@ -713,48 +598,52 @@ async def fork_variant( project_id: UUID, user_id: UUID, # - artifact_fork: ArtifactFork, + variant_slug: str, + revision_slug: str, + # + variant_id: Optional[UUID] = None, + revision_id: Optional[UUID] = None, + depth: Optional[int] = None, + # + variant_flags: Optional[Flags] = None, + variant_meta: Optional[Meta] = None, + variant_name: Optional[str] = None, + variant_description: Optional[str] = None, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, ) -> Optional[Variant]: source_revisions = await self.log_revisions( project_id=project_id, # - revisions_log=RevisionsLog( - variant_id=artifact_fork.variant_id, - revision_id=artifact_fork.revision_id, - depth=artifact_fork.depth, - ), + variant_ref=Reference(id=variant_id), + revision_ref=Reference(id=revision_id), + depth=depth, ) if not source_revisions: return None - source_variant = await self.fetch_variant( - project_id=project_id, - # - variant_ref=Reference(id=source_revisions[0].variant_id), - ) + source_variant = source_revisions[0].variant if not source_variant: return None - variant_create = VariantCreate( - slug=artifact_fork.variant.slug, - # - name=artifact_fork.variant.name, - description=artifact_fork.variant.description, - # - flags=artifact_fork.variant.flags, - tags=artifact_fork.variant.tags, - meta=artifact_fork.variant.meta, - # - artifact_id=source_variant.artifact_id, - ) - target_variant = await self.create_variant( project_id=project_id, user_id=user_id, # - variant_create=variant_create, + artifact_id=source_variant.artifact_id, + # + variant_slug=variant_slug, + # + variant_flags=variant_flags, + variant_meta=variant_meta, + variant_name=variant_name, + variant_description=variant_description, ) if not target_variant: @@ -763,52 +652,38 @@ async def fork_variant( _hash = "_" + target_variant.id.hex for revision in reversed(source_revisions): - revision_commit = RevisionCommit( - slug=revision.slug + _hash, - # - name=revision.name, - description=revision.description, - # - flags=revision.flags, - tags=revision.tags, - meta=revision.meta, - # - message=revision.message, - data=revision.data, - # - artifact_id=target_variant.artifact_id, - variant_id=target_variant.id, - ) - await self.commit_revision( project_id=project_id, user_id=user_id, # - revision_commit=revision_commit, + artifact_id=target_variant.artifact_id, + variant_id=target_variant.id, + # + revision_slug=revision.slug + _hash, + # + revision_flags=revision.flags, + revision_meta=revision.meta, + revision_name=revision.name, + revision_description=revision.description, + revision_message=revision.message, + revision_data=revision.data, ) - revision_commit = RevisionCommit( - slug=artifact_fork.revision.slug, - # - name=artifact_fork.revision.name, - description=artifact_fork.revision.description, - # - flags=artifact_fork.revision.flags, - tags=artifact_fork.revision.tags, - meta=artifact_fork.revision.meta, - # - message=artifact_fork.revision.message, - data=artifact_fork.revision.data or source_revisions[0].data, - # - artifact_id=target_variant.artifact_id, - variant_id=target_variant.id, - ) - await self.commit_revision( project_id=project_id, user_id=user_id, # - revision_commit=revision_commit, + artifact_id=target_variant.artifact_id, + variant_id=target_variant.id, + # + revision_slug=revision_slug, + # + revision_flags=revision_flags, + revision_meta=revision_meta, + revision_name=revision_name, + revision_description=revision_description, + revision_message=revision_message, + revision_data=source_revisions[0].data, ) return target_variant # type: ignore @@ -817,37 +692,40 @@ async def fork_variant( # ─ revisions ────────────────────────────────────────────────────────────── - @suppress_exceptions(exclude=[EntityCreationConflict]) + @suppress_exceptions() async def create_revision( self, *, project_id: UUID, user_id: UUID, # - revision_create: RevisionCreate, + artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[Revision]: now = datetime.now(timezone.utc) revision = Revision( project_id=project_id, # - artifact_id=revision_create.artifact_id, - variant_id=revision_create.variant_id, + artifact_id=artifact_id, + variant_id=variant_id, # - slug=revision_create.slug, + slug=revision_slug, # - created_at=datetime.now(timezone.utc), created_by_id=user_id, # - flags=revision_create.flags, - tags=revision_create.tags, - meta=revision_create.meta, - # - name=revision_create.name, - description=revision_create.description, - # + flags=revision_flags, + meta=revision_meta, + name=revision_name, + description=revision_description, author=user_id, date=now, - message="Initial commit", ) revision_dbe = map_dto_to_dbe( @@ -856,38 +734,34 @@ async def create_revision( dto=revision, ) - try: - async with engine.core_session() as session: - session.add(revision_dbe) - - await session.commit() + async with engine.core_session() as session: + session.add(revision_dbe) - if not revision_dbe: - return None + await session.commit() - revision = map_dbe_to_dto( - DTO=Revision, - dbe=revision_dbe, # type: ignore - ) + # await session.refresh(revision_dbe, ["variant"]) - revision.version = await self._get_version( - project_id=project_id, - variant_id=revision.variant_id, # type: ignore - created_at=revision.created_at, # type: ignore - ) + if not revision_dbe: + return None - await self._set_version( - project_id=project_id, - revision_id=revision.id, # type: ignore - version=revision.version, - ) + revision = map_dbe_to_dto( + DTO=Revision, + dbe=revision_dbe, # type: ignore + ) - return revision + revision.version = await self._get_version( + project_id=project_id, + variant_id=revision.variant_id, # type: ignore + created_at=revision.created_at, # type: ignore + ) - except Exception as e: - check_entity_creation_conflict(e) + await self._set_version( + project_id=project_id, + revision_id=revision.id, # type: ignore + version=revision.version, + ) - raise + return revision @suppress_exceptions() async def fetch_revision( @@ -902,30 +776,34 @@ async def fetch_revision( return None async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - if revision_ref and (revision_ref.id or revision_ref.slug): + if revision_ref and not revision_ref.version: if revision_ref.id: - stmt = stmt.filter(self.RevisionDBE.id == revision_ref.id) # type: ignore + query = query.filter(self.RevisionDBE.id == revision_ref.id) # type: ignore elif revision_ref.slug: - stmt = stmt.filter(self.RevisionDBE.slug == revision_ref.slug) # type: ignore + query = query.filter(self.RevisionDBE.slug == revision_ref.slug) # type: ignore elif variant_ref: if variant_ref.id: - stmt = stmt.filter(self.RevisionDBE.variant_id == variant_ref.id) # type: ignore + query = query.filter(self.RevisionDBE.variant_id == variant_ref.id) # type: ignore if revision_ref and revision_ref.version: - stmt = stmt.filter(self.RevisionDBE.version == revision_ref.version) # type: ignore + query = query.filter(self.RevisionDBE.version == revision_ref.version) # type: ignore else: - stmt = stmt.order_by(self.RevisionDBE.created_at.desc()) # type: ignore - stmt = stmt.offset(0) + query = query.order_by(self.RevisionDBE.created_at.desc()) # type: ignore + query = query.offset(0) - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + # query = query.options( + # joinedload(self.RevisionDBE.variant), # type: ignore + # ) + + result = await session.execute(query) - revision_dbe = result.scalars().first() + revision_dbe = result.scalar_one_or_none() if not revision_dbe: return None @@ -935,6 +813,9 @@ async def fetch_revision( dbe=revision_dbe, # type: ignore ) + # TODO: improve map_dbe_to_dto to include relationships from dbe + # revision.variant = self._map_variant_relationship(dbe=revision_dbe) + return revision @suppress_exceptions() @@ -944,20 +825,25 @@ async def edit_revision( project_id: UUID, user_id: UUID, # - revision_edit: RevisionEdit, + revision_id: UUID, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, ) -> Optional[Revision]: async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.RevisionDBE.id == revision_edit.id) # type: ignore + query = query.filter(self.RevisionDBE.id == revision_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - revision_dbe = result.scalars().first() + revision_dbe = result.scalar_one_or_none() if not revision_dbe: return None @@ -965,17 +851,14 @@ async def edit_revision( now = datetime.now(timezone.utc) revision_dbe.updated_at = now revision_dbe.updated_by_id = user_id - # - revision_dbe.flags = revision_edit.flags - revision_dbe.tags = revision_edit.tags - revision_dbe.meta = revision_edit.meta - # - revision_dbe.name = revision_edit.name - revision_dbe.description = revision_edit.description + revision_dbe.flags = revision_flags + revision_dbe.meta = revision_meta + revision_dbe.name = revision_name + revision_dbe.description = revision_description await session.commit() - await session.refresh(revision_dbe) + # await session.refresh(revision_dbe, ["variant"]) revision = map_dbe_to_dto( DTO=Revision, @@ -994,17 +877,17 @@ async def archive_revision( revision_id: UUID, ) -> Optional[Revision]: async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.RevisionDBE.id == revision_id) # type: ignore + query = query.filter(self.RevisionDBE.id == revision_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - revision_dbe = result.scalars().first() + revision_dbe = result.scalar_one_or_none() if not revision_dbe: return None @@ -1017,7 +900,7 @@ async def archive_revision( await session.commit() - await session.refresh(revision_dbe) + # await session.refresh(revision_dbe, ["variant"]) revision = map_dbe_to_dto( DTO=Revision, @@ -1036,30 +919,30 @@ async def unarchive_revision( revision_id: UUID, ) -> Optional[Revision]: async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.RevisionDBE.id == revision_id) # type: ignore + query = query.filter(self.RevisionDBE.id == revision_id) # type: ignore - stmt = stmt.limit(1) + query = query.limit(1) - result = await session.execute(stmt) + result = await session.execute(query) - revision_dbe = result.scalars().first() + revision_dbe = result.scalar_one_or_none() if not revision_dbe: return None now = datetime.now(timezone.utc) revision_dbe.updated_at = now - revision_dbe.deleted_at = None revision_dbe.updated_by_id = user_id + revision_dbe.deleted_at = None revision_dbe.deleted_by_id = None await session.commit() - await session.refresh(revision_dbe) + # await session.refresh(revision_dbe, ["variant"]) revision = map_dbe_to_dto( DTO=Revision, @@ -1074,123 +957,38 @@ async def query_revisions( *, project_id: UUID, # - revision_query: RevisionQuery, - # - artifact_refs: Optional[List[Reference]] = None, - variant_refs: Optional[List[Reference]] = None, - revision_refs: Optional[List[Reference]] = None, + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, # include_archived: Optional[bool] = None, - # - windowing: Optional[Windowing] = None, ) -> List[Revision]: async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - if artifact_refs: - artifact_ids = [ - artifact.id for artifact in artifact_refs if artifact.id - ] - - if artifact_ids: - stmt = stmt.filter( - self.RevisionDBE.artifact_id.in_(artifact_ids) # type: ignore - ) - - if variant_refs: - variant_ids = [variant.id for variant in variant_refs if variant.id] - - if variant_ids: - stmt = stmt.filter( - self.RevisionDBE.variant_id.in_(variant_ids) # type: ignore - ) - - if revision_refs: - revision_ids = [ - revision.id for revision in revision_refs if revision.id - ] - - if revision_ids: - stmt = stmt.filter( - self.RevisionDBE.id.in_(revision_ids) # type: ignore - ) - - revision_slugs = [ - revision.slug for revision in revision_refs if revision.slug - ] - - if revision_slugs: - stmt = stmt.filter( - self.RevisionDBE.slug.in_(revision_slugs) # type: ignore - ) - - if revision_query.flags: - stmt = stmt.filter( - self.RevisionDBE.flags.contains(revision_query.flags) # type: ignore - ) - - if revision_query.tags: - stmt = stmt.filter( - self.RevisionDBE.tags.contains(revision_query.tags) # type: ignore - ) - - if revision_query.meta: - stmt = stmt.filter( - self.RevisionDBE.meta.contains(revision_query.meta) # type: ignore + if revision_flags: + query = query.filter( + self.RevisionDBE.flags.contains(revision_flags) # type: ignore ) - if revision_query.author: - stmt = stmt.filter( - self.RevisionDBE.author == revision_query.author # type: ignore - ) - - if revision_query.authors: - stmt = stmt.filter( - self.RevisionDBE.author.in_(revision_query.authors) # type: ignore - ) - - if revision_query.date: - stmt = stmt.filter( - self.RevisionDBE.date == revision_query.date # type: ignore - ) - - if revision_query.dates: - stmt = stmt.filter( - self.RevisionDBE.date.in_(revision_query.dates) # type: ignore - ) - - if revision_query.message: - stmt = stmt.filter( - self.RevisionDBE.message.ilike(f"%{revision_query.message}%") # type: ignore - ) - - if revision_query.name: - stmt = stmt.filter( - self.RevisionDBE.name.ilike(f"%{revision_query.name}%") # type: ignore - ) - - if revision_query.description: - stmt = stmt.filter( - self.RevisionDBE.description.ilike(f"%{revision_query.description}%") # type: ignore + if revision_meta: + query = query.filter( + self.RevisionDBE.meta.contains(revision_meta) # type: ignore ) + # using include_* means defaulting to non-archived only + # using exclude_* means defaulting to all if include_archived is not True: - stmt = stmt.filter( + query = query.filter( self.RevisionDBE.deleted_at.is_(None), # type: ignore ) - if windowing: - stmt = apply_windowing( - stmt=stmt, - DBE=self.RevisionDBE, - attribute="id", # UUID7 - order="descending", # jobs-style - windowing=windowing, - ) + # query = query.options( + # joinedload(self.RevisionDBE.variant), # type: ignore + # ) - result = await session.execute(stmt) + result = await session.execute(query) revision_dbes = result.scalars().all() @@ -1202,6 +1000,10 @@ async def query_revisions( for revision_dbe in revision_dbes ] + # TODO: improve map_dbe_to_dto to include relationships from dbe + # for revision_dbe, revision in zip(revision_dbes, revisions): + # revision.variant = self._map_variant_relationship(dbe=revision_dbe) + return revisions # -------------------------------------------------------------------------- @@ -1213,31 +1015,37 @@ async def commit_revision( project_id: UUID, user_id: UUID, # - revision_commit: RevisionCommit, + artifact_id: UUID, + variant_id: UUID, + # + revision_slug: str, + # + revision_flags: Optional[Flags] = None, + revision_meta: Optional[Meta] = None, + revision_name: Optional[str] = None, + revision_description: Optional[str] = None, + revision_message: Optional[str] = None, + revision_data: Optional[Data] = None, ) -> Optional[Revision]: now = datetime.now(timezone.utc) revision = Revision( project_id=project_id, # - artifact_id=revision_commit.artifact_id, - variant_id=revision_commit.variant_id, + artifact_id=artifact_id, + variant_id=variant_id, # - slug=revision_commit.slug, + slug=revision_slug, # - created_at=datetime.now(timezone.utc), created_by_id=user_id, # - flags=revision_commit.flags, - tags=revision_commit.tags, - meta=revision_commit.meta, - # - name=revision_commit.name, - description=revision_commit.description, - # + flags=revision_flags, + meta=revision_meta, + name=revision_name, + description=revision_description, author=user_id, date=now, - message=revision_commit.message, - data=revision_commit.data, + message=revision_message, + data=revision_data, ) revision_dbe = map_dto_to_dbe( @@ -1246,40 +1054,34 @@ async def commit_revision( dto=revision, ) - try: - async with engine.core_session() as session: - session.add(revision_dbe) - - await session.commit() - - await session.refresh(revision_dbe) + async with engine.core_session() as session: + session.add(revision_dbe) - if not revision_dbe: - return None + await session.commit() - revision = map_dbe_to_dto( - DTO=Revision, - dbe=revision_dbe, # type: ignore - ) + # await session.refresh(revision_dbe, ["variant"]) - revision.version = await self._get_version( - project_id=project_id, - variant_id=revision.variant_id, # type: ignore - created_at=revision.created_at, # type: ignore - ) + if not revision_dbe: + return None - await self._set_version( - project_id=project_id, - revision_id=revision.id, # type: ignore - version=revision.version, - ) + revision = map_dbe_to_dto( + DTO=Revision, + dbe=revision_dbe, # type: ignore + ) - return revision + revision.version = await self._get_version( + project_id=project_id, + variant_id=revision.variant_id, # type: ignore + created_at=revision.created_at, # type: ignore + ) - except Exception as e: - check_entity_creation_conflict(e) + await self._set_version( + project_id=project_id, + revision_id=revision.id, # type: ignore + version=revision.version, + ) - raise + return revision @suppress_exceptions(default=[]) async def log_revisions( @@ -1287,33 +1089,19 @@ async def log_revisions( *, project_id: UUID, # - revisions_log: RevisionsLog, + variant_ref: Optional[Reference] = None, + revision_ref: Optional[Reference] = None, + depth: Optional[int] = None, ) -> List[Revision]: revision = await self.fetch_revision( # type: ignore project_id=project_id, - # - variant_ref=( - Reference( - id=revisions_log.variant_id, - ) - if revisions_log.variant_id - else None - ), - revision_ref=( - Reference( - id=revisions_log.revision_id, - ) - if revisions_log.revision_id - else None - ), + variant_ref=variant_ref, + revision_ref=revision_ref, ) if not revision: return [] - depth = revisions_log.depth - version = int(revision.version) if revision.version else 0 - if depth is not None: if not isinstance(depth, int): return [] @@ -1323,31 +1111,35 @@ async def log_revisions( offset = None limit = None - order_by = self.RevisionDBE.id.desc() # type: ignore + order_by = self.RevisionDBE.created_at.desc() # type: ignore if depth is None: offset = 0 - limit = version + 1 - order_by = self.RevisionDBE.id.asc() # type: ignore + limit = revision.version + 1 + order_by = self.RevisionDBE.created_at.asc() # type: ignore elif depth is not None: - offset = max(version - depth + 1, 0) - limit = min(depth, version + 1) - order_by = self.RevisionDBE.id.asc() # type: ignore + offset = max(revision.version - depth + 1, 0) + limit = min(depth, revision.version + 1) + order_by = self.RevisionDBE.created_at.asc() # type: ignore async with engine.core_session() as session: - stmt = select(self.RevisionDBE).filter( + query = select(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter( + query = query.filter( self.RevisionDBE.variant_id == revision.variant_id, # type: ignore ) - stmt = stmt.order_by(order_by) - stmt = stmt.offset(offset) - stmt = stmt.limit(limit) + query = query.order_by(order_by) + query = query.offset(offset) + query = query.limit(limit) - result = await session.execute(stmt) + # query = query.options( + # joinedload(self.RevisionDBE.variant), # type: ignore + # ) + + result = await session.execute(query) revision_dbes = result.scalars().all() @@ -1362,8 +1154,9 @@ async def log_revisions( for revision_dbe in revision_dbes ] - if order_by == self.RevisionDBE.id.asc(): # type: ignore - revisions.reverse() + # TODO: improve map_dbe_to_dto to include relationships from dbe + # for revision_dbe, revision in zip(revision_dbes, revisions): + # revision.variant = self._map_variant_relationship(dbe=revision_dbe) return revisions @@ -1403,15 +1196,15 @@ async def _set_version( version: str, ) -> None: async with engine.core_session() as session: - stmt = update(self.RevisionDBE).filter( + query = update(self.RevisionDBE).filter( self.RevisionDBE.project_id == project_id, # type: ignore ) - stmt = stmt.filter(self.RevisionDBE.id == revision_id) # type: ignore + query = query.filter(self.RevisionDBE.id == revision_id) # type: ignore - stmt = stmt.values(version=version) # type: ignore + query = query.values(version=version) # type: ignore - await session.execute(stmt) + await session.execute(query) await session.commit() diff --git a/api/oss/src/dbs/postgres/git/dbas.py b/api/oss/src/dbs/postgres/git/dbas.py index 2abc929303..b28a450201 100644 --- a/api/oss/src/dbs/postgres/git/dbas.py +++ b/api/oss/src/dbs/postgres/git/dbas.py @@ -6,7 +6,6 @@ VersionDBA, LifecycleDBA, FlagsDBA, - TagsDBA, MetaDBA, HeaderDBA, CommitDBA, @@ -19,7 +18,6 @@ class ArtifactDBA( SlugDBA, LifecycleDBA, FlagsDBA, - TagsDBA, MetaDBA, HeaderDBA, ): @@ -31,7 +29,6 @@ class VariantDBA( SlugDBA, LifecycleDBA, FlagsDBA, - TagsDBA, MetaDBA, HeaderDBA, ): @@ -49,7 +46,6 @@ class RevisionDBA( VersionDBA, LifecycleDBA, FlagsDBA, - TagsDBA, MetaDBA, HeaderDBA, CommitDBA, diff --git a/api/oss/src/dbs/postgres/observability/dao.py b/api/oss/src/dbs/postgres/observability/dao.py index 100460fc93..8e529022fe 100644 --- a/api/oss/src/dbs/postgres/observability/dao.py +++ b/api/oss/src/dbs/postgres/observability/dao.py @@ -3,15 +3,12 @@ from traceback import print_exc from uuid import UUID -from sqlalchemy.exc import DBAPIError -from sqlalchemy import and_, or_, not_, distinct, Column, func, cast, text, Select +from sqlalchemy import and_, or_, not_, distinct, Column, func, cast, text from sqlalchemy import TIMESTAMP, Enum, UUID as SQLUUID, Integer, Numeric from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.future import select from sqlalchemy.dialects import postgresql -from oss.src.utils.logging import get_module_logger - from oss.src.dbs.postgres.shared.engine import engine from oss.src.dbs.postgres.observability.dbes import NodesDBE from oss.src.dbs.postgres.observability.mappings import ( @@ -21,7 +18,6 @@ ) from oss.src.core.observability.interfaces import ObservabilityDAOInterface -from oss.src.core.observability.dtos import TreeType from oss.src.core.observability.dtos import ( QueryDTO, SpanDTO, @@ -48,38 +44,18 @@ _is_string_key, ) -log = get_module_logger(__name__) - _DEFAULT_TIME_DELTA = timedelta(days=30) -_DEFAULT_INTERVAL = 1440 # 1 day -_DEFAULT_INTERVAL_TEXT = "1 day" +_DEFAULT_WINDOW = 1440 # 1 day +_DEFAULT_WINDOW_TEXT = "1 day" _MAX_ALLOWED_BUCKETS = 1024 _SUGGESTED_BUCKETS_LIST = [ - (1 * 1, "1 minute"), - (1 * 5, "5 minutes"), - (1 * 15, "15 minutes"), - (1 * 30, "30 minutes"), - (1 * 60 * 1, "1 hour"), - (1 * 60 * 3, "3 hours"), - (1 * 60 * 6, "6 hours"), - (1 * 60 * 12, "12 hours"), - (1 * 60 * 24 * 1, "1 day"), - (1 * 60 * 24 * 3, "3 days"), - (1 * 60 * 24 * 7, "7 days"), - (1 * 60 * 24 * 14, "14 days"), - (1 * 60 * 24 * 30, "30 days"), -] - -DEBUG_ARGS = { - "dialect": postgresql.dialect(), - "compile_kwargs": {"literal_binds": True}, -} -STATEMENT_TIMEOUT = 15_000 # milliseconds -COLUMNS_TO_EXCLUDE = ["content"] -COLUMNS_TO_INCLUDE = [ - column - for column in NodesDBE.__table__.columns - if column.name not in COLUMNS_TO_EXCLUDE + (1, "1 minute"), + (5, "5 minutes"), + (15, "15 minutes"), + (30, "30 minutes"), + (60, "1 hour"), + (720, "12 hours"), + (1440, "1 day"), ] @@ -96,11 +72,8 @@ async def query( ) -> Tuple[List[SpanDTO], Optional[int]]: try: async with engine.tracing_session() as session: - _stmt = text(f"SET LOCAL statement_timeout = '{STATEMENT_TIMEOUT}'") - await session.execute(_stmt) - # BASE (SUB-)QUERY - stmt = select(*COLUMNS_TO_INCLUDE) + query = select(NodesDBE) # ---------------- # GROUPING @@ -113,14 +86,14 @@ async def query( grouping.focus.value + "_id", ) - stmt = select( + query = select( distinct(grouping_column).label("grouping_key"), NodesDBE.created_at, ) # -------- # SCOPING - stmt = stmt.filter_by( + query = query.filter_by( project_id=project_id, ) # ------- @@ -130,10 +103,10 @@ async def query( # --------- if windowing: if windowing.oldest: - stmt = stmt.filter(NodesDBE.created_at >= windowing.oldest) + query = query.filter(NodesDBE.created_at >= windowing.oldest) if windowing.newest: - stmt = stmt.filter(NodesDBE.created_at < windowing.newest) + query = query.filter(NodesDBE.created_at < windowing.newest) # --------- # FILTERING @@ -143,7 +116,7 @@ async def query( operator = filtering.operator conditions = filtering.conditions - stmt = stmt.filter( + query = query.filter( _combine( operator, _filters(conditions), @@ -152,85 +125,77 @@ async def query( # --------- # SORTING - stmt = stmt.order_by( + query = query.order_by( NodesDBE.created_at.desc(), ) # ------- # COUNTING // dangerous with large datasets - count_stmt = select( + count_query = select( func.count() # pylint: disable=E1102:not-callable - ).select_from(stmt.subquery()) + ).select_from(query.subquery()) - count = (await session.execute(count_stmt)).scalar() + count = (await session.execute(count_query)).scalar() # -------- # PAGINATION pagination = query_dto.pagination # ---------- if pagination: - stmt = _chunk( - stmt, + query = _chunk( + query, **pagination.model_dump(), ) # ---------- # GROUPING if grouping and grouping_column: - substmt = stmt.subquery() + subquery = query.subquery() - stmt = select(*COLUMNS_TO_INCLUDE) - stmt = stmt.filter( - grouping_column.in_(select(substmt.c["grouping_key"])) + query = select(NodesDBE) + query = query.filter( + grouping_column.in_(select(subquery.c["grouping_key"])) ) # SORTING - stmt = stmt.order_by( + query = query.order_by( NodesDBE.created_at.desc(), NodesDBE.time_start.asc(), ) # ------- else: # SORTING - stmt = stmt.order_by( + query = query.order_by( NodesDBE.time_start.desc(), ) # ------- # -------- # DEBUGGING - # log.trace(str(stmt.compile(**DEBUG_ARGS)).replace("\n", " ")) + # TODO: HIDE THIS BEFORE RELEASING + # print( + # str( + # query.compile( + # dialect=postgresql.dialect(), + # compile_kwargs={"literal_binds": True}, + # ) + # ) + # ) # --------- # QUERY EXECUTION - spans = (await session.execute(stmt)).all() + spans = (await session.execute(query)).scalars().all() # --------------- return [map_span_dbe_to_span_dto(span) for span in spans], count - except DBAPIError as e: - print_exc() - - if "QueryCanceledError" in str(e.orig): - raise FilteringException( - "TracingQuery execution was cancelled due to timeout. " - "Please try again with a smaller time range." - ) from e - - raise e - except AttributeError as e: print_exc() raise FilteringException( - "Failed to run analytics due to non-existent key(s)." + "Failed to run query due to non-existent key(s)." ) from e - except Exception as e: - print_exc() - - raise e - async def analytics( self, *, @@ -239,9 +204,6 @@ async def analytics( ) -> Tuple[List[BucketDTO], Optional[int]]: try: async with engine.tracing_session() as session: - stmt = text(f"SET LOCAL statement_timeout = '{STATEMENT_TIMEOUT}'") - await session.execute(stmt) - # WINDOWING today = datetime.now() start_of_next_day = datetime.combine( @@ -250,7 +212,7 @@ async def analytics( oldest = None newest = None - interval_text = None + window_text = None # --------- if analytics_dto.windowing: if analytics_dto.windowing.newest: @@ -266,36 +228,36 @@ async def analytics( else: oldest = newest - _DEFAULT_TIME_DELTA - if analytics_dto.windowing.interval: - _desired_interval = analytics_dto.windowing.interval + if analytics_dto.windowing.window: + _desired_window = analytics_dto.windowing.window else: - _desired_interval = _DEFAULT_INTERVAL + _desired_window = _DEFAULT_WINDOW - _interval_minutes = (newest - oldest).total_seconds() // 60 + _window_minutes = (newest - oldest).total_seconds() // 60 - _desired_buckets = _interval_minutes // _desired_interval + _desired_buckets = _window_minutes // _desired_window if _desired_buckets > _MAX_ALLOWED_BUCKETS: for ( _suggested_minutes, - _suggest_interval_text, + _suggest_window_text, ) in _SUGGESTED_BUCKETS_LIST: - _suggested_buckets = _interval_minutes // _suggested_minutes + _suggested_buckets = _window_minutes // _suggested_minutes if _suggested_buckets <= _MAX_ALLOWED_BUCKETS: - interval_text = _suggest_interval_text + window_text = _suggest_window_text break - if not interval_text: - interval_text = _SUGGESTED_BUCKETS_LIST[-1][1] + if not window_text: + window_text = _SUGGESTED_BUCKETS_LIST[-1][1] else: - interval_text = f"{_desired_interval} minute{'s' if _desired_interval > 1 else ''}" + window_text = f"{_desired_window} minute{'s' if _desired_window > 1 else ''}" else: newest = start_of_next_day oldest = newest - _DEFAULT_TIME_DELTA - interval_text = _DEFAULT_INTERVAL_TEXT + window_text = _DEFAULT_WINDOW_TEXT # --------- @@ -305,7 +267,7 @@ async def analytics( _cost = None _tokens = None _timestamp = func.date_bin( - text(f"'{interval_text}'"), + text(f"'{window_text}'"), NodesDBE.created_at, oldest, ).label("timestamp") @@ -361,7 +323,7 @@ async def analytics( # -------- # BASE QUERY - total_stmt = select( + total_query = select( _count, _duration, _cost, @@ -369,7 +331,7 @@ async def analytics( _timestamp, ).select_from(NodesDBE) - error_stmt = select( + error_query = select( _count, _duration, _cost, @@ -379,29 +341,29 @@ async def analytics( # ---------- # WINDOWING - total_stmt = total_stmt.filter( + total_query = total_query.filter( NodesDBE.created_at >= oldest, NodesDBE.created_at < newest, ) - error_stmt = error_stmt.filter( + error_query = error_query.filter( NodesDBE.created_at >= oldest, NodesDBE.created_at < newest, ) # --------- # SCOPING - total_stmt = total_stmt.filter_by( + total_query = total_query.filter_by( project_id=project_id, ) - error_stmt = error_stmt.filter_by( + error_query = error_query.filter_by( project_id=project_id, ) # ------- # TOTAL vs ERROR - error_stmt = error_stmt.filter( + error_query = error_query.filter( NodesDBE.exception.isnot(None), ) # ---------------- @@ -413,14 +375,14 @@ async def analytics( operator = filtering.operator conditions = filtering.conditions - total_stmt = total_stmt.filter( + total_query = total_query.filter( _combine( operator, _filters(conditions), ) ) - error_stmt = error_stmt.filter( + error_query = error_query.filter( _combine( operator, _filters(conditions), @@ -433,26 +395,26 @@ async def analytics( analytics_dto.grouping and analytics_dto.grouping.focus.value != "node" ): - total_stmt = total_stmt.filter_by( + total_query = total_query.filter_by( parent_id=None, ) - error_stmt = error_stmt.filter_by( + error_query = error_query.filter_by( parent_id=None, ) # -------- # SORTING - total_stmt = total_stmt.group_by("timestamp") + total_query = total_query.group_by("timestamp") - error_stmt = error_stmt.group_by("timestamp") + error_query = error_query.group_by("timestamp") # ------- # DEBUGGING # TODO: HIDE THIS BEFORE RELEASING # print( # str( - # total_stmt.compile( + # total_query.compile( # dialect=postgresql.dialect(), # compile_kwargs={"literal_binds": True}, # ) @@ -461,7 +423,7 @@ async def analytics( # print("...") # print( # str( - # error_stmt.compile( + # error_query.compile( # dialect=postgresql.dialect(), # compile_kwargs={"literal_binds": True}, # ) @@ -470,34 +432,23 @@ async def analytics( # --------- # QUERY EXECUTION - total_bucket_dbes = (await session.execute(total_stmt)).all() - error_bucket_dbes = (await session.execute(error_stmt)).all() + total_bucket_dbes = (await session.execute(total_query)).all() + error_bucket_dbes = (await session.execute(error_query)).all() # --------------- - interval = _to_minutes(interval_text) + window = _to_minutes(window_text) - timestamps = _to_timestamps(oldest, newest, interval) + timestamps = _to_timestamps(oldest, newest, window) bucket_dtos, count = map_bucket_dbes_to_dtos( total_bucket_dbes=total_bucket_dbes, error_bucket_dbes=error_bucket_dbes, - interval=interval, + window=window, timestamps=timestamps, ) return bucket_dtos, count - except DBAPIError as e: - print_exc() - - if "QueryCanceledError" in str(e.orig): - raise FilteringException( - "TracingQuery execution was cancelled due to timeout. " - "Please try again with a smaller time range." - ) from e - - raise e - except AttributeError as e: print_exc() @@ -505,19 +456,12 @@ async def analytics( "Failed to run analytics due to non-existent key(s)." ) from e - except Exception as e: - print_exc() - - raise e - async def create_one( self, *, project_id: UUID, span_dto: SpanDTO, ) -> None: - span_dto.tree.type = TreeType.INVOCATION - span_dbe = map_span_dto_to_span_dbe( project_id=project_id, span_dto=span_dto, @@ -533,9 +477,6 @@ async def create_many( project_id: UUID, span_dtos: List[SpanDTO], ) -> None: - for span_dto in span_dtos: - span_dto.tree.type = TreeType.INVOCATION - span_dbes = [ map_span_dto_to_span_dbe( project_id=project_id, @@ -559,14 +500,14 @@ async def read_one( ) -> Union[Optional[SpanDTO], Optional[NodesDBE]]: span_dbe = None async with engine.tracing_session() as session: - stmt = select(NodesDBE) + query = select(NodesDBE) - stmt = stmt.filter_by( + query = query.filter_by( project_id=project_id, node_id=node_id, ) - span_dbe = (await session.execute(stmt)).scalars().one_or_none() + span_dbe = (await session.execute(query)).scalars().one_or_none() span_dto = None if span_dbe and to_dto: @@ -585,13 +526,13 @@ async def read_many( ) -> Union[List[SpanDTO], List[NodesDBE]]: span_dbes = [] async with engine.tracing_session() as session: - stmt = select(NodesDBE) + query = select(NodesDBE) - stmt = stmt.filter_by(project_id=project_id) + query = query.filter_by(project_id=project_id) - stmt = stmt.filter(NodesDBE.node_id.in_(node_ids)) + query = query.filter(NodesDBE.node_id.in_(node_ids)) - span_dbes = (await session.execute(stmt)).scalars().all() + span_dbes = (await session.execute(query)).scalars().all() span_dtos = [] if span_dbes and to_dto: @@ -610,13 +551,13 @@ async def read_children( ) -> Union[List[SpanDTO], List[NodesDBE]]: span_dbes = [] async with engine.tracing_session() as session: - stmt = select(NodesDBE) + query = select(NodesDBE) - stmt = stmt.filter_by(project_id=project_id) + query = query.filter_by(project_id=project_id) - stmt = stmt.filter_by(parent_id=parent_id) + query = query.filter_by(parent_id=parent_id) - span_dbes = (await session.execute(stmt)).scalars().all() + span_dbes = (await session.execute(query)).scalars().all() span_dtos = [] if span_dbes and to_dto: @@ -691,48 +632,48 @@ async def delete_many( def _chunk( - stmt: Select, + query: select, page: Optional[int] = None, size: Optional[int] = None, next: Optional[datetime] = None, # pylint: disable=W0621:redefined-builtin stop: Optional[datetime] = None, -) -> Select: +) -> select: # 1. LIMIT size OFFSET (page - 1) * size # -> unstable if windowing.newest is not set if page and size: limit = size offset = (page - 1) * size - stmt = stmt.limit(limit).offset(offset) + query = query.limit(limit).offset(offset) # 2. WHERE next > created_at LIMIT size # -> unstable if created_at is not unique elif next and size: - stmt = stmt.filter(NodesDBE.created_at < next) - stmt = stmt.limit(size) + query = query.filter(NodesDBE.created_at < next) + query = query.limit(size) # 3. WHERE next > created_at AND created_at >= stop # -> stable thanks to the </<= combination elif next and stop: - stmt = stmt.filter(NodesDBE.created_at < next) - stmt = stmt.filter(NodesDBE.created_at >= stop) + query = query.filter(NodesDBE.created_at < next) + query = query.filter(NodesDBE.created_at >= stop) # 4. WHERE LIMIT size - # -> useful as a starter + # -> useful as a starter query elif size: - stmt = stmt.limit(size) + query = query.limit(size) # 5. WHERE created_at >= stop - # -> useful as a starter + # -> useful as a starter query elif stop: - stmt = stmt.filter(NodesDBE.created_at >= stop) + query = query.filter(NodesDBE.created_at >= stop) # 6. WHERE next > created_at # -> rather useless elif next: - stmt = stmt.filter(NodesDBE.created_at < next) + query = query.filter(NodesDBE.created_at < next) - return stmt + return query def _combine( @@ -895,9 +836,9 @@ def _filters(filtering: FilteringDTO) -> list: def _to_minutes( - interval_text: str, + window_text: str, ) -> int: - quantity, unit = interval_text.split() + quantity, unit = window_text.split() quantity = int(quantity) if unit == "minute" or unit == "minutes": @@ -917,7 +858,7 @@ def _to_minutes( def _to_timestamps( oldest: datetime, newest: datetime, - interval: int, + window: int, ) -> List[datetime]: buckets = [] @@ -938,6 +879,6 @@ def _to_timestamps( while bucket_start < _newest: buckets.append(bucket_start) - bucket_start += timedelta(minutes=interval) + bucket_start += timedelta(minutes=window) return buckets diff --git a/api/oss/src/dbs/postgres/observability/mappings.py b/api/oss/src/dbs/postgres/observability/mappings.py index 6fcc8269c9..0e780731d8 100644 --- a/api/oss/src/dbs/postgres/observability/mappings.py +++ b/api/oss/src/dbs/postgres/observability/mappings.py @@ -3,7 +3,7 @@ from datetime import datetime from uuid import UUID -from oss.src.core.shared.dtos import LegacyLifecycleDTO +from oss.src.core.shared.dtos import LifecycleDTO from oss.src.core.observability.dtos import ( RootDTO, TreeDTO, @@ -28,9 +28,9 @@ def map_span_dbe_to_span_dto(span: NodesDBE) -> SpanDTO: return SpanDTO( trace_id=trace_id, span_id=span_id, - lifecycle=LegacyLifecycleDTO( - created_at=str(span.created_at), - updated_at=str(span.updated_at), + lifecycle=LifecycleDTO( + created_at=span.created_at, + updated_at=span.updated_at, updated_by_id=str(span.updated_by_id) if span.updated_by_id else None, ), root=RootDTO( @@ -140,7 +140,7 @@ def map_span_dto_to_span_dbe( def map_bucket_dbes_to_dtos( total_bucket_dbes: List[NodesDBE], error_bucket_dbes: List[NodesDBE], - interval: int, + window: int, timestamps: Optional[List[datetime]] = None, ) -> Tuple[List[BucketDTO], int]: total_metrics = { @@ -178,7 +178,7 @@ def map_bucket_dbes_to_dtos( bucket_dtos = [ BucketDTO( timestamp=timestamp, - interval=interval, + window=window, total=total_metrics.get(timestamp, MetricsDTO()), error=error_metrics.get(timestamp, MetricsDTO()), ) diff --git a/api/oss/src/dbs/postgres/queries/dbes.py b/api/oss/src/dbs/postgres/queries/dbes.py deleted file mode 100644 index 9f7f64dd33..0000000000 --- a/api/oss/src/dbs/postgres/queries/dbes.py +++ /dev/null @@ -1,136 +0,0 @@ -from sqlalchemy.orm import relationship -from sqlalchemy import ( - ForeignKeyConstraint, - PrimaryKeyConstraint, - Index, - UniqueConstraint, -) - -from oss.src.dbs.postgres.shared.base import Base -from oss.src.dbs.postgres.shared.dbas import ProjectScopeDBA -from oss.src.dbs.postgres.git.dbas import VariantDBA, RevisionDBA, ArtifactDBA - - -CASCADE_ALL_DELETE = "all, delete-orphan" - - -class QueryArtifactDBE(Base, ProjectScopeDBA, ArtifactDBA): - __tablename__ = "query_artifacts" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), - UniqueConstraint( - "project_id", - "slug", - ), - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - Index( - "ix_query_artifacts_project_id_slug", - "project_id", - "slug", - ), - ) - - -class QueryVariantDBE(Base, ProjectScopeDBA, VariantDBA): - __tablename__ = "query_variants" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), - UniqueConstraint( - "project_id", - "slug", - ), - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - Index( - "ix_query_variants_project_id_slug", - "project_id", - "slug", - ), - Index( - "ix_query_variants_project_id_artifact_id", - "project_id", - "artifact_id", - ), - ) - - artifact = relationship( - "QueryArtifactDBE", - backref="query_variants", - cascade=CASCADE_ALL_DELETE, - passive_deletes=True, - single_parent=True, - ) - - -class QueryRevisionDBE(Base, ProjectScopeDBA, RevisionDBA): - __tablename__ = "query_revisions" - - __table_args__ = ( - PrimaryKeyConstraint( - "project_id", - "id", - ), - UniqueConstraint( - "project_id", - "slug", - ), - ForeignKeyConstraint( - ["project_id"], - ["projects.id"], - ondelete="CASCADE", - ), - ForeignKeyConstraint( - ["project_id", "artifact_id"], - ["query_artifacts.project_id", "query_artifacts.id"], - ondelete="CASCADE", - ), - ForeignKeyConstraint( - ["project_id", "variant_id"], - ["query_variants.project_id", "query_variants.id"], - ondelete="CASCADE", - ), - Index( - "ix_query_revisions_project_id_slug", - "project_id", - "slug", - ), - Index( - "ix_query_revisions_project_id_artifact_id", - "project_id", - "artifact_id", - ), - Index( - "ix_query_revisions_project_id_variant_id", - "project_id", - "variant_id", - ), - ) - - artifact = relationship( - "QueryArtifactDBE", - viewonly=True, - ) - variant = relationship( - "QueryVariantDBE", - viewonly=True, - ) diff --git a/api/oss/src/dbs/postgres/secrets/dao.py b/api/oss/src/dbs/postgres/secrets/dao.py deleted file mode 100644 index 51811500eb..0000000000 --- a/api/oss/src/dbs/postgres/secrets/dao.py +++ /dev/null @@ -1,114 +0,0 @@ -import json -from uuid import UUID - -from oss.src.dbs.postgres.secrets.dbes import SecretsDBE -from oss.src.core.secrets.interfaces import SecretsDAOInterface - - -from oss.src.dbs.postgres.shared.engine import engine - -from oss.src.core.secrets.dtos import CreateSecretDTO, UpdateSecretDTO -from oss.src.dbs.postgres.secrets.mappings import ( - map_secrets_dto_to_dbe, - map_secrets_dbe_to_dto, - map_secrets_dto_to_dbe_update, -) - -from sqlalchemy import select - - -class SecretsDAO(SecretsDAOInterface): - def __init__(self): - pass - - async def create( - self, - project_id: UUID, - create_secret_dto: CreateSecretDTO, - ): - secrets_dbe = map_secrets_dto_to_dbe( - project_id=project_id, - secret_dto=create_secret_dto, - ) - async with engine.core_session() as session: - session.add(secrets_dbe) - await session.commit() - - secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) - return secrets_dto - - async def get( - self, - project_id: UUID, - secret_id: UUID, - ): - async with engine.core_session() as session: - stmt = select(SecretsDBE).filter_by( - id=secret_id, - project_id=project_id, - ) - result = await session.execute(stmt) # type: ignore - secrets_dbe = result.scalar() - - if secrets_dbe is None: - return None - - secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) - return secrets_dto - - async def list(self, project_id: UUID): - async with engine.core_session() as session: - stmt = select(SecretsDBE).filter_by(project_id=project_id) - - results = await session.execute(stmt) # type: ignore - secrets_dbes = results.scalars().all() - vault_secret_dtos = [ - map_secrets_dbe_to_dto(secrets_dbe=secret_dbe) - for secret_dbe in secrets_dbes - ] - return vault_secret_dtos - - async def update( - self, - project_id: UUID, - secret_id: UUID, - update_secret_dto: UpdateSecretDTO, - ): - async with engine.core_session() as session: - stmt = select(SecretsDBE).filter_by( - id=secret_id, - project_id=project_id, - ) - result = await session.execute(stmt) - secrets_dbe = result.scalar() - - if secrets_dbe is None: - return None - - map_secrets_dto_to_dbe_update( - secrets_dbe=secrets_dbe, update_secret_dto=update_secret_dto - ) - - await session.commit() - await session.refresh(secrets_dbe) - - updated_secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) - return updated_secrets_dto - - async def delete( - self, - project_id: UUID, - secret_id: UUID, - ): - async with engine.core_session() as session: - stmt = select(SecretsDBE).filter_by( - id=secret_id, - project_id=project_id, - ) - result = await session.execute(stmt) # type: ignore - vault_secret_dbe = result.scalar() - if vault_secret_dbe is None: - return - - await session.delete(vault_secret_dbe) - await session.commit() diff --git a/api/oss/src/dbs/postgres/secrets/dbas.py b/api/oss/src/dbs/postgres/secrets/dbas.py deleted file mode 100644 index ede7cac05f..0000000000 --- a/api/oss/src/dbs/postgres/secrets/dbas.py +++ /dev/null @@ -1,24 +0,0 @@ -import uuid_utils.compat as uuid -from sqlalchemy import Column, Enum as SQLEnum, UUID - -from oss.src.core.secrets.enums import SecretKind -from oss.src.dbs.postgres.shared.dbas import ( - ProjectScopeDBA, - LegacyLifecycleDBA, - HeaderDBA, -) -from oss.src.dbs.postgres.secrets.custom_fields import PGPString - - -class SecretsDBA(ProjectScopeDBA, LegacyLifecycleDBA, HeaderDBA): - __abstract__ = True - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - kind = Column(SQLEnum(SecretKind, name="secretkind_enum")) # type: ignore - data = Column(PGPString()) # type: ignore diff --git a/api/oss/src/dbs/postgres/secrets/dbes.py b/api/oss/src/dbs/postgres/secrets/dbes.py deleted file mode 100644 index 55420af3a8..0000000000 --- a/api/oss/src/dbs/postgres/secrets/dbes.py +++ /dev/null @@ -1,6 +0,0 @@ -from oss.src.dbs.postgres.shared.base import Base -from oss.src.dbs.postgres.secrets.dbas import SecretsDBA - - -class SecretsDBE(Base, SecretsDBA): - __tablename__ = "secrets" diff --git a/api/oss/src/dbs/postgres/secrets/mappings.py b/api/oss/src/dbs/postgres/secrets/mappings.py deleted file mode 100644 index e79aeadd87..0000000000 --- a/api/oss/src/dbs/postgres/secrets/mappings.py +++ /dev/null @@ -1,60 +0,0 @@ -import uuid -import json - -from oss.src.dbs.postgres.secrets.dbes import SecretsDBE -from oss.src.core.secrets.dtos import ( - Header, - SecretKind, - LegacyLifecycleDTO, - CreateSecretDTO, - UpdateSecretDTO, - SecretResponseDTO, -) - - -def map_secrets_dto_to_dbe( - *, project_id: uuid.UUID, secret_dto: CreateSecretDTO -) -> SecretsDBE: - vault_secret_dbe = SecretsDBE( - name=secret_dto.header.name if secret_dto.header else None, - description=(secret_dto.header.description if secret_dto.header else None), - project_id=project_id, - kind=secret_dto.secret.kind.value, - data=json.dumps(secret_dto.secret.data.model_dump(exclude_none=True)), - ) - return vault_secret_dbe - - -def map_secrets_dto_to_dbe_update( - secrets_dbe: SecretsDBE, update_secret_dto: UpdateSecretDTO -) -> None: - if update_secret_dto.header: - for key, value in update_secret_dto.header.model_dump( - exclude_none=True - ).items(): - if hasattr(secrets_dbe, key): - setattr(secrets_dbe, key, value) - - if update_secret_dto.secret: - for key, value in update_secret_dto.secret.model_dump( - exclude_none=True - ).items(): - if key == "data" and hasattr(secrets_dbe, key): - secrets_dbe.data = update_secret_dto.secret.data.model_dump_json() - elif hasattr(secrets_dbe, key): - setattr(secrets_dbe, key, value) - - -def map_secrets_dbe_to_dto(*, secrets_dbe: SecretsDBE) -> SecretResponseDTO: - vault_secret_dto = SecretResponseDTO( - id=secrets_dbe.id, # type: ignore - kind=SecretKind(secrets_dbe.kind).value, - data=json.loads(secrets_dbe.data), # type: ignore - header=Header(name=secrets_dbe.name, description=secrets_dbe.description), - lifecycle=LegacyLifecycleDTO( - created_at=str(secrets_dbe.created_at), - updated_at=str(secrets_dbe.updated_at), - ), - ) - - return vault_secret_dto diff --git a/api/oss/src/dbs/postgres/shared/dbas.py b/api/oss/src/dbs/postgres/shared/dbas.py index c6ada32dff..506894fdc0 100644 --- a/api/oss/src/dbs/postgres/shared/dbas.py +++ b/api/oss/src/dbs/postgres/shared/dbas.py @@ -1,6 +1,6 @@ import uuid_utils.compat as uuid -from sqlalchemy.dialects.postgresql import JSONB, JSON +from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy import Column, String, UUID, TIMESTAMP, func, Integer @@ -139,42 +139,46 @@ class VersionedDBA: ) -class FlagsDBA: +class TagsDBA: __abstract__ = True - flags = Column( + tags = Column( JSONB(none_as_null=True), nullable=True, ) -class TagsDBA: +class MetaDBA: __abstract__ = True - tags = Column( + meta = Column( JSONB(none_as_null=True), nullable=True, ) -class MetaDBA: +class DataDBA: __abstract__ = True - meta = Column( - JSON(none_as_null=True), + data = Column( + JSONB(none_as_null=True), nullable=True, ) -class DataDBA: +class FlagsDBA: __abstract__ = True - data = Column( - JSON(none_as_null=True), + flags = Column( + JSONB(none_as_null=True), nullable=True, ) +class BodyDBA(TagsDBA, DataDBA): + pass + + class CommitDBA: __abstract__ = True diff --git a/api/oss/src/dbs/postgres/shared/engine.py b/api/oss/src/dbs/postgres/shared/engine.py index 67253fbed1..92ebe153bb 100644 --- a/api/oss/src/dbs/postgres/shared/engine.py +++ b/api/oss/src/dbs/postgres/shared/engine.py @@ -1,7 +1,6 @@ from asyncio import current_task from typing import AsyncGenerator from contextlib import asynccontextmanager -from math import floor from sqlalchemy.ext.asyncio import ( AsyncSession, @@ -17,28 +16,12 @@ ) -DATABASE_MEMORY = 32 * 1024 * 1024 * 1024 # 32 GB -DATABASE_FACTOR = 8 * 1024 * 1024 * 1.15 # 8 MB + 15% overhead -DATABASE_MAX_CONNECTIONS = 5000 # 5000 connections -MAX_CONNECTIONS = min(DATABASE_MEMORY / DATABASE_FACTOR, DATABASE_MAX_CONNECTIONS) -APP_CONNECTIONS = MAX_CONNECTIONS * 0.9 # reserve 10% for non-app connections -NOF_CONSUMERS = 2 * 4 # 2 engines x 4 containers -NOF_CONNECTIONS = floor(APP_CONNECTIONS / NOF_CONSUMERS) -POOL_SIZE = floor(NOF_CONNECTIONS * 0.25) -MAX_OVERFLOW = NOF_CONNECTIONS - POOL_SIZE -POOL_RECYCLE = 30 * 60 # 30 minutes - - class Engine: def __init__(self) -> None: self.postgres_uri_core = POSTGRES_URI_CORE self.async_core_engine: AsyncEngine = create_async_engine( url=self.postgres_uri_core, - pool_pre_ping=True, - pool_recycle=POOL_RECYCLE, - pool_size=POOL_SIZE, - max_overflow=MAX_OVERFLOW, ) self.async_core_session_maker = async_sessionmaker( autocommit=False, @@ -56,10 +39,6 @@ def __init__(self) -> None: self.async_tracing_engine: AsyncEngine = create_async_engine( url=self.postgres_uri_tracing, - pool_pre_ping=True, - pool_recycle=POOL_RECYCLE, - pool_size=POOL_SIZE, - max_overflow=MAX_OVERFLOW, ) self.async_tracing_session_maker = async_sessionmaker( autocommit=False, diff --git a/api/oss/src/dbs/postgres/shared/exceptions.py b/api/oss/src/dbs/postgres/shared/exceptions.py deleted file mode 100644 index b9caab2add..0000000000 --- a/api/oss/src/dbs/postgres/shared/exceptions.py +++ /dev/null @@ -1,53 +0,0 @@ -from typing import Optional -import re - -from sqlalchemy.exc import IntegrityError -from sqlalchemy.dialects.postgresql.asyncpg import AsyncAdapt_asyncpg_dbapi - -from oss.src.utils.logging import get_module_logger -from oss.src.core.shared.exceptions import EntityCreationConflict - -log = get_module_logger(__name__) - - -def check_entity_creation_conflict( - exception: Exception, - *, - entity: Optional[str] = "Entity", -): - try: - if not exception: - return - - if isinstance(exception, IntegrityError): - original_exception = getattr(exception, "orig", None) - - if original_exception is None: - return - - if isinstance(original_exception, AsyncAdapt_asyncpg_dbapi.IntegrityError): - error = str(original_exception) - - match = re.search(r"Key \((?P<keys>.+?)\)=\((?P<vals>.+?)\)", error) - - if not match: - return - - keys = match.group("keys").split(", ") - vals = match.group("vals").split(", ") - - conflict = dict(zip(keys, vals)) - - if "project_id" in conflict: - del conflict["project_id"] - - raise EntityCreationConflict( - entity=entity, - conflict=conflict, - ) - - except Exception as e: # pylint: disable=bare-except - if not isinstance(e, EntityCreationConflict): - return - - raise diff --git a/api/oss/src/dbs/postgres/shared/utils.py b/api/oss/src/dbs/postgres/shared/utils.py index 7674bf114a..e14cb6746c 100644 --- a/api/oss/src/dbs/postgres/shared/utils.py +++ b/api/oss/src/dbs/postgres/shared/utils.py @@ -1,103 +1,34 @@ -from typing import Optional +from typing import Any, Optional +from uuid import uuid4 +from functools import wraps +from traceback import print_exc -from sqlalchemy import Select, and_, or_ -from oss.src.core.shared.dtos import Windowing +from oss.src.utils.logging import get_module_logger -def apply_windowing( - *, - stmt: Select, - DBE, - attribute: str, - order: str, - windowing: Windowing, -) -> Select: - # ---------------------------------------------------------------- # - entitty_id_attribute = DBE.id if getattr(DBE, "id", None) else None # type: ignore - span_id_attribute = DBE.span_id if getattr(DBE, "span_id", None) else None # type: ignore - id_attribute = span_id_attribute or entitty_id_attribute or None - created_at_attribute = DBE.created_at if getattr(DBE, "created_at", None) else None # type: ignore - start_time_attribute = DBE.start_time if getattr(DBE, "start_time", None) else None # type: ignore - time_attribute = start_time_attribute or created_at_attribute or None - # UUID7 -> id ---------------------------------------------------- # - order_attribute = { - "id": id_attribute, - "span_id": span_id_attribute, - "created_at": created_at_attribute, - "start_time": start_time_attribute, - }.get(attribute.lower(), created_at_attribute) +log = get_module_logger(__name__) - if not order_attribute or not time_attribute or not id_attribute: - return stmt - # ---------------------------------------------------------------- # - ascending_order = order_attribute.asc() # type: ignore - descending_order = order_attribute.desc() # type: ignore - # time-style -> descending --------------------------------------- # - if order.lower() == "descending": - windowing_order = descending_order - elif order.lower() == "ascending": - windowing_order = ascending_order - else: - windowing_order = ascending_order - # ---------------------------------------------------------------- # - - if windowing.order: - if windowing.order.lower() == "descending": - windowing_order = descending_order - elif windowing.order.lower() == "ascending": - windowing_order = ascending_order - - if windowing_order == ascending_order: - if windowing.newest: - stmt = stmt.filter(time_attribute <= windowing.newest) - if windowing.oldest: - if windowing.next: - stmt = stmt.filter(time_attribute >= windowing.oldest) - else: - stmt = stmt.filter(time_attribute > windowing.oldest) - if windowing.next: - if order_attribute is id_attribute: # UUID7 case - stmt = stmt.filter(id_attribute > windowing.next) - elif windowing.oldest: # time-based order: use .oldest + .next - stmt = stmt.filter( - or_( - time_attribute > windowing.oldest, - and_( - time_attribute == windowing.oldest, - id_attribute > windowing.next, - ), - ) - ) - else: - if windowing.newest: - if windowing.next: - stmt = stmt.filter(time_attribute <= windowing.newest) - else: - stmt = stmt.filter(time_attribute < windowing.newest) - if windowing.oldest: - stmt = stmt.filter(time_attribute >= windowing.oldest) - if windowing.next: - if order_attribute is id_attribute: # UUID7 case - stmt = stmt.filter(id_attribute < windowing.next) - elif windowing.newest: # time-based order: use .newest + .next - stmt = stmt.filter( - or_( - time_attribute < windowing.newest, - and_( - time_attribute == windowing.newest, - id_attribute < windowing.next, - ), - ) +def suppress_exceptions( + default: Optional[Any] = None, +): + def decorator(func): + @wraps(func) + async def wrapper(*args, **kwargs): + try: + return await func(*args, **kwargs) + except Exception: # pylint: disable=broad-exception-caught + log.warn( + "Suppressing exception", + support_id=str(uuid4()), + method=func.__name__, ) - if order_attribute is id_attribute: - stmt = stmt.order_by(windowing_order) - else: - stmt = stmt.order_by(windowing_order, id_attribute) + print_exc() + + return default - if windowing.limit: - stmt = stmt.limit(windowing.limit) + return wrapper - return stmt + return decorator diff --git a/api/oss/src/dbs/postgres/testcases/dbes.py b/api/oss/src/dbs/postgres/testcases/dbes.py index 306ca31802..b269fa443d 100644 --- a/api/oss/src/dbs/postgres/testcases/dbes.py +++ b/api/oss/src/dbs/postgres/testcases/dbes.py @@ -18,11 +18,20 @@ class TestcaseBlobDBE(Base, ProjectScopeDBA, BlobDBA): "project_id", "id", ), + UniqueConstraint( + "project_id", + "slug", + ), UniqueConstraint( "project_id", "set_id", "id", ), + UniqueConstraint( + "project_id", + "set_id", + "slug", + ), ForeignKeyConstraint( ["project_id"], ["projects.id"], @@ -33,6 +42,11 @@ class TestcaseBlobDBE(Base, ProjectScopeDBA, BlobDBA): ["testset_artifacts.project_id", "testset_artifacts.id"], ondelete="CASCADE", ), + Index( + "ix_testcase_blobs_project_id_blob_slug", + "project_id", + "slug", + ), Index( "ix_testcase_blobs_project_id_set_id", "project_id", @@ -44,4 +58,10 @@ class TestcaseBlobDBE(Base, ProjectScopeDBA, BlobDBA): "set_id", "id", ), + Index( + "ix_testcase_blobs_project_id_set_id_slug", + "project_id", + "set_id", + "slug", + ), ) diff --git a/api/oss/src/dbs/postgres/tracing/dao.py b/api/oss/src/dbs/postgres/tracing/dao.py index 9c75bf9e8b..4e92826e55 100644 --- a/api/oss/src/dbs/postgres/tracing/dao.py +++ b/api/oss/src/dbs/postgres/tracing/dao.py @@ -1,40 +1,14 @@ -from typing import Any, Dict, Optional, List, cast as type_cast +from typing import Optional, List from uuid import UUID from traceback import format_exc -from datetime import datetime - -from sqlalchemy import cast, func, select, text, distinct -from sqlalchemy.types import Numeric, BigInteger -from sqlalchemy.sql import Select, and_, or_ -from sqlalchemy.exc import DBAPIError -from sqlalchemy import distinct, text -from sqlalchemy import Select, column + +from sqlalchemy import distinct, Column +from sqlalchemy import Select from sqlalchemy.dialects.postgresql import dialect from sqlalchemy.future import select -from sqlalchemy.sql.elements import ColumnElement, Label -from sqlalchemy.dialects.postgresql import BIT from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import suppress_exceptions - -from oss.src.core.shared.dtos import Windowing -from oss.src.core.shared.exceptions import EntityCreationConflict -from oss.src.core.tracing.interfaces import TracingDAOInterface -from oss.src.core.tracing.dtos import ( - OTelLink, - OTelFlatSpan, - TracingQuery, - Focus, - Bucket, - Filtering, - MetricSpec, - MetricsBucket, - Condition, - ListOperator, -) -from oss.src.dbs.postgres.shared.utils import apply_windowing -from oss.src.dbs.postgres.shared.exceptions import check_entity_creation_conflict from oss.src.dbs.postgres.shared.engine import engine from oss.src.dbs.postgres.tracing.dbes import SpanDBE from oss.src.dbs.postgres.tracing.mappings import ( @@ -42,36 +16,24 @@ map_span_dbe_to_span_dbe, map_span_dto_to_span_dbe, map_span_dbe_to_span_dto, - map_buckets, ) -from oss.src.dbs.postgres.tracing.utils import ( - DEBUG_ARGS, - TIMEOUT_STMT, - # - combine, - filter, - # - parse_windowing, - build_specs_values, - build_base_cte, - build_extract_cte, - build_type_flags, - build_statistics_stmt, - # - compute_range, - parse_pcts, - compute_iqrs, - compute_cqvs, - compute_pscs, - normalize_hist, - parse_bin_freq, - normalize_freq, - compute_uniq, + +from oss.src.core.tracing.interfaces import TracingDAOInterface +from oss.src.core.tracing.dtos import ( + OTelLink, + OTelLinks, + OTelFlatSpan, + OTelFlatSpans, + Query, + Focus, ) +from oss.src.dbs.postgres.tracing.utils import combine, filter log = get_module_logger(__name__) +DEBUG_ARGS = {"dialect": dialect(), "compile_kwargs": {"literal_binds": True}} + class TracingDAO(TracingDAOInterface): def __init__(self): @@ -79,62 +41,56 @@ def __init__(self): ### CRUD on spans - @suppress_exceptions(exclude=[EntityCreationConflict]) async def create_span( self, *, project_id: UUID, - user_id: UUID, - # span_dto: OTelFlatSpan, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: span_dbe = map_span_dto_to_span_dbe( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) - try: - async with engine.tracing_session() as session: + link_dto: Optional[OTelLink] = None + async with engine.tracing_session() as session: + try: session.add(span_dbe) - await session.commit() link_dto = map_span_dbe_to_link_dto( span_dbe=span_dbe, ) - return link_dto + except Exception: # pylint: disable=broad-except + log.warn(format_exc()) - except Exception as e: - check_entity_creation_conflict(e) + await session.rollback() - raise + return link_dto - @suppress_exceptions(default=[], exclude=[EntityCreationConflict]) async def create_spans( self, *, project_id: UUID, - user_id: UUID, - # - span_dtos: List[OTelFlatSpan], - ) -> List[OTelLink]: + span_dtos: OTelFlatSpans, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: span_dbes = [ map_span_dto_to_span_dbe( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) for span_dto in span_dtos ] - try: - async with engine.tracing_session() as session: + link_dtos: OTelLinks = [] + async with engine.tracing_session() as session: + try: session.add_all(span_dbes) - await session.commit() link_dtos = [ @@ -144,98 +100,78 @@ async def create_spans( for span_dbe in span_dbes ] - return link_dtos + except Exception: # pylint: disable=broad-except + log.warn(format_exc()) - except Exception as e: - check_entity_creation_conflict(e) + await session.rollback() - raise + return link_dtos - @suppress_exceptions() async def read_span( self, *, project_id: UUID, - # span_id: UUID, ) -> Optional[OTelFlatSpan]: + span_dbe: Optional[SpanDBE] = None async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.span_id == span_id, ) - stmt = stmt.limit(1) - - result = await session.execute(stmt) - - span_dbe = result.scalars().first() - - if not span_dbe: - return None + span_dbe = (await session.execute(query)).scalars().first() - span_dto = map_span_dbe_to_span_dto( - span_dbe=span_dbe, - ) + span_dto = map_span_dbe_to_span_dto( + span_dbe=span_dbe, + ) - return span_dto + return span_dto - @suppress_exceptions(default=[]) async def read_spans( self, *, project_id: UUID, - # span_ids: List[UUID], - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: + span_dbes: List[SpanDBE] = [] async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.span_id.in_(span_ids), ) - stmt = stmt.limit(len(span_ids)) - - result = await session.execute(stmt) + span_dbes = (await session.execute(query)).scalars().all() - span_dbes = result.scalars().all() - - span_dtos = [ - map_span_dbe_to_span_dto( - span_dbe=span_dbe, - ) - for span_dbe in span_dbes - ] + span_dtos = [ + map_span_dbe_to_span_dto( + span_dbe=span_dbe, + ) + for span_dbe in span_dbes + ] - return span_dtos + return span_dtos - @suppress_exceptions() async def update_span( self, *, project_id: UUID, - user_id: UUID, - # span_dto: OTelFlatSpan, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: new_span_dbe = map_span_dto_to_span_dbe( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.span_id == new_span_dbe.span_id, ) - stmt = stmt.limit(1) - - result = await session.execute(stmt) - - existing_span_dbe = result.scalars().first() + existing_span_dbe = (await session.execute(query)).scalars().first() if not existing_span_dbe: return None @@ -248,68 +184,46 @@ async def update_span( await session.commit() - link_dto = map_span_dbe_to_link_dto( - span_dbe=new_span_dbe, - ) + link_dto = map_span_dbe_to_link_dto( + span_dbe=new_span_dbe, + ) - return link_dto + return link_dto - @suppress_exceptions(default=[]) async def update_spans( self, *, project_id: UUID, - user_id: UUID, - # - span_dtos: List[OTelFlatSpan], - ) -> List[OTelLink]: + span_dtos: OTelFlatSpans, + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: new_span_dbes = [ map_span_dto_to_span_dbe( project_id=project_id, - user_id=user_id, - # span_dto=span_dto, + user_id=user_id, ) for span_dto in span_dtos ] - span_ids = [span_dbe.span_id for span_dbe in new_span_dbes] - + link_dtos: OTelLinks = [] async with engine.tracing_session() as session: - link_dtos: List[OTelLink] = [] - - stmt = select(SpanDBE).filter( - SpanDBE.project_id == project_id, - SpanDBE.span_id.in_(span_ids), - ) - - stmt = stmt.limit(len(span_ids)) - - result = await session.execute(stmt) - - existing_span_dbes = result.scalars().all() - - if not existing_span_dbes: - return link_dtos - - existing_span_dbes = { - span_dbe.span_id: span_dbe for span_dbe in existing_span_dbes - } - for new_span_dbe in new_span_dbes: - existing_span_dbe = existing_span_dbes.get(new_span_dbe.span_id) + query = select(SpanDBE).filter( + SpanDBE.project_id == project_id, + SpanDBE.span_id == new_span_dbe.span_id, + ) - if existing_span_dbe: - map_span_dbe_to_span_dbe( - existing_span_dbe=existing_span_dbe, - new_span_dbe=new_span_dbe, - user_id=user_id, - ) + existing_span_dbe = (await session.execute(query)).scalars().first() - del existing_span_dbes[new_span_dbe.span_id] + if not existing_span_dbe: + continue - else: - session.add(new_span_dbe) + map_span_dbe_to_span_dbe( + existing_span_dbe=existing_span_dbe, + new_span_dbe=new_span_dbe, + user_id=user_id, + ) link_dto = map_span_dbe_to_link_dto( span_dbe=new_span_dbe, @@ -317,33 +231,25 @@ async def update_spans( link_dtos.append(link_dto) - for remaining_span_dbe in existing_span_dbes.values(): - await session.delete(remaining_span_dbe) - await session.commit() - return link_dtos + return link_dtos - @suppress_exceptions() async def delete_span( self, *, project_id: UUID, - # user_id: UUID, - # span_id: UUID, + user_id: Optional[UUID] = None, ) -> Optional[OTelLink]: + link_dto: Optional[OTelLink] = None async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.span_id == span_id, ) - stmt = stmt.limit(1) - - result = await session.execute(stmt) - - span_dbe = result.scalars().first() + span_dbe = (await session.execute(query)).scalars().first() if not span_dbe: return None @@ -353,34 +259,28 @@ async def delete_span( ) await session.delete(span_dbe) - await session.commit() - return link_dto + return link_dto - @suppress_exceptions(default=[]) async def delete_spans( self, *, project_id: UUID, - # user_id: UUID, - # span_ids: List[UUID], - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: + link_dtos: OTelLinks = [] async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.span_id.in_(span_ids), ) - stmt = stmt.limit(len(span_ids)) - - result = await session.execute(stmt) - - span_dbes = result.scalars().all() + span_dbes = (await session.execute(query)).scalars().all() if not span_dbes: - return [] + return None link_dtos = [ map_span_dbe_to_link_dto( @@ -391,731 +291,227 @@ async def delete_spans( for span_dbe in span_dbes: await session.delete(span_dbe) - await session.commit() - return link_dtos + return link_dtos ### .R.D on traces - @suppress_exceptions(default=[]) async def read_trace( self, *, project_id: UUID, - # trace_id: UUID, - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: + span_dbes: List[SpanDBE] = [] async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.trace_id == trace_id, ) - stmt = stmt.order_by(SpanDBE.start_time.asc()) - - result = await session.execute(stmt) + span_dbes = (await session.execute(query)).scalars().all() - span_dbes = result.scalars().all() + if not span_dbes: + return None - if not span_dbes: - return [] - - span_dtos = [ - map_span_dbe_to_span_dto( - span_dbe=span_dbe, - ) - for span_dbe in span_dbes - ] + span_dtos = [ + map_span_dbe_to_span_dto( + span_dbe=span_dbe, + ) + for span_dbe in span_dbes + ] - return span_dtos + return span_dtos - @suppress_exceptions(default=[]) async def read_traces( self, *, project_id: UUID, - # trace_ids: List[UUID], - ) -> List[OTelFlatSpan]: + ) -> Optional[OTelFlatSpans]: + span_dbes: List[SpanDBE] = [] async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.trace_id.in_(trace_ids), ) - stmt = stmt.order_by(SpanDBE.start_time.asc()) - - result = await session.execute(stmt) + span_dbes = (await session.execute(query)).scalars().all() - span_dbes = result.scalars().all() + if not span_dbes: + return None - if not span_dbes: - return [] - - span_dtos = [ - map_span_dbe_to_span_dto( - span_dbe=span_dbe, - ) - for span_dbe in span_dbes - ] + span_dtos = [ + map_span_dbe_to_span_dto( + span_dbe=span_dbe, + ) + for span_dbe in span_dbes + ] - return span_dtos + return span_dtos - @suppress_exceptions(default=[]) async def delete_trace( self, *, project_id: UUID, - # user_id: UUID, - # trace_id: UUID, - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.trace_id == trace_id, ) - result = await session.execute(stmt) - - span_dbes = result.scalars().all() + span_dbes = (await session.execute(query)).scalars().all() if not span_dbes: - return [] - - link_dtos = [ - map_span_dbe_to_link_dto( - span_dbe=span_dbe, - ) - for span_dbe in span_dbes - ] + return None for span_dbe in span_dbes: await session.delete(span_dbe) await session.commit() - return link_dtos + link_dtos = [ + map_span_dbe_to_link_dto( + span_dbe=span_dbe, + ) + for span_dbe in span_dbes + ] + + return link_dtos - @suppress_exceptions(default=[]) async def delete_traces( self, *, project_id: UUID, - # user_id: UUID, - # trace_ids: List[UUID], - ) -> List[OTelLink]: + user_id: Optional[UUID] = None, + ) -> Optional[OTelLinks]: async with engine.tracing_session() as session: - stmt = select(SpanDBE).filter( + query = select(SpanDBE).filter( SpanDBE.project_id == project_id, SpanDBE.trace_id.in_(trace_ids), ) - result = await session.execute(stmt) - - span_dbes = result.scalars().all() + span_dbes = (await session.execute(query)).scalars().all() if not span_dbes: - return [] - - link_dtos = [ - map_span_dbe_to_link_dto( - span_dbe=span_dbe, - ) - for span_dbe in span_dbes - ] + return None for span_dbe in span_dbes: await session.delete(span_dbe) await session.commit() - return link_dtos + link_dtos = [ + map_span_dbe_to_link_dto( + span_dbe=span_dbe, + ) + for span_dbe in span_dbes + ] - ### QUERY + return link_dtos + + ### RPC - @suppress_exceptions(default=[]) async def query( self, *, project_id: UUID, - # - query: TracingQuery, # type: ignore - ) -> List[OTelFlatSpan]: - # DE-STRUCTURING - focus = query.formatting.focus if query.formatting else None - - oldest = query.windowing.oldest if query.windowing else None - newest = query.windowing.newest if query.windowing else None - next = query.windowing.next if query.windowing else None - limit = query.windowing.limit if query.windowing else None - rate = query.windowing.rate if query.windowing else None - - operator = query.filtering.operator if query.filtering else None - conditions = query.filtering.conditions if query.filtering else None - # -------------- - - # DEBUGGING - # log.trace(query.model_dump(mode="json", exclude_none=True)) - # --------- - - try: - async with engine.tracing_session() as session: - # TIMEOUT - await session.execute(TIMEOUT_STMT) - # ------- - - # BASE (SUB-)STMT - base: Select = select(SpanDBE) - # --------------- - - # GROUPING - if focus == Focus.TRACE: - base = select( - SpanDBE.trace_id, - SpanDBE.start_time, - ).distinct(SpanDBE.trace_id) - # -------- - - # SCOPING - base = base.filter(SpanDBE.project_id == project_id) - # ------- - - # FILTERING - if operator and conditions: - base = base.filter( - type_cast( - ColumnElement[bool], - combine( - operator=operator, - clauses=filter(conditions), - ), - ) - ) - # --------- - - # WINDOWING - if rate is not None: - percent = max(0, min(int(rate * 100.0), 100)) - - if percent == 0: - return [] - - if percent < 100: - base = base.where( - cast( - text("concat('x', left(cast(trace_id as varchar), 8))"), - BIT(32), - ).cast(BigInteger) - % 100 - < percent - ) - # --------- - - # GROUPING - if focus == Focus.TRACE: - # WINDOWING - if newest: - if next: - base = base.filter(SpanDBE.start_time <= newest) - else: - base = base.filter(SpanDBE.start_time < newest) - if oldest: - base = base.filter(SpanDBE.start_time >= oldest) - # --------- - - base = base.order_by(SpanDBE.trace_id, SpanDBE.start_time.desc()) - - inner = base.subquery("latest_per_trace") - - uniq = select(inner.c.trace_id) - - uniq = uniq.order_by(inner.c.start_time.desc()) - - if next and newest: - uniq = uniq.filter( - or_( - inner.c.start_time < newest, - and_( - inner.c.start_time == newest, - inner.c.trace_id < next, - ), - ) - ) - - if limit: - uniq = uniq.limit(limit) - - stmt = ( - select(SpanDBE) - .filter(SpanDBE.trace_id.in_(uniq)) - .order_by( - func.max(SpanDBE.start_time) - .over(partition_by=SpanDBE.trace_id) - .desc(), - SpanDBE.start_time.asc(), - ) - ) - else: - if query.windowing: - stmt = apply_windowing( - stmt=base, - DBE=SpanDBE, - attribute="start_time", - order="descending", - windowing=query.windowing, - ) - else: - stmt = base - # -------- - - # DEBUGGING - # log.trace(str(stmt.compile(**DEBUG_ARGS)).replace("\n", " ")) - # --------- - - # EXECUTION - dbes = (await session.execute(stmt)).scalars().all() - # --------- - - if not dbes: - return [] - - span_dtos = [map_span_dbe_to_span_dto(span_dbe=dbe) for dbe in dbes] - - return span_dtos - - except DBAPIError as e: - log.error(f"{type(e).__name__}: {e}") - log.error(format_exc()) - - if "QueryCanceledError" in str(e.orig): - raise Exception( # pylint: disable=broad-exception-raised - "TracingQuery execution was cancelled due to timeout. " - "Please try again with a smaller time interval." - ) from e + query: Query, + ) -> Optional[OTelFlatSpans]: + _query = query - raise e + # DE-STRUCTURING ARGS + formatting = _query.formatting + windowing = _query.windowing + filtering = _query.filtering - except Exception as e: - log.error(f"{type(e).__name__}: {e}") - log.error(format_exc()) - raise e + focus = formatting.focus if formatting else None - ### ANALYTICS + oldest = windowing.oldest if windowing else None + newest = windowing.newest if windowing else None + limit = windowing.limit if windowing else None - @suppress_exceptions(default=[]) - async def legacy_analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - ) -> List[Bucket]: - # DEBUGGING - # log.trace(query.model_dump(mode="json", exclude_none=True)) - # --------- - - ( - oldest, - newest, - stride, - interval, - timestamps, - ) = parse_windowing(query.windowing) + operator = filtering.operator if filtering else None + conditions = filtering.conditions if filtering else None + # ------------------- try: async with engine.tracing_session() as session: - await session.execute(TIMEOUT_STMT) - - # BASE QUERY HELPERS - _count = func.count().label("count") # pylint: disable=not-callable - _duration = None - _costs = None - _tokens = None - _timestamp = func.date_bin( - text(f"'{stride}'"), - SpanDBE.created_at, - oldest, - ).label("timestamp") - # ------------------ + # BASE (SUB-)QUERY + query: Select = select(SpanDBE) + # ---------------- # GROUPING - inc_or_cum = ( - "cumulative" - if query.formatting and query.formatting.focus == Focus.TRACE - else "incremental" - ) + if focus == Focus.TRACE: + distinct_ids = distinct(SpanDBE.trace_id).label("grouping_key") - _duration = func.sum( - cast( - SpanDBE.attributes["ag"]["metrics"]["duration"][ - "cumulative" - ].astext, - Numeric, - ) - ).label("duration") - - _costs = func.sum( - cast( - SpanDBE.attributes["ag"]["metrics"]["costs"][inc_or_cum][ - "total" - ].astext, - Numeric, - ) - ).label("costs") - - _tokens = func.sum( - cast( - SpanDBE.attributes["ag"]["metrics"]["tokens"][inc_or_cum][ - "total" - ].astext, - Numeric, - ) - ).label("tokens") + query = select(distinct_ids, SpanDBE.start_time) # -------- - # BASE QUERY - total_stmt = select( - _count, - _duration, - _costs, - _tokens, - _timestamp, - ).select_from(SpanDBE) - - errors_stmt = select( - _count, - _duration, - _costs, - _tokens, - _timestamp, - ).select_from(SpanDBE) - # ---------- + # SCOPING + query = query.filter(SpanDBE.project_id == project_id) + # ------- # WINDOWING - total_stmt = total_stmt.filter( - SpanDBE.created_at >= oldest, - SpanDBE.created_at < newest, - ) + if oldest: + query = query.filter(SpanDBE.start_time >= oldest) - errors_stmt = errors_stmt.filter( - SpanDBE.created_at >= oldest, - SpanDBE.created_at < newest, - ) + if newest: + query = query.filter(SpanDBE.start_time < newest) # --------- - # SCOPING - total_stmt = total_stmt.filter_by( - project_id=project_id, - ) - - errors_stmt = errors_stmt.filter_by( - project_id=project_id, - ) - # ------- - - # TOTAL vs ERRORS - # ---------------- + # DEBUGGING + log.trace(_query) + # --------- # FILTERING + if filtering: + query = query.filter(combine(operator, filter(conditions))) # --------- - if query.filtering: - operator = query.filtering.operator - conditions = query.filtering.conditions - - total_stmt = total_stmt.filter( - type_cast( - ColumnElement[bool], - combine( - operator=operator, - clauses=filter(conditions), - ), - ) - ) - errors_stmt = errors_stmt.filter( - type_cast( - ColumnElement[bool], - combine( - operator=operator, - clauses=filter( - conditions - + [ - Condition( - field="events", - operator=ListOperator.IN, - value=[{"name": "exception"}], - ) - ] - ), - ), - ) - ) - # --------- + # SORTING + query = query.order_by(SpanDBE.start_time.desc()) + # ------- + + # WINDOWING + if limit: + query = query.limit(limit) + # -------- # GROUPING - if query.formatting and query.formatting.focus == Focus.TRACE: - total_stmt = total_stmt.filter_by( - parent_id=None, - ) + if focus == Focus.TRACE: + subquery = select(query.subquery().c["grouping_key"]) - errors_stmt = errors_stmt.filter_by( - parent_id=None, - ) - # -------- + query = select(SpanDBE) - # SORTING - total_stmt = total_stmt.group_by("timestamp") + query = query.filter(SpanDBE.trace_id.in_(subquery)) - errors_stmt = errors_stmt.group_by("timestamp") - # ------- + # SORTING + query = query.order_by(SpanDBE.start_time.asc()) + # ------- + # -------- # DEBUGGING - # log.trace(str(total_stmt.compile(**DEBUG_ARGS)).replace("\n", " ")) - # log.trace(str(errors_stmt.compile(**DEBUG_ARGS)).replace("\n", " ")) + log.trace(str(query.compile(**DEBUG_ARGS)).replace("\n", " ")) # --------- # QUERY EXECUTION - total_buckets = list((await session.execute(total_stmt)).all()) - errors_buckets = list((await session.execute(errors_stmt)).all()) + dbes = (await session.execute(query)).scalars().all() # --------------- - buckets = map_buckets( - total_buckets=total_buckets, - errors_buckets=errors_buckets, - interval=interval, - timestamps=timestamps, - ) - - # DEBUGGING - # log.trace( - # [b.model_dump(mode="json", exclude_none=True) for b in buckets] - # ) - # --------- - - return buckets - - except DBAPIError as e: - log.error(f"{type(e).__name__}: {e}") - log.error(format_exc()) + if not dbes: + return [] - if "AnalyticsCanceledError" in str(e.orig): - raise Exception( # pylint: disable=broad-exception-raised - "Analytics execution was cancelled due to timeout. " - "Please try again with a smaller time interval." - ) from e + span_dtos = [map_span_dbe_to_span_dto(span_dbe=dbe) for dbe in dbes] - raise e + return span_dtos except Exception as e: log.error(f"{type(e).__name__}: {e}") log.error(format_exc()) raise e - - @suppress_exceptions(default=[]) - async def analytics( - self, - *, - project_id: UUID, - # - query: TracingQuery, - specs: List[MetricSpec], - ) -> List[MetricsBucket]: - # DEBUGGING - # log.trace(query.model_dump(mode="json", exclude_none=True)) - # log.trace([s.model_dump(mode="json", exclude_none=True) for s in specs]) - # --------- - - if not query.windowing: - query.windowing = Windowing() - - if not query.filtering: - query.filtering = Filtering() - - ( - oldest, - newest, - stride, - interval, - timestamps, - ) = parse_windowing( - windowing=query.windowing, - ) - - if query.windowing.rate is not None: - percent = max(0, min(int(query.windowing.rate * 100.0), 100)) - if percent == 0: - return [] - - metric_specs: Dict[int, MetricSpec] = { - idx: MetricSpec( - **s.model_dump(exclude={"path"}), - path=s.path.removeprefix("attributes."), # path prefix removal - ) - for idx, s in enumerate(specs) - } - - type_flags = build_type_flags( - metric_specs=list(metric_specs.values()), - ) - - if type_flags is None: - log.warning("[TRACING] [analytics] no type flags found") - return [] - - specs_values = build_specs_values( - metric_specs=list(metric_specs.values()), - ) - - if specs_values is None: - log.warning("[TRACING] [analytics] no specs values found") - return [] - - base_cte = build_base_cte( - project_id=project_id, - # - oldest=oldest, - newest=newest, - stride=stride, - rate=query.windowing.rate, - # - filtering=query.filtering, - ) - - if base_cte is None: - log.warning("[TRACING] [analytics] no base CTE found") - return [] - - extract_cte = build_extract_cte( - base_cte=base_cte, - specs_values=specs_values, - ) - - if extract_cte is None: - log.warning("[TRACING] [analytics] no extract CTE found") - return [] - - statistics_stmt = build_statistics_stmt( - extract_cte=extract_cte, - type_flags=type_flags, - ) - - if statistics_stmt is None: - log.warning("[TRACING] [analytics] no statistics CTE found") - return [] - - # DEBUGGING - # log.trace(str(statistics_stmt.compile(**DEBUG_ARGS)).replace("\n", " ")) - # --------- - - async with engine.tracing_session() as session: - await session.execute(TIMEOUT_STMT) - - rows = (await session.execute(select(statistics_stmt))).mappings().all() - - rows = [{**row} for row in rows] - - for r in rows: - kind: str = r["kind"] - value: Dict[str, Any] = dict() - - if kind == "cont_count": - value = r["value"] or {} - elif kind == "cont_basics": - value = r["value"] or {} - value = compute_range(value) - elif kind == "cont_pcts": - value = {} - value = parse_pcts(r["value"] or []) - value = compute_iqrs(value) - value = compute_cqvs(value) - value = compute_pscs(value) - elif kind == "cont_hist": - value = normalize_hist(r["value"] or []) - - elif kind == "disc_count": - value = r["value"] or {} - elif kind == "disc_basics": - value = r["value"] or {} - value = compute_range(value) - elif kind == "disc_pcts": - value = {} - value = parse_pcts(r["value"] or []) - value = compute_iqrs(value) - value = compute_cqvs(value) - value = compute_pscs(value) - elif kind == "disc_freq": - value = normalize_freq(r["value"] or []) - value = compute_uniq(value) - - elif kind == "cls_count": - value = r["value"] or {} - elif kind == "cls_freq": - value = normalize_freq(r["value"] or []) - value = compute_uniq(value) - - elif kind == "lbl_count": - value = r["value"] or {} - elif kind == "lbl_freq": - value = normalize_freq(r["value"] or []) - value = compute_uniq(value) - - elif kind == "bin_count": - value = r["value"] or {} - elif kind == "bin_freq": - value = r["value"] or {} - value = normalize_freq(parse_bin_freq(value)) - value = compute_uniq(value) - - elif kind == "str_count": - value = r["value"] or {} - - elif kind == "json_count": - value = r["value"] or {} - - r["value"] = value - - per_timestamp: Dict[datetime, Dict[str, Dict[str, Any]]] = dict() - - for r in rows: - _timestamp: datetime = r["timestamp"] - _idx: int = r["idx"] - - if _idx > len(metric_specs): - continue - - _spec = metric_specs.get(_idx) - - if not _spec: - continue - - _path = "attributes." + _spec.path # revert path prefix removal - _type = _spec.type - - if _timestamp not in per_timestamp: - per_timestamp[_timestamp] = dict() - - if _path not in per_timestamp[_timestamp]: - per_timestamp[_timestamp][_path] = dict(type=_type.value) - - per_timestamp[_timestamp][_path] = ( - per_timestamp[_timestamp][_path] | r["value"] - ) - - buckets: List[MetricsBucket] = [] - - for timestamp, metrics in per_timestamp.items(): - bucket = MetricsBucket( - timestamp=timestamp, - interval=interval, - metrics=metrics, - ) - buckets.append(bucket) - - # DEBUGGING - # log.trace([b.model_dump(mode="json", exclude_none=True) for b in buckets]) - # --------- - - return buckets diff --git a/api/oss/src/dbs/postgres/tracing/dbas.py b/api/oss/src/dbs/postgres/tracing/dbas.py index 06365bcbae..e5440aec3c 100644 --- a/api/oss/src/dbs/postgres/tracing/dbas.py +++ b/api/oss/src/dbs/postgres/tracing/dbas.py @@ -1,83 +1,70 @@ from sqlalchemy.dialects.postgresql import JSONB -from sqlalchemy import Column, UUID, TIMESTAMP, Enum as ENUM, VARCHAR +from sqlalchemy import Column, UUID, TIMESTAMP, Enum as ENUM, VARCHAR, func from oss.src.core.tracing.dtos import OTelStatusCode as StatusCode from oss.src.core.tracing.dtos import OTelSpanKind as SpanKind -from oss.src.core.tracing.dtos import SpanType -from oss.src.core.tracing.dtos import TraceType class SpanDBA: __abstract__ = True - trace_id = Column( - UUID, - nullable=False, - ) - span_id = Column( - UUID, - nullable=False, - ) - parent_id = Column( - UUID, - nullable=True, - ) + trace_id = Column(UUID, nullable=False) + span_id = Column(UUID, nullable=False) + parent_id = Column(UUID, nullable=True) - trace_type = Column( - ENUM(TraceType), - nullable=True, - ) - span_type = Column( - ENUM(SpanType), - nullable=True, - ) + span_kind = Column(ENUM(SpanKind), nullable=False) + span_name = Column(VARCHAR, nullable=False) - span_kind = Column( - ENUM(SpanKind), - nullable=False, - ) - span_name = Column( - VARCHAR, + start_time = Column(TIMESTAMP(timezone=True), nullable=False) + end_time = Column(TIMESTAMP(timezone=True), nullable=False) + + status_code = Column(ENUM(StatusCode), nullable=False) + status_message = Column(VARCHAR, nullable=True) + + attributes = Column(JSONB(none_as_null=True), nullable=True) + events = Column(JSONB(none_as_null=True), nullable=True) + links = Column(JSONB(none_as_null=True), nullable=True) + references = Column(JSONB(none_as_null=True), nullable=True) + + +# class FullTextSearchDBA: +# content = Column( +# VARCHAR, +# nullable=True, +# ) # for full text search + + +class ProjectScopeDBA: + project_id = Column( + UUID, nullable=False, - ) + ) # for project scope - start_time = Column( + +class LifecycleDBA: + created_at = Column( TIMESTAMP(timezone=True), + server_default=func.now(), nullable=False, ) - end_time = Column( + updated_at = Column( TIMESTAMP(timezone=True), - nullable=False, - ) - - status_code = Column( - ENUM(StatusCode), - nullable=False, - ) - status_message = Column( - VARCHAR, - nullable=True, - ) - - attributes = Column( - JSONB(none_as_null=True), + onupdate=func.now(), nullable=True, ) - - references = Column( - JSONB(none_as_null=True), + deleted_at = Column( + TIMESTAMP(timezone=True), nullable=True, ) - links = Column( - JSONB(none_as_null=True), - nullable=True, + created_by_id = Column( + UUID, + nullable=False, ) - hashes = Column( - JSONB(none_as_null=True), + updated_by_id = Column( + UUID, nullable=True, ) - - events = Column( - JSONB(none_as_null=True), + deleted_by_id = Column( + UUID, nullable=True, ) diff --git a/api/oss/src/dbs/postgres/tracing/dbes.py b/api/oss/src/dbs/postgres/tracing/dbes.py index 6bf291d5dc..2288767107 100644 --- a/api/oss/src/dbs/postgres/tracing/dbes.py +++ b/api/oss/src/dbs/postgres/tracing/dbes.py @@ -1,20 +1,23 @@ from sqlalchemy import ( PrimaryKeyConstraint, + # ForeignKeyConstraint, Index, - desc, - text, ) from oss.src.dbs.postgres.shared.base import Base -from oss.src.dbs.postgres.tracing.dbas import SpanDBA -from oss.src.dbs.postgres.shared.dbas import ProjectScopeDBA, LifecycleDBA +from oss.src.dbs.postgres.tracing.dbas import ( + SpanDBA, + ProjectScopeDBA, + LifecycleDBA, + # FullTextSearchDBA, +) class SpanDBE( Base, ProjectScopeDBA, - LifecycleDBA, SpanDBA, + LifecycleDBA, # FullTextSearchDBA, ): __tablename__ = "spans" @@ -25,10 +28,11 @@ class SpanDBE( "trace_id", "span_id", ), # for uniqueness - Index( - "ix_project_id", - "project_id", - ), # for filtering + # ForeignKeyConstraint( + # ["project_id"], + # ["projects.id"], + # ondelete="CASCADE", + # ), # for project scope Index( "ix_project_id_trace_id", "project_id", @@ -45,31 +49,18 @@ class SpanDBE( "start_time", ), # for sorting and scrolling Index( - "ix_spans_project_id_trace_type", - "project_id", - "trace_type", - ), # for filtering - Index( - "ix_spans_project_id_span_type", + "ix_project_id", "project_id", - "span_type", ), # for filtering - Index( - "ix_spans_project_id_trace_id_created_at", - "project_id", - "trace_id", - desc("created_at"), - ), # for sorting and scrolling within a trace Index( "ix_attributes_gin", "attributes", postgresql_using="gin", ), # for filtering Index( - "ix_references_gin", - "references", + "ix_events_gin", + "events", postgresql_using="gin", - postgresql_ops={"references": "jsonb_path_ops"}, ), # for filtering Index( "ix_links_gin", @@ -78,25 +69,9 @@ class SpanDBE( postgresql_ops={"links": "jsonb_path_ops"}, ), # for filtering Index( - "ix_hashes_gin", - "hashes", - postgresql_using="gin", - postgresql_ops={"hashes": "jsonb_path_ops"}, - ), # for filtering - Index( - "ix_events_gin", - "events", + "ix_references_gin", + "references", postgresql_using="gin", - postgresql_ops={"events": "jsonb_path_ops"}, + postgresql_ops={"references": "jsonb_path_ops"}, ), # for filtering - Index( - "ix_spans_fts_attributes_gin", - text("to_tsvector('simple', attributes)"), - postgresql_using="gin", - ), # for full-text search on attributes - Index( - "ix_spans_fts_events_gin", - text("to_tsvector('simple', events)"), - postgresql_using="gin", - ), # for full-text search on events ) diff --git a/api/oss/src/dbs/postgres/tracing/mappings.py b/api/oss/src/dbs/postgres/tracing/mappings.py index f8ce24ad3a..060729d0cb 100644 --- a/api/oss/src/dbs/postgres/tracing/mappings.py +++ b/api/oss/src/dbs/postgres/tracing/mappings.py @@ -1,25 +1,18 @@ -from typing import Optional, List, Tuple +from typing import Optional, List +from json import dumps from uuid import UUID -from datetime import datetime, timezone from oss.src.utils.logging import get_module_logger from oss.src.dbs.postgres.tracing.dbes import SpanDBE from oss.src.core.tracing.dtos import ( - OTelReference, OTelLink, - OTelHash, - OTelReference, - OTelFlatSpan, OTelSpan, OTelSpanKind, OTelStatusCode, - TraceType, - SpanType, - # - Bucket, - Analytics, + Link, ) -from oss.src.core.tracing.utils import marshall, unmarshall +from oss.src.core.tracing.utils import marshall, unmarshall, parse_ref_id_to_uuid +from oss.src.core.shared.dtos import Reference log = get_module_logger(__name__) @@ -41,6 +34,8 @@ def map_span_dbe_to_span_dbe( new_span_dbe: SpanDBE, user_id: Optional[UUID] = None, ) -> SpanDBE: + # existing_span_dbe.trace_id = new_span_dbe.trace_id + # existing_span_dbe.span_id = new_span_dbe.span_id existing_span_dbe.parent_id = new_span_dbe.parent_id existing_span_dbe.span_kind = new_span_dbe.span_kind existing_span_dbe.span_name = new_span_dbe.span_name @@ -52,8 +47,11 @@ def map_span_dbe_to_span_dbe( existing_span_dbe.events = new_span_dbe.events existing_span_dbe.links = new_span_dbe.links # LIFECYCLE - existing_span_dbe.updated_at = datetime.now(timezone.utc) existing_span_dbe.updated_by_id = user_id + # FULL TEXT SEARCH + # existing_span_dbe.content = dumps( + # map_span_dbe_to_span_dto(new_span_dbe).model_dump() + # ) return existing_span_dbe @@ -61,62 +59,24 @@ def map_span_dbe_to_span_dbe( def map_span_dbe_to_span_dto( span_dbe: SpanDBE, ) -> OTelSpan: - _references = ( - [unmarshall(ref) for ref in span_dbe.references] if span_dbe.references else [] - ) - _links = [unmarshall(link) for link in span_dbe.links] if span_dbe.links else [] - _hashes = [unmarshall(hash) for hash in span_dbe.hashes] if span_dbe.hashes else [] - - references: List[OTelReference] = [ - OTelReference( - id=_reference.get("id"), - slug=_reference.get("slug"), - attributes=_reference.get("attributes"), - ).model_dump(mode="json", exclude_none=True) - for _reference in _references - ] - - links: List[OTelLink] = [ - OTelLink( - trace_id=_link.get("trace_id"), - span_id=_link.get("span_id"), - attributes=_link.get("attributes"), - ).model_dump(mode="json", exclude_none=True) - for _link in _links - ] - - hashes: List[OTelHash] = [ - OTelHash( - id=_hash.get("id"), - attributes=_hash.get("attributes"), - ).model_dump(mode="json", exclude_none=True) - for _hash in _hashes - ] - span_dto = OTelSpan( trace_id=str(span_dbe.trace_id), span_id=str(span_dbe.span_id), parent_id=str(span_dbe.parent_id) if span_dbe.parent_id else None, - # - trace_type=TraceType(span_dbe.trace_type), - span_type=SpanType(span_dbe.span_type), - # span_kind=OTelSpanKind(span_dbe.span_kind), span_name=span_dbe.span_name, - # start_time=span_dbe.start_time, end_time=span_dbe.end_time, - # status_code=OTelStatusCode(span_dbe.status_code), status_message=span_dbe.status_message, - # attributes=span_dbe.attributes, - # - references=references if references else None, - links=links if links else None, - hashes=hashes if hashes else None, - # events=span_dbe.events, + # links=span_dbe.links.values() if span_dbe.links else None, + links=( + [Link(**unmarshall(link)) for link in span_dbe.links] + if span_dbe.links + else None + ), # LIFECYCLE created_at=span_dbe.created_at, updated_at=span_dbe.updated_at, @@ -130,120 +90,51 @@ def map_span_dbe_to_span_dto( def map_span_dto_to_span_dbe( - project_id: UUID, - span_dto: OTelFlatSpan, + project_id: str, + span_dto: OTelSpan, user_id: Optional[UUID] = None, ) -> SpanDBE: + references: Optional[List[Reference]] = span_dto.attributes.get("agenta", {}).get( + "references", None + ) + + if references: + for reference in references: + try: + if reference["id"]: + reference["id"] = parse_ref_id_to_uuid(reference["id"]) + except Exception as e: # pylint: disable=broad-exception-caught + log.warning(f"Failed to parse reference id {reference} to UUID: {e}") + span_dbe = SpanDBE( project_id=project_id, - # trace_id=UUID(span_dto.trace_id), span_id=UUID(span_dto.span_id), parent_id=UUID(span_dto.parent_id) if span_dto.parent_id else None, - # - trace_type=span_dto.trace_type, - span_type=span_dto.span_type, - # span_kind=span_dto.span_kind, span_name=span_dto.span_name, - # start_time=span_dto.start_time, end_time=span_dto.end_time, - # status_code=span_dto.status_code, status_message=span_dto.status_message, - # attributes=span_dto.attributes, - # - references=( - [ - marshall(ref.model_dump(mode="json", exclude_none=True)) - for ref in span_dto.references - ] - if span_dto.references + events=( + [event.model_dump() for event in span_dto.events] + if span_dto.events else None ), links=( - [ - marshall(link.model_dump(mode="json", exclude_none=True)) - for link in span_dto.links - ] + [marshall(link.model_dump()) for link in span_dto.links] if span_dto.links else None ), - hashes=( - [ - marshall(hash.model_dump(mode="json", exclude_none=True)) - for hash in span_dto.hashes - ] - if span_dto.hashes - else None - ), - # - events=( - [event.model_dump(mode="json") for event in span_dto.events] - if span_dto.events - else None + references=( + [marshall(reference) for reference in references] if references else None ), # LIFECYCLE - created_at=datetime.now(timezone.utc), created_by_id=user_id, + # FULL TEXT SEARCH + # content=dumps(span_dto.model_dump()), ) return span_dbe - - -def map_buckets( - total_buckets: list, - errors_buckets: list, - interval: int, - timestamps: Optional[List[datetime]] = None, -) -> List[Bucket]: - total_metrics = { - bucket.timestamp.isoformat(): Analytics( - count=bucket.count, - duration=bucket.duration, - costs=bucket.costs, - tokens=bucket.tokens, - ) - for bucket in total_buckets - } - - errors_metrics = { - bucket.timestamp.isoformat(): Analytics( - count=bucket.count, - duration=bucket.duration, - costs=bucket.costs, - tokens=bucket.tokens, - ) - for bucket in errors_buckets - } - - total_timestamps = timestamps - if not total_timestamps: - total_timestamps = list( - set(list(total_metrics.keys()) + list(errors_metrics.keys())) - ) - total_timestamps.sort() - - # _total_timestamps = list( - # set(list(total_metrics.keys()) + list(errors_metrics.keys())) - # ) - # _total_timestamps.sort() - - total_timestamps = [ - timestamp.isoformat() if isinstance(timestamp, datetime) else timestamp - for timestamp in total_timestamps - ] - - buckets = [ - Bucket( - timestamp=timestamp, - interval=interval, - total=total_metrics.get(timestamp, Analytics()), - errors=errors_metrics.get(timestamp, Analytics()), - ) - for timestamp in total_timestamps - ] - - return buckets diff --git a/api/oss/src/dbs/postgres/tracing/utils.py b/api/oss/src/dbs/postgres/tracing/utils.py index 2ffccd976d..20e7ab1fb3 100644 --- a/api/oss/src/dbs/postgres/tracing/utils.py +++ b/api/oss/src/dbs/postgres/tracing/utils.py @@ -1,20 +1,13 @@ -from typing import Any, Dict, Tuple, Optional, Union, List, cast as type_cast +from typing import Any, Optional, List, Dict, Union +from datetime import datetime +from hashlib import blake2b from json import dumps -from datetime import datetime, timedelta, time, timezone -from uuid import UUID -from math import ceil, floor - -from sqlalchemy import case, cast, func, literal, literal_column, select, text -from sqlalchemy import and_, or_, not_, Column, bindparam, Text -from sqlalchemy import values, column, true -from sqlalchemy import Integer, String, Float -from sqlalchemy.sql import func, Select, ClauseElement, ColumnElement -from sqlalchemy.types import Numeric, Boolean, Integer, String, BigInteger -from sqlalchemy.future import select -from sqlalchemy.sql.elements import ColumnElement -from sqlalchemy.sql.selectable import FromClause -from sqlalchemy.dialects.postgresql import dialect, ARRAY, TEXT, JSONB, BIT -from sqlalchemy.dialects.postgresql import aggregate_order_by + +from sqlalchemy import and_, or_, not_, cast, Column, text, bindparam, Text +from sqlalchemy import TIMESTAMP, Enum, Integer, String, Boolean, Float +from sqlalchemy.dialects.postgresql import JSONB +from sqlalchemy.sql import false, func, ClauseElement, ColumnElement + from oss.src.utils.logging import get_module_logger @@ -34,6 +27,7 @@ ExistenceOperator, ) from oss.src.core.tracing.dtos import ( + Link, FilteringException, Fields, Filtering, @@ -43,18 +37,11 @@ StringOperator, ListOperator, ExistenceOperator, - Windowing, - # - MetricType, - MetricSpec, ) +from oss.src.core.shared.dtos import Reference log = get_module_logger(__name__) -DEBUG_ARGS = {"dialect": dialect(), "compile_kwargs": {"literal_binds": True}} -TIMEOUT_STMT = text(f"SET LOCAL statement_timeout = '{15_000}'") # milliseconds - - # UTILS @@ -76,24 +63,6 @@ def _to_nested_value( return value -def _to_jsonb_path( - attribute: ColumnElement, - key: str, - leaf_as_text: bool = True, -) -> Tuple[ColumnElement, str]: - parts = key.split(".") - - if leaf_as_text: - for p in parts[:-1]: - attribute = attribute.op("->")(p) - attribute = attribute.op("->>")(parts[-1]) - return attribute, "" - else: - for p in parts[:-1]: - attribute = attribute.op("->")(p) - return attribute, parts[-1] - - # OPERATORS @@ -142,18 +111,17 @@ def _handle_numeric_operator( clauses = [] if key is not None: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) - clauses.append(container.op("?")(leaf)) + clauses.append(attribute.has_key(key)) - attribute, _ = _to_jsonb_path(attribute, key) + attribute = attribute[key].astext # defaults to string if isinstance(value, int): - attribute = cast(attribute, Float) + attribute = cast(attribute, Integer) elif isinstance(value, float): attribute = cast(attribute, Float) elif isinstance(value, list): if all(isinstance(v, int) for v in value): - attribute = cast(attribute, Float) + attribute = cast(attribute, Integer) elif all(isinstance(v, float) for v in value): attribute = cast(attribute, Float) elif all(isinstance(v, str) for v in value): @@ -195,10 +163,9 @@ def _handle_string_operator( options = TextOptions() if key is not None: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) - clauses.append(container.op("?")(leaf)) + clauses.append(attribute.has_key(key)) - attribute, _ = _to_jsonb_path(attribute, key) + attribute = attribute[key].astext attribute = cast(attribute, String) @@ -262,11 +229,11 @@ def _handle_list_operator( subclauses: List[ClauseElement] = [] if key is not None and not marshalled: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) + attribute = attribute[key] for v in value: - bound = bindparam(None, dumps([v]), type_=Text) # ensure array JSON + bound = bindparam(None, f"[{v}]", type_=Text) casted = cast(bound, JSONB) - subclauses.append(container[leaf].contains(casted)) + subclauses.append(attribute.contains(casted)) elif marshalled: for v in value: @@ -297,9 +264,9 @@ def _handle_list_operator( clauses.append(or_(*subclauses)) elif operator == ListOperator.NOT_IN: if options.all: - clauses.extend([or_(not_(sc), attribute.is_(None)) for sc in subclauses]) + clauses.extend([not_(sc) for sc in subclauses]) else: - clauses.append(or_(not_(or_(*subclauses)), attribute.is_(None))) + clauses.append(not_(or_(*subclauses))) return clauses @@ -314,11 +281,12 @@ def _handle_dict_operator( clauses: List[ClauseElement] = [] if not marshalled: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) + attribute = attribute[key] + if operator == DictOperator.HAS: - clauses.append(container[leaf] == value) + clauses.append(attribute == value) elif operator == DictOperator.HAS_NOT: - clauses.append(container[leaf] != value) + clauses.append(attribute != value) else: value = [{key: value}] @@ -342,15 +310,13 @@ def _handle_existence_operator( if operator == ExistenceOperator.EXISTS: if key: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) - clauses.append(container.op("?")(leaf)) + clauses.append(attribute.op("?")(key)) else: clauses.append(attribute.isnot(None)) elif operator == ExistenceOperator.NOT_EXISTS: if key: - container, leaf = _to_jsonb_path(attribute, key, leaf_as_text=False) - clauses.append(not_(container.op("?")(leaf))) + clauses.append(not_(attribute.op("?")(key))) else: clauses.append(attribute.is_(None)) @@ -472,6 +438,11 @@ def _handle_list_field( return clauses +# def _handle_events_field( +# condition: Condition, +# ) -> List[ClauseElement]: ... + + def _handle_enum_field( condition: Condition, ) -> List[ClauseElement]: @@ -656,42 +627,6 @@ def _handle_uuid_field( return clauses -def _handle_fts_field( - condition: Condition, -) -> List[ClauseElement]: - conditions = [] - - # ------------------------- # - # field = condition.field - # key = condition.key - value = condition.value - # options = condition.options - # operator = condition.operator - attribute: Column = getattr(SpanDBE, "attributes") - # ------------------------- # - - ts_vector = func.to_tsvector(text("'simple'"), attribute) - ts_query = func.websearch_to_tsquery(text("'simple'"), text(f"'{value}'")) - - conditions.append(ts_vector.op("@@")(ts_query)) - - # ------------------------- # - # field = condition.field - # key = condition.key - value = condition.value - # options = condition.options - # operator = condition.operator - attribute: Column = getattr(SpanDBE, "events") - # ------------------------- # - - ts_vector = func.to_tsvector(text("'simple'"), attribute) - ts_query = func.websearch_to_tsquery(text("'simple'"), text(f"'{value}'")) - - conditions.append(ts_vector.op("@@")(ts_query)) - - return [or_(*conditions)] - - # COMBINE / FILTER @@ -721,7 +656,7 @@ def combine( def filter( # pylint:disable=redefined-builtin - filtering: List[Union[Condition, Filtering]], + filtering: Filtering, ) -> List[ClauseElement]: clauses = [] @@ -737,12 +672,8 @@ def filter( # pylint:disable=redefined-builtin if field == Fields.TRACE_ID: clauses.extend(_handle_uuid_field(condition)) - elif field == Fields.TRACE_TYPE: - clauses.extend(_handle_enum_field(condition)) elif field == Fields.SPAN_ID: clauses.extend(_handle_uuid_field(condition)) - elif field == Fields.SPAN_TYPE: - clauses.extend(_handle_enum_field(condition)) elif field == Fields.PARENT_ID: clauses.extend(_handle_uuid_field(condition)) elif field == Fields.SPAN_KIND: @@ -763,8 +694,8 @@ def filter( # pylint:disable=redefined-builtin clauses.extend(_handle_list_field(condition)) elif field == Fields.REFERENCES: clauses.extend(_handle_list_field(condition)) - elif field == Fields.EVENTS: - clauses.extend(_handle_list_field(condition)) + # elif field == Fields.EVENTS: + # clauses.extend(_handle_events_field(condition)) elif field == Fields.CREATED_AT: clauses.extend(_handle_timestamp_field(condition)) elif field == Fields.UPDATED_AT: @@ -777,1284 +708,9 @@ def filter( # pylint:disable=redefined-builtin clauses.extend(_handle_uuid_field(condition)) elif field == Fields.DELETED_BY_ID: clauses.extend(_handle_uuid_field(condition)) - elif field == Fields.CONTENT: - clauses.extend(_handle_fts_field(condition)) else: - # raise FilteringException( - # f"Unsupported condition field: {field}", - # ) - log.warning(f"Unsupported condition field: {field}") - - return clauses - - -# ANALYTICS - -_DEFAULT_TIME_DELTA = timedelta(days=30) -_MAX_ALLOWED_BUCKETS = 1024 -_SUGGESTED_BUCKETS_LIST = [ - (1 * 1, "1 minute"), - (1 * 5, "5 minutes"), - (1 * 15, "15 minutes"), - (1 * 30, "30 minutes"), - (1 * 60 * 1, "1 hour"), - (1 * 60 * 3, "3 hours"), - (1 * 60 * 6, "6 hours"), - (1 * 60 * 12, "12 hours"), - (1 * 60 * 24 * 1, "1 day"), - (1 * 60 * 24 * 3, "3 days"), - (1 * 60 * 24 * 7, "7 days"), - (1 * 60 * 24 * 14, "14 days"), - (1 * 60 * 24 * 30, "30 days"), -] - - -def _pluralize_minutes(m: int) -> str: - return f"{m} minute{'s' if m != 1 else ''}" - - -def _get_stride( - oldest: datetime, - newest: datetime, - interval: Optional[int] = None, -) -> str: - # total range in minutes (never negative) - range_minutes_float = max(0.0, (newest - oldest).total_seconds() / 60.0) - - # If no interval is provided, make the stride the whole range -> single bucket - if interval is None: - minutes = max(1, int(ceil(range_minutes_float))) - return _pluralize_minutes(minutes) - - # Interval given: enforce bucket limits - desired_interval = max(1, int(interval)) - # number of buckets with requested interval - desired_buckets = floor(range_minutes_float / desired_interval) - - if desired_buckets <= _MAX_ALLOWED_BUCKETS: - return _pluralize_minutes(desired_interval) - - # Too many buckets -> pick the first suggested interval that satisfies the cap - for suggested_minutes, suggested_text in _SUGGESTED_BUCKETS_LIST: - suggested_minutes = max(1, int(suggested_minutes)) - suggested_buckets = floor(range_minutes_float / suggested_minutes) - if suggested_buckets <= _MAX_ALLOWED_BUCKETS: - return suggested_text - - # If nothing fits, use the last (largest) suggestion - return _SUGGESTED_BUCKETS_LIST[-1][1] - - -def _get_interval( - stride: str, -) -> int: - qty_text, unit = stride.split() - qty = int(qty_text) - return { - "minute": qty, - "minutes": qty, - "hour": qty * 60, - "hours": qty * 60, - "day": qty * 1440, - "days": qty * 1440, - "week": qty * 10080, - "weeks": qty * 10080, - }[unit] - - -def _get_timestamps( - oldest: datetime, - newest: datetime, - interval: int, -) -> List[datetime]: - current = oldest - buckets = [] - while current < newest: - buckets.append(current) - current += timedelta(minutes=interval) - return buckets - - -def parse_windowing( - windowing: Optional[Windowing] = None, -) -> tuple: - if not windowing: - windowing = Windowing() - - now = datetime.now(timezone.utc) - start_of_next_day = datetime.combine( - now + timedelta(days=1), time.min, tzinfo=timezone.utc - ) - - if windowing.newest and windowing.newest.tzinfo is None: - windowing.newest = windowing.newest.replace(tzinfo=timezone.utc) - - if windowing.oldest and windowing.oldest.tzinfo is None: - windowing.oldest = windowing.oldest.replace(tzinfo=timezone.utc) - - newest = windowing.newest if windowing and windowing.newest else start_of_next_day - - oldest = ( - windowing.oldest - if windowing and windowing.oldest and windowing.oldest < newest - else newest - _DEFAULT_TIME_DELTA - ) - - stride = _get_stride(oldest, newest, windowing.interval) - interval = _get_interval(stride) - timestamps = _get_timestamps(oldest, newest, interval) - - return oldest, newest, stride, interval, timestamps - - -PERCENTILE_LEVELS = { - k: v / 100 - for k, v in { - "p00.05": 0.05, - "p00.1": 0.1, - "p00.5": 0.5, - "p01": 1, - "p02.5": 2.5, - "p05": 5, - "p10": 10, - "p12.5": 12.5, - "p20": 20, - "p25": 25, - "p30": 30, - "p37.5": 37.5, - "p40": 40, - "p50": 50, - "p60": 60, - "p62.5": 62.5, - "p70": 70, - "p75": 75, - "p80": 80, - "p87.5": 87.5, - "p90": 90, - "p95": 95, - "p97.5": 97.5, - "p99": 99, - "p99.5": 99.5, - "p99.9": 99.9, - "p99.95": 99.95, - }.items() -} -PERCENTILES_KEYS: List[str] = list(PERCENTILE_LEVELS.keys()) -PERCENTILES_VALUES: List[float] = list(PERCENTILE_LEVELS.values()) -IQR_ITEMS: List[Tuple[str, Tuple[str, str]]] = [ - ("iqr25", ("p37.5", "p62.5")), - ("iqr50", ("p25", "p75")), - ("iqr75", ("p12.5", "p87.5")), - ("iqr80", ("p10", "p90")), - ("iqr90", ("p05", "p95")), - ("iqr95", ("p02.5", "p97.5")), - ("iqr99", ("p00.5", "p99.5")), - ("iqr99.9", ("p00.05", "p99.95")), -] -CQV_ITEMS: List[Tuple[str, Tuple[str, str]]] = [ - ("cqv25", ("p37.5", "p62.5")), - ("cqv50", ("p25", "p75")), - ("cqv75", ("p12.5", "p87.5")), - ("cqv80", ("p10", "p90")), - ("cqv90", ("p05", "p95")), - ("cqv99", ("p00.5", "p99.5")), - ("cqv95", ("p02.5", "p97.5")), - ("cqv99.9", ("p00.05", "p99.95")), -] -PSC_ITEMS: List[Tuple[str, Tuple[str, str]]] = [ - ("psc25", ("p37.5", "p62.5")), - ("psc50", ("p25", "p75")), - ("psc75", ("p12.5", "p87.5")), - ("psc80", ("p10", "p90")), - ("psc90", ("p05", "p95")), - ("psc99", ("p00.5", "p99.5")), - ("psc95", ("p02.5", "p97.5")), - ("psc99.9", ("p00.05", "p99.95")), -] -TOP_K = 3 - - -def build_type_flags( - *, - metric_specs: List[MetricSpec], -) -> Optional[Dict[str, bool]]: - present = {s.type for s in metric_specs} - - return { - "need_numeric_continuous": (MetricType.NUMERIC_CONTINUOUS in present), - "need_numeric_discrete": (MetricType.NUMERIC_DISCRETE in present), - "need_categorical_single": (MetricType.CATEGORICAL_SINGLE in present), - "need_categorical_multiple": (MetricType.CATEGORICAL_MULTIPLE in present), - "need_binary": (MetricType.BINARY in present), - "need_string": (MetricType.STRING in present), - "need_json": (MetricType.JSON in present), - } - - -def build_specs_values( - *, - metric_specs: List[MetricSpec], -) -> Optional[FromClause]: - if not len(metric_specs): - return None - - data = [ - ( - idx, - s.path.split("."), # -> text[] - s.type.value, - s.bins, - s.vmin, - s.vmax, - (s.edge if s.edge is not None else True), - ) - for idx, s in enumerate(metric_specs) - ] - - vals = values( - column("idx", Integer), - column("path", ARRAY(TEXT())), - column("type", String), - column("bins", Integer), - column("vmin", Numeric), - column("vmax", Numeric), - column("edge", Boolean), - name="specs_values", - ).data(data) - - return vals.alias("specs_values") - - -def build_base_cte( - *, - project_id: UUID, - oldest: datetime, - newest: datetime, - stride: str, - rate: Optional[float] = None, - filtering: Optional[Filtering] = None, -) -> Optional[FromClause]: - timestamp = func.date_bin( - text(f"'{stride}'"), - SpanDBE.created_at, - oldest, - ).label("timestamp") - - base_stmt: Select = ( - select( - timestamp, - SpanDBE.project_id, - SpanDBE.trace_id, - SpanDBE.span_id, - SpanDBE.parent_id, - SpanDBE.created_at, - SpanDBE.attributes.label("attributes"), - ) - .select_from(SpanDBE) - .where( - SpanDBE.project_id == project_id, - SpanDBE.created_at >= oldest, - SpanDBE.created_at < newest, - ) - .where(SpanDBE.parent_id.is_(None)) - ) - - # External filters - if filtering is not None: - base_stmt = base_stmt.filter( - type_cast( - ColumnElement[bool], - combine( - operator=filtering.operator, - clauses=filter(filtering.conditions), - ), - ) - ) - - if rate is not None: - percent = max(0, min(int(rate * 100.0), 100)) - - if percent == 0: - return None - - if percent < 100: - base_stmt = base_stmt.where( - cast( - text("concat('x', left(cast(trace_id as varchar), 8))"), BIT(32) - ).cast(BigInteger) - % 100 - < percent - ) - - return base_stmt.cte("base_cte") - - -def build_extract_cte( - *, - base_cte: FromClause, - specs_values: FromClause, -) -> Optional[FromClause]: - extract_stmt = ( - select( - base_cte.c.timestamp, - specs_values.c.idx, - specs_values.c.type, - specs_values.c.bins, - specs_values.c.vmin, - specs_values.c.vmax, - specs_values.c.edge, - base_cte.c.attributes.op("#>")(specs_values.c.path).label("jv"), - ) - .select_from(base_cte) - .join(specs_values, true()) - ) - - return extract_stmt.cte("extract_cte") - - -def build_statistics_stmt( - extract_cte: FromClause, - type_flags: Dict[str, bool], -) -> Optional[FromClause]: - blocks: List[Select] = [] - - # Use independent IFs so multiple families can be included together - if type_flags.get("need_numeric_continuous"): - blocks += build_numeric_continuous_blocks(extract_cte=extract_cte) - - if type_flags.get("need_numeric_discrete"): - blocks += build_numeric_discrete_blocks(extract_cte=extract_cte) - - if type_flags.get("need_categorical_single"): - blocks += build_categorical_single_blocks(extract_cte=extract_cte) - - if type_flags.get("need_categorical_multiple"): - blocks += build_categorical_multiple_blocks(extract_cte=extract_cte) - - if type_flags.get("need_binary"): - blocks += build_binary_blocks(extract_cte=extract_cte) - - if type_flags.get("need_string"): - blocks += build_string_blocks(extract_cte=extract_cte) - - if type_flags.get("need_json"): - blocks += build_json_blocks(extract_cte=extract_cte) - - if not blocks: - return None - - # If only one block family, skip union_all for clarity/perf - if len(blocks) == 1: - return blocks[0].cte("statistics_stmt") - - return blocks[0].union_all(*blocks[1:]).cte("statistics_stmt") - - -def build_numeric_continuous_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # ------------------------------------------------- - # 1. Only valid numeric/continuous rows - # ------------------------------------------------- - cont_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - extract_cte.c.bins.label("bins_opt"), - extract_cte.c.vmin.label("vmin_opt"), - extract_cte.c.vmax.label("vmax_opt"), - extract_cte.c.edge.label("edge_opt"), - cast(extract_cte.c.jv.op("#>>")(text("'{}'")), Numeric).label("value"), - ).where( - extract_cte.c.type == literal(MetricType.NUMERIC_CONTINUOUS.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("number"), - ) - ).cte("cont_raw") - - # ------------------------------------------------- - # 2. Per-group stats - # ------------------------------------------------- - cont_minmax = ( - select( - cont_raw.c.timestamp, - cont_raw.c.idx, - func.count(cont_raw.c.value).label("n"), - func.min(cont_raw.c.value).label("vmin"), - func.max(cont_raw.c.value).label("vmax"), - func.max(cont_raw.c.bins_opt).label("bins_opt"), - func.max(cont_raw.c.vmin_opt).label("vmin_opt"), - func.max(cont_raw.c.vmax_opt).label("vmax_opt"), - func.bool_or(cont_raw.c.edge_opt).label("edge_opt"), - ).group_by(cont_raw.c.timestamp, cont_raw.c.idx) - ).cte("cont_minmax") - - # ------------------------------------------------- - # 3. Count metric - # ------------------------------------------------- - cont_count = ( - select( - cont_raw.c.timestamp, - cont_raw.c.idx, - literal("cont_count").label("kind"), - func.jsonb_build_object("count", func.count(cont_raw.c.value)).label( - "value" - ), - ) - .select_from( - cont_raw.join( - cont_minmax, - (cont_raw.c.timestamp == cont_minmax.c.timestamp) - & (cont_raw.c.idx == cont_minmax.c.idx), - ) - ) - .where(cont_minmax.c.n > 0) - .group_by(cont_raw.c.timestamp, cont_raw.c.idx) - ) - results.append(cont_count) - - # ------------------------------------------------- - # 4. Basic stats - # ------------------------------------------------- - cont_basics = ( - select( - cont_raw.c.timestamp, - cont_raw.c.idx, - literal("cont_basics").label("kind"), - func.jsonb_build_object( - "sum", - func.sum(cont_raw.c.value), - "mean", - func.avg(cont_raw.c.value), - "min", - func.min(cont_raw.c.value), - "max", - func.max(cont_raw.c.value), - ).label("value"), - ) - .select_from( - cont_raw.join( - cont_minmax, - (cont_raw.c.timestamp == cont_minmax.c.timestamp) - & (cont_raw.c.idx == cont_minmax.c.idx), - ) - ) - .where(cont_minmax.c.n > 0) - .group_by(cont_raw.c.timestamp, cont_raw.c.idx) - ) - results.append(cont_basics) - - # ------------------------------------------------- - # 5. Percentiles - # ------------------------------------------------- - cont_pcts = ( - select( - cont_raw.c.timestamp, - cont_raw.c.idx, - literal("cont_pcts").label("kind"), - func.to_jsonb( - func.percentile_cont( - literal(PERCENTILES_VALUES, ARRAY(Numeric())) - ).within_group(cont_raw.c.value) - ).label("value"), - ) - .select_from( - cont_raw.join( - cont_minmax, - (cont_raw.c.timestamp == cont_minmax.c.timestamp) - & (cont_raw.c.idx == cont_minmax.c.idx), - ) - ) - .where(cont_minmax.c.n > 0) - .group_by(cont_raw.c.timestamp, cont_raw.c.idx) - ) - results.append(cont_pcts) - - # ------------------------------------------------- - # 6. Chosen min/max/bins - # ------------------------------------------------- - chosen_min = case( - (cont_minmax.c.vmin_opt.isnot(None), cast(cont_minmax.c.vmin_opt, Numeric)), - else_=cont_minmax.c.vmin, - ) - chosen_max = case( - (cont_minmax.c.vmax_opt.isnot(None), cast(cont_minmax.c.vmax_opt, Numeric)), - else_=cont_minmax.c.vmax, - ) - chosen_bins = case( - (cont_minmax.c.bins_opt.isnot(None), cast(cont_minmax.c.bins_opt, Integer)), - else_=cast(func.ceil(func.sqrt(cast(cont_minmax.c.n, Numeric))), Integer), - ) - - cont_bins = ( - select( - cont_minmax.c.timestamp, - cont_minmax.c.idx, - case( - ( - (cont_minmax.c.n <= 1) | (chosen_min == chosen_max), - literal(1, type_=Integer), - ), - else_=chosen_bins, - ).label("bins"), - chosen_min.label("vmin"), - chosen_max.label("vmax"), - cont_minmax.c.n.label("n"), - cont_minmax.c.edge_opt.label("edge"), - ).where(cont_minmax.c.n > 0) - ).cte("cont_bins") - - # ------------------------------------------------- - # 7. Bin series & intervals (precompute is_last_bin) - # ------------------------------------------------- - cont_bin_series = ( - func.generate_series(1, cont_bins.c.bins) - .table_valued("bin") - .render_derived(name="cont_bin_series") - ) - - is_edge_aligned = cont_bins.c.edge.is_(None) | cont_bins.c.edge.is_(True) - - bin_width = case( - (is_edge_aligned, (cont_bins.c.vmax - cont_bins.c.vmin) / cont_bins.c.bins), - else_=(cont_bins.c.vmax - cont_bins.c.vmin) / (cont_bins.c.bins - 1), - ) - - bin_intervals = ( - select( - cont_bins.c.timestamp, - cont_bins.c.idx, - cont_bin_series.c.bin, - (cont_bin_series.c.bin == cont_bins.c.bins).label("is_last_bin"), - case( - (cont_bin_series.c.bin == literal(1, Integer), cont_bins.c.vmin), - else_=case( - ( - is_edge_aligned, - cont_bins.c.vmin + (cont_bin_series.c.bin - 1) * bin_width, - ), - else_=(cont_bins.c.vmin + (cont_bin_series.c.bin - 1) * bin_width) - - (bin_width / 2), - ), - ).label("interval_start"), - case( - (cont_bin_series.c.bin == cont_bins.c.bins, cont_bins.c.vmax), - else_=case( - ( - is_edge_aligned, - cont_bins.c.vmin + cont_bin_series.c.bin * bin_width, - ), - else_=(cont_bins.c.vmin + (cont_bin_series.c.bin - 1) * bin_width) - + (bin_width / 2), - ), - ).label("interval_end"), - ).select_from(cont_bins.join(cont_bin_series, literal(True))) - ).cte("bin_intervals") - - # ------------------------------------------------- - # 8. Bin counts (use is_last_bin for <= on last bin) - # ------------------------------------------------- - cont_bin_counts = ( - select( - cont_raw.c.timestamp, - cont_raw.c.idx, - bin_intervals.c.bin, - func.count().label("count"), - ) - .select_from( - cont_raw.join( - bin_intervals, - (cont_raw.c.timestamp == bin_intervals.c.timestamp) - & (cont_raw.c.idx == bin_intervals.c.idx) - & (cont_raw.c.value >= bin_intervals.c.interval_start) - & case( - ( - bin_intervals.c.is_last_bin, - cont_raw.c.value <= bin_intervals.c.interval_end, - ), - else_=(cont_raw.c.value < bin_intervals.c.interval_end), - ), - ) - ) - .group_by(cont_raw.c.timestamp, cont_raw.c.idx, bin_intervals.c.bin) - ).cte("cont_bin_counts") - - # ------------------------------------------------- - # 9. Full histogram (includes empty bins) - # ------------------------------------------------- - full_hist = ( - select( - bin_intervals.c.timestamp, - bin_intervals.c.idx, - literal("cont_hist").label("kind"), - func.coalesce( - func.jsonb_agg( - aggregate_order_by( - func.jsonb_build_object( - "bin", - bin_intervals.c.bin, - "count", - func.coalesce(cont_bin_counts.c.count, literal(0)), - "interval", - func.jsonb_build_array( - bin_intervals.c.interval_start, - bin_intervals.c.interval_end, - ), - ), - bin_intervals.c.bin.asc(), - ) - ), - func.jsonb_build_array(), - ).label("value"), - ) - .select_from( - bin_intervals.outerjoin( - cont_bin_counts, - (bin_intervals.c.timestamp == cont_bin_counts.c.timestamp) - & (bin_intervals.c.idx == cont_bin_counts.c.idx) - & (bin_intervals.c.bin == cont_bin_counts.c.bin), - ) - ) - .group_by(bin_intervals.c.timestamp, bin_intervals.c.idx) - ) - results.append(full_hist) - - return results - - -def build_numeric_discrete_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # Only valid numeric/discrete rows - disc_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - cast(extract_cte.c.jv.op("#>>")(text("'{}'")), Numeric).label("value"), - ).where( - extract_cte.c.type == literal(MetricType.NUMERIC_DISCRETE.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("number"), - ) - ).cte("disc_raw") - - disc_counts = ( - select( - disc_raw.c.timestamp, - disc_raw.c.idx, - func.count(disc_raw.c.value).label("n"), - ).group_by(disc_raw.c.timestamp, disc_raw.c.idx) - ).cte("disc_counts") - - # Count (emit only when n>0) - disc_count = ( - select( - disc_raw.c.timestamp, - disc_raw.c.idx, - literal("disc_count").label("kind"), - func.jsonb_build_object("count", func.count(disc_raw.c.value)).label( - "value" - ), - ) - .select_from( - disc_raw.join( - disc_counts, - (disc_raw.c.timestamp == disc_counts.c.timestamp) - & (disc_raw.c.idx == disc_counts.c.idx), - ) - ) - .where(disc_counts.c.n > 0) - .group_by(disc_raw.c.timestamp, disc_raw.c.idx) - ) - results.append(disc_count) - - # Basics (emit only when n>0) - disc_basics = ( - select( - disc_raw.c.timestamp, - disc_raw.c.idx, - literal("disc_basics").label("kind"), - func.jsonb_build_object( - "sum", - func.sum(disc_raw.c.value), - "mean", - func.avg(disc_raw.c.value), - "min", - func.min(disc_raw.c.value), - "max", - func.max(disc_raw.c.value), - ).label("value"), - ) - .select_from( - disc_raw.join( - disc_counts, - (disc_raw.c.timestamp == disc_counts.c.timestamp) - & (disc_raw.c.idx == disc_counts.c.idx), - ) - ) - .where(disc_counts.c.n > 0) - .group_by(disc_raw.c.timestamp, disc_raw.c.idx) - ) - results.append(disc_basics) - - # Percentiles (emit only when n>0) - disc_pcts = ( - select( - disc_raw.c.timestamp, - disc_raw.c.idx, - literal("disc_pcts").label("kind"), - func.to_jsonb( - func.percentile_cont( - literal(PERCENTILES_VALUES, ARRAY(Numeric())) - ).within_group(disc_raw.c.value) - ).label("value"), - ) - .select_from( - disc_raw.join( - disc_counts, - (disc_raw.c.timestamp == disc_counts.c.timestamp) - & (disc_raw.c.idx == disc_counts.c.idx), - ) - ) - .where(disc_counts.c.n > 0) - .group_by(disc_raw.c.timestamp, disc_raw.c.idx) - ) - results.append(disc_pcts) - - # Exact-value frequency (naturally empty when no rows) - disc_rows = ( - select( - disc_raw.c.timestamp, - disc_raw.c.idx, - disc_raw.c.value.label("value"), - func.count().label("count"), - ).group_by(disc_raw.c.timestamp, disc_raw.c.idx, disc_raw.c.value) - ).cte("disc_rows") - - disc_freq = select( - disc_rows.c.timestamp, - disc_rows.c.idx, - literal("disc_freq").label("kind"), - func.coalesce( - func.jsonb_agg( - aggregate_order_by( - func.jsonb_build_object( - "value", disc_rows.c.value, "count", disc_rows.c.count - ), - disc_rows.c.count.desc(), - disc_rows.c.value.asc(), + raise FilteringException( + f"Unsupported condition field: {field}", ) - ), - func.jsonb_build_array(), - ).label("value"), - ).group_by(disc_rows.c.timestamp, disc_rows.c.idx) - results.append(disc_freq) - - return results - - -def build_categorical_single_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # Only valid string rows for categorical/single - cls_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - cast(extract_cte.c.jv.op("#>>")(text("'{}'")), String).label("value"), - ).where( - extract_cte.c.type == literal(MetricType.CATEGORICAL_SINGLE.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("string"), - ) - ).cte("cls_raw") - - # Per-group counts for gating - cls_counts = ( - select( - cls_raw.c.timestamp, - cls_raw.c.idx, - func.count().label("n"), - ).group_by(cls_raw.c.timestamp, cls_raw.c.idx) - ).cte("cls_counts") - - # Total count (emit only when n>0) - cls_count = ( - select( - cls_raw.c.timestamp, - cls_raw.c.idx, - literal("cls_count").label("kind"), - func.jsonb_build_object("count", func.count()).label("value"), - ) - .select_from( - cls_raw.join( - cls_counts, - (cls_raw.c.timestamp == cls_counts.c.timestamp) - & (cls_raw.c.idx == cls_counts.c.idx), - ) - ) - .where(cls_counts.c.n > 0) - .group_by(cls_raw.c.timestamp, cls_raw.c.idx) - ) - results.append(cls_count) - - # Frequency table (only groups with rows appear) - cls_rows = ( - select( - cls_raw.c.timestamp, - cls_raw.c.idx, - cls_raw.c.value.label("value"), - func.count().label("count"), - ).group_by(cls_raw.c.timestamp, cls_raw.c.idx, cls_raw.c.value) - ).cte("cls_rows") - - cls_freq = select( - cls_rows.c.timestamp, - cls_rows.c.idx, - literal("cls_freq").label("kind"), - func.coalesce( - func.jsonb_agg( - aggregate_order_by( - func.jsonb_build_object( - "value", - cls_rows.c.value, - "count", - cls_rows.c.count, - ), - cls_rows.c.count.desc(), - cls_rows.c.value.asc(), - ) - ), - func.jsonb_build_array(), - ).label("value"), - ).group_by(cls_rows.c.timestamp, cls_rows.c.idx) - results.append(cls_freq) - - return results - - -def build_categorical_multiple_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # Unnest array -> "value" (strings only) - elem = func.jsonb_array_elements(extract_cte.c.jv).table_valued("value") - - lbl_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - elem.c.value.op("#>>")(text("'{}'")).label("value"), - ) - .select_from(extract_cte.join(elem, literal(True))) - .where( - extract_cte.c.type == literal(MetricType.CATEGORICAL_MULTIPLE.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("array"), - func.jsonb_typeof(elem.c.value) == literal("string"), - ) - ).cte("lbl_raw") - - # Per-group counts for gating - lbl_counts = ( - select( - lbl_raw.c.timestamp, - lbl_raw.c.idx, - func.count().label("n"), - ).group_by(lbl_raw.c.timestamp, lbl_raw.c.idx) - ).cte("lbl_counts") - - # Total count (emit only when n>0) - lbl_count = ( - select( - lbl_raw.c.timestamp, - lbl_raw.c.idx, - literal("lbl_count").label("kind"), - func.jsonb_build_object("count", func.count()).label("value"), - ) - .select_from( - lbl_raw.join( - lbl_counts, - (lbl_raw.c.timestamp == lbl_counts.c.timestamp) - & (lbl_raw.c.idx == lbl_counts.c.idx), - ) - ) - .where(lbl_counts.c.n > 0) - .group_by(lbl_raw.c.timestamp, lbl_raw.c.idx) - ) - results.append(lbl_count) - - # Frequency table (only groups with rows appear) - lbl_rows = ( - select( - lbl_raw.c.timestamp, - lbl_raw.c.idx, - lbl_raw.c.value.label("value"), - func.count().label("count"), - ).group_by(lbl_raw.c.timestamp, lbl_raw.c.idx, lbl_raw.c.value) - ).cte("lbl_rows") - - lbl_freq = select( - lbl_rows.c.timestamp, - lbl_rows.c.idx, - literal("lbl_freq").label("kind"), - func.coalesce( - func.jsonb_agg( - aggregate_order_by( - func.jsonb_build_object( - "value", - lbl_rows.c.value, - "count", - lbl_rows.c.count, - ), - lbl_rows.c.count.desc(), - lbl_rows.c.value.asc(), - ) - ), - func.jsonb_build_array(), - ).label("value"), - ).group_by(lbl_rows.c.timestamp, lbl_rows.c.idx) - results.append(lbl_freq) - - return results - - -def build_binary_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - bin_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - extract_cte.c.jv.label("value"), - ).where( - extract_cte.c.type == literal(MetricType.BINARY.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("boolean"), - ) - ).cte("bin_raw") - - # Count (gate empty groups) - bin_counts = ( - select( - bin_raw.c.timestamp, - bin_raw.c.idx, - func.count().label("n"), - ).group_by(bin_raw.c.timestamp, bin_raw.c.idx) - ).cte("bin_counts") - - bin_count = ( - select( - bin_raw.c.timestamp, - bin_raw.c.idx, - literal("bin_count").label("kind"), - func.jsonb_build_object("count", func.count()).label("value"), - ) - .select_from( - bin_raw.join( - bin_counts, - (bin_raw.c.timestamp == bin_counts.c.timestamp) - & (bin_raw.c.idx == bin_counts.c.idx), - ) - ) - .where(bin_counts.c.n > 0) - .group_by(bin_raw.c.timestamp, bin_raw.c.idx) - ) - results.append(bin_count) - - # Frequency via FILTER (fewer CASEs, no NULLs) - t_cond = cast(bin_raw.c.value, Boolean).is_(True) - f_cond = cast(bin_raw.c.value, Boolean).is_(False) - - bin_freq = select( - bin_raw.c.timestamp, - bin_raw.c.idx, - literal("bin_freq").label("kind"), - func.jsonb_build_object( - True, - func.count().filter(t_cond), - False, - func.count().filter(f_cond), - ).label("value"), - ).group_by(bin_raw.c.timestamp, bin_raw.c.idx) - results.append(bin_freq) - - return results - - -def build_string_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # Only valid strings - str_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - extract_cte.c.jv.label("value"), - ).where( - extract_cte.c.type == literal(MetricType.STRING.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("string"), - ) - ).cte("str_raw") - - str_counts = ( - select( - str_raw.c.timestamp, - str_raw.c.idx, - func.count().label("n"), - ).group_by(str_raw.c.timestamp, str_raw.c.idx) - ).cte("str_counts") - - # Count (emit only when n>0) - str_count = ( - select( - str_raw.c.timestamp, - str_raw.c.idx, - literal("str_count").label("kind"), - func.jsonb_build_object("count", func.count()).label("value"), - ) - .select_from( - str_raw.join( - str_counts, - (str_raw.c.timestamp == str_counts.c.timestamp) - & (str_raw.c.idx == str_counts.c.idx), - ) - ) - .where(str_counts.c.n > 0) - .group_by(str_raw.c.timestamp, str_raw.c.idx) - ) - results.append(str_count) - - return results - - -def build_json_blocks( - extract_cte: FromClause, -) -> List[Select]: - results: List[Select] = [] - - # Only valid JSON objects - json_raw = ( - select( - extract_cte.c.timestamp, - extract_cte.c.idx, - extract_cte.c.jv.label("value"), - ).where( - extract_cte.c.type == literal(MetricType.JSON.value), - extract_cte.c.jv.isnot(None), - func.jsonb_typeof(extract_cte.c.jv) == literal("object"), - ) - ).cte("json_raw") - - json_counts = ( - select( - json_raw.c.timestamp, - json_raw.c.idx, - func.count().label("n"), - ).group_by(json_raw.c.timestamp, json_raw.c.idx) - ).cte("json_counts") - - # Count (emit only when n>0) - json_count = ( - select( - json_raw.c.timestamp, - json_raw.c.idx, - literal("json_count").label("kind"), - func.jsonb_build_object("count", func.count()).label("value"), - ) - .select_from( - json_raw.join( - json_counts, - (json_raw.c.timestamp == json_counts.c.timestamp) - & (json_raw.c.idx == json_counts.c.idx), - ) - ) - .where(json_counts.c.n > 0) - .group_by(json_raw.c.timestamp, json_raw.c.idx) - ) - results.append(json_count) - - return results - - -def compute_range( - value: Dict[str, Any], -) -> Dict[str, Any]: - if "min" in value and "max" in value: - value["range"] = value["max"] - value["min"] - - return value - - -def parse_pcts( - value: List[Optional[float]], -) -> Dict[str, Any]: - if value is None or len(value) != len(PERCENTILES_KEYS): - return {} - - return {"pcts": dict(zip(PERCENTILES_KEYS, value))} - - -def compute_iqrs( - value: Dict[str, Any], -) -> Dict[str, Any]: - pcts = value.get("pcts") - - if not pcts: - return value - - iqrs: Dict[str, float] = {} - - for k, v in IQR_ITEMS: - if v[0] in pcts and v[1] in pcts: - iqrs[k] = pcts[v[1]] - pcts[v[0]] - - value["iqrs"] = iqrs - return value - - -def compute_cqvs( - value: Dict[str, Any], -) -> Dict[str, Any]: - pcts = value.get("pcts") - - if not pcts: - return value - - if ( - pcts["p01"] * pcts["p99"] < 0 - or abs(pcts["p50"]) < abs(pcts["p99"]) / 100.0 - or abs(pcts["p50"]) < abs(pcts["p01"]) / 100.0 - ): - return value - - pscs = {} - - for k, v in PSC_ITEMS: - if v[0] in pcts and v[1] in pcts: - pscs[k] = ( - (pcts[v[1]] - pcts[v[0]]) / (pcts[v[1]] + pcts[v[0]]) - if (pcts[v[1]] + pcts[v[0]]) != 0 - else 0.0 - ) - - value["pscs"] = pscs - - return value - - -def compute_pscs( - value: Dict[str, Any], -) -> Dict[str, Any]: - pcts = value.get("pcts") - - if not pcts: - return value - - if ( - pcts["p01"] * pcts["p99"] < 0 - or abs(pcts["p50"]) < abs(pcts["p99"]) / 100.0 - or abs(pcts["p50"]) < abs(pcts["p01"]) / 100.0 - ): - return value - - pscs = {} - - for k, v in PSC_ITEMS: - if v[0] in pcts and v[1] in pcts: - pscs[k] = ( - (pcts[v[1]] - pcts[v[0]]) / pcts["p50"] if pcts["p50"] != 0 else 0.0 - ) - - value["pscs"] = pscs - - return value - - -def normalize_hist( - value: List[Dict[str, Any]], -) -> Dict[str, Any]: - hist = value - - if not hist: - return {} - - count = 0.0 - - for h in hist: - count += float(h.get("count", 0.0)) - - for h in hist: - h["density"] = round( - float(h.get("count", 0.0)) / count if count > 0.0 else 0.0, 5 - ) - - return {"hist": hist} - - -def parse_bin_freq( - value: Dict[str, Any], -) -> List[Dict[str, Any]]: - return [ - { - "value": True, - "count": value.get("true", 0), - }, - { - "value": False, - "count": value.get("false", 0), - }, - ] - - -def normalize_freq( - value: List[Dict[str, Any]], -) -> Dict[str, Any]: - freq = value - - if not freq: - return {} - - count = 0.0 - - for f in freq: - count += float(f.get("count", 0.0)) - - for f in freq: - f["density"] = round( - float(f.get("count", 0.0)) / count if count > 0.0 else 0.0, 5 - ) - - return {"freq": freq} - - -def compute_uniq( - value: Dict[str, Any], -) -> Dict[str, Any]: - freq = value.get("freq") - - if not freq: - return value - - uniq = [] - - for f in freq: - if f.get("value") is not None: - uniq.append(f.get("value")) - - value["uniq"] = uniq - - return value + return clauses diff --git a/api/oss/src/dbs/postgres/secrets/custom_fields.py b/api/oss/src/dbs/secrets/custom_fields.py similarity index 100% rename from api/oss/src/dbs/postgres/secrets/custom_fields.py rename to api/oss/src/dbs/secrets/custom_fields.py diff --git a/api/oss/src/dbs/secrets/dao.py b/api/oss/src/dbs/secrets/dao.py new file mode 100644 index 0000000000..aa06cd8543 --- /dev/null +++ b/api/oss/src/dbs/secrets/dao.py @@ -0,0 +1,111 @@ +import json +from uuid import UUID + +from oss.src.dbs.secrets.dbes import SecretsDBE +from oss.src.models.db.postgres_engine import db_engine as engine +from oss.src.core.secrets.interfaces import SecretsDAOInterface +from oss.src.core.secrets.dtos import CreateSecretDTO, UpdateSecretDTO +from oss.src.dbs.secrets.mappings import ( + map_secrets_dto_to_dbe, + map_secrets_dbe_to_dto, + map_secrets_dto_to_dbe_update, +) + +from sqlalchemy import select + + +class SecretsDAO(SecretsDAOInterface): + def __init__(self): + pass + + async def create( + self, + project_id: UUID, + create_secret_dto: CreateSecretDTO, + ): + secrets_dbe = map_secrets_dto_to_dbe( + project_id=project_id, + secret_dto=create_secret_dto, + ) + async with engine.get_core_session() as session: + session.add(secrets_dbe) + await session.commit() + + secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) + return secrets_dto + + async def get( + self, + project_id: UUID, + secret_id: UUID, + ): + async with engine.get_core_session() as session: + query = select(SecretsDBE).filter_by( + id=secret_id, + project_id=project_id, + ) + result = await session.execute(query) # type: ignore + secrets_dbe = result.scalar() + + if secrets_dbe is None: + return None + + secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) + return secrets_dto + + async def list(self, project_id: UUID): + async with engine.get_core_session() as session: + query = select(SecretsDBE).filter_by(project_id=project_id) + + results = await session.execute(query) # type: ignore + secrets_dbes = results.scalars().all() + vault_secret_dtos = [ + map_secrets_dbe_to_dto(secrets_dbe=secret_dbe) + for secret_dbe in secrets_dbes + ] + return vault_secret_dtos + + async def update( + self, + project_id: UUID, + secret_id: UUID, + update_secret_dto: UpdateSecretDTO, + ): + async with engine.get_core_session() as session: + query = select(SecretsDBE).filter_by( + id=secret_id, + project_id=project_id, + ) + result = await session.execute(query) + secrets_dbe = result.scalar() + + if secrets_dbe is None: + return None + + map_secrets_dto_to_dbe_update( + secrets_dbe=secrets_dbe, update_secret_dto=update_secret_dto + ) + + await session.commit() + await session.refresh(secrets_dbe) + + updated_secrets_dto = map_secrets_dbe_to_dto(secrets_dbe=secrets_dbe) + return updated_secrets_dto + + async def delete( + self, + project_id: UUID, + secret_id: UUID, + ): + async with engine.get_core_session() as session: + query = select(SecretsDBE).filter_by( + id=secret_id, + project_id=project_id, + ) + result = await session.execute(query) # type: ignore + vault_secret_dbe = result.scalar() + if vault_secret_dbe is None: + return + + await session.delete(vault_secret_dbe) + await session.commit() diff --git a/api/oss/src/dbs/secrets/dbas.py b/api/oss/src/dbs/secrets/dbas.py new file mode 100644 index 0000000000..62eda0662f --- /dev/null +++ b/api/oss/src/dbs/secrets/dbas.py @@ -0,0 +1,24 @@ +import uuid_utils.compat as uuid +from sqlalchemy import Column, Enum as SQLEnum, UUID + +from oss.src.core.secrets.enums import SecretKind +from oss.src.dbs.postgres.shared.dbas import ( + ProjectScopeDBA, + LegacyLifecycleDBA, + HeaderDBA, +) +from oss.src.dbs.secrets.custom_fields import PGPString + + +class SecretsDBA(ProjectScopeDBA, LegacyLifecycleDBA, HeaderDBA): + __abstract__ = True + + id = Column( + UUID(as_uuid=True), + primary_key=True, + default=uuid.uuid7, + unique=True, + nullable=False, + ) + kind = Column(SQLEnum(SecretKind, name="secretkind_enum")) # type: ignore + data = Column(PGPString()) # type: ignore diff --git a/api/oss/src/dbs/secrets/dbes.py b/api/oss/src/dbs/secrets/dbes.py new file mode 100644 index 0000000000..84c6158a72 --- /dev/null +++ b/api/oss/src/dbs/secrets/dbes.py @@ -0,0 +1,6 @@ +from oss.src.dbs.postgres.shared.base import Base +from oss.src.dbs.secrets.dbas import SecretsDBA + + +class SecretsDBE(Base, SecretsDBA): + __tablename__ = "secrets" diff --git a/api/oss/src/dbs/secrets/mappings.py b/api/oss/src/dbs/secrets/mappings.py new file mode 100644 index 0000000000..cef776db2e --- /dev/null +++ b/api/oss/src/dbs/secrets/mappings.py @@ -0,0 +1,60 @@ +import uuid +import json + +from oss.src.dbs.secrets.dbes import SecretsDBE +from oss.src.core.secrets.dtos import ( + Header, + SecretKind, + LifecycleDTO, + CreateSecretDTO, + UpdateSecretDTO, + SecretResponseDTO, +) + + +def map_secrets_dto_to_dbe( + *, project_id: uuid.UUID, secret_dto: CreateSecretDTO +) -> SecretsDBE: + vault_secret_dbe = SecretsDBE( + name=secret_dto.header.name if secret_dto.header else None, + description=(secret_dto.header.description if secret_dto.header else None), + project_id=project_id, + kind=secret_dto.secret.kind.value, + data=json.dumps(secret_dto.secret.data.model_dump(exclude_none=True)), + ) + return vault_secret_dbe + + +def map_secrets_dto_to_dbe_update( + secrets_dbe: SecretsDBE, update_secret_dto: UpdateSecretDTO +) -> None: + if update_secret_dto.header: + for key, value in update_secret_dto.header.model_dump( + exclude_none=True + ).items(): + if hasattr(secrets_dbe, key): + setattr(secrets_dbe, key, value) + + if update_secret_dto.secret: + for key, value in update_secret_dto.secret.model_dump( + exclude_none=True + ).items(): + if key == "data" and hasattr(secrets_dbe, key): + secrets_dbe.data = update_secret_dto.secret.data.model_dump_json() + elif hasattr(secrets_dbe, key): + setattr(secrets_dbe, key, value) + + +def map_secrets_dbe_to_dto(*, secrets_dbe: SecretsDBE) -> SecretResponseDTO: + vault_secret_dto = SecretResponseDTO( + id=secrets_dbe.id, # type: ignore + kind=SecretKind(secrets_dbe.kind).value, + data=json.loads(secrets_dbe.data), # type: ignore + header=Header(name=secrets_dbe.name, description=secrets_dbe.description), + lifecycle=LifecycleDTO( + created_at=secrets_dbe.created_at, + updated_at=secrets_dbe.updated_at, # type: ignore + ), + ) + + return vault_secret_dto diff --git a/api/oss/src/models/api/api_models.py b/api/oss/src/models/api/api_models.py index 9d81505a97..509c162fa3 100644 --- a/api/oss/src/models/api/api_models.py +++ b/api/oss/src/models/api/api_models.py @@ -64,9 +64,6 @@ class CreateApp(BaseModel): class CreateAppOutput(BaseModel): app_id: str app_name: str - app_type: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None class UpdateApp(BaseModel): @@ -77,10 +74,6 @@ class UpdateAppOutput(CreateAppOutput): pass -class ReadAppOutput(CreateAppOutput): - pass - - class AppOutput(CreateAppOutput): pass @@ -230,7 +223,7 @@ class DeployToEnvironmentPayload(BaseModel): commit_message: Optional[str] = None -class TestsetOutput(BaseModel): +class TestSetOutput(BaseModel): id: str name: str csvdata: List[Dict[str, Any]] diff --git a/api/oss/src/models/api/evaluation_model.py b/api/oss/src/models/api/evaluation_model.py index d79d124921..6d447aa28e 100644 --- a/api/oss/src/models/api/evaluation_model.py +++ b/api/oss/src/models/api/evaluation_model.py @@ -2,19 +2,16 @@ from datetime import datetime from typing import Optional, List, Dict, Any, Union -from pydantic import BaseModel, Field, model_validator, ConfigDict +from pydantic import BaseModel, Field, model_validator, field_validator from oss.src.utils import traces from oss.src.models.api.api_models import Result -from oss.src.core.shared.dtos import Tags, Meta - -class LegacyEvaluator(BaseModel): +class Evaluator(BaseModel): name: str key: str direct_use: bool - settings_presets: Optional[list[dict]] = None settings_template: dict description: Optional[str] = None oss: Optional[bool] = False @@ -209,8 +206,6 @@ class EvaluationScenario(BaseModel): note: Optional[str] = None results: List[EvaluationScenarioResult] - model_config = ConfigDict(title="LegacyEvaluationScenario") - class EvaluationScenarioUpdate(BaseModel): vote: Optional[str] = None @@ -293,7 +288,7 @@ class LMProvidersEnum(str, Enum): class NewEvaluation(BaseModel): - name: Optional[str] = None + app_id: str revisions_ids: List[str] evaluators_configs: List[str] testset_id: str @@ -302,6 +297,7 @@ class NewEvaluation(BaseModel): class NewEvaluatorConfig(BaseModel): + app_id: str name: str evaluator_key: str settings_values: dict diff --git a/api/oss/src/models/api/testset_model.py b/api/oss/src/models/api/testset_model.py index 0300ccab85..60eae9560c 100644 --- a/api/oss/src/models/api/testset_model.py +++ b/api/oss/src/models/api/testset_model.py @@ -19,7 +19,7 @@ class Config: } -class TestsetSimpleResponse(BaseModel): +class TestSetSimpleResponse(BaseModel): id: str name: str created_at: str @@ -43,7 +43,7 @@ class NewTestset(BaseModel): csvdata: List[Dict[str, Any]] -class TestsetOutputResponse(BaseModel): +class TestSetOutputResponse(BaseModel): id: str = Field(..., alias="_id") name: str created_at: str diff --git a/api/oss/src/models/converters.py b/api/oss/src/models/converters.py index 768fded064..2186c9e079 100644 --- a/api/oss/src/models/converters.py +++ b/api/oss/src/models/converters.py @@ -34,7 +34,7 @@ from oss.src.models.db_models import ( AppDB, UserDB, - TestsetDB, + TestSetDB, AppVariantDB, VariantBaseDB, AppEnvironmentDB, @@ -45,7 +45,7 @@ from oss.src.models.api.api_models import ( App, BaseOutput, - TestsetOutput, + TestSetOutput, AppVariantRevision, PaginationParam, WithPagination, @@ -229,22 +229,22 @@ def app_db_to_pydantic(app_db: AppDB) -> App: ) -def testset_db_to_pydantic(testset_db: TestsetDB) -> TestsetOutput: +def testset_db_to_pydantic(test_set_db: TestSetDB) -> TestSetOutput: """ - Convert a TestsetDB object to a TestsetAPI object. + Convert a TestSetDB object to a TestSetAPI object. Args: - testset_db (Dict): The TestsetDB object to be converted. + test_set_db (Dict): The TestSetDB object to be converted. Returns: - TestsetAPI: The converted TestsetAPI object. + TestSetAPI: The converted TestSetAPI object. """ - return TestsetOutput( - name=testset_db.name, - csvdata=testset_db.csvdata, - created_at=str(testset_db.created_at), - updated_at=str(testset_db.updated_at), - id=str(testset_db.id), + return TestSetOutput( + name=test_set_db.name, + csvdata=test_set_db.csvdata, + created_at=str(test_set_db.created_at), + updated_at=str(test_set_db.updated_at), + id=str(test_set_db.id), ) diff --git a/api/oss/src/models/db/models.py b/api/oss/src/models/db/models.py index 4e78e945ac..b6f4199b93 100644 --- a/api/oss/src/models/db/models.py +++ b/api/oss/src/models/db/models.py @@ -3,7 +3,6 @@ if is_ee(): from ee.src.models.db_models import ( APIKeyDB, - ProjectDB, WorkspaceDB, OrganizationDB, InvitationDB, @@ -30,7 +29,7 @@ from oss.src.models.db_models import ( UserDB, - TestsetDB, + TestSetDB, AppVariantDB, VariantBaseDB, AppEnvironmentDB, @@ -43,7 +42,7 @@ AppDB, UserDB, ProjectDB, - TestsetDB, + TestSetDB, AppVariantDB, DeploymentDB, EvaluationDB, diff --git a/api/oss/src/models/db/postgres_engine.py b/api/oss/src/models/db/postgres_engine.py new file mode 100644 index 0000000000..4de0a2ce20 --- /dev/null +++ b/api/oss/src/models/db/postgres_engine.py @@ -0,0 +1,113 @@ +from asyncio import current_task +from typing import AsyncGenerator +from contextlib import asynccontextmanager + +from sqlalchemy.ext.asyncio import ( + AsyncSession, + AsyncEngine, + create_async_engine, + async_sessionmaker, + async_scoped_session, +) + +from oss.src.models.db.config import ( + POSTGRES_URI_CORE, + POSTGRES_URI_TRACING, +) + + +class DBEngine: + """ + Database engine to initialize SQLAlchemy (and Beanie ODM) + """ + + def __init__(self) -> None: + self.postgres_uri_core = POSTGRES_URI_CORE + + self.core_engine: AsyncEngine = create_async_engine( + url=self.postgres_uri_core, + ) # type: ignore + self.async_core_session_maker = async_sessionmaker( + bind=self.core_engine, + class_=AsyncSession, + expire_on_commit=False, + ) + self.async_core_session = async_scoped_session( + session_factory=self.async_core_session_maker, + scopefunc=current_task, + ) + + self.postgres_uri_tracing = POSTGRES_URI_TRACING + + self.tracing_engine: AsyncEngine = create_async_engine( + url=self.postgres_uri_tracing, + ) # type: ignore + self.async_tracing_session_maker = async_sessionmaker( + bind=self.tracing_engine, + class_=AsyncSession, + expire_on_commit=False, + ) + self.async_tracing_session = async_scoped_session( + session_factory=self.async_tracing_session_maker, + scopefunc=current_task, + ) + + async def init_db(self): + """ + Initialize the database for either cloud/ee or oss. + """ + + raise NotImplementedError() + + @asynccontextmanager + async def get_core_session(self) -> AsyncGenerator[AsyncSession, None]: + """ + Async context manager to yield a database session. + + This context manager ensures that any changes made during the session are + rolled back in case of an exception, and the session is properly closed to + prevent memory leaks. + + Yields: + AsyncSession: SQLAlchemy async session for database operations. + + Raises: + Exception: Any exception that occurs within the context will be + re-raised after the session rollback. + """ + + session = self.async_core_session() + try: + yield session + except Exception as e: + await session.rollback() + raise e + finally: + await session.close() + + @asynccontextmanager + async def get_tracing_session(self) -> AsyncGenerator[AsyncSession, None]: + session = self.async_tracing_session() + try: + yield session + except Exception as e: + await session.rollback() + raise e + finally: + await session.close() + + async def close_db(self): + """ + Closes and dispose all the connections using the engine. + + :raises Exception: if engine is initialized + """ + + if self.engine is None: + raise Exception("DBEngine is not initialized") + + await self.engine.dispose() + + +# Initialize db engine +db_engine = DBEngine() diff --git a/api/oss/src/models/db_models.py b/api/oss/src/models/db_models.py index 867cb30156..d018ae2ee1 100644 --- a/api/oss/src/models/db_models.py +++ b/api/oss/src/models/db_models.py @@ -9,7 +9,6 @@ Boolean, ForeignKey, Enum, - JSON, ) from sqlalchemy.orm import relationship from sqlalchemy_json import mutable_json_type @@ -46,11 +45,6 @@ class OrganizationDB(Base): DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) ) - project = relationship( - "oss.src.models.db_models.ProjectDB", - back_populates="organization", - overlaps="organization", - ) workspaces_relation = relationship( "oss.src.models.db_models.WorkspaceDB", back_populates="organization" ) @@ -89,6 +83,7 @@ class WorkspaceDB(Base): ) +# KEEP in oss/ class UserDB(Base): __tablename__ = "users" @@ -110,6 +105,7 @@ class UserDB(Base): ) +# KEEP in oss/ class ProjectDB(Base): __tablename__ = "projects" @@ -143,16 +139,14 @@ class ProjectDB(Base): workspace = relationship( "oss.src.models.db_models.WorkspaceDB", back_populates="projects" ) - organization = relationship( - "oss.src.models.db_models.OrganizationDB", back_populates="project" - ) app = relationship("AppDB", cascade=CASCADE_ALL_DELETE, backref="project") evaluator_config = relationship( "EvaluatorConfigDB", cascade=CASCADE_ALL_DELETE, backref="project" ) - testset = relationship("TestsetDB", cascade=CASCADE_ALL_DELETE, backref="project") + testset = relationship("TestSetDB", cascade=CASCADE_ALL_DELETE, backref="project") +# KEEP in oss/ class AppDB(Base): __tablename__ = "app_db" @@ -187,6 +181,7 @@ class AppDB(Base): ) +# KEEP in oss/ class DeploymentDB(Base): __tablename__ = "deployments" @@ -213,6 +208,7 @@ class DeploymentDB(Base): app = relationship("AppDB", back_populates="deployment") +# KEEP in oss/ class VariantBaseDB(Base): __tablename__ = "bases" @@ -243,6 +239,7 @@ class VariantBaseDB(Base): project = relationship("oss.src.models.db_models.ProjectDB") +# KEEP in oss/ class AppVariantDB(Base): __tablename__ = "app_variants" @@ -264,7 +261,7 @@ class AppVariantDB(Base): base_id = Column(UUID(as_uuid=True), ForeignKey("bases.id")) config_name = Column(String, nullable=False) config_parameters = Column( - mutable_json_type(dbtype=JSON, nested=True), # type: ignore + mutable_json_type(dbtype=JSONB, nested=True), # type: ignore nullable=False, default=dict, ) @@ -287,6 +284,7 @@ class AppVariantDB(Base): ) +# KEEP in oss/ class AppVariantRevisionsDB(Base): __tablename__ = "app_variant_revisions" @@ -310,7 +308,7 @@ class AppVariantRevisionsDB(Base): hidden = Column(Boolean, nullable=True) config_name = Column(String, nullable=False) config_parameters = Column( - mutable_json_type(dbtype=JSON, nested=True), # type: ignore + mutable_json_type(dbtype=JSONB, nested=True), # type: ignore nullable=False, default=dict, ) @@ -329,6 +327,7 @@ def get_config(self) -> dict: return {"config_name": self.config_name, "parameters": self.config_parameters} +# KEEP in oss/ class AppEnvironmentDB(Base): __tablename__ = "environments" @@ -366,6 +365,7 @@ class AppEnvironmentDB(Base): deployed_app_variant_revision = relationship("AppVariantRevisionsDB") +# KEEP in oss/ class AppEnvironmentRevisionDB(Base): __tablename__ = "environments_revisions" @@ -399,7 +399,8 @@ class AppEnvironmentRevisionDB(Base): modified_by = relationship("UserDB") -class TestsetDB(Base): +# KEEP in oss/ +class TestSetDB(Base): __tablename__ = "testsets" id = Column( @@ -422,8 +423,9 @@ class TestsetDB(Base): ) +# KEEP in oss/ class EvaluatorConfigDB(Base): - __tablename__ = "auto_evaluator_configs" + __tablename__ = "evaluators_configs" id = Column( UUID(as_uuid=True), @@ -447,6 +449,7 @@ class EvaluatorConfigDB(Base): ) +# KEEP in oss/ or KILL class IDsMappingDB(Base): __tablename__ = "ids_mapping" @@ -519,267 +522,3 @@ class APIKeyDB(Base): project = relationship( "oss.src.models.db_models.ProjectDB", backref="api_key_project" ) - - -class HumanEvaluationVariantDB(Base): - __tablename__ = "human_evaluation_variants" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - human_evaluation_id = Column( - UUID(as_uuid=True), ForeignKey("human_evaluations.id", ondelete="CASCADE") - ) - variant_id = Column( - UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") - ) - variant_revision_id = Column( - UUID(as_uuid=True), ForeignKey("app_variant_revisions.id", ondelete="SET NULL") - ) - - variant = relationship("AppVariantDB", backref="evaluation_variant") - variant_revision = relationship( - "AppVariantRevisionsDB", backref="evaluation_variant_revision" - ) - - -class HumanEvaluationDB(Base): - __tablename__ = "human_evaluations" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - app_id = Column(UUID(as_uuid=True), ForeignKey("app_db.id", ondelete="CASCADE")) - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - status = Column(String) - evaluation_type = Column(String) - testset_id = Column(UUID(as_uuid=True), ForeignKey("testsets.id")) - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - testset = relationship("TestsetDB") - evaluation_variant = relationship( - "HumanEvaluationVariantDB", - cascade=CASCADE_ALL_DELETE, - backref="human_evaluation", - ) - evaluation_scenario = relationship( - "HumanEvaluationScenarioDB", - cascade=CASCADE_ALL_DELETE, - backref="evaluation_scenario", - ) - - -class HumanEvaluationScenarioDB(Base): - __tablename__ = "human_evaluations_scenarios" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - evaluation_id = Column( - UUID(as_uuid=True), ForeignKey("human_evaluations.id", ondelete="CASCADE") - ) - inputs = Column( - mutable_json_type(dbtype=JSONB, nested=True) - ) # List of HumanEvaluationScenarioInput - outputs = Column( - mutable_json_type(dbtype=JSONB, nested=True) - ) # List of HumanEvaluationScenarioOutput - vote = Column(String) - score = Column(String) - correct_answer = Column(String) - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - is_pinned = Column(Boolean) - note = Column(String) - - -class EvaluationAggregatedResultDB(Base): - __tablename__ = "auto_evaluation_aggregated_results" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - evaluation_id = Column( - UUID(as_uuid=True), ForeignKey("auto_evaluations.id", ondelete="CASCADE") - ) - evaluator_config_id = Column( - UUID(as_uuid=True), - ForeignKey("auto_evaluator_configs.id", ondelete="SET NULL"), - ) - result = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - - evaluator_config = relationship("EvaluatorConfigDB", backref="evaluator_config") - - -class EvaluationScenarioResultDB(Base): - __tablename__ = "auto_evaluation_scenario_results" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - evaluation_scenario_id = Column( - UUID(as_uuid=True), - ForeignKey("auto_evaluation_scenarios.id", ondelete="CASCADE"), - ) - evaluator_config_id = Column( - UUID(as_uuid=True), - ForeignKey("auto_evaluator_configs.id", ondelete="SET NULL"), - ) - result = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - - -class EvaluationDB(Base): - __tablename__ = "auto_evaluations" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - app_id = Column(UUID(as_uuid=True), ForeignKey("app_db.id", ondelete="CASCADE")) - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - status = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - testset_id = Column( - UUID(as_uuid=True), ForeignKey("testsets.id", ondelete="SET NULL") - ) - variant_id = Column( - UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") - ) - variant_revision_id = Column( - UUID(as_uuid=True), ForeignKey("app_variant_revisions.id", ondelete="SET NULL") - ) - average_cost = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - total_cost = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - average_latency = Column(mutable_json_type(dbtype=JSONB, nested=True)) # Result - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - project = relationship("oss.src.models.db_models.ProjectDB") - testset = relationship("TestsetDB") - variant = relationship("AppVariantDB") - variant_revision = relationship("AppVariantRevisionsDB") - aggregated_results = relationship( - "EvaluationAggregatedResultDB", - cascade=CASCADE_ALL_DELETE, - backref="evaluation", - ) - evaluation_scenarios = relationship( - "EvaluationScenarioDB", cascade=CASCADE_ALL_DELETE, backref="evaluation" - ) - evaluator_configs = relationship( - "EvaluationEvaluatorConfigDB", - cascade=CASCADE_ALL_DELETE, - backref="evaluation", - ) - - -class EvaluationEvaluatorConfigDB(Base): - __tablename__ = "auto_evaluation_evaluator_configs" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - evaluation_id = Column( - UUID(as_uuid=True), - ForeignKey("auto_evaluations.id", ondelete="CASCADE"), - primary_key=True, - ) - evaluator_config_id = Column( - UUID(as_uuid=True), - ForeignKey("auto_evaluator_configs.id", ondelete="SET NULL"), - primary_key=True, - ) - - -class EvaluationScenarioDB(Base): - __tablename__ = "auto_evaluation_scenarios" - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - evaluation_id = Column( - UUID(as_uuid=True), ForeignKey("auto_evaluations.id", ondelete="CASCADE") - ) - variant_id = Column( - UUID(as_uuid=True), ForeignKey("app_variants.id", ondelete="SET NULL") - ) - inputs = Column( - mutable_json_type(dbtype=JSONB, nested=True) - ) # List of EvaluationScenarioInput - outputs = Column( - mutable_json_type(dbtype=JSONB, nested=True) - ) # List of EvaluationScenarioOutput - correct_answers = Column( - mutable_json_type(dbtype=JSONB, nested=True) - ) # List of CorrectAnswer - is_pinned = Column(Boolean) - note = Column(String) - latency = Column(Integer) - cost = Column(Integer) - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - project = relationship("oss.src.models.db_models.ProjectDB") - variant = relationship("AppVariantDB") - results = relationship( - "EvaluationScenarioResultDB", - cascade=CASCADE_ALL_DELETE, - backref="evaluation_scenario", - ) diff --git a/api/oss/src/models/deprecated_models.py b/api/oss/src/models/deprecated_models.py index 070536fa13..2fa489216b 100644 --- a/api/oss/src/models/deprecated_models.py +++ b/api/oss/src/models/deprecated_models.py @@ -8,7 +8,6 @@ DeprecatedBase = declarative_base() -AltDeprecatedBase = declarative_base() class ProjectScopedAppDB(DeprecatedBase): @@ -28,32 +27,6 @@ class ProjectScopedAppDB(DeprecatedBase): ) -class DeprecatedOrganizationDB(DeprecatedBase): - __tablename__ = "organizations" - __table_args__ = {"extend_existing": True} - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - name = Column(String, default="agenta") - description = Column( - String, - default="The open-source LLM developer platform for cross-functional teams.", - ) - type = Column(String, nullable=True) - owner = Column(String, nullable=True) # TODO: deprecate and remove - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - class DeprecatedAppDB(DeprecatedBase): __tablename__ = "app_db" __table_args__ = {"extend_existing": True} @@ -76,30 +49,6 @@ class DeprecatedAppDB(DeprecatedBase): ) -class DeprecatedTestsetDB(DeprecatedBase): - __tablename__ = "testsets" - __table_args__ = {"extend_existing": True} - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - name = Column(String) - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - csvdata = Column(mutable_json_type(dbtype=JSONB, nested=True)) - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - class DeprecatedAppVariantDB(DeprecatedBase): __tablename__ = "app_variants" __table_args__ = {"extend_existing": True} @@ -198,7 +147,7 @@ class DeprecatedAppEnvironmentRevisionDB(DeprecatedBase): ) -class DeprecatedEvaluatorConfigDBwApp(AltDeprecatedBase): +class DeprecatedEvaluatorConfigDB(DeprecatedBase): __tablename__ = "evaluators_configs" __table_args__ = {"extend_existing": True} @@ -222,60 +171,6 @@ class DeprecatedEvaluatorConfigDBwApp(AltDeprecatedBase): ) -class DeprecatedEvaluatorConfigDBwProject(DeprecatedBase): - __tablename__ = "evaluators_configs" - __table_args__ = {"extend_existing": True} - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - - name = Column(String) - evaluator_key = Column(String) - settings_values = Column(mutable_json_type(dbtype=JSONB, nested=True), default=dict) # type: ignore - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - - -class DeprecatedAutoEvaluatorConfigDBwProject(DeprecatedBase): - __tablename__ = "auto_evaluator_configs" - __table_args__ = {"extend_existing": True} - - id = Column( - UUID(as_uuid=True), - primary_key=True, - default=uuid.uuid7, - unique=True, - nullable=False, - ) - - name = Column(String) - evaluator_key = Column(String) - settings_values = Column(mutable_json_type(dbtype=JSONB, nested=True), default=dict) # type: ignore - created_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - updated_at = Column( - DateTime(timezone=True), default=lambda: datetime.now(timezone.utc) - ) - - project_id = Column( - UUID(as_uuid=True), ForeignKey("projects.id", ondelete="CASCADE") - ) - - class DeprecatedProjectDB(DeprecatedBase): __tablename__ = "projects" __table_args__ = {"extend_existing": True} diff --git a/api/oss/src/models/shared_models.py b/api/oss/src/models/shared_models.py index c2849bc6f5..229ab606e2 100644 --- a/api/oss/src/models/shared_models.py +++ b/api/oss/src/models/shared_models.py @@ -22,10 +22,7 @@ class Result(BaseModel): class InvokationResult(BaseModel): result: Result cost: Optional[float] = None - tokens: Optional[float] = None latency: Optional[float] = None - trace_id: Optional[str] = None - span_id: Optional[str] = None class EvaluationScenarioResult(BaseModel): @@ -71,7 +68,6 @@ class AppType(str, enum.Enum): CHAT_SERVICE = "SERVICE:chat" COMPLETION_SERVICE = "SERVICE:completion" CUSTOM = "CUSTOM" - SDK_CUSTOM = "SDK_CUSTOM" @classmethod def friendly_tag(cls, app_type: str): @@ -81,6 +77,5 @@ def friendly_tag(cls, app_type: str): cls.CHAT_SERVICE: "chat", cls.COMPLETION_SERVICE: "completion", cls.CUSTOM: "custom", - cls.SDK_CUSTOM: "custom (sdk)", } return mappings.get(app_type, None) # type: ignore diff --git a/api/oss/src/resources/evaluators/evaluators.py b/api/oss/src/resources/evaluators/evaluators.py index 53a2d48542..a835d6d7c7 100644 --- a/api/oss/src/resources/evaluators/evaluators.py +++ b/api/oss/src/resources/evaluators/evaluators.py @@ -35,13 +35,11 @@ "default": "correct_answer", "type": "string", "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, "description": "Exact Match evaluator determines if the output exactly matches the specified correct answer, ensuring precise alignment with expected results.", - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["functional"], }, @@ -51,8 +49,6 @@ "direct_use": True, "settings_template": {}, "description": "'Contains JSON' evaluator checks if the output contains the a valid JSON.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["functional", "classifiers"], }, @@ -75,13 +71,11 @@ "default": "correct_answer", "type": "string", "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, "description": "Similarity Match evaluator checks if the generated answer is similar to the expected answer. You need to provide the similarity threshold. It uses the Jaccard similarity to compare the answers.", - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["similarity", "functional"], }, @@ -96,14 +90,11 @@ "label": "Expected Answer Column", "default": "correct_answer", "type": "string", - "required": True, "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["similarity", "ai_llm"], }, @@ -127,8 +118,6 @@ "description": "If the regex should match or mismatch", }, }, - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -149,13 +138,11 @@ "default": "correct_answer", "type": "string", "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, "description": "JSON Field Match evaluator compares specific fields within JSON (JavaScript Object Notation) data. This matching can involve finding similarities or correspondences between fields in different JSON objects.", - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["functional"], }, @@ -191,12 +178,10 @@ "default": "correct_answer", "type": "string", "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["similarity", "functional"], }, @@ -205,78 +190,6 @@ "key": "auto_ai_critique", "direct_use": False, "requires_llm_api_keys": True, - "settings_presets": [ - { - "key": "default", - "name": "Default", - "values": { - "prompt_template": [ - { - "role": "system", - "content": "You are an expert evaluator grading model outputs. Your task is to grade the responses based on the criteria and requirements provided below. \n\nGiven the model output and inputs (and any other data you might get) assign a grade to the output. \n\n## Grading considerations\n- Evaluate the overall value provided in the model output\n- Verify all claims in the output meticulously\n- Differentiate between minor errors and major errors\n- Evaluate the outputs based on the inputs and whether they follow the instruction in the inputs if any\n- Give the highst and lowest score for cases where you have complete certainty about correctness and value\n\n## Scoring Criteria\n- The score should be a decimal value between 0.0 and 1.0\n- A score of 1.0 means that the answer is perfect. This is the highest (best) score \n- A score of 0.0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n\n## output format\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n", - }, - { - "role": "user", - "content": "## Model inputs\n{{inputs}}\n## Model outputs\n{{outputs}}", - }, - ], - "model": "gpt-4o-mini", - "response_type": "json_schema", - "json_schema": { - "name": "schema", - "schema": { - "title": "extract", - "description": "Extract information from the user's response.", - "type": "object", - "properties": { - "correctness": { - "type": "boolean", - "description": "The grade results", - } - }, - "required": ["correctness"], - "strict": True, - }, - }, - "version": "4", - }, - }, - { - "key": "hallucination", - "name": "Hallucination Detection", - "values": { - "prompt_template": [ - { - "role": "system", - "content": "You are an expert evaluator grading model outputs for hallucinations. Your task is to identify if the responses contain any hallucinated information based on the criteria and requirements provided below. \n\nGiven the model output and inputs (and any other data you might get) determine if the output contains hallucinations. \n\n## Hallucination considerations\n- Verify all factual claims in the output meticulously against the input data\n- Identify any information that is fabricated or not supported by the input data\n- Differentiate between minor inaccuracies and major hallucinations\n\n## Output format\nANSWER ONLY 'true' IF THE OUTPUT CONTAINS HALLUCINATIONS, OTHERWISE ANSWER 'false'. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN 'true' OR 'false'\n", - }, - { - "role": "user", - "content": "## Model inputs\n{{inputs}}\n## Model outputs\n{{outputs}}", - }, - ], - "model": "gpt-4o-mini", - "response_type": "json_schema", - "json_schema": { - "name": "schema", - "schema": { - "title": "extract", - "description": "Extract information from the user's response.", - "type": "object", - "properties": { - "correctness": { - "type": "boolean", - "description": "The hallucination detection result", - } - }, - "required": ["correctness"], - "strict": True, - }, - }, - "version": "4", - }, - }, - ], "settings_template": { "prompt_template": { "label": "Prompt Template", @@ -286,11 +199,11 @@ "default": [ { "role": "system", - "content": "You are an expert evaluator grading model outputs. Your task is to grade the responses based on the criteria and requirements provided below. \n\nGiven the model output and inputs (and any other data you might get) assign a grade to the output. \n\n## Grading considerations\n- Evaluate the overall value provided in the model output\n- Verify all claims in the output meticulously\n- Differentiate between minor errors and major errors\n- Evaluate the outputs based on the inputs and whether they follow the instruction in the inputs if any\n- Give the highst and lowest score for cases where you have complete certainty about correctness and value\n\n## Scoring Criteria\n- The score should be a decimal value between 0.0 and 1.0\n- A score of 1.0 means that the answer is perfect. This is the highest (best) score \n- A score of 0.0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give.\n\n## output format\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER\n", + "content": "You are an evaluator grading an LLM App.\n You will be the LLM APP OUTPUT, the CORRECT ANSWER, the PROMPT used in the LLM APP.\n Here is the grade criteria to follow:\n:- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER\n\nSCORE:\n-The score should be between 0 and 10\n-A score of 10 means that the answer is perfect. This is the highest (best) score. \nA score of 0 means that the answer does not any of of the criteria. This is the lowest possible score you can give.\n\nANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER", }, { "role": "user", - "content": "## Model inputs\n{{inputs}}\n## Model outputs\n{{outputs}}", + "content": "CORRECT ANSWER:{correct_answer}\nLLM APP OUTPUT: {prediction}.", }, ], }, @@ -298,69 +211,33 @@ "label": "Expected Answer Column", "default": "correct_answer", "type": "string", - "required": False, "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, "model": { "label": "Model", - "default": "gpt-4o-mini", + "default": "gpt-3.5-turbo", "type": "multiple_choice", "options": [ - "gpt-4-turbo", + "gpt-3.5-turbo", "gpt-4o", - "gpt-4o-mini", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano", - "claude-3-7-sonnet-20250219", - "claude-opus-4-20250514", - "claude-sonnet-4-20250514", - "claude-opus-4-1-20250805", - "claude-sonnet-4-5-20250929", + "claude-3-5-sonnet-20240620", + "claude-3-haiku-20240307", + "claude-3-opus-20240229", ], "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default "description": "The LLM model to use for the evaluation", }, - "response_type": { - "label": "Response Type", - "default": "json_schema", - "type": "hidden", - "advanced": True, - "description": "The format of the response from the LLM", - }, - "json_schema": { - "label": "Feedback Configuration", - "default": { - "name": "schema", - "schema": { - "title": "extract", - "description": "Extract information from the user's response.", - "type": "object", - "properties": { - "correctness": { - "type": "boolean", - "description": "The grade results", - } - }, - "required": ["correctness"], - "strict": True, - }, - }, - "type": "llm_response_schema", - "advanced": False, - "description": "Select a response format to structure how your evaluation results are returned.", - }, "version": { "label": "Version", "type": "hidden", - "default": "4", + "default": "2", "description": "The version of the evaluator", # ignore by the FE "advanced": False, # ignore by the FE }, }, - "description": "LLM-as-a-judge uses a configurable prompt template that takes the output—and optionally inputs or data from the testcase such as correct answer—to evaluate the generated output.", + "description": "LLM-as-a-judge uses a configurable prompt template that takes the output—and optionally inputs or data from the test case such as correct answer—to evaluate the generated output.", "oss": True, "tags": ["ai_llm", "functional"], }, @@ -388,9 +265,8 @@ "label": "Expected Answer Column", "default": "correct_answer", "type": "string", - "required": False, "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer. This will be shown in the results page.", }, }, @@ -421,9 +297,8 @@ "label": "Expected Answer Column", "default": "correct_answer", "type": "string", - "required": False, "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, @@ -450,8 +325,6 @@ }, }, "description": "Starts With evaluator checks if the output starts with a specified prefix, considering case sensitivity based on the settings.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -474,8 +347,6 @@ }, }, "description": "Ends With evaluator checks if the output ends with a specified suffix, considering case sensitivity based on the settings.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -498,8 +369,6 @@ }, }, "description": "Contains evaluator checks if the output contains a specified substring, considering case sensitivity based on the settings.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -522,8 +391,6 @@ }, }, "description": "Contains Any evaluator checks if the output contains any of the specified substrings from a comma-separated list, considering case sensitivity based on the settings.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -546,8 +413,6 @@ }, }, "description": "Contains All evaluator checks if the output contains all of the specified substrings from a comma-separated list, considering case sensitivity based on the settings.", - "requires_testcase": "never", - "requires_trace": "always", "oss": True, "tags": ["classifiers", "functional"], }, @@ -567,13 +432,11 @@ "default": "correct_answer", "type": "string", "advanced": True, # Tells the frontend that this setting is advanced and should be hidden by default - "ground_truth_key": True, # Tells the frontend that is the name of the column in the testset that should be shown as a ground truth to the user + "ground_truth_key": True, # Tells the frontend that is the name of the column in the test set that should be shown as a ground truth to the user "description": "The name of the column in the test data that contains the correct answer", }, }, "description": "This evaluator calculates the Levenshtein distance between the output and the correct answer. If a threshold is provided in the settings, it returns a boolean indicating whether the distance is within the threshold. If no threshold is provided, it returns the actual Levenshtein distance as a numerical value.", - "requires_testcase": "always", - "requires_trace": "always", "oss": True, "tags": ["functional"], }, @@ -584,8 +447,6 @@ "requires_llm_api_keys": True, "settings_template": rag_evaluator_settings_template, "description": "RAG Faithfulness evaluator assesses the accuracy and reliability of responses generated by Retrieval-Augmented Generation (RAG) models. It evaluates how faithfully the responses adhere to the retrieved documents or sources, ensuring that the generated text accurately reflects the information from the original sources.", - "requires_testcase": "always", - "requires_trace": "always", "tags": ["rag"], }, { @@ -595,8 +456,6 @@ "requires_llm_api_keys": True, "settings_template": rag_evaluator_settings_template, "description": "RAG Context Relevancy evaluator measures how relevant the retrieved documents or contexts are to the given question or prompt. It ensures that the selected documents provide the necessary information for generating accurate and meaningful responses, improving the overall quality of the RAG model's output.", - "requires_testcase": "always", - "requires_trace": "always", "tags": ["rag"], }, ] diff --git a/api/oss/src/routers/admin_router.py b/api/oss/src/routers/admin_router.py deleted file mode 100644 index 197a7c7892..0000000000 --- a/api/oss/src/routers/admin_router.py +++ /dev/null @@ -1,532 +0,0 @@ -from typing import Optional, List, Dict -from uuid import UUID, uuid4 -from traceback import print_exc -import random -import string - -from pydantic import BaseModel - -from fastapi.responses import JSONResponse - -from oss.src.utils.common import APIRouter, is_ee - -from oss.src.services.user_service import create_new_user -from oss.src.services.api_key_service import create_api_key - -if is_ee(): - from ee.src.core.meters.service import MetersService - from ee.src.dbs.postgres.meters.dao import MetersDAO - from ee.src.core.subscriptions.types import SubscriptionDTO - from ee.src.dbs.postgres.subscriptions.dao import SubscriptionsDAO - from ee.src.core.subscriptions.service import SubscriptionsService - - from ee.src.core.subscriptions.types import Plan - -if is_ee(): - from ee.src.services.admin_manager import ( - Reference, - # - UserRequest, - # - OrganizationRequest, - WorkspaceRequest, - ProjectRequest, - # - OrganizationMembershipRequest, - WorkspaceMembershipRequest, - ProjectMembershipRequest, - # - OrganizationRole, - WorkspaceRole, - ProjectRole, - # - Tier, - Credentials, - # - check_user, - # - create_user, - # - create_organization, - create_workspace, - create_project, - # - create_organization_membership, - create_workspace_membership, - create_project_membership, - # - create_credentials, - ) - - from ee.src.models.api.organization_models import CreateOrganization - - from ee.src.services.selectors import user_exists - - from ee.src.services.db_manager_ee import ( - fetch_project_memberships_by_user_id, - create_organization as legacy_create_organization, - ) - -else: - from oss.src.services.admin_manager import ( - Reference, - # - UserRequest, - # - OrganizationRequest, - WorkspaceRequest, - ProjectRequest, - # - OrganizationRole, - WorkspaceRole, - ProjectRole, - # - Tier, - Credentials, - # - check_user, - # - create_user, - # - create_organization, - create_workspace, - create_project, - # - create_credentials, - ) - - from oss.src.services.admin_manager import CreateOrganization - from oss.src.services.admin_manager import user_exists - from oss.src.services.admin_manager import legacy_create_organization - -router = APIRouter() - - -if is_ee(): - - class EntitiesRequestModel(BaseModel): - users: Dict[str, UserRequest] - # - organizations: Dict[str, OrganizationRequest] - workspaces: Dict[str, WorkspaceRequest] - projects: Dict[str, ProjectRequest] - # - organization_memberships: Dict[str, OrganizationMembershipRequest] - workspace_memberships: Dict[str, WorkspaceMembershipRequest] - project_memberships: Dict[str, ProjectMembershipRequest] - -else: - - class EntitiesRequestModel(BaseModel): - users: Dict[str, UserRequest] - # - organizations: Dict[str, OrganizationRequest] - workspaces: Dict[str, WorkspaceRequest] - projects: Dict[str, ProjectRequest] - - -class ProjectScope(BaseModel): - credentials: Credentials - role: ProjectRole - tier: Tier - # role: Union[OrganizationRole, WorkspaceRole, ProjectRole] - # - user: Reference - project: Reference - workspace: Reference - organization: Reference - - -class ScopesResponseModel(BaseModel): - projects: Dict[str, Dict[str, ProjectScope]] = {} - # workspaces: Dict[str, Dict[str, WorkspaceScope]] = {} - # organizations: Dict[str, Dict[str, OrganizationScope]] = {} - - -class ReferenceTracker(BaseModel): - users: Dict[str, UUID] = {} - # - organizations: Dict[str, UUID] = {} - workspaces: Dict[str, UUID] = {} - projects: Dict[str, UUID] = {} - # - organization_memberships: Dict[str, UUID] = {} - workspace_memberships: Dict[str, UUID] = {} - project_memberships: Dict[str, UUID] = {} - - -@router.post( - "/accounts", - operation_id="create_accounts", - response_model=ScopesResponseModel, -) -async def create_accounts( - entities: EntitiesRequestModel, -): - try: - references = ReferenceTracker() - scopes = ScopesResponseModel() - - # 1. MANAGE USERS - for slug, request in entities.users.items(): - # MAKE USER REFERENCE - reference = Reference(slug=slug) - # CHECK USER DUPLICATE - ref = await check_user(request=request) - # CREATE USER ENTITY - if not ref: - ref = await create_user(request=request) - # TRACK USER REFERENCE - references.users[reference.slug] = ref.id - - # 2.1. MANAGE ORGANIZATIONS - for slug, request in entities.organizations.items(): - # MAKE ORGANIZATION REFERENCE - reference = Reference(slug=slug) - # CREATE ORGANIZATION ENTITY - ref = await create_organization(request=request) - # TRACK ORGANIZATION REFERENCE - references.organizations[reference.slug] = ref.id - - # 2.2. MANAGE WORKSPACES - for slug, request in entities.workspaces.items(): - # MAKE WORKSPACE REFERENCE - reference = Reference(slug=slug) - # FIX ORGANIZATION REFERENCE - request.organization_ref = Reference( - slug=request.organization_ref.slug, - id=references.organizations[request.organization_ref.slug], - ) - # CREATE WORKSPACE ENTITY - ref = await create_workspace(request=request) - # TRACK WORKSPACE REFERENCE - references.workspaces[reference.slug] = ref.id - - # 2.3. MANAGE PROJECTS - for slug, request in entities.projects.items(): - # MAKE PROJECT REFERENCE - reference = Reference(slug=slug) - # FIX ORGANIZATION REFERENCE - request.organization_ref = Reference( - slug=request.organization_ref.slug, - id=references.organizations[request.organization_ref.slug], - ) - # FIX WORKSPACE REFERENCE - request.workspace_ref = Reference( - slug=request.workspace_ref.slug, - id=references.workspaces[request.workspace_ref.slug], - ) - # CREATE PROJECT ENTITY - ref = await create_project(request=request) - # TRACK PROJECT REFERENCE - references.projects[reference.slug] = ref.id - - if is_ee(): - # 3.1. MANAGE ORGANIZATION MEMBERSHIPS - for slug, request in entities.organization_memberships.items(): - # MAKE ORGANIZATION MEMBERSHIP REFERENCE - reference = Reference(slug=slug) - # FIX ORGANIZATION REFERENCE - request.organization_ref = Reference( - slug=request.organization_ref.slug, - id=references.organizations[request.organization_ref.slug], - ) - # FIX USER REFERENCE - request.user_ref = Reference( - slug=request.user_ref.slug, - id=references.users[request.user_ref.slug], - ) - # CREATE ORGANIZATION MEMBERSHIP ENTITY - ref = await create_organization_membership(request=request) - # TRACK ORGANIZATION MEMBERSHIP REFERENCE - references.organization_memberships[reference.slug] = ref.id - - # 3.2. MANAGE WORKSPACE MEMBERSHIPS - for slug, request in entities.workspace_memberships.items(): - # MAKE WORKSPACE MEMBERSHIP REFERENCE - reference = Reference(slug=slug) - # FIX WORKSPACE REFERENCE - request.workspace_ref = Reference( - slug=request.workspace_ref.slug, - id=references.workspaces[request.workspace_ref.slug], - ) - # FIX USER REFERENCE - request.user_ref = Reference( - slug=request.user_ref.slug, - id=references.users[request.user_ref.slug], - ) - # CREATE WORKSPACE MEMBERSHIP ENTITY - ref = await create_workspace_membership(request=request) - # TRACK WORKSPACE MEMBERSHIP REFERENCE - references.workspace_memberships[reference.slug] = ref.id - - # 3.3. MANAGE PROJECT MEMBERSHIPS - for slug, request in entities.project_memberships.items(): - # MAKE PROJECT MEMBERSHIP REFERENCE - reference = Reference(slug=slug) - # FIX PROJECT REFERENCE - request.project_ref = Reference( - slug=request.project_ref.slug, - id=references.projects[request.project_ref.slug], - ) - # FIX USER REFERENCE - request.user_ref = Reference( - slug=request.user_ref.slug, - id=references.users[request.user_ref.slug], - ) - # CREATE PROJECT MEMBERSHIP ENTITY - ref = await create_project_membership(request=request) - # TRACK PROJECT MEMBERSHIP REFERENCE - references.project_memberships[reference.slug] = ref.id - - # 4. MANAGE SCOPES - for reference, request in entities.project_memberships.items(): - # CREATE CREDENTIALS - credentials = await create_credentials( - user_id=references.users[request.user_ref.slug], - project_id=references.projects[request.project_ref.slug], - ) - # GET WORKSPACE AND ORGANIZATION - project = entities.projects[request.project_ref.slug] - workspace = entities.workspaces[project.workspace_ref.slug] - organization = entities.organizations[workspace.organization_ref.slug] - # CREATE PROJECT SCOPE - scope = ProjectScope( - credentials=credentials, - role=request.role, - tier="free" if organization.is_paying is False else "paying", - # - user=request.user_ref, - project=request.project_ref, - workspace=project.workspace_ref, - organization=workspace.organization_ref, - ) - # INITIALIZE PROJECT SCOPES - if request.user_ref.slug not in scopes.projects: - scopes.projects[request.user_ref.slug] = {} - if ( - request.project_ref.slug - not in scopes.projects[request.user_ref.slug] - ): - scopes.projects[request.user_ref.slug][ - request.project_ref.slug - ] = {} - # TRACK PROJECT SCOPE - scopes.projects[request.user_ref.slug][request.project_ref.slug] = scope - - return scopes - - except: # pylint: disable=bare-except - print_exc() - - return JSONResponse( - status_code=500, - content="Could not create accounts.", - ) - - -class LegacyUserRequest(BaseModel): - name: Optional[str] = None - email: Optional[str] = None - - -class LegacyScopeRequest(BaseModel): - name: Optional[str] = None - - -class LegacySubscriptionRequest(BaseModel): - plan: Optional[str] = None - - -class AccountRequest(BaseModel): - user: Optional[LegacyUserRequest] = None - scope: Optional[LegacyScopeRequest] = None - subscription: Optional[LegacySubscriptionRequest] = None - - -class LegacyUserResponse(BaseModel): - id: Optional[UUID] = None - - -class LegacyScopesResponse(BaseModel): - organization_id: Optional[UUID] = None - organization_name: Optional[str] = None - - workspace_id: Optional[UUID] = None - workspace_name: Optional[str] = None - - project_id: Optional[UUID] = None - project_name: Optional[str] = None - is_demo: Optional[bool] = None - - user_role: Optional[str] = None - - credentials: Optional[str] = None - - -class AccountResponse(BaseModel): - user: Optional[LegacyUserResponse] = None - scopes: Optional[List[LegacyScopesResponse]] = None - - -if is_ee(): - subscription_service = SubscriptionsService( - subscriptions_dao=SubscriptionsDAO(), - meters_service=MetersService( - meters_dao=MetersDAO(), - ), - ) - - -@router.post( - "/account", - operation_id="create_account", - response_model=AccountResponse, -) -async def create_account( - account: Optional[AccountRequest] = None, -): - prefix = "".join(random.choices(string.ascii_letters + string.digits, k=8)) - - if not account: - account = AccountRequest() - - if not account.user: - account.user = LegacyUserRequest() - - if not account.user.name: - account.user.name = prefix - - if not account.user.email: - account.user.email = prefix + "@test.agenta.ai" - - if not account.scope: - account.scope = LegacyScopeRequest() - - if not account.scope.name: - account.scope.name = prefix - - if not account.subscription: - account.subscription = LegacySubscriptionRequest() - - if is_ee(): - if not account.subscription.plan: - account.subscription.plan = Plan.CLOUD_V0_HOBBY - - try: - user_db = None - - exists = await user_exists( - user_email=account.user.email, - ) - - if exists: - return JSONResponse( - status_code=409, - content="Already exists.", - ) - - user_db = await create_new_user( - payload={ - "uid": str(uuid4()), - "username": account.user.name, - "email": account.user.email, - } - ) - - user = LegacyUserResponse(id=str(user_db.id)) - - create_org_payload = CreateOrganization( - name=account.scope.name, - owner=str(user.id), - type="default", - ) - - organization_db, workspace_db, project_db = await legacy_create_organization( - create_org_payload, - user_db, - return_org_wrk_prj=True, - ) - - if is_ee(): - subscription = SubscriptionDTO( - organization_id=organization_db.id, - plan=account.subscription.plan, - active=True, - anchor=1, - ) - - subscription = await subscription_service.create( - subscription=subscription, - ) - - # await add_user_to_demos( - # str(user.id), - # ) - - scopes = [] - - if is_ee(): - _project_memberships = await fetch_project_memberships_by_user_id( - user_id=str(user.id), - ) - - if not _project_memberships: - return JSONResponse( - status_code=404, - content={"message": "No scopes found."}, - ) - - for project_membership in _project_memberships: - credentials = await create_api_key( - user_id=str(user.id), - project_id=str(project_membership.project.id), - ) - - scope = LegacyScopesResponse( - organization_id=project_membership.project.organization.id, - organization_name=project_membership.project.organization.name, - workspace_id=project_membership.project.workspace.id, - workspace_name=project_membership.project.workspace.name, - project_id=project_membership.project.id, - project_name=project_membership.project.project_name, - is_demo=project_membership.is_demo, - user_role=project_membership.role, - credentials=f"ApiKey {credentials}", - ) - - scopes.append(scope) - else: - credentials = await create_api_key( - user_id=str(user.id), - project_id=str(project_db.id), - ) - - scope = LegacyScopesResponse( - organization_id=organization_db.id, - organization_name=organization_db.name, - workspace_id=workspace_db.id, - workspace_name=workspace_db.name, - project_id=project_db.id, - project_name=project_db.project_name, - is_demo=False, # Default to False, adjust if needed - user_role="owner", # Default to owner, adjust if needed - credentials=f"ApiKey {credentials}", - ) - - scopes = [scope] - - account = AccountResponse( - user=user, - scopes=scopes, - ) - - return account - - except: # pylint: disable=bare-except - print_exc() - - return JSONResponse( - status_code=404, - content="Could not create account.", - ) diff --git a/api/oss/src/routers/app_router.py b/api/oss/src/routers/app_router.py index 52e724ee83..f1075db719 100644 --- a/api/oss/src/routers/app_router.py +++ b/api/oss/src/routers/app_router.py @@ -5,7 +5,7 @@ from fastapi import HTTPException, Request from oss.src.utils.logging import get_module_logger -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache +from oss.src.utils.caching import get_cache, set_cache from oss.src.models import converters from oss.src.utils.common import APIRouter, is_ee @@ -13,9 +13,8 @@ from oss.src.models.api.api_models import ( App, UpdateApp, - CreateAppOutput, - ReadAppOutput, UpdateAppOutput, + CreateAppOutput, AddVariantFromURLPayload, AddVariantFromKeyPayload, ) @@ -27,7 +26,7 @@ from ee.src.utils.permissions import ( check_action_access, check_rbac_permission, - # check_apikey_action_access, + check_apikey_action_access, ) from ee.src.models.shared_models import Permission from ee.src.models.api.api_models import ( @@ -85,6 +84,7 @@ async def list_app_variants( app_variants = await get_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_app_variants", key=cache_key, model=AppVariantResponse, @@ -98,7 +98,7 @@ async def list_app_variants( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -116,9 +116,11 @@ async def list_app_variants( await set_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_app_variants", key=cache_key, value=app_variants, + ttl=0.05, # seconds ) return app_variants @@ -156,7 +158,7 @@ async def get_variant_by_env( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app.project_id), - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -200,6 +202,15 @@ async def create_app( """ if is_ee(): + api_key_from_headers = request.headers.get("Authorization", None) + if api_key_from_headers is not None: + api_key = api_key_from_headers.split(" ")[-1] # ["ApiKey", "xxxxx.xxxxxx"] + await check_apikey_action_access( + api_key, + request.state.user_id, + Permission.CREATE_APPLICATION, + ) + try: user_org_workspace_data = await get_user_org_and_workspace_id( request.state.user_id @@ -213,7 +224,7 @@ async def create_app( has_permission = await check_rbac_permission( user_org_workspace_data=user_org_workspace_data, project_id=request.state.project_id, - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.CREATE_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -224,7 +235,7 @@ async def create_app( except Exception as e: raise HTTPException(status_code=500, detail=str(e)) - if await db_manager.get_app_type(payload.template_key) == AppType.CUSTOM: + if db_manager.get_app_type(payload.template_key) == AppType.CUSTOM: check, _, _ = await check_entitlements( organization_id=request.state.organization_id, key=Flag.HOOKS, @@ -254,64 +265,7 @@ async def create_app( detail="App with the same name already exists", ) - await invalidate_cache( - project_id=request.state.project_id, - ) - - return CreateAppOutput( - app_id=str(app_db.id), - app_name=str(app_db.app_name), - app_type=AppType.friendly_tag(app_db.app_type), - created_at=str(app_db.created_at), - updated_at=str(app_db.updated_at), - ) - - -@router.get("/{app_id}/", response_model=ReadAppOutput, operation_id="read_app") -async def read_app( - request: Request, - app_id: str, -) -> ReadAppOutput: - """ - Retrieve an app by its ID. - - Args: - app_id (str): The ID of the app to retrieve. - - Returns: - ReadAppOutput: The output containing the app's ID and name. - - Raises: - HTTPException: If there is an error retrieving the app or the user does not have permission to access the app. - """ - - try: - app = await db_manager.fetch_app_by_id(app_id) - except db_manager.NoResultFound: - raise HTTPException( - status_code=404, detail=f"No application with ID '{app_id}' found" - ) - - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(app.project_id), - permission=Permission.VIEW_APPLICATIONS, - ) - if not has_permission: - error_msg = "You do not have access to perform this action. Please contact your organization admin." - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - return ReadAppOutput( - app_id=str(app.id), - app_name=str(app.app_name), - app_type=AppType.friendly_tag(app.app_type), - created_at=str(app.created_at), - updated_at=str(app.updated_at), - ) + return CreateAppOutput(app_id=str(app_db.id), app_name=str(app_db.app_name)) @router.patch("/{app_id}/", response_model=UpdateAppOutput, operation_id="update_app") @@ -345,7 +299,7 @@ async def update_app( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app.project_id), - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.EDIT_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -354,20 +308,7 @@ async def update_app( status_code=403, ) await db_manager.update_app(app_id=app_id, values_to_update=payload.model_dump()) - - app = await db_manager.fetch_app_by_id(app_id) - - await invalidate_cache( - project_id=request.state.project_id, - ) - - return UpdateAppOutput( - app_id=str(app.id), - app_name=str(app.app_name), - app_type=AppType.friendly_tag(app.app_type), - created_at=str(app.created_at), - updated_at=str(app.updated_at), - ) + return UpdateAppOutput(app_id=app_id, app_name=payload.app_name) @router.get("/", response_model=List[App], operation_id="list_apps") @@ -393,7 +334,7 @@ async def list_apps( has_permission = await check_rbac_permission( # type: ignore user_org_workspace_data=user_org_workspace_data, project_id=request.state.project_id, - permission=Permission.VIEW_APPLICATIONS, # type: ignore + permission=Permission.VIEW_APPLICATION, # type: ignore ) if not has_permission: raise HTTPException( @@ -439,7 +380,7 @@ async def add_variant_from_url( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app.project_id), - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.CREATE_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -467,14 +408,10 @@ async def add_variant_from_url( app_variant_db, ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return app_variant_dto except Exception as e: - log.error(f"An error occurred: {str(e)}") + log.exception(f"An error occurred: {str(e)}") raise HTTPException(status_code=500, detail=str(e)) @@ -506,11 +443,11 @@ async def add_variant_from_key_route( url = app_manager.get_service_url_from_template_key(payload.key) except NotImplementedError as e: - log.error(f"An error occurred: {str(e)}") + log.exception(f"An error occurred: {str(e)}") raise HTTPException(status_code=500, detail=str(e)) except Exception as e: - log.error(f"An error occurred: {str(e)}") + log.exception(f"An error occurred: {str(e)}") raise HTTPException(status_code=500, detail=str(e)) if not url: @@ -549,7 +486,7 @@ async def remove_app( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app.project_id), - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.DELETE_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -566,10 +503,6 @@ async def remove_app( await app_manager.remove_app(app) - await invalidate_cache( - project_id=request.state.project_id, - ) - @router.get( "/{app_id}/environments/", @@ -596,6 +529,7 @@ async def list_environments( environments = await get_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_environments", key=cache_key, model=EnvironmentOutput, @@ -609,7 +543,7 @@ async def list_environments( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." @@ -632,9 +566,11 @@ async def list_environments( await set_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="list_environments", key=cache_key, value=environments, + ttl=0.05, # seconds ) return environments @@ -654,7 +590,7 @@ async def list_app_environment_revisions( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = "You do not have access to perform this action. Please contact your organization admin." diff --git a/api/oss/src/routers/bases_router.py b/api/oss/src/routers/bases_router.py index 078e66a637..2d6cbdeb9b 100644 --- a/api/oss/src/routers/bases_router.py +++ b/api/oss/src/routers/bases_router.py @@ -46,7 +46,7 @@ async def list_bases( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app.project_i), - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." diff --git a/api/oss/src/routers/environment_router.py b/api/oss/src/routers/environment_router.py index c8d10699ef..7f65b1f976 100644 --- a/api/oss/src/routers/environment_router.py +++ b/api/oss/src/routers/environment_router.py @@ -4,7 +4,6 @@ from oss.src.utils.logging import get_module_logger from oss.src.services import db_manager, app_manager from oss.src.utils.common import APIRouter, is_ee -from oss.src.utils.caching import invalidate_cache from oss.src.models.api.api_models import DeployToEnvironmentPayload if is_ee(): @@ -62,7 +61,3 @@ async def deploy_to_environment( object_type="variant", project_id=str(variant.project_id), ) - - await invalidate_cache( - project_id=request.state.project_id, - ) diff --git a/api/oss/src/routers/evaluation_router.py b/api/oss/src/routers/evaluation_router.py deleted file mode 100644 index cac2b06523..0000000000 --- a/api/oss/src/routers/evaluation_router.py +++ /dev/null @@ -1,518 +0,0 @@ -from typing import Any, List -import random - -from fastapi.responses import JSONResponse -from fastapi import HTTPException, Request, status, Response, Query - -from oss.src.utils.logging import get_module_logger -from oss.src.utils.caching import get_cache, set_cache - -from oss.src.services import converters -from oss.src.services import evaluation_service - -from oss.src.tasks.evaluations.legacy import ( - setup_evaluation, - annotate, -) -from oss.src.utils.common import APIRouter, is_ee -from oss.src.models.api.evaluation_model import ( - Evaluation, - EvaluationScenario, - NewEvaluation, - DeleteEvaluation, -) -from oss.src.services import app_manager, db_manager - -if is_ee(): - from ee.src.models.shared_models import Permission - from ee.src.utils.permissions import check_action_access - from ee.src.utils.entitlements import ( - check_entitlements, - Tracker, - Counter, - NOT_ENTITLED_RESPONSE, - ) - -from oss.src.routers.testset_router import _validate_testset_limits - - -from oss.src.apis.fastapi.evaluations.models import EvaluationRunsResponse - - -router = APIRouter() - - -log = get_module_logger(__name__) - - -@router.get( - "/by_resource/", - response_model=List[str], -) -async def fetch_evaluation_ids( - resource_type: str, - request: Request, - resource_ids: List[str] = Query(None), -): - """Fetches evaluation ids for a given resource type and id. - - Arguments: - app_id (str): The ID of the app for which to fetch evaluations. - resource_type (str): The type of resource for which to fetch evaluations. - resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. - - Raises: - HTTPException: If the resource_type is invalid or access is denied. - - Returns: - List[str]: A list of evaluation ids. - """ - - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - evaluations = await db_manager.fetch_evaluations_by_resource( - resource_type, - request.state.project_id, - resource_ids, - ) - return list(map(lambda x: str(x.id), evaluations)) - - -@router.get( - "/{evaluation_id}/status/", - operation_id="fetch_evaluation_status", -) -async def fetch_evaluation_status( - evaluation_id: str, - request: Request, -): - """Fetches the status of the evaluation. - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - (str): the evaluation status - """ - - cache_key = { - "evaluation_id": evaluation_id, - } - - evaluation_status = await get_cache( - project_id=request.state.project_id, - namespace="fetch_evaluation_status", - key=cache_key, - retry=False, - ) - - if evaluation_status is not None: - return {"status": evaluation_status} - - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=request.state.project_id, - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - evaluation_status = await db_manager.fetch_evaluation_status_by_id( - project_id=request.state.project_id, - evaluation_id=evaluation_id, - ) - - await set_cache( - project_id=request.state.project_id, - namespace="fetch_evaluation_status", - key=cache_key, - value=evaluation_status, - ttl=15, # 15 seconds - ) - - return {"status": evaluation_status} - - -@router.get( - "/{evaluation_id}/results/", - operation_id="fetch_legacy_evaluation_results", -) -async def fetch_evaluation_results( - evaluation_id: str, - request: Request, -): - """Fetches the results of the evaluation - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - _type_: _description_ - """ - - evaluation = await db_manager.fetch_evaluation_by_id( - project_id=request.state.project_id, - evaluation_id=evaluation_id, - ) - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(evaluation.project_id), - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - results = converters.aggregated_result_of_evaluation_to_pydantic( - evaluation.aggregated_results # type: ignore - ) - return {"results": results, "evaluation_id": evaluation_id} - - -@router.get( - "/{evaluation_id}/evaluation_scenarios/", - response_model=List[EvaluationScenario], - operation_id="fetch_legacy_evaluation_scenarios", -) -async def fetch_evaluation_scenarios( - evaluation_id: str, - request: Request, -): - """Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - """ - - evaluation = await db_manager.fetch_evaluation_by_id( - project_id=request.state.project_id, - evaluation_id=evaluation_id, - ) - if not evaluation: - raise HTTPException( - status_code=404, detail=f"Evaluation with id {evaluation_id} not found" - ) - - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(evaluation.project_id), - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - eval_scenarios = await evaluation_service.fetch_evaluation_scenarios_for_evaluation( - evaluation_id=str(evaluation.id), project_id=str(evaluation.project_id) - ) - return eval_scenarios - - -@router.get( - "/", - response_model=List[Evaluation], - operation_id="fetch_legacy_evaluations", -) -async def fetch_list_evaluations( - app_id: str, - request: Request, -): - """Fetches a list of evaluations, optionally filtered by an app ID. - - Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - - Returns: - List[Evaluation]: A list of evaluations. - """ - - app = await db_manager.fetch_app_by_id(app_id) - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(app.project_id), - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - return await evaluation_service.fetch_list_evaluations(app, str(app.project_id)) - - -@router.get( - "/{evaluation_id}/", - response_model=Evaluation, - operation_id="fetch_legacy_evaluation", -) -async def fetch_evaluation( - evaluation_id: str, - request: Request, -): - """Fetches a single evaluation based on its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - Evaluation: The fetched evaluation. - """ - - evaluation = await db_manager.fetch_evaluation_by_id( - project_id=request.state.project_id, - evaluation_id=evaluation_id, - ) - if not evaluation: - raise HTTPException( - status_code=404, detail=f"Evaluation with id {evaluation_id} not found" - ) - - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(evaluation.project_id), - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - return await converters.evaluation_db_to_pydantic(evaluation) - - -@router.delete( - "/", - response_model=List[str], - operation_id="delete_legacy_evaluations", -) -async def delete_evaluations( - payload: DeleteEvaluation, - request: Request, -): - """ - Delete specific comparison tables based on their unique IDs. - - Args: - delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. - - Returns: - A list of the deleted comparison tables' IDs. - """ - - evaluation = await db_manager.fetch_evaluation_by_id( - project_id=request.state.project_id, - evaluation_id=payload.evaluations_ids[0], - ) - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(evaluation.project_id), - permission=Permission.DELETE_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - # Update last_modified_by app information - await app_manager.update_last_modified_by( - user_uid=request.state.user_id, - object_id=random.choice(payload.evaluations_ids), - object_type="evaluation", - project_id=str(evaluation.project_id), - ) - - await evaluation_service.delete_evaluations(payload.evaluations_ids) - return Response(status_code=status.HTTP_204_NO_CONTENT) - - -@router.get( - "/evaluation_scenarios/comparison-results/", - response_model=Any, - operation_id="fetch_legacy_evaluation_scenarios_comparison_results", -) -async def fetch_evaluation_scenarios_comparison_results( - evaluations_ids: str, - request: Request, -): - """Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - """ - - evaluations_ids_list = evaluations_ids.split(",") - evaluation = await db_manager.fetch_evaluation_by_id( - project_id=request.state.project_id, - evaluation_id=evaluations_ids_list[0], - ) - if is_ee(): - has_permission = await check_action_access( - user_uid=request.state.user_id, - project_id=str(evaluation.project_id), - permission=Permission.VIEW_EVALUATION, - ) - if not has_permission: - error_msg = f"You do not have permission to perform this action. Please contact your organization admin." - log.error(error_msg) - return JSONResponse( - {"detail": error_msg}, - status_code=403, - ) - - eval_scenarios = await evaluation_service.compare_evaluations_scenarios( - evaluations_ids_list, str(evaluation.project_id) - ) - - return eval_scenarios - - -@router.post( - "/preview/start", - response_model=EvaluationRunsResponse, - operation_id="start_evaluation", -) -async def start_evaluation( - request: Request, - payload: NewEvaluation, -) -> EvaluationRunsResponse: - try: - if is_ee(): - # Permissions Check ------------------------------------------------ - check = await check_action_access( - project_id=request.state.project_id, - user_uid=request.state.user_id, - permission=Permission.CREATE_EVALUATION, - ) - if not check: - raise HTTPException( - status_code=403, - detail="You do not have permission to perform this action. Please contact your organization admin.", - ) - # ------------------------------------------------------------------ - - # Entitlements Check ----------------------------------------------- - check, _, _ = await check_entitlements( - organization_id=request.state.organization_id, - key=Counter.EVALUATIONS, - delta=1, - ) - - if not check: - return NOT_ENTITLED_RESPONSE(Tracker.COUNTERS) - # ------------------------------------------------------------------ - - # Input Validation ----------------------------------------------------- - nof_runs = len(payload.revisions_ids) - - if nof_runs == 0: - raise HTTPException( - status_code=400, - detail="No revisions provided for evaluation. Please provide at least one revision.", - ) - # ---------------------------------------------------------------------- - - # Evaluation Run Execution --------------------------------------------- - runs = [] - - for i in range(nof_runs): - run = await setup_evaluation( - project_id=request.state.project_id, - user_id=request.state.user_id, - # - name=payload.name, - # - testset_id=payload.testset_id, - # - revision_id=payload.revisions_ids[i], - # - autoeval_ids=payload.evaluators_configs, - ) - - if not run: - continue - - runs.append(run) - - annotate.delay( - project_id=request.state.project_id, - user_id=request.state.user_id, - # - run_id=run.id, - # - testset_id=payload.testset_id, - # - revision_id=payload.revisions_ids[i], - # - autoeval_ids=payload.evaluators_configs, - # - run_config=payload.rate_limit.model_dump(mode="json"), - ) - # ---------------------------------------------------------------------- - - runs_response = EvaluationRunsResponse( - count=len(runs), - runs=runs, - ) - - return runs_response - - except KeyError as e: - log.error(e, exc_info=True) - - raise HTTPException( - status_code=400, - detail="Columns in the testset should match the names of the inputs in the variant", - ) from e diff --git a/api/oss/src/routers/evaluators_router.py b/api/oss/src/routers/evaluators_router.py index 0095a37e4d..f83525d8de 100644 --- a/api/oss/src/routers/evaluators_router.py +++ b/api/oss/src/routers/evaluators_router.py @@ -1,4 +1,4 @@ -from typing import List, Optional +from typing import List from fastapi import HTTPException, Request from fastapi.responses import JSONResponse @@ -11,7 +11,7 @@ ) from oss.src.models.api.evaluation_model import ( - LegacyEvaluator, + Evaluator, EvaluatorConfig, NewEvaluatorConfig, UpdateEvaluatorConfig, @@ -31,7 +31,7 @@ log = get_module_logger(__name__) -@router.get("/", response_model=List[LegacyEvaluator]) +@router.get("/", response_model=List[Evaluator]) async def get_evaluators_endpoint(): """ Endpoint to fetch a list of evaluators. @@ -83,27 +83,21 @@ async def evaluator_run( """ providers_keys_from_vault = await get_llm_providers_secrets( - project_id=request.state.project_id + provider_id=request.state.project_id ) payload.credentials = providers_keys_from_vault - try: - result = await evaluators_service.run( - evaluator_key=evaluator_key, - evaluator_input=payload, - ) - except Exception as e: - log.warning(f"Error with evaluator /run", exc_info=True) - raise HTTPException(status_code=424 if "401" in str(e) else 500, detail=str(e)) - + result = await evaluators_service.run( + evaluator_key=evaluator_key, evaluator_input=payload + ) return result @router.get("/configs/", response_model=List[EvaluatorConfig]) async def get_evaluator_configs( + app_id: str, request: Request, - app_id: Optional[str] = None, ): """Endpoint to fetch evaluator configurations for a specific app. @@ -113,33 +107,25 @@ async def get_evaluator_configs( Returns: List[EvaluatorConfigDB]: A list of evaluator configuration objects. """ - project_id: Optional[str] = None - if app_id: - app_db = await db_manager.fetch_app_by_id(app_id=app_id) - project_id = str(app_db.project_id) - else: - project_id = getattr(request.state, "project_id", None) - if project_id is None: - raise HTTPException(status_code=400, detail="project_id is required") + app_db = await db_manager.fetch_app_by_id(app_id=app_id) if is_ee(): has_permission = await check_action_access( user_uid=request.state.user_id, - project_id=project_id, + project_id=str(app_db.project_id), permission=Permission.VIEW_EVALUATION, ) if not has_permission: - error_msg = ( - "You do not have permission to perform this action. " - "Please contact your organization admin." - ) + error_msg = f"You do not have permission to perform this action. Please contact your organization admin." log.error(error_msg) return JSONResponse( {"detail": error_msg}, status_code=403, ) - evaluators_configs = await evaluator_manager.get_evaluators_configs(project_id) + evaluators_configs = await evaluator_manager.get_evaluators_configs( + str(app_db.project_id) + ) return evaluators_configs @@ -189,10 +175,14 @@ async def create_new_evaluator_config( EvaluatorConfigDB: Evaluator configuration api model. """ + app_db = await db_manager.get_app_instance_by_id( + project_id=request.state.project_id, + app_id=payload.app_id, + ) if is_ee(): has_permission = await check_action_access( user_uid=request.state.user_id, - project_id=request.state.project_id, + project_id=str(app_db.project_id), permission=Permission.CREATE_EVALUATION, ) if not has_permission: @@ -204,7 +194,8 @@ async def create_new_evaluator_config( ) evaluator_config = await evaluator_manager.create_evaluator_config( - project_id=request.state.project_id, + project_id=str(app_db.project_id), + app_name=app_db.app_name, name=payload.name, evaluator_key=payload.evaluator_key, settings_values=payload.settings_values, diff --git a/api/oss/src/routers/organization_router.py b/api/oss/src/routers/organization_router.py index 16e9593fcc..348374ee6e 100644 --- a/api/oss/src/routers/organization_router.py +++ b/api/oss/src/routers/organization_router.py @@ -85,12 +85,12 @@ async def list_organizations( @router.get( - "/{organization_id}/", + "/{org_id}/", operation_id="fetch_organization_details", response_model=OrganizationDetails, ) async def fetch_organization_details( - organization_id: str, + org_id: str, request: Request, ): """Return the details of the organization.""" @@ -100,15 +100,11 @@ async def fetch_organization_details( if not active_workspace: return {} - organization_owner = await db_manager.get_organization_owner( - organization_id=organization_id - ) + organization_owner = await db_manager.get_organization_owner(organization_id=org_id) project_invitations = await db_manager.get_project_invitations( project_id=request.state.project_id ) - organization_db = await db_manager.get_organization_by_id( - organization_id=organization_id - ) + organization_db = await db_manager.get_organization_by_id(organization_id=org_id) invited_members = [ { @@ -168,11 +164,11 @@ async def fetch_organization_details( @router.post( - "/{organization_id}/workspaces/{workspace_id}/invite/", + "/{org_id}/workspaces/{workspace_id}/invite/", operation_id="invite_user_to_workspace", ) async def invite_user_to_organization( - organization_id: str, + org_id: str, payload: List[InviteRequest], workspace_id: str, request: Request, @@ -181,7 +177,7 @@ async def invite_user_to_organization( Assigns a role to a user in an organization. Args: - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. payload (InviteRequest): The payload containing the organization id, user email, and role to assign. workspace_id (str): The ID of the workspace. @@ -217,24 +213,18 @@ async def invite_user_to_organization( }, ) - owner = await db_manager.get_organization_owner(organization_id) - owner_domain = owner.email.split("@")[-1].lower() if owner else "" - user_domain = payload[0].email.split("@")[-1].lower() - skip_meter = owner_domain != "agenta.ai" and user_domain == "agenta.ai" - - if not skip_meter: - check, _, _ = await check_entitlements( - organization_id=request.state.organization_id, - key=Gauge.USERS, - delta=1, - ) + check, _, _ = await check_entitlements( + organization_id=request.state.organization_id, + key=Gauge.USERS, + delta=1, + ) - if not check: - return NOT_ENTITLED_RESPONSE(Tracker.GAUGES) + if not check: + return NOT_ENTITLED_RESPONSE(Tracker.GAUGES) invite_user = await workspace_manager.invite_user_to_workspace( payload=payload, - organization_id=organization_id, + org_id=org_id, project_id=str(project.id), workspace_id=workspace_id, user_uid=request.state.user_id, @@ -250,11 +240,11 @@ async def invite_user_to_organization( @router.post( - "/{organization_id}/workspaces/{workspace_id}/invite/resend/", + "/{org_id}/workspaces/{workspace_id}/invite/resend/", operation_id="resend_invitation", ) async def resend_user_invitation_to_organization( - organization_id: str, + org_id: str, workspace_id: str, payload: ResendInviteRequest, request: Request, @@ -291,7 +281,7 @@ async def resend_user_invitation_to_organization( invite_user = await workspace_manager.resend_user_workspace_invite( payload=payload, project_id=request.state.project_id, - organization_id=organization_id, + org_id=org_id, workspace_id=workspace_id, user_uid=request.state.user_id, ) @@ -302,15 +292,16 @@ async def resend_user_invitation_to_organization( project_id=request.state.project_id, user_id=request.state.user_id, ) + return invite_user @router.post( - "/{organization_id}/workspaces/{workspace_id}/invite/accept/", + "/{org_id}/workspaces/{workspace_id}/invite/accept/", operation_id="accept_invitation", ) async def accept_organization_invitation( - organization_id: str, + org_id: str, workspace_id: str, project_id: str, payload: InviteToken, @@ -330,7 +321,7 @@ async def accept_organization_invitation( if is_ee(): workspace = await workspace_manager.get_workspace(workspace_id) - organization = await db_manager_ee.get_organization(organization_id) + organization = await db_manager_ee.get_organization(org_id) user = await db_manager.get_user(request.state.user_id) accept_invitation = await workspace_manager.accept_workspace_invitation( @@ -347,7 +338,8 @@ async def accept_organization_invitation( else: await organization_service.accept_organization_invitation( token=payload.token, - organization_id=organization_id, + organization_id=org_id, email=payload.email, ) + return JSONResponse({"message": "Added user to workspace"}, status_code=200) diff --git a/api/oss/src/routers/permissions_router.py b/api/oss/src/routers/permissions_router.py index 7c1be922fe..8e396f62f0 100644 --- a/api/oss/src/routers/permissions_router.py +++ b/api/oss/src/routers/permissions_router.py @@ -99,6 +99,7 @@ async def verify_permissions( namespace="verify_permissions", key=cache_key, value="deny", + ttl=5 * 60, # seconds ) raise Deny() @@ -118,6 +119,7 @@ async def verify_permissions( namespace="verify_permissions", key=cache_key, value="deny", + ttl=5 * 60, # seconds ) raise Deny() @@ -134,6 +136,7 @@ async def verify_permissions( namespace="verify_permissions", key=cache_key, value="deny", + ttl=5 * 60, # seconds ) raise Deny() @@ -143,6 +146,7 @@ async def verify_permissions( namespace="verify_permissions", key=cache_key, value="allow", + ttl=5 * 60, # seconds ) return Allow(request.state.credentials) @@ -154,6 +158,7 @@ async def verify_permissions( namespace="verify_permissions", key=cache_key, value="deny", + ttl=5 * 60, # seconds ) raise Deny() from exc diff --git a/api/oss/src/routers/projects_router.py b/api/oss/src/routers/projects_router.py index 20a8d9fe57..ae88d3562d 100644 --- a/api/oss/src/routers/projects_router.py +++ b/api/oss/src/routers/projects_router.py @@ -42,7 +42,6 @@ class ProjectsResponse(BaseModel): ) async def get_projects( request: Request, - scope: Optional[str] = Query(None), ): try: if is_oss(): @@ -50,39 +49,10 @@ async def get_projects( project_id=request.state.project_id ) - if not _project: - raise HTTPException(status_code=404, detail="Project not found") - - _workspace = await db_manager.fetch_workspace_by_id( - workspace_id=str(_project.workspace_id) - ) - - if not _workspace: - raise HTTPException(status_code=404, detail="Workspace not found") - - _organization = await db_manager.fetch_organization_by_id( - organization_id=str(_workspace.organization_id) - ) - - if not _organization: - raise HTTPException(status_code=404, detail="Organization not found") - - user_role = ( - "owner" - if str(_organization.owner) == str(request.state.user_id) - else "editor" - ) - projects = [ ProjectsResponse( - organization_id=UUID(str(_organization.id)), - organization_name=str(_organization.name), - workspace_id=UUID(str(_workspace.id)), - workspace_name=str(_workspace.name), - project_id=UUID(str(_project.id)), - project_name=str(_project.project_name), - user_role=user_role, - is_demo=False, + project_id=_project.id, + project_name=_project.project_name, ) ] @@ -113,10 +83,6 @@ async def get_projects( is_demo=project_membership.is_demo, ) for project_membership in _project_memberships - if ( - scope is None - or str(project_membership.project.id) == request.state.project_id - ) ] return projects diff --git a/api/oss/src/routers/testset_router.py b/api/oss/src/routers/testset_router.py index 9a7d79e1dd..ddc9a856f5 100644 --- a/api/oss/src/routers/testset_router.py +++ b/api/oss/src/routers/testset_router.py @@ -1,7 +1,6 @@ import io import os import csv -import sys import json import requests from pathlib import Path @@ -10,19 +9,18 @@ from pydantic import ValidationError from fastapi.responses import JSONResponse -from fastapi import HTTPException, UploadFile, File, Form, Request, Query +from fastapi import HTTPException, UploadFile, File, Form, Request from oss.src.utils.logging import get_module_logger from oss.src.services import db_manager from oss.src.utils.common import APIRouter, is_ee from oss.src.models.converters import testset_db_to_pydantic -from oss.src.utils.common import is_uuid7 from oss.src.models.api.testset_model import ( NewTestset, DeleteTestsets, - TestsetSimpleResponse, - TestsetOutputResponse, + TestSetSimpleResponse, + TestSetOutputResponse, ) PARENT_DIRECTORY = Path(__file__).parent @@ -45,12 +43,9 @@ TESTSETS_COUNT_LIMIT = 10 * 1_000 # 10,000 testcases per testset TESTSETS_SIZE_LIMIT = 10 * 1024 * 1024 # 10 MB per testset -TESTSETS_FIELD_SIZE_LIMIT = 10 * 1024 * 1024 # 10 MB per CSV field -csv.field_size_limit(TESTSETS_FIELD_SIZE_LIMIT) - -TESTSETS_COUNT_WARNING = f"Testset exceeds the maximum count of {TESTSETS_COUNT_LIMIT} testcases per testset." -TESTSETS_SIZE_WARNING = f"Testset exceeds the maximum size of {TESTSETS_SIZE_LIMIT // (1024 * 1024)} MB per testset." +TESTSETS_COUNT_WARNING = f"Test set exceeds the maximum count of {TESTSETS_COUNT_LIMIT} test cases per test set." +TESTSETS_SIZE_WARNING = f"Test set exceeds the maximum size of {TESTSETS_SIZE_LIMIT // (1024 * 1024)} MB per test set." TESTSETS_SIZE_EXCEPTION = HTTPException( status_code=400, @@ -64,7 +59,6 @@ def _validate_testset_limits(rows: List[dict]) -> tuple[int, int]: - i = -1 total_size = 2 for i, row in enumerate(rows): row_str = json.dumps(row) @@ -81,7 +75,7 @@ def _validate_testset_limits(rows: List[dict]) -> tuple[int, int]: @router.post( - "/upload", response_model=TestsetSimpleResponse, operation_id="upload_file" + "/upload/", response_model=TestSetSimpleResponse, operation_id="upload_file" ) async def upload_file( request: Request, @@ -124,7 +118,7 @@ async def upload_file( "csvdata": [], } - if upload_type.upper() == "JSON": + if upload_type == "JSON": # Read and parse the JSON file json_data = await file.read() json_text = json_data.decode("utf-8") @@ -134,7 +128,7 @@ async def upload_file( for i, row in enumerate(json_object): document["csvdata"].append(row) - elif upload_type.upper() == "CSV" or upload_type is None: + else: # Read and parse the CSV file csv_data = await file.read() csv_text = csv_data.decode("utf-8") @@ -147,19 +141,14 @@ async def upload_file( for i, row in enumerate(csv_reader): document["csvdata"].append(row) - else: - log.error(f"Unsupported upload type: {upload_type}") - raise HTTPException(status_code=400, detail="Unsupported upload type") - _validate_testset_limits(document["csvdata"]) try: testset = await db_manager.create_testset( project_id=request.state.project_id, - # testset_data=document, ) - return TestsetSimpleResponse( + return TestSetSimpleResponse( id=str(testset.id), name=document["name"], created_at=str(testset.created_at), @@ -169,7 +158,7 @@ async def upload_file( @router.post( - "/endpoint", response_model=TestsetSimpleResponse, operation_id="import_testset" + "/endpoint/", response_model=TestSetSimpleResponse, operation_id="import_testset" ) async def import_testset( request: Request, @@ -231,7 +220,7 @@ async def import_testset( project_id=request.state.project_id, testset_data=document, ) - return TestsetSimpleResponse( + return TestSetSimpleResponse( id=str(testset.id), name=document["name"], created_at=str(testset.created_at), @@ -252,24 +241,20 @@ async def import_testset( ) from error -@router.post( - "/", response_model=TestsetSimpleResponse, operation_id="create_legacy_testset" -) +@router.post("/", response_model=TestSetSimpleResponse, operation_id="create_testset") async def create_testset( csvdata: NewTestset, request: Request, - # - testset_id: Optional[str] = None, ): """ Create a testset with given name, save the testset to Postgres. Args: - name (str): name of the testset. - testset (Dict[str, str]): testset data. + name (str): name of the test set. + testset (Dict[str, str]): test set data. Returns: - str: The id of the testset created. + str: The id of the test set created. """ if is_ee(): @@ -286,11 +271,6 @@ async def create_testset( status_code=403, ) - if testset_id is not None and not is_uuid7(testset_id): - raise HTTPException( - status_code=400, detail="Invalid testset_id format. Must be UUIDv7." - ) - _validate_testset_limits(csvdata.csvdata) testset_data = { @@ -299,20 +279,17 @@ async def create_testset( } testset_instance = await db_manager.create_testset( project_id=request.state.project_id, - # testset_data=testset_data, - # - testset_id=testset_id, ) if testset_instance is not None: - return TestsetSimpleResponse( + return TestSetSimpleResponse( id=str(testset_instance.id), name=testset_instance.name, # type: ignore created_at=str(testset_instance.created_at), ) -@router.put("/{testset_id}", operation_id="update_testset") +@router.put("/{testset_id}/", operation_id="update_testset") async def update_testset( testset_id: str, csvdata: NewTestset, @@ -322,18 +299,14 @@ async def update_testset( Update a testset with given id, update the testset in Postgres. Args: - testset_id (str): id of the testset to be updated. + testset_id (str): id of the test set to be updated. csvdata (NewTestset): New data to replace the old testset. Returns: - str: The id of the testset updated. + str: The id of the test set updated. """ - testset = await db_manager.fetch_testset_by_id( - project_id=request.state.project_id, - # - testset_id=testset_id, - ) + testset = await db_manager.fetch_testset_by_id(testset_id=testset_id) if testset is None: raise HTTPException(status_code=404, detail="testset not found") @@ -359,11 +332,7 @@ async def update_testset( "updated_at": datetime.now(timezone.utc), } await db_manager.update_testset( - project_id=request.state.project_id, - # - testset_id=str(testset.id), - # - values_to_update=testset_update, + testset_id=str(testset.id), values_to_update=testset_update ) return { "status": "success", @@ -375,9 +344,7 @@ async def update_testset( @router.get("/", operation_id="get_testsets") async def get_testsets( request: Request, - # - name: Optional[str] = Query(None), -) -> List[TestsetOutputResponse]: +) -> List[TestSetOutputResponse]: """ Get all testsets. @@ -387,6 +354,7 @@ async def get_testsets( Raises: - `HTTPException` with status code 404 if no testsets are found. """ + try: if is_ee(): has_permission = await check_action_access( @@ -408,11 +376,10 @@ async def get_testsets( testsets = await db_manager.fetch_testsets_by_project_id( project_id=request.state.project_id, - name=name, ) return [ - TestsetOutputResponse( + TestSetOutputResponse( _id=str(testset.id), # type: ignore name=testset.name, created_at=str(testset.created_at), @@ -422,7 +389,7 @@ async def get_testsets( ] except Exception as e: - log.error(f"An error occurred: {str(e)}") + log.exception(f"An error occurred: {str(e)}") raise HTTPException( status_code=500, @@ -430,7 +397,7 @@ async def get_testsets( ) -@router.get("/{testset_id}", operation_id="get_single_testset") +@router.get("/{testset_id}/", operation_id="get_single_testset") async def get_single_testset( testset_id: str, request: Request, @@ -446,21 +413,11 @@ async def get_single_testset( """ try: - testset = await db_manager.fetch_testset_by_id( - project_id=request.state.project_id, - # - testset_id=testset_id, - ) - except Exception as exc: - log.error(f"An error occurred: {str(exc)}", exc_info=True) - status_code = exc.status_code if hasattr(exc, "status_code") else 500 # type: ignore - raise HTTPException(status_code=status_code, detail=str(exc)) - - if testset is not None: + test_set = await db_manager.fetch_testset_by_id(testset_id=testset_id) if is_ee(): has_permission = await check_action_access( user_uid=request.state.user_id, - project_id=str(testset.project_id), + project_id=str(test_set.project_id), permission=Permission.VIEW_TESTSET, ) if not has_permission: @@ -470,10 +427,13 @@ async def get_single_testset( {"detail": error_msg}, status_code=403, ) - else: - raise HTTPException(status_code=404, detail="testset not found") - return testset_db_to_pydantic(testset) + if test_set is None: + raise HTTPException(status_code=404, detail="testset not found") + return testset_db_to_pydantic(test_set) + except Exception as exc: + status_code = exc.status_code if hasattr(exc, "status_code") else 500 # type: ignore + raise HTTPException(status_code=status_code, detail=str(exc)) @router.delete("/", response_model=List[str], operation_id="delete_testsets") @@ -493,11 +453,7 @@ async def delete_testsets( if is_ee(): for testset_id in payload.testset_ids: - testset = await db_manager.fetch_testset_by_id( - project_id=request.state.project_id, - # - testset_id=testset_id, - ) + testset = await db_manager.fetch_testset_by_id(testset_id=testset_id) has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(testset.project_id), @@ -511,9 +467,5 @@ async def delete_testsets( status_code=403, ) - await db_manager.remove_testsets( - project_id=request.state.project_id, - # - testset_ids=payload.testset_ids, - ) + await db_manager.remove_testsets(testset_ids=payload.testset_ids) return payload.testset_ids diff --git a/api/oss/src/routers/user_profile.py b/api/oss/src/routers/user_profile.py index 67a66f21ae..22a13dd660 100644 --- a/api/oss/src/routers/user_profile.py +++ b/api/oss/src/routers/user_profile.py @@ -19,8 +19,6 @@ router = APIRouter() -admin_router = APIRouter() - @router.get("/", operation_id="fetch_user_profile") async def user_profile(request: Request): @@ -58,6 +56,7 @@ async def user_profile(request: Request): namespace="user_profile", key=cache_key, value=user, + ttl=5 * 60, # seconds ) return user @@ -83,13 +82,3 @@ async def reset_user_password(request: Request, user_id: str): admin_user_id=request.state.user_id, ) return user_password - - -@admin_router.post("/delete-all", operation_id="delete_accounts") -async def delete_accounts(): - if is_ee(): - return JSONResponse({"detail": "Not available in 'ee'."}, status_code=403) - - await db_manager.delete_accounts() - - return JSONResponse({"detail": "All accounts deleted."}, status_code=200) diff --git a/api/oss/src/routers/variants_router.py b/api/oss/src/routers/variants_router.py index 8edeef5d3c..b811a2e9f2 100644 --- a/api/oss/src/routers/variants_router.py +++ b/api/oss/src/routers/variants_router.py @@ -2,15 +2,13 @@ from uuid import UUID from fastapi.responses import JSONResponse -from fastapi import HTTPException, Request, status +from fastapi import HTTPException, Request, Body, status -from oss.src.utils.common import is_ee from oss.src.utils.logging import get_module_logger -from oss.src.utils.exceptions import intercept_exceptions -from oss.src.utils.caching import get_cache, set_cache, invalidate_cache +from oss.src.utils.caching import get_cache, set_cache from oss.src.models import converters -from oss.src.utils.common import APIRouter +from oss.src.utils.common import APIRouter, is_ee from oss.src.services import app_manager, db_manager if is_ee(): @@ -64,7 +62,7 @@ async def add_variant_from_base_and_config( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(base_db.project_id), - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.CREATE_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -102,10 +100,6 @@ async def add_variant_from_base_and_config( app_variant_db = await db_manager.get_app_variant_instance_by_id( str(db_app_variant.id), str(db_app_variant.project_id) ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return await converters.app_variant_db_to_output(app_variant_db) @@ -129,7 +123,7 @@ async def remove_variant( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(variant.project_id), - permission=Permission.EDIT_APPLICATIONS_VARIANT, + permission=Permission.DELETE_APPLICATION_VARIANT, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -148,19 +142,12 @@ async def remove_variant( ) await db_manager.mark_app_variant_as_hidden(app_variant_id=variant_id) - await invalidate_cache( - project_id=request.state.project_id, - ) except Exception as e: detail = f"Error while trying to remove the app variant: {str(e)}" raise HTTPException(status_code=500, detail=detail) -@router.put( - "/{variant_id}/parameters/", - operation_id="update_variant_parameters", - response_model=AppVariantRevision, -) +@router.put("/{variant_id}/parameters/", operation_id="update_variant_parameters") async def update_variant_parameters( request: Request, variant_id: str, @@ -211,21 +198,6 @@ async def update_variant_parameters( object_type="variant", project_id=str(variant_db.project_id), ) - await invalidate_cache( - project_id=request.state.project_id, - ) - - variant = await get_variant( - variant_id=variant_id, - request=request, - ) - - return await get_variant_revision( - variant_id=variant_id, - revision_number=variant.revision, # type: ignore - request=request, - ) - except ValueError as e: detail = f"Error while trying to update the app variant: {str(e)}" raise HTTPException(status_code=500, detail=detail) @@ -256,7 +228,7 @@ async def update_variant_url(request: Request, payload: UpdateVariantURLPayload) has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(db_app_variant.project_id), - permission=Permission.EDIT_APPLICATIONS, + permission=Permission.CREATE_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -281,9 +253,6 @@ async def update_variant_url(request: Request, payload: UpdateVariantURLPayload) object_type="app", project_id=str(db_app_variant.project_id), ) - await invalidate_cache( - project_id=request.state.project_id, - ) except ValueError as e: import traceback @@ -314,7 +283,7 @@ async def get_variant( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app_variant.project_id), - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -342,6 +311,7 @@ async def get_variant_revisions( app_variant_revisions = await get_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="get_variant_revisions", key=cache_key, model=AppVariantRevision, @@ -355,7 +325,7 @@ async def get_variant_revisions( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -375,9 +345,11 @@ async def get_variant_revisions( await set_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="get_variant_revisions", key=cache_key, value=app_variant_revisions, + ttl=0.05, # seconds ) return app_variant_revisions @@ -402,7 +374,7 @@ async def get_variant_revision( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(app_variant.project_id), - permission=Permission.VIEW_APPLICATIONS, + permission=Permission.VIEW_APPLICATION, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -449,7 +421,7 @@ async def remove_variant_revision( has_permission = await check_action_access( user_uid=request.state.user_id, project_id=str(variant.project_id), - permission=Permission.EDIT_APPLICATIONS_VARIANT, + permission=Permission.DELETE_APPLICATION_VARIANT, ) if not has_permission: error_msg = f"You do not have permission to perform this action. Please contact your organization admin." @@ -470,9 +442,6 @@ async def remove_variant_revision( await db_manager.mark_app_variant_revision_as_hidden( variant_revision_id=revision_id ) - await invalidate_cache( - project_id=request.state.project_id, - ) except Exception as e: detail = f"Error while trying to remove the app variant: {str(e)}" raise HTTPException(status_code=500, detail=detail) @@ -480,6 +449,7 @@ async def remove_variant_revision( ### --- CONFIGS --- ### +from oss.src.utils.exceptions import handle_exceptions from oss.src.services.variants_manager import ( BaseModel, ReferenceDTO, @@ -524,7 +494,7 @@ class ConfigResponseModel(ConfigDTO): operation_id="configs_add", response_model=ConfigResponseModel, ) -@intercept_exceptions() +@handle_exceptions() async def configs_add( request: Request, variant_ref: ReferenceRequestModel, @@ -555,10 +525,6 @@ async def configs_add( detail="Config not found.", ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return config @@ -567,7 +533,7 @@ async def configs_add( operation_id="configs_fetch", response_model=ConfigResponseModel, ) -@intercept_exceptions() +@handle_exceptions() async def configs_fetch( request: Request, variant_ref: Optional[ReferenceRequestModel] = None, @@ -599,6 +565,7 @@ async def configs_fetch( config = await get_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="configs_fetch", key=cache_key, model=ConfigDTO, @@ -636,9 +603,11 @@ async def configs_fetch( await set_cache( project_id=request.state.project_id, + user_id=request.state.user_id, namespace="configs_fetch", key=cache_key, value=config, + ttl=0.05, # seconds ) if not config: @@ -655,7 +624,7 @@ async def configs_fetch( operation_id="configs_fork", response_model=ConfigResponseModel, ) -@intercept_exceptions() +@handle_exceptions() async def configs_fork( request: Request, variant_ref: Optional[ReferenceRequestModel] = None, @@ -685,10 +654,6 @@ async def configs_fork( detail="Config not found.", ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return config @@ -697,7 +662,7 @@ async def configs_fork( operation_id="configs_commit", response_model=ConfigResponseModel, ) -@intercept_exceptions() +@handle_exceptions() async def configs_commit( request: Request, config: ConfigRequest, @@ -714,10 +679,6 @@ async def configs_commit( detail="Config not found.", ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return config @@ -726,7 +687,7 @@ async def configs_commit( operation_id="configs_deploy", response_model=ConfigResponseModel, ) -@intercept_exceptions() +@handle_exceptions() async def configs_deploy( request: Request, variant_ref: ReferenceRequestModel, @@ -747,10 +708,6 @@ async def configs_deploy( detail="Config not found.", ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return config @@ -759,7 +716,7 @@ async def configs_deploy( operation_id="configs_delete", response_model=int, ) -@intercept_exceptions() +@handle_exceptions() async def configs_delete( request: Request, variant_ref: ReferenceRequestModel, @@ -772,10 +729,6 @@ async def configs_delete( user_id=request.state.user_id, ) - await invalidate_cache( - project_id=request.state.project_id, - ) - return status.HTTP_204_NO_CONTENT @@ -784,7 +737,7 @@ async def configs_delete( operation_id="configs_list", response_model=List[ConfigResponseModel], ) -@intercept_exceptions() +@handle_exceptions() async def configs_list( request: Request, application_ref: ReferenceRequest, @@ -803,7 +756,7 @@ async def configs_list( operation_id="configs_history", response_model=List[ConfigResponseModel], ) -@intercept_exceptions() +@handle_exceptions() async def configs_history( request: Request, variant_ref: ReferenceRequestModel, diff --git a/api/oss/src/routers/workspace_router.py b/api/oss/src/routers/workspace_router.py index d608b1babc..1168df4722 100644 --- a/api/oss/src/routers/workspace_router.py +++ b/api/oss/src/routers/workspace_router.py @@ -128,17 +128,11 @@ async def remove_user_from_workspace( }, ) - owner = await db_manager.get_organization_owner(request.state.organization_id) - owner_domain = owner.email.split("@")[-1].lower() if owner else "" - user_domain = email.split("@")[-1].lower() - skip_meter = owner_domain != "agenta.ai" and user_domain == "agenta.ai" - - if not skip_meter: - await check_entitlements( - organization_id=request.state.organization_id, - key=Gauge.USERS, - delta=-1, - ) + check, _, _ = await check_entitlements( + organization_id=request.state.organization_id, + key=Gauge.USERS, + delta=-1, + ) delete_user_from_workspace = await workspace_manager.remove_user_from_workspace( workspace_id, email diff --git a/api/oss/src/services/admin_manager.py b/api/oss/src/services/admin_manager.py deleted file mode 100644 index 88a042b710..0000000000 --- a/api/oss/src/services/admin_manager.py +++ /dev/null @@ -1,400 +0,0 @@ -from typing import Optional, Literal, Any, Union -from uuid import UUID - -from pydantic import BaseModel - -import uuid_utils.compat as uuid - -from sqlalchemy.future import select -from sqlalchemy.ext.asyncio import AsyncSession - -from oss.src.utils.logging import get_module_logger -from oss.src.utils.common import is_ee - -from oss.src.dbs.postgres.shared.engine import engine -from oss.src.services import db_manager - -from oss.src.models.db_models import UserDB -from oss.src.services.api_key_service import create_api_key - - -if is_ee(): - from ee.src.models.db_models import ( - OrganizationDB, - WorkspaceDB, - ProjectDB, - ) -else: - from oss.src.models.db_models import ( - OrganizationDB, - WorkspaceDB, - ProjectDB, - ) - - -log = get_module_logger(__name__) - - -class CreateOrganization(BaseModel): - name: str - owner: str - description: Optional[str] = None - type: Optional[str] = None - - -class CreateWorkspace(BaseModel): - name: str - description: Optional[str] = None - type: Optional[str] = None - - -class Reference(BaseModel): - id: Optional[UUID] = None - slug: Optional[str] = None - - class Config: - json_encoders = {UUID: str} - - def encode(self, data: Any) -> Any: - if isinstance(data, dict): - return {k: self.encode(v) for k, v in data.items()} - elif isinstance(data, list): - return [self.encode(item) for item in data] - for type_, encoder in self.Config.json_encoders.items(): - if isinstance(data, type_): - return encoder(data) - return data - - def model_dump(self, *args, **kwargs) -> dict: - kwargs.setdefault("exclude_none", True) - - return self.encode(super().model_dump(*args, **kwargs)) - - -class UserRequest(BaseModel): - name: str - email: str - - -Tier = str - - -class OrganizationRequest(BaseModel): - name: str - description: str - is_paying: bool - - -class WorkspaceRequest(BaseModel): - name: str - description: str - is_default: bool - # - organization_ref: Reference - - -class ProjectRequest(BaseModel): - name: str - description: str - is_default: bool - # - workspace_ref: Reference - organization_ref: Reference - - -OrganizationRole = Literal[ - "owner", - "viewer", - "editor", - "evaluator", - "workspace_admin", - "deployment_manager", -] # update list - - -class OrganizationMembershipRequest(BaseModel): - role: OrganizationRole - is_demo: bool - # - user_ref: Reference - organization_ref: Reference - - -WorkspaceRole = Literal[ # update list - "owner", - "viewer", - "editor", - "evaluator", - "workspace_admin", - "deployment_manager", -] - - -class WorkspaceMembershipRequest(BaseModel): - role: WorkspaceRole - is_demo: bool - # - user_ref: Reference - workspace_ref: Reference - - -ProjectRole = Literal[ # update list - "owner", - "viewer", - "editor", - "evaluator", - "workspace_admin", - "deployment_manager", -] - - -class ProjectMembershipRequest(BaseModel): - role: ProjectRole - is_demo: bool - # - user_ref: Reference - project_ref: Reference - - -Credentials = str - - -async def legacy_create_organization( - payload: CreateOrganization, - user: UserDB, - return_org_wrk: bool = False, - return_org_wrk_prj: bool = False, -) -> Union[OrganizationDB, WorkspaceDB]: - async with engine.core_session() as session: - create_org_data = payload.model_dump(exclude_unset=True) - if "owner" not in create_org_data: - create_org_data["owner"] = str(user.id) - - # create organization - organization_db = OrganizationDB(**create_org_data) - - session.add(organization_db) - - await session.commit() - - # construct workspace payload - workspace_payload = CreateWorkspace( - name=payload.name, - type=payload.type if payload.type else "", - description=( - "Default Workspace" - if payload.type == "default" - else payload.description - if payload.description - else "" - ), - ) - - # create workspace - workspace, project = await legacy_create_workspace( - session, workspace_payload, organization_db, user - ) - - return organization_db, workspace, project - - -async def legacy_create_workspace( - session: AsyncSession, - payload: CreateWorkspace, - organization: OrganizationDB, - user: UserDB, -) -> WorkspaceDB: - workspace = WorkspaceDB( - name=payload.name, - type=payload.type if payload.type else "", - description=payload.description if payload.description else "", - organization_id=organization.id, - ) - - session.add(workspace) - - await session.commit() - - await session.refresh(workspace, attribute_names=["organization"]) - - project_db = await legacy_create_project( - project_name="Default Project", - organization_id=str(organization.id), - workspace_id=str(workspace.id), - session=session, - ) - - return workspace, project_db - - -async def legacy_create_project( - project_name: str, - workspace_id: str, - organization_id: str, - session: AsyncSession, -) -> WorkspaceDB: - project_db = ProjectDB( - project_name=project_name, - is_default=True, - organization_id=uuid.UUID(organization_id), - workspace_id=uuid.UUID(workspace_id), - ) - - session.add(project_db) - - await session.commit() - - return project_db - - -async def user_exists(user_email: str) -> bool: - user = await db_manager.get_user_with_email(email=user_email) - return False if not user else True - - -async def check_user( - request: UserRequest, -) -> Optional[UserRequest]: - async with engine.core_session() as session: - result = await session.execute( - select(UserDB).filter_by( - email=request.email, - ) - ) - - user_db = result.scalars().first() - - reference = Reference(id=user_db.id) if user_db else None - - return reference - - -async def create_user( - request: UserRequest, -) -> Reference: - async with engine.core_session() as session: - user_db = UserDB( - # id=uuid7() # use default - # - uid=str(uuid.uuid7()), - username=request.name, # rename to 'name' - email=request.email, - ) - - session.add(user_db) - - log.info( - "[scopes] user created", - user_id=user_db.id, - ) - - await session.commit() - - response = Reference(id=user_db.id) - - return response - - -async def create_organization( - request: OrganizationRequest, -) -> Reference: - async with engine.core_session() as session: - organization_db = OrganizationDB( - # id=uuid7() # use default - # - name=request.name, - description=request.description, - # - owner="", # move 'owner' from here to membership 'role' - # type=... # remove 'type' - ) - - if is_ee(): - organization_db.is_paying = request.is_paying - - session.add(organization_db) - - log.info( - "[scopes] organization created", - organization_id=organization_db.id, - ) - - await session.commit() - - response = Reference(id=organization_db.id) - - return response - - -async def create_workspace( - request: WorkspaceRequest, -) -> Reference: - async with engine.core_session() as session: - workspace_db = WorkspaceDB( - # id=uuid7() # use default - # - name=request.name, - description=request.description, - type=("default" if request.is_default else None), # rename to 'is_default' - # - organization_id=request.organization_ref.id, - ) - - session.add(workspace_db) - - log.info( - "[scopes] workspace created", - organization_id=workspace_db.organization_id, - workspace_id=workspace_db.id, - ) - - await session.commit() - - response = Reference(id=workspace_db.id) - - return response - - -async def create_project( - request: ProjectRequest, -) -> Reference: - async with engine.core_session() as session: - project_db = ProjectDB( - # id=uuid7() # use default - # - project_name=request.name, # rename to 'name' - # description=... # missing 'description' - is_default=request.is_default, - # - workspace_id=request.workspace_ref.id, - organization_id=request.organization_ref.id, - ) - - session.add(project_db) - - log.info( - "[scopes] project created", - organization_id=project_db.organization_id, - workspace_id=project_db.workspace_id, - project_id=project_db.id, - ) - - await session.commit() - - response = Reference(id=project_db.id) - - return response - - -async def create_credentials( - user_id: UUID, - project_id: UUID, -) -> Credentials: - apikey_token = await create_api_key( - user_id=str(user_id), - project_id=str(project_id), - ) - - credentials = f"ApiKey {apikey_token}" - - return credentials diff --git a/api/oss/src/services/aggregation_service.py b/api/oss/src/services/aggregation_service.py new file mode 100644 index 0000000000..453d8b5262 --- /dev/null +++ b/api/oss/src/services/aggregation_service.py @@ -0,0 +1,135 @@ +import re +import traceback +from typing import List, Optional + +from oss.src.models.shared_models import InvokationResult, Result, Error + + +def aggregate_ai_critique(results: List[Result]) -> Result: + """Aggregates the results for the ai critique evaluation. + + Args: + results (List[Result]): list of result objects + + Returns: + Result: aggregated result + """ + + try: + numeric_scores = [] + for result in results: + # Extract the first number found in the result value + match = re.search(r"\d+", result.value) + if match: + try: + score = int(match.group()) + numeric_scores.append(score) + except ValueError: + # Ignore if the extracted value is not an integer + continue + + # Calculate the average of numeric scores if any are present + average_value = ( + sum(numeric_scores) / len(numeric_scores) if numeric_scores else None + ) + return Result( + type="number", + value=average_value, + ) + except Exception as exc: + return Result( + type="error", + value=None, + error=Error(message=str(exc), stacktrace=str(traceback.format_exc())), + ) + + +def aggregate_binary(results: List[Result]) -> Result: + """Aggregates the results for the binary (auto regex) evaluation. + + Args: + results (List[Result]): list of result objects + + Returns: + Result: aggregated result + """ + + if all(isinstance(result.value, bool) for result in results): + average_value = sum(int(result.value) for result in results) / len(results) + else: + average_value = None + return Result(type="number", value=average_value) + + +def aggregate_float(results: List[Result]) -> Result: + """Aggregates the results for evaluations aside from auto regex and ai critique. + + Args: + results (List[Result]): list of result objects + + Returns: + Result: aggregated result + """ + + try: + average_value = sum(result.value for result in results) / len(results) + return Result(type="number", value=average_value) + except Exception as exc: + return Result( + type="error", + value=None, + error=Error(message=str(exc), stacktrace=str(traceback.format_exc())), + ) + + +def aggregate_float_from_llm_app_response( + invocation_results: List[InvokationResult], key: Optional[str] +) -> Result: + try: + if not key: + raise ValueError("Key is required to aggregate InvokationResult objects.") + + values = [ + getattr(inv_result, key) + for inv_result in invocation_results + if hasattr(inv_result, key) and getattr(inv_result, key) is not None + ] + + if not values: + raise ValueError(f"No valid values found for {key} aggregation.") + + average_value = sum(values) / len(values) + return Result(type=key, value=average_value) + except Exception as exc: + return Result( + type="error", + value=None, + error=Error(message=str(exc), stacktrace=str(traceback.format_exc())), + ) + + +def sum_float_from_llm_app_response( + invocation_results: List[InvokationResult], key: Optional[str] +) -> Result: + try: + if not key: + raise ValueError("Key is required to aggregate InvokationResult objects.") + + values = [ + getattr(inv_result, key) + for inv_result in invocation_results + if hasattr(inv_result, key) and getattr(inv_result, key) is not None + ] + + if not values: + raise ValueError(f"No valid values found for {key} sum aggregation.") + + total_value = sum(values) + + return Result(type=key, value=total_value) + except Exception as exc: + return Result( + type="error", + value=None, + error=Error(message=str(exc), stacktrace=str(traceback.format_exc())), + ) diff --git a/api/oss/src/services/analytics_service.py b/api/oss/src/services/analytics_service.py index 1903eed0ce..e82fc3d76a 100644 --- a/api/oss/src/services/analytics_service.py +++ b/api/oss/src/services/analytics_service.py @@ -1,14 +1,16 @@ +import os import re import traceback from datetime import datetime -from typing import Optional, Callable +from typing import Dict, Any, Optional, Callable, Awaitable +import asyncio import posthog from fastapi import Request from oss.src.utils.env import env +from oss.src.services import db_manager from oss.src.utils.logging import get_module_logger -from oss.src.utils.caching import set_cache, get_cache log = get_module_logger(__name__) @@ -32,135 +34,183 @@ LIMITED_EVENTS_PER_AUTH = { "app_revision_fetched": 3, "spans_created": 3, - "spans_fetched": 3, } +# Structure: {"YYYY-MM-DD": {user_id1: {"event_name:auth_method": count}, user_id2: {...}}} +_daily_event_auth_counts_by_user: Dict[str, Dict[str, Dict[str, int]]] = {} + if POSTHOG_API_KEY: posthog.api_key = POSTHOG_API_KEY posthog.host = POSTHOG_HOST - log.info("PostHog initialized with host %s", POSTHOG_HOST) + log.info("PostHog initialized with host %s:", POSTHOG_HOST) else: log.warn("PostHog API key not found in environment variables") +def run_background_with_timeout(coro: Awaitable, timeout: float = 5.0): + """ + Safely run a coroutine in the background with a timeout. + + Args: + coro (Awaitable): The coroutine to run. + timeout (float): Maximum allowed time in seconds. + """ + + async def wrapper(): + try: + await asyncio.wait_for(coro, timeout=timeout) + except asyncio.TimeoutError: + log.warn("❌ Background task timed out") + except Exception as e: + log.error("❌ Background task failed: %s", e) + + # Create and run the task + asyncio.create_task(wrapper()) + + +async def capture_event( + user_email: str, event_name: str, properties: Optional[Dict[str, Any]] = None +): + if not POSTHOG_API_KEY: + log.warn(f"PostHog API key not set, skipping capture_event: {event_name}") + return + + try: + posthog.capture( + distinct_id=user_email, event=event_name, properties=properties or {} + ) + except Exception as e: + log.error(f"❌ Error capturing event in PostHog: {e}") + + async def analytics_middleware(request: Request, call_next: Callable): response = await call_next(request) - try: path = request.url.path if any(re.match(pattern, path) for pattern in _EXCLUDED_PATHS): return response + if not hasattr(request.state, "user_id") or not request.state.user_id: + return response + event_name = _get_event_name_from_path(path, request.method) - if not event_name: + if event_name is None: return response - try: - # Determine authentication method - auth_header = ( - request.headers.get("Authorization") - or request.headers.get("authorization") - or "" - ) - if auth_header.startswith(_BEARER_TOKEN_PREFIX): - auth_method = "Bearer" - elif auth_header.startswith(_APIKEY_TOKEN_PREFIX): - auth_method = "ApiKey" - elif auth_header.startswith(_SECRET_TOKEN_PREFIX): - auth_method = "Secret" - elif request.cookies.get("sAccessToken"): - auth_method = "Session" - else: # We use API key without any prefix too. - auth_method = "ApiKey" - - # Build base properties - properties = { - "path": path, - "method": request.method, - "status_code": response.status_code, - "auth_method": auth_method, - } - - if hasattr(request.state, "project_id") and request.state.project_id: - properties["project_id"] = request.state.project_id - - if hasattr(request.state, "workspace_id") and request.state.workspace_id: - properties["workspace_id"] = request.state.workspace_id - - if ( - hasattr(request.state, "organization_id") - and request.state.organization_id - ): - properties["organization_id"] = request.state.organization_id - - if ( - hasattr(request.state, "organization_name") - and request.state.organization_name - ): - properties["organization_name"] = request.state.organization_name - - # Check daily limits if the event is one of those to be limited per auth method - if event_name in LIMITED_EVENTS_PER_AUTH: - # -------------------------------------------------------------- + run_background_with_timeout( + asyncio.create_task( + _track_analytics_event( + request=request, + path=path, + method=request.method, + status_code=response.status_code, + event_name=event_name, + ) + ), + timeout=5, + ) + + return response + + except Exception: + log.error("Analytics middleware error: %s", traceback.format_exc()) + return response + + +async def _track_analytics_event( + request: Request, path: str, method: str, status_code: int, event_name: str +): + try: + if not hasattr(request.state, "user_id") or not request.state.user_id: + return + + user = await db_manager.get_user_with_id(user_id=request.state.user_id) + if not user: + return + + # Determine authentication method + auth_header = ( + request.headers.get("Authorization") + or request.headers.get("authorization") + or "" + ) + if auth_header.startswith(_BEARER_TOKEN_PREFIX): + auth_method = "Bearer" + elif auth_header.startswith(_APIKEY_TOKEN_PREFIX): + auth_method = "ApiKey" + elif auth_header.startswith(_SECRET_TOKEN_PREFIX): + auth_method = "Secret" + elif request.cookies.get("sAccessToken"): + auth_method = "Session" + else: # We use API key without any prefix too. + auth_method = "ApiKey" + + # Check daily limits if the event is one of those to be limited per auth method + if event_name in LIMITED_EVENTS_PER_AUTH: + try: + global _daily_event_auth_counts_by_user today = datetime.now().strftime("%Y-%m-%d") - event_auth_key = f"{event_name}:{auth_method}" + user_id = request.state.user_id - # Create a combined key for event+auth method tracking - cache_key = { - "today": today, - "event_auth_key": event_auth_key, - } - - current_count = await get_cache( - project_id=request.state.project_id, - user_id=request.state.user_id, - namespace="posthog:analytics", - key=cache_key, - retry=False, - ) + # Clean up old tracking data to prevent memory growth + if today not in _daily_event_auth_counts_by_user: + # Keep only today's data (which is empty at this point) + _daily_event_auth_counts_by_user = {today: {}} - if current_count is None: - current_count = 0 + # Initialize user's tracking dictionary if not present + if not _daily_event_auth_counts_by_user[today].get(user_id): + _daily_event_auth_counts_by_user[today][user_id] = {} - # -------------------------------------------------------------- - current_count = int(current_count) + # Create a combined key for event+auth method tracking + event_auth_key = f"{event_name}:{auth_method}" limit = LIMITED_EVENTS_PER_AUTH[event_name] - if current_count >= limit: - return response - - await set_cache( - project_id=request.state.project_id, - user_id=request.state.user_id, - namespace="posthog:analytics", - key=cache_key, - value=current_count + 1, - ttl=24 * 60 * 60, # 24 hours - ) - # -------------------------------------------------------------- - distinct_id = None + # Check event+auth method limit + current_count = _daily_event_auth_counts_by_user[today][user_id].get( + event_auth_key, 0 + ) + if current_count >= limit: + return - try: - distinct_id = request.state.user_email - except: # pylint: disable=bare-except - pass - - if distinct_id and env.POSTHOG_API_KEY: - posthog.capture( - distinct_id=distinct_id, - event=event_name, - properties=properties or {}, + _daily_event_auth_counts_by_user[today][user_id][event_auth_key] = ( + current_count + 1 ) + except Exception as e: + log.error(f"Error in daily event limit tracking: {e}") + return - except Exception as e: - log.error(f"❌ Error capturing event in PostHog: {e}") + properties = { + "path": path, + "method": method, + "status_code": status_code, + } - return response + properties["auth_method"] = auth_method - except Exception: - log.error("Analytics middleware error: %s", traceback.format_exc()) - return response + if hasattr(request.state, "project_id") and request.state.project_id: + properties["project_id"] = request.state.project_id + try: + project = await db_manager.get_project_by_id(request.state.project_id) + if project: + properties["organization_id"] = str(project.organization_id) + properties["workspace_id"] = str(project.workspace_id) + organization = await db_manager.get_organization_by_id( + str(project.organization_id) + ) + if organization: + properties["organization_name"] = organization.name + except Exception as e: + log.error(f"Error getting project details: {e}") + + await capture_event( + user_email=user.email, event_name=event_name, properties=properties + ) + except Exception as e: + import traceback + + traceback.print_exc() + log.error(f"Error tracking analytics event: {e}") def _get_event_name_from_path( @@ -197,7 +247,7 @@ def _get_event_name_from_path( return "app_revision_fetched" # <----------- End of Configuration Events -------------> - # <----------- Testsets Events -------------> + # <----------- Test sets Events -------------> if method == "POST" and "/testsets" in path: return "testset_created" @@ -206,7 +256,7 @@ def _get_event_name_from_path( elif method == "PUT" and "/testsets" in path: return "testset_updated" - # <----------- End of Testsets Events -------------> + # <----------- End of Test sets Events -------------> # <----------- Evaluation Events -------------> if method == "POST" and "/evaluators/configs" in path: @@ -215,7 +265,11 @@ def _get_event_name_from_path( elif method == "PUT" and "/evaluators/configs/" in path: return "evaluator_updated" - elif method == "POST" and path == "/preview/evaluations/runs/": + elif ( + method == "POST" + and ("/evaluations" in path) + or ("evaluators" in path_parts and "run" in path_parts) + ): return "evaluation_created" elif method == "POST" and "/human-evaluations" in path: diff --git a/api/oss/src/services/api_key_service.py b/api/oss/src/services/api_key_service.py index d709d8f95d..ab7f628273 100644 --- a/api/oss/src/services/api_key_service.py +++ b/api/oss/src/services/api_key_service.py @@ -10,11 +10,10 @@ from sqlalchemy.future import select from sqlalchemy.exc import NoResultFound -from sqlalchemy.orm import joinedload from oss.src.utils.env import env +from oss.src.models.db_models import APIKeyDB from oss.src.utils.logging import get_module_logger -from oss.src.models.db_models import APIKeyDB, UserDB from oss.src.dbs.postgres.shared.engine import engine # from oss.src.utils.redis_utils import redis_connection @@ -119,11 +118,7 @@ async def is_valid_api_key(key: str): async with engine.core_session() as session: # Check if the API key is valid (not blacklisted and not expired) - result = await session.execute( - select(APIKeyDB) - .options(joinedload(APIKeyDB.user).load_only(UserDB.id, UserDB.email)) - .filter_by(hashed_key=key) - ) + result = await session.execute(select(APIKeyDB).filter_by(hashed_key=key)) api_key = result.scalars().first() if not api_key: diff --git a/api/oss/src/services/app_manager.py b/api/oss/src/services/app_manager.py index f644399ebd..7e11084485 100644 --- a/api/oss/src/services/app_manager.py +++ b/api/oss/src/services/app_manager.py @@ -42,7 +42,7 @@ async def get_appdb_str_by_id(object_id: str, object_type: str) -> str: raise db_manager.NoResultFound(f"Variant with id {object_id} not found") return str(app_variant_db.app_id) elif object_type == "evaluation": - evaluation_db = await db_manager.fetch_evaluation_by_id( + evaluation_db = await db_manager_ee.fetch_evaluation_by_id( project_id=project_id, evaluation_id=object_id, ) diff --git a/api/oss/src/services/auth_helper.py b/api/oss/src/services/auth_helper.py index 9f49188cb3..7e6d1fbb16 100644 --- a/api/oss/src/services/auth_helper.py +++ b/api/oss/src/services/auth_helper.py @@ -1,11 +1,9 @@ import traceback from typing import Optional from datetime import datetime, timezone, timedelta -import asyncio from pydantic import ValidationError from fastapi import Request, HTTPException, Response -from fastapi.responses import JSONResponse from fastapi.exceptions import RequestValidationError from supertokens_python.recipe.session.asyncio import get_session from jwt import encode, decode, DecodeError, ExpiredSignatureError @@ -22,9 +20,8 @@ from oss.src.services import api_key_service from oss.src.services.exceptions import ( UnauthorizedException, + TooManyRequestsException, InternalServerErrorException, - GatewayTimeoutException, - code_to_phrase, ) if is_ee(): @@ -55,13 +52,11 @@ "/api/openapi.json", # SUPERTOKENS "/auth", - "/api/auth", # STRIPE "/billing/stripe/events/", - "/api/billing/stripe/events/", ) -_ADMIN_ENDPOINT_IDENTIFIER = "/admin/" +_ADMIN_ENDPOINT_PREFIX = "/admin/" _SECRET_KEY = env.AGENTA_AUTH_KEY _SECRET_EXP = 15 * 60 # 15 minutes @@ -69,8 +64,6 @@ _ZERO_UUID = "00000000-0000-0000-0000-000000000000" _NULL_UUID = "null" -_SUPERTOKENS_TIMEOUT = 15 # 15 seconds or whatever you need - async def authentication_middleware(request: Request, call_next): """ @@ -102,33 +95,28 @@ async def authentication_middleware(request: Request, call_next): except TryRefreshTokenError: log.warn("Unauthorized: Refresh Token") - return JSONResponse(status_code=401, content={"detail": "Unauthorized"}) + return Response(status_code=401, content="Unauthorized") except RequestValidationError as exc: log.error("Unprocessable Content: %s", exc) - return JSONResponse(status_code=422, content={"detail": exc.errors()}) + return Response(status_code=422, content=exc.errors()) except ValidationError as exc: log.error("Bad Request: %s", exc) - return JSONResponse(status_code=400, content={"detail": exc.errors()}) + return Response(status_code=400, content=exc.errors()) except HTTPException as exc: log.error("%s: %s", exc.status_code, exc.detail) - return JSONResponse(status_code=exc.status_code, content={"detail": exc.detail}) - - except ValueError as exc: - log.error("Bad Request: %s", exc) - - return JSONResponse(status_code=400, content={"detail": str(exc)}) + return Response(status_code=exc.status_code, content=exc.detail) except Exception as e: # pylint: disable=bare-except log.error("Internal Server Error: %s", traceback.format_exc()) status_code = e.status_code if hasattr(e, "status_code") else 500 - return JSONResponse( + return Response( status_code=status_code, content={"detail": "An internal error has occurred."}, ) @@ -139,24 +127,25 @@ async def _authenticate(request: Request): if request.url.path.startswith(_PUBLIC_ENDPOINTS): return - if _ADMIN_ENDPOINT_IDENTIFIER in request.url.path: - auth_header = ( - request.headers.get("Authorization") - or request.headers.get("authorization") - or None - ) + if is_ee(): + if request.url.path.startswith(_ADMIN_ENDPOINT_PREFIX): + auth_header = ( + request.headers.get("Authorization") + or request.headers.get("authorization") + or None + ) - if not auth_header: - raise UnauthorizedException() + if not auth_header: + raise UnauthorizedException() - if not auth_header.startswith(_ACCESS_TOKEN_PREFIX): - raise UnauthorizedException() + if not auth_header.startswith(_ACCESS_TOKEN_PREFIX): + raise UnauthorizedException() - access_token = auth_header[len(_ACCESS_TOKEN_PREFIX) :] + access_token = auth_header[len(_ACCESS_TOKEN_PREFIX) :] - return await verify_access_token( - access_token=access_token, - ) + return await verify_access_token( + access_token=access_token, + ) auth_header = ( request.headers.get("Authorization") @@ -257,48 +246,31 @@ async def verify_bearer_token( query_project_id: Optional[str] = None, query_workspace_id: Optional[str] = None, ): - user_id = None - user_email = None - organization_name = None - cache_key = {} - try: session = await get_session(request) # type: ignore session_user_id = session.get_user_id() # type: ignore - cache_key = {} - if not session_user_id: raise UnauthorizedException() - user: dict = await get_cache( + cache_key = {} + + user_id = await get_cache( project_id=query_project_id, user_id=session_user_id, namespace="get_supertokens_user_by_id", key=cache_key, ) - # user = None - - user_id = user.get("user_id") if user else None - user_email = user.get("user_email") if user else None - if user is not None: - if user.get("deny"): + if user_id is not None: + if user_id.get("deny"): raise UnauthorizedException() - else: - try: - user_info = await asyncio.wait_for( - get_supertokens_user_by_id(user_id=session_user_id), - timeout=_SUPERTOKENS_TIMEOUT, - ) - except Exception as e: - log.error("Timeout: get_user_from_supertokens()") + user_id = user_id.get("user_id") - raise GatewayTimeoutException( - detail="Failed to reach auth provider. Please try again later.", - ) from e + else: + user_info = await get_supertokens_user_by_id(user_id=session_user_id) if not user_info: await set_cache( @@ -307,26 +279,12 @@ async def verify_bearer_token( namespace="get_supertokens_user_by_id", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() - user_email = user_info.emails[0] if user_info.emails else None - - if not user_email: - await set_cache( - project_id=query_project_id, - user_id=session_user_id, - namespace="get_supertokens_user_by_id", - key=cache_key, - value={"deny": True}, - ) - - raise UnauthorizedException() - - user = await db_manager.get_user_with_email( - email=user_email, - ) + user = await db_manager.get_user_with_email(user_info.emails[0]) if not user: await set_cache( @@ -335,6 +293,7 @@ async def verify_bearer_token( namespace="get_supertokens_user_by_id", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -346,19 +305,17 @@ async def verify_bearer_token( user_id=session_user_id, namespace="get_supertokens_user_by_id", key=cache_key, - value={ - "user_id": user_id, - "user_email": user_email, - }, + value={"user_id": user_id}, + ttl=5 * 60, # seconds ) project_id = None workspace_id = None cache_key = { - "u_id": user_id[-12:], # Use last 12 characters of user_id for cache key - "p_id": query_project_id[-12:] if query_project_id else "", - "w_id": query_workspace_id[-12:] if query_workspace_id else "", + "user_id": user_id, + "query_project_id": query_project_id, + "query_workspace_id": query_workspace_id, } state = await get_cache( @@ -367,18 +324,15 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, ) - # state = None if state is not None: if state.get("deny"): raise UnauthorizedException() request.state.user_id = state.get("user_id") - request.state.user_email = state.get("user_email") request.state.project_id = state.get("project_id") request.state.workspace_id = state.get("workspace_id") request.state.organization_id = state.get("organization_id") - request.state.organization_name = state.get("organization_name") request.state.credentials = state.get("credentials") return @@ -391,10 +345,11 @@ async def verify_bearer_token( if not project: await set_cache( project_id=query_project_id, - user_id=session_user_id, + user_id=user_id, namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -410,6 +365,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -421,6 +377,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -441,6 +398,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -450,8 +408,6 @@ async def verify_bearer_token( organization_id = project.organization_id elif not query_project_id and query_workspace_id: - log.warning("[AUTH] Missing project_id in query params!") - workspace = await db_manager.get_workspace( workspace_id=query_workspace_id, ) @@ -463,6 +419,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -474,8 +431,6 @@ async def verify_bearer_token( organization_id = workspace.organization_id else: - log.warning("[AUTH] Missing project_id in query params!") - if is_ee(): workspace_id = await db_manager_ee.get_default_workspace_id( user_id=user_id, @@ -509,56 +464,23 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() - # ---------------------------------------------------------------------- - try: - _cache_key = {} - - organization_name = await get_cache( - project_id=project_id, - namespace="get_organization_name", - key=_cache_key, - ) - - if not organization_name: - project = await db_manager.get_project_by_id( - project_id=project_id, - ) - - if not project: - raise UnauthorizedException() - - organization_name = project.organization.name - - await set_cache( - project_id=project_id, - namespace="get_organization_name", - key=_cache_key, - value=organization_name, - ) - except Exception as exc: # pylint: disable=bare-except - log.error("Failed to get organization name: %s", exc) - # ---------------------------------------------------------------------- - secret_token = await sign_secret_token( user_id=user_id, - user_email=user_email, project_id=project_id, workspace_id=workspace_id, organization_id=organization_id, - organization_name=organization_name, ) state = { "user_id": user_id, - "user_email": user_email, "project_id": project_id, "workspace_id": workspace_id, "organization_id": organization_id, - "organization_name": organization_name, "credentials": f"{_SECRET_TOKEN_PREFIX}{secret_token}", } @@ -568,19 +490,15 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value=state, + ttl=5 * 60, # seconds ) request.state.user_id = state.get("user_id") - request.state.user_email = state.get("user_email") request.state.project_id = state.get("project_id") request.state.workspace_id = state.get("workspace_id") request.state.organization_id = state.get("organization_id") - request.state.organization_name = state.get("organization_name") request.state.credentials = state.get("credentials") - except GatewayTimeoutException as exc: - raise exc - except UnauthorizedException as exc: await set_cache( project_id=query_project_id, @@ -588,6 +506,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise exc @@ -599,6 +518,7 @@ async def verify_bearer_token( namespace="verify_bearer_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() from exc @@ -614,6 +534,8 @@ async def verify_apikey_token( } state = await get_cache( + project_id=None, + user_id=None, namespace="verify_apikey_token", key=cache_key, ) @@ -623,11 +545,9 @@ async def verify_apikey_token( raise UnauthorizedException() request.state.user_id = state.get("user_id") - request.state.user_email = state.get("user_email") request.state.project_id = state.get("project_id") request.state.workspace_id = state.get("workspace_id") request.state.organization_id = state.get("organization_id") - request.state.organization_name = state.get("organization_name") request.state.credentials = state.get("credentials") return @@ -638,9 +558,12 @@ async def verify_apikey_token( if not api_key_obj: await set_cache( + project_id=None, + user_id=None, namespace="verify_apikey_token", key=cache_key, value={"deny": True}, + ttl=5 * 60, # seconds ) raise UnauthorizedException() @@ -649,44 +572,30 @@ async def verify_apikey_token( project_id=str(api_key_obj.project_id), ) - user_id = str(api_key_obj.created_by_id) - user_email = api_key_obj.user.email - project_id = str(api_key_obj.project_id) - workspace_id = str(apikey_project_db.workspace_id) - organization_id = str(apikey_project_db.organization_id) - organization_name = None - if is_ee(): - organization_name = apikey_project_db.organization.name - state = { - "user_id": user_id, - "user_email": user_email, - "project_id": project_id, - "workspace_id": workspace_id, - "organization_id": organization_id, - "organization_name": organization_name, + "user_id": str(api_key_obj.created_by_id), + "project_id": str(api_key_obj.project_id), + "workspace_id": str(apikey_project_db.workspace_id), + "organization_id": str(apikey_project_db.organization_id), "credentials": f"{_APIKEY_TOKEN_PREFIX}{apikey_token}", } await set_cache( + project_id=None, + user_id=None, namespace="verify_apikey_token", key=cache_key, value=state, + ttl=5 * 60, # seconds ) request.state.user_id = state.get("user_id") - request.state.user_email = state.get("user_email") request.state.project_id = state.get("project_id") request.state.workspace_id = state.get("workspace_id") request.state.organization_id = state.get("organization_id") - request.state.organization_name = state.get("organization_name") request.state.credentials = state.get("credentials") - except Exception as exc: log.error(exc) - import traceback - - traceback.print_exc() raise exc @@ -705,11 +614,9 @@ async def verify_secret_token( ) request.state.user_id = auth_context.get("user_id") - request.state.user_email = auth_context.get("user_email") request.state.project_id = auth_context.get("project_id") request.state.workspace_id = auth_context.get("workspace_id") request.state.organization_id = auth_context.get("organization_id") - request.state.organization_name = auth_context.get("organization_name") request.state.credentials = f"{_SECRET_TOKEN_PREFIX}{secret_token}" except DecodeError as exc: @@ -724,11 +631,9 @@ async def verify_secret_token( async def sign_secret_token( user_id: Optional[str] = None, - user_email: Optional[str] = None, project_id: Optional[str] = None, workspace_id: Optional[str] = None, organization_id: Optional[str] = None, - organization_name: Optional[str] = None, ): try: if not _SECRET_KEY: @@ -740,11 +645,9 @@ async def sign_secret_token( auth_context = { "user_id": user_id, - "user_email": user_email, "project_id": project_id, "workspace_id": workspace_id, "organization_id": organization_id, - "organization_name": organization_name, "exp": _exp, } diff --git a/api/oss/src/services/converters.py b/api/oss/src/services/converters.py deleted file mode 100644 index 8ead9b7df4..0000000000 --- a/api/oss/src/services/converters.py +++ /dev/null @@ -1,192 +0,0 @@ -import uuid -from typing import List, Dict, Any -from datetime import datetime, timezone - -from oss.src.services import db_manager -from oss.src.models.api.evaluation_model import ( - CorrectAnswer, - Evaluation, - HumanEvaluation, - EvaluationScenario, - SimpleEvaluationOutput, - EvaluationScenarioInput, - HumanEvaluationScenario, - EvaluationScenarioOutput, -) -from oss.src.services import db_manager -from oss.src.models.db_models import ( - EvaluationDB, - HumanEvaluationDB, - EvaluationScenarioDB, - HumanEvaluationScenarioDB, -) - - -async def human_evaluation_db_to_simple_evaluation_output( - human_evaluation_db: HumanEvaluationDB, -) -> SimpleEvaluationOutput: - evaluation_variants = await db_manager.fetch_human_evaluation_variants( - human_evaluation_id=str(human_evaluation_db.id) - ) - return SimpleEvaluationOutput( - id=str(human_evaluation_db.id), - app_id=str(human_evaluation_db.app_id), - project_id=str(human_evaluation_db.project_id), - status=human_evaluation_db.status, # type: ignore - evaluation_type=human_evaluation_db.evaluation_type, # type: ignore - variant_ids=[ - str(evaluation_variant.variant_id) - for evaluation_variant in evaluation_variants - ], - ) - - -async def evaluation_db_to_pydantic( - evaluation_db: EvaluationDB, -) -> Evaluation: - variant_name = ( - evaluation_db.variant.variant_name - if evaluation_db.variant.variant_name - else str(evaluation_db.variant_id) - ) - aggregated_results = aggregated_result_of_evaluation_to_pydantic( - evaluation_db.aggregated_results - ) - - return Evaluation( - id=str(evaluation_db.id), - app_id=str(evaluation_db.app_id), - project_id=str(evaluation_db.project_id), - status=evaluation_db.status, - variant_ids=[str(evaluation_db.variant_id)], - variant_revision_ids=[str(evaluation_db.variant_revision_id)], - revisions=[str(evaluation_db.variant_revision.revision)], - variant_names=[variant_name], - testset_id=str(evaluation_db.testset_id), - testset_name=evaluation_db.testset.name, - aggregated_results=aggregated_results, - created_at=str(evaluation_db.created_at), - updated_at=str(evaluation_db.updated_at), - average_cost=evaluation_db.average_cost, - total_cost=evaluation_db.total_cost, - average_latency=evaluation_db.average_latency, - ) - - -async def human_evaluation_db_to_pydantic( - evaluation_db: HumanEvaluationDB, -) -> HumanEvaluation: - evaluation_variants = await db_manager.fetch_human_evaluation_variants( - human_evaluation_id=str(evaluation_db.id) # type: ignore - ) - - revisions = [] - variants_ids = [] - variants_names = [] - variants_revision_ids = [] - for evaluation_variant in evaluation_variants: - variant_name = ( - evaluation_variant.variant.variant_name - if isinstance(evaluation_variant.variant_id, uuid.UUID) - else str(evaluation_variant.variant_id) - ) - variants_names.append(str(variant_name)) - variants_ids.append(str(evaluation_variant.variant_id)) - variant_revision = ( - str(evaluation_variant.variant_revision.revision) - if isinstance(evaluation_variant.variant_revision_id, uuid.UUID) - else " None" - ) - revisions.append(variant_revision) - variants_revision_ids.append(str(evaluation_variant.variant_revision_id)) - - return HumanEvaluation( - id=str(evaluation_db.id), - app_id=str(evaluation_db.app_id), - project_id=str(evaluation_db.project_id), - status=evaluation_db.status, # type: ignore - evaluation_type=evaluation_db.evaluation_type, # type: ignore - variant_ids=variants_ids, - variant_names=variants_names, - testset_id=str(evaluation_db.testset_id), - testset_name=evaluation_db.testset.name, - variants_revision_ids=variants_revision_ids, - revisions=revisions, - created_at=str(evaluation_db.created_at), # type: ignore - updated_at=str(evaluation_db.updated_at), # type: ignore - ) - - -def human_evaluation_scenario_db_to_pydantic( - evaluation_scenario_db: HumanEvaluationScenarioDB, evaluation_id: str -) -> HumanEvaluationScenario: - return HumanEvaluationScenario( - id=str(evaluation_scenario_db.id), - evaluation_id=evaluation_id, - inputs=evaluation_scenario_db.inputs, # type: ignore - outputs=evaluation_scenario_db.outputs, # type: ignore - vote=evaluation_scenario_db.vote, # type: ignore - score=evaluation_scenario_db.score, # type: ignore - correct_answer=evaluation_scenario_db.correct_answer, # type: ignore - is_pinned=evaluation_scenario_db.is_pinned or False, # type: ignore - note=evaluation_scenario_db.note or "", # type: ignore - ) - - -def aggregated_result_of_evaluation_to_pydantic( - evaluation_aggregated_results: List, -) -> List[dict]: - transformed_results = [] - for aggregated_result in evaluation_aggregated_results: - evaluator_config_dict = ( - { - "id": str(aggregated_result.evaluator_config.id), - "name": aggregated_result.evaluator_config.name, - "evaluator_key": aggregated_result.evaluator_config.evaluator_key, - "settings_values": aggregated_result.evaluator_config.settings_values, - "created_at": str(aggregated_result.evaluator_config.created_at), - "updated_at": str(aggregated_result.evaluator_config.updated_at), - } - if isinstance(aggregated_result.evaluator_config_id, uuid.UUID) - else None - ) - transformed_results.append( - { - "evaluator_config": ( - {} if evaluator_config_dict is None else evaluator_config_dict - ), - "result": aggregated_result.result, - } - ) - return transformed_results - - -async def evaluation_scenario_db_to_pydantic( - evaluation_scenario_db: EvaluationScenarioDB, evaluation_id: str -) -> EvaluationScenario: - scenario_results = [ - { - "evaluator_config": str(scenario_result.evaluator_config_id), - "result": scenario_result.result, - } - for scenario_result in evaluation_scenario_db.results - ] - return EvaluationScenario( - id=str(evaluation_scenario_db.id), - evaluation_id=evaluation_id, - inputs=[ - EvaluationScenarioInput(**scenario_input) # type: ignore - for scenario_input in evaluation_scenario_db.inputs - ], - outputs=[ - EvaluationScenarioOutput(**scenario_output) # type: ignore - for scenario_output in evaluation_scenario_db.outputs - ], - correct_answers=[ - CorrectAnswer(**correct_answer) # type: ignore - for correct_answer in evaluation_scenario_db.correct_answers - ], - is_pinned=evaluation_scenario_db.is_pinned or False, # type: ignore - note=evaluation_scenario_db.note or "", # type: ignore - results=scenario_results, # type: ignore - ) diff --git a/api/oss/src/services/db_manager.py b/api/oss/src/services/db_manager.py index 9833c104dc..baf2c5ea3d 100644 --- a/api/oss/src/services/db_manager.py +++ b/api/oss/src/services/db_manager.py @@ -10,8 +10,8 @@ from sqlalchemy import func, or_, asc from sqlalchemy.ext.asyncio import AsyncSession from supertokens_python.types import AccountInfo -from sqlalchemy.orm import joinedload, load_only, aliased -from sqlalchemy.exc import NoResultFound, MultipleResultsFound, SQLAlchemyError +from sqlalchemy.orm import joinedload, load_only, selectinload +from sqlalchemy.exc import NoResultFound, MultipleResultsFound from supertokens_python.asyncio import list_users_by_account_info from supertokens_python.asyncio import delete_user as delete_user_from_supertokens @@ -22,6 +22,7 @@ from oss.src.dbs.postgres.shared.engine import engine from oss.src.services.json_importer_helper import get_json + if is_ee(): from ee.src.models.db_models import ProjectDB, WorkspaceDB else: @@ -31,7 +32,7 @@ AppDB, UserDB, APIKeyDB, - TestsetDB, + TestSetDB, IDsMappingDB, DeploymentDB, InvitationDB, @@ -47,25 +48,6 @@ AppType, ConfigDB, ) -from oss.src.models.shared_models import ( - Result, - CorrectAnswer, - AggregatedResult, - EvaluationScenarioResult, - EvaluationScenarioInput, - EvaluationScenarioOutput, - HumanEvaluationScenarioInput, -) -from oss.src.models.db_models import ( - EvaluationDB, - HumanEvaluationDB, - EvaluationScenarioDB, - HumanEvaluationScenarioDB, - HumanEvaluationVariantDB, - EvaluationScenarioResultDB, - EvaluationEvaluatorConfigDB, - EvaluationAggregatedResultDB, -) log = get_module_logger(__name__) @@ -76,7 +58,7 @@ async def fetch_project_by_id( project_id: str, -) -> Optional[ProjectDB]: +) -> ProjectDB: async with engine.core_session() as session: project = ( ( @@ -93,44 +75,6 @@ async def fetch_project_by_id( return project -async def fetch_workspace_by_id( - workspace_id: str, -) -> Optional[WorkspaceDB]: - async with engine.core_session() as session: - workspace = ( - ( - await session.execute( - select(WorkspaceDB).filter_by( - id=uuid.UUID(workspace_id), - ) - ) - ) - .scalars() - .first() - ) - - return workspace - - -async def fetch_organization_by_id( - organization_id: str, -) -> Optional[OrganizationDB]: - async with engine.core_session() as session: - organization = ( - ( - await session.execute( - select(OrganizationDB).filter_by( - id=uuid.UUID(organization_id), - ) - ) - ) - .scalars() - .first() - ) - - return organization - - async def add_testset_to_app_variant( template_name: str, app_name: str, project_id: str ): @@ -157,7 +101,7 @@ async def add_testset_to_app_variant( "name": f"{app_name}_testset", "csvdata": csvdata, } - testset_db = TestsetDB( + testset_db = TestSetDB( **testset, project_id=uuid.UUID(project_id), ) @@ -188,27 +132,6 @@ async def fetch_app_by_id(app_id: str) -> AppDB: return app -async def fetch_latest_app_variant(app_id: str) -> Optional[AppVariantDB]: - """Fetches the latest app variant for a given app ID. - - Args: - app_id (str): The ID of the app to fetch the latest variant for. - - Returns: - AppVariantDB: The latest app variant, or None if no app variant was found. - """ - - async with engine.core_session() as session: - base_query = ( - select(AppVariantDB) - .filter_by(app_id=uuid.UUID(app_id)) - .order_by(AppVariantDB.created_at.desc()) - ) - result = await session.execute(base_query) - app_variant = result.scalars().first() - return app_variant - - async def fetch_app_variant_by_id(app_variant_id: str) -> Optional[AppVariantDB]: """ Fetches an app variant by its ID. @@ -658,7 +581,6 @@ async def get_app_type_from_template_key(template_key: Optional[str]) -> Optiona AppType.CHAT_SERVICE, AppType.COMPLETION_SERVICE, AppType.CUSTOM, - AppType.SDK_CUSTOM, ]: return template_key @@ -678,7 +600,6 @@ async def create_app_and_envs( app_name: str, template_key: Optional[str] = None, project_id: Optional[str] = None, - user_id: Optional[str] = None, ) -> AppDB: """ Create a new app with the given name and organization ID. @@ -694,9 +615,8 @@ async def create_app_and_envs( ValueError: If an app with the same name already exists. """ - app = await fetch_app_by_name( - app_name=app_name, - project_id=project_id, + app = await fetch_app_by_name_and_parameters( + app_name=app_name, project_id=project_id ) if app is not None: raise ValueError("App with the same name already exists") @@ -707,10 +627,7 @@ async def create_app_and_envs( async with engine.core_session() as session: app = AppDB( - project_id=uuid.UUID(project_id), - app_name=app_name, - app_type=app_type, - modified_by_id=uuid.UUID(user_id) if user_id else None, + app_name=app_name, project_id=uuid.UUID(project_id), app_type=app_type ) session.add(app) @@ -721,7 +638,7 @@ async def create_app_and_envs( return app -async def update_app(app_id: str, values_to_update: dict): +async def update_app(app_id: str, values_to_update: dict) -> None: """Update the app in the database. Arguments: @@ -759,7 +676,6 @@ async def update_app(app_id: str, values_to_update: dict): setattr(app, key, value) await session.commit() - return app async def get_deployment_by_id(deployment_id: str) -> DeploymentDB: @@ -772,25 +688,12 @@ async def get_deployment_by_id(deployment_id: str) -> DeploymentDB: DeploymentDB: instance of deployment object """ - try: - deployment_uuid = uuid.UUID(deployment_id) - except ValueError as e: - log.error(f"Invalid deployment_id '{deployment_id}': {e}") - return None - - try: - async with engine.core_session() as session: - result = await session.execute( - select(DeploymentDB).filter_by(id=deployment_uuid) - ) - deployment = result.scalars().first() - return deployment - except SQLAlchemyError as e: - log.error(f"Database error while fetching deployment {deployment_id}: {e}") - return None - except Exception as e: - log.error(f"Unexpected error in get_deployment_by_id: {e}") - return None + async with engine.core_session() as session: + result = await session.execute( + select(DeploymentDB).filter_by(id=uuid.UUID(deployment_id)) + ) + deployment = result.scalars().first() + return deployment async def get_deployment_by_appid(app_id: str) -> DeploymentDB: @@ -851,7 +754,9 @@ async def list_app_variants_by_app_slug( """ assert app_slug is not None, "app_slug cannot be None" - app_db = await fetch_app_by_name(app_name=app_slug, project_id=project_id) + app_db = await fetch_app_by_name_and_parameters( + app_name=app_slug, project_id=project_id + ) if app_db is None: raise NoResultFound(f"App with name {app_slug} not found.") @@ -987,11 +892,10 @@ async def check_if_user_exists_and_create_organization(user_email: str): ) # update default project with organization and workspace ids - await create_or_update_default_project( + await update_default_project( values_to_update={ "organization_id": organization_db.id, "workspace_id": workspace_db.id, - "project_name": organization_name, } ) return organization_db @@ -1029,125 +933,6 @@ async def check_if_user_invitation_exists(email: str, organization_id: str): return True -async def delete_accounts() -> None: - async with engine.core_session() as session: - # fetch all projects - - stmt = select(ProjectDB) - - result = await session.execute(stmt) - - projects = result.scalars().all() - - # delete all projects - - for project in projects: - try: - await session.delete(project) - log.info( - "[scopes] project deleted", - project_id=project.id, - ) - except Exception as e: - log.error( - "[scopes] error deleting project", - project_id=project.id, - error=str(e), - ) - - # fetch all workspaces - - stmt = select(WorkspaceDB) - - result = await session.execute(stmt) - - workspaces = result.scalars().all() - - # delete all workspaces - - for workspace in workspaces: - try: - await session.delete(workspace) - log.info( - "[scopes] workspace deleted", - workspace_id=workspace.id, - ) - except Exception as e: - log.error( - "[scopes] error deleting workspace", - workspace_id=workspace.id, - error=str(e), - ) - - # fetch all organizations - - stmt = select(OrganizationDB) - - result = await session.execute(stmt) - - organizations = result.scalars().all() - - # delete all organizations - - for organization in organizations: - try: - await session.delete(organization) - log.info( - "[scopes] organization deleted", - organization_id=organization.id, - ) - except Exception as e: - log.error( - "[scopes] error deleting organization", - organization_id=organization.id, - error=str(e), - ) - - await session.commit() - - # fetch all users - - stmt = select(UserDB) - - result = await session.execute(stmt) - - users = result.scalars().all() - - # delete all users (supertokens) - - for user in users: - try: - await delete_user_from_supertokens(user.uid) - log.info( - "[scopes] user deleted (supertokens)", - user_uid=user.uid, - ) - except Exception as e: - log.error( - "[scopes] error deleting user from supertokens", - user_uid=user.uid, - error=str(e), - ) - - # delete all users - - for user in users: - try: - await session.delete(user) - log.info( - "[scopes] user deleted", - user_id=user.id, - ) - except Exception as e: - log.error( - "[scopes] error deleting user", - user_id=user.id, - error=str(e), - ) - - await session.commit() - - async def create_accounts(payload: dict) -> UserDB: """Create a new account in the database. @@ -1231,7 +1016,7 @@ async def create_workspace(name: str, organization_id: str): workspace_db = WorkspaceDB( name=name, organization_id=uuid.UUID(organization_id), - description="Default Workspace", + description="My Default Workspace", type="default", ) @@ -1273,7 +1058,7 @@ async def update_organization(organization_id: str, values_to_update: Dict[str, await session.refresh(organization) -async def create_or_update_default_project(values_to_update: Dict[str, Any]): +async def update_default_project(values_to_update: Dict[str, Any]): """Update the specified project in the database. Args: @@ -1283,11 +1068,8 @@ async def create_or_update_default_project(values_to_update: Dict[str, Any]): async with engine.core_session() as session: result = await session.execute(select(ProjectDB).filter_by(is_default=True)) project = result.scalar() - if project is None: - project = ProjectDB(project_name="Default Project", is_default=True) - - session.add(project) + raise Exception(f"Default project not found") for key, value in values_to_update.items(): if hasattr(project, key): @@ -1603,12 +1385,11 @@ async def get_project_by_id(project_id: str) -> ProjectDB: async with engine.core_session() as session: project_query = await session.execute( - select(ProjectDB) - .options(joinedload(ProjectDB.organization).load_only(OrganizationDB.name)) - .where(ProjectDB.id == uuid.UUID(project_id)) + select(ProjectDB).where(ProjectDB.id == uuid.UUID(project_id)) ) project = project_query.scalar() - + if project is None: + raise NoResultFound(f"No project with ID {project_id} found") return project @@ -1749,7 +1530,7 @@ async def delete_invitation(invitation_id: str) -> bool: }, ) - project = await fetch_project_by_id(project_id=str(invitation.project_id)) + project = await fetch_project_by_id(project_id=invitation.project_id) if not project: raise NoResultFound(f"Project with ID {invitation.project_id} not found") @@ -1925,7 +1706,9 @@ async def list_apps( """ if app_name is not None: - app_db = await fetch_app_by_name(app_name=app_name, project_id=project_id) + app_db = await fetch_app_by_name_and_parameters( + app_name=app_name, project_id=project_id + ) return [converters.app_db_to_pydantic(app_db)] else: @@ -2555,17 +2338,14 @@ async def list_app_variant_revisions_by_variant( return app_variant_revisions -async def fetch_app_variant_revision( - app_variant: str, revision_number: int -) -> Optional[AppVariantRevisionsDB]: - """Returns a specific app variant revision for the given app variant and revision number. +async def fetch_app_variant_revision(app_variant: str, revision_number: int): + """Returns list of app variant revision for the given app variant Args: - app_variant (str): The ID of the app variant to retrieve the revision for. - revision_number (int): The revision number to retrieve. + app_variant (AppVariantDB): The app variant to retrieve environments for. Returns: - AppVariantRevisionsDB: The app variant revision object, or None if not found. + List[AppVariantRevisionsDB]: A list of AppVariantRevisionsDB objects. """ async with engine.core_session() as session: @@ -2587,8 +2367,8 @@ async def fetch_app_variant_revision( ) # type: ignore ) result = await session.execute(query) - app_variant_revision = result.scalars().first() - return app_variant_revision + app_variant_revisions = result.scalars().first() + return app_variant_revisions async def remove_environment(environment_db: AppEnvironmentDB): @@ -2611,38 +2391,20 @@ async def remove_environment(environment_db: AppEnvironmentDB): await session.commit() -async def remove_testsets( - project_id: str, - # - testset_ids: List[str], -): +async def remove_testsets(testset_ids: List[str]): """ Removes testsets. Args: - project_id (str): The ID of the project. testset_ids (List[str]): The testset identifiers """ async with engine.core_session() as session: - query = select(TestsetDB).where( - TestsetDB.project_id == uuid.UUID(project_id), - TestsetDB.id.in_(testset_ids), - ) + query = select(TestSetDB).where(TestSetDB.id.in_(testset_ids)) result = await session.execute(query) testsets = result.scalars().all() - - for i, testset in enumerate(testsets): - log.info( - f"[TESTSET] DELETE ({i}):", - project_id=testset.project_id, - testset_id=testset.id, - count=len(testset.csvdata), - size=len(dumps(testset.csvdata).encode("utf-8")), - ) - + for testset in testsets: await session.delete(testset) - await session.commit() @@ -2786,116 +2548,82 @@ async def get_app_variant_instance_by_id( return app_variant_db -async def fetch_testset_by_id( - project_id: str, - # - testset_id: str, -) -> Optional[TestsetDB]: +async def fetch_testset_by_id(testset_id: str) -> Optional[TestSetDB]: """Fetches a testset by its ID. Args: - project_id (str): The ID of the project. testset_id (str): The ID of the testset to fetch. Returns: - TestsetDB: The fetched testset, or None if no testset was found. + TestSetDB: The fetched testset, or None if no testset was found. """ + if not isinstance(testset_id, str) or not testset_id: + raise ValueError(f"testset_id {testset_id} must be a non-empty string") + + try: + testset_uuid = uuid.UUID(testset_id) + except ValueError as e: + raise ValueError(f"testset_id {testset_id} is not a valid UUID") from e + async with engine.core_session() as session: - result = await session.execute( - select(TestsetDB).filter_by( - project_id=uuid.UUID(project_id), - id=uuid.UUID(testset_id), - ) - ) + result = await session.execute(select(TestSetDB).filter_by(id=testset_uuid)) testset = result.scalars().first() - if not testset: raise NoResultFound(f"Testset with id {testset_id} not found") - - log.info( - "[TESTSET] READ:", - project_id=testset.project_id, - testset_id=testset.id, - count=len(testset.csvdata), - size=len(dumps(testset.csvdata).encode("utf-8")), - ) - return testset -async def create_testset( - project_id: str, - # - testset_data: Dict[str, Any], - # - testset_id: Optional[str] = None, -) -> TestsetDB: +async def create_testset(project_id: str, testset_data: Dict[str, Any]): """ Creates a testset. Args: + app (AppDB): The app object project_id (str): The ID of the project testset_data (dict): The data of the testset to create with - testset_id (Optional[str]): The ID of the testset to create Returns: returns the newly created TestsetDB """ async with engine.core_session() as session: - testset = TestsetDB( - **testset_data, - project_id=uuid.UUID(project_id), - id=uuid.UUID(testset_id) if testset_id else None, - ) + testset_db = TestSetDB(**testset_data, project_id=uuid.UUID(project_id)) log.info( - "[TESTSET] CREATE:", - project_id=testset.project_id, - testset_id=testset.id, - count=len(testset.csvdata), - size=len(dumps(testset.csvdata).encode("utf-8")), + "Saving testset:", + project_id=testset_db.project_id, + testset_id=testset_db.id, + count=len(testset_db.csvdata), + size=len(dumps(testset_db.csvdata).encode("utf-8")), ) - session.add(testset) + session.add(testset_db) await session.commit() - await session.refresh(testset) + await session.refresh(testset_db) - return testset + return testset_db -async def update_testset( - project_id: str, - # - testset_id: str, - # - values_to_update: dict, -) -> None: +async def update_testset(testset_id: str, values_to_update: dict) -> None: """Update a testset. Args: - project_id (str): The ID of the project - testset_id (str): The ID of the testset to update testset (TestsetDB): the testset object to update values_to_update (dict): The values to update """ async with engine.core_session() as session: result = await session.execute( - select(TestsetDB).filter_by( - project_id=uuid.UUID(project_id), - id=uuid.UUID(testset_id), - ) + select(TestSetDB).filter_by(id=uuid.UUID(testset_id)) ) testset = result.scalars().first() # Validate keys in values_to_update and update attributes valid_keys = [key for key in values_to_update.keys() if hasattr(testset, key)] - for key in valid_keys: setattr(testset, key, values_to_update[key]) log.info( - "[TESTSET] UPDATE:", + "Saving testset:", project_id=testset.project_id, testset_id=testset.id, count=len(testset.csvdata), @@ -2906,44 +2634,21 @@ async def update_testset( await session.refresh(testset) -async def fetch_testsets_by_project_id( - project_id: str, - name: Optional[str] = None, -) -> List[TestsetDB]: +async def fetch_testsets_by_project_id(project_id: str): """Fetches all testsets for a given project. Args: project_id (str): The ID of the project. Returns: - List[TestsetDB]: The fetched testsets. + List[TestSetDB]: The fetched testsets. """ async with engine.core_session() as session: - if not name: - result = await session.execute( - select(TestsetDB).filter_by( - project_id=uuid.UUID(project_id), - ) - ) - else: - result = await session.execute( - select(TestsetDB).filter_by( - project_id=uuid.UUID(project_id), - name=name if name else None, - ) - ) + result = await session.execute( + select(TestSetDB).filter_by(project_id=uuid.UUID(project_id)) + ) testsets = result.scalars().all() - - for i, testset in enumerate(testsets): - log.info( - f"[TESTSET] READ ({i}):", - project_id=testset.project_id, - testset_id=testset.id, - count=len(testset.csvdata), - size=len(dumps(testset.csvdata).encode("utf-8")), - ) - return testsets @@ -2976,7 +2681,7 @@ async def find_previous_variant_from_base_id( async def update_base( base_id: str, **kwargs: dict, -) -> Optional[VariantBaseDB]: +) -> VariantBaseDB: """Update the base object in the database with the provided id. Arguments: @@ -3044,7 +2749,7 @@ async def update_app_variant( return app_variant -async def fetch_app_by_name( +async def fetch_app_by_name_and_parameters( app_name: str, project_id: Optional[str] = None, ): @@ -3084,9 +2789,7 @@ async def fetch_evaluators_configs(project_id: str): return evaluators_configs -async def fetch_evaluator_config( - evaluator_config_id: str, -) -> Optional[EvaluatorConfigDB]: +async def fetch_evaluator_config(evaluator_config_id: str): """Fetch evaluator configurations from the database. Args: @@ -3139,7 +2842,7 @@ async def check_if_evaluators_exist_in_list_of_evaluators_configs( async def fetch_evaluator_config_by_appId( app_id: str, evaluator_name: str -) -> Optional[EvaluatorConfigDB]: +) -> EvaluatorConfigDB: """Fetch the evaluator config from the database using the app Id and evaluator name. Args: @@ -3164,14 +2867,16 @@ async def create_evaluator_config( project_id: str, name: str, evaluator_key: str, + app_name: Optional[str] = None, settings_values: Optional[Dict[str, Any]] = None, ) -> EvaluatorConfigDB: """Create a new evaluator configuration in the database.""" async with engine.core_session() as session: + name_suffix = f" ({app_name})" if app_name else "" new_evaluator_config = EvaluatorConfigDB( project_id=uuid.UUID(project_id), - name=name, + name=f"{name}{name_suffix}", evaluator_key=evaluator_key, settings_values=settings_values, ) @@ -3253,8 +2958,7 @@ async def get_object_uuid(object_id: str, table_name: str) -> str: """ from bson import ObjectId - - # from bson.errors import InvalidId + from bson.errors import InvalidId try: # Ensure the object_id is a valid MongoDB ObjectId @@ -3262,7 +2966,7 @@ async def get_object_uuid(object_id: str, table_name: str) -> str: object_uuid_as_str = await fetch_corresponding_object_uuid( table_name=table_name, object_id=object_id ) - except: + except InvalidId: # Use the object_id directly if it is not a valid MongoDB ObjectId object_uuid_as_str = object_id @@ -3290,7 +2994,7 @@ async def fetch_corresponding_object_uuid(table_name: str, object_id: str) -> st return str(object_mapping.uuid) -async def fetch_default_project() -> Optional[ProjectDB]: +async def fetch_default_project() -> ProjectDB: """ Fetch the default project from the database. Returns: @@ -3303,9 +3007,7 @@ async def fetch_default_project() -> Optional[ProjectDB]: return default_project -async def get_user_api_key_by_prefix( - api_key_prefix: str, user_id: str -) -> Optional[APIKeyDB]: +async def get_user_api_key_by_prefix(api_key_prefix: str, user_id: str) -> APIKeyDB: """ Gets the user api key by prefix. @@ -3351,755 +3053,3 @@ async def update_api_key_timestamp(api_key_id: str) -> None: await session.commit() await session.refresh(api_key) - - -async def fetch_evaluation_status_by_id( - project_id: str, - evaluation_id: str, -) -> Optional[str]: - """Fetch only the status of an evaluation by its ID.""" - assert evaluation_id is not None, "evaluation_id cannot be None" - - async with engine.core_session() as session: - query = ( - select(EvaluationDB) - .filter_by(project_id=project_id, id=uuid.UUID(evaluation_id)) - .options(load_only(EvaluationDB.status)) - ) - - result = await session.execute(query) - evaluation = result.scalars().first() - return evaluation.status if evaluation else None - - -async def fetch_evaluation_by_id( - project_id: str, - evaluation_id: str, -) -> Optional[EvaluationDB]: - """Fetches a evaluation by its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - EvaluationDB: The fetched evaluation, or None if no evaluation was found. - """ - - assert evaluation_id is not None, "evaluation_id cannot be None" - async with engine.core_session() as session: - base_query = select(EvaluationDB).filter_by( - project_id=project_id, - id=uuid.UUID(evaluation_id), - ) - query = base_query.options( - joinedload(EvaluationDB.testset.of_type(TestsetDB)).load_only(TestsetDB.id, TestsetDB.name), # type: ignore - ) - - result = await session.execute( - query.options( - joinedload(EvaluationDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore - joinedload(EvaluationDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.revision), # type: ignore - joinedload( - EvaluationDB.aggregated_results.of_type( - EvaluationAggregatedResultDB - ) - ).joinedload(EvaluationAggregatedResultDB.evaluator_config), - ) - ) - evaluation = result.unique().scalars().first() - return evaluation - - -async def list_human_evaluations(app_id: str, project_id: str): - """ - Fetches human evaluations belonging to an App. - - Args: - app_id (str): The application identifier - """ - - async with engine.core_session() as session: - base_query = ( - select(HumanEvaluationDB) - .filter_by(app_id=uuid.UUID(app_id), project_id=uuid.UUID(project_id)) - .filter(HumanEvaluationDB.testset_id.isnot(None)) - ) - query = base_query.options( - joinedload(HumanEvaluationDB.testset.of_type(TestsetDB)).load_only(TestsetDB.id, TestsetDB.name), # type: ignore - ) - - result = await session.execute(query) - human_evaluations = result.scalars().all() - return human_evaluations - - -async def create_human_evaluation( - app: AppDB, - status: str, - evaluation_type: str, - testset_id: str, - variants_ids: List[str], -): - """ - Creates a human evaluation. - - Args: - app (AppDB: The app object - status (str): The status of the evaluation - evaluation_type (str): The evaluation type - testset_id (str): The ID of the evaluation testset - variants_ids (List[str]): The IDs of the variants for the evaluation - """ - - async with engine.core_session() as session: - human_evaluation = HumanEvaluationDB( - app_id=app.id, - project_id=app.project_id, - status=status, - evaluation_type=evaluation_type, - testset_id=testset_id, - ) - - session.add(human_evaluation) - await session.commit() - await session.refresh(human_evaluation, attribute_names=["testset"]) - - # create variants for human evaluation - await create_human_evaluation_variants( - human_evaluation_id=str(human_evaluation.id), - variants_ids=variants_ids, - ) - return human_evaluation - - -async def fetch_human_evaluation_variants(human_evaluation_id: str): - """ - Fetches human evaluation variants. - - Args: - human_evaluation_id (str): The human evaluation ID - - Returns: - The human evaluation variants. - """ - - async with engine.core_session() as session: - base_query = select(HumanEvaluationVariantDB).filter_by( - human_evaluation_id=uuid.UUID(human_evaluation_id) - ) - query = base_query.options( - joinedload(HumanEvaluationVariantDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore - joinedload(HumanEvaluationVariantDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.id, AppVariantRevisionsDB.revision), # type: ignore - ) - - result = await session.execute(query) - evaluation_variants = result.scalars().all() - return evaluation_variants - - -async def create_human_evaluation_variants( - human_evaluation_id: str, variants_ids: List[str] -): - """ - Creates human evaluation variants. - - Args: - human_evaluation_id (str): The human evaluation identifier - variants_ids (List[str]): The variants identifiers - project_id (str): The project ID - """ - - variants_dict = {} - for variant_id in variants_ids: - variant = await fetch_app_variant_by_id(app_variant_id=variant_id) - if variant: - variants_dict[variant_id] = variant - - variants_revisions_dict = {} - for variant_id, variant in variants_dict.items(): - variant_revision = await fetch_app_variant_revision_by_variant( - app_variant_id=str(variant.id), project_id=str(variant.project_id), revision=variant.revision # type: ignore - ) - if variant_revision: - variants_revisions_dict[variant_id] = variant_revision - - if set(variants_dict.keys()) != set(variants_revisions_dict.keys()): - raise ValueError("Mismatch between variants and their revisions") - - async with engine.core_session() as session: - for variant_id in variants_ids: - variant = variants_dict[variant_id] - variant_revision = variants_revisions_dict[variant_id] - human_evaluation_variant = HumanEvaluationVariantDB( - human_evaluation_id=uuid.UUID(human_evaluation_id), - variant_id=variant.id, # type: ignore - variant_revision_id=variant_revision.id, # type: ignore - ) - session.add(human_evaluation_variant) - - await session.commit() - - -async def fetch_human_evaluation_by_id( - evaluation_id: str, -) -> Optional[HumanEvaluationDB]: - """ - Fetches a evaluation by its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - EvaluationDB: The fetched evaluation, or None if no evaluation was found. - """ - - assert evaluation_id is not None, "evaluation_id cannot be None" - async with engine.core_session() as session: - base_query = select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) - query = base_query.options( - joinedload(HumanEvaluationDB.testset.of_type(TestsetDB)).load_only(TestsetDB.id, TestsetDB.name), # type: ignore - ) - result = await session.execute(query) - evaluation = result.scalars().first() - return evaluation - - -async def update_human_evaluation(evaluation_id: str, values_to_update: dict): - """Updates human evaluation with the specified values. - - Args: - evaluation_id (str): The evaluation ID - values_to_update (dict): The values to update - - Exceptions: - NoResultFound: if human evaluation is not found - """ - - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) - ) - human_evaluation = result.scalars().first() - if not human_evaluation: - raise NoResultFound(f"Human evaluation with id {evaluation_id} not found") - - for key, value in values_to_update.items(): - if hasattr(human_evaluation, key): - setattr(human_evaluation, key, value) - - await session.commit() - await session.refresh(human_evaluation) - - -async def delete_human_evaluation(evaluation_id: str): - """Delete the evaluation by its ID. - - Args: - evaluation_id (str): The ID of the evaluation to delete. - """ - - assert evaluation_id is not None, "evaluation_id cannot be None" - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationDB).filter_by(id=uuid.UUID(evaluation_id)) - ) - evaluation = result.scalars().first() - if not evaluation: - raise NoResultFound(f"Human evaluation with id {evaluation_id} not found") - - await session.delete(evaluation) - await session.commit() - - -async def create_human_evaluation_scenario( - inputs: List[HumanEvaluationScenarioInput], - project_id: str, - evaluation_id: str, - evaluation_extend: Dict[str, Any], -): - """ - Creates a human evaluation scenario. - - Args: - inputs (List[HumanEvaluationScenarioInput]): The inputs. - evaluation_id (str): The evaluation identifier. - evaluation_extend (Dict[str, any]): An extended required payload for the evaluation scenario. Contains score, vote, and correct_answer. - """ - - async with engine.core_session() as session: - evaluation_scenario = HumanEvaluationScenarioDB( - **evaluation_extend, - project_id=uuid.UUID(project_id), - evaluation_id=uuid.UUID(evaluation_id), - inputs=[input.model_dump() for input in inputs], - outputs=[], - ) - - session.add(evaluation_scenario) - await session.commit() - - -async def update_human_evaluation_scenario( - evaluation_scenario_id: str, values_to_update: dict -): - """Updates human evaluation scenario with the specified values. - - Args: - evaluation_scenario_id (str): The evaluation scenario ID - values_to_update (dict): The values to update - - Exceptions: - NoResultFound: if human evaluation scenario is not found - """ - - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationScenarioDB).filter_by( - id=uuid.UUID(evaluation_scenario_id) - ) - ) - human_evaluation_scenario = result.scalars().first() - if not human_evaluation_scenario: - raise NoResultFound( - f"Human evaluation scenario with id {evaluation_scenario_id} not found" - ) - - for key, value in values_to_update.items(): - if hasattr(human_evaluation_scenario, key): - setattr(human_evaluation_scenario, key, value) - - await session.commit() - await session.refresh(human_evaluation_scenario) - - -async def fetch_human_evaluation_scenarios(evaluation_id: str): - """ - Fetches human evaluation scenarios. - - Args: - evaluation_id (str): The evaluation identifier - - Returns: - The evaluation scenarios. - """ - - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationScenarioDB) - .filter_by(evaluation_id=uuid.UUID(evaluation_id)) - .order_by(asc(HumanEvaluationScenarioDB.created_at)) - ) - evaluation_scenarios = result.scalars().all() - return evaluation_scenarios - - -async def fetch_evaluation_scenarios(evaluation_id: str, project_id: str): - """ - Fetches evaluation scenarios. - - Args: - evaluation_id (str): The evaluation identifier - project_id (str): The ID of the project - - Returns: - The evaluation scenarios. - """ - - async with engine.core_session() as session: - result = await session.execute( - select(EvaluationScenarioDB) - .filter_by( - evaluation_id=uuid.UUID(evaluation_id), project_id=uuid.UUID(project_id) - ) - .options(joinedload(EvaluationScenarioDB.results)) - ) - evaluation_scenarios = result.unique().scalars().all() - return evaluation_scenarios - - -async def fetch_evaluation_scenario_by_id( - evaluation_scenario_id: str, -) -> Optional[EvaluationScenarioDB]: - """Fetches and evaluation scenario by its ID. - - Args: - evaluation_scenario_id (str): The ID of the evaluation scenario to fetch. - - Returns: - EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. - """ - - assert evaluation_scenario_id is not None, "evaluation_scenario_id cannot be None" - async with engine.core_session() as session: - result = await session.execute( - select(EvaluationScenarioDB).filter_by(id=uuid.UUID(evaluation_scenario_id)) - ) - evaluation_scenario = result.scalars().first() - return evaluation_scenario - - -async def fetch_human_evaluation_scenario_by_id( - evaluation_scenario_id: str, -) -> Optional[HumanEvaluationScenarioDB]: - """Fetches and evaluation scenario by its ID. - - Args: - evaluation_scenario_id (str): The ID of the evaluation scenario to fetch. - - Returns: - EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. - """ - - assert evaluation_scenario_id is not None, "evaluation_scenario_id cannot be None" - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationScenarioDB).filter_by( - id=uuid.UUID(evaluation_scenario_id) - ) - ) - evaluation_scenario = result.scalars().first() - return evaluation_scenario - - -async def fetch_human_evaluation_scenario_by_evaluation_id( - evaluation_id: str, -) -> Optional[HumanEvaluationScenarioDB]: - """Fetches and evaluation scenario by its ID. - Args: - evaluation_id (str): The ID of the evaluation object to use in fetching the human evaluation. - Returns: - EvaluationScenarioDB: The fetched evaluation scenario, or None if no evaluation scenario was found. - """ - - evaluation = await fetch_human_evaluation_by_id(evaluation_id) - async with engine.core_session() as session: - result = await session.execute( - select(HumanEvaluationScenarioDB).filter_by( - evaluation_id=evaluation.id # type: ignore - ) - ) - human_eval_scenario = result.scalars().first() - return human_eval_scenario - - -async def create_new_evaluation( - app: AppDB, - project_id: str, - testset: TestsetDB, - status: Result, - variant: str, - variant_revision: str, -) -> EvaluationDB: - """Create a new evaluation scenario. - Returns: - EvaluationScenarioDB: The created evaluation scenario. - """ - - async with engine.core_session() as session: - evaluation = EvaluationDB( - app_id=app.id, - project_id=uuid.UUID(project_id), - testset_id=testset.id, - status=status.model_dump(), - variant_id=uuid.UUID(variant), - variant_revision_id=uuid.UUID(variant_revision), - ) - - session.add(evaluation) - await session.commit() - await session.refresh( - evaluation, - attribute_names=[ - "testset", - "variant", - "variant_revision", - "aggregated_results", - ], - ) - - return evaluation - - -async def list_evaluations(app_id: str, project_id: str): - """Retrieves evaluations of the specified app from the db. - - Args: - app_id (str): The ID of the app - project_id (str): The ID of the project - """ - - async with engine.core_session() as session: - base_query = select(EvaluationDB).filter_by( - app_id=uuid.UUID(app_id), project_id=uuid.UUID(project_id) - ) - query = base_query.options( - joinedload(EvaluationDB.testset.of_type(TestsetDB)).load_only(TestsetDB.id, TestsetDB.name), # type: ignore - ) - - result = await session.execute( - query.options( - joinedload(EvaluationDB.variant.of_type(AppVariantDB)).load_only(AppVariantDB.id, AppVariantDB.variant_name), # type: ignore - joinedload(EvaluationDB.variant_revision.of_type(AppVariantRevisionsDB)).load_only(AppVariantRevisionsDB.revision), # type: ignore - joinedload( - EvaluationDB.aggregated_results.of_type( - EvaluationAggregatedResultDB - ) - ).joinedload(EvaluationAggregatedResultDB.evaluator_config), - ) - ) - evaluations = result.unique().scalars().all() - return evaluations - - -async def fetch_evaluations_by_resource( - resource_type: str, project_id: str, resource_ids: List[str] -): - """ - Fetches an evaluations by resource. - - Args: - resource_type (str): The resource type - project_id (str): The ID of the project - resource_ids (List[str]): The resource identifiers - - Returns: - The evaluations by resource. - - Raises: - HTTPException:400 resource_type {type} is not supported - """ - - ids = list(map(uuid.UUID, resource_ids)) - - async with engine.core_session() as session: - if resource_type == "variant": - result_evaluations = await session.execute( - select(EvaluationDB) - .filter( - EvaluationDB.variant_id.in_(ids), - EvaluationDB.project_id == uuid.UUID(project_id), - ) - .options(load_only(EvaluationDB.id)) # type: ignore - ) - result_human_evaluations = await session.execute( - select(HumanEvaluationDB) - .join(HumanEvaluationVariantDB) - .filter( - HumanEvaluationVariantDB.variant_id.in_(ids), - HumanEvaluationDB.project_id == uuid.UUID(project_id), - ) - .options(load_only(HumanEvaluationDB.id)) # type: ignore - ) - res_evaluations = list(result_evaluations.scalars().all()) - res_human_evaluations = list(result_human_evaluations.scalars().all()) - return res_evaluations + res_human_evaluations - - elif resource_type == "testset": - result_evaluations = await session.execute( - select(EvaluationDB) - .filter( - EvaluationDB.testset_id.in_(ids), - EvaluationDB.project_id == uuid.UUID(project_id), - ) - .options(load_only(EvaluationDB.id)) # type: ignore - ) - result_human_evaluations = await session.execute( - select(HumanEvaluationDB) - .filter( - HumanEvaluationDB.testset_id.in_(ids), - HumanEvaluationDB.project_id - == uuid.UUID(project_id), # Fixed to match HumanEvaluationDB - ) - .options(load_only(HumanEvaluationDB.id)) # type: ignore - ) - res_evaluations = list(result_evaluations.scalars().all()) - res_human_evaluations = list(result_human_evaluations.scalars().all()) - return res_evaluations + res_human_evaluations - - elif resource_type == "evaluator_config": - query = ( - select(EvaluationDB) - .join(EvaluationDB.evaluator_configs) - .filter( - EvaluationEvaluatorConfigDB.evaluator_config_id.in_(ids), - EvaluationDB.project_id == uuid.UUID(project_id), - ) - ) - result = await session.execute(query) - res = result.scalars().all() - return res - - raise HTTPException( - status_code=400, - detail=f"resource_type {resource_type} is not supported", - ) - - -async def delete_evaluations(evaluation_ids: List[str]) -> None: - """Delete evaluations based on the ids provided from the db. - - Args: - evaluations_ids (list[str]): The IDs of the evaluation - """ - - async with engine.core_session() as session: - query = select(EvaluationDB).where(EvaluationDB.id.in_(evaluation_ids)) - result = await session.execute(query) - evaluations = result.scalars().all() - for evaluation in evaluations: - await session.delete(evaluation) - await session.commit() - - -async def create_new_evaluation_scenario( - project_id: str, - evaluation_id: str, - variant_id: str, - inputs: List[EvaluationScenarioInput], - outputs: List[EvaluationScenarioOutput], - correct_answers: Optional[List[CorrectAnswer]], - is_pinned: Optional[bool], - note: Optional[str], - results: List[EvaluationScenarioResult], -) -> EvaluationScenarioDB: - """Create a new evaluation scenario. - - Returns: - EvaluationScenarioDB: The created evaluation scenario. - """ - - async with engine.core_session() as session: - evaluation_scenario = EvaluationScenarioDB( - project_id=uuid.UUID(project_id), - evaluation_id=uuid.UUID(evaluation_id), - variant_id=uuid.UUID(variant_id), - inputs=[input.model_dump() for input in inputs], - outputs=[output.model_dump() for output in outputs], - correct_answers=( - [correct_answer.model_dump() for correct_answer in correct_answers] - if correct_answers is not None - else [] - ), - is_pinned=is_pinned, - note=note, - ) - - session.add(evaluation_scenario) - await session.commit() - await session.refresh(evaluation_scenario) - - # create evaluation scenario result - for result in results: - evaluation_scenario_result = EvaluationScenarioResultDB( - evaluation_scenario_id=evaluation_scenario.id, - evaluator_config_id=uuid.UUID(result.evaluator_config), - result=result.result.model_dump(), - ) - - session.add(evaluation_scenario_result) - - await session.commit() # ensures that scenario results insertion is committed - await session.refresh(evaluation_scenario) - - return evaluation_scenario - - -async def update_evaluation_with_aggregated_results( - evaluation_id: str, aggregated_results: List[AggregatedResult] -): - async with engine.core_session() as session: - for result in aggregated_results: - aggregated_result = EvaluationAggregatedResultDB( - evaluation_id=uuid.UUID(evaluation_id), - evaluator_config_id=uuid.UUID(result.evaluator_config), - result=result.result.model_dump(), - ) - session.add(aggregated_result) - - await session.commit() - - -async def fetch_eval_aggregated_results(evaluation_id: str): - """ - Fetches an evaluation aggregated results by evaluation identifier. - - Args: - evaluation_id (str): The evaluation identifier - - Returns: - The evaluation aggregated results by evaluation identifier. - """ - - async with engine.core_session() as session: - base_query = select(EvaluationAggregatedResultDB).filter_by( - evaluation_id=uuid.UUID(evaluation_id) - ) - query = base_query.options( - joinedload( - EvaluationAggregatedResultDB.evaluator_config.of_type(EvaluatorConfigDB) - ).load_only( - EvaluatorConfigDB.id, # type: ignore - EvaluatorConfigDB.name, # type: ignore - EvaluatorConfigDB.evaluator_key, # type: ignore - EvaluatorConfigDB.settings_values, # type: ignore - EvaluatorConfigDB.created_at, # type: ignore - EvaluatorConfigDB.updated_at, # type: ignore - ) - ) - - result = await session.execute(query) - aggregated_results = result.scalars().all() - return aggregated_results - - -async def update_evaluation( - evaluation_id: str, project_id: str, updates: Dict[str, Any] -) -> Optional[EvaluationDB]: - """ - Update an evaluator configuration in the database with the provided id. - - Arguments: - evaluation_id (str): The ID of the evaluator configuration to be updated. - project_id (str): The ID of the project. - updates (Dict[str, Any]): The updates to apply to the evaluator configuration. - - Returns: - EvaluatorConfigDB: The updated evaluator configuration object. - """ - - async with engine.core_session() as session: - result = await session.execute( - select(EvaluationDB).filter_by( - id=uuid.UUID(evaluation_id), project_id=uuid.UUID(project_id) - ) - ) - evaluation = result.scalars().first() - for key, value in updates.items(): - if hasattr(evaluation, key): - setattr(evaluation, key, value) - - await session.commit() - await session.refresh(evaluation) - - return evaluation - - -async def check_if_evaluation_contains_failed_evaluation_scenarios( - evaluation_id: str, -) -> bool: - async with engine.core_session() as session: - EvaluationResultAlias = aliased(EvaluationScenarioResultDB) - query = ( - select(func.count(EvaluationScenarioDB.id)) - .join(EvaluationResultAlias, EvaluationScenarioDB.results) - .where( - EvaluationScenarioDB.evaluation_id == uuid.UUID(evaluation_id), - EvaluationResultAlias.result["type"].astext == "error", - ) - ) - - result = await session.execute(query) - count = result.scalar() - if not count: - return False - return count > 0 diff --git a/api/oss/src/services/evaluator_manager.py b/api/oss/src/services/evaluator_manager.py index 68f44ee3d4..0c7e7f8632 100644 --- a/api/oss/src/services/evaluator_manager.py +++ b/api/oss/src/services/evaluator_manager.py @@ -6,19 +6,19 @@ from oss.src.models.db_models import EvaluatorConfigDB from oss.src.models.converters import evaluator_config_db_to_pydantic from oss.src.resources.evaluators.evaluators import get_all_evaluators -from oss.src.models.api.evaluation_model import LegacyEvaluator, EvaluatorConfig +from oss.src.models.api.evaluation_model import Evaluator, EvaluatorConfig -def get_evaluators() -> List[LegacyEvaluator]: +def get_evaluators() -> List[Evaluator]: """ Fetches a list of evaluators from a JSON file. Returns: - List[LegacyEvaluator]: A list of evaluator objects. + List[Evaluator]: A list of evaluator objects. """ evaluators_as_dict = get_all_evaluators() - return [LegacyEvaluator(**evaluator_dict) for evaluator_dict in evaluators_as_dict] + return [Evaluator(**evaluator_dict) for evaluator_dict in evaluators_as_dict] async def get_evaluators_configs(project_id: str) -> List[EvaluatorConfig]: @@ -54,6 +54,7 @@ async def get_evaluator_config(evaluator_config: EvaluatorConfig) -> EvaluatorCo async def create_evaluator_config( project_id: str, + app_name: str, name: str, evaluator_key: str, settings_values: Optional[Dict[str, Any]] = None, @@ -74,6 +75,7 @@ async def create_evaluator_config( evaluator_config = await db_manager.create_evaluator_config( project_id=project_id, + app_name=app_name, name=name, evaluator_key=evaluator_key, settings_values=settings_values, @@ -147,6 +149,7 @@ async def create_ready_to_use_evaluators(project_id: str): ), f"'name' and 'key' does not exist in the evaluator: {evaluator}" await db_manager.create_evaluator_config( project_id=project_id, + app_name=None, name=evaluator.name, evaluator_key=evaluator.key, settings_values=settings_values, diff --git a/api/oss/src/services/evaluators_service.py b/api/oss/src/services/evaluators_service.py index 13e1538bc4..b1133eda9f 100644 --- a/api/oss/src/services/evaluators_service.py +++ b/api/oss/src/services/evaluators_service.py @@ -1,7 +1,7 @@ import re import json import traceback -from typing import Any, Dict, Union, List, Optional +from typing import Any, Dict, Union import litellm import httpx @@ -26,9 +26,6 @@ get_field_value_from_trace_tree, ) -from agenta.sdk.managers.secrets import SecretsManager - - log = get_module_logger(__name__) @@ -83,66 +80,6 @@ def validate_string_output( return final_output -def detect_prompt_variables( - prompt: Union[str, List[Dict[str, str]]], -) -> List[str]: - """ - Detects variable placeholders in a prompt string or message-based prompt. - Looks for patterns like {variable_name} or {{variable_name}} - - Args: - prompt: Either a string or a list of message dictionaries with 'content' field - - Returns: - List[str]: List of variable names found in the prompt - """ - import re - - # Match both single and double curly brace variables - pattern = r"\{+([a-zA-Z_][a-zA-Z0-9_.]*)\}+" - # log.info(f"Variable detection using pattern: {pattern}") - - if isinstance(prompt, list): - # For message-based prompts, search in all message contents - variables = set() - for i, message in enumerate(prompt): - if isinstance(message, dict) and "content" in message: - content = message["content"] - matches = re.findall(pattern, content) - variables.update(matches) - result = list(variables) - return result - else: - matches = re.findall(pattern, prompt) - result = list(set(matches)) - return result - - -def validate_prompt_variables( - prompt: Union[str, List[Dict[str, str]]], - inputs: Dict[str, Any], -) -> None: - """ - Validates that all variables in the prompt have corresponding values in inputs. - - Args: - prompt (str): The prompt string containing potential variables - inputs (Dict[str, Any]): The inputs dictionary that should contain variable values - - Raises: - ValueError: If any variable in the prompt is missing from inputs - """ - - variables = detect_prompt_variables(prompt) - missing_vars = [var for var in variables if var not in inputs] - - if missing_vars: - raise ValueError( - f"Prompt includes variables that are missing from inputs: {', '.join(missing_vars)}. " - "Please provide values for these variables in your inputs." - ) - - async def map( mapping_input: EvaluatorMappingInputInterface, ) -> EvaluatorMappingOutputInterface: @@ -177,9 +114,7 @@ async def map( def get_correct_answer( - data_point: Dict[str, Any], - settings_values: Dict[str, Any], - required: bool = True, + data_point: Dict[str, Any], settings_values: Dict[str, Any] ) -> Any: """ Helper function to retrieve the correct answer from the data point based on the settings values. @@ -187,29 +122,24 @@ def get_correct_answer( Args: data_point (Dict[str, Any]): The data point containing the correct answer. settings_values (Dict[str, Any]): The settings values containing the key for the correct answer. - required (bool, optional): Whether to raise an error if the column is missing. Defaults to ``True``. Returns: Any: The correct answer from the data point. Raises: - ValueError: If ``required`` is ``True`` and the correct answer column is missing in the data point. + ValueError: If the correct answer key is not provided or not found in the data point. """ correct_answer_key = settings_values.get("correct_answer_key") if correct_answer_key is None: - if required: - raise ValueError("No correct answer keys provided.") - return None + raise ValueError("No correct answer keys provided.") if isinstance(correct_answer_key, str) and correct_answer_key.startswith( "testcase." ): correct_answer_key = correct_answer_key[len("testcase.") :] if correct_answer_key not in data_point: - if required: - raise ValueError( - f"Correct answer column '{correct_answer_key}' not found in the testset." - ) - return None + raise ValueError( + f"Correct answer column '{correct_answer_key}' not found in the test set." + ) return data_point[correct_answer_key] @@ -482,7 +412,7 @@ async def auto_ai_critique( """ try: output = validate_string_output("ai_critique", output) - correct_answer = get_correct_answer(data_point, settings_values, required=False) + correct_answer = get_correct_answer(data_point, settings_values) inputs = { "prompt_user": app_params.get("prompt_user", ""), "prediction": output, @@ -503,8 +433,8 @@ async def auto_ai_critique( } ) ) - return Result(type="number", value=response["outputs"]["score"]) - except Exception as e: # pylint: disable=broad-except + return Result(type="text", value=str(response["outputs"]["score"])) + except Exception as e: # pylint: disable=broad-except∆`§ return Result( type="error", value=None, @@ -515,581 +445,17 @@ async def auto_ai_critique( ) -import json -import re -from typing import Any, Dict, Iterable, Tuple, Optional - -try: - import jsonpath # ✅ use module API - from jsonpath import JSONPointer # pointer class is fine to use -except Exception: - jsonpath = None - JSONPointer = None - -# ========= Scheme detection ========= - - -def detect_scheme(expr: str) -> str: - """Return 'json-path', 'json-pointer', or 'dot-notation' based on the placeholder prefix.""" - if expr.startswith("$"): - return "json-path" - if expr.startswith("/"): - return "json-pointer" - return "dot-notation" - - -# ========= Resolvers ========= - - -def resolve_dot_notation(expr: str, data: dict) -> object: - if "[" in expr or "]" in expr: - raise KeyError(f"Bracket syntax is not supported in dot-notation: {expr!r}") - - # First, check if the expression exists as a literal key (e.g., "topic.story" as a single key) - # This allows users to use dots in their variable names without nested access - if expr in data: - return data[expr] - - # If not found as a literal key, try to parse as dot-notation path - cur = data - for token in (p for p in expr.split(".") if p): - if isinstance(cur, list) and token.isdigit(): - cur = cur[int(token)] - else: - if not isinstance(cur, dict): - raise KeyError( - f"Cannot access key {token!r} on non-dict while resolving {expr!r}" - ) - if token not in cur: - raise KeyError(f"Missing key {token!r} while resolving {expr!r}") - cur = cur[token] - return cur - - -def resolve_json_path(expr: str, data: dict) -> object: - if jsonpath is None: - raise ImportError("python-jsonpath is required for json-path ($...)") - - if not (expr == "$" or expr.startswith("$.") or expr.startswith("$[")): - raise ValueError( - f"Invalid json-path expression {expr!r}. " - "Must start with '$', '$.' or '$[' (no implicit normalization)." - ) - - # Use package-level APIf - results = jsonpath.findall(expr, data) # always returns a list - return results[0] if len(results) == 1 else results - - -def resolve_json_pointer(expr: str, data: Dict[str, Any]) -> Any: - """Resolve a JSON Pointer; returns a single value.""" - if JSONPointer is None: - raise ImportError("python-jsonpath is required for json-pointer (/...)") - return JSONPointer(expr).resolve(data) - - -def resolve_any(expr: str, data: Dict[str, Any]) -> Any: - """Dispatch to the right resolver based on detected scheme.""" - scheme = detect_scheme(expr) - if scheme == "json-path": - return resolve_json_path(expr, data) - if scheme == "json-pointer": - return resolve_json_pointer(expr, data) - return resolve_dot_notation(expr, data) - - -# ========= Placeholder & coercion helpers ========= - -_PLACEHOLDER_RE = re.compile(r"\{\{\s*(.*?)\s*\}\}") - - -def extract_placeholders(template: str) -> Iterable[str]: - """Yield the inner text of all {{ ... }} occurrences (trimmed).""" - for m in _PLACEHOLDER_RE.finditer(template): - yield m.group(1).strip() - - -def coerce_to_str(value: Any) -> str: - """Pretty stringify values for embedding into templates.""" - if isinstance(value, (dict, list)): - return json.dumps(value, ensure_ascii=False) - return str(value) - - -def build_replacements( - placeholders: Iterable[str], data: Dict[str, Any] -) -> Tuple[Dict[str, str], set]: - """ - Resolve all placeholders against data. - Returns (replacements, unresolved_placeholders). - """ - replacements: Dict[str, str] = {} - unresolved: set = set() - for expr in set(placeholders): - try: - val = resolve_any(expr, data) - # Escape backslashes to avoid regex replacement surprises - replacements[expr] = coerce_to_str(val).replace("\\", "\\\\") - except Exception: - unresolved.add(expr) - return replacements, unresolved - - -def apply_replacements(template: str, replacements: Dict[str, str]) -> str: - """Replace {{ expr }} using a callback to avoid regex-injection issues.""" - - def _repl(m: re.Match) -> str: - expr = m.group(1).strip() - return replacements.get(expr, m.group(0)) - - return _PLACEHOLDER_RE.sub(_repl, template) - - -def compute_truly_unreplaced(original: set, rendered: str) -> set: - """Only count placeholders that were in the original template and remain.""" - now = set(extract_placeholders(rendered)) - return original & now - - -def missing_lib_hints(unreplaced: set) -> Optional[str]: - """Suggest installing python-jsonpath if placeholders indicate json-path or json-pointer usage.""" - if any(expr.startswith("$") or expr.startswith("/") for expr in unreplaced) and ( - jsonpath is None or JSONPointer is None - ): - return ( - "Install python-jsonpath to enable json-path ($...) and json-pointer (/...)" - ) - return None - - -def _format_with_template( - content: str, - format: str, - kwargs: Dict[str, Any], -) -> str: - """Internal method to format content based on template_format""" - try: - if format == "fstring": - return content.format(**kwargs) - - elif format == "jinja2": - from jinja2 import Template, TemplateError - - try: - return Template(content).render(**kwargs) - except TemplateError: - return content - - elif format == "curly": - original_placeholders = set(extract_placeholders(content)) - - replacements, _unresolved = build_replacements( - original_placeholders, - kwargs, - ) - - result = apply_replacements(content, replacements) - - truly_unreplaced = compute_truly_unreplaced(original_placeholders, result) - - if truly_unreplaced: - hint = missing_lib_hints(truly_unreplaced) - suffix = f" Hint: {hint}" if hint else "" - raise ValueError( - f"Template variables not found or unresolved: " - f"{', '.join(sorted(truly_unreplaced))}.{suffix}" - ) - - return result - - return content - except Exception as e: - log.error(f"Error during template formatting: {str(e)}") - return content - - async def ai_critique(input: EvaluatorInputInterface) -> EvaluatorOutputInterface: openai_api_key = input.credentials.get("OPENAI_API_KEY", None) anthropic_api_key = input.credentials.get("ANTHROPIC_API_KEY", None) litellm.openai_key = openai_api_key - litellm.anthropic_key = anthropic_api_key - litellm.drop_params = True - + litellm.anthropic_api_key = anthropic_api_key if not openai_api_key: raise Exception( "No OpenAI key was found. AI Critique evaluator requires a valid OpenAI API key to function. Please configure your OpenAI API and try again." ) - - # Validate prompt variables if there's a prompt in the inputs - if input.settings.get("prompt_template") and input.settings.get("version") not in [ - "3", - "4", - ]: - try: - validate_prompt_variables( - prompt=input.settings.get("prompt_template", []), - inputs=input.inputs, - ) - except ValueError as e: - raise e - if ( - input.settings.get("version") == "4" - ) and ( # this check is used when running in the background (celery) - type(input.settings.get("prompt_template", "")) is not str - ): # this check is used when running in the frontend (since in that case we'll alway have version 2) - try: - parameters = input.settings or dict() - - if not isinstance(parameters, dict): - parameters = dict() - - inputs = input.inputs or None - - if not isinstance(inputs, dict): - inputs = dict() - - outputs = input.inputs.get("prediction") or None - - if "ground_truth" in inputs: - del inputs["ground_truth"] - if "prediction" in inputs: - del inputs["prediction"] - - # ---------------------------------------------------------------- # - - correct_answer_key = parameters.get("correct_answer_key") - - prompt_template: List = parameters.get("prompt_template") or list() - - template_version = parameters.get("version") or "3" - - default_format = "fstring" if template_version == "2" else "curly" - - template_format = parameters.get("template_format") or default_format - - response_type = input.settings.get("response_type") or ( - "json_schema" if template_version == "4" else "text" - ) - - json_schema = input.settings.get("json_schema") or None - - json_schema = json_schema if response_type == "json_schema" else None - - response_format = dict(type=response_type) - - if response_type == "json_schema": - response_format["json_schema"] = json_schema - - model = parameters.get("model") or "gpt-4o-mini" - - correct_answer = None - - if inputs and isinstance(inputs, dict) and correct_answer_key: - correct_answer = inputs[correct_answer_key] - - secrets = await SecretsManager.retrieve_secrets() - - openai_api_key = None # secrets.get("OPENAI_API_KEY") - anthropic_api_key = None # secrets.get("ANTHROPIC_API_KEY") - openrouter_api_key = None # secrets.get("OPENROUTER_API_KEY") - cohere_api_key = None # secrets.get("COHERE_API_KEY") - azure_api_key = None # secrets.get("AZURE_API_KEY") - groq_api_key = None # secrets.get("GROQ_API_KEY") - - for secret in secrets: - if secret.get("kind") == "provider_key": - secret_data = secret.get("data", {}) - if secret_data.get("kind") == "openai": - provider_data = secret_data.get("provider", {}) - openai_api_key = provider_data.get("key") or openai_api_key - if secret_data.get("kind") == "anthropic": - provider_data = secret_data.get("provider", {}) - anthropic_api_key = ( - provider_data.get("key") or anthropic_api_key - ) - if secret_data.get("kind") == "openrouter": - provider_data = secret_data.get("provider", {}) - openrouter_api_key = ( - provider_data.get("key") or openrouter_api_key - ) - if secret_data.get("kind") == "cohere": - provider_data = secret_data.get("provider", {}) - cohere_api_key = provider_data.get("key") or cohere_api_key - if secret_data.get("kind") == "azure": - provider_data = secret_data.get("provider", {}) - azure_api_key = provider_data.get("key") or azure_api_key - if secret_data.get("kind") == "groq": - provider_data = secret_data.get("provider", {}) - groq_api_key = provider_data.get("key") or groq_api_key - - threshold = parameters.get("threshold") or 0.5 - - score = None - success = None - - litellm.openai_key = openai_api_key - litellm.anthropic_key = anthropic_api_key - litellm.openrouter_key = openrouter_api_key - litellm.cohere_key = cohere_api_key - litellm.azure_key = azure_api_key - litellm.groq_key = groq_api_key - - context: Dict[str, Any] = dict() - - if parameters: - context.update( - **{ - "parameters": parameters, - } - ) - - if correct_answer: - context.update( - **{ - "ground_truth": correct_answer, - "correct_answer": correct_answer, - "reference": correct_answer, - } - ) - - if outputs: - context.update( - **{ - "prediction": outputs, - "outputs": outputs, - } - ) - - if inputs: - context.update(**inputs) - context.update( - **{ - "inputs": inputs, - } - ) - - formatted_prompt_template = [ - { - "role": message["role"], - "content": _format_with_template( - content=message["content"], - format=template_format, - kwargs=context, - ), - } - for message in prompt_template - ] - - try: - response = await litellm.acompletion( - model=model, - messages=formatted_prompt_template, - temperature=0.01, - response_format=response_format, - ) - - _outputs = response.choices[0].message.content.strip() # type: ignore - - except litellm.AuthenticationError as e: # type: ignore - e.message = e.message.replace( - "litellm.AuthenticationError: AuthenticationError: ", "" - ) - raise e - - except Exception as e: - raise ValueError(f"AI Critique evaluation failed: {str(e)}") from e - # -------------------------------------------------------------------------- - - try: - _outputs = json.loads(_outputs) - except: - pass - - if isinstance(_outputs, (int, float)): - return EvaluatorOutputInterface( - outputs={ - "score": _outputs, - "success": _outputs >= threshold, - }, - ) - - if isinstance(_outputs, bool): - return EvaluatorOutputInterface( - outputs={ - "success": _outputs, - }, - ) - - if isinstance(_outputs, dict): - return EvaluatorOutputInterface( - outputs=_outputs, - ) - - raise ValueError(f"Could not parse output: {_outputs}") - except Exception as e: - raise RuntimeError(f"Evaluation failed: {str(e)}") - elif ( - input.settings.get("version") == "3" - ) and ( # this check is used when running in the background (celery) - type(input.settings.get("prompt_template", "")) is not str - ): # this check is used when running in the frontend (since in that case we'll alway have version 2) - try: - parameters = input.settings or dict() - - if not isinstance(parameters, dict): - parameters = dict() - - inputs = input.inputs or None - - if not isinstance(inputs, dict): - inputs = dict() - - outputs = input.inputs.get("prediction") or None - - if "ground_truth" in inputs: - del inputs["ground_truth"] - if "prediction" in inputs: - del inputs["prediction"] - - # ---------------------------------------------------------------- # - - correct_answer_key = parameters.get("correct_answer_key") - - prompt_template: List = parameters.get("prompt_template") or list() - - template_version = parameters.get("version") or "3" - - default_format = "fstring" if template_version == "2" else "curly" - - template_format = parameters.get("template_format") or default_format - - model = parameters.get("model") or "gpt-3.5-turbo" - - correct_answer = None - - if inputs and isinstance(inputs, dict) and correct_answer_key: - correct_answer = inputs[correct_answer_key] - - secrets = await SecretsManager.retrieve_secrets() - - openai_api_key = None # secrets.get("OPENAI_API_KEY") - anthropic_api_key = None # secrets.get("ANTHROPIC_API_KEY") - openrouter_api_key = None # secrets.get("OPENROUTER_API_KEY") - cohere_api_key = None # secrets.get("COHERE_API_KEY") - azure_api_key = None # secrets.get("AZURE_API_KEY") - groq_api_key = None # secrets.get("GROQ_API_KEY") - - for secret in secrets: - if secret.get("kind") == "provider_key": - secret_data = secret.get("data", {}) - if secret_data.get("kind") == "openai": - provider_data = secret_data.get("provider", {}) - openai_api_key = provider_data.get("key") or openai_api_key - if secret_data.get("kind") == "anthropic": - provider_data = secret_data.get("provider", {}) - anthropic_api_key = ( - provider_data.get("key") or anthropic_api_key - ) - if secret_data.get("kind") == "openrouter": - provider_data = secret_data.get("provider", {}) - openrouter_api_key = ( - provider_data.get("key") or openrouter_api_key - ) - if secret_data.get("kind") == "cohere": - provider_data = secret_data.get("provider", {}) - cohere_api_key = provider_data.get("key") or cohere_api_key - if secret_data.get("kind") == "azure": - provider_data = secret_data.get("provider", {}) - azure_api_key = provider_data.get("key") or azure_api_key - if secret_data.get("kind") == "groq": - provider_data = secret_data.get("provider", {}) - groq_api_key = provider_data.get("key") or groq_api_key - - threshold = parameters.get("threshold") or 0.5 - - score = None - success = None - - litellm.openai_key = openai_api_key - litellm.anthropic_key = anthropic_api_key - litellm.openrouter_key = openrouter_api_key - litellm.cohere_key = cohere_api_key - litellm.azure_key = azure_api_key - litellm.groq_key = groq_api_key - - context: Dict[str, Any] = dict() - - if parameters: - context.update( - **{ - "parameters": parameters, - } - ) - - if correct_answer: - context.update( - **{ - "ground_truth": correct_answer, - "correct_answer": correct_answer, - "reference": correct_answer, - } - ) - - if outputs: - context.update( - **{ - "prediction": outputs, - "outputs": outputs, - } - ) - - if inputs: - context.update(**inputs) - context.update( - **{ - "inputs": inputs, - } - ) - - formatted_prompt_template = [ - { - "role": message["role"], - "content": _format_with_template( - content=message["content"], - format=template_format, - kwargs=context, - ), - } - for message in prompt_template - ] - - response = await litellm.acompletion( - model=model, - messages=formatted_prompt_template, - temperature=0.01, - ) - outputs = response.choices[0].message.content.strip() - try: - score = float(outputs) - - success = score >= threshold - - return EvaluatorOutputInterface( - outputs={"score": score, "success": success}, - ) - except ValueError: - # if the output is not a float, we try to extract a float from the text - match = re.search(r"[-+]?\d*\.\d+|\d+", outputs) - if match: - score = float(match.group()) - return EvaluatorOutputInterface(outputs={"score": score}) - else: - raise ValueError(f"Could not parse output as float: {outputs}") - except Exception as e: - raise RuntimeError(f"Evaluation failed: {str(e)}") - elif ( - input.settings.get("version") == "2" + input.settings.get("version", "1") == "2" ) and ( # this check is used when running in the background (celery) type(input.settings.get("prompt_template", "")) is not str ): # this check is used when running in the frontend (since in that case we'll alway have version 2) @@ -1134,8 +500,7 @@ async def ai_critique(input: EvaluatorInputInterface) -> EvaluatorOutputInterfac model="gpt-3.5-turbo", messages=messages, temperature=0.8 ) evaluation_output = response.choices[0].message.content.strip() - - return {"outputs": {"score": float(evaluation_output)}} + return {"outputs": {"score": evaluation_output}} async def auto_starts_with( @@ -1154,7 +519,7 @@ async def auto_starts_with( **{"inputs": inputs, "settings": settings_values} ) ) - return Result(type="bool", value=response["outputs"]["success"]) + return Result(type="text", value=response["outputs"]["success"]) except Exception as e: # pylint: disable=broad-except return Result( type="error", @@ -1637,7 +1002,7 @@ async def rag_faithfulness( ) if None in [question_val, answer_val, contexts_val]: - log.warn( + log.error( f"Missing trace field ? {['question', question_val is None, 'answer', answer_val is None, 'context', contexts_val is None]}" ) @@ -1750,7 +1115,7 @@ async def rag_context_relevancy( ) if None in [question_val, answer_val, contexts_val]: - log.warn( + log.error( f"Missing trace field ? {['question', question_val is None, 'answer', answer_val is None, 'context', contexts_val is None]}" ) @@ -1843,7 +1208,7 @@ async def auto_levenshtein_distance( ) ) if "success" in response["outputs"]: - return Result(type="bool", value=response["outputs"]["success"]) + return Result(type="number", value=response["outputs"]["success"]) return Result(type="number", value=response["outputs"]["score"]) except ValueError as e: @@ -1928,8 +1293,6 @@ async def semantic_similarity( float: the semantic similarity score """ - correct_answer_key = input.settings.get("correct_answer_key", "correct_answer") - openai_api_key = input.credentials.get("OPENAI_API_KEY", None) if not openai_api_key: raise HTTPException( @@ -1948,8 +1311,8 @@ async def encode(text: str): def cosine_similarity(output_vector: array, correct_answer_vector: array) -> float: return np.dot(output_vector, correct_answer_vector) - output_vector = await encode(input.inputs.get("prediction", "")) - correct_answer_vector = await encode(input.inputs.get(correct_answer_key, "")) + output_vector = await encode(input.inputs["prediction"]) + correct_answer_vector = await encode(input.inputs["ground_truth"]) similarity_score = cosine_similarity(output_vector, correct_answer_vector) return {"outputs": {"score": similarity_score}} @@ -2061,7 +1424,7 @@ async def evaluate( type="error", value=None, error=Error( - message=f"Error occurred while running {evaluator_key} evaluation. ", + message="Error occurred while running {evaluator_key} evaluation. ", stacktrace=str(exc), ), ) diff --git a/api/oss/src/services/exceptions.py b/api/oss/src/services/exceptions.py index e7cf57aadb..47c5d37d57 100644 --- a/api/oss/src/services/exceptions.py +++ b/api/oss/src/services/exceptions.py @@ -83,13 +83,11 @@ def __init__( super().__init__(self.code, self.detail) -class GatewayTimeoutException(HTTPException): - def __init__( - self, - code: int = 504, - detail: str = "Gateway Timeout", - ): - self.code = code - self.detail = detail +class SuperTokensNotAllowedException(APIResponse): + status: str = "SIGN_UP_NOT_ALLOWED" - super().__init__(self.code, self.detail) + def __init__(self, message: str): + self.message = message + + def to_json(self): + return {"status": self.status, "detail": self.message} diff --git a/api/oss/src/services/llm_apps_service.py b/api/oss/src/services/llm_apps_service.py index b1d8ab5995..edc5c17700 100644 --- a/api/oss/src/services/llm_apps_service.py +++ b/api/oss/src/services/llm_apps_service.py @@ -9,9 +9,8 @@ from oss.src.utils import common from oss.src.services import helpers from oss.src.services.auth_helper import sign_secret_token -from oss.src.services.db_manager import get_project_by_id -from oss.src.apis.fastapi.tracing.utils import make_hash_id from oss.src.models.shared_models import InvokationResult, Result, Error +from oss.src.services.db_manager import get_project_by_id log = get_module_logger(__name__) @@ -37,7 +36,6 @@ def extract_result_from_response(response: dict): value = None latency = None cost = None - tokens = None try: # Validate input @@ -75,9 +73,6 @@ def extract_result_from_response(response: dict): cost = get_nested_value( trace_tree, ["metrics", "acc", "costs", "total"] ) - tokens = get_nested_value( - trace_tree, ["metrics", "acc", "tokens", "total"] - ) # Handle version 2.0 response elif response.get("version") == "2.0": @@ -86,16 +81,14 @@ def extract_result_from_response(response: dict): value["data"] = str(value.get("data")) if "trace" in response: - latency = response["trace"].get("latency", None) - cost = response["trace"].get("cost", None) - tokens = response["trace"].get("tokens", None) + latency = response["trace"].get("latency") + cost = response["trace"].get("cost") # Handle generic response (neither 2.0 nor 3.0) else: value = {"data": str(response.get("message", ""))} - latency = response.get("latency", None) - cost = response.get("cost", None) - tokens = response.get("tokens", None) + latency = response.get("latency") + cost = response.get("cost") # Determine the type of 'value' (either 'text' or 'object') kind = "text" if isinstance(value, str) else "object" @@ -120,7 +113,7 @@ def extract_result_from_response(response: dict): value = {"error": f"Unexpected error: {e}"} kind = "error" - return value, kind, cost, tokens, latency + return value, kind, cost, latency async def make_payload( @@ -189,6 +182,7 @@ async def make_payload( payload["messages"] = messages except Exception as e: # pylint: disable=broad-exception-caught log.warn(f"Error making payload: {e}") + log.debug(f"Exception details: {traceback.format_exc()}") payload["inputs"] = inputs @@ -202,7 +196,6 @@ async def invoke_app( openapi_parameters: List[Dict], user_id: str, project_id: str, - scenario_id: Optional[str] = None, **kwargs, ) -> InvokationResult: """ @@ -248,14 +241,7 @@ async def invoke_app( app_response = {} try: - log.info( - "Invoking application...", - scenario_id=scenario_id, - testcase_id=( - datapoint["testcase_id"] if "testcase_id" in datapoint else None - ), - url=url, - ) + log.info("Invoking workflow...", url=url) response = await client.post( url, json=payload, @@ -265,22 +251,7 @@ async def invoke_app( app_response = await response.json() response.raise_for_status() - ( - value, - kind, - cost, - tokens, - latency, - ) = extract_result_from_response(app_response) - - trace_id = app_response.get("trace_id", None) - span_id = app_response.get("span_id", None) - - log.info( - "Invoked application. ", - scenario_id=scenario_id, - trace_id=trace_id, - ) + value, kind, cost, latency = extract_result_from_response(app_response) return InvokationResult( result=Result( @@ -290,9 +261,6 @@ async def invoke_app( ), latency=latency, cost=cost, - tokens=tokens, - trace_id=trace_id, - span_id=span_id, ) except aiohttp.ClientResponseError as e: @@ -342,7 +310,6 @@ async def run_with_retry( openapi_parameters: List[Dict], user_id: str, project_id: str, - scenario_id: Optional[str] = None, **kwargs, ) -> InvokationResult: """ @@ -361,13 +328,6 @@ async def run_with_retry( """ - if "references" in kwargs and "testcase_id" in input_data: - kwargs["references"]["testcase"] = {"id": input_data["testcase_id"]} - - references = kwargs.get("references", None) - links = kwargs.get("links", None) - # hash_id = make_hash_id(references=references, links=links) - retries = 0 last_exception = None while retries < max_retry_count: @@ -379,7 +339,6 @@ async def run_with_retry( openapi_parameters, user_id, project_id, - scenario_id, **kwargs, ) return result @@ -419,7 +378,6 @@ async def batch_invoke( rate_limit_config: Dict, user_id: str, project_id: str, - scenarios: Optional[List[Dict]] = None, **kwargs, ) -> List[InvokationResult]: """ @@ -514,7 +472,6 @@ async def batch_invoke( openapi_parameters, user_id, project_id, - scenarios[index].get("id") if scenarios else None, **kwargs, ) ) diff --git a/api/oss/src/services/organization_service.py b/api/oss/src/services/organization_service.py index 030ce6bd3f..0d3ff47b1d 100644 --- a/api/oss/src/services/organization_service.py +++ b/api/oss/src/services/organization_service.py @@ -1,6 +1,5 @@ import secrets from datetime import datetime, timedelta, timezone -from urllib.parse import quote from fastapi import HTTPException @@ -37,14 +36,14 @@ async def check_existing_invitation(project_id: str, email: str): and str(invitation.project_id) == project_id ): if invitation.expiration_date > datetime.now(timezone.utc): - return invitation, None + return invitation else: - role = invitation.role + # Existing invitation is expired, delete it await db_manager.delete_invitation(str(invitation.id)) - return None, role + return None - return None, None + return None async def check_valid_invitation(project_id: str, email: str, token: str): @@ -95,29 +94,16 @@ async def send_invitation_email( bool: True if the email was sent successfully, False otherwise. """ - token_param = quote(token, safe="") - email_param = quote(email, safe="") - org_param = quote(str(organization_id), safe="") - workspace_param = quote(str(workspace_id), safe="") - project_param = quote(project_id, safe="") - - invite_link = ( - f"{env.AGENTA_WEB_URL}/auth" - f"?token={token_param}" - f"&email={email_param}" - f"&organization_id={org_param}" - f"&workspace_id={workspace_param}" - f"&project_id={project_param}" - ) + invitation_link = f"""{env.AGENTA_WEB_URL}/auth?token={token}&org_id={organization_id}&project_id={project_id}&workspace_id={workspace_id}&email={email}""" if not env.SENDGRID_API_KEY: - return invite_link + return invitation_link html_template = email_service.read_email_template("./templates/send_email.html") html_content = html_template.format( username_placeholder=user.username, action_placeholder="invited you to join", workspace_placeholder="their organization", - call_to_action=f"""Click the link below to accept the invitation:</p><br><a href="{env.AGENTA_WEB_URL}/auth?token={token}&organization_id={organization_id}&project_id={project_id}&workspace_id={workspace_id}&email={email}">Accept Invitation</a>""", + call_to_action=f"""Click the link below to accept the invitation:</p><br><a href="{env.AGENTA_WEB_URL}/auth?token={token}&org_id={organization_id}&project_id={project_id}&workspace_id={workspace_id}&email={email}">Accept Invitation</a>""", ) if not env.AGENTA_SEND_EMAIL_FROM_ADDRESS: @@ -186,10 +172,10 @@ async def invite_user_to_organization( ) # Check if the user is already a member of the workspace - existing_invitation, existing_role = await check_existing_invitation( + existing_invitation = await check_existing_invitation( project_id=project_id, email=payload.email ) - if existing_invitation or existing_role: + if existing_invitation is not None: raise HTTPException( status_code=400, detail="User is already a member of the workspace", @@ -233,7 +219,7 @@ async def resend_user_organization_invite( Args: user_uid (str): The user uid. - organization_id (str): The ID of the organization to invite the user to. + org_id (str): The ID of the organization to invite the user to. project_id (str): The ID of the project that belongs to the workspace/organization. payload (ResendInviteRequest): The payload containing the email address of the user to invite. """ @@ -241,12 +227,10 @@ async def resend_user_organization_invite( user_performing_action = await db_manager.get_user_with_id(user_id=user_id) # Check if the email address already has a valid, unused invitation for the workspace - existing_invitation, existing_role = await check_existing_invitation( - project_id, payload.email - ) - if existing_invitation: + existing_invitation = await check_existing_invitation(project_id, payload.email) + if existing_invitation is not None: invitation = existing_invitation - elif existing_role: + else: # Create a new invitation invitation = await create_invitation("editor", project_id, payload.email) @@ -297,8 +281,10 @@ async def accept_organization_invitation( try: user_exists = await db_manager.get_user_with_email(email=email) - if user_exists is None: - raise HTTPException(status_code=400, detail="User does not exist") + if user_exists is not None: + raise HTTPException( + status_code=400, detail="User is already a member of the organization" + ) project_db = await db_manager.get_project_by_organization_id( organization_id=organization_id diff --git a/api/oss/src/services/security/sandbox.py b/api/oss/src/services/security/sandbox.py index 2e4bd03ca5..ac8bf728ab 100644 --- a/api/oss/src/services/security/sandbox.py +++ b/api/oss/src/services/security/sandbox.py @@ -64,6 +64,7 @@ def execute_code_safely( "datetime", "json", "requests", + "numpy", "typing", ] diff --git a/api/oss/src/services/user_service.py b/api/oss/src/services/user_service.py index 129efe96a3..43671d5be4 100644 --- a/api/oss/src/services/user_service.py +++ b/api/oss/src/services/user_service.py @@ -62,7 +62,7 @@ async def update_user(user_uid: str, payload: UserUpdate) -> UserDB: if not user: raise NoResultFound(f"User with session id {user_uid} not found.") - for key, value in payload.dict(exclude_unset=True).items(): + for key, value in payload.dict(exclude_unset=True): if hasattr(user, key): setattr(user, key, value) diff --git a/api/oss/src/services/variants_manager.py b/api/oss/src/services/variants_manager.py index f9d8c0d5bb..a4b92bdede 100644 --- a/api/oss/src/services/variants_manager.py +++ b/api/oss/src/services/variants_manager.py @@ -6,9 +6,7 @@ from oss.src.utils.logging import get_module_logger from oss.src.services import db_manager -from oss.src.services import app_manager from oss.src.utils.exceptions import suppress -from oss.src.models.shared_models import AppType from oss.src.services.db_manager import ( AppDB, DeploymentDB, @@ -22,7 +20,7 @@ get_user_with_id, fetch_base_by_id, fetch_app_by_id, - fetch_app_by_name, + fetch_app_by_name_and_parameters, fetch_app_variant_by_id, fetch_app_variant_revision_by_id, fetch_app_variant_by_config_name_and_appid, @@ -35,11 +33,6 @@ add_variant_from_base_and_config, update_variant_parameters, deploy_to_environment, - create_new_variant_base, - create_deployment, - update_base, - create_new_app_variant, - create_new_config, ) @@ -76,7 +69,7 @@ def model_dump(self, *args, **kwargs) -> dict: return self.encode(super().model_dump(*args, **kwargs)) -class LegacyLifecycleDTO(BaseModel): +class LifecycleDTO(BaseModel): created_at: Optional[str] = None updated_at: Optional[str] = None updated_by_id: Optional[str] = None @@ -95,10 +88,10 @@ class ConfigDTO(BaseModel): variant_ref: Optional[ReferenceDTO] = None environment_ref: Optional[ReferenceDTO] = None # ---- - application_lifecycle: Optional[LegacyLifecycleDTO] = None - service_lifecycle: Optional[LegacyLifecycleDTO] = None - variant_lifecycle: Optional[LegacyLifecycleDTO] = None - environment_lifecycle: Optional[LegacyLifecycleDTO] = None + application_lifecycle: Optional[LifecycleDTO] = None + service_lifecycle: Optional[LifecycleDTO] = None + variant_lifecycle: Optional[LifecycleDTO] = None + environment_lifecycle: Optional[LifecycleDTO] = None # - HERLPERS @@ -117,7 +110,7 @@ async def _fetch_app( app_id=app_id.hex, ) elif app_name: - app = await fetch_app_by_name( + app = await fetch_app_by_name_and_parameters( project_id=project_id, app_name=app_name, ) @@ -180,7 +173,7 @@ async def _fetch_variant( and variant_ref.slug ): if not application_ref.id and application_ref.slug: - app = await fetch_app_by_name( + app = await fetch_app_by_name_and_parameters( project_id=project_id, app_name=application_ref.slug, ) @@ -326,7 +319,7 @@ async def _fetch_environment( and environment_ref.slug ): if not application_ref.id and application_ref.slug: - app = await fetch_app_by_name( + app = await fetch_app_by_name_and_parameters( project_id=project_id, app_name=application_ref.slug, ) @@ -353,7 +346,7 @@ async def _fetch_environment( # as opposed to the latest version of a variant which is indicated by a version number # coming from the app_variant revision. - with suppress(verbose=False): + with suppress(): ( app_environment_revision, version, @@ -375,69 +368,6 @@ async def _fetch_environment( return app_environment, app_environment_revision -async def add_variant_from_base_and_config_v2( - base_db, - new_config_name: str, - parameters: Dict[str, Any], - user_uid: str, - project_id: str, - commit_message: Optional[str] = None, -): - """ - Create a new variant from base and config without requiring previous variants. - - This is a replacement for add_variant_from_base_and_config that doesn't depend - on existing variants, making it suitable for creating the first variant for a base. - - Args: - base_db: The base to create the variant from - new_config_name (str): Name for the new variant/config - parameters (Dict[str, Any]): Parameters for the variant - user_uid (str): User ID creating the variant - project_id (str): Project ID - commit_message (Optional[str]): Commit message - - Returns: - AppVariantDB: The created variant - """ - try: - # Create config (always empty initially for v0, per create_new_app_variant requirement) - config = await create_new_config( - config_name=new_config_name, - parameters={}, # Always empty for create_new_app_variant for v0 - ) - - user = await get_user_with_id(user_id=user_uid) - app = await fetch_app_by_id(app_id=str(base_db.app_id)) - - app_variant = await create_new_app_variant( - app=app, - user=user, - variant_name=new_config_name, - project_id=project_id, - base=base_db, - config=config, - base_name=base_db.base_name, - commit_message=commit_message, - ) - - # If we have parameters, we create a new revision (v1) with the parameters - if parameters: - app_variant = await update_variant_parameters( - app_variant_id=str(app_variant.id), - parameters=parameters, - user_uid=user_uid, - project_id=project_id, - commit_message=commit_message, - ) - - return app_variant - - except Exception as e: - log.error(f"Failed to create variant from base {base_db.id}: {str(e)}") - raise - - async def _create_variant( project_id: str, user_id: str, @@ -460,7 +390,7 @@ async def _create_variant( app_variant = None with suppress(): - app_variant = await add_variant_from_base_and_config_v2( + app_variant = await add_variant_from_base_and_config( base_db=variant_base, new_config_name=slug, parameters=params, @@ -520,76 +450,6 @@ async def _update_environment( ) -async def _get_app_service_url(app: AppDB) -> Optional[str]: - """Get service URL for an app. - - Args: - app (AppDB): The app to get service URL for - - Returns: - Optional[str]: Service URL for SERVICE apps, None for CUSTOM apps - """ - if not app.app_type: - # Default to CUSTOM if no app_type is set - return None - - if app.app_type in [AppType.CHAT_SERVICE, AppType.COMPLETION_SERVICE]: - # SERVICE apps have service URLs - return app_manager.get_service_url_from_template_key(app.app_type) - else: - # CUSTOM apps and legacy types don't have service URLs - return None - - -async def _create_first_base_for_app( - app: AppDB, - project_id: str, - user_id: str, - base_name: str = "default", -) -> Optional[UUID]: - """Create the first base for an app that has no bases. - - Args: - app (AppDB): The app to create a base for - project_id (str): Project ID - user_id (str): User ID creating the base - base_name (str): Name for the base (default: "default") - - Returns: - Optional[UUID]: The ID of the created base, or None if creation failed - """ - try: - service_url = await _get_app_service_url(app) - - db_base = await create_new_variant_base( - app=app, - project_id=project_id, - base_name=base_name, - ) - - # Always create deployment (SERVICE apps get service URL, CUSTOM apps get empty URI) - deployment_uri = service_url if service_url else "" - - deployment = await create_deployment( - app_id=str(app.id), - project_id=project_id, - uri=deployment_uri, - ) - - await update_base( - str(db_base.id), - deployment_id=deployment.id, - ) - - return db_base.id - - except Exception as e: - log.error(f"Failed to create first base for app {app.app_name}: {str(e)}") - return None - - return None - - # - CREATE @@ -599,13 +459,7 @@ async def add_config( application_ref: ReferenceDTO, user_id: str, ) -> Optional[ConfigDTO]: - if not variant_ref.slug: - log.error("Variant slug is required for creating a config") - return None - - if not project_id or not user_id: - log.error("Project ID and user ID are required for creating a config") - return None + log.warn("[ADD] Fetching: app") app = await _fetch_app( project_id=project_id, @@ -614,10 +468,14 @@ async def add_config( ) if not app: - log.error(f"App not found for application_ref: {application_ref}") + log.warn("[ADD] App not found.") + return None # --> FETCHING: bases + log.warn(f"[ADD] Found app: {str(app.id)}") + log.warn("[ADD] Fetching: bases") + bases = None with suppress(): @@ -627,19 +485,14 @@ async def add_config( ) if not bases or not isinstance(bases, list) or len(bases) < 1: - # No bases exist for this app - create the first base based on app type - base_id = await _create_first_base_for_app( - app=app, - project_id=project_id, - user_id=user_id, - base_name="default", - ) + return None - if not base_id: - log.error(f"Failed to create first base for app {app.app_name}") - return None - else: - base_id = bases[0].id # use the first available base + base_id = bases[0].id # needs to be changed to use the 'default base' + + log.warn("[ADD] Creating: variant") + + if not variant_ref.slug: + return None variant_slug, variant_version = await _create_variant( project_id=project_id, @@ -650,8 +503,7 @@ async def add_config( commit_message=variant_ref.commit_message, ) - if variant_slug is None or variant_version is None: - log.error("Failed to create variant - variant_slug or variant_version is None") + if not (variant_slug and variant_version): return None variant_ref = ReferenceDTO( @@ -720,7 +572,7 @@ async def fetch_configs_by_application_ref( ), environment_ref=None, # - variant_lifecycle=LegacyLifecycleDTO( + variant_lifecycle=LifecycleDTO( created_at=variant_latest_version.created_at.isoformat(), updated_at=variant_latest_version.updated_at.isoformat(), updated_by_id=str(variant_latest_version.modified_by.id), @@ -768,7 +620,7 @@ async def fetch_configs_by_variant_ref( ), environment_ref=None, # - variant_lifecycle=LegacyLifecycleDTO( + variant_lifecycle=LifecycleDTO( created_at=variant_version.created_at.isoformat(), updated_at=variant_version.updated_at.isoformat(), updated_by_id=str(variant_version.modified_by.id), @@ -838,7 +690,7 @@ async def fetch_config_by_variant_ref( ), environment_ref=None, # - variant_lifecycle=LegacyLifecycleDTO( + variant_lifecycle=LifecycleDTO( created_at=app_variant_revision.created_at.isoformat(), updated_at=app_variant.updated_at.isoformat(), updated_by_id=_user_id, @@ -897,7 +749,7 @@ async def fetch_config_by_environment_ref( _user_id = str(user.id) _user_email = user.email - config.environment_lifecycle = LegacyLifecycleDTO( + config.environment_lifecycle = LifecycleDTO( created_at=app_environment_revision.created_at.isoformat(), updated_at=app_environment_revision.created_at.isoformat(), updated_by_id=_user_id, @@ -934,7 +786,7 @@ async def fork_config_by_variant_ref( slug=( variant_ref.slug if variant_ref.slug - else app_variant.config_name + "_" + uuid4().hex[-12:] + else app_variant.config_name + "_" + uuid4().hex[20:] ), params=app_variant_revision.config_parameters, base_id=app_variant.base_id, diff --git a/api/oss/src/tasks/evaluations/batch.py b/api/oss/src/tasks/evaluations/batch.py deleted file mode 100644 index 324ed74e49..0000000000 --- a/api/oss/src/tasks/evaluations/batch.py +++ /dev/null @@ -1,258 +0,0 @@ -from typing import Dict, List, Optional -from uuid import UUID -import asyncio -import traceback -from json import dumps - -from celery import shared_task, states, Task - -from fastapi import Request - -from oss.src.utils.helpers import parse_url, get_slug_from_name_and_id -from oss.src.utils.logging import get_module_logger -from oss.src.utils.common import is_ee -from oss.src.services.auth_helper import sign_secret_token -from oss.src.services import llm_apps_service -from oss.src.models.shared_models import InvokationResult -from oss.src.services.db_manager import ( - fetch_app_by_id, - fetch_app_variant_by_id, - fetch_app_variant_revision_by_id, - get_deployment_by_id, - get_project_by_id, -) -from oss.src.core.secrets.utils import get_llm_providers_secrets - -if is_ee(): - from ee.src.utils.entitlements import check_entitlements, Counter - -from oss.src.dbs.postgres.queries.dbes import ( - QueryArtifactDBE, - QueryVariantDBE, - QueryRevisionDBE, -) -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) -from oss.src.dbs.postgres.workflows.dbes import ( - WorkflowArtifactDBE, - WorkflowVariantDBE, - WorkflowRevisionDBE, -) - -from oss.src.dbs.postgres.tracing.dao import TracingDAO -from oss.src.dbs.postgres.blobs.dao import BlobsDAO -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.dbs.postgres.evaluations.dao import EvaluationsDAO - -from oss.src.core.tracing.service import TracingService -from oss.src.core.queries.service import QueriesService -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.testsets.service import TestsetsService -from oss.src.core.testsets.service import SimpleTestsetsService -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService -from oss.src.core.evaluations.service import EvaluationsService -from oss.src.core.annotations.service import AnnotationsService - -# from oss.src.apis.fastapi.tracing.utils import make_hash_id -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.testsets.router import SimpleTestsetsRouter -from oss.src.apis.fastapi.evaluators.router import SimpleEvaluatorsRouter -from oss.src.apis.fastapi.annotations.router import AnnotationsRouter - -from oss.src.core.annotations.types import ( - AnnotationOrigin, - AnnotationKind, - AnnotationChannel, -) -from oss.src.apis.fastapi.annotations.models import ( - AnnotationCreate, - AnnotationCreateRequest, -) - -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationResultCreate, - EvaluationMetricsCreate, -) - -from oss.src.core.shared.dtos import Reference -from oss.src.core.tracing.dtos import ( - Filtering, - Windowing, - Formatting, - Format, - Focus, - TracingQuery, -) -from oss.src.core.workflows.dtos import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceResponse, - WorkflowServiceInterface, - WorkflowRevisionData, - WorkflowRevision, - WorkflowVariant, - Workflow, -) - -from oss.src.core.queries.dtos import ( - QueryRevision, - QueryVariant, - Query, -) - -from oss.src.core.workflows.dtos import Tree - -from oss.src.core.evaluations.utils import get_metrics_keys_from_schema - - -log = get_module_logger(__name__) - - -# DBS -------------------------------------------------------------------------- - -tracing_dao = TracingDAO() - -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, -) - -queries_dao = GitDAO( - ArtifactDBE=QueryArtifactDBE, - VariantDBE=QueryVariantDBE, - RevisionDBE=QueryRevisionDBE, -) - -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) - -workflows_dao = GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, -) - -evaluations_dao = EvaluationsDAO() - -# CORE ------------------------------------------------------------------------- - -tracing_service = TracingService( - tracing_dao=tracing_dao, -) - -queries_service = QueriesService( - queries_dao=queries_dao, -) - -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) - -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) - -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) - -workflows_service = WorkflowsService( - workflows_dao=workflows_dao, -) - -evaluators_service = EvaluatorsService( - workflows_service=workflows_service, -) - -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, -) - -evaluations_service = EvaluationsService( - evaluations_dao=evaluations_dao, - tracing_service=tracing_service, - queries_service=queries_service, - testsets_service=testsets_service, - evaluators_service=evaluators_service, -) - -# APIS ------------------------------------------------------------------------- - -tracing_router = TracingRouter( - tracing_service=tracing_service, -) - -simple_testsets_router = SimpleTestsetsRouter( - simple_testsets_service=simple_testsets_service, -) # TODO: REMOVE/REPLACE ONCE TRANSFER IS MOVED TO 'core' - -simple_evaluators_router = SimpleEvaluatorsRouter( - simple_evaluators_service=simple_evaluators_service, -) # TODO: REMOVE/REPLACE ONCE TRANSFER IS MOVED TO 'core' - -annotations_service = AnnotationsService( - tracing_router=tracing_router, - evaluators_service=evaluators_service, - simple_evaluators_service=simple_evaluators_service, -) - -annotations_router = AnnotationsRouter( - annotations_service=annotations_service, -) # TODO: REMOVE/REPLACE ONCE ANNOTATE IS MOVED TO 'core' - -# ------------------------------------------------------------------------------ - - -@shared_task( - name="src.tasks.evaluations.batch.evaluate_testsets", - queue="src.tasks.evaluations.batch.evaluate_testsets", - bind=True, -) -def evaluate_testsets( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, -): - pass - - -@shared_task( - name="src.tasks.evaluations.batch.evaluate_queries", - queue="src.tasks.evaluations.batch.evaluate_queries", - bind=True, -) -def evaluate_queries( - self: Task, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, -): - pass diff --git a/api/oss/src/tasks/evaluations/legacy.py b/api/oss/src/tasks/evaluations/legacy.py deleted file mode 100644 index d3bc69f9cc..0000000000 --- a/api/oss/src/tasks/evaluations/legacy.py +++ /dev/null @@ -1,1558 +0,0 @@ -from typing import Dict, List, Optional, Any -from uuid import UUID -from json import dumps -from asyncio import get_event_loop - -from celery import shared_task, states - -from fastapi import Request - -from oss.src.utils.helpers import parse_url, get_slug_from_name_and_id -from oss.src.utils.logging import get_module_logger -from oss.src.utils.common import is_ee -from oss.src.services.auth_helper import sign_secret_token -from oss.src.services import llm_apps_service -from oss.src.models.shared_models import InvokationResult -from oss.src.services.db_manager import ( - fetch_app_by_id, - fetch_app_variant_by_id, - fetch_app_variant_revision_by_id, - fetch_evaluator_config, - get_deployment_by_id, - get_project_by_id, -) -from oss.src.core.secrets.utils import get_llm_providers_secrets - -if is_ee(): - from ee.src.utils.entitlements import check_entitlements, Counter - -from oss.src.dbs.postgres.queries.dbes import ( - QueryArtifactDBE, - QueryVariantDBE, - QueryRevisionDBE, -) -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) -from oss.src.dbs.postgres.workflows.dbes import ( - WorkflowArtifactDBE, - WorkflowVariantDBE, - WorkflowRevisionDBE, -) - -from oss.src.dbs.postgres.tracing.dao import TracingDAO -from oss.src.dbs.postgres.blobs.dao import BlobsDAO -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.dbs.postgres.evaluations.dao import EvaluationsDAO - -from oss.src.core.tracing.service import TracingService -from oss.src.core.queries.service import QueriesService -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.testsets.service import TestsetsService, SimpleTestsetsService -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService -from oss.src.core.evaluations.service import EvaluationsService -from oss.src.core.annotations.service import AnnotationsService - -from oss.src.apis.fastapi.tracing.utils import make_hash_id -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.testsets.router import SimpleTestsetsRouter -from oss.src.apis.fastapi.evaluators.router import SimpleEvaluatorsRouter -from oss.src.apis.fastapi.annotations.router import AnnotationsRouter - -from oss.src.core.annotations.types import ( - AnnotationOrigin, - AnnotationKind, - AnnotationChannel, -) -from oss.src.apis.fastapi.annotations.models import ( - AnnotationCreate, - AnnotationCreateRequest, -) - -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationRunDataMappingStep, - EvaluationRunDataMappingColumn, - EvaluationRunDataMapping, - EvaluationRunDataStepInput, - EvaluationRunDataStep, - EvaluationRunData, - EvaluationRunFlags, - EvaluationRun, - EvaluationRunCreate, - EvaluationRunEdit, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationResultCreate, - EvaluationMetricsCreate, -) - -from oss.src.core.shared.dtos import Reference -from oss.src.core.workflows.dtos import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceResponse, - WorkflowServiceInterface, - WorkflowRevisionData, - WorkflowRevision, - WorkflowVariant, - Workflow, -) - -from oss.src.core.queries.dtos import ( - QueryRevision, - QueryVariant, - Query, -) - -from oss.src.core.evaluations.utils import ( - get_metrics_keys_from_schema, - fetch_trace, -) - - -log = get_module_logger(__name__) - - -# DBS -------------------------------------------------------------------------- - -tracing_dao = TracingDAO() - -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, -) - -queries_dao = GitDAO( - ArtifactDBE=QueryArtifactDBE, - VariantDBE=QueryVariantDBE, - RevisionDBE=QueryRevisionDBE, -) - -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) - -workflows_dao = GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, -) - -evaluations_dao = EvaluationsDAO() - -# CORE ------------------------------------------------------------------------- - -tracing_service = TracingService( - tracing_dao=tracing_dao, -) - -queries_service = QueriesService( - queries_dao=queries_dao, -) - -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) - -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) - -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - -workflows_service = WorkflowsService( - workflows_dao=workflows_dao, -) - -evaluators_service = EvaluatorsService( - workflows_service=workflows_service, -) - -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, -) - -evaluations_service = EvaluationsService( - evaluations_dao=evaluations_dao, - tracing_service=tracing_service, - queries_service=queries_service, - testsets_service=testsets_service, - evaluators_service=evaluators_service, -) - -# APIS ------------------------------------------------------------------------- - -tracing_router = TracingRouter( - tracing_service=tracing_service, -) - -simple_testsets_router = SimpleTestsetsRouter( - simple_testsets_service=simple_testsets_service, -) # TODO: REMOVE/REPLACE ONCE TRANSFER IS MOVED TO 'core' - -simple_evaluators_router = SimpleEvaluatorsRouter( - simple_evaluators_service=simple_evaluators_service, -) # TODO: REMOVE/REPLACE ONCE TRANSFER IS MOVED TO 'core' - -annotations_service = AnnotationsService( - tracing_router=tracing_router, - evaluators_service=evaluators_service, - simple_evaluators_service=simple_evaluators_service, -) - -annotations_router = AnnotationsRouter( - annotations_service=annotations_service, -) # TODO: REMOVE/REPLACE ONCE ANNOTATE IS MOVED TO 'core' - -# ------------------------------------------------------------------------------ - - -async def setup_evaluation( - *, - project_id: UUID, - user_id: UUID, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - testset_id: Optional[str] = None, - query_id: Optional[str] = None, - # - revision_id: Optional[str] = None, - # - autoeval_ids: Optional[List[str]] = None, -) -> Optional[EvaluationRun]: - request = Request(scope={"type": "http", "http_version": "1.1", "scheme": "http"}) - request.state.project_id = project_id - request.state.user_id = user_id - - run = None - - # -------------------------------------------------------------------------- - log.info("[SETUP] ", project_id=project_id, user_id=user_id) - log.info("[TESTSET] ", ids=[testset_id]) - log.info("[QUERY] ", ids=[query_id]) - log.info("[INVOCATON] ", ids=[revision_id]) - log.info("[ANNOTATION]", ids=autoeval_ids) - # -------------------------------------------------------------------------- - - try: - # create evaluation run ------------------------------------------------ - run_create = EvaluationRunCreate( - name=name, - description=description, - # - flags=( - EvaluationRunFlags( - is_closed=None, - is_live=True, - is_active=True, - ) - if query_id - else None - ), - # - status=EvaluationStatus.PENDING, - ) - - run = await evaluations_service.create_run( - project_id=project_id, - user_id=user_id, - # - run=run_create, - ) - - assert run is not None, "Failed to create evaluation run." - # ---------------------------------------------------------------------- - - # just-in-time transfer of testset ------------------------------------- - testset_input_steps_keys = list() - - testset_references = dict() - testset = None - - if testset_id: - testset_ref = Reference(id=UUID(testset_id)) - - testset_response = await simple_testsets_router.transfer_simple_testset( - request=request, - testset_id=UUID(testset_id), - ) - - assert ( - testset_response.count != 0 - ), f"Testset with id {testset_id} not found!" - - testset = testset_response.testset - testcases = testset.data.testcases - - testset_references["artifact"] = testset_ref - - testset_input_steps_keys.append( - get_slug_from_name_and_id(testset.name, testset.id) - ) - # ---------------------------------------------------------------------- - - # fetch query ---------------------------------------------------------- - query_input_steps_keys = list() - - query_references = dict() - query_revision = None - - if query_id: - query_ref = Reference(id=UUID(query_id)) - - query = await queries_service.fetch_query( - project_id=project_id, - # - query_ref=query_ref, - ) - - assert query is not None, f"Query with id {query_id} not found!" - - query_references["artifact"] = Reference( - id=query.id, - slug=query.slug, - ) - - query_revision = await queries_service.fetch_query_revision( - project_id=project_id, - # - query_ref=query_ref, - ) - - assert ( - query_revision is not None - ), f"Query revision with id {query_id} not found!" - - query_revision_ref = Reference( - id=query_revision.id, - slug=query_revision.slug, - ) - - query_references["revision"] = query_revision_ref - - query_variant = await queries_service.fetch_query_variant( - project_id=project_id, - query_variant_ref=Reference( - id=query_revision.variant_id, - ), - ) - - assert ( - query_variant is not None - ), f"Query variant with id {query_revision.variant_id} not found!" - - query_variant_ref = Reference( - id=query_variant.id, - slug=query_variant.slug, - ) - - query_references["variant"] = query_variant_ref - - query_input_steps_keys.append(query_revision.slug) - # ---------------------------------------------------------------------- - - # fetch application ---------------------------------------------------- - invocation_steps_keys = list() - - application_references = dict() - - if revision_id: - revision = await fetch_app_variant_revision_by_id(revision_id) - - assert ( - revision is not None - ), f"App revision with id {revision_id} not found!" - - application_references["revision"] = Reference( - id=UUID(str(revision.id)), - ) - - variant = await fetch_app_variant_by_id(str(revision.variant_id)) - - assert ( - variant is not None - ), f"App variant with id {revision.variant_id} not found!" - - application_references["variant"] = Reference( - id=UUID(str(variant.id)), - ) - - app = await fetch_app_by_id(str(variant.app_id)) - - assert app is not None, f"App with id {variant.app_id} not found!" - - application_references["artifact"] = Reference( - id=UUID(str(app.id)), - ) - - deployment = await get_deployment_by_id(str(revision.base.deployment_id)) - - assert ( - deployment is not None - ), f"Deployment with id {revision.base.deployment_id} not found!" - - uri = parse_url(url=deployment.uri) - - assert uri is not None, f"Invalid URI for deployment {deployment.id}!" - - revision_parameters = revision.config_parameters - - assert ( - revision_parameters is not None - ), f"Revision parameters for variant {variant.id} not found!" - - invocation_steps_keys.append( - get_slug_from_name_and_id(app.app_name, revision.id) - ) - # ---------------------------------------------------------------------- - - # fetch evaluators ----------------------------------------------------- - annotation_steps_keys = [] - - if autoeval_ids: - autoeval_configs = [] - - for autoeval_id in autoeval_ids: - autoeval_config = await fetch_evaluator_config(autoeval_id) - - autoeval_configs.append(autoeval_config) - - for autoeval_config in autoeval_configs: - annotation_steps_keys.append( - get_slug_from_name_and_id(autoeval_config.name, autoeval_config.id) - ) - # ---------------------------------------------------------------------- - - # just-in-time transfer of evaluators ---------------------------------- - annotation_metrics_keys = {key: {} for key in annotation_steps_keys} - evaluator_references = dict() - - for jdx, autoeval_id in enumerate(autoeval_ids): - annotation_step_key = annotation_steps_keys[jdx] - - evaluator_response = ( - await simple_evaluators_router.transfer_simple_evaluator( - request=request, - evaluator_id=UUID(autoeval_id), - ) - ) - - evaluator = evaluator_response.evaluator - - assert evaluator is not None, f"Evaluator with id {autoeval_id} not found!" - - evaluator_references[annotation_step_key] = {} - - evaluator_references[annotation_step_key]["artifact"] = Reference( - id=evaluator.id, - slug=evaluator.slug, - ) - - metrics_keys = get_metrics_keys_from_schema( - schema=(evaluator.data.schemas.get("outputs")), - ) - - annotation_metrics_keys[annotation_step_key] = [ - { - "path": metric_key.get("path", "").replace("outputs.", "", 1), - "type": metric_key.get("type", ""), - } - for metric_key in metrics_keys - ] - # ---------------------------------------------------------------------- - - # fetch evaluator workflows -------------------------------------------- - evaluators = dict() - - for annotation_step_key, references in evaluator_references.items(): - evaluators[annotation_step_key] = {} - - workflow_ref = references["artifact"] - - workflow = await workflows_service.fetch_workflow( - project_id=project_id, - # - workflow_ref=workflow_ref, - ) - - evaluators[annotation_step_key]["workflow"] = workflow - - workflow_revision = await workflows_service.fetch_workflow_revision( - project_id=project_id, - # - workflow_ref=workflow_ref, - ) - - assert ( - workflow_revision is not None - ), f"Workflow revision with id {workflow_ref.id} not found!" - - workflow_revision_ref = Reference( - id=workflow_revision.id, - slug=workflow_revision.slug, - ) - - evaluator_references[annotation_step_key][ - "revision" - ] = workflow_revision_ref - - evaluators[annotation_step_key]["revision"] = workflow_revision - - workflow_variant = await workflows_service.fetch_workflow_variant( - project_id=project_id, - workflow_variant_ref=Reference( - id=workflow_revision.variant_id, - ), - ) - - assert ( - workflow_variant is not None - ), f"Workflow variant with id {workflow_revision.variant_id} not found!" - - workflow_variant_ref = Reference( - id=workflow_variant.id, - slug=workflow_variant.slug, - ) - - evaluator_references[annotation_step_key]["variant"] = workflow_variant_ref - - evaluators[annotation_step_key]["variant"] = workflow_variant - - # ---------------------------------------------------------------------- - - # initialize steps/mappings in run ------------------------------------- - testset_input_step = ( - EvaluationRunDataStep( - key=testset_input_steps_keys[0], - type="input", - origin="auto", - references={ - "testset": testset_references["artifact"], - # "testset_variant": - # "testset_revision": - }, - ) - if testset and testset.id - else None - ) - - query_input_step = ( - EvaluationRunDataStep( - key=query_input_steps_keys[0], - type="input", - origin="auto", - references={ - "query": query_references["artifact"], - "query_variant": query_references["variant"], - "query_revision": query_references["revision"], - }, - ) - if query_id - else None - ) - - invocation_step = ( - EvaluationRunDataStep( - key=invocation_steps_keys[0], - type="invocation", - origin="auto", - references={ - "application": application_references["artifact"], - "application_variant": application_references["variant"], - "application_revision": application_references["revision"], - }, - inputs=[ - EvaluationRunDataStepInput( - key=testset_input_steps_keys[0], - ), - ], - ) - if revision_id - else None - ) - - annotation_steps = [ - EvaluationRunDataStep( - key=step_key, - type="annotation", - origin="auto", - references={ - "evaluator": evaluator_references[step_key]["artifact"], - "evaluator_variant": evaluator_references[step_key]["variant"], - "evaluator_revision": evaluator_references[step_key]["revision"], - }, - inputs=( - [ - EvaluationRunDataStepInput( - key=testset_input_steps_keys[0], - ), - EvaluationRunDataStepInput( - key=invocation_steps_keys[0], - ), - ] - if testset_id and revision_id - else [ - EvaluationRunDataStepInput( - key=query_input_steps_keys[0], - ), - ] - ), - ) - for step_key in annotation_steps_keys - ] - - steps: List[EvaluationRunDataStep] = list() - - if testset_id and testset_input_step: - steps.append(testset_input_step) - if query_id and query_input_step: - steps.append(query_input_step) - if revision_id and invocation_step: - steps.append(invocation_step) - - steps.extend(annotation_steps) - - testset_input_mappings = ( - [ - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="testset", - name=key, - ), - step=EvaluationRunDataMappingStep( - key=testset_input_steps_keys[0], - path=f"data.{key}", - ), - ) - for key in testcases[0].data.keys() - ] - if testset_id - else [] - ) - - query_input_mappings = ( - [ - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="query", - name="data", - ), - step=EvaluationRunDataMappingStep( - key=query_input_steps_keys[0], - path="attributes.ag.data", - ), - ) - ] - if query_id - else [] - ) - - invocation_mappings = ( - [ - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="invocation", - name="outputs", - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path="attributes.ag.data.outputs", - ), - ) - for step_key in invocation_steps_keys - ] - if invocation_steps_keys - else [] - ) - - annotation_mappings = [ - EvaluationRunDataMapping( - column=EvaluationRunDataMappingColumn( - kind="annotation", - name=metric_key["path"], - ), - step=EvaluationRunDataMappingStep( - key=step_key, - path=f"attributes.ag.data.outputs{'.' + metric_key['path'] if metric_key['path'] else ''}", - ), - ) - for step_key in annotation_steps_keys - for metric_key in annotation_metrics_keys[step_key] - ] - - mappings: List[EvaluationRunDataMapping] = ( - testset_input_mappings - + query_input_mappings - + invocation_mappings - + annotation_mappings - ) - - run_edit = EvaluationRunEdit( - id=run.id, - # - name=run.name, - description=run.description, - # - flags=run.flags, - tags=run.tags, - meta=run.meta, - # - status=EvaluationStatus.RUNNING, - # - data=EvaluationRunData( - steps=steps, - mappings=mappings, - ), - ) - - run = await evaluations_service.edit_run( - project_id=project_id, - user_id=user_id, - # - run=run_edit, - ) - - assert run, f"Failed to edit evaluation run {run_edit.id}!" - # ---------------------------------------------------------------------- - - log.info("[DONE] ", run_id=run.id) - - except: # pylint: disable=bare-except - if run and run.id: - log.error("[FAIL] ", run_id=run.id, exc_info=True) - - await evaluations_service.delete_run( - project_id=project_id, - # - run_id=run.id, - ) - else: - log.error("[FAIL]", exc_info=True) - - run = None - - return run - - -@shared_task( - name="src.tasks.evaluations.legacy.annotate", - queue="src.tasks.evaluations.legacy.annotate", - bind=True, -) -def annotate( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - testset_id: str, - revision_id: str, - autoeval_ids: Optional[List[str]], - # - run_config: Dict[str, int], -): - """ - Annotates an application revision applied to a testset using auto evaluator(s). - - Args: - self: The task instance. - project_id (str): The ID of the project. - user_id (str): The ID of the user. - run_id (str): The ID of the evaluation run. - testset_id (str): The ID of the testset. - revision_id (str): The ID of the application revision. - autoeval_ids (List[str]): The IDs of the evaluators configurations. - run_config (Dict[str, int]): Configuration for evaluation run. - - Returns: - None - """ - request = Request( - scope={ - "type": "http", - "http_version": "1.1", - "scheme": "http", - } - ) - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - loop = get_event_loop() - - run = None - - try: - # ---------------------------------------------------------------------- - log.info("[SCOPE] ", run_id=run_id, project_id=project_id, user_id=user_id) - log.info("[TESTSET] ", run_id=run_id, ids=[testset_id]) - log.info("[INVOCATON] ", run_id=run_id, ids=[revision_id]) - log.info("[ANNOTATION]", run_id=run_id, ids=autoeval_ids) - # ---------------------------------------------------------------------- - - # fetch project -------------------------------------------------------- - project = loop.run_until_complete( - get_project_by_id( - project_id=str(project_id), - ), - ) - # ---------------------------------------------------------------------- - - # fetch secrets -------------------------------------------------------- - secrets = loop.run_until_complete( - get_llm_providers_secrets( - project_id=str(project_id), - ), - ) - # ---------------------------------------------------------------------- - - # prepare credentials -------------------------------------------------- - secret_token = loop.run_until_complete( - sign_secret_token( - user_id=str(user_id), - project_id=str(project_id), - workspace_id=str(project.workspace_id), - organization_id=str(project.organization_id), - ) - ) - - credentials = f"Secret {secret_token}" - # ---------------------------------------------------------------------- - - # fetch run ------------------------------------------------------------ - run = loop.run_until_complete( - evaluations_service.fetch_run( - project_id=project_id, - # - run_id=run_id, - ) - ) - - assert run, f"Evaluation run with id {run_id} not found!" - - assert run.data, f"Evaluation run with id {run_id} has no data!" - - assert run.data.steps, f"Evaluation run with id {run_id} has no steps!" - - steps = run.data.steps - - invocation_steps = [step for step in steps if step.type == "invocation"] - annotation_steps = [step for step in steps if step.type == "annotation"] - - invocation_steps_keys = [step.key for step in invocation_steps] - annotation_steps_keys = [step.key for step in annotation_steps] - - nof_annotations = len(annotation_steps) - # ---------------------------------------------------------------------- - - # fetch testset -------------------------------------------------------- - testset_response = loop.run_until_complete( - simple_testsets_router.fetch_simple_testset( - request=request, - testset_id=testset_id, - ) - ) - - assert testset_response.count != 0, f"Testset with id {testset_id} not found!" - - testset = testset_response.testset - - testcases = testset.data.testcases - testcases_data = [ - {**testcase.data, "id": str(testcase.id)} for testcase in testcases - ] # INEFFICIENT: might want to have testcase_id in testset data (caution with hashing) - nof_testcases = len(testcases) - - testset_step_key = get_slug_from_name_and_id(testset.name, testset.id) - # ---------------------------------------------------------------------- - - # fetch application ---------------------------------------------------- - revision = loop.run_until_complete( - fetch_app_variant_revision_by_id(revision_id), - ) - - assert revision is not None, f"App revision with id {revision_id} not found!" - - variant = loop.run_until_complete( - fetch_app_variant_by_id(str(revision.variant_id)), - ) - - assert ( - variant is not None - ), f"App variant with id {revision.variant_id} not found!" - - app = loop.run_until_complete( - fetch_app_by_id(str(variant.app_id)), - ) - - assert app is not None, f"App with id {variant.app_id} not found!" - - deployment = loop.run_until_complete( - get_deployment_by_id(str(revision.base.deployment_id)), - ) - - assert ( - deployment is not None - ), f"Deployment with id {revision.base.deployment_id} not found!" - - uri = parse_url(url=deployment.uri) - - assert uri is not None, f"Invalid URI for deployment {deployment.id}!" - - revision_parameters = revision.config_parameters - - assert ( - revision_parameters is not None - ), f"Revision parameters for variant {variant.id} not found!" - # ---------------------------------------------------------------------- - - # fetch evaluators ----------------------------------------------------- - evaluator_references = {step.key: step.references for step in annotation_steps} - - evaluators = { - evaluator_key: loop.run_until_complete( - workflows_service.fetch_workflow_revision( - project_id=project_id, - # - workflow_revision_ref=evaluator_refs.get("evaluator_revision"), - ) - ) - for evaluator_key, evaluator_refs in evaluator_references.items() - } - # ---------------------------------------------------------------------- - - # prepare headers ------------------------------------------------------ - headers = {} - if credentials: - headers = {"Authorization": credentials} - headers["ngrok-skip-browser-warning"] = "1" - - openapi_parameters = None - max_recursive_depth = 5 - runtime_prefix = uri - route_path = "" - - while max_recursive_depth > 0 and not openapi_parameters: - try: - openapi_parameters = loop.run_until_complete( - llm_apps_service.get_parameters_from_openapi( - runtime_prefix + "/openapi.json", - route_path, - headers, - ), - ) - except Exception: # pylint: disable=broad-exception-caught - openapi_parameters = None - - if not openapi_parameters: - max_recursive_depth -= 1 - if not runtime_prefix.endswith("/"): - route_path = "/" + runtime_prefix.split("/")[-1] + route_path - runtime_prefix = "/".join(runtime_prefix.split("/")[:-1]) - else: - route_path = "" - runtime_prefix = runtime_prefix[:-1] - - openapi_parameters = loop.run_until_complete( - llm_apps_service.get_parameters_from_openapi( - runtime_prefix + "/openapi.json", - route_path, - headers, - ), - ) - # ---------------------------------------------------------------------- - - # create scenarios ----------------------------------------------------- - scenarios_create = [ - EvaluationScenarioCreate( - run_id=run_id, - # - status=EvaluationStatus.RUNNING, - ) - for _ in range(nof_testcases) - ] - - scenarios = loop.run_until_complete( - evaluations_service.create_scenarios( - project_id=project_id, - user_id=user_id, - # - scenarios=scenarios_create, - ) - ) - - assert ( - len(scenarios) == nof_testcases - ), f"Failed to create evaluation scenarios for run {run_id}!" - # ---------------------------------------------------------------------- - - # create input steps --------------------------------------------------- - results_create = [ - EvaluationResultCreate( - run_id=run_id, - scenario_id=scenario.id, - step_key=testset_step_key, - # - status=EvaluationStatus.SUCCESS, - # - testcase_id=testcases[idx].id, - ) - for idx, scenario in enumerate(scenarios) - ] - - steps = loop.run_until_complete( - evaluations_service.create_results( - project_id=project_id, - user_id=user_id, - # - results=results_create, - ) - ) - - assert ( - len(steps) == nof_testcases - ), f"Failed to create evaluation steps for run {run_id}!" - # ---------------------------------------------------------------------- - - # flatten testcases ---------------------------------------------------- - _testcases = [testcase.model_dump(mode="json") for testcase in testcases] - - log.info( - "[BATCH] ", - run_id=run_id, - ids=[testset_id], - count=len(_testcases), - size=len(dumps(_testcases).encode("utf-8")), - ) - # ---------------------------------------------------------------------- - - # invoke application --------------------------------------------------- - invocations: List[InvokationResult] = loop.run_until_complete( - llm_apps_service.batch_invoke( - project_id=str(project_id), - user_id=str(user_id), - testset_data=testcases_data, # type: ignore - parameters=revision_parameters, # type: ignore - uri=uri, - rate_limit_config=run_config, - application_id=str(app.id), # DO NOT REMOVE - references={ - "testset": {"id": testset_id}, - "application": {"id": str(app.id)}, - "application_variant": {"id": str(variant.id)}, - "application_revision": {"id": str(revision.id)}, - }, - scenarios=[ - s.model_dump( - mode="json", - exclude_none=True, - ) - for s in scenarios - ], - ) - ) - # ---------------------------------------------------------------------- - - # create invocation results -------------------------------------------- - results_create = [ - EvaluationResultCreate( - run_id=run_id, - scenario_id=scenario.id, - step_key=invocation_steps_keys[0], - # - status=( - EvaluationStatus.SUCCESS - if not invocations[idx].result.error - else EvaluationStatus.FAILURE - ), - # - trace_id=invocations[idx].trace_id, - error=( - invocations[idx].result.error.model_dump(mode="json") - if invocations[idx].result.error - else None - ), - ) - for idx, scenario in enumerate(scenarios) - ] - - steps = loop.run_until_complete( - evaluations_service.create_results( - project_id=project_id, - user_id=user_id, - # - results=results_create, - ) - ) - - assert ( - len(steps) == nof_testcases - ), f"Failed to create evaluation steps for run {run_id}!" - # ---------------------------------------------------------------------- - - run_has_errors = 0 - run_status = EvaluationStatus.SUCCESS - - # run evaluators ------------------------------------------------------- - for idx in range(nof_testcases): - scenario = scenarios[idx] - testcase = testcases[idx] - invocation = invocations[idx] - invocation_step_key = invocation_steps_keys[0] - - scenario_has_errors = 0 - scenario_status = EvaluationStatus.SUCCESS - - # skip the iteration if error in the invocation -------------------- - if invocation.result.error: - log.error( - f"There is an error in invocation {invocation.trace_id} so we skip its evaluation" - ) - - scenario_has_errors += 1 - run_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - run_status = EvaluationStatus.ERRORS - - error = invocation.result.error.model_dump(mode="json") is not None - # ------------------------------------------------------------------ - - # proceed with the evaluation otherwise ---------------------------- - else: - if not invocation.trace_id: - log.warn(f"invocation trace_id is missing.") - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - - trace = None - if invocation.trace_id: - trace = loop.run_until_complete( - fetch_trace( - tracing_router=tracing_router, - request=request, - trace_id=invocation.trace_id, - ) - ) - - if trace: - log.info( - f"Trace found ", - scenario_id=scenario.id, - step_key=invocation_step_key, - trace_id=invocation.trace_id, - ) - else: - log.warn( - f"Trace missing", - scenario_id=scenario.id, - step_key=invocation_step_key, - trace_id=invocation.trace_id, - ) - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - - if not isinstance(trace.spans, dict): - log.warn( - f"Trace with id {invocation.trace_id} has no root spans", - ) - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - - root_span = list(trace.spans.values())[0] - - if isinstance(root_span, list): - log.warn( - f"More than one root span for trace with id {invocation.trace_id}.", - ) - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - - # run the evaluators if no error in the invocation ------------- - for jdx in range(nof_annotations): - annotation_step_key = annotation_steps_keys[jdx] - - step_has_errors = 0 - step_status = EvaluationStatus.SUCCESS - - references: Dict[str, Any] = { - **evaluator_references[annotation_step_key], - "testset": {"id": testset_id}, - "testcase": {"id": str(testcase.id)}, - } - links: Dict[str, Any] = { - invocation_steps_keys[0]: { - "trace_id": invocation.trace_id, - "span_id": invocation.span_id, - } - } - - # invoke annotation workflow ------------------------------- - evaluator_revision = evaluators[annotation_step_key] - - if not evaluator_revision: - log.error( - f"Evaluator revision for {annotation_step_key} not found!" - ) - step_has_errors += 1 - scenario_has_errors += 1 - run_has_errors += 1 - step_status = EvaluationStatus.FAILURE - scenario_status = EvaluationStatus.ERRORS - run_status = EvaluationStatus.ERRORS - continue - - _revision = evaluator_revision.model_dump( - mode="json", - exclude_none=True, - ) - interface = ( - dict( - uri=evaluator_revision.data.uri, - url=evaluator_revision.data.url, - headers=evaluator_revision.data.headers, - schemas=evaluator_revision.data.schemas, - ) - if evaluator_revision.data - else dict() - ) - configuration = ( - dict( - script=evaluator_revision.data.script, - parameters=evaluator_revision.data.parameters, - ) - if evaluator_revision.data - else dict() - ) - parameters = configuration.get("parameters") - - _testcase = testcase.model_dump(mode="json") - inputs = testcase.data - if isinstance(inputs, dict): - if "testcase_dedup_id" in inputs: - del inputs["testcase_dedup_id"] - - _trace: Optional[dict] = ( - trace.model_dump( - mode="json", - exclude_none=True, - ) - if trace - else None - ) - - _root_span = root_span.model_dump(mode="json", exclude_none=True) - testcase_data = testcase.data - - root_span_attributes: dict = _root_span.get("attributes") or {} - root_span_attributes_ag: dict = root_span_attributes.get("ag") or {} - root_span_attributes_ag_data: dict = ( - root_span_attributes_ag.get("data") or {} - ) - root_span_attributes_ag_data_outputs = ( - root_span_attributes_ag_data.get("outputs") - ) - root_span_attributes_ag_data_inputs = ( - root_span_attributes_ag_data.get("inputs") - ) - - outputs = root_span_attributes_ag_data_outputs - inputs = testcase_data or root_span_attributes_ag_data_inputs - - workflow_service_request_data = WorkflowServiceRequestData( - revision=_revision, - parameters=parameters, - # - testcase=_testcase, - inputs=inputs, - # - trace=_trace, - outputs=outputs, - ) - - flags = ( - evaluator_revision.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator_revision.flags - else None - ) - - workflow_service_request = WorkflowServiceRequest( - version="2025.07.14", - # - flags=flags, - # - interface=interface, - configuration=configuration, - # - data=workflow_service_request_data, - # - references=references, - links=links, - ) - - log.info( - "Invoking evaluator... ", - scenario_id=scenario.id, - testcase_id=testcase.id, - trace_id=invocation.trace_id, - uri=interface.get("uri"), - ) - workflows_service_response = loop.run_until_complete( - workflows_service.invoke_workflow( - project_id=project_id, - user_id=user_id, - # - request=workflow_service_request, - # - annotate=True, - ) - ) - log.info( - "Invoked evaluator ", - scenario_id=scenario.id, - trace_id=workflows_service_response.trace_id, - ) - # ---------------------------------------------------------- - - # run evaluator -------------------------------------------- - trace_id = workflows_service_response.trace_id - - error = None - has_error = workflows_service_response.status.code != 200 - - # if error in evaluator, no annotation, only step ---------- - if has_error: - log.warn( - f"There is an error in annotation {annotation_step_key} for invocation {invocation.trace_id}." - ) - - step_has_errors += 1 - scenario_has_errors += 1 - run_has_errors += 1 - step_status = EvaluationStatus.FAILURE - scenario_status = EvaluationStatus.ERRORS - run_status = EvaluationStatus.ERRORS - - error = workflows_service_response.status.model_dump( - mode="json" - ) - - # ---------------------------------------------------------- - - # else, first annotation, then step ------------------------ - else: - outputs = ( - workflows_service_response.data.outputs - if workflows_service_response.data - else None - ) - - annotation = workflows_service_response - - trace_id = annotation.trace_id - - if not annotation.trace_id: - log.warn(f"annotation trace_id is missing.") - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - - trace = None - if annotation.trace_id: - trace = loop.run_until_complete( - fetch_trace( - tracing_router=tracing_router, - request=request, - trace_id=annotation.trace_id, - ) - ) - - if trace: - log.info( - f"Trace found ", - scenario_id=scenario.id, - step_key=annotation_step_key, - trace_id=annotation.trace_id, - ) - else: - log.warn( - f"Trace missing", - scenario_id=scenario.id, - step_key=annotation_step_key, - trace_id=annotation.trace_id, - ) - scenario_has_errors += 1 - scenario_status = EvaluationStatus.ERRORS - continue - # ---------------------------------------------------------- - - results_create = [ - EvaluationResultCreate( - run_id=run_id, - scenario_id=scenario.id, - step_key=annotation_step_key, - # - status=step_status, - # - trace_id=trace_id, - error=error, - ) - ] - - steps = loop.run_until_complete( - evaluations_service.create_results( - project_id=project_id, - user_id=user_id, - # - results=results_create, - ) - ) - - assert ( - len(steps) == 1 - ), f"Failed to create evaluation step for scenario with id {scenario.id}!" - # ------------------------------------------------------------------ - - scenario_edit = EvaluationScenarioEdit( - id=scenario.id, - tags=scenario.tags, - meta=scenario.meta, - status=scenario_status, - ) - - scenario = loop.run_until_complete( - evaluations_service.edit_scenario( - project_id=project_id, - user_id=user_id, - # - scenario=scenario_edit, - ) - ) - - assert ( - scenario - ), f"Failed to edit evaluation scenario with id {scenario.id}!" - - if scenario_status != EvaluationStatus.FAILURE: - try: - metrics = loop.run_until_complete( - evaluations_service.refresh_metrics( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - scenario_id=scenario.id, - ) - ) - - if not metrics: - log.warning( - f"Refreshing metrics failed for {run_id} | {scenario.id}" - ) - - except Exception as e: - log.warning( - f"Refreshing metrics failed for {run_id} | {scenario.id}", - exc_info=True, - ) - # ---------------------------------------------------------------------- - - except Exception as e: # pylint: disable=broad-exception-caught - log.error( - f"An error occurred during evaluation: {e}", - exc_info=True, - ) - - self.update_state(state=states.FAILURE) - - run_status = EvaluationStatus.FAILURE - - if not run: - log.info("[FAIL] ", run_id=run_id, project_id=project_id, user_id=user_id) - - if run_status != EvaluationStatus.FAILURE: - try: - metrics = loop.run_until_complete( - evaluations_service.refresh_metrics( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - ) - ) - - if not metrics: - log.warning(f"Refreshing metrics failed for {run_id}") - - self.update_state(state=states.FAILURE) - - run_status = EvaluationStatus.FAILURE - - except Exception as e: # pylint: disable=broad-exception-caught - log.warning(f"Refreshing metrics failed for {run_id}", exc_info=True) - - self.update_state(state=states.FAILURE) - - run_status = EvaluationStatus.FAILURE - - # edit evaluation run status ----------------------------------------------- - run_edit = EvaluationRunEdit( - id=run_id, - # - name=run.name, - description=run.description, - # - tags=run.tags, - meta=run.meta, - # - status=run_status, - # - data=run.data, - ) - - loop.run_until_complete( - evaluations_service.edit_run( - project_id=project_id, - user_id=user_id, - # - run=run_edit, - ) - ) - - # edit meters to avoid conting failed evaluations -------------------------- - if run_status == EvaluationStatus.FAILURE: - if is_ee(): - loop.run_until_complete( - check_entitlements( - organization_id=project.organization_id, - key=Counter.EVALUATIONS, - delta=-1, - ) - ) - - log.info("[DONE] ", run_id=run_id, project_id=project_id, user_id=user_id) - - return diff --git a/api/oss/src/tasks/evaluations/live.py b/api/oss/src/tasks/evaluations/live.py deleted file mode 100644 index 43208bd42d..0000000000 --- a/api/oss/src/tasks/evaluations/live.py +++ /dev/null @@ -1,831 +0,0 @@ -from typing import List, Dict, Any, Optional -from uuid import UUID -import asyncio -from datetime import datetime - -from celery import shared_task -from fastapi import Request - -from oss.src.utils.logging import get_module_logger -from oss.src.services.auth_helper import sign_secret_token -from oss.src.services.db_manager import get_project_by_id -from oss.src.core.secrets.utils import get_llm_providers_secrets - -from oss.src.dbs.postgres.queries.dbes import ( - QueryArtifactDBE, - QueryVariantDBE, - QueryRevisionDBE, -) -from oss.src.dbs.postgres.testcases.dbes import ( - TestcaseBlobDBE, -) -from oss.src.dbs.postgres.testsets.dbes import ( - TestsetArtifactDBE, - TestsetVariantDBE, - TestsetRevisionDBE, -) -from oss.src.dbs.postgres.workflows.dbes import ( - WorkflowArtifactDBE, - WorkflowVariantDBE, - WorkflowRevisionDBE, -) - -from oss.src.dbs.postgres.tracing.dao import TracingDAO -from oss.src.dbs.postgres.blobs.dao import BlobsDAO -from oss.src.dbs.postgres.git.dao import GitDAO -from oss.src.dbs.postgres.evaluations.dao import EvaluationsDAO - -from oss.src.core.tracing.service import TracingService -from oss.src.core.queries.service import QueriesService -from oss.src.core.testcases.service import TestcasesService -from oss.src.core.testsets.service import TestsetsService -from oss.src.core.testsets.service import SimpleTestsetsService -from oss.src.core.workflows.service import WorkflowsService -from oss.src.core.evaluators.service import EvaluatorsService -from oss.src.core.evaluators.service import SimpleEvaluatorsService -from oss.src.core.evaluations.service import EvaluationsService -from oss.src.core.annotations.service import AnnotationsService - -# from oss.src.apis.fastapi.tracing.utils import make_hash_id -from oss.src.apis.fastapi.tracing.router import TracingRouter -from oss.src.apis.fastapi.annotations.router import AnnotationsRouter - -from oss.src.core.annotations.types import ( - AnnotationOrigin, - AnnotationKind, - AnnotationChannel, -) -from oss.src.apis.fastapi.annotations.models import ( - AnnotationCreate, - AnnotationCreateRequest, -) - -from oss.src.core.evaluations.types import ( - EvaluationStatus, - EvaluationScenarioCreate, - EvaluationScenarioEdit, - EvaluationResultCreate, -) -from oss.src.core.shared.dtos import ( - Reference, - Link, -) -from oss.src.core.tracing.dtos import ( - Filtering, - Windowing, - Formatting, - Format, - Focus, - TracingQuery, - OTelSpansTree as Trace, - LogicalOperator, - SimpleTraceReferences, -) -from oss.src.core.workflows.dtos import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceResponse, -) -from oss.src.core.queries.dtos import ( - QueryRevisionData, - QueryRevision, -) -from oss.src.core.evaluators.dtos import ( - EvaluatorRevisionData, - EvaluatorRevision, -) - -from oss.src.core.evaluations.utils import fetch_trace - - -log = get_module_logger(__name__) - - -# DBS -------------------------------------------------------------------------- - -tracing_dao = TracingDAO() - -testcases_dao = BlobsDAO( - BlobDBE=TestcaseBlobDBE, -) - -queries_dao = GitDAO( - ArtifactDBE=QueryArtifactDBE, - VariantDBE=QueryVariantDBE, - RevisionDBE=QueryRevisionDBE, -) - -testsets_dao = GitDAO( - ArtifactDBE=TestsetArtifactDBE, - VariantDBE=TestsetVariantDBE, - RevisionDBE=TestsetRevisionDBE, -) - -workflows_dao = GitDAO( - ArtifactDBE=WorkflowArtifactDBE, - VariantDBE=WorkflowVariantDBE, - RevisionDBE=WorkflowRevisionDBE, -) - -evaluations_dao = EvaluationsDAO() - -# CORE ------------------------------------------------------------------------- - -tracing_service = TracingService( - tracing_dao=tracing_dao, -) - -queries_service = QueriesService( - queries_dao=queries_dao, -) - -testcases_service = TestcasesService( - testcases_dao=testcases_dao, -) - -testsets_service = TestsetsService( - testsets_dao=testsets_dao, - testcases_service=testcases_service, -) - -simple_testsets_service = SimpleTestsetsService( - testsets_service=testsets_service, -) - -workflows_service = WorkflowsService( - workflows_dao=workflows_dao, -) - -evaluators_service = EvaluatorsService( - workflows_service=workflows_service, -) - -simple_evaluators_service = SimpleEvaluatorsService( - evaluators_service=evaluators_service, -) - -evaluations_service = EvaluationsService( - evaluations_dao=evaluations_dao, - tracing_service=tracing_service, - queries_service=queries_service, - testsets_service=testsets_service, - evaluators_service=evaluators_service, -) - -# APIS ------------------------------------------------------------------------- - -tracing_router = TracingRouter( - tracing_service=tracing_service, -) - -annotations_service = AnnotationsService( - tracing_router=tracing_router, - evaluators_service=evaluators_service, - simple_evaluators_service=simple_evaluators_service, -) - -annotations_router = AnnotationsRouter( - annotations_service=annotations_service, -) # TODO: REMOVE/REPLACE ONCE ANNOTATE IS MOVED TO 'core' - -# ------------------------------------------------------------------------------ - - -@shared_task( - name="src.tasks.evaluations.live.evaluate", - queue="src.tasks.evaluations.live.evaluate", - bind=True, -) -def evaluate( - self, - *, - project_id: UUID, - user_id: UUID, - # - run_id: UUID, - # - newest: datetime, - oldest: datetime, -): - request = Request(scope={"type": "http", "http_version": "1.1", "scheme": "http"}) - - request.state.project_id = str(project_id) - request.state.user_id = str(user_id) - - loop = asyncio.get_event_loop() - - # count in minutes - timestamp = oldest - interval = int((newest - oldest).total_seconds() / 60) - - try: - # ---------------------------------------------------------------------- - log.info( - "[SCOPE] ", - run_id=run_id, - project_id=project_id, - user_id=user_id, - ) - - log.info( - "[RANGE] ", - run_id=run_id, - timestamp=timestamp, - interval=interval, - ) - # ---------------------------------------------------------------------- - - # fetch evaluation run ------------------------------------------------- - run = loop.run_until_complete( - evaluations_service.fetch_run( - project_id=project_id, - run_id=run_id, - ) - ) - - assert run, f"Evaluation run with id {run_id} not found!" - - assert run.data, f"Evaluation run with id {run_id} has no data!" - - assert run.data.steps, f"Evaluation run with id {run_id} has no steps!" - - steps = run.data.steps - - input_steps = { - step.key: step for step in steps if step.type == "input" # -------- - } - invocation_steps = { - step.key: step for step in steps if step.type == "invocation" - } - annotation_steps = { - step.key: step for step in steps if step.type == "annotation" - } - - input_steps_keys = list(input_steps.keys()) - invocation_steps_keys = list(invocation_steps.keys()) - annotation_steps_keys = list(annotation_steps.keys()) - - nof_inputs = len(input_steps_keys) - nof_invocations = len(invocation_steps_keys) - nof_annotations = len(annotation_steps_keys) - # ---------------------------------------------------------------------- - - # initialize query variables ------------------------------------------- - query_revision_refs: Dict[str, Reference] = dict() - # - query_revisions: Dict[str, QueryRevision] = dict() - query_references: Dict[str, Dict[str, Reference]] = dict() - # - query_traces: Dict[str, Dict[str, Trace]] = dict() - # ---------------------------------------------------------------------- - - # initialize evaluator variables --------------------------------------- - evaluator_revision_refs: Dict[str, Reference] = dict() - # - evaluator_revisions: Dict[str, EvaluatorRevision] = dict() - evaluator_references: Dict[str, Dict[str, Reference]] = dict() - # ---------------------------------------------------------------------- - - # get query steps references ------------------------------------------- - for input_step_key in input_steps_keys: - query_refs = input_steps[input_step_key].references - query_revision_ref = query_refs.get("query_revision") - - if query_revision_ref: - query_revision_refs[input_step_key] = query_revision_ref - - # ---------------------------------------------------------------------- - - # get evaluator steps references --------------------------------------- - for annotation_step_key in annotation_steps_keys: - evaluator_refs = annotation_steps[annotation_step_key].references - evaluator_revision_ref = evaluator_refs.get("evaluator_revision") - - if evaluator_revision_ref: - evaluator_revision_refs[annotation_step_key] = evaluator_revision_ref - # ---------------------------------------------------------------------- - - # fetch query revisions ------------------------------------------------ - for ( - query_step_key, - query_revision_ref, - ) in query_revision_refs.items(): - query_revision = loop.run_until_complete( - queries_service.fetch_query_revision( - project_id=project_id, - # - query_revision_ref=query_revision_ref, - ) - ) - - if query_revision and not query_revision.data: - query_revision.data = QueryRevisionData() - - if ( - not query_revision - or not query_revision.id - or not query_revision.slug - or not query_revision.data - ): - log.warn( - f"Query revision with ref {query_revision_ref.model_dump(mode='json')} not found!" - ) - continue - - query_step = input_steps[query_step_key] - - query_revisions[query_step_key] = query_revision - query_references[query_step_key] = query_step.references - # ---------------------------------------------------------------------- - - # fetch evaluator revisions -------------------------------------------- - for ( - evaluator_step_key, - evaluator_revision_ref, - ) in evaluator_revision_refs.items(): - evaluator_revision = loop.run_until_complete( - evaluators_service.fetch_evaluator_revision( - project_id=project_id, - # - evaluator_revision_ref=evaluator_revision_ref, - ) - ) - - if evaluator_revision and not evaluator_revision.data: - evaluator_revision.data = EvaluatorRevisionData() - - if ( - not evaluator_revision - or not evaluator_revision.id - or not evaluator_revision.slug - or not evaluator_revision.data - ): - log.warn( - f"Evaluator revision with ref {evaluator_revision_ref.model_dump(mode='json')} not found!" - ) - continue - - evaluator_step = annotation_steps[evaluator_step_key] - - evaluator_revisions[evaluator_step_key] = evaluator_revision - evaluator_references[evaluator_step_key] = evaluator_step.references - # ---------------------------------------------------------------------- - - # run query revisions -------------------------------------------------- - for query_step_key, query_revision in query_revisions.items(): - formatting = Formatting( - focus=Focus.TRACE, - format=Format.AGENTA, - ) - filtering = Filtering( - operator=LogicalOperator.AND, - conditions=list(), - ) - windowing = Windowing( - oldest=oldest, - newest=newest, - next=None, - limit=None, - order="ascending", - interval=None, - rate=None, - ) - - if query_revision.data: - if query_revision.data.filtering: - filtering = query_revision.data.filtering - - if query_revision.data.windowing: - windowing.rate = query_revision.data.windowing.rate - - query = TracingQuery( - formatting=formatting, - filtering=filtering, - windowing=windowing, - ) - - tracing_response = loop.run_until_complete( - tracing_router.query_spans( - request=request, - # - query=query, - ) - ) - - nof_traces = tracing_response.count - - log.info( - "[TRACES] ", - run_id=run_id, - count=nof_traces, - ) - - query_traces[query_step_key] = tracing_response.traces or dict() - # ---------------------------------------------------------------------- - - # run online evaluation ------------------------------------------------ - for query_step_key in query_traces.keys(): - if not query_traces[query_step_key].keys(): - continue - - # create scenarios ------------------------------------------------- - - nof_traces = len(query_traces[query_step_key].keys()) - - scenarios_create = [ - EvaluationScenarioCreate( - run_id=run_id, - timestamp=timestamp, - interval=interval, - # - status=EvaluationStatus.RUNNING, - ) - for _ in range(nof_traces) - ] - - scenarios = loop.run_until_complete( - evaluations_service.create_scenarios( - project_id=project_id, - user_id=user_id, - # - scenarios=scenarios_create, - ) - ) - - if len(scenarios) != nof_traces: - log.error( - "[LIVE] Could not create evaluation scenarios", - run_id=run_id, - ) - continue - # ------------------------------------------------------------------ - - # create query steps ----------------------------------------------- - query_trace_ids = list(query_traces[query_step_key].keys()) - scenario_ids = [scenario.id for scenario in scenarios if scenario.id] - - results_create = [ - EvaluationResultCreate( - run_id=run_id, - scenario_id=scenario_id, - step_key=query_step_key, - repeat_idx=0, - timestamp=timestamp, - interval=interval, - # - status=EvaluationStatus.SUCCESS, - # - trace_id=query_trace_id, - ) - for scenario_id, query_trace_id in zip(scenario_ids, query_trace_ids) - ] - - results = loop.run_until_complete( - evaluations_service.create_results( - project_id=project_id, - user_id=user_id, - # - results=results_create, - ) - ) - - assert ( - len(results) == nof_traces - ), f"Failed to create evaluation results for run {run_id}!" - # ------------------------------------------------------------------ - - scenario_has_errors: Dict[int, int] = dict() - scenario_status: Dict[int, EvaluationStatus] = dict() - - # iterate over query traces ---------------------------------------- - for idx, trace in enumerate(query_traces[query_step_key].values()): - scenario_has_errors[idx] = 0 - scenario_status[idx] = EvaluationStatus.SUCCESS - - scenario = scenarios[idx] - scenario_id = scenario_ids[idx] - query_trace_id = query_trace_ids[idx] - - if not isinstance(trace.spans, dict): - log.warn( - f"Trace with id {query_trace_id} has no root spans", - run_id=run_id, - ) - scenario_has_errors[idx] += 1 - scenario_status[idx] = EvaluationStatus.ERRORS - continue - - root_span = list(trace.spans.values())[0] - - if isinstance(root_span, list): - log.warn( - f"More than one root span for trace with id {query_trace_id}", - run_id=run_id, - ) - scenario_has_errors[idx] += 1 - scenario_status[idx] = EvaluationStatus.ERRORS - continue - - query_span_id = root_span.span_id - - log.info( - "[TRACE] ", - run_id=run_id, - trace_id=query_trace_id, - ) - - # run evaluator revisions -------------------------------------- - for jdx in range(nof_annotations): - annotation_step_key = annotation_steps_keys[jdx] - - step_has_errors = 0 - step_status = EvaluationStatus.SUCCESS - - references: Dict[str, Any] = { - **evaluator_references[annotation_step_key], - } - links: Dict[str, Any] = { - query_step_key: dict( - trace_id=query_trace_id, - span_id=query_span_id, - ) - } - - # invoke annotation workflow ------------------------------- - evaluator_revision = evaluator_revisions[annotation_step_key] - - if not evaluator_revision: - log.error( - f"Evaluator revision for {annotation_step_key} not found!" - ) - step_has_errors += 1 - scenario_has_errors[idx] += 1 - # run_has_errors += 1 - step_status = EvaluationStatus.FAILURE - scenario_status[idx] = EvaluationStatus.ERRORS - # run_status = EvaluationStatus.ERRORS - continue - - _revision = evaluator_revision.model_dump( - mode="json", - exclude_none=True, - ) - interface = ( - dict( - uri=evaluator_revision.data.uri, - url=evaluator_revision.data.url, - headers=evaluator_revision.data.headers, - schemas=evaluator_revision.data.schemas, - ) - if evaluator_revision.data - else dict() - ) - configuration = ( - dict( - script=evaluator_revision.data.script, - parameters=evaluator_revision.data.parameters, - ) - if evaluator_revision.data - else dict() - ) - parameters = configuration.get("parameters") - - _testcase = None - inputs = None - - _trace: Optional[dict] = ( - trace.model_dump( - mode="json", - exclude_none=True, - ) - if trace - else None - ) - - _root_span = root_span.model_dump(mode="json", exclude_none=True) - testcase_data = None - - root_span_attributes: dict = _root_span.get("attributes") or {} - root_span_attributes_ag: dict = root_span_attributes.get("ag") or {} - root_span_attributes_ag_data: dict = ( - root_span_attributes_ag.get("data") or {} - ) - root_span_attributes_ag_data_outputs = ( - root_span_attributes_ag_data.get("outputs") - ) - root_span_attributes_ag_data_inputs = ( - root_span_attributes_ag_data.get("inputs") - ) - - outputs = root_span_attributes_ag_data_outputs - inputs = testcase_data or root_span_attributes_ag_data_inputs - - workflow_service_request_data = WorkflowServiceRequestData( - revision=_revision, - parameters=parameters, - # - testcase=_testcase, - inputs=inputs, - # - trace=_trace, - outputs=outputs, - ) - - flags = ( - evaluator_revision.flags.model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - if evaluator_revision.flags - else None - ) - - workflow_service_request = WorkflowServiceRequest( - version="2025.07.14", - # - flags=flags, - # - interface=interface, - configuration=configuration, - # - data=workflow_service_request_data, - # - references=references, - links=links, - ) - - log.info( - "Invoking evaluator... ", - scenario_id=scenario.id, - trace_id=query_trace_id, - uri=interface.get("uri"), - ) - workflows_service_response = loop.run_until_complete( - workflows_service.invoke_workflow( - project_id=project_id, - user_id=user_id, - # - request=workflow_service_request, - # - annotate=True, - ) - ) - log.info( - "Invoked evaluator ", - scenario_id=scenario.id, - trace_id=workflows_service_response.trace_id, - ) - - trace_id = workflows_service_response.trace_id - - error = None - has_error = workflows_service_response.status.code != 200 - - # if error in evaluator, no annotation, only step ---------- - if has_error: - log.warn( - f"There is an error in evaluator {evaluator_step_key} for query {query_trace_id}." - ) - - step_has_errors += 1 - step_status = EvaluationStatus.FAILURE - scenario_has_errors[idx] += 1 - scenario_status[idx] = EvaluationStatus.ERRORS - - error = workflows_service_response.status.model_dump( - mode="json", - exclude_none=True, - ) - # ---------------------------------------------------------- - - # else, first annotation, then step ------------------------ - else: - outputs = ( - workflows_service_response.data.outputs - if workflows_service_response.data - else None - ) - - annotation = workflows_service_response - - trace_id = annotation.trace_id - - if not annotation.trace_id: - log.warn(f"annotation trace_id is missing.") - scenario_has_errors[idx] += 1 - scenario_status[idx] = EvaluationStatus.ERRORS - continue - - trace = None - if annotation.trace_id: - trace = loop.run_until_complete( - fetch_trace( - tracing_router=tracing_router, - request=request, - trace_id=annotation.trace_id, - ) - ) - - if trace: - log.info( - f"Trace found ", - scenario_id=scenario.id, - step_key=annotation_step_key, - trace_id=annotation.trace_id, - ) - else: - log.warn( - f"Trace missing", - scenario_id=scenario.id, - step_key=annotation_step_key, - trace_id=annotation.trace_id, - ) - scenario_has_errors[idx] += 1 - scenario_status[idx] = EvaluationStatus.ERRORS - continue - # ---------------------------------------------------------- - - results_create = [ - EvaluationResultCreate( - run_id=run_id, - scenario_id=scenario_id, - step_key=annotation_step_key, - # - timestamp=timestamp, - interval=interval, - # - status=step_status, - # - trace_id=trace_id, - error=error, - ) - ] - - results = loop.run_until_complete( - evaluations_service.create_results( - project_id=project_id, - user_id=user_id, - # - results=results_create, - ) - ) - - assert ( - len(results) == 1 - ), f"Failed to create evaluation result for scenario with id {scenario.id}!" - # -------------------------------------------------------------- - - scenario_edit = EvaluationScenarioEdit( - id=scenario.id, - tags=scenario.tags, - meta=scenario.meta, - status=scenario_status[idx], - ) - - scenario = loop.run_until_complete( - evaluations_service.edit_scenario( - project_id=project_id, - user_id=user_id, - # - scenario=scenario_edit, - ) - ) - - if not scenario or not scenario.id: - log.error( - f"Failed to update evaluation scenario with id {scenario_id}!", - run_id=run_id, - ) - - loop.run_until_complete( - evaluations_service.refresh_metrics( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - scenario_id=scenario_id, - ) - ) - # ------------------------------------------------------------------ - - loop.run_until_complete( - evaluations_service.refresh_metrics( - project_id=project_id, - user_id=user_id, - # - run_id=run_id, - timestamp=timestamp, - interval=interval, - ) - ) - except Exception as e: # pylint: disable=broad-exception-caught - log.error(e, exc_info=True) - - log.info( - "[DONE] ", - run_id=run_id, - ) - - return diff --git a/api/oss/src/utils/caching.py b/api/oss/src/utils/caching.py index f577e2334c..57ad96e2cf 100644 --- a/api/oss/src/utils/caching.py +++ b/api/oss/src/utils/caching.py @@ -1,101 +1,52 @@ from typing import Any, Type, Optional, Union from json import dumps, loads -from random import random -from asyncio import sleep from redis.asyncio import Redis from pydantic import BaseModel from oss.src.utils.logging import get_module_logger -from oss.src.utils.env import env log = get_module_logger(__name__) +# TODO: ADD ENV VARS +REDIS_HOST = "cache" +REDIS_PORT = 6378 AGENTA_CACHE_DB = 1 -AGENTA_CACHE_TTL = 5 * 60 # 5 minutes - -AGENTA_CACHE_BACKOFF_BASE = 50 # Base backoff delay in milliseconds -AGENTA_CACHE_ATTEMPTS_MAX = 4 # Maximum number of attempts to retry cache retrieval -AGENTA_CACHE_JITTER_SPREAD = 1 / 3 # Spread of jitter in backoff -AGENTA_CACHE_LEAKAGE_PROBABILITY = 0.05 # Probability of early leak -AGENTA_CACHE_LOCK_TTL = 1 # TTL for cache locks - -AGENTA_CACHE_SCAN_BATCH_SIZE = 500 -AGENTA_CACHE_DELETE_BATCH_SIZE = 1000 - -CACHE_DEBUG = False -CACHE_DEBUG_VALUE = False +AGENTA_CACHE_TTL = 15 # 15 seconds r = Redis( - host=env.REDIS_CACHE_HOST, - port=env.REDIS_CACHE_PORT, + host=REDIS_HOST, + port=REDIS_PORT, db=AGENTA_CACHE_DB, decode_responses=True, - socket_timeout=0.5, # read/write timeout + socket_timeout=0.100, # read/write timeout ) -# HELPERS ---------------------------------------------------------------------- +# --------------------------- +# 🔑 Key Parsing +# --------------------------- def _pack( - namespace: Optional[str] = None, - key: Optional[Union[str, dict]] = None, - project_id: Optional[str] = None, - user_id: Optional[str] = None, - pattern: Optional[bool] = False, + project_id: str, + user_id: str, + namespace: str, + key: Union[str, dict], ) -> str: - if project_id: - project_id = project_id[-12:] if len(project_id) > 12 else project_id - else: - project_id = "" - project_id = project_id + "-" * (12 - len(project_id)) - - if user_id: - user_id = user_id[-12:] if len(user_id) > 12 else user_id - else: - user_id = "" - user_id = user_id + "-" * (12 - len(user_id)) - - namespace = namespace or ("" if not pattern else "*") - - key = key or ("" if not pattern else "*") - - if isinstance(key, dict): - key = ":".join(f"{k}:{v}" for k, v in sorted(key.items())) - if isinstance(key, str): - pass - - else: - raise TypeError("Cache key must be str or dict") - - return f"p:{project_id}:u:{user_id}:{namespace}:{key}" - - -async def _scan(pattern: str) -> list[str]: - try: - cursor = 0 - keys: list[str] = [] - - while True: # TODO: Really ? - cursor, batch = await r.scan( - cursor=cursor, - match=pattern, - count=AGENTA_CACHE_SCAN_BATCH_SIZE, - ) - - keys.extend(batch) - - if cursor == 0: - break + return f"{project_id}:{user_id}:{namespace}:{key}" + elif isinstance(key, dict): + return f"{project_id}:{user_id}:{namespace}:" + ":".join( + f"{k}:{v}" for k, v in sorted(key.items()) + ) - return keys + raise TypeError("Cache key must be str or dict") - except Exception as e: - log.warn(f"Error scanning keys with pattern {pattern}: {e}") - return [] +# --------------------------- +# 📦 Value Serialization +# --------------------------- def _serialize( @@ -132,328 +83,70 @@ def _deserialize( return model.model_validate(data) -async def _delay( - attempts_idx: int, - backoff_base: float, - jitter_spread: float, -) -> None: - delay_step = backoff_base * (2**attempts_idx) - delay_base = backoff_base * ((2 ** (attempts_idx + 1)) - 1) - delay_jitter = random() * delay_step * (1 + jitter_spread) - delay = (1 - jitter_spread) * delay_base + delay_jitter - - await sleep(delay / 1000.0) # convert ms to seconds - - -async def _try_get_and_maybe_renew( - cache_name: str, - model: Optional[Type[BaseModel]], - is_list: Optional[bool] = False, - ttl: Optional[int] = None, -) -> Optional[Any]: - data = None - - raw = await r.get(cache_name) - - if raw: - if CACHE_DEBUG: - log.debug( - "[cache] HIT ", - name=cache_name, - value=data if CACHE_DEBUG_VALUE else "***", - ) - - data = _deserialize(raw, model=model, is_list=is_list) - - if ttl is not None and ttl > 0: - if CACHE_DEBUG: - log.debug( - "[cache] RENEW", - name=cache_name, - ) - - await r.expire(cache_name, ttl) - else: - if CACHE_DEBUG: - log.debug( - "[cache] MISS ", - name=cache_name, - ) - - return data - - -async def _maybe_retry_get( - namespace: Optional[str] = None, - project_id: Optional[str] = None, - user_id: Optional[str] = None, - key: Optional[Union[str, dict]] = None, - model: Optional[Type[BaseModel]] = None, - is_list: Optional[bool] = False, - retry: Optional[bool] = True, - *, - ttl: Optional[int] = None, - lock_ttl: int, - backoff_base: float, - attempts_idx: int, - attempts_max: int, - jitter_spread: float, - leakage_p: float, -) -> Optional[Any]: - cache_name = _pack( - namespace=namespace, - key=key, - project_id=project_id, - user_id=user_id, - ) - - if CACHE_DEBUG: - log.debug( - "[cache] RETRY", - name=cache_name, - attempt=attempts_idx, - ) - - if attempts_idx >= attempts_max: - if CACHE_DEBUG: - log.debug( - "[cache] QUIT ", - name=cache_name, - attempt=attempts_idx, - ) - - return None - - if random() < leakage_p: - if CACHE_DEBUG: - log.debug( - "[cache] LEAK ", - name=cache_name, - attempt=attempts_idx, - ) - - return None - - if retry: - lock_name = f"lock::{cache_name}" - lock_ex = int(lock_ttl * 1000) # convert seconds to milliseconds - - got_lock = await r.set(lock_name, "1", nx=True, ex=lock_ex) - - if got_lock: - if CACHE_DEBUG: - log.debug( - "[cache] LEAD ", - name=cache_name, - attempt=attempts_idx, - ) - - return None - - if CACHE_DEBUG: - log.debug( - "[cache] DELAY", - name=cache_name, - attempt=attempts_idx, - ) - - await _delay( - attempts_idx=attempts_idx, - backoff_base=backoff_base, - jitter_spread=jitter_spread, - ) - - return await get_cache( - namespace=namespace, - project_id=project_id, - user_id=user_id, - key=key, - model=model, - is_list=is_list, - retry=retry, - # - ttl=ttl, - lock=lock_ttl, - backoff=backoff_base, - attempt=attempts_idx + 1, - attempts=attempts_max, - jitter=jitter_spread, - leakage=leakage_p, - ) - - -# INTERFACE -------------------------------------------------------------------- +# --------------------------- +# 🚀 Public Async Cache Interface +# --------------------------- async def set_cache( + project_id: str, + user_id: str, namespace: str, - project_id: Optional[str] = None, - user_id: Optional[str] = None, - key: Optional[Union[str, dict]] = None, - value: Optional[Any] = None, - ttl: Optional[int] = AGENTA_CACHE_TTL, + key: Union[str, dict], + value: Any, + ttl: int = AGENTA_CACHE_TTL, ) -> Optional[bool]: try: - cache_name = _pack( - namespace=namespace, - key=key, - project_id=project_id, - user_id=user_id, - ) + cache_name = _pack(project_id, user_id, namespace, key) cache_value = _serialize(value) cache_px = int(ttl * 1000) await r.set(cache_name, cache_value, px=cache_px) - if CACHE_DEBUG: - log.debug( - "[cache] SAVE ", - name=cache_name, - value=cache_value if CACHE_DEBUG_VALUE else "***", - ) - - lock_name = f"lock::{cache_name}" - - check = await r.delete(lock_name) - - if check: - if CACHE_DEBUG: - log.debug( - "[cache] FREE ", - name=cache_name, - ) - return True except Exception as e: # pylint: disable=broad-exception-caught log.warn( - "[cache] SET ", + "[cache] SET", project_id=project_id, user_id=user_id, namespace=namespace, key=key, - value=value if CACHE_DEBUG_VALUE else "***", + # value=value, ttl=ttl, ) log.warn(e) - return None async def get_cache( - namespace: Optional[str] = None, - project_id: Optional[str] = None, - user_id: Optional[str] = None, - key: Optional[Union[str, dict]] = None, + project_id: str, + user_id: str, + namespace: str, + key: Union[str, dict], model: Optional[Type[BaseModel]] = None, - is_list: Optional[bool] = False, - retry: Optional[bool] = True, - *, - ttl: Optional[int] = None, - lock: Optional[int] = AGENTA_CACHE_LOCK_TTL, - backoff: Optional[float] = AGENTA_CACHE_BACKOFF_BASE, - attempt: Optional[int] = 0, - attempts: Optional[int] = AGENTA_CACHE_ATTEMPTS_MAX, - jitter: Optional[float] = AGENTA_CACHE_JITTER_SPREAD, - leakage: Optional[float] = AGENTA_CACHE_LEAKAGE_PROBABILITY, + is_list: bool = False, ) -> Optional[Any]: try: - cache_name = _pack( - namespace=namespace, - key=key, - project_id=project_id, - user_id=user_id, - ) - - data = await _try_get_and_maybe_renew(cache_name, model, is_list, ttl) - - if data is not None: - return data - - if retry: - return await _maybe_retry_get( - namespace=namespace, - project_id=project_id, - user_id=user_id, - key=key, - model=model, - is_list=is_list, - retry=retry, - # - ttl=ttl, - lock_ttl=lock, - backoff_base=backoff, - attempts_idx=attempt, - attempts_max=attempts, - jitter_spread=jitter, - leakage_p=leakage, - ) + cache_name = _pack(project_id, user_id, namespace, key) - return None + raw = await r.get(cache_name) - except Exception as e: - log.warn( - "[cache] GET ", - project_id=project_id, - user_id=user_id, - namespace=namespace, - key=key, - model=model, - is_list=is_list, - ) - log.warn(e) - - return None - - -async def invalidate_cache( - namespace: Optional[str] = None, - key: Optional[Union[str, dict]] = None, - project_id: Optional[str] = None, - user_id: Optional[str] = None, -) -> Optional[bool]: - try: - cache_name = None - - if key is not None and namespace is not None: - cache_name = _pack( - namespace=namespace, - key=key, - project_id=project_id, - user_id=user_id, - ) - - await r.delete(cache_name) - - else: - cache_name = _pack( - namespace=namespace, - project_id=project_id, - user_id=user_id, - pattern=True, - ) - - keys = await _scan(cache_name) - - for i in range(0, len(keys), AGENTA_CACHE_DELETE_BATCH_SIZE): - await r.delete(*keys[i : i + AGENTA_CACHE_DELETE_BATCH_SIZE]) - - if CACHE_DEBUG: - log.debug( - "[cache] FLUSH", - name=cache_name, - ) + if not raw: + # log.debug(f"Cache miss for {namespace} {key}") + return None - return True + return _deserialize(raw, model=model, is_list=is_list) except Exception as e: # pylint: disable=broad-exception-caught log.warn( - "[cache] FLUSH", + "[cache] GET", project_id=project_id, user_id=user_id, namespace=namespace, key=key, + model=model, + is_list=is_list, ) log.warn(e) - return None diff --git a/api/oss/src/utils/common.py b/api/oss/src/utils/common.py index 1acbdd706d..b471d10e75 100644 --- a/api/oss/src/utils/common.py +++ b/api/oss/src/utils/common.py @@ -1,5 +1,4 @@ from typing import Any, Callable -from uuid import UUID, RFC_4122 from fastapi.types import DecoratedCallable from fastapi import APIRouter as FastAPIRouter @@ -54,18 +53,3 @@ def is_ee(): def is_oss(): return env.AGENTA_LICENSE == "oss" - - -def is_uuid7(s: str, *, require_canonical: bool = False) -> bool: - try: - u = UUID(s) # parses hyphenated, braced, or 32-hex forms - except (ValueError, TypeError, AttributeError): - return False - - if u.version != 7 or u.variant != RFC_4122: - return False - - if require_canonical and str(u) != s.lower(): - return False - - return True diff --git a/api/oss/src/utils/context.py b/api/oss/src/utils/context.py deleted file mode 100644 index 219f61763c..0000000000 --- a/api/oss/src/utils/context.py +++ /dev/null @@ -1,3 +0,0 @@ -from contextvars import ContextVar - -request_id_ctx: ContextVar[str] = ContextVar("request_id", default=None) diff --git a/api/oss/src/utils/env.py b/api/oss/src/utils/env.py index b2db70490f..d6e6d0f119 100644 --- a/api/oss/src/utils/env.py +++ b/api/oss/src/utils/env.py @@ -9,118 +9,93 @@ class EnvironSettings(BaseModel): # AGENTA-SPECIFIC (REQUIRED) AGENTA_LICENSE: str = "ee" if os.getenv("AGENTA_LICENSE") == "ee" else "oss" - AGENTA_API_URL: str = os.getenv("AGENTA_API_URL") or "http://localhost/api" - AGENTA_WEB_URL: str = os.getenv("AGENTA_WEB_URL") or "" - AGENTA_SERVICES_URL: str = os.getenv("AGENTA_SERVICES_URL") or "" - AGENTA_AUTH_KEY: str = os.getenv("AGENTA_AUTH_KEY") or "" - AGENTA_CRYPT_KEY: str = os.getenv("AGENTA_CRYPT_KEY") or "" + AGENTA_API_URL: str = os.getenv("AGENTA_API_URL", "http://localhost/api") + AGENTA_WEB_URL: str = os.getenv("AGENTA_WEB_URL", "") + AGENTA_SERVICES_URL: str = os.getenv("AGENTA_SERVICES_URL", "") + AGENTA_AUTH_KEY: str = os.getenv("AGENTA_AUTH_KEY", "") + AGENTA_CRYPT_KEY: str = os.getenv("AGENTA_CRYPT_KEY", "") # AGENTA-SPECIFIC (OPTIONAL) AGENTA_AUTO_MIGRATIONS: bool = ( - os.getenv("AGENTA_AUTO_MIGRATIONS") or "true" - ).lower() in _TRUTHY - AGENTA_PRICING: str = os.getenv("AGENTA_PRICING") or "{}" - AGENTA_DEMOS: str = os.getenv("AGENTA_DEMOS") or "" - AGENTA_RUNTIME_PREFIX: str = os.getenv("AGENTA_RUNTIME_PREFIX") or "" + os.getenv("AGENTA_AUTO_MIGRATIONS", "true").lower() in _TRUTHY + ) + AGENTA_PRICING: str = os.getenv("AGENTA_PRICING", "{}") + AGENTA_DEMOS: str = os.getenv("AGENTA_DEMOS", "") + AGENTA_RUNTIME_PREFIX: str = os.getenv("AGENTA_RUNTIME_PREFIX", "") # SUPERTOKENS (REQUIRED) - SUPERTOKENS_CONNECTION_URI: str = os.getenv("SUPERTOKENS_CONNECTION_URI") or "" - SUPERTOKENS_API_KEY: str = os.getenv("SUPERTOKENS_API_KEY") or "" + SUPERTOKENS_CONNECTION_URI: str = os.getenv("SUPERTOKENS_CONNECTION_URI", "") + SUPERTOKENS_API_KEY: str = os.getenv("SUPERTOKENS_API_KEY", "") # DATABASE (REQUIRED) - POSTGRES_URI_CORE: str = os.getenv("POSTGRES_URI_CORE") or "" - POSTGRES_URI_TRACING: str = os.getenv("POSTGRES_URI_TRACING") or "" - POSTGRES_URI_SUPERTOKENS: str = os.getenv("POSTGRES_URI_SUPERTOKENS") or "" - ALEMBIC_CFG_PATH_CORE: str = os.getenv("ALEMBIC_CFG_PATH_CORE") or "" - ALEMBIC_CFG_PATH_TRACING: str = os.getenv("ALEMBIC_CFG_PATH_TRACING") or "" + POSTGRES_URI_CORE: str = os.getenv("POSTGRES_URI_CORE", "") + POSTGRES_URI_TRACING: str = os.getenv("POSTGRES_URI_TRACING", "") + POSTGRES_URI_SUPERTOKENS: str = os.getenv("POSTGRES_URI_SUPERTOKENS", "") + ALEMBIC_CFG_PATH_CORE: str = os.getenv("ALEMBIC_CFG_PATH_CORE", "") + ALEMBIC_CFG_PATH_TRACING: str = os.getenv("ALEMBIC_CFG_PATH_TRACING", "") # TASK QUEUE / BROKER (REQUIRED) - REDIS_URL: str = os.getenv("REDIS_URL") or "" - RABBITMQ_DEFAULT_USER: str = os.getenv("RABBITMQ_DEFAULT_USER") or "guest" - RABBITMQ_DEFAULT_PASS: str = os.getenv("RABBITMQ_DEFAULT_PASS") or "guest" - CELERY_BROKER_URL: str = os.getenv("CELERY_BROKER_URL") or "" - CELERY_RESULT_BACKEND: str = os.getenv("CELERY_RESULT_BACKEND") or "" - - # CACHE (REQUIRED) - REDIS_CACHE_HOST: str = os.getenv("REDIS_CACHE_HOST") or "cache" - REDIS_CACHE_PORT: int = int(os.getenv("REDIS_CACHE_PORT") or "6378") + REDIS_URL: str = os.getenv("REDIS_URL", "") + RABBITMQ_DEFAULT_USER: str = os.getenv("RABBITMQ_DEFAULT_USER", "guest") + RABBITMQ_DEFAULT_PASS: str = os.getenv("RABBITMQ_DEFAULT_PASS", "guest") + CELERY_BROKER_URL: str = os.getenv("CELERY_BROKER_URL", "") + CELERY_RESULT_BACKEND: str = os.getenv("CELERY_RESULT_BACKEND", "") # Mail - SENDGRID_API_KEY: str = os.getenv("SENDGRID_API_KEY") or "" - AGENTA_SEND_EMAIL_FROM_ADDRESS: str = ( - os.getenv("AGENTA_SEND_EMAIL_FROM_ADDRESS") or "" + SENDGRID_API_KEY: str = os.getenv("SENDGRID_API_KEY", "") + AGENTA_SEND_EMAIL_FROM_ADDRESS: str = os.getenv( + "AGENTA_SEND_EMAIL_FROM_ADDRESS", "" ) # Optional integrations - POSTHOG_API_KEY: str = os.getenv("POSTHOG_API_KEY") or "" - POSTHOG_HOST: str = os.getenv("POSTHOG_HOST", "https://app.posthog.com") or "" - GOOGLE_OAUTH_CLIENT_ID: str = os.getenv("GOOGLE_OAUTH_CLIENT_ID", "") or "" - GOOGLE_OAUTH_CLIENT_SECRET: str = os.getenv("GOOGLE_OAUTH_CLIENT_SECRET", "") or "" - GITHUB_OAUTH_CLIENT_ID: str = os.getenv("GITHUB_OAUTH_CLIENT_ID", "") or "" - GITHUB_OAUTH_CLIENT_SECRET: str = os.getenv("GITHUB_OAUTH_CLIENT_SECRET", "") or "" - NEW_RELIC_LICENSE_KEY: str = os.getenv("NEW_RELIC_LICENSE_KEY", "") or "" - NRIA_LICENSE_KEY: str = os.getenv("NRIA_LICENSE_KEY", "") or "" - LOOPS_API_KEY: str = os.getenv("LOOPS_API_KEY", "") or "" - CRISP_WEBSITE_ID: str = os.getenv("CRISP_WEBSITE_ID", "") or "" - STRIPE_API_KEY: str = os.getenv("STRIPE_API_KEY", "") or "" - STRIPE_WEBHOOK_SECRET: str = os.getenv("STRIPE_WEBHOOK_SECRET", "") or "" + POSTHOG_API_KEY: str = os.getenv( + "POSTHOG_API_KEY", "phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7" + ) + POSTHOG_HOST: str = os.getenv("POSTHOG_HOST", "https://app.posthog.com") + GOOGLE_OAUTH_CLIENT_ID: str = os.getenv("GOOGLE_OAUTH_CLIENT_ID", "") + GOOGLE_OAUTH_CLIENT_SECRET: str = os.getenv("GOOGLE_OAUTH_CLIENT_SECRET", "") + GITHUB_OAUTH_CLIENT_ID: str = os.getenv("GITHUB_OAUTH_CLIENT_ID", "") + GITHUB_OAUTH_CLIENT_SECRET: str = os.getenv("GITHUB_OAUTH_CLIENT_SECRET", "") + NEW_RELIC_LICENSE_KEY: str = os.getenv("NEW_RELIC_LICENSE_KEY", "") + NRIA_LICENSE_KEY: str = os.getenv("NRIA_LICENSE_KEY", "") + LOOPS_API_KEY: str = os.getenv("LOOPS_API_KEY", "") + CRISP_WEBSITE_ID: str = os.getenv("CRISP_WEBSITE_ID", "") + STRIPE_API_KEY: str = os.getenv("STRIPE_API_KEY", "") + STRIPE_WEBHOOK_SECRET: str = os.getenv("STRIPE_WEBHOOK_SECRET", "") # LLM Providers (optional) - ALEPHALPHA_API_KEY: str = os.getenv("ALEPHALPHA_API_KEY", "") or "" - ANTHROPIC_API_KEY: str = os.getenv("ANTHROPIC_API_KEY", "") or "" - ANYSCALE_API_KEY: str = os.getenv("ANYSCALE_API_KEY", "") or "" - COHERE_API_KEY: str = os.getenv("COHERE_API_KEY", "") or "" - DEEPINFRA_API_KEY: str = os.getenv("DEEPINFRA_API_KEY", "") or "" - GEMINI_API_KEY: str = os.getenv("GEMINI_API_KEY", "") or "" - GROQ_API_KEY: str = os.getenv("GROQ_API_KEY", "") or "" - MISTRAL_API_KEY: str = os.getenv("MISTRAL_API_KEY", "") or "" - OPENAI_API_KEY: str = os.getenv("OPENAI_API_KEY", "") or "" - OPENROUTER_API_KEY: str = os.getenv("OPENROUTER_API_KEY", "") or "" - PERPLEXITYAI_API_KEY: str = os.getenv("PERPLEXITYAI_API_KEY", "") or "" - TOGETHERAI_API_KEY: str = os.getenv("TOGETHERAI_API_KEY", "") or "" - - AGENTA_BLOCKED_EMAILS: set = { - e.strip().lower() - for e in (os.getenv("AGENTA_BLOCKED_EMAILS") or "").split(",") - if e.strip() - } - AGENTA_BLOCKED_DOMAINS: set = { - e.strip().lower() - for e in (os.getenv("AGENTA_BLOCKED_DOMAINS") or "").split(",") - if e.strip() - } - AGENTA_ALLOWED_DOMAINS: set = { - e.strip().lower() - for e in (os.getenv("AGENTA_ALLOWED_DOMAINS") or "").split(",") - if e.strip() - } + ALEPHALPHA_API_KEY: str = os.getenv("ALEPHALPHA_API_KEY", "") + ANTHROPIC_API_KEY: str = os.getenv("ANTHROPIC_API_KEY", "") + ANYSCALE_API_KEY: str = os.getenv("ANYSCALE_API_KEY", "") + COHERE_API_KEY: str = os.getenv("COHERE_API_KEY", "") + DEEPINFRA_API_KEY: str = os.getenv("DEEPINFRA_API_KEY", "") + GEMINI_API_KEY: str = os.getenv("GEMINI_API_KEY", "") + GROQ_API_KEY: str = os.getenv("GROQ_API_KEY", "") + MISTRAL_API_KEY: str = os.getenv("MISTRAL_API_KEY", "") + OPENAI_API_KEY: str = os.getenv("OPENAI_API_KEY", "") + OPENROUTER_API_KEY: str = os.getenv("OPENROUTER_API_KEY", "") + PERPLEXITYAI_API_KEY: str = os.getenv("PERPLEXITYAI_API_KEY", "") + TOGETHERAI_API_KEY: str = os.getenv("TOGETHERAI_API_KEY", "") # AGENTA-SPECIFIC (INTERNAL INFRA) - DOCKER_NETWORK_MODE: str = os.getenv("DOCKER_NETWORK_MODE") or "bridge" + DOCKER_NETWORK_MODE: str = os.getenv("DOCKER_NETWORK_MODE", "bridge") # AGENTA-SPECIFIC (INTERNAL LOGGING) AGENTA_LOG_CONSOLE_ENABLED: bool = ( - os.getenv("AGENTA_LOG_CONSOLE_ENABLED") or "true" - ) in _TRUTHY - AGENTA_LOG_CONSOLE_LEVEL: str = ( - os.getenv("AGENTA_LOG_CONSOLE_LEVEL") or "TRACE" + os.getenv("AGENTA_LOG_CONSOLE_ENABLED", "true") in _TRUTHY + ) + AGENTA_LOG_CONSOLE_LEVEL: str = os.getenv( + "AGENTA_LOG_CONSOLE_LEVEL", "TRACE" ).upper() AGENTA_LOG_OTLP_ENABLED: bool = ( - os.getenv("AGENTA_LOG_OTLP_ENABLED") or "false" - ) in _TRUTHY - AGENTA_LOG_OTLP_LEVEL: str = (os.getenv("AGENTA_LOG_OTLP_LEVEL") or "INFO").upper() + os.getenv("AGENTA_LOG_OTLP_ENABLED", "false") in _TRUTHY + ) + AGENTA_LOG_OTLP_LEVEL: str = os.getenv("AGENTA_LOG_OTLP_LEVEL", "INFO").upper() AGENTA_LOG_FILE_ENABLED: bool = ( - os.getenv("AGENTA_LOG_FILE_ENABLED") or "true" - ) in _TRUTHY - AGENTA_LOG_FILE_LEVEL: str = ( - os.getenv("AGENTA_LOG_FILE_LEVEL") or "WARNING" - ).upper() - AGENTA_LOG_FILE_BASE: str = os.getenv("AGENTA_LOG_FILE_PATH") or "error" - - # AGENTA-SPECIFIC (OTLP) - AGENTA_OTLP_MAX_BATCH_BYTES: int = int( - os.getenv("AGENTA_OTLP_MAX_BATCH_BYTES") or str(10 * 1024 * 1024) + os.getenv("AGENTA_LOG_FILE_ENABLED", "true") in _TRUTHY ) + AGENTA_LOG_FILE_LEVEL: str = os.getenv("AGENTA_LOG_FILE_LEVEL", "WARNING").upper() + AGENTA_LOG_FILE_BASE: str = os.getenv("AGENTA_LOG_FILE_PATH", "error") env = EnvironSettings() diff --git a/api/oss/src/utils/exceptions.py b/api/oss/src/utils/exceptions.py index 27318d98f6..27434c0726 100644 --- a/api/oss/src/utils/exceptions.py +++ b/api/oss/src/utils/exceptions.py @@ -1,225 +1,53 @@ -from typing import Any, Optional, List from uuid import uuid4 -from functools import wraps -from traceback import format_exc from contextlib import AbstractContextManager - -from fastapi import Request, HTTPException +from traceback import format_exc +from functools import wraps +from fastapi import HTTPException from oss.src.utils.logging import get_module_logger -from oss.src.core.shared.exceptions import EntityCreationConflict - log = get_module_logger(__name__) -class suppress(AbstractContextManager): # pylint: disable=invalid-name - def __init__( - self, - message: Optional[str] = "", - verbose: Optional[bool] = True, - exclude: Optional[List[type]] = None, - ): +class suppress(AbstractContextManager): + def __init__(self, verbose: bool = False): self.verbose = verbose - self.message = message - self.exclude = exclude or [] def __enter__(self): pass def __exit__(self, exc_type, exc_value, exc_tb): - if exc_type is not None: - support_id = str(uuid4()) - - if self.verbose is True: - if any(isinstance(exc_value, excl) for excl in self.exclude): - raise exc_value - - log.warn( - f"[SUPPRESSED] {self.message}\n{format_exc()}", - support_id=support_id, - ) - - return True - - -def suppress_exceptions( - default: Optional[Any] = None, - message: Optional[str] = "", - verbose: Optional[bool] = True, - exclude: Optional[List[type]] = None, -): - def decorator(func): - @wraps(func) - async def wrapper(*args, **kwargs): - try: - return await func(*args, **kwargs) - - except Exception as exc: # pylint: disable=broad-exception-caught - if any(isinstance(exc, excl) for excl in exclude or []): - raise - - support_id = str(uuid4()) - operation_id = func.__name__ if hasattr(func, "__name__") else None - - if verbose is True: - log.warn( - f"[SUPPRESSED] {message}\n{format_exc()}", - support_id=support_id, - operation_id=operation_id, - ) + if exc_type is None: + return True + else: + if self.verbose: + log.warn("--- SUPPRESSING EXCEPTION ---") + log.warn(format_exc()) + log.warn("-----------------------------") + return True - return default - - return wrapper - return decorator - - -def intercept_exceptions( - verbose: Optional[bool] = True, -): +def handle_exceptions(): def decorator(func): @wraps(func) async def wrapper(*args, **kwargs): try: return await func(*args, **kwargs) - except HTTPException as e: raise e - - except Exception as e: - if isinstance(e, EntityCreationConflict): - e: EntityCreationConflict - - raise ConflictException( - message=e.message, - conflict=e.conflict, - ) from e - + except Exception: support_id = str(uuid4()) - operation_id = func.__name__ if hasattr(func, "__name__") else None - user_id = None - organization_id = None - workspace_id = None - project_id = None - request_path = None - # request_query = None - # request_headers = None - # request_body = None + log.error("--- HANDLING EXCEPTION ---") + log.error(f"support_id={support_id} & operation_id={func.__name__}") + log.error(f"{format_exc()}") + log.error("--------------------------") - with suppress(verbose=False): - request = kwargs.pop("request", None) - request = request if isinstance(request, Request) else None - state = request.state if request else None - user_id = state.user_id if state else None - organization_id = state.organization_id if state else None - workspace_id = state.workspace_id if state else None - project_id = state.project_id if state else None - request_path = request.url.path if request else None - # request_query = request.url.query if request else None - # request_headers = request.headers if request else None - # request_body = kwargs if "secrets" not in request_path else None - - message = ( - "An unexpected error occurred. " - + "Please try again later or contact support." + raise HTTPException( + status_code=500, + detail=f"An unexpected error occurred with operation_id={func.__name__}. Please contact support with support_id={support_id}.", ) - status_code = 500 - detail = { - "message": message, - "support_id": support_id, - "operation_id": operation_id, - } - - if verbose is True: - log.error( - f"[INTERCEPTED]\n{format_exc()}", - support_id=support_id, - operation_id=operation_id, - user_id=user_id, - organization_id=organization_id, - workspace_id=workspace_id, - project_id=project_id, - request_path=request_path, - # request_query=request_query, - # request_headers=request_headers, - # request_body=request_body, - ) - - raise HTTPException(status_code=status_code, detail=detail) from e - return wrapper return decorator - - -class BaseHTTPException(HTTPException): - default_code: int = 500 - default_message: str = "Internal Server Error" - - def __init__( - self, - code: int = None, - message: Any = None, - **kwargs: Any, - ): - self.code = code or self.default_code - self.message = message or self.default_message - self.kwargs = kwargs - - self.detail = {"message": self.message, **self.kwargs} - - super().__init__(status_code=self.code, detail=self.detail) - - -class BadRequestException(BaseHTTPException): - default_code = 400 - default_message = "Bad Request" - - -class UnauthorizedException(BaseHTTPException): - default_code = 401 - default_message = "Unauthorized" - - -class ForbiddenException(BaseHTTPException): - default_code = 403 - default_message = "Forbidden" - - -class NotFoundException(BaseHTTPException): - default_code = 404 - default_message = "Not Found" - - -class ConflictException(BaseHTTPException): - default_code = 409 - default_message = "Conflict" - - -class UnprocessableContentException(BaseHTTPException): - default_code = 422 - default_message = "Unprocessable Content" - - -class TooManyRequestsException(BaseHTTPException): - default_code = 429 - default_message = "Too Many Requests" - - -class InternalServerErrorException(BaseHTTPException): - default_code = 500 - default_message = "Internal Server Error" - - -class ServiceUnavailableException(BaseHTTPException): - default_code = 503 - default_message = "Service Unavailable" - - -class GatewayTimeoutException(BaseHTTPException): - default_code = 504 - default_message = "Gateway Timeout" diff --git a/api/oss/src/utils/helpers.py b/api/oss/src/utils/helpers.py index d02ceff9fe..b345413c35 100644 --- a/api/oss/src/utils/helpers.py +++ b/api/oss/src/utils/helpers.py @@ -1,74 +1,10 @@ -from typing import List, Dict -from uuid import UUID import os import sys -import unicodedata -import re - import click from oss.src.utils.env import env -def get_metrics_keys_from_schema(schema=None, path=()) -> List[Dict[str, str]]: - metrics = [] - - if not isinstance(schema, dict) or "type" not in schema: - return metrics - - metric_type = None - - t = schema["type"] - - if t == "object": - if "properties" in schema: - for key, prop in schema["properties"].items(): - metrics.extend(get_metrics_keys_from_schema(prop, path + (key,))) - else: - metric_type = "json" - - elif t == "array" and "items" in schema: - if schema["items"].get("type") == "string" and "enum" in schema["items"]: - metric_type = "categorical/multiple" - - elif t == "boolean": - metric_type = "binary" - - elif t == "string": - metric_type = "categorical/single" if "enum" in schema else "string" - - elif t == "number": - metric_type = "numeric/continuous" - - elif t == "integer": - metric_type = "numeric/discrete" - - if metric_type: - metrics.append({"path": ".".join(path), "type": metric_type}) - - return metrics - - -def get_slug_from_name_and_id( - name: str, - id: UUID, # pylint: disable=redefined-builtin -) -> str: - # Normalize Unicode (e.g., é → e) - name = unicodedata.normalize("NFKD", name) - # Remove non-ASCII characters - name = name.encode("ascii", "ignore").decode("ascii") - # Lowercase and remove non-word characters except hyphens and spaces - name = re.sub(r"[^\w\s-]", "", name.lower()) - # Replace any sequence of hyphens or whitespace with a single hyphen - name = re.sub(r"[-\s]+", "-", name) - # Trim leading/trailing hyphens - name = name.strip("-") - # Last 12 characters of the ID - slug = f"{name}-{id.hex[-12:]}" - - return slug.lower() - - def parse_url(url: str) -> str: """ Parses and potentially rewrites a URL based on the environment and Docker network mode. @@ -80,34 +16,22 @@ def parse_url(url: str) -> str: str: The parsed or rewritten URL suitable for the current environment and Docker network mode. """ - if "localhost" not in url and "0.0.0.0" not in url: + if "localhost" not in url: return url internal_url = os.getenv("AGENTA_API_INTERNAL_URL") if internal_url: return internal_url - docker_network_mode = env.DOCKER_NETWORK_MODE + docker_network_mode = os.getenv("DOCKER_NETWORK_MODE", "").lower() if not docker_network_mode or docker_network_mode == "bridge": - return url.replace( - "localhost", - "host.docker.internal", - ).replace( - "0.0.0.0", - "host.docker.internal", - ) + return url.replace("localhost", "host.docker.internal") if docker_network_mode == "host": return url - return url.replace( - "localhost", - "host.docker.internal", - ).replace( - "0.0.0.0", - "host.docker.internal", - ) + return url.replace("localhost", "host.docker.internal") def warn_deprecated_env_vars(): @@ -127,21 +51,20 @@ def warn_deprecated_env_vars(): for old_var, new_var in deprecated_env_map.items(): if getattr(env, old_var, None) is not None: - if new_var is not None: - messages.append( + messages.append( + f"Environment variable '{old_var}' is deprecated and will be removed in the next release. " + f"Please use '{new_var}' instead." + if new_var + else "" + ) + + if old_var is not None and new_var is None: + messages.extend( + [ f"Environment variable '{old_var}' is deprecated and will be removed in the next release. " - f"Please use '{new_var}' instead." - if new_var - else "" - ) - - else: - messages.extend( - [ - f"Environment variable '{old_var}' is deprecated and will be removed in the next release. " - f"Please consider removing it." - ] - ) + f"Please consider removing it." + ] + ) if messages: click.echo( diff --git a/api/oss/src/utils/logging.py b/api/oss/src/utils/logging.py index 67c53d4369..b16753a2ab 100644 --- a/api/oss/src/utils/logging.py +++ b/api/oss/src/utils/logging.py @@ -4,9 +4,18 @@ import logging from typing import Any, Optional +# from datetime import datetime +# from logging.handlers import RotatingFileHandler + import structlog from structlog.typing import EventDict, WrappedLogger, Processor +# from opentelemetry.trace import get_current_span +# from opentelemetry._logs import set_logger_provider +# from opentelemetry.sdk._logs import LoggingHandler, LoggerProvider +# from opentelemetry.sdk._logs.export import BatchLogRecordProcessor +# from opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter + from oss.src.utils.env import env @@ -33,6 +42,15 @@ def bound_logger_trace(self, *args, **kwargs): AGENTA_LOG_CONSOLE_ENABLED = env.AGENTA_LOG_CONSOLE_ENABLED AGENTA_LOG_CONSOLE_LEVEL = env.AGENTA_LOG_CONSOLE_LEVEL +# AGENTA_LOG_OTLP_ENABLED = env.AGENTA_LOG_OTLP_ENABLED +# AGENTA_LOG_OTLP_LEVEL = env.AGENTA_LOG_OTLP_LEVEL + +# AGENTA_LOG_FILE_ENABLED = env.AGENTA_LOG_FILE_ENABLED +# AGENTA_LOG_FILE_LEVEL = env.AGENTA_LOG_FILE_LEVEL +# AGENTA_LOG_FILE_BASE = env.AGENTA_LOG_FILE_PATH +# LOG_FILE_DATE = datetime.utcnow().strftime("%Y-%m-%d") +# AGENTA_LOG_FILE_PATH = f"{AGENTA_LOG_FILE_BASE}-{LOG_FILE_DATE}.log" + # COLORS LEVEL_COLORS = { "TRACE": "\033[97m", @@ -72,6 +90,15 @@ def process_positional_args(_, __, event_dict: EventDict) -> EventDict: return event_dict +# def add_trace_context(_, __, event_dict: EventDict) -> EventDict: +# span = get_current_span() +# if span and span.get_span_context().is_valid: +# ctx = span.get_span_context() +# event_dict["TraceId"] = format(ctx.trace_id, "032x") +# event_dict["SpanId"] = format(ctx.span_id, "016x") +# return event_dict + + def add_logger_info( logger: WrappedLogger, method_name: str, event_dict: EventDict ) -> EventDict: @@ -88,7 +115,6 @@ def add_logger_info( event_dict["SeverityNumber"] = SEVERITY_NUMBERS.get(level, 9) event_dict["LoggerName"] = logger.name event_dict["MethodName"] = method_name - event_dict["pid"] = os.getpid() return event_dict @@ -103,7 +129,6 @@ def colored_console_renderer() -> Processor: } def render(_, __, event_dict: EventDict) -> str: - pid = event_dict.pop("pid", None) ts = event_dict.pop("Timestamp", "")[:23] + "Z" level = event_dict.pop("level", "INFO") msg = event_dict.pop("event", "") @@ -120,69 +145,85 @@ def render(_, __, event_dict: EventDict) -> str: return render +# def plain_renderer() -> Processor: +# hidden = { +# "SeverityText", +# "SeverityNumber", +# "MethodName", +# "logger_factory", +# "LoggerName", +# "level", +# } + +# def render(_, __, event_dict: EventDict) -> str: +# ts = event_dict.pop("Timestamp", "")[:23] + "Z" +# level = event_dict.get("level", "") +# msg = event_dict.pop("event", "") +# padded = f"[{level:<5}]" +# logger = f"[{event_dict.pop('logger', '')}]" +# extras = " ".join(f"{k}={v}" for k, v in event_dict.items() if k not in hidden) +# return f"{ts} {padded} {msg} {logger} {extras}" + +# return render + + +# def json_renderer() -> Processor: +# return structlog.processors.JSONRenderer() + + SHARED_PROCESSORS: list[Processor] = [ structlog.processors.TimeStamper(fmt="iso", utc=True, key="Timestamp"), process_positional_args, + # add_trace_context, add_logger_info, structlog.processors.format_exc_info, structlog.processors.dict_tracebacks, ] -# Guard against double initialization -_LOGGING_CONFIGURED = False +def create_struct_logger( + processors: list[Processor], name: str +) -> structlog.stdlib.BoundLogger: + logger = logging.getLogger(name) + logger.setLevel(TRACE_LEVEL) + return structlog.wrap_logger( + logger, + processors=SHARED_PROCESSORS + processors, + wrapper_class=structlog.stdlib.BoundLogger, + logger_factory=structlog.stdlib.LoggerFactory(), + cache_logger_on_first_use=True, + ) -# ensure no duplicate sinks via root -_root = logging.getLogger() -_root.handlers.clear() -_root.propagate = False # CONFIGURE HANDLERS AND STRUCTLOG LOGGERS +handlers = [] loggers = [] -if AGENTA_LOG_CONSOLE_ENABLED and not _LOGGING_CONFIGURED: - _LOGGING_CONFIGURED = True - - # Create a single handler for console output - console_handler = logging.StreamHandler(sys.stdout) - console_handler.setLevel(getattr(logging, AGENTA_LOG_CONSOLE_LEVEL, TRACE_LEVEL)) - console_handler.setFormatter(logging.Formatter("%(message)s")) - - # Configure the structlog console logger - console_logger = logging.getLogger("agenta_console") - console_logger.handlers.clear() - console_logger.addHandler(console_handler) - console_logger.setLevel(TRACE_LEVEL) - console_logger.propagate = False - - loggers.append( - structlog.wrap_logger( - console_logger, - processors=SHARED_PROCESSORS + [colored_console_renderer()], - wrapper_class=structlog.stdlib.BoundLogger, - logger_factory=structlog.stdlib.LoggerFactory(), - cache_logger_on_first_use=False, # Don't cache to avoid stale state - ) - ) - - # Configure uvicorn/gunicorn loggers with separate handlers - for name in ("uvicorn.access", "uvicorn.error", "gunicorn.error"): - uh = logging.StreamHandler(sys.stdout) - uh.setLevel(getattr(logging, AGENTA_LOG_CONSOLE_LEVEL, TRACE_LEVEL)) - uh.setFormatter(logging.Formatter("%(message)s")) - server_logger = logging.getLogger(name) - server_logger.handlers.clear() - server_logger.setLevel(logging.INFO) - server_logger.addHandler(uh) - server_logger.propagate = False - - # Intercept agenta SDK loggers to prevent duplicate output - for sdk_name in ("agenta", "agenta.sdk"): - sdk_logger = logging.getLogger(sdk_name) - sdk_logger.handlers.clear() - sdk_logger.addHandler(console_handler) # Use our handler - sdk_logger.setLevel(logging.INFO) - sdk_logger.propagate = False +if AGENTA_LOG_CONSOLE_ENABLED: + h = logging.StreamHandler(sys.stdout) + h.setLevel(getattr(logging, AGENTA_LOG_CONSOLE_LEVEL, TRACE_LEVEL)) + h.setFormatter(logging.Formatter("%(message)s")) + logging.getLogger("console").addHandler(h) + loggers.append(create_struct_logger([colored_console_renderer()], "console")) + +# if AGENTA_LOG_FILE_ENABLED: +# h = RotatingFileHandler(AGENTA_LOG_FILE_PATH, maxBytes=10 * 1024 * 1024, backupCount=5) +# h.setLevel(getattr(logging, AGENTA_LOG_FILE_LEVEL, logging.WARNING)) +# h.setFormatter(logging.Formatter("%(message)s")) +# logging.getLogger("file").addHandler(h) +# loggers.append(create_struct_logger([plain_renderer()], "file")) + +# if AGENTA_LOG_OTLP_ENABLED: +# provider = LoggerProvider() +# exporter = OTLPLogExporter() +# provider.add_log_record_processor(BatchLogRecordProcessor(exporter)) +# set_logger_provider(provider) +# h = LoggingHandler( +# level=getattr(logging, AGENTA_LOG_OTLP_LEVEL, logging.INFO), logger_provider=provider +# ) +# h.setFormatter(logging.Formatter("%(message)s")) +# logging.getLogger("otel").addHandler(h) +# loggers.append(create_struct_logger([json_renderer()], "otel")) class MultiLogger: @@ -221,8 +262,11 @@ def bind(self, **kwargs): return MultiLogger(*(l.bind(**kwargs) for l in self._loggers)) +multi_logger = MultiLogger(*loggers) + + def get_logger(name: Optional[str] = None) -> MultiLogger: - return MultiLogger(*loggers).bind(logger=name) + return multi_logger.bind(logger=name) def get_module_logger(path: str) -> MultiLogger: diff --git a/api/oss/tests/legacy/.gitignore b/api/oss/tests/.gitignore similarity index 100% rename from api/oss/tests/legacy/.gitignore rename to api/oss/tests/.gitignore diff --git a/api/ee/tests/pytest/__init__.py b/api/oss/tests/admin/__init__.py similarity index 100% rename from api/ee/tests/pytest/__init__.py rename to api/oss/tests/admin/__init__.py diff --git a/api/oss/tests/legacy/admin/tests.py b/api/oss/tests/admin/tests.py similarity index 100% rename from api/oss/tests/legacy/admin/tests.py rename to api/oss/tests/admin/tests.py diff --git a/api/oss/databases/postgres/migrations/__init__.py b/api/oss/tests/apps/__init__.py similarity index 100% rename from api/oss/databases/postgres/migrations/__init__.py rename to api/oss/tests/apps/__init__.py diff --git a/api/oss/tests/legacy/apps/fixtures.py b/api/oss/tests/apps/fixtures.py similarity index 100% rename from api/oss/tests/legacy/apps/fixtures.py rename to api/oss/tests/apps/fixtures.py diff --git a/api/oss/tests/legacy/apps/tests.py b/api/oss/tests/apps/tests.py similarity index 100% rename from api/oss/tests/legacy/apps/tests.py rename to api/oss/tests/apps/tests.py diff --git a/api/oss/src/apis/fastapi/applications/__init__.py b/api/oss/tests/auth/__init__.py similarity index 100% rename from api/oss/src/apis/fastapi/applications/__init__.py rename to api/oss/tests/auth/__init__.py diff --git a/api/oss/tests/legacy/auth/tests.py b/api/oss/tests/auth/tests.py similarity index 100% rename from api/oss/tests/legacy/auth/tests.py rename to api/oss/tests/auth/tests.py diff --git a/api/oss/tests/conftest.py b/api/oss/tests/conftest.py new file mode 100644 index 0000000000..0fe7063fbc --- /dev/null +++ b/api/oss/tests/conftest.py @@ -0,0 +1,1121 @@ +import os +import uuid +import json +from json import loads +from traceback import format_exc +from typing import Optional, Any + +import boto3 +import httpx +import pytest +import agenta as ag +import pytest_asyncio +from dotenv import load_dotenv +from httpx import AsyncClient, Timeout +from pytest_asyncio import is_async_test + +from oss.src.utils.logging import get_module_logger + + +AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") +API_BASE_URL = f"{AGENTA_HOST}/api/" + + +def pytest_addoption(parser): + """Register the --env-file option.""" + + parser.addoption( + "--env-file", action="store", default=".env", help="Path to the .env file" + ) + + +def pytest_configure(config): + """Load the environment variables from the specified .env file.""" + env_file = config.getoption("--env-file") + print(f"Loading environment variables from: {env_file}") + load_dotenv(dotenv_path=env_file) + + +@pytest.fixture +def sample_testset_endpoint_json(): + return f"{API_BASE_URL}testsets/sample" + + +# Set global variables +AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") +API_BASE_URL = f"{AGENTA_HOST}/api/" +API_KEYS_MAPPING = { + "OPENAI_API_KEY": "openai", + "MISTRAL_API_KEY": "mistralai", + "COHERE_API_KEY": "cohere", + "ANTHROPIC_API_KEY": "anthropic", + "ANYSCALE_API_KEY": "anyscale", + "PERPLEXITYAI_API_KEY": "perplexityai", + "DEEPINFRA_API_KEY": "deepinfra", + "TOGETHERAI_API_KEY": "togetherai", + "ALEPHALPHA_API_KEY": "alephalpha", + "OPENROUTER_API_KEY": "openrouter", + "GROQ_API_KEY": "groq", + "GEMINI_API_KEY": "gemini", +} + + +log = get_module_logger(__name__) + + +def pytest_collection_modifyitems(items): + """ + Mark all tests to run inside the same event loop. + + NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes + """ + + pytest_asyncio_tests = (item for item in items if is_async_test(item)) + session_scope_marker = pytest.mark.asyncio(loop_scope="class") + for async_test in pytest_asyncio_tests: + async_test.add_marker(session_scope_marker, append=False) + + +async def ahttp_client(): + access_key = os.getenv("AGENTA_AUTH_KEY") + async with AsyncClient( + base_url=API_BASE_URL, + timeout=httpx.Timeout(timeout=6, read=None, write=5), + headers={"Authorization": f"Access {access_key}"}, + ) as client: + yield client + + +@pytest_asyncio.fixture(scope="class") +async def http_client(): + """ + Fixture to create an AsyncClient for API testing. + """ + + async with AsyncClient( + base_url=API_BASE_URL, + timeout=Timeout(timeout=6, read=None, write=5), + ) as client: + yield client + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_owner_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_owner_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": {f"{user_email}": {"name": {user_name}, "email": f"{user_email}"}}, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_paying_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": False, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_member_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": False, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_all_users(ahttp_client): + client = ahttp_client + users_data = {} + + roles = [ + "owner", + "editor", + "workspace_admin", + ] + for i in range(0, 3): + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}_{i}" + user_email = f"{user_name}@agenta.ai" + + users_data[user_email] = { + "user_name": user_name, + "user_email": user_email, + "organization": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + }, + "workspace": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": user_email}, + }, + "project": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": user_email}, + "organization_ref": {"slug": user_email}, + }, + "organization_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "organization_ref": {"slug": user_email}, + }, + "workspace_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "workspace_ref": {"slug": user_email}, + }, + "project_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "project_ref": {"slug": user_email}, + }, + } + + json_payload = { + "users": { + email: {"name": data["user_name"], "email": data["user_email"]} + for email, data in users_data.items() + }, + "organizations": { + email: { + "name": data["organization"]["name"], + "description": data["organization"]["description"], + "is_paying": data["organization"]["is_paying"], + } + for email, data in users_data.items() + }, + "workspaces": { + email: { + "name": data["workspace"]["name"], + "description": data["workspace"]["description"], + "is_default": data["workspace"]["is_default"], + "organization_ref": data["workspace"]["organization_ref"], + } + for email, data in users_data.items() + }, + "projects": { + email: { + "name": data["project"]["name"], + "description": data["project"]["description"], + "is_default": data["project"]["is_default"], + "workspace_ref": data["project"]["workspace_ref"], + "organization_ref": data["project"]["organization_ref"], + } + for email, data in users_data.items() + }, + "organization_memberships": { + email: { + "role": data["organization_membership"]["role"], + "is_demo": data["organization_membership"]["is_demo"], + "user_ref": data["organization_membership"]["user_ref"], + "organization_ref": data["organization_membership"]["organization_ref"], + } + for email, data in users_data.items() + }, + "workspace_memberships": { + email: { + "role": data["workspace_membership"]["role"], + "is_demo": data["workspace_membership"]["is_demo"], + "user_ref": data["workspace_membership"]["user_ref"], + "workspace_ref": data["workspace_membership"]["workspace_ref"], + } + for email, data in users_data.items() + }, + "project_memberships": { + email: { + "role": data["project_membership"]["role"], + "is_demo": data["project_membership"]["is_demo"], + "user_ref": data["project_membership"]["user_ref"], + "project_ref": data["project_membership"]["project_ref"], + } + for email, data in users_data.items() + }, + } + + response = await client.post("admin/accounts", json=json_payload) + response.raise_for_status() + return { + email: response.json().get("projects", {}).get(email, {}).get(email, {}) + for email in users_data + } + + +async def get_user_profile(client: AsyncClient): + response = await client.get("profile") + + response.raise_for_status() + return response.json() + + +async def get_project(client: AsyncClient): + response = await client.get("projects") + + response.raise_for_status() + return response.json()[0] + + +def get_mock_response(): + mock_response = os.getenv("AUTH_IN_TESTS", "false").lower() == "false" + return mock_response + + +async def mocked_programmatic_user(): + mock_response = get_mock_response() + if mock_response: + profile_response = await get_user_profile(client=http_client) + project_response = await get_project(client=http_client) + return True, { + "project_id": project_response.get("project_id"), + "credentials": "ApiKey ", + "email": profile_response.get("email"), + "name": profile_response.get("name"), + } + + return False, {} + + +@pytest_asyncio.fixture(scope="class") +async def programmatic_user(): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data + + client = await ahttp_client().__anext__() + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def programmatic_non_member_user(): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data + + client = await ahttp_client().__anext__() + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +async def create_app(client: AsyncClient, payload: dict, headers: dict): + response = await client.post( + "apps", + json=payload, + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data + + +async def create_variant( + client: AsyncClient, app_id: str, payload: dict, headers: dict +): + response = await client.post( + f"apps/{app_id}/variant/from-template", + json=payload, + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data + + +async def update_variant_parameters( + client: AsyncClient, variant_id: str, headers: dict +): + response = await client.put( + f"variants/{variant_id}/parameters", + json={ + "parameters": { + "prompt": { + "input_keys": ["country"], + "llm_config": { + "frequency_penalty": 0, + "model": "gpt-3.5-turbo", + "presence_penalty": 0, + "temperature": 0.2, + "top_p": 0.5, + }, + "messages": [ + { + "content": "You are an expert in geographyfc", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + } + }, + headers=headers, + ) + response.raise_for_status() + + +async def deploy_variant_to_environment( + client: AsyncClient, variant_id: str, environment_name: str, headers: dict +): + response = await client.post( + f"environments/deploy", + json={"environment_name": environment_name, "variant_id": variant_id}, + headers=headers, + ) + response.raise_for_status() + + +async def delete_application(client: AsyncClient, app_id: str, headers: dict): + response = await client.delete(url=f"apps/{app_id}", headers=headers) + response.raise_for_status() + + return response.status_code + + +@pytest_asyncio.fixture(scope="class") +async def create_app_and_variant( + http_client, programmatic_user, programmatic_non_member_user +): + app_payload = { + "app_name": f"app_{uuid.uuid4().hex[:8]}", + "template_key": "SERVICE:completion", + } + variant_payload = { + "variant_name": "app.key", + "key": "SERVICE:completion", + "base_name": "app", + "config_name": "key", + } + + user_scope_credentials = programmatic_user.get("credentials", None) + non_member_scope_credentials = programmatic_non_member_user.get("credentials", None) + headers = {"Authorization": user_scope_credentials} + + app_response = await create_app( + client=http_client, payload=app_payload, headers=headers + ) + variant_response = await create_variant( + client=http_client, + app_id=app_response.get("app_id", None), + payload=variant_payload, + headers=headers, + ) + await update_variant_parameters( + http_client, variant_response.get("variant_id"), headers + ) + await deploy_variant_to_environment( + http_client, + variant_response.get("variant_id"), + "production", + headers, + ) + yield { + "app": app_response, + "variant": variant_response, + "scope_project_id": programmatic_user.get("project", {}).get("id", ""), + "non_member_project_id": programmatic_non_member_user.get("project", {}).get( + "id", "" + ), + "credentials": user_scope_credentials, + "non_member_credentials": non_member_scope_credentials, + } + + await delete_application(http_client, app_response.get("app_id"), headers) + + +@pytest_asyncio.fixture(scope="class") +async def create_chat_app_and_variant(http_client, programmatic_user): + app_payload = { + "app_name": f"app_{uuid.uuid4().hex[:8]}", + "template_key": "SERVICE:completion", + } + variant_payload = { + "variant_name": "app.key", + "key": "SERVICE:completion", + "base_name": "app", + "config_name": "key", + } + + user_scope_credentials = programmatic_user.get("credentials", None) + headers = {"Authorization": user_scope_credentials} + + app_response = await create_app( + client=http_client, payload=app_payload, headers=headers + ) + variant_response = await create_variant( + client=http_client, + app_id=app_response.get("app_id", None), + payload=variant_payload, + headers=headers, + ) + yield { + "app": app_response, + "variant": variant_response, + "credentials": user_scope_credentials, + } + + await delete_application(http_client, app_response.get("app_id"), headers) + + +async def reset_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data.get("credentials", None), mock_data.get("project_id", None) + + response = await client.get("vault/v1/secrets", headers=headers) + response.raise_for_status() + + response_data = response.json() + + for secret in response_data: + delete_response = await client.delete( + f"vault/v1/secrets/{secret.get('id', '')}" + ) + delete_response.raise_for_status() + + +async def set_valid_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return + + for api_key_name in list(API_KEYS_MAPPING.keys()): + response = await client.post( + "vault/v1/secrets", + json={ + "header": {"name": API_KEYS_MAPPING[api_key_name], "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": API_KEYS_MAPPING[api_key_name], + "key": os.environ[api_key_name], + }, + }, + }, + headers=headers, + ) + response.raise_for_status() + + +async def set_invalid_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return + + response = await client.get("vault/v1/secrets", headers=headers) + response.raise_for_status() + + response_data = response.json() + + for secret in response_data: + provider_name = secret.get("secret", {}).get("data", {}).get("provider") + response = await client.put( + f"vault/v1/secrets/{secret.get('id', '')}", + json={ + "header": {"name": provider_name, "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": provider_name, + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + response.raise_for_status() + + +@pytest.fixture +def get_all_supported_models(): + supported_llm_models = { + "Mistral AI": [ + "mistral/mistral-tiny", + "mistral/mistral-small", + "mistral/mistral-medium", + "mistral/mistral-large-latest", + ], + "Open AI": [ + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo", + "gpt-4", + "gpt-4o", + "gpt-4o-mini", + "gpt-4-1106-preview", + ], + "Gemini": ["gemini/gemini-1.5-pro-latest", "gemini/gemini-1.5-flash"], + "Cohere": [ + "cohere/command-light", + "cohere/command-r-plus", + "cohere/command-nightly", + ], + "Anthropic": [ + "anthropic/claude-3-5-sonnet-20240620", + "anthropic/claude-3-opus-20240229", + "anthropic/claude-3-sonnet-20240229", + "anthropic/claude-3-haiku-20240307", + "anthropic/claude-2.1", + "anthropic/claude-2", + "anthropic/claude-instant-1.2", + "anthropic/claude-instant-1", + ], + "Perplexity AI": [ + "perplexity/llama-3.1-sonar-small-128k-online", + "perplexity/llama-3.1-sonar-large-128k-online", + "perplexity/llama-3.1-sonar-huge-128k-online", + ], + "DeepInfra": [ + "deepinfra/meta-llama/Llama-2-70b-chat-hf", + "deepinfra/meta-llama/Llama-2-13b-chat-hf", + "deepinfra/codellama/CodeLlama-34b-Instruct-hf", + "deepinfra/mistralai/Mistral-7B-Instruct-v0.1", + "deepinfra/jondurbin/airoboros-l2-70b-gpt4-1.4.1", + ], + "Together AI": [ + "together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo", + "together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", + ], + "OpenRouter": [ + "openrouter/openai/gpt-3.5-turbo", + "openrouter/openai/gpt-3.5-turbo-16k", + "openrouter/google/palm-2-chat-bison", + "openrouter/google/palm-2-codechat-bison", + "openrouter/meta-llama/llama-2-13b-chat", + ], + "Groq": [ + "groq/llama-3.1-8b-instant", + "groq/llama-3.1-70b-versatile", + "groq/llama3-8b-8192", + "groq/llama3-70b-8192", + "groq/mixtral-8x7b-32768", + ], + } + flattened_models = [ + model for models in supported_llm_models.values() for model in models + ] + return flattened_models + + +async def fetch_trace_by_trace_id(client: AsyncClient, headers: dict, project_id: str): + response = await client.get( + f"observability/v1/traces?project_id={project_id}", headers=headers + ) + response.raise_for_status() + + return response.json() + + +async def fetch_variant_revision(client: AsyncClient, headers: dict, variant_id: str): + response = await client.get( + f"variants/{variant_id}/revisions", + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data[-1] + + +async def fetch_app_environment_revisions( + client: AsyncClient, app_id: str, environment_name: str, headers: dict +): + response = await client.get( + f"apps/{app_id}/revisions/{environment_name}", + headers=headers, + ) + response.raise_for_status() + + return response.json() + + +@pytest.fixture +def valid_run_generate_payload(): + return { + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "max_tokens": 200, + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + } + + +@pytest.fixture +def invalid_run_generate_payload(): + return { + "ag_config": { + "prompt": { + "llm_configs": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "input": {"country": "France"}, + } + + +@pytest.fixture +def valid_parameters_payload(): + return { + "ag_config": { + "prompt": { + "messages": [ + {"role": "system", "content": "You are an expert in geographyfc"}, + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "input_keys": ["country"], + "llm_config": { + "model": "gpt-3.5-turbo", + "top_p": 0.5, + "temperature": 0.2, + "presence_penalty": 0, + "frequency_penalty": 0, + }, + "template_format": "fstring", + } + } + } + + +def exclude_lifecycle(data): + """ + Recursively exclude the 'lifecycle' field with its 'created_at' value. + """ + + if isinstance(data, dict): + # Check if the 'lifecycle' field is present and remove it + if "lifecycle" in data: + del data["lifecycle"] + # Recursively apply to all key-value pairs + return {k: exclude_lifecycle(v) for k, v in data.items()} + elif isinstance(data, list): + # Recursively apply to all list items + return [exclude_lifecycle(item) for item in data] + return data + + +def exact_match(obj1, obj2): + """ + Compares two JSON-like objects for exact match by normalizing their key order. + """ + + obj1_normalized = json.dumps(obj1, sort_keys=True) + obj2_normalized = json.dumps(obj2, sort_keys=True) + + return obj1_normalized == obj2_normalized + + +def initialize_agenta( + api_key: str, +): + ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key = None + ag.init(api_key=api_key) diff --git a/api/oss/tests/legacy/conftest.py b/api/oss/tests/legacy/conftest.py deleted file mode 100644 index 03debc8ce5..0000000000 --- a/api/oss/tests/legacy/conftest.py +++ /dev/null @@ -1,1134 +0,0 @@ -import os -import uuid -import json -from json import loads -from traceback import format_exc -from typing import Optional, Any - -import boto3 -import httpx -import pytest -import agenta as ag -import pytest_asyncio -from dotenv import load_dotenv -from httpx import AsyncClient, Timeout -from pytest_asyncio import is_async_test - -from oss.src.utils.logging import get_module_logger - - -AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") -API_BASE_URL = f"{AGENTA_HOST}/api/" - - -def pytest_addoption(parser): - """Register the --env-file option.""" - - parser.addoption( - "--env-file", action="store", default=".env", help="Path to the .env file" - ) - - -def pytest_configure(config): - """Load the environment variables from the specified .env file.""" - env_file = config.getoption("--env-file") - print(f"Loading environment variables from: {env_file}") - load_dotenv(dotenv_path=env_file) - - -@pytest.fixture -def sample_testset_endpoint_json(): - return f"{API_BASE_URL}testsets/sample" - - -# Set global variables -AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") -API_BASE_URL = f"{AGENTA_HOST}/api/" -API_KEYS_MAPPING = { - "OPENAI_API_KEY": "openai", - "MISTRAL_API_KEY": "mistralai", - "COHERE_API_KEY": "cohere", - "ANTHROPIC_API_KEY": "anthropic", - "ANYSCALE_API_KEY": "anyscale", - "PERPLEXITYAI_API_KEY": "perplexityai", - "DEEPINFRA_API_KEY": "deepinfra", - "TOGETHERAI_API_KEY": "togetherai", - "ALEPHALPHA_API_KEY": "alephalpha", - "OPENROUTER_API_KEY": "openrouter", - "GROQ_API_KEY": "groq", - "GEMINI_API_KEY": "gemini", -} - - -log = get_module_logger(__name__) - - -def pytest_collection_modifyitems(items): - """ - Mark all tests to run inside the same event loop. - - NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes - """ - - pytest_asyncio_tests = (item for item in items if is_async_test(item)) - session_scope_marker = pytest.mark.asyncio(loop_scope="class") - for async_test in pytest_asyncio_tests: - async_test.add_marker(session_scope_marker, append=False) - - -async def ahttp_client(): - access_key = os.getenv("AGENTA_AUTH_KEY") - async with AsyncClient( - base_url=API_BASE_URL, - timeout=httpx.Timeout(timeout=6, read=None, write=5), - headers={"Authorization": f"Access {access_key}"}, - ) as client: - yield client - - -@pytest_asyncio.fixture(scope="class") -async def http_client(): - """ - Fixture to create an AsyncClient for API testing. - """ - - async with AsyncClient( - base_url=API_BASE_URL, - timeout=Timeout(timeout=6, read=None, write=5), - ) as client: - yield client - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_owner_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_owner_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": {f"{user_email}": {"name": {user_name}, "email": f"{user_email}"}}, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_paying_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": False, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_member_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": False, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_all_users(ahttp_client): - client = ahttp_client - users_data = {} - - roles = [ - "owner", - "editor", - "workspace_admin", - ] - for i in range(0, 3): - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}_{i}" - user_email = f"{user_name}@agenta.ai" - - users_data[user_email] = { - "user_name": user_name, - "user_email": user_email, - "organization": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - }, - "workspace": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": user_email}, - }, - "project": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": user_email}, - "organization_ref": {"slug": user_email}, - }, - "organization_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "organization_ref": {"slug": user_email}, - }, - "workspace_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "workspace_ref": {"slug": user_email}, - }, - "project_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "project_ref": {"slug": user_email}, - }, - } - - json_payload = { - "users": { - email: {"name": data["user_name"], "email": data["user_email"]} - for email, data in users_data.items() - }, - "organizations": { - email: { - "name": data["organization"]["name"], - "description": data["organization"]["description"], - "is_paying": data["organization"]["is_paying"], - } - for email, data in users_data.items() - }, - "workspaces": { - email: { - "name": data["workspace"]["name"], - "description": data["workspace"]["description"], - "is_default": data["workspace"]["is_default"], - "organization_ref": data["workspace"]["organization_ref"], - } - for email, data in users_data.items() - }, - "projects": { - email: { - "name": data["project"]["name"], - "description": data["project"]["description"], - "is_default": data["project"]["is_default"], - "workspace_ref": data["project"]["workspace_ref"], - "organization_ref": data["project"]["organization_ref"], - } - for email, data in users_data.items() - }, - "organization_memberships": { - email: { - "role": data["organization_membership"]["role"], - "is_demo": data["organization_membership"]["is_demo"], - "user_ref": data["organization_membership"]["user_ref"], - "organization_ref": data["organization_membership"]["organization_ref"], - } - for email, data in users_data.items() - }, - "workspace_memberships": { - email: { - "role": data["workspace_membership"]["role"], - "is_demo": data["workspace_membership"]["is_demo"], - "user_ref": data["workspace_membership"]["user_ref"], - "workspace_ref": data["workspace_membership"]["workspace_ref"], - } - for email, data in users_data.items() - }, - "project_memberships": { - email: { - "role": data["project_membership"]["role"], - "is_demo": data["project_membership"]["is_demo"], - "user_ref": data["project_membership"]["user_ref"], - "project_ref": data["project_membership"]["project_ref"], - } - for email, data in users_data.items() - }, - } - - response = await client.post("admin/accounts", json=json_payload) - response.raise_for_status() - return { - email: response.json().get("projects", {}).get(email, {}).get(email, {}) - for email in users_data - } - - -async def get_user_profile(client: AsyncClient): - response = await client.get("profile") - - response.raise_for_status() - return response.json() - - -async def get_project(client: AsyncClient): - response = await client.get("projects") - - response.raise_for_status() - return response.json()[0] - - -def get_mock_response(): - mock_response = os.getenv("AUTH_IN_TESTS", "false").lower() == "false" - return mock_response - - -async def mocked_programmatic_user(): - mock_response = get_mock_response() - if mock_response: - profile_response = await get_user_profile(client=http_client) - project_response = await get_project(client=http_client) - return True, { - "project_id": project_response.get("project_id"), - "credentials": "ApiKey ", - "email": profile_response.get("email"), - "name": profile_response.get("name"), - } - - return False, {} - - -@pytest_asyncio.fixture(scope="class") -async def programmatic_user(): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data - - client = await ahttp_client().__anext__() - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def programmatic_non_member_user(): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data - - client = await ahttp_client().__anext__() - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -async def create_app(client: AsyncClient, payload: dict, headers: dict): - response = await client.post( - "apps", - json=payload, - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data - - -async def create_variant( - client: AsyncClient, app_id: str, payload: dict, headers: dict -): - response = await client.post( - f"apps/{app_id}/variant/from-template", - json=payload, - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data - - -async def update_variant_parameters( - client: AsyncClient, variant_id: str, headers: dict -): - response = await client.put( - f"variants/{variant_id}/parameters", - json={ - "parameters": { - "prompt": { - "input_keys": ["country"], - "llm_config": { - "frequency_penalty": 0, - "model": "gpt-3.5-turbo", - "presence_penalty": 0, - "temperature": 0.2, - "top_p": 0.5, - }, - "messages": [ - { - "content": "You are an expert in geographyfc", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - } - }, - headers=headers, - ) - response.raise_for_status() - - -async def deploy_variant_to_environment( - client: AsyncClient, variant_id: str, environment_name: str, headers: dict -): - response = await client.post( - f"environments/deploy", - json={"environment_name": environment_name, "variant_id": variant_id}, - headers=headers, - ) - response.raise_for_status() - - -async def delete_application(client: AsyncClient, app_id: str, headers: dict): - response = await client.delete(url=f"apps/{app_id}", headers=headers) - response.raise_for_status() - - return response.status_code - - -@pytest_asyncio.fixture(scope="class") -async def create_app_and_variant( - http_client, programmatic_user, programmatic_non_member_user -): - app_payload = { - "app_name": f"app_{uuid.uuid4().hex[:8]}", - "template_key": "SERVICE:completion", - } - variant_payload = { - "variant_name": "app.key", - "key": "SERVICE:completion", - "base_name": "app", - "config_name": "key", - } - - user_scope_credentials = programmatic_user.get("credentials", None) - non_member_scope_credentials = programmatic_non_member_user.get("credentials", None) - headers = {"Authorization": user_scope_credentials} - - app_response = await create_app( - client=http_client, payload=app_payload, headers=headers - ) - variant_response = await create_variant( - client=http_client, - app_id=app_response.get("app_id", None), - payload=variant_payload, - headers=headers, - ) - await update_variant_parameters( - http_client, variant_response.get("variant_id"), headers - ) - await deploy_variant_to_environment( - http_client, - variant_response.get("variant_id"), - "production", - headers, - ) - yield { - "app": app_response, - "variant": variant_response, - "scope_project_id": programmatic_user.get("project", {}).get("id", ""), - "non_member_project_id": programmatic_non_member_user.get("project", {}).get( - "id", "" - ), - "credentials": user_scope_credentials, - "non_member_credentials": non_member_scope_credentials, - } - - await delete_application(http_client, app_response.get("app_id"), headers) - - -@pytest_asyncio.fixture(scope="class") -async def create_chat_app_and_variant(http_client, programmatic_user): - app_payload = { - "app_name": f"app_{uuid.uuid4().hex[:8]}", - "template_key": "SERVICE:completion", - } - variant_payload = { - "variant_name": "app.key", - "key": "SERVICE:completion", - "base_name": "app", - "config_name": "key", - } - - user_scope_credentials = programmatic_user.get("credentials", None) - headers = {"Authorization": user_scope_credentials} - - app_response = await create_app( - client=http_client, payload=app_payload, headers=headers - ) - variant_response = await create_variant( - client=http_client, - app_id=app_response.get("app_id", None), - payload=variant_payload, - headers=headers, - ) - yield { - "app": app_response, - "variant": variant_response, - "credentials": user_scope_credentials, - } - - await delete_application(http_client, app_response.get("app_id"), headers) - - -async def reset_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data.get("credentials", None), mock_data.get("project_id", None) - - response = await client.get("vault/v1/secrets", headers=headers) - response.raise_for_status() - - response_data = response.json() - - for secret in response_data: - delete_response = await client.delete( - f"vault/v1/secrets/{secret.get('id', '')}" - ) - delete_response.raise_for_status() - - -async def set_valid_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return - - for api_key_name in list(API_KEYS_MAPPING.keys()): - response = await client.post( - "vault/v1/secrets", - json={ - "header": {"name": API_KEYS_MAPPING[api_key_name], "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": API_KEYS_MAPPING[api_key_name], - "key": os.environ[api_key_name], - }, - }, - }, - headers=headers, - ) - response.raise_for_status() - - -async def set_invalid_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return - - response = await client.get("vault/v1/secrets", headers=headers) - response.raise_for_status() - - response_data = response.json() - - for secret in response_data: - provider_name = secret.get("secret", {}).get("data", {}).get("provider") - response = await client.put( - f"vault/v1/secrets/{secret.get('id', '')}", - json={ - "header": {"name": provider_name, "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": provider_name, - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - response.raise_for_status() - - -@pytest.fixture -def get_all_supported_models(): - supported_llm_models = { - "Mistral AI": [ - "mistral/mistral-tiny", - "mistral/mistral-small", - "mistral/mistral-medium", - "mistral/mistral-large-latest", - ], - "Open AI": [ - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo", - "gpt-4", - "gpt-4o", - "gpt-4o-mini", - "gpt-4-1106-preview", - ], - "Gemini": [ - "gemini/gemini-2.5-flash-preview-05-20", - "gemini/gemini-2.5-flash-preview-04-17", - "gemini/gemini-2.0-flash-001", - "gemini/gemini-2.5-pro-preview-05-06", - "gemini/gemini-2.0-flash-lite-preview-02-05", - "gemini/gemini-2.5-pro", - "gemini/gemini-2.5-flash", - "gemini/gemini-2.5-flash-preview-09-2025", - "gemini/gemini-2.5-flash-lite", - "gemini/gemini-2.5-flash-lite-preview-09-2025", - "gemini/gemini-2.0-flash", - "gemini/gemini-2.0-flash-lite", - ], - "Cohere": [ - "cohere/command-light", - "cohere/command-r-plus", - "cohere/command-nightly", - ], - "Anthropic": [ - "anthropic/claude-3-5-sonnet-20240620", - "anthropic/claude-3-opus-20240229", - "anthropic/claude-3-sonnet-20240229", - "anthropic/claude-3-haiku-20240307", - "anthropic/claude-2.1", - "anthropic/claude-2", - "anthropic/claude-instant-1.2", - "anthropic/claude-instant-1", - ], - "Perplexity AI": [ - "perplexity/llama-3.1-sonar-small-128k-online", - "perplexity/llama-3.1-sonar-large-128k-online", - "perplexity/llama-3.1-sonar-huge-128k-online", - ], - "DeepInfra": [ - "deepinfra/meta-llama/Llama-2-70b-chat-hf", - "deepinfra/meta-llama/Llama-2-13b-chat-hf", - "deepinfra/codellama/CodeLlama-34b-Instruct-hf", - "deepinfra/mistralai/Mistral-7B-Instruct-v0.1", - "deepinfra/jondurbin/airoboros-l2-70b-gpt4-1.4.1", - ], - "Together AI": [ - "together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo", - "together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", - ], - "OpenRouter": [ - "openrouter/openai/gpt-3.5-turbo", - "openrouter/openai/gpt-3.5-turbo-16k", - "openrouter/google/palm-2-chat-bison", - "openrouter/google/palm-2-codechat-bison", - "openrouter/meta-llama/llama-2-13b-chat", - ], - "Groq": [ - "groq/llama-3.1-8b-instant", - "groq/llama-3.1-70b-versatile", - "groq/llama3-8b-8192", - "groq/llama3-70b-8192", - "groq/mixtral-8x7b-32768", - ], - } - flattened_models = [ - model for models in supported_llm_models.values() for model in models - ] - return flattened_models - - -async def fetch_trace_by_trace_id(client: AsyncClient, headers: dict, project_id: str): - response = await client.get( - f"observability/v1/traces?project_id={project_id}", headers=headers - ) - response.raise_for_status() - - return response.json() - - -async def fetch_variant_revision(client: AsyncClient, headers: dict, variant_id: str): - response = await client.get( - f"variants/{variant_id}/revisions", - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data[-1] - - -async def fetch_app_environment_revisions( - client: AsyncClient, app_id: str, environment_name: str, headers: dict -): - response = await client.get( - f"apps/{app_id}/revisions/{environment_name}", - headers=headers, - ) - response.raise_for_status() - - return response.json() - - -@pytest.fixture -def valid_run_generate_payload(): - return { - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "max_tokens": 200, - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - } - - -@pytest.fixture -def invalid_run_generate_payload(): - return { - "ag_config": { - "prompt": { - "llm_configs": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "input": {"country": "France"}, - } - - -@pytest.fixture -def valid_parameters_payload(): - return { - "ag_config": { - "prompt": { - "messages": [ - {"role": "system", "content": "You are an expert in geographyfc"}, - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "input_keys": ["country"], - "llm_config": { - "model": "gpt-3.5-turbo", - "top_p": 0.5, - "temperature": 0.2, - "presence_penalty": 0, - "frequency_penalty": 0, - }, - "template_format": "fstring", - } - } - } - - -def exclude_lifecycle(data): - """ - Recursively exclude the 'lifecycle' field with its 'created_at' value. - """ - - if isinstance(data, dict): - # Check if the 'lifecycle' field is present and remove it - if "lifecycle" in data: - del data["lifecycle"] - # Recursively apply to all key-value pairs - return {k: exclude_lifecycle(v) for k, v in data.items()} - elif isinstance(data, list): - # Recursively apply to all list items - return [exclude_lifecycle(item) for item in data] - return data - - -def exact_match(obj1, obj2): - """ - Compares two JSON-like objects for exact match by normalizing their key order. - """ - - obj1_normalized = json.dumps(obj1, sort_keys=True) - obj2_normalized = json.dumps(obj2, sort_keys=True) - - return obj1_normalized == obj2_normalized - - -def initialize_agenta( - api_key: str, -): - ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key = None - ag.init(api_key=api_key) diff --git a/api/oss/tests/legacy/old_tests/conftest.py b/api/oss/tests/legacy/old_tests/conftest.py deleted file mode 100644 index 18f0e1cbf5..0000000000 --- a/api/oss/tests/legacy/old_tests/conftest.py +++ /dev/null @@ -1,27 +0,0 @@ -import pytest -import asyncio - -from oss.src.utils.common import is_oss - -if is_oss(): - from oss.src.tests.engine import test_db_engine as db_engine - - -@pytest.fixture(scope="session", autouse=True) -def event_loop(): - """ - Create an instance of the default event loop for each testcase. - """ - - policy = asyncio.get_event_loop_policy() - res = policy.new_event_loop() - asyncio.set_event_loop(res) - res._close = res.close # type: ignore - - yield res - - if is_oss(): - res.run_until_complete(db_engine.remove_db()) # drop database - res.run_until_complete(db_engine.close_db()) # close connections to database - - res._close() # close event loop # type: ignore diff --git a/api/oss/tests/legacy/old_tests/models.py b/api/oss/tests/legacy/old_tests/models.py deleted file mode 100644 index 5c1d0ad49b..0000000000 --- a/api/oss/tests/legacy/old_tests/models.py +++ /dev/null @@ -1,65 +0,0 @@ -from typing import List - -from oss.src.utils.common import is_ee - -from oss.src.dbs.postgres.shared.base import Base - -if is_ee(): - from ee.src.models.db_models import ( - APIKeyDB, - ProjectDB, - WorkspaceDB, - OrganizationDB, - InvitationDB, - OrganizationMemberDB, - WorkspaceMemberDB, - ProjectMemberDB, - AppDB_ as AppDB, - EvaluationDB_ as EvaluationDB, - DeploymentDB_ as DeploymentDB, - HumanEvaluationDB_ as HumanEvaluationDB, - EvaluationScenarioDB_ as EvaluationScenarioDB, - HumanEvaluationScenarioDB_ as HumanEvaluationScenarioDB, - ) -else: - from oss.src.models.db_models import ( - AppDB, - ProjectDB, - EvaluationDB, - DeploymentDB, - HumanEvaluationDB, - EvaluationScenarioDB, - HumanEvaluationScenarioDB, - ) - -from oss.src.models.db_models import ( - UserDB, - TestsetDB, - AppVariantDB, - VariantBaseDB, - AppEnvironmentDB, - EvaluatorConfigDB, - AppVariantRevisionsDB, - AppEnvironmentRevisionDB, -) - -models: List[Base] = [ - AppDB, - UserDB, - ProjectDB, - TestsetDB, - AppVariantDB, - DeploymentDB, - EvaluationDB, - VariantBaseDB, - AppEnvironmentDB, - AppEnvironmentRevisionDB, - EvaluatorConfigDB, - HumanEvaluationDB, - EvaluationScenarioDB, - AppVariantRevisionsDB, - HumanEvaluationScenarioDB, -] - -if is_ee(): - models.extend([OrganizationDB, WorkspaceDB, APIKeyDB, InvitationDB, OrganizationMemberDB, ProjectMemberDB, WorkspaceMemberDB]) # type: ignore diff --git a/api/oss/tests/legacy/old_tests/variants_main_router/conftest.py b/api/oss/tests/legacy/old_tests/variants_main_router/conftest.py deleted file mode 100644 index be33f4fb2e..0000000000 --- a/api/oss/tests/legacy/old_tests/variants_main_router/conftest.py +++ /dev/null @@ -1,383 +0,0 @@ -import os -import pytest -from datetime import datetime, timezone - -import httpx -from sqlalchemy.future import select - -from oss.src.utils.env import env -from oss.src.utils.logging import get_module_logger -from oss.src.models.shared_models import ConfigDB -from oss.src.models.db_models import ( - ProjectDB, - UserDB, -) -from oss.src.tests.unit.test_traces import ( - simple_rag_trace, - simple_finance_assisstant_trace, -) -from oss.src.resources.evaluators.evaluators import get_all_evaluators - -from oss.src.dbs.postgres.shared.engine import engine - -log = get_module_logger(__name__) - -# Set global variables -OPEN_AI_KEY = env.OPENAI_API_KEY -BACKEND_API_HOST = env.AGENTA_HOST + "/api" - - -@pytest.fixture() -async def get_first_user_object(): - """Get the user object from the database or create a new one if not found.""" - - async with engine.core_session() as session: - result = await session.execute(select(UserDB).filter_by(uid="0")) - user = result.scalars().first() - if user is None: - create_user = UserDB(uid="0") - session.add(create_user) - await session.commit() - await session.refresh(create_user) - return create_user - return user - - -@pytest.fixture() -async def get_second_user_object(): - """Create a second user object.""" - - async with engine.core_session() as session: - result = await session.execute(select(UserDB).filter_by(uid="1")) - user = result.scalars().first() - if user is None: - create_user = UserDB( - uid="1", username="test_user1", email="test_user1@email.com" - ) - session.add(create_user) - await session.commit() - await session.refresh(create_user) - return create_user - return user - - -@pytest.fixture() -async def get_or_create_project_from_db(): - async with engine.core_session() as session: - result = await session.execute( - select(ProjectDB).filter_by(project_name="Default Project", is_default=True) - ) - project = result.scalars().first() - if project is None: - create_project = ProjectDB(project_name="Default Project", is_default=True) - session.add(create_project) - await session.commit() - await session.refresh(create_project) - return create_project - return project - - -@pytest.fixture(scope="session") -async def fetch_user(): - async with engine.core_session() as session: - result = await session.execute(select(UserDB).filter_by(uid="0")) - user = result.scalars().first() - return user - - -@pytest.fixture() -def app_variant_create_data(): - return { - "variant_name": "v1", - "parameters": {}, - "created_at": datetime.now(timezone.utc), - "updated_at": datetime.now(timezone.utc), - } - - -@pytest.fixture(scope="session") -def use_open_ai_key(): - return OPEN_AI_KEY - - -@pytest.fixture() -def update_app_variant_parameters(): - return { - "temperature": 1, - "model": "gpt-3.5-turbo", - "max_tokens": -1, - "prompt_system": "You are an expert in geography.", - "prompt_user": "What is the capital of {country}?", - "top_p": 1, - "frequence_penalty": 0, - "presence_penalty": 0, - } - - -@pytest.fixture() -def app_variant_parameters_updated(): - return { - "parameters": { - "temperature": 1.43, - "model": "gpt-3.5-turbo", - "max_tokens": 1182, - "prompt_system": "You are an expert in geography. Answer in Japanese.", - "prompt_user": "What is the capital of {country}?", - "top_p": 1, - "frequence_penalty": 1.4, - "presence_penalty": 1.25, - "force_json": 0, - } - } - - -@pytest.fixture() -def evaluators_requiring_llm_keys(): - evaluators_requiring_llm_keys = [ - evaluator["key"] - for evaluator in get_all_evaluators() - if evaluator.get("requires_llm_api_keys", False) - or ( - evaluator.get("settings_template", {}) - .get("requires_llm_api_keys", {}) - .get("default", False) - ) - ] - return evaluators_requiring_llm_keys - - -@pytest.fixture() -def auto_exact_match_evaluator_config(): - return { - "app_id": "string", - "name": "ExactMatchEvaluator", - "evaluator_key": "auto_exact_match", - "settings_values": {}, - } - - -@pytest.fixture() -def auto_similarity_match_evaluator_config(): - return { - "app_id": "string", - "name": "SimilarityMatchEvaluator", - "evaluator_key": "auto_similarity_match", - "settings_values": {"similarity_threshold": 0.3}, - } - - -@pytest.fixture() -def auto_regex_test_evaluator_config(): - return { - "app_id": "string", - "name": "RegexEvaluator", - "evaluator_key": "auto_regex_test", - "settings_values": { - "regex_pattern": "^value\\d{3}$", - "regex_should_match": False, - }, - } - - -@pytest.fixture() -def auto_webhook_test_evaluator_config(): - return { - "app_id": "string", - "name": "WebhookEvaluator", - "evaluator_key": "auto_webhook_test", - "settings_values": { - "webhook_url": f"{BACKEND_API_HOST}/evaluations/webhook_example_fake/", - "webhook_body": {}, - }, - } - - -@pytest.fixture() -def auto_ai_critique_evaluator_config(): - return { - "app_id": "string", - "name": "AICritique_Evaluator", - "evaluator_key": "auto_ai_critique", - "settings_values": { - "open_ai_key": OPEN_AI_KEY, - "temperature": 0.9, - "prompt_template": "We have an LLM App that we want to evaluate its outputs. Based on the prompt and the parameters provided below evaluate the output based on the evaluation strategy below: Evaluation strategy: 0 to 10 0 is very bad and 10 is very good. Prompt: {llm_app_prompt_template} Inputs: country: {country} Correct Answer:{correct_answer} Evaluate this: {variant_output} Answer ONLY with one of the given grading or evaluation options.", - }, - } - - -@pytest.fixture() -def deploy_to_environment_payload(): - return {"environment_name": "string", "variant_id": "string"} - - -@pytest.fixture() -def rag_experiment_data_tree(): - return simple_rag_trace - - -@pytest.fixture() -def simple_experiment_data_tree(): - return simple_finance_assisstant_trace - - -@pytest.fixture() -def mapper_to_run_auto_exact_match_evaluation(): - return { - "prediction": "diversify.reporter.outputs.report[0]", - } - - -@pytest.fixture() -def mapper_to_run_rag_faithfulness_evaluation(): - return { - "question": "rag.retriever.internals.prompt", - "contexts": "rag.retriever.outputs.movies", - "answer": "rag.reporter.outputs.report", - } - - -@pytest.fixture() -def rag_faithfulness_evaluator_run_inputs(): - return { - "question_key": "List 6 movies about witches in the genre of fiction.", - "contexts_key": [ - "The Craft (1996) in ['Drama', 'Fantasy', 'Horror']: A newcomer to a Catholic prep high school falls in with a trio of outcast teenage girls who practice witchcraft and they all soon conjure up various spells and curses against those who even slightly anger them.", - "Oz the Great and Powerful (2013) in ['Adventure', 'Family', 'Fantasy']: A small-time magician is swept away to an enchanted land and is forced into a power struggle between three witches.", - "Snow White: A Tale of Terror (1997) in ['Fantasy', 'Horror']: In this dark take on the fairy tale, the growing hatred of a noblewoman, secretly a practitioner of the dark arts, for her stepdaughter, and the witch's horrifying attempts to kill her.", - "Into the Woods (2014) in ['Adventure', 'Fantasy', 'Musical']: A witch tasks a childless baker and his wife with procuring magical items from classic fairy tales to reverse the curse put on their family tree.", - "Wicked Stepmother (1989) in ['Comedy', 'Fantasy']: A mother/daughter pair of witches descend on a yuppie family's home and cause havoc, one at a time since they share one body & the other must live in a cat the rest of the time. Now it's up...", - "Hocus Pocus (1993) in ['Comedy', 'Family', 'Fantasy']: After three centuries, three witch sisters are resurrected in Salem Massachusetts on Halloween night, and it is up to two teen-agers, a young girl, and an immortal cat to put an end to the witches' reign of terror once and for all.", - "Warlock (1989) in ['Action', 'Fantasy', 'Horror']: A warlock flees from the 17th to the 20th century, with a witch-hunter in hot pursuit.", - "The Hexer (2001) in ['Adventure', 'Fantasy']: The adventures of Geralt of Rivea, \"The Witcher\".", - "Heavy Metal (1981) in ['Animation', 'Adventure', 'Fantasy']: A glowing orb terrorizes a young girl with a collection of stories of dark fantasy, eroticism and horror.", - ], - "answer_key": 'Witches in fiction are depicted through a mix of horror, fantasy, and dark comedy. \n\n"The Craft" (1996) delves into the complexities of teenage witchcraft, showcasing both empowerment and the darker repercussions of their actions. \n"Snow White: A Tale of Terror" (1997) offers a sinister twist on the classic story, highlighting the witch\'s envy and vengeful nature. \n"Hocus Pocus" (1993) delivers a comedic and adventurous take on witchcraft, as three resurrected witches wreak havoc in contemporary Salem', - } - - -@pytest.fixture() -def custom_code_snippet(): - return "from typing import Dict\nfrom random import uniform\n\ndef evaluate(\n app_params: Dict[str, str],\n inputs: Dict[str, str],\n output: str, # output of the llm app\n datapoint: Dict[str, str] # contains the testset row\n) -> float:\n return uniform(0.1, 0.9)" - - -@pytest.fixture() -def evaluators_payload_data(custom_code_snippet): - prompt_template = "We have an LLM App that we want to evaluate its outputs. Based on the prompt and the parameters provided below evaluate the output based on the evaluation strategy below:\nEvaluation strategy: 0 to 10 0 is very bad and 10 is very good.\nPrompt: {llm_app_prompt_template}\nInputs: country: {country}\nExpected Answer Column:{correct_answer}\nEvaluate this: {variant_output}\n\nAnswer ONLY with one of the given grading or evaluation options." - return { - "auto_regex_test": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": { - "regex_pattern": r"The\s+answer\s+is\s+42[.,]?", - "regex_should_match": True, - }, - }, - "field_match_test": { - "inputs": { - "ground_truth": {"message": "The correct answer is 42"}, - "prediction": '{"message": "The correct answer is 42"}', - }, - "settings": {"json_field": "ground_truth"}, - }, - "auto_custom_code_run": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - "app_config": {}, - }, - "settings": { - "code": custom_code_snippet, - "correct_answer_key": "correct_answer", - }, - }, - "auto_ai_critique": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": { - "prompt_template": prompt_template, - "correct_answer_key": "correct_answer", - }, - "credentials": {"OPENAI_API_KEY": env.OPENAI_API_KEY}, - }, - "auto_starts_with": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"prefix": "The", "case_sensitive": False}, - }, - "auto_ends_with": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"suffix": "42", "case_sensitive": False}, - }, - "auto_contains": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"substring": "answer is", "case_sensitive": False}, - }, - "auto_contains_any": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"substrings": "The,answer,42", "case_sensitive": False}, - }, - "auto_contains_all": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"substrings": "The,answer,is,42", "case_sensitive": False}, - }, - "auto_contains_json": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": '{"message": "The answer is 42"}', - }, - }, - "auto_json_diff": { - "inputs": { - "ground_truth": '{"message": "The correct answer is 42"}', - "prediction": '{"message": "The answer is 42"}', - }, - "settings": { - "compare_schema_only": True, - "predict_keys": True, - "case_insensitive_keys": False, - }, - }, - "auto_levenshtein_distance": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": {"threshold": 0.4}, - }, - "auto_similarity_match": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "settings": { - "similarity_threshold": 0.4, - "correct_answer_key": "correct_answer", - }, - }, - "auto_semantic_similarity": { - "inputs": { - "ground_truth": "The correct answer is 42", - "prediction": "The answer is 42", - }, - "credentials": {"OPENAI_API_KEY": env.OPENAI_API_KEY}, - }, - } diff --git a/api/oss/tests/legacy/requirements.test.txt b/api/oss/tests/legacy/requirements.test.txt deleted file mode 100644 index 8dee73e0a9..0000000000 --- a/api/oss/tests/legacy/requirements.test.txt +++ /dev/null @@ -1,9 +0,0 @@ -pytest-asyncio==0.24.0 -pytest-xdist==3.6.1 -uvicorn==0.34.0 -requests>=2.32.4 -pexpect==4.9.0 -boto3==1.35.87 -httpx>=0.24,<0.28 -python-dotenv==1.0.0 -fastapi>=0.100.0 \ No newline at end of file diff --git a/api/oss/tests/legacy/sdk/apps/tests.py b/api/oss/tests/legacy/sdk/apps/tests.py deleted file mode 100644 index 3d379d5d5f..0000000000 --- a/api/oss/tests/legacy/sdk/apps/tests.py +++ /dev/null @@ -1,429 +0,0 @@ -import uuid - -import pytest -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestAppsManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_create_app_successfully(self, http_client, setup_class_fixture): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ASSERT - assert response.app_name == app_name - assert isinstance( - response.model_dump(), dict - ), "Response data is not a dictionary." - - # CLEANUP - await delete_application( - http_client, response.app_id, {"Authorization": scope_credentials} - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_app_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.AppManager.acreate( - project_id=scope_project_id, - ) - - # ASSERT - assert ( - response - == "TypeError: AppManager.create() missing 1 required keyword-only argument: 'app_name'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_create_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_name = str(uuid.uuid4()) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_member_credentials", "" - # ) - # ag.init(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.acreate( - # app_name=app_name, - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.functional - async def test_create_app_unsuccessfully_due_to_invalid_credentials( - self, setup_class_fixture - ): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - ag.init(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_list_apps_successfully(self, http_client, setup_class_fixture): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials" - ) - ag.init(api_key=scope_credentials.strip("ApiKey ")) - await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ACT - list_apps_response = await ag.AppManager.alist() - - # ASSERT - assert len(list_apps_response) >= 1 - assert isinstance(list_apps_response, list) - - # CLEANUP - for app_response in list_apps_response: - await delete_application( - http_client, app_response.app_id, {"Authorization": scope_credentials} - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_list_apps_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # non_member_headers = {"Authorization": non_member_credentials} - - # # ACT - # response = await http_client.get( - # f"apps/?project_id={scope_project_id}", - # headers=non_member_headers, - # ) - # response_data = response.json() - - # # ASSERT - # assert response.status_code == 403 - # assert ( - # response_data["detail"] - # == "You do not have access to perform this action. Please contact your organization admin." - # ) - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_list_apps_unsuccessfully_due_to_invalid_credentials(self): - # ARRANGE - ag.init(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.alist() - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_update_app_successfully(self, setup_class_fixture): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - app_id = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_id", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.aupdate( - app_id=app_id, - app_name=app_name, - ) - - # ASSERT - assert response.app_name == app_name - assert isinstance(response.model_dump(), dict) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_update_app_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.AppManager.aupdate( - application_id=app_id, - ) - - # ASSERT - assert ( - response - == "TypeError: AppManager.aupdate() got an unexpected keyword argument 'application_id'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_update_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.aupdate( - # app_id=app_id, - # app_name=app_name, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_update_app_unsuccessfully_due_to_invalid_credentials( - self, setup_class_fixture - ): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - initialize_agenta(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.aupdate( - app_id=app_id, - app_name=app_name, - ) - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.functional - @pytest.mark.typical - async def test_update_app_unsuccessfully_due_to_invalid_app_id( - self, setup_class_fixture - ): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - invalid_app_id = str(uuid.uuid4()) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.aupdate( - app_id=invalid_app_id, - app_name=app_name, - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == { - "detail": f"No application with ID '{invalid_app_id}' found" - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_delete_app_successfully(self, setup_class_fixture): - # ARRANGE - app_id = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_id", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.adelete( - app_id=app_id, - ) - - # ASSERT - assert response is None - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_delete_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.adelete( - # app_id=app_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.functional - async def test_delete_app_unsuccessfully_due_to_invalid_app_id( - self, setup_class_fixture - ): - # ARRANGE - invalid_app_id = str(uuid.uuid4()) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.adelete( - app_id=invalid_app_id, - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == { - "detail": f"No application with ID '{invalid_app_id}' found" - } diff --git a/api/oss/tests/legacy/sdk/deployments/tests.py b/api/oss/tests/legacy/sdk/deployments/tests.py deleted file mode 100644 index ea2127414c..0000000000 --- a/api/oss/tests/legacy/sdk/deployments/tests.py +++ /dev/null @@ -1,154 +0,0 @@ -import pytest - -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestDeploymentManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_deploy_success_with_variant_ref_slug(self, setup_class_fixture): - # ARRANGE - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.DeploymentManager.adeploy( - variant_slug=variant_slug, - environment_slug="production", - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_deploy_not_successful_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.DeploymentManager.adeploy( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: DeploymentManager.adeploy() missing 1 required keyword-only argument: 'environment_slug'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_deploy_not_successful_due_to_no_config(self, setup_class_fixture): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.DeploymentManager.adeploy( - variant_slug="default.appvariant", - variant_version=3, - environment_slug="production", - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_deploy_not_successful_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = fetch_variant_revision(http_client, headers, variant_id) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # ag.init(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.DeploymentManager.adeploy( - # variant_slug=variant_revision.get("config_name"), - # variant_version=variant_revision.get("revision", None), - # environment_slug="production", - # # scope arguments - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } diff --git a/api/oss/tests/legacy/sdk/secrets/tests.py b/api/oss/tests/legacy/sdk/secrets/tests.py deleted file mode 100644 index 7dbe63f55d..0000000000 --- a/api/oss/tests/legacy/sdk/secrets/tests.py +++ /dev/null @@ -1,103 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestSecretsCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_completion_generate_with_valid_secrets_and_invalid_scope( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_valid_llm_keys(http_client, headers) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - non_member_credentials = setup_class_fixture["app_variant_response"].get( - "non_scope_credentials", None - ) - non_member_headers = {"Authorization": non_member_credentials} - - # ACT - response = await http_client.post( - f"{service_url}/test?project_id={scope_project_id}", - json=payload, - headers=non_member_headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 403 - assert response_data["detail"] == "Service execution not allowed." - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_completion_generate_with_valid_secrets( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_valid_llm_keys(http_client, headers) - - # ACT - response = await http_client.post( - f"{service_url}/test", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_completion_generate_with_invalid_secrets( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_invalid_llm_keys(http_client, headers) - - # ACT - response = await http_client.post( - f"{service_url}/test?middleware_cache_enabled=false", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 401 - assert ( - "litellm.AuthenticationError: AuthenticationError: OpenAIException" - in response_data["detail"].get("message", "") - ) diff --git a/api/oss/tests/legacy/sdk/variants/tests.py b/api/oss/tests/legacy/sdk/variants/tests.py deleted file mode 100644 index e074ba9d51..0000000000 --- a/api/oss/tests/legacy/sdk/variants/tests.py +++ /dev/null @@ -1,502 +0,0 @@ -import uuid - -import pytest -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestVariantManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_create_variant_successfully( - self, setup_class_fixture, valid_parameters_payload - ): - # ARRANGE - payload = valid_parameters_payload - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - new_variant_slug = f"{variant_slug}_{uuid.uuid4().hex[:4]}" - - # ACT - response = await ag.VariantManager.acreate( - parameters=payload, - variant_slug=new_variant_slug, - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert new_variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_variant_unsuccessfully_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.acreate( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: VariantManager.acreate() missing 1 required keyword-only argument: 'parameters'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_variant_unsuccessfully_due_to_no_config( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.VariantManager.acreate( - parameters={}, - variant_slug="default.appvariant", - app_id=str(uuid.uuid4().hex), - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_create_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture, valid_parameters_payload - # ): - # # ARRANGE - # payload = valid_parameters_payload - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # application_name = ( - # setup_class_fixture["app_variant_response"] - # .get("app", {}) - # .get("app_name", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.acreate( - # parameters=payload, - # variant_slug=variant_revision.get("config_name"), - # app_slug=application_name, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_commit_variant_successfully( - self, setup_class_fixture, valid_parameters_payload - ): - # ARRANGE - payload = valid_parameters_payload - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.acommit( - parameters=payload, - variant_slug=variant_slug, - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_commit_variant_unsuccessfully_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.acommit( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: VariantManager.acommit() missing 1 required keyword-only argument: 'parameters'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_commit_variant_unsuccessfully_due_to_no_config( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.VariantManager.acommit( - parameters={}, - variant_slug="default.appvariant", - app_id=str(uuid.uuid4().hex), - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_commit_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.acommit( - # variant_slug=variant_revision.get("config_name"), - # variant_version=variant_revision.get("revision", None), - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_list_variants_successfully(self, setup_class_fixture): - # ARRANGE - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.alist( - app_slug=application_name, - ) - - # ASSERT - assert response is not None - assert isinstance(response, list) - assert len(response) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_list_variants_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.alist(application_slug="name") - - # ASSERT - assert ( - response - == "TypeError: VariantManager.alist() got an unexpected keyword argument 'application_slug'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_list_variants_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.alist( - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_delete_variant_successfully(self, setup_class_fixture): - # ARRANGE - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.adelete( - variant_slug=variant_slug, - ) - - # ASSERT - assert response is not None - assert response == 204 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_delete_variant_unsuccessfully_due_to_non_existent_config( - self, http_client, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.adelete(variant_slug=str(uuid.uuid4().hex)) - - # ASSERT - assert response == 204 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_delete_variant_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.adelete() - - # ASSERT - assert ( - response - == "TypeError: VariantManager.adelete() missing 1 required keyword-only argument: 'variant_slug'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_delete_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.adelete( - # variant_slug=variant_revision.get("config_name"), - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } diff --git a/api/oss/tests/legacy/workflows/config/tests.py b/api/oss/tests/legacy/workflows/config/tests.py deleted file mode 100644 index 1efce5c309..0000000000 --- a/api/oss/tests/legacy/workflows/config/tests.py +++ /dev/null @@ -1,286 +0,0 @@ -import uuid - -import pytest - -from tests.legacy.conftest import ( - fetch_variant_revision, - set_valid_llm_keys, - fetch_app_environment_revisions, -) - - -class TestServiceConfig: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, http_client, get_mock_response, create_app_and_variant - ): - app_variant_response = create_app_and_variant - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return app_variant_response - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_refs(self, http_client, setup_class_fixture): - # ARRANGE - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id=&application_slug=&variant_id=&variant_slug=&environment_id=&environment_slug=&environment_version=", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_ref_and_variant_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_version = 0 - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - custom_headers = {"Authorization": setup_class_fixture.get("credentials", None)} - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello&variant_slug={variant_slug}&variant_version={variant_version}", - json=payload, - headers=custom_headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_ref_and_environment_ref_id( - self, http_client, setup_class_fixture - ): - # ARRANGE - environment_id = None - environment_slug = None - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_and_invalid_variant_ref( - self, http_client, setup_class_fixture - ): - # ARRANGE - variant_id = str(uuid.uuid4()) - variant_slug = "my-variant" - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_and_invalid_environment_ref( - self, http_client, setup_class_fixture - ): - # ARRANGE - environment_id = str(uuid.uuid4()) - environment_slug = "pre-production" - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_variant_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - variant_revision_id = variant_revision.get("id", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?variant_id={variant_revision_id}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_variant_ref_excluding_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_version = 1 # this is 1 because there's a fixture that creates it - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id=&application_slug=&variant_version={variant_version}&variant_slug={variant_slug}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_environment_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - app_id = setup_class_fixture.get("app", {}).get("app_id", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - environment_revisions = await fetch_app_environment_revisions( - http_client, app_id, "production", headers - ) - environment_revision_id = environment_revisions.get("revisions")[-1].get( - "id", "" - ) - - # ACT - response = await http_client.post( - f"{service_url}/test?environment_id={environment_revision_id}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_environment_ref_excluding_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - environment_version = 1 # this is 1 because there's a fixture that creates it - environment_slug = ( - "production" # by default, this gets created along with the variant - ) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?environment_version={environment_version}&environment_slug={environment_slug}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 diff --git a/api/oss/tests/legacy/workflows/core/tests.py b/api/oss/tests/legacy/workflows/core/tests.py deleted file mode 100644 index e494c02809..0000000000 --- a/api/oss/tests/legacy/workflows/core/tests.py +++ /dev/null @@ -1,242 +0,0 @@ -import uuid - -import pytest - -from tests.legacy.conftest import * - - -class TestServiceCore: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - return app_variant_response - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_config(self, http_client, setup_class_fixture): - # ARRANGE - variant_id = None - variant_slug = None - application_id = None - application_slug = None - environment_id = None - environment_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_available_config_with_invalid_config( - self, http_client, setup_class_fixture - ): - # ARRANGE - variant_id = str(uuid.uuid4()) - variant_slug = "new-variant" - application_id = str(uuid.uuid4()) - application_slug = "my-app" - environment_id = str(uuid.uuid4()) - environment_slug = "pre-production" - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_variables(self, http_client, setup_class_fixture): - # ARRANGE - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - application_id = setup_class_fixture.get("app", {}).get("app_id", None) - application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json={}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data.get("detail") == [ - { - "input": None, - "loc": ["body", "inputs"], - "msg": "Field required", - "type": "missing", - } - ] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_available_variables_with_invalid_variables( - self, http_client, invalid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - expected_status = 422 - payload = invalid_run_generate_payload - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - application_id = setup_class_fixture.get("app", {}).get("app_id", None) - application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json=payload, - ) - response_data = response.json().get("detail", []) - - # ASSERT - assert response.status_code == expected_status - assert response_data[0].get("msg") == "Field required" - assert isinstance(response_data, list) - assert response_data[0].get("loc") == ["body", "inputs"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_model( - self, http_client, valid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - payload = valid_run_generate_payload - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/test", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 424 - assert "API key not found for model" in response_data["detail"].get( - "message", None - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - @pytest.mark.not_available_in_oss - async def test_missing_provider_key( - self, - http_client, - setup_class_fixture, - ): - # ARRANGE - expected_status = 422 - app_variant_response = setup_class_fixture - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # ACT - response = await http_client.post( - "vault/v1/secrets", - json={ - "header": {"name": "OpenAI", "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - response_data = response.json().get("detail", []) - - # ASSERT - assert response.status_code == expected_status - assert response_data[0].get("msg") == "Field required" - assert isinstance(response_data, list) - assert response_data[0].get("loc") == [ - "body", - "secret", - "data", - "provider", - ] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.security - @pytest.mark.not_available_in_oss - async def test_available_provider_key_with_invalid_provider_key( - self, - http_client, - setup_class_fixture, - ): - # ARRANGE - app_variant_response = setup_class_fixture - llm_api_keys_names = list(API_KEYS_MAPPING.keys()) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # ACT - list_of_status_codes = [] - for llm_api_key_name in llm_api_keys_names: - response = await http_client.post( - "vault/v1/secrets", - json={ - "header": {"name": llm_api_key_name, "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": "", - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - list_of_status_codes.append(response.status_code) - - # ASSERT - assert list_of_status_codes.count(422) == 12 diff --git a/api/oss/tests/legacy/workflows/litellm/tests.py b/api/oss/tests/legacy/workflows/litellm/tests.py deleted file mode 100644 index 828b3caa68..0000000000 --- a/api/oss/tests/legacy/workflows/litellm/tests.py +++ /dev/null @@ -1,159 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestLitellmCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_completion_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_chat_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_chat_generate_with_multiple_messages( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "messages": [ - {"role": "assistant", "content": "You are an expert in Geography."}, - {"role": "user", "content": "What is the capital of {country}?"}, - {"role": "assistant", "content": "The capital of France is Paris."}, - { - "role": "user", - "content": "How many states are there in {country}?", - }, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.slow - @pytest.mark.functional - async def test_completion_generate_with_all_models( - self, - http_client, - valid_run_generate_payload, - setup_class_fixture, - get_all_supported_models, - ): - # ARRANGE - payload = valid_run_generate_payload - headers = setup_class_fixture["headers"] - service_url = setup_class_fixture["service_url"] - supported_models = get_all_supported_models - number_of_working_models = 28 - - # ACT - list_of_status_codes = [] - for supported_model in supported_models: - payload["ag_config"]["prompt"]["llm_config"]["model"] = supported_model - response = await http_client.post( - f"{service_url}/test", - json=payload, - headers=headers, - ) - list_of_status_codes.append(response.status_code) - - # ASSERT - assert list_of_status_codes.count(200) == number_of_working_models - # assert list_of_status_codes.count(424) == ( - # len(supported_models) - number_of_working_models - # ) diff --git a/api/oss/tests/legacy/workflows/mock/chat_tests.py b/api/oss/tests/legacy/workflows/mock/chat_tests.py deleted file mode 100644 index 20bec8235f..0000000000 --- a/api/oss/tests/legacy/workflows/mock/chat_tests.py +++ /dev/null @@ -1,187 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockChat: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_chat_app_and_variant, http_client - ): - app_variant_response = create_chat_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate_with_multiple_messages( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "messages": [ - {"role": "assistant", "content": "You are an expert in Geography."}, - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - assert response_data["data"] == "content='world'" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data == { - "detail": [ - { - "type": "missing", - "loc": ["body", "inputs"], - "msg": "Field required", - "input": None, - } - ] - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_run_with_invalid_inputs(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={"input": {"messages": "What is the capital of France?"}}, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_test(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - assert response_data["data"] == "content='world'" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_test_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "inputs": [ - {"role": "user", "content": "What is the capital of France?"} - ] - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data == { - "detail": [ - { - "type": "missing", - "loc": ["body", "messages"], - "msg": "Field required", - "input": None, - } - ] - } diff --git a/api/oss/tests/legacy/workflows/mock/completion_tests.py b/api/oss/tests/legacy/workflows/mock/completion_tests.py deleted file mode 100644 index a3c1036717..0000000000 --- a/api/oss/tests/legacy/workflows/mock/completion_tests.py +++ /dev/null @@ -1,152 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockCompletion: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_run(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - assert response_data["data"] == "world" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_run_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "input": {"country_name": "France"}, - }, - headers=headers, - ) - - # ASSERT - assert response.status_code == 422 - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_test(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - assert response_data["data"] == "world" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_test_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "messages": ["France"], - "input": {"country_name": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 diff --git a/api/oss/tests/legacy/workflows/observability/tests.py b/api/oss/tests/legacy/workflows/observability/tests.py deleted file mode 100644 index 8b6bf6b47a..0000000000 --- a/api/oss/tests/legacy/workflows/observability/tests.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestObservabilityCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_completion_generate_observability_tree( - self, http_client, valid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - - # ACT - response = await http_client.post( - f"{service_url}/test", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "tree" in response_data - - # Get observability tree - trace_responses = await fetch_trace_by_trace_id( - http_client, headers, project_id=project_id - ) - - # Compare tree structures - workflow_response = response_data - observability_response = trace_responses - - # Step 1: Exclude lifecycle attribute from response(s) - workflow_response_final = exclude_lifecycle(workflow_response) - observability_response_final = exclude_lifecycle(observability_response) - - # Step 2: Compare structures with Jest-like matcher - workflow_nodes = workflow_response_final.get("tree", {}).get("nodes", []) - observability_nodes = observability_response_final.get("trees", {})[0].get( - "nodes", [] - ) - - is_match = exact_match(workflow_nodes, observability_nodes) - assert ( - is_match is True - ), "Workflow nodes does not match nodes from observability" diff --git a/api/oss/tests/legacy/workflows/permissions/tests.py b/api/oss/tests/legacy/workflows/permissions/tests.py deleted file mode 100644 index 50a98eef6e..0000000000 --- a/api/oss/tests/legacy/workflows/permissions/tests.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockCompletion: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant, http_client): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.security - @pytest.mark.not_available_in_oss - async def test_permissions_principal_not_in_scope( - self, http_client, setup_class_fixture - ): - # Arrange: Prepare data - expected_status = 403 - description = "Principal not in scope for POST" - service_url = setup_class_fixture["service_url"] - app_variant_response = setup_class_fixture["app_variant_response"] - user_scope_project_id = app_variant_response.get("scope_project_id") - non_member_credentials = app_variant_response.get("non_member_credentials", "") - non_member_headers = {"Authorization": non_member_credentials} - await set_valid_llm_keys(client=http_client, headers=non_member_headers) - - # Act - response = await http_client.post( - f"{service_url}/test?project_id={user_scope_project_id}", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=non_member_headers, - ) - response_data = response.json() - - # Assert: Verify the response - assert ( - response.status_code == expected_status - ), f"Failed for case: {description}" - assert ( - response.json().get("detail") == "Service execution not allowed." - ), f"Failed for case: {description}" diff --git a/api/oss/tests/manual/annotations/crud.http b/api/oss/tests/manual/annotations/crud.http index daf6295322..10657c7ae2 100644 --- a/api/oss/tests/manual/annotations/crud.http +++ b/api/oss/tests/manual/annotations/crud.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/annotations ### @@ -13,7 +13,7 @@ Authorization: Access {{token}} @authorization = {{create_account.response.body.scopes[0].credentials}} ### -# CREATE ANNOTATION +# CFREATE ANNOTATION # @name create_annotation POST {{base_url}}/ Content-Type: application/json diff --git a/api/oss/tests/manual/auth/admin.http b/api/oss/tests/manual/auth/admin.http index e31140d3b5..daa50004a3 100644 --- a/api/oss/tests/manual/auth/admin.http +++ b/api/oss/tests/manual/auth/admin.http @@ -1,6 +1,6 @@ @host = http://localhost @base_url = {{host}}/api -@access_token = change-me +@access_token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 ### diff --git a/api/oss/tests/manual/evaluations/crud.http b/api/oss/tests/manual/evaluations/crud.http deleted file mode 100644 index aa0ef43d36..0000000000 --- a/api/oss/tests/manual/evaluations/crud.http +++ /dev/null @@ -1,500 +0,0 @@ -@host = http://localhost -@token = change-me -@base_url = {{host}}/api/preview/evaluations - -### -# @name create_account -POST {{host}}/api/admin/account -Content-Type: application/json -Authorization: Access {{token}} - -### -@user_id = {{create_account.response.body.user.id}} -@authorization = {{create_account.response.body.scopes[0].credentials}} - -### - RUNS --------------------------------------------------------------------- - -### 1.1. REQUEST: Create run(s) -# @name create_runs -POST {{base_url}}/runs/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "runs": [ - { - "key": "demo-evaluation", - "name": "Demo run", - "description": "run to test basic creation", - "meta": { - "my-meta": "aloha" - }, - "data": { - "results": [ - { - "key": "some-testset", - "type": "input", - "origin": "custom", - "references": { - "testset": { - "id": "4448964e-dc0d-41ec-a855-46773decad01" - }, - "testset_variant": { - "id": "80b80599-737e-4454-a01f-96151b077040" - }, - "testset_revision": { - "id": "08a8084c-96d8-4642-a695-8b2537d24211" - } - } - }, - { - "key": "some-application", - "type": "invocation", - "origin": "custom", - "references": { - "application": { - "id": "c9d5e07c-2324-4b63-85a5-b83fa1a1f2ba" - }, - "application_variant": { - "id": "c96ca14e-5eda-4390-a659-2f5425d07a31" - }, - "application_revision": { - "id": "3b98bd3c-ed4c-4114-91da-20ade9958ab9" - } - }, - "inputs": [ - { "key": "some-testset" } - ] - }, - { - "key": "some-evaluator", - "type": "annotation", - "origin": "custom", - "references": { - "evaluator": { - "id": "2037d384-f201-455f-b890-b6be8fdb017c" - }, - "evaluator_variant": { - "id": "79b34629-7836-4bce-a1ee-fa4d80e7c7e0" - }, - "evaluator_revision": { - "id": "24840975-d42f-451a-8a9a-2596e4bb54df" - } - }, - "inputs": [ - { "key": "some-testset" }, - { "key": "some-application" } - ] - } - ], - "mappings": [ - { - "column":{ - "kind": "input", - "name": "Country" - }, - "step": { - "key": "some-testset", - "path": "country" - } - }, - { - "column": { - "kind": "input", - "name": "Capital (expected)" - }, - "step": { - "key": "some-testset", - "path": "correct_answer" - } - }, - { - "column": { - "kind": "application", - "name": "Capital (actual)" - }, - "step": { - "key": "some-application", - "path": "data.outputs.answer" - } - }, - { - "column": { - "kind": "evaluator", - "name": "Score" - }, - "step": { - "key": "some-application", - "path": "data.outputs.score" - } - }, - { - "column": { - "kind": "evaluator", - "name": "Confidence" - }, - "step": { - "key": "some-application", - "path": "data.outputs.confidence" - } - }, - { - "column": { - "kind": "evaluator", - "name": "Explanation" - }, - "step": { - "key": "some-application", - "path": "data.outputs.explanation" - } - } - ] - } - } - ] -} - -### -@run_id = {{create_runs.response.body.runs[0].id}} - -### 1.2. REQUEST: Close run -POST {{base_url}}/runs/{{run_id}}/close -Content-Type: application/json -Authorization: {{authorization}} - -### 1.3. REQUEST: Open run -POST {{base_url}}/runs/{{run_id}}/open -Content-Type: application/json -Authorization: {{authorization}} - -### 1.4. REQUEST: Get run -GET {{base_url}}/runs/{{run_id}} -Content-Type: application/json -Authorization: {{authorization}} - -### - SCENARIOS ---------------------------------------------------------------- - -### 2.1. REQUEST: Create scenarios -# @name create_scenarios -POST {{base_url}}/scenarios/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "scenarios": [ - { - "run_id": "{{run_id}}" - }, - { - "run_id": "{{run_id}}" - } - ] -} - -### -@scenario_id_1 = {{create_scenarios.response.body.scenarios[0].id}} -@scenario_id_2 = {{create_scenarios.response.body.scenarios[1].id}} - -### 2.1.1. REQUEST: Get all scenarios by run_id -# @name get_scenarios -POST {{base_url}}/scenarios/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "scenario": { - "run_id": "{{run_id}}" - } -} - -### 2.1.2. REQUEST: Get scenarios by run_id with windowing -# @name get_scenarios -POST {{base_url}}/scenarios/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "scenario": { - "run_id": "{{run_id}}" - }, - "windowing": { - "limit": 2 - } -} - -### -@next_scenario = {{get_scenarios.response.body.scenarios[1].id}} - -### 2.1.3. REQUEST: Get scenarios by run_id with windowing -# @name get_scenarios -POST {{base_url}}/scenarios/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "scenario": { - "run_id": "{{run_id}}" - }, - "windowing": { - "limit": 2, - "next": "{{next_scenario}}" - } -} - -### - RESULTS ------------------------------------------------------------------ - -### 3.1.1 REQUEST: Create input steps for scenarios 1 and 2 -# @name create_results -POST {{base_url}}/results/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "results": [ - { - "status": "success", - "step_key": "some-testset", - "testcase_id": "5619b65c-8639-40c8-be68-c8b661f22dbe", - "scenario_id": "{{scenario_id_1}}", - "run_id": "{{run_id}}" - }, - { - "status": "success", - "step_key": "some-testest", - "testcase_id": "1b3c9a82-c97b-44ec-a77d-73c754069c70", - "scenario_id": "{{scenario_id_2}}", - "run_id": "{{run_id}}" - } - ] -} - -### 3.1.2 REQUEST: Create invocation step for scenario 1 -POST {{base_url}}/results/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "results": [ - { - "status": "success", - "step_key": "some-application", - "trace_id": "b84f3862c7b74e759e19eeee88b5a1ba", - "scenario_id": "{{scenario_id_1}}", - "run_id": "{{run_id}}" - } - ] -} - -### 3.1.3 REQUEST: Create annotation step for scenario 1 -POST {{base_url}}/results/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "results": [ - { - "status": "success", - "step_key": "some-evaluator", - "trace_id": "306eb5ccd299493bb651985dff3ad9a7", - "scenario_id": "{{scenario_id_1}}", - "run_id": "{{run_id}}" - } - ] -} - -### 3.1.4 REQUEST: Create invocation step for scenario 2 -POST {{base_url}}/results/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "results": [ - { - "status": "success", - "step_key": "some-application", - "trace_id": "0773c47f216349ed8e5617830ae436ce", - "scenario_id": "{{scenario_id_2}}", - "run_id": "{{run_id}}" - } - ] -} - -### 3.1.5 REQUEST: Create annotation step for scenario 2 -POST {{base_url}}/results/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "results": [ - { - "status": "success", - "step_key": "some-evaluator", - "trace_id": "09989c5181784174ad44dd19da5b4f67", - "scenario_id": "{{scenario_id_2}}", - "run_id": "{{run_id}}" - } - ] -} - -### 3.2.1 REQUEST: Get all steps by run_id -# @name get_all_steps -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}" - } -} - -### - -### 3.2.2 REQUEST: Get all steps by run_id with windowing -# @name get_steps -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}" - }, - "windowing": { - "limit": 2 - } -} - -### -@next_result = {{get_steps.response.body.results[1].id}} - - -### 3.2.3 REQUEST: Get all steps by run_id with windowing -# @name get_steps -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}" - }, - "windowing": { - "limit": 2, - "next": "{{next_result}}" - } -} - -### 3.3.1 REQUEST: Get all steps by run_id and key -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}", - "step_keys": ["some-application", "some-evaluator"] - } -} - -### 3.3.2 REQUEST: Get all steps by run_id and status -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}", - "statuses": ["pending", "success"] - } -} - -### 3.3.3 REQUEST: Get all steps by run_id and scenario_id -POST {{base_url}}/results/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "result": { - "run_id": "{{run_id}}", - "scenario_ids": ["{{scenario_id_1}}"] - } -} - -### - METRICS ------------------------------------------------------------------ - -### 6.1 REQUEST: Create run metrics -POST {{base_url}}/metrics/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "metrics": [ - { - "run_id": "{{run_id}}", - "data": { - "score": 0.95, - "confidence": 0.9, - "duration": 0.92, - "errors": 0.93, - "cost": 0.91 - } - } - ] -} - -### 6.2 Create scenario metrics -POST {{base_url}}/metrics/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "metrics": [ - { - "run_id": "{{run_id}}", - "scenario_id": "{{scenario_id_1}}", - "data": { - "score": 0.95, - "confidence": 0.9, - "duration": 0.92, - "errors": 0.93, - "cost": 0.91 - } - }, - { - "run_id": "{{run_id}}", - "scenario_id": "{{scenario_id_2}}", - "data": { - "score": 0.95, - "confidence": 0.9, - "duration": 0.92, - "errors": 0.93, - "cost": 0.91 - } - } - ] -} - - -### 9. REQUEST: Get all metrics by run_id -POST {{base_url}}/metrics/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "metrics": { - "run_id": "{{run_id}}" - } -} - -### 9. REQUEST: Get all metrics by run_id and scenario_id -POST {{base_url}}/metrics/query -Content-Type: application/json -Authorization: {{authorization}} - -{ - "metrics": { - "run_id": "{{run_id}}", - "scenario_ids": ["{{scenario_id_1}}"] - } -} \ No newline at end of file diff --git a/api/oss/tests/manual/evaluations/live.http b/api/oss/tests/manual/evaluations/live.http deleted file mode 100644 index 6a43280046..0000000000 --- a/api/oss/tests/manual/evaluations/live.http +++ /dev/null @@ -1,131 +0,0 @@ -@auth_key = {{$dotenv.AGENTA_AUTH_KEY}} || change-me -@api_url = {{$dotenv AGENTA_API_URL}} -@api_key = {{$dotenv AGENTA_API_KEY}} - - -### -# @name create_account -POST {{api_url}}/admin/account -Content-Type: application/json -Authorization: Access {{auth_key}} - -### -@user_id = {{create_account.response.body.user.id}} -# @authorization = {{create_account.response.body.scopes[0].credentials}} -@authorization = ApiKey {{api_key}} - -### -# @name list_queries -POST {{api_url}}/preview/simple/queries/query -Content-Type: application/json -Authorization: {{authorization}} - -{} - -### -# @name create_query -POST {{api_url}}/preview/simple/queries/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "query": { - "slug": "{{$guid}}", - "name": "Test Query", - "description": "This is a test query", - "tags": { - "my_key": "my_value" - }, - "data": { - "filtering": { - "conditions": [ - { - "field": "attributes", - "key": "ag.type.trace", - "operator": "is", - "value": "invocation" - } - ] - } - } - } -} - -### -# @name fetch_query_revision -POST {{api_url}}/preview/queries/revisions/retrieve -Content-Type: application/json -Authorization: {{authorization}} - -{ - "query_ref": { - "id": "{{create_query.response.body.query.id}}" - } -} - -### -# @name list_evaluators -POST {{api_url}}/preview/simple/evaluators/query -Content-Type: application/json -Authorization: {{authorization}} - -{} - -### -# @name fetch_evaluator_revision -POST {{api_url}}/preview/evaluators/revisions/retrieve -Content-Type: application/json -Authorization: {{authorization}} - -{ - "evaluator_ref": { - "id": "{{list_evaluators.response.body.evaluators[2].id}}" - } -} - -### -# @name list_evaluations -POST {{api_url}}/preview/simple/evaluations/query -Content-Type: application/json -Authorization: {{authorization}} - -{} - -### -# @name create_evaluation -POST {{api_url}}/preview/simple/evaluations/ -Content-Type: application/json -Authorization: {{authorization}} - -{ - "evaluation": { - "name": "Test JIT Evaluation", - "description": "This is a test jit evaluation", - "tags": { - "my_key": "my_value" - }, - "flags": { - "is_live": true - }, - "data": { - "query_steps": [ - "{{fetch_query_revision.response.body.query_revision.id}}" - ], - "evaluator_steps": [ - "{{fetch_evaluator_revision.response.body.evaluator_revision.evaluator_id}}" - ] - } - } -} - -### -# @name stop_evaluation -POST {{api_url}}/preview/simple/evaluations/{{create_evaluation.response.body.evaluation.id}}/stop -Content-Type: application/json -Authorization: {{authorization}} - -### -# @name start_evaluation -POST {{api_url}}/preview/simple/evaluations/{{create_evaluation.response.body.evaluation.id}}/start -Content-Type: application/json -Authorization: {{authorization}} diff --git a/api/oss/tests/manual/evaluators/crud.http b/api/oss/tests/manual/evaluators/crud.http index 21b60c97b5..00af007e5e 100644 --- a/api/oss/tests/manual/evaluators/crud.http +++ b/api/oss/tests/manual/evaluators/crud.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/evaluators ### diff --git a/api/oss/tests/manual/testsets/crud.http b/api/oss/tests/manual/testsets/crud.http index 72f3149fcc..721ece311c 100644 --- a/api/oss/tests/manual/testsets/crud.http +++ b/api/oss/tests/manual/testsets/crud.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/testsets ### diff --git a/api/oss/tests/manual/tracing/crud.http b/api/oss/tests/manual/tracing/crud.http index e5580efa47..1cddc1bfe9 100644 --- a/api/oss/tests/manual/tracing/crud.http +++ b/api/oss/tests/manual/tracing/crud.http @@ -1,16 +1,7 @@ @host = http://localhost -@token = change-me @base_url = {{host}}/api/preview/tracing +@api_key = UGZaImq8.a94d2c99eab827b1cd27678358016a61f2e92c2cdea8f33b1cf3cc2afb7065e8 -### -# @name create_account -POST {{host}}/api/admin/account -Content-Type: application/json -Authorization: Access {{token}} - -### -@user_id = {{create_account.response.body.user.id}} -@authorization = {{create_account.response.body.scopes[0].credentials}} ### @@ -18,7 +9,7 @@ Authorization: Access {{token}} # @name add_trace POST {{base_url}}/traces/ Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "traces": { @@ -116,7 +107,7 @@ Authorization: {{authorization}} # @name add_trace POST {{base_url}}/traces/ Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "spans": [ @@ -206,7 +197,7 @@ Authorization: {{authorization}} # @name fetch_trace GET {{base_url}}/traces/{{add_trace.response.body.links[0].trace_id}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} # HTTP/1.1 200 OK # SAME AS ADD TRACE @@ -215,9 +206,9 @@ Authorization: {{authorization}} # TRACE TREE # @name edit_trace -PUT {{base_url}}/traces/ +PUT {{base_url}}/traces/{{add_trace.response.body.links[0].trace_id}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "traces": { @@ -314,7 +305,7 @@ Authorization: {{authorization}} # @name delete_trace DELETE {{base_url}}/traces/{{add_trace.response.body.links[0].trace_id}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} # HTTP/1.1 202 Accepted # ... diff --git a/api/oss/tests/manual/tracing/filtering/00_user_id.http b/api/oss/tests/manual/tracing/filtering/00_user_id.http index 6a39dbd828..b0aec3db4f 100644 --- a/api/oss/tests/manual/tracing/filtering/00_user_id.http +++ b/api/oss/tests/manual/tracing/filtering/00_user_id.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/01_trace_id.http b/api/oss/tests/manual/tracing/filtering/01_trace_id.http index 3f86d6575c..d283239538 100644 --- a/api/oss/tests/manual/tracing/filtering/01_trace_id.http +++ b/api/oss/tests/manual/tracing/filtering/01_trace_id.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/02_span_id.http b/api/oss/tests/manual/tracing/filtering/02_span_id.http index 33973dba57..427a0ce804 100644 --- a/api/oss/tests/manual/tracing/filtering/02_span_id.http +++ b/api/oss/tests/manual/tracing/filtering/02_span_id.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/03_parent_id.http b/api/oss/tests/manual/tracing/filtering/03_parent_id.http index 5fa8782df0..2944ff3662 100644 --- a/api/oss/tests/manual/tracing/filtering/03_parent_id.http +++ b/api/oss/tests/manual/tracing/filtering/03_parent_id.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/04_span_kind.http b/api/oss/tests/manual/tracing/filtering/04_span_kind.http index c4a757d7b5..4ef2e13fe8 100644 --- a/api/oss/tests/manual/tracing/filtering/04_span_kind.http +++ b/api/oss/tests/manual/tracing/filtering/04_span_kind.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/05_span_name.http b/api/oss/tests/manual/tracing/filtering/05_span_name.http index 894c42e445..89cf34b34f 100644 --- a/api/oss/tests/manual/tracing/filtering/05_span_name.http +++ b/api/oss/tests/manual/tracing/filtering/05_span_name.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/06_start_time.http b/api/oss/tests/manual/tracing/filtering/06_start_time.http index 1f20b6bc36..4de7707dca 100644 --- a/api/oss/tests/manual/tracing/filtering/06_start_time.http +++ b/api/oss/tests/manual/tracing/filtering/06_start_time.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/07_end_time.http b/api/oss/tests/manual/tracing/filtering/07_end_time.http index f59f4baeb1..99bc734eba 100644 --- a/api/oss/tests/manual/tracing/filtering/07_end_time.http +++ b/api/oss/tests/manual/tracing/filtering/07_end_time.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/08_status_code.http b/api/oss/tests/manual/tracing/filtering/08_status_code.http index 7a9860c7d7..d26d156b4a 100644 --- a/api/oss/tests/manual/tracing/filtering/08_status_code.http +++ b/api/oss/tests/manual/tracing/filtering/08_status_code.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/09_status_message.http b/api/oss/tests/manual/tracing/filtering/09_status_message.http index 6f8d4f59c4..fc9b467b1c 100644 --- a/api/oss/tests/manual/tracing/filtering/09_status_message.http +++ b/api/oss/tests/manual/tracing/filtering/09_status_message.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/10_attributes.http b/api/oss/tests/manual/tracing/filtering/10_attributes.http index fe4006a974..a00a72b622 100644 --- a/api/oss/tests/manual/tracing/filtering/10_attributes.http +++ b/api/oss/tests/manual/tracing/filtering/10_attributes.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/11_links.http b/api/oss/tests/manual/tracing/filtering/11_links.http index 68fd7bec53..5ba314d6bd 100644 --- a/api/oss/tests/manual/tracing/filtering/11_links.http +++ b/api/oss/tests/manual/tracing/filtering/11_links.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/filtering/12_references.http b/api/oss/tests/manual/tracing/filtering/12_references.http index 271a374f44..2e0a6d6940 100644 --- a/api/oss/tests/manual/tracing/filtering/12_references.http +++ b/api/oss/tests/manual/tracing/filtering/12_references.http @@ -1,5 +1,5 @@ @host = http://localhost -@token = change-me +@token = 75f7cfc77236b15ec8929399582f407f05c9f95b89b10b74f078b877ad452a48 @base_url = {{host}}/api/preview/tracing ### diff --git a/api/oss/tests/manual/tracing/ingestion/agenta_streaming_response.py b/api/oss/tests/manual/tracing/ingestion/agenta_streaming_response.py deleted file mode 100644 index 3106a372b8..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/agenta_streaming_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# /// script -# dependencies = ["agenta", "fastapi", "pydantic"] -# /// -""" -Simple Agenta Observability FastAPI Example - -This example demonstrates the main issues with Agenta observability: -1. @ag.instrument() decorator doesn't work with generator functions (streaming responses) -2. Batch size configuration issues with OpenTelemetry environment variables - -""" -from dotenv import load_dotenv - -import asyncio -import json -import logging -import os -import uuid -from typing import AsyncGenerator -from datetime import datetime - -import agenta as ag -from fastapi import FastAPI -from fastapi.responses import StreamingResponse -from pydantic import BaseModel, Field - -# Configure logging -logging.basicConfig(level=logging.INFO) -logger = logging.getLogger(__name__) - -# ISSUE: OpenTelemetry environment variables don't work because Agenta overrides them -# These standard OTEL env vars should work but don't: -os.environ["OTEL_EXPORTER_OTLP_COMPRESSION"] = "gzip" -os.environ["OTEL_BSP_MAX_EXPORT_BATCH_SIZE"] = "10" -os.environ["OTEL_BSP_MAX_QUEUE_SIZE"] = "500" -os.environ["OTEL_BSP_SCHEDULE_DELAY"] = "3000" - -# Initialize Agenta -load_dotenv(override=True) - -ag.init() - - -class StreamConfig(BaseModel): - """Configuration for streaming responses""" - - max_tokens: int = Field(default=20, description="Maximum tokens to generate") - - -@ag.instrument() -async def streaming_generator_with_broken_decorator( - text: str, -) -> AsyncGenerator[str, None]: - config = StreamConfig() - - # The decorator will close the span here, before any yields - logger.info(f"🚨 Starting generator (decorator will close span immediately)") - - words = text.split() - for i, word in enumerate(words[: config.max_tokens]): - token = f"{word} " - logger.info(f"📡 Yielding: {token.strip()}") - yield f"data: {json.dumps({'token': token, 'index': i})}\\n\\n" - - yield "data: [DONE]\\n\\n" - - -@ag.instrument() -async def stream_with_broken_decorator( - text: str = "Hello world from Agenta streaming test", -): - logger.info("🚨 Using BROKEN decorator approach") - return StreamingResponse( - streaming_generator_with_broken_decorator(text), media_type="text/event-stream" - ) - - -if __name__ == "__main__": - import asyncio - - async def main(): - # Get the StreamingResponse object - response = await stream_with_broken_decorator() - - # Access the streaming content from the response - async for chunk in response.body_iterator: - print(chunk, end="") - - asyncio.run(main()) diff --git a/api/oss/tests/manual/tracing/ingestion/data/test-post.md b/api/oss/tests/manual/tracing/ingestion/data/test-post.md deleted file mode 100644 index 397e4befe7..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/data/test-post.md +++ /dev/null @@ -1,14 +0,0 @@ -Exploring Agenta: The Future of LLMOps Platforms - -In the rapidly evolving landscape of machine learning and artificial intelligence, Agenta emerges as a groundbreaking LLMOps (Large Language Model Operations) platform. Designed to streamline the deployment, management, and scaling of large language models, Agenta offers a suite of tools that cater to both novice and expert users in the AI domain. - -One of the standout features of Agenta is its intuitive interface, which simplifies the complex processes involved in managing large language models. Users can easily deploy models with just a few clicks, monitor their performance in real-time, and make adjustments on-the-fly to optimize outcomes. This level of accessibility ensures that even those with limited technical expertise can harness the power of advanced AI technologies. - -Moreover, Agenta's robust infrastructure supports seamless integration with existing workflows, allowing organizations to enhance their AI capabilities without overhauling their current systems. The platform's scalability ensures that as the demand for AI solutions grows, Agenta can accommodate increased workloads without compromising on performance. - -In addition to its technical prowess, Agenta fosters a community-driven approach to AI development. By encouraging collaboration and knowledge sharing among users, the platform not only accelerates innovation but also democratizes access to cutting-edge AI tools. - -As the field of AI continues to expand, platforms like Agenta will play a crucial role in shaping the future of technology. By providing a comprehensive, user-friendly solution for managing large language models, Agenta is poised to become a leader in the LLMOps space, empowering users to unlock the full potential of AI. - -Stay tuned for more updates on how Agenta is transforming the world of AI and machine learning! - diff --git a/api/oss/tests/manual/tracing/ingestion/logfire_pydanticai.py b/api/oss/tests/manual/tracing/ingestion/logfire_pydanticai.py index f6e772b7fe..5a9973a72a 100644 --- a/api/oss/tests/manual/tracing/ingestion/logfire_pydanticai.py +++ b/api/oss/tests/manual/tracing/ingestion/logfire_pydanticai.py @@ -3,18 +3,19 @@ # /// from dataclasses import dataclass + from pydantic import BaseModel, Field from pydantic_ai import Agent, RunContext import logfire import agenta as ag from dotenv import load_dotenv +import os load_dotenv(override=True) # os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "http://localhost/api/otlp/" # os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=ApiKey {os.environ['AGENTA_API_KEY']}" - ag.init() logfire.configure( service_name="my_logfire_service", send_to_logfire=False, scrubbing=False @@ -33,7 +34,6 @@ class DatabaseConn: async def customer_name(cls, *, id: int) -> str | None: if id == 123: return "John" - return None @classmethod async def customer_balance(cls, *, id: int, include_pending: bool) -> float: @@ -46,7 +46,6 @@ async def customer_balance(cls, *, id: int, include_pending: bool) -> float: @dataclass class SupportDependencies: customer_id: int - including_pending: bool db: DatabaseConn @@ -76,44 +75,27 @@ async def add_customer_name(ctx: RunContext[SupportDependencies]) -> str: @support_agent.tool -async def customer_balance(ctx: RunContext[SupportDependencies]) -> str: +async def customer_balance( + ctx: RunContext[SupportDependencies], include_pending: bool +) -> str: """Returns the customer's current account balance.""" balance = await ctx.deps.db.customer_balance( id=ctx.deps.customer_id, - include_pending=ctx.deps.including_pending, + include_pending=include_pending, ) return f"${balance:.2f}" -@ag.instrument() -def bank_balance(customer_id: int, query: str, include_pending: bool = True): - """Returns the customer's current account balance.""" - deps = SupportDependencies( - customer_id=customer_id, - including_pending=include_pending, - db=DatabaseConn(), - ) - result = support_agent.run_sync(query, deps=deps) - return result - - -@ag.instrument() -def block_card(customer_id: int, query: str, include_pending: bool = True): - """Blocks the customer's card if they report it lost.""" - deps = SupportDependencies( - customer_id=customer_id, - including_pending=include_pending, - db=DatabaseConn(), - ) - result = support_agent.run_sync(query, deps=deps) - return result - - if __name__ == "__main__": - # Agenta 1: get user's account balance - result = bank_balance(123, "What is my balance?", True) + deps = SupportDependencies(customer_id=123, db=DatabaseConn()) + result = support_agent.run_sync("What is my balance?", deps=deps) print(result.output) + """ + support_advice='Hello John, your current account balance, including pending transactions, is $123.45.' block_card=False risk=1 + """ - # Agent 2: block user's card if they report it lost - result = block_card(123, "I just lost my card!", True) + result = support_agent.run_sync("I just lost my card!", deps=deps) print(result.output) + """ + support_advice="I'm sorry to hear that, John. We are temporarily blocking your card to prevent unauthorized transactions." block_card=True risk=8 + """ diff --git a/api/oss/tests/manual/tracing/ingestion/meetings/transcript.txt b/api/oss/tests/manual/tracing/ingestion/meetings/transcript.txt deleted file mode 100644 index d9939b7e71..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/meetings/transcript.txt +++ /dev/null @@ -1,3 +0,0 @@ -Alice: I think we need to move the deadline up by a week. -Bob: That might be tight, but okay, I’ll update the roadmap. -Charlie: I'll notify the client and handle the PR side. \ No newline at end of file diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_agno.py b/api/oss/tests/manual/tracing/ingestion/openinference_agno.py deleted file mode 100644 index 519dccad49..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_agno.py +++ /dev/null @@ -1,172 +0,0 @@ -# /// script -# dependencies = ["agenta", "openinference-instrumentation-agno", "agno"] -# /// - -import re -from itertools import permutations - -import agenta as ag -from agno.agent import Agent -from agno.models.openai import OpenAIChat -from openinference.instrumentation.agno import AgnoInstrumentor - - -ag.init() -AgnoInstrumentor().instrument() - -# ------------------------------- -# Simulated Data -# ------------------------------- -tracking_data = { - "TRK10001": "In transit at Berlin Friedrichshain Distribution Center", - "TRK10002": "Delivered on 2025-06-14 at 18:32 in Charlottenburg", - "TRK10003": "Out for delivery — last scanned near Tempelhofer Feld", - "TRK10004": "Held at customs near Berlin Brandenburg Airport (BER)", - "TRK10005": "Awaiting pickup at Berlin Hauptbahnhof Parcel Station", -} - -distance_matrix = { - "Warehouse": {"A": 10, "B": 15, "C": 20}, - "A": {"Warehouse": 10, "B": 12, "C": 5}, - "B": {"Warehouse": 15, "A": 12, "C": 8}, - "C": {"Warehouse": 20, "A": 5, "B": 8}, -} - -driver_load = {"Alice": 2, "Bob": 3, "Charlie": 1} - - -# ------------------------------- -# Tool: TrackingTool -# ------------------------------- -class TrackingTool: - def __init__(self): - self.name = "TrackingTool" - self.description = "Provides shipment status updates given a tracking ID." - - def run(self, query: str) -> str: - match = re.search(r"\bTRK\d+\b", query.upper()) - if not match: - return "Please provide a valid tracking ID." - tid = match.group(0) - status = tracking_data.get(tid) - return f"Status for {tid}: {status}" if status else f"No information for {tid}." - - -# ------------------------------- -# Tool: RouteTool -# ------------------------------- -class RouteTool: - def __init__(self): - self.name = "RouteTool" - self.description = ( - "Computes the best delivery route given a start and destinations." - ) - - def run(self, query: str) -> str: - m = re.search(r"from\s+([\w\s]+)\s+to\s+(.+)", query, re.IGNORECASE) - if not m: - return "Specify route as 'from <Origin> to <Dest1>, <Dest2>, ...'." - origin = m.group(1).strip() - dests = [d.strip() for d in re.split(r",| and ", m.group(2)) if d.strip()] - if origin not in distance_matrix: - return f"Unknown origin: {origin}." - for loc in dests: - if loc not in distance_matrix: - return f"Unknown destination: {loc}." - - # NOTE: since route algorithm is factorial, we need to guard against too many waypoints - MAX_WAYPOINTS = 6 - if len(dests) > MAX_WAYPOINTS: - return "Too many destinations – please provide at most 6." - - best_order = None - best_distance = float("inf") - for perm in permutations(dests): - total = 0 - cur = origin - for nxt in perm: - total += distance_matrix[cur][nxt] - cur = nxt - if total < best_distance: - best_distance = total - best_order = perm - route_plan = " → ".join([origin] + list(best_order)) if best_order else origin - return f"Optimal route: {route_plan} (Total distance: {best_distance} km)" - - -# ------------------------------- -# Tool: WorkloadBalancerTool -# ------------------------------- -class WorkloadBalancerTool: - def __init__(self): - self.name = "WorkloadBalancerTool" - self.description = "Assigns delivery locations to the least busy driver." - self.drivers = driver_load.copy() - - def run(self, query: str) -> str: - m = re.search(r"deliver(?:y|ies)? to (.+)", query, re.IGNORECASE) - if not m: - return "Please specify delivery locations like 'deliver to A, B, C'." - locations = [ - loc.strip() for loc in re.split(r",| and ", m.group(1)) if loc.strip() - ] - assignments = [] - for loc in locations: - least_loaded = min(self.drivers, key=lambda d: self.drivers[d]) - assignments.append(f"{loc} → {least_loaded}") - self.drivers[least_loaded] += 1 - return "Delivery assignments:\n" + "\n".join(assignments) - - -# ------------------------------- -# Create Agent -# ------------------------------- -agent = Agent( - model=OpenAIChat(id="gpt-4o"), - description="You are a smart dispatch assistant for a logistics team.", - instructions=[ - "Use TrackingTool for shipment queries.", - "Use RouteTool for route optimization.", - "Use WorkloadBalancerTool to assign deliveries to drivers.", - "Always return concise, formatted answers with relevant detail.", - ], - tools=[TrackingTool(), RouteTool(), WorkloadBalancerTool()], - show_tool_calls=False, - # markdown=True, -) - - -@ag.instrument() -def handle_dispatch_request(query: str): - result = agent.run(query) - return result.content - - -# ------------------------------- -# Run Agent Examples -# ------------------------------- -# print("Shipment Tracking") -# print(agent.run("Where is shipment TRK12345?")) - -# print("\nRoute Optimization") -# print(agent.run("Find the best route from Warehouse to A, B and C")) - -# print("\nWorkload Assignment") -# print(agent.run("Please assign deliveries to A, B, and C")) - -# print("\nCombined Multi-Tool Request") -# print( -# agent.run( -# "Where is shipment TRK10001? Also, find the best route from Warehouse to A, B and C, " -# "and assign deliveries to the least busy drivers." -# ) -# ) - - -if __name__ == "__main__": - print( - "Response: ", - handle_dispatch_request( - query="Where is shipment TRK10001? Also, find the best route from Warehouse to A, B and C, and assign deliveries to the least busy drivers." - ), - ) diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_dspy.py b/api/oss/tests/manual/tracing/ingestion/openinference_dspy.py deleted file mode 100644 index d5a828df80..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_dspy.py +++ /dev/null @@ -1,105 +0,0 @@ -# /// script -# dependencies = ["agenta", "dspy", "openinference-instrumentation-dspy"] -# /// - -import agenta as ag -import dspy -from dotenv import load_dotenv -from openinference.instrumentation.dspy import DSPyInstrumentor - -load_dotenv(override=True) - -ag.init() - -DSPyInstrumentor().instrument() - - -lm = dspy.LM("openai/gpt-4o") -dspy.configure(lm=lm) - - -# Use case 1: Math reasoning with Chain of Thought (CoT) -@ag.instrument() -def math_reasoning(question: str): - cot = dspy.ChainOfThought("question -> answer: float") - response = cot(question=question) - return response - - -# Use case 2: Retrieval-Augmented Generation (RAG) with Wikipedia search -@ag.instrument(spankind="query") -def search_wikipedia(query: str) -> list[str]: - results = dspy.ColBERTv2(url="http://20.102.90.50:2017/wiki17_abstracts")( - query, k=3 - ) - return [x["text"] for x in results] - - -@ag.instrument() -def rag(question: str): - cot = dspy.ChainOfThought("context, question -> response") - response = cot(context=search_wikipedia(question), question=question) - return response - - -# Use case 3: Drafting an article with an outline and sections -class Outline(dspy.Signature): - """Outline a thorough overview of a topic.""" - - topic: str = dspy.InputField() - title: str = dspy.OutputField() - sections: list[str] = dspy.OutputField() - section_subheadings: dict[str, list[str]] = dspy.OutputField( - desc="mapping from section headings to subheadings" - ) - - -class DraftSection(dspy.Signature): - """Draft a top-level section of an article.""" - - topic: str = dspy.InputField() - section_heading: str = dspy.InputField() - section_subheadings: list[str] = dspy.InputField() - content: str = dspy.OutputField(desc="markdown-formatted section") - - -class DraftArticle(dspy.Module): - def __init__(self): - self.build_outline = dspy.ChainOfThought(Outline) - self.draft_section = dspy.ChainOfThought(DraftSection) - - def forward(self, topic: str): - outline = self.build_outline(topic=topic) - sections = [] - for heading, subheadings in outline.section_subheadings.items(): - section, subheadings = f"## {heading}", [ - f"### {subheading}" for subheading in subheadings - ] - section = self.draft_section( - topic=outline.title, - section_heading=section, - section_subheadings=subheadings, - ) - sections.append(section.content) - return dspy.Prediction(title=outline.title, sections=sections) - - -@ag.instrument() -def journalist(topic: str): - draft_article = DraftArticle() - article = draft_article(topic=topic) - return article - - -if __name__ == "__main__": - # Use case 1: Math reasoning - response = math_reasoning("What is 2 + 2?") - print("Math response:", response) - - # Use case 2: RAG with Wikipedia - rag_response = rag("What's the name of the castle that David Gregory inherited?") - print("RAG response:", rag_response) - - # Use case 3: Article generation - article = journalist("The impact of AI on society") - print("Article generation response:", article) diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_langgraph.py b/api/oss/tests/manual/tracing/ingestion/openinference_langgraph.py deleted file mode 100644 index 86420dd770..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_langgraph.py +++ /dev/null @@ -1,84 +0,0 @@ -# /// script -# dependencies = ["agenta", "langchain", "langgraph", "langchain-openai", "langchain-community", "llama-index", "openinference-instrumentation-langchain"] -# /// -import agenta as ag -from typing import TypedDict, Dict, Any -from langgraph.graph import StateGraph, END -from langchain_openai import ChatOpenAI -from llama_index.core import SimpleDirectoryReader -from langchain_core.runnables import RunnableLambda -from openinference.instrumentation.langchain import LangChainInstrumentor - -from dotenv import load_dotenv - -load_dotenv(override=True) -ag.init() -LangChainInstrumentor().instrument() - - -llm = ChatOpenAI(model="gpt-4", temperature=0) - - -class SummarizerState(TypedDict): - input: str - segments: Dict[str, list[str]] - speaker_summaries: Dict[str, str] - actions: str - - -# Load all .txt or .md files in the "meetings" directory -documents = SimpleDirectoryReader("meetings").load_data() -full_transcript = "\n".join(doc.text for doc in documents) - - -# Node 1: Segment speaker contributions -def segment_by_speaker(state): - transcript = state["input"] - speakers = {} - for line in transcript.split("\n"): - if ":" in line: - name, text = line.split(":", 1) - speakers.setdefault(name.strip(), []).append(text.strip()) - return {**state, "segments": speakers} - - -# Node 2: Summarize each speaker's contributions -def summarize_per_speaker(state): - segments = state["segments"] - summaries = {} - for speaker, texts in segments.items(): - joined_text = " ".join(texts) - summary = llm.invoke(f"Summarize what {speaker} said: {joined_text}") - summaries[speaker] = summary.content - return {**state, "speaker_summaries": summaries} - - -# Node 3: Extract action items -def extract_actions(state): - transcript = state["input"] - result = llm.invoke(f"List all action items from this transcript:\n{transcript}") - return {**state, "actions": result.content} - - -@ag.instrument() -def meeting_analyzer(transcript: str): - # Build LangGraph workflow - builder = StateGraph(SummarizerState) - builder.add_node("segment", RunnableLambda(segment_by_speaker)) - builder.add_node("summarize", RunnableLambda(summarize_per_speaker)) - builder.add_node("extract_actions", RunnableLambda(extract_actions)) - - builder.set_entry_point("segment") - builder.add_edge("segment", "summarize") - builder.add_edge("summarize", "extract_actions") - builder.add_edge("extract_actions", END) - - graph = builder.compile() - result = graph.invoke({"input": transcript}) - return result - - -# Example usage -if __name__ == "__main__": - result = meeting_analyzer(full_transcript) - print("Analysis Result:", result) diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_llamaindex.py b/api/oss/tests/manual/tracing/ingestion/openinference_llamaindex.py deleted file mode 100644 index 0946b03269..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_llamaindex.py +++ /dev/null @@ -1,28 +0,0 @@ -# /// script -# dependencies = ["agenta", "llama_index", "openinference-instrumentation-llama_index"] -# /// - -import os -from openinference.instrumentation.llama_index import LlamaIndexInstrumentor -from llama_index.core import VectorStoreIndex, SimpleDirectoryReader - -import agenta as ag -from dotenv import load_dotenv - -load_dotenv(override=True) - -ag.init() - -LlamaIndexInstrumentor().instrument() - - -@ag.instrument() -def llama_index_app(query: str): - documents = SimpleDirectoryReader("data").load_data() - index = VectorStoreIndex.from_documents(documents) - query_engine = index.as_query_engine() - response = query_engine.query(query) - print(response) - - -llama_index_app("What is Agenta?") diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_openai_agents.py b/api/oss/tests/manual/tracing/ingestion/openinference_openai_agents.py deleted file mode 100644 index 2e7530de19..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_openai_agents.py +++ /dev/null @@ -1,66 +0,0 @@ -# /// script -# dependencies = ["agenta", "openinference-instrumentation-openai-agents", "openai-agents"] -# /// -import asyncio -import agenta as ag -from agents import Agent, Runner -from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor -from dotenv import load_dotenv - -load_dotenv() - -ag.init() -OpenAIAgentsInstrumentor().instrument() - - -spanish_agent = Agent( - name="Spanish agent", - instructions="You translate the user's message to Spanish", -) - -french_agent = Agent( - name="French agent", - instructions="You translate the user's message to French", -) - -german_agent = Agent( - name="German agent", - instructions="You translate the user's message to German", -) - -orchestrator_agent = Agent( - name="orchestrator_agent", - instructions=( - "You are a translation agent. You use the tools given to you to translate." - "If asked for multiple translations, you call the relevant tools." - ), - tools=[ - spanish_agent.as_tool( - tool_name="translate_to_spanish", - tool_description="Translate the user's message to Spanish", - ), - french_agent.as_tool( - tool_name="translate_to_french", - tool_description="Translate the user's message to French", - ), - german_agent.as_tool( - tool_name="translate_to_german", - tool_description="Translate the user's message to German", - ), - ], -) - - -@ag.instrument() -async def duolingo(query: str): - result = await Runner.run(orchestrator_agent, input=query) - return result.final_output - - -if __name__ == "__main__": - - async def main(): - response = await duolingo("What is 'What's your name' in French?") - print("Response 1:", response) - - asyncio.run(main()) diff --git a/api/oss/tests/manual/tracing/ingestion/openinference_openai_streaming.py b/api/oss/tests/manual/tracing/ingestion/openinference_openai_streaming.py deleted file mode 100644 index fe25016bac..0000000000 --- a/api/oss/tests/manual/tracing/ingestion/openinference_openai_streaming.py +++ /dev/null @@ -1,47 +0,0 @@ -# /// script -# dependencies = ["agenta", "openinference-instrumentation-openai", "openai"] -# /// -import agenta as ag -from dotenv import load_dotenv -from openinference.instrumentation.openai import OpenAIInstrumentor -from openai import OpenAI - - -load_dotenv(override=True) - - -ag.init() - - -openai = OpenAI() - -OpenAIInstrumentor().instrument() - - -@ag.instrument(spankind="WORKFLOW") -async def rag(topic: str, genre: str): - response = openai.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": f"Write a short {genre} joke about {topic}."}, - ], - stream=True, # Enable streaming - ) - - # Handle the streaming response properly - for chunk in response: - if chunk.choices[0].delta.content is not None: - yield chunk.choices[0].delta.content - - -if __name__ == "__main__": - import asyncio - - async def main(): - print("Generating joke...") - async for chunk in rag(topic="AI", genre="hilarious"): - print(chunk, end="", flush=True) - print() # New line after completion - - asyncio.run(main()) diff --git a/api/oss/tests/manual/tracing/ingestion/openllmetry_langchain.py b/api/oss/tests/manual/tracing/ingestion/openllmetry_langchain.py index ca6ad3a07d..f1d6549bdf 100644 --- a/api/oss/tests/manual/tracing/ingestion/openllmetry_langchain.py +++ b/api/oss/tests/manual/tracing/ingestion/openllmetry_langchain.py @@ -17,6 +17,7 @@ def langchain_app(): + # LangChain will automatically use OpenTelemetry to send traces to LangSmith # because the LANGSMITH_OTEL_ENABLED environment variable is set diff --git a/api/oss/tests/manual/tracing/windowing.http b/api/oss/tests/manual/tracing/windowing.http index cad4ae83ad..5956e7d6a2 100644 --- a/api/oss/tests/manual/tracing/windowing.http +++ b/api/oss/tests/manual/tracing/windowing.http @@ -1,6 +1,6 @@ @host = http://localhost @base_url = {{host}}/api/preview/tracing -@api_key = ... +@api_key = UGZaImq8.a94d2c99eab827b1cd27678358016a61f2e92c2cdea8f33b1cf3cc2afb7065e8 ### diff --git a/api/oss/tests/manual/workflows/artifacts.http b/api/oss/tests/manual/workflows/artifacts.http index d5e3f24693..e162c506b1 100644 --- a/api/oss/tests/manual/workflows/artifacts.http +++ b/api/oss/tests/manual/workflows/artifacts.http @@ -1,102 +1,108 @@ -@host = http://localhost -@token = change-me +@host = http://localhost/api +@api_key = xxxxxxx.xxxxxxxxxxxxxxxxxxxxxx +@token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @base_url = {{host}}/api/preview/workflows ### # @name create_account -POST {{host}}/api/admin/account +POST {{host}}/admin/account Content-Type: application/json Authorization: Access {{token}} -### +### @user_id = {{create_account.response.body.user.id}} @authorization = {{create_account.response.body.scopes[0].credentials}} - ### -# @name create_workflow -POST {{base_url}}/ +# @name add_workflow_artifact +POST {{base_url}}/artifacts/ Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { - "workflow": { - "slug": "workflow-{{$guid}}", - "name": "Workflow {{$guid}}", - "description": "Workflow Description", + "artifact": { + "name": "artifact {{$guid}}", + "description": "artifact description", + "slug": "artifact-{{$guid}}", + "meta": { + "key1": "value", + "key2": "value", + "key3": "value" + }, "flags": { - "is_custom": false, + "is_executable": false, + "is_custom": false, + "is_application": false, "is_evaluator": false, - "is_human": false - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3" - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3" + "is_auto": false, + "is_human": false, + "is_for_members": false, + "is_for_endusers": false } } } ### -@workflow_id = {{create_workflow.response.body.workflow.id}} -@workflow_slug = {{create_workflow.response.body.workflow.slug}} +@artifact_id = {{add_workflow_artifact.response.body.artifact.id}} +@artifact_slug = {{add_workflow_artifact.response.body.artifact.slug}} ### -# @name fetch_workflow -GET {{base_url}}/{{workflow_id}} +# @name fetch_artifact +GET {{base_url}}/artifacts/{{artifact_id}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} ### -# @name edit_workflow -PUT {{base_url}}/{{workflow_id}} +# @name edit_workflow_artifact +PUT {{base_url}}/artifacts/{{artifact_id}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { - "workflow": { - "id": "{{workflow_id}}", - "name": "Workflow 1 (updated)", - "description": "Workflow description (updated)", + "artifact": { + "id": "{{artifact_id}}", + "slug": "artifact-slug-{{$guid}}", + "name": "artifact 1 (updated)", + "description": "artifact description (updated)", "meta": { "key1": "tag 1", "key2": "tag 2", "key3": "tag 3" }, "flags": { - "is_custom": false, + "is_application": false, "is_evaluator": false, - "is_human": false + "is_executable": false, + "is_custom": false, + "is_auto": false, + "is_human": false, + "is_for_members": false, + "is_for_endusers": false } } } ### # @name archive_workflow_artifact -POST {{base_url}}/{{artifact_id}}/archive +POST {{base_url}}/artifacts/{{artifact_id}}/archive Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} ### # @name unarchive_workflow_artifact -POST {{base_url}}/{{artifact_id}}/unarchive +POST {{base_url}}/artifacts/{{artifact_id}}/unarchive Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} ### query by artifact reference (id) -GET {{base_url}}/?artifact_ref={"id"="{{artifact_id}"}} +GET {{base_url}}/artifacts/?artifact_ref={"id"="{{artifact_id}"}} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} ### query by artifact reference (id) -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "artifact_ref": { @@ -105,14 +111,14 @@ Authorization: {{authorization}} } ### query by artifact reference (slug) -GET {{base_url}}/?artifact_ref={"slug"="{{artifact_slug}}"} +GET {{base_url}}/artifacts/?artifact_ref={"slug"="{{artifact_slug}}"} Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} ### query by artifact reference (slug) -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "artifact_ref": { @@ -121,9 +127,9 @@ Authorization: {{authorization}} } ### query by artifact meta -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "artifact_meta": { @@ -132,9 +138,9 @@ Authorization: {{authorization}} } ### query by artifact flags -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "artifact_flags": { @@ -143,18 +149,18 @@ Authorization: {{authorization}} } ### query all (excluding archived) -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "include_archived": false } ### query all including archived -POST {{base_url}}/query +POST {{base_url}}/artifacts/query Content-Type: application/json -Authorization: {{authorization}} +Authorization: ApiKey {{api_key}} { "include_archived": true diff --git a/api/oss/src/apis/fastapi/evaluations/__init__.py b/api/oss/tests/old_tests/__init__.py similarity index 100% rename from api/oss/src/apis/fastapi/evaluations/__init__.py rename to api/oss/tests/old_tests/__init__.py diff --git a/api/oss/tests/old_tests/conftest.py b/api/oss/tests/old_tests/conftest.py new file mode 100644 index 0000000000..b9de4f8792 --- /dev/null +++ b/api/oss/tests/old_tests/conftest.py @@ -0,0 +1,27 @@ +import pytest +import asyncio + +from oss.src.utils.common import is_oss + +if is_oss(): + from oss.src.tests.engine import test_db_engine as db_engine + + +@pytest.fixture(scope="session", autouse=True) +def event_loop(): + """ + Create an instance of the default event loop for each test case. + """ + + policy = asyncio.get_event_loop_policy() + res = policy.new_event_loop() + asyncio.set_event_loop(res) + res._close = res.close # type: ignore + + yield res + + if is_oss(): + res.run_until_complete(db_engine.remove_db()) # drop database + res.run_until_complete(db_engine.close_db()) # close connections to database + + res._close() # close event loop # type: ignore diff --git a/api/oss/tests/legacy/old_tests/engine.py b/api/oss/tests/old_tests/engine.py similarity index 100% rename from api/oss/tests/legacy/old_tests/engine.py rename to api/oss/tests/old_tests/engine.py diff --git a/api/oss/tests/old_tests/models.py b/api/oss/tests/old_tests/models.py new file mode 100644 index 0000000000..b5f61ef2c2 --- /dev/null +++ b/api/oss/tests/old_tests/models.py @@ -0,0 +1,64 @@ +from typing import List + +from oss.src.utils.common import is_ee + +from oss.src.dbs.postgres.shared.base import Base + +if is_ee(): + from ee.src.models.db_models import ( + APIKeyDB, + WorkspaceDB, + OrganizationDB, + InvitationDB, + OrganizationMemberDB, + WorkspaceMemberDB, + ProjectMemberDB, + AppDB_ as AppDB, + EvaluationDB_ as EvaluationDB, + DeploymentDB_ as DeploymentDB, + HumanEvaluationDB_ as HumanEvaluationDB, + EvaluationScenarioDB_ as EvaluationScenarioDB, + HumanEvaluationScenarioDB_ as HumanEvaluationScenarioDB, + ) +else: + from oss.src.models.db_models import ( + AppDB, + ProjectDB, + EvaluationDB, + DeploymentDB, + HumanEvaluationDB, + EvaluationScenarioDB, + HumanEvaluationScenarioDB, + ) + +from oss.src.models.db_models import ( + UserDB, + TestSetDB, + AppVariantDB, + VariantBaseDB, + AppEnvironmentDB, + EvaluatorConfigDB, + AppVariantRevisionsDB, + AppEnvironmentRevisionDB, +) + +models: List[Base] = [ + AppDB, + UserDB, + ProjectDB, + TestSetDB, + AppVariantDB, + DeploymentDB, + EvaluationDB, + VariantBaseDB, + AppEnvironmentDB, + AppEnvironmentRevisionDB, + EvaluatorConfigDB, + HumanEvaluationDB, + EvaluationScenarioDB, + AppVariantRevisionsDB, + HumanEvaluationScenarioDB, +] + +if is_ee(): + models.extend([OrganizationDB, WorkspaceDB, APIKeyDB, InvitationDB, OrganizationMemberDB, ProjectMemberDB, WorkspaceMemberDB]) # type: ignore diff --git a/api/oss/tests/legacy/old_tests/pytest.ini b/api/oss/tests/old_tests/pytest.ini similarity index 100% rename from api/oss/tests/legacy/old_tests/pytest.ini rename to api/oss/tests/old_tests/pytest.ini diff --git a/api/oss/tests/legacy/old_tests/setenv.py b/api/oss/tests/old_tests/setenv.py similarity index 100% rename from api/oss/tests/legacy/old_tests/setenv.py rename to api/oss/tests/old_tests/setenv.py diff --git a/api/oss/tests/legacy/old_tests/unit/test_evaluators.py b/api/oss/tests/old_tests/unit/test_evaluators.py similarity index 100% rename from api/oss/tests/legacy/old_tests/unit/test_evaluators.py rename to api/oss/tests/old_tests/unit/test_evaluators.py diff --git a/api/oss/tests/legacy/old_tests/unit/test_llm_apps_service.py b/api/oss/tests/old_tests/unit/test_llm_apps_service.py similarity index 99% rename from api/oss/tests/legacy/old_tests/unit/test_llm_apps_service.py rename to api/oss/tests/old_tests/unit/test_llm_apps_service.py index af2757cf09..6e5a0905b3 100644 --- a/api/oss/tests/legacy/old_tests/unit/test_llm_apps_service.py +++ b/api/oss/tests/old_tests/unit/test_llm_apps_service.py @@ -46,7 +46,6 @@ def invoke_app_side_effect( result=Result(type="text", value="Success", error=None), latency=0.1, cost=0.01, - tokens=1, ) mock_invoke_app.side_effect = invoke_app_side_effect diff --git a/api/oss/tests/legacy/old_tests/unit/test_traces.py b/api/oss/tests/old_tests/unit/test_traces.py similarity index 100% rename from api/oss/tests/legacy/old_tests/unit/test_traces.py rename to api/oss/tests/old_tests/unit/test_traces.py diff --git a/api/oss/tests/old_tests/variants_main_router/conftest.py b/api/oss/tests/old_tests/variants_main_router/conftest.py new file mode 100644 index 0000000000..e363aec1a7 --- /dev/null +++ b/api/oss/tests/old_tests/variants_main_router/conftest.py @@ -0,0 +1,383 @@ +import os +import pytest +from datetime import datetime, timezone + +import httpx +from sqlalchemy.future import select + +from oss.src.utils.env import env +from oss.src.utils.logging import get_module_logger +from oss.src.models.shared_models import ConfigDB +from oss.src.models.db_models import ( + ProjectDB, + UserDB, +) +from oss.src.tests.unit.test_traces import ( + simple_rag_trace, + simple_finance_assisstant_trace, +) +from oss.src.resources.evaluators.evaluators import get_all_evaluators + +from oss.src.dbs.postgres.shared.engine import engine + +log = get_module_logger(__name__) + +# Set global variables +OPEN_AI_KEY = env.OPENAI_API_KEY +BACKEND_API_HOST = env.AGENTA_HOST + "/api" + + +@pytest.fixture() +async def get_first_user_object(): + """Get the user object from the database or create a new one if not found.""" + + async with engine.core_session() as session: + result = await session.execute(select(UserDB).filter_by(uid="0")) + user = result.scalars().first() + if user is None: + create_user = UserDB(uid="0") + session.add(create_user) + await session.commit() + await session.refresh(create_user) + return create_user + return user + + +@pytest.fixture() +async def get_second_user_object(): + """Create a second user object.""" + + async with engine.core_session() as session: + result = await session.execute(select(UserDB).filter_by(uid="1")) + user = result.scalars().first() + if user is None: + create_user = UserDB( + uid="1", username="test_user1", email="test_user1@email.com" + ) + session.add(create_user) + await session.commit() + await session.refresh(create_user) + return create_user + return user + + +@pytest.fixture() +async def get_or_create_project_from_db(): + async with engine.core_session() as session: + result = await session.execute( + select(ProjectDB).filter_by(project_name="default", is_default=True) + ) + project = result.scalars().first() + if project is None: + create_project = ProjectDB(project_name="default", is_default=True) + session.add(create_project) + await session.commit() + await session.refresh(create_project) + return create_project + return project + + +@pytest.fixture(scope="session") +async def fetch_user(): + async with engine.core_session() as session: + result = await session.execute(select(UserDB).filter_by(uid="0")) + user = result.scalars().first() + return user + + +@pytest.fixture() +def app_variant_create_data(): + return { + "variant_name": "v1", + "parameters": {}, + "created_at": datetime.now(timezone.utc), + "updated_at": datetime.now(timezone.utc), + } + + +@pytest.fixture(scope="session") +def use_open_ai_key(): + return OPEN_AI_KEY + + +@pytest.fixture() +def update_app_variant_parameters(): + return { + "temperature": 1, + "model": "gpt-3.5-turbo", + "max_tokens": -1, + "prompt_system": "You are an expert in geography.", + "prompt_user": "What is the capital of {country}?", + "top_p": 1, + "frequence_penalty": 0, + "presence_penalty": 0, + } + + +@pytest.fixture() +def app_variant_parameters_updated(): + return { + "parameters": { + "temperature": 1.43, + "model": "gpt-3.5-turbo", + "max_tokens": 1182, + "prompt_system": "You are an expert in geography. Answer in Japanese.", + "prompt_user": "What is the capital of {country}?", + "top_p": 1, + "frequence_penalty": 1.4, + "presence_penalty": 1.25, + "force_json": 0, + } + } + + +@pytest.fixture() +def evaluators_requiring_llm_keys(): + evaluators_requiring_llm_keys = [ + evaluator["key"] + for evaluator in get_all_evaluators() + if evaluator.get("requires_llm_api_keys", False) + or ( + evaluator.get("settings_template", {}) + .get("requires_llm_api_keys", {}) + .get("default", False) + ) + ] + return evaluators_requiring_llm_keys + + +@pytest.fixture() +def auto_exact_match_evaluator_config(): + return { + "app_id": "string", + "name": "ExactMatchEvaluator", + "evaluator_key": "auto_exact_match", + "settings_values": {}, + } + + +@pytest.fixture() +def auto_similarity_match_evaluator_config(): + return { + "app_id": "string", + "name": "SimilarityMatchEvaluator", + "evaluator_key": "auto_similarity_match", + "settings_values": {"similarity_threshold": 0.3}, + } + + +@pytest.fixture() +def auto_regex_test_evaluator_config(): + return { + "app_id": "string", + "name": "RegexEvaluator", + "evaluator_key": "auto_regex_test", + "settings_values": { + "regex_pattern": "^value\\d{3}$", + "regex_should_match": False, + }, + } + + +@pytest.fixture() +def auto_webhook_test_evaluator_config(): + return { + "app_id": "string", + "name": "WebhookEvaluator", + "evaluator_key": "auto_webhook_test", + "settings_values": { + "webhook_url": f"{BACKEND_API_HOST}/evaluations/webhook_example_fake/", + "webhook_body": {}, + }, + } + + +@pytest.fixture() +def auto_ai_critique_evaluator_config(): + return { + "app_id": "string", + "name": "AICritique_Evaluator", + "evaluator_key": "auto_ai_critique", + "settings_values": { + "open_ai_key": OPEN_AI_KEY, + "temperature": 0.9, + "prompt_template": "We have an LLM App that we want to evaluate its outputs. Based on the prompt and the parameters provided below evaluate the output based on the evaluation strategy below: Evaluation strategy: 0 to 10 0 is very bad and 10 is very good. Prompt: {llm_app_prompt_template} Inputs: country: {country} Correct Answer:{correct_answer} Evaluate this: {variant_output} Answer ONLY with one of the given grading or evaluation options.", + }, + } + + +@pytest.fixture() +def deploy_to_environment_payload(): + return {"environment_name": "string", "variant_id": "string"} + + +@pytest.fixture() +def rag_experiment_data_tree(): + return simple_rag_trace + + +@pytest.fixture() +def simple_experiment_data_tree(): + return simple_finance_assisstant_trace + + +@pytest.fixture() +def mapper_to_run_auto_exact_match_evaluation(): + return { + "prediction": "diversify.reporter.outputs.report[0]", + } + + +@pytest.fixture() +def mapper_to_run_rag_faithfulness_evaluation(): + return { + "question": "rag.retriever.internals.prompt", + "contexts": "rag.retriever.outputs.movies", + "answer": "rag.reporter.outputs.report", + } + + +@pytest.fixture() +def rag_faithfulness_evaluator_run_inputs(): + return { + "question_key": "List 6 movies about witches in the genre of fiction.", + "contexts_key": [ + "The Craft (1996) in ['Drama', 'Fantasy', 'Horror']: A newcomer to a Catholic prep high school falls in with a trio of outcast teenage girls who practice witchcraft and they all soon conjure up various spells and curses against those who even slightly anger them.", + "Oz the Great and Powerful (2013) in ['Adventure', 'Family', 'Fantasy']: A small-time magician is swept away to an enchanted land and is forced into a power struggle between three witches.", + "Snow White: A Tale of Terror (1997) in ['Fantasy', 'Horror']: In this dark take on the fairy tale, the growing hatred of a noblewoman, secretly a practitioner of the dark arts, for her stepdaughter, and the witch's horrifying attempts to kill her.", + "Into the Woods (2014) in ['Adventure', 'Fantasy', 'Musical']: A witch tasks a childless baker and his wife with procuring magical items from classic fairy tales to reverse the curse put on their family tree.", + "Wicked Stepmother (1989) in ['Comedy', 'Fantasy']: A mother/daughter pair of witches descend on a yuppie family's home and cause havoc, one at a time since they share one body & the other must live in a cat the rest of the time. Now it's up...", + "Hocus Pocus (1993) in ['Comedy', 'Family', 'Fantasy']: After three centuries, three witch sisters are resurrected in Salem Massachusetts on Halloween night, and it is up to two teen-agers, a young girl, and an immortal cat to put an end to the witches' reign of terror once and for all.", + "Warlock (1989) in ['Action', 'Fantasy', 'Horror']: A warlock flees from the 17th to the 20th century, with a witch-hunter in hot pursuit.", + "The Hexer (2001) in ['Adventure', 'Fantasy']: The adventures of Geralt of Rivea, \"The Witcher\".", + "Heavy Metal (1981) in ['Animation', 'Adventure', 'Fantasy']: A glowing orb terrorizes a young girl with a collection of stories of dark fantasy, eroticism and horror.", + ], + "answer_key": 'Witches in fiction are depicted through a mix of horror, fantasy, and dark comedy. \n\n"The Craft" (1996) delves into the complexities of teenage witchcraft, showcasing both empowerment and the darker repercussions of their actions. \n"Snow White: A Tale of Terror" (1997) offers a sinister twist on the classic story, highlighting the witch\'s envy and vengeful nature. \n"Hocus Pocus" (1993) delivers a comedic and adventurous take on witchcraft, as three resurrected witches wreak havoc in contemporary Salem', + } + + +@pytest.fixture() +def custom_code_snippet(): + return "from typing import Dict\nfrom random import uniform\n\ndef evaluate(\n app_params: Dict[str, str],\n inputs: Dict[str, str],\n output: str, # output of the llm app\n datapoint: Dict[str, str] # contains the testset row\n) -> float:\n return uniform(0.1, 0.9)" + + +@pytest.fixture() +def evaluators_payload_data(custom_code_snippet): + prompt_template = "We have an LLM App that we want to evaluate its outputs. Based on the prompt and the parameters provided below evaluate the output based on the evaluation strategy below:\nEvaluation strategy: 0 to 10 0 is very bad and 10 is very good.\nPrompt: {llm_app_prompt_template}\nInputs: country: {country}\nExpected Answer Column:{correct_answer}\nEvaluate this: {variant_output}\n\nAnswer ONLY with one of the given grading or evaluation options." + return { + "auto_regex_test": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": { + "regex_pattern": r"The\s+answer\s+is\s+42[.,]?", + "regex_should_match": True, + }, + }, + "field_match_test": { + "inputs": { + "ground_truth": {"message": "The correct answer is 42"}, + "prediction": '{"message": "The correct answer is 42"}', + }, + "settings": {"json_field": "ground_truth"}, + }, + "auto_custom_code_run": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + "app_config": {}, + }, + "settings": { + "code": custom_code_snippet, + "correct_answer_key": "correct_answer", + }, + }, + "auto_ai_critique": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": { + "prompt_template": prompt_template, + "correct_answer_key": "correct_answer", + }, + "credentials": {"OPENAI_API_KEY": env.OPENAI_API_KEY}, + }, + "auto_starts_with": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"prefix": "The", "case_sensitive": False}, + }, + "auto_ends_with": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"suffix": "42", "case_sensitive": False}, + }, + "auto_contains": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"substring": "answer is", "case_sensitive": False}, + }, + "auto_contains_any": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"substrings": "The,answer,42", "case_sensitive": False}, + }, + "auto_contains_all": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"substrings": "The,answer,is,42", "case_sensitive": False}, + }, + "auto_contains_json": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": '{"message": "The answer is 42"}', + }, + }, + "auto_json_diff": { + "inputs": { + "ground_truth": '{"message": "The correct answer is 42"}', + "prediction": '{"message": "The answer is 42"}', + }, + "settings": { + "compare_schema_only": True, + "predict_keys": True, + "case_insensitive_keys": False, + }, + }, + "auto_levenshtein_distance": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": {"threshold": 0.4}, + }, + "auto_similarity_match": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "settings": { + "similarity_threshold": 0.4, + "correct_answer_key": "correct_answer", + }, + }, + "auto_semantic_similarity": { + "inputs": { + "ground_truth": "The correct answer is 42", + "prediction": "The answer is 42", + }, + "credentials": {"OPENAI_API_KEY": env.OPENAI_API_KEY}, + }, + } diff --git a/api/oss/tests/legacy/old_tests/variants_main_router/test_app_variant_router.py b/api/oss/tests/old_tests/variants_main_router/test_app_variant_router.py similarity index 100% rename from api/oss/tests/legacy/old_tests/variants_main_router/test_app_variant_router.py rename to api/oss/tests/old_tests/variants_main_router/test_app_variant_router.py diff --git a/api/oss/tests/legacy/old_tests/variants_main_router/test_variant_evaluators_router.py b/api/oss/tests/old_tests/variants_main_router/test_variant_evaluators_router.py similarity index 99% rename from api/oss/tests/legacy/old_tests/variants_main_router/test_variant_evaluators_router.py rename to api/oss/tests/old_tests/variants_main_router/test_variant_evaluators_router.py index 90e18ea27f..d533831f81 100644 --- a/api/oss/tests/legacy/old_tests/variants_main_router/test_variant_evaluators_router.py +++ b/api/oss/tests/old_tests/variants_main_router/test_variant_evaluators_router.py @@ -9,7 +9,7 @@ from oss.src.models.api.evaluation_model import EvaluationStatusEnum from oss.src.models.db_models import ( AppDB, - TestsetDB, + TestSetDB, AppVariantDB, EvaluationDB, DeploymentDB, @@ -200,7 +200,7 @@ async def create_evaluation_with_evaluator(evaluator_config_name): app_variant = app_variant_result.scalars().first() testset_result = await session.execute( - select(TestsetDB).filter_by(project_id=app.project_id) + select(TestSetDB).filter_by(project_id=app.project_id) ) testset = testset_result.scalars().first() @@ -267,7 +267,7 @@ async def create_evaluation_with_evaluator(evaluator_config_name): # app_variant = app_variant_result.scalars().first() # testset_result = await session.execute( -# select(TestsetDB).filter_by(project_id=app.project_id) +# select(TestSetDB).filter_by(project_id=app.project_id) # ) # testset = testset_result.scalars().first() diff --git a/api/oss/tests/legacy/old_tests/variants_main_router/test_variant_testset_router.py b/api/oss/tests/old_tests/variants_main_router/test_variant_testset_router.py similarity index 95% rename from api/oss/tests/legacy/old_tests/variants_main_router/test_variant_testset_router.py rename to api/oss/tests/old_tests/variants_main_router/test_variant_testset_router.py index ab129bcac2..bd6994d65e 100644 --- a/api/oss/tests/legacy/old_tests/variants_main_router/test_variant_testset_router.py +++ b/api/oss/tests/old_tests/variants_main_router/test_variant_testset_router.py @@ -6,7 +6,7 @@ from oss.src.models.db_models import ( AppDB, - TestsetDB, + TestSetDB, ) from oss.src.dbs.postgres.shared.engine import engine @@ -63,7 +63,7 @@ async def test_update_testset(): app = result.scalars().first() testset_result = await session.execute( - select(TestsetDB).filter_by(project_id=app.project_id) + select(TestSetDB).filter_by(project_id=app.project_id) ) testset = testset_result.scalars().first() @@ -111,7 +111,7 @@ async def test_get_testset(): app = result.scalars().first() testset_result = await session.execute( - select(TestsetDB).filter_by(project_id=app.project_id) + select(TestSetDB).filter_by(project_id=app.project_id) ) testset = testset_result.scalars().first() @@ -133,7 +133,7 @@ async def test_delete_testsets(): app = result.scalars().first() testset_result = await session.execute( - select(TestsetDB).filter_by(project_id=app.project_id) + select(TestSetDB).filter_by(project_id=app.project_id) ) testsets = testset_result.scalars().all() diff --git a/api/oss/tests/legacy/old_tests/variants_main_router/test_variant_versioning_deployment.py b/api/oss/tests/old_tests/variants_main_router/test_variant_versioning_deployment.py similarity index 100% rename from api/oss/tests/legacy/old_tests/variants_main_router/test_variant_versioning_deployment.py rename to api/oss/tests/old_tests/variants_main_router/test_variant_versioning_deployment.py diff --git a/api/oss/tests/legacy/old_tests/variants_user_profile_router/test_user_profile.py b/api/oss/tests/old_tests/variants_user_profile_router/test_user_profile.py similarity index 100% rename from api/oss/tests/legacy/old_tests/variants_user_profile_router/test_user_profile.py rename to api/oss/tests/old_tests/variants_user_profile_router/test_user_profile.py diff --git a/api/oss/tests/legacy/pytest.ini b/api/oss/tests/pytest.ini similarity index 100% rename from api/oss/tests/legacy/pytest.ini rename to api/oss/tests/pytest.ini diff --git a/api/oss/tests/pytest/__init_.py b/api/oss/tests/pytest/__init_.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/api/oss/tests/pytest/annotations/test_annotations_basics.py b/api/oss/tests/pytest/annotations/test_annotations_basics.py deleted file mode 100644 index 798a0862b4..0000000000 --- a/api/oss/tests/pytest/annotations/test_annotations_basics.py +++ /dev/null @@ -1,260 +0,0 @@ -from uuid import uuid4 - - -class TestAnnotationsBasics: - def test_create_annotations(self, authed_api): - # ACT ------------------------------------------------------------------ - evaluator_slug = str(uuid4()) - - annotation_data_outputs = { - "integer": 42, - "float": 3.14, - "string": "Hello, world!", - "boolean": True, - "array": [1], - "object": {"aloha": "mahalo"}, - } - - annotation_links = { - "invocation": { - "trace_id": "019688a5e2097b80ad12e2907b83e9fc", - "span_id": "25a8e0b9bbf37d30", - } - } - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "data": { - "outputs": annotation_data_outputs, - }, - "tags": {"tag1": "value1", "tag2": "value2"}, - "meta": {"meta1": "value1", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug}}, - "links": annotation_links, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["annotation"]["data"]["outputs"] == annotation_data_outputs - assert ( - response["annotation"]["references"]["evaluator"]["slug"] == evaluator_slug - ) - assert response["annotation"]["links"] == annotation_links - # ---------------------------------------------------------------------- - - def test_fetch_annotations(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = str(uuid4()) - - annotation_data_outputs = { - "integer": 42, - "float": 3.14, - "string": "Hello, world!", - "boolean": True, - "array": [1], - "object": {"aloha": "mahalo"}, - } - - annotation_links = { - "invocation": { - "trace_id": "019688a5e2097b80ad12e2907b83e9fc", - "span_id": "25a8e0b9bbf37d30", - } - } - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "data": { - "outputs": annotation_data_outputs, - }, - "tags": {"tag1": "value1", "tag2": "value2"}, - "meta": {"meta1": "value1", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug}}, - "links": annotation_links, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - trace_id = response["annotation"]["trace_id"] - span_id = response["annotation"]["span_id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/annotations/{trace_id}/{span_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["annotation"]["trace_id"] == trace_id - assert response["annotation"]["span_id"] == span_id - assert response["annotation"]["data"]["outputs"] == annotation_data_outputs - assert ( - response["annotation"]["references"]["evaluator"]["slug"] == evaluator_slug - ) - assert response["annotation"]["links"] == annotation_links - - def test_edit_annotations(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = str(uuid4()) - - annotation_data_outputs = { - "integer": 42, - "float": 3.14, - "string": "Hello, world!", - "boolean": True, - "array": [1], - "object": {"aloha": "mahalo"}, - } - - annotation_links = { - "invocation": { - "trace_id": "019688a5e2097b80ad12e2907b83e9fc", - "span_id": "25a8e0b9bbf37d30", - } - } - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "data": { - "outputs": annotation_data_outputs, - }, - "tags": {"tag1": "value1", "tag2": "value2"}, - "meta": {"meta1": "value1", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug}}, - "links": annotation_links, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - trace_id = response["annotation"]["trace_id"] - span_id = response["annotation"]["span_id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - new_annotation_data_outputs = { - **annotation_data_outputs, - "new_field": 12345, - } - - response = authed_api( - "PATCH", - f"/preview/annotations/{trace_id}/{span_id}", - json={ - "annotation": { - "data": { - "outputs": new_annotation_data_outputs, - }, - "tags": {"tag3": "value3"}, - "meta": {"meta3": "value3"}, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["annotation"]["trace_id"] == trace_id - assert response["annotation"]["span_id"] == span_id - assert response["annotation"]["data"]["outputs"] == new_annotation_data_outputs - assert response["annotation"]["links"] == annotation_links - assert response["annotation"]["tags"] == {"tag3": "value3"} - assert response["annotation"]["meta"] == {"meta3": "value3"} - # ---------------------------------------------------------------------- - - def test_delete_annotations(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = str(uuid4()) - - annotation_data_outputs = { - "integer": 42, - "float": 3.14, - "string": "Hello, world!", - "boolean": True, - "array": [1], - "object": {"aloha": "mahalo"}, - } - - annotation_links = { - "invocation": { - "trace_id": "019688a5e2097b80ad12e2907b83e9fc", - "span_id": "25a8e0b9bbf37d30", - } - } - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "data": { - "outputs": annotation_data_outputs, - }, - "tags": {"tag1": "value1", "tag2": "value2"}, - "meta": {"meta1": "value1", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug}}, - "links": annotation_links, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - trace_id = response["annotation"]["trace_id"] - span_id = response["annotation"]["span_id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/annotations/{trace_id}/{span_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["annotation_link"]["trace_id"] == trace_id - assert response["annotation_link"]["span_id"] == span_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/annotations/{trace_id}/{span_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/annotations/test_annotations_queries.py b/api/oss/tests/pytest/annotations/test_annotations_queries.py deleted file mode 100644 index 704074ea28..0000000000 --- a/api/oss/tests/pytest/annotations/test_annotations_queries.py +++ /dev/null @@ -1,535 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ACT ------------------------------------------------------------------ - evaluator_slug_1 = str(uuid4()) - - trace_id_1 = uuid4().hex - span_id_1 = uuid4().hex[16:] - trace_id_2 = uuid4().hex - span_id_2 = uuid4().hex[16:] - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "origin": "custom", - "kind": "adhoc", - "channel": "api", - "data": { - "outputs": { - "integer": 42, - "float": 3.14, - "string": "Hello, world!", - "boolean": True, - "array": [1], - "object": {"aloha": "mahalo"}, - }, - }, - "tags": {"tag1": "value1", "tag2": "value2"}, - "meta": {"meta1": "value1", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug_1}}, - "links": { - "invocation": { - "trace_id": trace_id_1, - "span_id": span_id_1, - } - }, - } - }, - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_1_link = { - "trace_id": response.json()["annotation"]["trace_id"], - "span_id": response.json()["annotation"]["span_id"], - } - - response = authed_api( - "GET", - f"/preview/annotations/{annotation_1_link['trace_id']}/{annotation_1_link['span_id']}", - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_1_data = response.json()["annotation"] - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "origin": "human", - "kind": "eval", - "channel": "web", - "data": { - "outputs": { - "integer": 43, - "float": 2.71, - "string": "Goodbye, world!", - "boolean": False, - "array": [2], - "object": {"aloha": "mahalo"}, - }, - }, - "tags": {"tag1": "value1", "tag2": "value3"}, - "meta": {"meta1": "value1", "meta2": "value3"}, - "references": {"evaluator": {"slug": evaluator_slug_1}}, - "links": { - "invocation": { - "trace_id": trace_id_2, - "span_id": span_id_2, - } - }, - } - }, - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_2_link = { - "trace_id": response.json()["annotation"]["trace_id"], - "span_id": response.json()["annotation"]["span_id"], - } - - response = authed_api( - "GET", - f"/preview/annotations/{annotation_2_link['trace_id']}/{annotation_2_link['span_id']}", - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_2_data = response.json()["annotation"] - - evaluator_slug_2 = str(uuid4()) - - response = authed_api( - "POST", - "/preview/annotations/", - json={ - "annotation": { - "origin": "auto", - "kind": "eval", - "channel": "sdk", - "data": { - "outputs": { - "integer": 44, - "float": 1.41, - "string": "Hello again, world!", - "boolean": True, - "array": [3], - "object": {"aloha": "mahalo"}, - }, - }, - "tags": {"tag1": "value3", "tag2": "value2"}, - "meta": {"meta1": "value3", "meta2": "value2"}, - "references": {"evaluator": {"slug": evaluator_slug_2}}, - "links": { - "invocation": { - "trace_id": trace_id_1, - "span_id": span_id_1, - } - }, - } - }, - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_3_link = { - "trace_id": response.json()["annotation"]["trace_id"], - "span_id": response.json()["annotation"]["span_id"], - } - - response = authed_api( - "GET", - f"/preview/annotations/{annotation_3_link['trace_id']}/{annotation_3_link['span_id']}", - ) - - assert response.status_code == 200 - assert response.json()["count"] == 1 - - annotation_3_data = response.json()["annotation"] - # ---------------------------------------------------------------------- - - _mock_data = { - "annotations": [ - annotation_1_data, - annotation_2_data, - annotation_3_data, - ], - "annotation_links": [ - annotation_1_link, - annotation_2_link, - annotation_3_link, - ], - } - - return _mock_data - - -class TestAnnotationsQueries: - def test_query_annotations_all(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_annotation_link(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - annotation_link_1 = mock_data["annotation_links"][0] - - response = authed_api( - "POST", - "/preview/annotations/query", - json={ - "annotation_links": [annotation_link_1], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - print(response) - assert response["count"] == 1 - assert response["annotations"][0]["trace_id"] == annotation_link_1["trace_id"] - assert response["annotations"][0]["span_id"] == annotation_link_1["span_id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - annotation_link_2 = mock_data["annotation_links"][1] - annotation_link_3 = mock_data["annotation_links"][2] - - response = authed_api( - "POST", - "/preview/annotations/query", - json={ - "annotation_links": [annotation_link_2, annotation_link_3], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - # ---------------------------------------------------------------------- - - def test_query_annotations_by_link(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - annotation = mock_data["annotations"][0] - - response = authed_api( - "POST", - "/preview/annotations/query", - json={ - "annotation": { - "links": { - "invocation": annotation["links"]["invocation"], - } - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - annotation = mock_data["annotations"][0] - - response = authed_api( - "POST", - "/preview/annotations/query", - json={ - "annotation": { - "links": [annotation["links"]["invocation"]], - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_reference(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - evaluator_slug = mock_data["annotations"][0]["references"]["evaluator"]["slug"] - - response = authed_api( - "POST", - "/preview/annotations/query", - json={ - "annotation": { - "references": { - "evaluator": {"slug": evaluator_slug}, - } - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_tags(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"tags": {"tag1": "value1"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"tags": {"tag2": "value2"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"tags": {"tag1": "value3"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"tags": {"tag2": "value3"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_meta(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"meta": {"meta1": "value1"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"meta": {"meta2": "value2"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"meta": {"meta1": "value3"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"meta": {"meta2": "value3"}}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_origin(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"origin": "custom"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"origin": "human"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"origin": "auto"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_kind(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"kind": "adhoc"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"kind": "eval"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_annotations_by_channel(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"channel": "api"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"channel": "web"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/annotations/query", - json={"annotation": {"channel": "sdk"}}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/conftest.py b/api/oss/tests/pytest/conftest.py deleted file mode 100644 index 5eaa0f1e29..0000000000 --- a/api/oss/tests/pytest/conftest.py +++ /dev/null @@ -1,12 +0,0 @@ -import pytest - -from utils.env import ag_env -from utils.api import ( - authed_api, - unauthed_api, -) -from utils.accounts import ( - foo_account, - cls_account, - mod_account, -) diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_metrics_basics.py b/api/oss/tests/pytest/evaluations/test_evaluation_metrics_basics.py deleted file mode 100644 index 900608f0fa..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_metrics_basics.py +++ /dev/null @@ -1,365 +0,0 @@ -class TestEvaluationMetricsBasics: - def test_create_evaluation_metrics(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_evaluation_metrics(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - assert response.status_code == 200 - - metrics = response.json()["metrics"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - metrics[0]["data"]["integer_metric"] = 84 - metrics[0]["data"]["float_metric"] = 6.28 - metrics[0]["data"]["string_metric"] = "updated_test" - metrics[0]["data"]["boolean_metric"] = False - - response = authed_api( - "PATCH", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["metrics"][0]["data"]["integer_metric"] == 84 - assert response["metrics"][0]["data"]["float_metric"] == 6.28 - assert response["metrics"][0]["data"]["string_metric"] == "updated_test" - assert response["metrics"][0]["data"]["boolean_metric"] is False - # ---------------------------------------------------------------------- - - def test_delete_evaluation_metrics(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - assert response.status_code == 200 - - metrics = response.json()["metrics"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/metrics/", - json={"metrics_ids": [metrics[0]["id"]]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["metrics_ids"][0] == metrics[0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/metrics/", - json={"metrics_ids": [metrics[0]["id"]]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_metric(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - assert response.status_code == 200 - - response = response.json() - metric = response["metrics"][0] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/metrics/{metric['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - print(response) - assert response["count"] == 1 - assert response["metric"]["id"] == metric["id"] - assert response["metric"]["data"]["integer_metric"] == 42 - assert response["metric"]["data"]["float_metric"] == 3.14 - assert response["metric"]["data"]["string_metric"] == "test" - assert response["metric"]["data"]["boolean_metric"] is True - # ---------------------------------------------------------------------- - - def test_edit_evaluation_metric(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - assert response.status_code == 200 - - response = response.json() - metric = response["metrics"][0] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - metric["data"]["integer_metric"] = 84 - metric["data"]["float_metric"] = 6.28 - metric["data"]["string_metric"] = "updated_test" - metric["data"]["boolean_metric"] = False - - response = authed_api( - "PATCH", - "/preview/evaluations/metrics/", - json={"metrics": [metric]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["metrics"][0]["id"] == metric["id"] - assert response["metrics"][0]["data"]["integer_metric"] == 84 - assert response["metrics"][0]["data"]["float_metric"] == 6.28 - assert response["metrics"][0]["data"]["string_metric"] == "updated_test" - assert response["metrics"][0]["data"]["boolean_metric"] is False - - def test_delete_evaluation_metric(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - metrics = [ - { - "run_id": run_id, - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - assert response.status_code == 200 - - response = response.json() - metric = response["metrics"][0] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/metrics/", - json={"metrics_ids": [metric["id"]]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["metrics_ids"][0] == metric["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/metrics/", - json={"metrics_ids": [metric["id"]]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_metrics_queries.py b/api/oss/tests/pytest/evaluations/test_evaluation_metrics_queries.py deleted file mode 100644 index 8c604f564d..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_metrics_queries.py +++ /dev/null @@ -1,268 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [{}, {}]}, - ) - assert response.status_code == 200 - - response = response.json() - - runs = response["runs"] - - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - metrics = [ - { - "run_id": runs[0]["id"], - "status": "success", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - "tags": tags, - "meta": meta, - }, - { - "run_id": runs[1]["id"], - "status": "failure", - "data": { - "integer_metric": 42, - "float_metric": 3.14, - "string_metric": "test", - "boolean_metric": True, - }, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/metrics/", - json={"metrics": metrics}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - - metrics = response["metrics"] - # -------------------------------------------------------------------------- - - _mock_data = { - "runs": runs, - "metrics": metrics, - } - - return _mock_data - - -class TestEvaluationMetricsQueries: - def test_query_metrics_by_ids(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - metrics_ids = [metric["id"] for metric in metrics] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "ids": metrics_ids, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_tags(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - metrics_ids = [metric["id"] for metric in metrics] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "tags": { - "tags1": "value1", - "tags2": "value2", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_meta(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - metrics_ids = [metric["id"] for metric in metrics] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "meta": { - "meta1": "value1", - "meta2": "value2", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_status(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - metrics_ids = [ - metric["id"] for metric in metrics if metric["status"] == "success" - ] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "status": "success", - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_statuses(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - metrics_ids = [ - metric["id"] - for metric in metrics - if metric["status"] in ["success", "failure"] - ] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "statuses": ["success", "failure"], - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_run_id(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - run_id = metrics[0]["run_id"] - metrics_ids = [metric["id"] for metric in metrics if metric["run_id"] == run_id] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "run_id": run_id, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- - - def test_query_metrics_by_run_ids(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - metrics = mock_data["metrics"] - run_ids = [metrics[0]["run_id"], metrics[1]["run_id"]] - metrics_ids = [ - metric["id"] for metric in metrics if metric["run_id"] in run_ids - ] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/metrics/query", - json={ - "metric": { - "run_ids": run_ids, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert all(metric["id"] in metrics_ids for metric in response["metrics"]) - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_runs_basics.py b/api/oss/tests/pytest/evaluations/test_evaluation_runs_basics.py deleted file mode 100644 index 75a004e236..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_runs_basics.py +++ /dev/null @@ -1,557 +0,0 @@ -from uuid import uuid4 - - -class TestEvaluationRunsBasics: - def test_create_evaluation_runs(self, authed_api): - # ACT ------------------------------------------------------------------ - testset_id = str(uuid4()) - testset_variant_id = str(uuid4()) - testset_revision_id = str(uuid4()) - - application_id = str(uuid4()) - application_variant_id = str(uuid4()) - application_revision_id = str(uuid4()) - - evaluator_id = str(uuid4()) - evaluator_variant_id = str(uuid4()) - evaluator_revision_id = str(uuid4()) - - steps = [ - { - "key": "input", - "is_testcase": True, - "references": { - "testset": {"id": testset_id}, - "testset_variant": {"id": testset_variant_id}, - "testset_revision": {"id": testset_revision_id}, - }, - }, - { - "key": "invocation", - "references": { - "application": {"id": application_id}, - "application_variant": {"id": application_variant_id}, - "application_revision": {"id": application_revision_id}, - }, - "inputs": [ - {"key": "input"}, - ], - }, - { - "key": "annotation", - "references": { - "evaluator": {"id": evaluator_id}, - "evaluator_variant": {"id": evaluator_variant_id}, - "evaluator_revision": {"id": evaluator_revision_id}, - }, - "inputs": [ - {"key": "input"}, - {"key": "invocation"}, - ], - }, - ] - - mappings = [ - { - "kind": "input", - "name": "Country", - "step": {"key": "input", "path": "country"}, - }, - { - "kind": "ground_truth", - "name": "Capital (expected)", - "step": {"key": "input", "path": "correct_answer"}, - }, - { - "kind": "application", - "name": "Capital (actual)", - "step": {"key": "invocation", "path": "data.outputs.answer"}, - }, - { - "kind": "evaluator", - "name": "Score", - "step": {"key": "annotation", "path": "data.outputs.score"}, - }, - { - "kind": "evaluator", - "name": "Confidence", - "step": {"key": "annotation", "path": "data.outputs.confidence"}, - }, - { - "kind": "evaluator", - "name": "Explanation", - "step": {"key": "annotation", "path": "data.outputs.explanation"}, - }, - ] - - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - runs = [ - { - "name": "My evaluation run name", - "description": "My evaluation run description", - "tags": tags, - "meta": meta, - "data": { - "steps": steps, - "mappings": mappings, - }, - } - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["tags"] == tags - assert response["runs"][0]["meta"] == meta - assert response["runs"][0]["status"] == "pending" - assert response["runs"][0]["data"]["steps"] == steps - assert response["runs"][0]["data"]["mappings"] == mappings - # ---------------------------------------------------------------------- - - def test_delete_evaluation_runs(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_delete_evaluation_runs_1"}, - {"name": "test_delete_evaluation_runs_2"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - runs = response["runs"] - assert runs[0]["name"] == "test_delete_evaluation_runs_1" - assert runs[1]["name"] == "test_delete_evaluation_runs_2" - run_id_1 = runs[0]["id"] - run_id_2 = runs[1]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/runs/", - json={ - "run_ids": [run_id_1, run_id_2], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["run_ids"][0] == run_id_1 - assert response["run_ids"][1] == run_id_2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/runs/", - json={ - "run_ids": [run_id_1, run_id_2], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_archive_evaluation_runs(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_archive_evaluation_runs_1"}, - {"name": "test_archive_evaluation_runs_2"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - runs = response["runs"] - assert runs[0]["name"] == "test_archive_evaluation_runs_1" - assert runs[1]["name"] == "test_archive_evaluation_runs_2" - run_id_1 = runs[0]["id"] - run_id_2 = runs[1]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/runs/archive", - json={"run_ids": [run_id_1, run_id_2]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["runs"][0]["id"] == run_id_1 - assert response["runs"][1]["id"] == run_id_2 - # ---------------------------------------------------------------------- - - def test_unarchive_evaluation_runs(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_unarchive_evaluation_runs_1"}, - {"name": "test_unarchive_evaluation_runs_2"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - runs = response["runs"] - assert runs[0]["name"] == "test_unarchive_evaluation_runs_1" - assert runs[1]["name"] == "test_unarchive_evaluation_runs_2" - run_id_1 = runs[0]["id"] - run_id_2 = runs[1]["id"] - - response = authed_api( - "POST", - "/preview/evaluations/runs/archive", - json={"run_ids": [run_id_1, run_id_2]}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/runs/unarchive", - json={"run_ids": [run_id_1, run_id_2]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["runs"][0]["id"] == run_id_1 - assert response["runs"][1]["id"] == run_id_2 - # ---------------------------------------------------------------------- - - def test_close_evaluation_runs(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_close_evaluation_runs_1"}, - {"name": "test_close_evaluation_runs_2"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - runs = response["runs"] - assert runs[0]["name"] == "test_close_evaluation_runs_1" - assert runs[1]["name"] == "test_close_evaluation_runs_2" - run_id_1 = runs[0]["id"] - run_id_2 = runs[1]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/runs/close", - json={"run_ids": [run_id_1, run_id_2]}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["runs"][0]["id"] == run_id_1 - assert response["runs"][1]["id"] == run_id_2 - assert response["runs"][0]["flags"] == {"is_closed": True} - assert response["runs"][1]["flags"] == {"is_closed": True} - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_fetch_evaluation_run"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - run_id = response.json()["runs"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/runs/{run_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - runs = [ - { - "name": "My evaluation run name", - "description": "My evaluation run description", - "tags": tags, - "meta": meta, - } - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - # ---------------------------------------------------------------------- - - tags = { - "tags1": "value2", - "tags2": "value1", - } - - meta = { - "meta1": "value2", - "meta2": "value1", - } - - run = { - "id": run_id, - "name": "test_edit_evaluation_run", - "description": "My edited evaluation run description", - "status": "success", - "tags": tags, - "meta": meta, - } - - # ACT ------------------------------------------------------------------ - response = authed_api( - "PATCH", - f"/preview/evaluations/runs/{run_id}", - json={"run": run}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run"]["status"] == "success" - assert response["run"]["tags"] == tags - assert response["run"]["meta"] == meta - # ---------------------------------------------------------------------- - - def test_delete_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_delete_evaluation_run"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/runs/{run_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run_id"] == run_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/runs/{run_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_archive_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_archive_evaluation_run"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/evaluations/runs/{run_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run"]["id"] == run_id - # ---------------------------------------------------------------------- - - def test_unarchive_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_unarchive_evaluation_run"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - - response = authed_api( - "POST", - f"/preview/evaluations/runs/{run_id}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run"]["id"] == run_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/evaluations/runs/{run_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run"]["id"] == run_id - # ---------------------------------------------------------------------- - - def test_close_evaluation_run(self, authed_api): - # ARRANGE -------------------------------------------------------------- - runs = [ - {"name": "test_close_evaluation_run"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_id = response.json()["runs"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/evaluations/runs/{run_id}/close", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["run"]["id"] == run_id - assert response["run"]["flags"] == {"is_closed": True} - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_runs_queries.py b/api/oss/tests/pytest/evaluations/test_evaluation_runs_queries.py deleted file mode 100644 index 3f31ea6c80..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_runs_queries.py +++ /dev/null @@ -1,295 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - run = { - "name": "My first evaluation run name", - "description": "My first evaluation run description", - "status": "success", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_1 = response.json()["runs"][0] - - # -------------------------------------------------------------------------- - tags = { - "tags1": "value2", - "tags2": "value3", - } - - meta = { - "meta1": "value2", - "meta2": "value3", - } - - run = { - "name": "My second evaluation run name", - "description": "My second evaluation run description", - "status": "pending", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_2 = response.json()["runs"][0] - - # -------------------------------------------------------------------------- - tags = { - "tags1": "value3", - "tags2": "value1", - } - - meta = { - "meta1": "value3", - "meta2": "value1", - } - - run = { - "name": "My third evaluation run name", - "description": "My third evaluation run description", - "status": "failure", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_3 = response.json()["runs"][0] - - response = authed_api( - "POST", - f"/preview/evaluations/runs/{run_3['id']}/archive", - ) - - assert response.status_code == 200 - - # -------------------------------------------------------------------------- - _mock_data = { - "runs": [run_1, run_2, run_3], - } - - return _mock_data - - -class TestEvaluationRunsQueries: - def test_query_evaluations_runs_non_archived(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/runs/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_evaluations_runs_include_archived(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/runs/?include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_evaluations_runs_by_flags(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - flags = { - "is_closed": True, - } - - flags = quote(dumps(flags)) - - response = authed_api( - "GET", - f"/preview/evaluations/runs/?flags={flags}&include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["tags"] == { - "tags1": "value3", - "tags2": "value1", - } - # ---------------------------------------------------------------------- - - def test_query_evaluations_runs_by_tags(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - tags = { - "tags1": "value1", - "tags2": "value2", - } - tags = quote(dumps(tags)) - - response = authed_api( - "GET", - f"/preview/evaluations/runs/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["tags"] == { - "tags1": "value1", - "tags2": "value2", - } - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = { - "tags1": "value2", - "tags2": "value3", - } - tags = quote(dumps(tags)) - response = authed_api( - "GET", - f"/preview/evaluations/runs/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["tags"] == { - "tags1": "value2", - "tags2": "value3", - } - # ---------------------------------------------------------------------- - - def test_query_evaluations_runs_by_meta(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - meta = { - "meta1": "value1", - "meta2": "value2", - } - meta = quote(dumps(meta)) - - response = authed_api( - "GET", - f"/preview/evaluations/runs/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["meta"] == { - "meta1": "value1", - "meta2": "value2", - } - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - meta = { - "meta1": "value2", - "meta2": "value3", - } - meta = quote(dumps(meta)) - response = authed_api( - "GET", - f"/preview/evaluations/runs/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["meta"] == { - "meta1": "value2", - "meta2": "value3", - } - # ---------------------------------------------------------------------- - - def test_query_evaluations_runs_by_status(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/runs/?status=success", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["status"] == "success" - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/runs/?status=pending", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["status"] == "pending" - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/runs/?status=failure&include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["runs"][0]["status"] == "failure" - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_basics.py b/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_basics.py deleted file mode 100644 index af70c28b5f..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_basics.py +++ /dev/null @@ -1,326 +0,0 @@ -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - run = { - "name": "My first evaluation run name", - "description": "My first evaluation run description", - "status": "success", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_1 = response.json()["runs"][0] - # -------------------------------------------------------------------------- - - _mock_data = { - "runs": [run_1], - } - - return _mock_data - - -class TestEvaluationScenariosBasics: - def test_create_evaluation_scenarios(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - run_id = mock_data["runs"][0]["id"] - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [{"run_id": run_id, "tags": tags, "meta": meta}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenarios"][0]["run_id"] == run_id - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_scenarios(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [{"run_id": run_id, "tags": tags, "meta": meta}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_id = response.json()["scenarios"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/{scenario_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenario"]["id"] == scenario_id - assert response["scenario"]["run_id"] == run_id - assert response["scenario"]["tags"] == tags - assert response["scenario"]["meta"] == meta - # ---------------------------------------------------------------------- - - def test_edit_evaluation_scenarios(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [{"run_id": run_id, "tags": tags, "meta": meta}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_id = response.json()["scenarios"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = {"tags1": "value2", "tags2": "value1"} - - meta = {"meta1": "value2", "meta2": "value1"} - - scenario = { - "id": scenario_id, - "tags": tags, - "meta": meta, - "status": "success", - } - - response = authed_api( - "PATCH", - f"/preview/evaluations/scenarios/{scenario_id}", - json={"scenario": scenario}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenario"]["tags"] == tags - assert response["scenario"]["meta"] == meta - # ---------------------------------------------------------------------- - - def test_delete_evaluation_scenarios(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - scenarios = [{"run_id": run_id}, {"run_id": run_id}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_ids = [scenario["id"] for scenario in response.json()["scenarios"]] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/scenarios/", - json={"scenario_ids": scenario_ids}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["scenario_ids"] == scenario_ids - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/scenarios/", - json={"scenario_ids": scenario_ids}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_scenario(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [{"run_id": run_id, "tags": tags, "meta": meta}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_id = response.json()["scenarios"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/{scenario_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenario"]["id"] == scenario_id - assert response["scenario"]["tags"] == tags - assert response["scenario"]["meta"] == meta - # ---------------------------------------------------------------------- - - def test_edit_evaluation_scenario(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [{"run_id": run_id, "tags": tags, "meta": meta}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_id = response.json()["scenarios"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = {"tags1": "value2", "tags2": "value1"} - - meta = {"meta1": "value2", "meta2": "value1"} - - scenario = { - "id": scenario_id, - "tags": tags, - "meta": meta, - "status": "success", - } - - response = authed_api( - "PATCH", - f"/preview/evaluations/scenarios/{scenario_id}", - json={"scenario": scenario}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenario"]["tags"] == tags - assert response["scenario"]["meta"] == meta - # ---------------------------------------------------------------------- - - def test_delete_evaluation_scenario(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - - scenarios = [{"run_id": run_id}] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_id = response.json()["scenarios"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/scenarios/{scenario_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenario_id"] == scenario_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/scenarios/{scenario_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_queries.py b/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_queries.py deleted file mode 100644 index 9969001e22..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_scenarios_queries.py +++ /dev/null @@ -1,292 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - tags = { - "tags1": "value1", - "tags2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - run = { - "name": "My first evaluation run name", - "description": "My first evaluation run description", - "status": "success", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_1 = response.json()["runs"][0] - - # -------------------------------------------------------------------------- - tags = { - "tags1": "value2", - "tags2": "value3", - } - - meta = { - "meta1": "value2", - "meta2": "value3", - } - - run = { - "name": "My second evaluation run name", - "description": "My second evaluation run description", - "status": "pending", - "tags": tags, - "meta": meta, - } - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": [run]}, - ) - assert response.status_code == 200 - - run_2 = response.json()["runs"][0] - - # -------------------------------------------------------------------------- - - tags = {"tags1": "value1", "tags2": "value2"} - - meta = {"meta1": "value1", "meta2": "value2"} - - scenarios = [ - { - "run_id": run_1["id"], - "tags": tags, - "meta": meta, - "status": "success", - } - ] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_1 = response.json()["scenarios"][0] - - # -------------------------------------------------------------------------- - - tags = {"tags1": "value2", "tags2": "value3"} - - meta = {"meta1": "value2", "meta2": "value3"} - - scenarios = [ - { - "run_id": run_2["id"], - "tags": tags, - "meta": meta, - "status": "pending", - } - ] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_2 = response.json()["scenarios"][0] - - # -------------------------------------------------------------------------- - - tags = {"tags1": "value3", "tags2": "value4"} - - meta = {"meta1": "value3", "meta2": "value4"} - - scenarios = [ - { - "run_id": run_2["id"], - "tags": tags, - "meta": meta, - "status": "running", - } - ] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenario_3 = response.json()["scenarios"][0] - - # -------------------------------------------------------------------------- - - _mock_data = { - "runs": [run_1, run_2], - "scenarios": [scenario_1, scenario_2, scenario_3], - } - - return _mock_data - - -class TestEvaluationScenariosQueries: - def test_query_evaluation_scenarios_all(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/scenarios/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - assert len(response["scenarios"]) == 3 - # ---------------------------------------------------------------------- - - def test_query_evaluation_scenarios_by_tags(self, authed_api, mock_data): - # ARRANGE --------------------------------------------------------------- - tags = {"tags1": "value1"} - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/?tags={quote(dumps(tags))}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert len(response["scenarios"]) == 1 - # ---------------------------------------------------------------------- - - def test_query_evaluation_scenarios_by_meta(self, authed_api, mock_data): - # ARRANGE --------------------------------------------------------------- - meta = {"meta1": "value1"} - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/?meta={quote(dumps(meta))}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert len(response["scenarios"]) == 1 - # ---------------------------------------------------------------------- - - def test_query_evaluation_scenarios_by_run_ids(self, authed_api, mock_data): - # ARRANGE --------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/?run_ids={run_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["scenarios"][0]["run_id"] == run_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - run_id = mock_data["runs"][1]["id"] - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/?run_ids={run_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["scenarios"][1]["run_id"] == run_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - run_1_id = mock_data["runs"][0]["id"] - run_2_id = mock_data["runs"][1]["id"] - response = authed_api( - "GET", - f"/preview/evaluations/scenarios/?run_ids={run_1_id}&run_ids={run_2_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_evaluation_scenarios_by_status(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/scenarios/?status=success", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/scenarios/?status=pending", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/scenarios/?status=running", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_steps_basics.py b/api/oss/tests/pytest/evaluations/test_evaluation_steps_basics.py deleted file mode 100644 index c571409dc8..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_steps_basics.py +++ /dev/null @@ -1,437 +0,0 @@ -from uuid import uuid4 - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_1 = response.json()["runs"][0] - - scenarios = [ - {"run_id": run_1["id"]}, - {"run_id": run_1["id"]}, - {"run_id": run_1["id"]}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenarios = response.json()["scenarios"] - # -------------------------------------------------------------------------- - - _mock_data = { - "runs": [run_1], - "scenarios": scenarios, - } - - return _mock_data - - -class TestEvaluationResultsBasics: - def test_create_evaluation_steps(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][0]["id"] - - key = "input" - repeat_id = str(uuid4()) - retry_id = str(uuid4()) - - steps = [ - { - "key": "input", - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["steps"][0]["key"] == key - assert response["steps"][0]["repeat_id"] == repeat_id - assert response["steps"][0]["retry_id"] == retry_id - assert response["steps"][0]["scenario_id"] == scenario_id - assert response["steps"][0]["run_id"] == run_id - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_steps(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][1]["id"] - - key_1 = "input" - key_2 = "invocation" - key_3 = "annotation" - repeat_id = str(uuid4()) - retry_id = str(uuid4()) - - steps = [ - { - "key": key_1, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - { - "key": key_2, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - { - "key": key_3, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/evaluations/results/", - params={"scenario_id": scenario_id}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - assert response["steps"][0]["key"] == key_1 - assert response["steps"][1]["key"] == key_2 - assert response["steps"][2]["key"] == key_3 - # ---------------------------------------------------------------------- - - def test_edit_evaluation_steps(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][0]["id"] - - key_1 = "input" - key_2 = "invocation" - key_3 = "annotation" - repeat_id = str(uuid4()) - retry_id = str(uuid4()) - - steps = [ - { - "key": key_1, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - { - "key": key_2, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - { - "key": key_3, - "repeat_id": repeat_id, - "retry_id": retry_id, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - assert response["steps"][0]["key"] == key_1 - assert response["steps"][1]["key"] == key_2 - assert response["steps"][2]["key"] == key_3 - - steps = response["steps"] - result_ids = [step["id"] for step in steps] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - steps[0]["status"] = "success" - steps[1]["status"] = "failure" - steps[2]["status"] = "cancelled" - - response = authed_api( - "PATCH", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - assert response["steps"][0]["id"] == result_ids[0] - assert response["steps"][0]["status"] == "success" - assert response["steps"][1]["id"] == result_ids[1] - assert response["steps"][1]["status"] == "failure" - assert response["steps"][2]["id"] == result_ids[2] - assert response["steps"][2]["status"] == "cancelled" - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - - # ---------------------------------------------------------------------- - - def test_delete_evaluation_steps(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][0]["id"] - - key_1 = "input" - key_2 = "invocation" - - steps = [ - { - "key": key_1, - "scenario_id": scenario_id, - "run_id": run_id, - }, - { - "key": key_2, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - - result_ids = [step["id"] for step in response["steps"]] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/results/", - json={"result_ids": result_ids}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["result_ids"] == result_ids - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/preview/evaluations/results/", - json={"result_ids": result_ids}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_fetch_evaluation_step(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][2]["id"] - - key_1 = "input" - - steps = [ - { - "key": key_1, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - result_id = response["steps"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/evaluations/results/{result_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["step"]["id"] == result_id - # ---------------------------------------------------------------------- - - def test_edit_evaluation_step(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][0]["id"] - - key_1 = "input" - - steps = [ - { - "key": key_1, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["steps"][0]["key"] == key_1 - assert response["steps"][0]["status"] == "pending" - - step = response["steps"][0] - result_id = step["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - step["status"] = "success" - - response = authed_api( - "PATCH", - f"/preview/evaluations/results/{result_id}", - json={"step": step}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - print(response) - assert response["count"] == 1 - assert response["step"]["id"] == result_id - assert response["step"]["status"] == "success" - # ---------------------------------------------------------------------- - - def test_delete_evaluation_step(self, authed_api, mock_data): - # ARRANGE -------------------------------------------------------------- - run_id = mock_data["runs"][0]["id"] - scenario_id = mock_data["scenarios"][0]["id"] - - key_1 = "input" - - steps = [ - { - "key": key_1, - "scenario_id": scenario_id, - "run_id": run_id, - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - result_id = response["steps"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/results/{result_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["result_id"] == result_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/evaluations/results/{result_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluations/test_evaluation_steps_queries.py b/api/oss/tests/pytest/evaluations/test_evaluation_steps_queries.py deleted file mode 100644 index 6cc2ce4405..0000000000 --- a/api/oss/tests/pytest/evaluations/test_evaluation_steps_queries.py +++ /dev/null @@ -1,469 +0,0 @@ -from uuid import uuid4 - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - runs = [ - {"name": "test_evaluation_steps_basics"}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/runs/", - json={"runs": runs}, - ) - - assert response.status_code == 200 - - run_1 = response.json()["runs"][0] - - scenarios = [ - {"run_id": run_1["id"]}, - {"run_id": run_1["id"]}, - ] - - response = authed_api( - "POST", - "/preview/evaluations/scenarios/", - json={"scenarios": scenarios}, - ) - - assert response.status_code == 200 - - scenarios = response.json()["scenarios"] - - repeat_id_1 = str(uuid4()) - retry_id_1 = str(uuid4()) - repeat_id_2 = str(uuid4()) - retry_id_2 = str(uuid4()) - - tags = { - "tag1": "value1", - "tag2": "value2", - } - - meta = { - "meta1": "value1", - "meta2": "value2", - } - - steps = [ - { - "key": "input", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "success", - "tags": tags, - "meta": meta, - }, - { - "key": "invocation", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "failure", - }, - { - "key": "annotation", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "cancelled", - }, - { - "key": "input", - "repeat_id": repeat_id_2, - "retry_id": retry_id_2, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "success", - }, - { - "key": "invocation", - "repeat_id": repeat_id_2, - "retry_id": retry_id_2, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "failure", - "tags": tags, - "meta": meta, - }, - { - "key": "annotation", - "repeat_id": repeat_id_2, - "retry_id": retry_id_2, - "scenario_id": scenarios[0]["id"], - "run_id": run_1["id"], - "status": "cancelled", - }, - { - "key": "input", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[1]["id"], - "run_id": run_1["id"], - "status": "success", - }, - { - "key": "invocation", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[1]["id"], - "run_id": run_1["id"], - "status": "failure", - "tags": tags, - "meta": meta, - }, - { - "key": "annotation", - "repeat_id": repeat_id_1, - "retry_id": retry_id_1, - "scenario_id": scenarios[1]["id"], - "run_id": run_1["id"], - "status": "cancelled", - }, - ] - - response = authed_api( - "POST", - "/preview/evaluations/results/", - json={"steps": steps}, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - - steps = response["steps"] - # -------------------------------------------------------------------------- - - _mock_data = { - "runs": [run_1], - "scenarios": scenarios, - "steps": steps, - } - - return _mock_data - - -class TestEvaluationResultsQueries: - def test_query_results_all(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": {}, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_tags(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "tags": { - "tag1": "value1", - "tag2": "value2", - } - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_results_by_meta(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "meta": { - "meta1": "value1", - "meta2": "value2", - } - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_results_by_run_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "run_id": mock_data["runs"][0]["id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_run_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "run_ids": [mock_data["runs"][0]["id"]], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_scenario_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "scenario_id": mock_data["scenarios"][0]["id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- - - def test_query_results_by_scenario_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "scenario_ids": [s["id"] for s in mock_data["scenarios"]], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "ids": [s["id"] for s in mock_data["steps"][:-1]], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - 1 - # ---------------------------------------------------------------------- - - def test_query_results_by_key(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "key": "input", - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_results_by_keys(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "keys": ["input", "invocation"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- - - def test_query_results_by_repeat_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "repeat_id": mock_data["steps"][0]["repeat_id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- - - def test_query_results_by_repeat_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "repeat_ids": [ - mock_data["steps"][0]["repeat_id"], - mock_data["steps"][3]["repeat_id"], - ] - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_retry_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "retry_id": mock_data["steps"][0]["retry_id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- - - def test_query_results_by_retry_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "retry_ids": [ - mock_data["steps"][0]["retry_id"], - mock_data["steps"][3]["retry_id"], - ] - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 9 - # ---------------------------------------------------------------------- - - def test_query_results_by_status(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "status": "success", - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 3 - # ---------------------------------------------------------------------- - - def test_query_results_by_statuses(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/evaluations/results/query", - json={ - "step": { - "statuses": ["success", "failure"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluators/test_evaluators_basics.py b/api/oss/tests/pytest/evaluators/test_evaluators_basics.py deleted file mode 100644 index af44bd2633..0000000000 --- a/api/oss/tests/pytest/evaluators/test_evaluators_basics.py +++ /dev/null @@ -1,416 +0,0 @@ -from uuid import uuid4 - - -class TestEvaluatorsBasics: - def test_create_evaluator(self, authed_api): - # ACT ------------------------------------------------------------------ - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluator"]["slug"] == f"evaluator-{evaluator_slug}" - assert response["evaluator"]["data"]["service"]["format"] == _format - # ---------------------------------------------------------------------- - - def test_fetch_evaluator(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - - evaluator_id = response.json()["evaluator"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/simple/evaluators/{evaluator_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["evaluator"]["slug"] == f"evaluator-{evaluator_slug}" - assert response["evaluator"]["data"]["service"]["format"] == _format - # ---------------------------------------------------------------------- - - def test_edit_evaluator(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - - evaluator_id = response.json()["evaluator"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "inactive": {"type": "boolean"}, - }, - "required": ["id", "name"], - } - - response = authed_api( - "PUT", - f"/preview/simple/evaluators/{evaluator_id}", - json={ - "evaluator": { - "id": evaluator_id, - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["evaluator"]["data"]["service"]["format"] == _format - # ---------------------------------------------------------------------- - - def test_archive_evaluator(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - - evaluator_id = response.json()["evaluator"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/evaluators/{evaluator_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluator"]["deleted_at"] is not None - # ---------------------------------------------------------------------- - - def test_unarchive_evaluator(self, authed_api): - # ARRANGE -------------------------------------------------------------- - evaluator_slug = uuid4() - - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - - evaluator_id = response.json()["evaluator"]["id"] - - response = authed_api( - "POST", - f"/preview/simple/evaluators/{evaluator_id}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluator"]["deleted_at"] is not None - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/evaluators/{evaluator_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluator"].get("deleted_at") is None - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/evaluators/test_evaluators_queries.py b/api/oss/tests/pytest/evaluators/test_evaluators_queries.py deleted file mode 100644 index 45ec3a1f25..0000000000 --- a/api/oss/tests/pytest/evaluators/test_evaluators_queries.py +++ /dev/null @@ -1,301 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - _format = { - "type": "object", - "properties": { - "id": {"type": "integer"}, - "score": {"type": "number"}, - "name": {"type": "string"}, - "active": {"type": "boolean"}, - "meta": { - "type": "object", - "properties": { - "version": {"type": "integer"}, - "notes": {"type": "string"}, - }, - "required": ["version"], - }, - }, - "required": ["id", "name"], - } - - evaluator_slug = uuid4() - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - evaluator_1 = response["evaluator"] - - evaluator_slug = uuid4() - - response = authed_api( - "POST", - "/preview/simple/evaluators/", - json={ - "evaluator": { - "slug": f"evaluator-{evaluator_slug}", - "name": f"Evaluator {evaluator_slug}", - "description": "Evaluator Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - "data": { - "service": { - "agenta": "v0.1.0", - "format": _format, - } - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - evaluator_2 = response["evaluator"] - - response = authed_api( - "POST", - f"/preview/simple/evaluators/{evaluator_2['id']}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluator"]["id"] == evaluator_2["id"] - assert response["evaluator"]["deleted_at"] is not None - - _mock_data = { - "evaluators": [evaluator_1, evaluator_2], - } - # -------------------------------------------------------------------------- - - return _mock_data - - -class TestEvaluatorsQueries: - def test_query_non_archived_evaluators( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={}, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_all_evaluators( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "include_archived": True, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert len(response["evaluators"]) == 2 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - assert response["evaluators"][1]["id"] == mock_data["evaluators"][1]["id"] - # ---------------------------------------------------------------------- - - def test_query_paginated_evaluators( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "include_archived": True, - "windowing": {"limit": 1}, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "include_archived": True, - "windowing": {"limit": 1, "next": response["evaluators"][0]["id"]}, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][1]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "include_archived": True, - "windowing": {"limit": 1, "next": response["evaluators"][0]["id"]}, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_evaluators_by_flags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - # flags = quote(dumps(mock_data["evaluators"][0]["flags"])) - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "flags": mock_data["evaluators"][0]["flags"], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_evaluators_by_tags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - # tags = quote(dumps(mock_data["evaluators"][0]["tags"])) - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME, - json={ - "tags": mock_data["evaluators"][0]["tags"], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_evaluators_by_meta( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - # meta = quote(dumps(mock_data["evaluators"][0]["meta"])) - response = authed_api( - "POST", # TODO: FIX ME - "/preview/simple/evaluators/query", # TODO: FIX ME - json={ - "meta": mock_data["evaluators"][0]["meta"], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["evaluators"][0]["id"] == mock_data["evaluators"][0]["id"] - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/healthchecks/test_healthchecks.py b/api/oss/tests/pytest/healthchecks/test_healthchecks.py deleted file mode 100644 index 8d93275176..0000000000 --- a/api/oss/tests/pytest/healthchecks/test_healthchecks.py +++ /dev/null @@ -1,22 +0,0 @@ -class TestHealthCheck: - def test_unauthenticated(self, unauthed_api): - # ACT ------------------------------------------------------------------ - response = unauthed_api("GET", "/health") - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["status"] == "ok" - # ---------------------------------------------------------------------- - - def test_authenticated(self, authed_api): - # ACT ------------------------------------------------------------------ - response = authed_api("GET", "/profile") - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["email"].endswith("@test.agenta.ai") - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/legacy/test_testsets_basics.py b/api/oss/tests/pytest/testsets/legacy/test_testsets_basics.py deleted file mode 100644 index 17b3f10fcd..0000000000 --- a/api/oss/tests/pytest/testsets/legacy/test_testsets_basics.py +++ /dev/null @@ -1,284 +0,0 @@ -from uuid import uuid4 -from tempfile import TemporaryFile -from csv import DictWriter -from json import dumps - - -class TestLegacyTestsetsBasics: - def test_create_legacy_testsets(self, authed_api): - # ACT ------------------------------------------------------------------ - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert "id" in response - assert response["name"] == name - # ---------------------------------------------------------------------- - - def test_fetch_legacy_testsets(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/testsets/{testset_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["id"] == testset_id - assert response["name"] == name - assert response["csvdata"] == csvdata - # ---------------------------------------------------------------------- - - def test_edit_legacy_testsets(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - new_name = uuid4().hex - new_csvdata = [ - {"column1": "data6", "column2": "data5", "column3": "data4"}, - {"column1": "data3", "column2": "data2", "column3": "data1"}, - ] - - response = authed_api( - "PUT", - f"/testsets/{testset_id}", - json={ - "name": new_name, - "csvdata": new_csvdata, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["_id"] == testset_id - # ---------------------------------------------------------------------- - - def test_delete_legacy_testsets(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - "/testsets/", - json={ - "testset_ids": [testset_id], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - # ---------------------------------------------------------------------- - - def test_list_legacy_testsets(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name1 = uuid4().hex - name2 = uuid4().hex - - csvdata1 = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - csvdata2 = [ - {"column1": "data7", "column2": "data8", "column3": "data9"}, - {"column1": "data10", "column2": "data11", "column3": "data12"}, - ] - - response1 = authed_api( - "POST", - "/testsets/", - json={ - "name": name1, - "csvdata": csvdata1, - }, - ) - - response2 = authed_api( - "POST", - "/testsets/", - json={ - "name": name2, - "csvdata": csvdata2, - }, - ) - - assert response1.status_code == 200 - assert response2.status_code == 200 - - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/testsets/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert len(response) >= 2 - assert any(testset["name"] == name1 for testset in response) - assert any(testset["name"] == name2 for testset in response) - # ---------------------------------------------------------------------- - - def test_upload_legacy_testsets_from_csv(self, authed_api): - # ACT ------------------------------------------------------------------ - name = uuid4().hex - file_name = uuid4().hex + ".csv" - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - with TemporaryFile("w+", newline="") as temp_file: - writer = DictWriter(temp_file, fieldnames=csvdata[0].keys()) - writer.writeheader() - writer.writerows(csvdata) - temp_file.seek(0) - - files = { - "file": (file_name, temp_file, "text/csv"), - "testset_name": (None, name), - } - data = { - "upload_type": "CSV", - } - - response = authed_api( - "POST", - "/testsets/upload", - files=files, - data=data, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert "id" in response - assert response["name"] == name - # ---------------------------------------------------------------------- - - def test_upload_legacy_testsets_from_json(self, authed_api): - # ACT ------------------------------------------------------------------ - name = uuid4().hex - file_name = uuid4().hex + ".json" - - jsondata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - # Create a temporary JSON file - with TemporaryFile("w+", newline="") as temp_file: - temp_file.write(dumps(jsondata)) - temp_file.seek(0) - # Upload the JSON file - files = { - "file": (file_name, temp_file, "application/json"), - "testset_name": (None, name), - } - data = { - "upload_type": "JSON", - } - - response = authed_api( - "POST", - "/testsets/upload", - files=files, - data=data, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert "id" in response - assert response["name"] == name - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/test_testcases_basics.py b/api/oss/tests/pytest/testsets/test_testcases_basics.py deleted file mode 100644 index d7702b37a2..0000000000 --- a/api/oss/tests/pytest/testsets/test_testcases_basics.py +++ /dev/null @@ -1,165 +0,0 @@ -from uuid import uuid4 -from tempfile import TemporaryFile -from csv import DictWriter -from json import dumps - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data6", "column2": "data5", "column3": "data4"}, - {"column1": "data6", "column2": "data5", "column3": "data4"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_1 = response.json()["testset"] - - slug = uuid4().hex - - tags = {"tag1": "value2", "tag2": "value1"} - meta = {"meta1": "value2", "meta2": "value1"} - - testset = { - "slug": slug, - "name": "Another Testset Name", - "description": "This is another testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_2 = response.json()["testset"] - - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_2['id']}/archive", - ) - - assert response.status_code == 200 - response = response.json() - # -------------------------------------------------------------------------- - - _mock_data = { - "testsets": [testset_1, testset_2], - } - - return _mock_data - - -class TestTestcasesBasics: - def test_fetch_testcase(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - testset = mock_data["testsets"][0] - testcases = testset["data"]["testcases"] - testcase_id = testcases[0]["id"] - - response = authed_api( - "GET", - f"/preview/simple/testsets/testcases/{testcase_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - print(response) - assert response["testcase"] == testcases[0] - # ---------------------------------------------------------------------- - - def test_list_testcases(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/simple/testsets/testcases/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 6 - # ---------------------------------------------------------------------- - - def test_query_testcases_by_testcase_ids(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - testset = mock_data["testsets"][0] - testcases = testset["data"]["testcases"] - testcase_ids = [testcase["id"] for testcase in testcases] - - response = authed_api( - "POST", - "/preview/simple/testsets/testcases/query", - json={ - "testcase_ids": testcase_ids, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == len(testcase_ids) - # ---------------------------------------------------------------------- - - def test_query_testcases_by_testset_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - testset = mock_data["testsets"][0] - testset_id = testset["id"] - - response = authed_api( - "POST", - "/preview/simple/testsets/testcases/query", - json={ - "testset_id": testset_id, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == len(testset["data"]["testcases"]) - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/test_testsets_basics.py b/api/oss/tests/pytest/testsets/test_testsets_basics.py deleted file mode 100644 index 540d2a1a09..0000000000 --- a/api/oss/tests/pytest/testsets/test_testsets_basics.py +++ /dev/null @@ -1,433 +0,0 @@ -from uuid import uuid4 -from tempfile import TemporaryFile -from csv import DictWriter -from json import dumps - - -class TestTestsetsBasics: - def test_create_testsets(self, authed_api): - # ACT ------------------------------------------------------------------ - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - # "testcase_ids": None, - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - response_testset = response["testset"] - response_testcases = response_testset["data"]["testcases"] - response_testcases_data = [testcase["data"] for testcase in response_testcases] - - assert len(response_testcases_data) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_create_testsets_with_dedup(self, authed_api): - # ACT ------------------------------------------------------------------ - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data1", "column2": "data2", "column3": "data3"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - # "testcase_ids": None, - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - response_testset = response["testset"] - response_testcases = response_testset["data"]["testcases"] - response_testcases_data = [testcase["data"] for testcase in response_testcases] - - assert len(response_testcases_data) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_fetch_testset(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/simple/testsets/{testset_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["id"] == testset_id - assert response["testset"]["slug"] == slug - assert response["testset"]["name"] == testset["name"] - assert response["testset"]["description"] == testset["description"] - assert response["testset"]["tags"] == tags - assert response["testset"]["meta"] == meta - - response_testset = response["testset"] - response_testcases = response_testset["data"]["testcases"] - response_testcases_data = [testcase["data"] for testcase in response_testcases] - - assert len(response_testcases_data) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_edit_testset_with_changes(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - updated_testcases_data = [ - {"column1": "data6", "column2": "data5", "column3": "data4"}, # 1 - {"column1": "data4", "column2": "data5", "column3": "data6"}, # 2 - {"column1": "data4", "column2": "data5", "column3": "data6"}, # 2 (dedup) - ] - - updated_testcases = [ - {"data": testcase_data} for testcase_data in updated_testcases_data - ] - - updated_testset = { - "id": testset_id, - **testset, - "name": f"{testset['name']} - Updated", - "description": f"{testset['description']} - Updated", - "data": { - "testcases": updated_testcases, - }, - } - - response = authed_api( - "PUT", - f"/preview/simple/testsets/{testset_id}", - json={ - "testset": updated_testset, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["id"] == testset_id - assert response["testset"]["slug"] == slug - assert response["testset"]["name"] == updated_testset["name"] - assert response["testset"]["description"] == updated_testset["description"] - assert response["testset"]["tags"] == tags - assert response["testset"]["meta"] == meta - - response_testset = response["testset"] - response_testcases = response_testset["data"]["testcases"] - response_testcases_data = [testcase["data"] for testcase in response_testcases] - - assert len(response_testcases_data) != len(testcases_data) - # ---------------------------------------------------------------------- - - def test_edit_testset(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - updated_testset = { - "id": testset_id, - **testset, - "name": testset["name"], - "description": testset["description"], - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "PUT", - f"/preview/simple/testsets/{testset_id}", - json={ - "testset": updated_testset, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["id"] == testset_id - assert response["testset"]["slug"] == slug - assert response["testset"]["name"] == updated_testset["name"] - assert response["testset"]["description"] == updated_testset["description"] - assert response["testset"]["tags"] == tags - assert response["testset"]["meta"] == meta - - response_testset = response["testset"] - response_testcases = response_testset["data"]["testcases"] - response_testcases_data = [testcase["data"] for testcase in response_testcases] - - assert len(response_testcases_data) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_archive_testset(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name - Archive", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_unarchive_testset(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name - Unarchive", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/archive", - ) - assert response.status_code == 200 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/test_testsets_files.py b/api/oss/tests/pytest/testsets/test_testsets_files.py deleted file mode 100644 index a61a7021b0..0000000000 --- a/api/oss/tests/pytest/testsets/test_testsets_files.py +++ /dev/null @@ -1,296 +0,0 @@ -from uuid import uuid4 -from tempfile import TemporaryFile -from csv import DictWriter, DictReader -from json import dumps, loads -from io import TextIOWrapper - - -class TestTestsetsFiles: - def test_create_testsets_from_csv_file(self, authed_api): - # ACT ------------------------------------------------------------------ - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - with TemporaryFile("w+", newline="") as csvfile: - writer = DictWriter(csvfile, fieldnames=testcases_data[0].keys()) - writer.writeheader() - writer.writerows(testcases_data) - csvfile.seek(0) - - files = { - "file": ("testset.csv", csvfile, "text/csv"), - "testset_name": (None, "Testset Name"), - } - - data = { - "file_type": "csv", - "testset_description": "This is a testset description.", - "testset_tags": dumps({"tag1": "value1", "tag2": "value2"}), - "testset_meta": dumps({"meta1": "value1", "meta2": "value2"}), - } - - response = authed_api( - "POST", - "/preview/simple/testsets/upload", - files=files, - data=data, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - response_testcases = response["testset"]["data"]["testcases"] - assert len(response_testcases) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_create_testsets_from_json_file(self, authed_api): - # ACT ------------------------------------------------------------------ - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - with TemporaryFile("w+", newline="") as jsonfile: - jsonfile.write(dumps(testcases_data)) - jsonfile.seek(0) - - files = { - "file": ("testset.json", jsonfile, "application/json"), - "testset_name": (None, "Testset Name"), - } - - data = { - "file_type": "json", - "testset_description": "This is a testset description.", - "testset_tags": dumps({"tag1": "value1", "tag2": "value2"}), - "testset_meta": dumps({"meta1": "value1", "meta2": "value2"}), - } - - response = authed_api( - "POST", - "/preview/simple/testsets/upload", - files=files, - data=data, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - response_testcases = response["testset"]["data"]["testcases"] - assert len(response_testcases) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_fetch_testset_to_csv_file(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - testset_id = response.json()["testset"]["id"] - - # ACT ------------------------------------------------------------------ - with TemporaryFile(mode="w+b", suffix=".csv") as tmpfile: - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/download", - params={ - "file_type": "csv", - "file_name": "testset_export.csv", - }, - stream=True, - ) - assert response.status_code == 200 - - for chunk in response.iter_content(chunk_size=8192): - tmpfile.write(chunk) - - tmpfile.seek(0) - - # Read CSV into list of dicts - text_stream = TextIOWrapper(tmpfile, encoding="utf-8") - reader = DictReader(text_stream) - parsed = [row for row in reader] - - assert len(parsed) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_fetch_testset_to_json_file(self, authed_api): - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - testset_id = response.json()["testset"]["id"] - - # ACT ------------------------------------------------------------------ - with TemporaryFile(mode="w+b", suffix=".json") as tmpfile: - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/download", - params={ - "file_type": "json", - "file_name": "testset_export.json", - }, - stream=True, - ) - assert response.status_code == 200 - - for chunk in response.iter_content(chunk_size=8192): - tmpfile.write(chunk) - - tmpfile.seek(0) # rewind to beginning for reading - actual = tmpfile.read() - - parsed = loads(actual) - - assert len(parsed) == len(testcases_data) - # ---------------------------------------------------------------------- - - def test_edit_testset_from_file(self, authed_api): - # FIRST UPLOAD THEN UPLOAD AGAIN WITH CHANGES - - # ARRANGE -------------------------------------------------------------- - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_id = response.json()["testset"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - {"column1": "data6", "column2": "data5", "column3": "data4"}, - {"column1": "data6", "column2": "data5", "column3": "data4"}, - ] - - with TemporaryFile("w+", newline="") as csvfile: - writer = DictWriter(csvfile, fieldnames=testcases_data[0].keys()) - writer.writeheader() - writer.writerows(testcases_data) - csvfile.seek(0) - - files = { - "file": ("testset.csv", csvfile, "text/csv"), - "testset_name": (None, "Updated Testset Name"), - } - - data = { - "file_type": "csv", - "testset_description": "This is an updated description.", - "testset_tags": dumps({"tag1": "value2", "tag2": "value3"}), - "testset_meta": dumps({"meta1": "value4", "meta2": "value5"}), - } - - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/upload", - files=files, - data=data, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - response_testcases = response["testset"]["data"]["testcases"] - assert len(response_testcases) == len(testcases_data) - - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/test_testsets_jit.py b/api/oss/tests/pytest/testsets/test_testsets_jit.py deleted file mode 100644 index f53399908c..0000000000 --- a/api/oss/tests/pytest/testsets/test_testsets_jit.py +++ /dev/null @@ -1,165 +0,0 @@ -from uuid import uuid4 - - -class TestTestsetsJIT: - def test_transfer_testset(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - assert response.status_code == 200 - response = response.json() - assert "id" in response - assert response["name"] == name - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - testset_id = response["id"] - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/transfer", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["name"] == name - assert response["testset"]["id"] == testset_id - - testcases = response["testset"]["data"]["testcases"] - assert len(testcases) == len(csvdata) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - csvdata = [testcase["data"] for testcase in testcases][:-1] + [ - {"column1": "data7", "column2": "data8", "column3": "data9"}, - ] - - response = authed_api( - "PUT", - f"/testsets/{testset_id}", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["_id"] == testset_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/transfer", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["name"] == name - assert response["testset"]["id"] == testset_id - - testcases = response["testset"]["data"]["testcases"] - assert len(testcases) == len(csvdata) - # ---------------------------------------------------------------------- - - def test_transfer_testset_no_changes(self, authed_api): - # ARRANGE -------------------------------------------------------------- - name = uuid4().hex - - csvdata = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data4", "column2": "data5", "column3": "data6"}, - ] - - response = authed_api( - "POST", - "/testsets/", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - assert response.status_code == 200 - response = response.json() - assert "id" in response - assert response["name"] == name - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - testset_id = response["id"] - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/transfer", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["name"] == name - assert response["testset"]["id"] == testset_id - - testcases = response["testset"]["data"]["testcases"] - assert len(testcases) == len(csvdata) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - csvdata = [testcase["data"] for testcase in testcases] - - response = authed_api( - "PUT", - f"/testsets/{testset_id}", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["_id"] == testset_id - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_id}/transfer", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testset"]["name"] == name - assert response["testset"]["id"] == testset_id - - testcases = response["testset"]["data"]["testcases"] - assert len(testcases) == len(csvdata) - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/testsets/test_testsets_queries.py b/api/oss/tests/pytest/testsets/test_testsets_queries.py deleted file mode 100644 index 444aa91f4c..0000000000 --- a/api/oss/tests/pytest/testsets/test_testsets_queries.py +++ /dev/null @@ -1,222 +0,0 @@ -from uuid import uuid4 -from tempfile import TemporaryFile -from csv import DictWriter -from json import dumps - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - slug = uuid4().hex - - tags = {"tag1": "value1", "tag2": "value2"} - meta = {"meta1": "value1", "meta2": "value2"} - - testcases_data = [ - {"column1": "data1", "column2": "data2", "column3": "data3"}, - {"column1": "data6", "column2": "data5", "column3": "data4"}, - ] - - testcases = [{"data": testcase_data} for testcase_data in testcases_data] - - testset = { - "slug": slug, - "name": "Testset Name", - "description": "This is a testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_1 = response.json()["testset"] - - slug = uuid4().hex - - tags = {"tag1": "value2", "tag2": "value1"} - meta = {"meta1": "value2", "meta2": "value1"} - - testset = { - "slug": slug, - "name": "Another Testset Name", - "description": "This is another testset description.", - "tags": tags, - "meta": meta, - "data": { - "testcases": testcases, - }, - } - - response = authed_api( - "POST", - "/preview/simple/testsets/", - json={ - "testset": testset, - }, - ) - - assert response.status_code == 200 - - testset_2 = response.json()["testset"] - - response = authed_api( - "POST", - f"/preview/simple/testsets/{testset_2['id']}/archive", - ) - - assert response.status_code == 200 - response = response.json() - # -------------------------------------------------------------------------- - - _mock_data = { - "testsets": [testset_1, testset_2], - } - - return _mock_data - - -class TestTestsetsQueries: - def test_list_testsets(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/simple/testsets/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_query_testsets_non_archived(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/simple/testsets/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_query_testsets_all(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/simple/testsets/query", - json={ - "include_archived": True, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_testsets_by_tags(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/simple/testsets/query", - json={ - "testset": { - "tags": { - "tag1": "value1", - }, - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testsets"][0]["id"] == mock_data["testsets"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_testsets_by_meta(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/simple/testsets/query", - json={ - "testset": { - "meta": { - "meta1": "value1", - }, - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testsets"][0]["id"] == mock_data["testsets"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_testsets_by_refs(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/simple/testsets/query", - json={ - "testset_refs": [ - { - "id": mock_data["testsets"][0]["id"], - }, - ], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testsets"][0]["id"] == mock_data["testsets"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/simple/testsets/query", - json={ - "testset_refs": [ - { - "slug": mock_data["testsets"][0]["slug"], - }, - ], - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["testsets"][0]["id"] == mock_data["testsets"][0]["id"] - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/tracing/__init__.py b/api/oss/tests/pytest/tracing/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/api/oss/tests/pytest/tracing/test_spans_basics.py b/api/oss/tests/pytest/tracing/test_spans_basics.py deleted file mode 100644 index 040e916473..0000000000 --- a/api/oss/tests/pytest/tracing/test_spans_basics.py +++ /dev/null @@ -1,223 +0,0 @@ -from uuid import uuid4 - - -class TestSpansBasics: - trace_ids = [ - "1234567890abcdef1234567890abc000", - "1234567890abcdef1234567890abc001", - "1234567890abcdef1234567890abc002", - "1234567890abcdef1234567890abc003", - "1234567890abcdef1234567890abc004", - "1234567890abcdef1234567890abc005", - ] - - def test_ingest_spans(self, authed_api): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/tracing/spans/", - json={ - "spans": [ - { - "trace_id": self.trace_ids[0], - "span_id": "abcdef1234567890", - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "ag": { - "type": { - "trace": "undefined", - "span": "undefined", - "extra_type": "x", # unsupported - }, - "flags": {"env": True}, - "tags": {"foo": "bar"}, - "meta": {"service": "api"}, - "data": { - "inputs": {"text": "hello"}, - "outputs": "world", - "internals": {"debug": True}, - "extra_data": 42, # unsupported - }, - "metrics": { - "duration": { - "acc": 12.5, - "unit": None, - "extra_duration": "bad", # unsupported - }, - "tokens": {"acc": 100}, - "costs": {"unit": 0.02}, - "extra_metric": { # unsupported full metric - "acc": 999 - }, - }, - "references": {"testcase": {"id": uuid4().hex}}, - "exception": {"message": "boom"}, - "custom": "oops", # unsupported top-level - }, - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": { - "some.attribute": "some-value", - }, - }, - { - "name": "exception", - "timestamp": 1675000001, - "attributes": { - "message": "PANIC!", - "type": "NotImplementedError", - "stacktrace": "Traceback ...", - }, - }, - ], - }, - { - "trace_id": self.trace_ids[0], - "span_id": "1234567890abcdef", - "parent_id": "abcdef1234567890", - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - "events": [ - { - "name": "exception", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - }, - ] - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_query_spans(self, authed_api): - # ARRANGE -------------------------------------------------------------- - response = authed_api( - "POST", - "/preview/tracing/spans/ingest", - json={ - "spans": [ - { - "trace_id": self.trace_ids[1], - "span_id": "abcdef1234567890", - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "ag": { - "type": { - "trace": "undefined", - "span": "undefined", - "extra_type": "x", # unsupported - }, - "flags": {"env": True}, - "tags": {"foo": "bar"}, - "meta": {"service": "api"}, - "data": { - "inputs": {"text": "hello"}, - "outputs": "world", - "internals": {"debug": True}, - "extra_data": 42, # unsupported - }, - "metrics": { - "duration": { - "acc": 12.5, - "unit": None, - "extra_duration": "bad", # unsupported - }, - "errors": {"unit": 1}, - "tokens": {"acc": 100}, - "costs": {"unit": 0.02}, - "extra_metric": { # unsupported full metric - "acc": 999 - }, - }, - "references": {"testcase": {"id": uuid4().hex}}, - "exception": {"message": "boom"}, - "custom": "oops", # unsupported top-level - }, - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - }, - { - "trace_id": self.trace_ids[1], - "span_id": "1234567890abcdef", - "parent_id": "abcdef1234567890", - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - "events": [ - { - "name": "exception", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - }, - ] - }, - ) - - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/tracing/spans/query", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] != 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/tracing/test_spans_queries.py b/api/oss/tests/pytest/tracing/test_spans_queries.py deleted file mode 100644 index f257cac565..0000000000 --- a/api/oss/tests/pytest/tracing/test_spans_queries.py +++ /dev/null @@ -1,162 +0,0 @@ -from uuid import uuid4 - - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - trace_ids = [ - "1234567890abcdef1234567890abc000", - "1234567890abcdef1234567890abc001", - "1234567890abcdef1234567890abc002", - "1234567890abcdef1234567890abc003", - "1234567890abcdef1234567890abc004", - "1234567890abcdef1234567890abc005", - ] - - # ARRANGE ------------------------------------------------------------------ - spans = [ - { - "trace_id": trace_ids[0], - "span_id": "abcdef1234567890", - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "ag": { - "type": { - "trace": "undefined", - "span": "undefined", - "extra_type": "x", # unsupported - }, - "flags": {"env": True}, - "tags": {"foo": "bar"}, - "meta": {"service": "api"}, - "data": { - "inputs": {"text": "hello"}, - "outputs": "world", - "internals": {"debug": True}, - "extra_data": 42, # unsupported - }, - "metrics": { - "duration": { - "acc": 12.5, - "unit": None, - "extra_duration": "bad", # unsupported - }, - "tokens": {"acc": 100}, - "costs": {"unit": 0.02}, - "extra_metric": {"acc": 999}, # unsupported full metric - }, - "references": {"testcase": {"id": uuid4().hex}}, - "exception": {"message": "boom"}, - "custom": "oops", # unsupported top-level - }, - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": { - "some.attribute": "some-value", - }, - }, - { - "name": "exception", - "timestamp": 1675000001, - "attributes": { - "message": "PANIC!", - "type": "NotImplementedError", - "stacktrace": "Traceback ...", - }, - }, - ], - }, - { - "trace_id": trace_ids[0], - "span_id": "1234567890abcdef", - "parent_id": "abcdef1234567890", - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - "events": [ - { - "name": "exception", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - }, - ] - response = authed_api( - "POST", - "/preview/tracing/spans/", - json={"spans": spans}, - ) - - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # -------------------------------------------------------------------------- - - _mock_data = {"spans": spans} - - return _mock_data - - -class TestSpansBasics: - def test_query_all(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/tracing/spans/query", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert len(response["spans"]) == 2 - # ---------------------------------------------------------------------- - - def test_query_fts(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - "/preview/tracing/spans/query", - json={ - "filter": { - "conditions": [ - { - "field": "content", - "operator": "contains", - "value": "hello world", - } - ] - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert len(response["spans"]) == 1 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/tracing/test_traces_basics.py b/api/oss/tests/pytest/tracing/test_traces_basics.py deleted file mode 100644 index a02866adce..0000000000 --- a/api/oss/tests/pytest/tracing/test_traces_basics.py +++ /dev/null @@ -1,313 +0,0 @@ -from uuid import uuid4 - - -class TestTraceBasics: - def test_create_trace(self, authed_api): - # ACT ------------------------------------------------------------------ - trace_id = uuid4().hex - span_id_1 = uuid4().hex[16:] - span_id_2 = uuid4().hex[16:] - - response = authed_api( - "POST", - "/preview/tracing/traces/", - json={ - "traces": { - trace_id: { - "spans": { - "parent_span": { - "trace_id": trace_id, - "span_id": span_id_1, - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - "spans": { - "child_span": { - "trace_id": trace_id, - "span_id": span_id_2, - "parent_id": span_id_1, - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - "events": [ - { - "name": "exception", - "timestamp": 1675000000, - "attributes": { - "some.attribute": "some-value" - }, - } - ], - } - }, - } - } - } - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_fetch_trace(self, authed_api): - # ARRANGE -------------------------------------------------------------- - trace_id = uuid4().hex - span_id_1 = uuid4().hex[16:] - - response = authed_api( - "POST", - "/preview/tracing/traces/", - json={ - "spans": [ - { - "trace_id": trace_id, - "span_id": span_id_1, - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - }, - ] - }, - ) - - assert response.status_code == 202 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/tracing/traces/{trace_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_trace(self, authed_api): - # ARRANGE -------------------------------------------------------------- - trace_id = uuid4().hex - span_id_1 = uuid4().hex[16:] - span_id_2 = uuid4().hex[16:] - span_id_3 = uuid4().hex[16:] - - response = authed_api( - "POST", - "/preview/tracing/traces/", - json={ - "spans": [ - { - "trace_id": trace_id, - "span_id": span_id_1, - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - }, - { - "trace_id": trace_id, - "span_id": span_id_2, - "parent_id": span_id_1, - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - }, - ] - }, - ) - - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "PUT", - f"/preview/tracing/traces/{trace_id}", - json={ - "traces": { - trace_id: { - "spans": { - "parent_span": { - "trace_id": trace_id, - "span_id": span_id_1, - "span_name": "parent_span", - "span_kind": "SPAN_KIND_CONSUMER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - "attributes": { - "some.string": "some-string", - "some.number": 123, - "some.boolean": True, - "some.array": [1, 2, 3], - "some.object": {"key1": "value1", "key2": "value2"}, - "some.more.array.0": "array-value-0", - "some.more.array.1": "array-value-1", - "some.more.array.2": "array-value-2", - }, - "events": [ - { - "name": "some-event", - "timestamp": 1675000000, - "attributes": {"some.attribute": "some-value"}, - } - ], - "spans": { - "child_span": { - "trace_id": trace_id, - "span_id": span_id_3, - "parent_id": span_id_1, - "span_name": "child_span", - "span_kind": "SPAN_KIND_INTERNAL", - "start_time": 1672500000, - "end_time": 1677500000, - "status_code": "STATUS_CODE_ERROR", - "status_message": "This did not go well", - "events": [ - { - "name": "exception", - "timestamp": 1675000000, - "attributes": { - "some.attribute": "some-value" - }, - } - ], - } - }, - } - } - } - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 202 - response = response.json() - assert response["count"] == 2 - # ---------------------------------------------------------------------- - - def test_delete_trace(self, authed_api): - # ARRANGE -------------------------------------------------------------- - trace_id = uuid4().hex - span_id_1 = uuid4().hex[16:] - - response = authed_api( - "POST", - "/preview/tracing/traces/", - json={ - "spans": [ - { - "trace_id": trace_id, - "span_id": span_id_1, - "span_name": "parent_span", - "span_kind": "SPAN_KIND_SERVER", - "start_time": 1670000000, - "end_time": 1680000000, - "status_code": "STATUS_CODE_OK", - "status_message": "This went well", - }, - ] - }, - ) - - assert response.status_code == 202 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/tracing/traces/{trace_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 202 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/tracing/traces/{trace_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "DELETE", - f"/preview/tracing/traces/{trace_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 202 # IDEMPOTENCY - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/utils/__init__.py b/api/oss/tests/pytest/utils/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/api/oss/tests/pytest/utils/accounts.py b/api/oss/tests/pytest/utils/accounts.py deleted file mode 100644 index 57b7b2a1a5..0000000000 --- a/api/oss/tests/pytest/utils/accounts.py +++ /dev/null @@ -1,59 +0,0 @@ -import requests -import pytest - -from utils.constants import BASE_TIMEOUT - - -def create_account(ag_env): - api_url = ag_env["api_url"] - auth_key = ag_env["auth_key"] - - headers = {"Authorization": f"Access {auth_key}"} - url = f"{api_url}/admin/account" - - response = requests.post( - url=url, - headers=headers, - timeout=BASE_TIMEOUT, - ) - - assert response is not None, "Response should not be None" - assert response.status_code == 200, f"Expected 200, got {response.status_code}" - - json_data = response.json() - assert isinstance(json_data, dict), "Response JSON should not be None" - - scopes = json_data.get("scopes") - assert scopes and len(scopes) > 0, "No scopes returned in response" - - scope_data = scopes[0] - assert isinstance(scope_data, dict), "Scope should be a dictionary" - - credentials = scope_data.get("credentials") - assert credentials, "No credentials in scopes" - - return { - "api_url": api_url, - "credentials": credentials, - } - - -@pytest.fixture(scope="function") -def foo_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for function-scoped account goes here.") - - -@pytest.fixture(scope="class") -def cls_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for class-scoped account goes here.") - - -@pytest.fixture(scope="module") -def mod_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for module-scoped account goes here.") diff --git a/api/oss/tests/pytest/utils/api.py b/api/oss/tests/pytest/utils/api.py deleted file mode 100644 index 7d6f9d484c..0000000000 --- a/api/oss/tests/pytest/utils/api.py +++ /dev/null @@ -1,46 +0,0 @@ -import pytest -import requests - -from utils.constants import BASE_TIMEOUT - - -@pytest.fixture(scope="session") -def unauthed_api(ag_env): - """ - Preconfigured requests session for unauthenticated endpoints (supports all methods). - """ - api_url = ag_env["api_url"] - session = requests.Session() - - def _request(method: str, endpoint: str, **kwargs): - url = f"{api_url}{endpoint}" - return session.request(method=method, url=url, timeout=BASE_TIMEOUT, **kwargs) - - yield _request - - # Close the session after all tests - session.close() - - -@pytest.fixture(scope="class") -def authed_api(cls_account): - """ - Preconfigured requests for authenticated endpoints (supports all methods). - """ - api_url = cls_account["api_url"] - credentials = cls_account["credentials"] - - def _request(method: str, endpoint: str, **kwargs): - url = f"{api_url}{endpoint}" - headers = kwargs.pop("headers", {}) - headers.setdefault("Authorization", credentials) - - return requests.request( - method=method, - url=url, - headers=headers, - timeout=BASE_TIMEOUT, - **kwargs, - ) - - return _request diff --git a/api/oss/tests/pytest/utils/constants.py b/api/oss/tests/pytest/utils/constants.py deleted file mode 100644 index c8edc5d853..0000000000 --- a/api/oss/tests/pytest/utils/constants.py +++ /dev/null @@ -1 +0,0 @@ -BASE_TIMEOUT = 10 # seconds diff --git a/api/oss/tests/pytest/utils/env.py b/api/oss/tests/pytest/utils/env.py deleted file mode 100644 index 9b670df0b9..0000000000 --- a/api/oss/tests/pytest/utils/env.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -import pytest - - -def get_ag_env(): - api_url = os.getenv("AGENTA_API_URL") - auth_key = os.getenv("AGENTA_AUTH_KEY") - - assert api_url, "AGENTA_API_URL must be set" - assert auth_key, "AGENTA_AUTH_KEY must be set" - - return { - "api_url": api_url, - "auth_key": auth_key, - } - - -@pytest.fixture(scope="session") -def ag_env(): - env_vars = get_ag_env() - yield env_vars diff --git a/api/oss/tests/pytest/workflows/__init__.py b/api/oss/tests/pytest/workflows/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/api/oss/tests/pytest/workflows/test_workflow_lineage.py b/api/oss/tests/pytest/workflows/test_workflow_lineage.py deleted file mode 100644 index c11178906b..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflow_lineage.py +++ /dev/null @@ -1,445 +0,0 @@ -from uuid import uuid4 - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_data = response.json() - - workflow_id = response.json()["workflow"]["id"] - - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_variant_data = response.json() - - workflow_variant_id = response.json()["workflow_variant"]["id"] - - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}-first", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - "workflow_variant_id": workflow_variant_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}-second", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - "workflow_variant_id": workflow_variant_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}-third", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - "workflow_variant_id": workflow_variant_id, - } - }, - ) - - assert response.status_code == 200 - - response = authed_api( - "GET", - "/preview/workflows/revisions/", - ) - - assert response.status_code == 200 - - workflow_revision_data = response.json() - # -------------------------------------------------------------------------- - - _mock_data = dict( - workflows=[workflow_data["workflow"]], - workflow_variants=[workflow_variant_data["workflow_variant"]], - workflow_revisions=workflow_revision_data["workflow_revisions"], - ) - - return _mock_data - - -class TestWorkflowRevisionsLineage: - def test_log_all_workflow_revisions_by_variant(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_variant = mock_data["workflow_variants"][0] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_variant_id": workflow_variant["id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 3 - # ---------------------------------------------------------------------- - - def test_log_last_workflow_revisions_by_variant(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_variant = mock_data["workflow_variants"][0] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_variant_id": workflow_variant["id"], - "depth": 2, - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 2 - # ---------------------------------------------------------------------- - - def test_log_all_workflow_revisions(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_revision = mock_data["workflow_revisions"][-1] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_revision_id": workflow_revision["id"], - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 3 - # ---------------------------------------------------------------------- - - def test_log_last_workflow_revisions(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_revision = mock_data["workflow_revisions"][-1] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_revision_id": workflow_revision["id"], - "depth": 2, - }, - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 2 - # ---------------------------------------------------------------------- - - def test_full_fork_workflow_variant(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_variant_id = mock_data["workflow_variants"][0]["id"] - - workflow_variant_slug = uuid4() - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/fork", - json={ - "workflow": { - "workflow_variant_id": workflow_variant_id, - # "depth": 1, - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}-fork", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - }, - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}-fork", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 1 - - workflow_variant = response_data["workflow_variant"] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_variant_id": workflow_variant["id"], - }, - }, - ) - - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 4 - # ---------------------------------------------------------------------- - - def test_shallow_fork_workflow_variant(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - workflow_variant_id = mock_data["workflow_variants"][0]["id"] - - workflow_variant_slug = uuid4() - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/fork", - json={ - "workflow": { - "workflow_variant_id": workflow_variant_id, - "depth": 1, - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}-fork", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - }, - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}-fork", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 1 - - workflow_variant = response_data["workflow_variant"] - - response = authed_api( - "POST", - "/preview/workflows/revisions/log", - json={ - "workflow": { - "workflow_variant_id": workflow_variant["id"], - }, - }, - ) - - assert response.status_code == 200 - response_data = response.json() - assert response_data["count"] == 2 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflow_revisions_basics.py b/api/oss/tests/pytest/workflows/test_workflow_revisions_basics.py deleted file mode 100644 index 44ea13f912..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflow_revisions_basics.py +++ /dev/null @@ -1,487 +0,0 @@ -from uuid import uuid4 - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_data = response.json() - - workflow_id = response.json()["workflow"]["id"] - - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-{workflow_variant_slug}", - "name": f"Workflow {workflow_variant_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_variant_data = response.json() - # -------------------------------------------------------------------------- - - _mock_data = dict( - workflows=[workflow_data["workflow"]], - workflow_variants=[workflow_variant_data["workflow_variant"]], - ) - - return _mock_data - - -class TestWorkflowRevisionsBasics: - def test_create_workflow_revision( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_variant_slug}", - "name": f"Workflow Revision {workflow_variant_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - workflow_revision = response["workflow_revision"] - assert workflow_revision["workflow_id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - def test_fetch_workflow_revision( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_revision_id = response["workflow_revision"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/workflows/revisions/{workflow_revision_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_workflow_revision( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow revision {workflow_revision_slug}", - "description": "Workflow revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_revision_id = response["workflow_revision"]["id"] - workflow_revision_slug = response["workflow_revision"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "PUT", - f"/preview/workflows/revisions/{workflow_revision_id}", - json={ - "workflow_revision": { - "id": workflow_revision_id, - "name": "Another Workflow revision Name", - "description": "Another Workflow revisionDescription", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_archive_workflow_revision( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow revision {workflow_revision_slug}", - "description": "Workflow revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_revision_id = response["workflow_revision"]["id"] - workflow_revision_slug = response["workflow_revision"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/revisions/{workflow_revision_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_revision"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - def test_unarchive_workflow_revision( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow revision {workflow_revision_slug}", - "description": "Workflow revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_revision_id = response["workflow_revision"]["id"] - workflow_revision_slug = response["workflow_revision"]["slug"] - - response = authed_api( - "POST", - f"/preview/workflows/revisions/{workflow_revision_id}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_revision"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/revisions/{workflow_revision_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_revision"].get("deleted_at") is None - # ---------------------------------------------------------------------- - - def test_commit_workflow_revision( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow revision {workflow_revision_slug}", - "description": "Workflow revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_revision_id = response["workflow_revision"]["id"] - workflow_revision_slug = response["workflow_revision"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - message = f"Initial commit for workflow revision {workflow_revision_slug}" - configuration = {"key1": "value1"} - - response = authed_api( - "POST", - "/preview/workflows/revisions/commit", - json={ - "workflow_revision": { - "id": workflow_revision_id, - "slug": f"workflow-revision-new-{workflow_revision_slug}", - "name": f"Workflow revision new {workflow_revision_slug}", - "description": "Workflow revision new Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "message": message, - "data": {"configuration": configuration}, - "workflow_id": mock_data["workflows"][0]["id"], - "workflow_variant_id": mock_data["workflow_variants"][0]["id"], - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_revision"]["message"] == message - assert response["workflow_revision"]["data"]["configuration"] == configuration - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflow_revisions_queries.py b/api/oss/tests/pytest/workflows/test_workflow_revisions_queries.py deleted file mode 100644 index abf22c9dc7..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflow_revisions_queries.py +++ /dev/null @@ -1,381 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE ------------------------------------------------------------------ - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_id = response.json()["workflow"]["id"] - - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_variant_id = response.json()["workflow_variant"]["id"] - - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_revision_slug}", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - "workflow_variant_id": workflow_variant_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_revision_id_0 = response.json()["workflow_revision"]["id"] - - workflow_revision_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-Revision-{workflow_revision_slug}", - "name": f"Workflow Revision {workflow_revision_slug}", - "description": "Workflow Revision Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - "workflow_id": workflow_id, - "workflow_variant_id": workflow_variant_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_revision_id_1 = response.json()["workflow_revision"]["id"] - - response = authed_api( - "POST", - f"/preview/workflows/revisions/{workflow_revision_id_1}/archive", - ) - - assert response.status_code == 200 - - response = authed_api( - "GET", - "/preview/workflows/revisions/?include_archived=true", - ) - - assert response.status_code == 200 - response = response.json() - - assert response["count"] == 2 - assert response["workflow_revisions"][0]["id"] == workflow_revision_id_0 - assert response["workflow_revisions"][1]["id"] == workflow_revision_id_1 - # -------------------------------------------------------------------------- - - return response - - -class TestWorkflowRevisionsQueries: - def test_query_non_archived_workflow_revisions( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/revisions/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - def test_query_all_workflow_revisions( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/revisions/?include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - def test_query_paginated_workflow_revisions( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/revisions/?include_archived=true" "&limit=1", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/revisions/?include_archived=true" - f"&limit=1&next={response['workflow_revisions'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][1]["id"] - ) - # ---------------------------------------------------------------------- - - response = authed_api( - "GET", - "/preview/workflows/revisions/?include_archived=true" - f"&limit=1&next={response['workflow_revisions'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_revisions_by_flags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - flags = quote(dumps(mock_data["workflow_revisions"][0]["flags"])) - response = authed_api( - "GET", - f"/preview/workflows/revisions/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - flags = quote(dumps({"is_custom": True})) - - response = authed_api( - "GET", - f"/preview/workflows/revisions/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_revisions_by_tags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - tags = quote(dumps(mock_data["workflow_revisions"][0]["tags"])) - response = authed_api( - "GET", - f"/preview/workflows/revisions/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = quote(dumps({"tag1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/revisions/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_revisions_by_meta( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - meta = quote(dumps(mock_data["workflow_revisions"][0]["meta"])) - response = authed_api( - "GET", - f"/preview/workflows/revisions/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_revisions"][0]["id"] - == mock_data["workflow_revisions"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - meta = quote(dumps({"meta1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/revisions/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflow_variants_basics.py b/api/oss/tests/pytest/workflows/test_workflow_variants_basics.py deleted file mode 100644 index c4dc5a26b7..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflow_variants_basics.py +++ /dev/null @@ -1,355 +0,0 @@ -from uuid import uuid4 - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_data = response.json() - # -------------------------------------------------------------------------- - - _mock_data = dict( - workflows=[workflow_data["workflow"]], - ) - - return _mock_data - - -class TestWorkflowVariantsBasics: - def test_create_workflow_variant( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-{workflow_variant_slug}", - "name": f"Workflow {workflow_variant_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - workflow_variant = response["workflow_variant"] - assert workflow_variant["workflow_id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - def test_fetch_workflow_variant( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-{workflow_variant_slug}", - "name": f"Workflow {workflow_variant_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_variant_id = response["workflow_variant"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/workflows/variants/{workflow_variant_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_workflow_variant( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_variant_id = response["workflow_variant"]["id"] - workflow_variant_slug = response["workflow_variant"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "PUT", - f"/preview/workflows/variants/{workflow_variant_id}", - json={ - "workflow_variant": { - "id": workflow_variant_id, - "name": "Another Workflow Variant Name", - "description": "Another Workflow VariantDescription", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_archive_workflow_variant( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_variant_id = response["workflow_variant"]["id"] - workflow_variant_slug = response["workflow_variant"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/variants/{workflow_variant_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_variant"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - def test_unarchive_workflow_variant( - self, - authed_api, - mock_data, - ): - # ARRANGE -------------------------------------------------------------- - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_variant_slug}", - "name": f"Workflow Variant {workflow_variant_slug}", - "description": "Workflow Variant Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": mock_data["workflows"][0]["id"], - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_variant_id = response["workflow_variant"]["id"] - workflow_variant_slug = response["workflow_variant"]["slug"] - - response = authed_api( - "POST", - f"/preview/workflows/variants/{workflow_variant_id}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_variant"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/variants/{workflow_variant_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow_variant"].get("deleted_at") is None - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflow_variants_queries.py b/api/oss/tests/pytest/workflows/test_workflow_variants_queries.py deleted file mode 100644 index 19eae82dbd..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflow_variants_queries.py +++ /dev/null @@ -1,345 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_id = response.json()["workflow"]["id"] - - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-{workflow_variant_slug}", - "name": f"Workflow {workflow_variant_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_variant_id_0 = response.json()["workflow_variant"]["id"] - - workflow_variant_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-{workflow_variant_slug}", - "name": f"Workflow {workflow_variant_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - "workflow_id": workflow_id, - } - }, - ) - - assert response.status_code == 200 - - workflow_variant_id_1 = response.json()["workflow_variant"]["id"] - - response = authed_api( - "POST", - f"/preview/workflows/variants/{workflow_variant_id_1}/archive", - ) - - assert response.status_code == 200 - - response = authed_api( - "GET", - "/preview/workflows/variants/?include_archived=true", - ) - - assert response.status_code == 200 - response = response.json() - - assert response["count"] == 2 - assert response["workflow_variants"][0]["id"] == workflow_variant_id_0 - assert response["workflow_variants"][1]["id"] == workflow_variant_id_1 - # -------------------------------------------------------------------------- - - return response - - -class TestWorkflowVariantsQueries: - def test_query_non_archived_workflow_variants( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/variants/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - def test_query_all_workflow_variants( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/variants/?include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - def test_query_paginated_workflow_variants( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/variants/?include_archived=true" "&limit=1", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/variants/?include_archived=true" - f"&limit=1&next={response['workflow_variants'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][1]["id"] - ) - # ---------------------------------------------------------------------- - - response = authed_api( - "GET", - "/preview/workflows/variants/?include_archived=true" - f"&limit=1&next={response['workflow_variants'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_variants_by_flags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - flags = quote(dumps(mock_data["workflow_variants"][0]["flags"])) - response = authed_api( - "GET", - f"/preview/workflows/variants/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - flags = quote(dumps({"is_custom": True})) - - response = authed_api( - "GET", - f"/preview/workflows/variants/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_variants_by_tags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - tags = quote(dumps(mock_data["workflow_variants"][0]["tags"])) - response = authed_api( - "GET", - f"/preview/workflows/variants/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = quote(dumps({"tag1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/variants/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflow_variants_by_meta( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - meta = quote(dumps(mock_data["workflow_variants"][0]["meta"])) - response = authed_api( - "GET", - f"/preview/workflows/variants/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert ( - response["workflow_variants"][0]["id"] - == mock_data["workflow_variants"][0]["id"] - ) - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - meta = quote(dumps({"meta1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/variants/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflows_basics.py b/api/oss/tests/pytest/workflows/test_workflows_basics.py deleted file mode 100644 index 95b9cec462..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflows_basics.py +++ /dev/null @@ -1,296 +0,0 @@ -from uuid import uuid4 - - -class TestWorkflowsBasics: - def test_create_workflow( - self, - authed_api, - ): - # ACT ------------------------------------------------------------------ - workflow_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/", - json={ - "workflow": { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_fetch_workflow( - self, - authed_api, - ): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/", - json={ - "workflow": { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_id = response["workflow"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - f"/preview/workflows/{workflow_id}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_edit_workflow( - self, - authed_api, - ): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/", - json={ - "workflow": { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_id = response["workflow"]["id"] - workflow_slug = response["workflow"]["slug"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "PUT", - f"/preview/workflows/{workflow_id}", - json={ - "workflow": { - "id": workflow_id, - "name": "Another Workflow Name", - "description": "Another Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value3", - "tag2": "value2", - "tag3": "value1", - }, - "meta": { - "meta1": "value3", - "meta2": "value2", - "meta3": "value1", - }, - } - }, - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - # ---------------------------------------------------------------------- - - def test_archive_workflow( - self, - authed_api, - ): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/", - json={ - "workflow": { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_id = response["workflow"]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/{workflow_id}/archive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - def test_unarchive_workflow( - self, - authed_api, - ): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/", - json={ - "workflow": { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - }, - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - - workflow_id = response["workflow"]["id"] - - # Archive the workflow first - response = authed_api( - "POST", - f"/preview/workflows/{workflow_id}/archive", - ) - - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow"].get("deleted_at") is not None - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "POST", - f"/preview/workflows/{workflow_id}/unarchive", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflow"].get("deleted_at") is None - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflows_queries.py b/api/oss/tests/pytest/workflows/test_workflows_queries.py deleted file mode 100644 index 57163be02b..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflows_queries.py +++ /dev/null @@ -1,289 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": False, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "value2", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_id_0 = response.json()["workflow"]["id"] - - workflow_slug = uuid4() - - workflow = { - "slug": f"workflow-{workflow_slug}", - "name": f"Workflow {workflow_slug}", - "description": "Workflow Description", - "flags": { - "is_custom": False, - "is_evaluator": True, - "is_human": False, - }, - "tags": { - "tag1": "value1", - "tag2": "2value", - "tag3": "value3", - }, - "meta": { - "meta1": "value1", - "meta2": "2value", - "meta3": "value3", - }, - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow}, - ) - - assert response.status_code == 200 - - workflow_id_1 = response.json()["workflow"]["id"] - - response = authed_api( - "POST", - f"/preview/workflows/{workflow_id_1}/archive", - ) - - assert response.status_code == 200 - - response = authed_api( - "GET", - "/preview/workflows/?include_archived=true", - ) - - assert response.status_code == 200 - response = response.json() - - assert response["count"] == 2 - assert response["workflows"][0]["id"] == workflow_id_0 - assert response["workflows"][1]["id"] == workflow_id_1 - # -------------------------------------------------------------------------- - - return response - - -class TestWorkflowsQueries: - def test_query_non_archived_workflows( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_all_workflows( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/?include_archived=true", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 2 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - def test_query_paginated_workflows( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/?include_archived=true" "&limit=1", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - response = authed_api( - "GET", - "/preview/workflows/?include_archived=true" - f"&limit=1&next={response['workflows'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][1]["id"] - # ---------------------------------------------------------------------- - - response = authed_api( - "GET", - "/preview/workflows/?include_archived=true" - f"&limit=1&next={response['workflows'][0]['id']}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflows_by_flags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - flags = quote(dumps(mock_data["workflows"][0]["flags"])) - response = authed_api( - "GET", - f"/preview/workflows/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - flags = quote(dumps({"is_custom": True})) - - response = authed_api( - "GET", - f"/preview/workflows/?flags={flags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflows_by_tags( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - tags = quote(dumps(mock_data["workflows"][0]["tags"])) - response = authed_api( - "GET", - f"/preview/workflows/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - tags = quote(dumps({"tag1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/?tags={tags}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- - - def test_query_workflows_by_meta( - self, - authed_api, - mock_data, - ): - # ACT ------------------------------------------------------------------ - meta = quote(dumps(mock_data["workflows"][0]["meta"])) - response = authed_api( - "GET", - f"/preview/workflows/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 1 - assert response["workflows"][0]["id"] == mock_data["workflows"][0]["id"] - # ---------------------------------------------------------------------- - - # ACT ------------------------------------------------------------------ - meta = quote(dumps({"meta1": "value2"})) - - response = authed_api( - "GET", - f"/preview/workflows/?meta={meta}", - ) - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response.status_code == 200 - response = response.json() - assert response["count"] == 0 - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/pytest/workflows/test_workflows_retrieve.py b/api/oss/tests/pytest/workflows/test_workflows_retrieve.py deleted file mode 100644 index 8d824dc30f..0000000000 --- a/api/oss/tests/pytest/workflows/test_workflows_retrieve.py +++ /dev/null @@ -1,323 +0,0 @@ -from uuid import uuid4 -from json import dumps -from urllib.parse import quote - -import pytest - - -@pytest.fixture(scope="class") -def mock_data(authed_api): - # ARRANGE -------------------------------------------------------------- - workflow_0_slug = uuid4() - - workflow_0 = { - "slug": f"workflow-{workflow_0_slug}", - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow_0}, - ) - - assert response.status_code == 200 - - workflow_0 = response.json()["workflow"] - - workflow_1_slug = uuid4() - - workflow_1 = { - "slug": f"workflow-{workflow_1_slug}", - } - - response = authed_api( - "POST", - "/preview/workflows/", - json={"workflow": workflow_1}, - ) - - assert response.status_code == 200 - - workflow_1 = response.json()["workflow"] - - workflow_0_variant_0_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_0_variant_0_slug}", - "workflow_id": workflow_0["id"], - } - }, - ) - - assert response.status_code == 200 - - workflow_0_variant_0 = response.json()["workflow_variant"] - - workflow_0_variant_0_revision_0_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_0_variant_0_revision_0_slug}", - "workflow_variant_id": workflow_0_variant_0["id"], - "workflow_id": workflow_0["id"], - } - }, - ) - - assert response.status_code == 200 - - workflow_0_variant_0_revision_0 = response.json()["workflow_revision"] - - workflow_1_variant_0_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_1_variant_0_slug}", - "workflow_id": workflow_1["id"], - } - }, - ) - - assert response.status_code == 200 - - workflow_1_variant_0 = response.json()["workflow_variant"] - - workflow_1_variant_0_revision_0_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_1_variant_0_revision_0_slug}", - "workflow_variant_id": workflow_1_variant_0["id"], - "workflow_id": workflow_1["id"], - } - }, - ) - - workflow_1_variant_0_revision_0 = response.json()["workflow_revision"] - - workflow_1_variant_1_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/variants/", - json={ - "workflow_variant": { - "slug": f"workflow-variant-{workflow_1_variant_1_slug}", - "workflow_id": workflow_1["id"], - }, - }, - ) - - workflow_1_variant_1 = response.json()["workflow_variant"] - - workflow_1_variant_1_revision_0_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_1_variant_1_revision_0_slug}", - "workflow_variant_id": workflow_1_variant_1["id"], - "workflow_id": workflow_1["id"], - } - }, - ) - - assert response.status_code == 200 - - workflow_1_variant_1_revision_0 = response.json()["workflow_revision"] - - workflow_1_variant_1_revision_1_slug = uuid4() - - response = authed_api( - "POST", - "/preview/workflows/revisions/", - json={ - "workflow_revision": { - "slug": f"workflow-revision-{workflow_1_variant_1_revision_1_slug}", - "workflow_variant_id": workflow_1_variant_1["id"], - "workflow_id": workflow_1["id"], - } - }, - ) - - assert response.status_code == 200 - - workflow_1_variant_1_revision_1 = response.json()["workflow_revision"] - # -------------------------------------------------------------------------- - - workflow_1_variant_0["revisions"] = [ - workflow_1_variant_0_revision_0, - ] - - workflow_1_variant_1["revisions"] = [ - workflow_1_variant_1_revision_0, - workflow_1_variant_1_revision_1, - ] - - workflow_1["variants"] = [ - workflow_1_variant_0, - workflow_1_variant_1, - ] - - workflow_0_variant_0["revisions"] = [ - workflow_0_variant_0_revision_0, - ] - - workflow_0["variants"] = [ - workflow_0_variant_0, - ] - - workflows = [ - workflow_0, - workflow_1, - ] - - _mock_data = { - "workflows": workflows, - } - - return _mock_data - - -class TestWorkflowVariantsQueries: - def test_retrieve_by_revision_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_revision_id={revision_id}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- - - def test_retrieve_by_revision_slug(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - revision_slug = mock_data["workflows"][1]["variants"][1]["revisions"][1]["slug"] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_revision_slug={revision_slug}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- - - def test_retrieve_by_variant_id_revision_version(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - variant_id = mock_data["workflows"][1]["variants"][1]["id"] - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - revision_version = mock_data["workflows"][1]["variants"][1]["revisions"][1][ - "version" - ] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_variant_id={variant_id}" - f"&workflow_revision_version={revision_version}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- - - def test_retrieve_by_variant_slug_revision_version(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - variant_slug = mock_data["workflows"][1]["variants"][1]["slug"] - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - revision_version = mock_data["workflows"][1]["variants"][1]["revisions"][1][ - "version" - ] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_variant_slug={variant_slug}" - f"&workflow_revision_version={revision_version}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- - - def test_retrieve_by_variant_id(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - variant_id = mock_data["workflows"][1]["variants"][1]["id"] - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_variant_id={variant_id}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- - - def test_retrieve_by_variant_slug(self, authed_api, mock_data): - # ACT ------------------------------------------------------------------ - variant_slug = mock_data["workflows"][1]["variants"][1]["slug"] - revision_id = mock_data["workflows"][1]["variants"][1]["revisions"][1]["id"] - - response = authed_api( - "GET", - f"/preview/workflows/revisions/retrieve" - f"?workflow_variant_slug={variant_slug}", - ) - - assert response.status_code == 200 - - response = response.json() - assert response["count"] == 1 - assert "workflow_revision" in response - revision = response["workflow_revision"] - assert revision["id"] == revision_id - # ---------------------------------------------------------------------- diff --git a/api/oss/tests/requirements.test.txt b/api/oss/tests/requirements.test.txt new file mode 100644 index 0000000000..a89e1f3d80 --- /dev/null +++ b/api/oss/tests/requirements.test.txt @@ -0,0 +1,9 @@ +pytest-asyncio==0.24.0 +pytest-xdist==3.6.1 +uvicorn==0.34.0 +requests==2.32.3 +pexpect==4.9.0 +boto3==1.35.87 +httpx>=0.24,<0.28 +python-dotenv==1.0.0 +fastapi>=0.100.0 \ No newline at end of file diff --git a/api/oss/tests/requirements.txt b/api/oss/tests/requirements.txt deleted file mode 100644 index 65bd60926d..0000000000 --- a/api/oss/tests/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -click -python-dotenv -requests>=2.32.4 -pytest -pytest-asyncio -pytest-cov -pytest-mock \ No newline at end of file diff --git a/api/oss/tests/legacy/run_backend_tests.sh b/api/oss/tests/run_backend_tests.sh similarity index 100% rename from api/oss/tests/legacy/run_backend_tests.sh rename to api/oss/tests/run_backend_tests.sh diff --git a/api/oss/src/apis/fastapi/invocations/__init__.py b/api/oss/tests/sdk/__init__.py similarity index 100% rename from api/oss/src/apis/fastapi/invocations/__init__.py rename to api/oss/tests/sdk/__init__.py diff --git a/api/oss/src/apis/fastapi/queries/__init__.py b/api/oss/tests/sdk/apps/__init__.py similarity index 100% rename from api/oss/src/apis/fastapi/queries/__init__.py rename to api/oss/tests/sdk/apps/__init__.py diff --git a/api/oss/tests/sdk/apps/tests.py b/api/oss/tests/sdk/apps/tests.py new file mode 100644 index 0000000000..347073fcf1 --- /dev/null +++ b/api/oss/tests/sdk/apps/tests.py @@ -0,0 +1,429 @@ +import uuid + +import pytest +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestAppsManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_create_app_successfully(self, http_client, setup_class_fixture): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ASSERT + assert response.app_name == app_name + assert isinstance( + response.model_dump(), dict + ), "Response data is not a dictionary." + + # CLEANUP + await delete_application( + http_client, response.app_id, {"Authorization": scope_credentials} + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_app_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.AppManager.acreate( + project_id=scope_project_id, + ) + + # ASSERT + assert ( + response + == "TypeError: AppManager.create() missing 1 required keyword-only argument: 'app_name'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_create_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_name = str(uuid.uuid4()) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_member_credentials", "" + # ) + # ag.init(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.acreate( + # app_name=app_name, + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.functional + async def test_create_app_unsuccessfully_due_to_invalid_credentials( + self, setup_class_fixture + ): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + ag.init(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_list_apps_successfully(self, http_client, setup_class_fixture): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials" + ) + ag.init(api_key=scope_credentials.strip("ApiKey ")) + await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ACT + list_apps_response = await ag.AppManager.alist() + + # ASSERT + assert len(list_apps_response) >= 1 + assert isinstance(list_apps_response, list) + + # CLEANUP + for app_response in list_apps_response: + await delete_application( + http_client, app_response.app_id, {"Authorization": scope_credentials} + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_list_apps_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # non_member_headers = {"Authorization": non_member_credentials} + + # # ACT + # response = await http_client.get( + # f"apps/?project_id={scope_project_id}", + # headers=non_member_headers, + # ) + # response_data = response.json() + + # # ASSERT + # assert response.status_code == 403 + # assert ( + # response_data["detail"] + # == "You do not have access to perform this action. Please contact your organization admin." + # ) + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_list_apps_unsuccessfully_due_to_invalid_credentials(self): + # ARRANGE + ag.init(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.alist() + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_update_app_successfully(self, setup_class_fixture): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + app_id = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_id", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.aupdate( + app_id=app_id, + app_name=app_name, + ) + + # ASSERT + assert response.app_name == app_name + assert isinstance(response.model_dump(), dict) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_update_app_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.AppManager.aupdate( + application_id=app_id, + ) + + # ASSERT + assert ( + response + == "TypeError: AppManager.aupdate() got an unexpected keyword argument 'application_id'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_update_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.aupdate( + # app_id=app_id, + # app_name=app_name, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_update_app_unsuccessfully_due_to_invalid_credentials( + self, setup_class_fixture + ): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + initialize_agenta(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.aupdate( + app_id=app_id, + app_name=app_name, + ) + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.functional + @pytest.mark.typical + async def test_update_app_unsuccessfully_due_to_invalid_app_id( + self, setup_class_fixture + ): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + invalid_app_id = str(uuid.uuid4()) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.aupdate( + app_id=invalid_app_id, + app_name=app_name, + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == { + "detail": f"No application with ID '{invalid_app_id}' found" + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_delete_app_successfully(self, setup_class_fixture): + # ARRANGE + app_id = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_id", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.adelete( + app_id=app_id, + ) + + # ASSERT + assert response is None + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_delete_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.adelete( + # app_id=app_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.functional + async def test_delete_app_unsuccessfully_due_to_invalid_app_id( + self, setup_class_fixture + ): + # ARRANGE + invalid_app_id = str(uuid.uuid4()) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.adelete( + app_id=invalid_app_id, + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == { + "detail": f"No application with ID '{invalid_app_id}' found" + } diff --git a/api/oss/src/apis/fastapi/testcases/__init__.py b/api/oss/tests/sdk/deployments/__init__.py similarity index 100% rename from api/oss/src/apis/fastapi/testcases/__init__.py rename to api/oss/tests/sdk/deployments/__init__.py diff --git a/api/oss/tests/sdk/deployments/tests.py b/api/oss/tests/sdk/deployments/tests.py new file mode 100644 index 0000000000..d1be029685 --- /dev/null +++ b/api/oss/tests/sdk/deployments/tests.py @@ -0,0 +1,154 @@ +import pytest + +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestDeploymentManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_deploy_success_with_variant_ref_slug(self, setup_class_fixture): + # ARRANGE + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.DeploymentManager.adeploy( + variant_slug=variant_slug, + environment_slug="production", + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_deploy_not_successful_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.DeploymentManager.adeploy( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: DeploymentManager.adeploy() missing 1 required keyword-only argument: 'environment_slug'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_deploy_not_successful_due_to_no_config(self, setup_class_fixture): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.DeploymentManager.adeploy( + variant_slug="default.appvariant", + variant_version=3, + environment_slug="production", + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_deploy_not_successful_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = fetch_variant_revision(http_client, headers, variant_id) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # ag.init(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.DeploymentManager.adeploy( + # variant_slug=variant_revision.get("config_name"), + # variant_version=variant_revision.get("revision", None), + # environment_slug="production", + # # scope arguments + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } diff --git a/api/oss/src/core/annotations/__init__.py b/api/oss/tests/sdk/secrets/__init__.py similarity index 100% rename from api/oss/src/core/annotations/__init__.py rename to api/oss/tests/sdk/secrets/__init__.py diff --git a/api/oss/tests/sdk/secrets/tests.py b/api/oss/tests/sdk/secrets/tests.py new file mode 100644 index 0000000000..ffc8e04fa3 --- /dev/null +++ b/api/oss/tests/sdk/secrets/tests.py @@ -0,0 +1,103 @@ +import pytest + +from tests.conftest import * + + +class TestSecretsCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_completion_generate_with_valid_secrets_and_invalid_scope( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_valid_llm_keys(http_client, headers) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + non_member_credentials = setup_class_fixture["app_variant_response"].get( + "non_scope_credentials", None + ) + non_member_headers = {"Authorization": non_member_credentials} + + # ACT + response = await http_client.post( + f"{service_url}/test?project_id={scope_project_id}", + json=payload, + headers=non_member_headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 403 + assert response_data["detail"] == "Service execution not allowed." + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_completion_generate_with_valid_secrets( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_valid_llm_keys(http_client, headers) + + # ACT + response = await http_client.post( + f"{service_url}/test", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_completion_generate_with_invalid_secrets( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_invalid_llm_keys(http_client, headers) + + # ACT + response = await http_client.post( + f"{service_url}/test?middleware_cache_enabled=false", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 401 + assert ( + "litellm.AuthenticationError: AuthenticationError: OpenAIException" + in response_data["detail"].get("message", "") + ) diff --git a/api/oss/src/core/applications/__init__.py b/api/oss/tests/sdk/variants/__init__.py similarity index 100% rename from api/oss/src/core/applications/__init__.py rename to api/oss/tests/sdk/variants/__init__.py diff --git a/api/oss/tests/sdk/variants/tests.py b/api/oss/tests/sdk/variants/tests.py new file mode 100644 index 0000000000..771d0ee25f --- /dev/null +++ b/api/oss/tests/sdk/variants/tests.py @@ -0,0 +1,502 @@ +import uuid + +import pytest +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestVariantManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_create_variant_successfully( + self, setup_class_fixture, valid_parameters_payload + ): + # ARRANGE + payload = valid_parameters_payload + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + new_variant_slug = f"{variant_slug}_{uuid.uuid4().hex[:4]}" + + # ACT + response = await ag.VariantManager.acreate( + parameters=payload, + variant_slug=new_variant_slug, + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert new_variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_variant_unsuccessfully_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.acreate( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: VariantManager.acreate() missing 1 required keyword-only argument: 'parameters'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_variant_unsuccessfully_due_to_no_config( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.VariantManager.acreate( + parameters={}, + variant_slug="default.appvariant", + app_id=str(uuid.uuid4().hex), + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_create_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture, valid_parameters_payload + # ): + # # ARRANGE + # payload = valid_parameters_payload + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # application_name = ( + # setup_class_fixture["app_variant_response"] + # .get("app", {}) + # .get("app_name", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.acreate( + # parameters=payload, + # variant_slug=variant_revision.get("config_name"), + # app_slug=application_name, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_commit_variant_successfully( + self, setup_class_fixture, valid_parameters_payload + ): + # ARRANGE + payload = valid_parameters_payload + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.acommit( + parameters=payload, + variant_slug=variant_slug, + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_commit_variant_unsuccessfully_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.acommit( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: VariantManager.acommit() missing 1 required keyword-only argument: 'parameters'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_commit_variant_unsuccessfully_due_to_no_config( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.VariantManager.acommit( + parameters={}, + variant_slug="default.appvariant", + app_id=str(uuid.uuid4().hex), + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_commit_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.acommit( + # variant_slug=variant_revision.get("config_name"), + # variant_version=variant_revision.get("revision", None), + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_list_variants_successfully(self, setup_class_fixture): + # ARRANGE + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.alist( + app_slug=application_name, + ) + + # ASSERT + assert response is not None + assert isinstance(response, list) + assert len(response) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_list_variants_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.alist(application_slug="name") + + # ASSERT + assert ( + response + == "TypeError: VariantManager.alist() got an unexpected keyword argument 'application_slug'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_list_variants_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.alist( + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_delete_variant_successfully(self, setup_class_fixture): + # ARRANGE + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.adelete( + variant_slug=variant_slug, + ) + + # ASSERT + assert response is not None + assert response == 204 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_delete_variant_unsuccessfully_due_to_non_existent_config( + self, http_client, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.adelete(variant_slug=str(uuid.uuid4().hex)) + + # ASSERT + assert response == 204 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_delete_variant_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.adelete() + + # ASSERT + assert ( + response + == "TypeError: VariantManager.adelete() missing 1 required keyword-only argument: 'variant_slug'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_delete_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.adelete( + # variant_slug=variant_revision.get("config_name"), + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } diff --git a/api/oss/src/core/evaluations/__init__.py b/api/oss/tests/testsets/__init__.py similarity index 100% rename from api/oss/src/core/evaluations/__init__.py rename to api/oss/tests/testsets/__init__.py diff --git a/api/oss/tests/legacy/testsets/assets/baby_names.csv b/api/oss/tests/testsets/assets/baby_names.csv similarity index 100% rename from api/oss/tests/legacy/testsets/assets/baby_names.csv rename to api/oss/tests/testsets/assets/baby_names.csv diff --git a/api/oss/tests/legacy/testsets/fixtures.py b/api/oss/tests/testsets/fixtures.py similarity index 100% rename from api/oss/tests/legacy/testsets/fixtures.py rename to api/oss/tests/testsets/fixtures.py diff --git a/api/oss/tests/legacy/testsets/tests.py b/api/oss/tests/testsets/tests.py similarity index 100% rename from api/oss/tests/legacy/testsets/tests.py rename to api/oss/tests/testsets/tests.py diff --git a/api/oss/tests/legacy/vault_router/__pytest.ini b/api/oss/tests/vault_router/__pytest.ini similarity index 100% rename from api/oss/tests/legacy/vault_router/__pytest.ini rename to api/oss/tests/vault_router/__pytest.ini diff --git a/api/oss/tests/legacy/vault_router/conftest.py b/api/oss/tests/vault_router/conftest.py similarity index 100% rename from api/oss/tests/legacy/vault_router/conftest.py rename to api/oss/tests/vault_router/conftest.py diff --git a/api/oss/tests/legacy/vault_router/test_vault_secrets_apis.py b/api/oss/tests/vault_router/test_vault_secrets_apis.py similarity index 100% rename from api/oss/tests/legacy/vault_router/test_vault_secrets_apis.py rename to api/oss/tests/vault_router/test_vault_secrets_apis.py diff --git a/api/oss/src/core/invocations/__init__.py b/api/oss/tests/workflows/__init__.py similarity index 100% rename from api/oss/src/core/invocations/__init__.py rename to api/oss/tests/workflows/__init__.py diff --git a/api/oss/src/core/queries/__init__.py b/api/oss/tests/workflows/admin/__init__.py similarity index 100% rename from api/oss/src/core/queries/__init__.py rename to api/oss/tests/workflows/admin/__init__.py diff --git a/api/oss/tests/legacy/workflows/admin/tests.py b/api/oss/tests/workflows/admin/tests.py similarity index 100% rename from api/oss/tests/legacy/workflows/admin/tests.py rename to api/oss/tests/workflows/admin/tests.py diff --git a/api/oss/src/core/secrets/__init__.py b/api/oss/tests/workflows/auth/__init__.py similarity index 100% rename from api/oss/src/core/secrets/__init__.py rename to api/oss/tests/workflows/auth/__init__.py diff --git a/api/oss/tests/legacy/workflows/auth/tests.py b/api/oss/tests/workflows/auth/tests.py similarity index 100% rename from api/oss/tests/legacy/workflows/auth/tests.py rename to api/oss/tests/workflows/auth/tests.py diff --git a/api/oss/src/dbs/postgres/evaluations/__init__.py b/api/oss/tests/workflows/config/__init__.py similarity index 100% rename from api/oss/src/dbs/postgres/evaluations/__init__.py rename to api/oss/tests/workflows/config/__init__.py diff --git a/api/oss/tests/workflows/config/tests.py b/api/oss/tests/workflows/config/tests.py new file mode 100644 index 0000000000..805f784b2b --- /dev/null +++ b/api/oss/tests/workflows/config/tests.py @@ -0,0 +1,286 @@ +import uuid + +import pytest + +from tests.conftest import ( + fetch_variant_revision, + set_valid_llm_keys, + fetch_app_environment_revisions, +) + + +class TestServiceConfig: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, http_client, get_mock_response, create_app_and_variant + ): + app_variant_response = create_app_and_variant + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return app_variant_response + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_refs(self, http_client, setup_class_fixture): + # ARRANGE + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id=&application_slug=&variant_id=&variant_slug=&environment_id=&environment_slug=&environment_version=", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_ref_and_variant_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_version = 0 + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + custom_headers = {"Authorization": setup_class_fixture.get("credentials", None)} + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello&variant_slug={variant_slug}&variant_version={variant_version}", + json=payload, + headers=custom_headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_ref_and_environment_ref_id( + self, http_client, setup_class_fixture + ): + # ARRANGE + environment_id = None + environment_slug = None + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_and_invalid_variant_ref( + self, http_client, setup_class_fixture + ): + # ARRANGE + variant_id = str(uuid.uuid4()) + variant_slug = "my-variant" + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_and_invalid_environment_ref( + self, http_client, setup_class_fixture + ): + # ARRANGE + environment_id = str(uuid.uuid4()) + environment_slug = "pre-production" + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_variant_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + variant_revision_id = variant_revision.get("id", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?variant_id={variant_revision_id}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_variant_ref_excluding_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_version = 1 # this is 1 because there's a fixture that creates it + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id=&application_slug=&variant_version={variant_version}&variant_slug={variant_slug}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_environment_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + app_id = setup_class_fixture.get("app", {}).get("app_id", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + environment_revisions = await fetch_app_environment_revisions( + http_client, app_id, "production", headers + ) + environment_revision_id = environment_revisions.get("revisions")[-1].get( + "id", "" + ) + + # ACT + response = await http_client.post( + f"{service_url}/test?environment_id={environment_revision_id}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_environment_ref_excluding_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + environment_version = 1 # this is 1 because there's a fixture that creates it + environment_slug = ( + "production" # by default, this gets created along with the variant + ) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?environment_version={environment_version}&environment_slug={environment_slug}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 diff --git a/api/oss/src/dbs/postgres/queries/__init__.py b/api/oss/tests/workflows/core/__init__.py similarity index 100% rename from api/oss/src/dbs/postgres/queries/__init__.py rename to api/oss/tests/workflows/core/__init__.py diff --git a/api/oss/tests/workflows/core/tests.py b/api/oss/tests/workflows/core/tests.py new file mode 100644 index 0000000000..d5bee2fa93 --- /dev/null +++ b/api/oss/tests/workflows/core/tests.py @@ -0,0 +1,242 @@ +import uuid + +import pytest + +from tests.conftest import * + + +class TestServiceCore: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + return app_variant_response + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_config(self, http_client, setup_class_fixture): + # ARRANGE + variant_id = None + variant_slug = None + application_id = None + application_slug = None + environment_id = None + environment_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_available_config_with_invalid_config( + self, http_client, setup_class_fixture + ): + # ARRANGE + variant_id = str(uuid.uuid4()) + variant_slug = "new-variant" + application_id = str(uuid.uuid4()) + application_slug = "my-app" + environment_id = str(uuid.uuid4()) + environment_slug = "pre-production" + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_variables(self, http_client, setup_class_fixture): + # ARRANGE + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + application_id = setup_class_fixture.get("app", {}).get("app_id", None) + application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json={}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data.get("detail") == [ + { + "input": None, + "loc": ["body", "inputs"], + "msg": "Field required", + "type": "missing", + } + ] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_available_variables_with_invalid_variables( + self, http_client, invalid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + expected_status = 422 + payload = invalid_run_generate_payload + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + application_id = setup_class_fixture.get("app", {}).get("app_id", None) + application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json=payload, + ) + response_data = response.json().get("detail", []) + + # ASSERT + assert response.status_code == expected_status + assert response_data[0].get("msg") == "Field required" + assert isinstance(response_data, list) + assert response_data[0].get("loc") == ["body", "inputs"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_model( + self, http_client, valid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + payload = valid_run_generate_payload + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/test", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 424 + assert "API key not found for model" in response_data["detail"].get( + "message", None + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + @pytest.mark.not_available_in_oss + async def test_missing_provider_key( + self, + http_client, + setup_class_fixture, + ): + # ARRANGE + expected_status = 422 + app_variant_response = setup_class_fixture + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # ACT + response = await http_client.post( + "vault/v1/secrets", + json={ + "header": {"name": "OpenAI", "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + response_data = response.json().get("detail", []) + + # ASSERT + assert response.status_code == expected_status + assert response_data[0].get("msg") == "Field required" + assert isinstance(response_data, list) + assert response_data[0].get("loc") == [ + "body", + "secret", + "data", + "provider", + ] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.security + @pytest.mark.not_available_in_oss + async def test_available_provider_key_with_invalid_provider_key( + self, + http_client, + setup_class_fixture, + ): + # ARRANGE + app_variant_response = setup_class_fixture + llm_api_keys_names = list(API_KEYS_MAPPING.keys()) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # ACT + list_of_status_codes = [] + for llm_api_key_name in llm_api_keys_names: + response = await http_client.post( + "vault/v1/secrets", + json={ + "header": {"name": llm_api_key_name, "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": "", + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + list_of_status_codes.append(response.status_code) + + # ASSERT + assert list_of_status_codes.count(422) == 12 diff --git a/api/oss/src/dbs/postgres/tracing/__init__.py b/api/oss/tests/workflows/health/__init__.py similarity index 100% rename from api/oss/src/dbs/postgres/tracing/__init__.py rename to api/oss/tests/workflows/health/__init__.py diff --git a/api/oss/tests/legacy/workflows/health/tests.py b/api/oss/tests/workflows/health/tests.py similarity index 100% rename from api/oss/tests/legacy/workflows/health/tests.py rename to api/oss/tests/workflows/health/tests.py diff --git a/api/oss/src/tasks/__init__.py b/api/oss/tests/workflows/litellm/__init__.py similarity index 100% rename from api/oss/src/tasks/__init__.py rename to api/oss/tests/workflows/litellm/__init__.py diff --git a/api/oss/tests/workflows/litellm/tests.py b/api/oss/tests/workflows/litellm/tests.py new file mode 100644 index 0000000000..a111e02498 --- /dev/null +++ b/api/oss/tests/workflows/litellm/tests.py @@ -0,0 +1,159 @@ +import pytest + +from tests.conftest import * + + +class TestLitellmCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_completion_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_chat_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_chat_generate_with_multiple_messages( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "messages": [ + {"role": "assistant", "content": "You are an expert in Geography."}, + {"role": "user", "content": "What is the capital of {country}?"}, + {"role": "assistant", "content": "The capital of France is Paris."}, + { + "role": "user", + "content": "How many states are there in {country}?", + }, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.slow + @pytest.mark.functional + async def test_completion_generate_with_all_models( + self, + http_client, + valid_run_generate_payload, + setup_class_fixture, + get_all_supported_models, + ): + # ARRANGE + payload = valid_run_generate_payload + headers = setup_class_fixture["headers"] + service_url = setup_class_fixture["service_url"] + supported_models = get_all_supported_models + number_of_working_models = 28 + + # ACT + list_of_status_codes = [] + for supported_model in supported_models: + payload["ag_config"]["prompt"]["llm_config"]["model"] = supported_model + response = await http_client.post( + f"{service_url}/test", + json=payload, + headers=headers, + ) + list_of_status_codes.append(response.status_code) + + # ASSERT + assert list_of_status_codes.count(200) == number_of_working_models + # assert list_of_status_codes.count(424) == ( + # len(supported_models) - number_of_working_models + # ) diff --git a/api/oss/src/tasks/evaluations/__init__.py b/api/oss/tests/workflows/mock/__init__.py similarity index 100% rename from api/oss/src/tasks/evaluations/__init__.py rename to api/oss/tests/workflows/mock/__init__.py diff --git a/api/oss/tests/workflows/mock/chat_tests.py b/api/oss/tests/workflows/mock/chat_tests.py new file mode 100644 index 0000000000..cd4b3a018a --- /dev/null +++ b/api/oss/tests/workflows/mock/chat_tests.py @@ -0,0 +1,187 @@ +import pytest + +from tests.conftest import * + + +class TestMockChat: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_chat_app_and_variant, http_client + ): + app_variant_response = create_chat_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate_with_multiple_messages( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "messages": [ + {"role": "assistant", "content": "You are an expert in Geography."}, + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + assert response_data["data"] == "content='world'" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data == { + "detail": [ + { + "type": "missing", + "loc": ["body", "inputs"], + "msg": "Field required", + "input": None, + } + ] + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_run_with_invalid_inputs(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={"input": {"messages": "What is the capital of France?"}}, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_test(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + assert response_data["data"] == "content='world'" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_test_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "inputs": [ + {"role": "user", "content": "What is the capital of France?"} + ] + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data == { + "detail": [ + { + "type": "missing", + "loc": ["body", "messages"], + "msg": "Field required", + "input": None, + } + ] + } diff --git a/api/oss/tests/workflows/mock/completion_tests.py b/api/oss/tests/workflows/mock/completion_tests.py new file mode 100644 index 0000000000..89e9a1b5ed --- /dev/null +++ b/api/oss/tests/workflows/mock/completion_tests.py @@ -0,0 +1,152 @@ +import pytest + +from tests.conftest import * + + +class TestMockCompletion: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_run(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + assert response_data["data"] == "world" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_run_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "input": {"country_name": "France"}, + }, + headers=headers, + ) + + # ASSERT + assert response.status_code == 422 + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_test(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + assert response_data["data"] == "world" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_test_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "messages": ["France"], + "input": {"country_name": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 diff --git a/api/oss/tests/legacy/admin/__init__.py b/api/oss/tests/workflows/observability/__init__.py similarity index 100% rename from api/oss/tests/legacy/admin/__init__.py rename to api/oss/tests/workflows/observability/__init__.py diff --git a/api/oss/tests/workflows/observability/test_otlp_ingestion.py b/api/oss/tests/workflows/observability/test_otlp_ingestion.py new file mode 100644 index 0000000000..be6e2d652f --- /dev/null +++ b/api/oss/tests/workflows/observability/test_otlp_ingestion.py @@ -0,0 +1,253 @@ +# /// script +# dependencies = ["pytest", "httpx", "opentelemetry-proto"] +# /// +import pytest +import httpx +import datetime +import time # For nanosecond conversion if datetime.timestamp() alone isn't precise enough +import secrets # For generating random hex strings for IDs +from datetime import timedelta # For adjusting timestamps +import copy # For deep copying span data templates + +# OpenTelemetry Protobuf imports - adjust paths if your generated files are elsewhere +from opentelemetry.proto.trace.v1 import trace_pb2 +from opentelemetry.proto.common.v1 import common_pb2 +from opentelemetry.proto.resource.v1 import resource_pb2 +from opentelemetry.proto.collector.trace.v1 import trace_service_pb2 # For TracesData + +# --- Test Configuration --- +# Replace with your actual Agenta API URL and Key +AGENTA_API_URL = "http://localhost/api" # Example: "https://your.agenta.host/api" +AGENTA_API_KEY = "Oh4jfy3n.6e76264498ea4057363ed780bac2beef45dcedc139af54f65dcc0d9e1076ce3b" # Example: "ak_xxxxxxxxxxxxxxxxxxxx" + +OTLP_ENDPOINT_PATH = "/otlp/v1/traces" +# TEST_PROJECT_ID was here, removed as auth is via API Key primarily + +# --- Base Span Data Definitions (Templates) --- +# These are templates; IDs and timestamps will be generated dynamically per test case. + +# This was SPAN_2_LOG_DATA (parent span template) +BASE_PARENT_SPAN_DATA = { + "name": 'main2', + "kind_str": 'SPAN_KIND_SERVER', + "status_code_str": 'STATUS_CODE_UNSET', + "status_message": None, + "attributes": { + 'ag.type.node': 'workflow', + 'ag.data.inputs.topic': 'df', + 'ag.data.inputs.genre': 'd', + 'ag.data.inputs.count': 1, + 'ag.data.internals.topic': 'df', + 'ag.data.internals.genre': 'd', + 'ag.data.internals.count': 1, + 'ag.meta.topic': 'df', + 'ag.meta.genre': 'd', + 'ag.meta.count': 1, + 'ag.refs.environment.slug': 'production', + 'ag.data.outputs.__default__': "('df', 'd', 1)" + }, + # Dynamic fields to be added: trace_id_hex, span_id_hex, parent_span_id_hex (None for root), start_time, end_time +} + +# This was SPAN_1_LOG_DATA (child span template) +BASE_CHILD_SPAN_DATA = { + "name": 'llm_function', + "kind_str": 'SPAN_KIND_CLIENT', + "status_code_str": 'STATUS_CODE_UNSET', + "status_message": None, + "attributes": { + 'ag.type.node': 'chat', + 'ag.data.inputs.topic': 'df', + 'ag.data.inputs.genre': 'd', + 'ag.data.inputs.count': 1, + 'ag.data.internals.topic2': 'df', + 'ag.data.internals.genre2': 'd', + 'ag.data.internals.count2': 1, + 'ag.data.outputs.__default__': "('df', 'd', 1)" + }, + # Dynamic fields to be added: trace_id_hex, span_id_hex, parent_span_id_hex, start_time, end_time +} + +# --- Test Scenarios Definition --- +TEST_SCENARIOS = [ + { + "name": "basic_parent_child", + "description": "A simple trace with one parent span and one child span.", + "parent_template": BASE_PARENT_SPAN_DATA, + "child_template": BASE_CHILD_SPAN_DATA, # Child is present for this scenario + }, + # Example of a future single-span scenario: + # { + # "name": "single_root_span", + # "description": "A trace with only a single root span.", + # "parent_template": BASE_PARENT_SPAN_DATA, + # "child_template": None, # No child for this scenario + # }, +] + +# --- Helper Functions --- +def _datetime_to_unix_nano(dt: datetime.datetime) -> int: + """Converts a datetime object to UNIX nanoseconds.""" + return int(dt.timestamp() * 1_000_000_000) + +def _hex_to_bytes(hex_str: str) -> bytes: + """Converts a hex string (optionally prefixed with 0x) to bytes.""" + if hex_str.startswith('0x'): + return bytes.fromhex(hex_str[2:]) + return bytes.fromhex(hex_str) + +def _create_any_value(value) -> common_pb2.AnyValue: + """Creates an AnyValue protobuf message from a Python value.""" + if isinstance(value, str): + return common_pb2.AnyValue(string_value=value) + elif isinstance(value, bool): + return common_pb2.AnyValue(bool_value=value) + elif isinstance(value, int): + return common_pb2.AnyValue(int_value=value) + elif isinstance(value, float): + return common_pb2.AnyValue(double_value=value) + # Add other types (array, kvlist) if needed + else: + # For testing, convert unknown types to string representation + # In a real scenario, you might want to raise an error or handle more types + return common_pb2.AnyValue(string_value=str(value)) + +def convert_span_data_to_proto(span_data: dict) -> trace_pb2.Span: + """Converts a Python dictionary with span data to an OTLP Span protobuf object.""" + + attributes_proto = [] + if span_data.get("attributes"): + for k, v in span_data["attributes"].items(): + attributes_proto.append(common_pb2.KeyValue(key=k, value=_create_any_value(v))) + + status_proto = trace_pb2.Status( + code=trace_pb2.Status.StatusCode.Value(span_data["status_code_str"]) + ) + if span_data.get("status_message"): + status_proto.message = span_data["status_message"] + + parent_span_id_bytes = b'' + if span_data.get("parent_span_id_hex"): + parent_span_id_bytes = _hex_to_bytes(span_data["parent_span_id_hex"]) + + return trace_pb2.Span( + trace_id=_hex_to_bytes(span_data["trace_id_hex"]), + span_id=_hex_to_bytes(span_data["span_id_hex"]), + parent_span_id=parent_span_id_bytes, + name=span_data["name"], + kind=trace_pb2.Span.SpanKind.Value(span_data["kind_str"]), + start_time_unix_nano=_datetime_to_unix_nano(span_data["start_time"]), + end_time_unix_nano=_datetime_to_unix_nano(span_data["end_time"]), + attributes=attributes_proto, + status=status_proto, + # events and links can be added here if needed + ) + +# --- Pytest Test Case (Parametrized) --- +@pytest.mark.parametrize("scenario", TEST_SCENARIOS, ids=[s["name"] for s in TEST_SCENARIOS]) +@pytest.mark.asyncio +async def test_send_spans_to_otlp_endpoint(scenario): + """Tests sending spans defined in a scenario to the OTLP ingestion endpoint.""" + print(f"\nRunning test scenario: {scenario['name']} - {scenario['description']}") + + parent_log_data_template = scenario["parent_template"] + child_log_data_template = scenario.get("child_template") # Use .get() for future scenarios + + # --- Generate dynamic IDs and Timestamps --- + now = datetime.datetime.now(datetime.timezone.utc) + dynamic_trace_id_hex = secrets.token_hex(16) + parent_span_id_hex = secrets.token_hex(8) + + processed_spans_proto = [] + + # Process Parent Span + parent_start_time = now + # Default parent end time; will be adjusted if child needs to fit + parent_end_time = parent_start_time + timedelta(microseconds=300) + + dynamic_parent_data = copy.deepcopy(parent_log_data_template) + dynamic_parent_data.update({ + "trace_id_hex": dynamic_trace_id_hex, + "span_id_hex": parent_span_id_hex, + "parent_span_id_hex": None, # Parent is root + "start_time": parent_start_time, + # End time will be finalized after potential child processing + }) + + # Process Child Span (if it exists in the scenario) + if child_log_data_template: + child_span_id_hex = secrets.token_hex(8) + child_start_time = parent_start_time + timedelta(microseconds=100) + child_end_time = child_start_time + timedelta(microseconds=100) # Child duration + + # Adjust parent's end time to ensure it encompasses the child + parent_end_time = max(parent_end_time, child_end_time + timedelta(microseconds=50)) + + dynamic_child_data = copy.deepcopy(child_log_data_template) + dynamic_child_data.update({ + "trace_id_hex": dynamic_trace_id_hex, + "span_id_hex": child_span_id_hex, + "parent_span_id_hex": parent_span_id_hex, # Link to parent + "start_time": child_start_time, + "end_time": child_end_time, + }) + span_proto_child = convert_span_data_to_proto(dynamic_child_data) + processed_spans_proto.append(span_proto_child) + + # Finalize parent's end time and create its proto + dynamic_parent_data["end_time"] = parent_end_time + span_proto_parent = convert_span_data_to_proto(dynamic_parent_data) + + # Ensure parent is first if both exist, then child. If only parent, just parent. + if child_log_data_template: + final_spans_for_otlp = [span_proto_parent, processed_spans_proto[0]] # Assuming child was added + else: + final_spans_for_otlp = [span_proto_parent] + + # Create TracesData structure + traces_data = trace_pb2.TracesData( + resource_spans=[ + trace_pb2.ResourceSpans( + resource=resource_pb2.Resource( + attributes=[ + common_pb2.KeyValue( + key="service.name", + value=common_pb2.AnyValue(string_value="pytest-otel-sender") + ) + ] + ), + scope_spans=[ + trace_pb2.ScopeSpans( + scope=common_pb2.InstrumentationScope(name="test_scope"), + spans=final_spans_for_otlp + ) + ] + ) + ] + ) + + otlp_payload = traces_data.SerializeToString() + headers = { + "Content-Type": "application/x-protobuf", + "Authorization": f"ApiKey {AGENTA_API_KEY}" + } + full_otlp_endpoint = f"{AGENTA_API_URL.rstrip('/')}{OTLP_ENDPOINT_PATH}" + + async with httpx.AsyncClient() as client: + response = await client.post(full_otlp_endpoint, content=otlp_payload, headers=headers) + + assert response.status_code == 202, f"Request failed: {response.status_code} - {response.text}" + + response_json = response.json() + assert response_json.get("status") == "processing", f"Unexpected status: {response_json.get('status')}" + assert "version" in response_json, "Version missing in response" + + print(f"Successfully sent OTLP data for scenario '{scenario['name']}'. Response: {response_json}") + +# To run this test: +# 1. Ensure Agenta backend is running locally (e.g., `docker-compose up agenta-backend`). +# 2. Install dependencies: `pip install pytest httpx opentelemetry-proto` +# 3. Set TEST_PROJECT_ID at the top of this file if your backend requires a specific one for manual testing. +# Alternatively, ensure your middleware handles a dummy ID gracefully or set up a test project. +# 4. Run pytest from the root of the `agenta_cloud` repository: +# `pytest api/oss/tests/manual/tracing/test_otlp_ingestion.py` diff --git a/api/oss/tests/workflows/observability/tests.py b/api/oss/tests/workflows/observability/tests.py new file mode 100644 index 0000000000..700f80e4b6 --- /dev/null +++ b/api/oss/tests/workflows/observability/tests.py @@ -0,0 +1,75 @@ +import pytest + +from tests.conftest import * + + +class TestObservabilityCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_completion_generate_observability_tree( + self, http_client, valid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + + # ACT + response = await http_client.post( + f"{service_url}/test", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "tree" in response_data + + # Get observability tree + trace_responses = await fetch_trace_by_trace_id( + http_client, headers, project_id=project_id + ) + + # Compare tree structures + workflow_response = response_data + observability_response = trace_responses + + # Step 1: Exclude lifecycle attribute from response(s) + workflow_response_final = exclude_lifecycle(workflow_response) + observability_response_final = exclude_lifecycle(observability_response) + + # Step 2: Compare structures with Jest-like matcher + workflow_nodes = workflow_response_final.get("tree", {}).get("nodes", []) + observability_nodes = observability_response_final.get("trees", {})[0].get( + "nodes", [] + ) + + is_match = exact_match(workflow_nodes, observability_nodes) + assert ( + is_match is True + ), "Workflow nodes does not match nodes from observability" diff --git a/api/oss/tests/legacy/apps/__init__.py b/api/oss/tests/workflows/openapi/__init__.py similarity index 100% rename from api/oss/tests/legacy/apps/__init__.py rename to api/oss/tests/workflows/openapi/__init__.py diff --git a/api/oss/tests/legacy/workflows/openapi/tests.py b/api/oss/tests/workflows/openapi/tests.py similarity index 100% rename from api/oss/tests/legacy/workflows/openapi/tests.py rename to api/oss/tests/workflows/openapi/tests.py diff --git a/api/oss/tests/legacy/auth/__init__.py b/api/oss/tests/workflows/permissions/__init__.py similarity index 100% rename from api/oss/tests/legacy/auth/__init__.py rename to api/oss/tests/workflows/permissions/__init__.py diff --git a/api/oss/tests/workflows/permissions/tests.py b/api/oss/tests/workflows/permissions/tests.py new file mode 100644 index 0000000000..fc41828481 --- /dev/null +++ b/api/oss/tests/workflows/permissions/tests.py @@ -0,0 +1,75 @@ +import pytest + +from tests.conftest import * + + +class TestMockCompletion: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant, http_client): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.security + @pytest.mark.not_available_in_oss + async def test_permissions_principal_not_in_scope( + self, http_client, setup_class_fixture + ): + # Arrange: Prepare data + expected_status = 403 + description = "Principal not in scope for POST" + service_url = setup_class_fixture["service_url"] + app_variant_response = setup_class_fixture["app_variant_response"] + user_scope_project_id = app_variant_response.get("scope_project_id") + non_member_credentials = app_variant_response.get("non_member_credentials", "") + non_member_headers = {"Authorization": non_member_credentials} + await set_valid_llm_keys(client=http_client, headers=non_member_headers) + + # Act + response = await http_client.post( + f"{service_url}/test?project_id={user_scope_project_id}", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=non_member_headers, + ) + response_data = response.json() + + # Assert: Verify the response + assert ( + response.status_code == expected_status + ), f"Failed for case: {description}" + assert ( + response.json().get("detail") == "Service execution not allowed." + ), f"Failed for case: {description}" diff --git a/api/poetry.lock b/api/poetry.lock index db46b33049..ce0c841e67 100644 --- a/api/poetry.lock +++ b/api/poetry.lock @@ -1,42 +1,46 @@ -# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] -name = "agenta" -version = "0.61.0" -description = "The SDK for agenta is an open-source LLMOps platform." +name = "aioboto3" +version = "12.4.0" +description = "Async boto3 wrapper" optional = false -python-versions = "<4.0,>=3.11" +python-versions = "<4.0,>=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "agenta-0.61.0-py3-none-any.whl", hash = "sha256:b530a174b01ea76b1a9773a6982c31a243f7927801c753c3a0ad78455b250522"}, - {file = "agenta-0.61.0.tar.gz", hash = "sha256:525699f4d34326cdff7baefbdd1439ff989e7ee15ba8faf5acad94e144b59d8a"}, + {file = "aioboto3-12.4.0-py3-none-any.whl", hash = "sha256:a8d5a60852482cc7a472f3544e5ad7d2f5a911054ffa066357140dc6690da94b"}, + {file = "aioboto3-12.4.0.tar.gz", hash = "sha256:0fa03ac7a8c2c187358dd27cdf84da05e91bc1a3bd85519cad13521343a3d767"}, ] [package.dependencies] -decorator = ">=5.2.1,<6.0.0" -fastapi = ">=0.116.0,<0.117.0" -google-auth = ">=2.23,<3" -h11 = ">=0.16.0,<0.17.0" -httpx = ">=0.28.0,<0.29.0" -huggingface-hub = "<0.31.0" -importlib-metadata = ">=8.0.0,<9.0" -jinja2 = ">=3.1.6,<4.0.0" -litellm = "1.78.7" -openai = ">=1.106.0" -opentelemetry-api = ">=1.27.0,<2.0.0" -opentelemetry-exporter-otlp-proto-http = ">=1.27.0,<2.0.0" -opentelemetry-instrumentation = ">=0.56b0" -opentelemetry-sdk = ">=1.27.0,<2.0.0" -pydantic = ">=2,<3" -python-dotenv = ">=1.0.0,<2.0.0" -python-jsonpath = ">=2.0.0,<3.0.0" -pyyaml = ">=6.0.2,<7.0.0" -restrictedpython = {version = ">=8.0,<9.0", markers = "python_version >= \"3.11\" and python_version < \"3.14\""} -starlette = ">=0.47.0,<0.48.0" -structlog = ">=25.2.0,<26.0.0" -tiktoken = "0.11.0" -toml = ">=0.10.2,<0.11.0" +aiobotocore = {version = "2.12.3", extras = ["boto3"]} + +[package.extras] +chalice = ["chalice (>=1.24.0)"] +s3cse = ["cryptography (>=2.3.1)"] + +[[package]] +name = "aiobotocore" +version = "2.12.3" +description = "Async client for aws services using botocore and aiohttp" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "aiobotocore-2.12.3-py3-none-any.whl", hash = "sha256:86737685f4625e8f05c4e7a608a07cc97607263279f66cf6b02b640c4eafd324"}, + {file = "aiobotocore-2.12.3.tar.gz", hash = "sha256:e2a2929207bc5d62eb556106c2224c1fd106d5c65be2eb69f15cc8c34c44c236"}, +] + +[package.dependencies] +aiohttp = ">=3.7.4.post0,<4.0.0" +aioitertools = ">=0.5.1,<1.0.0" +boto3 = {version = ">=1.34.41,<1.34.70", optional = true, markers = "extra == \"boto3\""} +botocore = ">=1.34.41,<1.34.70" +wrapt = ">=1.10.10,<2.0.0" + +[package.extras] +awscli = ["awscli (>=1.32.41,<1.32.70)"] +boto3 = ["boto3 (>=1.34.41,<1.34.70)"] [[package]] name = "aiohappyeyeballs" @@ -45,7 +49,6 @@ description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8"}, {file = "aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558"}, @@ -53,138 +56,98 @@ files = [ [[package]] name = "aiohttp" -version = "3.13.2" +version = "3.11.18" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "aiohttp-3.13.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2372b15a5f62ed37789a6b383ff7344fc5b9f243999b0cd9b629d8bc5f5b4155"}, - {file = "aiohttp-3.13.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7f8659a48995edee7229522984bd1009c1213929c769c2daa80b40fe49a180c"}, - {file = "aiohttp-3.13.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:939ced4a7add92296b0ad38892ce62b98c619288a081170695c6babe4f50e636"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6315fb6977f1d0dd41a107c527fee2ed5ab0550b7d885bc15fee20ccb17891da"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6e7352512f763f760baaed2637055c49134fd1d35b37c2dedfac35bfe5cf8725"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e09a0a06348a2dd73e7213353c90d709502d9786219f69b731f6caa0efeb46f5"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a09a6d073fb5789456545bdee2474d14395792faa0527887f2f4ec1a486a59d3"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b59d13c443f8e049d9e94099c7e412e34610f1f49be0f230ec656a10692a5802"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:20db2d67985d71ca033443a1ba2001c4b5693fe09b0e29f6d9358a99d4d62a8a"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:960c2fc686ba27b535f9fd2b52d87ecd7e4fd1cf877f6a5cba8afb5b4a8bd204"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6c00dbcf5f0d88796151e264a8eab23de2997c9303dd7c0bf622e23b24d3ce22"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fed38a5edb7945f4d1bcabe2fcd05db4f6ec7e0e82560088b754f7e08d93772d"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:b395bbca716c38bef3c764f187860e88c724b342c26275bc03e906142fc5964f"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:204ffff2426c25dfda401ba08da85f9c59525cdc42bda26660463dd1cbcfec6f"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:05c4dd3c48fb5f15db31f57eb35374cb0c09afdde532e7fb70a75aede0ed30f6"}, - {file = "aiohttp-3.13.2-cp310-cp310-win32.whl", hash = "sha256:e574a7d61cf10351d734bcddabbe15ede0eaa8a02070d85446875dc11189a251"}, - {file = "aiohttp-3.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:364f55663085d658b8462a1c3f17b2b84a5c2e1ba858e1b79bff7b2e24ad1514"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4647d02df098f6434bafd7f32ad14942f05a9caa06c7016fdcc816f343997dd0"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e3403f24bcb9c3b29113611c3c16a2a447c3953ecf86b79775e7be06f7ae7ccb"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:43dff14e35aba17e3d6d5ba628858fb8cb51e30f44724a2d2f0c75be492c55e9"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e2a9ea08e8c58bb17655630198833109227dea914cd20be660f52215f6de5613"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53b07472f235eb80e826ad038c9d106c2f653584753f3ddab907c83f49eedead"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e736c93e9c274fce6419af4aac199984d866e55f8a4cec9114671d0ea9688780"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ff5e771f5dcbc81c64898c597a434f7682f2259e0cd666932a913d53d1341d1a"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3b6fb0c207cc661fa0bf8c66d8d9b657331ccc814f4719468af61034b478592"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:97a0895a8e840ab3520e2288db7cace3a1981300d48babeb50e7425609e2e0ab"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9e8f8afb552297aca127c90cb840e9a1d4bfd6a10d7d8f2d9176e1acc69bad30"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ed2f9c7216e53c3df02264f25d824b079cc5914f9e2deba94155190ef648ee40"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:99c5280a329d5fa18ef30fd10c793a190d996567667908bef8a7f81f8202b948"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2ca6ffef405fc9c09a746cb5d019c1672cd7f402542e379afc66b370833170cf"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:47f438b1a28e926c37632bff3c44df7d27c9b57aaf4e34b1def3c07111fdb782"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9acda8604a57bb60544e4646a4615c1866ee6c04a8edef9b8ee6fd1d8fa2ddc8"}, - {file = "aiohttp-3.13.2-cp311-cp311-win32.whl", hash = "sha256:868e195e39b24aaa930b063c08bb0c17924899c16c672a28a65afded9c46c6ec"}, - {file = "aiohttp-3.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:7fd19df530c292542636c2a9a85854fab93474396a52f1695e799186bbd7f24c"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b1e56bab2e12b2b9ed300218c351ee2a3d8c8fdab5b1ec6193e11a817767e47b"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:364e25edaabd3d37b1db1f0cbcee8c73c9a3727bfa262b83e5e4cf3489a2a9dc"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c5c94825f744694c4b8db20b71dba9a257cd2ba8e010a803042123f3a25d50d7"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba2715d842ffa787be87cbfce150d5e88c87a98e0b62e0f5aa489169a393dbbb"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:585542825c4bc662221fb257889e011a5aa00f1ae4d75d1d246a5225289183e3"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:39d02cb6025fe1aabca329c5632f48c9532a3dabccd859e7e2f110668972331f"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e67446b19e014d37342f7195f592a2a948141d15a312fe0e700c2fd2f03124f6"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4356474ad6333e41ccefd39eae869ba15a6c5299c9c01dfdcfdd5c107be4363e"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeacf451c99b4525f700f078becff32c32ec327b10dcf31306a8a52d78166de7"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8a9b889aeabd7a4e9af0b7f4ab5ad94d42e7ff679aaec6d0db21e3b639ad58d"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:fa89cb11bc71a63b69568d5b8a25c3ca25b6d54c15f907ca1c130d72f320b76b"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8aa7c807df234f693fed0ecd507192fc97692e61fee5702cdc11155d2e5cadc8"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:9eb3e33fdbe43f88c3c75fa608c25e7c47bbd80f48d012763cb67c47f39a7e16"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9434bc0d80076138ea986833156c5a48c9c7a8abb0c96039ddbb4afc93184169"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ff15c147b2ad66da1f2cbb0622313f2242d8e6e8f9b79b5206c84523a4473248"}, - {file = "aiohttp-3.13.2-cp312-cp312-win32.whl", hash = "sha256:27e569eb9d9e95dbd55c0fc3ec3a9335defbf1d8bc1d20171a49f3c4c607b93e"}, - {file = "aiohttp-3.13.2-cp312-cp312-win_amd64.whl", hash = "sha256:8709a0f05d59a71f33fd05c17fc11fcb8c30140506e13c2f5e8ee1b8964e1b45"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7519bdc7dfc1940d201651b52bf5e03f5503bda45ad6eacf64dda98be5b2b6be"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:088912a78b4d4f547a1f19c099d5a506df17eacec3c6f4375e2831ec1d995742"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5276807b9de9092af38ed23ce120539ab0ac955547b38563a9ba4f5b07b95293"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1237c1375eaef0db4dcd7c2559f42e8af7b87ea7d295b118c60c36a6e61cb811"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:96581619c57419c3d7d78703d5b78c1e5e5fc0172d60f555bdebaced82ded19a"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a2713a95b47374169409d18103366de1050fe0ea73db358fc7a7acb2880422d4"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:228a1cd556b3caca590e9511a89444925da87d35219a49ab5da0c36d2d943a6a"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ac6cde5fba8d7d8c6ac963dbb0256a9854e9fafff52fbcc58fdf819357892c3e"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2bef8237544f4e42878c61cef4e2839fee6346dc60f5739f876a9c50be7fcdb"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:16f15a4eac3bc2d76c45f7ebdd48a65d41b242eb6c31c2245463b40b34584ded"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:bb7fb776645af5cc58ab804c58d7eba545a97e047254a52ce89c157b5af6cd0b"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e1b4951125ec10c70802f2cb09736c895861cd39fd9dcb35107b4dc8ae6220b8"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:550bf765101ae721ee1d37d8095f47b1f220650f85fe1af37a90ce75bab89d04"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:fe91b87fc295973096251e2d25a811388e7d8adf3bd2b97ef6ae78bc4ac6c476"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0c8e31cfcc4592cb200160344b2fb6ae0f9e4effe06c644b5a125d4ae5ebe23"}, - {file = "aiohttp-3.13.2-cp313-cp313-win32.whl", hash = "sha256:0740f31a60848d6edb296a0df827473eede90c689b8f9f2a4cdde74889eb2254"}, - {file = "aiohttp-3.13.2-cp313-cp313-win_amd64.whl", hash = "sha256:a88d13e7ca367394908f8a276b89d04a3652044612b9a408a0bb22a5ed976a1a"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:2475391c29230e063ef53a66669b7b691c9bfc3f1426a0f7bcdf1216bdbac38b"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:f33c8748abef4d8717bb20e8fb1b3e07c6adacb7fd6beaae971a764cf5f30d61"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ae32f24bbfb7dbb485a24b30b1149e2f200be94777232aeadba3eecece4d0aa4"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d7f02042c1f009ffb70067326ef183a047425bb2ff3bc434ead4dd4a4a66a2b"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93655083005d71cd6c072cdab54c886e6570ad2c4592139c3fb967bfc19e4694"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0db1e24b852f5f664cd728db140cf11ea0e82450471232a394b3d1a540b0f906"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b009194665bcd128e23eaddef362e745601afa4641930848af4c8559e88f18f9"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c038a8fdc8103cd51dbd986ecdce141473ffd9775a7a8057a6ed9c3653478011"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66bac29b95a00db411cd758fea0e4b9bdba6d549dfe333f9a945430f5f2cc5a6"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4ebf9cfc9ba24a74cf0718f04aac2a3bbe745902cc7c5ebc55c0f3b5777ef213"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a4b88ebe35ce54205c7074f7302bd08a4cb83256a3e0870c72d6f68a3aaf8e49"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:98c4fb90bb82b70a4ed79ca35f656f4281885be076f3f970ce315402b53099ae"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:ec7534e63ae0f3759df3a1ed4fa6bc8f75082a924b590619c0dd2f76d7043caa"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5b927cf9b935a13e33644cbed6c8c4b2d0f25b713d838743f8fe7191b33829c4"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:88d6c017966a78c5265d996c19cdb79235be5e6412268d7e2ce7dee339471b7a"}, - {file = "aiohttp-3.13.2-cp314-cp314-win32.whl", hash = "sha256:f7c183e786e299b5d6c49fb43a769f8eb8e04a2726a2bd5887b98b5cc2d67940"}, - {file = "aiohttp-3.13.2-cp314-cp314-win_amd64.whl", hash = "sha256:fe242cd381e0fb65758faf5ad96c2e460df6ee5b2de1072fe97e4127927e00b4"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:f10d9c0b0188fe85398c61147bbd2a657d616c876863bfeff43376e0e3134673"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:e7c952aefdf2460f4ae55c5e9c3e80aa72f706a6317e06020f80e96253b1accd"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c20423ce14771d98353d2e25e83591fa75dfa90a3c1848f3d7c68243b4fbded3"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e96eb1a34396e9430c19d8338d2ec33015e4a87ef2b4449db94c22412e25ccdf"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:23fb0783bc1a33640036465019d3bba069942616a6a2353c6907d7fe1ccdaf4e"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e1a9bea6244a1d05a4e57c295d69e159a5c50d8ef16aa390948ee873478d9a5"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0a3d54e822688b56e9f6b5816fb3de3a3a64660efac64e4c2dc435230ad23bad"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7a653d872afe9f33497215745da7a943d1dc15b728a9c8da1c3ac423af35178e"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56d36e80d2003fa3fc0207fac644216d8532e9504a785ef9a8fd013f84a42c61"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:78cd586d8331fb8e241c2dd6b2f4061778cc69e150514b39a9e28dd050475661"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:20b10bbfbff766294fe99987f7bb3b74fdd2f1a2905f2562132641ad434dcf98"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9ec49dff7e2b3c85cdeaa412e9d438f0ecd71676fde61ec57027dd392f00c693"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:94f05348c4406450f9d73d38efb41d669ad6cd90c7ee194810d0eefbfa875a7a"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:fa4dcb605c6f82a80c7f95713c2b11c3b8e9893b3ebd2bc9bde93165ed6107be"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cf00e5db968c3f67eccd2778574cf64d8b27d95b237770aa32400bd7a1ca4f6c"}, - {file = "aiohttp-3.13.2-cp314-cp314t-win32.whl", hash = "sha256:d23b5fe492b0805a50d3371e8a728a9134d8de5447dce4c885f5587294750734"}, - {file = "aiohttp-3.13.2-cp314-cp314t-win_amd64.whl", hash = "sha256:ff0a7b0a82a7ab905cbda74006318d1b12e37c797eb1b0d4eb3e316cf47f658f"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7fbdf5ad6084f1940ce88933de34b62358d0f4a0b6ec097362dcd3e5a65a4989"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7c3a50345635a02db61792c85bb86daffac05330f6473d524f1a4e3ef9d0046d"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0e87dff73f46e969af38ab3f7cb75316a7c944e2e574ff7c933bc01b10def7f5"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2adebd4577724dcae085665f294cc57c8701ddd4d26140504db622b8d566d7aa"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e036a3a645fe92309ec34b918394bb377950cbb43039a97edae6c08db64b23e2"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:23ad365e30108c422d0b4428cf271156dd56790f6dd50d770b8e360e6c5ab2e6"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1f9b2c2d4b9d958b1f9ae0c984ec1dd6b6689e15c75045be8ccb4011426268ca"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3a92cf4b9bea33e15ecbaa5c59921be0f23222608143d025c989924f7e3e0c07"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:070599407f4954021509193404c4ac53153525a19531051661440644728ba9a7"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:29562998ec66f988d49fb83c9b01694fa927186b781463f376c5845c121e4e0b"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4dd3db9d0f4ebca1d887d76f7cdbcd1116ac0d05a9221b9dad82c64a62578c4d"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:d7bc4b7f9c4921eba72677cd9fedd2308f4a4ca3e12fab58935295ad9ea98700"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:dacd50501cd017f8cccb328da0c90823511d70d24a323196826d923aad865901"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:8b2f1414f6a1e0683f212ec80e813f4abef94c739fd090b66c9adf9d2a05feac"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04c3971421576ed24c191f610052bcb2f059e395bc2489dd99e397f9bc466329"}, - {file = "aiohttp-3.13.2-cp39-cp39-win32.whl", hash = "sha256:9f377d0a924e5cc94dc620bc6366fc3e889586a7f18b748901cf016c916e2084"}, - {file = "aiohttp-3.13.2-cp39-cp39-win_amd64.whl", hash = "sha256:9c705601e16c03466cb72011bd1af55d68fa65b045356d8f96c216e5f6db0fa5"}, - {file = "aiohttp-3.13.2.tar.gz", hash = "sha256:40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca"}, +files = [ + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:96264854fedbea933a9ca4b7e0c745728f01380691687b7365d18d9e977179c4"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9602044ff047043430452bc3a2089743fa85da829e6fc9ee0025351d66c332b6"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5691dc38750fcb96a33ceef89642f139aa315c8a193bbd42a0c33476fd4a1609"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:554c918ec43f8480b47a5ca758e10e793bd7410b83701676a4782672d670da55"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a4076a2b3ba5b004b8cffca6afe18a3b2c5c9ef679b4d1e9859cf76295f8d4f"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:767a97e6900edd11c762be96d82d13a1d7c4fc4b329f054e88b57cdc21fded94"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0ddc9337a0fb0e727785ad4f41163cc314376e82b31846d3835673786420ef1"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f414f37b244f2a97e79b98d48c5ff0789a0b4b4609b17d64fa81771ad780e415"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdb239f47328581e2ec7744ab5911f97afb10752332a6dd3d98e14e429e1a9e7"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2c50bad73ed629cc326cc0f75aed8ecfb013f88c5af116f33df556ed47143eb"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8d8f20c39d3fa84d1c28cdb97f3111387e48209e224408e75f29c6f8e0861d"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:106032eaf9e62fd6bc6578c8b9e6dc4f5ed9a5c1c7fb2231010a1b4304393421"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:b491e42183e8fcc9901d8dcd8ae644ff785590f1727f76ca86e731c61bfe6643"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ad8c745ff9460a16b710e58e06a9dec11ebc0d8f4dd82091cefb579844d69868"}, + {file = "aiohttp-3.11.18-cp310-cp310-win32.whl", hash = "sha256:8e57da93e24303a883146510a434f0faf2f1e7e659f3041abc4e3fb3f6702a9f"}, + {file = "aiohttp-3.11.18-cp310-cp310-win_amd64.whl", hash = "sha256:cc93a4121d87d9f12739fc8fab0a95f78444e571ed63e40bfc78cd5abe700ac9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:427fdc56ccb6901ff8088544bde47084845ea81591deb16f957897f0f0ba1be9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c828b6d23b984255b85b9b04a5b963a74278b7356a7de84fda5e3b76866597b"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c2eaa145bb36b33af1ff2860820ba0589e165be4ab63a49aebfd0981c173b66"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d518ce32179f7e2096bf4e3e8438cf445f05fedd597f252de9f54c728574756"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0700055a6e05c2f4711011a44364020d7a10fbbcd02fbf3e30e8f7e7fddc8717"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bd1cde83e4684324e6ee19adfc25fd649d04078179890be7b29f76b501de8e4"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73b8870fe1c9a201b8c0d12c94fe781b918664766728783241a79e0468427e4f"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25557982dd36b9e32c0a3357f30804e80790ec2c4d20ac6bcc598533e04c6361"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e889c9df381a2433802991288a61e5a19ceb4f61bd14f5c9fa165655dcb1fd1"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9ea345fda05bae217b6cce2acf3682ce3b13d0d16dd47d0de7080e5e21362421"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9f26545b9940c4b46f0a9388fd04ee3ad7064c4017b5a334dd450f616396590e"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3a621d85e85dccabd700294494d7179ed1590b6d07a35709bb9bd608c7f5dd1d"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9c23fd8d08eb9c2af3faeedc8c56e134acdaf36e2117ee059d7defa655130e5f"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9e6b0e519067caa4fd7fb72e3e8002d16a68e84e62e7291092a5433763dc0dd"}, + {file = "aiohttp-3.11.18-cp311-cp311-win32.whl", hash = "sha256:122f3e739f6607e5e4c6a2f8562a6f476192a682a52bda8b4c6d4254e1138f4d"}, + {file = "aiohttp-3.11.18-cp311-cp311-win_amd64.whl", hash = "sha256:e6f3c0a3a1e73e88af384b2e8a0b9f4fb73245afd47589df2afcab6b638fa0e6"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:63d71eceb9cad35d47d71f78edac41fcd01ff10cacaa64e473d1aec13fa02df2"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d1929da615840969929e8878d7951b31afe0bac883d84418f92e5755d7b49508"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d0aebeb2392f19b184e3fdd9e651b0e39cd0f195cdb93328bd124a1d455cd0e"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3849ead845e8444f7331c284132ab314b4dac43bfae1e3cf350906d4fff4620f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5e8452ad6b2863709f8b3d615955aa0807bc093c34b8e25b3b52097fe421cb7f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b8d2b42073611c860a37f718b3d61ae8b4c2b124b2e776e2c10619d920350ec"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40fbf91f6a0ac317c0a07eb328a1384941872f6761f2e6f7208b63c4cc0a7ff6"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ff5625413fec55216da5eaa011cf6b0a2ed67a565914a212a51aa3755b0009"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7f33a92a2fde08e8c6b0c61815521324fc1612f397abf96eed86b8e31618fdb4"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:11d5391946605f445ddafda5eab11caf310f90cdda1fd99865564e3164f5cff9"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3cc314245deb311364884e44242e00c18b5896e4fe6d5f942e7ad7e4cb640adb"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0f421843b0f70740772228b9e8093289924359d306530bcd3926f39acbe1adda"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e220e7562467dc8d589e31c1acd13438d82c03d7f385c9cd41a3f6d1d15807c1"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab2ef72f8605046115bc9aa8e9d14fd49086d405855f40b79ed9e5c1f9f4faea"}, + {file = "aiohttp-3.11.18-cp312-cp312-win32.whl", hash = "sha256:12a62691eb5aac58d65200c7ae94d73e8a65c331c3a86a2e9670927e94339ee8"}, + {file = "aiohttp-3.11.18-cp312-cp312-win_amd64.whl", hash = "sha256:364329f319c499128fd5cd2d1c31c44f234c58f9b96cc57f743d16ec4f3238c8"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:474215ec618974054cf5dc465497ae9708543cbfc312c65212325d4212525811"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ced70adf03920d4e67c373fd692123e34d3ac81dfa1c27e45904a628567d804"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2d9f6c0152f8d71361905aaf9ed979259537981f47ad099c8b3d81e0319814bd"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a35197013ed929c0aed5c9096de1fc5a9d336914d73ab3f9df14741668c0616c"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:540b8a1f3a424f1af63e0af2d2853a759242a1769f9f1ab053996a392bd70118"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9e6710ebebfce2ba21cee6d91e7452d1125100f41b906fb5af3da8c78b764c1"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8af2ef3b4b652ff109f98087242e2ab974b2b2b496304063585e3d78de0b000"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28c3f975e5ae3dbcbe95b7e3dcd30e51da561a0a0f2cfbcdea30fc1308d72137"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c28875e316c7b4c3e745172d882d8a5c835b11018e33432d281211af35794a93"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:13cd38515568ae230e1ef6919e2e33da5d0f46862943fcda74e7e915096815f3"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0e2a92101efb9f4c2942252c69c63ddb26d20f46f540c239ccfa5af865197bb8"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e6d3e32b8753c8d45ac550b11a1090dd66d110d4ef805ffe60fa61495360b3b2"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ea4cf2488156e0f281f93cc2fd365025efcba3e2d217cbe3df2840f8c73db261"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d4df95ad522c53f2b9ebc07f12ccd2cb15550941e11a5bbc5ddca2ca56316d7"}, + {file = "aiohttp-3.11.18-cp313-cp313-win32.whl", hash = "sha256:cdd1bbaf1e61f0d94aced116d6e95fe25942f7a5f42382195fd9501089db5d78"}, + {file = "aiohttp-3.11.18-cp313-cp313-win_amd64.whl", hash = "sha256:bdd619c27e44382cf642223f11cfd4d795161362a5a1fc1fa3940397bc89db01"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:469ac32375d9a716da49817cd26f1916ec787fc82b151c1c832f58420e6d3533"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3cec21dd68924179258ae14af9f5418c1ebdbba60b98c667815891293902e5e0"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b426495fb9140e75719b3ae70a5e8dd3a79def0ae3c6c27e012fc59f16544a4a"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad2f41203e2808616292db5d7170cccf0c9f9c982d02544443c7eb0296e8b0c7"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc0ae0a5e9939e423e065a3e5b00b24b8379f1db46046d7ab71753dfc7dd0e1"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe7cdd3f7d1df43200e1c80f1aed86bb36033bf65e3c7cf46a2b97a253ef8798"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5199be2a2f01ffdfa8c3a6f5981205242986b9e63eb8ae03fd18f736e4840721"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ccec9e72660b10f8e283e91aa0295975c7bd85c204011d9f5eb69310555cf30"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1596ebf17e42e293cbacc7a24c3e0dc0f8f755b40aff0402cb74c1ff6baec1d3"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:eab7b040a8a873020113ba814b7db7fa935235e4cbaf8f3da17671baa1024863"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5d61df4a05476ff891cff0030329fee4088d40e4dc9b013fac01bc3c745542c2"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:46533e6792e1410f9801d09fd40cbbff3f3518d1b501d6c3c5b218f427f6ff08"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c1b90407ced992331dd6d4f1355819ea1c274cc1ee4d5b7046c6761f9ec11829"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a2fd04ae4971b914e54fe459dd7edbbd3f2ba875d69e057d5e3c8e8cac094935"}, + {file = "aiohttp-3.11.18-cp39-cp39-win32.whl", hash = "sha256:b2f317d1678002eee6fe85670039fb34a757972284614638f82b903a03feacdc"}, + {file = "aiohttp-3.11.18-cp39-cp39-win_amd64.whl", hash = "sha256:5e7007b8d1d09bce37b54111f593d173691c530b80f27c6493b928dabed9e6ef"}, + {file = "aiohttp-3.11.18.tar.gz", hash = "sha256:ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a"}, ] [package.dependencies] -aiohappyeyeballs = ">=2.5.0" -aiosignal = ">=1.4.0" +aiohappyeyeballs = ">=2.3.0" +aiosignal = ">=1.1.2" attrs = ">=17.3.0" frozenlist = ">=1.1.1" multidict = ">=4.5,<7.0" @@ -192,7 +155,7 @@ propcache = ">=0.2.0" yarl = ">=1.17.0,<2.0" [package.extras] -speedups = ["Brotli", "aiodns (>=3.3.0)", "backports.zstd", "brotlicffi"] +speedups = ["Brotli ; platform_python_implementation == \"CPython\"", "aiodns (>=3.2.0) ; sys_platform == \"linux\" or sys_platform == \"darwin\"", "brotlicffi ; platform_python_implementation != \"CPython\""] [[package]] name = "aiohttp-retry" @@ -201,7 +164,6 @@ description = "Simple retry client for aiohttp" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "aiohttp_retry-2.9.1-py3-none-any.whl", hash = "sha256:66d2759d1921838256a05a3f80ad7e724936f083e35be5abb5e16eed6be6dc54"}, {file = "aiohttp_retry-2.9.1.tar.gz", hash = "sha256:8eb75e904ed4ee5c2ec242fefe85bf04240f685391c4879d8f541d6028ff01f1"}, @@ -210,22 +172,36 @@ files = [ [package.dependencies] aiohttp = "*" +[[package]] +name = "aioitertools" +version = "0.12.0" +description = "itertools and builtins for AsyncIO and mixed iterables" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "aioitertools-0.12.0-py3-none-any.whl", hash = "sha256:fc1f5fac3d737354de8831cbba3eb04f79dd649d8f3afb4c5b114925e662a796"}, + {file = "aioitertools-0.12.0.tar.gz", hash = "sha256:c2a9055b4fbb7705f561b9d86053e8af5d10cc845d22c32008c43490b2d8dd6b"}, +] + +[package.extras] +dev = ["attribution (==1.8.0)", "black (==24.8.0)", "build (>=1.2)", "coverage (==7.6.1)", "flake8 (==7.1.1)", "flit (==3.9.0)", "mypy (==1.11.2)", "ufmt (==2.7.1)", "usort (==1.0.8.post1)"] +docs = ["sphinx (==8.0.2)", "sphinx-mdinclude (==0.6.2)"] + [[package]] name = "aiosignal" -version = "1.4.0" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e"}, - {file = "aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] frozenlist = ">=1.1.0" -typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} [[package]] name = "aiosmtplib" @@ -234,7 +210,6 @@ description = "asyncio SMTP client" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "aiosmtplib-3.0.2-py3-none-any.whl", hash = "sha256:8783059603a34834c7c90ca51103c3aa129d5922003b5ce98dbaa6d4440f10fc"}, {file = "aiosmtplib-3.0.2.tar.gz", hash = "sha256:08fd840f9dbc23258025dca229e8a8f04d2ccf3ecb1319585615bfc7933f7f47"}, @@ -246,15 +221,14 @@ uvloop = ["uvloop (>=0.18)"] [[package]] name = "alembic" -version = "1.17.1" +version = "1.15.2" description = "A database migration tool for SQLAlchemy." optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "alembic-1.17.1-py3-none-any.whl", hash = "sha256:cbc2386e60f89608bb63f30d2d6cc66c7aaed1fe105bd862828600e5ad167023"}, - {file = "alembic-1.17.1.tar.gz", hash = "sha256:8a289f6778262df31571d29cca4c7fbacd2f0f582ea0816f4c399b6da7528486"}, + {file = "alembic-1.15.2-py3-none-any.whl", hash = "sha256:2e76bd916d547f6900ec4bb5a90aeac1485d2c92536923d0b138c02b126edc53"}, + {file = "alembic-1.15.2.tar.gz", hash = "sha256:1c72391bbdeffccfe317eefba686cb9a3c078005478885413b95c3b26c57a8a7"}, ] [package.dependencies] @@ -272,7 +246,6 @@ description = "Low-level AMQP client for Python (fork of amqplib)." optional = false python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "amqp-5.3.1-py3-none-any.whl", hash = "sha256:43b3319e1b4e7d1251833a93d672b4af1e40f3d632d479b98661a95f117880a2"}, {file = "amqp-5.3.1.tar.gz", hash = "sha256:cddc00c725449522023bad949f70fff7b48f0b1ade74d170a6f10ab044739432"}, @@ -288,7 +261,6 @@ description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -296,40 +268,39 @@ files = [ [[package]] name = "anyio" -version = "4.11.0" -description = "High-level concurrency and networking framework on top of asyncio or Trio" +version = "3.7.1" +description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false -python-versions = ">=3.9" +python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc"}, - {file = "anyio-4.11.0.tar.gz", hash = "sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4"}, + {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, + {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, ] [package.dependencies] idna = ">=2.8" sniffio = ">=1.1" -typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -trio = ["trio (>=0.31.0)"] +doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] +test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4) ; python_version < \"3.8\"", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17) ; python_version < \"3.12\" and platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] +trio = ["trio (<0.22)"] [[package]] name = "asgiref" -version = "3.10.0" +version = "3.8.1" description = "ASGI specs, helper code, and adapters" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "asgiref-3.10.0-py3-none-any.whl", hash = "sha256:aef8a81283a34d0ab31630c9b7dfe70c812c95eba78171367ca8745e88124734"}, - {file = "asgiref-3.10.0.tar.gz", hash = "sha256:d89f2d8cd8b56dada7d52fa7dc8075baa08fb836560710d38c292a7a3f78c04e"}, + {file = "asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47"}, + {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"}, ] [package.extras] -tests = ["mypy (>=1.14.0)", "pytest", "pytest-asyncio"] +tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] [[package]] name = "async-timeout" @@ -338,12 +309,27 @@ description = "Timeout context manager for asyncio programs" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" and python_full_version < \"3.11.3\"" +markers = "python_full_version < \"3.11.3\"" files = [ {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, ] +[[package]] +name = "asyncer" +version = "0.0.2" +description = "Asyncer, async and await, focused on developer experience." +optional = false +python-versions = ">=3.6.2,<4.0.0" +groups = ["main"] +files = [ + {file = "asyncer-0.0.2-py3-none-any.whl", hash = "sha256:46e0e1423ce21588350ad425875e81795280b9e1f517e8a389de940b86c348bd"}, + {file = "asyncer-0.0.2.tar.gz", hash = "sha256:d546c85f3626ebbaf06bb4395db49761c902a61a6ac802b1a74133cab4f7f433"}, +] + +[package.dependencies] +anyio = ">=3.4.0,<4.0.0" + [[package]] name = "asyncpg" version = "0.30.0" @@ -351,7 +337,6 @@ description = "An asyncio PostgreSQL driver" optional = false python-versions = ">=3.8.0" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "asyncpg-0.30.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bfb4dd5ae0699bad2b233672c8fc5ccbd9ad24b89afded02341786887e37927e"}, {file = "asyncpg-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc1f62c792752a49f88b7e6f774c26077091b44caceb1983509edc18a2222ec0"}, @@ -406,22 +391,29 @@ files = [ [package.extras] docs = ["Sphinx (>=8.1.3,<8.2.0)", "sphinx-rtd-theme (>=1.2.2)"] -gssauth = ["gssapi", "sspilib"] -test = ["distro (>=1.9.0,<1.10.0)", "flake8 (>=6.1,<7.0)", "flake8-pyi (>=24.1.0,<24.2.0)", "gssapi", "k5test", "mypy (>=1.8.0,<1.9.0)", "sspilib", "uvloop (>=0.15.3)"] +gssauth = ["gssapi ; platform_system != \"Windows\"", "sspilib ; platform_system == \"Windows\""] +test = ["distro (>=1.9.0,<1.10.0)", "flake8 (>=6.1,<7.0)", "flake8-pyi (>=24.1.0,<24.2.0)", "gssapi ; platform_system == \"Linux\"", "k5test ; platform_system == \"Linux\"", "mypy (>=1.8.0,<1.9.0)", "sspilib ; platform_system == \"Windows\"", "uvloop (>=0.15.3) ; platform_system != \"Windows\" and python_version < \"3.14.0\""] [[package]] name = "attrs" -version = "25.4.0" +version = "25.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373"}, - {file = "attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11"}, + {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, + {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] +[package.extras] +benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] +tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] + [[package]] name = "autoevals" version = "0.0.83" @@ -429,7 +421,6 @@ description = "Universal library for evaluating AI models" optional = false python-versions = ">=3.8.0" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "autoevals-0.0.83-py3-none-any.whl", hash = "sha256:41cc0cec096ce8a1e194a58acda205a2bc5d6ec91c79ff5bee3f8ddc8e3ab525"}, {file = "autoevals-0.0.83.tar.gz", hash = "sha256:c184ba29ac9c5a3067a4dd83db87f49b05bc5bec88897d24f43b764c34421044"}, @@ -455,78 +446,129 @@ description = "Function decoration for backoff and retry" optional = false python-versions = ">=3.7,<4.0" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, ] +[[package]] +name = "beanie" +version = "1.29.0" +description = "Asynchronous Python ODM for MongoDB" +optional = false +python-versions = "<4.0,>=3.8" +groups = ["main"] +files = [ + {file = "beanie-1.29.0-py3-none-any.whl", hash = "sha256:aeb53e6648ceccf70eb35c35233e45406fe4de4c9887075581c01b968bfec2c7"}, + {file = "beanie-1.29.0.tar.gz", hash = "sha256:f078620c3515a8222d40a3a8ab195b1d8f1153010f009ed5d205b73371c43869"}, +] + +[package.dependencies] +click = ">=7" +lazy-model = "0.2.0" +motor = ">=2.5.0,<4.0.0" +pydantic = ">=1.10.18,<3.0" +toml = "*" +typing-extensions = ">=4.7" + +[package.extras] +aws = ["motor[aws] (>=2.5.0,<4.0.0)"] +ci = ["requests", "toml", "types-requests"] +doc = ["Markdown (>=3.3)", "Pygments (>=2.8.0)", "jinja2 (>=3.0.3)", "mkdocs (>=1.4)", "mkdocs-material (>=9.0)", "pydoc-markdown (>=4.8)"] +encryption = ["motor[encryption] (>=2.5.0,<4.0.0)"] +gssapi = ["motor[gssapi] (>=2.5.0,<4.0.0)"] +ocsp = ["motor[ocsp] (>=2.5.0,<4.0.0)"] +queue = ["beanie-batteries-queue (>=0.2)"] +snappy = ["motor[snappy] (>=2.5.0,<4.0.0)"] +test = ["asgi-lifespan (>=1.0.1)", "dnspython (>=2.1.0)", "fastapi (>=0.100)", "httpx (>=0.23.0)", "pre-commit (>=3.5.0)", "pydantic-extra-types (>=2)", "pydantic-settings (>=2)", "pydantic[email]", "pyright (>=0)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24.0)", "pytest-cov (>=5.0.0)"] +zstd = ["motor[zstd] (>=2.5.0,<4.0.0)"] + [[package]] name = "billiard" -version = "4.2.2" +version = "4.2.1" description = "Python multiprocessing fork with improvements and bugfixes" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "billiard-4.2.2-py3-none-any.whl", hash = "sha256:4bc05dcf0d1cc6addef470723aac2a6232f3c7ed7475b0b580473a9145829457"}, - {file = "billiard-4.2.2.tar.gz", hash = "sha256:e815017a062b714958463e07ba15981d802dc53d41c5b69d28c5a7c238f8ecf3"}, + {file = "billiard-4.2.1-py3-none-any.whl", hash = "sha256:40b59a4ac8806ba2c2369ea98d876bc6108b051c227baffd928c644d15d8f3cb"}, + {file = "billiard-4.2.1.tar.gz", hash = "sha256:12b641b0c539073fc8d3f5b8b7be998956665c4233c7c1fcd66a7e677c4fb36f"}, ] [[package]] -name = "braintrust-core" -version = "0.0.49" -description = "Shared core dependencies for Braintrust packages" +name = "boto3" +version = "1.34.69" +description = "The AWS SDK for Python" optional = false -python-versions = ">=3.8.0" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "braintrust_core-0.0.49-py3-none-any.whl", hash = "sha256:4be2a5e82b3b123ada4c54e5052da474cb80b29eed5468c8a9f0759c8b7ca0b9"}, - {file = "braintrust_core-0.0.49.tar.gz", hash = "sha256:13081970114ecf0d25e8a77047d93f394ea8fe82e43dc673597992679e0b9215"}, + {file = "boto3-1.34.69-py3-none-any.whl", hash = "sha256:2e25ef6bd325217c2da329829478be063155897d8d3b29f31f7f23ab548519b1"}, + {file = "boto3-1.34.69.tar.gz", hash = "sha256:898a5fed26b1351352703421d1a8b886ef2a74be6c97d5ecc92432ae01fda203"}, ] +[package.dependencies] +botocore = ">=1.34.69,<1.35.0" +jmespath = ">=0.7.1,<2.0.0" +s3transfer = ">=0.10.0,<0.11.0" + +[package.extras] +crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] + [[package]] -name = "bson" -version = "0.5.10" -description = "BSON codec for Python" +name = "botocore" +version = "1.34.69" +description = "Low-level, data-driven core of boto 3." optional = false -python-versions = "*" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "bson-0.5.10.tar.gz", hash = "sha256:d6511b2ab051139a9123c184de1a04227262173ad593429d21e443d6462d6590"}, + {file = "botocore-1.34.69-py3-none-any.whl", hash = "sha256:d3802d076d4d507bf506f9845a6970ce43adc3d819dd57c2791f5c19ed6e5950"}, + {file = "botocore-1.34.69.tar.gz", hash = "sha256:d1ab2bff3c2fd51719c2021d9fa2f30fbb9ed0a308f69e9a774ac92c8091380a"}, ] [package.dependencies] -python-dateutil = ">=2.4.0" -six = ">=1.9.0" +jmespath = ">=0.7.1,<2.0.0" +python-dateutil = ">=2.1,<3.0.0" +urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""} + +[package.extras] +crt = ["awscrt (==0.19.19)"] + +[[package]] +name = "braintrust-core" +version = "0.0.49" +description = "Shared core dependencies for Braintrust packages" +optional = false +python-versions = ">=3.8.0" +groups = ["main"] +files = [ + {file = "braintrust_core-0.0.49-py3-none-any.whl", hash = "sha256:4be2a5e82b3b123ada4c54e5052da474cb80b29eed5468c8a9f0759c8b7ca0b9"}, + {file = "braintrust_core-0.0.49.tar.gz", hash = "sha256:13081970114ecf0d25e8a77047d93f394ea8fe82e43dc673597992679e0b9215"}, +] [[package]] name = "cachetools" -version = "6.2.1" +version = "5.5.2" description = "Extensible memoizing collections and decorators" optional = false -python-versions = ">=3.9" +python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "cachetools-6.2.1-py3-none-any.whl", hash = "sha256:09868944b6dde876dfd44e1d47e18484541eaf12f26f29b7af91b26cc892d701"}, - {file = "cachetools-6.2.1.tar.gz", hash = "sha256:3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201"}, + {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, + {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, ] [[package]] name = "celery" -version = "5.5.3" +version = "5.5.2" description = "Distributed Task Queue." optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "celery-5.5.3-py3-none-any.whl", hash = "sha256:0b5761a07057acee94694464ca482416b959568904c9dfa41ce8413a7d65d525"}, - {file = "celery-5.5.3.tar.gz", hash = "sha256:6c972ae7968c2b5281227f01c3a3f984037d21c5129d07bf3550cc2afc6b10a5"}, + {file = "celery-5.5.2-py3-none-any.whl", hash = "sha256:54425a067afdc88b57cd8d94ed4af2ffaf13ab8c7680041ac2c4ac44357bdf4c"}, + {file = "celery-5.5.2.tar.gz", hash = "sha256:4d6930f354f9d29295425d7a37261245c74a32807c45d764bedc286afd0e724e"}, ] [package.dependencies] @@ -543,270 +585,230 @@ vine = ">=5.1.0,<6.0" arangodb = ["pyArango (>=2.0.2)"] auth = ["cryptography (==44.0.2)"] azureblockblob = ["azure-identity (>=1.19.0)", "azure-storage-blob (>=12.15.0)"] -brotli = ["brotli (>=1.0.0)", "brotlipy (>=0.7.0)"] +brotli = ["brotli (>=1.0.0) ; platform_python_implementation == \"CPython\"", "brotlipy (>=0.7.0) ; platform_python_implementation == \"PyPy\""] cassandra = ["cassandra-driver (>=3.25.0,<4)"] consul = ["python-consul2 (==0.1.5)"] cosmosdbsql = ["pydocumentdb (==2.3.5)"] -couchbase = ["couchbase (>=3.0.0)"] +couchbase = ["couchbase (>=3.0.0) ; platform_python_implementation != \"PyPy\" and (platform_system != \"Windows\" or python_version < \"3.10\")"] couchdb = ["pycouchdb (==1.16.0)"] django = ["Django (>=2.2.28)"] dynamodb = ["boto3 (>=1.26.143)"] elasticsearch = ["elastic-transport (<=8.17.1)", "elasticsearch (<=8.17.2)"] -eventlet = ["eventlet (>=0.32.0)"] +eventlet = ["eventlet (>=0.32.0) ; python_version < \"3.10\""] gcs = ["google-cloud-firestore (==2.20.1)", "google-cloud-storage (>=2.10.0)", "grpcio (==1.67.0)"] gevent = ["gevent (>=1.5.0)"] -librabbitmq = ["librabbitmq (>=2.0.0)"] -memcache = ["pylibmc (==1.6.3)"] -mongodb = ["kombu[mongodb]"] -msgpack = ["kombu[msgpack]"] +librabbitmq = ["librabbitmq (>=2.0.0) ; python_version < \"3.11\""] +memcache = ["pylibmc (==1.6.3) ; platform_system != \"Windows\""] +mongodb = ["pymongo (==4.10.1)"] +msgpack = ["msgpack (==1.1.0)"] pydantic = ["pydantic (>=2.4)"] pymemcache = ["python-memcached (>=1.61)"] -pyro = ["pyro4 (==4.82)"] +pyro = ["pyro4 (==4.82) ; python_version < \"3.11\""] pytest = ["pytest-celery[all] (>=1.2.0,<1.3.0)"] -redis = ["kombu[redis]"] +redis = ["redis (>=4.5.2,!=4.5.5,<6.0.0)"] s3 = ["boto3 (>=1.26.143)"] slmq = ["softlayer_messaging (>=1.0.3)"] -solar = ["ephem (==4.2)"] -sqlalchemy = ["kombu[sqlalchemy]"] -sqs = ["boto3 (>=1.26.143)", "kombu[sqs] (>=5.5.0)", "urllib3 (>=1.26.16)"] -tblib = ["tblib (>=1.3.0)", "tblib (>=1.5.0)"] -yaml = ["kombu[yaml]"] +solar = ["ephem (==4.2) ; platform_python_implementation != \"PyPy\""] +sqlalchemy = ["sqlalchemy (>=1.4.48,<2.1)"] +sqs = ["boto3 (>=1.26.143)", "kombu[sqs] (>=5.3.4)", "urllib3 (>=1.26.16)"] +tblib = ["tblib (>=1.3.0) ; python_version < \"3.8.0\"", "tblib (>=1.5.0) ; python_version >= \"3.8.0\""] +yaml = ["PyYAML (>=3.10)"] zookeeper = ["kazoo (>=1.3.1)"] zstd = ["zstandard (==0.23.0)"] [[package]] name = "certifi" -version = "2025.10.5" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, - {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] name = "cffi" -version = "2.0.0" +version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "(python_version == \"3.11\" or python_version >= \"3.12\") and platform_python_implementation != \"PyPy\"" -files = [ - {file = "cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44"}, - {file = "cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4"}, - {file = "cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5"}, - {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb"}, - {file = "cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a"}, - {file = "cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739"}, - {file = "cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe"}, - {file = "cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664"}, - {file = "cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414"}, - {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743"}, - {file = "cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5"}, - {file = "cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5"}, - {file = "cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d"}, - {file = "cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d"}, - {file = "cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037"}, - {file = "cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba"}, - {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94"}, - {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187"}, - {file = "cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18"}, - {file = "cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5"}, - {file = "cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6"}, - {file = "cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb"}, - {file = "cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3"}, - {file = "cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26"}, - {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c"}, - {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b"}, - {file = "cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27"}, - {file = "cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75"}, - {file = "cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91"}, - {file = "cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5"}, - {file = "cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef"}, - {file = "cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775"}, - {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205"}, - {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1"}, - {file = "cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f"}, - {file = "cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25"}, - {file = "cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad"}, - {file = "cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9"}, - {file = "cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc"}, - {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592"}, - {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512"}, - {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4"}, - {file = "cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e"}, - {file = "cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6"}, - {file = "cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9"}, - {file = "cffi-2.0.0-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf"}, - {file = "cffi-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f"}, - {file = "cffi-2.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65"}, - {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322"}, - {file = "cffi-2.0.0-cp39-cp39-win32.whl", hash = "sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a"}, - {file = "cffi-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9"}, - {file = "cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529"}, +markers = "platform_python_implementation != \"PyPy\"" +files = [ + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] [package.dependencies] -pycparser = {version = "*", markers = "implementation_name != \"PyPy\""} +pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.4.4" +version = "3.4.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_riscv64.whl", hash = "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-win32.whl", hash = "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win32.whl", hash = "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50"}, - {file = "charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f"}, - {file = "charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a"}, +files = [ + {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, + {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, + {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, ] [[package]] @@ -816,7 +818,6 @@ description = "Mustache templating language renderer" optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "chevron-0.14.0-py3-none-any.whl", hash = "sha256:fbf996a709f8da2e745ef763f482ce2d311aa817d287593a5b990d6d6e4f0443"}, {file = "chevron-0.14.0.tar.gz", hash = "sha256:87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf"}, @@ -824,15 +825,14 @@ files = [ [[package]] name = "click" -version = "8.3.0" +version = "8.2.1" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.10" -groups = ["main", "dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +groups = ["main"] files = [ - {file = "click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc"}, - {file = "click-8.3.0.tar.gz", hash = "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4"}, + {file = "click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b"}, + {file = "click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202"}, ] [package.dependencies] @@ -845,7 +845,6 @@ description = "Enables git-like *did-you-mean* feature in click" optional = false python-versions = ">=3.6.2" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "click_didyoumean-0.3.1-py3-none-any.whl", hash = "sha256:5c4bb6007cfea5f2fd6583a2fb6701a22a41eb98957e63d0fac41c10e7c3117c"}, {file = "click_didyoumean-0.3.1.tar.gz", hash = "sha256:4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463"}, @@ -856,15 +855,14 @@ click = ">=7" [[package]] name = "click-plugins" -version = "1.1.1.2" +version = "1.1.1" description = "An extension module for click to enable registering CLI commands via setuptools entry-points." optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "click_plugins-1.1.1.2-py2.py3-none-any.whl", hash = "sha256:008d65743833ffc1f5417bf0e78e8d2c23aab04d9745ba817bd3e71b0feb6aa6"}, - {file = "click_plugins-1.1.1.2.tar.gz", hash = "sha256:d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261"}, + {file = "click-plugins-1.1.1.tar.gz", hash = "sha256:46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b"}, + {file = "click_plugins-1.1.1-py2.py3-none-any.whl", hash = "sha256:5d262006d3222f5057fd81e1623d4443e41dcda5dc815c06b442aa3c02889fc8"}, ] [package.dependencies] @@ -880,7 +878,6 @@ description = "REPL plugin for Click" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "click-repl-0.3.0.tar.gz", hash = "sha256:17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9"}, {file = "click_repl-0.3.0-py3-none-any.whl", hash = "sha256:fb7e06deb8da8de86180a33a9da97ac316751c094c6899382da7feeeeb51b812"}, @@ -893,6 +890,18 @@ prompt-toolkit = ">=3.0.36" [package.extras] testing = ["pytest (>=7.2.1)", "pytest-cov (>=4.0.0)", "tox (>=4.4.3)"] +[[package]] +name = "cloudpickle" +version = "3.1.1" +description = "Pickler class to extend the standard pickle.Pickler functionality" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "cloudpickle-3.1.1-py3-none-any.whl", hash = "sha256:c8c5a44295039331ee9dad40ba100a9c7297b6f988e50e87ccdf3765a668350e"}, + {file = "cloudpickle-3.1.1.tar.gz", hash = "sha256:b216fa8ae4019d5482a8ac3c95d8f6346115d8835911fd4aefd1a445e4242c64"}, +] + [[package]] name = "colorama" version = "0.4.6" @@ -904,99 +913,98 @@ files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "(python_version == \"3.11\" or python_version >= \"3.12\") and platform_system == \"Windows\"", dev = "(platform_system == \"Windows\" or sys_platform == \"win32\") and (python_version == \"3.11\" or python_version >= \"3.12\")"} +markers = {main = "platform_system == \"Windows\" or sys_platform == \"win32\"", dev = "sys_platform == \"win32\""} [[package]] name = "cryptography" -version = "46.0.3" +version = "45.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false -python-versions = "!=3.9.0,!=3.9.1,>=3.8" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "cryptography-46.0.3-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e"}, - {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926"}, - {file = "cryptography-46.0.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71"}, - {file = "cryptography-46.0.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac"}, - {file = "cryptography-46.0.3-cp311-abi3-win32.whl", hash = "sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018"}, - {file = "cryptography-46.0.3-cp311-abi3-win_amd64.whl", hash = "sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb"}, - {file = "cryptography-46.0.3-cp311-abi3-win_arm64.whl", hash = "sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c"}, - {file = "cryptography-46.0.3-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665"}, - {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3"}, - {file = "cryptography-46.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20"}, - {file = "cryptography-46.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de"}, - {file = "cryptography-46.0.3-cp314-cp314t-win32.whl", hash = "sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914"}, - {file = "cryptography-46.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db"}, - {file = "cryptography-46.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21"}, - {file = "cryptography-46.0.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04"}, - {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506"}, - {file = "cryptography-46.0.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963"}, - {file = "cryptography-46.0.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4"}, - {file = "cryptography-46.0.3-cp38-abi3-win32.whl", hash = "sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df"}, - {file = "cryptography-46.0.3-cp38-abi3-win_amd64.whl", hash = "sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f"}, - {file = "cryptography-46.0.3-cp38-abi3-win_arm64.whl", hash = "sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372"}, - {file = "cryptography-46.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a23582810fedb8c0bc47524558fb6c56aac3fc252cb306072fd2815da2a47c32"}, - {file = "cryptography-46.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7aec276d68421f9574040c26e2a7c3771060bc0cff408bae1dcb19d3ab1e63c"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9"}, - {file = "cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c"}, - {file = "cryptography-46.0.3.tar.gz", hash = "sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1"}, +python-versions = "!=3.9.0,!=3.9.1,>=3.7" +groups = ["main"] +files = [ + {file = "cryptography-45.0.2-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:61a8b1bbddd9332917485b2453d1de49f142e6334ce1d97b7916d5a85d179c84"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4cc31c66411e14dd70e2f384a9204a859dc25b05e1f303df0f5326691061b839"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:463096533acd5097f8751115bc600b0b64620c4aafcac10c6d0041e6e68f88fe"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:cdafb86eb673c3211accffbffdb3cdffa3aaafacd14819e0898d23696d18e4d3"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:05c2385b1f5c89a17df19900cfb1345115a77168f5ed44bdf6fd3de1ce5cc65b"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:e9e4bdcd70216b08801e267c0b563316b787f957a46e215249921f99288456f9"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b2de529027579e43b6dc1f805f467b102fb7d13c1e54c334f1403ee2b37d0059"}, + {file = "cryptography-45.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10d68763892a7b19c22508ab57799c4423c7c8cd61d7eee4c5a6a55a46511949"}, + {file = "cryptography-45.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2a90ce2f0f5b695e4785ac07c19a58244092f3c85d57db6d8eb1a2b26d2aad6"}, + {file = "cryptography-45.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:59c0c8f043dd376bbd9d4f636223836aed50431af4c5a467ed9bf61520294627"}, + {file = "cryptography-45.0.2-cp311-abi3-win32.whl", hash = "sha256:80303ee6a02ef38c4253160446cbeb5c400c07e01d4ddbd4ff722a89b736d95a"}, + {file = "cryptography-45.0.2-cp311-abi3-win_amd64.whl", hash = "sha256:7429936146063bd1b2cfc54f0e04016b90ee9b1c908a7bed0800049cbace70eb"}, + {file = "cryptography-45.0.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:e86c8d54cd19a13e9081898b3c24351683fd39d726ecf8e774aaa9d8d96f5f3a"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e328357b6bbf79928363dbf13f4635b7aac0306afb7e5ad24d21d0c5761c3253"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49af56491473231159c98c2c26f1a8f3799a60e5cf0e872d00745b858ddac9d2"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f169469d04a23282de9d0be349499cb6683b6ff1b68901210faacac9b0c24b7d"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9cfd1399064b13043082c660ddd97a0358e41c8b0dc7b77c1243e013d305c344"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:18f8084b7ca3ce1b8d38bdfe33c48116edf9a08b4d056ef4a96dceaa36d8d965"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:2cb03a944a1a412724d15a7c051d50e63a868031f26b6a312f2016965b661942"}, + {file = "cryptography-45.0.2-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:a9727a21957d3327cf6b7eb5ffc9e4b663909a25fea158e3fcbc49d4cdd7881b"}, + {file = "cryptography-45.0.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ddb8d01aa900b741d6b7cc585a97aff787175f160ab975e21f880e89d810781a"}, + {file = "cryptography-45.0.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:c0c000c1a09f069632d8a9eb3b610ac029fcc682f1d69b758e625d6ee713f4ed"}, + {file = "cryptography-45.0.2-cp37-abi3-win32.whl", hash = "sha256:08281de408e7eb71ba3cd5098709a356bfdf65eebd7ee7633c3610f0aa80d79b"}, + {file = "cryptography-45.0.2-cp37-abi3-win_amd64.whl", hash = "sha256:48caa55c528617fa6db1a9c3bf2e37ccb31b73e098ac2b71408d1f2db551dde4"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a8ec324711596fbf21837d3a5db543937dd84597d364769b46e0102250023f77"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:965611880c3fa8e504b7458484c0697e00ae6e937279cd6734fdaa2bc954dc49"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d891942592789fa0ab71b502550bbadb12f540d7413d7d7c4cef4b02af0f5bc6"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:b19f4b28dd2ef2e6d600307fee656c00825a2980c4356a7080bd758d633c3a6f"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:7c73968fbb7698a4c5d6160859db560d3aac160edde89c751edd5a8bc6560c88"}, + {file = "cryptography-45.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:501de1296b2041dccf2115e3c7d4947430585601b251b140970ce255c5cfb985"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1655d3a76e3dedb683c982a6c3a2cbfae2d08f47a48ec5a3d58db52b3d29ea6f"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dc7693573f16535428183de8fd27f0ca1ca37a51baa0b41dc5ed7b3d68fe80e2"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:614bca7c6ed0d8ad1dce683a6289afae1f880675b4090878a0136c3da16bc693"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:4142e20c29224cec63e9e32eb1e6014fb285fe39b7be66b3564ca978a3a8afe9"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:9a900036b42f7324df7c7ad9569eb92ba0b613cf699160dd9c2154b24fd02f8e"}, + {file = "cryptography-45.0.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:057723b79752a142efbc609e90b0dff27b0361ccbee3bd48312d70f5cdf53b78"}, + {file = "cryptography-45.0.2.tar.gz", hash = "sha256:d784d57b958ffd07e9e226d17272f9af0c41572557604ca7554214def32c26bf"}, ] [package.dependencies] -cffi = {version = ">=2.0.0", markers = "python_full_version >= \"3.9\" and platform_python_implementation != \"PyPy\""} +cffi = {version = ">=1.14", markers = "platform_python_implementation != \"PyPy\""} [package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-inline-tabs", "sphinx-rtd-theme (>=3.0.0)"] +docs = ["sphinx (>=5.3.0)", "sphinx-inline-tabs ; python_full_version >= \"3.8.0\"", "sphinx-rtd-theme (>=3.0.0) ; python_full_version >= \"3.8.0\""] docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] -nox = ["nox[uv] (>=2024.4.15)"] -pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.14)", "ruff (>=0.11.11)"] +nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2) ; python_full_version >= \"3.8.0\""] +pep8test = ["check-sdist ; python_full_version >= \"3.8.0\"", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi (>=2024)", "cryptography-vectors (==46.0.3)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test = ["certifi (>=2024)", "cryptography-vectors (==45.0.2)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] [[package]] -name = "decorator" -version = "5.2.1" -description = "Decorators for Humans" +name = "dask" +version = "2025.5.1" +description = "Parallel PyData with Task Scheduling" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a"}, - {file = "decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360"}, + {file = "dask-2025.5.1-py3-none-any.whl", hash = "sha256:3b85fdaa5f6f989dde49da6008415b1ae996985ebdfb1e40de2c997d9010371d"}, + {file = "dask-2025.5.1.tar.gz", hash = "sha256:979d9536549de0e463f4cab8a8c66c3a2ef55791cd740d07d9bf58fab1d1076a"}, ] +[package.dependencies] +click = ">=8.1" +cloudpickle = ">=3.0.0" +fsspec = ">=2021.09.0" +importlib_metadata = {version = ">=4.13.0", markers = "python_version < \"3.12\""} +packaging = ">=20.0" +partd = ">=1.4.0" +pyyaml = ">=5.3.1" +toolz = ">=0.10.0" + +[package.extras] +array = ["numpy (>=1.24)"] +complete = ["dask[array,dataframe,diagnostics,distributed]", "lz4 (>=4.3.2)", "pyarrow (>=14.0.1)"] +dataframe = ["dask[array]", "pandas (>=2.0)", "pyarrow (>=14.0.1)"] +diagnostics = ["bokeh (>=3.1.0)", "jinja2 (>=2.10.3)"] +distributed = ["distributed (==2025.5.1)"] +test = ["pandas[test]", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytest-rerunfailures", "pytest-timeout", "pytest-xdist"] + [[package]] name = "deprecated" version = "1.2.18" @@ -1004,7 +1012,6 @@ description = "Python @deprecated decorator to deprecate old python classes, fun optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, @@ -1014,7 +1021,7 @@ files = [ wrapt = ">=1.10,<2" [package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools", "tox"] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools ; python_version >= \"3.12\"", "tox"] [[package]] name = "distro" @@ -1023,12 +1030,32 @@ description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, ] +[[package]] +name = "dnspython" +version = "2.7.0" +description = "DNS toolkit" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "dnspython-2.7.0-py3-none-any.whl", hash = "sha256:b4c34b7d10b51bcc3a5071e7b8dee77939f1e878477eeecc965e9835f63c6c86"}, + {file = "dnspython-2.7.0.tar.gz", hash = "sha256:ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1"}, +] + +[package.extras] +dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "hypercorn (>=0.16.0)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "quart-trio (>=0.11.0)", "sphinx (>=7.2.0)", "sphinx-rtd-theme (>=2.0.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] +dnssec = ["cryptography (>=43)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] +doq = ["aioquic (>=1.0.0)"] +idna = ["idna (>=3.7)"] +trio = ["trio (>=0.23)"] +wmi = ["wmi (>=1.5.1)"] + [[package]] name = "ecdsa" version = "0.19.1" @@ -1036,7 +1063,6 @@ description = "ECDSA cryptographic signature library (pure python)" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "ecdsa-0.19.1-py2.py3-none-any.whl", hash = "sha256:30638e27cf77b7e15c4c4cc1973720149e1033827cfd00661ca5c8cc0cdb24c3"}, {file = "ecdsa-0.19.1.tar.gz", hash = "sha256:478cba7b62555866fcb3bb3fe985e06decbdb68ef55713c4e5ab98c57d508e61"}, @@ -1056,7 +1082,6 @@ description = "execnet: rapid multi-Python deployment" optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, @@ -1072,7 +1097,6 @@ description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "Faker-23.3.0-py3-none-any.whl", hash = "sha256:117ce1a2805c1bc5ca753b3dc6f9d567732893b2294b827d3164261ee8f20267"}, {file = "Faker-23.3.0.tar.gz", hash = "sha256:458d93580de34403a8dec1e8d5e6be2fee96c4deca63b95d71df7a6a80a690de"}, @@ -1083,281 +1107,166 @@ python-dateutil = ">=2.4" [[package]] name = "fastapi" -version = "0.116.2" +version = "0.115.12" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "fastapi-0.116.2-py3-none-any.whl", hash = "sha256:c3a7a8fb830b05f7e087d920e0d786ca1fc9892eb4e9a84b227be4c1bc7569db"}, - {file = "fastapi-0.116.2.tar.gz", hash = "sha256:231a6af2fe21cfa2c32730170ad8514985fc250bec16c9b242d3b94c835ef529"}, + {file = "fastapi-0.115.12-py3-none-any.whl", hash = "sha256:e94613d6c05e27be7ffebdd6ea5f388112e5e430c8f7d6494a9d1d88d43e814d"}, + {file = "fastapi-0.115.12.tar.gz", hash = "sha256:1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.40.0,<0.49.0" +starlette = ">=0.40.0,<0.47.0" typing-extensions = ">=4.8.0" [package.extras] -all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] -standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] - -[[package]] -name = "fastuuid" -version = "0.14.0" -description = "Python bindings to Rust's UUID library." -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:6e6243d40f6c793c3e2ee14c13769e341b90be5ef0c23c82fa6515a96145181a"}, - {file = "fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:13ec4f2c3b04271f62be2e1ce7e95ad2dd1cf97e94503a3760db739afbd48f00"}, - {file = "fastuuid-0.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b2fdd48b5e4236df145a149d7125badb28e0a383372add3fbaac9a6b7a394470"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f74631b8322d2780ebcf2d2d75d58045c3e9378625ec51865fe0b5620800c39d"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83cffc144dc93eb604b87b179837f2ce2af44871a7b323f2bfed40e8acb40ba8"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a771f135ab4523eb786e95493803942a5d1fc1610915f131b363f55af53b219"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4edc56b877d960b4eda2c4232f953a61490c3134da94f3c28af129fb9c62a4f6"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bcc96ee819c282e7c09b2eed2b9bd13084e3b749fdb2faf58c318d498df2efbe"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7a3c0bca61eacc1843ea97b288d6789fbad7400d16db24e36a66c28c268cfe3d"}, - {file = "fastuuid-0.14.0-cp310-cp310-win32.whl", hash = "sha256:7f2f3efade4937fae4e77efae1af571902263de7b78a0aee1a1653795a093b2a"}, - {file = "fastuuid-0.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:ae64ba730d179f439b0736208b4c279b8bc9c089b102aec23f86512ea458c8a4"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:73946cb950c8caf65127d4e9a325e2b6be0442a224fd51ba3b6ac44e1912ce34"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:12ac85024637586a5b69645e7ed986f7535106ed3013640a393a03e461740cb7"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:05a8dde1f395e0c9b4be515b7a521403d1e8349443e7641761af07c7ad1624b1"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09378a05020e3e4883dfdab438926f31fea15fd17604908f3d39cbeb22a0b4dc"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbb0c4b15d66b435d2538f3827f05e44e2baafcc003dd7d8472dc67807ab8fd8"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cd5a7f648d4365b41dbf0e38fe8da4884e57bed4e77c83598e076ac0c93995e7"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c0a94245afae4d7af8c43b3159d5e3934c53f47140be0be624b96acd672ceb73"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:2b29e23c97e77c3a9514d70ce343571e469098ac7f5a269320a0f0b3e193ab36"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1e690d48f923c253f28151b3a6b4e335f2b06bf669c68a02665bc150b7839e94"}, - {file = "fastuuid-0.14.0-cp311-cp311-win32.whl", hash = "sha256:a6f46790d59ab38c6aa0e35c681c0484b50dc0acf9e2679c005d61e019313c24"}, - {file = "fastuuid-0.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:e150eab56c95dc9e3fefc234a0eedb342fac433dacc273cd4d150a5b0871e1fa"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77e94728324b63660ebf8adb27055e92d2e4611645bf12ed9d88d30486471d0a"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:caa1f14d2102cb8d353096bc6ef6c13b2c81f347e6ab9d6fbd48b9dea41c153d"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d23ef06f9e67163be38cece704170486715b177f6baae338110983f99a72c070"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c9ec605ace243b6dbe3bd27ebdd5d33b00d8d1d3f580b39fdd15cd96fd71796"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:808527f2407f58a76c916d6aa15d58692a4a019fdf8d4c32ac7ff303b7d7af09"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fb3c0d7fef6674bbeacdd6dbd386924a7b60b26de849266d1ff6602937675c8"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab3f5d36e4393e628a4df337c2c039069344db5f4b9d2a3c9cea48284f1dd741"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:b9a0ca4f03b7e0b01425281ffd44e99d360e15c895f1907ca105854ed85e2057"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3acdf655684cc09e60fb7e4cf524e8f42ea760031945aa8086c7eae2eeeabeb8"}, - {file = "fastuuid-0.14.0-cp312-cp312-win32.whl", hash = "sha256:9579618be6280700ae36ac42c3efd157049fe4dd40ca49b021280481c78c3176"}, - {file = "fastuuid-0.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:d9e4332dc4ba054434a9594cbfaf7823b57993d7d8e7267831c3e059857cf397"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77a09cb7427e7af74c594e409f7731a0cf887221de2f698e1ca0ebf0f3139021"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:9bd57289daf7b153bfa3e8013446aa144ce5e8c825e9e366d455155ede5ea2dc"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac60fc860cdf3c3f327374db87ab8e064c86566ca8c49d2e30df15eda1b0c2d5"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab32f74bd56565b186f036e33129da77db8be09178cd2f5206a5d4035fb2a23f"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33e678459cf4addaedd9936bbb038e35b3f6b2061330fd8f2f6a1d80414c0f87"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1e3cc56742f76cd25ecb98e4b82a25f978ccffba02e4bdce8aba857b6d85d87b"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cb9a030f609194b679e1660f7e32733b7a0f332d519c5d5a6a0a580991290022"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:09098762aad4f8da3a888eb9ae01c84430c907a297b97166b8abc07b640f2995"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1383fff584fa249b16329a059c68ad45d030d5a4b70fb7c73a08d98fd53bcdab"}, - {file = "fastuuid-0.14.0-cp313-cp313-win32.whl", hash = "sha256:a0809f8cc5731c066c909047f9a314d5f536c871a7a22e815cc4967c110ac9ad"}, - {file = "fastuuid-0.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:0df14e92e7ad3276327631c9e7cec09e32572ce82089c55cb1bb8df71cf394ed"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b852a870a61cfc26c884af205d502881a2e59cc07076b60ab4a951cc0c94d1ad"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c7502d6f54cd08024c3ea9b3514e2d6f190feb2f46e6dbcd3747882264bb5f7b"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1ca61b592120cf314cfd66e662a5b54a578c5a15b26305e1b8b618a6f22df714"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa75b6657ec129d0abded3bec745e6f7ab642e6dba3a5272a68247e85f5f316f"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8a0dfea3972200f72d4c7df02c8ac70bad1bb4c58d7e0ec1e6f341679073a7f"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1bf539a7a95f35b419f9ad105d5a8a35036df35fdafae48fb2fd2e5f318f0d75"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:9a133bf9cc78fdbd1179cb58a59ad0100aa32d8675508150f3658814aeefeaa4"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_i686.whl", hash = "sha256:f54d5b36c56a2d5e1a31e73b950b28a0d83eb0c37b91d10408875a5a29494bad"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:ec27778c6ca3393ef662e2762dba8af13f4ec1aaa32d08d77f71f2a70ae9feb8"}, - {file = "fastuuid-0.14.0-cp314-cp314-win32.whl", hash = "sha256:e23fc6a83f112de4be0cc1990e5b127c27663ae43f866353166f87df58e73d06"}, - {file = "fastuuid-0.14.0-cp314-cp314-win_amd64.whl", hash = "sha256:df61342889d0f5e7a32f7284e55ef95103f2110fee433c2ae7c2c0956d76ac8a"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:47c821f2dfe95909ead0085d4cb18d5149bca704a2b03e03fb3f81a5202d8cea"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3964bab460c528692c70ab6b2e469dd7a7b152fbe8c18616c58d34c93a6cf8d4"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c501561e025b7aea3508719c5801c360c711d5218fc4ad5d77bf1c37c1a75779"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dce5d0756f046fa792a40763f36accd7e466525c5710d2195a038f93ff96346"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193ca10ff553cf3cc461572da83b5780fc0e3eea28659c16f89ae5202f3958d4"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0737606764b29785566f968bd8005eace73d3666bd0862f33a760796e26d1ede"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e0976c0dff7e222513d206e06341503f07423aceb1db0b83ff6851c008ceee06"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6fbc49a86173e7f074b1a9ec8cf12ca0d54d8070a85a06ebf0e76c309b84f0d0"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:de01280eabcd82f7542828ecd67ebf1551d37203ecdfd7ab1f2e534edb78d505"}, - {file = "fastuuid-0.14.0-cp38-cp38-win32.whl", hash = "sha256:af5967c666b7d6a377098849b07f83462c4fedbafcf8eb8bc8ff05dcbe8aa209"}, - {file = "fastuuid-0.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3091e63acf42f56a6f74dc65cfdb6f99bfc79b5913c8a9ac498eb7ca09770a8"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:2ec3d94e13712a133137b2805073b65ecef4a47217d5bac15d8ac62376cefdb4"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:139d7ff12bb400b4a0c76be64c28cbe2e2edf60b09826cbfd85f33ed3d0bbe8b"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d55b7e96531216fc4f071909e33e35e5bfa47962ae67d9e84b00a04d6e8b7173"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0eb25f0fd935e376ac4334927a59e7c823b36062080e2e13acbaf2af15db836"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:089c18018fdbdda88a6dafd7d139f8703a1e7c799618e33ea25eb52503d28a11"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fc37479517d4d70c08696960fad85494a8a7a0af4e93e9a00af04d74c59f9e3"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:73657c9f778aba530bc96a943d30e1a7c80edb8278df77894fe9457540df4f85"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d31f8c257046b5617fc6af9c69be066d2412bdef1edaa4bdf6a214cf57806105"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5816d41f81782b209843e52fdef757a361b448d782452d96abedc53d545da722"}, - {file = "fastuuid-0.14.0-cp39-cp39-win32.whl", hash = "sha256:448aa6833f7a84bfe37dd47e33df83250f404d591eb83527fa2cac8d1e57d7f3"}, - {file = "fastuuid-0.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:84b0779c5abbdec2a9511d5ffbfcd2e53079bf889824b32be170c0d8ef5fc74c"}, - {file = "fastuuid-0.14.0.tar.gz", hash = "sha256:178947fc2f995b38497a74172adee64fdeb8b7ec18f2a5934d037641ba265d26"}, -] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "filelock" -version = "3.20.0" +version = "3.18.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "filelock-3.20.0-py3-none-any.whl", hash = "sha256:339b4732ffda5cd79b13f4e2711a31b0365ce445d95d243bb996273d072546a2"}, - {file = "filelock-3.20.0.tar.gz", hash = "sha256:711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4"}, + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, ] +[package.extras] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] +typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] + [[package]] name = "frozenlist" -version = "1.8.0" +version = "1.6.0" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011"}, - {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565"}, - {file = "frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7"}, - {file = "frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a"}, - {file = "frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6"}, - {file = "frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967"}, - {file = "frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25"}, - {file = "frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b"}, - {file = "frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa"}, - {file = "frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf"}, - {file = "frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746"}, - {file = "frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed"}, - {file = "frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496"}, - {file = "frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231"}, - {file = "frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7"}, - {file = "frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806"}, - {file = "frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0"}, - {file = "frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d8b7138e5cd0647e4523d6685b0eac5d4be9a184ae9634492f25c6eb38c12a47"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6483e309ca809f1efd154b4d37dc6d9f61037d6c6a81c2dc7a15cb22c8c5dca"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b9290cf81e95e93fdf90548ce9d3c1211cf574b8e3f4b3b7cb0537cf2227068"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:59a6a5876ca59d1b63af8cd5e7ffffb024c3dc1e9cf9301b21a2e76286505c95"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc4126390929823e2d2d9dc79ab4046ed74680360fc5f38b585c12c66cdf459"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:332db6b2563333c5671fecacd085141b5800cb866be16d5e3eb15a2086476675"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ff15928d62a0b80bb875655c39bf517938c7d589554cbd2669be42d97c2cb61"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7bf6cdf8e07c8151fba6fe85735441240ec7f619f935a5205953d58009aef8c6"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:48e6d3f4ec5c7273dfe83ff27c91083c6c9065af655dc2684d2c200c94308bb5"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:1a7607e17ad33361677adcd1443edf6f5da0ce5e5377b798fba20fae194825f3"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3a935c3a4e89c733303a2d5a7c257ea44af3a56c8202df486b7f5de40f37e1"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:940d4a017dbfed9daf46a3b086e1d2167e7012ee297fef9e1c545c4d022f5178"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b9be22a69a014bc47e78072d0ecae716f5eb56c15238acca0f43d6eb8e4a5bda"}, - {file = "frozenlist-1.8.0-cp39-cp39-win32.whl", hash = "sha256:1aa77cb5697069af47472e39612976ed05343ff2e84a3dcf15437b232cbfd087"}, - {file = "frozenlist-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:7398c222d1d405e796970320036b1b563892b65809d9e5261487bb2c7f7b5c6a"}, - {file = "frozenlist-1.8.0-cp39-cp39-win_arm64.whl", hash = "sha256:b4f3b365f31c6cd4af24545ca0a244a53688cad8834e32f56831c4923b50a103"}, - {file = "frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d"}, - {file = "frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad"}, +files = [ + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e6e558ea1e47fd6fa8ac9ccdad403e5dd5ecc6ed8dda94343056fa4277d5c65e"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f4b3cd7334a4bbc0c472164f3744562cb72d05002cc6fcf58adb104630bbc352"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9799257237d0479736e2b4c01ff26b5c7f7694ac9692a426cb717f3dc02fff9b"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3a7bb0fe1f7a70fb5c6f497dc32619db7d2cdd53164af30ade2f34673f8b1fc"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:36d2fc099229f1e4237f563b2a3e0ff7ccebc3999f729067ce4e64a97a7f2869"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f27a9f9a86dcf00708be82359db8de86b80d029814e6693259befe82bb58a106"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75ecee69073312951244f11b8627e3700ec2bfe07ed24e3a685a5979f0412d24"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2c7d5aa19714b1b01a0f515d078a629e445e667b9da869a3cd0e6fe7dec78bd"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69bbd454f0fb23b51cadc9bdba616c9678e4114b6f9fa372d462ff2ed9323ec8"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7daa508e75613809c7a57136dec4871a21bca3080b3a8fc347c50b187df4f00c"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:89ffdb799154fd4d7b85c56d5fa9d9ad48946619e0eb95755723fffa11022d75"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:920b6bd77d209931e4c263223381d63f76828bec574440f29eb497cf3394c249"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d3ceb265249fb401702fce3792e6b44c1166b9319737d21495d3611028d95769"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52021b528f1571f98a7d4258c58aa8d4b1a96d4f01d00d51f1089f2e0323cb02"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0f2ca7810b809ed0f1917293050163c7654cefc57a49f337d5cd9de717b8fad3"}, + {file = "frozenlist-1.6.0-cp310-cp310-win32.whl", hash = "sha256:0e6f8653acb82e15e5443dba415fb62a8732b68fe09936bb6d388c725b57f812"}, + {file = "frozenlist-1.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f1a39819a5a3e84304cd286e3dc62a549fe60985415851b3337b6f5cc91907f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae8337990e7a45683548ffb2fee1af2f1ed08169284cd829cdd9a7fa7470530d"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8c952f69dd524558694818a461855f35d36cc7f5c0adddce37e962c85d06eac0"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8f5fef13136c4e2dee91bfb9a44e236fff78fc2cd9f838eddfc470c3d7d90afe"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:716bbba09611b4663ecbb7cd022f640759af8259e12a6ca939c0a6acd49eedba"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7b8c4dc422c1a3ffc550b465090e53b0bf4839047f3e436a34172ac67c45d595"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b11534872256e1666116f6587a1592ef395a98b54476addb5e8d352925cb5d4a"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c6eceb88aaf7221f75be6ab498dc622a151f5f88d536661af3ffc486245a626"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62c828a5b195570eb4b37369fcbbd58e96c905768d53a44d13044355647838ff"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1c6bd2c6399920c9622362ce95a7d74e7f9af9bfec05fff91b8ce4b9647845a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ba23817781e22fcbd45fd9ff2b9b8cdb7b16a42a4851ab8025cae7b22e96d0"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:431ef6937ae0f853143e2ca67d6da76c083e8b1fe3df0e96f3802fd37626e606"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9d124b38b3c299ca68433597ee26b7819209cb8a3a9ea761dfe9db3a04bba584"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:118e97556306402e2b010da1ef21ea70cb6d6122e580da64c056b96f524fbd6a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fb3b309f1d4086b5533cf7bbcf3f956f0ae6469664522f1bde4feed26fba60f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54dece0d21dce4fdb188a1ffc555926adf1d1c516e493c2914d7c370e454bc9e"}, + {file = "frozenlist-1.6.0-cp311-cp311-win32.whl", hash = "sha256:654e4ba1d0b2154ca2f096bed27461cf6160bc7f504a7f9a9ef447c293caf860"}, + {file = "frozenlist-1.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e911391bffdb806001002c1f860787542f45916c3baf764264a52765d5a5603"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:c5b9e42ace7d95bf41e19b87cec8f262c41d3510d8ad7514ab3862ea2197bfb1"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ca9973735ce9f770d24d5484dcb42f68f135351c2fc81a7a9369e48cf2998a29"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ac40ec76041c67b928ca8aaffba15c2b2ee3f5ae8d0cb0617b5e63ec119ca25"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b7a8a3180dfb280eb044fdec562f9b461614c0ef21669aea6f1d3dac6ee576"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c444d824e22da6c9291886d80c7d00c444981a72686e2b59d38b285617cb52c8"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb52c8166499a8150bfd38478248572c924c003cbb45fe3bcd348e5ac7c000f9"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b35298b2db9c2468106278537ee529719228950a5fdda686582f68f247d1dc6e"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d108e2d070034f9d57210f22fefd22ea0d04609fc97c5f7f5a686b3471028590"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e1be9111cb6756868ac242b3c2bd1f09d9aea09846e4f5c23715e7afb647103"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:94bb451c664415f02f07eef4ece976a2c65dcbab9c2f1705b7031a3a75349d8c"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d1a686d0b0949182b8faddea596f3fc11f44768d1f74d4cad70213b2e139d821"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ea8e59105d802c5a38bdbe7362822c522230b3faba2aa35c0fa1765239b7dd70"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:abc4e880a9b920bc5020bf6a431a6bb40589d9bca3975c980495f63632e8382f"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9a79713adfe28830f27a3c62f6b5406c37376c892b05ae070906f07ae4487046"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9a0318c2068e217a8f5e3b85e35899f5a19e97141a45bb925bb357cfe1daf770"}, + {file = "frozenlist-1.6.0-cp312-cp312-win32.whl", hash = "sha256:853ac025092a24bb3bf09ae87f9127de9fe6e0c345614ac92536577cf956dfcc"}, + {file = "frozenlist-1.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:2bdfe2d7e6c9281c6e55523acd6c2bf77963cb422fdc7d142fb0cb6621b66878"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:1d7fb014fe0fbfee3efd6a94fc635aeaa68e5e1720fe9e57357f2e2c6e1a647e"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01bcaa305a0fdad12745502bfd16a1c75b14558dabae226852f9159364573117"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b314faa3051a6d45da196a2c495e922f987dc848e967d8cfeaee8a0328b1cd4"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da62fecac21a3ee10463d153549d8db87549a5e77eefb8c91ac84bb42bb1e4e3"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1eb89bf3454e2132e046f9599fbcf0a4483ed43b40f545551a39316d0201cd1"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18689b40cb3936acd971f663ccb8e2589c45db5e2c5f07e0ec6207664029a9c"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e67ddb0749ed066b1a03fba812e2dcae791dd50e5da03be50b6a14d0c1a9ee45"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc5e64626e6682638d6e44398c9baf1d6ce6bc236d40b4b57255c9d3f9761f1f"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:437cfd39564744ae32ad5929e55b18ebd88817f9180e4cc05e7d53b75f79ce85"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62dd7df78e74d924952e2feb7357d826af8d2f307557a779d14ddf94d7311be8"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a66781d7e4cddcbbcfd64de3d41a61d6bdde370fc2e38623f30b2bd539e84a9f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:482fe06e9a3fffbcd41950f9d890034b4a54395c60b5e61fae875d37a699813f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e4f9373c500dfc02feea39f7a56e4f543e670212102cc2eeb51d3a99c7ffbde6"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e69bb81de06827147b7bfbaeb284d85219fa92d9f097e32cc73675f279d70188"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7613d9977d2ab4a9141dde4a149f4357e4065949674c5649f920fec86ecb393e"}, + {file = "frozenlist-1.6.0-cp313-cp313-win32.whl", hash = "sha256:4def87ef6d90429f777c9d9de3961679abf938cb6b7b63d4a7eb8a268babfce4"}, + {file = "frozenlist-1.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:37a8a52c3dfff01515e9bbbee0e6063181362f9de3db2ccf9bc96189b557cbfd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:46138f5a0773d064ff663d273b309b696293d7a7c00a0994c5c13a5078134b64"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f88bc0a2b9c2a835cb888b32246c27cdab5740059fb3688852bf91e915399b91"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:777704c1d7655b802c7850255639672e90e81ad6fa42b99ce5ed3fbf45e338dd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ef8d41764c7de0dcdaf64f733a27352248493a85a80661f3c678acd27e31f2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:da5cb36623f2b846fb25009d9d9215322318ff1c63403075f812b3b2876c8506"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cbb56587a16cf0fb8acd19e90ff9924979ac1431baea8681712716a8337577b0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6154c3ba59cda3f954c6333025369e42c3acd0c6e8b6ce31eb5c5b8116c07e0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e8246877afa3f1ae5c979fe85f567d220f86a50dc6c493b9b7d8191181ae01e"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b0f6cce16306d2e117cf9db71ab3a9e8878a28176aeaf0dbe35248d97b28d0c"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1b8e8cd8032ba266f91136d7105706ad57770f3522eac4a111d77ac126a25a9b"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:e2ada1d8515d3ea5378c018a5f6d14b4994d4036591a52ceaf1a1549dec8e1ad"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:cdb2c7f071e4026c19a3e32b93a09e59b12000751fc9b0b7758da899e657d215"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:03572933a1969a6d6ab509d509e5af82ef80d4a5d4e1e9f2e1cdd22c77a3f4d2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:77effc978947548b676c54bbd6a08992759ea6f410d4987d69feea9cd0919911"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a2bda8be77660ad4089caf2223fdbd6db1858462c4b85b67fbfa22102021e497"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win32.whl", hash = "sha256:a4d96dc5bcdbd834ec6b0f91027817214216b5b30316494d2b1aebffb87c534f"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:e18036cb4caa17ea151fd5f3d70be9d354c99eb8cf817a3ccde8a7873b074348"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:536a1236065c29980c15c7229fbb830dedf809708c10e159b8136534233545f0"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ed5e3a4462ff25ca84fb09e0fada8ea267df98a450340ead4c91b44857267d70"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e19c0fc9f4f030fcae43b4cdec9e8ab83ffe30ec10c79a4a43a04d1af6c5e1ad"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c608f833897501dac548585312d73a7dca028bf3b8688f0d712b7acfaf7fb3"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0dbae96c225d584f834b8d3cc688825911960f003a85cb0fd20b6e5512468c42"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:625170a91dd7261a1d1c2a0c1a353c9e55d21cd67d0852185a5fef86587e6f5f"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1db8b2fc7ee8a940b547a14c10e56560ad3ea6499dc6875c354e2335812f739d"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4da6fc43048b648275a220e3a61c33b7fff65d11bdd6dcb9d9c145ff708b804c"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef8e7e8f2f3820c5f175d70fdd199b79e417acf6c72c5d0aa8f63c9f721646f"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa733d123cc78245e9bb15f29b44ed9e5780dc6867cfc4e544717b91f980af3b"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:ba7f8d97152b61f22d7f59491a781ba9b177dd9f318486c5fbc52cde2db12189"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:56a0b8dd6d0d3d971c91f1df75e824986667ccce91e20dca2023683814344791"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5c9e89bf19ca148efcc9e3c44fd4c09d5af85c8a7dd3dbd0da1cb83425ef4983"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1330f0a4376587face7637dfd245380a57fe21ae8f9d360c1c2ef8746c4195fa"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2187248203b59625566cac53572ec8c2647a140ee2738b4e36772930377a533c"}, + {file = "frozenlist-1.6.0-cp39-cp39-win32.whl", hash = "sha256:2b8cf4cfea847d6c12af06091561a89740f1f67f331c3fa8623391905e878530"}, + {file = "frozenlist-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:1255d5d64328c5a0d066ecb0f02034d086537925f1f04b50b1ae60d37afbf572"}, + {file = "frozenlist-1.6.0-py3-none-any.whl", hash = "sha256:535eec9987adb04701266b92745d6cdcef2e77669299359c3009c3404dd5d191"}, + {file = "frozenlist-1.6.0.tar.gz", hash = "sha256:b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68"}, ] [[package]] name = "fsspec" -version = "2025.10.0" +version = "2025.5.0" description = "File-system specification" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "fsspec-2025.10.0-py3-none-any.whl", hash = "sha256:7c7712353ae7d875407f97715f0e1ffcc21e33d5b24556cb1e090ae9409ec61d"}, - {file = "fsspec-2025.10.0.tar.gz", hash = "sha256:b6789427626f068f9a83ca4e8a3cc050850b6c0f71f99ddb4f542b8266a26a59"}, + {file = "fsspec-2025.5.0-py3-none-any.whl", hash = "sha256:0ca253eca6b5333d8a2b8bd98c7326fe821f1f0fdbd34e1b445bddde8e804c95"}, + {file = "fsspec-2025.5.0.tar.gz", hash = "sha256:e4f4623bb6221f7407fd695cc535d1f857a077eb247580f4ada34f5dc25fd5c8"}, ] [package.extras] @@ -1365,7 +1274,7 @@ abfs = ["adlfs"] adl = ["adlfs"] arrow = ["pyarrow (>=1)"] dask = ["dask", "distributed"] -dev = ["pre-commit", "ruff (>=0.5)"] +dev = ["pre-commit", "ruff"] doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"] dropbox = ["dropbox", "dropboxdrivefs", "requests"] full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] @@ -1395,7 +1304,6 @@ description = "GenSON is a powerful, user-friendly JSON Schema generator." optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "genson-1.3.0-py3-none-any.whl", hash = "sha256:468feccd00274cc7e4c09e84b08704270ba8d95232aa280f65b986139cec67f7"}, {file = "genson-1.3.0.tar.gz", hash = "sha256:e02db9ac2e3fd29e65b5286f7135762e2cd8a986537c075b06fc5f1517308e37"}, @@ -1403,142 +1311,100 @@ files = [ [[package]] name = "google-auth" -version = "2.43.0" +version = "2.40.1" description = "Google Authentication Library" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "google_auth-2.43.0-py2.py3-none-any.whl", hash = "sha256:af628ba6fa493f75c7e9dbe9373d148ca9f4399b5ea29976519e0a3848eddd16"}, - {file = "google_auth-2.43.0.tar.gz", hash = "sha256:88228eee5fc21b62a1b5fe773ca15e67778cb07dc8363adcb4a8827b52d81483"}, + {file = "google_auth-2.40.1-py2.py3-none-any.whl", hash = "sha256:ed4cae4f5c46b41bae1d19c036e06f6c371926e97b19e816fc854eff811974ee"}, + {file = "google_auth-2.40.1.tar.gz", hash = "sha256:58f0e8416a9814c1d86c9b7f6acf6816b51aba167b2c76821965271bac275540"}, ] [package.dependencies] -cachetools = ">=2.0.0,<7.0" +cachetools = ">=2.0.0,<6.0" pyasn1-modules = ">=0.2.1" rsa = ">=3.1.4,<5" [package.extras] aiohttp = ["aiohttp (>=3.6.2,<4.0.0)", "requests (>=2.20.0,<3.0.0)"] enterprise-cert = ["cryptography", "pyopenssl"] -pyjwt = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] -pyopenssl = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] +pyjwt = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] +pyopenssl = ["cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] requests = ["requests (>=2.20.0,<3.0.0)"] -testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0)", "cryptography (<39.0.0)", "cryptography (>=38.0.3)", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] +testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0) ; python_version < \"3.8\"", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] urllib3 = ["packaging", "urllib3"] -[[package]] -name = "googleapis-common-protos" -version = "1.72.0" -description = "Common protobufs used in Google APIs" -optional = false -python-versions = ">=3.7" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038"}, - {file = "googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5"}, -] - -[package.dependencies] -protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" - -[package.extras] -grpc = ["grpcio (>=1.44.0,<2.0.0)"] - [[package]] name = "greenlet" -version = "3.2.4" +version = "3.2.2" description = "Lightweight in-process concurrent programming" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "(python_version == \"3.11\" or python_version >= \"3.12\") and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")" -files = [ - {file = "greenlet-3.2.4-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:8c68325b0d0acf8d91dde4e6f930967dd52a5302cd4062932a6b2e7c2969f47c"}, - {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:94385f101946790ae13da500603491f04a76b6e4c059dab271b3ce2e283b2590"}, - {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f10fd42b5ee276335863712fa3da6608e93f70629c631bf77145021600abc23c"}, - {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c8c9e331e58180d0d83c5b7999255721b725913ff6bc6cf39fa2a45841a4fd4b"}, - {file = "greenlet-3.2.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:58b97143c9cc7b86fc458f215bd0932f1757ce649e05b640fea2e79b54cedb31"}, - {file = "greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d"}, - {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5"}, - {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f"}, - {file = "greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c"}, - {file = "greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2"}, - {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246"}, - {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:94abf90142c2a18151632371140b3dba4dee031633fe614cb592dbb6c9e17bc3"}, - {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:4d1378601b85e2e5171b99be8d2dc85f594c79967599328f95c1dc1a40f1c633"}, - {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0db5594dce18db94f7d1650d7489909b57afde4c580806b8d9203b6e79cdc079"}, - {file = "greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8"}, - {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52"}, - {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa"}, - {file = "greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9"}, - {file = "greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd"}, - {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb"}, - {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f28588772bb5fb869a8eb331374ec06f24a83a9c25bfa1f38b6993afe9c1e968"}, - {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:5c9320971821a7cb77cfab8d956fa8e39cd07ca44b6070db358ceb7f8797c8c9"}, - {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c60a6d84229b271d44b70fb6e5fa23781abb5d742af7b808ae3f6efd7c9c60f6"}, - {file = "greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0"}, - {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0"}, - {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f"}, - {file = "greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02"}, - {file = "greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31"}, - {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945"}, - {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:710638eb93b1fa52823aa91bf75326f9ecdfd5e0466f00789246a5280f4ba0fc"}, - {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c5111ccdc9c88f423426df3fd1811bfc40ed66264d35aa373420a34377efc98a"}, - {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d76383238584e9711e20ebe14db6c88ddcedc1829a9ad31a584389463b5aa504"}, - {file = "greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671"}, - {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b"}, - {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae"}, - {file = "greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b"}, - {file = "greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0"}, - {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f"}, - {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c17b6b34111ea72fc5a4e4beec9711d2226285f0386ea83477cbb97c30a3f3a5"}, - {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1"}, - {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735"}, - {file = "greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337"}, - {file = "greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01"}, - {file = "greenlet-3.2.4-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:b6a7c19cf0d2742d0809a4c05975db036fdff50cd294a93632d6a310bf9ac02c"}, - {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27890167f55d2387576d1f41d9487ef171849ea0359ce1510ca6e06c8bece11d"}, - {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:18d9260df2b5fbf41ae5139e1be4e796d99655f023a636cd0e11e6406cca7d58"}, - {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:671df96c1f23c4a0d4077a325483c1503c96a1b7d9db26592ae770daa41233d4"}, - {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:16458c245a38991aa19676900d48bd1a6f2ce3e16595051a4db9d012154e8433"}, - {file = "greenlet-3.2.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9913f1a30e4526f432991f89ae263459b1c64d1608c0d22a5c79c287b3c70df"}, - {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b90654e092f928f110e0007f572007c9727b5265f7632c2fa7415b4689351594"}, - {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81701fd84f26330f0d5f4944d4e92e61afe6319dcd9775e39396e39d7c3e5f98"}, - {file = "greenlet-3.2.4-cp39-cp39-win32.whl", hash = "sha256:65458b409c1ed459ea899e939f0e1cdb14f58dbc803f2f93c5eab5694d32671b"}, - {file = "greenlet-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2e685ade4dafd447ede19c31277a224a239a0a1a4eca4e6390efedf20260cfb"}, - {file = "greenlet-3.2.4.tar.gz", hash = "sha256:0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d"}, +markers = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")" +files = [ + {file = "greenlet-3.2.2-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:c49e9f7c6f625507ed83a7485366b46cbe325717c60837f7244fc99ba16ba9d6"}, + {file = "greenlet-3.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3cc1a3ed00ecfea8932477f729a9f616ad7347a5e55d50929efa50a86cb7be7"}, + {file = "greenlet-3.2.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7c9896249fbef2c615853b890ee854f22c671560226c9221cfd27c995db97e5c"}, + {file = "greenlet-3.2.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7409796591d879425997a518138889d8d17e63ada7c99edc0d7a1c22007d4907"}, + {file = "greenlet-3.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7791dcb496ec53d60c7f1c78eaa156c21f402dda38542a00afc3e20cae0f480f"}, + {file = "greenlet-3.2.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d8009ae46259e31bc73dc183e402f548e980c96f33a6ef58cc2e7865db012e13"}, + {file = "greenlet-3.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:fd9fb7c941280e2c837b603850efc93c999ae58aae2b40765ed682a6907ebbc5"}, + {file = "greenlet-3.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:00cd814b8959b95a546e47e8d589610534cfb71f19802ea8a2ad99d95d702057"}, + {file = "greenlet-3.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:d0cb7d47199001de7658c213419358aa8937df767936506db0db7ce1a71f4a2f"}, + {file = "greenlet-3.2.2-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:dcb9cebbf3f62cb1e5afacae90761ccce0effb3adaa32339a0670fe7805d8068"}, + {file = "greenlet-3.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf3fc9145141250907730886b031681dfcc0de1c158f3cc51c092223c0f381ce"}, + {file = "greenlet-3.2.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:efcdfb9df109e8a3b475c016f60438fcd4be68cd13a365d42b35914cdab4bb2b"}, + {file = "greenlet-3.2.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4bd139e4943547ce3a56ef4b8b1b9479f9e40bb47e72cc906f0f66b9d0d5cab3"}, + {file = "greenlet-3.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71566302219b17ca354eb274dfd29b8da3c268e41b646f330e324e3967546a74"}, + {file = "greenlet-3.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3091bc45e6b0c73f225374fefa1536cd91b1e987377b12ef5b19129b07d93ebe"}, + {file = "greenlet-3.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:44671c29da26539a5f142257eaba5110f71887c24d40df3ac87f1117df589e0e"}, + {file = "greenlet-3.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c23ea227847c9dbe0b3910f5c0dd95658b607137614eb821e6cbaecd60d81cc6"}, + {file = "greenlet-3.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:0a16fb934fcabfdfacf21d79e6fed81809d8cd97bc1be9d9c89f0e4567143d7b"}, + {file = "greenlet-3.2.2-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:df4d1509efd4977e6a844ac96d8be0b9e5aa5d5c77aa27ca9f4d3f92d3fcf330"}, + {file = "greenlet-3.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da956d534a6d1b9841f95ad0f18ace637668f680b1339ca4dcfb2c1837880a0b"}, + {file = "greenlet-3.2.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9c7b15fb9b88d9ee07e076f5a683027bc3befd5bb5d25954bb633c385d8b737e"}, + {file = "greenlet-3.2.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:752f0e79785e11180ebd2e726c8a88109ded3e2301d40abced2543aa5d164275"}, + {file = "greenlet-3.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ae572c996ae4b5e122331e12bbb971ea49c08cc7c232d1bd43150800a2d6c65"}, + {file = "greenlet-3.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:02f5972ff02c9cf615357c17ab713737cccfd0eaf69b951084a9fd43f39833d3"}, + {file = "greenlet-3.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:4fefc7aa68b34b9224490dfda2e70ccf2131368493add64b4ef2d372955c207e"}, + {file = "greenlet-3.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a31ead8411a027c2c4759113cf2bd473690517494f3d6e4bf67064589afcd3c5"}, + {file = "greenlet-3.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:b24c7844c0a0afc3ccbeb0b807adeefb7eff2b5599229ecedddcfeb0ef333bec"}, + {file = "greenlet-3.2.2-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:3ab7194ee290302ca15449f601036007873028712e92ca15fc76597a0aeb4c59"}, + {file = "greenlet-3.2.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc5c43bb65ec3669452af0ab10729e8fdc17f87a1f2ad7ec65d4aaaefabf6bf"}, + {file = "greenlet-3.2.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:decb0658ec19e5c1f519faa9a160c0fc85a41a7e6654b3ce1b44b939f8bf1325"}, + {file = "greenlet-3.2.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6fadd183186db360b61cb34e81117a096bff91c072929cd1b529eb20dd46e6c5"}, + {file = "greenlet-3.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1919cbdc1c53ef739c94cf2985056bcc0838c1f217b57647cbf4578576c63825"}, + {file = "greenlet-3.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3885f85b61798f4192d544aac7b25a04ece5fe2704670b4ab73c2d2c14ab740d"}, + {file = "greenlet-3.2.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:85f3e248507125bf4af607a26fd6cb8578776197bd4b66e35229cdf5acf1dfbf"}, + {file = "greenlet-3.2.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1e76106b6fc55fa3d6fe1c527f95ee65e324a13b62e243f77b48317346559708"}, + {file = "greenlet-3.2.2-cp313-cp313-win_amd64.whl", hash = "sha256:fe46d4f8e94e637634d54477b0cfabcf93c53f29eedcbdeecaf2af32029b4421"}, + {file = "greenlet-3.2.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba30e88607fb6990544d84caf3c706c4b48f629e18853fc6a646f82db9629418"}, + {file = "greenlet-3.2.2-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:055916fafad3e3388d27dd68517478933a97edc2fc54ae79d3bec827de2c64c4"}, + {file = "greenlet-3.2.2-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2593283bf81ca37d27d110956b79e8723f9aa50c4bcdc29d3c0543d4743d2763"}, + {file = "greenlet-3.2.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89c69e9a10670eb7a66b8cef6354c24671ba241f46152dd3eed447f79c29fb5b"}, + {file = "greenlet-3.2.2-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:02a98600899ca1ca5d3a2590974c9e3ec259503b2d6ba6527605fcd74e08e207"}, + {file = "greenlet-3.2.2-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:b50a8c5c162469c3209e5ec92ee4f95c8231b11db6a04db09bbe338176723bb8"}, + {file = "greenlet-3.2.2-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:45f9f4853fb4cc46783085261c9ec4706628f3b57de3e68bae03e8f8b3c0de51"}, + {file = "greenlet-3.2.2-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:9ea5231428af34226c05f927e16fc7f6fa5e39e3ad3cd24ffa48ba53a47f4240"}, + {file = "greenlet-3.2.2-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:1e4747712c4365ef6765708f948acc9c10350719ca0545e362c24ab973017370"}, + {file = "greenlet-3.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:782743700ab75716650b5238a4759f840bb2dcf7bff56917e9ffdf9f1f23ec59"}, + {file = "greenlet-3.2.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:354f67445f5bed6604e493a06a9a49ad65675d3d03477d38a4db4a427e9aad0e"}, + {file = "greenlet-3.2.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3aeca9848d08ce5eb653cf16e15bb25beeab36e53eb71cc32569f5f3afb2a3aa"}, + {file = "greenlet-3.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cb8553ee954536500d88a1a2f58fcb867e45125e600e80f586ade399b3f8819"}, + {file = "greenlet-3.2.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1592a615b598643dbfd566bac8467f06c8c8ab6e56f069e573832ed1d5d528cc"}, + {file = "greenlet-3.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1f72667cc341c95184f1c68f957cb2d4fc31eef81646e8e59358a10ce6689457"}, + {file = "greenlet-3.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a8fa80665b1a29faf76800173ff5325095f3e66a78e62999929809907aca5659"}, + {file = "greenlet-3.2.2-cp39-cp39-win32.whl", hash = "sha256:6629311595e3fe7304039c67f00d145cd1d38cf723bb5b99cc987b23c1433d61"}, + {file = "greenlet-3.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:eeb27bece45c0c2a5842ac4c5a1b5c2ceaefe5711078eed4e8043159fa05c834"}, + {file = "greenlet-3.2.2.tar.gz", hash = "sha256:ad053d34421a2debba45aa3cc39acf454acbcd025b3fc1a9f8a0dee237abd485"}, ] [package.extras] docs = ["Sphinx", "furo"] -test = ["objgraph", "psutil", "setuptools"] - -[[package]] -name = "gunicorn" -version = "23.0.0" -description = "WSGI HTTP Server for UNIX" -optional = false -python-versions = ">=3.7" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d"}, - {file = "gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec"}, -] - -[package.dependencies] -packaging = "*" - -[package.extras] -eventlet = ["eventlet (>=0.24.1,!=0.36.0)"] -gevent = ["gevent (>=1.4.0)"] -setproctitle = ["setproctitle"] -testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"] -tornado = ["tornado (>=0.2)"] +test = ["objgraph", "psutil"] [[package]] name = "h11" @@ -1547,7 +1413,6 @@ description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, @@ -1560,7 +1425,6 @@ description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, @@ -1583,7 +1447,6 @@ description = "The next generation HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, @@ -1596,7 +1459,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli", "brotlicffi"] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -1604,15 +1467,14 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "huggingface-hub" -version = "0.30.2" +version = "0.31.4" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "huggingface_hub-0.30.2-py3-none-any.whl", hash = "sha256:68ff05969927058cfa41df4f2155d4bb48f5f54f719dd0390103eefa9b191e28"}, - {file = "huggingface_hub-0.30.2.tar.gz", hash = "sha256:9a7897c5b6fd9dad3168a794a8998d6378210f5b9688d0dfc180b1a228dc2466"}, + {file = "huggingface_hub-0.31.4-py3-none-any.whl", hash = "sha256:4f70704760296cc69b612916056e9845f5490a33782b924fc531767967acc15d"}, + {file = "huggingface_hub-0.31.4.tar.gz", hash = "sha256:5a7bc710b9f9c028aee5b1476867b4ec5c1b92f043cb364d5fdc54354757e4ce"}, ] [package.dependencies] @@ -1630,7 +1492,7 @@ cli = ["InquirerPy (==0.3.4)"] dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "fastapi", "gradio (>=4.0.0)", "jedi", "libcst (==1.4.0)", "mypy (==1.5.1)", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] hf-transfer = ["hf-transfer (>=0.1.4)"] -hf-xet = ["hf-xet (>=0.1.4)"] +hf-xet = ["hf-xet (>=1.1.1,<2.0.0)"] inference = ["aiohttp"] quality = ["libcst (==1.4.0)", "mypy (==1.5.1)", "ruff (>=0.9.0)"] tensorflow = ["graphviz", "pydot", "tensorflow"] @@ -1641,15 +1503,14 @@ typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "t [[package]] name = "idna" -version = "3.11" +version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.8" +python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, - {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, ] [package.extras] @@ -1662,7 +1523,6 @@ description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"}, {file = "importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000"}, @@ -1672,25 +1532,24 @@ files = [ zipp = ">=3.20" [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib_resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] name = "iniconfig" -version = "2.3.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.10" -groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +python-versions = ">=3.8" +groups = ["main", "dev"] files = [ - {file = "iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"}, - {file = "iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -1700,7 +1559,6 @@ description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, @@ -1714,128 +1572,113 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jiter" -version = "0.12.0" +version = "0.10.0" description = "Fast iterable JSON parser." optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "jiter-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:e7acbaba9703d5de82a2c98ae6a0f59ab9770ab5af5fa35e43a303aee962cf65"}, - {file = "jiter-0.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:364f1a7294c91281260364222f535bc427f56d4de1d8ffd718162d21fbbd602e"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ee4d25805d4fb23f0a5167a962ef8e002dbfb29c0989378488e32cf2744b62"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:796f466b7942107eb889c08433b6e31b9a7ed31daceaecf8af1be26fb26c0ca8"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35506cb71f47dba416694e67af996bbdefb8e3608f1f78799c2e1f9058b01ceb"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:726c764a90c9218ec9e4f99a33d6bf5ec169163f2ca0fc21b654e88c2abc0abc"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa47810c5565274810b726b0dc86d18dce5fd17b190ebdc3890851d7b2a0e74"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ec0259d3f26c62aed4d73b198c53e316ae11f0f69c8fbe6682c6dcfa0fcce2"}, - {file = "jiter-0.12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:79307d74ea83465b0152fa23e5e297149506435535282f979f18b9033c0bb025"}, - {file = "jiter-0.12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cf6e6dd18927121fec86739f1a8906944703941d000f0639f3eb6281cc601dca"}, - {file = "jiter-0.12.0-cp310-cp310-win32.whl", hash = "sha256:b6ae2aec8217327d872cbfb2c1694489057b9433afce447955763e6ab015b4c4"}, - {file = "jiter-0.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:c7f49ce90a71e44f7e1aa9e7ec415b9686bbc6a5961e57eab511015e6759bc11"}, - {file = "jiter-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d8f8a7e317190b2c2d60eb2e8aa835270b008139562d70fe732e1c0020ec53c9"}, - {file = "jiter-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2218228a077e784c6c8f1a8e5d6b8cb1dea62ce25811c356364848554b2056cd"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9354ccaa2982bf2188fd5f57f79f800ef622ec67beb8329903abf6b10da7d423"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2607185ea89b4af9a604d4c7ec40e45d3ad03ee66998b031134bc510232bb7"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a585a5e42d25f2e71db5f10b171f5e5ea641d3aa44f7df745aa965606111cc2"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd9e21d34edff5a663c631f850edcb786719c960ce887a5661e9c828a53a95d9"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a612534770470686cd5431478dc5a1b660eceb410abade6b1b74e320ca98de6"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3985aea37d40a908f887b34d05111e0aae822943796ebf8338877fee2ab67725"}, - {file = "jiter-0.12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b1207af186495f48f72529f8d86671903c8c10127cac6381b11dddc4aaa52df6"}, - {file = "jiter-0.12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef2fb241de583934c9915a33120ecc06d94aa3381a134570f59eed784e87001e"}, - {file = "jiter-0.12.0-cp311-cp311-win32.whl", hash = "sha256:453b6035672fecce8007465896a25b28a6b59cfe8fbc974b2563a92f5a92a67c"}, - {file = "jiter-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:ca264b9603973c2ad9435c71a8ec8b49f8f715ab5ba421c85a51cde9887e421f"}, - {file = "jiter-0.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:cb00ef392e7d684f2754598c02c409f376ddcef857aae796d559e6cacc2d78a5"}, - {file = "jiter-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:305e061fa82f4680607a775b2e8e0bcb071cd2205ac38e6ef48c8dd5ebe1cf37"}, - {file = "jiter-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5c1860627048e302a528333c9307c818c547f214d8659b0705d2195e1a94b274"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df37577a4f8408f7e0ec3205d2a8f87672af8f17008358063a4d6425b6081ce3"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fdd787356c1c13a4f40b43c2156276ef7a71eb487d98472476476d803fb2cf"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1eb5db8d9c65b112aacf14fcd0faae9913d07a8afea5ed06ccdd12b724e966a1"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73c568cc27c473f82480abc15d1301adf333a7ea4f2e813d6a2c7d8b6ba8d0df"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4321e8a3d868919bcb1abb1db550d41f2b5b326f72df29e53b2df8b006eb9403"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0a51bad79f8cc9cac2b4b705039f814049142e0050f30d91695a2d9a6611f126"}, - {file = "jiter-0.12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:2a67b678f6a5f1dd6c36d642d7db83e456bc8b104788262aaefc11a22339f5a9"}, - {file = "jiter-0.12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efe1a211fe1fd14762adea941e3cfd6c611a136e28da6c39272dbb7a1bbe6a86"}, - {file = "jiter-0.12.0-cp312-cp312-win32.whl", hash = "sha256:d779d97c834b4278276ec703dc3fc1735fca50af63eb7262f05bdb4e62203d44"}, - {file = "jiter-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:e8269062060212b373316fe69236096aaf4c49022d267c6736eebd66bbbc60bb"}, - {file = "jiter-0.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:06cb970936c65de926d648af0ed3d21857f026b1cf5525cb2947aa5e01e05789"}, - {file = "jiter-0.12.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:6cc49d5130a14b732e0612bc76ae8db3b49898732223ef8b7599aa8d9810683e"}, - {file = "jiter-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:37f27a32ce36364d2fa4f7fdc507279db604d27d239ea2e044c8f148410defe1"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbc0944aa3d4b4773e348cda635252824a78f4ba44328e042ef1ff3f6080d1cf"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da25c62d4ee1ffbacb97fac6dfe4dcd6759ebdc9015991e92a6eae5816287f44"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:048485c654b838140b007390b8182ba9774621103bd4d77c9c3f6f117474ba45"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:635e737fbb7315bef0037c19b88b799143d2d7d3507e61a76751025226b3ac87"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e017c417b1ebda911bd13b1e40612704b1f5420e30695112efdbed8a4b389ed"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:89b0bfb8b2bf2351fba36bb211ef8bfceba73ef58e7f0c68fb67b5a2795ca2f9"}, - {file = "jiter-0.12.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:f5aa5427a629a824a543672778c9ce0c5e556550d1569bb6ea28a85015287626"}, - {file = "jiter-0.12.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed53b3d6acbcb0fd0b90f20c7cb3b24c357fe82a3518934d4edfa8c6898e498c"}, - {file = "jiter-0.12.0-cp313-cp313-win32.whl", hash = "sha256:4747de73d6b8c78f2e253a2787930f4fffc68da7fa319739f57437f95963c4de"}, - {file = "jiter-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:e25012eb0c456fcc13354255d0338cd5397cce26c77b2832b3c4e2e255ea5d9a"}, - {file = "jiter-0.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:c97b92c54fe6110138c872add030a1f99aea2401ddcdaa21edf74705a646dd60"}, - {file = "jiter-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:53839b35a38f56b8be26a7851a48b89bc47e5d88e900929df10ed93b95fea3d6"}, - {file = "jiter-0.12.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94f669548e55c91ab47fef8bddd9c954dab1938644e715ea49d7e117015110a4"}, - {file = "jiter-0.12.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:351d54f2b09a41600ffea43d081522d792e81dcfb915f6d2d242744c1cc48beb"}, - {file = "jiter-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2a5e90604620f94bf62264e7c2c038704d38217b7465b863896c6d7c902b06c7"}, - {file = "jiter-0.12.0-cp313-cp313t-win_arm64.whl", hash = "sha256:88ef757017e78d2860f96250f9393b7b577b06a956ad102c29c8237554380db3"}, - {file = "jiter-0.12.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c46d927acd09c67a9fb1416df45c5a04c27e83aae969267e98fba35b74e99525"}, - {file = "jiter-0.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:774ff60b27a84a85b27b88cd5583899c59940bcc126caca97eb2a9df6aa00c49"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5433fab222fb072237df3f637d01b81f040a07dcac1cb4a5c75c7aa9ed0bef1"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f8c593c6e71c07866ec6bfb790e202a833eeec885022296aff6b9e0b92d6a70e"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90d32894d4c6877a87ae00c6b915b609406819dce8bc0d4e962e4de2784e567e"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:798e46eed9eb10c3adbbacbd3bdb5ecd4cf7064e453d00dbef08802dae6937ff"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3f1368f0a6719ea80013a4eb90ba72e75d7ea67cfc7846db2ca504f3df0169a"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:65f04a9d0b4406f7e51279710b27484af411896246200e461d80d3ba0caa901a"}, - {file = "jiter-0.12.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:fd990541982a24281d12b67a335e44f117e4c6cbad3c3b75c7dea68bf4ce3a67"}, - {file = "jiter-0.12.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:b111b0e9152fa7df870ecaebb0bd30240d9f7fff1f2003bcb4ed0f519941820b"}, - {file = "jiter-0.12.0-cp314-cp314-win32.whl", hash = "sha256:a78befb9cc0a45b5a5a0d537b06f8544c2ebb60d19d02c41ff15da28a9e22d42"}, - {file = "jiter-0.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:e1fe01c082f6aafbe5c8faf0ff074f38dfb911d53f07ec333ca03f8f6226debf"}, - {file = "jiter-0.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:d72f3b5a432a4c546ea4bedc84cce0c3404874f1d1676260b9c7f048a9855451"}, - {file = "jiter-0.12.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e6ded41aeba3603f9728ed2b6196e4df875348ab97b28fc8afff115ed42ba7a7"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a947920902420a6ada6ad51892082521978e9dd44a802663b001436e4b771684"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:add5e227e0554d3a52cf390a7635edaffdf4f8fce4fdbcef3cc2055bb396a30c"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f9b1cda8fcb736250d7e8711d4580ebf004a46771432be0ae4796944b5dfa5d"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:deeb12a2223fe0135c7ff1356a143d57f95bbf1f4a66584f1fc74df21d86b993"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c596cc0f4cb574877550ce4ecd51f8037469146addd676d7c1a30ebe6391923f"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ab4c823b216a4aeab3fdbf579c5843165756bd9ad87cc6b1c65919c4715f783"}, - {file = "jiter-0.12.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e427eee51149edf962203ff8db75a7514ab89be5cb623fb9cea1f20b54f1107b"}, - {file = "jiter-0.12.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:edb868841f84c111255ba5e80339d386d937ec1fdce419518ce1bd9370fac5b6"}, - {file = "jiter-0.12.0-cp314-cp314t-win32.whl", hash = "sha256:8bbcfe2791dfdb7c5e48baf646d37a6a3dcb5a97a032017741dea9f817dca183"}, - {file = "jiter-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2fa940963bf02e1d8226027ef461e36af472dea85d36054ff835aeed944dd873"}, - {file = "jiter-0.12.0-cp314-cp314t-win_arm64.whl", hash = "sha256:506c9708dd29b27288f9f8f1140c3cb0e3d8ddb045956d7757b1fa0e0f39a473"}, - {file = "jiter-0.12.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c9d28b218d5f9e5f69a0787a196322a5056540cb378cac8ff542b4fa7219966c"}, - {file = "jiter-0.12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d0ee12028daf8cfcf880dd492349a122a64f42c059b6c62a2b0c96a83a8da820"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b135ebe757a82d67ed2821526e72d0acf87dd61f6013e20d3c45b8048af927b"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:15d7fafb81af8a9e3039fc305529a61cd933eecee33b4251878a1c89859552a3"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92d1f41211d8a8fe412faad962d424d334764c01dac6691c44691c2e4d3eedaf"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3a64a48d7c917b8f32f25c176df8749ecf08cec17c466114727efe7441e17f6d"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:122046f3b3710b85de99d9aa2f3f0492a8233a2f54a64902b096efc27ea747b5"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:27ec39225e03c32c6b863ba879deb427882f243ae46f0d82d68b695fa5b48b40"}, - {file = "jiter-0.12.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26b9e155ddc132225a39b1995b3b9f0fe0f79a6d5cbbeacf103271e7d309b404"}, - {file = "jiter-0.12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9ab05b7c58e29bb9e60b70c2e0094c98df79a1e42e397b9bb6eaa989b7a66dd0"}, - {file = "jiter-0.12.0-cp39-cp39-win32.whl", hash = "sha256:59f9f9df87ed499136db1c2b6c9efb902f964bed42a582ab7af413b6a293e7b0"}, - {file = "jiter-0.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:d3719596a1ebe7a48a498e8d5d0c4bf7553321d4c3eee1d620628d51351a3928"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:4739a4657179ebf08f85914ce50332495811004cc1747852e8b2041ed2aab9b8"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:41da8def934bf7bec16cb24bd33c0ca62126d2d45d81d17b864bd5ad721393c3"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c44ee814f499c082e69872d426b624987dbc5943ab06e9bbaa4f81989fdb79e"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd2097de91cf03eaa27b3cbdb969addf83f0179c6afc41bbc4513705e013c65d"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:e8547883d7b96ef2e5fe22b88f8a4c8725a56e7f4abafff20fd5272d634c7ecb"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:89163163c0934854a668ed783a2546a0617f71706a2551a4a0666d91ab365d6b"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d96b264ab7d34bbb2312dedc47ce07cd53f06835eacbc16dde3761f47c3a9e7f"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24e864cb30ab82311c6425655b0cdab0a98c5d973b065c66a3f020740c2324c"}, - {file = "jiter-0.12.0.tar.gz", hash = "sha256:64dfcd7d5c168b38d3f9f8bba7fc639edb3418abcc74f22fdbe6b8938293f30b"}, +files = [ + {file = "jiter-0.10.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:cd2fb72b02478f06a900a5782de2ef47e0396b3e1f7d5aba30daeb1fce66f303"}, + {file = "jiter-0.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:32bb468e3af278f095d3fa5b90314728a6916d89ba3d0ffb726dd9bf7367285e"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8b3e0068c26ddedc7abc6fac37da2d0af16b921e288a5a613f4b86f050354f"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:286299b74cc49e25cd42eea19b72aa82c515d2f2ee12d11392c56d8701f52224"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ed5649ceeaeffc28d87fb012d25a4cd356dcd53eff5acff1f0466b831dda2a7"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2ab0051160cb758a70716448908ef14ad476c3774bd03ddce075f3c1f90a3d6"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03997d2f37f6b67d2f5c475da4412be584e1cec273c1cfc03d642c46db43f8cf"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c404a99352d839fed80d6afd6c1d66071f3bacaaa5c4268983fc10f769112e90"}, + {file = "jiter-0.10.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66e989410b6666d3ddb27a74c7e50d0829704ede652fd4c858e91f8d64b403d0"}, + {file = "jiter-0.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b532d3af9ef4f6374609a3bcb5e05a1951d3bf6190dc6b176fdb277c9bbf15ee"}, + {file = "jiter-0.10.0-cp310-cp310-win32.whl", hash = "sha256:da9be20b333970e28b72edc4dff63d4fec3398e05770fb3205f7fb460eb48dd4"}, + {file = "jiter-0.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:f59e533afed0c5b0ac3eba20d2548c4a550336d8282ee69eb07b37ea526ee4e5"}, + {file = "jiter-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3bebe0c558e19902c96e99217e0b8e8b17d570906e72ed8a87170bc290b1e978"}, + {file = "jiter-0.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:558cc7e44fd8e507a236bee6a02fa17199ba752874400a0ca6cd6e2196cdb7dc"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d613e4b379a07d7c8453c5712ce7014e86c6ac93d990a0b8e7377e18505e98d"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f62cf8ba0618eda841b9bf61797f21c5ebd15a7a1e19daab76e4e4b498d515b2"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:919d139cdfa8ae8945112398511cb7fca58a77382617d279556b344867a37e61"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13ddbc6ae311175a3b03bd8994881bc4635c923754932918e18da841632349db"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c440ea003ad10927a30521a9062ce10b5479592e8a70da27f21eeb457b4a9c5"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dc347c87944983481e138dea467c0551080c86b9d21de6ea9306efb12ca8f606"}, + {file = "jiter-0.10.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:13252b58c1f4d8c5b63ab103c03d909e8e1e7842d302473f482915d95fefd605"}, + {file = "jiter-0.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7d1bbf3c465de4a24ab12fb7766a0003f6f9bce48b8b6a886158c4d569452dc5"}, + {file = "jiter-0.10.0-cp311-cp311-win32.whl", hash = "sha256:db16e4848b7e826edca4ccdd5b145939758dadf0dc06e7007ad0e9cfb5928ae7"}, + {file = "jiter-0.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c9c1d5f10e18909e993f9641f12fe1c77b3e9b533ee94ffa970acc14ded3812"}, + {file = "jiter-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1e274728e4a5345a6dde2d343c8da018b9d4bd4350f5a472fa91f66fda44911b"}, + {file = "jiter-0.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7202ae396446c988cb2a5feb33a543ab2165b786ac97f53b59aafb803fef0744"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23ba7722d6748b6920ed02a8f1726fb4b33e0fd2f3f621816a8b486c66410ab2"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:371eab43c0a288537d30e1f0b193bc4eca90439fc08a022dd83e5e07500ed026"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c675736059020365cebc845a820214765162728b51ab1e03a1b7b3abb70f74c"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0c5867d40ab716e4684858e4887489685968a47e3ba222e44cde6e4a2154f959"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:395bb9a26111b60141757d874d27fdea01b17e8fac958b91c20128ba8f4acc8a"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6842184aed5cdb07e0c7e20e5bdcfafe33515ee1741a6835353bb45fe5d1bd95"}, + {file = "jiter-0.10.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:62755d1bcea9876770d4df713d82606c8c1a3dca88ff39046b85a048566d56ea"}, + {file = "jiter-0.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533efbce2cacec78d5ba73a41756beff8431dfa1694b6346ce7af3a12c42202b"}, + {file = "jiter-0.10.0-cp312-cp312-win32.whl", hash = "sha256:8be921f0cadd245e981b964dfbcd6fd4bc4e254cdc069490416dd7a2632ecc01"}, + {file = "jiter-0.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7c7d785ae9dda68c2678532a5a1581347e9c15362ae9f6e68f3fdbfb64f2e49"}, + {file = "jiter-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e0588107ec8e11b6f5ef0e0d656fb2803ac6cf94a96b2b9fc675c0e3ab5e8644"}, + {file = "jiter-0.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cafc4628b616dc32530c20ee53d71589816cf385dd9449633e910d596b1f5c8a"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:520ef6d981172693786a49ff5b09eda72a42e539f14788124a07530f785c3ad6"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:554dedfd05937f8fc45d17ebdf298fe7e0c77458232bcb73d9fbbf4c6455f5b3"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc299da7789deacf95f64052d97f75c16d4fc8c4c214a22bf8d859a4288a1c2"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5161e201172de298a8a1baad95eb85db4fb90e902353b1f6a41d64ea64644e25"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e2227db6ba93cb3e2bf67c87e594adde0609f146344e8207e8730364db27041"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:15acb267ea5e2c64515574b06a8bf393fbfee6a50eb1673614aa45f4613c0cca"}, + {file = "jiter-0.10.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:901b92f2e2947dc6dfcb52fd624453862e16665ea909a08398dde19c0731b7f4"}, + {file = "jiter-0.10.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d0cb9a125d5a3ec971a094a845eadde2db0de85b33c9f13eb94a0c63d463879e"}, + {file = "jiter-0.10.0-cp313-cp313-win32.whl", hash = "sha256:48a403277ad1ee208fb930bdf91745e4d2d6e47253eedc96e2559d1e6527006d"}, + {file = "jiter-0.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:75f9eb72ecb640619c29bf714e78c9c46c9c4eaafd644bf78577ede459f330d4"}, + {file = "jiter-0.10.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:28ed2a4c05a1f32ef0e1d24c2611330219fed727dae01789f4a335617634b1ca"}, + {file = "jiter-0.10.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14a4c418b1ec86a195f1ca69da8b23e8926c752b685af665ce30777233dfe070"}, + {file = "jiter-0.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:d7bfed2fe1fe0e4dda6ef682cee888ba444b21e7a6553e03252e4feb6cf0adca"}, + {file = "jiter-0.10.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:5e9251a5e83fab8d87799d3e1a46cb4b7f2919b895c6f4483629ed2446f66522"}, + {file = "jiter-0.10.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:023aa0204126fe5b87ccbcd75c8a0d0261b9abdbbf46d55e7ae9f8e22424eeb8"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c189c4f1779c05f75fc17c0c1267594ed918996a231593a21a5ca5438445216"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:15720084d90d1098ca0229352607cd68256c76991f6b374af96f36920eae13c4"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4f2fb68e5f1cfee30e2b2a09549a00683e0fde4c6a2ab88c94072fc33cb7426"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce541693355fc6da424c08b7edf39a2895f58d6ea17d92cc2b168d20907dee12"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31c50c40272e189d50006ad5c73883caabb73d4e9748a688b216e85a9a9ca3b9"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fa3402a2ff9815960e0372a47b75c76979d74402448509ccd49a275fa983ef8a"}, + {file = "jiter-0.10.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:1956f934dca32d7bb647ea21d06d93ca40868b505c228556d3373cbd255ce853"}, + {file = "jiter-0.10.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:fcedb049bdfc555e261d6f65a6abe1d5ad68825b7202ccb9692636c70fcced86"}, + {file = "jiter-0.10.0-cp314-cp314-win32.whl", hash = "sha256:ac509f7eccca54b2a29daeb516fb95b6f0bd0d0d8084efaf8ed5dfc7b9f0b357"}, + {file = "jiter-0.10.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5ed975b83a2b8639356151cef5c0d597c68376fc4922b45d0eb384ac058cfa00"}, + {file = "jiter-0.10.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa96f2abba33dc77f79b4cf791840230375f9534e5fac927ccceb58c5e604a5"}, + {file = "jiter-0.10.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bd6292a43c0fc09ce7c154ec0fa646a536b877d1e8f2f96c19707f65355b5a4d"}, + {file = "jiter-0.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:39de429dcaeb6808d75ffe9effefe96a4903c6a4b376b2f6d08d77c1aaee2f18"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52ce124f13a7a616fad3bb723f2bfb537d78239d1f7f219566dc52b6f2a9e48d"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:166f3606f11920f9a1746b2eea84fa2c0a5d50fd313c38bdea4edc072000b0af"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:28dcecbb4ba402916034fc14eba7709f250c4d24b0c43fc94d187ee0580af181"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86c5aa6910f9bebcc7bc4f8bc461aff68504388b43bfe5e5c0bd21efa33b52f4"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ceeb52d242b315d7f1f74b441b6a167f78cea801ad7c11c36da77ff2d42e8a28"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ff76d8887c8c8ee1e772274fcf8cc1071c2c58590d13e33bd12d02dc9a560397"}, + {file = "jiter-0.10.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a9be4d0fa2b79f7222a88aa488bd89e2ae0a0a5b189462a12def6ece2faa45f1"}, + {file = "jiter-0.10.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9ab7fd8738094139b6c1ab1822d6f2000ebe41515c537235fd45dabe13ec9324"}, + {file = "jiter-0.10.0-cp39-cp39-win32.whl", hash = "sha256:5f51e048540dd27f204ff4a87f5d79294ea0aa3aa552aca34934588cf27023cf"}, + {file = "jiter-0.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:1b28302349dc65703a9e4ead16f163b1c339efffbe1049c30a44b001a2a4fff9"}, + {file = "jiter-0.10.0.tar.gz", hash = "sha256:07a7142c38aacc85194391108dc91b5b57093c978a9932bd86a36862759d9500"}, +] + +[[package]] +name = "jmespath" +version = "1.0.1" +description = "JSON Matching Expressions" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980"}, + {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, ] [[package]] name = "jsonschema" -version = "4.25.1" +version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "jsonschema-4.25.1-py3-none-any.whl", hash = "sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63"}, - {file = "jsonschema-4.25.1.tar.gz", hash = "sha256:e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85"}, + {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, + {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, ] [package.dependencies] @@ -1846,19 +1689,18 @@ rpds-py = ">=0.7.1" [package.extras] format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "rfc3987-syntax (>=1.1.0)", "uri-template", "webcolors (>=24.6.0)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] [[package]] name = "jsonschema-specifications" -version = "2025.9.1" +version = "2025.4.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe"}, - {file = "jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d"}, + {file = "jsonschema_specifications-2025.4.1-py3-none-any.whl", hash = "sha256:4653bffbd6584f7de83a67e0d620ef16900b390ddc7939d56684d6c81e33f1af"}, + {file = "jsonschema_specifications-2025.4.1.tar.gz", hash = "sha256:630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608"}, ] [package.dependencies] @@ -1866,20 +1708,18 @@ referencing = ">=0.31.0" [[package]] name = "kombu" -version = "5.5.4" +version = "5.5.3" description = "Messaging library for Python." optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "kombu-5.5.4-py3-none-any.whl", hash = "sha256:a12ed0557c238897d8e518f1d1fdf84bd1516c5e305af2dacd85c2015115feb8"}, - {file = "kombu-5.5.4.tar.gz", hash = "sha256:886600168275ebeada93b888e831352fe578168342f0d1d5833d88ba0d847363"}, + {file = "kombu-5.5.3-py3-none-any.whl", hash = "sha256:5b0dbceb4edee50aa464f59469d34b97864be09111338cfb224a10b6a163909b"}, + {file = "kombu-5.5.3.tar.gz", hash = "sha256:021a0e11fcfcd9b0260ef1fb64088c0e92beb976eb59c1dfca7ddd4ad4562ea2"}, ] [package.dependencies] amqp = ">=5.1.1,<6.0.0" -packaging = "*" tzdata = {version = ">=2025.2", markers = "python_version >= \"3.9\""} vine = "5.1.0" @@ -1889,8 +1729,8 @@ azurestoragequeues = ["azure-identity (>=1.12.0)", "azure-storage-queue (>=12.6. confluentkafka = ["confluent-kafka (>=2.2.0)"] consul = ["python-consul2 (==0.1.5)"] gcpubsub = ["google-cloud-monitoring (>=2.16.0)", "google-cloud-pubsub (>=2.18.4)", "grpcio (==1.67.0)", "protobuf (==4.25.5)"] -librabbitmq = ["librabbitmq (>=2.0.0)"] -mongodb = ["pymongo (==4.10.1)"] +librabbitmq = ["librabbitmq (>=2.0.0) ; python_version < \"3.11\""] +mongodb = ["pymongo (>=4.1.1)"] msgpack = ["msgpack (==1.1.0)"] pyro = ["pyro4 (==4.82)"] qpid = ["qpid-python (>=0.26)", "qpid-tools (>=0.26)"] @@ -1901,98 +1741,150 @@ sqs = ["boto3 (>=1.26.143)", "urllib3 (>=1.26.16)"] yaml = ["PyYAML (>=3.10)"] zookeeper = ["kazoo (>=2.8.0)"] +[[package]] +name = "kubernetes" +version = "28.1.0" +description = "Kubernetes python client" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "kubernetes-28.1.0-py2.py3-none-any.whl", hash = "sha256:10f56f8160dcb73647f15fafda268e7f60cf7dbc9f8e46d52fcd46d3beb0c18d"}, + {file = "kubernetes-28.1.0.tar.gz", hash = "sha256:1468069a573430fb1cb5ad22876868f57977930f80a6749405da31cd6086a7e9"}, +] + +[package.dependencies] +certifi = ">=14.05.14" +google-auth = ">=1.0.1" +oauthlib = ">=3.2.2" +python-dateutil = ">=2.5.3" +pyyaml = ">=5.4.1" +requests = "*" +requests-oauthlib = "*" +six = ">=1.9.0" +urllib3 = ">=1.24.2,<2.0" +websocket-client = ">=0.32.0,<0.40.0 || >0.40.0,<0.41.dev0 || >=0.43.dev0" + +[package.extras] +adal = ["adal (>=1.0.2)"] + +[[package]] +name = "lazy-model" +version = "0.2.0" +description = "" +optional = false +python-versions = ">=3.7,<4.0" +groups = ["main"] +files = [ + {file = "lazy-model-0.2.0.tar.gz", hash = "sha256:57c0e91e171530c4fca7aebc3ac05a163a85cddd941bf7527cc46c0ddafca47c"}, + {file = "lazy_model-0.2.0-py3-none-any.whl", hash = "sha256:5a3241775c253e36d9069d236be8378288a93d4fc53805211fd152e04cc9c342"}, +] + +[package.dependencies] +pydantic = ">=1.9.0" + [[package]] name = "levenshtein" -version = "0.27.3" +version = "0.27.1" description = "Python extension for computing string edit distances and similarities." optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "levenshtein-0.27.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d61eff70799fd5e710625da8a13e5adabd62bfd9f70abb9c531af6cad458cd27"}, - {file = "levenshtein-0.27.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:477efed87edf72ad0d3870038479ed2f63020a42e69c6a38a32a550e51f8e70e"}, - {file = "levenshtein-0.27.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8ef99b9827d7d1100fc4398ac5522bd56766b894561c0cbdea0a01b93f24e642"}, - {file = "levenshtein-0.27.3-cp310-cp310-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9091e8ca9fff6088836abf372f8871fb480e44603defa526e1c3ae2f1d70acc5"}, - {file = "levenshtein-0.27.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6ffdb2329712c5595eda3532a4f701f87f6c73a0f7aaac240681bf0b54310d63"}, - {file = "levenshtein-0.27.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:35856330eac1b968b45a5abbc4a3d14279bd9d1224be727cb1aac9ac4928a419"}, - {file = "levenshtein-0.27.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:5377e237f6a13f5b0618621cca7992848993470c011716c3ad09cdf19c3b13ab"}, - {file = "levenshtein-0.27.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e30614186eb5c43833b62ae7d893a116b88373eec8cf3f3d62ba51aa5962d8ea"}, - {file = "levenshtein-0.27.3-cp310-cp310-win32.whl", hash = "sha256:5499342fd6b003bd5abc28790c7b333884838f7fd8c50570a6520bbaf5e2a35b"}, - {file = "levenshtein-0.27.3-cp310-cp310-win_amd64.whl", hash = "sha256:9e2792730388bec6a85d4d3e3a9b53b8a4b509722bea1a78a39a1a0a7d8f0e13"}, - {file = "levenshtein-0.27.3-cp310-cp310-win_arm64.whl", hash = "sha256:8a2a274b55562a49c6e9dadb16d05f6c27ffa98906b55d5c122893457ca6e464"}, - {file = "levenshtein-0.27.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:245b6ffb6e1b0828cafbce35c500cb3265d0962c121d090669f177968c5a2980"}, - {file = "levenshtein-0.27.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8f44c98fa23f489eb7b2ad87d5dd24b6a784434bb5edb73f6b0513309c949690"}, - {file = "levenshtein-0.27.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f5f85a1fc96dfc147bba82b4c67d6346ea26c27ef77a6a9de689118e26dddbe"}, - {file = "levenshtein-0.27.3-cp311-cp311-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:18ceddd38d0e990d2c1c9b72f3e191dace87e2f8f0446207ce9e9cd2bfdfc8a1"}, - {file = "levenshtein-0.27.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:222b81adca29ee4128183328c6e1b25a48c817d14a008ab49e74be9df963b293"}, - {file = "levenshtein-0.27.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ee3769ab6e89c24f901e6b7004100630e86721464d7d0384860a322d7953d3a5"}, - {file = "levenshtein-0.27.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:03eba8fda9f3f2b4b0760263fa20b20a90ab00cbeeab4d0d9d899b4f77912b0a"}, - {file = "levenshtein-0.27.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c870b19e2d5c7bc7f16213cc10312b82d873a4d46e1c6d51857a12ef39a76552"}, - {file = "levenshtein-0.27.3-cp311-cp311-win32.whl", hash = "sha256:1987622e9b8ba2ae47dc27469291da1f58462660fa34f4358e9d9c1830fb1355"}, - {file = "levenshtein-0.27.3-cp311-cp311-win_amd64.whl", hash = "sha256:a2b2aa81851e01bb09667b07e80c3fbf0f5a7c6ee9cd80caf43cce705e65832a"}, - {file = "levenshtein-0.27.3-cp311-cp311-win_arm64.whl", hash = "sha256:a084b335c54def1aef9a594b7163faa44dd00056323808bab783f43d8e4c1395"}, - {file = "levenshtein-0.27.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2de7f095b0ca8e44de9de986ccba661cd0dec3511c751b499e76b60da46805e9"}, - {file = "levenshtein-0.27.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d9b8b29e5d5145a3c958664c85151b1bb4b26e4ca764380b947e6a96a321217c"}, - {file = "levenshtein-0.27.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fc975465a51b1c5889eadee1a583b81fba46372b4b22df28973e49e8ddb8f54a"}, - {file = "levenshtein-0.27.3-cp312-cp312-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:57573ed885118554770979fdee584071b66103f6d50beddeabb54607a1213d81"}, - {file = "levenshtein-0.27.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23aff800a6dd5d91bb3754a6092085aa7ad46b28e497682c155c74f681cfaa2d"}, - {file = "levenshtein-0.27.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c08a952432b8ad9dccb145f812176db94c52cda732311ddc08d29fd3bf185b0a"}, - {file = "levenshtein-0.27.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:3bfcb2d78ab9cc06a1e75da8fcfb7a430fe513d66cfe54c07e50f32805e5e6db"}, - {file = "levenshtein-0.27.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ba7235f6dcb31a217247468295e2dd4c6c1d3ac81629dc5d355d93e1a5f4c185"}, - {file = "levenshtein-0.27.3-cp312-cp312-win32.whl", hash = "sha256:ea80d70f1d18c161a209be556b9094968627cbaae620e102459ef9c320a98cbb"}, - {file = "levenshtein-0.27.3-cp312-cp312-win_amd64.whl", hash = "sha256:fbaa1219d9b2d955339a37e684256a861e9274a3fe3a6ee1b8ea8724c3231ed9"}, - {file = "levenshtein-0.27.3-cp312-cp312-win_arm64.whl", hash = "sha256:2edbaa84f887ea1d9d8e4440af3fdda44769a7855d581c6248d7ee51518402a8"}, - {file = "levenshtein-0.27.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e55aa9f9453fd89d4a9ff1f3c4a650b307d5f61a7eed0568a52fbd2ff2eba107"}, - {file = "levenshtein-0.27.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ae4d484453c48939ecd01c5c213530c68dd5cd6e5090f0091ef69799ec7a8a9f"}, - {file = "levenshtein-0.27.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d18659832567ee387b266be390da0de356a3aa6cf0e8bc009b6042d8188e131f"}, - {file = "levenshtein-0.27.3-cp313-cp313-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027b3d142cc8ea2ab4e60444d7175f65a94dde22a54382b2f7b47cc24936eb53"}, - {file = "levenshtein-0.27.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ffdca6989368cc64f347f0423c528520f12775b812e170a0eb0c10e4c9b0f3ff"}, - {file = "levenshtein-0.27.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fa00ab389386032b02a1c9050ec3c6aa824d2bbcc692548fdc44a46b71c058c6"}, - {file = "levenshtein-0.27.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:691c9003c6c481b899a5c2f72e8ce05a6d956a9668dc75f2a3ce9f4381a76dc6"}, - {file = "levenshtein-0.27.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:12f7fc8bf0c24492fe97905348e020b55b9fc6dbaab7cd452566d1a466cb5e15"}, - {file = "levenshtein-0.27.3-cp313-cp313-win32.whl", hash = "sha256:9f4872e4e19ee48eed39f214eea4eca42e5ef303f8a4a488d8312370674dbf3a"}, - {file = "levenshtein-0.27.3-cp313-cp313-win_amd64.whl", hash = "sha256:83aa2422e9a9af2c9d3e56a53e3e8de6bae58d1793628cae48c4282577c5c2c6"}, - {file = "levenshtein-0.27.3-cp313-cp313-win_arm64.whl", hash = "sha256:d4adaf1edbcf38c3f2e290b52f4dcb5c6deff20308c26ef1127a106bc2d23e9f"}, - {file = "levenshtein-0.27.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:272e24764b8210337b65a1cfd69ce40df5d2de1a3baf1234e7f06d2826ba2e7a"}, - {file = "levenshtein-0.27.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:329a8e748a4e14d56daaa11f07bce3fde53385d05bad6b3f6dd9ee7802cdc915"}, - {file = "levenshtein-0.27.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a5fea1a9c6b9cc8729e467e2174b4359ff6bac27356bb5f31898e596b4ce133a"}, - {file = "levenshtein-0.27.3-cp313-cp313t-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3a61aa825819b6356555091d8a575d1235bd9c3753a68316a261af4856c3b487"}, - {file = "levenshtein-0.27.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a51de7a514e8183f0a82f2947d01b014d2391426543b1c076bf5a26328cec4e4"}, - {file = "levenshtein-0.27.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53cbf726d6e92040c9be7e594d959d496bd62597ea48eba9d96105898acbeafe"}, - {file = "levenshtein-0.27.3-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:191b358afead8561c4fcfed22f83c13bb6c8da5f5789e277f0c5aa1c45ca612f"}, - {file = "levenshtein-0.27.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ba1318d0635b834b8f0397014a7c43f007e65fce396a47614780c881bdff828b"}, - {file = "levenshtein-0.27.3-cp313-cp313t-win32.whl", hash = "sha256:8dd9e1db6c3b35567043e155a686e4827c4aa28a594bd81e3eea84d3a1bd5875"}, - {file = "levenshtein-0.27.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7813ecdac7a6223264ebfea0c8d69959c43d21a99694ef28018d22c4265c2af6"}, - {file = "levenshtein-0.27.3-cp313-cp313t-win_arm64.whl", hash = "sha256:8f05a0d23d13a6f802c7af595d0e43f5b9b98b6ed390cec7a35cb5d6693b882b"}, - {file = "levenshtein-0.27.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a6728bfae9a86002f0223576675fc7e2a6e7735da47185a1d13d1eaaa73dd4be"}, - {file = "levenshtein-0.27.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8e5037c4a6f97a238e24aad6f98a1e984348b7931b1b04b6bd02bd4f8238150d"}, - {file = "levenshtein-0.27.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c6cf5ecf9026bf24cf66ad019c6583f50058fae3e1b3c20e8812455b55d597f1"}, - {file = "levenshtein-0.27.3-cp314-cp314-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9285084bd2fc19adb47dab54ed4a71f57f78fe0d754e4a01e3c75409a25aed24"}, - {file = "levenshtein-0.27.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ce3bbbe92172a08b599d79956182c6b7ab6ec8d4adbe7237417a363b968ad87b"}, - {file = "levenshtein-0.27.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9dac48fab9d166ca90e12fb6cf6c7c8eb9c41aacf7136584411e20f7f136f745"}, - {file = "levenshtein-0.27.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d37a83722dc5326c93d17078e926c4732dc4f3488dc017c6839e34cd16af92b7"}, - {file = "levenshtein-0.27.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:3466cb8294ce586e49dd467560a153ab8d296015c538223f149f9aefd3d9f955"}, - {file = "levenshtein-0.27.3-cp314-cp314-win32.whl", hash = "sha256:c848bf2457b268672b7e9e73b44f18f49856420ac50b2564cf115a6e4ef82688"}, - {file = "levenshtein-0.27.3-cp314-cp314-win_amd64.whl", hash = "sha256:742633f024362a4ed6ef9d7e75d68f74b041ae738985fcf55a0e6d1d4cade438"}, - {file = "levenshtein-0.27.3-cp314-cp314-win_arm64.whl", hash = "sha256:9eed6851224b19e8d588ddb8eb8a4ae3c2dcabf3d1213985f0b94a67e517b1df"}, - {file = "levenshtein-0.27.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:77de69a345c76227b51a4521cd85442eb3da54c7eb6a06663a20c058fc49e683"}, - {file = "levenshtein-0.27.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:eba2756dc1f5b962b0ff80e49abb2153d5e809cc5e7fa5e85be9410ce474795d"}, - {file = "levenshtein-0.27.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c8fcb498287e971d84260f67808ff1a06b3f6212d80fea75cf5155db80606ff"}, - {file = "levenshtein-0.27.3-cp314-cp314t-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f067092c67464faab13e00a5c1a80da93baca8955d4d49579861400762e35591"}, - {file = "levenshtein-0.27.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92415f32c68491203f2855d05eef3277d376182d014cf0859c013c89f277fbbf"}, - {file = "levenshtein-0.27.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ef61eeaf1e0a42d7d947978d981fe4b9426b98b3dd8c1582c535f10dee044c3f"}, - {file = "levenshtein-0.27.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:103bb2e9049d1aa0d1216dd09c1c9106ecfe7541bbdc1a0490b9357d42eec8f2"}, - {file = "levenshtein-0.27.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6a64ddd1986b2a4c468b09544382287315c53585eb067f6e200c337741e057ee"}, - {file = "levenshtein-0.27.3-cp314-cp314t-win32.whl", hash = "sha256:957244f27dc284ccb030a8b77b8a00deb7eefdcd70052a4b1d96f375780ae9dc"}, - {file = "levenshtein-0.27.3-cp314-cp314t-win_amd64.whl", hash = "sha256:ccd7eaa6d8048c3ec07c93cfbcdefd4a3ae8c6aca3a370f2023ee69341e5f076"}, - {file = "levenshtein-0.27.3-cp314-cp314t-win_arm64.whl", hash = "sha256:1d8520b89b7a27bb5aadbcc156715619bcbf556a8ac46ad932470945dca6e1bd"}, - {file = "levenshtein-0.27.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:d2d7d22b6117a143f0cf101fe18a3ca90bd949fc33716a42d6165b9768d4a78c"}, - {file = "levenshtein-0.27.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:a55e7a2f317abd28576636e1f840fd268261f447c496a8481a9997a5ce889c59"}, - {file = "levenshtein-0.27.3-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55fa5f11952c38186bd4719e936eb4595b3d519218634924928787c36840256c"}, - {file = "levenshtein-0.27.3-pp311-pypy311_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:559d3588e6766134d95f84f830cf40166360e1769d253f5f83474bff10a24341"}, - {file = "levenshtein-0.27.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:82d40da143c1b9e27adcd34a33dfcc4a0761aa717c5f618b9c6f57dec5d7a958"}, - {file = "levenshtein-0.27.3.tar.gz", hash = "sha256:1ac326b2c84215795163d8a5af471188918b8797b4953ec87aaba22c9c1f9fc0"}, +files = [ + {file = "levenshtein-0.27.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:13d6f617cb6fe63714c4794861cfaacd398db58a292f930edb7f12aad931dace"}, + {file = "levenshtein-0.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca9d54d41075e130c390e61360bec80f116b62d6ae973aec502e77e921e95334"}, + {file = "levenshtein-0.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2de1f822b5c9a20d10411f779dfd7181ce3407261436f8470008a98276a9d07f"}, + {file = "levenshtein-0.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81270392c2e45d1a7e1b3047c3a272d5e28bb4f1eff0137637980064948929b7"}, + {file = "levenshtein-0.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d30c3ea23a94dddd56dbe323e1fa8a29ceb24da18e2daa8d0abf78b269a5ad1"}, + {file = "levenshtein-0.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3e0bea76695b9045bbf9ad5f67ad4cc01c11f783368f34760e068f19b6a6bc"}, + {file = "levenshtein-0.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdd190e468a68c31a5943368a5eaf4e130256a8707886d23ab5906a0cb98a43c"}, + {file = "levenshtein-0.27.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7c3121314bb4b676c011c33f6a0ebb462cfdcf378ff383e6f9e4cca5618d0ba7"}, + {file = "levenshtein-0.27.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f8ef378c873efcc5e978026b69b45342d841cd7a2f273447324f1c687cc4dc37"}, + {file = "levenshtein-0.27.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ff18d78c5c16bea20876425e1bf5af56c25918fb01bc0f2532db1317d4c0e157"}, + {file = "levenshtein-0.27.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:13412ff805afbfe619d070280d1a76eb4198c60c5445cd5478bd4c7055bb3d51"}, + {file = "levenshtein-0.27.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a2adb9f263557f7fb13e19eb2f34595d86929a44c250b2fca6e9b65971e51e20"}, + {file = "levenshtein-0.27.1-cp310-cp310-win32.whl", hash = "sha256:6278a33d2e0e909d8829b5a72191419c86dd3bb45b82399c7efc53dabe870c35"}, + {file = "levenshtein-0.27.1-cp310-cp310-win_amd64.whl", hash = "sha256:5b602b8428ee5dc88432a55c5303a739ee2be7c15175bd67c29476a9d942f48e"}, + {file = "levenshtein-0.27.1-cp310-cp310-win_arm64.whl", hash = "sha256:48334081fddaa0c259ba01ee898640a2cf8ede62e5f7e25fefece1c64d34837f"}, + {file = "levenshtein-0.27.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6f1760108319a108dceb2f02bc7cdb78807ad1f9c673c95eaa1d0fe5dfcaae"}, + {file = "levenshtein-0.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c4ed8400d94ab348099395e050b8ed9dd6a5d6b5b9e75e78b2b3d0b5f5b10f38"}, + {file = "levenshtein-0.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7826efe51be8ff58bc44a633e022fdd4b9fc07396375a6dbc4945a3bffc7bf8f"}, + {file = "levenshtein-0.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff5afb78719659d353055863c7cb31599fbea6865c0890b2d840ee40214b3ddb"}, + {file = "levenshtein-0.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:201dafd5c004cd52018560cf3213da799534d130cf0e4db839b51f3f06771de0"}, + {file = "levenshtein-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5ddd59f3cfaec216811ee67544779d9e2d6ed33f79337492a248245d6379e3d"}, + {file = "levenshtein-0.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6afc241d27ecf5b921063b796812c55b0115423ca6fa4827aa4b1581643d0a65"}, + {file = "levenshtein-0.27.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ee2e766277cceb8ca9e584ea03b8dc064449ba588d3e24c1923e4b07576db574"}, + {file = "levenshtein-0.27.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:920b23d6109453913ce78ec451bc402ff19d020ee8be4722e9d11192ec2fac6f"}, + {file = "levenshtein-0.27.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:560d7edba126e2eea3ac3f2f12e7bd8bc9c6904089d12b5b23b6dfa98810b209"}, + {file = "levenshtein-0.27.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8d5362b6c7aa4896dc0cb1e7470a4ad3c06124e0af055dda30d81d3c5549346b"}, + {file = "levenshtein-0.27.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:65ba880815b0f80a80a293aeebac0fab8069d03ad2d6f967a886063458f9d7a1"}, + {file = "levenshtein-0.27.1-cp311-cp311-win32.whl", hash = "sha256:fcc08effe77fec0bc5b0f6f10ff20b9802b961c4a69047b5499f383119ddbe24"}, + {file = "levenshtein-0.27.1-cp311-cp311-win_amd64.whl", hash = "sha256:0ed402d8902be7df212ac598fc189f9b2d520817fdbc6a05e2ce44f7f3ef6857"}, + {file = "levenshtein-0.27.1-cp311-cp311-win_arm64.whl", hash = "sha256:7fdaab29af81a8eb981043737f42450efca64b9761ca29385487b29c506da5b5"}, + {file = "levenshtein-0.27.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:25fb540d8c55d1dc7bdc59b7de518ea5ed9df92eb2077e74bcb9bb6de7b06f69"}, + {file = "levenshtein-0.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f09cfab6387e9c908c7b37961c045e8e10eb9b7ec4a700367f8e080ee803a562"}, + {file = "levenshtein-0.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dafa29c0e616f322b574e0b2aeb5b1ff2f8d9a1a6550f22321f3bd9bb81036e3"}, + {file = "levenshtein-0.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be7a7642ea64392fa1e6ef7968c2e50ef2152c60948f95d0793361ed97cf8a6f"}, + {file = "levenshtein-0.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:060b48c45ed54bcea9582ce79c6365b20a1a7473767e0b3d6be712fa3a22929c"}, + {file = "levenshtein-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:712f562c5e64dd0398d3570fe99f8fbb88acec7cc431f101cb66c9d22d74c542"}, + {file = "levenshtein-0.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a6141ad65cab49aa4527a3342d76c30c48adb2393b6cdfeca65caae8d25cb4b8"}, + {file = "levenshtein-0.27.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:799b8d73cda3265331116f62932f553804eae16c706ceb35aaf16fc2a704791b"}, + {file = "levenshtein-0.27.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ec99871d98e517e1cc4a15659c62d6ea63ee5a2d72c5ddbebd7bae8b9e2670c8"}, + {file = "levenshtein-0.27.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8799164e1f83588dbdde07f728ea80796ea72196ea23484d78d891470241b222"}, + {file = "levenshtein-0.27.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:583943813898326516ab451a83f734c6f07488cda5c361676150d3e3e8b47927"}, + {file = "levenshtein-0.27.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5bb22956af44bb4eade93546bf95be610c8939b9a9d4d28b2dfa94abf454fed7"}, + {file = "levenshtein-0.27.1-cp312-cp312-win32.whl", hash = "sha256:d9099ed1bcfa7ccc5540e8ad27b5dc6f23d16addcbe21fdd82af6440f4ed2b6d"}, + {file = "levenshtein-0.27.1-cp312-cp312-win_amd64.whl", hash = "sha256:7f071ecdb50aa6c15fd8ae5bcb67e9da46ba1df7bba7c6bf6803a54c7a41fd96"}, + {file = "levenshtein-0.27.1-cp312-cp312-win_arm64.whl", hash = "sha256:83b9033a984ccace7703f35b688f3907d55490182fd39b33a8e434d7b2e249e6"}, + {file = "levenshtein-0.27.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ab00c2cae2889166afb7e1af64af2d4e8c1b126f3902d13ef3740df00e54032d"}, + {file = "levenshtein-0.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c27e00bc7527e282f7c437817081df8da4eb7054e7ef9055b851fa3947896560"}, + {file = "levenshtein-0.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5b07de42bfc051136cc8e7f1e7ba2cb73666aa0429930f4218efabfdc5837ad"}, + {file = "levenshtein-0.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fb11ad3c9dae3063405aa50d9c96923722ab17bb606c776b6817d70b51fd7e07"}, + {file = "levenshtein-0.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c5986fb46cb0c063305fd45b0a79924abf2959a6d984bbac2b511d3ab259f3f"}, + {file = "levenshtein-0.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75191e469269ddef2859bc64c4a8cfd6c9e063302766b5cb7e1e67f38cc7051a"}, + {file = "levenshtein-0.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:51b3a7b2266933babc04e4d9821a495142eebd6ef709f90e24bc532b52b81385"}, + {file = "levenshtein-0.27.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbac509794afc3e2a9e73284c9e3d0aab5b1d928643f42b172969c3eefa1f2a3"}, + {file = "levenshtein-0.27.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8d68714785178347ecb272b94e85cbf7e638165895c4dd17ab57e7742d8872ec"}, + {file = "levenshtein-0.27.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:8ee74ee31a5ab8f61cd6c6c6e9ade4488dde1285f3c12207afc018393c9b8d14"}, + {file = "levenshtein-0.27.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:f2441b6365453ec89640b85344afd3d602b0d9972840b693508074c613486ce7"}, + {file = "levenshtein-0.27.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a9be39640a46d8a0f9be729e641651d16a62b2c07d3f4468c36e1cc66b0183b9"}, + {file = "levenshtein-0.27.1-cp313-cp313-win32.whl", hash = "sha256:a520af67d976761eb6580e7c026a07eb8f74f910f17ce60e98d6e492a1f126c7"}, + {file = "levenshtein-0.27.1-cp313-cp313-win_amd64.whl", hash = "sha256:7dd60aa49c2d8d23e0ef6452c8329029f5d092f386a177e3385d315cabb78f2a"}, + {file = "levenshtein-0.27.1-cp313-cp313-win_arm64.whl", hash = "sha256:149cd4f0baf5884ac5df625b7b0d281721b15de00f447080e38f5188106e1167"}, + {file = "levenshtein-0.27.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0c9231ac7c705a689f12f4fc70286fa698b9c9f06091fcb0daddb245e9259cbe"}, + {file = "levenshtein-0.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cf9ba080b1a8659d35c11dcfffc7f8c001028c2a3a7b7e6832348cdd60c53329"}, + {file = "levenshtein-0.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:164e3184385caca94ef7da49d373edd7fb52d4253bcc5bd5b780213dae307dfb"}, + {file = "levenshtein-0.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e6024d67de6efbd32aaaafd964864c7fee0569b960556de326c3619d1eeb2ba4"}, + {file = "levenshtein-0.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6fbb234b3b04e04f7b3a2f678e24fd873c86c543d541e9df3ac9ec1cc809e732"}, + {file = "levenshtein-0.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffdd9056c7afb29aea00b85acdb93a3524e43852b934ebb9126c901506d7a1ed"}, + {file = "levenshtein-0.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a1a0918243a313f481f4ba6a61f35767c1230395a187caeecf0be87a7c8f0624"}, + {file = "levenshtein-0.27.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c57655b20690ffa5168df7f4b7c6207c4ca917b700fb1b142a49749eb1cf37bb"}, + {file = "levenshtein-0.27.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:079cc78de05d3ded6cf1c5e2c3eadeb1232e12d49be7d5824d66c92b28c3555a"}, + {file = "levenshtein-0.27.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ac28c4ced134c0fe2941230ce4fd5c423aa66339e735321665fb9ae970f03a32"}, + {file = "levenshtein-0.27.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a2f7688355b22db27588f53c922b4583b8b627c83a8340191bbae1fbbc0f5f56"}, + {file = "levenshtein-0.27.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:654e8f016cb64ad27263d3364c6536e7644205f20d94748c8b94c586e3362a23"}, + {file = "levenshtein-0.27.1-cp39-cp39-win32.whl", hash = "sha256:145e6e8744643a3764fed9ab4ab9d3e2b8e5f05d2bcd0ad7df6f22f27a9fbcd4"}, + {file = "levenshtein-0.27.1-cp39-cp39-win_amd64.whl", hash = "sha256:612f0c90201c318dd113e7e97bd677e6e3e27eb740f242b7ae1a83f13c892b7e"}, + {file = "levenshtein-0.27.1-cp39-cp39-win_arm64.whl", hash = "sha256:cde09ec5b3cc84a6737113b47e45392b331c136a9e8a8ead8626f3eacae936f8"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c92a222ab95b8d903eae6d5e7d51fe6c999be021b647715c18d04d0b0880f463"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:71afc36b4ee950fa1140aff22ffda9e5e23280285858e1303260dbb2eabf342d"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58b1daeebfc148a571f09cfe18c16911ea1eaaa9e51065c5f7e7acbc4b866afa"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:105edcb14797d95c77f69bad23104314715a64cafbf4b0e79d354a33d7b54d8d"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d9c58fb1ef8bdc8773d705fbacf628e12c3bb63ee4d065dda18a76e86042444a"}, + {file = "levenshtein-0.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e52270591854af67217103955a36bd7436b57c801e3354e73ba44d689ed93697"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:909b7b6bce27a4ec90576c9a9bd9af5a41308dfecf364b410e80b58038277bbe"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d193a7f97b8c6a350e36ec58e41a627c06fa4157c3ce4b2b11d90cfc3c2ebb8f"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:614be316e3c06118705fae1f717f9072d35108e5fd4e66a7dd0e80356135340b"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31fc0a5bb070722bdabb6f7e14955a294a4a968c68202d294699817f21545d22"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9415aa5257227af543be65768a80c7a75e266c3c818468ce6914812f88f9c3df"}, + {file = "levenshtein-0.27.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7987ef006a3cf56a4532bd4c90c2d3b7b4ca9ad3bf8ae1ee5713c4a3bdfda913"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e67750653459a8567b5bb10e56e7069b83428d42ff5f306be821ef033b92d1a8"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:93344c2c3812f21fdc46bd9e57171684fc53dd107dae2f648d65ea6225d5ceaf"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da4baef7e7460691006dd2ca6b9e371aecf135130f72fddfe1620ae740b68d94"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8141c8e5bf2bd76ae214c348ba382045d7ed9d0e7ce060a36fc59c6af4b41d48"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:773aa120be48c71e25c08d92a2108786e6537a24081049664463715926c76b86"}, + {file = "levenshtein-0.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f12a99138fb09eb5606ab9de61dd234dd82a7babba8f227b5dce0e3ae3a9eaf4"}, + {file = "levenshtein-0.27.1.tar.gz", hash = "sha256:3e18b73564cfc846eec94dd13fab6cb006b5d2e0cc56bad1fd7d5585881302e3"}, ] [package.dependencies] @@ -2000,39 +1892,46 @@ rapidfuzz = ">=3.9.0,<4.0.0" [[package]] name = "litellm" -version = "1.78.7" +version = "1.70.2" description = "Library to easily interface with LLM API providers" optional = false python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "litellm-1.78.7-py3-none-any.whl", hash = "sha256:aa93ae1fefe02fb00b2a78eba3c95002f9ef478bade3e22e63508830182e2dfe"}, - {file = "litellm-1.78.7.tar.gz", hash = "sha256:6b10f5c7dc217bde3481fa4f70b5c37edbfa617bec7149276833d311f76a6783"}, + {file = "litellm-1.70.2-py3-none-any.whl", hash = "sha256:765bb4314e0f764735cb036dcfabfddfec84320831df17275a47d3bb48b577a3"}, + {file = "litellm-1.70.2.tar.gz", hash = "sha256:d2e45076f76d668f2b420c98067c9a992dfaa7fea3031a02d0ed89589a2f8841"}, ] [package.dependencies] -aiohttp = ">=3.10" +aiohttp = "*" click = "*" -fastuuid = ">=0.13.0" httpx = ">=0.23.0" importlib-metadata = ">=6.8.0" jinja2 = ">=3.1.2,<4.0.0" jsonschema = ">=4.22.0,<5.0.0" -openai = ">=1.99.5" -pydantic = ">=2.5.0,<3.0.0" +openai = ">=1.68.2,<1.76.0" +pydantic = ">=2.0.0,<3.0.0" python-dotenv = ">=0.2.0" tiktoken = ">=0.7.0" tokenizers = "*" [package.extras] -caching = ["diskcache (>=5.6.1,<6.0.0)"] -extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-iam (>=2.19.1,<3.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "redisvl (>=0.4.1,<0.5.0)", "resend (>=0.8.0,<0.9.0)"] -mlflow = ["mlflow (>3.1.4)"] -proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "azure-identity (>=1.15.0,<2.0.0)", "azure-storage-blob (>=12.25.1,<13.0.0)", "backoff", "boto3 (==1.36.0)", "cryptography", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=23.0.0,<24.0.0)", "litellm-enterprise (==0.1.20)", "litellm-proxy-extras (==0.2.27)", "mcp (>=1.10.0,<2.0.0)", "orjson (>=3.9.7,<4.0.0)", "polars (>=1.31.0,<2.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rich (==13.7.1)", "rq", "uvicorn (>=0.29.0,<0.30.0)", "uvloop (>=0.21.0,<0.22.0)", "websockets (>=13.1.0,<14.0.0)"] -semantic-router = ["semantic-router"] +extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "redisvl (>=0.4.1,<0.5.0) ; python_version >= \"3.9\" and python_version < \"3.14\"", "resend (>=0.8.0,<0.9.0)"] +proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", "boto3 (==1.34.34)", "cryptography (>=43.0.1,<44.0.0)", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=23.0.0,<24.0.0)", "litellm-enterprise (==0.1.5)", "litellm-proxy-extras (==0.1.21)", "mcp (==1.5.0) ; python_version >= \"3.10\"", "orjson (>=3.9.7,<4.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rich (==13.7.1)", "rq", "uvicorn (>=0.29.0,<0.30.0)", "uvloop (>=0.21.0,<0.22.0) ; sys_platform != \"win32\"", "websockets (>=13.1.0,<14.0.0)"] utils = ["numpydoc"] +[[package]] +name = "locket" +version = "1.0.0" +description = "File-based locks for Python on Linux and Windows" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] +files = [ + {file = "locket-1.0.0-py2.py3-none-any.whl", hash = "sha256:b6c819a722f7b6bd955b80781788e4a66a55628b858d347536b7e81325a3a5e3"}, + {file = "locket-1.0.0.tar.gz", hash = "sha256:5c0d4c052a8bbbf750e056a8e65ccd309086f4f0f18a2eac306a8dfa4112a632"}, +] + [[package]] name = "mako" version = "1.3.10" @@ -2040,7 +1939,6 @@ description = "A super-fast templating language that borrows the best ideas from optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "mako-1.3.10-py3-none-any.whl", hash = "sha256:baef24a52fc4fc514a0887ac600f9f1cff3d82c61d4d700a1fa84d597b88db59"}, {file = "mako-1.3.10.tar.gz", hash = "sha256:99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28"}, @@ -2056,102 +1954,73 @@ testing = ["pytest"] [[package]] name = "markupsafe" -version = "3.0.3" +version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559"}, - {file = "markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1"}, - {file = "markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa"}, - {file = "markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8"}, - {file = "markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1"}, - {file = "markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad"}, - {file = "markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a"}, - {file = "markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19"}, - {file = "markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01"}, - {file = "markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c"}, - {file = "markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e"}, - {file = "markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b"}, - {file = "markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d"}, - {file = "markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c"}, - {file = "markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f"}, - {file = "markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795"}, - {file = "markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12"}, - {file = "markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed"}, - {file = "markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5"}, - {file = "markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485"}, - {file = "markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73"}, - {file = "markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287"}, - {file = "markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe"}, - {file = "markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe"}, - {file = "markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9"}, - {file = "markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581"}, - {file = "markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4"}, - {file = "markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab"}, - {file = "markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa"}, - {file = "markupsafe-3.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26"}, - {file = "markupsafe-3.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d"}, - {file = "markupsafe-3.0.3-cp39-cp39-win32.whl", hash = "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7"}, - {file = "markupsafe-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e"}, - {file = "markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8"}, - {file = "markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"}, +files = [ + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] [[package]] @@ -2161,207 +2030,187 @@ description = "An implementation of time.monotonic() for Python 2 & < 3.3" optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "monotonic-1.6-py2.py3-none-any.whl", hash = "sha256:68687e19a14f11f26d140dd5c86f3dba4bf5df58003000ed467e0e2a69bca96c"}, {file = "monotonic-1.6.tar.gz", hash = "sha256:3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7"}, ] +[[package]] +name = "motor" +version = "3.7.1" +description = "Non-blocking MongoDB driver for Tornado or asyncio" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "motor-3.7.1-py3-none-any.whl", hash = "sha256:8a63b9049e38eeeb56b4fdd57c3312a6d1f25d01db717fe7d82222393c410298"}, + {file = "motor-3.7.1.tar.gz", hash = "sha256:27b4d46625c87928f331a6ca9d7c51c2f518ba0e270939d395bc1ddc89d64526"}, +] + +[package.dependencies] +pymongo = ">=4.9,<5.0" + +[package.extras] +aws = ["pymongo[aws] (>=4.5,<5)"] +docs = ["aiohttp", "furo (==2024.8.6)", "readthedocs-sphinx-search (>=0.3,<1.0)", "sphinx (>=5.3,<8)", "sphinx-rtd-theme (>=2,<3)", "tornado"] +encryption = ["pymongo[encryption] (>=4.5,<5)"] +gssapi = ["pymongo[gssapi] (>=4.5,<5)"] +ocsp = ["pymongo[ocsp] (>=4.5,<5)"] +snappy = ["pymongo[snappy] (>=4.5,<5)"] +test = ["aiohttp (>=3.8.7)", "cffi (>=1.17.0rc1) ; python_version == \"3.13\"", "mockupdb", "pymongo[encryption] (>=4.5,<5)", "pytest (>=7)", "pytest-asyncio", "tornado (>=5)"] +zstd = ["pymongo[zstd] (>=4.5,<5)"] + [[package]] name = "multidict" -version = "6.7.0" +version = "6.4.4" description = "multidict implementation" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "multidict-6.7.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9f474ad5acda359c8758c8accc22032c6abe6dc87a8be2440d097785e27a9349"}, - {file = "multidict-6.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b7a9db5a870f780220e931d0002bbfd88fb53aceb6293251e2c839415c1b20e"}, - {file = "multidict-6.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03ca744319864e92721195fa28c7a3b2bc7b686246b35e4078c1e4d0eb5466d3"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f0e77e3c0008bc9316e662624535b88d360c3a5d3f81e15cf12c139a75250046"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08325c9e5367aa379a3496aa9a022fe8837ff22e00b94db256d3a1378c76ab32"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e2862408c99f84aa571ab462d25236ef9cb12a602ea959ba9c9009a54902fc73"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4d72a9a2d885f5c208b0cb91ff2ed43636bb7e345ec839ff64708e04f69a13cc"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:478cc36476687bac1514d651cbbaa94b86b0732fb6855c60c673794c7dd2da62"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6843b28b0364dc605f21481c90fadb5f60d9123b442eb8a726bb74feef588a84"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23bfeee5316266e5ee2d625df2d2c602b829435fc3a235c2ba2131495706e4a0"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:680878b9f3d45c31e1f730eef731f9b0bc1da456155688c6745ee84eb818e90e"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:eb866162ef2f45063acc7a53a88ef6fe8bf121d45c30ea3c9cd87ce7e191a8d4"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:df0e3bf7993bdbeca5ac25aa859cf40d39019e015c9c91809ba7093967f7a648"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:661709cdcd919a2ece2234f9bae7174e5220c80b034585d7d8a755632d3e2111"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:096f52730c3fb8ed419db2d44391932b63891b2c5ed14850a7e215c0ba9ade36"}, - {file = "multidict-6.7.0-cp310-cp310-win32.whl", hash = "sha256:afa8a2978ec65d2336305550535c9c4ff50ee527914328c8677b3973ade52b85"}, - {file = "multidict-6.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:b15b3afff74f707b9275d5ba6a91ae8f6429c3ffb29bbfd216b0b375a56f13d7"}, - {file = "multidict-6.7.0-cp310-cp310-win_arm64.whl", hash = "sha256:4b73189894398d59131a66ff157837b1fafea9974be486d036bb3d32331fdbf0"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4d409aa42a94c0b3fa617708ef5276dfe81012ba6753a0370fcc9d0195d0a1fc"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14c9e076eede3b54c636f8ce1c9c252b5f057c62131211f0ceeec273810c9721"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c09703000a9d0fa3c3404b27041e574cc7f4df4c6563873246d0e11812a94b6"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a265acbb7bb33a3a2d626afbe756371dce0279e7b17f4f4eda406459c2b5ff1c"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51cb455de290ae462593e5b1cb1118c5c22ea7f0d3620d9940bf695cea5a4bd7"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:db99677b4457c7a5c5a949353e125ba72d62b35f74e26da141530fbb012218a7"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f470f68adc395e0183b92a2f4689264d1ea4b40504a24d9882c27375e6662bb9"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0db4956f82723cc1c270de9c6e799b4c341d327762ec78ef82bb962f79cc07d8"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e56d780c238f9e1ae66a22d2adf8d16f485381878250db8d496623cd38b22bd"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d14baca2ee12c1a64740d4531356ba50b82543017f3ad6de0deb943c5979abb"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:295a92a76188917c7f99cda95858c822f9e4aae5824246bba9b6b44004ddd0a6"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39f1719f57adbb767ef592a50ae5ebb794220d1188f9ca93de471336401c34d2"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0a13fb8e748dfc94749f622de065dd5c1def7e0d2216dba72b1d8069a389c6ff"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e3aa16de190d29a0ea1b48253c57d99a68492c8dd8948638073ab9e74dc9410b"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a048ce45dcdaaf1defb76b2e684f997fb5abf74437b6cb7b22ddad934a964e34"}, - {file = "multidict-6.7.0-cp311-cp311-win32.whl", hash = "sha256:a90af66facec4cebe4181b9e62a68be65e45ac9b52b67de9eec118701856e7ff"}, - {file = "multidict-6.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:95b5ffa4349df2887518bb839409bcf22caa72d82beec453216802f475b23c81"}, - {file = "multidict-6.7.0-cp311-cp311-win_arm64.whl", hash = "sha256:329aa225b085b6f004a4955271a7ba9f1087e39dcb7e65f6284a988264a63912"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:8a3862568a36d26e650a19bb5cbbba14b71789032aebc0423f8cc5f150730184"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:960c60b5849b9b4f9dcc9bea6e3626143c252c74113df2c1540aebce70209b45"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2049be98fb57a31b4ccf870bf377af2504d4ae35646a19037ec271e4c07998aa"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0934f3843a1860dd465d38895c17fce1f1cb37295149ab05cd1b9a03afacb2a7"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3e34f3a1b8131ba06f1a73adab24f30934d148afcd5f5de9a73565a4404384e"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:efbb54e98446892590dc2458c19c10344ee9a883a79b5cec4bc34d6656e8d546"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a35c5fc61d4f51eb045061e7967cfe3123d622cd500e8868e7c0c592a09fedc4"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29fe6740ebccba4175af1b9b87bf553e9c15cd5868ee967e010efcf94e4fd0f1"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:123e2a72e20537add2f33a79e605f6191fba2afda4cbb876e35c1a7074298a7d"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b284e319754366c1aee2267a2036248b24eeb17ecd5dc16022095e747f2f4304"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:803d685de7be4303b5a657b76e2f6d1240e7e0a8aa2968ad5811fa2285553a12"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c04a328260dfd5db8c39538f999f02779012268f54614902d0afc775d44e0a62"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8a19cdb57cd3df4cd865849d93ee14920fb97224300c88501f16ecfa2604b4e0"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b2fd74c52accced7e75de26023b7dccee62511a600e62311b918ec5c168fc2a"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3e8bfdd0e487acf992407a140d2589fe598238eaeffa3da8448d63a63cd363f8"}, - {file = "multidict-6.7.0-cp312-cp312-win32.whl", hash = "sha256:dd32a49400a2c3d52088e120ee00c1e3576cbff7e10b98467962c74fdb762ed4"}, - {file = "multidict-6.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:92abb658ef2d7ef22ac9f8bb88e8b6c3e571671534e029359b6d9e845923eb1b"}, - {file = "multidict-6.7.0-cp312-cp312-win_arm64.whl", hash = "sha256:490dab541a6a642ce1a9d61a4781656b346a55c13038f0b1244653828e3a83ec"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:bee7c0588aa0076ce77c0ea5d19a68d76ad81fcd9fe8501003b9a24f9d4000f6"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7ef6b61cad77091056ce0e7ce69814ef72afacb150b7ac6a3e9470def2198159"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9c0359b1ec12b1d6849c59f9d319610b7f20ef990a6d454ab151aa0e3b9f78ca"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cd240939f71c64bd658f186330603aac1a9a81bf6273f523fca63673cb7378a8"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60a4d75718a5efa473ebd5ab685786ba0c67b8381f781d1be14da49f1a2dc60"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53a42d364f323275126aff81fb67c5ca1b7a04fda0546245730a55c8c5f24bc4"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b29b980d0ddbecb736735ee5bef69bb2ddca56eff603c86f3f29a1128299b4f"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8a93b1c0ed2d04b97a5e9336fd2d33371b9a6e29ab7dd6503d63407c20ffbaf"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ff96e8815eecacc6645da76c413eb3b3d34cfca256c70b16b286a687d013c32"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7516c579652f6a6be0e266aec0acd0db80829ca305c3d771ed898538804c2036"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:040f393368e63fb0f3330e70c26bfd336656bed925e5cbe17c9da839a6ab13ec"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b3bc26a951007b1057a1c543af845f1c7e3e71cc240ed1ace7bf4484aa99196e"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7b022717c748dd1992a83e219587aabe45980d88969f01b316e78683e6285f64"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:9600082733859f00d79dee64effc7aef1beb26adb297416a4ad2116fd61374bd"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94218fcec4d72bc61df51c198d098ce2b378e0ccbac41ddbed5ef44092913288"}, - {file = "multidict-6.7.0-cp313-cp313-win32.whl", hash = "sha256:a37bd74c3fa9d00be2d7b8eca074dc56bd8077ddd2917a839bd989612671ed17"}, - {file = "multidict-6.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:30d193c6cc6d559db42b6bcec8a5d395d34d60c9877a0b71ecd7c204fcf15390"}, - {file = "multidict-6.7.0-cp313-cp313-win_arm64.whl", hash = "sha256:ea3334cabe4d41b7ccd01e4d349828678794edbc2d3ae97fc162a3312095092e"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:ad9ce259f50abd98a1ca0aa6e490b58c316a0fce0617f609723e40804add2c00"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07f5594ac6d084cbb5de2df218d78baf55ef150b91f0ff8a21cc7a2e3a5a58eb"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0591b48acf279821a579282444814a2d8d0af624ae0bc600aa4d1b920b6e924b"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:749a72584761531d2b9467cfbdfd29487ee21124c304c4b6cb760d8777b27f9c"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b4c3d199f953acd5b446bf7c0de1fe25d94e09e79086f8dc2f48a11a129cdf1"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9fb0211dfc3b51efea2f349ec92c114d7754dd62c01f81c3e32b765b70c45c9b"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a027ec240fe73a8d6281872690b988eed307cd7d91b23998ff35ff577ca688b5"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1d964afecdf3a8288789df2f5751dc0a8261138c3768d9af117ed384e538fad"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:caf53b15b1b7df9fbd0709aa01409000a2b4dd03a5f6f5cc548183c7c8f8b63c"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:654030da3197d927f05a536a66186070e98765aa5142794c9904555d3a9d8fb5"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:2090d3718829d1e484706a2f525e50c892237b2bf9b17a79b059cb98cddc2f10"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2d2cfeec3f6f45651b3d408c4acec0ebf3daa9bc8a112a084206f5db5d05b754"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:4ef089f985b8c194d341eb2c24ae6e7408c9a0e2e5658699c92f497437d88c3c"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e93a0617cd16998784bf4414c7e40f17a35d2350e5c6f0bd900d3a8e02bd3762"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f0feece2ef8ebc42ed9e2e8c78fc4aa3cf455733b507c09ef7406364c94376c6"}, - {file = "multidict-6.7.0-cp313-cp313t-win32.whl", hash = "sha256:19a1d55338ec1be74ef62440ca9e04a2f001a04d0cc49a4983dc320ff0f3212d"}, - {file = "multidict-6.7.0-cp313-cp313t-win_amd64.whl", hash = "sha256:3da4fb467498df97e986af166b12d01f05d2e04f978a9c1c680ea1988e0bc4b6"}, - {file = "multidict-6.7.0-cp313-cp313t-win_arm64.whl", hash = "sha256:b4121773c49a0776461f4a904cdf6264c88e42218aaa8407e803ca8025872792"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3bab1e4aff7adaa34410f93b1f8e57c4b36b9af0426a76003f441ee1d3c7e842"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b8512bac933afc3e45fb2b18da8e59b78d4f408399a960339598374d4ae3b56b"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:79dcf9e477bc65414ebfea98ffd013cb39552b5ecd62908752e0e413d6d06e38"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:31bae522710064b5cbeddaf2e9f32b1abab70ac6ac91d42572502299e9953128"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a0df7ff02397bb63e2fd22af2c87dfa39e8c7f12947bc524dbdc528282c7e34"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a0222514e8e4c514660e182d5156a415c13ef0aabbd71682fc714e327b95e99"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2397ab4daaf2698eb51a76721e98db21ce4f52339e535725de03ea962b5a3202"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8891681594162635948a636c9fe0ff21746aeb3dd5463f6e25d9bea3a8a39ca1"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18706cc31dbf402a7945916dd5cddf160251b6dab8a2c5f3d6d5a55949f676b3"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f844a1bbf1d207dd311a56f383f7eda2d0e134921d45751842d8235e7778965d"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d4393e3581e84e5645506923816b9cc81f5609a778c7e7534054091acc64d1c6"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:fbd18dc82d7bf274b37aa48d664534330af744e03bccf696d6f4c6042e7d19e7"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b6234e14f9314731ec45c42fc4554b88133ad53a09092cc48a88e771c125dadb"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:08d4379f9744d8f78d98c8673c06e202ffa88296f009c71bbafe8a6bf847d01f"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fe04da3f79387f450fd0061d4dd2e45a72749d31bf634aecc9e27f24fdc4b3f"}, - {file = "multidict-6.7.0-cp314-cp314-win32.whl", hash = "sha256:fbafe31d191dfa7c4c51f7a6149c9fb7e914dcf9ffead27dcfd9f1ae382b3885"}, - {file = "multidict-6.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:2f67396ec0310764b9222a1728ced1ab638f61aadc6226f17a71dd9324f9a99c"}, - {file = "multidict-6.7.0-cp314-cp314-win_arm64.whl", hash = "sha256:ba672b26069957ee369cfa7fc180dde1fc6f176eaf1e6beaf61fbebbd3d9c000"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:c1dcc7524066fa918c6a27d61444d4ee7900ec635779058571f70d042d86ed63"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:27e0b36c2d388dc7b6ced3406671b401e84ad7eb0656b8f3a2f46ed0ce483718"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a7baa46a22e77f0988e3b23d4ede5513ebec1929e34ee9495be535662c0dfe2"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7bf77f54997a9166a2f5675d1201520586439424c2511723a7312bdb4bcc034e"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e011555abada53f1578d63389610ac8a5400fc70ce71156b0aa30d326f1a5064"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:28b37063541b897fd6a318007373930a75ca6d6ac7c940dbe14731ffdd8d498e"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05047ada7a2fde2631a0ed706f1fd68b169a681dfe5e4cf0f8e4cb6618bbc2cd"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:716133f7d1d946a4e1b91b1756b23c088881e70ff180c24e864c26192ad7534a"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1bed1b467ef657f2a0ae62844a607909ef1c6889562de5e1d505f74457d0b96"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca43bdfa5d37bd6aee89d85e1d0831fb86e25541be7e9d376ead1b28974f8e5e"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:44b546bd3eb645fd26fb949e43c02a25a2e632e2ca21a35e2e132c8105dc8599"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:a6ef16328011d3f468e7ebc326f24c1445f001ca1dec335b2f8e66bed3006394"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:5aa873cbc8e593d361ae65c68f85faadd755c3295ea2c12040ee146802f23b38"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:3d7b6ccce016e29df4b7ca819659f516f0bc7a4b3efa3bb2012ba06431b044f9"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:171b73bd4ee683d307599b66793ac80981b06f069b62eea1c9e29c9241aa66b0"}, - {file = "multidict-6.7.0-cp314-cp314t-win32.whl", hash = "sha256:b2d7f80c4e1fd010b07cb26820aae86b7e73b681ee4889684fb8d2d4537aab13"}, - {file = "multidict-6.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:09929cab6fcb68122776d575e03c6cc64ee0b8fca48d17e135474b042ce515cd"}, - {file = "multidict-6.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:cc41db090ed742f32bd2d2c721861725e6109681eddf835d0a82bd3a5c382827"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:363eb68a0a59bd2303216d2346e6c441ba10d36d1f9969fcb6f1ba700de7bb5c"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d874eb056410ca05fed180b6642e680373688efafc7f077b2a2f61811e873a40"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8b55d5497b51afdfde55925e04a022f1de14d4f4f25cdfd4f5d9b0aa96166851"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f8e5c0031b90ca9ce555e2e8fd5c3b02a25f14989cbc310701823832c99eb687"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cf41880c991716f3c7cec48e2f19ae4045fc9db5fc9cff27347ada24d710bb5"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8cfc12a8630a29d601f48d47787bd7eb730e475e83edb5d6c5084317463373eb"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3996b50c3237c4aec17459217c1e7bbdead9a22a0fcd3c365564fbd16439dde6"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7f5170993a0dd3ab871c74f45c0a21a4e2c37a2f2b01b5f722a2ad9c6650469e"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ec81878ddf0e98817def1e77d4f50dae5ef5b0e4fe796fae3bd674304172416e"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9281bf5b34f59afbc6b1e477a372e9526b66ca446f4bf62592839c195a718b32"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:68af405971779d8b37198726f2b6fe3955db846fee42db7a4286fc542203934c"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3ba3ef510467abb0667421a286dc906e30eb08569365f5cdb131d7aff7c2dd84"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b61189b29081a20c7e4e0b49b44d5d44bb0dc92be3c6d06a11cc043f81bf9329"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fb287618b9c7aa3bf8d825f02d9201b2f13078a5ed3b293c8f4d953917d84d5e"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:521f33e377ff64b96c4c556b81c55d0cfffb96a11c194fd0c3f1e56f3d8dd5a4"}, - {file = "multidict-6.7.0-cp39-cp39-win32.whl", hash = "sha256:ce8fdc2dca699f8dbf055a61d73eaa10482569ad20ee3c36ef9641f69afa8c91"}, - {file = "multidict-6.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:7e73299c99939f089dd9b2120a04a516b95cdf8c1cd2b18c53ebf0de80b1f18f"}, - {file = "multidict-6.7.0-cp39-cp39-win_arm64.whl", hash = "sha256:6bdce131e14b04fd34a809b6380dbfd826065c3e2fe8a50dbae659fa0c390546"}, - {file = "multidict-6.7.0-py3-none-any.whl", hash = "sha256:394fc5c42a333c9ffc3e421a4c85e08580d990e08b99f6bf35b4132114c5dcb3"}, - {file = "multidict-6.7.0.tar.gz", hash = "sha256:c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5"}, +files = [ + {file = "multidict-6.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8adee3ac041145ffe4488ea73fa0a622b464cc25340d98be76924d0cda8545ff"}, + {file = "multidict-6.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b61e98c3e2a861035aaccd207da585bdcacef65fe01d7a0d07478efac005e028"}, + {file = "multidict-6.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:75493f28dbadecdbb59130e74fe935288813301a8554dc32f0c631b6bdcdf8b0"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffc3c6a37e048b5395ee235e4a2a0d639c2349dffa32d9367a42fc20d399772"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:87cb72263946b301570b0f63855569a24ee8758aaae2cd182aae7d95fbc92ca7"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bbf7bd39822fd07e3609b6b4467af4c404dd2b88ee314837ad1830a7f4a8299"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1f7cbd4f1f44ddf5fd86a8675b7679176eae770f2fc88115d6dddb6cefb59bc"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5ac9e5bfce0e6282e7f59ff7b7b9a74aa8e5c60d38186a4637f5aa764046ad"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4efc31dfef8c4eeb95b6b17d799eedad88c4902daba39ce637e23a17ea078915"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9fcad2945b1b91c29ef2b4050f590bfcb68d8ac8e0995a74e659aa57e8d78e01"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d877447e7368c7320832acb7159557e49b21ea10ffeb135c1077dbbc0816b598"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:33a12ebac9f380714c298cbfd3e5b9c0c4e89c75fe612ae496512ee51028915f"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0f14ea68d29b43a9bf37953881b1e3eb75b2739e896ba4a6aa4ad4c5b9ffa145"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0327ad2c747a6600e4797d115d3c38a220fdb28e54983abe8964fd17e95ae83c"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d1a20707492db9719a05fc62ee215fd2c29b22b47c1b1ba347f9abc831e26683"}, + {file = "multidict-6.4.4-cp310-cp310-win32.whl", hash = "sha256:d83f18315b9fca5db2452d1881ef20f79593c4aa824095b62cb280019ef7aa3d"}, + {file = "multidict-6.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:9c17341ee04545fd962ae07330cb5a39977294c883485c8d74634669b1f7fe04"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4f5f29794ac0e73d2a06ac03fd18870adc0135a9d384f4a306a951188ed02f95"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c04157266344158ebd57b7120d9b0b35812285d26d0e78193e17ef57bfe2979a"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bb61ffd3ab8310d93427e460f565322c44ef12769f51f77277b4abad7b6f7223"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e0ba18a9afd495f17c351d08ebbc4284e9c9f7971d715f196b79636a4d0de44"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9faf1b1dcaadf9f900d23a0e6d6c8eadd6a95795a0e57fcca73acce0eb912065"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a4d1cb1327c6082c4fce4e2a438483390964c02213bc6b8d782cf782c9b1471f"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:941f1bec2f5dbd51feeb40aea654c2747f811ab01bdd3422a48a4e4576b7d76a"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5f8a146184da7ea12910a4cec51ef85e44f6268467fb489c3caf0cd512f29c2"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:232b7237e57ec3c09be97206bfb83a0aa1c5d7d377faa019c68a210fa35831f1"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:55ae0721c1513e5e3210bca4fc98456b980b0c2c016679d3d723119b6b202c42"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:51d662c072579f63137919d7bb8fc250655ce79f00c82ecf11cab678f335062e"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0e05c39962baa0bb19a6b210e9b1422c35c093b651d64246b6c2e1a7e242d9fd"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5b1cc3ab8c31d9ebf0faa6e3540fb91257590da330ffe6d2393d4208e638925"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:93ec84488a384cd7b8a29c2c7f467137d8a73f6fe38bb810ecf29d1ade011a7c"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b308402608493638763abc95f9dc0030bbd6ac6aff784512e8ac3da73a88af08"}, + {file = "multidict-6.4.4-cp311-cp311-win32.whl", hash = "sha256:343892a27d1a04d6ae455ecece12904d242d299ada01633d94c4f431d68a8c49"}, + {file = "multidict-6.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:73484a94f55359780c0f458bbd3c39cb9cf9c182552177d2136e828269dee529"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:dc388f75a1c00000824bf28b7633e40854f4127ede80512b44c3cfeeea1839a2"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:98af87593a666f739d9dba5d0ae86e01b0e1a9cfcd2e30d2d361fbbbd1a9162d"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aff4cafea2d120327d55eadd6b7f1136a8e5a0ecf6fb3b6863e8aca32cd8e50a"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:169c4ba7858176b797fe551d6e99040c531c775d2d57b31bcf4de6d7a669847f"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b9eb4c59c54421a32b3273d4239865cb14ead53a606db066d7130ac80cc8ec93"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7cf3bd54c56aa16fdb40028d545eaa8d051402b61533c21e84046e05513d5780"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f682c42003c7264134bfe886376299db4cc0c6cd06a3295b41b347044bcb5482"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920f9cf2abdf6e493c519492d892c362007f113c94da4c239ae88429835bad1"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:530d86827a2df6504526106b4c104ba19044594f8722d3e87714e847c74a0275"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ecde56ea2439b96ed8a8d826b50c57364612ddac0438c39e473fafad7ae1c23b"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:dc8c9736d8574b560634775ac0def6bdc1661fc63fa27ffdfc7264c565bcb4f2"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:7f3d3b3c34867579ea47cbd6c1f2ce23fbfd20a273b6f9e3177e256584f1eacc"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:87a728af265e08f96b6318ebe3c0f68b9335131f461efab2fc64cc84a44aa6ed"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9f193eeda1857f8e8d3079a4abd258f42ef4a4bc87388452ed1e1c4d2b0c8740"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:be06e73c06415199200e9a2324a11252a3d62030319919cde5e6950ffeccf72e"}, + {file = "multidict-6.4.4-cp312-cp312-win32.whl", hash = "sha256:622f26ea6a7e19b7c48dd9228071f571b2fbbd57a8cd71c061e848f281550e6b"}, + {file = "multidict-6.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:5e2bcda30d5009996ff439e02a9f2b5c3d64a20151d34898c000a6281faa3781"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:82ffabefc8d84c2742ad19c37f02cde5ec2a1ee172d19944d380f920a340e4b9"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6a2f58a66fe2c22615ad26156354005391e26a2f3721c3621504cd87c1ea87bf"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5883d6ee0fd9d8a48e9174df47540b7545909841ac82354c7ae4cbe9952603bd"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9abcf56a9511653fa1d052bfc55fbe53dbee8f34e68bd6a5a038731b0ca42d15"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6ed5ae5605d4ad5a049fad2a28bb7193400700ce2f4ae484ab702d1e3749c3f9"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbfcb60396f9bcfa63e017a180c3105b8c123a63e9d1428a36544e7d37ca9e20"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0f1987787f5f1e2076b59692352ab29a955b09ccc433c1f6b8e8e18666f608b"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d0121ccce8c812047d8d43d691a1ad7641f72c4f730474878a5aeae1b8ead8c"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83ec4967114295b8afd120a8eec579920c882831a3e4c3331d591a8e5bfbbc0f"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:995f985e2e268deaf17867801b859a282e0448633f1310e3704b30616d269d69"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:d832c608f94b9f92a0ec8b7e949be7792a642b6e535fcf32f3e28fab69eeb046"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d21c1212171cf7da703c5b0b7a0e85be23b720818aef502ad187d627316d5645"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:cbebaa076aaecad3d4bb4c008ecc73b09274c952cf6a1b78ccfd689e51f5a5b0"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c93a6fb06cc8e5d3628b2b5fda215a5db01e8f08fc15fadd65662d9b857acbe4"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8cd8f81f1310182362fb0c7898145ea9c9b08a71081c5963b40ee3e3cac589b1"}, + {file = "multidict-6.4.4-cp313-cp313-win32.whl", hash = "sha256:3e9f1cd61a0ab857154205fb0b1f3d3ace88d27ebd1409ab7af5096e409614cd"}, + {file = "multidict-6.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:8ffb40b74400e4455785c2fa37eba434269149ec525fc8329858c862e4b35373"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:6a602151dbf177be2450ef38966f4be3467d41a86c6a845070d12e17c858a156"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0d2b9712211b860d123815a80b859075d86a4d54787e247d7fbee9db6832cf1c"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d2fa86af59f8fc1972e121ade052145f6da22758f6996a197d69bb52f8204e7e"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50855d03e9e4d66eab6947ba688ffb714616f985838077bc4b490e769e48da51"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5bce06b83be23225be1905dcdb6b789064fae92499fbc458f59a8c0e68718601"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66ed0731f8e5dfd8369a883b6e564aca085fb9289aacabd9decd70568b9a30de"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:329ae97fc2f56f44d91bc47fe0972b1f52d21c4b7a2ac97040da02577e2daca2"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c27e5dcf520923d6474d98b96749e6805f7677e93aaaf62656005b8643f907ab"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:058cc59b9e9b143cc56715e59e22941a5d868c322242278d28123a5d09cdf6b0"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:69133376bc9a03f8c47343d33f91f74a99c339e8b58cea90433d8e24bb298031"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d6b15c55721b1b115c5ba178c77104123745b1417527ad9641a4c5e2047450f0"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:a887b77f51d3d41e6e1a63cf3bc7ddf24de5939d9ff69441387dfefa58ac2e26"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:632a3bf8f1787f7ef7d3c2f68a7bde5be2f702906f8b5842ad6da9d974d0aab3"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:a145c550900deb7540973c5cdb183b0d24bed6b80bf7bddf33ed8f569082535e"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc5d83c6619ca5c9672cb78b39ed8542f1975a803dee2cda114ff73cbb076edd"}, + {file = "multidict-6.4.4-cp313-cp313t-win32.whl", hash = "sha256:3312f63261b9df49be9d57aaa6abf53a6ad96d93b24f9cc16cf979956355ce6e"}, + {file = "multidict-6.4.4-cp313-cp313t-win_amd64.whl", hash = "sha256:ba852168d814b2c73333073e1c7116d9395bea69575a01b0b3c89d2d5a87c8fb"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:603f39bd1cf85705c6c1ba59644b480dfe495e6ee2b877908de93322705ad7cf"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fc60f91c02e11dfbe3ff4e1219c085695c339af72d1641800fe6075b91850c8f"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:496bcf01c76a70a31c3d746fd39383aad8d685ce6331e4c709e9af4ced5fa221"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4219390fb5bf8e548e77b428bb36a21d9382960db5321b74d9d9987148074d6b"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef4e9096ff86dfdcbd4a78253090ba13b1d183daa11b973e842465d94ae1772"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:49a29d7133b1fc214e818bbe025a77cc6025ed9a4f407d2850373ddde07fd04a"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e32053d6d3a8b0dfe49fde05b496731a0e6099a4df92154641c00aa76786aef5"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc403092a49509e8ef2d2fd636a8ecefc4698cc57bbe894606b14579bc2a955"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5363f9b2a7f3910e5c87d8b1855c478c05a2dc559ac57308117424dfaad6805c"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2e543a40e4946cf70a88a3be87837a3ae0aebd9058ba49e91cacb0b2cd631e2b"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:60d849912350da557fe7de20aa8cf394aada6980d0052cc829eeda4a0db1c1db"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:19d08b4f22eae45bb018b9f06e2838c1e4b853c67628ef8ae126d99de0da6395"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:d693307856d1ef08041e8b6ff01d5b4618715007d288490ce2c7e29013c12b9a"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fad6daaed41021934917f4fb03ca2db8d8a4d79bf89b17ebe77228eb6710c003"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c10d17371bff801af0daf8b073c30b6cf14215784dc08cd5c43ab5b7b8029bbc"}, + {file = "multidict-6.4.4-cp39-cp39-win32.whl", hash = "sha256:7e23f2f841fcb3ebd4724a40032d32e0892fbba4143e43d2a9e7695c5e50e6bd"}, + {file = "multidict-6.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d7b50b673ffb4ff4366e7ab43cf1f0aef4bd3608735c5fbdf0bdb6f690da411"}, + {file = "multidict-6.4.4-py3-none-any.whl", hash = "sha256:bd4557071b561a8b3b6075c3ce93cf9bfb6182cb241805c3d66ced3b75eff4ac"}, + {file = "multidict-6.4.4.tar.gz", hash = "sha256:69ee9e6ba214b5245031b76233dd95408a0fd57fdb019ddcc1ead4790932a8e8"}, ] [[package]] name = "newrelic" -version = "10.17.0" +version = "9.13.0" description = "New Relic Python Agent" optional = false -python-versions = ">=3.7" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "newrelic-10.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91ebeaae460beaaeb3113474873bc5fc9c6c13ab6b0fd8936f584c508fec373d"}, - {file = "newrelic-10.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30b8b6a9f447a7276fd19a41ccc6dba264f9ef569e4bed92200a58b76e7f7754"}, - {file = "newrelic-10.17.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:214bd42ef8fb1c2046727bfe15c8f374ebf4ff2d5091ca1ac870abd2a7574ffe"}, - {file = "newrelic-10.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:36a14fd92b44324d9bb33e1c1698c2cd15ffa0e291d222365e929ee17cd9d6da"}, - {file = "newrelic-10.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f62f70f1c01aa527de7e6ce2eb4c0285a7c40a89b42107be92bcc5dfd0fa8bb4"}, - {file = "newrelic-10.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54898db2b9eb81db9f3421302d2d03451630c033f2001fbe9f21d0e068f0418f"}, - {file = "newrelic-10.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d65f7d08f90caf6dd3708068a0eda8328c49ec18e51d514a43afaa5a68180e9c"}, - {file = "newrelic-10.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6dd61153b82b1e265754820f3e91c96c16b1b75508b6c169e27b5c196f1b7b95"}, - {file = "newrelic-10.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ab9cbce3f8da5bfcd085b8a59591cfb653d75834b362e3eccb86bdf21eea917"}, - {file = "newrelic-10.17.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:889969407457a9344927b1a9e9d5afde77345857db4d2ea75b119d02c02d9174"}, - {file = "newrelic-10.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d74c06863356b19c1fcf19900f85057ab33ef779aa3e0de3cb7e3d3f37ca8e20"}, - {file = "newrelic-10.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:083777458f93d16ae9e605fd66a6298d856e32deea11cf3270ed237858dcbfe6"}, - {file = "newrelic-10.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:165c7045da474342d4ceab67776e8aeb66e77674fab7484b4e2e4ea68d02ed4d"}, - {file = "newrelic-10.17.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc3c3c82c95b57fe30fc1f684bf920bd8b0ecae70a16cc11f55d0867ffb7520d"}, - {file = "newrelic-10.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5789f739e6ca1c4a49649e406b538d67c063ec33ab4658d01049303dfad9398b"}, - {file = "newrelic-10.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4144dd96fa55772456326b3a6032a53d54aa9245ffc5041b002ce9eb5dbd0992"}, - {file = "newrelic-10.17.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c444e96918508decee6f532f04f0fa79027db0728770669ace4a7008c5dd52ca"}, - {file = "newrelic-10.17.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5171f1020bc834b01faae8466b5375e8c2162fa219c98430e42af1c6e5077b14"}, - {file = "newrelic-10.17.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0b43fb53f8a63c1e792a9ba4439680265b481c44efd64f7d92069e974c38b199"}, - {file = "newrelic-10.17.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:78a673440037ad61e0073da69f2549fac92271dadd7a2087c22a20ddc7f91260"}, - {file = "newrelic-10.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61e81b726f3fab5fed155407f157ed67931d2d83403cc0ae473327e0b7b42bc5"}, - {file = "newrelic-10.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed6f549b1ab42ad31d5ee34c8041f1484ab769e045ad3b9f321c9588339079f3"}, - {file = "newrelic-10.17.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3a34df04ff6315619a8d098c59751f766de57f14e5cd5c09427dde47bfbc5012"}, - {file = "newrelic-10.17.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:d92b43c07cf137d8a6d8dc73c87fbef99ca449564c25385e66727f156c2c34d8"}, - {file = "newrelic-10.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7669597193d8f6a3512fd5e8728a7b2b244db9694b3a03b3b99930ba9efc9e3b"}, - {file = "newrelic-10.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1027039eae1b4d3ffee3077135900a41ffdc41bd2bee3162d6cf36bd990cf3b"}, - {file = "newrelic-10.17.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:af28eb5e7f368f6f4fcde9593e7dd189b68e39a2e7409874a0cdea3a4bb4e904"}, - {file = "newrelic-10.17.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:328162a61e30f7b3e76241830989110d8f86d8392805a78034f8109e4f5434b4"}, - {file = "newrelic-10.17.0.tar.gz", hash = "sha256:f092109ac024f9524fafdd06126924c0fbd2af54684571167c0ee1d1cc1bcb7d"}, +files = [ + {file = "newrelic-9.13.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:52c801bd2147acfec8cbbf92adba8cab3d8d19982eceaa08409a3938d6f8524a"}, + {file = "newrelic-9.13.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:0e1e40fe4b953925f86590a74a7de2488fa37f1ba9c9f5ebcc3f765b9ba3bd1b"}, + {file = "newrelic-9.13.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:c59adb97aaa4d111a33e3f936bf85d990f8837cabe51cebb1c6128778006563f"}, + {file = "newrelic-9.13.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:0f5e404d46d6e24c920dfb0ad441e88fde633ced747f9894c1654263c9ed2c59"}, + {file = "newrelic-9.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:75c73cd71005e1467a76b9108dbd355fc256e12b822b2fdc28810bde991cc92e"}, + {file = "newrelic-9.13.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd417c5873b45c8154cca92d81ab159f6c5058138ff848cba4c9e02f10ad5c61"}, + {file = "newrelic-9.13.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:273c30db450d2ae3fa0c2bce583e7d64a4cdb2b957c94bf4202bcfb30bfee411"}, + {file = "newrelic-9.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:348c298232d6323b31d65d95dc97ac55d9b0117feb713a8f1c6baa056e7f6204"}, + {file = "newrelic-9.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dbfe4a0f2d34d8d9ef31cee7c73a49d3fe2b9a92129d70819058f1df736cdd38"}, + {file = "newrelic-9.13.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db3cc230970902c2548e5d747ce96d38bc009d087cf49bef4ce8679cdedc57c1"}, + {file = "newrelic-9.13.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d5fe36aae1154610d2d03cd8cdfc52b6ea3f63a0b672b14185e4e1532016f826"}, + {file = "newrelic-9.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f9ab59b30729532bab64497910c1051665269814366be8ee3fde2391032dd9f6"}, + {file = "newrelic-9.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8addb08bf7595eeb65ada2b33d9272541b6e872e519382be28690a920f4785"}, + {file = "newrelic-9.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:632435a5f5170dd9a72012b6c21ca62ec2e9e4b24e7d52fc4d895a359dbba652"}, + {file = "newrelic-9.13.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d720f97c844a015cd54d69e052f0956e93e45fcd33b829e8cc20356af6a0b0c4"}, + {file = "newrelic-9.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3c5cc86c88302623375e282ec17a1c55da739f2ab58ca48607f85c48a43cba33"}, + {file = "newrelic-9.13.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abc7487cff166de747da8b05b108150a6f7f2c855b3d2547cfb1f53b9330e7dd"}, + {file = "newrelic-9.13.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3eba2b1a0c1b31d42f5ea1a80f60e57483898faf86bb24474dbd7d0a7fad41b0"}, + {file = "newrelic-9.13.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:63636e34ab52a303ad21afd5d7f5c6418e814fcb8d3430266db4a3cfc7e19aef"}, + {file = "newrelic-9.13.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:07743279225f860444283c4dcaa7ccd02944e61ce95d666b6ab00188bb1f7f99"}, + {file = "newrelic-9.13.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14894911effd29f7bca70126ff991d4291198c6b1d9a29c9aa10d9743a685c27"}, + {file = "newrelic-9.13.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee7edcd5d364c6d2d97922aa436f5d27788a7ab9e8aa845ecaf59ddf7c66457"}, + {file = "newrelic-9.13.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:743b5ff8a2ad02989ea87334391506dbcb578436a4d8cc49e819421ca2e5f743"}, + {file = "newrelic-9.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0bd29b99dce7402635922df984c338358fbe159f0df9b153d1e913bed77210d3"}, + {file = "newrelic-9.13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b70eed56613147a96a5ae4c559c42f54ea00d4d52e5679ac9b9d93c4d6e572a4"}, + {file = "newrelic-9.13.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec37f7bd9df294b17948fcfa761e0fe06301c7eaea4bbd97f4afe04dc2acbbac"}, + {file = "newrelic-9.13.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7ebbef59d94d5feaae5eab56a44df5a677b90ac75e437d48eb6b71ae7d8e6f9d"}, + {file = "newrelic-9.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49cabe8222da2515d1e6a113f9fccd8a9d41ca3678dec9592e87a01ea0005056"}, + {file = "newrelic-9.13.0.tar.gz", hash = "sha256:7405bfc65d6d983a738e756044956f06c366a234fdde0ccf7cf0d52fedfd72e4"}, ] [package.extras] @@ -2369,339 +2218,189 @@ infinite-tracing = ["grpcio", "protobuf"] [[package]] name = "numpy" -version = "2.3.4" +version = "1.26.3" description = "Fundamental package for array computing in Python" optional = false -python-versions = ">=3.11" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "numpy-2.3.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e78aecd2800b32e8347ce49316d3eaf04aed849cd5b38e0af39f829a4e59f5eb"}, - {file = "numpy-2.3.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7fd09cc5d65bda1e79432859c40978010622112e9194e581e3415a3eccc7f43f"}, - {file = "numpy-2.3.4-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:1b219560ae2c1de48ead517d085bc2d05b9433f8e49d0955c82e8cd37bd7bf36"}, - {file = "numpy-2.3.4-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:bafa7d87d4c99752d07815ed7a2c0964f8ab311eb8168f41b910bd01d15b6032"}, - {file = "numpy-2.3.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36dc13af226aeab72b7abad501d370d606326a0029b9f435eacb3b8c94b8a8b7"}, - {file = "numpy-2.3.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a7b2f9a18b5ff9824a6af80de4f37f4ec3c2aab05ef08f51c77a093f5b89adda"}, - {file = "numpy-2.3.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9984bd645a8db6ca15d850ff996856d8762c51a2239225288f08f9050ca240a0"}, - {file = "numpy-2.3.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:64c5825affc76942973a70acf438a8ab618dbd692b84cd5ec40a0a0509edc09a"}, - {file = "numpy-2.3.4-cp311-cp311-win32.whl", hash = "sha256:ed759bf7a70342f7817d88376eb7142fab9fef8320d6019ef87fae05a99874e1"}, - {file = "numpy-2.3.4-cp311-cp311-win_amd64.whl", hash = "sha256:faba246fb30ea2a526c2e9645f61612341de1a83fb1e0c5edf4ddda5a9c10996"}, - {file = "numpy-2.3.4-cp311-cp311-win_arm64.whl", hash = "sha256:4c01835e718bcebe80394fd0ac66c07cbb90147ebbdad3dcecd3f25de2ae7e2c"}, - {file = "numpy-2.3.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef1b5a3e808bc40827b5fa2c8196151a4c5abe110e1726949d7abddfe5c7ae11"}, - {file = "numpy-2.3.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c2f91f496a87235c6aaf6d3f3d89b17dba64996abadccb289f48456cff931ca9"}, - {file = "numpy-2.3.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:f77e5b3d3da652b474cc80a14084927a5e86a5eccf54ca8ca5cbd697bf7f2667"}, - {file = "numpy-2.3.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:8ab1c5f5ee40d6e01cbe96de5863e39b215a4d24e7d007cad56c7184fdf4aeef"}, - {file = "numpy-2.3.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77b84453f3adcb994ddbd0d1c5d11db2d6bda1a2b7fd5ac5bd4649d6f5dc682e"}, - {file = "numpy-2.3.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4121c5beb58a7f9e6dfdee612cb24f4df5cd4db6e8261d7f4d7450a997a65d6a"}, - {file = "numpy-2.3.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:65611ecbb00ac9846efe04db15cbe6186f562f6bb7e5e05f077e53a599225d16"}, - {file = "numpy-2.3.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dabc42f9c6577bcc13001b8810d300fe814b4cfbe8a92c873f269484594f9786"}, - {file = "numpy-2.3.4-cp312-cp312-win32.whl", hash = "sha256:a49d797192a8d950ca59ee2d0337a4d804f713bb5c3c50e8db26d49666e351dc"}, - {file = "numpy-2.3.4-cp312-cp312-win_amd64.whl", hash = "sha256:985f1e46358f06c2a09921e8921e2c98168ed4ae12ccd6e5e87a4f1857923f32"}, - {file = "numpy-2.3.4-cp312-cp312-win_arm64.whl", hash = "sha256:4635239814149e06e2cb9db3dd584b2fa64316c96f10656983b8026a82e6e4db"}, - {file = "numpy-2.3.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c090d4860032b857d94144d1a9976b8e36709e40386db289aaf6672de2a81966"}, - {file = "numpy-2.3.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a13fc473b6db0be619e45f11f9e81260f7302f8d180c49a22b6e6120022596b3"}, - {file = "numpy-2.3.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:3634093d0b428e6c32c3a69b78e554f0cd20ee420dcad5a9f3b2a63762ce4197"}, - {file = "numpy-2.3.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:043885b4f7e6e232d7df4f51ffdef8c36320ee9d5f227b380ea636722c7ed12e"}, - {file = "numpy-2.3.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4ee6a571d1e4f0ea6d5f22d6e5fbd6ed1dc2b18542848e1e7301bd190500c9d7"}, - {file = "numpy-2.3.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fc8a63918b04b8571789688b2780ab2b4a33ab44bfe8ccea36d3eba51228c953"}, - {file = "numpy-2.3.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:40cc556d5abbc54aabe2b1ae287042d7bdb80c08edede19f0c0afb36ae586f37"}, - {file = "numpy-2.3.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ecb63014bb7f4ce653f8be7f1df8cbc6093a5a2811211770f6606cc92b5a78fd"}, - {file = "numpy-2.3.4-cp313-cp313-win32.whl", hash = "sha256:e8370eb6925bb8c1c4264fec52b0384b44f675f191df91cbe0140ec9f0955646"}, - {file = "numpy-2.3.4-cp313-cp313-win_amd64.whl", hash = "sha256:56209416e81a7893036eea03abcb91c130643eb14233b2515c90dcac963fe99d"}, - {file = "numpy-2.3.4-cp313-cp313-win_arm64.whl", hash = "sha256:a700a4031bc0fd6936e78a752eefb79092cecad2599ea9c8039c548bc097f9bc"}, - {file = "numpy-2.3.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:86966db35c4040fdca64f0816a1c1dd8dbd027d90fca5a57e00e1ca4cd41b879"}, - {file = "numpy-2.3.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:838f045478638b26c375ee96ea89464d38428c69170360b23a1a50fa4baa3562"}, - {file = "numpy-2.3.4-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d7315ed1dab0286adca467377c8381cd748f3dc92235f22a7dfc42745644a96a"}, - {file = "numpy-2.3.4-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:84f01a4d18b2cc4ade1814a08e5f3c907b079c847051d720fad15ce37aa930b6"}, - {file = "numpy-2.3.4-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:817e719a868f0dacde4abdfc5c1910b301877970195db9ab6a5e2c4bd5b121f7"}, - {file = "numpy-2.3.4-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85e071da78d92a214212cacea81c6da557cab307f2c34b5f85b628e94803f9c0"}, - {file = "numpy-2.3.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2ec646892819370cf3558f518797f16597b4e4669894a2ba712caccc9da53f1f"}, - {file = "numpy-2.3.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:035796aaaddfe2f9664b9a9372f089cfc88bd795a67bd1bfe15e6e770934cf64"}, - {file = "numpy-2.3.4-cp313-cp313t-win32.whl", hash = "sha256:fea80f4f4cf83b54c3a051f2f727870ee51e22f0248d3114b8e755d160b38cfb"}, - {file = "numpy-2.3.4-cp313-cp313t-win_amd64.whl", hash = "sha256:15eea9f306b98e0be91eb344a94c0e630689ef302e10c2ce5f7e11905c704f9c"}, - {file = "numpy-2.3.4-cp313-cp313t-win_arm64.whl", hash = "sha256:b6c231c9c2fadbae4011ca5e7e83e12dc4a5072f1a1d85a0a7b3ed754d145a40"}, - {file = "numpy-2.3.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:81c3e6d8c97295a7360d367f9f8553973651b76907988bb6066376bc2252f24e"}, - {file = "numpy-2.3.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7c26b0b2bf58009ed1f38a641f3db4be8d960a417ca96d14e5b06df1506d41ff"}, - {file = "numpy-2.3.4-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:62b2198c438058a20b6704351b35a1d7db881812d8512d67a69c9de1f18ca05f"}, - {file = "numpy-2.3.4-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:9d729d60f8d53a7361707f4b68a9663c968882dd4f09e0d58c044c8bf5faee7b"}, - {file = "numpy-2.3.4-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd0c630cf256b0a7fd9d0a11c9413b42fef5101219ce6ed5a09624f5a65392c7"}, - {file = "numpy-2.3.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5e081bc082825f8b139f9e9fe42942cb4054524598aaeb177ff476cc76d09d2"}, - {file = "numpy-2.3.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:15fb27364ed84114438fff8aaf998c9e19adbeba08c0b75409f8c452a8692c52"}, - {file = "numpy-2.3.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:85d9fb2d8cd998c84d13a79a09cc0c1091648e848e4e6249b0ccd7f6b487fa26"}, - {file = "numpy-2.3.4-cp314-cp314-win32.whl", hash = "sha256:e73d63fd04e3a9d6bc187f5455d81abfad05660b212c8804bf3b407e984cd2bc"}, - {file = "numpy-2.3.4-cp314-cp314-win_amd64.whl", hash = "sha256:3da3491cee49cf16157e70f607c03a217ea6647b1cea4819c4f48e53d49139b9"}, - {file = "numpy-2.3.4-cp314-cp314-win_arm64.whl", hash = "sha256:6d9cd732068e8288dbe2717177320723ccec4fb064123f0caf9bbd90ab5be868"}, - {file = "numpy-2.3.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:22758999b256b595cf0b1d102b133bb61866ba5ceecf15f759623b64c020c9ec"}, - {file = "numpy-2.3.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:9cb177bc55b010b19798dc5497d540dea67fd13a8d9e882b2dae71de0cf09eb3"}, - {file = "numpy-2.3.4-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:0f2bcc76f1e05e5ab58893407c63d90b2029908fa41f9f1cc51eecce936c3365"}, - {file = "numpy-2.3.4-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:8dc20bde86802df2ed8397a08d793da0ad7a5fd4ea3ac85d757bf5dd4ad7c252"}, - {file = "numpy-2.3.4-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e199c087e2aa71c8f9ce1cb7a8e10677dc12457e7cc1be4798632da37c3e86e"}, - {file = "numpy-2.3.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85597b2d25ddf655495e2363fe044b0ae999b75bc4d630dc0d886484b03a5eb0"}, - {file = "numpy-2.3.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:04a69abe45b49c5955923cf2c407843d1c85013b424ae8a560bba16c92fe44a0"}, - {file = "numpy-2.3.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e1708fac43ef8b419c975926ce1eaf793b0c13b7356cfab6ab0dc34c0a02ac0f"}, - {file = "numpy-2.3.4-cp314-cp314t-win32.whl", hash = "sha256:863e3b5f4d9915aaf1b8ec79ae560ad21f0b8d5e3adc31e73126491bb86dee1d"}, - {file = "numpy-2.3.4-cp314-cp314t-win_amd64.whl", hash = "sha256:962064de37b9aef801d33bc579690f8bfe6c5e70e29b61783f60bcba838a14d6"}, - {file = "numpy-2.3.4-cp314-cp314t-win_arm64.whl", hash = "sha256:8b5a9a39c45d852b62693d9b3f3e0fe052541f804296ff401a72a1b60edafb29"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6e274603039f924c0fe5cb73438fa9246699c78a6df1bd3decef9ae592ae1c05"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d149aee5c72176d9ddbc6803aef9c0f6d2ceeea7626574fc68518da5476fa346"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:6d34ed9db9e6395bb6cd33286035f73a59b058169733a9db9f85e650b88df37e"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:fdebe771ca06bb8d6abce84e51dca9f7921fe6ad34a0c914541b063e9a68928b"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e92defe6c08211eb77902253b14fe5b480ebc5112bc741fd5e9cd0608f847"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13b9062e4f5c7ee5c7e5be96f29ba71bc5a37fed3d1d77c37390ae00724d296d"}, - {file = "numpy-2.3.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:81b3a59793523e552c4a96109dde028aa4448ae06ccac5a76ff6532a85558a7f"}, - {file = "numpy-2.3.4.tar.gz", hash = "sha256:a7d018bfedb375a8d979ac758b120ba846a7fe764911a64465fd87b8729f4a6a"}, +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:806dd64230dbbfaca8a27faa64e2f414bf1c6622ab78cc4264f7f5f028fee3bf"}, + {file = "numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02f98011ba4ab17f46f80f7f8f1c291ee7d855fcef0a5a98db80767a468c85cd"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d45b3ec2faed4baca41c76617fcdcfa4f684ff7a151ce6fc78ad3b6e85af0a6"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdd2b45bf079d9ad90377048e2747a0c82351989a2165821f0c96831b4a2a54b"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:211ddd1e94817ed2d175b60b6374120244a4dd2287f4ece45d49228b4d529178"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b1240f767f69d7c4c8a29adde2310b871153df9b26b5cb2b54a561ac85146485"}, + {file = "numpy-1.26.3-cp310-cp310-win32.whl", hash = "sha256:21a9484e75ad018974a2fdaa216524d64ed4212e418e0a551a2d83403b0531d3"}, + {file = "numpy-1.26.3-cp310-cp310-win_amd64.whl", hash = "sha256:9e1591f6ae98bcfac2a4bbf9221c0b92ab49762228f38287f6eeb5f3f55905ce"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b831295e5472954104ecb46cd98c08b98b49c69fdb7040483aff799a755a7374"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9e87562b91f68dd8b1c39149d0323b42e0082db7ddb8e934ab4c292094d575d6"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c66d6fec467e8c0f975818c1796d25c53521124b7cfb760114be0abad53a0a2"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f25e2811a9c932e43943a2615e65fc487a0b6b49218899e62e426e7f0a57eeda"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:af36e0aa45e25c9f57bf684b1175e59ea05d9a7d3e8e87b7ae1a1da246f2767e"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:51c7f1b344f302067b02e0f5b5d2daa9ed4a721cf49f070280ac202738ea7f00"}, + {file = "numpy-1.26.3-cp311-cp311-win32.whl", hash = "sha256:7ca4f24341df071877849eb2034948459ce3a07915c2734f1abb4018d9c49d7b"}, + {file = "numpy-1.26.3-cp311-cp311-win_amd64.whl", hash = "sha256:39763aee6dfdd4878032361b30b2b12593fb445ddb66bbac802e2113eb8a6ac4"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a7081fd19a6d573e1a05e600c82a1c421011db7935ed0d5c483e9dd96b99cf13"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12c70ac274b32bc00c7f61b515126c9205323703abb99cd41836e8125ea0043e"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f784e13e598e9594750b2ef6729bcd5a47f6cfe4a12cca13def35e06d8163e3"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f24750ef94d56ce6e33e4019a8a4d68cfdb1ef661a52cdaee628a56d2437419"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:77810ef29e0fb1d289d225cabb9ee6cf4d11978a00bb99f7f8ec2132a84e0166"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8ed07a90f5450d99dad60d3799f9c03c6566709bd53b497eb9ccad9a55867f36"}, + {file = "numpy-1.26.3-cp312-cp312-win32.whl", hash = "sha256:f73497e8c38295aaa4741bdfa4fda1a5aedda5473074369eca10626835445511"}, + {file = "numpy-1.26.3-cp312-cp312-win_amd64.whl", hash = "sha256:da4b0c6c699a0ad73c810736303f7fbae483bcb012e38d7eb06a5e3b432c981b"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1666f634cb3c80ccbd77ec97bc17337718f56d6658acf5d3b906ca03e90ce87f"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18c3319a7d39b2c6a9e3bb75aab2304ab79a811ac0168a671a62e6346c29b03f"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b7e807d6888da0db6e7e75838444d62495e2b588b99e90dd80c3459594e857b"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d362e17bcb0011738c2d83e0a65ea8ce627057b2fdda37678f4374a382a137"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b8c275f0ae90069496068c714387b4a0eba5d531aace269559ff2b43655edd58"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cc0743f0302b94f397a4a65a660d4cd24267439eb16493fb3caad2e4389bccbb"}, + {file = "numpy-1.26.3-cp39-cp39-win32.whl", hash = "sha256:9bc6d1a7f8cedd519c4b7b1156d98e051b726bf160715b769106661d567b3f03"}, + {file = "numpy-1.26.3-cp39-cp39-win_amd64.whl", hash = "sha256:867e3644e208c8922a3be26fc6bbf112a035f50f0a86497f98f228c50c607bb2"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3c67423b3703f8fbd90f5adaa37f85b5794d3366948efe9a5190a5f3a83fc34e"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46f47ee566d98849323f01b349d58f2557f02167ee301e5e28809a8c0e27a2d0"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a8474703bffc65ca15853d5fd4d06b18138ae90c17c8d12169968e998e448bb5"}, + {file = "numpy-1.26.3.tar.gz", hash = "sha256:697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4"}, +] + +[[package]] +name = "oauthlib" +version = "3.2.2" +description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, + {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, ] +[package.extras] +rsa = ["cryptography (>=3.0.0)"] +signals = ["blinker (>=1.4.0)"] +signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] + [[package]] name = "openai" -version = "2.7.1" +version = "1.75.0" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "openai-2.7.1-py3-none-any.whl", hash = "sha256:2f2530354d94c59c614645a4662b9dab0a5b881c5cd767a8587398feac0c9021"}, - {file = "openai-2.7.1.tar.gz", hash = "sha256:df4d4a3622b2df3475ead8eb0fbb3c27fd1c070fa2e55d778ca4f40e0186c726"}, + {file = "openai-1.75.0-py3-none-any.whl", hash = "sha256:fe6f932d2ded3b429ff67cc9ad118c71327db32eb9d32dd723de3acfca337125"}, + {file = "openai-1.75.0.tar.gz", hash = "sha256:fb3ea907efbdb1bcfd0c44507ad9c961afd7dce3147292b54505ecfd17be8fd1"}, ] [package.dependencies] anyio = ">=3.5.0,<5" distro = ">=1.7.0,<2" httpx = ">=0.23.0,<1" -jiter = ">=0.10.0,<1" +jiter = ">=0.4.0,<1" pydantic = ">=1.9.0,<3" sniffio = "*" tqdm = ">4" typing-extensions = ">=4.11,<5" [package.extras] -aiohttp = ["aiohttp", "httpx-aiohttp (>=0.1.9)"] datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] realtime = ["websockets (>=13,<16)"] voice-helpers = ["numpy (>=2.0.2)", "sounddevice (>=0.5.1)"] -[[package]] -name = "opentelemetry-api" -version = "1.38.0" -description = "OpenTelemetry Python API" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_api-1.38.0-py3-none-any.whl", hash = "sha256:2891b0197f47124454ab9f0cf58f3be33faca394457ac3e09daba13ff50aa582"}, - {file = "opentelemetry_api-1.38.0.tar.gz", hash = "sha256:f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12"}, -] - -[package.dependencies] -importlib-metadata = ">=6.0,<8.8.0" -typing-extensions = ">=4.5.0" - -[[package]] -name = "opentelemetry-exporter-otlp-proto-common" -version = "1.38.0" -description = "OpenTelemetry Protobuf encoding" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_exporter_otlp_proto_common-1.38.0-py3-none-any.whl", hash = "sha256:03cb76ab213300fe4f4c62b7d8f17d97fcfd21b89f0b5ce38ea156327ddda74a"}, - {file = "opentelemetry_exporter_otlp_proto_common-1.38.0.tar.gz", hash = "sha256:e333278afab4695aa8114eeb7bf4e44e65c6607d54968271a249c180b2cb605c"}, -] - -[package.dependencies] -opentelemetry-proto = "1.38.0" - -[[package]] -name = "opentelemetry-exporter-otlp-proto-http" -version = "1.38.0" -description = "OpenTelemetry Collector Protobuf over HTTP Exporter" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_exporter_otlp_proto_http-1.38.0-py3-none-any.whl", hash = "sha256:84b937305edfc563f08ec69b9cb2298be8188371217e867c1854d77198d0825b"}, - {file = "opentelemetry_exporter_otlp_proto_http-1.38.0.tar.gz", hash = "sha256:f16bd44baf15cbe07633c5112ffc68229d0edbeac7b37610be0b2def4e21e90b"}, -] - -[package.dependencies] -googleapis-common-protos = ">=1.52,<2.0" -opentelemetry-api = ">=1.15,<2.0" -opentelemetry-exporter-otlp-proto-common = "1.38.0" -opentelemetry-proto = "1.38.0" -opentelemetry-sdk = ">=1.38.0,<1.39.0" -requests = ">=2.7,<3.0" -typing-extensions = ">=4.5.0" - -[[package]] -name = "opentelemetry-instrumentation" -version = "0.59b0" -description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_instrumentation-0.59b0-py3-none-any.whl", hash = "sha256:44082cc8fe56b0186e87ee8f7c17c327c4c2ce93bdbe86496e600985d74368ee"}, - {file = "opentelemetry_instrumentation-0.59b0.tar.gz", hash = "sha256:6010f0faaacdaf7c4dff8aac84e226d23437b331dcda7e70367f6d73a7db1adc"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.4,<2.0" -opentelemetry-semantic-conventions = "0.59b0" -packaging = ">=18.0" -wrapt = ">=1.0.0,<2.0.0" - [[package]] name = "opentelemetry-proto" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Python Proto" optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_proto-1.38.0-py3-none-any.whl", hash = "sha256:b6ebe54d3217c42e45462e2a1ae28c3e2bf2ec5a5645236a490f55f45f1a0a18"}, - {file = "opentelemetry_proto-1.38.0.tar.gz", hash = "sha256:88b161e89d9d372ce723da289b7da74c3a8354a8e5359992be813942969ed468"}, -] - -[package.dependencies] -protobuf = ">=5.0,<7.0" - -[[package]] -name = "opentelemetry-sdk" -version = "1.38.0" -description = "OpenTelemetry Python SDK" -optional = false -python-versions = ">=3.9" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "opentelemetry_sdk-1.38.0-py3-none-any.whl", hash = "sha256:1c66af6564ecc1553d72d811a01df063ff097cdc82ce188da9951f93b8d10f6b"}, - {file = "opentelemetry_sdk-1.38.0.tar.gz", hash = "sha256:93df5d4d871ed09cb4272305be4d996236eedb232253e3ab864c8620f051cebe"}, -] - -[package.dependencies] -opentelemetry-api = "1.38.0" -opentelemetry-semantic-conventions = "0.59b0" -typing-extensions = ">=4.5.0" - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.59b0" -description = "OpenTelemetry Semantic Conventions" -optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "opentelemetry_semantic_conventions-0.59b0-py3-none-any.whl", hash = "sha256:35d3b8833ef97d614136e253c1da9342b4c3c083bbaf29ce31d572a1c3825eed"}, - {file = "opentelemetry_semantic_conventions-0.59b0.tar.gz", hash = "sha256:7a6db3f30d70202d5bf9fa4b69bc866ca6a30437287de6c510fb594878aed6b0"}, + {file = "opentelemetry_proto-1.33.1-py3-none-any.whl", hash = "sha256:243d285d9f29663fc7ea91a7171fcc1ccbbfff43b48df0774fd64a37d98eda70"}, + {file = "opentelemetry_proto-1.33.1.tar.gz", hash = "sha256:9627b0a5c90753bf3920c398908307063e4458b287bb890e5c1d6fa11ad50b68"}, ] [package.dependencies] -opentelemetry-api = "1.38.0" -typing-extensions = ">=4.5.0" +protobuf = ">=5.0,<6.0" [[package]] name = "orjson" -version = "3.11.4" +version = "3.10.18" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "orjson-3.11.4-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e3aa2118a3ece0d25489cbe48498de8a5d580e42e8d9979f65bf47900a15aba1"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a69ab657a4e6733133a3dca82768f2f8b884043714e8d2b9ba9f52b6efef5c44"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3740bffd9816fc0326ddc406098a3a8f387e42223f5f455f2a02a9f834ead80c"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65fd2f5730b1bf7f350c6dc896173d3460d235c4be007af73986d7cd9a2acd23"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fdc3ae730541086158d549c97852e2eea6820665d4faf0f41bf99df41bc11ea"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e10b4d65901da88845516ce9f7f9736f9638d19a1d483b3883dc0182e6e5edba"}, - {file = "orjson-3.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb6a03a678085f64b97f9d4a9ae69376ce91a3a9e9b56a82b1580d8e1d501aff"}, - {file = "orjson-3.11.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2c82e4f0b1c712477317434761fbc28b044c838b6b1240d895607441412371ac"}, - {file = "orjson-3.11.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d58c166a18f44cc9e2bad03a327dc2d1a3d2e85b847133cfbafd6bfc6719bd79"}, - {file = "orjson-3.11.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:94f206766bf1ea30e1382e4890f763bd1eefddc580e08fec1ccdc20ddd95c827"}, - {file = "orjson-3.11.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:41bf25fb39a34cf8edb4398818523277ee7096689db352036a9e8437f2f3ee6b"}, - {file = "orjson-3.11.4-cp310-cp310-win32.whl", hash = "sha256:fa9627eba4e82f99ca6d29bc967f09aba446ee2b5a1ea728949ede73d313f5d3"}, - {file = "orjson-3.11.4-cp310-cp310-win_amd64.whl", hash = "sha256:23ef7abc7fca96632d8174ac115e668c1e931b8fe4dde586e92a500bf1914dcc"}, - {file = "orjson-3.11.4-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5e59d23cd93ada23ec59a96f215139753fbfe3a4d989549bcb390f8c00370b39"}, - {file = "orjson-3.11.4-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:5c3aedecfc1beb988c27c79d52ebefab93b6c3921dbec361167e6559aba2d36d"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da9e5301f1c2caa2a9a4a303480d79c9ad73560b2e7761de742ab39fe59d9175"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8873812c164a90a79f65368f8f96817e59e35d0cc02786a5356f0e2abed78040"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5d7feb0741ebb15204e748f26c9638e6665a5fa93c37a2c73d64f1669b0ddc63"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01ee5487fefee21e6910da4c2ee9eef005bee568a0879834df86f888d2ffbdd9"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d40d46f348c0321df01507f92b95a377240c4ec31985225a6668f10e2676f9a"}, - {file = "orjson-3.11.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95713e5fc8af84d8edc75b785d2386f653b63d62b16d681687746734b4dfc0be"}, - {file = "orjson-3.11.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ad73ede24f9083614d6c4ca9a85fe70e33be7bf047ec586ee2363bc7418fe4d7"}, - {file = "orjson-3.11.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:842289889de515421f3f224ef9c1f1efb199a32d76d8d2ca2706fa8afe749549"}, - {file = "orjson-3.11.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3b2427ed5791619851c52a1261b45c233930977e7de8cf36de05636c708fa905"}, - {file = "orjson-3.11.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3c36e524af1d29982e9b190573677ea02781456b2e537d5840e4538a5ec41907"}, - {file = "orjson-3.11.4-cp311-cp311-win32.whl", hash = "sha256:87255b88756eab4a68ec61837ca754e5d10fa8bc47dc57f75cedfeaec358d54c"}, - {file = "orjson-3.11.4-cp311-cp311-win_amd64.whl", hash = "sha256:e2d5d5d798aba9a0e1fede8d853fa899ce2cb930ec0857365f700dffc2c7af6a"}, - {file = "orjson-3.11.4-cp311-cp311-win_arm64.whl", hash = "sha256:6bb6bb41b14c95d4f2702bce9975fda4516f1db48e500102fc4d8119032ff045"}, - {file = "orjson-3.11.4-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:d4371de39319d05d3f482f372720b841c841b52f5385bd99c61ed69d55d9ab50"}, - {file = "orjson-3.11.4-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:e41fd3b3cac850eaae78232f37325ed7d7436e11c471246b87b2cd294ec94853"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:600e0e9ca042878c7fdf189cf1b028fe2c1418cc9195f6cb9824eb6ed99cb938"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7bbf9b333f1568ef5da42bc96e18bf30fd7f8d54e9ae066d711056add508e415"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4806363144bb6e7297b8e95870e78d30a649fdc4e23fc84daa80c8ebd366ce44"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad355e8308493f527d41154e9053b86a5be892b3b359a5c6d5d95cda23601cb2"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8a7517482667fb9f0ff1b2f16fe5829296ed7a655d04d68cd9711a4d8a4e708"}, - {file = "orjson-3.11.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97eb5942c7395a171cbfecc4ef6701fc3c403e762194683772df4c54cfbb2210"}, - {file = "orjson-3.11.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:149d95d5e018bdd822e3f38c103b1a7c91f88d38a88aada5c4e9b3a73a244241"}, - {file = "orjson-3.11.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:624f3951181eb46fc47dea3d221554e98784c823e7069edb5dbd0dc826ac909b"}, - {file = "orjson-3.11.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:03bfa548cf35e3f8b3a96c4e8e41f753c686ff3d8e182ce275b1751deddab58c"}, - {file = "orjson-3.11.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:525021896afef44a68148f6ed8a8bf8375553d6066c7f48537657f64823565b9"}, - {file = "orjson-3.11.4-cp312-cp312-win32.whl", hash = "sha256:b58430396687ce0f7d9eeb3dd47761ca7d8fda8e9eb92b3077a7a353a75efefa"}, - {file = "orjson-3.11.4-cp312-cp312-win_amd64.whl", hash = "sha256:c6dbf422894e1e3c80a177133c0dda260f81428f9de16d61041949f6a2e5c140"}, - {file = "orjson-3.11.4-cp312-cp312-win_arm64.whl", hash = "sha256:d38d2bc06d6415852224fcc9c0bfa834c25431e466dc319f0edd56cca81aa96e"}, - {file = "orjson-3.11.4-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:2d6737d0e616a6e053c8b4acc9eccea6b6cce078533666f32d140e4f85002534"}, - {file = "orjson-3.11.4-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:afb14052690aa328cc118a8e09f07c651d301a72e44920b887c519b313d892ff"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38aa9e65c591febb1b0aed8da4d469eba239d434c218562df179885c94e1a3ad"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f2cf4dfaf9163b0728d061bebc1e08631875c51cd30bf47cb9e3293bfbd7dcd5"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:89216ff3dfdde0e4070932e126320a1752c9d9a758d6a32ec54b3b9334991a6a"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9daa26ca8e97fae0ce8aa5d80606ef8f7914e9b129b6b5df9104266f764ce436"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c8b2769dc31883c44a9cd126560327767f848eb95f99c36c9932f51090bfce9"}, - {file = "orjson-3.11.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1469d254b9884f984026bd9b0fa5bbab477a4bfe558bba6848086f6d43eb5e73"}, - {file = "orjson-3.11.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:68e44722541983614e37117209a194e8c3ad07838ccb3127d96863c95ec7f1e0"}, - {file = "orjson-3.11.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:8e7805fda9672c12be2f22ae124dcd7b03928d6c197544fe12174b86553f3196"}, - {file = "orjson-3.11.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:04b69c14615fb4434ab867bf6f38b2d649f6f300af30a6705397e895f7aec67a"}, - {file = "orjson-3.11.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:639c3735b8ae7f970066930e58cf0ed39a852d417c24acd4a25fc0b3da3c39a6"}, - {file = "orjson-3.11.4-cp313-cp313-win32.whl", hash = "sha256:6c13879c0d2964335491463302a6ca5ad98105fc5db3565499dcb80b1b4bd839"}, - {file = "orjson-3.11.4-cp313-cp313-win_amd64.whl", hash = "sha256:09bf242a4af98732db9f9a1ec57ca2604848e16f132e3f72edfd3c5c96de009a"}, - {file = "orjson-3.11.4-cp313-cp313-win_arm64.whl", hash = "sha256:a85f0adf63319d6c1ba06fb0dbf997fced64a01179cf17939a6caca662bf92de"}, - {file = "orjson-3.11.4-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:42d43a1f552be1a112af0b21c10a5f553983c2a0938d2bbb8ecd8bc9fb572803"}, - {file = "orjson-3.11.4-cp314-cp314-macosx_15_0_arm64.whl", hash = "sha256:26a20f3fbc6c7ff2cb8e89c4c5897762c9d88cf37330c6a117312365d6781d54"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e3f20be9048941c7ffa8fc523ccbd17f82e24df1549d1d1fe9317712d19938e"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aac364c758dc87a52e68e349924d7e4ded348dedff553889e4d9f22f74785316"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d5c54a6d76e3d741dcc3f2707f8eeb9ba2a791d3adbf18f900219b62942803b1"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f28485bdca8617b79d44627f5fb04336897041dfd9fa66d383a49d09d86798bc"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bfc2a484cad3585e4ba61985a6062a4c2ed5c7925db6d39f1fa267c9d166487f"}, - {file = "orjson-3.11.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e34dbd508cb91c54f9c9788923daca129fe5b55c5b4eebe713bf5ed3791280cf"}, - {file = "orjson-3.11.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b13c478fa413d4b4ee606ec8e11c3b2e52683a640b006bb586b3041c2ca5f606"}, - {file = "orjson-3.11.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:724ca721ecc8a831b319dcd72cfa370cc380db0bf94537f08f7edd0a7d4e1780"}, - {file = "orjson-3.11.4-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:977c393f2e44845ce1b540e19a786e9643221b3323dae190668a98672d43fb23"}, - {file = "orjson-3.11.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1e539e382cf46edec157ad66b0b0872a90d829a6b71f17cb633d6c160a223155"}, - {file = "orjson-3.11.4-cp314-cp314-win32.whl", hash = "sha256:d63076d625babab9db5e7836118bdfa086e60f37d8a174194ae720161eb12394"}, - {file = "orjson-3.11.4-cp314-cp314-win_amd64.whl", hash = "sha256:0a54d6635fa3aaa438ae32e8570b9f0de36f3f6562c308d2a2a452e8b0592db1"}, - {file = "orjson-3.11.4-cp314-cp314-win_arm64.whl", hash = "sha256:78b999999039db3cf58f6d230f524f04f75f129ba3d1ca2ed121f8657e575d3d"}, - {file = "orjson-3.11.4-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:405261b0a8c62bcbd8e2931c26fdc08714faf7025f45531541e2b29e544b545b"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:af02ff34059ee9199a3546f123a6ab4c86caf1708c79042caf0820dc290a6d4f"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b2eba969ea4203c177c7b38b36c69519e6067ee68c34dc37081fac74c796e10"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0baa0ea43cfa5b008a28d3c07705cf3ada40e5d347f0f44994a64b1b7b4b5350"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80fd082f5dcc0e94657c144f1b2a3a6479c44ad50be216cf0c244e567f5eae19"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e3704d35e47d5bee811fb1cbd8599f0b4009b14d451c4c57be5a7e25eb89a13"}, - {file = "orjson-3.11.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa447f2b5356779d914658519c874cf3b7629e99e63391ed519c28c8aea4919"}, - {file = "orjson-3.11.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bba5118143373a86f91dadb8df41d9457498226698ebdf8e11cbb54d5b0e802d"}, - {file = "orjson-3.11.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:622463ab81d19ef3e06868b576551587de8e4d518892d1afab71e0fbc1f9cffc"}, - {file = "orjson-3.11.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3e0a700c4b82144b72946b6629968df9762552ee1344bfdb767fecdd634fbd5a"}, - {file = "orjson-3.11.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6e18a5c15e764e5f3fc569b47872450b4bcea24f2a6354c0a0e95ad21045d5a9"}, - {file = "orjson-3.11.4-cp39-cp39-win32.whl", hash = "sha256:fb1c37c71cad991ef4d89c7a634b5ffb4447dbd7ae3ae13e8f5ee7f1775e7ab1"}, - {file = "orjson-3.11.4-cp39-cp39-win_amd64.whl", hash = "sha256:e2985ce8b8c42d00492d0ed79f2bd2b6460d00f2fa671dfde4bf2e02f49bf5c6"}, - {file = "orjson-3.11.4.tar.gz", hash = "sha256:39485f4ab4c9b30a3943cfe99e1a213c4776fb69e8abd68f66b83d5a0b0fdc6d"}, +files = [ + {file = "orjson-3.10.18-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a45e5d68066b408e4bc383b6e4ef05e717c65219a9e1390abc6155a520cac402"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be3b9b143e8b9db05368b13b04c84d37544ec85bb97237b3a923f076265ec89c"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9b0aa09745e2c9b3bf779b096fa71d1cc2d801a604ef6dd79c8b1bfef52b2f92"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53a245c104d2792e65c8d225158f2b8262749ffe64bc7755b00024757d957a13"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f9495ab2611b7f8a0a8a505bcb0f0cbdb5469caafe17b0e404c3c746f9900469"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73be1cbcebadeabdbc468f82b087df435843c809cd079a565fb16f0f3b23238f"}, + {file = "orjson-3.10.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe8936ee2679e38903df158037a2f1c108129dee218975122e37847fb1d4ac68"}, + {file = "orjson-3.10.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7115fcbc8525c74e4c2b608129bef740198e9a120ae46184dac7683191042056"}, + {file = "orjson-3.10.18-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:771474ad34c66bc4d1c01f645f150048030694ea5b2709b87d3bda273ffe505d"}, + {file = "orjson-3.10.18-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:7c14047dbbea52886dd87169f21939af5d55143dad22d10db6a7514f058156a8"}, + {file = "orjson-3.10.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:641481b73baec8db14fdf58f8967e52dc8bda1f2aba3aa5f5c1b07ed6df50b7f"}, + {file = "orjson-3.10.18-cp310-cp310-win32.whl", hash = "sha256:607eb3ae0909d47280c1fc657c4284c34b785bae371d007595633f4b1a2bbe06"}, + {file = "orjson-3.10.18-cp310-cp310-win_amd64.whl", hash = "sha256:8770432524ce0eca50b7efc2a9a5f486ee0113a5fbb4231526d414e6254eba92"}, + {file = "orjson-3.10.18-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e0a183ac3b8e40471e8d843105da6fbe7c070faab023be3b08188ee3f85719b8"}, + {file = "orjson-3.10.18-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:5ef7c164d9174362f85238d0cd4afdeeb89d9e523e4651add6a5d458d6f7d42d"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afd14c5d99cdc7bf93f22b12ec3b294931518aa019e2a147e8aa2f31fd3240f7"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b672502323b6cd133c4af6b79e3bea36bad2d16bca6c1f645903fce83909a7a"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:51f8c63be6e070ec894c629186b1c0fe798662b8687f3d9fdfa5e401c6bd7679"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f9478ade5313d724e0495d167083c6f3be0dd2f1c9c8a38db9a9e912cdaf947"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:187aefa562300a9d382b4b4eb9694806e5848b0cedf52037bb5c228c61bb66d4"}, + {file = "orjson-3.10.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9da552683bc9da222379c7a01779bddd0ad39dd699dd6300abaf43eadee38334"}, + {file = "orjson-3.10.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e450885f7b47a0231979d9c49b567ed1c4e9f69240804621be87c40bc9d3cf17"}, + {file = "orjson-3.10.18-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:5e3c9cc2ba324187cd06287ca24f65528f16dfc80add48dc99fa6c836bb3137e"}, + {file = "orjson-3.10.18-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:50ce016233ac4bfd843ac5471e232b865271d7d9d44cf9d33773bcd883ce442b"}, + {file = "orjson-3.10.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b3ceff74a8f7ffde0b2785ca749fc4e80e4315c0fd887561144059fb1c138aa7"}, + {file = "orjson-3.10.18-cp311-cp311-win32.whl", hash = "sha256:fdba703c722bd868c04702cac4cb8c6b8ff137af2623bc0ddb3b3e6a2c8996c1"}, + {file = "orjson-3.10.18-cp311-cp311-win_amd64.whl", hash = "sha256:c28082933c71ff4bc6ccc82a454a2bffcef6e1d7379756ca567c772e4fb3278a"}, + {file = "orjson-3.10.18-cp311-cp311-win_arm64.whl", hash = "sha256:a6c7c391beaedd3fa63206e5c2b7b554196f14debf1ec9deb54b5d279b1b46f5"}, + {file = "orjson-3.10.18-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:50c15557afb7f6d63bc6d6348e0337a880a04eaa9cd7c9d569bcb4e760a24753"}, + {file = "orjson-3.10.18-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:356b076f1662c9813d5fa56db7d63ccceef4c271b1fb3dd522aca291375fcf17"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:559eb40a70a7494cd5beab2d73657262a74a2c59aff2068fdba8f0424ec5b39d"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f3c29eb9a81e2fbc6fd7ddcfba3e101ba92eaff455b8d602bf7511088bbc0eae"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6612787e5b0756a171c7d81ba245ef63a3533a637c335aa7fcb8e665f4a0966f"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ac6bd7be0dcab5b702c9d43d25e70eb456dfd2e119d512447468f6405b4a69c"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9f72f100cee8dde70100406d5c1abba515a7df926d4ed81e20a9730c062fe9ad"}, + {file = "orjson-3.10.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9dca85398d6d093dd41dc0983cbf54ab8e6afd1c547b6b8a311643917fbf4e0c"}, + {file = "orjson-3.10.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22748de2a07fcc8781a70edb887abf801bb6142e6236123ff93d12d92db3d406"}, + {file = "orjson-3.10.18-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:3a83c9954a4107b9acd10291b7f12a6b29e35e8d43a414799906ea10e75438e6"}, + {file = "orjson-3.10.18-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:303565c67a6c7b1f194c94632a4a39918e067bd6176a48bec697393865ce4f06"}, + {file = "orjson-3.10.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:86314fdb5053a2f5a5d881f03fca0219bfdf832912aa88d18676a5175c6916b5"}, + {file = "orjson-3.10.18-cp312-cp312-win32.whl", hash = "sha256:187ec33bbec58c76dbd4066340067d9ece6e10067bb0cc074a21ae3300caa84e"}, + {file = "orjson-3.10.18-cp312-cp312-win_amd64.whl", hash = "sha256:f9f94cf6d3f9cd720d641f8399e390e7411487e493962213390d1ae45c7814fc"}, + {file = "orjson-3.10.18-cp312-cp312-win_arm64.whl", hash = "sha256:3d600be83fe4514944500fa8c2a0a77099025ec6482e8087d7659e891f23058a"}, + {file = "orjson-3.10.18-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:69c34b9441b863175cc6a01f2935de994025e773f814412030f269da4f7be147"}, + {file = "orjson-3.10.18-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:1ebeda919725f9dbdb269f59bc94f861afbe2a27dce5608cdba2d92772364d1c"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5adf5f4eed520a4959d29ea80192fa626ab9a20b2ea13f8f6dc58644f6927103"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7592bb48a214e18cd670974f289520f12b7aed1fa0b2e2616b8ed9e069e08595"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f872bef9f042734110642b7a11937440797ace8c87527de25e0c53558b579ccc"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0315317601149c244cb3ecef246ef5861a64824ccbcb8018d32c66a60a84ffbc"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e0da26957e77e9e55a6c2ce2e7182a36a6f6b180ab7189315cb0995ec362e049"}, + {file = "orjson-3.10.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb70d489bc79b7519e5803e2cc4c72343c9dc1154258adf2f8925d0b60da7c58"}, + {file = "orjson-3.10.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e9e86a6af31b92299b00736c89caf63816f70a4001e750bda179e15564d7a034"}, + {file = "orjson-3.10.18-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:c382a5c0b5931a5fc5405053d36c1ce3fd561694738626c77ae0b1dfc0242ca1"}, + {file = "orjson-3.10.18-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8e4b2ae732431127171b875cb2668f883e1234711d3c147ffd69fe5be51a8012"}, + {file = "orjson-3.10.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2d808e34ddb24fc29a4d4041dcfafbae13e129c93509b847b14432717d94b44f"}, + {file = "orjson-3.10.18-cp313-cp313-win32.whl", hash = "sha256:ad8eacbb5d904d5591f27dee4031e2c1db43d559edb8f91778efd642d70e6bea"}, + {file = "orjson-3.10.18-cp313-cp313-win_amd64.whl", hash = "sha256:aed411bcb68bf62e85588f2a7e03a6082cc42e5a2796e06e72a962d7c6310b52"}, + {file = "orjson-3.10.18-cp313-cp313-win_arm64.whl", hash = "sha256:f54c1385a0e6aba2f15a40d703b858bedad36ded0491e55d35d905b2c34a4cc3"}, + {file = "orjson-3.10.18-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c95fae14225edfd699454e84f61c3dd938df6629a00c6ce15e704f57b58433bb"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5232d85f177f98e0cefabb48b5e7f60cff6f3f0365f9c60631fecd73849b2a82"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2783e121cafedf0d85c148c248a20470018b4ffd34494a68e125e7d5857655d1"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e54ee3722caf3db09c91f442441e78f916046aa58d16b93af8a91500b7bbf273"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2daf7e5379b61380808c24f6fc182b7719301739e4271c3ec88f2984a2d61f89"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f39b371af3add20b25338f4b29a8d6e79a8c7ed0e9dd49e008228a065d07781"}, + {file = "orjson-3.10.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b819ed34c01d88c6bec290e6842966f8e9ff84b7694632e88341363440d4cc0"}, + {file = "orjson-3.10.18-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2f6c57debaef0b1aa13092822cbd3698a1fb0209a9ea013a969f4efa36bdea57"}, + {file = "orjson-3.10.18-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:755b6d61ffdb1ffa1e768330190132e21343757c9aa2308c67257cc81a1a6f5a"}, + {file = "orjson-3.10.18-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ce8d0a875a85b4c8579eab5ac535fb4b2a50937267482be402627ca7e7570ee3"}, + {file = "orjson-3.10.18-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57b5d0673cbd26781bebc2bf86f99dd19bd5a9cb55f71cc4f66419f6b50f3d77"}, + {file = "orjson-3.10.18-cp39-cp39-win32.whl", hash = "sha256:951775d8b49d1d16ca8818b1f20c4965cae9157e7b562a2ae34d3967b8f21c8e"}, + {file = "orjson-3.10.18-cp39-cp39-win_amd64.whl", hash = "sha256:fdd9d68f83f0bc4406610b1ac68bdcded8c5ee58605cc69e643a06f4d075f429"}, + {file = "orjson-3.10.18.tar.gz", hash = "sha256:e8da3947d92123eda795b68228cafe2724815621fe35e8e320a9e9593a4bcd53"}, ] [[package]] @@ -2711,111 +2410,29 @@ description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" groups = ["main", "dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] [[package]] -name = "pandas" -version = "2.3.3" -description = "Powerful data structures for data analysis, time series, and statistics" +name = "partd" +version = "1.4.2" +description = "Appendable key-value storage" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c"}, - {file = "pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a"}, - {file = "pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1"}, - {file = "pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838"}, - {file = "pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250"}, - {file = "pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4"}, - {file = "pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826"}, - {file = "pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523"}, - {file = "pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45"}, - {file = "pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66"}, - {file = "pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b"}, - {file = "pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791"}, - {file = "pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151"}, - {file = "pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c"}, - {file = "pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53"}, - {file = "pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35"}, - {file = "pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908"}, - {file = "pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89"}, - {file = "pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98"}, - {file = "pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084"}, - {file = "pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b"}, - {file = "pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713"}, - {file = "pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8"}, - {file = "pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d"}, - {file = "pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac"}, - {file = "pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c"}, - {file = "pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493"}, - {file = "pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee"}, - {file = "pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5"}, - {file = "pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21"}, - {file = "pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78"}, - {file = "pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110"}, - {file = "pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86"}, - {file = "pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc"}, - {file = "pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0"}, - {file = "pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593"}, - {file = "pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c"}, - {file = "pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b"}, - {file = "pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6"}, - {file = "pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3"}, - {file = "pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5"}, - {file = "pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec"}, - {file = "pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7"}, - {file = "pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450"}, - {file = "pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5"}, - {file = "pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788"}, - {file = "pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87"}, - {file = "pandas-2.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c503ba5216814e295f40711470446bc3fd00f0faea8a086cbc688808e26f92a2"}, - {file = "pandas-2.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a637c5cdfa04b6d6e2ecedcb81fc52ffb0fd78ce2ebccc9ea964df9f658de8c8"}, - {file = "pandas-2.3.3-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:854d00d556406bffe66a4c0802f334c9ad5a96b4f1f868adf036a21b11ef13ff"}, - {file = "pandas-2.3.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf1f8a81d04ca90e32a0aceb819d34dbd378a98bf923b6398b9a3ec0bf44de29"}, - {file = "pandas-2.3.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:23ebd657a4d38268c7dfbdf089fbc31ea709d82e4923c5ffd4fbd5747133ce73"}, - {file = "pandas-2.3.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5554c929ccc317d41a5e3d1234f3be588248e61f08a74dd17c9eabb535777dc9"}, - {file = "pandas-2.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:d3e28b3e83862ccf4d85ff19cf8c20b2ae7e503881711ff2d534dc8f761131aa"}, - {file = "pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b"}, +files = [ + {file = "partd-1.4.2-py3-none-any.whl", hash = "sha256:978e4ac767ec4ba5b86c6eaa52e5a2a3bc748a2ca839e8cc798f1cc6ce6efb0f"}, + {file = "partd-1.4.2.tar.gz", hash = "sha256:d022c33afbdc8405c226621b015e8067888173d85f7f5ecebb3cafed9a20f02c"}, ] [package.dependencies] -numpy = [ - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, -] -python-dateutil = ">=2.8.2" -pytz = ">=2020.1" -tzdata = ">=2022.7" +locket = "*" +toolz = "*" [package.extras] -all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] -aws = ["s3fs (>=2022.11.0)"] -clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] -compression = ["zstandard (>=0.19.0)"] -computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] -consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] -feather = ["pyarrow (>=10.0.1)"] -fss = ["fsspec (>=2022.11.0)"] -gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] -hdf5 = ["tables (>=3.8.0)"] -html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] -mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] -parquet = ["pyarrow (>=10.0.1)"] -performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] -plot = ["matplotlib (>=3.6.3)"] -postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] -pyarrow = ["pyarrow (>=10.0.1)"] -spss = ["pyreadstat (>=1.2.0)"] -sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] -test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.9.2)"] +complete = ["blosc", "numpy (>=1.20.0)", "pandas (>=1.3)", "pyzmq"] [[package]] name = "pexpect" @@ -2824,7 +2441,6 @@ description = "Pexpect allows easy control of interactive console applications." optional = false python-versions = "*" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, @@ -2840,7 +2456,6 @@ description = "Python version of Google's common library for parsing, formatting optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "phonenumbers-8.13.55-py2.py3-none-any.whl", hash = "sha256:25feaf46135f0fb1e61b69513dc97c477285ba98a69204bf5a8cf241a844a718"}, {file = "phonenumbers-8.13.55.tar.gz", hash = "sha256:57c989dda3eabab1b5a9e3d24438a39ebd032fa0172bf68bfd90ab70b3d5e08b"}, @@ -2853,7 +2468,6 @@ description = "PKCE Pyhton generator." optional = false python-versions = ">=3" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pkce-1.0.3-py3-none-any.whl", hash = "sha256:55927e24c7d403b2491ebe182b95d9dcb1807643243d47e3879fbda5aad4471d"}, {file = "pkce-1.0.3.tar.gz", hash = "sha256:9775fd76d8a743d39b87df38af1cd04a58c9b5a5242d5a6350ef343d06814ab6"}, @@ -2865,8 +2479,7 @@ version = "1.6.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +groups = ["main", "dev"] files = [ {file = "pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"}, {file = "pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3"}, @@ -2883,7 +2496,6 @@ description = "Integrate PostHog into any python application." optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "posthog-3.25.0-py2.py3-none-any.whl", hash = "sha256:85db78c13d1ecb11aed06fad53759c4e8fb3633442c2f3d0336bc0ce8a585d30"}, {file = "posthog-3.25.0.tar.gz", hash = "sha256:9168f3e7a0a5571b6b1065c41b3c171fbc68bfe72c3ac0bfd6e3d2fcdb7df2ca"}, @@ -2905,15 +2517,14 @@ test = ["anthropic", "coverage", "django", "flake8", "freezegun (==1.5.1)", "lan [[package]] name = "prompt-toolkit" -version = "3.0.52" +version = "3.0.51" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955"}, - {file = "prompt_toolkit-3.0.52.tar.gz", hash = "sha256:28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855"}, + {file = "prompt_toolkit-3.0.51-py3-none-any.whl", hash = "sha256:52742911fde84e2d423e2f9a4cf1de7d7ac4e51958f648d9540e0fb8db077b07"}, + {file = "prompt_toolkit-3.0.51.tar.gz", hash = "sha256:931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed"}, ] [package.dependencies] @@ -2921,156 +2532,209 @@ wcwidth = "*" [[package]] name = "propcache" -version = "0.4.1" +version = "0.3.1" description = "Accelerated property cache" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db"}, - {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8"}, - {file = "propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c"}, - {file = "propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb"}, - {file = "propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37"}, - {file = "propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f"}, - {file = "propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1"}, - {file = "propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6"}, - {file = "propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75"}, - {file = "propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8"}, - {file = "propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db"}, - {file = "propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66"}, - {file = "propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81"}, - {file = "propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e"}, - {file = "propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1"}, - {file = "propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717"}, - {file = "propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37"}, - {file = "propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144"}, - {file = "propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f"}, - {file = "propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153"}, - {file = "propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455"}, - {file = "propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85"}, - {file = "propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1"}, - {file = "propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3d233076ccf9e450c8b3bc6720af226b898ef5d051a2d145f7d765e6e9f9bcff"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:357f5bb5c377a82e105e44bd3d52ba22b616f7b9773714bff93573988ef0a5fb"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cbc3b6dfc728105b2a57c06791eb07a94229202ea75c59db644d7d496b698cac"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:182b51b421f0501952d938dc0b0eb45246a5b5153c50d42b495ad5fb7517c888"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b536b39c5199b96fc6245eb5fb796c497381d3942f169e44e8e392b29c9ebcc"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:db65d2af507bbfbdcedb254a11149f894169d90488dd3e7190f7cdcb2d6cd57a"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd2dbc472da1f772a4dae4fa24be938a6c544671a912e30529984dd80400cd88"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:daede9cd44e0f8bdd9e6cc9a607fc81feb80fae7a5fc6cecaff0e0bb32e42d00"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:71b749281b816793678ae7f3d0d84bd36e694953822eaad408d682efc5ca18e0"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:0002004213ee1f36cfb3f9a42b5066100c44276b9b72b4e1504cddd3d692e86e"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fe49d0a85038f36ba9e3ffafa1103e61170b28e95b16622e11be0a0ea07c6781"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:99d43339c83aaf4d32bda60928231848eee470c6bda8d02599cc4cebe872d183"}, - {file = "propcache-0.4.1-cp39-cp39-win32.whl", hash = "sha256:a129e76735bc792794d5177069691c3217898b9f5cee2b2661471e52ffe13f19"}, - {file = "propcache-0.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:948dab269721ae9a87fd16c514a0a2c2a1bdb23a9a61b969b0f9d9ee2968546f"}, - {file = "propcache-0.4.1-cp39-cp39-win_arm64.whl", hash = "sha256:5fd37c406dd6dc85aa743e214cef35dc54bbdd1419baac4f6ae5e5b1a2976938"}, - {file = "propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237"}, - {file = "propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d"}, +files = [ + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f27785888d2fdd918bc36de8b8739f2d6c791399552333721b58193f68ea3e98"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4e89cde74154c7b5957f87a355bb9c8ec929c167b59c83d90654ea36aeb6180"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:730178f476ef03d3d4d255f0c9fa186cb1d13fd33ffe89d39f2cda4da90ceb71"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967a8eec513dbe08330f10137eacb427b2ca52118769e82ebcfcab0fba92a649"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b9145c35cc87313b5fd480144f8078716007656093d23059e8993d3a8fa730f"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e64e948ab41411958670f1093c0a57acfdc3bee5cf5b935671bbd5313bcf229"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:319fa8765bfd6a265e5fa661547556da381e53274bc05094fc9ea50da51bfd46"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66d8ccbc902ad548312b96ed8d5d266d0d2c6d006fd0f66323e9d8f2dd49be7"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2d219b0dbabe75e15e581fc1ae796109b07c8ba7d25b9ae8d650da582bed01b0"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:cd6a55f65241c551eb53f8cf4d2f4af33512c39da5d9777694e9d9c60872f519"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9979643ffc69b799d50d3a7b72b5164a2e97e117009d7af6dfdd2ab906cb72cd"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4cf9e93a81979f1424f1a3d155213dc928f1069d697e4353edb8a5eba67c6259"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2fce1df66915909ff6c824bbb5eb403d2d15f98f1518e583074671a30fe0c21e"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4d0dfdd9a2ebc77b869a0b04423591ea8823f791293b527dc1bb896c1d6f1136"}, + {file = "propcache-0.3.1-cp310-cp310-win32.whl", hash = "sha256:1f6cc0ad7b4560e5637eb2c994e97b4fa41ba8226069c9277eb5ea7101845b42"}, + {file = "propcache-0.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:47ef24aa6511e388e9894ec16f0fbf3313a53ee68402bc428744a367ec55b833"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7f30241577d2fef2602113b70ef7231bf4c69a97e04693bde08ddab913ba0ce5"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:43593c6772aa12abc3af7784bff4a41ffa921608dd38b77cf1dfd7f5c4e71371"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a75801768bbe65499495660b777e018cbe90c7980f07f8aa57d6be79ea6f71da"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6f1324db48f001c2ca26a25fa25af60711e09b9aaf4b28488602776f4f9a744"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cdb0f3e1eb6dfc9965d19734d8f9c481b294b5274337a8cb5cb01b462dcb7e0"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eb34d90aac9bfbced9a58b266f8946cb5935869ff01b164573a7634d39fbcb5"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f35c7070eeec2cdaac6fd3fe245226ed2a6292d3ee8c938e5bb645b434c5f256"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b23c11c2c9e6d4e7300c92e022046ad09b91fd00e36e83c44483df4afa990073"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3e19ea4ea0bf46179f8a3652ac1426e6dcbaf577ce4b4f65be581e237340420d"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:bd39c92e4c8f6cbf5f08257d6360123af72af9f4da75a690bef50da77362d25f"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b0313e8b923b3814d1c4a524c93dfecea5f39fa95601f6a9b1ac96cd66f89ea0"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e861ad82892408487be144906a368ddbe2dc6297074ade2d892341b35c59844a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:61014615c1274df8da5991a1e5da85a3ccb00c2d4701ac6f3383afd3ca47ab0a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:71ebe3fe42656a2328ab08933d420df5f3ab121772eef78f2dc63624157f0ed9"}, + {file = "propcache-0.3.1-cp311-cp311-win32.whl", hash = "sha256:58aa11f4ca8b60113d4b8e32d37e7e78bd8af4d1a5b5cb4979ed856a45e62005"}, + {file = "propcache-0.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:9532ea0b26a401264b1365146c440a6d78269ed41f83f23818d4b79497aeabe7"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f78eb8422acc93d7b69964012ad7048764bb45a54ba7a39bb9e146c72ea29723"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:89498dd49c2f9a026ee057965cdf8192e5ae070ce7d7a7bd4b66a8e257d0c976"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09400e98545c998d57d10035ff623266927cb784d13dd2b31fd33b8a5316b85b"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8efd8c5adc5a2c9d3b952815ff8f7710cefdcaf5f2c36d26aff51aeca2f12f"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2fe5c910f6007e716a06d269608d307b4f36e7babee5f36533722660e8c4a70"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a0ab8cf8cdd2194f8ff979a43ab43049b1df0b37aa64ab7eca04ac14429baeb7"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:563f9d8c03ad645597b8d010ef4e9eab359faeb11a0a2ac9f7b4bc8c28ebef25"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb6e0faf8cb6b4beea5d6ed7b5a578254c6d7df54c36ccd3d8b3eb00d6770277"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1c5c7ab7f2bb3f573d1cb921993006ba2d39e8621019dffb1c5bc94cdbae81e8"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:050b571b2e96ec942898f8eb46ea4bfbb19bd5502424747e83badc2d4a99a44e"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e1c4d24b804b3a87e9350f79e2371a705a188d292fd310e663483af6ee6718ee"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e4fe2a6d5ce975c117a6bb1e8ccda772d1e7029c1cca1acd209f91d30fa72815"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:feccd282de1f6322f56f6845bf1207a537227812f0a9bf5571df52bb418d79d5"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ec314cde7314d2dd0510c6787326bbffcbdc317ecee6b7401ce218b3099075a7"}, + {file = "propcache-0.3.1-cp312-cp312-win32.whl", hash = "sha256:7d2d5a0028d920738372630870e7d9644ce437142197f8c827194fca404bf03b"}, + {file = "propcache-0.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:88c423efef9d7a59dae0614eaed718449c09a5ac79a5f224a8b9664d603f04a3"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1528ec4374617a7a753f90f20e2f551121bb558fcb35926f99e3c42367164b8"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc1915ec523b3b494933b5424980831b636fe483d7d543f7afb7b3bf00f0c10f"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a110205022d077da24e60b3df8bcee73971be9575dec5573dd17ae5d81751111"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d249609e547c04d190e820d0d4c8ca03ed4582bcf8e4e160a6969ddfb57b62e5"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ced33d827625d0a589e831126ccb4f5c29dfdf6766cac441d23995a65825dcb"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4114c4ada8f3181af20808bedb250da6bae56660e4b8dfd9cd95d4549c0962f7"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:975af16f406ce48f1333ec5e912fe11064605d5c5b3f6746969077cc3adeb120"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a34aa3a1abc50740be6ac0ab9d594e274f59960d3ad253cd318af76b996dd654"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9cec3239c85ed15bfaded997773fdad9fb5662b0a7cbc854a43f291eb183179e"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:05543250deac8e61084234d5fc54f8ebd254e8f2b39a16b1dce48904f45b744b"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:5cb5918253912e088edbf023788de539219718d3b10aef334476b62d2b53de53"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f3bbecd2f34d0e6d3c543fdb3b15d6b60dd69970c2b4c822379e5ec8f6f621d5"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aca63103895c7d960a5b9b044a83f544b233c95e0dcff114389d64d762017af7"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a0a9898fdb99bf11786265468571e628ba60af80dc3f6eb89a3545540c6b0ef"}, + {file = "propcache-0.3.1-cp313-cp313-win32.whl", hash = "sha256:3a02a28095b5e63128bcae98eb59025924f121f048a62393db682f049bf4ac24"}, + {file = "propcache-0.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:813fbb8b6aea2fc9659815e585e548fe706d6f663fa73dff59a1677d4595a037"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a444192f20f5ce8a5e52761a031b90f5ea6288b1eef42ad4c7e64fef33540b8f"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0fbe94666e62ebe36cd652f5fc012abfbc2342de99b523f8267a678e4dfdee3c"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f011f104db880f4e2166bcdcf7f58250f7a465bc6b068dc84c824a3d4a5c94dc"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e584b6d388aeb0001d6d5c2bd86b26304adde6d9bb9bfa9c4889805021b96de"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a17583515a04358b034e241f952f1715243482fc2c2945fd99a1b03a0bd77d6"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5aed8d8308215089c0734a2af4f2e95eeb360660184ad3912686c181e500b2e7"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d8e309ff9a0503ef70dc9a0ebd3e69cf7b3894c9ae2ae81fc10943c37762458"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b655032b202028a582d27aeedc2e813299f82cb232f969f87a4fde491a233f11"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f64d91b751df77931336b5ff7bafbe8845c5770b06630e27acd5dbb71e1931c"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:19a06db789a4bd896ee91ebc50d059e23b3639c25d58eb35be3ca1cbe967c3bf"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:bef100c88d8692864651b5f98e871fb090bd65c8a41a1cb0ff2322db39c96c27"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:87380fb1f3089d2a0b8b00f006ed12bd41bd858fabfa7330c954c70f50ed8757"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e474fc718e73ba5ec5180358aa07f6aded0ff5f2abe700e3115c37d75c947e18"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:17d1c688a443355234f3c031349da69444be052613483f3e4158eef751abcd8a"}, + {file = "propcache-0.3.1-cp313-cp313t-win32.whl", hash = "sha256:359e81a949a7619802eb601d66d37072b79b79c2505e6d3fd8b945538411400d"}, + {file = "propcache-0.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e7fb9a84c9abbf2b2683fa3e7b0d7da4d8ecf139a1c635732a8bda29c5214b0e"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ed5f6d2edbf349bd8d630e81f474d33d6ae5d07760c44d33cd808e2f5c8f4ae6"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668ddddc9f3075af019f784456267eb504cb77c2c4bd46cc8402d723b4d200bf"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0c86e7ceea56376216eba345aa1fc6a8a6b27ac236181f840d1d7e6a1ea9ba5c"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83be47aa4e35b87c106fc0c84c0fc069d3f9b9b06d3c494cd404ec6747544894"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c6ac6aa9fc7bc662f594ef380707494cb42c22786a558d95fcdedb9aa5d035"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64a956dff37080b352c1c40b2966b09defb014347043e740d420ca1eb7c9b908"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82de5da8c8893056603ac2d6a89eb8b4df49abf1a7c19d536984c8dd63f481d5"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3c3a203c375b08fd06a20da3cf7aac293b834b6f4f4db71190e8422750cca5"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b303b194c2e6f171cfddf8b8ba30baefccf03d36a4d9cab7fd0bb68ba476a3d7"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:916cd229b0150129d645ec51614d38129ee74c03293a9f3f17537be0029a9641"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a461959ead5b38e2581998700b26346b78cd98540b5524796c175722f18b0294"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:069e7212890b0bcf9b2be0a03afb0c2d5161d91e1bf51569a64f629acc7defbf"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ef2e4e91fb3945769e14ce82ed53007195e616a63aa43b40fb7ebaaf907c8d4c"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8638f99dca15b9dff328fb6273e09f03d1c50d9b6512f3b65a4154588a7595fe"}, + {file = "propcache-0.3.1-cp39-cp39-win32.whl", hash = "sha256:6f173bbfe976105aaa890b712d1759de339d8a7cef2fc0a1714cc1a1e1c47f64"}, + {file = "propcache-0.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:603f1fe4144420374f1a69b907494c3acbc867a581c2d49d4175b0de7cc64566"}, + {file = "propcache-0.3.1-py3-none-any.whl", hash = "sha256:9a8ecf38de50a7f518c21568c80f985e776397b902f1ce0b01f799aba1608b40"}, + {file = "propcache-0.3.1.tar.gz", hash = "sha256:40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf"}, ] [[package]] name = "protobuf" -version = "6.33.0" +version = "5.29.4" description = "" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "protobuf-6.33.0-cp310-abi3-win32.whl", hash = "sha256:d6101ded078042a8f17959eccd9236fb7a9ca20d3b0098bbcb91533a5680d035"}, - {file = "protobuf-6.33.0-cp310-abi3-win_amd64.whl", hash = "sha256:9a031d10f703f03768f2743a1c403af050b6ae1f3480e9c140f39c45f81b13ee"}, - {file = "protobuf-6.33.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:905b07a65f1a4b72412314082c7dbfae91a9e8b68a0cc1577515f8df58ecf455"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:e0697ece353e6239b90ee43a9231318302ad8353c70e6e45499fa52396debf90"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:e0a1715e4f27355afd9570f3ea369735afc853a6c3951a6afe1f80d8569ad298"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:35be49fd3f4fefa4e6e2aacc35e8b837d6703c37a2168a55ac21e9b1bc7559ef"}, - {file = "protobuf-6.33.0-cp39-cp39-win32.whl", hash = "sha256:cd33a8e38ea3e39df66e1bbc462b076d6e5ba3a4ebbde58219d777223a7873d3"}, - {file = "protobuf-6.33.0-cp39-cp39-win_amd64.whl", hash = "sha256:c963e86c3655af3a917962c9619e1a6b9670540351d7af9439d06064e3317cc9"}, - {file = "protobuf-6.33.0-py3-none-any.whl", hash = "sha256:25c9e1963c6734448ea2d308cfa610e692b801304ba0908d7bfa564ac5132995"}, - {file = "protobuf-6.33.0.tar.gz", hash = "sha256:140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954"}, + {file = "protobuf-5.29.4-cp310-abi3-win32.whl", hash = "sha256:13eb236f8eb9ec34e63fc8b1d6efd2777d062fa6aaa68268fb67cf77f6839ad7"}, + {file = "protobuf-5.29.4-cp310-abi3-win_amd64.whl", hash = "sha256:bcefcdf3976233f8a502d265eb65ea740c989bacc6c30a58290ed0e519eb4b8d"}, + {file = "protobuf-5.29.4-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:307ecba1d852ec237e9ba668e087326a67564ef83e45a0189a772ede9e854dd0"}, + {file = "protobuf-5.29.4-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:aec4962f9ea93c431d5714ed1be1c93f13e1a8618e70035ba2b0564d9e633f2e"}, + {file = "protobuf-5.29.4-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:d7d3f7d1d5a66ed4942d4fefb12ac4b14a29028b209d4bfb25c68ae172059922"}, + {file = "protobuf-5.29.4-cp38-cp38-win32.whl", hash = "sha256:1832f0515b62d12d8e6ffc078d7e9eb06969aa6dc13c13e1036e39d73bebc2de"}, + {file = "protobuf-5.29.4-cp38-cp38-win_amd64.whl", hash = "sha256:476cb7b14914c780605a8cf62e38c2a85f8caff2e28a6a0bad827ec7d6c85d68"}, + {file = "protobuf-5.29.4-cp39-cp39-win32.whl", hash = "sha256:fd32223020cb25a2cc100366f1dedc904e2d71d9322403224cdde5fdced0dabe"}, + {file = "protobuf-5.29.4-cp39-cp39-win_amd64.whl", hash = "sha256:678974e1e3a9b975b8bc2447fca458db5f93a2fb6b0c8db46b6675b5b5346812"}, + {file = "protobuf-5.29.4-py3-none-any.whl", hash = "sha256:3fde11b505e1597f71b875ef2fc52062b6a9740e5f7c8997ce878b6009145862"}, + {file = "protobuf-5.29.4.tar.gz", hash = "sha256:4f1dfcd7997b31ef8f53ec82781ff434a28bf71d9102ddde14d076adcfc78c99"}, +] + +[[package]] +name = "psycopg2-binary" +version = "2.9.10" +description = "psycopg2 - Python-PostgreSQL Database Adapter" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "psycopg2-binary-2.9.10.tar.gz", hash = "sha256:4b3df0e6990aa98acda57d983942eff13d824135fe2250e6522edaa782a06de2"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:0ea8e3d0ae83564f2fc554955d327fa081d065c8ca5cc6d2abb643e2c9c1200f"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:3e9c76f0ac6f92ecfc79516a8034a544926430f7b080ec5a0537bca389ee0906"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ad26b467a405c798aaa1458ba09d7e2b6e5f96b1ce0ac15d82fd9f95dc38a92"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:270934a475a0e4b6925b5f804e3809dd5f90f8613621d062848dd82f9cd62007"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:48b338f08d93e7be4ab2b5f1dbe69dc5e9ef07170fe1f86514422076d9c010d0"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f4152f8f76d2023aac16285576a9ecd2b11a9895373a1f10fd9db54b3ff06b4"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:32581b3020c72d7a421009ee1c6bf4a131ef5f0a968fab2e2de0c9d2bb4577f1"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:2ce3e21dc3437b1d960521eca599d57408a695a0d3c26797ea0f72e834c7ffe5"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e984839e75e0b60cfe75e351db53d6db750b00de45644c5d1f7ee5d1f34a1ce5"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3c4745a90b78e51d9ba06e2088a2fe0c693ae19cc8cb051ccda44e8df8a6eb53"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-win32.whl", hash = "sha256:e5720a5d25e3b99cd0dc5c8a440570469ff82659bb09431c1439b92caf184d3b"}, + {file = "psycopg2_binary-2.9.10-cp310-cp310-win_amd64.whl", hash = "sha256:3c18f74eb4386bf35e92ab2354a12c17e5eb4d9798e4c0ad3a00783eae7cd9f1"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:04392983d0bb89a8717772a193cfaac58871321e3ec69514e1c4e0d4957b5aff"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:1a6784f0ce3fec4edc64e985865c17778514325074adf5ad8f80636cd029ef7c"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5f86c56eeb91dc3135b3fd8a95dc7ae14c538a2f3ad77a19645cf55bab1799c"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b3d2491d4d78b6b14f76881905c7a8a8abcf974aad4a8a0b065273a0ed7a2cb"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2286791ececda3a723d1910441c793be44625d86d1a4e79942751197f4d30341"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:512d29bb12608891e349af6a0cccedce51677725a921c07dba6342beaf576f9a"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5a507320c58903967ef7384355a4da7ff3f28132d679aeb23572753cbf2ec10b"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:6d4fa1079cab9018f4d0bd2db307beaa612b0d13ba73b5c6304b9fe2fb441ff7"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:851485a42dbb0bdc1edcdabdb8557c09c9655dfa2ca0460ff210522e073e319e"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:35958ec9e46432d9076286dda67942ed6d968b9c3a6a2fd62b48939d1d78bf68"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-win32.whl", hash = "sha256:ecced182e935529727401b24d76634a357c71c9275b356efafd8a2a91ec07392"}, + {file = "psycopg2_binary-2.9.10-cp311-cp311-win_amd64.whl", hash = "sha256:ee0e8c683a7ff25d23b55b11161c2663d4b099770f6085ff0a20d4505778d6b4"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:880845dfe1f85d9d5f7c412efea7a08946a46894537e4e5d091732eb1d34d9a0"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:9440fa522a79356aaa482aa4ba500b65f28e5d0e63b801abf6aa152a29bd842a"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3923c1d9870c49a2d44f795df0c889a22380d36ef92440ff618ec315757e539"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b2c956c028ea5de47ff3a8d6b3cc3330ab45cf0b7c3da35a2d6ff8420896526"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f758ed67cab30b9a8d2833609513ce4d3bd027641673d4ebc9c067e4d208eec1"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cd9b4f2cfab88ed4a9106192de509464b75a906462fb846b936eabe45c2063e"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dc08420625b5a20b53551c50deae6e231e6371194fa0651dbe0fb206452ae1f"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d7cd730dfa7c36dbe8724426bf5612798734bff2d3c3857f36f2733f5bfc7c00"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:155e69561d54d02b3c3209545fb08938e27889ff5a10c19de8d23eb5a41be8a5"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3cc28a6fd5a4a26224007712e79b81dbaee2ffb90ff406256158ec4d7b52b47"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-win32.whl", hash = "sha256:ec8a77f521a17506a24a5f626cb2aee7850f9b69a0afe704586f63a464f3cd64"}, + {file = "psycopg2_binary-2.9.10-cp312-cp312-win_amd64.whl", hash = "sha256:18c5ee682b9c6dd3696dad6e54cc7ff3a1a9020df6a5c0f861ef8bfd338c3ca0"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:26540d4a9a4e2b096f1ff9cce51253d0504dca5a85872c7f7be23be5a53eb18d"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:e217ce4d37667df0bc1c397fdcd8de5e81018ef305aed9415c3b093faaeb10fb"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:245159e7ab20a71d989da00f280ca57da7641fa2cdcf71749c193cea540a74f7"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c4ded1a24b20021ebe677b7b08ad10bf09aac197d6943bfe6fec70ac4e4690d"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3abb691ff9e57d4a93355f60d4f4c1dd2d68326c968e7db17ea96df3c023ef73"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8608c078134f0b3cbd9f89b34bd60a943b23fd33cc5f065e8d5f840061bd0673"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:230eeae2d71594103cd5b93fd29d1ace6420d0b86f4778739cb1a5a32f607d1f"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bb89f0a835bcfc1d42ccd5f41f04870c1b936d8507c6df12b7737febc40f0909"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f0c2d907a1e102526dd2986df638343388b94c33860ff3bbe1384130828714b1"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f8157bed2f51db683f31306aa497311b560f2265998122abe1dce6428bd86567"}, + {file = "psycopg2_binary-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:27422aa5f11fbcd9b18da48373eb67081243662f9b46e6fd07c3eb46e4535142"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:eb09aa7f9cecb45027683bb55aebaaf45a0df8bf6de68801a6afdc7947bb09d4"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b73d6d7f0ccdad7bc43e6d34273f70d587ef62f824d7261c4ae9b8b1b6af90e8"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce5ab4bf46a211a8e924d307c1b1fcda82368586a19d0a24f8ae166f5c784864"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:056470c3dc57904bbf63d6f534988bafc4e970ffd50f6271fc4ee7daad9498a5"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73aa0e31fa4bb82578f3a6c74a73c273367727de397a7a0f07bd83cbea696baa"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8de718c0e1c4b982a54b41779667242bc630b2197948405b7bd8ce16bcecac92"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5c370b1e4975df846b0277b4deba86419ca77dbc25047f535b0bb03d1a544d44"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:ffe8ed017e4ed70f68b7b371d84b7d4a790368db9203dfc2d222febd3a9c8863"}, + {file = "psycopg2_binary-2.9.10-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:8aecc5e80c63f7459a1a2ab2c64df952051df196294d9f739933a9f6687e86b3"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:7a813c8bdbaaaab1f078014b9b0b13f5de757e2b5d9be6403639b298a04d218b"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d00924255d7fc916ef66e4bf22f354a940c67179ad3fd7067d7a0a9c84d2fbfc"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7559bce4b505762d737172556a4e6ea8a9998ecac1e39b5233465093e8cee697"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8b58f0a96e7a1e341fc894f62c1177a7c83febebb5ff9123b579418fdc8a481"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b269105e59ac96aba877c1707c600ae55711d9dcd3fc4b5012e4af68e30c648"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:79625966e176dc97ddabc142351e0409e28acf4660b88d1cf6adb876d20c490d"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:8aabf1c1a04584c168984ac678a668094d831f152859d06e055288fa515e4d30"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:19721ac03892001ee8fdd11507e6a2e01f4e37014def96379411ca99d78aeb2c"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7f5d859928e635fa3ce3477704acee0f667b3a3d3e4bb109f2b18d4005f38287"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-win32.whl", hash = "sha256:3216ccf953b3f267691c90c6fe742e45d890d8272326b4a8b20850a03d05b7b8"}, + {file = "psycopg2_binary-2.9.10-cp39-cp39-win_amd64.whl", hash = "sha256:30e34c4e97964805f715206c7b789d54a78b70f3ff19fbe590104b71c45600e5"}, ] [[package]] @@ -3080,7 +2744,6 @@ description = "Run a subprocess in a pseudo terminal" optional = false python-versions = "*" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -3093,7 +2756,6 @@ description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, @@ -3106,7 +2768,6 @@ description = "A collection of ASN.1-based protocols modules" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a"}, {file = "pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6"}, @@ -3117,15 +2778,15 @@ pyasn1 = ">=0.6.1,<0.7.0" [[package]] name = "pycparser" -version = "2.23" +version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "(python_version == \"3.11\" or python_version >= \"3.12\") and platform_python_implementation != \"PyPy\" and implementation_name != \"PyPy\"" +markers = "platform_python_implementation != \"PyPy\"" files = [ - {file = "pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934"}, - {file = "pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2"}, + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] [[package]] @@ -3135,7 +2796,6 @@ description = "Cryptographic library for Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pycryptodome-3.20.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f0e6d631bae3f231d3634f91ae4da7a960f7ff87f2865b2d2b831af1dfb04e9a"}, {file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:baee115a9ba6c5d2709a1e88ffe62b73ecc044852a925dcb67713a288c4ec70f"}, @@ -3173,177 +2833,137 @@ files = [ [[package]] name = "pydantic" -version = "2.12.4" +version = "2.11.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pydantic-2.12.4-py3-none-any.whl", hash = "sha256:92d3d202a745d46f9be6df459ac5a064fdaa3c1c4cd8adcfa332ccf3c05f871e"}, - {file = "pydantic-2.12.4.tar.gz", hash = "sha256:0f8cb9555000a4b5b617f66bfd2566264c4984b27589d3b845685983e8ea85ac"}, + {file = "pydantic-2.11.4-py3-none-any.whl", hash = "sha256:d9615eaa9ac5a063471da949c8fc16376a84afb5024688b3ff885693506764eb"}, + {file = "pydantic-2.11.4.tar.gz", hash = "sha256:32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.41.5" -typing-extensions = ">=4.14.1" -typing-inspection = ">=0.4.2" +pydantic-core = "2.33.2" +typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata"] +timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] [[package]] name = "pydantic-core" -version = "2.41.5" +version = "2.33.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146"}, - {file = "pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49"}, - {file = "pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba"}, - {file = "pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9"}, - {file = "pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6"}, - {file = "pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f"}, - {file = "pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7"}, - {file = "pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3"}, - {file = "pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9"}, - {file = "pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd"}, - {file = "pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a"}, - {file = "pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008"}, - {file = "pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf"}, - {file = "pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3"}, - {file = "pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460"}, - {file = "pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51"}, - {file = "pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e"}, -] - -[package.dependencies] -typing-extensions = ">=4.14.1" - -[[package]] -name = "pygments" -version = "2.19.2" -description = "Pygments is a syntax highlighting package written in Python." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, - {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2b3d326aaef0c0399d9afffeb6367d5e26ddc24d351dbc9c636840ac355dc5d8"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e5b2671f05ba48b94cb90ce55d8bdcaaedb8ba00cc5359f6810fc918713983d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0069c9acc3f3981b9ff4cdfaf088e98d83440a4c7ea1bc07460af3d4dc22e72d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d53b22f2032c42eaaf025f7c40c2e3b94568ae077a606f006d206a463bc69572"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0405262705a123b7ce9f0b92f123334d67b70fd1f20a9372b907ce1080c7ba02"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b25d91e288e2c4e0662b8038a28c6a07eaac3e196cfc4ff69de4ea3db992a1b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bdfe4b3789761f3bcb4b1ddf33355a71079858958e3a552f16d5af19768fef2"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:efec8db3266b76ef9607c2c4c419bdb06bf335ae433b80816089ea7585816f6a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:031c57d67ca86902726e0fae2214ce6770bbe2f710dc33063187a68744a5ecac"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:f8de619080e944347f5f20de29a975c2d815d9ddd8be9b9b7268e2e3ef68605a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73662edf539e72a9440129f231ed3757faab89630d291b784ca99237fb94db2b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win32.whl", hash = "sha256:0a39979dcbb70998b0e505fb1556a1d550a0781463ce84ebf915ba293ccb7e22"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0379a2b24882fef529ec3b4987cb5d003b9cda32256024e6fe1586ac45fc640"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a2b911a5b90e0374d03813674bf0a5fbbb7741570dcd4b4e85a2e48d17def29d"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fa6dfc3e4d1f734a34710f391ae822e0a8eb8559a85c6979e14e65ee6ba2954"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c54c939ee22dc8e2d545da79fc5381f1c020d6d3141d3bd747eab59164dc89fb"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53a57d2ed685940a504248187d5685e49eb5eef0f696853647bf37c418c538f7"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09fb9dd6571aacd023fe6aaca316bd01cf60ab27240d7eb39ebd66a3a15293b4"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0e6116757f7959a712db11f3e9c0a99ade00a5bbedae83cb801985aa154f071b"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d55ab81c57b8ff8548c3e4947f119551253f4e3787a7bbc0b6b3ca47498a9d3"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c20c462aa4434b33a2661701b861604913f912254e441ab8d78d30485736115a"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44857c3227d3fb5e753d5fe4a3420d6376fa594b07b621e220cd93703fe21782"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:eb9b459ca4df0e5c87deb59d37377461a538852765293f9e6ee834f0435a93b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9fcd347d2cc5c23b06de6d3b7b8275be558a0c90549495c699e379a80bf8379e"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win32.whl", hash = "sha256:83aa99b1285bc8f038941ddf598501a86f1536789740991d7d8756e34f1e74d9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:f481959862f57f29601ccced557cc2e817bce7533ab8e01a797a48b49c9692b3"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c4aa4e82353f65e548c476b37e64189783aa5384903bfea4f41580f255fddfa"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d946c8bf0d5c24bf4fe333af284c59a19358aa3ec18cb3dc4370080da1e8ad29"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87b31b6846e361ef83fedb187bb5b4372d0da3f7e28d85415efa92d6125d6e6d"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa9d91b338f2df0508606f7009fde642391425189bba6d8c653afd80fd6bb64e"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2058a32994f1fde4ca0480ab9d1e75a0e8c87c22b53a3ae66554f9af78f2fe8c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:0e03262ab796d986f978f79c943fc5f620381be7287148b8010b4097f79a39ec"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1a8695a8d00c73e50bff9dfda4d540b7dee29ff9b8053e38380426a85ef10052"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa754d1850735a0b0e03bcffd9d4b4343eb417e47196e4485d9cca326073a42c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a11c8d26a50bfab49002947d3d237abe4d9e4b5bdc8846a63537b6488e197808"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:87acbfcf8e90ca885206e98359d7dca4bcbb35abdc0ff66672a293e1d7a19101"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f92c15cd1e97d4b12acd1cc9004fa092578acfa57b67ad5e43a197175d01a64"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f26877a748dc4251cfcfda9dfb5f13fcb034f5308388066bcfe9031b63ae7d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac89aea9af8cd672fa7b510e7b8c33b0bba9a43186680550ccf23020f32d535"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:970919794d126ba8645f3837ab6046fb4e72bbc057b3709144066204c19a455d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3eb3fe62804e8f859c49ed20a8451342de53ed764150cb14ca71357c765dc2a6"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:3abcd9392a36025e3bd55f9bd38d908bd17962cc49bc6da8e7e96285336e2bca"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3a1c81334778f9e3af2f8aeb7a960736e5cab1dfebfb26aabca09afd2906c039"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2807668ba86cb38c6817ad9bc66215ab8584d1d304030ce4f0887336f28a5e27"}, + {file = "pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc"}, ] -[package.extras] -windows-terminal = ["colorama (>=0.4.6)"] +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pyjwt" @@ -3352,7 +2972,6 @@ description = "JSON Web Token implementation in Python" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb"}, {file = "pyjwt-2.10.1.tar.gz", hash = "sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953"}, @@ -3367,6 +2986,86 @@ dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pyte docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] +[[package]] +name = "pymongo" +version = "4.13.0" +description = "PyMongo - the Official MongoDB Python driver" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pymongo-4.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fe497c885b08600a022646f00f4d3303697c5289990acec250e2be2e1699ca23"}, + {file = "pymongo-4.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2d377bb0811e0a9676bacb21a4f87ef307f2e9a40a625660c113a9c0ae897e8c"}, + {file = "pymongo-4.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bac84ee40032bec4c089e92970893157fcd0ef40b81157404ceb4c1dac8ba72"}, + {file = "pymongo-4.13.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea47a64ed9918be0fa8a4a11146a80f546c09e0d65fd08e90a5c00366a59bdb0"}, + {file = "pymongo-4.13.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e90195cb5aee24a67a29adde54c1dae4d9744e17e4585bea3a83bfff96db46c"}, + {file = "pymongo-4.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4a7855933011026898ea0d4532fbd83cef63a76205c823a4ef5557d970df1f1"}, + {file = "pymongo-4.13.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f39791a88cd5ec1760f65e878af419747c6f94ce74f9293735cbba6025ff4d0d"}, + {file = "pymongo-4.13.0-cp310-cp310-win32.whl", hash = "sha256:209efd3b62cdbebd3cc7a76d5e37414ad08c9bfe8b28ae73695ade065d5b1277"}, + {file = "pymongo-4.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:51081910a91e3451db74b7265ee290c72220412aa8897d6dfe28f6e5d80b685b"}, + {file = "pymongo-4.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46c8bce9af98556110a950939f3eaa3f7648308d60df65feb783c780f8b9bfa9"}, + {file = "pymongo-4.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc9e412911f210d9b0eca42d25c22d3725809dda03dedbaf6f9ffa192d461905"}, + {file = "pymongo-4.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9288188101506a9d1aa3f70f65b7f5f499f8f7d5c23ec86a47551d756e32059"}, + {file = "pymongo-4.13.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5303e2074b85234e337ebe622d353ce38a35696cd47a7d970f84b545288aee01"}, + {file = "pymongo-4.13.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d842e11eb94f7074314ff1d97a05790539a1d74c3048ce50ea9f0da1f4f96b0a"}, + {file = "pymongo-4.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b63d9d8be87f4be11972c5a63d815974c298ada59a2e1d56ef5b6984d81c544a"}, + {file = "pymongo-4.13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7d740560710be0c514bc9d26f5dcbb3c85dbb6b450c4c3246d8136ca84055bd"}, + {file = "pymongo-4.13.0-cp311-cp311-win32.whl", hash = "sha256:936f7be9ed6919e3be7369b858d1c58ebaa4f3ef231cf4860779b8ba3b4fcd11"}, + {file = "pymongo-4.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:6a8f060f8ad139d1d45f75ef7aa0084bd7f714fc666f98ef00009efc7db34acd"}, + {file = "pymongo-4.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:007450b8c8d17b4e5b779ab6e1938983309eac26b5b8f0863c48effa4b151b07"}, + {file = "pymongo-4.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:899a5ea9cd32b1b0880015fdceaa36a41140a8c2ce8621626c52f7023724aed6"}, + {file = "pymongo-4.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0b26cd4e090161927b7a81741a3627a41b74265dfb41c6957bfb474504b4b42"}, + {file = "pymongo-4.13.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b54e19e0f6c8a7ad0c5074a8cbefb29c12267c784ceb9a1577a62bbc43150161"}, + {file = "pymongo-4.13.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6208b83e7d566935218c0837f3b74c7d2dda83804d5d843ce21a55f22255ab74"}, + {file = "pymongo-4.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f33b8c1405d05517dce06756f2800b37dd098216cae5903cd80ad4f0a9dad08"}, + {file = "pymongo-4.13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02f0e1af87280697a1a8304238b863d4eee98c8b97f554ee456c3041c0f3a021"}, + {file = "pymongo-4.13.0-cp312-cp312-win32.whl", hash = "sha256:5dea2f6b44697eda38a11ef754d2adfff5373c51b1ffda00b9fedc5facbd605f"}, + {file = "pymongo-4.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:c03e02129ad202d8e146480b398c4a3ea18266ee0754b6a4805de6baf4a6a8c7"}, + {file = "pymongo-4.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92f5e75ae265e798be1a8a40a29e2ab934e156f3827ca0e1c47e69d43f4dcb31"}, + {file = "pymongo-4.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3d631d879e934b46222f5092d8951cbb9fe83542649697c8d342ea7b5479f118"}, + {file = "pymongo-4.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be048fb78e165243272a8cdbeb40d53eace82424b95417ab3ab6ec8e9b00c59b"}, + {file = "pymongo-4.13.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d81d159bd23d8ac53a6e819cccee991cb9350ab2541dfaa25aeb2f712d23b0a5"}, + {file = "pymongo-4.13.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8af08ba2886f08d334bc7e5d5c662c60ea2f16e813a2c35106f399463fa11087"}, + {file = "pymongo-4.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b91f59137e46cd3ff17d5684a18e8006d65d0ee62eb1068b512262d1c2c5ae8"}, + {file = "pymongo-4.13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:61733c8f1ded90ab671a08033ee99b837073c73e505b3b3b633a55a0326e77f4"}, + {file = "pymongo-4.13.0-cp313-cp313-win32.whl", hash = "sha256:d10d3967e87c21869f084af5716d02626a17f6f9ccc9379fcbece5821c2a9fb4"}, + {file = "pymongo-4.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:a9fe172e93551ddfdb94b9ad34dccebc4b7b680dc1d131bc6bd661c4a5b2945c"}, + {file = "pymongo-4.13.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:5adc1349fd5c94d5dfbcbd1ad9858d1df61945a07f5905dcf17bb62eb4c81f93"}, + {file = "pymongo-4.13.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:8e11ea726ff8ddc8c8393895cd7e93a57e2558c27273d3712797895c53d25692"}, + {file = "pymongo-4.13.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c02160ab3a67eca393a2a2bb83dccddf4db2196d0d7c6a980a55157e4bdadc06"}, + {file = "pymongo-4.13.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fca24e4df05501420b2ce2207c03f21fcbdfac1e3f41e312e61b8f416c5b4963"}, + {file = "pymongo-4.13.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:50c503b7e809e54740704ec4c87a0f2ccdb910c3b1d36c07dbd2029b6eaa6a50"}, + {file = "pymongo-4.13.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66800de4f4487e7c437991b44bc1e717aadaf06e67451a760efe5cd81ce86575"}, + {file = "pymongo-4.13.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82c36928c1c26580ce4f2497a6875968636e87c77108ff253d76b1355181a405"}, + {file = "pymongo-4.13.0-cp313-cp313t-win32.whl", hash = "sha256:1397eac713b84946210ab556666cfdd787eee824e910fbbe661d147e110ec516"}, + {file = "pymongo-4.13.0-cp313-cp313t-win_amd64.whl", hash = "sha256:99a52cfbf31579cc63c926048cd0ada6f96c98c1c4c211356193e07418e6207c"}, + {file = "pymongo-4.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:267eff6a66da5cf5255b3bcd257984619e9c4d41a53578d4e1d827553a51cf40"}, + {file = "pymongo-4.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:81b46d9bc62128c3d968336f8635bcfce33d8e9e1fc6be6ebdfb98effaccb9c7"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd0c9322fdf1b9e8a5c99ca337bd9a99d972ba57c976e77b5017366ba26725e1"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d4b4942e5566a134fe34c03d7182a0b346e4a478defe625dc430dd5a178ad96e"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cef461fae88ac51cd6b3f81adf58171113c58c0e77c82c751b3bdcef516cfeb1"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb780d9d284ffdf7922edd4a6d7ba08e54a6680f85f64f91fa9cc2617dd488b7"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2afe49109b4d498d8e55ac9692915f2a3fce0bd31646bb7ed41f9ab3546ca19"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d9a1d7d49d0d364520894116133d017b6e0e2d5131eb31c8553552fa77a65085"}, + {file = "pymongo-4.13.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d684d9b385d97ab821d2ae74628c81a8bd12a4e5004a3ded0ec8c20381d62d0e"}, + {file = "pymongo-4.13.0-cp39-cp39-win32.whl", hash = "sha256:bd23119f9d0358aa1f78174d2eda88ca5c882a722e25ca31197402278acddc6e"}, + {file = "pymongo-4.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:e7d349066f4c229d638a30f1f53ec3a4aaf4a4fc568491bdf77e7415a96003fb"}, + {file = "pymongo-4.13.0.tar.gz", hash = "sha256:92a06e3709e3c7e50820d352d3d4e60015406bcba69808937dac2a6d22226fde"}, +] + +[package.dependencies] +dnspython = ">=1.16.0,<3.0.0" + +[package.extras] +aws = ["pymongo-auth-aws (>=1.1.0,<2.0.0)"] +docs = ["furo (==2024.8.6)", "readthedocs-sphinx-search (>=0.3,<1.0)", "sphinx (>=5.3,<9)", "sphinx-autobuild (>=2020.9.1)", "sphinx-rtd-theme (>=2,<4)", "sphinxcontrib-shellcheck (>=1,<2)"] +encryption = ["certifi ; os_name == \"nt\" or sys_platform == \"darwin\"", "pymongo-auth-aws (>=1.1.0,<2.0.0)", "pymongocrypt (>=1.13.0,<2.0.0)"] +gssapi = ["pykerberos ; os_name != \"nt\"", "winkerberos (>=0.5.0) ; os_name == \"nt\""] +ocsp = ["certifi ; os_name == \"nt\" or sys_platform == \"darwin\"", "cryptography (>=2.5)", "pyopenssl (>=17.2.0)", "requests (<3.0.0)", "service-identity (>=18.1.0)"] +snappy = ["python-snappy"] +test = ["pytest (>=8.2)", "pytest-asyncio (>=0.24.0)"] +zstd = ["zstandard"] + [[package]] name = "pyotp" version = "2.9.0" @@ -3374,7 +3073,6 @@ description = "Python One Time Password Library" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pyotp-2.9.0-py3-none-any.whl", hash = "sha256:81c2e5865b8ac55e825b0358e496e1d9387c811e85bb40e71a3b29b288963612"}, {file = "pyotp-2.9.0.tar.gz", hash = "sha256:346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63"}, @@ -3385,26 +3083,24 @@ test = ["coverage", "mypy", "ruff", "wheel"] [[package]] name = "pytest" -version = "8.4.2" +version = "7.4.4" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +python-versions = ">=3.7" +groups = ["main", "dev"] files = [ - {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, - {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, + {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, + {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, ] [package.dependencies] -colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} -iniconfig = ">=1" -packaging = ">=20" -pluggy = ">=1.5,<2" -pygments = ">=2.7.2" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" [package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -3413,7 +3109,6 @@ description = "Pytest support for asyncio" optional = false python-versions = ">=3.7" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b"}, {file = "pytest_asyncio-0.21.2.tar.gz", hash = "sha256:d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45"}, @@ -3428,15 +3123,14 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy [[package]] name = "pytest-mock" -version = "3.15.1" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false -python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +python-versions = ">=3.8" +groups = ["main"] files = [ - {file = "pytest_mock-3.15.1-py3-none-any.whl", hash = "sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d"}, - {file = "pytest_mock-3.15.1.tar.gz", hash = "sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] @@ -3447,15 +3141,14 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "pytest-xdist" -version = "3.8.0" +version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88"}, - {file = "pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1"}, + {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, + {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, ] [package.dependencies] @@ -3474,7 +3167,6 @@ description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" groups = ["main", "dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -3485,15 +3177,14 @@ six = ">=1.5" [[package]] name = "python-dotenv" -version = "1.2.1" +version = "1.1.0" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "python_dotenv-1.2.1-py3-none-any.whl", hash = "sha256:b81ee9561e9ca4004139c6cbba3a238c32b03e4894671e181b671e8cb8425d61"}, - {file = "python_dotenv-1.2.1.tar.gz", hash = "sha256:42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6"}, + {file = "python_dotenv-1.1.0-py3-none-any.whl", hash = "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d"}, + {file = "python_dotenv-1.1.0.tar.gz", hash = "sha256:41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5"}, ] [package.extras] @@ -3506,39 +3197,21 @@ description = "HTTP REST client, simplified for Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "python_http_client-3.3.7-py3-none-any.whl", hash = "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36"}, {file = "python_http_client-3.3.7.tar.gz", hash = "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0"}, ] -[[package]] -name = "python-jsonpath" -version = "2.0.1" -description = "JSONPath, JSON Pointer and JSON Patch for Python." -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "python_jsonpath-2.0.1-py3-none-any.whl", hash = "sha256:ebd518b7c883acc5b976518d76b6c96288405edec7d9ef838641869c1e1a5eb7"}, - {file = "python_jsonpath-2.0.1.tar.gz", hash = "sha256:32a84ebb2dc0ec1b42a6e165b0f9174aef8310bad29154ad9aee31ac37cca18f"}, -] - -[package.extras] -strict = ["iregexp-check (>=0.1.4)", "regex"] - [[package]] name = "python-multipart" -version = "0.0.20" +version = "0.0.18" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104"}, - {file = "python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"}, + {file = "python_multipart-0.0.18-py3-none-any.whl", hash = "sha256:efe91480f485f6a361427a541db4796f9e1591afc0fb8e7a4ba06bfbc6708996"}, + {file = "python_multipart-0.0.18.tar.gz", hash = "sha256:7a68db60c8bfb82e460637fa4750727b45af1d5e2ed215593f917f64694d34fe"}, ] [[package]] @@ -3547,8 +3220,7 @@ version = "2024.2" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" -groups = ["main", "dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" +groups = ["dev"] files = [ {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, @@ -3556,173 +3228,169 @@ files = [ [[package]] name = "pyyaml" -version = "6.0.3" +version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b"}, - {file = "pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b"}, - {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0"}, - {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69"}, - {file = "pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e"}, - {file = "pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c"}, - {file = "pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e"}, - {file = "pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d"}, - {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a"}, - {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4"}, - {file = "pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b"}, - {file = "pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf"}, - {file = "pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196"}, - {file = "pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc"}, - {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e"}, - {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea"}, - {file = "pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5"}, - {file = "pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b"}, - {file = "pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd"}, - {file = "pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8"}, - {file = "pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6"}, - {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6"}, - {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be"}, - {file = "pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26"}, - {file = "pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c"}, - {file = "pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb"}, - {file = "pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac"}, - {file = "pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5"}, - {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764"}, - {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35"}, - {file = "pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac"}, - {file = "pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3"}, - {file = "pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3"}, - {file = "pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c"}, - {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065"}, - {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65"}, - {file = "pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9"}, - {file = "pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b"}, - {file = "pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da"}, - {file = "pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a"}, - {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926"}, - {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7"}, - {file = "pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0"}, - {file = "pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007"}, - {file = "pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"}, +files = [ + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] [[package]] name = "rapidfuzz" -version = "3.14.3" +version = "3.13.0" description = "rapid fuzzy string matching" optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "rapidfuzz-3.14.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b9fcd4d751a4fffa17aed1dde41647923c72c74af02459ad1222e3b0022da3a1"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ad73afb688b36864a8d9b7344a9cf6da186c471e5790cbf541a635ee0f457f2"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5fb2d978a601820d2cfd111e2c221a9a7bfdf84b41a3ccbb96ceef29f2f1ac7"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1d83b8b712fa37e06d59f29a4b49e2e9e8635e908fbc21552fe4d1163db9d2a1"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-manylinux_2_31_armv7l.whl", hash = "sha256:dc8c07801df5206b81ed6bd6c35cb520cf9b6c64b9b0d19d699f8633dc942897"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c71ce6d4231e5ef2e33caa952bfe671cb9fd42e2afb11952df9fad41d5c821f9"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:0e38828d1381a0cceb8a4831212b2f673d46f5129a1897b0451c883eaf4a1747"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:da2a007434323904719158e50f3076a4dadb176ce43df28ed14610c773cc9825"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-win32.whl", hash = "sha256:fce3152f94afcfd12f3dd8cf51e48fa606e3cb56719bccebe3b401f43d0714f9"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-win_amd64.whl", hash = "sha256:37d3c653af15cd88592633e942f5407cb4c64184efab163c40fcebad05f25141"}, - {file = "rapidfuzz-3.14.3-cp310-cp310-win_arm64.whl", hash = "sha256:cc594bbcd3c62f647dfac66800f307beaee56b22aaba1c005e9c4c40ed733923"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dea2d113e260a5da0c4003e0a5e9fdf24a9dc2bb9eaa43abd030a1e46ce7837d"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e6c31a4aa68cfa75d7eede8b0ed24b9e458447db604c2db53f358be9843d81d3"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02821366d928e68ddcb567fed8723dad7ea3a979fada6283e6914d5858674850"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfe8df315ab4e6db4e1be72c5170f8e66021acde22cd2f9d04d2058a9fd8162e"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:769f31c60cd79420188fcdb3c823227fc4a6deb35cafec9d14045c7f6743acae"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:54fa03062124e73086dae66a3451c553c1e20a39c077fd704dc7154092c34c63"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:834d1e818005ed0d4ae38f6b87b86fad9b0a74085467ece0727d20e15077c094"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:948b00e8476a91f510dd1ec07272efc7d78c275d83b630455559671d4e33b678"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-win32.whl", hash = "sha256:43d0305c36f504232f18ea04e55f2059bb89f169d3119c4ea96a0e15b59e2a91"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-win_amd64.whl", hash = "sha256:ef6bf930b947bd0735c550683939a032090f1d688dfd8861d6b45307b96fd5c5"}, - {file = "rapidfuzz-3.14.3-cp311-cp311-win_arm64.whl", hash = "sha256:f3eb0ff3b75d6fdccd40b55e7414bb859a1cda77c52762c9c82b85569f5088e7"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:685c93ea961d135893b5984a5a9851637d23767feabe414ec974f43babbd8226"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fa7c8f26f009f8c673fbfb443792f0cf8cf50c4e18121ff1e285b5e08a94fbdb"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:57f878330c8d361b2ce76cebb8e3e1dc827293b6abf404e67d53260d27b5d941"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c5f545f454871e6af05753a0172849c82feaf0f521c5ca62ba09e1b382d6382"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:07aa0b5d8863e3151e05026a28e0d924accf0a7a3b605da978f0359bb804df43"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73b07566bc7e010e7b5bd490fb04bb312e820970180df6b5655e9e6224c137db"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:6de00eb84c71476af7d3110cf25d8fe7c792d7f5fa86764ef0b4ca97e78ca3ed"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d7843a1abf0091773a530636fdd2a49a41bcae22f9910b86b4f903e76ddc82dc"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-win32.whl", hash = "sha256:dea97ac3ca18cd3ba8f3d04b5c1fe4aa60e58e8d9b7793d3bd595fdb04128d7a"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-win_amd64.whl", hash = "sha256:b5100fd6bcee4d27f28f4e0a1c6b5127bc8ba7c2a9959cad9eab0bf4a7ab3329"}, - {file = "rapidfuzz-3.14.3-cp312-cp312-win_arm64.whl", hash = "sha256:4e49c9e992bc5fc873bd0fff7ef16a4405130ec42f2ce3d2b735ba5d3d4eb70f"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dbcb726064b12f356bf10fffdb6db4b6dce5390b23627c08652b3f6e49aa56ae"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1704fc70d214294e554a2421b473779bcdeef715881c5e927dc0f11e1692a0ff"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc65e72790ddfd310c2c8912b45106e3800fefe160b0c2ef4d6b6fec4e826457"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43e38c1305cffae8472572a0584d4ffc2f130865586a81038ca3965301f7c97c"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:e195a77d06c03c98b3fc06b8a28576ba824392ce40de8c708f96ce04849a052e"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1b7ef2f4b8583a744338a18f12c69693c194fb6777c0e9ada98cd4d9e8f09d10"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a2135b138bcdcb4c3742d417f215ac2d8c2b87bde15b0feede231ae95f09ec41"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:33a325ed0e8e1aa20c3e75f8ab057a7b248fdea7843c2a19ade0008906c14af0"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-win32.whl", hash = "sha256:8383b6d0d92f6cd008f3c9216535be215a064b2cc890398a678b56e6d280cb63"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-win_amd64.whl", hash = "sha256:e6b5e3036976f0fde888687d91be86d81f9ac5f7b02e218913c38285b756be6c"}, - {file = "rapidfuzz-3.14.3-cp313-cp313-win_arm64.whl", hash = "sha256:7ba009977601d8b0828bfac9a110b195b3e4e79b350dcfa48c11269a9f1918a0"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a0a28add871425c2fe94358c6300bbeb0bc2ed828ca003420ac6825408f5a424"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:010e12e2411a4854b0434f920e72b717c43f8ec48d57e7affe5c42ecfa05dd0e"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cfc3d57abd83c734d1714ec39c88a34dd69c85474918ebc21296f1e61eb5ca8"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89acb8cbb52904f763e5ac238083b9fc193bed8d1f03c80568b20e4cef43a519"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_31_armv7l.whl", hash = "sha256:7d9af908c2f371bfb9c985bd134e295038e3031e666e4b2ade1e7cb7f5af2f1a"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1f1925619627f8798f8c3a391d81071336942e5fe8467bc3c567f982e7ce2897"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:152555187360978119e98ce3e8263d70dd0c40c7541193fc302e9b7125cf8f58"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:52619d25a09546b8db078981ca88939d72caa6b8701edd8b22e16482a38e799f"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-win32.whl", hash = "sha256:489ce98a895c98cad284f0a47960c3e264c724cb4cfd47a1430fa091c0c25204"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-win_amd64.whl", hash = "sha256:656e52b054d5b5c2524169240e50cfa080b04b1c613c5f90a2465e84888d6f15"}, - {file = "rapidfuzz-3.14.3-cp313-cp313t-win_arm64.whl", hash = "sha256:c7e40c0a0af02ad6e57e89f62bef8604f55a04ecae90b0ceeda591bbf5923317"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:442125473b247227d3f2de807a11da6c08ccf536572d1be943f8e262bae7e4ea"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1ec0c8c0c3d4f97ced46b2e191e883f8c82dbbf6d5ebc1842366d7eff13cd5a6"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2dc37bc20272f388b8c3a4eba4febc6e77e50a8f450c472def4751e7678f55e4"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dee362e7e79bae940a5e2b3f6d09c6554db6a4e301cc68343886c08be99844f1"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:4b39921df948388a863f0e267edf2c36302983459b021ab928d4b801cbe6a421"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:beda6aa9bc44d1d81242e7b291b446be352d3451f8217fcb068fc2933927d53b"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:6a014ba09657abfcfeed64b7d09407acb29af436d7fc075b23a298a7e4a6b41c"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:32eeafa3abce138bb725550c0e228fc7eaeec7059aa8093d9cbbec2b58c2371a"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-win32.whl", hash = "sha256:adb44d996fc610c7da8c5048775b21db60dd63b1548f078e95858c05c86876a3"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-win_amd64.whl", hash = "sha256:f3d15d8527e2b293e38ce6e437631af0708df29eafd7c9fc48210854c94472f9"}, - {file = "rapidfuzz-3.14.3-cp314-cp314-win_arm64.whl", hash = "sha256:576e4b9012a67e0bf54fccb69a7b6c94d4e86a9540a62f1a5144977359133583"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:cec3c0da88562727dd5a5a364bd9efeb535400ff0bfb1443156dd139a1dd7b50"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d1fa009f8b1100e4880868137e7bf0501422898f7674f2adcd85d5a67f041296"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b86daa7419b5e8b180690efd1fdbac43ff19230803282521c5b5a9c83977655"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7bd1816db05d6c5ffb3a4df0a2b7b56fb8c81ef584d08e37058afa217da91b1"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:33da4bbaf44e9755b0ce192597f3bde7372fe2e381ab305f41b707a95ac57aa7"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3fecce764cf5a991ee2195a844196da840aba72029b2612f95ac68a8b74946bf"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ecd7453e02cf072258c3a6b8e930230d789d5d46cc849503729f9ce475d0e785"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ea188aa00e9bcae8c8411f006a5f2f06c4607a02f24eab0d8dc58566aa911f35"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-win32.whl", hash = "sha256:7ccbf68100c170e9a0581accbe9291850936711548c6688ce3bfb897b8c589ad"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-win_amd64.whl", hash = "sha256:9ec02e62ae765a318d6de38df609c57fc6dacc65c0ed1fd489036834fd8a620c"}, - {file = "rapidfuzz-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:e805e52322ae29aa945baf7168b6c898120fbc16d2b8f940b658a5e9e3999253"}, - {file = "rapidfuzz-3.14.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7cf174b52cb3ef5d49e45d0a1133b7e7d0ecf770ed01f97ae9962c5c91d97d23"}, - {file = "rapidfuzz-3.14.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:442cba39957a008dfc5bdef21a9c3f4379e30ffb4e41b8555dbaf4887eca9300"}, - {file = "rapidfuzz-3.14.3-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1faa0f8f76ba75fd7b142c984947c280ef6558b5067af2ae9b8729b0a0f99ede"}, - {file = "rapidfuzz-3.14.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1e6eefec45625c634926a9fd46c9e4f31118ac8f3156fff9494422cee45207e6"}, - {file = "rapidfuzz-3.14.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56fefb4382bb12250f164250240b9dd7772e41c5c8ae976fd598a32292449cc5"}, - {file = "rapidfuzz-3.14.3.tar.gz", hash = "sha256:2491937177868bc4b1e469087601d53f925e8d270ccc21e07404b4b5814b7b5f"}, +files = [ + {file = "rapidfuzz-3.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aafc42a1dc5e1beeba52cd83baa41372228d6d8266f6d803c16dbabbcc156255"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:85c9a131a44a95f9cac2eb6e65531db014e09d89c4f18c7b1fa54979cb9ff1f3"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7d7cec4242d30dd521ef91c0df872e14449d1dffc2a6990ede33943b0dae56c3"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e297c09972698c95649e89121e3550cee761ca3640cd005e24aaa2619175464e"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ef0f5f03f61b0e5a57b1df7beafd83df993fd5811a09871bad6038d08e526d0d"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d8cf5f7cd6e4d5eb272baf6a54e182b2c237548d048e2882258336533f3f02b7"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9256218ac8f1a957806ec2fb9a6ddfc6c32ea937c0429e88cf16362a20ed8602"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e1bdd2e6d0c5f9706ef7595773a81ca2b40f3b33fd7f9840b726fb00c6c4eb2e"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5280be8fd7e2bee5822e254fe0a5763aa0ad57054b85a32a3d9970e9b09bbcbf"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd742c03885db1fce798a1cd87a20f47f144ccf26d75d52feb6f2bae3d57af05"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:5435fcac94c9ecf0504bf88a8a60c55482c32e18e108d6079a0089c47f3f8cf6"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:93a755266856599be4ab6346273f192acde3102d7aa0735e2f48b456397a041f"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-win32.whl", hash = "sha256:3abe6a4e8eb4cfc4cda04dd650a2dc6d2934cbdeda5def7e6fd1c20f6e7d2a0b"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:e8ddb58961401da7d6f55f185512c0d6bd24f529a637078d41dd8ffa5a49c107"}, + {file = "rapidfuzz-3.13.0-cp310-cp310-win_arm64.whl", hash = "sha256:c523620d14ebd03a8d473c89e05fa1ae152821920c3ff78b839218ff69e19ca3"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d395a5cad0c09c7f096433e5fd4224d83b53298d53499945a9b0e5a971a84f3a"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b7b3eda607a019169f7187328a8d1648fb9a90265087f6903d7ee3a8eee01805"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98e0bfa602e1942d542de077baf15d658bd9d5dcfe9b762aff791724c1c38b70"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bef86df6d59667d9655905b02770a0c776d2853971c0773767d5ef8077acd624"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fedd316c165beed6307bf754dee54d3faca2c47e1f3bcbd67595001dfa11e969"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5158da7f2ec02a930be13bac53bb5903527c073c90ee37804090614cab83c29e"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b6f913ee4618ddb6d6f3e387b76e8ec2fc5efee313a128809fbd44e65c2bbb2"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d25fdbce6459ccbbbf23b4b044f56fbd1158b97ac50994eaae2a1c0baae78301"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:25343ccc589a4579fbde832e6a1e27258bfdd7f2eb0f28cb836d6694ab8591fc"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a9ad1f37894e3ffb76bbab76256e8a8b789657183870be11aa64e306bb5228fd"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5dc71ef23845bb6b62d194c39a97bb30ff171389c9812d83030c1199f319098c"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b7f4c65facdb94f44be759bbd9b6dda1fa54d0d6169cdf1a209a5ab97d311a75"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-win32.whl", hash = "sha256:b5104b62711565e0ff6deab2a8f5dbf1fbe333c5155abe26d2cfd6f1849b6c87"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:9093cdeb926deb32a4887ebe6910f57fbcdbc9fbfa52252c10b56ef2efb0289f"}, + {file = "rapidfuzz-3.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:f70f646751b6aa9d05be1fb40372f006cc89d6aad54e9d79ae97bd1f5fce5203"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a1a6a906ba62f2556372282b1ef37b26bca67e3d2ea957277cfcefc6275cca7"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2fd0975e015b05c79a97f38883a11236f5a24cca83aa992bd2558ceaa5652b26"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d4e13593d298c50c4f94ce453f757b4b398af3fa0fd2fde693c3e51195b7f69"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed6f416bda1c9133000009d84d9409823eb2358df0950231cc936e4bf784eb97"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1dc82b6ed01acb536b94a43996a94471a218f4d89f3fdd9185ab496de4b2a981"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9d824de871daa6e443b39ff495a884931970d567eb0dfa213d234337343835f"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d18228a2390375cf45726ce1af9d36ff3dc1f11dce9775eae1f1b13ac6ec50f"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f5fe634c9482ec5d4a6692afb8c45d370ae86755e5f57aa6c50bfe4ca2bdd87"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:694eb531889f71022b2be86f625a4209c4049e74be9ca836919b9e395d5e33b3"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11b47b40650e06147dee5e51a9c9ad73bb7b86968b6f7d30e503b9f8dd1292db"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:98b8107ff14f5af0243f27d236bcc6e1ef8e7e3b3c25df114e91e3a99572da73"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b836f486dba0aceb2551e838ff3f514a38ee72b015364f739e526d720fdb823a"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-win32.whl", hash = "sha256:4671ee300d1818d7bdfd8fa0608580d7778ba701817216f0c17fb29e6b972514"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e2065f68fb1d0bf65adc289c1bdc45ba7e464e406b319d67bb54441a1b9da9e"}, + {file = "rapidfuzz-3.13.0-cp312-cp312-win_arm64.whl", hash = "sha256:65cc97c2fc2c2fe23586599686f3b1ceeedeca8e598cfcc1b7e56dc8ca7e2aa7"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:09e908064d3684c541d312bd4c7b05acb99a2c764f6231bd507d4b4b65226c23"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:57c390336cb50d5d3bfb0cfe1467478a15733703af61f6dffb14b1cd312a6fae"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0da54aa8547b3c2c188db3d1c7eb4d1bb6dd80baa8cdaeaec3d1da3346ec9caa"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df8e8c21e67afb9d7fbe18f42c6111fe155e801ab103c81109a61312927cc611"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:461fd13250a2adf8e90ca9a0e1e166515cbcaa5e9c3b1f37545cbbeff9e77f6b"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c2b3dd5d206a12deca16870acc0d6e5036abeb70e3cad6549c294eff15591527"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1343d745fbf4688e412d8f398c6e6d6f269db99a54456873f232ba2e7aeb4939"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b1b065f370d54551dcc785c6f9eeb5bd517ae14c983d2784c064b3aa525896df"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:11b125d8edd67e767b2295eac6eb9afe0b1cdc82ea3d4b9257da4b8e06077798"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c33f9c841630b2bb7e69a3fb5c84a854075bb812c47620978bddc591f764da3d"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ae4574cb66cf1e85d32bb7e9ec45af5409c5b3970b7ceb8dea90168024127566"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e05752418b24bbd411841b256344c26f57da1148c5509e34ea39c7eb5099ab72"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-win32.whl", hash = "sha256:0e1d08cb884805a543f2de1f6744069495ef527e279e05370dd7c83416af83f8"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9a7c6232be5f809cd39da30ee5d24e6cadd919831e6020ec6c2391f4c3bc9264"}, + {file = "rapidfuzz-3.13.0-cp313-cp313-win_arm64.whl", hash = "sha256:3f32f15bacd1838c929b35c84b43618481e1b3d7a61b5ed2db0291b70ae88b53"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cc64da907114d7a18b5e589057e3acaf2fec723d31c49e13fedf043592a3f6a7"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4d9d7f84c8e992a8dbe5a3fdbea73d733da39bf464e62c912ac3ceba9c0cff93"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a79a2f07786a2070669b4b8e45bd96a01c788e7a3c218f531f3947878e0f956"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f338e71c45b69a482de8b11bf4a029993230760120c8c6e7c9b71760b6825a1"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:adb40ca8ddfcd4edd07b0713a860be32bdf632687f656963bcbce84cea04b8d8"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48719f7dcf62dfb181063b60ee2d0a39d327fa8ad81b05e3e510680c44e1c078"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9327a4577f65fc3fb712e79f78233815b8a1c94433d0c2c9f6bc5953018b3565"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:200030dfc0a1d5d6ac18e993c5097c870c97c41574e67f227300a1fb74457b1d"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cc269e74cad6043cb8a46d0ce580031ab642b5930562c2bb79aa7fbf9c858d26"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:e62779c6371bd2b21dbd1fdce89eaec2d93fd98179d36f61130b489f62294a92"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f4797f821dc5d7c2b6fc818b89f8a3f37bcc900dd9e4369e6ebf1e525efce5db"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d21f188f6fe4fbf422e647ae9d5a68671d00218e187f91859c963d0738ccd88c"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-win32.whl", hash = "sha256:45dd4628dd9c21acc5c97627dad0bb791764feea81436fb6e0a06eef4c6dceaa"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:624a108122039af89ddda1a2b7ab2a11abe60c1521956f142f5d11bcd42ef138"}, + {file = "rapidfuzz-3.13.0-cp39-cp39-win_arm64.whl", hash = "sha256:435071fd07a085ecbf4d28702a66fd2e676a03369ee497cc38bcb69a46bc77e2"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fe5790a36d33a5d0a6a1f802aa42ecae282bf29ac6f7506d8e12510847b82a45"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:cdb33ee9f8a8e4742c6b268fa6bd739024f34651a06b26913381b1413ebe7590"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c99b76b93f7b495eee7dcb0d6a38fb3ce91e72e99d9f78faa5664a881cb2b7d"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6af42f2ede8b596a6aaf6d49fdee3066ca578f4856b85ab5c1e2145de367a12d"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c0efa73afbc5b265aca0d8a467ae2a3f40d6854cbe1481cb442a62b7bf23c99"}, + {file = "rapidfuzz-3.13.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7ac21489de962a4e2fc1e8f0b0da4aa1adc6ab9512fd845563fecb4b4c52093a"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1ba007f4d35a45ee68656b2eb83b8715e11d0f90e5b9f02d615a8a321ff00c27"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d7a217310429b43be95b3b8ad7f8fc41aba341109dc91e978cd7c703f928c58f"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:558bf526bcd777de32b7885790a95a9548ffdcce68f704a81207be4a286c1095"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:202a87760f5145140d56153b193a797ae9338f7939eb16652dd7ff96f8faf64c"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cfcccc08f671646ccb1e413c773bb92e7bba789e3a1796fd49d23c12539fe2e4"}, + {file = "rapidfuzz-3.13.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:1f219f1e3c3194d7a7de222f54450ce12bc907862ff9a8962d83061c1f923c86"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ccbd0e7ea1a216315f63ffdc7cd09c55f57851afc8fe59a74184cb7316c0598b"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a50856f49a4016ef56edd10caabdaf3608993f9faf1e05c3c7f4beeac46bd12a"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fd05336db4d0b8348d7eaaf6fa3c517b11a56abaa5e89470ce1714e73e4aca7"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:573ad267eb9b3f6e9b04febce5de55d8538a87c56c64bf8fd2599a48dc9d8b77"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30fd1451f87ccb6c2f9d18f6caa483116bbb57b5a55d04d3ddbd7b86f5b14998"}, + {file = "rapidfuzz-3.13.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6dd36d4916cf57ddb05286ed40b09d034ca5d4bca85c17be0cb6a21290597d9"}, + {file = "rapidfuzz-3.13.0.tar.gz", hash = "sha256:d2eaf3839e52cbcc0accbe9817a67b4b0fcf70aaeb229cfddc1c28061f9ce5d8"}, ] [package.extras] @@ -3730,36 +3398,34 @@ all = ["numpy"] [[package]] name = "redis" -version = "6.4.0" +version = "6.1.0" description = "Python client for Redis database and key-value store" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "redis-6.4.0-py3-none-any.whl", hash = "sha256:f0544fa9604264e9464cdf4814e7d4830f74b165d52f2a330a760a88dd248b7f"}, - {file = "redis-6.4.0.tar.gz", hash = "sha256:b01bc7282b8444e28ec36b261df5375183bb47a07eb9c603f284e89cbc5ef010"}, + {file = "redis-6.1.0-py3-none-any.whl", hash = "sha256:3b72622f3d3a89df2a6041e82acd896b0e67d9f54e9bcd906d091d23ba5219f6"}, + {file = "redis-6.1.0.tar.gz", hash = "sha256:c928e267ad69d3069af28a9823a07726edf72c7e37764f43dc0123f37928c075"}, ] [package.dependencies] async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\""} [package.extras] -hiredis = ["hiredis (>=3.2.0)"] +hiredis = ["hiredis (>=3.0.0)"] jwt = ["pyjwt (>=2.9.0)"] ocsp = ["cryptography (>=36.0.1)", "pyopenssl (>=20.0.1)", "requests (>=2.31.0)"] [[package]] name = "referencing" -version = "0.37.0" +version = "0.36.2" description = "JSON Referencing + Python" optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231"}, - {file = "referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8"}, + {file = "referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0"}, + {file = "referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa"}, ] [package.dependencies] @@ -3769,146 +3435,123 @@ typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} [[package]] name = "regex" -version = "2025.11.3" +version = "2024.11.6" description = "Alternative regular expression module, to replace re." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "regex-2025.11.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2b441a4ae2c8049106e8b39973bfbddfb25a179dda2bdb99b0eeb60c40a6a3af"}, - {file = "regex-2025.11.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2fa2eed3f76677777345d2f81ee89f5de2f5745910e805f7af7386a920fa7313"}, - {file = "regex-2025.11.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d8b4a27eebd684319bdf473d39f1d79eed36bf2cd34bd4465cdb4618d82b3d56"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cf77eac15bd264986c4a2c63353212c095b40f3affb2bc6b4ef80c4776c1a28"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b7f9ee819f94c6abfa56ec7b1dbab586f41ebbdc0a57e6524bd5e7f487a878c7"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:838441333bc90b829406d4a03cb4b8bf7656231b84358628b0406d803931ef32"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfe6d3f0c9e3b7e8c0c694b24d25e677776f5ca26dce46fd6b0489f9c8339391"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2ab815eb8a96379a27c3b6157fcb127c8f59c36f043c1678110cea492868f1d5"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:728a9d2d173a65b62bdc380b7932dd8e74ed4295279a8fe1021204ce210803e7"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:509dc827f89c15c66a0c216331260d777dd6c81e9a4e4f830e662b0bb296c313"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:849202cd789e5f3cf5dcc7822c34b502181b4824a65ff20ce82da5524e45e8e9"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b6f78f98741dcc89607c16b1e9426ee46ce4bf31ac5e6b0d40e81c89f3481ea5"}, - {file = "regex-2025.11.3-cp310-cp310-win32.whl", hash = "sha256:149eb0bba95231fb4f6d37c8f760ec9fa6fabf65bab555e128dde5f2475193ec"}, - {file = "regex-2025.11.3-cp310-cp310-win_amd64.whl", hash = "sha256:ee3a83ce492074c35a74cc76cf8235d49e77b757193a5365ff86e3f2f93db9fd"}, - {file = "regex-2025.11.3-cp310-cp310-win_arm64.whl", hash = "sha256:38af559ad934a7b35147716655d4a2f79fcef2d695ddfe06a06ba40ae631fa7e"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eadade04221641516fa25139273505a1c19f9bf97589a05bc4cfcd8b4a618031"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:feff9e54ec0dd3833d659257f5c3f5322a12eee58ffa360984b716f8b92983f4"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3b30bc921d50365775c09a7ed446359e5c0179e9e2512beec4a60cbcef6ddd50"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f99be08cfead2020c7ca6e396c13543baea32343b7a9a5780c462e323bd8872f"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6dd329a1b61c0ee95ba95385fb0c07ea0d3fe1a21e1349fa2bec272636217118"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4c5238d32f3c5269d9e87be0cf096437b7622b6920f5eac4fd202468aaeb34d2"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10483eefbfb0adb18ee9474498c9a32fcf4e594fbca0543bb94c48bac6183e2e"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:78c2d02bb6e1da0720eedc0bad578049cad3f71050ef8cd065ecc87691bed2b0"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e6b49cd2aad93a1790ce9cffb18964f6d3a4b0b3dbdbd5de094b65296fce6e58"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:885b26aa3ee56433b630502dc3d36ba78d186a00cc535d3806e6bfd9ed3c70ab"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ddd76a9f58e6a00f8772e72cff8ebcff78e022be95edf018766707c730593e1e"}, - {file = "regex-2025.11.3-cp311-cp311-win32.whl", hash = "sha256:3e816cc9aac1cd3cc9a4ec4d860f06d40f994b5c7b4d03b93345f44e08cc68bf"}, - {file = "regex-2025.11.3-cp311-cp311-win_amd64.whl", hash = "sha256:087511f5c8b7dfbe3a03f5d5ad0c2a33861b1fc387f21f6f60825a44865a385a"}, - {file = "regex-2025.11.3-cp311-cp311-win_arm64.whl", hash = "sha256:1ff0d190c7f68ae7769cd0313fe45820ba07ffebfddfaa89cc1eb70827ba0ddc"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bc8ab71e2e31b16e40868a40a69007bc305e1109bd4658eb6cad007e0bf67c41"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:22b29dda7e1f7062a52359fca6e58e548e28c6686f205e780b02ad8ef710de36"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3a91e4a29938bc1a082cc28fdea44be420bf2bebe2665343029723892eb073e1"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08b884f4226602ad40c5d55f52bf91a9df30f513864e0054bad40c0e9cf1afb7"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3e0b11b2b2433d1c39c7c7a30e3f3d0aeeea44c2a8d0bae28f6b95f639927a69"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87eb52a81ef58c7ba4d45c3ca74e12aa4b4e77816f72ca25258a85b3ea96cb48"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a12ab1f5c29b4e93db518f5e3872116b7e9b1646c9f9f426f777b50d44a09e8c"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7521684c8c7c4f6e88e35ec89680ee1aa8358d3f09d27dfbdf62c446f5d4c695"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7fe6e5440584e94cc4b3f5f4d98a25e29ca12dccf8873679a635638349831b98"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8e026094aa12b43f4fd74576714e987803a315c76edb6b098b9809db5de58f74"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:435bbad13e57eb5606a68443af62bed3556de2f46deb9f7d4237bc2f1c9fb3a0"}, - {file = "regex-2025.11.3-cp312-cp312-win32.whl", hash = "sha256:3839967cf4dc4b985e1570fd8d91078f0c519f30491c60f9ac42a8db039be204"}, - {file = "regex-2025.11.3-cp312-cp312-win_amd64.whl", hash = "sha256:e721d1b46e25c481dc5ded6f4b3f66c897c58d2e8cfdf77bbced84339108b0b9"}, - {file = "regex-2025.11.3-cp312-cp312-win_arm64.whl", hash = "sha256:64350685ff08b1d3a6fff33f45a9ca183dc1d58bbfe4981604e70ec9801bbc26"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c1e448051717a334891f2b9a620fe36776ebf3dd8ec46a0b877c8ae69575feb4"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9b5aca4d5dfd7fbfbfbdaf44850fcc7709a01146a797536a8f84952e940cca76"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:04d2765516395cf7dda331a244a3282c0f5ae96075f728629287dfa6f76ba70a"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d9903ca42bfeec4cebedba8022a7c97ad2aab22e09573ce9976ba01b65e4361"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:639431bdc89d6429f6721625e8129413980ccd62e9d3f496be618a41d205f160"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f117efad42068f9715677c8523ed2be1518116d1c49b1dd17987716695181efe"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4aecb6f461316adf9f1f0f6a4a1a3d79e045f9b71ec76055a791affa3b285850"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3b3a5f320136873cc5561098dfab677eea139521cb9a9e8db98b7e64aef44cbc"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:75fa6f0056e7efb1f42a1c34e58be24072cb9e61a601340cc1196ae92326a4f9"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:dbe6095001465294f13f1adcd3311e50dd84e5a71525f20a10bd16689c61ce0b"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:454d9b4ae7881afbc25015b8627c16d88a597479b9dea82b8c6e7e2e07240dc7"}, - {file = "regex-2025.11.3-cp313-cp313-win32.whl", hash = "sha256:28ba4d69171fc6e9896337d4fc63a43660002b7da53fc15ac992abcf3410917c"}, - {file = "regex-2025.11.3-cp313-cp313-win_amd64.whl", hash = "sha256:bac4200befe50c670c405dc33af26dad5a3b6b255dd6c000d92fe4629f9ed6a5"}, - {file = "regex-2025.11.3-cp313-cp313-win_arm64.whl", hash = "sha256:2292cd5a90dab247f9abe892ac584cb24f0f54680c73fcb4a7493c66c2bf2467"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:1eb1ebf6822b756c723e09f5186473d93236c06c579d2cc0671a722d2ab14281"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1e00ec2970aab10dc5db34af535f21fcf32b4a31d99e34963419636e2f85ae39"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a4cb042b615245d5ff9b3794f56be4138b5adc35a4166014d31d1814744148c7"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44f264d4bf02f3176467d90b294d59bf1db9fe53c141ff772f27a8b456b2a9ed"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7be0277469bf3bd7a34a9c57c1b6a724532a0d235cd0dc4e7f4316f982c28b19"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0d31e08426ff4b5b650f68839f5af51a92a5b51abd8554a60c2fbc7c71f25d0b"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e43586ce5bd28f9f285a6e729466841368c4a0353f6fd08d4ce4630843d3648a"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0f9397d561a4c16829d4e6ff75202c1c08b68a3bdbfe29dbfcdb31c9830907c6"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:dd16e78eb18ffdb25ee33a0682d17912e8cc8a770e885aeee95020046128f1ce"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:ffcca5b9efe948ba0661e9df0fa50d2bc4b097c70b9810212d6b62f05d83b2dd"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c56b4d162ca2b43318ac671c65bd4d563e841a694ac70e1a976ac38fcf4ca1d2"}, - {file = "regex-2025.11.3-cp313-cp313t-win32.whl", hash = "sha256:9ddc42e68114e161e51e272f667d640f97e84a2b9ef14b7477c53aac20c2d59a"}, - {file = "regex-2025.11.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7a7c7fdf755032ffdd72c77e3d8096bdcb0eb92e89e17571a196f03d88b11b3c"}, - {file = "regex-2025.11.3-cp313-cp313t-win_arm64.whl", hash = "sha256:df9eb838c44f570283712e7cff14c16329a9f0fb19ca492d21d4b7528ee6821e"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9697a52e57576c83139d7c6f213d64485d3df5bf84807c35fa409e6c970801c6"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e18bc3f73bd41243c9b38a6d9f2366cd0e0137a9aebe2d8ff76c5b67d4c0a3f4"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:61a08bcb0ec14ff4e0ed2044aad948d0659604f824cbd50b55e30b0ec6f09c73"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9c30003b9347c24bcc210958c5d167b9e4f9be786cb380a7d32f14f9b84674f"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4e1e592789704459900728d88d41a46fe3969b82ab62945560a31732ffc19a6d"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6538241f45eb5a25aa575dbba1069ad786f68a4f2773a29a2bd3dd1f9de787be"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bce22519c989bb72a7e6b36a199384c53db7722fe669ba891da75907fe3587db"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:66d559b21d3640203ab9075797a55165d79017520685fb407b9234d72ab63c62"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:669dcfb2e38f9e8c69507bace46f4889e3abbfd9b0c29719202883c0a603598f"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:32f74f35ff0f25a5021373ac61442edcb150731fbaa28286bbc8bb1582c89d02"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e6c7a21dffba883234baefe91bc3388e629779582038f75d2a5be918e250f0ed"}, - {file = "regex-2025.11.3-cp314-cp314-win32.whl", hash = "sha256:795ea137b1d809eb6836b43748b12634291c0ed55ad50a7d72d21edf1cd565c4"}, - {file = "regex-2025.11.3-cp314-cp314-win_amd64.whl", hash = "sha256:9f95fbaa0ee1610ec0fc6b26668e9917a582ba80c52cc6d9ada15e30aa9ab9ad"}, - {file = "regex-2025.11.3-cp314-cp314-win_arm64.whl", hash = "sha256:dfec44d532be4c07088c3de2876130ff0fbeeacaa89a137decbbb5f665855a0f"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ba0d8a5d7f04f73ee7d01d974d47c5834f8a1b0224390e4fe7c12a3a92a78ecc"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:442d86cf1cfe4faabf97db7d901ef58347efd004934da045c745e7b5bd57ac49"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fd0a5e563c756de210bb964789b5abe4f114dacae9104a47e1a649b910361536"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf3490bcbb985a1ae97b2ce9ad1c0f06a852d5b19dde9b07bdf25bf224248c95"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3809988f0a8b8c9dcc0f92478d6501fac7200b9ec56aecf0ec21f4a2ec4b6009"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f4ff94e58e84aedb9c9fce66d4ef9f27a190285b451420f297c9a09f2b9abee9"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eb542fd347ce61e1321b0a6b945d5701528dca0cd9759c2e3bb8bd57e47964d"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d6c2d5919075a1f2e413c00b056ea0c2f065b3f5fe83c3d07d325ab92dce51d6"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3f8bf11a4827cc7ce5a53d4ef6cddd5ad25595d3c1435ef08f76825851343154"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:22c12d837298651e5550ac1d964e4ff57c3f56965fc1812c90c9fb2028eaf267"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:62ba394a3dda9ad41c7c780f60f6e4a70988741415ae96f6d1bf6c239cf01379"}, - {file = "regex-2025.11.3-cp314-cp314t-win32.whl", hash = "sha256:4bf146dca15cdd53224a1bf46d628bd7590e4a07fbb69e720d561aea43a32b38"}, - {file = "regex-2025.11.3-cp314-cp314t-win_amd64.whl", hash = "sha256:adad1a1bcf1c9e76346e091d22d23ac54ef28e1365117d99521631078dfec9de"}, - {file = "regex-2025.11.3-cp314-cp314t-win_arm64.whl", hash = "sha256:c54f768482cef41e219720013cd05933b6f971d9562544d691c68699bf2b6801"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:81519e25707fc076978c6143b81ea3dc853f176895af05bf7ec51effe818aeec"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3bf28b1873a8af8bbb58c26cc56ea6e534d80053b41fb511a35795b6de507e6a"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:856a25c73b697f2ce2a24e7968285579e62577a048526161a2c0f53090bea9f9"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a3d571bd95fade53c86c0517f859477ff3a93c3fde10c9e669086f038e0f207"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:732aea6de26051af97b94bc98ed86448821f839d058e5d259c72bf6d73ad0fc0"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:51c1c1847128238f54930edb8805b660305dca164645a9fd29243f5610beea34"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22dd622a402aad4558277305350699b2be14bc59f64d64ae1d928ce7d072dced"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f3b5a391c7597ffa96b41bd5cbd2ed0305f515fcbb367dfa72735679d5502364"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:cc4076a5b4f36d849fd709284b4a3b112326652f3b0466f04002a6c15a0c96c1"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a295ca2bba5c1c885826ce3125fa0b9f702a1be547d821c01d65f199e10c01e2"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b4774ff32f18e0504bfc4e59a3e71e18d83bc1e171a3c8ed75013958a03b2f14"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22e7d1cdfa88ef33a2ae6aa0d707f9255eb286ffbd90045f1088246833223aee"}, - {file = "regex-2025.11.3-cp39-cp39-win32.whl", hash = "sha256:74d04244852ff73b32eeede4f76f51c5bcf44bc3c207bc3e6cf1c5c45b890708"}, - {file = "regex-2025.11.3-cp39-cp39-win_amd64.whl", hash = "sha256:7a50cd39f73faa34ec18d6720ee25ef10c4c1839514186fcda658a06c06057a2"}, - {file = "regex-2025.11.3-cp39-cp39-win_arm64.whl", hash = "sha256:43b4fb020e779ca81c1b5255015fe2b82816c76ec982354534ad9ec09ad7c9e3"}, - {file = "regex-2025.11.3.tar.gz", hash = "sha256:1fedc720f9bb2494ce31a58a1631f9c82df6a09b49c19517ea5cc280b4541e01"}, +files = [ + {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"}, + {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"}, + {file = "regex-2024.11.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:164d8b7b3b4bcb2068b97428060b2a53be050085ef94eca7f240e7947f1b080e"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3660c82f209655a06b587d55e723f0b813d3a7db2e32e5e7dc64ac2a9e86fde"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d22326fcdef5e08c154280b71163ced384b428343ae16a5ab2b3354aed12436e"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1ac758ef6aebfc8943560194e9fd0fa18bcb34d89fd8bd2af18183afd8da3a2"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:997d6a487ff00807ba810e0f8332c18b4eb8d29463cfb7c820dc4b6e7562d0cf"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02a02d2bb04fec86ad61f3ea7f49c015a0681bf76abb9857f945d26159d2968c"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f02f93b92358ee3f78660e43b4b0091229260c5d5c408d17d60bf26b6c900e86"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:06eb1be98df10e81ebaded73fcd51989dcf534e3c753466e4b60c4697a003b67"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:040df6fe1a5504eb0f04f048e6d09cd7c7110fef851d7c567a6b6e09942feb7d"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabbfc59f2c6edba2a6622c647b716e34e8e3867e0ab975412c5c2f79b82da2"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8447d2d39b5abe381419319f942de20b7ecd60ce86f16a23b0698f22e1b70008"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:da8f5fc57d1933de22a9e23eec290a0d8a5927a5370d24bda9a6abe50683fe62"}, + {file = "regex-2024.11.6-cp310-cp310-win32.whl", hash = "sha256:b489578720afb782f6ccf2840920f3a32e31ba28a4b162e13900c3e6bd3f930e"}, + {file = "regex-2024.11.6-cp310-cp310-win_amd64.whl", hash = "sha256:5071b2093e793357c9d8b2929dfc13ac5f0a6c650559503bb81189d0a3814519"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45"}, + {file = "regex-2024.11.6-cp311-cp311-win32.whl", hash = "sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9"}, + {file = "regex-2024.11.6-cp311-cp311-win_amd64.whl", hash = "sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad"}, + {file = "regex-2024.11.6-cp312-cp312-win32.whl", hash = "sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54"}, + {file = "regex-2024.11.6-cp312-cp312-win_amd64.whl", hash = "sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d"}, + {file = "regex-2024.11.6-cp313-cp313-win32.whl", hash = "sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff"}, + {file = "regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3a51ccc315653ba012774efca4f23d1d2a8a8f278a6072e29c7147eee7da446b"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ad182d02e40de7459b73155deb8996bbd8e96852267879396fb274e8700190e3"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ba9b72e5643641b7d41fa1f6d5abda2c9a263ae835b917348fc3c928182ad467"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40291b1b89ca6ad8d3f2b82782cc33807f1406cf68c8d440861da6304d8ffbbd"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cdf58d0e516ee426a48f7b2c03a332a4114420716d55769ff7108c37a09951bf"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a36fdf2af13c2b14738f6e973aba563623cb77d753bbbd8d414d18bfaa3105dd"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1cee317bfc014c2419a76bcc87f071405e3966da434e03e13beb45f8aced1a6"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50153825ee016b91549962f970d6a4442fa106832e14c918acd1c8e479916c4f"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea1bfda2f7162605f6e8178223576856b3d791109f15ea99a9f95c16a7636fb5"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:df951c5f4a1b1910f1a99ff42c473ff60f8225baa1cdd3539fe2819d9543e9df"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:072623554418a9911446278f16ecb398fb3b540147a7828c06e2011fa531e773"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f654882311409afb1d780b940234208a252322c24a93b442ca714d119e68086c"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:89d75e7293d2b3e674db7d4d9b1bee7f8f3d1609428e293771d1a962617150cc"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:f65557897fc977a44ab205ea871b690adaef6b9da6afda4790a2484b04293a5f"}, + {file = "regex-2024.11.6-cp38-cp38-win32.whl", hash = "sha256:6f44ec28b1f858c98d3036ad5d7d0bfc568bdd7a74f9c24e25f41ef1ebfd81a4"}, + {file = "regex-2024.11.6-cp38-cp38-win_amd64.whl", hash = "sha256:bb8f74f2f10dbf13a0be8de623ba4f9491faf58c24064f32b65679b021ed0001"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5704e174f8ccab2026bd2f1ab6c510345ae8eac818b613d7d73e785f1310f839"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:220902c3c5cc6af55d4fe19ead504de80eb91f786dc102fbd74894b1551f095e"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e7e351589da0850c125f1600a4c4ba3c722efefe16b297de54300f08d734fbf"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5056b185ca113c88e18223183aa1a50e66507769c9640a6ff75859619d73957b"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e34b51b650b23ed3354b5a07aab37034d9f923db2a40519139af34f485f77d0"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5670bce7b200273eee1840ef307bfa07cda90b38ae56e9a6ebcc9f50da9c469b"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08986dce1339bc932923e7d1232ce9881499a0e02925f7402fb7c982515419ef"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93c0b12d3d3bc25af4ebbf38f9ee780a487e8bf6954c115b9f015822d3bb8e48"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:764e71f22ab3b305e7f4c21f1a97e1526a25ebdd22513e251cf376760213da13"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f056bf21105c2515c32372bbc057f43eb02aae2fda61052e2f7622c801f0b4e2"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:69ab78f848845569401469da20df3e081e6b5a11cb086de3eed1d48f5ed57c95"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:86fddba590aad9208e2fa8b43b4c098bb0ec74f15718bb6a704e3c63e2cef3e9"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:684d7a212682996d21ca12ef3c17353c021fe9de6049e19ac8481ec35574a70f"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a03e02f48cd1abbd9f3b7e3586d97c8f7a9721c436f51a5245b3b9483044480b"}, + {file = "regex-2024.11.6-cp39-cp39-win32.whl", hash = "sha256:41758407fc32d5c3c5de163888068cfee69cb4c2be844e7ac517a52770f9af57"}, + {file = "regex-2024.11.6-cp39-cp39-win_amd64.whl", hash = "sha256:b2837718570f95dd41675328e111345f9b7095d821bac435aac173ac80b19983"}, + {file = "regex-2024.11.6.tar.gz", hash = "sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519"}, ] [[package]] name = "requests" -version = "2.32.5" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, - {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] certifi = ">=2017.4.17" -charset_normalizer = ">=2,<4" +charset-normalizer = ">=2,<4" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<3" @@ -3918,31 +3561,49 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-file" -version = "3.0.1" +version = "2.1.0" description = "File transport adapter for Requests" optional = false python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "requests_file-3.0.1-py2.py3-none-any.whl", hash = "sha256:d0f5eb94353986d998f80ac63c7f146a307728be051d4d1cd390dbdb59c10fa2"}, - {file = "requests_file-3.0.1.tar.gz", hash = "sha256:f14243d7796c588f3521bd423c5dea2ee4cc730e54a3cac9574d78aca1272576"}, + {file = "requests_file-2.1.0-py2.py3-none-any.whl", hash = "sha256:cf270de5a4c5874e84599fc5778303d496c10ae5e870bfa378818f35d21bda5c"}, + {file = "requests_file-2.1.0.tar.gz", hash = "sha256:0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d9867356e658"}, ] [package.dependencies] requests = ">=1.0.0" +[[package]] +name = "requests-oauthlib" +version = "2.0.0" +description = "OAuthlib authentication support for Requests." +optional = false +python-versions = ">=3.4" +groups = ["main"] +files = [ + {file = "requests-oauthlib-2.0.0.tar.gz", hash = "sha256:b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9"}, + {file = "requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36"}, +] + +[package.dependencies] +oauthlib = ">=3.0.0" +requests = ">=2.0.0" + +[package.extras] +rsa = ["oauthlib[signedtoken] (>=3.0.0)"] + [[package]] name = "restrictedpython" -version = "8.1" +version = "8.0" description = "RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment." optional = false -python-versions = "<3.15,>=3.9" +python-versions = "<3.14,>=3.9" groups = ["main"] -markers = "python_version >= \"3.12\" and python_version < \"3.14\" or python_version == \"3.11\"" +markers = "python_version == \"3.11\"" files = [ - {file = "restrictedpython-8.1-py3-none-any.whl", hash = "sha256:4769449c6cdb10f2071649ba386902befff0eff2a8fd6217989fa7b16aeae926"}, - {file = "restrictedpython-8.1.tar.gz", hash = "sha256:4a69304aceacf6bee74bdf153c728221d4e3109b39acbfe00b3494927080d898"}, + {file = "RestrictedPython-8.0-py3-none-any.whl", hash = "sha256:ed3d894efd7d6cac0a5f13f75583b8458378d400d7dd4c083b59233eba85fe69"}, + {file = "restrictedpython-8.0.tar.gz", hash = "sha256:3af2312bc67e5fced887fb85b006c89861da72488128b155beea81eb6a0a9b24"}, ] [package.extras] @@ -3951,128 +3612,126 @@ test = ["pytest", "pytest-mock"] [[package]] name = "rpds-py" -version = "0.28.0" +version = "0.25.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "rpds_py-0.28.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:7b6013db815417eeb56b2d9d7324e64fcd4fa289caeee6e7a78b2e11fc9b438a"}, - {file = "rpds_py-0.28.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a4c6b05c685c0c03f80dabaeb73e74218c49deea965ca63f76a752807397207"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4794c6c3fbe8f9ac87699b131a1f26e7b4abcf6d828da46a3a52648c7930eba"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2e8456b6ee5527112ff2354dd9087b030e3429e43a74f480d4a5ca79d269fd85"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:beb880a9ca0a117415f241f66d56025c02037f7c4efc6fe59b5b8454f1eaa50d"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6897bebb118c44b38c9cb62a178e09f1593c949391b9a1a6fe777ccab5934ee7"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1b553dd06e875249fd43efd727785efb57a53180e0fde321468222eabbeaafa"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:f0b2044fdddeea5b05df832e50d2a06fe61023acb44d76978e1b060206a8a476"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05cf1e74900e8da73fa08cc76c74a03345e5a3e37691d07cfe2092d7d8e27b04"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:efd489fec7c311dae25e94fe7eeda4b3d06be71c68f2cf2e8ef990ffcd2cd7e8"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:ada7754a10faacd4f26067e62de52d6af93b6d9542f0df73c57b9771eb3ba9c4"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c2a34fd26588949e1e7977cfcbb17a9a42c948c100cab890c6d8d823f0586457"}, - {file = "rpds_py-0.28.0-cp310-cp310-win32.whl", hash = "sha256:f9174471d6920cbc5e82a7822de8dfd4dcea86eb828b04fc8c6519a77b0ee51e"}, - {file = "rpds_py-0.28.0-cp310-cp310-win_amd64.whl", hash = "sha256:6e32dd207e2c4f8475257a3540ab8a93eff997abfa0a3fdb287cae0d6cd874b8"}, - {file = "rpds_py-0.28.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:03065002fd2e287725d95fbc69688e0c6daf6c6314ba38bdbaa3895418e09296"}, - {file = "rpds_py-0.28.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:28ea02215f262b6d078daec0b45344c89e161eab9526b0d898221d96fdda5f27"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25dbade8fbf30bcc551cb352376c0ad64b067e4fc56f90e22ba70c3ce205988c"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c03002f54cc855860bfdc3442928ffdca9081e73b5b382ed0b9e8efe6e5e205"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b9699fa7990368b22032baf2b2dce1f634388e4ffc03dfefaaac79f4695edc95"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b9b06fe1a75e05e0713f06ea0c89ecb6452210fd60e2f1b6ddc1067b990e08d9"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac9f83e7b326a3f9ec3ef84cda98fb0a74c7159f33e692032233046e7fd15da2"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:0d3259ea9ad8743a75a43eb7819324cdab393263c91be86e2d1901ee65c314e0"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a7548b345f66f6695943b4ef6afe33ccd3f1b638bd9afd0f730dd255c249c9e"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9a40040aa388b037eb39416710fbcce9443498d2eaab0b9b45ae988b53f5c67"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8f60c7ea34e78c199acd0d3cda37a99be2c861dd2b8cf67399784f70c9f8e57d"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1571ae4292649100d743b26d5f9c63503bb1fedf538a8f29a98dce2d5ba6b4e6"}, - {file = "rpds_py-0.28.0-cp311-cp311-win32.whl", hash = "sha256:5cfa9af45e7c1140af7321fa0bef25b386ee9faa8928c80dc3a5360971a29e8c"}, - {file = "rpds_py-0.28.0-cp311-cp311-win_amd64.whl", hash = "sha256:dd8d86b5d29d1b74100982424ba53e56033dc47720a6de9ba0259cf81d7cecaa"}, - {file = "rpds_py-0.28.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e27d3a5709cc2b3e013bf93679a849213c79ae0573f9b894b284b55e729e120"}, - {file = "rpds_py-0.28.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6b4f28583a4f247ff60cd7bdda83db8c3f5b05a7a82ff20dd4b078571747708f"}, - {file = "rpds_py-0.28.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d678e91b610c29c4b3d52a2c148b641df2b4676ffe47c59f6388d58b99cdc424"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e819e0e37a44a78e1383bf1970076e2ccc4dc8c2bbaa2f9bd1dc987e9afff628"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5ee514e0f0523db5d3fb171f397c54875dbbd69760a414dccf9d4d7ad628b5bd"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3fa06d27fdcee47f07a39e02862da0100cb4982508f5ead53ec533cd5fe55e"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46959ef2e64f9e4a41fc89aa20dbca2b85531f9a72c21099a3360f35d10b0d5a"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8455933b4bcd6e83fde3fefc987a023389c4b13f9a58c8d23e4b3f6d13f78c84"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:ad50614a02c8c2962feebe6012b52f9802deec4263946cddea37aaf28dd25a66"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e5deca01b271492553fdb6c7fd974659dce736a15bae5dad7ab8b93555bceb28"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:735f8495a13159ce6a0d533f01e8674cec0c57038c920495f87dcb20b3ddb48a"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:961ca621ff10d198bbe6ba4957decca61aa2a0c56695384c1d6b79bf61436df5"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2374e16cc9131022e7d9a8f8d65d261d9ba55048c78f3b6e017971a4f5e6353c"}, - {file = "rpds_py-0.28.0-cp312-cp312-win32.whl", hash = "sha256:d15431e334fba488b081d47f30f091e5d03c18527c325386091f31718952fe08"}, - {file = "rpds_py-0.28.0-cp312-cp312-win_amd64.whl", hash = "sha256:a410542d61fc54710f750d3764380b53bf09e8c4edbf2f9141a82aa774a04f7c"}, - {file = "rpds_py-0.28.0-cp312-cp312-win_arm64.whl", hash = "sha256:1f0cfd1c69e2d14f8c892b893997fa9a60d890a0c8a603e88dca4955f26d1edd"}, - {file = "rpds_py-0.28.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e9e184408a0297086f880556b6168fa927d677716f83d3472ea333b42171ee3b"}, - {file = "rpds_py-0.28.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:edd267266a9b0448f33dc465a97cfc5d467594b600fe28e7fa2f36450e03053a"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85beb8b3f45e4e32f6802fb6cd6b17f615ef6c6a52f265371fb916fae02814aa"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d2412be8d00a1b895f8ad827cc2116455196e20ed994bb704bf138fe91a42724"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cf128350d384b777da0e68796afdcebc2e9f63f0e9f242217754e647f6d32491"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a2036d09b363aa36695d1cc1a97b36865597f4478470b0697b5ee9403f4fe399"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8e1e9be4fa6305a16be628959188e4fd5cd6f1b0e724d63c6d8b2a8adf74ea6"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0a403460c9dd91a7f23fc3188de6d8977f1d9603a351d5db6cf20aaea95b538d"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d7366b6553cdc805abcc512b849a519167db8f5e5c3472010cd1228b224265cb"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5b43c6a3726efd50f18d8120ec0551241c38785b68952d240c45ea553912ac41"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0cb7203c7bc69d7c1585ebb33a2e6074492d2fc21ad28a7b9d40457ac2a51ab7"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7a52a5169c664dfb495882adc75c304ae1d50df552fbd68e100fdc719dee4ff9"}, - {file = "rpds_py-0.28.0-cp313-cp313-win32.whl", hash = "sha256:2e42456917b6687215b3e606ab46aa6bca040c77af7df9a08a6dcfe8a4d10ca5"}, - {file = "rpds_py-0.28.0-cp313-cp313-win_amd64.whl", hash = "sha256:e0a0311caedc8069d68fc2bf4c9019b58a2d5ce3cd7cb656c845f1615b577e1e"}, - {file = "rpds_py-0.28.0-cp313-cp313-win_arm64.whl", hash = "sha256:04c1b207ab8b581108801528d59ad80aa83bb170b35b0ddffb29c20e411acdc1"}, - {file = "rpds_py-0.28.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f296ea3054e11fc58ad42e850e8b75c62d9a93a9f981ad04b2e5ae7d2186ff9c"}, - {file = "rpds_py-0.28.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5a7306c19b19005ad98468fcefeb7100b19c79fc23a5f24a12e06d91181193fa"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5d9b86aa501fed9862a443c5c3116f6ead8bc9296185f369277c42542bd646b"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e5bbc701eff140ba0e872691d573b3d5d30059ea26e5785acba9132d10c8c31d"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a5690671cd672a45aa8616d7374fdf334a1b9c04a0cac3c854b1136e92374fe"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9f1d92ecea4fa12f978a367c32a5375a1982834649cdb96539dcdc12e609ab1a"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d252db6b1a78d0a3928b6190156042d54c93660ce4d98290d7b16b5296fb7cc"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:d61b355c3275acb825f8777d6c4505f42b5007e357af500939d4a35b19177259"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:acbe5e8b1026c0c580d0321c8aae4b0a1e1676861d48d6e8c6586625055b606a"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8aa23b6f0fc59b85b4c7d89ba2965af274346f738e8d9fc2455763602e62fd5f"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:7b14b0c680286958817c22d76fcbca4800ddacef6f678f3a7c79a1fe7067fe37"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:bcf1d210dfee61a6c86551d67ee1031899c0fdbae88b2d44a569995d43797712"}, - {file = "rpds_py-0.28.0-cp313-cp313t-win32.whl", hash = "sha256:3aa4dc0fdab4a7029ac63959a3ccf4ed605fee048ba67ce89ca3168da34a1342"}, - {file = "rpds_py-0.28.0-cp313-cp313t-win_amd64.whl", hash = "sha256:7b7d9d83c942855e4fdcfa75d4f96f6b9e272d42fffcb72cd4bb2577db2e2907"}, - {file = "rpds_py-0.28.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:dcdcb890b3ada98a03f9f2bb108489cdc7580176cb73b4f2d789e9a1dac1d472"}, - {file = "rpds_py-0.28.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f274f56a926ba2dc02976ca5b11c32855cbd5925534e57cfe1fda64e04d1add2"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4fe0438ac4a29a520ea94c8c7f1754cdd8feb1bc490dfda1bfd990072363d527"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8a358a32dd3ae50e933347889b6af9a1bdf207ba5d1a3f34e1a38cd3540e6733"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e80848a71c78aa328fefaba9c244d588a342c8e03bda518447b624ea64d1ff56"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f586db2e209d54fe177e58e0bc4946bea5fb0102f150b1b2f13de03e1f0976f8"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ae8ee156d6b586e4292491e885d41483136ab994e719a13458055bec14cf370"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:a805e9b3973f7e27f7cab63a6b4f61d90f2e5557cff73b6e97cd5b8540276d3d"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5d3fd16b6dc89c73a4da0b4ac8b12a7ecc75b2864b95c9e5afed8003cb50a728"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:6796079e5d24fdaba6d49bda28e2c47347e89834678f2bc2c1b4fc1489c0fb01"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:76500820c2af232435cbe215e3324c75b950a027134e044423f59f5b9a1ba515"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bbdc5640900a7dbf9dd707fe6388972f5bbd883633eb68b76591044cfe346f7e"}, - {file = "rpds_py-0.28.0-cp314-cp314-win32.whl", hash = "sha256:adc8aa88486857d2b35d75f0640b949759f79dc105f50aa2c27816b2e0dd749f"}, - {file = "rpds_py-0.28.0-cp314-cp314-win_amd64.whl", hash = "sha256:66e6fa8e075b58946e76a78e69e1a124a21d9a48a5b4766d15ba5b06869d1fa1"}, - {file = "rpds_py-0.28.0-cp314-cp314-win_arm64.whl", hash = "sha256:a6fe887c2c5c59413353b7c0caff25d0e566623501ccfff88957fa438a69377d"}, - {file = "rpds_py-0.28.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7a69df082db13c7070f7b8b1f155fa9e687f1d6aefb7b0e3f7231653b79a067b"}, - {file = "rpds_py-0.28.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b1cde22f2c30ebb049a9e74c5374994157b9b70a16147d332f89c99c5960737a"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5338742f6ba7a51012ea470bd4dc600a8c713c0c72adaa0977a1b1f4327d6592"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e1460ebde1bcf6d496d80b191d854adedcc619f84ff17dc1c6d550f58c9efbba"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e3eb248f2feba84c692579257a043a7699e28a77d86c77b032c1d9fbb3f0219c"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3bbba5def70b16cd1c1d7255666aad3b290fbf8d0fe7f9f91abafb73611a91"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3114f4db69ac5a1f32e7e4d1cbbe7c8f9cf8217f78e6e002cedf2d54c2a548ed"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:4b0cb8a906b1a0196b863d460c0222fb8ad0f34041568da5620f9799b83ccf0b"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf681ac76a60b667106141e11a92a3330890257e6f559ca995fbb5265160b56e"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1e8ee6413cfc677ce8898d9cde18cc3a60fc2ba756b0dec5b71eb6eb21c49fa1"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b3072b16904d0b5572a15eb9d31c1954e0d3227a585fc1351aa9878729099d6c"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b670c30fd87a6aec281c3c9896d3bae4b205fd75d79d06dc87c2503717e46092"}, - {file = "rpds_py-0.28.0-cp314-cp314t-win32.whl", hash = "sha256:8014045a15b4d2b3476f0a287fcc93d4f823472d7d1308d47884ecac9e612be3"}, - {file = "rpds_py-0.28.0-cp314-cp314t-win_amd64.whl", hash = "sha256:7a4e59c90d9c27c561eb3160323634a9ff50b04e4f7820600a2beb0ac90db578"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f5e7101145427087e493b9c9b959da68d357c28c562792300dd21a095118ed16"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:31eb671150b9c62409a888850aaa8e6533635704fe2b78335f9aaf7ff81eec4d"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48b55c1f64482f7d8bd39942f376bfdf2f6aec637ee8c805b5041e14eeb771db"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24743a7b372e9a76171f6b69c01aedf927e8ac3e16c474d9fe20d552a8cb45c7"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:389c29045ee8bbb1627ea190b4976a310a295559eaf9f1464a1a6f2bf84dde78"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23690b5827e643150cf7b49569679ec13fe9a610a15949ed48b85eb7f98f34ec"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f0c9266c26580e7243ad0d72fc3e01d6b33866cfab5084a6da7576bcf1c4f72"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:4c6c4db5d73d179746951486df97fd25e92396be07fc29ee8ff9a8f5afbdfb27"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3b695a8fa799dd2cfdb4804b37096c5f6dba1ac7f48a7fbf6d0485bcd060316"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:6aa1bfce3f83baf00d9c5fcdbba93a3ab79958b4c7d7d1f55e7fe68c20e63912"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:7b0f9dceb221792b3ee6acb5438eb1f02b0cb2c247796a72b016dcc92c6de829"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:5d0145edba8abd3db0ab22b5300c99dc152f5c9021fab861be0f0544dc3cbc5f"}, - {file = "rpds_py-0.28.0.tar.gz", hash = "sha256:abd4df20485a0983e2ca334a216249b6186d6e3c1627e106651943dbdb791aea"}, +files = [ + {file = "rpds_py-0.25.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c146a24a8f0dc4a7846fb4640b88b3a68986585b8ce8397af15e66b7c5817439"}, + {file = "rpds_py-0.25.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:77814c7a4e1dc43fba73aeb4c1ef0fe37d901f3aa869a4823de5ea843a283fd0"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5afbff2822016db3c696cb0c1432e6b1f0e34aa9280bc5184dc216812a24e70d"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ffae52cd76837a5c16409359d236b1fced79e42e0792e8adf375095a5e855368"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddf9426b740a7047b2b0dddcba775211542e8053ce1e509a1759b665fe573508"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cad834f1a8f51eb037c3c4dc72c884c9e1e0644d900e2d45aa76450e4aa6282"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c46bd76986e05689376d28fdc2b97d899576ce3e3aaa5a5f80f67a8300b26eb3"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f3353a2d7eb7d5e0af8a7ca9fc85a34ba12619119bcdee6b8a28a6373cda65ce"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdc648d4e81eef5ac4bb35d731562dffc28358948410f3274d123320e125d613"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:098d446d76d26e394b440d73921b49c1c90274d46ccbaadf346b1b78f9fdd4b1"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c624c82e645f6b5465d08cdc802fb0cd53aa1478782fb2992b9e09f2c9426865"}, + {file = "rpds_py-0.25.0-cp310-cp310-win32.whl", hash = "sha256:9d0041bd9e2d2ef803b32d84a0c8115d178132da5691346465953a2a966ba8ca"}, + {file = "rpds_py-0.25.0-cp310-cp310-win_amd64.whl", hash = "sha256:d8b41195a6b03280ab00749a438fbce761e7acfd5381051a570239d752376f27"}, + {file = "rpds_py-0.25.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6587ece9f205097c62d0e3d3cb7c06991eb0083ab6a9cf48951ec49c2ab7183c"}, + {file = "rpds_py-0.25.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b0a5651e350997cebcdc23016dca26c4d1993d29015a535284da3159796e30b6"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3752a015db89ea3e9c04d5e185549be4aa29c1882150e094c614c0de8e788feb"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a05b199c11d2f39c72de8c30668734b5d20974ad44b65324ea3e647a211f135d"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2f91902fc0c95dd1fa6b30ebd2af83ace91e592f7fd6340a375588a9d4b9341b"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98c729193e7abe498565266933c125780fb646e977e94289cadbb36e4eeeb370"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36a7564deaac3f372e8b8b701eb982ea3113516e8e08cd87e3dc6ccf29bad14b"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6b0c0f671a53c129ea48f9481e95532579cc489ab5a0ffe750c9020787181c48"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d21408eaa157063f56e58ca50da27cad67c4395a85fb44cc7a31253ea4e58918"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a413674eb2bd2ecb2b93fcc928871b19f7220ee04bca4af3375c50a2b32b5a50"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:94f89161a3e358db33310a8a064852a6eb119ed1aa1a3dba927b4e5140e65d00"}, + {file = "rpds_py-0.25.0-cp311-cp311-win32.whl", hash = "sha256:540cd89d256119845b7f8f56c4bb80cad280cab92d9ca473be49ea13e678fd44"}, + {file = "rpds_py-0.25.0-cp311-cp311-win_amd64.whl", hash = "sha256:2649ff19291928243f90c86e4dc9cd86c8c4c6a73c3693ba2e23bc2fbcd8338c"}, + {file = "rpds_py-0.25.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:89260601d497fa5957c3e46f10b16cfa2a4808ad4dd46cddc0b997461923a7d9"}, + {file = "rpds_py-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:637ec39f97e342a3f76af739eda96800549d92f3aa27a2170b6dcbdffd49f480"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bd08c82336412a39a598e5baccab2ee2d7bd54e9115c8b64f2febb45da5c368"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:837fd066f974e5b98c69ac83ec594b79a2724a39a92a157b8651615e5032e530"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:653a066d2a4a332d4f8a11813e8124b643fa7b835b78468087a9898140469eee"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91a51499be506022b9f09facfc42f0c3a1c45969c0fc8f0bbebc8ff23ab9e531"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb91471640390a82744b164f8a0be4d7c89d173b1170713f9639c6bad61e9e64"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28bd2969445acc2d6801a22f97a43134ae3cb18e7495d668bfaa8d82b8526cdc"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f933b35fa563f047896a70b69414dfb3952831817e4c4b3a6faa96737627f363"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:80b37b37525492250adc7cbca20ae7084f86eb3eb62414b624d2a400370853b1"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:864573b6440b770db5a8693547a8728d7fd32580d4903010a8eee0bb5b03b130"}, + {file = "rpds_py-0.25.0-cp312-cp312-win32.whl", hash = "sha256:ad4a896896346adab86d52b31163c39d49e4e94c829494b96cc064bff82c5851"}, + {file = "rpds_py-0.25.0-cp312-cp312-win_amd64.whl", hash = "sha256:4fbec54cc42fa90ca69158d75f125febc4116b2d934e71c78f97de1388a8feb2"}, + {file = "rpds_py-0.25.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:4e5fe366fa53bd6777cf5440245366705338587b2cf8d61348ddaad744eb591a"}, + {file = "rpds_py-0.25.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:54f925ff8d4443b7cae23a5215954abbf4736a3404188bde53c4d744ac001d89"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58258a66255b2500ddaa4f33191ada5ec983a429c09eb151daf81efbb9aa115"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f3a57f08c558d0983a708bfe6d1265f47b5debff9b366b2f2091690fada055c"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7d60d42f1b9571341ad2322e748f7a60f9847546cd801a3a0eb72a1b54c6519"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a54b94b0e4de95aa92618906fb631779d9fde29b4bf659f482c354a3a79fd025"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af1c2241919304cc2f90e7dcb3eb1c1df6fb4172dd338e629dd6410e48b3d1a0"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7d34547810bfd61acf8a441e8a3651e7a919e8e8aed29850be14a1b05cfc6f41"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:66568caacf18542f0cf213db7adf3de2da6ad58c7bf2c4fafec0d81ae557443b"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e49e4c3e899c32884d7828c91d6c3aff08d2f18857f50f86cc91187c31a4ca58"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:20af08b0b2d5b196a2bcb70becf0b97ec5af579cee0ae6750b08a2eea3b6c77d"}, + {file = "rpds_py-0.25.0-cp313-cp313-win32.whl", hash = "sha256:d3dc8d6ce8f001c80919bdb49d8b0b815185933a0b8e9cdeaea42b0b6f27eeb0"}, + {file = "rpds_py-0.25.0-cp313-cp313-win_amd64.whl", hash = "sha256:113d134dc5a8d2503630ca2707b58a1bf5b1b3c69b35c7dab8690ee650c111b8"}, + {file = "rpds_py-0.25.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:6c72a4a8fab10bc96720ad40941bb471e3b1150fb8d62dab205d495511206cf1"}, + {file = "rpds_py-0.25.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb979162323f3534dce84b59f86e689a0761a2a300e0212bfaedfa80d4eb8100"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35c8cb5dcf7d36d3adf2ae0730b60fb550a8feb6e432bee7ef84162a0d15714b"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:673ba018df5ae5e7b6c9a021d51ffe39c0ae1daa0041611ed27a0bca634b2d2e"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16fb28d3a653f67c871a47c5ca0be17bce9fab8adb8bcf7bd09f3771b8c4d860"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12a84c3851f9e68633d883c01347db3cb87e6160120a489f9c47162cd276b0a5"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b5f457afffb45d3804728a54083e31fbaf460e902e3f7d063e56d0d0814301e"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9442cbff21122e9a529b942811007d65eabe4182e7342d102caf119b229322c6"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:383cf0d4288baf5a16812ed70d54ecb7f2064e255eb7fe42c38e926adeae4534"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:0dcdee07ebf76223092666c72a9552db276fbe46b98830ecd1bb836cc98adc81"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5bbfbd9c74c4dd74815bd532bf29bedea6d27d38f35ef46f9754172a14e4c655"}, + {file = "rpds_py-0.25.0-cp313-cp313t-win32.whl", hash = "sha256:90dbd2c42cb6463c07020695800ae8f347e7dbeff09da2975a988e467b624539"}, + {file = "rpds_py-0.25.0-cp313-cp313t-win_amd64.whl", hash = "sha256:8c2ad59c4342a176cb3e0d5753e1c911eabc95c210fc6d0e913c32bf560bf012"}, + {file = "rpds_py-0.25.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:9f9a1b15b875160186177f659cde2b0f899182b0aca49457d6396afc4bbda7b9"}, + {file = "rpds_py-0.25.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e849315963eb08c26167d0f2c0f9319c9bd379daea75092b3c595d70be6209d"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ad37c29adc435e6d8b24be86b03596183ee8d4bb8580cc4c676879b0b896a99"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:587cad3959d3d85127cf5df1624cdce569bb3796372e00420baad46af7c56b9b"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce0518667855a1598d9b1f4fcf0fed1182c67c5ba4fe6a2c6bce93440a65cead"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c18cb2f6805861dcdf11fb0b3c111a0335f6475411687db2f6636f32bed66b0"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a21f4584f69547ae03aaa21be98753e85599f3437b84039da5dc20b53abe987"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3d7d65aa934899849628137ab391562cdb487c6ffb9b9781319a64a9c66afbce"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fd9167e9604cb5a218a2e847aa8cdc5f98b379a673371978ee7b0c11b4d2e140"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6c27156c8d836e7ff760767e93245b286ae028bfd81d305db676662d1f642637"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:66087711faf29cb3ac8ab05341939aec29968626aff8ef18e483e229055dd9a7"}, + {file = "rpds_py-0.25.0-cp39-cp39-win32.whl", hash = "sha256:f2e69415e4e33cdeee50ebc2c4d8fcbef12c3181d9274e512ccd2a905a76aad1"}, + {file = "rpds_py-0.25.0-cp39-cp39-win_amd64.whl", hash = "sha256:58cfaa54752d6d2b4f10e87571688dbb7792327a69eca5417373d77d42787058"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:57e9616a2a9da08fe0994e37a0c6f578fbaf6d35911bcba31e99660542d60c45"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6d95521901896a90a858993bfa3ec0f9160d3d97e8c8fefc279b3306cdadfee0"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d33aef3914a5b49db12ed3f24d214ffa50caefc8f4b0c7c7b9485bd4b231a898"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4acbe2349a3baac9cc212005b6cb4bbb7e5b34538886cde4f55dfc29173da1d6"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9b75b5d3416b00d064a5e6f4814fdfb18a964a7cf38dc00b5c2c02fa30a7dd0b"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:542a6f1d0f400b9ce1facb3e30dd3dc84e4affc60353509b00a7bdcd064be91e"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60ba9d104f4e8496107b1cb86e45a68a16d13511dc3986e0780e9f85c2136f9"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6065a489b7b284efb29d57adffae2b9b5e9403d3c8d95cfa04e04e024e6b4e77"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:6bcca4d0d24d8c37bfe0cafdaaf4346b6c516db21ccaad5c7fba0a0df818dfc9"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:8155e21203161e5c78791fc049b99f0bbbf14d1d1839c8c93c8344957f9e8e1e"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6a1eda14db1ac7a2ab4536dfe69e4d37fdd765e8e784ae4451e61582ebb76012"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:de34a7d1893be76cb015929690dce3bde29f4de08143da2e9ad1cedb11dbf80e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0d63a86b457069d669c423f093db4900aa102f0e5a626973eff4db8355c0fd96"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89bb2b20829270aca28b1e5481be8ee24cb9aa86e6c0c81cb4ada2112c9588c5"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83e103b48e63fd2b8a8e2b21ab5b5299a7146045626c2ed4011511ea8122d217"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fccd24c080850715c58a80200d367bc62b4bff6c9fb84e9564da1ebcafea6418"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12b42790c91e0041a98f0ec04244fb334696938793e785a5d4c7e56ca534d7da"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc907ea12216cfc5560148fc42459d86740fc739981c6feb94230dab09362679"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e11065b759c38c4945f8c9765ed2910e31fa5b2f7733401eb7d966f468367a2"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8abc1a3e29b599bf8bb5ad455256a757e8b0ed5621e7e48abe8209932dc6d11e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:cd36b71f9f3bf195b2dd9be5eafbfc9409e6c8007aebc38a4dc051f522008033"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:805a0dff0674baa3f360c21dcbc622ae544f2bb4753d87a4a56a1881252a477e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:96742796f499ac23b59856db734e65b286d1214a0d9b57bcd7bece92d9201fa4"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7715597186a7277be12729c896019226321bad1f047da381ab707b177aa5017c"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5b049dd0792d51f07193cd934acec89abe84d2607109e6ca223b2f0ff24f0c7d"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87c6ff87b38f46d712418d78b34db1198408a3d9a42eddc640644aea561216b1"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:240251fd95b057c26f8538d0e673bf983eba4f38da95fbaf502bfc1a768b3984"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85587479f210350e9d9d25e505f422dd636e561658382ee8947357a4bac491ad"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:551897221bbc9de17bce4574810347db8ec1ba4ec2f50f35421790d34bdb6ef9"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3d50ac3b772c10e0b918a5ce2e871138896bfb5f35050ff1ff87ddca45961fc"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8029c19c8a32ef3093c417dd16a5f806e7f529fcceea7c627b2635e9da5104da"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:fe7439d9c5b402af2c9911c7facda1808d0c8dbfa9cf085e6aeac511a23f7d87"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:77910d6bec321c9fccfe9cf5e407fed9d2c48a5e510473b4f070d5cf2413c003"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:0ee0cc81f875e853ccdf3badb44b67f771fb9149baa9e752777ccdcaf052ad26"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:469054e6b2f8e41f1fe62b95f617082019d343eddeec3219ff3909067e672fb9"}, + {file = "rpds_py-0.25.0.tar.gz", hash = "sha256:4d97661bf5848dd9e5eb7ded480deccf9d32ce2cd500b88a26acbf7bd2864985"}, ] [[package]] @@ -4082,7 +3741,6 @@ description = "Pure-Python RSA implementation" optional = false python-versions = "<4,>=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762"}, {file = "rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75"}, @@ -4091,26 +3749,40 @@ files = [ [package.dependencies] pyasn1 = ">=0.1.3" +[[package]] +name = "s3transfer" +version = "0.10.4" +description = "An Amazon S3 Transfer Manager" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "s3transfer-0.10.4-py3-none-any.whl", hash = "sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e"}, + {file = "s3transfer-0.10.4.tar.gz", hash = "sha256:29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7"}, +] + +[package.dependencies] +botocore = ">=1.33.2,<2.0a.0" + +[package.extras] +crt = ["botocore[crt] (>=1.33.2,<2.0a.0)"] + [[package]] name = "sendgrid" -version = "6.12.5" +version = "6.12.2" description = "Twilio SendGrid library for Python" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "sendgrid-6.12.5-py3-none-any.whl", hash = "sha256:96f92cc91634bf552fdb766b904bbb53968018da7ae41fdac4d1090dc0311ca8"}, - {file = "sendgrid-6.12.5.tar.gz", hash = "sha256:ea9aae30cd55c332e266bccd11185159482edfc07c149b6cd15cf08869fabdb7"}, + {file = "sendgrid-6.12.2-py3-none-any.whl", hash = "sha256:423f207e8593fb2950b6f7571c44994f20518bb25f19d89ecb3f9aa41ee88e18"}, + {file = "sendgrid-6.12.2.tar.gz", hash = "sha256:969297eaf4a57970fbcdf9de5b663d6c1c50710cceda103b26557b661ab1382a"}, ] [package.dependencies] -cryptography = ">=45.0.6" +ecdsa = ">=0.19.1,<1" python-http-client = ">=3.2.1" -werkzeug = [ - {version = ">=2.2.0", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=2.3.5", markers = "python_version >= \"3.12\""}, -] +werkzeug = {version = ">=3.0.0", markers = "python_version >= \"3.11\""} [[package]] name = "six" @@ -4119,7 +3791,6 @@ description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" groups = ["main", "dev"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -4132,7 +3803,6 @@ description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -4140,74 +3810,73 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.44" +version = "2.0.41" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "SQLAlchemy-2.0.44-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:471733aabb2e4848d609141a9e9d56a427c0a038f4abf65dd19d7a21fd563632"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48bf7d383a35e668b984c805470518b635d48b95a3c57cb03f37eaa3551b5f9f"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf4bb6b3d6228fcf3a71b50231199fb94d2dd2611b66d33be0578ea3e6c2726"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:e998cf7c29473bd077704cea3577d23123094311f59bdc4af551923b168332b1"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:ebac3f0b5732014a126b43c2b7567f2f0e0afea7d9119a3378bde46d3dcad88e"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-win32.whl", hash = "sha256:3255d821ee91bdf824795e936642bbf43a4c7cedf5d1aed8d24524e66843aa74"}, - {file = "SQLAlchemy-2.0.44-cp37-cp37m-win_amd64.whl", hash = "sha256:78e6c137ba35476adb5432103ae1534f2f5295605201d946a4198a0dea4b38e7"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c77f3080674fc529b1bd99489378c7f63fcb4ba7f8322b79732e0258f0ea3ce"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4c26ef74ba842d61635b0152763d057c8d48215d5be9bb8b7604116a059e9985"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4a172b31785e2f00780eccab00bc240ccdbfdb8345f1e6063175b3ff12ad1b0"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9480c0740aabd8cb29c329b422fb65358049840b34aba0adf63162371d2a96e"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:17835885016b9e4d0135720160db3095dc78c583e7b902b6be799fb21035e749"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cbe4f85f50c656d753890f39468fcd8190c5f08282caf19219f684225bfd5fd2"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-win32.whl", hash = "sha256:2fcc4901a86ed81dc76703f3b93ff881e08761c63263c46991081fd7f034b165"}, - {file = "sqlalchemy-2.0.44-cp310-cp310-win_amd64.whl", hash = "sha256:9919e77403a483ab81e3423151e8ffc9dd992c20d2603bf17e4a8161111e55f5"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0fe3917059c7ab2ee3f35e77757062b1bea10a0b6ca633c58391e3f3c6c488dd"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:de4387a354ff230bc979b46b2207af841dc8bf29847b6c7dbe60af186d97aefa"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3678a0fb72c8a6a29422b2732fe423db3ce119c34421b5f9955873eb9b62c1e"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cf6872a23601672d61a68f390e44703442639a12ee9dd5a88bbce52a695e46e"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:329aa42d1be9929603f406186630135be1e7a42569540577ba2c69952b7cf399"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:70e03833faca7166e6a9927fbee7c27e6ecde436774cd0b24bbcc96353bce06b"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-win32.whl", hash = "sha256:253e2f29843fb303eca6b2fc645aca91fa7aa0aa70b38b6950da92d44ff267f3"}, - {file = "sqlalchemy-2.0.44-cp311-cp311-win_amd64.whl", hash = "sha256:7a8694107eb4308a13b425ca8c0e67112f8134c846b6e1f722698708741215d5"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:72fea91746b5890f9e5e0997f16cbf3d53550580d76355ba2d998311b17b2250"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:585c0c852a891450edbb1eaca8648408a3cc125f18cf433941fa6babcc359e29"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b94843a102efa9ac68a7a30cd46df3ff1ed9c658100d30a725d10d9c60a2f44"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:119dc41e7a7defcefc57189cfa0e61b1bf9c228211aba432b53fb71ef367fda1"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0765e318ee9179b3718c4fd7ba35c434f4dd20332fbc6857a5e8df17719c24d7"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2e7b5b079055e02d06a4308d0481658e4f06bc7ef211567edc8f7d5dce52018d"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-win32.whl", hash = "sha256:846541e58b9a81cce7dee8329f352c318de25aa2f2bbe1e31587eb1f057448b4"}, - {file = "sqlalchemy-2.0.44-cp312-cp312-win_amd64.whl", hash = "sha256:7cbcb47fd66ab294703e1644f78971f6f2f1126424d2b300678f419aa73c7b6e"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ff486e183d151e51b1d694c7aa1695747599bb00b9f5f604092b54b74c64a8e1"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0b1af8392eb27b372ddb783b317dea0f650241cea5bd29199b22235299ca2e45"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2b61188657e3a2b9ac4e8f04d6cf8e51046e28175f79464c67f2fd35bceb0976"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b87e7b91a5d5973dda5f00cd61ef72ad75a1db73a386b62877d4875a8840959c"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:15f3326f7f0b2bfe406ee562e17f43f36e16167af99c4c0df61db668de20002d"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1e77faf6ff919aa8cd63f1c4e561cac1d9a454a191bb864d5dd5e545935e5a40"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-win32.whl", hash = "sha256:ee51625c2d51f8baadf2829fae817ad0b66b140573939dd69284d2ba3553ae73"}, - {file = "sqlalchemy-2.0.44-cp313-cp313-win_amd64.whl", hash = "sha256:c1c80faaee1a6c3428cecf40d16a2365bcf56c424c92c2b6f0f9ad204b899e9e"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2fc44e5965ea46909a416fff0af48a219faefd5773ab79e5f8a5fcd5d62b2667"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:dc8b3850d2a601ca2320d081874033684e246d28e1c5e89db0864077cfc8f5a9"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d733dec0614bb8f4bcb7c8af88172b974f685a31dc3a65cca0527e3120de5606"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22be14009339b8bc16d6b9dc8780bacaba3402aa7581658e246114abbd2236e3"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:357bade0e46064f88f2c3a99808233e67b0051cdddf82992379559322dfeb183"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:4848395d932e93c1595e59a8672aa7400e8922c39bb9b0668ed99ac6fa867822"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-win32.whl", hash = "sha256:2f19644f27c76f07e10603580a47278abb2a70311136a7f8fd27dc2e096b9013"}, - {file = "sqlalchemy-2.0.44-cp38-cp38-win_amd64.whl", hash = "sha256:1df4763760d1de0dfc8192cc96d8aa293eb1a44f8f7a5fbe74caf1b551905c5e"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f7027414f2b88992877573ab780c19ecb54d3a536bef3397933573d6b5068be4"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3fe166c7d00912e8c10d3a9a0ce105569a31a3d0db1a6e82c4e0f4bf16d5eca9"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3caef1ff89b1caefc28f0368b3bde21a7e3e630c2eddac16abd9e47bd27cc36a"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc2856d24afa44295735e72f3c75d6ee7fdd4336d8d3a8f3d44de7aa6b766df2"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:11bac86b0deada30b6b5f93382712ff0e911fe8d31cb9bf46e6b149ae175eff0"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:4d18cd0e9a0f37c9f4088e50e3839fcb69a380a0ec957408e0b57cff08ee0a26"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-win32.whl", hash = "sha256:9e9018544ab07614d591a26c1bd4293ddf40752cc435caf69196740516af7100"}, - {file = "sqlalchemy-2.0.44-cp39-cp39-win_amd64.whl", hash = "sha256:8e0e4e66fd80f277a8c3de016a81a554e76ccf6b8d881ee0b53200305a8433f6"}, - {file = "sqlalchemy-2.0.44-py3-none-any.whl", hash = "sha256:19de7ca1246fbef9f9d1bff8f1ab25641569df226364a0e40457dc5457c54b05"}, - {file = "sqlalchemy-2.0.44.tar.gz", hash = "sha256:0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22"}, +files = [ + {file = "SQLAlchemy-2.0.41-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6854175807af57bdb6425e47adbce7d20a4d79bbfd6f6d6519cd10bb7109a7f8"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05132c906066142103b83d9c250b60508af556982a385d96c4eaa9fb9720ac2b"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b4af17bda11e907c51d10686eda89049f9ce5669b08fbe71a29747f1e876036"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:c0b0e5e1b5d9f3586601048dd68f392dc0cc99a59bb5faf18aab057ce00d00b2"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0b3dbf1e7e9bc95f4bac5e2fb6d3fb2f083254c3fdd20a1789af965caf2d2348"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-win32.whl", hash = "sha256:1e3f196a0c59b0cae9a0cd332eb1a4bda4696e863f4f1cf84ab0347992c548c2"}, + {file = "SQLAlchemy-2.0.41-cp37-cp37m-win_amd64.whl", hash = "sha256:6ab60a5089a8f02009f127806f777fca82581c49e127f08413a66056bd9166dd"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b1f09b6821406ea1f94053f346f28f8215e293344209129a9c0fcc3578598d7b"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1936af879e3db023601196a1684d28e12f19ccf93af01bf3280a3262c4b6b4e5"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2ac41acfc8d965fb0c464eb8f44995770239668956dc4cdf502d1b1ffe0d747"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81c24e0c0fde47a9723c81d5806569cddef103aebbf79dbc9fcbb617153dea30"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23a8825495d8b195c4aa9ff1c430c28f2c821e8c5e2d98089228af887e5d7e29"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:60c578c45c949f909a4026b7807044e7e564adf793537fc762b2489d522f3d11"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-win32.whl", hash = "sha256:118c16cd3f1b00c76d69343e38602006c9cfb9998fa4f798606d28d63f23beda"}, + {file = "sqlalchemy-2.0.41-cp310-cp310-win_amd64.whl", hash = "sha256:7492967c3386df69f80cf67efd665c0f667cee67032090fe01d7d74b0e19bb08"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6375cd674fe82d7aa9816d1cb96ec592bac1726c11e0cafbf40eeee9a4516b5f"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9f8c9fdd15a55d9465e590a402f42082705d66b05afc3ffd2d2eb3c6ba919560"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32f9dc8c44acdee06c8fc6440db9eae8b4af8b01e4b1aee7bdd7241c22edff4f"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90c11ceb9a1f482c752a71f203a81858625d8df5746d787a4786bca4ffdf71c6"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:911cc493ebd60de5f285bcae0491a60b4f2a9f0f5c270edd1c4dbaef7a38fc04"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03968a349db483936c249f4d9cd14ff2c296adfa1290b660ba6516f973139582"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-win32.whl", hash = "sha256:293cd444d82b18da48c9f71cd7005844dbbd06ca19be1ccf6779154439eec0b8"}, + {file = "sqlalchemy-2.0.41-cp311-cp311-win_amd64.whl", hash = "sha256:3d3549fc3e40667ec7199033a4e40a2f669898a00a7b18a931d3efb4c7900504"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:81f413674d85cfd0dfcd6512e10e0f33c19c21860342a4890c3a2b59479929f9"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:598d9ebc1e796431bbd068e41e4de4dc34312b7aa3292571bb3674a0cb415dd1"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a104c5694dfd2d864a6f91b0956eb5d5883234119cb40010115fd45a16da5e70"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6145afea51ff0af7f2564a05fa95eb46f542919e6523729663a5d285ecb3cf5e"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b46fa6eae1cd1c20e6e6f44e19984d438b6b2d8616d21d783d150df714f44078"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41836fe661cc98abfae476e14ba1906220f92c4e528771a8a3ae6a151242d2ae"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-win32.whl", hash = "sha256:a8808d5cf866c781150d36a3c8eb3adccfa41a8105d031bf27e92c251e3969d6"}, + {file = "sqlalchemy-2.0.41-cp312-cp312-win_amd64.whl", hash = "sha256:5b14e97886199c1f52c14629c11d90c11fbb09e9334fa7bb5f6d068d9ced0ce0"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4eeb195cdedaf17aab6b247894ff2734dcead6c08f748e617bfe05bd5a218443"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d4ae769b9c1c7757e4ccce94b0641bc203bbdf43ba7a2413ab2523d8d047d8dc"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a62448526dd9ed3e3beedc93df9bb6b55a436ed1474db31a2af13b313a70a7e1"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc56c9788617b8964ad02e8fcfeed4001c1f8ba91a9e1f31483c0dffb207002a"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c153265408d18de4cc5ded1941dcd8315894572cddd3c58df5d5b5705b3fa28d"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f67766965996e63bb46cfbf2ce5355fc32d9dd3b8ad7e536a920ff9ee422e23"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-win32.whl", hash = "sha256:bfc9064f6658a3d1cadeaa0ba07570b83ce6801a1314985bf98ec9b95d74e15f"}, + {file = "sqlalchemy-2.0.41-cp313-cp313-win_amd64.whl", hash = "sha256:82ca366a844eb551daff9d2e6e7a9e5e76d2612c8564f58db6c19a726869c1df"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:90144d3b0c8b139408da50196c5cad2a6909b51b23df1f0538411cd23ffa45d3"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:023b3ee6169969beea3bb72312e44d8b7c27c75b347942d943cf49397b7edeb5"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:725875a63abf7c399d4548e686debb65cdc2549e1825437096a0af1f7e374814"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81965cc20848ab06583506ef54e37cf15c83c7e619df2ad16807c03100745dea"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dd5ec3aa6ae6e4d5b5de9357d2133c07be1aff6405b136dad753a16afb6717dd"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:ff8e80c4c4932c10493ff97028decfdb622de69cae87e0f127a7ebe32b4069c6"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-win32.whl", hash = "sha256:4d44522480e0bf34c3d63167b8cfa7289c1c54264c2950cc5fc26e7850967e45"}, + {file = "sqlalchemy-2.0.41-cp38-cp38-win_amd64.whl", hash = "sha256:81eedafa609917040d39aa9332e25881a8e7a0862495fcdf2023a9667209deda"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9a420a91913092d1e20c86a2f5f1fc85c1a8924dbcaf5e0586df8aceb09c9cc2"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:906e6b0d7d452e9a98e5ab8507c0da791856b2380fdee61b765632bb8698026f"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a373a400f3e9bac95ba2a06372c4fd1412a7cee53c37fc6c05f829bf672b8769"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:087b6b52de812741c27231b5a3586384d60c353fbd0e2f81405a814b5591dc8b"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:34ea30ab3ec98355235972dadc497bb659cc75f8292b760394824fab9cf39826"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8280856dd7c6a68ab3a164b4a4b1c51f7691f6d04af4d4ca23d6ecf2261b7923"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-win32.whl", hash = "sha256:b50eab9994d64f4a823ff99a0ed28a6903224ddbe7fef56a6dd865eec9243440"}, + {file = "sqlalchemy-2.0.41-cp39-cp39-win_amd64.whl", hash = "sha256:5e22575d169529ac3e0a120cf050ec9daa94b6a9597993d1702884f6954a7d71"}, + {file = "sqlalchemy-2.0.41-py3-none-any.whl", hash = "sha256:57df5dc6fdb5ed1a88a1ed2195fd31927e705cad62dedd86b46972752a80f576"}, + {file = "sqlalchemy-2.0.41.tar.gz", hash = "sha256:edba70118c4be3c2b1f90754d308d0b79c6fe2c0fdc52d8ddf603916f83f4db9"}, ] [package.dependencies] -greenlet = {version = ">=1", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} +greenlet = {version = ">=1", markers = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -4242,7 +3911,6 @@ description = "JSON type with nested change tracking for SQLAlchemy" optional = false python-versions = ">= 3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "sqlalchemy-json-0.7.0.tar.gz", hash = "sha256:620d0b26f648f21a8fa9127df66f55f83a5ab4ae010e5397a5c6989a08238561"}, {file = "sqlalchemy_json-0.7.0-py3-none-any.whl", hash = "sha256:27881d662ca18363a4ac28175cc47ea2a6f2bef997ae1159c151026b741818e6"}, @@ -4256,20 +3924,18 @@ dev = ["pytest"] [[package]] name = "starlette" -version = "0.47.3" +version = "0.46.2" description = "The little ASGI library that shines." optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "starlette-0.47.3-py3-none-any.whl", hash = "sha256:89c0778ca62a76b826101e7c709e70680a1699ca7da6b44d38eb0a7e61fe4b51"}, - {file = "starlette-0.47.3.tar.gz", hash = "sha256:6bc94f839cc176c4858894f1f8908f0ab79dfec1a6b8402f6da9be26ebea52e9"}, + {file = "starlette-0.46.2-py3-none-any.whl", hash = "sha256:595633ce89f8ffa71a015caed34a5b2dc1c0cdb3f0f1fbd1e69339cf2abeec35"}, + {file = "starlette-0.46.2.tar.gz", hash = "sha256:7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5"}, ] [package.dependencies] anyio = ">=3.6.2,<5" -typing-extensions = {version = ">=4.10.0", markers = "python_version < \"3.13\""} [package.extras] full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] @@ -4281,7 +3947,6 @@ description = "Python bindings for the Stripe API" optional = false python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "stripe-11.6.0-py2.py3-none-any.whl", hash = "sha256:6e6cf09ebb6d5fc2d708401cb8868fd7bff987a6d09a0433caaa92c62f97dbc5"}, {file = "stripe-11.6.0.tar.gz", hash = "sha256:0ced7cce23a6cb1a393c86a1f7f9435c9d83ae7cbd556362868caf62cb44a92c"}, @@ -4293,17 +3958,22 @@ typing-extensions = {version = ">=4.5.0", markers = "python_version >= \"3.7\""} [[package]] name = "structlog" -version = "25.5.0" +version = "25.3.0" description = "Structured Logging for Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "structlog-25.5.0-py3-none-any.whl", hash = "sha256:a8453e9b9e636ec59bd9e79bbd4a72f025981b3ba0f5837aebf48f02f37a7f9f"}, - {file = "structlog-25.5.0.tar.gz", hash = "sha256:098522a3bebed9153d4570c6d0288abf80a031dfdb2048d59a49e9dc2190fc98"}, + {file = "structlog-25.3.0-py3-none-any.whl", hash = "sha256:a341f5524004c158498c3127eecded091eb67d3a611e7a3093deca30db06e172"}, + {file = "structlog-25.3.0.tar.gz", hash = "sha256:8dab497e6f6ca962abad0c283c46744185e0c9ba900db52a423cb6db99f7abeb"}, ] +[package.extras] +dev = ["freezegun (>=0.2.8)", "mypy (>=1.4)", "pretend", "pytest (>=6.0)", "pytest-asyncio (>=0.17)", "rich", "simplejson", "twisted"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-mermaid", "sphinxext-opengraph", "twisted"] +tests = ["freezegun (>=0.2.8)", "pretend", "pytest (>=6.0)", "pytest-asyncio (>=0.17)", "simplejson"] +typing = ["mypy (>=1.4)", "rich", "twisted"] + [[package]] name = "supertokens-python" version = "0.29.2" @@ -4311,7 +3981,6 @@ description = "SuperTokens SDK for Python" optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "supertokens_python-0.29.2-py3-none-any.whl", hash = "sha256:9886c1257432403dfb7a862a914b2308f84f15992b5616c7797a32feae163e80"}, {file = "supertokens_python-0.29.2.tar.gz", hash = "sha256:c37caaf81c159c686cca0a7990ebeac272309a87078edea0bc0fc48ba1cccac1"}, @@ -4341,44 +4010,43 @@ flask = ["flask", "flask-cors", "python-dotenv (==1.0.1)"] [[package]] name = "tiktoken" -version = "0.11.0" +version = "0.9.0" description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "tiktoken-0.11.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:8a9b517d6331d7103f8bef29ef93b3cca95fa766e293147fe7bacddf310d5917"}, - {file = "tiktoken-0.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b4ddb1849e6bf0afa6cc1c5d809fb980ca240a5fffe585a04e119519758788c0"}, - {file = "tiktoken-0.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10331d08b5ecf7a780b4fe4d0281328b23ab22cdb4ff65e68d56caeda9940ecc"}, - {file = "tiktoken-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b062c82300341dc87e0258c69f79bed725f87e753c21887aea90d272816be882"}, - {file = "tiktoken-0.11.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:195d84bec46169af3b1349a1495c151d37a0ff4cba73fd08282736be7f92cc6c"}, - {file = "tiktoken-0.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:fe91581b0ecdd8783ce8cb6e3178f2260a3912e8724d2f2d49552b98714641a1"}, - {file = "tiktoken-0.11.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4ae374c46afadad0f501046db3da1b36cd4dfbfa52af23c998773682446097cf"}, - {file = "tiktoken-0.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25a512ff25dc6c85b58f5dd4f3d8c674dc05f96b02d66cdacf628d26a4e4866b"}, - {file = "tiktoken-0.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2130127471e293d385179c1f3f9cd445070c0772be73cdafb7cec9a3684c0458"}, - {file = "tiktoken-0.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21e43022bf2c33f733ea9b54f6a3f6b4354b909f5a73388fb1b9347ca54a069c"}, - {file = "tiktoken-0.11.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:adb4e308eb64380dc70fa30493e21c93475eaa11669dea313b6bbf8210bfd013"}, - {file = "tiktoken-0.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:ece6b76bfeeb61a125c44bbefdfccc279b5288e6007fbedc0d32bfec602df2f2"}, - {file = "tiktoken-0.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fd9e6b23e860973cf9526544e220b223c60badf5b62e80a33509d6d40e6c8f5d"}, - {file = "tiktoken-0.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6a76d53cee2da71ee2731c9caa747398762bda19d7f92665e882fef229cb0b5b"}, - {file = "tiktoken-0.11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ef72aab3ea240646e642413cb363b73869fed4e604dcfd69eec63dc54d603e8"}, - {file = "tiktoken-0.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f929255c705efec7a28bf515e29dc74220b2f07544a8c81b8d69e8efc4578bd"}, - {file = "tiktoken-0.11.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:61f1d15822e4404953d499fd1dcc62817a12ae9fb1e4898033ec8fe3915fdf8e"}, - {file = "tiktoken-0.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:45927a71ab6643dfd3ef57d515a5db3d199137adf551f66453be098502838b0f"}, - {file = "tiktoken-0.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a5f3f25ffb152ee7fec78e90a5e5ea5b03b4ea240beed03305615847f7a6ace2"}, - {file = "tiktoken-0.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7dc6e9ad16a2a75b4c4be7208055a1f707c9510541d94d9cc31f7fbdc8db41d8"}, - {file = "tiktoken-0.11.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a0517634d67a8a48fd4a4ad73930c3022629a85a217d256a6e9b8b47439d1e4"}, - {file = "tiktoken-0.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fb4effe60574675118b73c6fbfd3b5868e5d7a1f570d6cc0d18724b09ecf318"}, - {file = "tiktoken-0.11.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94f984c9831fd32688aef4348803b0905d4ae9c432303087bae370dc1381a2b8"}, - {file = "tiktoken-0.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:2177ffda31dec4023356a441793fed82f7af5291120751dee4d696414f54db0c"}, - {file = "tiktoken-0.11.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:13220f12c9e82e399377e768640ddfe28bea962739cc3a869cad98f42c419a89"}, - {file = "tiktoken-0.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f2db627f5c74477c0404b4089fd8a28ae22fa982a6f7d9c7d4c305c375218f3"}, - {file = "tiktoken-0.11.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2302772f035dceb2bcf8e55a735e4604a0b51a6dd50f38218ff664d46ec43807"}, - {file = "tiktoken-0.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20b977989afe44c94bcc50db1f76971bb26dca44218bd203ba95925ef56f8e7a"}, - {file = "tiktoken-0.11.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:669a1aa1ad6ebf1b3c26b45deb346f345da7680f845b5ea700bba45c20dea24c"}, - {file = "tiktoken-0.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:e363f33c720a055586f730c00e330df4c7ea0024bf1c83a8a9a9dbc054c4f304"}, - {file = "tiktoken-0.11.0.tar.gz", hash = "sha256:3c518641aee1c52247c2b97e74d8d07d780092af79d5911a6ab5e79359d9b06a"}, +files = [ + {file = "tiktoken-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:586c16358138b96ea804c034b8acf3f5d3f0258bd2bc3b0227af4af5d622e382"}, + {file = "tiktoken-0.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9c59ccc528c6c5dd51820b3474402f69d9a9e1d656226848ad68a8d5b2e5108"}, + {file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0968d5beeafbca2a72c595e8385a1a1f8af58feaebb02b227229b69ca5357fd"}, + {file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92a5fb085a6a3b7350b8fc838baf493317ca0e17bd95e8642f95fc69ecfed1de"}, + {file = "tiktoken-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:15a2752dea63d93b0332fb0ddb05dd909371ededa145fe6a3242f46724fa7990"}, + {file = "tiktoken-0.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:26113fec3bd7a352e4b33dbaf1bd8948de2507e30bd95a44e2b1156647bc01b4"}, + {file = "tiktoken-0.9.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f32cc56168eac4851109e9b5d327637f15fd662aa30dd79f964b7c39fbadd26e"}, + {file = "tiktoken-0.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:45556bc41241e5294063508caf901bf92ba52d8ef9222023f83d2483a3055348"}, + {file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03935988a91d6d3216e2ec7c645afbb3d870b37bcb67ada1943ec48678e7ee33"}, + {file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b3d80aad8d2c6b9238fc1a5524542087c52b860b10cbf952429ffb714bc1136"}, + {file = "tiktoken-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b2a21133be05dc116b1d0372af051cd2c6aa1d2188250c9b553f9fa49301b336"}, + {file = "tiktoken-0.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:11a20e67fdf58b0e2dea7b8654a288e481bb4fc0289d3ad21291f8d0849915fb"}, + {file = "tiktoken-0.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e88f121c1c22b726649ce67c089b90ddda8b9662545a8aeb03cfef15967ddd03"}, + {file = "tiktoken-0.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a6600660f2f72369acb13a57fb3e212434ed38b045fd8cc6cdd74947b4b5d210"}, + {file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95e811743b5dfa74f4b227927ed86cbc57cad4df859cb3b643be797914e41794"}, + {file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99376e1370d59bcf6935c933cb9ba64adc29033b7e73f5f7569f3aad86552b22"}, + {file = "tiktoken-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:badb947c32739fb6ddde173e14885fb3de4d32ab9d8c591cbd013c22b4c31dd2"}, + {file = "tiktoken-0.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:5a62d7a25225bafed786a524c1b9f0910a1128f4232615bf3f8257a73aaa3b16"}, + {file = "tiktoken-0.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b0e8e05a26eda1249e824156d537015480af7ae222ccb798e5234ae0285dbdb"}, + {file = "tiktoken-0.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:27d457f096f87685195eea0165a1807fae87b97b2161fe8c9b1df5bd74ca6f63"}, + {file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cf8ded49cddf825390e36dd1ad35cd49589e8161fdcb52aa25f0583e90a3e01"}, + {file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc156cb314119a8bb9748257a2eaebd5cc0753b6cb491d26694ed42fc7cb3139"}, + {file = "tiktoken-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cd69372e8c9dd761f0ab873112aba55a0e3e506332dd9f7522ca466e817b1b7a"}, + {file = "tiktoken-0.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:5ea0edb6f83dc56d794723286215918c1cde03712cbbafa0348b33448faf5b95"}, + {file = "tiktoken-0.9.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c6386ca815e7d96ef5b4ac61e0048cd32ca5a92d5781255e13b31381d28667dc"}, + {file = "tiktoken-0.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:75f6d5db5bc2c6274b674ceab1615c1778e6416b14705827d19b40e6355f03e0"}, + {file = "tiktoken-0.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e15b16f61e6f4625a57a36496d28dd182a8a60ec20a534c5343ba3cafa156ac7"}, + {file = "tiktoken-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebcec91babf21297022882344c3f7d9eed855931466c3311b1ad6b64befb3df"}, + {file = "tiktoken-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e5fd49e7799579240f03913447c0cdfa1129625ebd5ac440787afc4345990427"}, + {file = "tiktoken-0.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:26242ca9dc8b58e875ff4ca078b9a94d2f0813e6a535dcd2205df5d49d927cc7"}, + {file = "tiktoken-0.9.0.tar.gz", hash = "sha256:d02a5ca6a938e0490e1ff957bc48c8b078c88cb83977be1625b1fd8aac792c5d"}, ] [package.dependencies] @@ -4395,7 +4063,6 @@ description = "Accurately separates a URL's subdomain, domain, and public suffix optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tldextract-5.3.0-py3-none-any.whl", hash = "sha256:f70f31d10b55c83993f55e91ecb7c5d84532a8972f22ec578ecfbe5ea2292db2"}, {file = "tldextract-5.3.0.tar.gz", hash = "sha256:b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609"}, @@ -4413,37 +4080,36 @@ testing = ["mypy", "pytest", "pytest-gitignore", "pytest-mock", "responses", "ru [[package]] name = "tokenizers" -version = "0.22.1" +version = "0.21.1" description = "" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "tokenizers-0.22.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:59fdb013df17455e5f950b4b834a7b3ee2e0271e6378ccb33aa74d178b513c73"}, - {file = "tokenizers-0.22.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8d4e484f7b0827021ac5f9f71d4794aaef62b979ab7608593da22b1d2e3c4edc"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19d2962dd28bc67c1f205ab180578a78eef89ac60ca7ef7cbe9635a46a56422a"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:38201f15cdb1f8a6843e6563e6e79f4abd053394992b9bbdf5213ea3469b4ae7"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1cbe5454c9a15df1b3443c726063d930c16f047a3cc724b9e6e1a91140e5a21"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e7d094ae6312d69cc2a872b54b91b309f4f6fbce871ef28eb27b52a98e4d0214"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afd7594a56656ace95cdd6df4cca2e4059d294c5cfb1679c57824b605556cb2f"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ef6063d7a84994129732b47e7915e8710f27f99f3a3260b8a38fc7ccd083f4"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ba0a64f450b9ef412c98f6bcd2a50c6df6e2443b560024a09fa6a03189726879"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:331d6d149fa9c7d632cde4490fb8bbb12337fa3a0232e77892be656464f4b446"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:607989f2ea68a46cb1dfbaf3e3aabdf3f21d8748312dbeb6263d1b3b66c5010a"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a0f307d490295717726598ef6fa4f24af9d484809223bbc253b201c740a06390"}, - {file = "tokenizers-0.22.1-cp39-abi3-win32.whl", hash = "sha256:b5120eed1442765cd90b903bb6cfef781fd8fe64e34ccaecbae4c619b7b12a82"}, - {file = "tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138"}, - {file = "tokenizers-0.22.1.tar.gz", hash = "sha256:61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9"}, +files = [ + {file = "tokenizers-0.21.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e78e413e9e668ad790a29456e677d9d3aa50a9ad311a40905d6861ba7692cf41"}, + {file = "tokenizers-0.21.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:cd51cd0a91ecc801633829fcd1fda9cf8682ed3477c6243b9a095539de4aecf3"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28da6b72d4fb14ee200a1bd386ff74ade8992d7f725f2bde2c495a9a98cf4d9f"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:34d8cfde551c9916cb92014e040806122295a6800914bab5865deb85623931cf"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aaa852d23e125b73d283c98f007e06d4595732104b65402f46e8ef24b588d9f8"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a21a15d5c8e603331b8a59548bbe113564136dc0f5ad8306dd5033459a226da0"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2fdbd4c067c60a0ac7eca14b6bd18a5bebace54eb757c706b47ea93204f7a37c"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dd9a0061e403546f7377df940e866c3e678d7d4e9643d0461ea442b4f89e61a"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:db9484aeb2e200c43b915a1a0150ea885e35f357a5a8fabf7373af333dcc8dbf"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:ed248ab5279e601a30a4d67bdb897ecbe955a50f1e7bb62bd99f07dd11c2f5b6"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:9ac78b12e541d4ce67b4dfd970e44c060a2147b9b2a21f509566d556a509c67d"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e5a69c1a4496b81a5ee5d2c1f3f7fbdf95e90a0196101b0ee89ed9956b8a168f"}, + {file = "tokenizers-0.21.1-cp39-abi3-win32.whl", hash = "sha256:1039a3a5734944e09de1d48761ade94e00d0fa760c0e0551151d4dd851ba63e3"}, + {file = "tokenizers-0.21.1-cp39-abi3-win_amd64.whl", hash = "sha256:0f0dcbcc9f6e13e675a66d7a5f2f225a736745ce484c1a4e07476a89ccdad382"}, + {file = "tokenizers-0.21.1.tar.gz", hash = "sha256:a1bb04dc5b448985f86ecd4b05407f5a8d97cb2c0532199b2a302a604a0165ab"}, ] [package.dependencies] -huggingface-hub = ">=0.16.4,<2.0" +huggingface-hub = ">=0.16.4,<1.0" [package.extras] dev = ["tokenizers[testing]"] docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"] -testing = ["black (==22.3)", "datasets", "numpy", "pytest", "pytest-asyncio", "requests", "ruff"] +testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests", "ruff"] [[package]] name = "toml" @@ -4452,12 +4118,23 @@ description = "Python Library for Tom's Obvious, Minimal Language" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +[[package]] +name = "toolz" +version = "1.0.0" +description = "List processing tools and functional utilities" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "toolz-1.0.0-py3-none-any.whl", hash = "sha256:292c8f1c4e7516bf9086f8850935c799a874039c8bcf959d47b600e4c44a6236"}, + {file = "toolz-1.0.0.tar.gz", hash = "sha256:2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02"}, +] + [[package]] name = "tqdm" version = "4.67.1" @@ -4465,7 +4142,6 @@ description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"}, {file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"}, @@ -4483,15 +4159,14 @@ telegram = ["requests"] [[package]] name = "twilio" -version = "9.8.5" +version = "9.6.1" description = "Twilio API client and TwiML generator" optional = false python-versions = ">=3.7.0" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "twilio-9.8.5-py2.py3-none-any.whl", hash = "sha256:7e1d04bb2cd480a97937f1fbea5fe35377925b6f70745baade08bde9cd4fb319"}, - {file = "twilio-9.8.5.tar.gz", hash = "sha256:b69dc2226294ef579fcdd92b502aef7982a60577110a0799f8c2b739428e1dcf"}, + {file = "twilio-9.6.1-py2.py3-none-any.whl", hash = "sha256:441fdab61b9a204eef770368380b962cbf08dc0fe9f757fe4b1d63ced37ddeed"}, + {file = "twilio-9.6.1.tar.gz", hash = "sha256:bb80b31d4d9e55c33872efef7fb99373149ed4093f21c56cf582797da45862f5"}, ] [package.dependencies] @@ -4502,28 +4177,26 @@ requests = ">=2.0.0" [[package]] name = "typing-extensions" -version = "4.15.0" -description = "Backported and Experimental Type Hints for Python 3.9+" +version = "4.13.2" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, - {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, + {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, + {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, ] [[package]] name = "typing-inspection" -version = "0.4.2" +version = "0.4.0" description = "Runtime typing introspection tools" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"}, - {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"}, + {file = "typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f"}, + {file = "typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122"}, ] [package.dependencies] @@ -4536,7 +4209,6 @@ description = "Provider of IANA time zone data" optional = false python-versions = ">=2" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"}, {file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"}, @@ -4544,22 +4216,20 @@ files = [ [[package]] name = "urllib3" -version = "2.5.0" +version = "1.26.20" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.9" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"}, - {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"}, + {file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"}, + {file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotli (==1.0.9) ; os_name != \"nt\" and python_version < \"3\" and platform_python_implementation == \"CPython\"", "brotli (>=1.0.9) ; python_version >= \"3\" and platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; (os_name != \"nt\" or python_version >= \"3\") and platform_python_implementation != \"CPython\"", "brotlipy (>=0.6.0) ; os_name == \"nt\" and python_version < \"3\""] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress ; python_version == \"2.7\"", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uuid-utils" @@ -4568,7 +4238,6 @@ description = "Drop-in replacement for Python UUID in Rust" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "uuid_utils-0.10.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:8d5a4508feefec62456cd6a41bcdde458d56827d908f226803b886d22a3d5e63"}, {file = "uuid_utils-0.10.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:dbefc2b9113f9dfe56bdae58301a2b3c53792221410d422826f3d1e3e6555fe7"}, @@ -4601,15 +4270,14 @@ files = [ [[package]] name = "uvicorn" -version = "0.34.3" +version = "0.22.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.9" +python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "uvicorn-0.34.3-py3-none-any.whl", hash = "sha256:16246631db62bdfbf069b0645177d6e8a77ba950cfedbfd093acef9444e4d885"}, - {file = "uvicorn-0.34.3.tar.gz", hash = "sha256:35919a9a979d7a59334b6b10e05d77c1d0d574c50e0fc98b8b1a0f165708b55a"}, + {file = "uvicorn-0.22.0-py3-none-any.whl", hash = "sha256:e9434d3bbf05f310e762147f769c9f21235ee118ba2d2bf1155a7196448bd996"}, + {file = "uvicorn-0.22.0.tar.gz", hash = "sha256:79277ae03db57ce7d9aa0567830bbb51d7a612f54d6e1e3e92da3ef24c2c8ed8"}, ] [package.dependencies] @@ -4617,7 +4285,7 @@ click = ">=7.0" h11 = ">=0.8" [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +standard = ["colorama (>=0.4) ; sys_platform == \"win32\"", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"", "watchfiles (>=0.13)", "websockets (>=10.4)"] [[package]] name = "vine" @@ -4626,7 +4294,6 @@ description = "Python promises." optional = false python-versions = ">=3.6" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc"}, {file = "vine-5.1.0.tar.gz", hash = "sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0"}, @@ -4639,7 +4306,6 @@ description = "Filesystem events monitoring" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "watchdog-3.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:336adfc6f5cc4e037d52db31194f7581ff744b67382eb6021c868322e32eef41"}, {file = "watchdog-3.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a70a8dcde91be523c35b2bf96196edc5730edb347e374c7de7cd20c43ed95397"}, @@ -4678,17 +4344,33 @@ watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "wcwidth" -version = "0.2.14" +version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" optional = false -python-versions = ">=3.6" +python-versions = "*" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "wcwidth-0.2.14-py2.py3-none-any.whl", hash = "sha256:a7bb560c8aee30f9957e5f9895805edd20602f2d7f720186dfd906e82b4982e1"}, - {file = "wcwidth-0.2.14.tar.gz", hash = "sha256:4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605"}, + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, ] +[[package]] +name = "websocket-client" +version = "1.8.0" +description = "WebSocket client for Python with low level API options" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526"}, + {file = "websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"}, +] + +[package.extras] +docs = ["Sphinx (>=6.0)", "myst-parser (>=2.0.0)", "sphinx-rtd-theme (>=1.1.0)"] +optional = ["python-socks", "wsaccel"] +test = ["websockets"] + [[package]] name = "werkzeug" version = "3.1.3" @@ -4696,7 +4378,6 @@ description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, @@ -4710,235 +4391,205 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "wrapt" -version = "1.17.3" +version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04"}, - {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2"}, - {file = "wrapt-1.17.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c"}, - {file = "wrapt-1.17.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775"}, - {file = "wrapt-1.17.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd"}, - {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05"}, - {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418"}, - {file = "wrapt-1.17.3-cp310-cp310-win32.whl", hash = "sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390"}, - {file = "wrapt-1.17.3-cp310-cp310-win_amd64.whl", hash = "sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6"}, - {file = "wrapt-1.17.3-cp310-cp310-win_arm64.whl", hash = "sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f"}, - {file = "wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311"}, - {file = "wrapt-1.17.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1"}, - {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5"}, - {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2"}, - {file = "wrapt-1.17.3-cp311-cp311-win32.whl", hash = "sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89"}, - {file = "wrapt-1.17.3-cp311-cp311-win_amd64.whl", hash = "sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77"}, - {file = "wrapt-1.17.3-cp311-cp311-win_arm64.whl", hash = "sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd"}, - {file = "wrapt-1.17.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828"}, - {file = "wrapt-1.17.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9"}, - {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396"}, - {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc"}, - {file = "wrapt-1.17.3-cp312-cp312-win32.whl", hash = "sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe"}, - {file = "wrapt-1.17.3-cp312-cp312-win_amd64.whl", hash = "sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c"}, - {file = "wrapt-1.17.3-cp312-cp312-win_arm64.whl", hash = "sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7"}, - {file = "wrapt-1.17.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277"}, - {file = "wrapt-1.17.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d"}, - {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa"}, - {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050"}, - {file = "wrapt-1.17.3-cp313-cp313-win32.whl", hash = "sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8"}, - {file = "wrapt-1.17.3-cp313-cp313-win_amd64.whl", hash = "sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb"}, - {file = "wrapt-1.17.3-cp313-cp313-win_arm64.whl", hash = "sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c"}, - {file = "wrapt-1.17.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b"}, - {file = "wrapt-1.17.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa"}, - {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7"}, - {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4"}, - {file = "wrapt-1.17.3-cp314-cp314-win32.whl", hash = "sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10"}, - {file = "wrapt-1.17.3-cp314-cp314-win_amd64.whl", hash = "sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6"}, - {file = "wrapt-1.17.3-cp314-cp314-win_arm64.whl", hash = "sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454"}, - {file = "wrapt-1.17.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e"}, - {file = "wrapt-1.17.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f"}, - {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056"}, - {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804"}, - {file = "wrapt-1.17.3-cp314-cp314t-win32.whl", hash = "sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977"}, - {file = "wrapt-1.17.3-cp314-cp314t-win_amd64.whl", hash = "sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116"}, - {file = "wrapt-1.17.3-cp314-cp314t-win_arm64.whl", hash = "sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:70d86fa5197b8947a2fa70260b48e400bf2ccacdcab97bb7de47e3d1e6312225"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df7d30371a2accfe4013e90445f6388c570f103d61019b6b7c57e0265250072a"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:caea3e9c79d5f0d2c6d9ab96111601797ea5da8e6d0723f77eabb0d4068d2b2f"}, - {file = "wrapt-1.17.3-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:758895b01d546812d1f42204bd443b8c433c44d090248bf22689df673ccafe00"}, - {file = "wrapt-1.17.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02b551d101f31694fc785e58e0720ef7d9a10c4e62c1c9358ce6f63f23e30a56"}, - {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:656873859b3b50eeebe6db8b1455e99d90c26ab058db8e427046dbc35c3140a5"}, - {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a9a2203361a6e6404f80b99234fe7fb37d1fc73487b5a78dc1aa5b97201e0f22"}, - {file = "wrapt-1.17.3-cp38-cp38-win32.whl", hash = "sha256:55cbbc356c2842f39bcc553cf695932e8b30e30e797f961860afb308e6b1bb7c"}, - {file = "wrapt-1.17.3-cp38-cp38-win_amd64.whl", hash = "sha256:ad85e269fe54d506b240d2d7b9f5f2057c2aa9a2ea5b32c66f8902f768117ed2"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:30ce38e66630599e1193798285706903110d4f057aab3168a34b7fdc85569afc"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:65d1d00fbfb3ea5f20add88bbc0f815150dbbde3b026e6c24759466c8b5a9ef9"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a7c06742645f914f26c7f1fa47b8bc4c91d222f76ee20116c43d5ef0912bba2d"}, - {file = "wrapt-1.17.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7e18f01b0c3e4a07fe6dfdb00e29049ba17eadbc5e7609a2a3a4af83ab7d710a"}, - {file = "wrapt-1.17.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f5f51a6466667a5a356e6381d362d259125b57f059103dd9fdc8c0cf1d14139"}, - {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:59923aa12d0157f6b82d686c3fd8e1166fa8cdfb3e17b42ce3b6147ff81528df"}, - {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:46acc57b331e0b3bcb3e1ca3b421d65637915cfcd65eb783cb2f78a511193f9b"}, - {file = "wrapt-1.17.3-cp39-cp39-win32.whl", hash = "sha256:3e62d15d3cfa26e3d0788094de7b64efa75f3a53875cdbccdf78547aed547a81"}, - {file = "wrapt-1.17.3-cp39-cp39-win_amd64.whl", hash = "sha256:1f23fa283f51c890eda8e34e4937079114c74b4c81d2b2f1f1d94948f5cc3d7f"}, - {file = "wrapt-1.17.3-cp39-cp39-win_arm64.whl", hash = "sha256:24c2ed34dc222ed754247a2702b1e1e89fdbaa4016f324b4b8f1a802d4ffe87f"}, - {file = "wrapt-1.17.3-py3-none-any.whl", hash = "sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22"}, - {file = "wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0"}, +files = [ + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:80dd7db6a7cb57ffbc279c4394246414ec99537ae81ffd702443335a61dbf3a7"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a6e821770cf99cc586d33833b2ff32faebdbe886bd6322395606cf55153246c"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b60fb58b90c6d63779cb0c0c54eeb38941bae3ecf7a73c764c52c88c2dcb9d72"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b870b5df5b71d8c3359d21be8f0d6c485fa0ebdb6477dda51a1ea54a9b558061"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4011d137b9955791f9084749cba9a367c68d50ab8d11d64c50ba1688c9b457f2"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:1473400e5b2733e58b396a04eb7f35f541e1fb976d0c0724d0223dd607e0f74c"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3cedbfa9c940fdad3e6e941db7138e26ce8aad38ab5fe9dcfadfed9db7a54e62"}, + {file = "wrapt-1.17.2-cp310-cp310-win32.whl", hash = "sha256:582530701bff1dec6779efa00c516496968edd851fba224fbd86e46cc6b73563"}, + {file = "wrapt-1.17.2-cp310-cp310-win_amd64.whl", hash = "sha256:58705da316756681ad3c9c73fd15499aa4d8c69f9fd38dc8a35e06c12468582f"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ff04ef6eec3eee8a5efef2401495967a916feaa353643defcc03fc74fe213b58"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4db983e7bca53819efdbd64590ee96c9213894272c776966ca6306b73e4affda"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9abc77a4ce4c6f2a3168ff34b1da9b0f311a8f1cfd694ec96b0603dff1c79438"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b929ac182f5ace000d459c59c2c9c33047e20e935f8e39371fa6e3b85d56f4a"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f09b286faeff3c750a879d336fb6d8713206fc97af3adc14def0cdd349df6000"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a7ed2d9d039bd41e889f6fb9364554052ca21ce823580f6a07c4ec245c1f5d6"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:129a150f5c445165ff941fc02ee27df65940fcb8a22a61828b1853c98763a64b"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1fb5699e4464afe5c7e65fa51d4f99e0b2eadcc176e4aa33600a3df7801d6662"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9a2bce789a5ea90e51a02dfcc39e31b7f1e662bc3317979aa7e5538e3a034f72"}, + {file = "wrapt-1.17.2-cp311-cp311-win32.whl", hash = "sha256:4afd5814270fdf6380616b321fd31435a462019d834f83c8611a0ce7484c7317"}, + {file = "wrapt-1.17.2-cp311-cp311-win_amd64.whl", hash = "sha256:acc130bc0375999da18e3d19e5a86403667ac0c4042a094fefb7eec8ebac7cf3"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d5e2439eecc762cd85e7bd37161d4714aa03a33c5ba884e26c81559817ca0925"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fc7cb4c1c744f8c05cd5f9438a3caa6ab94ce8344e952d7c45a8ed59dd88392"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8fdbdb757d5390f7c675e558fd3186d590973244fab0c5fe63d373ade3e99d40"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb1d0dbf99411f3d871deb6faa9aabb9d4e744d67dcaaa05399af89d847a91d"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d18a4865f46b8579d44e4fe1e2bcbc6472ad83d98e22a26c963d46e4c125ef0b"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc570b5f14a79734437cb7b0500376b6b791153314986074486e0b0fa8d71d98"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6d9187b01bebc3875bac9b087948a2bccefe464a7d8f627cf6e48b1bbae30f82"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9e8659775f1adf02eb1e6f109751268e493c73716ca5761f8acb695e52a756ae"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8b2816ebef96d83657b56306152a93909a83f23994f4b30ad4573b00bd11bb9"}, + {file = "wrapt-1.17.2-cp312-cp312-win32.whl", hash = "sha256:468090021f391fe0056ad3e807e3d9034e0fd01adcd3bdfba977b6fdf4213ea9"}, + {file = "wrapt-1.17.2-cp312-cp312-win_amd64.whl", hash = "sha256:ec89ed91f2fa8e3f52ae53cd3cf640d6feff92ba90d62236a81e4e563ac0e991"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6ed6ffac43aecfe6d86ec5b74b06a5be33d5bb9243d055141e8cabb12aa08125"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:35621ae4c00e056adb0009f8e86e28eb4a41a4bfa8f9bfa9fca7d343fe94f998"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a604bf7a053f8362d27eb9fefd2097f82600b856d5abe996d623babd067b1ab5"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cbabee4f083b6b4cd282f5b817a867cf0b1028c54d445b7ec7cfe6505057cf8"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49703ce2ddc220df165bd2962f8e03b84c89fee2d65e1c24a7defff6f988f4d6"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8112e52c5822fc4253f3901b676c55ddf288614dc7011634e2719718eaa187dc"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9fee687dce376205d9a494e9c121e27183b2a3df18037f89d69bd7b35bcf59e2"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:18983c537e04d11cf027fbb60a1e8dfd5190e2b60cc27bc0808e653e7b218d1b"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:703919b1633412ab54bcf920ab388735832fdcb9f9a00ae49387f0fe67dad504"}, + {file = "wrapt-1.17.2-cp313-cp313-win32.whl", hash = "sha256:abbb9e76177c35d4e8568e58650aa6926040d6a9f6f03435b7a522bf1c487f9a"}, + {file = "wrapt-1.17.2-cp313-cp313-win_amd64.whl", hash = "sha256:69606d7bb691b50a4240ce6b22ebb319c1cfb164e5f6569835058196e0f3a845"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:4a721d3c943dae44f8e243b380cb645a709ba5bd35d3ad27bc2ed947e9c68192"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:766d8bbefcb9e00c3ac3b000d9acc51f1b399513f44d77dfe0eb026ad7c9a19b"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e496a8ce2c256da1eb98bd15803a79bee00fc351f5dfb9ea82594a3f058309e0"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d615e4fe22f4ad3528448c193b218e077656ca9ccb22ce2cb20db730f8d306"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5aaeff38654462bc4b09023918b7f21790efb807f54c000a39d41d69cf552cb"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7d15bbd2bc99e92e39f49a04653062ee6085c0e18b3b7512a4f2fe91f2d681"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3890b508a23299083e065f435a492b5435eba6e304a7114d2f919d400888cc6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8c8b293cd65ad716d13d8dd3624e42e5a19cc2a2f1acc74b30c2c13f15cb61a6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c82b8785d98cdd9fed4cac84d765d234ed3251bd6afe34cb7ac523cb93e8b4f"}, + {file = "wrapt-1.17.2-cp313-cp313t-win32.whl", hash = "sha256:13e6afb7fe71fe7485a4550a8844cc9ffbe263c0f1a1eea569bc7091d4898555"}, + {file = "wrapt-1.17.2-cp313-cp313t-win_amd64.whl", hash = "sha256:eaf675418ed6b3b31c7a989fd007fa7c3be66ce14e5c3b27336383604c9da85c"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5c803c401ea1c1c18de70a06a6f79fcc9c5acfc79133e9869e730ad7f8ad8ef9"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f917c1180fdb8623c2b75a99192f4025e412597c50b2ac870f156de8fb101119"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ecc840861360ba9d176d413a5489b9a0aff6d6303d7e733e2c4623cfa26904a6"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb87745b2e6dc56361bfde481d5a378dc314b252a98d7dd19a651a3fa58f24a9"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58455b79ec2661c3600e65c0a716955adc2410f7383755d537584b0de41b1d8a"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4e42a40a5e164cbfdb7b386c966a588b1047558a990981ace551ed7e12ca9c2"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:91bd7d1773e64019f9288b7a5101f3ae50d3d8e6b1de7edee9c2ccc1d32f0c0a"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:bb90fb8bda722a1b9d48ac1e6c38f923ea757b3baf8ebd0c82e09c5c1a0e7a04"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:08e7ce672e35efa54c5024936e559469436f8b8096253404faeb54d2a878416f"}, + {file = "wrapt-1.17.2-cp38-cp38-win32.whl", hash = "sha256:410a92fefd2e0e10d26210e1dfb4a876ddaf8439ef60d6434f21ef8d87efc5b7"}, + {file = "wrapt-1.17.2-cp38-cp38-win_amd64.whl", hash = "sha256:95c658736ec15602da0ed73f312d410117723914a5c91a14ee4cdd72f1d790b3"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99039fa9e6306880572915728d7f6c24a86ec57b0a83f6b2491e1d8ab0235b9a"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2696993ee1eebd20b8e4ee4356483c4cb696066ddc24bd70bcbb80fa56ff9061"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:612dff5db80beef9e649c6d803a8d50c409082f1fedc9dbcdfde2983b2025b82"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c2caa1585c82b3f7a7ab56afef7b3602021d6da34fbc1cf234ff139fed3cd9"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c958bcfd59bacc2d0249dcfe575e71da54f9dcf4a8bdf89c4cb9a68a1170d73f"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc78a84e2dfbc27afe4b2bd7c80c8db9bca75cc5b85df52bfe634596a1da846b"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ba0f0eb61ef00ea10e00eb53a9129501f52385c44853dbd6c4ad3f403603083f"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1e1fe0e6ab7775fd842bc39e86f6dcfc4507ab0ffe206093e76d61cde37225c8"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c86563182421896d73858e08e1db93afdd2b947a70064b813d515d66549e15f9"}, + {file = "wrapt-1.17.2-cp39-cp39-win32.whl", hash = "sha256:f393cda562f79828f38a819f4788641ac7c4085f30f1ce1a68672baa686482bb"}, + {file = "wrapt-1.17.2-cp39-cp39-win_amd64.whl", hash = "sha256:36ccae62f64235cf8ddb682073a60519426fdd4725524ae38874adf72b5f2aeb"}, + {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, + {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] [[package]] name = "yarl" -version = "1.22.0" +version = "1.20.0" description = "Yet another URL library" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" -files = [ - {file = "yarl-1.22.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c7bd6683587567e5a49ee6e336e0612bec8329be1b7d4c8af5687dcdeb67ee1e"}, - {file = "yarl-1.22.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5cdac20da754f3a723cceea5b3448e1a2074866406adeb4ef35b469d089adb8f"}, - {file = "yarl-1.22.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07a524d84df0c10f41e3ee918846e1974aba4ec017f990dc735aad487a0bdfdf"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1b329cb8146d7b736677a2440e422eadd775d1806a81db2d4cded80a48efc1a"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:75976c6945d85dbb9ee6308cd7ff7b1fb9409380c82d6119bd778d8fcfe2931c"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:80ddf7a5f8c86cb3eb4bc9028b07bbbf1f08a96c5c0bc1244be5e8fefcb94147"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d332fc2e3c94dad927f2112395772a4e4fedbcf8f80efc21ed7cdfae4d574fdb"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cf71bf877efeac18b38d3930594c0948c82b64547c1cf420ba48722fe5509f6"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:663e1cadaddae26be034a6ab6072449a8426ddb03d500f43daf952b74553bba0"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6dcbb0829c671f305be48a7227918cfcd11276c2d637a8033a99a02b67bf9eda"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f0d97c18dfd9a9af4490631905a3f131a8e4c9e80a39353919e2cfed8f00aedc"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:437840083abe022c978470b942ff832c3940b2ad3734d424b7eaffcd07f76737"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a899cbd98dce6f5d8de1aad31cb712ec0a530abc0a86bd6edaa47c1090138467"}, - {file = "yarl-1.22.0-cp310-cp310-win32.whl", hash = "sha256:595697f68bd1f0c1c159fcb97b661fc9c3f5db46498043555d04805430e79bea"}, - {file = "yarl-1.22.0-cp310-cp310-win_amd64.whl", hash = "sha256:cb95a9b1adaa48e41815a55ae740cfda005758104049a640a398120bf02515ca"}, - {file = "yarl-1.22.0-cp310-cp310-win_arm64.whl", hash = "sha256:b85b982afde6df99ecc996990d4ad7ccbdbb70e2a4ba4de0aecde5922ba98a0b"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ab72135b1f2db3fed3997d7e7dc1b80573c67138023852b6efb336a5eae6511"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:669930400e375570189492dc8d8341301578e8493aec04aebc20d4717f899dd6"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:792a2af6d58177ef7c19cbf0097aba92ca1b9cb3ffdd9c7470e156c8f9b5e028"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ea66b1c11c9150f1372f69afb6b8116f2dd7286f38e14ea71a44eee9ec51b9d"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3e2daa88dc91870215961e96a039ec73e4937da13cf77ce17f9cad0c18df3503"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba440ae430c00eee41509353628600212112cd5018d5def7e9b05ea7ac34eb65"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e6438cc8f23a9c1478633d216b16104a586b9761db62bfacb6425bac0a36679e"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c52a6e78aef5cf47a98ef8e934755abf53953379b7d53e68b15ff4420e6683d"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3b06bcadaac49c70f4c88af4ffcfbe3dc155aab3163e75777818092478bcbbe7"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:6944b2dc72c4d7f7052683487e3677456050ff77fcf5e6204e98caf785ad1967"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5372ca1df0f91a86b047d1277c2aaf1edb32d78bbcefffc81b40ffd18f027ed"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:51af598701f5299012b8416486b40fceef8c26fc87dc6d7d1f6fc30609ea0aa6"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b266bd01fedeffeeac01a79ae181719ff848a5a13ce10075adbefc8f1daee70e"}, - {file = "yarl-1.22.0-cp311-cp311-win32.whl", hash = "sha256:a9b1ba5610a4e20f655258d5a1fdc7ebe3d837bb0e45b581398b99eb98b1f5ca"}, - {file = "yarl-1.22.0-cp311-cp311-win_amd64.whl", hash = "sha256:078278b9b0b11568937d9509b589ee83ef98ed6d561dfe2020e24a9fd08eaa2b"}, - {file = "yarl-1.22.0-cp311-cp311-win_arm64.whl", hash = "sha256:b6a6f620cfe13ccec221fa312139135166e47ae169f8253f72a0abc0dae94376"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e340382d1afa5d32b892b3ff062436d592ec3d692aeea3bef3a5cfe11bbf8c6f"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f1e09112a2c31ffe8d80be1b0988fa6a18c5d5cad92a9ffbb1c04c91bfe52ad2"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:939fe60db294c786f6b7c2d2e121576628468f65453d86b0fe36cb52f987bd74"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1651bf8e0398574646744c1885a41198eba53dc8a9312b954073f845c90a8df"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b8a0588521a26bf92a57a1705b77b8b59044cdceccac7151bd8d229e66b8dedb"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42188e6a615c1a75bcaa6e150c3fe8f3e8680471a6b10150c5f7e83f47cc34d2"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6d2cb59377d99718913ad9a151030d6f83ef420a2b8f521d94609ecc106ee82"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50678a3b71c751d58d7908edc96d332af328839eea883bb554a43f539101277a"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e8fbaa7cec507aa24ea27a01456e8dd4b6fab829059b69844bd348f2d467124"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:433885ab5431bc3d3d4f2f9bd15bfa1614c522b0f1405d62c4f926ccd69d04fa"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b790b39c7e9a4192dc2e201a282109ed2985a1ddbd5ac08dc56d0e121400a8f7"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31f0b53913220599446872d757257be5898019c85e7971599065bc55065dc99d"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a49370e8f711daec68d09b821a34e1167792ee2d24d405cbc2387be4f158b520"}, - {file = "yarl-1.22.0-cp312-cp312-win32.whl", hash = "sha256:70dfd4f241c04bd9239d53b17f11e6ab672b9f1420364af63e8531198e3f5fe8"}, - {file = "yarl-1.22.0-cp312-cp312-win_amd64.whl", hash = "sha256:8884d8b332a5e9b88e23f60bb166890009429391864c685e17bd73a9eda9105c"}, - {file = "yarl-1.22.0-cp312-cp312-win_arm64.whl", hash = "sha256:ea70f61a47f3cc93bdf8b2f368ed359ef02a01ca6393916bc8ff877427181e74"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8dee9c25c74997f6a750cd317b8ca63545169c098faee42c84aa5e506c819b53"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01e73b85a5434f89fc4fe27dcda2aff08ddf35e4d47bbbea3bdcd25321af538a"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:22965c2af250d20c873cdbee8ff958fb809940aeb2e74ba5f20aaf6b7ac8c70c"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4f15793aa49793ec8d1c708ab7f9eded1aa72edc5174cae703651555ed1b601"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5542339dcf2747135c5c85f68680353d5cb9ffd741c0f2e8d832d054d41f35a"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5c401e05ad47a75869c3ab3e35137f8468b846770587e70d71e11de797d113df"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:243dda95d901c733f5b59214d28b0120893d91777cb8aa043e6ef059d3cddfe2"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bec03d0d388060058f5d291a813f21c011041938a441c593374da6077fe21b1b"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b0748275abb8c1e1e09301ee3cf90c8a99678a4e92e4373705f2a2570d581273"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:47fdb18187e2a4e18fda2c25c05d8251a9e4a521edaed757fef033e7d8498d9a"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c7044802eec4524fde550afc28edda0dd5784c4c45f0be151a2d3ba017daca7d"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:139718f35149ff544caba20fce6e8a2f71f1e39b92c700d8438a0b1d2a631a02"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e1b51bebd221006d3d2f95fbe124b22b247136647ae5dcc8c7acafba66e5ee67"}, - {file = "yarl-1.22.0-cp313-cp313-win32.whl", hash = "sha256:d3e32536234a95f513bd374e93d717cf6b2231a791758de6c509e3653f234c95"}, - {file = "yarl-1.22.0-cp313-cp313-win_amd64.whl", hash = "sha256:47743b82b76d89a1d20b83e60d5c20314cbd5ba2befc9cda8f28300c4a08ed4d"}, - {file = "yarl-1.22.0-cp313-cp313-win_arm64.whl", hash = "sha256:5d0fcda9608875f7d052eff120c7a5da474a6796fe4d83e152e0e4d42f6d1a9b"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:719ae08b6972befcba4310e49edb1161a88cdd331e3a694b84466bd938a6ab10"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:47d8a5c446df1c4db9d21b49619ffdba90e77c89ec6e283f453856c74b50b9e3"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cfebc0ac8333520d2d0423cbbe43ae43c8838862ddb898f5ca68565e395516e9"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4398557cbf484207df000309235979c79c4356518fd5c99158c7d38203c4da4f"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2ca6fd72a8cd803be290d42f2dec5cdcd5299eeb93c2d929bf060ad9efaf5de0"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca1f59c4e1ab6e72f0a23c13fca5430f889634166be85dbf1013683e49e3278e"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c5010a52015e7c70f86eb967db0f37f3c8bd503a695a49f8d45700144667708"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d7672ecf7557476642c88497c2f8d8542f8e36596e928e9bcba0e42e1e7d71f"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3b7c88eeef021579d600e50363e0b6ee4f7f6f728cd3486b9d0f3ee7b946398d"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f4afb5c34f2c6fecdcc182dfcfc6af6cccf1aa923eed4d6a12e9d96904e1a0d8"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:59c189e3e99a59cf8d83cbb31d4db02d66cda5a1a4374e8a012b51255341abf5"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:5a3bf7f62a289fa90f1990422dc8dff5a458469ea71d1624585ec3a4c8d6960f"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:de6b9a04c606978fdfe72666fa216ffcf2d1a9f6a381058d4378f8d7b1e5de62"}, - {file = "yarl-1.22.0-cp313-cp313t-win32.whl", hash = "sha256:1834bb90991cc2999f10f97f5f01317f99b143284766d197e43cd5b45eb18d03"}, - {file = "yarl-1.22.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff86011bd159a9d2dfc89c34cfd8aff12875980e3bd6a39ff097887520e60249"}, - {file = "yarl-1.22.0-cp313-cp313t-win_arm64.whl", hash = "sha256:7861058d0582b847bc4e3a4a4c46828a410bca738673f35a29ba3ca5db0b473b"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:34b36c2c57124530884d89d50ed2c1478697ad7473efd59cfd479945c95650e4"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:0dd9a702591ca2e543631c2a017e4a547e38a5c0f29eece37d9097e04a7ac683"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:594fcab1032e2d2cc3321bb2e51271e7cd2b516c7d9aee780ece81b07ff8244b"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f3d7a87a78d46a2e3d5b72587ac14b4c16952dd0887dbb051451eceac774411e"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:852863707010316c973162e703bddabec35e8757e67fcb8ad58829de1ebc8590"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:131a085a53bfe839a477c0845acf21efc77457ba2bcf5899618136d64f3303a2"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:078a8aefd263f4d4f923a9677b942b445a2be970ca24548a8102689a3a8ab8da"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bca03b91c323036913993ff5c738d0842fc9c60c4648e5c8d98331526df89784"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:68986a61557d37bb90d3051a45b91fa3d5c516d177dfc6dd6f2f436a07ff2b6b"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4792b262d585ff0dff6bcb787f8492e40698443ec982a3568c2096433660c694"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ebd4549b108d732dba1d4ace67614b9545b21ece30937a63a65dd34efa19732d"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f87ac53513d22240c7d59203f25cc3beac1e574c6cd681bbfd321987b69f95fd"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:22b029f2881599e2f1b06f8f1db2ee63bd309e2293ba2d566e008ba12778b8da"}, - {file = "yarl-1.22.0-cp314-cp314-win32.whl", hash = "sha256:6a635ea45ba4ea8238463b4f7d0e721bad669f80878b7bfd1f89266e2ae63da2"}, - {file = "yarl-1.22.0-cp314-cp314-win_amd64.whl", hash = "sha256:0d6e6885777af0f110b0e5d7e5dda8b704efed3894da26220b7f3d887b839a79"}, - {file = "yarl-1.22.0-cp314-cp314-win_arm64.whl", hash = "sha256:8218f4e98d3c10d683584cb40f0424f4b9fd6e95610232dd75e13743b070ee33"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:45c2842ff0e0d1b35a6bf1cd6c690939dacb617a70827f715232b2e0494d55d1"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:d947071e6ebcf2e2bee8fce76e10faca8f7a14808ca36a910263acaacef08eca"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:334b8721303e61b00019474cc103bdac3d7b1f65e91f0bfedeec2d56dfe74b53"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e7ce67c34138a058fd092f67d07a72b8e31ff0c9236e751957465a24b28910c"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d77e1b2c6d04711478cb1c4ab90db07f1609ccf06a287d5607fcd90dc9863acf"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4647674b6150d2cae088fc07de2738a84b8bcedebef29802cf0b0a82ab6face"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efb07073be061c8f79d03d04139a80ba33cbd390ca8f0297aae9cce6411e4c6b"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e51ac5435758ba97ad69617e13233da53908beccc6cfcd6c34bbed8dcbede486"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:33e32a0dd0c8205efa8e83d04fc9f19313772b78522d1bdc7d9aed706bfd6138"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:bf4a21e58b9cde0e401e683ebd00f6ed30a06d14e93f7c8fd059f8b6e8f87b6a"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e4b582bab49ac33c8deb97e058cd67c2c50dac0dd134874106d9c774fd272529"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0b5bcc1a9c4839e7e30b7b30dd47fe5e7e44fb7054ec29b5bb8d526aa1041093"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c0232bce2170103ec23c454e54a57008a9a72b5d1c3105dc2496750da8cfa47c"}, - {file = "yarl-1.22.0-cp314-cp314t-win32.whl", hash = "sha256:8009b3173bcd637be650922ac455946197d858b3630b6d8787aa9e5c4564533e"}, - {file = "yarl-1.22.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9fb17ea16e972c63d25d4a97f016d235c78dd2344820eb35bc034bc32012ee27"}, - {file = "yarl-1.22.0-cp314-cp314t-win_arm64.whl", hash = "sha256:9f6d73c1436b934e3f01df1e1b21ff765cd1d28c77dfb9ace207f746d4610ee1"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3aa27acb6de7a23785d81557577491f6c38a5209a254d1191519d07d8fe51748"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:af74f05666a5e531289cb1cc9c883d1de2088b8e5b4de48004e5ca8a830ac859"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:62441e55958977b8167b2709c164c91a6363e25da322d87ae6dd9c6019ceecf9"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b580e71cac3f8113d3135888770903eaf2f507e9421e5697d6ee6d8cd1c7f054"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e81fda2fb4a07eda1a2252b216aa0df23ebcd4d584894e9612e80999a78fd95b"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:99b6fc1d55782461b78221e95fc357b47ad98b041e8e20f47c1411d0aacddc60"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:088e4e08f033db4be2ccd1f34cf29fe994772fb54cfe004bbf54db320af56890"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e4e1f6f0b4da23e61188676e3ed027ef0baa833a2e633c29ff8530800edccba"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:84fc3ec96fce86ce5aa305eb4aa9358279d1aa644b71fab7b8ed33fe3ba1a7ca"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5dbeefd6ca588b33576a01b0ad58aa934bc1b41ef89dee505bf2932b22ddffba"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:14291620375b1060613f4aab9ebf21850058b6b1b438f386cc814813d901c60b"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a4fcfc8eb2c34148c118dfa02e6427ca278bfd0f3df7c5f99e33d2c0e81eae3e"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:029866bde8d7b0878b9c160e72305bbf0a7342bcd20b9999381704ae03308dc8"}, - {file = "yarl-1.22.0-cp39-cp39-win32.whl", hash = "sha256:4dcc74149ccc8bba31ce1944acee24813e93cfdee2acda3c172df844948ddf7b"}, - {file = "yarl-1.22.0-cp39-cp39-win_amd64.whl", hash = "sha256:10619d9fdee46d20edc49d3479e2f8269d0779f1b031e6f7c2aa1c76be04b7ed"}, - {file = "yarl-1.22.0-cp39-cp39-win_arm64.whl", hash = "sha256:dd7afd3f8b0bfb4e0d9fc3c31bfe8a4ec7debe124cfd90619305def3c8ca8cd2"}, - {file = "yarl-1.22.0-py3-none-any.whl", hash = "sha256:1380560bdba02b6b6c90de54133c81c9f2a453dee9912fe58c1dcced1edb7cff"}, - {file = "yarl-1.22.0.tar.gz", hash = "sha256:bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71"}, +files = [ + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f1f6670b9ae3daedb325fa55fbe31c22c8228f6e0b513772c2e1c623caa6ab22"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85a231fa250dfa3308f3c7896cc007a47bc76e9e8e8595c20b7426cac4884c62"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a06701b647c9939d7019acdfa7ebbfbb78ba6aa05985bb195ad716ea759a569"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7595498d085becc8fb9203aa314b136ab0516c7abd97e7d74f7bb4eb95042abe"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af5607159085dcdb055d5678fc2d34949bd75ae6ea6b4381e784bbab1c3aa195"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:95b50910e496567434cb77a577493c26bce0f31c8a305135f3bda6a2483b8e10"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b594113a301ad537766b4e16a5a6750fcbb1497dcc1bc8a4daae889e6402a634"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:083ce0393ea173cd37834eb84df15b6853b555d20c52703e21fbababa8c129d2"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f1a350a652bbbe12f666109fbddfdf049b3ff43696d18c9ab1531fbba1c977a"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fb0caeac4a164aadce342f1597297ec0ce261ec4532bbc5a9ca8da5622f53867"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d88cc43e923f324203f6ec14434fa33b85c06d18d59c167a0637164863b8e995"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e52d6ed9ea8fd3abf4031325dc714aed5afcbfa19ee4a89898d663c9976eb487"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ce360ae48a5e9961d0c730cf891d40698a82804e85f6e74658fb175207a77cb2"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:06d06c9d5b5bc3eb56542ceeba6658d31f54cf401e8468512447834856fb0e61"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c27d98f4e5c4060582f44e58309c1e55134880558f1add7a87c1bc36ecfade19"}, + {file = "yarl-1.20.0-cp310-cp310-win32.whl", hash = "sha256:f4d3fa9b9f013f7050326e165c3279e22850d02ae544ace285674cb6174b5d6d"}, + {file = "yarl-1.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:bc906b636239631d42eb8a07df8359905da02704a868983265603887ed68c076"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fdb5204d17cb32b2de2d1e21c7461cabfacf17f3645e4b9039f210c5d3378bf3"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:eaddd7804d8e77d67c28d154ae5fab203163bd0998769569861258e525039d2a"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:634b7ba6b4a85cf67e9df7c13a7fb2e44fa37b5d34501038d174a63eaac25ee2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d409e321e4addf7d97ee84162538c7258e53792eb7c6defd0c33647d754172e"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ea52f7328a36960ba3231c6677380fa67811b414798a6e071c7085c57b6d20a9"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8703517b924463994c344dcdf99a2d5ce9eca2b6882bb640aa555fb5efc706a"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:077989b09ffd2f48fb2d8f6a86c5fef02f63ffe6b1dd4824c76de7bb01e4f2e2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0acfaf1da020253f3533526e8b7dd212838fdc4109959a2c53cafc6db611bff2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b4230ac0b97ec5eeb91d96b324d66060a43fd0d2a9b603e3327ed65f084e41f8"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a6a1e6ae21cdd84011c24c78d7a126425148b24d437b5702328e4ba640a8902"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:86de313371ec04dd2531f30bc41a5a1a96f25a02823558ee0f2af0beaa7ca791"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dd59c9dd58ae16eaa0f48c3d0cbe6be8ab4dc7247c3ff7db678edecbaf59327f"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a0bc5e05f457b7c1994cc29e83b58f540b76234ba6b9648a4971ddc7f6aa52da"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c9471ca18e6aeb0e03276b5e9b27b14a54c052d370a9c0c04a68cefbd1455eb4"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40ed574b4df723583a26c04b298b283ff171bcc387bc34c2683235e2487a65a5"}, + {file = "yarl-1.20.0-cp311-cp311-win32.whl", hash = "sha256:db243357c6c2bf3cd7e17080034ade668d54ce304d820c2a58514a4e51d0cfd6"}, + {file = "yarl-1.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:8c12cd754d9dbd14204c328915e23b0c361b88f3cffd124129955e60a4fbfcfb"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e06b9f6cdd772f9b665e5ba8161968e11e403774114420737f7884b5bd7bdf6f"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b9ae2fbe54d859b3ade40290f60fe40e7f969d83d482e84d2c31b9bff03e359e"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d12b8945250d80c67688602c891237994d203d42427cb14e36d1a732eda480e"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:087e9731884621b162a3e06dc0d2d626e1542a617f65ba7cc7aeab279d55ad33"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:69df35468b66c1a6e6556248e6443ef0ec5f11a7a4428cf1f6281f1879220f58"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b2992fe29002fd0d4cbaea9428b09af9b8686a9024c840b8a2b8f4ea4abc16f"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4c903e0b42aab48abfbac668b5a9d7b6938e721a6341751331bcd7553de2dcae"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf099e2432131093cc611623e0b0bcc399b8cddd9a91eded8bfb50402ec35018"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a7f62f5dc70a6c763bec9ebf922be52aa22863d9496a9a30124d65b489ea672"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:54ac15a8b60382b2bcefd9a289ee26dc0920cf59b05368c9b2b72450751c6eb8"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:25b3bc0763a7aca16a0f1b5e8ef0f23829df11fb539a1b70476dcab28bd83da7"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b2586e36dc070fc8fad6270f93242124df68b379c3a251af534030a4a33ef594"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:866349da9d8c5290cfefb7fcc47721e94de3f315433613e01b435473be63daa6"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:33bb660b390a0554d41f8ebec5cd4475502d84104b27e9b42f5321c5192bfcd1"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737e9f171e5a07031cbee5e9180f6ce21a6c599b9d4b2c24d35df20a52fabf4b"}, + {file = "yarl-1.20.0-cp312-cp312-win32.whl", hash = "sha256:839de4c574169b6598d47ad61534e6981979ca2c820ccb77bf70f4311dd2cc64"}, + {file = "yarl-1.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:3d7dbbe44b443b0c4aa0971cb07dcb2c2060e4a9bf8d1301140a33a93c98e18c"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2137810a20b933b1b1b7e5cf06a64c3ed3b4747b0e5d79c9447c00db0e2f752f"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:447c5eadd750db8389804030d15f43d30435ed47af1313303ed82a62388176d3"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42fbe577272c203528d402eec8bf4b2d14fd49ecfec92272334270b850e9cd7d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18e321617de4ab170226cd15006a565d0fa0d908f11f724a2c9142d6b2812ab0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4345f58719825bba29895011e8e3b545e6e00257abb984f9f27fe923afca2501"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d9b980d7234614bc4674468ab173ed77d678349c860c3af83b1fffb6a837ddc"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af4baa8a445977831cbaa91a9a84cc09debb10bc8391f128da2f7bd070fc351d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:123393db7420e71d6ce40d24885a9e65eb1edefc7a5228db2d62bcab3386a5c0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab47acc9332f3de1b39e9b702d9c916af7f02656b2a86a474d9db4e53ef8fd7a"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4a34c52ed158f89876cba9c600b2c964dfc1ca52ba7b3ab6deb722d1d8be6df2"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:04d8cfb12714158abf2618f792c77bc5c3d8c5f37353e79509608be4f18705c9"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7dc63ad0d541c38b6ae2255aaa794434293964677d5c1ec5d0116b0e308031f5"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d02b591a64e4e6ca18c5e3d925f11b559c763b950184a64cf47d74d7e41877"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:95fc9876f917cac7f757df80a5dda9de59d423568460fe75d128c813b9af558e"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb769ae5760cd1c6a712135ee7915f9d43f11d9ef769cb3f75a23e398a92d384"}, + {file = "yarl-1.20.0-cp313-cp313-win32.whl", hash = "sha256:70e0c580a0292c7414a1cead1e076c9786f685c1fc4757573d2967689b370e62"}, + {file = "yarl-1.20.0-cp313-cp313-win_amd64.whl", hash = "sha256:4c43030e4b0af775a85be1fa0433119b1565673266a70bf87ef68a9d5ba3174c"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b6c4c3d0d6a0ae9b281e492b1465c72de433b782e6b5001c8e7249e085b69051"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8681700f4e4df891eafa4f69a439a6e7d480d64e52bf460918f58e443bd3da7d"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:84aeb556cb06c00652dbf87c17838eb6d92cfd317799a8092cee0e570ee11229"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f166eafa78810ddb383e930d62e623d288fb04ec566d1b4790099ae0f31485f1"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5d3d6d14754aefc7a458261027a562f024d4f6b8a798adb472277f675857b1eb"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a8f64df8ed5d04c51260dbae3cc82e5649834eebea9eadfd829837b8093eb00"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4d9949eaf05b4d30e93e4034a7790634bbb41b8be2d07edd26754f2e38e491de"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c366b254082d21cc4f08f522ac201d0d83a8b8447ab562732931d31d80eb2a5"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91bc450c80a2e9685b10e34e41aef3d44ddf99b3a498717938926d05ca493f6a"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c2aa4387de4bc3a5fe158080757748d16567119bef215bec643716b4fbf53f9"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d2cbca6760a541189cf87ee54ff891e1d9ea6406079c66341008f7ef6ab61145"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:798a5074e656f06b9fad1a162be5a32da45237ce19d07884d0b67a0aa9d5fdda"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f106e75c454288472dbe615accef8248c686958c2e7dd3b8d8ee2669770d020f"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3b60a86551669c23dc5445010534d2c5d8a4e012163218fc9114e857c0586fdd"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:3e429857e341d5e8e15806118e0294f8073ba9c4580637e59ab7b238afca836f"}, + {file = "yarl-1.20.0-cp313-cp313t-win32.whl", hash = "sha256:65a4053580fe88a63e8e4056b427224cd01edfb5f951498bfefca4052f0ce0ac"}, + {file = "yarl-1.20.0-cp313-cp313t-win_amd64.whl", hash = "sha256:53b2da3a6ca0a541c1ae799c349788d480e5144cac47dba0266c7cb6c76151fe"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:119bca25e63a7725b0c9d20ac67ca6d98fa40e5a894bd5d4686010ff73397914"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:35d20fb919546995f1d8c9e41f485febd266f60e55383090010f272aca93edcc"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:484e7a08f72683c0f160270566b4395ea5412b4359772b98659921411d32ad26"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d8a3d54a090e0fff5837cd3cc305dd8a07d3435a088ddb1f65e33b322f66a94"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f0cf05ae2d3d87a8c9022f3885ac6dea2b751aefd66a4f200e408a61ae9b7f0d"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a884b8974729e3899d9287df46f015ce53f7282d8d3340fa0ed57536b440621c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8d8aa8dd89ffb9a831fedbcb27d00ffd9f4842107d52dc9d57e64cb34073d5c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4e88d6c3c8672f45a30867817e4537df1bbc6f882a91581faf1f6d9f0f1b5a"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdb77efde644d6f1ad27be8a5d67c10b7f769804fff7a966ccb1da5a4de4b656"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4ba5e59f14bfe8d261a654278a0f6364feef64a794bd456a8c9e823071e5061c"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d0bf955b96ea44ad914bc792c26a0edcd71b4668b93cbcd60f5b0aeaaed06c64"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:27359776bc359ee6eaefe40cb19060238f31228799e43ebd3884e9c589e63b20"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:04d9c7a1dc0a26efb33e1acb56c8849bd57a693b85f44774356c92d610369efa"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:faa709b66ae0e24c8e5134033187a972d849d87ed0a12a0366bedcc6b5dc14a5"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:44869ee8538208fe5d9342ed62c11cc6a7a1af1b3d0bb79bb795101b6e77f6e0"}, + {file = "yarl-1.20.0-cp39-cp39-win32.whl", hash = "sha256:b7fa0cb9fd27ffb1211cde944b41f5c67ab1c13a13ebafe470b1e206b8459da8"}, + {file = "yarl-1.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:d4fad6e5189c847820288286732075f213eabf81be4d08d6cc309912e62be5b7"}, + {file = "yarl-1.20.0-py3-none-any.whl", hash = "sha256:5d0fe6af927a47a230f31e6004621fd0959eaa915fc62acfafa67ff7229a3124"}, + {file = "yarl-1.20.0.tar.gz", hash = "sha256:686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307"}, ] [package.dependencies] @@ -4948,26 +4599,25 @@ propcache = ">=0.2.1" [[package]] name = "zipp" -version = "3.23.0" +version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" groups = ["main"] -markers = "python_version == \"3.11\" or python_version >= \"3.12\"" files = [ - {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, - {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, + {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, + {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = "^3.11" -content-hash = "02b458d29498290917a02277daf00235fe7c5eeb349c80697aa740c0806f665d" +python-versions = ">=3.11,<4.0" +content-hash = "beb8218066a94780a0132b9652642cfa49185bb2fd06e8eb9e4d5fd5b4c560fd" diff --git a/api/pyproject.toml b/api/pyproject.toml index 0b922bbfb8..8913f34b95 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,11 +1,8 @@ [project] name = "api" -version = "0.62.0" +version = "0.48.0" description = "Agenta API" -authors = [ - { name = "Mahmoud Mabrouk", email = "mahmoud@agenta.ai" }, - { name = "Juan Vega", email = "jp@agenta.ai" } -] +authors = [{ name = "Mahmoud Mabrouk", email = "mahmoud@agenta.ai" }] [tool.poetry] package-mode = false # use pyproject.toml as dependency management and not for packaging @@ -15,59 +12,64 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.poetry.dependencies] -python = "^3.11" -fastapi = "^0.116.1" -pydantic = "^2.11.7" -uvicorn = "^0.34.3" -redis = "^6.4.0" -sendgrid = "^6.12.4" -restrictedpython = { version = "^8.0", python = ">=3.11,<3.14" } -celery = "^5.5.3" -newrelic = "^10.17.0" -openai = ">=1.106.0" -sqlalchemy = "^2.0.43" +python = ">=3.11,<4.0" +fastapi = "^0.115.4" +pydantic = "^2.7.4" +toml = "^0.10.2" +uvicorn = "^0.22.0" +motor = "^3.1.2" +python-multipart = "^0.0.18" +backoff = "^2.2.1" +redis = "^6.1.0" +sendgrid = "^6.10.0" +restrictedpython = { version = "^8.0", python = ">=3.11,<3.12" } +pytest-mock = "^3.11.1" +boto3 = "^1.28.63" +asyncer = "^0.0.2" +anyio = "==3.7.1" +kubernetes = "^28.1.0" +celery = "^5.3.6" +watchdog = { extras = ["watchmedo"], version = "^3.0.0" } +beanie = "^1.25.0" +newrelic = "^9.8.0" +aioboto3 = "^12.4.0" +openai = "^1.75.0" +sqlalchemy = "^2.0.30" asyncpg = "^0.30.0" +psycopg2-binary = "^2.9.9" uuid-utils = "^0.10.0" -alembic = "^1.16.5" -numpy = "^2.3.2" +sqlalchemy-json = "^0.7.0" +tqdm = "^4.66.6" +alembic = "^1.13.2" +numpy = "1.26.3" autoevals = "^0.0.83" -supertokens-python = "^0.29.2" -opentelemetry-proto = "^1.36.0" -posthog = "^3.25.0" +supertokens-python = "^0.29.0" +opentelemetry-proto = ">=1.27.0,<2.0.0" +litellm = "^1.67.5" +jinja2 = "^3.1.6" +click = "^8.1.8" +posthog = "^3.23.0" stripe = "^11.6.0" -structlog= "^25.4.0" -httpx = "^0.28.1" -genson = "^1.3.0" -jsonschema = "^4.23.0" -orjson = "^3.11.3" -pandas = "^2.3.2" -googleapis-common-protos = "^1.70.0" -watchdog = { extras = ["watchmedo"], version = "^3.0.0" } -sqlalchemy-json = "^0.7.0" -python-multipart = "^0.0.20" -gunicorn = "^23.0.0" -python-jsonpath = "^2.0.0" +structlog= "^25.2.0" +httpx = ">=0.28.0" +genson = ">=1.3.0" +jsonschema = ">=4.23.0" +orjson = ">=3.10.18" +dask = ">=2025.4.1" -# opentelemetry-api = "^1.36.0" -# opentelemetry-sdk = "^1.36.0" -# opentelemetry-exporter-otlp-proto-http = "^1.36.0" +# opentelemetry-api = ">=1.27.0,<2.0.0" +# opentelemetry-sdk = ">=1.27.0,<2.0.0" +# opentelemetry-exporter-otlp-proto-http =">=1.27.0,<2.0.0" # protobuf = "<5.0.0" # audit fixes -h11 = "^0.16.0" +h11 = ">=0.16.0" ecdsa = "^0.19.1" -bson = "^0.5.10" -agenta = ">=0.61.0" -tiktoken = "0.11.0" - -google-auth = ">=2.23,<3" [tool.poetry.group.dev.dependencies] -pytest = "^8.4.2" +pytest = "^7.3.1" pytest-asyncio = "^0.21.1" faker = "^23.2.0" pexpect = "^4.9.0" pytest-xdist = "^3.6.1" pytz = "^2024.2" -pytest-mock = "^3.11.1" -click = "^8.1.8" diff --git a/api/pytest.ini b/api/pytest.ini deleted file mode 100644 index b8cc765e0c..0000000000 --- a/api/pytest.ini +++ /dev/null @@ -1,26 +0,0 @@ -[pytest] -testpaths = - oss/tests/pytest - ee/tests/pytest -addopts = -ra -asyncio_mode = auto -markers = - coverage_smoke: breadth over depth - coverage_full: breadth and depth - lens_functional: it works - lens_performance: it works fast - lens_security: it works securely - plan_hobby: organization as hobby - plan_pro: organization as pro - plan_business: organization as business - plan_enterprise: organization as enterprise - role_owner: user as owner - role_admin: user as admin - role_editor: user as editor - role_viewer: user as viewer - path_happy: desired behavior - path_grumpy: undesired behavior - case_typical: likely behavior - case_edge: unlikely behavior - speed_fast: ~ milliseconds - speed_slow: ~ seconds \ No newline at end of file diff --git a/api/run-tests.py b/api/run-tests.py deleted file mode 100644 index c626a1dff8..0000000000 --- a/api/run-tests.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env python3 -from typing import Optional -import os -import subprocess -import click - -from dotenv import load_dotenv - - -TYPES = { - "license": ["ee", "oss"], - "coverage": ["smoke"], - "lens": ["functional", "performance", "security"], - "plan": ["hobby", "pro", "business", "enterprise"], - "role": ["owner", "admin", "editor", "viewer"], - "path": ["happy", "grumpy"], - "case": ["typical", "edge"], - "speed": ["fast", "slow"], -} - - -@click.command() -@click.option( - "--env-file", - type=click.Path(exists=True, dir_okay=False), - help="Path to a .env.* file with AGENTA_API_URL and AGENTA_AUTH_KEY", -) -@click.option( - "--api-url", - type=str, - help="API URL for Agenta", - envvar="AGENTA_API_URL", -) -@click.option( - "--auth-key", - type=str, - help="Access token for Agenta", - envvar="AGENTA_AUTH_KEY", -) -@click.option( - "--license", - default="oss", - type=click.Choice(TYPES["license"]), - help="License [oss|ee]", - show_default=True, -) -@click.option( - "--coverage", - type=click.Choice(TYPES["coverage"]), - help="Coverage [smoke]", - show_default=True, -) -@click.option( - "--lens", - type=click.Choice(TYPES["lens"]), - help="Lens [functional|performance|security]", - show_default=True, -) -@click.option( - "--plan", - type=click.Choice(TYPES["plan"]), - help="Plan [hobby|pro|business|enterprise]", -) -@click.option( - "--role", - type=click.Choice(TYPES["role"]), - help="Role [owner|admin|editor|viewer]", -) -@click.option( - "--path", - type=click.Choice(TYPES["path"]), - help="Path [happy|grumpy]", -) -@click.option( - "--case", - type=click.Choice(TYPES["case"]), - help="Case [typical|edge]", -) -@click.option( - "--speed", - type=click.Choice(TYPES["speed"]), - help="Speed [fast|slow]", -) -@click.option( - "--scope", - help="Scope [...]", -) -@click.argument( - "pytest_args", - nargs=-1, - type=click.UNPROCESSED, -) -def run_tests( - license: str, # pylint: disable=redefined-builtin - env_file: Optional[str] = None, - api_url: Optional[str] = None, - auth_key: Optional[str] = None, - coverage: Optional[str] = None, - lens: Optional[str] = None, - plan: Optional[str] = None, - role: Optional[str] = None, - path: Optional[str] = None, - case: Optional[str] = None, - speed: Optional[str] = None, - scope: Optional[str] = None, - pytest_args: Optional[tuple] = None, -): - """ - Run pytest with dynamic markers and environment configuration. - - Additional args after '--' are passed directly to pytest. - """ - marker_args = [] - - if env_file: - load_dotenv(env_file) - click.echo(f"Loaded environment variables from {env_file}") - _license = os.getenv("AGENTA_LICENSE") - if _license in TYPES["license"]: - license = _license - if not api_url: - api_url = os.getenv("AGENTA_API_URL") - if not auth_key: - auth_key = os.getenv("AGENTA_AUTH_KEY") - - # Set API_URL and AUTH_KEY as env vars for tests - if api_url: - os.environ["AGENTA_API_URL"] = api_url - click.echo(f"AGENTA_API_URL={api_url}") - if auth_key: - os.environ["AGENTA_AUTH_KEY"] = auth_key - L = len(auth_key) - message = f"AGENTA_AUTH_KEY={auth_key[:2]}" + "." * (L - 4) + f"{auth_key[-2:]}" - click.echo(message) - - # Set optional dimensions - for name, value in [ - ("COVERAGE", coverage), - ("LENS", lens), - ("PLAN", plan), - ("ROLE", role), - ("PATH", path), - ("CASE", case), - ("SPEED", speed), - ("SCOPE", scope), - ]: - if value: - os.environ[name] = value - click.echo(f"{name}={value}") - marker_args.append(f"{name.lower()}_{value}") - - if license == "ee": - test_dirs = ["oss/tests/pytest", "ee/tests/pytest"] - else: - test_dirs = [f"{license}/tests/pytest"] - - cmd = ["pytest"] + test_dirs - - if marker_args: - marker_expr = " and ".join(marker_args) - cmd += ["-m", marker_expr] - if pytest_args: - cmd += list(pytest_args) - - click.echo(f"Executing: {' '.join(cmd)}") - - subprocess.run(cmd, check=True) - - -if __name__ == "__main__": - run_tests() diff --git a/docs/blog/entries/add-spans-to-test-sets.mdx b/docs/blog/entries/add-spans-to-test-sets.mdx deleted file mode 100644 index 8af7118261..0000000000 --- a/docs/blog/entries/add-spans-to-test-sets.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Add Spans to Test Sets" -slug: add-spans-to-test-sets -date: 2024-12-11 -tags: [v0.29.0] ---- - - -import { Stream } from "@cloudflare/stream-react"; - - - - -<Stream controls src="109f3b8d36333d108a50239bc4cd35f0" height="400px" /> -<br /> - -This release introduces the ability to add spans to test sets, making it easier to bootstrap your evaluation data from production. The new feature lets you: - - -- Add individual or batch spans to test sets -- Create custom mappings between spans and test sets -- Preview test set changes before committing them - -Additional improvements: - -- Fixed CSV test set upload issues -- Prevented viewing of incomplete evaluations -- Added mobile compatibility warning -- Added support for custom ports in self-hosted installations - ---- diff --git a/docs/blog/entries/adding-cost-and-token-usage-to-the-playground.mdx b/docs/blog/entries/adding-cost-and-token-usage-to-the-playground.mdx deleted file mode 100644 index b2a32c99d5..0000000000 --- a/docs/blog/entries/adding-cost-and-token-usage-to-the-playground.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Adding Cost and Token Usage to the Playground" -slug: adding-cost-and-token-usage-to-the-playground -date: 2024-01-12 -tags: [v0.7.1] ---- - - -import Image from "@theme/IdealImage"; - - - - -:::caution -This change requires you to pull the latest version of the agenta platform if you're using the self-serve version. -::: - -<Image img={require("/images/changelog/screenshot_cost_and_token_usage.png")} /> - -We've added a feature that allows you to compare the time taken by an LLM app, its cost, and track token usage, all in one place. - -----# diff --git a/docs/blog/entries/agenta-is-soc-2-type-1-certified.mdx b/docs/blog/entries/agenta-is-soc-2-type-1-certified.mdx deleted file mode 100644 index 5cd5d96154..0000000000 --- a/docs/blog/entries/agenta-is-soc-2-type-1-certified.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Agenta is SOC 2 Type 1 Certified" -slug: agenta-is-soc-2-type-1-certified -date: 2025-01-15 -tags: [v0.31.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<Image - style={{ - display: "block", - margin: "20px auto", - width: "80%", - textAlign: "center", - }} - img={require("/images/changelog/soc2_type1.png")} - alt="SOC 2 Type 1 certification" - loading="lazy" -/> - -We've achieved SOC 2 Type 1 certification, validating our security controls for protecting sensitive LLM development data. This certification covers our entire platform, including prompt management, evaluation frameworks, and observability tools. - -Key security features and improvements: - -- Data encryption in transit and at rest -- Enhanced access control and authentication -- Comprehensive security monitoring -- Regular third-party security assessments -- Backup and disaster recovery protocols - -This certification represents a significant milestone for teams using Agenta in production environments. Whether you're using our open-source platform or cloud offering, you can now build LLM applications with enterprise-grade security confidence. - -We've also updated our [trust center](https://trustcenter.agenta.ai) with detailed information about our security practices and compliance standards. For teams interested in learning more about our security controls or requesting our SOC 2 report, please contact [team@agenta.ai](mailto:team@agenta.ai). - ---- diff --git a/docs/blog/entries/annotate-your-llm-response-preview.mdx b/docs/blog/entries/annotate-your-llm-response-preview.mdx deleted file mode 100644 index ac2443ce74..0000000000 --- a/docs/blog/entries/annotate-your-llm-response-preview.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Annotate Your LLM Response (preview)" -slug: annotate-your-llm-response-preview -date: 2025-05-15 -tags: [v0.45.0] ---- - - -import Image from "@theme/IdealImage"; - - -One of the major feature requests we had was the ability to capture user feedback and annotations (e.g. scores) to LLM responses traced in Agenta. - -Today we're previewing one of a family of features around this topic. - -As of today you can use the annotation API to add annotations to LLM responses traced in Agenta. - -This is useful to: -- Collect user feedback on LLM responses -- Run custom evaluation workflows -- Measure application performance in real-time - -Check out the how to [annotate traces from API](/observability/trace-with-python-sdk/annotate-traces) for more details. Or try our new tutorial (available as [jupyter notebook](https://github.com/Agenta-AI/agenta/blob/main/examples/jupyter/capture_user_feedback.ipynb)) [here](/tutorials/cookbooks/capture-user-feedback). - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/evaluation/evaluation-screenshot-jupyter.png")} - alt="Screenshot showing annotations in the Agenta UI" - loading="lazy" -/> - -Other stuff: -- We have cut our migration process to take a couple of minutes instead of an hour. - ---- diff --git a/docs/blog/entries/bring-your-own-api-key.mdx b/docs/blog/entries/bring-your-own-api-key.mdx deleted file mode 100644 index d2e2ddff90..0000000000 --- a/docs/blog/entries/bring-your-own-api-key.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Bring your own API key" -slug: bring-your-own-api-key -date: 2024-01-25 -tags: [v0.8.3] ---- - - - - - - -Up until know, we required users to use our OpenAI API key when using cloud. Starting now, you can use your own API key for any new application you create. - ---- diff --git a/docs/blog/entries/bug-fix-for-application-saving.mdx b/docs/blog/entries/bug-fix-for-application-saving.mdx deleted file mode 100644 index 8b863199f1..0000000000 --- a/docs/blog/entries/bug-fix-for-application-saving.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Bug Fix for Application Saving" -slug: bug-fix-for-application-saving -date: 2023-12-07 -tags: [v0.6.1] ---- - - - - - - -- Resolved a bug related to saving the application - ---- diff --git a/docs/blog/entries/changes-to-the-sdk.mdx b/docs/blog/entries/changes-to-the-sdk.mdx deleted file mode 100644 index b247879f47..0000000000 --- a/docs/blog/entries/changes-to-the-sdk.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Changes to the SDK" -slug: changes-to-the-sdk -date: 2023-01-01 ---- - - - - -This necessitated modifications to the SDK. Now, the LLM application API returns a JSON instead of a string. The JSON includes the output message, usage details, and cost: - -``` - -{ -"message": string, -"usage": { -"prompt_tokens": int, -"completion_tokens": int, -"total_tokens": int -}, -"cost": float -} - -``` - ---- diff --git a/docs/blog/entries/compare-latency-and-costs.mdx b/docs/blog/entries/compare-latency-and-costs.mdx deleted file mode 100644 index fdd2bfa1ee..0000000000 --- a/docs/blog/entries/compare-latency-and-costs.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "Compare latency and costs" -slug: compare-latency-and-costs -date: 2024-04-01 -tags: [v0.12.6] ---- - - -import Image from "@theme/IdealImage"; - - - - -You can now compare the latency and cost of different variants in the evaluation view. - -<Image - className="dark:hidden" - img={require("/images/changelog/compare_latency_and_cost_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/compare_latency_and_cost_dark.png")} -/> - ---- diff --git a/docs/blog/entries/comprehensive-updates-and-bug-fixes.mdx b/docs/blog/entries/comprehensive-updates-and-bug-fixes.mdx deleted file mode 100644 index 7309f5c1dc..0000000000 --- a/docs/blog/entries/comprehensive-updates-and-bug-fixes.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Comprehensive Updates and Bug Fixes" -slug: comprehensive-updates-and-bug-fixes -date: 2023-12-12 -tags: [v0.6.4] ---- - - - - - - -- Incorporated all chat turns to the chat set -- Rectified self-hosting documentation -- Introduced asynchronous support for applications -- Added 'register_default' alias -- Fixed a bug in the side-by-side feature - ---- diff --git a/docs/blog/entries/cypress-tests-and-ui-improvements.mdx b/docs/blog/entries/cypress-tests-and-ui-improvements.mdx deleted file mode 100644 index 184cd01f0b..0000000000 --- a/docs/blog/entries/cypress-tests-and-ui-improvements.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Cypress Tests and UI Improvements" -slug: cypress-tests-and-ui-improvements -date: 2023-11-02 -tags: [v0.5.5] ---- - - - - - - -- Conducted extensive Cypress tests for improved application stability -- Added a collapsible sidebar for better navigation -- Improved error handling mechanisms -- Added documentation for the evaluation feature - ---- diff --git a/docs/blog/entries/deep-url-support-for-sharable-links.mdx b/docs/blog/entries/deep-url-support-for-sharable-links.mdx deleted file mode 100644 index f690bb9f0c..0000000000 --- a/docs/blog/entries/deep-url-support-for-sharable-links.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Deep URL Support for Sharable Links" -slug: deep-url-support-for-sharable-links -date: 2025-09-24 -tags: [v0.53.0] ---- - -URLs across Agenta now include workspace context, making them fully shareable between team members. This was a highly requested feature that addresses several critical issues with the previous URL structure. - -## What Changed - -### Before -- URLs did not include workspace information -- Sharing links between team members would redirect to the recipient's default workspace -- Page refreshes would sometimes lose context and revert to the default workspace -- Deep linking to specific resources was unreliable - -### Now -- All URLs include the workspace context in the URL path -- Links shared between team members work correctly, maintaining the intended workspace -- Page refreshes maintain the correct workspace context -- Deep linking works reliably for all resources - -## What You Can Deep Link - -You can now create shareable deep links to almost any resource in Agenta: - -- **Prompts**: Share direct links to specific prompts in any workspace -- **Evaluations**: Link directly to evaluation results and configurations -- **Test Sets**: Share test sets with team members -- **Playground Sessions**: Link to specific playground configurations - ---- \ No newline at end of file diff --git a/docs/blog/entries/deployment-versioning-and-rbac.mdx b/docs/blog/entries/deployment-versioning-and-rbac.mdx deleted file mode 100644 index c411fc9b5f..0000000000 --- a/docs/blog/entries/deployment-versioning-and-rbac.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "Deployment Versioning and RBAC" -slug: deployment-versioning-and-rbac -date: 2024-02-14 -tags: [v0.12.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -**Deployment versioning** - -You now have access to a history of prompts deployed to our three environments. This feature allows you to roll back to previous versions if needed. - -**Role-Based Access Control** - -You can now invite team members and assign them fine-grained roles in agenta. - -<Image - className="dark:hidden" - img={require("/images/changelog/rbac_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/rbac_dark.png")} -/> - -**Improvements** - -- We now prevent the deletion of test sets that are used in evaluations - -**Bug fixes** - -- Fixed bug in custom code evaluation aggregation. Up until know the aggregated result for custom code evalution where not computed correctly. -- Fixed bug with Evaluation results not being exported correctly - -- Updated documentation for vision gpt explain images -- Improved Frontend test for Evaluations - ---- diff --git a/docs/blog/entries/documentation-architecture-overhaul.mdx b/docs/blog/entries/documentation-architecture-overhaul.mdx deleted file mode 100644 index a19bf29d67..0000000000 --- a/docs/blog/entries/documentation-architecture-overhaul.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Documentation Architecture Overhaul" -slug: documentation-architecture-overhaul -date: 2025-11-03 -tags: [v0.59.10] ---- - -import Image from "@theme/IdealImage"; - -We've completely rewritten and restructured our documentation with a new architecture. This is one of the largest updates we've made to the documentation, involving a near-complete rewrite of existing content and adding substantial new material. - -### Diataxis Framework Implementation - -We've reorganized all documentation using the [Diataxis framework](https://diataxis.fr/). - -### Expanded Observability Documentation - -One of the biggest gaps in our previous documentation was observability. We've added comprehensive documentation covering: - -- [Tracing with OpenTelemetry](/observability/trace-with-opentelemetry/getting-started) -- [Tracing LLM applications with JS/TS](/observability/quick-start-opentelemetry) -- [Using the Metrics API to fetch metrics](/observability/query-data/analytics-data) -- [Using the Query API to fetch traces](/observability/query-data/query-api) - -### JavaScript/TypeScript Support - -Documentation now includes JavaScript and TypeScript examples alongside Python wherever applicable. This makes it easier for JavaScript developers to integrate Agenta into their applications. - -### Ask AI Feature - -We've added a new "Ask AI" feature that lets you ask questions directly to the documentation. Get instant answers to your questions without searching through pages. - -<Image - img={require('/static/images/changelog/agenta_askai.png')} - alt="Ask AI feature in documentation" - style={{display: 'block', margin: '20px auto', textAlign: 'center'}} -/> - - ---- diff --git a/docs/blog/entries/documentation-overhaul-new-models-and-platform-improvements.mdx b/docs/blog/entries/documentation-overhaul-new-models-and-platform-improvements.mdx deleted file mode 100644 index 9eb5711f72..0000000000 --- a/docs/blog/entries/documentation-overhaul-new-models-and-platform-improvements.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "Documentation Overhaul, New Models, and Platform Improvements" -slug: documentation-overhaul-new-models-and-platform-improvements -date: 2025-05-02 -tags: [v0.43.0] ---- - - - - - - -We've made significant improvements across Agenta with a major documentation overhaul, new model support, self-hosting enhancements, and UI improvements. - -**Revamped Prompt Engineering Documentation**: - -We've completely rewritten our prompt management and prompt engineering documentation. - -Start exploring the new documentation in our updated [Quick Start Guide](/prompt-engineering/quick-start). - -**New Model Support**: - -Our platform now supports several new LLM models: - -- Google's Gemini 2.5 Pro and Flash -- Alibaba Cloud's Qwen 3 -- OpenAI's GPT-4.1 - -These models are available in both the playground and through the API. - -**Playground Enhancements**: - -We've added a draft state to the playground, providing a better editing experience. Changes are now clearly marked as drafts until committed. - -**Self-Hosting Improvements**: - -We've significantly simplified the self-hosting experience by changing how environment variables are handled in the frontend: - -- No more rebuilding images to change ports or domains -- Dynamic configuration through environment variables at runtime - -Check out our updated [self-hosting documentation](/self-host/quick-start) for details. - -**Bug Fixes and Optimizations**: - -- Fixed OpenTelemetry integration edge cases -- Resolved edge cases in the API that affected certain workflow configurations -- Improved UI responsiveness and fixed minor visual inconsistencies -- Added chat support in cloud - ---- diff --git a/docs/blog/entries/enhanced-self-hosting-and-mistral-model-tutorial.mdx b/docs/blog/entries/enhanced-self-hosting-and-mistral-model-tutorial.mdx deleted file mode 100644 index dd9206fb37..0000000000 --- a/docs/blog/entries/enhanced-self-hosting-and-mistral-model-tutorial.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Enhanced Self-hosting and Mistral Model Tutorial" -slug: enhanced-self-hosting-and-mistral-model-tutorial -date: 2023-11-17 -tags: [v0.5.7] ---- - - - - - - -- Enhanced and simplified self-hosting feature -- Added a tutorial for the Mistral model -- Resolved a race condition issue in deployment -- Fixed an issue with saving in the playground - ---- diff --git a/docs/blog/entries/evaluation-speed-increase-and-numerous-quality-of-life-improvements.mdx b/docs/blog/entries/evaluation-speed-increase-and-numerous-quality-of-life-improvements.mdx deleted file mode 100644 index a2a0e1fbfe..0000000000 --- a/docs/blog/entries/evaluation-speed-increase-and-numerous-quality-of-life-improvements.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Evaluation Speed Increase and Numerous Quality of Life Improvements" -slug: evaluation-speed-increase-and-numerous-quality-of-life-improvements -date: 2024-04-23 ---- - - - - - -**v0.13.1-5** - -- We've improved the speed of evaluations by 3x through the use of asynchronous batching of calls. -- We've added Groq as a new provider along with Llama3 to our playground. - -**Bug Fixes** - -- Resolved a rendering UI bug in Testset view. -- Fixed incorrect URLs displayed when running the 'agenta variant serve' command. -- Corrected timestamps in the configuration. -- Resolved errors when using the chat template with empty input. -- Fixed latency format in evaluation view. -- Added a spinner to the Human Evaluation results table. -- Resolved an issue where the gitignore was being overwritten when running 'agenta init'. - ---- diff --git a/docs/blog/entries/evaluator-testing-playground-and-a-new-evaluation-view.mdx b/docs/blog/entries/evaluator-testing-playground-and-a-new-evaluation-view.mdx deleted file mode 100644 index cc0917e9ba..0000000000 --- a/docs/blog/entries/evaluator-testing-playground-and-a-new-evaluation-view.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "Evaluator Testing Playground and a New Evaluation View" -slug: evaluator-testing-playground-and-a-new-evaluation-view -date: 2024-09-22 -tags: [v0.25.0] ---- - - -import { Stream } from "@cloudflare/stream-react"; - - - - -<Stream controls src="41941e8e6b5a119faa5ced10af891f86" height="400px" /> -<br /> -Many users faced challenges configuring evaluators in the web UI. Some -evaluators, such as `LLM as a judge`, `custom code`, or RAG evaluators can be -tricky to set up correctly on the first try. Until now, users needed to setup, -run an evaluation, check the errors, then do it again. - -To address this, we've introduced a new evaluator test/debug playground. This feature allows you to test the evaluator live on real data, helping you test the configuration before committing to it and using it for evaluations. - -Additionally, we have improved and redesigned the evaluation view. Both automatic and human evaluations are now within the same view but in different tabs. We're moving towards unifying all evaluator results and consolidating them in one view, allowing you to quickly get an overview of what's working. - ---- diff --git a/docs/blog/entries/evaluators-can-access-all-columns.mdx b/docs/blog/entries/evaluators-can-access-all-columns.mdx deleted file mode 100644 index 9abf00b0b5..0000000000 --- a/docs/blog/entries/evaluators-can-access-all-columns.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "Evaluators can access all columns" -slug: evaluators-can-access-all-columns -date: 2024-06-04 -tags: [v0.17.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<div> - <Image - img={require("/images/changelog/configure_expected_answer.png")} - alt="Configure Expected Answer" - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> -</div> - -Evaluators now can access all columns in the test set. Previously, you were limited to using only the `correct_answer` column for the ground truth / reference answer in evaluation. -Now you can configure your evaluator to use any column in the test set as the ground truth. To do that, open the collapsable `Advanced Settings` when configuring the evaluator, and define the `Expected Answer Column` to the name of the columns containing the reference answer you want to use. - -In addition to this: - -- We've upgraded the SDK to pydantic v2. -- We have improved by 10x the speed for the get config endpoint -- We have add documentation for observability - ---- diff --git a/docs/blog/entries/filtering-traces-by-annotation.mdx b/docs/blog/entries/filtering-traces-by-annotation.mdx deleted file mode 100644 index e75f09081e..0000000000 --- a/docs/blog/entries/filtering-traces-by-annotation.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Filtering Traces by Annotation" -slug: filtering-traces-by-annotation -date: 2025-10-14 -tags: [v0.58.0] ---- - -import Image from "@theme/IdealImage"; - - -We rebuilt the filtering system in observability. We added a new dropdown with more options. Additionally, we added a new annotation filtering. You can now filter and search traces based on their annotations. This feature helps you find traces with low scores or bad feedback quickly. - -### New Filter Options - -The new dropdown is simpler and gives you more options. You can now filter by: -- **Span status**: Find successful or failed spans -- **Input keys**: Search for specific inputs in your spans -- **App or environment**: Filter traces from specific apps or environments -- **Any key within your span**: Search custom data in your trace structure - -<Image img={require('/static/images/changelog/changelog-filters-observability.png')} alt="Complete observability filters" style={{display: 'block', margin: '20px auto', textAlign: 'center', width: '20%'}} /> - -### Annotation Filtering - -Filter traces based on evaluations and feedback: -- **Evaluator results**: Find spans evaluated by a specific evaluator -- **User feedback**: Search for spans with feedback like `success=True` - -<Image img={require('/static/images/changelog/changelog-annotation-filter.png')} alt="Annotation filtering interface" style={{display: 'block', margin: '20px auto', textAlign: 'center'}} /> - -This feature enables powerful workflows: - -1. **Capture user feedback** from your application using our API ([see tutorial](/tutorials/cookbooks/capture-user-feedback)) -2. **Filter traces** to find those with bad feedback or low scores -3. **Add them to test sets** to track problematic cases -4. **Improve your prompts** based on real user feedback - -The filtering system makes it easy to turn production issues into test cases. - ---- diff --git a/docs/blog/entries/highlight-ouput-difference-when-comparing-evaluations.mdx b/docs/blog/entries/highlight-ouput-difference-when-comparing-evaluations.mdx deleted file mode 100644 index 9908a42435..0000000000 --- a/docs/blog/entries/highlight-ouput-difference-when-comparing-evaluations.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Highlight ouput difference when comparing evaluations" -slug: highlight-ouput-difference-when-comparing-evaluations -date: 2024-03-04 -tags: [v0.12.2] ---- - - - - - - -We have improved the evaluation comparison view to show the difference to the expected output. - -**Improvements** - -- Improved the error messages when invoking LLM applications -- Improved "Add new evaluation" modal -- Upgraded Sidemenu to display Configure evaluator and run evaluator under Evaluations section -- Changed cursor to pointer when hovering over evaluation results - ---- diff --git a/docs/blog/entries/improved-error-handling-in-evaluation.mdx b/docs/blog/entries/improved-error-handling-in-evaluation.mdx deleted file mode 100644 index 5c6e333b40..0000000000 --- a/docs/blog/entries/improved-error-handling-in-evaluation.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Improved error handling in evaluation" -slug: improved-error-handling-in-evaluation -date: 2024-01-29 -tags: [v0.9.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -We have improved error handling in evaluation to return more information about the exact source of the error in the evaluation view. - -<Image - className="dark:hidden" - img={require("/images/changelog/improved_error_handling_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/improved_error_handling_dark.png")} -/> - -**Improvements**: - -- Added the option in A/B testing human evaluation to mark both variants as correct -- Improved loading state in Human Evaluation - ---- diff --git a/docs/blog/entries/improved-human-evaluation-workflow.mdx b/docs/blog/entries/improved-human-evaluation-workflow.mdx deleted file mode 100644 index 552cbb0772..0000000000 --- a/docs/blog/entries/improved-human-evaluation-workflow.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "Improved human evaluation workflow" -slug: improved-human-evaluation-workflow -date: 2024-01-24 -tags: [v0.8.2] ---- - - -import Image from "@theme/IdealImage"; - - - - -**Faster human evaluation workflow** - -We have updated the human evaluation table view to add annotation and correct answer columns. - -<Image - className="dark:hidden" - img={require("/images/changelog/improved_human_eval_workflow_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/improved_human_eval_workflow_dark.png")} -/> - -**Improvements**: - -- Simplified the database migration process -- Fixed environment variable injection to enable cloud users to use their own keys -- Disabled import from endpoint in cloud due to security reasons -- Improved query lookup speed for evaluation scenarios -- Improved error handling in playground - -**Bug fixes**: - -- Resolved failing Backend tests -- Fixed a bug in rate limit configuration validation -- Fixed issue with all aggregated results -- Resolved issue with live results in A/B testing evaluation not updating - ---- diff --git a/docs/blog/entries/improvements-to-the-playground-and-custom-workflows.mdx b/docs/blog/entries/improvements-to-the-playground-and-custom-workflows.mdx deleted file mode 100644 index c484afcaa1..0000000000 --- a/docs/blog/entries/improvements-to-the-playground-and-custom-workflows.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Improvements to the Playground and Custom Workflows" -slug: improvements-to-the-playground-and-custom-workflows -date: 2025-03-19 -tags: [v0.36.0] ---- - - - - -We've made several improvements to the playground, including: -- Improved scrolling behavior -- Increased discoverability of variants creation and comparison -- Implemented stop functionality in the playground - -As for custom workflows, now they work with sub-routes. This means you can have multiple routes in one file and create multiple custom workflows from the same file. - ---- diff --git a/docs/blog/entries/improving-side-by-side-comparison-in-the-playground.mdx b/docs/blog/entries/improving-side-by-side-comparison-in-the-playground.mdx deleted file mode 100644 index fc1c36108c..0000000000 --- a/docs/blog/entries/improving-side-by-side-comparison-in-the-playground.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Improving Side-by-side Comparison in the Playground" -slug: improving-side-by-side-comparison-in-the-playground -date: 2023-12-19 -tags: [v0.6.6] ---- - - - - - - -- Enhanced the side-by-side comparison in the playground for better user experience - ---- diff --git a/docs/blog/entries/integrated-file-input-and-ui-enhancements.mdx b/docs/blog/entries/integrated-file-input-and-ui-enhancements.mdx deleted file mode 100644 index a75b5a5ec6..0000000000 --- a/docs/blog/entries/integrated-file-input-and-ui-enhancements.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Integrated File Input and UI Enhancements" -slug: integrated-file-input-and-ui-enhancements -date: 2023-12-12 -tags: [v0.6.3] ---- - - - - - - -- Integrated file input feature in the SDK -- Provided an example that includes images -- Upgraded the human evaluation view to present larger inputs -- Fixed issues related to data overwriting in the cloud -- Implemented UI enhancements to the side bar - ---- diff --git a/docs/blog/entries/introduction-of-chat-based-applications.mdx b/docs/blog/entries/introduction-of-chat-based-applications.mdx deleted file mode 100644 index 9f9ba4bd39..0000000000 --- a/docs/blog/entries/introduction-of-chat-based-applications.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Introduction of Chat-based Applications" -slug: introduction-of-chat-based-applications -date: 2023-12-01 -tags: [v0.6.0] ---- - - - - - - -- Introduced chat-based applications -- Fixed a bug in 'export csv' feature in auto evaluation - ---- diff --git a/docs/blog/entries/launch-of-sdk-version-2-and-cloud-hosted-version.mdx b/docs/blog/entries/launch-of-sdk-version-2-and-cloud-hosted-version.mdx deleted file mode 100644 index 564d59c314..0000000000 --- a/docs/blog/entries/launch-of-sdk-version-2-and-cloud-hosted-version.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Launch of SDK Version 2 and Cloud-hosted Version" -slug: launch-of-sdk-version-2-and-cloud-hosted-version -date: 2023-10-23 -tags: [v0.5.0] ---- - - - - - - -- Launched SDK version 2 -- Launched the cloud-hosted version -- Completed a comprehensive refactoring of the application - diff --git a/docs/blog/entries/llamaindex-integration.mdx b/docs/blog/entries/llamaindex-integration.mdx deleted file mode 100644 index fe8267f513..0000000000 --- a/docs/blog/entries/llamaindex-integration.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "LlamaIndex Integration" -slug: llamaindex-integration -date: 2025-06-17 -tags: [v0.48.4] ---- -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -<Image - style={{ - display: "block", - marginBottom: "20px", - textAlign: "center", - }} - img={require("/images/changelog/agenta_llamaindex.png")} - alt="LlamaIndex integration with Agenta" - loading="lazy" -/> - -We're excited to announce observability support for [LlamaIndex](https://www.llamaindex.ai/) applications. - -If you're using LlamaIndex, you can now see detailed traces in Agenta to debug your application. - -The integration is auto-instrumentation - just add one line of code and you'll start seeing all your LlamaIndex operations traced. - -This helps when you need to understand what's happening inside your RAG pipeline, track performance bottlenecks, or debug issues in production. - -Check out the [tutorial](/observability/integrations/llamaindex) and the [Jupyter notebook](https://github.com/Agenta-AI/agenta/blob/main/examples/jupyter/llamaindex_integration.ipynb) for more details. diff --git a/docs/blog/entries/major-playground-improvements-and-enhancements.mdx b/docs/blog/entries/major-playground-improvements-and-enhancements.mdx deleted file mode 100644 index 7571c9ac48..0000000000 --- a/docs/blog/entries/major-playground-improvements-and-enhancements.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Major Playground Improvements and Enhancements" -slug: major-playground-improvements-and-enhancements -date: 2025-08-07 -tags: [v0.50.5] ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px", flexDirection: 'column', alignItems: 'center'}}> - <iframe - width="100%" - height="500" - src="https://www.youtube.com/embed/zaiMuWLwC5s" - title="Major Playground Improvements - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - -We've made lots of improvements to the playground. Here are some of the highlights: - -## JSON Editor Improvements - -**Enhanced Error Display and Editing** - -The JSON editor now provides clearer error messages and improved editing functionality. We've fixed issues with error display that previously made it difficult to debug JSON configuration problems. - -**Undo Support with Ctrl+Z** - -You can now use Ctrl+Z (or Cmd+Z on Mac) to undo changes in the JSON editor, making it much easier to iterate on complex JSON configurations without fear of losing your work. - -**Bug Fix: JSON Field Order Preservation** - -The structured output JSON field order is now preserved throughout the system. This is crucial when working with LLMs that are sensitive to the ordering of JSON fields in their responses. - -Previously, JSON objects might have their field order changed during processing, which could affect LLM behavior and evaluation consistency. Now, the exact order you define is maintained across all operations. - -## Playground Improvements - -**Dynamic variables** - -We've improved the editor behavior with dynamic variables in the prompt. - -**Markdown and Text View Toggle** - -You can now switch between markdown and text view for messages. - -**Collapsible Interface Elements** - -We've added the ability to collapse various sections of the playground interface, helping you focus on what matters most for your current task. - -**Collapsible Test Cases for Large Sets** - -When loading large test sets, you can now collapse individual test cases to better manage the interface. - -**Visual diff when committing changes** - -The playground now shows a visual diff when you're committing changes, making it easy to review exactly what modifications you're about to save. - - - - ---- diff --git a/docs/blog/entries/migration-from-mongodb-to-postgres.mdx b/docs/blog/entries/migration-from-mongodb-to-postgres.mdx deleted file mode 100644 index 3b91fadd32..0000000000 --- a/docs/blog/entries/migration-from-mongodb-to-postgres.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Migration from MongoDB to Postgres" -slug: migration-from-mongodb-to-postgres -date: 2024-07-09 -tags: [v0.19.0] ---- - - - - - - -We have migrated the Agenta database from MongoDB to Postgres. As a result, the **platform is much more faster** (up to 10x in some use cases). - -However, if you are self-hosting agenta, note that this is a breaking change that requires you to manually migrate your data from MongoDB to Postgres. - -If you are using the cloud version of Agenta, there is nothing you need to do (other than enjoying the new performance improvements). - ---- diff --git a/docs/blog/entries/minor-adjustments-for-better-performance.mdx b/docs/blog/entries/minor-adjustments-for-better-performance.mdx deleted file mode 100644 index e120581aa4..0000000000 --- a/docs/blog/entries/minor-adjustments-for-better-performance.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Minor Adjustments for Better Performance" -slug: minor-adjustments-for-better-performance -date: 2023-12-07 -tags: [v0.6.2] ---- - - - - - - -- Made minor adjustments - ---- diff --git a/docs/blog/entries/minor-fixes.mdx b/docs/blog/entries/minor-fixes.mdx deleted file mode 100644 index cf76c371f0..0000000000 --- a/docs/blog/entries/minor-fixes.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Minor fixes" -slug: minor-fixes -date: 2024-02-04 -tags: [v0.10.2] ---- - - - - - - -- Addressed issue when invoking LLM app with missing LLM provider key -- Updated LLM providers in Backend enum -- Fixed bug in variant environment deployment -- Fixed the sorting in evaluation tables -- Made use of server timezone instead of UTC - ---- diff --git a/docs/blog/entries/minor-improvements-2.mdx b/docs/blog/entries/minor-improvements-2.mdx deleted file mode 100644 index 23e30ab511..0000000000 --- a/docs/blog/entries/minor-improvements-2.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Minor improvements" -slug: minor-improvements-2 -date: 2024-03-11 -tags: [v0.12.3] ---- - - - - - - -- Improved the logic of the Webhook evaluator -- Made the inputs in the Human evaluation view non-editable -- Added an option to save a test set in the Single model evaluation view -- Included the evaluator name in the "Configure your evaluator" modal - -**Bug fixes** - -- Fixed column resize in comparison view -- Resolved a bug affecting the evaluation output in the CSV file -- Corrected the path to the Evaluators view when navigating from Evaluations - ---- diff --git a/docs/blog/entries/minor-improvements.mdx b/docs/blog/entries/minor-improvements.mdx deleted file mode 100644 index 07b8284529..0000000000 --- a/docs/blog/entries/minor-improvements.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Minor improvements" -slug: minor-improvements -date: 2024-03-31 -tags: [v0.12.5] ---- - - -import Image from "@theme/IdealImage"; - - - - -**Toggle variants in comparison view** - -You can now toggle the visibility of variants in the comparison view, allowing you to compare a multitude of variants side-by-side at the same time. - -<Image - className="dark:hidden" - img={require("/images/changelog/toggle_variants_visibility_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/toggle_variants_visibility_dark.png")} -/> - -**Improvements** - -- You can now add a datapoint from the playground to the test set even if there is a column mismatch - -**Bug fixes** - -- Resolved issue with "Start Evaluation" button in Testset view -- Fixed bug in CLI causing variant not to serve - ---- diff --git a/docs/blog/entries/miscellaneous-improvements.mdx b/docs/blog/entries/miscellaneous-improvements.mdx deleted file mode 100644 index 2f8f595277..0000000000 --- a/docs/blog/entries/miscellaneous-improvements.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Miscellaneous Improvements" -slug: miscellaneous-improvements -date: 2024-04-28 -tags: [v0.13.8] ---- - - -import Image from "@theme/IdealImage"; - - - - -- The total cost of an evaluation is now displayed in the evaluation table. This allows you to understand how much evaluations are costing you and track your expenses. - <Image img={require("/images/changelog/total_cost_screenshot.png")} /> - -**Bug Fixes** - -- Fixed sidebar focus in automatic evaluation results view -- Fix the incorrect URLs shown when running agenta variant serve - ---- diff --git a/docs/blog/entries/more-reliable-evaluations.mdx b/docs/blog/entries/more-reliable-evaluations.mdx deleted file mode 100644 index 7c1287fb95..0000000000 --- a/docs/blog/entries/more-reliable-evaluations.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "More Reliable Evaluations" -slug: more-reliable-evaluations -date: 2024-07-05 -tags: [v0.18.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<div> - <Image - img={require("/images/changelog/export_evaluation.png")} - alt="Button for exporting evaluation results" - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> -</div> - -We have worked extensively on improving the **reliability of evaluations**. Specifically: - -- We improved the status for evaluations and added a new `Queued` status -- We improved the error handling in evaluations. Now we show the exact error message that caused the evaluation to fail. -- We fixed issues that caused evaluations to run infinitely -- We fixed issues in the calculation of scores in human evaluations. -- We fixed small UI issues with large output in human evaluations. -- We have added a new export button in the evaluation view to export the results as a CSV file. - -In **observability**: - -- We have added a **new integration with [Litellm](https://litellm.ai/)** to automatically trace all LLM calls done through it. -- Now we automatically propagate cost and token usage from spans to traces. - ---- diff --git a/docs/blog/entries/multiple-metrics-in-human-evaluation.mdx b/docs/blog/entries/multiple-metrics-in-human-evaluation.mdx deleted file mode 100644 index 203f3c8db9..0000000000 --- a/docs/blog/entries/multiple-metrics-in-human-evaluation.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Multiple Metrics in Human Evaluation" -slug: multiple-metrics-in-human-evaluation -date: 2025-09-09 -tags: [v0.51.0] ---- - -We spent the past months rethinking how evaluation should work. Today we're announcing one of the first big improvements. - -The fastest teams building LLM apps were using human evaluation to check their outputs before going live. Agenta was helping them do this in minutes. - -But we also saw that they were limited. You could only score the outputs with one metric. - -That's why we rebuilt the human evaluation workflow. - -Now you can set multiple evaluators and metrics and use them to score the outputs. This lets you evaluate the same output on different metrics like **relevance** or **completeness**. You can also create binary, numerical scores, or even use strings for **comments** or **expected answer**. - -This unlocks a whole new set of use cases: - -- Compare your prompts on multiple metrics and understand where you can improve. -- Turn your annotations into test sets and use them in prompt engineering. For instance, you can add comments that help you later in improve your prompts. -- Use human evaluation to bootstrap automatic evaluation. You can annotate your outputs with the expected answer or a rubic, then use it to set up an automatic evaluation. - - -Watch the video below and read the [post](/changelog/multiple-metrics-in-human-evaluation) for more details. Or check out the [docs](/evaluation/human-evaluation/quick-start) to learn how to use the new human evaluation workflow. - ---- \ No newline at end of file diff --git a/docs/blog/entries/multiple-ui-and-csv-reader-fixes.mdx b/docs/blog/entries/multiple-ui-and-csv-reader-fixes.mdx deleted file mode 100644 index 18ab4e1532..0000000000 --- a/docs/blog/entries/multiple-ui-and-csv-reader-fixes.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Multiple UI and CSV Reader Fixes" -slug: multiple-ui-and-csv-reader-fixes -date: 2023-12-01 -tags: [v0.5.8] ---- - - - - - - -- Fixed a bug impacting the csv reader -- Addressed an issue of variant overwriting -- Made tabs draggable for better UI navigation -- Implemented support for multiple LLM keys in the UI - ---- diff --git a/docs/blog/entries/new-alpha-version-of-the-sdk-for-creating-custom-applications.mdx b/docs/blog/entries/new-alpha-version-of-the-sdk-for-creating-custom-applications.mdx deleted file mode 100644 index 92644b6f77..0000000000 --- a/docs/blog/entries/new-alpha-version-of-the-sdk-for-creating-custom-applications.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "New Alpha Version of the SDK for Creating Custom Applications" -slug: new-alpha-version-of-the-sdk-for-creating-custom-applications -date: 2024-08-20 -tags: [v0.23.0] ---- - - - - - - -We've released a new version of the SDK for creating custom applications. This Pydantic-based SDK significantly simplifies the process of building custom applications. It's fully backward compatible, so your existing code will continue to work seamlessly. We'll soon be rolling out comprehensive documentation and examples for the new SDK. - -In the meantime, here's a quick example of how to use it: - -```python -import agenta as ag -from agenta import Agenta -from pydantic import BaseModel, Field - -#highlight-start -ag.init() -#highlight-end - -# Define the configuration of the application (that will be shown in the playground ) -#highlight-start -class MyConfig(BaseModel): - temperature: float = Field(default=0.2) - prompt_template: str = Field(default="What is the capital of {country}?") -#highlight-end - -# Creates an endpoint for the entrypoint of the application -#highlight-start -@ag.route("/", config_schema=MyConfig) -#highlight-end -def generate(country: str) -> str: - # Fetch the config from the request - #highlight-start - config: MyConfig = ag.ConfigManager.get_from_route(schema=MyConfig) - #highlight-end - prompt = config.prompt_template.format(country=country) - chat_completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[{"role": "user", "content": prompt}], - temperature=config.temperature, - ) - return chat_completion.choices[0].message.content - -``` - ---- diff --git a/docs/blog/entries/new-application-management-view-and-various-improvements.mdx b/docs/blog/entries/new-application-management-view-and-various-improvements.mdx deleted file mode 100644 index b42d2bc00a..0000000000 --- a/docs/blog/entries/new-application-management-view-and-various-improvements.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "New Application Management View and Various Improvements" -slug: new-application-management-view-and-various-improvements -date: 2024-10-22 -tags: [v0.26.0] ---- - - - - - - -We updated the **Application Management View** to improve the UI. Many users struggled to find their applications when they had a large number, so we've improved the view and added a search bar for quick filtering. -Additionally, we are moving towards a new project structure for the application. We moved test sets and evaluators outside of the application scope. So now, you can use the same test set and evaluators in multiple applications. - -**Bug Fixes** - -- Added an export button in the evaluation view to export results from the main view. -- Eliminated Pydantic warnings in the CLI. -- Improved error messages when `fetch_config` is called with wrong arguments. -- Enhanced the custom code evaluation sandbox and removed the limitation that results need to be between 0 and 1 - ---- diff --git a/docs/blog/entries/new-evaluation-results-dashboard.mdx b/docs/blog/entries/new-evaluation-results-dashboard.mdx deleted file mode 100644 index 8eb0b740ec..0000000000 --- a/docs/blog/entries/new-evaluation-results-dashboard.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "New Evaluation Results Dashboard" -slug: new-evaluation-results-dashboard -date: 2025-09-26 -tags: [v0.54.0] ---- - -We rebuilt the evaluation results dashboard. Now you can check your results faster and see how well your AI performs. - -## What's New - -### **Charts and Graphs** -We added charts that show your AI's performance. You can quickly spot problems and see patterns in your data. - -### **Compare Results Side by Side** -Compare multiple tests at once. See which prompts or models work better. View charts and detailed results together. - -### **Better Results Table** -Results now show in a clean table format. It works great for small tests (10 cases) and big tests (10,000+ cases). The page loads fast no matter how much data you have. - -### **Detailed View** -Click on any result to see more details. Find out why a test passed or failed. Get the full picture of what happened. - -### **See Your Settings** -Check exactly which settings you used for each test. This helps you repeat successful tests and understand your results better. - -### **Name Your Tests** -Give your tests names and descriptions. Stay organized and help your team understand what each test does. - - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px", flexDirection: 'column', alignItems: 'center'}}> - <iframe - width="100%" - height="500" - src="https://www.youtube.com/embed/HxY6lZ9HIyw" - title="New Evaluation Results Dashboard - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> diff --git a/docs/blog/entries/new-evaluators.mdx b/docs/blog/entries/new-evaluators.mdx deleted file mode 100644 index b330fc9b1b..0000000000 --- a/docs/blog/entries/new-evaluators.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "New evaluators" -slug: new-evaluators -date: 2024-03-25 -tags: [v0.12.4] ---- - - - - - - -We have added some more evaluators, a new string matching and a Levenshtein distance evaluation. - -**Improvements** - -- Updated documentation for human evaluation -- Made improvements to Human evaluation card view -- Added dialog to indicate testset being saved in UI - -**Bug fixes** - -- Fixed issue with viewing the full output value during evaluation -- Enhanced error boundary logic to unblock user interface -- Improved logic to save and retrieve multiple LLM provider keys -- Fixed Modal instances to support dark mode - ---- diff --git a/docs/blog/entries/new-feature-prompt-and-deployment-registry.mdx b/docs/blog/entries/new-feature-prompt-and-deployment-registry.mdx deleted file mode 100644 index a443e7d7a3..0000000000 --- a/docs/blog/entries/new-feature-prompt-and-deployment-registry.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "New Feature: Prompt and Deployment Registry" -slug: new-feature-prompt-and-deployment-registry -date: 2025-04-07 -tags: [v0.38.0] ---- - - - - - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px"}}> - <iframe - width="1030" - height="500" - src="https://www.youtube.com/embed/ZwpHuXp2WiI" - title="YouTube video player" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - -We've introduced the Prompt and Deployment Registry, giving you a centralized place to manage all variants and versions of your prompts and deployments. - -**Key capabilities:** -- View all variants and revisions in a single table -- Access all commits made to a variant -- Use older versions of variants directly in the playground - -Learn more in our [blog post](https://agenta.ai/blog/introducing-prompt-registry). - -**Bug Fixes** -- Fixed minor UI issues with dots in sidebar menu -- Fixed minor playground UI issues -- Fixed playground reset default model name -- Fixed project_id issue on testset detail page -- Fixed breaking issues with old variants encountered during QA -- Fixed variant naming logic - ---- diff --git a/docs/blog/entries/new-json-evaluator.mdx b/docs/blog/entries/new-json-evaluator.mdx deleted file mode 100644 index ec36ef947b..0000000000 --- a/docs/blog/entries/new-json-evaluator.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "New JSON Evaluator" -slug: new-json-evaluator -date: 2024-01-30 -tags: [v0.9.1] ---- - - -import Image from "@theme/IdealImage"; - - - -We have added a new evaluator to match JSON fields and added the possiblity to use other columns in the test set other than the `correct_answer` column as the ground truth. - -<Image - className="dark:hidden" - img={require("/images/changelog/new_json_evaluator_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/new_json_evaluator_dark.png")} -/> - ---- diff --git a/docs/blog/entries/new-llm-provider-welcome-gemini.mdx b/docs/blog/entries/new-llm-provider-welcome-gemini.mdx deleted file mode 100644 index 2d849ca5f2..0000000000 --- a/docs/blog/entries/new-llm-provider-welcome-gemini.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "New LLM Provider: Welcome Gemini!" -slug: new-llm-provider-welcome-gemini -date: 2024-05-25 -tags: [v0.14.14] ---- - - -import Image from "@theme/IdealImage"; - - - - -We are excited to announce the addition of Google's Gemini to our list of supported LLM providers, bringing the total number to 12. - -<Image img={require("/images/changelog/gemini_screenshot.png")} - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> - ---- diff --git a/docs/blog/entries/new-onboarding-flow.mdx b/docs/blog/entries/new-onboarding-flow.mdx deleted file mode 100644 index 189ffb75e9..0000000000 --- a/docs/blog/entries/new-onboarding-flow.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "New Onboarding Flow" -slug: new-onboarding-flow -date: 2025-01-04 -tags: [v0.30.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<Image - style={{ - display: "block", - width: "80%", - textAlign: "center", - }} - img={require("/images/changelog/changelog_onboarding1.png")} - alt="New Onboarding Flow" - loading="lazy" -/> -<Image - style={{ - display: "block", - width: "80%", - textAlign: "center", - }} - img={require("/images/changelog/changelog_onboarding2.png")} - alt="New Onboarding Flow" - loading="lazy" -/> -We've redesigned our platform's onboarding to make getting started simpler and more intuitive. Key improvements include: - -- Streamlined tracing setup process -- Added a demo RAG playground project showcasing custom workflows -- Enhanced frontend performance -- Fixed scroll behavior in trace view - ---- diff --git a/docs/blog/entries/new-playground.mdx b/docs/blog/entries/new-playground.mdx deleted file mode 100644 index 2a5d310f6d..0000000000 --- a/docs/blog/entries/new-playground.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "New Playground" -slug: new-playground -date: 2025-02-04 -tags: [v0.33.0] ---- - - -import { Stream } from "@cloudflare/stream-react"; - - - - -<Stream controls src="fcf2b69dacb3e3a624c09af40c2dc154" height="400px" /> -<br /> - -We've rebuilt our playground from scratch to make prompt engineering faster and more intuitive. The old playground took 20 seconds to create a prompt - now it's instant. - -Key improvements: - -- Create prompts with multiple messages using our new template system -- Format variables easily with curly bracket syntax and a built-in validator -- Switch between chat and completion prompts in one interface -- Load test sets directly in the playground to iterate faster -- Save successful outputs as test cases with one click -- Compare different prompts side-by-side -- Deploy changes straight to production - -For developers, now you create prompts programmatically through our API. - -You can explore these features in our updated playground documentation. - ---- diff --git a/docs/blog/entries/observability-and-prompt-management.mdx b/docs/blog/entries/observability-and-prompt-management.mdx deleted file mode 100644 index e36a5960d2..0000000000 --- a/docs/blog/entries/observability-and-prompt-management.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Observability and Prompt Management" -slug: observability-and-prompt-management -date: 2024-11-06 -tags: [v0.27.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<Image - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - img={require("/images/observability/observability.png")} - alt="Observability view showing an open trace for an OpenAI application" - loading="lazy" -/> -This release is one of our biggest yet—one changelog hardly does it justice. - -**First up: Observability** - -We’ve had observability in beta for a while, but now it’s been completely rewritten, -with a brand-new UI and fully **open-source code**. - -The new [Observability SDK](/observability/overview) is compatible with [OpenTelemetry (Otel)](https://opentelemetry.io/) and [gen-ai semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This means you get a lot of integrations right out of the box, like [LangChain](/observability/integrations/langchain), [OpenAI](/observability/integrations/openai), and more. - -We’ll publish a full blog post soon, but here’s a quick look at what the new observability offers: - -- A redesigned UI that lets you visualize nested traces, making it easier to understand what’s happening behind the scenes. - -- The web UI lets you filter traces by name, cost, and other attributes—you can even search through them easily. - -- The SDK is Otel-compatible, and we’ve already tested integrations for [OpenAI](/observability/integrations/openai), [LangChain](/observability/integrations/langchain), [LiteLLM](/observability/integrations/litellm), and [Instructor](/observability/integrations/instructor), with guides available for each. In most cases, adding a few lines of code will have you seeing traces directly in Agenta. - -**Next: Prompt Management** - -We’ve completely rewritten the [prompt management SDK](/prompt-engineering/managing-prompts-programatically/setup), giving you full CRUD capabilities for prompts and configurations. This includes creating, updating, reading history, deploying new versions, and deleting old ones. You can find a first tutorial for this [here](/tutorials/sdk/manage-prompts-with-SDK). - -**And finally: LLM-as-a-Judge Overhaul** - -We've made significant upgrades to the [LLM-as-a-Judge evaluator](/evaluation/configure-evaluators/llm-as-a-judge). It now supports prompts with multiple messages and has access to all variables in a test case. You can also switch models (currently supporting OpenAI and Anthropic). These changes make the evaluator much more flexible, and we're seeing better results with it. - -<Image - style={{ - display: "block", - margin: "5px auto", - width: "50%", - textAlign: "center", - }} - img={require("/images/evaluation/llm-as-a-judge.gif")} - alt="Configuring the LLM-as-a-Judge evaluator" - loading="lazy" -/> - ---- diff --git a/docs/blog/entries/observability-beta.mdx b/docs/blog/entries/observability-beta.mdx deleted file mode 100644 index e1d6081c0a..0000000000 --- a/docs/blog/entries/observability-beta.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Observability (beta)" -slug: observability-beta -date: 2024-04-14 -tags: [v0.13.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -You can now monitor your application usage in production. We've added a new observability feature (currently in beta), which allows you to: - -- Monitor cost, latency, and the number of calls to your applications in real-time. -- View the logs of your LLM calls, including inputs, outputs, and used configurations. You can also add any interesting logs to your test set. -- Trace your more complex LLM applications to understand the logic within and debug it. - -As of now, all new applications created will include observability by default. We are working towards a GA version in the next weeks, which will be scalable and better integrated with your applications. We will also be adding tutorials and documentation about it. - -<Image - className="dark:hidden" - img={require("/images/changelog/observability_beta_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/observability_beta_dark.png")} -/> - -Find examples of LLM apps created from code with observability <a href="https://github.com/Agenta-AI/agenta/tree/main/examples/app_with_observability" _target="_blank">here</a>. - ---- diff --git a/docs/blog/entries/opentelemetry-compliance-and-custom-workflows-from-api.mdx b/docs/blog/entries/opentelemetry-compliance-and-custom-workflows-from-api.mdx deleted file mode 100644 index e07aa29de8..0000000000 --- a/docs/blog/entries/opentelemetry-compliance-and-custom-workflows-from-api.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "OpenTelemetry Compliance and Custom workflows from API" -slug: opentelemetry-compliance-and-custom-workflows-from-api -date: 2025-03-11 -tags: [v0.35.0] ---- - - - - - - -We've introduced major improvements to Agenta, focusing on OpenTelemetry compliance and simplified custom workflow debugging. - -**OpenTelemetry (OTel) Support**: - -Agenta is now fully OpenTelemetry-compliant. This means you can seamlessly integrate Agenta with thousands of OTel-compatible services using existing SDKs. To integrate your application with Agenta, simply configure an OTel exporter pointing to your Agenta endpoint—no additional setup required. - -We've enhanced distributed tracing capabilities to better debug complex distributed agent systems. All HTTP interactions between agents—whether running within Agenta's SDK or externally—are automatically traced, making troubleshooting and monitoring easier. - -Detailed instructions and examples are available in our [distributed tracing documentation](/observability/trace-with-opentelemetry/distributed-tracing). - -**Improved Custom Workflows**: - -Based on your feedback, we've streamlined debugging and running custom workflows: - -- **Run workflows from your environments**: You no longer need the Agenta CLI to manage custom workflows. Setting up custom workflows now involves simply adding the Agenta SDK to your code, creating an endpoint, and connecting it to Agenta via the web UI. You can check how it's done in the [quick start guide](/custom-workflows/overview). - -- **Custom Workflows in the new playground**: Custom workflows are now fully compatible with the new playground. You can now nest configurations, run side-by-side comparisons, and debug your agents and complex workflows very easily. - ---- diff --git a/docs/blog/entries/playground-improvements.mdx b/docs/blog/entries/playground-improvements.mdx deleted file mode 100644 index 6ac2d4bef0..0000000000 --- a/docs/blog/entries/playground-improvements.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Playground Improvements" -slug: playground-improvements -date: 2024-05-24 ---- - - -import Image from "@theme/IdealImage"; - - - -**v0.14.1-13** - -- We've improved the workflow for adding outputs to a dataset in the playground. In the past, you had to select the name of the test set each time. Now, the last used test set is selected by default.. - <Image - img={require("/images/changelog/default-selected-testset_video.gif")} - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> -- We have significantly improved the debugging experience when creating applications from code. Now, if an application fails, you can view the logs to understand the reason behind the failure. -- We moved the copy message button in the playground to the output text area. -- We now hide the cost and usage in the playground when they aren't specified -- We've made improvements to error messages in the playground - -**Bug Fixes** - -- Fixed the order of the arguments when running a custom code evaluator -- Fixed the timestamp in the Testset view (previous stamps was droppping the trailing 0) -- Fixed the creation of application from code in the self-hosted version when using Windows - ---- diff --git a/docs/blog/entries/prompt-and-configuration-registry.mdx b/docs/blog/entries/prompt-and-configuration-registry.mdx deleted file mode 100644 index e5ee11bbc7..0000000000 --- a/docs/blog/entries/prompt-and-configuration-registry.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Prompt and Configuration Registry" -slug: prompt-and-configuration-registry -date: 2024-05-01 -tags: [v0.14.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -We've introduced a feature that allows you to use Agenta as a prompt registry or management system. In the deployment view, we now provide an endpoint to directly fetch the latest version of your prompt. Here is how it looks like: - -``` - -from agenta import Agenta -agenta = Agenta() -config = agenta.get_config(base_id="xxxxx", environment="production", cache_timeout=200) # Fetches the configuration with caching - -``` - -You can find additional documentation [here](/prompt-engineering/integrating-prompts/integrating-with-agenta). - -**Improvements** - -- Previously, publishing a variant from the playground to an environment was a manual process., from now on we are publishing by default to the production environment. - <Image - img={require("/images/changelog/publish_to_production_by_default_screenshot.png")} - /> - ---- diff --git a/docs/blog/entries/prompt-versioning.mdx b/docs/blog/entries/prompt-versioning.mdx deleted file mode 100644 index 9d7fa99ee6..0000000000 --- a/docs/blog/entries/prompt-versioning.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "Prompt Versioning" -slug: prompt-versioning -date: 2024-01-31 -tags: [v0.10.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -We've introduced the feature to version prompts, allowing you to track changes made by the team and revert to previous versions. To view the change history of the configuration, click on the sign in the playground to access all previous versions. - -<Image - className="dark:hidden" - img={require("/images/changelog/prompt_versioning_light.png")} -/> -<Image - className="hidden dark:block" - img={require("/images/changelog/prompt_versioning_dark.png")} -/> - ---- diff --git a/docs/blog/entries/quality-of-life-improvements.mdx b/docs/blog/entries/quality-of-life-improvements.mdx deleted file mode 100644 index bdfc071b4c..0000000000 --- a/docs/blog/entries/quality-of-life-improvements.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Quality of life improvements" -slug: quality-of-life-improvements -date: 2025-01-27 -tags: [v0.32.0] ---- - - -import Image from "@theme/IdealImage"; - - - - - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/changelog/changelog_sidebar.gif")} - alt="New collapsible side menu" - loading="lazy" -/> - -Small release today with quality of life improvements, while we're preparing the huge release coming up in the next days: - -- Added a collapsible side menu for better space management -- Enhanced frontend performance and responsiveness -- Implemented a confirmation modal when deleting test sets -- Improved permission handling across the platform -- Improved frontend test coverage - ---- diff --git a/docs/blog/entries/ragas-evaluators-and-traces-in-the-playground.mdx b/docs/blog/entries/ragas-evaluators-and-traces-in-the-playground.mdx deleted file mode 100644 index 4dedfb29ff..0000000000 --- a/docs/blog/entries/ragas-evaluators-and-traces-in-the-playground.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "RAGAS Evaluators and Traces in the Playground" -slug: ragas-evaluators-and-traces-in-the-playground -date: 2024-08-12 -tags: [v0.22.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -We're excited to announce two major features this week: - -1. We've integrated [RAGAS evaluators](https://docs.ragas.io/) into agenta. Two new evaluators have been added: **RAG Faithfulness** (measuring how consistent the LLM output is with the context) and **Context Relevancy** (assessing how relevant the retrieved context is to the question). Both evaluators use intermediate outputs within the trace to calculate the final score. - - [Check out the tutorial](/evaluation/configure-evaluators/rag-evaluators) to learn how to use RAG evaluators. - -{" "} - -<div> - <Image - img={require("/images/changelog/rag_faithfulness.png")} - alt="Button for exporting evaluation results" - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> -</div> - -2. You can now **view traces directly in the playground**. This feature enables you to debug your application while configuring it—for example, by examining the prompts sent to the LLM or reviewing intermediate outputs. - - <div> - <Image - img={require("/images/changelog/trace_in_playground.png")} - alt="Button for exporting evaluation results" - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> - </div> - -:::note -Both features are available exclusively in the cloud and enterprise versions of agenta. -::: - ---- diff --git a/docs/blog/entries/resolved-batch-logic-issue-in-evaluation.mdx b/docs/blog/entries/resolved-batch-logic-issue-in-evaluation.mdx deleted file mode 100644 index 7f679bc915..0000000000 --- a/docs/blog/entries/resolved-batch-logic-issue-in-evaluation.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Resolved Batch Logic Issue in Evaluation" -slug: resolved-batch-logic-issue-in-evaluation -date: 2023-12-18 -tags: [v0.6.5] ---- - - - - - - -- Resolved an issue with batch logic in evaluation (users can now run extensive evaluations) - ---- diff --git a/docs/blog/entries/revamping-evaluation.mdx b/docs/blog/entries/revamping-evaluation.mdx deleted file mode 100644 index 40d2372973..0000000000 --- a/docs/blog/entries/revamping-evaluation.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Revamping evaluation" -slug: revamping-evaluation -date: 2024-01-22 -tags: [v0.8.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -We've spent the past month re-engineering our evaluation workflow. Here's what's new: - -**Running Evaluations** - -1. Simultaneous Evaluations: You can now run multiple evaluations for different app variants and evaluators concurrently. - -<Image img={require("/images/changelog/eval_1.png")} /> - -2. Rate Limit Parameters: Specify these during evaluations and reattempts to ensure reliable results without exceeding open AI rate limits. - -<Image img={require("/images/changelog/eval_2.png")} /> - -3. Reusable Evaluators: Configure evaluators such as similarity match, regex match, or AI critique and use them across multiple evaluations. - -<Image img={require("/images/changelog/eval_3.png")} /> - -**Evaluation Reports** - -1. Dashboard Improvements: We've upgraded our dashboard interface to better display evaluation results. You can now filter and sort results by evaluator, test set, and outcomes. - -<Image img={require("/images/changelog/eval_4.png")} /> - -2. Comparative Analysis: Select multiple evaluation runs and view the results of various LLM applications side-by-side. - -<Image img={require("/images/changelog/eval_5.png")} /> - ---- diff --git a/docs/blog/entries/sentry-integration-and-user-communication-improvements.mdx b/docs/blog/entries/sentry-integration-and-user-communication-improvements.mdx deleted file mode 100644 index 65cd61bcf5..0000000000 --- a/docs/blog/entries/sentry-integration-and-user-communication-improvements.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Sentry Integration and User Communication Improvements" -slug: sentry-integration-and-user-communication-improvements -date: 2023-11-12 -tags: [v0.5.6] ---- - - - - - - -- Enhanced bug tracking with Sentry integration in the cloud -- Integrated Intercom for better user communication in the cloud -- Upgraded to the latest version of OpenAI -- Cleaned up files post serving in CLI - ---- diff --git a/docs/blog/entries/speed-improvements-in-the-playground.mdx b/docs/blog/entries/speed-improvements-in-the-playground.mdx deleted file mode 100644 index 7473fd3467..0000000000 --- a/docs/blog/entries/speed-improvements-in-the-playground.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Speed Improvements in the Playground" -slug: speed-improvements-in-the-playground -date: 2025-09-19 -tags: [v0.52.5] ---- - - -We rewrote most of Agenta's frontend. You'll see much faster speeds when you create prompts or use the playground. - -We also made many improvements and fixed bugs: - - [LLM-as-a-judge](/evaluation/configure-evaluators/llm-as-a-judge) now uses double curly braces `{{}}` instead of single curly braces `{` and `}`. This matches how normal prompts work. Old LLM-as-a-judge prompts with single curly braces still work. We updated the LLM-as-a-judge playground to make editing prompts easier. - - You can now use [an external Redis instance](/self-host/configuration#redis-caching) for caching by setting it as an environment variable - - Fixed the [custom workflow quick start tutorial](/custom-workflows/quick-start) and examples - - Fixed SDK compatibility issues with Python 3.9 - - Fixed default filtering in observability dashboard - - Fixed error handling in the evaluator playground - - Fixed the Tracing SDK to allow instrumenting streaming responses and overriding OTEL environment variables - ---- diff --git a/docs/blog/entries/structured-output-support-in-the-playground.mdx b/docs/blog/entries/structured-output-support-in-the-playground.mdx deleted file mode 100644 index c611b7497a..0000000000 --- a/docs/blog/entries/structured-output-support-in-the-playground.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Structured Output Support in the Playground" -slug: structured-output-support-in-the-playground -date: 2025-04-15 -tags: [v0.42.0] ---- - - - - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px"}}> - <iframe - width="1030" - height="500" - src="https://www.youtube.com/embed/08r4g5mO9lw" - title="YouTube video player" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - - -We now support structured output support in the playground. You can define the expected output format and validate the output against it. - -With Agenta's playground, implementing structured outputs is straightforward: - -- Open any prompt - -- Switch the Response format dropdown from text to JSON mode or JSON Schema - -- Paste or write your schema (Agenta supports the full JSON Schema specification) - -- Run the prompt - the response panel will show the response beautified - -- Commit the changes - the schema will be saved with your prompt, so when your SDK fetches the prompt, it will include the schema information - -Check out the blog post for more detail https://agenta.ai/blog/structured-outputs-playground - ---- diff --git a/docs/blog/entries/support-for-images-in-playground.mdx b/docs/blog/entries/support-for-images-in-playground.mdx deleted file mode 100644 index 1ffe451c16..0000000000 --- a/docs/blog/entries/support-for-images-in-playground.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Support for Images in the Playground" -slug: support-for-images-in-playground -date: 2025-07-29 -tags: [v0.50.0] ---- - -```mdx-code-block -import { Stream } from '@cloudflare/stream-react'; -import Image from "@theme/IdealImage"; -``` - -Agenta now supports images in the playground, test sets, and evaluations. This enables a systematic workflow for developing and testing applications that use vision models. - -**New Features:** - -- **Image Support in Playground:** Add images directly to your prompts when experimenting in the playground. -- **Multi-modal Test Sets:** Create and manage test sets that include image inputs alongside text. -- **Image-based Evaluations:** Run evaluations on prompts designed to process images, allowing for systematic comparison of different prompt versions or models. - - -<Stream controls src="7af04544acfcf1adcf412dab71753106" height="400px" /> - - - ---- diff --git a/docs/blog/entries/tool-support-in-the-playground.mdx b/docs/blog/entries/tool-support-in-the-playground.mdx deleted file mode 100644 index 7de33e228f..0000000000 --- a/docs/blog/entries/tool-support-in-the-playground.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Tool Support in the Playground" -slug: tool-support-in-the-playground -date: 2025-05-10 -tags: [v0.43.1] ---- - - - - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px"}}> - <iframe - width="1030" - height="500" - src="https://www.youtube.com/embed/SGqHOJf7tb8" - title="YouTube video player" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - - -We released tool usage in the Agenta playground - a key feature for anyone building agents with LLMs. - -Agents need tools to access external data, perform calculations, or call APIs. - -Now you can: -- Define tools directly in the playground using JSON schema -- Test how your prompt generates tool calls in real-time -- Preview how your agent handles tool responses -- Verify tool call correctness with custom evaluators - -The tool schema is saved with your prompt configuration, making integration easy when you fetch configs through the API. - ---- diff --git a/docs/blog/entries/ui-redesign-and-configuration-management-and-overview-view.mdx b/docs/blog/entries/ui-redesign-and-configuration-management-and-overview-view.mdx deleted file mode 100644 index 1c737ab63d..0000000000 --- a/docs/blog/entries/ui-redesign-and-configuration-management-and-overview-view.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "UI Redesign and Configuration Management and Overview View" -slug: ui-redesign-and-configuration-management-and-overview-view -date: 2024-08-22 -tags: [v0.24.0] ---- - - -import Image from "@theme/IdealImage"; - - - - -<div> - <Image - img={require("/images/changelog/new_ui.png")} - alt="Button for exporting evaluation results" - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - /> -</div> - -We've completely redesigned the platform's UI. Additionally we have introduced a new overview view for your applications. This is part of a series of upcoming improvements slated for the next few weeks. - -The new overview view offers: - -- A dashboard displaying key metrics of your application -- A table with all the variants of your applications -- A summary of your application's most recent evaluations - -We've also added a new **JSON Diff evaluator**. This evaluator compares two JSON objects and provides a similarity score. - -Lastly, we've updated the UI of our documentation. - ---- diff --git a/docs/blog/entries/vertex-ai-provider-support.mdx b/docs/blog/entries/vertex-ai-provider-support.mdx deleted file mode 100644 index 1c4cbc6767..0000000000 --- a/docs/blog/entries/vertex-ai-provider-support.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Vertex AI Provider Support" -slug: vertex-ai-provider-support -date: 2025-10-24 -tags: [v0.58.1] ---- - -import Image from "@theme/IdealImage"; - -We've added support for Google Cloud's Vertex AI platform. You can now use Gemini models and other Vertex AI partner models directly in Agenta. - -### What's New - -Vertex AI is now available as a provider across the platform: - -- **Playground**: Configure and test Gemini models and other Vertex AI models -- **Model Hub**: Add your Vertex AI credentials and manage available models -- **Gateway**: Access Vertex AI models through the InVoke endpoints - -You can use any model available through Vertex AI, including: -- **Gemini models**: Google's most capable AI models (gemini-2.5-pro, gemini-2.5-flash, etc.) -- **Partner models**: Claude, Llama, Mistral, and other models available through Vertex AI Model Garden - -### Configuration - -To get started with Vertex AI, go to Settings → Model Hub and add your Vertex AI credentials: - -- **Vertex Project**: Your Google Cloud project ID -- **Vertex Location**: The region for your models (e.g., `us-central1`, `europe-west4`) -- **Vertex Credentials**: Your service account key in JSON format - -For detailed setup instructions, see our [documentation on adding custom providers](/prompt-engineering/playground/custom-providers#configuring-vertex-ai). - -### Security - -All API keys and credentials are encrypted both in transit and at rest, ensuring your sensitive information stays secure. - ---- diff --git a/docs/blog/entries/viewing-traces-in-the-playground-and-authentication-for-deployed-applications.mdx b/docs/blog/entries/viewing-traces-in-the-playground-and-authentication-for-deployed-applications.mdx deleted file mode 100644 index 7117044e43..0000000000 --- a/docs/blog/entries/viewing-traces-in-the-playground-and-authentication-for-deployed-applications.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Viewing Traces in the Playground and Authentication for Deployed Applications" -slug: viewing-traces-in-the-playground-and-authentication-for-deployed-applications -date: 2024-11-29 -tags: [v0.28.0] ---- - - - - - - -#### Viewing traces in the playground: - -You can now see traces directly in the playground. For simple applications, this means you can view the prompts sent to LLMs. For custom workflows, you get an overview of intermediate steps and outputs. This makes it easier to understand what’s happening under the hood and debug your applications. - -#### Authentication improvements: - -We’ve strengthened authentication for deployed applications. As you know, Agenta lets you either fetch the app’s config or call it with Agenta acting as a proxy. Now, we’ve added authentication to the second method. The APIs we create are now protected and can be called using an API key. You can find code snippets for calling the application in the overview page. - -#### Documentation improvements: - -We’ve added new cookbooks and updated existing documentation: - -- New [cookbook for observability with LangChain](/tutorials/cookbooks/observability_langchain) -- Updated the [custom workflows documentation](/custom-workflows/overview) and added [reference](/reference/sdk/custom-workflow) -- Updated the [reference for the observability SDK](/reference/sdk/observability) and [for the prompt management SDK](/reference/sdk/configuration-management) - -#### Bug fixes: - -- Fixed an issue with the observability SDK not being compatible with LiteLLM. -- Fixed an issue where cost and token usage were not correctly computed for all calls. - ---- diff --git a/docs/blog/entries/we-are-soc-2-type-2-certified.mdx b/docs/blog/entries/we-are-soc-2-type-2-certified.mdx deleted file mode 100644 index ba6c5cb290..0000000000 --- a/docs/blog/entries/we-are-soc-2-type-2-certified.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "We are SOC 2 Type 2 Certified" -slug: we-are-soc-2-type-2-certified -date: 2025-04-18 -tags: [v0.42.1] ---- - - - - -We are SOC 2 Type 2 Certified. This means that our platform is audited and certified by an independent third party to meet the highest standards of security and compliance. - ---- diff --git a/docs/blog/main.mdx b/docs/blog/main.mdx index e55eed8a9c..80b9c615f1 100644 --- a/docs/blog/main.mdx +++ b/docs/blog/main.mdx @@ -1,6 +1,5 @@ --- title: "Changelog" -wrapperClassName: changelog-main --- ```mdx-code-block @@ -10,252 +9,7 @@ import Image from "@theme/IdealImage"; <section class="changelog"> -### [Documentation Overhaul](/changelog/documentation-architecture-overhaul) - -_3 November 2025_ - -**v0.59.10** - -<Image img={require('/static/images/changelog/agenta_askai.png')} alt="Ask AI feature in documentation" style={{display: 'block', margin: '20px auto', textAlign: 'center'}} /> - -We've completely rewritten and restructured our documentation with a new architecture. This is one of the largest updates we've made, involving a near-complete rewrite of existing content. - -Key improvements include: -- **[Diataxis Framework](https://diataxis.fr/)**: Organized content into Tutorials, How-to Guides, Reference, and Explanation sections for better discoverability -- **[Expanded Observability Docs](/observability/overview)**: Added missing documentation for tracing, annotations, and observability features -- **[JavaScript/TypeScript Support](/observability/quick-start-opentelemetry)**: Added code examples and documentation for JavaScript developers alongside Python -- **Ask AI Feature**: Ask questions directly to the documentation for instant answers - ---- - -### [Vertex AI Provider Support](/changelog/vertex-ai-provider-support) - -_24 October 2025_ - -**v0.59.6** - -We've added support for Google Cloud's Vertex AI platform. You can now use Gemini models and other Vertex AI partner models in the playground, configure them in the Model Hub, and access them through the Gateway using InVoke endpoints. - -Check out the documentation for [configuring Vertex AI models](/prompt-engineering/playground/custom-providers#configuring-vertex-ai). - ---- - -### [Filtering Traces by Annotation](/changelog/filtering-traces-by-annotation) - -_14 October 2025_ - -**v0.58.0** -<Image img={require('/static/images/changelog/changelog-annotation-filter.png')} alt="Annotation filtering interface" style={{display: 'block', margin: '20px auto', textAlign: 'center'}} /> - - -You can now filter and search traces based on their annotations. This helps you find traces with low scores or bad feedback quickly. - -We rebuilt the filtering system in observability with a simpler dropdown and more options. You can now filter by span status, input keys, app or environment references, and any key within your span. - -The new annotation filtering lets you find: -- Spans evaluated by a specific evaluator -- Spans with user feedback like `success=True` - - -This enables powerful workflows: [capture user feedback](/tutorials/cookbooks/capture-user-feedback) from your app, filter to find traces with bad feedback, add them to test sets, and improve your prompts based on real user data. - ---- - -### [New Evaluation Results Dashboard](/changelog/new-evaluation-results-dashboard) - -_26 September 2025_ - -**v0.54.0** - -We've completely redesigned the evaluation results dashboard. You can analyse your evaluation results more easily and understand performance across different metrics. - -Here's what's new: - -- **Metrics plots**: We've added plots for all the evaluator metrics. You can not see the distribution of the results and easily spot outliers. -- **Side-by-side comparison**: You can now compare multiple evaluations simultaneously. You can compare the plots but also the single outputs. -- **Improved test cases view**: The results are now displayed in a tabular format works both for small and large datasets. -- **Focused detail view**: A new focused drawer lets you examine individual data points in more details. It's very helpful if your data is large. -- **Configuration view**: See exactly which configurations were used in each evaluation -- **Evaluation Run naming and descriptions**: Add names and descriptions to your evaluation runs to organize things better. - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px", flexDirection: 'column', alignItems: 'center'}}> - <iframe - width="100%" - height="500" - src="https://www.youtube.com/embed/HxY6lZ9HIyw" - title="New Evaluation Results Dashboard - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - ---- - -### [Deep URL Support for Sharable Links](/changelog/deep-url-support-for-sharable-links) - -_24 September 2025_ - -**v0.53.0** - -URLs across Agenta now include workspace context, making them fully shareable between team members. Previously, URLs would always point to the default workspace, causing issues when refreshing pages or sharing links. - -Now you can deep link to almost anything in the platform - prompts, evaluations, and more - in any workspace. Share links directly with team members and they'll see exactly what you intended, regardless of their default workspace settings. - ---- - -### [Major Speed Improvements and Bug Fixes](/changelog/speed-improvements-in-the-playground) - -_19 September 2025_ - -**v0.52.5** - -We rewrote most of Agenta's frontend. You'll see much faster speeds when you create prompts or use the playground. - -We also made many improvements and fixed bugs: - -**Improvements:** - -- [LLM-as-a-judge](/evaluation/configure-evaluators/llm-as-a-judge) now uses double curly braces `{{}}` instead of single curly braces `{` and `}`. This matches how normal prompts work. Old LLM-as-a-judge prompts with single curly braces still work. We updated the LLM-as-a-judge playground to make editing prompts easier. - -**Self-hosting:** - -- You can now use [an external Redis instance](/self-host/configuration#redis-caching) for caching by setting it as an environment variable - -**Bug fixes:** - -- Fixed the [custom workflow quick start tutorial](/custom-workflows/quick-start) and examples -- Fixed SDK compatibility issues with Python 3.9 -- Fixed default filtering in observability dashboard -- Fixed error handling in the evaluator playground -- Fixed the Tracing SDK to allow instrumenting streaming responses and overriding OTEL environment variables ---- - -### [Multiple Metrics in Human Evaluation](/changelog/multiple-metrics-in-human-evaluation) - -_9 September 2025_ - -**v0.51.0** - -We rebuilt the human evaluation workflow from scratch. Now you can set multiple evaluators and metrics and use them to score the outputs. - -This lets you evaluate the same output on different metrics like **relevance** or **completeness**. You can also create binary, numerical scores, or even use strings for **comments** or **expected answer**. - -Watch the video below and read the [post](/changelog/multiple-metrics-in-human-evaluation) for more details. Or check out the [docs](/evaluation/human-evaluation/quick-start) to learn how to use the new human evaluation workflow. - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px", flexDirection: 'column', alignItems: 'center'}}> - <iframe - width="100%" - height="500" - src="https://www.youtube.com/embed/zpoAbQlsfcw" - title="Major Playground Improvements - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - ---- - -### [DSPy Integration](/observability/integrations/dspy) - -_29 August 2025_ - -We've added DSPy integration to Agenta. You can now trace and debug your DSPy applications with Agenta. - -<Image - style={{ - display: "block", - textAlign: "center", - }} - img={require("/images/changelog/agenta_dspy.png")} - alt="DSPy integration with Agenta" - loading="lazy" -/> - -[**View the full DSPy integration →**](/observability/integrations/dspy) - ---- - -### [Open-sourcing our Product Roadmap](/roadmap) - -_12 August 2025_ - -We've made our product roadmap completely transparent and community-driven. - -You can now see exactly what we're building, what's shipped, and what's coming next. Plus vote on features that matter most to you. - -**Why we're doing this:** We believe open-source startups succeed when they create the most value possible, and the best way to do that is by building with our community, not in isolation. Up until now, we've been secretive with our roadmap, but we're losing something important: your feedback and the ability to let you shape our direction. Today we're open-sourcing our roadmap because we want to build a community of owners, not just passive users. - -[**View the full roadmap →**](/roadmap) - ---- - -### [Major Playground Improvements and Enhancements](/changelog/major-playground-improvements-and-enhancements) -_7 August 2025_ -**v0.50.5** - -We've made significant improvements to the playground. Key features include: -- Improving the error handling in JSON editor for structured output -- Preventing the JSON field order from being changed -- Visual diff when committing changes -- Markdown and text view toggle -- Collapsible interface elements -- Collapsible test cases for large sets - -<div style={{display: 'flex', justifyContent: 'center', marginTop: "20px", marginBottom: "20px", flexDirection: 'column', alignItems: 'center'}}> - <iframe - width="100%" - height="500" - src="https://www.youtube.com/embed/zaiMuWLwC5s" - title="Major Playground Improvements - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</div> - - ---- - -### [Support for Images in the Playground](/changelog/support-for-images-in-playground) -_29 July 2025_ -**v0.50.0** - -Agenta now supports images in the playground, test sets, and evaluations. Click above for more details. - -<Stream controls src="7af04544acfcf1adcf412dab71753106" height="400px" /> - ---- - -### [LlamaIndex Integration](/changelog/llamaindex-integration) -_17 June 2025_ -**v0.48.4** - -We're excited to announce observability support for LlamaIndex applications. - -If you're using LlamaIndex, you can now see detailed traces in Agenta to debug your application. - -The integration is auto-instrumentation - just add one line of code and you'll start seeing all your LlamaIndex operations traced. - -This helps when you need to understand what's happening inside your RAG pipeline, track performance bottlenecks, or debug issues in production. - -We've put together a Jupyter notebook and tutorial to get you started. Links are in the comments. - -<Image - style={{ - display: "block", - textAlign: "center", - }} - img={require("/images/changelog/agenta_llamaindex.png")} - alt="LlamaIndex integration with Agenta" - loading="lazy" -/> - ---- - - -### [Annotate Your LLM Response (preview)](/changelog/annotate-your-llm-response-preview) +### Annotate Your LLM Response (preview) _15 May 2025_ **v0.45.0** @@ -270,11 +24,12 @@ This is useful to: - Run custom evaluation workflows - Measure application performance in real-time -Check out the how to [annotate traces from API](/observability/trace-with-python-sdk/annotate-traces) for more details. Or try our new tutorial (available as [jupyter notebook](https://github.com/Agenta-AI/agenta/blob/main/examples/jupyter/capture_user_feedback.ipynb)) [here](/tutorials/cookbooks/capture-user-feedback). +Check out the how to [annotate traces from API](/evaluation/annotate-api) for more details. Or try our new tutorial (available as [jupyter notebook](https://github.com/Agenta-AI/agenta/blob/main/examples/jupyter/capture_user_feedback.ipynb)) [here](/tutorials/cookbooks/capture-user-feedback). <Image style={{ display: "block", + margin: "20px", textAlign: "center", }} img={require("/images/evaluation/evaluation-screenshot-jupyter.png")} @@ -287,7 +42,7 @@ Other stuff: --- -### [Tool Support in the Playground](/changelog/tool-support-in-the-playground) +### Tool Support in the Playground _10 May 2025_ **v0.43.1** @@ -318,7 +73,7 @@ The tool schema is saved with your prompt configuration, making integration easy --- -### [Documentation Overhaul, New Models, and Platform Improvements](/changelog/documentation-overhaul-new-models-and-platform-improvements) +### Documentation Overhaul, New Models, and Platform Improvements _2 May 2025_ @@ -363,14 +118,14 @@ Check out our updated [self-hosting documentation](/self-host/quick-start) for d - Added chat support in cloud --- -### [We are SOC 2 Type 2 Certified](/changelog/we-are-soc-2-type-2-certified) +### We are SOC 2 Type 2 Certified _18 April 2025_ **v0.42.1** We are SOC 2 Type 2 Certified. This means that our platform is audited and certified by an independent third party to meet the highest standards of security and compliance. --- -### [Structured Output Support in the Playground](/changelog/structured-output-support-in-the-playground) +### Structured Output Support in the Playground _15 April 2025_ **v0.42.0** @@ -404,7 +159,7 @@ With Agenta's playground, implementing structured outputs is straightforward: Check out the blog post for more detail https://agenta.ai/blog/structured-outputs-playground --- -### [New Feature: Prompt and Deployment Registry](/changelog/new-feature-prompt-and-deployment-registry) +### New Feature: Prompt and Deployment Registry _7 April 2025_ **v0.38.0** @@ -440,7 +195,7 @@ Learn more in our [blog post](https://agenta.ai/blog/introducing-prompt-registry --- -### [Improvements to the Playground and Custom Workflows](/changelog/improvements-to-the-playground-and-custom-workflows) +### Improvements to the Playground and Custom Workflows _19 March 2025_ **v0.36.0** @@ -453,7 +208,7 @@ As for custom workflows, now they work with sub-routes. This means you can have --- -### [OpenTelemetry Compliance and Custom workflows from API](/changelog/opentelemetry-compliance-and-custom-workflows-from-api) +### OpenTelemetry Compliance and Custom workflows from API _11 March 2025_ @@ -467,7 +222,7 @@ Agenta is now fully OpenTelemetry-compliant. This means you can seamlessly integ We've enhanced distributed tracing capabilities to better debug complex distributed agent systems. All HTTP interactions between agents—whether running within Agenta's SDK or externally—are automatically traced, making troubleshooting and monitoring easier. -Detailed instructions and examples are available in our [distributed tracing documentation](/observability/trace-with-opentelemetry/distributed-tracing). +Detailed instructions and examples are available in our [distributed tracing documentation](/observability/opentelemetry). **Improved Custom Workflows**: @@ -478,7 +233,7 @@ Based on your feedback, we've streamlined debugging and running custom workflows - **Custom Workflows in the new playground**: Custom workflows are now fully compatible with the new playground. You can now nest configurations, run side-by-side comparisons, and debug your agents and complex workflows very easily. --- -### [New Playground](/changelog/new-playground) +### New Playground _4 February 2025_ @@ -505,7 +260,7 @@ You can explore these features in our updated playground documentation. --- -### [Quality of life improvements](/changelog/quality-of-life-improvements) +### Quality of life improvements _27 January 2025_ @@ -533,7 +288,7 @@ Small release today with quality of life improvements, while we're preparing the --- -### [Agenta is SOC 2 Type 1 Certified](/changelog/agenta-is-soc-2-type-1-certified) +### Agenta is SOC 2 Type 1 Certified _15 January 2025_ @@ -567,7 +322,7 @@ We've also updated our [trust center](https://trustcenter.agenta.ai) with detail --- -### [New Onboarding Flow](/changelog/new-onboarding-flow) +### New Onboarding Flow _4 January 2025_ @@ -600,9 +355,11 @@ We've redesigned our platform's onboarding to make getting started simpler and m - Enhanced frontend performance - Fixed scroll behavior in trace view +You can check out the tutorial for the RAG demo project [here](/tutorials/cookbooks/RAG-QA-docs). + --- -### [Add Spans to Test Sets](/changelog/add-spans-to-test-sets) +### Add Spans to Test Sets _11 December 2024_ @@ -627,7 +384,7 @@ Additional improvements: --- -### [Viewing Traces in the Playground and Authentication for Deployed Applications](/changelog/viewing-traces-in-the-playground-and-authentication-for-deployed-applications) +### Viewing Traces in the Playground and Authentication for Deployed Applications _29 November 2024_ @@ -646,6 +403,7 @@ We’ve strengthened authentication for deployed applications. As you know, Agen We’ve added new cookbooks and updated existing documentation: - New [cookbook for observability with LangChain](/tutorials/cookbooks/observability_langchain) +- New [cookbook for custom workflows](/tutorials/cookbooks/AI-powered-code-reviews) where we build an AI powered code reviewer - Updated the [custom workflows documentation](/custom-workflows/overview) and added [reference](/reference/sdk/custom-workflow) - Updated the [reference for the observability SDK](/reference/sdk/observability) and [for the prompt management SDK](/reference/sdk/configuration-management) @@ -656,7 +414,7 @@ We’ve added new cookbooks and updated existing documentation: --- -### [Observability and Prompt Management](/changelog/observability-and-prompt-management) +### Observability and Prompt Management _6 November 2024_ @@ -691,11 +449,11 @@ We’ll publish a full blog post soon, but here’s a quick look at what the new **Next: Prompt Management** -We’ve completely rewritten the [prompt management SDK](/prompt-engineering/managing-prompts-programatically/setup), giving you full CRUD capabilities for prompts and configurations. This includes creating, updating, reading history, deploying new versions, and deleting old ones. You can find a first tutorial for this [here](/tutorials/sdk/manage-prompts-with-SDK). +We’ve completely rewritten the [prompt management SDK](/prompt-engineering/overview), giving you full CRUD capabilities for prompts and configurations. This includes creating, updating, reading history, deploying new versions, and deleting old ones. You can find a first tutorial for this [here](/tutorials/sdk/manage-prompts-with-SDK). **And finally: LLM-as-a-Judge Overhaul** -We've made significant upgrades to the [LLM-as-a-Judge evaluator](/evaluation/configure-evaluators/llm-as-a-judge). It now supports prompts with multiple messages and has access to all variables in a test case. You can also switch models (currently supporting OpenAI and Anthropic). These changes make the evaluator much more flexible, and we're seeing better results with it. +We’ve made significant upgrades to the [LLM-as-a-Judge evaluator](/evaluation/evaluators/llm-as-a-judge). It now supports prompts with multiple messages and has access to all variables in a test case. You can also switch models (currently supporting OpenAI and Anthropic). These changes make the evaluator much more flexible, and we’re seeing better results with it. <Image style={{ @@ -711,7 +469,7 @@ We've made significant upgrades to the [LLM-as-a-Judge evaluator](/evaluation/co --- -### [New Application Management View and Various Improvements](/changelog/new-application-management-view-and-various-improvements) +### New Application Management View and Various Improvements _22 October 2024_ @@ -729,7 +487,7 @@ Additionally, we are moving towards a new project structure for the application. --- -### [Evaluator Testing Playground and a New Evaluation View](/changelog/evaluator-testing-playground-and-a-new-evaluation-view) +### Evaluator Testing Playground and a New Evaluation View _22 September 2024_ @@ -748,7 +506,7 @@ Additionally, we have improved and redesigned the evaluation view. Both automati --- -### [UI Redesign and Configuration Management and Overview View](/changelog/ui-redesign-and-configuration-management-and-overview-view) +### UI Redesign and Configuration Management and Overview View _22 August 2024_ @@ -780,7 +538,7 @@ Lastly, we've updated the UI of our documentation. --- -### [New Alpha Version of the SDK for Creating Custom Applications](/changelog/new-alpha-version-of-the-sdk-for-creating-custom-applications) +### New Alpha Version of the SDK for Creating Custom Applications _20 August 2024_ @@ -827,7 +585,7 @@ def generate(country: str) -> str: --- -### [RAGAS Evaluators and Traces in the Playground](/changelog/ragas-evaluators-and-traces-in-the-playground) +### RAGAS Evaluators and Traces in the Playground _12 August 2024_ @@ -837,7 +595,7 @@ We're excited to announce two major features this week: 1. We've integrated [RAGAS evaluators](https://docs.ragas.io/) into agenta. Two new evaluators have been added: **RAG Faithfulness** (measuring how consistent the LLM output is with the context) and **Context Relevancy** (assessing how relevant the retrieved context is to the question). Both evaluators use intermediate outputs within the trace to calculate the final score. - [Check out the tutorial](/evaluation/configure-evaluators/rag-evaluators) to learn how to use RAG evaluators. + [Check out the tutorial](/evaluation/evaluators/rag-evaluators) to learn how to use RAG evaluators. {" "} @@ -873,7 +631,7 @@ Both features are available exclusively in the cloud and enterprise versions of --- -### [Migration from MongoDB to Postgres](/changelog/migration-from-mongodb-to-postgres) +### Migration from MongoDB to Postgres _9 July 2024_ @@ -887,7 +645,7 @@ If you are using the cloud version of Agenta, there is nothing you need to do (o --- -### [More Reliable Evaluations](/changelog/more-reliable-evaluations) +### More Reliable Evaluations _5 July 2024_ @@ -914,6 +672,8 @@ We have worked extensively on improving the **reliability of evaluations**. Spec - We fixed small UI issues with large output in human evaluations. - We have added a new export button in the evaluation view to export the results as a CSV file. +Additionally, we have added a new [Cookbook for run evaluation using the SDK](/tutorials/sdk/evaluate-with-SDK). + In **observability**: - We have added a **new integration with [Litellm](https://litellm.ai/)** to automatically trace all LLM calls done through it. @@ -921,7 +681,7 @@ In **observability**: --- -### [Evaluators can access all columns](/changelog/evaluators-can-access-all-columns) +### Evaluators can access all columns _4 June 2024_ @@ -950,7 +710,7 @@ In addition to this: --- -### [New LLM Provider: Welcome Gemini!](/changelog/new-llm-provider-welcome-gemini) +### New LLM Provider: Welcome Gemini! _25 May 2024_ @@ -968,7 +728,7 @@ We are excited to announce the addition of Google's Gemini to our list of suppor --- -### [Playground Improvements](/changelog/playground-improvements) +### Playground Improvements _24 May 2024_ @@ -996,7 +756,7 @@ _24 May 2024_ --- -### [Prompt and Configuration Registry](/changelog/prompt-and-configuration-registry) +### Prompt and Configuration Registry _1 May 2024_ @@ -1012,7 +772,7 @@ config = agenta.get_config(base_id="xxxxx", environment="production", cache_time ``` -You can find additional documentation [here](/prompt-engineering/integrating-prompts/integrating-with-agenta). +You can find additional documentation [here](/prompt-engineering/prompt-management/how-to-integrate-with-agenta). **Improvements** @@ -1023,7 +783,7 @@ You can find additional documentation [here](/prompt-engineering/integrating-pro --- -### [Miscellaneous Improvements](/changelog/miscellaneous-improvements) +### Miscellaneous Improvements _28 April 2024_ @@ -1039,7 +799,7 @@ _28 April 2024_ --- -### [Evaluation Speed Increase and Numerous Quality of Life Improvements](/changelog/evaluation-speed-increase-and-numerous-quality-of-life-improvements) +### Evaluation Speed Increase and Numerous Quality of Life Improvements _23rd April 2024_ @@ -1060,7 +820,7 @@ _23rd April 2024_ --- -### [Observability (beta)](/changelog/observability-beta) +### Observability (beta) _14th April 2024_ @@ -1087,7 +847,7 @@ Find examples of LLM apps created from code with observability <a href="https:// --- -### [Compare latency and costs](/changelog/compare-latency-and-costs) +### Compare latency and costs _1st April 2024_ @@ -1106,7 +866,7 @@ You can now compare the latency and cost of different variants in the evaluation --- -### [Minor improvements](/changelog/minor-improvements) +### Minor improvements _31st March 2024_ @@ -1136,7 +896,7 @@ You can now toggle the visibility of variants in the comparison view, allowing y --- -### [New evaluators](/changelog/new-evaluators) +### New evaluators _25th March 2024_ @@ -1159,7 +919,7 @@ We have added some more evaluators, a new string matching and a Levenshtein dist --- -### [Minor improvements](/changelog/minor-improvements-2) +### Minor improvements _11th March 2024_ @@ -1178,7 +938,7 @@ _11th March 2024_ --- -### [Highlight ouput difference when comparing evaluations](/changelog/highlight-ouput-difference-when-comparing-evaluations) +### Highlight ouput difference when comparing evaluations _4th March 2024_ @@ -1195,7 +955,7 @@ We have improved the evaluation comparison view to show the difference to the ex --- -### [Deployment Versioning and RBAC](/changelog/deployment-versioning-and-rbac) +### Deployment Versioning and RBAC _14th February 2024_ @@ -1232,7 +992,7 @@ You can now invite team members and assign them fine-grained roles in agenta. --- -### [Minor fixes](/changelog/minor-fixes) +### Minor fixes _4th February 2024_ @@ -1246,7 +1006,7 @@ _4th February 2024_ --- -### [Prompt Versioning](/changelog/prompt-versioning) +### Prompt Versioning _31st January 2024_ @@ -1265,7 +1025,7 @@ We've introduced the feature to version prompts, allowing you to track changes m --- -### [New JSON Evaluator](/changelog/new-json-evaluator) +### New JSON Evaluator _30th January 2024_ @@ -1283,7 +1043,7 @@ We have added a new evaluator to match JSON fields and added the possiblity to u --- -### [Improved error handling in evaluation](/changelog/improved-error-handling-in-evaluation) +### Improved error handling in evaluation _29th January 2024_ @@ -1307,7 +1067,7 @@ We have improved error handling in evaluation to return more information about t --- -### [Bring your own API key](/changelog/bring-your-own-api-key) +### Bring your own API key _25th January 2024_ @@ -1317,7 +1077,7 @@ Up until know, we required users to use our OpenAI API key when using cloud. Sta --- -### [Improved human evaluation workflow](/changelog/improved-human-evaluation-workflow) +### Improved human evaluation workflow _24th January 2024_ @@ -1353,7 +1113,7 @@ We have updated the human evaluation table view to add annotation and correct an --- -### [Revamping evaluation](/changelog/revamping-evaluation) +### Revamping evaluation _22nd January 2024_ @@ -1387,7 +1147,7 @@ We've spent the past month re-engineering our evaluation workflow. Here's what's --- -### [Adding Cost and Token Usage to the Playground](/changelog/adding-cost-and-token-usage-to-the-playground) +### Adding Cost and Token Usage to the Playground _12th January 2024_ @@ -1403,7 +1163,7 @@ We've added a feature that allows you to compare the time taken by an LLM app, i ----# -### [Changes to the SDK](/changelog/changes-to-the-sdk) +### Changes to the SDK This necessitated modifications to the SDK. Now, the LLM application API returns a JSON instead of a string. The JSON includes the output message, usage details, and cost: @@ -1423,7 +1183,7 @@ This necessitated modifications to the SDK. Now, the LLM application API returns --- -### [Improving Side-by-side Comparison in the Playground](/changelog/improving-side-by-side-comparison-in-the-playground) +### Improving Side-by-side Comparison in the Playground _19th December 2023_ @@ -1433,7 +1193,7 @@ _19th December 2023_ --- -### [Resolved Batch Logic Issue in Evaluation](/changelog/resolved-batch-logic-issue-in-evaluation) +### Resolved Batch Logic Issue in Evaluation _18th December 2023_ @@ -1443,7 +1203,7 @@ _18th December 2023_ --- -### [Comprehensive Updates and Bug Fixes](/changelog/comprehensive-updates-and-bug-fixes) +### Comprehensive Updates and Bug Fixes _12th December 2023_ @@ -1457,7 +1217,7 @@ _12th December 2023_ --- -### [Integrated File Input and UI Enhancements](/changelog/integrated-file-input-and-ui-enhancements) +### Integrated File Input and UI Enhancements _12th December 2023_ @@ -1471,7 +1231,7 @@ _12th December 2023_ --- -### [Minor Adjustments for Better Performance](/changelog/minor-adjustments-for-better-performance) +### Minor Adjustments for Better Performance _7th December 2023_ @@ -1481,7 +1241,7 @@ _7th December 2023_ --- -### [Bug Fix for Application Saving](/changelog/bug-fix-for-application-saving) +### Bug Fix for Application Saving _7th December 2023_ @@ -1491,7 +1251,7 @@ _7th December 2023_ --- -### [Introduction of Chat-based Applications](/changelog/introduction-of-chat-based-applications) +### Introduction of Chat-based Applications _1st December 2023_ @@ -1502,7 +1262,7 @@ _1st December 2023_ --- -### [Multiple UI and CSV Reader Fixes](/changelog/multiple-ui-and-csv-reader-fixes) +### Multiple UI and CSV Reader Fixes _1st December 2023_ @@ -1515,7 +1275,7 @@ _1st December 2023_ --- -### [Enhanced Self-hosting and Mistral Model Tutorial](/changelog/enhanced-self-hosting-and-mistral-model-tutorial) +### Enhanced Self-hosting and Mistral Model Tutorial _17th November 2023_ @@ -1528,7 +1288,7 @@ _17th November 2023_ --- -### [Sentry Integration and User Communication Improvements](/changelog/sentry-integration-and-user-communication-improvements) +### Sentry Integration and User Communication Improvements _12th November 2023_ @@ -1541,7 +1301,7 @@ _12th November 2023_ --- -### [Cypress Tests and UI Improvements](/changelog/cypress-tests-and-ui-improvements) +### Cypress Tests and UI Improvements _2nd November 2023_ @@ -1554,7 +1314,7 @@ _2nd November 2023_ --- -### [Launch of SDK Version 2 and Cloud-hosted Version](/changelog/launch-of-sdk-version-2-and-cloud-hosted-version) +### Launch of SDK Version 2 and Cloud-hosted Version _23rd October 2023_ diff --git a/docs/blog/slug-list.json b/docs/blog/slug-list.json deleted file mode 100644 index ec20e654f2..0000000000 --- a/docs/blog/slug-list.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - "annotate-your-llm-response-preview", - "tool-support-in-the-playground", - "documentation-overhaul-new-models-and-platform-improvements", - "we-are-soc-2-type-2-certified", - "structured-output-support-in-the-playground", - "new-feature-prompt-and-deployment-registry", - "improvements-to-the-playground-and-custom-workflows", - "opentelemetry-compliance-and-custom-workflows-from-api", - "new-playground", - "quality-of-life-improvements", - "agenta-is-soc-2-type-1-certified", - "new-onboarding-flow", - "add-spans-to-test-sets", - "viewing-traces-in-the-playground-and-authentication-for-deployed-applications", - "observability-and-prompt-management", - "new-application-management-view-and-various-improvements", - "evaluator-testing-playground-and-a-new-evaluation-view", - "ui-redesign-and-configuration-management-and-overview-view", - "new-alpha-version-of-the-sdk-for-creating-custom-applications", - "ragas-evaluators-and-traces-in-the-playground", - "migration-from-mongodb-to-postgres", - "more-reliable-evaluations", - "evaluators-can-access-all-columns", - "new-llm-provider-welcome-gemini", - "playground-improvements", - "prompt-and-configuration-registry", - "miscellaneous-improvements", - "evaluation-speed-increase-and-numerous-quality-of-life-improvements", - "observability-beta", - "compare-latency-and-costs", - "minor-improvements", - "new-evaluators", - "minor-improvements-2", - "highlight-ouput-difference-when-comparing-evaluations", - "deployment-versioning-and-rbac", - "minor-fixes", - "prompt-versioning", - "new-json-evaluator", - "improved-error-handling-in-evaluation", - "bring-your-own-api-key", - "improved-human-evaluation-workflow", - "revamping-evaluation", - "adding-cost-and-token-usage-to-the-playground", - "changes-to-the-sdk", - "improving-side-by-side-comparison-in-the-playground", - "resolved-batch-logic-issue-in-evaluation", - "comprehensive-updates-and-bug-fixes", - "integrated-file-input-and-ui-enhancements", - "minor-adjustments-for-better-performance", - "bug-fix-for-application-saving", - "introduction-of-chat-based-applications", - "multiple-ui-and-csv-reader-fixes", - "enhanced-self-hosting-and-mistral-model-tutorial", - "sentry-integration-and-user-communication-improvements", - "cypress-tests-and-ui-improvements", - "launch-of-sdk-version-2-and-cloud-hosted-version" -] diff --git a/docs/docs/custom-workflows/02-quick-start.mdx b/docs/docs/custom-workflows/02-quick-start.mdx index 8dd424b3e6..88ac787dc8 100644 --- a/docs/docs/custom-workflows/02-quick-start.mdx +++ b/docs/docs/custom-workflows/02-quick-start.mdx @@ -75,7 +75,7 @@ def generate(blog_post: str): if __name__ == "__main__": import uvicorn - uvicorn.run("agenta:app", host="0.0.0.0", port=8000, reload=True) + uvicorn.run("agenta.sdk.decorators.routing:app", host="0.0.0.0", port=8000, reload=True) ``` Let's explore each section: @@ -130,10 +130,10 @@ Use [Uvicorn](https://www.uvicorn.org/) to serve your application: ```python if __name__ == "__main__": import uvicorn - uvicorn.run("agenta:app", host="0.0.0.0", port=8000, reload=True) + uvicorn.run("agenta.sdk.decorators.routing:app", host="0.0.0.0", port=8000, reload=True) ``` -`agenta:app` defines your FastAPI server handling all requests from Agenta. +`agenta.sdk.decorators.routing:app` defines your FastAPI server handling all requests from Agenta. :::warning The application server (`http://localhost:8000`) must be accessible from the internet when running evaluations. Consider using [ngrok](https://ngrok.com/) for tunneling during tests. diff --git a/docs/docs/evaluation/01-overview.mdx b/docs/docs/evaluation/01-overview.mdx new file mode 100644 index 0000000000..d1ca0d4e50 --- /dev/null +++ b/docs/docs/evaluation/01-overview.mdx @@ -0,0 +1,90 @@ +--- +title: "Overview" +description: Systematically evaluate your LLM applications and compare their performance. +sidebar_position: 1 +--- + +```mdx-code-block +import DocCard from '@theme/DocCard'; +import clsx from 'clsx'; + +``` + +The key to building production-ready LLM applications is to have a tight feedback loop of prompt engineering and evaluation. Whether you are optimizing a chatbot, working on Retrieval-Augmented Generation (RAG), or fine-tuning a text generation task, evaluation is a critical step to ensure consistent performance across different inputs, models, and parameters. In this section, we explain how to use agenta to quickly evaluate and compare the performance of your LLM applications. + +### Set up evaluation + +<section className='row'> +<article key='1' className="col col--6 margin-bottom--lg"> + + <DocCard + item={{ + type: "link", + href: "/evaluation/configure-evaluators", + label: "Configure Evaluators", + description: "Configure evaluators for your use case", + }} + /> + </article> + + <article key='2' className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/evaluation/create-test-sets", + label: "Create Test Sets", + description: "Create Test Sets", + }} + /> + </article> + </section> + +### Run evaluations + + <section className='row'> + +<article key="1" className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/evaluation/no-code-evaluation", + label: "Run Evaluations from the web UI", + description: "Learn about the evaluation process in Agenta", + }} + /> +</article> + + <article key='2' className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/evaluation/sdk-evaluation", + label: "Run Evaluations with the SDK", + description: "Learn about the evaluation process in Agenta", + }} + /> + </article> + </section> + +### Available evaluators + +| **Evaluator Name** | **Use Case** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------ | -------------------------------------------------------------------------------- | +| [Exact Match](/evaluation/evaluators/classification-entiry-extraction#exact-match) | Classification/Entity Extraction | Pattern Matching | Checks if the output exactly matches the expected result. | +| [Contains JSON](/evaluation/evaluators/classification-entiry-extraction#contains-json) | Classification/Entity Extraction | Pattern Matching | Ensures the output contains valid JSON. | +| [Regex Test](/evaluation/evaluators/pattern-matching#regular-expression) | Classification/Entity Extraction | Pattern Matching | Checks if the output matches a given regex pattern. | +| [JSON Field Match](/evaluation/evaluators/classification-entiry-extraction#json-field-match) | Classification/Entity Extraction | Pattern Matching | Compares specific fields within JSON data. | +| [JSON Diff Match](/evaluation/evaluators/classification-entiry-extraction#json-diff-match) | Classification/Entity Extraction | Similarity Metrics | Compares generated JSON with a ground truth JSON based on schema or values. | +| [Similarity Match](/evaluation/evaluators/semantic-similarity#similarity-match) | Text Generation / Chatbot | Similarity Metrics | Compares generated output with expected using Jaccard similarity. | +| [Semantic Similarity Match](/evaluation/evaluators/semantic-similarity#semantic-similarity-match) | Text Generation / Chatbot | Semantic Analysis | Compares the meaning of the generated output with the expected result. | +| [Starts With](/evaluation/evaluators/pattern-matching#starts-with) | Text Generation / Chatbot | Pattern Matching | Checks if the output starts with a specified prefix. | +| [Ends With](/evaluation/evaluators/pattern-matching#ends-with) | Text Generation / Chatbot | Pattern Matching | Checks if the output ends with a specified suffix. | +| [Contains](/evaluation/evaluators/pattern-matching#contains) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains a specific substring. | +| [Contains Any](/evaluation/evaluators/pattern-matching#contains-any) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains any of a list of substrings. | +| [Contains All](/evaluation/evaluators/pattern-matching#contains-all) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains all of a list of substrings. | +| [Levenshtein Distance](/evaluation/evaluators/semantic-similarity#levenshtein-distance) | Text Generation / Chatbot | Similarity Metrics | Calculates the Levenshtein distance between output and expected result. | +| [LLM-as-a-judge](/evaluation/evaluators/llm-as-a-judge) | Text Generation / Chatbot | LLM-based | Sends outputs to an LLM model for critique and evaluation. | +| [RAG Faithfulness](/evaluation/evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Evaluates if the output is faithful to the retrieved documents in RAG workflows. | +| [RAG Context Relevancy](/evaluation/evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Measures the relevancy of retrieved documents to the given question in RAG. | +| [Custom Code Evaluation](/evaluation/evaluators/custom-evaluator) | Custom Logic | Custom | Allows users to define their own evaluator in Python. | +| [Webhook Evaluator](/evaluation/evaluators/webhook-evaluator) | Custom Logic | Custom | Sends output to a webhook for external evaluation. | diff --git a/docs/docs/evaluation/01-quick-start-ui.mdx b/docs/docs/evaluation/01-quick-start-ui.mdx deleted file mode 100644 index cbcdacc035..0000000000 --- a/docs/docs/evaluation/01-quick-start-ui.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Quick Start: Evaluation from UI" -sidebar_label: "Quick Start (UI)" -description: "Get started with evaluating your LLM applications using the Agenta web interface" -sidebar_position: 1 ---- - -import { Redirect } from '@docusaurus/router'; - -<Redirect to="/evaluation/evaluation-from-ui/quick-start" /> diff --git a/docs/docs/evaluation/02-create-test-sets.mdx b/docs/docs/evaluation/02-create-test-sets.mdx new file mode 100644 index 0000000000..dd5af47f99 --- /dev/null +++ b/docs/docs/evaluation/02-create-test-sets.mdx @@ -0,0 +1,183 @@ +--- +title: "Create Test Sets" +--- + +```mdx-code-block +import { Stream } from '@cloudflare/stream-react'; +import Image from "@theme/IdealImage"; +``` + +This guide outlines the various methods for creating test sets in Agenta and provides specifications for the test set schema. + +Test sets are one of the most critical components for building reliable LLM-powered applications. They allow you to evaluate your application, find edge cases, prevent regressions, and systematically improve performance over time. + +## What is a Test Set? + +A test set is a collection of test cases, each containing: + +- **Inputs**: The data your LLM application expects (required) +- **Ground Truth**: The expected answer from your application (optional, often stored as "correct_answer") +- **Annotations**: Additional metadata or rules about the test case (optional) + +You can create a test set in Agenta using the following methods: + +- [By uploading a CSV or JSON file](#creating-a-test-set-from-a-csv-or-json) +- [Using the API](#creating-a-test-set-using-the-api) +- [Using the UI](#creatingediting-a-test-set-from-the-ui) +- [From the playground](#creating-a-test-set-from-the-playground) +- [From traces in observability](#adding-data-from-traces) + +## Creating a Test Set from a CSV or JSON + +To create a test set from a CSV or JSON file: + +1. Go to `Test sets` +2. Click `Upload test sets` +3. Select either `CSV` or `JSON` + +<Image img={require("/images/test-sets/upload_test_set.png")} /> + +### CSV Format + +We use CSV with commas (,) as separators and double quotes (") as quote characters. The first row should contain the header with column names. Each input should have its own column. The column containing the reference answer can have any name, but we use "correct_answer" by default. + +:::info +If you choose a different column name for the reference answer, you'll need to configure the evaluator later with that specific name. +::: + +Here's an example of a valid CSV: + +```csv +text,instruction,correct_answer +Hello,How are you?,I'm good. +"Tell me a joke.",Sure, here's one:... +``` + +### JSON Format + +The test set should be in JSON format with the following structure: + +1. A JSON file containing an array of objects. +2. Each object in the array represents a row, with keys as column headers and values as row data. Here's an example of a valid JSON file: + +```json +[ + { "recipe_name": "Chicken Parmesan", "correct_answer": "Chicken" }, + { "recipe_name": "a, special, recipe", "correct_answer": "Beef" } +] +``` + +### Schema for Chat Applications + +For chat applications created using the chat template in Agenta, the input should be saved in the column called `chat`, which would contain the input list of messages: + +```json +[ + { "content": "message.", "role": "user" }, + { "content": "message.", "role": "assistant" } + // Add more messages if necessary +] +``` + +The reference answer column (by default `correct_answer`) should follow the same format: + +```json +{ "content": "message.", "role": "assistant" } +``` + +## Creating a Test Set Using the API + +You can upload a test set using our API. Find the [API endpoint reference here](/reference/api/upload-file). + +Here's an example of such a call: + +**HTTP Request:** + +``` +POST /testsets + +``` + +**Request Body:** + +```json +{ + "name": "testsetname", + "csvdata": [ + { "column1": "row1col1", "column2": "row1col2" }, + { "column1": "row2col1", "column2": "row2col2" } + ] +} +``` + +## Creating/Editing a Test Set from the UI + +To create or edit a test set from the UI: + +1. Go to `Test sets` +2. Choose `Create a test set with UI` or select the test set +3. Name your test set and specify the columns for input types. +4. Add the dataset. + +Remember to click `Save test set` + +<Image img={require("/images/test-sets/add_test_set_ui.png")} /> + +## Creating a Test Set from the Playground + +<Stream controls src="27668e5d4c08c8211d4d808af16090bd" height="400px" /> +<br /> + +The playground offers a convenient way to create and add data to a test set. This workflow is useful when you discover interesting cases or edge cases while experimenting with your LLM application. + +To add a data point to a test set from the playground: + +1. Work with your application in the playground +2. When you find an interesting case, click the `Add to test set` button located near the `Run` button +3. A drawer will display showing the inputs and outputs from the playground +4. You can modify inputs and correct answers if needed +5. Select an existing test set to add to, or choose `+Add new` to create a new one +6. Once you're satisfied, click `Add` to finalize + +## Adding Data From Traces + +One of the most valuable sources of test cases is your production data. Traces captured in the Observability view represent real user interactions with your LLM application. + +<Stream controls src="03031e0bf0b33319923d5dadbf5d5e5a" height="400px" /> +<br /> + +### Adding a Single Trace + +To add a single trace to a test set: + +1. Navigate to the **Observability** view in Agenta +2. Find a trace you want to add to a test set +3. Click the **Add to test set** button at the top of the trace +4. Choose to create a new test set or select an existing one +5. Review the mapping between trace data and test set columns + - Agenta will automatically map the inputs and outputs to appropriate columns + - You can edit the expected answer if you don't agree with the output +6. Click **Save** to add the trace to your test set + +### Adding Multiple Traces at Once + +To efficiently add multiple traces: + +1. In the Observability view, use the search function to filter traces + - For example, search for specific response patterns like "I don't have enough information" +2. Select all relevant traces by checking the boxes next to them +3. Click **Add to test set** +4. Choose an existing test set or create a new one +5. Review the mapping for the traces +6. Click **Save** to add all selected traces to your test set + +## Using Your Test Sets + +Once you have created test sets, you can use them for: + +1. **Playground Iteration**: Load test sets in the playground to test and refine your prompts +2. **Automated Evaluation**: Run systematic evaluations comparing outputs against expected answers +3. **Human Evaluation**: Collect human feedback on your application's performance +4. **Regression Testing**: Ensure new changes don't break existing functionality + +To learn more about using your test sets for evaluation, see our [Evaluation documentation](/evaluation/overview). diff --git a/docs/docs/evaluation/03-concepts.mdx b/docs/docs/evaluation/03-concepts.mdx deleted file mode 100644 index e781a28de1..0000000000 --- a/docs/docs/evaluation/03-concepts.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "Concepts" -description: "Understand the key concepts of LLM evaluation in Agenta" -sidebar_position: 3 ---- - -import Image from "@theme/IdealImage"; - -## What is evaluation? - -The key to building production-ready LLM applications is to have a tight feedback loop of prompt engineering and evaluation. Whether you are optimizing a chatbot, working on Retrieval-Augmented Generation (RAG), or fine-tuning a text generation task, evaluation is a critical step to ensure consistent performance across different inputs, models, and parameters. - -## Key concepts - -### Evaluators - -Evaluators are functions that assess the output of an LLM application. - -Evaluators typically take as input: - -- The output of the LLM application -- (Optional) The reference answer (i.e., expected output or ground truth) -- (Optional) The inputs to the LLM application -- Any other relevant data, such as context - -Evaluators return different types of results based on the evaluator type. Simple evaluators return single values like boolean (true/false) or numeric scores. Evaluators with schemas (such as LLM-as-a-Judge or custom evaluators) can return structured results with multiple fields, allowing you to capture various aspects of the evaluation in a single result. - - -### Test sets - -Test sets are collections of test cases used to evaluate your LLM application. Each test case contains: - -- **Inputs**: The data your LLM application expects (required) -- **Ground Truth**: The expected answer from your application (optional, often stored as "correct_answer") -- **Annotations**: Additional metadata or rules about the test case (optional) - -Test sets are critical for: -- Evaluating your application systematically -- Finding edge cases -- Preventing regressions -- Measuring improvements over time - -### Evaluation workflows - -Agenta supports multiple evaluation workflows: - -1. **Automated Evaluation (UI)**: Run evaluations from the web interface with configurable evaluators -2. **Automated Evaluation (SDK)**: Run evaluations programmatically for integration into CI/CD pipelines -3. **Online Evaluation**: Run evaluations on new traces as they are generated by your LLM application -4. **Human Evaluation**: Collect expert feedback and annotations for qualitative assessment - -## Next steps - -- [Configure evaluators](/evaluation/configure-evaluators/overview) for your use case -- [Create test sets](/evaluation/managing-test-sets/upload-csv) from various sources -- [Run your first evaluation](/evaluation/evaluation-from-ui/running-evaluations) from the UI diff --git a/docs/docs/evaluation/03-configure-evaluators.mdx b/docs/docs/evaluation/03-configure-evaluators.mdx new file mode 100644 index 0000000000..04973265ec --- /dev/null +++ b/docs/docs/evaluation/03-configure-evaluators.mdx @@ -0,0 +1,87 @@ +--- +title: "Configure Evaluators" +description: "Set up evaluators for your use case" +--- + +import Image from "@theme/IdealImage"; + +In this guide will show you how to configure evaluators for your LLM application. + +### What are evaluators? + +Evaluators are functions that assess the output of an LLM application. + +Evaluators typically take as input: + +- The output of the LLM application +- (Optional) The reference answer (i.e., expected output or ground truth) +- (Optional) The inputs to the LLM application +- Any other relevant data, such as context + +Evaluators return either a float or a boolean value. + +<Image + img={require("/images/evaluation/evaluators-inout.png")} + alt="Figure showing the inputs and outputs of an evaluator." + loading="lazy" +/> + +### Configuring evaluators + +To create a new evaluator, click on the `Configure Evaluators` button in the `Evaluations` view. + +![The configure evaluators button in agenta.](/images/evaluation/configure-evaluators-1.png) + +### Selecting evaluators + +Agenta offers a growing list of pre-built evaluators suitable for most use cases. We also provide options for [creating custom evaluators](/evaluation/evaluators/custom-evaluator) (by writing your own Python function) or [using webhooks](/evaluation/evaluators/webhook-evaluator) for evaluation. + +<details id="available-evaluators"> +<summary>Available Evaluators</summary> + +| **Evaluator Name** | **Use Case** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------ | -------------------------------------------------------------------------------- | +| [Exact Match](/evaluation/evaluators/classification-entiry-extraction#exact-match) | Classification/Entity Extraction | Pattern Matching | Checks if the output exactly matches the expected result. | +| [Contains JSON](/evaluation/evaluators/classification-entiry-extraction#contains-json) | Classification/Entity Extraction | Pattern Matching | Ensures the output contains valid JSON. | +| [Regex Test](/evaluation/evaluators/pattern-matching#regular-expression) | Classification/Entity Extraction | Pattern Matching | Checks if the output matches a given regex pattern. | +| [JSON Field Match](/evaluation/evaluators/classification-entiry-extraction#json-field-match) | Classification/Entity Extraction | Pattern Matching | Compares specific fields within JSON data. | +| [JSON Diff Match](/evaluation/evaluators/classification-entiry-extraction#json-diff-match) | Classification/Entity Extraction | Similarity Metrics | Compares generated JSON with a ground truth JSON based on schema or values. | +| [Similarity Match](/evaluation/evaluators/semantic-similarity#similarity-match) | Text Generation / Chatbot | Similarity Metrics | Compares generated output with expected using Jaccard similarity. | +| [Semantic Similarity Match](/evaluation/evaluators/semantic-similarity#semantic-similarity-match) | Text Generation / Chatbot | Semantic Analysis | Compares the meaning of the generated output with the expected result. | +| [Starts With](/evaluation/evaluators/pattern-matching#starts-with) | Text Generation / Chatbot | Pattern Matching | Checks if the output starts with a specified prefix. | +| [Ends With](/evaluation/evaluators/pattern-matching#ends-with) | Text Generation / Chatbot | Pattern Matching | Checks if the output ends with a specified suffix. | +| [Contains](/evaluation/evaluators/pattern-matching#contains) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains a specific substring. | +| [Contains Any](/evaluation/evaluators/pattern-matching#contains-any) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains any of a list of substrings. | +| [Contains All](/evaluation/evaluators/pattern-matching#contains-all) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains all of a list of substrings. | +| [Levenshtein Distance](/evaluation/evaluators/semantic-similarity#levenshtein-distance) | Text Generation / Chatbot | Similarity Metrics | Calculates the Levenshtein distance between output and expected result. | +| [LLM-as-a-judge](/evaluation/evaluators/llm-as-a-judge) | Text Generation / Chatbot | LLM-based | Sends outputs to an LLM model for critique and evaluation. | +| [RAG Faithfulness](/evaluation/evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Evaluates if the output is faithful to the retrieved documents in RAG workflows. | +| [RAG Context Relevancy](/evaluation/evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Measures the relevancy of retrieved documents to the given question in RAG. | +| [Custom Code Evaluation](/evaluation/evaluators/custom-evaluator) | Custom Logic | Custom | Allows users to define their own evaluator in Python. | +| [Webhook Evaluator](/evaluation/evaluators/webhook-evaluator) | Custom Logic | Custom | Sends output to a webhook for external evaluation. | + +</details> + +![Screen for selecting an evaluator.](/images/evaluation/configure-evaluators-2.png) + +## Evaluators' settings + +Each evaluator comes with it's unique settings. For instance in the screen below, the JSON field match evaluator requires you to specify which field in the output JSON you need to consider for evaluation. You'll find detailed information about these parameters on each evaluator's documentation page. + +![Screen for configuring an evaluator.](/images/evaluation/configure-evaluators-3.png) + +## Mappings evaluator's inputs to the LLM data + +Evaluators need to know which parts of the data contain the output and the reference answer. Most evaluators allow you to configure this mapping, typically by specifying the name of the column in the test set that contains the `reference answer`. + +For more sophisticated evaluators, such as `RAG evaluators` (_available only in cloud and enterprise versions_), you need to define more complex mappings (see figure below). + +<Image + img={require("/images/evaluation/evaluator-mapping.png")} + alt="Figure showing how RAGAS faithfulness evaluator is configured in agenta." + loading="lazy" +/> + +Configuring the evaluator is done by mapping the evaluator inputs to the generation data: + +![Figure showing how RAGAS faithfulness evaluator is configured in agenta.](/images/evaluation/configure_mapping.png) diff --git a/docs/docs/evaluation/04-no-code-evaluation.mdx b/docs/docs/evaluation/04-no-code-evaluation.mdx new file mode 100644 index 0000000000..0323af74bf --- /dev/null +++ b/docs/docs/evaluation/04-no-code-evaluation.mdx @@ -0,0 +1,68 @@ +--- +title: "No-code Evaluation" +description: Run evaluation from the UI. +--- + +import Image from "@theme/IdealImage"; + +This guide will show you how to run evaluations from the UI. + +Before you get started, make sure that you have [created a test set](/evaluation/create-test-sets) and [configured evaluators](/evaluation/configure-evaluators) appropriate for your task. + +## Running Evaluations + +To start an evaluation, navigate to the Evaluations page and click the `Start new evaluation` button. A modal will appear, allowing you to setup the evaluation. + +<Image + img={require("/images/evaluation/start-new-evaluation.png")} + alt="Start new evaluation" +/> + +### Setting Up Evaluation Parameters + +In the modal, specify the following: + +- <b>Testset:</b> Choose the testset(s) for your evaluation. +- <b>Variants:</b> Choose one or more variants to evaluate. +- <b>Evaluators:</b> Pick one or more evaluators for assessment. + +<Image + img={require("/images/evaluation/new-evaluation-modal.png")} + alt="New evaluation modal" + style={{ width: "70%", display: "block", margin: "auto" }} +/> + +#### Advanced Configuration + +Additional settings allow you to adjust batching and retry parameters for LLM calls. This help mitigating rate limit errors from your LLM provider. + +Advanced configuration options include: + +- **Batch Size:** Number of test cases to run concurrently in each batch (default: 10). +- **Retry Delay:** Time to wait before retrying a failed call (default: 3s). +- **Max Retries:** Maximum number of retry attempts for a failed call (default: 3). +- **Delay Between Batches:** Pause duration between batch runs (default: 5s). + +## Analyzing Evaluation Results + +The main view offers an aggregated summary of results. Each column displays the average score per evaluator for each variant/test set combination. You'll also see average latency, total cost, creation date, and evaluation status. + +For a detailed view of an evaluation, click on a completed evaluation row. + +<Image + img={require("/images/evaluation/detailed-evaluation-results.png")} + alt="Detailed evaluation results" + style={{ width: "100%" }} +/> + +The evaluation table columns show inputs, reference answers used by evaluators, LLM application output, evaluator results, cost, and latency. + +## Comparing Evaluations + +Once evaluations are marked "completed," you can compare two or more evaluations <b>from the same test set</b>. Click the `Compare` button to access the Evaluation comparison view, where you can analyze outputs from multiple evaluations side by side. + +<Image + img={require("/images/evaluation/comparing-evaluations.gif")} + style={{ width: "100%" }} + alt="Animation showing how to compare evaluations in Agenta" +/> diff --git a/docs/docs/evaluation/05-sdk-evaluation.mdx b/docs/docs/evaluation/05-sdk-evaluation.mdx new file mode 100644 index 0000000000..5f50de5483 --- /dev/null +++ b/docs/docs/evaluation/05-sdk-evaluation.mdx @@ -0,0 +1,144 @@ +--- +title: "Evaluate from SDK" +description: "Run evaluation programmatically from the SDK." +--- + +import Image from "@theme/IdealImage"; + +This guide explains how to run evaluations programmaticaly from the SDK in agenta. We will do the following: + +- Create a test set +- Create and configure an evaluator +- Run an evaluation +- Retrieve the results of evaluations + +## How agenta evaluation works + +In **agenta**, evaluation is a **fully managed service** . It takes place entirely on our backend, and take care of: + +- **Queuing** and managing evaluation jobs +- **Batching** LLM app calls to optimize performance and avoid exceeding rate limits. +- **Handle retries and errors** automatically to ensure robust evaluation runs. + +Our evaluation service takes a set of test sets, evaluators, and app variants and runs asynchronous jobs for evaluation. + +<Image + img={require("/images/evaluation/evaluate-sdk.png")} + alt="Figure showing how LLM app evaluation infrastructure in Agenta." + loading="lazy" +/> + +:::info +You can open this guide in a [jupyter notebook](https://github.com/Agenta-AI/agenta/blob/main/cookbook/evaluations_with_sdk.ipynb) +::: + +## 1. Setup + +1. Create an LLM app and a couple of variants in agenta and install our sdk using `pip install -U agenta`. + +2. Retrieve the application id either from the url. + +## 2. Setup the SDK client + +```python + +app_id = "667d8cfad1812781f7e375d9" + +# You can create the API key under the settings page. If you are using the OSS version, you should keep this as an empty string +api_key = "EUqJGOUu.xxxx" + +# Host. +host = "https://cloud.agenta.ai" + +# Initialize the client + +client = AgentaApi(base_url=host + "/api", api_key=api_key) +``` + +## 3. Create a test set + +```python +from agenta.client.types.new_testset import NewTestset + +csvdata = [ + {"country": "france", "capital": "Paris"}, + {"country": "Germany", "capital": "Berlin"} + ] + +response = client.testsets.create_testset(request=NewTestset(name="test set", csvdata=csvdata)) +test_set_id = response.id + +``` + +## 4. Create evaluators + +Let's create a custom code evaluator that return 1.0 if the first letter of the app output is uppercase + +```python +code_snippet = """ +from typing import Dict + +def evaluate( + app_params: Dict[str, str], + inputs: Dict[str, str], + output: str, # output of the llm app + datapoint: Dict[str, str] # contains the testset row +) -> float: + if output and output[0].isupper(): + return 1.0 + else: + return 0.0 +""" + +response = client.evaluators.create_new_evaluator_config(app_id=app_id, name="capital_letter_evaluator", evaluator_key="auto_custom_code_run", settings_values={"code": code_snippet}) +letter_match_eval_id = response.id +``` + +## 5. Run an evaluation + +First let's grab the first variants in the app + +```python +response = client.apps.list_app_variants(app_id=app_id) +print(response) +myvariant_id = response[0].variant_id +``` + +Then , let's start the evaluation jobs + +```python +from agenta.client.types.llm_run_rate_limit import LlmRunRateLimit + +rate_limit_config = LlmRunRateLimit( + batch_size=10, # number of rows to call in parallel + max_retries=3, # max number of time to retry a failed llm call + retry_delay=2, # delay before retrying a failed llm call + delay_between_batches=5, # delay between batches + ) +response = client.evaluations.create_evaluation(app_id=app_id, + variant_ids=[myvariant_id], + testset_id=test_set_id, + evaluators_configs=[letter_match_eval_id], + rate_limit=rate_limit_config) +print(response) +``` + +Now we can check for the status of the job + +```python +client.evaluations.fetch_evaluation_status('667d98fbd1812781f7e3761a') +``` + +As soon as it is done, we can fetch the overall results + +```python +response = client.evaluations.fetch_evaluation_results('667d98fbd1812781f7e3761a') + +results = [(evaluator["evaluator_config"]["name"], evaluator["result"]) for evaluator in response["results"]] +``` + +and the detailed results + +```python +client.evaluations.fetch_evaluation_scenarios(evaluations_ids='667d98fbd1812781f7e3761a') +``` diff --git a/docs/docs/evaluation/06-human_evaluation.mdx b/docs/docs/evaluation/06-human_evaluation.mdx new file mode 100644 index 0000000000..c7a534658d --- /dev/null +++ b/docs/docs/evaluation/06-human_evaluation.mdx @@ -0,0 +1,60 @@ +--- +title: 'Human Evaluation' +--- + +import Image from "@theme/IdealImage"; + +Sometimes, you may need to evaluate the performance of your models using human judgment. This is where the Human Evaluation feature comes in. It allows you to conduct A/B tests and single model tests to evaluate the performance of your models using human judgment. + +## Single Model Evaluation +Single model test allows you to score the performance of a single LLM app manually. + +To start a new evaluation with the single model test, you need to: +- Select a variant would you like to evaluate +- Select a testset you want to use for the evaluation + +To start a new evaluation with the single model test, follow these steps: + +1. Select the variant you would like to evaluate. +2. Choose the testset you want to use for the evaluation. + +Click on the "Start a new evaluation" button to begin the evaluation process. Once the evaluation is initiated, you will be directed to the Single Model Test Evaluation view. Here, you can perform the following actions: + +- <b>Score: </b> Enter a numerical score to evaluate the performance of the chosen variant. +- <b>Additional Notes: </b> Add any relevant notes or comments to provide context or details about the evaluation. +- <b>Export Results: </b> Use the "Export Results" functionality to save and export the evaluation results. + +<Image img={require("/images/basic_guides/22_single_model_test_view_card_view_light.png")} className="dark:hidden" /> +<Image img={require("/images/basic_guides/22_single_model_test_view_card_view_dark.png")} className="hidden dark:block" /> + +## A/B Test +A/B tests allow you to compare the performance of two different variants manually. For each data point you can select which variant is better, or if they are equally good or bad. + +To start a new evaluation with an A/B Test, follow these steps: + +1. Select two variants that you would like to evaluate. +2. Choose the testset you want to use for the evaluation. + +### Invite Collaborators + +In an A/B Test, you can invite members of your workspace to collaborate on the evaluation by sharing a link to the evaluation. For information on how to add members to your workspace, please refer to this guide. + +Click on the "Start a new evaluation" button to begin the evaluation process. Once the evaluation is initiated, you will be directed to the A/B Test Evaluation view. Here, you can perform the following actions: + +- <b>Scoring between variants: </b> Evaluate and score the performance of each variant for the expected output. +- <b>Additional Notes: </b> Add any relevant notes or comments to provide context or details about the evaluation. +- <b>Export Results: </b> Use the "Export Results" functionality to save and export the evaluation results. + +<Image img={require("/images/basic_guides/21_ab_test_view_card_view_light.png")} className="dark:hidden" /> +<Image img={require("/images/basic_guides/21_ab_test_view_card_view_dark.png")} className="hidden dark:block" /> + +## Toggle Evaluation View (Card/Table mode) +You can also switch to the table view for a different perspective in your evaluation. + +### A/B Test View +<Image img={require("/images/basic_guides/21_ab_test_view_table_view_light.png")} className="dark:hidden" /> +<Image img={require("/images/basic_guides/21_ab_test_view_table_view_dark.png")} className="hidden dark:block" /> + +### Single Model Test View +<Image img={require("/images/basic_guides/22_single_model_test_view_table_view_light.png")} className="dark:hidden" /> +<Image img={require("/images/basic_guides/22_single_model_test_view_table_view_dark.png")} className="hidden dark:block" /> diff --git a/docs/docs/evaluation/07-annotate-api.mdx b/docs/docs/evaluation/07-annotate-api.mdx new file mode 100644 index 0000000000..289c6340e1 --- /dev/null +++ b/docs/docs/evaluation/07-annotate-api.mdx @@ -0,0 +1,520 @@ +--- +title: Annotate Traces from API +sidebar_label: "Annotate Traces from API" +description: "Learn how to add annotations to traces using the Agenta API" +--- + +```mdx-code-block +import Image from "@theme/IdealImage"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +``` + +:::info +Annotations are currently in preview. The interface is subject to change. +::: + +Annotations in Agenta let you enrich the traces created by your LLM applications. You can add scores, comments, expected answers and other metrics to help evaluate your application's performance. + +<Image + style={{ display: "block", margin: "10px auto", marginBottom: "20px" }} + img={require("/images/evaluation/viewing-annotations.png")} + alt="Screenshot showing how annotations appear in the Agenta UI" + loading="lazy" +/> + +## What You Can Do With Annotations + +- Collect user feedback on LLM responses +- Run custom evaluation workflows +- Measure application performance in real-time + +## Understanding How Annotations Work + +Annotations **link** to specific points (spans) in your application traces. You can **link** them to: +- Parent spans (like an agent invocation) +- Child spans (like a single LLM call within a larger process) + +Each annotation can include: +- Numbers (scores, ratings) +- Categories (labels, classifications) +- Text (comments, reasoning) + +### Annotation Structure + +Here's what an annotation looks like: + +```json +{ + "data": { + "outputs": { + "score": 80, + "normalized_score": 0.8, + "reasoning": "The answer is mainly correct" + } + }, + "references": { + "evaluator": { + "slug": "my_evaluator" + } + }, + "links": { + "invocation": { + "trace_id": "47cb4a13b42a47bab2198509543ff14d", + "span_id": "1a9130f6ad398e55" + } + }, + "metadata": { + "someattr": "somevalue" + } +} +``` + +An annotation has four main parts: + +1. **Data**: The actual evaluation content (scores, comments) +2. **References**: Which evaluator to use (will be created automatically if it doesn't exist) +3. **Links**: Which trace and span you're annotating +4. **Metadata** (optional): Any extra information you want to include + +### What You Can Include in Annotations + +Annotations are flexible - you can include whatever makes sense for your evaluation: + +```json +// Just a simple score +{"score": 3} + +// A score with explanation +{"score": 3, "comment": "The response is not grounded"} + +// Multiple metrics with reference information +{"score": 3, "normalized_score": 0.5, "comment": "The response is not grounded", "expected_answer": "The capital of France is Paris"} +``` + +You can use numbers, text, booleans, or categorical values. + +### Connecting Annotations to Traces + +Each annotation links to a specific span in your trace using a `trace_id` and `span_id`. These IDs follow the OpenTelemetry format. + +:::warning +Agenta doesn't check if the trace and span IDs exist. Make sure they're valid before sending. +::: + +### Working with Evaluators + +Every annotation must reference an `Evaluator`, which: +- Defines what your annotation should contain +- Provides context for interpreting the annotation + +If you reference an evaluator that doesn't exist yet, Agenta will automatically create one based on your first annotation. + +You can add multiple annotations from the same evaluator to a single span, which is useful for collecting feedback from different sources. + +### Using Metadata + +The `metadata` field lets you add extra information to your annotation. Use it to store things like user IDs, session information, or other context. + +## Creating Annotations + +<Tabs> +<TabItem value="python" label="Python"> + +```python +import requests + +base_url = "https://cloud.agenta.ai" +headers = { + "Content-Type": "application/json", + "Authorization": "ApiKey YOUR_API_KEY" +} + +# Annotation data +annotation_data = { + "annotation": { + "data": { + "outputs": { + "score": 40, + "reasoning": "Response contains some inaccuracies", + "labels": ["Partially Correct", "Needs Improvement"] + } + }, + "references": { + "evaluator": { + "slug": "content_quality" + } + }, + "links": { + "invocation": { + "trace_id": "47cb4a13b42a47bab2198509543ff14d", + "span_id": "1a9130f6ad398e55" + } + } + } +} + +# Make the API request +response = requests.post( + f"{base_url}/api/preview/annotations", + headers=headers, + json=annotation_data +) + +# Process the response +if response.status_code == 200: + print("Annotation created successfully") + print(response.json()) +else: + print(f"Error: {response.status_code}") + print(response.text) +``` + +</TabItem> +<TabItem value="javascript" label="JavaScript"> + +```javascript +async function createAnnotation() { + const baseUrl = 'https://cloud.agenta.ai'; + + const headers = { + 'Content-Type': 'application/json', + 'Authorization': 'ApiKey YOUR_API_KEY' + }; + + const annotationData = { + annotation: { + data: { + outputs: { + score: 40, + reasoning: "Response contains some inaccuracies", + labels: ["Partially Correct", "Needs Improvement"] + } + }, + references: { + evaluator: { + slug: "content_quality" + } + }, + links: { + invocation: { + trace_id: "47cb4a13b42a47bab2198509543ff14d", + span_id: "1a9130f6ad398e55" + } + } + } + }; + + try { + const response = await fetch(`${baseUrl}/api/preview/annotations`, { + method: 'POST', + headers: headers, + body: JSON.stringify(annotationData) + }); + + if (response.ok) { + const data = await response.json(); + console.log("Annotation created successfully"); + console.log(data); + } else { + console.error(`Error: ${response.status}`); + console.error(await response.text()); + } + } catch (error) { + console.error("Request failed:", error); + } +} + +createAnnotation(); +``` + +</TabItem> +</Tabs> + +:::info +If the evaluator doesn't exist yet, Agenta will create it automatically based on your first annotation. +::: + +## Understanding the Response + +When you create an annotation, you'll receive a response that includes the annotation data and its ID: + +```json +{ + "annotation": { + "created_at": "2025-05-13T16:54:52.245664Z", + "created_by_id": "019315dc-a332-7ba5-a426-d079c43ab776", + "span_id": "a1713ea8f59291f6", + "trace_id": "bb39070937f74f169b60dfc420729ad3", + "kind": "custom", + "source": "api", + "data": { + "outputs": { + "score": 0, + "reasoning": "The answer is totally false.", + "expected_answer": "The capital of France is Paris", + "normalized_score": 0 + } + }, + "metadata": { + "user_id": "miamia" + }, + "references": { + "evaluator": { + "id": "0196ca64-9cbf-7ee3-b507-2b559dd13090", + "slug": "main-scorer" + } + }, + "links": { + "invocation": { + "span_id": "09383e1124b264d0", + "trace_id": "5d52a529b48135fd58790f8aa3e33fb8" + } + } + } +} +``` + +:::info +Annotations themselves are stored as traces with their own `trace_id` and `span_id`, which is different from the invocation they're linked to. +::: + +## Viewing Annotations in the UI + +You can see all annotations for a trace in the Agenta UI. Open any trace and check the Annotations tab to see detailed information. The right sidebar shows average metrics for each evaluator. + +<Image + style={{ display: "block", margin: "10px auto", marginBottom: "20px" }} + img={require("/images/evaluation/viewing-annotations.png")} + alt="Screenshot showing how annotations appear in the Agenta UI" + loading="lazy" +/> + +## Querying Annotations + +<Tabs> +<TabItem value="python" label="Python"> + +You can query annotations in several ways: + +**1. Query by annotation ID:** + +```python +import requests + +base_url = "https://cloud.agenta.ai" +headers = { + "Content-Type": "application/json", + "Authorization": "ApiKey YOUR_API_KEY" +} + +# Query by annotation ID +query_data = { + "annotation": { + "trace_id": "bb39070937f74f169b60dfc420729ad3", + "span_id": "a1713ea8f59291f6" + } +} + +response = requests.post( + f"{base_url}/api/preview/annotations/query", + headers=headers, + json=query_data +) + +if response.status_code == 200: + print("Query successful") + print(response.json()) +else: + print(f"Error: {response.status_code}") + print(response.text) +``` + +**2. Query all annotations for an invocation:** + +```python +# Query all annotations for an invocation +query_data = { + "annotation": { + "links": { + "invocation": { + "trace_id": "5d52a529b48135fd58790f8aa3e33fb8", + "span_id": "09383e1124b264d0" + } + } + } +} + +response = requests.post( + f"{base_url}/api/preview/annotations/query", + headers=headers, + json=query_data +) +``` + +</TabItem> +<TabItem value="javascript" label="JavaScript"> + +You can query annotations in several ways: + +**1. Query by annotation ID:** + +```javascript +async function queryAnnotation() { + const baseUrl = 'https://cloud.agenta.ai'; + + const headers = { + 'Content-Type': 'application/json', + 'Authorization': 'ApiKey YOUR_API_KEY' + }; + + // Query by annotation ID + const queryData = { + annotation: { + trace_id: "bb39070937f74f169b60dfc420729ad3", + span_id: "a1713ea8f59291f6" + } + }; + + try { + const response = await fetch(`${baseUrl}/api/preview/annotations/query`, { + method: 'POST', + headers: headers, + body: JSON.stringify(queryData) + }); + + if (response.ok) { + const data = await response.json(); + console.log("Query successful"); + console.log(data); + } else { + console.error(`Error: ${response.status}`); + console.error(await response.text()); + } + } catch (error) { + console.error("Request failed:", error); + } +} + +queryAnnotation(); +``` + +**2. Query all annotations for an invocation:** + +```javascript +async function queryAnnotationsForInvocation() { + const baseUrl = 'https://cloud.agenta.ai'; + + const headers = { + 'Content-Type': 'application/json', + 'Authorization': 'ApiKey YOUR_API_KEY' + }; + + // Query all annotations for an invocation + const queryData = { + annotation: { + links: { + invocation: { + trace_id: "5d52a529b48135fd58790f8aa3e33fb8", + span_id: "09383e1124b264d0" + } + } + } + }; + + try { + const response = await fetch(`${baseUrl}/api/preview/annotations/query`, { + method: 'POST', + headers: headers, + body: JSON.stringify(queryData) + }); + + if (response.ok) { + const data = await response.json(); + console.log("Query successful"); + console.log(data); + } else { + console.error(`Error: ${response.status}`); + console.error(await response.text()); + } + } catch (error) { + console.error("Request failed:", error); + } +} + +queryAnnotationsForInvocation(); +``` + +</TabItem> +</Tabs> + +## Removing Annotations + +<Tabs> +<TabItem value="python" label="Python"> + +```python +import requests + +base_url = "https://cloud.agenta.ai" +headers = { + "Content-Type": "application/json", + "Authorization": "ApiKey YOUR_API_KEY" +} + +# Define the trace_id and span_id of the annotation to delete +trace_id = "bb39070937f74f169b60dfc420729ad3" +span_id = "a1713ea8f59291f6" + +# Make the delete request +response = requests.delete( + f"{base_url}/api/preview/annotations/{trace_id}/{span_id}", + headers=headers +) + +# Process the response +if response.status_code == 200: + print("Annotation deleted successfully") +else: + print(f"Error: {response.status_code}") + print(response.text) +``` + +</TabItem> +<TabItem value="javascript" label="JavaScript"> + +```javascript +async function deleteAnnotation() { + const baseUrl = 'https://cloud.agenta.ai'; + + const headers = { + 'Content-Type': 'application/json', + 'Authorization': 'ApiKey YOUR_API_KEY' + }; + + // Define the trace_id and span_id of the annotation to delete + const traceId = "bb39070937f74f169b60dfc420729ad3"; + const spanId = "a1713ea8f59291f6"; + + try { + const response = await fetch(`${baseUrl}/api/preview/annotations/${traceId}/${spanId}`, { + method: 'DELETE', + headers: headers + }); + + if (response.ok) { + console.log("Annotation deleted successfully"); + } else { + console.error(`Error: ${response.status}`); + console.error(await response.text()); + } + } catch (error) { + console.error("Request failed:", error); + } +} + +deleteAnnotation(); +``` + +</TabItem> +</Tabs> diff --git a/docs/docs/evaluation/_02-quick-start-sdk.mdx b/docs/docs/evaluation/_02-quick-start-sdk.mdx deleted file mode 100644 index 854b62b6bc..0000000000 --- a/docs/docs/evaluation/_02-quick-start-sdk.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Quick Start: Evaluation from SDK" -sidebar_label: "Quick Start (SDK)" -description: "Get started with evaluating your LLM applications programmatically using the Agenta SDK" -sidebar_position: 2 ---- - -import { Redirect } from '@docusaurus/router'; - -<Redirect to="/evaluation/evaluation-from-sdk/quick-start" /> diff --git a/docs/docs/evaluation/_evaluation-from-sdk/01-quick-start.mdx b/docs/docs/evaluation/_evaluation-from-sdk/01-quick-start.mdx deleted file mode 100644 index c7d594aeff..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/01-quick-start.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "Quick Start" -sidebar_label: "Quick Start" -description: "Quick start guide for running evaluations programmatically with the Agenta SDK" -sidebar_position: 1 ---- - -This quick start guide will help you run your first evaluation using the Agenta Python SDK. - -## Prerequisites - -- Python 3.8 or higher -- Agenta account with API key -- An LLM application deployed in Agenta - -## Installation - -```bash -pip install -U agenta -``` - -## What you'll learn - -- How to initialize the SDK -- How to create test sets programmatically -- How to configure and run evaluations -- How to retrieve evaluation results - -## Quick example - -```python -import agenta as ag -from agenta.client.api import AgentaApi - -# Initialize the SDK -client = AgentaApi( - base_url="https://cloud.agenta.ai/api", - api_key="your-api-key" -) - -# Create a test set -test_set = client.testsets.create_testset( - request={ - "name": "my_test_set", - "csvdata": [ - {"input": "Hello", "expected": "Hi there!"}, - {"input": "How are you?", "expected": "I'm doing well!"} - ] - } -) - -# Run evaluation -evaluation = client.evaluations.create_evaluation( - app_id="your-app-id", - variant_ids=["variant-id"], - testset_id=test_set.id, - evaluators_configs=["evaluator-config-id"] -) - -# Check status -status = client.evaluations.fetch_evaluation_status(evaluation.id) -print(f"Evaluation status: {status}") - -# Get results when complete -results = client.evaluations.fetch_evaluation_results(evaluation.id) -print(results) -``` - -## Next steps - -- Learn about [setup and configuration](/evaluation/evaluation-from-sdk/setup-configuration) -- Explore [managing test sets with the SDK](/evaluation/evaluation-from-sdk/managing-test-sets) -- Understand [configuring evaluators](/evaluation/evaluation-from-sdk/configuring-evaluators) -- See how to [run evaluations](/evaluation/evaluation-from-sdk/running-evaluations) in detail diff --git a/docs/docs/evaluation/_evaluation-from-sdk/02-setup-configuration.mdx b/docs/docs/evaluation/_evaluation-from-sdk/02-setup-configuration.mdx deleted file mode 100644 index 28b858b81a..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/02-setup-configuration.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Setup and Configuration" -sidebar_label: "Setup & Configuration" -description: "Learn how to set up and configure the Agenta SDK for evaluation" -sidebar_position: 2 ---- - -<!-- TODO: Replace with new SDK evaluation content --> - -## Setup - -First, install the Agenta SDK: - -```bash -pip install -U agenta -``` - -## Initialize the SDK client - -```python -from agenta.client.api import AgentaApi - -app_id = "667d8cfad1812781f7e375d9" - -# You can create the API key under the settings page. -# If you are using the OSS version, you should keep this as an empty string -api_key = "EUqJGOUu.xxxx" - -# Host -host = "https://cloud.agenta.ai" - -# Initialize the client -client = AgentaApi(base_url=host + "/api", api_key=api_key) -``` - -## Configuration options - -<!-- TODO: Add new SDK configuration options --> - -## Environment variables - -You can also configure the SDK using environment variables: - -```bash -export AGENTA_API_KEY="your-api-key" -export AGENTA_HOST="https://cloud.agenta.ai" -``` - -```python -import agenta as ag - -# Initialize will read from environment variables -ag.init() -``` - -## Next steps - -- Learn about [managing test sets](/evaluation/evaluation-from-sdk/managing-test-sets) -- Explore [configuring evaluators](/evaluation/evaluation-from-sdk/configuring-evaluators) -- Start [running evaluations](/evaluation/evaluation-from-sdk/running-evaluations) diff --git a/docs/docs/evaluation/_evaluation-from-sdk/03-managing-test-sets.mdx b/docs/docs/evaluation/_evaluation-from-sdk/03-managing-test-sets.mdx deleted file mode 100644 index d866710948..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/03-managing-test-sets.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "Managing Test Sets" -sidebar_label: "Managing Test Sets" -description: "Learn how to create, load, and manage test sets using the SDK" -sidebar_position: 3 ---- - -<!-- TODO: Replace with new SDK evaluation content --> - -## Creating test sets - -```python -from agenta.client.types.new_testset import NewTestset - -csvdata = [ - {"country": "france", "capital": "Paris"}, - {"country": "Germany", "capital": "Berlin"} -] - -response = client.testsets.create_testset( - request=NewTestset(name="test set", csvdata=csvdata) -) -test_set_id = response.id -``` - -## Loading existing test sets - -<!-- TODO: Add content for loading test sets --> - -## Updating test sets - -<!-- TODO: Add content for updating test sets --> - -## Deleting test sets - -<!-- TODO: Add content for deleting test sets --> - -## Next steps - -- Learn about [configuring evaluators](/evaluation/evaluation-from-sdk/configuring-evaluators) -- Start [running evaluations](/evaluation/evaluation-from-sdk/running-evaluations) -- Explore [viewing results](/evaluation/evaluation-from-sdk/viewing-results) diff --git a/docs/docs/evaluation/_evaluation-from-sdk/04-configuring-evaluators.mdx b/docs/docs/evaluation/_evaluation-from-sdk/04-configuring-evaluators.mdx deleted file mode 100644 index 0de67a068f..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/04-configuring-evaluators.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "Configuring Evaluators" -sidebar_label: "Configuring Evaluators" -description: "Learn how to configure built-in and custom evaluators using the SDK" -sidebar_position: 4 ---- - -<!-- TODO: Replace with new SDK evaluation content --> - -## Creating evaluators - -### Custom code evaluator - -Let's create a custom code evaluator that returns 1.0 if the first letter of the app output is uppercase: - -```python -code_snippet = """ -from typing import Dict - -def evaluate( - app_params: Dict[str, str], - inputs: Dict[str, str], - output: str, # output of the llm app - datapoint: Dict[str, str] # contains the testset row -) -> float: - if output and output[0].isupper(): - return 1.0 - else: - return 0.0 -""" - -response = client.evaluators.create_new_evaluator_config( - app_id=app_id, - name="capital_letter_evaluator", - evaluator_key="auto_custom_code_run", - settings_values={"code": code_snippet} -) -letter_match_eval_id = response.id -``` - -## Using built-in evaluators - -<!-- TODO: Add content for using built-in evaluators --> - -## Configuring evaluator settings - -<!-- TODO: Add content for configuring evaluator settings --> - -## Next steps - -- Learn about [running evaluations](/evaluation/evaluation-from-sdk/running-evaluations) -- Explore [viewing results](/evaluation/evaluation-from-sdk/viewing-results) -- See all [evaluator types](/evaluation/configure-evaluators/overview) diff --git a/docs/docs/evaluation/_evaluation-from-sdk/05-running-evaluations.mdx b/docs/docs/evaluation/_evaluation-from-sdk/05-running-evaluations.mdx deleted file mode 100644 index aa9a523a02..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/05-running-evaluations.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Running Evaluations" -sidebar_label: "Running Evaluations" -description: "Learn how to run evaluations programmatically using the SDK" -sidebar_position: 5 ---- - -<!-- TODO: Replace with new SDK evaluation content --> - -## Running an evaluation - -First, let's grab the first variant in the app: - -```python -response = client.apps.list_app_variants(app_id=app_id) -print(response) -myvariant_id = response[0].variant_id -``` - -Then, let's start the evaluation jobs: - -```python -from agenta.client.types.llm_run_rate_limit import LlmRunRateLimit - -rate_limit_config = LlmRunRateLimit( - batch_size=10, # number of rows to call in parallel - max_retries=3, # max number of time to retry a failed llm call - retry_delay=2, # delay before retrying a failed llm call - delay_between_batches=5, # delay between batches -) - -response = client.evaluations.create_evaluation( - app_id=app_id, - variant_ids=[myvariant_id], - testset_id=test_set_id, - evaluators_configs=[letter_match_eval_id], - rate_limit=rate_limit_config -) -print(response) -``` - -## Checking evaluation status - -Now we can check for the status of the job: - -```python -client.evaluations.fetch_evaluation_status('667d98fbd1812781f7e3761a') -``` - -## Configuring rate limits - -<!-- TODO: Add more details about rate limit configuration --> - -## Handling errors - -<!-- TODO: Add content for error handling --> - -## Next steps - -- Learn about [viewing results](/evaluation/evaluation-from-sdk/viewing-results) -- Explore [advanced evaluation patterns](/evaluation/evaluation-from-sdk/setup-configuration) diff --git a/docs/docs/evaluation/_evaluation-from-sdk/06-viewing-results.mdx b/docs/docs/evaluation/_evaluation-from-sdk/06-viewing-results.mdx deleted file mode 100644 index 7e8609e71f..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/06-viewing-results.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Viewing Results" -sidebar_label: "Viewing Results" -description: "Learn how to retrieve and analyze evaluation results using the SDK" -sidebar_position: 6 ---- - -<!-- TODO: Replace with new SDK evaluation content --> - -## Fetching overall results - -As soon as the evaluation is done, we can fetch the overall results: - -```python -response = client.evaluations.fetch_evaluation_results('667d98fbd1812781f7e3761a') - -results = [ - (evaluator["evaluator_config"]["name"], evaluator["result"]) - for evaluator in response["results"] -] -print(results) -``` - -## Fetching detailed results - -Get detailed results for each test case: - -```python -detailed_results = client.evaluations.fetch_evaluation_scenarios( - evaluations_ids='667d98fbd1812781f7e3761a' -) -print(detailed_results) -``` - -## Analyzing results - -<!-- TODO: Add content for analyzing results --> - -## Exporting results - -<!-- TODO: Add content for exporting results --> - -## Next steps - -- Learn about [human evaluation](/evaluation/human-evaluation/quick-start) -- Explore [comparing evaluations in the UI](/evaluation/evaluation-from-ui/comparing-runs) -- See all [evaluator types](/evaluation/configure-evaluators/overview) diff --git a/docs/docs/evaluation/_evaluation-from-sdk/_category_.json b/docs/docs/evaluation/_evaluation-from-sdk/_category_.json deleted file mode 100644 index f2be6bfd52..0000000000 --- a/docs/docs/evaluation/_evaluation-from-sdk/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Evaluation from SDK", - "position": 7, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/evaluation/configure-evaluators/01-overview.mdx b/docs/docs/evaluation/configure-evaluators/01-overview.mdx deleted file mode 100644 index 7cb1292849..0000000000 --- a/docs/docs/evaluation/configure-evaluators/01-overview.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "Configure Evaluators" -sidebar_label: "Overview" -description: "Set up evaluators for your use case" -sidebar_position: 1 ---- - -import Image from "@theme/IdealImage"; - -This guide shows you how to configure evaluators for your LLM application. - -## Configuring evaluators - -To create a new evaluator, click the `Create New` button in the `Evaluators` page. - -## Selecting evaluators - -Agenta offers a growing list of pre-built evaluators suitable for most use cases. You can also [create custom evaluators](/evaluation/configure-evaluators/custom-evaluator) by writing your own Python function or [use webhooks](/evaluation/configure-evaluators/webhook-evaluator) for evaluation. - -<details id="available-evaluators"> -<summary>Available Evaluators</summary> - -| **Evaluator Name** | **Use Case** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------ | -------------------------------------------------------------------------------- | -| [Exact Match](/evaluation/configure-evaluators/classification-entity-extraction#exact-match) | Classification/Entity Extraction | Pattern Matching | Checks if the output exactly matches the expected result. | -| [Contains JSON](/evaluation/configure-evaluators/classification-entity-extraction#contains-json) | Classification/Entity Extraction | Pattern Matching | Ensures the output contains valid JSON. | -| [Regex Test](/evaluation/configure-evaluators/regex-evaluator) | Classification/Entity Extraction | Pattern Matching | Checks if the output matches a given regex pattern. | -| [JSON Field Match](/evaluation/configure-evaluators/classification-entity-extraction#json-field-match) | Classification/Entity Extraction | Pattern Matching | Compares specific fields within JSON data. | -| [JSON Diff Match](/evaluation/configure-evaluators/classification-entity-extraction#json-diff-match) | Classification/Entity Extraction | Similarity Metrics | Compares generated JSON with a ground truth JSON based on schema or values. | -| [Similarity Match](/evaluation/configure-evaluators/semantic-similarity#similarity-match) | Text Generation / Chatbot | Similarity Metrics | Compares generated output with expected using Jaccard similarity. | -| [Semantic Similarity Match](/evaluation/configure-evaluators/semantic-similarity#semantic-similarity-match) | Text Generation / Chatbot | Semantic Analysis | Compares the meaning of the generated output with the expected result. | -| [Starts With](/evaluation/configure-evaluators/regex-evaluator) | Text Generation / Chatbot | Pattern Matching | Checks if the output starts with a specified prefix. | -| [Ends With](/evaluation/configure-evaluators/regex-evaluator) | Text Generation / Chatbot | Pattern Matching | Checks if the output ends with a specified suffix. | -| [Contains](/evaluation/configure-evaluators/regex-evaluator) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains a specific substring. | -| [Contains Any](/evaluation/configure-evaluators/regex-evaluator) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains any of a list of substrings. | -| [Contains All](/evaluation/configure-evaluators/regex-evaluator) | Text Generation / Chatbot | Pattern Matching | Checks if the output contains all of a list of substrings. | -| [Levenshtein Distance](/evaluation/configure-evaluators/semantic-similarity#levenshtein-distance) | Text Generation / Chatbot | Similarity Metrics | Calculates the Levenshtein distance between output and expected result. | -| [LLM-as-a-judge](/evaluation/configure-evaluators/llm-as-a-judge) | Text Generation / Chatbot | LLM-based | Sends outputs to an LLM model for critique and evaluation. | -| [RAG Faithfulness](/evaluation/configure-evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Evaluates if the output is faithful to the retrieved documents in RAG workflows. | -| [RAG Context Relevancy](/evaluation/configure-evaluators/rag-evaluators) | RAG / Text Generation / Chatbot | LLM-based | Measures the relevancy of retrieved documents to the given question in RAG. | -| [Custom Code Evaluation](/evaluation/configure-evaluators/custom-evaluator) | Custom Logic | Custom | Allows users to define their own evaluator in Python. | -| [Webhook Evaluator](/evaluation/configure-evaluators/webhook-evaluator) | Custom Logic | Custom | Sends output to a webhook for external evaluation. | - -</details> - -<div style={{ display: "flex", justifyContent: "center" }}> - <Image - img={require("/images/evaluation/configure-evaluators-1.png")} - style={{ width: "50%" }} - alt="Create new evaluator" - /> -</div> - -## Evaluators' playground - -Each evaluator comes with its unique playground. For instance, in the screen below, the LLM-as-a-judge evaluator requires you to specify the prompt to use for the evaluation. You'll find detailed information about these parameters on each evaluator's documentation page. - -<div style={{ display: "flex", justifyContent: "center" }}> - <Image - img={require("/images/evaluation/configure-evaluators-3.png")} - alt="LLM-as-a-judge evaluator playground" - /> -</div> - -The evaluator playground lets you test your evaluator with sample input to make sure it's configured correctly. - -To use it, follow these steps: -1. Load a test case from a test set -2. Select a prompt and run it -3. Run the evaluator to see the result - -You can adjust the configuration until you are happy with the result. When finished, commit your changes. - - -## Next steps - -Explore the different evaluator types: - -- [Classification and Entity Extraction](/evaluation/configure-evaluators/classification-entity-extraction) -- [Pattern Matching](/evaluation/configure-evaluators/regex-evaluator) -- [Semantic Similarity](/evaluation/configure-evaluators/semantic-similarity) -- [LLM as a Judge](/evaluation/configure-evaluators/llm-as-a-judge) -- [RAG Evaluators](/evaluation/configure-evaluators/rag-evaluators) -- [Custom Evaluators](/evaluation/configure-evaluators/custom-evaluator) -- [Webhook Evaluators](/evaluation/configure-evaluators/webhook-evaluator) diff --git a/docs/docs/evaluation/configure-evaluators/05-llm-as-a-judge.mdx b/docs/docs/evaluation/configure-evaluators/05-llm-as-a-judge.mdx deleted file mode 100644 index 399dfde99e..0000000000 --- a/docs/docs/evaluation/configure-evaluators/05-llm-as-a-judge.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "LLM-as-a-Judge" ---- - -LLM-as-a-Judge is an evaluator that uses an LLM to assess LLM outputs. It's particularly useful for evaluating text generation tasks or chatbots where there's no single correct answer. - -![Configuration of LLM-as-a-judge](/images/evaluation/configure-evaluators-3.png) - -The evaluator has the following parameters: - -#### The Prompt - -You can configure the prompt used for evaluation. The prompt can contain multiple messages in OpenAI format (role/content). All messages in the prompt have access to the inputs, outputs, and reference answers (any columns in the testset). To reference these in your prompts, use the following variables (inside double curly braces): - -- `{{inputs}}`: all the inputs to the llm application formatted as key-value pairs -- `{{outputs}}`: the output of the llm application -- `{{reference}}`: the column with the reference answer in the testset (optional). You can configure the name of this column under `Advanced Setting` in the configuration modal. -- `{{correct_answer}}`: alias for `{{reference}}` (for backward compatibility) -- `{{prediction}}`: alias for `{{outputs}}` (for backward compatibility) -- `{{$input_column_name}}`: the value of any input column for the given row of your testset (e.g. `{{country}}`) - -If no `correct_answer` column is present in your testset, the variable will be left blank in the prompt. - -Here's the default prompt: - -**System prompt:** -``` -You are an expert evaluator grading model outputs. Your task is to grade the responses based on the criteria and requirements provided below. - -Given the model output and inputs (and any other data you might get) assign a grade to the output. - -## Grading considerations -- Evaluate the overall value provided in the model output -- Verify all claims in the output meticulously -- Differentiate between minor errors and major errors -- Evaluate the outputs based on the inputs and whether they follow the instruction in the inputs if any -- Give the highst and lowest score for cases where you have complete certainty about correctness and value - -## Scoring Criteria -- The score should be between 0 and 10 -- A score of 10 means that the answer is perfect. This is the highest (best) score -- A score of 0 means that the answer does not meet any of the criteria. This is the lowest possible score you can give. - -## output format -ANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER -``` - -**User prompt:** - -``` -## Model inputs -{{inputs}} -## Model outputs -{{outputs}} -``` - -### The Model - -The model can be configured to select one of the supported options (`gpt-3.5-turbo`, `gpt-4o`, `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `claude-3-5-sonnet`, `claude-3-5-haiku`, `claude-3-5-opus`). To use LLM-as-a-Judge, you'll need to set your OpenAI or Anthropic API key in the settings. The key is saved locally and only sent to our servers for evaluation—it's not stored there. diff --git a/docs/docs/evaluation/configure-evaluators/_category_.json b/docs/docs/evaluation/configure-evaluators/_category_.json deleted file mode 100644 index 838261f53c..0000000000 --- a/docs/docs/evaluation/configure-evaluators/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Configure Evaluators", - "position": 8, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/evaluation/configure-evaluators/regex-evaluator.mdx b/docs/docs/evaluation/configure-evaluators/regex-evaluator.mdx deleted file mode 100644 index 23e27ce4bc..0000000000 --- a/docs/docs/evaluation/configure-evaluators/regex-evaluator.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Regex Evaluator" ---- - -Regular Expressions (Regex) are sequences of characters that define search patterns, often used for pattern matching -within strings. The `Regex Test` evaluator checks if the generated answer matches a regular expression pattern. - -The evaluator takes the regex pattern, and whether to match or not match for that pattern. - -Here are some examples: - -| Output | Regex | Match/Mismatch | Evaluator Output | -| -------------------------------------- | ------------- | -------------- | ---------------- | -| The iPhone 6 has a 1024px screen | `.*iphone.*` | `match` | True | -| The Samsung galaxy has a 1024px screen | `.*Samsung.*` | `mismatch` | False | - diff --git a/docs/docs/evaluation/evaluation-from-ui/01-quick-start.mdx b/docs/docs/evaluation/evaluation-from-ui/01-quick-start.mdx deleted file mode 100644 index a2354b42a0..0000000000 --- a/docs/docs/evaluation/evaluation-from-ui/01-quick-start.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "Quick Start Evaluation from UI" -sidebar_label: "Quick Start" -description: "Quick start guide for running LLM and prompt evaluations from the Agenta UI" -sidebar_position: 1 ---- -import Image from "@theme/IdealImage"; - -This quick start guide will help you run your first evaluation using the Agenta UI. - -You will create a prompt that classifies tweets based on their sentiment (positive, negative, neutral). Then you will run an evaluation to measure its performance. - -## Prerequisites - -Before you get started, create the prompt and the test set: - -### Create the prompt - -Create a `completion` prompt that classifies tweets based on their sentiment. - -Use the following prompt: - -**_System prompt_** -``` -Classify this tweet based on its sentiment. Return only the sentiment. The sentiment should be one of the following: positive, negative, neutral. -``` -**_User prompt_** -``` -{{tweet}} -``` - -Commit the prompt to the default variant. - -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/01-evaluation-ui-prompt.png")} - alt="Create prompt modal showing completion and chat application options" -/> - - -### Create the test set - -Download a test set with 50 tweets based on the [Sentiment140 kaggle dataset](https://www.kaggle.com/datasets/kazanova/sentiment140). -Download the test set [here](/examples/sentiment140_first50.csv). Then upload it to Agenta (see how to [upload a test set](/evaluation/managing-test-sets/upload-csv)). - -## Running the evaluation - -Navigate to the **Evaluations** page. Click on **Start new evaluation**. - -1. Choose the test set `sentiment140_first50`. -2. Choose the latest revision from the default variant. -3. Choose the evaluator `Exact Match`. -4. Click on **Start evaluation**. - -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/02-running-evaluation.png")} - alt="Start new evaluation modal" -/> - -:::tip - -Agenta offers a variety of built-in evaluators for most use cases. You can also create custom evaluators in Python. One of the most commonly used evaluators is `LLM as a Judge`. See more about [evaluators](/evaluation/configure-evaluators/overview). -::: - -## Viewing the results - -Once the evaluation completes, click on the evaluation run to see the results. - -The overview tab shows the aggregated results for all evaluators. -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/03-results-overview.png")} - alt="Evaluation results overview" -/> - - -The test set tab shows the results for each test case. - -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/04-results-testcase.png")} - alt="Evaluation results test case" -/> - -Click the expand button in the top right corner of the output cell to open a drawer with the full output. Click the tree icon to open a drawer with the trace. - -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/05-results-testcase-drawer.png")} - alt="Evaluation results test case drawer" -/> - - -## Making a change and comparing the results - -Make a small change to the prompt and compare the results. Modify the prompt to use gpt-4o-mini instead of gpt-4o. Commit the change. Then rerun the evaluation with the new prompt revision. - -Now compare the results between the two evaluations. Click the `+ Compare` button on the top right corner of the evaluation results page. Select the evaluation to compare to. - -<Image - style={{ width: "100%", display: "block", margin: "20px auto" }} - img={require("/images/evaluation/evaluation-from-ui/06-comparison-view.png")} - alt="Evaluation results comparison view" -/> - -You might find that `gpt-4o-mini` performs differently than `gpt-4o` on this task. It may cost less but could have lower accuracy or different latency. - -## Next steps - -You have run a simple evaluation for a classification task in Agenta. Next, learn more about the different evaluators and how to configure them. See more about [evaluators](/evaluation/configure-evaluators/overview). diff --git a/docs/docs/evaluation/evaluation-from-ui/02-running-evaluations.mdx b/docs/docs/evaluation/evaluation-from-ui/02-running-evaluations.mdx deleted file mode 100644 index 018e795934..0000000000 --- a/docs/docs/evaluation/evaluation-from-ui/02-running-evaluations.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Running Evaluations" -sidebar_label: "Running Evaluations" -description: "Learn how to run evaluations from the Agenta web interface" -sidebar_position: 2 ---- - -import Image from "@theme/IdealImage"; - -This guide will show you how to run evaluations from the UI. - -## Prerequisites - -Before you get started, make sure that you have [created a test set](/evaluation/managing-test-sets/upload-csv) and [configured evaluators](/evaluation/configure-evaluators/overview) appropriate for your task. - -## Starting an evaluation - -To start an evaluation, navigate to the Evaluations page and click the `Start new evaluation` button. A modal will appear, allowing you to setup the evaluation. - -<Image - img={require("/images/evaluation/start-new-evaluation.png")} - alt="Start new evaluation" -/> - -## Setting up evaluation parameters - -In the modal, specify the following: - -- **Testset**: Choose the testset(s) for your evaluation -- **Variants**: Choose one or more variants to evaluate -- **Evaluators**: Pick one or more evaluators for assessment - -<Image - img={require("/images/evaluation/new-evaluation-modal.png")} - alt="New evaluation modal" -/> - -## Advanced configuration - -Additional settings allow you to adjust batching and retry parameters for LLM calls. This helps mitigate rate limit errors from your LLM provider. - -Advanced configuration options include: - -- **Batch Size**: Number of test cases to run concurrently in each batch (default: 10) -- **Retry Delay**: Time to wait before retrying a failed call (default: 3s) -- **Max Retries**: Maximum number of retry attempts for a failed call (default: 3) -- **Delay Between Batches**: Pause duration between batch runs (default: 5s) - -## Monitoring evaluation progress - -Once you start an evaluation: - -1. The evaluation will appear in the evaluations list -2. You'll see the status (Running, Completed, Failed) -3. Progress indicators show how many test cases have been processed -4. You can view partial results while the evaluation is running - -## Next steps - -- Learn how to [view evaluation results](/evaluation/evaluation-from-ui/viewing-results) -- Understand how to [compare evaluations](/evaluation/evaluation-from-ui/comparing-runs) -- Try [human evaluation](/evaluation/human-evaluation/quick-start) for expert feedback diff --git a/docs/docs/evaluation/evaluation-from-ui/03-viewing-results.mdx b/docs/docs/evaluation/evaluation-from-ui/03-viewing-results.mdx deleted file mode 100644 index 52b3b7eb55..0000000000 --- a/docs/docs/evaluation/evaluation-from-ui/03-viewing-results.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "Viewing Evaluation Results" -sidebar_label: "Viewing Results" -description: "Learn how to view and analyze evaluation results in Agenta" -sidebar_position: 3 ---- - -import Image from "@theme/IdealImage"; - -## Overview - -Once your evaluation completes, Agenta provides comprehensive views to analyze the results and understand your LLM application's performance. - -## Overview evaluation tab - -The main view offers an aggregated summary of results. - -<Image - img={require("/images/evaluation/overview-results.png")} - alt="Overview evaluation results" - style={{ width: "100%" }} -/> - -- Average score per evaluator for each variant/test set combination -- Average latency -- Total cost -- Creation date - -## Test cases evaluation tab - -The test cases evaluation tab provides a detailed view of each test case. - -<Image - img={require("/images/evaluation/detailed-evaluation-results.png")} - alt="Detailed evaluation results" - style={{ width: "100%" }} -/> - -The evaluation table columns show: - -- **Inputs**: The input data from your test set -- **Reference Answers**: The expected/correct answers used by evaluators -- **LLM Output**: The actual output from your application -- **Evaluator Results**: Scores or boolean values from each evaluator -- **Cost**: The cost of running this test case -- **Latency**: How long the test case took to execute - -If you click on a test case, you will see a drawer with the full output and the evaluator results. - -<Image - img={require("/images/evaluation/detailed-evaluation-drawer.png")} - alt="Detailed evaluation drawer" - style={{ width: "100%" }} -/> - -## Prompt configuration tab - -The prompt configuration tab shows the prompt configuration used for this evaluation. - -<Image - img={require("/images/evaluation/evaluation-prompt-config.png")} - alt="Prompt configuration" - style={{ width: "100%" }} -/> - -## Exporting results - -Export your evaluation results for further analysis: - -1. Click the **Export** button on the evaluation detail page -2. Choose CSV format -3. Open in your preferred analysis tool (Excel, Python, R, etc.) - -## Next steps - -- Learn how to [compare multiple evaluations](/evaluation/evaluation-from-ui/comparing-runs) -- Try [human evaluation](/evaluation/human-evaluation/quick-start) for qualitative assessment -- Explore [evaluation concepts](/evaluation/concepts) to understand evaluation approaches diff --git a/docs/docs/evaluation/evaluation-from-ui/04-comparing-runs.mdx b/docs/docs/evaluation/evaluation-from-ui/04-comparing-runs.mdx deleted file mode 100644 index 5546045a93..0000000000 --- a/docs/docs/evaluation/evaluation-from-ui/04-comparing-runs.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "Comparing Evaluation Runs" -sidebar_label: "Comparing Runs" -description: "Learn how to compare multiple evaluation runs to find the best performing variant" -sidebar_position: 4 ---- - -import Image from "@theme/IdealImage"; - -## Overview - -Compare evaluations to understand which variant performs better. This helps you make data-driven decisions about your LLM application. - -## Prerequisites - -To compare evaluations, you need: - -- Two or more completed evaluations -- All evaluations must use the same test set - -## Starting a comparison - -After your evaluations complete, you can compare two or more of them: - -1. Go to the Evaluations page -2. Click the compare button in the top right corner of the evaluation results page -3. Select the evaluations you want to compare - - -## Overview comparison tab - -The overview comparison tab shows aggregated results for all evaluators. The figures let you compare results between evaluations. - -<Image - img={require("/images/evaluation/comparing-evaluations.png")} - style={{ width: "100%" }} - alt="Animation showing how to compare evaluations in Agenta" -/> - -## Test set comparison tab - -The test set comparison tab shows results for each test case. The figures let you compare results between evaluations. - -<Image - img={require("/images/evaluation/comparison-view-testset.png")} - style={{ width: "100%" }} - alt="Comparison view test set" -/> - -Click on a row to see a drawer with the full output and evaluator results side by side. - -<Image - img={require("/images/evaluation/comparison-view-drawer.png")} - style={{ width: "100%" }} - alt="Comparison view test set" -/> - -## Prompt configuration comparison tab - -The prompt configuration comparison tab shows the prompt configuration used for each evaluation. The figures let you compare prompt configurations between evaluations. - -<Image - img={require("/images/evaluation/comparison-view-configuration.png")} - style={{ width: "100%" }} - alt="Comparison view prompt configuration" -/> - -## Next steps - -- Learn about [human evaluation](/evaluation/human-evaluation/quick-start) for qualitative feedback -- Explore [evaluation concepts](/evaluation/concepts) to understand evaluation approaches -- Understand [evaluator types](/evaluation/configure-evaluators/overview) to choose the right metrics diff --git a/docs/docs/evaluation/evaluation-from-ui/_category_.json b/docs/docs/evaluation/evaluation-from-ui/_category_.json deleted file mode 100644 index 190fc0bdb3..0000000000 --- a/docs/docs/evaluation/evaluation-from-ui/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Evaluation from UI", - "position": 6, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/evaluation/configure-evaluators/02-classification-entity-extraction.mdx b/docs/docs/evaluation/evaluators/01-classification-entiry-extraction.mdx similarity index 100% rename from docs/docs/evaluation/configure-evaluators/02-classification-entity-extraction.mdx rename to docs/docs/evaluation/evaluators/01-classification-entiry-extraction.mdx diff --git a/docs/docs/evaluation/evaluators/02-pattern-matching.mdx b/docs/docs/evaluation/evaluators/02-pattern-matching.mdx new file mode 100644 index 0000000000..283c9e8165 --- /dev/null +++ b/docs/docs/evaluation/evaluators/02-pattern-matching.mdx @@ -0,0 +1,47 @@ +--- +title: "Pattern Matching Evaluators" +--- + +Pattern Matching Evaluation is a method used to assess the performance of LLMs by identifying specific patterns within the output generated by the model. +In Agenta, to perform pattern matching evaluation you can make use of the following evaluators: + +- Regex Test +- Starts with +- Ends with +- Contains +- Contains Any +- Contains All + +## Regular Expression + +Regular Expressions (Regex) are sequences of characters that define search patterns, often used for pattern matching +within strings. The `Regex Test` evaluator checks if the generated answer matches a regular expression pattern. + +The evaluator takes the regex pattern, and whether to match or not match for that pattern. + +Here are some examples: + +| Output | Regex | Match/Mismatch | Evaluator Output | +| -------------------------------------- | ------------- | -------------- | ---------------- | +| The iPhone 6 has a 1024px screen | `.*iphone.*` | `match` | True | +| The Samsung galaxy has a 1024px screen | `.*Samsung.*` | `mismatch` | False | + +## Starts With + +**Starts With evaluator** checks if the output starts with a specified prefix, considering case sensitivity based on the settings. + +## Ends With + +**Ends With** evaluator checks if the output ends with a specified suffix, considering case sensitivity based on the settings. + +## Contains + +**Contains evaluator** checks if the output contains a specified substring, considering case sensitivity based on the settings. + +## Contains Any + +**Contains Any evaluator** checks if the output contains any of the specified substrings from a comma-separated list, considering case sensitivity based on the settings. + +## Contains All + +**Contains All evaluator** checks if the output contains all of the specified substrings from a comma-separated list, considering case sensitivity based on the settings. diff --git a/docs/docs/evaluation/configure-evaluators/04-semantic-similarity.mdx b/docs/docs/evaluation/evaluators/03-semantic-similarity.mdx similarity index 100% rename from docs/docs/evaluation/configure-evaluators/04-semantic-similarity.mdx rename to docs/docs/evaluation/evaluators/03-semantic-similarity.mdx diff --git a/docs/docs/evaluation/evaluators/04-llm-as-a-judge.mdx b/docs/docs/evaluation/evaluators/04-llm-as-a-judge.mdx new file mode 100644 index 0000000000..3b3fbe52c7 --- /dev/null +++ b/docs/docs/evaluation/evaluators/04-llm-as-a-judge.mdx @@ -0,0 +1,50 @@ +--- +title: "LLM-as-a-Judge" +--- + +LLM-as-a-Judge is an evaluator that uses an LLM to assess LLM outputs. It's particularly useful for evaluating text generation tasks or chatbots where there's no single correct answer. + +![Configuration of LLM-as-a-judge](/images/evaluation/llm-as-a-judge.png) + +The evaluator has the following parameters: + +#### The Prompt + +You can configure the prompt used for evaluation. The prompt can contain multiple messages in OpenAI format (role/content). All messages in the prompt have access to the inputs, outputs, and reference answers (any columns in the test set). To reference these in your prompts, use the following variables: + +- `correct_answer`: the column with the reference answer in the test set. You can configure the name of this column under `Advanced Setting` in the configuration modal. +- `prediction`: the output of the llm application +- `$input_column_name`: the value of any input column for the given row of your test set + +Here's the default prompt used for the country expert demo application (note that it uses the `country` input column from our test set): + +**System prompt:** + +``` +You are an evaluator grading an LLM App. + You will be given INPUTS, the LLM APP OUTPUT, the CORRECT ANSWER, the PROMPT used in the LLM APP. + Here is the grade criteria to follow: +:- Ensure that the LLM APP OUTPUT has the same meaning as the CORRECT ANSWER + +SCORE: +-The score should be between 0 and 10 +-A score of 10 means that the answer is perfect. This is the highest (best) score. +A score of 0 means that the answer does not any of of the criteria. This is the lowest possible score you can give. + +ANSWER ONLY THE SCORE. DO NOT USE MARKDOWN. DO NOT PROVIDE ANYTHING OTHER THAN THE NUMBER +``` + +**User prompt:** + +``` + +INPUTS: +country: {country} +CORRECT ANSWER:{correct_answer} +LLM APP OUTPUT: {prediction}. + +``` + +### The Model + +The model can be configured to select one of the supported options (`gpt-3.5-turbo`, `gpt-4`, `claude-3-5-sonnet`, `claude-3-5-haiku`, `claude-3-5-opus`). To use LLM-as-a-Judge, you'll need to set your OpenAI or Anthropic API key in the settings. The key is saved locally and only sent to our servers for evaluation—it's not stored there. diff --git a/docs/docs/evaluation/configure-evaluators/06-rag-evaluators.mdx b/docs/docs/evaluation/evaluators/05-rag-evaluators.mdx similarity index 100% rename from docs/docs/evaluation/configure-evaluators/06-rag-evaluators.mdx rename to docs/docs/evaluation/evaluators/05-rag-evaluators.mdx diff --git a/docs/docs/evaluation/configure-evaluators/07-custom-evaluator.mdx b/docs/docs/evaluation/evaluators/06-custom-evaluator.mdx similarity index 100% rename from docs/docs/evaluation/configure-evaluators/07-custom-evaluator.mdx rename to docs/docs/evaluation/evaluators/06-custom-evaluator.mdx diff --git a/docs/docs/evaluation/configure-evaluators/08-webhook-evaluator.mdx b/docs/docs/evaluation/evaluators/07-webhook-evaluator.mdx similarity index 100% rename from docs/docs/evaluation/configure-evaluators/08-webhook-evaluator.mdx rename to docs/docs/evaluation/evaluators/07-webhook-evaluator.mdx diff --git a/docs/docs/evaluation/evaluators/_category_.json b/docs/docs/evaluation/evaluators/_category_.json new file mode 100644 index 0000000000..43e5ebe305 --- /dev/null +++ b/docs/docs/evaluation/evaluators/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 8, + "label": "Evaluators" +} diff --git a/docs/docs/evaluation/human-evaluation/01-quick-start.mdx b/docs/docs/evaluation/human-evaluation/01-quick-start.mdx deleted file mode 100644 index ae78c98295..0000000000 --- a/docs/docs/evaluation/human-evaluation/01-quick-start.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Quick Start" -sidebar_label: "Quick Start" -description: "Get started with human evaluation in Agenta" -sidebar_position: 1 ---- - -import Image from "@theme/IdealImage"; - -## Overview - -Human evaluation lets you evaluate your LLM application's performance using human judgment instead of automated metrics. - -<details> - <summary>⏯️ Watch a short demo of the human evaluation feature.</summary> - - <iframe - width="100%" - height="400" - src="https://www.youtube.com/embed/zpoAbQlsfcw" - title="Human Evaluation - Demonstration" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</details> - -## Why use human evaluation? - -Automated metrics can't capture everything. Sometimes you need human experts to evaluate results and identify why errors occur. - -Human evaluation helps you: -- Get expert feedback to compare different versions of your application -- Collect human feedback and insights to improve your prompts and configuration -- Collect annotations to bootstrap automated evaluation - -## How human evaluation works - -Human evaluation follows the same process as automatic evaluation: -1. Choose a test set -2. Select the versions you want to evaluate -3. Pick your evaluators -4. Start the evaluation - -The only difference is that humans provide the evaluation scores instead of automated systems. - -## Quick workflow - -1. **Start evaluation**: Go to Evaluations → Human annotation → Start new evaluation -2. **Select test set**: Choose the data you want to evaluate against -3. **Select variant**: Pick the version of your application to test -4. **Configure evaluators**: Create or select evaluators (boolean, integer, multi-choice, etc.) -5. **Run**: Click "Start evaluation" and generate outputs -6. **Annotate**: Review each response and provide feedback -7. **Review results**: Analyze aggregated scores and export data - -## Next steps - -- Learn about [configuring evaluators](/evaluation/human-evaluation/configuring-evaluators) -- Understand [how to run evaluations](/evaluation/human-evaluation/running-evaluations) -- Explore [viewing results](/evaluation/human-evaluation/viewing-results) -- Try [A/B testing](/evaluation/human-evaluation/ab-testing) diff --git a/docs/docs/evaluation/human-evaluation/02-configuring-evaluators.mdx b/docs/docs/evaluation/human-evaluation/02-configuring-evaluators.mdx deleted file mode 100644 index 209114c22b..0000000000 --- a/docs/docs/evaluation/human-evaluation/02-configuring-evaluators.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "Configuring Evaluators" -sidebar_label: "Configuring Evaluators" -description: "Learn how to configure evaluators for human evaluation" -sidebar_position: 2 ---- - -import Image from "@theme/IdealImage"; - -## Creating evaluators - -If you don't have evaluators yet, click **Create new** in the **Evaluator** section. - -Each evaluator has: -- **Name** - What you're measuring (e.g., "correctness") -- **Description** - What the evaluator does -- **Feedback types** - How evaluators will score responses - -For example, a "correctness" evaluator might have: -- `is_correct` - A yes/no question about accuracy -- `error_type` - A multiple-choice field for categorizing mistakes - -<Image - style={{ - display: "block", - textAlign: "center", - marginBottom: "20px", - }} - img={require("/images/evaluation/human-evaluation/configuring-evaluators.png")} - alt="Creating evaluators for human evaluation" - loading="lazy" -/> - -## Available feedback types - -- **Boolean** - Yes/no questions -- **Integer** - Whole number ratings -- **Decimal** - Precise numerical scores -- **Single-choice** - Pick one option -- **Multi-choice** - Pick multiple options -- **String** - Free-text comments or notes - -## Grouping related feedback types - -:::tip -Evaluators can include multiple related feedback types. For example: - -**Correctness evaluator:** -- `is_correct` - Yes/no question about accuracy -- `error_type` - Multiple-choice field to categorize mistakes (only if incorrect) - -**Style adherence evaluator:** -- `is_adherent` - Yes/no question about style compliance -- `comment` - Text field explaining why the style doesn't match (if needed) - -This grouping helps you evaluate different aspects of your LLM's performance in an organized way. -::: - -## Selecting evaluators - -After creating evaluators: - -1. Select the evaluators you want to use -2. You can use multiple evaluators in a single evaluation -3. Each evaluator will appear in the annotation interface - -## Next steps - -- Learn about [running evaluations](/evaluation/human-evaluation/running-evaluations) -- Understand [how to view results](/evaluation/human-evaluation/viewing-results) -- Try [A/B testing](/evaluation/human-evaluation/ab-testing) diff --git a/docs/docs/evaluation/human-evaluation/03-running-evaluations.mdx b/docs/docs/evaluation/human-evaluation/03-running-evaluations.mdx deleted file mode 100644 index dbc5544269..0000000000 --- a/docs/docs/evaluation/human-evaluation/03-running-evaluations.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Running Evaluations" -sidebar_label: "Running Evaluations" -description: "Learn how to run human evaluation sessions in Agenta" -sidebar_position: 3 ---- - -import Image from "@theme/IdealImage"; - -## Starting a new evaluation - -1. Go to the **Evaluations** page -2. Select the **Human annotation** tab -3. Click **Start new evaluation** - -<Image -style={{ - display: "block", - textAlign: "center", - marginBottom: "20px", -}} -img={require("/images/evaluation/human-evaluation/starting-human-evaluation.png")} -alt="Starting human evaluation" -loading="lazy" -/> - -## Configuring your evaluation - -1. **Select your test set** - Choose the data you want to evaluate against -2. **Select your revision** - Pick the version of your application to test - -:::warning -Your test set columns must match the input variables in your revision. If they don't match, you'll see an error message. -::: - -3. **Choose evaluators** - Select how you want to measure performance - -<Image - style={{ - display: "block", - textAlign: "center", - marginBottom: "20px", - }} - img={require("/images/evaluation/human-evaluation/human-evaluation-config-1.png")} - alt="Human evaluation configuration" - loading="lazy" -/> - -## Running the evaluation - -After configuring: - -1. Click **Start evaluation** -2. You'll be redirected to the annotation interface -3. Click **Run all** to generate outputs and begin evaluation - -<Image -style={{ - display: "block", - textAlign: "center", - marginBottom: "20px", -}} -img={require("/images/evaluation/human-evaluation/human-evaluation-view.png")} -alt="Human evaluation interface" -loading="lazy" -/> - -## Annotating responses - -For each test case: -1. Review the input and output -2. Use the evaluation form on the right to score the response -3. Click **Annotate** to save your assessment -4. Click **Next** to move to the next test case - -:::tip -Select the **Unannotated** tab to see only the test cases you haven't reviewed yet. -::: - -## Collaboration - -You can invite team members to help with evaluation by sharing the evaluation link. Team members must be added to your workspace first. - -## Next steps - -- Learn about [viewing results](/evaluation/human-evaluation/viewing-results) -- Try [A/B testing](/evaluation/human-evaluation/ab-testing) to compare variants diff --git a/docs/docs/evaluation/human-evaluation/04-viewing-results.mdx b/docs/docs/evaluation/human-evaluation/04-viewing-results.mdx deleted file mode 100644 index e80c933b6f..0000000000 --- a/docs/docs/evaluation/human-evaluation/04-viewing-results.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Viewing Results" -sidebar_label: "Viewing Results" -description: "Learn how to view and export human evaluation results" -sidebar_position: 4 ---- - -## Overview - -After completing annotations, you can review and export the results of your human evaluation. - -## Viewing results - -The **Results** section shows: - -- Aggregated scores across all test cases -- Individual annotations for each test case -- Evaluator performance metrics -- Comments and feedback provided by annotators - -## Comparing with other experiments - -You can compare human evaluation results with: - -- Automated evaluation runs -- Other human evaluation sessions -- Different variants or versions - -This helps you understand how human judgment aligns with automated metrics and identify areas for improvement. - -## Exporting results - -### Export to CSV - -Click **Export results** to download your evaluation data in CSV format. The exported file includes: - -- Test case inputs -- LLM outputs -- All annotation scores and feedback -- Timestamp and annotator information - -### Saving as test set - -Click **Save test set** to create a new test set from annotated data. This is useful for: - -- Bootstrapping automated evaluation with human-validated examples -- Creating regression test suites -- Building training data for custom evaluators - -## Use cases for exported data - -- **Analysis**: Perform statistical analysis on evaluation results -- **Reporting**: Create reports for stakeholders -- **Training**: Use annotations to train or fine-tune models -- **Quality Assurance**: Track quality metrics over time - -## Next steps - -- Learn about [A/B testing](/evaluation/human-evaluation/ab-testing) -- Explore [automated evaluation](/evaluation/evaluation-from-ui/quick-start) -- Understand [configure evaluators](/evaluation/configure-evaluators/overview) diff --git a/docs/docs/evaluation/human-evaluation/05-ab-testing.mdx b/docs/docs/evaluation/human-evaluation/05-ab-testing.mdx deleted file mode 100644 index c2da594532..0000000000 --- a/docs/docs/evaluation/human-evaluation/05-ab-testing.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "A/B Testing" -sidebar_label: "A/B Testing" -description: "Learn how to compare two variants using human evaluation" -sidebar_position: 5 ---- - -import Image from "@theme/IdealImage"; - -## Overview - -A/B testing lets you compare two versions of your application side-by-side. For each test case, you choose which version performs better. - -## Setting up A/B testing - -1. Select **two versions** you want to compare -2. Choose your **test set** -3. For each test case, decide which version is better (or if they're equal) - -<Image -style={{ - display: "block", - textAlign: "center", - marginBottom: "20px", -}} -img={require("/images/basic_guides/21_ab_test_view_card_view_light.png")} -alt="A/B test comparison view" -loading="lazy" -/> - -## A/B testing features - -During A/B evaluation, you can: -- **Compare variants** - Score which version performs better for each test case -- **Add notes** - Include context or detailed feedback -- **Export results** - Download your evaluation data for further analysis - -## Collaborating on A/B tests - -You can invite team members to help with A/B testing by sharing the evaluation link. Team members must be added to your workspace first. - -This is particularly useful for: -- Getting diverse perspectives on performance -- Reducing individual bias -- Speeding up evaluation with multiple annotators - -## Interpreting A/B test results - -After completing the A/B test, you'll see: - -- Win/loss/tie counts for each variant -- Percentage of cases where each variant performed better -- Specific test cases where variants differed significantly -- Notes and comments from annotators - -## Use cases - -A/B testing is ideal for: - -- **Prompt optimization**: Compare different prompt wordings -- **Model selection**: Evaluate different LLM models (GPT-4 vs Claude vs others) -- **Parameter tuning**: Test different temperature or max_tokens settings -- **Feature comparison**: Compare variants with different features enabled - -## Next steps - -- Learn about [exporting results](/evaluation/human-evaluation/viewing-results) -- Explore [automated evaluation](/evaluation/evaluation-from-ui/comparing-runs) for larger-scale comparisons -- Understand [evaluation concepts](/evaluation/concepts) diff --git a/docs/docs/evaluation/human-evaluation/_category_.json b/docs/docs/evaluation/human-evaluation/_category_.json deleted file mode 100644 index 44fdaf5ba8..0000000000 --- a/docs/docs/evaluation/human-evaluation/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Human Evaluation", - "position": 9, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/evaluation/managing-test-sets/01-upload-csv.mdx b/docs/docs/evaluation/managing-test-sets/01-upload-csv.mdx deleted file mode 100644 index 13591eddb7..0000000000 --- a/docs/docs/evaluation/managing-test-sets/01-upload-csv.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Upload Test Sets as CSVs" -sidebar_label: "Upload CSV/JSON" -description: "Learn how to upload test sets from CSV or JSON files" -sidebar_position: 1 ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -## Overview - -You can quickly create test sets by uploading CSV or JSON files. This is the fastest way to import existing test data into Agenta. - -## Uploading a file - -To create a test set from a CSV or JSON file: - -1. Go to `Test sets` -2. Click `Upload test sets` -3. Select either `CSV` or `JSON` - -<Image img={require("/images/test-sets/upload_test_set.png")} /> - -## CSV Format - -We use CSV with commas (,) as separators and double quotes (") as quote characters. The first row should contain the header with column names. Each input should have its own column. The column containing the reference answer can have any name, but we use "correct_answer" by default. - -:::info -If you choose a different column name for the reference answer, you'll need to configure the evaluator later with that specific name. -::: - -Here's an example of a valid CSV: - -```csv -text,instruction,correct_answer -Hello,How are you?,I'm good. -"Tell me a joke.",Sure, here's one:... -``` - -## JSON Format - -The test set should be in JSON format with the following structure: - -1. A JSON file containing an array of objects. -2. Each object in the array represents a row, with keys as column headers and values as row data. Here's an example of a valid JSON file: - -```json -[ - { "recipe_name": "Chicken Parmesan", "correct_answer": "Chicken" }, - { "recipe_name": "a, special, recipe", "correct_answer": "Beef" } -] -``` - -## Test set schema for Chat Applications - -For chat applications created using the chat template in Agenta, the input should be saved in the column called `messages`, which would contain the input list of messages: - -```json -[ - { "content": "message.", "role": "user" }, - { "content": "message.", "role": "assistant" } - // Add more messages if necessary -] -``` - -In case the prompt includes other variables (e.g. `context`), make sure to have a column with the same name and the value of the variable. - -The reference answer column (by default `correct_answer`) should follow the same format: - -```json -{ "content": "message.", "role": "assistant" } -``` - -Here is an example of a valid CSV for testing the default chat prompt template: - -```csv chat_test_set.csv -context,messages,correct_answer -test,"[{""role"":""user"",""content"":""hi""}]","{""content"":""Hello! How can I assist you today?"",""role"":""assistant"",""annotations"":[]}" -``` - -## Next steps - -- [Create test sets programmatically](/evaluation/managing-test-sets/create-programatically) using the SDK or API -- [Create test sets from traces](/evaluation/managing-test-sets/create-from-traces) to capture real production data -- [Create test sets from playground](/evaluation/managing-test-sets/create-from-playground) during experimentation diff --git a/docs/docs/evaluation/managing-test-sets/02-create-programatically.mdx b/docs/docs/evaluation/managing-test-sets/02-create-programatically.mdx deleted file mode 100644 index 79c271af22..0000000000 --- a/docs/docs/evaluation/managing-test-sets/02-create-programatically.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Create Test Sets Programmatically" -sidebar_label: "Create Programmatically" -description: "Learn how to create test sets using the API or SDK" -sidebar_position: 2 ---- - -## Overview - -Creating test sets programmatically allows you to automate test set generation, integrate with your CI/CD pipeline, or dynamically generate test cases from existing data sources. - -## Creating via API - -You can upload a test set using our API. Find the [API endpoint reference here](/reference/api/upload-file). - -Here's an example of such a call: - -**HTTP Request:** - -``` -POST /testsets - -``` - -**Request Body:** - -```json -{ - "name": "testsetname", - "csvdata": [ - { "column1": "row1col1", "column2": "row1col2" }, - { "column1": "row2col1", "column2": "row2col2" } - ] -} -``` - -### Example with curl - -```bash -curl -X POST "https://cloud.agenta.ai/api/testsets" \ - -H "Content-Type: application/json" \ - -H "Authorization: ApiKey YOUR_API_KEY" \ - -d '{ - "name": "my_test_set", - "csvdata": [ - {"input": "Hello", "expected": "Hi there!"}, - {"input": "How are you?", "expected": "I am doing well!"} - ] - }' -``` - -## Creating via SDK - -```python -from agenta.client.api import AgentaApi -from agenta.client.types.new_testset import NewTestset - -# Initialize the client -client = AgentaApi( - base_url="https://cloud.agenta.ai/api", - api_key="your-api-key" -) - -# Create test set data -csvdata = [ - {"country": "France", "capital": "Paris"}, - {"country": "Germany", "capital": "Berlin"}, - {"country": "Spain", "capital": "Madrid"} -] - -# Create the test set -response = client.testsets.create_testset( - request=NewTestset( - name="countries_capitals", - csvdata=csvdata - ) -) - -test_set_id = response.id -print(f"Created test set with ID: {test_set_id}") -``` - -## Next steps - -- [Create test sets from UI](/evaluation/managing-test-sets/create-from-ui) for manual creation -- [Create test sets from traces](/evaluation/managing-test-sets/create-from-traces) to capture production data -- [Create test sets from playground](/evaluation/managing-test-sets/create-from-playground) during experimentation diff --git a/docs/docs/evaluation/managing-test-sets/03-create-from-ui.mdx b/docs/docs/evaluation/managing-test-sets/03-create-from-ui.mdx deleted file mode 100644 index d6146d5a67..0000000000 --- a/docs/docs/evaluation/managing-test-sets/03-create-from-ui.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "Create Test Sets from UI" -sidebar_label: "Create from UI" -description: "Learn how to create and edit test sets using the Agenta web interface" -sidebar_position: 3 ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -## Overview - -The Agenta UI provides an intuitive interface for creating and editing test sets manually. This is ideal when you want to quickly create or edit small test sets. - -## Creating a test set from the UI - -To create a new test set from the UI: - -1. Go to `Test sets` in the navigation -2. Click `Create a test set with UI` -3. Name your test set -4. Specify the columns for input types -5. Add your test cases row by row -6. Click `Save test set` when done - -<Image img={require("/images/test-sets/add_test_set_ui.png")} /> - -## Editing an existing test set - -To edit an existing test set: - -1. Go to `Test sets` -2. Select the test set you want to edit -3. Make your changes (add, edit, or delete rows) -4. Click `Save test set` to persist your changes - -:::tip -Remember to click `Save test set` before navigating away, or your changes will be lost! -::: - - -## Next steps - -- [Upload test sets as CSV](/evaluation/managing-test-sets/upload-csv) for bulk imports -- [Create test sets programmatically](/evaluation/managing-test-sets/create-programatically) using API/SDK -- [Create test sets from traces](/evaluation/managing-test-sets/create-from-traces) to capture production data -- Learn about [running evaluations](/evaluation/evaluation-from-ui/running-evaluations) with your test sets diff --git a/docs/docs/evaluation/managing-test-sets/04-create-from-traces.mdx b/docs/docs/evaluation/managing-test-sets/04-create-from-traces.mdx deleted file mode 100644 index 32f4ba8da5..0000000000 --- a/docs/docs/evaluation/managing-test-sets/04-create-from-traces.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "Create Test Sets from Traces" -sidebar_label: "Create from Traces" -description: "Learn how to create test sets from production traces in observability" -sidebar_position: 4 ---- - -```mdx-code-block -import { Stream } from '@cloudflare/stream-react'; -``` - -## Overview - -One of the most valuable sources of test cases is your production data. Traces captured in the Observability view represent real user interactions with your LLM application. - -<Stream controls src="03031e0bf0b33319923d5dadbf5d5e5a" height="400px" /> -<br /> - -## Adding a Single Trace - -To add a single trace to a test set: - -1. Navigate to the **Observability** view in Agenta -2. Find a trace you want to add to a test set -3. Click the **Add to test set** button at the top of the trace -4. Choose to create a new test set or select an existing one -5. Review the mapping between trace data and test set columns - - Agenta will automatically map the inputs and outputs to appropriate columns - - You can edit the expected answer if you don't agree with the output -6. Click **Save** to add the trace to your test set - -## Adding Multiple Traces at Once - -To efficiently add multiple traces: - -1. In the Observability view, use the search function to filter traces - - For example, search for specific response patterns like "I don't have enough information" -2. Select all relevant traces by checking the boxes next to them -3. Click **Add to test set** -4. Choose an existing test set or create a new one -5. Review the mapping for the traces -6. Click **Save** to add all selected traces to your test set - -## Use cases - -Creating test sets from traces is particularly useful for: - -- **Edge Cases**: Capture unusual or problematic user interactions -- **Regression Testing**: Save examples of correct behavior to prevent future regressions -- **Error Analysis**: Collect failed cases to understand and fix issues - -## Next steps - -- [Create test sets from playground](/evaluation/managing-test-sets/create-from-playground) during experimentation -- [Upload test sets as CSVs](/evaluation/managing-test-sets/upload-csv) for bulk imports -- Learn about [running evaluations](/evaluation/evaluation-from-ui/running-evaluations) with your test sets diff --git a/docs/docs/evaluation/managing-test-sets/05-create-from-playground.mdx b/docs/docs/evaluation/managing-test-sets/05-create-from-playground.mdx deleted file mode 100644 index a9c8d5d603..0000000000 --- a/docs/docs/evaluation/managing-test-sets/05-create-from-playground.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Create Test Sets from Playground" -sidebar_label: "Create from Playground" -description: "Learn how to create test sets directly from the playground while experimenting" -sidebar_position: 5 ---- - -```mdx-code-block -import { Stream } from '@cloudflare/stream-react'; -``` - -## Overview - -The playground offers a convenient way to create and add data to a test set. This workflow is useful when you discover interesting cases or edge cases while experimenting with your LLM application. - -<Stream controls src="27668e5d4c08c8211d4d808af16090bd" height="400px" /> -<br /> - -## Adding data points from the playground - -To add a data point to a test set from the playground: - -1. Work with your application in the playground -2. When you find an interesting case, click the `Add to test set` button located near the `Run` button -3. A drawer will display showing the inputs and outputs from the playground -4. You can modify inputs and correct answers if needed -5. Select an existing test set to add to, or choose `+Add new` to create a new one -6. Once you're satisfied, click `Add` to finalize - -## Next steps - -- [Upload test sets as CSVs](/evaluation/managing-test-sets/upload-csv) for bulk imports -- [Create test sets from traces](/evaluation/managing-test-sets/create-from-traces) to capture production data -- Learn about [running evaluations](/evaluation/evaluation-from-ui/running-evaluations) with your test sets diff --git a/docs/docs/evaluation/managing-test-sets/_category_.json b/docs/docs/evaluation/managing-test-sets/_category_.json deleted file mode 100644 index 45dbdaf1b2..0000000000 --- a/docs/docs/evaluation/managing-test-sets/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Manage Test Sets", - "position": 5, - "collapsible": true, - "collapsed": true -} \ No newline at end of file diff --git a/docs/docs/getting-started/01-introduction.mdx b/docs/docs/getting-started/01-introduction.mdx index d7e9e591c8..b27a8dcdec 100644 --- a/docs/docs/getting-started/01-introduction.mdx +++ b/docs/docs/getting-started/01-introduction.mdx @@ -14,52 +14,31 @@ import Image from "@theme/IdealImage"; alt="Screenshots of Agenta LLMOPS platform" loading="lazy" /> -Agenta is an **open-source LLMOps platform** that helps **developers** and **product teams** build reliable LLM applications. +Agenta is an open-source platform that helps **developers** and **product teams** +build robust AI applications powered by LLMs. It offers all the tools for **prompt +management and evaluation**. +### With Agenta, you can: -Agenta covers the entire LLM development lifecycle: **prompt management**, **evaluation**, and **observability**. +1. Rapidly [**experiment** and **compare** prompts](/prompt-engineering/overview) on [any LLM workflow](/custom-workflows/overview) (chain-of-prompts, Retrieval Augmented Generation (RAG), LLM agents...) +2. Rapidly [**create test sets**](/evaluation/create-test-sets) and **golden datasets** for evaluation +3. **Evaluate** your application with pre-existing or **custom evaluators** +4. **Annotate** and **A/B test** your applications with **human feedback** +5. [**Collaborate with product teams**](/misc/team_management) for prompt engineering and evaluation +6. [**Deploy your application**](/concepts/concepts#environments) in one-click in the UI, through CLI, or through github workflows. -## Features +Agenta focuses on increasing the speed of the development cycle of LLM applications by increasing the speed of experimentation. -### Prompt Engineering and Management +## How is Agenta different? -Teams often struggle with prompt collaboration. They keep prompts in code where subject matter experts cannot edit them. Or they use spreadsheets in an unreliable process. - -Agenta organizes prompts for your team. Subject matter experts can collaborate with developers without touching the codebase. Developers can version prompts and deploy them to production. - -The playground lets teams experiment with prompts. You can load traces and test sets. You can test prompts side by side. - - -### Evaluation - -Most teams lack a systematic evaluation process. They make random prompt changes based on vibes. Some changes improve quality but break other cases because LLMs are stochastic. - -Agenta provides one place to evaluate systematically. Teams can run three types of evaluation: - -- Automatic evaluation with LLMs at scale before production -- Human annotation where subject matter experts review results and provide feedback to AI engineers -- Online evaluation for applications already in production - -Both subject matter experts and engineers can run evaluations from the UI. - -### Observability - -Agenta helps you understand what happens in production. You can capture user feedback through an API (thumbs up or implicit signals). You can debug agents and applications with tracing to see what happens inside them. - -Track costs over time. Find edge cases where things fail. Add those cases to your test sets. Have subject matter experts annotate the results. +### Works with any LLM app workflow +Agenta enables prompt engineering and evaluation on any LLM app architecture, such as **Chain of Prompts**, **RAG**, or **LLM agents**. It is compatible with any framework like **Langchain** or **LlamaIndex**, and works with any model provider, such as **OpenAI**, **Cohere**, or **local models**. -## Why Agenta? +[Jump here](/custom-workflows/overview) to see how to use your own custom application with Agenta. ### Enable collaboration between developers and product teams Agenta empowers **non-developers** to iterate on the configuration of any custom LLM application, evaluate it, annotate it, A/B test it, and deploy it, all within the user interface. -### Open-source and MIT licensed - -Agenta is open-source and MIT licensed, so you can self-host it, modify it, and use it in commercial projects without restrictions. - -### Works with any LLM app workflow - -Agenta enables prompt engineering and evaluation on any LLM app architecture, such as **Chain of Prompts**, **RAG**, or **LLM agents**. It is compatible with any framework like **Langchain** or **LlamaIndex**, and works with any model provider, such as **OpenAI**, **Cohere**, or **local models**. - +By **adding a few lines to your application code**, you can create a prompt playground that allows non-developers to experiment with prompts for your application and use all the tools within Agenta. diff --git a/docs/docs/getting-started/02-quick-start.mdx b/docs/docs/getting-started/02-quick-start.mdx index 0535b21280..ae36c7ed2a 100644 --- a/docs/docs/getting-started/02-quick-start.mdx +++ b/docs/docs/getting-started/02-quick-start.mdx @@ -1,449 +1,88 @@ --- -title: "Quick Start: Your First LLM Application" -sidebar_label: "Quick Start" -description: "Create, evaluate and deploy your first LLM app in minutes" +title: "Quick Start" +description: "Create and deploy your first LLM app in one minute" --- -```mdx-code-block -import Image from "@theme/IdealImage"; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -``` - -This guide walks you through creating, evaluating, and deploying your first LLM application using Agenta's user interface. In just a few minutes, you'll have a working prompt that you can use in production. - -<details> - <summary>⏯️ Watch a short demo of the quick start guide.</summary> - - <iframe - width="100%" - height="400" - src="https://www.youtube.com/embed/N3B_ZOYzjLg?si=3KZoWdynQtM1x-cK" - title="Quick Start - Your First LLM Application" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</details> - -## What You'll Learn - -By the end of this tutorial, you'll know how to: - -- **[Create a new prompt](#step-1-create-your-first-prompt)** and [bootstrap a test set](#step-3-create-a-test-set) from interactions in the playground -- **[Run evaluations](#step-4-evaluate-your-prompt)** from the UI to measure the prompt performance -- **[Deploy prompts](#step-5-deploy-to-production)** to production environments and integrate them with your applications -- **[Trace prompt interactions](#step-6-integrate-with-your-app-fetch-the-prompt-configuration)** and usage - -## Step 1: Create Your First Prompt - -Let's start by creating a simple prompt that returns the capital city of any country. - -### Creating the Application -1. **Click "Create New Prompt"** on your dashboard -2. **Select "Completion Prompt"** from the options -3. **Name your prompt** "get_capital" - -<Image - img={require("/images/getting-started-ui-screenshots/01_create_new_app.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing the create new prompt dialog with completion prompt selected" -/> - -:::info Understanding Prompt Types -Agenta supports two main prompt types: - -- **Completion Prompts**: Single-turn prompts for generating one response (like summaries, translations, or factual answers) -- **Chat Prompts**: Multi-turn prompts for conversations (like chatbots or interactive assistants) +import Image from "@theme/IdealImage"; -For this tutorial, we're using a completion prompt since we want a single, direct answer. +:::note +This tutorial helps users create LLM apps using templates within the UI. For more complex applications involving code +in Agenta, please refer to Using code in Agenta [Using code in agenta](//custom-workflows/overview){" "} ::: -## Step 2: Test and Improve Your Prompt - -Now let's experiment with the prompt in Agenta's playground to make sure it works correctly. - -### Initial Testing +Want a video tutorial instead? We have a 3-minute video for you. [Watch it here](https://youtu.be/N3B_ZOYzjLg). -The template comes with a basic prompt for getting country capitals. Let's test it: +<iframe + width="720" + height="450" + src="https://www.youtube.com/embed/N3B_ZOYzjLg?si=3KZoWdynQtM1x-cK" + title="YouTube video player" + frameBorder="0" + allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" + allowFullScreen +></iframe> -1. **Go to the playground** (it should open automatically after creating your prompt) -2. **Enter "France"** in the input field -3. **Click "Run"** to test the prompt -4. **Check the result** - it should return "The capital of France is Paris" +## Introduction -### Refining the Prompt +Welcome! This beginner-friendly guide will walk you through building a simple LLM app in Agenta using an existing template. We'll create the application, engineer a prompt, and deploy it as an API—all in one minute. -The current response is a full sentence, but let's say we want just the city name. We can improve this: +## Prerequisites -1. **Edit the prompt** to be more specific: +This guide assumes you are using [agenta cloud](https://cloud.agenta.ai). If you would like to self-host the agenta platform, please refer to [the self-hosting guide](/self-host/quick-start) for deployment instructions. - ``` - What is the capital of {{country}}? Answer with only the capital name. - ``` +<details> + <summary>In case you are self-hosting agenta</summary> -2. **Change the model** to "gpt-4o-mini" for better performance: +## Step 0: Add your OpenAI API keys -<Image - img={require("/images/getting-started-ui-screenshots/02_select_model.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing model selection dropdown with gpt-4o-mini highlighted" -/> +1. Access the agenta in your webbrowser. +2. Select "Settings" from the left sidebar. +3. Select "Model Hub" from the top menu. +4. Add your OpenAI API key. -3. **Run the prompt again** with "France" as input -4. **Verify the result** now shows just "Paris" +Your OpenAI API keys are saved locally on your browser and are sent to the Agenta server only when you create a new application (as an environment variable in the Docker container). -### Saving Your Changes +</details> -Now let's save this improved version: +## Step 1: Create a New LLM App -1. **Click the "Commit" button** -2. **Select "As a new variant"** -3. **Name the variant** "explicit-prompt" +1. Click on the "Create New App" button. +2. Select "Create from Template" and choose the "Single Prompt Template"; then name the application "get_capital." <Image - img={require("/images/getting-started-ui-screenshots/03_commit.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing the commit dialog with 'As a new variant' option selected" + img={require("/images/getting-started-ui-screenshots/01_create_new_app.png")} /> -:::info Understanding Variants -Variants in Agenta work like branches in Git repositories. Each variant is versioned. You can use variants to experiment with different concepts (e.g., `long prompt` and `short prompt`), different models (`gpt-4o-mini` and `gpt-4o`), or have different team members work (`alex variant1`, `amani-var2`). +:::info +{" "} +You've created your first LLM application! Test it out in the playground, play with its parameters, or use it in your software +by copying the code from the "Endpoints" menu. ::: -## Step 3: Create a Test Set +## Step 2: Test the Application -Test sets help you evaluate your prompts consistently. Let's create one using the data point we just tested. +The provided application template already includes a prompt that states the capital of a country. Let's test it: -### Adding to a Test Set - -You can create a test set directly from the playground: - -1. **Click the three dots** next to your output result -2. **Select "Add to test set"** -3. **Configure the test set** in the drawer that opens: - - **Test set name**: Create new and name it "capitals" - - **Input mapping**: Leave "country" mapped to "country" - - **Output mapping**: Leave "output" mapped to "correct_answer" +- Go to the playground. +- Type "France." +- Click the "Run" button. +- The result should read, "The capital of France is Paris." If you only want to return "Paris," we'll adjust this with prompt engineering in the next step. <Image - img={require("/images/getting-started-ui-screenshots/04_add_to_test_set.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing the add to test set dialog with configuration options" + img={require("/images/getting-started-ui-screenshots/03_playground.png")} /> -This creates a test case where: - -- **Input**: France -- **Expected output**: Paris - -You can add more countries to this test set later to ensure your prompt works consistently across different inputs. - -## Step 4: Evaluate Your Prompt - -Evaluation helps you measure how well your prompt performs against your test cases. - -### Running an Evaluation - -1. **Go to the Evaluation page** from the main navigation -2. **Click "Start new evaluation"** -3. **Configure your evaluation**: - - **Test set**: Select "capitals" (the one we just created) - - **Variant**: Select "explicit-prompt" - - **Evaluator**: Select "Exact Match" (to check if output exactly matches expected result) - -<Image - img={require("/images/getting-started-ui-screenshots/05_new_evaluation.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing evaluation configuration with test set, variant, and evaluator selected" -/> - -:::info -Agenta comes with a [set of built-in evaluators](/evaluation/concepts) that you can use to evaluate your prompt. You can also create your own custom evaluator [using code](/evaluation/configure-evaluators/custom-evaluator) or [webhooks](/evaluation/configure-evaluators/webhook-evaluator). -::: - -### Analyzing the Results - -The evaluation will run in the background. Once complete, you can: - -- **View overall results** on the evaluation dashboard -- **Click on the evaluation** to see detailed results for each test case -- **Identify any failures** where the output didn't match expectations - -This helps you understand how reliable your prompt is before deploying it to production. - -## Step 5: Deploy to Production - -Once you're satisfied with your prompt's performance, it's time to deploy it. +## Step 3: Deploy the application -### Deploying Your Prompt +To deploy the application as an API. You need to click on the button "Publish" in the playground and select an environemnt. -1. **Go to the Registry page** to see all your prompt versions -2. **Find and select** your "explicit-prompt" variant -3. **Click "Deploy"** in the upper right corner of the drawer that opens -4. **Select "Production"** as the target environment +You can now find the API endpoint in the "Endpoints" menu. Copy and paste the code from the "Endpoints" menu to use it in your software. <Image - img={require("/images/getting-started-ui-screenshots/06_deploy.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing the deploy dialog with production environment selected" + img={require("/images/getting-started-ui-screenshots/06_deployment.png")} /> -Your prompt is now live and ready to use in your applications! - -## Step 6: Integrate with Your App: Fetch the Prompt Configuration - :::info -Agenta provides two main ways to integrate with your application: - -- **Use Agenta for Prompt Management**: Fetch the prompt configuration and use it in your own code -- **Use Agenta as a Proxy**: Use Agenta as a middleware that forwards requests to the LLM - -In this guide, we'll use the first approach. The second approach is covered in the [Integration Guide](/prompt-engineering/integrating-prompts/integrating-with-agenta). Its advantages are simpler integration and getting observability out of the box. The disadvantages are that it does not support streaming responses and adds a slight latency to the response (approximately 0.3 seconds). +Congratulations! You've created your first LLM application. Feel free to modify it, explore its parameters, and discover +Agenta's features. Your next steps could include [fetching prompts from Agenta](/prompt-engineering/quick-start), [building a custom workflow](/custom-workflows/quick-start), or [running an evaluation](/evaluation/overview). ::: - -We are going to fetch the prompt configuration and use it in our own code: - -<Tabs> - -<TabItem value="sdk" label="Using Python SDK"> - -First, import and initialize the Agenta SDK: - -```python -import agenta as ag -# os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" -# os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # only needed when self-hosting -ag.init() - -# Fetch your prompt configuration from the registry -# You can also use `ag.ConfigManager.get_from_registry_async` for asynchronous applications -config = ag.ConfigManager.get_from_registry( - app_slug="your-app-slug", - environment_slug="production" -) - -# Use the helper class `PromptTemplate` to format your prompt and convert it to OpenAI-compatible parameters -prompt = PromptTemplate(**config["prompt"]).format(country="France") -client = openai.OpenAI() -response = client.chat.completions.create( - **prompt.to_openai_kwargs() -) -``` - -<details> - <summary>The **JSON response** with your prompt configuration.</summary> - -```json -{ - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an expert in geography" - }, - { - "role": "user", - "content": "What is the capital of {{country}}? " - } - ], - "input_keys": [ - "country" - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "tools": [], - "top_p": 0.2, - "max_tokens": 257, - "temperature": 0.2, - "presence_penalty": -1.7, - "frequency_penalty": -1.5, - "response_format": { - "type": "json_schema", - "json_schema": { - "name": "MySchema", - "schema": { - "type": "object", - "properties": {} - }, - "strict": false, - "description": "A description of the schema" - } - } - }, - "template_format": "curly" - } -} -``` -</details> - -</TabItem> - -<TabItem value="api" label="Using API (JS/TS)"> - -```javascript -const fetchConfigs = async () => { - const url = 'https://cloud.agenta.ai/api/variants/configs/fetch'; - - const headers = { - 'Accept': 'application/json', - 'Authorization': 'YOUR_API_KEY', - 'Content-Type': 'application/json' - }; - - const requestData = { - environment_ref: { - slug: 'production', - id: null - }, - application_ref: { - slug: 'testprompt', - id: null - } - }; - - try { - const response = await fetch(url, { - method: 'POST', - headers, - body: JSON.stringify(requestData) - }); - - const data = await response.json(); - console.log('Response:', JSON.stringify(data, null, 2)); - - } catch (error) { - console.error('Error:', error); - } -}; - -fetchConfigs(); -``` - -<details> - <summary>The **JSON response** with your prompt configuration.</summary> - -```json -{ - "params": { - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an expert in geography" - }, - { - "role": "user", - "content": "What is the capital of {{country}}?" - } - ], - "input_keys": ["country"], - "llm_config": { - "model": "gpt-3.5-turbo", - "tools": [] - }, - "user_prompt": "What is the capital of {{country}}?", - "system_prompt": "You are an expert in geography", - "template_format": "curly" - } - } - }, - "url": "https://cloud.agenta.ai/services/completion", - "application_ref": { - "slug": "we", - "version": null, - "commit_message": null, - "id": "0196869b-2337-7d51-8a24-fc3893191b5b" - }, - "service_ref": null, - "variant_ref": { - "slug": "key", - "version": 1, - "commit_message": "variant commit message", - "id": "0196869b-259c-7e11-ba08-ac316a2d41fa" - }, - "environment_ref": { - "slug": "production", - "version": 1, - "commit_message": "test commit message", - "id": "0196869c-bd67-7f41-b7bb-d1196f87d4e9" - }, - "variant_lifecycle": { - "created_at": "2025-04-30T12:10:36.828905+00:00", - "updated_at": "2025-04-30T12:10:36.315388+00:00", - "updated_by_id": "01966e0a-9094-7562-8d47-87002335e22b", - "updated_by": "me@gmail.com" - }, - "environment_lifecycle": { - "created_at": "2025-04-30T12:12:21.223715+00:00", - "updated_at": "2025-04-30T12:12:21.223715+00:00", - "updated_by_id": "01966e0a-9094-7562-8d47-87002335e22b", - "updated_by": "me@gmail.com" - } -} -``` -</details> -</TabItem> -</Tabs> - -## Step 7: Integrating with Your Application: Adding Observability - -Agenta is built on top of **OpenTelemetry** and is compatible with a number of semantic conventions in the ecosystem ([OpenLLMetry](https://github.com/traceloop/openllmetry), [OpenInference](https://github.com/Arize-ai/openinference), [Logfire](https://logfire.ai/)). It comes therefore with built-in auto-instrumentation support for all major LLM frameworks and SDKs such as [OpenAI](/observability/integrations/openai), [LiteLLM](/observability/integrations/litellm), [LangChain](/observability/integrations/langchain). - -To add instrumentation to our application, let's use the auto-instrumentation support for OpenAI. We are going to use the OpenLLMetry library to auto-instrument the OpenAI client. - -First, we need to install the OpenLLMetry library: - -```bash -pip install opentelemetry-instrumentation-openai -``` - -Then we can add auto-instrumentation to our application (new lines are highlighted): - -```python -import agenta as ag -# highlight-start -from opentelemetry.instrumentation.openai import OpenAIInstrumentor -# highlight-end - -import openai - -# os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" -# os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # only needed when self-hosting -ag.init() - -# highlight-start -OpenAIInstrumentor().instrument() -# highlight-end - -# Fetch your prompt configuration from the registry -# You can also use `ag.ConfigManager.get_from_registry_async` for asynchronous applications -config = ag.ConfigManager.get_from_registry( - app_slug="your-app-slug", - environment_slug="production" -) - -# Use the helper class `PromptTemplate` to format your prompt and convert it to OpenAI-compatible parameters -prompt = PromptTemplate(**config["prompt"]).format(country="France") -client = openai.OpenAI() -response = client.chat.completions.create( - **prompt.to_openai_kwargs() -) -``` - -You can go now the the observability page and see the trace generated. It includes the cost, latency, and inputs/outputs of the prompt. - -<Image - img={require("/images/getting-started-ui-screenshots/07_observability.png")} - style={{ marginBottom: "1rem" }} - alt="Screenshot showing the observability page with the trace generated" -/> -## What's Next? - -Congratulations! You've successfully created, tested, deployed, and set up observability for your first LLM application. - -Here are some next steps to explore: - -- [Set up your evaluation workflow](/evaluation/concepts) -- [Set up observability](/observability/overview) and explore the different integrations -- [Set up custom workflows](/custom-workflows/overview) to enable product teams to run evaluations on complex applications from the UI diff --git a/docs/docs/misc/02-faq.mdx b/docs/docs/misc/02-faq.mdx index 7755a8f51e..d98b4dc8e6 100644 --- a/docs/docs/misc/02-faq.mdx +++ b/docs/docs/misc/02-faq.mdx @@ -24,7 +24,7 @@ Yes, Agenta can be used with TypeScript, though with varying levels of native su Agenta is fully OpenTelemetry compliant. You can auto-instrument your TypeScript application using Opentelemetry compatible integrations such as [OpenLLMetry](https://github.com/traceloop/openllmetry-js) which works well with TypeScript projects. - We have documentation on [setting up OpenTelemetry](/observability/trace-with-opentelemetry/distributed-tracing#opentelemetry-tracing-without-agenta-sdk) with your API key. + We have documentation on [setting up OpenTelemetry](/observability/opentelemetry#opentelemetry-tracing-without-agenta-sdk) with your API key. 3. **Evaluation** @@ -60,7 +60,8 @@ In addition it works natively with - [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service/) - [Vertex AI](https://cloud.google.com/vertex-ai) -You can add any OpenAI compatible endpoint, including self-hosted models and custom models (for instance using [Ollama](https://docs.agenta.ai/prompt-engineering/playground/custom-providers#configuring-openai-compatible-endpoints-eg-ollama)). -You can also dynamically add new models to any provider already listed in the playground, such as [OpenRouter](/prompt-engineering/playground/custom-providers#adding-models-to-a-provider-eg-openrouter), Anthropic, Gemini, Cohere, and others. +You can add any OpenAI compatible endpoint, including self-hosted models and custom models (for instance using [Ollama](https://docs.agenta.ai/prompt-engineering/playground/adding-custom-providers#configuring-openai-compatible-endpoints-eg-ollama)). +You can also dynamically add new models to any provider already listed in the playground, such as [OpenRouter](/prompt-engineering/playground/adding-custom-providers#adding-models-to-a-provider-eg-openrouter), Anthropic, Gemini, Cohere, and others. + +You can learn more about setting up different models in the [documentation](/prompt-engineering/playground/adding-custom-providers). -You can learn more about setting up different models in the [documentation](/prompt-engineering/playground/custom-providers). diff --git a/docs/docs/misc/03-getting_support.mdx b/docs/docs/misc/03-getting_support.mdx index 685915e514..c23f172e2e 100644 --- a/docs/docs/misc/03-getting_support.mdx +++ b/docs/docs/misc/03-getting_support.mdx @@ -10,7 +10,7 @@ We offer multiple channels to get support for Agenta: ### Community Support -- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) for community support: +- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ) for community support: - Use the #05_support channel for assistance (we're active during CEST hours) - Share feature ideas in the #06_feature-suggestion channel - Contribute to discussions or suggest improvements on our [Github Discussions page](https://github.com/Agenta-AI/agenta/discussions) diff --git a/docs/docs/misc/05-sidebar-updates.mdx b/docs/docs/misc/05-sidebar-updates.mdx new file mode 100644 index 0000000000..d9ac55c400 --- /dev/null +++ b/docs/docs/misc/05-sidebar-updates.mdx @@ -0,0 +1,28 @@ +--- +title: Sidebar Update Notifications +sidebar_label: Sidebar Updates +description: Learn how Agenta shows changelog updates in the sidebar and how to customize them. +--- + +Agenta can display short update notifications in the sidebar. These cards keep users informed about new functionality and link to the full changelog for details. + +Each card includes a "What's new" tag and a close icon so users can dismiss the message permanently. + +## Adding an update + +Update data lives in `web/ee/src/components/SidePanel/assets/updates.ts`. Each entry has an `id`, a `title`, a short `description` and an optional `link` pointing to the changelog. + +```ts +export const SIDEBAR_UPDATES = [ + { + id: '2025-05-15-annotations', + title: 'Annotate responses', + description: 'Capture user feedback with new annotation API.', + link: '/changelog/main#annotate-your-llm-response-preview', + }, +] +``` + +Entries should be ordered from newest to oldest. When a user closes an update card, it will not be shown again. If multiple updates are available, they are shown one after another from the most recent to the oldest. + +While an update card is visible, the sidebar hides the default **Free Plan** banner. Once all updates are dismissed, the banner returns as usual. diff --git a/docs/docs/observability/01-overview.mdx b/docs/docs/observability/01-overview.mdx deleted file mode 100644 index c8f5b34955..0000000000 --- a/docs/docs/observability/01-overview.mdx +++ /dev/null @@ -1,201 +0,0 @@ ---- -title: "Overview" -sidebar_label: "Overview" -description: "Complete guide to LLM observability with Agenta - monitor costs, performance, and trace every request with automatic instrumentation for your AI applications" -sidebar_position: 2 ---- - -```mdx-code-block -import CustomDocCard from '@site/src/components/CustomDocCard'; -import clsx from 'clsx'; -import Image from "@theme/IdealImage"; -``` - -Observability is the practice of monitoring and understanding the behavior of your LLM application. With Agenta, you can add a few lines of code to start tracking all inputs, outputs, and metadata of your application. - -This allows you to: - -- **Debug Effectively**: View exact prompts sent and contexts retrieved. For complex workflows like agents, you can trace the data flow and quickly identify root causes. -- **Bootstrap Test Sets**: Track real-world inputs and outputs and use them to bootstrap test sets in which you can continuously iterate. -- **Find Edge Cases**: Identify latency spikes and cost increases. Understand performance bottlenecks to optimize your app's speed and cost-effectiveness. -- **Track Costs and Latency Over Time**: Monitor how your app's expenses and response times change. -- **Compare App Versions**: Compare the behavior in production of different versions of your application to see which performs better. - -<Image - style={{ display: "block", margin: "10 auto" }} - img={require("/images/observability/observability-mockup.png")} - alt="Illustration of observability" - loading="lazy" -/> - -## Observability in Agenta - -Agenta's observability features are built on **OpenTelemetry (OTel)**, an open-source standard for application observability. This provides several advantages: - -- **Wide Library Support**: Use many supported libraries right out of the box. -- **Vendor Neutrality**: Send your traces to platforms like New Relic or Datadog without code changes. Switch vendors at will. -- **Proven Reliability**: Use a mature and actively maintained SDK that's trusted in the industry. -- **Ease of Integration**: If you're familiar with OTel, you already know how to instrument your app with Agenta. No new concepts or syntax to learn—Agenta uses familiar OTel concepts like traces and spans. - -## Next Steps - -<section className='row'> -<article key='1' className="col col--6 margin-bottom--lg"> - - <CustomDocCard - item={{ - type: "link", - href: "/observability/quickstart-python", - label: "Quick Start (Python)", - description: "Get started with observability using the Agenta Python SDK", - }} - noIcon={true} - /> - </article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/quick-start-opentelemetry", - label: "Quick Start (OpenTelemetry JS/TS)", - description: "Set up LLM observability with OpenTelemetry for JavaScript/TypeScript (Node.js)", - }} - noIcon={true} - /> - </article> - </section> - -### Integrations - -<section className='row'> -<article key="1" className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/openai", - label: "OpenAI", - description: - "Learn how to instrument your OpenAI application with Agenta", - }} - noIcon={true} - /> -</article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/litellm", - label: "LiteLLM", - description: "Learn how to instrument your LiteLLM application with Agenta", - }} - noIcon={true} - /> - </article> - </section> -<section className='row'> - -<article key="1" className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/langchain", - label: "LangChain", - description: - "Learn how to instrument your LangChain application with Agenta", - }} - noIcon={true} - /> -</article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/instructor", - label: "Instructor", - description: "Learn how to instrument your Instructor application with Agenta", - }} - noIcon={true} - /> - </article> - </section> -<section className='row'> - -<article key="1" className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/llamaindex", - label: "LlamaIndex", - description: "Learn how to instrument your LlamaIndex application with Agenta", - }} - noIcon={true} - /> -</article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/langgraph", - label: "LangGraph", - description: "Learn how to instrument your LangGraph application with Agenta", - }} - noIcon={true} - /> - </article> - </section> -<section className='row'> - -<article key="1" className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/openai-agents", - label: "OpenAI Agents", - description: "Learn how to instrument your OpenAI Agents application with Agenta", - }} - noIcon={true} - /> -</article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/pydanticai", - label: "PydanticAI", - description: "Learn how to instrument your PydanticAI application with Agenta", - }} - noIcon={true} - /> - </article> - </section> -<section className='row'> - -<article key="1" className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/dspy", - label: "DSPy", - description: "Learn how to instrument your DSPy application with Agenta", - }} - noIcon={true} - /> -</article> - - <article key='2' className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: "link", - href: "/observability/integrations/agno", - label: "Agno", - description: "Learn how to instrument your Agno application with Agenta", - }} - noIcon={true} - /> - </article> - </section> diff --git a/docs/docs/observability/01-quickstart.mdx b/docs/docs/observability/01-quickstart.mdx new file mode 100644 index 0000000000..1e00398f51 --- /dev/null +++ b/docs/docs/observability/01-quickstart.mdx @@ -0,0 +1,107 @@ +--- +title: Quick Start +--- + +```mdx-code-block +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import Image from "@theme/IdealImage"; + +``` + +Agenta enables you to capture all inputs, outputs, and metadata from your LLM applications, **whether they're hosted within Agenta or running in your own environment**. + +This guide will walk you through setting up observability for an OpenAI application running locally. + +:::note +If you create an application through the Agenta UI, tracing is enabled by default. No additional setup is required—simply go to the observability view to see all your requests. +::: + +## Step-by-Step Guide + +### 1. Install Required Packages + +First, install the Agenta SDK, OpenAI, and the OpenTelemetry instrumentor for OpenAI: + +```bash +pip install -U agenta openai opentelemetry-instrumentation-openai +``` + +### 2. Configure Environment Variables + +<Tabs> +<TabItem value="cloud" label="Agenta Cloud or Enterprise"> +If you're using Agenta Cloud or Enterprise Edition, you'll need an API key: + +1. Visit the [Agenta API Keys page](https://cloud.agenta.ai/settings?tab=apiKeys). +2. Click on **Create New API Key** and follow the prompts. + +```python +import os + +os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" +os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" +``` + +</TabItem> +<TabItem value="oss" label="Agenta OSS Running Locally"> + +```python +import os + +os.environ["AGENTA_HOST"] = "http://localhost" +``` + +</TabItem> +</Tabs> + +### 3. Instrument Your Application + +Below is a sample script to instrument an OpenAI application: + +```python +# highlight-start +import agenta as ag +from opentelemetry.instrumentation.openai import OpenAIInstrumentor +import openai +# highlight-end + +# highlight-start +ag.init() +# highlight-end + +# highlight-start +OpenAIInstrumentor().instrument() +# highlight-end + +response = openai.ChatCompletion.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Write a short story about AI Engineering."}, + ], +) + +print(response.choices[0].message.content) +``` + +**Explanation**: + +- **Import Libraries**: Import Agenta, OpenAI, and the OpenTelemetry instrumentor. +- **Initialize Agenta**: Call `ag.init()` to initialize the Agenta SDK. +- **Instrument OpenAI**: Use `OpenAIInstrumentor().instrument()` to enable tracing for OpenAI calls. + +### 4. View Traces in the Agenta UI + +After running your application, you can view the captured traces in Agenta: + +1. Log in to your Agenta dashboard. +2. Navigate to the **Observability** section. +3. You'll see a list of traces corresponding to your application's requests. + +<Image + style={{ display: "block", margin: "10 auto" }} + img={require("/images/observability/observability.png")} + alt="Illustration of observability" + loading="lazy" +/> diff --git a/docs/docs/observability/02-overview.mdx b/docs/docs/observability/02-overview.mdx new file mode 100644 index 0000000000..4fe0a2a962 --- /dev/null +++ b/docs/docs/observability/02-overview.mdx @@ -0,0 +1,124 @@ +--- +title: Overview +description: Learn how to instrument your application with Agenta for enhanced observability. This guide covers the benefits of observability, how Agenta helps, and how to get started. +--- + +```mdx-code-block +import DocCard from '@theme/DocCard'; +import clsx from 'clsx'; +import Image from "@theme/IdealImage"; + +``` + +## Why Observability? + +Observability is the practice of monitoring and understanding the behavior of your LLM application. With Agenta, you can add a few lines of code to start tracking all inputs, outputs, and metadata of your application. +This allows you to: + +- **Debug Effectively**: View exact prompts sent and contexts retrieved. For complex workflows like agents, you can trace the data flow and quickly identify root causes. +- **Bootstrap Test Sets**: Track real-world inputs and outputs and use them to bootstrap test sets in which you can continuously iterate. +- **Find Edge Cases**: Identify latency spikes and cost increases. Understand performance bottlenecks to optimize your app's speed and cost-effectiveness. +- **Track Costs and Latency Over Time**: Monitor how your app's expenses and response times change. +- **Compare App Versions**: Compare the behavior in productions of different versions of your application to see which performs better. + +<Image + style={{ display: "block", margin: "10 auto" }} + img={require("/images/observability/observability.png")} + alt="Illustration of observability" + loading="lazy" +/> + +## Observability in Agenta + +Agenta's observability features are built on **OpenTelemetry (OTel)**, an open-source standard for application observability. This provides several advantages: + +- **Wide Library Support**: Use many supported libraries right out of the box. +- **Vendor Neutrality**: Send your traces to platforms like New Relic or Datadog without code changes. Switch vendors at will. +- **Proven Reliability**: Use a mature and actively maintained SDK that's trusted in the industry. +- **Ease of Integration**: If you're familiar with OTel, you already know how to instrument your app with Agenta. No new concepts or syntax to learn—Agenta uses familiar OTel concepts like traces and spans. + +## Key Concepts + +**Traces**: A trace represents the complete journey of a request through your application. In our context, a trace corresponds to a single request to your LLM application. + +**Spans**: A span is a unit of work within a trace. Spans can be nested, forming a tree-like structure. The root span represents the overall operation, while child spans represent sub-operations. Agenta enriches each span with cost information and metadata when you make LLM calls. + +## Next Steps + +<section className='row'> +<article key='1' className="col col--6 margin-bottom--lg"> + + <DocCard + item={{ + type: "link", + href: "/observability/quickstart", + label: "Quick Start", + description: "Get started with observability in Agenta", + }} + /> + </article> + + <article key='2' className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/observability/observability-sdk", + label: "Observability SDK", + description: "Learn how to use the Agenta observability SDK", + }} + /> + </article> + </section> + +### Integrations + +<section className='row'> + +<article key="1" className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/observability/integrations/openai", + label: "OpenAI", + description: + "Learn how to instrument your OpenAI application with Agenta", + }} + /> +</article> + + <article key='2' className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/evaluation/sdk-evaluation", + label: "LiteLLM", + description: "Learn how to instrument your LiteLLM application with Agenta", + }} + /> + </article> + </section> +<section className='row'> + +<article key="1" className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/observability/integrations/langchain", + label: "LangChain", + description: + "Learn how to instrument your LangChain application with Agenta", + }} + /> +</article> + + <article key='2' className="col col--6 margin-bottom--lg"> + <DocCard + item={{ + type: "link", + href: "/observability/integrations/instructor", + label: "Instructor", + description: "Learn how to instrument your Instructor application with Agenta", + }} + /> + </article> + </section> diff --git a/docs/docs/observability/02-quickstart-python.mdx b/docs/docs/observability/02-quickstart-python.mdx deleted file mode 100644 index e947ed683a..0000000000 --- a/docs/docs/observability/02-quickstart-python.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Quick Start Guide - Python LLM Observability -sidebar_label: Quick Start (Python) -description: Implement LLM observability in Python with Agenta SDK. Learn to set up distributed tracing, monitor requests, and debug your applications step-by-step. -sidebar_position: 2 ---- - -```mdx-code-block -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; - -``` - -Agenta captures all inputs, outputs, and metadata from your LLM applications. You can use it whether your applications run inside Agenta or in your own environment. - -This guide shows you how to set up observability for an OpenAI application running locally. - - -<GoogleColabButton notebookPath="examples/jupyter/observability/quickstart.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Step-by-Step Guide - -### 1. Install Required Packages - -Install the Agenta SDK, OpenAI, and the OpenTelemetry instrumentor for OpenAI: - -```bash -pip install -U agenta openai opentelemetry-instrumentation-openai -``` - -### 2. Configure Environment Variables - -You need an API key to start tracing your application. Visit the Agenta API Keys page under settings. Click on Create New API Key and follow the prompts. - -```python -import os - -os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Change for self-hosted -``` - -### 3. Instrument Your Application - -Here is a sample script that instruments an OpenAI application: - -```python -# highlight-start -import agenta as ag -from opentelemetry.instrumentation.openai import OpenAIInstrumentor -import openai -# highlight-end - -# highlight-start -ag.init() -# highlight-end - -# highlight-start -OpenAIInstrumentor().instrument() -# highlight-end - -# highlight-start -@ag.instrument() -# highlight-end -def generate(): - response = openai.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Write a short story about AI Engineering."}, - ], - ) - return response.choices[0].message.content - -if __name__ == "__main__": - print(generate()) -``` - -The script uses two mechanisms to trace your application. - -First, `OpenAIInstrumentor().instrument()` automatically traces all OpenAI calls. It monkey patches the OpenAI library to capture each request. - -Second, the `@ag.instrument()` decorator traces the decorated function. It creates a span for the function and records its inputs and outputs. - -### 4. View Traces in the Agenta UI - -After you run your application, you can view the captured traces in Agenta. Log in to your Agenta dashboard and navigate to the Observability section. You will see a list of traces that correspond to your application's requests. - -<Image - style={{ display: "block", margin: "10 auto" }} - img={require("/images/observability/observability_quickstart.png")} - alt="Illustration of observability" - loading="lazy" -/> diff --git a/docs/docs/observability/03-observability-sdk.mdx b/docs/docs/observability/03-observability-sdk.mdx new file mode 100644 index 0000000000..cfeb563a79 --- /dev/null +++ b/docs/docs/observability/03-observability-sdk.mdx @@ -0,0 +1,279 @@ +--- +title: Observability SDK +--- + +```mdx-code-block +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import Image from "@theme/IdealImage"; + +``` + +This guide shows you how to use the Agenta observability SDK to instrument workflows in your application. + +If you're exclusively using a framework like [LangChain](/observability/integrations/langchain), you can use the auto-instrumentation packages to automatically instrument your application. + +However, if you need more flexibility, you can use the SDK to: + +- Instrument custom functions in your workflow +- Add additional **metadata** to the spans +- Link traces to **applications**, **variants**, and **environments** in Agenta + +## Setup + +**1. Install the Agenta SDK** + +```bash +pip install -U agenta +``` + +**2. Set environment variables** + +<Tabs> +<TabItem value="cloud" label="Agenta Cloud or Enterprise"> + +1. Visit the [Agenta API Keys page](https://cloud.agenta.ai/settings?tab=apiKeys). +2. Click on **Create New API Key** and follow the prompts. + +```python +import os + +os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" +os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" +``` + +</TabItem> +<TabItem value="oss" label="Agenta OSS Running Locally"> + +```python +import os + +os.environ["AGENTA_HOST"] = "http://localhost" +``` + +</TabItem> +</Tabs> + +## Instrumenting functions with the decorator + +To instrument a function, add the `@ag.instrument()` decorator. This automatically captures all input and output data. + +The decorator has a `spankind` argument to categorize each span in the UI. Available types are: + +`agent`, `chain`, `workflow`, `tool`, `embedding`, `query`, `completion`, `chat`, `rerank` + +:::caution +The instrument decorator should be the top-most decorator on a function (i.e. the last decorator before the function call). +::: + +```python +@ag.instrument(spankind="task") +def myllmcall(country:str): + prompt = f"What is the capital of {country}" + response = client.chat.completions.create( + model='gpt-4', + messages=[ + {'role': 'user', 'content': prompt}, + ], + ) + return response.choices[0].text + +@ag.instrument(spankind="workflow") +def generate(country:str): + return myllmcall(country) + +``` + +Agenta automatically determines the parent span based on the function call and nests the spans accordingly. + +## Modify a span's metadata + +You can add additional information to a span's metadata using `ag.tracing.store_meta()`. This function accesses the active span from the context and adds the key-value pairs to the metadata. + +```python +@ag.instrument(spankind="task") +def compile_prompt(country:str): + prompt = f"What is the capital of {country}" + + # highlight-next-line + ag.tracing.store_meta({"prompt_template": prompt}) + + formatted_prompt = prompt.format(country=country) + return formatted_prompt + +``` + +Metadata is displayed in the span's raw data view. + +## Linking spans to applications, variants, and environments + +You can link a span to an application, variant, and environment by calling `ag.tracing.store_refs()`. + +Applications, variants, and environments can be referenced by their slugs, versions, and commit IDs (for specific versions). +You can link a span to an application and variant like this: + +```python + +@ag.instrument(spankind="workflow") +def generate(country:str): + prompt = f"What is the capital of {country}" + + + formatted_prompt = prompt.format(country=country) + + completion = client.chat.completions.create( + model='gpt-4', + messages=[ + {'role': 'user', 'content': formatted_prompt}, + ], + ) + + # highlight-start + ag.tracing.store_refs( + { + "application.slug": "capital-app", + "environment.slug": "production", + } + ) + # highlight-end + return completion.choices[0].message.content + +``` + +`ag.tracing.store_refs()` takes a dict with keys from `application.slug`, `application.id`, `application.version`, `variant.slug`, `variant.id`, `variant.version`, `environment.slug`, `environment.id` and `environment.commit_id`, with the values being the slug, id, version or commit id of the application, variant, and environment respectively. + +## Storing Internals + +Internals are additional data stored in the span. Compared to metadata, internals have the following differences: + +- Internals are saved within the span data and are searchable with plain text queries. +- Internals are shown by default in the span view in a collapsible section, while metadata is only shown as part of the JSON file with the raw data (i.e. better visibility with internals). +- **Internals can be used for evaluation**. For instance, you can save the retrieved context in the internals and then use it to evaluate the factuality of the response. + +As a rule of thumb, use metadata for additional information that is not used for evaluation and not elementary to understand the span, otherwise use internals. + +Internals can be stored similarly to metadata: + +```python +@ag.instrument(spankind="workflow") +def rag_workflow(query:str): + + context = retrieve_context(query) + + # highlight-start + ag.tracing.store_internals({"context": context}) + # highlight-end + + prompt = f"Answer the following question {query} based on the context: {context}" + + completion = client.chat.completions.create( + model='gpt-4', + messages=[ + {'role': 'user', 'content': formatted_prompt}, + ], + ) + return completion.choices[0].message.content + +``` + +## Redacting sensitive data: how to exclude data from capture + +In some cases, you may want to exclude parts of the inputs or outputs due to privacy concerns or because the data is too large to be stored in the span. + +You can do this by setting the `ignore_inputs` and/or `ignore_outputs` arguments to `True` in the instrument decorator. + +```python +@ag.instrument( + spankind="workflow", + ignore_inputs=True, + ignore_outputs=True +) +def rag_workflow(query:str): + ... +``` + +If you want more control, you can specify which parts of the inputs and outputs to exclude: + +```python +@ag.instrument( + spankind="workflow", + ignore_inputs=["user_id"], + ignore_outputs=["pii"], +) +def rag_workflow(query:str, user_id:str): + ... + return { + "result": ..., + "pii": ... + } +``` + +For even finer control, you can use a custom `redact()` callback, along with instructions in the case of errors. + +```python +def my_redact(name, field, data): + if name == "rag_workflow": + if field == "inputs": + del data["user_id"] + if field == "outputs": + del data["pii"] + + return data + + +@ag.instrument( + spankind="workflow", + redact=my_redact, + redact_on_error=False, +) +def rag_workflow(query:str, user_id:str): + ... + return { + "result": ..., + "pii": ... + } +``` + +Finally, if you want to set up global rules for redaction, you can provide a global `redact()` callback that applies everywhere. + +```python +def global_redact( + name:str, + field:str, + data: Dict[str, Any] +): + if "pii" in data: + del data["pii"] + + return data + + +ag.init( + redact=global_redact, + redact_on_error=True, +) + +def local_redact( + name:str, + field:str, + data: Dict[str, Any] +): + if name == "rag_workflow": + if field == "inputs": + del data["user_id"] + + return data + + +@ag.instrument( + spankind="workflow", + redact=local_redact, + redact_on_error=False, +) +def rag_workflow(query:str, user_id:str): + ... + return { + "result": ..., + "pii": ... + } +``` diff --git a/docs/docs/observability/03-quick-start-opentelemetry.mdx b/docs/docs/observability/03-quick-start-opentelemetry.mdx deleted file mode 100644 index 3b91f1f7a1..0000000000 --- a/docs/docs/observability/03-quick-start-opentelemetry.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: "Quick Start: OpenTelemetry for JavaScript/TypeScript (Node.js)" -sidebar_label: "Quick Start (OpenTelemetry JS/TS)" -description: "Set up LLM observability with OpenTelemetry in JavaScript, TypeScript, and Node.js. Learn how to instrument LLM apps, enable tracing and distributed tracing, and send telemetry to Agenta." -sidebar_position: 3 ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GitHubExampleButton from "@site/src/components/GitHubExampleButton"; -``` - -Agenta captures all inputs, outputs, and metadata from your LLM applications using OpenTelemetry. This guide shows you how to instrument a Node.js application with OpenTelemetry and send traces to Agenta. - -<GitHubExampleButton examplePath="examples/node/observability-opentelemetry"> - View Complete Example on GitHub -</GitHubExampleButton> - -## Step-by-Step Guide - -### 1. Install Required Packages - -Install OpenTelemetry packages, OpenAI, and the OpenInference instrumentation for OpenAI: - -```bash -npm install @opentelemetry/api \ - @opentelemetry/sdk-trace-node \ - @opentelemetry/exporter-trace-otlp-proto \ - @opentelemetry/instrumentation \ - @opentelemetry/resources \ - @opentelemetry/semantic-conventions \ - @arizeai/openinference-instrumentation-openai \ - @arizeai/openinference-semantic-conventions \ - openai -``` - - -### 2. Configure Environment Variables - -You need an API key to start tracing your application. Visit the Agenta API Keys page under settings and create a new API key. - -```bash -export AGENTA_API_KEY="YOUR_AGENTA_API_KEY" -export AGENTA_HOST="https://cloud.agenta.ai" # Change for self-hosted -export OPENAI_API_KEY="YOUR_OPENAI_API_KEY" -``` - -### 3. Set Up Instrumentation - -Create an `instrumentation.js` file to configure OpenTelemetry: - -```javascript -// instrumentation.js -// highlight-start -import { registerInstrumentations } from "@opentelemetry/instrumentation"; -import { OpenAIInstrumentation } from "@arizeai/openinference-instrumentation-openai"; -import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto"; -import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; -import { Resource } from "@opentelemetry/resources"; -import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base"; -import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; -import OpenAI from "openai"; -// highlight-end - -// highlight-start -// Configure the OTLP exporter to send traces to Agenta -const otlpExporter = new OTLPTraceExporter({ - url: `${process.env.AGENTA_HOST}/api/otlp/v1/traces`, - headers: { - Authorization: `ApiKey ${process.env.AGENTA_API_KEY}`, - }, -}); -// highlight-end - -// highlight-start -// Create and configure the tracer provider -const tracerProvider = new NodeTracerProvider({ - resource: new Resource({ - [ATTR_SERVICE_NAME]: "openai-quickstart", - }), -}); - -// Use SimpleSpanProcessor for immediate export (better for short scripts) -// For long-running services, use BatchSpanProcessor for better performance -tracerProvider.addSpanProcessor(new SimpleSpanProcessor(otlpExporter)); -tracerProvider.register(); -// highlight-end - -// highlight-start -// Register OpenAI instrumentation -const instrumentation = new OpenAIInstrumentation(); -instrumentation.manuallyInstrument(OpenAI); - -registerInstrumentations({ - instrumentations: [instrumentation], -}); -// highlight-end - -console.log("👀 OpenTelemetry instrumentation initialized"); -``` - -### 4. Instrument Your Application - -Create your application file `app.js`: - -```javascript -// app.js -// highlight-start -import OpenAI from "openai"; -import { trace } from "@opentelemetry/api"; -// highlight-end - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, -}); - -// highlight-start -const tracer = trace.getTracer("my-app", "1.0.0"); -// highlight-end - -async function generate() { - // highlight-start - // Create a span using Agenta's semantic conventions - return tracer.startActiveSpan("generate", async (span) => { - try { - // Set span type - span.setAttribute("ag.type.node", "workflow"); - - const messages = [ - { role: "system", content: "You are a helpful assistant." }, - { role: "user", content: "Write a short story about AI Engineering." }, - ]; - - // Set inputs - span.setAttribute("ag.data.inputs", JSON.stringify({ - messages: messages, - model: "gpt-3.5-turbo" - })); - // highlight-end - - const response = await openai.chat.completions.create({ - model: "gpt-3.5-turbo", - messages: messages, - }); - - const content = response.choices[0].message.content; - - // highlight-start - // Set outputs - span.setAttribute("ag.data.outputs", JSON.stringify({ - content: content - })); - - return content; - } finally { - span.end(); - } - }); - // highlight-end -} - -async function main() { - const result = await generate(); - console.log(result); - - // Flush traces before exit - await trace.getTracerProvider().forceFlush(); -} - -main(); -``` - -### 5. Run Your Application - -Run your application with the instrumentation loaded first: - -```bash -node --import ./instrumentation.js app.js -``` - -Or add it to your `package.json`: - -```json -{ - "type": "module", - "scripts": { - "start": "node --import ./instrumentation.js app.js" - } -} -``` - -Then run: - -```bash -npm start -``` - -## How It Works - -The instrumentation uses two mechanisms to trace your application: - -1. **Auto-instrumentation**: `OpenAIInstrumentation` automatically captures all OpenAI API calls, including prompts, completions, tokens, and costs. - -2. **Manual spans**: You can create custom spans using `tracer.startActiveSpan()` to track your own functions and add metadata using [Agenta's semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions). - -:::tip Span Processors -This guide uses `SimpleSpanProcessor` which sends spans immediately. This is ideal for: -- Short-lived scripts and CLI tools -- Development and debugging -- Ensuring traces are captured before process exit - -For long-running services (web servers, background workers), use `BatchSpanProcessor` for better performance by batching multiple spans before sending. -::: - -### Agenta Semantic Conventions - -The example uses Agenta's semantic conventions for proper trace display: - -- **`ag.type.node`** - Defines the operation type (workflow, task, tool, etc.) -- **`ag.data.inputs`** - Stores input parameters as JSON -- **`ag.data.outputs`** - Stores output results as JSON -- **`ag.data.internals`** - Stores intermediate values and metadata (optional) - -## View Traces in the Agenta UI - -After running your application, log in to your Agenta dashboard and navigate to the Observability section. You will see traces showing: - -- Complete execution timeline -- Input messages and parameters -- Output content -- Token usage and costs -- Latency metrics - -<Image - style={{ display: "block", margin: "10 auto" }} - img={require("/images/observability/observability_quickstart.png")} - alt="OpenTelemetry traces in Agenta" - loading="lazy" -/> - -## Next Steps - -- Learn about [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) for better trace formatting -- Explore [distributed tracing](/observability/trace-with-opentelemetry/distributed-tracing) across services -- See [integration examples](/observability/integrations/openai) for other frameworks diff --git a/docs/docs/observability/04-concepts.mdx b/docs/docs/observability/04-concepts.mdx deleted file mode 100644 index 8a226e0935..0000000000 --- a/docs/docs/observability/04-concepts.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: "Concepts of LLM Observability in Agenta" -sidebar_label: "Concepts" -description: "Understand key observability concepts in Agenta including traces, spans, and how OpenTelemetry powers our observability features" -sidebar_position: 3 ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -## Tracing in Agenta - -Agenta uses OpenTelemetry to track what happens in your LLM applications. OpenTelemetry is a free, open-source tool that makes monitoring applications easy. You write the monitoring code once, and it works with any observability platform. Read more about OpenTelemetry in [this guide we wrote for AI engineers](https://agenta.ai/blog/the-ai-engineer-s-guide-to-llm-observability-with-opentelemetry). - -<details> - <summary>⏯️ Watch a video about OpenTelemetry and tracing in Agenta.</summary> - - <iframe - width="100%" - height="400" - src="https://www.youtube.com/embed/crEyMDJ4Bp0" - title="OpenTelemetry and Tracing in Agenta" - frameBorder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowFullScreen - ></iframe> -</details> - -## Getting Started: Basic Concepts - -### Traces - -A trace represents the complete journey of a request through your application. In our context, a trace corresponds to a single request to your LLM application. - -For example, when a user asks your chatbot a question, that entire interaction is captured as one trace. The trace includes receiving the query, processing it, and returning the response. - -### Spans - -A span is a unit of work within a trace. Spans can be nested, forming a tree-like structure. - -The **root span** represents the overall operation (like "handle user query"). **Child spans** represent sub-operations (like "retrieve context", "call LLM", or "format response"). - -Agenta enriches each span with cost information for LLM calls, latency measurements, input/output data, and custom metadata you add. - -### Span Kinds - -Agenta categorizes spans using span kinds. These help you understand different types of operations in your LLM workflow. - -Available span kinds: -- `agent` for autonomous agent operations -- `chain` for sequential operations -- `workflow` for complex multi-step processes -- `tool` for tool or function calls -- `embedding` for vector embedding generation -- `query` for database or search queries -- `completion` for LLM completions -- `chat` for chat-based LLM interactions -- `rerank` for re-ranking operations - -### Events - -Spans can contain events. These are timestamped records of things that happen during span execution. Agenta automatically logs exceptions as events, which helps you debug errors in your traces. - -## Working with OpenTelemetry - -### Direct OpenTelemetry Integration - -You can instrument your application using standard OpenTelemetry SDKs. Agenta accepts any OpenTelemetry span that follows the specification. For Agenta-specific features (like cost tracking and formatted messages), use attributes in our semantic conventions. See the [semantic conventions guide](/observability/trace-with-opentelemetry/semantic-conventions) for details. - -### Auto-Instrumentation Compatibility - -Agenta works with auto-instrumentation from popular libraries, even if they are not listed in our integrations. We support semantic conventions from [OpenInference](https://github.com/Arize-ai/openinference), [OpenLLMetry](https://github.com/traceloop/openllmetry), and [PydanticAI](/observability/integrations/pydanticai). - -When these libraries send spans to Agenta, we automatically translate their conventions to our format. No extra configuration is needed. This means that if you have any package that auto-instruments using these conventions, it will work with Agenta. - -## Understanding Span Types - -Agenta distinguishes between two types of spans. This separation helps you analyze application behavior independently from evaluation results. - -### Invocation Spans - -Invocation spans capture your application's actual work. They record what your LLM application does when it executes. - -Examples include LLM calls and completions, retrieval operations, tool executions, and agent reasoning steps. - -### Annotation Spans - -Annotation spans capture evaluations and feedback about invocations. They include automatic evaluations (like LLM-as-a-judge or custom metrics), human feedback and ratings, and evaluation results from test runs. - -When you evaluate a span or add feedback, Agenta creates an annotation span. The annotation span links to the original invocation span (explained in the Links section below). This keeps application traces clean while still capturing evaluation data. - -## Organizing and Filtering Traces - -### Attributes: Adding Metadata - -Attributes add information to spans. They are key-value pairs attached to each span. Agenta treats certain attributes specially for better UI experience. - -**Special attributes** use the `ag.` namespace. Cost and tokens get displayed prominently with user-friendly filtering. Model and system information appears in span details. Data attributes (inputs and outputs) are formatted based on span kind. - -**Custom attributes** can be any key-value pair you add. They are searchable and filterable, but they do not get special UI treatment. - -See all available attributes in our [semantic conventions guide](/observability/trace-with-opentelemetry/semantic-conventions). - -### References: Linking to Agenta Entities - -References connect spans to entities you have created in Agenta. They use a structured format and enable powerful organization. - -You can reference applications and their variants, environments (production, staging, development), test sets and test cases, and evaluators. - -Common use cases include filtering traces by application (like "show all traces from my chatbot-v2 variant"), comparing performance, and tracking prompt versions. - -Each reference can point to a specific variant and version. This gives you precise control over trace organization. References are especially useful for teams managing multiple applications and configurations. - -Learn more about using references in the [reference prompt versions guide](/observability/trace-with-python-sdk/reference-prompt-versions). - -### Links: Connecting Related Spans - -Links connect spans across different traces. Agenta uses them to connect annotations to invocations. - -When you evaluate a span, we cannot modify it because spans are immutable in OpenTelemetry. Instead, we create a new annotation span and link it to the original invocation span. This preserves the original trace while connecting evaluation results to the spans they evaluate. - -Links enable several features. You can view all evaluations for a specific application run. You can see feedback attached to the relevant invocation. You can filter traces by evaluation results. - -Links happen automatically when you use Agenta's evaluation features. - -## Applications, Variants, and Environments - -Agenta organizes your observability data around three key concepts: - -**Applications** are top-level containers for your LLM applications. An application could be a chatbot, a summarization tool, or any other LLM-powered feature. - -**Variants** are different versions or configurations of your application. You might have a "gpt-4-turbo" variant and a "claude-opus" variant. Or you might have variants for different prompts or parameters. - -**Environments** are deployment stages. Common environments include development, staging, and production. - -This organization helps you compare performance across different configurations and track behavior in different environments. - -## How Agenta Enhances OpenTelemetry - -Agenta uses standard OpenTelemetry for tracing. We add LLM-specific enhancements on top of it. - -### Automatic Cost Tracking and Token Counting - -We calculate costs for LLM calls based on model pricing. We track token usage (prompt tokens, completion tokens, and total) for each interaction. These metrics appear prominently in the UI and support user-friendly filtering. - -### Prompt Versioning Integration - -You can link traces to specific prompt versions in your registry. This helps you understand which prompt configuration generated each trace. - -### Test Set Integration - -You can convert production traces into test cases with one click. This makes it easy to build test sets from real user interactions. - -### LLM-Aware UI - -The Agenta UI understands LLM-specific data. Chat messages are formatted nicely. You can filter by cost, tokens, model, and other LLM-specific attributes. The UI shows parent-child relationships in your agent workflows clearly. - -## Next Steps - -- [Get started with Python SDK](/observability/quickstart-python) -- [Learn about tracing with OpenTelemetry](/observability/trace-with-opentelemetry/getting-started) -- [Explore integrations](/observability/integrations/openai) for popular LLM frameworks diff --git a/docs/docs/observability/04-opentelemetry.mdx b/docs/docs/observability/04-opentelemetry.mdx new file mode 100644 index 0000000000..8fc4f076d1 --- /dev/null +++ b/docs/docs/observability/04-opentelemetry.mdx @@ -0,0 +1,192 @@ +--- +title: Distributed Tracing with OpenTelemetry +sidebar_label: Distributed Tracing in Otel +description: "Learn how to use OpenTelemetry to instrument your LLM application with Agenta for enhanced observability." +--- + +Agenta provides built-in OpenTelemetry instrumentation to simplify distributed tracing in your applications. This guide explains how to implement and manage distributed tracing using the Agenta SDK, and how to integrate external tracing setups with Agenta. + +## Using OpenTelemetry with Agenta +Agenta supports distributed tracing out of the box when using the provided SDK functions: + +### 1. Sending Requests (Propagation) + +When making requests to other services or sub-systems, use `agenta.tracing.inject()` to inject necessary headers: + +```python +method = "POST" +url = "https://example-service/api" +params = {} +headers = agenta.tracing.inject() # automatically injects 'Authorization', 'Traceparent', 'Baggage' +body = {"key": "value"} + +response = requests.request( + method=method, + url=url, + params=params, + headers=headers, + json=body, +) +``` +The `agenta.tracing.inject()` function returns headers containing: + +- `Authorization`: Authentication information +- `Traceparent`: Identifies the current trace and span +- `Baggage`: Contains application-specific context + +These headers can be modified before sending them as part of the request if needed. + +### 2. Receiving Requests (Extraction) + +Agenta simplifies receiving and handling incoming trace contexts: + +- If you're using `ag.route()` and `ag.instrument()`, extraction is automatic. +- For manual extraction, use `agenta.tracing.extract()`: + +```python +traceparent, baggage = agenta.tracing.extract() # includes 'Traceparent', 'Baggage' + +# Use traceparent and baggage to set up your OpenTelemetry context +# (Implementation depends on your specific use case) +``` + +:::note +`extract()` does not provide `Authorization` because there are many authentication methods (apikey, bearer, secret, access tokens), each requiring different handling. The middlewares and decorators in the Agenta SDK handle this automatically when you use `ag.route()` and `ag.instrument()`. +::: + +## OpenTelemetry Tracing without Agenta SDK +If you're working with systems that don't use the Agenta SDK, you can still integrate with Agenta's tracing infrastructure using standard OpenTelemetry. + +### 1. Setup Requirements +Install dependencies: +```bash +pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp +``` + +### 2. Configure Environment Variables + +```bash +# OTEL_PROPAGATORS = unset or "tracecontext,baggage" +# OTEL_EXPORTER_OTLP_COMPRESSION = unset or "gzip" +# OTEL_EXPORTER_OTLP_ENDPOINT = "https://cloud.agenta.ai/api/otlp" +# OTEL_EXPORTER_OTLP_HEADERS = "authorization=ApiKey xxx" +# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = "https://cloud.agenta.ai/api/otlp/v1/traces" +# OTEL_EXPORTER_OTLP_TRACES_HEADERS = "authorization=ApiKey xxx" +``` + +### 3. Setup in Code +```python +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.baggage.propagation import W3CBaggagePropagator +from opentelemetry.sdk.trace import TracerProvider, Span +from opentelemetry.sdk.trace.export import BatchSpanProcessor +from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter, Compression + +# Configuration +endpoint = "https://cloud.agenta.ai/api/otlp/v1/traces" +compression = Compression.Gzip +headers = { + "traceparent": "00-xxx-xxx-01", + "baggage": "ag.refs.application.id=xxx", + "authorization": "ApiKey xxx", +} + +# Set up provider, processor, and tracer +provider = TracerProvider() + +processor = BatchSpanProcessor( + OTLPSpanExporter( + endpoint=endpoint, + headers={"authorization": headers["authorization"]}, + compression=compression, + ) +) + +provider.add_span_processor(processor) + +tracer = provider.get_tracer("agenta.tracer") + +# Extract incoming trace context +carrier = {"traceparent": headers["traceparent"]} +context = TraceContextTextMapPropagator().extract(carrier=carrier, context=None) + +carrier = {"baggage": headers["baggage"]} +context = W3CBaggagePropagator().extract(carrier=carrier, context=context) + +# Create and use spans +with tracer.start_as_current_span(name="agenta", context=context) as span: + span: Span + + print(hex(span.get_span_context().trace_id)) + print(hex(span.get_span_context().span_id)) + print(span.name) +``` + +## Using an OTEL Collector + +If you're using an OpenTelemetry collector, you can configure it to export traces to Agenta. +Here's a sample configuration (`otel-collector-config.yml`): + +```yaml +receivers: + otlp: + protocols: + http: + endpoint: 0.0.0.0:4318 + +processors: + batch: {} + +exporters: + otlphttp/agenta: + endpoint: "https://cloud.agenta.ai/api/otlp" + +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp/agenta] +``` + +With this configuration: + +- The collector receives traces via OTLP/HTTP on port 4318 +- It batches the spans for efficiency +- It exports them to Agenta's OTLP endpoint + +## Span Attributes + +When using OpenTelemetry without the Agenta SDK, you need to manually set the appropriate attributes on your spans to integrate properly with Agenta's ecosystem. + +### Namespace Convention + +Agenta uses the `ag.*` namespace for its attributes. Here are the key namespaces: + +- `ag.refs.*`: References to Agenta entities (applications, etc.) +- `ag.data.*`: Input, internal, and output data +- `ag.metrics.*`: Performance metrics and costs + +### Examples + +```python +# Reference to Agenta application +span.set_attribute("ag.refs.application.id", AGENTA_APPLICATION_ID) + +# Data attributes +span.set_attribute("ag.data.inputs.key", "Hello,") +span.set_attribute("ag.data.internals.key", "(Leo)") +span.set_attribute("ag.data.outputs.key", "World!") + +# Metrics - unit values +span.set_attribute("ag.metrics.unit.some_key", 3) +span.set_attribute("ag.metrics.acc.some_key", 15) + +# Cost and token metrics +span.set_attribute("ag.metrics.unit.costs.total", 1) +span.set_attribute("ag.metrics.unit.tokens.total", 100) +``` + +:::info +Apart from these custom attributes, standard OpenTelemetry events, links, status, and exceptions work as usual. +::: \ No newline at end of file diff --git a/docs/docs/observability/09-troubleshooting.mdx b/docs/docs/observability/09-troubleshooting.mdx deleted file mode 100644 index 1894bf298d..0000000000 --- a/docs/docs/observability/09-troubleshooting.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "Troubleshooting" -sidebar_label: "Troubleshooting" -description: "Common issues and solutions for Agenta observability with Python SDK and OpenTelemetry" -sidebar_position: 9 ---- - -## Common Issues - -This page covers common issues you might encounter when using Agenta observability with either the Python SDK or OpenTelemetry. - -## Invalid Content Format - -You may receive a 500 error with the message "Failed to parse OTLP stream." This happens when you send trace data in JSON format instead of Protobuf. - -Agenta's OTLP endpoints accept only the Protobuf format (binary encoding). The server cannot parse JSON payloads. When you configure your OpenTelemetry exporter to use JSON encoding, the request will fail. - -### Solution - -Configure your OpenTelemetry exporter to use Protobuf encoding. Most OpenTelemetry exporters use Protobuf by default, so you typically don't need to specify it explicitly. - -For the Python SDK, import `OTLPSpanExporter` from the proto package (not the json package). The exporter class name should include "proto" in its import path. - -For the OpenTelemetry Collector, verify that the encoding field is set to `proto` or omit it entirely (since proto is the default). - -For JavaScript and Node.js, use `@opentelemetry/exporter-trace-otlp-proto` instead of the JSON variant. Avoid any exporter package with "json" in its name. - -Do not set `encoding: json` in your configuration files. Agenta does not support JSON-encoded OTLP payloads. - -## Payload Too Large - -Your collector may receive a 413 response when posting to `/otlp/v1/traces`. This means the batch size exceeds the limit. Agenta accepts batches up to 5 MB by default. - -Reduce the batch size in your collector configuration. You can also enable compression (such as gzip) to keep requests under the limit. - -## Missing Traces in Serverless Functions - -Some traces may not appear in the Agenta dashboard when you run observability in serverless environments. This includes AWS Lambda, Vercel Functions, Cloudflare Workers, and Google Cloud Functions. - -OpenTelemetry batches spans in background processes before exporting them. This improves efficiency. However, serverless functions terminate abruptly. They often stop before the background processes finish sending trace data to Agenta. The spans get buffered but never exported. - -### Solution - -Call the `force_flush()` method before your function terminates. This ensures all spans export before the function exits. Import `get_tracer_provider` from `opentelemetry.trace` and call `force_flush()` on it. Place this call in a finally block so it runs even if errors occur. - -## Traces Not Appearing in UI - -First, verify that your `AGENTA_API_KEY` is set correctly and has the necessary permissions. - -Next, check your endpoint configuration. Point to the correct Agenta host. For cloud deployments, use `https://cloud.agenta.ai`. For self-hosted instances, use your instance URL (such as `http://localhost`). - -Finally, confirm that you call `ag.init()` before any instrumented functions execute. - -## Authentication Errors - -You may receive 401 Unauthorized errors when sending traces. This happens for three main reasons. - -First, verify that your API key is correct. Check for typos or missing characters. - -Second, confirm that the key has not expired. Some API keys have expiration dates. - -Third, ensure you use the correct format. The authorization header should follow this pattern: `ApiKey YOUR_KEY_HERE`. - -## Performance Issues - -### High memory usage - -You can reduce memory usage in three ways. Enable gzip compression for OTLP exports to reduce the size of data in memory. Lower the number of spans sent per batch. Implement sampling to avoid sending 100% of traces in high-volume scenarios. - -### High latency - -Instrumentation should not add significant latency. If it does, check three things. Ensure spans export in the background using async export. Tune your batch size and export intervals to find the right balance. Review custom instrumentation to verify that custom spans are not performing expensive operations. - -## OpenTelemetry-Specific Issues - -### Context propagation not working - -Distributed tracing may fail to work across services. Check three things to fix this. Verify that propagators are configured correctly (set `OTEL_PROPAGATORS=tracecontext,baggage`). Confirm that headers pass between services. Ensure all services use compatible OpenTelemetry versions. - -### Spans not nesting correctly - -Spans may appear flat instead of nested in the trace view. This indicates a context problem. Verify that context passes correctly between functions. Check that you use `start_as_current_span` with proper context. Make parent-child relationships explicit in your code. - -## Python SDK-Specific Issues - -### Decorator not capturing data - -The `@ag.instrument()` decorator may fail to capture inputs and outputs. This happens for three reasons. The decorator must be the top-most decorator on your function. You must call `ag.init()` before the function runs. The function must return a value (printing alone is not enough). - -### Metadata not appearing - -Data from `ag.tracing.store_meta()` may not show in the UI. Call this method only within an instrumented function. Check that the span context is active when you call it. Verify that your data format is JSON-serializable. - -## Need More Help? - -Check the [Agenta documentation](/observability/concepts) for more details about observability concepts. Review our [integration guides](/observability/integrations/openai) for framework-specific help. Visit our [GitHub issues](https://github.com/anthropics/agenta/issues) to report bugs. Join our community for support. - -## Next steps - -Review the [setup instructions](/observability/trace-with-python-sdk/setup-tracing) to ensure correct configuration. Explore [distributed tracing](/observability/trace-with-opentelemetry/distributed-tracing) to understand how traces work across services. Check the [integrations](/observability/integrations/openai) page for your specific framework. diff --git a/docs/docs/observability/_using-the-ui/01-filtering-traces.mdx b/docs/docs/observability/_using-the-ui/01-filtering-traces.mdx deleted file mode 100644 index 8a7e64686b..0000000000 --- a/docs/docs/observability/_using-the-ui/01-filtering-traces.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Filtering Traces" -sidebar_label: "Filtering Traces" -description: "Learn how to filter and search traces in the Agenta observability UI" -sidebar_position: 1 ---- - -<!-- TODO: Add content for filtering traces --> - -## Overview - -Learn how to filter and search traces in the Agenta observability UI - -## Next steps - -- Explore [query data options](/observability/query-data/query-api) -- Learn about [Python SDK tracing](/observability/trace-with-python-sdk/setup-tracing) diff --git a/docs/docs/observability/_using-the-ui/02-adding-comments.mdx b/docs/docs/observability/_using-the-ui/02-adding-comments.mdx deleted file mode 100644 index 98e180d2a2..0000000000 --- a/docs/docs/observability/_using-the-ui/02-adding-comments.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Adding Comments" -sidebar_label: "Adding Comments" -description: "Learn how to add comments and notes to traces for team collaboration" -sidebar_position: 2 ---- - -<!-- TODO: Add content for adding comments --> - -## Overview - -Learn how to add comments and notes to traces for team collaboration - -## Next steps - -- Explore [query data options](/observability/query-data/query-api) -- Learn about [Python SDK tracing](/observability/trace-with-python-sdk/setup-tracing) diff --git a/docs/docs/observability/_using-the-ui/03-adding-annotations.mdx b/docs/docs/observability/_using-the-ui/03-adding-annotations.mdx deleted file mode 100644 index 99fe14cdcd..0000000000 --- a/docs/docs/observability/_using-the-ui/03-adding-annotations.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Adding Annotations" -sidebar_label: "Adding Annotations" -description: "Learn how to annotate traces with custom evaluations and feedback" -sidebar_position: 3 ---- - -<!-- TODO: Add content for adding annotations --> - -## Overview - -Learn how to annotate traces with custom evaluations and feedback - -## Next steps - -- Explore [query data options](/observability/query-data/query-api) -- Learn about [Python SDK tracing](/observability/trace-with-python-sdk/setup-tracing) diff --git a/docs/docs/observability/_using-the-ui/04-exporting-data.mdx b/docs/docs/observability/_using-the-ui/04-exporting-data.mdx deleted file mode 100644 index 47275e0d0c..0000000000 --- a/docs/docs/observability/_using-the-ui/04-exporting-data.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Exporting Data" -sidebar_label: "Exporting Data" -description: "Learn how to export trace data from the Agenta UI for analysis" -sidebar_position: 4 ---- - -<!-- TODO: Add content for exporting data --> - -## Overview - -Learn how to export trace data from the Agenta UI for analysis - -## Next steps - -- Explore [query data options](/observability/query-data/query-api) -- Learn about [Python SDK tracing](/observability/trace-with-python-sdk/setup-tracing) diff --git a/docs/docs/observability/_using-the-ui/_category_.json b/docs/docs/observability/_using-the-ui/_category_.json deleted file mode 100644 index 91b2c97fee..0000000000 --- a/docs/docs/observability/_using-the-ui/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Using the UI", - "position": 7, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/observability/integrations/01-openai.mdx b/docs/docs/observability/integrations/01-openai.mdx index 24f5f3fb39..84000d407b 100644 --- a/docs/docs/observability/integrations/01-openai.mdx +++ b/docs/docs/observability/integrations/01-openai.mdx @@ -1,7 +1,5 @@ --- -title: Tracing and Observability for OpenAI with Agenta -sidebar_label: OpenAI -description: Learn how to instrument OpenAI traces with Agenta for enhanced LLM observability. This guide covers setup, configuration, and best practices for monitoring OpenAI API calls and workflows. +title: OpenAI --- ```mdx-code-block diff --git a/docs/docs/observability/integrations/02-langchain.mdx b/docs/docs/observability/integrations/02-langchain.mdx index 8d365ce859..3a196a52b0 100644 --- a/docs/docs/observability/integrations/02-langchain.mdx +++ b/docs/docs/observability/integrations/02-langchain.mdx @@ -1,7 +1,6 @@ --- -title: Tracing and Observability for LangChain with Agenta -sidebar_label: LangChain -description: Learn how to instrument LangChain traces with Agenta for enhanced LLM observability. This guide covers setup, configuration, and best practices for monitoring LLM applications using LangChain and OpenAI models. +title: LangChain +description: Learn how to instrument LangChain traces with Agenta for enhanced LLM observability. This guide covers setup, configuration, and best practices for monitoring structured data extraction using LangChain and OpenAI models. --- ```mdx-code-block diff --git a/docs/docs/observability/integrations/04-instructor.mdx b/docs/docs/observability/integrations/04-instructor.mdx index 0b07fc0b19..20fe4f129f 100644 --- a/docs/docs/observability/integrations/04-instructor.mdx +++ b/docs/docs/observability/integrations/04-instructor.mdx @@ -1,6 +1,5 @@ --- -title: Tracing and Observability for Instructor with Agenta -sidebar_label: Instructor +title: Instructor description: Learn how to implement and monitor Instructor traces with Agenta for enhanced LLM observability. This comprehensive guide covers setup, configuration, and best practices for tracking structured data extraction using Instructor and OpenAI models. --- diff --git a/docs/docs/observability/integrations/05-litellm.mdx b/docs/docs/observability/integrations/05-litellm.mdx index 85f7edd07a..3c02e7f797 100644 --- a/docs/docs/observability/integrations/05-litellm.mdx +++ b/docs/docs/observability/integrations/05-litellm.mdx @@ -1,6 +1,5 @@ --- -title: Tracing and Observability for LiteLLM with Agenta -sidebar_label: LiteLLM +title: LiteLLM description: Learn how to instrument LiteLLM traces with Agenta for enhanced LLM observability. This guide covers setup, configuration, and best practices for monitoring API calls and performance using LiteLLM and OpenAI models. --- @@ -19,7 +18,7 @@ This guide shows you how to instrument LiteLLM applications using Agenta's obser Install the required packages: ```bash -pip install -U agenta litellm openinference-instrumentation-litellm +pip install -U agenta litellm ``` ## Configure Environment Variables @@ -53,19 +52,16 @@ os.environ["AGENTA_HOST"] = "http://localhost" import agenta as ag import litellm import asyncio -# highlight-next-line -from openinference.instrumentation.litellm import LiteLLMInstrumentor - # highlight-next-line ag.init() -# highlight-next-line -LiteLLMInstrumentor().instrument() - # highlight-next-line @ag.instrument() async def agenerate_completion(): + # highlight-next-line + litellm.callbacks = [ag.callbacks.litellm_handler()] + # Define the messages for the chat completion messages = [ {"role": "system", "content": "You are a helpful assistant."}, @@ -91,4 +87,4 @@ asyncio.run(agenerate_completion()) - **Initialize Agenta**: `ag.init()` sets up the Agenta SDK. - **Instrument the Function**: The `@ag.instrument()` decorator wraps the `agenerate_completion` function, creating a parent span in Agenta. -- **Instrument LiteLLM**: `LiteLLMInstrumentor().instrument()` instruments LiteLLM to send trace data to Agenta. +- **Set Up Callback**: `litellm.callbacks = [ag.callbacks.litellm_handler()]` sets the Agenta callback handler for LiteLLM. This enables LiteLLM to send trace data to Agenta. diff --git a/docs/docs/observability/integrations/06-llamaindex.mdx b/docs/docs/observability/integrations/06-llamaindex.mdx deleted file mode 100644 index 5253e193e3..0000000000 --- a/docs/docs/observability/integrations/06-llamaindex.mdx +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Tracing and Observability for LlamaIndex with Agenta -sidebar_label: LlamaIndex -description: Monitor and debug your LlamaIndex applications with Agenta's observability platform. Get complete visibility into your RAG pipelines and document search workflows. ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Learn how to monitor your **[LlamaIndex](https://www.llamaindex.ai/)** applications using **Agenta's** observability platform. Get complete visibility into your document search, RAG pipelines, and LLM interactions. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications. - -> **What is LlamaIndex?** [LlamaIndex](https://www.llamaindex.ai/) ([GitHub](https://github.com/run-llama/llama_index)) is a powerful data framework that connects LLMs with your private data sources. It simplifies working with various data formats (PDFs, APIs, databases, documents) and creates searchable indices for context-aware AI applications. - -<GoogleColabButton notebookPath="examples/jupyter/integrations/observability-openinference-llamaindex.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -### 1. Install Required Packages - -Install the necessary dependencies for the integration: - -```python -pip install agenta llama_index openinference-instrumentation-llama_index -``` - -**What each package does:** -- `agenta`: Core SDK for observability and prompt management -- `llama_index`: Framework for building data-aware LLM applications -- `openinference-instrumentation-llama_index`: Automatic tracing for LlamaIndex operations - -### 2. Configure Your Environment - -Set up your API credentials and initialize Agenta: - -```python -import os -import agenta as ag - -# Set your Agenta credentials -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Use your self-hosted URL if applicable - -# Initialize Agenta SDK -ag.init() -``` - -### 3. Enable Automatic Tracing - -Activate monitoring for all LlamaIndex operations: - -```python -from openinference.instrumentation.llama_index import LlamaIndexInstrumentor - -# Start automatic instrumentation -LlamaIndexInstrumentor().instrument() -``` - -Once this is set up, Agenta will automatically capture: -- Document loading and processing steps -- Vector index creation and updates -- Search queries and retrieval operations -- LLM calls for response generation - -### Build Your Instrumented Application - -Here's a complete example of a LlamaIndex application with Agenta instrumentation: - -```python -import os -import agenta as ag -from openinference.instrumentation.llama_index import LlamaIndexInstrumentor -from llama_index.core import VectorStoreIndex, SimpleDirectoryReader - - -# Configuration setup -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API - - -# Start Agenta observability -ag.init() - -# Enable LlamaIndex instrumentation -LlamaIndexInstrumentor().instrument() - - -@ag.instrument() -def document_search_app(user_query: str): - """ - Document search application using LlamaIndex. - Loads documents, builds a searchable index, and answers user queries. - """ - # Load documents from local directory - docs = SimpleDirectoryReader("data").load_data() - - # Build vector search index - search_index = VectorStoreIndex.from_documents(docs) - - # Initialize query processor - query_processor = search_index.as_query_engine() - - # Process user query - answer = query_processor.query(user_query) - - return answer - - -# Run the application -if __name__ == "__main__": - result = document_search_app("What is Agenta?") - print(f"Answer: {result}") -``` - -### Understanding Span Types - -The `@ag.instrument()` decorator helps organize your traces by categorizing different operations. Use the `spankind` parameter to classify your functions: - -### Available Span Types - -- **`workflow`** (default): Complete end-to-end processes -- **`agent`**: Autonomous agent operations -- **`chain`**: Sequential processing steps -- **`tool`**: Utility functions -- **`embedding`**: Vector embedding operations -- **`query`**: Search and retrieval operations -- **`completion`**: Text generation tasks -- **`chat`**: Conversational interactions -- **`rerank`**: Result reordering operations - -### Example with Span Classification - -```python -@ag.instrument(spankind="workflow") -def main_search_pipeline(question: str): - """Main search workflow - will appear as the top-level process""" - documents = load_documents() - index = create_index(documents) - return search_and_respond(index, question) - -@ag.instrument(spankind="embedding") -def create_index(documents): - """Document indexing - will appear as an embedding operation""" - return VectorStoreIndex.from_documents(documents) - -@ag.instrument(spankind="query") -def search_and_respond(index, question): - """Search execution - will appear as a query operation""" - engine = index.as_query_engine() - return engine.query(question) -``` - -## Viewing Your Traces - -Once your application runs, you can view detailed execution traces in Agenta's dashboard: - -<Image - style={{ - display: "block", - margin: "20px auto", - textAlign: "center", - }} - img={require("/images/integrations/agenta-openinference-llamaindex-trace.png")} - alt="Agenta dashboard showing detailed LlamaIndex application trace with execution timeline and performance metrics" - loading="lazy" -/> - -### What You'll See in the Dashboard - -**Execution Timeline**: Complete workflow from query to response -**Performance Metrics**: Timing for each operation step -**Document Processing**: How documents are loaded and indexed -**Search Operations**: Vector similarity searches and retrieval -**LLM Interactions**: Calls to language models for response generation -**Error Tracking**: Any failures or exceptions in the pipeline - -This visibility helps you: -- **Optimize Performance**: Identify slow operations and bottlenecks -- **Debug Issues**: See exactly where problems occur in your pipeline -- **Monitor Usage**: Track query patterns and response quality -- **Improve Accuracy**: Understand how well document retrieval is working - - -## Advanced Usage - -### Custom Span Configuration - -Configure different instrumentation levels for various application components: - -```python -@ag.instrument(spankind="workflow") -def main_processing_pipeline(query: str): - return document_search_app(query) - - -@ag.instrument(spankind="embedding") -def generate_document_embeddings(documents): - # Custom embedding generation logic - pass - - -@ag.instrument(spankind="query") -def execute_search_query(engine, query): - # Custom search execution - return engine.query(query) -``` - -### Real-world Examples - -#### Knowledge Base Assistant -```python -@ag.instrument(spankind="workflow") -def knowledge_assistant(question: str, docs_path: str): - documents = SimpleDirectoryReader(docs_path).load_data() - index = VectorStoreIndex.from_documents(documents) - engine = index.as_query_engine() - return engine.query(question) -``` - -#### Multi-Step RAG Pipeline -```python -@ag.instrument(spankind="chain") -def rag_pipeline(query: str): - # Step 1: Document retrieval - retrieved_docs = retrieve_documents(query) - - # Step 2: Context augmentation - augmented_context = augment_context(retrieved_docs) - - # Step 3: Response generation - response = generate_response(query, augmented_context) - - return response -``` - -## Next Steps - -For more advanced observability features and configuration options, see our [complete observability documentation](/observability/trace-with-python-sdk/setup-tracing). diff --git a/docs/docs/observability/integrations/07-langgraph.mdx b/docs/docs/observability/integrations/07-langgraph.mdx deleted file mode 100644 index 5305b0450d..0000000000 --- a/docs/docs/observability/integrations/07-langgraph.mdx +++ /dev/null @@ -1,410 +0,0 @@ ---- -title: Tracing and Observability for LangGraph with Agenta -sidebar_label: LangGraph -description: Monitor and debug your LangGraph applications with Agenta's observability platform. Get complete visibility into your graph-based LLM application performance, debugging capabilities, and execution observability. ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - - -Learn how to monitor your **[LangGraph](https://langchain-ai.github.io/langgraph/)** applications using **Agenta's** observability platform. Get complete visibility into your graph-based LLM application performance, debugging capabilities, and execution observability. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications. - -> **What is LangGraph?** [LangGraph](https://langchain-ai.github.io/langgraph/) is a library for building stateful, multi-actor applications with LLMs. It extends LangChain's capabilities by enabling the creation of complex workflows as directed graphs where nodes represent different processing steps and edges define the flow between them. - -<GoogleColabButton notebookPath="examples/jupyter/integrations/langgraph-integration.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - - -### 1. Install Required Packages - -Install the necessary dependencies for the integration: - -```bash -pip install agenta langchain langgraph langchain-openai langchain-community llama-index openinference-instrumentation-langchain -``` - -**What each package does:** -- `agenta`: The core Agenta SDK for prompt engineering and observability -- `langchain`: The LangChain framework for building LLM applications -- `langgraph`: Extension for creating graph-based LLM workflows -- `langchain-openai`: OpenAI integrations for LangChain -- `langchain-community`: Community extensions for LangChain -- `llama-index`: Document loading and processing utilities -- `openinference-instrumentation-langchain`: Automatic instrumentation library for LangChain and LangGraph operations - -### 2. Configure Your Environment - -Set up your API credentials and initialize Agenta: - -```python -import os -import agenta as ag -from typing import TypedDict, Dict, Any -from langgraph.graph import StateGraph, END -from langchain_openai import ChatOpenAI -from llama_index.core import SimpleDirectoryReader -from langchain_core.runnables import RunnableLambda -from openinference.instrumentation.langchain import LangChainInstrumentor - - -# Load configuration from environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI Agents SDK - - -# Initialize Agenta SDK -ag.init() -``` - - -### 3. Enable LangChain Monitoring - -Activate tarcing for all LangChain and LangGraph operations: - -```python -# Enable LangChain instrumentation (includes LangGraph) -LangChainInstrumentor().instrument() -``` - -### 4. Configure Language Model - -Set up your language model for the LangGraph workflow: - -```python -# Configure ChatOpenAI model -llm = ChatOpenAI(model="gpt-4", temperature=0) -``` - -### 5. Build Your Instrumented LangGraph Application - -Here's a complete example showcasing a meeting transcript analysis workflow with Agenta instrumentation: - -```python -import os -import agenta as ag -from typing import TypedDict, Dict, Any -from langgraph.graph import StateGraph, END -from langchain_openai import ChatOpenAI -from llama_index.core import SimpleDirectoryReader -from langchain_core.runnables import RunnableLambda -from openinference.instrumentation.langchain import LangChainInstrumentor - - -# Load environment variables -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI Agents SDK - -# Configuration setup -ag.init() - -# Enable LangChain instrumentation (includes LangGraph) -LangChainInstrumentor().instrument() - -# Configure language model -llm = ChatOpenAI(model="gpt-4", temperature=0) - - -# Define state structure for the graph -class SummarizerState(TypedDict): - input: str - segments: Dict[str, list[str]] - speaker_summaries: Dict[str, str] - actions: str - - -# Load meeting transcripts from documents -documents = SimpleDirectoryReader("meetings").load_data() -full_transcript = "\n".join(doc.text for doc in documents) - - -# Node 1: Segment speaker contributions -def segment_by_speaker(state): - transcript = state["input"] - speakers = {} - for line in transcript.split("\n"): - if ":" in line: - name, text = line.split(":", 1) - speakers.setdefault(name.strip(), []).append(text.strip()) - return {**state, "segments": speakers} - - -# Node 2: Summarize each speaker's contributions -def summarize_per_speaker(state): - segments = state["segments"] - summaries = {} - for speaker, texts in segments.items(): - joined_text = " ".join(texts) - summary = llm.invoke(f"Summarize what {speaker} said: {joined_text}") - summaries[speaker] = summary.content - return {**state, "speaker_summaries": summaries} - - -# Node 3: Extract action items -def extract_actions(state): - transcript = state["input"] - result = llm.invoke(f"List all action items from this transcript:\n{transcript}") - return {**state, "actions": result.content} - - -@ag.instrument() -def meeting_analyzer(transcript: str): - # Build LangGraph workflow - builder = StateGraph(SummarizerState) - builder.add_node("segment", RunnableLambda(segment_by_speaker)) - builder.add_node("summarize", RunnableLambda(summarize_per_speaker)) - builder.add_node("extract_actions", RunnableLambda(extract_actions)) - - builder.set_entry_point("segment") - builder.add_edge("segment", "summarize") - builder.add_edge("summarize", "extract_actions") - builder.add_edge("extract_actions", END) - - graph = builder.compile() - result = graph.invoke({"input": transcript}) - return result - - -# Example usage -if __name__ == "__main__": - result = meeting_analyzer(full_transcript) - print("Analysis Result:", result) -``` - -### Understanding Span Types - -The `@ag.instrument()` decorator helps organize your traces by categorizing different operations. Use the `spankind` parameter to classify your functions: - -- **`workflow`** (default): Complete end-to-end processes -- **`agent`**: Autonomous agent operations -- **`chain`**: Sequential processing steps -- **`tool`**: Utility functions -- **`embedding`**: Vector embedding operations -- **`query`**: Search and retrieval operations -- **`completion`**: Text generation tasks -- **`chat`**: Conversational interactions -- **`rerank`**: Result reordering operations - -## Viewing Your Traces - -Once your application runs, you can view detailed execution traces in Agenta's dashboard: - -<Image - style={{ marginBottom: "1rem" }} - img={require("/images/integrations/agenta-openinference-langgraph-trace.png")} - alt="Agenta dashboard showing LangGraph application trace with detailed execution steps" - loading="lazy" -/> - -The trace provides comprehensive visibility into your application's execution, helping you: -- Debug complex graph workflows and state management -- Monitor node execution performance and bottlenecks -- Analyze LLM usage patterns and token consumption -- Track data flow and state transitions between nodes - -## Advanced Usage - -### Custom Span Configuration - -Configure different instrumentation levels for various application components: - -```python -@ag.instrument(spankind="workflow") -def document_analysis_pipeline(file_path: str): - return meeting_analyzer(file_path) - - -@ag.instrument(spankind="tool") -def custom_document_loader(directory: str): - # Custom document loading logic - pass - - -@ag.instrument(spankind="chain") -def multi_step_analysis(transcript: str): - # Multi-step analysis workflow - return transcript -``` - -### Real-world Examples - -#### Customer Feedback Analysis System -```python -class FeedbackState(TypedDict): - input: str - sentiment: str - categories: list[str] - priority: str - response_draft: str - - -def analyze_sentiment(state): - feedback = state["input"] - result = llm.invoke(f"Analyze sentiment of this feedback: {feedback}") - return {**state, "sentiment": result.content} - -def categorize_feedback(state): - feedback = state["input"] - result = llm.invoke(f"Categorize this feedback into relevant topics: {feedback}") - return {**state, "categories": result.content.split(", ")} - - -def determine_priority(state): - sentiment = state["sentiment"] - categories = state["categories"] - result = llm.invoke(f"Determine priority (high/medium/low) based on sentiment: {sentiment} and categories: {categories}") - return {**state, "priority": result.content} - - -def draft_response(state): - feedback = state["input"] - sentiment = state["sentiment"] - result = llm.invoke(f"Draft a professional response to this {sentiment} feedback: {feedback}") - return {**state, "response_draft": result.content} - - -@ag.instrument() -def feedback_processor(feedback_text: str): - builder = StateGraph(FeedbackState) - builder.add_node("sentiment", RunnableLambda(analyze_sentiment)) - builder.add_node("categorize", RunnableLambda(categorize_feedback)) - builder.add_node("priority", RunnableLambda(determine_priority)) - builder.add_node("response", RunnableLambda(draft_response)) - - builder.set_entry_point("sentiment") - builder.add_edge("sentiment", "categorize") - builder.add_edge("categorize", "priority") - builder.add_edge("priority", "response") - builder.add_edge("response", END) - - graph = builder.compile() - return graph.invoke({"input": feedback_text}) -``` - -#### Research Paper Analysis Pipeline -```python -class ResearchState(TypedDict): - input: str - abstract_summary: str - key_findings: list[str] - methodology: str - limitations: str - relevance_score: float - - -@ag.instrument() -def research_analyzer(paper_text: str): - def extract_abstract(state): - paper = state["input"] - result = llm.invoke(f"Extract and summarize the abstract from this research paper: {paper}") - return {**state, "abstract_summary": result.content} - - - def identify_findings(state): - paper = state["input"] - result = llm.invoke(f"List the key findings from this research paper: {paper}") - return {**state, "key_findings": result.content.split("\n")} - - - def analyze_methodology(state): - paper = state["input"] - result = llm.invoke(f"Describe the methodology used in this research: {paper}") - return {**state, "methodology": result.content} - - - def assess_limitations(state): - paper = state["input"] - result = llm.invoke(f"Identify limitations mentioned in this research: {paper}") - return {**state, "limitations": result.content} - - - def score_relevance(state): - abstract = state["abstract_summary"] - result = llm.invoke(f"Rate the relevance of this research on a scale of 0-10: {abstract}") - try: - score = float(result.content.strip()) - except: - score = 5.0 - return {**state, "relevance_score": score} - - - builder = StateGraph(ResearchState) - builder.add_node("abstract", RunnableLambda(extract_abstract)) - builder.add_node("findings", RunnableLambda(identify_findings)) - builder.add_node("methodology", RunnableLambda(analyze_methodology)) - builder.add_node("limitations", RunnableLambda(assess_limitations)) - builder.add_node("relevance", RunnableLambda(score_relevance)) - - builder.set_entry_point("abstract") - builder.add_edge("abstract", "findings") - builder.add_edge("findings", "methodology") - builder.add_edge("methodology", "limitations") - builder.add_edge("limitations", "relevance") - builder.add_edge("relevance", END) - - graph = builder.compile() - return graph.invoke({"input": paper_text}) -``` - -#### Content Moderation Workflow -```python -class ModerationState(TypedDict): - input: str - toxicity_score: float - content_categories: list[str] - action_required: str - explanation: str - - -@ag.instrument() -def content_moderator(user_content: str): - def assess_toxicity(state): - content = state["input"] - result = llm.invoke(f"Rate toxicity of this content from 0-10: {content}") - try: - score = float(result.content.strip()) - except: - score = 0.0 - return {**state, "toxicity_score": score} - - def categorize_content(state): - content = state["input"] - result = llm.invoke(f"Categorize this content (spam, harassment, hate speech, etc.): {content}") - return {**state, "content_categories": result.content.split(", ")} - - def determine_action(state): - toxicity = state["toxicity_score"] - categories = state["content_categories"] - if toxicity > 7: - action = "remove" - elif toxicity > 4: - action = "flag_for_review" - else: - action = "approve" - explanation = f"Decision based on toxicity score: {toxicity} and categories: {categories}" - return {**state, "action_required": action, "explanation": explanation} - - builder = StateGraph(ModerationState) - builder.add_node("toxicity", RunnableLambda(assess_toxicity)) - builder.add_node("categorize", RunnableLambda(categorize_content)) - builder.add_node("action", RunnableLambda(determine_action)) - - builder.set_entry_point("toxicity") - builder.add_edge("toxicity", "categorize") - builder.add_edge("categorize", "action") - builder.add_edge("action", END) - - graph = builder.compile() - return graph.invoke({"input": user_content}) -``` - -## Next Steps - -For more advanced observability features and configuration options, see our [complete observability documentation](/observability/trace-with-python-sdk/setup-tracing). diff --git a/docs/docs/observability/integrations/08-openai-agents.mdx b/docs/docs/observability/integrations/08-openai-agents.mdx deleted file mode 100644 index 9a4491915e..0000000000 --- a/docs/docs/observability/integrations/08-openai-agents.mdx +++ /dev/null @@ -1,279 +0,0 @@ ---- -title: Tracing and Observability for OpenAI Agents SDK with Agenta -sidebar_label: OpenAI Agents SDK -description: Learn how to set up observability and tracing for OpenAI Agents SDK using Agenta open-source LLM observability platform. This comprehensive guide covers setup, configuration, and best practices for tracing multi-agent workflows using OpenAI Agents SDK and OpenAI models. ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Learn how to set up tracing for your [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) applications with **Agenta** for complete observability into your multi-agent application performance, debugging capabilities, and execution observability. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform for building reliable LLM applications. It offers observability, evaluation, and prompt management capabilities for AI applications. - -> **What is OpenAI Agents?** The [OpenAI Agents](https://github.com/openai/openai-agents-python) SDK is a framework for building AI agents that can interact with tools, run asynchronous operations, and orchestrate complex multi-agent workflows. It provides a structured approach to creating intelligent agents with tool calling capabilities. - -<GoogleColabButton notebookPath="examples/jupyter/integrations/openai-agents-integration.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Setup Guide - -Follow these steps to integrate OpenAI Agents SDK with Agenta's observability platform for real-time tracing and performance analysis. - -### Install Required Packages - -First, install the required dependencies: - -```bash -pip install agenta openinference-instrumentation-openai-agents openai-agents -``` - -**Package Overview:** -- `agenta`: The core Agenta SDK for prompt engineering and observability -- `openai-agents`: The OpenAI Agents SDK framework for building multi-agent systems -- `openinference-instrumentation-openai-agents`: Automatic instrumentation library for OpenAI Agents operations - -### Setup and Configuration - -Initialize your environment and configure the Agenta SDK: - -```python -import os -import asyncio -import agenta as ag -from agents import Agent, Runner -from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor - -# Load configuration from environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI Agents SDK - -# Start Agenta SDK -ag.init() -``` - -> **What does `ag.init()` do?** -> The `ag.init()` function initializes the Agenta SDK and sets up the configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application. - -### Enable OpenAI Agents Monitoring - -Initialize the OpenInference OpenAI Agents instrumentation to automatically capture agent operations: - -```python -# Enable OpenAI Agents instrumentation -OpenAIAgentsInstrumentor().instrument() -``` - -### Build Your Instrumented Multi-Agent Application - -Here's a complete example showcasing a multi-agent translation system with Agenta instrumentation: - -```python -import os -import asyncio -import agenta as ag -from agents import Agent, Runner -from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor - -# Configuration setup -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI Agents SDK - -# Start Agenta observability -ag.init() - -# Enable OpenAI Agents instrumentation -OpenAIAgentsInstrumentor().instrument() - -# Define specialized translation agents -spanish_agent = Agent( - name="Spanish agent", - instructions="You translate the user's message to Spanish", -) - -french_agent = Agent( - name="French agent", - instructions="You translate the user's message to French", -) - -german_agent = Agent( - name="German agent", - instructions="You translate the user's message to German", -) - -# Create orchestrator agent with tool integration -orchestrator_agent = Agent( - name="orchestrator_agent", - instructions=( - "You are a translation agent. You use the tools given to you to translate." - "If asked for multiple translations, you call the relevant tools." - ), - tools=[ - spanish_agent.as_tool( - tool_name="translate_to_spanish", - tool_description="Translate the user's message to Spanish", - ), - french_agent.as_tool( - tool_name="translate_to_french", - tool_description="Translate the user's message to French", - ), - german_agent.as_tool( - tool_name="translate_to_german", - tool_description="Translate the user's message to German", - ), - ], -) - -@ag.instrument() -async def duolingo(query: str): - result = await Runner.run(orchestrator_agent, input=query) - return result.final_output - - -# Example usage -if __name__ == "__main__": - async def main(): - response = await duolingo("What is 'What's your name' in French?") - print("Response:", response) - - asyncio.run(main()) -``` - -:::info Understanding the @ag.instrument() Decorator - -The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling observability without manual instrumentation. -::: - -### View Traces in Agenta - -Once your application runs, access detailed execution traces through Agenta's dashboard. The observability data includes: - -- End-to-end multi-agent workflow execution timeline -- Each Agent's inputs and outputs -- Tool calling and inter-agent communication -- **Cost metrics**, **usage** and **duration** metrics for each step - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/integrations/agenta-openinference-openai-agents-trace.png")} - alt="Agenta dashboard showing OpenAI Agents SDK application trace with detailed execution steps" - loading="lazy" -/> - -The trace provides visibility into your application's execution, helping you: -- Debug complex multi-agent interactions and tool calling -- Monitor agent performance and decision-making patterns -- Analyze orchestration effectiveness and workflow optimization, and identify bottlenecks - -:::info -After setting up observability for your OpenAI Agents SDK application, you can use Agenta's [evaluation](/evaluation/concepts) features to evaluate the performance of your agents. -::: - -## Real-world Example - -### Customer Support Agent System - -```python -support_agent = Agent( - name="Support Agent", - instructions="You help customers with their inquiries and route complex issues to specialists", -) - -billing_agent = Agent( - name="Billing Agent", - instructions="You handle billing-related questions and payment issues", -) - -technical_agent = Agent( - name="Technical Agent", - instructions="You provide technical support and troubleshooting assistance", -) - -@ag.instrument(spankind="workflow") -async def customer_support_system(customer_query: str): - orchestrator = Agent( - name="Support Orchestrator", - instructions="Route customer queries to the appropriate specialist agent", - tools=[ - support_agent.as_tool("general_support", "Handle general customer inquiries"), - billing_agent.as_tool("billing_support", "Handle billing and payment issues"), - technical_agent.as_tool("technical_support", "Provide technical assistance"), - ] - ) - - result = await Runner.run(orchestrator, input=customer_query) - return result.final_output -``` - -### Research Analysis Team -```python -@ag.instrument(spankind="chain") -async def research_analysis_pipeline(research_topic: str): - data_collector = Agent( - name="Data Collector", - instructions="Gather relevant information and data on the given topic", - ) - - analyst = Agent( - name="Research Analyst", - instructions="Analyze collected data and provide insights", - ) - - reporter = Agent( - name="Report Writer", - instructions="Create reports based on analysis", - tools=[ - data_collector.as_tool("collect_data", "Gather relevant research data"), - analyst.as_tool("analyze_data", "Perform data analysis and insights"), - ] - ) - - result = await Runner.run(reporter, input=research_topic) - return result.final_output -``` - -### Content Creation Workflow -```python -@ag.instrument(spankind="workflow") -async def content_creation_system(content_brief: str): - writer = Agent( - name="Content Writer", - instructions="Create engaging content based on the brief", - ) - - editor = Agent( - name="Content Editor", - instructions="Review and improve content quality and style", - ) - - seo_specialist = Agent( - name="SEO Specialist", - instructions="Optimize content for search engines", - ) - - content_manager = Agent( - name="Content Manager", - instructions="Coordinate the content creation process and ensure quality", - tools=[ - writer.as_tool("write_content", "Generate initial content draft"), - editor.as_tool("edit_content", "Review and edit content"), - seo_specialist.as_tool("optimize_seo", "Optimize content for SEO"), - ] - ) - - result = await Runner.run(content_manager, input=content_brief) - return result.final_output -``` - -## Next Steps - -For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/trace-with-python-sdk/setup-tracing). \ No newline at end of file diff --git a/docs/docs/observability/integrations/10-pydanticai.mdx b/docs/docs/observability/integrations/10-pydanticai.mdx deleted file mode 100644 index eec3ddd731..0000000000 --- a/docs/docs/observability/integrations/10-pydanticai.mdx +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: Tracing and Observability for PydanticAI with Agenta -sidebar_label: PydanticAI -description: Instrument and debug your PydanticAI applications with Agenta's comprehensive observability platform. Set up tracing to debug, monitor and evaluate your PydanticAI applications. -category: Integrations ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Learn how to connect **Agenta** with **PydanticAI** for complete visibility into your AI agent performance, debugging capabilities, and execution observability. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications. - -> **What is PydanticAI?** [PydanticAI](https://ai.pydantic.dev/) is a Python agent framework designed to make it less painful to build production-grade applications with generative AI. It provides type safety, structured outputs, and dependency injection for building robust AI agents. - -<GoogleColabButton notebookPath="examples/jupyter/integrations/pydanticai-integration.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Setup Guide - -Follow these steps to integrate PydanticAI with Logfire and Agenta's observability platform for real-time tracing and performance analysis. - -### Install Required Packages - -First, install the required dependencies. These packages are essential for the integration: - -```bash -pip install pydantic-ai[examples] logfire agenta -``` - -**Package Overview:** -- `pydantic-ai[examples]`: The PydanticAI framework with example dependencies -- `logfire`: Pydantic's SDK for structured logging and tracing -- `agenta`: The core Agenta SDK for prompt engineering and observability - -### Setup and Configuration - -Initialize your environment and configure both Agenta and Logfire: - -```python -import os -from dataclasses import dataclass -import agenta as ag -import logfire -from pydantic import BaseModel, Field -from pydantic_ai import Agent, RunContext - -# Load configuration from environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API - -# Start Agenta SDK -ag.init() - -# Configure Logfire -logfire.configure( - service_name="my_logfire_service", - send_to_logfire=False, - scrubbing=False -) -``` - -:::info **What does `ag.init()` do?** -> The `ag.init()` function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application. -::: - -:::info **Logfire Configuration:** -> The `logfire.configure()` function sets up Logfire's observability features. Setting `send_to_logfire=False` makes sure that the traces are only sent to Agenta (and not Logfire, Pydantic's observability platform), while `scrubbing=False` makes sure that all the data is sent as is (scrubbing is a feature that automatically removes sensitive data from the traces). -::: - - -### Build Your Instrumented PydanticAI Application - -Here's a complete example showcasing a banking support agent with Agenta instrumentation: - -```python -import os -from dataclasses import dataclass -import agenta as ag -import logfire -from pydantic import BaseModel, Field -from pydantic_ai import Agent, RunContext - - -# Load configuration from environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API - -# Configuration setup -ag.init() -logfire.configure( - service_name="banking_support_service", - send_to_logfire=False, - scrubbing=False -) -logfire.instrument_asyncpg() - - -# Mock database for demonstration -class DatabaseConn: - """Fake database for example purposes.""" - - @classmethod - async def customer_name(cls, *, id: int) -> str | None: - if id == 123: - return "John" - return None - - @classmethod - async def customer_balance(cls, *, id: int, include_pending: bool) -> float: - if id == 123 and include_pending: - return 123.45 - else: - raise ValueError("Customer not found") - - -# Dependencies for the support agent -@dataclass -class SupportDependencies: - customer_id: int - including_pending: bool - db: DatabaseConn - - -# Structured output model -class SupportOutput(BaseModel): - support_advice: str = Field(description="Advice returned to the customer") - block_card: bool = Field(description="Whether to block their card or not") - risk: int = Field(description="Risk level of query", ge=0, le=10) - - -# Create the support agent with instrumentation -support_agent = Agent( - "openai:gpt-4o", - deps_type=SupportDependencies, - output_type=SupportOutput, - system_prompt=( - "You are a support agent in our bank, give the " - "customer support and judge the risk level of their query. " - "Reply using the customer's name." - ), - instrument=True, # Enable built-in PydanticAI instrumentation -) - - -# Dynamic system prompt with customer context -@support_agent.system_prompt -async def add_customer_name(ctx: RunContext[SupportDependencies]) -> str: - customer_name = await ctx.deps.db.customer_name(id=ctx.deps.customer_id) - return f"The customer's name is {customer_name!r}" - - -# Agent tool for balance inquiries -@support_agent.tool -async def customer_balance(ctx: RunContext[SupportDependencies]) -> str: - """Returns the customer's current account balance.""" - balance = await ctx.deps.db.customer_balance( - id=ctx.deps.customer_id, - include_pending=ctx.deps.including_pending, - ) - return f"${balance:.2f}" - - -# Agenta-instrumented functions -@ag.instrument() -def bank_balance(customer_id: int, query: str, include_pending: bool = True): - """Returns the customer's current account balance.""" - deps = SupportDependencies( - customer_id=customer_id, - including_pending=include_pending, - db=DatabaseConn(), - ) - result = support_agent.run_sync(query, deps=deps) - return result - - -@ag.instrument() -def block_card(customer_id: int, query: str, include_pending: bool = True): - """Blocks the customer's card if they report it lost.""" - deps = SupportDependencies( - customer_id=customer_id, - including_pending=include_pending, - db=DatabaseConn(), - ) - result = support_agent.run_sync(query, deps=deps) - return result - - -# Example usage -if __name__ == "__main__": - # Agent 1: get user's account balance - result = bank_balance(123, "What is my balance?", True) - print("Balance Query Result:", result.output) - - # Agent 2: block user's card if they report it lost - result = block_card(123, "I just lost my card!", True) - print("Card Block Result:", result.output) -``` - -### Understanding the @ag.instrument() Decorator - -The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation. - -**Span Classification:** -Use the `spankind` parameter to categorize different operations in Agenta WebUI. Available classifications: - -- `agent` - Autonomous agent operations -- `chain` - Sequential processing workflows -- `workflow` - End-to-end application flows (default behavior) -- `tool` - Utility function executions -- `embedding` - Vector embedding operations -- `query` - Search and retrieval operations -- `completion` - Text generation tasks -- `chat` - Conversational interactions -- `rerank` - Result reordering operations - -### View Traces in Agenta - -Once your application runs, access detailed execution traces through Agenta's dashboard. The observability data includes: - -- End-to-end agent workflow execution timeline -- PydanticAI agent initialization and configuration -- Tool function calls and dependency injection -- LLM interactions and structured output validation -- Database queries and external service calls -- Performance metrics and execution duration - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/integrations/agenta-pydanticai-logfire-trace.png")} - alt="Agenta dashboard showing PydanticAI application trace with detailed execution steps" - loading="lazy" -/> - -The trace provides comprehensive visibility into your application's execution, helping you: -- Debug complex agent interactions and tool usage -- Monitor dependency injection and context management -- Analyze LLM performance and structured output validation -- Track database queries and external API calls - - -## Next Steps - -For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/trace-with-python-sdk/setup-tracing). diff --git a/docs/docs/observability/integrations/11-dspy.mdx b/docs/docs/observability/integrations/11-dspy.mdx deleted file mode 100644 index f32e59dfdd..0000000000 --- a/docs/docs/observability/integrations/11-dspy.mdx +++ /dev/null @@ -1,279 +0,0 @@ ---- -title: Tracing and Observability for DSPy with Agenta -sidebar_label: DSPy -description: Instrument and debug your DSPy applications with Agenta's observability platform. Set up quickly tracing for an improved LLMOps workflows. -category: Integrations ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Learn how to connect **Agenta** with **DSPy** for complete visibility into your LLM application performance, debugging capabilities, and execution observability. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications. - -> **What is DSPy?** [DSPy](https://dspy.ai/) ([GitHub](https://github.com/stanfordnlp/dspy)) is a framework for algorithmically optimizing LM prompts and weights. It provides composable and declarative modules for instructing language models in a more systematic way than traditional prompting. - - -<GoogleColabButton notebookPath="examples/jupyter/integrations/dspy-integration.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Setup Guide - -Follow these steps to integrate DSPy with Agenta's observability platform for real-time tracing and performance analysis. - -### Install Required Packages - -First, install the required dependencies. These packages are essential for the integration: - -```bash -pip install agenta dspy openinference-instrumentation-dspy -``` - -**Package Overview:** -- `agenta`: The core Agenta SDK for prompt engineering and observability -- `dspy`: The DSPy framework for building systematic LLM applications -- `openinference-instrumentation-dspy`: Automatic instrumentation library for DSPy operations - -### Setup and Configuration - -Initialize your environment and configure the Agenta SDK: - -```python -import os -import agenta as ag -import dspy -from openinference.instrumentation.dspy import DSPyInstrumentor - -# Load configuration from environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI models - -# Start Agenta SDK -ag.init() -``` - -> **What does `ag.init()` do?** -> The `ag.init()` function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application. - -### Enable DSPy Monitoring - -Initialize the OpenInference DSPy instrumentation to automatically capture DSPy operations: - -```python -# Enable DSPy instrumentation -DSPyInstrumentor().instrument() -``` - -### Configure DSPy Language Model - -Set up your DSPy language model configuration: - -```python -# Configure DSPy with your preferred language model -lm = dspy.LM("openai/gpt-4o") -dspy.configure(lm=lm) -``` - -### Build Your Instrumented Application - -Here's a complete example showcasing three different DSPy use cases with Agenta instrumentation: - -```python -import os -import agenta as ag -import dspy -from openinference.instrumentation.dspy import DSPyInstrumentor - -# Configuration setup -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API -os.environ["OPENAI_API_KEY"] = "your_openai_api_key" # Required for OpenAI models - -# Start Agenta observability -ag.init() - -# Enable DSPy instrumentation -DSPyInstrumentor().instrument() - -# Configure DSPy -lm = dspy.LM("openai/gpt-4o") -dspy.configure(lm=lm) - - -# Use case 1: Math reasoning with Chain of Thought (CoT) -@ag.instrument() -def math_reasoning(question: str): - cot = dspy.ChainOfThought("question -> answer: float") - response = cot(question=question) - return response - - -# Use case 2: Retrieval-Augmented Generation (RAG) with Wikipedia search -@ag.instrument(spankind="query") -def search_wikipedia(query: str) -> list[str]: - results = dspy.ColBERTv2(url="http://20.102.90.50:2017/wiki17_abstracts")( - query, k=3 - ) - return [x["text"] for x in results] - - -@ag.instrument() -def rag(question: str): - cot = dspy.ChainOfThought("context, question -> response") - response = cot(context=search_wikipedia(question), question=question) - return response - - -# Use case 3: Drafting an article with an outline and sections -class Outline(dspy.Signature): - """Outline a thorough overview of a topic.""" - - topic: str = dspy.InputField() - title: str = dspy.OutputField() - sections: list[str] = dspy.OutputField() - section_subheadings: dict[str, list[str]] = dspy.OutputField( - desc="mapping from section headings to subheadings" - ) - - -class DraftSection(dspy.Signature): - """Draft a top-level section of an article.""" - - topic: str = dspy.InputField() - section_heading: str = dspy.InputField() - section_subheadings: list[str] = dspy.InputField() - content: str = dspy.OutputField(desc="markdown-formatted section") - - -class DraftArticle(dspy.Module): - def __init__(self): - self.build_outline = dspy.ChainOfThought(Outline) - self.draft_section = dspy.ChainOfThought(DraftSection) - - def forward(self, topic: str): - outline = self.build_outline(topic=topic) - sections = [] - for heading, subheadings in outline.section_subheadings.items(): - section, subheadings = f"## {heading}", [ - f"### {subheading}" for subheading in subheadings - ] - section = self.draft_section( - topic=outline.title, - section_heading=section, - section_subheadings=subheadings, - ) - sections.append(section.content) - return dspy.Prediction(title=outline.title, sections=sections) - - -@ag.instrument() -def journalist(topic: str): - draft_article = DraftArticle() - article = draft_article(topic=topic) - return article - - -# Example usage -if __name__ == "__main__": - # Use case 1: Math reasoning - response = math_reasoning("What is 2 + 2?") - print("Math reasoning response:", response) - - # Use case 2: RAG with Wikipedia - rag_response = rag("What's the name of the castle that David Gregory inherited?") - print("RAG response:", rag_response) - - # Use case 3: Article generation - article = journalist("The impact of AI on society") - print("Article generation response:", article) -``` - -### Understanding the @ag.instrument() Decorator - -The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation. - -**Span Classification:** -Use the `spankind` parameter to categorize different operations in Agenta WebUI. Available classifications: - -- `agent` - Autonomous agent operations -- `chain` - Sequential processing workflows -- `workflow` - End-to-end application flows (default behavior) -- `tool` - Utility function executions -- `embedding` - Vector embedding operations -- `query` - Search and retrieval operations -- `completion` - Text generation tasks -- `chat` - Conversational interactions -- `rerank` - Result reordering operations - -**Standard Behavior:** -By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta. - -Example with specific span kind: - -```python -@ag.instrument(spankind="query") -def search_knowledge_base(search_term: str): - # Knowledge base search implementation - pass -``` - -### View Traces in Agenta - -Once your application runs, access detailed execution traces through Agenta's dashboard. The observability data includes: - -- End-to-end workflow execution timeline -- DSPy module initialization and configuration steps -- Chain of Thought reasoning processes -- Retrieval operations and context augmentation -- Language model calls and response generation -- Performance metrics and execution duration - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/integrations/agenta-openinference-dspy-trace.png")} - alt="Agenta dashboard showing DSPy application trace with detailed execution steps" - loading="lazy" -/> - -The trace provides comprehensive visibility into your application's execution, helping you: -- Debug complex reasoning chains and prompt optimization -- Monitor retrieval effectiveness and context quality -- Analyze language model performance and token usage -- Track application behavior trends and optimization opportunities - -## Advanced Usage - -### Custom Span Configuration - -Configure different instrumentation levels for various application components: - -```python -@ag.instrument(spankind="workflow") -def complex_reasoning_pipeline(query: str): - return math_reasoning(query) - - -@ag.instrument(spankind="tool") -def custom_retrieval_function(query: str): - # Custom retrieval logic - pass - - -@ag.instrument(spankind="chain") -def multi_step_reasoning(question: str): - # Multi-step reasoning implementation - return question -``` - -## Next Steps - -For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/trace-with-python-sdk/setup-tracing). \ No newline at end of file diff --git a/docs/docs/observability/integrations/12-agno.mdx b/docs/docs/observability/integrations/12-agno.mdx deleted file mode 100644 index 28c816c8fd..0000000000 --- a/docs/docs/observability/integrations/12-agno.mdx +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: Tracing and Observability for Agno with Agenta -sidebar_label: Agno -description: Trace and debug your Agno applications with Agenta's observability platform. Set up instrumentation and observability for Agno Agents for a better LLMOps workflows. -category: Integrations ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Learn how to connect **Agenta** with **Agno** for complete visibility into your AI agent performance, debugging capabilities, and execution observability. - -> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications. - -> **What is Agno?** [Agno](https://github.com/agno-agi/agno) is a Python framework for building AI agents with tools, structured outputs, and efficient workflows. It provides a simple yet powerful interface for creating intelligent agents that can interact with external systems and perform complex tasks. - - -<GoogleColabButton notebookPath="examples/jupyter/integrations/agno-integration.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - - -Here are the steps to setup tracing and observability for Agno applications with Agenta. - -## Install Required Packages - -First, install the required dependencies: - -```bash -pip install agenta openinference-instrumentation-agno agno -``` - -**Package Overview:** -- `agenta`: The core Agenta SDK for prompt engineering and observability -- `agno`: The Agno framework for building AI agents with tools -- `openinference-instrumentation-agno`: Automatic instrumentation library for Agno operations - -## Setup and Configuration - -Initialize your environment and configure the Agenta SDK: - -```python -import os -import re -from itertools import permutations -import agenta as ag -from agno.agent import Agent -from agno.models.openai import OpenAIChat -from openinference.instrumentation.agno import AgnoInstrumentor - - -# Set up the environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API - -# Start the Agenta SDK -ag.init() -``` - -> **What does `ag.init()` do?** -> The `ag.init()` function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application. - -## Enable Agno Monitoring - -Initialize the OpenInference Agno instrumentation to automatically capture agent operations: - -```python -AgnoInstrumentor().instrument() -``` - -## Complete Example of an Agno Application - -Here's a complete example showcasing a logistics dispatch agent with Agenta instrumentation: - -```python -import os -import re -from itertools import permutations -import agenta as ag -from agno.agent import Agent -from agno.models.openai import OpenAIChat -from openinference.instrumentation.agno import AgnoInstrumentor - - -# Set up the environment -os.environ["AGENTA_API_KEY"] = "your_agenta_api_key" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # Optional, defaults to the Agenta cloud API - -# Start the Agenta SDK -ag.init() -AgnoInstrumentor().instrument() - - -# Simulated logistics data -tracking_data = { - "TRK10001": "In transit at Berlin Friedrichshain Distribution Center", - "TRK10002": "Delivered on 2025-06-14 at 18:32 in Charlottenburg", - "TRK10003": "Out for delivery — last scanned near Tempelhofer Feld", - "TRK10004": "Held at customs near Berlin Brandenburg Airport (BER)", - "TRK10005": "Awaiting pickup at Berlin Hauptbahnhof Parcel Station", -} - -distance_matrix = { - "Warehouse": {"A": 10, "B": 15, "C": 20}, - "A": {"Warehouse": 10, "B": 12, "C": 5}, - "B": {"Warehouse": 15, "A": 12, "C": 8}, - "C": {"Warehouse": 20, "A": 5, "B": 8}, -} - -driver_load = {"Alice": 2, "Bob": 3, "Charlie": 1} - - -# Tool: TrackingTool -class TrackingTool: - def __init__(self): - self.name = "TrackingTool" - self.description = "Provides shipment status updates given a tracking ID." - - def run(self, query: str) -> str: - match = re.search(r"\bTRK\d+\b", query.upper()) - if not match: - return "Please provide a valid tracking ID." - - tid = match.group(0) - status = tracking_data.get(tid) - return f"Status for {tid}: {status}" if status else f"No information for {tid}." - - -# Tool: RouteTool -class RouteTool: - def __init__(self): - self.name = "RouteTool" - self.description = "Computes the best delivery route given a start and destinations." - - def run(self, query: str) -> str: - m = re.search(r"from\s+([\w\s]+)\s+to\s+(.+)", query, re.IGNORECASE) - if not m: - return "Specify route as 'from <Origin> to <Dest1>, <Dest2>, ...'." - - origin = m.group(1).strip() - dests = [d.strip() for d in re.split(r",| and ", m.group(2)) if d.strip()] - - if origin not in distance_matrix: - return f"Unknown origin: {origin}." - for loc in dests: - if loc not in distance_matrix: - return f"Unknown destination: {loc}." - - best_distance = float("inf") - best_order = None - for perm in permutations(dests): - total = 0 - cur = origin - for nxt in perm: - total += distance_matrix[cur][nxt] - cur = nxt - if total < best_distance: - best_distance = total - best_order = perm - - route_plan = " → ".join([origin] + list(best_order)) if best_order else origin - return f"Optimal route: {route_plan} (Total distance: {best_distance} km)" - - -# Tool: WorkloadBalancerTool -class WorkloadBalancerTool: - def __init__(self): - self.name = "WorkloadBalancerTool" - self.description = "Assigns delivery locations to the least busy driver." - self.drivers = driver_load.copy() - - def run(self, query: str) -> str: - m = re.search(r"deliver(?:y|ies)? to (.+)", query, re.IGNORECASE) - if not m: - return "Please specify delivery locations like 'deliver to A, B, C'." - - locations = [ - loc.strip() for loc in re.split(r",| and ", m.group(1)) if loc.strip() - ] - assignments = [] - for loc in locations: - least_loaded = min(self.drivers, key=lambda d: self.drivers[d]) - assignments.append(f"{loc} → {least_loaded}") - self.drivers[least_loaded] += 1 - return "Delivery assignments:\n" + "\n".join(assignments) - - -# Create the dispatch agent -agent = Agent( - model=OpenAIChat(id="gpt-4o"), - description="You are a smart dispatch assistant for a logistics team.", - instructions=[ - "Use TrackingTool for shipment queries.", - "Use RouteTool for route optimization.", - "Use WorkloadBalancerTool to assign deliveries to drivers.", - "Always return concise, formatted answers with relevant detail.", - ], - tools=[TrackingTool(), RouteTool(), WorkloadBalancerTool()], - show_tool_calls=False, -) - - -@ag.instrument() -def handle_dispatch_request(query: str): - result = agent.run(query) - return result.content - - -# Example usage -if __name__ == "__main__": - response = handle_dispatch_request( - "Where is shipment TRK10001? Also, find the best route from Warehouse to A, B and C, " - "and assign deliveries to the least busy drivers." - ) - print("Response:", response) -``` - - -## View Traces in Agenta - -Once your application runs, access detailed execution traces through Agenta's dashboard. The observability data includes: - -- End-to-end agent workflow execution timeline -- Agno agent initialization and tool configuration -- Tool execution sequences and decision-making processes -- LLM interactions and response generation -- Tool call chains and data flow between tools -- Performance metrics and execution duration - -<Image - style={{ - display: "block", - margin: "20px", - textAlign: "center", - }} - img={require("/images/integrations/agenta-openinference-agno-trace.png")} - alt="Agenta dashboard showing Agno application trace with detailed execution steps" - loading="lazy" -/> - -The trace provides comprehensive visibility into your application's execution, helping you: -- Debug complex agent interactions and tool usage patterns -- Monitor tool execution performance and decision logic -- Analyze LLM reasoning and response quality -- Track multi-tool workflows and coordination - -## Next Steps - -For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/trace-with-python-sdk/setup-tracing). \ No newline at end of file diff --git a/docs/docs/observability/integrations/_category_.json b/docs/docs/observability/integrations/_category_.json index 72d05a3297..10e5757b16 100644 --- a/docs/docs/observability/integrations/_category_.json +++ b/docs/docs/observability/integrations/_category_.json @@ -1,4 +1,4 @@ { - "position": 9, + "position": 4, "label": "Integrations" -} \ No newline at end of file +} diff --git a/docs/docs/observability/query-data/01-query-api.mdx b/docs/docs/observability/query-data/01-query-api.mdx deleted file mode 100644 index a5021300f8..0000000000 --- a/docs/docs/observability/query-data/01-query-api.mdx +++ /dev/null @@ -1,716 +0,0 @@ ---- -title: "Query Trace Data with the Agenta API" -sidebar_label: "Query via API" -description: "Learn how to programmatically query and filter LLM traces and spans using the Agenta Query Data API with Python and JavaScript examples" -sidebar_position: 1 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/query-data-api-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -The Agenta API lets you query trace and span data programmatically. You can filter by attributes, time ranges, and status codes. The API returns data in two formats: flat spans or hierarchical trace trees. - -## API Endpoint - -``` -POST /api/preview/tracing/spans/query -``` - -Send queries as JSON in the request body. This approach works best for complex filters with nested conditions. - -## Authentication - -Include your API key in the request header: - -```http -Authorization: ApiKey YOUR_API_KEY -``` - -You can create API keys from the Settings page in your Agenta workspace. - -## Response Format Options - -### Focus Parameter - -Choose how the API returns your data: - -**`span`**: Returns individual spans in a flat list. Use this when you need span-level details. - -```json -{ - "focus": "span" -} -``` - -Example response: - -```json -{ - "count": 2, - "spans": [ - { - "trace_id": "abc123", - "span_id": "span001", - "parent_id": "root", - "span_name": "openai.chat", - "status_code": "STATUS_CODE_OK", - "attributes": { - "ag": { - "metrics": { - "costs": { "cumulative": { "total": 0.0023 } }, - "tokens": { "cumulative": { "total": 450 } } - } - } - } - }, - { - "trace_id": "def456", - "span_id": "span002", - "parent_id": "root", - "span_name": "generate_response", - "status_code": "STATUS_CODE_OK", - "attributes": { "..." } - } - ] -} -``` - -**`trace`** (default): Returns complete traces as hierarchical trees. Each trace groups its spans by `trace_id`. Use this when you need to see the full request flow. - -```json -{ - "focus": "trace" -} -``` - -Example response: - -```json -{ - "count": 1, - "traces": { - "abc123": { - "spans": { - "generate_response": { - "span_id": "root", - "span_name": "generate_response", - "status_code": "STATUS_CODE_OK", - "spans": { - "openai.chat": { - "span_id": "span001", - "span_name": "openai.chat", - "parent_id": "root", - "status_code": "STATUS_CODE_OK", - "attributes": { - "ag": { - "metrics": { - "costs": { "cumulative": { "total": 0.0023 } }, - "tokens": { "cumulative": { "total": 450 } } - } - } - } - } - } - } - } - } - } -} -``` - -## Time Windows and Limits - -Control which traces you retrieve using time ranges and result limits. - -### Time Range - -Specify start and end timestamps using ISO 8601 format or Unix timestamps: - -```json -{ - "oldest": "2024-01-01T00:00:00Z", - "newest": "2024-01-31T23:59:59Z" -} -``` - -The `oldest` timestamp is included in results. The `newest` timestamp is excluded. - -You can also use Unix timestamps (in seconds): - -```json -{ - "oldest": 1704067200, - "newest": 1706745599 -} -``` - -### Result Limit - -Limit the number of results: - -```json -{ - "limit": 100 -} -``` - -Combine time ranges with limits for precise control: - -```json -{ - "oldest": "2024-01-01T00:00:00Z", - "newest": "2024-01-31T23:59:59Z", - "limit": 50 -} -``` - -## Filtering Data - -Filter traces and spans using conditions with various operators. - -### Basic Filter Structure - -Each filter needs an operator and conditions: - -```json -{ - "filter": { - "operator": "and", - "conditions": [ - { - "field": "span_name", - "operator": "is", - "value": "my_span" - } - ] - } -} -``` - -### Logical Operators - -Combine conditions using these operators: - -**`and`** (default): All conditions must match. - -**`or`**: At least one condition must match. - -**`not`**: Negates the condition. - -**`nand`**: At least one condition does not match. - -**`nor`**: No conditions match. - -Example using OR logic: - -```json -{ - "filter": { - "operator": "or", - "conditions": [ - { "field": "span_name", "value": "chat" }, - { "field": "span_name", "value": "completion" } - ] - } -} -``` - -### Fields You Can Filter - -Filter by these standard fields: - -**`trace_id`**: Trace identifier - -**`span_id`**: Span identifier - -**`parent_id`**: Parent span identifier - -**`span_name`**: Span name - -**`span_kind`**: Type of span (`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`) - -**`start_time`**: Start timestamp - -**`end_time`**: End timestamp - -**`status_code`**: Status code (`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, `STATUS_CODE_ERROR`) - -**`status_message`**: Status message text - -**`attributes`**: Span attributes (requires `key` parameter) - -**`links`**: Linked spans - -**`references`**: References to applications, variants, or revisions - -### Filtering by Attributes - -Access span attributes using the `key` parameter: - -```json -{ - "field": "attributes", - "key": "ag.type.span", - "operator": "is", - "value": "llm" -} -``` - -For nested attributes, use dot notation: - -```json -{ - "field": "attributes", - "key": "ag.metrics.unit.cost", - "operator": "gt", - "value": 0.01 -} -``` - -### Comparison Operators - -#### Equality - -**`is`** (default): Exact match - -**`is_not`**: Not equal - -```json -{ - "field": "span_name", - "operator": "is", - "value": "openai.chat" -} -``` - -#### Numeric Comparisons - -**`eq`**: Equal to - -**`neq`**: Not equal to - -**`gt`**: Greater than - -**`gte`**: Greater than or equal to - -**`lt`**: Less than - -**`lte`**: Less than or equal to - -**`btwn`**: Between (inclusive, provide array `[min, max]`) - -Example filtering by duration: - -```json -{ - "field": "attributes", - "key": "ag.metrics.unit.duration", - "operator": "gt", - "value": 1000 -} -``` - -Example using between: - -```json -{ - "field": "attributes", - "key": "ag.metrics.unit.duration", - "operator": "btwn", - "value": [500, 2000] -} -``` - -#### String Matching - -**`startswith`**: Starts with prefix - -**`endswith`**: Ends with suffix - -**`contains`**: Contains substring - -**`matches`**: Regular expression match - -**`like`**: SQL-like pattern (supports `%` wildcard) - -Example searching span names: - -```json -{ - "field": "span_name", - "operator": "contains", - "value": "api" -} -``` - -#### List Operations - -**`in`**: Value exists in the list - -**`not_in`**: Value does not exist in the list - -Example filtering multiple traces: - -```json -{ - "field": "trace_id", - "operator": "in", - "value": [ - "trace_id_1", - "trace_id_2", - "trace_id_3" - ] -} -``` - -#### Existence Checks - -**`exists`**: Field or attribute exists (any value, including null) - -**`not_exists`**: Field or attribute does not exist - -Example checking for cost tracking: - -```json -{ - "field": "attributes", - "key": "ag.metrics.unit.cost", - "operator": "exists" -} -``` - -Note: When using `exists` or `not_exists`, omit the `value` field. - -## Advanced Filtering Examples - -### Multiple Conditions - -Filter production traces with slow response times: - -```json -{ - "filter": { - "operator": "and", - "conditions": [ - { - "field": "attributes", - "key": "environment", - "value": "production" - }, - { - "field": "attributes", - "key": "ag.metrics.unit.duration", - "operator": "gt", - "value": 1000 - }, - { - "field": "status_code", - "operator": "is_not", - "value": "STATUS_CODE_ERROR" - } - ] - } -} -``` - -### Nested Logical Operators - -Find API calls that either errored or took too long: - -```json -{ - "filter": { - "operator": "and", - "conditions": [ - { - "field": "span_name", - "operator": "startswith", - "value": "api_" - }, - { - "operator": "or", - "conditions": [ - { - "field": "status_code", - "value": "STATUS_CODE_ERROR" - }, - { - "field": "attributes", - "key": "ag.metrics.unit.duration", - "operator": "gt", - "value": 5000 - } - ] - } - ] - } -} -``` - -### Filter by Application References - -Find traces for specific applications: - -```json -{ - "filter": { - "conditions": [ - { - "field": "references", - "operator": "in", - "value": [ - { "id": "application_id_1" }, - { "id": "application_id_2" } - ] - } - ] - } -} -``` - -### Filter by Linked Spans - -Find spans linked to specific traces: - -```json -{ - "filter": { - "conditions": [ - { - "field": "links", - "operator": "in", - "value": [ - { - "trace_id": "trace_id_value", - "span_id": "span_id_value" - } - ] - } - ] - } -} -``` - -## Complete Query Example - -Here's a full query that finds successful LLM calls from the last month: - -```json -{ - "focus": "trace", - "oldest": "2024-01-01T00:00:00Z", - "newest": "2024-01-31T23:59:59Z", - "limit": 50, - "filter": { - "operator": "and", - "conditions": [ - { - "field": "attributes", - "key": "ag.type.span", - "value": "llm" - }, - { - "field": "status_code", - "operator": "is_not", - "value": "STATUS_CODE_ERROR" - } - ] - } -} -``` - -## Response Structure - -The API returns JSON with these fields: - -```json -{ - "count": 42, - "spans": [...], // Present when focus=span - "traces": {...} // Present when focus=trace -} -``` - -**`count`**: Number of results returned - -**`spans`**: Array of spans (when `focus=span`) - -**`traces`**: Dictionary of trace trees indexed by trace_id (when `focus=trace`) - -### Span Format - -Each span contains: - -```json -{ - "trace_id": "...", - "span_id": "...", - "parent_id": "...", - "span_name": "openai.chat", - "span_kind": "SPAN_KIND_CLIENT", - "start_time": "2024-01-15T10:30:00Z", - "end_time": "2024-01-15T10:30:03Z", - "status_code": "STATUS_CODE_OK", - "attributes": { - "ag": { - "data": { - "inputs": {...}, - "outputs": {...} - }, - "metrics": { - "costs": {...}, - "tokens": {...}, - "duration": {...} - }, - "type": { - "span": "llm" - } - } - } -} -``` - -### Trace Format - -Each trace organizes spans hierarchically by name: - -```json -{ - "trace_id_1": { - "spans": { - "root_span": { - "span_id": "...", - "spans": { - "child_span": { - "span_id": "...", - "..." - } - } - } - } - } -} -``` - -## Error Responses - -The API returns standard HTTP status codes: - -**200 OK**: Query succeeded - -**400 Bad Request**: Invalid filter syntax or parameters - -**401 Unauthorized**: Missing or invalid API key - -**422 Unprocessable Entity**: Validation errors in the request - -## Python Example - -Here's a complete example using Python: - -```python -import requests -from datetime import datetime, timedelta, timezone - -AGENTA_HOST = "https://cloud.agenta.ai" -API_KEY = "your_api_key_here" - -# Query spans from the last 7 days -now = datetime.now(timezone.utc) -week_ago = now - timedelta(days=7) - -query = { - "focus": "span", - "oldest": week_ago.isoformat(), - "newest": now.isoformat(), - "limit": 100, - "filter": { - "operator": "and", - "conditions": [ - { - "field": "attributes", - "key": "ag.type.span", - "value": "llm" - }, - { - "field": "status_code", - "value": "STATUS_CODE_OK" - } - ] - } -} - -response = requests.post( - f"{AGENTA_HOST}/api/preview/tracing/spans/query", - headers={ - "Authorization": f"ApiKey {API_KEY}", - "Content-Type": "application/json" - }, - json=query -) - -data = response.json() -print(f"Found {data['count']} spans") -``` - -## JavaScript Example - -Here's the same query in JavaScript: - -```javascript -const AGENTA_HOST = "https://cloud.agenta.ai"; -const API_KEY = "your_api_key_here"; - -// Query spans from the last 7 days -const now = new Date(); -const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); - -const query = { - focus: "span", - oldest: weekAgo.toISOString(), - newest: now.toISOString(), - limit: 100, - filter: { - operator: "and", - conditions: [ - { - field: "attributes", - key: "ag.type.span", - value: "llm" - }, - { - field: "status_code", - value: "STATUS_CODE_OK" - } - ] - } -}; - -const response = await fetch( - `${AGENTA_HOST}/api/preview/tracing/spans/query`, - { - method: "POST", - headers: { - "Authorization": `ApiKey ${API_KEY}`, - "Content-Type": "application/json" - }, - body: JSON.stringify(query) - } -); - -const data = await response.json(); -console.log(`Found ${data.count} spans`); -``` - -## Next Steps - -Learn about the [Analytics Data API](/observability/query-data/analytics-data) for aggregated metrics and time-series data. - -Explore the [API Reference](/reference/api/category) for complete endpoint documentation. - -Check out [Filtering in the UI](/observability/concepts) to learn about the visual query builder. diff --git a/docs/docs/observability/query-data/02-analytics-data.mdx b/docs/docs/observability/query-data/02-analytics-data.mdx deleted file mode 100644 index 3de7455510..0000000000 --- a/docs/docs/observability/query-data/02-analytics-data.mdx +++ /dev/null @@ -1,473 +0,0 @@ ---- -title: "Analyze Observability Metrics with the Agenta Analytics API" -sidebar_label: "Analytics via API" -description: "Learn how to retrieve and analyze aggregated LLM performance metrics including costs, latency, token usage, and error rates using the Agenta Analytics API with Python and JavaScript examples" -sidebar_position: 2 ---- - -import GoogleColabButton from "@site/src/components/GoogleColabButton"; - -<GoogleColabButton notebookPath="examples/jupyter/observability/analytics-api-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Overview - -The Agenta Analytics API retrieves aggregated metrics from your LLM traces. The API groups your data into time buckets and calculates metrics like cost, latency, token usage, and error rates. - -Use analytics to: -- Track LLM costs over time -- Monitor performance trends -- Identify error patterns -- Analyze token consumption - -**Endpoint**: `POST /api/preview/tracing/spans/analytics` - -**Authentication**: You can create API keys from the Settings page in your Agenta workspace. - -## Quick Start - -### Python - -```python -import requests -from datetime import datetime, timedelta, timezone - -# Setup -AGENTA_HOST = "https://cloud.agenta.ai" -API_KEY = "your_api_key_here" -BASE_URL = f"{AGENTA_HOST}/api/preview/tracing/spans/analytics" - -headers = { - "Authorization": f"ApiKey {API_KEY}", - "Content-Type": "application/json" -} - -# Get analytics for last 7 days with daily buckets -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=7) - -payload = { - "focus": "trace", - "interval": 1440, # 1440 minutes = daily buckets - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -print(f"Found {data['count']} daily buckets") -for bucket in data['buckets']: - if bucket['total']['count'] > 0: - print(f"\nDate: {bucket['timestamp'][:10]}") - print(f" Traces: {bucket['total']['count']}") - print(f" Cost: ${bucket['total']['costs']:.4f}") - print(f" Avg Duration: {bucket['total']['duration'] / bucket['total']['count']:.0f}ms") - print(f" Errors: {bucket['errors']['count']}") -``` - -### JavaScript - -```javascript -const AGENTA_HOST = "https://cloud.agenta.ai"; -const API_KEY = "your_api_key_here"; -const BASE_URL = `${AGENTA_HOST}/api/preview/tracing/spans/analytics`; - -// Get analytics for last 7 days with daily buckets -const newest = new Date(); -const oldest = new Date(newest.getTime() - 7 * 24 * 60 * 60 * 1000); - -const payload = { - focus: "trace", - interval: 1440, // 1440 minutes = daily buckets - windowing: { - oldest: oldest.toISOString(), - newest: newest.toISOString() - } -}; - -const response = await fetch(BASE_URL, { - method: "POST", - headers: { - "Authorization": `ApiKey ${API_KEY}`, - "Content-Type": "application/json" - }, - body: JSON.stringify(payload) -}); - -const data = await response.json(); - -console.log(`Found ${data.count} daily buckets`); -data.buckets.forEach(bucket => { - if (bucket.total.count > 0) { - const date = bucket.timestamp.substring(0, 10); - const avgDuration = bucket.total.duration / bucket.total.count; - console.log(`\nDate: ${date}`); - console.log(` Traces: ${bucket.total.count}`); - console.log(` Cost: $${bucket.total.costs.toFixed(4)}`); - console.log(` Avg Duration: ${avgDuration.toFixed(0)}ms`); - console.log(` Errors: ${bucket.errors.count}`); - } -}); -``` - -## Request Parameters - -All parameters are sent in the JSON request body: - -### Focus (Required) - -Controls the aggregation level: - -- **`trace`**: Aggregate by complete traces (most common) -- **`span`**: Aggregate individual spans - -Most analytics queries use `trace` to analyze complete LLM requests. - -```python -payload = { - "focus": "trace", - "interval": 1440 -} -``` - -### Interval (Required) - -Bucket size in minutes. Common values: - -- **`60`** = Hourly buckets -- **`1440`** = Daily buckets (24 hours) -- **`10080`** = Weekly buckets (7 days) - -```python -payload = { - "focus": "trace", - "interval": 1440 # Daily buckets -} -``` - -### Windowing (Optional) - -Specify the time range for your analytics. If not provided, defaults to the last 30 days. - -```python -from datetime import datetime, timedelta, timezone - -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=30) - -payload = { - "focus": "trace", - "interval": 1440, - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} -``` - -### Filter (Optional) - -Filter which traces to include in analytics. Uses the same filter syntax as the Query API. - -**Filter by status code:** -```python -payload = { - "focus": "trace", - "interval": 1440, - "filter": { - "conditions": [ - { - "field": "status.code", - "operator": "eq", - "value": "STATUS_CODE_OK" - } - ] - } -} -``` - -**Filter by span name:** -```python -payload = { - "focus": "trace", - "interval": 1440, - "filter": { - "conditions": [ - { - "field": "name", - "operator": "contains", - "value": "openai" - } - ] - } -} -``` - -**Multiple conditions:** -```python -payload = { - "focus": "trace", - "interval": 1440, - "filter": { - "operator": "and", - "conditions": [ - { - "field": "status.code", - "operator": "eq", - "value": "STATUS_CODE_OK" - }, - { - "field": "attributes.ag.metrics.costs.cumulative.total", - "operator": "gt", - "value": 0.01 - } - ] - } -} -``` - -## Response Format - -The API returns aggregated metrics grouped into time buckets: - -```json -{ - "count": 7, - "buckets": [ - { - "timestamp": "2025-10-24T00:00:00Z", - "interval": 1440, - "total": { - "count": 150, - "duration": 45000.5, - "costs": 0.0234, - "tokens": 1200.0 - }, - "errors": { - "count": 5, - "duration": 2300.0, - "costs": 0.0, - "tokens": 0.0 - } - }, - { - "timestamp": "2025-10-25T00:00:00Z", - "interval": 1440, - "total": { - "count": 200, - "duration": 60000.0, - "costs": 0.0312, - "tokens": 1600.0 - }, - "errors": { - "count": 3, - "duration": 1500.0, - "costs": 0.0, - "tokens": 0.0 - } - } - ] -} -``` - -### Response Fields - -- **`count`**: Number of time buckets returned -- **`buckets`**: Array of time-based aggregated metrics - -### Bucket Fields - -- **`timestamp`**: Start time of the bucket (ISO 8601) -- **`interval`**: Bucket size in minutes -- **`total`**: Aggregated metrics for all traces in this bucket - - **`count`**: Number of traces - - **`duration`**: Total duration in milliseconds - - **`costs`**: Total cost in USD - - **`tokens`**: Total tokens used -- **`errors`**: Aggregated metrics for failed traces only - - **`count`**: Number of failed traces - - **`duration`**: Total duration of failed traces in milliseconds - - **`costs`**: Total cost of failed traces (usually 0) - - **`tokens`**: Total tokens in failed traces (usually 0) - -## Common Use Cases - -### Monitor Daily Costs - -Track LLM spending over time: - -```python -import requests -from datetime import datetime, timedelta, timezone - -# Get daily costs for last 30 days -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=30) - -payload = { - "focus": "trace", - "interval": 1440, # Daily buckets - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -# Calculate totals -total_cost = sum(b['total']['costs'] for b in data['buckets']) -total_traces = sum(b['total']['count'] for b in data['buckets']) - -print(f"Total Cost (30 days): ${total_cost:.2f}") -print(f"Total Traces: {total_traces:,}") -print(f"Average Cost per Trace: ${total_cost/total_traces:.4f}") -``` - -### Analyze Error Trends - -Monitor error rates to identify reliability issues: - -```python -# Get hourly metrics for last 7 days -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=7) - -payload = { - "focus": "trace", - "interval": 60, # Hourly buckets - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -# Find high error rate periods -print("Hours with high error rates (>5%):") -for bucket in data['buckets']: - if bucket['total']['count'] > 0: - error_rate = (bucket['errors']['count'] / bucket['total']['count']) * 100 - if error_rate > 5: - print(f" {bucket['timestamp']}: {error_rate:.1f}%") -``` - -### Track Token Usage - -Monitor token consumption patterns: - -```python -# Get daily token usage for last 7 days -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=7) - -payload = { - "focus": "trace", - "interval": 1440, # Daily buckets - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -print("Daily Token Usage:") -for bucket in data['buckets']: - if bucket['total']['count'] > 0: - date = bucket['timestamp'][:10] - avg_tokens = bucket['total']['tokens'] / bucket['total']['count'] - print(f" {date}: {bucket['total']['tokens']:,.0f} total ({avg_tokens:.0f} avg)") -``` - -### Compare Performance - -Analyze latency trends over time: - -```python -# Get hourly performance for last 24 hours -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=1) - -payload = { - "focus": "trace", - "interval": 60, # Hourly buckets - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -print("Hourly Average Latency:") -latencies = [] -for bucket in data['buckets']: - if bucket['total']['count'] > 0: - avg_duration = bucket['total']['duration'] / bucket['total']['count'] - latencies.append(avg_duration) - hour = bucket['timestamp'][11:16] - print(f" {hour}: {avg_duration:.0f}ms") - -if latencies: - print(f"\nStatistics:") - print(f" Min: {min(latencies):.0f}ms") - print(f" Max: {max(latencies):.0f}ms") - print(f" Avg: {sum(latencies)/len(latencies):.0f}ms") -``` - -### Filter by Successful Traces Only - -Analyze only successful requests: - -```python -# Get metrics for successful traces only -newest = datetime.now(timezone.utc) -oldest = newest - timedelta(days=7) - -payload = { - "focus": "trace", - "interval": 1440, - "windowing": { - "oldest": oldest.isoformat(), - "newest": newest.isoformat() - }, - "filter": { - "conditions": [ - { - "field": "status.code", - "operator": "eq", - "value": "STATUS_CODE_OK" - } - ] - } -} - -response = requests.post(BASE_URL, headers=headers, json=payload) -data = response.json() - -# Calculate success metrics -total_count = sum(b['total']['count'] for b in data['buckets']) -total_cost = sum(b['total']['costs'] for b in data['buckets']) -total_duration = sum(b['total']['duration'] for b in data['buckets']) - -print("Successful Traces (Last 7 Days):") -print(f" Count: {total_count:,}") -print(f" Total Cost: ${total_cost:.4f}") -print(f" Avg Duration: {total_duration/total_count:.0f}ms") -``` - -## Next Steps - -- Learn about [Query API](/observability/query-data/query-api) for detailed trace data -- Explore [Using the UI](/observability/concepts) for visual analytics -- Read about [Semantic Conventions](/observability/trace-with-opentelemetry/semantic-conventions) for available metrics diff --git a/docs/docs/observability/query-data/_category_.json b/docs/docs/observability/query-data/_category_.json deleted file mode 100644 index 93a5859395..0000000000 --- a/docs/docs/observability/query-data/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Query Data", - "position": 8, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/observability/trace-with-opentelemetry/01-getting-started.mdx b/docs/docs/observability/trace-with-opentelemetry/01-getting-started.mdx deleted file mode 100644 index 2048c5c03f..0000000000 --- a/docs/docs/observability/trace-with-opentelemetry/01-getting-started.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: "Getting Started with OpenTelemetry" -sidebar_label: "Getting Started" -description: "Learn how to configure OpenTelemetry to send traces to Agenta's observability platform" -sidebar_position: 1 ---- - -Agenta accepts traces via the OpenTelemetry Protocol (OTLP) endpoint. You can use any OpenTelemetry-compatible instrumentation library to send traces to Agenta. - -## OTLP Endpoint - -Agenta accepts traces via the **OTLP/HTTP protocol** using **protobuf** encoding: - -**Endpoint:** `https://cloud.agenta.ai/api/otlp/v1/traces` - -For self-hosted installations, replace `https://cloud.agenta.ai` with your instance URL. - -:::warning -Agenta does **not** support `gRPC` for the OpenTelemetry endpoint. Please use **HTTP/protobuf** instead. -::: - -## Authentication - -Agenta uses ApiKey-based authentication for the OTLP endpoint: - -```javascript -headers: { - Authorization: `ApiKey ${AGENTA_API_KEY}` -} -``` - -### Getting Your API Key - -1. Visit the [Agenta API Keys page](https://cloud.agenta.ai/settings?tab=apiKeys) -2. Click on **Create New API Key** and follow the prompts -3. Copy the API key and set it as an environment variable: - -```bash -export AGENTA_API_KEY="YOUR_AGENTA_API_KEY" -export AGENTA_HOST="https://cloud.agenta.ai" # Change for self-hosted -``` - -## Configuration - -When using OpenTelemetry SDKs directly (without the Agenta SDK), configure the OTLP exporter to point to Agenta: - -```bash -OTEL_EXPORTER_OTLP_ENDPOINT="https://cloud.agenta.ai/api/otlp" -OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://cloud.agenta.ai/api/otlp/v1/traces" -OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey ${AGENTA_API_KEY}" -``` - -:::info -If your collector requires signal-specific environment variables, use the trace-specific endpoint: - -```bash -OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://cloud.agenta.ai/api/otlp/v1/traces" -OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=ApiKey ${AGENTA_API_KEY}" -``` -::: - -## Supported Languages - -OpenTelemetry SDKs are available for many languages: - -- **Python**: Use the [Agenta Python SDK](/observability/quickstart-python) or OpenTelemetry SDK directly -- **Node.js / TypeScript**: See the [OpenTelemetry Quick Start](/observability/quick-start-opentelemetry) -- **Java**: Use the OpenTelemetry Java SDK -- **Go**: Use the OpenTelemetry Go SDK -- **.NET**: Use the OpenTelemetry .NET SDK -- **Ruby, PHP, Rust**: OpenTelemetry SDKs available for all - -All can send traces to Agenta using the OTLP endpoint above. - -## Using OpenTelemetry Instrumentation Libraries - -Agenta is compatible with many OpenTelemetry instrumentation libraries that extend language and framework support. These libraries work seamlessly with Agenta's OTLP endpoint: - -### Popular Libraries - -- **[OpenLLMetry](https://github.com/Arize-ai/openllmetry)**: Supports multiple LLMs (OpenAI, Anthropic, Azure, etc.) and frameworks (LangChain, LlamaIndex) -- **[OpenLIT](https://github.com/openlit/openlit)**: Comprehensive instrumentation for LLMs, vector DBs, and frameworks -- **[OpenInference](https://arize-ai.github.io/openinference/)**: Arize's OpenTelemetry instrumentation for LLM applications - -### Framework Integrations - -Many frameworks have OpenTelemetry support built-in or via plugins: - -- **LangChain**: OpenTelemetry instrumentation available -- **LlamaIndex**: OpenTelemetry support via plugins -- **AutoGen**: OpenTelemetry compatible -- **Semantic Kernel**: OpenTelemetry integration available -- **Spring AI**: Java framework with OpenTelemetry support - -See the [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) page for details on how Agenta maps OpenTelemetry attributes. - -## Next Steps - -- Follow the [OpenTelemetry Quick Start](/observability/quick-start-opentelemetry) for a complete example -- Learn about [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) for better trace display -- Explore [distributed tracing](/observability/trace-with-opentelemetry/distributed-tracing) across services -- Configure the [OpenTelemetry Collector](/observability/trace-with-opentelemetry/otel-collector-configuration) to forward traces - diff --git a/docs/docs/observability/trace-with-opentelemetry/03-semantic-conventions.mdx b/docs/docs/observability/trace-with-opentelemetry/03-semantic-conventions.mdx deleted file mode 100644 index 6fbe80c3de..0000000000 --- a/docs/docs/observability/trace-with-opentelemetry/03-semantic-conventions.mdx +++ /dev/null @@ -1,298 +0,0 @@ ---- -title: "Semantic Conventions" -sidebar_label: "Semantic Conventions" -description: "Learn about the OpenTelemetry semantic conventions used by Agenta's LLM observability system" -sidebar_position: 3 ---- - -This document describes how Agenta applies domain-specific OpenTelemetry conventions to capture and analyze traces from LLM applications. - -## How It Works - -Agenta accepts any span that follows the OpenTelemetry specification. To unlock LLM-specific features—such as nicely formatted chat messages, per-request cost and latency, and links to prompt configurations or evaluators—we add attributes under the `ag.` namespace. - -:::info -The OTLP endpoint accepts batches up to **5 MB** by default (after decompression). Larger requests return an HTTP `413` status code. -::: - -We support two primary instrumentation approaches: - -- **Agenta SDK:** When using our SDK with decorators like `@ag.instrument`, we automatically handle the semantic conventions -- **Auto-instrumentation libraries:** We provide adapters that transform data from standard auto-instrumentation libraries (which follow their own conventions) into Agenta's format - -## Agenta Namespace - -All Agenta-specific attributes are organized under the `ag` namespace to avoid conflicts with other OpenTelemetry conventions. - -## Core Semantic Conventions - -### ag.data - -The `ag.data` namespace contains the core execution data for each span: - -- **`ag.data.inputs`**: Input parameters for the span -- **`ag.data.outputs`**: Output results from the span -- **`ag.data.internals`**: Internal variables and intermediate values - -#### Data Format - -**Inputs and Outputs**: Stored as JSON format. For chat applications using LLM spans, these are formatted as a list of messages: - -```json -{ - "data": { - "inputs": { - "prompt": [ - { "role": "system", "content": "System instruction" }, - { "role": "user", "content": "User query" } - ], - "functions": [...], - "tools": [...] - }, - "outputs": { - "completion": [ - { "role": "assistant", "content": "Assistant response" } - ] - } - } -} -``` - -**Internals**: User-provided internal information such as context variables, intermediate calculations, or evaluation data that aren't part of the primary inputs/outputs. These are set by the user [in the SDK using](/observability/trace-with-python-sdk/adding-metadata) `ag.tracing.store_internals()`. - -#### SDK Integration - -When using the `@ag.instrument` decorator in Python: - -```python -@ag.instrument -def my_function(input_param): - # Function inputs and outputs are automatically captured - # unless explicitly masked - return result -``` - -The decorator automatically captures function inputs and outputs in `ag.data.inputs` and `ag.data.outputs` unless you choose to [mask sensitive data](/observability/trace-with-python-sdk/redact-sensitive-data). - -### ag.meta - -The `ag.meta` namespace stores metadata about the span execution: - -```json -{ - "meta": { - "system": "openai", - "request": { - "base_url": "https://api.openai.com/v1", - "endpoint": "/chat/completions", - "headers": {...}, - "streaming": false, - "model": "gpt-4", - "max_tokens": 1000, - "temperature": 0.7, - "top_p": 0.9, - "top_k": 50 - }, - "response": { - "model": "gpt-4-0613" - }, - "configuration": { - "prompt": { - "input_keys": ["country"], - "messages": [...], - "template_format": "curly", - "llm_config": { - "model": "mistral/mistral-tiny" - } - } - } - } -} -``` - -#### Standard Metadata - -:::info -Auto-instrumentation maps common semantic-convention keys—e.g. gen_ai.system, gen_ai.request.*—to the structure above. -::: - -- `ag.meta.system`: Identifies the LLM provider or system being used (e.g., "openai", "anthropic") -- `ag.meta.request.base_url`: The base URL for the API request -- `ag.meta.request.endpoint`: The specific API endpoint called -- `ag.meta.request.headers`: HTTP headers sent with the request -- `ag.meta.request.streaming`: Boolean indicating if streaming mode was used -- `ag.meta.request.model`: The model name requested -- `ag.meta.request.max_tokens`: Maximum token limit for the response -- `ag.meta.request.temperature`: Sampling temperature parameter -- `ag.meta.request.top_p`: Nucleus sampling parameter -- `ag.meta.request.top_k`: Top-k sampling parameter - -Metadata is displayed in the observability overview page as contextual information to help navigate and understand span execution. - -### References - -Use the top level `references` array to link spans to Agenta entities. Every entry represents one relationship and includes: - -- `attributes.key`: the reference category (for example `application`, `evaluator_variant`) -- `id`, `slug`, or `version`: supply whichever identifiers you have; you can include more than one field if available - -Example payload: - -```json -{ - "references": [ - {"id": "019a0159-82d3-7760-9868-4f8c7da8e9c0", "attributes": {"key": "application"}}, - {"slug": "production", "attributes": {"key": "environment"}}, - {"id": "019a0159-82d3-7760-9868-4f8c7da8e9c1", "version": "4", "attributes": {"key": "application_variant"}} - ] -} -``` - -Supported categories: - -- application, application_variant, application_revision -- environment, environment_variant, environment_revision -- evaluator, evaluator_variant, evaluator_revision -- testset, testset_variant, testset_revision, testcase -- query, query_variant, query_revision -- workflow, workflow_variant, workflow_revision - -Consumers (UI, analytics, filtering) read from this array. Instrumentation libraries that cannot emit the array may still set the attribute form (`ag.references.<category>.<field>`); the ingestion service converts that dictionary into the same array before storage. - -:::warning -The legacy `ag.refs.*` namespace is deprecated and will be removed after existing SDKs migrate. Do not rely on it. -::: - -### ag.metrics - -The `ag.metrics` namespace tracks performance, cost, and error metrics: - -```json -{ - "metrics": { - "costs": { - "cumulative": { - "total": 0.0070902, - "prompt": 0.00355, - "completion": 0.00354 - }, - "incremental": { - "total": 0.0070902 - } - }, - "tokens": { - "cumulative": { - "total": 992, - "prompt": 175, - "completion": 817 - }, - "incremental": { - "total": 992, - "prompt": 175, - "completion": 817 - } - }, - "duration": { - "cumulative": 19889.343 - }, - "errors": {} - } -} -``` - -#### Aggregation Types - -Metrics are tracked at two levels: - -- **`incremental`**: Metrics for this span only (excluding child spans) -- **`cumulative`**: Metrics for this span plus all child spans aggregated together - -This dual tracking allows you to see both the cost of individual operations and the total cost of complex workflows. - -#### Metric Categories - -##### Costs - -Tracks LLM API costs in USD with the following breakdown: - -**Cumulative (this span + children):** -- **`ag.metrics.costs.cumulative.total`**: Total cost across all LLM calls in this span and its children -- **`ag.metrics.costs.cumulative.prompt`**: Cost attributed to input tokens -- **`ag.metrics.costs.cumulative.completion`**: Cost attributed to output/completion tokens - -**Incremental (this span only):** -- **`ag.metrics.costs.incremental.total`**: Cost for this span's operations only -- **`ag.metrics.costs.incremental.prompt`**: Prompt cost for this span only -- **`ag.metrics.costs.incremental.completion`**: Completion cost for this span only - -:::info -Cost calculation uses the latest pricing for each model provider. Costs are automatically calculated when using standard LLM integrations. Cumulative metrics are automatically calculated by the backend by aggregating incremental values. -::: - -##### Tokens - -Tracks token usage at both aggregation levels: - -**Cumulative:** -- **`ag.metrics.tokens.cumulative.total`**: Total tokens across all operations -- **`ag.metrics.tokens.cumulative.prompt`**: Input tokens across all operations -- **`ag.metrics.tokens.cumulative.completion`**: Output tokens across all operations - -**Incremental:** -- **`ag.metrics.tokens.incremental.total`**: Tokens for this span only -- **`ag.metrics.tokens.incremental.prompt`**: Input tokens for this span only -- **`ag.metrics.tokens.incremental.completion`**: Output tokens for this span only - -##### Duration - -Tracks execution time in milliseconds: - -- **`ag.metrics.duration.cumulative`**: Total execution time including all child spans - - -## Additional Agenta Attributes - -### ag.type - -The `ag.type` namespace contains type information about the span: - -`ag.type.node` can be `workflow`, `task`, `tool`, `embedding`, `query`, `completion`, `chat`, `rerank`. - -### ag.tags - -The `ag.tags` namespace allows you to add custom tags to spans for categorization and filtering: - -```python -# Add custom tags using the SDK -ag.add_tags({"key":"value"}) -``` - -### ag.version - -Tracks version information for the instrumented application or component. - -### ag.flags - -Contains system-specific flags and metadata used internally by Agenta for span processing and display. - -:::note -When using auto-instrumentation libraries, most attributes are saved twice - once in their original format and once processed under the `ag` namespace -::: - -## Standard OpenTelemetry Attributes - -In addition to Agenta-specific conventions, traces include standard OpenTelemetry attributes: - -- **Links**: Relationships between spans -- **Events**: Timestamped events within spans -- **Version**: OpenTelemetry version information -- **Status Code**: Span completion status -- **Start Time**: Span initiation timestamp -- **Span Name**: Human-readable span identifier -- **Span Kind**: Type of span (server, client, internal, etc.) - -## Next steps - -- Learn about [distributed tracing](/observability/trace-with-opentelemetry/distributed-tracing) -- Explore [Python SDK tracing](/observability/trace-with-python-sdk/setup-tracing) for easier instrumentation -- See [integration guides](/observability/integrations/openai) for specific frameworks diff --git a/docs/docs/observability/trace-with-opentelemetry/04-distributed-tracing.mdx b/docs/docs/observability/trace-with-opentelemetry/04-distributed-tracing.mdx deleted file mode 100644 index 57a3a99021..0000000000 --- a/docs/docs/observability/trace-with-opentelemetry/04-distributed-tracing.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "Distributed Tracing" -sidebar_label: "Distributed Tracing" -description: "Learn how to implement distributed tracing across services with OpenTelemetry and Agenta" -sidebar_position: 4 ---- - -## OpenTelemetry Tracing without Agenta SDK - - -If you're working with systems that don't use the Agenta SDK, you can still integrate with Agenta's tracing infrastructure using standard OpenTelemetry. - -### 1. Setup Requirements - -Install dependencies: - -```bash -pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp -``` - -### 2. Configure Environment Variables - -```bash -# OTEL_PROPAGATORS = unset or "tracecontext,baggage" -# OTEL_EXPORTER_OTLP_COMPRESSION = unset or "gzip" -# OTEL_EXPORTER_OTLP_ENDPOINT = "https://cloud.agenta.ai/api/otlp" -# OTEL_EXPORTER_OTLP_HEADERS = "authorization=ApiKey xxx" -# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = "https://cloud.agenta.ai/api/otlp/v1/traces" -# OTEL_EXPORTER_OTLP_TRACES_HEADERS = "authorization=ApiKey xxx" -``` - -### 3. Setup in Code - -```python -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator -from opentelemetry.baggage.propagation import W3CBaggagePropagator -from opentelemetry.sdk.trace import TracerProvider, Span -from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter, Compression - -# Configuration -endpoint = "https://cloud.agenta.ai/api/otlp/v1/traces" -compression = Compression.Gzip -headers = { - "traceparent": "00-xxx-xxx-01", - "baggage": "ag.refs.application.id=xxx", - "authorization": "ApiKey xxx", -} - -# Set up provider, processor, and tracer -provider = TracerProvider() - -processor = BatchSpanProcessor( - OTLPSpanExporter( - endpoint=endpoint, - headers={"authorization": headers["authorization"]}, - compression=compression, - ) -) - -provider.add_span_processor(processor) - -tracer = provider.get_tracer("agenta.tracer") - -# Extract incoming trace context -carrier = {"traceparent": headers["traceparent"]} -context = TraceContextTextMapPropagator().extract(carrier=carrier, context=None) - -carrier = {"baggage": headers["baggage"]} -context = W3CBaggagePropagator().extract(carrier=carrier, context=context) - -# Create and use spans -with tracer.start_as_current_span(name="agenta", context=context) as span: - span: Span - - print(hex(span.get_span_context().trace_id)) - print(hex(span.get_span_context().span_id)) - print(span.name) -``` - -## Next steps - -- Learn about [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) -- Explore [collector configuration](/observability/trace-with-opentelemetry/otel-collector-configuration) -- See [Python SDK distributed tracing](/observability/trace-with-python-sdk/distributed-tracing) for Agenta SDK approach diff --git a/docs/docs/observability/trace-with-opentelemetry/05-otel-collector-configuration.mdx b/docs/docs/observability/trace-with-opentelemetry/05-otel-collector-configuration.mdx deleted file mode 100644 index 45c6571dfc..0000000000 --- a/docs/docs/observability/trace-with-opentelemetry/05-otel-collector-configuration.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "OpenTelemetry Collector Configuration" -sidebar_label: "OTEL Collector Configuration" -description: "Configure the OpenTelemetry Collector to forward traces to Agenta" -sidebar_position: 5 ---- - -The [OpenTelemetry Collector](https://opentelemetry.io/docs/collector) is a vendor-agnostic service that receives, processes, and exports telemetry data. You can use it to collect traces from multiple sources and forward them to Agenta. - -## Configuration - -Here's a configuration file (`otel-collector-config.yml`) that receives traces via OTLP/HTTP and forwards them to Agenta: - -```yaml -receivers: - otlp: - protocols: - http: - endpoint: 0.0.0.0:4318 - -processors: - batch: - timeout: 5s - send_batch_size: 512 - -exporters: - otlphttp/agenta: - endpoint: "https://cloud.agenta.ai/api/otlp/v1/traces" - headers: - Authorization: "ApiKey ${AGENTA_API_KEY}" - -service: - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [otlphttp/agenta] -``` - -### Configuration Details - -**Receivers**: The collector receives traces via OTLP/HTTP on port `4318`. - -**Processors**: The `batch` processor collects spans and sends them in batches: -- `timeout`: Maximum time to wait before sending a batch (default: 5s) -- `send_batch_size`: Number of spans to collect before sending (default: 512) - -**Exporters**: The `otlphttp/agenta` exporter forwards traces to Agenta using HTTP/protobuf: -- Endpoint: `https://cloud.agenta.ai/api/otlp/v1/traces` -- Authentication: Uses `ApiKey` authentication header - -:::warning -Agenta only supports **HTTP/protobuf** for the OpenTelemetry endpoint. gRPC is not supported. -::: - -For self-hosted Agenta deployments, replace the endpoint in the exporter configuration: - -```yaml -exporters: - otlphttp/agenta: - endpoint: "http://your-agenta-instance:port/api/otlp/v1/traces" - headers: - Authorization: "ApiKey ${AGENTA_API_KEY}" -``` - -## Next Steps - -- Learn about [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) for proper trace formatting -- Explore [distributed tracing](/observability/trace-with-opentelemetry/distributed-tracing) without the Agenta SDK diff --git a/docs/docs/observability/trace-with-opentelemetry/_category_.json b/docs/docs/observability/trace-with-opentelemetry/_category_.json deleted file mode 100644 index aef5391a04..0000000000 --- a/docs/docs/observability/trace-with-opentelemetry/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Trace with OpenTelemetry", - "position": 6, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/observability/trace-with-python-sdk/01-setup-tracing.mdx b/docs/docs/observability/trace-with-python-sdk/01-setup-tracing.mdx deleted file mode 100644 index bd063ec70b..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/01-setup-tracing.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "Setup Tracing" -sidebar_label: "Setup Tracing" -description: "Learn how to set up tracing with the Agenta Python SDK for LLM observability" -sidebar_position: 1 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -The Agenta Observability SDK integrates with the OpenTelemetry SDK. It wraps OpenTelemetry and provides a user-friendly way to instrument your LLM applications. - -The SDK provides: - -- Automatic OpenTelemetry setup -- Easy function instrumentation using [decorators](/observability/trace-with-python-sdk/instrument-functions) -- [Reference prompt versions](/observability/trace-with-python-sdk/reference-prompt-versions) to link traces to applications, variants, and environments -- [Add attributes](/observability/trace-with-python-sdk/adding-metadata) to spans for additional metadata - -The SDK works with auto instrumentation. You should use auto instrumentation together with this SDK. - -## Installation - -**1. Install the Agenta SDK** - -```bash -pip install -U agenta -``` - -## Configuration - -**2. Set environment variables** - -1. Visit the [Agenta API Keys page](https://cloud.agenta.ai/settings?tab=apiKeys). -2. Click on **Create New API Key** and follow the prompts. - -```python -import os - -os.environ["AGENTA_API_KEY"] = "YOUR_AGENTA_API_KEY" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" -``` - -**3. Initialize the SDK** - -```python -import agenta as ag - -ag.init() -``` - -That's it! You're now ready to instrument your functions and start capturing traces. - -## Next steps - -- Learn how to [instrument your functions](/observability/trace-with-python-sdk/instrument-functions) -- Link traces to [prompt versions](/observability/trace-with-python-sdk/reference-prompt-versions) -- Understand how to [redact sensitive data](/observability/trace-with-python-sdk/redact-sensitive-data) diff --git a/docs/docs/observability/trace-with-python-sdk/02-instrument-functions.mdx b/docs/docs/observability/trace-with-python-sdk/02-instrument-functions.mdx deleted file mode 100644 index 86249b2b4b..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/02-instrument-functions.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "Instrument Your Functions" -sidebar_label: "Instrument Functions" -description: "Learn how to instrument functions for LLM observability and tracing using the Agenta Python SDK decorator" -sidebar_position: 2 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -To instrument a function, add the `@ag.instrument()` decorator. This automatically captures all input and output data. - -The decorator has a `spankind` argument to categorize each span in the UI. Available types are: - -`agent`, `chain`, `workflow`, `tool`, `embedding`, `query`, `completion`, `chat`, `rerank` - -:::info -The default span kind is `workflow`. -::: - -:::caution -The instrument decorator should be the top-most decorator on a function (i.e. the last decorator before the function call). -::: - -```python -import agenta as ag - -@ag.instrument(spankind="task") -def my_llm_call(country: str): - prompt = f"What is the capital of {country}" - response = client.chat.completions.create( - model='gpt-4', - messages=[ - {'role': 'user', 'content': prompt}, - ], - ) - return response.choices[0].text - -@ag.instrument(spankind="workflow") -def generate(country: str): - return my_llm_call(country) -``` - -Agenta automatically determines the parent span based on the function call and nests the spans accordingly. - -## Next steps - -- Learn how to [add metadata and internals](/observability/trace-with-python-sdk/adding-metadata) -- Link traces to [prompt versions](/observability/trace-with-python-sdk/reference-prompt-versions) -- Understand how to [redact sensitive data](/observability/trace-with-python-sdk/redact-sensitive-data) diff --git a/docs/docs/observability/trace-with-python-sdk/03-adding-metadata.mdx b/docs/docs/observability/trace-with-python-sdk/03-adding-metadata.mdx deleted file mode 100644 index f0cbe08edc..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/03-adding-metadata.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "Adding Metadata" -sidebar_label: "Adding Metadata" -description: "Learn how to add metadata and internals to spans for LLM observability and tracing" -sidebar_position: 3 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -You can add additional information to spans using metadata and internals. Both use semantic conventions under the `ag` namespace. Metadata is saved under `ag.meta`. Internals are saved under `ag.data.internals`. - -See the [semantic conventions guide](/observability/trace-with-opentelemetry/semantic-conventions) for more details on how attributes are organized. - -## Adding metadata - -Use `ag.tracing.store_meta()` to add metadata to a span. This function accesses the active span from the context and adds the key-value pairs to the metadata. - -```python -@ag.instrument(spankind="task") -def compile_prompt(country: str): - prompt = f"What is the capital of {country}" - - # highlight-next-line - ag.tracing.store_meta({"prompt_template": prompt}) - - formatted_prompt = prompt.format(country=country) - return formatted_prompt -``` - -## Storing internals - -Use `ag.tracing.store_internals()` to store internals in a span: - -```python -@ag.instrument(spankind="workflow") -def rag_workflow(query: str): - - context = retrieve_context(query) - - # highlight-start - ag.tracing.store_internals({"context": context}) - # highlight-end - - prompt = f"Answer the following question {query} based on the context: {context}" - - completion = client.chat.completions.create( - model='gpt-4', - messages=[ - {'role': 'user', 'content': prompt}, - ], - ) - return completion.choices[0].message.content -``` - -## Differences between metadata and internals - -Both metadata and internals can be used for evaluation and filtering. The main differences are: - -1. Internals are searchable using plain text queries because they are saved under `ag.data`. -2. Internals are shown in the overview tab of the observability drawer together with inputs and outputs, making them easy to see. - -As a rule of thumb, if your context is short, put important information that helps understand the span into internals. - -## Next steps - -- Link traces to [prompt versions](/observability/trace-with-python-sdk/reference-prompt-versions) -- Understand how to [redact sensitive data](/observability/trace-with-python-sdk/redact-sensitive-data) -- Explore [distributed tracing](/observability/trace-with-python-sdk/distributed-tracing) across services - diff --git a/docs/docs/observability/trace-with-python-sdk/04-reference-prompt-versions.mdx b/docs/docs/observability/trace-with-python-sdk/04-reference-prompt-versions.mdx deleted file mode 100644 index 19bbbb9d1a..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/04-reference-prompt-versions.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "Reference Prompt Versions" -sidebar_label: "Reference Prompt Versions" -description: "Learn how to link traces to specific applications, variants, and environments in Agenta" -sidebar_position: 4 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -You can link a span to an application, variant, and environment by calling `ag.tracing.store_refs()`. - -Applications, variants, and environments can be referenced by their slugs, versions, and commit IDs (for specific versions). - -## Basic usage - -You can link a span to an application and variant like this: - -```python -import agenta as ag - -@ag.instrument(spankind="workflow") -def generate(country: str): - prompt = f"What is the capital of {country}" - - formatted_prompt = prompt.format(country=country) - - completion = client.chat.completions.create( - model='gpt-4', - messages=[ - {'role': 'user', 'content': formatted_prompt}, - ], - ) - - # highlight-start - ag.tracing.store_refs( - { - "application.slug": "capital-app", - "environment.slug": "production", - } - ) - # highlight-end - return completion.choices[0].message.content -``` - -## Available reference keys - -`ag.tracing.store_refs()` takes a dict with keys from: - -- `application.slug` -- `application.id` -- `variant.slug` -- `variant.id` -- `variant.version` -- `environment.slug` -- `environment.id` -- `environment.version` - -The values should be the slug, id, or version of the application, variant, and environment respectively. - -## Why link traces? - -Linking traces to applications and variants allows you to: - -- **Filter traces** by application, variant, or environment in the UI -- **Compare performance** across different variants -- **Track production behavior** by environment -- **Create test sets** from production traces with proper context - -## Next steps - -- Learn how to [redact sensitive data](/observability/trace-with-python-sdk/redact-sensitive-data) -- Understand how to [track costs](/observability/trace-with-python-sdk/track-costs) -- Explore [distributed tracing](/observability/trace-with-python-sdk/distributed-tracing) across services diff --git a/docs/docs/observability/trace-with-python-sdk/05-redact-sensitive-data.mdx b/docs/docs/observability/trace-with-python-sdk/05-redact-sensitive-data.mdx deleted file mode 100644 index 7b71f46203..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/05-redact-sensitive-data.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "Redact Sensitive Data" -sidebar_label: "Redact Sensitive Data" -description: "Learn how to exclude sensitive data from traces using the Agenta Python SDK" -sidebar_position: 5 ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -<GoogleColabButton notebookPath="examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -In some cases, you may want to exclude parts of the inputs or outputs due to privacy concerns or because the data is too large to be stored in the span. - -## Simple redaction - -You can do this by setting the `ignore_inputs` and/or `ignore_outputs` arguments to `True` in the instrument decorator. - -```python -import agenta as ag - -@ag.instrument( - spankind="workflow", - ignore_inputs=True, - ignore_outputs=True -) -def rag_workflow(query: str): - ... -``` - -## Selective redaction - -If you want more control, you can specify which parts of the inputs and outputs to exclude: - -```python -@ag.instrument( - spankind="workflow", - ignore_inputs=["user_id"], - ignore_outputs=["pii"], -) -def rag_workflow(query: str, user_id: str): - ... - return { - "result": ..., - "pii": ... - } -``` - -## Custom redaction callback - -For even finer control, you can use a custom `redact()` callback, along with instructions in the case of errors. - -```python -def my_redact(name, field, data): - if name == "rag_workflow": - if field == "inputs": - del data["user_id"] - if field == "outputs": - del data["pii"] - - return data - - -@ag.instrument( - spankind="workflow", - redact=my_redact, - redact_on_error=False, -) -def rag_workflow(query: str, user_id: str): - ... - return { - "result": ..., - "pii": ... - } -``` - -## Global redaction rules - -Finally, if you want to set up global rules for redaction, you can provide a global `redact()` callback that applies everywhere. - -```python -from typing import Dict, Any - -def global_redact( - name: str, - field: str, - data: Dict[str, Any] -): - if "pii" in data: - del data["pii"] - - return data - - -ag.init( - redact=global_redact, - redact_on_error=True, -) - -def local_redact( - name: str, - field: str, - data: Dict[str, Any] -): - if name == "rag_workflow": - if field == "inputs": - del data["user_id"] - - return data - - -@ag.instrument( - spankind="workflow", - redact=local_redact, - redact_on_error=False, -) -def rag_workflow(query: str, user_id: str): - ... - return { - "result": ..., - "pii": ... - } -``` - -## Best practices - -- **Use selective redaction** rather than blocking all inputs/outputs when possible -- **Test your redaction rules** to ensure they work as expected -- **Consider global rules** for organization-wide PII policies -- **Document redacted fields** so team members know what data is missing - -## Next steps - -- Understand how to [track costs](/observability/trace-with-python-sdk/track-costs) -- Explore [distributed tracing](/observability/trace-with-python-sdk/distributed-tracing) across services -- Learn how to [annotate traces](/observability/trace-with-python-sdk/annotate-traces) programmatically diff --git a/docs/docs/observability/trace-with-python-sdk/06-track-costs.mdx b/docs/docs/observability/trace-with-python-sdk/06-track-costs.mdx deleted file mode 100644 index 9ca6bc1b01..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/06-track-costs.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: "Track Costs" -sidebar_label: "Track Costs" -description: "Learn how Agenta automatically tracks and aggregates LLM costs, token usage, and performance metrics across your traces" -sidebar_position: 6 ---- - -Agenta automatically tracks costs, token usage, and performance metrics for your LLM applications. This data is captured in the `ag.metrics` namespace of each span. - -## Overview - -When you instrument your application with Agenta, we automatically collect cost and performance metrics for spans of type chat. - -Costs are calculated using the latest pricing for each model provider. Token usage is tracked separately for input (prompt) and output (completion) tokens. Execution time is measured in milliseconds for each operation. - -## Metrics Structure - -### Cost Metrics - -Costs are tracked in USD with the following breakdown: - -```json -{ - "metrics": { - "costs": { - "cumulative": { - "total": 0.0070902, - "prompt": 0.00355, - "completion": 0.00354 - } - } - } -} -``` - -The `total` field shows the total cost across all LLM calls in this span and its children. The `prompt` field shows the cost attributed to input tokens. The `completion` field shows the cost for output tokens. - -### Token Usage - -Token consumption is tracked with separate counts for input and output: - -```json -{ - "metrics": { - "tokens": { - "cumulative": { - "total": 992, - "prompt": 175, - "completion": 817 - } - } - } -} -``` - -The `total` field shows all tokens used (prompt plus completion). The `prompt` field shows input tokens consumed. The `completion` field shows output tokens generated. - -### Duration - -Execution time is measured in milliseconds: - -```json -{ - "metrics": { - "duration": { - "cumulative": 19889.343 - } - } -} -``` - -:::info -Agenta tracks metrics at two levels. **Incremental metrics** represent costs for a single span only. **Cumulative metrics** aggregate values from the current span plus all child spans. -::: - -## How to Track Costs - -### With Auto-Instrumentation - -When you use auto-instrumentation from [compatible libraries](/observability/concepts#auto-instrumentation-compatibility), prompts and tokens are automatically extracted and formatted. Costs are calculated when possible. - -```python -import agenta as ag -from openinference.instrumentation.openai import OpenAIInstrumentor - -ag.init() -OpenAIInstrumentor().instrument() - -@ag.instrument() -def generate_response(prompt: str): - response = client.chat.completions.create( - model="gpt-4", - messages=[{"role": "user", "content": prompt}] - ) - return response.choices[0].message.content -``` - -### With Manual Instrumentation - -You can manually add cost metrics to spans using incremental metrics: - -```python -import agenta as ag - -@ag.instrument() -def custom_llm_call(prompt: str): - # Your custom LLM call logic - response = my_custom_llm.generate(prompt) - - # Manually track incremental metrics (for this span only) - ag.tracing.store_metrics({ - "costs.incremental.total": 0.0025, - "costs.incremental.prompt": 0.0015, - "costs.incremental.completion": 0.001, - "tokens.incremental.total": 150, - "tokens.incremental.prompt": 100, - "tokens.incremental.completion": 50 - }) - - # Cumulative metrics are automatically calculated by the backend - - return response -``` - -## Automatic Cost Calculation - -Agenta calculates costs automatically for major LLM providers using the LiteLLM library. When the cost is not provided in the span and the span type is chat, we try to infer the cost from the number of tokens. - -### Custom Pricing - -For custom models or providers, you can manually set costs using incremental metrics: - -```python -import agenta as ag - -@ag.instrument() -def custom_model_call(prompt: str): - response = my_model.generate(prompt) - - # Calculate custom cost - prompt_tokens = len(prompt.split()) - completion_tokens = len(response.split()) - - # Custom pricing - cost_per_prompt_token = 0.00001 - cost_per_completion_token = 0.00002 - - prompt_cost = prompt_tokens * cost_per_prompt_token - completion_cost = completion_tokens * cost_per_completion_token - total_cost = prompt_cost + completion_cost - - # Set incremental metrics - ag.tracing.store_metrics({ - "costs.incremental.total": total_cost, - "costs.incremental.prompt": prompt_cost, - "costs.incremental.completion": completion_cost, - "tokens.incremental.total": prompt_tokens + completion_tokens, - "tokens.incremental.prompt": prompt_tokens, - "tokens.incremental.completion": completion_tokens - }) - - return response -``` - -## Next steps - -Learn about [adding metadata](/observability/trace-with-python-sdk/adding-metadata) to enrich your traces. diff --git a/docs/docs/observability/trace-with-python-sdk/07-distributed-tracing.mdx b/docs/docs/observability/trace-with-python-sdk/07-distributed-tracing.mdx deleted file mode 100644 index 8423b80b66..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/07-distributed-tracing.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Distributed Tracing" -sidebar_label: "Distributed Tracing" -description: "Learn how to implement distributed tracing across services with the Agenta SDK" -sidebar_position: 7 ---- - -When using the Agenta SDK, distributed tracing is handled automatically with the provided SDK functions. This guide shows you how to propagate trace context across services and extract it when receiving requests. - -## Using OpenTelemetry with Agenta SDK - -Agenta supports distributed tracing out of the box when using the provided SDK functions: - -### 1. Sending Requests (Propagation) - -When making requests to other services or sub-systems, use `agenta.tracing.inject()` to inject necessary headers: - -```python -import agenta as ag - -method = "POST" -url = "https://example-service/api" -params = {} -headers = agenta.tracing.inject() # automatically injects 'Authorization', 'Traceparent', 'Baggage' -body = {"key": "value"} - -response = requests.request( - method=method, - url=url, - params=params, - headers=headers, - json=body, -) -``` - -The `agenta.tracing.inject()` function returns headers containing: - -- `Authorization`: Authentication information -- `Traceparent`: Identifies the current trace and span -- `Baggage`: Contains application-specific context - -These headers can be modified before sending them as part of the request if needed. - -### 2. Receiving Requests (Extraction) - -Agenta simplifies receiving and handling incoming trace contexts: - -- If you're using `ag.route()` and `ag.instrument()`, extraction is automatic. -- For manual extraction, use `agenta.tracing.extract()`: - -```python -traceparent, baggage = agenta.tracing.extract() # includes 'Traceparent', 'Baggage' - -# Use traceparent and baggage to set up your OpenTelemetry context -# (Implementation depends on your specific use case) -``` - -:::note -`extract()` does not provide `Authorization` because there are many authentication methods (apikey, bearer, secret, access tokens), each requiring different handling. The middlewares and decorators in the Agenta SDK handle this automatically when you use `ag.route()` and `ag.instrument()`. -::: - -## Next Steps - -- Learn about [tracing without the Agenta SDK](/observability/trace-with-opentelemetry/distributed-tracing) for raw OpenTelemetry setup -- Explore [semantic conventions](/observability/trace-with-opentelemetry/semantic-conventions) for better trace formatting -- See [instrumenting functions](/observability/trace-with-python-sdk/instrument-functions) for automatic instrumentation - diff --git a/docs/docs/observability/trace-with-python-sdk/08-annotate-traces.mdx b/docs/docs/observability/trace-with-python-sdk/08-annotate-traces.mdx deleted file mode 100644 index 4240c70168..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/08-annotate-traces.mdx +++ /dev/null @@ -1,522 +0,0 @@ ---- -title: "Annotate Traces" -sidebar_label: "Annotate Traces" -description: "Learn how to programmatically add annotations to traces using the Agenta API - collect feedback, scores, and custom metrics" -sidebar_position: 8 ---- - -```mdx-code-block -import Image from "@theme/IdealImage"; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -Annotations in Agenta let you enrich the traces created by your LLM applications. You can add scores, comments, expected answers and other metrics to help evaluate your application's performance. - -<GoogleColabButton notebookPath="examples/jupyter/observability/annotate-traces-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -<Image - style={{ display: "block", margin: "10px auto", marginBottom: "20px" }} - img={require("/images/evaluation/viewing-annotations.png")} - alt="Screenshot showing how annotations appear in the Agenta UI" - loading="lazy" -/> - -## What You Can Do With Annotations - -- Collect user feedback on LLM responses -- Run custom evaluation workflows -- Measure application performance in real-time - -## Understanding How Annotations Work - -Annotations **link** to specific points (spans) in your application traces. You can **link** them to: -- Parent spans (like an agent invocation) -- Child spans (like a single LLM call within a larger process) - -Each annotation can include: -- Numbers (scores, ratings) -- Categories (labels, classifications) -- Text (comments, reasoning) - -### Annotation Structure - -Here's what an annotation looks like: - -```json -{ - "data": { - "outputs": { - "score": 80, - "normalized_score": 0.8, - "reasoning": "The answer is mainly correct" - } - }, - "references": { - "evaluator": { - "slug": "my_evaluator" - } - }, - "links": { - "invocation": { - "trace_id": "47cb4a13b42a47bab2198509543ff14d", - "span_id": "1a9130f6ad398e55" - } - }, - "metadata": { - "someattr": "somevalue" - } -} -``` - -An annotation has four main parts: - -1. **Data**: The actual evaluation content (scores, comments) -2. **References**: Which evaluator to use (will be created automatically if it doesn't exist) -3. **Links**: Which trace and span you're annotating -4. **Metadata** (optional): Any extra information you want to include - -### What You Can Include in Annotations - -Annotations are flexible - you can include whatever makes sense for your evaluation: - -```json -// Just a simple score -{"score": 3} - -// A score with explanation -{"score": 3, "comment": "The response is not grounded"} - -// Multiple metrics with reference information -{"score": 3, "normalized_score": 0.5, "comment": "The response is not grounded", "expected_answer": "The capital of France is Paris"} -``` - -You can use numbers, text, booleans, or categorical values. - -### Connecting Annotations to Traces - -Each annotation links to a specific span in your trace using a `trace_id` and `span_id`. These IDs follow the OpenTelemetry format. - -:::warning -Agenta doesn't check if the trace and span IDs exist. Make sure they're valid before sending. -::: - -### Working with Evaluators - -Every annotation must reference an `Evaluator`, which: -- Defines what your annotation should contain -- Provides context for interpreting the annotation - -If you reference an evaluator that doesn't exist yet, Agenta will automatically create one based on your first annotation. - -You can add multiple annotations from the same evaluator to a single span, which is useful for collecting feedback from different sources. - -### Using Metadata - -The `metadata` field lets you add extra information to your annotation. Use it to store things like user IDs, session information, or other context. - -## Creating Annotations - -<Tabs> -<TabItem value="python" label="Python"> - -```python -import requests - -base_url = "https://cloud.agenta.ai" -headers = { - "Content-Type": "application/json", - "Authorization": "ApiKey YOUR_API_KEY" -} - -# Annotation data -annotation_data = { - "annotation": { - "data": { - "outputs": { - "score": 40, - "reasoning": "Response contains some inaccuracies", - "labels": ["Partially Correct", "Needs Improvement"] - } - }, - "references": { - "evaluator": { - "slug": "content_quality" - } - }, - "links": { - "invocation": { - "trace_id": "47cb4a13b42a47bab2198509543ff14d", - "span_id": "1a9130f6ad398e55" - } - } - } -} - -# Make the API request -response = requests.post( - f"{base_url}/api/preview/annotations/", - headers=headers, - json=annotation_data -) - -# Process the response -if response.status_code == 200: - print("Annotation created successfully") - print(response.json()) -else: - print(f"Error: {response.status_code}") - print(response.text) -``` - -</TabItem> -<TabItem value="javascript" label="JS/TS"> - -```javascript -async function createAnnotation() { - const baseUrl = 'https://cloud.agenta.ai'; - - const headers = { - 'Content-Type': 'application/json', - 'Authorization': 'ApiKey YOUR_API_KEY' - }; - - const annotationData = { - annotation: { - data: { - outputs: { - score: 40, - reasoning: "Response contains some inaccuracies", - labels: ["Partially Correct", "Needs Improvement"] - } - }, - references: { - evaluator: { - slug: "content_quality" - } - }, - links: { - invocation: { - trace_id: "47cb4a13b42a47bab2198509543ff14d", - span_id: "1a9130f6ad398e55" - } - } - } - }; - - try { - const response = await fetch(`${baseUrl}/api/preview/annotations/`, { - method: 'POST', - headers: headers, - body: JSON.stringify(annotationData) - }); - - if (response.ok) { - const data = await response.json(); - console.log("Annotation created successfully"); - console.log(data); - } else { - console.error(`Error: ${response.status}`); - console.error(await response.text()); - } - } catch (error) { - console.error("Request failed:", error); - } -} - -createAnnotation(); -``` - -</TabItem> -</Tabs> - -:::info -If the evaluator doesn't exist yet, Agenta will create it automatically based on your first annotation. -::: - -## Understanding the Response - -When you create an annotation, you'll receive a response that includes the annotation data and its ID: - -```json -{ - "annotation": { - "created_at": "2025-05-13T16:54:52.245664Z", - "created_by_id": "019315dc-a332-7ba5-a426-d079c43ab776", - "span_id": "a1713ea8f59291f6", - "trace_id": "bb39070937f74f169b60dfc420729ad3", - "kind": "custom", - "source": "api", - "data": { - "outputs": { - "score": 0, - "reasoning": "The answer is totally false.", - "expected_answer": "The capital of France is Paris", - "normalized_score": 0 - } - }, - "metadata": { - "user_id": "miamia" - }, - "references": { - "evaluator": { - "id": "0196ca64-9cbf-7ee3-b507-2b559dd13090", - "slug": "main-scorer" - } - }, - "links": { - "invocation": { - "span_id": "09383e1124b264d0", - "trace_id": "5d52a529b48135fd58790f8aa3e33fb8" - } - } - } -} -``` - -:::info -Annotations themselves are stored as traces with their own `trace_id` and `span_id`, which is different from the invocation they're linked to. -::: - -## Viewing Annotations in the UI - -You can see all annotations for a trace in the Agenta UI. Open any trace and check the Annotations tab to see detailed information. The right sidebar shows average metrics for each evaluator. - -<Image - style={{ display: "block", margin: "10px auto", marginBottom: "20px" }} - img={require("/images/evaluation/viewing-annotations.png")} - alt="Screenshot showing how annotations appear in the Agenta UI" - loading="lazy" -/> - -## Querying Annotations - -<Tabs> -<TabItem value="python" label="Python"> - -You can query annotations in several ways: - -**1. Query by annotation ID:** - -```python -import requests - -base_url = "https://cloud.agenta.ai" -headers = { - "Content-Type": "application/json", - "Authorization": "ApiKey YOUR_API_KEY" -} - -# Query by annotation ID -query_data = { - "annotation": { - "trace_id": "bb39070937f74f169b60dfc420729ad3", - "span_id": "a1713ea8f59291f6" - } -} - -response = requests.post( - f"{base_url}/api/preview/annotations/query", - headers=headers, - json=query_data -) - -if response.status_code == 200: - print("Query successful") - print(response.json()) -else: - print(f"Error: {response.status_code}") - print(response.text) -``` - -**2. Query all annotations for an invocation:** - -```python -# Query all annotations for an invocation -query_data = { - "annotation": { - "links": { - "invocation": { - "trace_id": "5d52a529b48135fd58790f8aa3e33fb8", - "span_id": "09383e1124b264d0" - } - } - } -} - -response = requests.post( - f"{base_url}/api/preview/annotations/query", - headers=headers, - json=query_data -) -``` - -</TabItem> -<TabItem value="javascript" label="JS/TS"> - -You can query annotations in several ways: - -**1. Query by annotation ID:** - -```javascript -async function queryAnnotation() { - const baseUrl = 'https://cloud.agenta.ai'; - - const headers = { - 'Content-Type': 'application/json', - 'Authorization': 'ApiKey YOUR_API_KEY' - }; - - // Query by annotation ID - const queryData = { - annotation: { - trace_id: "bb39070937f74f169b60dfc420729ad3", - span_id: "a1713ea8f59291f6" - } - }; - - try { - const response = await fetch(`${baseUrl}/api/preview/annotations/query`, { - method: 'POST', - headers: headers, - body: JSON.stringify(queryData) - }); - - if (response.ok) { - const data = await response.json(); - console.log("Query successful"); - console.log(data); - } else { - console.error(`Error: ${response.status}`); - console.error(await response.text()); - } - } catch (error) { - console.error("Request failed:", error); - } -} - -queryAnnotation(); -``` - -**2. Query all annotations for an invocation:** - -```javascript -async function queryAnnotationsForInvocation() { - const baseUrl = 'https://cloud.agenta.ai'; - - const headers = { - 'Content-Type': 'application/json', - 'Authorization': 'ApiKey YOUR_API_KEY' - }; - - // Query all annotations for an invocation - const queryData = { - annotation: { - links: { - invocation: { - trace_id: "5d52a529b48135fd58790f8aa3e33fb8", - span_id: "09383e1124b264d0" - } - } - } - }; - - try { - const response = await fetch(`${baseUrl}/api/preview/annotations/query`, { - method: 'POST', - headers: headers, - body: JSON.stringify(queryData) - }); - - if (response.ok) { - const data = await response.json(); - console.log("Query successful"); - console.log(data); - } else { - console.error(`Error: ${response.status}`); - console.error(await response.text()); - } - } catch (error) { - console.error("Request failed:", error); - } -} - -queryAnnotationsForInvocation(); -``` - -</TabItem> -</Tabs> - -## Removing Annotations - -<Tabs> -<TabItem value="python" label="Python"> - -```python -import requests - -base_url = "https://cloud.agenta.ai" -headers = { - "Content-Type": "application/json", - "Authorization": "ApiKey YOUR_API_KEY" -} - -# Define the trace_id and span_id of the annotation to delete -trace_id = "bb39070937f74f169b60dfc420729ad3" -span_id = "a1713ea8f59291f6" - -# Make the delete request -response = requests.delete( - f"{base_url}/api/preview/annotations/{trace_id}/{span_id}", - headers=headers -) - -# Process the response -if response.status_code == 200: - print("Annotation deleted successfully") -else: - print(f"Error: {response.status_code}") - print(response.text) -``` - -</TabItem> -<TabItem value="javascript" label="JS/TS"> - -```javascript -async function deleteAnnotation() { - const baseUrl = 'https://cloud.agenta.ai'; - - const headers = { - 'Content-Type': 'application/json', - 'Authorization': 'ApiKey YOUR_API_KEY' - }; - - // Define the trace_id and span_id of the annotation to delete - const traceId = "bb39070937f74f169b60dfc420729ad3"; - const spanId = "a1713ea8f59291f6"; - - try { - const response = await fetch(`${baseUrl}/api/preview/annotations/${traceId}/${spanId}`, { - method: 'DELETE', - headers: headers - }); - - if (response.ok) { - console.log("Annotation deleted successfully"); - } else { - console.error(`Error: ${response.status}`); - console.error(await response.text()); - } - } catch (error) { - console.error("Request failed:", error); - } -} - -deleteAnnotation(); -``` - -</TabItem> -</Tabs> diff --git a/docs/docs/observability/trace-with-python-sdk/_06-sample-traces.mdx b/docs/docs/observability/trace-with-python-sdk/_06-sample-traces.mdx deleted file mode 100644 index 45982d3e81..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/_06-sample-traces.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Sample Traces" -sidebar_label: "Sample Traces" -description: "Learn how to implement sampling strategies to reduce trace volume in Agenta" -sidebar_position: 7 ---- - -<!-- TODO: Add content for sampling strategies --> - -## Overview - -Sampling allows you to control which traces are sent to Agenta, helping reduce costs and storage when dealing with high-volume applications. - -## Why sample? - -- Reduce storage costs -- Minimize performance impact -- Focus on interesting traces (errors, slow requests) - -## Next steps - -- Learn about [batching traces](/observability/trace-with-python-sdk/batch-traces) -- Explore [cost tracking](/observability/trace-with-python-sdk/track-costs) diff --git a/docs/docs/observability/trace-with-python-sdk/_07-batch-traces.mdx b/docs/docs/observability/trace-with-python-sdk/_07-batch-traces.mdx deleted file mode 100644 index 395f1835ef..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/_07-batch-traces.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Batch Traces" -sidebar_label: "Batch Traces" -description: "Learn how to batch traces for efficient transmission to Agenta" -sidebar_position: 8 ---- - -<!-- TODO: Add content for batch traces --> - -## Overview - -Learn how to batch traces for efficient transmission to Agenta - -## Next steps - -- Explore other [Python SDK features](/observability/trace-with-python-sdk/setup-tracing) -- Learn about [using the UI](/observability/using-the-ui/filtering-traces) diff --git a/docs/docs/observability/trace-with-python-sdk/_09-track-chat-sessions.mdx b/docs/docs/observability/trace-with-python-sdk/_09-track-chat-sessions.mdx deleted file mode 100644 index 025e2e5df6..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/_09-track-chat-sessions.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Track Chat Sessions" -sidebar_label: "Track Chat Sessions" -description: "Learn how to track multi-turn conversations and chat sessions" -sidebar_position: 10 ---- - -<!-- TODO: Add content for track chat sessions --> - -## Overview - -Learn how to track multi-turn conversations and chat sessions - -## Next steps - -- Explore other [Python SDK features](/observability/trace-with-python-sdk/setup-tracing) -- Learn about [using the UI](/observability/using-the-ui/filtering-traces) diff --git a/docs/docs/observability/trace-with-python-sdk/_10-track-users.mdx b/docs/docs/observability/trace-with-python-sdk/_10-track-users.mdx deleted file mode 100644 index 6b0d4c476a..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/_10-track-users.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Track Users" -sidebar_label: "Track Users" -description: "Learn how to associate traces with specific users for better analytics" -sidebar_position: 11 ---- - -<!-- TODO: Add content for track users --> - -## Overview - -Learn how to associate traces with specific users for better analytics - -## Next steps - -- Explore other [Python SDK features](/observability/trace-with-python-sdk/setup-tracing) -- Learn about [using the UI](/observability/using-the-ui/filtering-traces) diff --git a/docs/docs/observability/trace-with-python-sdk/_category_.json b/docs/docs/observability/trace-with-python-sdk/_category_.json deleted file mode 100644 index 0f24e70204..0000000000 --- a/docs/docs/observability/trace-with-python-sdk/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Trace with Python SDK", - "position": 5, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/prompt-engineering/01-quick-start.mdx b/docs/docs/prompt-engineering/01-quick-start.mdx index dc1824c076..a5b41a504b 100644 --- a/docs/docs/prompt-engineering/01-quick-start.mdx +++ b/docs/docs/prompt-engineering/01-quick-start.mdx @@ -7,7 +7,7 @@ sidebar_position: 1 import Image from "@theme/IdealImage"; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import CustomDocCard from '@site/src/components/CustomDocCard'; +import DocCard from '@theme/DocCard'; ``` In this tutorial, we'll walk through three simple steps to get started with Agenta: @@ -15,20 +15,16 @@ In this tutorial, we'll walk through three simple steps to get started with Agen 2. Deploy it to an environment 3. Integrate it with your codebase using the Agenta SDK -<details> - <summary>⏯️ Watch a video of the quick start guide.</summary> - <iframe - width="100%" - height="400" + width="850" + height="450" src="https://www.youtube.com/embed/UQkAHgEGA2U?si=JVYgVlAkNr3FuDbE" - title="Quick Start - Prompt Management" + title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen - style={{ display: "block", margin: "0 auto" }} - ></iframe> -</details> + style={{ display: "block", margin: "0 auto" }} +></iframe> ## 1. Create a prompt @@ -166,7 +162,7 @@ response = client.chat.completions.create( ) ``` </TabItem> -<TabItem value="api" label="Using API (JS/TS)"> +<TabItem value="api" label="Using API (JavaScript)"> ```javascript const fetchConfigs = async () => { @@ -276,7 +272,7 @@ Model names follow LiteLLM naming conventions: `provider/model` (e.g., `cohere/c ::: :::info -For simpler observability and cost tracking, Agenta also offers an endpoint to directly call LLMs with your prompt configuration. Learn more in the [proxy LLM calls](/prompt-engineering/integrating-prompts/proxy-calls) section. +For simpler observability and cost tracking, Agenta also offers an endpoint to directly call LLMs with your prompt configuration. Learn more in the [proxy LLM calls](/prompt-engineering/prompt-management/proxy-calls) section. ::: ## Next Steps @@ -287,26 +283,24 @@ To continue your journey with Agenta: <section className='row'> <article key="1" className="col col--6 margin-bottom--lg"> -<CustomDocCard +<DocCard item={{ type: "link", - href: "/evaluation/evaluation-from-ui/quick-start", + href: "/evaluation/no-code-evaluation", label: "Explore the Prompt Management SDK", description: "Learn advanced features of the prompt management SDK" }} - noIcon={true} /> </article> <article key='2' className="col col--6 margin-bottom--lg"> -<CustomDocCard +<DocCard item={{ type: "link", - href: "/evaluation/concepts", + href: "/evaluation/sdk-evaluation", label: "Explore the Playground", description: "Learn how to use the playground" }} - noIcon={true} /> </article> </section> diff --git a/docs/docs/prompt-engineering/02-concepts.mdx b/docs/docs/prompt-engineering/02-concepts.mdx deleted file mode 100644 index 33f69b2080..0000000000 --- a/docs/docs/prompt-engineering/02-concepts.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "Prompt Management Concepts" -sidebar_label: "Concepts" -description: "Learn how to effectively manage, version, and deploy LLM prompts and configurations. Discover how prompt management helps teams collaborate, track changes, and maintain consistency across development and production environments" -sidebar_position: 2 ---- - -<!-- TODO: Improve this concepts page to better explain: -- The relationship between applications, variants, environments, and versions -- The Git-like workflow model (branches, commits, deployments) -- When to create new variants vs. new versions -- Best practices for organizing prompts and configurations -- The difference between prompts and full application configurations -- Consider adding more diagrams and examples ---> - -```mdx-code-block -import CustomDocCard from '@site/src/components/CustomDocCard'; -import clsx from 'clsx'; -import Image from "@theme/IdealImage"; - -``` - - -## Why do I need a prompt management system? - -A prompt management system lets everyone on your team collaborate on prompts. This includes product owners, developers, and subject matter experts. The system organizes your prompts so that: -- Product teams can change prompts without going through developers each time -- You can version prompts and roll back to a previous version if needed -- You can link LLM application spans to prompt versions -- You can run evaluations on prompts and compare them to each other - -You can read more about the benefits of prompt management in our [blog post](https://agenta.ai/blog/the-definitive-guide-to-prompt-management-systems). - - -:::info -Agenta allows you to version not only prompts, but **any configuration**. For instance, for a RAG pipeline, you can version a configuration with the parameters `chunk_size` or `embedding_model`. You can read more about this in [custom workflows](/custom-workflows/overview). -::: - -## Versioning in Agenta - -<Image - style={{ display: "block", margin: "32px 0" }} - img={require("/images/prompt_management/taxonomy-concepts.png")} - alt="Taxonomy of entities in Agenta" - loading="lazy" -/> - -Agenta uses a Git-like structure for versioning. Instead of having one commit history for each prompt, you can create multiple branches called **variants**. Each variant has its own version history. You can then deploy specific versions to **environments** (development, staging, production). - -## Entities in Agenta - -### Applications - -Prompts are applications in Agenta. Each application has a different type that determines how it runs. You can create chat applications and completion applications from the UI using templates. You can also create custom applications from your own code using [custom workflows](/custom-workflows/overview). - -### Variants -Variants are similar to branches in **git**. Each variant is an independent branch with its own commit history. When you create a prompt from the UI, we create a `default` variant for you. Unlike git branches, you cannot merge variants together. Use variants to experiment with different approaches or configurations. - -### Versions - -Versions are similar to commits in **git**. Each version is an immutable snapshot of a variant. When you make changes to a variant, you create a new version. Each version has a **commit id** that uniquely identifies it. Each version contains a **configuration** with prompts and other parameters. - -### Environments - -Environments are deployment targets for your prompts. Agenta provides three environments: **development**, **staging**, and **production**. Each environment points to a specific version from a variant. When you deploy a new version to an environment, the environment updates to point to that version. Environments track their deployment history, so you can roll back to any previously deployed version. - - -## Best practices for Organizing Prompts - -1. Create a new variant for each experiment or approach you explore. Some teams create variants per model. Others create variants per user or per approach. When you try a new approach, create a new variant. -2. Add commit notes to each version. Explain the changes you made. -3. Deploy variant versions to staging when ready. Use at least a staging environment and a production environment. -4. Have your internal team test the staging environment before deploying to production. At minimum, do a vibe check on the prompt. - diff --git a/docs/docs/prompt-engineering/02-overview.mdx b/docs/docs/prompt-engineering/02-overview.mdx new file mode 100644 index 0000000000..6864593dd9 --- /dev/null +++ b/docs/docs/prompt-engineering/02-overview.mdx @@ -0,0 +1,90 @@ +--- +title: "Overview" +description: "Learn how to effectively manage, version, and deploy LLM prompts and configurations. Discover how prompt management helps teams collaborate, track changes, and maintain consistency across development and production environments" +--- + +```mdx-code-block +import DocCard from '@theme/DocCard'; +import clsx from 'clsx'; +import Image from "@theme/IdealImage"; + +``` + + +Building LLM-powered applications is an iterative process. In each iteration, you aim to improve the application's performance by refining prompts, adjusting configurations, and evaluating outputs. + +<Image + style={{ display: "block", margin: "20px auto" }} + img={require("/images/prompt_management/illustration-llmops.png")} + alt="Illustration of the LLMOPs process" + loading="lazy" +/> + +### Why do I need a prompt management system? + +A prompt management system enables everyone on the team—from **product owners** to **subject matter experts**—to collaborate in creating prompts. Additionally it helps you answer the following questions: + +- Which prompts have we tried? +- What were the outputs of these prompts? +- How do the evaluation results of these prompts compare? +- Which prompt version was used for a specific generation in production? +- What was the effect of publishing the new version of this prompt in production? +- Who on the team made changes to a particular prompt version in production? + +### Features in agenta + +Agenta provides you with the following capabilities: + +- A playground where developers and subject matter experts can collaboratively create and test prompts and compare models +- A prompt management system where, you can: + - **Versioning Prompts**: Keeping track of different prompts you've tested and a history of changes in production. + - **Linking Prompts to Experiments**: Connecting each prompt version to its evaluation metrics to understand the effect of changes and determine the best variant. + - **Linking Prompts to Traces**: Monitoring how changes in prompt versions affect the traces and production metrics. + +:::info +Agenta goes beyond prompt management to encompass the entire configuration of your LLM applications. If your LLM workflow is more complex than a single prompt (e.g., Retrieval-Augmented Generation (RAG) or a chain of prompts), you can version the **whole configuration** together. + +In contrast to a **prompt**, a **configuration** of an LLM application can include additional parameters beyond prompt templates and models (with their parameters). For instance: + +- An LLM application using a **chain of two prompts** would have a configuration that includes the two prompts and their respective model parameters. +- An application that includes a **RAG pipeline** would have a configuration that includes parameters such as `top_k` and `embedding`. + +```json title="Example RAG configuration" +{ + "top_k": 3, + "embedding": "text-embedding-3-large", + "prompt-query": "We have provided context information below. {context_str}. Given this information, please answer the question: {query_str}\n", + "model-query": "openai/gpt-o1", + "temperature-query": "1.0" +} +``` +::: + + +### Get started + + +<section className='row'> +<article key="1" className="col col--6 margin-bottom--lg"> +<DocCard + item={{ + type: "link", + href: "/evaluation/no-code-evaluation", + label: "Explore the Prompt Management SDK", + description: "Learn advanced features of the prompt management SDK" + }} + /> +</article> + +<article key='2' className="col col--6 margin-bottom--lg"> +<DocCard + item={{ + type: "link", + href: "/evaluation/sdk-evaluation", + label: "Explore the Playground", + description: "Learn how to use the playground" + }} + /> +</article> +</section> + diff --git a/docs/docs/prompt-engineering/_managing-prompts-ui/01-create-and-commit.mdx b/docs/docs/prompt-engineering/_managing-prompts-ui/01-create-and-commit.mdx deleted file mode 100644 index 58b906273b..0000000000 --- a/docs/docs/prompt-engineering/_managing-prompts-ui/01-create-and-commit.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Create and Commit Prompts" -sidebar_position: 1 -sidebar_label: "Create and Commit Prompts" -description: "Learn how to create variants and commit changes using the Agenta UI." -draft: true - ---- - -<!-- TODO: Add comprehensive guide on creating and committing prompts from the UI --> -<!-- This should cover: -- How to create a new variant in the playground -- How to modify prompt templates -- How to commit changes with commit messages -- How to view commit history -- Screenshots and step-by-step instructions ---> - -This section is under construction. For now, please refer to the [Quick Start guide](/prompt-engineering/quick-start) which covers creating and committing prompts from the UI. diff --git a/docs/docs/prompt-engineering/_managing-prompts-ui/01-creating-prompts.mdx b/docs/docs/prompt-engineering/_managing-prompts-ui/01-creating-prompts.mdx deleted file mode 100644 index 6506c050b0..0000000000 --- a/docs/docs/prompt-engineering/_managing-prompts-ui/01-creating-prompts.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Creating Prompts" -sidebar_position: 1 -sidebar_label: "Creating Prompts" -description: "Learn how to create prompts from the Agenta UI." -draft: true - ---- - -import Image from "@theme/IdealImage"; - -This guide shows you how to create prompts from the Agenta UI. -## Creating a new application - -### Creating a new application from the UI - -Go to the App Management page and click on the **Create New Prompt** button, then choose the type of application you want to create (chat for multi-turn chat applications or completion for single-turn applications). diff --git a/docs/docs/prompt-engineering/_managing-prompts-ui/02-deploy.mdx b/docs/docs/prompt-engineering/_managing-prompts-ui/02-deploy.mdx deleted file mode 100644 index eda7f3df09..0000000000 --- a/docs/docs/prompt-engineering/_managing-prompts-ui/02-deploy.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Deploy to Environments" -sidebar_position: 2 -sidebar_label: "Deploy to Environments" -description: "Learn how to deploy variants to different environments using the Agenta UI." -draft: true - ---- - -<!-- TODO: Add comprehensive guide on deploying from the UI --> -<!-- This should cover: -- How to deploy from the Playground -- How to deploy from the Registry page -- How to deploy from the Deployments page -- How to add deployment notes -- How to choose between development, staging, and production -- Screenshots and step-by-step instructions ---> - -This section is under construction. For now, please refer to the [Quick Start guide](/prompt-engineering/quick-start) which covers deploying variants from the UI. diff --git a/docs/docs/prompt-engineering/_managing-prompts-ui/03-versions-rollback.mdx b/docs/docs/prompt-engineering/_managing-prompts-ui/03-versions-rollback.mdx deleted file mode 100644 index 7bb5c5763b..0000000000 --- a/docs/docs/prompt-engineering/_managing-prompts-ui/03-versions-rollback.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Manage Versions and Rollback" -sidebar_position: 3 -sidebar_label: "Manage Versions and Rollback" -description: "Learn how to view version history and rollback to previous versions using the Agenta UI." -draft: true ---- - -<!-- TODO: Add comprehensive guide on version management and rollback from the UI --> -<!-- This should cover: -- How to view variant version history in the Registry -- How to compare different versions -- How to rollback to a previous version -- How to view deployment history -- How to understand version numbers and commits -- Screenshots and step-by-step instructions ---> - -This section is under construction. For now, please refer to the [Quick Start guide](/prompt-engineering/quick-start) and the [Concepts page](/prompt-engineering/concepts) for information on versioning. diff --git a/docs/docs/prompt-engineering/_managing-prompts-ui/_category_.json b/docs/docs/prompt-engineering/_managing-prompts-ui/_category_.json deleted file mode 100644 index c209af07e8..0000000000 --- a/docs/docs/prompt-engineering/_managing-prompts-ui/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 4, - "label": "Managing Prompts from UI", - "collapsed": true -} \ No newline at end of file diff --git a/docs/docs/prompt-engineering/integrating-prompts/01-integrating-with-agenta.mdx b/docs/docs/prompt-engineering/integrating-prompts/01-integrating-with-agenta.mdx deleted file mode 100644 index 8a5291e6ff..0000000000 --- a/docs/docs/prompt-engineering/integrating-prompts/01-integrating-with-agenta.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "How to Integrate with Agenta" -description: "Integrate applications and prompts created in Agenta into your projects." ---- - -import Image from "@theme/IdealImage"; - -Agenta integrates with your workflow. You can use the latest version of your deployed prompt in your application. With Agenta, **you can update prompts directly from the web interface without modifying your code** each time. - -Here are two ways to use prompts from Agenta in your code: - -### [1. As a prompt management system](/prompt-engineering/integrating-prompts/fetch-prompt-programatically) - -Prompts are managed and stored in the Agenta backend. You use the Agenta SDK to fetch the latest deployed version of your prompt. Then you use it in your application. - -**Advantages**: - -- Agenta operates outside your application's critical path. -- You can fetch and cache the latest prompt version for zero latency usage. - -**Considerations**: - -- You need to set up [observability integration](/observability/quickstart-python) yourself. This is required if you want to trace your calls for debugging and cost tracking. - -<Image - class="bg-white" - img={require("/images/prompt_management/as-a-prompt-management.png")} - loading="lazy" - alt="A sequence diagram showing how to integrate with Agenta as a prompt management system" -/> - - - -### [2. As a middleware/gateway (invoking prompt)](/prompt-engineering/integrating-prompts/proxy-calls) - -You invoke your prompts directly through Agenta. Agenta provides you with an endpoint that forwards requests to the LLM on your behalf. - -**Advantages**: - -- Simplified deployment. -- Automatic tracing without any code changes. - -**Considerations**: - -- Adds slight latency to the response (approximately 0.3 seconds). -- Streaming is not supported for these endpoints. - -This approach works best for applications where latency is not critical. - -<Image - class="bg-white" - img={require("/images/prompt_management/as-a-proxy.png")} - loading="lazy" - alt="A sequence diagram showing how to integrate with Agenta as a proxy" -/> diff --git a/docs/docs/prompt-engineering/integrating-prompts/02-fetch-prompt-programatically.mdx b/docs/docs/prompt-engineering/integrating-prompts/02-fetch-prompt-programatically.mdx deleted file mode 100644 index 22ea6668c6..0000000000 --- a/docs/docs/prompt-engineering/integrating-prompts/02-fetch-prompt-programatically.mdx +++ /dev/null @@ -1,330 +0,0 @@ ---- -title: "Fetch Prompts via SDK/API" -sidebar_position: 2 -sidebar_label: "Fetch Prompts via SDK/API" -description: "Learn how to fetch prompt configurations using the Agenta SDK or API." ---- - -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -This guide shows you how to fetch prompt configurations from variants or environments using the Agenta SDK. - -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/how-to-prompt-management.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Fetching a Prompt Configuration - -You can fetch the configurations from a variant reference (`app_slug`, `variant_slug`, `variant_version`) or an environment reference (`app_slug`, `environment_slug`). The default behavior when fetching is to fetch the latest configuration from the `production` environment. If you don't provide a `variant_version` parameter but only a `variant_slug` or an `environment_slug`, the SDK will fetch the latest version of the variant from the specified **environment/variant**. - -:::tip -Check the [reference](/reference/sdk/configuration-management#prompt-configuration-schema) section for more details on the data format used for prompts. -::: - -### Default Behavior when fetching - -If you don't provide either `variant` or `environment` identifiers, the SDK fetches the latest configuration deployed to the `production` environment. -<Tabs> - <TabItem value="Python SDK"> - -```python -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=2 # Optional: fetches latest if not provided -) - -print("Fetched configuration from production:") -print(config) -``` -Example Output: - -```python -{ - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "top_p": 1.0, - "max_tokens": 150, - "temperature": 0.7, - "presence_penalty": 0.0, - "frequency_penalty": 0.0 - }, - "template_format": "curly" - } -} -``` - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Fetch configuration from production environment (default behavior) -const fetchResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/fetch', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - }) -}); - -const config = await fetchResponse.json(); -console.log('Fetched configuration from production:'); -console.log(config); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Fetch configuration from production environment (default behavior) -curl -X POST "https://cloud.agenta.ai/api/variants/configs/fetch" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - }' -``` - </TabItem> -</Tabs> - -:::tip -Agenta provides a helper class `PromptTemplate` to format the configuration and then use it to generate the prompt. -```python -from openai import OpenAI -from agenta.sdk.types import PromptTemplate - -# Fetch configuration -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug" -) - -# Format the prompt with variables -prompt = PromptTemplate(**config['prompt']).format(topic="AI") - -# Use with OpenAI -client = OpenAI() -response = client.chat.completions.create( - **prompt.to_openai_kwargs() -) - -print(response.choices[0].message.content) -``` -::: - -### Fetching by Variant Reference - -<Tabs> - <TabItem value="Python SDK"> - -```python -# Fetch configuration by variant -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=2 # Optional: If not provided, fetches the latest version -) - -print("Fetched configuration:") -print(config) -``` - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Fetch configuration by variant -const fetchResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/fetch', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'my-variant-slug', - version: 2, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - }) -}); - -const config = await fetchResponse.json(); -console.log('Fetched configuration:'); -console.log(config); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Fetch configuration by variant -curl -X POST "https://cloud.agenta.ai/api/variants/configs/fetch" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "my-variant-slug", - "version": 2, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - }' -``` - </TabItem> -</Tabs> - -### Fetching by Environment Reference - -<Tabs> - <TabItem value="Python SDK"> - -```python -# Fetch the latest configuration from the staging environment -config = ag.ConfigManager.get_from_registry( - app_slug="my-app", - environment_slug="staging", - environment_version=1 # Optional: If not provided, fetches the latest version -) - -print("Fetched configuration from staging:") -print(config) -``` - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Fetch the latest configuration from the staging environment -const fetchResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/fetch', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - environment_ref: { - slug: 'staging', - version: 1, // Optional: omit to fetch latest - id: null - }, - application_ref: { - slug: 'my-app', - version: null, - id: null - } - }) -}); - -const config = await fetchResponse.json(); -console.log('Fetched configuration from staging:'); -console.log(config); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Fetch the latest configuration from the staging environment -curl -X POST "https://cloud.agenta.ai/api/variants/configs/fetch" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "environment_ref": { - "slug": "staging", - "version": 1, - "id": null - }, - "application_ref": { - "slug": "my-app", - "version": null, - "id": null - } - }' -``` - </TabItem> -</Tabs> - -## Response Format - -The API response contains your prompt configuration under `params`: - -```json -{ - "params": { - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "max_tokens": 150, - "temperature": 0.7, - "top_p": 1.0, - "frequency_penalty": 0.0, - "presence_penalty": 0.0 - }, - "template_format": "curly" - } - }, - "url": "https://cloud.agenta.ai/services/completion", - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": "..." - }, - "variant_ref": { - "slug": "my-variant-slug", - "version": 2, - "id": "..." - }, - "environment_ref": { - "slug": "production", - "version": 1, - "id": "..." - } -} -``` - -:::tip Asynchronous Operations in Python SDK -All SDK methods have async counterparts with an `a` prefix: - -```python -async def async_operations(): - # Fetch configuration asynchronously - config = await ag.ConfigManager.aget_from_registry(...) -``` -::: diff --git a/docs/docs/prompt-engineering/integrating-prompts/_category_.json b/docs/docs/prompt-engineering/integrating-prompts/_category_.json deleted file mode 100644 index 78650487dd..0000000000 --- a/docs/docs/prompt-engineering/integrating-prompts/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 6, - "label": "Integrate with Agenta", - "collapsed": true -} \ No newline at end of file diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/01-setup.mdx b/docs/docs/prompt-engineering/managing-prompts-programatically/01-setup.mdx deleted file mode 100644 index c8e9108dd8..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/01-setup.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Setup and Installation" -sidebar_position: 1 -sidebar_label: "Setup and Overview" -description: "Learn how to install and initialize the Agenta SDK for prompt management." ---- - -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; - -This guide shows you how to set up the Agenta SDK for managing prompts programmatically. - -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/how-to-prompt-management.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Prerequisites - -Before starting, familiarize yourself with how versioning works in Agenta. Details are available on the [concepts page](/concepts/concepts). - -:::info Versioning in Agenta - -{" "} - -<Image - style={{ display: "block", margin: "16px 0px 16px 0px" }} - img={require("/images/prompt_management/taxonomy-concepts.png")} - alt="Taxonomy of concepts in Agenta" - loading="lazy" -/> - -Agenta uses a Git-like structure for prompt versioning: -- Create multiple branches called **variants** -- Each variant is versioned. -- Deploy specific versions to **environments** (development, staging, production) - -**Typical workflow:** -1. Create a variant (branch) -2. Commit changes to the variant creating a new version -3. Deploy the version to an environment - -::: - -## Setup the SDK - -Initialize the SDK before using any operations: - -```python -import os -import agenta as ag - -# Set your API credentials -os.environ["AGENTA_API_KEY"] = "your-api-key-here" -os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # only needed if self-hosting - -# Initialize the SDK -ag.init() -``` - -:::info -You can skip this step if you are using the API directly. -::: diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/02-creating-prompts.mdx b/docs/docs/prompt-engineering/managing-prompts-programatically/02-creating-prompts.mdx deleted file mode 100644 index 0b2c40d39f..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/02-creating-prompts.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "Create Prompts" -sidebar_position: 1 -sidebar_label: "Create Prompts" -description: "Learn how to create prompts from the Agenta SDK." ---- - -import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -This guide shows you how to set up the Agenta SDK for managing prompts programmatically. - -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/how-to-prompt-management.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - - -## Creating a new application - -Prompts are applications in Agenta. To create a new prompt, you need to specify the slug, and the type of the application. - -The type of the application can be `SERVICE:completion`, `SERVICE:chat`, or `CUSTOM`: - -- `SERVICE:completion` is for single-turn prompts. -- `SERVICE:chat` is for multi-turn prompts. -- `CUSTOM` is for custom prompts. - -<Tabs> - <TabItem value="Python SDK"> - -```python -# Creates an empty application -app = ag.AppManager.create( - app_slug="my-app-slug", - template_key="SERVICE:completion", # we define here the app type - # template_key="SERVICE:chat" # chat prompts - # template_key="CUSTOM" # custom configuration (schema-less, however unless you provide a URI, you can only use the registry but not the playground) -) -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -const response = await fetch('https://cloud.agenta.ai/api/apps', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - app_name: 'my-app-slug', - template_key: 'SERVICE:completion' - }) -}); - -const result = await response.json(); -console.log(result); -``` - -</TabItem> - <TabItem value="API"> - -```bash -curl -X POST "https://cloud.agenta.ai/api/apps" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "app_name": "my-app-slug", - "template_key": "SERVICE:completion" - }' -``` - - </TabItem> -</Tabs> - - -:::warning -The app created until now is empty. You cannot use it from the UI yet. You need to create a variant and commit changes to it to be able to use it (next section). -::: \ No newline at end of file diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/03-create-and-commit.mdx b/docs/docs/prompt-engineering/managing-prompts-programatically/03-create-and-commit.mdx deleted file mode 100644 index 9678568066..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/03-create-and-commit.mdx +++ /dev/null @@ -1,978 +0,0 @@ ---- -title: "Version Prompts" -sidebar_position: 2 -sidebar_label: "Version Prompts" -description: "Learn how to create variants and commit changes using the Agenta SDK." ---- - -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -This guide covers how to create variants and commit changes to them using the Agenta SDK. - -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/how-to-prompt-management.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Creating and Managing Variants - -### Create a New Variant - -Use `VariantManager.create` to create a new variant with initial configuration: -<Tabs> - <TabItem value="Python SDK"> - -```python -from agenta.sdk.types import PromptTemplate, Message, ModelConfig -from pydantic import BaseModel - -# Define your configuration model -class Config(BaseModel): - prompt: PromptTemplate - -# Create the initial configuration -config = Config( - prompt=PromptTemplate( - messages=[ - Message(role="system", content="You are an assistant that provides concise answers"), - Message(role="user", content="Explain {{topic}} in simple terms"), - ], - llm_config=ModelConfig( - model="gpt-3.5-turbo", - max_tokens=150, - temperature=0.7, - top_p=1.0, - frequency_penalty=0.0, - presence_penalty=0.0, - ), - ) -) - -# Create the variant -variant = ag.VariantManager.create( - parameters=config.model_dump(), - app_slug="my-app-slug", - variant_slug="my-variant-slug", -) -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Step 1: Add variant configuration (creates empty variant) -const addConfigResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/add', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'my-variant-slug', - version: null, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - }) -}); - -const config = await addConfigResponse.json(); - -// Step 2: Commit parameters to the variant -const commitResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/commit', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - config: { - params: { - prompt: { - messages: [ - { - role: 'system', - content: 'You are an assistant that provides concise answers' - }, - { - role: 'user', - content: 'Explain {{topic}} in simple terms' - } - ], - llm_config: { - model: 'gpt-3.5-turbo', - max_tokens: 150, - temperature: 0.7, - top_p: 1.0, - frequency_penalty: 0.0, - presence_penalty: 0.0 - } - } - }, - variant_ref: { - slug: 'my-variant-slug', - version: null, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - } - }) -}); - -const result = await commitResponse.json(); -console.log(result); -``` - - </TabItem> - <TabItem value="API"> - -```bash -# Step 1: Add variant configuration (creates empty variant) -curl -X POST "https://cloud.agenta.ai/api/variants/configs/add" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "my-variant-slug", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - }' - -# Step 2: Commit parameters to the variant -curl -X POST "https://cloud.agenta.ai/api/variants/configs/commit" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "config": { - "params": { - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "max_tokens": 150, - "temperature": 0.7, - "top_p": 1.0, - "frequency_penalty": 0.0, - "presence_penalty": 0.0 - } - } - }, - "variant_ref": { - "slug": "my-variant-slug", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - } - }' -``` - - </TabItem> -</Tabs> - -:::tip -Use `VariantManager.acreate` for async variant creation. -::: - -This command will create a new variant and initialize it with the first commit containing the parameters provided - -- **Parameters:** - - `app_slug`: The slug of your application. - - `variant_slug`: The slug of the new variant. - - `parameters`: A dictionary containing the initial configuration parameters. - -**Note:** If a variant with the same `slug` and `version` already exists, the SDK will raise an exception. - -**Sample Output:** - -```python -{ - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "max_tokens": 150, - "temperature": 0.7, - "top_p": 1.0, - "frequency_penalty": 0.0, - "presence_penalty": 0.0 - }, - "template_format": "curly" -} -``` - -### Committing changes to a variant (Creating a new version in a variant) - -To save changes to a variant (creating a new version), use the `VariantManager.commit` method with explicit parameters. - -<Tabs> - <TabItem value="Python SDK"> -```python - -config2=Config( - prompt=PromptTemplate( - messages=[ - Message(role="system", content="You are an assistant that provides VERY concise answers"), - Message(role="user", content="Explain {{topic}} in simple terms"), - ], - llm_config=ModelConfig( - model="anthropic/claude-3-5-sonnet-20240620", - max_tokens=150, - temperature=0.7, - top_p=1.0, - frequency_penalty=0.0, - presence_penalty=0.0, - ), - ) -) - - -# Commit the new version -variant = ag.VariantManager.commit( - parameters=config2.model_dump(), - app_slug="my-app-slug", - variant_slug="my-variant-slug", -) - -print("Committed new version of variant:") -print(variant) - -# Commit the new version asynchronously (optional) -# async def commit_variant(): -# variant = await ag.VariantManager.acommit( -# parameters=my_prompt2.model_dump(), -# app_slug="my-app-slug", -# variant_slug="my-variant-slug", -# ) - -# print("Committed new version of variant (async):") -# print(variant) -``` - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Commit new version with updated parameters -const commitResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/commit', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - config: { - params: { - prompt: { - messages: [ - { - role: 'system', - content: 'You are an assistant that provides VERY concise answers' - }, - { - role: 'user', - content: 'Explain {{topic}} in simple terms' - } - ], - llm_config: { - model: 'anthropic/claude-3-5-sonnet-20240620', - max_tokens: 150, - temperature: 0.7, - top_p: 1.0, - frequency_penalty: 0.0, - presence_penalty: 0.0 - } - } - }, - variant_ref: { - slug: 'my-variant-slug', - version: null, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - } - }) -}); - -const result = await commitResponse.json(); -console.log('Committed new version of variant:'); -console.log(result); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Commit new version with updated parameters -curl -X POST "https://cloud.agenta.ai/api/variants/configs/commit" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "config": { - "params": { - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides VERY concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "anthropic/claude-3-5-sonnet-20240620", - "max_tokens": 150, - "temperature": 0.7, - "top_p": 1.0, - "frequency_penalty": 0.0, - "presence_penalty": 0.0 - } - } - }, - "variant_ref": { - "slug": "my-variant-slug", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - } - }' -``` - - </TabItem> -</Tabs> - -:::tip -Use `VariantManager.acommit` for async version commit. -::: - -:::info Immutability -Each commit creates a new version of the variant. Versions are immutable once created. -::: - -**Sample Output:** - -```python -{ - "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", - "app_slug": "my-app-slug", - "variant_id": "01968c11-6f7c-7773-b273-922c5807be7b", - "variant_slug": "my-variant-slug", - "variant_version": 5, - "environment_id": null, - "environment_slug": null, - "environment_version": null, - "committed_at": "2025-05-01T07:26:08.935406+00:00", - "committed_by": "user@agenta.ai", - "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", - "deployed_at": null, - "deployed_by": null, - "deployed_by_id": null, - "params": { - "messages": [ - { - "name": null, - "role": "system", - "content": "You are an assistant that provides concise answers", - "tool_calls": null, - "tool_call_id": null - }, - { - "name": null, - "role": "user", - "content": "Explain {{topic}} in simple terms", - "tool_calls": null, - "tool_call_id": null - } - ], - "input_keys": null, - "llm_config": { - "model": "gpt-3.5-turbo", - "tools": null, - "top_p": 1.0, - "stream": null, - "max_tokens": 150, - "temperature": 0.7, - "tool_choice": null, - "response_format": null, - "presence_penalty": 0.0, - "frequency_penalty": 0.0 - }, - "user_prompt": null, - "system_prompt": null, - "template_format": "curly" - } -} -``` - -:::warning -The `user_prompt` and `system_prompt` are helper fields to populate the `messages` field in the `PromptTemplate`. Rely only on the `messages` field in your code. -::: - -## Deploying to Environments - -To deploy a variant to an environment, use the `DeploymentManager.deploy` method with the variant reference and `environment_slug`: The slug of the environment (`development`, `staging`, or `production`). - -```python -deployment = ag.DeploymentManager.deploy( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=None, # Deploys latest version if not specified - environment_slug="staging" # Options: development, staging, production -) - -print(f"Deployed to {deployment['environment_slug']}") -``` - -:::warning -- Deploying a variant without specifying a `variant_version` deploys the latest version. -- Only predefined environments with slugs `development`, `staging`, and `production` are currently supported. -::: - -**Sample Output:** - -```python -Deployed variant to environment: -{ - "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", - "app_slug": "completion", - "variant_id": "01968c11-6f7c-7773-b273-922c5807be7b", - "variant_slug": "my-variant-slug4", - "variant_version": 5, - "environment_id": "01968c14-c35d-7440-bcc8-9def594f017f", - "environment_slug": "staging", - "environment_version": 2, - "committed_at": "2025-05-01T07:26:08.935406+00:00", - "committed_by": "user@agenta.ai", - "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", - "deployed_at": "2025-05-01T13:41:33.149595+00:00", - "deployed_by": "user@agenta.ai", - "deployed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1" -} -``` - -## Fetching a Prompt Configuration - -You can fetch the configurations from a variant reference (`app_slug`, `variant_slug`, `variant_version`) or an environment reference (`app_slug`, `environment_slug`). The default behavior when fetching is to fetch the latest configuration from the `production` environment. If you don't provide a `_version` parameter but only a `variant_slug` or an `environment_slug`, the SDK will fetch the latest version of the variant from the specified **environment/variant**. - -### Understanding the PromptTemplate - -When you fetch a prompt configuration, you receive a `PromptTemplate` object. This object contains all the information needed to format and send your prompt to an LLM provider. - -The `PromptTemplate` includes: - -- **messages**: An ordered list of chat messages with roles and content -- **llm_config**: Model parameters like temperature, max tokens, and the model name -- **template_format**: The syntax used for variable placeholders in your prompt -- **input_keys**: An optional list of required variables for input validation - -Here's what a fetched configuration looks like: - -```python -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug" -) - -print(config) -# Output: -# { -# "prompt": { -# "messages": [ -# {"role": "system", "content": "You are a helpful assistant"}, -# {"role": "user", "content": "Explain {{topic}} in simple terms"} -# ], -# "llm_config": { -# "model": "gpt-3.5-turbo", -# "temperature": 0.7, -# "max_tokens": 150 -# }, -# "template_format": "curly" -# } -# } -``` - -#### Template Format - -The `template_format` field determines how Agenta replaces variable placeholders in your prompts. Agenta supports three formats: - -**Curly format (default)**: Uses double curly braces like `{{variable}}`. This format is simple and safe. It only replaces variables that were defined in your original template, which helps catch missing inputs early. - -```python -"Explain {{topic}} in {{language}}" -``` - -**Jinja2 format**: Uses Jinja2 syntax like `{{ variable }}` and supports advanced features like loops and filters. Choose this format when you need conditional logic or want to transform variables. - -```python -"{% if variable %}...{% endif %}" -``` - -:::tip -Check the [reference](/reference/sdk/configuration-management#prompt-configuration-schema) section for more details on the data format used for prompts. -::: - -### Default Behavior when fetching - -If you don't provide either `variant` or `environment` identifiers, the SDK fetches the latest configuration deployed to the `production` environment. - -```python -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=2 # Optional: fetches latest if not provided -) - -print("Fetched configuration from production:") -print(config) -``` -Example Output: - -```python -{ - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an assistant that provides concise answers" - }, - { - "role": "user", - "content": "Explain {{topic}} in simple terms" - } - ], - "llm_config": { - "model": "gpt-3.5-turbo", - "top_p": 1.0, - "max_tokens": 150, - "temperature": 0.7, - "presence_penalty": 0.0, - "frequency_penalty": 0.0 - }, - "template_format": "curly" - } -} -``` - -:::tip -Agenta provides a helper class `PromptTemplate` to format the configuration and then use it to generate the prompt. -```python -from openai import OpenAI -from agenta.sdk.types import PromptTemplate - -# Fetch configuration -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug" -) - -# Format the prompt with variables -prompt = PromptTemplate(**config['prompt']).format(topic="AI") - -# Use with OpenAI -client = OpenAI() -response = client.chat.completions.create( - **prompt.to_openai_kwargs() -) - -print(response.choices[0].message.content) -``` -::: - -### Fetching by Variant Reference - -```python -# Fetch configuration by variant -config = ag.ConfigManager.get_from_registry( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=2 # Optional: If not provided, fetches the latest version -) - -print("Fetched configuration:") -print(config) -``` - -### Fetching by Environment Reference - -```python -# Fetch the latest configuration from the staging environment -config = ag.ConfigManager.get_from_registry( - app_slug="my-app", - environment_slug="staging", - environment_version=1 # Optional: If not provided, fetches the latest version -) - -print("Fetched configuration from staging:") -print(config) -``` - -## Deleting a Variant - -To delete a variant, use the `VariantManager.delete` method. - -<Tabs> - <TabItem value="Python SDK"> - -```python -# Delete a variant -ag.VariantManager.delete( - app_slug="my-app", - # app_id="my-app-id", # you can also use `app_id` - variant_slug="obsolete-variant" -) - -print("Variant deleted successfully.") -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Delete a variant -const deleteResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/delete', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'obsolete-variant', - version: null, - id: null - }, - application_ref: { - slug: 'my-app', - version: null, - id: null - } - }) -}); - -if (deleteResponse.status === 204) { - console.log('Variant deleted successfully.'); -} else { - console.error('Failed to delete variant:', deleteResponse.status); -} -``` - - </TabItem> - <TabItem value="API"> - -```bash -# Delete a variant -curl -X POST "https://cloud.agenta.ai/api/variants/configs/delete" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "obsolete-variant", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app", - "version": null, - "id": null - } - }' -``` - - </TabItem> -</Tabs> - -:::warning - -- Deleting a variant removes all versions of the variant. This action is irreversible. -- Attempting to delete a variant that is deployed to an environment will fail. -::: - -## Listing All Variants - -To list all variants of an application, use the `VariantManager.list` method. - -<Tabs> - <TabItem value="Python SDK"> - -```python -# List all variants (syncrhonously) -variants = ag.VariantManager.list( - app_slug="my-app" - # app_id="my-app-id", # you can also use `app_id` -) - -print(variants) -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// List all variants for an application -const listResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/list', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - application_ref: { - slug: 'my-app', - version: null, - id: null - } - }) -}); - -const variants = await listResponse.json(); -console.log(variants); -``` - - </TabItem> - <TabItem value="API"> - -```bash -# List all variants for an application -curl -X POST "https://cloud.agenta.ai/api/variants/configs/list" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "application_ref": { - "slug": "my-app", - "version": null, - "id": null - } - }' -``` - - </TabItem> -</Tabs> - -**Sample Output:** - -```python - -[{ - "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", - "app_slug": "completion", - "variant_id": "01968aba-9702-7263-a7fd-8b8565753230", - "variant_slug": "my-variant-slug3", - "variant_version": 2, - "environment_id": null, - "environment_slug": null, - "environment_version": null, - "committed_at": "2025-05-01T07:23:26.338901+00:00", - "committed_by": "user@agenta.ai", - "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", - "deployed_at": null, - "deployed_by": null, - "deployed_by_id": null, - "params": { - "prompt": { - "messages": [ - { - "name": null, - "role": "system", - "content": "You are an assistant that provides concise answers", - "tool_calls": null, - "tool_call_id": null - }, - { - "name": null, - "role": "user", - "content": "Explain {{topic}} in simple terms", - "tool_calls": null, - "tool_call_id": null - } - ], - "input_keys": null, - "llm_config": { - "model": "gpt-3.5-turbo", - "tools": null, - "top_p": 1.0, - "stream": null, - "max_tokens": 150, - "temperature": 0.7, - "tool_choice": null, - "response_format": null, - "presence_penalty": 0.0, - "frequency_penalty": 0.0 - }, - "user_prompt": null, - "system_prompt": null, - "template_format": "curly" - } - } -}, { - "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", - "app_slug": "completion", - "variant_id": "01963f1f-28ea-78e1-b390-39d270fe93fe", - "variant_slug": "key", - "variant_version": 4, - "environment_id": null, - "environment_slug": null, - "environment_version": null, - "committed_at": "2025-04-16T15:02:08.874979+00:00", - "committed_by": "user@agenta.ai", - "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", - "deployed_at": null, - "deployed_by": null, - "deployed_by_id": null, - "params": { - "ag_config": { - "prompt": { - "messages": [ - { - "role": "system", - "content": "You are an expert in geography" - }, - { - "role": "user", - "content": "What is the capital of {{country}}? tell me its name in arabic" - } - ], - "input_keys": [ - "country" - ], - "llm_config": { - "model": "gpt-3.5-turbo" - }, - "template_format": "curly" - } - } - } -}] -``` - -## Fetching a Variant's History - -To list all versions for a variant of an application, use the `VariantManager.history` method. - -<Tabs> - <TabItem value="Python SDK"> - -```python -# List all variant versions/history (synchronously) -versions = ag.VariantManager.history( - variant_slug="variant-slug", - app_slug="my-app" - # app_id="my-app-id", # you can also use `app_id` -) - -print(versions) -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// List all versions/history for a specific variant -const historyResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/history', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'variant-slug', - version: null, - id: null - }, - application_ref: { - slug: 'my-app', - version: null, - id: null - } - }) -}); - -const versions = await historyResponse.json(); -console.log(versions); -``` - - </TabItem> - <TabItem value="API"> - -```bash -# List all versions/history for a specific variant -curl -X POST "https://cloud.agenta.ai/api/variants/configs/history" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "variant-slug", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app", - "version": null, - "id": null - } - }' -``` - - </TabItem> -</Tabs> - -**Sample Output:** - -Same as `VariantManager.list` but limited to the history of a specific variant. - -:::tip Asynchronous Operations in Python SDK -All SDK methods have async counterparts with an `a` prefix: - -```python -async def async_operations(): - # Create variant asynchronously - variant = await ag.VariantManager.acreate(...) - - # Commit changes asynchronously - updated_variant = await ag.VariantManager.acommit(...) -``` -::: diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/04-deploy.mdx b/docs/docs/prompt-engineering/managing-prompts-programatically/04-deploy.mdx deleted file mode 100644 index 72b528f597..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/04-deploy.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: "Deploy to Environments" -sidebar_position: 4 -sidebar_label: "Deploy to Environments" -description: "Learn how to deploy variants to different environments using the Agenta SDK." ---- - -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -This guide shows you how to deploy variants to environments (development, staging, production) using the Agenta SDK. - -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/how-to-prompt-management.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - -## Deploying to Environments - -To deploy a variant to an environment, use the `DeploymentManager.deploy` method with the variant reference and `environment_slug`: The slug of the environment (`development`, `staging`, or `production`). - -<Tabs> - <TabItem value="Python SDK"> - -```python -deployment = ag.DeploymentManager.deploy( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=None, # Deploys latest version if not specified - environment_slug="staging" # Options: development, staging, production -) - -print(f"Deployed to {deployment['environment_slug']}") -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Deploy a variant to an environment -const deployResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/deploy', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'my-variant-slug', - version: null, - id: null - }, - environment_ref: { - slug: 'staging', - version: null, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - }) -}); - -const deployment = await deployResponse.json(); -console.log(`Deployed to ${deployment.environment_slug}`); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Deploy a variant to an environment -curl -X POST "https://cloud.agenta.ai/api/variants/configs/deploy" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "my-variant-slug", - "version": null, - "id": null - }, - "environment_ref": { - "slug": "staging", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - }' -``` - </TabItem> -</Tabs> - -:::warning -- Deploying a variant without specifying a `variant_version` deploys the latest version. -- Only predefined environments with slugs `development`, `staging`, and `production` are currently supported. -::: - -**Sample Output:** - -```python -Deployed variant to environment: -{ - "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", - "app_slug": "completion", - "variant_id": "01968c11-6f7c-7773-b273-922c5807be7b", - "variant_slug": "my-variant-slug4", - "variant_version": 5, - "environment_id": "01968c14-c35d-7440-bcc8-9def594f017f", - "environment_slug": "staging", - "environment_version": 2, - "committed_at": "2025-05-01T07:26:08.935406+00:00", - "committed_by": "user@agenta.ai", - "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", - "deployed_at": "2025-05-01T13:41:33.149595+00:00", - "deployed_by": "user@agenta.ai", - "deployed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1" -} -``` - -## Rolling Back to a Previous Version - -To rollback to a previous version, you can deploy a specific version of a variant to an environment: - -<Tabs> - <TabItem value="Python SDK"> - -```python -# Deploy a specific version (rollback) -deployment = ag.DeploymentManager.deploy( - app_slug="my-app-slug", - variant_slug="my-variant-slug", - variant_version=3, # Specify the version you want to rollback to - environment_slug="production" -) - -print(f"Rolled back to version {deployment['variant_version']}") -``` - - </TabItem> - <TabItem value="JavaScript" label="JS/TS"> - -```javascript -// Deploy a specific version (rollback) -const deployResponse = await fetch('https://cloud.agenta.ai/api/variants/configs/deploy', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer YOUR_API_KEY' - }, - body: JSON.stringify({ - variant_ref: { - slug: 'my-variant-slug', - version: 3, - id: null - }, - environment_ref: { - slug: 'production', - version: null, - id: null - }, - application_ref: { - slug: 'my-app-slug', - version: null, - id: null - } - }) -}); - -const deployment = await deployResponse.json(); -console.log(`Rolled back to version ${deployment.variant_version}`); -``` - </TabItem> - <TabItem value="API"> - -```bash -# Deploy a specific version (rollback) -curl -X POST "https://cloud.agenta.ai/api/variants/configs/deploy" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -d '{ - "variant_ref": { - "slug": "my-variant-slug", - "version": 3, - "id": null - }, - "environment_ref": { - "slug": "production", - "version": null, - "id": null - }, - "application_ref": { - "slug": "my-app-slug", - "version": null, - "id": null - } - }' -``` - </TabItem> -</Tabs> - -This effectively rolls back the environment to the specified version of the variant. - -:::tip -You can view the full history of deployments and versions in the Agenta UI under the Registry and Deployments pages. -::: - diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/05-fetch-prompts.mdx b/docs/docs/prompt-engineering/managing-prompts-programatically/05-fetch-prompts.mdx deleted file mode 100644 index 0e41a8ffef..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/05-fetch-prompts.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Fetch Prompts from Environments" -sidebar_position: 5 -sidebar_label: "Fetch Prompts" -description: "Learn how to fetch prompt configurations from environments using the Agenta SDK and API." ---- - -import { Redirect } from '@docusaurus/router'; - -<Redirect to="/prompt-engineering/integrating-prompts/fetch-prompt-programatically" /> diff --git a/docs/docs/prompt-engineering/managing-prompts-programatically/_category_.json b/docs/docs/prompt-engineering/managing-prompts-programatically/_category_.json deleted file mode 100644 index 3ec07828bb..0000000000 --- a/docs/docs/prompt-engineering/managing-prompts-programatically/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 3, - "label": "Manage Prompts with SDK/API", - "collapsed": true -} \ No newline at end of file diff --git a/docs/docs/prompt-engineering/playground/01-using-playground.mdx b/docs/docs/prompt-engineering/playground/01-using-playground.mdx deleted file mode 100644 index 5f7a030a81..0000000000 --- a/docs/docs/prompt-engineering/playground/01-using-playground.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: "Prompt Playground" -sidebar_label: "Using the Prompt Playground" -description: "Learn how to use Agenta's LLM playground for prompt engineering, model comparison, and deployment. A powerful alternative to OpenAI playground that supports multiple models and frameworks." ---- - -```mdx-code-block -import { Stream } from '@cloudflare/stream-react'; -import Image from "@theme/IdealImage"; -``` - -The Agenta playground is a comprehensive prompt engineering IDE that helps you develop, test, and deploy LLM applications. Unlike traditional LLM playgrounds, Agenta integrates prompt management, evaluation, and deployment into a single platform, supporting multiple models and frameworks. - -<Stream controls src="fcf2b69dacb3e3a624c09af40c2dc154" height="400px" /> -<br /> - - -## Key Features - -- **Multi-Model Support**: Test prompts across different providers including OpenAI GPT models, Anthropic Claude, Google Gemini, Mistral, DeepSeek, and OpenRouter models -- **Framework Integration**: Works seamlessly with popular frameworks like LangChain, LlamaIndex, and CrewAI -- **Version Control**: Track and manage prompt versions with built-in prompt management -- **Model Comparison**: Benchmark different LLM models side by side -- **Parameter Control**: Fine-tune model parameters including temperature, top-k, and presence penalty -- **Environment Management**: Deploy configurations to development, staging, and production environments - -## Creating and Managing Prompts - -### Prompt Templates - -Prompt templates form the foundation of reusable LLM interactions. They contain variable placeholders that adapt to different inputs, making your prompts dynamic and versatile. - -Example of a prompt template: -``` -Write a blog post about {{subject}} that focuses on {{key_aspect}} -``` - -Agenta uses curly brackets `{{variable}}` for template variables, automatically creating corresponding input fields in the playground interface. - -### Switching Template Formats - -Agenta lets you control how it processes variables in prompts through different template formats. The playground supports two main formats: - -The default Curly format uses simple `{{variable}}` placeholders. The Jinja2 format provides more control with conditional statements like `{% if variable %}...{% endif %}` and filters. - -:::warning -The playground does not support loops in Jinja2 prompts because prompt variables must be strings. -::: - -:::tip -To use a variable only for filtering in Jinja2 without including it in the prompt text, wrap it in a false condition: `{% if False %} {{variable}} {% endif %}`. This makes the variable available to the playground while keeping it out of the final prompt. -::: - -The format selector in the prompt configuration panel makes it easy to switch between formats. Click the current format name and select your preferred option from the dropdown menu. - -Agenta stores your chosen format with the prompt variant's messages and model settings. When you use the SDK to retrieve and format the prompt, it automatically applies the correct format. - -### Dynamic JSON Schema Variables - -When using the **JSON Schema** response format, you can reference variables directly inside the schema definition. Placeholders using `{{variable}}` work in both keys and values, and any variables you add will appear as inputs in the playground. These dynamic schemas are stored in the registry when you commit a variant. The editor does not yet highlight variables inside the schema, but they will still be replaced when executing your prompt. - -### Adjusting Model Parameters - -To modify model-specific parameters: - -1. Click on the model name in the configuration panel -2. A settings modal will appear with available parameters -3. Adjust the following settings as needed: - -- **Temperature** (0-2): Controls randomness in the output - - Lower values (0.1-0.4): More focused, deterministic responses - - Higher values (0.7-1.0): More creative, varied outputs - -- **Top-k** (1-100): Limits the pool of tokens the model considers - - Lower values: More focused word choice - - Higher values: Broader vocabulary usage - -- **Presence Penalty** (-2.0 to 2.0): Influences topic diversity - - Positive values: Encourages exploring new topics - - Negative values: Allows topic repetition - -- **Frequency Penalty** (-2.0 to 2.0): Affects word choice - - Positive values: Discourages word repetition - - Negative values: Allows word reuse - -## Comparing Prompts and Models - -Agenta's playground allows you to compare different prompts, model configurations, and LLM providers side by side. This helps you identify the most effective combination for your use case. - -### Creating Multiple Variants - -To compare different configurations: - -1. Click the "+Compare" button in the top right corner -2. Select "New Variant" from the dropdown menu -3. Choose a source variant to duplicate (this copies all current parameters) -4. Give your new variant a descriptive name -5. Modify the configuration as needed - -Each variant appears as a separate column in the playground, allowing direct comparison of outputs. - -### Side-by-Side Testing - -With multiple variants set up, you can: -- Enter the same input text across all variants -- Compare the generated outputs side by side -- Review response times for each configuration -- Monitor the cost per request for different models - -This parallel testing helps you understand how different prompts and models handle the same input. - -### Version Control and Deployment - -The playground integrates with Agenta's [prompt management system](/prompt-engineering/concepts) to track and deploy changes: - -1. Click "Commit" to save a new version of your variant -2. Changes remain in development until explicitly deployed -3. Use "Deploy" to push configurations to specific environments (development, staging, production) - -## Working with Test Sets - -### Loading Existing Test Sets - -You can import test sets that you've created through: - -- CSV uploads -- Programmatic creation -- Web UI input - -The test set must contain columns that match your prompt template variables. - -### Saving Test Cases - -To save an interesting test case: - -1. Click the three-dot menu on the right side of the test case card -2. Select "Add to Test Set" -3. Choose an existing test set or create a new one -4. Review the input/output mapping (use default settings unless you have specific needs) -5. Preview the changes to your test set -6. Confirm to save - -The Agenta playground serves as a comprehensive prompt engineering environment, offering advantages over traditional playgrounds like OpenAI's by providing integrated version control, deployment capabilities, and support for multiple models and frameworks. Whether you're developing new prompts, comparing model performance, or deploying to production, the playground provides the tools needed for effective LLM application development. - -## FAQ - -<details> - <summary>Can I load multiple test cases in the playground at once?</summary> - -This depends on your prompt type: - -* **Completion prompts**: You can load and run multiple test cases at once in the playground. -* **Chat prompts**: You can only load one conversation at a time in the playground. - -Note: You can always run evaluations against your entire test set at once, regardless of prompt type. This limitation only applies to the playground. -</details> diff --git a/docs/docs/prompt-engineering/playground/01-using-the-playground.mdx b/docs/docs/prompt-engineering/playground/01-using-the-playground.mdx new file mode 100644 index 0000000000..35ffae0ceb --- /dev/null +++ b/docs/docs/prompt-engineering/playground/01-using-the-playground.mdx @@ -0,0 +1,121 @@ +--- +title: "Prompt Playground" +sidebar_label: "Using the Prompt Playground" +description: "Learn how to use Agenta's LLM playground for prompt engineering, model comparison, and deployment. A powerful alternative to OpenAI playground that supports multiple models and frameworks." +--- + +```mdx-code-block +import { Stream } from '@cloudflare/stream-react'; +import Image from "@theme/IdealImage"; +``` + +The Agenta playground is a comprehensive prompt engineering IDE that helps you develop, test, and deploy LLM applications. Unlike traditional LLM playgrounds, Agenta integrates prompt management, evaluation, and deployment into a single platform, supporting multiple models and frameworks. + +<Stream controls src="fcf2b69dacb3e3a624c09af40c2dc154" height="400px" /> +<br /> + + +## Key Features + +- **Multi-Model Support**: Test prompts across different providers including OpenAI GPT models, Anthropic Claude, Google Gemini, Mistral, DeepSeek, and OpenRouter models +- **Framework Integration**: Works seamlessly with popular frameworks like LangChain, LlamaIndex, and CrewAI +- **Version Control**: Track and manage prompt versions with built-in prompt management +- **Model Comparison**: Benchmark different LLM models side by side +- **Parameter Control**: Fine-tune model parameters including temperature, top-k, and presence penalty +- **Environment Management**: Deploy configurations to development, staging, and production environments + +## Creating and Managing Prompts + +### Prompt Templates + +Prompt templates form the foundation of reusable LLM interactions. They contain variable placeholders that adapt to different inputs, making your prompts dynamic and versatile. + +Example of a prompt template: +``` +Write a blog post about {{subject}} that focuses on {{key_aspect}} +``` + +Agenta uses curly brackets `{{variable}}` for template variables, automatically creating corresponding input fields in the playground interface. + +### Adjusting Model Parameters + +To modify model-specific parameters: + +1. Click on the model name in the configuration panel +2. A settings modal will appear with available parameters +3. Adjust the following settings as needed: + +- **Temperature** (0-2): Controls randomness in the output + - Lower values (0.1-0.4): More focused, deterministic responses + - Higher values (0.7-1.0): More creative, varied outputs + +- **Top-k** (1-100): Limits the pool of tokens the model considers + - Lower values: More focused word choice + - Higher values: Broader vocabulary usage + +- **Presence Penalty** (-2.0 to 2.0): Influences topic diversity + - Positive values: Encourages exploring new topics + - Negative values: Allows topic repetition + +- **Frequency Penalty** (-2.0 to 2.0): Affects word choice + - Positive values: Discourages word repetition + - Negative values: Allows word reuse + +## Comparing Prompts and Models + +Agenta's playground allows you to compare different prompts, model configurations, and LLM providers side by side. This helps you identify the most effective combination for your use case. + +### Creating Multiple Variants + +To compare different configurations: + +1. Click the "+Compare" button in the top right corner +2. Select "New Variant" from the dropdown menu +3. Choose a source variant to duplicate (this copies all current parameters) +4. Give your new variant a descriptive name +5. Modify the configuration as needed + +Each variant appears as a separate column in the playground, allowing direct comparison of outputs. + +### Side-by-Side Testing + +With multiple variants set up, you can: +- Enter the same input text across all variants +- Compare the generated outputs side by side +- Review response times for each configuration +- Monitor the cost per request for different models + +This parallel testing helps you understand how different prompts and models handle the same input. + +### Version Control and Deployment + +The playground integrates with Agenta's [prompt management system](/prompt-engineering/overview) to track and deploy changes: + +1. Click "Commit" to save a new version of your variant +2. Changes remain in development until explicitly deployed +3. Use "Deploy" to push configurations to specific environments (development, staging, production) + +## Working with Test Sets + +### Loading Existing Test Sets + +You can import test sets that you've created through: + +- CSV uploads +- Programmatic creation +- Web UI input + +The test set must contain columns that match your prompt template variables. + +### Saving Test Cases + +To save an interesting test case: + +1. Click the three-dot menu on the right side of the test case card +2. Select "Add to Test Set" +3. Choose an existing test set or create a new one +4. Review the input/output mapping (use default settings unless you have specific needs) +5. Preview the changes to your test set +6. Confirm to save + +The Agenta playground serves as a comprehensive prompt engineering environment, offering advantages over traditional playgrounds like OpenAI's by providing integrated version control, deployment capabilities, and support for multiple models and frameworks. Whether you're developing new prompts, comparing model performance, or deploying to production, the playground provides the tools needed for effective LLM application development. \ No newline at end of file diff --git a/docs/docs/prompt-engineering/playground/02-adding-custom-providers.mdx b/docs/docs/prompt-engineering/playground/02-adding-custom-providers.mdx new file mode 100644 index 0000000000..c2b3121621 --- /dev/null +++ b/docs/docs/prompt-engineering/playground/02-adding-custom-providers.mdx @@ -0,0 +1,148 @@ +--- +title: "Adding Custom LLM Providers" +description: "Learn how to add and configure custom LLM providers like Azure OpenAI, AWS Bedrock, Ollama, and others to use your own models in Agenta's playground and applications." +sidebar_position: 3 +--- + + +```mdx-code-block +import { Stream } from '@cloudflare/stream-react'; +import Image from "@theme/IdealImage"; +``` + +Agenta supports a wide range of LLM providers beyond the default options. This guide shows you how to configure custom providers and models for use in your Agenta applications. + +You can integrate self-hosted models into Agenta by adding custom providers such as: + +- [Azure OpenAI](#configuring-azure-openai) +- [AWS Bedrock](#configuring-aws-bedrock) +- [OpenAI-compatible endpoints](#configuring-openai-compatible-endpoints-eg-ollama) (including self-hosted models, OpenAI finetuned models, [Ollama](#configuring-openai-compatible-endpoints-eg-ollama), etc.) + + +:::info +You can add custom models to any of the providers already listed in the playground, such as [OpenRouter](#adding-models-to-a-provider-eg-openrouter), Anthropic, Gemini, Cohere, and others. This is especially useful for accessing specialized or new models that aren't included in Agenta's default configurations. +::: + +--- + +## How to Add Custom LLM Providers + +<Stream controls src="acabccbcc814dc051a54bf2c97ff097c" height="400px" /> +<br /> + +### From Settings + +1. Navigate to **Settings** → **Model Hub**. +2. Click **Create Custom Provider**. +3. Select the provider type and enter the required credentials. +4. Click **Save**. + + +### From the Playground + +1. Open any app in the Playground. +2. Click the model dropdown menu. +3. Select **Add Custom Provider**. + +:::note +You can add multiple models to the same provider. This allows you to organize related models under a single provider configuration. +::: + + +## Configuring Azure OpenAI + +To add Azure OpenAI models, you'll need the following information: + +- **API Key**: Your Azure OpenAI API key +- **API Version**: The API version (e.g., `2023-05-15`) +- **Endpoint url**: The endpoint of your Azure resource +- **Deployment Name**: The name of your model deployment + +### How to Retrieve Azure Credentials + +1. **Access the Azure Portal:** + Log in to the [Azure Portal](https://portal.azure.com). + +2. **Locate Azure OpenAI Service:** + - Search for **Azure AI Services** in the portal. + - Click on your resource to view its details. + +3. **Retrieve API Keys and Endpoints:** + - Navigate to the **Keys and Endpoint** section. + - Copy the API key and endpoint URL. + +4. **Find Deployment Names:** + - Go to **Model Deployments**. + - Select the desired deployment and note its name. + +### Configuration Example + +```plaintext +API Key: c98d7a8s7d6a5s4d3a2s1d... +API Version: 2023-05-15 +API base url: Use here your endpoint URL (e.g., https://accountnameinstance.openai.azure.com +Deployment Name: Use here the deployment name in Azure (e.g., gpt-4-turbo) +``` + +## Configuring AWS Bedrock + +To add AWS Bedrock models, you'll need: + +- **Access Key ID:** Your AWS access key +- **Secret Access Key:** Your AWS secret key +- **Region:** The region where your Bedrock models are deployed + +### How to Retrieve AWS Credentials + +Refer to these tutorials for detailed instructions: + - [AWS Bedrock Getting Started Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) + - [DataCamp AWS Bedrock Tutorial](https://www.datacamp.com/tutorial/aws-bedrock) + + +### Configuration Example + +```plaintext +Access Key ID: xxxxxxxxxx +Secret Access Key: xxxxxxxxxxxxxxxxxxxxxxx +Region: <region_name> (e.g eu-central-1) +Model name: <model_name> (e.g anthropic.claude-3-sonnet-20240229-v1:0) +``` + + +## Configuring OpenAI-Compatible Endpoints (e.g., Ollama) + +For any OpenAI-compatible API, including self-hosted models: + +- **API Key:** The API authentication key +- **Base URL:** The API endpoint URL + +This configuration works for: +- Self-hosted models using vLLM +- LocalAI +- 3rd party providers with OpenAI-compatible endpoints +- Fine-tuned OpenAI models + +### Configuration Example + +``` +API Key: your-api-key +Base URL: https://your-api-endpoint.com/v1 +``` + +:::warning +Make sure to include `/v1` at the end of the Base URL. +::: + +:::warning +If you're running both Ollama and self-hosting Agenta on your local machine, set the Base URL to http://host.docker.internal:11434/v1 to allow Agenta's completion service (running behind Docker) to access Ollama. +::: + +## Adding Models to a Provider (e.g. OpenRouter) + +For some providers like OpenRouter, Agenta does not include all available models due to their high number. To add models to an existing provider: + +1. Navigate to **Settings** → **Model Hub**. +2. Select the provider you want to add models to. +3. Enter the API key and an identifier +4. Add the models you want to use +5. Click **Save** diff --git a/docs/docs/prompt-engineering/playground/02-custom-providers.mdx b/docs/docs/prompt-engineering/playground/02-custom-providers.mdx deleted file mode 100644 index bbb65252e8..0000000000 --- a/docs/docs/prompt-engineering/playground/02-custom-providers.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: "Adding Custom LLM Providers" -description: "Learn how to add and configure custom LLM providers like Azure OpenAI, AWS Bedrock, Ollama, and others to use your own models in Agenta's playground and applications." -sidebar_position: 3 ---- - - -```mdx-code-block -import { Stream } from '@cloudflare/stream-react'; -import Image from "@theme/IdealImage"; -``` - -Agenta supports a wide range of LLM providers beyond the default options. This guide shows you how to configure custom providers and models for use in your Agenta applications. - -You can integrate self-hosted models into Agenta by adding custom providers such as: - -- [Azure OpenAI](#configuring-azure-openai) -- [AWS Bedrock](#configuring-aws-bedrock) -- [Vertex AI](#configuring-vertex-ai) -- [OpenAI-compatible endpoints](#configuring-openai-compatible-endpoints-eg-ollama) (including self-hosted models, OpenAI finetuned models, [Ollama](#configuring-openai-compatible-endpoints-eg-ollama), etc.) - - -:::info -You can add custom models to any of the providers already listed in the playground, such as [OpenRouter](#adding-models-to-a-provider-eg-openrouter), Anthropic, Gemini, Cohere, and others. This is especially useful for accessing specialized or new models that aren't included in Agenta's default configurations. -::: - ---- - -## How to Add Custom LLM Providers - -<Stream controls src="acabccbcc814dc051a54bf2c97ff097c" height="400px" /> -<br /> - -### From Settings - -1. Navigate to **Settings** → **Model Hub**. -2. Click **Create Custom Provider**. -3. Select the provider type and enter the required credentials. -4. Click **Save**. - - -### From the Playground - -1. Open any app in the Playground. -2. Click the model dropdown menu. -3. Select **Add Custom Provider**. - -:::note -You can add multiple models to the same provider. This allows you to organize related models under a single provider configuration. -::: - -## Configuring Vertex AI - -To add Vertex AI models, please provide: - -- **Vertex Project**: Your Google Cloud **project ID** (e.g., `my-project-123`) -- **Vertex Location**: The **region** (e.g., `europe-west4`, `us-central1`) -- **Vertex Credentials**: A **Service Account** key in **JSON** format - -### How to Retrieve Vertex Credentials - -Follow Google’s guides to authenticate and create a service account key: - -- Vertex AI authentication: [https://cloud.google.com/vertex-ai/docs/authentication](https://cloud.google.com/vertex-ai/docs/authentication) -- Create / manage service account keys: [https://cloud.google.com/iam/docs/keys-create-delete#iam-service-account-keys-create-console](https://cloud.google.com/iam/docs/keys-create-delete#iam-service-account-keys-create-console) - -**Steps to Retrieve Vertex Credentials in the Console**: - -1. In the Google Cloud console, go to **IAM & Admin → Service accounts**. -2. Select a **Project**. -3. Click the email address of the service account that you want to create a key for. -4. Click the **Keys** tab. -5. Click the **Add key** drop-down menu, then select **Create new key**. -6. Select **JSON** as the **Key type** and click **Create**. - -> Clicking **Create** downloads a service account key file. After you download the key file, you cannot download it again. - -### Configuration Example - -```plaintext -Vertex project: my-project-123 -Vertex location: europe-west4 -Vertex credentials: -{ - "type": "service_account", - "project_id": "PROJECT_ID", - "private_key_id": "KEY_ID", - "private_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----\n", - "client_email": "SERVICE_ACCOUNT_EMAIL", - "client_id": "CLIENT_ID", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://accounts.google.com/o/oauth2/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/SERVICE_ACCOUNT_EMAIL" -} -``` - -### Available models - -See the LiteLLM docs for an up-to-date list of models: - -- Vertex Gemini models: [https://docs.litellm.ai/docs/providers/vertex](https://docs.litellm.ai/docs/providers/vertex) -- Vertex partner models: [https://docs.litellm.ai/docs/providers/vertex_partner](https://docs.litellm.ai/docs/providers/vertex_partner) -- Vertex self-deployed models: [https://docs.litellm.ai/docs/providers/vertex_self_deployed](https://docs.litellm.ai/docs/providers/vertex_self_deployed) - -:::warning -**Do not include** the `vertex_ai/` prefix in the **model name**. Use the bare model string (e.g., `gemini-2.5-pro`, `claude-3-5-sonnet@20240620`). -::: - -## Configuring Azure OpenAI - -To add Azure OpenAI models, you'll need the following information: - -- **API Key**: Your Azure OpenAI API key -- **API Version**: The API version (e.g., `2023-05-15`) -- **Endpoint url**: The endpoint of your Azure resource -- **Deployment Name**: The name of your model deployment - -### How to Retrieve Azure Credentials - -1. **Access the Azure Portal:** - Log in to the [Azure Portal](https://portal.azure.com). - -2. **Locate Azure OpenAI Service:** - - Search for **Azure AI Services** in the portal. - - Click on your resource to view its details. - -3. **Retrieve API Keys and Endpoints:** - - Navigate to the **Keys and Endpoint** section. - - Copy the API key and endpoint URL. - -4. **Find Deployment Names:** - - Go to **Model Deployments**. - - Select the desired deployment and note its name. - -### Configuration Example - -```plaintext -API Key: xxxxxxxxxx -API Version: 2023-05-15 -API base url: Use here your endpoint URL (e.g., https://accountnameinstance.openai.azure.com -Deployment Name: Use here the deployment name in Azure (e.g., gpt-4-turbo) -``` - -## Configuring AWS Bedrock - -To add AWS Bedrock models, you'll need: - -- **Access Key ID:** Your AWS access key -- **Secret Access Key:** Your AWS secret key -- **Region:** The region where your Bedrock models are deployed - -### How to Retrieve AWS Credentials - -Refer to these tutorials for detailed instructions: - - [AWS Bedrock Getting Started Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) - - [DataCamp AWS Bedrock Tutorial](https://www.datacamp.com/tutorial/aws-bedrock) - - -### Configuration Example - -```plaintext -Access Key ID: xxxxxxxxxx -Secret Access Key: xxxxxxxxxx -Region: <region_name> (e.g eu-central-1) -Model name: <model_name> (e.g anthropic.claude-3-sonnet-20240229-v1:0) -``` - - -## Configuring OpenAI-Compatible Endpoints (e.g., Ollama) - -For any OpenAI-compatible API, including self-hosted models: - -- **API Key:** The API authentication key -- **Base URL:** The API endpoint URL - -This configuration works for: -- Self-hosted models using vLLM -- LocalAI -- 3rd party providers with OpenAI-compatible endpoints -- Fine-tuned OpenAI models - -### Configuration Example - -``` -API Key: your-api-key -Base URL: https://your-api-endpoint.com/v1 -``` - -:::warning -Make sure to include `/v1` at the end of the Base URL. -::: - -:::warning -If you're running both Ollama and self-hosting Agenta on your local machine, set the Base URL to http://host.docker.internal:11434/v1 to allow Agenta's completion service (running behind Docker) to access Ollama. -::: - -## Adding Models to a Provider (e.g. OpenRouter) - -For some providers like OpenRouter, Agenta does not include all available models due to their high number. To add models to an existing provider: - -1. Navigate to **Settings** → **Model Hub**. -2. Select the provider you want to add models to. -3. Enter the API key and an identifier -4. Add the models you want to use -5. Click **Save** diff --git a/docs/docs/prompt-engineering/playground/_03-tools-function-calling.mdx b/docs/docs/prompt-engineering/playground/_03-tools-function-calling.mdx deleted file mode 100644 index 23f571bc15..0000000000 --- a/docs/docs/prompt-engineering/playground/_03-tools-function-calling.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Use Tools and Function Calling" -sidebar_position: 3 -sidebar_label: "Tools and Function Calling" -description: "Learn how to use tools and function calling in the Agenta playground." ---- - -<!-- TODO: Add comprehensive guide on using tools and function calling in the playground --> -<!-- This should cover: -- How to define tools in the playground -- How to configure function calling -- How to test function calling outputs -- Examples with different LLM providers that support function calling -- Screenshots and step-by-step instructions ---> - -This section is under construction. diff --git a/docs/docs/prompt-engineering/playground/_04-structured-output.mdx b/docs/docs/prompt-engineering/playground/_04-structured-output.mdx deleted file mode 100644 index 59a64ee1e1..0000000000 --- a/docs/docs/prompt-engineering/playground/_04-structured-output.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Work with Structured Output" -sidebar_position: 4 -sidebar_label: "Structured Output" -description: "Learn how to use structured output and JSON schema in the Agenta playground." ---- - -<!-- TODO: Add comprehensive guide on structured output in the playground --> -<!-- This should cover: -- How to configure JSON schema response format -- How to use dynamic variables in JSON schema (covered briefly in using-playground.mdx) -- How to test and validate structured outputs -- Examples with different schema types -- Best practices for schema design -- Screenshots and step-by-step instructions ---> - -This section is under construction. For basic information on dynamic JSON schema variables, see the [Using the Playground guide](/prompt-engineering/playground/using-playground#dynamic-json-schema-variables). diff --git a/docs/docs/prompt-engineering/playground/_05-test-sets.mdx b/docs/docs/prompt-engineering/playground/_05-test-sets.mdx deleted file mode 100644 index c772b6aa8a..0000000000 --- a/docs/docs/prompt-engineering/playground/_05-test-sets.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Load and Save Test Sets" -sidebar_position: 5 -sidebar_label: "Load and Save Test Sets" -description: "Learn how to load and save test sets in the Agenta playground." ---- - -<!-- TODO: Add comprehensive guide on working with test sets in the playground --> -<!-- This should cover: -- How to load existing test sets -- How to run multiple test cases -- How to save individual test cases to test sets -- How to create new test sets from the playground -- How to edit test cases -- Screenshots and step-by-step instructions ---> - -This section is under construction. For basic information on test sets, see the [Working with Test Sets section](/prompt-engineering/playground/using-playground#working-with-test-sets) in the playground guide. diff --git a/docs/docs/prompt-engineering/playground/_06-images.mdx b/docs/docs/prompt-engineering/playground/_06-images.mdx deleted file mode 100644 index 231f5b22ab..0000000000 --- a/docs/docs/prompt-engineering/playground/_06-images.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Use Images in Prompts" -sidebar_position: 6 -sidebar_label: "Images" -description: "Learn how to use images in prompts with vision-capable models in the Agenta playground." ---- - -<!-- TODO: Add comprehensive guide on using images in the playground --> -<!-- This should cover: -- How to upload images to prompts -- Which models support vision/images -- How to reference images in prompts -- Best practices for image-based prompts -- Examples with different vision models -- Screenshots and step-by-step instructions ---> - -This section is under construction. diff --git a/docs/docs/prompt-engineering/playground/_category_.json b/docs/docs/prompt-engineering/playground/_category_.json index 5d11187b61..9b8516fb9d 100644 --- a/docs/docs/prompt-engineering/playground/_category_.json +++ b/docs/docs/prompt-engineering/playground/_category_.json @@ -1,5 +1,5 @@ { - "position": 5, - "label": "Use the Playground", - "collapsed": true + "position": 4, + "label": "Playground", + "collapsed": false } \ No newline at end of file diff --git a/docs/docs/prompt-engineering/prompt-management/01-how-to-integrate-with-agenta.mdx b/docs/docs/prompt-engineering/prompt-management/01-how-to-integrate-with-agenta.mdx new file mode 100644 index 0000000000..e76248986f --- /dev/null +++ b/docs/docs/prompt-engineering/prompt-management/01-how-to-integrate-with-agenta.mdx @@ -0,0 +1,56 @@ +--- +title: "Integrating with agenta" +description: "Integrate applications and prompts created in Agenta into your projects." +--- + +import Image from "@theme/IdealImage"; + +Agenta easily integrates with your workflow, allowing you to use the latest version of the deployed prompt in your application. With Agenta, **you can update prompts directly from the web interface without modifying your code** each time. + +Here are the two ways you can use the prompts from Agenta in your code: + +### [1. As a prompt management system](/prompt-engineering/prompt-management/prompt-management-sdk): + +In this approach, prompts are managed and stored in the Agenta backend. You use the Agenta SDK to fetch the latest deployed version of your prompt and use it in your application. + +**Advantages**: + +- Agenta operates outside your application's critical path. +- Allows you to fetch and cache the latest prompt version for zero latency usage. + +**Considerations**: + +- You need to set up the [integration with observability](/observability/quickstart) yourself if you want to trace your calls for debugging and cost tracking. + +<Image + class="bg-white" + img={require("/images/prompt_management/as-a-prompt-management.png")} + loading="lazy" + alt="A sequence diagram showing how to integrate with Agenta as a prompt management system" +/> + + + +### **[2. As a middleware / model proxy](/prompt-engineering/prompt-management/proxy-calls)**: + +In this setup, Agenta provides you with an endpoint that forwards requests to the LLM on your behalf. + +**Advantages**: + +- Simplified deployment. +- Automatic tracing without any changes to your code. + +**Considerations**: + +- Adds a slight latency to the response (approximately 0.3 seconds). +- Currently, we don't support streaming for these endpoints. + +Overall, this approach is best suited for applications where latency isn't critical. + +<Image + class="bg-white" + img={require("/images/prompt_management/as-a-proxy.png")} + loading="lazy" + alt="A sequence diagram showing how to integrate with Agenta as a proxy" +/> + diff --git a/docs/docs/prompt-engineering/prompt-management/02-prompt-management-sdk.mdx b/docs/docs/prompt-engineering/prompt-management/02-prompt-management-sdk.mdx new file mode 100644 index 0000000000..68b79b7257 --- /dev/null +++ b/docs/docs/prompt-engineering/prompt-management/02-prompt-management-sdk.mdx @@ -0,0 +1,563 @@ +--- +title: "How to Manage Prompts with the SDK" +sidebar_position: 2 +sidebar_label: "Manage Prompts with the SDK" +description: "Learn how to create variants, commit changes, deploy to environments, and fetch configurations using the Agenta SDK." +--- + +import Image from "@theme/IdealImage"; + + +This guide covers all prompt management operations using the Agenta SDK: creating variants, committing changes, deploying to environments, and fetching configurations. + +:::tip Looking for a simpler introduction? +For a step-by-step tutorial, see the [prompt management tutorial](/tutorials/sdk/manage-prompts-with-SDK). +::: + +## Prerequisites + +Before starting, familiarize yourself with how versioning works in Agenta. Details are available on the [concepts page](/concepts/concepts). + +:::info Versioning in Agenta + +{" "} + +<Image + style={{ display: "block", margin: "16px 0px 16px 0px" }} + img={require("/images/prompt_management/taxonomy-concepts.png")} + alt="Taxonomy of concepts in Agenta" + loading="lazy" +/> + +Agenta uses a Git-like structure for prompt versioning: +- Create multiple branches called **variants** +- Each variant is versioned. + +- Deploy specific versions to **environments** (development, staging, production) + +**Typical workflow:** +1. Create a variant (branch) +2. Commit changes to the variant creating a new version +3. Deploy the version to an environment + +::: + +## Setup + +Initialize the SDK before using any operations: + +```python +import os +import agenta as ag + +# Set your API credentials +os.environ["AGENTA_API_KEY"] = "your-api-key-here" +os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" # only needed if self-hosting + +# Initialize the SDK +ag.init() +``` + +## Creating and Managing Variants + +### Create a New Variant + +Use `VariantManager.create` to create a new variant with initial configuration: + +```python +from agenta.sdk.types import PromptTemplate, Message, ModelConfig +from pydantic import BaseModel + +# Define your configuration model +class Config(BaseModel): + prompt: PromptTemplate + +# Create the initial configuration +config = Config( + prompt=PromptTemplate( + messages=[ + Message(role="system", content="You are an assistant that provides concise answers"), + Message(role="user", content="Explain {{topic}} in simple terms"), + ], + llm_config=ModelConfig( + model="gpt-3.5-turbo", + max_tokens=150, + temperature=0.7, + top_p=1.0, + frequency_penalty=0.0, + presence_penalty=0.0, + ), + ) +) + +# Create the variant +variant = ag.VariantManager.create( + parameters=config.model_dump(), + app_slug="my-app-slug", + variant_slug="my-variant-slug", +) +``` + + +:::tip +Use `VariantManager.acreate` for async variant creation. +::: + +This command will create a new variant and initialize it with the first commit containing the parameters provided + +- **Parameters:** + - `app_slug`: The slug of your application. + - `variant_slug`: The slug of the new variant. + - `parameters`: A dictionary containing the initial configuration parameters. + +**Note:** If a variant with the same `slug` and `version` already exists, the SDK will raise an exception. + +**Sample Output:** + +```python +{ + "messages": [ + { + "role": "system", + "content": "You are an assistant that provides concise answers" + }, + { + "role": "user", + "content": "Explain {{topic}} in simple terms" + } + ], + "llm_config": { + "model": "gpt-3.5-turbo", + "max_tokens": 150, + "temperature": 0.7, + "top_p": 1.0, + "frequency_penalty": 0.0, + "presence_penalty": 0.0 + }, + "template_format": "curly" +} +``` + +### Committing changes to a variant (Creating a new version in a variant) + +To save changes to a variant (creating a new version), use the `VariantManager.commit` method with explicit parameters. + +```python + +config2=Config( + prompt=PromptTemplate( + messages=[ + Message(role="system", content="You are an assistant that provides VERY concise answers"), + Message(role="user", content="Explain {{topic}} in simple terms"), + ], + llm_config=ModelConfig( + model="anthropic/claude-3-5-sonnet-20240620", + max_tokens=150, + temperature=0.7, + top_p=1.0, + frequency_penalty=0.0, + presence_penalty=0.0, + ), + ) +) + + +# Commit the new version +variant = ag.VariantManager.commit( + parameters=config2.model_dump(), + app_slug="my-app-slug", + variant_slug="my-variant-slug", +) + +print("Committed new version of variant:") +print(variant) + +# Commit the new version asynchronously (optional) +# async def commit_variant(): +# variant = await ag.VariantManager.acommit( +# parameters=my_prompt2.model_dump(), +# app_slug="my-app-slug", +# variant_slug="my-variant-slug", +# ) + +# print("Committed new version of variant (async):") +# print(variant) +``` + +:::tip +Use `VariantManager.acommit` for async version commit. +::: + +:::info Immutability +Each commit creates a new version of the variant. Versions are immutable once created. +::: + +**Sample Output:** + +```python +{ + "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", + "app_slug": "my-app-slug", + "variant_id": "01968c11-6f7c-7773-b273-922c5807be7b", + "variant_slug": "my-variant-slug", + "variant_version": 5, + "environment_id": null, + "environment_slug": null, + "environment_version": null, + "committed_at": "2025-05-01T07:26:08.935406+00:00", + "committed_by": "user@agenta.ai", + "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", + "deployed_at": null, + "deployed_by": null, + "deployed_by_id": null, + "params": { + "messages": [ + { + "name": null, + "role": "system", + "content": "You are an assistant that provides concise answers", + "tool_calls": null, + "tool_call_id": null + }, + { + "name": null, + "role": "user", + "content": "Explain {{topic}} in simple terms", + "tool_calls": null, + "tool_call_id": null + } + ], + "input_keys": null, + "llm_config": { + "model": "gpt-3.5-turbo", + "tools": null, + "top_p": 1.0, + "stream": null, + "max_tokens": 150, + "temperature": 0.7, + "tool_choice": null, + "response_format": null, + "presence_penalty": 0.0, + "frequency_penalty": 0.0 + }, + "user_prompt": null, + "system_prompt": null, + "template_format": "curly" + } +} +``` + +:::warning +The `user_prompt` and `system_prompt` are helper fields to populate the `messages` field in the `PromptTemplate`. Rely only on the `messages` field in your code. +::: + +## Deploying to Environments + +To deploy a variant to an environment, use the `DeploymentManager.deploy` method with the variant reference and `environment_slug`: The slug of the environment (`development`, `staging`, or `production`). + +```python +deployment = ag.DeploymentManager.deploy( + app_slug="my-app-slug", + variant_slug="my-variant-slug", + variant_version=None, # Deploys latest version if not specified + environment_slug="staging" # Options: development, staging, production +) + +print(f"Deployed to {deployment['environment_slug']}") +``` + +:::warning +- Deploying a variant without specifying a `variant_version` deploys the latest version. +- Only predefined environments with slugs `development`, `staging`, and `production` are currently supported. +::: + +**Sample Output:** + +```python +Deployed variant to environment: +{ + "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", + "app_slug": "completion", + "variant_id": "01968c11-6f7c-7773-b273-922c5807be7b", + "variant_slug": "my-variant-slug4", + "variant_version": 5, + "environment_id": "01968c14-c35d-7440-bcc8-9def594f017f", + "environment_slug": "staging", + "environment_version": 2, + "committed_at": "2025-05-01T07:26:08.935406+00:00", + "committed_by": "user@agenta.ai", + "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", + "deployed_at": "2025-05-01T13:41:33.149595+00:00", + "deployed_by": "user@agenta.ai", + "deployed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1" +} +``` + +## Fetching a Prompt Configuration + +You can fetch the configurations from a variant reference (`app_slug`, `variant_slug`, `variant_version`) or an environment reference (`app_slug`, `environment_slug`). The default behavior when fetching is to fetch the latest configuration from the `production` environment. If you don't provide a `_version` parameter but only a `variant_slug` or an `environment_slug`, the SDK will fetch the latest version of the variant from the specified **environment/variant**. + +:::tip +Check the [reference](/reference/sdk/configuration-management#prompt-configuration-schema) section for more details on the data format used for prompts. +::: + +### Default Behavior when fetching + +If you don't provide either `variant` or `environment` identifiers, the SDK fetches the latest configuration deployed to the `production` environment. + +```python +config = ag.ConfigManager.get_from_registry( + app_slug="my-app-slug", + variant_slug="my-variant-slug", + variant_version=2 # Optional: fetches latest if not provided +) + +print("Fetched configuration from production:") +print(config) +``` +Example Output: + +```python +{ + "prompt": { + "messages": [ + { + "role": "system", + "content": "You are an assistant that provides concise answers" + }, + { + "role": "user", + "content": "Explain {{topic}} in simple terms" + } + ], + "llm_config": { + "model": "gpt-3.5-turbo", + "top_p": 1.0, + "max_tokens": 150, + "temperature": 0.7, + "presence_penalty": 0.0, + "frequency_penalty": 0.0 + }, + "template_format": "curly" + } +} +``` + +:::tip +Agenta provides a helper class `PromptTemplate` to format the configuration and then use it to generate the prompt. +```python +from openai import OpenAI +from agenta.sdk.types import PromptTemplate + +# Fetch configuration +config = ag.ConfigManager.get_from_registry( + app_slug="my-app-slug" +) + +# Format the prompt with variables +prompt = PromptTemplate(**config['prompt']).format(topic="AI") + +# Use with OpenAI +client = OpenAI() +response = client.chat.completions.create( + **prompt.to_openai_kwargs() +) + +print(response.choices[0].message.content) +``` +::: + +### Fetching by Variant Reference + +```python +# Fetch configuration by variant +config = ag.ConfigManager.get_from_registry( + app_slug="my-app-slug", + variant_slug="my-variant-slug", + variant_version=2 # Optional: If not provided, fetches the latest version +) + +print("Fetched configuration:") +print(config) +``` + +### Fetching by Environment Reference + +```python +# Fetch the latest configuration from the staging environment +config = ag.ConfigManager.get_from_registry( + app_slug="my-app", + environment_slug="staging", + environment_version=1 # Optional: If not provided, fetches the latest version +) + +print("Fetched configuration from staging:") +print(config) +``` + +## Deleting a Variant + +To delete a variant, use the `VariantManager.delete` method. + +```python +# Delete a variant +ag.VariantManager.delete( + app_slug="my-app", + # app_id="my-app-id", # you can also use `app_id` + variant_slug="obsolete-variant" +) + +print("Variant deleted successfully.") +``` + +:::warning + +- Deleting a variant removes all versions of the variant. This action is irreversible. +- Attempting to delete a variant that is deployed to an environment will fail. +::: + +## Listing All Variants + +To list all variants of an application, use the `VariantManager.list` method. + +```python +# List all variants (syncrhonously) +variants = ag.VariantManager.list( + app_slug="my-app" + # app_id="my-app-id", # you can also use `app_id` +) + +print(variants) +``` + +**Sample Output:** + +```python + +[{ + "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", + "app_slug": "completion", + "variant_id": "01968aba-9702-7263-a7fd-8b8565753230", + "variant_slug": "my-variant-slug3", + "variant_version": 2, + "environment_id": null, + "environment_slug": null, + "environment_version": null, + "committed_at": "2025-05-01T07:23:26.338901+00:00", + "committed_by": "user@agenta.ai", + "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", + "deployed_at": null, + "deployed_by": null, + "deployed_by_id": null, + "params": { + "prompt": { + "messages": [ + { + "name": null, + "role": "system", + "content": "You are an assistant that provides concise answers", + "tool_calls": null, + "tool_call_id": null + }, + { + "name": null, + "role": "user", + "content": "Explain {{topic}} in simple terms", + "tool_calls": null, + "tool_call_id": null + } + ], + "input_keys": null, + "llm_config": { + "model": "gpt-3.5-turbo", + "tools": null, + "top_p": 1.0, + "stream": null, + "max_tokens": 150, + "temperature": 0.7, + "tool_choice": null, + "response_format": null, + "presence_penalty": 0.0, + "frequency_penalty": 0.0 + }, + "user_prompt": null, + "system_prompt": null, + "template_format": "curly" + } + } +}, { + "app_id": "01963413-3d39-7650-80ce-3ad5d688da6c", + "app_slug": "completion", + "variant_id": "01963f1f-28ea-78e1-b390-39d270fe93fe", + "variant_slug": "key", + "variant_version": 4, + "environment_id": null, + "environment_slug": null, + "environment_version": null, + "committed_at": "2025-04-16T15:02:08.874979+00:00", + "committed_by": "user@agenta.ai", + "committed_by_id": "0196247a-ec9d-7051-8880-d58279570aa1", + "deployed_at": null, + "deployed_by": null, + "deployed_by_id": null, + "params": { + "ag_config": { + "prompt": { + "messages": [ + { + "role": "system", + "content": "You are an expert in geography" + }, + { + "role": "user", + "content": "What is the capital of {{country}}? tell me its name in arabic" + } + ], + "input_keys": [ + "country" + ], + "llm_config": { + "model": "gpt-3.5-turbo" + }, + "template_format": "curly" + } + } + } +}] +``` + +## Fetching a Variant's history + +To list all versions for a variant of an application, use the `VariantManager.list` method. + +```python +# List all variant versions/history (synchronously) +versions = ag.VariantManager.history( + variant_slug="variant-slug", + app_slug="my-app" + # app_id="my-app-id", # you can also use `app_id` +) + +print(versions) +``` + +**Sample Output:** + +Same as `VariantManager.list` but limited to the history of a specific variant. + +## Asynchronous Operations + +All SDK methods have async counterparts with an `a` prefix: + +```python +async def async_operations(): + # Create variant asynchronously + variant = await ag.VariantManager.acreate(...) + + # Commit changes asynchronously + updated_variant = await ag.VariantManager.acommit(...) + + # Fetch configuration asynchronously + config = await ag.ConfigManager.aget_from_registry(...) +``` + diff --git a/docs/docs/prompt-engineering/integrating-prompts/03-proxy-calls.mdx b/docs/docs/prompt-engineering/prompt-management/03-proxy-calls.mdx similarity index 97% rename from docs/docs/prompt-engineering/integrating-prompts/03-proxy-calls.mdx rename to docs/docs/prompt-engineering/prompt-management/03-proxy-calls.mdx index 2dcdface09..d0012fd612 100644 --- a/docs/docs/prompt-engineering/integrating-prompts/03-proxy-calls.mdx +++ b/docs/docs/prompt-engineering/prompt-management/03-proxy-calls.mdx @@ -1,8 +1,7 @@ --- -title: "Invoke Prompt (Proxy LLM Calls)" +title: "Proxy LLM Calls" description: "How to invoke your deployed prompts through Agenta's proxy service with automatic tracing and logging." sidebar_position: 4 -sidebar_label: "Invoke Prompts" --- import Image from "@theme/IdealImage"; diff --git a/docs/docs/prompt-engineering/_category_.json b/docs/docs/prompt-engineering/prompt-management/_category_.json similarity index 100% rename from docs/docs/prompt-engineering/_category_.json rename to docs/docs/prompt-engineering/prompt-management/_category_.json diff --git a/docs/docs/reference/api/accept-invitation.api.mdx b/docs/docs/reference/api/accept-invitation.api.mdx index 88367d84c6..bce95f2bf9 100644 --- a/docs/docs/reference/api/accept-invitation.api.mdx +++ b/docs/docs/reference/api/accept-invitation.api.mdx @@ -5,75 +5,370 @@ description: "Accept an invitation to an organization." sidebar_label: "Accept Organization Invitation" hide_title: true hide_table_of_contents: true -api: eJztVt9v4zYM/lcEPm2AV2fF7cV7WbYVuO62NUizDUMbBIzNxrrakk+S2+YM/+8DJTt2nLb7gduelrdY1EfyI/lRDTjcWUhu4MrsUMmP6KRWsI4gI5saWfm/CczTlConUAmpHqTzVsJp/qBHF89u1a1aorRkk1slhBBvV6vFxRNfllolYjOC3XwtrENX202qM0rEV7PZs3cuB49KO3Gna5UJbUSOVtBTJQ1lE6Q3LyD9rmuBhSHM9mJLhVY7zsHl0h5l8RzarVqSq43q8/rh+urnJdlKK0uJCPRQNmHnUZt7W2FKE8Tz2Qwi0BUZb3qZQQLoITYDAERQocGSHBmuUAMKS4IExqFuZAYRSC5RhS6HCAx9qJkSSJypKQKb5lQiJA24fcXXrTNS7SACJ13BH8aVF5cZtG108HXI4FM4+q0Hm3qpjH5PqRv5+FCT2f8jJ4uAFVysAwJZ963O9nxtCphq5Ug5PsKqKmTqaYjfW277ZuSvMlwvJ8l67/qe1GthrLxBGwGVKIvXLC+8QdtGvYXecgJHyd90Dnu49XDdTwd17lqGMV1b+kC51ZJmMs3XdZqStXd1Ifoehr9ORfDy5vz8FPhXLGQWGunCGG3+BuqE4Ixcx5t0VNpTg0KnR6eo9ld3fkyOieY2675I5WhHBtr1QDYag/tRNX7UIUAuXWl3rxXuJ7IWdwQHsFdqzGSIFZ/+WaE5r+C6sxvVeqA3sPtyGt8H+p5z1puwNp4AhtqW5HLNolRp67wOuRwSiMfKY+NmIkRtfFALGzdj5WhjL2sUB5GDCCyZh17WalNAArlzlU3iOC10nZ3hjpTDM5QxVhJ4ji2ltZFu76/MF5fvaP+WMCMDyc16bHDNHRV65NjsUB6s5Dtitjr5mdcu16bffZ0C5eEW08G9uhxk5OIJy6qgkQwMBe+mfWg+kOpOe9OO9rnPTMwXlxABcxAmZ3b25RkvhcnaHRvzJGHqJ6kP3B9DNKHwQN4oIEdYfjMccFpc3BLVGC9s+eOFMF5IR9E1w2z//z74F94HXbc6enJxVaD0muQr3XQTeXP0FrAQQXL6OBiGks9PFjrPJUTd84PFJueZT26gabZo6RdTtC1/DhuZhy+TFrcFq9UdFpZe6YrPlp2wfS5eyuee9tMHwAMWNRv6sX9AI9nbp/fci4Haj332EU155DXyH7o/KpPfV3kvdk1n8l3w9oXfKgPEyZLlyMONea++L9uuR+K/uLpeQQTb7uVU6ozvGHzkjYWPIVxdhdbjpxV/a6BAtat5LyYQMPn3B8FxSMc= +api: eJztVt9v4zYM/lcEPm2AF2fF7cV7We9W4LrbliDNdji0QcHarK2rLfkkuW3O8P8+ULJjJ2m7H7jtaXmLTH4UP5If1YLD3EJyCQuTo5Kf0UmtYBNBRjY1svZ/EzhNU6qdQCWkupfOWwmn+UBPHGdX6kqtUFqyyZUSQoi36/Xy7JGdpVaJuJ7AXn8vrEPX2OtUZ5SI7+bzJ33Ox4hKO3GrG5UJbUSBVtBjLQ1lB0ivnkH6oBuBpSHMtuKGSq1yzsEV0u5l8RTalVqRa4wa8vrpYvHrimytlaVEBHooO2DnQZs7W2NKB4gn8zlEoGsy3vQ8gwTQQ1yPABBBjQYrcmS4Qi0orAgS0Ca/lhlEILkyNboCIjD0qWEmIHGmoQhsWlCFkLTgtjV7WWekyiECJ13JBwuTi/MMui7aIe/u+yXw3w9gh1Fqoz9S6iYxPjVktv8oyDJghRCbgEDWvdbZlt0OAVOtHCnHn7CuS5l6puOPlpu8ncSrDVfHSbI+ur4j9dI11t6gi4AqlOVLlmfeoOuiwULfcAJ7yV/2AQe4zejuZ4H6cB3DmL4J/UW5sZL2YHYvmjQla2+bUgwdC3+dihDl1cnJMfDvWMosNPuZMdr8DdQDgjNyPW/SUWWPDUqd7n1FtV3c+qHYJ5rbrD+RylFOBrrNSDYag9tJNX7W4YJcusrmLxXuF7IWc4Id2As1ZjLEmr/+WaE5rxC6t5vUeqQ3sPt8Gj8G+p4KNpiwEh4BhtpW5ArNElRr67zquAISiKeSaOM2yE4X70TCxu1UMLrYaxfFQckgAkvmftCuxpSQQOFcbZM4TkvdZDPMSTmcoYyxlnC0cvxX8YZNgWfbUtoY6bYe73R5/o62bwkzMpBcbqYGF9xloW/2zXYlw1q+I2awl6TTxhXaDNuvV6UieDFF3L+rUVrOHrGqS5pIw9gEvQKMDQlS3Wpv2peiT+w1pnekWAOZpJDzfPbtbP4cE72DOF2e95OGqZ+0IQlvBtEB1zuWJ5dzhNUP4wdOkYtfoZrihZ0/fRhMdvHhLdtx9v9/LfwLr4W+cx09urguUXrN8pVu+4m9hL2JhQiS3VNhHFo+PtrzPLcQ9W8Q1qCCpSC5hLa9QUu/mbLr+Dgsap6/TFq8KVnEbrG09EIzfLXq9e5r8Vwad7Q9fBfcY9mwoZ/8ezSSo335yIMeqO005nCjnj5eKv9h1L3q+O1VDDLX9iZvQrRv/I4ZIY5WLt88eJwOovy87WayCpaLizVEcNO/oyqdsY/BB95f+BCuq+vQaPzQ4rMWSlR5w1sygYDJvz8AGfBEVQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Accept Organization Invitation"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} - path={"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}/workspaces/{workspace_id}/invite/accept"} +></MethodEndpoint> Accept an invitation to an organization. Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 +HTTPException: _description_; status_code: 500 +HTTPException: Invitation not found or has expired; status_code: 400 +HTTPException: You already belong to this organization; status_code: 400 Returns: - JSONResponse: Accepted invitation to workspace; status_code: 200 +JSONResponse: Accepted invitation to workspace; status_code: 200 <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}]} -> - -</ParamsDetails> +></Heading> -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"}}}}} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "project_id", + in: "query", + required: true, + schema: { type: "string", title: "Project Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"token"} + required={true} + schemaName={"Token (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Token" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"email"} + required={true} + schemaName={"Email (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Email" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/add-trace.api.mdx b/docs/docs/reference/api/add-trace.api.mdx new file mode 100644 index 0000000000..991dad4ee9 --- /dev/null +++ b/docs/docs/reference/api/add-trace.api.mdx @@ -0,0 +1,1032 @@ +--- +id: add-trace +title: "Add Trace" +description: "Add Trace" +sidebar_label: "Add Trace" +hide_title: true +hide_table_of_contents: true +api: eJztWllz2zYQ/iuafWpnJMuXnFZPVWRmotqRNBKdh2o0GoiELMS8AoBuVI3+e2cBHiB12nHaPDAPjma52F18e2FBrkGSRwHtCdicOCx4hGkdwohyIlkY9FxoA3HdmeTEoVAHTr/GVMj3obuC9hqcMJA0kPiTRJHHHLWq+UWEAdKEs6Q+wV8RR5mSUaHoEQnUDxKsBgtoT9YgVxFFXZyTFWzqGSGIPQ820zpIJj0kjNXaTR2USSUpxHUZWkC8YUHhUfX7FuYc3y0CHMad2CP8l4FNPdzGr1BfA5PUF9De+bSEynSTUcL5F+rI04ByOCWSujMid0IuJEe312ERch95wCWSNiTz6UH5XS221kEzII7cH6HkQYtNlLjUoz9Aya0WmyhJ4ZqvZsw9UU8cM/cksN6vaj3XxOtNtaRoZVpSwN5USwpXpkVlYqKgLDZdhNWFJvyYPEfYMXgT7ohwGsgj9h+yd6gEmLqfWHAEDRrEPubseNjpz+56/dvZQ388tLq9Dz3rFuoGvde3rVG/c18gjq3RZ2tUIHXve1bfLpCGo8HtQ7fMN+iPHz5ZIzB2kJaEO7R7e6vptgLi09eCpADvE5UpICThcqby5jvyjAWSPlJ+WC1qqtl6JdDA/U+0WoGb6RSSyFjMnNA9ojYLCbtjP4xn3cGthUFhKZ8atMFdiWCNRoNtdyq1XdS626HaLJ8KQR5f71UlpfYpkbKpA5GSs3ksT+2cJ2jdibg/L1LmYehREijSbl15B/wQe96fIgwavSCKpdEHja631Tb3Ljp+pCguhRd12U6OJwbwMw1kCbfE0vIJIk3WfRUwzUWMbyGJH71JUhiW25ngKix+aFhsLdTHaMapi/VEBYLp51KlsDCmDO3HDbd0FG7q4LHg6bRwfFlPfmnHr8Lrfwuv1LGG00oBds+CpxfF172KqmOKM3X5gW/HkcaEtRqyqiGrGrKqIasasqohqxqyquNONWRVYVENWdWQ9fOH188/ZL3FlLPDlrImYXNKXwazrd/jHZOevJ4c6ReQsEH+HAnJY6oIIgoDoeP78vwS/3OpcDiLMCpxK7HjUCEWsVcbJcxQf+17zGfKBdMs+xL0c8KCM08YaxWl5DIGGMWxu6S8ceCkpqdm7QhXkQG0UWhfX+7A8zPxmKvQqlmch/z1YLpUEubhrz3V0wudwtOX1K9pOQMMvEJtIOLui8dDzjSOeJplP6sCo2bj02OuwH1p1Qmf4YscXo3u/m3cavgOpdFH2x5uCdS+LTq147o1O3nj71O5DPEzgCgUKCwicgltaEacPjP6d1PqvGzq1/FNLESUY3Qpz8TcgzYspYxEu9l0vDB2z8gjDSQ5I6xJIgZbutXTWhdZVVwL6sScyZWS1xn27ujqIyUu5dCeTE2GMQaWDpUiW548EbujCJo+F0InlsuQs3+0/+vA0IClXoWoYMiO8i8erG/EjzxqXE1N1oWLHyw5rcZ5q3HRsi+u2ucX7db12fl16y8o3t0c4jOvXw7xlW5Q4GpBfmstbq4brXcX7xrXrZvLxvxq4TQund9vrhY3N2RBbmDrSuTUZaU7jlOX5UeYPEOyQ1BOMm4fSnz6EmHvDYExkRsLjcH6EIL5IHyIqzC67pxLy1NkbknhRGZMLpN0MjHrRjaBHLKmKBGjP2kVk/UuYHfhXxahekf6LQ1GPQsWoUqa9BykM/I9cZ5ogCeNrO3B+dnF2fm+FE4W1DrDXtIViCPzqSxhw5gsFImsPKCLfNUSQFLi/5E/QCuxHPkkMOUZVatgUJb/kn6TzcgjTBV7pXadFLQJJAUtQc3AT0AdsCYvsQC2J7Bez4mgD9zbbJD8NaYci9O0Ds+EMzJH0CbYcJZpmVrDE12p/q46Y0O1BWT3Yl2WSl0SO5he0XEcGsmDvFOjRg8HY4zIefJ5lq+DlhPcFf5tA+DXXbha1UlFW4NHgsdYx66Wif/+BTXi0IE= +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Add Trace"} +></Heading> + +<MethodEndpoint + method={"post"} + path={"/preview/tracing/traces/"} +></MethodEndpoint> + +Add Trace + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"OTelSpanKind"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, + `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, + `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, + `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"OTelStatusCode"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, + `STATUS_CODE_OK`, `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "count": 0,\n "links": [\n null\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/add-variant-from-base-and-config.api.mdx b/docs/docs/reference/api/add-variant-from-base-and-config.api.mdx index b79ae2556a..d0fa2cf904 100644 --- a/docs/docs/reference/api/add-variant-from-base-and-config.api.mdx +++ b/docs/docs/reference/api/add-variant-from-base-and-config.api.mdx @@ -5,77 +5,668 @@ description: "Add a new variant based on an existing one." sidebar_label: "Add Variant From Base And Config" hide_title: true hide_table_of_contents: true -api: eJztV01v2zgQ/SvEnHYB1c4Ge9JpnTaLBt02Rj66B8cwJuLYZiuRKkkl8Rr+74shJUuykzhNgD1tLpHF4RvOzHvD0Ro8LhykE/iKVqH2DqYJSHKZVaVXRkMKIykFCk334i7aiFt0JIXRArWgB+W80gthNA1u9CUWJNCJ8fnllRhmRs/V4kbf6JFduPRGCyFEiavcoBS/jKSsvf5pTXGCjsZx6ddU1E8iM9qj0uyAvW6PcPYh6R1JY0GJQC1FiRYL8mTdgB1foHLUuP54dTU+fcgohJaKsCaFmgu/bKEzU+VSaOPFLQmUkkO1ArOMnCMZQclXVjeo11oZPRmVZR3NBbnSaEeJGOnVNBVfOueU5FHljhGpOcgAEjAlWeQfZxJSQCln9Y7Z3JpixrHPUMtZzCgkYOlHRc6fGLmCdA2cJ9KeH7Esc5UFsOE3xyVcg8uWVCA/lZZdeUWOfwVcJfnRr0qCFJy3SrMDr3zOL7gu4kzCJgFN99tjccKf28ZB1/kQX9i23h8DeNH298F0u7stbIhSSsUhYj7uRORtRUkDam6/UeY7oOMWYZNAZopC+VlBzuEiHAb16nwO6WT3WJtk+0ZXeQ6baYv5PqCIzzXKZrPvnkulLEmWWZPwR5K5n59ezB2fTwoHNuy/9cfpCC8iIUPijo+O+F9f45dVoPe8ykXDXkheTqo2cX16YVkeYNeoLGtyse0hVrB1Q4cmd8/jNxSMPl5K3l3iltZwLQ/4Gker2leo9CFHQVyNl58T4wuFtCOiyqrXMv3aKghkulNORQbUpkp7WpDteL1ojPigltCTnKF/tcYighj5EEIp34h3HRFqvMJINVckZ7erOvuvwfxco4iTVV0gYxeo1T9BM28APu/A1Mj3xn53JWb0Bti/G4yAeaBr1TruiLSnvx1h9fTSFULSaX/9Prcl1bQn9p0LdcYRdYNoFgTPKI1ouSeKIJSRlvUlwo1xk8Dvx8f7ve8r5krG9J5aa+zPNL5+u4uXOz8pT4XbN8hN1lt9QeEabW2mbY3QWlx11PaXiQcMbHaL59rB9p5qwJ42DckQV7x6iB8cV3Rd2027vbRJb8zu02F8iOl7zFljwgPcHmCsbUF+aXh4Ko3z4er0S0hhWFPTDXmQescEhAQc2bswSEzWUNkcUlh6X7p0OMxyU8kBLkh7HKAaYqmCbhxllVV+FbaMxmefaPWRUJKFdDLtGlwyOWK5+2bbTGOpPhEHHns3jCq/NLaWOCSgmJXLuIsjY9pdtOPe6QMWZU698a2t3v6M1l/rXRvtUm+4emQ4apkJSs9NiKbRaciVGI3PuBGQjZcDHA1+GxzB3sdE1zgM91mQWZOKsAzJTlG25YAEqAgaA09Y/NEucKK48gXqLt6hvrBzvs4g/f93z3/x3VNLwtODH5Y5Kh2HlNBEo4InzeXiIIFWw9MEliz0dALrNb+5tvlmw69/VGRZptP6Wrpllk64fS4bwa7hO63icMTFfheaHJvnVRToTs/nfhx3jDI+/LO2004vYjrwtVd/pRVG8h6L99xA8R5SCN9+vDt0jPBuDTnqRRV1FzH571+oCGap +api: eJztVk1v2zgQ/SvEnHYB1c4Ge9JplTRFg+62RpL24hjGRBzbbCVSJakkXkP/vRhSsiQ7SbOXnjaX0JzvN/OG2oHHtYN0Dl/QKtTewSIBSS63qvLKaEghk1Kg0PQg7qOOuENHUhgtUAt6VM4rvRZG0+RWX2NJAp2Yfbq+EdPc6JVa3+pbndm1S2+1EEJUuC0MSvFbJmUb9Z015Rk6mkXR76loTyI32qPSHICj7lO4fJuMUtJYUiJQS1GhxZI8WTfhwFeoHHWh39/czC4ecwqlpSLIpFAr4Te969zUhRTaeHFHAqXkUq3APCfnSEan5GurO6+ftTJ6nlVVW80VucpoR4nI9HaRio+DPCV5VIVjj9QlMoEETEUW+celhBRQymVrsVxZUy659iVquYyIQgKWvtfk/JmRW0h3wDiR9nzEqipUHpxNvzpu4Q5cvqES+VRZDuUVOf4V/CrJR7+tCFJw3irNAbzyBV9wX8SlhCYBTQ/7tBjwl8y46BYP8ZF1W/tYwKvMz4Pq3rpvbKhSSsUlYjEbVORtTUnn1Nx9pdwPnM56D00CuSlL5ZclOYfrkAzq7acVpPPDtJpkf6ProoBm0fs8D17EP62XpjkOz61SliTTrAP8CTCP8RnVPIj5LHGg4fh9PIYjXMSBDMCdnpzwvzHHr+sw3qu6EN30QvL6oToC7snasapi6XxoC+wQCPcHcFTWsJcoC8C1gh7EMVqW7pXjgoZYHdFyyf0ctrATCN503cwysiLMfqZlO4oMb5PAn6enxwh+wULJgI+4sNbY/wLfmJNxRfBJeSrdsUJh8pH0FWOrtKc1WWgW/XyitbgdsONvExNkbpRu/RI799PeOXteNYAhblj6M25wXTF0qzfoUQ9vRPf5Mt5G+J4K1qnwM3DkMPa2JL8xvIIr43wgoN9ACtN2NN2U1/EbHkBIwJG9D+tovoPaFpDCxvvKpdNpXphaTnBN2uME1RQrBUfvapCKc1YNK8VRXlvlt8FfNrv8QNv3hJIspPPFUOGaJyfOwlht3was1AdiVOKehaz2G2PVv7HBCShOYBOtuGyeyav+Rbl4xLIqaPRC9K09fgbGstGK70Wj/f3E/u3HFpRemVBNR+II1Rnm30iHTUHWRRRPJn9MTp7DtjUQ2eyy5SPmgY8dLEENkoPu7fsGCVAZyAiesPyrFzBoPCIl6qG/ny2QgzwH7/b/n1m/4jOrpYenRz+tClRh2YXm71qqz7tXyEECPdkXCWx4I6Rz2O345rMtmoavv9dkmbKL9v2644md857ddOTdwTfahm+F0Ow3YRuyelFHsh48Dry4o0WWc/Iv6i4GS4vHgd/H9qOwNJJtLD7wpsUHSCF8arJ12B7hbgcF6nUdORh98t8P8fAyug== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Add Variant From Base And Config"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/variants/from-base"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/variants/from-base"}></MethodEndpoint> Add a new variant based on an existing one. Same as POST /config Args: - payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters. +payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters. Raises: - HTTPException: Raised if the variant could not be added or accessed. +HTTPException: Raised if the variant could not be added or accessed. Returns: - Union[AppVariantResponse, Any]: New variant details or exception. +Union[AppVariantResponse, Any]: New variant details or exception. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"base_id":{"type":"string","title":"Base Id"},"new_variant_name":{"type":"string","title":"New Variant Name"},"new_config_name":{"type":"string","title":"New Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["base_id","new_variant_name","new_config_name","parameters"],"title":"AddVariantFromBasePayload"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"project_id":{"type":"string","title":"Project Id"},"base_name":{"type":"string","title":"Base Name"},"base_id":{"type":"string","title":"Base Id"},"config_name":{"type":"string","title":"Config Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"revision":{"type":"integer","title":"Revision"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"modified_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["app_id","app_name","variant_id","variant_name","project_id","base_name","base_id","config_name","revision"],"title":"AppVariantResponse_"},{}],"title":"Response Add Variant From Base And Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"new_variant_name"} + required={true} + schemaName={"New Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "New Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"new_config_name"} + required={true} + schemaName={"New Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "New Config Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + parameters + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Parameters", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"AppVariantResponse_"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_name"} + required={true} + schemaName={"Base Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>uri</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>modified_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={"{}"} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/add-variant-from-key.api.mdx b/docs/docs/reference/api/add-variant-from-key.api.mdx index ecf39ddad0..9a933fea78 100644 --- a/docs/docs/reference/api/add-variant-from-key.api.mdx +++ b/docs/docs/reference/api/add-variant-from-key.api.mdx @@ -5,36 +5,36 @@ description: "Add Variant From Key Route" sidebar_label: "Add Variant From Key Route" hide_title: true hide_table_of_contents: true -api: eJylVk2P2zYQ/SvCnFpAWW0WPelUZ5siCyeNsbvNxTCMWXFsMZFIhqSSqIL+ezGkvrzObtPWF0vkm+HwzZtnd+Dx6CDfwsoYB7sUtCGLXmp1IyAHFGL/Ba1E5fcHq+v9J2ohBYMWa/JkObQDhTUx2Ji9FJCCVJCDQV9CCpY+N9KSgNzbhlJwRUk1Qt6Bbw1HOW+lOkIKXvqKF1bGJDcC+n4Xo8n5V1q0HPI4WaGVJ+V5C42pZBEqzz46rXhtPstYvpeX5PhtvFGs++lKPkRc8gfj+hT48s/A19QyqtB1Lf2+JufwGPKjat8fAlOnoX06raimqoBvPCa7DlmSd0OWPoUHdDSV/F9SvkJH010KrQ7y+L/yXYcUQ8Y+HXH64SMV/qT121PKI5OLTCshBq5/t7peU7vBttLIIuDElpzRysXmXV1e8pcgV1hpuN+Qw11TFOTcoamS2wEMPy6PeMovV1fniT9gJUUIS15bq+2/yPpIdII8yoqfpKfanQMqXZzs/kBLpPJ0JAv9bqYfrcV2ocq3OhbITa/d8TkBL8QWIU9DAxnJPe/+U+v5XvHoAbdbTthIb2T36Wv8Fun73mEj5M39/eYsYeztaVNXQiTjbLPgkjW1ya1uPIumJl9q9j6jnQ9e50vIIUNjXNZFj+uzQc8Zm+ILT7WpMEQ7sl9GW2xsBTmU3huXZ1lR6UZc4JGUxwuUGRoZpslR0Vjp2xCy2tysqX1DKMhCvt0tAXcsrCiVU9jUJTRyHfx5MORV40tt5V+x/4MvlzGKWWHJ3s4O+/ob1qaic4ec2x8ccH59bHXzzsKslvCF58xyBqkOOlxjtINAUrLa3EAKTGds2+XFy4tLOGvmEsyziUWYzZGDsA3po25MfYAUqA6DCZ6w/nXeYIZYAzWqZb7ntHNS2dQWT998ZiqUYQZDHd0gqy1biIMU8unHc6AeUjjV1i6FkhWZb6HrmN4/bdX3vPy5Icvy2Q3BD0zitgMhHT8LyA9YOTorbzIy+Ol2mNefE0i/X/YoMdWGGquG3yZFDNUHHypH9XbD5nU850Vwizn4zDzZ2GLEqijI+Gexu8Wkbt7f3bPmhn8JtRYcY/ErOxF+jYXqcO8wPmGtgwrVsYm6jTn58zcXChjm +api: eJylVk1z2zYQ/SucPbUzjOl6euKpsptOPGobje3motFo1sRKREICCAAmYTn875kF+CUrdtNWF4nA28Xi7dtHdeDx6CDfwsoYB7sUtCGLXmp1KyAHFGL/Ca1E5fcHq+v9B2ohBYMWa/JkObQDhTUx2Ji9FJCCVJCDQV9CCpY+NtKSgNzbhlJwRUk1Qt6Bbw1HOW+lOkIKXvqKF1bGJLcC+n4Xo8n5ay1aDnmarNDKk/K8hcZUsgiVZ++dVrw2n2Us38tLcvw03ijW/Xwl7yIu+ZNxfQp8+Rfga2oZVei6ln5fk3N4DPlRtW8PganT0D6dVlRTVcA3HpPdhCzJH0OWPoVHdDSV/F9SXqOj6S6FVgd5/F/5bkKKIWOfjjj9+J4Kf9L67SnlkclFppUQA9e/WV2vqd1gW2lkEXBiS85o5WLzri4v+UuQK6w03G/I4b4pCnLu0FTJ3QCG75dHPOXnq6vzxO+wkiKEJa+t1fZfZH0iOkEeZcW/pKfanQMqXZzsfkdLpPJ0JAv9bqYfrcV2ocrfdSyQm16740sCXogtQp6HBjKSB979p9bzveLRA263nLCR3sju89f4NdL3rcNGyJuHh81Zwtjb06auhEjG2WbBJWtqkzvdeBZNTb7U7H1GOx+8zpeQQ4bGuKyLHtdng54zNsVXnmpTYYh2ZD+NttjYCnIovTcuz7Ki0o24wCMpjxcoMzQSzgoLu8kNQ8OoOSoaK30b8q02t2tq3xAKspBvd0vAPasu6ugUNrUQjVwH8x7cetX4Ulv5dxTHYNpljGLKWM93s/2+/oK1qejcPmdtBHucH5/64LyzcLIlfGFIs9ZBqoMO1xi9InJ0jcUHUvy2Yb4jfZcXP11cPkfqEJCsNrfDEGMRhnjkI8AgfdK2qWGQAtVhgsET1r/MG8wWi6VGtcz3kshOKpxa5OmLz0yFMgxrqKMb9Ldlr3GQQj69ZYc2QAqnItylULJ08y10HVP9l636npc/NmRZSrsh+JEJ3XYgpOPfAvIDVo7OypscD364Gwb7xwTSb5c9yk21ocaq4adJHUP1wbDKUcndsHkTz3kVbGUOPnNZdsAYsSoKMv5F7G4x0pu39w+sv+HvRK0Fx1j8zJaFn2OhOtw7jFJY66BCdWyihmNO/nwFaaQndQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Add Variant From Key Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/apps/{app_id}/variant/from-template"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Add Variant From Key Route @@ -43,29 +43,347 @@ Add Variant From Key Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"variant_name":{"type":"string","title":"Variant Name"},"key":{"type":"string","title":"Key"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"base_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},"type":"object","required":["variant_name","key"],"title":"AddVariantFromKeyPayload"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>base_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>config_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/add-variant-from-url.api.mdx b/docs/docs/reference/api/add-variant-from-url.api.mdx index 32a9ec7766..1949d6d4d5 100644 --- a/docs/docs/reference/api/add-variant-from-url.api.mdx +++ b/docs/docs/reference/api/add-variant-from-url.api.mdx @@ -5,36 +5,36 @@ description: "Add Variant From Url Route" sidebar_label: "Add Variant From Url Route" hide_title: true hide_table_of_contents: true -api: eJylVk2P2zYQ/SvCnFpAWW0XPelUZ5sgi6SN4d3NxTCMWXFsMZVIhqSSqIL+ezGkvrzObtPUF1vkm+HMm8cnd+Dx6CDfwsoYB7sUtCGLXmp1IyAHFGL/Ga1E5fcHq+t9YytIwaDFmjxZDu1AYU0MNmYvBaQgFeRg0JeQgqVPjbQkIPe2oRRcUVKNkHfgW8NRzlupjpCCl77ihZUxyY2Avt/FaHL+pRYthzxOVmjlSXneQmMqWYTKs49OK16bzzKW+/KSHD+NHcW6n67kQ8QlfzKuT4GbfwZ+bytGFbqupd/X5BweQ35U7ftDYOo0tE+nFdVUFXDHY7LrkCX5Y8jSp/CAjqaSfyTlS3Q09VJodZDH/5XvOqQYMvbpiNMPH6nwJ6PfnlIemVxkWgkxcP3a6vp+826NbaWRRcCJLTmjlYvDu7q85C9BrrDS8Lwhh9umKMi5Q1MlmwEM3y+PeMqvV1fniT9gJUUIS15Zq+1/yPpIdII8yqAf6al254BKFye73zESqTwdyUK/m+lHa7FdqPKdjgXy0Gt3fE7AC7FFyNPQQEZyx7v/NnruKx494HbLGzbSG9l9uo3fI33fOmyEvLm7W58ljLM9HepKiGS82yy45N5WyUY3nkVTky81e5/Rzgev8yXkkKExLuuix/XZoOeMTfGFI/tZFhzMv0ZXDG4BpffG5VlWVLoRF3gk5fECZYZGhsvkqGis9G0IWa1v3lL7hlCQhXy7WwJuWVdRKaewaUho5FtizgY/XjW+1Fb+Hcc/2HIZo5gUVuxmNthXX7E2FZ0b5Dz92NL0+Njp5p2FVy3hC8uZ1QxSHXRoY3SDQFKyWt9ACkxnnNrlxS8Xl3A2yyWYryYW4WqOHITtqfRxGtMcIAWqw70ET1j/Nm8wQyyBGtUy33PSOalsGounrz4zFUq1eIdEVW3ZQRykkE/vzoF6SOFEWrsUStZjvoWuY3bvbdX3vPypIcvq2Q2xD8zhtgMhHf8WkB+wcnRW3WRj8NNmuK0/J5B+u+pRYaoNJVYNP0EKf1E7v/iDC5WjeLth8zqe8yJ4xRx8Zp1sazFiVRRk/LPY3eKert/f3rHkhv8ItRYcY/EL+xB+iYXq0He4PWGtgwrVsYmyjTn58w+qdxgg +api: eJylVk1v2zgQ/SvCnLqAGmWDPelUJ9tFg3Zbw0l6MQxjIo4tthLJklRbV9B/L4bUl+MmbXd9sUW+Gc68eXxyCx73DvI1LIxxsElBG7LopVbXAnJAIbaf0UpUfruzut42toIUDFqsyZPl0BYU1sRgY7ZSQApSQQ4GfQkpWPrUSEsCcm8bSsEVJdUIeQv+YDjKeSvVHlLw0le8sDAmuRbQdZsYTc5fanHgkIfJCq08Kc9baEwli1B59sFpxWvTWcZyX16S46eho1j345W8j7jkLeO6FLj5J+B3tmJUoeta+m1NzuE+5Ed1eLcLTB2Hdum4opqqAu54SHYVsiT/9lm6FO7R0Vjyf0l5iY7GXgqtdnL/v/JdhRR9xi4dcPr+AxX+aPTrY8ojk7NMCyF6rv+xur5bvVniodLIIuDElpzRysXhXZyf85cgV1hpeN6Qw01TFOTcrqmSVQ+GX5dHPOWvi4vTxO+xkiKEJS+t1fY3sj4QnSCPMuhHeqrdKaDSxdHuL4xEKk97stBtJvrRWjzMVPlGxwJ56LXbPyXgmdgi5HFoICO55d2fjZ77ikf3uM38hg30RnYfb+PvSN+PDhsgr25vlycJ42yPh7oQIhnuNgsuubNVstKNZ9HU5EvN3me088HrfAk5ZGiMy9rocV3W6zljU3zuyH6WBQfzr8EVg1tA6b1xeZYVlW7EGe5JeTxDmaGRcFJX2E2uGBpumqOisdIfQr7F8vo1HV4RCrKQrzdzwA2LLsroGDZOEI18TUxob9aLxpfaym9RG71nlzGKGWM5ryb3ffkVa1PRqXtO0oj9jo8PbXDamRnZHD7zo0nqINVOhzYGq4gcXWLxkRS/bJjvSN/52Z9n54+R2gcki+V1f4exCHd44CPAxjaGsY0DgxSoDhcYPGH9YtpgtlgrNap5vqc0dlThOCJPX31mKpRq9rKJ8luz1ThIIR9fsv0YIIUjDW5SKFm4+Rralpm+s1XX8fKnhiwradPH3jOf6xaEdPxbQL7DytFJdaPfwbNVf63/SCD9cdWD2tQhlFg1/AQpfKTD9A8h2FU5CLntN6/iOc+DqUzBJx7L/hcjFkVBxj+J3cwu9PLdzS3Lr/8zUWvBMRa/sGHhl1ioDn2HmxTWWqhQ7Zso4ZiTP98B3TMmrw== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Add Variant From Url Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/apps/{app_id}/variant/from-service"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Add Variant From Url Route @@ -43,29 +43,347 @@ Add Variant From Url Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"variant_name":{"type":"string","title":"Variant Name"},"url":{"type":"string","title":"Url"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"base_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},"type":"object","required":["variant_name","url"],"title":"AddVariantFromURLPayload"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"url"} + required={true} + schemaName={"Url (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Url" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>base_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>config_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/admin-cancel-subscription.api.mdx b/docs/docs/reference/api/admin-cancel-subscription.api.mdx index 065d52e7f1..edc3d48fa3 100644 --- a/docs/docs/reference/api/admin-cancel-subscription.api.mdx +++ b/docs/docs/reference/api/admin-cancel-subscription.api.mdx @@ -5,36 +5,36 @@ description: "Cancel Subscription Admin Route" sidebar_label: "Cancel Subscription Admin Route" hide_title: true hide_table_of_contents: true -api: eJyVVMtu2zAQ/BVhTy1AWG7Qk051H0CMtIgRu70YRrCm1jZTilRIKqhr6N+LJWVbipMWPUkgd4fD2RkeIODWQ7GESVkpAwI+Kq2V2cJKgK3JYVDWTEsoALngXqKRpO99s/bSqZp3QUCNDisK5BjqAAYrggKs26JRvyPEvSpBgDJQwGNDbg8CHD02ylEJRXANCfByRxVCcYCwr7nfB8dMBAQVNC/c9gCzaQltu2IYX1vjyXPn1XjMn5LO7AqYN1KS95tGZ3ddMQiQ1gQygcuxrrWSETZ/8NxzOLNp27YV8P7q6hL4B2pVJjZfnLPuP1ChdixvUIl3SQGV5j8VqPKXBdrKwS6a/e0mij0UqxWnFWUCbclBu2rFcQ2dw31P0a82EYRWQOW3fxP/G3mPW4IT2OulUYxswbvt+Wy7fiAZBoNfxnulo7u61RnmLG9S9/VrfE7yvXTYseR6sZhdAKbZDof6KTo8m/ccnsVwZHe2CeycisLOciRq60N0f9hBAXlMSL5OAcr7EclTbECAJ/d0jEnjNBSwC6H2RZ5LbZtyhFsyAUeocqwVsL89ycapsI8tk9n0hvbXhCU5KJarfsGcvZXcMiw7DQprdUOsWxfQSRN21nWBOsZzl7pYGGU2NrZ3Gk4iuWwym4IAvkZSbDx6NxrDcx0HxRwLlDEWx7PjNohnKpzuDwKoipmAQFh9OG8wM1a+QtPD+/fYBvROmgT6FfJao4oZiGQO3USX6c0DAd1MeX7Dh6+b60rAjr1QLOFwWKOn7063LS+nx45HVyqPa82u36D2dMHn9HLAm7suIG8zEC/z/En7Fx/YJ9QNV0fnPKFTfGQ0ijgOlrmk9omUVIde18WLxSgnt89u5wto2z/tnx+a +api: eJyVVMtu2zAQ/BVhTy1AWG7Qk0510wIx0iJGnPZiGMGaWttMKFIhqaCuwX8vlpRfcdKiJwnk7HA4u8MtBFx5qGYwqhtlQMBnpbUyK5gLsC05DMqacQ0VIAPuJRpJ+t53Cy+dankXBLTosKFAjqm2YLAhqMC6FRr1O1HcqxoEKAMVPHXkNiDA0VOnHNVQBdeRAC/X1CBUWwiblut9cKxEQFBB88LNEWExriHGOdP41hpPnisvhkP+1HRQV8G0k5K8X3a6uO3BIEBaE8gEhmPbaiUTbfnguWZ7UBNjjAI+XlycE/9Ereqs5qtz1v0HK7SO7Q0q664poNL8pwI1/hygrTzZRbO5WSazT82KYr+iTKAVOYjzKHZr6Bxujhz9ZrNAiAIav/qb+d/Je1wR7MnehiYzijvejYez7eKBZDhp/CzdKx/d4+YHmoO92d23r/El2/faYTvI1d3d5Iww9/a0qZdpwovp0YQXKRzFre0CT05DYW05Eq31IU1/WEMFZUpIucgBKo8jUubYgABP7nkXk85pqGAdQuurspTadvUAV2QCDlCV2Cp4qW2UdotLhgIPvyfZORU2iW80GV/T5oqwJgfVbH4MmPLg5VE6he27iK26Jja1T++oC2vr+rTtsrvOVeyaMkubynuDe22fUT6S4bDzPbPs4eDDYPjWZfqCYjQZ9/lBmfKz05FgIF7YtTcKBFCTwgOBsPl02GCV3KIGzRHfv/t7InPvT6BfoWw1qhSWJGbbt36WH0cQ0DefG336QvYDMBew5qGpZrDdLtDTD6dj5OX8KnIba+VxoTkeS9SezvTsnxh4d9sn6X0B4nWdj7R59SV+Rt0xOk3RMzrFR6ahEbsms5ZcPpKS2nBUdfa0Mcs+FpOb6R3E+Ae6Ji4p sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Cancel Subscription Admin Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/admin/billing/subscription/cancel"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Cancel Subscription Admin Route @@ -43,29 +43,254 @@ Cancel Subscription Admin Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "organization_id", + in: "query", + required: true, + schema: { type: "string", title: "Organization Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/admin-create-checkout.api.mdx b/docs/docs/reference/api/admin-create-checkout.api.mdx index e786824d6d..aebd498ffc 100644 --- a/docs/docs/reference/api/admin-create-checkout.api.mdx +++ b/docs/docs/reference/api/admin-create-checkout.api.mdx @@ -5,36 +5,36 @@ description: "Create Checkout Admin Route" sidebar_label: "Create Checkout Admin Route" hide_title: true hide_table_of_contents: true -api: eJy1VV1v0zAU/SvRfQLJWsrEU54oHxIToFXb4KWqqtvkrjE4tmc700qV/46unbQJ3SYB4qmNfT/PPfd4DwG3HoolzKtGahDwViol9RZWAowlh0EafVFBAcgG69IRBlqXNZU/TBtAgEWHDQVyHGYPGhuCAozbopY/o/taViBAaijgriW3AwGO7lrpqIIiuJYE+LKmBqHYQ9hZ9vfBcRUCggyKDy5HAbOLCrpOHJJZhfrvM5BuG0agVKat1vezdW02Gw5xOLDOjD83rZeavB+f1W2DWobdWuFmcvFwcoJb0gHXKBnjob0FtzDuybdlSd6vW6f+HbzrFCz76hR03YpDeGu0J89e57MZ/1TkSyctA3x0uW1VdtUbcxNGB9KBzdFaJcs4j/y7Z5/9sZKu6zoBr8/PTwN/QyWrNMYPzhn3B1HBOuZkkKnuigJKxf9koMafGihTTm5R7y5vI0unQDHs/YnUgbbkoFt1YjhD53A3QvOzSQVCJ6Dx2+eA/0Le45bgEOxp0whGdsO33TG32XynMkyGvox9pdS93YhIR3gTuk+38T7B91iyweTjzc3iJGCa7XSo76IsZO96WciimmRXpg3MmoZCbVhDrPFJMkINBeRRUvJNUpycEbGUD9LicxDgyd0PysKbUEAdgvVFnsd1Oku7dIYyRyuBme2pbJ0Mu+gyX1x8ot1HwoocFMvV2OCaWZV4MjU7jAit/ESMWL+S8zbUxvUaNCxlnbwYEqlvTXTv0ZvH4rL54gIEcBsJq9nZq7MZ/I7gxJgXAsu4EEPueA3iNxQO/bOONXEbIBA2b44XXBnj3qAexXt+YJPSDngEegi5VSgj82Mh+36Wy/Q8gIB+mjy7OE/uZpgoCGCq1syCYgn7/QY9fXWq6/g4yRuPrZIeN4q5fovK00k9B72AF1f9WrzMQDxe5w/aPfoe3aNq2Tpu/3/I2D9K/zvN9J04Zlvxh5OcLjJfDExlgJPrvCzJhpHXifhylMPyLi6vb6DrfgGvJ8wB +api: eJy1VU1v2zAM/SsGTxsg1Fmxk0/LugEttqFBP3YJgoCx2VirLGmSXCwL/N8HSnbiNG2BbegpscSPx0fyaQsB1x6KOUyrRmoQ8FEqJfUaFgKMJYdBGn1RQQHIBsvSEQZaljWV96YNIMCiw4YCOQ6zBY0NQQHGrVHL39F9KSsQIDUU8LMltwEBjn620lEFRXAtCfBlTQ1CsYWwsezvg2MUAoIMig8uRwGziwq6TuySWYX63zOQbhtmoFSmrZYPk2VtVisOsTuwzow/67ZBLcNmqXDlxxe/jk5wTTrgEiXzOZQyY7hj/L4tS/J+2Tr1/0Rdp2DZrVPQdQsO4a3Rnjx7nU4m/FORL520TObe5a5V2VVvzEUYHUgHNkdrlSwj9/kPzz7bPZKu6zoB709PjwN/RyWr1LLPzhn3F1HBOp6/IBPuigJKxf9koMYfGyhTHtyi3lzexYk8JIpp70+kDrQmB92iE8MZOoebEZtfTQIInYDGr18i/ht5j2uCXbDnTSMZ2Q3fdvvcZvWDynDQ9HmsK6Xu7UaDtKc3sft8GZ8SfU8lG0zOb25mRwFTbw+behYlIDvrJSCLypFdmTbw1DQUasN6YY1P8hBqKCCP8pGvkrrkzIilfJARn4MAT+5hUBHehALqEKwv8jyu00napROUOVoJj1FN4212xqbAY++pbJ0MmxhvOrv4QptzwoocFPPF2OCaRy4N0aHZrn9o5RdiOvt9nbahNq4Xo2Fj6+TFfEl9Z6J7T22P7SOW96RZC7nOBHty8u5k8lwxvUM2nV30m4Nl3JwBRzQD8YiuHVEsbk1cGwiEzYf9BaPkBjWoR/Fe7uwBxB03gX6F3CqUcUUikG3f9Hl6M0BA33Zucmw8VzO0HgTwTNc8LsUcttsVerp1quv4OOkgt7CSHleKl+IOlacjPDthgTdX/f68zUA8jfOeNk8+Ug+oWraOMvEKGfuX6rXTHD4o+2wL/nCS08UtEMPUMsHJdVqWZMPI60ilOcpuy2eX1zfQdX8AZkzTOQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Checkout Admin Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/admin/billing/stripe/checkouts/"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Create Checkout Admin Route @@ -43,29 +43,282 @@ Create Checkout Admin Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai"],"title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "organization_id", + in: "query", + required: true, + schema: { type: "string", title: "Organization Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "plan", + in: "query", + required: true, + schema: { + type: "string", + enum: [ + "cloud_v0_hobby", + "cloud_v0_pro", + "cloud_v0_humanity_labs", + "cloud_v0_x_labs", + "cloud_v0_agenta_ai", + ], + title: "Plan", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "success_url", + in: "query", + required: true, + schema: { type: "string", title: "Success Url" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/admin-create-portal.api.mdx b/docs/docs/reference/api/admin-create-portal.api.mdx index 6a7fd47816..bf8be2b30c 100644 --- a/docs/docs/reference/api/admin-create-portal.api.mdx +++ b/docs/docs/reference/api/admin-create-portal.api.mdx @@ -5,36 +5,36 @@ description: "Create Portal Admin Route" sidebar_label: "Create Portal Admin Route" hide_title: true hide_table_of_contents: true -api: eJyVVEtv2zAM/isGTxsgxFmxk0/LHkCDbmjQZrsEQcDYTKJOtlSJLpYF/u8DJefVtAV2siGR1KfvoR0wrgMUMxhVtW5AwWdtjG7WMFdgHXlkbZtxBQWgFCxKT8i0cNYzGlDg0GNNTF6G7KDBmqAA69fY6L+xeaErUKAbKOCxJb8FBZ4eW+2pgoJ9SwpCuaEaodgBb530B/aCQQFrNrJwezIwG1fQdXMZE5xtAgXpvBoO5VNRKL12UgcF3LdlSSGsWpPd9cWgoLQNU8NSjs4ZXcax+UOQnt0RTdd1nYKPV1eXg3+h0VVC88176/9jKjgvxLJOuCti1Eb+NFMdLguMLc92sdneriLZ52R16rCiG6Y1eejmndqvofe4PWH0u00AoVNQh/Vb5P+gEHBNcBj2emkkI5vKbnc82y4fqOQz4WfxXunovm5+HHOkN7H7+jW+JvpeOmxfcj2dTi4GJm3PRf0SvZ1NorezGIjszrYsnqmJN1Zi4Gzg6HveQAF5TEW+TKHJhQ9HeUpHyEFBIP+0D0frDRSwYXahyPPS2LYa4JoaxgHqHJ0GcXWgsvWat7FlNBnf0PaasCIPxWx+WnAvjkoeOS87yINO35Cw1cdy1PLG+j5G+1BuUpfQoZuVje09c6MILhtNxqBArpF4Gg4+DIbwnL2zYgkDljEM+7PjNqhnLBzuDwqojkkAJqw/HTcEmbBeY3My7y2xzoAd2GD6w7kzqKPnI4xdr+MsvW6goFdSlItaitRJTVAgFt2I/sUMdrslBvrpTdfJcnraRLJKB1wa8fgKTaALNId3At7d9XF4n4F6GeVv2r74nD6haaU6OuYJvZYjo0HUXlDBktpHZUmOT7ou3ieZcnD45PZ+Cl33D53uFMw= +api: eJyVVF1rGzEQ/CvHPrUgfG7o0z3VTQsxaYlJ3L4YE9a6ta1Ed1IkXahr9N/LSuevOAn06Q5pdjWa2dEWAq48VDMY1Y1qQcBXpbVqVzAXYCw5DMq04xoqQAbcS0cY6N4aF1CDAIsOGwrkuMkWWmwIKjBuha36m4rvVQ0CVAsVPHXkNiDA0VOnHNVQBdeRAC/X1CBUWwgby/U+OOYgIKigeeHmqGExriHGObfx1rSePFdeDIf8qclLpyzjoIK7Tkryftnp4rYHgwBp2kBtYDhaq5VMbcsHzzXbA5sYYxTw+eLivPFv1KrObL47Z9x/dAXrWNigMu+aAirNfypQ488B2siTXWw3N8sk9qlYUexXVBtoRQ7iPIrdGjqHmyNFf5hMEKKAxq/eE/8neY8rgn2zt6FJjGLKu/Fwtlk8kAwnxs/SvfLRPW5+aHOQN6v79jW+ZfleO2wHuZpOJ2cNs7enpl6m2S4mabaLFIji1nSBZ6ahsDYcA2t8SHMf1lBBmVJRLnJoStbDUpnT4UsQ4Mk978LROQ0VrEOwvipLqU1XD3BFbcABqhKtgpeMRmm3uGQo8Mh7kp1TYZP6jSbja9pcEdbkoJrNjwF3PG55gE5he+/QqmtiKfvMjrqwNq7P2C6x61zFWql2aVJ5L2vP7SvKR2o54nzPTHs4+DQYvnWZvqAYTcZ9alCm1Ox4JBiIF3LthQIB1KTIQCBsvhw2mCXb02B71O89V08I7pUJ9CeUVqNK4Ug0tr3hs/wMgoDecrY4mc4zkW0HATzLax6Uagbb7QI9/XI6Rl7ObyDbVyuPC81hWKL2dMZm/6DAh9s+Nx8LEK+zfKTNq+/uM+qO0Wl6ntEpPjINi9iZy1xy+UhKsuGo6uwh4y77KExu7qYQ4z/fhSNb sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Portal Admin Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/admin/billing/stripe/portals/"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Create Portal Admin Route @@ -43,29 +43,254 @@ Create Portal Admin Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "organization_id", + in: "query", + required: true, + schema: { type: "string", title: "Organization Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/admin-report-usage.api.mdx b/docs/docs/reference/api/admin-report-usage.api.mdx index 8d1f6b5339..6863ec0003 100644 --- a/docs/docs/reference/api/admin-report-usage.api.mdx +++ b/docs/docs/reference/api/admin-report-usage.api.mdx @@ -5,59 +5,72 @@ description: "Report Usage" sidebar_label: "Report Usage" hide_title: true hide_table_of_contents: true -api: eJxdUk2PmzAQ/SvRO1sh7ZFT01OjPTTadE8IrSbObHALtmubqBTx36sxbLqBCwK/53kfMyLRNaKssL90xkLhq2lbY6+oFZznQMk4e7igBAngNbB3Ib32ka4MhcDROxs5ohzxebeT14WjDsYLESVOvdYc41vfbp4XMBS0s4ltEjh53xqd5xQ/o3BGRN1wRyjHSR61uvI5a9i8LBo6To0Thd7FBAVPqUGJIgsuzrOfIisuZvlQiBxuHMT5iD60KNGk5GNZFLp1/WVLV7aJtmQK8gZTLQzdB5OGTNkfD088fGO6cEBZ1R8BJxE/J/IIG5EGzxKlN088QMFSJ9/7PjUumL85BCgYcdnMLLFv7JvLdJPajM/iNvvjAQpiY85lt/203WGd1gNYciedc3+fnY+hVinc/UOBOzJylpi6L/8PRJlE3pH9cN+qnAct9wAS/0mFb8lYTMvkcemtmhcNCktzIu2+bbm9WqGRqssK43imyC+hnSb5/bvnIAXVCjcKhs4SV1VP6j1N6e4XD+Jba/ayCTdq+7mU1R5Kp/fdOn4//cA0/QMXMBU5 +api: eJx1kkFvnDAQhf/K6p2tZdsjp5Jeusqhq2xzQiiaNZPFDRjXNqtSxH+vxpBNslK4IPCb8TfvzYRI54C8RFF3xkLhzrStsWdUCr1jT9H0dl8jB4ngybPrfXwaAp0ZCp6D623ggHzC191OXjUH7Y2TQuQ4DlpzCM9Du3lYxVDQvY1so8jJudbodE/2O0jNhKAb7gj5NMujblo+JIbN48rQcWx6IXR9iFBwFBvkyBJwdlrmyRJxtuBDIbC/sJfJJwy+RY4mRhfyLNNtP9RbOrONtCWTkTO4JSjS6ea7SDFX0k4P3sQx9SsO+3sefzDV7JGX1XvBUSZb7PoomxBHx+KzM/c8QsFSJ9/FEJvem3/JISgYAWiWKvHG2Oc+lZvY8hvbHekXtjUUZM4Fe7f9st19NsxasCkO+zUg0imgV44kg7qx62oUFLgjI2eRqfv2diCUkk1H9l2/mxQ/MF3NiPw3Zq4lYzGvN09rwOWykVBYIxa061qmmCuFRnYiLzFNJwr86Nt5lt9/BvYSVqVwIW/oJNaV1axenZUcX3iUubVmJytzoXZYArpZWMn3uoSHn8dfmOf/GkgjyA== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Report Usage"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/admin/billing/usage/report"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Report Usage -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/admin-switch-plans.api.mdx b/docs/docs/reference/api/admin-switch-plans.api.mdx index 88b6454739..3c52fe7f2d 100644 --- a/docs/docs/reference/api/admin-switch-plans.api.mdx +++ b/docs/docs/reference/api/admin-switch-plans.api.mdx @@ -5,36 +5,36 @@ description: "Switch Plans Admin Route" sidebar_label: "Switch Plans Admin Route" hide_title: true hide_table_of_contents: true -api: eJy1VU1v00AQ/SvRnEBaxaHi5BNBIDUqqFEbuERRNLan8Zb1rru7LpjI/x3NruM4TVsJJE5JZufzzXuTPXjcOUjXMC8qqUHAR6mU1DvYCDA1WfTS6EUBKSA7bN1P6fNyWyvUDgTUaLEiT5Zz7EFjRZCCsTvU8neI3coCBEgNKTw0ZFsQYOmhkZYKSL1tSIDLS6oQ0j34tuZ45y23IMBLr9hwPUo4WRTQdWIoxq38ewXSTcXj58o0xfZxti1NlnGKwVBbM/6ZNU5qcm5sK5sKtfTtVmF28vDrzII70h63KBngw3hLHqHrNty4q4125LjXi9mMPwpyuZU1zw4p3DZ5Ts7dNWpy0ztzfqM9ac/uWNdK5gGq5N5xzP44f9d1nYD3Fxfnib+jkkVE+LO1xv5FVqgtc8XL2HdBHqXib9JT5c4dlMlPXlG313eBQKfr4S33Fqk97chCt+nEwYbWYjtiyRcTG4ROQOV2rxHqKzmHO4Ih2cuuAYzJil+7Y22T3VPuT6i2DnPF0r3faMdHeCO6L4/xKcL3XLGDy+VqtTxLGHf7hC1BrhMmmJsEiU9uTOOZMhX50rCwa+N8kLIvIYUk6DzJ4hlIgtCTqHoQ4Mg+HsTeWAUplN7XLk2SwPBppPcUZYK1BGa0o7yx0rchZL5cXFF7SViQhXS9GTvcMpsiP07dhtVgLa+IkeqVP298aWx/Fg4noIxRDIXUdyaE96jNQ3OT+XIBAniMiNFs+m46g6fInTizEDAPQjjUDs8gnqAwzM+npQoqAE9YfTg+cGcMeYV6lO+VRZ30NYDh6Zfn7chA99DFvt/hOt5qENBvkbfbH+x+kxsBJa89XcN+n6Gjb1Z1HZvjCeVlFdJhppjZd6gcnTUyXAd4c9OL4O0ExPMN/qD22T+GR1QNewet/4eK/b/DscyGf1jJdQIDxYExPHKMmec51X4UdXb8OMugn+X17Qq67g9LL30T +api: eJy1VU1v2zAM/SsGTxsgxFmxk09LtwENuqFBm+0SBAFjs7FaWXIluasX6L8PlB0nadoCG7CTbYkfj+R79BY8bhxkC5gUldQg4FwqJfUGlgJMTRa9NHpaQAbIBiv3S/q8XNUKtQMBNVqsyJPlGFvQWBFkYOwGtfwdfVeyAAFSQwYPDdkWBFh6aKSlAjJvGxLg8pIqhGwLvq3Z33nLEAR46RUfXB0ETKYFhCCGZAzl3zOQbiouP1emKVaP41Vp1msOMRzU1hx+lk2FWvp2pXDtDi+eTk5wQ9rjCiU3c1fKjOGGsGSQrjbakWNcZ+MxPwpyuZU11wkZ3DR5Ts7dNiq57o05vtGetGdzrGsl89iW9M6xz3ZfawghCPh4dnYa+CcqWXTd/GqtsX8RFWrLvPCyw12QR6n4TXqq3KmBMvnRLer26jaS5XgUPNH+RGpPG7IQlkHsztBabA8Y8c10ACEIqNzmLfJ8J+dwQzAEe900NiOZ823Y5zbrO8r9Ea0Wsa4udW93MON9e7vuvl7Gl659LyXbmVzM57OTgN1sn7ElSjNhgrkkyjm5No1nylTkS8Miro3zUba+hAzSqOl03Uk+jaJOO4WDAEf2cSfsxirIoPS+dlmaRoaPOnqPUKZYS3iOZhJvk89sCkx3R3ljpW9jvMlsekntBWFBFrLF8tDghqnWkefYbJgb1vKSuI39Cpg0vjS23w+7XVB2XtwnqW9NdO9b2mM7x/yeNK8nrrODPR59GI1fK6Z3SCazaa8YzKNidjiiGYhn7RoaxfuminIBT1h92l8wSp5Nhfog3hsTPcI3NMbTk+cxyqiLiGLbD3vRLXAQ0I+badBv8X7kSwEl8yNbwHa7Rkc/rAqBj7u9yoMrpMO1YgnconJ0AmRYI/DuulfL+wTEywDvqX3xb/GIqmHruBT+Q8b+l7FPs+QPKzlPZKPYsYdL7nwmeU61P/A62ZIcZRDa7OpmDiH8Aa0BhEs= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Switch Plans Admin Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/admin/billing/plans/switch"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Switch Plans Admin Route @@ -43,29 +43,273 @@ Switch Plans Admin Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai"],"title":"Plan"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "organization_id", + in: "query", + required: true, + schema: { type: "string", title: "Organization Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "plan", + in: "query", + required: true, + schema: { + type: "string", + enum: [ + "cloud_v0_hobby", + "cloud_v0_pro", + "cloud_v0_humanity_labs", + "cloud_v0_x_labs", + "cloud_v0_agenta_ai", + ], + title: "Plan", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/agenta-api.info.mdx b/docs/docs/reference/api/agenta-api.info.mdx deleted file mode 100644 index 7ebb8f7847..0000000000 --- a/docs/docs/reference/api/agenta-api.info.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -id: agenta-api -title: "Agenta API" -description: "Agenta API" -sidebar_label: Introduction -sidebar_position: 0 -hide_title: true -custom_edit_url: null ---- - -import ApiLogo from "@theme/ApiLogo"; -import Heading from "@theme/Heading"; -import SchemaTabs from "@theme/SchemaTabs"; -import TabItem from "@theme/TabItem"; -import Export from "@theme/ApiExplorer/Export"; - -<span - className={"theme-doc-version-badge badge badge--secondary"} - children={"Version: 0.1.0"} -> -</span> - -<Export - url={"https://raw.githubusercontent.com/Agenta-AI/agenta/refs/heads/main/docs/docs/reference/openapi.json"} - proxy={undefined} -> - -</Export> - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Agenta API"} -> -</Heading> - - - -Agenta API - -<div - style={{"marginBottom":"2rem"}} -> - <Heading - id={"authentication"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Authentication"} - > - </Heading><SchemaTabs - className={"openapi-tabs__security-schemes"} - > - <TabItem - label={"API Key: APIKeyHeader"} - value={"APIKeyHeader"} - > - - - - - <div> - <table> - <tbody> - <tr> - <th> - Security Scheme Type: - </th><td> - apiKey - </td> - </tr><tr> - <th> - Header parameter name: - </th><td> - Authorization - </td> - </tr> - </tbody> - </table> - </div> - </TabItem> - </SchemaTabs> -</div><div - style={{"display":"flex","flexDirection":"column","marginBottom":"var(--ifm-paragraph-margin-bottom)"}} -> - <h3 - style={{"marginBottom":"0.25rem"}} - > - Contact - </h3><span> - Agenta: [team@agenta.ai](mailto:team@agenta.ai) - </span><span> - URL: [https://agenta.ai](https://agenta.ai) - </span> -</div> - \ No newline at end of file diff --git a/docs/docs/reference/api/agenta-backend.info.mdx b/docs/docs/reference/api/agenta-backend.info.mdx new file mode 100644 index 0000000000..d2ad3ad8d7 --- /dev/null +++ b/docs/docs/reference/api/agenta-backend.info.mdx @@ -0,0 +1,73 @@ +--- +id: agenta-backend +title: "Agenta Backend" +description: "Agenta Backend API" +sidebar_label: Introduction +sidebar_position: 0 +hide_title: true +custom_edit_url: null +--- + +import ApiLogo from "@theme/ApiLogo"; +import Heading from "@theme/Heading"; +import SchemaTabs from "@theme/SchemaTabs"; +import TabItem from "@theme/TabItem"; +import Export from "@theme/ApiExplorer/Export"; + +<span + className={"theme-doc-version-badge badge badge--secondary"} + children={"Version: 0.1.0"} +></span> + +<Export + url={ + "https://raw.githubusercontent.com/Agenta-AI/agenta/refs/heads/main/docs/docs/reference/openapi.json" + } + proxy={undefined} +></Export> + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Agenta Backend"} +></Heading> + +Agenta Backend API + +<div style={{ marginBottom: "2rem" }}> + <Heading + id={"authentication"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Authentication"} + ></Heading> + <SchemaTabs className={"openapi-tabs__security-schemes"}> + <TabItem label={"API Key: APIKeyHeader"} value={"APIKeyHeader"}> + <div> + <table> + <tbody> + <tr> + <th>Security Scheme Type:</th> + <td>apiKey</td> + </tr> + <tr> + <th>Header parameter name:</th> + <td>Authorization</td> + </tr> + </tbody> + </table> + </div> + </TabItem> + </SchemaTabs> +</div> +<div + style={{ + display: "flex", + flexDirection: "column", + marginBottom: "var(--ifm-paragraph-margin-bottom)", + }} +> + <h3 style={{ marginBottom: "0.25rem" }}>Contact</h3> + <span>Agenta: [team@agenta.ai](mailto:team@agenta.ai)</span> + <span>URL: [https://agenta.ai](mailto:https://agenta.ai)</span> +</div> diff --git a/docs/docs/reference/api/apps.tag.mdx b/docs/docs/reference/api/apps.tag.mdx index 80bc87791b..a11d2d7c56 100644 --- a/docs/docs/reference/api/apps.tag.mdx +++ b/docs/docs/reference/api/apps.tag.mdx @@ -5,16 +5,9 @@ description: "Apps" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-evaluator-revision.api.mdx b/docs/docs/reference/api/archive-evaluator-revision.api.mdx deleted file mode 100644 index 3e59a50051..0000000000 --- a/docs/docs/reference/api/archive-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-evaluator-revision -title: "Archive Evaluator Revision" -description: "Archive Evaluator Revision" -sidebar_label: "Archive Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJzNWduO2kgQ/RVUT4nkDLOjffLTsjOJZjbZDJrbPiA0KuwCOrHdTl/IEuR/X/UNMAYWGJB4GgZXneo6Vd1dPsxA4UhC3IOPE8w0Ki4k9CPgJQlUjBd3KcSAIhmzCb1SsHkVNGGS8QIiKFFgToqEgZlBgTlBDE3TV5ZCBKyAGEpUY4hA0A/NBKUQK6EpApmMKUeIZ6CmpQGRSrBiBBEMuchRQQxaWxTFVGYM5otuPfgorbsUqqpvwGXJC0nS4F1dXpo/KclEsNLkBTE86iQhKYc6az14Y4gg4YWiQhlzLMuMJZaG9jdpfGZLayyFIUkxFyHh2jn5pbNC0YjE0lqvrUUEKQ1RZwriyypaQ5MNXEzvh5bNepCF9QQFw0IZTmv224mrorlFobMMDE9NKl8ctmUygp9cfB9m/OcJQv7joVciLrI8RXYrWZ0gGxfh+HTVWUKh2BCTYwboeMgQQasxF0cDd2hVBCkq2hHVmH5QLKet0DcGsIogJylxtBV7G8zf3r2KYJjZU3HzTmTyNdFS8XxtsAHnGWGxNdqdbF07hCoycPOufwvivM096FjnWLwF8NYCVFUUjPjgGyVq3RH8yXLWxLOFUVhfBaYpM+cqZt0arzvULZystUj5oP7NcnrrY0HCRKIzFO8+6Sz7S/Liw71WpVbvYTVZA8IU5Tt6oRA43Ursii806N3epgqtR6NFz4nUr/wLk+p/ad2UZMN9P46eXCv6YeSw4+Ar2mOnPjQcBnWzBFFFkAhCRekrqqMeg9cOttWxZOkyPUWQZwfrg6SU0QmC3DhYHyTQNZge8a4LZP059bdd4OuoUQJb8yiBsKNGCXTNo0xINEfJ3dv1xbtXEchMjw6FeTS+5h46WqKeQ1y9Tep38/Gy14IdivIsmEPIDkfIDMKYMLXvVvud9Kei5PwaYsts8kBDElQktdMmLLS/141y68tQhdfUXStyRnfyWQ46e9Tg0RNvJkosS1bsOgCtUrzPtBUC2cKbS/zg7nfeVV0xOdf57Sx7ZbNzd0GpKRSJCUtoF3ad8rRHD3royipFQzbSTic7RazrWoCdXsKCDHaD9iWh8S62D8Zb/eeiWlUZv9+vrpoa3AtmLLX5tT4KwcXhAlxKCpm9bH1XrhpkPKk93WdXLd0VrpEXaX/hCYbBPpejderlGoHBmWw2tWS0nszTdZwvlNOezcuF9nY1ySjQ69jdnMaNo29bgW+fnroNQFfbelE7Ti5uNdVZsFrAmBtRueRSWflYjSGGdmkEUPrZnusgsh0kUdmerZWTq7YXpsFt+SBB26ELxkqVMm63k4zr9AJHVCi8QNbGktldJinRgqmpdel07z7T1F3yEPf6ywb22nE9VDeblw9L9pkMm178dloX++Uaw4vebpCzDLNiyK170Mbs4lqd7h0sDe9wefHbxSU02F02NpsFE7tZQmz7GKIVFub5QwSU250CijD/Y/HArMwUxUtGAW9bMVfejT0div5V7TJDViyNwK7OPfB1hiWdV9qO9rWGCOJNPx6EcvcjGJvuiXswmw1Q0rPIqsp8/UOTMBXtewF2YPjtzSBl0nxOIR5iJqmx8vmhA+8e/N5631rcXvWMQtULU3KzVPMfRPCdpht/+bBHyDj018zbdpKESrWE0jjxTCPOt0z3/vEJquo/GhLXQw== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/{evaluator_revision_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-evaluator-variant.api.mdx b/docs/docs/reference/api/archive-evaluator-variant.api.mdx deleted file mode 100644 index 16be9417a2..0000000000 --- a/docs/docs/reference/api/archive-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-evaluator-variant -title: "Archive Evaluator Variant" -description: "Archive Evaluator Variant" -sidebar_label: "Archive Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV01v20YQ/SvCnBJgY6lGTzxVtRNYTVoLsZIeBEEYkSNxkyWX2Q+5isD/XuxySYmipNqOAvTkD868N/NmdndmCwZXGqIpvF2jsGik0jBjIAtSaLjMRwlEgCpO+ZrmVNvM16g45gYYFKgwI0PKoWwhx4wggo7lnCfAgOcQQYEmBQaKvlmuKIHIKEsMdJxShhBtwWwKh6GN4vkKGCylytBABNZ6FMONcAZNyL3PFUlvlEBZzhy2LmSuSTu468HA/UhIx4oXLimI4MHGMWm9tKL3MRgDg1jmhnLjzLEoBI+9Bv0v2vls90IslFPI8IohlrZyCpHz3NCK1F6oN96CQUJLtMJANChZVyTPm2/ul17KNsfOmCdtu/NylayxyK0Q4OTpCuiEY/Ao1delkI8XpPg7QAYGVIYvMTYXZBgGyMCwFL6hTwvJ9Ty22sjsaAALKQVhfpZxpHs3FULJHFxTmh9BbGoRQFObYf4jgHceoCxZbSQXXyg2x87PO69ZF69kkJHBdhSYJNydChTjlq6narkHW5+LFlO2aP9nP73jXBBzFVuB6tU7K8QfWuZv7q0prHkNh8k6EG4oe6IXKoWbs8Ie+EJH3nPOfzoxnUenRf9Pov4lP3Bt/lPWU0l23J+n0aRqxfCQPEmBbgjOt2TtK/9lULd7ECWDWBEaSuZonnh9JWjojeE+ntMsNxVsb+jFskXyM0g+VbCBJCFBP4HktoINJLVci80FL/xarN834cqv9booS61Ww1ILdlGWWq6GRQu7emmvPjhf93pcLDw/Tz3hAQnz17En5BnuzSBWls7t1+vr7tz2GQVP/FTWe6uUVC8f2hIyyIWfCKoH4tBAyLj19Tl38aw8eFN2WX+QVYCuUpleHRt4d++F1rii3QV62tSL0Zu4r8ck3w3bU59XRR3s9gq+k7dS93Qat5V85+p7N5mMO4BVbdtFHVb7Ra8z0IMfQFLplpBC6mrfMClE0C8UrTk99pvhS/fDFK3722PrR9kPawww0KTW9cZilYAIUmMKHfX7sZA2ucIV5QavkPex4P5EaIqt4mbjXYbj0Xva3BEmpCCazvYNHly7VQ3UNmtqhwV/T07KsCsNrUml4t+rrghLUlp5Oa14vpTevR54fXC94XgEDFwalYiDq1+uBtCRdt/YnRSM/Umpuf1nYAcqNPkDA8r8MQFDmP22++AicyUJU2qNd6aSB69xUMPQP6ZfCOT+QPgwtqHIUwhFhr1dSbukQ6GBQXRi06xrPWOQusaJprDdLlDTJyXK0v37myXlyjkLeAsn7nQLCdfu9wSiJQpNnbib6wZefQyn6nVvNyG186lLnm982MK6v4DBV9qc2pL93ZHWvbUNpsM4psLsgXSuOteEzWEZ3z9MoCz/BcJVcY8= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/variants/{evaluator_variant_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-evaluator.api.mdx b/docs/docs/reference/api/archive-evaluator.api.mdx index 1948975256..21c7c75940 100644 --- a/docs/docs/reference/api/archive-evaluator.api.mdx +++ b/docs/docs/reference/api/archive-evaluator.api.mdx @@ -5,36 +5,36 @@ description: "Archive Evaluator" sidebar_label: "Archive Evaluator" hide_title: true hide_table_of_contents: true -api: eJzNV9uO20YM/RWDTwkwWbuLPump7m6CdZN2jazTF8NY0BJtTTq6ZC5uXUH/XnB0sWTZW+92A/TJtkQekoec4XEBFrcGgiW836FyaDNtYCUgy0mjlVk6iyAA1GEsd/RIjQ0IyFFjQpY0exeQYkIQQGvxKCMQIFMIIEcbgwBN35zUFEFgtSMBJowpQQgKsPucfY3VMt2CgE2mE7QQgHMexUqr2KBNcTSLoCxXjGnyLDVkGOZ6MuGPiEyoZc7JQwAPLgzJmI1To8+1MQgIs9RSatkc81zJ0Nc6/mrYp+iklmtmwsoqQpi5yqnOWKaWtqQ7Kd54CwERbdApC8GkFAdSfLx0f7/xlPWxN8o34ryBNI+hMzZL+kZ1KussU4QplKJ9lDqlgFlqkpuZ0U2FUAqGO5PX8xDbptSgsUsw/S+Adx6gLEVjlK2/UmhPzcEHz9kQrxSQkMV+FhhFkruMat7jdZBnPYcd2KbPvUjJuv+kW97pWBBKHTqF+s0Hp9QvJkvf3TubO/sWjotlEGkpudALtcb9k8Qe+cKA3qecf2Uy2WMwov8nUn/LPklj/5XWc0UO3J/H0aIaxfoivIiBYQrsW4r+FfYyqNsORCkg1ISWoke0TwF2rt4ILb2z0udzPspNBTuaerJcHn2PIF8q2DpIRIq+Q5DbCrYO0tC13vMeuyyOX1aXkPXz3u+vA1+vGqVhq43SEPaqURq62ihGue1LZ/WBfXl7vFp6Xh9csEBO7Y5L/FopUZZs/+P19VB5/I5KRl5XjN5r7TXTC2VHRBal8hqgWgnHBioLe2+fc/uuyqMtcij3U1YlyL1JzPaUVDtsCGNwS4cr87ypJ2O04LenuD7IxKWvqwpd23VafKC3Yvd8GbcVfU819m6xmA8Aq972mzqtlHBH9XipEWcsk/PMWK+MbQwBjHNNO0l/jluZZcZFVx+X41pXgwBDetdIaacVBBBbm5tgPA5V5qIr3FJq8QrlGHPpR91Q6LS0e+8ync8+0v6OMCINwXLVNXjgqarmpG/Wtghz+ZGYsVrET52NMy3/rppfq/i48mJKZLrJvHvN3tQnN5rOZyCAy6i4mlz9cDWBAYNdYz4QGPoD0cT2r0EcsdDWDwIo8acBLGHy0+EFZ8YdqOVng3eiYUfrtWbB0l92nCuUft59+KLu5RLqXkJHzBsQEBz932kauhIQ8zAESyiKNRr6olVZ8uNvjjT3bCVgh1rimhlcFhBJw98jCDaoDA2SbK8OePO5PiFvRwd900++6WvKTeUM+RcI+IP2x//R/PmPm8EpapNpGFJuO86D64onrB38+f3DAsryHwt44zI= +api: eJydVdtu2zAM/RWDTxsgxFmxJz8t6wIs6IYGbbaXwChYmYnV+qJKcrbM8L8PlC9xbhiwpzjWIXV4DknX4HBrIVrDfIeZhVhAqcmgU2WxSCACNDJVO3qiHWYVutKAAI0Gc3JkOLCGAnOCCAbEk0pAgCogAo0uBQGG3iplKIHImYoEWJlSjhDVgMX+fuOzuL3mLNYZVWxBwKY0OTqIoKpUAo04RTSxAKdcxq/m/dXBIoGGTwxZXRaWLF9yM53yT0JWGqW5NIjgsZKSrN1UWfDQgUGALAtHhfPUtM6U9EqEL5Zj6hFxbVgnp9obZFm1QR1HVTjaEmvVU7z1iEYcZLpYfvn8QtLBhdLGEhRVlkETN404iztIve5YXdJpqLhpOMnHm5tzgX5iphJffjA3xhv/n+ok5FBl/KQc5fYckJXy6PRaV4wk6BVu4oMIaAzuR9p9K1uCLHtutyN/hi7rod/JWtwSDMmuQ70YwYpP/2UA19Ve3eFGXhzkbdW9XsaXVr5Ll/WQr6vV8ixh6+2xqbN2nIP5aJxzcmnJs65L6/x4uxQiCLWhnaJf4dCxNqzHQ96E3XIAAZbMrt8HlckggtQ5baMwlFlZJRPcUuFwgipEreCMlT8NbhnqB9uSrIxye59vtlzc0f4rYUIGonU8Bjxyy7VNdAwb/EOt7ojl7NbUrHJpadSftjO6PZW2UayXKjalD++k7bh9RvlKBS82rrOlPZ18mEyvFdMFBLPlopsclH5yeh4eBuJErkEoEEC5HxtwhPmnwwGzZKtyLMb5Ljh7RGxQxNFvF+oMlR8Mf33dmb6GznQYLSoLAqKT7d47HwtIuWuiNdT1M1r6YbKm4ddvFRn2LxawQ6PwmdVc15Aoy88JRBvMLJ2RHHYMvHvoRul9AOIy+d7jgg1mhvwPBLzS/vSL5BdF2jdR3UFmUpJ2o+CzvcbdNkzI8v5xBU3zF7ymeKI= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Archive Evaluator"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/preview/evaluators/{evaluator_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Archive Evaluator @@ -43,29 +43,955 @@ Archive Evaluator as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Evaluator Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"Evaluator"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowData"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>service</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>configuration</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'{\n "count": 0,\n "evaluator": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/archive-query-revision.api.mdx b/docs/docs/reference/api/archive-query-revision.api.mdx deleted file mode 100644 index 2d75cabce2..0000000000 --- a/docs/docs/reference/api/archive-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-query-revision -title: "Archive Query Revision" -description: "Archive Query Revision" -sidebar_label: "Archive Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJy9WVFz2zYM/is+PK13bJz19uSneU17zdomWZJmDz6fj5Zgmy1FKSTlxPPpv+9AUooUyYrjuXtJZBn4AHwgCRDeguVLA6MJ/JWjFmhgyiDNUHMrUnUewwi4jlZijbP7HPVmpnEtjEgVMMi45gla1KS/BcUThBE0xWYiBgZCwQgyblfAQON9LjTGMLI6RwYmWmHCYbQFu8kIwFgt1BIYLFKdcAsjyHOHYoWVJECebgbXwcLgPIaimBKwyVJl0BDWu9NT+hejibTIKBYYwU0eRWjMIpeD6yAMDKJUWVSWxHmWSRG50IffDelsa/5lmoixwluI0twrBbeFsrhEXfPzvZNgEOOC59LC6LRgz+hxRtXmcuEYbBrwkmuuBVeWeGzI9pNVsEpC5VIC8dOk787jOvYYHN9KE9/HcuwYPDbXVix4dEznxwGytJDbVaqPBu7RCgYxt7gnKom+tSLBXugzAiwYJGgMX/Zi98F8DeoFg4V0x0Mdh8exoB3C5VVjvbYszdNUIld1U6XxacHKV+n8O0a215+PzgkXl+UHOtMOu9ywDcvJvPmmHkO3LYiEjnLJ9S8fcyn/NKl6e5nbLLdvoCtGYTHZU4trzTf9xDR14VWsfiUySePwDP8PpF6kX4SxL9K6K8iW+us4ug0Lz9e2w3bTBXe7tlmLDoM6q0EUDCKN3GI84/aop8h7DzsYO7LyLP4ZRr552GAkRok/wciZhw1GSrrmx6xEJVl/lOWo5OuoVkq2KislYUe1UtJVWVmjbncp+y/Xu6BeMDAyXx4Kc0O6BYPjBRo45M+rSbMBexAqTh8Iu0dI4QOa467aCw9ZMEhlfGzwSw9JZxo+7gv9IqEXhFUwkCIR3aCdheEZyhenTXHrGF/ot1DlCV1buIlQxf4dnbDhw7SXAwdPK0pZ1GsuD/b4vAQoGOhd3Vy7ALZwrl3j1ipNTwJ/V2uxDUNtmpAW9QtL1V/rfCNb3UmAq/iporbpdd+mdK1RKTmk/BuVaqhnLl2KiMvL0kLhrlW+sjvboe3Z7dxCoIy7boFVr+MECgY/cHPoSfIZN/62I/N9y/mrG5oy0qKjj+tudvw9eP+m5M65X7BGQl/eKcLQTdzMKI/1ApYmGdfCpKqWvd0oeE/Zd3+XtB6kdU/oHunv3D6oOv5FnqAW0V7gxnJtzYNwgwJUcflIV3QuFAWQcButkJ6k+IF1QzcObS87Qvn1PBMNV6lV3Et/xcmBFW+ReSai/RDwURhrghfhQw3nA71BFWEXWPs8K4VqswZKt1si1RbctfMibnBmUBlhxbp7W3Tc5NqNEDc4uKlgaq4suDRYMMBHuqW7BB5s5QNhDL46jJaJnvPzFh/tZeCC8JsUcNldAvbxaCzlqzzxi+zJk91JDTIdWE8ztEk4OBsbOhy87hSurpllhXgD0+dHU4euqcc0mfYFVCF3laYePTfDKad4Z9xdRg/W/y+61SywKEjnt3fv2qPDOy5F7AaDgw9au6124NwwRsuFbNTEpoBMox0V8+Ui1ZPaL6l30M1RzLKv1NbmP15kt6gjY3BL3760UCkubzrINUtaoNezuzuMM09fX3I/3d5etQB9bptJHfvJ9qA5UAY3Z1qlNPvOUmPdpNuuYATDjOa2+DC897PyYTnGNcNta+xdDMPgHBgY1OtyTJ5rCSNYWZuZ0XAYyTSPT/gSleUnXAx5JtwpYDDKtbAbpzK+Ov+Mm0/IXVc8mdYFbmiZ+YXTFKtyxjNBfU85xAjzR/GPXw1hOL/yWoVrihepUy8POOfcYHx1DrUbIZye/HpyCi1K68KubEduh5S23dfAnrFQxU8VMnHbAyzy5PenL8gzykbCVR1vVwafDVsCFRYf7TCTXLhd4HzYhuROICQX/LRauB6jSjAwGHX9slHmeMpgRWtlNIHtds4NftOyKOi106KshSn7nEidbCEWhp7jUDJaLlfHC/xyHXbRm8FTp94MpUy1ojyH9hYg9ModP8m4g2JVLqhtkBtHEWa2htA612jlVZvj6vLmForiX5yb9dA= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/{query_revision_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-query.api.mdx b/docs/docs/reference/api/archive-query.api.mdx deleted file mode 100644 index 3b17664746..0000000000 --- a/docs/docs/reference/api/archive-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-query -title: "Archive Query" -description: "Archive Query" -sidebar_label: "Archive Query" -hide_title: true -hide_table_of_contents: true -api: eJy9V0tz20YM/isanJKZjal6euKpatxM3KS1Eiu9aDQeiITETZdceh9qFQ7/e2cflEhJdmyN05MoLoAP+IAFwAYMrjWkc/hkSXHSsGAga1JouKyuc0gBVVbwDd3dW1JbYFCjwpIMKafWQIUlQQr+9I7nwIBXkEKNpgAGiu4tV5RDapQlBjorqERIGzDb2ulpo3i1BgYrqUo0kIK13orhRjgB59d2dJ1D2y6cPV3LSpN2Ji7HY/eTk84Ur53DkMKtzTLSemXF6HMUBgaZrAxVxoljXQue+fiSr9rpND23auWiNzwgZNIGpegtrwytSfXce+slGOS0QisMpOOWBTI8VrW9WXmahnZXwrPeF8A8584nFNOB6F4i+rCUUhBW0LJDEttFy7pXcvmVMtMXqqwQ4DjsXH/nnWgZlGTwTGc6ZHZE0QC5XA7f9GM4jQUZV5kVqF69s0L8rmX15saa2prXcCpGbqh8ohYqhdvHiRnqwrNY/cOR6TTOz/D/QOqf8iPX5ru0PhTkkfrzOJrFwgu940kMHLvgdFs2vP3nmbrqmWgZZIrQUH6H5jGDvY6Vo6E3hnt/HkZ5G8yOJp4sW+c/AuRLMBtBchL0A0CugtkI0tG19O3/aTi+xz+FrF9D69/z9aIoHVs7lI6wF0Xp6NqhaGHX59bqrdNtGbyce360Ht7eg/l7wsB3dXbTt22d7M+Xl8fD+i8UPPejePSbUlKdP6lzMsiFe4qj4FBAyGxw+pyu25urYXrsQ/0og4N+jur1qc1mPxm0xjXtW+XDop6M0cydnuJ5v1XNfVwBOsr1UrunN7D7cBhXgb7Hkvp+NpseGQy5HSZ1EhbG0ae4MJZkCuk2yVpq4xdIU0AKSa1ow+mf5D5snknT7ZBtEndOYKBJbbpV0yoBKRTG1DpNkkxIm1/gmiqDF8gTrLmva02ZVdxsvcpkev2Btu8Jc1KQzhd9gVtXSqE4hmK7vGDNP5ALIS65E2sKqfi3kPG46RZBy/HAq5X06pGyiXduNJleAwMXRiBofPHTxRiOaOsLu1uAmb8FHbY/BnbAwi5+YEClvwJgCMtf9gfOM0d9iVXf3kGWDuZoZMDQvyapBXJf4B66iQmcQ0wghIXX3TMGae9DoMvigkHhUp/OoWmWqOmLEm3rXsdFeb5gsEHFcelomzeQc+2ec0hXKDQdebdrEvDqc7wLr0f7DWbodZfMyoW5QWHdP2DwN237Hy7+lhddpTTxeJJlVJue4lFTciW1K/Hpze0M2vY/CKGL/A== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/{query_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-simple-evaluator.api.mdx b/docs/docs/reference/api/archive-simple-evaluator.api.mdx deleted file mode 100644 index f77fe7d837..0000000000 --- a/docs/docs/reference/api/archive-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-simple-evaluator -title: "Archive Simple Evaluator" -description: "Archive Simple Evaluator" -sidebar_label: "Archive Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJzNWEtv20YQ/ivCnBKAsVyjJ56q2gnsJq2F2M5FEIzRciRuunxkH2pVgf892AcpUrRcSbYBneKIM9/MfjO781iDxoWCeAIflygM6kIqmEZQlCRR8yK/SSAGlCzlS3pUPCsFPVItChGUKDEjTdKCrCHHjCCGRuKRJxABzyGGEnUKEUj6YbikBGItDUWgWEoZQrwGvSqtrtKS5wuIYF7IDDXEYIxD0VwLK9B4OrhJoKqmFlOVRa5IWZiL83P7T0KKSV7aM0AMd4YxUmpuxOBrEIYIWJFryrUVx7IUnLkjD78rq7NuuVZKS4jm3gIrjFcKHvNc04Jky8VLJxFBQnM0QkN8XkUbUpy9fHU7d5R1sefCxWO3AFePzChdZF2h4MqsKARhDlXU/JQbIcCyVDt3owaXHqGKLNwOvw5DbIISQFOTYf4SwGsHUFVRLVTMvhPTLZLvXDY2hj855vqoVQQZaez6gknCbaxRjDvs9rwN2diCraPdsZTNur+0D/m0LWBcMiNQvvtkhPhDFfmHW6NLo9/D9pEtCNeU7amFUuLqWXq3dKFH8nPKf1oyrUYvUU+J1L+KL1zp/6V11yF76odxdO9TMTyHezHQd8HqVlH3ITsO6qoFUUXAJKGm5BH1c4CtBzhBTR80d/7stnLpYQcjR5Ypk7cw8uBhg5GEBL2BkSsPG4zUdM1WtprtZ8eVrH3I+n3lqtiGr1e1UrPVWKkJe1UrNV2NFSXM4thcvbO6toa8mnvh5LhdA7p1dUlSveCKfQvqNpKSH4vyILlHEMcjCIuQEiauJzvsfX4rSk4vIZ7pK77SnCTlrPNG1I5OD6oD1yEMVd3n7huRE6qkJ9meHBCDu0C87QOxLHm+b9uyTfEhPVJtyAXelt6js99rV91J61S7rpPMld3K4w2lNlAkl5zRPuz60fWAHAzQlZs553xh/HT9FrYuOwYOGKCu0DX2vflpf4SXaTeDeVVZrV8vLvpz/DcUPHEnG3yU0m0gjhziE9LIXZkN+bgtIArW+XrIfWpVCZ/Cm0N/KRjWjXimFk8tPjaTllK4oE1O7xZ1ZAzu7denGN8sXSbuXN50kGuX7IZez+7uY1x5+p4L7/X9/bgH6GPbDerIr5cGPh9aqwQ3uaeFXUGVhdJu3aRTiGFYSlpy+mfoN1LDZoWhhuv27qkahtUV+Otdr6lcgwWp1qWKh0MmCpOc4YJyjWfIh1hyd6MUMSO5XjmV0fjmM618QYd4Mm0LuBLjs6Yr1gQMS/6ZLH9hQTYyOi0k/8+nQtiQ+abNccrzeeHUA5cj59xgNL6BaNOXwfnZL2fn0OOzLWyvBzJ3PWrb7jNEWyw054cIKHN3AzRh9tvmg/XMBiKsdmq83eHbml0DGZr+1cNSIM9bza6P7ARCZG3AHB60FmcKIoi3dot1gKcRpDZH4gms1zNU9CBFVdmffxiSNobTCJYoOc4so5M1JFzZvxOI5ygU9bxtHhZ49zXcn/eDTW3qnqKOc26DbD20/4MI/qbV9j7UvQ5pnUjrIDJijErdUu49Zjbjmvswvr27h6r6CRGYeTw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluators/{evaluator_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-simple-query.api.mdx b/docs/docs/reference/api/archive-simple-query.api.mdx deleted file mode 100644 index 8c03d4270a..0000000000 --- a/docs/docs/reference/api/archive-simple-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-simple-query -title: "Archive Simple Query" -description: "Archive Simple Query" -sidebar_label: "Archive Simple Query" -hide_title: true -hide_table_of_contents: true -api: eJzNWFFv2zgM/isBnzbAa3rDPfnpeuuG9ba1XdPtHoIgUGwm0SZLriSnzQL/9wMl2bFrJ02DDriX1pHFj+RHiqK5AcsWBuIxfC1QczQwiUDlqJnlSl6kEAPTyZKvcGp4lguc3hWo1xBBzjTL0KIm6Q1IliHE4N5OeQoRcAkx5MwuIQKNdwXXmEJsdYERmGSJGYN4A3adk5yxmssFRDBXOmMWYigKh2K5FbSBzFsPLlIoywnhmVxJg4Yg3p6e0r8UTaJ5TnZDDKMiSdCYeSEGN2EzRJAoaVFa2s7yXPDEuTn8YUhm0zAr10SC5V5DogovFKzl0uICdcO8d25HBCnOWSEsxKdl5MlwuuT6au5oauN60prv23SUUb0iCyGAXK80XpJsGbXdPg7qvAFRRpBoZBbTKbP7ABuhSpnFN5Y7e3ZreedhB2eWlBR5+juUfPOwQUmKAn+DknMPG5RUdM1c3h+mxyX3IWT97XN+y9eLaqnYqrVUhL2oloquWosRxeLYXB2RbBnBy5nnbZoLVwebkCxNOZ0JJq5bp7ajdKaUQCabWipPJmVULanZD0zsXlM+OCNI5HhjuhxW1aqlOZu1V5o+9OuChOukEEy/ulSfubH/GCXfXBU2L+xreI6XHXF4Fkm3gaMMLfv/cvShEOJJhrjF7EAppjVb70+etuzzSP1CZFIBYI9Jbd9Y91ym6p7I23et4T2aly25lx6yjECJ9KXBrzxkGYHEh0Ohn6wrl4RVRiB4xvtBe5PuEcpnJ01+6xT1fttQFhm1cswkKFO/Ru1B+DHZy4GDp8IqLeoVE0dbfFEBlBFoZvsbnO7h6uDckGzZyeLthn/rXOzCUEXnwqJ+IlV9q6u0byBD7wZMptuT16XXvVXU/klFBkm/IpWGZuTUgidMXFUaStd++qrhdIfTv9u4OUeR9jXJ9ZF3G8oIfuL62Av1E1JZgRUTxaG96LOLZeVp2VPO+gup/0w4vH59d+aXUSugT58UbuhDxUwpjs3uS2U509wo2YjebhS8o+i7vwvKB2HdE7pH+juz97KJf1lkqHlyELixTFtzz913FMq0eqRPGcYlOZAxmyyRngT/iU1FI4d2kB4ufT5PectUuqoPkl8yMmDJOmSe8+QwBHzgxppgRfjRwHlPKygT7APr1rNqU+ObjMLtUqQ+grtOXsIMTg1Kwy1f9R+Lnqav28Uzg4NRDdMwZc6EwTICfGCJnboAHq3lPWEMvjiMjoo99fMWH+xV4ILw2xQw0X8FHGLRmRDPssQn2daS3UENe3qwtiOGcSicrQMdCq+rwnW3Vd0Qr2HyuDT1yJqmT+PJPodq5L6raY+cm3Lc4IobruQ5cz3Zc+RHbkbjUI6XrOclZUkSf7592x2vfGeCp254MnivtTtmR85WUrSMi9Z92N4gVLLjtnz6gtoT1s/KG+g+Jcxi3zX7BY1hC9x21Lu3OjIGt/T2qSQlv7zqsK99nQV6Pbu73Tj39O0L7cfb2+sOoI9tO6hnftI38Lkw+BomfRnapaJJYK6MdZM/u4QYhrnGFcf7oR8MDu/8AHG4qWaA5TCMDiECg3pVjQoLLSCGpbW5iYfDRKgiPWELlJadMD5kOXdn3mBSaG7XTuTs+uITrj8icz3weNLcMKLE8qnS3lZHieWcupyoGlKeFXapNP/l4x8mlUsvVboWeK6ceFXOnHGDs+sLiIDc8HSdnvxxcgodEpub3SWd2O2sL7yG6BELtf90H2buQIBFlv21fUGWUQQyJpt4/TF7NBUMRFh8sMNcMO6y3lmwCeEcQwgnBcthgR9gctdYxI3BbhXVSQRLyoh4DJvNjBn8pkVZ0nIYfI4n1FdqzmZE43gDKTf0nIYroWNmXULg1U04Ka8H2068bX4VXEn+hvYVIPTC20G0qwHLKnM24fVZkmBuG4KdkkUpVmf+9dXoFsryPzkJ5bE= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Simple Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/queries/{query_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Simple Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-simple-testset.api.mdx b/docs/docs/reference/api/archive-simple-testset.api.mdx deleted file mode 100644 index c50b4aed50..0000000000 --- a/docs/docs/reference/api/archive-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-simple-testset -title: "Archive Simple Testset" -description: "Archive Simple Testset" -sidebar_label: "Archive Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWEtz20YM/iscnJKZjeV6euKpatyM3aS1J1J60Wg8EAmJmy4f2YdaVcP/ntkHKVK0bNmRZ3rwyTIJfAA+YLEgtqBxpSCewZSUVqQVzBmUFUnUvCyuU4gBZZLxNd0pnleC7rQXBAYVSsxJk7QAWygwJ4ghvL/jKTDgBcRQoc6AgaRvhktKIdbSEAOVZJQjxFvQm8pqKi15sQIGy1LmqCEGYxyK5lpYgeBjdJ1CXc8toqrKQpGyIBfn5/ZPSiqRvLLeQwwTkySk1NKI6HMQBgZJWWgqtBXHqhI8ccGOviqrs+04VklLhebeQlIarxT85YWmFcmOg++dBIOUlmiEhvi8Zg0hzlqxuVk6svrIS+GycFggQ+WITzBEuxMMzizKUhAWULP2UWGEAMtT494VqmjaotTMw0pMfhTTQ9Q2WC9WLr5Sooep++ACHeLVDHLS2PcC05TbxKC47ZEx8DMUTge2SU3PUr7oP+mGd78tSLhMjED55oMR4ndVFu9ujK6Mfgv7oVoQrik/UgulxM2DxO7pwoDch5T/sGRajUFd/Z9I/bP8xJV+lNZDQQ7Un8bR1Jdi6FtHMTB0werWrN91ngd12YGoGSSSUFN6h/ohwE6vTFHTO82dP4etvPew0diRZar0JYx88bDBSEqCXsDIpYcNRhq6Fht78Rxnx90ux5D168ZdOTu+TmqlYau10hB2UisNXa0VJczqubU6sbo1g9O5FyLH/Tugfw02V+AdT/eaVmi9j7twfANubsroOnV94sD921oeuhrGoBNR1J1+GJwWe9Livvad177zon3n1D3jntn56BnnngG36X7zJ80SzVz7OnAdMXC9TvovMOkPr85XUp9N6qUl87HPWTsLPGugOOpL+TOtueJl4V0ZfjA/gDBxi5qA8yO67cqkrq3OzxcXww3LXyh46vYn0W9SlvL565WUNHJhfx0YqUSZ9N4+pZDn+4nahfyp9A661qRW9w2Ru8OmFK46WT8s6siIpvbtfXzvlmEzF5c3HeQ6NbOj17N7OIxLT99Dyb2aTm8HgD63/aSO/cov8tUQTduVX046K+1SsCqVXwHqDGIYVZLWnP4Z+R3hKAy/arTdjcH1KCwSwQ6vct2sDY0UEEOmdaXi0SgRpUnPcEWFxjPkI6y4O0OKEiO53jiV8e31R9pcEaYkIZ7NuwITW12+Xvpibaqw4h/JMhcWlmOjs1Ly/3wRhJ1l5rUsNbxYlk49sDh2zkXj22tgYMPwnJ2f/XR2DgMmu8L2YGDiDkZj270GtsdCGz8woNydCtCE+S+7F9Yzm4Qciy7eocTtLSgCFZr+1aNKIHfF73zYhpzOIOTUpsuhQbvKVMAg7u15m9TOGWS2MuIZbLcLVPRFirq2j78ZkjZ7cwZrlBwXlsvZFlKu7O8U4iUKRQNP22YCbz6HM/M22l0E/QiaDBc2vWsUxv4HDP6mTX8z7fpB1hTQNgiMk4Qq3VEdtC9bae0ZuL2ZTKGuvwPsevUe -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/{testset_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-testset-revision.api.mdx b/docs/docs/reference/api/archive-testset-revision.api.mdx deleted file mode 100644 index f861d45d3a..0000000000 --- a/docs/docs/reference/api/archive-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-testset-revision -title: "Archive Testset Revision" -description: "Archive Testset Revision" -sidebar_label: "Archive Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWUtv20gM/isCTy0wjbPBnnRab7NFsu02QePmYhgBLdHWdEePzoy86zX034t5KZZlO47rAHvIKY5FfiQ/cjgUvQKNcwXxGEaktCKtYMKgrEii5mVxnUIMKJOML+hBO4kHSQuueFkAgwol5qRJGogVFJgTxLAp+MBTYMALiKFCnQEDSd9rLimFWMuaGKgkoxwhXoFeVgZCacmLOTCYlTJHDTHUtUXRXAsj4N2Nvngb0XUKTTMx0KoqC0XKoF2cn5s/KalE8spEBDHc1UlCSs1qEX3xwsAgKQtNhTbiWFWCJ5aAwTdldFZrHlbS0KO5s5CUtVPyjvNC05zkmqfvrQSDlGZYCw3xecN6FFmzxfJmZnnsmgiyC5QcC23Y7Ejvp6xhrURRCwGGo00S7x2y5ZDB6e108UM8p4/D4aPUfIbJKQ0MPWSwUOuslCcDd2gNgxQ1HYhqRN9pntNe6EsD2DDISSmc78XeB/OXV28YzITtF7urNUNlO0WC/gz2DE7LUhAWey1eoYpGLUrDHKzE5GcxHURjytCJldNvlOh+Z/lgA+3jWTY1dr3ANOWmXaC47ZBxANmhYXQs5dPuN+vhbbcFCZdJLVC++VAL8acqi3c3ta5q/RY2QzUgXFN+oBZKicu9xG7oQo/c/bWl0Wr06ur/ROrn8hNX+kladwXZU38eRyNXiv5+Pe4Mf0bbK7p34XFQl2sQDYNEEmpKH1CftHe9d7DR0JJVV+lLGPnqYL2RlAS9gJFLB+uNBLqmyxNeUIGs35f+igp8ndRKYKu1Egg7qZVAV2tlQbI/Ix1ervdevWGgRD0/FubO6DYMTheo5xA3b5P++GeuwQeebrQ/38SfduHwVh7u3Og6VWFW23KTt5a3T6ovNdmdFvuuxX3tYK8d7EU72Kl7xpYp/OBpacuoHLrf5FlTSZiQX0e3A0a313eGF3hn6F+dr6QeTeqlIfOpF2MzCxw1UBz0zh2Wec6V/qv34Qg/p92uBZvGaP16cdHfIt6j4KndEUZ/SFnK41eIKWnkwnzaMVaJMuk8fU4xTzaT9Rj0p9I5aNuTmm8bJLcsgJzIblFLRjQyT7cx/rj5Hdu4nGkv11kZBnodu7vDuHT07Uvv1Wh02wN0ue0mdehW3dHmdhlsA89Ksw6vSqXt6ltnEMOgMitc+mfgZ181CCtdNVhtWYQ3A79OBzPOykVYnddSQAyZ1pWKB4NElHV6hnMqNJ4hH2DF7alSlNSS66VVGd5ef6TlFWFKEuLxZF3gztSaq56uWJs4rPhHMjz6pb3bQvL/XEn4dX3mtAxRvJiVVj1sLa1z0fD2Gtbe0OD87Jezc+jxui5sjgkm9pgE2/YxsA0W2viBAeX2jIAmzH97fGA8MwnJsVjH253GjfWHJ0PTv3pQCeT2MFgvVj7DY/AZhnZzrWwd+ywDg3j7Dx4h0RMGmamZeAyr1RQVfZWiaczX32uSJpcTv3SfGmbHK0i5Mp9TiGcoFPW8bhsNvPniz9Pb6PGi6EYT8l2YZC9Q1OY/YPA3LXf8VmObRhbqauUlh0lClV7D6PU4U4DtMbm9uRtB0/wA0hUIpA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/{testset_revision_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-testset-variant.api.mdx b/docs/docs/reference/api/archive-testset-variant.api.mdx deleted file mode 100644 index 3be2d9b923..0000000000 --- a/docs/docs/reference/api/archive-testset-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: archive-testset-variant -title: "Archive Testset Variant" -description: "Archive Testset Variant" -sidebar_label: "Archive Testset Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV01vGzcQ/SvCnBKAsRyjpz1VjRvYTdoYsZyLIRgj7khiyv0IOXSrCvvfA36spNVKiuMoQE9a7c68N/NmSA5XwDi3kN3DmCxbYgsTAVVNBllV5XUOGaCRC/VIDxwtHh7RKCwZBNRosCAm4xFWUGJBkMGO3YPKQYAqIYMaeQECDH1xylAOGRtHAqxcUIGQrYCXtUewbFQ5BwGzyhTIkIFzAYUVa2+Qgh18ihSD6xyaZuKRbV2VlqwHuzg/9z85WWlU7dOBDG6dlGTtzOnBx2QMAmRVMpXszbGutZIh++Fn631WWwHWxmvDKjLIykWnFLcqmeZktgJ9EywE5DRDpxmy80bsChRYy+WHWRCxy9CaqrxrdVyoRqwtSqc1eGl2pfOSCUDDaobylASjBJkYZjo02OEUF2hDa0lMdesFMa0qTVgeZb1COxivURoRYQ3KH8WMEI0vWzSrpp9Jcr8Z34ZE+3iNgIIYu1FgnivfYqhvOmIcKsAWbNtkHaZi2n2znd5+LpDKSKfRvHjrtP7DVuWrD45rxy9hN1UPopiKJ3qhMbg8KuyOL/TEPeb8pxfTe/T66v8k6l/Ve2X5m7IeSrLn/n0ajWMrph35SQr0Q/C+jejun8+DutyCaARIQ8iUPyA/cc/JkekVqxDPYZY3EXYwCmK5Ov8ZJHcRNpHkpOknkFxG2ETSyjVdnnCXbsX6bZn26Vavk7K0aq1ZWsFOytLKtWax2s2f26u33rcRcLrwwnDyzeMjjTL7DpAnO68nmqbxTr9cXPQHoE+oVR7Gm8HvxlTm+dNPToxK+6d0OOwa6Ep2vn7PPjxpds6TTc7vqxigr1Jh5/vmxs1ZYS3OabN5HjYNYgzG/us+wTcz633IK1Inu61ib+SN6h5O4zLKd6y6V+PxTQ8w1rZb1FEc0Qc7czGE0WNR+SnenyEiTuAZDGtDj4r+Gab50g7TLGqHq/743gzTFQAEWDKP7bzvjIYMFsy1zYZDqSuXn+GcSsYzVEOsVVgGlqQzipfBZXRz/Y6WV4Q5GcjuJ9sGt77PYud0zdZFw1q9I69hummMHC8qo/6L7ZAuGYvo5UVS5awK7u1oGoIbjG6uQYBPI6p3fvb67Bx6mm4b+yWCMiyRljt8BrGjwjp/EEBFWB/AhMWvmw8+srqyXGC5jXewhDsHcNKC6V8e1hpVWAchiFUq7z2k8sL6rmF9wqnEICDbe0drqzwRsKgse6DVaoqW7oxuGv/6iyPjCzlJaFMv6/0KcmX9cw7ZDLWlXszrHQZefEwL6eVgMxB1c2mLXS5D0Nr5fyDgb1ruv12GzWLR9tQqGY6kpJq3IHp7m2++9fq4uRtD03wFGhApvw== -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Testset Variant"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/testsets/variants/{testset_variant_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Archive Testset Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/archive-testset.api.mdx b/docs/docs/reference/api/archive-testset.api.mdx index 6be77a582c..84425b6c21 100644 --- a/docs/docs/reference/api/archive-testset.api.mdx +++ b/docs/docs/reference/api/archive-testset.api.mdx @@ -5,67 +5,834 @@ description: "Archive Testset" sidebar_label: "Archive Testset" hide_title: true hide_table_of_contents: true -api: eJzNV9tu20YQ/RVhnhJgYylGn/hUNW5gN2ltxEpfBMEYLUfipstL9qJWJfjvxV5IkaJlO44D9EkSd+bMzJnhzlENBrcakiUsSBtNRsOKQVmRQiPK4iqFBFDxTOzozgQLYFChwpwMKedZQ4E5QQLx/E6kwEAUkECFJgMGir5aoSiFxChLDDTPKEdIajD7ynlqo0SxBQabUuVoIAFrPYoRRjqDmNzkKoWmWTlEXZWFJu1Azmcz95GS5kpULm1I4NZyTlpvrJx8isbAgJeFocI4c6wqKbivcvpFO5+6l1ilHAdGhAi8tMEp5isKQ1tSvQTfeQsGKW3QSgPJrGEtIT5asb/eeLKGyBvp6T9tkKH2xHOM1R4MYzLrspSEBTSse1RYKcHx1KZ3iXqy6FAaFmAV8u/FDBCNKzaYlesvxM24de99oWO8hkFOBodZYJoK1xiUNwMyRnnGwenBtq0ZRMrXwyf98u6PBVwobiWqV++tlL/psnhzbU1lzWs4LtWBCEP5E71QKdw/SOyRL4zIfcj5d0em8xjN1f+J1D/Kj0KbR2k9VeTI/ds4WoRRjPfWkxgYp+B8Gza8dZ4HddGDaBhwRWgovUPzEGDvrkzR0BsjfD6no7wLsJO5J8tW6Y8I8jnAxiApSfoBQS4CbAzS0rXeu8XztDh+uzyFrF/2fuUc+HrRKC1bXZSWsBeN0tLVRdHSbp87q7fOt2Hwcun5lf7o+rhvczzu1W3+pnHWP52fj4XCnyhF6mXA5FelSvV8lZCSQSHdt7gOjg1kyQen33LzrpqjDXIo9mMZEnR9yfX2Pl112A5a45YO1+VpU0/GZOFO72P6oOmWvq4QOtr12nugN7B7uoyLQN9Dbb1cLG5GgKG3w6bOg2SdLDrJmpPJSqdmq1IHCWsySGBaKdoJ+nsatZqe1gcZ20yj9AUGmtSu1btWSUggM6bSyXTKZWnTM9xSYfAMxRQr4QdcE7dKmL13md9cfaD9JWFKCpLlqm9w6+YpTMjQrGsOVuIDOa6i0p5bk5VK/BvaHsV2FrwcGaLYlN498jb3yU3mN1fAwJURWJqdvT2bwYi7vrF7FZD7V6GN7Y+BHbHQ1Q8MKPfvARjC/OfDgcvMsZ9j0ccbtepopUYODP1jppVE4efcB69jF5cQuwid5tbAIBn8IWlbuWKQuRFIllDXa9T0WcmmcY+/WlKuWysGO1QC1467ZQ2p0O57CskGpaZRgt11Aa8+xbfi9eSgZ4aJtx0tXDt3KK37BQz+ov3wL5R/47N2YOpoMOecKtNzHV1QbrK6Yb+5vl1A0/wHM+W/Ag== +api: eJydVU1v2zAM/SsGTxsgxFmxk0/LugENuqFBm+0SBIUqM7Faf6gSnS0z/N8HyrLj1C0G7BTHeqQeH/noBkjuHSQbWKMjh+RgK6AyaCXpqlymkIC0KtMHvKcOAQKMtLJAQsuRDZSyQEggnN/rFAToEhIwkjIQYPG51hZTSMjWKMCpDAsJSQOyPN7sfA46Gs7hyOpyDwJ2lS0kQQJ1rVNoxUtEuxVAmnJ+FahHyxRafm/Rmap06PiKi/mcf1J0ymrDRUECd7VS6NyuzqPbAAYBqioJS/LEjMm18hrEj45jmhFtY1kh0t0Nqqq7oMBQl4R7tHAieOkRreglerX06uERFcGkrHHxZZ3n0G5bTvUi6iTyJjCaKjTU2rac4uPFxVSanzLXqS88+mptZf9flxRJ6pyfNGHhpoC8Umenb03DSIBe23Z7kkBaK48j3b5VHUEWvHD7UWeG6eqh39E5uUcYkr0N9WJEaz79l/xcV3d1wI06cZK3U/ftMr508r12WQ+5Wq9Xk4Rdb8+buugsHK0HCxdIWcXuNpXrLE0ZJBAbiweNv+IwqS5uTrZu47AKQIBDe+j9X9scEsiIjEviWOVVnc7kHkuSM6ljaTRM+PjT6JKh3soOVW01HX2+xWp5jccrlClaSDbbMeCOh60bn3PY0Dlp9DWykGEtLWrKKqv/dDMRNlPWRbFSutxVPjyIGrh9luoJS15lXGdHez77MJu/VUwIiBarZfCMVN4zPQ8PA/FCrkEoEICFNwwQyuLT6YBZcpsKWY7zTXp6RmvQg/A3xSaX2hvCX96Edm8gtBuG1eRAQHK2yfuebwVkPCvJBprmQTr8YfO25dfPNVru3FbAQVotH1jHTQOpdvycQrKTucMJwWGvwLvbYJ/3EYjXiffdLbm1B5nX/A8EPOHx/NvjV0PWD08TAAul0NAodLLJeMoGV6xu7tbQtn8BJEpv6w== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/{testset_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Archive Testset"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/testsets/{testset_id}/archive"}></MethodEndpoint> Archive Testset -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/archive-workflow-revision-rpc.api.mdx b/docs/docs/reference/api/archive-workflow-revision-rpc.api.mdx index 0c356843c1..6ee704bb22 100644 --- a/docs/docs/reference/api/archive-workflow-revision-rpc.api.mdx +++ b/docs/docs/reference/api/archive-workflow-revision-rpc.api.mdx @@ -5,67 +5,1999 @@ description: "Archive Workflow Revision" sidebar_label: "Archive Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJzNWdtuGkkQ/RVUT4k0MV5rn+ZpvXYie5ONLd/2ASGr6Cmgk55L+mIvQfPvq74BwwALBEs8YZiqU12nqrt6jqegcaQg7cE/pfw+FOWrgn4CZUUSNS+L6wxSQMnG/IWeX4PJs6QXrnhZPMuKQQIVSsxJk7RAUygwJ0ihbc0zSIAXkEKFegwJSPphuKQMUi0NJaDYmHKEdAp6UlkMpSUvRpDAsJQ5akjBGIeiuRbWIK66cxeCdK4zqOu+xVZVWShSFu7s9NR+ZKSY5JVNDFK4N4yRUkMjOnfBGBJgZaGp0NYcq0pw5njoflPWZ7qwxEpaljT3EVhpvFNYOS80jUguLPXCWSSQ0RCN0JCe1kmbJBe3mNwMHZXNGDPjF5QcC20JbZhvZq1OZhaFEQIsSy0enzy0ozGBwwdq4s8yeoNMfASUmg+RHTKF8wAZIxg9LuXBwD1anUCGmrZEtaYfNM9pI/SlBawTyEkpHG3E3gTzd3CvExgKd3is71iunplRusxXBhuUpSAsNka7Vp0Lj1AnFo5eUBjUawjfEvHjDMSDjk2Oxa8AXjmAuk6iUTn4RkyvOKg+OcracK4uGpuLwCzj9vRBcdugdYuyxfOnESkfNH9ZzG51LGBcMiNQvvtkhPhLlcWHG6Mro9/Dcq4WhGvKt/RCKXGykdclX2ixu7lLNTqPVoceE6lfyy9c6f+ldV2SLffdOHrwrRgG9n6nwVd0p05ztO4HdbkAUSfAJKGm7Bn1QU/BCw/bOXdkmSp7iyCPHjYEyUjQGwS59LAhSKRrMDngqItk/TkJwy7yddAoka1ZlEjYQaNEumZRXki2b1zbt+tTcK8TUMKM9oW5t752DB0s0cAhLk+T5mg+XPZG8n1RHiX3CGJ/BGERxoSZe//Y7aR/K0qOryE2XE3uaEiSCtY4beJC+ztNlKtQhjq+y21bkSOayUd50dmhBveBeHujxKrixbYXoGWKd7ltxUCu8HaI79393rtuqgrHen87yl5Z73w7p9QWiuQLZ7QNu16e2aEHA3Tt9JQhHxkvJ71FrItGgG3ewaJWdInuHaH1KrYDxC+6z3SnurZuv5+dtWWqJxQ8c8l1PkpZyv01qow0cjdpQ0suG4iSNZ7usqUWBoXv4nnWX0qG8Vafq9EqfW+FuOBN1ps6MjoP9ukqyufaYs/l5UMHu4YgFen17K5P49LTt6m+Vw8Pty1AX9tmUc+9pNpp6ZfgdIBxaXXXqlTayat6DCl0K6sR0ms3imaqG0VD1Z2uUlvrblBuwW/2KNC66xaMta5U2u0yUZrsBEdUaDxB3sWKu/2liBnJ9cS5nN9ef6aJH++Q9vqLBm7g+AZqms1qhxX/TJbKIA17kYv/9F0RNGF/hXP08mJYOvcoirnFdc5vr2Hh2g6nJ7+dnEKL2kVju1OQuZ0SY7vHkCyxMMsfEqDcbRPQhPkf8wd2ZbYkQSuKeBsqufRSHNjQ9K/uVgJ5sXD39UXuQSgyzLVR5Zo5FBoSSNcI67HW/QTGtnHSHkynA1T0KEVd259/GJK2nP0g7A4sub0pZFzZvzNIhygUtdY9O27g3V3YVe8786HVzCeWvLD1tjqb/QYJfKfJun8KuLNjHHtrGkzPGaNKL4C0jjrbhLPNcntz/wB1/R+GFYkO +api: eJydVcFu2zAM/RWDpw0Q4qzYyadl3YAF3dCgzbZDYBSqzMRqbUuV5HSZ4X8fKMuOUzcbsFOU6JF6fHxkGnB8ZyHZwE9lHreFeraQMlAaDXdSVcsMEuBG5HKPd88BcmdwL61U1Z3RAhhobniJDg0laqDiJUICA0hmwEBWkIDmLgcGBp9qaTCDxJkaGViRY8khacAdNIVaZ2S1AwZbZUruIIG69lmcdAUBbkLuaJlB26aU0mpVWbSU5WI+p48MrTBSUxmQwG0tBFq7rYvoJoCBgVCVw8oRnGtdSOGrjh8sxTQjZtqQJk52LwhVd0GBsKwc7tCMGF56RMsGGfwT1eF66zUKcer+AYUbhfVd6AuElg3gqi4KaNO2ZZPwo6KbwC09n3Mov20p1/uLi6laP3ghM69F9NkYZf5fqgwdlwWdpMPSTgGFEie3E5GCG0ZK9HK36VELbgw/jJT8qjqC1IPS7l5zVw/9htbyHcKQ7DzUixGt6fZffaC6uqcDbtSSo7yduufL+NTJ99pjPeTLer2aJOx6e9rURTfHUW+IaHAZgxJdrmjYtbLOz7TLIYFYk3/xOb7nFuN+Adi4d7WNm9Gct3FYFcDAotn3G6E2BSSQO6dtEseiUHU24zusHJ9xGXMtYULV30aXBAUacIuiNtIdfL7FanmFhy/IMzSQbNIx4JZ82DnrFDY0lWt5haRxWFSL2uXKyN+dXcKqyrsoElFWW+XDg96B20cuHrGirUR1drTns3ez+bliQkC0WC3DOHHhx6nn4WHAXsg1CAUMsPSzBA55+eF4QSypbyWvxvn+0u4TgoMyDn+5WBdc+qnxNJrghA0EJwAD8gIwGNwAxy1H5+R08/eWSBnk5K1kA01DKb6bom3p56caDTU2ZbDnRvJ7knnTQCYtnTNItrywOGE9bCR4cxMG720E7PVq+uZX1Pk9L2r6Bgwe8fDiz8pvlbw3VxMQCyFQu1HsZAmSC4cxWl3frqFt/wCO9opx sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/revisions/{workflow_revision_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Archive Workflow Revision"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/{revision_id}/archive"}></MethodEndpoint> Archive Workflow Revision -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowRevision"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/archive-workflow-variant.api.mdx b/docs/docs/reference/api/archive-workflow-variant.api.mdx index 03cbc2b65e..5be93e8fde 100644 --- a/docs/docs/reference/api/archive-workflow-variant.api.mdx +++ b/docs/docs/reference/api/archive-workflow-variant.api.mdx @@ -5,67 +5,1008 @@ description: "Archive Workflow Variant" sidebar_label: "Archive Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJzNV9tu20gM/RWDTy0wjdJgn/S03qRFvO1ugsbtPhhGQEu0Ne1Io84lWa+hf1/MRbZl2W6aukCfchF5DnnI4XBWYHChIZ3AP1J9mQv5qGHKQNak0HBZjXJIAVVW8Ae6f4wm9w+oOFYGGNSosCRDymGsoMKSIIVdw3ueAwNeQQo1mgIYKPpquaIcUqMsMdBZQSVCugKzrB2ENopXC2Awl6pEAylY61EMN8IZtPEOPgWOwSiHppk6aF3LSpN2aBfn5+5HTjpTvHYZQQp3NstI67kVgw/RGBhksjJUGWeOdS145gVIPmvns9qKsFZOHsMDQyZtcIqB88rQgtRWpJfegkFOc7TCQHresJ5EnrZa3sy9jl2KtS3Pu2bHtWrY2qKyQoATp6eeU40BKsPnmJkTMgwjZGSYC99nh5Pk+j6z2shybwAzKQVhdZRxpAeXAaFhDo4eUFg0Uv0I4ps1SAAtbInVjwBee4CmYa2RnH2mzOzp7Ldesj5cw6Akg90gMM+561cUtx1ZD5VyC7bt2A5TOev+Zzu7/VyQcZVZgerFWyvEn1pWr26sqa15Cbu5OhBuqHyiFyqFy6O67vhCT91jzn85MZ1Hr0N/JVH/lu+5Nt+U9VCSPffv02gcWjEO+Ccp0A/B+TasO4yfB3W1BdEwyBShofwezROnV46GXhnu4znMchlgB0Mvlq3zn0HyMcBGkpwE/QSSqwAbSVq5ZssTzvtWrD+WceK3ep2UpVVrzdIKdlKWVq41ixZ28dxevXO+7vI4WXh+0/n2/REXo303yNO91wtS0ziv3y4u+vvUJxQ899vS4I1SUj1/mcrJIBd+HQjXw66BkFnn6/dM4mmzc6Nskn4vQ4CuTqVe7NtDN7eF1rigzfg8bOrFGIzd132Kb3bgic8rUEe7rXJv5A3qHk7jKsh3rLzX4/FtDzDUtlvUYVj6B7t7Nvjto5DuYVBLHR4BpoAUklrRA6fHpN1XdRKXW52s9jwJmiQ+LICBJvXQPiKsEpBCYUyt0yTJhLT5GS6oMniGPMGa+8OgKbOKm6V3Gd6O3tHymjAnBelkum1w53otdE/XbF04rPk7cjrG58vQmkIq/l9oifhwKYKXE4pXc+nd21XXBzcY3o6AgUsjKHh+9vrsHHq6bhu7Y4KZPyYtt/8MbEeFdf7AgEp/RsAQlr9vPrjIXEHiftriHS7jzj0cxTD0r0lqgdwfBh/FKlZ4ArHCsHm/aJdyrDIwSPc//dpCTxkUrmfSCaxWM9T0UYmmcf/+akm5Wk4j3MwpO1lBzrX7PYd0jkJTL+r1oIEXH+J5ejnYbEbdbNp6V0sftbDuL2DwhZYHXq1+aBRtX62i5TDLqDZbGL0Z5xpwfUxub+7G0DT/A3FdSl8= +api: eJydVcFu2zAM/RWDpw0Q4qzYyadl3YAG3dCgzbpDYBSqzMRqbcmV5HSZ4X8fKMuOMzcYsFOU6JF6fHxkGnB8ZyHZwE9tnreFfrWQMtAVGu6kVssMEuBG5HKPD68B8rDnRnLlgEHFDS/RoaEcDSheIiQQ7h9kBgykggQq7nJgYPCllgYzSJypkYEVOZYckgbcoaJI64xUO2Cw1abkDhKoa5/FSVcQ4L5LHS0zaNuUMtpKK4uWklzM5/SRoRVGVsQfErirhUBrt3UR3QYwMBBaOVSO4LyqCil8ufGTpZhmRKwyJIaT3QtC111Q4CuVwx2aEcFLj2hZL4J/QR1utl6gEKYfn1C4UVSvfigPWjZgVV0U0KZtyybRRzk3gVl6NuVQe9tSqo8XF1Op7nkhMy9E9NUYbf5fpwwdlwWdpMPSTgGFFie3E4mCE0ZC9Fq36VEKbgw/jHT8pjuC1IDS7t5yVg/9jtbyHcKQ7DzUixGt6fZfbaC6uqcDLh17t5e3U/d8GV86+d56rIdcrderScKut6dNXXTTG/V+iO6H6S3R5ZomvNK2m2aXQwJxZXAv8TV+5BbjfuptHBxt4+Y44G0ctgMwsGj2/SaoTQEJ5M5VNoljUeg6m/EdKsdnXMa8kjDh6W+jS4ICjbZFURvpDj7fYrW8xsMV8gwNJJt0DLgjE3a2OoUNHeWVvEYSOCyoRe1ybeTvzithR+VdFCko1Vb78CB24PaZi2dUtI6ozo72fPZhNj9XTAiIFqtlmCUu/Cz1PDwM2F9yDUIBAyz9IIFDXn46XhBL6lrJ1Tjf+V6f8BuEcfjLxVXBpZ8Yz6IJNthAsAEwICMAg8EKMKw3OiYn+773Q8ogJ1slG2gaSvDDFG1LP7/UaKiracjySBpvGsikpXMGyZYXFiech10E727DyL2PgL1dS995dfBki5q+AYNnPJz+Q/l1kvfGagJgIQRWbhQ62X7kwGGAVjd3a2jbP8qKgps= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/variants/{workflow_variant_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Archive Workflow Variant"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/variants/{variant_id}/archive"}></MethodEndpoint> Archive Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/archive-workflow.api.mdx b/docs/docs/reference/api/archive-workflow.api.mdx index 9b7e347ed3..88c5714e4a 100644 --- a/docs/docs/reference/api/archive-workflow.api.mdx +++ b/docs/docs/reference/api/archive-workflow.api.mdx @@ -5,67 +5,598 @@ description: "Archive Workflow" sidebar_label: "Archive Workflow" hide_title: true hide_table_of_contents: true -api: eJzNV01v2zgQ/SvGnFqAjd1gTzqtN2kRb7sbo3G3B8MIaGlssaVElRw66xX03xekvi07ddMU6Mm2NPNm5s2Q85wD8a2BYAmflP6ykerBwIqBylBzEiqdRRAA12Esdnj/UJkAg4xrniChdr45pDxBCKA2uBcRMBApBJBxioGBxq9WaIwgIG2RgQljTDgEOdA+c66GtEi3wGCjdMIJArDWo5Ag6Qzq/EazCIpi5SBNplKDxqFcTibuI0ITapG5zCGAOxuGaMzGytGHyhgYhColTMmZ8yyTIvSFjj8b55N3Msu0o4FEGSFUtnSqEhYp4RZ1J8Mrb8Egwg23kiCYFKyhxIdL97cbz1cfeiN9D04bCHMfWkMq6RtVmayVkshTKFjzKLVSgiOpzm1mRlclQsEcHO64tJyU/hHENw1ICRrbhKc/AnjjAYqC1UZq/RlDOjIFbz1lQ7iCQYLE+0nwKBKux1zOe7QO0qyGsANbd7kXKVn3n3SrOx4LQqFDK7l+8dZK+adR6atbS5mll3BYqwMRhMmZXlxrvn+U1wNfGLD7mPNfjkznMZjQX4nUv9V7YeibtJ4qcuD+fRwtylGsLsGzGBim4HwL1r/AngZ13YEoGIQaOWF0z+kxwM69G3HCVyR8PqejXJWwo6kny2bRzwjysYStgkQo8ScEuS5hqyA1Xeu9W2LnxfGb6hyy/tj77dXy9axRaraaKDVhzxqlpquJYqTdPnVW75yvWx7Plp5XB9/eH8dWxxlujYwoCmf+2+XlUHX8w6WIvKYYvdFa6adLjgiJC+kFQLkQDg2kCntvv+fuXRUHO6St9r0qE3SdScz2mEpr94MxfIvthXna1JMxWri3x6huFeLS11WGruw6DW7pLdk9XcZ1Sd9jfb1ZLOYDwLK3/aZOSwk8+tRK4AQpVk4eZ8qQl8QUQwDjTONO4MO4Vn5mnHd0cTGu1DQwMKh3tYK2WkIAMVFmgvE4lMpGF3yLKfELLsY8E37KDYZWC9p7l+l89g73N8gj1BAsV12DOzdS5ZD0zZr+8Ey8Q0dXpd2nlmKlxX9l5yv1Hpdejg+RbpR3r6ib+uRG0/kMGLgySqImF68vJjCgr2vsTgMP/WmoY/vXwA5YaOoHBpj4owCEPPm9feEyc/xXwrPGG3brYLFWJBD+S+NMcuFn3UfPq0YuoWoktCLeAIOg/yen7uaKQezmIFhCnq+5wY9aFoV7/NWidg1bMdhxLfja0bfMIRLGfY8g2HBpcJBic2nAiw/V2Xg5anVNP/W6qanrqJPl7hcw+IL7g/9l/uDH9dDklcU0DDGjju/gnnLT1Yz8/PZuAUXxP5y63go= +api: eJydVcFu2zAM/RWDpw0Q4qzYyadl3YAG3dCg7dZDEBSqzMRqZcuV5HSZ4X8fKMmOM7cYsJMN65F6fOSjW3B8ZyFbw502T1ulXyxsGOgaDXdSV8scMuBGFHKP9y8RAgxqbniJDg3FtlDxEj3QyS0X7l7mwEBWkMFzg+YADAw+N9JgDpkzDTKwosCSQ9aCO9QUa52R1Q4YbLUpuYMMmsancdIpAixi8mSZQ9dtKKWtdWXRUpaz+ZweOVphZE3UIYObRgi0dtuo5DqCgYHQlcPKEZzXtZLCV5o+WoppR8xqQzo4GW4QuglBkbCsHO7QjBiee0THYBCKrqgOV1svUozTD48o3CisV74vEDo2gKtGKeg2Xccm4UdF15HbZppzKLvrKMfHs7OpSj+5krnXIPlqjDb/L1GOjktFb9JhaacApcXJ6UScOAUjBXqZu81RA24MP4wU/KYDQdK+tLvXpqqHfkdr+Q5hSPY21IuR3NLpv/SnusLVETdqxVHeoO7bZXwJ8r12WQ+5uL1dTRKG3p42dRE8m9wdPVuiKzT5udbWeQ+7AjJIa4N7iS/pA7eY9qNr07Z/vZd5l8YdAAwsmn3v+8YoyKBwrrZZmgqlm3zGd1g5PuMy5bWECS9/mpwTFMjFFkVjpDv4fIvV8hIPF8hzNJCtN2PADQ1dGKNT2NBBXstLJEHjOlo0rtBG/g6zERdSEaJIMVlttQ/vN0zg9pmLJ6xo9VCdgfZ89mE2f6uYGJAsVsvoHXJxNqzFAAP2l1yDUMAAS28ccMjLT8cDYkndKnk1zjft7QmvQRCHv1xaKy69M/ztbWz7GmLbgQE1Ho5bywKDbNR8YP0fgMa6oOHJ1tC2FPbDqK6jz2HPUw9zafmDIl9subI44TbsFnh3HS30PgH2OucnPEz+K3uuGkL68dlzI+k6Py2s7y7xCKELIbB2o6jJPqMsgzVWVze30HV/AHk2bqA= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Archive Workflow"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/{workflow_id}/archive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Archive Workflow"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/{workflow_id}/archive"}></MethodEndpoint> Archive Workflow -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "artifact_id", + in: "query", + required: true, + schema: { type: "string", format: "uuid", title: "Artifact Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workflow</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "workflow": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/assign-role-to-user.api.mdx b/docs/docs/reference/api/assign-role-to-user.api.mdx index 51414d68f8..5f0160cd87 100644 --- a/docs/docs/reference/api/assign-role-to-user.api.mdx +++ b/docs/docs/reference/api/assign-role-to-user.api.mdx @@ -5,79 +5,359 @@ description: "Assigns a role to a user in a workspace." sidebar_label: "Assign Role To User" hide_title: true hide_table_of_contents: true -api: eJztVt9v2zYQ/leIe0oBzs6CPelp3pqiRjckcJzuwTGCi3S22EqkSlJJPEH/+3CkZMl263bPW15ikffzu7vv2EBGLrWq8spoSGDmnNpqJ1BYU5DwRqCoHVmhtEDxYuxnV2FKkwf9oGd265IHLYQQFe4Kg5m4uHdkF6agN4lY5rQ/T432qLTSW+FzEsZuUau/kZ0KlcnogkpUhRSos8F5CGcSney9P6pMXDhvOyfzt8Jsgt1xfKxh6UtNzouLRfzRKbxD52e38/21efpEqQ85LcjXVvdpPRlTJGJpaxIqegiBvaATrk5Tcm5TF8WuC5MyKd5h4UgYn5N9US7itEDlqDf5frm8vX5NKQCeiHk0G/LPDDmhjRc5PpOoyJbKOUbIG/7aGFsKnysnMGXlyRmDlgTLaUHWGtvF16Pfg9s7noAEU5EN5ZhnkECUf2TBR28eWQgkVGixJE/WQbJqQGNJkMC4KiBBcRdV6HOQwPgqSxkk3tYkwaU5lQhJA35Xsa7zVuktSPDKF3zwV29MzDNo23W0Qc7/ZrIdKx6b5MYi7fkKq6pQaUhi+slxNzcjj5XlFL0ix1+h1c4Fch0EWgnjVuUMz+jcjLua45fACIbY9O5mE1A7VG7l/kTXRQGccW+OxwjaVvYCsUsPYF11iZyGObLTjyS0LVuz5CqjXcTh6vKS/x1ywN2+tcWiE4YfRzp6+eXq6tTwRyxUFuG55r78F1aP6peR7wqoPJXuVKAw6cHtDxRAaU9bstCuB8zRWtyNSvyHiQFybUu3PdcNf5JzuCXYGzvTbGFIl3z7vXpzXtF1Jzcq9ABvRPfbabyN8H3NWS/CtHJiMNa2JJ8bponKOB94weeQwHTPBG7ajFmhnfIYOJDgyD739FHbAhLIva9cMp2mhamzCW5Je5ygmmKlwjA4Smur/C6ozG7nH2j3njAjC8lqPRa4406JtT8U28OOlfpAjEJHXLPa58Z2M9MzVx61OE3uwcXAPtevWFZxmjv2GAp5QhLDVWSAod1A6Y0JUXVAz0LOYnY7BwmMTpyVy8nPk0uQx+t5LByWahpmp08pXIM8AncPK8h97J6w/HW44IS5nCXqsb2wBwSzh1gacR/3wEFIzTDC/z8e/qOPh27APL36aVWgCvQYWrDpyGE1PBOYB5KjR0Pkh7WEnBklWUHTPKGje1u0LR9/qckyBawlPKNV+MSTs2ogU45/Z5BsGLozrRmKyCT6Rnwr4J4mNHPEMxY1f4GEz7Q7fuaEFZH3PNR0Ir9Hbz8FIh9MnOw13jlRY5Yy9Gdl1yO+vb25W4KEp+4tVJqMdSy+MIT4EsM1IftAhOGsgQL1tuZVlEC0yX//ALNiIbI= +api: eJztVk1v4zYQ/SvEnLKAaqdBTzrVu5vFGtsihuNsD44RjKWxxY1EakkqjivovxdDSpZsN+723PpikZzPNzOPrCElmxhZOqkVxDCxVm6VFSiMzkk4LVBUloyQSqDYafNsS0xo9Kge1cRsbfyohBCixH2uMRVXD5bMXOf0LhaLjA77iVYOpZJqK1xGQpstKvknslMh0yi4oAJlHglUae/chzMKTg7en2QqrqwzrZPpR6E33u4wPtYw9L0i68TVPHy0Cp/QuslsejjW62+UOJ/TnFxlVJfWWus8FgtTkZDBgw9sh1bYKknI2k2V5/s2TEoj8QlzS0K7jMxO2oDTHKWlzuTnxWJ2+5qQBzwW02DW559qskJpJzJ8IVGSKaS1jJDTvNpoUwiXSSswYeXRBYOGBMspQcZo08bXod+B2zkeQQS6JOPLMU0hhiD/xIJPTj+xEERQosGCHBkL8bIGhQVBDMOqQASSu6hEl0EEjK80lELsTEUR2CSjAiGuwe1L1rXOSLWFCJx0OW/80RkT0xSaZhVskHXvdbpnxVOT3FikHB9hWeYy8UmMv1nu5nrgsTScopNkeeVb7VIgt16giWDYqpzhBZ27YVdz/BEwgj42tb/beNSOlZvosKOqPAfOuDPHYwRNE3UCoUuPYF22iZyHObDTjSQ0DVszZEutbMDh5vqa/4454P7Q2mLeCsOPIx28/HJzc274K+YyDfDccl/+C6sn9UvJtQWUjgp7LpDr5Oj0BwoglaMtGWhWPeZoDO4HJf5NhwC5toXdXuqG38la3BIcjF1oNj+kCz79p3pzXsF1KzcodA9vQPftND4G+P7OWSfCtHJmMNS2IJdppolSW+d5wWUQw/jABHZcD1mhGfMYWIjAknnp6KMyOcSQOVfaeDxOcl2lI9yScjhCOcZSQnR6N/lT8YFF/aRYSioj3d7bm8ymX2j/mTAlA/FyNRS45zYKjXEsdqgJlvILMUQtq00ql2nTDlRHa1nQYgy4Qec9Nd2+YlGGUW+ppa/yGYP0R4Ee+l4EqTbaR9VWoU35PSbPpJheGb6AxvXo59H1Wxi1CmIym7ZDhokfsi49LwbRSRUO+EN0yMMRFr/2B5w8171ANbTnLwzBNCMWWjyEC+MotLqf9f9fGf/RV0Y7bI5e3bjMUXoe9S1Ytyyy7N8TTBjxyesiEMkqgoypJ15CXa/R0oPJm4a3v1dkmA5WEbygkbjmKVrWkErL3ynEG4buQmv6IjLbvhNvBdxRhmK+eMG84hVE8Ez70/eQv0uyjpPqVuRD8PaTZ/zexNkFyJdT0JgkDP1F2dWAmGd39wuIYN0+mgqdso7BHUOIuxCu9tl7UvR7NeSothXfWTEEm/z7C72UMEE= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Assign Role To User"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/workspaces/{workspace_id}/roles"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Assigns a role to a user in a workspace. Args: - payload (UserRole): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. +payload (UserRole): The payload containing the organization id, user email, and role to assign. +workspace_id (str): The ID of the workspace. +request (Request): The FastAPI request object. Returns: - bool: True if the role was successfully assigned, False otherwise. +bool: True if the role was successfully assigned, False otherwise. Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. +HTTPException: If the user does not have permission to perform this action. +HTTPException: If there is an error assigning the role to the user. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"email":{"type":"string","title":"Email"},"organization_id":{"type":"string","title":"Organization Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["email","organization_id"],"title":"UserRole"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"email"} + required={true} + schemaName={"Email (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Email" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"organization_id"} + required={true} + schemaName={"Organization Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Organization Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>role</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/bases.tag.mdx b/docs/docs/reference/api/bases.tag.mdx index 153eae0bbb..bb773bf0b1 100644 --- a/docs/docs/reference/api/bases.tag.mdx +++ b/docs/docs/reference/api/bases.tag.mdx @@ -5,16 +5,9 @@ description: "Bases" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/cancel-plan.api.mdx b/docs/docs/reference/api/cancel-plan.api.mdx index af3caf7845..1226e51e5e 100644 --- a/docs/docs/reference/api/cancel-plan.api.mdx +++ b/docs/docs/reference/api/cancel-plan.api.mdx @@ -5,59 +5,72 @@ description: "Cancel Subscription User Route" sidebar_label: "Cancel Subscription User Route" hide_title: true hide_table_of_contents: true -api: eJyFUk2P0zAQ/SvRO1tN4egThQvVHqi27CmK0NSdbQyOY2ynIkT572iSbml72VyseOaN38eMyHRK0BU+W+esP6FW6AJHyrbz2yM0DHnD7kdw5KEQOYXOJ07QIz6u13IcOZlogyCgse+N4ZRee1c8X5qhYDqf2WdppxCcNfMD5c8kmBHJNNwS9DjJpx5GfpkpFPv+cL0tXhLH4rnrs0xvOTedkA1dylAIlBtolIdFVJlukOUiCAqJ45mjqB/RRweNJueQdFka1/XHFZ3YZ1qRLSlYTLUgTB9tHmbIZrd94uEr05EjdFXfNuxFz2LSfduIPASGBgX7xAMUPLXyv+lz00X7d/YFClaENwtKHLH+tZvhNru5fyZXbHZbKIiMxar16sNqjUcD75olCjJzFG9vz2WoBxeu+qHALVmpZab20/+CMBPPW/I3897N647d1ZLMf3IZHFmP6cJlvERZ4RKlxHYzVuQscdYKjYSvK4zjgRK/RDdNcv275yiJ1QpnipYO4l9VT+rNXgnzFw9ihDEcZIHO5PolpYddlZCv27b7tv+OafoH7X8eaw== +api: eJyFUstu2zAQ/BVhzoTl5shTnVxq5FAjbk6GUKzpjcWGohiSMuoK+vdiJcVxDBTVRRA5O5rH9sh0TNA73FvnrD+iUmgDR8q29esDNAx5w+5ncOShEDmF1idO0D3ulkt5HTiZaINMQGPbGcMpvXSueJrBUDCtz+yzwCkEZ834g/JXkpkeydTcEHQ/yKNuKB9GCcW2219Oi+fEsXhquyzsDee6FbGhTRkKgXINjXI/mSrT1WQ5GYJC4njiKO57dNFBo845JF2WxrXdYUFH9pkWZEsKFreiVuNt8SBQDJXQmS7afB75Vpv1I5+/MR04Qu+qa8BWzE4Jfob1yOfA0KBgH/kMBU+NfK+6XLfR/hlDg4IVAfU0JXFZ/9KO4zY7/tB2T+aV/QEK4nOSvVx8WSz/ZWYeKFab9dwZmbGzdx0jDOomrktQUOCGrNxlpubrx4WolHIa8ld8/y32k8pLPJl/5zI4sh7DrKWfO99h7lz6vaIVO1PvlUItW6J36Ps9JX6Obhjk+K3jKO1VCieKlvaS5a4a1HvUUuwrnyUIYzjIpp3IdVNjN0sthV/WcvN9+wPD8Bc7pSz6 sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Cancel Subscription User Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/billing/subscription/cancel"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Cancel Subscription User Route -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/close-evaluation-preview-simple-evaluations-evaluation-id-close-post.api.mdx b/docs/docs/reference/api/close-evaluation-preview-simple-evaluations-evaluation-id-close-post.api.mdx deleted file mode 100644 index e9a2d5cfd7..0000000000 --- a/docs/docs/reference/api/close-evaluation-preview-simple-evaluations-evaluation-id-close-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: close-evaluation-preview-simple-evaluations-evaluation-id-close-post -title: "Close Evaluation" -description: "Close Evaluation" -sidebar_label: "Close Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzlWN1vGzcM/1cMPrXANc6CPd3TvCRFs2ZrFrt9MQxDvqNtdbqPSJQ3z7j/faB0nz7bTZoUGJCnxDryR/JHiqK0AxIrA+EUrjdCWUEySw3MAshy1O7XTQwhRCozOMdaZJ5r3Ej8e25kkqv2FzNvi8l4Pve6eWYIAsiFFgkSara5g1QkCCF0NCAAmUIIuaA1BKDxwUqNMYSkLQZgojUmAsId0DZnZUNapisIYJnpRBCEYK1DIUmKBZrIBjcxFMWMQU2epQYN41ycn/OfGE2kZc5yEMLYRhEas7RqcF8KQwBRlhKmxOIiz5WMHOzwq2GdXcu3XDOBJL2FKLNeqXRZpoQr1C0fL51EADEuhVUE4XkRtGhxBtPtp6VjrQu+VC6DxwWk8TmIu0KlL4ssUyhSKIJ6KbVKAdNUeXdjBpceoQgYTskNPgfslvU9lIjomWAjj1AUQSWVLb5iRAcr4N6m7x1ffdAigARJdF0RcSxZT6i7Dqc9Z8sqbMFWSe5YShbdlXaMh21BJHVkldBv3lulfjNZ+u6TpdzSW9gPmEEkYfJILaG12J5kd08XehSfUv6dyWSNXnn+n0j9I7uVhr5J67Ege+pP42jiS7Hsg49ioO8C6xZBt399H9RVC6IIINIoCOO5oFOArcYbC8J3JJ0/x61cetjByJFl8/hHGPnsYUsjMSr8AUauPGxppKJrseVT7HF23FH1GLJ+3brDq+HrRa1UbNVWKsJe1EpFV23l5aA93ga1eUb5fynVOX6xfxJ0z1RDguzJphUApjbhySrHNPYrDxYt8miibZr6JePnDA5WSGU1TxmodaZ5KRJphEphDLNDh9nYO3HwKHuwqLdzQ5jveVkeEN8mu39MHOvbxwKPrKEsgQDWNhEpBCAsZcDelWRuuXf5IeaI8Uf00D850sHYRcqKaMggvYrQJz7WJvjWUPoqCBg18TYklGNzpl8FBddVtA0BGnMUdLg7HRyg9iDvS/1TI/XYXfyaXnQl3LTX60RPgHimen1NKwpW+/nion+r+yKUjH25XHOT/f4rXYwkpHLXq6qiugIqizpfnzLczvbLr4n6NosqsiAxq0P11wzgxogVNuV0XNSRMZjw10OUN3fwqYvLmy7l2gdoTa9n93gYV56+U/n9MJnc9QB9brtJdVfTQauO3EVunfHDRf3sQGsIYVg+Wwz9s8Ww9Wwx3HUeIYqhuzLzAY16Uz1XWK0ghDVRbsIhS9j4TKwwJXEm5FDk0m0jg5HVkrZOZXR38xG3H1DEqCGcztoCY64tXy1dsTpRIpcfkXkrH0pGltaZlv9WcbqHkrXXYmJkusycetUfnXOD0d0NtKYjOD/76ewc9nnsCPO2EJHbFpVt9xmCPRbq+LnzJW5PAKFIfmk+sGecCO6CDd6BtO1dYUoSCP+hYa6EdEXvrO/KjE6hzCgnyuUU2s8mPEOF+49LPrGzANZcG+EUdruFMPhZq6LgZTc5caoC2AgtxYKZnO4glob/jyFcCmWw523dSODNfblf3g6ay2Q3iiq/KSeXHeRfEMBfuO29h7l2sK4qaFfKjKIIc2pp97oXl1q9Ee4+jSdQFP8BQnHajA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Close Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/{evaluation_id}/close"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Close Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/close-run-preview-evaluations-runs-run-id-close-post.api.mdx b/docs/docs/reference/api/close-run-preview-evaluations-runs-run-id-close-post.api.mdx deleted file mode 100644 index 63f79ec4c3..0000000000 --- a/docs/docs/reference/api/close-run-preview-evaluations-runs-run-id-close-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: close-run-preview-evaluations-runs-run-id-close-post -title: "Close Run" -description: "Close Run" -sidebar_label: "Close Run" -hide_title: true -hide_table_of_contents: true -api: eJzNWEtv2zgQ/ivGnFpAjdNgTzqtN2lRb5JNYKe9GIbBSGObXYpi+fCu19B/L4aUZMkPxXkU2FNiauab4TdDznA2YNnCQDyBTysmHLM8lwamEeQKtf81TCGGROQGZ9rJmdK44vjPDLfitG5m/itPZ7Mgq3JjIQLFNMvQoiYbG5AsQ4ghiEIEXEIMitklRKDxh+MaU4itdhiBSZaYMYg3YNeKtIzVXC4ggnmuM2YhBuc8iuVWkMDIyd4whaKYEppRuTRoCODi/Jz+pGgSzRU5DTGMXZKgMXMneqNSGCJIcmlRWhJnSgme+D32vxvS2TScUpoosjxYSHIXlEpfubS4QN1w7tJLRJDinDlhIT4vIiLCW5Lru7knqI06Fz44xwW4CXSnbaHSicc8F8gkFFG9JJ0QQPxUbg1N7zIgFBHBCb7C14DdkH6AYol9JdggIBRFVEnlj98xsQ1at2k7cvKz52sftIggQ8varrA05aTHxH2L0z1ny7xrwFbRbVnKHtsrzT0etgUJ14kTTL/77IT40+Tyw52zytn3sLthAuEWsxO1mNZs3cnuji7sUdylfEtkksZeev6fSP0rv+HGPknrsU3uqT+Po4eQiuWVdxID+y6QbhG1L66XQV01IIoIEo3MYjpjtguwcdWmzOIHy70/x61cBtjewJPlVPorjHwNsKWRFAX+AiNXAbY0UtH1uKa6dZodX5xOIeuPta9aW77e1ErFVm2lIuxNrVR01VbeDjrgrVCbV6T/t1K9iMBYZl3npRQBSpdRU6RQpmHlh0OH1GxoJ2VYMqGBoM0wLpym9gG1zjUtJUwmKASmMD1UrMbBiUMu1w1CbZ2CxnbLV7sRMBbVzp7KcrEr+TeuD/VUlYvXuN7ec8eJ4ZIuRGrgVnlokSACJmVuw4/mRUgQRQS55gsuu0ATZ2yeQQRLlzEP6GzehLoLENQ44Rw1yqSsLkeqTnvnb5hCwi1eCjMm3Tc/IB0d0qiiar9+HRDyNctH9+3S6YDdbbM/8RAHD8nIyStm2diiGsp2AX66wRmGPZxivJSoU7SVXk959iynxv6Y+vxVyHYp7mqEdoBGpX7juvhIXS5TisvdpuxI6JJcuEweCCmXaWdM6XujszkmF7qXp/gnsBKri+rbsLPL4LO/xlG99HbzL84OsXv6flrmeKgTHA+p8gRkGZFycyegPiv5bqvkOPk9RZYOPadO1X+Nbv0mLwrS+e3iYv8J/40JnnqF3icqvC9/v6doGRf+SX34sIg8aX19zoNmuhul7ZZvqupJh9csupLyFo1hC+yqzjWRREYvFN4nUo72FUyXcs2KV9Mb2D2+jatAX1dwvzw83O8Bhti2g+rHET3KHv9qX+Y0gKrHSXRwoV9OofqNKVSfplD9TRgtFX0/FqGThHpVTZ+cFhDD0lpl4j5JuPSMLVBadsZ4nynuj4vBxGlu115lcD+8xvUXZClqiCfTpsCYcilkR1usDgxT/NrfEuXca+DsMtf8v6ph8uOvZdAqfN2d51695GzgnesN7ofQ6IDh/Ozj2Tns8tYSpmPAEn8MKtv+M0Q7LNT7pz4s82cALLLs9+0H8oz4p55si9cM0877tNy9xX9tXwkWOjZvdlNGcAJlBMlqY/Do22v6E9cjwhDIaQRLSoF4ApvNIzP4VYuioOUfDjXFahrBimnOHom5yQZSbuj/FOI5Ewb3nKwvCng3Ks/D+952QNB2voqnpGCSv/QLolBuqnGmP+fLKlXKWgSDJEFlG2p71xLlVJ3o93fjByiKnzuOXs0= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Close Run"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/{run_id}/close"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Close Run - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/close-runs-preview-evaluations-runs-close-post.api.mdx b/docs/docs/reference/api/close-runs-preview-evaluations-runs-close-post.api.mdx deleted file mode 100644 index a18d5a749d..0000000000 --- a/docs/docs/reference/api/close-runs-preview-evaluations-runs-close-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: close-runs-preview-evaluations-runs-close-post -title: "Close Runs" -description: "Close Runs" -sidebar_label: "Close Runs" -hide_title: true -hide_table_of_contents: true -api: eJzNWG1v2zYQ/ivGfdoAOU7TNt30aW7Sol6bJbDTfjGCgJbONjuKVPmS1TP034cjJVvyi+ykKbB8cCTq7jnec8fjkUuwbGYgHsO7ByYcs1xJA3cRqBy1fxukEEMilMF77aS5zzU+cPznHtfy4UOQyZWxEIHGbw6NfavSBcRLSJS0KC09sjwXPPGKva9GSRozyRwzRk+5JsOWo6E37eQ9T/0jt5j5B7vIEWIwVnM5gwimSmfMQgzO8RSKqBJgWrMFRGC5FfQ+dLIzSA0UaxE1+YpJNVuuMSUeKpt3a9U1NUMnB6kZBuegIKy1rtUO/YDJlTTBg7PTU/qXokk0zwkCYhi5JEFjpk50hqUwRE/lKFEuKJVOcWlxhrrm+YWXiCDFKXPCQnxKs3SyyWsTdSp8WiyBycX1FOLxpgAvA542hcpJTJQSyCQU0WpIOiGgqLE6MJ2LgFBEBCf4A/4I2CfSD1AssT8I1g8Iu5JlZ1a893xtgxYRZGhZcyosTTnpMXHT4HRrsmWS12Cr6DYsZZPmSN3H3bYg4Tpxgulf3jsh/jRKdq+dzZ39FTYdJpAySY7RCsuujd0NXdiiuE35isgkja30/D+R+pf6xI09SOs+J7fUH8fRbUhFkCzbvQa2GdieAukWUbNwPQ3qsgZRRJBoZBbTe2bbAGt1PWUWu5b7+ey3chFgO31PlsvTn2Hkc4AtjaQo8CcYuQywpZGKrsninu+utXt3wsNkvV10Bmmdr2e1UrG1slIR9qxWKrpWVp4POuA9oDY/kP5fSvUiAmOZda1FKQKULqM2JEeZhpFvDh2m4LdsGYZMaCDIGcaF09Q+oNZK01DCZIJCYLq7hRmFSeya8qpBWFmnoLHN7avZCBiL+YZPe3qKv3Gxq4GrpvgRF+s6t58YLqkgRsDlgwotEkTApFQ2vNQLIUEUESjNZ1y2gSbOWJVBBHOXMQ/orKpDXQcI395NUaNMyt1lz67T9PwZU0i42VNhRqT77AukpUMaVlRt7187hPye5aP7fOl0oNcniH19/iWzbGQxH8jmBny4wRkEH44xXkqsUrSRXodm9qhJjfwy9fmbI9ukuK0R2gAalvq1cvGCulyW51xuNmV7Qpco4TK5I6Rcpq0xpe+1zmafXOheDvFPYCVWG9VXwbOLMGdfxjF/anXLmZ23id3Q9+Myx0MdMfGQKgcgy4iUzh2B+qjku6qS4+jzFFnadZw6Vr/9IqCRvePjUc3quF74s/+rs7Pt0/0XJnjqNTrvaE9++tE+Rcu4aDmlC5U0vj7mrHO3n6FP1cZK69rM2vL1Co1hM2zbuFdMEhmdsCcfyEbyK5gu5eqb4YrewO5+Ny4DfW3R/XB7e7MFGGLbDKq/qeiUqZOhnSu6Fisvu8Kihl55NdarXY316J6l529KaHGhplbAR8hpATHMrc1N3CMJl56wGUrLThjvsZz7FWQwcZrbhVfp3ww+4uIDshS1z9uawIhyKGRFU2wVEJbzj75whOoJfWfnSvN/qx6KOiSYBy0igLJzuL7Ge/edZbnAxrXcGF5O2W+vp+evuq/fvHjTffX6/Kw7eTlNumfJ7+cvp+fnbMrO4c5v7FPlJ1My3/eudvo3A6i12HB68uLkFDbZbwjTYmKJX0yVJ/4zRBucrtikRi/zKwkssuyP9Qfyk4JITd8arxHsjRNwSabF77aXCxZ6Qm93WebBGMo8ILO1S9Xyzi0Kl6mU0nNKn3gMy+WEGfysRVHQ8DeHmgJ+F8ED05xNiLAxkTivQl9uN3ARCkv3NnQRZC2EeqPIUAEIGv0kwdy2yt7VMvzmenQLEUzKe9xMpaSjGTlHvzFQ85IHDyk1aGwJgsmZo7oQQ8Ckv/8AfFen2A== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Close Runs"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/close"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Close Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/commit-evaluator-revision.api.mdx b/docs/docs/reference/api/commit-evaluator-revision.api.mdx deleted file mode 100644 index 7069ebaaab..0000000000 --- a/docs/docs/reference/api/commit-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: commit-evaluator-revision -title: "Commit Evaluator Revision" -description: "Commit Evaluator Revision" -sidebar_label: "Commit Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWm1v2zYQ/ivGfdoAOU7TNt30aWnSolnXNUjS7oNhBLRE2WwpUSWptJ6h/z4cScmSX1RLsYegdT4ktsR7Tnc83ssTzUGTiQJ/CK/uCc+IFlLByAORUkk0E8llCD4EIo6ZvqPFkjtJ75liIgEPJP2SUaVfinAG/hwCkWiaaPxI0pSzwKAMPimR4DUVTGlM8FMqUYdmVOG3Veg7q7Rp6T2RjCT6joVGXTJ7H4E/nIOepRR8UFqyZAIeRELGRIMPWcZCyL1yRZJxDvnIA800xwulE3ofLXbvEgXgq5CfIy6+7kHlPw56SePCyn1Yt2TVHqyxGnbvrrqXiNQsIsEuFZw5SKch4uZ8VLHr4cjUXZApLeK1DzAWglOSNGq8VL1zi5B7CFdu/UMQy712oNMsJslDAN8YgDz3ikVi/IkGGtaE12vjs1W83IOYalJ/ChKGDFME4Vc1v27aywosSzSdUFnXFI/rV6rmrdcFAZNBxon85XXG+Z9KJP3LJM30r7BsK2IwTePthIiUZNbo1roorPi2SfYdehIlVuLzMXn0b/EXU/p7Pt1k47J0Ow/d2iiEhMR0S/tXnwBlcw9CqgLJUjS1K9RFBSL3QPFs0hXqBmXxqcjyaarnpnsq1QOe+KMTzz3IJOuK8kEyi8C7I3BEmFISUtk62Pflkl1s4O7KFlarhtx8TSMqaRLQKkjxoKNWx+qN2wZ0genmtt2RR5SWHl+ib7EBN87rWE5JmrJk2wKw7N821aZQZHYd01jn0LfSuQcpkSSmusOR/pkDZbPs1cKfuEtU3rOAbuNaLTPaKgAddO7huBexSWZnxX3oOq8p2Kr9vHYT5AUxHdLaLlQpMuncFLxz4q2e5tyOs+tkcIRmkoY4hm8ehNcNcnXwazuKQ45KFqDocnNBpSJR9iydHB/jn1pbAzdZEFClooz3rt1i8LpO9IHIrNDS0axuLa7A3ioiGdfgH9fm3pJjaKjmBy7gwAX8f1wAyfR0w1TeBdyi2Ta+MRdVUHFpX7OYNkJfIOAO89yBBvk5aZD3me7Q9axItWh7rOwPzoQ0uXULKqSLjx43FxJISjQN70jjVNE6DZ5b2N6ZcVaWhvtQ8sHCOiUh5XQPSi4srFNSuGs822GtK5z1cuaqXeGvnWopvFVqKRy2Uy2Fu0otPzLrc6ABDzTggQb8cRqdAxP4KPu3RxkrBzLwoWRgG4yHypekWm4YumcnJ6sc3EfCWWjs672SUsjuBFxINWGm2LqoXF7ARVC72+ZUVWqFDeSF2X+JgBSNfawmq+lmLcFgl2xeapzRu8W736NQ0S6r2q2rUUaFe613N5txYd3XtMFvbm+vVgDt3tY31dKzCzKid714fyqmeirwJatUKARPiZ6CD4MU+U/6dVDSIGpQMKJq4Chhe7BN2hzObWsFU61T5Q8GARdZeEQmNNHkiLABSZk5S4oGmWR6ZkTOri7f0pkt5eAPR9UFprjYSKkvKzeJpOwtRZ/ZqdIxWuxfu/0eMLTdtmvGjxix14vXxV59I3HK6Xdf/1pP8sLTiPz2PDp91n/+4smL/rPnpyf98dMo6J8Ev58+jU5PSUROYQNdu61wnXltrbKNUJfHq1Ge2wqVVF6FsrOJuE66ldccZ+b+jeCoqwXfUrIKi0Nbj/7ysm2VK8vc3FI244tbZtCofuXVr4sRoNZ91tugSn+ykKx1GrXCuKZ+5VUKtcyG2K8nkTDnoKByzSnrnV1dQmXWhOOjJ0fHK+6oLcbcTgIT5sUhMrdLm4vjXB5kjMrYJHbQlMR/LG7gk2EScQynw2vKPUtMjjvWmn7Tg5QTllQGNpuWhuDSUvVsKJN/XWoyNhX/r5piSvOHMJ+PiaIfJM9zvPwloxLzz8hF/RidOByVs51JTZ/pzFZ8rH19k/hxOc9s5lmqg1ijrMRZENBUN64dVbLu1fubW/Bg7F5fjUWIMpKghfjbB8C3YbWxzZ/ba3PgJJlkNi4sJv78BzpL2qE= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Commit Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/commit"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Commit Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator_revision_commit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionCommit"}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/commit-query-revision.api.mdx b/docs/docs/reference/api/commit-query-revision.api.mdx deleted file mode 100644 index 4b7639ab5c..0000000000 --- a/docs/docs/reference/api/commit-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: commit-query-revision -title: "Commit Query Revision" -description: "Commit Query Revision" -sidebar_label: "Commit Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWltvGjkU/ivIT1tpCITm0vK0aZKq2W2bbJJmpUUImZkDuPVcanuSsGj+++rYnhsDw4Slq2pFHtBgfL5zfGyfy5dZEEWnkvQH5I8YBANJhg4JIxBUsTC48kifuKHvMzX6HoOYjwQ8MsnCgDhEwPcYpHoXenPSXxA3DBQECh9pFHHmaoTOVxkGOCbdGfgUnyKB+Ap19RekDDsyytZNe6SC0UCNmKfVBPPrCekPFkTNIyB9IpVgwZQ4ZBIKnyrSJ3HMPJI42Ywg5pwkQ4copjgO4KrnrQeD27rCyWT3Wsr4Zi27XoPBpkKxCXV3afyZhbQaJlwfmCI29TyGm035TWnTKtrHYciBBkV11qBkmDjpUDj+Cq6qtem9NiJxiA+KbmlMqjlXwwIFUxBlzf64PFJcw2pdxGXCjTkVv7yPOf9NhkH7Kohi9YqsWiJT4DcTokLQeb1bSqLkRS79hJ5Eie239z/w6OfwI5Nqk0/XrXFZ+mUeurdnLqA+NFx/1QKUTRzigXQFi3Cp20JdFCASh0geT7eFukNZtIou36ZyFH5igRc+IVrNpACeQKqG0cejCtqKaafUeM1AJg4Jubdr8GsDiRsLz02hN0bNz4iVOIQzm88qoCvvxhLKRy2N6xYeiHrbIIh9TORUuhB4ZgyPmf0yrPWBhk8cbZR4pHxri69SgMQhgqrVF6UaAyo4tyibVO5nPuHP7CxWYTBNMa5AbDiqptAJtWM9mNCY497SwMujStW9+tdQEIcEIRoUmJEgFKS4c+GUuZRfpxoSByskE9y0bhv31xs3YcB1El+2JIv2ekLikG8w3/bm/w5zU/LwuGlMe3FMT1earMhkq+O9EjG8JDI/aPMTp7Shm28Kk8QhTI5wHwto56EfUcFkGBR2bz0KfMfd159TPA9c6SfQj/g5Vk9BEf9z7INgbiNwqahQ8ompmR700kestikLcAE+Ve4M8Imzb1BUdKfRGulhgTnPI1YyFdNlI/kZRQNmtOLMC+Y2Q4BnJpW0VtgvBZxLHIHAhVVg1XiWTnIK95pJc0SyK7ju5rlUwkhCIJlij6uvxYpKtmLEOZXQustgCqZMKJeQOASesVTXG7i1lkvEaH3SGBUVNfHzHp7VtfUF4pddQPnqFNDEojPOX2SJOWS5Jes31c5ZgYXNKBPg4UkygbN0oW3g1VE4q7PTDPGKDJdD0wpZWVzTYFi3oAx5VWqqkdON3K1thS+orsdXpDYfpKTTrUvQT1a8sSXnpiff5PbVnfxyn1oGvTUcAkkQPAfD+K8HZBQG0pzIXrdr0nShcCZ3seuClJOYt27tZBsct6Ai3DA2QkuJrngYcEbhHHSzdj4jRmriyp7E+FlIDBqr2aYq4QXgBs00ULX38sXNyYUug3d35/f8zVb8zXWstiBwKlIvYHCM7P+cwqlzawMOZxsf/dwkjiuAKvBGdLcUx7mBbZ1pZ8WR9yOUfDGwVokHHH6AkgsDa5Wk7hrvMhOlznqXpqPUXzvVknor05I6bKdaUndlWh5BVKuU5sf1wYrviG/c3UKtD/f85Z6/3POXe/5yz1/u+UvY85d7/nLPX/5s/GVT+X8jm3GBiSYWj3q9KnX4QDnzNDHYuhRCX7UteUMPFGW8lBPLE3jorsmYm5NUzdZ+DI2BmkeR07pUW+B/zJT1U7UzWvf466aDiusyqu28ckqz7jXeXb+MC+O+us39cH9/UwE0e1veVMMqtwyZeJu/q+aDmoX4MlsUSgSOqJqRPulESNvCU+e7efmtk7K4smPpa4dIENg06e2KBSd9MlMqkv1Ox+Vh7B3QKQSKHlDWoRHT912CGwum5lrk7Obqd5h/AKrr38GwOOEOD5Q5IuVp2e7QiGGFk9IVlmlkf5t9x3IX7TFS6A08qrf5e3mXz9SPONS+Z1clpcnrCX1zPDk5ah+fHp62j45Peu3x64nb7rlvT15PTk7ohJ6QMsXcVCanjZtKlMjgpkIpyZkzjDktlpE/+dkvH6Js2LS4hWm2vSy1kWm7SHrd3lG7e9ruvb0/PO4fH/Z7bw66p4d/kbzrq5tjmremC7RtWTfrrEptU94FddMuprvcU+Slpm0JiuX9ICvf89XrKj3/akvufKAAqAvTQqGyXJCY+rhUPeh/+SQORnod5zPCOwuOurubhPp2pJla373W2c0VKVAbpHtweNCtbGtpsq4/XX0B0qulfybO0iXPrjeWer6O80QB9X/Nf0DLMK74NCjgrQtFS6ShvegKnlUn4pTpaK5NWNgoNSA2Stnrw3StnEUqvZj0X20zDG/9AVksxlTCF8GTBIf1rcPoYy/tGL03wNQySwPTwu7vucmBbZ0A8l2u5EPMVUbizHUhUrVzh4UIfHN9d49NhX1t2A89lBEUl4effVI+O3psQTgNprE5EAYT//4BWqsxtQ== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Commit Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/commit"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Commit Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query_revision_commit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/commit-testset-revision.api.mdx b/docs/docs/reference/api/commit-testset-revision.api.mdx deleted file mode 100644 index 8ad5630d78..0000000000 --- a/docs/docs/reference/api/commit-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: commit-testset-revision -title: "Commit Testset Revision" -description: "Commit Testset Revision" -sidebar_label: "Commit Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWtty2kgQ/RWqn3arhMHYxome1omTCptk7bKJH5aiqEEaYLK6ZWbkhKX4962eGQlduAgiV9lZ/GBj0X16pqfVlyMtQJKpAHsAfSqkoFLA0IIwopxIFgY9F2xwQt9nciS1wIjTRyZYGIAFnH6LqZBvQncO9gKcMJA0kPiRRJHHHIXR+irCAK8JZ0Z9gp8ijhYkowL/KwKPtMHNgo+EMxLIEXOVqWB+MwF7sAA5jyjYICRnwRQsmITcJxJsiGPmwtJKJYLY82A5tEAy6eEFs/nGg0Zu9FAc6reTx0/2U/8+ND7hkk2IU6eBKwNpLEw8FT1Z7PyRzYhQgeMQQcXaRYzD0KMk2Gr1AxGNfoqytDQsJ87PYmqIJZ6FFgvHX6kjoeTR92qjZbylBT6VJL8K4roMI594tzlnbDqADCwLJJ1Snrfkj/NXsttbbwscxp3YI/y397Hn/SnCoNkLolj+DsWdIgaT1K+mRDgn861uzatCybPbdD+jJ1GjFFTPyaN/hZ+YkLt8ummPRe39PNTXUQgB8WnF/ZdXgLpLC1wqHM4i3OqhUNcZiKUFwounh0Ldoy6uihTvpnINwDQwYm4hAkwU785u1YM5yTmNniuShL0mk6WW15erp0rv9WLfp7gOp0RSd0RkRWyXSNqUTIXVZgNvNWzjSsV8HLlPYeSLhjVGXOrRJzByrWGNkcRd43mNp5E4683cHErir1qtJN5KrSQOq9VK4q7USn3QG7uQygVjTauQZKvhXqk56RCO1Wtn9Tp2THV3TOWqefToYR69Rk/uGgiwBziokag0a9yZOVgvZf3IIQSZHtwBfjbqe6zlrR7J12kgCcA4dZFE2DTKl3uYPPCdJhJgiQZWgJLHVF0QURiYtqvTbuOfXPcK97HjUCEmsde4M8JgHcpHOGGslQr3Q6Y6KwkslxMSexLsdmaaT/mRHV3skcl4TkwGieUs5LWBazSdmbfep/s3nwhYYw44kjgviMS5ieUBFbSktUcJ1bq/OI+zza0VWuFDfPS8mZwjBXCkAJ6UAnikvNwjVQ/XB6NeE+lYNyFxJDGPJOYxg/3aGexIYv7fW7fjzPAEM8MLYTJfhlNfAJlZHeHntFNacKk4xvNOp8wiPhCPuYojbLzjPOSHU4gulYR5+GlDW+WFTu7bfYJ5WDys1aY/hXqBKj2J6bpGcg0BpEU2iypnNPr47S4CGPelTRu5HGWYuFd7d/M2rrX7th3vh37/tgSozzZ/qJpgbiRd593q7TWfylmIL7hFoUDoiMgZ2NCKkMGl31um9RWthNEVLUNnY9vKcYRRJxZzD2yYSRkJu9VyvDB2T8iUBpKcENYiEVN3j6BOzJmcK5Wr295HOv9AiUs52INhVuAeY0pHSV4sPSASsY8U/aXJA8M2sn/10VvAcN8zrYUOwWi9W72q9+4H8SOP7nj1bh1FDWcT8upi0j1vXlyeXjbPL7qd5vhs4jQ7zuvu2aTbJRPShTzdXFUnO2hU1cnRwlWV0karQGviw4Y8KWkeP5g6v+qKUtpmdavkYy69rIfTjJipbvkBcFBt6cPc7DZYHOSyfeWzcxR02p3zZvuy2XndP72wL07tzquT9uXp35AfhbbJZaeZbXKFgaTqcgsTRlW1wshQVe2QsMuF0Sq0TGQs88/30jKAA0cwCVXsJM8YVIppXN32IMOnQPvk9KRdisicMBY14qi7PMkg6mv0Xy6XpVkMLKC+qmggKfH/WH2BK8P86ZMgg7c56Ra4SpPRJP0hW5FHmKpcahELk48HYPLxKkcIVXRMTlb7SR4yzjCT2wNYLMZE0C/cWy7x8reYcky8Q5OaxujAAXp6lqTgBfxD52rlquA3VbVDcS/WKbdQ/LEwa40rx6GR3Co7zBSb25v7PlgwNu9M+6GLOpzg/vC3DYAvYEu1N3uhry3AI8E01jGhMfHnP27PgAo= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Commit Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/commit"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Commit Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_revision_commit":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionCommit"}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/commit-workflow-revision-by-variant-id.api.mdx b/docs/docs/reference/api/commit-workflow-revision-by-variant-id.api.mdx new file mode 100644 index 0000000000..1932d11137 --- /dev/null +++ b/docs/docs/reference/api/commit-workflow-revision-by-variant-id.api.mdx @@ -0,0 +1,5443 @@ +--- +id: commit-workflow-revision-by-variant-id +title: "Commit Workflow Revision" +description: "Commit Workflow Revision" +sidebar_label: "Commit Workflow Revision" +hide_title: true +hide_table_of_contents: true +api: eJztWdtu2zgQ/RVjnlpAjh0nTrt6Widp0Wy32yBJs8AGhkFLlM2WElWSSuo19O+LIamrL3VSB9iH9CG1qJkzw8MhecZegiYzBf4d/C3kt4iLBwVjD0RKJdFMJBch+BCIOGZ68uAsJpLeM8VEMpkuJvdEMpLoCQvBg5RIElNNJSIuISExBR8aJiwBH1Ki5+CBpN8zJmkIvpYZ9UAFcxoT8JdAksXnyGDoRYoYSkuWzMCDSMiYaPAhy1gIuVdaJBnnkI890ExzHLi1YTsXIeQ4jtGo0qciXGCIdvBAJJom2kRPU84CM//eVyUSHKtySyWyoxlVFsZysfqGZHou5L5mM7JouQch0XRHVDTtahbTrdDnCJh7EFOlyGwr9jaYT84999zCPw3mL2LShZCqQLJUO26fAnVeg8g9CCQlmoYTovdK35mF7Yw0BsnS8DmCfLGwLkhIOX2GIOcW1gUp6JoucOfuqYwLsk4XZl9WfO01SsFWGaUgbK9RCrrKKPdUql8o11vnnnugeDZ7Ksw1+uYe7G+idnYRNzfFGkgx/UoDDZVDcZe8Ny6r0Oaw0SQkunXakzBkuF0Jv2yepT/ngSWazqhsRounzZGpEJySxAytjwUBk0HGiXz1PuP8DyWS7kWSZvo1Tq8xXcRgmsa7OREpyWIry01XZHw13uaz17Fp74f1d+jGZTq3nmtWiUjNIhLoPe6akYN0e6aIsFvGhfP6bGtC4xk0RIn/OHIdxLqMV5Z41fuqkBfrjCsJc1fpkPFmkCurgCDPEU1SlYpE2Q026Pfxv8alC9dZEFCloox3rpwxPFkoBSKzTq39WrsbjIXJrNJUuxNdUbUT03XybG5bmXPTt9QdDwarbN0SzkLDReedlEI+naqQasI4fnLnS9uAi6Dx9jHH4zhvnUnVrP8UNkEjBtWstljl1lkj9qzJZlNDRucG3/5sHXBeNrSza2zFgl7L7uZpnFv6tm2vDzc3lyuAdm2bi3pmWp9OUQ+dssjMDTYX2B6lQmnT/Og5+NBLsXzpQ29KFO0VPZPqucND9ZbVMZX3bGsFHigq74u+KZMcfJhrnSq/1wu4yMIDMqOJJgeE9UjKoJ3myLztnKGpOcAUDTLJ9MLgjS4vPtLFB0pCKsG/G9cNrrEGbVU1zcoFJSn7SJFf187ZToT9a0vFdXRz64UEYnVfVb3Wux8kTjlt90pFdwRHEXk7jE6Ou8M3h2+6x8OTQXd6FAXdQfDbyVF0ckIicgJF1wOD/mDY7Q+7h8ObwyO/f+gPjw/6x2//gVr7UpWgy7h8bpJWDtcbg20R6tp+m11dnm+zaynsXaloSeadGWxq4F3dSlFb8WXVafX8GLhSRTI1CTKlRVw04ExN6D3hGdFYF+XYPItJYp+bsrEmdXDzsIDawUAkEZtl9vsLHGrrmF1TrUuTl0r69UraR9m0SqAl+nau6UrIvSzs/2Nh93IevGzzl2oojwaj5lgSCaNligbSCqVTEnyjSdi43voHhwf9TcrKOXRGlxdO1zcrxpoh1w3tVqo28IDGRtSDpiT+vXqBWaKCNPMo8bboztYXo06lafpD91JOmFHvJoulk6R34CQpeICiFDwoZWl1GOJHv/FVvdOmYw/mqHD9O1gu0f+L5HmOw98zKlFhjh3IFCm+W0LIFH4OwY8IV3Ql5bItgldXTv2/7lRflTSnUqjQZGFy5Rk+gQff6KL524LpbOaFyF06gzMbq2v6jwpgpR3DVsl6jIKApnqr7bim/i8/X98gse5nhViE6CMJso1/TbLCzN3+YIBjS+AkmWVWrlpM/Pcf4UpQfQ== +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Commit Workflow Revision"} +></Heading> + +<MethodEndpoint + method={"post"} + path={"/preview/base/workflows/variants/{variant_id}/commit"} +></MethodEndpoint> + +Commit Workflow Revision + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} +> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Variant Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowData"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowVariant"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowArtifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowRevision"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowData"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>service</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>configuration</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Artifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>description</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowVariant"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>description</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_custom + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_evaluator + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_human + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>artifact_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>artifact</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowArtifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + description + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + created_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + updated_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + deleted_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + created_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + updated_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + deleted_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "WorkflowFlags" + } + value={ + "0-item-properties" + } + > + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_custom + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_evaluator + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_human + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + metadata + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/commit-workflow-revision.api.mdx b/docs/docs/reference/api/commit-workflow-revision.api.mdx index aab7bf6f30..e20d567960 100644 --- a/docs/docs/reference/api/commit-workflow-revision.api.mdx +++ b/docs/docs/reference/api/commit-workflow-revision.api.mdx @@ -5,36 +5,36 @@ description: "Commit Workflow Revision" sidebar_label: "Commit Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJztWttu2zgQ/RVjnnYBOU7TNt3106ZJi2Z7C5K0+xAYAS2NbLaUqJJUWm+gf18MSd18q+04gNF1HhxI4pwhh8O5HPAeDBtp6N/AP1J9jYX8rmEQgMxQMcNleh5BH0KZJNzcfvcjbhXecc1lCgFkTLEEDSrCuIeUJQh9qEbeMcVZam55BAHwFPrwLUc1gQAUfsu5wgj6MRMaA9DhGBMG/Xtg6eRjbOHMJCM4bRRPRxBALFXCDPQhz3kERVCNSHMhoBgEYLgR9KJcTeezm0HnPIKCBpBe1OaljCakq56GUTkGEMrUYGrsNLJM8NBaofdFy5Te1ZPMFNnIcNT0NGuaxUMaNnnMxQawfUVt/GpFj7ASp4Epw2MWbnMJJx7Sa4iFdf8mdnvbuL4Nc21kMncCQykFsnSpxnPdOXUIRUBweMdEzoxUD0F8VYE40HGesPQhgG8sQFEE5SA5/IKhgdm9eW1NNgtXBJCgmTrBLIo4nSAmLlpmXbSVDVieGhyhamtKhu03zdXN1wUhV2EumPrtdS7E31qm3fM0y83vML1UwuAGk9WEmFJsstSqbVGYMe0y2fdkSZKYcc9dsugH+Y5r8zObLlrjtPR6Frp2XuhTzkrrn50ByRYBRKhDxTPjA/cmUGcNiCIALfLRplBXJEuzYtOnqR2a7lDpB8z4sxcvAsgV3xTlk+IOQWyOIAhhjCyyZcR6zv5YJtnGBm4va9nqZXFovsQYFaYhNkHKiQ7WOlZv/DYUZUW26o7sUFjavUC/xgZceatTOmVZxtNVE8C0fdfJNqUiu+sUxjZ2fSddtDuDXc1fu+coi2UvanvSLqG64yGuYlrX2KzhgB66sN1QzEe5awUfQ9dpS8Eq1eelb7DOmC2Q5hahWrPRxjXBey++zmRObYM8V6RuMG/mdIlzWp825qVrV6EoCFyhzmSq3YE5Ojykf63aBa7yMESt41x0Lv1g2LirDWXuhKbOX3P/aAQVUDHLhYH+YbMvbDbDizL2vi3exbaY5Wa8oEHdBNyhuZJ26cFsoNLQruEJLoU+I8AtHvo9I/C/ZAQ+5maDAmBGao0KwMn+4qTAMrOuwApsYqPdpgVChcxgdMuWFthrR8FTB9s5scbKs+gxlHxysF5JhAIfQcmZg/VKSnMNJ1tMdaWxXk58sivttVUtpbUqLaXBtqqlNFel5VcmQPaM2J4R2zNiv06hsyfFdrJ+20lf2fNiD+TF1oB4oHjFOznO6tnR0SxN9ZkJHtnFdV4pJdXmHFWEhnGbab1LTg8QMmx9XedINRKF8+J61e9kyMqqPtGj2Vgzl1xwQxYPtcboXNPXn5GJtC6n2o9rEVKleZ11Fy/jzJlv2f6+ub6+mAF0e9veVMdYdiqy6rK+JpSgGUu6SpRJbey1ITOGPvQyogjxe6/kzHSv5Ax1z906AnemywtGtqqCsTGZ7vd6oZB5dMBGmBp2wHiPZdweI41hrriZWJGTi/O3OHFZHPo3g+YAm1ecn7SHVVvEMv4WyWL+apPjsvi/bvP9pSZXqVkrkr9e1neMXv1gSSZw4R2hufQnPI3ZH8/j42fd5y+evOg+e3581B0+jcPuUfjn8dP4+JjF7BjaTOaqMi12clWhFuG4qlBFpDUIMxcH25RX9c4zVvRcM0c13VE19fWxaftf9dpVqo1hvm2oauH6k63zm4+i+VhX4K3ir12FNMqDWrKV6Ft5aU76KJoEZhWPqFxOY2l9sSRSrad3Ti7OodHqweHBk4PDGXO0BlN0ZaGNrqUj28/VmssjVR0mCAATG1rBIEv+qj/QzOgce37R4y05/VM8ij9ZBn+YXiYYTxvtkgsMN+ADQ8NhtY1/PjjYFdnwMAhgTDGlfwP390Om8ZMSRUGv3U1DigAR12woGncNv+Jk4S1Fckyang0k9suQbH8zqDoyi+kgTl3S6tqIXcvOJDBKLk7iJAwxM0vHDhrx8uLj1TUEMPTXFRMZkYxiZBn67QPQbU1jjUL3GendPQiWjnLnTg6T/v4DHI5mOQ== +api: eJztWW1v2zYQ/ivGfdoAOX5JnG76NCdp0azbGiRpBswwAlqibLaUqJJUUs/Qfx+OpF79Uid1gH1IPiQ2dffc8eGRfE5ZgSZzBf4E/hbyS8TFo4KpByKlkmgmkssQfAhEHDN9/+gs7iV9YIqJBDxIiSQx1VQixgoSElPw4YFIRhJ9z0LwgCXgw9eMyiV4IOnXjEkagh8RrqgHKljQmIC/ApIsP0YGRS9TRFFasmQOHkRCxkSDD1nGQsi90iLJOId86oFmmuPAnQ3cuQwhx3EMR5U+E+ESQ1TRtcyoB4FINE20iZ6mnAVmzr3PSiQ4VuWWSmREM6osjJv/2hOS6YWQh5rN2KLlHoRE0z1R0bSrWUx3Ql8gYO5BTJUi853Yu2D+dO6555b+eTB/EZMuhFQFkqXacfscqIsaRO5BICnRNLwn+qD0nVvYzlhjkCwNXyLIJwvrgoSU0xcIcmFhXZCCrtkS9+6Byrgg62xp9mXF10GjFGyVUQrCDhqloKuM8kCl+oFyvXPuuQeKZ/Pnwtygb+7B4SZqZxdxcztsgBSzzzTQUDkU98c747IObQ4bTUKiW6c9CUOG25Xwq+ZZ+n0eWKLpnMpmtHjWHJkJwSlJzNDmWBAwGWScyJ/eZZz/rkTSvUzSTP+M02tMFzGYpvF+TkRKstzJctMVGV+Pt/3sdWza+2HzHbp1mS6s54ZVIlKziAT6gLtm7CDdniki7Jdx4bw525rUeAENUeI/jVwHsSnjtSVe974u5MUm40rCTCodMt0Ocm0VEOQ5okmqUpEou8GG/T7+aVy6cJMFAVUqynjn2hnDs4VSIDLr1NqvtbvBWJjMKk21P9EVVXsxXSfP5raTOTd9S93JcLjO1h3hLDRcdN5KKeTzqQqpJozjJ3e+tA24CBpPn3I8TvPWmVTN+g9hEzRiUM1ri1VunQ1iz5psNzVkdG7x6ffWAedlQzu7xlYs6LXsbp/GhaVv1/Z6f3t7tQZo17a5qOem3ekU9dC5rtqdmOqFwJYoFUqb9kcvwIdeiuVLH3szomiv6JNUryhq1bMtFHigqHwouqVMcvBhoXWq/F4v4CILj8icJpocEdYjKYN2amPztHOOpubQUjTIJNNLgze+uvxAl+8pCakEfzKtG9xg3dlKapqVi0hS9oEip66Js90H+9eWh+vjFtYLScOKvq76q7ffSJxy2u6Pio4IjiPyyyg6PemO3gzedE9Gp8Pu7DgKusPg19Pj6PSUROQUik4Hhv3hqNsfdQej28Gx3x/4o5Oj/mjwD9RalqrsXMbl9yZp5XC9GdgVoa7nd9nVJfkuu5aq3peKlkzem8Gm7t3XrRSyFV9WkVbfnwJXKkem7oNMaREXTTdT9/SB8IxorItybJHFJLHfm1KxJm9w87CA2sFAJBGbZ/Y9BQ61tcu+qdblyGsl/XglHaJsWiXQEnp713Ql3l4X9v+xsAc5D163+Ws1lEeDUXAsiYTRMkXTaIXSGQm+0CRsXG/9o8FRf5uycg6d8dWl0/LNirFmyHVDu5WqDTygsRHyoCmJf6seYJaoGs08SrwdWrP1MtSpNE2/6V7KCTOK3WSxcjJ0Ak6GggcoRMGDUopC1WEpMzEjR6ceLFDI+hNYrdDlk+R5jsP2fT2KypApMuO1N/Zf6LL9ih8XDJMzktQ8meEqTLDvWBRydOU8z22D1DXdQeW71ixhI2M9xkFAU73TdlrT5lcfb26RAvfSPxYh+kiCvOBvHwD/w6ENFyhXcWwFnCTzzApLi4k//wFljCnF sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Commit Workflow Revision"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} - path={"/preview/workflows/revisions/commit"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/preview/base/workflows/revisions/commit"} +></MethodEndpoint> Commit Workflow Revision @@ -43,29 +43,5401 @@ Commit Workflow Revision as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow_revision":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionCommit"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Variant Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowData"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowVariant"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowArtifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowRevision"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowData"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>service</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>configuration</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Artifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>description</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowVariant"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>description</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_custom + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_evaluator + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + is_human + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>artifact_id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>artifact</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"WorkflowArtifact"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + description + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + created_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + updated_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + deleted_at + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + created_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + updated_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + deleted_by_id + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "WorkflowFlags" + } + value={ + "0-item-properties" + } + > + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_custom + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_evaluator + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={ + true + } + className={ + "schemaItem" + } + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary + style={{}} + > + <strong> + is_human + </strong> + <span + style={{ + opacity: + "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: + "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={ + "MOD1" + } + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: + ".5rem", + marginBottom: + ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong> + metadata + </strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-add.api.mdx b/docs/docs/reference/api/configs-add.api.mdx index 3fbcb17ae9..c966bf55eb 100644 --- a/docs/docs/reference/api/configs-add.api.mdx +++ b/docs/docs/reference/api/configs-add.api.mdx @@ -5,36 +5,33 @@ description: "Configs Add" sidebar_label: "Configs Add" hide_title: true hide_table_of_contents: true -api: eJztWd9vGjkQ/lfQPC+BkoTe7dPRa6VGbRWUkLwghAZ7FtzbX7W9affQ/u+nsRdYoJCKqrpGghcWe+azd75v7LFZgsW5gXAMj6gVptbAJIAsJ41WZemNhBBElkZqbqYoJQSg6UtBxr7JZAnhkjstpZYfMc9jJZxf57PJUm4zYkEJ8lOuGdUqMvzryY821RTtd5q4mDvAtLyNIBwvwZY5QQjGapXOoQrWLWkRx1BNArDKxtxwz75VAE+kjfJz2INRqaU56aM4j7V/FYDIkkTZaULG4JxOndjfDqX1qUapAlDyGFYAUaYTtBBCUSh5FPtGQlUFq+5s9pmEhU33HUWkKRV057n7lEmKeQYNxs5M/I9MfMeD00xpkpyazWTZJ60xOifltJmuFUNvoKwuyDWYPEuNp7jX7fKXJCO0yq1jCu4LIciYqIhbd7UxBKfmeo4aE/eEUip2wXjYsOBZHQ7Z0HtXARQ6PpXyB31I7xu0s/J/hfKbOlayKdZ1Lrwd3X4HuQrAkH5Sgs5U/f5U7eznZ6p+X6oofVI6SxM60/US6GruWbGKSJQipmOkCU1oSU7Rnhwhj9AaWLft5vIn8R48wg7erJweD/yPQL4pWxzzJurPQx4t4T7SHEX5ccXEs5vXmbOXw9lqFztz9nI4a25nZ95eCm/PbJL1kXFr1+ZT7eowujo3M85Vr7d/gH3EWEm3abbeaZ3p00+vkiwqd/BUlvwxdtsgzsRW7w/Edl33TDZxQK2xbMYx8xNk8hLjyrDdumRl2ihlvMlhUxeM1oh7n+OA38sPXds1i7J1eH10D7/GWx++Y4p5PxoN9wA9t9ukeg2Y1sBdRCZkFxnfT+aZYbgc7QJC6NSLuOnUFyEdf2/J+zFp44hxNwmwsDY3Yacj4qyQFzin1OIFqg7mygnfkCi0sqVzGQxvPlD5nlCShnA8aRrcs3S8GLbN1jxgrj4QhyXFhH8PCrvItPrXMxyA4tdbeC9+bxbl3eai9d03THK/qu0ctHyFvuF5XW1398vljRWvK3AZ4R/XUf+qff361ev21XW/155dRqLdE3/2L6N+HyPsH7g0+eWjclGeRpmLYK2SgeOnNRjeNAeE7sWriy7sKmXLmBMfhUv8VfhdNwQ7QlhLAAKgxGU9WMLkr00Hz4z1lmDawNsW5tZU1hKw9M128hhV2rjL8ppd3/AZP1vG4os+6Y4KC5Z3OIblcoaGHnRcVdz8pSDN0pzUZcuMozTmBWWxEukS/qHST49XvrZLezaPCy/KnVWQVyjvMRCCcnvUdtLIwOHt/QgCmNX/CSSZZB+NX3lJwa8QAvCfCuztssS1LSHGdF54kXhM/vwH+GRdvg== +api: eJztV99vGjkQ/lfQPC+B5ge926ejP6RGvSoooXmJUDTYs+B2197a3rQU7f9+GnuBBQI5RYnu5Xhh1575bOab+WZYgseZg/QObtEq1N7BJAFTkkWvjL6UkIIwOlMzd49SQgKWflTk/DsjF5AuedOT9vyIZZkrEfx635zRvObEnArkp9Iyqlfk+O0hnnZvKdvfdHk1C4B6cZVBercEvygJUnDeKj2DOlmv6CrPoZ4k4JXPeeGGfesEHsg6Fe+wB6O0pxnZozi3jX+dgDBFofx9Qc7hjJ57sfcBpfOlQakTUPIYVgKZsQV6SKGqlDyKfSmhrpPVtpl+I+Fhs31NGVnSgq4jd1+MpJxv0GLsfyb+QyYe8eAyU5Ykl2a7WPZJa53ORXnfLteaoTdQ3lYUFlxptIsUn/b7/CXJCatKH5iCm0oIci6r8s51YwzJc2u9RItFeEIpFbtgPmpZ8K0Oh2wUvesEKps/l/Kv9lC+76E9yoCS7TCvWfwwvnrk2DoBR/ZBCXrdQ3Y09HUOIf2grNEFvfZBbW5ylZFYiPzxEt9Lkb9X5k/y8eLAKw5eHLgd9xcGf0JtmnLdEkxWlJUQrDSLcc5PT/fF4xZzJQORnY/WGvt85ZDkUYWiV56ihGwb5EZs7f4LbVi3nMkmDmgtLtoRNPGCrBmFCx1wtyWsTFtdJJocNg3B6Ix59ykO+HfFoxu7dj9chzdG9/DP+BDDd6whfRqPR3uAkdttUmMOuM4wDIEF+bnh2bA0juFK9HNIodeUg+s1TagXZ0YuP7IuEBNUHObely7t9URuKnmCM9IeT1D1sFSwe/Qw7Hbes2lQdUeissovAt5wdPmZFp8IJVlI7yZtgxvOq5gp22ZrkrBUn4ljprHg92Hl58aq35H+BBRfYB69OCicsdebCfjjLyzKWJc7ahwnp00SrKeg/v4Ys7HiQQTOMvzjIhucdy/evnnbPb8YnHanZ5nonoo/B2fZYIAZDg50s1c/lYclnZkQwSaFGnreofhOWrYPhf7Jm5P+IT4bh85wdNkoBIqgECsqghkkOxmzzhVIgIogD+AJi782G3xLTswCdQtvO4O3rrROB0+/fK/MUenWwBGTez2GuXhbxuJpTIY+N+c6SO9guZyio682r2te/lGR5TSdNJ1iyhG7Y+WZrxJ2Cd9pEa/HEtkN+sDmeRUTdEcuWcqix1AIKv1R20mrVEdXN2NIYNr8cSuMZB+LP1l78CekAPzPj71DxYS1JeSoZ1VMmIjJn38AtvDYmQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Add"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/variants/configs/add"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/variants/configs/add"}></MethodEndpoint> Configs Add @@ -43,29 +40,1921 @@ Configs Add as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"application_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"}},"type":"object","required":["variant_ref","application_ref"],"title":"Body_configs_add"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + variant_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + application_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-commit.api.mdx b/docs/docs/reference/api/configs-commit.api.mdx index 84fce6c351..fe9e7dec4a 100644 --- a/docs/docs/reference/api/configs-commit.api.mdx +++ b/docs/docs/reference/api/configs-commit.api.mdx @@ -5,36 +5,36 @@ description: "Configs Commit" sidebar_label: "Configs Commit" hide_title: true hide_table_of_contents: true -api: eJztWttu2zgQ/RVjnuXYdRK3q6d1L0CDtoiROHkxDIOmRjJb3UpSaVVD/74YUrLlS5zCRYJqobxEpmYOqTnUzBxJK9AsUOBO4Z5JwWKtYOZAkqJkWiTxlQcu8CT2RaDmPIkiocEBid8zVPpt4uXgrui8xljTIUvTUHDj2vuqkpjGFF9ixOgolQSsBarSzRfB/njKJIvMEfM8QVAsHNcstMzQAZ2nCC4ki6/IaU1a6JAGxta7cCCToQGJ82sf3OmqclFaijiAwlmPxFkYQjHbgNzJkBBqVzOX6G+jbS9ahVlw6my35Fs48IBSCRuzPRgRawxQHsW5L/0LByxV8wiVYgGeurB3BqXzpUQpHBDeMSwH/ERGTIMLWSa8o9hXHhTFPo20tYREj3ak8KDmcIM+Sow5vp9cH0AuHFAoHwTHlqq/n6oHm2xaqv5+qjB+EDKJI2zpagJd9ZoVCh95zkM8RhqXyDR6c6ZPjpBF6Iy0Kbup94d4dxZhB2+Rz48H/ncg3+Ydinkd9c8hD3JYmX3GgPH8c8XEk8Wr5aw5nFVVrOWsOZzVy1nLW1N4e6JIlpJxq2qTuDRoT/iWMnTP98aKXCgIYONA6tMMqDSJld0ig36f/nmouBSpNu0L3Gaco1J+FnZuSmNwTtXKrSZu28FWE/+/qWo1cWOoajVxo+hqNXETe75WEzeRs1YTN4+zVhM3kbcTNXElRr8kHoakbgsHLgaDfQF7z0LhmaLZ+SBlIk9Xrx5qJozwFBqtjN02CBO+dfY3Yrvue2abODApWV6PY2IXSORFyrRhu31JZVprZazJ46YmGJ0JnX2KA7ouO3VpV2/K1uG10X38Mt7b8B3bMR8nk/EeoOV2m1S7B1TnXfUuP0K9TOgtf5oo+p0yvQQXemUeV73y7X9v/fafqjJKZegxzxNgqXWq3F6Ph0nmnbEAY83OmOixVJjtr5BnUujcuIzGV58w/4jMQwnudFY3uKUNZLfEttmaDZaKT0jBiVlEv0eZXiZS/LI8OyDoIpfWi66etubN5nOFDz9ZlNrcVvv8oHq4Uj0g2XB+4GmHbeg3JuvmvL/fXW+sKA3Buc/eXPrDi+7l61evuxeXw0F3ce7z7oD/Mzz3h0PmsyHsi/YXmHFHe77AjAck1AvM+qgSqFe0DXa9Lu2PltXl0Il6yjrcxj7nhAd7sOec8NEG4vkmpZtbxH5ickOZBUcm83RG46v67oH+2auzPuxmwi1jKmyMm8JWJRZzGpydFLdObuAARqaqgUYW/bs5QSujZBqxuIa3l3i3VrPObxp/6l4aMhHXHtfanDyteFV2wQQH1Z1BlWVJGdydwmq1YArvZFgUNPw9Q0mpd1ZujAXFakplc1kl4RV8w9wukup71xQ3Mg8zm3R3aj3VYesx4hxTfdR2Visy4+vbCTiwKL8cixKPfCT7QYWT/QAXgL4+I29TBczYCkIWB5m97y0m/f0HI34x3Q== +api: eJztWFFvGjkQ/itonpdASULv9uloWqlRrwpKaF8QQoN3Ftzuere2Ny2H+O+nsXfBBEhOVYh0UnhhsWe+8c54vm/ECizODcRj+IpaorIGJhEUJWm0slDXCcQgCpXKuZmKIs+lhQg0/ajI2HdFsoR4xfuWlOVHLMtMCufa+WYKxWtGLChHfio1A1tJpnZL5Xx/vUSNuXvCJJEMhdkwsLC6ogjssiSIoZh9I8FnstJmvDD03usIKp05ELW8SSEerxoXY7VUc1hHmxVVZRmsJ1uQLzpjhOBtpprSg2ibA3BSpKaEcykTCNBuKSVNStD70c2BsOsIDOl7Kei0Qe59gU8bhNS91IXK6dSBwtpkMiWxFOz5WLgG/O/G/Ml6PDtwU4NnBw7z/szg6/1mCwtXt2tQvCvX2A7tCd+aAvZ8bz3BwJoBtg7c+W7BlIUyni163S5/JWSEliVfB4jhrhKCjEmrrHVbG0P0uzz1ykevfPTKR/97PmqI4HORUMbMso7gotfbJ4+vmMnEFbL1QetC/z5zJGRRuqaXljyF7BpkhdjZ/Q/cIJWlOWmf5XoNtcZlmMHCH5A5IzduxNrF25p+JmNwTrABO27qktEa8e5TNeD38qFru6Aa2/T67B5/jfc+fYeCNSYfR6PhHqCv7W5R/R0wratmhs3JLgqebsvC8O8S7QJi6NQdYTr11NvZTL3chKSNK4/jclhYW5q40xFZUSVnOCdl8QxlB0sJDw8wcLutKzZ13G5IVFrapcMbDK8/0fIjYUIa4vEkNLjj2+Xvy67ZplRYyk/EmVOY8+9BZReFlv/4SxCB5AMsvBenhu/t7XaG//AL89J3ZzCTN6rXKNf2QhyQIZNV89CEE+Xeu8vNwwmc5vVNC6wk5/88xT8u0/5F+/Ltm7fti8t+rz07T0W7J/7sn6f9PqbYh31NeoGIDwTqBSIeUKsXiHpUuoQmtJRM0YbYVZk8sjpbTl3wAxshnx2WtFMGPCh1pwx4VAJPF5SbW6q0cNxQU2RNPO9QfCeVhDcIumdvzrrHmKp2aA2G17UConAK2JCMM4PoARduWBAioNzJH1jC/K/tBp+SWTdHFeDtMfTOqTZcZ+mX7ZQZShXM1J68x02NjT8ww0HTJSxBC6b6eAyr1QwNfdHZes3LPyrSTMOT+pLMOG9j1tdFQ8gr+E5Lf0geBNpOBdk8qzwBPxgKWLC9x0AIKu2jtpNAjYY3dyOIYFb/tZIXCfto/MkKiz8hBuC/Z9jbKYJbW0GGal55DvCY/PkXTc0ZEw== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Commit"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/commit"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs Commit @@ -43,29 +43,2931 @@ Configs Commit as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"config":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigDTO"}},"type":"object","required":["config"],"title":"ConfigRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>config</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-delete.api.mdx b/docs/docs/reference/api/configs-delete.api.mdx index 2930054eab..f25c7100a9 100644 --- a/docs/docs/reference/api/configs-delete.api.mdx +++ b/docs/docs/reference/api/configs-delete.api.mdx @@ -5,36 +5,36 @@ description: "Configs Delete" sidebar_label: "Configs Delete" hide_title: true hide_table_of_contents: true -api: eJztVt9P2zAQ/leqe3ZpKVC2PK37IYEYAlHGS1Uh17mk3pw42A6sq/K/T2enadpCxyZNe1lfmvjuPp/v++6cJTieWogmcMeN5LmzMGWgCzTcSZ2fxxCB0HkiU3sfo0KHwMDgQ4nWvdfxAqIl2R3mjh55USgpfGjvq9U5rVkxx4zTU2EI2Em09PYYNrw3mOwarSpTD5gvrhKIJktwiwIhAuuMzFOoWLOSl0pBNWXgpFO0MKbYisEjGitDDjswMneYotmLc1fHVwyEzjLp7jO0lqf4p4l98CidyxqlYiDjfVgMEm0y7iCCspTxXuzzGKqKrcx69hWFg7X5BhM0mAu8Cdxd6hgVZdBibMXEOp3/nPwLTrYBn8OgFpQGY+rcdiO1dqf2vN/q3Yqw1rHOlOgXbKFzG1ge9Pv0F6MVRhbOkwXjUgi0NilV56Z2Bvb6xt8iuF2CANb5EPLsfGzyrBgcDwa7qdxxJWO/UeeTMdr8Th6beo7RcanoSTrM7K6D0mLD+gp9NRqerknjxvBF69CfdUiQxJbZtFWgRmMr15Ysg8vLrr4YnVuy/kowdK6wde3XbrCmvKG6Lx/jYyjfPoWf3d5e7wAGbjdJ3aKfQYZurunyKbQlxIK7OUTQq7Vue7Wwe82lZNHQcPH0lEZBBHPnChv1ekLpMj7gKeaOH3DZ44X0bWpRlEa6hQ8ZXZ9f4OIMeYwGosm07TAmAQVJbLo1bPBCXiAVJ+cZvY9KN9dG/gg8M5B0yHmIotOTNG/Wt+in7zwrFD5zK4aZu2a7mZ/93QG49qIRBkcJf3OSDI+7J6eHp93jk+GgOztKRHcg3g6PkuGQJ3z4wg3w13elMZsn2lew1srI89MZXZ+3N4T+weFBH7b1suFM7c+Fb/9V+b0Z2JYQGgkAA8x874NDnr1bGygzklzG8xbejjw3smlU4PC76xWKS9/afu9lrdxmStuQMMF5HA84ZTAnnUcTWC5n3OIXo6qKlh9KNCTQKQsAM6rVhIbLfCXVJXzDRUiSpmDXjwByV2WQ5tZEpGkVIkZCYOH2+k5brXh9Nb4FBrP6sy/TMcUY/kTjhT9BBECfjhTte8WvLUHxPC2DVAIm/X4C1tmP1w== +api: eJy1VlFv2jAQ/ivonk2htGVbnka7Sau2alXb9QWhyjiX4M2xU9vZxlD++3R2CAFa1k0aLyS+u8+f7z5/sALPcwfJFO65lVx7BzMGpkTLvTT6MoUEhNGZzN1Digo9AgOLjxU6f27SJSQrinvUnh55WSopQungqzOa1pxYYMHpqbQE7CU6evseN3ywmO0HnaryAKiXnzNIpivwyxIhAeet1DnUrF3RlVJQzxh46RUt3FJtzeA7Wicjhz0YqT3maA/i3Df1NQNhikL6hwKd4zn+K7GLgNK7alBqBjI9hMUgM7bgHhKoKpkexL5Moa7ZOmzmX1F42IRvMEOLWuBNnN2VSVERg87E1pPYo/NitF16TzEi8UiLKWmuK4HOWUhYDzuqqwlrU+tthWHBlUa7qJnRcEhfKTphZenD6OG2EgKdyyrVu2mSgb1csjty6bYggvUuIs/eu5ZnzeB0NNqncs+VTMNGvffWGvs3PLZvR4qeS0VP0mPh9hOUEVvRF6i1vRGzzdC4tXzZOfQnEwmScAqXdxrUKnad2hF5THk+NTSjd0fRPwmGzhW3bvK617Vtb+zu88d4F9t36L58uLu73gOMs90e6s74GRToF4ZsszSOEEvuF5DAoNG6GzTCHrR26tCSVYXxVFZBAgvvS5cMBkKZKj3iOWrPj7gc8FLCLoFJiPYuKDU4gkNRWemXAW9yffkRlx+Qp2ghmc66CbekrqiX7bR2VLyUH5E6p3lB75PKL4yVv6IIGEgisIhV1BrS7c3mx+H9T16UCp8w+2jvGym0Vj3c99pNFrklnGT89Vk2Pu2fvTp+1T89G4/685NM9EfizfgkG495xsfPGNt/35UcXWcmdLARUjOecy6+oU67m8Lw6Pho+Nw8m4Le5Pqy8Qkugk+sRxHSgO0optUKMMAimAR45MXbTYBYkjYLrjt4ezreYtUqwuNPPygVl8EDwt6rRuKtnbtImOACTgCcMVjQhUimsFrNucMvVtU1LT9WaEmsMxYB5tS3KbnQYi3bFXzDZSRJdtkPXkHpqooy3bFOsrVYMRECS38wd9a5s9efb++Awbz5Z1OYlGos/0E+xH9AAkD/jqg63JuwtgLFdV5F2URM+vwGewsv2w== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Delete"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/delete"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs Delete @@ -43,29 +43,470 @@ Configs Delete as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref"],"title":"Body_configs_delete"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"integer","title":"Response Configs Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + variant_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-deploy.api.mdx b/docs/docs/reference/api/configs-deploy.api.mdx index 3b8596193d..f1bb51d0aa 100644 --- a/docs/docs/reference/api/configs-deploy.api.mdx +++ b/docs/docs/reference/api/configs-deploy.api.mdx @@ -5,36 +5,36 @@ description: "Configs Deploy" sidebar_label: "Configs Deploy" hide_title: true hide_table_of_contents: true -api: eJztWVFv2kgQ/itonk2gJKF3fjraVGrUVkEJyQtCaFmPYXtrr7u7Tusi//fT7BpjICEV1TWJRF4Cu7Ofx/PNzM4MS7BsbiAcwx3TgqXWwCQAlaFmVqj0MoIQuEpjMTfTCDOpCghA47ccjX2nogLCJe1bTC19ZFkmBXdHO1+NSmnN8AUmjD5lmoCtQEPf7v0Dpxrj3U0j87kDTIurGMLxEmyRIYRgrBbpHMqgXklzKaGcBGCFlbRwQ2fLAO5RG+F12IERqcU56r04d9X5MgCukkTYaYLGsDkeqth7h9L6UqGUAYhoH1YAsdIJsxBCnotoL/ZlBGUZrLbV7CtyC+vta4xRY8rx2nP3RUUoSQNM74VWaYJHJp6ZiUbsrJhYq3Pk5Dk42QZ8CIOSodAYUQ5tprTd0GroQ6lzupVXS0Jfo1mdo1swmUqN573X7dK/CA3XIrOOPrjJOUdj4ly2rithCA5NyhnTLHGfWBQJOsLksCFBWj1ux6E/XQaQa3moH9zqYzg8Tzg0XVlETX+tA+RidPVQXARgUN8LjkeqXj5VW4XXkaqXS9UD1dmRrpdLV/POkiJGXnCJ+0jjGpnFaMrswRbyCK2BddduFv0m3q1H2MKbFdP9hv8VyHdFi2zeRP19yL113WecM158XjHx5OV15Oz1cLa6xY6cvR7OmtfZkbfXwtsTl2TVMm7c2tTYrprRqpl27e1Zr7fbwN4xKSJ3abY+aK304d1rhJYJ13gKi76N3RSQim/s/oJt67pnsrYD05oVTTsqryCRlxhXhm3XJSvRRinjRR4XdcZojWj3KQ7ovfyjK7lmUVab11v38de48Obb5zEfR6PhDqDndpNU7wOmdbEaGidoF4rGyZkyhJgxu4AQOlUeN51qHNKpx8x0K6M2jh43T4CFtZkJOx0uVR6dsDmmlp0w0WGZcO5vkOda2MIdGQwvP2HxEVmEGsLxpClwQw7kXWJTrGaDZeITkhYpS+j7ILcLpcVPz3MAgl5y4U/R25NrXq/n4h9+sCTzuW2r3fJ1+prtuubu7hbNaynKLnAas7/O4/5Z+/ztm7fts/N+rz07jXm7x//un8b9PotZ/5GZ7h946gMDm//9qdQQpLFyvFUeOnBe0RoML5sPhO7Jm5MubHvphjAlHcZd0lmR7rYh2HK/2vFoyJe4jAMWWfLPeoM0I0dPWNrA2wmKDW1q37P4w3YyyUTaGKX5eKlnjMYrTHAOxwFOAlhQdIVjWC5nzOCtlmVJy99y1BQWk6pwmpGtxpTSFqsAWcK/WHglKfe2XeIhcZn7gNjKw5Qj/YkB55jZvbKTRgIYXt2MIIBZ9fNRoiI6o9l3SmrsO4QA9BMUnXYR6taWIFk6z72reEz6+w8CURwP +api: eJztV01v2zgQ/SvGnOXYdRJ3V6d1mwINukWMxM3FMAKaGtlsKVIlqbReQ/99MaQky5/pBsnuZX2xTM48jmbePI7X4NjCQjyFe2YEU87CLAKdo2FOaHWdQAxcq1Qs7EOCudQriMDg9wKte6eTFcRr2neoHD2yPJeCe9feV6sVrVm+xIzRU24I2Am09OsxHPhgMN3ftLJYeEC1ukkhnq7BrXKEGKwzQi2gjJoVVUgJ5SwCJ5ykhTvyLSN4RGNFiGEPRiiHCzQnce4r/zICrrNMuIcMrWULfG5g7z1K53OFUkYgklNYEaTaZMxBDEUhkpPY1wmUZVRv6/lX5A4227eYokHF8TbU7rNOUFIEqB6F0SrD/yvxH1ei1Tt1JfbC+WW03fAORURtLAwm1P3tZtwnRevtqOkfdhShJPQNmjMF+gWba2UDiwb9Pn0laLkRufNkgLuCc7Q2LWTntjKG6LlykjPDMv/EkkSQC5PjlgVFdbwq4+BdRlAY+VxWfTH/vJDtIoiknemmtFeTm0MVjcCieRQcX/eQHZl+nUMOqNDrHNSujRQp8hWXh1VkjyJ/1uZP1uPFgesavDhwO+8vDP6E4FTtuqXJJCq1EFRC5qXlYjDYF497JkXiC9n5YIw2z1eOBB0TvumFwyAh2wZS863dX9CG5labbfLAjGGrdgZ1CJA0I7P+kt29dWrT1kUVTI6b+mR0JrT7VA3ovcLRlV37ym3SG7J7/DWuQvpO3XkfJ5PxHmCo7XZRAwds56oeNTN0S01DaK4tIebMLSGGXtURtlddRb1mOKUmRGN9ebyWw9K53Ma9Hpe6SM7YApVjZ0z0WC5gN4CR3+28J1Ov7RZ5YYRbebzR+PoTrj4iS9BAPJ21De6IXYEv22ZNqVguPiGFqFhGv0eFW2oj/gokiEBQAMvgRakh3t5uRu0PP1mWh+7c0eQwom2o0Ixb/f15aWNFEw+cp+y3y3R40b18++Zt9+JyOOjOz1PeHfDfh+fpcMhSNjwyJv4Lpx64SV/9VJoFVap93Sr6VqR4x/g3VEn7UOifvTnrH2NR5dAZja8rdWLcq1NNAG8G0Q5PG4bSJJZ5aQKHLPtjs0FRUkdkTLXw9rpnK6qGhw5/ul4umVCteSc0VjMI2hAwwXkcDziLYEltGE9hvZ4zi1+MLEta/l6goRaZVXfVnPI2Je1b1s2yhm+4CkGSSHe9QpG5LEJz7Ag2iWnwGHGOuTtpO2spxfjmbgIRzKt/p5lOyMewH6R+7AfEAPQPl7x9t/q1NUimFkWgTcCkz9+ykyhf sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Deploy"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/deploy"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs Deploy @@ -43,29 +43,2036 @@ Configs Deploy as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"environment_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref","environment_ref"],"title":"Body_configs_deploy"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + variant_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + environment_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-fetch.api.mdx b/docs/docs/reference/api/configs-fetch.api.mdx index fcf353689e..d6eede6c4b 100644 --- a/docs/docs/reference/api/configs-fetch.api.mdx +++ b/docs/docs/reference/api/configs-fetch.api.mdx @@ -5,36 +5,36 @@ description: "Fetch configuration for a variant or environment." sidebar_label: "Configs Fetch" hide_title: true hide_table_of_contents: true -api: eJztWVFv2zgM/isCX7oBbtN1W3dn4IDrtg4rtqFB2u2lCQpFomPtbMmT5La5wP/9QMlJnTTLhg43tED6UkciKZIfRVLSDDyfOEgv4Au3imvvYJSARCesqrwyGlJ4h17kTBidqUltOY2yzFjG2VXkYcYy1FfKGl2i9ntDPdTHyudo5xSXFjN2OuhShaGydp6NkVXWXCmJkj1RGdMYeZVbjCdDzZnEjNeFvyPkWvmcuaKe/DWEyhpZC1JxCOxaFQVJrx3Kp0Grd6QpFzmzmKFFLZCZ8VcUnj3paJqsLpEwXlWFEsF2GniaDvUu60ftWKvvDumwQ87YUXKHZQoLSWQ7V2idMnqHLDLBq7xgXEsmuCb9HHrmDdN1URD9SRYFdO1nyi+Zw6SyKHwxJcYsAORzZBadqa1AEnNKSl0rh8lcsyUBvDB6En23Yhw5aoC+ttqlQ80YY28C9gN0ldEOPxmJRcrOc1wTFFGLbzU6j3JTgAy4cjhf4P35ef/4RmBwTkoe8HekK8e08SwztZZ7kICpMM6cSEgh0rrL4AtIoNXhtZFTSGc07VF7+uxY2/vqKMJn4ESOJaevypJcr9DRr05QBFY9Pc0gvVglI/cuz/tphZCC81bpCTTJYoRAhmaUgFe+oIEz4m0SaINkrRilPU7QbpTzpeVvEhCmLJW/LNE5PsH7KvYmSGGfWilNAkpukpVAZmzJPaRQ10pulH0ioWmS+XTcgnA7PZjvzkFEMUTcGoFNAis7dYvSg0RpJcNsUXqAKG2QQVn0cjnDNg0x2LYkBOQO9vfp33LzcFYLgc5ldcHm9QOS+6bjiltehi8upYqFtN+h8LbG71vRj9xNArUt7ovkZ0vO2wb07w9oqujKoqRmVUkYrQnxt+en6/OPQ3ulBG6hevhQbVuuRwPVtvd6VHB1a1ahMhRTUeAm0IRF7lFecn9vD0UJ7MiHslvJX5T3OUpYkTeeXm52/M+IfD1l5POu1F8XubEz+4gTLqYf50j8sHhtMXs8mM2r2Bazx4NZt5xtcXssuP2gSLZHxqWqfecysz3Nvjg4uHuA/cILJeMN5LG1xt7/9CrRcxUOnspjPMYuExRGLM3+hG8Xfc/o1g/cWj7t+tFEBQm80oU2bLUvmZN2WplI8n3S4Ax2TrM/woDsiku3dN2mbOHe6N3vm/E2um9TxNA18h2BEdsSfW7oorgyjlgq7nNIodcmatdrrzd68wtkqrpoXXB/uC+A3PvKpb2eKEwt9/gEted7XPV4pUJ4OxS1VX4aWI76Jx9w+h65RAvpxahLcEYBEiFfJlt4m1fqA5Lxmpf0+6j2ubHq34hjAooiM49cZB2F3uD2xvv4hpdVzF0rx6nYh9+iueip9+82xbdUlD3gecb/eJkdvth9+erZq90XLw8PdsfPM7F7IP48fJ4dHvKMH8L6U8FvWHXNhcz/vio1/DozAbc2Ao9CVLCj/kl3Qdjfe7a3D6sPa0vElFS4CEllDnqYhmQl/BaBBwlgGTIKeOTl37cTpBnFecl1R15MfI69ayN8SZnOE8n2wW/74PcQH/za3OjxxveqgivducqN6fxinu5c3FAU7nTqDgE/SiCn3J9ewGw25g4/26JpaPhbjZay9qjt28e0lS+ooubz/D2Df3Aa9xBtkt1Q94i8qGO+XmkDqERHjiNBVm6kHXXKU//07BwSGLfvlqWRxGP5NdVUfg0phKdP4g4FJIzNoOB6UsdMFmXS33+QQ/Ta +api: eJztV01v2zgQ/SvEXNwCSpzmq7sCFti0TdCgLWI4bi+2EdDkyGIrkSpJJfEa/u+LIeVEdpw0bdPFHppLZGpmOHzz5g01B8+nDtIhfOJWce0djBOQ6IRVlVdGQwon6EXOhNGZmtaW0yrLjGWcXUYfZixDfams0SVqvz3SI32sfI52aXFhMWNn/bZVWCpr59kEWWXNpZIo2TOVMY3RV7mb9WSkOZOY8brwd4JcKZ8zV9TTv0ZQWSNrQSmOgF2poqDotUP5PGR1QplykTOLGVrUApmZfEbh2bNWpsn6FgnjVVUoEc5OC8/Tkd5ivZgda/LtUA4dAqOjZIdlCgtJZp1LtE4Z3aETmYAqLxjXkgmuKT+HnnnDdF0UZH+axQDt8zPlV47DpLIofDEjxywUyOfILDpTW4EU5oySulIOk2VmKwF4YfQ0Yrd2OAKqj7622qUjzRhjr0Pt++gqox1+MBKLlA1y3ECKmMXXGp1H+RBB+lw5XG7wdjDoHV8LDOCkhIC/E105po1nmam13IYETIXxzamEFKKtuwhYQAJNDq+MnEE6p9cetafH1mm7nx0xfA5O5FhyeqosxfUKHf1qkSK46tlZBulwDn5WIaQQyQMJeOULWugvedWP+wesYJHceFCRYTFeJLDGsSePv1bVJ46/SO6NQZhfrNZjsSAH2xAoQLu7s0P/VqXmvBYCncvqgi3ZBsmPFq/ilpfhiUupYtv1Whbe1nj/KXrRe5FAbYuN4DlvlZ5uAOc2yEdL4H1fKYi5yqIkUVYSxhuK82ZwtrnmDu2lEvhrN3l0U/zMJt/VHT+zUbs2hcpQzAR5PqZZ3i/Nv1mPJw+8rMGTB27j/sTBN0hGu3BNu7aKt2HsNEqyv7t7Vzw+8ULJOCuOrTX2x5VDoucqNL3yGCVk1aAwYuXtI7RBaY9TtBHlZo1by2dtBE1MkDSjdFOKvBrv1vQDOsenCDfB7jcNYLABvf1WDehccevGrlWNW3gjuvcf402E76EZQQP/TsBY2xJ9bmikV8aRS8V9Dil0G8q7bjNaustRT02G1gX4g1ZD7n3l0m5XFKaW23yK2vNtrrq8UrB+uz0Kb9lrMg3a7VDUVvlZiHfUO32Hs7fIJVpIh+O2wTmxJ/Jh1eymFLxS75CQ0byk30e1z41V/8QiJ6AogTx60dGJl/3bi8vxNS+r2H1rmkv3uXapmxsmpDvE+bJU/qJsCNKyUoTqXsb/OMgO97cOXr54ubV/cLi7NdnLxNau+PNwLzs85Bk/hM0C/B/sumFS/vJdF1SIzIS6NfRsSPGKiy+oZXtT2Nl+sb1zH4saB3bUO23Uh4ugPksCBDNI1nh6w1BIAMsgPeCRl3/fvqAsqSFKrlvxokI6dtK0wkpSrVvv72+4399w/8dvuEYnPV77blVwpVv37aj7w6X0udhQRHdIIGr/OIGchkQ6hPl8wh1+tMViQctfa7Sk4OPmqjShth7S6M2XWj6HLziLPURNshUGJJkXddTutfsCzfLocSTolA/ajltzrHd2PoAEJs2naGkk+Vh+RcOXX0EK4WuWvMMwCWtzKLie1lHVYkz6+xfaISQU sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Fetch"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/fetch"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetch configuration for a variant or environment. @@ -42,45 +42,2082 @@ Either variant_ref OR environment_ref must be provided (if neither is provided, a default environment_ref with slug="production" will be used). For each reference object (variant_ref, environment_ref, application_ref): + - Provide either 'slug' or 'id' field - 'version' is optional and can be set to null - If 'id' is provided, it will be used directly to fetch the resource - Otherwise, 'slug' will be used along with application_ref Returns: - ConfigResponseModel: The configuration for the requested variant or environment. +ConfigResponseModel: The configuration for the requested variant or environment. Raises: - HTTPException: If the configuration is not found. +HTTPException: If the configuration is not found. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-fork.api.mdx b/docs/docs/reference/api/configs-fork.api.mdx index a0b885758c..3dd2976ccb 100644 --- a/docs/docs/reference/api/configs-fork.api.mdx +++ b/docs/docs/reference/api/configs-fork.api.mdx @@ -5,36 +5,36 @@ description: "Configs Fork" sidebar_label: "Configs Fork" hide_title: true hide_table_of_contents: true -api: eJztWVFv2kgQ/itonk1ISULv/HT02lOjtgpKSF4QQsN6DNvYXnd3ndaH/N9Ps2vAkIRUVFcFCV4wuzPfruebmZ1ZFmBxZiAcwR1qiZk1MA5A5aTRSpVdRhCCUFksZ2YSK30PAWj6VpCx71RUQrjgWUuZ5UfM80QKp9j5alTGY0bMKUV+yjXDWkmGfz345SaaYqealVcxhKNtMZMUs815W+YEIRirZTaDKliNZEWSQDUOwEqb8MAN61YBPJA20u/mEYzMLM1I78S5q/WrAIRKU2knKRmDM9p3Y387lNaXGqUKQEa7sAKIlU7RQghFIaOd2JcRVFWwnFbTryQsrKevKSZNmaBrz+IXFVHyBGAVAGUPUqsspSNLr5ilRswdWXqlLO3A4Cw62UiwVcXymkyuMuOJ656e8ldERmiZW2d/uCmEIGPiImld18IQ7JuNc9SYuieMIskqmAwaElYX9PxLDLx2FUChk32JvNVsu6M//35/5gNdaoq4CpARjJ/w8PfDq6fTjyH9IAUdqXr9VB0rroOh6lh6HRRdzTMrkTGJUiS0izShCS1FE7R7W8gjtPrWHbt59It4tx5hC29aTnYb/mcg35UttnkT9dchdxZmn2mGovy8ZOLFw+vI2eFwtjzFjpwdDmfN4+zI26Hw9sIhWbeMG6c2t7HLZrTuhl03e97tPm5g7zCRkTs0Wx+0Vnr/7jUii9I1ntKSb2M3BRIlNmZ/wrarume8tgNqjWXTjspvkMlLjSvDtuuSpWijlPEiz4s6Y7SGPPsSB/xefularlmUrczrrfv8a7z35tvlMR+Hw8EjQM/tJqneB0zrH39XnJKdK75DzpVhvBztHELo1FncdOqrj059t8wnMmnjqHF3CTC3NjdhpyMSVUQnOKPM4gnKDubSub4hUWhpS6fSH1x+ovIjYUQawtG4KXDDzuPdYVNsxQTm8hOxYTJM+Xe/sHOl5b+e4wAkv+Dca/Gbs1tery/DP/zANPd5bavV8jX6mulVvX36uGBeS3FmgbMY/7iIe+fti7dv3rbPL3rd9vQsFu2u+LN3Fvd6GGMPnu4YfsOqT1zW/O+rcjOQxcrxVntn33lFqz+4bC4IpydvTk5h20M3hDnhoHAJZ0m6m4Zgy/1WjgcBUOqyDVjC9K/1BO+M3TzFrIG3FRAbe1l5nqUftpMnKLPGJZqPldHSmYzfLoP5fueeo33OcRWOYLGYoqFbnVQVD38rSHNIjOuCacp2GnEqmy+DYwH3VPoNcs5tu4TD4knhg2Er/3Ju9Bp9ISi3O2XHjdAfXN0MIYBp/X9RqiLW0fidkxl+hxCA/3FibRedbmwBCWazwruJx+TPfw9sE+U= +api: eJy9V1tz2joQ/ivMPptASUJP/VR6m2Z6OmES2heGySzy2qixJVeS01LG/72zkgFDoU3bpLxgpN2VtN9FZgUOMwvxFD6ikaichVkEuiSDTmp1kUAMQqtUZvYm1eYWIjD0uSLrXuhkCfGKZx0px49YlrkUPrH3yWrFY1YsqEB+Kg2XdZIs/7oLy90YSn2qWl6mEE9X4JYlQQx6/omEgwicdDkPXFFKhpSgq7D+e51QDnW0yVBVnkM9qyMgdSeNVgU9Uv3WOR+hfh0drcE9v9mBo6453pAttbKhs4N+n78SssLIkjcJMVxXQpC1aZV3rppgiP4UuxINFv4Jk0RyCubjVoQzFR0/xDhk1xFUJj/YO+uMVNmB3myLfDDcu99DgokrDSXMdpnA7AA2ryaXhyG3ZO6koMdd5N6a+JtFfkscf7NQG5tcpiSWgjPvo5X/1+G/xOPBC68xePDC7b4/cPEDjtEGrpFrC7yX3kLWRtA4kXeSs8HgR/P4iLlMPJCd18Zo8+fOkZBD6UUvHQUL2Q3ItdiZvYc3SOUoIxO63IyhMbhsd1CHDbJnFDbjyrv1tqHvyVrMCDbFjof6ZnQmPPsrDPhcYekmroXGtr2hu8eP8Sq072dXxNvJZPxDwYDtLqiBA7bzJtzqBbmF5tu+1JbrlegWEEOv0YPtNddOr3kLYAGSsR4a7+OwcK60ca8ncl0lJ5iRcniCsoelhP3FR36285JDva9bEpWRbunrjcYX72j5ljAhA/F01g64ZmYFruyGbWDCUr4j7prCgn+PKrfQRn4LBIhA8gYWIYvbwpy92r7TvP6KRRmUuefHNq+yNg34/P44fdZDUUh3UzTkaUVJbuppiv+dp8Oz7vnTJ0+7Z+fDQXd+moruQDwbnqbDIaY4hMPm/A9WPXCLPvqqNQORao9bQ92GFC9Q3JJK2otC/+TJSf8Yi5qEzmh80TgTCu9MawL4MIj2eLphKERAhbclcITF8+0E75L1UKBq1dtTzs6eNix09NX1yhylar3pBFFN18SyYbtcDCLwwppFsGABxlNYreZo6YPJ65qHP1dkWB6z5o6ac8+m7HmLtVBWcEvLsEE25653Jg7PqyCMPaNmEw0ZIyGodD+NnbU8Ynx5PYEI5s1fgEInnGPwC7sefoEYgP9EcLZXqh9bQY4qqwJlQk3+fAf610MQ sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs Fork"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/fork"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs Fork @@ -43,29 +43,2065 @@ Configs Fork as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]}},"type":"object","title":"Body_configs_fork"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-history.api.mdx b/docs/docs/reference/api/configs-history.api.mdx index df6e7e2548..dcd00dce61 100644 --- a/docs/docs/reference/api/configs-history.api.mdx +++ b/docs/docs/reference/api/configs-history.api.mdx @@ -5,36 +5,36 @@ description: "Configs History" sidebar_label: "Configs History" hide_title: true hide_table_of_contents: true -api: eJztWVFv2zgM/isBn5WmS9vszk+X3Qa0WIcGbdqXIAgUmU60sy1Pkrt5gf/7gZLjOM6S9joctgLpSxOJ/ETxIylKWYHlCwPBBB64ljy1BqYMVIaaW6nSqxACECqN5MLMltJYpQtgoPFLjsa+U2EBwYoELKaWPvIsi6Vwur3PRqU0ZsQSE06fMk3IVqKhb49+xZnGaHfSxPnCAabFTQTBZAW2yBACMFbLdAElq0fSPI6hnDKw0sY0cEe6JYNH1EZ6G3ZgZGpxgfogzkOlXzIQKkmknSVoDF/gSw3726F0PlUoJQMZHsJiECmdcAsB5LkMD2JfhVCWbD2t5p9RWNhM32KEGlOBt567TyrEmCxoMLZmYmPOkZNfwUkb8EcYlIJSY0ip20ykxuqUnrN28pYEtlG2Okc3YDKVGk9z//SU/oVohJaZdWzBXS4EGhPlcee2Egb2/MyXFhOzm+UZ19yP8zCUpMvjUUOCzNvvv5HXLhnkOn4p//f6mAa/Jg2aISzDZuTWifF+fPOjfGBgUD9KgUeqfn+qWsf8karflypMH6VWaYJHul4DXc0zK5YRikLEeIg0oZFbDGfcvthDHqEztO7YzcKfxLv3CC28eTE77PjnQL4rOuTzJurPQx7s565xwUVxvWbiycPryNnr4Wx9ih05ez2cNY+zI2+vhbcnDsnqyrh1atMVd30rrR82KhCuNS+2Lt1eruPVTOdyczMuGZz3+7uX3wcey9Cds50PWiv9X26+2xEWouUyPnAjjpXYmn0GHXWrNN2/62vlDSTHJMZ1bu1WZi3a6H68yH5R54zOmGafoo325Zeu5Jp9XO1e793923jv3XcoyC7H49EOoOd2m9Q2/wwStEtFL56ZMgSZcbuEAHpV7Te96jGlt3kJpaMctXEEuUcIWFqbmaDXE7HKwxO+wNTyEy57PJMuZwyKXEtbOJXh6OojFpfIQ9QQTKZNgTsKIR8U22I1HzyTH5GsSHlC34e5XSotv3umGUja5tJr0f4pOG83T7cfvvEk8wWxdUfzzf2G77pRP93ttDdSVJLgLOJ/XESD8+7F2zdvu+cXg353fhaJbl/8OTiLBgMe8cGe95b/fVXq59NIOQ9W0TJ0/HSGo6vmgnB68ubkFNoRsyVMBYALVwDW7nfTwFqBUIcAMMDEZT9Y5MlfmwmyjGIu4WkDbzdAt8ypw8DiN9vLYi7TxlOYj936bdB4iwkPGKzjd8pgSaEeTGC1mnOD9zouSxr+kqOmEJ1Wnc+cvDWhArNcB+sK/sHCm0mVsOvKAInHuQ/OVlWkiuU1hkJgZg/KThvZOLq5GwODefVrQ6JC0tH8K5UY/hUCAPrJgrRdtrixFcQ8XeQ+WDwm/f0Lo6aA4w== +api: eJy1V11z2joQ/SvMPouQkoTe66dLP2aSaTthEpoXhskIeQ1qZcmV5LSU8X+/s5IxBgJJOwkvYGl3td5zdHZZgedzB8kE7riVXHsHUwamQMu9NPoqhQSE0Zmcu/uFdN7YJTCw+KNE59+ZdAnJigw8ak8/eVEoKYJv75szmtacWGDO6VdhKbKX6OjpIZ54bzHb33SqnIeAenmdQTJZgV8WCAk4b6WeQ8WaFV0qBdWUgZde0cIt+VYMHtA6GXPYCyO1xznao3Huav+KgTB5Lv19js7xOf5tYu9DlM6XOkrFQKbHYjHIjM25hwTKUqZHY1+lUFVsvW1m31B42GzfYIYWtcCbiN0Xk6KiDFqIrZHYS+fZ0XbTeywjIo+0mBLp2hRovQsR636XdhUF2zh7W2JYcIXRLpKmf3pKXyk6YWXhA/ZwWwqBzmWl6tzUxsCez1npMXf7/Cy45XGdp6kkX65GLQtK7zAao+hdMSit+ls2fbV/DmC7+DJt17yB9MP4+jEkGTi0D1Lg6x6yIwqvcwjqB2mNzvG1D2pjo2SGYinU4+qxR5HPa/Mn8XjxwGsMXjxwu+4vHPwJoamv65YWk7ysFaGRwzoIt5YvtwQv2nWim+tcblSpYnDe7+8Lzx1XMg3Ydz5aa+yfqM622KTouVRH1EgZsbX7DDlpGuD08Ft/NjFBKkzuQj/ebVBr01ZPiyaHTUMxOmPafQo2eq94dG3X7s5NeWN1D7/Gh1i+Y+3xcjwe7QWM2G6Duos/gxz9wtCcVBhHIQvuF5BAr75Frlc3st5mfqKbi9YFgEIDgIX3hUt6PaFMmZ7wOWrPT7js8ULCbgrDsNt5T6ahITgUpZV+GeINR1efcHmJPEULyWTaNrglfkXGbJs1YPFCfkJKUfOcnoelXxgrf0caMJCUwCJ6UXGIuTebafDjL54X8UrvCHmc5zZkaGaz0/3hamNF4xGcZfyfi2xw3r14++Zt9/xi0O/OzjLR7Yt/B2fZYMAzPjjQCF/9VBrhdGZCBWsq1fC84+I76rR9KJyevDk5PYRn7dAZjq5qpeAiKMUaimAGbIcxDVeAAeZBJsAjz//bbFCWRM6c61a8fSZvpdVQwuMv3ysUl7o1r0SSNwOcixlTPGCwJvqUwYLuRDKB1WrGHX61qqpo+UeJlug6rZvNjCo3ISVarIm7gu+4jGmSZHaDXpC5KiNRd+STpC16DIXAwh+1nbau7ej6dgwMZvWfmdyk5GP5T9Ii/hMSAPpHRN7h5oS1FSiu52UkToxJn/8BFseNMw== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs History"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/history"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs History @@ -43,29 +43,1959 @@ Configs History as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"variant_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref"],"title":"Body_configs_history"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"},"type":"array","title":"Response Configs History"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + variant_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceRequestModel"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs-list.api.mdx b/docs/docs/reference/api/configs-list.api.mdx index e04a6e7f8d..a5f2180151 100644 --- a/docs/docs/reference/api/configs-list.api.mdx +++ b/docs/docs/reference/api/configs-list.api.mdx @@ -5,36 +5,36 @@ description: "Configs List" sidebar_label: "Configs List" hide_title: true hide_table_of_contents: true -api: eJztWF1vGjsQ/Stonk2g+aD37tOlH1KjpgpKSF4Qiox3FtzrXW9tb9ot2v9+NfYuLJCQ3PShjUReAvbMwZ5z7BnPEhyfW4gmcMuN5JmzMGWgczTcSZ2dxxCB0Fki5/ZOSeuAgcFvBVr3TsclREuadZg5+sjzXEnhHXtfrc5ozIoFppw+5YZgnUS7ZXtnMNk1sKqYe8OsvEwgmizBlTlCBNYZmc2hYquRrFAKqikDJ52igWvyrRjco7EyrGMHRmYO52j24tzW/hUDodNUursUreVzfOnC3nuUzpcapWIg431YDBJtUu4ggqKQ8V7s8xiqijXTevYVRUOXNBgTxzKGlsMVJmgwE/hhfPmk6zZfD+FcBWVARWBrZ2cK9AM215kN7B73+/QvRiuMzJ0nCa4LIdDapFCdq9oY2PMFJh2mdldIOTc8jPM4luTL1ahlQcvb3XuzuVHwrhgURr2U9hujCOEBza/RDur/nerfQa4YWDT3UuCBqj+fqvuQvA5U/flUYXYvjc5SPND1Guhq5ywlExSlULiPNGGQO4zvuHtxhAJCZ+h82s3jX8S7CQhbeLPybn/gnwP5ruxQzNuovw75IIeN2QXOuSgvGiaeTF4Hzl4PZ00WO3D2ejhrp7MDb6+FtyeSZP1k3Mja1ANpXqVfdIz+RVeDcGN4Ce20Guw6wc12LmR4FlcMTo+Pd1++t1zJ2CfZzkdjtPk/z95NecXouFR7nsNKi43ZZ3CxqpOmj2/5QocFUlRS68u27TqmMW2VPsHkcVMfjM6YZp/ijPYVfrq2axdxq/CG6D6+jQ8hfPsU9mk8Hu0ABm43Sd0gn0GKbqGpn5Zr/z3nbgER9Opb3/bqPluv7rNRBkdjPTW+9wAL53Ib9XpC6SI+4nPMHD/issdz6Y+KRVEY6UrvMhydf8byE/IYDUSTadvgmsQT5LBptmKC5/IzUmAyntL3YeEW2sifgWMGkja4CF60c5Ll1box+PEHT/P6HtxteoS6fs32qkbv7xbZayu6jeAk4X+dJYPT7tnbN2+7p2eD4+7sJBHdY/H34CQZDHjCB35BMku030/N2tBHqzMcnbd/EPpHb476sM3chjEdRC78QWyC4aeBbdGyIgQYYOpPITjk6T/rCVoZ0Z/yrIW3JZSNtawYcfjD9XLFZdZqRgUNTZrKwYblEhgw8DqaMliQ3qIJLJczbvHGqKqi4W8FGpLKtC48ZhSnCR3xRSOaJfyLZVgg3UVdfxDJXBVBJFv3Et0ZwWMoBOZur+20dSRGl9djYDCre8qpjsnH8O90yPl3iACoK03eXrV+bAmKZ/MiyCRg0t9/uIrIOA== +api: eJy1V11vGjsQ/Stonk2gJKG9+1T6ITVqqqAkzQtCkfHOgluvvbW9aSna/3419i5Z2IS0VZKXgD1zPJ5zZjxswPOlg2QGN9xKrr2DOQNToOVeGn2WQgLC6Ewu3a2SzgMDiz9KdP6dSdeQbGjXo/b0kReFkiI4Dr45o2nNiRXmnD4VlmC9RLdne2sx6xo4VS6DoV5fZJDMNuDXBUICzlupl1Cx7YoulYJqzsBLr2jhinwrBndonYxxdGCk9rhEexDnpvavGAiT59Lf5ugcX+K/BvY+oPS+1CgVA5kewmKQGZtzDwmUpUwPYp+lUFWs2TaLbygauqTFlDiWKbQcLjFDi1rgh+uLJ133+XoI5zIqAyoCu3f2tsSw4AqjXWR3NBzSvxSdsLLwgSS4KoVA57JS9S5rY2B/LjDpMXddIRXc8rjO01SSL1fTlgWF1717c7lp9K4YlFb9K+1frSKEBzTfQftr3jrHVgwc2jsp8GUPuYsN42UPQX0nrdE5vvRBbW6UzFCshXq4zDsSOW/Mn+Tj2YEbDp4duJ33ZwZ/otHU5brTNOn9aTrCF5NiqKYahFvL19CmOtr1opvrncvYkioGJ6NRt+vccCXTQHzvo7XG/k3L2e00KXou1YFWpIzY2f2DXrJ9puaPX/ncxAApK7kLr+b+M9KYtl6eaPK4aUhG75p2n+KM7hWPru3ab+g2vTG7j1/jQ0zfQ4c1Jp+ur6cdwMjtLqk75DPI0a8MzTKFCd8L7leQwKCuHzeoZ5xBPeNQwaJ1gZrQ92HlfeGSwUAoU6ZHfIna8yMuB7yQsH/4JOz23pNpeAccitJKvw54k+nZZ1x/Qp6ihWQ2bxtckbKiVnbNtjTxQn5GyprmOX2flH5lrPwdBcBAUgCr6EVpIc1e3k9sH3/xvKgrufsaxZnrXgrb+WnYHYDurWiEgeOMvznNxif909evXvdPTsej/uI4E/2R+G98nI3HPOPjEJDUmQn3qSmtk/WOi++o0/ahMDx6dTR8LLu1Q28yPasrlotQsU1ighmwPf62zAEDzEO5gkeev73foChJJznXLbw9Re3EtGXH4y8/KBSXujUxRLHNmmbtYrgEBgyC4OYMViTMZAabzYI7/GpVVdHyjxItyWZe9/oF5WxGvWDVCGgD33EdA6Sm1Q8VS+aqjILZa2DUXKLHRAgs/EHbeat2phdX18BgUQ/+uUnJx/Kf1A34T0gA6KcDeQcFh7UNKK6XZZRMxKS//wHaI0Mi sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Configs List"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/variants/configs/list"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Configs List @@ -43,29 +43,1852 @@ Configs List as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"application_ref":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"}},"type":"object","required":["application_ref"],"title":"ReferenceRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"},"type":"array","title":"Response Configs List"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + application_ref + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + params + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Params", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"ReferenceDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>application_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>service_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>variant_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>environment_lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LifecycleDTO"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "params": {},\n "url": "string",\n "application_ref": {},\n "service_ref": {},\n "variant_ref": {},\n "environment_ref": {},\n "application_lifecycle": {},\n "service_lifecycle": {},\n "variant_lifecycle": {},\n "environment_lifecycle": {}\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/configs.tag.mdx b/docs/docs/reference/api/configs.tag.mdx index 079f90d7a7..5debe215a4 100644 --- a/docs/docs/reference/api/configs.tag.mdx +++ b/docs/docs/reference/api/configs.tag.mdx @@ -5,16 +5,9 @@ description: "Configs" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/container-templates.api.mdx b/docs/docs/reference/api/container-templates.api.mdx index 2c68b3ec1f..40bc78e698 100644 --- a/docs/docs/reference/api/container-templates.api.mdx +++ b/docs/docs/reference/api/container-templates.api.mdx @@ -5,59 +5,69 @@ description: "Returns a list of templates available for creating new containers. sidebar_label: "Container Templates" hide_title: true hide_table_of_contents: true -api: eJytUsuO2zAM/BWBZyFOe9SpQVG0wV4Wu9tTYBRchYnVypIq0WlTw/9eUMk6j/PqYsgcUjPDGYFxX8Bs4HMMjC5QLtBq2FKx2SV2MYCBJ+Ihh6JQeVdYxZ1i6pNHpqLwgM7jqye1i1nZTMgu7FWgP8rOIxegISbKKAPXWzAw137Mo0BDppJiKFTAjPBxuZTPLZXnwVoqZTd49XQGg67TKLDAMSXvbH2o+VmkZ4RiO+oRzDjJ0dATd1FY7IlBQ0LuwEBz4dtckyqUD2KL2YwwZA8GOuZUTNNYH4ftAvcUGBfoGkwOplY67JAdH2vL6nH9QMdvhFvKYDbtNeBZiJ3U3sJG4GMiMIDJPdARNATs5b4auIvZ/asCQYMTU7pTl0hzYRdru2Nf8ZWcWj2uQYPIONm4XHxYLOF+zzfg6oatnr69Xcug71yY9YMG6tFJjQn7T5eCMEuxcI/hat4cOfVyZfcNpfGy2vdJ4dlWpr/cJI8uwHTWM55zsLlkU+hcktBq6GJhQYzjKxb6nv00ye/fA2VZdqvhgNkJj7pp/bYZycEvOoqH1lKS0B3QD6cF3+VV8jEH9OuXF5im/3FuQv8= +api: eJytkkFv2zAMhf+KwLMQZzvqtKwYtqCXou1OQTCwChNrlSVNorNlhv/7QMe1kwC71ZfAIfn88fF1wHgoYDZwFwOjC5QLbDXsqNjsErsYwMAjcZtDUai8K6ziXjE1ySNTUXhE5/HFk9rHrGwmZBcOKtBvZSfJBWiIiTKK4HoHBqbaj0kKNGQqKYZCBUwHH5dL+blGeWqtpVL2rVePYzPoQY0CSzum5J0dPlT9LDLTQbE1NQim6+XR0BDXUSgOxKAhIddgoJp5q0uoQvkotphNB232YKBmTsVUlfWx3S3wQIFxga7C5ODWu9VQVXfSCv1W5GybHZ8GvdXD+p5O3wh3lMFstpcNT0J9tuK6rQM+JQIDmNw9nUBDwEbeVy3XMbu/w/agwQlAfZ6SvV3Yx2HcsaeZ7TPaVwo70CB7nrGXiw+L5f+WGQfU6mE9mo92MP+NY2gDfWPXZBRooAad1Jiw+TQXhDLFwg2GC70pm+r54i5XaN2cgfeJ62gx0x+ukkcXoB/36cbAbOYQC84cma2GOhaWjq57wULfs+97+ftXS1kOv9VwxOyEY7i6fruSZOKVTuKhtZQknUf07fnYN8GWrExJ/vrlGfr+H3cdUY4= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Container Templates"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/containers/templates"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/containers/templates"}></MethodEndpoint> Returns a list of templates available for creating new containers. -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/containers.tag.mdx b/docs/docs/reference/api/containers.tag.mdx index 0e073f7378..cd25ac1df8 100644 --- a/docs/docs/reference/api/containers.tag.mdx +++ b/docs/docs/reference/api/containers.tag.mdx @@ -5,16 +5,9 @@ description: "Containers" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/create-account.api.mdx b/docs/docs/reference/api/create-account.api.mdx index d007134d19..5ecd23392c 100644 --- a/docs/docs/reference/api/create-account.api.mdx +++ b/docs/docs/reference/api/create-account.api.mdx @@ -5,36 +5,33 @@ description: "Create Account" sidebar_label: "Create Account" hide_title: true hide_table_of_contents: true -api: eJy1V01v2zgQ/SvGnLlxGvSkU902QIN2N0aS7h4MI6CpicyWIlmSauo19N8XQ0qyFMdar5P1JY448/jmzYfGWwi88JAtYJaXUsOSgbHoeJBGX+WQgXDIA95zIUylAzBw+KNCH96bfAPZFoTRAXWgr9xaJUV0nX7zRtMzL9ZY8niqN9cPkC22YB1dESR6el55dGPnmpc4PA8bi5CBD07qAmrWPdGVUlAvGQQZFD34g3xrBlhyqU4FuYzOdc1aC7P6hoKkaC2+YMHF5qtHd5PEeQavZuCFsfj/hvqvJG+JwzjLauWFk5bSOEbWKq5PJTsn3yPI9qiMcB7BmaWyPey8Zwp1TYAOvTXap1Avzs/pT449YeC2EgK9f6jU5KYxBnZ8O/y3JpD5mNQMHowreYAMqkrmo2Fe5UeXchPU4Vr2Q1IyYOn3YzOu4Fr+HYW4f71ArnuwE4qKDW96STMNsNsh8mjcd2+5wFcM4q8Ws4lgd8dL6O9QW+7WGUr0KzKfJ8SGd4v/EtYtYstZ+vscS/Ms3MoYhTRDxirdTz6Sf81ie907o07mRg0xuSGAmtErMUcdJFf+VLwPPYgjh7bvNWRrz53jm9GLkuvoHd2MbOHjAHx7cbE/8/7kSuapKy6dM+70gZdjaF7JB6aGMmJweoTKUgcs0KUBNVCoJ6hJBEnE0heE/LQHWtPf0Xte9OQ+bBrFmNzR6XNK08okHea0ZlFc6erGrpesnbxJ3cNhfEzyjaX1093dfA8w5XaY1A9xw5vMug2vxLA2tPtZ4+l/y8MaMphy2hCnu03Qo/uJzsekVE5BBusQrM+mU6FMlZ/xAnXgZ1xOuZWxKj2KysmwiS6z+dVn3HxCntO7b7HsG9xS2aRCGJp1OeBWfkaSJI0cmFVhbVwzs4GBpNDWyYtipoK82a2ul794adM8aN+9DVCX3GZp3BXaboEbmj6zNKXlqDOgaaYf4ijrui6KM5nNr4AByZiScX725uwcnqZoYEwdx0Xo8UjHwJ5kodO/F0xAXr7bHRAzynKZdrkGb68iBmy6FAT8FaZWcRm7Kd69bYplAbFYgEFbLksGayqnbAHb7Yp7/OpUXdPjHxU6qoglg5/cSb4ifRbUw+u2NrbwHTdELA2b32KnkbmqUi08GTw0FJLHTAi0YdR22av4+fXtHTBYNT9uSpOTj+OP1MX8ETIA+oFE3rE447MtKK6LimZFBgmTPv8A4AWS3A== +api: eJydVV1P2zAU/SvVfc7aDu0pTysMCcQmKlr2UlXTrXNpDIltbAfIovz36dppm5LB0PrSxD6+H+ee4zTgcesgXcEsK6WCdQLakEUvtbrMIAVhCT39QiF0pTwkYOmxIudPdVZD2oDQypPy/IjGFFKEo5N7pxWvOZFTiWFX1dd3kK4a8LUhSEFv7klwRC99wQuzmOMmJoA22UNVVRTQrgdQaNu25ZKc0cqR4zwn0yn/ZeSElYaLgRQWlRDk3F1VjG46MCQfr91YJsXLmKFyZD/W0XfaoqhvHdl91mFXbQJOaBNjD2KitVi/y8UiHmYi/snsrohA25eTkyFTP7GQWeBhdG6ttv9PU0YeZcFP0lPphoBCi6PdQe/OW6m2/eal8rQlG1k7YqhHuo4FQptA6bYc+TjeAfqDnMMtD6WDvA0NZIyWvPs3ptkV0lLGTuK+YuoO1xvWgd7I7tttfIv0vTfWi+VyPggYZ3s81LNg4tFsb+KSfK7Z3kY7fjfoc0hhgnwJTA5md2SfyLowlMoWkELuvXHpZCIKXWVj3JLyOEY5QSPhddpZ2B2dMTRI1pGorPR1iDebX15RfUGYsZ1W6z5gwZqKKjmGHXxh5BUxXwrLIPHK59rK33H0CUguII+nmBBW683h6jp/wdIU1LdzF2g/eSqDfA8qjDYdQnmn2vQab8AUqHqAluu506H8nSUjN6coHkhlkADzHGmbjj+Pp2+R2R0YzeaXnTVR+F5NEQbJq3HtB9VrzBOWXw8bXCXLoUTVizeQzlFV+3F4evETU6AMtgu5m05VKwiqggR2ulonkLPu0hU0zQYd3dqibXn5sSLL6lgn8IRW4oa5WrHZ851OGnigmguLt9KnYEmGF1XUxasbim+PeGImBBn/Lnbds8b8erGEBDbdh67UGZ+x+Mx2x2dIAfhjyaeDUMNaAwWqbcWXSgoxJv/+AJCgiB0= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Account"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/admin/account"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/admin/account"}></MethodEndpoint> Create Account @@ -43,29 +40,881 @@ Create Account as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"user":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"LegacyUserRequest"},{"type":"null"}]},"scope":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"LegacyScopeRequest"},{"type":"null"}]},"subscription":{"anyOf":[{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","title":"LegacySubscriptionRequest"},{"type":"null"}]}},"type":"object","title":"AccountRequest"},{"type":"null"}],"title":"Account"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"LegacyUserResponse"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials"}},"type":"object","title":"LegacyScopesResponse"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","title":"AccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AccountRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>user</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LegacyUserRequest"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>email</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>scope</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LegacyScopeRequest"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>subscription</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LegacySubscriptionRequest"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>plan</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>user</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LegacyUserResponse"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>scopes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>project_id</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>project_name</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_demo</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>user_role</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>credentials</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "user": {},\n "scopes": [\n null\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-accounts.api.mdx b/docs/docs/reference/api/create-accounts.api.mdx index b799cfda67..9fdc1fe357 100644 --- a/docs/docs/reference/api/create-accounts.api.mdx +++ b/docs/docs/reference/api/create-accounts.api.mdx @@ -5,36 +5,33 @@ description: "Create Accounts" sidebar_label: "Create Accounts" hide_title: true hide_table_of_contents: true -api: eJztWU1v2zgQ/SvGnLVxNtiTTuttAtToZmMk6fZgGAEtjW22FKmSVFKvof++GFIflO0oToqiG29ysSIOKc6b94YfswHLlgbiKYzSjEuYRaBy1MxyJccpxJBoZBbvWJKoQloDEWj8WqCxf6h0DfEGEiUtSkuPLM8FT1zf4WejJL0zyQozRk+5ppEtR0P/FQa1e2BpyqkHE5OOQddcsgzp165zhBiM1VwuIQLLraAXf1F7GQFmjIs+wwtnUJZRbaHmnzGxlV9cY0pguM/Vo83a3h8N6mvvP+wZIjQzZKD0kkn+j4PkB3ibokk0z2nAPvPzwKyMgJu7nK3JpO0zV0ogk0GnsRlMvNWBYIWTCT8SwHcVwHEAjFcd9MoIHpT+YnKW4H8JyxQXrBD2KTDPK7MtVtxpXOxOmqfOQbm+WkA83Z3NQumMWYihKHgKZdRYyEIIKAPIx9QMRhTLvhH7Rrihvvs4UBtc4wI1ygRfzJQawj3QBBP5VEf/AOp8aplSRgQutb9u1jTkPy7KvMmhRw7dmPfLY+JJfoA4JrUctsHPMJujNiueP0MqWom9UkFZZOSlepCoIYJ7jg/uAVNulXu4Z6Jg/rn1lLmNCMGSC7XOUNq7jEm2RB16e01fraWUqad1lCkyp23HcXHsf6wfx7yWAkF0+5US7isuG8o/c0MyuAzE0knPbyp6fUw72uX1OyTURWTfRuxZ4ml6bSun2p296eYV0quN3lG59R2qCfHY3Z09SzFVn65enpiav1fZvnnoHJ2D81DP/u+xFW2/XgNPL6TlFP/KwUuVIl24lOE8rS7QvTC5ksZz5ez0lH46Jyq4KZIEjVkUYnBdGUP00junQ46Bh2WdRGOK0nImTN+x711gRu7+1FxlOeq+yd5Se5WkjkfJDV2PyaWGAsfkVJiJjsevJ9J1mEiiel1xSq2E2PI3DPsWWrvrzE2ictxdWw65FKB8Ut9NlX1eum+YOi03eb6M4Lezs91U/jcTPPVHpwutXSp7YR5P0Va3/Nxitic9C5V0Wg8IMpcWKXGWs9ZjpjVbBw7/qfwECcbMLPuS6SUaw5ZBBHoqEgTG4JZan2IL+eU/XdkFgW/h9eg+7sa5h68vtO9vbyc7A/rYdoP6zpWHBqO2PJShXSmqHOXK0JA5syuIYegWq2FQRzKo710NaLqBQguIYWVtbuLhMBGqSE/YEqVlJ4wPWc6d/gwmheZ27bqMJuMPuH6PLKXlajoLDW6IOJ4KXbMmCiznH5BA8Re9MCrsSulaTxFwcm7le5HXRMnrtvB18Y1luV/M60LWnmrPdsWiexPdf/nWc6Pw6JGJJsrlwh9HqkiOHIqD0WRMGwvUxsft9OTXk1PYjmbHmMTJ/LpZg+SaKTN1wtUEqqmYxWCRZb+3DTQz4kPGZDDeLnn2X6db/GaHuWDcKc99fFPxagr1Jqhh1iyCFVEvnsJmM2cGP2pRlvT6a4GayDOL4J5pzuaE0JQEv6pptIEvuKap+cz0i5MlmYvC02YrS1EG8T1GSYK57bWdBeqYXN3cQgTzqoqaqZT6aPZAkmcPEAMl+bwpHLp3GxBMLgtKLDH4MenvX4C7P04= +api: eJztWdtu4zYQ/RVjntU4G/RJT/UmATbYpjGSbPfBMAJaGtvcUKSWpJJ1Df17MaQulO0oThZFGzd5MSMOL3PmnOFtDZYtDMQTGKUZlzCNQOWomeVKXqQQQ6KRWbxjSaIKaQ1EoPF7gcZ+VOkK4jUkSlqUlooszwVPXNvhN6MkfTPJEjNGpVxTz5ajof8Kg9oVWJpyasHEuGPQNZcsQ/q1qxwhBmM1lwuIwHIr6MMfVF9GgBnjos/w3BmUZVRbqNk3TGzlF9eYEhhuuLq3adv6i0F97f2HHV2EZoYMlF4wyf9ykPwD3qZoEs1z6rDP/CwwKyPg5i5nKzJp28yUEshk0OjCDMbeak+wwsmEgwTwXQVw7AHjVQe9MoJHpe9NzhL8L2GZ4pwVwj4H5llltsGKO43z7Unz1DkoV1dziCfbs5krnTELMRQFT6GMGgtZCAFlAPkFVYMRxaKvx74ebqjtLg7UBtc4R40ywVczpYZwBzTBRL7W0d+DOl9bppQRgUv1b5s1DfkPizLvcuiRQzfm/fIYe5LvIY5xLYdN8DPMZqjNkucvkIpWYqdUUBYZeakeJWqI4IHjoytgyq1yhQcmCubLrafMbUQIllyoVYbS3mVMsgXq0NtrGrWWUqae11GmyJy2HYfFsf+xfhzzWgoE0e1XSrivuGwo/8INyeAyEEsnPb+r6O0x7WCX15+QUBeRXRuxF4mnabWpnGp39q6bN0ivNnoH5dZPqCbEY3t39iLFVG26enlmav5eZfPmoXN0Ds5DPfu/p1a03XoNPD2XllP8KwcvVYp04VKG87S6QPfB5Eoaz5WT42P66Zyo4KZIEjRmXojBdWUM0WvvnPY5Bu6XdRKNKUrLmTB9x77TwIzc/VdzleWo+yZ7S/VVkjocJTd0PSSXGgocklNhJjocv55J12Eiiep1xSm1EmLL3zDsG2htrzM3icpxe23Z51KA8kl9N1X2eenGMHVabvJ8GcGvJyfbqfxPJnjqj07nWrtU9so8nqKtbvm5xWxHehYq6dTuEWQuLVLiLKetx0xrtgoc/l35CRKMmVn0JdNLNIYtggj0vEgQGINbqn2OLeSXH7qyCwLfwuvRfdqNMw9fX2g/3d6Otzr0se0G9dQ9Dw1G7fNQhnap6OUoV4a6zJldQgxDt1gNg3ckg/rBvQFN1lBoATEsrc1NPBwmQhXpEVugtOyI8SHLOWwOPHK1g1MydeI0mBSa25XrbzS++IyrT8hSWssm09DghljledI1a0LEcv4ZCTF/Cwyjwi6VrsUWAacJLH0rgoT4et2+ip3/YFnuV/r6lWvHU9Dmc0b3mrr/Zq7nuuHJ8xRNlMu5P6tUYa5A/MiSe5Qp7TxQG4/v8dGHo+OnUK8aDEbji0rFzC+wNWDOjFJYJ65NRJuntRgssuy3toJmScTJmAz622bZ7nt3iz/sMBeMO4m6wdcVASdQ75YaCk4jWBJH4wms1zNm8IsWZUmfvxeoiUjTCB6Y5mxGaE0oMyxrSq3hHlc0NZ/CfnH6JXNReAptpDNKNb7FKEkwt72200BG46ubW4hgVj23ZiqlNpo9Um5gjxADrQZ588Lovq1BMLkoKAPF4Pukv78B3TRN3Q== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Accounts"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/admin/accounts"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/admin/accounts"}></MethodEndpoint> Create Accounts @@ -43,29 +40,2217 @@ Create Accounts as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"users":{"additionalProperties":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["name","email"],"title":"UserRequest"},"type":"object","title":"Users"},"organizations":{"additionalProperties":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_paying":{"type":"boolean","title":"Is Paying"}},"type":"object","required":["name","description","is_paying"],"title":"OrganizationRequest"},"type":"object","title":"Organizations"},"workspaces":{"additionalProperties":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"organization_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["name","description","is_default","organization_ref"],"title":"WorkspaceRequest"},"type":"object","title":"Workspaces"},"projects":{"additionalProperties":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"workspace_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"organization_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["name","description","is_default","workspace_ref","organization_ref"],"title":"ProjectRequest"},"type":"object","title":"Projects"},"organization_memberships":{"additionalProperties":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"organization_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["role","is_demo","user_ref","organization_ref"],"title":"OrganizationMembershipRequest"},"type":"object","title":"Organization Memberships"},"workspace_memberships":{"additionalProperties":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"workspace_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["role","is_demo","user_ref","workspace_ref"],"title":"WorkspaceMembershipRequest"},"type":"object","title":"Workspace Memberships"},"project_memberships":{"additionalProperties":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"project_ref":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["role","is_demo","user_ref","project_ref"],"title":"ProjectMembershipRequest"},"type":"object","title":"Project Memberships"}},"type":"object","required":["users","organizations","workspaces","projects","organization_memberships","workspace_memberships","project_memberships"],"title":"EntitiesRequestModel"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"projects":{"additionalProperties":{"additionalProperties":{"properties":{"credentials":{"type":"string","title":"Credentials"},"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"tier":{"type":"string","title":"Tier"},"user":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"project":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"workspace":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"organization":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"}},"type":"object","required":["credentials","role","tier","user","project","workspace","organization"],"title":"ProjectScope"},"type":"object"},"type":"object","title":"Projects","default":{}}},"type":"object","title":"ScopesResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>users</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + UserRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"email"} + required={true} + schemaName={"Email (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Email" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + organizations + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + OrganizationRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"description"} + required={true} + schemaName={"Description (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Description" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_paying"} + required={true} + schemaName={"Is Paying (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Paying" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + workspaces + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + WorkspaceRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"description"} + required={true} + schemaName={"Description (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Description" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_default"} + required={true} + schemaName={"Is Default (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Default" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + organization_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>projects</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + ProjectRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"description"} + required={true} + schemaName={"Description (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Description" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_default"} + required={true} + schemaName={"Is Default (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Default" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + workspace_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + organization_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + organization_memberships + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + OrganizationMembershipRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"role"} + required={true} + schemaName={"Role (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "Role", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_demo"} + required={true} + schemaName={"Is Demo (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Demo" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + user_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + organization_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + workspace_memberships + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + WorkspaceMembershipRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"role"} + required={true} + schemaName={"Role (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "Role", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_demo"} + required={true} + schemaName={"Is Demo (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Demo" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + user_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + workspace_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + project_memberships + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + property name* + </strong> + <span className={"openapi-schema__name"}> + ProjectMembershipRequest + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"role"} + required={true} + schemaName={"Role (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "Role", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"is_demo"} + required={true} + schemaName={"Is Demo (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Is Demo" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + user_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + project_ref + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + projects + </strong> + <span className={"openapi-schema__name"}> + object + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + property name* + </strong> + <span className={"openapi-schema__name"}> + object + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + property name* + </strong> + <span + className={"openapi-schema__name"} + > + ProjectScope + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"credentials"} + required={true} + schemaName={"Credentials (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Credentials", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"role"} + required={true} + schemaName={"Role (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "Role", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"tier"} + required={true} + schemaName={"Tier (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Tier", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + user + </strong> + <span + className={ + "openapi-schema__name" + } + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + project + </strong> + <span + className={ + "openapi-schema__name" + } + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + workspace + </strong> + <span + className={ + "openapi-schema__name" + } + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + organization + </strong> + <span + className={ + "openapi-schema__name" + } + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>id</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>slug</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: + ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'{\n "projects": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-annotation.api.mdx b/docs/docs/reference/api/create-annotation.api.mdx index 1357a60ece..aa8209f70c 100644 --- a/docs/docs/reference/api/create-annotation.api.mdx +++ b/docs/docs/reference/api/create-annotation.api.mdx @@ -5,67 +5,1878 @@ description: "Create Annotation" sidebar_label: "Create Annotation" hide_title: true hide_table_of_contents: true -api: eJztW1lv2zgQ/ivGPO0Ccpymbbqrp02PRbNtN0GS9sUwAlqibTaUqPJI6zX03xdD6vSV+ALSgnlwLGoO8uMxo/msGWgyVhD24SxNhSaaiVTBIACRUWmvzmMIIZKUaHpLKhkIQNJvhir9WsRTCGcQiVTTVONXkmWcRVau91WJFNtUNKEJwW+ZRNuaUWVla5ML94RkY2bb9TSjEILSkqVjCICmJsFOR0ZpkUAAE5MQ7BQxWmD3NdMcNa5ZknF6I0lEL5y1AGI6IoZrHJZTzwO4Y2m8zhGJJyLC63vCIYCMk+kKNx/QUtOJU80DiCYkTSlf50ZonkEA3+kQAlDxHY4oYys8vSnstZxlDF25SUV0pxcjCPszIHHMEGXCL+fwLyXafcqDqoWlmo6pbDalJhm2W4ZCcEpS27TcF0RMRoYT+du/4iNT+h8l0u55mhn9OwSlGTH8SiPddsU55A0E5rXteB+tfYPI5AEkVJOni9DfhvOH8GGaJo9TIlKS6VpU2qqbIfoJkcwDiEmBqMdxJY615FviUJN0RCVNI4dR+/z7ZqictqFrC9xTqYqT8xHoLvT2S6GeB6C4GW9r5hp18wBYvM5CACMhE4KHlDEsXmvxPIZ8DXZXJWZLjOSBg+32nkhGinjk4dsYPknv2SI4Hr+H8dNUaUX9wtsWOL9zdwXQ791tEWw8uXjwdgDP7+F9gOj38bYo4mO6IVpID93W0Pk9vDuEfgfvkstERFGP3GbIrdFrlA6v6qpDHgBn6d0jy4XtCVAZSW/Xj3stchlJOzjYADT2agdTdlSdB4D7yNK75bWtogb0a42vKFcN2gJqqQks5jNJYyxC20JeqzJVLpGGqZoueGO5gQetNgr9a8xcOVIB8jxvqmtpqG1QmUiVm5yT42P8F1MVSZa5lB2uTRRRpUaGd64KYQi25SYiYZzSXHmy7v4bK9EowB9jCteiNFYdXo5SiW+JfuSxERNNu5oly7Z9o0fObOfMVh9NFh/CyWdntnASU04P4OStM1s4KeEaTh/YRZsctCVYr6fFNi3x2quXEq3KSwnYXr2UcFVenuLhFXhO79fn9C6M3oXUc+q/NKu3DqHVdNSC1gZ81Dag/hTE3tOB0nN7ntv7OeDzVYldqhKe2/Pcnuf2fj4EPbfnub2nA6Lfx9ui6Lk9z+09BQj9Dt4ll/Hc3ubIeW7Pc3vtetWhub0NV2GtWJFvuWXyXpycLHJ1XwhnsZXuvJNSyO2JuphqwmwRfsVkcxG17m5SshzMo97AXEQlTJCo8TIWoC6mKkXGtJ7C1aIWjM4N3n1oOrklMNB1Idc8Ait4Hbqrh/HWwbduZt/f3FwuGHRz255UR6l1zppviiVUTwS+RpYJhUYzoicQQi/DEEq/92rCVPWQI6EST387PUZyCGGidabCXi/iwsRHZExTTY4I61lmZIAakZFMT63K2eX5Bzp9T0lMJYT9QVPgGheQWxJtsWo2SMY+UAQnJYld0kZPhGT/lWNB7gomTgtHj0vzqn4T7t0PggexW2NNGrjkvWp6y9FTFQtVMUmW76nonprUqCvxC6XlqphcRc16VbnwV1/jOQXPR+SPl6PTF92Xr5696r54eXrSHT4fRd2T6M/T56PTUzIip7Cs3HoYB81Uat8eGiW7A5k+JD7Lyj779jFXGDmg+UMiterhet9+Wo+fBzN+SKSWP8IcYuWWSf5+bTeyWhuAWDoS9gQvsxAbHzpnl+cQNFwfHz07Oob5eNUSxvSDRBb08vi3tyGYC0RVCEKeP7G5B2hKkr/qG9gzjHf4G4ba3rLw2OpQFYg0/aF7GSfMZhfW/ayInH0oIic0f2yEqRzG/wkG2bAPs9mQKPpZ8jzH5iJG9AcB2LU1RKz6mNxMylA5gzs6tb9qsllY16YgKM6NC41zGRlmS07jLIpoptfKDhp5wOXF9Q0EMCxeHU9EjDqS4IDwMwTAN9DdqMKZa5sBJ+nYYBIVgrOJf/8DhLsxXw== +api: eJzVWNtuGzcQ/RVhnlpgZTm+pd2nKomLuE4Qw3bzIhjBaHckMeKSG16cKML+ezHkSrsrybKTJgXqB1smh4ecwzMXagkOpxbSEZzfo7Rwl4AuyaATWl3kkEJmCB19QKW0C6OQgKFPnqx7ofMFpEvItHKkHH/EspQiC3aDj1YrHrPZjArkT6VhbCfIBtsGcmtuLlTOf3OaoJeOz+Gt0wUk4BYlQQrWGaGmkAApX/D51wYzXyCfEr3T7I8TTvKK4Xq/S0avErDam4y6+2Ap9mzymcaQgM3njF+K3fA3EbZKIEcXHMc8FzyD8mqDgsW7CaSj5caGVbIeEcrRlEx7SPli3B0Zay0JVRjavRdkwmReovnlTy/lX1ar/oUqvfu1cVaPP1Lm2rBoDC66O0sJVcvpLhi73AVrLF8xFVUCBTlc07J2//9GkHBUPG3Rv+dw39q3KzYrjsoJGVJZZK4bT3SP0qPTZntK5PuITmCiTYEcGd6LfO9hLmJQST994tVtIdzw2iqBezK2zgvfA/O+Xl4lgM4ZMfaultPOq3fG08PCHTYI1R59N+F/vbqHcJVknSW305MnYmz6WaNmaOmHwu5wjhO9MJRz6msktDPpXTfqqxKQQs33ML6pQVui+hCFuCm/tTRKVL2oMGcwo0fMb9mmtv/pGmjTtHKldcydfL0Rar4vX74JDD62W4j9TuivuN+56ctQzB9FbVXmPTDXsQuAqqray5nJMGBLrWzk/OjwMFZZmxlRxpIPNz7LyNqJl73r2hiSH9NMPBwTj1xV8q2MPjGQdsVL7XIV+Ds5Otpm6D1KkQfr3rkx2nw/PTk5FDKk+1i5Ng2kzjqz31J476qNatdSsc5WNEFhp/si9i1Zi1NqYuJh00BG75ZnH5My+xW3ru3aZWJNb2T3YTdeRfr23ezr29urLcB4t91LjcHTG7Yb6oLcTHO3XWrLoCW6GaQwKA3dC/o8aNRtB9x/kuEKGa7HGwkpzJwrbToYZFL7/ACnpBweoBjEbrZ7gGGY7b1k01A2LWXeCLcIeMOri0tavCbMyUA6umsb3LC6ol66Zk3HWIpLYuYUFkHv3s20EV9Xjgo+wCyuYmpYt9fNa+L8CxalpO2Aju+Bpsdfde51u143lN32cqsl6jRBXD7geIK/nU7OTvqnz58975+cnh31x8eTrH+U/X52PDk7wwmewaqlaXS4bk+aoU6NqbqF/7/YatUN/Ny9WpU9/CPURIfbX6W3KK0XmM1J5R3Iw4NnB4cPabFe0BteXdQ5DrNA3UpGwQySDbWvdc4vtCIkOHCExR/NBJ+Sg4qfhA3erhjsHGwtaEdf3KCUKEIKC9sv6/AcQR2ezFMToJAAJ5kZR3I6guVyjJb+NrKqePiTJ8OBdpfAPRqBY+ZtxBl0tgq5JcxpwYeMqb4f8hybSx8Vv5H2OSXHFcMso9Lttb1rJZurdze3kMC4fsYXOuc1Btkh/p0C8LcB0at0GceWIFFNPWfqFCIm//wDk8aStA== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Annotation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/annotations/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Annotation"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/annotations/"}></MethodEndpoint> Create Annotation -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"annotation":{"properties":{"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>annotation</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"AnnotationKind (string)"} + qualifierMessage={"**Possible values:** [`custom`, `human`, `auto`]"} + schema={{ + default: "custom", + type: "string", + enum: ["custom", "human", "auto"], + title: "AnnotationKind", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"source"} + required={false} + schemaName={"AnnotationSource (string)"} + qualifierMessage={"**Possible values:** [`web`, `sdk`, `api`]"} + schema={{ + default: "api", + type: "string", + enum: ["web", "sdk", "api"], + title: "AnnotationSource", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>data</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>references</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>links</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>AnnotationLink</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>annotation</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Annotation"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"AnnotationKind (string)"} + qualifierMessage={"**Possible values:** [`custom`, `human`, `auto`]"} + schema={{ + default: "custom", + type: "string", + enum: ["custom", "human", "auto"], + title: "AnnotationKind", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"source"} + required={false} + schemaName={"AnnotationSource (string)"} + qualifierMessage={"**Possible values:** [`web`, `sdk`, `api`]"} + schema={{ + default: "api", + type: "string", + enum: ["web", "sdk", "api"], + title: "AnnotationSource", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>data</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>references</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>links</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>AnnotationLink</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples responseExample={'{\n "annotation": {}\n}'} language={"json"}></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-api-key.api.mdx b/docs/docs/reference/api/create-api-key.api.mdx index ce71059e48..70d2a2e15a 100644 --- a/docs/docs/reference/api/create-api-key.api.mdx +++ b/docs/docs/reference/api/create-api-key.api.mdx @@ -5,65 +5,81 @@ description: "Creates an API key for a user." sidebar_label: "Create Api Key" hide_title: true hide_table_of_contents: true -api: eJzVU02P2jAQ/SvWnFrJIrRHnxq1hyIORbA9AVrNmoF4CY7XnqDSKP+9GiewC/+gucQfM+M3773pgPGQwKyhDE7N6ZJgq2FHyUYX2DUeDHyPhExJoVflYqaOdFH7JipUbaI42fiNL+MhmY1XSqlIby0lVp+Ww+KzUU8V3Y6bl1eyrGzjGZ13/qC4olxIzX4o5/P2GpwYmfIDS+I2+usbieNQ1WZkuyusCWhoAkUU4LMdGBgCnjG45yNdQEOkFBqfKIHp4Ot0Kr/7blettZTSvq3VcgwGDQKYPEs4hlA7m98oXpPkdJBsRSeUFV8CgYHE0fkDaGDHtRxca6mBTTXSDb18Gk7EVSOIQ5MYNATkCgwUR1FEQ6J4pig6ddDGGgxUzCGZorB10+4meCDPOEFXYHDQbyXDttHxJaeUi9mcLj8JdxTBrLcfA1YCfeDjPuzWCwY3z+R5PMm+bLlqovubKQANTmirhizpxfl9k9PH1ssMTkQCDdLGQPR08mUyhUez3QVnm9jM+vXtfA36gYVb/6CBTujkjglP394vBJmQe0L/od6DGg9ounfd/68pGJVj+sNFqNF56EfKutFaaziOw16J48wauu4FE/2Odd/L8VtLUdyz1XDG6PBFtFxve32VWowlQ2WgtJaCuPaMdTs45mFExHA3iy9+rZ6g7/8BgAqFZg== +api: eJzVVMGO2jAQ/RVrTq1kAe3Rp6a7hyIORbA9AVoNzkC8JI7XnqDSKP9eTRLYXaR+QHNJbM+M37z3Ji0wHhOYDWTBqQVdEuw05JRsdIFd7cHAQyRkSgq9ypZzdaKLOtRRoWoSxcnWb30Wj8lsvVJKRXptKLH6tBo+Phv1VNBtu96/kGVla8/ovPNHxQX1hdT8UTnfL6/BiZGpv2BF3ER/vSNxHKraHll+hTUBDXWgiAJ8noOBIeAZg3s+0QU0REqh9okSmBa+zmby+tjturGWUjo0pVqNwaBBAJNnCccQSmf7O6YvSXJaSLagCuWLL4HAQOLo/BE0sONSNq611MCmGumGTh4NFXFRC+JQJwYNAbkAA9OTKKIhUTxTFJ1aaGIJBgrmkMx0asu6ySd4JM84QTfF4OBewKw/VQ8SCt1OytkmOr709bLlfEGXH4Q5RTCb3fuAtfQ1kPUx7NYoBrfomfVYyTpruKij+9PzAxqcACiGLGnU+UPdp4+8jNi+oz2Rz0GD9DnAnk2+TGb/amZMEOlHedD28lxx9GGg7+i6EQUaqEInZ0xYfXs7EJSiQoX+Xb072e5QtW8G+b/GZVSR6TdPQ4nOQzdS1o4e3MBp/CsUYk2zgbbdY6Jfsew62X5tKIqTdhrOGB3uRdfNrtNX2cVkMn0GMmspiL3PWDaDe+5mScx3m4Xlz/UTdN1fyDiT9Q== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Api Key"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/keys"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/keys"}></MethodEndpoint> Creates an API key for a user. Args: - request (Request): The request object containing the user ID in the request state. +request (Request): The request object containing the user ID in the request state. Returns: - str: The created API key. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}} -> - -</StatusCodes> - +str: The created API key. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + </ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-app.api.mdx b/docs/docs/reference/api/create-app.api.mdx index a2ba74d105..4170815040 100644 --- a/docs/docs/reference/api/create-app.api.mdx +++ b/docs/docs/reference/api/create-app.api.mdx @@ -5,76 +5,405 @@ description: "Create a new app for a user or organization." sidebar_label: "Create App" hide_title: true hide_table_of_contents: true -api: eJztVlFv2zYQ/ivEvawFNDsL9qSneW2AGt0WI/G2B8cILtJZYkuRLEklcQ3/9+FI2ZKcNesaYE8LAoQh777jfXf3iTsIWHnIVzCz1sM6g5J84aQN0mjI4Y0jDCRQaHoQaK3YGCdQtJ6cMPxboZafka0nN/pGz1zl8xsthBAWt8pgKV4ljJm1r3OxrOl4UBgdUGqpKxFqiugaGxKoyxGwmL8Vr0y8EarXMcwVhdbpQ6RjgMs22DakKCauT4NoelBbUUSHkkN+5xmeQ3LsBI7S0wH73XK5uHgsKIbPxXzDMI6E9AK1IOeMS3DDNIyLy8hSacgLbYKo8Z6EJddI7zmrYAQWBXl/cJtABsaSi0nPS8gh3fMWrYUMHH1qyYefTbmFfBf/lY5KyINrKQNOlHTgI7RWySLCTD94ruMOfFFTg7yyjoMESb6zveXMeR22liAHH5zUFWQQZFC8MbNW/MY2+wwCNVbxpT5SvAbq7eUG8tWp9z477uhWKdive7xlhyHe05YxrTMfqAi3svxWxEVCEPOS8R6M++gtFvQCxD8PGB3msCFfAHs56usS9kxpsjV3nEJX6FTZVV+eAcax3W9hv2cAR94a7VNBz8/O+M94jK/b2GmbVomrzhhe1DKJgecaJtH279rrK8iQJWTPs5JEoKPmx/Pzp2z8gUqWqQQXPMDfTkVJAaXilQzU+KcGyhSj06/oGakDVeRgv+7pQOdwO6DsF5MuyBQ3vnqO3V/Je6zS7EaTL5tGMsSST/+pFJxXCt3ZDSrR05vY/XIabxN9fxfsYML6+wQw1bahUBuWSWs8u1gMNeQwRf6SZeDJ3ZPzkezWKcihDsH6fDotlGnLCVakA05QTtHKOKSeitbJsI0us8X8PW3fEZbkIF+thwbX3A6pwGOzI7doJYtbBqn5YdaG2rhu8CEDyX1YJy/OhRvtqhf4i0dsrKKxQA8KNhLhfn8opP3uWA77/SeS1jcjSL0xMZ3DjEayxGwxhwyY1jRJZ5MfJmdw+mgYGccPcBEn68BFPIbspCrHekAG1MSxgkDY/NQfMFNc7Ab1AK97o8ziV3J0k10/1/+/ZP7jl0w3CIEew9QqlFGrYsV33aRGQY9vzpoHOF/BbneHnn53ar/n7U8tOR7GdQb36CTecSuuWBbrw1juII3Am1Tn76N4sblq0xieaDnrbPKYFUzFs7brgcYsLq+XkMFd9/pqTMk+Dh9YGPEBcoivN/aOuhD3dqBQVy3Lbw4Jk3/+Ajnw8lM= +api: eJztVt9v2zYQ/leIe1kLaHYa7ElPU9MANdotRuJtD44RXKSzxEYiWZKK4xn+34cjZUt2lvRHgD41CBCGvPuO993dJ27AY+kgnUNmjINFAgW53ErjpVaQwpkl9CRQKFoJNEYstRUoWkdWaP4tUcl/ka1H1+paZbZ06bUSQgiD61pjIV5FjMyY16mYVbQ/yLXyKJVUpfAVBXSFDQlUxQGwmLwTr3S4EdavQ5hL8q1Vu0j7ABetN62PUXRYHwdRtKrXIg8OBYf8xTE8h+TYERylox32+9lsev6QUwifismSYSwJ6QQqQdZqG+GGaWgbloGlQpMTSntR4T0JQ7aRznFWXgvMc3Ju5zaCBLQhG5KeFJBCvOcNGgMJWPrckvNvdbGGdBP+lZYKSL1tKQFOlJTnIzSmlnmAGX9yXMcNuLyiBnllLAfxklxne8OZ89qvDUEKzlupSkjAS1/zRmaM+JNttgl4akzNl7qjcA1U64slpPNj722y31FtXcN20ePNOgzxgdaMaaz+RLm/kcX3Ik4jgpgUjLfS9s4ZzOkFiP/sMDrMYUO+APbioK8L2DKl0VbfcgpdoWNl5315Bhj7dr+B7ZYBLDmjlYsFPT054T+HY3zVhk5btrW47IzhRS0TGXiuYSJt39ZeX0GGLCB5npUoAh01v52ePmbjb6xlEUtwzgP8/VQU5FHWvJKeGvfYoNb5welX9IxUnkqysF30dKC1uB5Q9lHHCzLFjSufY/cPcg7LOLvB5GnTQIaY8emXSsF5xdCd3aASPb2R3afTeBfp+79gOxPW30eAsbYN+UqzTBrt2MWgryCFMfKXLAFH9p6sC2S3toYUKu+NS8fjvNZtMcKSlMcRyjEaCccfviycijM2DRPsKG+t9OuAl00nH2j9nrAgC+l8MTS44l6J1T802xOPRrLyJRAnA7LWV9p2qgAJSL5AFb04Ue7Cy179zx+wMTUdqvegmgcK3e8PVbbfPdTKfv+R3vWdClItdUhnN8CRq7eY35Hi+WTeI40nozejk6fI7RxENp10I4h5GMEdL8EMkqPy7QsHCVAT5g88YfN7f8CscVc0qAZ43WMmC5/TgxttegH4+eT5wU+ebig8PfixqVEGUQsV33QjHZQ/PE4rnvR0DpvNLTr6y9bbLW9/bsnyYC4SuEcr8Zbbcs76We1GdANxHM5inX8NKsfmdRtH8kj0WZCjR5YzFc/aLgZiNL24mkECt90zrdEF+1hcsYLiClIIzzz2DhoR9jZQoypb1ukUIib//AfmrwDx sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create App"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/apps"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/apps"}></MethodEndpoint> Create a new app for a user or organization. Args: - payload (CreateApp): The payload containing the app name and organization ID (optional). +payload (CreateApp): The payload containing the app name and organization ID (optional). Returns: - CreateAppOutput: The output containing the newly created app's ID and name. +CreateAppOutput: The output containing the newly created app's ID and name. Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. +HTTPException: If there is an error creating the app or the user does not have permission to access the app. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"app_name":{"type":"string","title":"App Name"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["app_name"],"title":"CreateApp_"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_id","app_name"],"title":"CreateAppOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>template_key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>project_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "app_id": "string",\n "app_name": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-checkout.api.mdx b/docs/docs/reference/api/create-checkout.api.mdx index f025174cb7..afd91e5cbc 100644 --- a/docs/docs/reference/api/create-checkout.api.mdx +++ b/docs/docs/reference/api/create-checkout.api.mdx @@ -5,36 +5,36 @@ description: "Create Checkout User Route" sidebar_label: "Create Checkout User Route" hide_title: true hide_table_of_contents: true -api: eJy1VVtr2zAU/ivmPG0g4qzsyU/LukFLNxradC8hBNk+idXKkirJpVnQfx9HviRu2sIGe0oinet3Ufbg+dZBtoSvQkqhtrBioA1a7oVWlyVkUFjkHtdFhcWDbjwwMNzyGj1aStyD4jVCBkZyBQyEggweG7Q7YGDxsREWS8i8bZCBKyqsOWR78DtDSc5basoAVVPTGIXUTbl+mq4rnedUYjgwVh//zBsnFDp3fFY1NVfC79aS56OL55MTvkXl+ZoLWtgLL2maOa0QAht2ck1RoHPrxsp/X62vftsWS+6shBBWVMIZrRw6yjqbTumjRFdYYQj9Q8qmkclNF0xLaOVReQrnxkhRRLLSe0c5+8MkIYTA4PPZ2WnhX1yKMqYl363V9i+qgrEkEC/auUv0XEj6JjzW7jRA6mJ0y9XuehOFMwaKYO9OhPK4RQthFVh/xq3luyM0f+h2QAgMard9D/if6BzfIgzF3g6NYCQLug2H3jq/x8KPSF/GvdrWXdyRkA7wtui+vca3Fr7XmvUhF4vF/KRgy+2Y1PPo1OS8c2py59AmN7rxJJoafaXJz0a71sS+ggzSvPV9SlAYTHubuxQYOLRPvcvJAhlU3huXpWn00aQ10YSLlBsBJGmHRWOF38WU2fzyCncXyEu0kC1XxwG3JKdWIOOwgRtuxBUSVJ0XZ42vtBW/W9Y7N1ZtFmEh1EbH9A62WRwumc0vgQGt0YI0nXyaTOEldKNgcgIvohP63vEa2AsUhv3pAaujDcAjr78cLmgyQrzm6qjeu0yNJhvg8PjsUyO5iIqPc+w7EpfQkUiURRppiZ5IYEDSrIj2bAn7fc4d3lkZAh23zxmxVQrHc0na3nDp8GSO4X2ADzedDT4mwF6f7wF3h7+EJy4bCokW/w9txq/0oduKflhB7aL8WC8XWrdNnRUFGn+UdfL0UZXBO/Pr2wWE8AfJyHWY +api: eJy1VV1v2jAU/SvRfdqkiLBqT3ka6ya16qailu4FIXRxLsStY7u2UzVD+e/TdUKA0lbapD0B9v0495x7zBYCbjzkc/gqlZJ6A4sUjCWHQRp9WUAOwhEGWoqSxIOpA6Rg0WFFgRwnbkFjRZCDVaghBakhh8eaXAMpOHqspaMC8uBqSsGLkiqEfAuhsZzkg+OmKZCuK4YhlKmL5dN4WZrViksMB9aZw59lXaGWoVkqXPnDi+eTE9yQDrhEycMFGRR3njLctk0H/L4Wgrxf1k79+xi76rddseTOKWjbBZfw1mhPnrPOxmP+KMgLJy0zvU9Z1yq56YN5CKMD6cDhaK2SIgqT3XvO2e6RtG3bpvD57Oy08C9UsohpyXfnjPuLqmAdL0OQHe6CAkrF32Sgyp8GKCOOblE31+u4JMdEMe39idSBNuSgXbTp7gydw+aAzR+mAwhtCpXfvEf8T/IeNwRDsbdDIxnJjG/bfW+zuicRjkSfx7m61n3cwSLt6e3YfXuMbx19rzXbhVzMZtOTgp22x6KeR1cm570rkztPLrkxdeClqSiUhr1rje8MG0rIIVt1Hs+YCkvZztI+gxQ8uaedo9kCOZQhWJ9nWfTRqDPRCGWGVsJLOJN4m5xzKPC+exK1k6GJ9SbTyytqLggLcpDPF4cBt7xr3fYchw3CoZVXxDz2Rp3UoTRO/u5Wordq2WUxUVKvTUzvOe2xfUXxQLqAFHjODvZ49Gk0fmuYPiGZTC97y6CIltnhiGGQvqBrIIpftSr6BQJh9WV/wShZmgr1Qb13JT1COFAT6DlkVqGM1og4tr3ac+jVZm2j3jzETnFIgXe45P3I57DdrtDTnVNty8fdu8fKFdLjSrEJ1qg8neAYHhL4cNP75WMC6ev4HqjZ/088oao5JL4F/6HN8XO+77bgH05yu7iK6W51eNwudSIE2XCQdfJGcpXBZNPr2xm07R9csHzQ sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Checkout User Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/billing/stripe/checkouts/"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Create Checkout User Route @@ -43,29 +43,273 @@ Create Checkout User Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai"],"title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "plan", + in: "query", + required: true, + schema: { + type: "string", + enum: [ + "cloud_v0_hobby", + "cloud_v0_pro", + "cloud_v0_humanity_labs", + "cloud_v0_x_labs", + "cloud_v0_agenta_ai", + ], + title: "Plan", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "success_url", + in: "query", + required: true, + schema: { type: "string", title: "Success Url" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-evaluation-preview-simple-evaluations-post.api.mdx b/docs/docs/reference/api/create-evaluation-preview-simple-evaluations-post.api.mdx deleted file mode 100644 index e38ff4c714..0000000000 --- a/docs/docs/reference/api/create-evaluation-preview-simple-evaluations-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-evaluation-preview-simple-evaluations-post -title: "Create Evaluation" -description: "Create Evaluation" -sidebar_label: "Create Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJztWVlvGzcQ/ivCPLXAylIUH+0+VYkdxE1Su7aTF0EQqN2RxJR7mIcTVdj/Xgy5p1aSrwRIY/tBlsg5OB+Hc5Ar0GyuwB/ByQ0ThmmexArGHiQpSvvrNAQfAolM4wRLmkkq8Ybjl4niUSrqM2oySROlwQOJ1waVfpWES/BXECSxxljTV5amggeWvPdZJTGNqWCBEaNvqSTlmqOiX5Xk9txM2MWvgMXLsxn4o3UCriaBSBSGTSK9TBF8mCaJQBZD5pVDsRECsrEHmmtBA6eq89pJyDwSJ/gNPkbYe+J3oligHyls6CRkmVdQJdPPGBD4BVW1rRcmfmPxagvNPIhQs+ZSWBhy4mPivIFpa7FKSx7P62J5rHGOsqkpmjZH6jZu1gUBl4ERTP7yxgjxp0ri7mmcGv0rrNtLMrjG6G5MTEq23IltkxVa+O7i/UBIEkfLN38kRP9K3nOlb8N0m43r3PdD6Mp5IcQs2uz+bfvbKyDezIMQVSB5WsSHh4g6ronIPLhBqXJpTRkVx6echNTPmBEafBj0Bwd7/aO9F/t2WWz9ODUDk9JMm52b7wHGJqLInGIcupFrgwZDCq0mjt2QMkGASoEHM8aFkUiMUiaShgIWBygEhjDeFBEu3SI2xoNrg3I5URrTtVXmx6y93FkiI0ZIGMPDmkNUp22b/28zPDBKJxF4sDARI7SZ0QnQ6nIwl+QFLhNsUX4Hb/ybLO1cWkuJEZVWqJ+E6VfO1sr4WmJ+EgAMK3srEPKKI5FPAoKTwtoKAIkpMr05Om1MRGsiL3L+XXXJpa0bq1h0zGzWbEWie4h4bYvUjVqpFOWSysBRvaAc3ybswpWwkGVZXYiWBu2ASpNYuS0Y9Pv0r5GP4NJF55kRnYucmMLywyrhIDGOaW0rKiNeW4paVupX7txKkM+l9NMupc+MfkAt3eK6RzHteH/yanoXrHcopx+C0Y9dT7u7g3DC9O5yt8xhIdPY1dyuZ7sWF6DDztCCZdLweyj56MTmSkIU+B2UHDuxuZICrulywjfH2q0lx+1gvVp2TsM6Xt9US4FWqaUA7JtqKeAqtXw70U5erQF8iPsXzeFzF/h/KoOfu8DnLvC5C/wJusBHspdtWmZ7vv3BoN3VfWKCh85dTijIPrylC1EzLmx7VXhUk0AkQWP2PsXteN39KqvfJ0EBFkRqvuuu8wMqxeZYudN2UgtG54pmb2vCyS6nOqerJ9ASXofudjOOHXy79vft1dV5S6Db2+amuhKpU3Mk28ktEnr/yl+0UqYX4EMvf/zqucevXu3xq0fJGCWVEHaXjBTgw0LrVPm9XiASE+6xOcaa7THeYym3R0ZhYCTXS8syPD99h8u3yEKU4I/GdYJL8iPnGU2yclNYyt8hYeSaARgavUgk/7cwiZOtC8dFIJCHXlQPdSdfGZnUfngr7wdq9wB0DVLr5MufRTeeX5Pk/XDVxJWtSuVCzb0oh8tSrH69XtVVRf3ULI6qimUEL2fst4PZ4X734OjFUXf/4HDQnb6cBd1B8Pvhy9nhIZuxQ+t7zXx/d8YNufLuzK0cc3fWMjr3rS/zeJZYLyhSmvWxzvD8tIFif+/FXr8Fd4OYIhkLbCQrXMhOg7fmzKUbU7KKbBgDjSz6o5qgldHRocRVydt00tbaztyZNX7VvVQwbgOVVb/KD+EI8kNIB84eQ6hfdVHdSzAt6OD6I1itpkzhRymyjIatl9Dh8uCGSc6mBNqIAuaiOHcr+AeX9k7NRvauDWtELow7Z2tRniKw4xgGAaZ6J+24FlvOzy6vwINp/kweJSHxSEaW0acPQM/xzip/5cZWIFg8NxSYfXAy6e8/8n/lZQ== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluation":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-evaluation.api.mdx b/docs/docs/reference/api/create-evaluation.api.mdx new file mode 100644 index 0000000000..71002d395d --- /dev/null +++ b/docs/docs/reference/api/create-evaluation.api.mdx @@ -0,0 +1,1466 @@ +--- +id: create-evaluation +title: "Create Evaluation" +description: "Creates a new comparison table document" +sidebar_label: "Create Evaluation" +hide_title: true +hide_table_of_contents: true +api: eJztWE1v2zgQ/SsEz27iDfak0zppgAZNWsNJe3EMgZYmNluKUkkqiWvovy9mKMmU5Y98oNjL5hJLnHkkh28eZ7TmTiwsj6b88lGoUjiZa8tnA56CTYws8JlH/MKAcGCZYBqeWJJnhTDS5po5MVfA0jwpM9DuXk+EtGCje80YY5/u7saXzwkQSsTiADO+1xNwpdGNbWeQD3hegKHVXKU84gnNH0O7Rj7gBn6VYN15nq54tKZHaSDlkTMlDHiSawfa4ZAoCiUT8jv9YXFDa26TJWQCfxUG53ISbG0byxR/uVUBPOLWGakXfMCddApfjIqCXaW8whU8SosBi2VKztJBZvu+1aB5IYwRqwBr0iCwq9SiXb3D3Ng4yfWDXLwN97KFYRc1DBqDdRbckf3deatmjxh3JTPp+rGaC5csYyt/Q4AntYMFmADwHM3YLZpVA56J59iAMzXGXq8b8cwmtR3F2plVnIISq4Nu6LJiH8muQhorsYrn4J4AdEwLPjIvubJz78HOa49qE+t8/gMSVxPQM24ahqK7xe7K9y1otpn/+vpmUuqJcHBNUa+QysZA4mKh7ROYOMlVmRGJhV59feDRtE+M9o0uleJVgH/hwdiIwNiFBzu2vzottjm/k7AdonUYFCzjCzxtFIdXVUVnbItcW39AZ8Mh/uvq0G2ZJGDtQ6nYpDbmr0j1rWxp06pL68Pp4dPiNTJRmBwjesR+7K1qn0dhpNDuzcLy3fs3stLAaZHB+wC/EEIA2RDi3UtttLBZc8u09ylrX/jekjVdUWzwMJzvRcSAIqZ1wpU72Oj9D8g1vqfzUGV3MYdm/07WeOEYk5ude9ipAxlYKxYQZvIlIfQnOyYpNDYLT8yWivROLBYGFsJBGht62aVANz6tANX68/K9kDrREXZyNNC0+Ccgp3z1kcYCEcoibR5mOy5cf91SOESaShQiocbBin110l1XtQuJtVDcR+F/bhxz63GhDV2ANWrZtWHcHhHZmLJJTUSk5yMYsYA4ya17eXT20r0XmwF3uRPqD+I3O1DCgU5Wf2aSIGt2UPQhNxmOcMymD05SFrY1indlIzqcIONeC/TNuxLQEe5Q5rdlTkcPwst4+y7dcxGG11er7TuV7TXyQqVSJ/pUAjEfL9YrqP4+O+vXUN+FkilZMZ+eb+6VUnBCqgParPKkM/qCe7IpyH0e7E7L6zxpY5HZxSEFvKk1qQXbb0rBYF4yj3AF9+WnHvRSYhPeRvz2beOjD9+uyRoT7KB7gP5sM3DLHHvjAmViwAvhljzipxD08QNuwTyCsRTz0ige8aVzhY1OTxOVl+mJWIB24kTIU1FIvt32j2iUXaApXREWktJItyK80fjqM6w+gUjB8Gg6Cw1ukTKeBF2zTRFeyM90u/oiio9Kt8yN/N209xIXsPReuF8k42TT8l8+i6xQELbsmyPdasynzchsd4MdjoelYgDY6YLDvne41dEOt1rV4d4edLi/swvKW6kfcopaeyXRkZyL5CdoEicw1p/W8OSvk+G+M6wd2Gh8VSe8SGgzTfjJDAWow5KWH1gWZZTt3IHI/tkM4OEgBzOhA7y+JG0tbL1Rnf/g81JNQgfP7rRQQpKW0NbXdSa11UTzRWxJ1/GUr9dzYeGbUVWFr3+VYDAfZvVNMMdjmqJ6LZvMWHOsI7H1pg1/II1pq7K+5KIceo9Rgts7aDsLpGD89faOD/i8/iSW5Sn6GPFEFH7iEacva67pqujdmiuhFyWqZMQ9Jv79C9/g8/g= +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Create Evaluation"} +></Heading> + +<MethodEndpoint method={"post"} path={"/evaluations"}></MethodEndpoint> + +Creates a new comparison table document +Raises: +HTTPException: _description_ +Returns: +_description_ + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluators_configs"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Evaluators Configs", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_id"} + required={true} + schemaName={"Testset Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + rate_limit + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"batch_size"} + required={true} + schemaName={"Batch Size (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Batch Size" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"max_retries"} + required={true} + schemaName={"Max Retries (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Max Retries" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"retry_delay"} + required={true} + schemaName={"Retry Delay (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Retry Delay" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"delay_between_batches"} + required={true} + schemaName={"Delay Between Batches (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Delay Between Batches" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>correct_answer_column</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_names"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Names", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_revision_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Revision Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>testset_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>testset_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + status + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Error"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + aggregated_results + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>evaluator_config</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"EvaluatorConfig"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Project Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Evaluator Key", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Updated At", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + result + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Error"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={ + "0-item-properties" + } + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>average_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"Result"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Error"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>total_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"Result"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Error"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>average_latency</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"Result"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"Error"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ opacity: "0.6" }} + > + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={ + "badge badge--info" + } + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Updated At", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "app_id": "string",\n "project_id": "string",\n "variant_ids": [\n "string"\n ],\n "variant_names": [\n "string"\n ],\n "variant_revision_ids": [\n "string"\n ],\n "revisions": [\n "string"\n ],\n "testset_id": "string",\n "testset_name": "string",\n "status": {\n "type": "string",\n "error": {}\n },\n "aggregated_results": [\n {\n "evaluator_config": {},\n "result": {\n "type": "string",\n "error": {}\n }\n }\n ],\n "average_cost": {},\n "total_cost": {},\n "average_latency": {},\n "created_at": "2025-05-15T13:01:54.097Z",\n "updated_at": "2025-05-15T13:01:54.097Z"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-evaluator-revision.api.mdx b/docs/docs/reference/api/create-evaluator-revision.api.mdx deleted file mode 100644 index c450a86720..0000000000 --- a/docs/docs/reference/api/create-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-evaluator-revision -title: "Create Evaluator Revision" -description: "Create Evaluator Revision" -sidebar_label: "Create Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWltv2zYU/ivGedoAOU7TNt30tDRpUa/tGjiXPRhGQEuUzZYSVV7Seob++3BISrZ8q63YQ7AmD4kj8XxH5+O58chT0GSkIOzDm3vCDdFCKhgEIHIqiWYi68YQQiQp0fSOlkvuJL1niokMApD0q6FKvxbxBMIpRCLTNNP4keQ5Z5FF6XxWIsNrKhrTlOCnXKIOzajC/1ZAb1hzTyQjmb5jsdWTTT4lEPanoCc5hRCUliwbQQCJkCnREIIxLIYiqFZkhnMoBgFopjleqKxv3TrsVhcF4JuQXxIuvh1A5d8eekHjzMpDWLdg1QGscRr2T1edJSI1S0i0TwVnHtJrSLgNjHnsujsydRcZpUW68gGGQnBKso0au6p17hCKAOGqrX8IYrXXHnRsUpI9BPCdBSiKoFwkhp9ppGGFe721nC3jFQGkVJP6U5A4ZpgbCL+s8bpuL+dgWabpiMq6pnRYvzJv3mpdEDEZGU7kL28N538qkbW7WW70r7BoK2IwTdPthIiUZLKR1rooLHG7SfYjMokSS/75mBj9S3xgSv+I03U2LkrvxtC180LISEq3tH/5CVC2CCCmKpIs174iNYG6mIMoAlDcjJpCXaHsVqHY82X03JbulTJYuZmkMVb/FfV3Vf2oo/Zc6YcC0WdoWhpqL6hcZMq54MnxMf6psQlXJoqoUonhrZ5fDEHTDiISxgktePTMinO7Arc0IYZrCI9r5Xa+8ViX859akKcW5L9rQYjR4zXNQBNwh4Y5DTPCdqi4tK2ZzYUbMpxNMVjklSKjxjn3oxd/6r5+0u7rk9EN2q8lqR36Lyf7P2/ANtG6RQfWhKPH3YK5eUZ8R/Re06DriuLWmSXL5PEhlNw4WK8kppweQMmFg/VKSrqGkz3WupKs1xNf7Uq+9qqlZKvSUhK2Vy0lXZWWeyqXW8nt3fXWi+/ltBDA/gz1HJLFalKvzfuz3kjWFOVGMofAmyNwRBhTElO5c6Y/FCWPzyE29CY9mlBJs6iWbcoHHexUUd75bUAK7BFw2x15RDX5UTY6O+zBlSceO0qS5yzbtgFapHiXbqtUZDcei3hj73fSRQA5kSSlukFU/+S+sl74ckYpbhSV9yyi27CL06KdfNBDF3ZSlLCRcS+qDqHrvKZgp7nbBbGHhKWz2C4YD5WvhmqFndC9ODlZnsHdEs5ia1/rjZRCNh/AxVQTZout98rFBVxEtbu7RNVcrXCOPDP7g4hI2dinarScblYOGNyS9UstGa1rvPuj2Sna5VT7dbWRUUmvY3e9GReOvk0b/O76+nIJ0O1tfVNdbz0bRrR6s/e1KdVjgS91c6EQPCd6DCF0cpx/0m+dagyiOuVEVHXAhbRNmP2pa6pgrHWuwk4n4sLER2REM02OCOuQnNkoUjQykumJFTm77L6nE1fEIewP5hfYsuJ8pL6s2h6Ss/cU2XLnST/LYv+4jQ+AodWuUbMMoq/2Zi+m33wnac7p+hfNq+e68Dwhv71MTl+0X7569qr94uXpSXv4PInaJ9Hvp8+T01OSkFNYM6HdVrg+bN1Z5S5CTR6vNuXcVqia3s1N6Vzurc/Zqmt+TObfHPhp1WzEUg0SZnFad/jqsuuOq0yCvW6WCOtJ5RjU+mnr7LILc+c0OD56dnS8hFtbjHmRRDYvlm5ob0OwEBBVKOD2pjYpgqYk/WN2A58MA9BPBz3eprhdmIL4wND0u+7knLBs7rDjQroPPqTnnUzZ3OXDGgLAXDXGRBD2YTodEkVvJC8KvPzVUImxO/COM0T6+oPqRGTD+guduDqJFaNt0yUu58ZF7UL1wMzuJM6iiOZ649rBXK66/HR1DQEM/ZdMUhGjjCRoG/4OAfA7K9paFU7dtSlwko2MHUiDw8SffwFOY/Ua -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator_revision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-evaluator-variant.api.mdx b/docs/docs/reference/api/create-evaluator-variant.api.mdx deleted file mode 100644 index 076c593466..0000000000 --- a/docs/docs/reference/api/create-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-evaluator-variant -title: "Create Evaluator Variant" -description: "Create Evaluator Variant" -sidebar_label: "Create Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJztWNtu20YQ/RVhnlqAshxflJZPVWwHVpPWhu24D4JgrMihtMmSy+zFjirw34vZpShRt8iyAgSF/SBLy5kzu2euywkYNtQQ9uDikQnLjFQa+gHIHBUzXGbdGEKIFDKDDzgVeXhkirPMQAAKv1rU5p2MxxBOIJKZwczQV5bngkcOpPVZy4zWdDTClNG3XJEJw1HTr2XkDSI8dvDZ+CqBsDcBM84RQtBG8WwIASRSpcxACNbyGIqgksisEFD0AzDcCFqoztzokiA8SfUlEfJpjyb+KSFLC0wZnrDI7NFCp4QsLSTCOXQeu04k1w+R1UamKzcwkFIgyzZa7OrGmUcoAoKrXPMSxMoXJejIpix7CeClAyiKYCokB58xophdcv97x9kyXhFAiobVd8HimFNQM3Fd43WdL+dgeWZwiKpuKR3UV+aPt9oWRFxFVjD1y3srxJ9aZs1ullvzKyyelTC4wXQ7JaYUG2+kta4KS9xu0v2LmCSNpfj8mRj9W37k2nyP03VnXNR+HkN3PgohYyluef7lHZBuEUCMOlI8p6PuCnU+B1EEoIUd7gp1S7pbpeK9r/9nruOsVKGOwxXG1LSW+8aq6l7DvPENCwrCnmEZZdEt6Fxm2sff0eEh/atRCbc2ilDrxIrGTSkMwa59L5LWKy2E8+wQZ06C/JkwKwyEh0Wwul2uq/evjfO1cb42znWN88qaHTrnktYzWqfX/Z/3zk20btE8d+Ho5+6e/goVPzCzZfmKmcGm4W4/6634nhY3Oo4sm8c/wsgnD1saiVHgDzBy7mFLI1O6BuM9FvwpWe/GZcmf8rVXK1O2KitTwvZqZUpXZeXl41kA+9se7ekZ496qFvIM9WoQK9xUd3J0tDy33TPBYzeVNS6Ukmr3oS1Gw7hwE4FvEIsCQka1p8+pxf1ioafMTv1R+g2Sp1I9nBsbKwfN+oXWbIizArpe1JHRuKOn35u26VzedCk35/AZvZ7d9cc49/Rt8u/l3d31EqD3bd2pPqNnI1DjvnoxlaIZSXp5lUtNv3NmRhBCK1f4yPGpVc1eulUO0boFAWhUj6i085ZVAkIYGZPrsNWKhLTxARtiZtgB4y2WcxfyGiOruBk7lc519wOOL5HFqCDs9ecFbimefITUxSrnsJx/QOLK9zDoWDOSiv/r3R4ApzOPvBaRQZF6M3sBd/GNpbnAtS/U6jcBOE7Yb6dJ+6R5+vbN2+bJafuoOThOouZR9Hv7OGm3WcLasDDbb6tUG9e3Vaom8LlJm+5li7NytVaOuuXdrZw4Z2NSNQzMor4ePtWyL55VXlIpzBLpPDO9LDi/NzrXXQiAIsQjHB68OThcwq0JU5VhkXPA1K3uMQQLAVaFFgSAqSsxYJClf8we0M4onssJv8TbkAULg0wZZwa/mVYuGHe1xO1iUiZID8oEgblrpqYzl0kCAVDejyirwh5MJgOm8ZMSRUHLXy0qyoR+qTAg8npU1EbTnJjAFxy7m62rvk1XekhcWJ8DC5WYqqTX6EQR5majbH8u8a+vbu8ggEH5ajqVMekoRkejzxCAXnSTtos6tzYBwbKhpeIZgsekv/8ACWvr4Q== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/variants/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator_variant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-evaluator.api.mdx b/docs/docs/reference/api/create-evaluator.api.mdx index d8ae04e20b..ed2d717a74 100644 --- a/docs/docs/reference/api/create-evaluator.api.mdx +++ b/docs/docs/reference/api/create-evaluator.api.mdx @@ -5,67 +5,957 @@ description: "Create Evaluator" sidebar_label: "Create Evaluator" hide_title: true hide_table_of_contents: true -api: eJztWEtv20YQ/ivCnFpgbalGTzxVsR1YTVoLttKLIBgrciRtuuQy+3CjCvzvxexSfIiSIisOEBTxQQaX89j5Zvbb4WzA8qWBaAq3z1w6bpU2MGOgctTcCpWNEogg1sgtPuFWBBjkXPMULWpS3kDGU4QIKoknkQADkUEEnxzqNTDQ+MkJjQlECy4NMjDxClMO0QZ4tr5feDt2nZMdY7XIlsBgoXTKLUTgnEigYJVE5qSEYsbACitpodp/b5RAQW/IIRr7RiVrclL7t9ohg1hlFjPr/ee5FLGPt//RqIzW6t3lmtCwAg091SB0Xi2kx7IZT1tAmKfYGavSvUHPlZLIs6NRjkzvOlgoGJlr7eZcixV0pdGVS3n2NQbvvIGiYFshNf+IsYU92XrrMevaKxikaHeqgyeJoCRxOW7heqh+GmZFZnGJuu0pnbdXmuHt9wWx0LGTXP/01kn5u1HZxSjLnf0ZdmMlG8JiepoS15qvj8LaVoUOtsd0/yAkSaNTn98Ton+q98LYL2F6KMZd7ZchNAlVWPLYSfF3d0C6BYMETaxFTqGea+qmYaJgYKRbnmvqkXRPOorXnuX3ytbcOW0Q4D72DUYeAvVCUZA1jSZXmQmVdTUY0L8WSPDo4hiNWTjZeyiF4WyGjpULSjuFWu/22ktQphbcSQvRoGBwgEp/UPwPir939gyO72i9gOSD7v+c5Y/BegLNn4PR983zoc9Onrg9sStOuMULK/x+DnsJnJz0hh4slyffwsmHYLZ0kqDEb+DkJpgtnWzhmq/pc+OVviO2YL1Z+w+JGq9X9bJFq/KyBexVvWzhqrx8fSPB4PW25z/UTrhA9t0dp+hVrURoQ369uup2Hn9xKRLfV/Rutfaftme2HQlaLqTvAcKVsCsgVdx6+xL2nRU7t0gd7nsVNki5Sc2y0fhUKalvCGP4EmvKPCzqwehN6O2XGkKKK7gu5RopruEN6B4O4ybAdyyxd5PJuGMw5Lad1HCGG02P7zRWimYZuTLWzy/sCiLo5xqfBf7Tr7os0wcGBvXzdrThtIQIVtbmJur3Y6lccsmXmFl+yUWf58LXtMHYaWHXXmU4Hr3D9R3yBDVE01lT4JHKJxREW6zKBc/FOyRoyqHK0NmV0uLfkOVyqrIKWhQ7FeZDPeu4/czTXGJnVlG1ro0WNUxC2k1mtVb2iPRct2p1f1HdonXxtLNQLQfWqcqbOCRbKB9xmdmhx7M3HI+AASEfLAwuf7kcdOy2hOmw8tgf1i1c/jWwncRVKQMGmPqTChZ5+lv9gnZG5VG2xqW9PcW0c/OXebP42fZzyYU/it77pqyzKZR1Bo3vDAMM6KysqCKjKWw2c27wg5ZFQcthbkbllAjD57IxOfsb191hGz3RNnw5PnMtSMdXH9tWCxkLuteB4y78Aa91O3xHXBQ0hnGMuT0qO2scs/H94wQYzMvhW6oS0tGcEKDfCICmjKTti9KvbUDybOmIoiIINunvPzvZFWA= +api: eJy1V21P20gQ/ivRfLqTHBICCVd/ulCoyvXuioDeSRdFaGOPky1rr7svtLnI/72aXccvSQgponwAM55nZveZV6/AsLmGcAKXj0xomAYgc1TMcJldxRBCpJAZvMdHJiwzUkEACr9Y1OZcxksIVxDJzGBm6JHlueCRA/c+a5mRTEcLTBk95YpMG46a/qstbr3KWIrOXLb8mEA4WYFZ5gghaKN4NociqCSZFQKKaQCGG0GCvwlbBBCjjhTP6SgvNXXRMFEEJRPxPTP7DAaQSJWSDsTMYNdwd56nvbz1ZjtjQ05sHv8MJ5+82dJJjAJ/gpMLb7Z0sqZrtrzn8YF+rOXxQWSdLztXcZOvV/WyZqvysibsVb2s6aq8aGHnL83VW8IWAbze8fyZEuHaww6TcvYZIwM14F+pHhIhv75zkG3TRQApGhYzw9oGWRxzKjImrltt4AAeeGZwjqrtLZ21JTMpBbLMiXb7goiryAqmfnlnhfhDy6x7leXW/ErXa12XbHCD6WEgphRb7mW5DSXGt/09hf1rzSZl6Barz4XpwiO3orR1hBp6WbXsXVo0FrjCmIZJ3dynO+A3foBAQWZqmFEWnUDnMtM+Bwb9Pv1pdXO4tVGEWidWdG5KZQheOociaT1oI6UaTcdpFEF7ZD3PdIOug2huEuhPtZu88saFo+90MNgm6B8meOyu37lUyg3tF7ITo2Fc0FOZ9ZsKQkattz9StNNio1Lq6/4p/QGJ9lTPG/GpWlldBlqzOda187SqI6NzR2+fCwDdy7su9RqxqOn17D59jQtP376ien93d71l0Me2HVQ/+zqXjU0sRbOQtKXlUpPNnJkFhNDLFT5y/NqrElb3IACN6hGVdsGxSkAIC2NyHfZ6kZA2PmJzzAw7YrzHcg6b7sfubectqbo2pDGyipulsze+vvqAy/fIYlQQTqZNhVvKLZ8tbbUqUCznH5B485sfjK1ZSMX/9ykQAKcDLDyKiKGsvam30MtvLM0Fbm2VpbUqDdoXqsTNxQ4G/cGw2x92j4d3xydh/zgcnh71T8/+g/Zutk+vuV7t09vYkOAkYb8Nk9Fpd3h2fNY9HY4G3dlJEnUH0ZvRSTIasYSNYGvlORS2scMcCvNLSU3Wj2Cr5YHr+8hqI1Pf5AMSNCJVyRY2ZVk1CBrbQmPCURbzCL0wklnC59Z/r5DI1Q3PEumyqyyxMnXPWfSAWQwBUBn4JOgfHR/1n8r1EtAZX1+VHZRFppFYXo1C0qqmqo4gAExd+wSDLP29fkGnpJp1163s7ajwjc+Ysl4MfjO9XDDu+qPzviqLfwJl8UNjXmkIgBrYgtpEOIHVasY0flKiKEj8xaKiMp4G8MgUZzNibULdebEu6BU84NLNQjdGuq6HkrqwvoA3Rgq1e48YRxHmZq/utNHJrj/e3kEAs/LjMpUxYRSj+9DvEIA+UQntUsvJViBYNrc0BULwNunnO7sd/nM= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Evaluator"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/evaluators/"}></MethodEndpoint> Create Evaluator -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Evaluator"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "evaluator": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-human-evaluation.api.mdx b/docs/docs/reference/api/create-human-evaluation.api.mdx index af0037c4ee..4689429aad 100644 --- a/docs/docs/reference/api/create-human-evaluation.api.mdx +++ b/docs/docs/reference/api/create-human-evaluation.api.mdx @@ -5,71 +5,408 @@ description: "Creates a new comparison table document" sidebar_label: "Create Human Evaluation" hide_title: true hide_table_of_contents: true -api: eJzFVk1v4zYQ/SvCnJU4DXrSqWnXQIxtmyB29+IYwlia2NxKFJccJXEN/fdiSMmSYie7DbBbX2yT8/3ezHAPjBsHyRKu6xL12fQRixpZVdrBKoacXGaVkf+QwG+WkMlFGGl6irKqNGiVq3TEuC4oyqusLknzvb5D5cgl9zqKouh6sbidPmfkrSRROrCZ3us74trqTnZ0CTFUhqyPZpZDApn3n24l0pQOkUIMlr7U5PjXKt9Bsvd/laUcErY1xZBVmkmzXKExhcq83uSzk7T24LItlSi/jBWPrMi1sqnK5RfvDEECjq3SG4iBFRdycGVMNMuhieERrULNqcq9qmIq3bFmE3cHaC3uBpY+Bf1oljuR6rNLg8JxDKTrUoAL5cB0nTI5DndO6U1BaVnlVPhjAbNz1WO8EJNNDEqbmt8X9yyoigA5dsRfqdgiSLVVc4xcn/DXy8+DRNNHUK0/U8Yt6AHlZQfVGIfjMh5SHYV7iGNQpD/pyXdEXyxoGonCkjOVdoEhlxcX8jVuk3mdZeTcQ11Ed60wvJuDb1fzu3Dvv9D+2wH8sZz+Cl1OUOXAoDal43gH7uaqNAX1Tm9qNjW3DPn58vKYFJ+wULmXjabWVvb9jMiJURUjoMcCRZWNblHvbh4gWR4T4nCiNNOGLDSr11nye5W1fRBD6TZvYf4HOYcb6in3uqgvRvRNoElewXUrtxpSuCtvqO7raXwI5TvlrBORjXVkMGBbEm8r2UWmcqJikLeQwMQT9owG2zMGR/aRrPOVr20BCWyZjUsmk6yo6vwcN6QZz1FN0ChoVqKR1Vbxzqtc3c4+0u6aMCcLyXI1FJgLNwLaY7FDodGojyR5ayx9y9a8raz6p9uYSki5DVqSmLDurt+i02cUhg+3YI/daN4su/PViQ4/2cjdthlqDpdH76ibLoMRpvRD5dPsRpEvYnR1O5PAyLrQbhfnP51fwMsHzEhY2g8z335djfw1xC/QOuAkM6H0vQdMWP7SX0gFhREl6oG98F6K/B6JpsP3yiisfT8J/ocnVgsU0zNPTIHK97cvwL5ldzuOR+xexbCVDkiWsN+v0dFftmgaOf5SkxUCr1qerAWmpcyVbUflPfxNO0k2pH22CKtZzAfqvhiGMqiCxlUmSb4puxo06e3NfAExrNtnoawOSMDik0wWfIIE/BszpCTvRjnbQ4F6U8v8SiDYlM+/mmTeNw== +api: eJzFVk1v4zYQ/SvCnJU4DXrSqd6tgRjbNkHi7sUxhLE0sbkrUVpymMQ19N+LISVLip3sNkBbX2yT8/nmzQz3wLixkCzhypWoz2aPWDhkVWkLqxhysplRtfyHBD4aQiYbYaTpKcqqskajbKUjxnVBUV5lriTN9/oWlSWb3OsoiqKrxeJm9pyRt5JE6cBmeq9viZ3RnezoEmKoajI+mnkOCWTef7qVSFM6RAoxGPrmyPKHKt9Bsvd/laEcEjaOYsgqzaRZrrCuC5V5vckXK2ntwWZbKlF+1UY8siLbyqYql1+8qwkSsGyU3kAMrLiQg2ldR/Mcmhge0SjUnKrcqyqm0h5rNnF3gMbgbmDpc9CP5rkVqT67NCgcx0DalVK4AAem65TJcrizSm8KSssqp8IfSzE7V32NF2KyiUHp2vH74p4HVREgy5b4O4gtglSLmmVkd8JfL38XJJo+gmr9hTJuix6qvOxKNa7DMYyHVEfhHuIYgPQHPfmO6MGCppEoDNm60jYw5PLiQr7GbXLnsoysfXBFdNsKw7s5+Daa/wr3/gntf7yA/y2nv0OXE1Q5MKhN6Tjegbs7VdYF9U6vHdeOW4b8fHl5TIrPWKjcy0YzYyrzfkbkxKiKUaHHAkWVjW5R764fIFkeE+JwojTThgw0q9dZ8luVtX0QQ2k3b9X8d7IWN9RT7nVRD0b0Q0WTvILrVm41pHAHb0D39TR+DfCdctaJyMY6MhhqWxJvK9lFdWVFpUbeQgITT9gzGmzPGCyZRzLWI+9MAQlsmWubTCZZUbn8HDekGc9RTbBW8HLZTv1t9FFEoVmJucwZxTtvb3oz/0S7K8KcDCTL1VDgTogTqDAWO1QBa/WJBBSNpe9nx9vKqL+6daokgG3QkqyFkrf9ip09o9B/uCL7wo6G0bI7X51o/5Nd3q2ioeZws/SOutEzmG9KP1Q+zW5OBQw/YPaVtG95MjbAe3H+0/nFa6C3CtH0Zt72KWa+Tzu8vBjEL8p6KKgMj9I3KTBh+Ut/IWgKdUrUA3vhYRX5hRPNhg+bUXj7fmT8D2+xtmhMzzypC1R+EHgA9m0btHN71AarGLbSKskS9vs1WvrTFE0jx98cGSHzquXMWkq2lAG07Wi9h6+0k2RD2meLsMPFfKDxi6kpEy1oTDNJ8k3Z1aCbb67vFhDDun0/yo6BBAw+yQjCJ0jAP0ZDSvLAlLM9FKg3TgZdAsGmfP4Gl4/sxg== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Human Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/human-evaluations"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/human-evaluations"}></MethodEndpoint> Creates a new comparison table document Raises: - HTTPException: _description_ +HTTPException: _description_ Returns: - _description_ +_description_ <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"type":"string","title":"App Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"evaluation_type":{"type":"string","enum":["human_a_b_testing","single_model_test"],"title":"EvaluationType"},"inputs":{"items":{"type":"string"},"type":"array","title":"Inputs"},"testset_id":{"type":"string","title":"Testset Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["app_id","variant_ids","evaluation_type","inputs","testset_id","status"],"title":"NewHumanEvaluation"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"app_id":{"type":"string","title":"App Id"},"status":{"type":"string","title":"Status"},"evaluation_type":{"type":"string","enum":["human_a_b_testing","single_model_test"],"title":"EvaluationType"}},"type":"object","required":["id","variant_ids","app_id","status","evaluation_type"],"title":"SimpleEvaluationOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_type"} + required={true} + schemaName={"EvaluationType (string)"} + qualifierMessage={ + "**Possible values:** [`human_a_b_testing`, `single_model_test`]" + } + schema={{ + type: "string", + enum: ["human_a_b_testing", "single_model_test"], + title: "EvaluationType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"inputs"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ items: { type: "string" }, type: "array", title: "Inputs" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_id"} + required={true} + schemaName={"Testset Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_type"} + required={true} + schemaName={"EvaluationType (string)"} + qualifierMessage={ + "**Possible values:** [`human_a_b_testing`, `single_model_test`]" + } + schema={{ + type: "string", + enum: ["human_a_b_testing", "single_model_test"], + title: "EvaluationType", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "variant_ids": [\n "string"\n ],\n "app_id": "string",\n "status": "string",\n "evaluation_type": "human_a_b_testing"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-invocation.api.mdx b/docs/docs/reference/api/create-invocation.api.mdx deleted file mode 100644 index 4c7e401e25..0000000000 --- a/docs/docs/reference/api/create-invocation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-invocation -title: "Create Invocation" -description: "Create Invocation" -sidebar_label: "Create Invocation" -hide_title: true -hide_table_of_contents: true -api: eJztW1lv2zgQ/ivGPO0Ccpymbbrrp02bLuptuwmStC9GENASbbOhRJVHWq+h/74YUqfP+ALSgHkILGoO8uMxo/mkKWgyUtDtQy95ECHRTCQKbgMQKZX2qhdBF0JJiaZ3rJSBACT9bqjSb0U0ge4UQpFommj8SdKUMyfX+aZEgm0qHNOY4K9Uom3NqMKrmsm5e0KyEbPtER0SwzX2xCgtYghAT1IKXVBasmQEAdDExDiOUmBsYoL9JEYLHJFmmqPGNYtTTm8kCemFc5AFcM+SqOmIRGMRrvBT3KcPhEMAKSeTJV4+ou0sgHBMkoTyGTcpW+FEaJ5CAD/oAAJQ0T0OJ2VL/LzL7WdBPqlTIMnkYgjd/hRIFDFEmfDLBsaVRLMPWVC2sETTEZX1psTEg2bLQAhOSWKbFvuCkMnQcCJ/+1d8Ykr/o0TS7iWp0b9XCIjBNxrqpivOIauNeFbbjvfR2jeITBZATDV5ugj9bThfhw/TNH6cEpGSTFai0lTdDNHPiGQWQERyRD2OS3GsJM+JQ03SIZU0CR1GzfPvu6Fy0oSuKfBApcpPzkegO9fbr7l6FoDiZrStmWvUzQJg0SoLAQyFjAmeecawaKXFXgTZCuyuCswWGMkCB9vdA5GM5PHIw7cxfJI+sHlwPH7r8dNUaUX9wtsWOL9zdwXQ791tEaw9uXjwdgDP7+F9gOj38bYo4kO5IVpID93W0Pk9vDuEfgfvksuERFGP3GbIrdCrlQqvqqpDFgBnyf0jy4XNCVApSe5Wj3slcilJWj1bG9XYqx1M2VG11gD3iSX3i2tbeQ3oeY1vfbnqk534RSaxuM8kjbAIbQt7jUpVsWTqa7as47+zXMFaq7XC/wozV45kgCzL6upaGmobVCoS5Sbr5PjYldZVKFnqUni4NmFIlRoa3rrKhSHYlqsIhXFKM+XKqvvvrERQ1feP8WBoUBzLDjNHsUR3RD/yGImIpm3N4kXHQK1HzmzrzFYjTRodwskXZzZ3ElFOD+Dk3JnNnRRwDSZrdtUmB28B1ttJvm0LvPbqpUCr9FIAtlcvBVyll6d4mAWe43v+HN+F0buQfE79WbN8qxBaTk/NaW3AT20D6i9B9D0dKD3X57m+XwM+X6XYpUrhuT7P9Xmu79dD0HN9nut7OiD6fbwtip7r81zfU4DQ7+BdchnP9W2OnOf6PNf36HrVQbi+DVdlpViScZll9l6dnMxzd18JZ5GVbr2XUsjtibuIasJsUX7J5HMRNu5uUsK8nZ2FGuYVTBCrUY06LE+KqriqFBnRakqXi1owWjd4d910cktfoOtcrn4klvA6dJcP49zBt2pmP9zcXM4ZdHPbnFRHsbV69S/JYqrHAj8zS4VCoynRY+hCJ8WQSn90KgJVdZAjoRKjgZ0eIzl0Yax1qrqdTsiFiY7IiCaaHBHWQR4F94CioZFMT6zK2WXvI518oCSiErr927rANS4gtySaYuVskJR9pAhOQmK8PjN6LCT7rxgLclkwdlo4elyaV9WXcu9/EjyYYe7Lt4IHq7gtR1eVHFTJLBV0kqN/KpKjqszPlZrL4nIZRatV5cJhdY3nFrwckj9eD09ftV+/efGm/er16Ul78HIYtk/CP09fDk9PyZCcwqLy62Ec1FOrfXuolfAOZPqQ+CwqA+3bx0yh5IDmD4nUsoftfftpPI4ezPghkVr8SHOIlVsk/fu1XctybQBiyVDYEzyPVWc2PrTOLnsQ1FwfH704OobZeNUQxvSDhBb04vi3tyGYCURlCEKeP7a5B2hK4r+qG9gzjHf4AkNlb1F4bHSoDESa/tSdlBP3boN1P80jZx/yyAn1l48wlcP4P8Yg2+3DdDogin6RPMuwOY8R/dsA7NoaIFZ9TG7GRaicwj2d2LecbBbWtikIinPjQuNMRobZktM4C0Oa6pWyt7U84PLi+gYCGOSflsciQh1JcED4vwuAX6i7UXWnrm0KnCQjg0lUF5xN/PsfQhA8Fw== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Invocation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/invocations/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"invocation":{"properties":{"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-legacy-application.api.mdx b/docs/docs/reference/api/create-legacy-application.api.mdx deleted file mode 100644 index dc769f9e66..0000000000 --- a/docs/docs/reference/api/create-legacy-application.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-legacy-application -title: "Create Application" -description: "Create a new application using workflow data stored in legacy format" -sidebar_label: "Create Application" -hide_title: true -hide_table_of_contents: true -api: eJztWt1v00gQ/1esebqTTNND9+SnCxRED+6o2sJLFFUTe5IsrL1mP1pykf93NLuOYzttaNJyiqB9SBN75je78z1rL8HizEAygmFZSpGiFaowMI4hI5NqUfJvSOClJrQUYVTQTYRr0sgZUcyiG6U/T6W6iTK0GBmrNGWRKCJJM0wX0VTpHC3EoErSnu80gwRSD3oViK5aqBCDpi+OjH2hsgUkS0hVYamw/LVFN/hkeHVLMOmccuRvpWYZVpDp0W7enEq/9SVgsXg/hWTUJxDmKnXGqrxLZBclQQITpSRhAVXcXCqclFCNY7DCSr5waqKXAaGKGY6uUTq0Sj8E8VUDEkDnLsfiIYBvPEBVxSsiNflEKdtrRfTOm6jlIq+97jZxqxhysthdDWaZYCaUZ13r9NdrrBbFrA0rCksz0l1J+aR7pb3N22VBKnTqJOrfXjsp/zaqeHZalM7+Dv09M4awlN+PCbXGxVb1dllhQ8fbeP9hTTLHhp8ekkb/Ve+Esd/T6V177HPvpqHL4IVQYE733P/mCpi36iW8/aBOWhBVDEa62b5QF8zLq8J+NHVz1DVp84AVf6zZqxicFvuifNAiIMj9ESQjzAkz0js7+49SyWMYUGTbEGKoa2MCzolse6bOtuboc5qSpiKlNshqoeOdwupNbQZWga+s97XIAaWlw0v0OxjgotY6l1MsS1HctwD09btLtVkJ8lbnNLa36wfuKoYSNeZk9wjpX9lR7uY9W+uTrUT6WqR0H9Va7WgnB6yhq5hb76mYOY2blfFxZL3sCNipDT1B3yFtdKG7YITR5la5PIQITRnPR+1RYvxduPMwvkDFsGsYVo2/YEpVmODzz4+P+V933rpwaUrGTJ2MzmtiiPedglLlAlMvhNomYArugabopIXkuIr7w9Nd5fZpjPqVx6j3zu6RNTe4dkibgfcnn6S2qfUeo9Q+OjrsWSqcFWVXuLUrabXTGVp6ZkVO22tPgI2GXlmuzH6EkA8BthaSkaQfIOQkwNZCVuqaLK4ebwBZKevFIuJZZK2vR5Wy0lYjZaWwR5WyUlcj5fBmvafh/2n4fxr+f5725Gn+P8iu6yB95ekI4P88AngofzOiV37e//P5882J/iNKkYVnpq+0Vnr/cT4ji8IX29or+wRSpZ27u0RVq1YER25tWzXagtzMNtNNe94yBme09uy7Sb0yoku++70jGN5XEF3TtQt3o96g3bu3cRLUt83Aby4vzzYAg21zsnPFD69LZZilRDuHBAalpmtBN4PwMHvQsqcZQIhTnwVHy9Apwdza0iSDQSqVy45wRoXFIxQDLIUPDUOp08IuPMvw7PQtLUJlhmQ0bhP4WhEM3yVrdI6leEusgjDawdDZudLiv9WzdsH+GbovrxZ2wPP18/dXXzEvJd3yPL05+mkd8YTQ7x7SNNfqM5b6GKw+4ljP5c30uXaTbhA1l0Nz1iKrO+Wm/Vvf8q1t+6ds/1w3nZ1+p1t4WxVxzdmpbZ1UfEvGDM4jiqnydqn9bOitHg3PTiFuLf346I+j4429d4g5dWDqU8fKqP52s8GVezWOBTFQ7vMGWML8r/UNXhl7c338VePVb3wMO29l9Ob6JoE91vshtcNa+moHpURRtCaLEGkjqCMNYgjc0DmpNBAD54U5h2cyguVygoY+aFlVfPmLI80hNY7hGrXACdthNG6mDx9tn2kRahJv7plPTUwuXQimXqbmLBo4hmlKpd1KO25lkLP3F5cQw6R+xSVXGfNo5K3xZwL+jZmwq2QZri1BYjFznFwTCJj89w1yvlik -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Application"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/legacy/applications/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create a new application using workflow data stored in legacy format - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"application":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationCreate"}},"type":"object","required":["application"],"title":"LegacyApplicationCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},{"type":"null"}]}},"type":"object","title":"LegacyApplication"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-metrics-preview-evaluations-metrics-post.api.mdx b/docs/docs/reference/api/create-metrics-preview-evaluations-metrics-post.api.mdx deleted file mode 100644 index 67c07cc21c..0000000000 --- a/docs/docs/reference/api/create-metrics-preview-evaluations-metrics-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-metrics-preview-evaluations-metrics-post -title: "Create Metrics" -description: "Create Metrics" -sidebar_label: "Create Metrics" -hide_title: true -hide_table_of_contents: true -api: eJztWVlv20YQ/ivCPLUAdVi+Ej7ViR3ETVwbtpOHCoIxIkfSpssje7hRBf33YnZJkZRs+YBSJIX9YEvLOXa+/ebgeg4GJxrCAZzcorRoRJZqGAaQ5aTct9MYQogUoaGbhIwSkb7JFd0K+vuGKp3ls5s80wYCUPTVkjZvsngG4RyiLDWUGv6IeS5F5NS6X3SW8pqOppQgf8oVuzaCNH8rrPJHYSjR6xJj6QKYA6az8zGEgzlgHAu2jvKiIVpJmFlOEMIoyyRhCotguaSNEukEFsNFUC5loy8UmbpQaqWExTAAI4zkhXduE4uA94vP3EzpuXIjUkMTUk3Pyai5Uo/hbl8QCRVZieqXd1bK33WWtk/T3Jpf4a4QC5gfoYRK4WwzLA1VeBKkZ4wkazz/eP8DRP/IPgptHsL0vhhXtZ+G0HXBuVtSWvg0agZeiX4uRAKIaYxWGgih3+vvd3qHnZ09NqINGrsRxgAotQmXipzS2K98tWQp5my3aeqXtI0i0hoCGKOQVhErKpUpXoowjUhKiqEWR1V5rvwm1oNeBBDjS2ZtJ7OO0WcWg6BuUd6J2Z0IrRg6LQ2we5GQNpjkmyk0zlSCzL4YDbVZaTPFl1aZohGlqER2I+JHOrFWxBvtXxUmW6csxywujG82WRm4tKnTXTsA3wCFopgzpjB8J+nPfIt761ps7SQ9CRoF0bXCh3yVLfNhZ5e+RcOCTVYmjLLkFnSepdrnVL/X4z8x6UiJ3LhyA1c+1cdWti4LYc7x53X6KLNeaYWAVRRvnUSthPV8w30ZELZfxs6teUYdW9N6QiHzuv/zGWETrI8YEp6DUTkl+BE+vkGz1QrtK0ncOnLbsnn8PZx88mYLJzFJ+g5Ojr3ZwkkJ12i2xXZTgvVmVjScEq+teinRWnopAduqlxKupZftmfb2amPtI7J2zUg58v7ws219Ji+9/zzz7s/RKF5G3h9x5H3EsFtLjsHwLpf3Gl9OpAs33u71++sD7GeUInZKrRNO4+dPrzEZFHLDFCqzqPH0KUk7vB+nj5nfoBst9WTTHcAZaY2T2hvG/aIOjNY1P33omDku77qQq5fgJbwe3fvDOPbwbTrg99fXF2sG/dk2D9U32VbFoITMNONbzOJmMkczhRC6xS1mt3aL2S1eJ7pc7ElxC3JnZJWEEKbG5DrsdiOZ2biDE0oNdlB0MRcuxTRFVgkzcypHF6cfaPaeMCblyFsTuGIWeV40xZZHgrn4QIxQigl/P7Jmminxjz9sLmS8H6/FEDA/L6sb15NvmOSSGjeog+pVqHoPqYbneset3w1V7bPWG4vm1KiovUZFZBN77d5hu//6emc/3N8J+686vcOdP2GlqsHuGF/tjw/22vuHO4ftvf2Dfnu0O47a/ej1we744ADHeABVoXqcvMsZkY4zh2lBoSN3Yq2ji1OoB9vr7HR6sEqjhjBXBYxcVSgPxD2GYIUaS1LwZJC4kgCGMPmtesDHxUxMMK3ZW2NtYzdLXhj6Zrq5ROEy3vmeF4QeQEFodl27zK/ekQPg7JxyFoQDmM9HqOmTkosFL3+1pJi5wwBuUQkcMWQDhnFacngOf9HMvYi7Gtl2BYLFpfWcXamXXMu8xlEUUW42yg5riXpxfnUNAYyK/x0kWcw6Cjk0/h0C8H8ofHzh3K/NQWI6sVziQvA2+edf3xN+Tg== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Metrics"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/metrics/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Metrics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-new-evaluator-config-evaluators-configs-post.api.mdx b/docs/docs/reference/api/create-new-evaluator-config-evaluators-configs-post.api.mdx index 3576f65ebe..6c6ad046b4 100644 --- a/docs/docs/reference/api/create-new-evaluator-config-evaluators-configs-post.api.mdx +++ b/docs/docs/reference/api/create-new-evaluator-config-evaluators-configs-post.api.mdx @@ -5,73 +5,348 @@ description: "Endpoint to fetch evaluator configurations for a specific app." sidebar_label: "Create New Evaluator Config" hide_title: true hide_table_of_contents: true -api: eJzVVk2P2zYQ/SvEnFpAtbeLnnSqs7tAjG0TY9fJxWsYXGksMZVIhhyt4xr678GQsiXbqfOBXOqLbXI4fHzvzZA7IFl4SBdw9yKrRpJxHpYJ5OgzpywpoyGFO51bozQJMmKNlJUC99EiM3qtisZJjvVibZyQwlvM1FplQlo7etJPeuIKnz5pIQQPrVQufvHkfk3FvEQxvRVmLajEQ/gDUuP0fsUB2k3Y6/ZV2g8d7y+kVaI2OVYjSMBYjMPTHFLIHErClcbN6oB+FVf3A74b8StrPEECDj826OmVybeQ7sJf5TCHlFyDCWRGE2riKWltpbKw3/iDZ9524LMSa8m/rGM0pNDzPy1r5G/aWoQUPDmlC0iAFFU88Ibn2wR6oP/g9tKCno973PJKj0RKF37FE3FTmeeK0clqNgATz9HlNc8fMKNB3scujXgf07TteWzPySIe7BT3OZrl4Ki4OdEX2pa3ceit0T5iv7664q9jWz42WYber5tKPHTB8MOSqPwSv9OcSf1W2awzzM3qcs5ZjBIx98+VWm/friFdfI/obXLYUzdVBe3ygg2SrpzylaRLYG9ilJhwfmhs/g1r3sWosOYrdlM5JHvPDUg/N+AA7RGM5Rd4PXLhH9fX58Z7LyuVx4Zz55xxP+66HEmqKviPsPbnAZXJjmZ7ZY/pG6inNGGBDtplz550Tm4HHP9lIkBWpfbFJTn+Ru9lEXwdQy5Yk8kQc579mnJ8rrh1FzdQoqc3svvfx7iN9H1ps33I6/l8dpYwalsjlYavhq7XW0klpDDub4NxdxuEFuZe0PlAfeMqSKEksj4dj7PKNPlIFqhJjqQaS6tC8XjMGqdoG5ZMZtN73L5GmaODdLEcBjyyOaLcx2EHpqVV98HHsQPBpKHSOPVv1DABxa4s4yo+Gdvuob+57j7J2lbY3zy9dCdtp5847yqcWOm1Cbg6difh1GIym0ICzE8skKvR76MrOH1GHAVzwciMBpjiNNfnEb0HYhltHaoFCGX9Zz/ByFjDWupBvth7xBvcDJ4LXXGfQNv19ft/fex0TiH8RGNbSRVKOzC564y96MX2UYBg7WUCJfs/XcBu9yw9vnNV2/LwxwYdu3eZwIt0Sj6z5AvuKuXexzuItrmJ9P0Wap/Dqyb69qQVcpuKKyZZhpYuxi4HJTp7+ziHBJ67dxgfG1JwcsN9RW4ghfDgC7qEhxqP7aCSumi4e6UQc/LnMzubzFg= +api: eJzVVk2P2zYQ/SvEnFpAtbeLnnSq9wOIsW1i7G5y8RoGlxpLTCSSIal1XEP/PRiStmQ78TZBL/XFNvlIzrz3ZsgteF46yOdw+8LrlnttHSwyKNAJK42XWkEOt6owWirPvGYr9KJiuEMzodVKlq3lhHVspS3jzBkUciUF48aMntSTmtjS5U+KMUZDS1mwX5y3v+bssUI2vWF6xXyFe/g9+taq3Yp9aNfhrJurvB86PJ9xI1mjC6xHkIE2GIenBeQgLHKPS4Xr5T76ZVzdD7g04pZGOw8ZWPzcovNXuthAvg1/pcUCcm9bzEBo5VF5muLG1FKE88YfHfG2BScqbDj9Mpai8RJdwi5lQb/8xiDk4LyVqoQMvPQ1DUyMYdMCugwUb/Ac8i3Ndxn0SX3CzbkFPXd3uKGVDr2XqnRLmkgBFoWkTHg9GwQec0776uePKPxg34e0DfsQt+m6U2zP33xHQsrwOIHTsBaDnHF9ZAroOjrPojNauZjE5cUFfR16+aEVAp1btTW7T2D4aR3Pa/hj+hmriaRXfDGLqOSN/1ZztXm3gnz+I+p32f5M1dY1dIszfshSDRZL7s8Fex1RbEL7Q2uKf7HmfUSFNa/4bui5AemnBhxEexDG4hu8Hrjwj8vLU+N94LUsYpe6tVbbn3ddgZ7LOvjPY+NOAbUWB7O9sof0DdSTymOJFrpFzx63lm8GHP+lY4CkSuPKc3L8jc7xMvg6Qs5Yk8hgjzT7mnKUVzw64QZK9PRGdr+fxk2k71uH7SBvHh9nJxtGbRv0lab7JF0QhvsKchj3V8g4XSGhhdkXtC5Q39oacqi8Ny4fj0Wt22LES1Sej7gccyPh+NqdhFl2TdBQWQ5Fa6XfhP0ms+kdbt4gL9BCPl8MAQ/knOiFQ9heBm7kXTB5bE8waX2lrfwnCpyBpACquIrSJk/e93fh7RfemBqHd1mvbNpy//+oS/UTp02IjpJqpUOku6sw0nDFxSdUVKdEaWToYvT76OJ7vKUFbDKbplrjItTaLuUAo9I+UGavCUXehEIDj7z5s5+gKEn+hqvBfrFtsbe4HjxPUl84CnHbl/7/9XGVfOTxix+bmsvQFQKT21QT8154FwUIVbHIoKLSyeew3T5zh+9t3XU0/LlFS95eZPDCreTPJP+cGlK1c/kWooWuI32/hbZB8LqNrj7qotTh4oqJEGj8WexiUN2zdw+PkMFzevdR2pCD5WtqSXwNOYQHZtAlPAxpbAs1V2VLjS+HuCd9vgJ1bfHe sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create New Evaluator Config"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/evaluators/configs"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create New Evaluator Config"}></Heading> +<MethodEndpoint method={"post"} path={"/evaluators/configs"}></MethodEndpoint> Endpoint to fetch evaluator configurations for a specific app. Args: - app_id (str): The ID of the app. +app_id (str): The ID of the app. Returns: - EvaluatorConfigDB: Evaluator configuration api model. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","title":"Name"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"additionalProperties":true,"type":"object","title":"Settings Values"}},"type":"object","required":["name","evaluator_key","settings_values"],"title":"NewEvaluatorConfig"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> +EvaluatorConfigDB: Evaluator configuration api model. +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluator Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>settings_values</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Settings Values", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluator Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "project_id": "string",\n "evaluator_key": "string",\n "settings_values": {},\n "created_at": "string",\n "updated_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-portal.api.mdx b/docs/docs/reference/api/create-portal.api.mdx index da8f0674ad..5b3110f6db 100644 --- a/docs/docs/reference/api/create-portal.api.mdx +++ b/docs/docs/reference/api/create-portal.api.mdx @@ -5,59 +5,72 @@ description: "Create Portal User Route" sidebar_label: "Create Portal User Route" hide_title: true hide_table_of_contents: true -api: eJx9kjFv2zAQhf+K8GbCcjNyqtulRoYacTMZRnGmLxYbSmRJyqgq6L8XRzlu7CFaBIl3x/fedyMynRL0Dl+sc7Y7Ya/gA0fK1nfrIzRMZMr8M/iYyUEhcgq+S5ygRzwsl/I6cjLRBumBxrY3hlN66V31dCmGgvFd5i5LOYXgrClX1L+S9IxIpuGWoMdJHnU38msRUW2KiOo5cayefJ9lbsu58SI0+JShECg30KgPs6E65WgD17P+VEMhcTxzFNcj+uig0eQckq5r43x/XNCJu0wLsjUFi2kvHaaPNg+lZbVZP/LwjenIEXq3f1+wFRdzNLdlI/IQGBoU7CMPUOiole9Vnxsf7d+SBhSs2G3mLsnBdi++tNvsSn0RV602ayiIjTmg5eLTYon72G6KBQCZAuDt7nIMdZfC1T8UuCUrZ5mp/fz/QJRJ3i117+Z9QOlG1zWMzH9yHRzZDtNFxXgBuMMFoAArCIXtDBEKsqeNANc7jOOBEj9HN03y+3fPUUjtFc4ULR0kt91+Um+xCsRXHiQAYzjI0pzJ9TOdu80UuNcN23zf/sA0/QMPMRcX +api: eJx9ksFu2zAQRH9FmDNhuT3yVCeXGjnUiJuTYRRremOxoUiWpIy6gv69WElxEgOtLoLE2eXsvO1R6JShd7izzll/wl4hRE5UbPDrIzRMYir8I4ZUyEEhcY7BZ87QPT4vl/I6cjbJRqmBxrYzhnN+7lz1OIuhYIIv7IvIKUZnzXhF/TNLTY9sGm4Juh/kUTct70cT1WY0UT1lTtVj6Ir0bbk0QYzGkAsUIpUGGvVhGqjOJdnI9eQ/11DInM6cZOoeXXLQaEqJWde1caE7LujEvtCCbE3R4tbKajyt7kWKYS/tTJdsuYz9Vpv1A1++Mh05Qe/27wVbGXHK7aOsR7lEhgZF+8AXKHhq5XvVlSYk+2eMCgpWDDRTlYRk/XMYy21x/ObtjswL+yMUZM7J9nLxabH81zBzQbXarGdSZEZSrz5GGdRNXNegoMAtWTkrTO2XtwNxKWBa8u/6/QfnB3/XYAr/LnV0ZD2G2UU/k95hJi1kR9ayBBNtKMhCN7IZeoe+P1Dmp+SGQX7/6jgJtb3CmZKlg2S42w/qNWIB+sIXCcAYjrJdZ3LdROpmhQX0dRU337bfMQx/AWDxJaY= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Portal User Route"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/billing/stripe/portals/"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Create Portal User Route -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-query-revision.api.mdx b/docs/docs/reference/api/create-query-revision.api.mdx deleted file mode 100644 index 7e32efd1f5..0000000000 --- a/docs/docs/reference/api/create-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-query-revision -title: "Create Query Revision" -description: "Create Query Revision" -sidebar_label: "Create Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWt1T2zgQ/1cy+3SdMYTSlt7l6WihU64UOKDcA5NhFHuTqJUlI8lALuP//WYl27HjfJhcetO5KQ/BKNrfrnZX+2WmYNnIQO8W/kxRczTQD0AlqJnlSp5E0INQI7N4d5+intxpfOCGKwkBaLxP0dh3KppAbwqhkhalpUeWJIKHDqH71ShJayYcY8zoKdGEb4lXbwpzsEu+f2CaM2nveOTw5eR8CL3bKdhJgtADYzWXIwhgqHTMLPQgTXkEWVDukKkQkPUDsNwKWqDjTjo3HrdzQpth+1zq+P4s2z6Dx2ba8iELtyn8YQ6ZcxgK5ylVbBZFnKzMxEXNaA3uA6UEMllllwuU9bOgWFKDrxjalTJ9cEJkAcRo2YbCFJxnbLi0OEJd5xwP6ivVMyzmBSHXYSqY/uVDKsQfRsmdE5mk9gUsOiK3GLcjYlqzyWq11EjhWSr9TJokis3N+x9o9EydcmPX6XTZGeepn6eh69znJIux5fmbEhBtFkCEJtQ8sXmw2wTqqAKRBWBEOtoU6opos4Yy5kLMZR6d37tMsHA/JQOuMaJMMhfS5wNWHe3SZxHICHWGYnWKbsEkShrvdvt7e/SrpkG4SsMQjRmmonOZb4Zg02QUqtQTzXnx7ATv3Q4y45ClwkJvr4zr1Rw2s8XPbPZjZjOW2rHSWwP3aHS/6Ya0Q6WtO5a7uLDitrsrRwnPGDbaOP58zsl/JvLNEvl5ajfI5A2qZ6RyT/s/z+Wr1NoimW+iox87m/tuK7pjdqtRxCfbqHPolJUm0fdg8sXD5kwiFPgdmBx52JxJoa7BNjNRoax3RToq9LVVLoW2Si6FwrbKpVBXyeUBdbNKae+uNzn5VgrPALZ30FyHbD6b1AuwRy4j9UjYKzZJfKSSdJtee+YhswCUiLYNfu4hKabhU1votQo9I6wsAMFjvhh0YWKYQzl11HRuHeGaegtlGlMDwUyIMvJrFGHzP/ordeDgyaOkRf3AxMYSnxQA1H8sq+aaCbCBc7msVyo2/FX6YhOGyjQuLOo1rupHdb6QLXsSYDKaZdSmet23itoaqUgg6Vek0tVm7VSNeMjEecEhc22Vz+yOd172LBduyFFElXaqlKSsddyGLIBvONk0knzCie92RNo2nT+7oClOmi2o4xYXO9S/PqcouXHiZ0HNoOtvCjcQADd3ZMdqAlNxwjQ3SlastxwF78n67nNE/iCse0L3SJ8D+1jr48/SGDUPW4Eby7Q1j9yO3WJUPFKLzrikA8TMhmOkJ8G/YZXRlUNrxYdL7893vCYqlYqt6MeMBBizhjKPeNgOAZ+4sSaXIv+jgnNMKyhDXATWjGfFpsqsgcztXKS8gstuXsgM3hmUhlv+sPhaLOjkmoUQM9i5KmEqogyZMDSgwSfq0p0BN+ZyTBidzw6jwWJF/LzGJ3ue64Lw6ypgYnEKaCPRoRDPksQ72UyS5UbN96yZoPnAWbvQeeB1UbhsM4sM8QL686FpAa2pnum2v+pAJfKi1NR2XHjEXDO6Mf2/oS1ngZkbLL7e32+ODm+Y4JEbDHaOtXZXbcO5YYSWcVHLifUNQoVLMub6JLXCtKfKC+jmKGa0KtVW5j9+y/KtThmda/p2naPSuTzrfF89peXq9dpdfowjr75Vxv14fX3RAPS2rRvV924dP0y8nL2tjNGOFb3OTJQh4ITZMfSgm9DYFh+79/71Z7eY4pouBGBQU7vkDJVqAT0YW5uYXrcbCpVGu2yE0rJdxrss4e6mGwxTze3EkRxenHzCyUdkrvK97Vc3XJEreeeobyvtwhJOtU0xqMhnjPxvb3EqdEkeT0V6ICe9nL2TPX5icSJw8TvW5hwaXg3Zr2+GB6933rx9+Xbn9ZuD/Z3Bq2G4sx/+dvBqeHDAhuwA6lPltjSzSXFbitr8ty1RMdecDRVnk7By3jNz97rflMu+qy0vpOsohsrZpcgOzuqdw4sTqLTTsLf7cnevgVvb7Gqe0IWXwqjuawjm3Kt0LCovYhdbwCKLf599QZKRL8dMVvCWuf/coCp3MYtPtpsIxl0EcSJM85txC/nNyO3HXX1W3g4IgO76mC5T7xam0wEz+EWLLKNlZ3Dy+NxfBqS3Wwpk4+IyTH3NT9mJIu6OCzdlGd+MvhQZPcVhGGJiV+7tV+77xfnVNZWw+b8pxCoiGs3oYPTZA6iVVG5tCoLJUerm7eAx6ecfFShK7w== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query_revision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-query.api.mdx b/docs/docs/reference/api/create-query.api.mdx deleted file mode 100644 index 5552a5386d..0000000000 --- a/docs/docs/reference/api/create-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-query -title: "Create Query" -description: "Create Query" -sidebar_label: "Create Query" -hide_title: true -hide_table_of_contents: true -api: eJztWN1v2zYQ/1eMe9oAJvaCPelpbtKiXrvFTdy9GEZAi2ebHSUq/MjqGvrfhyMlS7ITJ3HTohjmh9ih7vN3x9+R2oDjSwvJFD54NBItzBjoAg13UucjAQmkBrnDm1uPZg0MCm54hg4NaW0g5xlCAuHpjRTAQOb1/8DA4K2XBgUkC64sMrDpCjMOyQZ4vr5cBBtuXZAN64zMl8BgoU3GHSTgvRRQsq1E7pWCcsbASadogYJe90YCSlolZ2jdKy3W5KDx7YxHBqnOHeYu+C4KJdOQY/+T1TmtNZEVhhBwhEayqVLZW16oAFw7Dy6EJJNcjTuie5nOtVbI83ZqVfLlrGT1kp5/wtQdzP9NCKJkkKHjRwZTe27cyNzhEk3XczbvrrRzuN8XpNKkXnHz0xuv1O9W5yejvPDuZ7gvRekwe5oSN4avD8PSUYVnQfoHIUkax5f3OyD6p34vrXsM04dy3NV+HkKTqufi1n9S/vsRkG7JQKBNjSwo1WNNXbRMlAys8stjTV2TbrkHxg7fnAdCvFeuoZxpxRu7ZBWVryJTQVmSFYO20LmN3XQ2GNBXBxi49mmK1i686l1VwnA0oaXaR6Wd5mwiPQ8SVJ0F98pBMihZw4MNsv8z4lcz4qV3R1DintYzODHq/sdJ8RCsT2DFYzD6sWkxnuLEDXdPPHsJ7vDEyRDPw14inYneMIDlC/EtnHyMZisnAhV+AycX0WzlpIZrHg61L3RarcF6FY+sDV4v6qVGa+ulBuxFvdRwbb18/dxl8HLhhSvBI3P8HgOP6mynb5zcv56d7Q/rv7iSIozi3mtjtDl+Ugt0XCr6VY2CXQGl087T57Bua67G6dGk+l7HAMMctcvWWWFbimYyWMuX2FDlw6IBjN6Enj52dqK8outKrlXaBt6I7sNpXET4DhX17WQy3jMYa9staty7vQ/VvTZDt9J0Oy60deFW7FaQQL8weCfxn/5tvE33gYFFc1fflr1RkMDKucIm/X6qtBenfIm546dc9nkhQxNbTL2Rbh1UhuPRO1y/RS7QQDKdtQWuqW9iJ3TFtkXghXyHFHB1Tx96t9JGfonlrS7rq6hFSVNHXjXX6NefeVYo7FyD62Nec8ZqDgbb8ddUvwvjdjnSxbY/afPnCx0ir0ozDLj0huMRMCAEo4XB6S+ngz27HWHabTwNu61OOzwGtlOALfTAALOw1cAhz35rHlBkVOOM5y17O92wM64r7B1+dv1CcRn2UfC8qRplClWjQDxX03ZmQF2+on5KprDZzLnFj0aVJS1X6E83IKTlc9V6o/I3rrsvYO648uQ/9NIdN5LkQ+uwutRkKOqdR2Y6Cduy0d1jKWKQqDFMUyzcQdlZa4OML68nwGBevZTJtCAdwyl1+psA0Bsn0g6NHNY2oHi+9EQsCUSb9PkXFK5kWw== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-queues-preview-evaluations-queues-post.api.mdx b/docs/docs/reference/api/create-queues-preview-evaluations-queues-post.api.mdx deleted file mode 100644 index 7415790468..0000000000 --- a/docs/docs/reference/api/create-queues-preview-evaluations-queues-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-queues-preview-evaluations-queues-post -title: "Create Queues" -description: "Create Queues" -sidebar_label: "Create Queues" -hide_title: true -hide_table_of_contents: true -api: eJztWVtv2zYU/ivGedoAOXbdJN30tLRpUa/tmiZpXwzDoKUjmy1Fqbxk9Qz/9+GQuvoWO0ixYmgeHJk614/nRnoJhs00hCN4eceEZYZnUsM4gCxH5b4NYwghUsgMTr5atKgnucI7jn9PsGYpX03yTBsIQOFXi9o8z+IFhEuIMmlQGnpkeS545Lh6n3UmaU1Hc0wZPeWKFBuOmr55ofTEDaZ6kyARzvolMLl4n0A4WifgeqLJFGk4E7RgFjlCCNMsE8gkBGC4EbQy1J2bmjKAGBNmhYEwYULjahWUrNn0M0amwVkj94HsfeVsWgWVLmmFgNV4FUCKhrWtZXHMiZOJq5bdNUUhRBvF5awplkuDM1RtTem0vVL6SUvbdUHEVWQFU7+8skL8qTPZHcrcml9h3WOSUezDAUxMKbbYAkONW5sVNhDex/uOkCSOjf3/kRD9K3vLtbkP010+rnMfh9Ctj0KQLMUD/d+0gHhXlAs6UjwnVx8q6rIhYhXAHSpdSGvLqDk+FSSNVIRBf3B20n928uSUhGjDjN27uQGgtCmVtxxl7FdcUYmpRlkp/ZK2UYRaQwAJ48IqJEalMkVLEZMRCoExjLfl/I03Ymu+x2w939vVyWpUEx6vuVDVuuph3akkUykjPKzlcSMsypw7PAc/alSdYewiRUcomeLZHouONWS34ptCWaXcYD75govDNB+lyWDeeUOSjyjil8zVly17qqyc8Ph+MGrR11Z2hvFW7dQmucKYIrQQvDXInE0vXBPe8L2m/+Db5X2Kiq66W5H2mq59D4cVCawFGGXRLeg8k9oH8qDfp3+tOgE3PqsSKzrXBTGl08NGgSiznmmtVtdOvHAUjWrRXwU/J4j/ZoJ4b80DRogNriNmCM/7Px8i9sF6wBTxEIx+7DHCn0viCTP7p4CqNMfMYNdwZ89uLb7+xZ0LB5bN4++h5KMXWyiJUeB3UHLpxRZKSrimi6KFHaCn6Oz3g/V84bpcjdejainRqrSUgD2qlhKuSsvjifbyGnPvQ8K/nIl/+OG3ObSX2n8OxD8H4kcdiO8fhRthOBof4a2uBtaVm35PB4PN+fYTEzx2PJ2XlC8PH25jNIyLPVOqyKLW22PmkPFulN5m3kACMtWzfafxd6g1mzUg303qwOjc0tv7tpj88qoLumatq+D16O5249LDt29/X9/eXm0I9Hvb3lTfzTpV/KRo5hldgRYXmzkzcwihV9yB9hp3oD1/2OhRTUVFld7tkFUCQpgbk+uw14tEZuMTNkNp2AnjPZZzl5waI6u4WTiWi6vhG1y8RhajcpHbILihGPJR0SarNoTl/A0SPn5mgwtr5pni//itDoCTn3PPRQBQdF7X97Uvv7E0F9i8fx01zklr5yF/tqkOJvU0Xc2MdYC0ka6Wq57YvN6pG1yje5Xto24TI3iasN/OkvPT7tmzJ8+6p2fng+70aRJ1B9Hv50+T83OWsHMKq3YxP4KvrsOj0uZm2TtMkMtCLpPM7VMRlBcuCjoXV8MWCv2TJyf9DbhaxFRnWOTqTLnJ7jUEa+FWBRo19dQVGTDI0j/qFxQCFNwpkw1563mwNrsXoWbwm+nlgnFXQpzqZZEiIyhShDQ3fluozuQBELxzSqtwBMvllGn8qMRqRctfLSrKhXEAd0xxNiXARgTivMyKJXzBhTv3u5rbdQWHyIX1WbBWf6k2eo6LKMLc7KUdNzL/6v3NLQQwLX7LSLOYeBQjz+gzBKDfS7x74dKvLUEwObNUMkPwMunvX80jrOY= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Queues"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/queues/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Queues - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"queues":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-results-preview-evaluations-results-post.api.mdx b/docs/docs/reference/api/create-results-preview-evaluations-results-post.api.mdx deleted file mode 100644 index ab5a752d7b..0000000000 --- a/docs/docs/reference/api/create-results-preview-evaluations-results-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-results-preview-evaluations-results-post -title: "Create Results" -description: "Create Results" -sidebar_label: "Create Results" -hide_title: true -hide_table_of_contents: true -api: eJztWVlvGzcQ/ivCPLXA6rDiI9mnOheipmkMW8lDBUGgdkcSU+4RHq5VYf97MeSesryWBaeoC/tBlrhz8ZuDM9wNaLZU4E/g3TUThmmexAqmHiQpSvtrFIIPgUSmcSZRGaHVLJV4zfGvGVY85bNZmigNHkj8blDp10m4Bn8DQRJrjDV9ZWkqeGDZ+t9UEtOaClYYMfqWSlKtOSr6lUulr1xjpG5TLITdwAZYvP68AH+yARaGnKQzcdEgrSj0OkXwYZ4kAlkMmVcuKS15vIRsmnnFUjL/hoGuE8VGCMimHmiuBS28t0ZkHkSo2YHGFJorNTzWuETZ1BzNmyv1PezWBQGXgRFM/vTeCPGrSuLuKE6N/hl2bTGHeQ8mJiVbt8PSYIUHQfqJkCSOw937LyD6e/IbV/o+TO/a4zb3wxAa5zF3jVJxl0bNjVekX3MSD0JcMCM0+DAcDE96g7Pe0TEJWTG1mvGwDUcPFomMGPEaw8NW2z4wteqMQrshyQK8R3TrNom/kIVKB0zdJ+4hlo5zkbkGlDKR/914e0oZ/M5CmXmgNNOmFTIPMDYRHUMpxqFb+W7QYEgniYljt6RMEKBS5F/GhZEIucNoKWBxgEJgCHUbyhPqyhlx2+DMs26S10zsNHGnD7e2OioEEEA8QqVZlO4ZoSHT2CWm9jAtpWZ0tqbI9IyHNwdbfGlFdEbhTb0oDKy3MJ39ieu2enKlMe18xLX1boAxkzzJc7I9E2sicrY876SJHyjg0sSW91ZMut6DSwwpoMrtNC0tNe4MlkvbdryxXU8t6F2+1EF03cl9NhRdTIsu5ZRduq4Jsiyri9DSoF1QaRIrV36GgwH9C1EFkqfangBw5TJkYUTnMiem1Dis+QoS45i24qraxRtLsRVAzz3bD6n4n40+oOTf4npAzXe8//O2rQ3WPfq2QzAqGjc3VYUzph/1qHCVJOycW7NMGv4IJV+c2FxJiAJ/gJK3TmyupIBrvn7E9q8A6/U6P4gKvB5VS4FWqaUA7FG1FHCVWh5PtJNXmzQO6eSLKeR53Hhy48bTOHyeyMRRn8IL7c9TyPMUsnsy2GP+qGE3me4y5c6poxwSMjtxHA+Ht2eKr0zw0DJ1XIIdPFCEqBkXLYOBSILG04fUvOndOP2WOANtt6+WbTH1CZViy9rQdzepBaMzpqf3uZ/25VTndPVTsYS3LF93bOOtg6/NwR/G44tbAp1vm051fU+niqAI9Sqhu/78/j5legU+9PO7/n7trr+fT3h9imaU1BVYHxkpwIeV1qny+/1AJCbssSXGmvUY77OU29xXGBjJ9dqynF+MPuL6A7IQpQ3eGsEVRZGLiyZZ6RKW8o82p2IW0e9zo1eJ5H87Z1NFJXscF0FA8XlZvZd4d8OiVGDjPcOkmk6r0bCaZ+pNUP0GtdbRwIsFe3myOD3unpwdnXWPT06H3fmLRdAdBq9OXyxOT9mCnUK9UamFVr3h2FdQ0UPUzr3aoVadKoPGqUDWH3cHZ93hq/HRiX9y5A9f9gZnR39As7IP6rW4srRRb/e1tCiv+9HnV3OLxHo8D/BzG0+d84sR1F0x6B31BrAd5A1iqlkssDWrCBf7GLytwC1DlrCNbMECjSz6pXpAwUR5ErG4Ju9WTjWsKaNW443up4JxW4+s7k2ebhPI041U117IVZcqHlDtWFGO+hPYbOZM4RcpsoyWvxuUlFdTD66Z5GxOkE0IxlWRYRtwjnzjKnjXli8iF8Zl1FY1p0rrOM6DAFPdSjutlZGLz1dj8GCev/+LkpB4JKOt0acPQG8Z3f4oA2ltA4LFS0MF2Acnk/7+AUSfvbk= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Results"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/results/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Results - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-runs-preview-evaluations-runs-post.api.mdx b/docs/docs/reference/api/create-runs-preview-evaluations-runs-post.api.mdx deleted file mode 100644 index 09ce2f35b6..0000000000 --- a/docs/docs/reference/api/create-runs-preview-evaluations-runs-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-runs-preview-evaluations-runs-post -title: "Create Runs" -description: "Create Runs" -sidebar_label: "Create Runs" -hide_title: true -hide_table_of_contents: true -api: eJztWltv2zYU/isGnzZAjd2gwwA/zU1aNGuzBHbaF8MwaOnYZkeRKi9ZXUP/fTikJFOyLTtuCnSD85DYFM855Mfv3KisiaELTfpj8uaRcksNk0KTSURkBsp9u0lIn8QKqIGpskJPMwWPDP6ZwkbAP5hmUhsSEQVfLGjzWiYr0l+TWAoDwuBHmmWcxU6m+1lLgWM6XkJK8VOm0KhhoPEbqsS/zECqtx/PuVv3mlCxupuT/rg5gelpzKWGpD7JrDIgfTKTkgMVJI+qIWE5J/kkIoYZjgM3unPlNeQRquPsEb5H2QeU96pobL5T2cBryPOonCVnnyFG/MtZmxMdWvHW4bWtNI9ICobWl0KThKEc5fc1TLcWq41iYhGqZcLAAlTdUjqrj4R73G2LxEzFllP1y1vL+Z9aihc3IrPmV9LcL+ooOHKEEFWKrlqxrYuSLXzbZG8RSZTY4ubPhOhf8gPT5hCm+/bYlH4aQg+ehUTQdDf9t/e/vQKUzSOSgI4Vy3Crp6q6DlTkEXkEpQttdR0biU/FFDQ/p5Yb0ieXvcvfLnq/X7x8hUq0oca2Hm5EQNgUg24GIvEjXyxYSDB6WiH8kLZxDFqTiMwp41YBCiolFQ7FVMTAOSRkssvjR34RO/09oU1/r0dObSBrrH9PEP4bVm1YvYfVhh37QWCORhFh4lH65EAiQoWQxn8J6YMq8ohIxRZs5zmVSmOrjUxJRJY2pU6hNTJUdedV5Jiv5qBAxIVH7vHU+s4DppzCu5JFSBduF6eqGaEsZpTdSa4CZS5VSpGp1rKkPbMkrSllWEK17fU7JjlPd6f7fHTaYRfrDaYw0Y+dip0OMbTimho6MpA1w9bhnHDj93CM8WJGRdEavQ6t7EmLGjk3dfzNgDYhbkseDUXDQj4IaS+xLKBZxkQzke05ulhym4odR8pE0nqm+DzIB/vm+Zh/CH9UVuhqg/rW7+zKr9mFbMhOjW4ZNcu2aff4/DjmOFVHLNxT5YDK4kSKzR2h9Unkuy3JcXQBipZ25aNj5a9cC7K1yIDG2DAcQsV1FfvA0N7G0PcvJM/zUNgoC25AZ1JoT5HLXg//1CoRMvJ5e255Z1hMxoR9WhsUS+uFGg692cKVmxE4by+Pzt3TuXuqN0J31pzQPm1JPaF/8rL/8waqDdYjOqhTMPq5Wyh/U5RMqTmyJE2ogReGufXst+Ijc9IZOLBslvwIIx+92sJIAhx+gJFrr7YwUsI1W02fr4gvwXq96twkIV7PaqVEq7JSAvasVkq4KivP2+tEz9nJ/dSNf3hhUVo/XwacLwPOlwHny4DzZcD5MuA/dRlw6BogYO/4eK26atdz1/u/urzc7u4/Uc4SJ9F5gzn59NY+AUMZb+nSuYxrT5/S60z2I/ShTKzo13rRxtdb0JouoC1xV0giGB2fkw+wEfflTRfzwmRYwevR3b+Naw9f2+m+e3i431Loz7Z+qL5i7hTcScEsJb72Ll5oe68m3eLNdzd4893Fi5YuOhYoLAPc6VjFSZ8sjcl0v9uNubTJBV2AMPSCsi7NmPMeDbFVzKycyOD+5j2s3gFNQDnOBhNGyB/PiPq06jBoxt67oOEjJxlYs5SKfSvrJ6yOyNJL4eaRmcPNW/o3X2macdi8dR8HN0TBTRDegAV3OdXX8j6muCErbkQ2bXwV0jesqcNfDVeVVPhObVNZB2VzWbcW9em4iNABL0uH8PVkWSRuasFapRfUJk1VuTuMKq/2wmQ4DpOdT2+bFdT3HGSWxkoLepXzMAxO3Hrm0p1xQeaBY1BncH9TA6p38fKit4VobTLGJxq7+FQSxD0mUYOqFUmxdk5dcCIGaPrH5gHSB90C6+iNvrr/NG4VipMw8NV0M059ne0Mr4u9j0nhWmg3+D+U4h4zIhghluiM/TFZr2dUw0fF8xyHv1hQ6EOTiDxSxegMwRojgMvSm0rEr3ycfvHgizI05L2nEbMxnnqJQRxDZlrnToJ4cX83eiARmRX/+ZLKBGUUxX3h7z5BJmZ+c+htOLYmnIqFxTDbJ14n/vwLHWwpfA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Runs"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-scenarios-preview-evaluations-scenarios-post.api.mdx b/docs/docs/reference/api/create-scenarios-preview-evaluations-scenarios-post.api.mdx deleted file mode 100644 index 424b48a1b0..0000000000 --- a/docs/docs/reference/api/create-scenarios-preview-evaluations-scenarios-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-scenarios-preview-evaluations-scenarios-post -title: "Create Scenarios" -description: "Create Scenarios" -sidebar_label: "Create Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJztWFlvGkkQ/iuonnal4bTByTwtSRyFTbK2bJKHRQg1MwV0tudwH05YxH9fVfdcHMYY2avVKn7AUFNH11fn9Ao0myvwR3B5z4RhmiexgrEHSYrS/hqE4EMgkWmcqABjJnmiJqnEe47fJ1hKVZ5O0kRp8EDinUGl3yThEvwVBEmsMdb0laWp4IEVbH5TSUw0FSwwYvQtlWRec1SOnumlH1xjpHZ5ZsK6sQIWL69m4I9WwMKQk34mrjdYSw69TBF8mCaJQBbD2itISksez2E9Xns5KZl+w0BXmWIjBKzHHmiuBRHe20OsPYhQsxMPk1suzfBY4xzlpuVoukmp+rDfFgRcBkYw+ct7I8TvKonrgzg1+lfY52IG8xFCTEq2PAzLhig8CdLPhCRJnB7efwHRP5JPXOnHMH3Ix23ppyE0zHLuHqXirpA2HS9Zv2YsHoQ4Y0Zo8KHT6nQbrYtG+5yUKM20OQijBxibiBpGinHoKHcGDYZU7yaOHUmZIEClwIMZ48JIJEEpE0mkgMUBCoEhVPwo+8+tO8Su02vPhk7eM7H3iHvjugXXIFdAIPMIlWZRetjhWSIjRliFTGOdhA4HpNC6tohMeLgvKIVWY3hYCdKNiWuDENY7SeDaKZcYEvqZ4v0AZg3zre3alXRytVqK3Bad9TFzZQ8+aFE5kzeu78Oa1JZqtDRoCSpNYuXKtdNq0b8QVSB5qm0Gw63LnpkRtZuMmdLmtPERJMYJbWVJ6cdby1GpihaVws+p8zJT58roE8bOjtQT5o6T/Z8PnkOwHjF5TsEoHz1uOwwnTD9rI3W9JKz17bFMGr6EkS9ObWYkRIEvYOSdU5sZyeGaLrPRcIQdOySOAevN0k6PEq9ntZKjVVjJAXtWKzlchZXnU+30VXalI6p2R0m+R/3nF6bqopdb/7lEPW2JOmp9qgA9Gu+zemBlKjactV2Xzjud3YXoKxM8tGK1S0qK07ehEDXj4sBOI5Jg4+lTxtr4Yaw+Je6AdlFR80OvKZ9RKTav7K0Ps1owakN6+lisyS9nOuOrFnQBr0P3YTfeOfgOhfjDcHi9o9DFdjOormXXqlkUoV4kdOGSXaCkTC/Ah2Z23dKsXLc0iwW1Se0DJTU1GycjBfiw0DpVfrMZiMSEDTbHWLMG402WcltpCgMjuV5akf714CMuPyALUdoUrjDcUia53NhkK8LCUv4RCaWYRfS7b/QikfxvF3DqN3QeJ0UwUI7elFdDlz9YlArcuuoZlet1uduWC1m1i1dfYsuWXOm3ZcNrbTQsEjyvty7qndfDdtfvtv3Oq0brov0nlE0HzmbsVXfWO693L9oX9fNur1Ofns2Ceid43Tub9Xpsxnr5y+kssbBkmdC3oNf61wOonrbVaDdasJ0NG8xU3CywxZ1jah+DtxXdIq40LiJb2aCRRb+VDwhxSqeIxRV9e5Jv4zxFcDX+0M1UMG5L11pfZXk5giwvyXjl+rD68uQBFdqC0tkfwWo1ZQq/SLFeE/nOoKQEHHtwzyRnU4JtRFAu8lRcwV+4tO9ott3Vba0TuzAu9bZaH7UlJ9EPAkz1Qd5xpeKur26H4ME0u6uMkpBkJCPn6NMHoFtR56G/crQVCBbPDXUrH5xO+vsHYz1K3Q== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/scenarios/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Scenarios - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"scenarios":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"type":"array","title":"Scenarios","default":[]}},"type":"object","title":"EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-secret.api.mdx b/docs/docs/reference/api/create-secret.api.mdx index 572daf3bbd..02a497c72e 100644 --- a/docs/docs/reference/api/create-secret.api.mdx +++ b/docs/docs/reference/api/create-secret.api.mdx @@ -5,67 +5,1163 @@ description: "Create Secret" sidebar_label: "Create Secret" hide_title: true hide_table_of_contents: true -api: eJztWVtP4zgU/ivVefZSQPuUp+0MSIuApZrCvFRVZZLTxoMTG9vpkKn631fHTtKkHTJQHnY1Ki9NfPl8zneuDmtwfGkhmsIEY4POwoyB0mi4Eyq/SiCC2CB3OLd+HhgYfC7Quk8qKSFaQ6xyh7mjR661FLHfOfxmVU5jNk4x4/SkDeE6gZbeUuQJmv3xnGfosfLybgHRdA2u1AgRWGdEvoQNa0byQkrYzBg44SQN/EN7NwwStLERmuQ4FOqiBbHZsHqdevyGMZFQr/s7qLFhUPGzp9CTyBP67Z7NAPMiI961USuRoJk/YQkM4sI6lc3rUWjJFCx0TXikJHe8q937zlUacy7oRJWiQWCEZGMu6TFB1CJfGE7DEnXKpU7pZWnUMzDIhHWGS7+f5y41SosYGGg0WuKLcKWfcmqJLkUz9290olGFQ0NAmIlcdNRzPE+4ScaV6rWiDRX71GL5Mw1rwGssf2o7cmBhMCEWCKJHhgk6J/Klvbi/+zUUydsStwfWw7H3Wiy4BjH+o/AGe8TEqPgJGFi+xIw/eWZXaBy+bCn/Xxn5s9fh7SYujDw0hB+MJOwVGvuBRPC12r5htbsdguJdkQG+OMNtF4QniaA0w+W4pbkzBe66W98BlwG5L1V1qe94NoNMJSi9ZMJhZvcNYWWx7Au2Cc3/Vyq2w9ALuudxt6Tfjs4VCjeGly1NbgMVLbec18ofYvqa8EHNkKeasv0OSw3xu9hdQfvO8qIPrgn6vdmqcYFXg9Wz1i6RVIDeeIwvVnul7C1ZteoTmvraFs83Jm2oTXsv+ZcfsFrlNnjx+ekp/XQaBJgUcYzWLgo5+FIt9hnzoL7mWO6P5f5Y7o/l/ljuj+X+Nyz3DETSRw2DhTIZdxBBUYikV/wrnwx+uw8BUiwwLmOJfeU6fFRJ5twdKljofpLBiMIICp18EO8hIOzgPZbzfoO/BfJTOQi23qJ+HLLXGje45HF5U1uiLsBd1Pf0ro2f7jVodctYdaAbBn+en+83mV+5FIlvIQeXxihzeIeZoONC9uRuqeLO7Bt4FrnDJbnv7PVEeaOCgD6p2d7qcIuWWpRtMnt9qSdjcE+zv7IH6RWOrta163ZDb2D3dTUuAn29sXx/P94DDLbtGjXE4GBSfxrN0KWKvplqZeldc5dCBMMVL6Qbrs6G4RJjh/4+Y6hX8XbxbQ+kzmkbDYexVEVywpeYO37CxZBr4WPAYlwY4Uq/ZTS+usayyjrRdNZeMCHPCb7QXdaYgWtx7e8fIcvCqHCpMuJHMDADQdpVHk9qk09+2X73vXzhmQ4Jbpu+K6jGwl2qtuVt+6E0dMC7V6L6plPNNj1tu2v0vVmD6S0j8oXyGlZGHHn+BqPxFbS6Qjg9OTs53ZOus5jikseupVOYBrZjqMZE1LVnPijBIc/+2k6QZOQMGc9beLt+s1OnKiM5fHFDLbnwIVe1xsGlpuBdijQ7a+7GFhhQTKTkfNEU1utHbvHByM2Ghp8LNOQ7MwYrbgR/JJqms1YJntbEfg6Z6Q8flrRcFsFrdrIUZZCwYxTHqF3v2lkrPsZ3k3u60VT/Q6BeBCIw/DuFPP8OEfi7Be32buzH1iB5viwosUQQMOnvX8hYe/I= +api: eJztVk1v2zgQ/SvGnLlxEuxJp3WTAA2yuzFqtxfDCCbU2GYjkSpJufUa+u/FkJJMf8Tt5lhUF0nkcDjz3rwht+Bx6SCbwSesCw9zAaYii14ZfZ9DBtISenpyJC15EGDpS03OvzP5BrItSKM9ac+fWFWFkmHl8LMzmsecXFGJ/FVZ9usVOf5bEeZkj8c1lhR86c3jArLZFvymIsjAeav0EhrRj+i6KKCZC/DKFzzwL69tBOTkpFUVx/FWV7eJi6YRnZ15/kySQejs3sc0GgEtPkcJvSid83t/bwGk65JRr6xZq5zs0wttQICsnTflUzcKSUyTsMMD++Mk0ePJ7PoYmShlKeddQhQCTrr1qHO0+bidu50+ptD8lDsBpcmpcKnfm5DJntcUYA7/FLIntgmpHgERPP7AQVtlPTtpeKGsU1dNutbbmsKAq4x2kcrry0t+7ZUXTGopyblFXQw+tMZM49tU8btYzhSLAJWf07OAhbElesigrlV+Vt/3AZZfrgkVakFyI4vT0R8t/LszP6CxjeT/yLMH86gGO1W0ImsE/Hl9fayjT1ioPKhkcGetsW8XUU4eVcFfylPpjg0KI/dmf4IbpT0tGeP5DhO0FjcpmiYGyESUbnlKx53pP+QcLkOdRJPXTQMYgynP/ogPzitu3dolXOzgjei+nsZthO9swU2n4yOHkdt9UmOTHUy6u0NJfmX4UlEZx/8V+hVkMFzz1WO4vhrGPu1Cx7Zrsi7QUtsCMlh5X7lsOJSFqfMLXJL2eIFqiJWCw41HYXZww6ZBU45kbZXfBH+j8f0DbVrZZLN5ajDhqop1sm/WU4SVegjtN7YJGNV+Zaz6L5IvQHEArRoYEq7XD7tL0903LKuo0F3/aV317O9n09djcsuIR8XhidA1+nbWVKRRpc2X52iT+AysKb0wIcOW4Ba+dyhfKGicqYixXF5cXVy+hne7YDAa37f6RemT/KIZiANGey75qCuDeMETln/tJjhKLpoSdeLvsL4Omm5LmKdvflgVqII0w9bbtvRmEEqPM7zqrwnhZFpxhWYz2G6f0dFHWzQND3+pyXIRzQWs0Sp8Zrxm8+QwmXUI38T29UfQLpsXdSyfg1bGbSauGElJlT9rO09ENH6cTEHAc3sT51MVMrD4lfsCfoUMgC/zvDrUcxjbQoF6WXP3ySD65Oc7LPAZeg== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Secret"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/vault/v1/secrets/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Secret"}></Heading> +<MethodEndpoint method={"post"} path={"/vault/v1/secrets"}></MethodEndpoint> Create Secret -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"secret":{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>header</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>secret</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Key" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Slug" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Key", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Slug", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>header</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "kind": "provider_key",\n "data": {},\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "header": {\n "name": "string",\n "description": "string"\n },\n "lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-simple-evaluator.api.mdx b/docs/docs/reference/api/create-simple-evaluator.api.mdx deleted file mode 100644 index b992864e48..0000000000 --- a/docs/docs/reference/api/create-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-simple-evaluator -title: "Create Simple Evaluator" -description: "Create Simple Evaluator" -sidebar_label: "Create Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJztWllv20YQ/ivCPLUAbblGn/hUxXZgNWkt+MiLYQgrciRtujyyhxvV4H8PZpfHUrRkSbYLIVAeHJCcY+eb2Tl29QSazRSE93DxyIRhOpMKHgLIcpRM8ywdxhBCJJFpHCue5ALHWFFCADmTLEGNkmQ8QcoShBBqijGPIQCeQgjfDMoFBCDxm+ESYwinTCgMQEVzTBiET8DSxdXUytGLnOQoLXk6gwCmmUyYhhCM4TEUQU2RGiGgeAhAcy3oRW1GbxhDQV9IISr9IYsXpKTRr6XBAKIs1Zhqqz/PBY+s2f2vKkvpXbO6XBIomqOipwaEzqepsJD69rQJuBpHRuksedboSZYJZOlaK4eqd+YkFAGJa61mV4k1dKXQuUlY+hqBl1ZAUQQVUTb5ipGGhujGRlSt+KNFriu1CCBBvRQjLI45uYqJUQvdVVHkieWpxhnKtqZk0n7jG/m8Loi4jIxg8pePRog/VZYeDdPc6F9h2WKSwTUmmzExKdliLbhtVuggvI73L0KSODpRuk+I/p195kq/hOkqG5e5t0Po1kVhmc02sr+7AuItAohRRZLnZOquos49EUUASpjZrqJuiJdWxZZ3UztDPaJUr1jxl5K9CMBIvquUO8mdBLG7BEES5shiW6G2C/b3guQtHMjjtyqYtkyuztDXOEWJaYS+kGqhD1ttq8vSDUVV8zf1yB6lpf1L9Fs44KZEncopy3OebloAlvHdptpUiqzXKY3tHPqOu2g3nftav/YvUFbzjho8yUsoH3mEm0DrOugtArAUXdi2e8pnxg0Z76HrrKVgiyb0nNn+qNODbi7hzI5Lz+pspo97b4R4eEHUtRthoChIpkSVZ6lysX16ckL/tdoMuDFRhEpNjehdl8Sw86QTZcYxLW0VH2qioF5nyozQEJ4UAawYSQ6j0mFUconqyugdMmOHa4vU6Hh/8mlpHawbjEu7YLTf85I7vIrHbG3n4bXMMdN4pHmC6+uLE9sbWLBMHr+HkjsntlQSo8B3UHLuxJZKKrgmi/HbDRkVWB8W9liuwetNtVRo1VoqwN5USwVXrWX/5rnDgH8Y8A8D/s/Tnhxm/L3suvYyVg5j/v815r+Oux7M3VD/++lpd47/wgSPrWW9CyntheuOQ3yMmnFbZst4XCYQWdT6us1+8qqEC+HG6M9ZxKpGPFGzbqLxJy2l2AybmF5NasHo3dLXlw5ZyC6nuqTzS3YNr0N3tRnnDr517r28vR11BDrftp3qeuGeCwfvJMEO7vOM7tvzTGl7ua7nEEI/l/jI8d++u3/v1ycYqg9uH1fX77aTgrnWuQr7/UhkJj5mM0w1O2a8z3Jut47CyEiuF5ZlMBp+woWr3BDeP/gEtpa48GiT1Z5hOf+EBFR58T8wep5J/p/zeXnz77ozCx6F6XVzH3/xnZFFnfv0+ljIO/5xiaF9gFO/K89f6Lk5AGmm9no2bUKp7ZP6tWvdPLKyj66bw+aTbXz9R+E/Ni1pqxtql2WvXjacrcrXStTP5FMXYDydZtYrZSwOrM97g9EQAm/pJ8e/HZ90bG8RU3phkU0vlUvt59rAKrjqsIIAMLG5BTSy5I/mA62MIrk8GivlrQ7/pdG/DDGN33U/F4yn3qzgdsY9lDuDHGflgXfuqCAA2u1z2kzhPTw9TZjCOymKgl6736PQFoi5YhPh/SLlH1x0f8RCT7Qeu4UemeTEY3dM5WwrzPGeuSx9ZFNUw9vJ2JRNHccgijDXa2kfvAwxurq5hQAm5Y9akiwmHskICvobAtCPeIjbbiT77gkES2eGkmwITib9+wFW1GmZ -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluators/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-simple-query.api.mdx b/docs/docs/reference/api/create-simple-query.api.mdx deleted file mode 100644 index ab7808d5a8..0000000000 --- a/docs/docs/reference/api/create-simple-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-simple-query -title: "Create Simple Query" -description: "Create Simple Query" -sidebar_label: "Create Simple Query" -hide_title: true -hide_table_of_contents: true -api: eJztWm1PGzkQ/ivRfLpKGxLSQtt8OgpU5foCBdqTDkXI7E4St17v1vYCuWj/+2nsfc0mS8hRqXcKH1DieJ4Zj+ddnoNhEw3DK/icoOKoYeRBFKNihkfyJIAh+AqZwWvNw1jg9Y8E1Qw8iJliIRpURDwHyUKEIdhfr3kAHnCZfwcPFP5IuMIAhmMmNHqg/SmGDIZzYHJ2OrYYZhYThjaKywl4MI5UyAwMIUl4AKlX7JCJEJCOPDDcCFog2WedkwBSWiVmqM2bKJgRg5K3UQl64EfSoDSWdxwL7tuj9r7pSNJaKVmsSBGGlDKcZ0dpLLuDrz5Gm9ifiDb1IEDtKx6TGJtCHVUgUg+0SCabQl0QberBWFjLqIKwIODEgomzmhIabG6iSCCTVT4551Hq5UvRzTf0Taswb60QRLK5MM0zc2lwgqrOObypr1TPsJwX+Fz5iWDqt0/RB67NHzqS3RMZJ+YZPOaQi9TwKBVdZhoK0bBfV0NvEyEe0g83GK5HxJRis3bDqZE+TqMfSZPkl2xRo3Xfv+MyiO5Icy2bJN6hNmtGuoAZ7Bpuw0KLvTjI1INIBE8NfuogUw8k3q8L/WCE/kRYqQeCh3w56FKLW0D5YKnp3CpA1S4byiSkvMa0jzJwaxRosy+jVh1Y+NSzQqlbJjaW+CQHSD1QzCxPFU3PauCcE23asOJyw5+FLTZhKJhzYVA9YKou70dWsQGOWSLobpkMSsdrqtf+GinwQEYkkHQrMlJQvblown0mTnMOqc3DLmRY3pnvrxZuzFEE9GFRksLj7YbUg+842zT3vUeKKnDLRLJuVn90pMxPmi6JZsujqKtb1o9fX634qVe70Ic9hWsq2/Q13WMF7TAKY6a4jmTl9laj4A+6fft/QvYgjP2E9iP9vzF3sor/KQlRcX8tcG2YMvqOm6ldDPKPVNMxLukAITP+FOmT4N+xyujCoq3Fh0tnz9e8Jiql6bXop4wEmLKGMo+4vx4C3nNtdCZF9qWCc0wrKH1cBtaMZ/kmr+LXXDsTKVxwlef5TOO1Rqm54bfL3WJJvdcQ4pBp7FwUMBVRbE+QeoD3zDfX9gI35nJMGJ2PFqPBoiV+XuK9Oc10Qfh1FTCxPAWsI9GBEI+SxBlZKcnqS832LMEqe56rLHDWHDoLvDYKF7VWniGewWgxNC2h1dUzXY3aDlQgL0tNLXS2qzvHW655JI+YrckeQ39hO1aLcmh72AdV5Xq8UQvEuestIU0JS6GOI6mdjQz6fZc4K80cXCS+j1qPE9E5zzbDxi2oHyWOaCH1VK+HdlRupp96Zee6skT9JXtYN3cIrtnT1rfuHoPOgS0kkzj4GUy+ONiMSYACfwKTIwebMcnVdWPnL09UtufKeuOmK6W+npRLrq2CS66wJ+WSq6vg8hRDkqcTz8m0HbpsNHQ5Tcy/mbo48v/12KVNQ6vnLg2qRwxeNlHqdvKynbxsJy/byct28oLbyct28rKdvGwnL//xycvmlMW8xM1aXgwGzfHKVyZ4YIcnnWOlrJttOFsJ0DAuavmwvkFE/ops+XCCarnWD5ET0LYSetKWZj+i1myCZUW9eqtVRueSfn3ISOlcjnW2r57OMvU67a4+xpFTX9vVvru8PGsAurutX6obOnScKXQ+Z09IQjTTiN6jxJE29gGKmcIQerHCW453Pfc+pffDPWPpgQca1W3+PiVRAoYwNSbWw17PF1ES7LAJSsN2GO+xmFsH1+gnipuZJTk4O3mPs3fIbMF7NapuuCArcnZR31ZcCYs5lTRe/jLmIDHTSPG/3WVnz2OmjopUQPZ5Xj5cOb5ndJzaw5MMqbjsutaKZTfWqLQK2Uih7OfLrrXSatVaqrx1gkF/8KLbf9kdvL7c3Rvu7Q4Hr3b6L3f/grIDatvjGhl4Pmav9sb7L7p7L3dfdl/s7Q+6N8/Hfnfgv95/Pt7fZ2O2D0WL0i+6jFoLUXYE/byi7y/W12XZlZXH1VL3qihlS+XYirX8mpWf5UIF0BZplaS9mJxdrVjLpLSUph7FvZGzdC7HkbWSPEVZG+wcnJ0Qd1TaXWZ/Z3en37ji2mZbePmmYhjuZ/AWjL0wc6pxQhvkwCALfy9/IMnIrUImK3jL/XBh0JuZu8F704sF4zaQWQHmmYteQeaiZJsWC9xMmttakeLNlFx6eAXz+Q3T+EWJNKXlzPKv5hBwzW5E5f2Yu7fKc7P85qwf3zLFab91Wy93MwJydIcuR3RtgCxpG/mCYrmjOPB9jE3r3lElRp2dXlxSwZ09QQujgGgUIx3Q/yHUbcmuzUEwOUkoxA/BYdLfP+QcfAg= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Simple Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/queries/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Simple Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-simple-testset-from-file.api.mdx b/docs/docs/reference/api/create-simple-testset-from-file.api.mdx deleted file mode 100644 index d477e249ad..0000000000 --- a/docs/docs/reference/api/create-simple-testset-from-file.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-simple-testset-from-file -title: "Create Simple Testset From File" -description: "Create Simple Testset From File" -sidebar_label: "Create Simple Testset From File" -hide_title: true -hide_table_of_contents: true -api: eJztWUtv4kgQ/itWnXYkJ2SiPfm0zGSjZGd2Eg3MXhBCjV1Az7bdnn6wyyL/91F128bYQEgg0h5yimOqvur66tFFsQbD5hqiEQxRG41GwzgEmaNihsvsPoEIYoXM4ETzNBc4MV5uMlMyncy4QAhB4Q+L2nyQyQqiNcQyM5gZekytMDxnyvRmUqUXCTOMXut4gal7yhUZMxw1/efwojWYVY4QgTaKZ3MIgZSZgQimPGNqBSEYbkgUbkmjCJ3mxKt11TGzKfkY6yWE8F3LjLxsQgRDUgkhwRmzgiyRbBFC5a4Wdk7QLFs9zCAatY0UYf0ms0JA0TBQUhsMCKOBmbEUT8X8QhgNzAR1rHhOwTsV+qYB1bDgE+Y06CFhNDBT9HlxCuafhFEQqBeU0+8YmzI7ucKEMsAlWEOZUnbyVIIXhLpBMcqie6FzmWmfuNdXV/Rni30Y2DhGrWdWBF9LYQib1cHyXPDYVVrPZeWB0oil9UqlezwzOEfVKIWPTqKRw1cbhrfJbRWd6ER0W2DBtGMlZqW3nTBNpRTIsoNxumM6GNYoRehhFYtPxfQQuyLfSpFb4dOujVeE0E1AliScAsPE4xYZR6RoFZotS+l0+03Tvd22IOYqtoKpX26tEH9omV08WJNb8w7arhIIN5geqcWUYquDxLZ0oUPuIWVfiSF0O8X/idQv8jPX5kla9znZUX8eR1UHPOUOqHr/GXp+q9f7jphMmDkE2LiXE2bwwnB3nv1WPnrYoO/IsnnyGka+edjSSIICX8HIjYctjVR0TVcTnhxpx1qeHEXWh1VwnzT5OquViq3aSkXYWa1UdNVWThmnqjHqfMcrPWftO2D7GqyuwAlPWk2rbL1PH+H4BlzdlMF9Uk9KO+7f2nL3qDTDnI+iasoqw3dW7EGN+9Z33vrOq/adc/eMHbPz0TPOjgG36n7jZ80S1Vz7NnAdMXC9TfqvMOl3r843Ul9M6g3bs8hozwYvGiiO+qb8FZdcc5n5o3S/MB9AGLgtSolzim69Minc/uXX6+vuhuUvJnji9ifB70pJ9fL1SoKGcUFPe0YqIeOtT5+TyON2oDYuf5b+gK416fmuIXJTbFqzeSPq+0UdGX6n+dRGjPzypku5Rs5s6PXs7nfjxtN3KLh3w+FjB9DHdjuofgAJfDIE1eB5q2Qa3Pp9c4pmIWk1nUtNJnJmFhBBL1e45PhPz2/yeuUUrHs2F5IlQHOrWqLSLmxWCYhgYUyuo14vFtIml2yOmWGXjPdYzl35aIyt4mblVPqP959wdYcsQQXRaNwUGFBi+VTZFqujxHL+CYk0/50f+tYspOL/+fiHwMn5hdciVng2k069JLDvDhf0H+8hBHLD03V1+f7yCtokbglTTbDY1URl230MYYuF2n9amqeuIMAgS3/bfEAnI9pTljXwno5Za0lRcmLwX9PLBeOuANxh1mU4R1CGk+LmcKFeZ2o6uQ/qOIQFZUE0gvV6yjR+U6Io6PUPi4riNg5hyRRnU2JxRLW4qCK4hr9x5VanrmlclL8CLJmwdLpdv15QfXulfhxjbhrinX5D+VHn6uPDYAghTMsfSVKZkA4BO9xw80iHLIqfE33HDQ== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Simple Testset From File"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/upload"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Simple Testset From File - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-simple-testset.api.mdx b/docs/docs/reference/api/create-simple-testset.api.mdx deleted file mode 100644 index 516d14ae1c..0000000000 --- a/docs/docs/reference/api/create-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-simple-testset -title: "Create Simple Testset" -description: "Create Simple Testset" -sidebar_label: "Create Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWltvGjkU/ivoPO1KQyAkIe08LW1alW27iQLdh0UoMjMG3PVcanuyZdH899Wx5z5AJpRITZY8NKnnXHw+H5+bvAZFFhLsCYypVJIqCVMLgpAKoljgD12wwRGUKHonmRdyeqcMHVgQEkE8qqhA/jX4xKNgQ/L9jrlgAfPBhm8RFSuwQNBvERPUBXtOuKQWSGdJPQL2Goi/up5rKWoVohSpBPMXYME8EB5RYEMUMRdiK6PwI84hnlqgmOK4kBjQGroQ4zqqo1K9CdwVqsi1KxFRC5zAV9RXWnsYcuZogztfZeDjWr63UCAcilGJ/0vNr32Ycw1k0ZYywZJIDZ5DJJUbjZ4FAafE32nlByJb40xKbBmxgjg/KtOIiGMrJQtmX6mD51wB+L02tC4vtsCjqnKcxHUZ4kr4TQmMbQdeEMt8RRdUlDV5s/JK0bzNusBhwok4Eb+8jzj/XQZ+e+iHkfoVqpaiDKao14yJCEFWO2Ets0IN2V28nxFJ5Kg51c+E6B/BJybVQ5hus7HK/TiExsYLk7DTyP76DpA3tsCl0hEsRFP3FXVVEBFbIHm02FfUCHlxV6R6m+qhCMPAHXMrHpB48cPRtLkzpzGnNXQ17FsiWaZ5Y9TEpPAE0d6Cw8oeZXJN6nPviGoo2yWKthXTbrVdwVsjtjXQPh+F7lMo+WLEJkpcyukTKLkyYhMlKVyz1QFPIwXrzSo5lBSvg2pJ0cq0pIAdVEsKV6blcKKNvA1VSOOEsaFUSKPV9FGhOa0Qjtnrwex1rJgOXTHVs+YR0f0QvUIkH2oIsAbYq5Bo1Gvc0nsmWeCbrdRbjh0SRrpdTeSYHLJRY94XTrLmbrpTzK1pLCGOUZ6gMgz8pBDqdbv4q1RPwihyHCrlPOKt24QY9u4/nSAyTBUPLeRLTYEJbE4irsDuJuVa0rZuKyePDeyzCcfXkdojetS4HhE+DO8L72F3wdqgDNgHo5+7iz22P8f250nbn0OMSQ7dQh3HLsexyzHuvOy4cxy7/N8LrmOl/wSV/jOZvTwPUF/Q+OVHeLORiRm3nPd69QnLn4QzV89PWu+ECMT+4xWXKsI4/rWlpOKBU/r6GEeeVg8qN/lTYDaoQ5NcbCoi88smJVkUTn07qQajNcavD42+0C6jOqEr+EwOr0F3uxlXBr5dh/thPL6pCTRnWz5UU4C0jDO0xtmzE4+qZYDvUsJAmmcoagk2dEJB7xn9p2PeqXSS2ld2AOtUcZ8+U4kEBxuWSoXS7nQcHkTuCVlQX5ETwjokZPq6SOpEgqmVZhncDD/S1QdKXCrAnkyLBCN0JOMaZbLsVEjIPlIEKXkgM4jUMhDsX3PeyRuZpeFCFNBFb/O3K+++E7Sn8vYkKzgqQznztqU4UsOVPN/l1UE2dMjdpox/tmyatAJZEuXLjdAEzubk1cW8f96+uDy9bJ9f9Hvt2dncafec1/2zeb9P5qSv3Srf7qTcozQTkfcdTemL/QT0ur3zdvey3Xs9Pr2wL07t3quT7uXpX1BuCXbRFav6XXSVwrzpdiuVdlO2SunclO0xtKnbldwod63EM2IM71hl+/NAO0py9Qf6mrUGN0OwAC+kcbTuyelJt+Z+JWKM5sTRnp/eIv0ZwSrd5+wmgwXU06EcFCXeb/kH3BmGDo/4BXnbok1lqJbcaUW/q07ICdMBW29hnQSiCSSBCP1US4Ns/C7BArwBS4xc9gTW6xmR9IvgcYzL5qEcXgqXSTLjhadyf9NV9W3dPeER7kXHq3siGHLo8GSl4QRFGc63Jh22dS7IeWupEdOW4Rg4Dg3VTtppIRjfXI/GYMEseW3nBS7yCIIw4L82AL4rRG4dt/TaGjjxFxFmMxuMTPz5D4O+xIM= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-testset-from-file.api.mdx b/docs/docs/reference/api/create-testset-from-file.api.mdx new file mode 100644 index 0000000000..8098546d83 --- /dev/null +++ b/docs/docs/reference/api/create-testset-from-file.api.mdx @@ -0,0 +1,937 @@ +--- +id: create-testset-from-file +title: "Create Testset From File" +description: "Create Testset From File" +sidebar_label: "Create Testset From File" +hide_title: true +hide_table_of_contents: true +api: eJylVk1v2kAQ/SvWnB1Mo558KiGNkqZJUKG5IIQWe4BNbO9md5yWIv/3anZtMF9N1JxY7DfPM2/ejL0GEgsL8RhGaMkiWZiEoDQaQVIVNynEkBgUhFPygOncqHw6lxlCCAZfSrR0odIVxGtIVEFYEB/zMiOphaForkx+lgoSfNkmS8zdSRt+Ckm0/M/xxWuglUaIwZKRxQJC4GBBEMNMFsKsIASSxFC44ogqdJFTH3YYjkWZc3H94SOE8G34cM/ltSmCEYdUITTl2axcMJUoVg9ziMf7pFW4uVKUWQZVi7DWMBgyR4uzEDl+lPOeOVqcKdrESM1d+ij1ZYuq9YQcSTR9O6AXxojVu9jvGpqKuT1YzZ4wodpA0mDKTXIeaBGwq6YnzVcx3TacTInugtWqsN5U590u/+woBcMySdDaeZkFP2owhG3nCq0zmTj7R0/Wq3vKtokqfVBdlywIF2haNu07xFbVo2Ju5NjT7oi+b4noMzpsw6bWygn3+fz8UJpHkcnUFR58NUaZ/9clRRIy45MkzO0hIFPJzt132LfRtppsJfAu3Bb7XfkEWfDcLo6thAZ6h9aKhR+pE9ujgTox6kXxhvxcl390jWt1YiuvV/d0GZdevmMPayDXo9HggND3drepfTdAQTONV0blwZXf3jnSUvGG18oytxa0hBgibfBV4q+otqyNSp0pkUIIFs0rGusaVZoMYlgSaRtHUZKpMu2IBRYkOkJGQkvYT6Xn7gZ9hrpVYTEpjaSV4+sNbm5xdY0iRQPxeNIGDNln3jm7sO0+0vIWWUO/a6FX0lIZ+cfbIQTJCSx9FIski7ly4bWedW4XInnGgkvlOn3a3c6nTvdUMXVA0Bvc1OMiEjcuTR4OBuGeXBuh+CWVu1kBQpF/2d7gLLkxuShafP9o594boRaG8DdFOhPSDYXLYl13egx1p2Gznixn6rs9CWHJvojHsF7PhMWfJqsqvvxSouGeTUJ4FUaKGSs45rFcNt1bwzOu3Ppz++PMDQ/Ds5KTOvZ1wKPug3pJgppa8IPVw97YuHfwMBxBCLP6IyRXKccwseMNt0dOsqr+ArYKFDQ= +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Create Testset From File"}></Heading> + +<MethodEndpoint method={"post"} path={"/preview/testsets/upload"}></MethodEndpoint> + +Create Testset From File + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"multipart/form-data"} value={"multipart/form-data-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"file"} + required={true} + schemaName={"binary"} + qualifierMessage={undefined} + schema={{ type: "string", format: "binary", title: "File" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"file_type"} + required={false} + schemaName={"File Type (string)"} + qualifierMessage={"**Possible values:** [`CSV`, `JSON`]"} + schema={{ type: "string", enum: ["CSV", "JSON"], title: "File Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-testset-revision.api.mdx b/docs/docs/reference/api/create-testset-revision.api.mdx deleted file mode 100644 index 1b24828bb4..0000000000 --- a/docs/docs/reference/api/create-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-testset-revision -title: "Create Testset Revision" -description: "Create Testset Revision" -sidebar_label: "Create Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWl9v2zYQ/yrGPW2AHKdJ6m56Wtq0iNd2CRI3L4YRnCXKZkdLKkml9Qx/9+FISrYs21FcBcgG5yFxpLvf8Y73j0fPQeNYgT+APlNaMa1g6EGSMomaJ3EvBB8CyVCze20J7iV74IonMXgg2beMKf02CWfgzyFIYs1iTR8xTQUPDEbnq0pieqaCCZsifUolSdCcKfqvAryV4gElx1jf89DIiGdXEfiDOehZysAHpSWPx+BBlMgpavAhy3gIC6+giDMhYDH0QHMt6IHTunVnkVs9Iofm5ZTxc32a18Pio9Q8wqBJAecO0kmIhHGbVezylk1QGY8JUDG1cRGjJBEM451SL1G1+gXKwrOwEoOfxbQQC9oLS5aMvrJAQ8WiH4yiVbyFB1OmsbwKDENOLo/iumSMbRuwAstjzcZMliVNR+Unq+ptlgUBl0EmUP7yIRPiT5XE7V6cZvpXWNeUMLhm03pMKCXOdpq1zAoVy+7i/UyWJI6KU70ki/6VfOJKP2bTbTqucz/NQn3rhRDjlNXUv7oC4l14EDIVSJ5ql2r3gbpYgVh4oEQ23hfqlnhrBOKNqw7vTDXayEHliEsWUjmrFJVqsiwj3thaBgtCXiJpmTHzQKVJ7FLZyfEx/SnZEW6zIGBKRZlo3Thi8PYtiUGSWaY1X17q8M5Q0GZGmAkN/vFKXVmtpNsS9KGmvrSaipmeJLIxcItG8U7xUg+VSNuamzyxI/pNAFIBVArHe+ejz4790E78l9qJq0zv0U9UuJ7QUFje/3lHscusNVqKfWz0snsKe+oM71E3mrtssQ9b58ZYWRo+h5AvFtYJCZlgzyDkwsI6Ibm5RrMGC1RurLczV6JyezUqJbdWISU3WKNScnMVUh6YrPZI9d31zrE30v560Jyizoa4Xk2q7R+VwXserqU/l8QfX0L9VJ7X3FYvVHmvtqGSF5I3d6rP1dk1i31b4B4y2CGDPWsGazpnbOjCa3dLG1rlPPsNn9SV5B3yoXWr0bodzgzPcGaols6DUfc26gUZ87GDMfUCezUUtc7c+ZzPLqV69K6P8HPcxVhwYWaMZycn1SniHQoemhlh672Uidx/hBgyjVzQpy1tlUiC0tunOPNwfbOWSn9K7AJNelLjTY3khgGQJdlOaozR6tPbxya/pJcV7ehKI8PcvNa629W4sObbtb2X/f51BdDubXlTbRPSyrvOm+UF6pTpSUJ3rGmiCDpFPQEfOilNcNn3jmt9VSef6KoOUMMq6fBi9iqTAnyYaJ0qv9MJRJKFRzhmscYj5B1MuYkbxYJMcj0zLOfXvY9sdskwZBL8wXCV4Ja8yfpHmazYGkz5R0aWsmMDN2fk/9hN94CTxhPLRaYgP71Z3hO//4HTVLBt976bptJwGuFvr6PuWfv1m1dv2mevuyft0WkUtE+C37unUbeLEXahPGGuy7N6tqjLU5oE12Uqequ1SSbdL5TnkO7GwZX2ZSNUTGqW0VF2s+KxPY8W8UudYhwlxrz5cNh4SOv8ugcrB2E4Pnp1dFzBLRFTNsLAZKPcAcxr8NZcsXBC8IBNTSoCzXD6x/IFrYwcf4rxCt72aFkbMjmH1OyH7qQCuUk5ZhFzF0gDcIG03GllsoULJvCAssOEgs8fwHw+QsW+SLFY0ONvGZMUMUPnWiMy3YBS3ySPnTn8zWbmNsbk6LZJUEQuMhsra/macqnlOA8CluqdtMOV/HB9ddsHD0bumxbTJCQeiaQZ/fYB6Gsb2mjlz+2zOQiMx5kZ0YPFpJ9/AYPlmTg= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_revision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-testset-variant.api.mdx b/docs/docs/reference/api/create-testset-variant.api.mdx deleted file mode 100644 index eb543c68de..0000000000 --- a/docs/docs/reference/api/create-testset-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-testset-variant -title: "Create Testset Variant" -description: "Create Testset Variant" -sidebar_label: "Create Testset Variant" -hide_title: true -hide_table_of_contents: true -api: eJztWG1v20YM/isGP22AHOfV7fRpbtMiWbslSNx8MYyAlij7utNL705ZPUP/veCdJFty7DpuOhRD88GxT+TD40MeSd0CDE41+CMYkjaajIaxB2lGCo1Ik8sQfAgUoaF74wTuH1AJTAx4oOhTTtq8SsM5+AsI0sRQYvgrZpkUgYXofdRpwms6mFGM/C1TbMAI0vyrjbtRQIQWOplfReCPFmDmGYEP2iiRTMGDKFUxGvAhz0UIhVdLJLmUUIw9MMJIXih97VyyGKAyIsLgOQ0MSsjSQiQtyavYTRdnqC2/AWrSj25ikqaSMNlq9QJ1Z1ijFJ6DVRh8K6aDKAqvEksnHyngFGgx+tY6uo5XeBCTweYuMAwFZwjK6wYZmwKwAisSQ1NSTUvxpLmy6t7jtiAQKsglql/e5lL+odOke5lkufkV2p4yhjAU76aESuF8K61NVVhjdpvun8wka6wl1Y/E6F/pe6HN1zjd5GNb+2kMDV0WQoIx7ej/+g5Yt/AgJB0okbGr+0Kdr0AUHmiZT/eFumXdHQ7inSumr23pflSBi7dQFHLtb5fg9VLZwLtxdR8Kxl3iGJWTXdBZmpR17PjwiP81SITbPAhI6yiXnZtSGLx920eQ5k6plchLF15bCY5khLk04B8yHetdZ1Nx/tl/fvaf/6z/XOVmjwa0pvWEDuR0/+ctaButO/SgfTj6sZuQG+rDezQ71pwQDXWNsPvZbMU1iLAzsGTlWfg9jHxwsKWRkCR9ByPnDrY0UtE1mT9jla7IejUv63TF17NaqdiqrVSEPauViq7ayrdPOR483/Z4TztPTY81kJ2V64mmsOPR6fHx+gB0h1KEdrzpvFEqVftPPyEZFJK/lc2hLSDToPH0KXV4XLT6ydLn96nbIEcp1tOV+asOzrJXaI1TWhbPzaKWjM6Qn35tZGW/nOlSbiXYS3odu5vdOHf0bYvuxXB4vQboYtsMqjvNnWq2u6uvSWIys5QvUrJU8+8MzQx86GWKHgT90yvnS90rZ1HdAw80qQdS2kYqVxJ8mBmTab/XC2Sahwc4pcTgAYoeZsKmuqYgV8LMrcrg+vIdzS8IQ1Lgj8arArecSy47mmJ1YDAT74h5cr0LBrmZpUr860LugWB/Z06LieAsvVleBr35jHEmacPlzuo4DScRvjyL+qfdsxdHL7qnZ/3j7uQkCrrHwW/9k6jfxwj70BqRd1Wqp97WdMvvKc3ZtHxzKUfE5VxTd+9lqjZjXi+7alcfJq5dSZRad6uR3AasM7i+BA84tA7h8ODo4HANtyHMpQEDy10VD/sYvFZm1DkBHlBs6wIYwvj35QPeGadhjMkK3sbUbc0dZXoY+mx6mURhj7/dw6LM6hGUWQ31K5Zmf8vMBg/4oM74IPgjWCwmqOmDkkXBy59yUpy+41JhwsSNuArNqkRewN80t+90tlx2ba1gcZm7xG2VTi5rTmMQBJSZrbLjlbN6fXU7BA8m5d1mnIaso5Ad408fgO9JWdvmmF1bgMRkmnO188Fh8t8XEuVTzA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Testset Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/variants/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Testset Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_variant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-testset.api.mdx b/docs/docs/reference/api/create-testset.api.mdx index 65bf68dbb7..c8c67e899d 100644 --- a/docs/docs/reference/api/create-testset.api.mdx +++ b/docs/docs/reference/api/create-testset.api.mdx @@ -1,71 +1,351 @@ --- id: create-testset title: "Create Testset" -description: "Create Testset" +description: "Create a testset with given name, save the testset to Postgres." sidebar_label: "Create Testset" hide_title: true hide_table_of_contents: true -api: eJztWEtPI0cQ/itWnRKpwQTlNKd4YVeQ3QQE3lwshMozZbs3PY/tB1nHmv8eVfd4ntiAl5U2UTiA6a5H11fVX5drAxaXBqIZTMlYQ9bAnYC8II1W5tllAhHEmtDSvQ0CIKBAjSlZ0qy4gQxTggiq/XuZgACZQQSfHek1CND02UlNCUQLVIYEmHhFKUK0AczWVwtvxa4LtmKsltkSBCxynaKFCJyTCZSilsicUlDeCbDSKl6oTj66TKDkdXZHxr7JkzW7aLxb7UhAnGeWMuu9F4WSsY90/MnkGa81Zys042AlGf5vG/5gY6E8gu1YugIrNB68GA2ZR4Oe57kizPZGeYFmNK2tlCKY1Rh/rc1goizFViyff6KY89wD+J0PdGivFJCS7aUTk0QyrqiuO2DsSnjLrMwsLUl3PaXz7ko7vMd9QSx17BTqH945pX41eXZ0mRXO/gj9SNmGtJQ+Twm1xvVeWLuqMEB2n+5vjCRrDIrqe0L09/yDNPYpTHfF2Nd+GULTUIUV7Twr/uEJWLcUkJCJtSw41ENNnbdMlAKMcstDTd2y7jMu4pkn5EclG7Kb1Yw1pMpg4CbwJJQlW9JkijyrGOr05IT/dOCBWxfHZMzCqdFNJQwH02mcu6DUK9HmrGdegnO0QKcsRCccb8PCu+j2fz7+1/DxlbMHEPJA6wWMHHT/45S8D9ZncPIhGH3fpBw62OQe7T6DrZ4zQUtHVvrz7PYSaDQZTTxYrki+hZOPwWzlJCFF38DJeTBbOdnCNV9zM/9KXfoWrDdr36g3eL2qly1atZctYK/qZQtX7eXrX30Br3c8/0XoyefjsZfjaa365Q9dw8+np8NG4Q9UMvFtwOit1rk+vEtIyKJU/Kl6DvoCKo87uy9h3ruy94I0wX7IwwE5L6lZtvqUOh3N62AMLqmhy92iHozRlHef6t04ruC6kmult4E3oLs7jPMA3760Xkyn1wODIbfdpIb7O5rWU4CU7Crn+UCRmzAVsCuIYFxoepD017hq1cwYBBjSD9txgdMKIlhZW5hoPI5V7pJjXFJm8RjlGAvpa9lQ7LS0a68yub58T+sLwoQ0RLO7tsAtl04ohq5YnQcs5HtiWKpBxcTZVa7l3yHD1axiFbQ4bi7Km2aG8PYLpoWi3gyg7jJ73WSYMbR7QV5pWrKmj6hfy6ZQuojXy4Fd6lJmrsgWuT9QlcWJx280ub4EAYx0sHBy/NPxycBuR5gvJsY+pC08fhtEL1F1ikAApf5WgiVMf2k2+GRcDClmLXuDwum971WWLH2x40Kh9JfO+95UNTWDqqag/gJgQADfiRXXXjSDzWaOhj5qVZa8HCZPXDqJNDhXrdnTn7TuD6seUDk+gi+8B9SSNXydiW1dsKmgeRaY7Mhf40Z3wGrMOEFjEsdU2L2yd63rdH11OwUB82p8leYJ62jk6Pl3BMATOtb2BejXNqAwWzomogiCTf75B1Tz0GM= +api: eJzdVsFu2zgQ/RViTi2g2mmwJ53qpgUadHdrxO5eHKOYiBOJrUSp5Mipa+jfF0PKkuxu0kWP9UUy+eZx5vFxqAMw5h7SDazJsyf2sE1Ak8+cadjUFlK4coRMChVHiHowXKjc7MgqixUlyuOOFBc0ILhWy9pz7sjPbu2tXbjcp7dW0OqZZ/c8DZGqvh/ClCee3dojw7M3JuONZ5coz277PB1ASiNjYL0hbp0VYs8uVeuClNHnnCoL6esZJFA35FCqutaQQpz41K8ICTj62pLn17XeQ3qArLZMluUVm6Y0WQidf/aiygF8VlCF8tY4IWZDXv5JYfLkfUOQgmdnbA4JsOFSBv6W+S6BzO+kEoEapirEotZGFsFyOeFk11Jy5KvvPlPGQtAPoHO4n/Bf9bxddx4TKzSOtGx4yHNMYzvJkB56N0AnLGOUZBIGfFNbH+u9vLiQx6lnVm2Wkff3baluerCs9WuKGv2UntdaxPjfqkc3fEJ+Ch0tr9WCfyqj0ZAMWo7kEzlFyxXxylRNSYMaXZD2j8vLH8X7B0ujgzTqrXO1+3XlNDGa8sRip4Cyzk4NaPcf7iHdnEvTJcOIsUw5Oei2j3vwzzomKIpXPn9K6r/Ie8xpNPTj0CCGWsvsz3ZF6opL97jJfozyRnUfL+NNlO+/FjtC3q3Xyx8I495WxEUtjaapvYQ0yAWkMOdjp03Ak9uR80Hw1pWQQsHc+HQ+z8q61TPMyTLO0MyxMXDemBdhVl0JFLqt0GWtM7wPfIvl9XvavyPU5CDdbKeAlfglOuAUNoiPjXlP+6O1U1i0XNTOfI/bmoCRBIoYJcWKE2/G/vn2G4rbx3447ubQ9zaHYCFj7+uwcK9oX9VrzL6QlcMlCsWCL2YvZxePydAHqMXyuj8wmPEkgQiD5EzoQWJIgKpwWoAJq1fjhNQne1ihnfD11+J6uD5OsppcH7/RBdqbg+kbz5sSTTjgQc9Db+8N8ORDohDnpxs4HO7Q00dXdp0Mf23JiUm3CezQGbyTjd+IGYqjXQ/whfaiXVTxRTj1Ai/baM+zJigNKkYssowafhK7nRzO5YfVGhK46y/9qtYS4/BBOgo+QArhw0Giw3kJYwco0eat9K0UIqf8/gUg1jPu sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Testset"} -> -</Heading> +></Heading> -<MethodEndpoint - method={"post"} - path={"/preview/testsets/"} - context={"endpoint"} -> - -</MethodEndpoint> +<MethodEndpoint method={"post"} path={"/testsets"}></MethodEndpoint> +Create a testset with given name, save the testset to Postgres. +Args: +name (str): name of the test set. +testset (Dict[str, str]): test set data. -Create Testset +Returns: +str: The id of the test set created. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"csvdata"} + required={true} + schemaName={"object[]"} + qualifierMessage={undefined} + schema={{ + items: { additionalProperties: true, type: "object" }, + type: "array", + title: "Csvdata", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "created_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-trace.api.mdx b/docs/docs/reference/api/create-trace.api.mdx deleted file mode 100644 index 9e7b4525ae..0000000000 --- a/docs/docs/reference/api/create-trace.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: create-trace -title: "Create Trace" -description: "Create Trace" -sidebar_label: "Create Trace" -hide_title: true -hide_table_of_contents: true -api: eJztXG1z2jgQ/iuMPl1nTEjSvLR8Opq4Ey4tMED64RiGEbYAFVv2yXJSjvF/v1nJNrIhvDXtpR31Q17ErlbafXZXftR4iQSeRqg+QH2OHcqmaGihICQcCxqwpovqyOEECzISHDsEWYiTf2ISiQ+Bu0D1JXICJggT8CMOQ486UrH2NQoYjEXOjPgYfgo5TCsoieR4iJn8AbNFe4LqgyWigvjRuqQy746wKIqLRUhQHUWCw6otNAm4DzLIxYJUBfUJSqxcjMWeh5KhhQQVHgzcqGkrDYESC8Wh+yOMPKhpUyMu8cgPMHKrpk2NZO4aL0bU3dNOHFN3L2d9WFSaru6vF7WSeSu3kjnsRa1k7sqtSGCnBsrTZkqQHCSVB+juEO+FmKXSIeaEiR3r37bejpygsFYlus0dhMU+JDVlj4HKSGQhzFggsl9iNmfBE0PD0ib7MNP6erJ9728aT6EsWMiZYQoGnwI+n3jBE7gJR3P4FgQeKPhj4rpK+Z+Y8AWykOf5oBr4oUfSBTszLGT54ZjNN28A3L5j/XPKdiApW3+v02iN7put29FDq9exb5ofm/YtsrTxZqtvd1uNT4XBnt39YncLQzefmnarXxjqdNu3DzdluXar9/DZ7upbaveJB9u6h3U/vy2G/a1h2QYwCdYWllUGRQJzMZI15ztqFGWCTAnfbhYsVfpKExHm/hSrNnNzm5HAIo5GTuDuCelev9F/6I1u2rc2gMKWMdXG2velAbvbba+HU5q9AaubA6qW5ZMowtPjoypnqXxOZ0kshIXgdBwLUuq72HUp5Bj2OoXGu4fVjR73x8WRcRB4BDM5tNkWcih3Yg/zPz7GnvdXFLBqk4WxeANFQk0SjL8SR8g50nPCHkqYc7zY6qWiqqywa/ae022s/JlAXZoQTphT9t0zp5pHwiOqjkjHRPdLqg5w8eLp0SAB3cRCL9ddVZsyUPtxUFtTLFaXboZDzcLuxXVX6E0s5FE23w/Gh52FDj1pGRj9VBjBkx3lxIVWlwVWC1qpjX2ibH4Qxj5JVCUWmuFotmeZNIXpl0aUjpc7HM0OwsudggkcDr85JBRr7dIE7big2bk7wbePhIn9kjF7yHiudGfPEHAujwT2wxc5zOsPqPnEJpX/z+YggaDHudQabMDUQbluKxTuMpz3ohULUzL90cMCThwHWe9JMjI7oOyJp5185m4gfvcUK9BkPMEbtAlS2qclrwwPwkjuKEPKGlLWkLKGlDWkrCFlDSlrSNlXeYo1pKzhPl4H92FIWQMjQ8qawvQqEGVI2dcYNEPKGlT8rqRsSshuPbAY5tMwn4b5NMynYT4N82mYT8N8mqOiYT4NwfD6oWaYTwMjw3yawvQrIMown68xaIb5NKj4zZnPl6Aed9QzKdXnhBzm5r76H6+7Zk9fDtBVf/uPkiTRPSF4TORAFAYsUvg+Pz2Hby6JHE7Taol6seOQKJrEXqWbCkte5ahXCDhBrJRK6aLxhFICiLsJjj2B6qfmNHlcwWjH4oiKsaZ1QMlQur/ggXJHJkmpHPyJzKSL8w258gV71JWZULE5D/jxieISgaknz6+bge4FTuHTQ6A2LLtIc0jG9SYW8qPptsTQeKGM0n1OVDqjonjVHUGGfSnTqZxOWeTuVd59fhu3yn3bAnvX73fWJlSxLQZV3VxU+um7VHwiZgG8YyUMIpgvxGKG6qgWcvJIyVNNqLJbU3+XUIM+QzhwNTI4MfdQHc2ECKN6reZ4QeyeSJobn2BawyGV8IyIE3MqFlKl0Wnek8UdwS7hqD4Y6gI9gI8CRFEsjwUO6T0B16ijF2rEYhZw+m9G4lPY4kxpwd4BmN3V62LsbxgIdO3Gb1B8vQs0jYvq6XX1/H3/7LJ+eVY/f3dyen32NypeiW2T02+1tsmVLqbQ2wl+dzm5uqheXp9dVy8ur86r47cTp3ruvL96O7m6whN8hdZumvZVK10d7au26imrPMi70mpIu9TR8kW7mylevGg3J/m1iHYb8exVg0bta8vRGPpt/l4x6tukChz4RoK7TEevVlJoqCUKdKBRnNraJVe5+v2Q0BStQR6lB4vBclOINkVyfYqMihgsv3Mt+iOq9lQ1yJ6a9LKaPx1tC0zZhGx82V9LQa5TNglkqch6sSxElUaniSzN96cnZyenqFwWC8LQ5bAjVo946ceQfYWKl9c6eWsnWxwSBPt/rj6AlUFt9THT5itV4cJa8mInyDdRCz24LUxSy8u0QA9QWqDTwGohjpCFoM3MoKDXB2i5HOOIPHAvSWBYXSjWB0MLPWJO8Rh8NYAeOstq8hLNyUIeXmWzr8pOB+JerGpwqfFDU1YaDQeCvlV2qPWcTrsHCTVOX+Tlq5zjGHYFX+sIwavAQFs2BTm2RB5m01ilnpoT/v0Hj5fYXA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Trace"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/traces/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Create Trace - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/create-workflow-revision.api.mdx b/docs/docs/reference/api/create-workflow-revision.api.mdx index 9a50d1d154..9dad3b974b 100644 --- a/docs/docs/reference/api/create-workflow-revision.api.mdx +++ b/docs/docs/reference/api/create-workflow-revision.api.mdx @@ -5,67 +5,3436 @@ description: "Create Workflow Revision" sidebar_label: "Create Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJztWutP20gQ/1ei+XQnOYTy6p0/HQUquD5AQHsfoght7HWy7drr7gOai/y/n2Z37dgxSZMQJHQtHyDYM7/xvGfHmYImIwVhH/4R8mvCxYOCQQAip5JoJrKLGEKIJCWa3j14ijtJ75liIoMAJP1mqNJvRDyBcAqRyDTNNH4kec5ZZEF6X5TI8JqKxjQl+CmXKEIzqvC/NvJiknsiGcn0HYutlGxymUDYn4Ke5BRCUFqybAQBJEKmREMIxrAYiqCiyAznUAwC0ExzvFBq3vnsoDsXSA/bF9TErzR6Bk2cBCI1S0i0TRWOPaSXkHAbPXXsptuYuouM0iJ99AGGQnBKsqUSL1TnxCEUAcLRe8IN0UI+BfGsAnGgY5OS7CmA5xagKIKSSAy/0EhD2zdvrcnacEUAKdWk+RAkjhlmEOFXDbMucmUNlmWajqhsSkqHzSt17R6XBRGTkeFE/vbWcP63Eln3IsuN/h3mVUUMpmm6GhORkkyWWrXJCi3TLuP9gJZEjlZ4viSLfhTvmdI/sukiHee517PQrYtCyEhKV9S//QTIWwQQUxVJlmtfuDeBOq1BFAEobkabQt0g7yqZeO2bzYltb4+yYHtjksbYINtN6pHK28S8dt0RCsSeYWlpqL2gcpEpF397u7v4p2FKuDFRRJVKDO9ce2IINm2ykTCOaS6cZ0qcWAr0Z0IM1xDu1ttUvTcvKve/uvRL7NLE6PGCfrkJuEPDvMe0WQ0VSbua2XqxpArYPMRGqBQZbVyXPnj2XwPKzzmgXBq9wYTS4lpjRHG8//MZZZlZVxhSNrHRy55S3Lk4viN6q1XQzQ5x59gay+Txcwj55GC9kJhy+gxCTh2sF1KaazjZYqsrjfVm4ptdaa+tSimtVUkpDbZVKaW5Kin3VLYnrtXD9bNn38pAHcD2FPU2JPPdpNmat6e9kWxTlE+SOQS+OQJHhDElMZVrV/rnMsnLC4glo8k1TaikWdSoNuWDDtbqKOfeDWgCe1Ba1SMvqCe/yEFnDR/ceMPjREnynGWrDkDzJl5n2ioFWcdjE984+h13EUBOJEmp3iCrf/JYWcx8NTMpOorKexbRVayLO5W1YtBDF3afkrCRcS88nkPWSUPAOqupU2LPCK2j2BoQT2Sv9k6FXWId7O2111SfCWexVa5zJqWQm++oYqoJs53Wh+Q8ARdR4+46KVVrFC6KZ1q/FxEpp/pUjdq15tHlgiNZTGqN0bnFuz9aLqJeTrSnayykSvM66y5W49SZb5l/z29vr1qAzrdNp7rBulMtq65nL/1SqscCXwzmQiF2TvQYQujluCKkD71yZ6Z65c5Q9cBls62V/ambp2Csda7CXi/iwsQ7ZEQzTXYI65Gc2QRSNDKS6YllOb66eEcnrn9D2B/UCWxHcRHSJKucQ3L2jqKt3FHSb7HYv87tATDU2c1o1n4Yqdezl5tn30mac7rwZeWji0/YT8gfh8nRQffw9avX3YPDo73ucD+JunvRn0f7ydERScgRNHeYq/I09pKrMjVWjasyVSu02qrMVcDmsqu65ndVfsvtd0azRUd1nJ8lTDPyqstuRq1SGifOLBHWqeUu0oZM5/jqAmqnJdjdebWz28JtEGOBIpEtUGVE2NsQzMVmFZUQAE1tdQJNSfrX7AY+GaaCX9F5vCUJNLeK8CGq6XfdyzlhWe3E4XKrDz63ap5XtoT4/IIAsGSMMSHDPkynQ6LoJ8mLAi9/M1RiEg18rA3ReP1BdSqx+fWVTlyvwsLdtVULyblx6TNXxLHAOo7jKKK5Xko7qNWMq8ubWwhg6L8xkIoYeSRB1fB3CIDfP9BWq3Dqrk2Bk2xk7E4YHCb+/AfPFTi4 +api: eJztWd9v2zYQ/leMe9oAOXac2F31NKdp0azrGiRpBswwDFqibDaUqJJUUs/Q/z4cSf204zqpC+wheUgk6u6748cj9Z2yBk0WCvwJ/C3kXcTFg4KpByKlkmgmkosQfAgkJZrOHpzFTNJ7pphIwANJv2ZU6TMRrsBfm1smaQi+lhn1IBCJponGRyRNOQsMaO+LEgmOqWBJY4JXqcSQmlFlYVyAjSck00shzVWy+hSBP1mDXqUUfFBasmQBHkRCxkSDD1nGQsi90iLJOId86oFmmuPA2KLlHoRE0z1R0bSrWUx3Qp8jYO5BTJUii53Yu2A+Ovfcg4TEz4b5i5h0IaQqkCzVjtvnQJ3XIHLP1UY4I/qg9L2xsJ2xxiBZGv6MIJ8trAsSUk5/QpBzC+uCFHTNVzMWHqqMC7LOVp2LsM7XQaMUbJVRCsIOGqWgq4xyT6X6gXK9de65B4pni+fCXKNv7sHhJmpnF3Fz/G6BFPMvNNBQORQH9DvjsgltDhtNQqJJE5CEIcPtSvhl8yz9Pg8s0XRBZTNaPG+OzIXglCRmaHssCJgMMk7kL+8yzv9QIuleJGmmf8XpNaaLGEzTeD8nIiVZ7WS56YqMb8Z7/Ox1bNr3A3naMp1bzy2rRKRmEQn0AXfN2EG6PVNE2C/jwnl7tvdEMpIcMtlbi1jsb3v3NHIdxLaMN5Z40/uqkBfbjCsJM6l0yPRxkCurgCDPEU1SlYpE2Q026PfxT+OlC9dZEFCloox3rpwxPFsoBSKzTq39Wns3GAuTWaWp9ie6omovpuvk2dx2Muemb6k7HQw22bolnIWGi85bKYV8PlUh1YRxvHLnS9uAi6Dx9CnH4zRvnUnVrP8UNkEjBtWitljl1tki9qzJ46aGjM4NPv3eOuC8bGhn19iKBb2W3cencW7p27W93t/cXG4A2rVtLqrVK52iHjpXVT8RU70U2HOkQiF2SvQSfOilWL70oTcnivaKRkT1iqJWPfBAUYliwSxZJjn4sNQ6VX6vF3CRhUdkQRNNjgjrkZRBO6mxedp5g6bmuFI0yCTTK4M3vrz4QFfvKQmpBH8yrRtcY8XZGmqalctHUvaBIptWw7u+g/1rC8MDhgksrRfShbV8VXVWb7+ROOW03RkVvRCcROS3YTQ67Q5fHb/qng5Hg+78JAq6g+D16CQajUhERlD0ODDoD4bd/rB7PLw5PvH7x/7w9Kh/+vofqDUrVcG5jMv7JmnlcL0N2BWhruR32dXF+C67lp7el4qWQN6bwabi3detlLAVX1aLVvdPgSs1I1OzIFNaxEW7zdSM3hOeEY11UY4ts5gk9r4pEmvCBjcPC6gdDEQSsUVmPwHgUFu17JtqXYi8VNKPV9IhyqZVAi2Jt3dNV7LtZWH/Hwt7kPPgZZu/VEN5NBjtxpJIGC1TtItWKJ2R4I4mYeP11j86Puo/pqycQ2d8eeFUfLNirBly3dBupWoDD2hsJDxoSuLfqweYJepFM48Sb4fKbH0GdSpN02+6l3LCjFY3WaydAJ2AE6DgAUpQ8KAUoVD1VniN8nqJ4tWfwHqNxp8lz3Mc/ppRiXJy6o7POfI5wd5hWQjLNdzRlWnbTJPTNQofzXlmhWSr4cFmxHqMg4CmeqfttKavLz9d3+Bk3If7WIToIwnOEH/7APhvAG1mhcITx9bASbLIrES0mPjzH6ul3uU= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/revisions/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Workflow Revision"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/"}></MethodEndpoint> Create Workflow Revision -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow_revision":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowRevision"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-workflow-variant.api.mdx b/docs/docs/reference/api/create-workflow-variant.api.mdx index 9f87384c7b..eab2a6a319 100644 --- a/docs/docs/reference/api/create-workflow-variant.api.mdx +++ b/docs/docs/reference/api/create-workflow-variant.api.mdx @@ -5,67 +5,1660 @@ description: "Create Workflow Variant" sidebar_label: "Create Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJztWG1v20YM/isGP22AHKd566ZPc5MU8douQZJmHwwjOEuUfe1Jp95LUs/Qfx94J8mW3+o4KdANzQfHPpEPjw95JHVTMGykIezD31J9ToR81DAIQOaomOEy68UQQqSQGbx/LCXuH5jiLDMQgMIvFrV5I+MJhFOIZGYwM/SV5bngkcPofNIyozUdjTFl9C1XZMFw1PRrCXi9BI8deDa5TCDsT8FMcoQQtFE8G0EAiVQpMxCCtTyGIqglMisEFIMADDeCFip/Wz2SA6YMT1hkXtBCt4QsLSTCMT2P3XSS6/vIaiPTlRsYSimQZRst9nTr1CMUAcHhAxOWGameg3heg3jQsU1Z9hzACwdQFEElJIefMKJ0WozNW0fZMlwRQIqGNTfB4phTujFx1aB1XSjnYHlmcISqaSkdNlfmvVttCyKuIiuY+uWtFeJPLbN2L8ut+RUWXSUMbjDdTokpxSYbWW2qwhK1m3Q/EJOksZSePxKjf8n3XJtvcbrOx0XtpzF067MQMpbilv4v74B0iwBi1JHiObm6K9TZHEQRgBZ2tCvUDelucxLvfGU+dZ1gpQa1Aq4wpl6yVNBX1N0G4rXvI1AQ8gzJKItuQecy0z75Dvb36V+DR7ixUYRaJ1a0rkthCHZtR5G0Xmkhl2c+nDoJCmbCrDAQ7hfByi62rtT/7Gc/+9l/sp9dWrNDQ1vSekJH87r/85a2idYtetouHP3YTc2/csT3zGxZvWJmsG242896K77bxK2uI8vm8fcw8tHDlkZiFPgdjJx52NJIRddw8oL1viLrzaSs+BVfL2qlYqu2UhH2olYqumorz5+aAni57dGetp/CVnWQ7bXrAalw09bRwcHyPHXHBI/dtNQ6V0qq3YepGA3jwo0Dvj0sCggZNZ4+pRIPioWOMnP6vfQbpDilejQ3ztXhmXULrdkIZ+Vzvagjo3VLT781A5Nf3nQpNxfuGb2e3fVunHn6NoX34vb2agnQx7YZVH+eW/WgeFdf46RoxpJuenKp6XfOzBhC6OQKHzg+dqpxVXfK2VZ3IACN6gGVdrGySkAIY2NyHXY6kZA23mMjzAzbY7zDcu7SXWNkFTcTp9K96r3DyQWyGBWE/cG8wA1lk8+PplgdGpbzd0hM+f4FXWvGUvF/fNAD4OTx2GsRFZSn17PbqvOvLM0Frrt9aszncJiw346Tk6P28etXr9tHxycH7eFhErUPot9PDpOTE5awE1gYubdVqqfouWmZXnsW5916rRxXy1ejcmyczTp1R58lbzML6mVfAevjRfUsS6SjuBr4XQBb3aseBECh9gj7e6/29pdwG8JULFjkqKzi4x5DsJApdY5AAJi6SgEGWfrH7AHtjPKynNJLvPXJvDCMlPli8Kvp5IJxVxHcJqZlnvehzHOYvcRp8rjMdQiADu+YzkbYh+l0yDR+VKIoaPmLRUUJPSgVhkRdnyrTuErtKXzGiXttdCW07eoHiQvrU3mhnFKp8xrdKMLcbJQdzB3fq8ubWwhgWF7HpjImHcXIM/oMAehul7Rdzrm1KQiWjSxVwBA8Jv39C+Qhkw8= +api: eJztWG1v2zYQ/ivGfdoAOXacOO30aU7TolnXNUjSDJhhGLR0stlSosqXpJ6h/z4cKcmSHXtOkH4Zlg+ORN7rw+NzZ6/AsLmGcAx/SvU1EfJBwyQAmaNihsvsMoYQIoXM4PShlJjeM8VZZiAAhd8sanMu4yWEK/fKFcYQGmUxgEhmBjNDWyzPBY+czd4XLTNa09ECU0ZPuSKPhqOmt8r+1kbGUnTGsuWnBMLxCswyRwhBG8WzORRBvZJZIaCYBGC4EbTwB+kWAcSoI8VzCuS5pi4aJoqghCeeMrPPYACJVCnJQMwMdg138ez28sab7YwMObF5/COcfPZmSycxCvwBTi682dJJBddsOeXxgX6s5fFBYJ0vO5dxE68X9VKhVXupAHtRLxVctRct7Py5tXpDukUALxeejykRjjceMSlnXzAicqgUKmZ551S2TRcBpGhYzAxrG2RxzOmSMXHVooEDcOCZwTmqtrd01l6ZSSmQZW7pcV8QcRVZwdRP76wQv2mZdS+z3JqfKb1WumSDG0wPU2JKseVelNuqhPi2v126Hys0iwCYMjxhkXnB+hyVJsvqrDw8rRgqI4/Vw1ay2+p3ZYt4THbdhcZ1K5nsNHHtWxgUBdlSqHOZaV9ng36f/rU6BtzYKEKtEys616UwPLvTRdJ6pY2ybRCbkyiCZlM8HOUapoNAbgLnI9sHW5m7x+10MNiG6o4JHjsgOm+Vkur5OMVoGBf0VN6xTQEho9buUyhiUmzcy3XSv0sfIB1AqueNk6rvzfrSac3muL6pu0UdGJ1b2v23Y6C8vOtSrnEia3g9urvTuPDw7btY729vr7YM+rNtH6rvtJ2qHDp39TCYollImhdzqek9Z2YBIfRyhfccH3ozprFXDZG6Vxa07kEAGtU9Ku0OzCoBISyMyXXY60VC2viIzTEz7IjxHss5bIY0crudNyTqmEpjZBU3S2dvdHX5AZfvkcWoIBxPmgI3VG++gtpi9eGxnH9AwtLPnjCyZiEV/9uXRQCcAlh4LQKLKvl6PRW//c7SXODGVFvaqgujnU693BwsYdAfDLv9Yfd4eHt8EvaPw+HpUf/09V/Qng33yTXHu31yGxManCTs9TA5O+0OXx2/6p4Ozwbd2UkSdQfRL2cnydkZS9gZbI1ch6ptzFCHqvmhaA3WU3Tr4YXraWS1kWn1jYXrKd4zYZmRqrG2sCnL/Ht7WtnssIdG0Gya/1fDf6YaHF/yLJGOQap5ydPTOYu+YhZDAER1/nD7R8dH/V18Vip0RleXZedsF4wXI6hbjFlzJQSAqWubYJClv643KEoiaZdGbW83s298Zy6p0eB308sF4649uiBWJemPoSR9CIBoHwKoiR/qWYYeqaEtqF+EY1itSPazEkVBy98sKqLwSakwIzTH1K0XFZmv4Csu3ZTkxoqu66kkLqwn740Rg9q/1xhFEeZmr+yk0dKuPt3cUi7lDx2pjElHMUqQPkMA+tWEtF0pubUVCJbNLU0FIXib9PcPcS3I6A== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/variants/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Workflow Variant"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/variants/"}></MethodEndpoint> Create Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow_variant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>variant</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-workflow.api.mdx b/docs/docs/reference/api/create-workflow.api.mdx index 63c8b5e2b2..c9cc6b8823 100644 --- a/docs/docs/reference/api/create-workflow.api.mdx +++ b/docs/docs/reference/api/create-workflow.api.mdx @@ -5,67 +5,877 @@ description: "Create Workflow" sidebar_label: "Create Workflow" hide_title: true hide_table_of_contents: true -api: eJztWN9v2zYQ/leMe9oAJvaCPelpbpIiXrslSNz1wTACWjrbbClR5Y+knqH/fThSliwpdh0nBYpteYlN3n1Hfnf8eOYaLF8YiCbwUenPc6keDUwZqBw1t0JlowQiiDVyi/ePpQUw0PjFobFvVLKCaA2xyixmlj7yPJci9r79T0ZlNGbiJaacPuWakK1AQ98qwM7MXPpVrYFnq+s5RJO2gTD3sTNWpU0ju8oRIpgpJZFnULBqKHNSQjFlYIWVNDAyvfOAUDCCwwcuHbdKvwTxsgIJoEuX8uwlgFceoCjYxkjNPmFsoTba5O2tp6wLVzBI0fLmIniSCEoRlzcNWjvLNFaLbLENKzKLC9TNSOmsObK9u6djQSx07CTXP711Uv5uVHYyynJnf4b2VglDWEwPc+Ja89VeVpuu0KF2n+8fxCR5dMrzR2L0T/VeGPstTnftse39PIbGoQoh4ykeuP/uCsi3YJCgibXIaavHQl1sQRQMjHSLY6HuyPeQk3ju5fJJU9JNoTEhwa3Ub7oL4jaoLBQEVbta7dAPmFxlJpTZ2WBA/xqMwZ2LYzRm7mTvtjQGdqxYx8oFp1bV1os/9xaUtjl30kI0KFhD43eJ+f9q/x9U+2tnj5D7jtcz9D74/ssFfx+tByj+MRz92JIfmtfkntt9gAzmSqdkAwm3eGKFX8/uKEGhk97Qk+Xy5HsE+RBgyyAJSvwOQS4CbBlkQ9dsdS+SA+M4J5KDyHqz6o2Sbb5eNcqGrSrKhrBXjbKhq4ry8p6Cwestj9Z0wP3x1NVxgFvVRhS+J/n17KzbdfzFpUh8T9G71Frp41uOBC0X0jcA4UJoG0gVN2afo73TonWH1Lt9r8ICKTOpWWw1PVVC6vvBGL7AWjB3m3oyemOa/VZrSPsKoUu7rQTX9AZ2d2/jItC3L69X4/FNBzDktpnUcIJ7H+sngBTtUtHrQK4MQebcLiGCfq7xQeBjf9P4mT4wMKgfUBufGqclRLC0NjdRvx9L5ZJTvsDM8lMu+jwXvp4Nxk4Lu/Iuw5vRO1xdIU9QQzSZbhvcUfGEcmiaVZnguXiHREy4oGDo7FJp8XfIMQNBG1wGL9o5leVt/cBx+ZWnucT2g0XVtG41p9SZt9vLaqzsDsvuvezS6taiukDrymmmoBoOglPVNslHNld+w2Vah57O3vBmBAyI+IAwOP3ldNDBbRjTSeWxP6kbtvw0sFbeqowBA0z9MQWLPP2tnqCVUXGUTXGJ162k1p1fZs3iV9vPJRf+GPrg67LIJlAWGdS/LwwwoGOypGqMJrBez7jBD1oWBQ1/caiplqYMHrgWfEY8TUgDlpuqWsNnXPmfMV6sTvxJJXPpQhW1hItEJXgM4xhzu9d2unVgbq7vxsBgVj6epSohH839wxp/hAiAXuDI2xeYH1uD5NnCkdZEEDDp7x8ptcdc +api: eJy1V21v2kgQ/itoPl0lEwgJ5OpPR5pWzfV6jZL0Kh1CaLHHsM3a6+5LUg75v59m19gYJ5RGKV+wd2ee2X3m1WswbKEhnMAXqe4SIR80TAOQOSpmuMwuYwghUsgMzh5KCQhA4TeL2pzLeAXh2r1yhTGERlkMIJKZwczQFstzwSOH1fuqZUZrOlpiyugpV2TJcNT0Vhlo7WQsRYeWrT4lEE7WYFY5QgjaKJ4toAiqlcwKAcU0AMONoIW/SbcIIEYdKZ7TSZ4LdbEFUQQlL/GMmX2AASRSpSQDMTPYNdyd52krbzxsZ2zIiM3jX2Hks4ctjcQo8BcYufCwpZENXfPVjMcH2rGWxweRdb7qXMbbfL2olQ1blZUNYS9qZUNXZUULu3hurN6QbhHAyx3PnykRrmA8AinnXzEyUCtsSso7p9KGLgJI0bCYGdYEZHHMKcmYuGqUgQN44JnBBaqmtXTeXJlLKZBlbulxWxBxFVnB1G/vrBB/apl1L7Pcmld0vcZ1CYMbTA9TYkqx1V6Wm6rEeNveU7ofN2wWLbW2V8bK8IQR4iPCdUWf1GV52ga59o0AioJQFOpcZto7a9Dv01+j7MKNjSLUOrGic10Kw7P7RSStV9rx/VZ1cBJF0GgthwduTVE7dn9Amj/bo4yV1/aUnQ4GbZb+YYLHjoPOW6Wkej5FMRrGBT2VMborIGTU2P2ZFJsWO3Fd3/Yv6Q9I3Kd6seWkqvDUQas1W2Ad6U+LOjI6t7T7I/7pXt50Kbflippez+7T17jw9O1Lp/e3t1ctQO/bplN9p+p8qaeoFM1S0oCVS02QOTNLCKGXK7zn+NCbM429TeTqHgSgUd2j0s4/VgkIYWlMrsNeLxLSxkdsgZlhR4z3WM5h9wRjt9t5Q6KubmiMrOJm5fDGV5cfcPUeWYwKwsl0W+CGwssHTFOs8hXL+Qck6vyoBmNrllLx/3wUBMDpAEuvRdxQ4F7XU+Tb7yzNBe5OgSVYFQjN+1TL24MYDPqDYbc/7B4Pb49Pwv5xODw96p+e/QvNWWqf3PY4tE9uZ6KBk4T9PkxGp93h2fFZ93Q4GnTnJ0nUHUSvRyfJaMQSNoLWiHKo2s7McaiaHyJqsn5Gt2r2XM8iq41MNyM+1zO8Z8IyI9XW2tKmLPPvze7uEoJniXQxU+ZOGZDnLLrDLIYAKLi9b/tHx0f9pyK4VOiMry7L0khFuo4XL0ZMN3Kkyg4IAFNXF8EgS/+oN+iUlI3uFhVeO3V3PibKJDD43fRywbire874uszqCZRZDQFQXkPdkzQEQOVpSVUgnMB6TQKflSgKWv5mUVGGTgO4Z4qzOVE3odq73OTqGu5w5dqdaxJdVyFJXFifmzsNg4q51xhHEeZmr+x0q1Bdfbq5pQuU332pjElHMfdNyB4gBKCPR9J2YePW1iBYtrBU40PwmPT7H+ae3Zg= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Create Workflow"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Create Workflow"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/"}></MethodEndpoint> Create Workflow -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>workflow</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workflow</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "workflow": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/create-workspace.api.mdx b/docs/docs/reference/api/create-workspace.api.mdx index cea856d870..84899cd3d3 100644 --- a/docs/docs/reference/api/create-workspace.api.mdx +++ b/docs/docs/reference/api/create-workspace.api.mdx @@ -5,36 +5,36 @@ description: "Create Workspace" sidebar_label: "Create Workspace" hide_title: true hide_table_of_contents: true -api: eJzVGNtu2zb0V4zztGFqfGnXbXpa1hZo0LUx0nR9CAKBkY5tthSpkFRcz/C/D4ekJEq+NAv2srxEPDz3O70FVaFmlit5UUAKuUZmMVsr/dVULEdIoGKalWhRG0hvtiBZiZCC0ksm+d+OMuMFJMAlpFAxu4IENN7XXGMBqdU1JmDyFZYM0i3YTUXkxmoul5CA5VYQ4DLiN7ooYLe79WzQ2D9UsSHaIddcSYvS0hWrKsFzRz3+YpQkWCe00mSl5Wjo5C04rsoHut8lUKDJNa+IpxMhN5cL54I+4S5pIbIWAkjxhtXriMUuCWhPY3VN8F3LBNTdF8xtz9c33rSI6JUL5+c2mrsdcdBoKiWN98ZsMqF/PWPhY53naMyiFqOrgAxP9rfPqSJj9pTXvarF6JxsKnDBamEhhdlk9vOz6fTZZDaaztLZy/TFy7Pn01+nv/3y02SSTibk1roqHiHgk8d6pIDZ82kngBenGFO2Jv/rrEp65fzYMiW6Ess71xli8dxiafbzoDaoHWJRcKJnYh7d+5IeJncbPKKl1FXCMzsig+6zY6FAWZdUJWotUUMCDxzX7gMLbpX7eGCiZv677YEZK0ouXdJUQm1KlDYrmWRL1HGttVV2pQQ2umb/QbiJ32gQ8wp1yY3hSh7z/THjNbIiMxtjsQwuyKJiNsEbMYwq348FVlXZA9OcSV9DAveApSr4YtMAslzJBV/WumXeETXsI2Jdy8ygfuBu8AShBnONttG1Pfmi786BcR+bdEP5wLWSLmxdBCM7j2NEZh/FcXIsGmuwZdodA4cOENTsAI4+5J13NnmhA7QR6eEEvj1YYD2AkaqDaDqR8Yh3/GPAgTUgcI9BIdZU15kvzISKO5O49kCr9sX0Ok3LdgAdchlcazRos4oZs1a6aCy640KEXCdB3bG1dyHU2sT2NgByeXyOg6L0MAQe4nDua9QcW4TuGKeFGeRFe8+kVHZQdz2Qw+LyQQ2qsw8apFCm60NZ04CH2CZHyTRXh0jiuz0paGphDwpqb4Y0JVrN80M03c2Q5r7GGg+RhIuoU87brtjNRWBas83JBjuPmun3NqxuwBxq/ScU6Pfz7wty07IZeIdkvXejt13P/o3B78PU/p4Obq93xga8waJwcPq1Crld88Vstr9e/sUEL/yq/0ZrN22fuFsWaBkXJxYCofLe7SMGMJcWabbvbo/H8M9Qfm4HMstTK9N7NIYtMd7UjqE6Z4wetemTXV50wIti0bnXe/e4Ga+9+w4Ja1DeXl/P9xj62PaD6hf40ed4QKBdKXpWVspY95S0K0hhHCeRGW8Hb8nduB0aVPa0EDSPz1oLSGFlbWXS8TgXqi7O2BKlZWeMj1nFXZobzGvN7caRnM8v3uHmLbKCts+b2xjhI2WVz5M+WhsiVvF3uGmqIIXz2q6U7iaRe/SuPBW5hPL1qnu1vvnGykpg9+rsYt53XpcKg6wELhfKKRTice7MHZ3PL6hXojaeweRsejbZY9tDphJjuY2U8de0TPX82nqUmm7p6gsssvL37oJspaCWTEb8DqTAYP8N5ln8ZseVYNwVkJO+Ddlx02sxlADp/m8NUYLcJrCi7EpvYLu9YwY/abHbEZiGMeXAbQJuxbwj/91soeCGvgtIF0wY3NOxbUXww1WouB9HXWj6ujd5IilJaDbRCRL4ipsDv5K4lrJqcnEbsF55gc+ufYttuOz1QepRnuI8z7GyJ3Fvo/KbX368hgTuwu8opSqIRrM1NRW29hqryjbPCQfbgmByWVPrSsHzpL9/AHl8Y4c= +api: eJzVVk1v20YQ/SvEnFqUlmjVRtA9RXECxEhTG7aSHATBGJEjcWOSu9ld2lEI/vdiuBRJSbZq+FZdRO7O55s3M6xAaTLopCouExAQG0JHd4/K3FuNMUEIGg3m5MhYEPMKCswJBCizvpMJhCALEKDRpRCCoR+lNJSAcKakEGycUo4gKnAbzVrWGVmsIQQnXcYHV2YdXCZQ1wuvTda9U8mGVfaNxapwVDi+Qq0zGTdRj79bVfBZ70sbzslJsvzm430+gn/4vg4hIRsbqdlm46LYXK2ahHcV67A7KcosAw58a+r9wEQdtmKvMzXj87ozAmr5nWK3A/HcpzZQumiK962rXV2zBUNWq8J6NCZRxH87ycJtGcdk7arMgptWGF6Nt2dQcofuGOo+1CSYck4JrbDMHAiYRJPzk+j85PQ8iN6IP8/FWTSK/jqbRJM/okhEEcNa6uQFDr54qZc6eHPaO5DJMcPM1vB/zaqQmxcL+Qu3YR3pzl6uDiGnfNnMgSfcozG4Oer9c6v9X7RuxkoDcCu3F/DAZMf1jree82eTySHNv2Imk8ZE8MEYZV7P8YQcyoyfpKPcHgpkKt65fUGxZOFoTQbqRQ+Px7RP928V97Ww62Ol+0zW4pqGjHlOtAEjeNHE4by861ZuUIseXo/u82m89/A95Wwr8nE2uz4w6Gu7W1Q/SIJvg4WVk0sVLzOtrGsWmEtBwHhIIjuu/Aarx92usxCCJfOw3XSlyUBA6py2YjyOM1UmI1xT4XCEcoxawn4w0+Y2uGDRhvqW4tJIt2nsTa8vP9HmI2FCBsR8MRS4ZaZ57uyK9f2l5SfabDtDwLR0qTLbnmj3cOq1GCbm8E2/UT/8xFxn1G/Enge7OfT02GMqyGKlmoDaGrXZvsP4ngruWUbOG4lGp6PoOXhahWB6fdm2IMZuEJgXg3CvAB30EALlTf+BI8zf9hecNxc9x2Jg7wmK7I3lNlVHP91YZyibBmu8Vy175jsjiJkiui+gAYEWIaRMOjGHqlqipS8mq2s+/lGSYRosQnhAI3HJEM4rSKTl5wTECjNLB6F1Ewp+u2kb8fegr85uyFuqFMyTB8xKfoMQ7mnTf7I1AybdsrBqLy+8n5OZH7hb5YOpyBPLa0zjmLQ7KrsYNOP11e0MQli2X3e5SljH4COPGHz0gSrt4eXPPz6rIMNiXfIgE+Bt8u9fEaWeaA== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Create Workspace"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} - path={"/organizations/{organization_id}/workspaces"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}/workspaces"} +></MethodEndpoint> Create Workspace @@ -43,29 +43,790 @@ Create Workspace as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name"],"title":"CreateWorkspace"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At","default":"2025-11-02 12:26:46.318197+00:00"},"updated_at":{"type":"string","title":"Updated At","default":"2025-11-02 12:26:46.318231+00:00"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","create_secret","view_secret","update_secret","delete_secret","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","name","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"created_at"} + required={false} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Created At", + default: "2025-05-15 07:35:40.094202+00:00", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={false} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Updated At", + default: "2025-05-15 07:35:40.094271+00:00", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"organization"} + required={true} + schemaName={"Organization (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Organization" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>members</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + user + </strong> + <span + className={"openapi-schema__name"} + > + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "User", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + roles + </strong> + <span + className={"openapi-schema__name"} + > + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"role_name"} + required={true} + schemaName={"WorkspaceRole (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "WorkspaceRole", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>role_description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>permissions</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** + [`read_system`, + `view_application`, + `edit_application`, + `create_application`, + `delete_application`, + `create_app_variant`, + `delete_app_variant`, + `modify_variant_configurations`, + `delete_application_variant`, + `run_service`, + `create_secret`, + `view_secret`, + `update_secret`, + `delete_secret`, + `view_app_environment_deployment`, + `edit_app_environment_deployment`, + `create_app_environment_deployment`, + `view_testset`, + `edit_testset`, + `create_testset`, + `delete_testset`, + `view_evaluation`, + `run_evaluations`, + `edit_evaluation`, + `create_evaluation`, + `delete_evaluation`, + `deploy_application`, + `view_workspace`, + `edit_workspace`, + `create_workspace`, + `delete_workspace`, + `modify_user_roles`, + `add_new_user_to_workspace`, + `edit_organization`, + `delete_organization`, + `add_new_user_to_organization`, + `reset_password`, + `view_billing`, + `edit_billing`, + `view_workflows`, + `edit_workflows`, + `view_evaluators`, + `edit_evaluators`, + `view_testsets`, + `edit_testsets`, + `view_annotations`, + `edit_annotations`, + `delete_annotations`] + </div> + </div> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "created_at": "2025-05-15 07:35:40.094202+00:00",\n "updated_at": "2025-05-15 07:35:40.094271+00:00",\n "id": "string",\n "name": "string",\n "description": "string",\n "type": "string",\n "organization": "string",\n "members": [\n null\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-annotation-by-trace-id.api.mdx b/docs/docs/reference/api/delete-annotation-by-trace-id.api.mdx deleted file mode 100644 index d7f9700da3..0000000000 --- a/docs/docs/reference/api/delete-annotation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-annotation-by-trace-id -title: "Delete Annotation" -description: "Delete Annotation" -sidebar_label: "Delete Annotation" -hide_title: true -hide_table_of_contents: true -api: eJylVU1v2zAM/SsBTxsgNFmxk08L1gAt2mFFm+1SBAFjM7FaWVYluptn+L8Pkr+bthi6UxyJfCTfI6kKGA8OojtYap0zssy1g42A3JAN/y4SiCAhRUxb7G22u3LLFmPaygQEGLSYEZP1UBVozAgiGBlIDREY5BQEWHospKUEIrYFCXBxShlCVAGXxvs5tlIfQABLVv5g7YFmFwnUtejRnUE9An8syJYT9D0qN4FHXX7fhwSngTxoe6ILpaDeDKFvDeom8sZjO5NrR86jnS4W/ichF1tpPCnevIhjcm5fqNlNawwC4lwzaQ45GKNkHDic3zvvU40yNNbzzrKJEOdF49QmJzXTgeyImK/BQkBCeywUQ7SoBYxUUlI/TCufRug4/F9yxKD1O6HGEndG+e6eYh6Ve+XLOUZ5y2Voa+/ca1LX3unz6emxhD9RySR4zFbW5vb9+iXEKJX/kkyZOzZQeTy5/Qfiuh6oN0PRaC2WY5ryJkGvS+YOb03WN3IODwQ92OumgYzZ2t++RPgwd3ehriZ0azcSeqC3Yff1Ms4a+t5S93y9vj4CbLSdinoWFths6AafH3GaD9strDFOIYK5sfQk6dd8mCQ3r7oOr0GAI/vULbvCKoggZTYums9jlRfJCR5IM56gnKORoc8dxYWVXAaX5fXFJZXnhAlZiO42Y4Nb30xNe0zNemXQyEvyRLWLcFlwmlv5p6srrMO08fJMSL3Pg3s3EiG52fL6AgT4MhqKFiefThbwnLiJsZ8DjMMcdLHDNYhnLPT1gwDKwhAAE2ZfhgufmckdZ6hHeC/pNEmoZ4HpN8+NQhnaPISvWgHvoBUQxsvQgfAvTrumNgLS3LE3rqodOvphVV374+Yh8TIl0uFOjZ6SByonD88TqsLnEhR+Qiu9+cuuz4roNwp8uGkH5+MMxMvFdbrrchyzS6cvKayEtGuqqr1exjEZHjkebTCffD8LZ6ur1XoFdf0XlMbCfA== -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Annotation"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/annotations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Annotation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-annotation.api.mdx b/docs/docs/reference/api/delete-annotation.api.mdx index d200d1dcfa..150231bc3a 100644 --- a/docs/docs/reference/api/delete-annotation.api.mdx +++ b/docs/docs/reference/api/delete-annotation.api.mdx @@ -5,36 +5,36 @@ description: "Delete Annotation" sidebar_label: "Delete Annotation" hide_title: true hide_table_of_contents: true -api: eJy9Vclu2zAQ/RVjTi1AWG7Qk041GgMJkqJB4vZiGMFEGltMKIohR25dQf9ekFodJ0GbAj1p4azvzTxWwLh1EK9grnXByLLQDtYCCkM2fJ2nEENKiphusbcBAQYt5sRkvXsFGnOCGNhiQrcyBQFSQwwGOQMBlh5LaSmFmG1JAlySUY4QV8B74/0cW6m3IIAlK/9j6QNNzlOoa9FHdwb13wRHvf+6CeUdpvEh2z+6VArq9ZD4xqBu8q59aGcK7cj5aCezmX+k5BIrTYAhhpsySci5Takm160xCEgKzaQ51GCMkklALbp33qcaVWisR5plkyEpysapLU5qpi3ZESyfg4WAlDZYKoZ4VgsYeLlVUj8cdn6YoUPwX8ERA9NvDDUmuDMq7u4p4VG7l76d4yivuQyD7J17TuraO308OTmm8DsqmQaPycLawr6dv5QYpfJvkil3xwaqSA5O/wC4bgbq9dA0Wov7MUxFU6DnJXfb1/bqCzmHW4I+2MumAYzJ0p8+B/iwdqvQV5O6tRsRPcDboPtyG6cNfK+xe7ZcXh0FbLg9JPU0SNZkPpasnDgrBj0LIsYZxBAZSztJP6Jhk1xUdRNeR1W7NjUIcGR3neiVVkEMGbNxcRQlqijTKW5JM05RRmhkmHhHSWkl74PL/Or8gvZnhClZiFfrscGNH6tmUA7Neo7QyAvykLWCOC85K6z81XUYZDFrvDwmUm+K4N4tRyhuMr86BwG+jQas2fTDdAZPITww9huBSdiILnc4BvEEhb5/EEB5WAdgwvzTcOArM4XjHPUo3nOMHRTUo8D0kyOjUIaBD+mrlsoVtFTCWBYdCH859FdT3MngWkBWOPZ+VXWHjr5ZVdf+92NJ1jO2FrBDK/HO47eqIJXOv6cQb1A5OiqxVw54d90uyPsJiOdL71jVntIdqtJ/gYAH2o/vUq8G/zFvB05QnKyb1Ko9nScJGR75HQmkH+l+1U4Xl4vlAur6N1du3PI= +api: eJy9VU1v2zAM/SsBTxsg1Fmxk0/L1gAt2mFFm+0SBAVrs7FaW1YlOltm+L8PlD/iNO1WDMNOcSzyiXyPfK6Bce0hXsJ8g7mHlYLSkkPWpTlLIYaUcmK6QWNKDm9BgUWHBTE5SazBYEEQAztM6EanoEAbiMEiZ6DA0WOlHaUQs6tIgU8yKhDiGnhrJc+z02YNClhzLi8WAjQ5S6Fp1IDuLZp/AX5t0bTYK0n3tjSevGQcT6fyk5JPnLah1RiuqyQh7++qfHLVBYOCpDRMhiUcrc11EpiJ7r3k1KMqrBM2Wbc3jEg8OOv7e03pasf1K2nsg8rbe0p4j7jliNoBdrWDmQ1FX2jz8EewUY8vggxMNo3AvT8+PiT+G+Y6DRmTuXOl+3vWU2LUuTxppsIfBuRlsneKZvvlLkz2PrUyjd0bbZjW5KBZ7ehA53A74v+ibAsUvQq//p1Un8l7XBMMYC+HBjImCzn9kxTSV3t1FzcSZEdvy+7LbZy09D13WR9yulhcHgC22u6LehLMZDIbm0lBnJU7pwn2whnEEFlHG03fo91I+ajuR7SJ6m5uG1DgyW16O6pcDjFkzNbHUZTkZZUe4ZoM4xHqCK2Gp2XNwunkk4SC+IKnpHKatwFvdnl2TttTwpQcxMvVOOBaZq6dov2wQUC0+pyEz87HZhVnpdM/+/aDm2VtlhCmzV0Z0vvNaWv7iMkDGdlR6bMte3r07mj6UjNdwmR2edatDiZhdfo6QhioJ3QNRIECKsLeABMWH3YHUqUtPRdoRnjPSbtX2MAI0w+ObI46bEa4vu40X0KnOaiRkXhQ4u/D1yXuDWulICs9S15d36Knry5vGnn9WJET9VYKNug03gqXyxpS7eU5hfgOc08HJQ4WA2+uuk16OwH1fOm9wkbk3WBeyT9Q8EDb8edQbOM/3tuTE6wp66e27k5nSUKWR3kHTirjPezkyfxivphD0/wCkinHgQ== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Annotation"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/preview/annotations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Delete Annotation @@ -43,29 +43,316 @@ Delete Annotation as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "trace_id", + in: "path", + required: true, + schema: { type: "string", title: "Trace Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "span_id", + in: "path", + required: true, + schema: { type: "string", title: "Span Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + annotation + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "annotation": {\n "span_id": "string",\n "trace_id": "string"\n }\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-api-key.api.mdx b/docs/docs/reference/api/delete-api-key.api.mdx index bafd11e1d9..92d621ddfe 100644 --- a/docs/docs/reference/api/delete-api-key.api.mdx +++ b/docs/docs/reference/api/delete-api-key.api.mdx @@ -5,77 +5,322 @@ description: "Delete an API key with the given key prefix for the authenticated sidebar_label: "Delete Api Key" hide_title: true hide_table_of_contents: true -api: eJztVU1v4zYQ/SvEnHYBws4GPelUAzGwQXZRI+v2khgBLY0lbiSSS47SqIL+ezGkZNlxs0BPvfRkeTgfj2/eDHsgVQbIHmDltLjDLsBOQoEh99qRtgYyuMEaCYUyYrW5Fc/YiT81VYIqFKV+QRNNzuNBv4qD9fFAtVShIZ0rwkK0Af3i0TyalS9D9miEEBz0NAZ9COQ/ZmJb4ZTGHmKWqR5ZsUdRRBzFIsV7/NFiIPHhPn2MCbTJbaNNeTy3+++YU6x+j9R6MwEodE6ZWMVfbY3yncitIaUNhysR2jzHEESDIagSReusmYyHtk5wtDUptdIBp8yft9vN+jXHSGAmbs8vo4MwlsTBtqYQ1ovCYrLssbam5Muye+QMJFiHXnGi2wIySBw8KaefnrEDCU551SCh5yb2YFSDkMFMLkjQ3ESnqAIJzIr2WEBGvkUJIa+wUZD1QJ3jyEBemxIkkKaaDXfYiU1KNQw7zhCcNQEDB11fXfHPuV6+zRzdj84ggblFQ+yunKtZGdqa5ffAMf0lkNQ3kKCKQscG1RvPZJDm2gn+BHKqI0atjmKGYRgGCb9cX1+i/EPVuogYxNp76/8NRHcChPOS0jV/acImXDrUNj87Vab77RDbdU76II8WbQhL9DDsBjnZlPeqO+nMF5sAwiChCeXPmvg1aRiOyd53jWSILZ8Oc+1jN2YBPcR7pdKj325OM9Ob2H3/GjeJvn8qNrnwQF0kTL1tkCo7T0acCKogg+UzdmHZz5MwgISA/mUaldbXkEFF5EK2XOa1bYuFKtGQWii9VE4Dyz1g3npNXQxZbW7vsPuMqkAP2cPu1OEbqyP1+9ztSLVy+i7O7Dikq5Yq6/VfqYnjnFYpiq+mzcHG8JGFVQTHewQk8DWSkK8WnxZX8HZpnznHvZZHYU+14zHINywc7w8SsImqBkLV/DofMDJnAzXKnOR7M3dv0PTzaP3/mvynr8koRcJXWrpa6bg8ogb6cXAe+PEIICE7eUR2EiobiE/7fq8C/u7rYWDzjxY9D8dOwovyWu1Zqg89FDrwdwHZQdUBfyKISDmvlI/iPYDTABlW1ouqW/4HkpGeP3ZxXVbTfPajwypn9k5CL7Y7D/Jxk9ysv6y3axiGvwHPjSEW +api: eJztVU1v4zYQ/SvEnHYBwk6DnnSq2xjYIFvUyLq9JEYwlsYSNxKpJUdpVEH/vRhKsuy4WaCnXnqyPJyPN2/mkR0w5gGSB1jVRt1RG2CnIaOQelOzcRYSuKGSmBRatdrcqmdq1Z+GC8UFqdy8kI2m2tPBvKqD8/EAGy7IskmRKVNNIL94tI925fOQPFqllAQ9jUEfAvuPidoWNKVxh5hlqsdO7UllEUe2GOI9fWsosPpwP3yMCYxNXWVsfjx3+6+Ucqx+T9x4OwHITMqJWsVf4yz6VqXOMhor4ahCk6YUgqooBMxJNbWzk/HQlAMc4+yQGk2gKfOn7Xazfk0pEpio2/NmTFDWsTq4xmbKeZU5Gix7Kp3NpVlxj5yBBleTR0l0m0ECAwdPWJunZ2pBQ40eK2LyMsQOLFYECczkggYjQ6yRC9AgrBhPGSTsG9IQ0oIqhKQDbmuJDOyNzUEDGy7FcEet2gyp+n4nGULtbKAgQddXV/Jzvi9fZo7uR2fQINySZXHHui5lM4yzy69BYrpLIMPcQANmmYkDKjdeyGAjtQf4E8ipjhp3dVxm6Pu+1/Dj9fUlyj+wNFnEoNbeO/9vINYnQCQvoynlyzBV4dKhdOnZKdr2t0Mc1znpvT5ajGXKyUO/6/VkQ++xPZnMZzcAhF5DFfLvDfHXYYfhmOx910iG2sppP9c+TmNeoIfY11B69NvNaWZ6B3bfb+NmoO+fik0uIqiLhMNsK+LCzcqIiuACElg+UxuW3ayEHjQE8i+TVBpfQgIFcx2S5TItXZMtMCfLuECzxNrA24twFU/VL+IKooVAaeMNtzHfanN7R+0nwow8JA+7U4cvsjrDMpy7HeeAtbmLgh4VvGq4cN78NUx4FHExREnfxh5cDB8pGrH9jOkz2Qw0SJ8D7KvFD4ur95oZA+R2GhWAaVTAhCO6gX5D15Eo0EBVXH9gwuqn+UBQ1i5whfYk3xuBvkHVzRr8/9n5T5+dcS2ZXnlZl2jiLRN3oBsV9iCvTAANyclrs9NQuMBy2nV7DPS7L/tezN8a8iKUnYYX9Ab3srYPHWQmyHcGyQHLQN9ZiEi53D0f1XsAJzFZ2awXLBv5B1qQnr+K8V4tJq12o8MqFfZOQi+eARH18cq5WX9eb9fQ938DcL4vpQ== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Api Key"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/keys/{key_prefix}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"delete"} path={"/keys/{key_prefix}"}></MethodEndpoint> Delete an API key with the given key prefix for the authenticated user. Args: - key_prefix (str): The prefix of the API key to be deleted. - request (Request): The incoming request object. +key_prefix (str): The prefix of the API key to be deleted. +request (Request): The incoming request object. Returns: - dict: A dictionary containing a success message upon successful deletion. +dict: A dictionary containing a success message upon successful deletion. Raises: - HTTPException: If the API key is not found or does not belong to the user. +HTTPException: If the API key is not found or does not belong to the user. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "key_prefix", + in: "path", + required: true, + schema: { type: "string", title: "Key Prefix" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + type: "object", + additionalProperties: true, + title: "Response Delete Api Key", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={"{}"} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-evaluation-preview-simple-evaluations-evaluation-id-delete.api.mdx b/docs/docs/reference/api/delete-evaluation-preview-simple-evaluations-evaluation-id-delete.api.mdx deleted file mode 100644 index aa5521f96c..0000000000 --- a/docs/docs/reference/api/delete-evaluation-preview-simple-evaluations-evaluation-id-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-evaluation-preview-simple-evaluations-evaluation-id-delete -title: "Delete Evaluation" -description: "Delete Evaluation" -sidebar_label: "Delete Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJydVctu2zAQ/BVjTy1AWG7Qk041GgMxkqJB4vZiGAYjrS2mlMiQK7euoH8vlnpYip0cerJkzr5mlqMKSO49xGtYHKQuJSlTeNgIMBZdeFumEEOKGgm32GO21uFB4e+tV7nVwxO/HcJUut02wSDASidzJHRcsIJC5ggxjNAgQBUQg5WUgQCHL6VymEJMrkQBPskwlxBXQEfLwZ6cKvYgYGdcLgliKMuQhRRpBpzGmixTqOsNJ/XWFB4957mazfgnRZ84ZRkHMTyWSYLe70o9eWjBICAxBWFBDJfWapWEtNGz55hq0Jt1zB6ppkJiyiaobVkVhHt0gx6/BoSAFHey1ATxrBavaOGaxfH7LhD3/uy16BFFqTXwyG+xITqkeXrGhAY9PQZdT/hl2jNR1xz4+erqnLifUqu0yb9wzrj/Zy1FkkrzkyLM/TlAm2R0+hY9Azo65uvNaXDpnDwO5r4zTYNQC8j9/tKqddBv6L3cI/TJ3oYGMiYrPr1E+mnN12GupnSLG8h3ordh9+0xrhv63lP4ZrW6P0vYaDsW9Trc38lpF7g/pMycnCFcbsoghqg1hqgxhmhgDFE12ukaBHh0h84OSqchhozI+jiKEm3KdCr3WJCcShVJq8Ime0xKp+gYQub3y1s83qBM0UG83gwBj7xYzaqMYb1K0qpbZNJaI5qXlBmn/nYzBiPKmihmRRU7E8JbAuehucn8fgkCeIyGrtn003QGr0kcgflOyCTcia52OAbxioV+fhCAebgQQCjzL6cD7swaT7ksBvkuaTZqqGeB8A9FVksVVj6Ur1ox19CKyUoFOWHoSx4ExGOb2gjIjCcOraon6fGH03XNf7+U6Fi0jYCDdEo+MYXrClLl+TmFeCe1x7Mue/uADw/tLfk4AXG5+07YglXlxvgNBPzC49mHJphA1q1O1WLmSYKWBtFnnsU71m//9eJusVpAXf8DUiCCCw== -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/simple/evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-evaluations-human-evaluations-delete.api.mdx b/docs/docs/reference/api/delete-evaluations-human-evaluations-delete.api.mdx index 5698522406..7c14655059 100644 --- a/docs/docs/reference/api/delete-evaluations-human-evaluations-delete.api.mdx +++ b/docs/docs/reference/api/delete-evaluations-human-evaluations-delete.api.mdx @@ -5,41 +5,38 @@ description: "Delete specific comparison tables based on their unique IDs." sidebar_label: "Delete Evaluations" hide_title: true hide_table_of_contents: true -api: eJzdVU1vGzcQ/SvEXNoAtOQYPe2pai3AQhzUcNRe5EVA7460TLgkTc46UQX992DIVVYr2SlyrS5akm++3rwhd0BqE6FYwU3XKnsxf1amU6SdjVBKqDFWQXteQwHXaJBQRI+VXutKVK71KujorCD1aDCKRxWxFrxuUAfRWf3UoVhcx8mDfbCzsInFgxVCCK+2xqla/HqrI60ihfJNIZYNHkx0jZb0WmOIwq3Z3QvRyIk6pZS83yN1wXKAmTA60sEuQ+pz+19SYiDBeQyp5kUNBWT8RxyY+NgwN6OdDAIJAZ86jPSHq7dQ7NJSB6yhoNChhMpZQkt8pLw3ukr200+RCd1BrBpsFX/5wFmQxsir41C6TluasE0ftPUIBUQK2m5gLw8bKgS1BQmkyfD6qJViUUfYD1D3+Akr6rPP6a7OYpaDq9z4wSHs9+wtYPTOxpzy1eUl/40V86GrKoxx3Rlx34PhJ0g5qewHFPSJHoKIXqrHHCSBj3YyqC/mt6ur8/z/UUbXCS3mIbjwM8mPO1ojKW1GjRwDjKtGp8pu/1pDsTqv9vuOtoQbDLAvX1fBrav6lklo4+acvQH6HmNUGxwk9To0kSGWfPpfsuK6cuged6Srgd7M7utlXGf6Xgp2gNwsl3dnDnNvW6TGDbMNEryiBgqYpsm+OJI+SIgYnjHExH0XDBTQEPlYTKeVcV09URu0pCZKT5XXsC/ZouqCpm0ymd0t3uH2BlWNAYpVeQz4wOrI/R7DBq17/Q65cqtaXs86alzQ/+YmStAsyyZbcWmsu/vhDpp/Va03+OIdsjr0keWi7dqlsD17s1SUmN0tQAKXnwfgcvJ2cgmnD8EIzAOhqjQQh5zTMcgT9r7zBhKwTdMAhKr9fTjgiryL1Cp75O98mE8z2g1j+b99pXqBEH6lqTdKp5FODO96Oa/gXM6lhMZF4sPdjgv/O5j9nrefOgys2FLCswqagyW5yoO8WMyfcQsF/JnJvUgDz3DTZa2e3H98N2WLWVWhpx9iy6O5vJ7fzpdzkPDYv6Otq9kqqC98nagvUEB6qHNR/NDy3g6MspuOL60Cslf+fQNegBQw +api: eJzdVU1v2zgQ/SvEXLoLKHYa7Emnuo2BGM1ig9TbiyMUDDW22FIkQ47Seg3/92JIufJHkkWu9cUi+ebr8c1wAyRXEcoFXHWttGfTR2k6SdrZCFUBNUYVtOc1lHCJBglF9Kj0UiuhXOtl0NFZQfLeYBT3MmIteN2gDqKz+qFDMbuMozt7ZydhFcs7K4QQXq6Nk7X441pHWkQK1Z+lmDe4M9E1WtJLjSEKt2R3T0QjJ+qUUvJ+i9QFywEmwuhIO7sMqU/t36TEoADnMaSaZzWUkPFfcGDiS8PcHOxkEBQQ8KHDSO9dvYZyk5Y6YA0lhQ4LUM4SWuIj6b3RKtmPv0YmdANRNdhK/vKBsyCNkVf7oXSdtjRhmz5o7RFKiBS0XcG22G3IEOQaCiBNhtd7VylmdYTtAHX3X1FRn31Od3ESsxpc5YsfHMJ2y94CRu9szClfnJ/z36FiPnVKYYzLzojbHgyvIOWoshco6BPdBRG9VPc5SAI/2Mmgvpi/Li5O8/8sja4TWkxDcOE1yR/eaI0ktTm4yEOAcergVNr1P0soF6fV/trRlnCFAbbV8yq4dqq/sgLauDplb4D+jTHKFQ6Seh6ayBBzPv0/WXFdOXSP29PVQG9m9/kyLjN9TwXbQa7m85sTh/luW6TGDb0NBXhJDZQwTp19tid9KCBieMQQE/ddMFBCQ+RjOR4r47p6JFdoSY6kHkuv4XhITtKp+MBQ2FbsTnVB0zr5m9zMPuL6CmWNAcpFtQ/4xNLJYjiEDY3g9UdkWqxseT3pqHFB/5dvuADNCTTZiutmUd4OA2r6Q7be4JMDZrG7ZNaStkuXwvbU9jW9l+ob2hoKYH5yueejt6Pz50joDcTkZtZ3jlSpc3b5JxgURzT/IhgKwDa1DRDK9t1wwNV5F6mVds/fadcfZ7YZ+ve3fc56sRD+oLE3UqfeTwxvet0v4FT3VQGNi8SHmw0X/m8w2y1vP3QYWL1VAY8yaA6WpFvspMbC/oZrKOFDJvcsTQaGmy7r9mhQ8hDLFhOl0NOL2GqvgS+n19P5FAq47x/c1tVsFeR3njvyO5SQXvRcFL/IvLcBI+2q4+lWQvbKv58VKSK/ sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Evaluations"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/human-evaluations"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"delete"} path={"/human-evaluations"}></MethodEndpoint> Delete specific comparison tables based on their unique IDs. Args: - payload (List[str]): The unique identifiers of the comparison tables to delete. +payload (List[str]): The unique identifiers of the comparison tables to delete. Returns: A list of the deleted comparison tables' IDs. @@ -49,29 +46,299 @@ A list of the deleted comparison tables' IDs. as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluations_ids":{"items":{"type":"string"},"type":"array","title":"Evaluations Ids"}},"type":"object","required":["evaluations_ids"],"title":"DeleteEvaluation"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Delete Evaluations Human Evaluations Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"evaluations_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Evaluations Ids", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'[\n "string"\n]'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-evaluations.api.mdx b/docs/docs/reference/api/delete-evaluations.api.mdx new file mode 100644 index 0000000000..3c6ad18953 --- /dev/null +++ b/docs/docs/reference/api/delete-evaluations.api.mdx @@ -0,0 +1,344 @@ +--- +id: delete-evaluations +title: "Delete Evaluations" +description: "Delete specific comparison tables based on their unique IDs." +sidebar_label: "Delete Evaluations" +hide_title: true +hide_table_of_contents: true +api: eJzdVU1vEzEQ/SvWXABpSUrFaU+kNBIRRVRt4JJGyPVOsgav7dqzLSHKf0djb7r5aEFcySVr+3k+3rwZr4HkMkI5g/G9NK0k7WyEeQEVRhW05zWUcI4GCUX0qPRCK6Fc42XQ0VlB8tZgFLcyYiV4XaMOorX6rkUxOY+DG3tjR2EZyxtbJTPfsHclXl7oSLNIYf6qFNMatzd1hZb0QmOIwi3Y6hNOyYlsMjm5QmqDZT8jYXSk7b0MqY7vv0jxQQHOY0jxTCoo4ThKKCDgXYuRzly1gnKdljpgBSWFFgtQzhJa4iPpvdEqXRx+j0zfGqKqsZH85QM7I42RVzs+vukqbWnCJn3QyiOUEClou4RNsd2QIcgVFECaDK93CicmVYRND3W331FRF30Od3bkc96bymXuDcJmw9YCRu9szCGfnpzw374+rlulMMZFa8RVB4Z/IOUgsz9Q0AW6dSI6Ye6KN8f89vT0OMyv0ugqwcQ4BBf+Jcb9wlVIUpu9eu0DjFN7p9KuPi+gnB0n9bijLeESA2zmzxf7wqmuMgU0cXlMUg/9hDHKJfbKeR6ayBBTPv2bejiv7LrD7cinpzez+3wa55m+p5xtIR+m08sjg7m2DVLt+k6FArykGkoY7vdsxHCPISbW22CghJrIx3I4VMa11UAu0ZIcSD2UXsPhzBulU/GeobCZsznVBk2rZG90OfmIqw8oKwxQzua7gGsWTZbBPqxXutcfkQmxsuH1qKXaBf0r17YAzQHU+RZnzHK86ifQ+KdsvMEnJ8hsW15WkbYLl9x2pHY5nUn1A20FBTA/Od2TwZvByXMkdBfE6HLS9YxUqWe28ScYFAc0PxIMBWCTGgYIZfOuP+DsvIvUSLtj74m2Pohs3Xfu//46dZoh/ElDb6ROzZ+IXnfC3xvq3JG1i8Tb6zVn/iWYzYa371oMLN95AfcyaHaTtFtstcbK/oErKOF9Zvd1GgoMN20W7sGM5PmVb4yUQk9/xM53evd8fDGejqGA2+5JbVzFt4J84JEjH6CE9DTnpPjN5b01GGmXLQ+2ErJV/v0GKyEQqA== +sidebar_class_name: "delete api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Delete Evaluations"} +></Heading> + +<MethodEndpoint method={"delete"} path={"/evaluations"}></MethodEndpoint> + +Delete specific comparison tables based on their unique IDs. + +Args: +delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. + +Returns: +A list of the deleted comparison tables' IDs. + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"evaluations_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Evaluations Ids", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'[\n "string"\n]'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-evaluator-config-evaluators-configs-evaluator-config-id-delete.api.mdx b/docs/docs/reference/api/delete-evaluator-config-evaluators-configs-evaluator-config-id-delete.api.mdx index a4053fb136..3240633f9b 100644 --- a/docs/docs/reference/api/delete-evaluator-config-evaluators-configs-evaluator-config-id-delete.api.mdx +++ b/docs/docs/reference/api/delete-evaluator-config-evaluators-configs-evaluator-config-id-delete.api.mdx @@ -5,73 +5,304 @@ description: "Endpoint to delete a specific evaluator configuration." sidebar_label: "Delete Evaluator Config" hide_title: true hide_table_of_contents: true -api: eJzdVUFv2zwM/SsCTxsgJF2xk08L1gwLtmFFl32XNAhUm4612ZIq0d3yGf7vAy07Tuq2wK47xZHIJ/LxPakBUvsAyQaWD6qsFVkfYCshw5B67UhbAwksTeasNiTIigxLJBRKBIepznUqcMgUqTW53tdecd7s1tyahd+H5NYIIcawXQzb6Uy8CuRfJ2JdoKiNvq9R6AwN6VyjFzYXVOCL8DdItTfDCXfWlolYe4bJY6HaGvFLBRHqNMUQ8rqU4oMqAwpLBfpfOuAMJFiHEXWVQQKxxd2k4ONC6FfCbhqks90uAoAEp7yqkNAzxQ0YVSEk8EQOSNDMtFNUgASP97X2mEFCvkYJIS2wUpA0QAfHEIG8NnuQQJpKXjiOT7zvMMUqg7bdMlRw1gQMnH15ccE/59P9duRG3PTBICG1htAQhyvnSp12/Mx/BM5pphUx+ajMSUkDmLiKkpmUOEquXwliGrTKRA8Abdu2Et5eXk57+E+VOusqFEvvrf+bBpzn8ZOOFGVISpf8pQmrMA0obXq2q8zha96N93w2rTyuaEO4Rw/ttpXDmvJeHU7Y+mxjgdBKqML+pVl/wRDUHuEI9oIsmAyx5t12PNve/cCUznS26fqKR/dx2xFmpDey+3wbV5G+pw4bQj6u19cTwDjbCqmwowU7B1EBCcxH7817782bJ3zUgoSA/mFwXO1LSKAgciGZz9PS1tlM7dGQmik9V04DeyRgWntNhy5lcb36hIePqDL0kGy2pwHfWDRRBudhxwkopz8hE9J7fVFTYb3+P862d3kRs7hjbXLbpffkLLrixOJ6BRK4jajvi9mb2QU8vpfPglnvKu30PpzdbYN8xMKxf5CAVSd2IFTVu3GDK3M2UKXMCd4zPn5cVjNa799/OfqxE/6muSuV7vzb8d302t2M932IY2L1goTkqXdgK6GwgTitae5UwO++bFtevq/Rs0K3Eh6U1+qO9bJpINOBvzNIci7vhWG8uunt/lo8V/mgYsMS5vL4H0j4iYdnHq7uTisGtzR95CJN0dEJxuQKZlsd7X61/LxcL6Ft/wBSbf2+ +api: eJzdVcFu2zgQ/RViTi1A2NmgJ53qbbyo0S42SN29OIbBUCOLrUQq5CitK+jfFyNKlh3FAfbak2Vy5vHxzbxhA6T2AZINLJ9UUStyPsBWQopBe1ORcRYSWNq0csaSICdSLJBQKBEq1CYzWuCQKbSzmdnXXnHe7N7e24Xfh+TeCiHGsF0M25lUvAnk3yZinaOorXmsUZgULZnMoBcuE5Tjq/B3SLW3wwkPzhWJWHuGySJR46z4oYIItdYYQlYXUvylioDCUY7+hwk4Awmuwoi6SiGBeMXdhPBxIfQrYTcNMuluFwFAQqW8KpHQs8QNWFUiJPBCDkgwrHSlKAcJHh9r4zGFhHyNEoLOsVSQNECHiiECeWP3IIEMFbxwLJ/40GGKVQptu2WoUDkbMHD29dUV/5xX98tRG3HXB4ME7SyhJQ5XVVUY3ekz/xY4p5kyYvFR2RNKA5i4iS0zoTi2XL8SxDRolYoeANq2bSW8u76e3uFfVZi0YyiW3jv/fy5QeS4/mShRiqRMwV+GsAzTgMLps11lD/9kXXnPa9PK44qxhHv00G5bOawp79XhRK3PLhKEVkIZ9q/V+m8MQe0RjmCvtAWLIda8245nu4dvqOmszzbdveLRfdx2hBnljepevsZNlO+lw4aQj+v17QQw1rZEyt1owc5BlEMC89F789578+YFH7UgIaB/GhxX+wISyImqkMznunB1OlN7tKRmysxVZeD5rFt0u+IDhwIbKKCuvaFDh7e4XX3Cw0dUKXpINtvTgC/cUbFHzsOO5VGV+YSsVj8IFjXlzptfsfD9CMhjFsthbOa69F65ntufSn9HyzOD7xlpX83+mF1dukyfIBa3q94YSnfGGHh0YSCfyXUUCiRg2bkCCFX5ftxglpULVCp7gnfB8M/pNaNHf/8npm8Bwp80rwplOqN3ejd9k2/GhyHEMnGbg4TkpQdjKyF3gTitaR5UwK++aFtefqzRc7duJTwpb9QD986mgdQE/k4hyZjeK8V4c9fPhbfiEvOhoy23M9PjfyDhOx4uvHDd8MsH5zR95EJrrOgEYzKr2WLHuXCz/LxcL6Ft/wNmjQxc sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Evaluator Config"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/evaluators/configs/{evaluator_config_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Endpoint to delete a specific evaluator configuration. Args: - evaluator_config_id (str): The unique identifier of the evaluator configuration. +evaluator_config_id (str): The unique identifier of the evaluator configuration. Returns: - bool: True if deletion was successful, False otherwise. +bool: True if deletion was successful, False otherwise. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Delete Evaluator Config Evaluators Configs Evaluator Config Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_config_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluator Config Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + boolean + </div> + </ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-invocation-by-trace-id.api.mdx b/docs/docs/reference/api/delete-invocation-by-trace-id.api.mdx deleted file mode 100644 index cfaff8e380..0000000000 --- a/docs/docs/reference/api/delete-invocation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-invocation-by-trace-id -title: "Delete Invocation" -description: "Delete Invocation" -sidebar_label: "Delete Invocation" -hide_title: true -hide_table_of_contents: true -api: eJylVU1v2zAM/SsBTxtgxFmxk08L1gAN2mFFm+1SBIFiM7FaRVYlOptn+L8PlL+btBi6UxyJfCTfI6kSSOwdRA+w1McsFiQz7WAdQGbQ+n/LBCJIUCHhRnY2m22xISti3MgEAjDCigMSWoYqQYsDQgQDA6khAiMohQAsPufSYgIR2RwDcHGKBwFRCVQY9nNkpd5DACRJ8cGKgSbLBKoq6NCdEXoA/pyjLUboO6HcCF7o4vvOJzgOxKDNic6Vgmrdh743QteR14ztTKYdOka7mM34J0EXW2mYFDbP4xid2+VqctcYQwBxpgk1+RyMUbLmMHx07FMOMjSWeSdZR4izvHZqkpOacI92QMxXbxFAgjuRK4JoVjEdnUpK6qdx5eMILYf/S07Qa/1OqKHErVG2fcSYBuXecDmnKG+59G3Nzp0mVcVOny8uTiX8KZRMvMdkYW1m369fgiSk4i9JeHCnBiqLR7f/QFzbA9W6L1pYK4ohTU3FrMvB7d+arG/onNgjdGCvm3oyJiu+PUd4P3cPvq46dGM3ELqnt2b39TIua/reUvdqtbo9Aay1HYt66RfYpO8Gzg8pzfrt5tcYpRBBaCweJf4K+0lyYdl2eAUBOLTHdtnlVkEEKZFxURjGKsuTqdijJjEVMhRG+j53GOdWUuFd5rfLayyuUCRoIXpYDw3uuZnq9hibdcoII6+RiWoW4TynNLPyT1uXX4dp7VX5fbDLvHtD2twnN5nfLiEALqOmaDb9NJ3BS+JGxjwHIvZz0Mb21xC8YKGrHwLAgx8CIBSHL/0FZ2YyRwehB3jndBol1LFA+JtCo4T0be7Dl42AD9AICMNl6CDgF6dZU+sA0swRG5flVjj8YVVV8XH9kLBMiXRiqwZPyRMWo4fnKFTOuXiFj8JKNj/v+qKIbqPAh7tmcD5OIDhfXKu7LoYx23S6kvxKSNumKpvreRyjoYHjyQbj5LtZuFzcLFYLqKq/cgjCdA== -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Invocation"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/invocations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-invocation.api.mdx b/docs/docs/reference/api/delete-invocation.api.mdx deleted file mode 100644 index d68707ef30..0000000000 --- a/docs/docs/reference/api/delete-invocation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-invocation -title: "Delete Invocation" -description: "Delete Invocation" -sidebar_label: "Delete Invocation" -hide_title: true -hide_table_of_contents: true -api: eJy9Vclu2zAQ/RVjTi1ARG7Qk041GgMxkqJB4vZiGMFEGltMKIohR25dQf9ekFodJ0GbAj1p4azvzTxWwLh1EK9goXdFgiwL7WAtoDBkw9cihRhSUsR0K3sbEGDQYk5M1rtXoDEniIEtJnQrUxAgNcRgkDMQYOmxlJZSiNmWJMAlGeUIcQW8N97PsZV6CwJYsvI/lj7QZJFCXYs+ujOo/yY46v3XTSjvMI0P2f7RpVJQr4fENwZ1k3ftQztTaEfORzudTv0jJZdYaQIMMdyUSULObUo1uW6NQUBSaCbNoQZjlGxQi+6d96lGFRrrkWbZZEiKsnFqi5OaaUt2BMvnYCEgpQ2WiiGe1h6MjpdbJfXDYeeHGToE/xUcMTD9xlBjgjuj4u6eEh61e+nbOY7ymsswyN6556SuvdPH09NjCr+jkmnwmMytLezb+UuJUSr/Jplyd2ygiuTg9A+A62agXg9No7W4H8PUrWUtIHfb1/bqCzmHW4I+2MumAYzJ0p8+B/iwdqvQV5O6tRsRPcDboPtyG2cNfK+xe75cXh0FbLg9JPUsSNZkMZasnDgrBj0LIsYZxBAZSztJP6Jhk1xUdRNeR1W7NjUIcGR3neiVVkEMGbNxcRQlqijTE9ySZjxBGaGRYeIdJaWVvA8us6vFBe3PCVOyEK/WY4MbP1bNoBya9RyhkRfkIWsFcVZyVlj5q+swyGLWeNVBGTZFcG/hm4XiJrOrBQjwbTRgTU8+nEzhKYQHxn4jMAkb0eUOxyCeoND3DwIoD+sATJh/Gg58ZaZwnKMexXuOsYOCehSYfnJkFMow8CF91VK5gpZKGMuiA+Evh/5qijsZXAvICsfer6ru0NE3q+ra/34syXrG1gJ2aCXeefxWFaTS+fcU4g0qR0cl9soB767bBXk/AfF86R2r2lO6Q1X6LxDwQPvxXerV4D/m7cAJipN1k1q1p7MkIcMjvyOB9CPdr9rZ/HK+nENd/wYx6Nzq -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Invocation"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/invocations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-legacy-evaluations.api.mdx b/docs/docs/reference/api/delete-legacy-evaluations.api.mdx deleted file mode 100644 index d5bca5c084..0000000000 --- a/docs/docs/reference/api/delete-legacy-evaluations.api.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -id: delete-legacy-evaluations -title: "Delete Evaluations" -description: "Delete specific comparison tables based on their unique IDs." -sidebar_label: "Delete Evaluations" -hide_title: true -hide_table_of_contents: true -api: eJzdVU1v2zgQ/SvEXNoCqp0Ge9JpvRsDNZqiQertxTEKhhpL7FIkQ47Seg3/92JIubLiJEWu64s15JvvN8MdkKwjlCuY30vTSdLORlgXUGFUQXuWoYQLNEgookelN1oJ5Vovg47OCpK3BqO4lRErwXKDOojO6rsOxeIiTm7sjZ2FOpY3tkpmvuLgSry+1JFWkcL6TSmWDR40dYWW9EZjiMJt2OojTsmJbDI5uUbqgmU/M2F0pINehlSn+q9SfFCA8xhSPIsKSuijNFhLtT0OFgoIeNdhpL9ctYVyl0QdsIKSQocFKGcJLfGV9N5olRSn3yJXcQdRNdhK/vKBfZLGyNKRj6+6SkeasE0ftPUIJUQK2tawLw4HMgS5hQJIk2H5qH9iUUXYD1B3+w0V9dHncFcnPteDqdztwSDs92wtYPTOxhzy+dkZ/41p8rlTCmPcdEZc92B4QVEeZPZMCfpAD05Ez8/L1DJxTOUc+h/n56fRfpFGVwkm5iG48JJQx/2rkKQ2o7aNAcap0a20208bKFenuf060ZawxgD79dM9v3Sqb1ABbaxPazVAP2KMssaBQE9DUzHEkm9/RyLOK7vucUcsGsqbq/t0Ghe5fI85O0DeL5dXJwZzb1ukxg1zCwV4SQ2UMB2PbsRwjyGmqnfBQAkNkY/ldKqM66qJrNGSnEg9lV7Dfs0aqguatklldrX4gNv3KCsMUK7Wx4DPzIvc6TFs4LTXH5BztrJledZR44L+L7evAM2EbLIWJ8WMux52zfyHbL3BR3fF6tBBJoq2G5fc9nWbpaTE7GoBBXD6mfpnk3eTM3i45UdgHgWp0igcYk7XUDyo3q+6QQHYpjkAQtn+OVxwRt5FaqU9stcP7XzUpVFEu2Eg/+9PUM8Twh809UbqNNOp0Luez6OVzYPWuEh8vNtx5v8Es9/z8V2HgSm7LuBeBs1uEl+LA7+Yzf/iFkr4O1f3bZp1hpsuk/XB6uO1lDVmSqGnZ7Hro5G8mF/Ol3Mo4LZ/MFtXsVaQ33mTyO9QQnp/c1L8ovLZDoy0dcf7qoRslX8/ASc7B2I= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Evaluations"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/evaluations"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete specific comparison tables based on their unique IDs. - -Args: -delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. - -Returns: -A list of the deleted comparison tables' IDs. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluations_ids":{"items":{"type":"string"},"type":"array","title":"Evaluations Ids"}},"type":"object","required":["evaluations_ids"],"title":"DeleteEvaluation"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Delete Legacy Evaluations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-metrics-preview-evaluations-metrics-delete.api.mdx b/docs/docs/reference/api/delete-metrics-preview-evaluations-metrics-delete.api.mdx deleted file mode 100644 index c5ed7e33da..0000000000 --- a/docs/docs/reference/api/delete-metrics-preview-evaluations-metrics-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-metrics-preview-evaluations-metrics-delete -title: "Delete Metrics" -description: "Delete Metrics" -sidebar_label: "Delete Metrics" -hide_title: true -hide_table_of_contents: true -api: eJy1lVFP2zAQx79Kdc8uKQXKlqd1oxIVTEPA9lJV6OpcWrMkDrbD1lX57tPZoUkpMAlpfUhj++7s+93flw04XFqIZzB5xKxCp3RhYS5Al2T8aJpADAll5OguJ2eUtHeloUdFv+6o9dmu3QVbEGDooSLrPutkDfEGpC4cFY5fsSwzJb1jdG91wXNWrihHfisNb+4UWR49xVWJHypHuX9x65IgBuuMKpYgINUmRwcxVJVKoBZPBmgMrkGAUy7j8dcQrzdNLNStmV7ck3TNqZWhhJl09563IVpUTbBpYq9DslBzzDaGMxX5CVvqwoaMhoMB/yVkpVElh4EYbiopydq0ynrXjTGI9zKTugpOTXKqcLQk06HwxVsISCjFKnMQD2rxX1F3tprNX+L+NtyGSO3xHg+H+wB/YKYS79ebGKPN++kl5FBlOwR2DTItd1axWH9LIZ49J1WLvQrU89dxXepwQCaa2+VL5Fuy1uKSWvavm3oYvVte/ZfcOa+wdWPX0XyLN9B9PY2zgO+tGp/f3l7tBQy13S3qme8lvUYJ4CW60m1HAgEluhXEEDU9Ker0pKgRdAQCLJlHMtZXqTIZxLByrrRxFMlMV8kBLqlweIAqwlJBPWcPWRnl1t5lfDW9oPU5YULGK7hjcMM6CsrYNdsWBUt1QcyowJzH48qttFF/QrkFKM51FbwYAiv0uu2ek9+YlxntdcMZHKX44SQdHfdPTg9P+8cno2F/cZTK/lB+HB2loxGmOAKWnCpS7Q/UVGDs0+2Nr6YggMEE3oODw4MBPK/CjjFfKpT+Uj1l45dBPOO6JQoCKPc3Chxh/qld4FxLbV2ORSfeXtF3TrOF6ui3i8oMlb8wfu9No4YZNGrgrTvftW2LAwEs7pW23I9gs1mgpe8mq2uefqjIcNnnAh7RKFwwshljXD0JYAM/ae37qG8xfX+/2DyrQsGftRtuBcFjLCWV7k3beUfnZ5PLye0EBCyaz2iuE/YyyMnxMwbgz3XIMN6EuQ1kWCwr7hExhKj8+wur57i9 -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Metrics"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/metrics/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Metrics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-queue-preview-evaluations-queues-queue-id-delete.api.mdx b/docs/docs/reference/api/delete-queue-preview-evaluations-queues-queue-id-delete.api.mdx deleted file mode 100644 index 7f3b188a7c..0000000000 --- a/docs/docs/reference/api/delete-queue-preview-evaluations-queues-queue-id-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-queue-preview-evaluations-queues-queue-id-delete -title: "Delete Queue" -description: "Delete Queue" -sidebar_label: "Delete Queue" -hide_title: true -hide_table_of_contents: true -api: eJydVU1v2zAM/SsBTxsgxFmxk08L1gAN2mFdl+0SBIFqM7E62XIlKltm+L8PlD/TpD3sFDt8JB8fP1wByb2DeA2Lg9RekjKFg40AU6INb8sUYkhRI+H22aPHbWnxoPD3FgePxuK2LUKl223jAgJKaWWOhJbTVFDIHCGGDggCVAExlJIyEGDx2SuLKcRkPQpwSYa5hLgCOpbs58iqYg8CdsbmkiAG70MUUqQZ8I0DT5Yp1PWG47nSFA4dh7iazfgnRZdYVTJxiOG7TxJ0buf15KEFg4DEFIQFMVyWpVZJqDN6cuxTjWiVlpUi1WRIjG+cWraqINyjHdH7HBACUtxJrwniWS0GMThdcfy6C0q9XXEtekThtQau9oIGogOZxydMaMRkaHiAL9O+/Lpmv49XV+dq/ZRapcFpsrDW2P+XKkWSSvOTIszdOUCb5MT6mjAjITq5681Qt7RWHkdl35mGINQCcre/NFod9As6J/cIfbDXoUGMyYqtlzQfxnod6mpSt7hR4wZ5G3VfL+O6ke+tBt+sVvdnAZvenjb1OqzqJIwBU0PKzLD1YYUpgxiidvOj0eZHzeZHVTfDNQhwaA/dvnurIYaMqHRxFCXa+HQq91iQnEoVyVKFyXWYeKvoGFzm98tbPN6gTNFCvN6MAd95nJoBOYX1vZGlukWWqr00c0+Zsepv0/X23GSNF2uhip0J7q1s80BuMr9fggAuoxFpNv0wncFL6U7AvAkyCZvQ5Q5mEC9U6OsHAZiHNQBCmX8aDMysNI5yWYzivejUCZdeAMI/FJVaqjDjIXPVtnANbQs58ejgtyeIH+L+GG0EZMYRe1XVo3T4w+q65r+fPVpu1UbAQVolH1m4dQWpcvycQryT2uEZwf5UwLuHdiPeT0BcJt61s+BeMld+AwG/8Dj+foRdz7pZqVrzPEmwpJHj2Wnioeon/Xpxt1gtoK7/AY0hav8= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Queue"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/queues/{queue_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Queue - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-queues-preview-evaluations-queues-delete.api.mdx b/docs/docs/reference/api/delete-queues-preview-evaluations-queues-delete.api.mdx deleted file mode 100644 index 809fc4a9d2..0000000000 --- a/docs/docs/reference/api/delete-queues-preview-evaluations-queues-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-queues-preview-evaluations-queues-delete -title: "Delete Queues" -description: "Delete Queues" -sidebar_label: "Delete Queues" -hide_title: true -hide_table_of_contents: true -api: eJy1ldtO20AQhl8lmusNDgFC66umJRIRVKVAexNF0cQeJ0ttr9kDJY387tXsOjgJh0pI5SLs4Z/ZnW9mx2uwuDAQT2D0gLlDK1VpYCpAVaT9bJxCDCnlZGl278iRmVWaHiT9nlFrstmaBSUI0HTvyNjPKl1BvIZElZZKy0Osqlwm3i66M6rkNZMsqUAeVZqPtpIMz7zbmUz9RFoq/MCuKoIYjNWyXICATOkCLcTgnEyhFhsBao0rEGClzXn+nb11xqmBuhWp+R0ltrmx1JQyjfbcaWveIvKOxqm5DkFCzf5ae6sd+QVTqdKESPq9Hv9LySRaVuwEYrhxSULGZC7vXDdiEO9llSgXjJrAZGlpQXor/i9eISClDF1uIe7V4r8h3jpmMn2J91tYGxa1B3vc7z9H9xNzmXqrzkhrpd/PLSWLMt+JfleQq2RnF8vVtwziyT6lWjxjX09fR3WpwgWZZmEWL1HfSL+SMbiglvvrUg+jc8u7/ypyjisc3ei2ar3FG+i+HsZZwPdWhs9vb6+eOQy53U3qme8eHV8HXEEF2aVqGxAIqNAuIYao6UHRVg+KQg+KQIAh/UDa+Bw5nUMMS2srE0dRkiuXHuCCSosHKCOsJNRTtkiclnblTYZX4wtanROmpH31bgluuIpCXezKnlKClbwgJlRiwfOhs0ul5Z+QbAGSI10GK0bA9XnddsvRIxZVTnvdbwJHGX44yQbH3ZPTw9Pu8cmg350fZUm3n3wcHGWDAWY4AC43WWbKX6ehP/TBdoZXYxDAWALr3sHhQQ/2M7Aj5geFiX9Qm1j8Nog9qk88QQAV/jWBJSw+tRscaaWMLbDc8ref8J3LPBG19GijKkfp34o/et1UwgSaSuCTtz5hTV/jAZf1UhnuQ7Bez9HQD53XNS/fO9Kc8qmAB9QS5wxswhCXm+Sv4RetfO/0zaXrXxbLcxeSvddouAkEi2GSUGXf1E63SvxsdDm6HYGAefPJLFTKVho5Nv6NAfjDHAKM12FtDTmWC8fdIYbglf/+Arv/r/M= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Queues"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/queues/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Queues - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-result-preview-evaluations-results-result-id-delete.api.mdx b/docs/docs/reference/api/delete-result-preview-evaluations-results-result-id-delete.api.mdx deleted file mode 100644 index 9863e716ad..0000000000 --- a/docs/docs/reference/api/delete-result-preview-evaluations-results-result-id-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-result-preview-evaluations-results-result-id-delete -title: "Delete Result" -description: "Delete Result" -sidebar_label: "Delete Result" -hide_title: true -hide_table_of_contents: true -api: eJydVU1v2zAM/SsBTxsgxFmxk08L1gAN2mFFm+0SBIFqM7E62XIlKltm+L8PlD/TpD3sFDt8JB8fP1wByb2DeA2Lg9RekjKFg40AU6INb8sUYkhRI+HWovOatqXFg8LfWxxcWpPbdhiVbreNFwgopZU5ElrOVEEhc4QYeiQIUAXEUErKQIDFF68sphCT9SjAJRnmEuIK6FiyoyOrij0I2BmbS4IYvA9RSJFmwEOIPFmmUNcbDuhKUzh0HONqNuOfFF1iVcnkIYZHnyTo3M7ryUMLBgGJKQgLYrgsS62SUGv07NinGvEqLctFqsmQGN84tXRVQbhHO+L3NSAEpLiTXhPEs1qM5OB8xfH7Loj1fs216BGF1xq43EsqiA5lnp4xoRGXoe8Nfpn2CtQ1O36+ujoX7KfUKg1ek4W1xv6/WimSVJqfFGHuzgHaJCfWt6QZSdEpXm+GwqW18jiq+840BKEWkLv9pfHqoN/QOblH6IO9DQ1iTFZsvST6MNrrUFeTusWNWjfI26j7dhnXjXzvdfhmtbo/C9j09rSp12FfJ80cMDekzAzrHxaZMoghai9ANLoAUXsBoqof5BoEOLSHbu+91RBDRlS6OIoSbXw6lXssSE6limSpwvg6TLxVdAwu8/vlLR5vUKZoIV5vxoBHnqhmRk5hfXtkqW6R1WovztxTZqz62zS+vTpZ48VyqGJngnur3DyQm8zvlyCAy2h0mk0/TWfwWr0TMC+DTMIydLmDGcQrFfr6QQDmYROAUOZfBgMzK42jXBajeK+bdUKmV4DwD0WllirMeUhdtV1cQ9tFzjw6/t0l4qd4OEobAZlxxH5V9SQd/rC6rvnvF4+Wu7URcJBWySfWbl1Bqhw/pxDvpHZ4RrE/GPDhod2LjxMQl6l3HS24ncyW30DALzyefErCymfdvFStfZ4kWNLI8+xC8WD18369uFusFlDX/wBrx3Il -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Result"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/results/{result_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Result - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-results-preview-evaluations-results-delete.api.mdx b/docs/docs/reference/api/delete-results-preview-evaluations-results-delete.api.mdx deleted file mode 100644 index a6ebe0d994..0000000000 --- a/docs/docs/reference/api/delete-results-preview-evaluations-results-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-results-preview-evaluations-results-delete -title: "Delete Results" -description: "Delete Results" -sidebar_label: "Delete Results" -hide_title: true -hide_table_of_contents: true -api: eJy1ldtu2zAMhl8l4LVTZ2mbbr5atgZo0A4rum43QRAwNp2oky1Xh25Z4HcfKDm1kx4GFFgvUh1+UuJHit6CxZWBZAaTB5QOrVClgXkEqiLtZ9MMEshIkqWFJuOkNYtK04OgXwtqbR73FkELEWi6d2TsJ5VtINlCqkpLpeUhVpUUqTeM74wqec2kayqQR5Xmw60gw7PgdyEyPxOWCj+wm4ogAWO1KFcQQa50gRYScE5kUEc7AWqNG4jACit5fuPd9aaZgbpVqeUdpba5s9CUMZHOyfPWQcspuJpm5iYECjV7bD1Y7cgvmEqVJkQzHAz4X0Ym1aJiL5DAN5emZEzuZO+mEUP0Vl6pcsGoCU2UllakOwg+e0UEGeXopIVkEG75nzB3DprNn2P+KtkGR+3ZngyHT+n9QCkyb9abaK3029FlZFHIvfj3BVKle7tYbr7mkMwOOdXRE/z1/GVYVypckHkWZvUc9530CxmDK2rJvyz1MHq3vPuvSue4wtGNrlPvLd5A9+UwzgO+11J8cXt7/cRhyO1+Us99E+mFQuAaKsiuVduKIIIK7RoSiJtmFHeaUdw0oxgiMKQfSBufJaclJLC2tjJJHKdSuewIV1RaPEIRYyWgnrNF6rSwG28yvp5e0uaCMCPtC7gj+MZ1FCpjX/aYFKzEJTGjEguej51dKy3+hHRHIDjWdbBiCFyhN23bnPzGopJ02AZncJzj+9N8dNI/PXt31j85HQ37y+M87Q/TD6PjfDTCHEfAFSfKXPn7NAkY+2h74+spRMBcAu7B0bujARwmYU/MbwpT/6Z2wfhtiA6wPgKFCKjwDwosYfGx3eBQK2VsgWXH35Oc793mkaml3zauJAr/XvzZ26YYZtAUAx/d+Z7t2huPuLbXynA3gu12iYa+a1nXvHzvSHPW5xE8oBa4ZGQzxrje5X8LP2nje6jvMH3/vFguXcj3QbfhThAsxmlKlX1VO++U+fnkanI7gQiWzeezUBlbaeTg+DcB4M90iJArhNe2ILFcOW4RCQSv/PcXOr62nw== -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Results"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/results/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Results - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-run-preview-evaluations-runs-run-id-delete.api.mdx b/docs/docs/reference/api/delete-run-preview-evaluations-runs-run-id-delete.api.mdx deleted file mode 100644 index f9cc7a31e7..0000000000 --- a/docs/docs/reference/api/delete-run-preview-evaluations-runs-run-id-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-run-preview-evaluations-runs-run-id-delete -title: "Delete Run" -description: "Delete Run" -sidebar_label: "Delete Run" -hide_title: true -hide_table_of_contents: true -api: eJydVU1v2zAM/SsBTxsgxFmxk08L1gAN2mFFmu0SBIFqM7E6WVL1kS0z/N8Hyp9p2h52smM9io/vkUwFnh8cpBtYHLkM3AutHGwZaIM2/lrmkEKOEj3ubFA7Y/Eo8PcOBzx9d7t4KvLdrgEDA8MtL9GjpQQVKF4ipNDAgIFQkILhvgAGFp+DsJhD6m1ABi4rsOSQVuBPhqKct0IdgMFe25J7SCGEeIsXXhJgFdRkmUNdb+k2Z7Ry6OiCq9mMHjm6zApDhCGFh5Bl6Nw+yMmqBQODTCuPyhOcGyNFFutLnhzFVCNSxpI+XjQZMh2aoJarUB4PaEfkvkYEgxz3PEgP6axmnRCUTJ2+76NG71dbsx6hgpRAtV7UzzqIfnzCzI9YDBavglrmfeF1TVGfr64udfrJpchjyGRhrbb/L1KOngtJb8Jj6S4BUmdnp2+JMhKhE7reDlVza/lpVPSdbghCzaB0h9daqoN+Q+f4AaG/7G1oFGOyptPXFB/aeRPralK3uJFpg7yNum+Xcd3I9569N+v1/cWFjbfnpl7HAZ2sgiJi6As9zHgcW19ACkk76clo0hOa9KRqOrcGBg7tsZvvYCWkUHhvXJokmdQhn/IDKs+nXCTciNivDrNghT/FkPn98hZPN8hztJButmPAAzVS0xrnsN4VbsQtkkjtZpkHX2gr/jZ+twumaKJIBaH2Ooa3gs0jucn8fgkMqIxGntn003QGL0U7A9MM8CzOQJc7HgN7oUJfPzDAMg4AeOTll+GAmBntfMnV6L4zj86Y9OV7/OMTI7mIvR3zVq15G2jNo7SjxR6XDj3SdvlsGRTaeYqoqkfu8IeVdU2fnwNaMmnL4Mit4I8k2aaCXDh6zyHdc+nwgly/HuDDqp2CjxNgr5PujFTkIvGkX8DgF56Gf4o43UXXI1V7OM8yNH4UdrGMqJn67r5e3C3WC6jrf4keXs8= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Run"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/runs/{run_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Run - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-runs-preview-evaluations-runs-delete.api.mdx b/docs/docs/reference/api/delete-runs-preview-evaluations-runs-delete.api.mdx deleted file mode 100644 index 7a536c92a5..0000000000 --- a/docs/docs/reference/api/delete-runs-preview-evaluations-runs-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-runs-preview-evaluations-runs-delete -title: "Delete Runs" -description: "Delete Runs" -sidebar_label: "Delete Runs" -hide_title: true -hide_table_of_contents: true -api: eJy1lW1v2jAQx78KutehobSlW16NrUhF67SKdnuDEDqSC7hL7MwP3RjKd5/ODg3p06RK4wXxw53t/+/O5x1YXBtI5jC5x8KhFUoaWESgKtK+N80ggYwKsrTUTpplpele0K8ltQ5hYhmsIAJNPx0Z+1FlW0h2kCppSVpuYlUVIvVe8Z1RksdMuqESuVVp3tYKMtzTTi5F5pvCUukbdlsRJGCsFnINEeRKl2ghAedEBnW0N0CtcQsRWGEL7s+c7E0zA3VrolZ3lNrmtEJTxhT2ey5a1xbMzMlpZmZBHNS8VutrtSM/YColTVAwHAz4k5FJtah4CUjgxqUpGZO7ojdrjCF6K6NUueDUiBLS0pr0gfJP3iKCjHJ0hYVkwKf8D2gPtpgvnuP8MtCGQu2Rng6HT6F9x0Jk3qc30VrptxPLyKIoOsq7BoVKO7Mot19zSOaPCdXRE+r14mVMVyockEmWZv0c8b3pFzIG19Qyf9nUw+jd8uy/Upt1ha0bu4Mcb/EGui/LuAj4Xovv5e3t9ZMFQ2y7Qb3w9aI3c5KzpyS7UW2xgQgqtBtIIG4qTnxQcWKuODFEYEjfkzY+Pk4XkMDG2sokcZwWymVHuCZp8QhFjJWAesEeqdPCbr3L+Hr6mbaXhBlpn7cHBjecQSEnumYP4cBKfCamI7Hk/tjZjdLiTwh0BIJVboIXy+fcnLW1cfIby6qgTq2bw0mO787y0Wn/7Pz4vH96Nhr2Vyd52h+m70cn+WiEOY6AE03IXPnDNNzHXmpvfD2FCBhKoDw4Oj4awGP2HWO+Spj6q7RX4qchesT0gSZEQKW/R2AJyw/tBOuslLElyoP1uqHuHOWBpqXfNq4KFP6O+I13TQ7MockB3vfgofKVjD+czBtluPbAbrdCQ990Udc8/NOR5mAvIrhHLXDFsOYMcLMP+w5+0NbXSl9S+v4+sXnhQpgflRe++sFjnKZU2VdtFwepfTG5mtxOIIJV8zSWKmMvjayM/xMAfnyDPE4MHttBgXLtuCYkEFbl31+UG6ST -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Runs"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/runs/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-scenario-preview-evaluations-scenarios-scenario-id-delete.api.mdx b/docs/docs/reference/api/delete-scenario-preview-evaluations-scenarios-scenario-id-delete.api.mdx deleted file mode 100644 index d3ae6c8920..0000000000 --- a/docs/docs/reference/api/delete-scenario-preview-evaluations-scenarios-scenario-id-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-scenario-preview-evaluations-scenarios-scenario-id-delete -title: "Delete Scenario" -description: "Delete Scenario" -sidebar_label: "Delete Scenario" -hide_title: true -hide_table_of_contents: true -api: eJydVctu2zAQ/BVjTy1AWG7Qk041GgMxkqJB4vZiGAYjrS2mlMiQK7euoH8vlno6dnLoyZI5s4/Z4aoCknsP8RoWB6lLScoUHjYCjEUX3pYpxJCiRsKtT7CQTpmtdXhQ+HuLA6k/9NsBp9LttuGCACudzJHQcb4KCpkjxDDCggBVQAxWUgYCHL6UymEKMbkSBfgkw1xCXAEdbaCSU8UeBOyMyyVBDGUZopAizYDHNvZkmUJdbzikt6bw6DnK1WzGPyn6xCnLTTClTBL0flfqyUMLBgGJKQgLYri0Vqsk9Bw9e+ZUo8qsY+FINRkSUzaktmBVEO7RjSr8GhACUtzJUhPEs1qcSMIZi+P3XZDs/b5r0SOKUmvghi8rITqceXrGhEb1DC7oGMu016Gumfr56upctp9SqzTwJgvnjPt/zVIkqTQ/KcLcnwO0SU5O35JnJEene70ZWpfOyeOo8zvTFAi1gNzvL9msg35D7+UeoQ/2NjSIMVnx6SXZB4uvQ19N6hY3Gt8gb6Pu221cN/K9N+Ob1er+LGAz29OhXoebO+mcwNUhZWZYCOFSUwYxRO1GiEYbIeo3QlSNLF2DAI/u0O2B0mmIISOyPo6iRJsynco9FiSnUkXSqmBkj0npFB0DZX6/vMXjDcoUHcTrzRjwyL5qnHIK64ckrbpF1qzdQPOSMuPU32b87Q7KGhaLooqdCfRWv3kobjK/X4IAbqNRazb9NJ3Baw1PwHwlZBKuRJc7HIN4pULfPwjAPNwHIJT5l+GAK7PGUy6LUbzzkZ2U02tA+Iciq6UKfg/Jq3aWa2hnyblHH4VhL/FzPF5SGwGZ8cTcqnqSHn84Xdf890uJjme2EXCQTsknVnBdQao8P6cQ76T2eFZmvzzgw0N7Rz5OQFwuv5trwUPlivkNBPzC46sPTFgAWeebqkXMkwQtjbhn+4oN1nv/enG3WC2grv8BCcJ8wA== -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Scenario"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/scenarios/{scenario_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Scenario - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-scenarios-preview-evaluations-scenarios-delete.api.mdx b/docs/docs/reference/api/delete-scenarios-preview-evaluations-scenarios-delete.api.mdx deleted file mode 100644 index b323b1a055..0000000000 --- a/docs/docs/reference/api/delete-scenarios-preview-evaluations-scenarios-delete.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-scenarios-preview-evaluations-scenarios-delete -title: "Delete Scenarios" -description: "Delete Scenarios" -sidebar_label: "Delete Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJy1lW1v2jAQx78KuteGUNrSLa/GVqShbVrVdnuDEDqcC3hL4sx2ujKU7z6dHZpQ+iBNWl9QP9ydfb87/7MDh2sL8Rymd5hV6JQuLCwE6JKMn80SiCGhjBwtraQCjdJ2WRq6U/R7Sa1XZ3cZ7EGAoV8VWfdeJ1uIdyB14ahwPMSyzJT0rtEPqwtes3JDOfKoNHwBp8iG9RB5qRI/V45yP3DbkiAG64wq1iAg1SZHBzFUlUqgFnsDNAa3IMApl/H8pgnYmyUW6tZOr36QdM29laGEyRycvmiDtMT24WaJvQ4JQ81R2yjOVOQXbKkLG7IaDYf8LyErjSo5Dt+skpKsTausd90Yg/hXblJXwalJTxWO1mQ6ID54CwEJpVhlDuJhLf4z7s5h88VT7F/h20CpPeGz0eiY4XfMVOIde1NjtPl3gAk5VNkBg0ODTMuDXSy2X1OI549Z1eKoCPXieWCfdbggM83t+in2e9MvZC2uqaX/vKmH0bvl3dd6nvMKRzd2nb5v8Qa6z6dxGfC9VOSPt7dXRwFDbQ+LeuklpbdvBe6jnNxGt/IEAkp0G4ghauQp6shT9CBPEQiwZO7IWF+pymQQw8a50sZRJDNdJQNcU+FwgCrCUkG9YA9ZGeW23mVyNftE24+ECRnfxh2DG+6l0B2HZg+FwVJ9IuZUYM7zSeU22qg/oeQCFOe7CV4Mgrv0uhXS6T3mZUbHwjiH0xTfnKfjs/75xclF/+x8POqvTlPZH8m349N0PMYUx8B9p4pU+xs1ZZj4fHuTqxkIYDIB+nBwMhjC41IcGPPLQulf1j4dvw3iEdgHpCCAcv+swBHm79oNTrbU1uVYdOI9UfmD+zxwdXTvojJD5d+NP33XtMQcmpbgwztfulbseMxdvtGWlQl2uxVa+mayuublXxUZrv1CwB0ahSvGNmeUm30X7OAnbb2meq3p+4fG5lkVqv5Id1gTgsdESirdi7aLTrtfTj9Pb6cgYNV8VnOdsJdBTo9/YwD+hIcc411Y20GGxbpisYghROW/v8eGwIU= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/evaluations/scenarios/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Scenarios - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-secret.api.mdx b/docs/docs/reference/api/delete-secret.api.mdx index fb5b371864..5daf9cd574 100644 --- a/docs/docs/reference/api/delete-secret.api.mdx +++ b/docs/docs/reference/api/delete-secret.api.mdx @@ -5,36 +5,36 @@ description: "Delete Secret" sidebar_label: "Delete Secret" hide_title: true hide_table_of_contents: true -api: eJx9VE1v2zAM/SsGTxsgxG3Rk08L0AAN2mFFm+0SGAVjM7E6f6gSHSwz/N8Hyh+Jk3a+2BYfJfK9RzXAuHMQreGFEkvsIFZQGbLIuiqXKUSQUk5Mr87HQYFBiwUxWUlroMSCIIIu/KpTUKBLiMAgZ6DA0nutLaUQsa1JgUsyKhCiBvhgfCJbXe5AAWvOZaErJFim0LaxbOBMVTpyknNzdSuvlFxitZESJaFOEnJuW+fBcw+GVsHtzc0l9hfmOvW9BQtrKwsKkqpkKlmwaEyuEx8O35wkNCcFGyvEsO5KSYlR5/KlmQp3CcirZBLF8vBj6ymbdt6qcUWXTDuy0MatGtbQWjyc0PNYdQVKi4Xb/Y/J7+Qc7jwZHeRzqCcjWEm0PZ5dbd4o4YmKa99Xd3SPi4/bHOnt2P28jbuOvo8OGyD3q9XTxYbyqDNR77xDg5fBoQVxVh2t6z3LGUQQ7rHOOdxfh51dXdiMvm1BgSO7H3xd2xwiyJiNi8Iwyas6neGOSsYZ6hCNBnGno6S2mg8+Zf60fKDDPWFKFqJ1fAp4ERt1xpjCRk3Q6AcSivqJmtecVVb/7dTupyrrsoQDXW4rn97TNffFBfOnJSiQNjpyrmbXsys4p2wClgnAxE/AcLYPgzpjYewfFFDh7Q9MWHw7BqQyUzkusDzZ71yhSTEjA0x/ODQ5am9uf3TTS7cGL510du2F6i4rBdHx4okVZJVjATfNBh39tHnbyvJ7TVYkihXs0WrcCGHrBlLt5DuFaIu5o4u6xqsBvjz3E/A1APVxvYOMpWi4x7yWP1Dwmw6T+9EPdzaYpOnj8yQhwyeZF3eRuGl09t3icbFaQNv+A4gm8mk= +api: eJx9VE1v2zAM/SsGTxsgxGnRk0/L1gAN2mFFm/USGAUrM7Faf6gSHSwz/N8Hys53u1ySiI/U4+OjWmBceUgW8IRNwZAqqC05ZFNXswwSyKggpmdP2hGDAosOS2JyktRChSVBAn342WSgwFSQgEXOQYGj98Y4yiBh15ACr3MqEZIWeGNDIjtTrUABGy7k4DFUimYZdF0qBbytK09eci7HV/KVkdfOWKEoCY3W5P2yKaKHAQydgqvLy3PsExYmC71FU+dqBwp0XTFVLFi0tjA6hONXLwntAWHrRBg2PZWMGE0hvwxT6c8BRa2Polhtfi2DZMedd2p3YiqmFTno0k5tz9A53BzIc1f3BKXF0q/+p+RP8h5XQYwe8jk0iBHNJdrt765fXknz0RQXoa/+6gGX7svs5e3V/byN616+jy7bQm7m8/uzgvJRJ0O9Dg6NHrcOLYnzem/d4FnOIYF4LRaP1xdxb1cftzvfdqDAk1tvfd24AhLIma1P4lgXdZONcEUV4whNjNbAKY1JiEY/BApiXU+6cYY3od7kfnZLmxvCjBwki/QQ8Cge611zDNsNDK25JdFvWLdJw3ntzN/eCsPK5X2WCGSqZR3SBy0Hbt9Rv1ElOyp99rTHo4vR+LNmhoRocj8bVgV1WJUtjwADdSLXTihQQGXYE2DC8ts+ICxt7bnE6qDe6SiPSO3UYPrDsS3QhC0IV7fDjBcQZiwdXoSJhjmDgmT/QqUK8tqzgNv2BT39dkXXyfF7Q07GlSpYozP4IuItWsiMl98ZJEssPJ3x2r0h8OVhWJWvEaiP+W5HWsk811g08g8UvNHm6CENr0C+NUw7xCdak+WDzLNHS5y1W4Hr6d10PoWu+wfAZwA6 sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Secret"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/vault/v1/secrets/{secret_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Delete Secret @@ -43,29 +43,228 @@ Delete Secret as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "secret_id", + in: "path", + required: true, + schema: { type: "string", title: "Secret Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"204"} value={"204"}> + <div>Successful Response</div> + <div></div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-testsets.api.mdx b/docs/docs/reference/api/delete-testsets.api.mdx index 80b4632668..a65a244b0d 100644 --- a/docs/docs/reference/api/delete-testsets.api.mdx +++ b/docs/docs/reference/api/delete-testsets.api.mdx @@ -5,36 +5,33 @@ description: "Delete specific testsets based on their unique IDs." sidebar_label: "Delete Testsets" hide_title: true hide_table_of_contents: true -api: eJzVVd9v0zAQ/lesewGk0JaJpzxRaKVVG2LaCi9dNbnJtfFI7My+bJQq/zs6O2nSlgF7pC+N7e/O9333wzsguXEQL2COjhySg2UEKbrEqpKU0RDDBHMkFK7ERK1VIqhBipV0mAqjBWWorKi0eqhQzCZucKtv9dhuXHyrG/SdSp14fakcLRzZ5ZtYzDNsTVSKmtRaoXXCrNlddwkZkfoAvNNrpMpq9jsWuXLUwgMk3Zu98mFABKZEK5nILIUYAuyuRUEEFh8qdPTRpFuId5AYTaiJP2VZ5irxtsN7x0rswCUZFpK/SsueSaHjVY8kLxVhEfa3JUIMjqzSG6ijdkNaK7cQASnKed2IL2apg7qDmdU9JtREqSymnKj+XcvORcjSPos1u+nMyFboN1xptAtBn41G/HeY7JsqSdC5dZWL6wYM0b/L8mLm7SWiqbI+gTqC92dnpzF+k7lKfQRiaq2xLwnwMG8pklT5QeCHgNwkB6dSb7+sIV6cEtzvKE24QQv18nnWlyYEyMIUbnMqWAf9jM7JDXYSPg/1Yog5n/6tiJhXuLrB9Sqpkzeo+zyNSZDvd5e1kPP5/OrEYchtgZSZrishglJSBjEMe/3p0D6idV7yyuYQQ0ZUung4THJTpQO5QU1yINVQlgrqJVsklVW09Sbjq9kFbs9RpmghXiz7gBsuipDmQ9heYVmqC2TCWha8HleUGat+htxFoLgas2DFjLjcrruBMv0hizLHkwGxaFPHFaL02nhEI9jYExLjqxlEwNRDzY8G7wYjOB7NB2DuAZn4Hmjj9ccQHSm31wwiwMI3ABDK4kN3wGxK46iQuufvuEePwumNz//70WjST/iDhmUule9Tr+GuqdH9GPYzODOOeG+3Y3ZfbV7XvP1QoeUyXEbwKK2SK07wgpOetQW5g++4hRg+BeHe+uZleF6FAjyaZTxngsU4SbCkP2KXvR6bTC+n8ylEsGpeusKkbGXlE48G+QQx+OeS7X1P+L0d5FJvKh5AMQSv/PsF6wnaHw== +api: eJzVVd9v2jAQ/lese9kmZdBVe8rTaEEqaqdVLdsLRZVJDuI2sVP70pYh/vfp7IQEGNv6OF6I7e/O9333w2sguXQQT2GCjhySg1kEKbrEqpKU0RDDEHMkFK7ERC1UIqhGirl0mAqjBWWorKi0eqpQjIeud6fv9MAuXXyna/S9Sp14f6UcTR3Z2YdYTDJsTFSKmtRCoXXCLNhdewkZkfoAvNMbpMpq9jsQuXLUwAMk3Zq982FABKZEK5nIOIUYAuy+QUEEFp8qdHRm0hXEa0iMJtTEn7Isc5V42/6DYyXW4JIMC8lfpWXPpNDxqkOSl4qwCPurEiEGR1bpJWyiZkNaK1cQASnKeV2LL8apg00LM/MHTKiOUllMOVHdu2ati5ClbRY37KY1I1uh33Cl0S4EfXpywn+7yb6tkgSdW1S5uKnBEP27LG9m3lwi6irrEthE8Pn09DDGHzJXqY9AjKw19i0B7uYtRZIq3wl8F5CbZOdU6tW3BcTTQ4LbHaUJl2hhMzvO+sqEAFmYwi0PBWuhX9E5ucRWwuNQL4aY8Onfioh5hatrXKeSWnmDusdpDIN8v7usgVxMJtcHDkNuC6TMtF0JEZSSMoih3+lPh/YZrfOSVzaHGDKi0sX9fpKbKu3JJWqSPan6slSwP7oG/lScMxQ2M3aXVFbRyvsbXI8vcXWBMkUL8XTWBdxyxYQa2IVt5ZelukRWQ8uC14OKMmPVz5DYCBQHkAUrpsu1eNNOm9GrLMocD6bHtMkrl4/SC+MRtZo1nzOZPKJOIQLWJlA96X3qnRwToDYQg+tx3Swy8c3SxO5hEO1JvBUXIsDCdwoQyuJLe8DMSuOokLrjb7+Z98LqzNn/+3WpS4HwlfplLpVvaK/hui7m7bz2wzozjnhvvWZ2322+2fD2U4WWS3IWwbO0Ss452VMugKwpzjU84gpiOA/CffRdzvC8CsW4N/R4IAWLQZJgSX/EzjrNOBxdjSYjiGBeP4mFSdnKyheeIfIFYvDvKtv7/vB7a8ilXlY8qWIIXvn3C0rh6K4= sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete Testsets"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/testsets"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"delete"} path={"/testsets"}></MethodEndpoint> Delete specific testsets based on their unique IDs. @@ -49,29 +46,299 @@ A list of the deleted testsets' IDs. as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_ids":{"items":{"type":"string"},"type":"array","title":"Testset Ids"}},"type":"object","required":["testset_ids"],"title":"DeleteTestsets"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Delete Testsets"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"testset_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Testset Ids", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'[\n "string"\n]'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/delete-trace.api.mdx b/docs/docs/reference/api/delete-trace.api.mdx deleted file mode 100644 index 18553d5da6..0000000000 --- a/docs/docs/reference/api/delete-trace.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: delete-trace -title: "Delete Trace" -description: "Delete Trace" -sidebar_label: "Delete Trace" -hide_title: true -hide_table_of_contents: true -api: eJydVk1v4zYQ/SvGnHYBNk6DnnSq0aTYdFMk2Li9GMZiTI0tbiiSSw7TuoL+e0FKtiQ7yW57kkzOm4/3ZkZugHEXoFjB0qNUZgdrAdaRR1bW3JZQQEmamD6zR0kgwKHHmph8QjVgsCYoIN9+ViUIUAYKcMgVCPD0NSpPJRTsIwkIsqIaoWiA9y7hAvsUVAAr1ukgpUGz2xLadp3wwVkTKCTI1eVVepQUpFcu5QcFPEYpKYRt1LNPvTEIkNYwGU7m6JxWMpcz/xISphml4XwqllUXQdrYgfrslGHakR+l90u2EFDSFqNmKC5bAVqZp4xHs7/fZloUUx3OAwSHJrH0BgGPDk2uXwykfhdfApDZq01kOkkGy1Kl+lE/TLIZLKbeW3HGwOjIxHozPdlYqwlNPno5FkjlZdTo3/0atf4tWPPDfWQX+X0qpfNiN19IcnbSs/c9KPQe99P0tIbUOweGTrCZ2LOIr4EXA6XtGXDc36ujtiPdRo7ul6TvlHkahf926ne5sV4KfOo2HJu/bZP9T1cvzMqfqFWZJ2F24731/39QSmJUOr290ujaysntf2m19SlFI0Jsl2BisQ67twbjdwoBdzTw/bppJmO2TLffEjnV1YXu7UZqDfR27L5exnVH31vCflguH84cdtpORb3O63m27NdzTVzZYW3nhc0VFDB3np4V/TXnbtHnJ4V5c+jWFgQE8s+HzR69hgIqZheK+VxqG8sL3JFhvEA1R6dyqwaS0SveZ8ji4fYj7T8QluShWK3HBo+plbrmmJoddUGnPlKiqf+mLCJX1qt/OsX7D0vVoRIPymxthh9mNSc3WzzcgoBURkfQ5cWPF5dwStvEOE0ByjwFh9j5GsQJC8f6QQDVeQSACeufh4uUmbOBazQjfycqTXI5EsD0N8+dRpX7O0duevlW0MvXr5e+gbOEINLndVg5lQ2cEE2zwUB/eN226fhrJJ9kWgt4Rq9wk0hbNVCqkN5LKLaoA50ld1wR8O5TPwnvZ8MCniZ9kNIkHZ9Rx/QLBDzRfvwvIc94deiTpr9eSEmOR8CzlZQa6tjh1zd3N8sbaNt/ARyf/NI= -sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Delete Trace"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/preview/tracing/traces/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Delete Trace - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/delete-traces.api.mdx b/docs/docs/reference/api/delete-traces.api.mdx index 962bdfb943..f65bd36e22 100644 --- a/docs/docs/reference/api/delete-traces.api.mdx +++ b/docs/docs/reference/api/delete-traces.api.mdx @@ -5,36 +5,36 @@ description: "Delete trace." sidebar_label: "Delete traces" hide_title: true hide_table_of_contents: true -api: eJydVE1v2kAQ/StozhYmUU8+FTVIQUmbqKG9IBQN9gCbrr3O7jgqtfzfq9m1wYZ8qD1hdt7MvHnzUQPj1kGyhLu1I/uCa6UV72EVQUYutapkZQpI4Io0MY3YYkpjiMCUZFFs8wwSyLz10VsdRFCixZyYrISuocCcIIHCZPSoMohAScjniuweIrD0XClLGSQb1I4icOmOcoSkBt6X4ujYqmILEWyMzZEhgarycVixFsA3k9FonkHTRKfZ3L+nQ2tRkIopdx/TaM54OGialWRypSkc+RiXk4n8DFV9qNKUnNtUevS9BUMEqSmYChY4lqVWqRc6fnLiU/f4llbawCpkcIxcvcq3o/cQEI0wDhCzfqKUB6osu0Cro+MXozWlHPwPTJtGIn26vDwv7CdqlXnao5m1xv5/VRkxKi1fh3YMAdqkAysW+7uNH7uhDDIa7YsqmLZkoVkdleia3pV8awJBaW/utu/J+pWcwy3BIdjbUC/GaCHWj7ogdYXULa7Xj6O8Qd23y7gK8r2WrINcLxb3ZwFDb3PinTkuuN9s3kECsemfi/jlIj7svrx3i19ZDQnsmEuXxHGqTZWNcUsF4xhVjKUC2RNHaWXl6ojL9H5+Q/trwowsJMtVH/AgMxK6PoQdV7dUNyT1t0dgWvHOWPUntLK9BLvgJQWqYmO8e6vF1JMbTe/nEIGUEcZ5Mr4YT+D0Jg7AMt6Y+vHucnszRCcqHOqHCCj3sw1MmH8+GoRZaRznWPTi9U+wOyVTH/fr7Fa32jD95rjUqPxMe1J1288lDPoptV+IY0i1imBnHAusrtfo6IfVTSPP4aZK2zLlcK17V/UX7Qcn/wV1JSz8Hr6PdgP4Sv5YJXg/D1HXP0kb/KZpSiX3vM4OjEQ5DPPV7Ha2mEHT/AUpU19i +api: eJydVU1v2kAQ/StozhYmUU8+lSZIQUmbqKG5RCha1gNssvY6u2NUavm/V7NrGxvyofaE8bz5ejPzXAGJjYPkEW5XDu1OrJRWtIdlBCk6aVVByuSQwCVqJByRFRLHEIEp0Aq2zVNIIPXWJ291EEEhrMiQ0HLoCnKRISSQmxSfVAoRKA75WqLdQwQWX0tlMYVkLbTDCJzcYiYgqYD2BTs6sirfQARrYzNBkEBZ+jikSDPgh0lxNE+hrqPjbO7f0wlrBSMVYeY+L6M+qcNBXS85kytM7tDHOJ9M+GfI6n0pJTq3LvXoZwOGCKTJCXNiuCgKraQnOn527FP16i0sj4FUyLBD61SAHBfc1vfQQOoIHAkq3+yuBd8HRM39BYhZPaOkAYePXdou5PIQ4sJojZJCpK7DuuaYX87PTwl5EFqlvt3RzFpj/5+NFEkozU/dGIcAbeTAKvL97dqv65AQXqnmjcoJN2ihXh44aZelbfnGhAKZ48xtPiL4OzonNghdsPehnozRgq2fzYP7CqkbXG8eB3oDu++3cRnoeytZC7laLO5OAobZZkhbcxAGrwi0hQRi05eZeHcWd5rB71vBKK2GBLZEhUviWGpTpmOxwZzEWKhYFAqO9WnqraMLhgIfn0NZWpYyjje9m1/j/gpFihaSx2UfcM8LFFZiCDvoQaGukclplGVa0tZY9SfMuZGXbfDi7lW+Nt69Iaqp7ZuQL5izbHWXCpPx2XjyXjONw2h6N2/uQEh/B20dHgbREV0dURABZv4IgFBkXw8GrrIwjjKR9+L1Nd4dF1UdDvHkY9DwRPib4kIL5ZffF1U1g3+EweCZgzN2DKmWEWyNI4ZV1Uo4/GV1XfPrINo8wlQ5sdI92X7B/eCbshO65Cr8wX6MdgP4kv9YxXi/G1E7S04b/KZSYkE9rxMl4ijd1l/ObmaLGdT1X9E4gSA= sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Delete traces"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/observability/v1/traces"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Delete trace. @@ -43,29 +43,295 @@ Delete trace. as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"node_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Node Ids"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CollectStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "node_id", + in: "query", + required: false, + schema: { type: "string", format: "uuid", title: "Node Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "node_ids", + in: "query", + required: false, + schema: { + type: "array", + items: { type: "string", format: "uuid" }, + title: "Node Ids", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "status": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/deploy-to-environment.api.mdx b/docs/docs/reference/api/deploy-to-environment.api.mdx index 21936144cd..eaa77049ca 100644 --- a/docs/docs/reference/api/deploy-to-environment.api.mdx +++ b/docs/docs/reference/api/deploy-to-environment.api.mdx @@ -5,74 +5,326 @@ description: "Deploys a given variant to an environment" sidebar_label: "Deploy To Environment" hide_title: true hide_table_of_contents: true -api: eJzdVcFu2zgQ/RVizqqdBnvSad3GQI3ubo3E24tjGBNpLLFLkSpJpVEF/XsxpGzJTpu21/XFNjnzhnzz5rEDj4WDdAtL/Sit0RVp72CXQE4us7L20mhI4YZqZVonUBTykbR4RCtRe+GNQC1ozL3X93phC5feayHEdGevsaJU/IMVCXMQvqTpLiPloYjwZhaThyJ7maengjIfI2dc7Balo2O5d5vNevmUUTh2KlaxTIwOVQ4olZtBAqYmixy1yiGFGLH3Zj85EiRg6XNDzr8xeQtpB5nRnjfSDrCulcwCwvyTY446cFlJFfKv2jK+l+T43yUJvObbmiAF563UBSTgpVe8MGlDoAr6BEYeXsr8ODC0yjknM1Ul/b4i57AIFVG3Hw6Qbi8R+uS0ohuloN+NmG8Divh7QOn75BhqHj5RdqRIWspZQ88uenb2CW6U08ZMbrvGVhnMoeciI6i3DYUFVxvtIp/XV1f8da7QuybLyLlDo8TtEAzJL3esD2X/uL5+DvwRlcxDmlhaa+xvoF7oICePUvEv6alyzwOUyc52f6FlUnsqyEK/G3uD1mI7UcZfJh6QdVG54iURnTp9BHtBqUyG2PDuz3TB94qlh7jdVLZHeiO7P77GTaTve8WOITz/zwBjbyvypeFZr43jlBp9CSnMJ5p18+gDkIAj+0jWBe4bqyCF0vvapfN5pkyTz7Ag7XGGco61DCPjKGus9G1IWaxX76l9R5iThXS7mwbcsTpiv8/DTlRjLd8TnyKaBSwaXxorv8YmJiBZlmXM4qux7m5Hp1o+YVUr+r7zjH2cusq4eukbo+RA6oMJpxzIXgQOxGK9YjSyLs7L1ez17AouH5CzYJ4fzML8HK8YtiG5IPtEMyRAVRge8ITVn+MGE8AtrVBP8KLBiI0RyzNDPzvUxND/fw/coCVPT35eK5Rh+gO73aD9M792gZyg/l0CJc9IuoWue0BH/1rV97z8uSHLAt8N6nlgHWzZecqj1Dv4j9rwcgRmXwV/4HDVRGlf2CVbWcxYZHytF2N3kzFef7jbQAIPw9NcmZxzLH5h78EvkEJ45Tk7zFpY60ChLpqo7IjJn2+llSM5 +api: eJzdVsGS0zgQ/RVVn73JMLUnnwiQKlIskJoJXDKpVI/dsQWyZCR5GK/L/77VkhM7GZiFK7nEkbpfS69fP6cDj4WDdAtL/SCt0RVp72CXQE4us7L20mhI4Q3VyrROoCjkA2nxgFai9sIbgVrQmHun7/TCFi6900KI6c5eY0Wp+IAVCXMQvqTpLiPloYjwZhaThyJ7maengjIfI2dc7Aalo2O5t5vNevmYUTh2KlaxTIwOVQ4olZtBAqYmixy1yiGFGLH3Zj85EiRg6VtDzr8yeQtpB5nRnjfSDrCulcwCwvyLY446cFlJFfJTbRnfS3L865IEXvNtTZCC81bqAhLw0itemLQhUAV9AiMPz2V+Hhha5ZyTmaqSfl+Rc1iEiqjbjwdIt5cIfXJa0Y1S0O9GzNcBRbwfUPo+OYaa+y+UHSmSlnLW0JOLnp19ghvltDGT266xVQZz6LnICOptQ2HB1Ua7yOf11RV/nSv0tskycu7QKHEzBEPyyx3rQ9m/r6+fAn9GJfOQJpbWGvsbqBc6yMmjVPwkPVXuaYAy2dnuL7RMak8FWeh3Y2/QWmwnyvjHxAOyLipXPCeiU6ePYM8olckQG979P13wvWLpIW43le2R3sjuz6/xJtL3o2LHEJ7/J4CxtxX50vCs18ZxSo2+hBTmE826efQBSMCRfSDrAveNVZBC6X3t0vk8U6bJZ1iQ9jhDOcdawqVbLsKueM2hYZ4cZY2Vvg14i/XqHbVvCXOykG5304Bblk4Uw3nYqQ9Yy3fER4xOAovGl8bKf2OHE5B8gDJm8b1ZlDejjS0fsaoV/diWxiZPLWdcvTSVUY8g9cGEUw6dGCh4hdlX0jkjknWRnavZi9nVzzgbEsRivRoGDbMwaMfrhjBILrpy6gckQFWYMvCE1ctxg8ng3leoJ3jRicTGiOWZ858dbuL8f96bcNCVp0c/rxXKYBOB3W4YkjNjd4GcMCa7BEoepnQLXXePjj5Z1fe8/K0hy2LfDUq6Z01s2aLKo+w7+EpteMUEZv8KRsLhqokyv/BV9ryYscj4Ws/G7ibzvv54u4EE7od3eGVyzrH4nU0Kv0MK4e8AZ4e5C2sdKNRFE1UeMfnzH9QgMcg= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Deploy To Environment"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/environments/deploy"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/environments/deploy"}></MethodEndpoint> Deploys a given variant to an environment Args: - environment_name: Name of the environment to deploy to. - variant_id: variant id to deploy. +environment_name: Name of the environment to deploy to. +variant_id: variant id to deploy. Raises: - HTTPException: If the deployment fails. +HTTPException: If the deployment fails. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"environment_name":{"type":"string","title":"Environment Name"},"variant_id":{"type":"string","title":"Variant Id"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["environment_name","variant_id"],"title":"DeployToEnvironmentPayload"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"environment_name"} + required={true} + schemaName={"Environment Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Environment Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-annotation-by-trace-id.api.mdx b/docs/docs/reference/api/edit-annotation-by-trace-id.api.mdx deleted file mode 100644 index cdaf933438..0000000000 --- a/docs/docs/reference/api/edit-annotation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-annotation-by-trace-id -title: "Edit Annotation" -description: "Edit Annotation" -sidebar_label: "Edit Annotation" -hide_title: true -hide_table_of_contents: true -api: eJztmktv2zgQgP+KMacWUONssSef1k27aLbtNkjSXgIjoMWxxYYiVZJKqzX03xdDSpbkh5I4KdAWyiFBpHmQH8nhiMMVOLa0MLmCqVLaMSe0sjCLQGdo/H+nHCaAXLhrtpa4nhfXzrAYrwWHCDJmWIoODRlagWIpwgRaAkLBBDLmEojA4NdcGOQwcSbHCGycYMpgsgJXZKRnnRFqCRE44SQ9uCRDo1MOZRmtrduMqZbxrzmaomN9waTtmGeq+LjwDew6IqPVE5VLCeWscX2RMRU8z4JttO6V5gXZ2+xIrJVD5byrLJMi9qjGX6xW9KxpSGYIrhNoQ7Nqqtvvwti0m844FyTL5NmGlTs7J5TDJZpuf9N598lca4lM+Ue7fUEsTJxLZp79q98L6/6xWr04VVnuntOYBTN6/gVj14t2UxvKh2hfEpkyghQd+3kJ/Z1LeRcf4TC9nxIzhhW9VLqqDyP6gUiWEXBWER047uXYSL4mWuUOgSY6XAWkLfNNqH3DhbtTvRUh9ho5D7EJypKsGbSZVjYM2MvjY/rD0cZGZCHQwEUex2jtIpej80oYDg5hsc6D0sb4N4098RIRcFywXDqYHJfRRuRr5tWGcYPMIb9mrm/2RbDQJiUZoo0vnEixd4hPgtnR1A9vnvEf4eRTMFs54SjxBzh5HcxWTmpc84J2x/v5yXPB7wXrVeE3w4bXk3qpaa291MCe1EuNa+2lziQemyJETcZzoKkm0YlAG7EUaldahCpPKSzEuXU6hQiSPGUKImC50+0IcSHSTKI3+jFYay3AWr2M4EYo3ueI8UTH9P8tk5TtSVbscfOOLLWdBFWalglTCmWfG+1kBhF8wzlEYPkN9SgTezydVPY6zjLhR+FXSZo+5u4xWVNQ/63Tpj5C+/f7La0HbPiHQP0lMqefB+Vm8kTpygINqjhg6m7/4cOuJz+4RWO3Uoj7x9zPlTptBDJfHrwLkG4ZwdPtU+F7dy+785rZDiNlFLBd3zIjmHIDvsPwGbwV23AGfnfzc2idxWHiHQpuWLmPBTis3UMJtr78B3iPgDes4aeAOKzjQynS53rOnDYDuoPRDWv48QiHFfyYXCZmFgdyDyPXo9c6QjxvTh3KCKRQN/c8NuwOwM94fNwD4L1QN7uPt6pToN+rf9V51awrYO9XsuucTNVTZGcJ7oGzsFFcF99C4e7Ply+3a3WfmRTcS4/eGKPN4YU6jo4Jfwi/Z7CljjtvH3JkOduk3mKu4xoTpHbZd9njA1rLltgM4X5RD2N0SW/vGk7pCxjkupJrh8A13kB3fzdeB3x9I/v28vJsy2AY2+6gUtF21JpA/kw+0TxclIkTf63GJTCBcUY7KH4bN/VSO17Vi6mkYgma2/ryTW4kTCBxLrOT8TiWOudHbInKsSMmxr5EMiONODfCFV5lenb6Dou3yDgamFzN2gIXNJPC3OiKrYeFZeIdEqXqYs40d4k24r+6W/56ThK0CAPN0fPmJs2b74wi8vZNmKqM0xQrmhN2j1OohfZy9ZrynRxNz04hanZFOD764+gYNul3hGkxsdgvproP/jVEGzTXHKlqlfqVBA5Z+lfzglqWaeuoItfY2x7sTnPWLB1+d+NMMuFXine+qqbBFVTTANqFcwpLk3VcnUWQaOtIeLWaM4ufjCxLelydol+tgAvL5rJ1QeoGi851KsrbqC1+nvj0d058d6ludGIdlODZebX2no+a0kG3c/XsUUXbZ92cdZd8VEnqqbmqXp8ETy/82m/Ut0IhhamgMY1jzFyv7Ky1BM+mlydvIYJ5ddcr1ZyUDCP89Nu3VWdhDOgyGD1bgWRqmVP4mkAwSj//A9Jcbqw= -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Annotation"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/annotations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Annotation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"annotation":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-annotation.api.mdx b/docs/docs/reference/api/edit-annotation.api.mdx deleted file mode 100644 index 78b1ad538d..0000000000 --- a/docs/docs/reference/api/edit-annotation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-annotation -title: "Edit Annotation" -description: "Edit Annotation" -sidebar_label: "Edit Annotation" -hide_title: true -hide_table_of_contents: true -api: eJztmlFv2zYQgP+KcU8twMZZsSc9zU07NGu7Bknal8AIaPFssaFIlaTSeYb++3CkZEl27MROOrSF85DEEu+O/I48nnlcgOczB8kVjLQ2nntptIMxA1OgDZ9OBSSAQvprvmwBDApueY4eLQkvQPMcIQFveYrXUgADqSGBgvsMGFj8WkqLAhJvS2Tg0gxzDskC/LwgOeet1DNg4KVX9OCSFA1OBVQVW2p3Bde7KOd6/nEautc3QyrrJ7pUCqpxa/ii4DraHUfV6PwrI+akb9VSarRH7YOpolAyDXCGX5zR9KztSGEJp5foYreWHNfeRW90u86FkNSWq7MVLfcOTmqPM7T98eaT/pOJMQq5Do/utgWptGmpuH32t3kvnf/LGf3iVBelf04ei2rM5AumfivaVWmodpG+JDIVgxw9/3EJ/VkqdR8f6TF/mBC3ls+3UumL7kb0A5GsGAheEz1w3MixbfmaaFV3NGijw1VE2lHfBtc3Qvp7xTsRYqOS8xiboKpIm0VXGO2iw14eH9MfgS61soiBBi7KNEXnpqUanNeNYe8QlpoyCq34v+3sSWjBQOCUl8pDclyxlcjXzqsV5Ra5R3HN/bbZx2BqbE5tiDa+8DLHrS4+iWoHo+DeshDfw8inqLY2IlDhdzDyOqqtjTS4JnPaGx9mpyyleBCsV/OwGba8ntRKQ2tppQH2pFYaXEsrTR7x2BSBtfnOnqraNIeBsXIm9V1JEeoyp7CQls6bHBhkZc4pCeOlN90IcSHzQmFQ+jFq6yzARrxicCO12GaIi8yk9PmWK8r1FJ9vMPOONHWNRFGalhnXGtU2M8arAhh8wwkwcOKGRlTIDZZOan09Y4UMXvhZkqaPpX9M1hTFf+m0aRuhzfv9mtQOG/4+UH+KzOnHQbmaPFG6MkWLOo2Y+tv/1xLtfFt+cIvWraUQD4+5n2tx2ghUOdt7FyDZisHT7VPx2+5GducNszuUVCxiu77lVnLtD/j2w2fxVq7DOfC7n59H5x0eJt6+4A4r97EAD2t3X4Kdb/4HeI+Ad1jDTwHxsI73pUhf10vujT2g2xvdYQ0/HuFhBT8ml0m5wwO53chtkescIZ63pw4VAyX1zQOPDfsO+BGPj7cAeC/1zd3HW/Up0K81vvq8atxv4B5WsuudTDVT5M4S3I6zsBVcFt9i4e73ly/Xa3WfuZIitB68sdbY/Qt1Aj2X4RB+g7OVSXtvdzmyHK9S7zA3aYMJcjfbdtXjAzrHZ9i6cHPTAGNwSW/vc6cKBQwyXbfrhsAl3kh38zBeR3zbPPv28vJsTWH0bd+pVLQdjLp3aHL0mRHxJkuahUs1PoMEhgXtoPht2NZL3XDRLKZquKhXaEVlE7S3zSWc0ipIIPO+cMlwmCpTiiM+Q+35EZfDUCwZk0RaWunnQWR0dvoO52+RC7SQXI27DS5oTsVZ0m+2dBAv5DskXvUFnVHpM2Plv80AwzWdLEoREJqt5+2dmjf/cIrN63di6oJOW7Zoz9oDWKmnJrRrVlcY5GB0dgqs3R/h+Oi3o2NY9UOvMS0rnoZl1YwhvAa2QnPJkepXeVhT4JHnf7QvqGeFcZ5qc62+dbf3urNk6fEfPywUl2HNBOOLekJcQT0hoFtCpwCVdC5cJU3cHjPIjPMkt1hMuMNPVlUVPa6P1q/GDEKaOyF6VwsQ0tH/ApIpVw7XurgMPvDsvF5jzwdtiaDf9WZuaJoYlBPSJ2Bwg/PuDTEKKP+j3QZOCFpZM98X9duTaOhFCC2t9FqkpU5HiVGaYuG3th13VvjZ6PLkLTCY1FfJciNIyHLyKf0OXTVFdCzdNaNnC1Bcz0qKjglEpfTzH7UPiSI= -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Annotation"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/annotations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Annotation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"annotation":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-evaluation-preview-simple-evaluations-evaluation-id-patch.api.mdx b/docs/docs/reference/api/edit-evaluation-preview-simple-evaluations-evaluation-id-patch.api.mdx deleted file mode 100644 index 50bda0b140..0000000000 --- a/docs/docs/reference/api/edit-evaluation-preview-simple-evaluations-evaluation-id-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-evaluation-preview-simple-evaluations-evaluation-id-patch -title: "Edit Evaluation" -description: "Edit Evaluation" -sidebar_label: "Edit Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJztWltz00YU/iue8wQzchwChFZPNUkYUmhJk8BLxuNZS8f20pVW7CXF9ei/d86urpbtOAFmmMY8AF6d66dz9XoJhs00hDdwdsuEZYbLVMMoAJmhcp/OYwgBY27GWFGMM4W3HP8Za55kAhtP9LhJxuPxOGMmmkMAGVMsQYOKtC0hZQmS4CYxBMBTCCFjhjgUfrFcYQyhURYD0NEcEwbhEswiI2ZtFE9nEMBUqoQZCMFaJ8VwI4ig9ql3HkOej7xQ1Oa1jBckaVVHJFODqaFHLMsEjxz34LOWKZ3VJmSKEDIcNX2q3eg+mwqH8BJYuvgwdc63CbgeR0JqMqJJVDg5kVIgSyEPqqPUCgHkTOnnue6deAl5QOIEv8VvEfae+L0oFplvFDb0EvI8KKnk5DNGZu17urTpG4dXV2geQIKGtU1hccyJj4mLFqYdY4tYaYjlqcEZqramZNI+afq4XhdEXEVWMPXkjRXidy3T/nmaWfMUVv0lGdxgshsTU4ottmLbZoUOvtt4/yAkiaMTmz8Ton/K91ybuzDd5OMq9/0QuvZRWBSqnfzvWkC8eQAx6kjxrKwPDxF12hBBmbm+WGyoiFsz1BWNW1T6G6z7VLCTr2w1R9vVThtm7NaICgBTm1BPyjCN/ckXixaptCubpv5I2yhCrclZxoVVSIxKSUVHEUsjFAJjGK0rM1feiLVF5otFtRhrg9mKlUXu3g12N4U3JdUmxyOrjUwggLlNWAoBMGskkHUFmAsKLd9eNijfIcT/Ik97V85TYkRtNJpH4fq197V2vtHtHwUAw9rfGoRijJHqUUBwVnpbA6AwQ2bWV6e13W1F5GXBv23YuXIzc12LTplrxZ1KdA8RZzE3a3XW4+1Nc0YdbRd16WdkyPPcYaIzmWoP99HhIf3Tamhw5Svx1IreZUEMDx6lI2k90wrstcknjoK66pRZYSA8rEO308P2s/jjnsU/WPOAYbzDdY9p3PP+z8fxbbDuMI8/BKOfeyCPFDKD8ZiZHQfzmBnsG+7s2azlxIvtDR1YNot/hJKPXmyhJEaBP0DJqRdbKCnhmizG32+VKcF6vej5rabE67tqKdGqtJSAfVctJVyVlv3Gt9/49hvffuPbb3z7jU+uG/Tvw16taX7Fe3F01N3qPjHBYx8uZ1RkH77SxWgYF269KiOqTSBk1Hp6n+F2tBp+tdfvZVSCBYmerYu/egDXms2wDqfNpA6M3jU9vWvlJr+86oKu2UAreD26m9049fBte79vr68vOgL9u22/VFrve40wcnvcXMb+1q24qDNzCGFQ3PEN/B3foHHHN1i2ru1yas2obsurPasEhDA3JtPhYBAJaeMDNsPUsAPGByzjLoE0RlZxs3Asw4vzd7h4iyxGBeHNqElwRVHl46RNVr0ilvF3SIgVl4pDa+ZS8X9LF92l4txzESQUr5f1PeDZV0Yedu/xqm8LGt8K+GvCaq+vPpa7OR3U23G90lWLSx1Q7TdTHdOgB8+n7JeX0+MX/Zevnr3qv3h5fNSfPJ9G/aPo1+Pn0+NjNmXH0BjiGlKLaaycutojVT3n3OymY9SZEnZnXNNhd2fudKbdWauafugygKdT6aKlbIQuFnvDi/MWgocHzw4OO6+lRUz1j0Wu/pWh5h5DsBL0VbhTi0tc8QODLPmtfkCWZVIbane1vG5+rqyqRcgb/GoGmWDcFTenfFlk7g0UmUtp6XIXml+P0awctq/dRwHMpTbEulxOmMaPSuQ5HbuIoYQM4JYpziYE4M0SYq7p/zGEUyY0dqysGgU8uSzq4dNe/WVB2/oyi1NKYTKMPkEAf+Oi8wsBV+7nZZ1YFjQnXl3fFeVaRqdHUf/wHMMowsxspR01auPF8PrkLQQwKX42kMiYmBQjkOlvZ7DMPMD0uwI6W4Jg6cxSXwnBC6U//wEZ3XVy -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/simple/evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluation":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-evaluator-revision.api.mdx b/docs/docs/reference/api/edit-evaluator-revision.api.mdx deleted file mode 100644 index ce7f77626a..0000000000 --- a/docs/docs/reference/api/edit-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-evaluator-revision -title: "Edit Evaluator Revision" -description: "Edit Evaluator Revision" -sidebar_label: "Edit Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWVFz0zgQ/iuZfTpmnKYUKHd5utKWoQccndJyD51MZ2PLiUC2jCQXchn/95uVZDuOk5CEZCZzdzwAsXe/1X67Wq1XUzA40tC/h8tHFDkaqTQMApAZU2i4TK8i6AOLuHlgpcCDYo9cc5lCABkqTJhhijCmkGLCSL4l+sAjCICn0IcMzRgCUOxrzhWLoG9UzgLQ4ZglCP0pmElGINoono4ggFiqBA30Ic8tiuFGkEC14s6Nt9K5iqAoBg6cafNKRhNCnLcVytSw1NArzDLBQ+tq77OWKT2rl5IpIsJwpunXAgZaMrGwfE4B08mH2JLSFOD6Icy1kUlTyDs9lFIwTKEIqkdpLgSQU6XfV7pz7hCKgOCqZf0MYkWmBx3nCaY/A/jGAhRFUArJ4WcWmkXxe205a+MVASTMYHMVGEWcooXiusFra50+f2ZgeWrYiKmmpWTYfDLr3mJbEHIV5gLVL69zIf7QMu1epVlunsC8r4TBDUvWU0KlcLKS1qYqtLhdpfuemCSNVn4eEqN/yndcmx9xuszHee3NGLp1WeiL2Fr+t1dAukUAEdOh4pnxNWIbqIsZCNqT0Sqg+Sq5cnNG623LsqpeRtws1KjL6v2i2jj4AeaNK9JQFASumM5kql3qnRwf0z8NFuFjHoZM6zgXnRsvDFvX8lDmTmkuk+s1n1sJCmWMuTDQPy6CJUfAslpfSz+i4piah91FsT79Pjlse/gF8E2qL7GQ3/Zg8i8PPWex9nIf3s15tQdvnIXd09VkCZXhMYa7NHDmIUsLuRkvaQK2AXdoVMvQrKyHM6gk2jXc1sAVlY0A7eGuNY62rrXvvXoR/N91/Se7rg+52aLtamlt0Hc53X9547WK1jU6r204OuzWK1QMDYse0Oy0DJ472M6ZJSvPon0YuXOw3kjEBNuDkQsH642UdA0nOzzrSrJeTfxpV/K1UyslW5WVkrCdWinpqqw8MtVuJddP109evQhAi3y0LcxH0t35l4btH3DV2bw773PFt0W5U9whiO0RBCGMGUZ2HLZZpd8XJYeXECt6kxsWM8XSsFFtyoUONjpR3vgwFOVkcd2IHNCZfJCNzgYx+OiJp44Ss4yn6zZA8xRv0m2Vhmzg6RDfOvuddtEcch9q/3aQubJc+bqmlALF1CMP2TrsugH+BjnooQs7KYr5KHf3Gvuwdd4wsNGM7QLtR0LrW2wTjJ/Vr4ZqbiD3/OSkPYP7hIJH1r/OpVJSbT+Ai5hBbg9bn5XzAkKGjbeb7KqZs8Ilcu32Oxli2dgnerTowmnBgMGJLBe1ZHRu6e2PJqXklzPt5Rojo5Jex+5yNy4cfasC/Ob29roF6GLbDCoNYzvt2zSwg4CxpBtA2uCBu7rrQy+j4Sf71qtmILpXjkN1b7rw9q8At83Lm0LbaMHYmEz3e71QyDw6whFLDR4h72HG7c7SLMwVNxOrcnZ99ZZN3MEO/fvBrIA9alzeNMWqkGHG3zJi0N9RuvkW/9slg7+bdM2bZZXy96a+Rrz8jkkm2PJrwGoENTNqcgWkOSyqnvlZD/2uRy71nKD6Gq6TrRm16jG1Z/Asxl9fxKfPuy9ePn3Zff7i9KQ7fBaH3ZPwt9Nn8ekpxnhq/eJpLC0t5ZzPkt45u76CmQ8ROD56enTcstkQpo2Pod34Jaf2NQRz0a3iCgGwxO56MAyT3+sXtLJMauPHXx5veWLOfeT7GBv23fQygTyd6eVd0t6DT1qYGVhruzV94kIA/cUX14MAxlIbAplOh6jZnRJFQY+/5kxRcg78/HhIlN5PIeKa/h9BP0ahWWu9Vc2EX258aXjSqQ/fph9lAqeUvbRA+gUBfGGTpXfttgKOy60y9bLnzmzX1qkaq1W2qaQ6jbMwZJlZKTuYKRPXd7cQwNBfuycyIhWFRDr9bZctLQt2q9hnUxCYjnI7CAYHSX/+AV4UOQ4= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/evaluators/revisions/{evaluator_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator_revision":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-evaluator-variant.api.mdx b/docs/docs/reference/api/edit-evaluator-variant.api.mdx deleted file mode 100644 index 5e16c872c4..0000000000 --- a/docs/docs/reference/api/edit-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-evaluator-variant -title: "Edit Evaluator Variant" -description: "Edit Evaluator Variant" -sidebar_label: "Edit Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJztWN9T20gM/lcyempnHEKhpXd+Ogp0yrW9MpT2HpgMo9jrZNu1190f0FzG//uNdtd2HCcpUDrXuTseILGlT6tPWkloAQanGuJLOLlGYdFIpWEcgSyZQsNlcZpCDCzl5orVAlfXqDgWBiIoUWHODFMEsYACc0biq5JXPIUIeAExlGhmEIFiXyxXLIXYKMsi0MmM5QjxAsy8JAxtFC+mEEEmVY4GYrDWoRhuBAk05x189EYGpylU1dhjM21eyHROgKumElkYVhh6hWUpeOL8HH3SsqBn7UlKRSwYzjR967vfE8mE43IBWMzfZY6RrgDXV4nVRuZdoeDyRErBsIAqah4VVgggn2qvT/XgyCNUEcE1p/oexIbKADqzORbfA/jKAVRVVAvJySeWmHXRe+k46+NVEeTMYPcUmKacgoXirMNr75whe5ZgeWHYlKmupXzSfbLs3npbkHCVWIHq0UsrxO9aFsPTorTmMaz6ShjcsPx2SqgUzrfS2lWFHrfbdN8Sk6TRy8+fidE/5Buuzbc43eTjqvbdGLrwWRgq2K3875+AdKsIUqYTxUty9b5Qx0sQdCfTbUCrNXLr5Uxvdy1DTT1JuVmr0BbVyzWVcbwd8dwXaKgqglZMl7LQPu/2dnfpT4dCeG+ThGmdWTE4D8Jw7zqeSOuVVtK4PfKRk6A4ZmiFgXi3itaX/011vhV+uMi1/Y5iGMGNVJ8zIW8e0MSfATJYQGV4hol5QAuHATJY+L9h/hcb5jtr7tExe1p3aJle91/eM7fReoumeR+Ofu6umSiGhqVXaG5ZvlI0bGi4O89mK0cednDoyLJl+iOMfPCwwUjKBPsBRo49bDBS0zWZP2DBr8l6MQ8lv+brQa3UbDVWasIe1EpNV2NFCzu9b66+J91/crRb10LuoN4MYn6Ie7q315/bPqLgqZvKBidKSXX/oS1lBrlwE4FvEKsCQiadt3epxeNqpae0Xr+R/oAUqVxP1+0n2n6hNU5ZW0A3izoyBhf09luzNfnlTQe5pYC39Hp2N7tx7OnbFt9XFxdnPUAf225QaYAf9JYv4KaPmaRtEbWRyC96YhiVil1zdjNqBi89ChO0Hi3WbYoqiEAzdV0vlawSEMPMmFLHo1EipE13cMoKgzvIR1hydws0S6ziZu5UDs9OX7P5K4YpUxBfjpcF3lOK+aTpijXxwpK/ZkRfWGcdWjOTiv/lMyHssWZei/ih5D1vd04nXzEvBdu4M2qG3qXh1m+muuNp8yxMl/S9HfLayaTpv22idSPWPKZaA/sZ/vIsO3g6fPb8yfPh02cHe8PJfpYM95JfD/azgwPM8MC5xYtMOlbq2d1xPjg8O4UIKDoefXfnyc5uz2ZHmC49Js75mlL3GqKV4DZhhQhY7m48GIb5b+0LOlkptQkDd8DbmJQrU0WIsGFfzagUyN3FdmdYhIS9hJCwsPQ/nyaPQ9JCBPHaBec4gpnUhiAWiwlq9kGJqqLHXyxTlJjjgDIhPi8XkHJNn1OIMxSa9U7bFEt4dB5qwuNBO991vaiTt5i7wwpL3yCCz2y+aSXrKt+sviWLIHrkrQ5dfWqheuWaSqnXOEwSVpqtsuOl+nD24QIimIT1bC5TUlFIjNNvd2rpSHDXxD1bgMBiaqnAxuAh6edv53jQ6Q== -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/evaluators/variants/{evaluator_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator_variant":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-evaluator.api.mdx b/docs/docs/reference/api/edit-evaluator.api.mdx index c4d977e4e4..08a61b04ff 100644 --- a/docs/docs/reference/api/edit-evaluator.api.mdx +++ b/docs/docs/reference/api/edit-evaluator.api.mdx @@ -5,67 +5,978 @@ description: "Edit Evaluator" sidebar_label: "Edit Evaluator" hide_title: true hide_table_of_contents: true -api: eJztWG1v20YM/isGP7WAHKdJ6m76NDdJEa/dGuRlXwIjOEuUfd1Jp95LVs/Qfx94pxfLil3HS7FiaD4k0Yl8SD7k8ahbgmEzDeEdnD8wYZmRSsMkAJmjYobLbBxDCBhzc4+VAASQM8VSNKhIdQkZS5HEKol7HkMAPIMQcmbmEIDCz5YrjCE0ymIAOppjyiBcglnkpKuN4tkMAkikSpmBEKx1KIYbQQK1f71xDEUx8ZiozVsZLwho3UQkM4OZoVcszwWPXDyDT1pmtNZ4kCuK1nDU9NSE2XmVCMfVEli2+Ji4yNsCXN9HVhuZtoXKEKdSCmQZFEG9lFkhgGKpohzr3qlHKAKCa3mzL2JNXQk6tynL/g3ghQMoiqASktNPGJnHsvXOcdbFKwJI0bC2FyyOOSWJicsWrx0/y2pZgeWZwRmqtqV02l5ZDe9xWxBxFVnB1It3Vohftcz64yy35iWsx0oY3GC6mxJTii220tpWhQ6323R/IyZJo1Of3xOjv8sPXJuvcbopxnXtpzF046uw7FQ7xd/1gHSLAGLUkeI5hbov1NkKBO3JeBvQek/cujnj3bbleczNo5JNF71baYWTDRBXvgVDURCWQp3LTPsKOzo8pD8tsuDaRhFqnVjRuyqFYe9OHUnrldYKtvH11ElQxhJmhYHwsAhgQ0v90ep/tPqP1uzR6ztaT2j2Xvd/3u230bpDu9+Ho++730cKmcH4npkd+37MDPYNd/5stnLqYXsjR5bN429h5NbDlkZiFPgNjJx52NJIRdd0cf98J2VF1tuF+6Bo+HpWKxVbtZWKsGe1UtFVW9HCzvat1WvS/U+GksfOjl306lHCjyEnR0fdyeMPJnjs5oreuVLuI3bPsSNGw7hwM4A/EtYFhIxab5/SfSfF2inShPtBegcpN6mePfbt3JwQWrMZNi1zs6gjo3dDb782DlJc3nQpt5Lihl7P7uYwzjx92xJ7cXNz2QH0uW0nlUbQlZHHzRlzSTcWdGAE/vIhhEGu8IHjX4N6xNKD5eplRQEBaFQP1X2GVQJCmBuT63AwiIS08QGbYWbYAeMDlnNX3hojq7hZOJXR5fg9Li6QxaggvJusClxTJfnaaIvVaWE5f4/EUnmTMrJmLhX/2ye8vEqZey2igWr0qrn+OP/C0lxg5/qinmJXplV/OdKeN+u1clyk52Zqa0aN+kBt6qidkHqZmgccJ+yn18nwpP/6zas3/ZPXw6P+9DiJ+kfRz8PjZDhkCRu6cHiWSMdGWQAjx3VvdDmGACgrHv3w4NXBYcdmS5j2NIvcnq6odK8hWEtqnU4IAFO3ocEgS39pXpBnudSmnKBLvE7NrY0HZUYNfjGDXDDu9quzvSzr8Q7KeoSVjxENAYStC7RJAHOpDckvl1Om8VaJoqDlzxYVVd0kgAemOJsSaXdLiLmm/2MIEyY0dlyrGx68uCr39cteM5W1Xa4qM6OyJL/oCQL4ExfrV32ua82r0l+WIqfeWt/1lgai02qpDXqNURRhbrbKTlb2+OXtDQQwLa//UhmTimJEK/123koXvNsDbm0JgmUzS80xBA9JP/8Ab4Uy9Q== +api: eJy1V1tv2kgU/ivoPLWSCYSEZNdPSxKqZrvdjXLZlTZC0WAfwzRjjzuXtCzyf1+dGYNtDAmN0jwQOHOu35zbLMGwmYbwHsZPTGiYBCBzVMxwmV3GEALG3DzgExOWGakggJwplqJBRVJLyFiKxLbieOAxBMAzCCFnZg4BKPxqucIYQqMsBqCjOaYMwiWwbPFX4rSYRU5atFE8m0EAiVQpMxCCtTyGItjkKCYBGG4EkcYr053LGAo6IYuozZmMF2Rm04FIZgYz4zzIc8EjF23vi5YZ0Sr/ckVYGI6aflUgtI48CLsDqgWQWSEa7v9JskUAMepI8Zxcea2qi5qKIoBIITMYPzCzJ9gxM9g13Pmz28q5V9sZGTJi8/hnGLnzaksjMQr8CUYuvNrSyAqu6YJy+HXpuROss4XLzgqvN7WyQmttZQXYm1pZwbW2ooWdvTZXb0i2CODt3PM+JcL1sy0q5fQLRgYqgX+kekyE/PbBibRVFwGkaFjMzEa3YnHMqciYuGq0gT1w4JnBGaqmtXTapEylFMgyR9puCyKuIiuYevfBCvG7lln3MsuteU/hNcIlHdxgup8QU4otnkW5KUqIt+3tkv28QpMytIXqS9d04SVbt9RyYctogG1c1Vy4rzX3bZPl2g8UKArSo1DnMtP+zgf9Pv1rdG+4sVGEWidWdK5LZnj13Imk9UIbKVRrMo6jCJoj6mVka/DsBWsdMO/VdrDKiD1ax4NBG6C/meCxC78zVsrtFa9EJ0bDuKBvZZZvMggZNU5/pEgnxUZlVOH+Ib2DBHuqZ7X7WbeuKu21ZjOsamU3qwOjc0unL10AxeVNl3y1u6jg9ejuDuPCw/dcEX28vb1qKfR327zUccxNZ1xbFVM0c0lLJHWKwO+DIfRyhU8cv/XW2ap7y/r+WEAAGtXTasW0SkAIc2NyHfZ6kZA2PmAzzAw7YLzHcg6bnozcaeecWF0H0hhZxc3C6RtdXX7CxUdkMSoI7yd1hhtKM584Tbb1nbGcf0KCsNx8R9bMpeL/+WwoV9+5lyKMKIGvq4V0/J2lucDWQllqW2dEM6A1ub7TwaA/GHb7w+7h8PbwKOwfhsPjg/7x6b/QXMue46tvVs/xbSxHcJSwX4bJyXF3eHp42j0engy606Mk6g6iX0+OkpMTlrATaG07+4ptrC/7ivl9pALrR2TXewPXD5HVRqar5wLXtfdPRZvblGX+d3NRqA03ymIeoSdGMkv4zPq3FZFcCfEskS67ymorU/eMRY+Y0VOKysAnQf/g8KC/K9dLgc7o6rJspiwytcTybHQljWpa1xEEgKnrpGCQpb9VB+RlLrVx4a71tYp94/1SVovB76aXC8Zdo3S2l2UjuIeyEUBtcGkIIGw8JicBzKU2xL9cTpnGOyWKgshfLSqq6EkAT0xxNiUA75cQc03fYwgTJjS2XFtPGnh3XTbU951qB2q6vKr6jEqe/KJfEMAjLjafvW5czFdtZVmynHtrXdfUKxWtGUfzx0uMoghz8yzvpNZcr+5uIYBp+dhNZUwiihGs9Om8lS54l9+OtgTBspmlqRSCV0l//wNBMmdw sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/evaluators/{evaluator_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Evaluator"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/evaluators/{evaluator_id}"}></MethodEndpoint> Edit Evaluator -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Evaluator Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Evaluator"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "evaluator": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-invocation-by-trace-id.api.mdx b/docs/docs/reference/api/edit-invocation-by-trace-id.api.mdx deleted file mode 100644 index 6089ca766f..0000000000 --- a/docs/docs/reference/api/edit-invocation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-invocation-by-trace-id -title: "Edit Invocation" -description: "Edit Invocation" -sidebar_label: "Edit Invocation" -hide_title: true -hide_table_of_contents: true -api: eJztmktv2zgQgP+KMacWUONssSed1k27aLbtNkjSXgIjoKWxxYYiVZJKqzX03xdD6mnHiuOkQFsohwSR5kF+Qw4pDtdg2cpAeAWn8lZFzHIlDcwDUBlq999pDCFgzO01bySuF8W11SzCax5DABnTLEWLmgytQbIUIYSOAJcQQsZsAgFo/JpzjTGEVucYgIkSTBmEa7BFRnrGai5XEIDlVtCDSzI0OY2hLIPGusmY7Bj/mqMuetaXTJieeSaLj0vXwL4jMlo9kbkQUM5b1xcZk97z3NtGY1+puCB7mx2JlLQorXOVZYJ7VNMvRkl61jYk0wTXcjT0X0t1+52PTbfpLI45yTJx1pPco3NcWlyh7vc3XfSfLJQSyKR7dLcviLiOcsH0s3/Ve27sP0bJF6cyy+1zipk3oxZfMLKDaDe1oXyI9iWRKQNI0bKfl9DfuRD38eEW0/2UmNasGKTSV30Y0Q9EsgwgZhXRkeNOjq3ka6JV3iHQZocrj7Rjvk21b2Ju71XvZIidRs59boKyJGsaTaak8QF7eXxMf2I0keaZTzRwkUcRGrPMxeS8EoaDU1ikcq+0Ef+2sSdOIoAYlywXFsLjMtjIfO242jCukVmMr5kdGn0BLJVOSYZo4wvLUxwM8Yk3O5m58OZZ/COcfPJmKycxCvwBTl57s5WTGteioNVxPz95zuO9YL0q3GLY8npSLzWtxksN7Em91LgaL/VO4rFbhKDd8Rxoqt3oBKA0X3HpJ241ZyDKjVVpm8ia3qPMU8oUjUCSp0xCACy3qps0LniaCXR+PnoHZQA3XMZ9RyxOVDTgp36Pt0zQ/k+wYoeXd2SbhmXCpESx4SbjA06UFRkE8A0XEICJb6g7Gd/h56SyT1H4VTZNH3P7mF2TV/+tt01DhHav91taD1jwD4H6S+ycfh6Um5sn2q4sUaOMPKb+8u8/7Ab2B7eozdYWYv+c+7lSp4VA5KuDVwHSpT3Nk61T/nt3J7vzmtkdRsrAY7u+ZZozaUd8h+HTeMu34Yz87udn0ViD48A7FNw4cx8LcJy7hxLsfPmP8B4Bb5zDTwFxnMeHUqSP85xZpUd0B6Mb5/DjEY4z+DF7mYgZHMk9jNyAXufI8Lw9dSgDEFze7Hls2A/Az3h8PADgPZc3dx9vVadAv1f/7j+veu8Cv1cJr3dSVQ+ZO0tyDxyVrWJTjPOFvD9fvtyu3X1mgsdOevJGa6UPL9zFaBl3h/I7gi9U1Hv7kCPM+WYUOsxbTJCa1dDljw9oDFthG9Ldog7G5JLe3hdO4coX5LqS66bEBq+nu7sbrz2+oci+vbw82zLoY9sPKhVxJ50B5M7oExX7izNR4q7Z2ARCmGa0ouK3aVs/NdN1PblKKpagvq0v4+RaQAiJtZkJp9NIqDw+YiuUlh0xPqWCCk0Gg1GuuS2cyuzs9B0Wb5HFqCG8mncFLmgk+bHRF2vCwjL+DolSdVFnlttEaf5f3S13XSfxWoSBxuh5e7PmzXdGGXr7ZkxV1mmLF+2Ju8PJ5VI5uYr8zHVyMjs7haBdJeH46I+jY9ik3xOmycQiN5nqPrjXEGzQbDhS1Sp1MwkssvSv9gW1LFPGUjmutbcd7F5zGpYWv9tpJpiv0znn62oYXEE1DKBbSKe0FDZ5dh5Aoowl4fV6wQx+0qIs6XF1qn61hpgbthCdC1M3WPSuV9E+jtrixonbDi+I712qG51okhI8O6/m3vNJW0rod64ePbLo+qyb03TJZZWkHprr6vWJ9/TCzf1WfSsVUpryGrMowswOys47U/BsdnnyFgJYVHe/UhWTkmaEn367tqrMx4Auh9GzNQgmVzmlrxC8Ufr5H3pBdAE= -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Invocation"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/invocations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"invocation":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-invocation.api.mdx b/docs/docs/reference/api/edit-invocation.api.mdx deleted file mode 100644 index 2377bf8f2a..0000000000 --- a/docs/docs/reference/api/edit-invocation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-invocation -title: "Edit Invocation" -description: "Edit Invocation" -sidebar_label: "Edit Invocation" -hide_title: true -hide_table_of_contents: true -api: eJztWktv2zgQ/ivGnFpAjbPFnnRaN+2i3rbbIEl7CYyAFsc2G4pUSSpdr6H/vhhSsiQ7VmwnXbSFckhich7kNw+OOVyBY3ML8TWM1Z1OmBNaWZhEoDM0/tOYQwzIhbsRawqIIGOGpejQEPMKFEsRYnCGJXgjOEQgFMSQMbeACAx+zYVBDrEzOUZgkwWmDOIVuGVGfNYZoeYQgRNO0sAVCRqMORRFtJZuM6YOEc7U8uPML6+thkSWIyqXEopJrfgyYyronQTRaN0rzZckb1NTopVD5byqLJMigDP8YrWisXohmSE4nUBLnxo4bs0FazSXzjgXRMvkeYtyj80J5XCOpr3fdNoemWotkSk/dL8uSIRJcsnMs7/1e2HdX1arF2OV5e45WSyI0dMvmLhOaDe5oTiE+4qQKSJI0bEfF6E/cykfwkc4TPdjYsawZScqbdbDEP1ASBYRcFYi2uO4E8ea8jWhVdxDUGeH6wBpQ3ydXN9w4R5kb2SInUIuQm6CoiBpBm2mlQ0Ge3l6Sn842sSILCQauMyTBK2d5XJwURLD0Sks0Xlg2rB/vdgzTxEBxxnLpYP4tIg2Ml/tVxvCDTKH/Ia5Lu+LYKZNSjSENr5wIsVOE58FsYORN2+e8e+h5FMQWyrhKPE7KHkdxJZKKrimSzob99OT54LvBdarpT8Ma7yeVEuF1lpLBdiTaqngWmup6ojHlghRXe8cKaoucyLQRsyFCoFbxgwkuXU6rRPZeveo8pQyxZpgkaeM6jKWO91MGpcizSR6PR+DgiKCW6F4WxHjC5106Knm8Y5Jqv4kW+7Q8o5kk1sumFIoN9RkokOJdjKDCL7hFCKw/Ja2k4kdes5K+WSFn6Vo+pi7x1RNgf2XLpu6ENp93m9xHXDgHwPqT1E5/ThQbhZPVK7M0KBKAkzt4/9rjmbZVR/cobFbJcT+OfdzyU4HgcznR58CxEs1zZOdU+Hb7k7sLirM7hFSRAG2mztmBFOuh+84+AzeiW1wevwexs+hdRZ7xzsWuD5yHwtgH7vHItj45t+D9wjw+hh+ChD7OD4WRfpynjOnTQ/d0dD1Mfx4CPsIfkwtkzCLPXKHIdfB17gyvKhvHYoIpFC3e14btg3wI14fdwDwXqjb+6+3ylugX2t/D99XvfeG36uF17qpqlzm3pbcgV5ZM66bcaGR9/vLl9u9u89MCu6pB2+M0eb4xh1Hx4S/lN9hfKmT1uwhV5iTTSs0MK9hgtTOu55+fEBr2Rxrk+4m9WAMrmj2IXNK374g1SVdMyWu4Q3o7t7G6wBfl2XfXl2dbwkMtm0blZq4g3HzTU2KbqF5eNmSLPwjG7eAGIYZnaj4bVj3T+1wVQVXMVyVEVtQ2wTNXfUoJzcSYlg4l9l4OEykzvkJm6Ny7ISJIbVWKCwsJrkRbulZRufjd7h8i4yjgfh60iS4JJ8KXtImWxuIZeIdEl7lg51R7hbaiH+rDfpnO4vARYCQt17Ub2ze/MMoV2+/kSkbPHUbo75798AKNdOerrTByG9yMDofQ1Sfl3B68tvJKWzaoUVMYcUSH1bVHvw0RBtornGk/lXqYwocsvSPeoJWlmnrqDFXy9s2e2s5aywd/uOGmWShY+eVr0qHuIbSIaDZUqcEFTceYMVVHp9EsNDWEd9qNWUWPxlZFDRcXrVfTyLwZe+U0LteAReW/ucQz5i0uLXEdfKBZxdljD0f1C2D9tIr31DkGFQj0ieI4BaXzRdjlFD+R70VOD5pLSp/X5WzZ0HRC59aau6tTEuLDhyjJMHMddJOGhF+Pro6ewsRTMunZanmxGQY2ZR++6XqLBiW3p7R2AokU/OcsmMMQSj9/Af9SI53 -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Invocation"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/invocations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"invocation":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-legacy-application.api.mdx b/docs/docs/reference/api/edit-legacy-application.api.mdx deleted file mode 100644 index 10b71c9857..0000000000 --- a/docs/docs/reference/api/edit-legacy-application.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-legacy-application -title: "Update Application" -description: "Update an application using workflow data stored in legacy format" -sidebar_label: "Update Application" -hide_title: true -hide_table_of_contents: true -api: eJztWt1T2zgQ/1c8+9TOOITSlt756dJCp1x7V4ZCX5gMs7HXiVrZciUZmsv4f7+R5O9ASkJ6k+nBA2B797fS7mo/JC1A41RBcAmjLOMsRM1EqmDsQ0QqlCwzzxDARRahJg9TDxs6L1csnXo3Qn6NubjxItToKS0kRR5LPU5TDOdeLGSCGnwQGUnLdxJBABQxfeVIrlqY4EOGEhPSJM24FpBiQhBAi+aKReADM+PKUM/AB0nfciYpgkDLnHxQ4YwShGABep4ZbqUlS6fgQzmaAPLcomimuSFoTd87iaAoxg6VlH4tormB6gsJRaop1eZTa3DDL8pobNEaQybN1DUj1aNd/hhza44FYDr/GNv5dwmYugpzpUXSJSqnORGCE6ZQ+PWrNOcczGyqmZ4o741DKHwDR9fIc9RCPgTxuAZxoLM8wfQhgO8sQFH4FZGYfKFQtyz2wfpOy25vre6WcQsfEtLYHQ1GETNMyE+71umPt/ScFixLNU1JdiUlk+6b9jRvlwUhk2HOUT55m3P+pxLp4CTNcv0U+nM2GExTcj8mlBLnK9XbZYUlHa/i/cto0nAs+ekuafRv8YEp/SOd3jXHPvd6Gjp3XljGrXvNf3kEhrfoBeHNoI5aEGZtRquA+vFx5SKN7Aixv7K68eqapHrA6D+X7IUPuWSbolxI5hD45gjcIMwII5uX1nP8n6USxfPppjCfDO/WHWJFvD6jmCSlIbVBqoGO11pi70ozFFWmv69FdihE7V7QX8MAn0qtm9SKWcbS+yaDvn7XyTyVIGt1E9I2dn3HXXRLzV3NZbvnKHfznjb6NFYiec1Cuo9qXUW9hgOW0IUtw2M2zSUuZ8ntyHrTEbBWSXqEtlpaqkjXwTiOmL5VatOPXHaaivEPwM5cWwNFYVAlqUykyvn3wf6++dPt/T7lYUhKxTn3zkpi2Lj7CUXumHrLpa1uQ2FqnxhzriHYL/x+03RXan1sn/7P7dPHXG8QIZe41giRjvcX76BWqfUeLdQmOtrtHiqUhJqiK1xZgbRKZ7N3NtAsodV5xsF6I6us3O64bV2I28irhETE6ScIOXKwpZBKXZP51faajUpZr+eea0QrfW1VSqWtWkqlsK1KqdRVS9m9vu6x0X9s9B8b/V+nPHns9Xey6tpJX3ls9//Ldv+h/HWL7tr7FwcHyx39Z+Qscmedx1IKuXk7H5FGZpNt6ZV9Ai7Cztd1VlUrVzhHbk1b1NqCRE1vO+lt+i2lcEqNZ99NapXhnZuvP9pwMfNyoku6duKu1eu0e/c0jpz6Vhn43fn56RKgs21CeibMWbpZuL47Cw9gmEm6ZnQzdIfrw5Y51XDRPUYvwC3b6qzdFk4w0zpTwXAYcpFHezilVOMesiFmzK4URWEumZ5bltHpyXuau0QNweW4TWBTh/ODLlltAszYezIaKU/5R7meCcn+qe4C2EN+V4xZLRl/PGuO5Y+/Y5JxuuVYvd4Jau34uEjQ3bOp35VbLua52fFo2vS6GW28prum6temzoLnMf72Mj58MXj56tmrwYuXhweDyfM4HByEvx8+jw8PMcZDaIrqulJsYGwV3H7k7cemPu2URt0c3UqeDWcnDXai9i3B1fkZS2NhbVbdlbAe4Y1OT8BvDX1/79ne/pJeOsQmymBoo0xlcPu5nmDlerXTgQ+U2BADmjD5o/lgRpYJpcudshKvvKgy6two6W0B1LFuK9daSk/W9F0PM44sbXUgbkleQrkkwQfHDZ0dTQU+BL37LWMfZkJpw7xYTFDRheRFYV5/y0mapTf24Rolw4mxyeUCIqbM/xEEMXJFK2b95KwMZE+9u8ZfLc/UDNWsFvMEPnyl+fJdHBuoZ1UEWJREb5y8gQ2nDchSdjGR33GMwpAyvZJ23Ip6pxfn4MOkvJ2TiMiwSDRaNr/teEXmFGyu75h3C+CYTnOTDwJwkObnX0/3wkQ= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Update Application"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/legacy/applications/{application_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Update an application using workflow data stored in legacy format - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"application":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationEdit"}},"type":"object","required":["application"],"title":"LegacyApplicationEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},{"type":"null"}]}},"type":"object","title":"LegacyApplication"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-metrics-preview-evaluations-metrics-patch.api.mdx b/docs/docs/reference/api/edit-metrics-preview-evaluations-metrics-patch.api.mdx deleted file mode 100644 index fcd38352af..0000000000 --- a/docs/docs/reference/api/edit-metrics-preview-evaluations-metrics-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-metrics-preview-evaluations-metrics-patch -title: "Edit Metrics" -description: "Edit Metrics" -sidebar_label: "Edit Metrics" -hide_title: true -hide_table_of_contents: true -api: eJztWFlv20YQ/ivCPLUAZTm+0vKpSuzAbpLGsJ28GIIxIkfSpssls4cTVeB/L2aXFKnDii0oBVLYDzK5nGu/OXdnYHFsIL6Fs3uUDq3IlYFBBHlB2r9dpBADpcLeZWS1SMxdoele0Nc7ajjm3+4KtMkEItD0xZGxr/J0CvEMklxZUpYfsSikSDxf77PJFa+ZZEIZ8lOhWbMVZPitEsuPwlJmVilG0ts/A1TTDyOIb2eAaSpYOsrLBdKGwk4LghiGeS4JFZTRfMlYLdQYykEZ1Uv58DMltk2knJRQDiKwwkpeeOONKCO2F7c0ptbcqBHK0pj0ouZsuLjS3sN6XZAInTiJ+pc3Tso/Ta66F6pw9ldYt8UK5kcwodY43QzLAis8CdL3jCRzbO/e/wDRv/J3wtjvYfrQHpe5n4bQTRVzIt20+whGuc7QQgzOiXSjxAv+DPekjQhp+QhIV4R8qtjLCIxF6zb6JgJSLuPyU5BKw8oXR45SLiFOqbBkXJKQMbwZFNJpYkatc81LCaqEpKQUWlY01ew6GLFqchlBis/pupt0PWUkyxWWdQ55H2r6WSraOoJ5C/nvK/86mdxbhKaU46buEGt931J1FfoRlCywEWC1I79gilyZ4OuD/X3+l5JJtCiszwW4DiE4crJzVRFz7G3X1pLcBaal0Gn28NpTRJDSCJ20EO+H7vLcDXefXh+c3SK/VriekGCB93/eEDfB+oiOuA1GdUtMNKGl9A7tI1tjipa6VmS0UfzrILbT92a5Iv0RSj4GsZWSlCT9ACWnQWylpIZrOL3b3TBRg/Vq2glzRY3XTrXUaM211IDtVEsN11zL88y13czVamhz7T/PHPZzNIowikUeB32Pci1sa0FaDs1aAKsXGRmLWbHTMnQzl8qRm5BCLfId5u11JbLKWu1UJXyzyEbAlVOe9ztDaCV40wz6iFG3lRy3gyfN0vOJtPTj7dHBweoA+wmlSD1T54zTePvpNSWLQm6YQmWeLHx9StIOHsbpXR4M9KOlGa/zYwOpMTimBvSHST0YnRv++j03876C6oquXYLn8AZ0H97GaYBvk4PPb24uVwQG3y46lU82nSZ+MrKTnO/r6lu4Au0EYuhVV3a91pVdrzpN9LjWk+YO5F3ktIQYJtYWJu71Epm7dA/HpCzuoehhIXyGGUqcFnbqWfqXF29pek6Ykvax2yK45iAKYbFINvcIFuItMUAKM37vOzvJtfgn+JrrGNsTuBgBDs+r5nbx7BtmhaSF28Lb5iTUHEOa2blq4HA4wt+ORydH3eOXL152j45PDrrDw1HSPUh+PzkcnZzgCE+g1Zyb4Km7bKuFVj2s9BEs1Cj3W6wc2vcAdvqXFwvy9vde7O3DslMXiDlHMfE5WuPjP0O05Km5j7hPZz5BwRJmfzQfGL0iNzZD1ZK3FEMLtsydZOmb7RUShc8+r3lWRdctVNHFiluXyM15NQLOlEluuLLBbDZEQx+1LEte/uJIcxgNIrhHLXDIgN0yiJM6oGbwN039odjXq65PViaXLgTQUu3iuhI4+klChd1IO2ilzWX/5vU5RDCsbq2zPGUmjbw3/o0B+Go8bDCehbUZSFRjx/UmhiCU//4FiAQCrw== -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Metrics"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/metrics/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Metrics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-query-revision.api.mdx b/docs/docs/reference/api/edit-query-revision.api.mdx deleted file mode 100644 index 8f84065480..0000000000 --- a/docs/docs/reference/api/edit-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-query-revision -title: "Edit Query Revision" -description: "Edit Query Revision" -sidebar_label: "Edit Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWd1v2zYQ/1eMe1oBJU7TNt38tLRJ0axtkiVp9hAYBi2dbbYUpZBUEs/Q/z4cqU9Llh3PHYZhfXAV6e53HzzeHY8LMGyqYXAHvyeoOGoYehDFqJjhkTwLYAAYcDO6T1DNRwofuOaRBA9ipliIBhUxL0CyEGEAdbIRD8ADLmEAMTMz8EDhfcIVBjAwKkEPtD/DkMFgAWYeE4A2isspeDCJVMgMDCBJLIrhRhABqTnvXWUSemcBpOnQAaM276JgTmjLcvxIGpSGPrE4Fty35vW/6UjSu1KNWJHxhhwxWCyZ0/w+EdZ5C2ByfjGxjmBBwAmbicsaaUmRWTqOIoFMQuotG58OUy9/FY2/oW+qRDIRAsjk3CMfrBKpByEatqUyueRSDJcGp6jqksNx/U3VhnZZ4HPlJ4Kpnz4kQvymI7l3JuPEvIA2E7nBcDMmphSbd7ulxgrPcukX8iRxbL+8/4BHz6PPXJt1Pl1l4zL38zx0k8Wc2/cb2d/UgHhTDwLUvuKxybbYNlAnFYjUAx50AS0nly5gm1+WHbOUjfJkdBpw00pdZqO75ZQy7MC6cjkN0pRAFeo4ktqF2+HBAf1X8xxcJ76PWk8S0bvKiGHr1OdHiWNait5S3/eWgpZvwhJhYHCQei0Zs1yFttz6wBRn0ox2t2KuQNw6XFsfPNi9lDq+s2XXNjhspgyfMH+Xyh9nkLmExMwitTNwh0b7mpnO3FBBJdI9w20+6NjlBGgLndZsunXe+ZKxp97/BXybAn6RmC0qeIPrGSXc8f7Ha3iXWzco4tv46N9dxX2FzGAwYmanWeS9g+0dW2clcfAjhHx1sJmQAAX+ACEnDjYTkrtrvMtKlDvrXV6Ocn/tVErurUJK7rCdSsndVUh5QNXsUjYP19uMPfVAi2S6Lcw18e68abXll3U1YI9cBtEjYXcQSXykFnSXUXvuIFMPIhHsGvzCQVJOw6dNodc69JywUg8ED3k7aGthWEL5bLnJbhXgmn4LZRLScYFpH2Xg3lGGzf4YdvrAwlNESYPqgYmtNT7LAej8saqbaxbABs6Vbdw6zlF/FLHYhKE2jQuDak2ouqmVa2SLMwkwGZQVtele+zWiY42MSCHp3shIVY9mn6Mp95m4yCWk9ljlKruVnbU9q5WbcBRB25yr6HUsQerBd5xvm0k+4dyddkSyaTl/dkOTW5q29HHtzY6bwG3elNxa9VOvtqDrdwrXNGvUI1rHagGLwpgpriNZWb3VKHhPq29/pxQPwtgntI/0OzaPtVP7eRKi4v5G4NowZfQjt6NQlEH+SEd0xiUZEDLjz5CeBP+OVUHXFm0jOVy6eB7xmqrUKm7EP2OkwIw1nHnC/c0Q8IlrozMtsj8qOKf0BqWPbWDNfJYTVWYNtNw2RIotuGrn+UzjSKPU3PCH9m3RcpJrNkJMY++6gKmoMmFCY+oBPtEp3S7g1lJOCaP3xWI0RHTkzxt8MheZLwi/7gIm2kvAJhodC/EsTVyQlZqsXtSMZs28zCXO2obOEq/NwsUxM68QL2C4nJpaeHXVprthl0EFcltp2nQ0eMLsYXRr/r/DW8wC3Rzx9eFhc3R4ywQP7GCwd6qU3Wpbzg0DNIyLWk2sE4jIX1Ex1xepjqX9HDkF7RxFT7tKbWX+40hWk1pn9G7o67pAJbuc6IyuXtIy9zrvrjbjxLmva3E/3txcNgDd2tYXlWbIvfp9Gdgh0yyiez2aFnjuYm4A/ZhmtvjYv3fXgP18hKv7i8alXgoeaFQP+eVfogQMYGZMrAf9vi+iJNhnU5SG7TPeZzG3O1+jnyhu5pbl+PLsE84/IrOd8N2wSnBNoeWCpU5WrBOLOfU6+eAimznyP10EZFeOM8dFfqGgvSpvCE+fWBgLbL/hy0eC5TyuHCIVo5IyUuouL17TYQ5eTdjPbyZHr/fevH35du/1m6PDvfGrib936P9y9GpydMQm7Mjqx+UksublSdc6r3d8eQaVUyoc7L/cP2jIrBHbVsK3uzb3jf0M3tIqFetDVTu0WxYMsvDX8gNpFkfahExW8Nqjamn6k62TwSfTjwXjdltaBRZZxN1BFnHgxufcNj1F1IEHg+Zl8tCDWUQnxjtYLMZM41cl0pReW1oKpGzYPyY/3i0g4Jqeg6xyNRQtshz8dJVt5he98sBQNyCPPkmhl3XZAFnL3nL3bfPVLI/xRUb33oncs1mlxGkkWUqAjuPY9zE2nbTDysa+/HpDjWp2FR5GAbEoRp6mX6typXGy7xYgmJwmdqoODpL+/QXWn/qS -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/queries/revisions/{query_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"query_revision":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-query.api.mdx b/docs/docs/reference/api/edit-query.api.mdx deleted file mode 100644 index 3c59d2e332..0000000000 --- a/docs/docs/reference/api/edit-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-query -title: "Edit Query" -description: "Edit Query" -sidebar_label: "Edit Query" -hide_title: true -hide_table_of_contents: true -api: eJztWFtv2zYU/ivGeWoBOU5zcVc9zU1SNGu7urnsxTACWjqy2VGiwktWT9B/Lw4pWZbtOImXFsOwPCQOea7fOfwO6QIMm2oIR/DFouKoYRyAzFExw2V2HkMIGHNzc2tRzSGAnCmWokFFOgVkLEUIwe3e8BgC4BmEkDMzgwAU3lquMIbQKIsB6GiGKYOwADPPSU8bxbMpBJBIlTIDIVjrrBhuBAlQUPPOeQxlOfb2UJu3Mp6TkVXzkcwMZoa2WJ4LHrkcel+1zGit8Z4rytBQtmHhg19fToQDpgCWzT8nLlsWx5xMMjFsiTYSVV4TKQWyDMpgNdVyXAb1kpx8xcgsC2VWCKBM6/zfuSDKAFI0bMdgas+NG54ZnKJqe04n7ZXlHDb7goiryAqmXryzQvymZdY9z3JrXsKmFLnB9HFKTCk23w5LSxWeBOknQpI0di/vT0D0d/mRa/MQpvfluKr9NISuqp7zh/tR+a9HQLplADHqSPGcUt3V1OmSiTIAHm8ztEol2ww7WlkFZoV7zmJuNko15DOqGGS8QfXCMxaUJdlQqHOZad9VB/v79KcFEFzaKEKtEys6F5Uw7ExskbReaaVJmzhPnARVKWFWGAj3y6Dhwwbj/5nxHzPjZ2t2oMY1rSdwo9f9j5PjNlgfwY67YPTvpsdIITMY3zDzSJqMmcGu4S6e+72ceLOdgQPL5vGPcHLtzVZOYhT4A5ycerOVkxquibu+PtNgqcF666+uDV7P6qVGa+GlBuxZvdRwLbxoYae79uol6f70Gb7BwIM6i+nrJ/fRwcH6sP6DCR67Udw5U0qq3Sd1jIZxQZ+qUbAqIGTU2n0K6y7NVT89mlQ/Sh+gm6N6uull1kwGrdkUG6q8X9SB0bmi3YduTpSXd13JLZW2gdeje38apx6+bUV9f3U1XDPoa9suKt3aOl+q126KZibpDUxDIvDP2hB6ucI7jn/1bv2TuVfU798SAtCo7urnsVUCQpgZk+uw14uEtPEem2Jm2B7jPZZz18saI6u4mTuVwfD8A87fI4tRQTgaLwtcUvv4hmiLLWrBcv4BKfLqYT6wZiYV/9tXuXqdz7wW5U6NedG8qs++sTQX2HoV17e95qrV3A8WU7Bpgjaai2U68XCYsF+Ok/5R9/j1q9fdo+P+QXdymETdg+hN/zDp91nC+i4sniXSZVVVb+Aw6wyG5xAAoeut7++92ttf89kSpgPJIncga0jcNgQrxVmUBQLA1J1GMMjSX5sNiiyX2qQsW7LXapiVeV5VxeA308sF4+6gOb9F1UwjqJoJ/MWbznsA4eILlXEAM6kNCRbFhGm8VqIsabkq0GgcwB1TnE0IqVEBMdf0OYYwYULjWkwLioIXF9VJfNlp7k/tWOu2yii5OyYs/QcB/Inz5a99HMfM6p4tqu0T76nrmKBRXyNGIi2vMYgizM1W2fHSqRxeX0EAk+rroFTGpKIYYUm/XaTSJe7OjFsrQLBsaonKQvAm6ec7hjp+tg== -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Query"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/queries/{query_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-queue-preview-evaluations-queues-queue-id-patch.api.mdx b/docs/docs/reference/api/edit-queue-preview-evaluations-queues-queue-id-patch.api.mdx deleted file mode 100644 index 3de67b5f2f..0000000000 --- a/docs/docs/reference/api/edit-queue-preview-evaluations-queues-queue-id-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-queue-preview-evaluations-queues-queue-id-patch -title: "Edit Queue" -description: "Edit Queue" -sidebar_label: "Edit Queue" -hide_title: true -hide_table_of_contents: true -api: eJztWVlvE0kQ/itWPYE0jkOAsDtPa5IgvLBLNgcvlmW1p8t2Q89BH1m81vz3VXXP6Qs7EAmh5MGxu+v86uianiUYNtMQDuHijknLjEgTDaMA0gyV+zXgEAJyYcZfLFocZwrvBP47xpre7+hxQSH4eJwxE80hgIwpFqNBRTqWkLAYIYSSDgIQCYSQMUPECr9YoZBDaJTFAHQ0x5hBuASzyIhPGyWSGQQwTVXMDIRgrZNihJFE8A8J7gw45PnIy0NtXqd8QUJWxUdpYjAxtMWyTIrIedP7pNOE1mrtmSI0jEBNv5zx68tT6YBcAksWH6bO2zaB0GNNBiVGMNlwapKmElnS8GKgO9c1ZQAcp8xKA+GUSY15HpSs6eQTRqbBWQfRIfHG2ZQHla7ESgn5KA8gRsPa1jLOBXEyedmyu6ZoR6EhViQGZ6jamuJJe6X0k5Y264JIqMhKpp68sVL+qdOkO0gya57CqsckQxiM92NiSrHFBhhq3NqssIbwLt6/CEniWIv/z4To3+l7oc23MN3m4yr3YQjd+Cwsqn8v/9ctIN6cakFHSmTk6n1FnTdE5AEIvkvQaq/ZJZj6TgB3qPR3WPexYM8D0IYZuzNjAsDExtS+M0y4X3H9iZqisknil7SNItSanGFCWoXEqFSqaCliSYRSIofRpkZy7Y3Y2EQ4W20i7ZZnNaqx4CsuFIXb+PItyFcLef/CvtWoOgPu0k9HmDAl0h0WHWrIdsXXhbJKucFs/BkX+2k+SJPBrPOOJB9wMpwz17TWYrq/hAsuzEaN9TE7LM7KjXlVCbnypzTkOUlTqLM00T5/To6P6V+r5uHaJ/PUys5VQQz3Psyj1Hqmlb5bW3zmKBqH8HEe1DPAtsx/nAYeYhr4YM09xoE1rgPmAc/7iw8Eu2DdYyK4D0Y/90gQKWQG+ZiZPUcDzgx2jXD2bNdy5sV2+g4sm/GHUHLrxRZKOEp8ACXnXmyhpIRrshj/uGGqBOv1ouPnqhKvH6qlRKvSUgL2Q7WUcFVaHmfO+82cjdOv0v44h/6Cc6jLpKIC9738ubKJv/rZPZMWgrcPpd83F1czqZ9nX5ycrI+wH5kU3LF0Lqgk7j+/cjRMyFYStwlkGrV2Dxk1Rqvhr51+n3oDKUNiPdsUpnoc0prNsM6l7aQOjM4N7X4riuSXV13QNdtZBa9Hd7sb5x6+XeF9e3NzuSbQx7YdVHqW6fgEcgP1POX+arO4CDVzCKFXXJ/2GtenPX992luW16I5tU9Ud+WtqVUSQpgbk+mw14tkavkRm2Fi2BETPZYJV4caI6uEWTiW/uXgHS7eIuOoIByOmgTXlEs+O9pkVWBYJt4h4VTc1/atmadK/OdDXlzazj0XAUFZelVftl58ZXEmsXVZWj0QrTz4+IeY6gmkHpur4bBOkzbe1TJ1CXg+Zb+9nJ6+6L589exV98XL05Pu5Pk06p5Ev58+n56esik7hcZBWbOXJ17jOCvPk/rcGO6nYLTa3Q/gqxvzsDRu5NJMJNPUBafIyL4Lfad/OWg5dHz07Oh4DaUWMTUZFrkmU0bWbUOwkmNVdtGhHbsOAwZZ/Ee9QZZlqTYxSxryWkWwMpgXyWXwq+llkgnXPJzeZVEeQyjKg9Q23kcUAwZ9Cat3B6MA5qk2xLVcTpjGWyXznJa/WFRUBqMA7pgSbEKwDZfAhabvvMi6NQOrHgxPropW87RTPxW1DS9LJaE6IVvpFwTwGRfNNxyuic7LOlwW22deU9e1upp9rfNTV/Yc/SjCzOykHTXazmX/5uwtBDAp3n3EKScmxQha+nS2ppnHl16O0NoSJEtmlrp1CF4o/f0Pt2ntTg== -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Queue"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/queues/{queue_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Queue - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"queue":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-queues-preview-evaluations-queues-patch.api.mdx b/docs/docs/reference/api/edit-queues-preview-evaluations-queues-patch.api.mdx deleted file mode 100644 index 5a305910dd..0000000000 --- a/docs/docs/reference/api/edit-queues-preview-evaluations-queues-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-queues-preview-evaluations-queues-patch -title: "Edit Queues" -description: "Edit Queues" -sidebar_label: "Edit Queues" -hide_title: true -hide_table_of_contents: true -api: eJztWVlzE0cQ/iuqfkqqVpYxYBI9RWBTKCTB2IYXlUrV2m1JA7MHczgoqv3vqZ7ZU5clByoUhR9sebbPr3t6vlmtwOBcQ38El3coLRqRJhrGAaQZKfffMII+UCTM5JMlS3qSKboT9PeEaoXy0SRDEy4gAEWfLGnzPI2W0F9BmCaGEsMfMcukCJ1a74NOE17T4YJi5E+ZYr9GkOb/vFX+JAzFelNgJl3wK8Bk+WYG/dG6gNATzaEkRqDkBbPMCPowTVNJmEAARhjJK0PduaklA4hohlYa6M9QasrzoFRNpx8oNA3NGri3HO9LF1MeVL4SKyXk4zyAmAy2o8UoEqyJ8qoVdy1RGNFGiWTeNCsSQ3NSbU/xtL1S5slL231BKFRoJaqfXlopf9dp0h0mmTU/w3rGbKOowwFKqBQut8BQ49ZWhQ2E9+n+yUiyxkb9vyVE/0r/ENrch+muHNe1j0Po1nchJBjTgflvRsC6Oe8FHSqRcaoPNXXRMJEHIKJ9hgKYpSpGA32wVkR7DQ/5MdyR0v8huveFeh6ANmjs3o4JgBIb88jMKIn8iptUEQ8+myR+SdswJK05GRTSKmJFpVLFSyEmIUlJEYy3DZIbH8TWIRLh+hBpjzyrSU1EtJZCNUCrD/dBvr6RD9/Y7zSpzjBy7adDSlCJdE9Exway2/FN4axybiibfKTlYZ6P8mQo67xmy0ecDBfohtZGTQ+3cBkJsxFnLf3Wn5fbDPKBLBRF3LbFsbq187wJ9nPtj3DI2VytbpQlt6CzNNG+5c5OT/lPa0zAje//mZWd60KYG/9hTCBMrVdaG9V1Ci+cROPcPs2DHwTi/yEQb6x5AIPY0DqCQnjd75xD7IP1ABLxEIy+bRYRKkJD0QTNgWwiQkNdI1w8u7288GY7AweWzaKv4eSdN1s4iUjSV3By4c0WTkq4psvJl+NfJVjPlx1PxUq8vqiXEq3KSwnYF/VSwlV5+UFTH0ZTG6df5f0Hdf0OqavrpGIH7gejNn1tE7e97mGpheHdLPV+Itxow9ExNFtXhDV37PfJ2dkmv32PUkROp3PJ++Xh5DYig0LuYakyDVtPj+Eh490o/ZH6ABnIWM+31bDmSlrjvAH5blEHRueWn95XYs7Luy7kmrOugtejuzuNCw/fvvq+ur292jDoa9suKl98OlX3xGQWKb/+LF9rZmgW0Ide8Qq013gF2vN3jR6PVFI86F2BrJLQh4Uxme73eqFMbXSCc0oMnqDoYSbc3tQUWiXM0qkMroavafmKMCLlGrchcMMt5JuiLVbVAzPxmhgeT9lgYM0iVeIfX+kABKe58FqcPzfndf229vIzxpmk5tvXUeOatHYd8leb6l5Sk+mKMtb90Qa6WubZAY9n+MvT2fmT7tNnj551nzw9P+tOH8/C7ln46/nj2fk5zvAcGsdnrV6eg41Drjxl6tNkdJiD8frMP0KvHtejMrhx7jafSGapq0/RiwNX/c7gatjK6PTk0cnpBkwtYR4vGLrxUhbXPYZgrc2qBuOzPHazBQxh/Fv9gEufpdrEmDTstdt/jbAXDWbos+llEoWbG87xqtgYIyg2BvttfJ1QXcQDYLAWqeaJDKvVFDW9UzLPefmTJcU7YBzAHSqBU4ZrxBAuyr2wgo+0dJd9N2i7bsqwuLS+99eGLg9ErzEIQ8rMXtlxY8NfDW5fvIIApsUXGHEasZJCTo1/9wH4OxKfX3/l11YgMZlbHpR98Eb551/TL6tX -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Queues"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/queues/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Queues - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"queues":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-result-preview-evaluations-results-result-id-patch.api.mdx b/docs/docs/reference/api/edit-result-preview-evaluations-results-result-id-patch.api.mdx deleted file mode 100644 index 2debb87fa8..0000000000 --- a/docs/docs/reference/api/edit-result-preview-evaluations-results-result-id-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-result-preview-evaluations-results-result-id-patch -title: "Edit Result" -description: "Edit Result" -sidebar_label: "Edit Result" -hide_title: true -hide_table_of_contents: true -api: eJztWVlzGkcQ/itUP9lVi5BlS072KViWS4rtWIWwX1QU1ew2MM7soTlkEWr/e2qOvQAjhOVUnFgPCGb7mm/6mt4lKJxJCK/h7Ba5RsWyVMIogCwnYX9dxBACxUyNBUnN1TgXdMvoy5hqBv9IjksaFo/HOapoDgHkKDAhRcKoWUKKCUEIFSEEwFIIIUdlqAXdaCYohlAJTQHIaE4JQrgEtcgNo1SCpTMIYJqJBBWEoLWVopjihmBgJXcuYiiKkRNIUr3K4oWRsio/ylJFqTKPMM85i+yOep9llpq1Wn0uDCSKkXRijJL19Sm3cC4B08WHqd0wxjEzMpFftkhrCr+zSZZxwhSKYHWzxagIyqVs8pki1SRKNedgtloi8MYaUQSQkMI9jSk112pYqmhGoq05mbRXmnvYrAsiJiLNUTx5ozn/XWZp9yLNtXoKm7bIFCW7MaEQuNgOS4sVHgTpe4Ok4dj/eP8BRP/I3jGp7sP0a3tc5X4YQkPvcyzetvvVsN0m0URwALckJHPBuAOka0I+efYigDnK+fjxzDtHOe84G5XAiO4RvRU7w1/KIqkilPeJe4ilQy/SayAhMvHvdeIfKS2cWSiLAKRCpbdCFgClOjGVNqc0dis3mjSZ2iV0mrolqaOIpDTni4xrQeAPzCxFmEbEOcXQtKGqw1fOiHWDi7VNbWJ3hfMsZgo2MdSV87osfxutqMUMXOmFojDyBMk8S6VzrKPDQ/MvJhkJlisb4HDl9j7VvDPwxLB3hY4y7ZhW/LQ2+dRSBBDTFG0xP3RW+sJeH+TPEv/NsfxBqz2CeY3rAdHseP/jVX4brDuU+X0wKut8JAgVxWNUO5apGBV1FUtoq/hTJ7bTt2bpPP4eSj46sV5JTJy+g5LXTqxXUsI1WTxiYS/BerXwpb3E61G1lGhVWkrAHlVLCVel5Wcj+bOR/D8Vnx+kl2z0S5V2E62pInGLfKPZG492NUhLAQY0lpBUmOSPmpCHlVTb5+WEZv50t7fFAyuicxHfrTaRUlE+/pMWm8ZWJfeVorzzlhb2xCNKUbDMh+quk64rz+bDUej0gQIGOnVzsu3dfrWdtqWVxi3XgG+8jFTXAHeFeHF0tH5r+IScxZan40Jo7ytDTAqZ9WCfFVYJeBa1nj4kqzX6e5dI6l2/y5yBtp+Xs21e856kxBnVmeXrpBaMztA8ve+Azb6cak/XrHsVvFWC+so2Xjv4tp3v+XB4uSbQnW37UM31seNdyF5y5lnshsR+pqzmEELPz6J7jVl0z8+ie8tqxFwYxyVxW46gteAQwlypXIa9XsQzHR/gjFKFB8h6mDMb5pIiLZhaWJb+5cVbWpwTxiQgvB41Ca6MOzkHaZNVZ4M5e2vDxw+/+1rNM8H+cqfuB+Bzx2WwMI46qOfWZ3eY5Jzac+fyGlrfAeuLi++e4PkUfzmenrzoHr989rL74vjkqDt5Po26R9GvJ8+nJyc4xRNodEa1E1Utzq4y6s6l4YnNDmRXQWVT0SiEdZ2xhWaaWWi9S/XtwXX6lxetnRwePDs4hFW3ahGbLIGRBbM8F/sYghUPqXzDmJfYFAGKMPmtfmAsyzOpEkwb8tpe3DKl8g1Fd6qXc2Q2/K3ipffva/D+bfQ2Xs+UUwrzLaxfpIwCmGdSGb7lcoKSPgpeFGb5RpMwfjwK4BYFw4lB7noJMZPmewzhFLmkNROrPApPBj5dPO3UDVHb9NLXU+PoxlrzCwKwdbDxvsdmwnkZSUv//NSp6tp8VfOvpW+TWh1HP4ooV1tpR43Ucdkfnp5DABP/IijJYsMk0KBrPq2xWe4gNqFm1pbAMZ1pk3JDcELN39+N80uJ -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Result"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/results/{result_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Result - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-results-preview-evaluations-results-patch.api.mdx b/docs/docs/reference/api/edit-results-preview-evaluations-results-patch.api.mdx deleted file mode 100644 index b1e2d6a035..0000000000 --- a/docs/docs/reference/api/edit-results-preview-evaluations-results-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-results-preview-evaluations-results-patch -title: "Edit Results" -description: "Edit Results" -sidebar_label: "Edit Results" -hide_title: true -hide_table_of_contents: true -api: eJztWVlzGkcQ/itUPyVVi5AlW054CpblkmI7ViHsFxVFNbsNjDN7eA5ZhOK/p3pmLw6tgJJTcWI9oGW2r/n6nGEBBqcaurdwcYfSohFpomEYQJqRct+uIugCRcKMFGkrjR5liu4EfR1RxVG+G2VowhkEoOiLJW1epdEcugsI08RQYvgRs0yK0PF1Pus04TUdzihGfsoUazaCNH/LxfKjMBTrTYqJdPYvAJP5hwl0bxeAUSRYOsrrFdKKwswzgi6M01QSJrAMyiVtlEimsBwug2IpHX+m0NSJEislLIcBGGEkL7xxRiwDiMnggcYUmis1IjE0JbWqOR6vrtT3sF0XhEKFVqL66Y2V8nedJu2rJLPmZ9i2xRzmHZhQKZw3w7LCCntB+p6RZI7D3fsPIPpH+k5o8ximD+1xnXs/hAZ5zImoafcBTFIVo4EuWCuiRolX/BruSGnh03IHSDeEfMrZlwHMUM9GT2feJepZy9toFIb0iOhG7Ji/kEXahKgfE7ePpYNcZK6BlErVvzeIv6eycOGgXAagDRrbCFkAlNiYW1tGSeRXvliyFHF7sknil7QNQ9Ka/YtCWkWQO4yXQkxCkpIiqNtQ9r0bb8SmwcuNTW1j77vudhGJOggev4q8n7fAbSK5yQpFEW+yaJVbDc2FsKq+b8ywZIGVAKMsuQWdpYn2wXhyfMz/ItKhEplxRQFuPF4TK1v9nJiBOqy/h6n1TGuxXe3h3FEEENEErTTQPfZW/hgLnj7/P1hzQAHY4NqjAnje//hk0ATrDqPBIRgVs0GoCA1FIzQ7trYIDbWNiKlR/LkX2+o5s2wWfQslH73YXElEkr6BktdebK6kgGs8f8JhoADr1TwfBwq8nlRLgVappQDsSbUUcJVafgyfP4bP/1Pz+U7mz9q8VGrnbE0MqTuUW83e6tr1JC0EMGgiJm0wzp60IA9KqW7OywjNSET3B1vcdyJaV9H9+hCpDWWjP2leGz9LowvuG0NZ6y3NncdDSlCJNE/V5gSticjZ8nRUNtlTQN8mjveR+b/czqqlpcaGc8EOp48adrd7nW50eUhYuhPH85OTzTPFJ5Qickwtn2AHHygiMihkw8FApuHK231q3vBhnN6l3kA37etpU0y9J61xShXoD5M6MFoDfvuY+3lfXnVOV++KJbxl+XpgG689fE0OvhwMrjcEet+uOpUPm60qfmIys5Tvkosb4gzNDLrQya+TO7Xr5E5+wOtwMJPiocC5yCoJXZgZk+lupxPK1EZHOKXE4BGKDmbCpb6m0Cph5o6ld331luaXhBEpF7s1ghsOIh8Wq2SlRzATb11KJRjz9541s1SJv7yvuaCyPZ6LEeDw7Fc33xf3GGeSVm6yb6vDaXUyrI4z+UwFpxP85cXk7Hn7xctnL9vPX5ydtMenk7B9Ev56djo5O8MJnkFtXqqCpxx8dpVRzTO1CKzPJbsKKkaNWnusus/Q9Z9J6tDNY6nnfNfqXV+tbOX46NnRMazH0woxlwcMXXkoXONeQ7AWJGV4sH2xqw1gCOPfqhfsuCzVJsakJm8tfFdsKePD0L3pZBKFS3yneZEH9i3kgc2Ka7+tVLcXAXCSzlLNRRUWizFq+qjkcsnLXywpjuBhAHeoBI4ZsFsGcVbE8gJc94JzXyrbrk4wubQ+dtfKJpc0z9ELQ8pMI+2wlrHXvcH5JQQwzn/MidOImRTy3vizC8C/GPkNcrDz2gIkJlPLpa4LXij//Q2oZAeq -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Results"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/results/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Results - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-run-preview-evaluations-runs-run-id-patch.api.mdx b/docs/docs/reference/api/edit-run-preview-evaluations-runs-run-id-patch.api.mdx deleted file mode 100644 index bf0898f887..0000000000 --- a/docs/docs/reference/api/edit-run-preview-evaluations-runs-run-id-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-run-preview-evaluations-runs-run-id-patch -title: "Edit Run" -description: "Edit Run" -sidebar_label: "Edit Run" -hide_title: true -hide_table_of_contents: true -api: eJztWltTGzcU/iue89TMLJiQhLR+qgNkQhMaxpC8MB6PvCvbSmRpowuN69n/3jmS9mp7MYbMpK15AKzV+c5F57ryEgyZaujdwvkd4ZYYJoWGYQQypcp9ukigBzRhZqSsGKWK3jH614iWu3Fdj9xTloxGKTHxDCJIiSJzaqhC9CUIMqfQA78LImACepASg1sV/WaZogn0jLI0Ah3P6JxAbwlmkSKVNoqJKUQwkWpODPTAWodimOG4YWBF5yKBLBt6NKrNG5ksEKIJHkthqDD4iKQpZ7HTovtFS4FrJe9UoQ0Mo9rBWLG6OOHOeEsgYvFx4vSsb2B6FHOpkXt1U1BrLCWnREAWFUvCcg6oRa7Zhe6ceoQsQjjO7uhjwD4gvYcisXkkWN8jZFmU75LjLzQ2lZMp3WpgxVtnr1XQLII5NaQuCkkShnSEX9VsuiJs8I4KLBOGTqmqc5qP6ytVHdfzgpip2HKifnlrOf9DS3FwIVJrnkFTX8Rghs63IyJKkUWrbeuksGLfNtpLtCRSrPjmz2TRP+UHps19Nt2kY5P6YRa68V4YctJW+q9KgLRZBAnVsWIpqror1FkFAiNzfbLYkANbI9QljTuq9COk+xzIswi0Ica2ekwEVNg5lpOUisSvfLPUUkzWygrhl7SNY6o1KkMYt4oioVJS4VJMREw5pwkM16WRay/E2iSSkGYSqadjbWjakD9EbXPnV7pYV39ycd7TRelym43AnG9isbuTvs5ABEQIafyHqk8iRBaBVGzKRBtobLWRc4hgZufEAVojq1AfPUSGpXBCFRVxCPMN4V/X/AndhdvprjDXSPvkwdBSpwa5qVZTyZpNLn240306d1rDt+xdbh3E2oAYWHFGDLk2NG3mwvsLzYXXYRvmYUfhojX3uk+yBwl17cLU+W9KSdPEbRWpATQI9JimJ8RyA73n2GuQNGWiWR03HF0suZ2v6f2+MpG0nik+rxSZTft8IbnP/ggWsNpMfek1O/Uyu5RN012zm+vOW7Zd4fPtPMdBbSG4d5V7IMOJBOW2QH2Q813mzrF1V4uc1tWjbenPE2buVRrnj02qIsDATz2QZZkLHJ1Kof1pHx8d4Z9apwLXvgRPLO8MwmbYeTiKpfVEjdgs5T11OypxeJRF+Uy1qVrvp6v/23T10ZodxqsVqgfMV572Pz5gtZl1iwlrFxv93CNWrCgxNBkRs2V3mRBDDwxz8mzmcuphO31nLJsmP4LJJw8bmCSU0x/A5MzDBia5ucaL0dP147mx3iw6fk7N7fWkXHJrFVxygz0pl9xcBZf9DL/bDF9pEAru+7l+P9fv5/r9XL+f6/dz/b9qrn8MbTGT+3n+5fHx6gj/mXCWOILOORbe3ef3hBrCuBup1wcLl3Ht6UMGmmHzlEqVP+TVE4NXT9uc8pJqTaa0rToXhkRjdHzhvcflUC/POuyrVrzCvN66m9U48+ZrO9x3NzdXK4D+bOuHiu9yOug8bmifycRfk4crdQxc6IZL+G7lEr6Ll/Ddpb9ezzCGqLrL796t4tCDmTGp7nW7MZc2OSRTKgw5JKxLUuYCRdPYKmYWjqR/dfGeLt5RklAFvdthdcM1epH3i/q24khIyt67/BBu/fvWzKRif+etkrv8n3kqNAH656C8tj//TuYpp5Vr9+JVUOWVj7/OL17aFB/zFy+4UL76KOf1IneXnlM/gmIZmxR4MSG/vpqcvDx49fr564OXr06OD8YvJvHBcfzbyYvJyQmZkBOodOgled5qV/rovJENDettSNkVH86DxzeYeddYNoe11q/SrDShsqH/LkQotEfV6nhbrX6+3pUS1G1TKTUNSYMz5vswtzlxJtI5QvD7vnOzTv/qomajo8Pnh0crhq9txlRGYpfKci9yjyFq+HPhydhLz10eA0PJ/PfyAUqWSm2wry7xKqHWeMUQTsHQ76abcuKbbsd1GfS+hRCEyLTyzRk3IeGfXvimyzCCmdQGKZbLMdH0k+JZhsvfLFUYbMMI7ohiZIwGu11CwjT+n0BvQrimK8IVOR5+GYRU9qxTuk5d6DwgBUYjyomfIAqHGWR0KXqWx3p+0qeez8GN7w5z4pW6gjnfU/TjmKamde+wktau+jen7yCCcfimzlwmSKQIGhV/O0ll6i2LyQDXlsCJmFqsBT3woPjzD6fMjm4= -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Run"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/runs/{run_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Run - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"run":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-runs-preview-evaluations-runs-patch.api.mdx b/docs/docs/reference/api/edit-runs-preview-evaluations-runs-patch.api.mdx deleted file mode 100644 index bd38826999..0000000000 --- a/docs/docs/reference/api/edit-runs-preview-evaluations-runs-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-runs-preview-evaluations-runs-patch -title: "Edit Runs" -description: "Edit Runs" -sidebar_label: "Edit Runs" -hide_title: true -hide_table_of_contents: true -api: eJztWt1v2zYQ/1eMe9oAJU7TNt38NDdJ0azNGiRpX4wgoKWzzY4iVX6k9Qz978ORki3Jtuy4KdANzkNiU7w73vF3n8oMLBsb6A3g/IEJxyxX0sBdBCpD7b9dJNADTLi9106a+0zjA8ev97jYHh7cZ8zGE4hA4xeHxr5WyRR6M4iVtCgtfWRZJnjsibqfjZK0ZuIJpow+ZZpkWo6GvhFP+sstpmb58Uj4Y8+AyemHEfQGzQ3c3MdCGUzqm+w0Q+jBUCmBTEIezZekEwLyuwgst4IWLkznNHDII2In+AN+D7P3RB9Ysdh+J7N+4JDnUblLDT9jbGGxa3Gh106+8fZaZppHkKJl9aOwJOFEx8RVzaZLhzVWczmusuXS4hh1XVI6rK9UdVwtC2KuYyeY/uWNE+JPo+TBhcyc/RWa+hKPAiNbEDGt2bTVtnVSWLJvG+0lWZIolrD5M1n0L/WeG7vJput0bFI/zkK3AYUgWboa/sv6L5+AaPMIEjSx5hmpuiurswoL8szVwaJgFMFI6ZRZ6IFzPGn3UB80HlCb7zjdp4I8j8BYZl0rYiJA6VIK5BnKJKx8cegwoZDspAxLxsUxGkPKMC6cRiLUWmlaipmMUQhM4G5VGLkJh1gZRBLWDCL1cGwsZo3zr4nsf6NPG03tyuO8w+kCcuuNwD02I+DyQYWMAxEwKZUNX6qYJBZ5BErzMZdtTGNnrEohgolLmWforKqy+hBY5JQER6hRxoWbr3H/uuZPCBfhxruyuSHaJ3eGljx1XZpqOZSs2OTDh7/dp4PTCrlUxHBN1cPAs1jpENdOnjHLbixmzVi4OdFcBB22EV7smEO0Bq9NJ3vUoW68m3r8ZsiaJm7LSA1G1wU9hekRc8JC7xnVGizLuGxmxzVXFyvhUrniSrlMWu+UnleSzLp9IZFssj8xK3i1mfoyaHYazuxDNma7RreM2Unbtit6vh1yPKstDh6gsoFlcSOFcltwfRT4LktwbF3VkqRV+Whb+vOELzttBcTUg2yyiW9U1pnCkITr0BBBnudVUqsd+gWTKWkCPI6PjuhPrbSBm5CzR050rovNlKx366ti5QJRw5kXCpz6HRXHPcqjfTu2b8fqndUHZ3fox5aoHtGQBdr/eUfWZtYtWrJdbPRz92SxRmYxuWd2y3I0YRYPLPfnWS/lNLDt9L2xXJb8CCEfA9tCSIICf4CQs8C2EFKaazi9f7oCvjTW62knNLalvZ5USmmtuZTSYE8qpTTXXMq+6d+t6a8UCHPp+0HAfhCwHwTsBwH7QcB+EPCfGgRsGgJU0DvYnquZt+u57/1fHB8vd/efmOCJp+icU07evbVP0DIuWrp0oeLa08f0OnfrLfS+TKzk12bchtdLNIaNsS1xzy1JxuiEnLwBjaRXEF3sqybDuXmDddercRbM13a7b29vr5YYhrutXyqNfToFclK0E0Uv0csX5MGpoVu8Su9WXqV3ac7SJb9CTVWAvxynBfRgYm1met1uLJRLDtkYpWWHjHdZxr3zGIyd5nbqSfpXF+9w+hZZgtpDtrLhhuATAFHfNr8LlvF3PmaEwAl9ZydK83/K8omKI5gEKtKdgHm9eOt//o2lmcDFW/xBZUBUGQTRAKwyypl/LccxxYCsGIgsuvh5RF+Apm79+TKVLvB8xH57OTp5cfDy1bNXBy9enhwfDJ+P4oPj+PeT56OTEzZiJ1Cp2xfkZQFeqa7L8rYoYwdFIK/At/SbUHaWteSiZKwVhJUSpskq95c2T79H1Zw5qObEkAUXJ6jbppKAGictYFjuo2h5588zUh4LBeb7Hmmd/tVFzUhHh88Oj5YsX9tMYYzFPoyVQPKPIWpAeg5mKrFTH8PAIkv/WDwgmGXKWCq3F/yqbtYYPRT3YPGb7WaChWLci50Vmg+gcECSWvnnl2LYGQGFkYkyFPNhNhsygx+1yHNa/uJQk6fdRfDANGdDMtWAzDcpfa6092kI5ge3oXIjQcHHGoGdgm6g6McxZrZ1710lrFz1b0/fQgTD4h9uUpUQkWakGP3uAQExC9qRU9LaDASTY0fBuAeBKf38CwllT7c= -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Runs"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/runs/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-scenario-preview-evaluations-scenarios-scenario-id-patch.api.mdx b/docs/docs/reference/api/edit-scenario-preview-evaluations-scenarios-scenario-id-patch.api.mdx deleted file mode 100644 index 12fed250af..0000000000 --- a/docs/docs/reference/api/edit-scenario-preview-evaluations-scenarios-scenario-id-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-scenario-preview-evaluations-scenarios-scenario-id-patch -title: "Edit Scenario" -description: "Edit Scenario" -sidebar_label: "Edit Scenario" -hide_title: true -hide_table_of_contents: true -api: eJztWEtvGzcQ/ivCnBJgZTlO7LR7quI4iJu0MWwnF0MQRrsjiSmXu+bDjSrsfy+G3JceUWzF6aGID7ZMzovfDD+OZgkWZwbiGzi7Q+nQilwZGEWQF6T9f+cpxECpsGOTkEIt8nGh6U7Q32NqVZpNM27lRDoeF2iTOURQoMaMLGl2tgSFGUEMHVGIQCiIoUDL8ppundCUQmy1owhMMqcMIV6CXRRe1WqhZhDBNNcZWojBOW/FCitZ4Kqy3TtPoSxHwSQZ+ypPF2xn3UOSK0vK8hYWhRSJP9ngs8kVr7UBFJrBsYJMWA9uNnem0kO7BFSLD1N/bExTwVZRXqyIthLV6SZ5LgkVlNH6gctRGdVL+eQzJbYrpJyUwIetUXjjgygjyMjinsHUnls3QlmakV71nE1WV7pn2O4LEqETJ1E/eeOk/N3kqn+uCmefwrYjCkvZ/ZRQa1zshmVFFR4E6R+MJGvsn97/ANE/8/fC2G9h+rUzrms/DKHrquZEuuv061d3l0W+wxHckTYiXMd7QLph5FOlXkZgLFq3MzcRkHIZM2NBKg0rt44cMcdop1RYMi5JyBg+DArpNLGi1rnmpQRVQlJSCp0oWqK9CkFshlxuoL1VvWKes1RY2KbSMtxNS1PbI+mYugw0CWXJNjWZIlcm1PHR4SH/SckkWhTWpwKuAgJTJ3uXlTDszaZJ7oLS2rVogz71EhGkNEUnLcSHnM4OCbcJ/UnH303HH5zdg483tB5AyEH3f87Iu2C9ByXvg1HNyYkmtJSO0d6Tm1O01Lcio53mT4PZ3tCH5Yr0Rzj5GMxWTlKS9AOcvA5mKyc1XJPF+PFesxqsV4teeNhqvB7VS41W46UG7FG91HA1Xn4++vs9+p0nrfHOcCpL+g7l1rC3ctQ6irUBpguRkbGYFY96Y64bq6VHqaqu+35Ru3QqfEfb3cFUhnf2L9/dSzUdTOh+XhwdbTY8n1CK1Gv1zjjp+3c7KVkUPrPVW7ouIPNkZfchz1anMQnPb3vu93kI0DciZrYtWe3TagzOqH1rvi7qwehd8+63csnnCq4rue6FbeAN6H79GK8DfLsy/Pb6+mLDYMjtalK58+01ZeT7s3mehnlENcCwc4hhUA0/Bp3hx6AZfgyWnYlGyUxB+q6eeTgtIYa5tYWJB4NE5i49wBkpiwcoBlgIf6kMJU4Lu/Aqw4vzd7R4S5iShvhm1BW44qIKZbIq1mQIC/GOGLBq2jJ0dp5r8U/IfTVvmQctRoTL9bIdkpx9wayQtD7kqPvotoltO6+K/uH5FH85np686B+/fPay/+L45Kg/eT5N+kfJryfPpycnOMUT6FB7W0w1R7cU6Dlw6l3XWR161HrDi/MVI4cHzw4OYT2zK8J8UTHxF7UGxW9DtJaeJjFM7Zm/pWAJs9/aDY6syI3NUHXsrRfSSjBNaix9sYNCovB30LteViV2A1WJsefOUK79lsOf4+7obBTBPDeWdZfLCRr6qGVZ8vKtI82lNIrgDrXACeN3s4RUGP6cQjxFaWgjzIbQ4MlldW+f9tp2dTX8utwU1xpHzP9BBH/RYm3G50lpXpfzspI4Dc76njpaCxtMyiwXNIZJQoXdKTvq3OGL4fXpW4hgUo3+sjxlJY2MMf/24eZFAJpng7y2BIlq5pj9YghG+edfTSVFvg== -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Scenario"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/scenarios/{scenario_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Scenario - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"scenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-scenarios-preview-evaluations-scenarios-patch.api.mdx b/docs/docs/reference/api/edit-scenarios-preview-evaluations-scenarios-patch.api.mdx deleted file mode 100644 index 4b7c70d962..0000000000 --- a/docs/docs/reference/api/edit-scenarios-preview-evaluations-scenarios-patch.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-scenarios-preview-evaluations-scenarios-patch -title: "Edit Scenarios" -description: "Edit Scenarios" -sidebar_label: "Edit Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJztWFlvG0cM/isCn1pgZTm+0u5TFceB3aSNYSt5EQSB2qWkSWcPz+FGFfa/F5zZS4dlW7D7UMQPsnaGx/Aj+S01SzA40xAO4eIepUUjslTDKIAsJ+WermIIgWJhxjqiFJXI9DhXdC/o7zE1Oq3dcY4mmkMAiu4safMuixcQLiHKUkOp4a+Y51JETrP3TWcpr+loTgnyt1yxdyNI+/XSMD8IQ4nelJlKF8USMF18nkI4XALGsWD7KK9XRBsJs8gJQphkmSRMoQjqJW2USGdQjIqgWsom3ygybaHUSgnFKAAjjOSFD+4QRQAJGdzzMJXnxo1IDc1IrXpOJqsr7Ri2+4JIqMhKVD99sFL+rrO0e5Xm1vwM20IsYX6CEiqFi92wrKjCsyD9g5Fkjf3T+x8g+mf2SWjzGKYPxbiu/TyEBmXNiXhX9AFMM5WggRCsFfFOi1e8DfektPCN+QRIN4x8LdWLALRBY3fmJgBKbcIklFMa+5U7S5ZiJhGbpn5J2ygirTkYFNIqYkWlMsVLEaYRSUkxtE7RcNqtP8TmkYsNtLeqlxx0EYt2fnzxNwq3NVVtM8t0KBTFHGhDatuPW22zwxtPo1Cw0caIUZbcgs6zVPvqPzo85H8x6UiJ3LgEwq3HbWpl56YUZsD2Y+Mos15prZmaKM6dRAAxTdFKA+EhF8EPEn8dEv9szR4svqH1DBr3uv9zHt8F6xOIfB+MKiaPFKGheIzmiYweo6GuEQntNH/uzXb67lg2j1/DyRdvtnQSk6RXcPLemy2dVHBNFuOXewdWYL1bdPzrsMLrRb1UaNVeKsBe1EsFV+3lx6iw36jQeqXV3hnO1JC6R7n12Fs5ah3FygDThUhIG0zyF+2YQW21cCiV1bU78Y36jU1d6Twy05SGdw40TxqeWkAPnzmg6XrCKdy4dHJ0tDkQfUUpYqfWueCi2H8aismgkDtmGplFK7vPea2NHsbqU+YP6AYVPduWzObVqzXOqAH+YVEHRmfAu4/lmuPyrku5dkPX8Hp0Hw7jvYdvV4ovB4PrDYM+t6tJ5Um5066hhMw848uL6joiRzOHEHrl7UWvdXvRq+fTHrMHKeY0lyarJIQwNybXYa8XyczGBzij1OABih7mwjWapsgqYRZOpX999ZEWl4QxKVfBLYFbLiRfGqtidVYwFx+JQUox4ee+NfNMiX98vplu+Dxei1HgEr1pLlouvmOSS1q7OBk203Uz2jbzWPlSgOMp/nI6PTvpnr5987Z7cnp21J0cT6PuUfTr2fH07AyneAYtwm9KqGLuhhhHjhqnmQutTGbfAdfpX1+tWDk8eHNwCOsJXRHm/sTI9WeFi9uGYC1DdW6Y8RPXnGAIk9+aDUYtz7RJMG3Z26ifldPU6TH03fRyicL1nvO9LCtrCGVlsevWbVr7108A3CnzTDO3wXI5QU1flCwKXr6zpLiERgHcoxI4YdCGDOS8KqYl/EUL9yPL8VXXNSuLS+uLZ427mFe8Rj+KKDc7ZUetprnuD84vIYBJeXmXZDErKeTo+DME4FtCH2K49GtLkJjOLPNNCN4o//0LC2P+/A== -sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/preview/evaluations/scenarios/"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Scenarios - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"scenarios":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"type":"array","title":"Scenarios","default":[]}},"type":"object","title":"EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-simple-evaluator.api.mdx b/docs/docs/reference/api/edit-simple-evaluator.api.mdx deleted file mode 100644 index b2404d8eda..0000000000 --- a/docs/docs/reference/api/edit-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-simple-evaluator -title: "Edit Simple Evaluator" -description: "Edit Simple Evaluator" -sidebar_label: "Edit Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJztWktv2zgQ/ivGnFpAjtMkTXd12jRJkWzbbZBHL4ER0NLIZpcSVZLK1mvovy+G1NNKXNtJFkbhHtpKmvmGM5wn6RkYNtbg38LpPRMZM1JpGHogU1TMcJmch+ADhtzcaR6nAu+wpAMPUqZYjAYVIcwgYTESdUlxx0PwgCfgQ8rMBDxQ+D3jCkPwjcrQAx1MMGbgz8BMU+LVRvFkDB5EUsXMgA9ZZlEMN4IIqmX2zkPI86HDRG3ey3BKQPMiApkYTAx9YmkqeGDVGnzTMqF39QpSRUobjpqeajU7nyJhTTYDlky/RFbzNgHXd0GmjYzbRIWKIykFsgRyr3qVZEIA6VJqea57xw4h9wiutZp1ESvTFaCTLGbJUwDPLECeeyWRHH3DwDR268r6TCX4g7VcFzX3IEbD2mthYchpq5i4aFm3s9rCZxqwPDE4RtWWFI/ab5pKPiwLAq6CTDD16kMmxJ9aJv3zJM3Ma5jXmDC4wXg5JqYUmy40bpsVOhZexPuZLEkcHS/dJIv+JT9xbX5m08d0nOdezULXzguLfLWU/t0VEG/uQYg6UDwlVdeFOmlAUGSGi4DmM+PCEA3tCtl8ZLWz1T0q/YTVfy3Ycw8yxddFuVHcIYj1EQQhTJCFth6t5vgvZRItsvG6MFfE++wOsSBbX2KECpMAmyDlQocrhdhZsQ15WeOX3ZENSlGbl/RX2ICrwupUWlma8mTZYjBv31UqTynI7jqltLVd33Hn7RZzU2vZ5jnK47wXtT1pl1Dd8wCXMa3rpldwwAI6ty14xMeZGyheQtZxS8AKDekJs71Spx9dHuE05OZBifUcctsYJoYLgS7dKAN5TogKdSoT7fx6b3eX/mm1G3CVBQFqHWWid1kQw9oTTyAzxzQXJk0zEwX1PBHLhAF/N/fgkdFkOzJtRyaXpL5kZo2s2OFaIS063l98alpk1iXGpnVstNlzU6CQGQzv2MKuo9Euh8xg3/AYF9cWB9s7ssbK0vAlhNw42EJIiAJfQMiJgy2ElOYaTe+eb8AojfV+2nPDZ2mvZ5VSWquSUhrsWaWU5qqkbN4stx3ut8P9drj/ddqT7Xy/kV3XRvrKdsT/v0b8p3FXg7kb6g/29rpz/FcmeGg1650qZa9W1xziQzSM2zJb+OM8gZBB6+sq8dSoEs6Fa6U/yYCVjXisxw/d6NaTltZsjLVPP05qjdG7pq8/O2IhvZzogq5ZsivzOus+rsaJM9+i7T27vr7oALq9bW8qHej0nDM0zhHs2D6RdKtOge25m3EfBqnCe47/DNw1+6A6vtCDWfNCPQcX0uWdu22qYGJMqv3BIBAyC3fYGBPDdhgfsJTbKNIYZIqbqWU5ujj/iFNXxMG/HTYJbFlxntImqzaJpfwjks2K2/6jzEyk4v+67S+u+12jZu1IHntZX9Gf/mCkX+eKvTohapwEuRzRPsup3hVHMfRcn4XUA3w1ptZe1d6e6jV1YLAfsd/eRocH/bfv3rzrH7w93OuP9qOgvxf8frgfHR6yiB1C3W5XPWQNY/vj5qNoPtada6tpalfvRlmtOVsFspXPH0i7zg95Ekm7Y4XLHll/6B1dnIPXWPruzpud3Y5dWsSUhVhgs1C53fZzpWDpeJXLgQcY2xQEBln8R/2BVpZKbYoTtALvsSiZOx8onM/gDzNIBeNJY6BwEXQLRQRRgFg8aBxOavDAb/0wZejBRGpDjLPZiGm8USLP6fX3DBVFytCDe6Y4G5ERb2cQck3/D8GPmNDYWWOVsuHVZZGZXvfqqt9eexlNCYUSrYuewIO/cTr/ExqbdydluM4KkmMnrW+zYw3RKRaUyB3HURBgahbSDhvp6eLmGjwYFT+riWVILIqRfelvu1pplbdxa9/NQLBknFF698FB0p//AIsChy4= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/simple/evaluators/{evaluator_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-simple-query.api.mdx b/docs/docs/reference/api/edit-simple-query.api.mdx deleted file mode 100644 index bb32edb1d1..0000000000 --- a/docs/docs/reference/api/edit-simple-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-simple-query -title: "Edit Simple Query" -description: "Edit Simple Query" -sidebar_label: "Edit Simple Query" -hide_title: true -hide_table_of_contents: true -api: eJztWutPIzcQ/1ei+dSTNiTkeFzzqfSgKr0HFLhWahQhsztJ3PN6F9sLpNH+79XY+8wmS0ipdK3CB5Q4nt+Mx/OWF2DYVMNwBL8mqDhqGHsQxaiY4ZE8D2AIGHBzq3kYC7y9T1DNwYOYKRaiQUWkC5AsRBiC/fWWB+ABlzCEmJkZeKDwPuEKAxgalaAH2p9hyGC4ADOPiU4bxeUUPJhEKmQGhpAkFsVwI2gDyTbvnAeQpmOHh9r8GAVzAlmG9yNpUBr6icWx4L49Su9PHUlaK7nHig5q6NDDhRO+ueyOtgAm5xcTe9i60KlXrMhECCABc7E/E23qQYDaVzwmMbaFOq1ApB7woA1oWZFtwKRUDybCWkEVkgUBJ3ZMXNYU0mB6F0UCmaxyyQ80Tr18Kbr7E33TKspPVggi2V6Ypiq5NDhFVecc3tVXqmdYzQt8rvxEMPXd5+gj1+YXHcnuuYwT8wZecshlaniRim4yDYVo2LeroZ8SIZ7TDzcYbkbElGLzdsOpkb5Mo59Ik+SjbFmj9TjwyGUQPZLmWjZJfERtNnTNgBnsGm5DRIu9OMjUg0gErw1+4SBTDyQ+bQr9bEj5TFipB4KHfDXoSotbQvloqencKkDVLhvKJKQcxrSPMnBrFHSzL+NWHVh4iqnSoHpgYmuJz3OA1APFzOq00fSsBs4V0aYNKy43/F7YYhOGgjkXBtUzpupyfGQVG+CEJYLulsmgdLymeu2vkQIPZEQCSbciIwXVm4um3GfiIueQ2pzsQoblnfn+euEmHEWwqkAoPN5uSD34ivNtU+oHpKgCD0wkm2b4F0fK/KTpimi2Ooq6Gmbz+PWbFT/1ahf6vKdwTUWavqV7rKC9j8KYKa4jWbm99Sh4T7dv/0/JHoSxn9B+pP935lFW8T8nISrubwSuDVNGP3JbQ6IM8o9U3zEu6QAhM/4M6ZPgX7HK6NqibcSHS2fPt7wmKqXpjehnjASYsYYyT7m/GQI+cW10JkX2pYJzRisofVwF1oxn+Sav4tdcOxMpXHCd5/lM461GqbnhD6vdYkW91xDiPdPYuS5gKqJMmNCYeoBPzDe39gK35nJGGJ1PFqPBoiV+3uCTuch0Qfh1FTCxOgVsItGJEC+SxBlZKcn6S832rMAq+59RFjhrDp0FXhuFi1orzxBvYLwcmlbQ6uqZRuO2AxXIq1JTC53t8K7wgWseyVNma7KX0F/b/tSinAVUNzyjKNftjdcCXLkeE9KUkBTqOJLa2ceg33dJs9LUwXXi+6j1JBGdq2wzbN2K+lHiiJbSTvVqaEflVvqpV3awa8vTb7KX9RUyg8Ete93a9r2D7ZzYIjKJg3+DyRcHmzEJUOC/wOTUwWZMcnXd2UnLK5XsubJ+dFOWUl+vyiXXVsElV9ircsnVVXDRIplua6vXRLsbuHwrA5eLxPyTiYsj/1+PXNo0tH7m0qB6wdBlG6Xupi67qctu6rKbuuymLribuuymLrupy27q8h+fumxPWcxL3KzlYDBojld+Y4IHdnjSOVPKutmWs5UADeOilg/rG0Tkr8mWzyeolmv9GDkBbSuhp21p9hNqzaZYVtTrt1pldG7o1+eMlM7lWGf76uksU6/T7vpjnDr1tV3tzzc3lw1Ad7f1S6U5W8cZQufX7GFJiGYW0asTaik894JkCL1Y4QPHx557htK7d29Veov8xUkKHmhUD/mDlEQJGMLMmFgPez1fREmwx6YoDdtjvMdibv1co58obuaW5OTy/APOf0Zm697RuLrhmozJmUd9W3EzLOZU2Xj5U5iTxMwixf9yd569h5k5KtIEmelV+Y7l7InRwWrvUDKk4s7ryiuWaTIBbyfs3eHk6KB7eLx/3D04PBp0795O/O7A//7o7eToiE3YEZRTh7LlLxvbSjdW67ry7goG/cFBt3/cHXx/s384PNwfDt7t9Y/3/4CySWrb43qdTSXNuph+0YjUuoyyaejnRX9/uQQvK7Osgq5Ww6Oi2i0VaYva8mtWoZYLFUBbx1Xy+nL+duVkLdnSUpp6FBrHzhm4nETWgvIsZu2zc3J5TtxRaXfR/b39vX7j+mubbW3mm4rRuJ/BW3KEwgWoDAptHASDLPyh/IEkiyNtQiYreKtcdWkSnDmCwSfTiwXjNtJZ9ovMjUeQuTE5q8UCN7TmtpgcFs/Hxh7MIrKnESwWd0zjFyXSlJYz5xiN6X4UZ3ekudECAq7pc5Al/4ZwRbKA766ymPimU/ZcdaFzl5bzihkUBlJIaaP9LI8Xi+zn945T18bkkryRoih9OIoT38fYtO4dVwLj5ZcbKvGzx29hFBCJYqRU+m8lrZimXVuAYHKaUFIZgoOkv78BoFmWYw== -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Simple Query"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/simple/queries/{query_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Simple Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-simple-testset-from-file.api.mdx b/docs/docs/reference/api/edit-simple-testset-from-file.api.mdx deleted file mode 100644 index c4caba067f..0000000000 --- a/docs/docs/reference/api/edit-simple-testset-from-file.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-simple-testset-from-file -title: "Edit Simple Testset From File" -description: "Edit Simple Testset From File" -sidebar_label: "Edit Simple Testset From File" -hide_title: true -hide_table_of_contents: true -api: eJztWd9v4zYM/lcCPt0BbtMVe/LTeu0V7e52LZrcXoIgUCwm0U22fJKcLQv8vw+UbMc/kjRtUmAPfWoakx/JjxTF0GuwbG4gHMEQjTVoDYwDUClqZoVK7jmEgFzYiRFxKnFivdRkplU8mQmJEEDKNIvRoiacNSQsRgihlBQcAhAJhJAyu4AANP7MhEYOodUZBmCiBcYMwjXYVUqaxmqRzCGAmdIxsxBCljkUK6wkgcLV3j2HPB97RDT2k+IrgmkbiFRiMbH0KM6kFSnTtk/YZ5xZZ3jjQqopdivQ0H8uwH2OTUXC9Krm2i1p5IHTnHi1rjomWUyUR2YJAfwwKiHS6xC9IakEwHHGMkmWSDYPKlY9yWtgyeph5mhvGsmD6pskkxLycZe+b4RRw+RoIi1Syvux0Dc1qJoFX2vHQQ8Jo4YZo8/hMZh/EEZOoF5QTX9gZBu1OvLFUFOmcpvsPxt5TqAaTaoS40vq8uKC/jS4hkEWRWjMLJO9p0IYGnXL0lSKyB3JvquXPUUbqcwrFcGIxOIcda1Ir51ErbouNnw2qWwdB9nJX1NgwYxjIWJFtJ2kTJWSyJK9WbljpjesUPLAw2oWHYvpIbbluVUQt9IXWRsvD6BbboxzQYlh8rFBxgEFWaamYSmeNr+ph7fdFkRCR5lk+sNtJuXvRiVnD5lNM/sR2qESiLAYH6jFtGarvcS2dKFD7j5lf+4C6PaF/xOp39RXYeyztO4KsqP+Mo7KfndMxy87/Qk6fKuzRxqZRT5hdh9g7cbkzOKZFc6f3VauPWzvypGVpfwtjHz3sIURjhLfwMiNhy2MlHRNVzQXHWbHDT+HkPVp5SaiDV8ntVKyVVkpCTuplZKuyoqR2fy1tTog3TyA07lXRM7ad0DzGiyvwIngraZVtN7nXTi8AZc3Ze+eV3PRlvu3stx1tZjST0RRfTgP4LTYgwr3ve+895037Tun7hlbZueDZ5wtA27Z/cYvmiXKufZ94Dpg4Hqf9N9g0u9ene+kvprUG7ZjbdGeDV41UBz0S/kJl8IIlXhXuj+Y9yAM3NakwDlGt1qZ+HXLr5eX3Q3Ln0wK7vYnvc9aK/369QpHy4SkTztGKqmixtOXFPK4nahNyF+Vd9C1JjPfNkRuDpsxbF7L+m5RR4bfNj63/6K4vOlCrlYzG3o9u7vDuPH07Uvu3XD42AH0uW0m9TMXtudLoVeOnbdaxb1bv5iO0S4UbbBTZaxbVNsFhNBPNS4F/t33e7t+MQOb/nozDef9LJWK0dbZoF6Wu+1MSwhhYW1qwn4/kirj52yOiWXnTPRZKtxJMhhlWtiVU7l6vP+CqztkHDWEo3FdYEA15qumKVYljKXiCxJ/xVb9KrMLpcW/vhSKxfrCaxFBIpkpp15weeWc61093kMAFIZn7uL8l/MLaPPZEKbjwSJ3PErb7jEELRaq+GmzHbuzARZZ/NvmAXlGOYhZUsN7Ln2tbUXBiMV/bD+VTLiT4FxZF5kdQZFZyprDhWqvaSCAsPFOokjwOIAFlUc4gvV6ygx+1zLP6eufGWrK4TiAJdOCTYnR0Rq4MPSZQzhj0mDH0aqxwIen4vx87G0uhWYAZZ4TSvKSyYz+gwD+wlXzJYrrDYuyjNaFwLW3dVa8LygBtr3noH7jla6iCFNbE+/0PyrS6vQ8PgyGEMC0eL0SK046BOxwg81HKu88/w81EAUg -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Simple Testset From File"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/{testset_id}/upload"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Simple Testset From File - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-simple-testset.api.mdx b/docs/docs/reference/api/edit-simple-testset.api.mdx deleted file mode 100644 index 8c5f9fc4eb..0000000000 --- a/docs/docs/reference/api/edit-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-simple-testset -title: "Edit Simple Testset" -description: "Edit Simple Testset" -sidebar_label: "Edit Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWltvGjkU/ivoPLXSEAi5tfO0aZMq2bbbKCH7sAghMzbg7txqe7Jl0fz31bE9dyCEEm1TkYcm9ZyLz+fjc5MXoMhUgjuAPpNKMiVh6EAUM0EUj8JrCi4wytVI8iD22UgZKnAgJoIETDGB3AsIScDABft9xCk4wENwISZqBg4I9i3hglFwlUiYA9KbsYCAuwA1j5FTKsHDKTgwiURAFLiQJFqK4spHArvB1jWFNB0aiUyqdxGdo5i6Ai8KFQsVfiJx7HNPG9T5KqMQ1wr9sUBzFWdS78Ya2Pgw8TVQCyDh/MtE21wlmBGp4fGIZDVCa+I4inxGQkidfClMfB/QmszKKyJb/VxK6hixgng/KtOISFMnI4vGX5mnmgB/0IY25aUOBEyR6i4IpRxxJf5NBYzGPu3xlsTyULEpE1VNwbi6UjZvuS7wuPASn4hXHxLf/11GYfs6jBP1GuqWogyuWLAZExGCzNfCWmWFBrLreD8jksjRcKqfCdE/ok9cqscwXWVjnftpCPWNF9rAspH9zR0gb+oAZdITPEZTtxV1URKROsDpOkH1ILZOMIYzByip36xmWMKQMOK05g3Wox/fwuaOncWf1jXVR7AiquWal0bQ0e4gKkd+B3Yr+y6X6wlGFKMjojaUTYlibcW1i61W8N6IbZ1r/09i+hxK7o1Yq4Qynz2Dkgsj1irJ4BrPd3gaGVjv5vZQMrx2qiVDK9eSAbZTLRlcuZZdx4wlFcnGyWNJ2ZAFweGTwnRWLewz2aOZbF897bp6ambNPaLbIXqBSD7WHGANsFUhsVHfccseuORRaLbSbD/WSLjTzamVc0m5Wqqv6BAHeZs3XCPk1jSYkKYoTTAZR6EtgnrdLv6q1JVwl3gek3KS+K1bSwxb96FelBimmneWcqWmwOQ1IYmvwO3aUs22r6tKyX0j+2JC8ZdEbRE5GlxPCB2G9xfvZdfBukEJsA1GP3c3u2999q3Ps7Y+0k+m2/rqHfLuRy77kcs+7uzjzn7k8hJHLv9jwbWv9J+h0n8hc5eXAeovNHr5Ed58ZGLGLce9XnPC8ifxOdXzk9alEJHYfrxCmSLcx79WlFR+5FW+PsWRh/WDKkz+FJkN6tAkp8uKyOKySUmmpVNfTarBaPXx62ODL7TLqLZ0JZ8p4DXorjbjwsC37nCv+v2bhkBzttVDxVFby7hCq58/LwmYmkX4+gTvk2NekbjQiQV74OyfjnmO0rGFr+wsihI4BSxYxUP2MiURPrgwUyqWbqfj+VFCD8iUhYocEN4hMdf3RjIvEVzNNcv5zfVHNr9ihDIB7mBYJrhDjzI+UiXLj4fE/CNDtOybmPNEzSLB/zUHb5/FzAwXwoG+els8Zrn8TtC22mOUvPKoTefMY5fybA1XisRXlAn59KHwn+pB5MtYNcHRhLw5mZwet0/ODs/axyenvfb4aOK1e97b06PJ6SmZkFMoUkG1Wxpsxj6sNDqDaiOz6Q6eSl9uOqDX7R23u2ft3tv+4Yl7cuj23hx0zw7/gmrfsI6uXPqvo6tV75tut1aOb3wu1fp6U7an0GYuWXGxwu2sZ6SYA7AUDyeRdhQbH871FWyd31yDA3hZjRN2Dw4Pug3XrBBjyCeevhXZDdOfEazKXc9vOTjAAh3vQTES/FZ8wJ3FkVQBCUvyloek2tzN3nbFvqtO7BOuY7rewMKGqwHYcIVeqqVBPqGX4IBbcvehA7NIKmRaLMZEsnvhpykuf0uYwLA0dOCBCE7GCN9gAZRL/JuCOyG+ZI395ZkRXt3aBPC6VVQ11X1noSvEuPVA/AT/Bw78zebVV306uc2yyLiwBO+NrrZOQYWARkbGbGk4zj2PxWot7bCUBW7u++DA2L71CyKKLIIgsviv3mukTddBUq8twCfhNMEc6oIRiT//AcYO4Io= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/simple/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-testset-revision.api.mdx b/docs/docs/reference/api/edit-testset-revision.api.mdx deleted file mode 100644 index 92da00c7cc..0000000000 --- a/docs/docs/reference/api/edit-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-testset-revision -title: "Edit Testset Revision" -description: "Edit Testset Revision" -sidebar_label: "Edit Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWd9v2zgM/lcCPm2A03Rd19356bp1Q3vbbkWb7qUICsaWE+0Uy5PkbrnA//uBkuzEdn41S4HdoX1YO5v8SH6iKJqagcGRhvAW+kwbzYyGQQAyYwoNl+lFDCGwmJs7417fKXbPNZcpBJChwgkzTJH+DFKcMAihKXjHYwiApxBChmYMASj2LeeKxRAalbMAdDRmE4RwBmaaEYQ2iqcjCCCRaoIGQshzi2K4ESTgfe1ceRudixiKYuCgmTZvZDwlvKalSKaGpYZeYZYJHtkge1+1TOnZ3JFMEQWGM23dasbekkiEZXEGmE4/J5aOusAYtaUwQs0agj7ooZSCYQpFUD1KcyGAwirjPkfd6VcoReBgFUY/i+kgiiIoxeTwK4tMm/L3NtA2XhHAhBmse4FxzIlgFJc1Mlp++gVfgOWpYSOm6pYmw/qTxfCW24KIqygXqJ69z4X4U8u0e5FmuXkOzUgJgxs22U4JlcLpWlrrqtBidp3uJ2KSNFpJ9Ssx+pf8yLXZxOmqGJvaD2Oo77LQ15yt4m97QLpFADHTkeKZ8Rt7F6izBYgiAB6vA2qWtXXAtq5t3JRlGXwXc7NUfl4Hb9vFbLAW78pVVCgKAlZMZzL1Jezo8JB+1fiD6zyKmNZJLjpXXhh2LryRzJ1SI4fnHr+1ErSICebCQHhI4S+p16sKcyl7j4pjau72t3blIfXFIdszKoD926njl/HsPw6Hj8rwBKN9Gjj1kKWF3Iyl2hu4Q6N9jmZtrVhAJdGu4bY+rNn1BGgPPq1xtHMd+uTVi+CpjfjvtBGfc7NDH9HSekAj4XT/553EOlq3aCV24ejX7iUixdCw+A7NXmvXWwfbObVk5Vn8GEZuHKw3EjPBHsHImYP1Rkq6htM9HlAlWW+m/ogq+dqrlZKtykpJ2F6tlHRVVu6ZavdI26frF69eBKBFPtoV5pp0994620MfN7V/dAze8bhR/nwR3+zC9qW8PHM7F7Eue7UlJ3lleXmn+lid3X6xryvcpwr2VMEetYLtu2Ys6cK37paWtMpl9Rs8qCspO+Sn1m2L1u3pm+ERvhnaR+cTqTuTekZkbvowpl5gp4Ziq2/ucqrnXGl/em+P8HPa1VjQjRSPj47aU8QvKHhsZ4Sdd0pJtfsIMWYGuaC/VrRVQka1tw9J5kFzseZBf5TOQVue9GhZI7lkAOREVotaMjp9ertpzktxOdNerjYyLOl17K4O48zRt255z/v9yxagW9v6otI4udO8ugNbvceSLhppVwXuljCEXkbjW/a95/te3SvHubo3W3LJWAC1sOq+vI7MlYAQxsZkOuz1IiHz+ABHLDV4gLyHGbc7SbMoV9xMrcrp5cUHNj1nGDMF4e1gUeCa8stlTF2sWizM+AdG3PmLUDd55P+4NPBXoGOnReRQ5l7N7yvf/cBJJtiq+8aqKWmMAN3F5uIAj57Mz8R5B1GNOOZpVV+f6jE1VPAywd9eJSfH3VevX7zuHr86OeoOXyZR9yj6/eRlcnKCCZ7YOHiaSOt1OXG1JHdOLy9g4esSDg9eHBy2bNaEaYtjZLd4yaF9DUFjNat1hADYxO5vMAwnf8xfkGeZ1GaC6QLeqhRszG38ihr2w/QygdzuYuvCzKfnLfj0hGrkru0G9CkKAYTLbsIHAYylNgQwmw1RsxslioIef8uZojQc+DuCIZF5O4OYa/o7hjBBoVnL16ouwrMrv/2fd+bnWj2GMlVTytN7FDn9DwL4m01XXN3bGjcut8TMS751Rru2Es2RWoWZiqbTOI0ilpm1soOFUnB504cAhv4efyJjUlFIdNO/1mlpObCbwj6bgcB0lNtRPDhI+vkX7rJIFA== -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/testsets/revisions/{testset_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset_revision":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-testset-variant.api.mdx b/docs/docs/reference/api/edit-testset-variant.api.mdx deleted file mode 100644 index a4343fd996..0000000000 --- a/docs/docs/reference/api/edit-testset-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: edit-testset-variant -title: "Edit Testset Variant" -description: "Edit Testset Variant" -sidebar_label: "Edit Testset Variant" -hide_title: true -hide_table_of_contents: true -api: eJztWG1v20YM/isGP7WAHKdJmm76tDRtkaztGiROvwRGQEuUfd3ppXenrJ6h/z7w7mRZUuy8LMW6YfmQOBL5kHzII+lbgsGZhvAKxqSNJqNhEkBekEIj8uw0hhAoFubauNfXN6gEZgYCKFBhSoYUqy8hw5QghI7ctYghAJFBCAWaOQSg6GspFMUQGlVSADqaU4oQLsEsCkbQRolsBgEkuUrRQAhlaVGMMJIFvKeDz87E4DSGqpo4ZNLmdR4vGK5rKMozQ5nhV1gUUkQ2wtEXnWf8rPGjUBy/EaStV53AewKJtAwuAbPFp8Ry0RaYo7b0RaipI+hDnua5JMygClaPslJK4KjqqE9QD8YrlCpwsAqjv4vpIKoqqMXy6ReKTJ/wdzbQPl4VQEoG215gHAvmF+VZi4yenz7da7AiMzQj1baUTttP1sO73RZEQkWlRPXsXSnlrzrPhqdZUZrn0I2UMYSh9H5KqBQuttLaVoUes9t0PzKTrNErqh+J0d/yD0KbuzjdFGNX+2EMjV0V+oZzr/j7HrBuFUBMOlKi4FAfC/VmDaIKQMTbgLpNbRuwbWt3HkrfBN/Gwtwq3nTBq14rm2xDO3fdFKqKYRXpIs98/9rb3eU/LfLgoowi0jop5eDcC8Ojm26Ul06pU8CNw8dWgjOYYCkNhLscfL9Xb2rKtejT5aseS5y3AFAZkWD0lAaOPKS38P/c+dfMnU+lecTg6Wk9YPI43f/46NlG6z1mz2M4+rGHT6QIDcXXaO7Zc2I0NDTC+rPZyrGDHRxZssoi/h5GLh2sNxKTpO9g5I2D9UZquqaLJ+zSNVmvF75P13w9qZWarZWVmrAntVLTtbKiZTl7bK1esO4/tyHdNkDurbzaaNw2dLC311+APqMUsV1vBm+VytXjt5+YDArJn/xw6ArIPGq9fUgfnlSdedLE/CF3DnKWUj277Tt5Myu0xhk1zXOzqCVjMOa3dy2oHJcz7eXWkt3Q69jdHMYbR9+27J6Mx2c9QJfbdlJ5Ex50LhzA7h3znO9GeIAE7mojhFGh6EbQHyO/XOqRX0T1aNm/F6kgAE3qpr5AKZWEEObGFDocjSKZl/EOzigzuINihIWwta8pKpUwC6tydHb6nhYnhDEpCK8m6wIXXFyuXNpiq0xhId4TE+evbo5KM8+V+NPVgL+1mTstZobL9ry5Y3n7DdNC0oY7ktV22tlC3V3M+g7JT5pVrtk/VlO2Kal2blaPuaPAfoI/vUwOD4YvX714NTx4ebg3nO4n0XAv+vlwPzk8xAQPbRgiS3LrdL1WW44HR2enEABnw6Hv7rzY2e3ZbAnz8cbIhltTaF9D0EnmKo0QAKX2bIMhTH9pXrBnRa5Nitka3oby62wOPp+GvplRIVHYA2w9WPrSvAJfmrD6kqQ5Wl+eEEB4y8XdJIB5rg2rL5dT1HSpZFXx468lKS7BiceYMpNXS4iF5s8xhAlKTT1PVw0Rnp37c/980Oxv7QjqMs0W1lVZ8n8QwO+0uP2i0fa2eX0all7w2Nkc2g7UAPUaMjdLp3EURVSYrbKTtR5wdjmGAKb+2jHNY1ZRyFzzb+tzbimwB8I+W4LEbFZyCw3BQfLPXwLwZ4c= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Testset Variant"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/testsets/variants/{testset_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Edit Testset Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset_variant":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/edit-testset.api.mdx b/docs/docs/reference/api/edit-testset.api.mdx index 55451e23a7..173da76fb5 100644 --- a/docs/docs/reference/api/edit-testset.api.mdx +++ b/docs/docs/reference/api/edit-testset.api.mdx @@ -5,67 +5,1356 @@ description: "Edit Testset" sidebar_label: "Edit Testset" hide_title: true hide_table_of_contents: true -api: eJztWG1v2zYQ/ivGfWoBOU7z1k2f5iYpkrVbg8TZl8AIztLZZkeJKkll9Qz99+FIWbKkxEm8FOuG+UPskPf63OnhiUuwODMQ3sCIjDVkDYwDUBlptEKl5zGEQLGwt9ZvQwAZakzIkma1JaSYEIRQ7t+KGAIQKYSQoZ1DAJq+5EJTDKHVOQVgojklCOES7CJjTWO1SGcQwFTpBC2EkOfOihVWskAZWe88hqIYe4tk7DsVL9hM20GkUkup5S3MMikil8ngs1Epr9X+M815WkHGRVMm2NmYSofQEjBdfJq6nJsCczQOnggNtQTLFCdKScIUiqBaSnMpgbNZZXmGpjeqrBSBN6sx+rs2vYmiCFZiavKZItsF+L1LtGuvCCAhi80oMI4F44ryogFGJ86yvGtmRWppRrrpKZk0V9bTu98XREJHuUT96n0u5c9Gpf3zNMvta2hnyjaEpeRpSqg1LjbC2lSFDrKbdH9hJFmj01TfE6K/qo/C2McwfSjHtvbzEBr5LiyJ5Un5dyNg3SKAmEykRcapbmvqZM1EEYCINxlqk9gmw47OHn0oT2Nh75Wrae+m4q7xveqXni+hKNiOJpOptGSqvd1d/mrABFd5FJEx01z2Lkth2JpWI5V7pVar1pEeOwmu1RRzaSHc5WxrNn6Idv/n5X8NL3/K7RbE3NF6BjN73f84NW+C9QncvA1G3zc5R5rQUnyL9okkHaOlvhUunoe9HHuzvaEDK8/ib+Hk2pstncQk6Rs4OfFmSycruCaL25c71lZgvVu4gb3G60W9rNCqvKwAe1EvK7gqL0bms2179Yp1/4EJ4r6T43Gt6uT3U8PB3l53UPgNpYjdGNA71Vrp7aeEmCwKyb/K46AtIFXU2H0O846L1glSJ/tR+QC5LomZ3fdWWp8OxuCMarp8WNSB0Rvx7mOTG+flXZdya+Wt4fXoPpzGiYdvU1nPRqOLjkFf22ZReWLsjaq3/YTsXPEtAB8VgX+pD2GQaboT9MegnNPMYFlfABQQgCF9t7ohyLWEEObWZiYcDCKp8ngHZ5Ra3EExwEy4pjYU5VrYhVMZXpx/oMUZYUwawpvxusAV95DviqZYVRDMxAdifMq7iWFu50qLP32py+uJuddiALg7L+tLhdOvmGSSWpcC1bjZGiv9pcP6UMgr9WxWDxTVsVl3TBP6apkpAvan+MPh9Oigf/j2zdv+weHRXn+yP436e9GPR/vToyOc4pELX6RT5YItSz102PaGF+cQAFfBW9/debOz2/HZEOanFyOX7go6tw1Bq4hV+SAAStyjC5Yw+ane4MgyZWyC6Zq9Vne1RoCyfpa+2kEmUbjn0nlelp13A2XnQfWOYCCAcO36aRzAXBnLssvlBA1da1kUvPwlJ839NQ7gDrXACcN1s4RYGP4dQzhFaagTVkVq8OqyfHZf9+qpqxnuqgdTbsA7lDn/BwH8TovmNZnjpfmqxZelwLH31XfsURvokCkTndcYRhFldqPseO05vrgeQQCT8vIsUTGraGRA+a+LVbnUXbe7tSVITGc5018I3iR//gKH5uxq +api: eJy1V1lvGzcQ/ivCPCXAyjpsKe0+VT6KuOlh2HIfKggGtTuSmHCXG5LrRhX2vxdDUtrLshXD8YMskXN+/GY43IJhKw3hDKaojUajYR6AzFAxw2V6HUMIGHPzYNw2BJAxxRI0qEhtCylLEELw+w88hgB4CiFkzKwhAIVfc64whtCoHAPQ0RoTBuEWWLr5a2ltmE1GNrRRPF1BAEupEmYghDznMRRBU6KYB2C4EbTk4+5cx1DQOvlDbc5lvCEnTfeRTA2mxvrPMsEjm2fvs5YprZXRZYpQMBw1/dql39pw6R9OphJ8mgtRC/1P0i0CiFFHimcUyGtNXVZMFAFECpnB+IGZI4GOmcGu4Taew14unNnOxJCTPIt/hJN7Z9Y7iVHgD3By6cx6Jzu4Fhvi7+uoeRCs843lZonXm3rZobX3sgPsTb3s4Np70SJfvZard6RbBPB24bmYqEYjpl1dtswypdjmWSvTvX4RQIKGxcw0GhWLY041xsRNrQscAQNPDa5Q1SNIFvWVhZQCWWqXnvYFEVdRLph692suxG9apt3rNMvNewh2RuTiM0bG2uAGk+OUXoanrmoBb/k7pPvHDs2ipdbq5E/KlG18tu/F7Uvg1vV+KAqyoVBnMvV8GPb79K/WauEujyLUepmLzq0XhldfEZHMnVLjwCsdwUp4pvrbpMWcw7C08H0JKBfRUzD5XB1OZ8NhG5q/meCxTbxzpZRUr8clRsO4oG+ejU0BIaPa7vcU07xoMLhM9nfpArTVrFeVk9l3mJKeWrMVlpw+LGrB6Exp9yX4KS/n2stVTqKE16F7OI1LB99zhfNxOr1pGXRnWz/Uq5ibznQ/ySVo1pImPKrnwA1sIfQyhY8c/+15lurethzuCghAo3rcTX+5EhDC2phMh71eJGQen7AVpoadMN5jGYdmDBO727kgUdsjNEa54mZj7U1urj/h5iOyGBWEs3lV4I4I5ihTFyt7fMY/IYHnh9JJbtZS8f8cD/xcunZahA5R97acF6++sSQT2Jj3vK09E+rp7JerIxcM+8NRtz/qDkbTwWnYH4Sjs5P+aPAP1Kem5+Sqg89zco3ZBU6X7KfRcnzWHX0YfOiejcbD7uJ0GXWH0c/j0+V4zJZsDK1h5Fi1xnRxrJobF0qwvke3cq3PtsSHytVsOc7TpbRn5svBM+ycRV8wpecIsdWdVv9kcNI/REmv0JncXPtux6IqA5wYYVcj/Z7uEAAmttWBQZb8Um5QlJnUJmFpxV6jGhuvAE9pg99MLxOM2z5mPW99pc7AVyrsbxQNAYSVp9g8gLXUhmS32wXTeK9EUdDy1xwVldw8gEemOFsQdLMtxFzT9xjCJRMaW2HtLwF4d+t73ftOOUbUw92VZUo1+chETr8ggC+4qT8ZbR9f76p+6wUunK+u7balgdblQxeD05hEEWbmWdl5pe/d3E8hgIV/KiYyJhXFCFD6tLFKm7rtOnZtC4Klq5yuixCcSfr7H+CZIWE= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Testset"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Testset"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/testsets/{testset_id}"}></MethodEndpoint> Edit Testset -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"testset":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"}},"type":"object","required":["testset"],"title":"TestsetEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>testset</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-trace.api.mdx b/docs/docs/reference/api/edit-trace.api.mdx index 31793a031e..465aa50082 100644 --- a/docs/docs/reference/api/edit-trace.api.mdx +++ b/docs/docs/reference/api/edit-trace.api.mdx @@ -5,67 +5,898 @@ description: "Edit Trace" sidebar_label: "Edit Trace" hide_title: true hide_table_of_contents: true -api: eJztXFtT47gS/iupftqpcggwA7Obp5MFT00OM5BKwjycFEUptkK02LJXlpnJpvzft1ryRXZCbsPsYbbEAxBZrZa6v+6WP4GWIMlDAt0JjAXxGH+AOweimAoiWcT7PnSB+kzeS0E8Cg7ERJCQSipQZgmchBS6oJ7eMx8cYBy6EBM5BwcE/TNlgvrQlSKlDiTenIYEukuQixjlEilQpQOSyQAbcBK01fchy+60PE3k75G/QKHmcF7EJeUSH5E4Dpin5tz5I4k4tlXaYoErkowmqj0mXP1C+OJmppbBJA2T1Z6eoERS/57Ievfm7GeRCLEP+ETStmQhhcwpu/E0CACXUyzyQg/b6knIHEhj/0coudXD5kp8GtAfoORSD5srKcw1XSAUdtOTpszfyVi/LxQsKnu9qJbCWqWWwmAvqqUwV6mljJudQsJR0N3SfRQTnveOiaBcbpn/pvkO1AC1uequm8xBeRpiPmH8KdIRCQ4QziNZfEj5I4++crhrLHKMI63Op1j37qrJA6YFB7w5YajwayQeZ0H0Fc1Ekkf8EUUBCoRT6vta+M+UigU4EAQhikZhHNB8wt6cSJXOBOGP6xeAZt8y/0fGtyCpmP9o0Lu+v+pfX97fXo8G7kX/Q9+9BMdo71+P3eF171OtceQOv7jDWtPFp757Pa41DYY3l7cXzX4316Pbz+7QXNLNmAa4rCuc9/PL0iXgMIApsF4TlWUgkUTIe5VzviNHMS7pAxWb1aKm1lhLAuX+P6LV5X6pM5FEpsm9F/k7Qno07o1vR/cXN5cugsJVPjXabq4aDe5weLPqTqX2ArWud6ieVkiThDwc7lU1SutzPkrmAJFSsGkqaaPuEt9nGGMkGNQK7w5a11o8nNZbplEUUMJV03pd4DHhpQERv3xIg+C/ScTbfR6n8g0mCT1INP2DelKNke8TdhAiQpDFRivVRVWGXdH3nGyvsmeGeWlGBeVe03bP7GqeqEiY3iId4t0vuTjCJUgfDgYJymYOvFx11WXKQu3HQW1FsJ5dhgUODQ3bJzes0Js5EDD+uBuM99sL7bvTsjD6R2FUvdpNSscaTmuUsU+MP+6FsU8KVZkDc5LMd0yTNjH91Igy8fKRJPO98PJRwwQ3h988GsuVcmmddpjT3NKcaNsnyuVuwVi8ZDyXuot3CNyXJ5KE8Yts5s0X1HJgG8r/z+KggGD6uVEaXMTUXrHuahRuU2xQnEWBaqj+EBCJO469tI8UGVlsUHbE01Y+czsQv3uICjQFT/AG1kHKeNqwyt1eGCkNZUlZS8paUtaSspaUtaSsJWUtKfsqd7GWlLXcx+vgPiwpa2FkSVmbmF4Foiwp+xqdZklZi4p/KymbE7IbNyyW+bTMp2U+LfNpmU/LfFrm0zKfdqtomU9LMLx+qFnm08LIMp82Mf0MiLLM52t0mmU+LSr+5cznS1CPW/KZ6jUWlO5n5rH+i9dto+f3Egz1XQCQZZl6x0jiiCcaz6fHp/jDp4knWJ4dYZR6Hk2SWRq0hnlnOPjKAC9KtVAjPAxeUPVAom5G0kBC99juHg9LEDepPCBDrEjtkSK07E+4gdwSOapXCX4dOO9O18TKFxIwX0VCyxUiEocHik8lYYHar64HehB5taf7QO2uaSLDIAW3mzkQJg+bAsPggQoK97muyhgtzaNucTKuS6vO+5kURWlebd3nl3GpzbfJsR/H48HKgNq3dae6PpOtcX5tS0jlPMLLXBDojr6fpQudWNAnRr92pM6xHf1PCJ1lAdQMywsVT8V1L6kIoAtzKeOk2+l4QZT6R4rdJkeEdUjMFEoT6qWCyYUS6Q36V3TxkRKfCuhO7swOI0SRxkW9W+kSErMrihbKL5rppXIeCfZXwd2r22bmWgpNgPgcVrfGuN8I8ubGQd+kfqsL1o537eP37dPfxidn3bOT7umvR8fvT/4H9ZOwTf3Mw6xN/RrnUfB2Rn49m52/a5+9P3nffnd2ftqevp157VPvt/O3s/NzMiPnsHLAtKtY48RoV7GqtFThUBanqsk4yzHCxjiSqZ+3GAcm5WmIcQjx7AmDwegb0zGI+U32roj0Tb1q1PdaXrvJQlczqdXVBvM5MZhNY+6Koqw+7+OaujaMo3x/MVmuc9E6T64OUTAQk+V3zsV8MzVepqo7oozsWr4UbXJMU4Wqf8U/SWGsMz6LVKooSrJKRK3eoA+OYfvjo5OjY2hmx1pnLHbEk9WbXf4Yo6+W8cpcpw7rVKUDSUn4n+oBziyOEhkSboxXS8a1mZSpTtJvshMHeESY5XqXeaKeQJ6oc7caDk7Aweuwqn3FPEokSiyXU5LQWxFkGTbr48Tu5M6BJyIYmaLJJkvwWYK/+9CdkSChK5Mr9wHwyzAvd29a1S6rPukiwjlm7CcSpPgJHHikC/OSMFXI50VFWOaPL7Smtiq3lfjK7gN3Blqi5yHkNva9M0rf4BajeZpfJhbqgBcEjYrf1UwjtXBVkVTbEgLCH1Id93pI/PobRxQo7Q== +api: eJztWllzGjkQ/itUP+1WDcYXzi5PS/CkwtoBCoY8LEVRYkYYxXNF0njDUvz3rZbm0Iy57Di7eSAPDtXT6m59fak1swZJHgS0JuBw4rLwAaYWRDHlRLIo7HrQAuoxOZOcuBQs4PRrQoV8H3kraK3BjUJJQ4k/SRz7zFXLGl9EFCJNuEsaEPwVcxQqGRWKHpNQ/SDhqr+A1mQNchVTaAHhnKxgY+WEMPF92EwtkEz6SBiptRsLlEkVKcTzGFpA/EFJ4UH1uxYWHN8tAlzG3cQn/Je+Q33cxq9grYFJGghobX1aQWW6ySnR/At15XFAuZwSSb0ZkVshF5Kj3y1YRDxAHvCIpHXJArpXfkeLrbXRDEhi70coGWuxqRKP+vQHKLnVYlMlGVzz1Yx5R+pJEuYdBdb7Va3rmXi9qZYMrVxLBtibasngyrWoTEwVVMVmi7C80JQfk+cAOwZvyh0TTkN5wP599g6UAFP3IwsPoEHDJMCcHQ3avdldt3c7G/dGA7vT/dC1b8Ey6N2eYw977fsScWQPP9vDEqlz37V7Tok0GPZvx50qX783Gn+yh2DsICsJd2j3861m2wpJQF8LkgK8R1SmgJCEy5nKm+/IMxZK+kD5frWoqebolUBD7z/RaoderlNIIhMxcyPvgNo8JJy2Mx7NOv1bG4PCVj41aP27CsEeDvvP3anUdlDrdodqswIqBHl4vVeVlNqnVMrGAiIlZ/NEHts5j9C6FfFgXqbMo8inJFSk7bqKDvgh8f0/RRTWu2GcSKMPGl3vWdvcuejwkaK8FF7UZdsFnhjATzSUFdxSS6sniCxZd1XALBcxvoUkQfwmSWFY7uSCT2HxQ8Pi2UJ9jGacelhPVCCYfq5UChtjytB+2HBbR+HGAp+Fj8eF48t68ks7/im8/rfwyhxrOK0SYPcsfHxRfN2rqDqkOFdXHPi2HGlMWE9D1mnIOg1ZpyHrNGSdhqzTkHU67pyGrFNYnIas05D184fXzz9kvcWUs8WWqibhcEpfBrOj3+Mdkp6+nxzqF5CwQf4CCckTqggijkKh4/vy/BL/86hwOYsxKnErietSIRaJXxumzGC99j3mE+WCaZZdCfo5ZcGZJ0q0ikpyGQOM4theUt44cDLTM7O2hKvIAdootK8vt+D5mfjMU2jVbM4j/nowPSoJ8/HXjurpR27p6Uvq17SaAQZekTYQcQ/Ewz5nGkc8zbKbVYFRc/DpIVfgvrTqlM/wRQGvRnf3Nm41fPvS6KPjDJ4J1L4tO9X2mKw56Sv/gMplhB8CYAHFSVEuoQWNmNMnRv9uSJ2XDf06voGFiHKMLuWZhPvQgqWUsWg1Gq4fJd4ZeaChJGeENUjMoKq7rZ7WOsiq4lpQN+FMrpS89qB7R1cfKfEoh9ZkajKMMLB0qJTZiuSJ2R1F0PS5ENqJXEac/aP9bwFDA5Z6FaKCITssvniwv5Eg9qlxNTVZly5+sOQ06+fN+kXTubhqnV+0mtdn59fNv6B8d7OPz7x+2cdXuUGBqwX5rbm4ua433128q183by7r86uFW790f7+5WtzckAW5gWdXIscuq9xxHLusOMIUGZIfggqScftQ4dOXCDtvCIyJ3FhoDNb7ECwG4X1cpdF161xanSILS0onMmNymWSTiVk38glknzVliRj9aauYrLcBuw3/qgjVO7JvaTDqWbiIVNJk5yCdke+J+0hDPGnkbQ/Ozy7OznelcLqg1h50065AXFlMZSkbxmSpSOTlAV0UqJYAkpLgj+IBWhlHQgYkNOSVqlbJorwASPpNNmKfMFXtld51WtEmkFa0FDYDQAEWYFFeRkIi43o9J4KOub/ZIPlrQjlWp6kFT4QzMkfUJthxllmdWsMjXakGr1pjXfUFZPcTXZcqbRJbmF7Rdl0ay728U6NGD8YYkfP086xABy0nuCn82wLAz7twsaqTirYGn4QPiY5dLRL//QtjpNE+ sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Trace"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/tracing/traces/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Trace"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/tracing/traces/"}></MethodEndpoint> Edit Trace -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, + `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "version": "string",\n "count": 0,\n "links": [\n null\n ]\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-workflow-revision.api.mdx b/docs/docs/reference/api/edit-workflow-revision.api.mdx index 25e207207e..52975ed3be 100644 --- a/docs/docs/reference/api/edit-workflow-revision.api.mdx +++ b/docs/docs/reference/api/edit-workflow-revision.api.mdx @@ -5,67 +5,3454 @@ description: "Edit Workflow Revision" sidebar_label: "Edit Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJztWd9v2zgM/lcCPm2A03Td1t356bq2w3r7VXTt7qEICsaWE22y5Ulyu1zg//1ASXbiOMmSLAWCu9vDttjkR/EjRdHUBAwONYS38JdU3xIhHzT0A5A5U2i4zC5iCIHF3Nw9+Pd3it1zzWUGAeSoMGWGKUKYQIYpgxBaknc8hgB4BiHkaEYQgGLfC65YDKFRBQtARyOWIoQTMOOcMLRRPBtCAIlUKRoIoSgsiuFGkEC13M6VN9K5iKEs+w6bafNaxmMCnDcVycywzNArzHPBI+tn76uWGT2briRXxILhTNOvtvstkURYKieA2fhTYhlpCnB9FxXayLQp5F0eSCkYZlAG9aOsEALIp8rrC905dQhlQHDsHkWBRqpfQTyvQRzoqEgx+xXAtxagLINKSA6+ssgsiN4bS1kbrgwgZQabi8A45hQrFJcNWlvL9MkzA8szw4ZMNS2lg+aTWe8W24KIq6gQqJ68KYT4U8use5HlhXkK864SBjcsXU8JlcLxSlabqtCidpXuB2KSNFrpuU+MfpTvuTY/43SZj/PamzF07bLQF7C1/G+vgHTLAGKmI8Vz40vENlBnMxC0JeNVQPMlcuXejNfalVVJPY+5Wagwram3CwpjfzXilavPUJYErZjOZaZd3h0dHtI/DQrhcxFFTOukEJ0rLwxbl/FIFk5pLo2nSz61EhTHBAthIDwsg8XVf1mZr4XvUXHMzN3uAlifel8ctD30Ati9oSZ+7dEjeOIsoDI8wWiXLpx4yMpCYUZLzsltwB0a7Xc0K2vGDCqJdg23dWLF7idAewBqjcOt69EHr14G/zcm/8XG5FNhtuhMWlobtCZO91/em6yidY3mZBuO9rs7iRRDw+I7NDutgqcOtnNiySry+DGM3DhYbyRmgj2CkTMH641UdA3GOzzqKrJej/1hV/G1UysVW7WVirCdWqnoqq3cM9XuuNZP1y9evQxAi2K4Lcxn0t15M27bB1x1NO/O+0LxbVFuFHcIYnsEQQgjhrGdFm1W6R+Lkv1LiBWtyRVLmGJZ1Kg21UL7G50ob30Yymrytm5E9uhM3stGZ4MYfPbEU0eJec6zdRugeYo36bYqQzbwdIhvnf1Ou2zOgPe1f9vLXFmufDmllALF1D2P2Drsugn3BjnooUs7T0n4sHBT/8ewddowsMkY6gztN0LrU2wDiF9Ur+dObmb14uioPab6goLH1rnOuVJSbT+jiplBbk9an5LzAkJGjbebbKmZg8Jl8dTr9zLCqqtP9XDRbcyC4YITWS5qyehc09ufjRLJL2fayzUGUhW9jt3lbpw5+lbF9+319WUL0MW2GVSaV3ZaV01ghwAjSXdjtLkDd60VQi+n+SB76FUDM92rBoa6N1l0L1aC2+DVFZptsWBkTK7DXi8SsogPcMgygwfIe5hzu6c0iwrFzdiqnFxevGNjd6RDeNufFbCHjEuaplgdL8z5O0b0+cs7N9jif7tM8Ld2rm2zlFLyXk1v2M5/YJoLtvSGrB49zYyYXOVoDonqZ37GQ7+ns5bpgKD+DJ4mWjNi9WPqy+B5gr+9TI5fdF++evaq++Ll8VF38DyJukfR78fPk+NjTPDYusWzRFpWqvme5bxzcnkBM18gcHjw7OCwZbMhTJseI7vpK0rtawjmgluHFQJgqd3xYBimf0xf0MpyqY0fe3m8pUk593HvI2zYD9PLBfJspod3CXsLPmFhOuPVdlP6pIUAwoXXuf0ARlIbgphMBqjZjRJlSY+/F0xRYvb9WHpAfN5OIOaa/h9DmKDQrLXauljCkytfE552pkdu04sqeTPKXMoi+gUBfGPjZRfQtvKNql0y8aKnzmrX1qcpVKtcUyl1GidRxHKzUrY/Ux8ub64hgIG/jE5lTCoKiXH6265aWhLsNrHPJiAwGxZ2+AsOkv78A7rD5xY= +api: eJztWdtu2zgQ/RVjnlpAjh0nTnf1tG7TotnuJUjTLrCBEYylkc2WErUkldZr6N8XvOhmO66TusA+pA+pRM2cGR4OqTPyCjTOFYQ38JeQnxMuviiYBiBykqiZyC5iCIFipm+/+Oe3ku6YYiKDAHKUmJImaRBWkGFKEEJlcMtiCIBlEEKOegEBSPqnYJJiCLUsKAAVLShFCFegl7lxVVqybA4BJEKmqCGEorAommluDK48du8ihrKcOkhS+qWIlwZnPUIkMk2ZNo8wzzmL7KwGn5TIzFiTQC7NnDUj5WD8HDeeYKEXQtqrbPlnYue9O/kyqC2ygnMwWVfTmTi0MoAYNe2Jakz7mqW0E/rcAJYBpKQUzndi74L53buXgV/ex8H8gTZdiElFkuXac/sYqPMWRBlAJAk1xbeoD0rfKwfbm2gTpMjjHxHkg4P1QWLi9AOCnDtYH6Sia7Y02/NAZVyR9XJp92XD10GjVGzVUSrCDhqloquOckdSfUe5fvTuZQCKF/PHwrw3vmUAh5uom13C7fm/BVLMPlGkW2dv9YZ4Y102oe1hozFGjV1AjGNmtivyy+5Z+m0eWKZpTrIbLZ11R2ZCcMLMDm2PBRGTUcFRPntTcP6rEln/IssL/dxMrzNdg8E0pfs5oZS43Mly19Uwvhnv/rPXs+neD/iwZTp3nltWCaVmCUb6gLtm4iH9nqki7Jdx5bw92zuUDLNDJvvRIVb72909jFwPsS3jjSXe9K5UDGwzbiTMTaNDpveDXDkFBGVp0CSpXGTKbbDRcGj+67x04X0RRaRUUvDelTeGRwulSBTOaW2/tt4N1sJm1miq/YluqNqL6TZ5LredzPnpO+pOR6NNtj4iZ7HlovdaSiEfT1VMGhk3V/58WTfgIuo8fcjxOC3XzqRm1r8Jl6AVg2q+TW1vEXvO5H5TS0bv2jz91jqYebnQ3q6zFSt6Hbv3T+Pc0bdre729vr7cAHRr213U1zHTvaoaeldNQ5OSXgjT8pizOnBtSwiD3NQufRnMUNGgaoTUoKpoNVi1ep4SAlAk76quqJAcQlhonatwMIi4KOIjnFOm8QjZAHMG6+lN7NPeK2NqDy5FUSGZXlq8yeXFO1q+JYxJQngzbRu8N7XnqqlrVi8k5uwdGV59s+Y6EPavKxHfri2clyHOVPVV02O9/oppzmm9R6q6IjhJ8KdxcnbaH784ftE/HZ+N+rOTJOqPop/PTpKzM0zwDKpuB0bD0bg/HPePx9fHJ+HwOByfHg3Hw7+h1bY0peczru+7pNXD7YZgV4S2pt9l15blu+zWlPW+VKxJ5b0Z7Grffd1qMdvw5VRpc/8QuFo9MnUbFUqLtGq8mbqlO+QFalMX9diiSDFz91252JI4ZvOwiNxgJLKEzQv3NcIMreuXfVNtS5KnSvr+SjpE2ayVwJrY27umGwH3tLD/j4U9yHnwtM2fqqE+GqyKY1kirJapGkcnlF5i9JmyuPN6Gx4dHw3vU1beoTe5vPB6vlsxzsxw3dFutWqDACi1Yh40YfpL88BkmQul7TxqvHv15trnUK/RNH3Vg5wjs5rd5rDyWvQGvBaFAIwahQBqPQpNj2Wuw/Z3+GkAC6G0AVitjOMHycvSDP9TkDTCcuoP0plh9mYFMVPmOoYwQa5oI9e6C4JnV17sP+81X0a6c6jEZ7a05zUvzB0E8JmWaz8Y2E5mUYnblbd45YL1bb/RIGy0X6Y1ch6TKKJc77SdtvT+5Ydrw6j/FSEVsf0hAw3N5q9NVti5u98HzNgKOGbzwqlUB2n+/Qe0fzsc sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/workflows/revisions/{workflow_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Workflow Revision"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/base/workflows/revisions/{revision_id}"}></MethodEndpoint> Edit Workflow Revision -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow_revision":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowRevision"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-workflow-variant.api.mdx b/docs/docs/reference/api/edit-workflow-variant.api.mdx index 98c473da0f..5dc81c3d24 100644 --- a/docs/docs/reference/api/edit-workflow-variant.api.mdx +++ b/docs/docs/reference/api/edit-workflow-variant.api.mdx @@ -5,67 +5,1678 @@ description: "Edit Workflow Variant" sidebar_label: "Edit Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJztWN9T20gM/lcyempnHEIppXd+OkrpwLW9MkB7D0yGUex1su3a6+4PaC7j//1Gu2s7jpOUUjrXuTseILGlT6tPWkloAQanGuIr+FOqT5mQtxrGEciSKTRcFqcpxMBSbq5vw/vrG1QcCwMRlKgwZ4YpAlhAgTmDGFYFr3kKEfACYijRzCACxT5brlgKsVGWRaCTGcsR4gWYeUkQ2iheTCGCTKocDcRgrUMx3AgSqA87+OBtDE5TqKqxh2bavJDpnPBWLSWyMKww9ArLUvDEOTn6qGVBz9qDlIooMJxp+tbzvSeRCUfjArCYv8scHV0Brq8Tq43Mu0LB4YmUgmEBVdQ8KqwQQC7VPp/qwZFHqCKCYzcoLBqpvgfxuAHxoDObY/E9gCcOoKqiWkhOPrLErIndK0dZH66KIGcGu4fANOUUKhRnHVp7xwypswTLC8OmTHUt5ZPuk2Xv1tuChKvEClSPXlkhfteyGJ4WpTWPYdVVwuCG5XdTQqVwvpXVrir0qN2m+5aYJI1eev5MjP4h33BtvsbpJh9Xtb+NoUufhaF63cn//glIt4ogZTpRvCRX7wv1cgmCrmS6DWi1QG69m+mdbmUoqMcpN2vl24p61S+L46145742Q1URsGK6lIX2Sbe3u0t/OvzBhU0SpnVmxeA8CMO9S3girVdayeH2xEdOgoKYoRUG4t0qWlv5N5X4Rvbhgtb0OYpeBKgMzzAxD2jhMEAGC//3sf9gH3tnzT0aWU/rGzqZ1/2Xt7JttN6hl92Ho5+7mSWKoWHpNZo7Vq8UDRsa7s6z2cqRhx0cOrJsmf4II+89bDCSMsF+gJGXHjYYqemazB+w3tdkvZiHil/z9aBWarYaKzVhD2qlpquxooWd3jdXL0j3H5y41nWQu2s3A5Ifrvb39vrz1AcUPHXT0uBYKanuP0ylzCAXbhzw7WFVQMik8/ZbKvG4WukordNvpD8gxSnX03Ubg7ZbaI1T1pbPzaKOjMElvf3axEt+edNBbincLb2e3c1uvPT0bQvvyeXlWQ/Qx7YbVBqsB6vrEHCjx0zS8oZ6SOQ3LzGMSsVuOLsd1bOqHoXBVo8WaxY3FUSgmbqpVzxWCYhhZkyp49EoEdKmOzhlhcEd5CMsubsAmiVWcTN3Kodnp6/Z/IRhyhTEV+NlgQvKL58xXbEmWFjy14y4C8ulQ2tmUvG/fBqEtdLMaxE5lLnn7Q7o+AvmpWCbdjjNtLs01fpFUXcubZ6FsZK+t+NdO5M0nbdNsm60msdUZeBphr88yw72h8+eP3k+3H92sDecPM2S4V7y68HT7OAAMzxwXvEik46Uemh3lA8Oz04hAgqOR9/debKz27PZEaYLj4lzvmbUvYZoJbZNVCEClrvbDoZh/lv7gk5WSm3CpB3wNiXkyjgR4mvYFzMqBXJ3p90RFiFZryAkK7T/hmnyNyQsRBCv2zWOI5hJbQhgsZigZu+VqCp6/NkyRUk5DiATIvNqASnX9DmFOEOhWe+sTZWER+ehGDwetGNd14c6cYu5O6uw9A0i+MTmG5ajruLN6guyCJJH3ujQ1aUWqVemqYR6jcMkYaXZKjteKgxn7y8hgknYlOYyJRWFRDf9doeWjgN3RdyzBQgsppYKawwekn7+Bv7Op6k= +api: eJztWNtu20YQ/RVhnhKAsmTZclI+Vc4FcdOL4TgpUEMwRuRQ2mTJZXaXTlSB/17MLkmRkqXKhvNS1A8yuTvXw9mZQ67A4txAeAN/Kv0lkeqbgWkAKieNVqjsIoYQKBb29lu1f3uHWmBmIYAcNaZkSbOBFWSYEoRQ7d+KGAIQGYSQo11AAJq+FkJTDKHVBQVgogWlCOEK7DJnTWO1yOYQQKJ0ihZCKApnxQorWeCTN927iKEsp94iGXuu4iWb2XQQqcxSZnkL81yKyKU0+GxUxmtr/7nmhK0gw3d1glsbPsEVYLb8I3EpdwMvg2YlK6QEDrEO/XfWLQOIyURa5BzIY029bpkoA4g0oaX4Fu0+gy1QY7TUt8LFs9vLK2+2N7HspMjjH+HkozdbOYlJ0g9w8tqbrZzUcM2WXKGH+XFleAhY50tXm2u8ntRLjVbjpQbsSb3UcDVejCzmj63VD6xbBvB04fmYEuna1j0m1ewzRbbVNOrG9tapbJsuA0jJYowWuwYxjgUfMpSXnTZwAA4iszQn3fWWzrorM6UkYeaW7vcFkdBRIVE/e1tI+YtRWf8iywv7nNPrpMs2hKX0MCXUGpd7Ue6qMuLb/nbp/lajWQaA2ooEI/uE9TmpTFbVWXt4WDHURu6rh61kt9WrQQT3ya6n0E0zSqY7TVz5EQZlybY0mVxlxtfZaDjkf52JAR+KKCJjkkL2riphePSki1ThlTbKttXYnEQZtIfi4Sg3MB0Echs4H9k+2KrcPW6no9E2VJ9QitgB0XujtdKPxykmi0LyVXXGNgWkijq7D2kR03LjXK6T/lX5APkBpGZ+H1VaHzpjcE7rk7pb1IHRu+bdf3sMnJd3XclN22SshtejuzuN1x6+fQfr3fX15ZZB/2y7D/VNLGyvLobep4aLpmQXiskqt6vAU84QBrmmO0HfBjM0NKgprBlU1WwGqzVbLSEAQ/quprOFlhDCwtrchINBJFURH+GcMotHKAaYC9iMbeJ2e69Y1LUsQ1GhhV06e5PLi/e0fEcYk4bwZtoW+MCF50upK9Y8RczFe2JQK5Y9KexCafG3r4+KaC+8FqPGJX21psdvvmOaS9qgt5WtpkK66TTLbYYJo+Fo3B+O+8fj6+OTcHgcjk+Phqcv/4IuSdwn1+Z5++Q2qBqcJPhynJyd9scvjl/0T8dno/7sJIn6o+ins5Pk7AwTPIMt7nWo2gaZOlTNs6M1WA/RbViMMLdRYaxK61cXYW7pDmWBVunW2qJIMfP3XdqyOWoPjaA9Pf+vhv9MNbjGKbJEuQ5SEyffns4x+kIZv1Zzq/MPd3h0fDTc1c8qhd7k8qIaod2C8WIMdadjNr0SAqDUzU+whOnP6w2OMlfGujQae7ta/Marc9UYLX23g1yicFPShbCq2v8NVO0fAuABAAE0IwAaSsOXYeujxTSAhTKW1VcrVvuoZVny8teCNPfyaaU7Y1hvVhALw9cxhAlKQ1uRNqwDnl1Vw/V5b83GuxnU/T5buhBlwXcQwBdadj+uOOKwqMfJqhJ45X313XhfG9hiO8xEvMYkiii3e2Wnrfl6+fGa4aw+uaQqZhWNjDH/uliVS93VsltbgcRsXjA/CcGb5L9/AI59IyU= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/workflows/variants/{workflow_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Workflow Variant"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/base/workflows/variants/{variant_id}"}></MethodEndpoint> Edit Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow_variant":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>variant</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/edit-workflow.api.mdx b/docs/docs/reference/api/edit-workflow.api.mdx index b56a3b520c..cbc4d9d9ee 100644 --- a/docs/docs/reference/api/edit-workflow.api.mdx +++ b/docs/docs/reference/api/edit-workflow.api.mdx @@ -5,67 +5,895 @@ description: "Edit Workflow" sidebar_label: "Edit Workflow" hide_title: true hide_table_of_contents: true -api: eJztWG1z2zYM/is+fGrv5DhNUnfTp7lJevHarrm8rB9yvhwtQTZbSlRJKqnn03/fgdSLJTmu46a33rZ8SGISeEA8AEEYSzBspsG/gY9SfY6EvNcw8UCmqJjhMhmH4AOG3NzeF/vgQcoUi9GgIsUlJCxG8KEUuOUheMAT8CFlZg4eKPyScYUh+EZl6IEO5hgz8JdgFimpaqN4MgMPIqliZsCHLLMohhtBAuXheuMQ8nziIFGb1zJcEE7bQiATg4mhLZamggfWmcEnLRNaqw+QKnLVcNT0qfKxsxMJS9MSWLL4EFm3mwJc3waZNjJuChUOTqUUyBLIvWopyYQAcqX0cax7xw4h9wgO75jImJHqexBPKxAHOs9ilnwP4JkFyHOvFJLTTxiYNbF6YynrwuUexGhY8xAsDDmFiInzBq2dYxapsgLLE4MzVE1L8bS5surdelsQcBVkgqlnbzIhftcy6Y+TNDPPoe0qYXCD8XZKTCm22MhqUxU61G7SfU9MkkYnPX8mRv+Q77g23+L0IR/b2o9j6MplYVGltvK/ewLSzT0IUQeKp+TqrlAnKxB0JcNNQO2CuPFuhlvdytOQm7WCdQm9qevgZD3Ahau+kOeEpFCnMtEuvQ729+lPgym4zIIAtY4y0bsohGHnIh3IzCm1srU+6rGVoHBFLBMG/P3ca9T2h4r4/1X+P1jlP2RmhzLf0XpEnXe6//JCv4nWLSr9Lhz93KU+UMgMhrfMbFnyQ2awb7g9z8NWjh1sb2TJytLwRxi5drCFkRAF/gAjJw62MFLSNV3cPt0jWZL1emG/SdR8PamVkq3KSknYk1op6aqsaJHNds3VS9L9J/qRdU/HFmpVG+FakKODg27X8ScTPLQ9Re9UKal2bzlCNIwL2wC4B6EtIGTQ2H1M7Z3krTek9vaddAekyMR6tu4bc/0+aM1mWBfMh0UtGb0r2v1WI0h+OdOF3EqAa3oduw+7ceLo2xTXs6ur8w6gi20zqNR+9j7Ws4gYzVzSkIJeC89NHHwYpArvON4Pyq5PD5Yr84kcPNCo7soJRqYE+DA3JtX+YBAImYV7bIaJYXuMD1jKbWZrDDLFzcKqjM7Hb3FxhixEBf7NZFXgktLIJUZTrIoJS/lbJIqK2ckoM3Op+F8u2sX0ZO60iANK0It65HH6lcWpwPbIompfV9pUNw9pNprVWtEn0ue6X6ubjOoprXOoGYxqmcoGHEbsl5fR8Kj/8tWLV/2jl8OD/vQwCvoHwa/Dw2g4ZBEbWm94EklLRhH8kaW6NzofgwcUFIe+v/dib79jsyFM95kF9j6XTNpt8FoxraIJHmBsLzMYZPFv9QadLJXaFK1zgdfOt1ZfUMTT4FczSAXj9qpa08siF2+gyEWov4No8MBfnZdNPJhLbUh6uZwyjddK5Dktf8lQUcZNPLhjirMpMXazhJBr+j8EP2JCY+dgVaWDZxfFhX7eq5ux5oHLrEwoJSlP6BN48BkXrcGerVbzMuuXhcSxM9a3NaVG6JRYKn9OYxQEmJqNspOVy31+fQUeTItpXyxDUlGMOKXf9rDS+m7z364tQbBkllFR9MFB0s/f9M8rvQ== +api: eJy1V21v2zgM/isBP22A06Rp097506Uvw3q7l6IvN+CKoGBsOtEqW54kt8sF/u8HSnYcJ22WFV0+JLFEPiQfkRS9AItTA+EdfFb6IZHqycA4AJWTRitUdhFDCBQLe/9U7UMAOWpMyZJmxQVkmBKEUAvcixgCEBmEkKOdQQCavhZCUwyh1QUFYKIZpQjhAuw8Z1VjtcimEECidIoWQigKh2KFlSxQO9e5iKEsxx6SjD1R8Zxx1i1EKrOUWd7CPJcicsH0vhiV8VrjQK45VCvI8NMyxo0dH+MCMJv/nbio266XwXIlK6QE9rF2/i/WLQOIyURa5OzJa6HOViDKACJNaCm+R7sNcIXWGC11rXD+vGzl1MN2RpaNFHn8M4zcetjKSEySfoKRMw9bGanpmsw5R3ez4xJxF7JO5i45G77e1ErN1tJKTdibWqnpWloxspi+NlevWbcM4O3c8z4l0nWsZyDV5AtF9pm28cGpbEKXAaRkMUaLbUCMY8FFhvKy1QZ24EFklqak29bSSXtlopQkzNzS87YgEjoqJOp3Hwopfzcq615keWHfc3itcBlDWEp3U0Ktcb6V5bYqM75p7yXdP2s2yw21zVMZaSsSZMRnhJuOfte05fEmyJW/CKAsGUWTyVVm/GEN+n3+abVduC6iiIxJCtm5qoTh1fdFpAqvtHb2K93BSZRB62rZPXEbijZz9zuked+eZawK21N2OBhssvQPShE7DjrnWiv9eopisigk/6tydF1Aqqi1+yMlNi7X8rqJ9g/lHWTuUzN9bthoktYYnFKT6S+LOjI6N7z7Pf45Lm+6kls5ioZez+7LYZx5+raV08ebm8sNQH+27UM9j4XtfG7GuJTsTPF8x2Ue+GEthF6u6VHQU2+Chnp12preYmW+KyEAQ/qxngALLSGEmbW5CXu9SKoi3sMpZRb3UPQwF7Duy8jtdk5Z1HUQQ1GhhZ07vNHlxSeafySMSUN4N14VuOZE86nTFlueGubiEzGJ1WA6KuxMafGfz4dqNJ15LWaJU/iqmSfPv2GaS1qfByuwZUq041kur45kMOgPht3+sLs/vNk/CPv74fBwr394/C+0p6ptcquD0Ta5tdkGDhL8ZZgcHXaHx/vH3cPh0aA7OUii7iD69eggOTrCBI9gY1jZVW1t+thVzY8TDVk/oru89oW5jwpjVVoP+8Lc0yPKAq3SK2uzIsXMP7fveVcaIkuUy5mqiqqEPMHogTJ+9eDk9mfb39vf67+UwZVCZ3R5UTVJbtdNvngxZrpVI8vqgAAodR0SLGH6W7PBXubKWBfFEm+9iNdeKqoSsPTN9nKJwvU/Z3pRFfgdVAUOAXCJQ3M3GQggXH2NGwcwU8ay0mLBwrdaliUvfy1Ic62OA3hELXDCJN4tIBaG/8cQJigNbfi3vEXg3VXVLN93mumk7XddzxkXM58wP0EADzRfe990N8Gs7heLSuLUG+u6ft0gbFxffLV4jVEUUW63yo5XGufl7Q2zWL2EpipmFY1MLX87Z5WL3WWuW1uAxGxa8IUTgofkz//0fDpz sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Edit Workflow"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/workflows/{workflow_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Edit Workflow"}></Heading> +<MethodEndpoint method={"put"} path={"/preview/base/workflows/{workflow_id}"}></MethodEndpoint> Edit Workflow -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Workflow Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>workflow</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workflow</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "workflow": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/environment-revisions.api.mdx b/docs/docs/reference/api/environment-revisions.api.mdx index ffc94468d1..b276bc585c 100644 --- a/docs/docs/reference/api/environment-revisions.api.mdx +++ b/docs/docs/reference/api/environment-revisions.api.mdx @@ -5,36 +5,36 @@ description: "List App Environment Revisions" sidebar_label: "List App Environment Revisions" hide_title: true hide_table_of_contents: true -api: eJy9V99v2zYQ/leEe1oBIk6DPelpXhusQdslSLPuwTAMRjrbbCWSJU9ePUH/e3EUJUu24wTJ1ifb0vH77r77wXMNJFce0hlMrfUwF2AsOknK6KscUkC9Uc7oEjUtHG6UV0Z7EGClkyUSOj5bg5YlQgrS2oXKQYDSkIKVtAYBDr9VymEOKbkKBfhsjaWEtAbaWj7lySm9AgGkqOAHU2uTqxyaRvTIQz/CoydzRMzLHUDyJwM0zZzPeWu0R8+mF+fn/JGjz5yyLAGk8KnKMvR+WRXJbTQGAZnRhJrYXFpbqCwoNvni+Uw9oLeO9STVMrTBPBx465jodHyCRIIZvmBGj9jftFbxTI62MFvMF0y0kU5J3QFIvb1ehpyOoTgX8YmuigJYvQ78bYRL2KvPLdw+U8fSSfAino6j0+toPF25/teB3UbcGGFHc5RDacIVupMkHd4QLFSLIiz9YRGdTvShU3uuHCcuTa6WCvPF/fYU+sdolvy+fVT3/0X0HWvZ9d+zKQJCw81clooWJXovV88uzjcBJfkYURjXoSQWh05J+qa1Sqb0s/qlEd0Jc89DYTQ/ZxAGeJ/EcWmMghowDabrMFORRjont0cKz7ONcSup1b9hgL6gVa8HMLEz/zHuq7cywxfA/t1hxAvppHLxYupvwcFoHrb2cd2uK7IVXX4n1DnmC2gapvv14uLwTvosC5W3kV46Z9zzL6QcSarixLApTDZ6+wQN+5k3f7gCPpjWwTB6/OrkyNk1VGvysGkQI7njt4+liuNqqaPdICk7eVt1Hw7jbSvfMbLO5N3d3c0BYJvbcVI/KE9h5A03ldvBylUirQ3vZCuksIHRGlKYSGv9pG5rrpn0VTap91emBgR4dJtuZ6tcASmsiaxPJ5OsMFV+JleoSZ5JNZFWhUbwmFVO0TYcmd5cvcftO5Q5Okhn86HBJy6xtmjGZn2+pFXvkeWLO920orVxsWe7hW7dnmJ9lF6a4Qo3Dc4l05srEMBhtMKdn70+O4d9OUfG3B0yo90KFl+D2FOhjx8EYBlaAwhl+dvuBXtmjadS6gHeo9kbeddLQvidJraQKnRC8KWOmZ1xI/PJtJ8nwwU8PdiI5wLWxhOfrOt76fEvVzQNP/5WoeMEzgWEa+We5ZzVkCvP33NIl7LweOBkP1Tgl9vYO68SEMed75KsOcMbWVT8CwR8xe3unwGPiZ/IeqBRmEnrrn7raDbNMrQ0ADgYoVzoff/9cXkHTfMDOiGNWQ== +api: eJy9V99v20YM/lcEPq2AEGfBnvQ0Nw3WoO0SpFn3YBjGRaKta6S76x3l1RP0vw88nWTJvxIkXZ9sS7yP5EfyO7oGEisHyQymxjiYx6ANWkFSq+sMEkC1llarEhUtLK6lk1o5iMEIK0oktHy2BiVKhASEMQuZQQxSQQJGUA4xWPxWSYsZJGQrjMGlOZYCkhpoY/iUIyvVCmIgSQU/mBoTXWfQNHGPPIzDP3q2j4B5tQWI/mSAppnzOWe0cujY9OL8nD8ydKmVhimABD5XaYrOLasiugvGEEOqFaEiNhfGFDL1jE2+Oj5TD9wby3ySbD20yRxPvA0s7nh8BkUxe/iKKT1hf9tahTMZmkJvMFuwo7WwUqgOQKjNzdLXdAzFtQhPVFUUwOx14O8CXMRRfWnhdj11XjoKXuWn89HxdTCfrl1/dGJ3ATdk2Lk56EMqwhXak046vCGY7xZJWLr9Jjpd6P2gdkI57LjUmVxKzBYPm1Pon4JZ9HbzJO//C+lbr2U3fy924REaHuaylLQo0TmxenFzXnqU6FNAYVyLgpgcOkXpZWsVTelnzUsTdyf0A4vCSD9n4AW8L+K4NUZJDTwN1HVYqeBGWCs2BxrPsY22K6Hkv15AXzGqNwOYMJn/aPvojEjxFbB/dxjhQjrJXLiY+ltwIM3HNfdYzZ+haqMybaXjcF1uKjIVXX0nVBlmC2gaTue3i4v9O++LKGTWMnllrbYvv/AyJCGLE2JW6HT09hk16jV1frzDPuo2QC9tbnVS0rYD25ocN/VkRPf89qlW4Lxa18FuUJQtvS27x9N419J3yFln8v7+/nYPsK3tuKgfpSMvqcNN6G6w0pVIueadb4XkNzzKIYGJMMZN6ranm0nfZZN6dyVrIAaHdt3thJUtIIGcyLhkMkkLXWVnYoWKxJmQE2Ek7IY49W+jSzb1U+gwraykjceb3l5/wM17FBlaSGbzocFn7r+2o8ZmfTGFkR+QuQ0L5bSiXNsgGN02mbenmDyplnq4P4bY3or0ERWPHufZhn1+9uvZ+bFkwoFoensdxkiktN0FgxnEO3T1REEMWPoZAkJR/r59wVEa7agUaoD3ZJlHUfb0EH6niSmE9CPjY6lDC8x44vlk0gvb8J9Asreaz2PItSM+WdcPwuFftmgafvytQsvFnMfg9eyBqZ3VkEnH3zNIlqJwuBdkrz7wy10YsjcRxIeD7wquuNprUVT8C2J4xM32LwrryU/0useRF6+86+U6mE3TFA0NAPa0lpu+H9Q/ru6haf4D6TXAew== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List App Environment Revisions"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/apps/{app_id}/revisions/{environment_name}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> List App Environment Revisions @@ -43,29 +43,731 @@ List App Environment Revisions as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"environment_name","in":"path","required":true,"schema":{"title":"Environment Name"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"name":{"type":"string","title":"Name"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"deployed_app_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Id"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"},"deployed_app_variant_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision Id"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision"},"revisions":{"items":{"properties":{"id":{"type":"string","title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"deployed_app_variant_revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision"},"deployment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"created_at":{"type":"string","title":"Created At"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"}},"type":"object","required":["id","revision","modified_by","created_at"],"title":"EnvironmentRevision"},"type":"array","title":"Revisions"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["name","app_id","project_id","revisions"],"title":"EnvironmentOutputExtended_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "environment_name", + in: "path", + required: true, + schema: { title: "Environment Name" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_app_variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_variant_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_app_variant_revision_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + revisions + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"modified_by"} + required={true} + schemaName={"Modified By (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Modified By" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_app_variant_revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployment</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_variant_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "name": "string",\n "app_id": "string",\n "project_id": "string",\n "deployed_app_variant_id": "string",\n "deployed_variant_name": "string",\n "deployed_app_variant_revision_id": "string",\n "revision": 0,\n "revisions": [\n {\n "id": "string",\n "revision": 0,\n "modified_by": "string",\n "deployed_app_variant_revision": "string",\n "deployment": "string",\n "commit_message": "string",\n "created_at": "string",\n "deployed_variant_name": "string"\n }\n ],\n "organization_id": "string",\n "workspace_id": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/environments.tag.mdx b/docs/docs/reference/api/environments.tag.mdx index d816445626..52a71c5ae9 100644 --- a/docs/docs/reference/api/environments.tag.mdx +++ b/docs/docs/reference/api/environments.tag.mdx @@ -5,16 +5,9 @@ description: "Environments" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/evaluations.tag.mdx b/docs/docs/reference/api/evaluations.tag.mdx index 444539c5cd..3eef824932 100644 --- a/docs/docs/reference/api/evaluations.tag.mdx +++ b/docs/docs/reference/api/evaluations.tag.mdx @@ -5,16 +5,9 @@ description: "Evaluations" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/evaluator-data-map-evaluators-map-post.api.mdx b/docs/docs/reference/api/evaluator-data-map-evaluators-map-post.api.mdx index 257dcd8fba..b0b4945d9c 100644 --- a/docs/docs/reference/api/evaluator-data-map-evaluators-map-post.api.mdx +++ b/docs/docs/reference/api/evaluator-data-map-evaluators-map-post.api.mdx @@ -5,74 +5,393 @@ description: "Endpoint to map the experiment data tree to evaluator interface." sidebar_label: "Evaluator Data Map" hide_title: true hide_table_of_contents: true -api: eJztVk1v4zYQ/SvEnLaAaqdBTzrV7QZYY7uIkbi9OEYwkSYWtxLJJUfZuIL+ezGkJH+kmy1yri+WyDfDmTdvhuqAcRcg38DVE9YtsvUBthmUFAqvHWtrIIcrUzqrDSu2qkGnuCJFz468bsiwKpFRsSeSfRr9KG2Y/CMWNLszd2bhdyG/M0op5elLS4HVu5v08EOu1hVNy/bhMxU8S1iH+9piqd5N8X1C57TZLY1reTkeMbgY0YU1jNpos4uxjp4l0BjMDXHrzRjPuevrlo995ynfKa8moZSNsCFcyMA68iiMLUvIYcLfy6n3Dbr7aSnEV2eDmA3B/WrLPeQdSOhkWB7RuVoX0eX8c5BKdBCKihqUJ+flQNYU5E0LHfEJy1KLCdarIwT7ljLgvSPIYQqZNdeysEzWfQZDcm91NDAIff8SI4lqT6WobQj3cN724OP1SkMvvg++JJ64EJw1IZFxeXEhf6civm2LgkJ4bGt1M4AheyvdqfZv5vt6MP8eTeMxr7BzJlahp8/g58vLlwz8ibUuY37qynvr355+SYy6jrpjasJLQG2Lk100++tHyDfdmG5gH3WSTSsyLnbkod8eSEHvcX/E2+82BRiVGqJKT/0dKZFCwB3B5Ozb0EiGWsvu9woieaWjB9xRZQ70Jna/ncb7RN+/HTZCPqzXqxcOU20b4srKiBkGiEOuIIf5YbzMG3SQQSD/RD5E2ltfQw4Vswv5fF7Uti1nuCPDOEM9R6eh34pF0XrN+2iyWC0/0v4DYUke8s32GHArwkilPoVNLKPTH0mSNtjI+6Llynr9d6pfBloUWSUryUokd3MYhVfP2LiaTkbbyXgSG20ebTxyIG0RE1KL1RIykNST7i9mP80u4PxSOwHHC6OIfTDGG7chO2Nu4gwyoCY2ATBh88thQyKT0jRojvxNfavey3X5KVboJKKj2f//jfufbtxBakzPPHc16jgXYr26oSs2h3t4uG2kYytpnHwDXfeAgf7wdd/L8peWvEh/m8ETeo0PIqqNjKNqbIIO/qI95PBbqtSPcWgIvG6T6M9mqMy3ZLEoCnL8KnZ71Nur69s1ZPAwfBU0thQbj19lIOFXyCF+cYh17MK41kGNZtfK2Msh+ZTfP9pQebg= +api: eJztVk1v2zgQ/SvEnLqA1s4Ge9Jp3TZAjW4RI/HuxTGCiTSx2EokS1JpvIL/ezEk9WFnkxY51xdL5JvHmTcfVAcedw7yDVw8YN2i19bBNoOSXGGl8VIryOFClUZL5YXXokEjfEWCHg1Z2ZDyokSPwlsi3qeeR0jlyd5jQbMbdaMWdufyGyWEEJa+tuS8eHMVH37LxbqiYVnffabCzyLW4L7WWIo3g3+f0BipdktlWr/sj0gUPbrQyqNUUu2Crz0zOxqcuSLfWtX7c0p92fopdx7jHeJqIkroAEvuQgbakEVWbFlCDgP+lk+9bdDcDksuvBrt2Cw591aXe8g7YNdJeX5EY2pZBMr5Z8eZ6MAVFTXIT8bygV6S4zfJcoQnLEvJJlivJghvW8rA7w1BDoPLXvqaF5bR+pBBCu61RElBOByeYjhQaankakvujudtR46XMw0H5h652J+w4IxWLopxfnbGf8dFfN0WBTl339biKoEhe63cMfev1vsymf9Ipv6YF9Q5KVaW55DBn+fnTxX4F2tZhvjEhbXavj78kjzKOtSdp8Y9BdS6ONpFtb+8h3zT9eE6b0OdZMMKj4sdWThsR1HQWtxPdPtbRwdDpbpQpcd8k0ok53BHMJA9Dw1iiDXv/ighHFc8OuEmmRnljeo+H8b7KN//HdZDPqzXqyeEMbcN+UrziEkDxKCvIIf5OF7mDRrIwJF9IOuC7K2tIYfKe+Py+byodVvOcEfK4wzlHI2E06G/CLviHUPhsGW6orXS7wPfYrX8SPsPhCVZyDfbKeCaqybWwTFsSAEa+ZFYEYUNvy9aX2kr/4vJzUCyA1W04pC5Hq/GOXnxiI2p6WjuHc0utpHqXocjk6IpnrdYfCFVQgasTQz1bPbH7Ow5AZKBWKyWqWGwCA3T+x5gkJ1IPIgLGVATugU8YfPXuMFecg4bVBO+ocHFe75XP4VUHnk2uSR+Xc0/dTWnsvP06OemRhkGSMhXl9pnM17Y6Vri1q64w/INdN0dOvrH1ocDL39tyXIbbDN4QCvxjgtsw3Or6huigy+0hxzexUz9HqYLw+s2NsDJsOVBGC0WRUHGv4jdTobA6vJ6DRncpc+HRpdsY/EbTy78BjmETxO2Dh0Z1jqoUe1ano85RE7+fQeh7IhH sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Evaluator Data Map"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/evaluators/map"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/evaluators/map"}></MethodEndpoint> Endpoint to map the experiment data tree to evaluator interface. Args: - request (Request): The request object. - payload (EvaluatorMappingInputInterface): The payload containing the request data. +request (Request): The request object. +payload (EvaluatorMappingInputInterface): The payload containing the request data. Returns: - EvaluatorMappingOutputInterface: the evaluator mapping output object +EvaluatorMappingOutputInterface: the evaluator mapping output object <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"mapping":{"additionalProperties":true,"type":"object","title":"Mapping"}},"type":"object","required":["inputs","mapping"],"title":"EvaluatorMappingInputInterface"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"EvaluatorMappingOutputInterface"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>inputs</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Inputs", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>mapping</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Mapping", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + outputs + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Outputs", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'{\n "outputs": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/evaluator-run-evaluators-evaluator-key-run-post.api.mdx b/docs/docs/reference/api/evaluator-run-evaluators-evaluator-key-run-post.api.mdx index 62d259236d..73d8671fe2 100644 --- a/docs/docs/reference/api/evaluator-run-evaluators-evaluator-key-run-post.api.mdx +++ b/docs/docs/reference/api/evaluator-run-evaluators-evaluator-key-run-post.api.mdx @@ -5,75 +5,328 @@ description: "Endpoint to evaluate LLM app run" sidebar_label: "Evaluator Run" hide_title: true hide_table_of_contents: true -api: eJztVk1v4zYQ/SvEnLKAaqdBTzrV3QZYI1nESNJeHCNgpLHFXYnkkqPsuoL++2JIWR/2Jm0D9FZfLIozjzNvZp7YAMmdh3QNl8+yrCUZ52GTQI4+c8qSMhpSuNS5NUqTICMw2qG4vv4opLXC1fpBP+iF2/n0QQshhMMvNXoSZ7fx4V0q7gvsX5unT5jRLNri4djHz7gXZ55cZ81LsxVU4GDT+Vi5L43MxVkf81Lbmpaa0G1lhh3CwSwzmqTSSu8C2iGMXJKcceS3SLXTQ/C+LikVPfZNTWPwLvxjVBOs/AwSMBadZOaWOaQwJOhq/div/OPjJPXHsG2NJ0jASicrJHRcmQa0rHCC9Bn3kIDi0lhJBSTASSmHOaTkakzAZwVWEtIGaG/Z2ZNTegcJkKKSX/T5iSvcQ9tuIgh6+s3ke/Y8xuSMURNvSWtLlYUk558890gzOtI6poAUel4prk14knmu2EWWq5FFBO/CjOSOwlxG7zYBj0RK7yKS3t9sAzf/HLNNejJ0XZbAGR9OuTtgtwlkDnPUpGT5nxz1fgTfti8n/kJvQ9uyl0NvjfaR4Yvzc/6bzuxdnWXo/bYuxW1nDG+uYdfdby3iTef+o3yHLlv3x2x+QMPRGHY8/HJxcZr6n7JUeUhMXDpn3NvzzpGkKkMXE1b+1KA02WR36Jbp3I06QmnCHTpoNwMb0jm5HxF2bWKA3I+V3702xx/Re7lD6MFeGXkmQ9zz7t9VgvOKR3d2o5IM9EZ2X07j90jfa23+4f5+dQIYa1shFYYltFdFKiCF+aCh82aiie3c1RpYKdzzQTtrV0IKBZH16XyelabOZ3KHmuRMqrm0Kgynx6x2ivbBZbFaXuH+A8ocHaTrzdjgjhslln5q1rMurboK8typ9qKmwjj1V6xnp9pF9OIsuQVvB+G9/CYrW+JEOKfidyJRjKL01oQgOloXIUWxWC0hASYjTsb57OfZORx/3ifG4buWhUk5ZBC2ITnismcREsAqjAkQyurXYYMj4+JVUo/whi/PbSjXJJhmGNX/rx3/6trR9R/hN5rbUqogHqFkTTc66+EK4SGB9PhCwdOzSaDgcUvX0DRP0uMfrmxbfv2lRscDskngWToln7jR1g3kyvNzDulWlh5fqWcoDCvMO/FSvIch0hwPh8crSIADPL4BBQEtDmPadDbv43E/BZkbME5UnxU5eiyyDC29arsZqdHq5u4eEnjqbkmVydnHya/MoPwa4zUh/aAT4V0DpdS7moU6hYjJv+8VAgW6 +api: eJztVlFv4zYM/isCn3qAl3TFnvy0XFfggvbQou32kgYBazOxrrbkk+jeZYb/+0DJsZP02m0F9ra8xLLIT+RH8rNaYNx4SBdw8Yxlg2ydh2UCOfnM6Zq1NZDChclrqw0rtoqiHamrq88K61q5xjyYBzNzG58+GKWUcvS1Ic/q5DY+fEjVfUHDa/v4hTKeRFvaHbt6oq068ex6a1nateKCRpvep8ZtaTFXJ0PMc1M3PDdMbo0Z9Qg7s8waRm202QS0XRg5Mk4k8lvixpkxeN+UnKoB+7rhffA+/GNUG6z8BBKwNTkU5uY5pDAm6BqzGlZ+tTpIfRW2a+sZEqjRYUVMTirTgsGKDpCeaAsJaClNjVxAApKUdpRDyq6hBHxWUIWQtsDbWpw9O202kABrLuXFkJ+6pC103TKCkOePNt+K5zGmZEyGZQvrutRZSHL6xUuPtHtH1k4oYE1eVlpqE54wz7W4YHmzZxHB+zAjuXthzqN3l4AnZm02Eclsr9eBm3+O2SUDGaYpS5CMd6fc7bC7BDJHORnWWP4nR53vwXfd64m/0tvQdeLlyNfW+Mjw2emp/B3O7F2TZeT9uinVbW8M765h393vLeJ17/6jfMcuWwzHLH9Aw9EY9jz8cnb2MvU/sNR5SExdOGfd+/POiVGXoYuZKv/SoLTZwe7YLYdzt9cR2jBtyEG3HNlA53C7R9iVjQFKP1Z+89YcfybvcUMwgL0x8kKGupfdv6uE5BWP7u32SjLSG9l9PY3fIn1vtfmn+/ubF4CxthVxYUVCB1XkAlKYjho6bQ80sZu6xoAohXveaWfjSkihYK59Op1mpW3yCW7IME5QT7HWcPyxm4VddS6mYXI9ZY3TvA14s5v5JW0/EebkIF0s9w3upItiXxyaDSXBWl8G7e4lfdZwYZ3+Mxa7l/QiegkF0p+3oypffMeqLulAVQ+V8YV+CYo2axuC6DnvM/yI2ROZHBIQtmLyp5OfJ6evUdI7qNnNvB8pzMJI7bIJZpAckT7QDQlQFeYJmLD6ddyQKKXKFZo9vPETdRvqehBUO870//eTf3U/6XuR6TtP6xJ1UJlQsrafscV41/CQQHp885AxWyZQyFymC2jbR/T0uyu7Tl5/bcjJsCwTeEan8VGabtFCrr0855CusfT0Rj1DYUSKPqjX4t0NlJF4JDxZQQIS4PFVKShtsRvZtrc5j8f9FPRwxHjxeRDpjh6zLKOa37Rd7snWzfXdPSTw2F+nKpuLj8NvwiB+i/HakH7QjPCuhRLNphFFTyFiyu8v12AUSQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Evaluator Run"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/evaluators/{evaluator_key}/run"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Evaluator Run"}></Heading> +<MethodEndpoint method={"post"} path={"/evaluators/{evaluator_key}/run"}></MethodEndpoint> Endpoint to evaluate LLM app run Args: - request (Request): The request object. - evaluator_key (str): The key of the evaluator. - payload (EvaluatorInputInterface): The payload containing the request data. +request (Request): The request object. +evaluator_key (str): The key of the evaluator. +payload (EvaluatorInputInterface): The payload containing the request data. Returns: - result: EvaluatorOutputInterface object containing the outputs. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_key","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Key"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"credentials":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credentials"}},"type":"object","title":"EvaluatorInputInterface"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"EvaluatorOutputInterface"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> +result: EvaluatorOutputInterface object containing the outputs. +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_key", + in: "path", + required: true, + schema: { type: "string", title: "Evaluator Key" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>inputs</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Inputs", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>credentials</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>outputs</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Outputs", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples responseExample={'{\n "outputs": {}\n}'} language={"json"}></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/evaluators.tag.mdx b/docs/docs/reference/api/evaluators.tag.mdx index b2e3821907..96d3587403 100644 --- a/docs/docs/reference/api/evaluators.tag.mdx +++ b/docs/docs/reference/api/evaluators.tag.mdx @@ -5,16 +5,9 @@ description: "Evaluators" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-analytics.api.mdx b/docs/docs/reference/api/fetch-analytics.api.mdx deleted file mode 100644 index 4399d86e81..0000000000 --- a/docs/docs/reference/api/fetch-analytics.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-analytics -title: "Fetch Legacy Analytics" -description: "Fetch Legacy Analytics" -sidebar_label: "Fetch Legacy Analytics" -hide_title: true -hide_table_of_contents: true -api: eJztV01vGzcQ/SvCnLeWa/S0p6pJgxhxayNWexGEYsQdSYy5HyFnnarC/vdiSO0uV7IURUmRS0+GzDfzHudrh1tgXDlIZzC1qHSxgnkCZUUWWZfFbQYpLInV+i8s0GxYKwcJVGgxJyYrhlsoMCfBlaqWU11ACh9rshtIwNLHWlvKIF2icZSAU2vKEdItYLG5X3oHvKnEgWMrAhKgos5FEltUBAm4CgvRxZqNAN94pibpLIvaGGgOEQLp1Nkc+ZvKwxUVjODjVTAZyontZijUk55WGiCR1NJk5L6F1IhXF0wrsiel3AfeWEpBn76LlN8DbyzF6Fx/lZJzeO88SUwrVvYZzX/NfNvyxOQWmb6GuKjzxWd43wvFoFG0YbJfwNpVcjBsxLslV5WFIyeAm+tr+ZORU1ZXMlcghcdaKXJuWZvR+x0YElBlwVSwv0xVGa38GBp/cGKzjUgrK0OKdWBQZR2M9gLeX/OVRySQ0RJrw5BeNwksavVE7D1optwdOmadk2PMq8h5Nwd2IyWFDJl+EGhEOO0sm6QvolMS+wpIgEsO6CP3vKjEXoxBVodRf2n9vG7t9/yq0oXIXuL0lTfe88jlExUXu5wG64FPcRrg5eIDKY6SMek+d00CZG1pX6iO/9PxHdLxAqofTrOoY5N4doeG6lIZKfnFDwHo3aK1uIF9wEDrbH5K7L3JOr3dbGsaMfnp5uZwFP6JRmc+a6NfRd7lczAjRm1OzDNTqsHpl3yu58dDdFcGgRLF3K1eGpYt9DdyDlfUx/s41AdjNJXTz2Vd7hWod7gowX14Q3SPX+N1CN+p3L6dTh8OHIbcDpP6Rrbm0R2tUG1Gk2h5zonXpezVVek3qwp5DSmMK0vPmj6NOezhY1l63Theux3Z53bnrq2BFNbMlUvHY2XKOrsK++gV6jFW2nebI1VbzRtvMnm4fUebt4QZWV/CEeBRCiqUyBDWZQcr/Y4kWLs1YVLzurT6n3ba+G1hHawa/8lblvF2MPHiRpOHW0hArhHCdH3149U17AdvAJZeQOV7oeVuF+9hFLr7S5/nvhGACfOf+wNRJnHPsYj8Hc3VQFUXCqa/eVwZ1L7evYbtLo0z2KVRSmb3oArvF3HXJ3OewFrSn85gu12goz+saRr5d1i4JF+Zdrgw0cr1RJvomfWMphY1vlePYnePnnPA3bPjHHD3MDgH3K7u52CjmX0OfLchnxWMdrHtwXP5YbWgfUckbQVL/IPVRCmqYvEH81i8dE39cP84hab5F+vbLmw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Legacy Analytics"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/spans/analytics"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Legacy Analytics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["trace","span"],"title":"Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"buckets":{"items":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0}},"type":"object","title":"Analytics"},"errors":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0}},"type":"object","title":"Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"type":"array","title":"Buckets","default":[]}},"type":"object","title":"OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-annotation-by-trace-id.api.mdx b/docs/docs/reference/api/fetch-annotation-by-trace-id.api.mdx deleted file mode 100644 index b1dfd0f386..0000000000 --- a/docs/docs/reference/api/fetch-annotation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-annotation-by-trace-id -title: "Fetch Annotation" -description: "Fetch Annotation" -sidebar_label: "Fetch Annotation" -hide_title: true -hide_table_of_contents: true -api: eJztmktvGzkMgP+KwVMLqHE22JNPm03bbTbtNkjdXgLDkGdojxqNNNUjXdeY/76g5u1XHCcFisWcDM+IpPRRpGTSK3B8YWF0C+dKaced0MrChIHO0IRvlzGMYI4uSqa8HjKdLafO8AinIgYGGTc8RYeGNK1A8RRhBK0BQsEIMu4SYGDwmxcGYxg545GBjRJMOYxW4JYZyVlnhFoAAyecpAdjUjS4jCHPWa3dZly1lH/zaJYd7XMubUc9V8uP8zDBriFSWj5RXkrIJ43pTxlXheUJ6baZVhYtaTs7PaWPGG1kREZQaLiPIrR27uXgphwMDCKtHCoX5pBlUkSB4fCrJZlVa4aZIexOFBYi7QuhcnJCOVygaYG5CCMYxDjnXjoYneYMGi91F72m3CB3GE+524eGwVyblMZAzB2+ciLFvbwuCrWDcwc5A5/FP8PI50JtaSRGiT/ByOtCbWmkwjVb0p47zI73Ij4I1p/LsMUaXs9qpaJVW6mAPauVCldtpYrPpwYea/LIkaqa9MFAG7EQaluyQeVTyoORt06nwCDxKVfAgHunoT0zkWYSg9KPhbZWAFbiOYM7oeJ9hnic6Ii+33NJOVTy5Q4zV6SpbaQQpW2ZcKVQ7jOjncyAwXecAQMb39GKMrHD0kWpr2MsE8EL4Zxoe4DHsaA0w+V1J7Uc4KMqlXXcls66T2ZaS+QqPNpuCyJhIi+5efGPfi+s+9tq9eqjd5l3LylNFnr07CtGbu8W2RAPKz5YfExscgYpOv7rMnrrpXyQkHCYHijFjeHLvVzWZB8H9QPBpHTFS6g9yn0oW6mYF+AMztGgigpM3eO/uC7tuR/co7EbV4jDc+6XUpwOAukXR58CJJszeL5zqrhF7mR3UzHboiRnBbbpPTeCK9fjOw6fwXuxCafn9zA/h9ZZ7DfeseD6yH0qwD52jyXY+uXfw3sCvD6GnwNiH8fHUqSf6547bXp0R6PrY/jpCPsIfspdJuIWe3KPI7dHrlVCvGmqDjkDKdTdgWXDrgN+xfLxHgDvhbrbXt4qq0D/r/WV9apJd4DdqqLpyN0WtbxOZaraIi1VTSfykbuwEaybb3lOAr+fnW326r5wKeIwevDGGG2Ob9TF6LgIRfgdzpY66rx9TMlysk69xVxHFSZI7WJfC/UDWssX2Lhw99AAYzCmtw+5U4YGBpkux7VTYI23oLt7Ga8LfPs8+248vt5QWPi269S31KgetHZQKMonmprYC3ShV+0SGMEwowMUvw+bdqkdrqpYyqlXgua+6mh7I2EEiXOZHQ2HkdQ+PuELVI6fcDEMHZIJSUTeCLcMIufXl1e4fIc8RgOj20l7wCfaSMXW6A6rvcIzcYUEqex2n3uXaCN+VIsKPe+kkCIKQs11EK9CIUxucH59Caw5zOD05LeTU1iH1hlMMcCjEAOV7fAa2BqFev3UbEpDAIBDnv7RvKCZZdo6aqQ1+rb4qDOfGoLDf90wk1yEHR6sr0r/3ULpP2g3vCmdjOp8OGGQaOto8Go14xY/G5nn9Lisft+uIBaWz2Tr7wJ3uOz8uYDuWzSX4OBwbZ0R4G2ia4uokwm8uClj5uWgKfl3F1e5XS3bNqvp1EsK2SCp9tSqfH0eRZi5luBG8qLJ13Hw15sx5Pl/EX6Ljg== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Annotation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/annotations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Annotation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-annotation.api.mdx b/docs/docs/reference/api/fetch-annotation.api.mdx index 102ca6242f..bf269eb19e 100644 --- a/docs/docs/reference/api/fetch-annotation.api.mdx +++ b/docs/docs/reference/api/fetch-annotation.api.mdx @@ -5,67 +5,1134 @@ description: "Fetch Annotation" sidebar_label: "Fetch Annotation" hide_title: true hide_table_of_contents: true -api: eJztmlFv2zYQgP+KcU8twMZZsSc9zUvbNWu7Bonbl8AIaOlssaFIlTyl8wz99+EoyZLixHWcdCgGPSWWeHfkd7wjfec1kFx6iC5hYowlScoaDzMBNkcXPp0mEMECKU6v5GYICMilkxkSOpZeg5EZQgTkZIxXKgEBykAEuaQUBDj8WiiHCUTkChTg4xQzCdEaaJWznCenzBIEkCLND6asaHSaQFmKjXafS/MQ5dKsPi7C9PpmWGX9xBRaQzlrDV/k0lR2Z6za59Z49Kzt5fEx/0nQx07lAUMEF0Uco/eLQo/O68EgILaG0FCYQ55rFQdq4y+eZdadGeaOQZOqLMS2qITqySlDuETXwXISRghIcCELTRAdlwI6fukt+pZyh5IwuZK0C42AhXUZj4FEEr4gleFOXieV2tGEoBRQ5MmPMPKpUlsbSVDjDzDyqlJbG2lwzVe84/azUxQq2QvW76uwxVpeT2qlobWx0gB7UisNro2VJjofG3iizSIHqmqThwDr1FKZu1INmiLjzBcXnmwGAtIik5zaZEEWujNTWa4xKP1YaesEYCNeCrhWJtllSCapjfnzjdScQbVc3WPmHWvqGqlEeVum0hjUu8xY0jkI+IZzEOCTa15Rru6xdFLr6xnLVfBCOBm6HpBJojjNSH3WSy17+KhJZT23ZfP+k7m1GqUJj+62BbFycaGle/aXfa88/emtefGxoLyg55wmKz12/gVj2rlFtsTDivcWnzKbUkCGJH9eRm8Krb9LSBFme0pJ5+RqJ5dbsg+D+oFhcrqSNdQB5S6UnVQsK3AOF+jQxBWm/vH/tUC32nU/uEHnt64Q++fcz7U4HwS6WB58CrBsKeDpzqnqDnkvu/OG2R1KSlFhu7qRTklDA77D8Dm8UdtwBn7f50foyeOw8Q4FN0TuYwEOsXsowc43/wHeI+ANMfwUEIc4PpQif10vJFk3oDsY3RDDj0c4RPBj7jKx9DiQexi5HXKdEuJ5W3UoBWhlrvcsG/Yd8DOWj3cAeK/M9d3lrboK9P9aX12vmvUH+DtVtA25y6qW16tMNVuko6rtPT5wF7aCm+ZbWbLAry9fbvfqPkutkjB69No56w5v1CVIUoUi/D3O1jbuvX1IyXJ2m3qHuY0bTJD55a4G6gf0Xi6xdeH9QwOM0ZTffs+dOjQw2HQ9rpsCN3gruvcv41WFb5dn306nZ1sKK9/2nfqGW9OjSbc1nSGlltvWS6TQqaYUIhjnfIDit3HbLvXjdRNL5XhdB2jJXRN0N01nu3AaIkiJch+Nx7G2RXIkl2hIHkk1Dr2SGUvEhVO0CiKTs9N3uHqLMkEH0eWsO+CCt1S1SfrDNv6RuXqHjKvuek8KSq1T/zTLC73vtJJiHsosbBBvgiJMbjQ5OwXRHmtwfPTL0THcxtcbzNEg4xANje3wGsQtCpv1c9spC6EAhDL7rX3BM8utJ26ptfru8FZvPhsIhH/TONdShb0erK9rT15C7Unotr45sUSdnx9ETb6dCUitJ5Zbr+fS4yeny5If1yXxy5mAcD2dM77LNSTK8/8JRAupPW5NcZM04Nl5HRvPR21pvz/1xqmGPcp3Of4EAq5x1f29BCeC/9BuAyckm7TZqOv67SSOMaeO3FZu5B29CbM/Xk+hLP8F+xqmBA== +api: eJy9VU1v00AQ/SvRnEBa1aXi5BMBCq0KomoDlyhC0/Uk3tZeb3fHgWD5v6NZf9QhbQ8IcYrtnZmd997MSwOMmwDpEk63WARYKagceWRT2fMMUlgT6/w7Wltx/AgKHHosiclLXgMWS4IU2KOm7yYDBcZCCg45BwWe7mvjKYOUfU0Kgs6pREgb4J2TvMDe2A0oYMOFfFhIodl5Bm2rxurBof0Xxa8d2q72StKDq2ygIBknx8fyk1HQ3rgINYXrWmsKYV0Xs6s+GBToyjJZlnB0rjA6MpPcBslpJl04L2Sy6W6YkBjfdl/WkcC+1+rmljTvoVpOcE/4zZAxxq3Jk9UUQEFh7F2Ub0A6f7hNeOwvsXVRQLtqW3Vw7WHiCLltJeH1yckhQ9+wMFmMnp16X/m/pycjRlPIk2Eqw2FAUem90wMGe7UncI1l2pAXxCNg9B53E7yfKj3QBGXYPDc9nykE3BCMxZ4OjWTMFnL6GNlTjQVXd3UfN1Hxgd6O3adhvO/oe07Zs8Xi8qBgp+2+qB9k6Wfz6dKXxHklhrAhjh7AOaSQOE9bQz+Sh9kOSTOMaps0/fy2oCCQ3w6eUfsCUsiZXUiTRBdVnR3hhizjEZoEnYE/W5rH09k7CQVZ3kC69oZ3sd788vyCdmeEGXlIl6tpwLXMWzdB+2GjeOjMBQmXvdnMa84rb34N2KPl5F2WkGXsuorpw8Z0vb1FfUdWFlRwdm0fH706On4KTJ8wm1+e92uDOq7N0EcMA/UHXSNRoIDKuDPAhOWbhwPp0lWBS7STeo/IutfXSAjTT05cgSYuRby96SVfQi85qImhiQOlE4dKB99aKcirwJLXNDcY6Ksv2lY+39fkRbyVgi16gzdC5bKBzAR5ziBdYxHooMXRXeDFVb9EL2egHm99ENiKulssankDBXe0m/5liWP8x3sHcqIr5cPQNv3pXGtyPMk7MFGZ7nEfP54uoG1/A6kopgw= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Annotation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/annotations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Annotation"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/annotations/{trace_id}/{span_id}"}></MethodEndpoint> Fetch Annotation -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "trace_id", + in: "path", + required: true, + schema: { type: "string", title: "Trace Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "span_id", + in: "path", + required: true, + schema: { type: "string", title: "Span Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>annotation</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Annotation"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"AnnotationKind (string)"} + qualifierMessage={"**Possible values:** [`custom`, `human`, `auto`]"} + schema={{ + default: "custom", + type: "string", + enum: ["custom", "human", "auto"], + title: "AnnotationKind", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"source"} + required={false} + schemaName={"AnnotationSource (string)"} + qualifierMessage={"**Possible values:** [`web`, `sdk`, `api`]"} + schema={{ + default: "api", + type: "string", + enum: ["web", "sdk", "api"], + title: "AnnotationSource", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>data</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>references</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>links</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>AnnotationLink</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples responseExample={'{\n "annotation": {}\n}'} language={"json"}></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation-ids-evaluations-by-resource-get.api.mdx b/docs/docs/reference/api/fetch-evaluation-ids-evaluations-by-resource-get.api.mdx index 371cea6b02..a1a39d9667 100644 --- a/docs/docs/reference/api/fetch-evaluation-ids-evaluations-by-resource-get.api.mdx +++ b/docs/docs/reference/api/fetch-evaluation-ids-evaluations-by-resource-get.api.mdx @@ -5,78 +5,354 @@ description: "Fetches evaluation ids for a given resource type and id." sidebar_label: "Fetch Evaluation Ids" hide_title: true hide_table_of_contents: true -api: eJztVU2P2zYQ/SvEnBJAsLeLnnSqi2wTIymycNxevIbBlcYSU4lUOKNtXEP/vRjK+vJHgUVPBXqySb2ZeTN8jzwC64wg3sDDiy5qzcZZgm0EKVLiTSVriOEX5CRHUtiDlElJ7Z1XWmXmBa3ySK72CSo+VKi0TZVJZ0/2yS58VpdomeInq5RSuqp2JlVviP3bWK1zVMt3yu0V5yjfQtI/c5Pkip3aS+FRWZq1Sbpqu1BtlCus3X6g87p00tUnQ7z5/PwVE16m244ivS7rk11pQ9g1/WG9fnz4nmAYaKyWbbvTLgwpY190YVIlc00SJJLNFK3BdpYr5NrbLmkgSuy3sVqowhALxekRzSACV6EPG8sUYghkdwNKWh4tafd82PW8MmSIoNJel8joRShHsLpEiGFCHiIwIpRvNfoDRODxW208phCzrzECSnIsNcRHCOgYiL2xGUTAhgvZWHWjXQugaaLLQial23X2uqBrhbT3WpCGsaRLAs0VBsuUoGm2kp0qZwlD3P3dnfxMjfGlDse0rwu1OoEhgsRZRssC11VVmCSMdv6VJOb4LzmGIio4Ug2mFdKjJamfD6pv6D0yNE3TRPDj/f1lE7+L5tosD947/5oOKi/yYtPOKEXWppB/fStTQOGSyVdtD5/3QVXnLfc7xjJm6KHZyhymA+vG8sm1BGVUJWX/pLNfkUhnCH2y29AwjF6PHcyFm2GivU3oqy19wm2HNMN42+nebuNdO75rxTqIXCQXCduzLZFzJxbvXMs5xDAfeXs+8jZEQOhfOlPXvoAYcuaK4vk8KVydznSGlvVMm7muDIghCJPaGz6EkMXj8iMePqBO0UO82Y4BX0Qg7ZFPYYPmK/MRpfmTyxc1586bv9pzPNk8b6OkO2P3LoSfBrEI5NTicQkRSButlu9mP8zu4Pz9moBF2zoJ2u5qh88QnU2h7x8iwDIIGxh1+dPwQZhVjrjUdpTvmjnPOR0Hj/3/vP6Xn9eTnhm/87wqtAmXUBDS8eTBDYzIQwRjF24jyB2xgI7HZ034my+aRrbbJ06MlhrSz8XokbsppDer0530Vt1i9gcerjzewk+w4eK9qHcW077DQ8hWFt5ITLgHos63Qr6NXSRyOKOoi1dFsvQ32PuHNTTN3zPfriY= +api: eJztVU2P2zYQ/SvEnBJAsLeLnnSqk2wTIymycJxcvIbBlcYSE4lUOKNtHEP/PRjqw/JXgUVPBXqySb2ZefM4j9wD64wgXsHdky5qzcZZgnUEKVLiTSVriOFP5CRHUjiAlElJbZ1XWmXmCa3ySK72CSreVai0TZVJJw/2wc58VpdomeIHq5RSuqo2JlUviP3LWC1zVPM3ym0V5yjfQtK/c5Pkip3aSuFRWZq0Sfpqm1BtlCus3fZA53nppKsPhnj18fErJjxP1z1Fel7WB7vQhrBv+t1yeX/3I8EgaKzmbbvHXRhSxj7pwqRKdE0SJJLNFK3BVssFcu1tnzQQJfbrWM1UYYiF4vERTSACV6EPG/MUYghkNweUtDxa0uZxtxl4ZcgQQaW9LpHRy6DsweoSIYYj8hCBkUH5XqPfQQQev9fGYwox+xojoCTHUkO8h4COgdgbm0EEbLiQjUUv7VIATROdFzIpXa+z1QVdKqS914I0jCWdE2guMJinBE2zluxUOUsY4m5vbuTn2Bif6nBM27pQiw4MESTOMloWuK6qwiRB2ulXkpj9v+QYiqjgSHUwrZAeLUm92qmhobfI0DRNE8Hvt7fnTXyRmWuz3Hnv/HM6qLyMF5tWoxRZm0L+Da0cAwqXHH3VdvdxG6bqtOVhx1jGDD00a9HhWLBelg+uJShSlZT905z9hUQ6QxiSXYcGMYZ57GEu3AxHs7cKfbWlO9z6kOYgb6vu9TbetPJdKtZD5CI5S9iebYmcO7F471rOIYbpyNvTkbchAkL/1Ju69gXEkDNXFE+nSeHqdKIztKwn2kx1ZeD0TZiFr+q1QEHcQpjU3vAu5Jvdz9/j7h3qFD3Eq/UY8Emmp52HY9jBEJV5j6JMdwXMas6dNz/bQ+7ugLyNktaN3boQ3qnUcXulk29oU4hA+mxp30x+m9xca6YLULP7eWcCnQQT9DwCDKITuQahIAIsgwOAUZd/HD4Iy8oRl9qO8l1y8Sm3/cGM/7/D/+V3uJttxh88rQptwm0VBmnfmXUFI/IQwdiu6whyRyyg/f5RE372RdPIdvsWiulSQ/qxGL2GVwfpxaK7vF6qa8y+4e7CKy/8BBtu6LN6JzHtg30IWcvCG4kJd0LUe1jIt7GzRA5nFHX2/EiW4ap7e7eEpvkFCsK8tQ== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Evaluation Ids"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/evaluations/by_resource"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetches evaluation ids for a given resource type and id. Arguments: - app_id (str): The ID of the app for which to fetch evaluations. - resource_type (str): The type of resource for which to fetch evaluations. - resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. +app_id (str): The ID of the app for which to fetch evaluations. +resource_type (str): The type of resource for which to fetch evaluations. +resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. Raises: - HTTPException: If the resource_type is invalid or access is denied. +HTTPException: If the resource_type is invalid or access is denied. Returns: - List[str]: A list of evaluation ids. +List[str]: A list of evaluation ids. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Resource Ids"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Fetch Evaluation Ids Evaluations By Resource Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "resource_type", + in: "query", + required: true, + schema: { type: "string", title: "Resource Type" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "resource_ids", + in: "query", + required: false, + schema: { + type: "array", + items: { type: "string" }, + title: "Resource Ids", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'[\n "string"\n]'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation-preview-simple-evaluations-evaluation-id-get.api.mdx b/docs/docs/reference/api/fetch-evaluation-preview-simple-evaluations-evaluation-id-get.api.mdx deleted file mode 100644 index 462dc6d36c..0000000000 --- a/docs/docs/reference/api/fetch-evaluation-preview-simple-evaluations-evaluation-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-evaluation-preview-simple-evaluations-evaluation-id-get -title: "Fetch Evaluation" -description: "Fetch Evaluation" -sidebar_label: "Fetch Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzlWN9v20YM/lcMPrWAGmfBnvQ0Lz/WrNmaJW5fAsM4n2j7upNOueNlcw397wNPkiVZtps0KTAgT4kl8iP5keLxuAYSCwfxHZw/CO0FKZM5mERgcrTh12UCMcyR5HKKG5FpbvFB4T9Tp9JcY+uNm7bFVDKdLpAgglxYkSKhZWNryESKEENHFCJQGcSQC1pCBBbvvbKYQEzWYwROLjEVEK+BVjkrO7IqW0AEc2NTQRCD9wGFFGkWaEIaXCZQFBMGdbnJHDrGOTk+5j8JOmlVznIQw62XEp2bez24qYQhAmkywoxYXOS5VjLADr841lm3fMstM0eqtCCNL5Uql1VGuEDb8vE0SESQ4Fx4TRAfF1GLlmAwW32cB9a64HMdUrdfQLmp1MYxhW2hypeZMRpFBkW0eZR5rYFpqr27dIPTEqGIGE6rB3wO2BXrl1BC0jPBRiVCUUS1lJl9QUk7K+DGZxeBrz5oEUGKJLquiCRRrCf0dYfTnrNVFbZg6yR3LKWz7pN2jLttgVRWei3smwuv9e/OZO8+eso9vYXtgBlEEaaP1BLWitVBdrd0oUfxIeU/mEzW6JXn/4nUP82VcvRNWvcF2VN/GkfjshSrPvgoBvousG4RdfvX90GdtSCKCKRFQZhMBR0CbDXeRBC+IxX82W/ltIQdjAJZPk9+hJFPJWxlJEGNP8DIWQlbGanpmq34FHucnXBUPYasX1fh8Gr4elErNVsbKzVhL2qlpmtj5eWgS7wHtO4Z5f+5Uuf4xfZJ0D1THQnyB5tWBJj5lEeqHLOkfHLv0SOPJtZnWfnIlXMGByuU9panDLTWWH4kRSZRa0xgsuswuy2d2HmU3Xu0q6kjzLe8rA6Ib5PdPyb29e19gUvvyKQQwdKnIoMIhCcD7F1F5op7VznE7DH+iB76F0c6uA2RsiI6ckivIvRxGWsTfGsofRUEjJp4GxKqsdnYV0HBeR1tQ4DFHAXt7k47B6gtyJtK/9BIfRtufE0vOhNh2ut1oidAPFN9c00rClb7+eSkf6v7LLRKynI55yb7/Ve6BEkoHa5XdUV1BbSRnbdPGW4n2+XXRH1lZE0WpG6xq/6aAdw5scCmnPaLBjIGY367i/LmDn4X4ipNV3LtA3RDb8nu/jDOSvoO5ff9eHzdAyxz203qBW8lBq06Che5peGNRb11oCXEMKzWFcNyXTFsrSuG684OouCTGe1DvafwVkMMS6LcxcOh1MYnR2KBGYkjoYYiV+H7cSi9VbQKKqPryw+4eo8iQQvx3aQtcMtFVZZJV2yTIZGrD8iEVRuSkaelseprHWDYkCxLLWZEZXMT1OvGGJwbjK4voTUWwfHRT0fHsE1gR5i/ByHD91DbDq8h2mJhEz+3vDR8DEAo0l+aF+xZbhxx+2vwduRr6+5SkUD4Lw1zLVSo9mB9XeXyDqpccqJCNqG9L+HhKe5ulSYRLI0jVl2vZ8LhJ6uLgh+HUYlTFMGDsErMmMG7NSTK8f8JxHOhHfa83HQOeHNTfSBvB83tset9ndeMk8qO8S+I4G9c9RZg4ftf1pWzrmRGUmJOLe1eu+IS21T+b+djKIr/AG8I0bY= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/simple/evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-evaluation-results.api.mdx b/docs/docs/reference/api/fetch-evaluation-results.api.mdx new file mode 100644 index 0000000000..e2b95d96b1 --- /dev/null +++ b/docs/docs/reference/api/fetch-evaluation-results.api.mdx @@ -0,0 +1,303 @@ +--- +id: fetch-evaluation-results +title: "Fetch Evaluation Results" +description: "Fetches the results of the evaluation" +sidebar_label: "Fetch Evaluation Results" +hide_title: true +hide_table_of_contents: true +api: eJzVVU1v2zAM/SsCTysgxFmxk0/Ltm4NumFF2u2SBoFqM7ZaW3Ylulhm+L8PlO3YTtYCO+5kfZDU4+MjXQOpxEG4hotnlVWKdGEcbCTE6CKrS95DCJ+RohSdoBSFRVdl5ESx81s8+N2ZO7OwiQvvjBBidLHVsXjjyJ6FRx5Cx62txacKHYk3q3bRWfbHxf0DRsTxV0iVNf0TW9qXuA3FdoR2CxKKEq1/YBlDCDsGvx3B6TIACaWyKkdCyxTUYFSOEMIEOUjQTEGpKAUJDElbjCEkW6EEF6WYKwhrYCwQgiOrTQISSFPGBwOxYhlD02w4iCsL49Cx3/l8zp8p4TdVFKFzuyoTq84YJESFITTE5qosMx35sMGDY596wNI0TSPh3fn5aeCfKtNxi+bC2sL+Q1QoLRNLusUdIymd8UoT5u7UICuiya0y++87z/OUqkYeTrQhTNBCs2lkf6asVfsRn1+LFiA0EnKXvEb9N3ROJQiHYK9UickQt3zbDG+3wpuUfe3zap/u7DZDmIHelt2X0/jU0ve3x3qTy9vb65OAbW1zpLRgcSdIXseUQgjBoFwX1BMZN8Ggeof2uZd8ZTMIISUqXRgEUVZU8UwlaEjNlA5UqeF4Fiz8rfjIpsBqdhhVVtPex1tcL69wf4kqRgvhejM2uGEltdqYmh3Kokp9hcxS14mLitLC6t9twbtOTFsvpkGbXeHdO8Y6bB9U9IiGW5fzbGHPZ29n85eS6RzE4nrZNYSKfEP0OLwZyCO6DkSBBMx9NwChyt8PF4yyLBzlyozi+XkqRpNhdSjOBF89NOf/NoO7ihL+oqDMlPb96umrO7muR4OWMw+P526v2I2EtHDEHnV9rxz+sFnT8PFThZZ1t5HwrKxW96yCdQ2xdryOIdypzOErrPpsubPPxEuge20aFiZD5B1IeMT9yc/CD660V3/d2SyiCEsaeZ/MWW6TQ09/ubiFpvkDiRqhEg== +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Fetch Evaluation Results"} +></Heading> + +<MethodEndpoint + method={"get"} + path={"/evaluations/{evaluation_id}/results"} +></MethodEndpoint> + +Fetches the results of the evaluation + +Args: +evaluation_id (str): the evaluation id +request (Request): the request object + +Returns: +_type_: _description_ + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} +> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation-scenarios-evaluations-evaluation-scenarios-comparison-results-get.api.mdx b/docs/docs/reference/api/fetch-evaluation-scenarios-evaluations-evaluation-scenarios-comparison-results-get.api.mdx new file mode 100644 index 0000000000..865d61070a --- /dev/null +++ b/docs/docs/reference/api/fetch-evaluation-scenarios-evaluations-evaluation-scenarios-comparison-results-get.api.mdx @@ -0,0 +1,305 @@ +--- +id: fetch-evaluation-scenarios-evaluations-evaluation-scenarios-comparison-results-get +title: "Fetch Evaluation Scenarios" +description: "Fetches evaluation scenarios for a given evaluation ID." +sidebar_label: "Fetch Evaluation Scenarios" +hide_title: true +hide_table_of_contents: true +api: eJztVcFu20YQ/ZXFnBKAlVyjJ56qxm4iJEUNW+1FFoz1ckRuQu4yO0M3qsB/L2ZJipQlG0jOPVkevnn7dmbe7B5Y5wTpGq6fdNlott4RbBLIkEywtfwPKfyObAokhQeQIoNOB+tJbX1QWuX2Cd0UsLya3bt7twh5U6FjSu+dUmqCeLCZekMc3qZqVaBaXim/VVzglES4/ymsKRR7tRUV48GR/lZbwoH7w2p1c/3NYJSdquUJnSXlPKutb1ymRLYxSCThDJ3FrKNEboIbOD9Z4vVYnLv+9E2qFqq0xCL6XFlmkICvMcTwMoMUovyHyf0P2EmQzgOMr2odLHn3EJCakukhR4YEah10hYxBmrgHpyuEFKZ8NiNIwEobvzYYdpBAwK+NDZhByqHBBMgUWGlI98C7WvKJg3U5JMCWSwlMpkMtM4K23QgN1d4RkmReXlzIn+O5uWtigbdNqW57MCRgvGN0LHBd16U1kXj+mSRnP1XTnz7kqjiHahSj7g5TOFV4FvDuUELRIiVU75Ghbds2gV8uL0/V/61Lm3U01yH48D3S6yDNZ9sVJ0PWtpRflrGiU0DpzdFX7XZ/bmNHjzvSJoeIdYw5Bmg3bTLEdAh6N2nbJ98JhDaBivLXOvwHEukc4UD2yjBIMdRKvrbj2f7xMxo+mq51vFd3dI/bjDRjebvqvnyNq6585w4bIGL9E8KutxVy4cWAg2O4gBTmE4/Mz3luPnrup95zkABheBrM1oQSUiiYa0rnc1P6JpvpHB3rmbZzXVt4vkcX8at6J1AQCxGaJljeRb7FzfIj7j6gzjBAut5MAXcyWd2sHMMObdK1/YhStX4HLBoufLD/dgPQb4Ciy5KyWLf1U5P12n7T5gu6DBKQe3ayL2Y/zy5eukyfoBY3y94g2kSDDDoiDJJn5ToUChLAKroDGHX16/hBVNaeuNJuwvfyDniucD/a9f8X7MdesH62GL/xvC61jZskNnLfG2k9fWykl2esFOfixEybBApPLBT7/aMm/CuUbSvh7p0SS2SW9GMpu2SrS8JXGvzmtl87b9VLur/g7uzbKAFBR0c+6WDlyGjAZDCMaOnSF0a6M8k6eQeE5bBz3l+voG3/A+IHTYY= +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading + as={"h1"} + className={"openapi__heading"} + children={"Fetch Evaluation Scenarios"} +></Heading> + +<MethodEndpoint + method={"get"} + path={"/evaluations/evaluation_scenarios/comparison-results"} +></MethodEndpoint> + +Fetches evaluation scenarios for a given evaluation ID. + +Arguments: +evaluation_id (str): The ID of the evaluation for which to fetch scenarios. + +Raises: +HTTPException: If the evaluation is not found or access is denied. + +Returns: +List[EvaluationScenario]: A list of evaluation scenarios. + +<Heading + id={"request"} + as={"h2"} + className={"openapi-tabs__heading"} + children={"Request"} +></Heading> + +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} +> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluations_ids", + in: "query", + required: true, + schema: { type: "string", title: "Evaluations Ids" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation-scenarios.api.mdx b/docs/docs/reference/api/fetch-evaluation-scenarios.api.mdx new file mode 100644 index 0000000000..5c7f02757f --- /dev/null +++ b/docs/docs/reference/api/fetch-evaluation-scenarios.api.mdx @@ -0,0 +1,771 @@ +--- +id: fetch-evaluation-scenarios +title: "Fetch Evaluation Scenarios" +description: "Fetches evaluation scenarios for a given evaluation ID." +sidebar_label: "Fetch Evaluation Scenarios" +hide_title: true +hide_table_of_contents: true +api: eJztV0tz2zgM/iscnNoZTpzN7Emn9SbZrafZJpNke3E8GUaCLbYSqZJQWq9H/30HFC3J8SNuzj3FIYEPwIcHoRWQWnhIpnD5rIpakbbGw0xChj51uuL/IYG/kNIcvcBOSPgUjXLaejG3Tiix0M9ohgKTi5MH82DGblGXaMgnD0YIMZB41Jl458m9T8R9jmJyIexcUI5DEMb+nus0F2TFnL3oDQf4W6U9rrE/3N/fXP5IMbidiMkWnPbCWBJzW5tMsNtpit7zcYZGY9ZCItXOrDGvtKdpT85dtD5LxFgU2hM7vYuWE5BgK3TheJJBAsH9x0H8nSxIqJRTJRI6TsYKjCoREtggCyRoTkalKAcJDr/V2mEGCbkaJfg0x1JBsgJaVqzsyWmzAAmkqeCDy0FyMmiaGYP4yhqPnvXOTk/5z2bq7+rA0bwuxG0UBgmpNYSGWFxVVaHTADv64llnte2Lck4tOQDCMtiqHJNDurWss4BkltfzEP5mBI3sTkxdFMCOr2PiQOQLno6ngBmtamp92O1am4n9iJ/4vpHxfr/cPZ83EtiBVjBefA4HTQcB9ukLprSR4WnrRhRZg8x2xbUu0AkH1jvWZaAjrg28kWBreoUDh74uaPv8p2PuMnwopZEQCeicdTsLYydFJXqvFpu0BIRtY6+xHe4GOLctAQ0XvqedLpm6fMJdtnqUc9ZtJBSK0KTLt8JcRfXXgohZO1gl1yH3B8rkOhZHCN05TOlRGf89zKkd7rfqh0kIKGIcUbgH/WOljcHdQ+DJ2gKVOTwFvLhpERoJxhK+dZx8Yt1GRu4O9UQcOdY9ptbM9eKIqWOdOG9lOwu/euo1tS2e5VGF3XfsnsK+jRk+0v7gCQ790I/NvlgOOhRc6W2Hh1SEvUoMHqW7biVoGvbs97Oz7Sf5syp01sq3yfiJ93iz2DIkpYsDVV7YdOP2iJ7ShnDBI2y2n/wr2zrIpJT+YO/8EyvwiCc2kCHaBnklqxxXa1puFWZP77rU94Vx0dK3y9hahFfSLcA2tyVSbnkxXCCFDZBySGDUF5wfrTaqrxntWR49uuf15li7AhLIiSqfjEZpYevsRC3QkDpReqQqDS+X+3G4FecsGoaGx7R2mpYBb3wz+YjLD6gydJBMZ0OBOy6rtlA2xfr3oNIfkSmLC+24ptw6/V+b/bjQ5q1WE9axuR0uR9G3P1X6FQ23H8fZun168tvJ6b5gooIY30xid6iU+nUuioF8QVdHFEjAMrQGEKryj/6Cvaysp1KZAd6BRn7h4arv1V+fVW/7rIq1RfiDRlWhdBgjIZGr2EXDsc0ZSF5O8Z2NNJOQh/VuCqvVk/L4ryuaho+/1ei4HWb87jqtnrg4pyvItOffGSRzVXg8kOp3t3H6vBf7Ili3jFl2G34CIOErLrc+BcNwzddNuYoy45STNNDeegu4e7u58/flPTTN/1ICiI8= +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Evaluation Scenarios"}></Heading> + +<MethodEndpoint method={"get"} path={"/evaluations/{evaluation_id}/evaluation_scenarios"}></MethodEndpoint> + +Fetches evaluation scenarios for a given evaluation ID. + +Arguments: +evaluation_id (str): The ID of the evaluation for which to fetch scenarios. + +Raises: +HTTPException: If the evaluation is not found or access is denied. + +Returns: +List[EvaluationScenario]: A list of evaluation scenarios. + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_id"} + required={true} + schemaName={"Evaluation Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluation Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>inputs</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"value"} + required={true} + schemaName={"Value"} + qualifierMessage={undefined} + schema={{ title: "Value" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>outputs</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>result</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>latency</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>correct_answers</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Key" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"value"} + required={true} + schemaName={"Value (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Value" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_pinned</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>note</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>results</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"evaluator_config"} + required={true} + schemaName={"Evaluator Config (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Evaluator Config", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>result</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "evaluation_id": "string",\n "inputs": [\n {\n "name": "string",\n "type": "string"\n }\n ],\n "outputs": [\n {\n "result": {\n "type": "string",\n "error": {}\n },\n "cost": 0,\n "latency": 0\n }\n ],\n "correct_answers": [\n null\n ],\n "is_pinned": true,\n "note": "string",\n "results": [\n {\n "evaluator_config": "string",\n "result": {\n "type": "string",\n "error": {}\n }\n }\n ]\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation-status.api.mdx b/docs/docs/reference/api/fetch-evaluation-status.api.mdx index 479ba9c3af..62df16b309 100644 --- a/docs/docs/reference/api/fetch-evaluation-status.api.mdx +++ b/docs/docs/reference/api/fetch-evaluation-status.api.mdx @@ -5,74 +5,299 @@ description: "Fetches the status of the evaluation." sidebar_label: "Fetch Evaluation Status" hide_title: true hide_table_of_contents: true -api: eJzVVU1v2zAM/SsGTysgxFmxk08LsG4NumFFm+2SBoVqM7Y6W3Ylulhm6L8PlL+TtsCOO0WmSOrx8ZFpgGRqIdrCxbPMa0mq1BZ2AhK0sVEVf0MEn5HiDG1AGQaWJNU2KPf+C4ewxZ2+0yuT2uhOB0EwublXSfDOkjmLjkIClbS+Bp9qtBS8u2kPnWdvLh8eMSbOf4NUG90/8XLSFiAIKCs03rROIII913A/QTX4VdLIAgkNE9GAlgVCBDP8IEAxEZWkDAQwMGUwgYhMjQJsnGEhIWqADhUHWzJKpyCAFOVsGOkN1gk4t+Mktiq1Rctx58sl/8xpv63jGK3d13lw0zmDgLjUhJrYXVZVrmKfNny0HNOMWJxzTsCH8/PTxD9lrpIWzYUxpfmHrFAZ5pVUiztBkirnkyIs7KlDXsazW6kP3/ee5zlVTgwWpQlTNOB2TvQ2aYw8TPj8WrYAwQkobPoW9d/QWpkiDMne6BKTEWz41o1vt/KbtX3r62qf7vx2Y5qR3pbd18v41NL30mO9y+Vmc32SsO1tgZSVrO0UyeuYMoggHJVrw2YmYxcOordonnvF1yaHCDKiykZhGOdlnSxkiprkQqpQVgpYrxbj2ig6+JDV9foKD5coEzQQbXdTh1vWStv9udtAvKzUFTIP3aytaspKo/60Le1mLWujuFCl96UP7zhZeXDB6noNAriMVtbLxfvFEo6X18yZZS5jL/P+bX8N4oiFoX4QgIXXOBDK4uN4wciq0lIh9SSf35XBZN5ve8pnsJpx4v7T9dr1kvA3hVUulZ9FT2LTSXE7WaIcER3v1C7XTkBWWuKApnmQFn+Y3Dk2P9VoWHA7Ac/SKPnA7d82kCjL5wSivcwtvsGtr5mH9ix4DXMvSs2KZIT8BQJ+4eHkf8DvpKyXfdP5rOIYK5pEn6xQno9hXL9cbMC5v6G8lJU= +api: eJzVVU1v2zAM/SsGTy0gJFmxk0/Ltm4NumFFm+2SBoVqM7ZaW3Ylulhm6L8PlL+TtsCOO0WWHqmnx0emBpKJhXAD588yqySpQlvYCojRRkaV/A0hfEGKUrQBpRhYklTZoNj5L+zDZrf6Vi9NYsNbHQTB6OROxcGJJXMaHoQEKm6wBp8qtBScXDeLFtltF/cPGBHnv0aqjO6ueDlpQxAEFCUav7WKIYQdv+FuxKrHldLIHAkNC1GDljlCCBP+IECxEKWkFAQwMWUwhpBMhQJslGIuIayB9iUHWzJKJyCAFGW8McgbrGJwbstJbFloi5bjzhYL/pnKflNFEVq7q7LgugWDgKjQhJoYLssyU5FPO3+wHFMPXJxzTsD7s7PjxL9kpuKGzbkxhfmHrFAa1pVUwztGkirjlSLM7TEgK6LJqdT7Hzuv81QqJ/odpQkTNOC2TnR70hi5H+n5rWgIghOQ2+Qt6b+jtTJB6JO9USUWI1jzqRvubuw3KfvGv6u5usVthzSDvI26rz/jcyPfS5d1kIv1+uooYVPbHCkt2NsJkvcxpRDCfHCundcTG7t5b3qL5rlzfGUyCCElKm04n0dZUcUzmaAmOZNqLksFhwNh6U+DTwwFNrPFqDKK9j7f8mp1ifsLlDEaCDfbMeCGjdRYYwrrqyJLdYksUtuIy4rSwqg/Tb3bRkybKFZB6V3hw1vBWm4fZfSImjuX39nQXszezRavPaYNCJZXq7YfZOT7oePhYSAO5OqFAgGY+2YAQpl/GA6YZVlYyqUe5fNDNRgNhpuuNhN69dCa/+kcbutK+JvmZSaVb1ovYt16djOathwRHg7fNtdWQFpY4oC6vpcWf5rMOd5+qtCw+bYCnqVR8p6tsKkhVpbXMYQ7mVl8Q1v/Zu7u0+A1zp1BNbuTGfIXCHjE/dEfhh9eadcCdYtZRhGWNIo+mrXcK31ffz1fg3N/AT8ooyQ= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Evaluation Status"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/evaluations/{evaluation_id}/status"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetches the status of the evaluation. Args: - evaluation_id (str): the evaluation id - request (Request): the request object +evaluation_id (str): the evaluation id +request (Request): the request object Returns: - (str): the evaluation status +(str): the evaluation status <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluation.api.mdx b/docs/docs/reference/api/fetch-evaluation.api.mdx new file mode 100644 index 0000000000..26f247a023 --- /dev/null +++ b/docs/docs/reference/api/fetch-evaluation.api.mdx @@ -0,0 +1,957 @@ +--- +id: fetch-evaluation +title: "Fetch Evaluation" +description: "Fetches a single evaluation based on its ID." +sidebar_label: "Fetch Evaluation" +hide_title: true +hide_table_of_contents: true +api: eJztV0tv4zYQ/ivEnHYB1U6DnnSqm6RdY/sIst5cHMNgpLHEXZnUkqOgrqH/XgwpyZJfyW6whwI92SJnPs7jm+FwCyQzB/Ecbp5kUUlSRjtYRJCiS6wq+Rti+BUpydEJKZzSWYECO2nxKB2mwmihyInp9ehBP+iJzVz8oIUQPcmlSsUbR/ZtLGY5ium1MCtB+QCMjFjxWR7lDqmyugXaGRj0vRymPe0RRGBKtP5jmkIMXma5k4AISmnlGgkte70FLdcIMQyshAgUe11KyiECi18qZTGFmGyFEbgkx7WEeAu0KVnZkVU6gwhIUcELO1PFNIW6XjCIK4126Fjv8uKCf4Yx/lAlCTq3qgpx1whDBInRhJpYXJZloRIPO/7kWGfbs6W07DqpcIJKz9nHRkWMtzwvNylLEWRLaz5hQs/I3wapRudJWiU16wSTCNfuULuO2gVprdz00O6Dvpimrg/HGXsd4J8eoQdp8Um5kPvXId81QK3NLfC3od512iyDjhy2GZB689fKE3gfrFvRVVEAU6+FmwWEJjstXiiA1yFyQBnTkaTKHbIx6J/mzYzXfT6KamjMudPvvXQdAVpr7FEfzCPzcVDDc1ijczJD6EHdeITDw+pdco5C+b1FP2OuKsgXV5ZZzCRhurR+cUiBYXya7mPsMjF6pbKX++KblU/hoEajHuRnZE4lFr0xkhGqMm0/Fgddy9irYASHQ6ap4oYji9uexaEPDu2qjyGJDgpCFP7nxnNqB1zoQtfDmnTs2jHuRBPZiYq7hohMzye0MsNlYhy9PDon6X4QmwjIkCy+I37rQSEJdbL5Pof0quYIRVfGrnkHuJp+IOWrsIW9Cqpi4pPTq7ivBfoYVD3QM9zxld9c63v9oH8Z79+lJy7C/vXV9fajne1r2gsPO3XNnvx0eXk4Bd3LQqVhdAqF980jUIokVXGm6xYmGey+4AZUmjBD2zD8eMH9bpLGywjWLjvX2/5ouk0Hdmak5GCI0AyfYQH7FY6ODsi+C2/b1k65cR3Cd+ywVuTdbHZ7ABhyu0bKDU/gGZIfuimHGMa7MduNt4OZu2aKoX1q5/LKFhBDTlS6eDxOClOlI5mhJjmSaixLBftvlInfFVcs6u8Ch0llFW083uR2+h4371CmaCGeL/oCH5hBgRNDsS4dslTv/TXaPBcmFeXGqn/aR4V/LuRBi91XemW8eteEvW2/yOQzal+OaF0w+2L04+jilDONgpjcTptCkIkvhNYOL8YlNwhXFygeBNa+CoBQrn/ebbCVpXG0lrqH5995vZfWvl3bXTH+h96ETRIJ/6ZxWUjlS9NHbNswc957AHI7i4fvwUUEub/I5rDdsm8fbVHXvPylQssEWzQ99JHTPd9Cqhz/TyFeycLhmTC+uWtK9604ZWpLQr2Bbg4CiIAnu/2nq+9MeUvzbSMzSRIsqad90Ei5Hrqi/e1mBnX9LyZMh+U= +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Evaluation"}></Heading> + +<MethodEndpoint method={"get"} path={"/evaluations/{evaluation_id}"}></MethodEndpoint> + +Fetches a single evaluation based on its ID. + +Args: +evaluation_id (str): The ID of the evaluation to fetch. + +Returns: +Evaluation: The fetched evaluation. + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_names"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Names", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_revision_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Revision Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>aggregated_results</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator_config</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"EvaluatorConfig"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Project Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Evaluator Key", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Updated At", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>result</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>average_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>total_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>average_latency</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Updated At", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "app_id": "string",\n "project_id": "string",\n "variant_ids": [\n "string"\n ],\n "variant_names": [\n "string"\n ],\n "variant_revision_ids": [\n "string"\n ],\n "revisions": [\n "string"\n ],\n "testset_id": "string",\n "testset_name": "string",\n "status": {\n "type": "string",\n "error": {}\n },\n "aggregated_results": [\n {\n "evaluator_config": {},\n "result": {\n "type": "string",\n "error": {}\n }\n }\n ],\n "average_cost": {},\n "total_cost": {},\n "average_latency": {},\n "created_at": "2025-05-15T13:01:54.113Z",\n "updated_at": "2025-05-15T13:01:54.113Z"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-evaluator-revision.api.mdx b/docs/docs/reference/api/fetch-evaluator-revision.api.mdx deleted file mode 100644 index 94819468c9..0000000000 --- a/docs/docs/reference/api/fetch-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-evaluator-revision -title: "Fetch Evaluator Revision" -description: "Fetch Evaluator Revision" -sidebar_label: "Fetch Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJzNWdtu20YQ/RVhnhKAsVyjT3yq60vtJk0M3/pgCMaIHEqbLLnMXuyqAv+92AspUZRUSZYAP1kWZ87snJndHR5NQeNIQfwEFy/IDWohFQwiECVJ1EwU1ynEkJFOxs9UWzxLemGKiQIiKFFiTpqkBZlCgTlBDF3TZ5ZCBKyAGErUY4hA0k/DJKUQa2koApWMKUeIp6AnpQVRWrJiBBFkQuaoIQZjHIpmmluDZsm92xCld51CVQ0suCpFoUhZvJPjY/snJZVIVtqsIIY7kySkVGZ47zYYQwSJKDQV2ppjWXKWOBL635X1mc6tsZSWIs18hEQY7xSWzgpNI5Jzaz1zFhGklKHhGuLjKlpCkwtcTL5ljs12kJn1C0qGhbactuzXE1dFjUVhOAfLU5fKR4/tmIzgVcgfGRevBwj5d4BeiDjL8hDZLWR1gGx8hP3T1WYJpWYZJvsMcBog6whGj4XcG7hHqyJIUdOGqNb0k2Y5rYU+t4BVBDkphaO12Otg/gruVQQZd2fi6p3I1HNilBb50mBDIThhsTbateqdeYQqsnBN178FsWnzADo2ORZvAbxyAFUV1UZi+J0SvewIvnScdfFcYTS2V4Fpyuy5ivymxesGdatP1lakfNj+Zj695bEgYTIxHOWHS8P5n0oUn74ZXRr9ERaTtSBMU76hF0qJk7XELvhCh971barReXRa9D2R+lV8YUr/L62rkuy4b8fRvW/FMIzsdhx8RXfstIeG3aDO5yCqCBJJqCl9Rr3XY/DMw/ZOHVmmTA8R5MHDhiApcTpAkHMPG4LUdA0ne7zrarJ+n4TbruZrr1FqtpooNWF7jVLT1UR5IdkdJTdv18fgXkWguBntCnNnfe09tLdEA4e4eJu07+b9ZW8k2xXlQTKPwHdH4BZhTJi6d6vtTvpDUfL+GmLNbHJLGUkqktZpUy90sNWNchXKUNWvqZtW5B3dye9y0NmiBneBeDtRYlmyYtMBaJHibaatOpArvL3Ed+5+7121FZP3Or+9y15Z7Xwzo9QWiuQLS2gTdr3ytEUPBujKKUUZGxmvkh0i1lkrwEYvYbUMdo7uJaHzLrYNxlv9G1GtqqzfrycnXQ3uETlLXX69CymF3F2AS0kjc5dt6MpFAy6S1tNtdtXcXeEbeZb2F5FgPdjnarRMvVwiMHiT1aaOjN69fbqM85ly+uTy8qGDXUsyqun17K5O49zTt67AV/f3Nx1AX9t2US+tWNzrarPglICxsILyiLTTjvUYYuiXVv2k134jgqh+rYeq/nSpllyB3+e17uwmLRhrXaq430+4MOkRjqjQeISsjyVzW0tRYiTTE+dyenP9mSb+Zof4aTBv4O4a3zhts6ZmWLLPZCkMircXuNi/vhuC0u2nN0crKzLh3GtBzC2ud3pzDXMTOxwf/XJ0DIuUtoztDsHE7ZA6tnsM0QILTf4QAeVue4AmzH+bPbArK4XSQScKeGsquPA6HMjQ9I/ulxxZMTf1+uo+QaguzEm7yjVxqDBEEC//vWAQwVgobUGm0yEqepC8quzXPw1JW8VBUFqHltOnKaRM2c8pxBlyRZ31NqcLfLgNm+hjb3ZNtfOoK13YMtsF2v8ggh80WfkThzsrxnVPTYPtaZJQqedQOkebbb5md/xxcQ9V9R942M1s -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluators/revisions/{evaluator_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-evaluator-variant.api.mdx b/docs/docs/reference/api/fetch-evaluator-variant.api.mdx deleted file mode 100644 index 68c33fa925..0000000000 --- a/docs/docs/reference/api/fetch-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-evaluator-variant -title: "Fetch Evaluator Variant" -description: "Fetch Evaluator Variant" -sidebar_label: "Fetch Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV01z2zYQ/SuaPSUziOV6euKpqj9qN2njiZ304NF4VuRKRAISDLBwqmr43zsAQUoUJdd2lJme/MHd93bfYoHdFTAuLCR3cP6AyiFrY2EqQFdkkKUurzJIYE6c5vfUWtw/oJFYMgio0GBBTMZjrKDEgiCBgeW9zECALCGBCjkHAYa+Omkog4SNIwE2zalASFbAy8pjWDayXICAuTYFMiTgXEBhycobdAGPPjUko6sM6nrqsW2lS0vWw50cH/sfGdnUyMqnBAncuDQla+dOjT5EYxCQ6pKpZG+OVaVkGhQYf7beZ7URYmW8PiwbhlS7xilGLkumBZmNUE+DhYCM5ugUQ3Jci6FIgbdcvp8HKfsca2OZ9e0el6sWnUXplAIvz1BAL5yAb9p8mSv97YAUf0XIyICG5RxTPiDDJEJGhrkKx3m/kNLep86yLnYGMNNaEZaPMl7Z0WmDUAsP15XmexC7WkTQ3BVYfg/gZQCoa9Ea6dlnSnlX/1wEzYZ4tYCCGPtRYJZJ3xWornu67qvlBmzbFz2mYtb/z2Z6u7kglSZ1Cs2rC6fU71aXb947rhy/hu1kPYhkKp7ohcbg8lFht3xhIO9jzn94Mb3H4Ij+n0T9U7+Tlv9T1n1JDtyfp9FtcxTjQ/IkBYYheN9a9K/8l0GdbUDUAlJDyJTdIz/x+sqQ6Q3LEM9+ltMGdjQJYrkq+xEkHxvYSJKRoh9ActbARpJWrtnygBd+K9avy3jlt3odlKVVq2NpBTsoSytXx2KVW7z0rN54X/96HCy8ME894QGJ89euJ+QZ7t0gVtfe7eeTk+Hc9gmVzMJUNjo3RpuXD20ZMUoVJoLmgdg2UDrtfX3OXTytt96UddbvdBOgr1RhF7sG3vV7YS0uaH2B7jcNYoxu/dddkq+H7buQV0Md7TYKvpa3UXd/GmeNfI/V9/L29noA2NS2X9QLv12MBuM8hPEj134BWVCzbHAOCYwrQw+Svo27ycuO4whtx6tdu0cNAiyZh3ZNcUZBAjlzZZPxOFXaZUe4oJLxCOUYKxnawFLqjORlcJlcX72l5SVhRgaSu+mmwY0/Y82p6Zt1BcNKviWvX1yQJo5zbeQ/zVGIm1HeeHmBZDnXwb2dckNwo8n1FQjwaTTKHR/9dHQM23r2jH17YBrao+UOn0FsqdDlDwKoCL0BTFj8sv7gI6u05TiaRrz95dt6gKMWTH/zuFIoQw+EIFaxtHcQSwsb65H1KcfygoBk53I5FZBryx5itZqhpY9G1bX/91dHxpdwGlFmXtC7FWTS+t8zSOaoLA2i7e4VePUhts/r0XoU6mfRlrlchmCV83+BgC+03LcOh0sib8/TKppO0pQq3gAZ3Gn+4HV98dv5LdT1v/I/Z7g= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluators/variants/{evaluator_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-evaluator.api.mdx b/docs/docs/reference/api/fetch-evaluator.api.mdx index cc07cf7275..6b5a20de3a 100644 --- a/docs/docs/reference/api/fetch-evaluator.api.mdx +++ b/docs/docs/reference/api/fetch-evaluator.api.mdx @@ -5,67 +5,641 @@ description: "Fetch Evaluator" sidebar_label: "Fetch Evaluator" hide_title: true hide_table_of_contents: true -api: eJzNV01z20YM/SsanJKZjaV6euKpqj9qN2njiZVeNBrPioTETZdcZhfrVtHwv3ew/BApSq7sOjM9SSKBB+ABu3jaAsm1g2gOV49Se0nGOlgIMAVaScrktwlEsEKK0wdsLEBAIa3MkNCy7xZymSFE0Fo8qAQEqBwiKCSlIMDiV68sJhCR9SjAxSlmEqIt0KZgX0dW5WsQsDI2kwQReB9QSJFmgzbB0W0CZblgTFeY3KFjmPPJhD8SdLFVBacOEdz7OEbnVl6PPtXGICA2OWFObC6LQqs4VDr+4thn20mtsMwDqSpCbHzlVGescsI12k6KF8FCQIIr6TVBNCnFjpQQL998XAXK+tgrHdpw3EC5h9g7MlnfqE5laYxGmUMp2ke51xqYpSa5Wze6qBBKwXBH8noeYtuUGjT1mcz/C+BNAChL0RiZ5ReM6dAcXAfOhnilgAxJ9rOQSaK4y1Lf9Xgd5FnPYQe26XMvUrbsP+mWdzgWxMrGXkv75tpr/asz+buPngpPb2G/WAZRhNmJXtJauXmS2D1fGND7lPNvTCZ7DEb0/0Tq7+aDcvSvtB4rcuD+PI5m1SjWF+FJDAxTYN9S9K+wl0FddiBKAbFFSZg8SHoKsHP1JpLwHamQz/EoFxXsaBrI8kXyPYJ8rmDrIAlq/A5BLivYOkhD13LDe+y0OGFZnULWz5uwv3Z8vWqUhq02SkPYq0Zp6GqjOO3XL53Ve/bl7fFq6QV9cMICObQ7TvFrpURZsv2P5+dD5fGH1CoJumJ0ZW3QTC+UHQmSVDpogGol7BtoE/fePuf2XZR7W2RX7gdTJci9ydz6kFTbbQjn5Bp3V+Zx00DGaMZvD3G9k4nzUFcVurbrtHhHb8Xu8TIuK/qeauzNbHY3AKx622/qNevgjuYJQiM1LJHXSEEWUwoRjAuLjwr/Grcay423XXFcggCH9rHRz95qiCAlKlw0Hsfa+ORMrjEneSbVWBYqzLfD2FtFm+Ayvbt9j5sblAlaiOaLrsE9j1I1HH2zti+yUO+RaaqV+9RTaqz6VnW8lu5p5cU8qHxlgntN2TQkN5re3YIALqMiaHL2w9kE9mnrGfMpkHE4BU3s8BrEHgtt/SAAs3AEgFBmP+1ecGaFcVRrzhpv2KW9jVpzQPg3jQstVRjxEHxbd3AOdQeho98dCIh6f3EWAlLjiO2326V0+NnqsuTHXz1a7tNCwKO0Si6ZtfkWEuX4ewLRSmqHg9TaOwLefKqPwtvRTsj0U256mXMjOS/+BQL+xM3+n7Fw0NNmWLa1yTSOsaCO8+Be4qlqZ/yXqxmU5T/tE9lb +api: eJydVU1v2zAM/SsGTxsgJFmxk0/LumwNumFFm+0SBIUqM7Fa21IlOltm+L8PlD/ifGHATnGsR+rxPZKugOTGQ7yE2VZmHlYCjEUnSZtinkAMaySVPuJWZqUk40CAlU7mSOg4rIJC5ggx9IhHnYAAXUAMVlIKAhy+ltphAjG5EgV4lWIuIa5AFrvv65CFdpazeHK62ICAtXG5JIihLHUCtThG1CsBpCnjV7Pu6mieQM0nDr01hUfPl1xNJvyToFdOWy4MYngolULv12UW3bdgEKBMQVhQoGZtplXQYfzsOaYaELeOVSLd3KBM2QS1HHVBuEHWqqN4HRC12Mt0tnzz9IyK4ExpQwmKMsugXtW1OInbS71sWZ3Tqa+4rjnJ+6urU4F+ykwnofxo5lww/j/VSZCkzvhJE+b+FJAZdXB6qSsGEnQK16u9CNI5uRto99U0BFn23G8G/vRd1kG/ofdyg9AnuwwNYkQLPv2XAVxXc3WLG3ixl7dR93IZnxr5zl3WQW4Wi7uThI23h6Z+5mGOZoNhzpFSw3O+QQqzTSnEMLYOtxp/jft29eNqOOE1CPDott0SKF0GMaRE1sfjscpMmYzkBguSI6nH0mo4pjINp9E1Q8M0e1Sl07QL+aZ381vc3aBM0EG8XA0BD9xnTeccwnrTpNW3yBq2u2laUmqc/tO0Q7uc0iaKRdLF2oTwVs+W20epXrDgbcZ1NrQno3ejyaVi2oBoejdvx0WqMC4djwADcSRXLxQIwDzMChDK/MP+gFla4ymXxSDfqZ0HtHo9CH/T2GZSh1kIl1et1UtorYbBbvIgID5Y6CsBqfHE+Kp6kh5/uKyu+fVriY49WwnYSqflEyu4rCDRnp8TiNcy83hCrV8m8Oa+nZm3EYjzlDtfCzaVefE/EPCCu+NPT9gIadc4VQuZKoWWBsEnC4w7rB+GL7MF1PVfgqRuyw== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluators/{evaluator_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Evaluator"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/evaluators/{evaluator_id}"}></MethodEndpoint> Fetch Evaluator -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Evaluator Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Evaluator"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "evaluator": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-human-evaluation-human-evaluations-evaluation-id-get.api.mdx b/docs/docs/reference/api/fetch-human-evaluation-human-evaluations-evaluation-id-get.api.mdx index 41250d4702..be473f2825 100644 --- a/docs/docs/reference/api/fetch-human-evaluation-human-evaluations-evaluation-id-get.api.mdx +++ b/docs/docs/reference/api/fetch-human-evaluation-human-evaluations-evaluation-id-get.api.mdx @@ -5,73 +5,430 @@ description: "Fetches a single evaluation based on its ID." sidebar_label: "Fetch Human Evaluation" hide_title: true hide_table_of_contents: true -api: eJzVVk1v2zgQ/SvEnFpAtbPBnnRaY5Ntje5H4Li9OIbASGOLXYliyVGwXkH/vRhSsiS7cYr21JMt6c3jfLyZYQMk9w7iDbyrS6nf3D7JopakKu1gG0GGLrXK8DPE8AdSmqMTUjil9wUKPKLFo3SYiUoLRU4sb2YP+kEv7N7FD1oIMUImKhOvHNnXsVjnKJY3otoJyidkVIkdn+VZVki11T2Rd3PwMpB4MGYjihlEUBm0/mGZQQwek+Rsnoy8OX3hkmTia5LskSACI60skdByshrQskSIYQKFCBSnyUjKIQKLn2tlMYOYbI0RuDTHUkLcAB0MGzuySu8hAlJU8IshLLHMoG23TOJMpR06tru+uuKfaVHu6zRF53Z1IVYdGCJIK02oieHSmEKlnnb+ybFNM/LFWE4TqXCCyi75x05FzJdcxi2MEQFrbPUJU3oBfxdQnc0op8HgmxK2ZkgbwZO0Smo+MQREWLpzijbqX0hr5WFE+THYi2XmxnRc7x8j/NszDJQusfikXJDOD1E7seqYeq975u+jXR2tGYOOHL5UwXVAdRXsbUKTvGzFqWE7R5Lqr7g6WNwHRBtBalESZomkS/jfA0osiG1qk32DzYeA8jZDkqpHluikrTfge77rh4nYz1U8VeapsJ5TxbiUk1qcJPmYu0liJhFvhwhPZii0LQf66/X1+XT5KAuVhQ67tbay3z9aMiSpiokgp4CiSidfpT78s/PD9lS4xzdKE+7RQrt9Xs1/VmkXZQSl21+q/F/onNzj0BoXJg8noxs6L4iE4wpHd7jtuIP79IbsPh/GTUjf1w47lnW9vjsjDLUtkfKKt2C/zCiHGOZ++b0ZLb95M9loLQsL7VO/9WpbQAw5kXHxfJ4WVZ3N5B41yZlUc2kU8M5ymNZW0cGbLO6W7/HwDmWGFuLNdgy4Z6mE4k9hx7xLo94jp6Hbt4ua8sqq/0NFu32bByuOU+ld5c37TeSdE4u7JbcYWhdUfTX7ZXYFp9ebCZhVLlOv8v5s/5mbapKFY/zc9KWXOBDK8rfhA3tmKkel1CM+f5sK9xkxasYTr5qh3362+1dXQ8L/aG4KqXwL+uQ1nQI3cKZAiCCe3qq2EeSVI0Y3DYf5wRZty68/12hZZdtufD5yzTcNZMrx/wzinSwcXsjoq1XXqK/Fcw73StQHP6WLmp8ggn/xcHYB9HMo77XedJhFmqKhkfXZ2OSmOLbo29s1tO0X4FkAhA== +api: eJzVVk2P2zYQ/SvEnBJAsTeLnnSKm90mRtpm4XVy8RoCVxpbTCSKIUeLuoL+ezGkZEt27A2SU0+2pDePM2++2ADJrYN4Be/rUupXt0+yqCWpSjtYR5ChS60y/Awx/IGU5uiEFE7pbYEC92jxKB1motJCkRPzm8mDftAzu3XxgxZCDJCJysQLR/ZlLJY5ivmNqDaC8hEZVWLDZ3mWBVJtdU/k3Tx4GUg8GLMBxQQiqAxa/zDPIAaPSXI2TwbeHL9wSTLyNUm2SBCBkVaWSGhZrAa0LBFiGEEhAsUyGUk5RGDxW60sZhCTrTECl+ZYSogboJ1hY0dW6S1EQIoKfnEIS8wzaNs1kzhTaYeO7a6vrvhnnJT7Ok3RuU1diEUHhgjSShNqYrg0plCpp51+cWzTDHwxlmUiFU5Q2SX/2KmI+ZLLuJkxImCNrb5gSs/g7wKqsxloGgx+SLAlQ9oInqRVUvOJISDC0p1StFH/QlordwPKz8FezDM3pON8/xrh357hQOkSi0/KhdL5JWonFh1T73XP/HO0i701Y9CRw+cyuAyoLoO9TWiS561YGrZzJKn+jqsHi/uAaCNILUrCLJF0Cf82oMSM2KY22Q/YfAoob3MQqXrkEh219Qp8z3f9MCr20yoeV+ZxYZ2rimEqR7k4Enmv3UiYUcTrQ4RHMxTalgP97fr6dLp8loXKQofdWlvZnx8tGZJUxaggx4CiSkdfpd593Phhe1y4+zdKE27RQrs+X81/VmkXZQSl217K/F/onNzioTUuTB4Woxs6zxQJxxWO7nDrYQf38gZ1z4dxE+T73mH7tC6XdyeEIbclUl7xFuyXGeUQw9Qvv1eD5TdtRhut5cJC+9RvvdoWEENOZFw8naZFVWcTuUVNciLVVBoFx1eGmf8q3jIUeKE5TGuraOf5ZnfzD7h7jzJDC/FqPQTccx2FyhjD9kmRRn1A1qhbxrOa8sqqf0O6u2WcBysWQelN5c37NRV8+12mX1FzS3Gcwe2ryevJ1blgOgMxu5t37SBT3w69Hx7G3TeSay8UT4fS9wIQyvLN4QN7aSpHpdQDPn/tChcfMejaI++aQ2P+3y5qXT4J/6GpKaTyverFa7pSXcFJqUIE8fj6tY4grxwxumk4zE+2aFt+/a1GyxW37ubsI+d/1UCmHP/PIN7IwuEFRV8suo5+Kc453Fel3vlxXtT8BBF8xd3JTdEPrLyv+6bDzNIUDQ2sT+YrN8i+l9/dLqFt/wPfwg8T sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Human Evaluation"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/human-evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetches a single evaluation based on its ID. Args: - evaluation_id (str): The ID of the evaluation to fetch. +evaluation_id (str): The ID of the evaluation to fetch. Returns: - HumanEvaluation: The fetched evaluation. +HumanEvaluation: The fetched evaluation. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"evaluation_type":{"type":"string","title":"Evaluation Type"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variants_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variants Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"type":"string","title":"Testset Id"},"testset_name":{"type":"string","title":"Testset Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","evaluation_type","variant_ids","variant_names","variants_revision_ids","revisions","testset_id","testset_name","status","created_at","updated_at"],"title":"HumanEvaluation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_type"} + required={true} + schemaName={"Evaluation Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluation Type" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_names"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Names", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variants_revision_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variants Revision Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_id"} + required={true} + schemaName={"Testset Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_name"} + required={true} + schemaName={"Testset Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "app_id": "string",\n "project_id": "string",\n "evaluation_type": "string",\n "variant_ids": [\n "string"\n ],\n "variant_names": [\n "string"\n ],\n "variants_revision_ids": [\n "string"\n ],\n "revisions": [\n "string"\n ],\n "testset_id": "string",\n "testset_name": "string",\n "status": "string",\n "created_at": "string",\n "updated_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-human-evaluation-scenarios.api.mdx b/docs/docs/reference/api/fetch-human-evaluation-scenarios.api.mdx index c8e103e27d..da17e7a15f 100644 --- a/docs/docs/reference/api/fetch-human-evaluation-scenarios.api.mdx +++ b/docs/docs/reference/api/fetch-human-evaluation-scenarios.api.mdx @@ -5,76 +5,668 @@ description: "Fetches evaluation scenarios for a given evaluation ID." sidebar_label: "Fetch Human Evaluation Scenarios" hide_title: true hide_table_of_contents: true -api: eJztVsFy20YM/ZUdnJIZRnI9PfFUTa3WmqSxxlJ8kTWaNQmJm5K7zC7oROXw3ztYkhIpWZLjXnuyvAQegAc87JZAcuMgXMBtkUn9Yfws00KSMtrBMoAYXWRVzv9DCH8gRQk6gTsj4SLU0irjxNpYIcVGPaPuGkxuBo/6UY/spshQkwsftRCiY7FSsXjnyL4PxTxBMbkRZi0owS4IY39PVJQIMmLNWewDe/h7qRy22Lfz+XT8I0KfdigmR3DKCW1IrE2hY8FpRxE6x8cxaoVxDYlUWN1iflKOFntyZk30ZShGIlWOOOmXaBlAACZH648nMYTg018lzPaqw8LOAwLIpZUZElpuTAlaZggh9CiDABS3JJeUQAAWvxXKYgwh2QIDcFGCmYSwBNrm7OzIKr2BAEhRygfjTotiqKolg7jcaIeO/a6vrvhPfwBmhWdqXaTivjGGACKjCTWxuczzVEUedvjVsU95nIu0Vm65AMLMx8otU0Sqjqxij6S3d2tffr+CKtid6CJNgRNva+JCggOeXk8BM5oXVOdwIjU2WNX9OI07YSvxma1a0BWHeoXTgzerqqC1M09fMaJehxfdNPr4HS68nI8H1oeBPX7bi14ajg1MQRfYeJZWSU0XWH6orRqKW58a/TV+d7XlJU46yRxFuUxLG+QkL3cNG1yCIXzrhD6wb8X6NPa1IEoTbtCexZ15vIq1aC1GtJLafUf71jR/r1HEqEbhKXarXGmNL2vzyZgUpT4vTiemNUIVgP4PHH72HF4Yh+Nl6du3H+vLM+GnoTFpt53wV6DwHqKzP2a77V1VnNqv19fH2/NBpiqu7cfWGvszq7OvvBhJqvSMNFMT9b7+zJgtT6vgk6kTZGoytzkn37/QObnBvaTO7GEmQ8z566W2cl116Mauq60dvTW7p8u4qel7KdhuJubz6RFg3dsMKTF8k2+Q/GVNCYQw9Df6h/3cuWHZG8JqeOK2d2if26u+sCmEkBDlLhwOo9QU8UBuUJMcSDWUufJKcBgVVtHWu4ymk4+4vUUZs94Xy67BjOennoi+2f4uztVHZG6aR8aooMRY9U/d5uaRkdRelb/N1sa7NzyNfHJiNJ3w2kXr6lG/GvwyuILD92PPmEdfRn7029j+MwQHLOzqhwAw83MPhDL7bf+BM8uNo0zqDt5FrR7kV+7l+P9T921P3WaqCH/QME+l8pvCt7NshLKAI6FAAOHhvn5RK8sAEuOIQcrySTr8YtOq4uNvBVqWw7K5+594OBclxMrx7xjCtUwdnmn4u/tmzbwXp+poJaO3/onhH3QAAfyN26Pnud+iSSvKsrEZRdyqjvfR0mf17hbMn+M5VNW/asW9Lw== +api: eJztVsFy2zYQ/RXMnpIZRnI9PfFUNVZqTdJYY6u+yBoNTK5EJCTAAEsnKof/3lmQlEjJkhzn2pNl8O3D4u2+BUoguXYQzuG6yKR+N36SaSFJGe1gEUCMLrIq5/8hhA9IUYJO4BYkXIRaWmWcWBkrpFirJ9RdwORq8KAf9Miuiww1ufBBCyE6iKWKxRtH9m0oZgmKyZUwK0EJdkmY+3uiokSQESvOYrexp7+VymHLfT2bTcc/IvRph2JyQKec0IbEyhQ6Fpx2FKFzvByjVhjXlEiF1S3nJ+VovhPnrtl9EYqRSJUjTvo5WQYQgMnR+uVJDCH49JcJq73sqLCNgAByaWWGhJYLU4KWGUIIPckgAMUlySUlEIDFb4WyGENItsAAXJRgJiEsgTY5BzuySq8hAFKU8sK4U6IYqmrBJC432qHjuMuLC/7Tb4C7wiu1KlJx24AhgMhoQk0Ml3meqsjTDr84jikPc5HWyg0fgDDze+WWJSJV76xiz6Q3Nyt//P4JqmC7oos0BU68PRMfJNjT6eUSsKJ5QXUOR1JjwLKux3HeCaPEZ0a1pEve6gVB9x5WVUGLM49fMKJehefdNPr8HS28nQ8b1m8DO/62Fr00HANMQWfUeJJWSU1nVL6vUY3EbUzN/pK4mxp5TpNOMge7nJel3eSoLjeNGnwEQ/jaDr3n2Ir9aexLSZQmXKM9yXvn+Sr2orUY0VJq9x3ta9N8X7OIUc3CXeyWudIan/fmozEpSn3anE5Ma4YqAP0LGn72Gp5ph8Nh6cu3a+vzPeG7oYG00074K1D4CNGZH3fb6V1VnNrvl5eH0/Nepiqu8WNrjf2Z0dl3XowkVXrCmqmJel9/ps0Wx13wydQJsjSZW5+y79/onFzjzlIn5jCLIWb89VxZ+Vz11g2u662tvLW6x49xVcv33GbbnpjNpgeEdW0zpMTwTb5G8pc1JRDC0N/o73Z954Zlrwmr4ZHb3qF9aq/6wqYQQkKUu3A4jFJTxAO5Rk1yINVQ5gr232Qj/1W8Z6i3icOosIo2nm80nXzEzTXKmIfBfNEF3HFz1e3Sh+0u6lx9RBaueYGMCkqMVf/WPdC8QJI6qvJX3cr48EbEJrc/ZfQVtZ/LaF2d9sXgt8HFscM0AWI0nTQekZH3SJuHh0GwJ9dWKAgAM28QIJTZH7sPnGVuHGVSd/jOmnovz3Ln2//fxK97EzcdRviDhnkqlR8pvpxl46g5HDgKAgj3B/uzploEkBhHTFKWj9LhPzatKl7+VqBlayyaR8IjN+q8hFg5/h1DuJKpwxMFf3PbzKO34tg5WvvojX+L+JcfQABfcXPwjvfjNmkNWjaYUcSl6kQf3A7s5O0k+ms8g6r6Dzy/y74= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Human Evaluation Scenarios"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/human-evaluations/{evaluation_id}/evaluation_scenarios"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetches evaluation scenarios for a given evaluation ID. Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. +evaluation_id (str): The ID of the evaluation for which to fetch scenarios. Raises: - HTTPException: If the evaluation is not found or access is denied. +HTTPException: If the evaluation is not found or access is denied. Returns: - List[EvaluationScenario]: A list of evaluation scenarios. +List[EvaluationScenario]: A list of evaluation scenarios. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"evaluation_id":{"type":"string","title":"Evaluation Id"},"inputs":{"items":{"properties":{"input_name":{"type":"string","title":"Input Name"},"input_value":{"type":"string","title":"Input Value"}},"type":"object","required":["input_name","input_value"],"title":"HumanEvaluationScenarioInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"variant_output":{"type":"string","title":"Variant Output"}},"type":"object","required":["variant_id","variant_output"],"title":"HumanEvaluationScenarioOutput"},"type":"array","title":"Outputs"},"vote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vote"},"score":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Score"},"correct_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["evaluation_id","inputs","outputs"],"title":"HumanEvaluationScenario"},"title":"Response Fetch Human Evaluation Scenarios"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_id"} + required={true} + schemaName={"Evaluation Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluation Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + inputs + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"input_name"} + required={true} + schemaName={"Input Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Input Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"input_value"} + required={true} + schemaName={"Input Value (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Input Value" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + outputs + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_output"} + required={true} + schemaName={"Variant Output (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Variant Output", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>vote</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>score</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>correct_answer</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_pinned</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>note</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "evaluation_id": "string",\n "inputs": [\n {\n "input_name": "string",\n "input_value": "string"\n }\n ],\n "outputs": [\n {\n "variant_id": "string",\n "variant_output": "string"\n }\n ],\n "vote": "string",\n "score": "string",\n "correct_answer": "string",\n "is_pinned": true,\n "note": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-invocation-by-trace-id.api.mdx b/docs/docs/reference/api/fetch-invocation-by-trace-id.api.mdx deleted file mode 100644 index 3c93f919bb..0000000000 --- a/docs/docs/reference/api/fetch-invocation-by-trace-id.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-invocation-by-trace-id -title: "Fetch Invocation" -description: "Fetch Invocation" -sidebar_label: "Fetch Invocation" -hide_title: true -hide_table_of_contents: true -api: eJztmktv2zgQgP+KMacWUONssCefNpu222zSTZC6vQSGQUtjiw1Fqny46xr674uh3n4ojpMCxUInw9I8yG84Q5rjNVi2MDC6h0u5VCGzXEkDkwBUitp/u4xgBHO0YTzllch0tppazUKc8ggCSJlmCVrUZGkNkiUII2gIcAkjSJmNIQCN3xzXGMHIaocBmDDGhMFoDXaVkp6xmssFBGC5FfRgTIYGlxFkWVBZNymTDePfHOpVy/qcCdMyz+TqZu4H2HZERosn0gkB2aR2/SllMvc8IdsmVdKgIWtnp6f0EaEJNU8JCom7MERj5k4M7gphCCBU0qK0fgxpKnjOcPjVkM66McJUE3bLcw+hcrlSMTguLS5QN8BceIkAIpwzJyyMTjPCUUapPekN4xqZxWjKbBeaAOZKJyQDEbP4xvIEO3ld5GYH5xayAFwa/Qwnn3OzhZMIBf4EJ29zs4WTEtdsRWvuMD/O8eggWH+u/BKreb2ol5JW5aUE9qJeSlyVlzI/n5t4QV1HjjRVl48AlOYLLvPELXIGQmesSiitNmaP0iVUGiuB2CVMQgDMWQXNwfIkFej93OQOsgAeuIzajlgUq7DDT/kel0xQVRVstcfLFdmmZRkzKVFsuEl5hxNlRQoBfMcZBGCiB5pOyvf4uSjsUxT8PtGMAIsiTmWGidtWaTkgRmUpa4UtmbWfzJQSyKR/tNsXhFyHTjD96h91zY392yj55sbZ1NnXNQI1+4qh7VwiW+p+xgerj4lNFkCClv26jN47IR4lxC0mB2oxrdmqk8uG7tOgfiSYVK5YAbVH2YWyUYpZDk7jHDXKMMfU3v7z41LH+WCJ2mwdIQ6vuV8KddoIhFscvQuQLp1pXmyfyk+Re9ndlcx2GMmCHNt0yTRn0vb4jsOnccm34fT8Hudn0ViD/cI7Flyfuc8F2OfusQQbv/x7eM+A1+fwS0Ds8/hYivTj3DGrdI/uaHR9Dj8fYZ/BzznLhMxgT+5p5Dr0GleGd/WtQxaA4PLhwGvDdgB+xevjDgDXXD7svt4qboH+X/N7/L7q2gd+l8m6Q3ef3+21bqrKJdNcs3VD62mrslasmnFZRgq/n51t9+6+MMEjLz14p7XSxzfuIrSM+0v5PcEXKmy9fcoV5mQzCg3mNSZIzKKrpfoRjWELrEO6X9TDGIzp7WPhFL59Qa4LuWZJrPDmdPdP422OryuyH8bj2y2DeWzbQX1PjetBYwX5S/pYUVN7gdb3rm0MIximtKHi92HdPjXDdZlbGfVKUC/LDrfTAkYQW5ua0XAYCuWiE7ZAadkJ40Pqp1AuGAyd5nblVc5vL69w9QFZhBpG95OmwCdaSPnSaItVUWEpv0KCVHS/z52NleY/ykn5Hnica2W+CTxXXr0Adu4HNzi/vYSg3tzg9OS3k1PYhNYSphxgoc+B0rd/DcEGhWr+1GxKfAKARZb8Ub+gkaXKWOqi1fZ2xKg1ngqCxX/tMBUs76957+sifvdQxA+aDXAqJ6OqPk4CiJWxJLxez5jBz1pkGT0ubsPv1xBxw2ai8feBB1y1/mxA5y8aiw+wP8bOCPAu1Y1JVMUEXt0VOfN6ULcA2pMrwy5XTZ/lcKop+WoQl2tqXbw+D0NMbUNxq3jR4Ks8+OvdGLLsPzp5kOg= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Invocation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/invocations/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-invocation.api.mdx b/docs/docs/reference/api/fetch-invocation.api.mdx deleted file mode 100644 index 76f28e4ff6..0000000000 --- a/docs/docs/reference/api/fetch-invocation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-invocation -title: "Fetch Invocation" -description: "Fetch Invocation" -sidebar_label: "Fetch Invocation" -hide_title: true -hide_table_of_contents: true -api: eJztmt1v2zYQwP8V455aQI2zYE96Wpa2q5d0DRK3L4YR0NLZYkORKj/ceYb+9+Gobzt2HCcdikFPiSXeHfk73pG+8xosWxgIJzCSSxUxy5U0MA1AZaj9p1EMIczRRskdr4dAABnTLEWLmqTXIFmKEILVLMI7HkMAXEIIGbMJBKDxm+MaYwitdhiAiRJMGYRrsKuM5IzVXC4gAMutoAdjUjQYxZDnQa3dZEw+RTmTq09zP72uGVJZPpFOCMinjeHbjMnC7pRUm0xJg4a0nZ2e0p8YTaR55jGEcOuiCI2ZOzG4KQdDAJGSFqX1c8gywQtqw6+GZNatGWaaQFteWIiUK4TKyXFpcYG6heXCjwggxjlzwkJ4mhOM2i+dRW8o18gsxnfM7kMTwFzplMZAzCy+sTzFvbwuCrWDcwt5AC6Lf4SRz4Xa0kiMAn+AkbeF2tJIhWu2oh13mB3neHwQrN9Xfos1vF7USkWrtlIBe1ErFa7aShWdzw28oMkiR6pqkkcASvMFl0XgljEDkTNWpRRWG6tH6VJKhvWAxKWMsh1zVkF7sjzNBHo7nwoDeQD3XMZdQyxOVLTHTvUel0xQThVstcPKJemmbZkwKVFsmMn4HiPKigwC+I4zCMDE97ScjO+wc1HqJy/4k6HtARbHnNIME9ed1HKAj6pU1nFbOus+mSklkEn/6GFbEHEdOcH0q7/UFTf2T6Pkm0/OZs6+bhCo2VeM7N4tsiXuV3yw+JjY5AGkaNnPy+i9E+JRQtxieqAU05qt9nLZkH0a1I8Ek9IVK6H2KPehbKViVoDTOEeNMiowdY//bw71at/9YInabF0hDs+5X0pxOgiEWxx9CpAs3Wle7Jwq7pA72d1UzB5QkgcFtrsl05xJ2+M7Dp/GJd+G0/N7nJ9FYw32G+9YcH3kPhdgH7vHEmx98+/hPQNeH8MvAbGP42Mp0pdzx6zSPbqj0fUx/HyEfQQ/5y4TMYM9uaeR2yPXKhneNFWHPADB5f2BZcOuA37G8vEeAFdc3j9c3iqrQP+v9T1er7ryjn9IZdOgmxS1vU6lqtoy7T3bNLSetisbwboZl+ck8OvZ2Xbv7gsTPPajB++0Vvr4xl2MlnFflN/hfKGiztunlDCnm15oMW8wQWoW+xqqH9EYtsDGpbuHehiDMb19zJ3Cty/IdDmunRJrvAXd3ct4W+Db59kP4/H1lsLCt12nvqdW9WDUblWnaBNFbewFWt+5tgmEMMzoQMXvw6Z9aobrKrby4boM2Jy6JqiXVafbaQEhJNZmJhwOI6FcfMIWKC07YXxInRWKCoOR09yuvMj59egSVx+QxaghnEzbA25pSxWbpDus9g/L+CUSrrILfu5sojT/p1qe74UnhVTu28Fz5cVLdOd+coPz6xEEzTEHpye/nJzCJr7OYIoGFvloqGz71xBsUKjXT22n1IcCWGTpb80LmlmmjKV+WqPvAW915lNDsPi3HWaCFZ02b31denICpSeh3QqnxBK2fo4QVvl3GkCijCW59XrGDH7WIs/pcVkin0wD8NfVGeGbrCHmhv6PIZwzYXBrinXSgFc3ZWy8HjSl/u7UK6dK8ijd7egTBHCPq/bvJygR/Id2Kzg+2STVRl2Xb8+jCDPbktvKjbSj6zD7490Y8vxfxkmrXg== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Invocation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/invocations/{trace_id}/{span_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Invocation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-application.api.mdx b/docs/docs/reference/api/fetch-legacy-application.api.mdx deleted file mode 100644 index f1e3c0612f..0000000000 --- a/docs/docs/reference/api/fetch-legacy-application.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-legacy-application -title: "Fetch Application" -description: "Get an application using workflow data stored in legacy format" -sidebar_label: "Fetch Application" -hide_title: true -hide_table_of_contents: true -api: eJzNWN9v2zgM/lcMPm2A1/SKe/LT5fpj7W13K9Z2L0VQMDaTaJMtT6LaywL/7wdJdmInTS5JWyBPiW3yI/WREinOgHFsILmHfllKkSILVRgYxJCRSbUo3TMk8JE4wiLChVBkjSjG0ZPSP0ZSPUUZMkaGlaYsEkUkaYzpNBopnSNDDKok7fWuMkhgRJxOHoLMQwsUYihRY05M2nk1gwJzggRaMg8igxiE86pEnkAMmn5aoSmDhLWlGEw6oRwhmQFPS6dtWItiDDHU7iRgrUdhwdIJtBYfXWVQVQOHakpVGDIO6OT42P10SbmxaUrGjKyMvtbCEEOqCqaCnXjL695343RmLedK7UhhESykygal2mdRMI1Jt5w89RIuMiO0kiE5ruK2CW+xmH4ZeeK66CPpw7xeQJiH1BpWeVeodmaolCQsoIrnrworJTieGveuTHQaEKrYwdEjSous9EsQz+cgAXRicyxeAnjpAaoqboTU8Dul3KL5s8/KVkZceO5WcasYcmLseoNZJpwSyusOvyv+1jnZgm0i3rGUD7tv2st83hakQqdWon53YaX8y6jiwxfLpeX3sLxoByKY8i21UGucbiR4SRdWaN6k/Lcj02mspOohkfqP+iwM/y+t6xa5or4bR7chFetjcSsGVl1wutXSCb8f1FkLoooh1YRM2QPyJsDWMZwh0wcW3p/1Vk4DbNT3ZNkyewsjdwG2NpKRpDcwchZgayMNXcOpq2nb2fGFaxuy/pz6Srbg61WtNGzNrTSEvaqVhq65FSPteN9cvXG6roq8mnv1ynG5BnQr6yNp84It9q1Wd5HUYl+UOy0CgtwfQTqECWHme7Pdzue3ouTwEmJDZ/GVRqSpSDtnROPoYKc6cFmHoWq63W0jckCV9CDbkx1icFMT7/pALEtRbNu2LFO8S4/UGPKBd6V37+wP2lX3xnWoXddB5sp65esFpS5QpB9FStuwGy6wO+RgDV35e+dIjK1+5i74OrZOOwZ2ukKdoW/tV25Qu2C8VH9+Ra8qp/f7ycnqjf4bSpGFMcC51krvf53PiFH4Yltn5bKAVGnn6y67qlUrQiK3lq3mbEFuxs8NQRb3LWNwTIvMXi/qyYhu3dfnOF8MYO79uoLpWq5duOf0BnbXL+Ms0LcpwJe3t9crgCG2OfFEuTnTmNiPlHgCCfRKTY+Cnnph7tRrhdP0Zt0JUwVh2zZjKN84wYS5NEmvl0plsyMcU8F4hKKHpfA7xVBqteCpV+lfX32iaSjUkNwP2gK+dIQ86IrNQ4Cl+ESOkXoA1rc8UVr8asZkfv4VmjHPkihGyqs3Ey3vXNS/voJ40W/B8dFvR8ewPN3rCLuEx9QnfGPbf4Z4iYX5+iEGyn22AxPmfyw+OM9KZbge2tR4F276F/U7Y7+ly+h817188lgTyvQv90qJomg1wiEz7qHODIghaENnsGYghmRpAjmIYaIMO+XZbIiG7rSsKvf6pyXtMmAQwyNqgUMXj/sZZMK4/xkkI5SGNiz53dd6P72P1vnfZEnhXHUzMvcEMfyg6eq01J8XkyYRZ7VQP02p5Jb6yvHmMna+lT6e30JV/QeWQaHB -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Application"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/legacy/applications/{application_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Get an application using workflow data stored in legacy format - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},{"type":"null"}]}},"type":"object","title":"LegacyApplication"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-evaluation-results.api.mdx b/docs/docs/reference/api/fetch-legacy-evaluation-results.api.mdx deleted file mode 100644 index 5d704549b3..0000000000 --- a/docs/docs/reference/api/fetch-legacy-evaluation-results.api.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: fetch-legacy-evaluation-results -title: "Fetch Evaluation Results" -description: "Fetches the results of the evaluation" -sidebar_label: "Fetch Evaluation Results" -hide_title: true -hide_table_of_contents: true -api: eJzVVU1v2zAM/SsGTy0gxFmxk08LsG4NumFFmu2SBoFqM7Y6W3Ylulhm6L8PlO3YTtYCO+4UWeLH4+Mj0wDJ1EK0gesXmdeSVKktbAUkaGOjKv6GCD4hxRnagDIMDNo6JxuUe/+JR78H/aAXJrXRgw6CYPSwU0lwYclcRicegUpaW4PPNVoKLlbtobPsr8vHJ4yJ46+QaqP7FDs6VLiLgt0I7Q4ElBUan2CZQAR7Br/LMZXxYTdC1RUCAippZIGEhploQMsCIYJJASBAMROVpAwEMDJlMIGITI0CbJxhISFqgCFBBJaM0ikIIEU5Xwz8BssEnNtyEFuV2qJlv6v5nH+mvN/XcYzW7us8WHXGICAuNaEmNpdVlavYhw2fLPs0AxbnnBPw/urqPPAPmaukRXNtTGn+ISpUhvkl1eJOkKTK+aQIC3tukJfx5FXqw7e953lKlRPHG6UJUzTgtk70d9IYeRjx+aVsAYITUNj0Leq/orUyRTgGe6NLTEaw5lc35G71N2n7xtfVpu7stkOYgd6W3dfL+NjS97dkvcnNen13FrDtbYGUlazxFMnrmDKIIByUa8NmImMXDqq3aF56ydcmhwgyospGYRjnZZ3MZIqa5EyqUFYKWLAW49ooOniXxd3yFg83KBM0EG22Y4N7Fkvb/qnZkXlZqVtkIrphW9SUlUb9bnvaDVvWenGlSu9L796RsvDggsXdEgRwGa2u57N3szmcrq+JMetcxl7nfW7/DOKEhWP9IAALL3IglMWH4YGRVaWlQupRPL8tg9HAr46cT3A1w8z9bxu26yLhLwqrXCo/hp6+plPhZrQ/ufLodJ32QtwKyEpL7NE0j9Lid5M7x9fPNRrW2lbAizRKPnLnNw0kyvI5gWgvc4tvsOqr5YG9DF4D3etRsxgZIn+BgJ94OPsP8Pso6xXfdDaLOMaKRt5n65NH4ziqn6/X4NwfLH2VVw== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluation Results"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluations/{evaluation_id}/results"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetches the results of the evaluation - -Args: - evaluation_id (str): the evaluation id - request (Request): the request object - -Returns: - _type_: _description_ - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-evaluation-scenarios-comparison-results.api.mdx b/docs/docs/reference/api/fetch-legacy-evaluation-scenarios-comparison-results.api.mdx deleted file mode 100644 index a8ea7d7d9d..0000000000 --- a/docs/docs/reference/api/fetch-legacy-evaluation-scenarios-comparison-results.api.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -id: fetch-legacy-evaluation-scenarios-comparison-results -title: "Fetch Evaluation Scenarios Comparison Results" -description: "Fetches evaluation scenarios for a given evaluation ID." -sidebar_label: "Fetch Evaluation Scenarios Comparison Results" -hide_title: true -hide_table_of_contents: true -api: eJztVcFu4zYQ/RViTruAaqdBTzrVaNKusSkaJG4vjmEw1FjiViK1nFG6rqF/XwwlS3LsDdqee7JMzrx5nDePPADrnCBdw+2LLhvN1juCTQIZkgm2lv+Qws/IpkBSOAQpMuh0sJ7UzgelVW5f0E0DljezJ/fkFiFvKnRM6ZNTSk0itjZT74jD+1StClTLG+V3igucggj2X4U1hWKvdsJiLBzhH7QlPGJ/WK3ub78YjLRTtTyDs6ScZ7XzjcuU0DYGiWQ5Q2cx6yCRm+COmHeWeD0257GvvknVQpWWWEhfassMEvA1hri8zCCFSH9bYq7Nfjtpw5CyNb6qdbDk3TYgNSUTJFDroCtkDCLTAZyuEFIY82lrM4mzItTnBsMeEgj4ubEBM0g5NJgAmQIrDekBeF9LPnGwLocE2HIpCxP91TIjaNuNwFDtHSFJ5vXVlfycTsZjE1u4a0r10AdDAsY7RscSruu6tCYCzz+R5BymbPrqx1wVJ03dxSapkZN6HMbtp6FJUjE2qW3bNoEfrq/P+f2hS5t1ELch+PBvyNVBBGTbHT9D1raUL8tY0XlA6c3Jrnb733ZRs9Oet8mwYh1jjgHaTZsc13QIej8R5s53BKFNoKL8LQ1/RSKdIwxgb8gtzVAr2W3H2v75Exo+mZ91PFdXuo/bjDBje7vufvsYN137LhU7hoh9zwA7bSvkwouJcuToCS4ghfnEBfNLjpqPjvpudBRheDnaqQklpFAw15TO56b0TTbTOTrWM23nurYgPiA0TbC8jymL++VH3H9AnWGAdL2ZBjzK8HTjcBo2KKFr+xGlMb2RFw0XPti/O417Gxddlpzcup2fOmURyanF/RISkGN0c341+352Ba/v7ZNgmXtt4twfa8dtSF51YTg/JIBVHHpg1NWP44Ywqz1xpd0ErzPvP3XtK7KH0Zj/vzf/7b3pR4zxC8/rUtt4Z0RtD71l1tOHQ+S9YJo4Kme22SRQeGKBOByeNeHvoWxbWe7eHHFGZkk/l3Jr7HRJ+IbA7x76C+a9+hbvP3F/8Z2TBYmOxnzRwUrJ6MPk6Bvh0qUvjKgzyTq78QVluF1+uV1B234FVswuPQ== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluation Scenarios Comparison Results"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluations/evaluation_scenarios/comparison-results"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetches evaluation scenarios for a given evaluation ID. - -Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - -Raises: - HTTPException: If the evaluation is not found or access is denied. - -Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluations_ids","in":"query","required":true,"schema":{"type":"string","title":"Evaluations Ids"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Fetch Legacy Evaluation Scenarios Comparison Results"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-evaluation-scenarios.api.mdx b/docs/docs/reference/api/fetch-legacy-evaluation-scenarios.api.mdx deleted file mode 100644 index 2801de0de8..0000000000 --- a/docs/docs/reference/api/fetch-legacy-evaluation-scenarios.api.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -id: fetch-legacy-evaluation-scenarios -title: "Fetch Evaluation Scenarios" -description: "Fetches evaluation scenarios for a given evaluation ID." -sidebar_label: "Fetch Evaluation Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJztV0tv2zgQ/ivEnFpAsLPBnnRao8lujWSbIMn24hgGI40tthKpkqO0XkP/fTGkbEl+N6c99BSHnMc3M9+MhisguXAQT+D6VeaVJGW0g2kEKbrEqpL/hxj+REoydAI3QsIlqKVVxom5sUKKhXpF3RUYXw2e9bMe2UVVoCYXP2shREdiplLxzpF9H4unDMX4Spi5oAy7Rtj290wlmSAj5oyidezNP0jlcG3749PT/fWPBD3sWIx3zCkntCExN5VOBcNOEnSOj1PUCtNgEqmyem3zVjmatMl5bLxPYzESuXLEoPelZQARmBKtPx6nEIOHP8txIZPlrJOGjQpEUEorCyS0XJMVaFkgxNDLGUSguCalpAwisPitUhZTiMlWGIFLMiwkxCugZcnKjqzSC4iAFOV8cN2pUQp1PWUjrjTaoWO9y4sL/tNnwGPlUzWvcvHQCEMEidGEmlhclmWuEm92+MWxzmoXi7RWLjkAwsL7Ki3niFTwrFJvSS/v5j78fgR1tDnRVZ4DA1/HxIFEW3k6PwWc0bKigGE/tFCJwxY/8X0dNfeH5Z74vI6AAQTB5uKzP6g3JsC8fMGEehWeBBiNyNrIdF9ca56OObAW2KYCm8SFwOsITEUncmDRVTntnv90zJsKHytpk5AI0Fpj+8To+y/QObk4CuHvRqSOwJFMvpKVCb6VbI+thVP1WkPr1siHs2v/lCl/17HzEKpRcxc62huLrooX3OertfKBdesIckmok+Vbzdw26qeCaCh0lLJ3nohHOHvXMNWHbi0mNJPaffdDswv/AI2/4vIYVW5w2W/QA3LnNSw729OoHwLukYe9E+rxgnlNMWoi5uHlZqXSGvdPzxdjcpT6+Ph04j5YqCPQht7cGp9Yt46aOh8bJs2sNnaWGD1XizPGtbHiQ5DdePg1jP5fw+iE2k7Ro7MmQjvqDkyEh4ZuZ/rvLFJ+kLQfv5a53eHmV7ZdWB5Qi8AvRcKvyiKoiM6e8bjZ8uqaYf5+ebm7ZX2WuUqDfKjMT6xYfRqmSFLlR/ovN0nv9gzuKU244HE1PVyJWxMAcm4Kd7SrO21wqml9MkRo3RMl5riC62iHpW1617w/FMZVSN8+Z2sRfmzsGAy1LZAywyv/Askv9ZRBDMOWfW646lGxHh54Dzi0r+vHQGVziCEjKl08HCa5qdKBXKAmOZBqKEvl54LDpLKKll5ldD++weVHlClaiCfTrsAjMydwoS/WbuuluvGfr+YZMqooM1b9GwrcPEOyoFX7JXpuuivtyIMTo/sxfwLRukDyi8FvgwvYfmL2hJn0MqF28W6uIdrKwiZ+iAALz3gglMUf7QUjK42jQuqOvdCme/tzC9mqbcFf7+C3vYMbPhH+oGGZS+Wngy/kqmmO7mjmCsTbk3pvf0wjyPzuO4HV6kU6/Mfmdc3H3yq03AJT/tBbJV+YkJMVpMrx7xTiucwdHin1u4dmqLwXhyJYt4luV7wYIAoL5ta3xs/MbN2IzRIKo4SL1NHeGfHcsZtx8tf1E9T1f4vvHQI= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluation Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluations/{evaluation_id}/evaluation_scenarios"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetches evaluation scenarios for a given evaluation ID. - -Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - -Raises: - HTTPException: If the evaluation is not found or access is denied. - -Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"evaluation_id":{"type":"string","title":"Evaluation Id"},"inputs":{"items":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"value":{"title":"Value"}},"type":"object","required":["name","type","value"],"title":"EvaluationScenarioInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"properties":{"result":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency"}},"type":"object","required":["result"],"title":"EvaluationScenarioOutput"},"type":"array","title":"Outputs"},"correct_answers":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"}},"type":"object","required":["key","value"],"title":"CorrectAnswer"},"type":"array"},{"type":"null"}],"title":"Correct Answers"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"results":{"items":{"properties":{"evaluator_config":{"type":"string","title":"Evaluator Config"},"result":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"}},"type":"object","required":["evaluator_config","result"],"title":"EvaluationScenarioResult"},"type":"array","title":"Results"}},"type":"object","required":["evaluation_id","inputs","outputs","results"],"title":"LegacyEvaluationScenario"},"title":"Response Fetch Legacy Evaluation Scenarios"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-evaluation.api.mdx b/docs/docs/reference/api/fetch-legacy-evaluation.api.mdx deleted file mode 100644 index f715468b83..0000000000 --- a/docs/docs/reference/api/fetch-legacy-evaluation.api.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -id: fetch-legacy-evaluation -title: "Fetch Evaluation" -description: "Fetches a single evaluation based on its ID." -sidebar_label: "Fetch Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJztWEtv4zYQ/ivEnHYB1U6DnnSqsUm7RvoIHG8ujmEw0ljirixpyVFQ19B/Xwyppx3LeRzaADklpmY+zuObITk7IBkZ8Bdw+SCTQpLKUgNLD0I0gVY5/wYffkMKYjRCCqPSKEGBjbS4lwZDkaVCkRHTi9FdepdOdGT8u1QI0ZFcqVB8MKQ/+mIeo5heiGwtKO6BUSbWvJdFmSEVOq2BWgOdvpXDsKM9Ag+yHLX9MQ3BByuzSjCSwXbVCoIHudRyg4Sand9BKjcIPvSMBQ8UO59LisEDjd8LpTEEn3SBHpggxo0Efwe0zVnZkFZpBB6QooQXWovFNISyXDKIybPUoGG987Mz/tMP9U0RBGjMukjErBIGD4IsJUyJxWWeJyqwsOOvhnV2HVtyzREg5XZQ4ZB9bJTHeKthuUmeCyeb6+wrBnRC/tpJVToPUiuZso4ziXBjDrVLr16QWsttB+3W6YtpaLpwnLHXAf5lETqQGh+Ucbl/HfKsAqptroFfhjprtFkGDRmsMyDT7d9rS+B9sGYlLZIEmHo13NwhVNmp8VwBvA6RA8qYhiQV5pCNTv84b+a8bvORFH1jhna/tdKlB6h1pvs+9PffoDEyGjThz0rEeRF8Iy2DF8flpkUo2/Rm91wcvYayaEzraF9adw7xT0HZb8sufUyRkK30KNIYScJwpe1in4/9YFWtMNOrIEvXKhoK7FPaTE2wY1I1eV7SYlpbv+H2CR050+IKtzbJSKTSyKws50zfSRmGitusTK477rru38/AIAuqLcSt26L0INBosyBpyNhPTkpMbPKKPHyCzhcnZXVO8MQecDYrvaDvR7Nnbc+M5SNx/eS4wvF4RvQeQxINFDiyvveT/1c/OaF20D+aPHawJk1HarvUkVOwFRWzqnlxS3tALSNcBZmhoVS9U+U/PXoOgDygjGTynrc3l7e64hJJmAbb9+S9peQNXzzWmd7wF+Aj/idS9mrwktvIINBzryjV+3TvktJ9Ve4/Co+86LrvsOaR8uit+Dl3Hn61lyV78sv5+eFz/lYmKnQzAJfgF7/lQySpkoEbe5IFva9PoLBKCSPUVUd+/OD9IwsqLz3YmOiJ1XSq9m0whOsAJ1jAfrmtvQOyt+Gty+eYGxcufI9tVot8ns+vDwBdbjdIccYTpQjJTo8oBh/G7bzIjHe94VHJFEP9UA+YCp2ADzFRbvzxOEiyIhzJCFOSI6nGMle2kxgMCq1oa1Um19Mr3H5GGaIGf7HsCtwwSVza+2JNxGWuruz1vRptTQqKM63+rQdgdrQVOy32UKXrzKo39y02Tkyup1xPqI3j89no59EZ7M8He8LMbxlYftd7289cSb0oNP7zo2NjyQ2EcvNr+4EtyzNDG5l28Ow4sjMQ3Ldn19bYGxpdVokj/IfGeSKVrTgbsV1FuEVnQMldyu/PK5cexPY+tYDdjn37opOy5OXvBWom1bJqjfec4sUOQmX4/xD8tUwMDoTxw6yqyI/imKk18dItNGc6gAf2Tb43WrUNJ66pvatkJkGAOXW0D/oj10BTi79fzqEsfwCp687l -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetches a single evaluation based on its ID. - -Args: - evaluation_id (str): The ID of the evaluation to fetch. - -Returns: - Evaluation: The fetched evaluation. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variant_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variant Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Id"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"status":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},"aggregated_results":{"items":{"properties":{"evaluator_config":{"anyOf":[{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"},{"additionalProperties":true,"type":"object"}],"title":"Evaluator Config"},"result":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"}},"type":"object","required":["evaluator_config","result"],"title":"AggregatedResult"},"type":"array","title":"Aggregated Results"},"average_cost":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"total_cost":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"average_latency":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","variant_ids","variant_names","variant_revision_ids","revisions","status","aggregated_results","created_at","updated_at"],"title":"Evaluation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-legacy-evaluations.api.mdx b/docs/docs/reference/api/fetch-legacy-evaluations.api.mdx deleted file mode 100644 index 8280b19ff4..0000000000 --- a/docs/docs/reference/api/fetch-legacy-evaluations.api.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -id: fetch-legacy-evaluations -title: "Fetch List Evaluations" -description: "Fetches a list of evaluations, optionally filtered by an app ID." -sidebar_label: "Fetch List Evaluations" -hide_title: true -hide_table_of_contents: true -api: eJztWEtv4zYQ/isET7uAaqdBTzrV2E27QdJu4GRzcQyDkcYyd2lKS46Cuob+ezGkXoxtOY9Du0VOhqmZj/P4ZkjOlqPILI9n/OxBqFKgzLXl84inYBMjC/rPY/4bYLICywRT0iLLlww68YjlTk4otWFLqRAMpOx+w4RmoijY+cfRnb7TE5PZ+E4zxmh1IVP27nOtN7No5u9jNtEtVK3JMK8hGa6gv6vDnAKWRjewl9LirPNjHrPJPntHPOJ5Acb9O095zJfk3kJBJpLNoifJI14II9aAYChIW67FGnjMvQM84pKi870Es+ERN/C9lAZSHqMpIeI2WcFa8HjLcVOQmkUjdcYjjhIVLUzIyZRX1Zy0bZFrC5YUTk9O6CfMwnWZJGDtslRsWgvziCe5RtBI4qIolEyc7eOvlnS2u0YIYwRZKxHWbq/CUDRQ+p1lOmQwGRs17j/BsYjQv0KCR+SvvFSt8yCMFJp0vEmNpaF2FT12qUG79frsPLV9OEre6wD/dAg9SAMP0spcv9rUaQ3U2NwAvwx12mqTDFi00GRA6M3npePyY7B2RZdKcaJkA3fjEersNHi+Fl6HSAElTIsCyz1s9PqHeXND6y4fqgyNGdr91klXEQdjchP6EO6/BmtFNmjCH7WI9yL5hkYkL47LdYdQdenN76k4gg4za03raZ85d3bxj0G5b/M+fWyp0FV6lhnIBEK6MG4x5GMYrLpz5maR5Hops6HAPqXNNAQ7JNWQ5yUtprP1G2yG1M4aQXYBG5dkQJQ6swvHORs6KdJU+gPsqueuPw7CDAyyoN6C3fotqognBlwWBA4Z+8FLsYlLXlmkT9D54qWczhGeuCPPZSUI+uNoBtYGZsz3xPWD5wrF4xnR24fEWijuyfrWT/5b/eSI2k7/aPPYw5q0HanrUgdOwU6UTevmRS3tAYzIYJHkFodS9UaVf/Xo2QGKOOYo1Fvefri8NRWnBIJONm/J+5GSN3zxWOZmTV84HfE/oXRXg5fcRgaBnntFaZ/nwSWl/6p8/Cg88KLrv8PaR8reW/Fz7jz0mq+C6Lu3PHNTFnbpxhCsP4+pKnL7l9PT3ZnArVAydWLMs+EZA4GQ+imgkGrgeq/yJPj6BL5LjZCBqdv3/lP6Mk/akKxt9sTSO9YoXDCYbxdHKEN++a2jncrowtvU2iE3Pvrw7dusEfl0c3O1A+hzuwZc5TSKygDd1AlXPObjcBZlwTw0g6jSKB7zFWJh4/E4UXmZjkQGGsVIyLEopGszFpLSSNw4lcnV+QVsPoFIwfB4Nu8LXBMpfJpDsW5sVMgLd7evR2CTEle5kX/73NWTsJXXIo+kXuZOvb2MkXFscnVOxQbGev6ejH4enfDH88ZAmPgsEsfnZm/3mcosiELrP71I1o7MHEGsf+0+kGVFbnEtdA+vLjwaFZ4FEQ+s2naV9f8biNZZRvgLx4US0pWjC++2ZmN7P29GxCt3EZvx7fZeWPhiVFXRsp+GEuFSacW9oiJbCmVhIJzvpnU9vmeHbHHP9K6z1xcA7mjuevc90WxGjWbVUHxba02SBArsae30RUJpa/D3sxteVf8A/Prtzg== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch List Evaluations"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluations"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetches a list of evaluations, optionally filtered by an app ID. - -Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - -Returns: - List[Evaluation]: A list of evaluations. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variant_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variant Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Id"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"status":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},"aggregated_results":{"items":{"properties":{"evaluator_config":{"anyOf":[{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"},{"additionalProperties":true,"type":"object"}],"title":"Evaluator Config"},"result":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"}},"type":"object","required":["evaluator_config","result"],"title":"AggregatedResult"},"type":"array","title":"Aggregated Results"},"average_cost":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"total_cost":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"average_latency":{"anyOf":[{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","variant_ids","variant_names","variant_revision_ids","revisions","status","aggregated_results","created_at","updated_at"],"title":"Evaluation"},"title":"Response Fetch Legacy Evaluations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-list-evaluations-evaluations-get.api.mdx b/docs/docs/reference/api/fetch-list-evaluations-evaluations-get.api.mdx new file mode 100644 index 0000000000..2ee9a8e056 --- /dev/null +++ b/docs/docs/reference/api/fetch-list-evaluations-evaluations-get.api.mdx @@ -0,0 +1,980 @@ +--- +id: fetch-list-evaluations-evaluations-get +title: "Fetch List Evaluations" +description: "Fetches a list of evaluations, optionally filtered by an app ID." +sidebar_label: "Fetch List Evaluations" +hide_title: true +hide_table_of_contents: true +api: eJztV0tv2zgQ/ivEnFpAa2eDPem02jRtg3a3gZvm4hgGI41lthSlkqNgvYb++2JISZZiO48GvSz2ZIuc+TiPb4bDLZDMHcRzOL+TupakSuNgEUGGLrWq4m+I4S1SukYnpNDKkShXAnfikSi9nNR6I1ZKE1rMxO1GSCNkVYmLN5Mbc2MSm7v4xggheHWpMvHqU6s3d2QXr2ORmB6q1RRUtpCC1jg81WPOkGprOtiPytF858ciFskheycQQVmh9V8XGcSwYveWLLocyI3+50gQQSWtLJDQcsi2YGSBEENwByJQHKvvNdoNRGDxe60sZhCTrTECl66xkBBvgTYVqzmyyuQQASnSvJCwyxk0zYK1XVUah44VTk9O+Geck891mqJzq1qLWSsMEaSlITTE4rKqtEq9/dOvjnW2+0ZIayVbqwgLf1ZlOTakwskqe8hgNjbq3H+CYxGjf8WUHpG/DFKtzp20ShrWCSZ1lo61m+i+Sx3addAXF5kbwnHyXgb4l0cYQFq8U06V5sWmzlqgzuYO+MdQZ702y6Ajh10GpNl8Wnku3wfrV0ytNTAlO7irgNBmp8MLtfAyRA4oYzqSVB9gY9A/zpsrXvf50PXYmIdOv/bSTQRobWkP+lDeMh9HRT2HAp2TOcIA6twj7B/W7JJzEMrvLYYZc7UmX1x5bjGXhNnS+sUxBcbxaRtWaZdpaVYqf7ovvn35FI5qNBpAfkPmVGrRGyMZoa6y7mMYhE7lLBjB4ZBZpkJjvxxYHBrj2K7mEJLooSBE4X9uPKa2x4U+dAOspGfXjnFHmshOVMxaIjI979DKHJdp6ejp0TlK973YREAlSf0T8TsPtCQ06ebnHDKomgMUXZW24B3gavqFlK/CDvYsqIrEJ2dQcc8F+hJUPdAj3PGV3081o34wvIzv36VHLsLh9dX39oOd7TnthYegZhR9PwIJP6r6UVAMRtrR/3fIIeAg/HZ6uj9YXUutMi8qQs0+Y6oa96QMSSr9QMPWZTrafcLlqQxhjrYtjsO1+rFM+wAVLn+oLf7ZNqoe7LioD4YIffQRArFf4ehor0524e064jE33oTwHTqsE3l/dXW5BxhyWyCtS57uu9Gd1hDDdDDUMxvR3nXTfG01xLAmqlw8naa6rLOJzNGQnEg1lZWC+8+ixO+KMxb114bDtLaKNh4vubz4gJv3KDO0EM8XQ4HPzJjAgbHYbjCv1Ad/47aPjKSmdWnVPyGx7VtjHbTYXWVWpVfv+7W37Q+ZfkPjKxetC2afTH6dnBxzplUQyeVFS3yZeuJ3dngxrs5RuPpA8cxQeNYDoSx+322wlVXpqJBmgHe4Xu9bt92V4H/vMdpmnPBvmlZaKl+3Przblrb9dd49z9f+PpzDdnsrHX6xuml4Obw9mXyZcvJWczWupHb4QDhfzdrCfS2O2cKj3+CZ245Q4CnvW/4tU27OHWnd0X3baiVpihUNtPYaKKP0xfru/Aqa5l9FErTE +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch List Evaluations"}></Heading> + +<MethodEndpoint method={"get"} path={"/evaluations"}></MethodEndpoint> + +Fetches a list of evaluations, optionally filtered by an app ID. + +Args: +app_id (Optional[str]): An optional app ID to filter the evaluations. + +Returns: +List[Evaluation]: A list of evaluations. + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_names"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Names", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_revision_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Revision Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>aggregated_results</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator_config</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"EvaluatorConfig"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Project Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Evaluator Key", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Updated At", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>result</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>average_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>total_cost</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>average_latency</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Result"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Type" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>value</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>error</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Error"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"message"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Message", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Created At", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Updated At", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "app_id": "string",\n "project_id": "string",\n "variant_ids": [\n "string"\n ],\n "variant_names": [\n "string"\n ],\n "variant_revision_ids": [\n "string"\n ],\n "revisions": [\n "string"\n ],\n "testset_id": "string",\n "testset_name": "string",\n "status": {\n "type": "string",\n "error": {}\n },\n "aggregated_results": [\n {\n "evaluator_config": {},\n "result": {\n "type": "string",\n "error": {}\n }\n }\n ],\n "average_cost": {},\n "total_cost": {},\n "average_latency": {},\n "created_at": "2025-05-15T13:01:54.102Z",\n "updated_at": "2025-05-15T13:01:54.102Z"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-list-human-evaluations-human-evaluations-get.api.mdx b/docs/docs/reference/api/fetch-list-human-evaluations-human-evaluations-get.api.mdx index c79ae06c90..3167a00bdb 100644 --- a/docs/docs/reference/api/fetch-list-human-evaluations-human-evaluations-get.api.mdx +++ b/docs/docs/reference/api/fetch-list-human-evaluations-human-evaluations-get.api.mdx @@ -5,73 +5,450 @@ description: "Fetches a list of evaluations, optionally filtered by an app ID." sidebar_label: "Fetch List Human Evaluations" hide_title: true hide_table_of_contents: true -api: eJzdVkuP2zYQ/ivEnBJAsTeLnnSK0WwTI2my8Dq5eAWDlsYWE4lSyNGirqH/Xgypp1+bNreeDFPfN5zHNzM8AMmdhXAF76tc6ld3TzKrJKlCW4gCSNDGRpX8H0L4AylO0QopMmVJFFuBPTwQhcPJLNuLrcoIDSZisxdSC1mWYv528qgf9czsbPiohRB8ulaJePG54a0smehlKGa6M9UwBRWNSUEpDm91NhdIldGt2Y/K0spF0wcThWJ2zukJBFCUaNy/eQIhbDnGNUPXKdtYD9BnTnZIEEApjcyR0HAmD6BljhCCjw8CUJy8HxWaPQRg8EelDCYQkqkwABunmEsID0D7kmmWjNI7CIAUZXww4xwkUNcRs21ZaIuWCbc3N/wzLtJDFcdo7bbKxKIBQwBxoQk1MVyWZaZi5//0m2XO4dQJaYxkbxVh7u4qDeeJlL9ZJdccZmeDNvyfCCxg698wpmfw9x7VcPoyrD3hMrEXglgypA7gSRolNd/oA2rjHJuog+OEtCa/er6YJ3Zojkv/awY/OQu9Sbs2+KQsh/mLvlqxaCy1XreW/5vZRcdmDFqy+FwFlx7VVLDl+H55nsWpYZ4lSdUZV3vGg0fUAcQGJWGylnQN/7tHiRkxpyqTn+B88SjH6ZNUbFiioz5fgZsC3TgYiP1UxWNlHgvrkiqGpRzV4ijJXe5GiRlFHPURHg1RV7Ku9n60CLcT3MwVDi4GG+TMyTvkbHG+fru9PR1eX2WmEt+od8YU5t9MrvGESpCkyka6HgOyIh59lXr/eevG97H+uxOlCXdooI4uN8XHIu6SldvdNQH9idbKHfYddmWAcTKa2fWM1jguf3WDi4aDoE2vz+7lMN769J27rFPHcnl/YtDXNkdKC96m7XqkFEKYuvX5arA+WY9ontq9WZkMQkiJShtOp3FWVMlE7lCTnEg1laUCXoEW48oo2jvK7H7+AffvUSZoIFxFQ8ADS8MXewzrt1ypPiCH3WzsWUVpYdTfvoLN4k49i+NSels4ervAnHNidj/nzkRjvYpvJq8nN3D8ehqBWdUydqpu73afuRdHWeji51mRO0kDoczf9B/Ys7KwlEs9sHetMY99O/Rd9j995DUFJ/yLpmUmletPl+lDI88VnMozCiAtLPHHw2EjLX4xWV3zsX/NsQITZeUm497byszilcy+WDRt+lJc8ug77ocPR3aFQU73bvJvWHcrnj9pq/lDw5rFMZY0YJ2MS7bStea7uyXU9T8xjSRr +api: eJzdVkuP2zYQ/ivEnBJAsbeLnnSqmmwTI2mz8Dq5eA2DlsYWE4lSyNGirqH/Hgypp1+bNreeDFPfN5zHNzM8AMmdhXAJ76pc6ld3TzKrJKlCW1gFkKCNjSr5P4TwB1KcohVSZMqSKLYCe3ggCoeTWbYXW5URGkzEZi+kFrIsxezN5FE/6sjsbPiohRB8ulaJePGx4S0tmdXLUES6M9UwBRWNSUEpDm91NudIldGt2Q/K0tJF0wezCkV0zukJBFCUaNy/WQIhbDnGNUPXKdtYD9BnTnZIEEApjcyR0HAmD6BljhCCjw8CUJy8bxWaPQRg8FulDCYQkqkwABunmEsID0D7kmmWjNI7CIAUZXwQcQ4SqOsVs21ZaIuWCbc3N/wzLtJDFcdo7bbKxLwBQwBxoQk1MVyWZaZi5//0i2XO4dQJaYxkbxVh7u4qDeeJlL9ZJdccZmeDNvwfCCxg618wpmfw9x7VcPoyrD3hMrEXglgwpA7gSRolNd/oA2rjHJuog+OEtCY/e76YJXZojkv/cwb/chZ6k3Zt8ElZDvMnfbVi3lhqvW4t/zez847NGLRk8bkKLjyqqWDL8f3yPItTwzxLkqozrvaMB4+oA4gNSsJkLeka/rVHiYiYU5XJD3A+eZTj9EkqNizRUZ8vwU2BbhwMxH6q4rEyj4V1SRXDUo5qcZTkLnejxIwiXvURHg1RV7Ku9n60CLcT3MwVDi4GG+TMyVvkbHG+fr29PR1en2WmEt+od8YU5t9MrvGESpCkyka6HgOyIh59lXr/cevG97H+uxOlCXdooF5dbooPRdwlK7e7awL6E62VO+w77MoA42Q0s+sZrXFc/uoGtxoOgja9PruXw3jj03fusk4di8X9iUFf2xwpLXibtuuRUghh6tbnq8H6ZD2ieWr3ZmUyCCElKm04ncZZUSUTuUNNciLVVJYKjl8kkfsqXjMUeD9ajCujaO/sRfez97h/hzJBA+FyNQQ8sG68EsawfgWW6j1yTpp1HlWUFkb948vbbPXUszhopbeFo7fbzfv2u4y/ouZO5Di92zeTXyY3l4JpCCK6nzXyl7GTf+uHg3HTjtLVJYqHSu60D4Qy/63/wF6WhaVc6oG9ax187OOhb8f/6WuwKT7h3zQtM6lcI7tMHxodL+FUx6sA0sISfzwcNtLiJ5PVNR/7Zx+rMVFWbjJu0q3MLF7J7It5088vxSWPvuJ++MJkVxjkesCtiA1rcMmDKm31f2hYURxjSQPWyVxlK10Pv71bQF1/B8jEMvo= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch List Human Evaluations"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/human-evaluations"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/human-evaluations"}></MethodEndpoint> Fetches a list of evaluations, optionally filtered by an app ID. Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. +app_id (Optional[str]): An optional app ID to filter the evaluations. Returns: - List[HumanEvaluation]: A list of evaluations. +List[HumanEvaluation]: A list of evaluations. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"evaluation_type":{"type":"string","title":"Evaluation Type"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variants_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variants Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"type":"string","title":"Testset Id"},"testset_name":{"type":"string","title":"Testset Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","evaluation_type","variant_ids","variant_names","variants_revision_ids","revisions","testset_id","testset_name","status","created_at","updated_at"],"title":"HumanEvaluation"},"title":"Response Fetch List Human Evaluations Human Evaluations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluation_type"} + required={true} + schemaName={"Evaluation Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluation Type" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_names"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variant Names", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variants_revision_ids"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Variants Revision Ids", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"revisions"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Revisions", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_id"} + required={true} + schemaName={"Testset Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_name"} + required={true} + schemaName={"Testset Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "app_id": "string",\n "project_id": "string",\n "evaluation_type": "string",\n "variant_ids": [\n "string"\n ],\n "variant_names": [\n "string"\n ],\n "variants_revision_ids": [\n "string"\n ],\n "revisions": [\n "string"\n ],\n "testset_id": "string",\n "testset_name": "string",\n "status": "string",\n "created_at": "string",\n "updated_at": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-new-analytics.api.mdx b/docs/docs/reference/api/fetch-new-analytics.api.mdx deleted file mode 100644 index 893bc9e5f8..0000000000 --- a/docs/docs/reference/api/fetch-new-analytics.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-new-analytics -title: "Fetch Analytics" -description: "Fetch Analytics" -sidebar_label: "Fetch Analytics" -hide_title: true -hide_table_of_contents: true -api: eJzFWUtz2zYQ/isanJoMY7mZnnSqkjgTN07sxmp60Gg8K3AtIQFBBgBtKRr+984CJAWKEkU/Mr3YErWPD/vGcsMsLAwbTdlEAxdqwWYRSzPUYEWqzmM2Yrdo+fJG4f0NKJBrK7hhEctAQ4IWNTFvmIIEiTblOf0qFBuxHznqNYuYxh+50Biz0S1IgxEzfIkJsNGGgVpf3joBdp2RAGM1gYgYqjwhWFYDRxYxk4EibFZYSYTvnaYiqjlVLiUr2hREUqPTCdhnhQcLVBaYs5myKDFBq9dNoE5pN1JPEkBNZYzmOaAGeoWyuEDdCeXS6w2hKLz/X6B89npDKMSm70A+BUwf1eeVnlC5BotPUazyZH5E7xdS0YhYIS3qB2itQ8ozhrJMhvwhuVmJunZ8BeHUaLJUGTT0++vTU/oXo+FaZFQuiDjnHI25zeXgS0nMIsZTZVFZZ5Ysk4K76jL8ZohnE+jMNNUeK7wGnuaeacd1W4O9dRQRi/EWcmnZ6LSI2Dzn39E6CcJiYtqCrUjQWEiyQHid2mWVGLEYLL4i0kDhpOYsom04dkHcxlLEqDhQ+WyEB8SxIHOAvGqAfGwa7UbZPE0lgnKP9utiXGieS9C/vc+l/Muk6tVlbrPcvqBzeCnp/BtyX8ZKo/bhAq1h3V37mrxkpbbGQ8yfSnsWLa4wsqeBvwOnteW8cYETQPDwt3RvysgKAm46K6Iym1wylI83RbQTcz6sLHmw4dxdKmpav6QzFtvQ/sWdbZ87mkx2J5C3EO+FitP7I1YqW1LnOfakcZ9uE1Wt9zmFV101YgpXfUXnuYiPQF45mVIkYr/QPr3uwnHTuXWMumdsGI4q9s+o/pdfZp02cOJ3quYTu3Pkm/ITu+3BWP23jsX92eR67JFQ9bN0qhvVgYGKt0WybV73a0pdRKUESPknKtVh/l2kC8FBXlYaCtdofYFvdr+D1UagjPf1wO0YQQRFxL7jumdPapn5I1IHYHcg8/2ueoa+Vp10t3Qf7nlW5/iQVvPVwS+ihkOPZ4pwE5e5IT/OwrklyUALk6rAe4el4A/yvvu7oHiQ1n1C95H+zu19owd8zhPUgvcSbixoa+6FXbqHcfWRhjYQig6QgOVLpE9SfMdQ0bWT1kuPUD6eb0QD6oUwthf/EgjAElrGfCd4Pwm4EsZ1b0JRfgnknNETVBz3CWvXs4ooGAbI3S5E6hQ8lHkcDN4YVEZYcbc/LcL4PgTiLRgcXNdiAihunC8ihivg9sY58NFazkjG4JOT0VLRUT8nuLKXpS1IftMEIPe3gD6IxlI+CIkPsi2Sw04taY4MlL5wNhK6LLyuCteDcdUhXlBvPDRVvt0W7eZg2TVG1b3nYeNXueX52w2sRVReCjtuSk5O2LpUqrCjdylfeYZUPYTKU7cOqh7GwnCNvmIJBe4GysHiItXUyYZGqIXEnYdJLq3I3ONam7s5RhWWl+1ZfkLwaAYHu+xqcFdgGzHNXhLXXOxm7wPGkzfCBRm7S4R67GjylXidDFg9XgasSAbGi8cXmDNi7goob27aEXTcm67L1UPP4B5Xe8Z6hVAURP/H69ftjcNXkCJ2+4TBmdauHj9y3RCjBSE7kkGm/MBYdXyS6cj/i9QDdBsCs+gK109oDCxwa+rDpM4YA58HR6oZncurLumac09pXm/dw8d4583X5dgPk8lVS6D3bdOp72nnPBgH++YE7TKldXSWumWkT2w2zDTeCbwfWl/YhvWOelituAzqu2pNnWvJRmxpbWZGwyGXaR6f+IvuCYghZMIFv0Gea2HXjmV8df4R1x8Q3O1oOgsJrimSfGw0yWq3QCZo/o2qJdw4t8tUi5/e4eUybum5Cnc5uk3D5dvYgRuMr85ZxOgY3j6nJ7+fnLJdqzWI3fjGXRJUuqsbfdMK9fmpiicuA5hFSP7c/kDIyO4JqEBe20kNOLUNLK7sMJPgS5pTvin9N2Wl/yhIyhcQEQvfM3gvziK2JL+PpmyzmYPBf7QsCnpcrl6mGxYLA3MZrDLdnaV+JVHeP5jLzoO05QuCPsT1ir4Pcb1E70McrLn7kJeL6V4HrPbJfYirhfGWdkZftCDicvO1rPJiUzKNOccsPGirApOUOpuvLq8nrCj+Aw+a/zc= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Analytics"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/analytics/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Analytics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["trace","span"],"title":"Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"buckets":{"items":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"type":"array","title":"Buckets","default":[]},"query":{"default":{},"properties":{"formatting":{"anyOf":[{"properties":{"focus":{"anyOf":[{"type":"string","enum":["trace","span"],"title":"Focus"},{"type":"null"}]},"format":{"anyOf":[{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"specs":{"items":{"properties":{"type":{"default":"none","type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"type":"array","title":"Specs","default":[]}},"type":"object","title":"AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-organization-details.api.mdx b/docs/docs/reference/api/fetch-organization-details.api.mdx index bffb0405b3..50b808edcf 100644 --- a/docs/docs/reference/api/fetch-organization-details.api.mdx +++ b/docs/docs/reference/api/fetch-organization-details.api.mdx @@ -5,67 +5,316 @@ description: "Return the details of the organization." sidebar_label: "Fetch Organization Details" hide_title: true hide_table_of_contents: true -api: eJydVU1v2zAM/SsGTxsgJF2xk08L0G4tuq1Bm22HIChYm4nV2pYr0e0yw/99oPxRO22yj1Ni6ZF8JJ/IChg3DsIlXNoN5voXsjY5rBTE5CKrC/8ZwhVxafOAEwpiYtSpC8zaf5qB3QQUmIKs/ziPIYQ1cZTcDDE3rT0oKNBiRkxWCFSQY0YQwgisY1CghUGBnIACSw+lthRDyLYkBS5KKEMIK+BtIeaOrc43oIA1p3IwTCw4j6GuV+LGFSZ35MTy+OhIfsYZX5dRRM6tyzS4asGgIDI5U84Cx6JIdeTdTu+c2FQDNoWVQrBuIuj4EEMhpdr096O+yn2twDzlZA8m7AH1Tgv3408GsFq1sAow316ufWPGhrXqT/IyTUHK2blayHmt4MnYe1dg1GbPlLmXDPpYgNbidsDox7O5T2ONZco3vdMxO4xjLdwxnQ9q3qij9W9u7yjig8xPmiBBHxrqetd+qL4leGn6pnU9GVd89boET1r517UEeH98/FJ63zHVcaPXU2uN/X/dNW9t1IMxIDXR6PYvmq5zpo0IbLW/gZ9NQ1Dal7nNIfV9IedwQ0Pl7YP6YgSNxv7QHMmrCd3iBt14Lm9T3f1pNL16NVgHOVss5i8cNr3NiBMjQ3BD7KcdJxDCdDjf3LTaGXc1KHBkH7uhWNoUQkiYCxdOp1FqyniCG8oZJ6inWGivYkdRaTVvvclsfn5B2zPCWObEcjUEXItQmtaPYX3VsdAXtO2kHcKs5MTYbjG0wzhprCRLna+NN28LMvPkgtn8HBRIGo2mjybvJkewu1ZGYNE4Rl7jXWx/DWqnCn3+oIAyL3BgwuzD84UwK4zjDPOBv4+yjYLRQjjpt9HOtOxf3D/svraETD95WqSovf4996pt/3K03iRsuLvvVgoS41iwVXWLjr7ZtK7l+KEkKy1eKXhEq/FWCr6sINZO/scQrjF1dCCVN1ftG3kb7KPbySAXDTxiWsoXKLin7SvL2Q+BpJNa1aJmUUQFD+xfzCzRZP8+Pp0uoK5/Awqq8AE= +api: eJydVU1v5DYM/SsGTy0gzKRBTz512ux2g22bIJttD4NBwNgcWxtb8kp0tlPD/72gLDv2ZGf6cbIlPYqP5CPVAWPhId3CjSvQ6L+QtTWwU5CTz5xuwjKFO+LWmYRLSnJi1JVP7D4s7cxuBQpsQy4srnNIYU+clQ9zzEO0BwUNOqyJyQmBDgzWBClYVzzoHBRocdwgl6DA0edWO8ohZdeSAp+VVCOkHfChESvPTpsCFLDmSjZuXJFc59D3O7H2jTWevBhcXlzIZxnfhzbLyPt9WyV3EQwKMmuYDAscm6bSWYhg/cmLTTcj0TgJm/XgQefniAkpFYM9jfpNznsF9oshdzbOAOiPCnYafzWD9SrCOkBzuNmHMiwNezXtmLaqQNI5XnUv+72CL9Y9+QazGD1T7V8zmHwBOoeHGaM/XsxDGHtsK36YLl2ywzzXwh2r21nOB1HE++3jJ8r4LPOrwUkyuYa+P7afi24LQZGhaGNNlhnfLZQ3qf0qir3vxcH3l5evpfc7VjoP4OSNc9b9f90NnbWowRJQ2Wxx+i+Krg1TIQLbnS7gL3YgKOWrfXFOfb+S91jQXHmnoCEZyaCxfyiOxDW4jrhZNV7SO2T3dBhDrb7qbIS8u7+/fXXhUNuauLQy8griMNu4hBTW89Hn190w3HpQ4Mk9j5OvdRWkUDI3Pl2vs8q2+QoLMowr1GtsNBzP4004TX4SaFC2p6x1mg/hvs3t9Xs6vCPMZXZsd3PABxHPIIclbKoENvo9HUa5p7BpubRufBriXC4HK4lcm70N5jFJkduPmD2RkbaROAfaF6vvVhengokGyeb2OvYAZqEHRh4BBuooXVOiQAHVoQGACesfXg6EZWM912hm972VtymZd2tyNb1NR9N06sj/8BLGdDL9yeumQh36I3Dvojy2sJAHKEjj67dTUFrPAum6R/T00VV9L9ufW3JS5Z2CZ3QaHyXn2w5y7eU/h3SPlaczEXxzF1vn2+QUy1EJRmTwjFUrK1DwRIeXFzqMhHIUWRcPN1lGDc/MXk0wUePULT+/uYe+/xtOFuuP sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Organization Details"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/organizations/{organization_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Organization Details"}></Heading> +<MethodEndpoint method={"get"} path={"/organizations/{org_id}"}></MethodEndpoint> Return the details of the organization. -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"description":{"type":"string","title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","name","owner","description"],"title":"OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"owner"} + required={true} + schemaName={"Owner (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Owner" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"description"} + required={true} + schemaName={"Description (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Description" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"workspaces"} + required={false} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Workspaces", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>default_workspace</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "owner": "string",\n "description": "string",\n "type": "string",\n "workspaces": [\n "string"\n ],\n "default_workspace": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-plans.api.mdx b/docs/docs/reference/api/fetch-plans.api.mdx index 4dabad9271..733b02a8d9 100644 --- a/docs/docs/reference/api/fetch-plans.api.mdx +++ b/docs/docs/reference/api/fetch-plans.api.mdx @@ -5,59 +5,69 @@ description: "Fetch Plan User Route" sidebar_label: "Fetch Plan User Route" hide_title: true hide_table_of_contents: true -api: eJx1Usuu2jAQ/RV01hahXWZVKvWB7gbd27tCUTWYgbh1bNeeoNIo/15NePSC1GyiZM4Zn4cHCB0K6g0+Ou9dOKAxiIkziYthtUONPYttvydPocAgc0kxFC6oB7xfLPS142KzS8pAjZfeWi5l3/vZ8wUMAxuDcBCFU0re2emA6kdRzoBiW+4I9TDqYx5WflYJs7WnMHstnGfPsRdd2rG0UTUeWGCQSFrUqLZnK9VVc+F85KwuB/TZo0YrkkpdVdbHfjenAwehObmKksPYKMP22clpoizXqyc+fWXacUa9ad4CXlT3OYx72AA5JUYNSu6JTzAI1On3spc2Zvdn8g8DpwbbM0udu7CPE92Jn/CTuNlyvYKB2jhHspi/my/wGNQdWCMnO0V+PXsawzykcPMPA+7I6UyYug//BqosxSIdhTf7/tfLnahbEsK/RTtxAeNFwnDpbINLZ9ri1Fpj0MYiOhqGLRV+zX4c9fevnrMW0xgcKTvaakybZjTXFLWzn3xSv9Zy0ptxJN+fy3i4etrl7RZ9+fQN4/gXyGwKcQ== +api: eJx1ksFu2zAQRH9FmDNhuT3qVKdoUyMXI2lOhlCs6bXFhiJZkjKqCvr3YmXZSQxEF0Ha2eXsPA7IdEyotrgz1hp3RK3gA0fKxrv1HhUOnHXzK1hyCQqRU/AucUI14PNyKa89Jx1NkA5UeOq05pQOnS0eZzEUtHeZXRY5hWCNng4ofyfpGZB0wy2hGkZ51M3I72Kh2FhyxXPiWDz6LsvQlnPjxeORMxQC5QYVyt15lfLiOXE8cZQtB3TRokKTc0hVWWrru/2CjuwyLciUFAxuD19N1eKrSDHWMk530eR+mrfarB+4/8G054hqW78VPMlS56TeywbkPjAqUDAP3EPBUSvfqy43Ppp/UzhQMGKgOXdJLMYd/NRusuVXb3ekX9jtoSB7nm0vF58Wy4+WmRuK1WY9syE9sbn4mGRQN3Fdg4ICt2SklpnaL68FcRl8yi25N/M+AvjO3DWVzH+zwDMO42xhmOFuMcMV3BPeWqHxKUtpGHaU+DnacZTffzqOAqlWOFE0tJPItvWoLokKvxfuZV+tOcgVOpHtzmBu7qhwvV63+28/MY7/AQbWGQA= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Plan User Route"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/billing/plans"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/billing/plans"}></MethodEndpoint> Fetch Plan User Route -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-query-revision.api.mdx b/docs/docs/reference/api/fetch-query-revision.api.mdx deleted file mode 100644 index 4792f38a8a..0000000000 --- a/docs/docs/reference/api/fetch-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-query-revision -title: "Fetch Query Revision" -description: "Fetch Query Revision" -sidebar_label: "Fetch Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJy9WVFz2zYM/is+PLV3bJz19uSnZU26Zm2TLEmzB5/PR0uwzZaiFJJK4vn033cgKUWyZMXx3L0ksgx8AD6QBAivwfKFgdEY/spRCzQwYZBmqLkVqTqPYQRztNFyep+jXk01PggjUgUMMq55ghY1aa9B8QRhBE2xqYiBgVAwgozbJTDQeJ8LjTGMrM6RgYmWmHAYrcGuMgIwVgu1AAbzVCfcwgjy3KFYYSUJkJ+rwXWwMDiPoSgmBGyyVBk0hPX++Jj+xWgiLTKKBEZwk0cRGjPP5eA6CAODKFUWlSVxnmVSRC7w4XdDOuuaf5kmWqzwFqI090rBbaEsLlDX/PzgJBjEOOe5tDA6LtgGPc6oWl3OHYNNA17ygWvBlSUeG7L9ZBWsklC5lED8NOm787iOPQaHt9LE97EcOgaPzbUVcx4d0vmTAFlayO0y1QcD92gFg5hb3BGVRN9ZkWAv9CkBFgwSNIYverH7YL4G9YLBXLrDoY7D41jQDuHyqrFeW5ZmaSqRq7qp0vikYOWrdPYdI9vrz0fnhIvL8j2daYddbtiG5WTWfFOPodsWREJHueT6zcdcyj9Nqt5d5jbL7VvoilFYTHbU4lrzVT8xTV14FatfiUzS2D/D/wOpF+kXYeyLtG4LsqX+Oo5uw8LztW2/3XTB3a5t1qL9oE5rEAWDSCO3GE+5Pegp8sHDDk4cWXkW/wwj3zxsMBKjxJ9g5NTDBiMlXbNDVqKSrN/LclTydVArJVuVlZKwg1op6aqsPKBudym7L9e7oF4wMDJf7AtzQ7oFg8MFGjjkm9Wk2YA9ChWnj4TdI6TwEc1hV+2FhywYpDI+NPilh6QzDZ92hX6R0AvCKhhIkYhu0M7CsIHyxWlT3DrGF/otVHlClxZuIlSxf0cnbPgw6eXAwdOKUhb1A5d7e3xeAhQM9LZurl0AWzjXrnFrlaZngb+rtdiGoTZNSIv6haXqL3W+ka3uJMBV/FxR2/S6b1O61qiUHFL+jUo11DOXLkTE5WVpoXDXKl/Zne3Q9mx3bi5Qxl23wKrXcQIFgx+42vck+Ywrf9uR+a7l/NUNTRlp0dHHdTc7/h68e1Ny59wvWCOhL+8UYegmbqaUx3oBS5OMa2FSVcvedhS8p+y7vwtaD9K6J3SP9HdmH1Ud/yJPUItoJ3BjubbmUbhBAaq4fKQrOheKAki4jZZIT1L8wLqhG4e2kx2h/Hqeioar1CrupL/k5MCSt8g8FdFuCPgkjDXBi/ChhnNGb1BF2AXWPs9KodqsgdLtlki1BbftvIgbnBpURljx0L0tOm5y7UaIGxzcVDA1V+ZcGiwY4BPd0l0C97ZyRhiDrw6jZaLn/LzFJ3sZuCD8JgVcdpeAXTw6kfJVnvhF9uzJ9qQGmQ6s5xnaOBycjQ0dDl53ClfXzLJCvIXJ5tHUoWvqMY0nfQFVyF2lqUfPzXDKKd4pd5fRvfX/i241CywK0vn1/fv26PCOSxG7weDgTGu31facG8ZouZCNmtgUkGm0pWK+XKR6Uvsl9Q66OYpZ9JXa2vzHi2wXdWQMbunblxYqxeVNB7lmSQv0ena3h3Hq6etL7qfb26sWoM9tM6kfaa49aI6TwU2ZlinNvRdo3ZjbLmEEw4yGtvg4vPdj8mE5wzXDdWvmXQADg/qhnI3nWsIIltZmZjQcRjLN4yO+QGX5ERdDngm39Q1GuRZ25VROrs4/4+oTctcKjyd1gRtaW361NMWqRPFMULNTTi7C0FH845dAmMgvvVbhOuF56tTLU805Nzi5OofaNRCOj345OoZNHhvCrlZHbluUtt3XwDZYqOKnspi4PQEWefLb8xfkWZYam3BVw9uSto35SiDC4pMdZpILt/CdB+uQ0jGElIIfUAvXVlRpBQaj9o8ZEwbLlO5kY1ivZ9zgNy2Lgl47WcpUGKfPiMjxGmJh6DkOtaHlaHWOwJvrsF3eDp5b8mYAZXoV5Tb0sQChKe747cWdCMtyEa2D3EkUYWZrCK0DjFZbtQ/+OLuFovgXo/nr+Q== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/queries/revisions/{query_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-query.api.mdx b/docs/docs/reference/api/fetch-query.api.mdx deleted file mode 100644 index 45c653c4a4..0000000000 --- a/docs/docs/reference/api/fetch-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-query -title: "Fetch Query" -description: "Fetch Query" -sidebar_label: "Fetch Query" -hide_title: true -hide_table_of_contents: true -api: eJy9V1Fz2zYM/is+PLV3bOzm9qSneU2zZu3WtHH34vPlYAm22FGiQoLZXJ3++46kZEt2kia+tE+2RQDfhw8QAdfAuLaQzOGTIyPJwkKArsggS11eZJDAijjNr28cmQ0IqNBgQUzGO9VQYkGQQDi9lhkIkCUkUCHnIMDQjZOGMkjYOBJg05wKhKQG3lTez7KR5RoErLQpkCEB50IUlqy8gWe1GV1k0DQLH89WurRkfYjTycR/ZGRTIytPFxK4cmlK1q6cGn1ujUFAqkumkr05VpWSachu/NV6n7pHqzI+d5YRIdUuOrVsZcm0JtOj9yZYCMhohU4xJJNGRDECVrn5uAoyDeOuVNC8b4BZJj0nVJcD051Fy2GptSIsoRH7IjaLRnSP9PIrpdw3Kp1S4DXsqJ8HEo2AghiPJNMhiwOJBsjFcvikn8PdWJBKkzqF5sW5U+oPq8tXHx1Xjl/CXTlKpuKRXmgMbh4WZugLT1L1Ty+m9zi+wj9B1L/0B2n5u7Lel+SB+9M0mrWNF++ORylwSMH7NmL49h8X6qwXohGQGkKm7Br5oYC9GytDplcsA5/7Ud7EsKNpEMtV2Y8A+RLDtiAZKfoBIGcxbAvSybUM1//jcMId/xixfotX/06vZ0Xp1NqidII9K0on1xbFKrc+tlevvG8j4PnohdG6//buzd87AnzXZzt9m8bb/nJ6ejis/0YlszCKR2+N0eb4SZ0Ro1T+WzsK9g2UTgenT7l1e3M1To9dqh90JBjmqF3ftdnsJoO1uKbdVXm/aRBjNPOnd+m826rmIa8I3dr1SruTN6p7fxpnUb6HivpuNrs8CBhrOyzquV8XR5/adbEgzrXfItfEYXvkHBIYV4ZuJf07volL57juFsgGBFgyt91+6YyCBHLmyibjcaq0y05wTSXjCcoxVjI0s6XUGcmb4DK9vHhPm3eEGRlI5ou+wZXvn9gRQ7NtMbCS78kzbzfbqeNcG/ktlrldb/Po5ZOX5UoH91anaSA3ml5egACfRlRlcvL6ZAL7Wg2MfetjGlq/ww7HIPZU2OYPAqgIfQ9MWPy6O/DMKm25wLIXb1iavdHZ5s/0H48rhTL0dACu27LNoS0bxB3Xv1oCku3uvxCQa8vesK6XaOmLUU3jH7cb8Xwh4BaNxKWXal5DJq3/nkGyQmXpgNP2NoAXn9umfznarSpDrl0BS5/cLSrnf4GAf2jT/4cSXue86466PZ6mKVXcczy4fXwbbbv597czaJr/AeUwgiU= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Query"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/queries/{query_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-queue-preview-evaluations-queues-queue-id-get.api.mdx b/docs/docs/reference/api/fetch-queue-preview-evaluations-queues-queue-id-get.api.mdx deleted file mode 100644 index 3ba06422c8..0000000000 --- a/docs/docs/reference/api/fetch-queue-preview-evaluations-queues-queue-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-queue-preview-evaluations-queues-queue-id-get -title: "Fetch Queue" -description: "Fetch Queue" -sidebar_label: "Fetch Queue" -hide_title: true -hide_table_of_contents: true -api: eJzNV0tzGzcM/isanJKZjeV6etpT1dhuVKeNa9m5eDQaaheSmHC5axJ0q2j2v3dA7lMPW06dmZ60IgF84AeQADZAYmkhvoeLR6GcIJlrC9MI8gKN/zdOIYYFUrKaPTh0OCsMPkr8e4atQtixs0pCprPZEgkiKIQRGRIahtiAFhlCDLUURCA1xFAIWkEEBh+cNJhCTMZhBDZZYSYg3gCtC9azZKReQgSL3GSCIAbnvBWSpFjgLzY8GKdQllO2Z4tcW7Rs4uz0lH9StImRBXsNMUxckqC1C6cGN5UwRJDkmlATi4uiUDLxhxx+sayz6bhVGGaJZEBIcheUKm+lJlyi6bj33ktEkOJCOEUQn5ZRIMNj6fWnhaepb3ehfIQOC0g7s/jgUJMUquPAPM8VCt1xYGwHk1ay48hCKItlGdWq+fwLJtTRbLPDc3zpfSqjBks7paCclhFkSKLvrUhTyZpCXff8biX68e2YrTnsIWXz/kp9Tl7ajwWJNIlTwry5dEr9bnP97pOjwtFb2D4yG5GE2ZFawhix3kNEy9yWLuyQ/JTyH0wma+ykwP+J1D/zj9LSs7QeOuSO+ss4ug2pWD0uRzGw6wLrllH/efg+U+cdE2UEiUFBmM4EPWWw86SlgvAdSe/PYZT3wexg5MlyRfojQO6C2QokRYU/AOQ8mK1Aarrma64Px+H4InAMWb+ufW1o+XpVlJqtBqUm7FVRaroalNczHew9orH/If0/V+plBJYEuScfpQhQu4y7jwJ1GlZ8PeSibpzWYcmGMs2HEVI5w0UajckNLyVCJ6gUpjDdV64mwYl9LjfVr0HnoInt8tUvts6imcl061hVxeh8PBeG7QJyfEG5s2gG49S/eTZBLYzMn/DopY4cBp5UYA04YTH7iuvjkF+ERFgMrtjyC3qSc+Fr5Z6WxDhd3cBjG8kbp0MbuYvedqn3teG9ied92ufP8SdqetKyZK2fz852W9jPQsnUqwwu+Ep8f/+aIgmpekncF1B50tt9Sasx3Q5/e+iPeXCQMySzy31hatsha8US21w6LOrJGNzy7nNR5HMF6Equ+5w19AZ2Dx/jPND3VHg/3N5e7xgMse0H9ZLHrUHIIN9Rr3KewuqZilYQw7Caw4adOWwY5rDhpp6wSn490TzWA5gzCmJYERU2Hg4Tlbv0RCxRkzgRcigK6a+hxcQZSWuvMroeX+H6A4oUDcT3067AhFMpJEdfrImLKOQVMk3V6DdytMqN/BYiXs1/q6DFPEi9yL16RdnIOzcYXY+hU5rg9OSnk1PYpq0nzLdAJP4W1Nh+G6ItFprzc1XJ/BUAQpH90m6wZ0VuKRO6Y68fpa3WsTo/4T80LJSQPr098KaK4D1UEWTczvBdlUD+iJtJeRrBKrfEWpvNXFi8M6osefnBoeFITSN4FEaKOfN2v4FUWv5Oq+Fux8HmlYA3N9VleDto+/a+43U0NYeSfeV/EMFXXHfneX/NV3WqbKrtUZJgQR3FnVeJc6rJ8t8ubqEs/wU/p6yy -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Queue"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluations/queues/{queue_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Queue - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-queue-scenarios-preview-evaluations-queues-queue-id-scenarios-get.api.mdx b/docs/docs/reference/api/fetch-queue-scenarios-preview-evaluations-queues-queue-id-scenarios-get.api.mdx deleted file mode 100644 index 102b34a9f7..0000000000 --- a/docs/docs/reference/api/fetch-queue-scenarios-preview-evaluations-queues-queue-id-scenarios-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-queue-scenarios-preview-evaluations-queues-queue-id-scenarios-get -title: "Fetch Queue Scenarios" -description: "Fetch Queue Scenarios" -sidebar_label: "Fetch Queue Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJydVdtu00AQ/ZVonkCy4lDx5CciKDQqiNIWXqIo2tqTeIvt3e4lYCz/O5pdX9ZNUiSectkzM2fOmZ1twLC9hmQNlwdWWGa4qDRsIhASlfu1yiCBHZo03z5ZtLjVKVZMcaG3UuGB468tjqEeo7cdlmfbAL9HAxFIpliJBhWVbaBiJUICPR4i4BUkIJnJIQKFT5YrzCAxymIEOs2xZJA0YGpJcdooXu0hgp1QJTOQgLUui+GmIMA3SjxbZdC20VDNalRBsSeLqp5U27FCT8qxqv66c4RfLkxFOkRliwLazUjlu0blmWyolpai0qgp+8ViQR8Z6lRxSUpCAnc2TVHrnS1mtx0YIkhFZbAyjpOUBU+d8PGjppgmYCwVeWi4r5AK64M6crwyuEcVCPXeISLIcMdsYSBZtCSAN2/LM5eGGyynX/4lRw9gSrH66PdY/q6rNFtlOmSx3rRjkHh4xNQEUePUOp/7JKtMD5K1LSV4e3FxrPAPVvDMRc8ulRLq/+XN0DBeTISZAgqRTk7PzVMwP71F7ea8ap+FJ0jClnp/ypAe+gW1ZnscLTgPdWLM7un0lPjjNVm7vnzpDhfM+yivV/d8Gx+8fC85fXV/f3OU0Hs7NfUj7aqZv/b9PNBElWhyQcusX0MmhwTibonFwRKL/RKLm34ptbEOEmlUh357WVVAArkxUidxnBbCZnO2x8qwOeMxk9wtAI2pVdzULmR5s7rG+gpZhsqNdwC4o/HyAzOFDV4xya+RpOs22dKaXCj+x09Bt89yH0Xa8GonXHgn49KRmy1vVhABteFFW8zfzBfwXMoJmG4GS93N6Gu7Y4ieqTD0DxFg6a4FGGTlu/GAmEmhTcmqIN855yakBiUM/jaxLBh3w+8oNJ2ra+hcJQbBuxb5Z4a+JMGDM5q7iSAXmrYONM0D0/hdFW1Lf/sngvzLuGYPRfBI/MR68qRQQSLorD8wxQl+OvRZZ8PygVe33R17PYPodMf9QFR1WLOnM7TntkfeT1vTHS/TFKUJAo+WHZEfrsyny3to279Yz83T -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Queue Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluations/queues/{queue_id}/scenarios"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Queue Scenarios - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationQueueScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-result-preview-evaluations-results-result-id-get.api.mdx b/docs/docs/reference/api/fetch-result-preview-evaluations-results-result-id-get.api.mdx deleted file mode 100644 index e21976457e..0000000000 --- a/docs/docs/reference/api/fetch-result-preview-evaluations-results-result-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-result-preview-evaluations-results-result-id-get -title: "Fetch Result" -description: "Fetch Result" -sidebar_label: "Fetch Result" -hide_title: true -hide_table_of_contents: true -api: eJzVWEtv20YQ/ivCnBKAsRyjJ56qJnbtOmkMW8nFEIQRORI3XS7p3VnVqsD/XuxySZGSLD/gBO1J0nIe337z4IzWwLgwEN/C6RKlRRaFMjCJoChJ+18XKcQwJ06yqSZjJU9LTUtBf09poxEemWkjI9LpdEEMEZSoMScm7bysQWFOEEMrBhEIBTGUyBlEoOnOCk0pxKwtRWCSjHKEeA28Kp2iYS3UAiKYFzpHhhis9VZYsHQC197y4CKFqpo4g6YslCHjbJwcH7uPlEyiRemQQww3NknImLmVg+sgDBEkhWJS7MSxLKVI/EWH343TWXdwldpRxaL2kBS2VgpwhWJakO7g++AlIkhpjlYyxMdVFOjwztTqy9wz1Tc8lz5OXQFMU+FAobzqiW4kAohZUUhCBVW0TWM1qaLmqJh9p4S7QspKCY7EBvuZB1FFkBPjC8E0nqMdjnqe81n/pHuH/b4gETqxEvWbMyvlH6ZQ775YLi2/hX13FEz5E7VQa1wdJqavC89i9bMj02m8PMI/gdQ/i0/C8KO0PnTJHfXncTQOiZdoQqZ0inyIh053SJHpHYucDpr/UJsdjDwsW6Y/wsnX2mxwkpKkH+DkY202OGnomq1cq32aH99Pn0LWbyvfZTd8vaqXhq3WS0PYq3pp6Gq9vJ7p2t6StBH1O+MJVbtj5FtQryLI0GSvePNzNFm4M2tM6BHTB4vT6Te2yHCC5jFzz0E6DiaDB9K60P/dPvk/e/mcejarCAwj24OsRUDK5m5WLEml9cmdJUtu/NJWqfrI1POUCzEKabWbpnzM3FGCKiEpKYUuhnaQvKlB7APczkutd1etikkvUe6FvTe020XaGHCkiZwMY16+akMet1b9nFcSurH3/sWIr72JwUV6vz1EGqZy+het9k3LjfYNUzm4pJWPeEIKtShCqT51wL4JaqEctVXPNHBtVT2eb+dpd/y/3Vynj7T1uDeB6ul/D4H7vD2k3q4BVeXUfjk52d0avqEUqdcZ1CX04pUhJUbhMzh0hW0BWSS9p8/pap35vm4km1t/KmqAfp43i0NZ85mMwQVtOsvDop6Mwdg9fSzA7l616yDXfe+19LYN6oFrfKzpOxTf8/H4asdgHdt+UM/cmjsIOeS3nKxw62+zyXIGMQzD/jvs7L/DsP8O1+1iW7m8Jb1sFl+rJcSQMZcmHg4TWdj0CBekGI9QDLEUvsoNJVYLXnmV0dXFJa3OCVPSEN9OugI3Lpvq/OiLtaHBUlz66gkr98hyVmjxTx30sHZntVble+m88OqBtZEHNxhdXUBnjIHjo/dHx7DNXE/YFQImvhAa3/4xRFsstPd3r4jcVwEwYf7r5oFDVhaGc1Qde1uB6mFpCWC652EpUfgU957XIYi3EILoHHf++Gg2cfct3vxHMYkgKww7vfV6hoa+allV7vjOknbBmkSwRC1w5qi7XUMqjPueQjxHaWgHYtsr4M11KIm3g81Lvw+9Cahy0XRo3S+IwPf6zl8pvtqzJl3W4fkoSajkjuZOc3J51eb676djqKp/AUN2MQM= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Result"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluations/results/{result_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Result - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-results.api.mdx b/docs/docs/reference/api/fetch-results.api.mdx index c0747c0672..7ab6eaeb32 100644 --- a/docs/docs/reference/api/fetch-results.api.mdx +++ b/docs/docs/reference/api/fetch-results.api.mdx @@ -5,73 +5,298 @@ description: "Fetch all the results for one the comparison table" sidebar_label: "Fetch Results" hide_title: true hide_table_of_contents: true -api: eJzNlN9v0zAQx/8V655A8pYy8ZQnKjFYNRBTV3jpqspLrolHYmf2ZaJE+d/ROUnTrGwSbzw1te/n15+7BkhlHuI1XNWlMmeXT6qoFWlrPGwkpOgTpyv+DzF8QkpyoYpCUI7Coa8L8mJnnbAGw1liy0o57a0RpO4LvDN3Zu6yukRDPr4zQgiBhxRbnYqzM7E9yrJljyVS7cxgP7kGCbZCF9wXKcSw45q2fS0goVJOlUjouKkGjCoRYpjkBAma26kU5SDB4WOtHaYQk6tRgk9yLBXEDdC+YmdPTpsMJJCmgg9GkcQihbbdcBBfWePRs9/FbMY/U/Fu6yRB73d1IZa9MUhIrCE0xOaqqgqdhLDRg2efZqylbdtWwvuLi9PAP1Sh066aS+es+4eoUDlWk3RXd4qkdMFfmrD0pwaFTSa3yuy/7YLOU6laeTjRhjBDB+2mlcOZck7tj/T8YrsCoZVQ+uw16b+i9ypDOAR75ZVYDLHi23bMbe8fMKHJs69DX13q3m4zhhnl7dR9uY2PnXx/SzaYXK1WNycBu7ctkXLLRGdIgWPKIYYoD2M58uujZgJzG43se3RPA/i1KyCGnKjycRQlha3Tc5WhIXWudKQqDYytx6R2mvbBZX6zuMb9FaoUHcTrzbHBLSPTQTA1O+ivKn2NLEc/cvOacuv07+5l+5HLOy/uV5udDe69NPNQnJjfLEACt9HRPTt/dz6D55toYsy0qyTQPuQO1yCfqXDoHyRgGVAHQlV+GC+4ssp6KpU5itctvuVB6EkxzThu/8mG7F+E8BdFVaF0GKwgRdNztYYTrkBC/HxNDmhtJOTWE/s1zb3y+N0VbcvHjzU6pmcj4Uk5zR0FllLt+TuFeKcKj69I9mbZD+Jb8VLpA2GG8eIS+R9I+In7k90e9kw+MNz0NvMkwYqOvE/WIsN+GMHPlyto2z9nQXSY +api: eJzNVcFu2zAM/RWBpw1Qm6zYyadlW7cW3bAi63ZJg4K1mVitLbkSXSwz/O8DZSeOm7XAbjvZlkjq8fE9uQHGdYBkAWd1ifbo9BGLGtk4G2CpIaOQelPJNyTwiTjNFRaF4pyUp1AXHNTKeeUsxbXUlRV6E5xVjLcFXdtrO/PruiTLIbm2SilFuyNuTKaOjtTN3ik3kjEnrr3dxo+2QYOryMf08wwSWAmmmx4LaKjQY0lMXppqwGJJkMDoTNBgpJ0KOQcNnh5q4ymDhH1NGkKaU4mQNMCbSpIDe2PXoIENF7IwkKTOM2jbpRQJlbOBguSdTKfyGJP3vU5TCmFVF2reB4OG1FkmyxKOVVWYNJad3AXJaQYsbdu2Gt6enBwW/omFyTo0p947/w9VofLCJpsOd0aMppA3w1SGw4DCpaNdtJtvq8jzmKpW71aMZVqTh3bZ6u0aeo+bPT6/uA4gtBrKsH6J+q8UAq4JdsVemJKQoa5ktx3Odrd3lPJo7IvYV3d0H7ccygz0duw+38bHjr6/HbYNObu6ujwo2M22JM6dKHpNHHXMOSQwyaMtB/2GSTMSczsZtB/IP26FX/sCEsiZq5BMJmnh6uwY12QZj9FMsDLw1N2zuKs+SCiIpgOltTe8ifVml+cXtDkjzMhDsljuB3wXPXUKGYfthoOVuSDhqvfjrObcefO7G3vvx7zLEjKMXbmY3vPWY3uP6T1ZMbD02cGeHr85nj7XTJ+gZpfnvS0wjbbY4ohhoJ/QtSMKNFAZPQFMWL4bNgRl5QKXaPfqdTfkfDeREahm8OV/cpX202H6xZOqQBMdGKloegEu4ECAoCF5ep9uNbjUkLvAktc0txjohy/aVpYfavKipKWGR/RGOoq6ykyQ9wySFRaBXqDs1bx37Gv1HPSt2qxITSDKF2i4p83BTyBeSPlWz00fM0tTqngv++D+FOHvvPr59Ara9g+yg4Mn sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Results"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/human-evaluations/{evaluation_id}/results"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetch all the results for one the comparison table Arguments: - evaluation_id -- _description_ +evaluation*id -- \_description* Returns: - _description_ +_description_ <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-run-preview-evaluations-runs-run-id-get.api.mdx b/docs/docs/reference/api/fetch-run-preview-evaluations-runs-run-id-get.api.mdx deleted file mode 100644 index b6079d2031..0000000000 --- a/docs/docs/reference/api/fetch-run-preview-evaluations-runs-run-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-run-preview-evaluations-runs-run-id-get -title: "Fetch Run" -description: "Fetch Run" -sidebar_label: "Fetch Run" -hide_title: true -hide_table_of_contents: true -api: eJzNWEtz2zYQ/iuaPSUzjOVkeuKpqp00auLGIzu5eDQaGFxJSEGAwUOtquF/7yxAUqQetPzITE+2wN1vd79dYBfYgGMLC+kdvF8x6ZkTWlmYJqALNOHXOIMU5uj4cma8mhUGVwL/nuFWnNbtLHwV2Wy2QAcJFMywHB0aAt+AYjlCClEGEhAKUiiYW0ICBn94YTCD1BmPCVi+xJxBugG3LkjLOiPUAhKYa5MzByl4H1CccJIEJl4NxhmU5ZTQbKGVRUsA787P6U+GlhtRkLeQwo3nHK2dezmYVMKQANfKoXIkzopCCh6CG363pLNpOVUY4saJaIFrH5UqX4VyuEDTcu4iSCSQ4Zx56SA9LxMiIlhS6y/zQFAXdS5DVo4LCDvjUlsirS1UOXGvtUSmoEyaJeWlBOKndmtsBxcRoUwITooVPgfsM+lHKMbdM8FGEaEsk1pK339H7lq0but14tWHwNc+aJlAjo51XWFZJkiPyesOp3vOVnXXgq2z27GU33dX2jEetgVcGO4lM68+eCn/sFq9+eJd4d1r2A2YQITD/EQtZgxb97K7owt7FPcpXxGZpLFXnv8nUv/Un4V1D9J6LMg99cdxdBtLsTryTmJg3wXSLZPuwfU0qMsWRJkAN8gcZjPm+gBbR23GHL5xIvhz3MpFhB2MAlm+yH6Gka8RtjKSocSfYOQywlZGarru19S3TrMTmtMpZP22Dl1ry9eLWqnZaqzUhL2olZquxsrLQUe8FRr7jPL/VqmXCVjHnO89lBJA5XOahgpUWVz54dEjDRvGKxWXbBwgKBgmpDc0PqAx2tASZ4qjlJjB9FCzuolOHHK5GRAa65Q0ttu+uoOAdVjsxFS1i13Jv3B9aKaqXfyE6+05d5wYoehApAFupeOIBAkwpbSLP9oHIUGUCWgjFkL1gXJvnc4hgaXPWQD0TrehvkQIGpxwjgYVr7rLka7TjfwFS0j6xVNhbkj3xTdIz4Q0qana718HhELPCtl9uXI6YHc77N8FiIObZOLVJXPsxmExVt0G/PCAM44xnGK8kmhKtFNeD3n2KKduwjYN9Vsg26W4bxDaAZpU+q3j4i1NuawohNodyo6kjmvpc3UgpUJlvTml763J5phcnF4e4p/AKqw+qq9iZBfR53CMY/HU0y3cOHvErun7aZUToE5wPJbKA5BVRqrgTkB9VPFd1cVx8n2KLB26Tp2q/xzd5k5elqTzy7t3+1f4b0yKLCgM3lPjffr9PUPHhAxX6sObRWre+fqYC810N0vbkD/X3ZM2r130FeUVWssW2NedGyKJjEFsvA+UHMUVTVdy7Y7X0BvZPR7GZaSvL7kfb2+v9wBjbrtJ/UCPTAOqnnBrX2p6eapfk2jfwrB6fRq2Xp+G9Po03MSXpZK2EJpV/ezkjYQUls4VNh0OudQ+O2MLVI6dMTFkhQj7xCL3Rrh1UBldjz/h+iOyDA2kd9O2wA0VUSyLrliTEVaIT+F4qB68Rt4ttRH/1pNSePdaRq0yNNy5DuoVWaPg3GB0PYbW6AvnZ2/PzmGXsI4w1T/jof5r2+EzJDssNPHTAJaH4geHLP91+4E8K7R1NIxt8dr52bmYVtE7/McNC8niqBbMbqrc3UGVO7LaemoMczX9Sau3wWkCS20daWw298ziVyPLkpZ/eDSUo2kCK2YEuyfG7jaQCUv/Z5DOmbS451xzMsCrSbUBXg+2LwJdp+s8Kkoi+Um/IIn9pX6/DBt7WZdI1XxgxDkWrqW2dw5RLTWV/fv7WyjL/wAbjVX3 -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Run"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluations/runs/{run_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Run - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-scenario-preview-evaluations-scenarios-scenario-id-get.api.mdx b/docs/docs/reference/api/fetch-scenario-preview-evaluations-scenarios-scenario-id-get.api.mdx deleted file mode 100644 index ca686f016a..0000000000 --- a/docs/docs/reference/api/fetch-scenario-preview-evaluations-scenarios-scenario-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-scenario-preview-evaluations-scenarios-scenario-id-get -title: "Fetch Scenario" -description: "Fetch Scenario" -sidebar_label: "Fetch Scenario" -hide_title: true -hide_table_of_contents: true -api: eJy9V0tzGzcM/isanJKZjeV4etpT1cRu3KSNx1Zy8Wg00C4kMeVy1ySoVtXsf++A+5Zkx/Y4OWlF4vHhAwmAO2BcOYhv4XyD2iOr3DiYRZAXZMO/yxRiWBIn67lLyKBV+bywtFH0z5w6nXbTzTs5lc7nK2KIoECLGTFZ8bUDgxlBDD1BiEAZiKFAXkMElu68spRCzNZTBC5ZU4YQ74C3RVBlq8wKIljmNkOGGLwPVlixFoGb2vboMoWynIlJV+TGkRMrZ6en8pOSS6wqJAJR8UlCzi29Hl3XwhBBkhsmwyKORaFVEgIef3Ois+shK6yQxqrykOS+UqoBK8O0IttD+C5IRJDSEr1miE/LqKUkuDPbz8vA19D0Uoec9QUwTZXAQn01EO0kahiLPNeEBspon8pyVkbNUr74Rgn3hYzXGoTGBv1FAFFGkBHjM8E0nqMDlgaes8VwpR/DcV+QKJt4jfbVhdf6D5ebN589F55fw7EYFVP2SC20FrcPEzPUhSex+qeQKRrPz/BPIPWv/JNy/F1a7wvyQP1pHE3rg5dYQqZ0jvwQD70KkSLTG1YZPWj+XWV2NAmwfJH+CCdfKrO1k5Q0/QAn7yuztZOGrsVWyu3j/ISa+hiyftuGOtvx9aJeGrZaLw1hL+qloav18nKmK3sbsk5VXeMRt/bAyNdaXboEI/sHr38EZHwmjb0gk1Yrd548SY+03phqyVUtT4JBpb2VhkfW5laWEjQJaU0p9FB0c8JNBeIY5Laltd6FTsNkN6iPwj5ao/ZZbAxIuVAZOcaseNEbM22tloGl+nQ9dua49qYaN/bLWX+guW0MHye16f+HMI+Zvd9AO8GUpSj+cnZ2OPB8Ra3SoDU6l6Q/f9pJiVGFzNa9dF9A58lg9yltqzeYVO23i/tTXgEMg4hbHUtW11qdwxV1veZ+0UDGaCq738ulxFW5ruX6F7alt2L3/jDeV/Q9lOEP0+nVgcEqt8OkXsisPmrPURjQ1rlM8c0ozmuIYVwP8ePeED9uh/jxrjebl1IoyG6a6d1bDTGsmQsXj8eJzn16gisyjCeoxliocKccJd4q3gaVydXlR9p+IEzJQnw76wvcyJmqTslQrE0QFuojCV/1u2HieZ1b9V+V+vrlsK60ylBplmGAbribBHCjydUl9KownJ68PTmFff4GwnIdMAnXofEdtiHaY6GNXwpoFu4CMGH2a7chyIrccYamZ+8gXQM0LQVM//K40KjCUQ++d3Uqb6FOpbjuveK6x4R8x/3H1iyCde5YdHe7BTr6YnVZyvKdJyspm0WwQatwIQTe7iBVTr5TiJeoHR3AbOsGvLqur8frUTcVDuE3aTWSU0Es/yCCv2m79yoMd3/dHJtdLTFJEiq4p3tQquR8tef+9/MplOX/T0YcUQ== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Scenario"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/evaluations/scenarios/{scenario_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Scenario - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-simple-evaluator.api.mdx b/docs/docs/reference/api/fetch-simple-evaluator.api.mdx deleted file mode 100644 index bedcaee7df..0000000000 --- a/docs/docs/reference/api/fetch-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-simple-evaluator -title: "Fetch Simple Evaluator" -description: "Fetch Simple Evaluator" -sidebar_label: "Fetch Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJzNWFlv20YQ/ivCPCXAxnKNPvGpqo/aTdoYPvJiCMZoOZI2XR7Zw60q8L8Xe5AiRcuVZBvQUxxx5pvZb2Z3jiUYnGlIHuD8CaVFUygNYwZFSQqNKPKrFBKYkuHzRy2yUtIj1YLAoESFGRlSDmIJOWYECTQSjyIFBiKHBEo0c2Cg6IcVilJIjLLEQPM5ZQjJEsyidLraKJHPgMG0UBkaSMBaj2KEkU6g8XNwlUJVjR2mLotck3YwJ8fH7p+UNFeidCeABG4t56T11MrBTRQGBrzIDeXGiWNZSsH9gYfftdNZtlwrlaPDiGCBFzYoRY9FbmhGquXiqZdgkNIUrTSQHFdsRYq3ly++Tj1lXeyp9NHYLCD0I7faFFlXKLoyKQpJmEPFmp9yKyU4lmrnrvTgNCBUzMFt8Gs3xCYoEXRuM8xfA3jpAaqK1ULF5Dtx0yL51mdjY/jCM9dHrRhkZLDrC6apcLFGed1ht+dtzMYWbB3tjqVs0v2lfcjnbQEXiluJ6sOFlfJ3XeSfvlpTWvMR1o/sQIShbEstVAoXL9K7pgs9kl9S/sOR6TR6iXpIpP5ZfBHa/C+tmw7ZU9+No7uQivE53IqBvgtOt2Ldh2w/qLMWRMWAK0JD6SOalwBbD3CKhj4Z4f3ZbOU0wA5Gnixbpu9h5D7ARiMpSXoHI2cBNhqp6ZosXDXbzo4vWduQ9evCV7EVX29qpWarsVIT9qZWaroaK1ra2b65eut0XQ15M/fiyXG9BnTr6hMp/Yor9i2qu0gqsS/KvRIBQe6PIB3CnDD1Pdlu7/N7UXJ4CfFCX3FDU1KU884bUTs63qkOXMYwVHWfu21EDqiSHmR7skMMbiPxrg/EshT5tm3LOsW79Ei1IR94V3r3zv6gXXUnrUPtug4yVzYrX68odYEi9SQ4bcNuGF13yMEIXfmZcypmNszW72HrtGNghwHqDH1j35uftkd4nXYzmFeV0/r55KQ/x39DKVJ/ssG5Un4DsecQn5JB4ctszMd1AVnwztdd7lOrSoQUXh36S8GxbsQzPXtu8bGatLTGGa1yerOoJ2Nw574+x/hq6fLgzxVMR7l2yW7oDexuPsZZoO+l8F7e3V33AENsu0G9cMulQciG1iLBz+3zwq2fZmT8rsnMIYFhqehJ0N/DsI4aNvsLPVy2F08VhDtd76Z8VwVzY0qdDIdcFjY9whnlBo9QDLEU/hpp4lYJs/Aqo+urz7QIVRySh3FbwNeVkCpdsSZKWIrP5EiLW7GRNfNCiX9D/ONaLHRqnkiRTwuvHgkceecGo+srYKtmDI6Pfjo6hnUSO8LuTiD3d6K27T8DW2OhOT8woMxfCDCE2S+rD86zstAm7nMi3saYrY2rkQpD/5hhKVHkrf42xPMBYjxduDwetHZlGhgknXXimMG80MYpLpcT1HSvZFW5n39YUi5uYwZPqAROHIsPS0iFdn+nkExRaur52Lwg8OEmXpSPg1UR6vpexzZ3gXV+uf8Bg79osb749M/AvE6eZRQZcU6laSn3Xi2XZU3q/3Z+B1X1H4qAb2U= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/simple/evaluators/{evaluator_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-simple-query.api.mdx b/docs/docs/reference/api/fetch-simple-query.api.mdx deleted file mode 100644 index ec223c9884..0000000000 --- a/docs/docs/reference/api/fetch-simple-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-simple-query -title: "Fetch Simple Query" -description: "Fetch Simple Query" -sidebar_label: "Fetch Simple Query" -hide_title: true -hide_table_of_contents: true -api: eJzNWN9T2zgQ/lcy+1RmXMIx95Sn4wpcubZAgfYeMpmMYm9itbJkJBnIZfy/36wkOzZ2QsjQmXsBx9Z+u/r2h1a7AssWBkZj+Fqg5mhgEoHKUTPLlbxIYARztHE6NTzLBU7vC9RLiCBnmmVoUZPsCiTLEEbgvk55AhFwCSPImU0hAo33BdeYwMjqAiMwcYoZg9EK7DInOWM1lwuIYK50xiyMoCgciuVW0AIybjm4SKAsJ4RnciUNGoI4PjqifwmaWPOcrIYR3BZxjMbMCzG4CYshglhJi9LScpbngsduk8MfhmRWDbNyTRRY7jXEqvBCwVouLS5QN8z74FZEkOCcFcLC6KiMPBlOl1xezR1NbVxPWvN7m44yqt/IQgigrVcaL0m2jNrb3g/qtAFRRhBrZBaTKbPbABuuSpjF95Y7ezZr+eBhByeWlBR58iuUfPOwQUmCAn+BklMPG5RUdM1c3O+mxwX3LmT96WN+zdebaqnYqrVUhL2ploquWosRxWLfWL0l2TKCtzPP2zQXrgo2IVmScMoJJq5bWdtROlNKIJNNLdVOJmVUvVKzHxjbraacOyNIZH9juhxW1aqlOZu13zT30K8LYq7jQjD97lJ95sb+bZR8f1XYvLAH8JpddsThVSTdBY4ytOz/y9F5IcSLDHGL2Y5STGu23B48bdnXkfqFyKQCwJ6T2j6xHrlM1CORt+1Yw0c0b1tyLz1kGYESyVuDX3nIMgKJT7tCv1hXLgmrjEDwjPeD9gbdM5TPTpr2rRPU221DWWTUyDETo0z8O2oPwo/JVg4cPBVWaVE/MLG3xRcVQBmBZra/wekmVwfnhmTLThSvF/xTx2IXhio6Fxb1C6HqG12lfQMZejdgMllnXpde91VR+ycVGST9G6k0ND2nFjxm4qrSULr201cNpztk/2bj5hxF0tck1ynvFpQR/MTlvgfqJ6SyAg9MFLv2oq8ultVOy55y1l9I/TVh9/r13ZlfRi2Hvpwp3NBFxUzJj83uS2U509wo2fDeZhS8J++7vwuKB2HdE7pH+juzj7KJf1lkqHm8E7ixTFvzyN09CmVSPdJVhnFJG8iYjVOkJ8F/YlPRrUPbSQ+XPp6nvGUqHdU7yaeMDEhZh8xTHu+GgE/cWBOsCD8aOGf0BmWMfWDdelYtatzJyN0uROoU3JR5MTM4NSgNt/yhPy16mr5uF88MDm5rmIYpcyYMlhHgE4vt1Dlwby1nhDH44jA6KrbUzzt8sleBC8JvU8BE/xGwi0UnQrzKEh9ka0s2OzWs6cFajxjGoXC2EjoUXleF626rOiEOYPK8NPXImuaexpNtG6qR+46mLXJuynGDD9xwJU+Z68leI3/rZjQOZX/Jel5SliTx+/Fxd7zynQmeuOHJ4Exrl2Z7zlYStIyL1nnYXiBUvOG0fPmA2uLWz8ob6K4SZrHtmP2CxrAFrjvqzUsdGYM7+vpSkNK+vOqwrn2cBXo9u5u3cerp2+baj3d31x1A79u2U89pzjfwkTD4GuZ8GdpU0RRwgdaN/WwKIxjmGh84Pg79VHB472eHw1U1ACwhAoP6oZoPFlrACFJrczMaDmOhiuSQLVBadsj4kOXcJbrBuNDcLp3IyfXFJ1x+ROYa3/GkueCWosnHR3tZ7RqWc2ptomoyeVLYVGn+r3d6GE+mXqp0fe9cOfGqhjnjBifXFxABbcNzdHT42+ERPGeutdidzLFdD/jCZ4iesVDvnw7BzGUBWGTZH+sPZFmujM2YbOD1OurZIDDQYPHJDnPBuAt0p38VnDiG4ERylcMCP7PkrpcY1bPcSQSpojvXGFarGTP4TYuypNdhwjmeUAOpOZsRdeMVJNzQcxJqf8e4ulbAu5uQEgeDdcvdNrpyqKRdhj4VIDS964mzS/a0ipZV+HwSx5jbhmCnNlFY1UH+19kdlOV/T1Hb2g== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Simple Query"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/simple/queries/{query_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Simple Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-simple-testset-to-file.api.mdx b/docs/docs/reference/api/fetch-simple-testset-to-file.api.mdx deleted file mode 100644 index dad3210b9e..0000000000 --- a/docs/docs/reference/api/fetch-simple-testset-to-file.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-simple-testset-to-file -title: "Fetch Simple Testset To File" -description: "Fetch Simple Testset To File" -sidebar_label: "Fetch Simple Testset To File" -hide_title: true -hide_table_of_contents: true -api: eJztWEtv20gM/isCTy0wjbPBnnRab7NB0nabIHb3YhjGWKKt6Y406jzS9Rr678U8JEtW7DiuA/SQUxyJ5Ed+5HAorkHTpYJ4AmNUWqFWMCUgSpRUM1HcpBDDAnWSzRTLS44z7cVmWswWjCMQKKmkOWqU1swaCpojxFDLsRQIsAJiKKnOgIDEb4ZJTCHW0iABlWSYU4jXoFel1VRasmIJBBZC5lRDDMY4K5ppbgWCp9FNClVFGkTrzszZCIDfDMpVB3FBuepA0mJ1u3BuY2FyS0OiHoDAVyUKS0TXJQsWnhSGc6imG6euGMdobF/2fHK/j/HpmeifLU5lH0tUpSgUKmvv4vzc/klRJZKVNqsQw8gkCSq1MDy6D8JAIBGFxkI7L8qSs8QVwcCxEa9bPpbSlohmHiERxisF91ihcYmylbL3ToJAigtquIb4vCJ1iXRj7lpecFeduwUyqlxJJjRE22NvLgRHWuyl75qqaNxYqYg3K2nysza9iapqKknMv2Ki+8V85QLt26sI5Ki36oKmKbOJofyuQ8YBlVOnpoOUz7tP2uE9jgUJk4nhVL65Mpx/UKJ4d2t0afRb2A7VGmEa8wO1qJR0tb/Wu7rQI3ef8t+WTKvRq6tfidTP4hNT+kladwXZU38eR2NfiqGHHdeQfC8i3a5znKnLlomKQCKRakxnVO8z2Lo9UqrxnWbOn90o773ZaOjIMmX6EiBfvNkAkiLHFwC59GYDSE3XfGWv4sNw3H17CFl/rtwlvOHrpCg1Ww1KTdhJUWq6GhTFzfLYWh1Z3YrA6dwLkdPtO6B7DdZX4IylW00rtN6nXTi8Adc3ZXSTuj6x4/5tkPuuhsHwRBS150ECp7U9auy+9p3XvvOifefUPeOR2fngGeeRAbfuftNnzRL1XPs6cB0wcL1O+i8w6fevzldSjyb10pL51OesnQWOGigO+lK+xwemmCi8K/0P5j0WRm6FFez8jG6zMqkqq/P7xUV/w/IP5Sx1+5PoLymFPH69kqKmjNtfO0YqLpLO2+cU8nQ7UZuQPwnvoGtNavnYELk5bErRZSvru0UdGc2mrMf3ZjE2cXF56CDXqpkNvZ7d3WFcevr2Jfd6PL7rGfS57Sb1yq5CI18LUT13jkV05VehOepM2JVpKZR2q1GdQQyDUuIDw+8Dv0MdhBFYDdabYbgapOJ7wQW1m06F8qHepxrJIYZM61LFg0HChUnP6BILTc8oG9CSuaOkMDGS6ZVTGd7dfMTVNdIUJcSTaVtgZIvMl01XrMkYLdlHtASGHebQ6ExI9r+vhbDHzLyWZYgVC+HUA5lD51w0vLsBAjYMT9352W9n57BNaEfYng+auPNRY7vXQLZYaOIHApi7wwEaaf7H5oX1zGYhp0XL3hP529pWBEI0/qcHJafMnQTnyTqkdgIhtTZpzio0e00FBOLOGrzJ8JRAZisknsB6PacKv0heVfax3w/bJKZM0TlvbYj/xdXWlvuBcmMddAd7n3zYQG/kp/YfyazC42BbTDSdC97chwP6NtrcOl2G6joqVm3M2qEWI675ZHWZroPAMEmw1C3VXq+07jdH7e52NIaq+gHQUHa4 -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Simple Testset To File"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/{testset_id}/download"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Simple Testset To File - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-simple-testset.api.mdx b/docs/docs/reference/api/fetch-simple-testset.api.mdx deleted file mode 100644 index ec78be7799..0000000000 --- a/docs/docs/reference/api/fetch-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-simple-testset -title: "Fetch Simple Testset" -description: "Fetch Simple Testset" -sidebar_label: "Fetch Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWEtz20YM/isanJKZjeV6euKpahzXbtLGYyu9eDQeiITETZeP7IJuFQ3/e2cfpEjRsmVHnunBJ8sk8AH4gMWCWAPj0kB0A1MybIgNzAQUJWlkWeQXCUSwII7TWyOzUtEtezEQUKLGjJi0VV9DjhlBBOH9rUxAgMwhghI5BQGavlVSUwIR64oEmDilDCFaA69Kq2lYy3wJAhaFzpAhgqpyKCxZWYHg4egigbqeWURTFrkhY0FOjo/tn4RMrGVpfYcIrqs4JmMWlRpdBWEQEBc5U85WHMtSydiFOv5qrM6641ipLREsvYW4qLxS8FfmTEvSHQffOwkBCS2wUgzRcS0aQpy1fPV54cjqIy+Uy8FugRSNIz7GEO1GMDgzLwpFmEMt2kd5pRRYnhr3ztGMpi1KLTysxvhHMT1EbYP1YsX8K8U8TN2ZC3SIVwvIiLHvBSaJtIlBddkjY+BnKJwObJOanqVs3n/SDe9+WxBLHVcK9ZuzSqnfTZG/+1xxWfFb2A7VgkimbE8t1BpXDxK7pQsDch9S/sOSaTUGdfV/IvXP4pM0/Citu4IcqD+No6kvxdC39mJg6ILVrUW/6zwP6rQDUQuINSFTcov8EGCnVybI9I6l82e3lfcedjRxZFVl8hJGvnjYYCQhRS9g5NTDBiMNXfOVvXj2s+Nul33I+nXlrpwNXwe10rDVWmkIO6iVhq7WilHV8rm1em11awGHcy9Ejtt3QP8abK7AW5lsNa3Qeh93Yf8G3NyUo4vE9Ykd929reehqGIMORFF3+hFwWOzrFve177z2nRftO4fuGffMznvPOPcMuE33mz1plmjm2teBa4+B63XSf4FJf3h1vpL6bFJPLZmPfc7aWeBZA8VeX8pXdCeNLHLvyvCD+QGEa7eoCTg/otuuTOra6vx8cjLcsPyFSiZufzL6oHWhn79eSYhRKvtrx0ilirj39imFPNtO1CbkT4V30LUms7xviNwcNmNw2cn6blFHxmhq397H92YZduPi8qaDXKdmNvR6dneHcerpeyi559Pp5QDQ57af1DO78Bv5WhhN24VfRpwWdiG4DPs/TiGCcanpTtI/Y78gHIfJ14zXmxm4Bjux6rtmV1hpBRGkzKWJxuNYFVVyhEvKGY9QjrGU7uAYiisteeVUJpcXH2l1TpiQhuhm1hW4tiXli6Qv1uYHS/mRLF1hSzmpOC20/O4zHxaVqdeyfMh8UTj1QN3EOTeaXF6AABuGJ+r46KejY9imrydsTwPG7jQ0tt1rEFsstPGDAMrcUQAmzH7ZvLCelYXhDPMO3o5sbe0kAhFM//K4VChdvTsP1iGTNxAyaZPl0KDdXhoQEHW+aWYC0sKwVVqv52joi1Z1bR9/q0jbjM0E3KGWOLf83awhkcb+TiBaoDI08K/tGvDmKhyOt6NNx+/73WQ1tym9Q1XZ/0DA37Tqr6DdwU+bolkHgUkcU8kd1UGfstXVlvtvH6ZQ1/8BgZbrRw== -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/simple/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-subscription.api.mdx b/docs/docs/reference/api/fetch-subscription.api.mdx index 6d1efd54db..ace8e35fba 100644 --- a/docs/docs/reference/api/fetch-subscription.api.mdx +++ b/docs/docs/reference/api/fetch-subscription.api.mdx @@ -5,59 +5,69 @@ description: "Fetch Subscription User Route" sidebar_label: "Fetch Subscription User Route" hide_title: true hide_table_of_contents: true -api: eJyFUk1v2zAM/SvBOwtxtqNPzYB9BL0UzXoKjIFRmFibbakSHcwz/N8HOm6a+FJfBIuP1PtgD6FTQr7DF1dVrjmhMPCBI4nzzeaAHEcWW/5K7T7Z6IJewyByCr5JnJD3+Lxa6XHgd0SObWstp3Rsq8XzBIaB9Y1wIwqnECpnx3ey30l7eiRbck3I+0E/Mxv5TZkstjdMFi+J4+LZt6LDa5bSK+UTCwwCSYkc2f6iLJtJSBzPHFV7jzZWyFGKhJRnma18e1jSiRuhJbmMgsNQaIdto5NubFk/bR65+8F04Ih8V9wCtirj4s09rId0gZGDgnvkDgYN1fq/bqX00f2jiZxTveWlS41wzdGP7U6qET+SW6yfNjBQGReHVstPyxXmvt2BNQGyYwJvb49lmJkLV/0w4Jqc1oSpfngvKLPgk9TU3Mz7KKY7cldHhP9KFipyDYaJSj9FuMMUoaZ2G2JhUPokiuj7PSV+idUw6PVry1FzKgzOFB3t1bVdMZg3UzXCP9ypfGs56L6cqWov2cwWU6O97tb3rz8xDP8Bxkwaeg== +api: eJyFUktv2zAM/isGz0Kc7ahT02GPoJeiWU+BMTAyE2u1JVWig3mG//tA201SA0N1MSR+pL8He2A8JdB7uLd1bd0JCgU+UES23m1L0HAkNtWv1B6SiTbIMyiIlIJ3iRLoHj6v1/Ip6YrQsGuNoZSObZ09zWBQYLxjcixwDKG2ZvxP/jtJTw/JVNQg6H6QoxYjvwmTbHfDJHtOFLMn37IMb4grL5RPxKAgIFegIT9MyvKFhETxTFG099DGGjRUzCHpPDe1b8sVnsgxrtDmGCwsuWzGavZFoDAUMs600XI3zts8bh+o+0FYUgS9L24BO9E4Gfce1gN3gUADBvtAHShw2Mh903Llo/2LM3MrBKqpS1yy7ujHdss1Xbndo3khV4IC0TnRXq8+rdb/EzM3ZJvH7RwVmjGqNx4jDNTCrotRoIAatFJjwubuWhCWwSdu0N3M+yjPdyQv7jD94TzUaB0MM5V+znoPc9YS723ahYLKJxZE3x8w0XOsh0GeX1uKklmh4IzR4kEc3BeDejNY4nyhTuQbQ0EW64x1O+W02GCJ+bKE37/+hGH4B2X9KQk= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Subscription User Route"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/billing/subscription"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/billing/subscription"}></MethodEndpoint> Fetch Subscription User Route -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-testcase-preview-testcases-testcase-id-get.api.mdx b/docs/docs/reference/api/fetch-testcase-preview-testcases-testcase-id-get.api.mdx deleted file mode 100644 index 38139d6a0a..0000000000 --- a/docs/docs/reference/api/fetch-testcase-preview-testcases-testcase-id-get.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-testcase-preview-testcases-testcase-id-get -title: "Fetch Testcase" -description: "Fetch Testcase" -sidebar_label: "Fetch Testcase" -hide_title: true -hide_table_of_contents: true -api: eJztl99v20YMx/8Vg08toMZusCc9zWuaNmu3Bo27F8MwaIm2rjvp1DteNlfQ/z7w9MNSnGZJ4QJ72FMcHckv70PegVcB485BvIQFOU7QkYNVBKYki6xMcZVCDFviJFtza7AuLd0q+qv/4NaHNZWu1ztiiKBEizkxWYleQYE5QQwDQ4hAFRBDiZxBBJa+eGUphZitpwhcklGOEFfA+1JcHVtV7CCCrbE5MsTgfYjCirUYdDuYXKVQ1ysJ6UpTyJbiCs5nM/mTkkusKmVvEMONTxJybuv15GNrDBEkpmAqWMyxLLVKAorpZyc+1SCz0gooVo1CYnzj1CasCqYd2UGGr4JFBClt0WuGeFZHPZIgV+w/bAOvcWixccRCbWT1MJo66i0KrzUIkyEsRxxYRXDa2Dd93MQSMqVr5EfGTpHpBaucHhR41YSdzFlEfJn+CJFPTdhWJCVNP0DkognbinS4NvsTVqOD9cu+LUrH66QqHa1epQN2UpUOV69yutBNvK0O1+EwJKapkvOP+np0Jo9EN8ZowmKo0uZRr+ScN5/M5jMl/GAqlyEJcfn+ZDrl6Og6Ginnm/GX4R7u14JE2cRrtM9+N++V41+dKV588Fx6fg5P2eWROzwJ0qJllBPjf5fRpdf6XwkppvyRXmgt7h9unrHv06D+JjDl8OL/UE8G9UJg1kcux4PLPVEe49ZPLnUt5j+dnx8POn+gVmkYYyavrTX2+6eclBiVll8t4bsG2iSj1ad0yOCebIpy2O170yQYzrzb3TcYHrrYOdzRoUrfNg0wJgtZvQ/1YShdhn010q3doMQHvA3db2/josH3UF3fLhbXRwGb2o6Leilz+aTvnnAXZkYm9m4E5wximLYD+7Qf2KfVYA6vQeY/e9tN6t5qiCFjLl08nSba+PQMd1QwnqGaYqlCcztKvFW8Dy7z66t3tH9LmJKFeLkaGtxIHzWdMTbri4KlekfCqH0jzD1nxqqvTbnbV0LWeAkEVWxNcG95zUNyk/n1FUQg22jozM5ens3gLrORsRwBTMIR6LTDMkR3KPT7hwgoD/0PTJj/fFiQzErjOMdiEO+oRKNsegRMf/O01KhCewftqi3fEtryweGp4CCCePiUWkWQGcdiXVUbdPTJ6rqWz188WSnSKoJbtAo3gmxZQaqc/E4h3qJ2dJRYfzvAs4/tIXg+OVyZ44S7QhZSxVvUXv6DCP6k/Z03XzjhWdcoVWsxTxIqeeB7dCFJR/Xd/eb1Aur6H99vClU= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Testcase"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/testcases/{testcase_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Testcase - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testcase":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},{"type":"null"}]}},"type":"object","title":"TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-testcase.api.mdx b/docs/docs/reference/api/fetch-testcase.api.mdx new file mode 100644 index 0000000000..d38802bf23 --- /dev/null +++ b/docs/docs/reference/api/fetch-testcase.api.mdx @@ -0,0 +1,258 @@ +--- +id: fetch-testcase +title: "Fetch Testcase" +description: "Fetch Testcase" +sidebar_label: "Fetch Testcase" +hide_title: true +hide_table_of_contents: true +api: eJydVU2P2zYQ/SvGnBJAXW0XPelUNx/NNi2ySJxeDCMYU2OLCSUq5HAbR9B/D4aibMneRZOcLFNvPvjezFMHjHsPxRpW5NkTe9hkYFtyyNo2tyUUsCNW1Qcmzwo9QQYtOqyJyUlgBw3WBAWMgA+6hAx0AwW0yBVk4Ohz0I5KKNgFysCrimqEogM+tBLq2elmDxnsrKuRoYAQYhbWbASwSrkXtyX0/UZS+tY2nrxkubm+lp+SvHK6lb6hgHdBKfJ+F8zibQJDBso2TA0LHNvWaBWvmX/0EtNNOmudkMB6qKBsGIJSw7ph2pObdPgsIvrsSEMs0Rze7CJHWJZaKqG5myU+IeZU9NlFrclRE+rt/GRrrSFs4tHDtUBpp4JB9+RlMOYvb5tf3gRuAz+VWwxZ7PYjKY5JNFP9nVHoHB7m7RkDotJIzllspOmi4mPBo/bQX4RNR2udRHog8qh/30uO325uLsflXzS6jMOweOGcdT8/KyUxaiNPicNzgLFq9vZHZmDTn9F+uu3fdmhQ2K39/qH1GqH/kPe4p5MOj0MjGYuVvP0//uVeQ+mEm0hxondg9/FrPB/oe6jYCHm1Wt1dJBy0nYv6UpxrsTo5V01cWfG0PXE0Mq6ggLx1dK/pv5yTB+bjEvu8m9haDxl4cvej8QVnoICKufVFnitjQ3mFe2oYr1Dn2Go4b2gZ3y6eCTQOuScVnOZDzLe8u31Nh1eEJTko1psp4J1M2zA/c9hROmz1axImkx8vA1fW6a/DUCRHroYooUo3OxvDE6uptz9QfaJGzFfuObR9ffXr1fVjl0kBi+XdbVoaVHFpxj4iDLIzuo5EQQZUx40BJqx/P72QLlvrucZmku9C1FlXRzqYvnDeGtRxIWLtLgm+hiQ4DHYdP3sn55bnYvo122RQWc8S2HVb9PTemb6X48+BnGi3yeAencatMLnuoNRenksodmg8XfR4tBZ48jZt0NPFyVHnvY/6NiLuPZog/yCDT3Q4++xGe6jG+ekSYqkUtTyJvXAzGbTjavz5YgV9/w1zEMd+ +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Testcase"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/testsets/testcases/{testcase_id}"}></MethodEndpoint> + +Fetch Testcase + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testcase_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Testcase Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testcase": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-testset-revision.api.mdx b/docs/docs/reference/api/fetch-testset-revision.api.mdx deleted file mode 100644 index 7cce0422bc..0000000000 --- a/docs/docs/reference/api/fetch-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-testset-revision -title: "Fetch Testset Revision" -description: "Fetch Testset Revision" -sidebar_label: "Fetch Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWUtz20YM/isanJKZjeV6euKpbhzXbtLEYyu+eDQeiISkTZeP7IJuFQ3/e2cfpEVSkmVFnunBJ8si8AH4gMWC0BIYZwaiOxiRYUNsYCwgL0gjyzy7TCCCKXE8v2f//F7TgzQyz0BAgRpTYtIWYAkZpgQRdAXvZQICZAYRFMhzEKDpeyk1JRCxLkmAieeUIkRL4EVhIQxrmc1AwDTXKTJEUJYOhSUrKxCcHVwHG4PLBKpqbKFNkWeGjEU7OT62fxIysZaFjQciuCnjmIyZlmpwHYRBQJxnTBlbcSwKJWMX/vCbsTrLFQ8Lbclh6S3EeemVguMyY5qRXvH0vZMQkNAUS8UQHVeiR5Ezmy2+TB2PbRO17ANqiRlbNlvS2ymrRCORlUqB5ahL4q1HdhwKOLydNn4dz+Hj8PioWU4xPqSB0wBZWyh5nuuDgXu0SkCCTDuiWtF3LFPaCn1mASsBKRmDs63Y22D+CuqVgKly3WJztc7RuE4RYziDPYOTPFeE2VaLF2gGowalEh5WY/yzmB6ismXoxfLJN4q531nOXaB9PMcmY9sLTBJp2wWqqxYZO5BdN4yWpXTS/mY1vPW2IJY6LhXqN+elUn+aPHv3peSi5LfQDdWCSKZ0Ry3UGhdbie3oQo/c7bXF6DR6dfV/IvVz/kkafpLWTUH21J/H0ciXYrhf9zvDn9H1ivZduB/U2QpEJSDWhEzJPfJBe9d7Dzs4dWSVRfISRr562GAkIUUvYOTMwwYjNV2TxQEvqJqs3xfhiqr5OqiVmq3GSk3YQa3UdDVWHkj3Z6Tdy/U2qFcCjCpn+8LcWN1KwOECDRxi9zbpj3/2GryXSaf9hSb+tAu7t/L6zh1cJqae1dbc5I3l9ZPqS012h8W+aXBfO9hrB3vRDnbonrFmCt95WlozKtfdb/ysqaSekF9Htx1Gt9d3hhd4Z+hfna+k7k3qmSXzqRdjOwvsNVDs9M5dL/O8K/1X790Rfk67WQtWldX69eSkv0W8RSUTtyMcfNA61/uvEBNilMp+2jBWqTxuPX1OMY+7yXoM+lPuHXTtyczWDZJrFkBeZLOoI2Mwsk/XMf64+b1zcXnTQa61Mqzp9exuDuPM07ctvRej0VUP0Oe2ndRzu+gedHfL4Nr3PLer8Bmx23vzHCIYFnZ/S/8Mw+BrhvU+1wyXa7bgFdgZVj/U+/JSK4hgzlyYaDiMVV4mRzijjPEI5RAL6Y6SobjUkhdO5fTq8iMtLggT0hDdjVcFbmyB+ZJpizXZwkJ+JEte2NT71aP84esg7OjnXsuyI7Np7tTrVaVzbnB6dQkrr2VwfPTL0TF0yWwJ27OBsTsbtW33GESHhSZ+EECpOxjAhOlvjw+sZ0VuOMVsBW9j7jobj0AF0788LBRKV//Oh2XI6x2EvEKzrDaudENuQUC07jeOsYB5btgCLJcTNPRVq6qyX38vSdv8jcN2fWLZvFtCIo39nEA0RWWo52vTUeDNdTg4bwePN0I7hjrHmU3wA6rS/gcC/qbFhh9lXHeY17W0DJKncUwFr2D0mpktuuZE/PFhBFX1HwFH/r4= -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/testsets/revisions/{testset_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-testset-to-file.api.mdx b/docs/docs/reference/api/fetch-testset-to-file.api.mdx new file mode 100644 index 0000000000..a048dce2c8 --- /dev/null +++ b/docs/docs/reference/api/fetch-testset-to-file.api.mdx @@ -0,0 +1,856 @@ +--- +id: fetch-testset-to-file +title: "Fetch Testset To File" +description: "Fetch Testset To File" +sidebar_label: "Fetch Testset To File" +hide_title: true +hide_table_of_contents: true +api: eJydVctu2zAQ/BVhTy1ARGnQk0510wZNXwlqtxfDCBhpbTGhSJVcpXUF/XuxFCXLdtxDTzbM2eXszHLcAsmNh2wJC/TkkTysBNganSRlzXUBGayR8vKO+vM7sndrpREE1NLJCgkd17dgZIWQwYBTBQhQBjKoJZUgwOHPRjksICPXoACfl1hJyFqQZnuzDj1oW3MPT06ZDQhYW1dJggyaRhXQiUNEtxJAijT/FAdIrgvoGBn5MNm7UBXp/GzQbff4rKX2e4TQNBVrcjn/AQI+zm++siqH5IaLr5TGZMGHHfNx6GtrPHrudHF+zh8F+typmiWFDOZNnqP360Yn3yIYBOTWEBoKgtS1VnlwIH3wXNNO2NWO/SHV35Dbpi+K9JQh3KCb8LsMiE4M1jwrub1/wJzgSM6p6KbRGrpV14mjqp2Yy8jo2Jlx1q7jFq8vLo6l+SG1KsLgyXvnrPt/XQokqTR/U4SVPwZom++dntrCiQCDtt1qJ4F0Tm4nun22PUEWvPKbiTNHi/MFvZcbhLHZaWgQY1iyf8vPc/VXR9zEiZ28vbqnx3jXy/fcZQPkw2Jxe9Sw93bf1CsOkGR4nwubXPUBUiGVlhOmtp5CoFAJGaS1wyeFv9K4rz5td6HSpYX9ZbSVHC8e3dMQP43TkEFJVPssTXNtm+JMbtCQPJMqlbWCQ1qzcJpcMjQkice8cYq2od/s9voTbj+gLNBBtlxNAXPeuX6L9mGjgbJWn5D1jCk0a6i0Tv3pVyMmUdlXsWDKrG0oj9pGbm9l/oiGR+U5e9rnZ6/Ozk8NEwuS2e11fDoyD09n4BFgIA7kGoUCAViFdwOEsnqzO2CW7FMlzaTfKWv3yI2qEP6mtNZShdcRKLTR9SVE12HMKQ8Csr2/k9H6lYCSdyZbQtveS4/fne46/rlPdzawUF7e60m+P+L24P/gSeqGeQX3n6RTXPB88cFAYyjBi2/x7b1MQDw/6LATZju9cyA0mTDkSjmsXBsBszzHmialRzHI9MfHdHszX0DX/QW3m60c +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Testset To File"}></Heading> + +<MethodEndpoint method={"post"} path={"/preview/testsets/{testset_id}/download"}></MethodEndpoint> + +Fetch Testset To File + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "file_type", + in: "query", + required: false, + schema: { enum: ["CSV", "JSON"], type: "string", title: "File Type" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-testset-variant.api.mdx b/docs/docs/reference/api/fetch-testset-variant.api.mdx deleted file mode 100644 index 65f3cfcaa6..0000000000 --- a/docs/docs/reference/api/fetch-testset-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fetch-testset-variant -title: "Fetch Testset Variant" -description: "Fetch Testset Variant" -sidebar_label: "Fetch Testset Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV9tuGzcQ/RVhnhKAsVyjT/tUNY5rN2ljxEpeDMEY7Y60TLmXkEO3irD/XvCyknZXUhxXAfqkC2fOmTkzJIdrYFwaSO5hSoYNsYGZgKomjSyr8iaDBBbEaf7AYf3hEbXEkkFAjRoLYtLOfw0lFgQJ9OweZAYCZAkJ1Mg5CND0xUpNGSSsLQkwaU4FQrIGXtUOwbCW5RIELCpdIEMC1noUlqycQQx19ClQjG4yaJqZQzZ1VRoyDuzi/Nx9ZGRSLWuXDCRwZ9OUjFlYNfoQjUFAWpVMJTtzrGslU5/7+LNxPuudAGvtlGEZGNLKBqcYtyyZlqR3An3tLQRktECrGJLzRvQF8qzl6v3Ci9hlaE1l1rU6LlQjNhalVQqcNH3pnGQCULNcYHpKgkmEjAwL5dvrcIo5Gt9aKca6DYKYV5UiLI+yXqMZTTcojQiwGtP/ihkgGle2YFbNP1PKw2a88okO8RoBBTF2o8Ask67FUN12xDhUgB3Ytsk6TMW8+89uevu5IJU6tQr1iyur1O+mKl+9t1xbfgn9VB2IZCqe6IVa4+qosD1fGIh7zPkPJ6bzGPTV/0nUP6t30vA3ZT2U5MD9+zSahlaMJ/KTFBiG4Hwb0T0/nwd1uQPRCEg1IVP2gPzEMydDplcsfTyHWV4H2NHEi2Xr7EeQfAywkSQjRT+A5DLARpJWrvnqhKd0K9avq3hOt3qdlKVVa8PSCnZSllauDYtRdvncXr1zvo2A04Xnh5NvXh9xlNl3gTzZeTPRNI1z+vniYjgAfUIlMz/ejN5oXennTz8ZMUrlvsXLoW+gqrSz+j3n8Kzp3SfbnN9VIUBXpcIs982N27vCGFzS9vA8bOrFGE3d6j7BtzPrvc8rUEe7nWJv5Q3qHk7jMsh3rLrX0+ntADDUtlvUKzegj3pTMfjBI6/cBL+kMK9zDgmMa02Pkv4ex+nSjOMkasbr4fDegABD+rGd8q1WkEDOXJtkPE5VZbMzXFLJeIZyjLX0zW8otVryyrtMbm/e0uqaMCMNyf1s1+DOdVfol67ZplRYy7fklIvvi4nlvNLya2iC+LTIg5eTRpaLyru3A6kPbjS5vQEBLo2g2fnZT2fn0FeyY+w2BqZ+Y7TcfhlET4VN/iCACr8rgAmLX7YLLrK6MlxguYN3qHC9SzcqwfQPj2uF0ve+D2Edi3oPsaiweV8Yl24sLAhI9rzLZgLyyrBzX6/naOijVk3j/v5iSbvizSLG3El5v4ZMGvc9g2SBytAg0s1ZAi8+xC3zcrQdfboZtAUuVz5UZd0vEPAXrfa/I/2xkLd9tI6GkzSlmncgBqeYa7jNXvjtzRSa5l86vCCi -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Testset Variant"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/testsets/variants/{testset_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fetch Testset Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-testset.api.mdx b/docs/docs/reference/api/fetch-testset.api.mdx index 311897eb33..79c78ebe90 100644 --- a/docs/docs/reference/api/fetch-testset.api.mdx +++ b/docs/docs/reference/api/fetch-testset.api.mdx @@ -5,67 +5,834 @@ description: "Fetch Testset" sidebar_label: "Fetch Testset" hide_title: true hide_table_of_contents: true -api: eJzNV9ty20YM/RUNnpKZjaV6+sSnqnFcu0kbT6z0RaPxQCQkbrq8ZBfrVuXw3zu7XN5E3+I6M32SxAXOAQ6gBVgB495AtIYVGTbEBjYCipI0sizyywQi2BHH6Q035yCgRI0ZMWnnV0GOGUEE4fxGJiBA5hBBiZyCAE1frdSUQMTakgATp5QhRBXwoXSehrXM9yBgV+gMGSKw1qOwZOUMQmizywTqeuMQTVnkhowDOV0s3EdCJtaydEFDBNc2jsmYnVWzT8EYBMRFzpSzM8eyVDL2Oc6/GOdTDQIrtVOAZcMQF7ZxCvHKnGlPehDgW28hIKEdWsUQLWrRCuLZ8sPHnRdrjLxTXvz7DVI0XvgYQ7a9YQhmWxSKMIdadI9yqxQ4ndrwLtDMVh1KLRpYjfF/xWwgapdsY1Zsv1DM09Kd+0SneLWAjBjHUWCSSFcYVFcjMSZxhsYZwLalGTFl2/GTYXp3c0EsdWwV6lfnVqlfTZG/+Wi5tPwajlN1IJIpe6IXao2HB4U98oWJuA85/+bEdB6Tvvo/ifp78UEaflTW+5KcuH+bRqumFcO99SQFpiE431qMb53nQZ0NIGoBsSZkSm6QHwIc3JUJMr1h6eO5n+VtAztberFsmXwPks8NbCBJSNF3IDlrYANJK9f24AbP03j8dHmKWD8f/Mjp9XpRllatjqUV7EVZWrk6FqPs/rm9eu18awEvF54f6Y+Oj7smx+Ne3eSva2f94+npdFH4A5VM/Bowe6d1oZ+/JSTEKJX7FsbBsYEq4tHpt9y8m/pogvTJfiiaAF1dMrO/a6/qp4MxuKf+urzf1IsxW7nTu5Tud7q1z6uhDnaD8vbyNuren8ZZI99DZb1Yra4mgE1tx0U9dwvrbNUtrBlxWrhNdh/2V04hgnmp6VbSX/OwqJl51e+wNQgwpG/bJddqBRGkzKWJ5vNYFTY5wT3ljCco51hK39WGYqslH7zL8uryPR0uCBPSEK03Q4Nr10RNW4zNuopgKd+TEyis10vLaaHlP02tw4adNl5OAZnvCu8exFr64GbLq0sQ4NJopFmc/HCygGPBRsau/zH2/d9y+2MQRyp0+YMAynzzAxNmP/UHLrKyMJxhPsA7rs/RFA0KMP3N81Kh9K3tqatQuzWE2kG3ZhsQEA3eQTYC0sKws62qLRr6rFVdu8dfLWlXoY2AW9QSt06vdQWJNO57AtEOlaFJWN29AK8+hfZ/PesXl3G4bRVzV8JbVNb9AgF/0mH8ruT/2mnbJFUwWMYxlTxwndxErpu6vv7l3Qrq+l/SnLUr +api: eJydVcFu2zAM/RWDpw0Q4qzYyadlXbcG3bCizXYJgkKVmVitbakSnS0z/O8DbdlxkgYDdopjPVKPj3x0DSQ3HpIlLNCTR/KwEmAsOknalPMUElgjqeyBunMQYKWTBRI6jquhlAVCAuH8QacgQJeQgJWUgQCHL5V2mEJCrkIBXmVYSEhqkOXu+7rNQTvLOTw5XW5AwNq4QhIkUFU6hUYcI5qVANKU86tAPJqn0PB7h96a0qPnKy6mU/5J0SunLZcECdxXSqH36yqP7gIYBChTEpbUErM216pVIH7yHFOPaFvH+pDublCm6oICQ10SbtDBnuBli2hEL9GrpZvHJ1QEJ2WNiy+rPIdm1XCqo6i9yMvA6FShodam4RTvLy5Opfkpc522hUdXzhn3/7qkSFLn/KQJC38KyI06OD03DSMBem2b1V4C6ZzcjXT7ajqCLHjhN6PODNPVQ7+h93KDMCQ7D23FiBZ8+i/5ua7u6oAbdWIvb6fu+TI+dfK9dlkPuV4sbk8Sdr09bOpnNnC0GAxcIGWGnb0JfqYMEoitw63GX3EYUx/Xe083IMCj2/amr1wOCWRE1idxrHJTpRO5wZLkROpYWg3HJGbtaXTJ0Na/HlXlNO3afLPb+Q3urlGm6CBZrsaAe56wbmYOYUO7pNU3yOqFXTSrKDNO/+kGIayjrItieXS5Nm14UDJw+yjVM5a8v7jOjvZ08m4yPVdMCIhmt/NgFKlao/Q8WhiII7kGoUAAFq1LgFAWH/YHzNIaT4UsR/mOG3lAalCD8DfFNpe69UB7dR2avITQZBi2kQcByWh5rwRkxhNj6/pRevzh8qbh1y8VOu7WSsBWOi0fWbtlDan2/JxCspa5xxNawwKBN3fBJ28jEK/T7Ttacju3Mq/4Hwh4xt3hR6bdAVk/MHUAzJRCS6PQk5XFkzUY4MvVAprmL9AyZhQ= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Testset"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Testset"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/testsets/{testset_id}"}></MethodEndpoint> Fetch Testset -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-trace-by-id.api.mdx b/docs/docs/reference/api/fetch-trace-by-id.api.mdx index 81dc03e114..c4c10cb26f 100644 --- a/docs/docs/reference/api/fetch-trace-by-id.api.mdx +++ b/docs/docs/reference/api/fetch-trace-by-id.api.mdx @@ -5,67 +5,4336 @@ description: "Fetch trace by ID." sidebar_label: "Fetch trace by ID." hide_title: true hide_table_of_contents: true -api: eJztm1Fz2jgQgP8Ko6frjC+0nXvi6bhA75ikkCHkXjoZRtgLqBjbJ8tpfQz//WYly9jGGBqaS5ruU1pb3l2tVqvdb9CGKb6IWecTG81ikA98JnyhUnbvMA9iV4pIiTBgHfYBlLtsKcldaM3S1qB3wRwWRiA5Dhh4rMPmOGSqh0xn6VR4zGERl3wNCiTq2LCAr4F1mBmjBwgUHnG1ZA6T8E8iJHiso2QCDovdJaw562wYD9LRXEtQaYQSYiVFsGBbJ38iAgULkGx77zAllI/PJtrcgce2ODBTPg/lmiur+p8EZFrSPed+XFIOQbJGD4URBAp8WIPSn/AFBIqjq8pGoevmPPEV6+hvoPiRNe2DsWKL5kqIozCIIUZt79++xT9l798mrgtxPE/81jgbzBzmhoGCQGkHRZEvXL0W7c8xfrOpdV8kcc2UMLrcMMk+r/o39+bOwUHi+yXvXuqvtw6LIx5oeULBWv+jqiZQ8FXtv8jjoFNd2Lo1NIqODL+NeJCtuB0Tzj6Dq0pr/KkYglZqYWqjCfiXxureZISqTfAc1jvE91uHrUTgmfWzIXB70x1OrwbD3vRueHvTvxx8GPR7bD9obJgdGr97PhhO+uNh97r08LY//rs/Lj26vB70h5PSo5vxqHd3WR03Gt7efeyPqx5AX17hfND1iks1VaLeC9me6jCPK/hVjyosCX7amgjjIAi8x4npB14uJFZcJfHUDT2oOHvSndzdTi9HvT66rz9pcnRh7OgKPVJ40B+PR+PKMyOw6iRtyiVasjNsDXHMF3Bi6trbWUZm62MmZeswrpQUs0SZfbOTyT1P4Kbn/k1hZ5n0WQ7/Jn3dnXRcoQcIVEXPgZ196q7ApYwVX0eNOz0f9L9O+Eii0FMszqCy/n30VpYkMjlcSp426u8bF2/1AQnVHPyjJsnqfLcO80WwOi2UXsMh8WKC1jqzYu21CFbfGqrXegVPVejY/VI4Lwo5v+aAqbOnvFLHtZsCpCIcY0IEix5XPK+ZcKKVDBZ61dU6EKBPGYe4Uebgpq4PTanAlcAVeFNeX7SdcLJcGgmtri7cksg7U96dkVCRZ6r/M0X+kWau2Uk9X2RtKOWhDgvuptd2JQ4mNRmGNXmqfqnzkiZJdB6xuk7IPuVsMw7D/JiRAN9Dv1V/2Km7YkkED6HpL7DzCYJQ2f8kwSoIvwSs1HcBTFBQjfu+adIoyBbgWa13/qRPLlpOdo7uBJnDvoRyNffDL9ibLblA7yger/BPGPr4wXoGnmc+tp2nG64jHzJnuktuPCJ5sCp6Yhh6Z7g0m3RFXubZ4yXIE4f2jTbg4Haz3ULZJn3APK4XydqQx3Qgx48ircDILwayWFt3mxahrgDyasPSBpltZ3SrYtqTvZbBtiFn9h9543H01Pdg34hsnvDVhYxfNBS3TY1B42KUugW7VQ+ey2bnfDe/6FV0V7okOKPJsxJeUum4W5FsXLFtsUt6cK96XPGnmABWcWYBlRTuk/joYybaaHmSWXwEMwsJ8yeZwhjlflPXdWjjnHvsP64akQBHCseqiCZvoDkndXn4zqmcSWe0Sg4LFfhNWc9CwsekDQvkiAi9UiJEyOT1IpNSmHxVkh88SGu4RL1LngccErAgYEHAgoAFAQsCFgQsCFgQsCBgQcCCgAUBCwIWBCwIWJwELJgrpJv4XP6S/RDkDXPy2Kl7WZnR/Z7BTZMcagMfEQ5Z/5y1sVljl1X5eXV8X4486yb6LQmhGUIzhGYIzRCaITRDaIbQDKEZQjOEZgjNEJohNENohtAMPA+a+THs7eor5oX+6uS4MSYWrqJ/wil+lwvfDbG4szduuHOFkz/1ztVPSieartMTPCR4SPCQ4CHBQ4KHBA8JHhI8JHhI8JDgIcFDgocEDwkePjs8JGBBwIKABQELAhYELAhYELAgYEHAgoAFAQsCFgQsCFgQsHhxwOLV/9qJfktCaIbQDKEZQjOEZgjNEJohNENohtAMoRlCM4RmCM0QmiE082xo5sewt/ki2rcblCut0VLoj0+Ozom+UvY819207obrbujp03LfS2AwzTfPflJGQ9fxCKESQn2x25MQKiFUQqiEUPfaa0KohFAJoRJCJYRKCJUQKiHUnxKhErAgYEHAgoAFAQsCFgQsCFgQsCBgQcCCgAUBCwIWBCwIWLw4YPHqf/NFvyUhNENohtAMoRlCM4RmCM0QmiE0Q2iG0AyhGUIzhGYIzRCaeTY082PY+xKu45UPweNaCjOs0VJED6fugbG+WPc8l/607t2lv1KBZB62PoByly2TAzPQtEXBv71/j+Z5ELtSZN0L+5v7wtN1T6svZSh10x4o2zRHkS9MjdT+HJt2J3aXsOb7idkDxYUuDQ6kdD90S29PqBByz90fjoJrW8RhcRsvmhJ9occ51lVpZ7RMxXckwHBeRvV+V7Fzr/Hu4Wn0jPuaIuCvyeRmT6BZ2zWoZeixDlsAfhFxtWQd1g5nMcgHPhO+UGn74V1b54C4vbG5YIvbHOQDyFivRCJ91mFLpaK40267fph4F5oA8Qsu2jwSOuRicBMpVKo/6d4MriD9C7gHUm+FwoBbjBWz+uVhueN5JK4gtRCnw7qJWoZS/GtLcYFBujRf4URFMA9Nc13cFa3uzYA5DKdhwvrtxbuLt3qLFoO9NBjDnLtqV9hlr7H+L3khn7+GXDrGmQK+/n33Ai2LwliteVCQZzaidnVrlrYGvYuqRZvdZqsfnXkJT+925CN222bmbbJF/sRKi4xeeKfTHS40c7CuyNL+vcOWYYzpim02Mx7DnfS3W3xscB0upidiPvMxrufcj8FhK0hZxzYmDnvgfoIG6TB44FLg6PovD070l3G2ed60Ds3QBkeQFnVaa/IZ6bSwtJG3yV53XezkCx/uZTE0Pt8xf/YnbLv9DyUBByQ= +api: eJytVU1v20YQ/SvEnFqAEG2jJ56qNEkjpK0NR+3FMIwRORI3IXc3u0OhLMH/XswuKZO2FCBoTxK4bz72zZu3PTAePOQPcLvz5I64U7XiDh5TKMkXTllWRkMO74mLKmGHBSW7Ltm8XUEKxpJDAWxKyGEvkKcAedp1T6qEFCw6bIjJSY0eNDYEOURMAChJbpErSMHR11Y5KiFn11IKvqioQch7QN3d7kMG7qxk8OyUPsCQnr4ozXQgB8NjCqy4lm/b0O6mhEGAY/G9cQ3yVPprS65b1N5j7RfFSbeNMGQsaaaaGuIQggfSjELVsimhbo9tzZCHGJoHTa29j10M0q4jb4325KXazdWV/CzZ/9QWBXm/b+vkfgRDCoXRTJoDQdbWqgizyD57iem/RZ/ZfaaCF9d+gCM5L+VS8Ba1hxmRt1uqhUylD6f6M+6/mW6WZh0Y+8OU5P97mq2j/yPNvTE8SzM7nz4mUftRTG+6qKdhSOGnm5vXo/oLa1WGQSTvnDPue+ZknWwUq6iEkhhVLf8UU+NfA2pTLE6/a0uGk2zROZxL8zcTG4QhhcYfJPNLgU/Q38l7PAj7I+QyNJCRbOV0eK59dlZyr1h6xM2G8kxvZPfyNd5G+s4VmyAfttu7VwnjbBviyoirHYiDj3EFOWRm7pLZ8ToLVuazfrK0QdaH3HFyvNbVkEPFbH2eZUVt2nIVjWOFKkOr4KXTRlkmvwg06NFT0ToxZcm3vtt8pO4DYUkO8ofHOeCTCClKYwk7TQWt+khC0uiF65Yr49Q/cd6jJVYxSlhQem9C+GJlkjdYfCEt9j2tVQ5Xq+vV1aXLjAHJ+m4z7gMWYR+mPqKVpi/oOhEFKVATlgGYsPn5+UC6tMZzg3qW7+xrteisf97K8+iRMaa/ObM1qrAOob1+VMMDLNQgbFxLYFAEpPKKjc/cYwqV8Swhfb9DT3+6ehjkc3x+ZLCl8rirZw/QF+rmr9UR61YaCpI4olOCPh958aI/3I9b9mNy6YaTUHQ3rzl1c7pR8I9qUmE/Hq+Lguy82Vd2J82fVuvXd1sYhn8BBjnlqg== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch trace by ID."} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/observability/v1/traces/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch trace by ID."}></Heading> +<MethodEndpoint method={"get"} path={"/observability/v1/traces/{trace_id}"}></MethodEndpoint> Fetch trace by ID. -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Trace Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["opentelemetry","agenta"],"type":"string","default":"openetelemetry","title":"Format"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"spans":{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"name":{"type":"string","title":"Name"},"kind":{"default":"SPAN_KIND_UNSPECIFIED","type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"status_code":{"default":"STATUS_CODE_UNSET","type":"string","enum":["STATUS_CODE_OK","STATUS_CODE_ERROR","STATUS_CODE_UNSET"],"title":"OTelStatusCode"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"parent":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},{"type":"null"}]},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["context","name","start_time","end_time"],"title":"OTelSpanDTO"},"type":"array","title":"Spans"}},"type":"object","required":["spans"],"title":"OTelTracingDataResponse"},{"properties":{"nodes":{"anyOf":[{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array"},{"type":"null"}],"title":"Nodes","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaNodesResponse"},{"properties":{"trees":{"anyOf":[{"items":{"properties":{"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["tree","nodes"],"title":"AgentaTreeDTO"},"type":"array"},{"type":"null"}],"title":"Trees","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaTreesResponse"},{"properties":{"roots":{"anyOf":[{"items":{"properties":{"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"trees":{"items":{"properties":{"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["tree","nodes"],"title":"AgentaTreeDTO"},"type":"array","title":"Trees"}},"type":"object","required":["root","trees"],"title":"AgentaRootDTO"},"type":"array"},{"type":"null"}],"title":"Roots","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaRootsResponse"}],"title":"Response Fetch Trace By Id"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "trace_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }], + title: "Trace Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "format", + in: "query", + required: false, + schema: { + enum: ["opentelemetry", "agenta"], + type: "string", + default: "openetelemetry", + title: "Format", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelTracingResponse"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>spans</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>context</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"OTelSpanKind (string)"} + qualifierMessage={ + "**Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`]" + } + schema={{ + type: "string", + enum: [ + "SPAN_KIND_UNSPECIFIED", + "SPAN_KIND_INTERNAL", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_PRODUCER", + "SPAN_KIND_CONSUMER", + ], + title: "OTelSpanKind", + default: "SPAN_KIND_UNSPECIFIED", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"start_time"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start Time", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end_time"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End Time", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status_code"} + required={false} + schemaName={"OTelStatusCode (string)"} + qualifierMessage={ + "**Possible values:** [`STATUS_CODE_OK`, `STATUS_CODE_ERROR`, `STATUS_CODE_UNSET`]" + } + schema={{ + default: "STATUS_CODE_UNSET", + type: "string", + enum: ["STATUS_CODE_OK", "STATUS_CODE_ERROR", "STATUS_CODE_UNSET"], + title: "OTelStatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelContextDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>context</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaNodesResponse"} value={"1-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, `chain`, `task`, + `tool`, `embedding`, `query`, `completion`, `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={"**Possible values:** [`UNSET`, `OK`, `ERROR`]"} + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + context + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaTreesResponse"} value={"2-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>trees</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>nodes</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, `chain`, + `task`, `tool`, `embedding`, `query`, `completion`, + `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={"**Possible values:** [`UNSET`, `OK`, `ERROR`]"} + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + context + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaRootsResponse"} value={"3-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>roots</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>trees</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>nodes</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, + `chain`, `task`, `tool`, `embedding`, `query`, + `completion`, `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={ + "**Possible values:** [`UNSET`, `OK`, `ERROR`]" + } + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + context + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples responseExample={"{}"} language={"json"}></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-trace.api.mdx b/docs/docs/reference/api/fetch-trace.api.mdx index d3e2370e53..a1038a8bf0 100644 --- a/docs/docs/reference/api/fetch-trace.api.mdx +++ b/docs/docs/reference/api/fetch-trace.api.mdx @@ -5,67 +5,900 @@ description: "Fetch Trace" sidebar_label: "Fetch Trace" hide_title: true hide_table_of_contents: true -api: eJztXFFv4jgQ/itonm6lbOmt7omn49r0yrULCOi+VBUyyUC8OE7WdtrlUP77yXYSEmgLtN29ruQnwJnxjGc+jyefkNegyEJC5xYmggSUL+DOgyRFQRRNeC+EDsxRBdFUCRIgeJASQWJUKLTSGjiJETpgnk5pCB5QDh1IiYrAA4HfMiowhI4SGXoggwhjAp01qFWq9aQS2qYHiiqmB7QX2OqFkOd3Wl+mCZcotcqn01P9EaIMBE21e9CBcRYEKOU8Y61RIQweBAlXyJUWJ2nKaGBW0/4qtc665kYq9FoVtRaCJLNKhXeUK1ygqLl3ZiQ8CHFOMqagc5p7IFPCjT7hq8HchIUqjOUjBgQSheGUqKb4djTmiYi1DIRE4UdFY4Tcq8R4xhjo8FRe2WlbXQW5B1ka/ggjN3bawkiIDH+AkXM7bWGkDNdspaF1mJ0so+FBwfprZWC2idebWimjVVkpA/amVspwVVaqfXjQFrPQ3SM+TgkvpFMikKs9/j/n79BM0PDVij4XDuRZrAsU5feJ3cjgAeE8UeWPjC958sDhbmuREz3Trj/lug83TRZotn0QEaoNPiRiOWfJgw4TkUv9kSRMK8QzDEOr/C1DsQIPGItNSYpThoXDQUSUKY+C8OXjC9Bh3+P/kvI9SCr9Hw+7/elVr38+vemPh/5Z76Lnn4NXG+/1J/6o371uDI790Rd/1Bg6u+75/UljaDganN+cbcsN+uObz/6ovqTBBJle1pX2++ll2SPlZQAzYO0TU2VAKiLU1NScV9So8hB41qy21JpYTUAe/hSrPg8rm1IRlclpkIQHQno86U5uxtOzwbmvQeGbnNbGBldbA/5oNNhNpzF7pq0+nlDrVoxSksXLs2pmaX0uZsk9IEoJOssUbp27JAyp3mOEDRsH7wFWH414PGuOzJKEIeFm6HFbEFARZIyI3y4yxv6RCf84yFSaqQ+6SthZktlXDJSZpGgUDtEiQpDVs3Ha0jVFdsfiU8rdTUhzXZrmKJAH2+F7orG5RyGpba5ekuAvhbpGDMsWL8aJ1s09eLsD1p5UDm0/FG07is0aMyqhWLOw37vRBsC5B4zy5WFIPq4jOrbfckj62UjavILeVrmt5W3rPLumfHkUzK4NsHIPIiKjA4ulK0+/OqjqkLkkMjoKMpcWKbpR/B5gQWS4vL1J3vwqojq898jVYVuyfOd4qoaXrxS6TZeKxOmb9Pb199VqYreh/+dTwmChnuqtM8LXsDpqx/sWiPsM10jU8qTaMn3BiNLdx1HWx4aeLJuVAyG12xQdjcVXT7GBTckcfIDHQFV7uhWVu6MwUgXK0bSOpnU0raNpHU3raFpH0zqa9r02so6mdTzIu+FBHE3rkORoWlee3hGoHE37TvPmaFoHjNeeEu+Ypi0o2mebF8eFOi7UcaGOC3VcqONCHRfquFDXLTou1JENvwraHBfqkOS4UFeefh1QOS70nebNcaEOGK89Jd4/F/oWZOSeqmakJgLxuDBP7L9i981eXI9QXTKQ51rjj0+fYOdOgi+E0dAQPS1fiES8/EKCEBWhzBzAjxcBlgSNp8dsq7vtrNRahJK1yj2I5eK5MlN7wy3JqadETTBaliHagyu9Lmu6kKu/eVXhtdF9ehnnNnzPpfZyMhnuTGhz20zqhb4FozUpbsGIUUWJvhxjgcpciqEi6EA7FXhP8aGtLFja9h/X7XW5TXK9T1Dcl7dnZIJBByKlUtlptwOWZOGJIe7ICaFtklKDVIlBJqhaGZXusHeFq0skIQro3N7VBcYaRhYYTbEqJySlV6hDVNzb0c1UlAj6b0lLmss7IqulY0D5PDHqZU0yzrW6wx54mzdoOD35/eQUtkPWENY7gARqc3IVjzWV2IhCtX7DTRr4g0IS/7l5oD1LE6liwmvzNTPUcKVav8Lvqp0yTYnmheF1kb1bKLJX9NoFdm118PQNJpv+O0qk0hrr9YxIvBEsz/WwpU87t3ce3BNByUzH7HYNIZX6ewidOWESd5yrqgP8Nio2wYfW5pxpOl1mkus03hOW6V/gwRJX9YtYzPaOSpisi8fdQDcbNcWdaqTxVKH7b38Cef4fELbnuA== +api: eJztWktv2zgQ/ivGnFpAjbPBnnRa11a23qS2YSu5GIFBSxObjUSpJJWu19B/X5DU2684TfYB6BSHGs4Mv/lmyAG5BUlWAuw5uJx4lK3gwYIoRk4kjdjQBxseUXrrheTEQ7AgJpyEKJGrSVtgJESwQX9dUB8soAxsiIlcgwUcvyeUow+25AlaILw1hgTsLRC2GT9qDXITKw1CcmU9tYoRyiSukEP6YIGkMlBjyknsDH1I1ShHEUdMoFAary4v1R8fhcdprLwHG2aJ56EQj0nQmWbCYIEXMYlMaj/iOKCeXmz3m1BzthUvY66gkNRYeEYuqBGpO136d5+JpMpIYkw0llMK97VEakEU+CjkMVgseIx4SCTY4BOJnyQNsYoVS4KgBtTYqEwtYPjjrZWPjMrUAhETJvbqJpyTzVEtMz03tQx5GlqI71MVFBJMajGoR2SP+UMTS4mfVgEe5V4SEP5h7GKglvERrC1QiaEAe+/XBioPaTESLb+hJ18GlMeRSPQX5G3D2TdqOz0d0iT238PInVGbGfExwHcwMjBqMyM5XMuNqkwvs5Mk1H8RWJ83ugyVeL2plRytwkoO2JtayeEqrBRl/EiJK0uwSf8T4oq8mXRMODJ5wv9j/k60gqrtJ8pOoIEsCVXOzia90eJmOBos7kazidMfXg+dAViV8eHIdaaj3m1tcOZM751pbah/O3RGbm1oMh0P7vpNufFodvfVmUK1LGcl4Ub5vbvUfFlmV30dSBrwEdGZAkISLhc6b34iz4qd+JhZZanjmpmAzP9HrDrML2wKSWQiFl7knzBbUMLtuXezRX88cBQpHB3Tytj4pjHgTKfj3XBqs31ldX9AjVshCkFWr4+q1tL5mmlJLSBScrpM5Et3znNOXFVHwmV9ZBlFARKmh/bbKnfA6yQI/hAR+zROZJzIykZY2fZ29s3Ds04fKhpz4ayNtldCqjj8jEw2oMt8bR4i8nw9VATzdFQUF5KE8ZvkRfVcXChumfHezNiZWO1z5oYL1VA36oWjaFWxftpzxxAxtSCg7OlljDxvZz53328Z9m8yLI9tJW4Njt1S9nQWxW41sU4ZrnT5uQ97zjZVYNtuq+222m6r7bbabqvtttpuqz3xtN1Wy4y222q7rf8Rw/773dZbtDt7fGlaEi5HPA9m19zsnVppfrGaX5o2lpndTBcXuGmqFP56dbV733tPAurr29yOw3nEX3/Z66MkNFC/DuR8EHm1r2fdaDeDVuFGZBxUQIdidaxGVI4nRuSwqAaj46qvp4Kh1mVMZ3KVaJTwGnQPL2Ng4DvGqy+uO9lRaGJbD+q1eoDQcbMHCCHKdaTeJaxQ6vcIcg02dGOOzxR/dKUhS9dcKne3eRalKo2QP+cPFxIegA1rKWNhd7teECX+BVkhk+SC0C6JKTTd6Omvnb4S1SwX6CWcyo3W15sMb3DzBYmPHOz5Q1VgpjhmWFMXK2/LY3qDCr/sPUUvkeuI078MFbJHFWszSwFE2WOkp+f1zPj2mXhPyFTFKN4qwOXFLxeXhxaTTej0JsMsVYgnyzNWJgZWA64CKHW+D3WegEQS/lZ+UF7GkZAhYRV99VDWXCqwkPin7MYBoToHtOFtFuY5ZGHOqnFGclNlLPXKpKzQ60i9epjDdrskAu94kKZq+HuCXEXswYJnwilZKvzmW/CpUL99sB9JIHDHuaKMwIdpli0fO+V+VXc6jypTIX0mQaL+AwuecFN9LKPrwDqnzDb73PM8jGVl4k7ZUtwq0uB3x4U0/RsjoCRz sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Trace"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/tracing/traces/{trace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Trace"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/tracing/traces/{trace_id}"}></MethodEndpoint> Fetch Trace -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "trace_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }], + title: "Trace Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>oldest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>newest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, + `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, + `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, + `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "count": 0,\n "oldest": "2025-05-15T13:01:54.262Z",\n "newest": "2025-05-15T13:01:54.262Z",\n "spans": [\n null\n ],\n "traces": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-usage.api.mdx b/docs/docs/reference/api/fetch-usage.api.mdx index b08828674c..ca33031b4a 100644 --- a/docs/docs/reference/api/fetch-usage.api.mdx +++ b/docs/docs/reference/api/fetch-usage.api.mdx @@ -5,59 +5,69 @@ description: "Fetch Usage User Route" sidebar_label: "Fetch Usage User Route" hide_title: true hide_table_of_contents: true -api: eJx1Uk2PmzAQ/Svona2Q9sipqdSPaC+r3eYUoWriTMAtYNceolLEf68GknQTqVwQzHvj9+ERQlVCscdH1zSuq1Aa+MCRxPlue0SBE4utv/eJKoZB5BR8lzihGPF+vdbXkZONLigDBV57azmlU99kLxcwDKzvhDtROIXQODsfkP9IyhmRbM0toRgnfczDys8qIduphGyXOGYvvhfd2rLUXkVWLDAIJDUK5IfFS34VnTieOarNEX1sUKAWCanIc9v4/riiijuhFbmcgsNUKsP20ckwUzbP2ycevjIdOaLYl28Bryp8SeMeNkKGwChAwT3xAIOOWv3e9FL76P7MAcDAqcN6Yal11538THfSzPhZXLZ53sJAbSyZrFfvVms8JnUH1szJzplfz57HMA8p3PzDgFtyOhOm9sO/gSoLPklL3Zt9/y3mTtUtCuHfkoeGXIfpomG8lLbHpTQVN9dWGtQ+iY7G8UCJd7GZJv39q+eozZQGZ4qODprTvpzMNUYt7ScPathaDno1ztT0SxsPl0/LvF2jL5++YZr+Au0pCyo= +api: eJx1kkFvm0AQhf8KeueVcXvkVKdqUyuXKKlPFqrG6zFsA7vb3cUqRfz3agA7iaVwQTBvZr95bwckqiKKPe5M0xhboVRwngMl4+z2iAInTrr+1UWqGAqBo3c2ckQx4PN6La8jRx2Mlw4UeO605hhPXZM9LWIoaGcT2yRy8r4xejog/x2lZ0DUNbeEYhjlUTcjvwtCthOEbBc5ZE+uSzK15VQ7gaw4QcFTqlEgP8y75BfoyOHMQdYc0IUGBeqUfCzyXDeuO66oYptoRSYnb3B7+maqZl9FirGUcboLJvXTvM3j9oH7H0xHDij25VvBs2w1W/VeNiD1nlGAvHngHgqWWvnedKl2wfyb3IGCEYB67hJfjD25qd2khl/Z7ki/sD1CQfacsderT6v1R8ssDdnmcbuEQ3oK58IxyaBu7LoaBQVuyUgtMbVfXgtC6V1MLdk38z5M8B3d1ZbEf1PuGzIW48IwLOnusaQrcFO+pULtYpLSMBwo8i404yi//3QcJKVS4UzB0EE825ejulgqAb5wLwtrzV7u0Jmabk7m5pZKsNf7dv/tJ8bxP0g6Gbk= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Fetch Usage User Route"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/billing/usage"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/billing/usage"}></MethodEndpoint> Fetch Usage User Route -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-user-profile.api.mdx b/docs/docs/reference/api/fetch-user-profile.api.mdx index 8092308b24..84dcae3422 100644 --- a/docs/docs/reference/api/fetch-user-profile.api.mdx +++ b/docs/docs/reference/api/fetch-user-profile.api.mdx @@ -5,59 +5,69 @@ description: "User Profile" sidebar_label: "User Profile" hide_title: true hide_table_of_contents: true -api: eJxdUk1v2zAM/SvBOwtxuqNOzWFYg16CtT0FRsEqTK3NtlSJDuoZ/u8DnY829kWw+Ci+Dw4IkROJD+1mD4sDi6teu8zpNaZw8DXDIHGOoc2cYQf8WK302HN2yUdthMVT5xznfOjqxe8zGAYutMKtKJxirL2b5hR/svYMyK7ihmCHUT8ze/Ilc1psrxwalioow3cWGESSChbFF8nM6cgpw+4GdKmGRSUSsy0KV4duv6R3boWW5AuKHmOpHa5LXvqpZb3dPHL/wLTnBLsrvwOelOhJ/S1sgPSRYUHRP3IPg5Ya/V93UoXk/02CYeBVUXXqUqm+PYSp3Us94Sdyi/V2AwOVcfJgtbxbrjB35gasHpObPL7MnsowMxeu+mHADXmtCVNz/1VQZjFkaaj99t4siBsuVwOEP6WINfkW43nycA5ph0tIpUEVsujVMLxR5pdUj6Nef3ScNIfS4EjJ05u6sitHczFNI/rLvcpzjqOuwJHq7uT9bLU0uuu6/Pr5jHH8D6yG/Jw= +api: eJx1UsFu2zAM/ZXgnYU421GnZcOwBb0E7XoKjIKVmVqrLamSHMwz/O8DHSdpDUwXQeIj+fgeB/jAkbL1bldB48jZ1E9d4vgUoj/ahqEQOQXvEifoAZ83G7kqTibaIInQeOiM4ZSOXbO6n8FQMN5ldlngFEJjzdSn+J0kZ0AyNbcEPYxy1KLkY+K42l85tJxrLwxfOEMhUK6hUdxIJo4njgn6MKCLDTTqnEPSRWEa31VremGXaU22oGCx7LadoqtvAsVYSjnTRZv7qd52v7vj/idTxRH6UL4HPMgUZ2k+wgbkPjA0KNg77qHgqJX3tsu1j/bvpAYUrBCoz1mig3VHP6Xb3PCN21cyr+wqKMicZ9qb9af15n/DzAmr7X43m0FmMuPCY4JBLeS6CgUFbslKLDO1X24BYRl8yi25d/UWjn3gdBUj859chIaswzh3HmY3D7i4WSrUPmX5GoZnSvwYm3GU77eOo3hSKpwoWnoWhQ7lqC4Cil2v3Mt4xnCQXTlR0519WOyg2Hjdqx/ff2Ec/wGdpws6 sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"User Profile"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/profile"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/profile"}></MethodEndpoint> User Profile -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-workflow-revision.api.mdx b/docs/docs/reference/api/fetch-workflow-revision.api.mdx index fbb8267e0a..2989530282 100644 --- a/docs/docs/reference/api/fetch-workflow-revision.api.mdx +++ b/docs/docs/reference/api/fetch-workflow-revision.api.mdx @@ -5,67 +5,2193 @@ description: "Fetch Workflow Revision" sidebar_label: "Fetch Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJzNWNtu20YQ/RVhnhKAsVyjT3yq60vtJk0M3/pgCMaIHEqbLLnMXpyqAv+92JskipIqKTLgJ184c2bnzOzO7pmCxpGC9An+FvJbwcUPBYMERE0SNRPVdQ4pFKSz8fOPYPAs6YUpJipIoEaJJWmSFmIKFZYEKXQsn1kOCbAKUqhRjyEBSd8Nk5RDqqWhBFQ2phIhnYKe1BZDacmqESRQCFmihhSMcSiaaW4N4np7tyFI7zqHphlYbFWLSpGycCfHx/ZHTiqTrLYpQQp3JstIqcLw3m0whgQyUWmqtDXHuuYscwz0vyrrM11YYi0tP5r5CJkw3imsnFWaRiQXlnrmLBLIqUDDNaTHTdIlycWtJl8KR2U7xsz4BSXDSltCW+abWWuSmUVlOAfLUofHRw/taEzg8IHa+LOMXiETHwGlZgVmh0zhNEDGCEaPhTwYuEdrEshR05ao1vSDZiVthD63gE0CJSmFo43Ym2D+Cu5NAgV3x8b6jmXqOTNKi3JlsKEQnLDaGO1a9c48QpNYOHpBblCvIXxLxIsZiAcdmxKrnwG8cgBNk0QjMfxKmV5xUF06yrpwri4a24vAPGf29EF+06J1i7LF86cVqRy2/7OY3epYkDGZGY7y3aXh/E8lqg9fjK6Nfg/LuVoQpqnc0gulxMlGXpd8ocPu5i7V6Dw6HfqWSP0sPjGl/5fWdUl23Hfj6N63YhjY+50Gn9GdOu3Ruh/U+QJEk0AmCTXlz6gPegqeedjeqSPL1PlrBHnwsCFITpxeIci5hw1BIl3DyQFHXSTr90kYdpGvg0aJbM2iRMIOGiXSNYvyQrJ749q+XR+De5OA4ma0L8yd9bVj6GCJBg5xeZq0R/PhsjeS7YvyIJlH4PsjcIswJszd+2O3k/61KHl7DbHhanJLBUmqstZpExc62GmiXIUyNPEtt21F3tBMfpMXnR1qcBeItzdKrGtWbXsBWqZ4l9tWDOQKb4f43t3vvZu2qvBW729vslfWO9/MKbWFIvnCMtqGXS/P7NCDAbpxekrBRsYLSa8R66wVYJs3WNSKztG9ETpPsR0gftJ9pjs1jXX79eSkK1M9Ime5S653IaWQ+2tUOWlkbtKGllw24CJrfd1lSy0MCt/F86w/iQzjrb5Uo1X63gpxwZusN3Vk9O7t11WUz7XFJ5eXDx3sWoJUpNezuz6Nc0/fpvpe3d/fdAB9bdtFvbRiaq+jXoJTAcbC6q0j0k5b1WNIoV9bgZB+9KNipvpRMVT96SqptQG/w6Mq6+5YMNa6Vmm/n3Fh8iMcUaXxCFkfa+Y2laLMSKYnzuX05vojTfxMh/RpsGjgpozvmrbZrGBYs49k+Qt6sFe22L++FYIQ7O9tjlNWFcK5RyXMLa53enMNC3d1OD765egYlvlsGdvtgZnbHjG2+wzJEguz/CEBKt3eAE1Y/jb/YFdWC6WDQBTw1pdv6R0cuND0j+7XHFm1cN31pX2CUFqYy6HK9W8oLySQrtTSBwmMhdIWYjodoqIHyZvG/vu7IWlLOAgK7tAS+jSFnCn7ew5pgVxRZ7WzcwXe3Ybt8743n07tLGKZK1tjK6jZvyCBbzRZp/67Q2Ic+2kaTE+zjGq9ANI502zjzfbFHxf30DT/AXsQfZM= +api: eJy1VlFv0zAQ/ivVPafL6LYCeaKDARMgpjLgoaom17kkZo4dbGdbifLf0dlpmm4rIAR9aB3nu8vdd5+/pgHHcgvJAr5qc51JfWthGYGu0DAntDpPIYEMHS+ubjvAlcEbYYVWEIHB7zVad6rTNSQNcK0cKkdLVlVScJ8j/ma1oj3LCywZrSpDT3ACLV3dMCOYclcGMx+q1h8zSBYNuHWFkIBefUPuIAInnKSNOWZoUHGENupRqpYS2mVLVYUC/1HCNtobR41f7aOnbVtfjK20sqHTyeEh/aRouREVkQMJfKo5R2uzWo7mHRiiv+WS6zoEdSUL5TBHM6j5pUcMaPozijb6mPft/RFTpBBhMCWJhdqW+3P27QfqjieTh2x9YVKknovRmTHa/D1VKTomJK2Ew9I+BEjNd+4+IMk6I1Q+ZGJDt9dht8eMYesBk+91KJBmUNp8MKwu3xb6Aa1lOamyg+yHejJGl3T3d3OgvsKjO9xgJFt6A7v723gV6PvV8Xh7eXnxIGGY7e5QX9MRGm3kMJpvHaZEV2gyoRwpc8VcAQnEFYkXb+MVsxhvjp6NN5K2cdObgEhbiMCiuUFj/fRqIyGBwrnKJnHMpa7TA5ajcuyAiZhVAu7XN/N3Ry8JCu2S0vHaCLf2+WYX5+9w/RZZigaSxXII+ETiC3LahfWTZJV4h0SsYiVdz2pXaCN+BI1EIKiAIkQRcyTr+dZ3z+5YWUl8xEcF0XaUsWcn2fR4fPL0ydPx8cl0Ml4dZXw84c+nR9l0yjI2JXpknQ9VRVyF1vst5pwRq9r5ZtpHbPb/Pq8lJjLtievk1U3llPFrVOlOlsODJweH+8bYBYxmF+edezDu3WMzAQ+D6J5QeolABFh66wCHrHyxvUFVVtq6kqlBvv3q3imvV4TDOxdXkglvEb6IplP+AjrlQwSkfYigVz9sR0LrZHAC6IQX2jpK0DQU+NnItqXt7zUakvEyCvpZEbULsq9iI+gGrnHt/zm8z469yRBc1kHA9zyX/DBEzDjHyv0Suxyc8Tdnl9RX9zZR6pRCDKNm6TsBoFcT5xtMmrDXgGQqr8klEwgp6fMThXcJJQ== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/workflows/revisions/{workflow_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Workflow Revision"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/base/workflows/revisions/{revision_id}"}></MethodEndpoint> Fetch Workflow Revision -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Reference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Reference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowRevision"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-workflow-variant.api.mdx b/docs/docs/reference/api/fetch-workflow-variant.api.mdx index 31c2b0ce2d..0cf3dd4cab 100644 --- a/docs/docs/reference/api/fetch-workflow-variant.api.mdx +++ b/docs/docs/reference/api/fetch-workflow-variant.api.mdx @@ -5,67 +5,1008 @@ description: "Fetch Workflow Variant" sidebar_label: "Fetch Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJzNV01z2zgM/SsenNoZNnYze9JpvfnYZNvdZhq3e8h4MrAEW2wpUSXBZF2P/vsOKcq2LDtN03Smp3wIeA94AEFwBYwLC8kN/KvN57nS9xamAnRFBlnq8jKDBObEaX57Hw1u79BILBkEVGiwICbjEVZQYkGQwK7hrcxAgCwhgQo5BwGGvjhpKIOEjSMBNs2pQEhWwMvKQ1g2slyAgLk2BTIk4FxAYcnKG7TRDj42HIPLDOp66qFtpUtL1qMdj0b+R0Y2NbLy+UAC1y5Nydq5U4P30RgEpLpkKtmbY1UpmYb0h5+s91ltRVgZLw7LhiHVrnGKgcuSaUFmK9KTYCEgozk6xZCMatGTKNCWy3fzoGOXYm0rs67Zw1rVYm1ROqXAi9NTz6smAA3LOab8jAzjCBkZ5ip02eEkpb1NnWVd7A1gprUiLB9kvLSDkwahFh6O7lA5ZG1+BPFsDdKA5q7A8kcALwJAXYvWSM8+Ucp7Ovs8SNaHqwUUxNgNArNM+n5FddWR9VApt2Dbju0wFbPuf7az288FqTSpU2henDul/rK6fPXOceX4Jezm6kEkU/FILzQGlw/quuMLPXUfcv7bi+k9eh36K4n6j34rLX9T1kNJ9ty/T6NJ04pxwD9KgX4I3rcW3WH8NKjTLYhaQGoImbJb5EdOrwyZXrEM8RxmOWlgB+Mglquyn0HyoYGNJBkp+gkkpw1sJGnlmi2fcd63Yv2xjBO/1etZWVq11iytYM/K0sq1ZrHKLZ7aq9fe118ezxZe2HS+fX/ExWjfDfJ47/WCVNfe67fj4/4+9RGVzMK2NDgzRpunL1MZMUoV1oHmetg1UDrtfP2eSTytd26UTdJvdROgr1NhF/v20M1tYS0uaDM+D5sGMQYT/3Wf4psd+Cbk1VBHu61yb+Rt1D2cxmkj30PlvZhMrnqATW27RT33K/9gd8uGsHvk2j8KFtS8ADiHBIaVoTtJ98N2WbXDuNna4WrPe6AGAZbMXftycEZBAjlzZZPhMFXaZUe4oJLxCOUQKxlOgKXUGcnL4DK+unxDywvCjAwkN9Ntg2vfYE3LdM3W1cJKviEvXnyzjB3n2sivTR/E10reeHl1ZDnXwb3db0Nwg/HVJQjwaTSyjY5eH41gV8yOsT8bmIaz0XKHzyB2VFjnDwKoCAcDmLD4ffPBR1Zpy3EpjXgHa7dz9UYpmP7jYaVQhv4PMaxiXW8g1hU2TxbrE461BQHJvtfeVECuLXuA1WqGlj4YVdf+318cGV+/aQSZeTVvVpBJ63/PIJmjstSLdT1R4MX7eHBeDjYrUDeHtsblMsSqnP8LBHym5YHnaZgOedtLq2g5TlOqeAujN8x8061PxJ9nE6jr/wGy1UCI +api: eJydVcFu2zAM/RWDpw0Q4qzYyadlXbcG3bCi67pDYBSqzMRqbUmV5HaZ4X8fKMuO0zQYsFOU6JF6fORjWvB84yBbwS9tH9aVfnaQM9AGLfdSq2UBGazRi/L2OQJun7iVXHlgYLjlNXq0lKEFxWuEDOL9rSyAgVSQgeG+BAYWHxtpsYDM2wYZOFFizSFrwW8NRTpvpdoAg7W2NfeQQdOELF76igA3fepkWUDX5ZTRGa0cOkpyMp/TR4FOWGmIPWTwoxECnVs3VXIVwcBAaOVReYJzYyopQrHpvaOYdkLMWJLCy/4FoZs+KPKVyuMG7YTgaUB0bBAhvKC239dBoBim7+5R+EnUoH0sDzo2YlVTVdDlXccOondyriKz/GjKsfauo1TvT04OpbrhlSyCEMmZtdr+v04Fei4rOkmPtTsEVFrs3R5IFCdhIsSgdZfvpODW8u1Ex6+6J0gNqN3mtckaoN/QOb5BGJMdhwYxkmu6/VcbqK7+6YjLp7M7yNure7yMT718rz02QM6vry8PEva93W/qZ/JuMkxDcjN6t0ZfanL3Bnsr+xIySI3FJ4nP6R13mA6Wd2kcZ5e2O3d3wMChfRrs39gKMii9Ny5LU1HpppjxDSrPZ1ym3Eh4SW4RbpNTggL52aForPTbkG9xubzA7TnyAi1kq3wK+EGT18/SPmxsIzfyAknVuJUWjS+1lX/6AYmLqeyjSDap1jqER4Ujt49cPKCiHUR19rTns3ez+bFiYkCyuFxGA3ERDDTwCDBgL+QahQIGWAf3gEdef9hdEEujna+5muQ72uA9dqMsHn/71FRcBpMEDm1s/gpi84EBtR8YjAMA40ajYzZZ8TmDUjtP4W1LYT9t1XX082ODljqZx9g70nXVQiEdnQvI1rxyeMB0XDrw5ip6620C7PUKhm6rbaBYNfQNGDzgdv+vKOyNchimNgIWQqDxk9CDNUdTN3rly9k1dN1fcHR4xA== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/workflows/variants/{workflow_variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Workflow Variant"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/base/workflows/variants/{variant_id}"}></MethodEndpoint> Fetch Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fetch-workflow.api.mdx b/docs/docs/reference/api/fetch-workflow.api.mdx index 68dfcd4d87..dae5d8732d 100644 --- a/docs/docs/reference/api/fetch-workflow.api.mdx +++ b/docs/docs/reference/api/fetch-workflow.api.mdx @@ -5,67 +5,598 @@ description: "Fetch Workflow" sidebar_label: "Fetch Workflow" hide_title: true hide_table_of_contents: true -api: eJzNV01v20gM/SsGTy0wjd1gTzqtNx8bb7vboHG3B8MIxhJtTTvSqDOcZF1D/33BkWRLlp2maQr0ZFtDPpKP1PB5AyRXDqIZfDT281KbewdzAaZAK0mZfJJABEukOL29rw1AQCGtzJDQsucGcpkhRNAY3KoEBKgcIigkpSDA4hevLCYQkfUowMUpZhKiDdC6YFdHVuUrELA0NpMEEXgfUEiRZoMmu8EkgbKcM6QrTO7QMcrpaMQfCbrYqoLzhghufByjc0uvB+9rYxAQm5wwJzaXRaFVHMocfnLss2llVlgmgVQVITa+cqoTVjnhCm0rw7NgISDBpfSaIBqVYktJCJev3y0DX13opQ4dOG6g3G3sHZmsa1RnsjBGo8yhFNtHudcamKQmt4kbnFUIpWA4vJPaSzL2RxAvtiAVaOozmf8I4FUAKEvRGJnFJ4zpwBRcBsr6cKWADEl2k5BJorjHUl93aO2lWQ9hC7bpcidStug+aVd3OBbEysZeS/vi0mv9lzP5q3eeCk8vYb9WBlGE2SO9pLVy/SCve77QY/ch57+ZTPboTeivROo/5q1y9E1ajxXZc/8+jqbVKNaX4KMY6KfAvqXoXmBPgzpvQZQCYouSMLmV9BBg695NJOErUiGf41HOKtjBOJDli+RnBPlQwdZBEtT4E4KcV7B1kIauxZqX2OPihE31GLL+WIfttePrWaM0bG2jNIQ9a5SGrm0Up/3qqbN6w768PJ4tvaAOvr0/Dq2OR7htZURZsvlvp6d91fGv1CoJmmJwYa2xT5ccCZJUOgiAaiHsG2gTd06/5+6dl3s7ZFftW1MlyJ3J3OqQStvtB+fkCncX5nHTQMZgyqeHqN4pxFmoqwpd27UavKO3Yvd4GecVfQ/19Wo6ve4BVr3tNvWSBfDg404AZ0ipYWm8Qgp6mFKIYFhYvFN4P2xknxtuWqK4BAEO7V0jm73VEEFKVLhoOIy18cmJXGFO8kSqoSxUGG2HsbeK1sFlfD15g+srlAlaiGbztsENz1E1GV2zbVNkod4gc1QL9rGn1Fj1tWp3LdnTyotJUPnSBPear3FIbjC+noAALqNiZ3Ty+mQE+5x1jPkVkHF4BZrY4RjEHgvb+kEAZmH+gVBmv+8OOLPCOKrVZo3Xa9HeLq0pIPyPhoWWKox3iL2p2zeDun2w0+0OBETt/zVzAalxxNabzUI6/GB1WfLjLx4tN2ku4E5aJRdM2WwDiXL8PYFoKbXDXmLb2wFevK9fgpeDnYDpJtw0Mucusv7mXyDgM673/oCFNzxtBmVTW4zjGAtq+fYuJJ6o7XT/eTGFsvwfCqXUMw== +api: eJydVU1v2zAM/SsGTxsgxFmxk0/Lum4NumFFm62HIChUmY7VypYr0ekyw/+9oL/i1C0G7JQgeiQfH/mYCkhuPURruLHuITH2ycNGgC3QSdI2X8YQQYKk0tunDgACCulkhoSOIyvIZYYQgXSkE6noVscgQOcQwWOJbg8CHD6W2mEMEbkSBXiVYiYhqoD2Bcd6cjrfgoDEukwSRFCWTRrSZBiw6JIHyxjqesMpfWFzj56znMzn/BGjV04XTBwiuC6VQu+T0gRXHRgEKJsT5sRwWRRGq6bP8N5zTDViVjhWgXRbQdmyDeoI65xwi27E8LRB1AIGobhEvv+ZNCJ1cfbuHhWNwnrd+wahFgM4L42BelPXYhJ+UHTdcdtMcw5t1zXn+HhyMlXptzQ6bjQIzpyz7v8lipGkNvxNE2Z+CjBWHb1OxOm2YKRAL3O9OWggnZP7kYLfbUuQtc/89rWt6qE/0Hu5RRiSvQ1txAhW/Pov/bmvtnSHG43iIG+r7tttfGnle61YDzlfrS4nCdvZHg/1Kzs2uDk4NkNKLXt5i9QYmFKIICwc7jQ+hXfSY9jvrQ+r/uutjmsQ4NHterOXzkAEKVHhozBUxpbxTG4xJzmTOpSFhpdkFs1rcMpQYOt6VKXTtG/yLS6XF7g/Rxmjg2i9GQOuedPa3TmGDWOThb5AVrG7QYuSUuv033YhuiuUtlEsk84T24T3Z6Xl9lmqB8z53nCfLe357MNs/lYzXUCwuFx2hmHrRsMtbGEgXsg1CAUCMGvcAoQy+3R4YJaF9ZTJfJRvMtAjVoMchH8oLIzUjRma2lU37DV0wwYBPG44HCoPAqLRyHl/U+uJg6qKwb+cqWv+uT3oPLdYe3ln2ACJNB4njIYjAu+uOq+8D0C8zvQB95M/kJ00JSObldlJp7lcsyGinyjzaEMXSmFBo6jJ4eIsgwu+na2grp8BUd9kyQ== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fetch Workflow"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/workflows/{workflow_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fetch Workflow"}></Heading> +<MethodEndpoint method={"get"} path={"/preview/base/workflows/{workflow_id}"}></MethodEndpoint> Fetch Workflow -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "artifact_id", + in: "query", + required: true, + schema: { type: "string", format: "uuid", title: "Artifact Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workflow</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "workflow": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fork-evaluator-variant.api.mdx b/docs/docs/reference/api/fork-evaluator-variant.api.mdx deleted file mode 100644 index a719f0cc59..0000000000 --- a/docs/docs/reference/api/fork-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: fork-evaluator-variant -title: "Fork Evaluator Variant" -description: "Fork Evaluator Variant" -sidebar_label: "Fork Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJztXFlv2zgQ/ivGPLWAHKdpm+76adOkRbO9giTtPgSBQUuUzYY6SlJpvYH++4KHDupwZNdeOKn6kEISZ4b8hhp+nBF9BwLNOIyv4M0togkSEeNw7UAUY4YEicJTD8bgR+xmgrMGk1vECAoFOBAjhgIsMJMq7iBEAYYx1FpOiAcOkBDG8D3BbAEOMPw9IQx7MBYswQ5wd44DBOM7EItYKuGCkXAGjjQeIAFjSBKlRhBBZYO8w4Ov2srg1IM0vda6MRevI28hFVZNuVEocCjkIxTHlLhqoKNvPArlvaInMZMwCIK5vMpHteTRhOFbwolWhMLFZ1/hYrf2qYK8vQHhEzfhIgrsRgaYaRRRjEJInfxWmFAKcuQZNqd8cKw1pI5UZ/V9XY054EbpPAlQ+CsK3ykFaepkjaLpN+yKJh+/VZjV9aUOBFgguxfI84h0KaJnFq61fpo5VlJLQoFnmNmWgql9pzy8ZlvgEuYmFLEnbxNK/+ZRODwN40Q8hepYpQ4icNBNCDGGFkthtUWhhu0y2Y8SSSlRm5+7hOin6APh4j5M28ZYlV4NoUs9C02g6zT+eg+kbOqAh7nLSCxq0aK7qpOSitQBTpPZuqoupKzsFaq+TXZsusWsHt+6m/lqxFMHEkbW1fKFEa2Brq+BSg1zjDy1eK022bcFySYcSLxlGqrL6dII7S2NzefYxwyHLi4ryTp6vdJr9c64Ic14QFeP7FBY2r1Av4IDLgzqcjlFcUzCrgtAFd9VVpvMkPK6DGNrT30tndp8dFfXr92bKO2yZwWe0kuY3RIXd4FWM+0VJqBRnSp67pNZorcf27B1bBnoRD/PDa0/QYohNbJQztFsbVLw0Yiv1Ju3Ebtp7s2a25DOr0kDwV8v8me8vmfxPYvvWfwWWfwu+f4hvU0m4v8f8f3+sF7PM002R/eLfFrWEZVQc+BHxG58Gv3YhtF/jO6qzXqysU+o9Qm1hxY8+qX4d1+Ku7yKpnzRHvbXC4E9me8jSB9BHnMEuTdwNBZiN04Xy+XXElvcvMmcLNoWi1FuY3SVUW1hNC0su2e8G2G8Gcw94e2Xq3656ivIfQX5Pgf2FeQ+0PcV5B1ev3ZvorTL/uYV5Ix97kQBudqZ++vHG9zutBUV+vx+v9t5oLGt3+387rudDm9i1+z+BkOtnR5DTBAfuZs0cGRUGgsejsW8UXfjZK45RUp3K1oqEBtaFkc8rkrnNJryeVLFuT4fAmmaqrWOx1HI9Qt6sL8v/7PmGlwkros59xM6ODeNYe1jJG6UaKEKRGV2kajDNR72UUIFjPdXLYg/jozo9iduTyw6E4tH9OHA50SsQS1qUitwCy37yMnFMlg7sIt1MNpteuEyjAT2JmhpWqIUvjwk8FCQAC+1cqzVDo4UWEnsbcPIF63WGPEwxVswcqLVGiMZXNPFBgN+BtbrhQn5GV4btZKhlVvJANuolQyu3MqDSvZWP3dpWkJWEM+JmCZxLw4O6rztK6LEU6xs8IaxiK1P2jwsEFGlArNAVBvQyLWerhKLS5luvaYUo/4QuSgLJwGf1fOlDQmgTFl7UwXG4FI+vY9My3Fp06adtc3I4NXotg/jRMO3zL/vLi/Pagq1b22nSgI/qH18AIp9zCN5Wj2OuD6bLjclMIplMgv/GOXMi48MheYjebAddFoyO8OuSkIwFyLm49HIpVHi7aEZDgXaQ2SEYqImPcduwohYKJGjs9P3eKFLEDC+ui43UHlxPUfsZrl7UEzeY4mWOT1/lIh5xMi/2vHm2LwuMykE5Vw9L064v/mJgphiqJ5Qbz6TnjPeErPV2U+bm+b3DLWU1wXDK2hJvvgWs8x2V35bB6tSM1MmzGtfxSNV1ytf0vJlUXGzij124aFUESgkrdy+lY1uSBqn5ZxsqTzRhOZWkGmx3/INODz30R8v/cMXw5evnr0avnh5eDCcPvfd4YH75+Fz//AQ+egQ2j7m7irduAvdlTllfym5Dd+0flK1MvrrCNu7+pVN/tIs2SU/P/zY8UtzZpdcUUlfdh2SldnpKmSyjPsSXBL6kVpCs7yOWqAHR2en4JRmxf7es7392lisxpIQIleBmq2/6nE+dzImkHMA+SYGig2CwCj4q3ggeybJh0nGGH2thKWy4zR0QOCfYhRTRMLSByqay1yB4TLlYMAh9wHXfP1GkrS5JEHjK7i7myKOvzCapvK2/vkdSVo8wtGUSpbnI8pxrTs5U4Yn54YQPh0Um3u7mzd40f67P/KuFFHEST2ZSqddXeefz6gOaR3H2uxQsdNCtkbWJZHWEkeui2OxtO11iR2efb64BAem5seBgsiTMgxJUOXfMYD8+SMprd4wde8OKApniX6ftU757z+l9CiM -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fork Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/variants/fork"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Fork Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_variant_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"evaluator_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/fork-workflow-variant-by-revision-id.api.mdx b/docs/docs/reference/api/fork-workflow-variant-by-revision-id.api.mdx new file mode 100644 index 0000000000..b8be4a8f03 --- /dev/null +++ b/docs/docs/reference/api/fork-workflow-variant-by-revision-id.api.mdx @@ -0,0 +1,2491 @@ +--- +id: fork-workflow-variant-by-revision-id +title: "Fork Workflow Variant" +description: "Fork Workflow Variant" +sidebar_label: "Fork Workflow Variant" +hide_title: true +hide_table_of_contents: true +api: eJztWVtv2zYU/ivGeWoBOXac2N30NDdp0azrGiRpBywwjGOJstlQokpSST1D/33gRVdf6qTusIfkIYmpc/3OIfkdeQUK5xL8W/iLi7uI8QcJEw94SgQqypOLEHyIuLibPrjn03sUFBM1nS2ngtxTSXkypSF4kKLAmCgitL0VJBgT8KEpQxPwIUW1AA8E+ZpRQULwlciIBzJYkBjBXwEmy4+RMaKWqTYilaDJHDwdSowKfMgyGkLulRJJxhjkEw8UVUwvXDm/nYsQci3o4inCr8L5mhGxbMQTIZMHD+izdWzjmVh3RKrXPFxqF200Ap4okijjPU0ZDUw9el8kT/RaFVsqdLUUJdKasWmvP8FMLbg4VDZjay33IERF9rSqRbuKxmSn6XNtMPcgJlLifKftXWY+OPXcc6V/mpk/0YQLIZGBoKly2D7F1HnNRO5BIAgqEk5RHRS+M2u2M1baSZaGP8PJJ2vWOQkJIz/Bybk165wUcM2Weu8eqI0LsF4vzb6s8DqolwKt0ksB2EG9FHCVXu6JkD/Qrp+deu6BZNn8qWautW7uweEStdlFzNxcG0zy2RcSKKgUirvtrVFZN20OG4UhqtZpj2FI9XZFdtk8S7+PA00UmRPR9BbPmiszzhnBxCxt9gUBFUHGULx4mzH2u+RJ9yJJM/VSp9dIV9ugisT7KaEQuNyJclNVI77ub/vZ69C098PmO3Rrmc6t5oYqoVA0wkAdcNeMnUm3ZwoP+0VcKG+OtkY1fgKHKO0/DlxnYlPEayVe1y5YFWwSrijMbcVDJtuNXFkGBHmurQkiU55Iu8EG/b7+07h04ToLAiJllLHOlROGJxOlgGdWqbVfa3eDkfhvcK5DZyPbgJszWeZucTsdDNah+oyMhgaIzhshuHg6TiFRSJn+zx0ubQHGg8bTx5yNk7x1IFVJ/8FtgIYJynmtUuW+2cD0rMh2UQNG50Y//V4ZdF7WtZNr7MMCXovu9jTOLXy79ta7m5vLNYO2ts2ivuXirlM0Q6doMHN3Lbge1FIulRnE1AJ86KV6E5KH3gwl6RXzm+wVW1P2VrXhLO/pMQ88kETcFzNcJhj4sFAqlX6vFzCehUc4J4nCI6Q9TCm0Yxybp50zLWqOLkmCTFC1NPbGlxfvyfIdwZAI8G8ndYFr3YC2pZpiZTUxpe+JBteNcnYGof/YPnHT3MJqafR0a19VU9abbxinjLSnpGIugpMIfxlGo9Pu8NXxq+7pcDTozk6ioDsIfh2dRKMRRjiCYt6BQX8w7PaH3ePhzfGJ3z/2h6dH/WH/b6gNLlX/uYjLz03QyuX6SLDLQ53V75KrE/Ndci1uvS8ULbK8N4JN9ruvWklnK7wsL60+P8ZcyR+pnAaZVDwuRm8qp+QeWYZK90W5tshiTOznJmGskRy9eWhA7GLAk4jOM/smRS+1Gcy+odZJyXMn/XgnHaJtWi3Qont793RFLZ4L+/8o7EHOg+dt/twN5dFgqBxNIm64TDE6WqL0GoM7koSN661/dHzU38asnEJnfHnhSH2zY6yYxrrB3UrWBh6Q2DB6UATj36oHOkrNIE0epb1tpLP1PtRRNEW+qV7KkBrebkJYOT56C46PggeakYIHJSc11NuxUvDAb35pYIjpxIOFprf+LaxWWv+TYHmul+37e00vQypxxmpv8O/Isv3KX5dOR2rIqXky0/XYpN1KsRyg4MWVmxNedqo3Ks3UC8qaLOs+i4jq+ZkhaFFQ4pWTOLPOumZUqSysTW56qrIa4yAgqdopO6nNCpcfr290JdzXDzEPzbc1qMujf5touUnefrGg11bAMJlnltxam/rnXyR5jVQ= +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Fork Workflow Variant"}></Heading> + +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/{revision_id}/fork"}></MethodEndpoint> + +Fork Workflow Variant + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Revision Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Variant Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/fork-workflow-variant.api.mdx b/docs/docs/reference/api/fork-workflow-variant.api.mdx index 5d01d9eb97..f92f4cb184 100644 --- a/docs/docs/reference/api/fork-workflow-variant.api.mdx +++ b/docs/docs/reference/api/fork-workflow-variant.api.mdx @@ -5,67 +5,2487 @@ description: "Fork Workflow Variant" sidebar_label: "Fork Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJztW21T2zgQ/isZfbqbcQilQO/y6WgpA9c3BmjvQybDKLacqMiWqxfaHOP/frOS7PgtwXGTG9qGD5DY2l3pWWn3kbQ8IIWnEg1H6B8u7kLGv0o09hBPiMCK8vgiQEMUcnF3+9W9v73HguJYIQ8J8kUTqV7yYI6GD8jnsSKxgo84SRj1jYbBZ8ljeCb9GYkwfEoE6FeUSPiWKV7+5laQeyqpVYPj+YcQDUfVxiEzA1negMpbX0vFo3IjNU8IGqIJ54zgGKVe/ijWjKF07CFFFYMHF7L3ympIPVBH7jHTWHHxPRpf50qs0pmOcPw9Cs+NgjT1skZ88pn44K+sUebqMwNZXV3qoYgoXO4EDgIK/sTssgRrrZtSCRpPi2pprMiUiLKlaFJ+Uhxdsy3kU+FrhsVvZ5qxvyWP+xdxotXvqDpU0EEVidoJYSHwfCWqZVFUg3aV7DtAEiRq0/MpIfqev6VSPYbpsjFWpddD6MbOQhTjiLQcf70HIJt6KCDSFzRRtWDRXtVpQUXqIcn0tKuqa5CFXuHqaiqHpnsi6uGtvZlPTjz1kBa0q5aPgloNrLsGBhpmBAdErD3ZtwXJJhxIg1UaPMiQEVZoiLSmweoAHawMzVckJILEPikqyTo6XmtZnTs3AAQm9bb1yBMKS08v0K/hgGuHOqRTnCQ0bpsAqviuk20yQ8brEMY6T30rnXoowQJHRHVY0r/yRFkue7nAE7xExD31SRtoldBkrQnoVKcecPOQTrUl9duw9apkoA37vHKk/hQbgtRIQqXE086c4J0TX6czZ1zcNXem4x6k9SJpYPfd4n7G6nccfsfhdxx+ixz+Kfn+R1pNLuD/H+H98bBeO2O63RzXz5JLL+tGD9j/IpVs0FTFQu2wbndwtjs4+8HCxC7p/upJt8VK/GTj2/L43i0A7lj7LoDsAsjPHEAeDRxVCrUNXug64Ujb5g2V9ecj2sJIrAUsFA2xv8khnDiVzkJAEjVr1N24MGsTDKRbMTwzLxoawp03FSSAK/P85roBEVBwZe/HUZqmRUE4WjMPZMJjaSPPwf4+/CktInStfZ9IGWrWu3KNkdf1mt3n2gpV8Coe4WlzrR+QEGum0HB/zZ3EzzDBdruhX3A39EGrDmymJrUGnbGyPzmfWQVrC0LTBaOnzWh8QbAiwS1eeStXiF4BVqSvaERWWnll1fZODFg6CbZh5KNV64wEhJEtGDm1ap2RDK7JfIPxPgPr5dxF/AyvjVrJ0MqtZIBt1EoGV27lh6p1qOzhmzJIe+mcIKWGbR0eHNT51CfMaGDYUu+1EFx0J1MBUZiaOhmXHqoNGPdLb9eJxIWDA5tRFoN+y32cBZNITuvFAg3H45my5U0NGL0bePsY5YVxWdOuXWm3kcFr0V0+jFML3yr3nt/cXNYUWt+WnQpEu1fdUSFDPWYcqlcTLuF7gmHjgAYJnL6Tr4OMrMqBY7ZyAHWuyN7Im2KH0YOthkIzpRI5HAx8xnWwh6ckVngP0wFOqJnwkvhaUDU3IieXF2/I3FbfoOFoXGxgSkLsDCk3y52DE/qGAFY2g6ETrWZc0H+t2z1EYcy2wsrgBzP1alGH+/objhJGUKWutrGSNqe6BUprr/3LpDR/5jil2784brcgJHnaXcywsqvyxzZMFZq5u7W86GvxyhS0Fb+y4tdFqVmpyqlccVMohVlIlopaSmUYDdUSafG2qlCX04TmVpBZYr/58go9D/EfR+HxYf/oxbMX/cOj44P+5Hno9w/8P4+fh8fHOMTHqHIN1VaoaT/4VCZS+bh3Gw5Zdi7UFr0uMqVddVuh0ka5rZA7XNmH6U7jkJuwlG2TTdDrnVxewDDydbq/92xvv4ZeqTGkWOwbl2QxzbzOV3MWXfO4ijxEIpNfkSI4+mvxAnoG8dztbZ2+ZSmgQuBdhFXkmxokDNO4UO5qs8MIuexQgF0u3CYt+7mDpDeDrDIcoYeHCZbko2BpCo+/aCIgDYyd0ATAG43zqliTIe7I3FZMAfXom7wLzZm2CaBCQ4AiWIkT3yeJWtl2XEh8lx+ub5CHJu7fMyIegIzAMDr4PUQI/tMDpM3qNc8eEMPxVNtIY3XCz3+wbTUT +api: eJztWW1T2zgQ/iuZ/dTOOCQEQq/+dAHKlOvdlQHKzRyTYRRbTlRky5VkaC7j/36zkvyalwYabu4DfAAi7z67erSSnnUWoMlUgX8Lfwl5H3HxqGDsgUipJJqJ5DwEHyIh7+8e3fO7ByIZSTR4kBJJYqqpRIAFJCSm4IN7fsdC8IAl4ENK9Aw8kPRbxiQNwdcyox6oYEZjAv4CSDL/HBkMPU8RQ2nJkil4GDomGnzIMhZC7pUWScY55GMPNNMcB25s2M55CDnauWwkfWCKiaSWzreMynkjn4hwtfOELl1km9HYxqNKH4twjjHadAQi0TTRJnyachaYBeh9VSLBsSq5VOLyaEaVhbFhlp+QTM+E3NV0RhYt9yAkmm6JiqZdzWK6EfoUAXMPYqoUmW7E3gTzh3PPPbf4z4P5k5h0IaQqkCzVjtvnQJ3WIHIPAkmJpuEd0Tul78TCdkYag2Rp+BJBvlhYFySknL5AkFML64IUdE3muHl3VMYFWcdzsy8rvnYapWCrjFIQttMoBV1llAcq1U+U641zzz1QPJs+F+YKfXMPdjdRO7uIm6tqBaSYfKUB3kiFQ3GZnRmXZWhz2GgSEt067kkYMtyuhF80z9If88ASTadUNqPFk+bIRAhOSWKGVseCgMkg40S+Ocs4/02JpHuepJl+i9NrTBcxmKbxdk5ESjLfyHLTFRlfjrf+7HVs2vth9SW6dplOreeKVSJSs4gEeoe7ZuQg3Z4pImyXceG8Otua9HkBVVPiP41cB7Eq46UlXvYuVAysMq4kzG2lQ8brQS6tAoI8RzRJVSoSZTfYoN/HP41LF66yIKBKRRnvXDpjeLZQCkRmnVr7tXY3GIv/huc6dTazFbw5yHLulrfDwWCZqhvCWWiI6HyQUsjn8xRSTRjH/9zh0jbgImg8fcrZOM5bB1I16d+FTdAoQTWtrVS5b1YoPWuy3tSQ0bnGpz9aBpyXDe3sGvuwoNeyu34ap5a+TXvr4/X1xRKgXdvmop4Jed8piqFzUzZeMdUzgZ1ZKpRtxPQMfOiluAnpY29CFO0VDZvquXJWvUV1QOU97OrAA0XlQ9HBZZKDDzOtU+X3egEXWbhHpjTRZI+wHkkZtDMcmaedEzQ1B5eiQSaZnhu80cX5Jzr/SElIJfi347rBFZafLaimWbmWJGWfKFLrWjnbgbB/bJW4Zm5mvZA7LOzLqsf68J3EKaftHqnoiuAgIr8Mo6PD7vDd/rvu4fBo0J0cREF3ELw/OoiOjkhEjqDodmDQHwy7/WF3f3i9f+D39/3h4V7/8P3fUGtbqupzGZefm6SVw/WGYFOEuqbfZFeX5ZvsWsp6WypaUnlrBpvad1u3UsxWfFlVWn1+ClypHpm6CzKlRVw03kzd0QfCM6KxLsqxWRaTxH5uysWaxMHNwwJqBwORRGya2RcnONTWL9umWpckr5X085W0i7JplUBL7G1d05WweF3Y/8fC7uQ8eN3mr9VQHg1GyLEkEkbLFI2jFUrHJLinSdi43vp7+3v9dcrKOXRGF+dO0jcrxpoh1w3tVqo28IDGRs+DpiT+tXqAWaJ+NPMo8dZJztbbUCfRNP2ueyknzKh2k8LCqdFbcGoUPEA9Ch6UirQ6CfFfv/GNgZGlYw9mKG39W1gs0PuL5HmOw/blPYrLkCky4bXX9/d0vvTCH1cOEzXa1MSZ4HKscm/NsOye4M2laxLedqrXKc2ZF4o1mddjFinV5mcaoFkhiBfO4MTG6po2pQJY6tqwo7IeoyCgqd5oO671CRefr65xHdxXD7EIzXcjBBcHf5tkhZm7/VIBxxbASTLNrLS1mPjzL6brhaA= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Fork Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/variants/fork"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Fork Workflow Variant"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/variants/{variant_id}/fork"}></MethodEndpoint> Fork Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow":{"properties":{"workflow_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Variant Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Revision Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revision</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-all-workspace-permissions.api.mdx b/docs/docs/reference/api/get-all-workspace-permissions.api.mdx index ab12ab47b7..5dcecd6447 100644 --- a/docs/docs/reference/api/get-all-workspace-permissions.api.mdx +++ b/docs/docs/reference/api/get-all-workspace-permissions.api.mdx @@ -5,67 +5,144 @@ description: "Get all workspace permissions." sidebar_label: "Get All Workspace Permissions" hide_title: true hide_table_of_contents: true -api: eJztVkuP2zYQ/ivEnAV726NO9SFIFunBSLbowWsItDS2mVCkMjOy4xr+78XIeq+T5gd0L2t+882LnIeuUCDn5CpxMUAK71GM9d6cI33lyuZoKqTSMbsYePEaXsMnlJoCG2u8YzFx3/DtyTpvdx7/WzN9DcYY86dj2ax7yjY1q97iAJu4+4K5sCGsCBmDuHAwcsRf82gdY+fww8vL+t33HJtUU/O8VzOExrGxwSBRJEMo5PDU+XhsGRKIFZJVO88FpHBAyaz3WU/PRnRIgJCrGBgZ0iv8/vSk/6bX/rnOc2Te1958asmQQB6DYBCl26ryLm9cLr+w6lyB8yOWVn85wbIxLpcKIQUWcuEACWCoS0g3QGiLjC8sWEICJ4fnbGRRY8TCyRhT94RWUMHsZMnZIJBAgR7fgGUs3P7SAVkew94dauqND0qd+ZEy1SFjpJPLcXDKmBNKF2t/qqtiIm0NT9kaG4aToxhKDJIVWPl40Z+jPH/MGKX9Q07jR5CFsTc6HFsLA9CGOQCNPp6sr7vL1lsYgP5FJpzW7gRrTc8wDXX2mo3LvkI7+2OgNT+GWutjqH3rmpEyih41VFsUWcDzHZT41k2kgw3un1nQM3RuZSbW9pesssznSEWX0c5539a6OhqOfb57H888zrcD9MrH5/GjRJo/wR1pON9qJIc9YTiOy4JnddHLbQhRZn03gRqWC6c4684pNCuhjOpHVdPBczbnGCy5+EhlLHvjBbn28tBRL5nrlDpU80c6g2Su863GGh+ptIJtAuLE67AblgXckm4CWiJ7gYHUTVWjC27lvfm7H+3r0ay+6V8CJcoxtpMdEqisHCGFZV/WvJwOeB1fSAzp5go1eUjhKFJxulzmPtbFwh4wiF1Yt7SVg9tWNfKanFwaldX6+SNePqAtkCDdbMeEzzrk75tjSuuHva3cR9Rcgy31vKrlGGnoG6cL5njX0uRc2MdGvb2aVROcWa2f9R2Q+L6Snha/LZ6aXh0vqglZ95PNm/3U+W7EOqgnt9Dnrw9aWqcyQVv+MQg0siqylDaM7P38tWbBXYeF+f93zK99x7QlJPhdlpW3rmmh5u2ubdVvYKh6bYXR9W8TOEYW5VyvO8v4F/nbTWGdiFra2wSaPb/TQttsb0lXh1r1X/GiFZNrJlp51tf3cp596Wg39A35/t0L3G7/AnMr6lI= +api: eJztVU2P2zYQ/SvEnAV726NOcYMgWSQHI9miB68hjKWxzSxFqpyRHcfwfy9G1neybX5A97LW4+Ob7+EVCuI82kps8JDCexKDzplziC9cYU6molhaZhs8L579s/9MUkfPBo2zLCbsGz6e0DrcOfrvm+mzN8aYT5Zls+4p29SsesUBNmH3lXJhE6mKxOTF+oORI/2aRbRMncEPT0/rd99yakJNzeNeZSIZywa9oRhDNJEkWjp1Nn6uDAmEiiKqzmMBKRxIMnQu6+nZiA4JROIqeCaG9Aq/Pzzov2nav9R5Tsz72pnPLRkSyIMX8qJ0rCpn88bk8ivrnStwfqQS9ZcVKhtxuVQEKbBE6w+QAPm6hHQDkbDI+MJCJSRwsnTORopKLKzMoDwSCs3Aghz9AA7M7ITRopcJcwSWobD7SwdkefB7e6jvqeSfyo8ux9pnTPFkcxqMMuWRpAuq/6qrYnLaCk/Z6hv5k43Bl+QlK6hy4aI/Rxl5nTEK+1VOY0eIhakXHT5bhQFo3RyA5j6d0NVdsjULA8Cd6ITT6k6wVnqGqauzajYm+1bu9MdAKz+GWvUx1Na6ZopZDI7UVSyKzNP5Dkr40UyIB/T2+8zpGTpXmR3rnpCsQuZziEUX0c461w6FGho++3j3Lpx5HG8HjIsQ4jzld2RcaJ5Vuj9H74NM6zaFuv4fgdsExIrTsR7WItySbtYxRrzAQOr2h9FVvnLO/NUvsfVoK930L4GS5BjaHQYJVChHSGHZ14WX01Wm80eRId1coY4OUjiKVJwul7kLdbHAA3nBBdolVrYJaLzmVs2peatUuG1VLq+jlUujt1o/fqTLB8KCIqSb7ZjwRXfdfYFOaf3Ow8p+JE2Ex1K/V7UcQxy6wqoDx/stjdz6fWiut3lrffsD8xfyTddQ5LvbD4vfFg+vBdNeMKv1Y7uyMW9WdudHQ9OVNElXnyhthBKtnglh+WY4UC+rwFKiH+n9e1lnTl6HN+T/p/3Xnva2nYS+ybJyaJtZa2p3bcdjA8N46MyM0r9N4BhYlHO97pDpz+huN4X/rilqm28TaF60nTbdZntLup7UCXihi3ZMrpFoB6Kr7609e/x1MvrJff/uCW63fwCoIY1k sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get All Workspace Permissions"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/workspaces/permissions"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Get all workspace permissions. Returns a list of all available workspace permissions. Returns: - List[Permission]: A list of Permission objects representing the available workspace permissions. +List[Permission]: A list of Permission objects representing the available workspace permissions. Raises: - HTTPException: If there is an error retrieving the workspace permissions. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","create_secret","view_secret","update_secret","delete_secret","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues"],"title":"Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}} -> - -</StatusCodes> - +HTTPException: If there is an error retrieving the workspace permissions. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ marginTop: ".5rem", marginBottom: ".5rem" }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`read_system`, + `view_application`, `edit_application`, + `create_application`, `delete_application`, + `create_app_variant`, `delete_app_variant`, + `modify_variant_configurations`, + `delete_application_variant`, `run_service`, + `create_secret`, `view_secret`, `update_secret`, + `delete_secret`, `view_app_environment_deployment`, + `edit_app_environment_deployment`, + `create_app_environment_deployment`, `view_testset`, + `edit_testset`, `create_testset`, `delete_testset`, + `view_evaluation`, `run_evaluations`, + `edit_evaluation`, `create_evaluation`, + `delete_evaluation`, `deploy_application`, + `view_workspace`, `edit_workspace`, + `create_workspace`, `delete_workspace`, + `modify_user_roles`, `add_new_user_to_workspace`, + `edit_organization`, `delete_organization`, + `add_new_user_to_organization`, `reset_password`, + `view_billing`, `edit_billing`, `view_workflows`, + `edit_workflows`, `view_evaluators`, + `edit_evaluators`, `view_testsets`, `edit_testsets`, + `view_annotations`, `edit_annotations`, + `delete_annotations`] + </div> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={'[\n "read_system"\n]'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-all-workspace-roles.api.mdx b/docs/docs/reference/api/get-all-workspace-roles.api.mdx index c6801a440d..50cfaf38ca 100644 --- a/docs/docs/reference/api/get-all-workspace-roles.api.mdx +++ b/docs/docs/reference/api/get-all-workspace-roles.api.mdx @@ -5,67 +5,119 @@ description: "Get all workspace roles." sidebar_label: "Get All Workspace Roles" hide_title: true hide_table_of_contents: true -api: eJztVMtu2zAQ/BViz4Tl9qhTfQgSIz0YTooeHCPY0GuLCUWq5MqJK/jfi6Ut+QG0+YHqYomcfczsrDtg3CQoF/AzxLfUoCFYalhRMtE2bIOHEm6JFTqn3nuIisFRGj35Jz8nbqNPCpWziVVYZyRu0Tp8cfSvmPLJK6XUd5t4MVSfB0dzSk3wiZalmgxpLxAqvLyS4aQiNZESebZ+o7iizyqjTdQXvnt8nN18GMo0SzVdK/SKYgxRBWPamNR7ZR2pSBwtbfsK13lBQ2goomSZrqCEDfEzOvc8AJ8zEDTEI7EEZQdfx2P5uZT6oTWGUlq3TvUqgAYTPJNngWPTOGtyseI1SUwHyVRUo7xZpjonx9XKCgbdLEp3bA9FedcQlJA4Wr+Bve4PDnqeHWCMuAMNbNnJd9+NEjNMnDvNQ80zu708GmriKhxVAA0NcgUlFIMWqejFSBS3FMV7HbTRQQkVc5PKojAutKsRbsgzjtAW2FjYLyXCtNHyLodMZtN72t0RrihCuVieAx5EkAPhS9ggADb2noSfx1q+Jy1XIdrfWVjQYGUY1SFKaFm/Djn8KMckN6cmsyloEBqH8Y1HX0ZjuN6fC7DMEk2eZV87X4O+UmHgDxqoRit3TFh/O11IZ01IXKM/y/e3CV211Z1s9X/DP9vwo22YPrhoHFovq5Ln1R09voCTx2XVs+RLDVVILLdd94KJfkS338vxr5aiGHmpYYvRCp/sYt27Tjz+RjvxhxEG4jN07cG8V/8B4v1h8W5vHmG//wP6PA52 +api: eJztVE1v2zAM/SsCz0Kc7ejTsqFog+4QpB12SIOCVZhYrSx5Ep02M/LfByp20gZo+wfmi23p8evxkR0wbhKUC/gd4lNq0BAsNawomWgbtsFDCZfECp1TzwNExeAoje78nZ8Tt9EnhcrZxCqsMxK3aB0+OPrIprzzSin10yZeHKPPg6M5pSb4RMtSTY5u3yBUeHgkw0lFaiIl8mz9RnFFn0VGm2gIfHV7O7t4MZTLLNV0rdArijFEFYxpY1LPlXWkInG0tB0inPsFDaGhiOJluoISNsT36Nz9EXifgaAh9oUlKDv4Oh7L6y3VN60xlNK6dWpgATSY4Jk8CxybxlmTgxWPSWw6SKaiGuXLMtXZOa5WVjDoZlGyY3sIyruGoITE0foN7PVwcODz1QHGiDvQwJad/A/ZKBHDxLlTP9Q8V7eXR0NNXIWeBdDQIFdQQnHkIhUDGYnilqJor4M2OiihYm5SWRTGhXY1wg15xhHaAhsL55qc5Fv1Q6CwX4o700bLu+xvMpte0+6KcEURysXyNeBG2Dqw8RZ2ZAcbe01SvMda/ictVyHav5l10GAlgepgJTVbvw7ZvOeqz+07mifyK9AgdR7SHo++jMbvFdMbqMls2jcdTW76kEeGgT6j60gUaKAardwxYf3tdCFZNiFxjf6Vv/daeZZed9Lf/1Xw2SroJcT0wkXj0HqZqdyvrh+GBZyGQXZCpnypoQqJ5bbrHjDRr+j2ezn+01IUUS81bDFaqScrWg8KFL0/0U70YaQC0Ru69iDks2Uhc3Cc0MuLW9jv/wFK9h0F sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get All Workspace Roles"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/workspaces/roles"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/workspaces/roles"}></MethodEndpoint> Get all workspace roles. Returns a list of all available workspace roles. Returns: - List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles. +List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles. Raises: - HTTPException: If an error occurs while retrieving the workspace roles. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}} -> - -</StatusCodes> - +HTTPException: If an error occurs while retrieving the workspace roles. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"string"} + qualifierMessage={undefined} + schema={{ type: "string" }} + collapsible={false} + discriminator={false} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={"[\n {}\n]"} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-config-deployment-revision.api.mdx b/docs/docs/reference/api/get-config-deployment-revision.api.mdx index d2cdd35c39..b8b63992a5 100644 --- a/docs/docs/reference/api/get-config-deployment-revision.api.mdx +++ b/docs/docs/reference/api/get-config-deployment-revision.api.mdx @@ -5,36 +5,36 @@ description: "Get Config Deployment Revision" sidebar_label: "Get Config Deployment Revision" hide_title: true hide_table_of_contents: true -api: eJyVVNFu2jAU/ZXoPG2SBazaU56G1qpF3bSqZXtBCLnJJXGX2K7toLHI/z7ZCQEKbNoTwb73+N5z7rktHC8s0gU+K7kWhcWSQWky3AklZzlSFORWWbxc5aQrta1JupWhjbBCSTBobnhNjkzAaSF5TUhxJnYlcjAIiRSauxIMhl4bYShH6kxDDDYrqeZIW7itDijWGSELMDjhqnBwPcAmjz1sMsvh/TKgWa2kJRsAriaT8JOTzYzQoRukeGqyjKxdN1Xy2AeDIVPSkXQhnGtdiSw2P36xIafdF+W99wwfr65OgX/wSuQxLbkxRpn/QIU2gXAnurpzclxU4Us4qu1pQKWyo1sut9/WkfljzjwbToR0VJCBX3q2O+PG8O0BsV9UVyA8Q22Lv2nwlazlBWEAuxwayUjm4dbv31bPL5S5I/0Xsa/u6T5uuYfZ09uxe7mN646+c4/tQu7m84cTwE7bY1FvySWdLZIzYxeKJVeq3iPRCK5EinHnFjveW2DcnreDB4Mls9l5pzEVUpTOaZuOx1mlmnzEC5KOj7gYcy0Q5txS1hjhtjFl+jC7p+0d8ZwM0sXyMOApzFg3Ncdhg2Bci3sK/PWunTauVEb87kahN2vZZQWChFyrmN5zOY3FJdOHGRhCGx1zk9GH0QRv+TwKDvbgWbTH7u14DfaGhaF/MFAdvQFHvP60vwiVaWVdzeUB3j/lO6puoMTRLzfWFRfRCrGWtpd2gV7amLyDBEN6YdstGUplXchs22du6bupvA/Hrw2ZIOCSYcON4M+BzkWLXNjwnSNd88rSSZHDVsG7x9487xOw88XvRJZB4Q2vmvAPDD9pe3lDxyVR7uap7YOnWUbaHcCc7LQweIMhbm/m8P4POBkyRQ== +api: eJyVVNFu2jAU/ZXoPm2SRVi1pzyNtVWLumlVy/aCEHKdS+I2sV37Bo1F/vfJTghQYNWeCPa5x8fn3uMWiBcOsjlcarWShYMFA23QcpJaTXPIoEBairi5zNFUelOjoqXFtXRSK2BguOU1EtrA04LiNUIGJ7BLmQMDqSADw6kEBhZfG2kxh4xsgwycKLHmkLVAGxNYHFmpCmBAkqqwcDXQJg89bTLNwftFYHNGK4cuEFyMx+EnRyesNOE2kMFjIwQ6t2qq5KEHAwOhFaGiAOfGVFLEy6fPLtS0O1Hee8/g88XFMfEvXsk8liXX1mr7H6xgbDCcZKc7R+KyCl+SsHbHgEqLg12uNj9W0flDzzwbVqQiLNCCX3i2XePW8s2esd90JxA8g9oV/+rBd3SOFwgD2XloNCOZhV2/O1s/PaOgg/7P4726o3vcYkezs7dz9/w1rjr7Th22hdzOZvdHhF1vD5t6g5R0sUhOjF0Qi1TqPiMxCFRCBmmXFpfuIpC2p+PggYFDu95mp7EVZFASGZelqah0k494gYr4iMuUGwlvNU7ibnIZoBBC4FA0VtIm8k3up3e4uUWeo4VsvtgHPIYB7EbqEDZ0kxt5h8HcPtKThkpt5Z9uTvokl11VcE+qlY7lvdG9tq9cvKAK0Q/37GSPR59G43OX6QuSyf20zxEXMUdbHREG7I1dg1HAAOsYIiDk9ZfdRlBptKOaqz2+d/t8oHKwh/A3pabiMmYmamn7GZhDPwOxeEsJDLIzz+KCQakdhcq2feIOf9rK+7D82qANzVwwWHMr+VOwdt5CLl34ziFb8crhkcjh+YEPD33KPibATovfNlyFbq951YR/wOAFN+ef8vialNvZanvwRAg0tEdz9PiFIRySc3M9A+//AtfHQNQ= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Config Deployment Revision"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/configs/deployment/{deployment_revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Get Config Deployment Revision @@ -43,29 +43,254 @@ Get Config Deployment Revision as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"deployment_revision_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Revision Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "deployment_revision_id", + in: "path", + required: true, + schema: { type: "string", title: "Deployment Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-config.api.mdx b/docs/docs/reference/api/get-config.api.mdx index 69eec783cf..fc5feb6336 100644 --- a/docs/docs/reference/api/get-config.api.mdx +++ b/docs/docs/reference/api/get-config.api.mdx @@ -5,36 +5,33 @@ description: "Get Config" sidebar_label: "Get Config" hide_title: true hide_table_of_contents: true -api: eJy9VU1v2zAM/SsGTxtgJFmxk0/LuqINuo+g63opgkK1mUSdLLkSHSwz/N8HSv5M2q7YYafEEslHvfdEVUBi4yC5hVOj13LjYBWDKdAKkkYvMkhgg3SX+k2IoRBW5EhoOacCLXKEBO6FwzuZQQxSQwKPJdo9xGDxsZQWM0jIlhiDS7eYC0gqoH3BeY6s1FyWJCle+CgcRosM6jruigfsO//1LMBaKDdCEHr/be17HGNx4WZFl0pBverRAwXRV0YadoB6J63ROWr6H22c9XBtLysGcYXRDh2XPZnN+CdDl1pZsFSQwPcyTdG5damiqyYYYqaPUJNvpiiUTL2y0wfHOdWg1cKy7iQDwpD1FwQbURZDWlrLLO3QOhkAmkypCTdoh6khNrppYuuxuyoQWSa5V6GWg9aClZqq5v4BUxoUXfYV6vo4rFfq9sBXh52PmhmIc44UztxRXNeM9P7k5FiRG6Fk5vmOzqw19t/lyJCEVPxPEubuOECZdLT7CuO1ktSrnilhrdgP+PxsQoOsTu42L1nhCzonNt4GIeT5UE9GdM27f1OJzxWgm7iBFj29gd3nj/Ep0PcUWBtycX29PCoYtB2Leo4UnbbzMEfammZKes/QFhKYps0wjcGh3bXTsrQKEtgSFS6ZTlNlymwiNqhJTIScikL6MeAwLa2kvU+ZLxeXuL9AkaGF5HY1DPjOXgnqj8M64kUhL5F5aAbZvKStsfJ3kLSZYtuQxQeVem18esPJ3DcXzZcLiKG70zCbvJvM4JCXUTDbXKTe5i2234b4gIXu/BAD5t7jQCjyD/0Gd1YYR7nQg3ojGUaddMcn/EXTQgnp7etxq0ai9vr7u701jnipqvgh+2FVXfNyGO+sQiaduFeDAX+A111qeHPVePdtBPHTffzE/ejJ3AlVcpS/mkdIIXo8q16T8cSb1aet+MNKzvOmilsT8GFD/jxNsaBB1tG04iqd/c/PrqGu/wDyNdUc +api: eJy9VU1v2zAM/SsGTxtgJFmxk0/LuqINuo+g7XopgkKVmUStLLsSHSwL/N8HSv5Mmq7YYafEEsn39B5F7YDEykFyB6e5WaqVg0UMeYFWkMrNLIUEVkj30m9CDIWwIkNCyzk7MCJDSOBBOLxXKcSgDCTwXKLdQgwWn0tlMYWEbIkxOLnGTECyA9oWnOfIKsNlSZHmhc/CYTRLoaritnjAvvdfRwGWQrsBgjDbH0vPcYjFhesVU2oN1aJDDxJE3xmpzwDNRtncZGjof9A46+AaLgsGcUVuHDouezKZ8E+KTlpVsFWQwHUpJTq3LHV0VQdDzPIRGvJkikIr6Z0dPzrO2fWoFpZ9JxUQ+qq/YthAshhkaS2rtEHrVACoM5UhXKHtp4bY6LaOrYbdtQORpoq5Cj3vUQutVFfNHx5RUq/ovKtQVYdhnVN3e321z3xApmfOOVI4cytxVTHSx5OTQ0duhVap1zs6sza3/25HiiSU5n+KMHOHATqXg903NF5jSbXolBLWim1Pz695IMjuZG71Wit8Q+fEyrdBCDke6sWIbnj3by7xuQJ0HdfzopM3qHv8GF+CfC+BNSEXNzfzg4LB26Gp50jRaTMPM6R1Xk9J3zO0hgTGsh6mMTi0m2ZallZDAmuiwiXjsdR5mY7ECg2JkVBjUSjYx5r63eiUQ/2McChLq2jr603ns0vcXqBI0UJyt+gHXHMjhdYYhrWuiEJdIotUT7lpSevcqt/B73rErUMWq6DMMvfptWA1t89CPqHh2d9eepiMPowmxw5TJ0TT+ay+D0L6+9Dw8GEQ78nVCgUxYOYvAxCK7FO3wSyL3FEmTK/ewK8Bo1YKwl80LrRQvs897q72spkTfgisc0e8tNvxi/fT6qri5fAOsCOpcuJB916CPbz29sO7q7rJ30cQv8zjCbeDt3UjdMlR/g4fIIXo4VB7S8YLj1uXtuAPqzjPN1jcNAQfNuRPpcSCelkHY42rtPfk/OwGquoPPCXjqw== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Config"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/configs"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/configs"}></MethodEndpoint> Get Config @@ -43,29 +40,344 @@ Get Config as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"base_id","in":"query","required":true,"schema":{"type":"string","title":"Base Id"}},{"name":"config_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},{"name":"environment_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Name"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"config_name":{"type":"string","title":"Config Name"},"current_version":{"type":"integer","title":"Current Version"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name","current_version","parameters"],"title":"GetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "base_id", + in: "query", + required: true, + schema: { type: "string", title: "Base Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "config_name", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Config Name", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "environment_name", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Environment Name", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"current_version"} + required={true} + schemaName={"Current Version (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Current Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + parameters + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Parameters", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "config_name": "string",\n "current_version": 0,\n "parameters": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-get.api.mdx b/docs/docs/reference/api/get-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-get.api.mdx index 134b72247f..58b295fd04 100644 --- a/docs/docs/reference/api/get-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-get.api.mdx +++ b/docs/docs/reference/api/get-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-get.api.mdx @@ -5,73 +5,317 @@ description: "Fetch the score of a specific evaluation scenario." sidebar_label: "Get Evaluation Scenario Score Router" hide_title: true hide_table_of_contents: true -api: eJzdVU1v40YM/SsDnlpAa2WDnnSqgaSJsS0aJG4vjmEwI1qarTSjnaGCuoL+e8GR/BUrQXvdk+UZ8pF8fOR0wFgEyFZw39ZoP92+YtUiG2cDrBPIKWhvGvkPGfxCrEvFJamgnSfltgpVaEibrdGKDq4qaLLojZs922c790XInq1S6sRkszfZmDxTy5LU4kbwBHwCSLFTW4keER+JW2/3oDdGiy36ndLOMhprbDFmOXovbhTaXBkOQ+YzSMA15GOQRQ4ZFMSbqeyi+ca7lslvSqHoxCxMukwemnwzYhXEkECDHmti8sJ9BxZrggymPSEBI/Q3yCUk4OlbazzlkLFvKYGgS6oRsg541whKYG9sAQmw4UoOjk1VTwdKcuj7taCFxtlAQQCur67k57zrT63WFMK2rdTjaAwJCNVkWcyxaSqjI376NYhPd5mUe/lKWirHPDexX9WDlx6wGWKfJ98fs98HVXfEaqqUpyjGx9gjFWV8YhYmXSYPF7kase6Ioe/7PoGfrq8vGfkTK5MPzrfeO/9/6GjOis6J0VTyZZjqcGlQOX12i3b3+zZK5i1fhxNjmQry0K+FxOEMvcfdiSJ+dUOCwnMdio/E8xuFgAXBAewDnQkZaim3/TH2ofNH4a5iXUPo0W59hDnSO7D7fhk3A31TwfYm98vlwwXg0NuauHTj8MeR5BIySOOUfzqZ8nRiLNNuelb7NE45JBDIv+7Hu/UVZFAyNyFLU125Np9hQZZxhibFxoCMYiDdesO76DJ/WHyh3T1hTh6y1frU4EnUNOjj3OzQGmzMFxKmxsUyb7l03vwzNH3cJ+XgJVQYu3XRfWRtHpNT84cFJCBlDMK/mn2eXcHbZ+HMOK5gHQdhHzteQ/KGhUP9kADVcQqACeufjxeSWeMC12hP8P7LGnibY3cc0O/rFRv7zfQ3p02FJk50JLobBb2CC0EL45c1QALZuw/QoOp1AqULLKBd94KB/vBV38vxt5a8CHedwCt6gy8io1UHuQnynUO2xSrQB2354XFcDz+q9+rai9uKsiVT+QcJ/EW79x/PuAbL/Rx1o/Fca2r4BOZia8vAHTbE3e0S+v5fAjE5AA== +api: eJzdVU1v40YM/SsDnrqA1k6DnnSq26SJsS0aJG4vjmEwI1qaXWlGO0MFdQX99wVH8lcsB9trT5ZHj2/Ix0eqBcY8QLqE+6ZC+/H2FcsG2TgbYJVARkF7U8t/SOE3Yl0oLkgF7Twpt1GoQk3abIxWtA9VQZNFb9zk2T7bmc9D+myVUkeQ9Q6yNlmqFgWp+Y3wCfkIkWKnNnJ7ZHwkbrzdkd4YLVj0W6WdZTTW2HzIcoie3yi0mTIc+swnkICrycdL5hmkkBOvx7KL8LV3DZNfFyLRESyMhowemmw9cOXEkECNHiti8qJ9CxYrghTGIyEBI/LXyAUk4OlrYzxlkLJvKIGgC6oQ0hZ4WwtLYG9sDgmw4VIODk1VT3tJMui6lbCF2tlAQQiur67k57TrT43WFMKmKdXjAIYERGqyLHCs69LoyD/9HCSmPU/KvXwmLZVjlpnYr/LBSw/Y9HefJt8dst9dqu6I1VgpT9GMj7FHKtr4CBZGQ0YP55kauO6Ioeu6LoGfrq/PFfkbS5P1wbfeO/9f5KhPis6I0ZTyZJiqcA4onT55i3b75yZa5q1e+xNjmXLy0K1ExP4MvcftkSN+d32ConMV8vfM8weFgDnBnuwdn4kYaiFvu8Pd+84fjLuMdfVXD7jVgeYgb6/u5TJuevnGLttB7heLhzPCvrcVceGG4Y8jyQWkMI1T/vFoyqcjYzltx2e1m8YphwQC+dfdeDe+hBQK5jqk06kuXZNNMCfLOEEzxdrA21U7i2/VrwIFmdNAuvGGt5Fv9jD/RNt7wow8pMvVMeBJrNab5xS27xvW5hOJjMPWmTVcOG/+7R0xLJuijxKdjN24GD5IOuT2C+ovZGU7SZ192leTHydXl4oZAtTsYT5MDOo4Mbs8IgySN3LthYIEqIrjAkxY/Xx4IVnWLnCF9ojve/bF21zbwyT/vz53Q++Z/uFpXaKJox+FbgfnL+HM+aL4eQ2QQHrxS9Xbf5VA4QILadu+YKC/fNl1cvy1IS8mXiXwit7gi1hq2UJmgjxnkG6wDPROW354HPbIB3Wprp3RrbhcMpV/kMAX2l7+ysZ9Wexmqh3AM62p5iOas/Uuw7dfJXe3C+i6b5V/R48= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Evaluation Scenario Score Router"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Fetch the score of a specific evaluation scenario. Args: - evaluation_scenario_id: The ID of the evaluation scenario to fetch. +evaluation_scenario_id: The ID of the evaluation scenario to fetch. Returns: - Dictionary containing the scenario ID and its score. +Dictionary containing the scenario ID and its score. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Evaluation Scenario Score Router Human Evaluations Evaluation Scenario Evaluation Scenario Id Score Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_scenario_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Scenario Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"string"} + qualifierMessage={undefined} + schema={{ type: "string" }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={"{}"} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-evaluator-config-evaluators-configs-evaluator-config-id-get.api.mdx b/docs/docs/reference/api/get-evaluator-config-evaluators-configs-evaluator-config-id-get.api.mdx index 4afc7ecf0e..34391cf2e0 100644 --- a/docs/docs/reference/api/get-evaluator-config-evaluators-configs-evaluator-config-id-get.api.mdx +++ b/docs/docs/reference/api/get-evaluator-config-evaluators-configs-evaluator-config-id-get.api.mdx @@ -5,70 +5,299 @@ description: "Endpoint to fetch evaluator configurations for a specific app." sidebar_label: "Get Evaluator Config" hide_title: true hide_table_of_contents: true -api: eJzNVk2P2zYQ/SvEnFpAsLeLnHSqmyySxSapsbvJxWsYXGkkMZFIhhwt6gr678WQsi3ZXjfoqScb5JuvN2+G6oBk6SFdwc2LrFtJxnlYJ5Cjz5yypIyGFG50bo3SJMiIAimrBO7QIjO6UGXrJGO9KIwTUniLmSpUJqS1syf9pO+RWqd9+qSFEOKj8rTaB3wbPLz7Y52KhaiVJ2GK1wII8/wNM/IzSMBYjIe3OaRQIm32RptodDjww4nfnIJUvtmUSJCAlU42SOiYkQ60bBBSOGMACSgmxkqqIAGHP1rlMIeUXIsJ+KzCRkLaAW0tu/DklC4hAVJU88G+eBGrF7c59P2aXXlrtEfP1tdXV/wzbcZDm2XofdHW4n4AQwKZ0YSaGC6trVUWmJl/82zTjTKyjnkjFSOo/FKWnFQy0PA66jPf9wl75t5sLvtcRpSIvg/cfsftzxF2h1u29EikdOk3fBGLkXr7ZxE6J/Nccf2yXo7Kjc0ZIkQhQZ/sY+q2roF7sIv5MIQQX2OIPoHMoSTMN5IuJfs2osSC/UNr85+w+RJRwaY/znIssRUE/YWuTEg/ZnOS7SSN9Rleow6h7zn6m+vrU+F9lbXK4xTeOGfcf1ddjiRVHfRH2PhTQG2yye2hs1P6Rt1TmrBEB/36wJ50Tm5HHH80MUHuSuPLS+34hN7LMug6Qi5Ik8kQj3z7b53jumLoATfqxIHeyO7rZbyL9J0LtoN8eHxcnjiMvW2QKjNszLDzqIIU5odVOR9W5bw7s/l64NFzL7sd2boaUqiIrE/n86w2bT6TJWqSM6nm0qowUR6z1inaBpPF8vYOtx9Q5uggXa3HgAdWTNTAFLanX1p1F8Q9bOdFS5Vx6u/Y2GEvV9GKy1W6MMF8YGYRkhOL5S0kwGVEcV/NfptdwfHDNwGz2GUWxL6LHa55tiYs7OvnkWyC0oFQNr8fLjgzazw1Uo/8vUcSxy/DcU7dYej+p+/y0CjCv2hua6nCuAWGukFtq8Om8pFY1hskkJ57a9cJVMYTm3Xds/T4xdV9z8c/WnSsqXUCL9Ip+cwdXnWQK8//c0gLWXu8wOAv98N0/ipey3ynO82iC48NpAAJhAfr7MdBWEHVTt/dgFxkGVoa+TjZmDwI++l8f/MIff8PsRtW8A== +api: eJzNVk1v2zgQ/SvEnHYBwc4GPelUNw3aIO2ukaS9OIbBUGOJrUyy5CioV9B/Xwwp2/LnFnvakw3yzdebN0O1QLIMkM/g9lXWjSTrA8wzKDAorx1payCHW1M4qw0JsmKJpCqBG7RQ1ix12XjJ2CCW1gspgkOll1oJ6dzo2TybB6TGm5A/GyGE+KQDzbYBb6KH9+/muZiIWgcSdnkugLAv31BRGEEG1mE6vCsghxJpsTVaJKPdQehPwuIYpIvFokSCDJz0coWEnhlpwcgVQg4nDCADzcQ4SRVk4PFHoz0WkJNvMIOgKlxJyFugtWMXgbw2JWRAmmo+2BYvUvXiroCum7Or4KwJGNj6+uqKf/ab8dgohSEsm1o89GDIQFlDaIjh0rlaq8jM+Ftgm3aQkfPMG+kUQReXsuSksp6G86g/+b7L2DP3ZnHZ5zShRPK94/Y7rn+NsHtcs2VAIm3KsOCLVIw067+WsXOyKDTXL+vpoNzUnD5CEhJ02TamaeoauAebmI99CPE1hegyUB4lYbGQdCnZm4QSE/YPjSt+weZLQkWb7jDLocRmEPUXu7JH+iGbe9nupTE/wWvSIXQdR39zfX0svK+y1kWawlvvrf/vqiuQpK6j/ghX4RhQW7V3u+vsPn2D7mlDWKKHbr5jT3ov1wOOP9mUIHdlFcpL7fiMIcgy6jpBLkiTyRBPfPtvneO6UugeN+jEjt7E7vky3if6TgXbQD4+PU2PHKberpAq22/MuPOoghzGu1U57lfluD2x+Trg0fOvmx3Z+BpyqIhcyMdjVdumGMkSDcmR1GPpNBw+JpN4K24YGsctoGq8pnX0N5ne3eP6I8oCPeSz+RDwyHJKAtmHbXsjnb6Pyu9X96Shynr9d+p6v7SrZMVcaLO00bynrc/tnVTf0fBEcZ0p7avRH6Orc8X0BmIyveunQqo4FZs8IoyHcI+uLVE8u6s4EkAoV293F5yls4FW0gz8fUASh0/IYW7tbjr/pw943zTCnzR2tdRxLiNDbS/L2W6lhUQsCxMyyE89yvMMKhuIzdr2RQb84uuu4+MfDXrW1zyDV+m1fOFuz1oodOD/BeRLWQe8wOBvD/0Y/y7OZb7RoGEBxlcJcoAM4st28isi7qpqo/W2R06UQkcDH0erlYdiO8Yfbp+g6/4BGvRlfw== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Get Evaluator Config"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluators/configs/{evaluator_config_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Get Evaluator Config"}></Heading> +<MethodEndpoint method={"get"} path={"/evaluators/configs/{evaluator_config_id}"}></MethodEndpoint> Endpoint to fetch evaluator configurations for a specific app. Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> +List[EvaluatorConfigDB]: A list of evaluator configuration objects. +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_config_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluator Config Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluator Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "project_id": "string",\n "evaluator_key": "string",\n "settings_values": {},\n "created_at": "string",\n "updated_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-evaluator-configs-evaluators-configs-get.api.mdx b/docs/docs/reference/api/get-evaluator-configs-evaluators-configs-get.api.mdx index 5f3234bb06..1980ea48f0 100644 --- a/docs/docs/reference/api/get-evaluator-configs-evaluators-configs-get.api.mdx +++ b/docs/docs/reference/api/get-evaluator-configs-evaluators-configs-get.api.mdx @@ -5,73 +5,325 @@ description: "Endpoint to fetch evaluator configurations for a specific app." sidebar_label: "Get Evaluator Configs" hide_title: true hide_table_of_contents: true -api: eJzdVk1v2zgQ/SvEnLaAYKdBTzqttwlSI91do3F7cQyDkUYSW5lkyVFQ19B/XwwpWVI+vN3rngwM5+PNmzcjH4Fk6SHdwPWjrBtJxnnYJpCjz5yypIyGFK51bo3SJMiIAimrBPbeIjO6UGXjJPt6URgnpPAWM1WoTEhrZ/f6Xi9c6dN7LYRg007l4jdP7k0q1hWK5ZUwhaAKT+6fkBqn+4iPytPmhO99KHj1xzYVC1ErTxz8Ch5hHr5iRn4GCRiL0bjMIYUSaXcK2sUgP1j8yVQiQQJWOrlHQsdcHUHLPUIKsRVIQDFL3xt0B0jA4fdGOcwhLWTtMQGfVbiXkB5B6sPfRchAB8sZPDmlS2iTk0U3dQ3tNgFSVLNhYa1Y5tCyzaG3Rnv0nOzy4oJ/pqO6a7IMvS+aWnzqnCGBzGhCTQGCtbXKAhHzr55jjiOAHQjpnORWFOE+1LKO6SMVK6t85Nu1MABmsElH0etef/F7m3BmHtHufM5V9BIx9zC4b3g4F3YSjbjFA0d6JFK69Dt+iM0MM5F5rpgXWa9G7ZJrMOkrRD2dndddV0J8iSXaBDKHkjDfSToH9n30EgvOD43NfyHmc/QKMe1TlGMpbiAINUxlQvpTNidoJzC2L/Aal5Hx9k+96sQNkhj4j45+sPiT6QYZPMN/d3n5XNFfZK3yuM3Xzhn3X+Q8lW2OJFUdBPyyrmuTTV5/YV2VJizRQbsd6O+3p6fko4kAmaa9L8/N80/0XpZhMaLLGW0zGWLNr/82eu4rlu78RqMc6I3svt7GVaTvpWK9y4f1evUsYZztHqky3eUNB5UqSGE+XNx5d3GBt9Q99qe2cTWkUBFZn87nWW2afCZL1CRnUs2lVWH5PGaNU3QIIYvV8hYPH1Dm6CDdbMcOd6yNOO2p23D7rLoNe9Ad+UVDlXHqZxxhd+urGMWNKV2YEN7f6wBOLFZLSIDbiDK+mL2dXcDTL+vEmWUtsyDrvnZ45jWcsHDqn7d3HzQNhHL/+/DAyKzxtJd6lO/FnXwK6jjs1//jy98NlvAHzW0tVVjEwOix0+FmOII+DiIQs02gMp74/Xh8kB4/u7pt2Ry/9Sy2XHn5UI++9uGTNPw1CB8aSCHI9FE6xd5BlUmvIk4ToxZZhpZGUc/OG2c5rdLN9Rra9h/3llyW +api: eJzdVsFu2zgQ/RViTi0g2NlgTzqtmwSpke6ukbi9OIbBUGOJrUyy5ChYr6F/L4aULDuJve11TwbIN5w3b96MvAOSZYB8ATfPsm4kWR9gmUGBQXntSFsDOdyYwlltSJAVayRVCezRQlmz1mXjJWODWFsvpAgOlV5rJaRzo0fzaCa+DPmjEULw0UoX4l0g/z4X8wrF9FrYtaAK9/B7pMabPuKTDrTY87uKCa8/LHMxEbUOxMEn+Aj79BUVhRFkYB2mw2kBOZRIq33QKgWF4STsj0okyMBJLzdI6FmrHRi5QcghlQIZaFbpe4N+Cxl4/N5ojwXk5BvMIKgKNxLyHdDWcVggr00JGZCmmg8mzolpAW275OjgrAkYOODy4oJ/jrvx0CiFIaybWtx3YMhAWUNoiOHSuVqrWOv4a+CY3WsS0nvJbDXhJuZynhUinTLr4hxhJpt1KpxG/cX3bcYvcxdW59+cJZRIbw+9+Ybbc2F7X4g73HJkQCJtyrDii1SMNNu/17Fxsig06yLr2UG5qU9dhmQZaLN9TtPUNXBv+pwPXQrxJaVoM1AeJWGxknSO7FVCiQm/D40rfiLmc0LFmPYly0O3LSB6MXblSPSXah6xPaKxfEPXNG/Mt7/qXSdukcSgfwKG4STsj26RyTP93y8vXzv6i6x1kQb2xnvrf8XOx7YtkKSuo4Hf9nVt1dHtYI1j/Q/arw1hiR7a5SB/Pz29JJ9sIsgybUJ5rp9/YgiyjIORIGe8zWKIOd/+V+u5rpS6wx20cpA3qXu6jOsk31vJesjH+Xz26sHU2w1SZbvlGncmVZDDeFiq426pAk+pf+63aeNryKEiciEfj1Vtm2IkSzQkR1KPpdPw8oM0ibfiiqFxMgOqxmvaxvcms+kdbj+iLNBDvlgeAh7YOMkKx7BhMTp9F4ekW/KThirr9b+pv92ur1IUV63N2sbwfpknbh+k+oaGh4/rTLQvRr+NLk4V0wWIyWza+V+q6P+eR4TxvB7JtReKx3wTzQ+EcvPHcMEsnQ20kebgvTeH9yW53TCI/49/AV2TCf+hsauljhMbFd11hl0M2zKkRkRhlhlUNhDf73ZPMuBnX7ctH6fvPhuv0EE+1TyQa1kHPKPlu/tudt+LU6Tid2/4ixG/ZpBDtPuz9JozRXdnvRuZQoqaKIWODqJe7VB+ZT+vtzdzaNsfLvt1uQ== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Get Evaluator Configs"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluators/configs"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Get Evaluator Configs"}></Heading> +<MethodEndpoint method={"get"} path={"/evaluators/configs"}></MethodEndpoint> Endpoint to fetch evaluator configurations for a specific app. Args: - app_id (str): The ID of the app. +app_id (str): The ID of the app. Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"},"title":"Response Get Evaluator Configs Evaluators Configs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> +List[EvaluatorConfigDB]: A list of evaluator configuration objects. +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluator Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "name": "string",\n "project_id": "string",\n "evaluator_key": "string",\n "settings_values": {},\n "created_at": "string",\n "updated_at": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-evaluators-endpoint-evaluators-get.api.mdx b/docs/docs/reference/api/get-evaluators-endpoint-evaluators-get.api.mdx index bff073893a..8214bc6bdc 100644 --- a/docs/docs/reference/api/get-evaluators-endpoint-evaluators-get.api.mdx +++ b/docs/docs/reference/api/get-evaluators-endpoint-evaluators-get.api.mdx @@ -5,62 +5,271 @@ description: "Endpoint to fetch a list of evaluators." sidebar_label: "Get Evaluators Endpoint" hide_title: true hide_table_of_contents: true -api: eJy9VU1v2zAM/SsCz0KS7ejTAqzoihRr0Y9TGgSMzcRqZUmV6GJe4P8+SHYcJ+162GG+2KDIp8ePR++BcRcgW8LFG+oa2foAKwkFhdwrx8oayODCFM4qw4Kt2BLnpUChVWBht4KGuMmTeTJ3xLU3IXsyQghxrQIvB+RVJubv44TdPFPOYQISrCOP8dKrAjLYEa+P8GvqWYxtO2KQ4Ck4awIFyPbwdTaLr9MM7us8pxC2tRZ3vTNIyK1hMhzd0Tmt8nT39DnEmD2EvKQK45diqhK485Eiq+4qgxXFNzeOIIPAXpkdSGDFOhp+xvNWwgs1n7ktqIlehfKU87oOY8yNtZrQjLy/JzfxGBJ0IGZldmHNVDmNnGKxKFTMBPXtiC/7muQBtyv6CPa+BxIPB6D2bAz2gKa52UK2PE+llYPF1FpDuxrRHUG0EmwIHyId8vwM6iYEiJy2WGuGbIs6UBu7/1orT2GtdbVGp9Yv1Pz7JXc9mrjWlZg7JRYR7YNrO+GMZuO8JgcDeo/NqNIPMbBt37eiT6SIckyj1U3OyWR81PGeyyiJa9ph3gzC+4TMQQ3iklgcd4AYJD+yXRJDGx8JFXFpe42CBIdcQgbTozITUf9GPqQG1F5DBiWzC9l0mmtbFxPckWGcoJqiU6kHgfLaK25SyPz2akHND8KCPGTL1djhPiqz0+Cp29AFdGqRatdpFOY1l9ar30nhIEHFrVB2UTEhZbY2hfd1mSdyYn57BRJiGt0emU2+TGZwvh9PnONSwZyP+6E/BnlWhSF/kEAVqnjGhNW340Fk5mzgCs0I7y+tOqe1P+63/7fB+/Iz/eKp06iS6FPe+35KlkAnv5rSBo7W/X6DgR69bttofq3Jx0FYSXhDr3AT27JctfLQtTgjabHCPM/JxfQjbtf8s2UeZ2cY2cuLB2jbPxsiaS0= +api: eJy9VU1v2zAM/SsCz0LS7ejTsq3oihRr0XanNAgYm4nVypIq0cUyw/99kOw4Tvpx2GG+2KDIp8ePRzfAuA2QLeD8BXWNbH2ApYSCQu6VY2UNZHBuCmeVYcFWbIjzUqDQKrCwG0FD3OTBPJhb4tqbkD0YIYS4UoEXA/IyE7PXccKuHynnMAEJ1pHHeOllARlsiVcH+BX1LMa2LTFI8BScNYECZA18PjuLr+MM7uo8pxA2tRa3vTNIyK1hMhzd0Tmt8nT39DHEmAZCXlKF8UsxVQnc+UiRVXeVwYrim3eOIIPAXpktSGDFOhp+xvNWwhPtPnKb0y56FcpTzqs6jDHX1mpCM/L+ntzEr5CgAzErsw0rpspp5BSLRaFiJqhvRnzZ1yT3uF3RR7B3PZC43wO1J2PQAJrd9QayxWkqrRwsptYa2uWI7giilWBDeBNpn+dHUNchQOS0wVozZBvUgdrY/edaeQorrasVOrV6ot2/X3Lbo4krXYmZU2Ie0d64thPOaDZOa7I3oPe4G1X6Pga27etW9IkUUY5ptLrJOZqMtzrecxklMUjuAxp7HYgLYnFQvxjEPrJdEEMbHwkVcWl7dYIEh1xCBtODJhNF/0I+pNLXXkMGJbML2XSaa1sXE9ySYZygmqJTcLptZulUfIuuqTWB8tor3iW82c3lnHY/CAvykC2WY4e7KNhOmsduQ3PQqXkqaSddmNVcWq/+JOGDBBUJlF1UzFaZjU3hfdF6bl8xfyJTgISYZ0f7bPJpcvZeMn2AmN1c9nsHcz6skN4N5Em5hkKBBKpQxTMmrL4cDiJLZwNXaEZ47/T0lF5zWIH/b8n3rWD6zVOnUaW9kPJu+nFaAB39jUobOFqbZo2BfnndttH8XJOPQ7GU8IJe4Tq2aLFs5b6DcV7S7oVZnpOL6UfcbhBO9n2co2G2L87voW3/AqNKdWc= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Evaluators Endpoint"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/evaluators"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/evaluators"}></MethodEndpoint> Endpoint to fetch a list of evaluators. Returns: - List[Evaluator]: A list of evaluator objects. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"},"direct_use":{"type":"boolean","title":"Direct Use"},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","key","direct_use","settings_template","tags"],"title":"LegacyEvaluator"},"type":"array","title":"Response Get Evaluators Endpoint Evaluators Get"}}}}}} -> - -</StatusCodes> - +List[Evaluator]: A list of evaluator objects. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Key" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"direct_use"} + required={true} + schemaName={"Direct Use (boolean)"} + qualifierMessage={undefined} + schema={{ type: "boolean", title: "Direct Use" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + settings_template + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Settings Template", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>oss</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>requires_llm_api_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"tags"} + required={true} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Tags", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "name": "string",\n "key": "string",\n "direct_use": true,\n "settings_template": {},\n "description": "string",\n "oss": true,\n "requires_llm_api_keys": true,\n "tags": [\n "string"\n ]\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-own-org.api.mdx b/docs/docs/reference/api/get-own-org.api.mdx index a609a250b7..c1c74e3a8c 100644 --- a/docs/docs/reference/api/get-own-org.api.mdx +++ b/docs/docs/reference/api/get-own-org.api.mdx @@ -5,59 +5,97 @@ description: "Get User Organization" sidebar_label: "Get User Organization" hide_title: true hide_table_of_contents: true -api: eJx9U8tu2zAQ/BVjzoTl9qhTfShSI0ATNM3JEAKa2lhMJZIhl05dQf9erOQ30OogCdoZ7s7MqocPFDVb71Y1SmyJX/yHe/FxC4VIKXiXKKHs8XmxkEdNyUQbhIEST9kYSuk1t7MfBzAUjHdMjgWuQ2itGRsUb0k4PZJpqNPyFqK0Zzt1sLXceR8IJRJH62QIttzKh1WNQcHpjv6H+i71YVBHgN+8keFRy3u2kWqUa2l0OKk6Mx/iVjv7Zxz1IXPIjEEudSP5jnj2nCjOLglQ6Igbf/AQCkFzgxKFv0Clwn8INFHcUUwo1z1ybFGiYQ6pLArT+lzP9ZYc67m2hQ4WQyUMk6Pl/UhZPq7uaf+NdE0R5bq6BDyJt5Od17CTZTrYe9ofDSixzNz4eNZhRWQzsUS9da9+pB98Wo7DzZaPKyiIjMmWxfzTfIFbs67AshbajGtx7D2WoW5cOOmHAnXaSo1Jd1/OBZks+MSddhfn/Subq6FOTjD95iK02jrZrHGE/pDbGle5QUGSqxQan1jKfb/RiZ5jOwzy+T1TlHAqhZ2OVm/EqnU1qKOTktsv2otmYyjIhux0m6dAbn4RyfO0TXdff2IY/gLwUT55 +api: eJx9U01v2zAM/SsBz0Kc7ajTsmHoggJrsa6nwCgYmY3V2pIqUekyw/99oO18Ap0PtiE+ko/vUR34QBHZereqQMOW+Mm/uycft6AgUgreJUqgO/i8WMinomSiDZIBGh6yMZTSc25mvyYwKDDeMTkWOIbQWDM0KF6S5HSQTE0tyl+I0p7t2MFW8uZ9INCQOFonJNhyIwerCnoFDlv6H+qnxPteHQB+80KGh1neso1UgV5Lo6lSecq8i1t09u9A9S5zyAy9POpq5Bvi2WOiODtPAAUtce0nDUFBQK5BQ+HPUKnw7wJNFHcUE+h1Bzk2oKFmDkkXhWl8rua4Jcc4R1tgsHBNYDlEZ98ECn0p5UyOlvdDveX96pb2PwgriqDX5TngQYQftb6EHfXEYG9pf1BHwzJz7eNpSCsE6jFLpLHu2Q/pk4gTt69oXsmJyjLnSHsx/zRffDTMlDBb3q+m/UEz7M+BxwADdSXXUShQQC1aiTFh++UUEJbBJ27RndX7yMQLckdVmP5wERq0TlZwoNBNBq/hwmBQIBaXCmqfWMJdt8FEj7Hpezl+yxTFqFLBDqPFjci2Lnt1UFU8fKW9zGwMBVmlHTZ5NOfqLom3x7W7+f4b+v4fYDlNCA== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get User Organization"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/organizations/own"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/organizations/own"}></MethodEndpoint> Get User Organization -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrganizationOutput"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-projects.api.mdx b/docs/docs/reference/api/get-projects.api.mdx index 65bc6d3b68..aaf6ac0850 100644 --- a/docs/docs/reference/api/get-projects.api.mdx +++ b/docs/docs/reference/api/get-projects.api.mdx @@ -5,59 +5,304 @@ description: "Get Projects" sidebar_label: "Get Projects" hide_title: true hide_table_of_contents: true -api: eJytVE1v2zAM/SsGz0KS7ejTAmzoggJr0a7YIQgCRmZitbak6qNbZvi/D5Q/knhFMWzLxYFEPr73SKqBgAcP+RrupbHkYSPAWHIYlNGrAnI4UNhaZx5JBg8CHHlrtCcPeQPvFwv+FOSlU5ZTIIf7KCV5v49VdtcHgwBpdCAdOBytrZRMFeaPnnMa8LKkGvmfClQncOuYSFBdKeMOqNXPlLVVRcLRx5s95OsGwtES5OCDU/oAAvbG1RgghxhVAa0YI3SsKmg3AoIKFR/cnMFmK469rKSxprdq/TH2FwZqBXw37slblPQfRXwbMHsFpxr/Qv+EOnDvx6Bn/jbfE85tl9VzGzAGZlOUadZQO3pyW2eqv5bz4MlldwzQClB+W1BtXsXaGVMR6jfBVj77yPltK4YYs2O+aUOeo3JU8FKdOTaRvvlNqh+35QSKzuHxzJUhJLuikA150PJPTNbwIkJATaE0/T4zFwwl5DA/22xP7oWcT1ZEV0EOZQjW5/O5rEwsZnggHXCGao5WJTc8yehUOKaU5e3qmo6fCQtykK835wH3vN3dHl+GjQ6jVdfESru5gGUMpXH98oAAxZLKLou1Kr1P3RuMWSZy2fJ2BQJYRmfCYvZutoCpNRfB/DChTA/TUDtdg5i4MOoHAVSj4rtAWH84XTAza3yoUZ/hTTpxwWU0INCPMLcVKp2mnSs3fZfGMUqvc2l84LOm2aGnB1e1LR8/R3LciI2AF3QKd2zLetOKwTXu0RMdWZ+UZHkIXrCKnfmTB5l7Nw7M1aev0La/AIODGsY= +api: eJytVE2P2jAQ/SvRnC2gPeZU+qEtWqmLlq56QAgNzkC8JLbXdralUf57Nc4HkLarqi2XIPvNmzdvZlxDwIOHdA0raSx52AgwlhwGZfQigxQOFLbWmUeSwYMAR94a7clDWsPr2Yw/GXnplOUQSGFVSUne76siue/AIEAaHUgHhqO1hZIxw/TRc0wNXuZUIv9TgcpIbh0LCapNZdwBtfoeo7Yqizz6dLeHdF1DOFmCFHxwSh9AwN64EgOkUFUqg0YMCF0VBTQbAUGFgg/uLmiTBWOvM2ks6aVcf8z9iYkaAV+NO3qLkv5jEV96zq6Cc45/kX9m7bV3Y9Apf1nvmWfZRnXaeo5e2ZhlHNXnrjy5rTPFX5fz4Mkl90zQCFB+m1Fpfsm1M6Yg1C+SLXzynuObRvQYs2O9cUOeKuUo46W6cGxU+uanUv2wLWdSdA5PF670kOSGQtLHQcM/MVrDK4SAkkJuun1mLRhySGF6sdme3DM5H62oXAEp5CFYn06nsjBVNsED6YATVFO0Csbp5vE2ecfQaJUnWTkVTpFvvlzc0ukjYUYO0vXmErDi1W+X/Bo22I9W3RLb0A4NzKuQG9dtFghQLCBvo9gIpfextb1rnba3KI+kuRNcZyt7Nnk1mf2umC4gmS8X3QuGMr5gvY4IAzGyazAKBFCJiu8CYfnmfMEqrfGhRH3BN2rZlabBjEDfwtQWqHRcC85cd+0c5i0+47nxgc/qeoeeHlzRNHz8VJHjpmwEPKNTuGOL1ptG9A5yv4504vqkJMvT8oxF1TZi9HJzH4fJuvnwGZrmB0NmKVU= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Projects"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/projects"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/projects"}></MethodEndpoint> Get Projects -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Project Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_name"} + required={true} + schemaName={"Project Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>user_role</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_demo</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "organization_name": "string",\n "workspace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "workspace_name": "string",\n "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "project_name": "string",\n "user_role": "string",\n "is_demo": true\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-single-testset.api.mdx b/docs/docs/reference/api/get-single-testset.api.mdx index 0f30ce6838..f4f7ac966b 100644 --- a/docs/docs/reference/api/get-single-testset.api.mdx +++ b/docs/docs/reference/api/get-single-testset.api.mdx @@ -5,73 +5,295 @@ description: "Fetch a specific testset in Postgres." sidebar_label: "Get Single Testset" hide_title: true hide_table_of_contents: true -api: eJzVVMFu2zAM/RWBpw4Qkq7YyacFWLcV27CizXZJg0K1aVubLbkiXTQz/O8DZTtO1rXAjjvFkR6fyMdHdsCmIEg2sEZiQibYasiQ0mAbtt5BAu+R01IZRQ2mNrep4gGqrFOXnrgISIsbd+NWoaDkximlJsitzdQJcXiVqHWJymbK54pL3FOwV7nQx/gr5Da4iUICAt63SIzZ/Gauct+6TCusCJVx6uN6fXn+mGJMdwEafIPByJ+LDBIokG/JuqLC25EDNDQmmBoZg5TegTM1QgJz0qDBSumN4RI0SBo2YAYJhxY1UFpibSDpgHeNRBIH6wrQwJYrORjVVBcZ9P1WGKjxjpAk6Oz0VH6OVb5u0xSJ8rZSVyMYNKTeMToWuGmayqaxsOUPkphuTqTv+17Dm7Ozp8TfTWWzGKbOQ/DhH1ihCSIm2yHvDNnYSr4sY01PAZVPj26N233No8LHOvV6f2IdY4EB+m2vpzMTgtkdiPnZDwlCr6Gm4iXdvyCRKRD2ZM9DoxhqLbf9/La/+4EpH/V8E+sanh5x25lmlndQ9/ky3g3y/e2xCSJefkI49LZGLv1o6OhgLiGB5ehZWnaze3vQQBgeJnu3oYIESuaGkuUyrXybLUyBjs3C2KVpLIhFCdM2WN7FkNXlxSfcfUSTYYBksz0EXIs9hoYfw/Zam8Z+Qil9HKxVy6UP9tfQxXG2yiFKarMu9zF8lGEVk1OrywvQIGUMTj5dvF6cwp/r6QgszjZpdPb0drwG/YcK+/pBA9bR1sBo6rfzhWTWeOLauAO+D8jqOu4Ttd7vk6OMunm+/rvdOTaQ8ZGXTWVsnLmoXDdabjOtSQINycHK3GooPbEguu7OEH4LVd/L8X2LQWy11fBggjV30uRNB5kl+c4gyU1F+IKMJ1fjNL5SzyU5Wc+J7x5M1co/0PATd8erPW6acnJ2NwJWqahwEPpkMcoI7Ifww/ka+v43SC97gA== +api: eJzVVcFu3DYQ/RViTglA7LpGTzplm7qJkRY17G0u64VBUyOJiUQqnJGRjaB/D4aSVrtxHaDHniSRbx5nHt+MemBTEmQ72CIxIRPsNeRINrqWXfCQwR/ItlJGUYvWFc4qHqHKeXUTiMuItLr3934TS8ruvVJqhjy4XL0ijq8zta1QuVyFQnGFRwoOqhD6FH+L3EU/U0hAxC8dEmO+nFmoInQ+1wprQmW8er/d3lx9tZjSXYGG0GI08nGdQwYl8gM5X9b4MHGAhtZE0yBjlNJ78KZByGBJGjQ4Kb01XIEGScNFzCHj2KEGshU2BrIe+NBKJHF0vgQN7LiWhUlNdZ3DMOyFgdrgCUmCLi8u5HGu8l1nLRIVXa1uJzBosMEzeha4adva2VTY+hNJTL8kMgzDoOHXy8vnxB9N7fIUpq5iDPE/sEIbRUx2Y945snG1vDnGhp4D6mDPdo0//F0khc91GvRxxXnGEiMM+0HPayZGczgR888wJgiDhobKn+n+FxKZEuFI9jI0iaG2sjssZ4fHT2j57M53qa7x6Am3X2gWeUd1Xy7j91G+fztshoiXnxGOd9sgV2EydHIwV5DBevIsrfvFvQNoIIxPs727WEMGFXNL2Xpt69DlK1OiZ7Mybm1aBz+2/CbtqrcCBfEvoe2i40Pi29xcf8DDezQ5Rsh2+1PAnXhndMM57HgRpnUfUHSZum7TcRWi+zZe8dR41RglhTtfhBQ+aTTl9puxn9FLp0qdY9oXq19WFy8VMwWozc311ALGphaY80gw0D/IdRQKNGCT/A+MpnmzbEiWbSBujD/he4es7tLgUdvj4DnLrF8a8X83ZKfLZPzK67Y2LjVnUq6fvLmb5ymBhuxktu41VIFYEH3/aAj/ifUwyPKXDqNYbK/hyURnHuXCdz3kjuQ9h6wwNeFPZHx1O7Xta/VSkrMNvXjwydSdfIGGz3g4/wekkVTNLu8nwMaKCiehzyaotMOxW99dbWEYvgMSJooP sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Single Testset"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/testsets/{testset_id}"}></MethodEndpoint> Fetch a specific testset in Postgres. Args: - testset_id (str): The id of the testset to fetch. +testset_id (str): The id of the testset to fetch. Returns: - The requested testset if found, else an HTTPException. +The requested testset if found, else an HTTPException. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","title":"Testset Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { type: "string", title: "Testset Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-testsets.api.mdx b/docs/docs/reference/api/get-testsets.api.mdx index 6790f5ef5a..9121891458 100644 --- a/docs/docs/reference/api/get-testsets.api.mdx +++ b/docs/docs/reference/api/get-testsets.api.mdx @@ -5,65 +5,144 @@ description: "Get all testsets." sidebar_label: "Get Testsets" hide_title: true hide_table_of_contents: true -api: eJzNVE1PGzEQ/SvWnN0kVJz21KhCECG1CMIpRDDsTrKmG9vYY0q62v9ezX4kWQ6ox+7FK897no/37BoYtxGyFSwpciSOsNZQUMyD8WychQwuiRVWleIeMXmwD/aWOAUbswf7Rc1VZSIrtxkgyj2/UD4g0UTqgE9Xy+XNxXtO7dFP6rfhUkVGTlHlriB1PjtXZqOsOyRTGEhtXLLFBDQ4TwGFuygggy3x44ADDYGidzZShKyGr7OZLONO7lKeU4ybVKnbHgwacmeZLAscva9M3maYvkTh1BDzknYof4Zp1x7ugxTCpkv1aApZeO8JMogcjN2CBjZcycaigEaDxR19hvoh8UZDHgiZikfkz9DfO5Sas3CSL/6Bc9+hWk6jB1inVDu912QCFeIF6agveVTRKNX6eLR45474Z2Kf+DDZYxIMAfcnpQwQJdY6GK+RT8OOuHS9vKDBI5eQwfRE6EjhjYK4toYUKsigZPYxm07zyqVigluyjBM0U/QGmrUw8hQM71vK/GZxTfsrwoICZKv1KeBOxO5kHcMOc0Vvrmk/jCeDeeLSBfOnNQ1oMGK0smNJO8ZuXEvve5+3xan5zQI0SBudNWeTs8kMPl69EVh8inmr8ZC7DYssoykc+gcNtEMjMSbcfTsGpDLvIu/Qnpw3kuNDLfXxnvxPL0KvCtM7T32FxrYXQsZR99ZZAZ88baWLLHt1/YyR7kPVNLL9miiIO9Ya3jAYfBatVutGD1KKcX7RXoaeS7UiHlapc8SHR0MMdXDx5cUSmuYvFW3aMA== +api: eJzNVE1PGzEQ/SvWnLdJqDjtqSlCECG1CMIpRDB4J1nDxjb2mJKu9r9Xsx/5QCrqsXvxyn4z82bes2tgXEfIFzCnyJE4wjKDgqIOxrNxFnK4IFZYVYp7xOje3tsb4hRszO/tFzVVlYms3GqAKPf0THpAoonUAR8v5/Pr83dNbepH9ctwqSIjp6i0K0idTk6VWSnrdsUUBlIrl2wxggycp4ASOysghzXxw4CDDAJF72ykCHkNXycTWY47uU1aU4yrVKmbHgwZaGeZLAscva+MbiuMn6PE1BB1SRuUP8O0aZP7IETYdKUeTCELbz1BDpGDsWvIgA1XsjEroMnA4oY+Q/2Q8yYDHQiZigfkz9BnHUpNWWKSL/4h5q5DtTFNNsA6pdrpvSYTqBAvSEc95SNGR6WW+9TinVvin4l94t1k90UwBNweUBkgSqy1M14jXwYb4tL18kIGHrmEHMYHQkcKbxTEtTWkUEEOJbOP+XisK5eKEa7JMo7QjNEb+GjnaXuqzgQKzVLS6RQMb9t80+vZFW0vCQsKkC+Wh4BbcUKn+TFsN3T05oq2w+xymCYuXTC/W0dBBkYIlF2U9GrsyrXh/WB6bt9Rv5AVDaTPjvZkdDKa/K2ZPkBNr2e9oVG3Zhh4tDDR72hcu0FBBrRBI2dMuPm2PxCW3kXeoD3Id6TbB071/kL9T09HrxDTO499hca2N0fGUfceWwAfvIGliyx7df2Eke5C1TSy/ZooiFOWGbxhMPgkui2WTTbIKiZ6oa0MXQtbERGr1Lnjw+si5trZ/eJ8Dk3zB3r16L8= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Testsets"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/testsets"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/testsets"}></MethodEndpoint> Get all testsets. Returns: + - A list of testset objects. Raises: -- `HTTPException` with status code 404 if no testsets are found. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"_id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["_id","name","created_at","updated_at"],"title":"TestSetOutputResponse"},"type":"array","title":"Response Get Testsets"}}}}}} -> - -</StatusCodes> +- `HTTPException` with status code 404 if no testsets are found. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"_id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-variant-by-env.api.mdx b/docs/docs/reference/api/get-variant-by-env.api.mdx index 9ff0b6e622..54ba4f898b 100644 --- a/docs/docs/reference/api/get-variant-by-env.api.mdx +++ b/docs/docs/reference/api/get-variant-by-env.api.mdx @@ -5,77 +5,575 @@ description: "Retrieve the app variant based on the provided app_id and environm sidebar_label: "Get Variant By Env" hide_title: true hide_table_of_contents: true -api: eJztVk1vGzcQ/SvEnGJgIalGelmgQOXESIQ0jeHY7sEWBHp3pGWyIhmSq2Yj7H8vhlxKXH/IgY1eip4sL9+8NzOcD27B8ZWF/BqmWluYZ1CiLYzQTigJOZyjMwI3yFyFjGvNNtwILh275RZLpqQ/0EZtRIklIRaiZFyWDOVGGCXXKN3oRt7IqVnZ/EYyxiLqlXXmKGcXFbLZW6aWOw2nmEl1o+ZSmVFgSMhTmvRzwhftE17v0jkXFqNT7y8uzk6/F+gjz9nsvrmwTCryopHeee4auyhUib/9OpkcZUwZJpaMsyteN3hqDP1vmSGRO/jXKV62TLkKDcOo/pgZyQTH0TVGRs+nWl8FF8/RaiUthmzEWMs0ihFkoDQaTkKzEnJYoVv0h4vbdoFyAxlobvgaHRqqjS1IvkbIIVwcZCCoNr41aFrIwOC3RhgsIXemwQxsUeGaQ74F12oys84IuYIMnHA1fZhqzWYldF22o06u7uX8pwlZ182JIiTGktXxZEJ/hoX+uSkKtHbZ1CxmETIolHREkm8p9loUPm3jL5Zstokn2lBSnQgKfZ5+IgOZx4YcHEb/SZgug3hVh/n7gug1os1TOtEqammjvmDxlNZZQPVaNBieFDrhFncq3uKwhMcH/kLJpVg9qfDGw3YajRH+YmT7aekremhHhdh/kU1dA9VMZLo0ghgMboQV4d57qJAOV2gS1fMIIkcNcoflgrvnKr8JDGzqfAi6fCHfZWDo+daqFEuBJTV9yP5zOD/2LOyk7S9ImRWX4ofvlBcQf0poeua/lflqNS/wBbR/RY5+AEWguqUaHkyb6/282zXpoP/uNNagX9JG2Jf4sHyTopoPmv3OOF9A15Grr4+P7w+uK16LMmTJ75znT60SHRc1/RIO1/Y+oFbF4PQn8h9bpJvvU82N4W3SNH+o4KAvSrs61NUf0Vq+8h0dIAd2gF/AF3T61DVTXEG6x83TkRjTG7L7eBhvQ/oeEosQemPcIwx3u0ZXqX4d+/3rKshhzLW24wc3tEWzieu5MTXkUDmnbT4eF7VqyhFfoXR8xMWYa+FbwGLRGOFabzI9m33A9j3yEg3k1/MU8JkKJFz5ELbLNtfiA1Lw/faeNq5Spu/WuL+rYEXRCblU3jzWuHeOTc9m1ERowmCFyeiX0QTuvkEHYKptXvjajtr+GLI7WdjFDxng2hc2OOTr3/cH5JlW1q25TPjeoWNxEZ607NRne+DRdt9h/z+Q/4sP5L7KHX53Y11zIcMTws/G0Jl+N1jIHno9zzOolHUE2m6pDC5N3XX0Obxoqf1KYfltTeNnyWuLBwrs1Xk/qY7YY559xTZ9nG8ovZCDn8P/gtDwqb5Xm/f78JZa/JoGfhXHy7Y3nRZ0g4nVvf1ELLtZ+O70ArruHwciA0I= +api: eJztVk1vGzcQ/SvEnGJgIalGelmgQGXHSIQ0jeHI7sEWBHp3JDFekQzJVbMR9r8Xww9p1x9yYKOXoifLy5n3hjPzZrgFx5cW8msYa21hlkGJtjBCO6Ek5HCBzgjcIHMrZFxrtuFGcOnYLbdYMiX9gTZqI0osyWIuSsZlyVBuhFFyjdINbuSNHJulzW8kYyxZvbHOHOVsukI2ecfUYsfhFDNd3sS5UGYQEDrgXZju5w5e8u/g+pAuuLCYgvownZ6ffS/Q3zxnk4fuwjKpKIpa+uC5q+28UCX+9utodJQxZZhYMM6ueFXjmTH0v2WGSO7Zv+3ay4Ypt0LDMLE/5UY0IXB0tZEp8rHWVyHEC7RaSYshG+muZfcWA8hAaTSciCYl5LBEN4+H89tmjnIDGWhu+BodGuqNLUi+RsghFA4yENQb32o0DWRg8FstDJaQO1NjBrZY4ZpDvgXXaHKzzgi5hAyccBV9GGvNJiW0bbaD7pTu9fhnHbC2nRFESIwlr+PRiP70G/1LXRRo7aKuWMoiZFAo6Qgk39LdK1H4tA2/WvLZdiLRhpLqRGCIefqJDGTeNuTgsPWfZNNmkEp1GD82RORIPs/xJK/EpY36isVzXOfBKnLRYHiW6IRb3LF4j8MU3j7gF0ouxPJZhlNvtuOojfCFkc3nhe/ovh81Yvwi66oC6pmEdGkEIRjcCCtC3aOpkA6XaDqsF8mIAjXIHZZz7l7KfBoQ2Nj5K+jylXiXASHirVUpFgJLEn3I/kswP0UUdtLEAimz5FL88Ep5BfDnDkxE/luZO6t5ga+A/SthxAGUDNUt9XBv2lzv591OpD393RNWTy9dIexbvN++naaa9cR+b5zPoW0p1LfHxw8H1xWvRBmy5HfOy6dWiY6Lin4Jh2v70KBSRe/0J/KfJNLO9qnmxvCmI5o/VAjQN6VdHlL1J7SWL72ig8mBHeAX8JROnysz3StQR7tZdySm9IbsPn2NdyF9j5ElE3pjPAAMtV2jW6m4jv3+dSvIYci1tsNHN7RFs0nruTYV5LByTtt8OCwqVZcDvkTp+ICLIdcC7r/rxv6UnZKp14fFojbCNR5vfD75iM0H5CUayK9nXYMv1D2hH/pmu1JwLT4iZSau9nHtVspEKaflvgpedHUhF8q7JwGE2E54cYfSqwxNmLwwGvwyGD11mejAxueTKAJeeBGkOLwZZPfStUsUZIBrrwBwyNe/7w8oSq2sW3PZwXuPjqWNedKwM1+WXmTbvRT/f0n/F1/SseMdfndDXXEhw1vDD9EgYb9ELGSPPbNnGayUdWS03VIbXJqqbelzePqSFEth+W1Fc2rBK4sHGuzNRRxpR+ypyO6w6b7iN5ReyMEP7H+BqP+m37PN4uK8Jblf02ZYpVGzja7jgirY8XqwyAhlNzTfn02hbf8BFTwR0Q== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Variant By Env"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/apps/get_variant_by_env"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Retrieve the app variant based on the provided app_id and environment. Args: - app_id (str): The ID of the app to retrieve the variant for. - environment (str): The environment of the app variant to retrieve. +app_id (str): The ID of the app to retrieve the variant for. +environment (str): The environment of the app variant to retrieve. Raises: - HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500). +HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500). Returns: - AppVariantResponse: The retrieved app variant. +AppVariantResponse: The retrieved app variant. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","title":"Environment"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"project_id":{"type":"string","title":"Project Id"},"base_name":{"type":"string","title":"Base Name"},"base_id":{"type":"string","title":"Base Id"},"config_name":{"type":"string","title":"Config Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"revision":{"type":"integer","title":"Revision"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"modified_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["app_id","app_name","variant_id","variant_name","project_id","base_name","base_id","config_name","revision"],"title":"AppVariantResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "environment", + in: "query", + required: true, + schema: { type: "string", title: "Environment" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_name"} + required={true} + schemaName={"Base Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>uri</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>modified_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "app_id": "string",\n "app_name": "string",\n "variant_id": "string",\n "variant_name": "string",\n "project_id": "string",\n "base_name": "string",\n "base_id": "string",\n "config_name": "string",\n "uri": "string",\n "revision": 0,\n "created_at": "string",\n "updated_at": "string",\n "modified_by_id": "string",\n "organization_id": "string",\n "workspace_id": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-variant-revision.api.mdx b/docs/docs/reference/api/get-variant-revision.api.mdx index 925a1951ac..301e32f1de 100644 --- a/docs/docs/reference/api/get-variant-revision.api.mdx +++ b/docs/docs/reference/api/get-variant-revision.api.mdx @@ -5,36 +5,36 @@ description: "Get Variant Revision" sidebar_label: "Get Variant Revision" hide_title: true hide_table_of_contents: true -api: eJy9Vstu2zoQ/RVhVrcAEaVBV1pd94E26MtIc7MxDIMWxxZbiVTJUXBdQf9eDCnJkt2kj0VXtsl5nnNm6BZI7j1kK7iTTktDHtYCbI1OkrbmWkEGe6TNfbzdOLzXXlsDAmrpZIWEjt1bMLJCyGAw1AoEaAMZ1JIKEODwa6MdKsjINSjA5wVWErIW6FCzpyenzR4EkKaSD/qKkmsFXSfGDEMJG9NUW3S/m0Ybwn1wG/Lc9AGTDzFg1605jq+t8ejZ9erykj8U+tzpmoGBDD41eY7e75oyuemNQUBuDaEhNpd1Xeo84Jh+9uzTTsqpHaNMOmbQKniYw8ddQHOOCXffn5imLIELHKpndMQIyi81yg6VVXqnUW22h8c4eN+bJc8P7JVbs9P78/Lj+SYy9HC0F8Es+cBm3VxBLUilNGMly+UkdmSxD2i3nzGnScDlMULXnZsdxbCalbg+Lenl89CdQ0moNpIebSJaJQuKiFSVpk2F3ss9/imJL0KU5H0f5We9TKZwyuPIz6yVSZpFXfdDdZRCx8meXV2dC/xOlloF+SavnLPuz9WtkKQug84JK39uUNp8dvsLGA7y7tZHsKRz8jCh6p2NBQbB+/2jQh+gH4I9bBrASG759mdEcV8xdW+3nq63Ad6I7sNtvIzw/SjZYPLm9nZ5FjByOyf1NVIyLNabiYyQCtsv+7DbqYAM0n6b+7Q97vUuHeTn0/ZkGXcgwKO7Hx6FxpWQQUFU+yxN89I26kLu0ZC8kDqVtQ5T4DFvnKZDcFksr9/i4Q1KhQ6y1Xpq8In1FRUzNxvJkrV+i4xd/1gsGiqs09+iDPqnooheDI42OxvchwkJxSWL5TUI4DYiapcXTy8u4RTLmTGPhszDaAy5wzWIExTG/kEAVmEugFBW/x4vuLLaeqqkmcR7gLpZTSMQhP9TWpdSB/GHCtqe1tXwSHsQkM0e7JFZvjl9aNcCCuuJA7TtVnr8z5Vdx8dfG3TM3lrE0FvGctWC0p6/K8h2svR4Vuu4TuCfm35qniQgftzDwLBheu9l2fAvEPAFD/P/Hbwk/mLmU5jCQioG/ba91SLPsaaJ/9n+ZKGPY/j61S103XdXDUwA +api: eJy9Vk2P2zYQ/SvCnFpAWG0WPelU7yZIFvmosdnmYhgGLY4tJhLFkKNFXUH/vRiSkiU73qQ55GSbnI83b94M3QGJvYN8BZ+EVUKTg3UKjUErSDX6XkIOe6TNU7jdWHxSTjUaUjDCihoJLbt3oEWNkMNgqCSkoDTkYASVkILFr62yKCEn22IKriixFpB3QAfDno6s0ntIgRRVfBARJfcS+j4dMwwQNrqtt2j/bxqlCffebcjzEAMmH0LAvl9zHGca7dCx6831NX9IdIVVhomBHD62RYHO7doqeYjGkELRaEJNbC6MqVThecw+O/bpJnCMZZZJhQxKeg99+Gvn2ZxzwtXHE91WFTDAAT2zk46k/FCh7FA3Uu0Uys328FwP3kez5PbAXkWjd2p/Dj+cb0KHLke782bJBzbr5wrqQEipmCtRLSexQxdjwGb7GQuaBFweI/T9udlRDKsZxPUppJe3vjqLglBuBD1bRLBKFhQYqWtFmxqdE3v82Sbe+SjJ+xjle7VMpnDax7E/s1ImaRbGxKE6SqHnZH/c3JwL/JOolPTyTV5Z29ifV7dEEqryOies3blB1RSz2x/gcJB3vz6SJawVh0mr3jUBoBe82z8r9IH6IdhlU09G8si332sU1xVSR7v1dL0N9AZ2L5fxMtD3rWSDyZvHx+VZwNDbeVNfIyXDYn2YyAipbOKy97udSsghi9vcZd1xr/fZID+XdSfLuIcUHNqn4VFobQU5lETG5VlWVE0rr8QeNYkroTJhFJziW/jb5I5N/Yg4LFqr6ODjLZb3b/HwBoVEC/lqPTX4yOILcpqbjZ0URr1FJja+JIuWysaqf4NG4jtSBi9mTuld492H8QnYbkXxBTW/b1xngH199eLq+lIx0SFZLO/jDInCz9CAw5tBekLXSBSkgLUfICAU9Z/HC0ZpGke10JN4F3o8wzaSQvgPZaYSyk+JR9DF/q+G19xBCvnsZR8lwDenL/I6hbJxxAG6bisc/m2rvufjry1a7uQ6DaG3zOuqA6kcf5eQ70Tl8AzruHfgt4c4Xr8nkH67hqHbmlv9JKqWf0EKX/Aw/4PC2+QXZj6lyW+uctByF60WRYGGJv5ni5ZFP87r61eP0Pf/Aa5LWo8= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Variant Revision"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/variants/{variant_id}/revisions/{revision_number}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Get Variant Revision @@ -43,29 +43,429 @@ Get Variant Revision as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}},{"name":"revision_number","in":"path","required":true,"schema":{"type":"integer","title":"Revision Number"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"config":{"properties":{"config_name":{"type":"string","title":"Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name"],"title":"ConfigDB"},"created_at":{"type":"string","title":"Created At"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["revision","modified_by","config","created_at"],"title":"AppVariantRevision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_number", + in: "path", + required: true, + schema: { type: "integer", title: "Revision Number" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"modified_by"} + required={true} + schemaName={"Modified By (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Modified By" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + config + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + parameters + </strong> + <span className={"openapi-schema__name"}> + object + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Parameters", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "revision": 0,\n "modified_by": "string",\n "config": {\n "config_name": "string",\n "parameters": {}\n },\n "created_at": "string",\n "commit_message": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-variant-revisions.api.mdx b/docs/docs/reference/api/get-variant-revisions.api.mdx index 7b258aa7d6..f8ca1331c8 100644 --- a/docs/docs/reference/api/get-variant-revisions.api.mdx +++ b/docs/docs/reference/api/get-variant-revisions.api.mdx @@ -5,36 +5,36 @@ description: "Get Variant Revisions" sidebar_label: "Get Variant Revisions" hide_title: true hide_table_of_contents: true -api: eJydVk1v2zgQ/SvCnLYAEWeDPem07gfaoNvWSLO9GIbBiGOLXYlkyVGwrqD/Xgwp2lKcpNs92RZnhm/emzdyDyT3Aco1fJFeS0MBNgKsQy9JW3OtoIQ90vY+nW493uugrQkgwEkvWyT0nN+DkS1CCTlSKxCgDZTgJNUgwOO3TntUUJLvUECoamwllD3QwXFmIK/NHgSQpoYfjJCKawXDsOEKwVkTMHDS1eUlfygMldeOwUIJn7uqwhB2XVPcjMEgoLKG0BCHS+caXcXeFl8D5/TnQKT38sDoCdt4l/PMCOl0s1axkjl82sXG5/AHcXxiuqYBBp4b4ka4jcTh5EZtCPfoJ73f5KBBQGuV3mlU27vDc3R9GMOKlwfOqqzZ6f05/PR8m+R6utqrGFZ85LBhLnYPUinNHMpmNamddB0L2ruvWNGk4OpUYRjOw07jsZ5B3DyE9Ppl7M6jJFRbSc82kaKKJSVG2lbTtsUQ5B7/r4ivYpXiw1jlZ70c1Z7reNRn1srkmqVz4/xPR+E0Hmm6i7dIRfbJzdGcw8Cw/ri6OrfIF9loFQ1QvPHe+l/xx3yQFJLUTXTE40ZpbDU7/Q9sZyMMmxOt2Y65979sAhitEfbPWiKLlIs9HRrJKG759GeScl/p6jFuM91Zmd7E7tNtvE70PXZZDnl3e7s6K5i0nYv6+BQIaJFqO+7wuLGphhIW444Oi/60rYfFdLcH9Pd5sXe+gRJqIhfKxaJqbKcu5B4NyQupF9LpaI+AVec1HWLKcnX9Hg/vUCr0UK4304DPPE5pQOZhp/3r9HtkqsZXyrKj2nr9Pak+vlXqlMVcaLOzMT1bJ4IrlqtrEMBtJJIuL36/uISH1M2C2Qmyik7Id8djEA9YOPYPArCNNgBC2f55OmBkzgZqpZnUe0qpGagjE4T/0sI1UsdhjxD6UcV1ftNydjl7656E3AiobSCO7vs7GfBv3wwDP/7WoWetNiLVuWPm1j0oHfi7gnInm4BnwI67An67GS3xogDxOOCsp2Ex72XT8S8Q8A8e5v8Uot3rPC79GLCsKnQ0ST3bTjxXxxl/++YWhuEHVosFTA== +api: eJydVtFu2zoM/RWDTxtgNF2xJz8t7Yat2HZv0HV9CYJAtZhYmy1pEl0sM/zvAyUrsZum271Pba1D6pCHh2oHJLYeiiXcCaeEJg+rHIxFJ0gZfS2hgC3S+iGerh0+KK+M9pCDFU40SOg4vgMtGoQCElJJyEFpKMAKqiAHhz9a5VBCQa7FHHxZYSOg6IB2liM9OaW3kAMpqvnDQCm7ltD3K87grdEePQddnJ/zD4m+dMoyWSjgS1uW6P2mrbObAQw5lEYTamK4sLZWZaht9s1zTHdMRDgndsyesAl3WccdIRVvVjJk0rt/N6HwKf0+33/RbV0DE08FcSFcRuzh6EalCbfoRrXfJFCfQ2Ok2iiU6/vdc+36PMCyyx1HlUZv1PaYfvy+jnKdznYVYNk/DOunYncgpFTcQ1EvRrmjrkNCc/8NSxolXBwy9P0x7DAeywnF1WNKby9DdQ4FoVwLeraIiMrmFDvSNIrWDXovtvh/RbwKWbLPQ5Y/1bJXe6rjXp9JKaNr5tYO8z8ehcN4xOnO3iNlySc3e3P2PdN6fXFxbJE7USsZDJC9c864/+KP6SBJJKHq4IinjVKbcnL6F91ORuhXh7YmO6baP5lIMFjDb5+1RBIpJTsNDc3Ibvn0T5JyXfHqAbca76zU3tjd02W8je176rIE+XB7uzhKGLWdivr0FOTQIFVm2OFhY1MFBcyGHe1n3WFb97PxbvfoHtJib10NBVRE1hezWVmbVp6JLWoSZ0LNhFXwmM48nGZXDA3e8Vi2TtEu5Jsvrj/i7gMKiQ6K5WoM+MKzFqdnCjssZ6s+IvdxeG/mLVXGqV9xJIYnp4pR3CilNyaEJ19Fbpei/I6a3yiuM9I+P3t1dn6qmCEgmy+uB8uIMlgm8QgwyB+1a98oyAGb4BcgFM2bwwGztMZTI/Qo3ylJJ+T2XSH8STNbCxVcESh0g9zL9CRzdDF5ng+Kr3KojCdGd9298PjV1X3Pn3+06Fi3VR7z3HMXlx1I5fl3CcVG1B6PiO2XCry4GbzzMoP8acJJW83CPoi65b8gh++4m/5LEfZClUanGwDzskRLo9CjNcYztjfD+3e30Pe/AQZqE9s= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Variant Revisions"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/variants/{variant_id}/revisions"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Get Variant Revisions @@ -43,29 +43,443 @@ Get Variant Revisions as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"config":{"properties":{"config_name":{"type":"string","title":"Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name"],"title":"ConfigDB"},"created_at":{"type":"string","title":"Created At"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["revision","modified_by","config","created_at"],"title":"AppVariantRevision"},"title":"Response Get Variant Revisions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"modified_by"} + required={true} + schemaName={"Modified By (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Modified By" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + config + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + parameters + </strong> + <span className={"openapi-schema__name"}> + object + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Parameters", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "revision": 0,\n "modified_by": "string",\n "config": {\n "config_name": "string",\n "parameters": {}\n },\n "created_at": "string",\n "commit_message": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-variant.api.mdx b/docs/docs/reference/api/get-variant.api.mdx index 9e72dd044c..a82b12bcbf 100644 --- a/docs/docs/reference/api/get-variant.api.mdx +++ b/docs/docs/reference/api/get-variant.api.mdx @@ -5,36 +5,33 @@ description: "Get Variant" sidebar_label: "Get Variant" hide_title: true hide_table_of_contents: true -api: eJylVk1v2zgQ/SvGnLoAEWeDnnRaN1u0QdttkCbZg2EYjDSW2EokS1LZVQX992L4IUt1EhfJybL45s3Xm6F6cLy0kK3hlhvBpbOwYaA0Gu6EkhcFZFCi296HU2CgueENOjRk1YPkDUIG8XwrCmAgJGSguauAgcHvrTBYQOZMiwxsXmHDIevBdZosrTNClsDACVfTixjI4qKAYdgQg9VKWrRkdHZ6Sj8F2twITSFCBl/aPEdrd229uIpgYJAr6VA6gnOta5H7jJZfLdn0k0C0oXydCB641pTFEwGutPbBMY8NBXga/Q9hBjat0m8WYG9zzE+ySr60UV8xP+brMqCirztu8aijN9zi6MVbPO3C4wN/ruROlEc9nHvY6KM1wjdGdp93XnNzu4GNb2Rb10CaSUw3RhCDwXthReh7hArpsEQz8XqVQBSoQe6w2HL3XM/ngWGxcj4FXbyQ7yYwRL5GFWInsNjedbH6z+H8FFkWb7rYIGVKLsUPPykvIP48oYnM/ynzzWqe4wto/00cYTewBFR3pOHZslmnOZ4MKZtvqdlgzeZlOgh7ic/lOxHVZjbscQ7TItrCMFCor8/ODhfXLa9FEar01hhlnr+1CnRc1PQkHDb2EFCrfHb6G/VPIzJs9qXmxvBuMjQfVQjQi9KWT031J7SWl36iA+RxqC/G4ppOj7WZ8gquI24zXYmpvKG6j6fxdyjfQ84S5P319eUBYejtvKnv0C1ux+uyQVepeIv629NVkMEyis8u+70mB2Bg0dynq7U1NWRQOadttlzmtWqLE16idPyEiyXXwg+Hxbw1wnXeZHV58QG798gLNJCtN1PAF5JOEMMcNvaBa/EBqSzxUl+1rlImznG616tgRXkLuVPePKnfB7dYXV7QeKEJKxdOT/48OYVfyzQDk+p57lWffPtjYL9UYcwfGGDjJQ8OefPX/oAi08q6hssJ37wrs1DG/B3+75a65kKGa8fPU+jYOq0LCwyyyR7ZMKiUdYToe1oVN6YeBnr9vUVDXdnEVXNHNVr3UAhLzwVkO15bPAhm3ADw6ioK/Y8FsIeDTJ2Tnd9odUv/gME37OZfZX6IqySMPgJWeY7aTUwPdg4paNTwu7fXMAw/AXuSdw8= +api: eJylVk1v2zgQ/SvCnHYBIs4GPem0TrZog7bbIE2yB8MwJtJYYiORLEllV2vovxf8kqW6iYvkFMd882b4Zt7QO7BYGchXcIeao7AG1gykIo2WS3FZQg4V2c1jOAUGCjW2ZEm7qB0IbAlyiOcbXgIDLiAHhbYGBpq+dVxTCbnVHTEwRU0tQr4D2ysXaazmogIGltvGfRELyS5LGIa1YzBKCkPGBZ2dnro/JZlCc+VKhBy+dEVBxmy7JruOYGBQSGFJWAdHpRpe+BstvhoXs5sUorS7r+UhAyrlbvFMgUulfHHMY4MAz6P/dpiBTVX6RQH2McfypKiUS2n5lYpjua4CKua6R0NHE52joTGLj3g+hccH/kKKLa+OZrjwsDFHp7lvjOg/b/3MzeMGNn4juqYBNzOJ6VZzx6DpkRse+h6hXFiqSE+yXieQK1QTWio3aF+a+SIwZEvrr6DKV/LdBobI18qSbzmVm/s+qv8Szk+RJTvvY4OkrlDw/71TXkH8eUITmf+V+sEoLOgVtP8kjrAbWALKezfDs2WzSj6emJTNt9TMWDO/TI2wH/H5+E6Gaj0ze/RhWkQbGAZX6puzs8PFdYcNL4NKb7WW+uVbqySLvHGfuKXWHAIaWcxOf0H/ZJFhvZcatcZ+YpqPMhToh9JUz7n6ExmDlXd0gDwN9WJkN+70WJvdvULqiFtPV2KSN6j79DX+CvL9LFmCvL+5uTogDL2dN/Ud2exufC5bsrWMr6h/PW0NOSzi8JnFbj+TAzAwpB/T09rpBnKorVUmXyyKRnblCVYkLJ4gX6Di8GPqpT/NLhzUO8dQ0Wlue8+3vLr8QP17wpI05Kv1FPDFzVWYlDlsbBIq/oGcZvHFX3a2ljqaPD36dYhyonCxlT48WSPUdo7FAwnvP9JhJ8PpyR8np09dJgZky6vLaA8svD1SHR4G7Ae5RqGAAbXeG2AJ2z/3B65KJY1tUUz45u2blTRqYek/u1ANchHeJ2+80NpV2isGGOSThbNmUEtjHWK3czvlVjfD4L7+1pF2HVrHnXTv9FrtoOTGfS4h32Jj6KCYcVXAb9fREb9nwH5eZOqi6P3qazr3HzB4oH7+8827vU5DsouAZVGQspPQg+Xkpmkc9ndvb2AYvgN0xIWe sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Variant"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/variants/{variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/variants/{variant_id}"}></MethodEndpoint> Get Variant @@ -43,29 +40,518 @@ Get Variant as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"project_id":{"type":"string","title":"Project Id"},"base_name":{"type":"string","title":"Base Name"},"base_id":{"type":"string","title":"Base Id"},"config_name":{"type":"string","title":"Config Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"revision":{"type":"integer","title":"Revision"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"modified_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["app_id","app_name","variant_id","variant_name","project_id","base_name","base_id","config_name","revision"],"title":"AppVariantResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_name"} + required={true} + schemaName={"Base Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>uri</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>modified_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "app_id": "string",\n "app_name": "string",\n "variant_id": "string",\n "variant_name": "string",\n "project_id": "string",\n "base_name": "string",\n "base_id": "string",\n "config_name": "string",\n "uri": "string",\n "revision": 0,\n "created_at": "string",\n "updated_at": "string",\n "modified_by_id": "string",\n "organization_id": "string",\n "workspace_id": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/get-workspace.api.mdx b/docs/docs/reference/api/get-workspace.api.mdx index 5a9852e900..7fb010eb1c 100644 --- a/docs/docs/reference/api/get-workspace.api.mdx +++ b/docs/docs/reference/api/get-workspace.api.mdx @@ -5,67 +5,218 @@ description: "Get workspace details." sidebar_label: "Get Workspace" hide_title: true hide_table_of_contents: true -api: eJzllE1v2kAQhv/Kai69rID26FORGiUoUhslVD0QVA32gDexd52dcRKK/N+rWcAYesu1XIxn5p2Pnce7A8ENQ7aAXyE+c4M5wdJCQZxH14gLHjK4JjFvR7cpSNBVPHr0j/6epI2ejzaDq9CKkZIG8cgccodChXlzUiZvyxQ/sWFidsEPU2WP3hhj+m4yMy/7miasz5PvleiYjsKb+fzu6j2n1HtmZuu+nikCsfFBTImvZBqKtUvljQR9W4dYGykdG8xVPAILoaGI+jIrIIMNye++NFiIxE3wTAzZDr5MJvo4P7mHNs+Jed1W5v4QDBby4IW8aDg2TeXyVGL8xKrZAecl1aj/nFCdkjdROxG3L+WKJPXbH2vIFjuQbUOQAUt0fgOd7S2+rSrolhbESaWGWQGdBY81aYZz3Snqu/q7Cwo+VvDbIEVnD2EfSzVXe9cngbB6olzSGl5aF6lQitNoh5CB9gT3SY8x4nYw9XFBRnEfCPRnoSYpwwECsNCglJDBuMeBwQJTfKXIaa42VpBBKdJwNh7nVWiLEW7IC47QjbFxaTamvI1OtkkyvZvd0vaGsKAI2WI5DHhQJvbbPw/rzwsbd0s6z367MG2lDNH9SWyBBac8lnuVDuT8OiT5Yfxpas5M72ZgQcfYEzwZfR5N4PJGOAtWnDFPOB9rJzfYi1Po5wcLVKNTnxDWX08O7awJLDX6Qb7zjfwDZv89/cc31YECoXcZNxW69Lml498dYF3AANalhTKwqHW3WyHTz1h1nZpfWorK49LCK0aHK6VjsezsER5F9Zm2uuZcu1dcsGr3DF7cZopw/+VcX82h6/4CIHk7pg== +api: eJzllE1v2zAMhv+KwMsuQpLt6NOyrWiDAlvRZtghDQpGZmK1tuRKdNss8H8fqDiOk2GXXpeLY5Ivv/TIO2DcRMgW8MuHp1ijIVhqyCmaYGu23kEGl8Tq9eBWOTHaMo7u3b27JW6CiwebwpVvWHFBg3iM0RuLTLl6tVwkbxMpfIgqUozWu2Gq7N4ppVTfTabmRV9T+fVp8r0SbaSD8Go+v7l4M5R6z9Rs3ddTuaeonGdV4AupmkJlU3nFXt7WPlSKCxsVGhGPQIOvKaC8zHLIYEP80JcGDYFi7V2kCNkOPk0m8jjd3F1jDMW4bkp12wWDBuMdk2MJx7ourUklxo9RNDuIpqAK5Z9lqlLyOkgnbPelbJ6kbvtjDdliB7ytCTKIHKzbQKt7i2vKEtqlBrZcimGWQ6vBYUWS4VR3jPou/vaMgvcV/DZI0eou7H2p5mJv+yTgV49kOB3Dc2MD5UJxGq0LGWiPcB/1GAJuB1MfDkgJ7gOB/DRUxIXvIAANNXIBGYx7HCJoiBReKMQ0VxNKyKBgrmM2HpvSN/kIN+QYR2jHWFs4v2XT5FVfJTQNHsk0wfI25ZvezK5pe0WYU4BssRwG3AkwezROw/plYm2vSYbdHz1MGy58sL8TeKDBSgPFXiXTWrf2Sd7tpuvtC5oncjlokDn3bU9GH0eTfw3TCdT0ZtZxjyZxf+gjhYE+W1e/KNBAFVrxMWH1+eiQLmsfuUI3yHd6dH8R3F+8//iT1hHB9MbjukSb7mVa/66jegEDqpcaCh9ZrLvdCiP9DGXbivm5oSBsLjW8YLC4ElIWy1YfQBJsn2grx2yke8EGy2bP49lnT3Dur9jlxRza9g/UIEo1 sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Get Workspace"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/workspaces"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/workspaces"}></MethodEndpoint> Get workspace details. Returns details about the workspace associated with the user's session. Returns: - Workspace: The details of the workspace. +Workspace: The details of the workspace. Raises: - HTTPException: If the user does not have permission to perform this action. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"type":"array","title":"Response Get Workspace"}}}}}} -> - -</StatusCodes> - +HTTPException: If the user does not have permission to perform this action. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "type": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/handle-events.api.mdx b/docs/docs/reference/api/handle-events.api.mdx index 7239e1f558..156ce9c472 100644 --- a/docs/docs/reference/api/handle-events.api.mdx +++ b/docs/docs/reference/api/handle-events.api.mdx @@ -5,59 +5,72 @@ description: "Handle Events" sidebar_label: "Handle Events" hide_title: true hide_table_of_contents: true -api: eJxdUk2PmzAQ/SvRO1sh7dGnplKljfbQaNOeIlRNzGzwrjGubaJSxH+vBpJ0AxcE82bmfcyATOcEfcRX65z1Z5QKbeBI2bZ+V0GjJl85/sUX9jlBIXIKrU+coAd83mzkVXEy0QbpgcahM4ZTeu3c6uUKhoJpfWafBU4hOGumFcVbkp4BydTcEPQwyqMWI58mEqtvNxIN57oVdqFNGQqBcg2N4jSrKFKONnAxky6gkDheOIrSAV10oivnkHRRGNd21ZrO7DOtyRYULMZSOkwXbe6nlu1+98z9E1PFEfpYfgQchPlsxyNsQO4DQ4OCfeYeCp4a+d52uW6j/Ts5AAUrEuu5S7Rb/9pO7Ta7CT+RW233OyiIjNmUzfrTeoOlVQ9gMZ3MZPpt91SGWrhw1w8FbshKLTM1X/4XhJnY3ZD/MG+ZzAOZuwOZ/+QiOLIe43X1cA3tiGtoktIUm1C4jZN7rCVjfcQwnCjxz+jGUX7/7jhKOqXChaKlk3h1LEd1s1KCe+deRBvDQe7kQq6bE1lcoAR6P6r998MPjOM/FmYOTA== +api: eJx1Uk2PmzAQ/SvRO1sh7ZFTs1WljfbQqGlPCFUTMxvcNca1TVSK+O/VAMnuIpULgnkz8z5mQKJLRF7gwVhr3AWlQus5UDKtO1TIUZOrLP/kK7sUoRA4+tZFjsgHfNzt5FVx1MF46UGOU6c1x/jc2c23BQwF3brELgmcvLdGTyuyX1F6BkRdc0PIh1EetRr5OJHYfLmRaDjVrbDzbUxQ8JRq5MjOs4ospmA8ZzPpDAqRw5WDKB3QBSu6UvIxzzJt267a0oVdoi2ZjLzBev1+qm4+CxRjKeN0F0zqp3n74+GJ+0emigPyonwLOIms2av3sAGp94wc5M0T91Bw1Mj3vkt1G8zfyR4oGCFQz11ijHHP7dRukuVXbg+kX9hVUBCdM+3d9sN29z8xS8Nmfzws6ZCe0rnxmGBQK7vuRkGBGzJSS0zNp9eCsJRcGnJv5q0jfEfq7kbiPynzlozDuKwelnQLLOlKnFO+QuE2Tg63lmPICwzDmSL/CHYc5ffvjoMkVSpcKRg6i29FOaqbrRLiC/ciWmv2clBXst2czupUJdz79R2/nr5jHP8BBLsc2w== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Handle Events"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/billing/stripe/events/"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Handle Events -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/health-check.api.mdx b/docs/docs/reference/api/health-check.api.mdx index 34aa4dc3e8..239ad076d7 100644 --- a/docs/docs/reference/api/health-check.api.mdx +++ b/docs/docs/reference/api/health-check.api.mdx @@ -5,59 +5,69 @@ description: "Health Check" sidebar_label: "Health Check" hide_title: true hide_table_of_contents: true -api: eJxdUkFu2zAQ/IoxZ8Jye9SpRhEkRi5B05wModjQm4iNRLLkyogq6O/FSoobSxdC3BnuzOwOCJETiQv+cEKJmqmR+pet2b7BIHGOwWfOKAd83e30OHG2yUWloMRjZy3n/NI1mx8LGAY2eGEvCqcYG2enDsXvrJwB2dbcEsph1M+snrybNGy+LxpaljqotlcWGESSGiWKWSkMMqczp4zyOKBLjZoQibksCtuE7rSlV/ZCW3IFRYexUobtkpN+ouwfDvfc3zGdOKE8Vp8Bj6pzNn8NGyB9ZJSg6O65h4GnVv/3ndQhub+TXxg4P4eqLHXq/EuY6E6aCT+J2+wfDjBQG3MEu+2X7Q7rYK7AGjHZKeKP3lMZZpXCxT8MuCWnNWFqv/0vqLIYsrTkP723msOVlksAwu9SxIacx7h0HpYZHZdtQmVQhyx6MwzPlPkpNeOo1386TjqGyuBMydGzhnKsRvORmU7ojXt1Zy1HXYAzNd0c/WqxdHKXZbm9+Ylx/AcGdfiJ +api: eJx1UsFu2zAM/ZXgnYU429GnZcWwBr0U63YKjIGV2VqLLWkSHcwz/O8DHTdtDUwXQeIj+fgeR4TIicQFf6hRomFqpflpG7YnGCTOMfjMGeWIj7udXjVnm1zUFJR46K3lnJ/6dvNtAcPABi/sReEUY+vs3KH4lTVnRLYNd4RynPSYVcnbmcPmZuHQsTRBuT2zwCCSNChRXJjCIHM6c8oojyP61OoQIjGXRWHb0NdbemYvtCVXUHRYN9vP0c2NQjFVWs72yckw19vfH+54uGWqOaE8Vm8BDzrERZn3sBEyREYJiu6OBxh46vS976UJyf2dxYCB8xfFNUtlcP4pzOlOWn7l9pnsiX0NA53zQnu3/bDd/W+YJWGzvz8sXpCdvXjhMcNgVnJdhYIBd+Q0Jkzdp9eAsowhS0f+Tb2VYe84XcUQ/iNFbMl5TEvncTHzuKwdKoMmZNGfcXykzD9SO036/bvnpJZUBmdKjh5VoGM1mRf91K0TDzqdtRx1U87U9hcbVhuoLl636uuX75imf188Byc= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Health Check"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/health"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/health"}></MethodEndpoint> Health Check -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/human-evaluations.tag.mdx b/docs/docs/reference/api/human-evaluations.tag.mdx index 3e4ee7417a..592e00ba89 100644 --- a/docs/docs/reference/api/human-evaluations.tag.mdx +++ b/docs/docs/reference/api/human-evaluations.tag.mdx @@ -5,16 +5,9 @@ description: "Human-Evaluations" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/import-testset.api.mdx b/docs/docs/reference/api/import-testset.api.mdx index c1fb8108bd..a2ea57d6aa 100644 --- a/docs/docs/reference/api/import-testset.api.mdx +++ b/docs/docs/reference/api/import-testset.api.mdx @@ -5,74 +5,373 @@ description: "Import JSON testset data from an endpoint and save it to Postgres. sidebar_label: "Import Testset" hide_title: true hide_table_of_contents: true -api: eJzlVU1vGzcQ/SvEnBqAllyjpz1VTQNETRoLltKLLBj0ciQx3SUZctaOKux/L4bclVZ2LAe99rQfnDcfbx5n9kBqE6FYwgIjRaQIKwkaYxmMJ+MsFDCtvQsk/phffxKUrYRWpMQ6uFooK9Bq74wloawWUT2gMCTIiZmLtAkYR7f21k7CJha3VghxtP8pUnhTiMnAxeebjww1OeYhzCgju/B3VtXYo2mLIn27dXrvUzRr4YN7MBp1SuAGqQm2z0Gbkgqx2KIIGJuKenQX2AdXYowjkOA8BsVUTDUUkM/vuiAgwaugaiQMzOIeOBMoQDW0dcH8k4AgwTCRXxsMO5AQ8GtjAmoo1qqKKCGWW6wVFHtQdne9To5o59lRpGDsBlp5+GObqoJ2JYEMVfxjchKr5SOOgJF+c3rHXktnCS2lAN5Xpkym428Xj4+PF2sX6osmVGhLpzmp/SAfH7h8Mhj5q+8Sv5/md8zmXW/TShi26xym0574xHYtA7Ohu/+CJQ0MuaC7Jy1oW0YEjN7ZmPO8urzkx6mM503JLV03lbjpjEG+RM2XyJiXmTD6XD1TzdW/VnWuVkIZUBHqO3WW17fZSkzouwwdNbXk5LroJ85Xp4TPkeam9hUe2MhM/nJ19Zy8v1RldKJGvAvBhf/OnEZSpkocEtbxuUHlypPTH7gSxhJuMEC7OjKjQlC7AX8fXdldEAl13Jyj+k+MUW1Sb7LJGbUzGWLBp691hevKoTu7QT+O9GZ2Xy7j90zfuUvyfrGYPXOYe1sjbR2PMe9iHl60hQLG3V2K48MNlxAxPPRTrQkVFLAl8rEYj8vKNXqkNmhJjZQZK2/SQIpYNsHQLkEms+kH3L1HpTFAsVwNDeasjdztU7MD0cqbD7jrZfx0xnXzdJtRXJixa5fg/UxMyYnJbAoSuIws48vRz6NLeLrgToxZ1qpMsu5jp2OQT1g41A8SsE6aBkJV/3o84MyY6VrZgb9uny4OK+Qkm8G0/r9v3k4LhN9o7Ctl0t1NTdh3yl32KyZyE3rtriRsWd/FEvb7exXxc6jaln/nDczy1Caq+2qwg//G3Xf29oOqGs4h6ftBBcOgJGfZy4+9ZfDb3LiLNA6O2NdXLo+y7GJSlujpBXAarZzI4RrPrucLkHDf7fnaacYMPMvhB6fdtv8CFsduaw== +api: eJzlVlFv2zgM/isCn3aAmnTFPfnpst6A5bZbgya7lzQoVItJtNmSJ9HpssD//UDJTpx2SYe97im2xY/8+JEiswNSqwDZHGYYKCAFWEjQGHJvKjLOQgbjsnKexD/Tm4+CkpXQipRYelcKZQVaXTljSSirRVAbFIYEOTFxgVYew+DO3tmRX4XszgohDvavAvk/MjHqufh0+4GhJsXchxkkZBv+3qoSOzStUcR3t4zPHUWzFJV3G6NRRwK3SLW3HQdtcsrEbI3CY6gL6tBt4Mq7HEMYgARXoVcsxVhDBun8vg0CEirlVYmEnlXcATOBDFRNa+fN9wgECYaF/Fqj34IEj19r41FDtlRFQAkhX2OpINuBstubZXRE24odBfLGrqCR+y+2LgpoFhLIUMEfRkexGj7iCBjojdNb9po7S2gpBqiqwuTRdPjt4vHx8WLpfHlR+wJt7jST2vX4VJ7TJ4OB37oq8fMxvwObt51NI6FfrnOYtvfER7ZrGJgM3cNnzKlnyAndPylB0zDCY6icDYnn1eUl/xy38bTOuaTLuhC3rTHIU9J8Dow5rYTR5/IZa87+paxTthJyj4pQ36uzul4nKzGiHyp06Kk5k2ujHzlfHAs+RZqasipwr0ZS8s+rq+fi/acKo6M04q33zv+6chpJmSJqSFiG5waFy49Of+JKGEu4Qg/N4qCM8l5te/p9cHl7QSSUYXVO6n8xBLWKtUkmZ7qdxRAzPn2pKpxXCt3a9epxkDepezqNv5N85y7Ju9ls8sxhqm2JtHY8xioX0vCiNWQwbO9SGO5vuISAftNNtdoXkMGaqArZcJgXrtYDtUJLaqDMUFUGni6NUTwV12wap1XAvPaGttHfaDJ+j9t3qDR6yOaLvsGUGye1wrHZvgqqMu9x2/X40wHYDtt1QnHWxi5dhHcDM3F7o/IvaPmucJ6J9uXg9eDyVDItQIwm47b/VR77v+MRzUA+kWsvFEjAMjY/EKryr8MBs+SSlMr2/LWLd7bfNUesemP9d1/RbV8QfqNhVSgTL3kswq5t8Xm3iwIXoWvyhYQ1X4RsDrvdgwr4yRdNw5/TquZW1Saoh6K3rL/g9gcLfqOKmjnEXt8obxgUW1t2rcjeEvg6Fe4izo0D9uXdzDMvuRjlOVZ0AhxnMBPZ3/fJzXQGEh7aPwSl04zpeZb9F6bdNP8Dnod8+g== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Import Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/testsets/endpoint"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/testsets/endpoint"}></MethodEndpoint> Import JSON testset data from an endpoint and save it to Postgres. Args: - endpoint (str): An endpoint URL to import data from. - testset_name (str): the name of the testset if provided. +endpoint (str): An endpoint URL to import data from. +testset_name (str): the name of the testset if provided. Returns: - dict: The result of the import process. +dict: The result of the import process. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"authorization","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"testset_name":{"type":"string","title":"Testset Name"}},"type":"object","title":"Body_import_testset"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"TestSetSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "authorization", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Authorization", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem + label={"application/x-www-form-urlencoded"} + value={"application/x-www-form-urlencoded-schema"} + > + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"endpoint"} + required={false} + schemaName={"Endpoint (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Endpoint" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"testset_name"} + required={false} + schemaName={"Testset Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Testset Name" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "created_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/ingest-spans-rpc.api.mdx b/docs/docs/reference/api/ingest-spans-rpc.api.mdx index 3680a95149..e25577cf07 100644 --- a/docs/docs/reference/api/ingest-spans-rpc.api.mdx +++ b/docs/docs/reference/api/ingest-spans-rpc.api.mdx @@ -5,67 +5,898 @@ description: "Ingest Spans" sidebar_label: "Ingest Spans" hide_title: true hide_table_of_contents: true -api: eJztXG1z2jgQ/iuMPl1nTEjSvLR8Opq4Ey4tMED64RiGEbYAFVv2yXJSjvF/v1nJNrIhvDXtpR31Q17ErlbafXZXftR4iQSeRqg+QH2OHcqmaGihICQcCxqwpovqiLIpicQoCjGLRjx0kIU4+ScmkfgQuAtUXyInYIIwAT/iMPSoI5VrX6OAwVjkzIiP4aeQw9SCkkiOw4xSiS3aE1QfLBEVxI/WJR1OsCDuCIuiuFiEBNVRJDis3EKTgPsgg1wsSFVQn6DEysVY7HkoGVpIUOHBwI2attIQKLFQHLo/wsiDmjY14hKP/AAjt2ra1EjmrvFiRN097cQxdfdy1odFpenq/npRK5m3ciuZw17USuau3Irg2CGpgfK0mRIkCEnlAbo7xHshZql0iDlhYsf6t623IycorFWJbnMHYbEPiU3ZY6AyElkIMxaI7JeYzVnwxNCwtMk+zLS+nmzf+5vGUygLFnJmmILBp4DPJ17wBG7C0Ry+BYEHCv6YuK5S/icmfIEs5Hk+qAZ+6JF0wc4MC1l+OGbzzRsAt+9Y/5yyHUjK1t/rNFqj+2brdvTQ6nXsm+bHpn2LLG282erb3VbjU2GwZ3e/2N3C0M2npt3qF4Y63fbtw01Zrt3qPXy2u/qW2n3iwbbuYd3Pb4thf2tYtgFMgrWFZZVBkcBcjGTN+Y4aRZkgU8K3mwVLlb7SRIS5P8WqzdzcZiSwiKORE7h7QrrXb/QfeqOb9q0NoLBlTLWx9n1pwO522+vhlGZvwOrmgKpl+SSK8PT4qMpZKp/TWRILYSE4HceClPoudl0KOYa9TqHx7mF1o8f9cXFkHAQewUwObbaFHMqd2MP8j4+x5/0VBazaZGEs3kCRUJME46/EEXKO9JywhxLmHC+2eqmoKivsmr3ndBsrfyZQlyaEE+aUfffMqeaR8IiqI9Ix0f2SqgNcvHh6NEhAN7HQy3VX1aYM1H4c1NYUi9Wlm+FQs7B7cd0VehMLeZTN94PxYWehQ09aBkY/FUbwZEc5caHVZYHVglZqY58omx+EsU8SVYmFZjia7VkmTWH6pRGl4+UOR7OD8HKnYAKHw28OCcVauzRBOy5odu5O8O0jYWK/ZMweMp4r3dkzBJzLI4H98EUO8/oDaj6xSeX/szlIIOhxLrUGGzB1UK7bCoW7DOe9aMXClEx/9LCAE8dB1nuSjMwOKHviaSefuRuI3z3FCjQZT/AGbYKU9mnJK8ODMJI7ypCyhpQ1pKwhZQ0pa0hZQ8oaUvZVnmINKWu4j9fBfRhS1sDIkLKmML0KRBlS9jUGzZCyBhW/KymbErJbDyyG+TTMp2E+DfNpmE/DfBrm0zCf5qhomE9DMLx+qBnm08DIMJ+mMP0KiDLM52sMmmE+DSp+c+bzJajHHfVMSvU5IYe5ua/+x+uu2dMXBHTV3/6jJEl0TwgeEzkQhQGLFL7PT8/hm0sih9O0WqJe7DgkiiaxV+mmwpJXOeoVAk4QK6VSumg8oZQA4m6CY0+g+qk5TR5XMNqxOKJirGkdUDKU7i94oNyRSVIqB38iM+nifEOufMEedWUmVGzOA358orhEYOrJ8+tmoHuBU/j0EKgNyy7SHJJxvYmF/Gi6LTE0XiijdJ8Tlc6oKF51R5BhX8p0KqdTFrl7lXef38atct+2wN71+521CVVsi0FtyvepVFRJt5BPxCyA96yEQQTzhVjMUB3VQk4eKXmqCVV2a/KCrKZexgLNhnAgbGSEYu6hOpoJEUb1Ws3xgtg9kVw3PsG0hkMqMRoRJ+ZULKRKo9O8J4s7gl3CUX0w1AV6gCGFiqJYHhAc0nsC/lHnL9SIxSzg9N+Myaewz5nSAgcAOrurd8bY3zCw6Nq136D4jhfoHBfV0+vq+fv+2WX98qx+/u7k9Prsb1S8F9smp19tbZMr3U6htxP87nJydVG9vD67rl5cXp1Xx28nTvXceX/1dnJ1hSf4Cq1dN+2rVro/2ldt1VhWyZC3ptWQdrOjJY12QVO8fdGuT/K7Ee1K4tn7Bo3f15aj0fTb/L2i1bdJFYjwjSx3mZNeraTQVUs86EDjObW1S8Jy9fshoSlagzxKTxeD5aYQbYrk+hQZHzFYfuda9OdU7dFqkD066bU1f0TaFpiyCdn9sj+ZglynbBLIUpE1ZFmIKo1OE1ma709Pzk5OUbk2FoSh1WFHrJ7z0o8h+woVL6918upO9jkkCPb/XH0AK4MC62OmzVcqxYW15MVOkG+iFnpwZZiklpdplR6gtEqngV0lZiSroKzVEE4o7fUBWi7HOCIP3EsSGFZXi/XB0EKPmFM8BocNoJvOssK8RHOykMdY2farsueBuBerQlw6AkB7VhoNByK/VXaodZ9OuwdZNU5f6eWrxOMYtgZf6wjBi8FAW3YGObZEHmbTWOWfmhP+/Qcuy97e +api: eJztWktz2zYQ/iuaPbUzlOWXnJanKjIzUe1IGonOoRqNBiIhCTFfAUA3qkb/vbMA39bLjtPmwBwcDbjYXXz4dhcLcgOSLAWYE7A5cViwhKkBYUQ5kSwMei6YwIIlFXImIhKIGY8cMIDTrzEV8n3orsHcgBMGkgYSf5Io8pijJre+iDDAMeGsqE/wV8RRtWRUqHHUqCYF68ECzMkG5DqiYALhnKxha2QDQex5sJ0aIJn0cGCs5m4NkJw4tKKFuC5DD4g3LBk8an7fxFziu1WAw7gTe4T/MrCph8v4FYwNMEl9AebOpxVUpttsJJx/oY48DSiHUyKpOyNyJ+RCctx9AxYh91EGXCJpUzKfHtTf1WobHXQD4sj9EUYetNrEiEs9+gOM3Gq1iZEUrvl6xtwT7cQxc08C6/260XOLeL2plRStzEoK2JtaSeHKrKhITAxU1aaTMMnQRB6D54g4kjeRjgingTzi/yF/h0pB0fYjC46gQYPYx5gdDzv92V2vfzt76I+HVrf3oWfdglEY7/Vta9Tv3JcGx9boszUqDXXve1bfLg0NR4Pbh25VbtAfP3yyRlBYQZoS7tDv50tNlxUQn74WJAV4n6hIASEJlzMVN98RZyyQdEn5YbNoqWHrmUAD9z+xagVuZlNIImMxc0L3iNmMEnbHfhjPuoNbC0lhqT0tjA3uKgPWaDR4vp3KbBet7t5Q7ZZPhSDL1++q0tL4lGjZGkCk5Gwey1Mr5wlWdyLuz8sj8zD0KAnU0G5beQX8EHvenyIMmr0gimWhDhaq3rOyuXfS8SNFeSq8qMp2cjyRwE80kBXcEk+rJ4g0WPdlwDQWkd9CEj96k6AoeG5nimta/FBaPJuoj9GMUxfziSJCcZ8rmcJCThWsH3fc0izcGuCx4PE0Or6sJr+04tf0+t/olW5sYdMqBLtnweOL+HWvWHXMcGYuP/DtONIUYa2brLrJqpususmqm6y6yaqbrPq4UzdZNS3qJqtusn5+ev38TdZbdDk7fKlaEjan9GUw2/o93jHtyVvKkX4BCVuUz5GQPKZqQERhIDS/L88v8T+XCoezCFmJS4kdhwqxiL3GKBEG47XvMZ8oF0yL7AvQz4kI9jxhrE1UgqvQwCiJ3SnljYmTup66tYOuIgNoq9C+vtyB52fiMVeh1bA4D/nrwXSpJMzDX3uypxc6pacvyV/TagQU8Aq1g4i7L5aHNrNwxNMi+0UVGA0bnx7bClyXNp3IFfYih1eju38Ztxq+Q2H00baHzxTqvS1vak+9+G/osDfAp3IV4gcBUShQX0TkCkxoRZw+Mfp3S+rQbKn7mpb+agATEuXIMrVDMffAhJWUkTBbLccLY/eMLGkgyRlhLRIxqPrQUU8bXRRV/BbUiTmTa6WvM+zd0fVHSlzKwZxMiwJjJJimTFksD6KI3VEET58PoRPLVcjZP5oHBjB0YKVnITpI3VH+5YP1jfiRRwtXVJNN6QIIU0+7ed5uXrTtiyvz/MJsX5+dX9/8BeU7nENyxWuYQ3KVmxS4WpDf2oub62b73cW75nX75rI5v1o4zUvn95urxc0NWZAbeHY1cuq0yl3HqdPyo0weKdlhKB8q3EJU5PRlwt6bgkJnXphYaLAPIZg3xIekSi3szv602k3mnpROZoUOZpJ2KMX8kXUih7wpa0T2JyVjstkF7C78qypUDUm/qUHWs2ARqqBJz0M6It8T55EGeOLIyh+cn12cne8L4WRCozPsJdWBODLvzhIx5GQpSWTpAbfIV6UBJCX+H/kD9BJzkk+Cgr5K9ir5lKUASb/JVuQRpvK+srxJEtsEksSWAJfTUKjcoNLb1IAVZkNzApvNnAj6wL3tFoe/xpRjkpoa8EQ4I3MEb4IFaJWmqw080rWq96pSNlWZQHEv1umpUjWxoukZHcehkTwoOy0k7OFgjMycJ59r+Zq8nODS8K8JgB994WyVL9XYBjwSLGPNYa0T//0Ll5Ta6g== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Ingest Spans"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/spans/ingest"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Ingest Spans"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/tracing/spans/ingest"}></MethodEndpoint> Ingest Spans -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, + `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "version": "string",\n "count": 0,\n "links": [\n null\n ]\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/ingest-spans.api.mdx b/docs/docs/reference/api/ingest-spans.api.mdx index 0a5d66d840..b3a93a6476 100644 --- a/docs/docs/reference/api/ingest-spans.api.mdx +++ b/docs/docs/reference/api/ingest-spans.api.mdx @@ -5,67 +5,898 @@ description: "Ingest Spans" sidebar_label: "Ingest Spans" hide_title: true hide_table_of_contents: true -api: eJztXG1z2jgQ/iuMPl1nTEjSvLR8Opq4Ey4tMED64RiGEbYAFVv2yXJSjvF/v1nJNrIhvDXtpR31Q17ErlbafXZXftR4iQSeRqg+QH2OHcqmaGihICQcCxqwpovqiLIpicQoCjGLkIU4+ScmkfgQuAtUXyInYIIwAT/iMPSoIxVrX6OAwVjkzIiP4aeQw7SCkkiOy9lAiS3aE1QfLBEVxI/WJR1OsCDuCIuiuFiEBNVRJDis2kKTgPsgg1wsSFVQn6DEysVY7HkoGVpIUOHBwI2attIQKLFQHLo/wsiDmjY14hKP/AAjt2ra1EjmrvFiRN097cQxdfdy1odFpenq/npRK5m3ciuZw17USuau3Irg2CGpgfK0mRIkB0nlAbo7xHshZql0iDlhYsf6t623IycorFWJbnMHYbEPSU3ZY6AyElkIMxaI7JeYzVnwxNCwtMk+zLS+nmzf+5vGUygLFnJmmILBp4DPJ17wBG7C0Ry+BYEHCv6YuK5S/icmfIEs5Hk+qAZ+6JF0wc4MC1l+OGbzzRsAt+9Y/5yyHUjK1t/rNFqj+2brdvTQ6nXsm+bHpn2LLG282erb3VbjU2GwZ3e/2N3C0M2npt3qF4Y63fbtw01Zrt3qPXy2u/qW2n3iwbbuYd3Pb4thf2tYtgFMgrWFZZVBkcBcjGTN+Y4aRZkgU8K3mwVLlb7SRIS5P8WqzdzcZiSwiKORE7h7QrrXb/QfeqOb9q0NoLBlTLWx9n1pwO522+vhlGZvwOrmgKpl+SSK8PT4qMpZKp/TWRILYSE4HceClPoudl0KOYa9TqHx7mF1o8f9cXFkHAQewUwObbaFHMqd2MP8j4+x5/0VBazaZGEs3kCRUJME46/EEXKO9JywhxLmHC+2eqmoKivsmr3ndBsrfyZQlyaEE+aUfffMqeaR8IiqI9Ix0f2SqgNcvHh6NEhAN7HQy3VX1aYM1H4c1NYUi9Wlm+FQs7B7cd0VehMLeZTN94PxYWehQ09aBkY/FUbwZEc5caHVZYHVglZqY58omx+EsU8SVYmFZjia7VkmTWH6pRGl4+UOR7OD8HKnYAKHw28OCcVauzRBOy5odu5O8O0jYWK/ZMweMp4r3dkzBJzLI4H98EUO8/oDaj6xSeX/szlIIOhxLrUGGzB1UK7bCoW7DOe9aMXClEx/9LCAE8dB1nuSjMwOKHviaSefuRuI3z3FCjQZT/AGbYKU9mnJK8ODMJI7ypCyhpQ1pKwhZQ0pa0hZQ8oaUvZVnmINKWu4j9fBfRhS1sDIkLKmML0KRBlS9jUGzZCyBhW/KymbErJbDyyG+TTMp2E+DfNpmE/DfBrm0zCf5qhomE9DMLx+qBnm08DIMJ+mMP0KiDLM52sMmmE+DSp+c+bzJajHHfVMSvU5IYe5ua/+x+uu2dOXA3TV3/6jJEl0TwgeEzkQhQGLFL7PT8/hm0sih9O0WqJe7DgkiiaxV+mmwpJXOeoVAk4QK6VSumg8oZQA4m6CY0+g+qk5TR5XMNqxOKJirGkdUDKU7i94oNyRSVIqB38iM+nifEOufMEedWUmVGzOA358orhEYOrJ8+tmoHuBU/j0EKgNyy7SHJJxvYmF/Gi6LTE0XiijdJ8Tlc6oKF51R5BhX8p0KqdTFrl7lXef38atct+2wN71+521CVVsi0FtynepVHrpu1R8ImYBvGMlDCKYL8RihuqoFnLySMlTTaiyW5MXZDVoM4QDVSNjE3MP1dFMiDCq12qOF8TuiWS58QmmNRxSic6IODGnYiFVGp3mPVncEewSjuqDoS7QA/QoPBTF8lDgkN4T8Iw6eaFGLGYBp/9mHD6FHc6UFmwdcNldvS3G/oaBP9cu/AbFt7tAz7ionl5Xz9/3zy7rl2f183cnp9dnf6Pijdg2Of1Sa5tc6V4KvZ3gd5eTq4vq5fXZdfXi8uq8On47carnzvurt5OrKzzBV2jtomlftdLN0b5qq5aySoO8Ka2GtDsdLV20q5nivYt2cZLfimiXEc/eNGjMvrYcjaDf5u8Vob5NqkCBb+S3y2z0aiWFflpiQAcaw6mtXVKVq98PCU3RGuRReq4YLDeFaFMk16fImIjB8jvXoj+hag9Vg+yhSa+q+cPRtsCUTci+l/2xFOQ6ZZNAloqsFctCVGl0msjSfH96cnZyispVsSAMTQ47YvWEl34M2VeoeHmtk5d2ssMhQbD/5+oDWBmUVh8zbb5SES6sJS92gnwTtdCDy8IktbxM6/MApfU5DewqMWE6aDIzKOf1AVouxzgiD9xLEhhW14n1wdBCj5hTPAZXDaCDzrKSvERzspBHV9nqq7LPgbgXqxJcavvQkpVGw4GYb5Udah2n0+5BPo3T13j5KuU4hk3B1zpC8CIw0JY9QY4tkYfZNFaZp+aEf/8BA1jYJg== +api: eJztWktz2zYQ/isanNoZyvJLTstTFZmZqHYkjUTnUI1GA5GQhJgEGQB0o2r03zsL8AHSetlx2hzoQ+yAi93Fh293sSA3SOKlQPYEuRx7lC3R1EJRTDiWNGI9H9mIsiURciZizASyECdfEyLk+8hfI3uj/ks58ZEteUIs5EVMEibhEY7jgHpKUeuLiBiMCW9FQgx/xRzMSEqEGlfaYRJbDxbInmyQXMcE2Qhzjtdoa+UDLAkCtJ1aSFIZwMBYzd1aSHLskYoW7PsUPMDBsGTwqPl9EwuJ71aBPMq9JMD8l4FLAljGr8jaICpJKJC982kFlek2H4nmX4gnTwPK4wRL4s+w3Am5kByYYKFFxEOQQT6WpClpSA7q72q1jQ64gZLY/xFGHrTa1IhPAvIDjNxqtamRDK75ekb9E+0kCfVPAuv9utHzTbze1EqGVm4lA+xNrWRw5VZUJKYGqmqzSZBwSCoPwXNEHMibSseYEyaP+H/I36FSYNp+pOwIGoQlIcTseNjpz+56/dvZQ388dLq9Dz3nFlnGeK/vOqN+5740OHZGn51Raah733P6bmloOBrcPnSrcoP++OGTM0LGCrKUcAd+P19qtiyGQ/JakBTgfawiBQmJuZypuPmOOKNMkiXhh82CpYarZyLC/P/EqsP83KaQWCZi5kX+EbM5JdyO+zCedQe3DpDCUXtqjA3uKgPOaDR4vp3KbBes7t5Q7VZIhMDL1++q0tL4lGrZWghLyek8kadWzhOs7kQ8nJdH5lEUEMzU0G5bRQX8kATBnyJizR6LE2nUQaPqPSubeycdP1KUp6IXVdlOgScQ+IkwWcEt9bR6gsiCdV8GzGIR+C0kDuM3CQrDczdXXNPih9Li2UTLOEdPNBHMfa5kCgc4ZVg/7rijWbi1UEDZ42l0fFlNfmnFr+n1v9Er21hj0yoEu6fs8UX8ulesOmY4N1cc+HYcaUxY6yarbrLqJqtusuomq26y6iarPu7UTVZNi7rJqpusn59eP3+T9RZdzg5fqpaEywl5Gcyufo93THv6xnKkX0ii7RYmcCLiiAnN58vzS/jlE+FxGgMLwfXE84gQiyRojFJh9Or3lk+EC6pF9gXk51QEepwo0SYqwWQ0LEpidwp5Y6Jkrmdu7aCnyAHS4F5f7sDzMw6or9BqOJxH/PVg+kRiGsBfe7JlEHmlpy/JV9Mq4w28Iu0g4B6K5aHNNI50WmS/qAKj4cLTY1sB69KmUzljLwp4Nbr7l3Gr4TsUNh9dd/hMod7b8qb21Ev/xjh96R8SuYrgY4A4EqAvxnKFbNSKOXmi5O+W1KHYUvczLUg9hAO/1N4kPEA2WkkZC7vV8oIo8c/wkjCJzzBt4ZiiqvWOetrogqhitiBewqlcK32dYe+OrD8S7BOO7MnUFBgDtTRZymJF+MT0jgBs+iSIOolcRZz+oxlgIQoOrPQswAVIOyq+eXC+4TAOiHEZNdmUrnog6bSb5+3mRdu9uLLPL+z29dn59c1fqHxbc0jOvHA5JFe5M0FXC/xbe3Fz3Wy/u3jXvG7fXDbnVwuveen9fnO1uLnBC3yDnl2CnDqtcqtx6rTi0FLESH7sKYaM+4aKnL422HsnYPTgxkSjlT6EYNH6HpIqNas7O9Fq31h4UjqDGb3KJOtFzMyR9xyHvClrBPanxWKy2QXsLvyrKlT1yL6eAdZTtohU0GQnHx2R77H3SBicLfLCh87PLs7O94VwOqHRGfbSuoA9WfRhqRhwspQk8vQAWxSqooAkweEfxQPwErJRiJmhr5K3Sj7lKUCSb7IVB5iqjK8sb9KUNkFpSkuBK2gI6iAvryAD2hO02cyxIA882G5h+GtCOKSnqYWeMKd4DrBNoOisskS1QY9krWq8qo5NVRpAPEh0YqpUSqhiekbH80gsD8pOjSQ9HIyBk/P0E61Q05ZjWBT8ayMEH3nBbJUp1dgGBZgtE81erRN+/gU9ONQy sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Ingest Spans"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/spans/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Ingest Spans"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/tracing/spans/"}></MethodEndpoint> Ingest Spans -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, + `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "version": "string",\n "count": 0,\n "links": [\n null\n ]\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/inspect-workflow.api.mdx b/docs/docs/reference/api/inspect-workflow.api.mdx deleted file mode 100644 index eaf5f4c8e4..0000000000 --- a/docs/docs/reference/api/inspect-workflow.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: inspect-workflow -title: "Inspect Workflow" -description: "Inspect Workflow" -sidebar_label: "Inspect Workflow" -hide_title: true -hide_table_of_contents: true -api: eJztV01v2zgQ/SvGnLYAG6dBTzqtd7eLuu0iRpy2B8NY0NJYZkuRLD+ceg3992JI2ZJix00M9LTxxSI5MyTfm3kkt+B56SCbwWdtvy6lvnMwZ6ANWu6FVuMCMhDKGcz9v3eNCTCw+C2g83/oYgPZFnKtPCpPn9wYKfLoPPzitKI+l6+w4vRlLIX2Ah211midSCZcba6XkM224DcGIQPnrVAl1Gzfo4KUUM8ZeOEldXxq3GsGwYpzo3y0IkWQ50eQFGGFvEDr+lF4UQjCgstJb+utxa+CxMlQnhtmSr41A1GcisBgqW3FPWQQgihORhwXUNdsN6wXXzD30A7f4BItqhy7QXYLnR84nprpbUMDQRDz7rGM/JSpB/ETymOJtr+satHvWWgtkavYdXwuyIXNg+T2t7+DlO+cVi/HygT/Ao7tX3isHufEreWbk5j1XeEI3k8gYNqgXjOouDFClY9k4D6+T5jzn91Ep5JsJ3FTtGuR41h5tEtOOUdeJGnCYgGZtwFjhzNaubS2q8tL+ivQ5VYYH0sUpiHP0bllkIObxhjYsxg+i+GzGP4KMbwO/gw1PPB6ghwm3/+jHtYMXl9dHUreJy5FEQVt8MZabc/XuwI9F1FmGu7uG0id90afknudKkl0t7v+oNMCIx+uPAS6gyI6x0tsoX/YNIIxuKXRY5C3h8ss7itN3dh1JWsPb0L34W38leA7xe/b29vJQcDEbZ/UcbrgDz63F/wK/UrT5d9oRzEN9yvIYGgsrgXeDXdvATdsXgfAwKFdR82fbdMJAivvjcuGw1zqUFzwEpXnF1wMuRExXR3mwQq/iS6jyfg9bpJiQTabdw1iDaW06JvtGeFGvEcCSPGK2qPgV9qK/xLXDARtNJ1KETRKz5v2FfPmO6+MxN6p07IcT9RuU3ab7VnXk9l+vdOcQi11XHJD0CgCMhhNxsA6015evLq4hPsk9Yyp5ngea2633zi8X9wO+T3mwACrWHDgkVe/twO0MmK54qoT70hO9NazB97jdz80kgvVuTmkdJlBky7AYJ8wkYuUMnMGK0qvbAbb7YI7/GhlXVP3t4CWsmLOYM2t4AvCazbfXyxiwnzFDWTwZ5Kfl7H2yFyGlA/3pIhkInmM8hyNP2k771TA5Hp6CwwWzVu30gX5WB7fwfwOMgB6MZN3TNDYtwXJVRlIPTJIMen3A+hBT+M= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Inspect Workflow"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/inspect"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Inspect Workflow - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"WorkflowServiceInterface"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"WorkflowServiceInterface"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/invite-user-to-workspace.api.mdx b/docs/docs/reference/api/invite-user-to-workspace.api.mdx index 0acb514d02..50beb5d89d 100644 --- a/docs/docs/reference/api/invite-user-to-workspace.api.mdx +++ b/docs/docs/reference/api/invite-user-to-workspace.api.mdx @@ -5,79 +5,407 @@ description: "Assigns a role to a user in an organization." sidebar_label: "Invite User To Organization" hide_title: true hide_table_of_contents: true -api: eJztVktv4zYQ/ivEnLKAaqdBTzrV7aZYY1skcLztwTGCiTS2uCuRCkklcQX992JIPe0k3UWBnjYXR5z3NzMfWYPDvYV4A1dmj0r+jU5qBdsIUrKJkaX/jGFhrdwrK1AYnZNwWqCoLBkhlUAl9Mh4dqtu1cLsbXyrhBAT2Z1MxZl15l0s1hmJ5Xuhd8JldOyA7Uo85BpTcbZUj9LRih4qsq617ISJVg6lkmp/4kbINAo5UoEyjwSqdMje19NGetLmiy0xoVfT6zV8cStylVFdffda57FYm4qEDNo+yBNaYaskIWt3VZ4f2pCURuI3zC0J7TIyT9K2PlFa6lx+WK+vL58T8ujHYhnc+lpSTVYo7USGjyRKMoW0lqt1mr922hTCZdIKTEZYvujQkGA9JcgYbdr8OiQ7oLrAM4hAl2Q8tMsUYpC+LXcsvHP6rocIIijRYEGODE9WDQoLghiOBgEikDxaJboMIjD0UElDKcTOVBSBTTIqEOIa3KFkc+uMVHuIwEmX88F4YsUyhaaJ+ljjlv7nQH91zkKUbfBB1v2i0wMbHrvkqSTlWIRlmcvE5zj/bHmX6tOIaAweOE1HheXz0jDWTpL/8vP7VoKXXqGJgLvmTVAdrnYe/N7n1LiJpsEZu/ZAVXkOXGXnfuW9NoOJvv9MiZtguWmzHJlN9tYHbAXXYXmhadinIVtqZUPeF+fn/DMln5t+jcSqVYavBzlE+eni4tTxn5jLNMzPJe/AN3g9alFKru3RKz3MdTKRDg067kt/IpWjPRlotsfNGqD8XYcEGd7C7t8akj/IWtzT0Pk35skTwpql/9Z1riuEbvVGAzDAG9B9vYz3Ab6XgnUqTGEnDkNvC3KZZkoqtXWeflwGMczHhGPn9RH/NPOeJOy8HhNGMw/cBhFYMo8djVUmhxgy50obz+dJrqt0hntSDmco51hKvzSWkspId/Ami+vlRzp8IEzJQLzZjhVueJTCcEzVBloo5UdimFpSW1Qu06a7o1tWy4IV48BDuhqY6fIZi5Kx2/QUMrS6ZYpNd+JTk2qnffwW84WvTiyulxAB4xDW5nz24+wcTp4IY2V/Lyd+jbrkvRiiIxh7ACHqk3SExc+DgEvjzhaoRv4Cu4hPfCmutZg8X45Sq4et/v6Q+f6Q6TnG0bOblzlKT59+LuuWPDaT14qFCOLT58vAHyw/eXJ4CtlGkDErxRuo63u09MnkTcPHDxUZZoltBI9oJN63q5pKy/+nEO8Y3jdm+WzVEvE78VpRHZMoppFHzCv+ggi+0OGFFxlfPv9j+Ali/pbLOqasW5VfQ7Qf/F00uDi5mjnzYLFIeDre1N2Orozrq5s1RHDfvuQKnbKNwSfmSHwK6eoyTAE/9fishhzVvuLbNIbgk//+AaHXmm8= +api: eJztVk1v4zYQ/SvEnLKAaqdBTzrVu5tijW2RwPG2B8cIJtJY4kYiFZJK4gr678WQlC3HG7dFgV7aXByR8/lm5g07cFhYSFdwZQpU8nd0UitYJ5CTzYxs/GcKM2tloaxAYXRFwmmBorVkhFQCldAj5cmtulUzU9j0Vgkh+O5O5uLMOvMuFcuSxPyj0BvhSnqtx+INbiuNuTibqyfpaEGPLVkXNYfLTCuHUklVHJkRMk9CaFSjrBKBKt8H7dOInp61ebANZvRmeDsJn9OCXGvUkNa91lUqlqYlIYO0d/KMVtg2y8jaTVtV2+iS8kT8hJUloV1J5lnaaBOlpcHkp+Xy+vIlIw96KubBrM8l12SF0k6U+ESiIVNLazlbp/lro00tXCmtwGyE5TcNGhIspwQZo02Mb0ByAGpwPIEEdEPGQzvPIQXpy3LHl3dO3+0gggQaNFiTI8MN1YHCmiCFUH9IQHIjNehKSMDQYysN5ZA601ICNiupRkg7cNuGtawzUhWQgJOu4oMrU4h5Dn2f7CyPC/iP7f82GAte1sEGWfde51tWfG2Se5CU4ytsmkpmHqPpV8sD0x17RGNwy2E6qi2fN4aRdZL8l+/WUwFeeoE+Aa6RV0G1vdp4qA9cMELxQLVVBZzLYGThdfs+GST0/VfK3AFiqxjLSO1gFjmG4eI6DCT0Pds0ZButbIju4vycfw555GY3GmIRheGvQxm8/HBxcWz4V6xkHgjgkvv6b1h9VYicXKzEG5WqdHZwe1SGWLpRHaRyVJCBfr1HfuiHAcqfdQiQ4a1tcaoVfiFrsSDYGTvRNX7Il3z7Z1XnvILrKDdqgD28Ad230/gY4PuWs0GEaenIYKhtTa7UTDONts5TiishhemY4e20C5zST3cMYKfdmA36aaApSMCSeRoYqTUVpFA619h0Os0q3eYTLEg5nKCcYiPhaO/5W/GBRf0gWcpaI93W25tdzz/T9hNhTgbS1XoscMPtFRrmUGw/rY38TAxdpLNZ60pthhUc+awMWowNN+5iz0mXL1g3jOdqRx778keOWA0nPjSpNtr7j3WIyb3H7IEUMygDFfI+n3w/OX8LjaggZtfzOGaY+TEbEvFikLzCe4c0JLuAHWH94/6C0+TK16hG9gL7iC+8CJdaHLxUXoXY7af+/zfLf/jNEkfM0YubNhVKz6q+HbvIKSs44BRIIN29VPa0wsdHzwzPLOsESuaodAVdd4+Wvpiq7/n4sSXD/LBO4AmNxPs4pLm0/H8O6YZRPdG5Z4tIy+/EW7kMHKKYQJ6wavkLEnig7f7NxRvoX/R6AJRfdeVAjV0U+RC8fecX0t7E0X7myIPGLONeOCm7Hu2N66ubJSRwHx9ttc5Zx+AzkyI+h3B1E2rOrzo+66BCVbS8UlMINvnvDxCnhYQ= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Invite User To Organization"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} - path={"/organizations/{organization_id}/workspaces/{workspace_id}/invite"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}/workspaces/{workspace_id}/invite"} +></MethodEndpoint> Assigns a role to a user in an organization. Args: - organization_id (str): The ID of the organization. - payload (InviteRequest): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. +org_id (str): The ID of the organization. +payload (InviteRequest): The payload containing the organization id, user email, and role to assign. +workspace_id (str): The ID of the workspace. Returns: - bool: True if the role was successfully assigned, False otherwise. +bool: True if the role was successfully assigned, False otherwise. Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. +HTTPException: If the user does not have permission to perform this action. +HTTPException: If there is an error assigning the role to the user. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"title":"Payload"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <span style={{ opacity: "0.6" }}>array</span> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"email"} + required={true} + schemaName={"Email (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Email" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>roles</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/invoke-workflow.api.mdx b/docs/docs/reference/api/invoke-workflow.api.mdx deleted file mode 100644 index 7649c17bed..0000000000 --- a/docs/docs/reference/api/invoke-workflow.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: invoke-workflow -title: "Invoke Workflow" -description: "Invoke Workflow" -sidebar_label: "Invoke Workflow" -hide_title: true -hide_table_of_contents: true -api: eJztnVtv27gSgP+KwaezgHJp2qS7fjrZxIvmNE0C2+0CJwgCRqITbWRJS1FpfQL99wPeJOpqSbbTODt9aGBZvA2Hw5lPFucZMXwfoeE1+jOgjzMv+B6hGwsFIaGYuYF/5qAhcv2n4JHcfld3IAuFmOI5YYTyos/Ix3OChkjfcOs6yEKuj4bo75jQBbIQJX/HLiUOGs6wFxELRfYDmWM0fEbYX1zORDVsEfJqIkZd/x5ZaBbQOWZoiOLYdVBipXf4seeh5MZCzGUev6A7PzhzUMJvLPYo8uL7NfSpVR8mvK3KXjxh6mKf/UT5fJM9qJWT7uFLykv3qV5ulDy5kRv4P1FwY9WFWsmlfXxJ0aW9aiG7J0L53xfv2jfVbsJv462RiP0eOAveQtY4ozGxkB34jPhMNB6GnmsLI7T3VxT4/FrWtZByE8VcEvFP2TIn9Mm1ya1qpnznzBPmzhwbdhyXt4K9q9ytpdHfBYFHsG8OXwvkJrH0peDuL2KzRhn9ITqRWGhOGO7ZmfJUuD4j94TmW57f5a+YY6huC9kutWMP03/9EXvef6LA3znzw5j9gqqG6DIyb1cIU4oXzWLJFUWdRPqFS5KX6D+9LyDRi+DcjdgymdaNsVi6m4SmSue0Gei5vtPVbCEHF7U3v9ZMJ+G1zsg26fhVJs+EG/EwZiDZtUj2TMoysVAQMxBrT7G2sB6XSry8Goptcgs2Yr2aPOVSHeQthZQ02It1SzmzGlLCYDs2ajuk0IsWpMkBiULsd56OlavIRHc5Jd4kxP4vqEqwxrcFkXaLJiaii4mFbEowI84tZi2jXwczssPcOWms/0RWOzgWMxiHziYa+SqrVY04xCMbaORUVqsa0eK6W3CssCZeoIX1+0KAgkxea21FSyttRQtsra1ocaWtqI1ENFCstmAaxf188Sy5nSuvujvElEg21jM0uRIV5Poqb20SB/HjOV+0nHFK2oAshH0/YPpD7D/6wXcfFU3RlNdU7o8ed/um8T1HHhayH7DLGzQ4K8PRI/8TBB4vML8jjiMLa3zjeXNeNJiHHlEdth8wE2CHYv+xegBc7Ev6/+j6SzRJ939ydXxx+/ns4vT268XkanRy9sfZ6BRZxvWzi+lofHF8nrs4GY2/jca5SyfnZ6OLae7S1fjy9OtJ8b7Li8nXL6OxOSRtTj/zftcPS+KxfgomlPUCCyuDIoYpuxU2ZwUbVbnHF5vlLQ2msiQivvMirY58J20zYpjF0a0dOC1VejI9nn6d3J5cno64UozEnBrXLj8XLozG48vydIpmT3ir1RMquzUnUYTv+8+qqGXwRdWSWAgzRt27mBVdA/Dl+rnLx5k8E26XZoQS3y7KTvW26IGtj1cJMN9XSQRft9D6dle5TYGqbU7VSgXz1mWs9dBoYXnnxpn2JhbyXP+xnRp384W6elqgRi+qRtljq+t0Yo1JK2xj567/2EnHzoVWJRZ6wNFDSzMJhmmrNcrUl084euikL5+kmnDn8IdNQlbaLmHS+k3aKBUnl+0T8Yt0r2Yx6iCjznTrGIL75RHD83AtzrwZoKYVw1L+mZuDUARzngtbw4jrVKe1PpJauKzhdC/KKExFrGyKFcgnkE8gn0A+gXwC+QTyCeQTXEUgnwTI51aqGpBPUCMgn2CYtkGjgHy+xkkD8gla8cbJ5zrQ4xJ7Ju6aUlITxTH+TcOPT40AoG49GU6+HzhqQ6xemptlWJ47I/bC9hoH1I7TrhvJtqevrZFlJ0SZ1bp6lY0qd07usb041zNxOr2s1jsaBBWvRlZPdd57yvtKS1ZifuWNg4DJHqV6v2r7uvkNUE5SCzk7DZpXpAbtK4S0+qBb77GdOazBXzWSXc5hGwhs7uVFZwWRqkEX6lOSlfi8ye5sWLUlfq9dbppZFsJizjYbu5X5PAUiqmBo58Ijf/nIZLdk/QW3SolbssfygDQjrVMyTUMFAS1RzxzxRCuCzZRoLhms6HKpE2qcNRFFYVM1/dhOk5FzVPVSrd2X5cpZm1zELNqPFW/QdKLHuobOrrZ8238jjmc2I+q+qqimdq2W32lezwBOsXw/fU4Yde2NyOiLqrrDuQI9msAKZG9kCGNebye4WLdwVt32+3kjlJA1PoXm3Rm02IzEd1ZhT+IkTbtbnelbwIjXZPWWPSFtakQ9pXxBg7F5gFFrtvvDiA1ayFaheVfd0dF5l8UrTnv5URGKbDJUXRkfnMheKwG9mlnVwqxA8D3twBK4MfrBKK7dSFMa0f/dWwAWACwAWACwAGABwAKABQALABYALABYALAAYAHAAoAFAIufDiyy3+PwyTqdXla/7pZ9WRhRt5+cXIgO9lAHFT+rMFYFdsrLT73jwm9btJjgtySAZgDNAJoBNANoBtAMoBlAM4BmAM0AmgE0A2gG0AygGUAz5Oegme3o7zEPBrERX+V63bVDWQYzqRGlhtTbUMTJYuU2AaKuROcum8gsYsrPqoIeNQc51GnlP+dchwbpVp060M6Paz52oJ3QDbPe+wCc8gkFfarKNpsm/JZ/c76FnFKHy6bEIT5zsdf2ndYqMppWwdWM2JS0S2zSdVOaqKo7LMuxyu2XWBVJDpflJFvf2oup2xvBUlfW4PWvweM1PBDs9EidBOaoYI5KHe22nX5S05Do5JltZwReQ294Db2LFVFS57gCh6Hrt00CWZRvF36hGxKzTt2w93OjiSydWJAxcc3nFeTzoKnksJvZxmTViUhhO3PvY5k+exNtneQaaLNx6lS8dQ7tEre7Nruu0Sme0Pe2mCc8SRLhLEdh4EdSYw/29/kfh8glI0SEJrFtkyiaxd5grG5GvXMBr287W/fBQm8qX6rMw9Z1+ZdKdVj/suwqBmBrUiBuh3C3MWvqq5RsC7O03YlTX6XUawLzrc6duk2C3t70qa9Syq3JE2RQrTnMC/IIQB4ByCMAeQQgjwDkEYA8Al1mdbvzCLxKd27Jr5AglYAB1kDbNqptkE0ANGljmgQJBUCpNmqe/iE5BbZj3iCtACjGqrvE688sADlVgYUCCwUWCiwUWCiwUGCh4C0CCwUW+ia0DVgoaBKwUDBP26NUwEJf6bwBCwXFWHWXeP0sdB0wcolVgyyrcDImnIypQgk4GRNOxoSTMeFkTDgZs+yr6qVauy8v4GRMOBkTTsaEkzHhZEw4GfMlQnM4GRNOxmyGG5BlFYAFAAsAFgAsAFgAsABgAcACgAUACwAWACwAWACwAGDx9oHFm0/lAb8lATQDaAbQDKAZQDOAZgDNAJoBNANoBtAMoBlAM4BmAM0AmvlpaGY7+vtGs6xCrs+l234W2TlkhmOPZWHd4f6+EX2gY38Q++RHSGyOpQilAR0Eth1TSpzdwZVHcEQGjC4G+B67/sDDjNBdEatXhowlYbQ5BOZE6nHa1cP9/RbQo1G+642yjL71F9h647QGvZGxb7fUqSq7mszM9uHgAJWSsX3DnusIl3sw4oPun4nNIQy7wiut8Sa8wM592+Xd4Jt6M3eu4weuGNF9k49hhNfLAnohjIFUuCUWlI9LNl0OaDPxSunWD+NUiq9pej9Np1elCuXc5if1TGTmG/yZ0cI5YQ+Bg4YoDCJeZYjZAxqivZCn0iXf9zRYjPZkVj8k8yeKfFPXzzJ3LXpgLIyGe3u2F8TOrmCSeBe7ezh0hUJHxI6pyxaiyPHV2WeykLlS0fD6xrxBJPCUSpG/LZ0PHLqfyUJjxSE6jtlDQN3/6eDQ5cOU+XCFyLhyqkzBPDfh6AfmzJNXWJvOcPiMZh4WqUOziJxLP72WviqcqYfGD7l8XGauuVx6tKQyfVdSyjOVlJMiJUa6Hn2OZGKg+Yq+KY/u2nTPs2/TXTK7lHskZD76yW4xH+CUr6rHMFVfmMs5fZ4hbn4/w78ezo4+7Bx+fPdx58Ph0cHO3fuZvXNg/3b0fnZ0hGf4yHwI0b6QlZmNJ8MoaLDfpSKldplZUGp5r16wz5B2tzEp0qzYMjrYP/iws/9x5+C36bvD4eG74cGvu/sf3/1X8d2GG3LegNymU4CbuQHZFORgqREbN3WhaBtL9eZ3v+xqLuZKMmqX42u5RaeAVeYGmq6GQYg6KYOmPS2n5ybjKpKf1A0o4xXXz2VNMWRbJ5Abc5hGkN1q3RZj2iQXziXSG88dkmY418WE8UY7adb3pDHVeoXhEbnRzY+e+THLWp5LmJ1P3mxkVc5KFq1mltG3IvGu2AZdfxZIBTcjmMHx1Rkyzfn+7rvdfVTcNXM381nBNsuIk/o6HZ/eDNNtUDx9Ex4QYgTP/519wXvG99059o36ypt0rjup/nPl2As9/rQvyyIv9+9rpPZv49FgJHZHsYffWOiBb/fDa/T8fIcj8pV6ScIvy0eDXPscN8J3HndkZtiLiIUeCbfd6fyL+PQJezHvinDNlpUQx+R1LPOEqYvl+a09S/ZpNdXt7s2mRVdqN4u9s/I3/AN1eQXCbdILSMyWrOhEOug7U8mVddmSs877Iksc29z6N957YziJV5cTvo/cBY74RcRcbi8Ucz3j/w8RslAgFFXsP+LaM/Kwfx/LDULWyf/9H53l6Bw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Invoke Workflow"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/invoke"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Invoke Workflow - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow_service_request":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Outputs"},"trace_parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Trace Parameters"},"trace_inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Trace Inputs"},"trace_outputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Trace Outputs"},"trace":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},{"type":"null"}]},"tree":{"anyOf":[{"properties":{"version":{"type":"string","title":"Version"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["version","nodes"],"title":"AgentaVersionedTreeDTO"},{"type":"null"}]}},"type":"object","title":"WorkflowServiceData"},{"type":"null"}]},"references":{"anyOf":[{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"type":"null"}],"title":"Links"},"credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials"},"secrets":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Secrets"}},"type":"object","title":"WorkflowServiceRequest"},"workflow_revision_data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","required":["workflow_service_request"],"title":"Body_invoke_workflow"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Outputs"},"trace_parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Trace Parameters"},"trace_inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Trace Inputs"},"trace_outputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Trace Outputs"},"trace":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},{"type":"null"}]},"tree":{"anyOf":[{"properties":{"version":{"type":"string","title":"Version"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["version","nodes"],"title":"AgentaVersionedTreeDTO"},{"type":"null"}]}},"type":"object","title":"WorkflowServiceData"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"type":"null"}],"title":"Links"},"status":{"default":{"code":500,"message":"An unexpected error occurred. Please try again later."},"properties":{"code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code","default":500},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","default":"An unexpected error occurred. Please try again later."},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"}},"type":"object","title":"WorkflowServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/list-api-keys.api.mdx b/docs/docs/reference/api/list-api-keys.api.mdx index 4322c1a472..80f3651c79 100644 --- a/docs/docs/reference/api/list-api-keys.api.mdx +++ b/docs/docs/reference/api/list-api-keys.api.mdx @@ -5,65 +5,186 @@ description: "List all API keys associated with the authenticated user." sidebar_label: "List Api Keys" hide_title: true hide_table_of_contents: true -api: eJzdVMtu2zAQ/BViTy1A2GmPOlVogzZIgAZ5nBzD2NBri4lEMuQqjWvo34ulZPlRtIce64PNx+54ZjjkFhjXCYoZlMGqS9okmGtYUjLRBrbeQQFXNrHCulbl9YV6pk1SmJI3FpmW6oflSnFFCluuyLE1eblNFCcP7sGVcZ2KB6eUUpFeWkqs3t30g/eFuqtIWWd8Y9163PePT2Q4d98Qt9HtAITITL7K6wuhekMpeJdoXqhS1cLSrzLJyz+RzLRAgw8UUeRdLKEAaV1gsAsRBxrigJug2MLHszP5ObbktjWGUlq1tdqRAA3GOybHUo4h1GKF9W76lKRnC8lU1KCMLFOTwUMUJmxpmNHKvsmIN4GggMTRujVoYMu1LFz3FZ0GE0mkLZD/Vv+5r1IlS0+NiRdtGrvQbb6voJid9nd6XHFtXUM33yNeYWJ1n0ZMegu2t3KxRKZ/hT0fYdQXgek6vavt45CP5aW1kZaS1sGqIx8OWf4eEtgjYoy4OXBpV5IDpsaL0MlHQ0NceYnJmoRFQK6ggOmQlUTxlWLKcttYQwEVc0jFdGpq3y4nuCbHOEE7xWCz5ESmjZY3uaUn+Y1wSRGK2fyw4Fby0ifjuGy0EYO9JFHisJF52XLlo/2ZjQQNVrJa9V0ixbqVz+2D8DKTkysDGkRGn+6zyYfJGZw+A0fFEnU0OUW7/87boE9cGPWDBmrQyh4TNp/2G8Is+MQNugO847M4IbPd37X/8XkajpfpjaehRuskvNnX7ZC/GTwPb3XlE8t8u33ERPex7jpZfmkpSsTmGl4xWnyUA5/NO73Lg6TvmTZycsZQkGi/Yt32sTp5vCSV4zX4en4HXfcLULMi0A== +api: eJzdVE1v2zAM/SsCTxsgJNmOPs3biq1ogRX9OKVBwMpMrMaWVYnumgX+7wNlx00ydIcdl4OjD/Lh8fFRO2BcR8jmkHurLmgbYaGhoGiC9WwbBxlc2sgKq0rlV+dqQ9uoMMbGWGQq1E/LpeKSFLZckmNr0nEbKUzu3b3Lwzpm904ppQI9tRRZvbvuF+8zdVuSss40tXXr8b55eCTDKfuauA1uDyBE5vLJr86F6jVF37hIi0zlqhKWzSqRvHiLZKIFGhpPAaW88wIykNQleruU4kBDGHAjZDv4OJvJ37EkN60xFOOqrdSeBGgwjWNyLOHofSVS2MZNH6Pk7CCakmqUlWWqE7gPwoQtDTta2RdZ8dYTZBA5WLcGDWy5koOrPqLTYAJJaUvkv8V/6aNUzpJTYeRlG8csdNsfK8jmp/mdHk9cW1XQLV4RLzGyuosjJr1420u5LJDpX2HPRhj1VWC6Tu9jezuktjy1NlAhbh2kOtLhkOWfJoFXRAwBtwcq7UOSwdQ4CJ38NNTEZSM2WZOw8MglZDAdvBIpPFOIqdw2VJBByexjNp2aqmmLCa7JMU7QTtFbOB2tPN2qLxKa9Ihk2mB5m/D6Cr4TFhQgmy8OA27ETL1tjsNGjdHbC5IyHdayz1sum2B/JZVBgxUCZZ8ldVq3alL6oMrA7TOaDbkCNEidPe3Z5MNk9lYxQ4IM4jATaJLd9jxSGOgTuUahQAPVaOWOCetPrxfC0jeRa3QHeMdNOyG1ex3K//EdG1rN9MJTX6F14vKk624w6hw2w6NeNpFlv9s9YKS7UHWdHD+1FMRuCw3PGCw+SPPni07vvSFO3NBWOmcMeZmBZ6za3mInr5w4dJyXb2e30HW/AYK5MV8= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List Api Keys"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/keys"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/keys"}></MethodEndpoint> List all API keys associated with the authenticated user. Args: - request (Request): The incoming request object. +request (Request): The incoming request object. Returns: - List[ListAPIKeysResponse]: A list of API Keys associated with the user. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}} -> - -</StatusCodes> - +List[ListAPIKeysResponse]: A list of API Keys associated with the user. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"prefix"} + required={true} + schemaName={"Prefix (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Prefix" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>last_used_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>expiration_date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "prefix": "string",\n "created_at": "string",\n "last_used_at": "string",\n "expiration_date": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-app-variants.api.mdx b/docs/docs/reference/api/list-app-variants.api.mdx index aa96e137fa..e5b1038d05 100644 --- a/docs/docs/reference/api/list-app-variants.api.mdx +++ b/docs/docs/reference/api/list-app-variants.api.mdx @@ -5,73 +5,585 @@ description: "Retrieve a list of app variants for a given app ID." sidebar_label: "List App Variants" hide_title: true hide_table_of_contents: true -api: eJzdVk1v2zgQ/SvEnFpAsNNgTzqt2xSt0XYbuE724BgGI40ltjLJkpR3vYL+ezGkaEv2Ou42tz3FIWfefL15VAOOFxbSBUy0trBMIEebGaGdUBJSmKEzArfIOKuEdUytGdeabbkRXDrL1sowzgqxRekvpjejB/kgJ6aw6YNkjNHpSuTshXXmZcrmJbLpDcG4Er2HU8zEIH1YjzNDVxsZoT4K6xYTre+D2QytVtLiMmWT89lRnEF+kIDSaDhVOM0hBXJdUZrRDxLQ3PANOjTUmwYk3yCkEGqBBAT1RnNXQgIGv9fCYA6pMzUmYLMSNxzSBtxOk5d1RsgCEnDCVXQwoURyaNsleYciLDlcX13Rn+EIvtRZhtau64rFiiGBTEmH0pE517oSma9n/NWST3OaBDeG7yhzhxsfSxvqghMhclfZTySdeNvQkKet/yCbNoGurRfwu6F2MaLPpTjRK8bSRn3F7FKs22DVxXrkFi8Ges0t7qN4j6dDePuAnym5FsXFCG+82T5GbYQfjNx9XnsODv3aZH8i66oC4lJEujOCEAxuhRWBD52pkA4LNL2os2hEiRrkDvMVd78a+U1AYBPnS9D5M/HuAkKHt1G5WAvMV4+7rvu/gvmpQ2Gvd92AlCm4FP/4DXoG8OceTIf8lzLfrOYZPgP2z4gRNCOJhuqRODwQoMVBofZLOti/o8Ua7Et/EQ4UH9K3R6rlYNmPJHlFxR8oFg69fjNShvsotG1LBf12fX0qe/e8Enno5VtjlPkvmjfUthwdFxX9OiN+lcoGtz8xpbhI7fIwkCixse6PKiToqWuLp3b/E1rLC7/3weS8qW8Gm9PtJTJQXSF0Z7fsC2dsb+ju+TJuQvv+LVg0eT+f354Ahtlu0JWKXtkCnX9XXQkpjLnWdtwEtrbj3sNr0Wzjq1ubClIondM2HY+zStX5iBcoHR9xMeZa+D2xmNVGuJ13mdxOP+DuPfIcDaSLZd/gC/EjTHxodngktfiAVHv33k9qVyrTrXR89svgRcUJuVbePS6CT45Nbqe0aWiC+sLV6NXoCo4/rQbGRG2eeWrH2P4akqMu7OuHBHDjeQ0O+eb3wwVlppV1Gy57eKfLd5RQc9iv/+lnXzdlh3+7sa64kOGd9dIQiOkFlDqT7oV0z81lAqWyjoyahuTxzlRtS8ffazREv2Vn/UhkWDSQC0u/c0jXvLL4RL9fzLq1fcnO5RkpKnc+qaqm/yCBb7g7fJl6OSoj+5vucpJlqF3P7UQ9aU32m/ru7Rza9gdYKx2V +api: eJzdVk1z2zYQ/SuYPSUzHMn19MRTaTvTaJI0HsV2D7JGA5MrEjEFIACoVuXwv2cWICRRqqw0vvUkCnj79gP7FmjB8dJCOoNMawvzBAq0uRHaCSUhhSk6I3CNjLNaWMfUknGt2ZobwaWzbKkM46wUa5R+Y3IzepSPMjOlTR8lY4xWF6Jgb6wzb1N2VyGb3BCNq9BbOMVMdLJP63mm6BojI9VHYd0s0/ohwKZotZIW5ynLTkdHfgbxQQJKo+GU4aSAFMh0QWFGO0hAc8NX6NBQbVqQfIWQQsgFEhBUG81dBQkY/NYIgwWkzjSYgM0rXHFIW3AbTVbWGSFLSMAJV9NCRoEU0HVzsg5JWDK4vLign+ERfGnyHK1dNjWLGUMCuZIOpSM417oWuc9n/NWSTXscBDeGbyhyhyvvSxuqghPBc5/ZDwSdeGwoyMvoPwjTJdCX9Qx/f6i9j2hzzk+0ir60UV8xP+frNqB6X0/c4llHV9zi1ou3eNmFxwf+XMmlKM96uPawrY/GCH8wcvN56XtwaNcl2xXZ1DVQL0WmeyOIweBaWBH6oYcK6bBEs+d1GkEUqEHusFhw97OerwMDy5xPQRev5LsPDD3fShViKbBYPG366v8M56eehV1t+gNSpuRS/OMV9Ariz3s0PfNfyjxbzXN8Be2fkSPMjCQC1RP18GAAzXYTaivSgf4OhDXQy74Qdi0+bN+9ppoPxH4wkheU/K7FwqKf34wmw0MctF1HCf16eXk89h54LYpQy3fGKPNfZt5wthXouKjp68Twq1U+2P2BU4pC6ua7A4kjNub9UYUAfeva8iXtf0Jreel1HyCnob4Y7I52zzUD5RVc97j5/uCM5Q3VPZ3GTSjfvzmLkPd3d7dHhOFsV+gqRbdsic7fq66CFMZcaztuQ7d2472L16JZx1u3MTWkUDmnbToe57VqihEvUTo+4mLMtYDD50rmd9k1Qb2ILOaNEW7j+bLbyQfcvEdeoIF0Nt8HfKHmCe0whO1uUC0+IBWmfwxkjauU6fUe3wRVsKLMhVwqbx5VEmK74vkzSi9FNGE8w8Xol9HFqWR6A5bdTnoN8NxrIMbhYZAclGtbKEgAV14A4JCvftttUJRaWbfico/vWKUHgbU7If5P34f9iTv82411zYUMF7KfIaGD/aSlyqTbibtt4nkClbKOQG1Lc/Te1F1Hy98aNNSK8x79RI0xa6EQlr4LSJe8tvhCvd9Me32/ZafijO0qNz6ouqF/kMAzbnZPWD+3qqiEtt/M8hy12zM7GrMkma2kf393B133HXgSLCQ= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List App Variants"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/apps/{app_id}/variants"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Retrieve a list of app variants for a given app ID. Args: - app_id (str): The ID of the app to retrieve variants for. +app_id (str): The ID of the app to retrieve variants for. Returns: - List[AppVariantResponse]: A list of app variants for the given app ID. +List[AppVariantResponse]: A list of app variants for the given app ID. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"project_id":{"type":"string","title":"Project Id"},"base_name":{"type":"string","title":"Base Name"},"base_id":{"type":"string","title":"Base Id"},"config_name":{"type":"string","title":"Config Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"revision":{"type":"integer","title":"Revision"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"modified_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["app_id","app_name","variant_id","variant_name","project_id","base_name","base_id","config_name","revision"],"title":"AppVariantResponse_"},"title":"Response List App Variants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_name"} + required={true} + schemaName={"Variant Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_name"} + required={true} + schemaName={"Base Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"config_name"} + required={true} + schemaName={"Config Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Config Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>uri</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"revision"} + required={true} + schemaName={"Revision (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Revision" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>modified_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "app_id": "string",\n "app_name": "string",\n "variant_id": "string",\n "variant_name": "string",\n "project_id": "string",\n "base_name": "string",\n "base_id": "string",\n "config_name": "string",\n "uri": "string",\n "revision": 0,\n "created_at": "string",\n "updated_at": "string",\n "modified_by_id": "string",\n "organization_id": "string",\n "workspace_id": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-apps.api.mdx b/docs/docs/reference/api/list-apps.api.mdx index 33be1d177c..3b86056d73 100644 --- a/docs/docs/reference/api/list-apps.api.mdx +++ b/docs/docs/reference/api/list-apps.api.mdx @@ -5,76 +5,390 @@ description: "Retrieve a list of apps filtered by app_name." sidebar_label: "List Apps" hide_title: true hide_table_of_contents: true -api: eJztVk2P2zYQ/SvEnFpAsLeLnnSqgC4aI2mz2Di9eI3FWBpLTCmSIUfbuIb+ezGUtJay3STtuSfbnK838x6HPgNjHSHfQeF9hH0GFcUyaM/aWcjhjjhoeiSFyujIyh0Veh/VURumQJU6nOTgwWJLq3t7b4tQx/zeKqWeztV3b1M6NLvIYf99rrYNqWRxR8UNiadiNyZVh1PKdEfcBTsle6Mj7wrv97kqvhHKHepIU/yr7fb25lNJCUmuNqlwIPUnRoVWUQguqDB0q22dYM3LrCAD5ymgxG8qyEGsD2KCDDwGbIkpyCjPIBAghwkNZKBlmB87CifIINDHTgeqID+iiZRBLBtqEfIzoD29PaYcfPKSI3LQtoY+ezqxnTHQ7zNgzUYOCu/Vb1Kml9NA0TsbKUq666sr+Vhy+q4rS4rx2Bl1NzpDBqWzTJYTCO+NLlOn6w9RYs4ziCMMDAGlGc3Uplo+yHxYD5Wld13N/MdGlrA3FfTZZU5f8R6aHPwHv/8+sK3Y+gw6XyFT9YD8pervBy9VMPR9Nrm5wwcqeUHobmo8m7M/K7KEIQimnxMXSeoqXce+l2o/Xl8/J/F3NLpKFKkb0e6/YXDJVEWM2si3F6g0rlxYv2Hk2jLVFKDfX6Y1CWbq940bAMoM2lh/afy/UoxYJ74m3l9yTcMY2f0KU9LXUHr0m3FzGe8w3Zfb+HkY3z8Vm1xk9zxLOHDbEjdOtklNnPYIN5DDelwrkcLjtFO6YCCHhtnHfL0ujeuqFdZkGVeo1+h1kniksguaTymkuN28ptMrwooC5Lv93OGdqGHgd+l2ueBevybpdNxmRceNC/qvgbRxpTVDlLSi7dGl8EneCZwqbjeQgbQxCPdq9cPqCj5/ZxbOImQsk5Cn2sksN2kxhaf+IQNqk4qBCdufLgZB5l3kFu0s3+WKfQbkfLlF/79987dvFAXTJ157gzpd28TGeVRtWn3pL0TjIsvv8/mAkd4H0/dyPDx/IsxKRzyY2QP4B52W7+Ujmk7qJVE/YtDinzScTZqTRENcUUpvs6hn60+yPF21X2620Pd/A86yDpM= +api: eJztVk2P2zYQ/SvEnFpAsLeLnHSqmi4aI0mz2Di5eI3FWBpLTCiKIUfbuIb+ezCktJaz3STtuSfb5Hy8eW9m6CMw1gHyDRTOBdhmUFEovXasOws53BB7TfekUBkdWHV7hc4FtdeGyVOldgc5uLPY0uLW3trC1yG/tUqph3P105sYDs0msN/+nKt1QyredHvFDYml4m4MqnaHGOmGuPd2CvZKB94Uzm1zVfwglBvUgSb/F+v19dXnkiKSXK1iYk/qLwwKrSLvO698qlbbOsKap1lABp0jj+K/qiAHub2TK8jAoceWmLxQeQSBADlMaCADLWR+6skfIANPn3rtqYJ8jyZQBqFsqEXIj4D28GYfY/DBSYzAXtsahuzhxPbGwLDNgDUbOSicU39KmkFOPQXX2UBBwl1eXMjHuaZv+7KkEPa9UTejMWRQdpbJcgThnNFlrHT5IYjPcQZxhIHeoxSjmdqYy3nhh3XKLLXramY/FnIOe1XBkJ14+o51KjLZJ7v/Ttha7oYMelchU3WH/K3s75KVKhiGIZvMut0HKvlM0M1UeDZXf5bkHIYgmH5OWsRWV3Ech0GyPbu8fCziezS6ihKpK+ndf6PguVIVMWoj356Q0nTl2e0PUK4tU00ehu2JralhpnpfdQmgcNCG+lv0v6YQsI56Tbo/ZRrJGNX9jlJSV0o92s20OdGb2H26jN8Tff+UbDKR3fMoYNK2JW462SY1cdwj3EAOy3GtBPL3007pvYEcGmYX8uWyNF1fLbAmy7hAvUSn4evdXcRb9VxMY/8HKnuv+RDjFderl3R4QViRh3yznRu8lVZJ4p+bnabf6ZckNIyrrui56bz+Oyk67rsmeUmd2u676D71fsL2G5Yfycq0SJ0J9sXil8XFU8WMDqq4Xo0dj2Xs+AlHNJORO6PrgSjIgNrY7sCE7a+nC0HpusAt2lm80yx+Beh4Grf/H8n5Izk2CNNnXjqDOs53VOM4tnfckfG/RtMFlt/H4w4DvfNmGOQ4vZPSpJUOuDOzl/IjHc4f1ns0veSLDX6PXot97Ods6j8JlPyKUmqbeT3akxLlYSb/uFrDMHwBH3EdIg== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List Apps"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/apps"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/apps"}></MethodEndpoint> Retrieve a list of apps filtered by app_name. Args: - app_name (Optional[str]): The name of the app to filter by. +app_name (Optional[str]): The name of the app to filter by. Returns: - List[App]: A list of apps filtered by app_name. +List[App]: A list of apps filtered by app_name. Raises: - HTTPException: If there was an error retrieving the list of apps. +HTTPException: If there was an error retrieving the list of apps. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["app_id","app_name","updated_at"],"title":"App"},"title":"Response List Apps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_name", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "App Name", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>app_type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "app_id": "string",\n "app_name": "string",\n "app_type": "string",\n "updated_at": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-bases.api.mdx b/docs/docs/reference/api/list-bases.api.mdx index 14d885bbc8..acab4a92c1 100644 --- a/docs/docs/reference/api/list-bases.api.mdx +++ b/docs/docs/reference/api/list-bases.api.mdx @@ -5,78 +5,363 @@ description: "Retrieve a list of bases filtered by app_id and base_name." sidebar_label: "List Bases" hide_title: true hide_table_of_contents: true -api: eJztVt9v2zYQ/leIe0oBwc6CPelpHhKsRrsmSL29OEZAS2eJHUWy5CmrZ+h/L46UbCme2+1xwJ5s36/v7rvjnQ9AsgqQr+FnGTDAJoMSQ+GVI2UN5PCI5BW+oJBCq0DC7sSWLcVOaUKPpdjuhXTuWZVCmjIqn41scPZknszCVyF/MkII4fFzi4HE1WP68iYXqxqFMoVtlKkG/SxZ9xGvAvnecHnL2FQj6wTZPgGx3fcuR2RxdR+zl3odyG8yYfuffaRo08dip2kwcYs72WoKLP5gTSrkEan1ZqjlvQq0ZsLuW3ItbXKxOLJzEgu7/YQFBeHReQxoiOtk1BN3TGUCkCrgEP/tavVw96XAmHculjFXj+JPGYQ0Ar23XvjUmSFmCgUZWIdesuOyhBw4reeogwyc9LJBQs8dPwATATkkriEDxQ3/3KLfQwbcD+WxhJx8ixmEosZGQn4A2jt2C+SVqSADUqRZsHBOLEvouuwY+tiTy9F3UodJeGn297uY3xSIw/YS02oN3eYEzaSLD4zTsdhjcNZwzfkBbq6v+WM61h/bosAQdq0Wj70xZFBYQ2goZuGcVkXkcf4psM/hnALpveRqFGETsZxn9kkl5Fi9Kr/FWUycSctGXH3Pvi80G6zSnE1YXR/Bx4FfMZbGlLEH6cBFnHCRVkLXMdSPNzfnLP4utSojR+KOZ/LfUDilqkSSSvO3C1xqW0y0/2BKlCGs0EO3OVE1dGwo+L1NCTIJTai+Rf2vGIKsEI7BLptGMsSKtd9rE9eVoHu7UY9O9CZ2L5dxm+j7O7DBhHfKWcDU2waptrwsKqS4JaiGHObD1gjoX4aV0XoNOdRELuTzeaFtW85khYbkTKq5dCo+y4BF6xXto8viYfkO929RlughX2/GBh95HFKDp2anJ+bUO+RS+42yaKm2Xv2VutZvlTp5cS3K7Gx0H5ZSTE4sHpaQAZeRJvd69sPsGl4fu4kxT7Is4iQP2FEN2SsWjvVDBtjEMQZC2fx0UnBmzgZqpBnFGz2yV5kcTu/o/wv8n7vA/egSfqG501LF7RJn5tA/rrSe49+t2gZiweHAot+87joWp0PJ76dUQW716FRenJTYWF4sb8SlLP7A/fjiv0jdslFcm2dAyXh8w0/2G/7hFTvER50Nj5BTTo6LgvkbeZ0dBI5yXD6/3K2g674CcIabKg== +api: eJztVktv2zgQ/ivEnFJAsNOgJ53W3QSt0UeC1LsXxwhoaWyxpUiWHGXrNfTfF0NKlhyv291jgZ5sz+ObmW8e9B5IbgPkS3gtAwZYZVBiKLxypKyBHO6RvMInFFJoFUjYjVizpdgoTeixFOudkM49qlJIU0blo5E1Th7Mg5n5bcgfjBBCePzaYCBxcZ++vMjFokKhTGFrZba9fpKsO8SLQL4znF9zbKqQdYJsl4BY7zqXQ2RxcRuzl3oZyK8yYbufHVK06bDY6RhMXONGNpoCiz9akwq5R2q86Wt5rwItmbDbhlxDq1zMDuwMYmHXn7GgIDw6jwENcZ0cdeCOqUwBpArY479dLO5uvhUY887FPObqUfwlg5BGoPfWC58602MmKMjAOvSSHecl5MBpPUYdZOCklzUSeu74HpgIyCFxDRkobvjXBv0OMuB+KI8l5OQbzCAUFdYS8j3QzrFbIK/MFjIgRZoFM+fEvIS2zQ7Qh56cR99IHY7gpdndbmJ+x4EYtpOYRmtoV0NoJl185Dgtiz0GZw3XnO/h6vKSP47H+lNTFBjCptHivjOGDAprCA3FLJzTqog8Tj8H9tmfUiC9l1yNIqxjLOeZfVIpcqxeld/jLCbOpGUjrn5k3xWa9VZpzo5YXR6Cj4GfMZbGlGP30p6LOOEinYS25VCvrq5OWfxTalVGjsQNz+T/ofCYqhJJKs3fznCpbXGk/Q9TogzhFj20q4GqvmN9we9tSpBJqMP2e9R/wBDkFuEAdt40kiEWrP1Rm7iuFLqzG/VooDexe76M60TfvwXrTfimnACm3tZIleVjsUWKV4IqyGHaX42A/qk/GY3XkENF5EI+nRbaNuVEbtGQnEg1lU7B8wdkFrXidzaNOxuwaLyiXcSb3c3f4e4tyhI95MvV2OATz0rq/rHZsH9OvUPmoTs3s4Yq69XfqaXdyamSFxeqzMZG9/5ipdxey+ILGl4VrjOlfTl5Obk8V0znIGZ3827kZRFHvs8jmkH2jK4DUZAB1nHegVDWvw0KztLZQLU0I7zRNj7LaD8s3K+n+qd7qrsxJvxGU6elimcozsy+28J0x+P/ssoGYsF+z6I/vG5bFqcXlXepVEGu9ehNPTspsbF8gV6Ic1l8wd34r8GT1A0bxft6EigZjx/7wX7FP7xih7jgWb+QnHJynBXM38jr5OVglMOVenOzgLb9B82nqbk= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List Bases"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/bases"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/bases"}></MethodEndpoint> Retrieve a list of bases filtered by app_id and base_name. Args: - request (Request): The incoming request. - app_id (str): The ID of the app to filter by. - base_name (Optional[str], optional): The name of the base to filter by. Defaults to None. +request (Request): The incoming request. +app_id (str): The ID of the app to filter by. +base_name (Optional[str], optional): The name of the base to filter by. Defaults to None. Returns: - List[BaseOutput]: A list of BaseOutput objects representing the filtered bases. +List[BaseOutput]: A list of BaseOutput objects representing the filtered bases. Raises: - HTTPException: If there was an error retrieving the bases. +HTTPException: If there was an error retrieving the bases. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"base_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"base_id":{"type":"string","title":"Base Id"},"base_name":{"type":"string","title":"Base Name"}},"type":"object","required":["base_id","base_name"],"title":"BaseOutput"},"title":"Response List Bases"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "base_name", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Base Name", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"base_id"} + required={true} + schemaName={"Base Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"base_name"} + required={true} + schemaName={"Base Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Base Name" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "base_id": "string",\n "base_name": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-environments.api.mdx b/docs/docs/reference/api/list-environments.api.mdx index 6ae59d178c..03a799802d 100644 --- a/docs/docs/reference/api/list-environments.api.mdx +++ b/docs/docs/reference/api/list-environments.api.mdx @@ -5,73 +5,569 @@ description: "Retrieve a list of environments for a given app ID." sidebar_label: "List Environments" hide_title: true hide_table_of_contents: true -api: eJzdVk2P2zYQ/SvEnBJAsLeLnnSqgV00RtLuwnHTg9dYcKWxxEQiGXLk1hX034MRRcsf602K7akny+LMm5nHeTNqgWThIV3BzFoP6wRy9JlTlpTRkMICySncopCiUp6E2QjUW+WMrlGTFxvjhBSF2qIW0loxv5k86Ac9c4VPH7QQgt8+qly88eTepmJZopjfMAyV2HuQES4GOYXusRZIjdMR7oPytLod7e4asg2tUzF7LkFhnj5jRn4CCRiLTnJZ8xxSYOPHw3iQgJVO1kjomJAWtKwRUggFQAKKCbGSSkjA4ddGOcwhJddgAj4rsZaQtkA7y16enNIFJECKKn4xY3Zy6Lo1e3trtEfPDtdXV/xzzPvHJsvQ+01TicVgDAlkRhNqYnNpbaWyvp7pZ88+7XkS0jm548wJ6z6WdcwCqRA5FHg55d/5vEsiAz9QXMIRmPHv2N8Hq8EnR1uZHeaPHGgrnZI6Aki9u9v0t3EM1SX7N7qpKmBWI/jNACc4q08B7jRSjBIpeFWcGCPy9Ww9DrfKK6P/68IWA+5QYQzzbAylCQt0LwaJeAxmXCG1+qfvslfkfXcAM6T5l3FfvJUZvgL2z4gRdJVEw6D5I5GuQq8no5gP+vQA8mywPHKyIzVBif0QEreHw6PrOIGfr6/PpfxJVioPtd86Z9y/0fGxXnMkqSp+uiDoymRHpz/A6r4l1iOBcWzEuj+YkCBzUfviJWH/ht7LoldBMLls2pMhlnz6vcvjukLowe7gykZ6A7uXy7gJ9D0XLJq8Wy7vzwDD3dZIpeHNUSD1u4JKSGEqrfXTNrRVNz1ZKB7dNm6TxlWQQklkfTqdZpVp8oksUJOcSDWVVvW97TFrnKJd7zK7n7/H3TuUOTpIV+tDg4/cI+HWj83G4W/Ve+T6hz02a6g0bpBhXGdl8OICld6Y3j3O9D45MbufQwJcRmjnq8lPkys4/U44Mub2lhmNK2Y4huSEhX39kADWfW8Doax/GQ84M2s81VIf4J0L8CShdtTY/+kbZrhawr9paiupekn2nLZDR654ojAd6X7UHTXlOoHSeGLDtn2SHv9wVdfx668NOu67dQL9znriLli1kCvPzzmkG1l5fIHoN4tBs2/FpVxjb2puzK2sGv4HCXzB3fip1c+iMrZ9OxzOsgwtHbidjU7Wx16mv94uoeu+Aamtvfc= +api: eJzdVk1v20YQ/SuLOSUAIblGTzxVrY1GSFobipoeZMFYkyNxY3J3sztUqxL878FwuaI+LMeBc+pJFHfmzczbeTNsgOTaQ7qAibUelgnk6DOnLCmjIYUZklO4QSFFqTwJsxKoN8oZXaEmL1bGCSnWaoNaSGvF9Gp0p+/0xK19eqeFEPz2XuXijSf3NhXzAsX0imGowM6DjHAxyDF0hzVDqp2OcB+Up8X1YHdTk61pmYrJUwkK8/AZM/IjSMBYdJLLmuaQAhvf78eDBKx0skJCx4Q0oGWFkEIoABJQTIiVVEACDr/UymEOKbkaE/BZgZWEtAHaWvby5JReQwKkqOQXE2Ynh7Zdsre3Rnv07HB5ccE/h7x/rLMMvV/VpZj1xpBAZjShJjaX1pYq6+oZf/bs05wmIZ2TW86csOpiWccskAqRQ4HnU/6Tz9skMvCC4hKOwIx/w/42WPU+OdrSbDG/50Ab6ZTUEUDq7c2qu41DqDbZvdF1WQKzGsGvejjBWX0KcMeRYpRIwavixBiRryfrcbhRXhn9owub9bh9hTHMkzGUJlyjezZIxGMw49ZSq/+6LntF3jd7MH2a/xj36K3M8BWwf0eMoKskGgbNH4h0EXo9GcS816fnG/Bcw7zgivduYi/lk8F1z2QM1Aeld0NOXO8Pp7blAn++vDwdFZ9kqfLA7bVzxn3PnDicBzmSVCU/nRkYpckOTl9wa7uWWw4XFMdSrPuDCQkyF5VfPzc4/kDv5bpTWTA5b9qRIeZ8+q3m4LpC6N5u78oGegO758u4CvQ9FSyavJvPb08Aw91WSIXhzbRG6nYRFZDCWFrrx01o23Z8tLA8uk3cVrUrIYWCyPp0PM5KU+cjuUZNciTVWFoFx7t90p2K39i0E5bHrHaKth3e5Hb6HrfvUOboIF0s9w0+cgOFljg0GzaPVe+RyemX6KSmwrh+BsRdWgQvrl7plenc40IJuf0qs0fUrCauM6R9MfppdHGumN5BTG6nvQ5kRsOu680gOaJrRxQkgFUnAiCU1S/DAWdpjadK6j28U6UeJdYMYvw/fUz110z4L41tKVWn3Y7Tpm/dBY8epiPdzdyD7l0mUBhPbNg0D9LjX65sW379pUbHPbhMoJusD9wRiwZy5fk5h3QlS4/PEP1m1ov7rTiXa+xTzU26kWXN/yCBR9wO33zd0CqiBJr+cJJlaGnP7WTGslZ2ev79eg5t+xUUaPEZ sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List Environments"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/apps/{app_id}/environments"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Retrieve a list of environments for a given app ID. Args: - app_id (str): The ID of the app to retrieve environments for. +app_id (str): The ID of the app to retrieve environments for. Returns: - List[EnvironmentOutput]: A list of environment objects. +List[EnvironmentOutput]: A list of environment objects. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"name":{"type":"string","title":"Name"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"deployed_app_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Id"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"},"deployed_app_variant_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision Id"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["name","app_id","project_id"],"title":"EnvironmentOutput_"},"title":"Response List Environments"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_app_variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_variant_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>deployed_app_variant_revision_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>organization_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>workspace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "name": "string",\n "app_id": "string",\n "project_id": "string",\n "deployed_app_variant_id": "string",\n "deployed_variant_name": "string",\n "deployed_app_variant_revision_id": "string",\n "revision": 0,\n "organization_id": "string",\n "workspace_id": "string"\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-evaluators.api.mdx b/docs/docs/reference/api/list-evaluators.api.mdx new file mode 100644 index 0000000000..db8f4d234a --- /dev/null +++ b/docs/docs/reference/api/list-evaluators.api.mdx @@ -0,0 +1,1040 @@ +--- +id: list-evaluators +title: "Query Evaluators" +description: "Query Evaluators" +sidebar_label: "Query Evaluators" +hide_title: true +hide_table_of_contents: true +api: eJy1V0tz2zYQ/iuaPTUztOV6euKpsq00btrGtZ32oPF4VsRKQgwSDB5OWA3/e2cBiiL1iuJxfLBlYHe/xbdPLcHh3EI6gfEzKgsPCeiSDDqpi2sBKShp3SM9o/LotLGQgKHPnqy70KKCdAmZLhwVjj9iWSqZBd3hJ6sLPrPZgnIMt0X1YQbpZAmuKglS0NNPlLnGojQk2I2cHAp0yJ446RQLjlfwf3sy1W3EhzppLRVeKah3aQyCyqDVqeua8WypC0uW3To/O+M/gmxmZMm+Qwp3PsvI2plXg9tGGJLjn1oaJtHJiJBpH5Uab2XhaE4G1u5eBok6gZZoFpeOcrttrsCcdvJpnZHF/CAvf7FunfRf+zJTVx0TdQKZIXQkHtEdMpjATJucZUCgoxMngz/7US6j2cEo0ONL8SNAPkazDYggRT8A5CqabUBWdE2rRymOxPFeiqPIuqgG16LL16uirNhqUVaEvSrKiq4WxSo/f2mu3rFuncDruRd9mqnQPA/1tpXCv9o8zZT+8jaobJuuk3Xr6xlEISQXGaqbXhs4godVo+mh5dP+yVRrRViEo91YkEmTeYXmp7deqd+tLk4+eFd694bf13svG2na1jFaaAxWB3ne0GXStxH3Kf+5IpSTdIvYb0XqKmpuBWrLhR1jp+NnfOMuGa6cGXrlIJ3sNNudi3GI7Bpxtp1Qcbr9cn6+PdD+QSVFGFeDsTEB/IXTTJBDqQ7MJ6Wz3u33JOrDft7+0NFBpja38848bct3HXdrcU7rIOwXDWQM7vn2WxHgd0XoRq4TjDW9kd39z7iK9B3Konf39zdbBmNs+0GNu824u5zl5Baa97Y5sckS3QJSGJaGniV9Ga4XuSEkYMk8k7EhNt4oSGHhXGnT4TBT2otTnFPh8BTlEEsJm+ijcDu4ZNFQdpYyb6Srgr3RzfV7qt4RCjIhvzsCd5xaMVn6Ym2csJTviWmLyw6MvFtoI/+LGZCAZAcWUYt54aS9Xe+l46+YlyoEvm3R0j5m3jqdQ+qMp4QPOutWe7bwORbx/35PZhxZzHRwswlVw8EFZk9UCEiA+Yz0nJ3+fHq2j7RGYTC6uW4qETO3Xu4aMUg2wtIGBBKgPJQhOML81/UFe1lq68IjWns7MmVjBWyId/TVDUuFMtRZQF82WTSBJougs6eyJS6EhbbcxmC5nKKlj0bVNR9/ZlwOfwLPaCROmbUJV/lilRlLeKIq7MChHZ2EWmRx5WMmbLQmbhtRY5RlVLqDsg+divhtfA8JTJuvLbkWrGKQn8O/UwD+7sPKIV/C2RIUFnPPzSSFaJJ//gc8UYWR +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Evaluators"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/evaluators/"}></MethodEndpoint> + +Query Evaluators + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"EvaluatorQueryRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>metadata</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "evaluator": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.287Z",\n "updated_at": "2025-05-15T13:01:54.287Z",\n "deleted_at": "2025-05-15T13:01:54.287Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "data": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-organizations.api.mdx b/docs/docs/reference/api/list-organizations.api.mdx index 8b2a7c2d04..de65436e3a 100644 --- a/docs/docs/reference/api/list-organizations.api.mdx +++ b/docs/docs/reference/api/list-organizations.api.mdx @@ -5,65 +5,184 @@ description: "Returns a list of organizations associated with the user's session sidebar_label: "List Organizations" hide_title: true hide_table_of_contents: true -api: eJztVE1v2zAM/SsCL7sISbajTwuwYg06LEWbYYc0GFibidXakivKbT3D/32gYidxtvWy63JoUvLx6/FRLQTcMSRrWPodWvMTg3EWNhoy4tSbKv6bwA2F2ltWqArDQbmtcid4VsjsUoOBMvViQq5CTqpm8u9YMTEbZyd39s72aZI7q5SKqdandTeJmv9jATRMQ/7L1er64jWlOESiFluJ8qQMK7SKvHdeeQre0LOxu5hyXHTrXRnNGQa8R6YJaHAV+ehfZJCAdPtjFAUaPHHlLBND0sKH2Uy+xnze1mlKzNu6UDc9GDSkzgayQeBYVYVJY8bpA0tMC5zmVKL8MoHKmLzy0k4w+1Imk7+hqQgS4OCN3YGGYEIhhkUGnQaLJb2F+ir+ToN7seTfAi4joDtTyt/xn05gne5hLaBtlltI1ueBnT5YbF0U0G2OqVZi7zS8OP/IFab99AMp54kGA3qPzUlH34/h3RHl7h8oDXGLT7XxlMl1mAx66gZmxnOfNDc6pL8XH9auvojelyMFdfLRUFLInYhsR9JPhSGHBKbnamPyz+Q5clj7AhLIQ6g4mU7TwtXZBHdkA07QTLEykUemtPYmNDFkfr24ouaSMJN9rzengFtR3J7dMexAMlbmipqBnATmdcidH8bXYETt+T5KZjJ262J4T8M8Nqfm1wvQIGPs72M2eT+ZwfkrNALLsWAaj2WoHd2gz1g4zA8aqEQjvkBYfjw6pLPKcSjRnuT7w2Z+U/vhZP8/kccnstdGoNcwrQo08Q7iUtpexWsYq3ijIXccxNG2kuabL7pOzE81eRHqRsMzeoP3Ipv1ptODqkTDj9TI/lMZRHSERb0X59kjKto+XNXnixV03S/QHnFC +api: eJztVMFu2zAM/RWBl12EpNvRp2VbsQYdlqLNsEMaDKzMxGptyZXodlngfx+o2Emcrb3sOh9ih3ykyMdHbYFxHSFbwCys0dlfyNY7WGrIKZpg6/Q3g2viJrioUJU2svIr5Y/wUWGM3lhkytWz5UJxQaqJFN5EFSlG693o1t26Lk1265RSKdXi+Nxlpib/eADaSH3+i/n86vynodREpqYriQqkbFToFIXggwrEwdKTdeuUcnjoKvgqmXNkvMNII9DgawrJP80hA6n2xyAKNASKtXeRImRbeHd2Jq8hnzeNMRTjqinVdQcGDcY7JscCx7ourUkZx/dRYrYQTUEVypdlqlLyOkg5bHdH2Vx+eVMTZBA5WLcGDWy5FMM0h1aDw4peQ30Vf6vBPzsKrwFnCdCeKOVl/KcjWKs72BbQbWYryBanga3eW1xTltAuD6nmYm81PPvwEGs0Xfc9KaeJegOGgJujir4fwtsDyt/dk+E0xcfGBsplO2wOHXU9M8O+j4obLNLLh/djV19E77OBglp5NFTEhReRrUnqqZELyGB8qrZI4YlCTBw2oYQMCuY6ZuOxKX2Tj3BNjnGEdoy1hdPNniSv+ijQRHIk0wTLm5RvcjW9pM0FYS5iWCyPATcixx31Q9h+AljbS9r0zGUwabjwoedGg5UCil2UNGzdyqfwjqOutg9oHsjJBKTPXdlno7ejs5ea6QLU5GrabRWatFV9HQkG+oSuPVGggSq04mPC6v3BIVXWPnKF7ijfX0b4x1rsd/v/XXq4SzudMP3kcV2iTQuThrLt5L6AodyXGgofWRzbraT5Fsq2FfNjQ0FEu9TwhMHinUhosWx1rzDR8wNtZP5GGhE9YdnshHpy24rO9+v3+XwObfsb30Z/0Q== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"List Organizations"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/organizations"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/organizations"}></MethodEndpoint> Returns a list of organizations associated with the user's session. Returns: - list[Organization]: A list of organizations associated with the user's session. +list[Organization]: A list of organizations associated with the user's session. Raises: - HTTPException: If there is an error retrieving the organizations from the database. - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"description":{"type":"string","title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","name","owner","description"],"title":"Organization"},"type":"array","title":"Response List Organizations"}}}}}} -> - -</StatusCodes> - +HTTPException: If there is an error retrieving the organizations from the database. - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"owner"} + required={true} + schemaName={"Owner (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Owner" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"description"} + required={true} + schemaName={"Description (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Description" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"workspaces"} + required={false} + schemaName={"string[]"} + qualifierMessage={undefined} + schema={{ + items: { type: "string" }, + type: "array", + title: "Workspaces", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '[\n {\n "id": "string",\n "name": "string",\n "owner": "string",\n "description": "string",\n "type": "string",\n "workspaces": [\n "string"\n ]\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-secrets.api.mdx b/docs/docs/reference/api/list-secrets.api.mdx index e9ca7faa8d..2a388bfe7a 100644 --- a/docs/docs/reference/api/list-secrets.api.mdx +++ b/docs/docs/reference/api/list-secrets.api.mdx @@ -5,59 +5,617 @@ description: "List Secrets" sidebar_label: "List Secrets" hide_title: true hide_table_of_contents: true -api: eJzNV01v20gM/SsGz0Kc7FGn9TZFN3C6DdbNXozAoCXammakmcxQRtRA/33BkeRISlabuIfWF0nz8cj3yOHQT8C49xCvYUWJI/ZwF4Gx5JCVKa5SiEErzxvfzkbgyFtTePIQP8Fv5+fySMknTlnZAjGsyiQh73elnv3dLoYIElMwFSzL0VqtkmBh/s3LnifwSUY5yptiygO4deIIq8bUvSpSeXJlCWLw7FSxhwioKHPx3zpzUCm5zT1VYq70bPJNNyq0WLGWrQ3TpeDVEaTIwSwW1ZcdxOv32jWWClSBYEZOmGJR+QS1vKZEVhU7hzKsyWaobSYfe2ceIIJceXaow34sOHPGqgQisOSspkfFVZhisyfOyG3Cl1h0pmRyAkS5KtSAHmORoktvWuod0aMUL6Wl6jWGHeCSKqjrqJs322+UcMiEh1I5SkUFgZjwYUXMqtj7y69f/h9K/O25OwEb4KL3RqxJDVH8exkCtqXUmeQeIvC4pxzvg7IHckyPz5L/UkH+EDi8PcSl08MkH4ojIrYjRak11D1Tt04L9oGcV81ZPQXln3Z7HXXpdgpKSMUI6JEd+iEIpqmSioL6psecXUnjdJsy8LFBfi1HX5d+kNkR5CYl7SfKmNflfuqwrWT+Z1HsH8Pg6IuM+yz8RpxbFHQOqx6Tz40UvbTcdORPCX0n+KxTKEgt1X6k0lH4MfbQ0SlbwfXZUqDfW62OKfCfhzWo1pu9lAuojkClU9JEsDMuR4YYylKlk+5fhWKQEb5aCgrM6dQg/CV75dLsX/inQV32IKaO258NjToCrXaUVImmqes6cYRM6Qb5VMc+NAizhRwjKG36g3i3DcIIb1ttpgP+Fsg/qlkT62fUH4ecjMY17TGprrtIdBfwEPWNZyZ0Xsc8fdGgdb3jdJXpVs2uledZ18TW8hulKQxWRJATZ0Ya3D2JgxY5gxjmByw1zw8X87blnUtbQE6uvyBpuEkhY7Y+ns8Tbcr0DPdUMJ6hmqNVQVZPSekUV2HL4uZqSVWbyPH6rr9gJX1vk7rDZUdR0aplaGmbgwuLkjPj1PfQP0MESri1IgppVexM2N4qtAjOzRY3V9C7xeH87OLsHMYaDRZLy44JPxeNdhqikQpH/tJl5ahkjgnz358nxDNrPOdY9PBGIRmVlVYApkeeW40qdA9tJ9OEaw0hXELsIsSpQ5J0yoxnWfL0tEVPt07XtQw/lOQkLncRHNAp3IpK67texVy3LTEskoRsQEddNrEY/XORUB4T6dPHr1DX/wLHrYz1 +api: eJydVE1v2zAM/SsBz0Kc7ujTsnbYghZrsXS7BEGhykyiVpZUiQqWBf7vA2UncT5WYPPFhkU+Pr5HagsklxHKGfyUyRDMBTiPQZJ2dlJBCUZHeoqoAlIEAQGjdzZihHILH0YjflUYVdCeU6CEaVIKY1wkM/jeBYMA5SyhJQ6X3hutcoXiJXLOFqJaYS35SxPWGdwHJkK6LfWqbcVv2niEEiIFbZcgAG2qmb0Pbq0rDE+vuOFyKZKrn3Z/uS3SZDh1mnu5ZbxGQCUpl5V2c7+Acrav4J5fUFHu+C3pgBVXySwEXIQlaSsZqofu7ObxHhrxb3ACalehiX3c69zJEWrv9IbpNwJ0dbGJvUwLF2pJUEJKuurzssmYI8RJlmWFkgmd2WBlje9Veg/5G+ey5P1x+T+omx5E04gzkXdxX9s2GgFGL1BtlLnM/izxbhd+YmPH5FLNC8bm4dqLeTaDu/Voa+wAZQhy06Oyixrc6UiDabeJDT8nWsJRhIAaaeV4h5fIBL2kFZRQrHnRi/VVcdjqiGGNIWZJUjBQworIx7IolHGpGsolWpJDqQvpNZyWHefTwTWHZpsiqhQ0bTLe+GFyi5vOiXI27wdMee3byToO2wsuvb7NG91OHowTrVzQv/P1AQI0E+gEZkG0Xbic3qnXcfsk1StmT7jPlvZoeDUc/a2ZLmEwfph0t5dUdNiALgzEiVx7ofhqqqXmM0JZfzwcMEvvItXS9vBOrDvZkU4Mwl9UeCO15XnJlbedrTPItnKDV9nQFmkuYOUi8fl2+ywj/gimafj3W8LABs0FrGXQ8pnlms17uz/bAl+mJYyVQp+hpUmtKSc3OHu6n7Yvnx+haf4AofknIQ== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"List Secrets"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/vault/v1/secrets/"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"List Secrets"}></Heading> +<MethodEndpoint method={"get"} path={"/vault/v1/secrets"}></MethodEndpoint> List Secrets -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Key", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Slug", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>header</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '[\n {\n "kind": "provider_key",\n "data": {},\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "header": {\n "name": "string",\n "description": "string"\n },\n "lifecycle": {}\n }\n]' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-testsets.api.mdx b/docs/docs/reference/api/list-testsets.api.mdx new file mode 100644 index 0000000000..78e47f32ba --- /dev/null +++ b/docs/docs/reference/api/list-testsets.api.mdx @@ -0,0 +1,1124 @@ +--- +id: list-testsets +title: "Query Testsets" +description: "Query Testsets" +sidebar_label: "Query Testsets" +hide_title: true +hide_table_of_contents: true +api: eJydlU1P20AQhv9KNGc3pqgnnxooKohWpZD2EkXVxB7sBdu77I4pruX/Xs2u4zik0Ko55MP7ztczM5sOGHMHyQqW5NgRO1hHoA1ZZKXriwwSKJXjH7w9jsDSQ0OOT3TWQtJBqmummuUrGlOq1FvGd07X8sylBVXoT+v2yy0kqw64NQQJ6M0dpTx4VJYyyaMixgwZJQ9WXIpwibm7DlGhj0b7uilL6Ce6z4PtbBT3fS/undG1IydZHB8dyUdGLrXKSKqQwE2TpuTcbVPOrgcxRP9embFCjFWIkOomGA1pqpopJwu7PE+9oo9goPo6nZHCID4kIEW+xjRktD5wNdYaOL07Pj5E8x1LlfnCZ2fWavv/XDJiVKV8U0yVOxSUOt07PUDi2Ko6nwLYsu3XOwRoLbYTbp90SFCAVy6fdGbwNx0g5zAnGJ29LPUwZks5/Rt+qSuEHnSTTuzwBrovl/Eh4PtTsK3kfLm8OnAYervf1K8N2Xa23O10RVxoWfacxKFBLiCB2Fh6VPQz3m5/DBE4so9kne9LY0tIoGA2LonjtNRNNsecasY5qhiNgueRF/50dipSv7uO0sYqbr2/xdXFJbXnhBlZSFbrqeBGxioMyr5s7BEadUmCrMZKfi8aLrRVv0L3I1CSQBGshIkM7PXuMjt7wsqUvunjJZR0IlT1rfZxBs5DESeY3lOdQQQCJNR3NH87P3qp6sFgtri6GNYIU79G24S9DKJnXEeiEAFVfoeACav3uwPJ0mjHFdYTfwdt3stq5Mb0xLEpUfkV8bG7YQRWMIwAjJeV+JEJLrRjEXTdBh19s2Xfy+MHiSm9i+ARrcKNEFvJehbbtnZwT62/Bv098sYvkcjLJrTx2Z0i+x4sFmlKhl/VrifD/PFsCRFshj+qSmdiYlGKkfcEQP7rxNiPlX/WQYl13sgtkEBwKa/fmrJ0fQ== +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Testsets"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/testsets/"}></MethodEndpoint> + +Query Testsets + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TagsRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>metadata</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-workflow-revisions.api.mdx b/docs/docs/reference/api/list-workflow-revisions.api.mdx new file mode 100644 index 0000000000..967aecd1bc --- /dev/null +++ b/docs/docs/reference/api/list-workflow-revisions.api.mdx @@ -0,0 +1,2062 @@ +--- +id: list-workflow-revisions +title: "Query Workflow Revisions" +description: "Query Workflow Revisions" +sidebar_label: "Query Workflow Revisions" +hide_title: true +hide_table_of_contents: true +api: eJzNWE1z2zYQ/SucPbUziOR6euKpip00TprYtR334Hg0ELmUEIMEA4ByVQ3/ewdfNCVRlOzITU8ei9i3b98uFgssQdOpgvgW/hLyPuPiQcEdAVGipJqJ4iyFGDhTevzgv48lzpliolBAoKSS5qhRGoglFDRHiGFOJaOFHkvMgAArIIZvFcoFEJD4rWISU4gzyhUSUMkMcwrxEmixOM8sjF6UBkZpyYop1KT5pag4h/qOQIoqkaw0DCGG91fnnyK3OhJZJDEjEQ6mg2j5Be5x8QXiaE55hTUQ0ExzA3XjOEaXmEH9fEBDzkcddPlfh33pSb5E3DlqmlJNf0TwwfcTFPgY6O6SYRd2lxYZN9vqBwhhHT9BhbeW6C4JelFb8bMi4VWKYyqTGZtj+j0KTITgSItOCUIYZ85fNAr+avNVoipFoVAZ3OOjI/NnNbyrKklQqazi0aVfDAQSUWgstGVTlpwltgUOvypjs2xxLaVpkJo5D4monJFnyQqNU5QttU/siprAY++Ml8A05moTjlZ6JmRfURDIhMyphhiqiqW9Co0cmkkw1bgnqln6SrMce6FPDWBNIEel6LQXuw/mozevia+i58F8opbuaqKfB3XagqgJJBKpxnRM9UHlO3Gw0chWRlWmL+Hks4P1TlLk+AJOTh2sdxLkmizGLD1UGQexXi+is7St10G9BLUaL0Gwg3oJcjVe5ijVd5TrjTevCSheTZ8Lc2VsawKHC9RF547CLkgx+YqJbvXJMIOGQ2kd2jYbf2qvANI0ZWa7Un6x2kt36xC69Yq3fLL6S/ss6vYFCZNJxan86W3F+XslilfnlS4r/bOJbyVeA+J7/z5WVEq66NV5zdaIvulxe/ttjUEbwu7K1Kmz7EgUlZplNNEH3DgjD+m3TfCwH+Ng3M02XFkORzZcMPwWd/89TVwP0cV4I8Wb1mHEa5WDK6XNKdBMqilmtOIa4ttO9MfJ7dYPPHfbXapmqKprA/br8fHmDHZDOUvthBW9kVLI5w9gKWrKeM9IxUWy8vUpbeFuu3x/CEfQDkFq2hoBm3rpGHLcku1LrRjRtfm6KxEmLufar1upvyCvU3d7GKdOvr6aend9fbEB6HK7mtQ/zaAfhXqI2gWWo54J85wwRW2fDvQMYhiWZibGh+GEKhyGRwY1bCblIRBQKOfhjaGSHGKYaV2qeDhMuKjSAZ1ioemAsiEtGaxzGtmv0YlZareowqSSTC8s3uji7AMu3iFNUdriby24MgXnSmh1WZM9WrIPaMT0FyA3brN/XF3428/MWRm1WJEJax66kuP2mib3WJjrUjMLwNHgl8HRtmC8QTS6OPP7xjfCwMMuA7ImVyMUEMDcbhrQSPPfHj8YlqVQOqdFC68nr2sDtxdG4996WHLK7O6wLJY+57fgcw4ETNaBQJN3aN+RCJiCnglluhIsl2bxZ8nr2vzsrpQmgylTdMJbl8o1Rk1XedqLSVcc97jYeN+yFhCD7R7/OZe1V6fDkNnjNWUPRq33oMPQ2vW2sQen8C7TT8gZdTxmPJrd+TN9YrbxrTkkZqGFLL39KEmw1C2rjTPNoDRt8fc311DX/wJDY1ap +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflow Revisions"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/base/workflows/revisions/"}></MethodEndpoint> + +Query Workflow Revisions + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Variant Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Revision Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Revision Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Revision Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revisions</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "revisions": [\n {\n "author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "date": "2025-05-15T13:01:54.479Z",\n "message": "string",\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.479Z",\n "updated_at": "2025-05-15T13:01:54.479Z",\n "deleted_at": "2025-05-15T13:01:54.479Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": "string",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "data": {},\n "artifact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "artifact": {},\n "variant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "variant": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-workflow-variants.api.mdx b/docs/docs/reference/api/list-workflow-variants.api.mdx new file mode 100644 index 0000000000..4470841c06 --- /dev/null +++ b/docs/docs/reference/api/list-workflow-variants.api.mdx @@ -0,0 +1,1092 @@ +--- +id: list-workflow-variants +title: "Query Workflow Variants" +description: "Query Workflow Variants" +sidebar_label: "Query Workflow Variants" +hide_title: true +hide_table_of_contents: true +api: eJzVWNty2zYQ/RXOPrUzjOR6+sSnKnbSKGljN3bSB0ejgcClhBgkGFzsqhr+ewc3mrrLjjyePmlGwJ49e7DYxXIBmkwVZDfwt5C3BRf3CkYpiBol0UxUwxwy4Ezp8X1YH98RyUilFaRQE0lK1CgtwgIqUiJk0O6UWEAKrIIMvhuUc0hB4nfDJOaQFYQrTEHRGZYEsgWQan5ROBw9ry2O0pJVU2jS9p/KcA7NKIUcFZWstgwhg/dXFx8TvzsRRSKxQIkVxTTB3rSXLL7CLc6/QpbcEW6wgRQ009wCxqCTT1hA86O4lmnQIIj0P5Dgi2f6bAqUqElONHkJGaLvw1X4M7LdJ8U+6A1KFNxetReQwTk+XIO3juc+AXaCdqJnFeUmxzGRdMbuMP8RASZCcCTVRgViFEPvLxlEf41dlahqUSlUFvf05MT+LId3ZShFpQrDk09hM6RARaWx0o5NXXNGXVXsf1PWZtHhWktbMzXzHqgw3iiwZJXGKcqO2GduR5NCW06zBTCNpVpH80o+LiGin4/WdvUsnwZ13oFoUqASicZ8TPQuwBQKIUu7B3Ki8ZVmjs92L2ceNhk4dUydP4eTzx42OMmR4zM4OfewwUmUazIfs/xAP8aw/CCxXs+TYd7V66heolqtlyjYUb1EuVovipvpU3P1yto2KRyPnufka/gmSDH5hlRveFvEcroK3aTQ9sYlQJLnzF4ywi+XysABOsQ6s+StnCz/062im30BZZIaTuRPbw3n75WoXl0YXRv9s41vKV4LEsrWIVZESjLfqfOKrRV93eM24277JlKzglB9xBQdBMiQoNHD4/IhgmxKibVg181Dl+7o4jVd6+P2qZFjQQzXkN1sxH7ovTehZY22OlRtV2wai/Xr6el6E/1COMtdi0zeSCnk0ztojpowvqMpckGXVh9zO0bbxftDeIJW31JNOz28zZeHZFOKTPHhJLZvdWIk13Z13znYuLzrsG/UPdkor1d3exjnXr5dCfXu+vpyDdCf7fKh/mVfakk7KnXSq0Q9E3ZCnKJ246CeQQb9WuIdw/v+hCjsx2lQ9eNLpw8pKJR3cWw0kkMGM61rlfX7lAuT98gUK016hPVJzWCV0cCtJmd2q7ugCqmRTM8d3uBy+AHn75DkKF3mdzZc2XTzCbS8rT07UrMPaKUM79eB0TMh2b8+K8LjdeatrFasKoQzjzXCc3tN6C1W9rVr4/S0T3q/9E62BRMMksHlMNyaUFkiD7cN0hW5WqEgBSzdlQGNpPztYcGyrIXSJak6eNtPdeWpGHTR+I/u15wwdzUciUU48RsIJw4p2DOHtP0GYPE6HwxsMs+EsgUJFgu797PkTWP/9vOAPb+cKTLhnYlghVBbUZ4y9W4K5hbn658tnAlk4ArIC1Fa/opwHEYHzMT7CXWG+uOw2jei7qcUp+vdfLzNhpn0wWwUMnZir/ONbRWzWEoWwX5AKda6Y7XW2SxKWx1/f3MNTfMfDcGeBg== +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflow Variants"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/base/workflows/variants/"}></MethodEndpoint> + +Query Workflow Variants + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of reference, e.g. {"key": value}', + title: "Workflow Ref", + }, + description: 'JSON string of reference, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of reference, e.g. {"key": value}', + title: "Variant Ref", + }, + description: 'JSON string of reference, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Variant Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Variant Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>variants</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "variants": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.382Z",\n "updated_at": "2025-05-15T13:01:54.382Z",\n "deleted_at": "2025-05-15T13:01:54.382Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "artifact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "artifact": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/list-workflows.api.mdx b/docs/docs/reference/api/list-workflows.api.mdx new file mode 100644 index 0000000000..a54fd1239f --- /dev/null +++ b/docs/docs/reference/api/list-workflows.api.mdx @@ -0,0 +1,668 @@ +--- +id: list-workflows +title: "Query Workflows" +description: "Query Workflows" +sidebar_label: "Query Workflows" +hide_title: true +hide_table_of_contents: true +api: eJzFV9ty2zYQ/RXOPjUziOR6+sSnKnYuTtrYjZ32wdF4IGIpIQYJBhc7qob/3lmApKirZdeZPGlE7J49exbYBRbg+NRCeg3/aHObK31vYcxAV2i4k7o8E5CCktbd3HfrDCpueIEODXkuoOQFQgqtxY3BHBjIElL45tHMgYHBb14aFJDmXFlkYLMZFhzSBfByfp4HHDevCMc6I8sp1Kz7UnqloB4zEGgzIytiBim8vzz/mETrROeJwZwlOJgOksUXuMX5F0iTO6481sDASacIqk0z+YQ51E9HJHbreeeKtPwJmYfAj8j9TSD6UPZ7UbflX6Djgjv+MyRoYz9ChT9bug8J8RB2TwtZZsoLvOEmm8k7FP9HionWCnm5VYs2mbMYLxm18WpaNWgrXVq0hHt8dEQ/qxle+ixDa3Ovkk+NMTDIdOmwdIFNVSmZhR4w/GrJZ9HjWhnqEE7GCJn20alhKUuHUzQ9zU+CRc1g2UXSBUiHhd2Ei1I+bm+0gT6S73o9nwZ12oOoGWQGuUNxw90+QAa5NgXZgOAOXzoZ+OyOchJhk1GQx1fiRwT5HGGbIAIV/oAgpxG2CdLKNZnfSHFgHO+lOEisV/PkTPT1etYorVpdlFawZ43SytVFscpPn7pXL8m3ZvB89CKnONG2QerJV8zclrbazpZ16JpBNx9WALkQkg4ZVxcrbeAAHdpGsxKtmKx+6bfR7bEgkybziptf3nil3ltdvjz3rvLuBeW3ki+BNG3rEC9uDJ/v1XnNl0TfjLjLeTnBNtw2CzMyTuY864eI9DZN6RIjMOdeOUivx9vQl4Psuun/4y043WypawL57fh4cxT9zZUUYdAkr43R5ulzSKDjUu2ZLEpnK6uP2WLj3bL9oSNBUraw094k7A7esmLW8ikua7DbNIiRXNHqQwWgvGLoxq5Xi6W8Ud3daZxG+fbtpXdXVxcbgLG2q0X9i+47SX8/Fehmml4TU3ThCeFmkMKwMngn8X444RaH3e1gCAwsmrv2heGNghRmzlU2HQ4zpb0Y8CmWjg+4HPJKwjqBUVhNTsg0nBmLmTfSzQPe6OLsA87fIRdowg7vGVzS7or7ZdWsKxWv5Ack5ZpL38i7mTby37gJmhvfLHqRNLLMdXBvVGy4veLZLZZ0RaQ8I+2jwa+Do13JNA7J6OKsOSR0nLsbU2MGbE2uTihggEU4IeCQF78vF4hlpa0reNnD2yzi2rWq0cPhdzesFJfhBITgi6bA19AUGBhQiaF/BWRAG3WmLXUZWCzI4LNRdU2f442ZiiWk5RPVuzOvsei6xeMehNu43+J88yEbXCCF0BaeTOahN9oBdNr35fMQOuDFdACn3ptvP63ot+V9tHQb0x8jyS8cStYeItoF0X+UZVi5ntfGfCCUrte8fX0Fdf0fACLBAw== +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflows"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/base/workflows/"}></MethodEndpoint> + +Query Workflows + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Workflow Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Workflow Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Workflow Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>workflows</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "workflows": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.350Z",\n "updated_at": "2025-05-15T13:01:54.350Z",\n "deleted_at": "2025-05-15T13:01:54.350Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/log-evaluator-revisions.api.mdx b/docs/docs/reference/api/log-evaluator-revisions.api.mdx deleted file mode 100644 index b4ff537bc8..0000000000 --- a/docs/docs/reference/api/log-evaluator-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: log-evaluator-revisions -title: "Log Evaluator Revisions" -description: "Log Evaluator Revisions" -sidebar_label: "Log Evaluator Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWd9v2zYQ/leMe9oAOU7TNt38tDRp0axpGyRp92AYwVmibLaUqJJUWs/Q/z4cKcmSbKu2agMZtjwkjsT7zvfdL/K4AINTDcMRvHpAkaKRSsPYA5kwhYbL+DKAIQg5vWfF+3vFHrjmMtbggWJfU6bNSxnMYbgAX8aGxYY+YpII7luMwWctY3qm/RmLkD4lijQYzjT9V2K3vCrV3vPA4sfzDyEMRwsw84TBELRRPJ6CB6FUERoYQpryADKvXBGnQkA29sBwI+hBaXPvJgfvXZIEfJPqSyjkt0Mo/SvHbupcWvqAimNsDmLoJ4fdtHP/Kksz6xqXVh7CuoZVB7DGaThAWDSiYf8OqfsBleEh+vtUcJZD5hoClpjZWmweGzZlqhXswkpnmVeskJPPzDewxusFc/pKTtdKUJHiigVU5palZl0AVaFuXGmDLMuqEEalzD7QiYy1K1Inx8f0J2DaVzyhkgdDuE19n2kdpqJ3ky8Gr2uF9GXqhBoULm04tyuI9hBTYWB4XMu2ZdEeLoAbFum2Wvt/BXrsFejfXx8wNTPX8fcC7tCo7qBhW6LS0r7hEWsvRQSYeRAxrXHait0G8y4XzzwIhd10VXHqmcj1vZ9qI6O1yiZSCoZxq7ZL3Tt3CJlHcLUtVlfEMsxz0FkaYfwzgG8swFZV/rXlbBXPOsZg/VtgEHCqqyiua7xu4be1zSma1J9UzVuvC3yu/FSg+uV1KsSfWsb9D6lJUvMrNI0lkLwibyOFSuG8ldiGLKzQ2x6mBq3ESog+JlLfyyuuzQ9p3WTkivhuHN25UIQYo87l4D3aslPfNHSDuqhAZB74iqFhwT2avZbBcwfbO7NkpUlwCCUfHWyuJGCCHUDJhYPNlRR0TeZ77HUFWS/nebcr+NqrloKtUktB2F61FHSVWh6Y0j8Rrp9y8cwDLdJpV5hbkqU+tDdDcw6x2U3qvXl/1qeKd0X5qLhDEN0RBCHMGAZM7VzpD0XJ4wuIlr3JDQuZYrFfqzbFFx3v1FHe5G4gCuwRcFuPPKKe/Cg3Ojv44DYnnnaUmCQ83nYD1KR4l91Wocg6npp45+h30pkHCSqMmOmQ1f/xWNksfL2klBzF1AP32Tbs0rRopxjMoTM7KQr5NHVj+EPoOq8p2GnUdoH2kLByFtsFo+IB5722ubyuTrZGuynS5fgts7O8Zycnq9O6Tyh4YJnovVJKqu6juoAZ5KJlzCakX3u7S/6NN5N2JX0sjgCRnq4WprWjCLdk81JLRu+O3v5otEp2OdX5utpwqaDXsbvZjAtHX5uH39zdXa8AOt/WnXolp731sRQxM5N0tZVITdAJ0qwaBgnNSdm3QTku0YNycjoQkkyj7Le1dbRw+y+YGZPo4WDgC5kGRzhlscEj5ANMuE04zfxUcTO3ImfXl2/Z3PV7G8qVBbYDuSCpLyv9gwl/y4gud/TMx178b+d5DziZ7fZ0lkIK1pvlHd2r7xglgq3cuW24ZYOnIf72PDx91n/+4smL/rPnpyf9ydPQ75/4v58+DU9PMcRT2HRdtq30+rHzzrq7CNdnwTur3EWoEzVdbKpNbrcVyi9rjilmeBxKG3LFaNUGdO/s+hIqZz84PnpydAzNlKstpgqKvq2gRbza1+A1MqfMGfJJZMsnGIbRH8sX9M0oWfOJY463OcMbc5U8fwz7bgaJQB5Xjk8u+UeQJ381LnTFc/SZSsDYgxlVjeEIFosJavZRiSyjx19TpijLx7nnJsTfaFwes2wB+MLmrvlSc+nbykrLReryu9FoqAk4iTPfZ4lpXTuuFLbrD7d34MEkv5mPZEAyCsk8+j0EoGt+U9wJ2WcLEBhPUzvlBodJP/8AqWvzVA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Log Evaluator Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/log"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Log Evaluator Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revisions":{"items":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","default":[]}},"type":"object","title":"EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/log-query-revisions.api.mdx b/docs/docs/reference/api/log-query-revisions.api.mdx deleted file mode 100644 index 48f890fc3b..0000000000 --- a/docs/docs/reference/api/log-query-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: log-query-revisions -title: "Log Query Revisions" -description: "Log Query Revisions" -sidebar_label: "Log Query Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWV9T2zgQ/yqZfbrOGEJpS+/ydLTQKXcUOKDcA5NhFHuTqJUlI8lALuPvfrOSbezYcUIuvXs5HoKjaH/7R7ur3fUcLJsYGNzCHylqjgaGAagENbNcyZMIBiDU5O4+RT270/jADVfSQAAa71M09oOKZjCYQ6ikRWnpkSWJ4KGj738zStKaCacYM3pKNKFb4jSYwyLuig13PHIc5Ox8DIPbOdhZgjAAYzWXEwhgrHTMLAwgTXkEWVDukKkQkA0DsNwKWiB1Z73LHLh3QrvhB/BZ4OD1eWCaM2m3rs6Nx815bZ9LHd/rsm0dPDbTlo9ZuE3hD3PInEOEiZ22YnNpcYK6E+zIUWdZUOxQo28YWljQpjh9c6omrbspjLjGiCJwMRgWTVMFu/ThB1mWVUGsTtEtmERJ40Nof2+P/kVoQs0TCksYwFUahmjMOBW9y3wzBJtGcahST7RgwGf5P7odZPQxS4WFwV7pP7Xg5xbjpVng/6j576OGpXaq9NbAPRpFI7O4Jipt3bE8xu4AJcAsgBiNYZNO7C6YLzl5FsBYuJuyisOiiFOEMHFR89cGp5FSApmssiqYDxtZoUueT04Ip5dlGwrTVLs148Wj+kpVh3ZeEHIdpoLpnz6lQvxmlNw5T22S2lfQpmMe7OtQMa3ZrNswdVp4kVW/kDGJYvMT/heMeqZOubErzbpMyQb5y2x0nTueZPHG0XTGXNTW76LNoI4qEFkAoUZmMbpjdqtZ5KOH7R06Y6VJ9COYfPWwOZMIBf4AJkceNmdSmGu0zZuoMNaH4joq7LVVLoW1Si6FwbbKpTBXyeUBtfkH7nqTk2cBGJFONoW5ItosgO0pmtuQLd4m9QLskctIPRJ2xyaJj1SSbtNrzzxkFoAS0bbBzz0k5TR8Whd6pUHPCCsLQPCYt4Ou01+cOmrSW0e4ot5CmcbUPzATooz8GmXY/Muw0wYOnjxKWtQPTGws8UkBQP3HsmqueQE2G2ZXuHU0Vn+WvtiEoTKNC4t6hav6CYcvZMueBJiMnm/Upnndr4raGqlIIOlXpNLVVu1UTXjIxHnBIXNtlb/Z6z3OMuHGHEVUaadKScpax23IAviOs00zye84892OSNe9zl9c0BSaZi11XHuxQ/3rS4qSGyd+FtQOdHWkcJpgcXNH51i9wFScMM2NkpXTW46C93T67nNC/iCse0L3SJ8j+yir+GdpjJqHa4Eby7Q1j9xO3WJUPFKLzrgbwcXMhlOkJ8G/Y5XRlUNbiw+X3p/veE1UKhXXop8yEmDKGsY84uF6CPjEjTW5FPmXCs4xraAMsQ2smc+KTZVZAx23c5EyBJdFXsgM3hmUhlv+0B4WLZ1csxBiBntXJUxFlDEThgY0+ERdujvAjbkcE0bvi8NosOjIn9f4ZM9zWxB+3QRMtF8B60h0KMSLJPFO9izJ8kPN96wYoPnEWQvoPPG6LFy2mcUN8QqGi6mphdZUdboddilUIrddTevOCo+Ya0Y3poflOtWH3i9QrD5/LCeGmRs/vt3fbw4Yb5jgkRsf9o61dgG54XQxQsu46JgOChUuuVdXX2UdDnCqvIBu2mImXRdyZUrktyzf6ozRu6ZfV7kz6eVZ5/vqF19uXm/d5WocefN1ne7n6+uLBqA/2/qhnqpJr+lDMdqpojdFiTIEmzAarEM/odEuPvbv/Zulfjnp7QtFOhnU1FW5k0q1gAFMrU3MoN8PhUqjXTZBadku432WcJcQDIap5nbmSA4vTn7H2WdkrkC+HVY3XJEvee+obysPhiWcSqBinpGPIvlf/sipHiZ5PBUZgrz08vmd1/ETixOBS95htby1gjdj9vO78cHbnXfvX7/fefvuYH9n9GYc7uyHvxy8GR8csDE7gIVXUOsSNefj61JuQvM8wV6XojaXXpcof0Gzl7nuZKzc4RU3jXON3uHFCVRac9jbfb27B4teW9vs6qfQJaHi5N3PECz4YOl9VKrELgOBRRb/+vwDSUY+HzNZwWsPkoWRV+6FFp9sPxGMuyzjBJjn8XMLefzkFudoKu7hqj41oZQwpagb3MJ8PmIGv2qRZbTsToniIj/kERnulvLdtAiZuW8g6KqjxLzjslLZEzSTNCVQT3EYhpjYzr3DSmK4OL+6pno4f1kcq4hoNCPd6HMAUKvP3NocBJOT1A3vwWPS399UmGkU -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Log Query Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/log"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Log Query Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query_revisions":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/log-testset-revisions.api.mdx b/docs/docs/reference/api/log-testset-revisions.api.mdx deleted file mode 100644 index 96473caed6..0000000000 --- a/docs/docs/reference/api/log-testset-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: log-testset-revisions -title: "Log Testset Revisions" -description: "Log Testset Revisions" -sidebar_label: "Log Testset Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWd9v2zYQ/leMe9oAOXbzq5ueljYtkjVrgsTNi2EEZ4mS2VGiSlJZPUP/+3Ck5NiS7DiuPQxD+tC60t13vI93x9NxBgZjDf4QBkwbzYyGkQcyYwoNl+llCD4IGT8Y9/ZBsUeuuUw1eKDYt5xp806GU/BnEMjUsNTQT8wywQOL0PuqZUrPdDBhCdKvTBG+4UzT/0rklS/mJh94aLHT6XUE/nAGZpox8EEbxdMYPIikStCAD3nOQyi8uUSaCwHFyAPDjaAHpa+d2xK6c0nysAdLNQuVT4+oOKZmDy7dO+TS3u7tLOOjMjzCYJcGzkrI0kLIMjNpxeapYTFTa8HOrXZBzDsJOf7KAgMN3q5k3CpGMc4VCylDqkhtsn4l41uXDFAUxaKWUTmzD3QmU+0C+7Dfp39CpgPFM0oS8OEuDwKmdZSLzm0pDN62ORXI3CnVqHpa+HsrQfRGmAsDfn8hOp+S3J8BNyzRq7Pz/xLJlT+79+PfyhTMzUSqnYE7NMpANGxDVBLtGp6w9UlJgIUHCdMa47XY62D+KNULDyJhD7FFnOVonaC2R1iAZQ42DI6lFAzTtRYvUHcGc5TCc7AKgx/FdBAblKmP1tEmnmXT4PIqMAw5lQsUN0tkbEB2a21NxstPFt1rtwUBV0EuUP30MRfidy3T7nVustz8DHVXCaQsNZtooVI4XUtsTRca5K6PLYNWoxFX/yVSP8srrs2ztK5ysqH+Mo4GLhQhxWTrHP6MtlYsn4XbQZ0vQBQeBIqhYeEDmp3WrvcOtnNmycqzcB9GvjjY0kjIBNuDkXMHWxqp6BpPd3hAVWS9m5ZHVMXXTq1UbM2tVITt1EpF19zKI1P6B8L1vlQvPNAij7eFuSPdwoPdOVpyiPXTpNn+0TH4wMNa+Zv3i88tYfNSXp25nctQV71ay0n+TKe6r85ut9h3c9zXCvZawfZawXZdM1q68I27pZZWuap+oxd1JVWH/Nq6bdC6vX4z7OGboXl0vpK6NannROZzH8bUC2zVUGz0zV2NcN1Smp/emyM01rh6Iq0XZ3PDlxjR8/FhYWeRx4eHzWnjPQoe2lli54NSUm0/agyZQS7WDAqFDJbeviToR6sJu5JugbaM6bit4WwZFDmR1aKWjM6A3j43DSa/nOlSbmm0WNHr2F3txrmjb93+XgwGNw1At7fLm3ol405bHCXMTCRd5GRSE3CGNFGHXkZzXvZXr2yQdW8+9+0JSW5ppugrx25WrgT4MDEm036vFwiZhwcYs9TgAfIeZtwmmGZBrriZWpWzm8tPbHrBMGTKBvGCwB2FkwuQZbH53mDGPzGiys0XyoEk/9vtugecXJ44LeKCAvX26Ubqw3dMMsFqN0ytd0pwFOEvJ9Hpcffk7Zu33eOT08Pu+CgKuofBr6dH0ekpRngKteuhTZXa5uSb6m6jszRn3lSpvGTpE488jaSlqhoE203unN1cwsJHL/QP3hz0oR6CS8JUUTCwvFd7aF+DV4umeRyBByyx5QQMw+S3pxe0MgrfBNMFvFURXxsnlRFl2HfTywRyWzTsEmZlMgyhTIanHdMLO06/KSVGHkwoh/whzGZj1OyLEkVBj7/lTFHUj8pdGxN3Q6pfkyr+Z/Anm9qrF1tou7bKkLjIXbzXii4VRKdxFgQsM2tlRwtpfnN9NwAPxuW9bCJD0lFIztHfPgBd8Zrqhsc+m4HANM7tPB4cJv35B+MYQPk= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Log Testset Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/log"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Log Testset Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetLog"}},"type":"object","required":["testset"],"title":"TestsetLogRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revisions":{"items":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"type":"array","title":"Testset Revisions","default":[]}},"type":"object","title":"TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/log-workflow-revisions.api.mdx b/docs/docs/reference/api/log-workflow-revisions.api.mdx index 600c4f676d..2d29bca338 100644 --- a/docs/docs/reference/api/log-workflow-revisions.api.mdx +++ b/docs/docs/reference/api/log-workflow-revisions.api.mdx @@ -5,67 +5,2214 @@ description: "Log Workflow Revisions" sidebar_label: "Log Workflow Revisions" hide_title: true hide_table_of_contents: true -api: eJztWW1P20gQ/ivRfLqTHEKhpXf5dBRalSvXIqDchyhCE3udbLv2uvsCzUX+76fZtY2dFzdJEwnpjg8Q7JlnMs+87O7sDAyONfQH8LdUX2MhHzUMA5AZU2i4TC8i6IOQ4/vH4vW9Yg9cc5lqCECxb5Zp80ZGU+jPIJSpYamhj5hlgocOovdFy5Se6XDCEqRPmSIDhjNN/5XQq99URu955NDT6acY+oMZmGnGoA/aKJ6OIYBYqgQN9MFaHkEeVBKpFQLyYQCGG0EPSn871wV254IUYA+m5ixUXj2g4piafTh156ELi7s31MSvPNqDJ94CKsNjDHfpwmkBWViIWGYmS7F5atiYqVawc6ed50EpIUdfWGhg0aEyGfSlHC9VoKLiikVUlFVpLGGmDnTtCxHyPK8DGGWZe6AzmWpfU0eHh/QnYjpUPKMChT7c2DBkWsdWdK4LYQi2redQWq80x9+TC2dOgjiP0QoD/cN6Ej11mP4MuGGJbukM/9fQM6ohtGYi1c7APRrVJhq2JiqJdg1PWHu5EmAeQMK0xnErdhvMX4V6HkAs3Dpax2lmLNf3odVGJkuNjaQUDNNWaxe6c+YR8oDg2AMKi2YF4Wsivq1APOjEJpj+DOB7B7BOJ3znKFuEc3Ex2PwSGEWcug+Kqwata4Rtaf9ORs0nde+W24KQq9AKVL+8s0L8qWXa/WRNZs2vMO8rgRSNax0tVAqnrbzO6cICu+1ZatBpLGTocyL1o7zk2vyQ1lVOLqhvxtGtT0VIMdm6G3xE13WaS+t2UOc1iDyAUDE0LLpHs9MueOZhO6eOLJtF+zDy2cMWRiIm2B6MnHvYwkhJ12i6w6WuJOvNtFjsSr52aqVkq7JSErZTKyVdlZUHpvRPpOtdoZ4HoIUdbwtzQ7q0DO3M0YJDnF9Nmkvz7ry3im+L8llxjyC2RxCEMGEYMbVxp98XJc8vIVq2JtcsZoqlYaPblF90uNGK8r4IA1HgDkrrRuQZrcnPcqOzQQxuCuJpR4lZxtN1N0DzFG+y2yoNucDTIr519nvtPIAMFSbMbFHV//FcWa189UQpBYqpBx6yddilmcpGOVhA526eEvOx9ZPVfdg6axjYZBp1ju6MsHAU2wCixr+PXcusVdeHP4ONzOhqQJW7adfLo6PFedYdCh45FjpvlZJq+2FWxAxy0TKJEjJsvN2k9oarKbuUIZbb/0SPF5vS0imEF1kt6sjo3NLbH40eyS9vupBrTK5Kej27q9049/S1Bfj97e3VAqCPbTOol3LcWZpJCTMTSRcVmdSEnCFNcqGX0SSRPfbK0ZruVaPFnpDkGNW966qDmd95wcSYTPd7vVBIGx3gmKUGD5D3MOOu1DQLreJm6lROry4+sKlf6V0e1wTc2uNTpClWRQcz/oERWf7QWcy7+D8+7gFwctrv5hyBlKrXTzcub79jkgk2f4Oy/M4EjmP87VV88rL76vWL192Xr06OuqPjOOwehb+fHMcnJxjjCczdfqyrtHQYu67yNjqNWem6So3x57pKxa3AIfHP01i68JXzSZccndOrC6idoODw4MXBIcwnb0OYehGGrheVsXevIZjLwir/IACWuEYEhmHyx9ML+maU98XYrsBbWStzw4kiFQ37bnqZQJ7WziC+jAZQlFGNd13LFPpMxTQMYELl1x/AbDZCzT4rkef0+JtliuplWAR7ROwNhtVRxZXSVzb1Cxg16a7rUCQurK+UuYZNzdRrnIYhy0yr7LDWIa4+3dxCAKPixjKREekoJO/odx+Abj9Nef3gns1AYDq2blAMHpN+/gVvRfqO +api: eJy1WFFv2zYQ/ivGPW2AHKdp6256mpu0aNZuCZK0ezAC4yydbLaUqJJUUs/Qfx+OpGzZkd00c/OQIBTvu+N3H49HLsHizEA8hn+U/pJJdW/gNgJVkkYrVHGeQgxSzSb34fNE050wQhUGIihRY06WNCMsocCcIIaUSjuHCEQBMXytSC8gAk1fK6EphThDaSgCk8wpR4iXgMXiInMAdlEygCgszUhDHa2GikpKqG8jsMJKHjhzTmoeYmgy9rVKFwyXqMJSYR1yWUqRuIUMPhtV8Njab6l5mVaQ4f/uUAss7ERT1hmUmn6mxMI6givKSFORUEecNUfleToQYB3ttOOFT3bkqK5rF4spVWH8Qk+Oj/lPSibRomRuIIbrKknImKySvaswGaKnUpmoyhtt5XMd8qmb0WLJ2QlLuXkIh5WdK93JobFaFDOIIFM6RwsxVJVI9wpn5NHqCFK09EhUntq3Iu9KTUuTDFhHkJMxONuLvQ/mr2BeR2FHPQ3mb3Thbib6aVBnLYg6gkQTWkonaA9K36mH7Y2cMqoy/RlOPnrY4CQlST/ByZmHDU4auqaLiUgPJeOGrNeL3nna5uugXhq2Vl4awg7qpaFr5eWOtPkfcv0UzOsIjKxmT4W5Zts6gsMt1K8uk+7IfcyR0BzKb51J5zmTk8UU7dZJimkqeLuivNyspd/nofP0zaebI1OlJGHhhrp9QSJ0UknUv7ytpPzTqKJ/Udmysr/C9lHGIKH2P8YKtcbFXp63bOHB4bm//AZC/RHR3aLszNSZt+xIFGorMkzsATfOKECGbdN4eFzEjXF3tE07dLhgP3nEZov7/36M3ADxg/1RY30Veo2WHLyU2i3YurlNKcNKWojHnejrhnYcGp7b3S7NqqnyDdmLk5OHPdgnlCJ1HVbvjdZKP70BS8mikHtaKqmSja8/UhZud9P3QfkAXRNkZq0WcKWXjibHT9k91ZHRu+Gv30sEr8u7DvM29NfQ69ndvYwzT98+Tb27ubl8AOhzu5nUD2rWa9TQa8srJztXfLsqlbHuLmXnEMOg5JaY7gdTNDRoOnozWDXKA6l4dYb0XXPvqrSEGObWliYeDBKpqvQIZ1RYPEIxwFLAdlQj97V3ylPdJjWUVFrYhcMbXZ6/p8U7wpS0k39rwjVLzotoc9oqf1iK98R0huugb7jFv14Z4Vo491bMF4v5an2Fe/MN81JSx5WMSxE8z/C3l9nwRf/lq2ev+i9eDk/60+dZ0j9Jfh8+z4ZDzHAIzbm/1tKqo1gPobVaTCvrFlN33Nh+rj9uLIpMOeKaiuyz8hqTL1SkGyjHR8+OjnelMRj0RpfnoWaEQ6DJgJsG0ZZQVhKBCCh3BQMsYf7H+gNHyfrMsWjh7dT01lUjCMLSNzsoJQpXF1wMyyD3MQS5QwQseIhgJXlo3w4jfoTg3Tzn3RKPYbnk+R+1rGse9s8MLN5UGJzK1kPDF1q0HiXuUFYclFO9E9iUuR9zVZs3il8Go1Nffvuu9qxtH5RiLpPeYpQkVNq9c29be//y4vqGlx6eLnKVso1G5oN/xwD8GGObG7IbW4LEYla5GyZ4TP75D6h2D5I= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Log Workflow Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/revisions/log"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Log Workflow Revisions"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/log"}></MethodEndpoint> Log Workflow Revisions -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revisions":{"items":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"type":"array","title":"Workflow Revisions","default":[]}},"type":"object","title":"WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "depth", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Depth", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Reference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision_ref</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Reference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revisions</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "revisions": [\n {\n "author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "date": "2025-05-15T13:01:54.596Z",\n "message": "string",\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.596Z",\n "updated_at": "2025-05-15T13:01:54.596Z",\n "deleted_at": "2025-05-15T13:01:54.596Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": "string",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "data": {},\n "artifact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "artifact": {},\n "variant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "variant": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/mark-variant-as-hidden.api.mdx b/docs/docs/reference/api/mark-variant-as-hidden.api.mdx index d097a92669..8611cbb5db 100644 --- a/docs/docs/reference/api/mark-variant-as-hidden.api.mdx +++ b/docs/docs/reference/api/mark-variant-as-hidden.api.mdx @@ -5,73 +5,298 @@ description: "Mark a variant as hidden from the UI." sidebar_label: "Remove Variant" hide_title: true hide_table_of_contents: true -api: eJzVVMtu2zAQ/BViTy3A2mnQk041UAM1kqBBkubiGMFGWltMJJIlV0FcQf9eLCX50TQFeuzJMjmzj9nhtsC4iZAt4RaDQcsRVhoKinkwno2zkMEFhieF6rkHKIyqNEVBVq2DqxWXpL4vJnf2zs7CpqnJcszurFJKoff3I+vDBzXzfkii2KlAtXsmoV2hiTRyvt7cXM5fckrJM7VYS4JAykSFygf3UFHdc43dpOTo/VgbaHCeAgp3UUAGNYansYR7jPd94aDBY8CamIL03oLFmiCDEWkK0GCkd49cgoZAPxoTqICMQ0MaYl5SjZC1wFsvzMjB2A1oYMOVHIydLgroupVEiN7ZSFFIpycn8nMs83WT5xTjuqnU1QAGDbmzTJYFjt5XJk/NTR+jcNp9IV3XdRo+nZ6+DnyLlSkSTc1DcOEfooIPIiibvu6CGE0lX4apjq8BlcuPbtFuv62Twsc6dXp3YizThgJ0q06PZxgCbg/EPHd9gdBpqOPmb7pfUIy4IdgFexuaxFA3ctvtc7uHR8r5aObL1FefesCtDic9ytur+3YbX3r5/pRshIj9XwXsZ1sTl05MXVBFTMnEXEIG08G2cdruDdyBhkjheXR4EyrIoGT2MZtO88o1xQQ3ZBknaKboDYhLI+VNMLxNlNnl4oy2XwkLCpAtV4eAa3FIP/Nj2E5u9OaMpPvhbc0aLl0wP/tBDs+r7FnSnrFrl+iDErNUnJpdLkCDtNGb+WTycXICv6+oI7CYG/Nk7jF3ugb9mwq7/kED1cnZwIT15/2FVOZd5BrtQbyrtLvU7W7rHFXT7p/X/7U7h8kxvfDUV2jSe0uStYPXluOKjKAhO1iXKw2liyyItn3ASN9D1XVy/KOhIH5a6Z77INNdtlCYKN8FZGusIv1Fw3dXw0t8r94qcvScFcM9Y9XIP9DwRNvjtZ62TDlauh0As1xEO6C+Wori/d0D/DI/n9/Moet+AfNTesA= +api: eJzVVE1v00AQ/SurOYG0JKXi5BMBIhHRiqotvaRRNbUn8VJ7d9kdVw2W/zuatZ0PSpE4coqz+958vH0zLTBuImRLuMFg0HKElYaCYh6MZ+MsZHCO4UGheuwBCqMqTVGQVevgasUlqW+Lya29tbOwaWqyHLNbq5RS6P3dyHrzRs28H5IodipQ7R5JaJdoIo2cz9fXF/OnnFLyTC3WkiCQMlGh8sHdV1T3XGM3KTl6P9YGGpyngMJdFJBBjeFhLOEO411fOGjwGLAmpiC9t2CxJshgRJoCNBjp3SOXoCHQj8YEKiDj0JCGmJdUI2Qt8NYLM3IwdgMa2HAlB2OniwK6biURonc2UhTS6cmJ/BzLfNXkOcW4bip1OYBBQ+4sk2WBo/eVyVNz0+9ROO2+kK7rOg3vTk+fB77ByhSJpuYhuPAPUcEHEZRNX3dBjKaSL8NUx+eAyuVHt2i3X9dJ4WOdOr07MZZpQwG6VafHMwwBtwdinrm+QOg01HHzN93PKUbcEOyCvQxNYqhrue32ud39d8r56M2Xqa8+9YBbHb70KG+v7sttfOrl+1OyESL2fxawf9uauHRi6oIqYkom5hIymA62jdN2b+AONEQKj6PDm1BBBiWzj9l0mleuKSa4Ics4QTNFb+D3sZ+lW/VRoCAWjpQ3wfA2xZtdLL7Q9jNhQQGy5eoQcCX26Q1xDNu9BXrzhUSaYfBmDZcumJ/9Kw+zV/Ys6d3YtUv0Qaahtg+YP5CVYZU++7JPJm8nJy81MxDU7GIxTAHmaQrGOhIM9G9y7YQCDVSnEQAmrN/vL6RK7yLXaA/iXaYlp2526+moqnY/h//Xkh1ekemJp75CkwYzSdYOplyOuzSChuxgr640lC6yINr2HiN9C1XXyfGPhoJ4a6V77r289LKFwkT5LiBbYxXpLxq+uhxG9rV6qcjRf1bM94hVI/9AwwNtj/d/WkflaO92AMxyEe2A+mx7yhzsJvXT/Gx+PYeu+wWvvYlP sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Remove Variant"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/variants/{variant_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Mark a variant as hidden from the UI. Arguments: - app_variant -- AppVariant to remove +app_variant -- AppVariant to remove Raises: - HTTPException: If there is a problem removing the app variant +HTTPException: If there is a problem removing the app variant <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/mark-variant-revision-as-hidden.api.mdx b/docs/docs/reference/api/mark-variant-revision-as-hidden.api.mdx index f213a24683..db85bb0196 100644 --- a/docs/docs/reference/api/mark-variant-revision-as-hidden.api.mdx +++ b/docs/docs/reference/api/mark-variant-revision-as-hidden.api.mdx @@ -5,74 +5,308 @@ description: "Mark a variant revision as hidden from the UI." sidebar_label: "Remove Variant Revision" hide_title: true hide_table_of_contents: true -api: eJzdVU1v2zgQ/SvEnHYB1soGe9KpBmIgRlNs4Ka9OEYwkcYWE4lkScqoK+i/L4YSbTlpCiwW6KEn2+SbD755b9xBwJ2HfA1f0CnUwcNGQkm+cMoGZTTk8BHds0CxHwDC0V55ZbRALypVlqTF1plGhIrE5+XsXt/rudu1Deng83sthBBo7UMKf/dOzK0dq4lghKPG7GkAptwPqmTgKpVaXk2R93qFylPKfn13d7v4VlDsNxfLLbfiSCgvUFhnHmtqhlild7FNtDY9ByQYSw45dllCDg2659Tsw7Ef9A/DW0GCRYcNBXLMWwcaG4IcUogqQYJi3iyGCiQ4+toqRyXkwbUkwRcVNQh5B+FgOdIHp/QOJAQVaj5I5CxL6Ht5rDAh53+XODHLNTacwlujPXmOury44I9zGXxqi4K837a1WI1gkFAYHUgHhqO1tSoik9mT55ju1Enf972Evy8vXyf+grUqY5hYOGfcf8gK1vH0ghr6LimgqvmbCtT414DaFGe3qA//bOMUz4li1scTpQPtyEG/6WU6Q+fwMGHzxgwNQi+h8bufEf+RvMcdwTHZ29BIhrjj2/5U2zw+URHOhr6O7xpKj7jNVE2J3oHdt59xNdD3o2IJwl57lXCYbUOhMuygkmoKFI0SKsghG63hs+5kkj5LcvZZN1F2DxI8uX1yV+tqyKEKwfo8y4ratOUMd6QDzlBlaBWwej0VrVPhEEPmt8sPdLgmLMlBvt5MAZ9YOYMWzmHHMaBVH4hZGV03b0NlnPo+DHj0XTVE8bOV3poYPjI0j82J+e0SJPAzBpFfzP6aXcDL1XoGZtFjEUWfasdrkC9YOL4fJFATFQ+BsHl/uuDOrPGhQT3Jt4oLVKT9kpbAy7a6k/9+++U/Tj3Qt5DZGlX0cKS7G/W7Tqvdg4T8bM0fJcw30/W8kVAZHzi46x7R02dX9z0ff23JsUw3ckj7yKJZd1Aqz99LyLdYe/rJRP5Yjcb/U7zVf5KyZh3vsW75F0h4psP5PxXvuV9YeUpR3KdVMmk3IuYFj3IS+2r9s5uPq+ZqcbO4W0Df/ws+jAPM +api: eJzdVU1v2zgQ/SvEnLoAa6XBnnRad2OgRlts4Ka9OEYwkcYWG4lkScqoV9B/L4YSbTnZBCgK7KEny+Sbrzfzhh0E3HnI1/AFnUIdPGwklOQLp2xQRkMOH9E9CBT7ASAc7ZVXRgv0olJlSVpsnWlEqEh8Xs5u9a2eu13bkA4+v9VCCIHW3iXz16/F3NoxmghGOGrMngZg8n2nSgauUqjl1RR5q1eoPCXv725urhffC4r55mK55VQcCeUFCuvMfU3NYKv0LqaJ1qZyQIKx5JBtlyXk0KB7SMneHfNBfzfUChIsOmwokGPeOtDYEOSQTFQJEhTzZjFUIMHRt1Y5KiEPriUJvqioQcg7CAfLlj44pXcgIahQ80EiZ1lC38tjhAk5vxzixCzH2LALb4325Nnq8uKCf87H4FNbFOT9tq3FagSDhMLoQDowHK2tVRGZzL56tulOmfR930v48/LyqeMvWKsymomFc8b9hFewjrsX1JB3SQFVzV8qUOOfAmpTnN2iPvyzjV08J4pZH0+UDrQjB/2ml+kMncPDhM0PZkgQegmN371E/EfyHncER2fPQyMZ4oZv+1Nsc/+VinDW9HWsawg94jbTaUr0Duw+X8bVQN9/BUsQ1toTh0NvGwqVYQWVVFOgKJRQQQ7ZKA2fdSeR9FkaZ591k8nuQYInt0/qal0NOVQhWJ9nWVGbtpzhjnTAGaoMrYLH62oeb8XfDAUebU9F61Q4RH/z6+V7OrwjLMlBvt5MAZ94rIZBOYcde4RWvSembJTkvA2VcerfofujKKvBijlRemui+UjfmNtbLB5Is4q5ziHti9mb2cVzxYwGYn69HNWBRVRHyiPCQD6i60gUSKAmSgMCYfPX6YKztMaHBvXE3ypuWpEWUdoWj9PrTkL97V+JcQICfQ+ZrVFFsUe6u3HQ1+kN8CAhP3sPjrPON9M9vpFQGR/YuOvu0dNnV/c9H39ryfHIbuTg9p4HaN1BqTx/l5Bvsfb0QkdercYN8Yd4Lv801ppneo91y/9AwgMdzp80Xoj/Y+QpRXHxVkmw3YiYF9zKie2Td4KVfdxJV4sPi5sF9P0PWesSWw== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Remove Variant Revision"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/variants/{variant_id}/revisions/{revision_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Mark a variant revision as hidden from the UI. Arguments: - app_variant -- AppVariant to remove - revision_id -- Revision ID to remove +app_variant -- AppVariant to remove +revision_id -- Revision ID to remove Raises: - HTTPException: If there is a problem removing the app variant +HTTPException: If there is a problem removing the app variant <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","title":"Revision Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "path", + required: true, + schema: { type: "string", title: "Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/observability.tag.mdx b/docs/docs/reference/api/observability.tag.mdx index 12136b8216..e8ac404fae 100644 --- a/docs/docs/reference/api/observability.tag.mdx +++ b/docs/docs/reference/api/observability.tag.mdx @@ -5,16 +5,9 @@ description: "Observability" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/open-evaluation-preview-simple-evaluations-evaluation-id-open-post.api.mdx b/docs/docs/reference/api/open-evaluation-preview-simple-evaluations-evaluation-id-open-post.api.mdx deleted file mode 100644 index e9be541d06..0000000000 --- a/docs/docs/reference/api/open-evaluation-preview-simple-evaluations-evaluation-id-open-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: open-evaluation-preview-simple-evaluations-evaluation-id-open-post -title: "Open Evaluation" -description: "Open Evaluation" -sidebar_label: "Open Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzlWN1v20YM/1cMPrWAGmfBnvQ0L0nRrNmSxW5fDMM4S7R93elOvQ9vnqH/feCdPi3bTZoUGJCnxBL5I/kjxeNxB5atDMRTuN4w4ZjlShqYRaBy1P7XTQox/ZJzrCXmucYNx7/nhme5wNYbM2+L8XQ+96q5MhYiyJlmGVrUZHEHkmUIMXQUIAIuIYac2TVEoPGr4xpTiK12GIFJ1pgxiHdgtzkpG6u5XEEES6UzZiEG5zyK5VaQQBPX4CaFopgRqMmVNGgI5+L8nP6kaBLNc5KDGMYuSdCYpRODh1IYIkiUtCgtibM8FzzxsMMvhnR2Ld9yTfRZHiwkygWl0mUuLa5Qt3y89BIRpLhkTliIz4uoRYs3KLd3S89aF3wpfP6OC3AzT4QyRGFbqPRloZRAJqGI6kfSCQFEU+XdjRlcBoQiIjjBN/gcsFvSD1Assc8EGwWEoogqKbX4gok9WAEPTr73fPVBiwgytKzrCktTTnpM3Hc47TlbVmELtkpyx1K26D5px3jYFiRcJ04w/ea9E+I3o+S7O2dzZ9/CfsAEwi1mj9RiWrPtSXb3dKFH8Snl34lM0uiV5/+J1D/ULTf2m7QeC7Kn/jSOJqEUyz74KAb6LpBuEXX71/dBXbUgiggSjcxiOmf2FGCr8abM4jvLvT/HrVwG2MHIk+Xy9EcY+RRgSyMpCvwBRq4CbGmkomuxpVPscXb8UfUYsn7d+sOr4etFrVRs1VYqwl7USkVXbeXloAPeBrV5Rvl/LtUpfrZ/EnTPVGOZdSebVgQoXUZzVY4yDU++OnRIo4l2UoZHJswZFCzjwmmaMlBrpelRwmSCQmAKs0OH2Tg4cfAo++pQb+fGYr7nZXlAfJvs/jFxrG8fCzxxxqoMIli7jEmIgDmrgLwrydxS7wpDzBHjj+ihf1Kkg7GPlBTRWIP2VYQ+CbE2wbeG0ldBwKiJtyGhHJuVfhUUXFfRNgRozJHZw93p4AC1B/lQ6p8aqcf+3tf0oivmp71eJ3oCxDPV62taUZDazxcX/VvdZyZ4Gsrlmprs91/pUrSMC3+9qiqqKyBU0nn7lOF2tl9+TdS3KqnIgsysDtVfM4Abw1bYlNNxUU/GYEJvD1He3MGnPq5gupRrH6A1vYHd42FcBfpO5ffDZHLfAwy57Sb1Lkc5aJWRv8etFW0t6q2DXUMMw3JpMQxLi2FraTHcdXYQxZCWFnQ8o95UywqnBcSwtjY38XCYCOXSM7ZCadkZ40OWc/8RGUyc5nbrVUb3Nx9x+wFZihri6awtMKbKCrXSFavTxHL+EYm1ck0ycnatNP+3CtOvSdZBi2jhcqm8etUdvXOD0f0NtGYjOD/76ewc9lnsCNNHwRL/UVS2/WuI9lio46e+l/kvAiyy7JfmBXlGeaAe2OD1k7Z3fyk5sPiPHeaCcV/x3viuzOcUynxSnnxGob0zoQEq3t8s+bTOIlhTYcRT2O0WzOAnLYqCHvupiRIVwYZpzhbE43QHKTf0fwrxkgmDPWfrJgJvHspv5e2guUh2g6iyKym15B/9ggj+wm1vF+Zbwbqqn10pM0oSzG1Lu9e5qNDqr+D+bjyBovgP3CPYNA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Open Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/{evaluation_id}/open"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Open Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/open-run-preview-evaluations-runs-run-id-open-post.api.mdx b/docs/docs/reference/api/open-run-preview-evaluations-runs-run-id-open-post.api.mdx deleted file mode 100644 index b6fa8715db..0000000000 --- a/docs/docs/reference/api/open-run-preview-evaluations-runs-run-id-open-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: open-run-preview-evaluations-runs-run-id-open-post -title: "Open Run" -description: "Open Run" -sidebar_label: "Open Run" -hide_title: true -hide_table_of_contents: true -api: eJzNWEtv2zgQ/ivGnFpAjdNgTzqtN2lRb5JNYKe9GIbBSGObXYpi+fCu19B/L4aUZMkPxXkU2JMtaeabmW+GnCE3YNnCQDyBTysmHLM8lwamEeQKtX8aphDTk5xpJ2dK44rjPzPcStN7M/NfeTqbeVGVGwsRKKZZhhY1WdiAZBlCDEESIuASYlDMLiECjT8c15hCbLXDCEyyxIxBvAG7VqRlrOZyARHMc50xCzE451Est4IERk72hikUxZTQjMqlQUMAF+fn9JOiSTRX5DPEMHZJgsbMneiNSmGIIMmlRWlJnCkleOJD7H83pLNpOKU0EWR5sJDkLiiVvnJpcYG64dyll4ggxTlzwkJ8XkREhLck13dzT1AbdS58ao4LcDNLRG6ItKZQ6cRjngtkEoqofiWdEED8VG4NTe8yIBQRwQm+wteA3ZB+gGKJfSXYICAURVRJ5Y/fMbENWrdFO3Lys+drH7SIIEPL2q6wNOWkx8R9i9M9Z8u6a8BW2W1Zyh7bb5oxHrYFCdeJE0y/++yE+NPk8sOds8rZ97AbMIFwi9mJWkxrtu5kd0cX9ijuUr4lMkljrzz/T6T+ld9wY5+k9ViQe+rP4+ghlGK55Z3EwL4LpFtE7Y3rZVBXDYgigkQjs5jOmO0CbGy1KbP4wXLvz3ErlwG2N/BkOZX+CiNfA2xpJEWBv8DIVYAtjVR0Pa6pb51mxzenU8j6Y+271pavN7VSsVVbqQh7UysVXbWVt4MOeCvU5hXl/61ULyIwllnXuSlFgNJlNBIplGl488OhQxo2tJMyvDJhgKBgGBdO0/iAWueaXiVMJigEpjA91KzGwYlDLtcDQm2dksZ221d7EDAW1U5MZbvYlfwb14dmqsrFa1xv97njxHBJGyINcKs8jEgQAZMyt+GhuRESRBFBrvmCyy7QxBmbZxDB0mXMAzqbN6HuAgQNTjhHjTIpu8uRrtOO/A1LSLjFS2HGpPvmC6RjQhpVVO33rwNCvmf57L5dOR2wux32Jx7i4CIZOXnFLBtbVEPZbsBPDzjDEMMpxkuJukRb5fWUZ89yauyXqa9fhWyX4q5BaAdoVOo3touPNOUypbjcHcqOpC7JhcvkgZRymXbmlL43JptjcmF6eYp/Aiuxuqi+DZFdBp/9No7qpbubP3F2iN3T99Mqx0Od4HgolScgy4yUwZ2A+qziu62K4+TzFFk6dJw6Vf81uvWZvChI57eLi/0j/DcmeOoVep+o8b78/J6iZVz4I/XhxSLypPX1OQea6W6WtiHfVN2TFq9ZdBXlLRrDFtjVnWsiiYxeaLxPlBzFFUyXcs2OV9Mb2D0exlWgryu5Xx4e7vcAQ27bSb1TKHtUPP7Qvszp9qm+TaJ1C/3yDqrfuIPq0x1UfxNuloo+3UHROkK9qu6enBYQw9JaZeJ+PxG5S8/YAqVlZ4z3meJ+sRhMnOZ27VUG98NrXH9BlqKGeDJtCoypkkJttMXqtDDFr/0eUd56DZxd5pr/V41L/vJrGbQK33XnuVcvGRt453qD+yE05l84P/t4dg67rLWEaRGwxC+Cyrb/DNEOC3X8NIVlfgWARZb9vv1AnhH9NJFt8RpJ2jmclsFb/Nf2lWBhXPNWN2X+JlDmj4w27hz9bE0/cX0/6NM4jWBJ+Y8nsNk8MoNftSgKev3DoaZMTSNYMc3ZI/E22UDKDf1PIZ4zYXDPx3qTgHejci28720vB9q+V9mUlEpyl54gCq2musr0a3xZFUrZh2CQJKhsQ21vS6KKqqv8/m78AEXxE3eXXHU= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Open Run"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/{run_id}/open"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Open Run - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/open-runs-preview-evaluations-runs-open-post.api.mdx b/docs/docs/reference/api/open-runs-preview-evaluations-runs-open-post.api.mdx deleted file mode 100644 index aaadb1457e..0000000000 --- a/docs/docs/reference/api/open-runs-preview-evaluations-runs-open-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: open-runs-preview-evaluations-runs-open-post -title: "Open Runs" -description: "Open Runs" -sidebar_label: "Open Runs" -hide_title: true -hide_table_of_contents: true -api: eJzNWG1v2zYQ/ivGfdoAOU6TNt38aW6Sol6bJbDTfjECg5bONjuKVPmS1TP034cjJVvyi+ykKbB8cCTq7jnec0fekUuwbGagO4LrRyYcs1xJAw8RqAy1f+sn0KU3OdZOmnGm8ZHjP2Nci4cPXiRTxkIEGr85NPadShbQXUKspEVp6ZFlmeCx1+t8NUrSmInnmDJ6yjSZtRwNvWknxzzxj9xi6h/sIkPogrGayxlEMFU6ZRa64BxPII9KAaY1W0AElltB7wMnW/3EQL4WUZOvGJez5RoTYqG0+bBWXRMzcLKfmEFwDnLCWuta7dAPmExJEzw4Oz2lfwmaWPOMIKALQxfHaMzUidagEIbouRzFygWlwikuLc5QVzy/9BIRJDhlTljontIsnazzWkedCp8US2BycTuF7mhTgJtxLJQhv6tCxSQmSglkEvJoNSSdEJBXWO2b1mVAyCOCE/wRfwTsE+kHKBbbHwTrBYRdybIzK957vrZB8whStKw+FZYknPSYuKtxujXZIskrsGV0a5bSSX2k6uNuWxBzHTvB9C/vnRB/GiXbt85mzv4Kmw4TSJEkx2iFZdfE7oYubFHcpHxDZJLGVnr+n0j9S33ixh6kdZ+TW+pP4+g+pCJIlu5eA9sMbE+BdPOovnE9D+qqApFHEGtkFpMxs02AlX09YRbblvv57LdyGWBbPU+Wy5KfYeRzgC2MJCjwJxi5CrCFkZKuyWLMd++1eyvhYbLeLVr9pMrXi1op2VpZKQl7USslXSsrLwcd8B5Rmx9I/y+Feh6Bscy6xk0pApQupTYkQ5mEkW8OHSbgS7YMQyY0EOQM48Jpah9Qa6VpKGYyRiEw2d3CDMMkdk151SCsrFPQ2Gb5qjcCxmK24dOenuJvXOxq4MopfsTFep/bTwyXtCFGwOWjCi0SRMCkVDa8VDdCgsgjUJrPuGwCjZ2xKoUI5i5lHtBZVYW6DRC+vZuiRhkX1WVP1al7/oIpJNzsuTBD0n3xBdLQIQ1Kqrbr1w4hX7N8dF8unQ70+gSxr8+/YpYNLWZ9WS/AhxucfvDhGOOFxCpFa+l1aGZPmtTQL1OfvxmyTYqbGqENoEGhX9kuXlGXy7KMy82mbE/oYiVcKneElMukMab0vdLZ7JML3csh/gmswGqi+iZ4dhnm7LdxzJ67u2XMzpvE7uj7cZnjoY6YeEiVA5BFRArnjkB9UvLdlMlx9HmKLO06Th2r33wRUMve0fGoZnVcz/3Z//XZ2fbp/gsTPPEarWuqyc8/2idoGRcNp3Sh4trXp5x1HvYz9KksrLSuzawpX2/QGDbDpsK9YpLIaIWafCAbya9gupCrFsMVvYHd/W5cBfqaovvh/v5uCzDEth7U2wxlq8icFO1c0Z1YcdcV1jR0iouxTuVirEPXLB26GKOlhZoaAR8fpwV0YW5tZrqdTiyUS07YDKVlJ4x3WMb9+jEYO83twqv07vofcfEBWYLaZ21FYEgZFHKiLrYKB8v4R79thL0Tes7Oleb/lh0U9UcwD1rkPuXmYH2Jd/2dpZnA2qXcCM6n7Lc304vX7TdvX71tv35zcdaenE/j9ln8+8X59OKCTdkFPPiyPlV+MgXvPe9qq3fXh0qDDacnr05OYZP7mjAtJRb7pVR64j9DtMHpik1q81K/jsAiS/9YfyA/KYbU8q3xqqHeOP4WXFr8bjuZYKEh9GaXRRaMoMgCslq5Ty0u3Pytqu9R55Q73REslxNm8LMWeU7D3xxqCvdDBI9MczYhukZE4bwMfFFq4DJsKu370EGQsRDojQ2GFn/Q6MUxZrZR9qGS3ne3w3uIYFLc4aYqIR3NyDf67YL3JzhIiUFjSxBMzhztCV0ImPT3H+UgpYA= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Open Runs"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/open"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Open Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/otlp-receiver.api.mdx b/docs/docs/reference/api/otlp-receiver.api.mdx index 9351223d39..9298c31e2e 100644 --- a/docs/docs/reference/api/otlp-receiver.api.mdx +++ b/docs/docs/reference/api/otlp-receiver.api.mdx @@ -5,59 +5,100 @@ description: "Receive traces via OTLP." sidebar_label: "Receive traces via OTLP" hide_title: true hide_table_of_contents: true -api: eJx9U0Fu2zAQ/IoxZ8JyetSpRi8NUsBGnJ4MoVjTm4gpJTLkyqgr6O/FSo4dG2h0kUTOLHdnhj2EXjLKLVa7zOlAO+edHFEZ7Dnb5KK40KLEI1t2B55JIst5dnA0Wz39WM9hECInUtj9HiWC+PgrTegEg8Q5hjZzRtnjy2Khr+vSm85azvm587PHExgGNrTCrSicYvTOjkcUr1k5PbKtuSH9ikkbEDedkIWkG7/kGBklsiTXvsBAnHhd2EyIYTDvkLB7ZStjr2+dS7xXPU6FqgvxW/CerUz8c6eDPgYNSx10/hiylookNUoU4aOsxeGuUH2KSUUY6CYnNaBHlzxK1CIxl0Vhfej2c3rhVmhOrqDoMFTKsF1Si5SyXN8/8PE7054Tym31EbBRhSZRrmFnaSi6Bz7CoKVG/5ed1CG5v6PSMHDqTj2xdEbXPoeRfhJkOTY3W67vYaBjTH4u5nfzBW4DdAVWc8mO5r6fPW7D3Khwnh8G3JDTPWFqvl42tDMVvaH2Q73/5PW2rf6Ss88ifhJM+I8U0ZNrMZw67U9Ob3HltApyp3dDfFT+5HdlUGs8yi36fkeZfyY/DLr81nFSSyuDAyVHOxV4Ww3mXX91+zcfVSlrOWrEDuS7ycab66EpOOdxvdo8YRj+ARPcVac= +api: eJx9U01vozAQ/SvRnK2Q9Mhps71s1JUSNd29ILSamGlwa7BrD2iziP++GiCfUssFsN+8Gb/33AHjIUKawWYfKbS4N9bwEXIFBUUdjGfjakjhmTSZlmYcUFOctQZnm5ef2zkocJ4CCmxdQAqOrf8TRnQABYGid3WkCGkHD4sHed1S7xqtKcbXxs6eJzAo0K5mqlng6L01emiRvEWp6SDqkiqULx9kADZjh5ZCNCOEj54ghcjB1AdQwIatLPyeIL2CyMhN/Aq8GxF9r04Qt38jzcPJPhoTqBD1Tm3PlPmF4tFZS5pHpvMJe3kUVMSlE928i0LqkUtIIXHXdiTtMhFdk1F96UJBWkKaddAECymUzD6mSaKta4o5HqhmnKNJ0Bu4N3M17M4eBQp9LnS6CeK78K226yc6/iAsKECa5deAncg+Kn0LOyuI3jzRERTUWMn/quHSBfNvsA8UGBmgHKtEAFO/uqF8Umua7Tvqd6oLUBdHYTFfzhefHWYqmK226yk9qIf0nOYYYKDu5DoLBQqoQiN7TFh9u2zIlOJOhfUV3ycX4n687hLkr+7QJB7TX068RTOkc5i0myKRwU0kRJilXD62XurHYOQKSslRmkHX7THSr2D7XpY/Ggpib66gxWBwL2Jnea9OXojz73QUpbQmL1ls0TajpXf3TxJxDu52s3uBvv8PXy53Zw== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Receive traces via OTLP"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/observability/v1/otlp/traces"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Receive traces via OTLP. -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CollectStatusResponse"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "status": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/otlp-status.api.mdx b/docs/docs/reference/api/otlp-status.api.mdx index 7f0e8e8a05..dcd34b614a 100644 --- a/docs/docs/reference/api/otlp-status.api.mdx +++ b/docs/docs/reference/api/otlp-status.api.mdx @@ -5,59 +5,100 @@ description: "Status of OTLP endpoint." sidebar_label: "Status of OTLP endpoint" hide_title: true hide_table_of_contents: true -api: eJx9k1uL2zAQhf9KOM8iTvrop4ZS2rCFDd3tUzBFkSextrKllcahqfF/L2M7V2j94ovO3L4z7sD6kJBv8bxLFI96Z53lEwqFkpKJNrD1DXK8sOY2zfx+9vz6bTOjpgzeNjyHgg8UtcjWJXJ4duFnGtRQiJSCbxIl5B0+LBZye0jcGkMp7Vs3+z6JoWB8w9SwyHUIzpqhQPaWJKZDMhXVWp5ClPJsxwpT3bwDnwIhR+JomwMU2LKjyxzoe3WW+N0bGR56fW9tpFJoTImKa+An7xwZHuMvnfZyKdTElZfpDySZguYKOTJ/yzQ7LjOBk3HUhgSOHFIU+h3a6JCjYg4pzzLjfFvO9YEa1nNtMx0s+kIiTBvFHwlZbdZPdPpKuqSIfFvcCl4E0MjkXnYho4N9ohMUGl3L+6rlykf7ZwANBSvmVGOUjGibvR/CJx6robnZarOGgowx2rmYL+cLPG7PnVi81Wbw9lx7OIZ6oHCZHwpUaytnTLr+eD2QzoJPXOvmJt8/lvWxre66Zv/b7wkY02/OgtO2QT912k1Ob3HntABZyo/BLkj86HehUPnEou66nU70I7q+l8/vLUWxtFA46mj1TgBvi16d+Yvbv+gkpIyhIIMctWtHGx/+DtmCyzp++fyKvv8LS5BUqQ== +api: eJx9U8tu2zAQ/BVhz4Rl96hT3aBojRSI0aS9GEKxptYWE4pkyJVRV9C/FyvJjxhIdJFEzr5mZjtg3CcoNvCwTRQPuDXW8BFKBRUlHU1g4x0U8MjIbcr8Lnt4+rHOyFXBG8czUOADRRTYqoICPNvwJw1oUBApBe8SJSg6+DSfy+smcas1pbRrbfZzAoMC7R2TY4FjCNbooUD+nCSmg6RralC+QpTybMYKB4rJjBA+BoICEkfj9qCADVs5+D1BegVTlx+Ax6mh79UJ4rfPpHmY7LU1kSrh7lT2nLK8pLjz1pLmMdN5wl4eBQ1x7YW1PUnOgFxDAbm/1iI/LHIhNeeImoRUuaQoqnXQRgsF1MwhFXmurW+rGe7JMc7Q5BgM3Cq5HG6zO4FCX0o63UYRXfIt16t7On4nrChCsSmvAY/C+kj0W9iZQAzmno6gwGEj/8uWax/Nv0E9UGCkgXqMkvmN2/khfCJr6u0L6hdyFaiLoDCfLWbz94aZArLlejWZB/VgnlMfAwzUDV1nokABNWjkjgmbz5cL6TL4xA26q3zvbMNte93Fxx8t0EQe01/Og0UzmHPotJsssYE3lhBiFrJ5bIPEj8YoFdQ+saC7bouJfkXb93L82lIUeUsFB4wGt0L2puzVSQtR/oWOwpTWFGSQA9p2lPRm/cQRZ99++/oEff8fFdF2Zw== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Status of OTLP endpoint"} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/observability/v1/otlp/traces"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Status of OTLP endpoint. -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CollectStatusResponse"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "status": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/otlp-v-1-traces.api.mdx b/docs/docs/reference/api/otlp-v-1-traces.api.mdx index 2319544567..36f4319cdd 100644 --- a/docs/docs/reference/api/otlp-v-1-traces.api.mdx +++ b/docs/docs/reference/api/otlp-v-1-traces.api.mdx @@ -5,59 +5,97 @@ description: "Receive traces via OTLP." sidebar_label: "Receive /v1/traces via OTLP" hide_title: true hide_table_of_contents: true -api: eJx9k0GPmzAQhf9KNGcLkh45Neql0VZKtNmeEFpNzGzw1mCvPaCmiP9eDRCyyWG5YOw39vh7jx4YzxGyHPanSKHDk7GGL1AoKCnqYDwb10AGz6TJdLTigJriqjO42r/8OiSgwHkKKLJdCRk4tv6127xOQlAQKHrXRIqQ9fBtvZbX/d7HVmuK8a21q+dZDAq0a5gaFjl6b40ez0jfo9T0EHVFNcrIB+mAzXRCZOR2HPHFE2QQOZjmDArYsJWJ46QYBnWVuNM7aR57/WhNoFKAzBsVt8IfzlrSPNUvnQ7yKKiJKycAvIuylUeuIINUeKTdJl14CGYKwryHNljIoGL2MUtTbV1bJnimhjFBk6I3MBRSodsgrkjJ9rB7ostPwpICZHnxWXAUJhOGe9kCA715ogsoaLCW723LlQvm38gWFBjxo5qq5FameXNj+YxgOza32h52oECuMTm4TjbJGh4zcycWO1GPdl7PHpdBPVBY7g8KqEYja0xYf78tSGeCucbm037XiN5oLzF9bK2/peurZM/QmP5y6i2aBoa52372Nx/zLiw2op88LhRUEoIsh74/YaTfwQ6DTH+0FMTGQkGHweBJoObFoK7MxeE/dBE6WpOXIHVo28m6h59AnF9Sd9gfX2AY/gOYFktC +api: eJx9U8FuozAQ/RU0ZyskPXLabC8bdaVETXcvEaomZhrcGuzaA9os4t9XA4S0kbZcAPvN8/i9Nx0wniJkB9geI4UWj8YaPkOuoKCog/FsXA0ZPJIm01LCATXFpDWYbJ9+7hagwHkKKLBNARk4tv65XT2PQFAQKHpXR4qQdXC3vJPXZ+59ozXF+NLY5HECgwLtaqaaBY7eW6OHM9LXKDUdRF1ShfLlg3TAZjyhpRDNCOGzJ8ggcjD1CRSwYSsLvydIryAychO/Au9HRN+rC8QdX0nzcLP3xgQqRL7LsTNlfqW4d9aS5pFpvmEvj4KKuHQinHdRSD1yCRmkomPartJZR7GHgnjVQRMsZFAy+5ilqbauKRZ4oppxgSZFb+DWv/Wwm9wLFPpc6HQTxGrhW+82D3T+QVhQgOyQfwTsRehR28+wWTP05oHOoKDGSv7XDZcumL+DYaDASAPlWCVXNvWLG8onfabevqN+o7oAdfUQlovVYvm/y0wFyXq3mfKCesjLpY8BBupGrlkoUEAVGtljwurbdUO6FD8qrD/wXWbgass8B7ctdtf4fjU6k4BMfzj1Fs2QyaHbbgrCYRgo0WQl+DEMuYJS0pIdoOuOGOlXsH0vy+8NBbE0V9BiMHgUgQ95ry76i9tvdBZ1tCYviWvRNqONN1MmKZjjudvun6Dv/wFsAm0C sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Receive /v1/traces via OTLP"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/otlp/v1/traces"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/otlp/v1/traces"}></MethodEndpoint> Receive traces via OTLP. -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CollectStatusResponse"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status"} + required={true} + schemaName={"Status (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Status" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "status": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-analytics.api.mdx b/docs/docs/reference/api/query-analytics.api.mdx index fe2cd56fdf..fe11dd9a78 100644 --- a/docs/docs/reference/api/query-analytics.api.mdx +++ b/docs/docs/reference/api/query-analytics.api.mdx @@ -5,36 +5,36 @@ description: "Query analytics, with optional grouping, windowing, filtering." sidebar_label: "Query analytics, with optional grouping, windowing, filtering." hide_title: true hide_table_of_contents: true -api: eJztWFFv4zYM/iuBnr2mLfbkp+WuvV1x3dr1snsJgkKxGUdXWfJJcros8H8fKNmKlKSJ2y7AHvaUwCb5UfxIiuaaGFpokk7I3UyDWtIZ48ysyDQhsgJFDZPiJicp+VGDWj1SQfnKsEyThFRU0RIMKFRfE0FLICmZS1VSQxLCRKdFEqLgR80U5CSdU64hITpbQElJuiYg6hLxORQ0Q1lagDAUPTCrCk1qo5goSEJymNOaG5J2MgkxzHCU+eRgmyYJPMlq/QpHqFjdze1RYlw02T4RNeekmYawiBGiSp6Dfs353wJ750BCXAHPp8f93YGEuEwYTBv+HmS0UYA6CH3T4UQUM26gTY6T0uxxQnTDSnigooATo49ZCcrihOi0qh5ZfmLoUVUNbvIIF8SSKSlKEKfOtusAKfRgSRWjJ0f/1qI0+FCBrqTQoNHa5fk5/uSgM8Uq7JAkJV/rLAOt5zUfPLTCJCGZFAbdRx+qirPMNtThd406670eVgobr2EOy0hD+WMma2dkq2CCHEG5wUcr1yRkThmvFTwqaiDQE3U5i9Q+ObnBA8o1iYfT5pBWB6YtFl0WRzVGyyKS59SAyFbHVG5bMe+ZkU8gdI9IjJ1gC7ejthdto5NTY1lhBkqrtkUKK0EbWlaBRX9JtRdgikbgJxQlcSk7zSYh2qVMD3bb5Nrl97hqx7BXPUZVR1MPit5PT+MveTn7DpmJyngSBHo7WtshaM+1cXvLpaCwb+2gcUUNvZfMxaT1gSpFV4GvKHPcx6BCtwovqqegUOIa2PI0ytg2FXe8H3VzmO812MriLPW58ab71ufLrM6ewOjTl4OfJA6lz2YMaMO2686/ce5g1jzHflC7SXiv1bYsDhm96vS37Ha1+BabH10mRfY29fems4990m2M7sn+Tvw3MIpl+mp8h2yAUlL9z8Z/go1XtNVgfnf11DEZePLBtoCW5xd65Ye2TRzD7tpJ/DWzp58FAt3DwR846g28MGkahPv58nJ3HvtGOcstzYNre55XDGNxBudgKOMH+h+XWfS2x7Tp+Z++HNFb6RzEoJe62NdcN9xrTQvY0POyqA3GYIxvj1GF53LQrVw0HXfhddE9cIm68B1K3c/j8f2OQcdtTKrj3y8hksEzM4uBtK8pHxRK1hUTBT4XuXy2f/034hkeBsxC4jqjAGNXGGZBUjKU4e5juLwYhnsOfNUtOWrFSUoWxlQ6HQ4zLuv8zO0izigb0orZvNWQ1Qq3KKgyur/5AqvPQHNQJJ1MQ4GvmHIuiWIxzx+t2BfAcLbfPqPaLKRif3cNzH4BLZxWYy/RuXR3cjvXWucGo/sbkhA8hgvk+dnF2TnZDm8kjNVCM1stHXa3dImj4M+PraO0pUIM0PKXzQv0rJLalFQE9t7NZuS9D5mBv8yw4pTZyrG+rlumJyRiGkNygQOXZ3uakIW9BSZkvZ5RDX8q3jT42H1lIqE503TGg+/MJ1iFi68l5TX6Yev9RWG3m+oj6zdKfYT9GqiPcND7ezkdbFv6yIf7kT7yfqPRRzheQ/TR2KwNNtLTxD2eYbFMsBkvukJdt2qjLIMq1Nq5O9CKbyy/Xo9J0/wDE1VCpA== +api: eJy1Vt9v2zYQ/leEexbsJOiTnuZt2Rq0W7I26x4MIzhLZ5kNRbIk5cwz9L8PR0oK1SSF08JPlnkf77tfvLsDeKwdFEu4XjuyO1wLKfweVjloQxa90OqqggK+tGT3d6hQ7r0oHeRg0GJDnixfP4DChqCAjbYNeshBqOEW5GDpSyssVVBsUDrKwZVbahCKA5BqG+aXVGPJWKxJeWQL/N6wSuetUDXkUNEGW+mhGDA5eOElY36LtF2XJ5aUrXuFIaj215vgypSXVfYnqpUSulVKyxwpq5YVudf4/z2015Ek5VX0cHrePyNJyvsgVKUffoRXKE812W8S/xNZJukV0lNfGCdN8ciTsnvR0AdUNZ2Y/VY0ZANPyo7G3InqxNQLY7KrasJLaiesVg2pU1faZcKUWrBDK/Dk7J96lo4PLTmjlSPH2i7OzvinIldaYbg7QgEf27Ik5zatzD70YMih1Mqz+WyDMVKUoZnOPzu+c/iWhXr9mUo/cWsJXnuUd6Vug/cbFLK1dGfRM9cgDB0Ad3X6KdGTCp01ory+J+V64finwr7n9iF4H9rxYuj3o19J2J41c0fWcVRyWLflPXmXKn1GXSIdDrO/OKvZCIau67oc3lxcPA39J5SiCoHNLq3V9jVxN5ZHnBcxsxV5FJK/hKfGPQVIXU6kRxTW2NpW3TjN0FrcJ5PrvY4GQpdD42rW/PXcG6B/kHPIrWBQ9jI0BCO7ZWn3yP1sxtivSN3jJg9hCG+M7stu/BrD9xzZAHl7e3vzRGHM7TSpMf/jrpFnD8JvMx3EKLPa6tYIVfM5j4XwOY6DGTtDfqt5a6nJh03Fb6GAuU5XnPnufJ6uMywadpnWSihg671xxXxeSt1Ws7hyzFDM0Qj42uRFkGa/MDQUtaOytbxJsb7FzdU72r8lrMhCsVylgI9cj7HCprAxuWjEO+JY9z1w0fqttuK/WDZ9J9zGWxxMoTY6XB9eXbTtZyzvSfHUGN5oAWez89nZS870F7LFzVX/rLAMz2qwY1jCpuEaAwU5UBPeFHjC5qdHAVtptPMNqkTfD6d94sUYPk//+rmRKMITC7Ye+pJYwqQkODTn3BjHsljlsOVOWizhcFijo7+t7Do+jpOHk1sJh2uZzJ572qeL8A5ly3aExvAiOO6qx2DHDfMY8LgWHgMed7mjTE72r2Pw6cZ0DH7ccY4BTxeTY248LhKP6FUej9f8bJbcs7fDkz301xZlSSa99WTEsJax//x+eQtd9z8ojo6j sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Query analytics, with optional grouping, windowing, filtering."} -> -</Heading> +></Heading> <MethodEndpoint method={"get"} path={"/observability/v1/analytics"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Query analytics, with optional grouping, windowing, filtering. @@ -43,29 +43,1123 @@ Query analytics, with optional grouping, windowing, filtering. as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"format","in":"query","required":false,"schema":{"enum":["legacy","agenta"],"type":"string","default":"agenta","title":"Format"}},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"filtering","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filtering"}},{"name":"timeRange","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timerange"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}},{"name":"environment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment"}},{"name":"variant","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"properties":{"total_count":{"type":"integer","title":"Total Count"},"failure_rate":{"type":"number","title":"Failure Rate"},"total_cost":{"type":"number","title":"Total Cost"},"avg_cost":{"type":"number","title":"Avg Cost"},"avg_latency":{"type":"number","title":"Avg Latency"},"total_tokens":{"type":"integer","title":"Total Tokens"},"avg_tokens":{"type":"number","title":"Avg Tokens"},"data":{"items":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"cost":{"type":"number","title":"Cost"},"latency":{"type":"number","title":"Latency"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["timestamp","success_count","failure_count","cost","latency","total_tokens"],"title":"LegacyDataPoint"},"type":"array","title":"Data"}},"type":"object","required":["total_count","failure_rate","total_cost","avg_cost","avg_latency","total_tokens","avg_tokens","data"],"title":"LegacyAnalyticsResponse"},{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"buckets":{"items":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost","default":0},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens","default":0}},"type":"object","title":"MetricsDTO"},"error":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost","default":0},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens","default":0}},"type":"object","title":"MetricsDTO"}},"type":"object","required":["timestamp","interval","total","error"],"title":"BucketDTO"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"OldAnalyticsResponse"}],"title":"Response Query Analytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "format", + in: "query", + required: false, + schema: { + enum: ["legacy", "agenta"], + type: "string", + default: "agenta", + title: "Format", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "focus", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Focus", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "oldest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Oldest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "newest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Newest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "window", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Window", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "filtering", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Filtering", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "timeRange", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Timerange", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "App Id", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "environment", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Environment", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Variant", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"LegacyAnalyticsResponse"} + value={"0-item-properties"} + > + <SchemaItem + collapsible={false} + name={"total_count"} + required={true} + schemaName={"Total Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Total Count" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"failure_rate"} + required={true} + schemaName={"Failure Rate (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Failure Rate" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"total_cost"} + required={true} + schemaName={"Total Cost (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Total Cost" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"avg_cost"} + required={true} + schemaName={"Avg Cost (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Avg Cost" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"avg_latency"} + required={true} + schemaName={"Avg Latency (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Avg Latency" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"total_tokens"} + required={true} + schemaName={"Total Tokens (integer)"} + qualifierMessage={undefined} + schema={{ + type: "integer", + title: "Total Tokens", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"avg_tokens"} + required={true} + schemaName={"Avg Tokens (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Avg Tokens" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + data + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"success_count"} + required={true} + schemaName={"Success Count (integer)"} + qualifierMessage={undefined} + schema={{ + type: "integer", + title: "Success Count", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"failure_count"} + required={true} + schemaName={"Failure Count (integer)"} + qualifierMessage={undefined} + schema={{ + type: "integer", + title: "Failure Count", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"cost"} + required={true} + schemaName={"Cost (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Cost" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"latency"} + required={true} + schemaName={"Latency (number)"} + qualifierMessage={undefined} + schema={{ + type: "number", + title: "Latency", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"total_tokens"} + required={true} + schemaName={"Total Tokens (integer)"} + qualifierMessage={undefined} + schema={{ + type: "integer", + title: "Total Tokens", + }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem + label={"AnalyticsResponse"} + value={"1-item-properties"} + > + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + buckets + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"window"} + required={true} + schemaName={"Window (integer)"} + qualifierMessage={undefined} + schema={{ + type: "integer", + title: "Window", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + total + </strong> + <span + className={"openapi-schema__name"} + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>duration</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>cost</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>tokens</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={ + "openapi-schema__container" + } + > + <strong + className={ + "openapi-schema__property" + } + > + error + </strong> + <span + className={"openapi-schema__name"} + > + object + </span> + <span + className={ + "openapi-schema__divider" + } + ></span> + <span + className={ + "openapi-schema__required" + } + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>duration</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>cost</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>tokens</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={"{}"} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-annotations.api.mdx b/docs/docs/reference/api/query-annotations.api.mdx index 9d4d5b6c21..7df55fa1c1 100644 --- a/docs/docs/reference/api/query-annotations.api.mdx +++ b/docs/docs/reference/api/query-annotations.api.mdx @@ -5,67 +5,1639 @@ description: "Query Annotations" sidebar_label: "Query Annotations" hide_title: true hide_table_of_contents: true -api: eJztXG1v2zYQ/ivGfdoAOXbcvLT6tPRlaNasyZK0A2YYAS3RNhtJVEkqiRfovw9H6tWW5Xcg7ZQPiSXx7siH5N3pHjrPoMhYgt2HsyDgiijGAwkDC3hIhb46d8GG7xEV0ztSaGKBoN8jKtVb7k7BfgaHB4oGCj+SMPSYoxt2vkke4D3pTKhP8FMoULdiVOq2mU5zNb0cgd2fbcUFG7OZFmoaUrBBKsGCMVhAg8jHgTiRVNwHCyaRTwKwgESK45AUUx5K3DA/9OitIA69NHpjK1MXRJ4H8SC24J4F7moWiTvhDl4/EA8sCD0yXWDvE+qstOZMSBBQbzWDXHkhWPBIh2CBdO9xkCFbYPNdornSrJn9ok3iugyng3hXMxNV3auCWhYoOqaibMkflu8MOfcoMZhX2wKHCSfyiPjlM79gUv0hedA+D8JI/QpWqoYPv1FHVQwqx2BWGuJ1pG8RmdgCnyrychH6PfK8ZfgwRf3VhIgQZFqLSll0PUT/RCRjdBwjKmjgzKJW3vLa5dQ1eKBCzrmNhcjP9eZrIh5bIL1ovKmaG5SNLWBLfMWIC58osCGKWJULyDWeuxDP4Zo/vk7Rq97QxlM/EMFI4owb+NaGT9AHNg9Og99y/BSVStJm4W0KXLNztwWw2bubIlhI2xvwtgCv2cO7ALHZx5uiiK+hEVFcNNBtDF2zh7eHsNnB2+QyDpG0QW495GrkCgWx67z+UIm+x4L7FYti5SmRIQnu6pGoxTIkQQuHb4HCfm6hSo+ztQTKCxbcV1dwkorRzzW+5cWtCz3xdSrzIvlfujxVncVkje4qltL/FNscuVYCswWPLHD5I/anxs8F9JFKtaJ3cYmibcX8Ku9QKAwblbEF3HN3rfzSqIwtCOjTqqqXesXPqEv7Jp9VK60sLc8tcJTGcQuXivq+ZeSGdGjgmnsuzS4GtRho9RgWAkUFsiKb9vg8VYB1Y6JopaL5EvqcnmuUrVvQf2drcb24MuMRrg0pBnEcG4aMCeqCrURE9Q0Z8kCahd3rdvEPYipYaN664SZyHCrlKPJa10ljsDbl1hweGaEZwPPev9MtcGJHJPIU2N2S/9JaFjgsR1CiqHtHdrt93hm1rTO9TqPQ3YeRL0ZtYsSlHt2DkfdGbWIkhWs4XeKa1/EKKVhvp4nvT/HaqZUUrcxKCthOraRwZVZeYkS0Ckz0Ioe5Af9c2ICpeIGAXuiZ16Odi0aMaJl2XmRmI7K5ZCxk8CNRzZeR2oZrNuI/Ndlch9BitnlOag26eRNQU77ZJQmoDZR1UBZcMaki6ht6vqHnXwZ8TWFxm8JiQ8839HxDz/94CDb0fEPPvxwQm328KYoNPd/Q8y8BwmYHb5PLNPT8+shtQM83ZPxPTRivRL7nNFrf1PJKlal0iVRyzXMWqxrJYrW6vyLbJzN6LtZc31GvN8/mfSUecw3p/UEILjan8lyqCPNq6DiPO6Wn6xQ1B4tRuuBOBqQvx1U8QV5ulZKMaQ754qYajNYtPl024Z6mONB00q7oJDN4DbqLh/HewFc3tR9vb6/mFJq5LU+q5nlb5eXjUzXh+EXJkEtUGhI1ARs6IQZZ+tgpUKodUzm1QFKBQULPUSQ8sGGiVCjtTsfxeOQekDENFDkgrKMJlAFKOJFgaqpFzq7OP9HpR0o0k98fFBvc4Coy66LcLJsSErJPFHsREF8v7EhNuGD/mslG4h77Y6QQAlyf1/kXPj88EfTXZqEVv8CZ0mM5C2ZYrIysyginlFdKaKGc/JgrPGel5iym5ivKBMf8Gr0YvBqR18ejk6P28enhafvo+KTXHr4aOe2e8+bk1ejkhIzICVQVY/djoJho7dpCoaC3J9X7xKeqKLRrGzNlkz2q3ydSi169d22n9HK6N+X7RKr6BWcfKzd9Bdit7kLOG1ceJuwXcr9CaM2SuCzSD2ZO2KUn6aDX7R21u6ft3pvbw2P7+NDuvT7onh7+A/mBuLo25lzbasPJTqx1s0NnpRNl+QGxbnrAqxvrg2MjrsNVmnjpYNg6uzoHqwB49+DwoAuzEbrUGBMu4uillsY6/RismaibxVs8++DrbAsUJf5v+QPsGUZ4PNeR66tKCEodyqKuok+qE3pE/8sBY/45yRX6kOQKUD6AlQQRTHsmmFvYfXh+HhJJvwgvjvF2Eh77Awv0thoiYH3M6SZpcvAM93Sqj3vp5LOtMy9s7kUmGZhJRDFJNBJnjkNDVdt2UEh/ri5vbsGCYfI/IXzuoowgOCr8bQOusTA7W6bvPYNHgnGEuaMNRif+/AfFZnTo +api: eJzVWG1PHDcQ/iun+dRKexzhLe1+KkmoQkMEBZIvJ4R83rk7B6+98QvJ5bT/vRp7X2E5aASVyodA7JlnxjPjZ8a7BscWFtIpHN0yaeEqAV2gYU5odZxBCl89mtU1U0q7sGghAYNfPVr3RmcrSNfAtXKoHP3JikIKHgQnX6xWtGb5EnMWdtXqdA7pdA1uVSCkoGdfkDtIwAknaeGwsfM32T2PhqBMGhXlpYTyqlUJgqNGsixLctAWWlm0ZHVne5t+ZWi5EQVhQwoXnnO0du7l6LwShuTpJykMRcmJaIFrH5UqH4VyuEDTOdfbIFEmoGVGbg4Fwzoj1AISmGuTMwcpZMzh2IkcNwbgNEKWCUiRi2Hs2qNNOCdBu0ygm+x0DcJhbgcObZA5zK7Z857mbYQdHQZXfJG9hJFPEbYykqHEFzDyLsJWRupwzVbXInuiHe9F9qRgvVmNjrNuvJ7VSh2txkodsGe1UoersWILpir8u6i1zkXBVCXtDOP4iPglyVTyN0JlkRbmzEvykHvrdE7id9RR+ZwYshFY+pwpSIB5p+FqiL0+EDqdQXvDsW+HFWKDkW84gwRsdkP4hRiGv4iwlArmIrVmmaAdJs96t/ShzHQyMcgN+ay/MtNaIlNhadgWcGG4l8z88qeX8i+r1fjUu8K7X9vTVnzfwWXGsNXGuriDFnL9QPd4R8EoE8jRsSYwTQD+dyGqiPcpWs8Qxk3KH+uAht46R4OK40BPwFsmPXPa3N96PqKo2EH6xROzdw/hgnTLBG7RWBFb+8/AfK7Uyw0l2d7Z8zpuIfRoncXhfvNEjLt+VaicWXxW2IHD0fwnDGbEV23KB5nqvK2WMKCoG7uJrvo185Id4JFj1aY7sIPnOxHqZhMlnYQT/4S1itp7960O4KAnHS8iGwwJEUbTiaaPJjcOtoPmbDM2x5F7b2fn/pT9mUmRBfHRkTHa/PyInaFjQm4YR6Xmvd1/w+pXD4fuRPMmurldbKqtj2gtW2Cbh4dFQzBGl7T7WAroXNF0JdcloCa8MboPH+NdDN8mpnp/eXl2DzDmtp/U+ODq11SObqnpuVhoS6AFc0tIYVIYvBX4bdJ5UkzCi5JmHDREwCFH3khIYelcYdPJhEvtsy22QOXYFhOTODH1vTgMu6O3JBpY2SL3RrhVwDs8O/6Aq/fIMjSh0DsCF1RisWj6Yu1QUogPSC4qloeq926pjfgRKyEBQQ4soxbFh4r3vH0TH31neSErFm6uJ8E3DNWWRMNx7VIcTdtxsx4iq9mwM93ca8e9BhxQd+fst/35wd54//Wr1+O9/YOd8Wx3zsc7/PeD3fnBAZuzA6jbaetD0xrbJeacETPvgqWy38T+C1N1Z3tZW50uFf4j1FyH3NUMGOvuDeM3qLIe5PbWq63thwq1Uhgdnh1XLMh4CF1dY0EMkjtXobkE9ETIAwWCQ5b/0W6Ql3Tt6E3S4g3d0p5jTbU7/O4mhWQikFwwv64u8BSqCwz9rwJJ/CxEXLSkC59OYb2eMYufjCxLWo776fQqgVtmBJtR8KZEtMv6Uq7hBlfh20joCONAhyQufbyEd7oDMXfUOOQcC7dR9qrDSWenF5eQwKz6XJXrjHQMo1PRvykAffVqPniEtTVIphaeCD2FiEk//wAhqYii sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Annotations"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/annotations/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Annotations"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/annotations/query"}></MethodEndpoint> Query Annotations -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"annotation":{"anyOf":[{"properties":{"origin":{"anyOf":[{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin","default":"custom"},"kind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind","default":"adhoc"},"channel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationQueryRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>annotation</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationQuery"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>trace_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`custom`, `human`, `auto`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>source</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationSource"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}>**Possible values:** [`web`, `sdk`, `api`]</div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>references</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReferences"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>attributes</strong> + <span className={"openapi-schema__name"}>object</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Attributes", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>oldest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>limit</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>annotations</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"AnnotationKind (string)"} + qualifierMessage={"**Possible values:** [`custom`, `human`, `auto`]"} + schema={{ + default: "custom", + type: "string", + enum: ["custom", "human", "auto"], + title: "AnnotationKind", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"source"} + required={false} + schemaName={"AnnotationSource (string)"} + qualifierMessage={"**Possible values:** [`web`, `sdk`, `api`]"} + schema={{ + default: "api", + type: "string", + enum: ["web", "sdk", "api"], + title: "AnnotationSource", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>data</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>references</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcase</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"AnnotationReference"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>links</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>AnnotationLink</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "oldest": "2025-05-15T13:01:54.340Z",\n "limit": 0,\n "annotations": [\n {\n "created_at": "2025-05-15T13:01:54.340Z",\n "updated_at": "2025-05-15T13:01:54.340Z",\n "deleted_at": "2025-05-15T13:01:54.340Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "span_id": "string",\n "trace_id": "string",\n "kind": "custom",\n "source": "api",\n "data": {},\n "metadata": {},\n "references": {\n "evaluator": {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "version": "string"\n },\n "testset": {},\n "testcase": {}\n },\n "links": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-evaluations-preview-simple-evaluations-query-post.api.mdx b/docs/docs/reference/api/query-evaluations-preview-simple-evaluations-query-post.api.mdx deleted file mode 100644 index 0fc53cf099..0000000000 --- a/docs/docs/reference/api/query-evaluations-preview-simple-evaluations-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-evaluations-preview-simple-evaluations-query-post -title: "Query Evaluations" -description: "Query Evaluations" -sidebar_label: "Query Evaluations" -hide_title: true -hide_table_of_contents: true -api: eJztWVlvGzcQ/ivGPLXAypIVH8k+1YkdRI1bu7aTAhUEg9odWUy5R3jYVoX978WQe2qlja8AQV0/2F7uzEfOx+FwZnYJml0r8MdwfMOEYZonsYKJB0mK0j6NQvDhq0G5uMJK5CqVeMPx9krxKBXYeOWE00Rp8EDiV4NKv03CBfhLCJJYY6zpX5amggdWp/9FJTGNqWCOEaP/Ukkr0BwVPVXwVjNenM7AH69KzYS1ZbMAV1eBSBSGTSG9SBF8mCaJQBZD5pVDsRECsokHmmtBAyO19c4hZB7BCX6DTwE7IX0HxQL9RLBDh5BlXiGVTL9gQNtQSFW7fG7i95avNmjmQYSaNZfCwpCTHhNnDU5bi1Va8vi6DstjjdcomzNF0+ZI3cb1c0HAZWAEkz+9N0L8qpK4N4pTo3+GVXsJg2uM7qfEpGSLTm6bqtDit0v3N2KSNFq++SMx+ntywpX+FqebbFzVfhhDl84LIWbRevdv299eAelmHoSoAsnTdqS4P9RRDYJOZriyKbljrUJ6MEtkxDT4YAwPaxR8279Goeo8tRc2yFZn9w+KsOsP7i2Pw+SWFtQRB2O8RaW7CKpZEzKNPc0tvx0b4CAzDxIRPjf4qYMkH8G7+0Lnu9C15DuLKXjE14OuPWYrKCdWm+yWIcrutWFsIrprmQowDt0YeWz+MOnkwMKTQ8Ya5Q0Tj17xqADIPJBMrz9z7XDSwjkn3S63/bP0xTWu+lB3P3eJBGSkSVkFl3SPa2nQDqg0iZVz7+FgQH8asQAuTBCgUjMjts5zYfAem48EiXFKK7RXNryzErS9M2aEBn+QebU0xqUjRST5P4152WnMqdGPyGNaWg9IZJzufzyT6aL1HqnMYzj6sXOZQCLTGF6x572e3znYrUNLlknD7zHJJwebTxKiwO8wyZGDzScp6Jourvj6WPuIrKMg6+1iaxTW+XrWWQq2ylkKwp51loKucpbng3Z4NyjVE9z/c65O9rPVm6B5pyrNtOkMWlX6lpbJ21eDBkNqc5g4dkPK5RlkLOPCSMoyUMpE0lDA4gCFwBAm6y6zC7eItVeZ66oojenz1SOb4vYmwwOjdBKBB3MTsRg8YEYnlLYWZC4odrkkZsPk94ihNt3burCWkiIqrVC/CNMvna2V8bWk9EUQcFjZW5GQp82JfBEUHBfWVgRITJHp9dHpPhXfea7/kKLriNls7yl1W4v0dTFP1Yuk8YPwVVnIZbYq3B0O23XfZyZ46BzqmMLw44u+EDXjoqNwE0nQePuQ9HeymauTJCjpjNT1Og+tUnSl2DVWxG8WtWRsXdLbdZxXFfbY2uWmzuXqV2xJr2N3sxlHjr6uDf5weXnWAnR729xUd0U0nShCPU/oY0X+5SFleg4+9PMvFX33paJfq8H79k6lOxslZRp2q4wU4MNc61T5/X4gEhNus2uMNdtmvM9Sbk+WwsBIrhdW5fBs9BEXH5DZBtB4Uhe4IGdy7tEUK3eGpfwj0ipczQCHRs8Tyf9xe079HlqP0yImyE3Pq68qx3eM7Gp/JSnbCLV2AXVLagV/+VgU7Xk3JS+bq1qvrGgqP2puSDls26VjeDVjr/dm+7u9vYOdg97u3v6wN301C3rD4M3+q9n+PpuxfWj1K4u+JAwHw93e4KA3fHO5s+fv7fjD19uDg52/oGovdsm4LuH9FlH2/wZlC6/Rn6vabYOiXTbIbBtulthdLG4u6yNbh2cjqOWtMNje2R606GoIUzhigQ1HhQvY1+CtOGPphnQnRTYWgUYW/VK9oJWR/9P9VOGtOy4r1WXujBrvdD8VjNtoY6df5idpDPlJogNjzxI0O1p5jkrRYU5H0B/DcjllCj9JkWU07N7744kHN0xyNiXmxuQG8+LwLOFvXNj+mY3RPRugSFwYd1hW4jXFUqdxGASY6k7ZSS1KnJ1eXIIH0/zDZJSEpCMZmUe/fSBnS8tmnR1bgmDxtaEQ64PDpJ9/AST1AHA= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Evaluations"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Evaluations - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-evaluator-revisions.api.mdx b/docs/docs/reference/api/query-evaluator-revisions.api.mdx deleted file mode 100644 index 2c263e1794..0000000000 --- a/docs/docs/reference/api/query-evaluator-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-evaluator-revisions -title: "Query Evaluator Revisions" -description: "Query Evaluator Revisions" -sidebar_label: "Query Evaluator Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWttu2zgQ/RVjnnYBOXbcXFo/rZu0qLdtkk3SFljDCGiJstnqVpJy6g3074shKVkXW5FdGwja5CGJafIMeTiaGR7qASSZCuiP4M2ceDGRIRcwtiCMKCeShcHQgT58jylf3NG0xx2ncyZYGAiwgNPvMRXydegsoP8AdhhIGkj8l0SRx2yF0vkqwgDbhD2jPsH/Io42JKMCP1WxFUKwuHShPyr3dj016fUdmLizYyFDv9hJLiIKfZiEoUdJAImVNQWx50EytkAy6WHDULTONEJiIVw2wZ9BzDg2oLPYJ8HPAL5TAElipZ3CyVdqS1h2yky+VZxV8RILfCpJcRbEcRjuG/GuCrxW5ikkZ8E0D8sCSaeUFy35k2JLfnmrbYHNuB17hP/xNva8v0UYtIdBFMs/obxWxGCS+s0GEc7JopbW4lCocFs39iMyiSMq/vmUGL0IPzAhH+N03RrLozdj6FZ7IQTEpw3XX50Bjk0scKiwOYtkJVo0hzrPQSQWkFjO1jziBswCN+Q+kdCHOGZOLfhAo2W4pQ03Tvu4hea+OzB2kBwiawnOmcGubckUqTVUIaAB3ngleRPNl3OuTKkIJQSZbu0wH83wRoHy2iSgfzDprQ6Y+WzlruOimJHmlFezWvMVfDbDEwuEF0+3hbnBsZh7nF35+NCpZfWaupTTwN5s37O9aF0jvwXG54QzEshn5vfM/GfN84odSCu05y3Yu/NrorM9YIHtxQ69I9yesTldvY5GpaMGag1SoMSCexY44T1SUFNYB/SeCrnTvHKhIRMLQs/ZNfilhsSCg/5oCv3ovl8gVmKBx3y2GnRlzVZC+aBG47q5Qx8pOmgQ+3hKI8KmgaPbsPwxH8a1HCh45T6S8jnxtp7xMAVILODr6otqbVrBuValRM2T8yXzxRX5d+Mkfq2PqJDgUDyvMo7PjuQxVQ0iCgOh/bvX7eKfQmUJN7FtUyHc2Gtdm85gbXvStcNYDyrxvlzEmeqB++uS2JPQ764Mv/qguzrgVtPl7oJeNUUMdfwI+TfXC+/3YPKLgS5ZXK5yH6srrWoPq9EWdk9XkSXCJXOJvUsDAwOZWtjTqWlvR5hdHSesZyXqt1SiLmO5hRRVGbWBFqXH/uJiVB2tDdSobTh62nKUzSmR1Lkjuy2KzzRsa6DIiiNnH0Y+aVhjxKEe3YORcw1rjKR0TRY7zHUpWa8XJtulfO3USspWZiUlbKdWUroyK7/ywVzVD6QuN+9u9TFn26J84kwjrD6WNUJQB7IZJQ4ta8yPR/pnpaak1FQmOt4oo7wz24AUqCNg0x15Qjn5SRY6G+zBjSEeK0oSRSxoWgCVKd6k2koNqY3HJL619+vRiQUR4cSncoun+jf3lfWDr5aU4kZRPmc2bcIuqkUb+aCBTpRS5LJprF+o2Iets4KBjQSyc6IOCT8lslXk7ToxW+SVrdFmhkQmvyVKyzvq9apq3WfiMUcx0XrDeci3l+ocKgnzamQ2L7QL327y/I3Xk/YhtEl6BPDFdNXF6gopQndZ31WR0brFb1eRvtRFR2pd2rTpVxCXUno1u+uXca7pq9vhd7e3VxVAvbfFTVU6bmu1N/lUzkJ8TSkKBYJHRM6gD50IlVJ638kEE9HJtNOOeqUJdARQ8XX0oGswmEkZiX6nY3th7ByQKQ0kOSCsQyKmHjpB7ZgzuVBDBlfD93Shc75y51wHlYW0oxS7ZXtEIvae4iz08dNIX+w/vfso2ON89CjkBB32evm+1ZsfxI88uv79qUydyqlQOrYUdaSszchARhk3asxSQsgOykvvKm5T1pxKgvDCJS+P3ZOj9vHp4Wn76Pik1568cO12z3518sI9OSEuOYHcCxKjZiPGqToIvW7vqN09bfde3R4e948P+72XB93Tw38he1NhtL7POKcF5rJ++X5/lCuMl2vUFe7yM1arzWaPXrLuRnu/tkp3t/swVr2k1O5VuF9M7xHrti+9Dqzro2/1mnqZua/rZlduhfu05fVYN73e6ibq2swN1UObCtQqJLQGV0PInaChe3B40K08EYXOmIeIrfJQ+sSrr8EqxZ4s6uDVn6+SEEhK/L+WX+DMMOAZ3dbg1cXJkj5lYpCkP2Qn8ggLcsdQHUJHYEIo5FxIv/O5RNWBdGzBDKNvfwQPDxMi6CfuJQk26+/7o7G56Zggh6NxdmBVTviNLnQZg2m6rXIUdvdiHSVLKRvTqR4xsG0aydq+41yCuLq8uQULJuZdVT90cAwnuED83Qd0O8WQCpuq7QE8EkxjHSM0Jv78D6HRs+o= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Evaluator Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Evaluator Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"evaluator_variant_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs"},"evaluator_revision_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revisions":{"items":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","default":[]}},"type":"object","title":"EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-evaluator-variants.api.mdx b/docs/docs/reference/api/query-evaluator-variants.api.mdx deleted file mode 100644 index fa126ea748..0000000000 --- a/docs/docs/reference/api/query-evaluator-variants.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-evaluator-variants -title: "Query Evaluator Variants" -description: "Query Evaluator Variants" -sidebar_label: "Query Evaluator Variants" -hide_title: true -hide_table_of_contents: true -api: eJzNWdty2zYQ/RXNPrUzjOV6+qSnqnYyduPGbu2kDxqNByJXEhKQYHCxo2j4750FQIrUzbQuiZ88lnb3HBwssIvVHAybaOgN4O0jE5YZqTQMI5A5Kma4zK4S6MFXi2r2gKXFwyNTnGVGQwQ5UyxFg4qCzCFjKUIPFqY8gQh4VgaBCBR+tVxhAr0xExoj0PEUUwa9ObBsdjN2ccwspzjaKJ5NIIKxVCkz0ANreQJFVFlkVggohhEYbgR9UK2jc5VAQZZrOOl9SDGlGPlwg6kmi2fItmWrN9DVwk4OIGI7GncEtpnHMYVrKdSdo7GeYkjMn5l1nzyFzdm34PgKs3DB/jmJf2hWlrS2ZGed1yvI0jrjppTuz3GF+0AQdcwEdax4Thf6kaEvakh1BmPB9tuWFtjvHEYd1Rwf9H4ZM0XDjoz5N0HUMXkWC5vgA1PxlD/iXrffSEqBLNtK4MrjdfolXiPB8Zv5wdfvB4JscnhCfWAWCTP4xnA6WlupOOQ6GSmSn0TmxiPXyQie8r248MzgBNVW3GsH0tBAJah2gsXMptSgMh1jlngZ6D4L/xBq64Nz41gU9JFCnctMo7viz05P6U/9muzBnY1j1HpsReffYAwRxDIzmBnHMc8Fj12b3P2syWdeW0GuqIk23CPE0nqnJRUX3M6dBa1tzKww0DstotX65oJVpamJ0ei6j9JOR/Ak1ZexkE8HhPgvhAwITBk+ZrE5IEI/hAwIvhY1YjeF5PohttrIdPcLUnfOfYQionDV1uwTsdqLEHRqU5btE/DSBSiK6gjJ0WeMDazZ/lBbV+IVkS94DRYsSTidCiZuG7q2qHVrb5d01Pykvrz1WBBzFVvB1C/vrBB/aZm9ubEmt+ZXWF4sBQkHqo2Xbw+3tiFNX1iR9/nSHoVn+WsV9YO85to8K+vGGrns/jKNfMsVhdKyT4scNa/8A7S8EcQKmcHkgZmDlvJzH7bTd2LZPDkGyEcfNoAkKPAIIBc+bAAp5RrNDnjhl2L9OQtXfqnXQVFKtSqUUrCDopRyVSju5b1jrvoHdASHo+fnHM8XkPAgrp308qG98fGs693QYPgSGF11bEVBfr+fna02eJ+Y4Ilr3zpvlZJq9+4uQcO42NKaCRk3vn3JpT3cLNm19ARJ1VRP1o2BFoVFazbBhf6bTZ0YnXv6dp3mi6594NbloYNdLTMW8np1Ny/jwsu3bYMv7+9vVwL6vW1u6j/0tuiszaUUzVTSPDuX7jmWMzOFHnRzhY8cn7pVk6a7ZbfdLZ8qGtVjOeS2SkAPpsbkutftxkLa5IRNMDPshPEuy7k7IBpjq7iZOZf+7dV7nF0io/cH5XLN4I6SyqdJ02wxksr5eyQW4THVt2YqFf/O6gOdqfciRXg2ls697H8duU7/9goioGV4qU5Pfjs5hWUBG8Z0HljszkOJ7b6GaEmFav0QAabuMIBBlv6x+IKYkfKhaQ3xtuzXUm0OYhj8Zrq5YNxlvWMxD1s5gLCVUHs5UaTaDxZ+Q4cRTCkJegOYz0dM40clioI+9t/TniVcs5GovU6/4Gz1tw36j2i5o9vCRb/YJ0xaX+70cqjG/HxX191hd1rp8uC3jXeYwbYxbY5O23iUo842tqa9aZgrtjFdMw5spYof3LUzDfO1NsbV/KuNcTmfahU4DJUWtsNw1kd07w2ock7LO3cenPpxjHkdYaXQU5SqVtze3N1DUfwPi8PuoA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Evaluator Variants"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/variants/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Evaluator Variants - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variants":{"items":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"type":"array","title":"Evaluator Variants","default":[]}},"type":"object","title":"EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-evaluators.api.mdx b/docs/docs/reference/api/query-evaluators.api.mdx index 1f5d39761c..88812c32e9 100644 --- a/docs/docs/reference/api/query-evaluators.api.mdx +++ b/docs/docs/reference/api/query-evaluators.api.mdx @@ -5,67 +5,1036 @@ description: "Query Evaluators" sidebar_label: "Query Evaluators" hide_title: true hide_table_of_contents: true -api: eJztWVlv2zgQ/ivGPO0Ccuy4OVo9rXuh3h7JJmkXWMMIaGlss0sd5ZHEa+i/L4aUdViO6rgp0D3ykNjUzMfhx+HwG2UFms0V+GN4dcOEYTqRCiYeJClKpnkSj0Lw4YtBubzG0sIDiV8MKv08CZfgryBIYo2xpo8sTQUPrHPvs0piGlPBAiNGn1JJ0Jqjom8FpHWMl2cz8MebRjNhQ7zfgKvrwCidRHUjvUwRfJgmiUAWQ+YVQ7ERArKJB5prQQMj1XnhEDKP4O6J62GIBaM56MJELP4WwDcWIMu8tVEy/YyBhtKomPK15ayJl3kQoWb1KFgYctouJs5rvDbiVFryeF6F5bHGOcr6TNG0PlJd3va5IOAyMILJn14bIX5VSdwdxanRP8PmWgmDa4x2c2JSsmUrrXVXaHDb5vuemCSPRn7+SIx+SN5xpb/G6X1r3PR+GENXLgshZhHuuP5mBOSbeRCiCiRPaan7Qr2sQOx0jH6jwrf9GBUl4lribGNz8wTdrFM3KNU3RP8pd888UMLM94W5JF+qSGEbggezREZMgw/G8LC9NIWtbF7gDCXGAVZy5+sHs9iDzgXxSwHHgTAhXjMZLPgNbg9/p1LqgDrDNVDmwS2Pw+SWVt5y0cR4i0rvSFvINHY1t8nbkt0OMvMgEeFjg585SDqAeLcr9Fe3+wNhZR4IHvHtoFtr2AbKO+tN65Yhbr9ni9gwNhFpFKYCjEM3RuUg/zJp5cDC2/TRKG+Y2Dvi0Rog80Ayvb2gNWt1A+eCfNsOzO9FLm6pPDuXrQun0CAjF5JrXNKZ0dKgHVBpEiuX14N+n/7UKixcmiBApWZGdC5yY/D2FXpBYpzTBt9l8C+sBe3rjBmhwe9Xi6zTedvL6v/68L+oD8+M3kMgNrweoBCd779cIrbRuoNG3IejH1kkehBIZBrDa/a4V/MLB9sZWrJMGn6PST462HySEAV+h0leOth8kjVd0+X14wnMNVnPl51RWOXrUWdZs1XMsibsUWdZ01XM8o/S8rU7q1ZCt9io6nU+3k26qEJrZFa4HA0GTWnyiQkeWuHReSVlIvfXJSFqxkWLuBBJUHv6kPI8uZ+jd4kLkGiM1LyijIo9K68Qpdi80jzdb2rJ6FzR021klyJwbNflps7tqo1mQa9j9/5lvHT0te3sm6ur8wag29v6plrR2qklT4R6kdALyDRRhJkyvQAfeqnEG463vVIe9uwrSvBAoaQ22+6QkQJ8WGidKr/XC0RiwgM2x1izA8Z7LOU28xUGRnK9tC7D89FbXL5BZnuS8aRqcEk55LKiblZsCEv5W6Qo3FUGQ6MXieR/ua2mFoTicV5EAGXnRfki9dUdi1KBjRejhcCtCFmS8ZtStBjLlWQu9XNBV6qQ4q4tM6i+FUVON95yjCtvMUpvV8LK71SO4MmMPT2enRx1j08PT7tHxyeD7vTJLOgOgmcnT2YnJ2zGTuwGNPt6t5BaS75uvWHQHxx1+6fdwbOrw2P/+NAfPD3onx7+AWUH3WbjGuHdgita3H7RpdZa0LKj7K87wn5mO81ZYrMiPwJDm3Od4fkIvAp9/YPDg36D+5oxVTUW2Kq2Tin7GLyN5C7SmrrlyJY00MiiX8oHFBmdo7zJyPG2nLoNDZXntsY73UsF47Zm2dlX+YEcQ34godaxee7/BlRZFnR+/TGsVlOm8KMUWUbD7rk/nnhwwyRnU6JrTGVzsT6BK/gTl7Y9tPW9a4sbmQvjTtxGrac67DyGQYCpbrWdVErM+dnlFXgwzf+hESUh+UhGi6LfPlCGWVbsWbRjKxAsnhsqzz44TPr5G1xdoH4= +api: eJy1V0tv20YQ/ivCnFqAtlyjJ54q2wripq1V22kPgmCMuCNp4yWX2YcTReB/L2aXoki9ohqOD7a8OzPf7DdPrcDh3EI6huELKguTBHRJBp3Uxa2AFD57MssnekHl0WljIQFDnz1Zd6XFEtIVZLpwVDj+iGWpZBaU+5+sLvjMZgvKMdwWy7sZpOMVuGVJkIKefqLM1RalIcF+5ORQoEN2xUmnWHC4hv+bvbmP+FAljaXCKwXVPo1eUOk1OlVVMZ4tdWHJsluXFxf8R5DNjCzZd0jhwWcZWTvzqndfC0Ny+lNLwyw6GREy7aNS7a0sHM3JwMbd6yBRJdAQzeLSUW53zRWY014+rTOymB/l5S/WrZLua19n6qZlokogM4SOxBO6YwYTmGmTswwIdHTmZPDnMMp1NNsbBHp8KX4EyMdotgYRpOgHgNxEszXImq7p8kmKE3G8l+Iksq6WvVvR5utNUdZsNShrwt4UZU1Xg2KVn782Vx9Yt0rg7dyLPs1U6J7Hetta4V9tnmdKf3kXVHZNV8mm9XUMohCSiwzVqNMGTuBh3Wg6aPm0ezLVWhEW4Wg/FmTSZF6h+emdV+p3q4uzO+9K737m93Xey0bqtnWKFhqDy6M8b+ky6buIh5T/XBPKSbpD7PcidRM1dwK148KesdPyM75xnwxXzgy9cpCO95ptz8U4RPaNONtMqDjdfr283B1o/6CSIoyr3tCYAP7KaSbIoVRH5pPSWef2/yTq5DBvf+joIFOb23lrnjblu4m7tTinTRAOiwYyeo98+70I8LsidC3XCsaG3sju4WfcRPqOZdH7x8fRjsEY225Q424zbC9nObmF5sWt1JZtlugWkEK/NPQi6Ut/s8n1w2oHCVgyL2RsiJA3ClJYOFfatN/PlPbiHOdUODxH2cdSwrYPg3Dbu2bRUHyWMm+kWwZ7g9HtB1q+JxRkQpa3BB44wWLKdMWaaGEpPxC7GFceGHi30EZ+i3mQgGQHFlGL2eHUvd9sp8OvmJcqhL9p1NI+Zd46nUPqjKeED1pLV3O28DkW8f9uZ2YcWcx0cLMOWM3BFWbPVAhIgPmM9Fyc/3J+cYi0WqE3GN3W9YiZ26x4tRgkW2FpAgIJUB6KERxh/tvmgr3kDAiPaOztyZetRbAm3tFX1y8VylBtAX1Vp9IY6lSC1rbKlmI6TRJYcOalY1itpmjpo1FVxcfxPh1PEnhBI3HK1I254Bfr9FjBMy3DOhw601koSxZXPqbDVpfiDhI1BllGpTsqO2kVx+ju4RESmNZfYXItWMcgP4p/pwD8RYi1Q9aEsxUoLOaeG0sK0Sb//Ae6wotj sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Evaluators"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Evaluators"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/evaluators/query"}></MethodEndpoint> Query Evaluators -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"EvaluatorQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluatorQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluators":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"type":"array","title":"Evaluators","default":[]}},"type":"object","title":"EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"EvaluatorQueryRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>metadata</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>evaluator</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "evaluator": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.313Z",\n "updated_at": "2025-05-15T13:01:54.313Z",\n "deleted_at": "2025-05-15T13:01:54.313Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "data": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-invocations.api.mdx b/docs/docs/reference/api/query-invocations.api.mdx deleted file mode 100644 index d146ff7bf0..0000000000 --- a/docs/docs/reference/api/query-invocations.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-invocations -title: "Query Invocations" -description: "Query Invocations" -sidebar_label: "Query Invocations" -hide_title: true -hide_table_of_contents: true -api: eJztXFlv2zgQ/ivGPO0Ccuy4OVo9bXosmm3aZJO0C6xhBLRE22yooySV1Bvovy+G1GnL8g2krfKQWBJnhvxIzozmo/MEiowl2H049x8ChygW+BIGFgQhFfrq3AUbvkVUTO9YoYkFgn6LqFSvA3cK9hM4ga+or/AjCUPOTMPOVxn4eE86E+oR/BQK1K0YlXiV69SS/vRyBHZ/tlUg2JjNtFDTkIINUgnmj8EC6kceDsSJpAo8sGASecQHC0ikAhySYoqjxA3zQk5vBXHopdEbW5k6P+Ic4kFswT3z3dUsEncSOHj9QDhYEHIyXWDvA+qstOZMiO9TvprBQPEQLHikQ7BAuvc4yJAtsPkm0Vxp1sx+0SZxXYbTQfhVaQoW9aqglvmKjqkoW/KG5TvDIOCUGMyrbYHDhBNxIn77FFwwqf6Sgd8+98NI/Q5WqiYYfqWOqhhUjsGsNMTrSN8iMrEFHlXk+SL0Z8T5MnyYot5qQkQIMq1FpSy6HqIfEckYHceICuo7s6iVt7x2OXUNHqiQc25jIfJzvfmSiMcWSB6NN1Vzg7KxBWyJrxgFwiMKbIgiVuUCco3nLsRzuOaPr1P0qje08dQPRDCSOOMGvrXhE/SBzYPT4LccP0WlkrRZeJsC1+zcbQFs9u6mCBbS9ga8LcBr9vAuQGz28aYo4mtoRFQgGug2hq7Zw9tD2OzgbXIZh0jaILcecjVyhYLYdV5/qESfM/9+xaJYeUpkSPy7eiRqsQyJ38LhW6Cwn1uo0uNsLYHygvn31RWcpGL0c41veXHrQk98ncq8SP63Lk9Vrp+8pH1XsZR+UWxz5FoJzBY8Mt8NHrE/NX7Op49UqhW9i0sUbSvmVXmHQmHYqIwtCLi7a+WXRmVsgU+/r6p6qVf8hLq0b/JYtdLK0vLcAkdpHLdwqajvW0ZuSIf6rrnn0uxiUIuBVq+3gqICWZFNe3yeKsC6MVG0UtF8CX1OzzXK1i3of7K1uF5cmfEI14YUgziODUPGBHXBViKi+oYMA1+ahd3rdvEPYipYaN664SZyHCrlKOKt66QxWJtya04QGaEZwPPev9EtcGJHJOIK7G7JfxmGrtphOYISRd07stvt88aobZ3pdRqF7j6MfDZqEyMu5XQPRt4atYmRFK7hdIlrXscrpGC9nia+P8Vrp1ZStDIrKWA7tZLClVl5jhHRKjDR2Z7JGedFPnQjSjojoHNDKdG80FevS0QXaeeCmZDVGNmQfP5xqObLSG3DNRvxn5psrkNoMds8J7UG3bwJqCnf7JIE1AbKOigLrphUEfUNPd/Q888DvqawuE1hsaHnG3q+oed/PAQber6h558PiM0+3hTFhp5v6PnnAGGzg7fJZRp6fn3kNqDnGzL+VyWMF5PxOa3WN7W9UqUqXTKV3PNcD6oaySIh1l+R/ZMZXRdr7u+o15tn974QzlxDgr8TIhCbU3suVYTxGnqOB07p6TpFzsFilC4KQHpyXCAXM1+Sl1+lJGOaQ764qQajdYtPl0041wQHmk7aFZ1mBq9Bd/Ew3hr46qb2/e3t1ZxCM7flSdW8b6u8fDyqJgF+cTIMJCoNiZqADZ0Qgy597BQo1o6ppFogqcCgoecoEhxsmCgVSrvTcXgQuQdkTH1FDgjrIN2CW0VSJxJMTbXI2dX5Bzp9T4lm9vuDYoMbXEVmXZSbZVNCQvaBYi984uH1WaQmgWD/mclGThj7Y6QQAlyf1/kXQN99J+i/Ye4LnSldllNghtXKqKqMgEp5pYQmysmQuUJ0VnrOYmy+okywzK/Rq8GLEXl5PDo5ah+fHp62j45Peu3hi5HT7jmvTl6MTk7IiJxAVXF2PwaKideuLRQKfHtSvU98qopEu7YxU0bZo/p9IrXoVXzXdkovq3tTvk+kql949rFy01eC3eou5MBx5eHCfiEXLITWLKnLIv1g5sRderIOet3eUbt72u69uj08to8P7d7Lg+7p4b+QH5Cra2POua02nOwEWzc7hFY6YZYfGOumB766ZtijQIerJDqf6WDYOrs6B6sAePfg8KALsxG61BgTLuLopZbGOv0YrJmom8VbPPvg6WwLFCXeH/kD7BlGeDzUkeurSghKHcqirqLfVSfkxJz30OafklyhD0muAOUDWUkQwbRngrmF3YenpyGR9LPgcYy3k/DYH1igt9UQAetjTjdJk4MnuKdTffxLJ59tnXlhcx6ZZGAmEcUk0UicOQ4NVW3bQSH9ubq8uQULhsn/iPACF2UEwVHhbxtwjYXZWTN97wk48ccR5o42GJ348z/dWHo6 -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Invocations"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/invocations/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Invocations - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"invocation":{"anyOf":[{"properties":{"origin":{"anyOf":[{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"default":"custom","type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"kind":{"default":"adhoc","type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"channel":{"default":"api","type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object","title":"Data"},"references":{"properties":{"query":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"object"},{"items":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-metrics-preview-evaluations-metrics-query-post.api.mdx b/docs/docs/reference/api/query-metrics-preview-evaluations-metrics-query-post.api.mdx deleted file mode 100644 index f0d8b16d60..0000000000 --- a/docs/docs/reference/api/query-metrics-preview-evaluations-metrics-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-metrics-preview-evaluations-metrics-query-post -title: "Query Metrics" -description: "Query Metrics" -sidebar_label: "Query Metrics" -hide_title: true -hide_table_of_contents: true -api: eJztGWlv2zb0rxjv0wbIsePmaPVp6YV6bZMscTtghhHQ0rPNjjpKkUk9Q/99eKRO21HkzOmGof3Q1tS7+W6uQLF5Au4Y3twyoZniUZjAxIEoRml+DX1w4atGubwJUEnuJTexxFuOdzdYohTfLGQcJQockPhVY6JeRv4S3BV4UagwVPRfFseCewa39yWJQjpLvAUGjP4XS2KvOCb0KyNt0MLlxQzc8TrITBgtqgDM9zmRZ+KyBlpCqGWM4MI0igSyEFKnOEqU5OEc0knq5EfR9At6qgoUaiEgnTiguBJ08NYIkTokMHukMDnnkg0PFc5R1jkH0/pJVYftvMDj0tOCyZ/eaiF+TaKwOwxjrX6GbSpyhUE7JCYlWzabpYYKO5n0I1mSMB5/vd/BoufRB56oh2x6n47r2LtZaJT5XKKY0o0WcABDHVCoxxj69uSrRo0+RaoOQ3uUaM/DJAEHZowLLZEQpYwkHXks9FAI9KEiQpk5rq0Qm/IWAq5fUuZo/6as7T35OlchdYwTyVsmtlp8q4etERvmBCrEHjBOSba9zMOCNGHxABPFgrjZT2aRDJgCF3ymsEtIzS5YUK2yaHvRW5m1129U8iMn8zBkkkc33G+potbcb770jGRn6K9x2FnDjNcODlfyNupJHe5RsysdZkpZuk+vj+Vo4+c7sDOsNrLptmTw0bYYv1Hzsj193fHQj+5IooY2JMQ7TNReg+vckkwdiIS/b+IXlmTqQIjf2pJ+0K/OiVbqgOAB3060TX78YLBJb+mjbFfYGEVnVi58LH5MGm1gyO87o0umcCuhzU5jM0oIt8lvfy98cYur7uzvV7ZJh5RQqWPnEn1wldRoDpI4CrO6Pej36R8yreQxEaIkZYvwTIvOVQZM1fdxvb4XaYu0ZvdSiVcGgu53xrRQ4PZtx52PCEUe+TEh/OMJ4UKrR4wIG1g7zAgW938+JDSZtcWU8Bgb5WOCJ5Ep9G/YfgvJK0u2c2bE0rH/FEw+WbIZEx8FPgGT15ZsxiQ313S5x74rN9bLZdZ+5fbaK5fcWgWX3GB75ZKbq+CyP9KW3i3KhNua0SJqN4h8ztD/8xNypaAV3OnS2I9CsbdC8ZrZQrHXTu87zNRPP9WWg2Uzyc3hcUu7WfaQ45zw1ljImtCNka5W2Q1EJTjGu3W4RUeamvb2aDDYbGA/M8F9g9R5Q2H8+O7VR8W4aOhCReTVvu4StJP77fQhsgKa1jKZb7vH0qRJwuaVHcv9oMYYnRF9feiaSS/LOoOrpuDCvNa696vx2pqv6YLfjUaXGwTt3dYv1Yw2ndKBAlSLiJ4ysqeJmKkFuNDL3jJ6lbeMXjZN9MxbBiV8lFSGzD1pKcCFhVJx4vZ6noi0f8DmGCp2wHiPxdyEWYKellwtDcrZ5fA9Lt8hM3PseFIFuCZPsr5RByuuhcX8PZIUIQvo95lWi0jyv+yFUzIjeSwWmYF89Kp8d3nzjQWxwLV3lHwaKkeRsn+ulMpKHSzXt2V1nFRTab+2xhz3J7XUCIP+4KjbP+0OXowOj93jQ3fw/KB/evgH1FeG4/sBJ2uJEJ7N2PPj2clR9/j08LR7dHwy6E6fzbzuwHtx8mx2csJm7ATWN3bjdmiTMie25VMs0dqz2Al8fQmVL5uaTJvvjJpg7OqnrZbZUqdf7GVqS5eaO9gdSD81FXcWGZ/OwvjMREzn7HIIlRYP+geHB31YD+UaMGVm5pnMnAeE+QzOWmgWQUndWWDSMihkwS/lB5KM0kHAwgq99cxRE6YIS4XfVC8WjJuka1ivsqQyhiypEOfKq2q5pnDsgyq5wILSkTuG1WrKEvwkRZrSsf3ujicO3DLJ2ZTMNiYfWOR5ZAV/4tIsREyt6ppETeBC27yxVreopliMM8/DWDXCTioZ8/LiegQOTLNX3CDyCUcy0o/+doE8LbZKuit7tgLBwrmmUuOCpUl//gbwBUqP -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Metrics"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/metrics/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Metrics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"metrics":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-queries.api.mdx b/docs/docs/reference/api/query-queries.api.mdx deleted file mode 100644 index dad87d2f4e..0000000000 --- a/docs/docs/reference/api/query-queries.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-queries -title: "Query Queries" -description: "Query Queries" -sidebar_label: "Query Queries" -hide_title: true -hide_table_of_contents: true -api: eJzNWE1zIjcQ/StUn5IqrSGunOYUss7WknVsJ7C5UJRLzDSgjebD+vAuoea/p1rSMDMY47GBJCeKUbfe01Or1a0NGL7UEE3hd4tKoIYZg7xAxY3Is1ECETxYVOv7hzDMoOCKp2hQkdsGMp7i1kokwEBk1X9goPDBCoUJRAsuNTLQ8QpTDtEGeLa+Xbg5zLqgObRRIlsCg0WuUm4gAmtFAiXbWmRWSihnDIwwkj4Q63VvlEBJVjtc9DFkuFKcfITBVJPFCyS7sNR7aGpplycQ7WX4MQHtxz+nUB2EGTsKTWru57yi3BBEEzNBHStRUNyfGfqqgdRksJD8uK3ogP3BYTRRzflBJ7uYKRp+ZszfCKKJKbJY2gTvuYpX4hGPylTzPJfIs4MERh6vN6zwWgGO38y/nCpvCLLN4SvqE7NIuMF3RtDROkjFITfJ5DL5j8jceuQmGSlScRQXkRlcojqIe+1AWhqoBNWbYDGzKV3iXMeYJV4GymfhD6F2Pji3jkVJnxTqIs80urR+ORjQTzNNRjC2cYxaL6zs/RGMgUGcZwYz4zgWhRSxqyb6XzT5bBorKBTVGkZ4hDi33mlHxZrbe2dBa1twKw1Eg5JBVZpEm/oOak/sE2tLMZ4kgkhxedcy7XLUKxFn5VbXfP4FY9Ml8zKf/N5G5un27Y20dN7+0lzDfiyIhYqt5Oq7D1bKX3Wevbu1prDme9i3xqBzFy9fHhwUpu0Lr1LVp3kWytj/q6g3+bXQ5kVZn82Xu+6v02gSAs+nmWPKJdY+/icofxjECrnB5J6bk6b1937a3tCJZYvkHCCf/bQBJEGJZwC58tMGkEquueu2TlQbVGL97HupWq+TolRqbVEqwU6KUsm1RXEd1htj1TdNDE5Hz/eqO6d3pyNqHO+qu2qO+z58ewdOZy9NKFBvb+eyJOsfLy+fXuZ/cikSd1X3flEqV2+/yRM0XMgDN7LM49boa5Ly7Hl1rnNP0F2zermvba8vDq35Emupnzd1YvQmNLpP6bpCm7p1eehg19j5Wl6v7vPLuPLyHdrWj5PJ3ZMJ/d62N9W32HXYpGhWOb3rFLmrtwtuVhBBv1D4KPBrP1RT/ar+1Kgeq7ceqyREsDKm0FG/H8vcJhd8iZnhF1z0eSFcpGuMrRJm7VyGd6NPuP6InIpKCtWGwZiix8dD26x+WyjEJyQWoUIeWrPKlfibN7v0lfeipYtskTv3oNLQkesN70bAgJbhNRlc/HAxgF2lWsYU+Dx2gV9hu2FgOyps1w8MMHVRDwZ5+lM9QMxI7ZRnjfl2N2bnZg0KGPxm+oXkwsW0g96EPZtC2DOoa2AW+oYZgxXtbzSFzWbONX5Wsizpsx+nrUmE5nPZ6Cz+wnX7Je+RS0sk3DF8wVy/yj68er3OoStEeD3qYtp+9OniUT3SdLE13U3Di0gX0z0PGZ1U8U8O3UzDy0AX423n3sW46qw7TRza4dp2Rn+UIGOXS1h19imcvdMwjrFoIjy5tmiWbRK8ux1PoCz/AWwoyVw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Queries"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Queries - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-query-revisions.api.mdx b/docs/docs/reference/api/query-query-revisions.api.mdx deleted file mode 100644 index f97fc8e282..0000000000 --- a/docs/docs/reference/api/query-query-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-query-revisions -title: "Query Query Revisions" -description: "Query Query Revisions" -sidebar_label: "Query Query Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWltv2zYU/isGn1ZAjh03l9ZPc5sUzdomWZJmwAwjoKVjmy11KUkl8Qz99+GQulqyLHv2sBXpg2sz5HcOPx6em7Qgik4l6Q/J7yEIBpKMLOIHIKhivnfhkD75EYKYP5hPAY9MMt+TxCICfoQg1TvfmZP+gti+p8BT+JUGAWe2Ruh8k76HY9KegUvxWyAQX6Gs/oIUcfVqb341If3h8swJ15rmJ1DHYSiF8uvC1GyGmgdA+mTs+xyoRyIrHZJKMG9KolFkJUP++BvYKj/JCzkn0cgiiimOAx+0EpFFXFB0S2USyZkY5imYgihKdsfFkfweqmURmwk75FT88iHk/Dfpe+0LLwjVK1K1RabAbbaICkHn9bQUlpKNKP2CTOKK7Y/3X2D00v/MpFrH6ao9Lq/ejKG72OY86kLD/Zc1wLWRRRyQtmCBKl225lBnOYjIIjRUM1/UgVlk4guXKtInYcicWvCBQUtxlw48Ntr1Eprb7iCWg+RQVUtwTgxObSumSa2hCgFj4I13khfRfDtnWpT2UFLS6dYG8yVeHpVMNZuDMWN+E/tu/aMCMrJSJz9ZxUHR0z+CKAeD5prfx8sji0geTreFucW1kUWYsyvbvnBq2byBCQjw7M3OW9PeukFuU6YfqWDUUy+M75Hxe8PxEvNJIvNC/V6N3ZCccs88m4cOPFBhz9gjVO+hIgcsK22AWoMEKLLIE/Mc/wm3X5OcevAEUu00dlwayMgiPnd2DX5lIDGpgOem0GvP/BKxIotw5rJq0Mq8bAnls16N+xYOrEkswAtdrF6otMFzzBimOPGPUS0HGl6bjwLxSPnWGl8kAJFFxKocopx/lnBudLpQc2v+SG2xIs5uFKhvTPVGIlyGpRwTeG+UCEEPyMD3pLHtXreL/xUyR3Ib2jZIOQl56yaeTKxti0DbD82iJc6zDbzXM/BsJzTkivS7JZerkVY42WJY3J2TK4aCC+0vdi+liG/2sus9GGwqFJtQe5fKD2LIRMKeqoW9pe67SqOtlwbGNg2Mq1Bt0cEordqghWHW/uQ9jDpaGzQxtuHov93FsAVQBc4D3W2e9d7AtgaarDBw9iHkq4GNhTjAYQ9CzgxsLCSha7zLSJSQ9S4JRwlfO5WSsJVKSQjbqZSErlTKz1zn6fC7FE2KCdhLEfVSRP0viiiLTBhXINaYqnlEZhLZtCYh1HOyiFqmV//Vx7LG81Ehz4x4viD5k/OnzKb8KpEQ6bLKRPZijbPySRkD7lS1ltNcR0+ILPId5tt6kk8wN9UOD5uG840TmmSnVS2i6mQH69dNkpJ7rX5kFQ50/U1h+ACUyQc8x3wA892ACiZ9L3d6q1HgB56+/pyiPXClv4H+ip9j9eTl8S9DFwSzG4FLRYWST0zN9KCTfMUSnTL9BNelyp4BfuPsO+QF3Wq0RnKYZ+z5gRVUxVSx0foZRQVmtETmGbObIcAzk0rGWsQ/cjjnOIKdxiqwsj9LJuV6DXjc2kTSK7jq5tlUwoMETzLFHquvRZM25HsqoXWbwuRUmVAusUEDz1il6wPcWso5YrS+aIySiBr/eQfP6irmAvGLFFBeHQKaaDTgfCNNjJFlmqw+1HhOBVbW+xrGjrNwoWPHq71wWmYmEeIVGS27poq1Mr+nYW2fLkX+J/29M6qL0a3Xlzryq/rvG2ysIECmHcNItx+Per1yg/Gecubo9mHrXAh9IbfsLjqgKOM13UHu2yvi6vpQVmMAn32joO62yGldQM51icyU1VM1Ga07/Os6c8Z9GdHxvGLgi+k17K7expmhr+50P97dXZcAzdkWD9XYT9mKXFAzH182CnyJwAFVM9InnQCbu/DU+WFeTuqkvV49glpKEFhZ6dMKBSd9MlMqkP1Ox+Z+6BzQKXiKHlDWoQHTTkGCHQqm5nrJ4PriE8w/AtVJ8nCUn3CL9mQspDgtPRwaMEyDkp5G3I5kf5ljx5wY9TGrkAy01JvstanzZ+oGHKpfg0q6hVmrLusvpV2UzDyKPKfDSbuVvJ7QN8eTk6P28enhafvo+KTXHr+e2O2e/fbk9eTkhE7oCcm9dDFstmKUdF5Jr9s7andP2723d4fH/ePDfu/NQff08E+Svv0wXD1nlOuzZret8N7AMPeoNNufqYWz31jXNtMcT7rqafn+5Cw9G96HoPKDUJMQF8rvpMyuO7KkWq6bY4reppYVl7PdtCItlJtZ9dhNqr9upKvKia8vXJIh6OvcGlxfkFxLhXQPDg+6pVtQmKzzXlsHj+S26j8Ta8lvpB4DU0xXRw6igLq/Zn9AzdBTudTL4a1ybkvNyth3KHhWnYBTpuODVmER+70hif0eMabDwLxvmUEa7zeyyAz9ZX9IFosxlfBV8CgiicGhP4sfR42RvCHGqlni6ham+MM0BYNqW0eUtJ4rB1gMfmbFwLYhULVzRzmXfn11e4e1TPyeqOs7uEZQ3B1+9gkp5NZ6bEE49aahcQgGE//9DZL6bwk= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Query Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Query Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-queues-preview-evaluations-queues-query-post.api.mdx b/docs/docs/reference/api/query-queues-preview-evaluations-queues-query-post.api.mdx deleted file mode 100644 index 5b9847c957..0000000000 --- a/docs/docs/reference/api/query-queues-preview-evaluations-queues-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-queues-preview-evaluations-queues-query-post -title: "Query Queues" -description: "Query Queues" -sidebar_label: "Query Queues" -hide_title: true -hide_table_of_contents: true -api: eJztWetvGkcQ/1fQfGqlw2DiR3Kf6sSJ4iaNHdtJpSKElrvB3mTvkX3Yoej+92p27wn4DBRHUVV/wLA3752Z/e3cHDS7UeAP4fUdE4ZpnsQKRh4kKUr76ywEH74ZlLPxN4MG1TiVeMfxfowVR/HI0aWJ0uCBxG8GlX6ZhDPw5xAkscZY01eWpoIHlrX3RSUxrangFiNG31JJyjVHRb+sZMsUz86n4A8XCabCevAwAVdjRabEmjNBC3qWIvgwSRKBLAYPNNeCVs5U56qi9CDEKTNCgz9lQmGWeQVrMvmCga5xVtH7SPa+sTZlXqkrNkJANso8iFCzprUsDDlxMnHRsLuiyIUoLXl8UxfLY403KJuaoklzpfCTllbrgoDLwAgmf3ljhPhdJXH3LE6N/hUWPSYZXGO0HhOTks1WhKGKW5MVliLcxvsHRZI4lvb/Z4roh+Q9V/qxmD7k4yL3ZhG6dlkIMYtwTf+XLSDejGpBBZKn5Oq2ok5rIjIPjEI55mGbNA+miYyYBh+M4WGr9E8KZecsrEle2PM8bx/XsX765jptkKWJd+jNpYlzZ5zcp/fFabSu/Ah1VtX6HfUjnSyrO+o9j8PknuxpOQRivEel19ydkGnsam4Tv6UynMjMg0SEuxZ+7kRS8eL3dUU/mlUfSFbmgeARXy10Zf9bkPLecpPfMkTZbhvGJiJ4wVSAcejWqJXkP0atMbDiKR9jjfLOHd5bWXxWCKB6Ynp1M1zu88s1QrxtWftnmYsrUnXDbL90+AkyYiQwxSWG4Gtp0C6oNImVy+5Bv0//Gj0arkwQoFJTIzqXOTF428KwIDGOaSHqlQuvLEUNNPUzz6E3h8KKFvI/ent69HZu9BbwbYlrA/zmeP/jAK4trGsguG1i9HNDuEAi0xiO2W4Pv1dObOfEBsuk4VMo+eTE5kpCFPgESk6d2FxJEa7JbIdIsQjWy1mBfvN47VRLEa1SSxGwnWopwlVq2Z1oJ+8OpfoX6f85Z888UJpp09qUKvCTltDHnochWFQfuyXljmlyhnFhJB3SKGUiaSlgcYBCYAijVcfVlTNilcnl6Vdqp01ji8dX87B95OK09TVguxsVoUQmefJDrj9XubJSucZ0/BVn62neSJPGtPOOJG+ASU6ZPStXQJLq3tkejOW75QrtFcwcFoJXJp61acnrivKjw321NBxugn9VCVgzi34PBoNlfPuZCR5ans5rqpftwW2ImnHRglJFEjSeboJDRg9H6X3iDKRARupm1R5WWEkpdlML+cOkNhida3r62BaTX051TlfvdWV4XXQfduPUha9tf99eX18sCXR729xUe/PplOkTob5NaAKdz5RTpm/Bh14+g+7VZtA9d9fo2Rk09VWU1O3tLhkpwIdbrVPl93qBSEy4x24w1myP8R5LuS1QhYGRXM8sy8nF2TucvUVmr7jDUZ3givLIZUaTrNwUlvJ3SFY43AYnRt8mkv/ttptutGSP46IgUIZeVvPy199ZlApszL/Lm9LCjcjdbsqrSYWnS9RYpUgz1uVyOYmDZ1P2/HB6dNA9PN4/7h4cHg26k2fToDsIXhw9mx4dsSk7gvqAbbgey6jqU+vqKOde66vYiHxxclRMiGDQHxx0+8fdwYvr/UP/cN8fPN/rH+//BdWgp43GzWvW9TKfxPTLYUpjUlINPvrF4KKf2YHINLHZlpfXic3lzsnFGdQwDvT39vf6S9veIKaOyQLbMYtUtY9pkxtFU5YLwZPItkvQyKLfqgdkGdVpxOKavIWKXriE5PWi8bvupYJxNxmWthm7Yh9CXuykuPaSqhwueO71FCXALXUJfwjz+YQp/CRFltGye+4PRx7cMcnZhII2pAy4Lep7Dl9xZqcY9gTp2vZJ5MK4el44TajTO46TIMBUt9KOao3s4vzqGjyY5G/FoiQkHsnIPfr0gfIsdT76c7c2B8HiG0MHgA9OJv39A8wEYu0= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Queues"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/queues/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Queues - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"queue":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-results-preview-evaluations-results-query-post.api.mdx b/docs/docs/reference/api/query-results-preview-evaluations-results-query-post.api.mdx deleted file mode 100644 index 8c9a18cdcd..0000000000 --- a/docs/docs/reference/api/query-results-preview-evaluations-results-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-results-preview-evaluations-results-query-post -title: "Query Results" -description: "Query Results" -sidebar_label: "Query Results" -hide_title: true -hide_table_of_contents: true -api: eJztWllvIkcQ/iuonxJpMJj1sTtP8V5asocdm91IQQg1MwV00nNsH7YJmv8eVffc4PFA8GYTxQ+26en66uiq6qoa1kTRhSTumLy5pVxTxaJQkolDohiE+TT0iUu+ahCrqQCpuZLTWMAtg7spFCT5M7szjqQiDhHwVYNULyN/Rdw18aJQQajwXxrHnHmGtve7jEJck94SAor/xQLZKwYSP1loQxWuLufEHdd3zLlRoryB+j5DdMqvKluLHWoVA3HJLIo40JAkTr4klWDhgiSTxMmWotnv4KnyplBzTpKJQxRTHBfeGiEShwSg6J7CZJwLNixUsABR5RzMqitlHbbzIh4TnuZU/PBWc/6zjMLuMIy1+pFsU5EpCNoRUSHoqtksFVKyk0k/oiWRYv/j/QYW/RR9YFI9ZtOHdKxT72ahUepzUlGlGy3gEAh1gJEeQ+jbla8aNPgYqDoM7ZLUngdSEofMKeNaABIKEQlc8mjoAefgk5IIReK4sUJsypsLWD+k1NH+SVnbe/JNpkLiGCcSt5RvtfhWD6uBDTOAEtgjxilg28s8zKGRigUgFQ3iZj+ZRyKgirjEpwq6SNTsgjlqmUXbg97KrL1+o4JfgvdNDFRNmX+/97lcG4jO0L+vAj7B2RSs0hCGePoHrFqmsS3uCXHnPazKWO1OYbcgsFysyB6EVLBoyvyWLqU185vxU8jO0K9x2NmjUl476Fbwtu6kwwNqdq3DVCmL+/T6WI42X30DdobVxu21Lflem4ruFywVt98Wdyz0ozsUqKHqC+EOpDpoLvtkIROHRNw/NPilhUwcEsJ9W+hH3eoTYiUO4Sxg20HbpL0Phhr1Fj6IdnUExeBMb2cf8g+TRhsY+ENfoIIq2Aq0WdhtBgnSNrntr7kvbnHVXd392nZEJEkS2x4xAT5xldBgFmQchWmVNOj38Q9aVrAYcTBF2ZJnrnnnOt2Mtc5+jZUXaUtUM3uhwyuzA493Tk0P1rdSYquHhHkW+b8f+9v92KVWezRkG1Q7dGSW9j/ekjWZtUVPto+NsqbME0AV+FN62HvklYXtXBixdOw/BZPPFjZl4gOHJ2Dy2sKmTDJzzVYHrLoyY71cpcVXZq+DcsmslXPJDHZQLpm5ci6Hg7Z4tyAks3fGPh3Il5Q8cciSyuUBNX9H5TLVWQnqwSPQjcGJ9BkWSOVR+RjcLpKOUsiUgxlHfL958l92+bwx1vzux12leinnfuiS9xvMcg47TakVkeVpR13orRON6qihOUAfHCcUHX1bgKxr31LoF+X7uFCnKmnOcasD2b5go8cum89W2iXbjXfqOWTeJCSm4zgZDDZ7ii+UM98QdWyA7d1Q+KAo4w2NAY+8ytNdct7kYTt9iKyAptqXiyaf+ghS0kVpyPjwVmOMzgifPnb8qJdlne4r34q5efP09YAar635mg743Wh0tQFoz7Z6qKbb7BQOFIBaRvgqL301F1O1JC7ppe/yeqV3eb20weuZd3no0SCwMjDnpAUnLlkqFUu31/N4pP0juoBQ0SPKejRmJv4leFowtTIkF1fD97B6B9RMFsaT8oYb9CTrG9Vt+bHQmL03cRXSAD9faLWMBPvTHjhmVZTHUqEZ0Eevi/eOb+5pEHOovkfM+tOiOSw6mtLtUro6itcXxYUyKaf0fmWMP+5PKimaDPqDk27/vDt4MTo+dU+P3cHzo/758W+kOjIfP7xxUk3I/dpw2nAskmrhzaVR8DhbndTyKXk2p89P52cn3dPz4/PuyenZoDt7Nve6A+/F2bP52Rmd0zNSn8aO25FNirTblk8+IG3PYqft9QljNklsOqZsINi0x8712mqZTuz6+dCtMlGruJYdcPUTU0XMIxMeaUa4MMHXubgaklIBT/pHx0d9Us8Klc2Y5KlnAiKLLfOYOLUoz+Mbi6PAZHiigAY/FQ9QMswsAQ1LePUkVBEmj3AF96oXc8pM/jas12l+GpM0PyHn0hcUiiGUY7+bgC6wxMzmjsl6PaMSPgueJLhsn7vjiUNuqWB0hmYbow8ss5S0JjZoXtlrr2tyPm7n2qag2hWI15OluPA8iFXj3kkp+V5d3oyIQ2bpFyKCyEcaQVE//O0S9LTYKokpC9fWhNNwofHWconFxJ+/ABAHaJk= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Results"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/results/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Results - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"result":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-runs-preview-evaluations-runs-query-post.api.mdx b/docs/docs/reference/api/query-runs-preview-evaluations-runs-query-post.api.mdx deleted file mode 100644 index c631a39f63..0000000000 --- a/docs/docs/reference/api/query-runs-preview-evaluations-runs-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-runs-preview-evaluations-runs-query-post -title: "Query Runs" -description: "Query Runs" -sidebar_label: "Query Runs" -hide_title: true -hide_table_of_contents: true -api: eJztWltv2zYU/isGnzZAjh03l9ZPS5MW9Zo0mZN2wAwjoKVjmx1FqbwkdQP99+GQkizZsqI4LlZszUMSU+dCnhu/c+QHoulMkf6IvLmj3FDNIqHI2CNRDNJ+GgSkT74YkItbaYS6jSXcMbi/hSW9e+Bo4khp4hEJXwwo/ToKFqT/QPxIaBAa/6VxzJlvGTufVSRwTflzCCn+F0tUrBko/CSNfUzF4nJK+qPVx1Nu976ZgKlbn0cKgjKRXsRA+mQSRRyoIImXLwnDOUnGHtFMc1wYqNapk5B4KI6zO3iOsHPkd6Kor58p7MRJSBIvo4omn8FH+2dUS68OjXhr7bUuNPFICJqWt0KDgCEf5Vclm65tVmnJxKwolgkNM5BlTeGkvFI8Y7Uu4jPpG07lL28N57+rSLQHIjb6V7J6XpTBNITNmKiUdFFr2zIrWbNvHe8FWhI51mLzR7Loh+icKf2YTTedcZX7aRa6cVFIBA2rw3/9/Os7QN7EIwEoX7IYj7qtqLOCiMQjSlNtav3iERAmxJoZgwjcyhcDBgIsfEYIt6SM74NSxCNTyriRgIxSRhKXfCp84BwCMq5K1mu3icpUdRtcDZ00/P/NvTbPr+vsCAneFFOQIPyNB9qUNuVSfwdSPSMIPqXsaF9uZtuKuUZeLO/VN07ulGkkQ6pJnxjDgvoyH9TW92FmvaoUbO6Q4dIJdvdNg2v1HM01DgLV/OL6A6FFdTbcMxFE97ibGhwg4B6UbuiSgGpoa2brS00BciITj0Q82LXwSycSayR8bSr60VD6gLISj3AWsmqhldfMipRzy43nlgHIZnWSKj+vPlix0w/jWhtY8RiNQoO8o3zrHQ8yAVhtqK6+c9av0/UkQd66mP0zj8WKUH1SrA8dfCZJkjgszSSCWC0N2AUVRyK9AnrdLv4pXYTk2tXzqeGtYUqMhXw7FO5HxjGt2Hx5gFNLgb6dUsM16XcTe7s4EJ4Vj5/g/f8N3i+N3gK9r3E9Ab473v84fq8zawMAv42NfmwE70ugGoJbuttL+dSJbZ1YY5k4+B5KPjqxqZIAOHwHJWdObKokM9dkcbs72JoZ6/WiNQiK9tqplsxauZbMYDvVkpkr17JbdO/tsnf5oZvXAkDItaPT6Or1VQYCSkO8qSEpU/4Ni6ouJdvie1gs69xmwzA70kDgeRc5iEQ8QoWItPtQLIQowmJhNmOiTqhvlI5C4pG5CakVaHRESnjXiljviH+2v1u1vxubW/Tu7sKpQu8Sr4+siMokGRpxRjW91hCvjtAaNM/uDE2UpxR5iJbC67GdPXGog2lq4zcGumriJ/Rrw5S/UC72EeXSOGZiFZRtcJ0fcROKCpcyEdT6FJ8XkM0mOodeHrM/Cktl1Zn6wp3s1O3ZlnGIt61uMdXzOrIrfN4scqyoBht3ofKIyNQj6eEaSH1S8F1kwdG4n0JNz+nT17ZXCGDsfAvRO2ouVeXtemJ7/4Neb727/0Q5CyxH6w3eydu39gFoynhNl84jv/T0Kb3OeLOFzrOLFfNazeri9QKUojOou7hzS6IxWu5OfiQa8VxOdUpXvAxz8zrrbj7GmTNfnXff3dxcrQl0vi071c59WmnohKDnEb54TV+nuqQmnfTla6fw8rWDc5aOffmKyQUSoYD1kJGc9Mlc61j1Ox2fRybYozMQmu5R1qExsxmkwDeS6YVlObkavIfFO6B2tDcaFwmuMYZcVJTJcofQmL23hcNVT3Ji9DyS7FuGoRAhkbnjQgNgdA6XL4rffKVhzKHw4jefERVmQTgDK0xz8o/ZRCadkaUzkWUjnxf1ZdyUHZAvZyC6gJCX71yWuHlcRmqjBzSWHZ2PyIspfXk4PTpoHx7vH7cPDo967cmLqd/u+a+OXkyPjuiUHpG18XU2pia9bu+g3T1u917d7B/2D/f7vZd73eP9v8hy2lxH44bGzTaRj4O7+US3NK5dTl+72fS0m1gYNY2s69M4P7GB1Tq5GpBCQ0O6e/t73TVTl4ixdFHflq4sbuxj4q1EcB67CKtDW7eIBhr+tnyAO8OUQYi9lFdKrZV5Qxq6Gr7qTsypQ+BW70OadSOSZh2qLXxJIp1weu7LERgOc0zW/og8PEyogo+SJwkuu+f90dgjd1QyOkGDjdD78yzR0sudnLoy3r5xmA21ucRaKelYbh3Hie9DrGtpx4V6cnV5fUM8Mkm/lxFGAfJIiofD332CMRa7E2Ii4toD4VTMDFbhPnEy8ecfkXCm1w== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Runs"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/runs/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"run":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-scenarios-preview-evaluations-scenarios-query-post.api.mdx b/docs/docs/reference/api/query-scenarios-preview-evaluations-scenarios-query-post.api.mdx deleted file mode 100644 index 25cb45417d..0000000000 --- a/docs/docs/reference/api/query-scenarios-preview-evaluations-scenarios-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-scenarios-preview-evaluations-scenarios-query-post -title: "Query Scenarios" -description: "Query Scenarios" -sidebar_label: "Query Scenarios" -hide_title: true -hide_table_of_contents: true -api: eJztGdtuGkf0V9B5aqXFYHxL9qlO4ig0qe3aJJWKkDXsHmDS2UtmZ+xQtP9enZm9Al4vLkmrqn7AMHvuc+67AsXmCbhjuLhnQjPFozCBiQNRjNL8GvrgwheNcnmXeBgyyaPkLpZ4z/HhDkukylMLHUeJAgckftGYqFeRvwR3BV4UKgwVfWVxLLhnsHufkyiks8RbYMDoWyxJBMUxseeWuMELl1czcMfrMDNhVKkCMN/nRJ+J6xpoCaGWMYIL0ygSyEJIneIoUZKHc0gnqZMfRdPP6KkqUKiFgHTigOJK0MFbI0TqQICKPVOYnHPJhocK5yjrnINp/aSqw3Ze4HHpacHkD2+1ED8nUdgdhrFWP8I2FbnCoB0Sk5Itm81SQ4WdTPoLWZIwnn+938Gil9EHnqinbPqYjuvYu1lolPlcopjSjRZwAEMdULzHGPr25ItGjT6Fqg5De5Roz8MkAQdmjAstkRCljCQdeSz0UAj0oSJCmT5urRCb8hYCrl9S5mj/pKztPfk2VyF1jBPJeya2Wnyrh60RG+YEKsSeME5Jtr3Mw4I0YfEAE8WCuNlPZpEMmAIXfKawS0jNLlhQrbJoe9FbmbXXb1TyS41r3HG/pXZac7+R9o0OO0O/pLuzShmH9tpYjtbBvgM7w2oj3WyNlqwI/0r1fXuAP/DQjx5IpIZCHeIDJmqv7ndpSaYORMLfN/ErSzJ1IMSvbUk/6ViXRCt1QPCAbyfaJoN8MNikt/RRtkv9jLqpLKH6WPyYNNrAkN93zpNM4VZCm7V4M0wIt8lxfyt8cYur7u7wN7aRhZRwqavlEn1wldRoDpI4CrPSNuj36R/ZVvKYKFHhsHVqpkXnJgOmAvW8ftiLtEVaM3ypxWsDQRc8Y1oocPtUf/MenVCLXPJ/G/232+grrZ7RR29g7dBIW9z/eCfdZNYWrfRzbJT30p5EptC/Y/utJa8t2c65EUvH/rdg8tGSzZj4KPAbMHljyWZMcnNNl3vsvXJjvVpmLVhur71yya1VcMkNtlcuubkKLvsjbendo0y4rRotonaDyKcM/V8/RlZKWsF9333Jd5iRyiml+eI3J5EtrUvZjoxzwtuNmq/R1geEynxbtAgVQ493bJiSosNJTbt0PBhsNkSfmOC+QetckFM8vxvyUTEuGnoaEXm1p7uUtcnjtvoQWQFNo5LMt11mWXqThM0rY+3joMYYnRE9fequSS/LOoOrBnRhXmvdx9V4Y83XdMXvRqPrDYL2buuXalrlTtWJAlSLiJbI2UI4ZmoBLvSyHXKvskPuFf1pz+yQKYWgpMRm7kpLAS4slIoTt9fzRKT9AzbHULEDxnss5ibaEvS05GppUM6vh+9x+Q6ZGY7GkyrALXmT9Y86WHE1LObvkaQIWUC/z7VaRJL/aS+dcg7JY7HIFOSnN+W+++IrC2KB6/vrvMEuu9uyJatk30pqLddmZcKdVFNev7Y+GvcntRQGg/7guNs/6w5ejg5P3JNDd/DioH92+DvUVzXjxwEnZcKCoxl7cTI7Pe6enB2edY9PTgfd6dHM6w68l6dHs9NTNmOnUFmXjNthTLJ1R1vw9W1DvlVo0jZfDjTB2Bm/rZbZ9N4vBvDadF27ITvs9lNTrGbGFfLwOjde3Dm/HkKlkEP/4PCgD+shVgOmjMk8kzFzJzWPwVkLlyJQqAYHJl2CQhb8VD4gyShIAxZW6G1GdE2cIlgUflW9WDBu0qFhvsqCfQxZsBPvynum6kDq2JdM5AYLShTuGFarKUvwoxRpSsf2uTueOHDPJGdTMt2Y/GCRx/cK/sClGX5NHemaJErgQtt4XqsplO8txrnnYawaYSeVXHZ9dTsCB6bZW60g8glHMtKQPl0gb4utmu7Knq1AsHCuqQy4YGnS31+kXlIP -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Scenarios"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/scenarios/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Scenarios - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"scenario":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"type":"array","title":"Scenarios","default":[]}},"type":"object","title":"EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-simple-evaluators.api.mdx b/docs/docs/reference/api/query-simple-evaluators.api.mdx deleted file mode 100644 index 5995694a63..0000000000 --- a/docs/docs/reference/api/query-simple-evaluators.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-simple-evaluators -title: "Query Simple Evaluators" -description: "Query Simple Evaluators" -sidebar_label: "Query Simple Evaluators" -hide_title: true -hide_table_of_contents: true -api: eJztWW1v2zYQ/ivGfdoAOXbcvLT6NDdp0axdkyVpB8wwAlo62eyol5KUUy/Qfx+OlGXJklXbTYFgbT4kMc17SD73wrvjA2g2VeCO4NWciZTpWCoYOxAnKJnmcXThgwufU5SLO8XDROAdriY6IPFzikq/jP0FuA/gxZHGSNO/LEkE9wxG75OKIxpT3gxDRv8lklbQHBV9KiCNYLS4DMAdrU8KhNnp5glc3Xmp0nFYnaQXCYILkzgWyCLInGIoSoWAbOyA5lrQwIXqnFmEzCG4DfvaDbEgNgedpSGLvgXwjQHIMmc5KZ58Qk/DatKN0VSx8GvDXB01cyBEzap7Yb7PSWlMXFXYre1WacmjaRmWRxqnKKsrhZPqSPmQzWuBx6WXCiZ/eZ0K8buKo+5FlKT6V1g/MWFwjeF2QkxKtmgltyoKNYbbZP8gJkmiZqVPidH38Tuu9Nc43XTGdendGLo1Vri92f5JUafZbAvHvJMYrJGZG8R6dJijVDxudrw68bXNf8zFMweUSKf7wtyQLMUBvw3BgSCWIdPgQppyvz0g+K2cXmOAEiMPS7r6uiMUOuhcE7+04cgTqY93THozPsfm7W8VwCxQZ7gEcsDHgKVCgxswoTBz4J5HfnxPTLSE+wjvUektafSZxq7mIbbbt4XMHIiF/9jglxYycyDCL9tCf1X97wkrc0DwkDeDNsaQNZR3RprOLX1svu2KvWGUhpQwMOVh5NsxH4sP41YODLwxJ41yzsTeO75YAmQOSKaxEageK2s41yTb5kB/FbbYEIl2DGbXNluCjAQpdeKSPEnLFM2ASuJIWese9Pv0h4iVPNEmcsFN6nmoVJCKznU+GZx9ky4vTq3QGuurI5yZGSX/7JdDr825moPtz1ztx83VLlO9R7JWk9ohW7Oy//N0rY3WLfK1fTiyCZsDEQub4+sWCc97Zq7FaiDbD+q8BJE54ElkGv079rjX9JmF7QwNWWnif49FPljYfBEfBX6HRc4tbL7Ikq7J4u7xks8lWS8XHcpDV3w96ipLtopVloQ96ipLuopVnl6e75DmWdu9+nhVTir5vigfJLcIzendVggmsZsh81HuHJ9/Fn5rhV9to+Od7oE3uRqIApNMbquRJ3STPsn0ZAcd3OTEUx7IkoRH26Yt6xTvkiMtFzKKp6t3b+u30pkDCZMsRL2HV//gtrJZ+GpFKSkK5Zx7uA27VHfuZIM5dGZqzoBPU/tG8D3WOqsssEMBdc5MYv8NpXqtU9bQF1Plsni0C7oqKvfMtAGOBoN6of+RCe6bo3deSRnL/at8HzXjoqVUF7FX+XYXhxtvZupd7LFlph6qaT0SlUsxpdi01KDcPNWQ0bmlb5soX7VURuZcdul8XvlOL+i17G4+xrmlr02/b25vr2qAVrdVpZoWUMeaQ6diSSHqWUwPbUmsCDphegYu9BKJc473Pfvy1lu1XnrmRQ6st5tYOnqw+RbMtE6U2+t5Ik79AzbFSLMDxnss4cbBFHqp5HphRIZXF29xYe93Y8elCebGsTZSnVaohyX8LdIubIEIw1TPYsn/tYqnJh/tx0oRHWSr16sHw1dfGB2r9gBYNI9KTSIbPqptnmIs79LkbbS8TbKq7bOGB4NRKS9cmZlN8FafKVmDZwF7fhycHHWPTw9Pu0fHJ4Pu5FngdQfei5NnwckJC9iJYbbeIrc7rHSzl11rGPQHR93+aXfw4vbw2D0+dAfPD/qnh3/DqvncNsf2kLfbXNEd7hcN3kr3dtWM7S+bqf3MNGmD2Kg7t/ShMabO8OoCnBJ9/YPDgz6sW3tlMgUv5pngtbQV8zU4a1Zb2Cs1mkMTuUAjC39bfUE7Iz/JO3M53mbnWus85Lar8YvuJYLxqFSqWL8bQe53ZBEGECptT8e+h1NAmZG/uiN4eJgwhR+kyDIatt+7o7EDcyY5mxB9o3FR0Rj7+wcX9p6jsN41MY2mi9S61lqIp/BrJYaeh4lunTsuhZSry5tbcGCSv9CHsU8yktHp6LcLZHGGHuN0ZuwBBIumKUVlFywm/fwHRdQDEQ== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Simple Evaluators"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluators/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Simple Evaluators - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"SimpleEvaluatorQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluators":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},"type":"array","title":"Evaluators","default":[]}},"type":"object","title":"SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-simple-queries.api.mdx b/docs/docs/reference/api/query-simple-queries.api.mdx deleted file mode 100644 index 5d2a99d4fb..0000000000 --- a/docs/docs/reference/api/query-simple-queries.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-simple-queries -title: "Query Simple Queries" -description: "Query Simple Queries" -sidebar_label: "Query Simple Queries" -hide_title: true -hide_table_of_contents: true -api: eJztWm1v2zYQ/isGP62AHDtuXlp9WtqkaNY2yZK0A2YYBi2dbLYUpZBUEtfQfx+O1KstK7aXAt3QfnBl+u7h8d54d8qCaDpVxB2SPxOQDBQZOSSKQVLNInHuE5fcJSDnY8XCmMP4LqNyiIS7BJR+E/lz4i6IFwkNQuMjjWPOPAPQ+6oigWvKm0FI8SmWCK8RxF1YcMMk5pcBcYfLBAE38lUJqO8zBKf8qkZaUuh5DMQlkyjiQAVJnWJJacnElKSj1MmXoslX8HSVSCSck3TkEM00x4V3Rghk2V2YfOdyGyY0TEHWdw4n9ZXqGZr3Ih6TXsKp/O0i+siU/kNFonsu4kS/INsccpmbbKWi20xDIWj682roXcL5U/phGsLNmKiUdN7uODXW7TT6CTWZrrCUBDcmJDFu5+ajAS11svCVECwpPTvmcrzdg1TMxuwGBloR+kvGnjpE8WS6K8wN8qYOYX4bgkOCSIZUE5ckCfNbEc/9Vl1eQwAShAcVGz1tXqP2zjXqFoUVHk98GFPpzdg9NIvekJNWZbVAnZMcyCE+BDThmrgB5QpShzww4UcPqIWW5CngAZTeUIU+1dDVLIT2LGEhU4dE3H9u8EsLmTpEwOOm0E+a/gKxUodwFrJm0MY8s4Ty0XDjuaUPsl02EEmIdypVHgjfrvlQfBm16sDAG3fSIO8p31ni8xwgdYikGhqBVvPpCs418rYFz1+FLzZkoC0S2LUtKUiKTFhfMIlRpGUCZkHFkVDWswf9Pv6HSpUs1iZjkZvE80CpIOGd64yYOLtWJl6UWKYljZfivzUUldjsZ+k2Q1iTYQUNm02xQV68oCaC6ufeDeq0ApE6xJNANfhj+rwR/dbCdk5M6CSx/yM2+Wxhs0184PADNjm1sNkmubom8/Hz3VG5st7MO3hdlfp61l1ybRW75Ap71l1ydRW7/HzlgPOruditubhM9L/pLiz7/7q9aNPQ+v5ihWuLBmMXpdoOw8EEuKTU+o31q9b8VWv+J2pNhwSMa5BPuKqdb0XSVpBZ8Uao8MvIW1Wv+TXC+k9EKJCwKyKSpGq5aMo8yi/zHVJTf9qsUS8K1w68GHC/UncWkhQhbwhSh3yD+a4X6gfAtELuKU82rUW3Tpb5SZsa6uZEioX+NvnrixE/dWoGfTpSGI4vmRqjHavVVxTGVDIViYr11qPAHVrffE7RH7g2T2Ae8XOiH0QV/yIJQTJvI3ClqdTqgemZWfTzR+xlKBN4gJBqb2YmsZx9g+pGNwZto32YsP48ZjVR8areiH9GUYAZXVHmKfM2Q4BHprTKpMi+VHDOcAXnMk1gq/ksJ6o0ZWhu4yJFCK6LPI8qGCsQiml23xwWm0xv3lIFnZsCpmF2A4/U02NjwJ13OUOMzieDsbJFS/68hUd9mekC8esqoLz5CthEohPOt5LEOlkpyXqjZjQNWOWQYJglzlpAZ4nXZOGi2spviBdktJyaGnhV9UzD1nFGgbzlGCSbfdwznJyeUlOT7ThGWZle1nexb242PE4Jy0AV85TUDGcOBoPV8csXyplvhiudMylNFO44e/FBU8ZbZig88tZcpk/fXy1W/xhZAU2noaZtt/AnUIpOK+Pi9aRGGZ1b/PUpH8Zz2a0zuvptl6nXanf9MU6t+tqM+/729moF0Nq2blQ74ra+0Cl9KAQ9i/DtYBwpxI2pnhGX9GIJ9wweevZ1YS+bhvXsaz6HKJD4gsFYKpGcuGSmdazcXs/jUeLv0SkITfco69GYmSygwEsk03PDcnJ1/gHm74Gaqng4qhLcoC9Z76iTFYahMcO6x8kmcOQk0bNIsu/W5FgEozyWCxWBXnpdvuU8e6R4ptpby3yAUHbvZY+aLr18GVZerpROYsci5XcccZCXAX11GBwddA+P94+7B4dHg+7kZeB1B97ro5fB0REN6JHRzuorB1tD1Tq2vDMjg/7goNs/7g5e3+4fuof77uDVXv94/29SNlhtNLZP2ky4ogPqF01MrUMpG45+3jD0U9OIBJExWX6pGIfonFydE6eivv7e/l6fLPtqjdiUSp4uJ67Zz8RZ8rzC57AqCU3eIRpo+Hv5A0qGjh5SUcFbExpLs9nM+TQ86l7MKTPJxUiwyKJmSLKoQXcwaKScI2c+hIlghqHmDsliMaEKPkuepricOeNwhPW8ZHSCihtilpvlgbKwvQLeapiOuyYXFeX/amrGtGk5TjwPYt1KO6pkg6vLm1ssfbM/CggjH3kkxaPhp0tIrRQzawvCqZgmmE1dYjHx3z+bzxVa -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Simple Queries"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/queries/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Simple Queries - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-simple-testsets.api.mdx b/docs/docs/reference/api/query-simple-testsets.api.mdx deleted file mode 100644 index 5be2e2df34..0000000000 --- a/docs/docs/reference/api/query-simple-testsets.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-simple-testsets -title: "Query Simple Testsets" -description: "Query Simple Testsets" -sidebar_label: "Query Simple Testsets" -hide_title: true -hide_table_of_contents: true -api: eJztWm1v2zYQ/ivGfdoAOXbcvLT6NLdpUa9dkzluB8wwDFo62+yol5JUUs/Qfx+OlGxZshXHc4BuSD4kNsV7eHx4PJ4eZgmazRS4Qxig0gq1gpEDUYySaR6FPR9c+JagXIwVD2KBY513c0DitwSVfh35C3CX4EWhxlDTRxbHgnsGofVVRSG1KW+OAaNPsSR8zVHRtwzQmIWL6ym4w3KXqTA+7u4wZ8o45jGFpY56ESO4MIkigSyE1Fk1hYkQkI4c0FwLanjPVGOwQkkdCyuZ928xLUSaOnm3aPIVPQ3rbhn578xEq3ipAwFqtukF831ODDNxs0FGxU+lJQ9nRVgeapyh3BwpmGy2FKe3fSzwuPQSweRP7xIhflVR2OyFcaJ/hvJMCYNrDPYzYlKyRS2tm6ZQYbbO9jdikiwqQfUjMfop+siVfojTXXMsWz+OoYGJwppwvTW5IAva3yk9bA/abG+PJU5LRGbBUN7IdygVt/liD9Irjn/JzFMHlEhmh8Lckm3qAPfrEByYRjJgGlxIEu7XIvb8Wj77OEWJoYeFdXp4E2T8N/rELrkbeiLxccykN+d3uN35fZJWzwI1ujlQ6sA9D/3onuZdk4dDvEel9yTNZxqbmgdYH8kWMnUgEv6xwa8tZOpAiN/3hX5wsT8RVuqA4AHfDro1W5RQPhprmrf0Udb7hmES0BnOlIehb9t8XH0Z1XJg4E34aJR3TBzscS8HSB2QTONWoGpWrOD0ybZuu/yxisUtWedRaatvSxhIyYzqGS5p32iZoGlQcRRmJUWn3aY/RKvksTZZCm4Tz0Olpolo9LPO4BxaCXlRYo1KnK8n8Mb0oLWdskRocNvrJGsgdqTV5wLqP1NAXSf6gAqqYvWIEsra/s9rqDpa9yiiDuHIVlEOhCzYngr3qEQ+MXOCbWadw6CuChCpA55EptEfs+OeqG8sbKNryEpi/ykG+Wxhs0F8FPgEg1xZ2GyQnK7JYny8qjAn6/Wi0fOLfB11lJyt1Sg5YUcdJadrNcqPV4A7tPKs7hjMj8Ax93e9rzzkwuPKdxqs0fNNnthx/u440vNXq+NRlL9OZMt3VOzbFe5z3nnOO0+ad46dM7bUznvXOFsK3Dz7jR5VS+R17XPBtUfB9VzpP0GlXz06n0k9mNQrIvOh11mqBQ4qKPZ6U+7jHSet1LpyuIxS8bAykioKFsP9kdVKUUmNPHPW6VQFmC9McN/IK423UkbycPXFR824qBFRRORtPH1MnI92s/Qxsg6azKVm22rM9V5Uis0KQbG7qyGjMaCn2whfS11DMy87dNavKKiv6LXs7p7GlaWvbnXfDwY3FUC7tpuLaqS5hg2GRiGKAtTziG4k40gRcMz0HFxoxRLvON637BVlKxfEWubiEqiWlXSxYNYqkQJcmGsdK7fV8kSU+CdshqFmJ4y3WMzNllLoJZLrhTHp3vQ+4OI9MqPDDkfFDrcUTTY+NrutlobF/AOSF1YHgG6i55Hkf9tFJ9mV/LFWRAXFaX99s/r2O6NJlW5KV0VJSbgj4XJTdsukzOxMXFcQaeV6Zli4flkHlH2NW3+n8gpeTNnL8+nFWfP88vSyeXZ+0WlOXky9Zsd7dfFienHBpuzC8Fi9krAebtwm5LcG0Gl3zprty2bn1eD03D0/dTsvT9qXp3/CWvyv62M1/P2cW6nz7ZXAvqGer8Xwdi5mt1Mjkk8jsxZZTHdN6DS6Nz1wCvS1T05P2lCO643OlKaYZ1YzjwzzGJxSjK6ik4T+wOQo0MiCX9YPyDPaEwELC3i7tlFJTMriVON33YoF4yYTGReW2Q4bQrbDKB4MHBRkZ8f+gwCljTntS3cIy+WEKfwsRZpSs33uDkcO3DHJ2YSoG1JOnOebagl/4cIo3CZ5N03mou4isZuolMgpyVqLrudhrGv7jgqp4+b6dgAOTLJ/Wggin2wko7nRbxco2gw5ZoOZtiUIFs4Syr0uWEz6+Qc2A1Yx -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Simple Testsets"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Simple Testsets - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"SimpleTestsetQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testsets":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},"type":"array","title":"Testsets","default":[]}},"type":"object","title":"SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-spans-rpc.api.mdx b/docs/docs/reference/api/query-spans-rpc.api.mdx index ef0a0cb22e..149afa5841 100644 --- a/docs/docs/reference/api/query-spans-rpc.api.mdx +++ b/docs/docs/reference/api/query-spans-rpc.api.mdx @@ -5,67 +5,964 @@ description: "Query Spans" sidebar_label: "Query Spans" hide_title: true hide_table_of_contents: true -api: eJztXFFv4jgQ/ivIT7dSdumt7omn49pU5doFDui+VBUyyVC8OE7Wdtrjqvz309hJSKCF0NLdruSnVcOMv/HMl/Hk08qPRNM7RTo3ZCJpwMQdufVInICkmsWiF5IO+Z6CXE1VQoWayiQgHkmopBFokOj4SASNgHTIPA5SRTzCROFEPCLhe8okhKQzp1yBR1SwgIiSziOhYjWYmwX0KsEFlJYYgEdApBGGpCUNgHgEsTEuzTRHw3ODlHmlp0g5J9m2BZqU0cmI6qOGR+9AaEpMvoQGDhFouaoHakB3R2pNKqHGPAR1jFAruExouAO5M5SBxa2GIuDhp4TSt7jVUDiL2KsiaYJ7ZUCqsOgl7yl/a+RegVMFl1TDa4BFGs324I4QovaiMK5BHoBaMtk6Zri6BJXEQoFCg88nJ/hPCCqQLMG+QjpknAYBKDVPeWuUGxOPBLHQILTZTJJwFpg21P6m0OexAppIbFKaWYQgTq3TRsLX2zw1Fh4JYU5TrknnJLN9RdUTxzRE6gkACVRDOKV6d2vIu0yHhFTDR80i2Jn8U7tsq4s9gqRJ+BYg13bZHCQEDm8AcmaXzUGKdM1WUxY2xElTFjZK1l+rVi+s5uuoKEW2SpQiYUdFKdJVopijLgfYXLZwwhMacnuk7h7zcUJFbp1QCULviX9XvEOzQC1Wa9rknGTiPrYvMvEIFSLWxR+pWIr4oXa2m01OcKXteIp9N4c2RzT2lQVlCPgQy+Wcxw+YJqqW+E8cY2+HaAZhaJ2Lnsd5ZFpSlHDIAw4WZoaQIKlYPr0BTPue+JdM7GFSEf942O1PL3v9s+l1fzz0T3vnPf+MeJXnvf7EH/W7V7WHY3/01R/VHp1e9fz+pPZoOBqcXZ9u2g364+sv/qi6pcEEOG7rEuN+flv2AHkZwQxZ+9R0GaI0lXpqes4relSTU3eMSK2J9SQgwh+C6ouwxFSa6lRNgzhsSOnxpDu5Hk9PB2c+ksI3Na08G1xuPPBHo8F2OQ3sKaI+XVAbVgRK0buXV9Ws0vqSr5J5hGot2SzVsHHu0jBk+I5RPqwdvC+dJzfnnlkcc6DCPHoaiwRMBimn8rfzlPO/VSw+DlKdpPoDdgm7Sjz7BoGd5/NBoYkXlZKudn8E1H1Nk91CfM65u05phq1pDhJEsJm+Zwabe5CK2eHqJQX+mrsjY3h692KeoG/mkeMdsPakcmx7U7ZtOdZ7zKigYgVhf3SjNYEzj3Amls2YfNhEdOi85Zj0o5m0/uK8KWtbqdvGeXbFxPIgml0ZYmUeWVC1aNgsXXv61UlVpcwFVYuDKHNhmYKD4r8B5EKGq9tR6uaXGcX03oPQzV7J4pvjuR5efFLgmK40jZKjzPbV79VyYfdC/+RTwnChWuqNM8JHWh30xvuWiPuAy0NprctsQJ9zqnH6OAh9bOTJYlhpSKntoehgLr56iTVtCuXgA3mKVJVfN7JyexBHykQ5mdbJtE6mdTKtk2mdTOtkWifTvtdB1sm0Tgd5NzqIk2kdk5xM69rTOyKVk2nfad2cTOuI8dpT4h3LtLlEu3N4cVqo00KdFuq0UKeFOi3UaaFOC3XTotNCndjwq7DNaaGOSU4Lde3p1yGV00Lfad2cFuqI8dpT4v1roccQI/d0NWM1kQCHpXli/1fsvtXze03KSwayDD3++PyZbN1J8JVyFhqhp+VLGcuXX0gQgqaMmwP46SbA46D26yGv1e1mVSojQqFaZR6J1N2uNlP5wi3EqedMTTJaViHawyvcl4XO7apfXmV6bXaf38aZTd+u0l5MJsOtBW1t60X9B6WxlmWiRyLQixhvtUlic69JQvWCdEg7kXDP4KGtLVvaRulvF7KaAnlf3HaTSk46ZKF1ojrtdsDjNPxkb4L5RFmbJsyQVEGQSqZXxqU77F3C6gJoCJJ0bm6rBmNkkOVE3awsB03YJWAU+QUd3VQvYsn+KxRJc0/Hwnrh9pmYx6RyL0fXBNfqDnvEW388k5NPv386IZvZqhkj+Wmg14dW/jOqiLUslPs3sqRhPtFAoz/XP2BkmPOIisp69eLUQin3r+Ff3U44qqFZDvyY1+2G5HXLx2xLW5UvZ6t365EF1rpzQx4fZ1TBteRZho/t71igkCk645XbTZawqtxodE95ipGYt/FZ2/x+oSbG5Q0/TYzLO3iaGBe35DSxrVxt08Q8v4ymUTKKO2TWxrf4h2RobV4Br6As5t96dQMcqCpeWx0XVynf4OFgPCFZ9j8n5HMi +api: eJztWt1v2zYQ/1eMe9oANc6KPflprqOiXlLbs5W+BIFBS5eYDUWpJJXONfS/DyQlmZa/E2fdAD0loe7ud7z7HT/CW4IijxI6dxAIElL+CPceJCkKomjC+xF04FuGYjGVKeFyKtIQPEiJIDEqFFpxCZzECB14SMJMggeUl0rggcBvGRUYQeeBMIkeyHCOMYHOEghfDB+MAbVItQGphHbAA+RZrF1SgoQIHmhs7ZeiimnBjwYp9ypNnjEG+aaEFqm8EzFRZ3WPPCJXBEy8uEKGMSqxWHfUgO731Io4riYsQnkOVx1cyhU+otjrytDiuq5w/P5TXBlYXNcVRmP6Kk+Owb0xIGu8oUyhOAG3SqxVzLV5gTJNuESpBd5fXuofEcpQ0FSXGXRgkoUhSvmQsda4EAYPwoQr5MpMJ00ZDU1Vtr9KrbN0QFOha1ZRi/CMQlIrUudu6d2XQiTXIJmFqMVpJdwzErlXMnNvdRSF1oGIKHynaIxHkc4ruXZO4yWN7BIit9omQpDFXisTo5t7dj2qWSFRRHVSCBut5WA9I1vgdymuJF5tAkIqwowR8cswQKan8St4S6AKYwmdrV9rUbnPq5Fk9hXD/WtZFahQIFEYTcl509mzZltdk9Isjd4C5NaaLUAiZPgGIFfWbAFShmu2mNLoSJwso9FRwfqwaPUjN15nRSmjVaGUATsrShmuCsVUYgGwa4nTBxos5HXxHBDX5C2kUyKQqwP+7/N3ZAy42E+UH4hGeaqYjLqD6XV/cDW9HUxGfq//se9fgeeM9weBPx50b9YGJ/74iz9eG+rd9P1BsDY0Gg+vbnt1ueFgcvvZH7snl3JJuNZ+b061nJbdJF8WJBPwATGVAlIRoaambl5RZ8ds8RON1AqsJiCP/hVUn0cVplREZXIaJtEB2IoSQTe4nUx7wytfk8I3OXXGhte1AX88Hm6m08D2NOr2hFq3YpSSPL48q8ZK63NhJfeAKCXoLFPH7pwvPULGs/WRWZIwJNwMbcda7YAfM8b+lAl/N8xUmilnI3S2vY19c7fW4UNFTRdO2mi7q5BqDj8jV7XQFb7WDxFlve5aBMty1BSXisTpWerC8TyoDDfMeGtmbCi695Y7ywU31bX1wte0ctAPe+5bIuYeMMqfjmPkaTvzqft+w7CfybAyt07eahy7ofzpJIrdGGIdAq7gVie/LWcbN7DNbau5bTW3rea21dy2mttWc9tqTjzNbathRnPbam5b/yOG/fdvW+e47mzxpY4kA4F4WpgD+7J3aKblw2r5aFqbZtFCUT3g5rk2+Pv795vvvV8Io5F5zW35QiTi5Y+9ESpCmf5tR82zJFz7ekrV3deT5nAjsQ7qQMfycd8a4RxPrMhuUROMVqC/HkqGnpeFLuScbKzCa6O7expXNnz7ePUpCEYbBm1u15P6l+4OaFmiehCjmie6gSZNTAtFStQcOtBOBT5T/N5Wli1t86+GdtlZIFE8l401mWDQgblSqey02yFLsujCNp1cENomKYW6B13ztdXToobgEsNMULUw9rqj/jUuPiGJUEDn7t4VmGh6WcKsi60eylN6jdrFojOim6l5IugPy4KiQWJutXRsKH9I3IaIwrcPJHxCrheLqk0BLi9+u7jcNZlCodUd9YsqIaFaHa8KMfBq4aoCpY/2sSkRUEjiP1YftJc6OTHhjr31LK65VMVC4d+qnTJCDf0N8LJI8B0UCS4WYstvWZizab73YK5J0bmD5XJGJN4Klud62H7XyYqoJDPmtJg84cLpsnomLNOemLLdKVv0PB0jXHUdHSNc9QUdI1x27hzlctlusxK+138IqqUNab2SZDpKVqsbhpi6EBsLqLZSFeRoOAkgz/8BwdA2uw== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Spans"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/tracing/spans/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Spans"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/tracing/spans/query"}></MethodEndpoint> Query Spans -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["trace","span"],"title":"Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"spans":{"anyOf":[{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},{"items":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":["circular(OTelSpan)",{"items":"circular(OTelSpan)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "focus", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", enum: ["trace", "span"], title: "Focus" }, { type: "null" }], + title: "Focus", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "format", + in: "query", + required: false, + schema: { + anyOf: [ + { + type: "string", + enum: ["agenta", "opentelemetry"], + title: "Format", + }, + { type: "null" }, + ], + title: "Format", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "oldest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }, { type: "null" }], + title: "Oldest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "newest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }, { type: "null" }], + title: "Newest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "limit", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Limit", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "filter", + in: "query", + required: false, + schema: { title: "Filter" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>oldest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>newest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, + `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, + `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, + `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "count": 0,\n "oldest": "2025-05-15T13:01:54.282Z",\n "newest": "2025-05-15T13:01:54.282Z",\n "spans": [\n null\n ],\n "traces": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-spans.api.mdx b/docs/docs/reference/api/query-spans.api.mdx new file mode 100644 index 0000000000..daa98f8ff2 --- /dev/null +++ b/docs/docs/reference/api/query-spans.api.mdx @@ -0,0 +1,968 @@ +--- +id: query-spans +title: "Query Spans" +description: "Query Spans" +sidebar_label: "Query Spans" +hide_title: true +hide_table_of_contents: true +api: eJztWktz2zYQ/isanNoZxnIzPelURWYa1Y6kSnQuHo8GItcSYhBkANCpquF/7yxAUhD1dpSmneHJNri732L3WzyMXRFN54p0HkggacjEnDx6JElBUs0S0Y9Ih3zJQC6nKqVCEY+kVNIYNEhUWhFBYyAd8pSEGX5lolQgHpHwJWMSItJ5olyBR1S4gJiSzopQsRw+GQN6maIBpSWCewREFqM7WtIQiEcQF33STHMUfG+Qcq/SFBnnJN+WQJHKOxlTfVH36ByEpsTESmjgEIOWy01HDehhT62I42rCI1CXcNXBZULDHORBV4YW13VFwNcf4srA4rqucBazb/LkFNw7A7LBG8Y1yDNwq8RaxRzNS1BpIhQoFHh7fY0/IlChZCmWGOmQSRaGoNRTxlvjQph4JEyEBqHNdNKUs9BUZPuzQp2VA5pKrFfNLMILSMWsSJ27pXefCpEcQTILUYvTWrhnJHKvZObB6igKrUMiquGNZjGcRDqv5NoljZc0skuI2mmbSkmXB61MjG7u2fWoZoVGEcOkUD7ayMFmRnbA71NcS3yzCRIyGWacyp+GAXCcxs/EWxGmIVaks/NrLSqPeTWSzD5DeHgtqwIVSqAaoim9bDp71myra1KapdH3ALm3ZguQCDh8B5Aba7YAKcM1W05ZdCJOlrHopGC9W7b6kRuvi6KU0apQyoBdFKUMV4ViKrEA2LfE4WEGCnksniPiSN5COqUShD7i/yF/R8aAi/3MxJFolKeKyag7mN72BzfT+8Fk5Pf67/v+DfGc8f4g8MeD7t3G4MQff/LHG0O9u74/CDaGRuPhzX2vLjccTO4/+mP35FIuCbfo9/ZUy2nZTfJ1QTIBH1BTKURpKvXU1M031NkpW/wEkVqB1SQgon8F1RdRhak01Zmahkl0BLaiRNAN7ifT3vDGR1L4JqfO2PC2NuCPx8PtdBrYHqLuTqh1Kwal6Pz1WTVWWh8LK7lHqNaSzTJ96s752iNkPNscmSUJByrM0G6s9Q74PuP8D5WIN8NMp5l2NkJn29vaN/drHT9U1HTJWRttdx1S5PALCF0LXeFr/RBR1uu+RbAsR6S40jROL1IXjudBZbhhxvdmxpaie295sFxwU11bL3yklYN+3HPfEjH3CGfi+TRGnrczn7vvNwz7kQwrc+vkrcaxOyaez6LYnSHWMeAKbn3y23G2cQPb3Laa21Zz22puW81tq7ltNbet5sTT3LYaZjS3rea29T9i2H//tnWJ684OX+pIKpAA54U5sC97x2ZaPqyWj6a1aRbtE9UDbp6jwV/fvt1+7/1EOYvMa27LlzKRr3/sjUBTxvG3PTXPk3Dj6zlV91hPmsONxDqIgY7V/NAa4RxPrMh+UROMVoBfjyUD52WhCzknG+vw2ujun8aNDd8hXn0IgtGWQZvbzaT+id0BrUnRJRODXiTYPDMHbZpm9IJ0SDuV8MLga1tbsrTNfxraWDsgX8qWmkxy0iELrVPVabdDnmTRlW03uaKsTVNG6thd87XVQ1FDbQVhJpleGnvdUf8Wlh+ARiBJ5+HRFZggsSxVNsXWT+QpuwUMWtET0c30IpHsb5v/ojViYbUwKkw8JW4rROHbOxo+g8BlompQINdXv1xd75tModDqjvpFfdBQrw9WhRjxauGqAoWH+tgUB9FA49/WH9DLNFE6psKxt5m/DZeqWGj4S7dTTpkhvgFeFbl9IEVuiyXYMrtsmkJ6LhJscHggq9WMKriXPM9x2HaVYJ4ipuiMO30lz7B0WqteKM/QCVOre2WLRqdThKtWo1OEq2agU4TLdp2TXC57bNbCj/iHZCht+OqV/MIoWa1uGELqQmytmmilqsLf/YDk+T8MzC+/ +sidebar_class_name: "get api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Query Spans"}></Heading> + +<MethodEndpoint method={"get"} path={"/preview/tracing/spans/"}></MethodEndpoint> + +Query Spans + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "focus", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", enum: ["trace", "span"], title: "Focus" }, { type: "null" }], + title: "Focus", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "format", + in: "query", + required: false, + schema: { + anyOf: [ + { + type: "string", + enum: ["agenta", "opentelemetry"], + title: "Format", + }, + { type: "null" }, + ], + title: "Format", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "oldest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }, { type: "null" }], + title: "Oldest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "newest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }, { type: "null" }], + title: "Newest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "limit", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Limit", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "filter", + in: "query", + required: false, + schema: { title: "Filter" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>oldest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>newest</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>spans</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_kind</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelSpanKind"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, + `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, + `SPAN_KIND_CONSUMER`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>span_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>start_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>end_time</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_code</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelStatusCode"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`STATUS_CODE_UNSET`, `STATUS_CODE_OK`, + `STATUS_CODE_ERROR`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>timestamp</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>traces</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "version": "string",\n "count": 0,\n "oldest": "2025-05-15T13:01:54.271Z",\n "newest": "2025-05-15T13:01:54.271Z",\n "spans": [\n null\n ],\n "traces": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-testcases-preview-testcases-query-post.api.mdx b/docs/docs/reference/api/query-testcases-preview-testcases-query-post.api.mdx deleted file mode 100644 index 5a5da5ab27..0000000000 --- a/docs/docs/reference/api/query-testcases-preview-testcases-query-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-testcases-preview-testcases-query-post -title: "Query Testcases" -description: "Query Testcases" -sidebar_label: "Query Testcases" -hide_title: true -hide_table_of_contents: true -api: eJztWG1v4kYQ/itoPrWSCYQk5M6fyl3udPTShCZcKxWhaLEH2Ova69tdJ6HI/72aXduYlzgkIlI/NB8IXs88M/vMi2ZYgmEzDf4IhqhNwDRqGHsgE1TMcBn3Q/DhR4pqcWcKgbtE4T3Hh8qJk0ikNuCBwh8pavNBhgvwlxDI2GBs6CtLEsEDC9z6rmVMZzqYY8ToW6LIrOGo6akAv+OhfWbx4noK/mgJ3GDkRBYJgg/aKB7PwIOpVBEz4EOa8hAyrxBgSrEFZF6pEadCQDb2wHAj6KC4fKMfaquI2mg0dzxcN/2cxXoLGk2jbx174HEoHwhjDX6dgRgfUJs9HQiZwabhEdZ6ceUgMw+kCA8Nfu0gMw9ifNwX+lnirggr80DwiO8G5bHBGapalEurTfdWIap63zBOI6oIpgOMQ3cWYvkwruXAwmeedUrdM/Fqj/sFQOaBYgZ3AsVpNHkG54Z0s1UxyMl3DKhMC4E/y1zchqnTKxvG71T8N67oISMV6gBcYQi+USnaA53IWLu87rTb9I8oVTyhZgA+3KZBgFpPU9G4yYXBe23vCGTqlDb4Xjn/0UpQXKcsFQb8dl71rgX6lS6z3ZbesjMcFvu2xA0UMoPhHTtszX90sI2eLa40Cd/CyDcHmxsJUeAbGLlwsLmRgq7J4oDRKMj6sMiDUvB1UCsFW6WVgrCDWinoKq0cDtrhTYUdTKqQLAw51T8Tg7Wa3DI6kVIgi6tWcj+y8VZHq3Pls3WCVF7vTGHZq2//m428eofdtiDgKkgFUz9dyUuuza9axs3r1CSp+RlecsstdXgRScOcowgN++9y9DkV4lmG8qa/j9bzQ+WG7stI/Y3IpOJl/5N6MFIviMx9Zpqt5WHH2FOdHkb7TUrlZJPZMem009kehP5ggod2zGl8Ukqq109BIRrGRc0sI2Sw9vYlGTR+mqFL6Ry0PUHPdm1qqyzXms0qdD8tasloDOntLq5XI+fI3suZzuUqKbCi17H79DUuHH11gf0yHA62AF1s14NqR+RGNXUiNHNJy3W+NCfMzMGHVr5bt8pZtGV3a6DJUN2j0jY+qRLgw9yYRPutViBkGh6xGcaGHTHeYgm3aa8xSBU3C6vSG/S/4uILMrv/jMZVgVvKIJcT62JlOFjCvyJ5EbOInnupmUvF/3GBpnWH/HFadH3KzZvV7wCfHlmUCNze60dwMmXvzqbd0+bZ+fF58/Ss22lOTqZBsxO8755Mu102ZV0bwMrgvZ/SxppdrNPQaXdOm+3zZuf98PjMPzv2O++O2ufHf8FqK66Tccvtvi7ka2u73DzX1srVltgutrx2ZrfHqbRk5YnWs7Ft9AZ98ICywKVV++j4qA2bybYmTL2DBbZ3FKGzr8HbSKIyfWgDjmzjAIMs+mX1gjyjdI1YXMHbzu01d8oUMvhoWolg3DYGa3yZp/0I8rSH6hLmuR+eKPhzKhJ/BMvlhGn8pkSW0bF774/GHtwzxdmEyBpRa5oXeb6Ev3FhFz7bQ5u2gZC4SF1eb/RT6nVOoxcEmJha2XGljgfXt0PwYJL/6hXJkHQUozvRpw+UX5YUW2j2bAmCxbOUWqAPDpP+/gXMYKJ0 -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Testcases"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testcases/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Testcases - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"TestcasesQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testcases":{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array","title":"Testcases","default":[]}},"type":"object","title":"TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-testset-revisions.api.mdx b/docs/docs/reference/api/query-testset-revisions.api.mdx deleted file mode 100644 index e0d4b1c337..0000000000 --- a/docs/docs/reference/api/query-testset-revisions.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-testset-revisions -title: "Query Testset Revisions" -description: "Query Testset Revisions" -sidebar_label: "Query Testset Revisions" -hide_title: true -hide_table_of_contents: true -api: eJztWttu2zgQ/RVjnnYBOXbcXFo9rdu0qLeXZBO3C6xhBLRE2ezqVpJK6hr698WQkqybFdm1gW7hPqSJxDlDHg5nhjNagSRzAeYExlRIQaWAqQFBSDmRLPBHNpjwNaJ8eS/1+3tOH5hggS/AAE6/RlTIl4G9BHMFVuBL6kv8lYShyyyF0fsiAh+fCWtBPYK/hRw1SEYF/lVGVvL+8toBc1Ie67hqupsHLIhQU7WIoKWBchlSMGEWBC4lPsRG9siPXBfiqQGSSRcfvCWiM85QYkPDcmL9KKaGiGMjHRbMvlBLwnpYsg9v1EKreLEBHpWkOAti2wypJu5NgYzKPIXkzJ/nYZkv6ZzyoiZvVnySX169LrAYtyKX8N/eRK77pwj87sgPI/k7lFeKGExSr50Q4ZwsG2ktikKF2SbZD8gkSlSM6mdi9GPwngn5FKeb1liW3o6hsbZC8IlHW66/OgOUjQ2wqbA4C2XliLeHuspBxAaQSC4C3gRmgBNwj0gwIYqY3Qg+1GgZbmnDE6N9WkN72x0mepAcIhsJzqnBoV3JFKkNVCFgArz1SvIq2i/nSqlSHkoIMt/ZYD4k4i3c5G0SM/7CGFXvLtfhxdnEQzGEPFBeDUPtZ/85EY8NEG403xXmDmVjA5i9L/se2Y2M3lKHcupb2+15sg+dW2Q3x/YD4Yz4R9YPy/pnzXKF/TSVOtJ/YKPXNGf8M99yI5veE24t2AOtX0WbZHGkgTrDFCg24JH5dvCIBDTkvz59pELuNZJ81JCxAYFr7xv8WkNiikG/tYV+ctc/IlZsgMs8Vg9am6WVUN4raVw3t+kTaQb1Iw+vUURY1Lf1M0x4kj+mjRwoeGU+kvIH4u4841EKEBvAN2UU1Wy0gnOrkoeGc/N3Zos1MXfLsH2rb5EQoyBeKRnHkyN5RNUDEQZ+cpkb9Pv4XyGThLvIsqgQTuR2bpPBYOx6GbWCSAuVWF8v4ZUagbvrkMiVYPZrHK/C2uBqyyFyf86uHBZGym/sX08RP13P/teh8QmXzCHWPhUME8hUw4HuEQdL6veVYBvHgsr/p6ByHckdKioVqS1KKlr2F6+pNNHaoqiyC0c/d1XF4pRIat+T/WZ6rzRsZ6jIikL7EEo+adhEiU1degAlVxo2UZLSNVvuMUClZL1cJiEq5WuvWlK2Mi0pYXvVktKVafmV75oq6JOmgJoG03tmH77CmMbczsjOCgQ1kfyJTPVQmd1+se8y3KMHO3qwg3qwffuMmiy8dbZUkyqn3m+6VVaSZsjH1K1F6na8MxzgzlANnUdSdyb1Csl86mKMucBOCUWrO3da5tNT+ZFCYWWOm4vxIl+bm2yjRGTlw1jVIs8Gg2q18TNxma1qiZ3XnAd891KjTSVhbkOh0A2swtttjH66mbD3gZ6gcmNiXpdw1hSK9JDNQxUZnTG+raN8XdedqHVp1cm4QmkxpVezu3kZV5q+pv19Ox7fVAD13hY3VdWhO3WW5FG5CPArqDAQCB0SuQATeiFWeuljL0mRRS+r/PbU91KA2S3Hm47asIi7YMJCylCYvZ7lBpF9QubUl+SEsB4JmTpkgloRZ3KpRIY3o3d0+ZYS1XuYTPMD7tCktJEUh2X7Q0L2juIsdI0hKUqy73rnsdWA89FSyAca6+36c67X34gXunTT51lZvlKqDmLNvljbS6r4SbhcJxdZ9WNtScUtyR6nxVl45pDn587FWff88vSye3Z+MejOnjlWd2C9uHjmXFwQh1xA7uONSTuJaVqnhUF/cNbtX3YHL8an5+b5qTl4ftK/PP0Hsq8oJpvHTHNV2fXBLH19MMk1Wtcr1LfY9d+YXbabu/LMtR33Q2oqdZcPoaraSNWmVeiBpr3Opo1LW5ZNY3Tnsa19JT3FftYWLPT81i28ftqC68eqtecE6jSlTQJ1+DvDmxHkCiLQPzk96VfOQmEwRhtiqWiTnm31GoySl8n8C7YnPRVqQFLi/bF+gTNDx+YRP4e32RuWio2Jr5H0m+yFLmEqpKhJrBJHOYHEUUJmPvrD0TWmdpdTAxboYc0JrFYzIugn7sYxPtbvzck06WTNkL8JxrdF6htX8C9dqtacCsRdFYVwuBtpX1gKyhgwtcTQsmgoG8dOc0Hg5vpuDAbMkg9evcBGGU5wefjTBDQ5xY9yj+rZClzizyPtGTQm/vsPc2O/1A== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Testset Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Testset Revisions - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_revision":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"testset_variant_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs"},"testset_revision_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revisions":{"items":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"type":"array","title":"Testset Revisions","default":[]}},"type":"object","title":"TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-testset-variants.api.mdx b/docs/docs/reference/api/query-testset-variants.api.mdx deleted file mode 100644 index 68ee55a161..0000000000 --- a/docs/docs/reference/api/query-testset-variants.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: query-testset-variants -title: "Query Testset Variants" -description: "Query Testset Variants" -sidebar_label: "Query Testset Variants" -hide_title: true -hide_table_of_contents: true -api: eJztWW1v2zYQ/ivGfdoAOXbcvLT6NPcN9do1WeJ2wAwjoKWzzY56KUkl9Qz99+FISdaLrTqpA7RD88GxqLvnyId3xzt6DZotFLgTGKPSCrWCqQNRjJJpHoUjH1z4nKBc3Wj7/uaWSc5CrcABiZ8TVPp55K/AXYMXhRpDTV9ZHAvuGYjeJxWFNKa8JQaMvsWSDGiOip5qwEY9XF3MwZ3URefCTHa3wJIpM1GPKawJ6lWM4MIsigSyEFKnGAoTISCdOqC5FjTwhqnOuEBJHQsrmfetmBYiTZ1cLJp9Qk/DRizbhddmoU281IEANavOgvk+J6aZuKyQ0Zin0pKHizIsDzUuUFYtBbPqSHl5222Bx6WXCCZ/eZ0I8buKwu4ojBP9K9RXShhcY7CfEpOSrVpprapCg9k23T+ISdJoONX3xOj76B1X+muc7lpjXft+DI2tF0LIAtxz/c0ZkG7qgI/KkzympT4U6mUJYo8g+mgTyp+UvrbHUp56JM5r+5v5aD2/3KJU37CAj5l66oASyeKhMNekmzrA/TYEB+aRDJgGF5KE+62II7+V0Cuco8TQw5L7fD02s23oXBG7JbazRP+T9UdlPfP+gn0eeiLx8YZJb8lvcfsi9jnJRhaoM8yBUgfueOhHd7T+lsM5xDtUek/yfKaxq7nJHS3JxUKmDkTCPzT4hYWk/Idf9oX+6qa/J6zUAcEDvh106xFSQ3lntGnd0kfZPjcMk4AqPKY8DH07Rtk4e5i2cmDgjftolLdMPHjGoxwgdUAyvf08aR6VDZwr0m0Lm78KX9yS8+93alzZAhdS0qNql0sKHC0TNAMqjsKs0Bz0+/SvcsrBdeJ5qNQ8EZ2rTBich9bJXpRYpRrpmxW8MBK0uXOWCA1uv5l1DdSOPJuLHi7D5cloZLIEk5rPmXdIA8MMMrPws0H4YRqEi0Q/oENoaN2jRbC6//MeoY3WPZqEh3D0PXcJDngSmUb/hh22OHhhYTtDQ1YS+49h5IOFzYz4KPARjLy0sJmRnK7Z6oBZOifr+SrL0zlfB7WSs1VYyQk7qJWcrsLKD9VTVIucRmOxs41Q5bJico86ShWFT2qqqJPBoFknfWSC+6YK6rySMpIPL5J81IyLlhpHRF7l7X3S9XQ3Xe8iO0FiNFCLUplW7OHmSFGKLUpN3W5RQ0ZnTG+3Mb6pSCdmXdZ0JldugAt6Lbu7l/HS0te2vW/G48sGoN3b6qaaCrqzxY8C1MuILpbjSBFyzPQSXOjFEm853vWyMlT18pK1Z26gwQGFku4CzHYlUoALS61j5fZ6nogS/4gtMNTsiPEei7kJC4VeIrleGZXh5egtrt4gMy3TZFoWuCaHsi5SFSt2h8X8LdIs7DkHw0QvI8n/tftOHRLNx2oRG+SqV5sb8ldfWBAL3HHjXRSutQKVWo1qeZk1H1mVtylNigN440bV/Sgcu3btNSldsGx0bVbbPFOGgidz9vR0fnbSPT0/Pu+enJ4NurMnc6878J6dPZmfnbE5O7PZaOtVz2NYal5rWMoqNxL5zQMM+oOTbv+8O3g2Pj51T4/dwdOj/vnx37C5QGiTsfcA+02u6PD7RZNe6cA3DXU/b4j7qWm055FxkrzDMT7dGV6OwCnR1z86Puo39rgiTCmUeca9cpc1r8GpBU8RNnRZEJj8CRpZ8NvmBc2MwjVgYQlvZ4jXyrgsgjR+0b1YMG7SpJnDOov+CWTRD4XzEE7pxyabA6YOLClruBNYr2dM4Qcp0pSG7Xt3Ms20ZsTehFL2Mg/4NfyDK9Mnm7OlaxIriYvEBnjtnKEzwGoMPQ9j3So7LSW2y4vrMTgwy34YCyKfdCSj1dGnC+Rwhh4T9GZsDYKFi4SOBhcsJv39B0VPaYA= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Testset Variants"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/variants/query"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Query Testset Variants - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_variant":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TestsetVariantQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"testset_variant_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetVariantQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variants":{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"type":"array","title":"Testset Variants","default":[]}},"type":"object","title":"TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/query-testsets.api.mdx b/docs/docs/reference/api/query-testsets.api.mdx index a2ff7c8ccc..58dae98d3e 100644 --- a/docs/docs/reference/api/query-testsets.api.mdx +++ b/docs/docs/reference/api/query-testsets.api.mdx @@ -5,67 +5,1141 @@ description: "Query Testsets" sidebar_label: "Query Testsets" hide_title: true hide_table_of_contents: true -api: eJztWdtuGzcQ/RVhnlpgZcmKL8k+Vbkhai52bSUFKggGtTuSmHIvIbl2VGH/vRhy7ytvFMUBkqJ+sCXuzOHwcDg8s96CZisF7gymqLRCrWDuQBSjZJpH4cQHFz4lKDc3On/ugMRPCSr9NPI34G7Bi0KNoaaPLI4F94zr4KOKQhpT3hoDRp9iScCao6JvGaBxCzcXS3BnTZOlMMHdb7BmygTmMYUNQ72JEVxYRJFAFkLqFENhIgSkcwc014IGXjHVmxYoqWNhJfO+FdNCpKmTm0WLj+hpKM0y1l+ahbbxUgcC1KweBfN9TgwzcVkjoxWn0pKHqyosDzWuUNZnChb1keryds8FHpdeIpj85WUixO8qCvuTME70r9BcKWFwjcF+TkxKtumkte4KLWa7fN8Sk+TRSqofidF30Ruu9Jc4vW+NTe+vY2hqsxBCFuCe629HQL6pAz4qT/KYlnoo1PMKxB6H6A+qU7sPUVZrbiQuGxubJWezsNyiVN8Q+YfMPXVAiWR1KMw1+aYOcL8LwYFlJAOmwYUk4X4n4sTvZPIKlygx9LCSN18+lBn/vStil8INPZH4eMOkt+a3uDv4fYroxAL1xjlQ6sAdD/3ojtbdcS+EeIdK70mazzT2NTdp25HXFjJ1IBL+Q4NfWEg6evh5X+gvbvY7wkodEDzgu0F3Vq8GyhvjTeuWPsru2DBMAhITTHkY+naMCkH2Zd7JgYE36aNR3jJxcMSTHCB1QDK9u5S1q3QL54p8u47Ln0Uu7qg6exasKyumICUHUlZc0onRMkEzoOIozMTNaDikP7XKCteJ56FSy0T0rjJjcA7VZF6UWKcG22Xoz4wF7eqSJUKDOyzLq4G4p6D+L+V+Gil3kegDtFzL6yvEnPX9j6u5Llr3kHOHcPQj6zkHPIlMo3/DHvYufWZhe2NDVhL732OS9xY2m8RHgd9hkucWNpskp2uxuXk4PZiT9XTTm/hVvh50lpytYpacsAedJaermOWnkt7Z9dES3i0LVb19Z/voDFUIg9SojJPRqK0jPjDBfaMSei+kjOThIsJHzbjo0AIi8mpPv6Ywz+/n501kAyQKA7WqyJhit8rLQym2qnQ595saMnpTerqL6lKxzcy67NSZXbUjLOi17N6/jOeWvq59fTWdXrYA7d7WN9UozF4lcQLU64he6sWRIsSY6TW4MIgl3nK8G+RKbmBe+oEDCiX1wmZ3EinAhbXWsXIHA09EiX/EVhhqdsT4gMXc5LtCL5Fcb4zL+HLyGjevkJnWYTavGlxT/tiMqJsVm8Fi/hopCnuBwTjR60jyf+w2U6dA8VgvWjxl5lX5cvLFZxbEAhsvGwsl2lCcpLjrejHT4JlsK7VGcaOW2VKnvcjfxouHWeXFQulry1T5nUoOPFqyx6fLs5P+6fnxef/k9GzUXzxaev2R9+Ts0fLsjC3ZmaG73WzbhdT65LwfhtFwdNIfnvdHT6bHp+7psTt6fDQ8P/4Lyra2y8Z2p/sFV/Sdw6J1rPWFZZs3zNu0YWrav2VktixL9rHJsN74cgJOhb7h0fHRsMV8zZjqF/PMpucJZB6D00jlIomphQ1M8QKNLPitfECR0ZkJWFjBa52vhkrK8ljjZz2IBeOmNpm5t9nRm0F29KDSRjn2nTvVjzWdU3cG2+2CKXwvRZrSsH3uzuYO3DLJ2YKomlFxXOdnbQt/48Z0bKaK900JI3OR2LPVqOhUba3H2PMw1p2280opuby4noIDi+zfAUHkk49ktCT67QJll+HEnDsztgXBwlVCRdgFi0k//wLGTFuQ +api: eJy1V0tv20YQ/ivCnFqAtlyjJ54q2wnipq1VW+lFEIwRdyRtsuQy+3DDEvzvxexSEilZsmI4OljG7sw3s988VYPDpYV0ChOyzpKzMEtAl2TQSV3cCkjhqydTPbr1fQKGvnqy7kqLCtIaMl04Khz/i2WpZBZUh5+tLvjMZivKMdwW1d0C0mkNrioJUtDzz5S5FlEaEuxITg4FOmRHnHSKBSe4tPfRKjTJRr/wSkHTkfuz1R1shJumYXhb6sKSZS8uLy74S5DNjCzZVUjhwWcZWbvwanDfCkNy+stKw5Q5GS1k2kel1k1ZOFqSga2f10GiSWDDalqDdJTbfbQCc3qWPeuMLJZH+fiLdZuk/9jXQd10IJoEMkPoSDyiOwaYwEKbnGVAoKMzJ4M/h61cR9jBKLDjS/EjjHyKsK0RQYp+gJGbCNsaWdM1rx6lONGO91KcRNZVNbgVXb7e1MqarY2VNWFvamVN18aKVX752lx9YN0mgbdzL/rE1Zph20f2YNEYrI6iTDb6TbLtcz0sFEJyjaEa97rACTSs20zPg3zeP5lrrQiLcPS8LcikybxC89N7r9TvVhdnd96V3v3MDazXuBmk7VqnaL1M0I5u4HzP4kvNH5o9tX4ILHWRo1d7EjzoBC3QKwfpdPYcZndqxZ4/24fZjJM4in69vNyfPv+gkiLMlsE7Y7R5/egR5FCqI9NE6ax3+z15NTtM2h86OhgS2y47w29TbNswWYtL2kbgsGggYzDh25f453dF061cJxRbeiO7h59xE+k7lkAfJpPxHmCMbT+of/PaNOhkU05upXmhKrVlxBLdClIYloaeJP07XO8Cw7BwQQKWzBMZG6LjjYIUVs6VNh0OM6W9OMclFQ7PUQ6xlLBrfxRuB9csGurEUuaNdFXAG41vP1L1gVCQCfndEXjg5Irp0hfbtrpSfiR2MS4nMPJupY38L+ZAApIdWEUtZobT9n67Nb77hnmpQug7XZAFZbHQwU7LdvuIK8y+UCEgASYkvu/i/Jfzi0OvbhUGo/FtW0yYue021YpBssPrhlFIgPJQSeAI89+2F+wlBzDHooO3F+ydjavlzdE3NywVylAowXbd5sEU2jyAzlaYxOWbk3nFSZNOoa7naOmTUU3Dx/E+nc4SeEIjcc60TblSV+vY1vCFqrB0hpZyFuqJxZWPsdxpL1z6UWOUZVS6o7KzTl6P7x4mkMC8/V2Qa8E6BvlJ/DcF4N8WrB2SK5zVoLBYeu4IKURM/vwPtqVO2g== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Testsets"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Testsets"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/testsets/query"}></MethodEndpoint> Query Testsets -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Input)","type":"object"},{"type":"null"}],"title":"NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TestsetQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetQueryRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testsets":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"type":"array","title":"Testsets","default":[]}},"type":"object","title":"TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TagsRequest"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>metadata</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Input</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"I"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>testsets</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "testsets": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.630Z",\n "updated_at": "2025-05-15T13:01:54.630Z",\n "deleted_at": "2025-05-15T13:01:54.630Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "testcases": [\n null\n ],\n "metadata": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-traces.api.mdx b/docs/docs/reference/api/query-traces.api.mdx index 1b01a4e2f1..35bbbcb465 100644 --- a/docs/docs/reference/api/query-traces.api.mdx +++ b/docs/docs/reference/api/query-traces.api.mdx @@ -5,67 +5,4415 @@ description: "Query traces, with optional grouping, windowing, filtering, and pa sidebar_label: "Query traces, with optional grouping, windowing, filtering, and pagination." hide_title: true hide_table_of_contents: true -api: eJztnFFz4jgSgP8Kpae7Kl8yM3VPPB2XsLepZEgWyL5MpVLCbkATI3klORmG4r9vtWSDbcA4YbhkMv0UsOVudavV6v4KZ8EsnxjW/sKuRwb0Ix+JWNg5uwtYBCbUIrFCSdZmf6Sg5y2reQgmaD0JO20pd4/HrYlWaSLkBK/LSD25j2MRW9DuI5dRK+ETITk+cMICphLQ7stFxNrsL5R972WzgCVc8xlY0DivBZN8BqzNxkrPuGUBEzJ/hAVMw1+p0BCx9pjHBgJmwinMOGsvGMh0hoapBKSFGGZg3SN8AtJytNDOE5RsLE6TocVjnsaWtfMxAbPCxjjmN699uQwKEwpT84z5cDm/HjuLynpRZHZFpnHMlndFtaijqFXFEZjnuOElaq+9kqJeCU/H19vzSkpezsPo2J5e6SlqT/gEDlEspIUJ6FrNN6ijqNSI70dXOkAd5fX9dvzV/VZeW2NVcmSdA1SxxCsaTKKkAYOiPn34gH/KKW6QhiEYM07jVj8bzAIWKmlBWjeBJIlF6PLW6VeDzyy2Ti/RmN+s8LpClWaPv2ShztzTy4CZhEsnT1iYuQ9VNdKigzduuLx6LyL3uZLxci1DHNO6iHJFe4YPEi7d6OUqiarRVwhtaQG/rFWvpRazzBDiMz/r8+E1qvZxsVtvD+8vA/YgZOTXL0/Yg5tO7/7yond+f9sb3HTPLn676J6zzRSfHwq7xq+vX/SG3X6vc1W6OOj2/+z2S5fOri66vWHp0k3/+vz2rDruuje4/dztVz2AvrxEe9D1lmt7b8V2L2QnYJtF3MK/3KhioHNtW0PhHQQyepmYroxWQozlNjX3oYqg4uxhZ3g7uD+7Pu+i+7rDOkcXxl5fokcKF7r9/nW/cs0LrDrJTeUMZ7Ke2AyMwdz54tSAUlqfMynLgHFrtRil1u+btUweRcKXOjeFnWV1CtXwr9PXWUvHFXoEaSt6duzsprsCl9JYPktqd/pq0P/V4D2JwplYtKCy/l30VpYkMjlcaz6v1d/1Ll66ihKqOfhnTZJVe5cBi4V8aBZK7+GQeDNBmzuzMtsrIR+eG6pXbgWbKgzy/VI4Lwo5f8sBs20+5ZXar90XIBXhGBNCTs655auaCQ2tZDAVVVdrR4AeMw5xo4whnIcx1KWCUAO3EN3z7UVbg5PlzEtodVzhlibRgfJuvYSKvNE8M/wQkf+dZ65ZSz1c5NZQWoU6THg4v8pXYmdS00ptyVPbl3pV0qSpyyO5rgbZp5xt+kqtjhkN8CP05+p3O3VdLAn5qHx/gZxCSmXzL6l8kOpJFuc61ABDFLTFfc8yGgXlBXhW6x1udOOipbFzHJNhAXtS+mEcqyfszaZcoHcsNw/4R6kYH5iNIIr8w3lbGapZEkPmzHDKvUc0lw9FT/RUdIBLM6Mr8jLP7i9BjhzaN24CO7db3i2U5+QOmJf1Ilkb8pIOZP9R5BR4+cVAFrPc3b5F2FYARVvDMg+yvJ1xrYpvTzZahrwNObD/WDUee0/9CDYnkdkJ30LI+EVNcVvXGNQuRqlbyLfqznPZ75wf5he3iuGDKwkOaPJyCW+pdFyvSDau2LbkS7pzr0bc8mMYgFWcX0CrRXgUH33ORHstR7HiM3grNIyPYkIf5T6r69q1cQ499l9WjWiAPYVjVUSdN3A6jbo8vBdUzqQDWqWAKQtxXdbLIeFL0kYO5IgIvVMiRMjk/SKTUph8s5rvPEi3cIntLnkdcEjAgoAFAQsCFgQsCFgQsCBgQcCCgAUBCwIWBCwIWBCwIGDRCFiwUOgwjbn+R/ZDkH+yYBU7225WLLrbmHDtb3zdBF8QDln/nLWxWWOXVfmr6viuHHm5m+i3JIRmCM0QmiE0Q2iG0AyhGUIzhGYIzRCaITRDaIbQDKEZQjPwOmjm55hvx/2zh0J/1Thu/BQL/zjiC5r4Q174ronF9XxNzTtXaHzTd65+UTpR9zo9wUOChwQPCR4SPCR4SPCQ4CHBQ4KHBA8JHhI8JHhI8JDg4avDQwIWBCwIWBCwIGBBwIKABQELAhYELAhYELAgYEHAgoAFAYs3Byze/a+d6LckhGYIzRCaITRDaIbQDKEZQjOEZgjNEJohNENohtAMoRlCM6+GZn6O+da/iPb8Ca2UbtFS6I8bR+fQvVL2Oq+7Od01r7uhp5vlvrfAYOrfPPtFGQ29jkcIlRDqm92ehFAJoRJCJYS60V4TQiWESgiVECohVEKohFAJof6SCJWABQELAhYELAhYELAgYEHAgoAFAQsCFgQsCFgQsCBgQcDizQGLd/+bL/otCaEZQjOEZgjNEJohNENohtAMoRlCM4RmCM0QmiE0Q2iG0MyroZmfY75v4XW88iG4X0vBwi1aiuih6R7ouxfrXuelP6d7/dJfqUDyF1t/YPPdcjkQvYMy//3pE84sAhNqkTUu7E8ei8iVPK2u1kq7fl3avF9Oklj48uj0q/GdjgmnMOObOTkCy4WrCnZk81iFpbsNioOV0+52B8BVXr9hXWsmdTm+0N7sa6icM1q+2NsTW2iXV73ZUKzd672724xz7766xf99OLzZEOjXdgZ2qiLWZhPAJxJup6zNTtXIgH7kIxELOz99/HhqfUAEDK+DNs79qY5Zm02tTUz79DSMVRqdOOLDT7g45YlwIWYgTLWwc/dI5+biEua/A49Au9AvDBhggPglLw9beZsn4hLmObRps05qp0qL73npLTAyp/4ptE7IsfLNdHEXtDo3FyxgaIaP5Q8nH08+uC1ZjPDSYIxtHtp1IZfdxnq/5IWV/Q5qucBmFvjsP+sbOLNEGTvjsiDPbzzv56D1JOy0pRJ/qrUmWqWJkBO8LiP15D6ORWxBu49cRq2ET4R0jjipmrJYb80frCZbF6wPTpMYwd4yc8gii6UvrBRL6PePLqG6eLoL2FQZTIJssRhxA7c6Xi7xsoeAGDKRMHwU45YZ89hAwB5gztp5uxOwRx6nOAm3/3cODlPTcKyKIzBNBUt4aj545cqG4xPMOc2GGvG96VCJxVxDqVYlpaF3+EULHJsdXNN8Ky+yZzohopDCUxtnAUpZ5Z3/dYdsufwb7dKbEg== +api: eJy1Vk1z2zYQ/SucPXMk29MTT1XbtPGkjd1Y7cWj6UDkikICAgiwtK1o+N8zC5AUGMceubFOooC3+/YTu3sgUXsobuFq7dHdibVUknawyqFCXzppSRoNBfzdottl5ESJPs/uJW0zE+6EympnWit1zee6MvfhcyMVoQufQleZFbXUggVmkIOx6MKfywoK+My6/4u6IQcrnGiQ0LFde9CiQShgY1wjCHKQehCBHBx+bqXDCoqNUB5z8OUWGwHFHlC3DTtmLGpChQ1SEBE1ahLsIe0sa/bEZgJ7vBGtIigGTA4kSTHm98jedXliUNn6F9gj9O5qEzya8rLK/kS3SkG3SmmZI2U1qkL/kjD8H9qrSJLyarw/Pe/7SDKJ8lBGp470yJOyW1HjjxBLTVije5b5mjlSUi+/nJz0hjmm+X04fXYfprn1ZOyJOW+YouMTh94a7dGzqouzM/6ZPnE3bVmi95tWZR96MORQGk2oKRhgrZJleLfmHz3L7J8zz6w/YkkTn27hDp1nuhy8FdpD2nVLVEsnSqnrkT/x7Vl1iZpFeLvemwr9j6tZOnwNNR+MoURNcj8cZnHALOMQ6Lquy+Gni4vHWfpXKFmFHGRvnDPuJSmyjgcPyVgEFZKQir8kYeMfA5QpJ7dHFODYe6tunC/CObFLZsmfJhoIXQ6Nr1nzt5NogP6F3ofnYVD2NDQEI1vybXfg/m6a2K9I3eOSfBzCG6P7tBu/xfB9j2yAvF0urx8pjLltkLaGh3+NFGY+baGAuUm3kPnd+XzcCvh8WAlap6CALZH1xXxeKtNWsziyZ0LOhZXw7foSyzD7laGh/jyWreNNh/Utri/f4e4tigodFLerFHDD1RPrYQobUyGsfIccmf5ZW7S0NU5+iUnu37dtlGLXpd6YID5pkewXUX5CXUE+tlEBZ7Pz2dlTzvQC2eL6sm8CUYYmGOwYlphpuMZAQQ7YhA4AQtH8fLhgK63x1Aid6HvdFXDi0v7Qw69M0+eI8IHmVgkZui4EZN8X3S1Mio7jf86CsfBWOWyNJ4bt92vh8R+nuo6P48Ti8qmkF2uVzKxPuEs31juhWjYiPBRPguM2eQx23AGPAY+L21FWJNvWMfh+PzoG2m81x5n8cKzB/QpxgK74j5OMDZ2cD53HiYoyi7JEmxI8GhqsZXyg/nizhK77Ctk5eac= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Query traces, with optional grouping, windowing, filtering, and pagination."} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/observability/v1/traces"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/observability/v1/traces"}></MethodEndpoint> Query traces, with optional grouping, windowing, filtering, and pagination. -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"format","in":"query","required":false,"schema":{"enum":["opentelemetry","agenta"],"type":"string","default":"agenta","title":"Format"}},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newest"}},{"name":"filtering","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filtering"}},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}},{"name":"stop","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"spans":{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"name":{"type":"string","title":"Name"},"kind":{"default":"SPAN_KIND_UNSPECIFIED","type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"status_code":{"default":"STATUS_CODE_UNSET","type":"string","enum":["STATUS_CODE_OK","STATUS_CODE_ERROR","STATUS_CODE_UNSET"],"title":"OTelStatusCode"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"parent":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},{"type":"null"}]},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["context","name","start_time","end_time"],"title":"OTelSpanDTO"},"type":"array","title":"Spans"}},"type":"object","required":["spans"],"title":"OTelTracingDataResponse"},{"properties":{"nodes":{"anyOf":[{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array"},{"type":"null"}],"title":"Nodes","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaNodesResponse"},{"properties":{"trees":{"anyOf":[{"items":{"properties":{"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["tree","nodes"],"title":"AgentaTreeDTO"},"type":"array"},{"type":"null"}],"title":"Trees","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaTreesResponse"},{"properties":{"roots":{"anyOf":[{"items":{"properties":{"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"trees":{"items":{"properties":{"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"nodes":{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},{"items":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]},"root":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"tree":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"node":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"parent":{"anyOf":[{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},{"type":"null"}]},"time":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"status":{"properties":{"code":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"exception":{"anyOf":[{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"properties":{"type":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"properties":{"context":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":["circular(SpanDTO)",{"items":"circular(SpanDTO)","type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"type":"array","title":"Nodes"}},"type":"object","required":["tree","nodes"],"title":"AgentaTreeDTO"},"type":"array","title":"Trees"}},"type":"object","required":["root","trees"],"title":"AgentaRootDTO"},"type":"array"},{"type":"null"}],"title":"Roots","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaRootsResponse"}],"title":"Response Query Traces"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "format", + in: "query", + required: false, + schema: { + enum: ["opentelemetry", "agenta"], + type: "string", + default: "agenta", + title: "Format", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "focus", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Focus", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "oldest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Oldest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "newest", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Newest", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "filtering", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Filtering", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "page", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Page", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "size", + in: "query", + required: false, + schema: { + anyOf: [{ type: "integer" }, { type: "null" }], + title: "Size", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "next", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Next", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "stop", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Stop", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelTracingResponse"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>spans</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>context</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"kind"} + required={false} + schemaName={"OTelSpanKind (string)"} + qualifierMessage={ + "**Possible values:** [`SPAN_KIND_UNSPECIFIED`, `SPAN_KIND_INTERNAL`, `SPAN_KIND_SERVER`, `SPAN_KIND_CLIENT`, `SPAN_KIND_PRODUCER`, `SPAN_KIND_CONSUMER`]" + } + schema={{ + type: "string", + enum: [ + "SPAN_KIND_UNSPECIFIED", + "SPAN_KIND_INTERNAL", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_PRODUCER", + "SPAN_KIND_CONSUMER", + ], + title: "OTelSpanKind", + default: "SPAN_KIND_UNSPECIFIED", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"start_time"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start Time", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end_time"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End Time", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"status_code"} + required={false} + schemaName={"OTelStatusCode (string)"} + qualifierMessage={ + "**Possible values:** [`STATUS_CODE_OK`, `STATUS_CODE_ERROR`, `STATUS_CODE_UNSET`]" + } + schema={{ + default: "STATUS_CODE_UNSET", + type: "string", + enum: ["STATUS_CODE_OK", "STATUS_CODE_ERROR", "STATUS_CODE_UNSET"], + title: "OTelStatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelContextDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>context</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaNodesResponse"} value={"1-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, `chain`, `task`, + `tool`, `embedding`, `query`, `completion`, `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={"**Possible values:** [`UNSET`, `OK`, `ERROR`]"} + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + context + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaTreesResponse"} value={"2-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>trees</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>nodes</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, `chain`, + `task`, `tool`, `embedding`, `query`, `completion`, + `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={"**Possible values:** [`UNSET`, `OK`, `ERROR`]"} + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + context + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span className={"openapi-schema__required"}> + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"AgentaRootsResponse"} value={"3-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>roots</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>trees</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>nodes</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>root</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>tree</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"TreeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`invocation`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>node</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>type</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"NodeType"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** [`agent`, `workflow`, + `chain`, `task`, `tool`, `embedding`, `query`, + `completion`, `chat`, `rerank`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>parent</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ParentDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>time</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"start"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Start", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"end"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "End", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>status</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"code"} + required={true} + schemaName={"StatusCode (string)"} + qualifierMessage={ + "**Possible values:** [`UNSET`, `OK`, `ERROR`]" + } + schema={{ + type: "string", + enum: ["UNSET", "OK", "ERROR"], + title: "StatusCode", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>exception</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"ExceptionDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"date-time"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "date-time", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Type (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Type", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>message</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>stacktrace</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metrics</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>meta</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>refs</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"TreeType (string)"} + qualifierMessage={"**Possible values:** [`invocation`]"} + schema={{ + type: "string", + enum: ["invocation"], + title: "TreeType", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"uuid"} + qualifierMessage={undefined} + schema={{ + type: "string", + format: "uuid", + title: "Id", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>tree_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>otel</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"OTelExtraDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>kind</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>events</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Name", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"timestamp"} + required={true} + schemaName={"Timestamp (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Timestamp", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>links</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + context + </strong> + <span className={"openapi-schema__name"}> + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + > + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Trace Id", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Span Id", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>attributes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>nodes</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>count</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples responseExample={"{}"} language={"json"}></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-workflow-revisions.api.mdx b/docs/docs/reference/api/query-workflow-revisions.api.mdx index b49fecf28e..574fa117d8 100644 --- a/docs/docs/reference/api/query-workflow-revisions.api.mdx +++ b/docs/docs/reference/api/query-workflow-revisions.api.mdx @@ -5,67 +5,2058 @@ description: "Query Workflow Revisions" sidebar_label: "Query Workflow Revisions" hide_title: true hide_table_of_contents: true -api: eJzNWtty2zYQ/RXNPrUzjOVm+qSnunYycZPGbuy4Dx6NByJXEhLwElzsqB7+ewc3ipREiaQoW08ei7t7Dg6WWGDBZ5BkJmB0D/+m/PuUpU8CxgGkGXIiaZpcRjCCHwr54uHJGTxwfKSCpomAADLCSYwSuY7xDAmJEUZQmNIIAqCJjwEBcPyhKMcIRlPCBAYgwjnGBEbPQJLF1dSEkYtMhxGS02QGAUxTHhMJI1CKRpAHhUWiGIN8HICkkukf/CgGlxHk2nCdkdiHEuGcaB8qMRbaYgfVhlzFZrKCqVkPAjYicaOxalkcUrRmIt0YFhsJPhJOSSJfMdvuLIParFsyPL7sW3LfIe9LZqMnVZ+VZVavn51lvjUy+mXzFdP0i6NQm6cljseXqCX2uyR+yVQtaNXnaoXX6ydrhfEuKR+R678vruadw23E7og0vfOMysTNn8Mq+FlDlDEjFCGnmTz85F2UkMoMpozsl+0NsN8bjDKqPDzo7SpmjJIcGPNvDVHGpEnIVIQPhIdz+oh7FZVJmjIkyVYClxZvcObxKgmOP+ULV7XPGrLK4QlFzywiIvGNpPrV2krFIJfJpCx6JTJXFrlMhtGY7sWFJhJnyLfifjIgFQ14hLwTLCYq1odSIkJMIiuDXs/cPxq18YtzZVjk+ieOIksTgWaVf3t6qv+Ul8kR3KgwRCGmig2+OGMIIEwTiYk0HLOM0dCcjYffhPZ5Lo0g4/rkLKlFCFNlnVZUXHI7NxZ6bFOimITRaR6sVzkTrKhOVYxNh6BDnm4C6B+oGr/cPDhEVyAAwiWdkrDPIZy5kB5ByXnKewtuo+WBWQF6XSwudMA8gBiFILOtsbcXJ+ueB67oV+JUM5aKh1AJmcbdK5EYnNsIeaDD4SNhisgawRtGfFcEsUHnKibJPgE/mAB5XqxV6eQbhhLW09LtYdbCmXmRK0sjiSKqVx/CriuyNpi2jat4PKn+Uh7dZiwIKQ8VI/yX94qxv0SavLlSMlPyV1gdqw7iFq4mXnYnvnW7V/WFNXV3b6EC1/I8VlE/p5+okDtlrd2LrLq308hubQNXwvc5igTV0trD0SKAkCORGD0Q2esqeG7DDs6MWCqLDgHy1YZ1IBEyPADIhQ3rQLxck0WPpc6L9efCFTuvV68oXq0CxQvWK4qXq0Dx3Y6O6Vo0LQIwLaiOYWwnKYD+Buo0JKvVpFqa+xu94rRrlK+c2gisewSmI8yRROZiqt1KfyhJji8htmxNvuAUOSZhZbXxRMetKsoHNw25P+o1nZEjqslHudFpMQc3Tni9oyRZRpOmG6BVidvstjyQmXhdxDtnv/XOq9fNx7p/O8pcqXe+XkqqJwr5Iw2xibqSK2yVgy50bvopUzpT9hODQ2CdVwCanMF8//6CmDPC2lGsRYiS/v5qofa6QJSbP/etYETRoMpz7ff727fr/aw7wmhkVBi84zzl3ZtZEUpC2ZZOFEvDytM27964XrJPaUj89j8Ws02XiRu6ENak3tSIMbjVTzdpvmxS3ptxWWhnV+lceXmtuvXDuLDybZvgD7e312sB7dxWJ/Uf3UodbMylGOU81d/sZKnpPmdEzmEEw0z3EvFp6JtrYlg0F4e+M6vfff8hj9l9wVzKTIyGw5ClKjohM0wkOSF0SDJqXjeBoeJULozL2fXlR1zYam9yuWRg6o9Nk6rZ8hIuox9Rs3C9Y9vzov+R8v2V3dEZEWkyTY2775EZcoOz60so7eLh9OS3k1NYFbBirN8HEpr3wWObxxCsqFCMHwLA2LwMIJHEfywfaGZaedc6cvG2zNfKEdmJIfGnHGaM0KS0E7ZTeQ9uKmHZKRUmY5dB7YSOA5jrJBjdw/PzhAj8ylme65/tcz1nERVkwkrN+O+4WPt+SzfGNCvz5u72EG1d3GV9a5/WQJXvhDp6dgbtMsrVb1xaOVe/N+nq2h22y4DXPpTo5r38ZmEv/6YE3O1+E9PqpXwTD3+J3sRWNjd1N9ZNTDdcNDdSxV4JNzN1N7dNjIub1SbG/uazUWB3Xbm0HbvbrokuMffjoqdg1k7rdBaGmJUR1vZUOkpRlq+vbm4hz/8HL//mnw== +api: eJzNWNty2zYQ/RXOPrUziOV6+sSnKnYzcdLEbuy4D4pGsyKXEmLwEgCUq2r47x3caOouO3LTJ49F7NmzZxeLBRagcaIgHsBfpbzPRPmgYMigrEii5mVxmUIM32qS89GDXzCSNOOKl4UCBhVKzEmTNBgLKDAniGGGkmOhR5IyYMCLgAEMJH2ruaQU4gyFIgYqmVKOEC8Ai/lVZmH0vDIwSkteTKBh7S9FLQQ0QwYpqUTyylCEGN7dXH2M3OqozCJJGYvoZHISLb7APc2/QBzNUNTUAAPNtTBQd45j9IkyaJ4PaMj5qIMu/+uwP3mSLxF3ThpT1Pgjgg++n6DAh0B3nwz7sDdpkQmzr36AENbxE1R4Y4nuk2Anaid+XiSiTmmEMpnyGaXfo8C4LAVhsVGCEMal8xf1g7/GfJWkqrJQpAzu2emp+bMc3k2dJKRUVovok18MDJKy0FRoy6aqBE9sD+x9VcZm0eFaSdMhNXcekrJ2Rp4lLzRNSHbUPrcrGgaPvTNeANeUq3U4rPW0lLuKgkFWyhw1xFDXPN2pUN+hmQSjpgNRzdJXmue0E/rCADYMclIKJzuxd8F88OYN81X0PJiPaOkuJ/p5UBcdiIZBIgk1pSPUR5Xv3MFGfVsZdZW+hJPPDtY7SUnQCzi5cLDeSZBrPB/x9FhlHMR6PY8u065eR/US1Gq9BMGO6iXI1XqZkVTfUa533rxhoEQ9eS7MjbFtGBwvUBedOwo3QZbjr5ToTp8MQ2g4lFahbbPxp/YSIKYpN9sVxfVyL92vQ+jWS97y8fIv3bNosy9IuExqgfKnN7UQ71RZvLqqdVXrn018S/EaEN/7D7FCKXG+U+cVWyP6usft7bczBq0Juy9TF85yQ6JQap5hoo+4cfoe0m+b4OEwxsF4M9twZTke2XDB8Fvc/fc0cT3EJsZrKV63DiNepxxcKa1PgWZSTSnDWmiIBxvRHye3gR94httdqnaoahoD9uvZ2foMdoeCp3bCin6XspTPH8BS0sjFjpFKlMnS16e0heF2+f4oHUE7BKlJZwRs62XDkOOWbF9qxYhuzdd9iTBxOdd+3VL9BXmdutvDuHDy7aqpt7e312uALrfLSf3TDPpRqIeoW2A56Wlp3hOqUmn7dqCnEEOvMkMxPfTGqKgXXhlUrx2Ve+HyoEjOwktDLQXEMNW6UnGvl4iyTk9wQoXGE+Q9rDisMuvbr9G5WWo3qqKkllzPLV7/+vI9zd8SpiTtFugsuDFl5wppeVmbQ6z4ezIU/TXIDd38H1cd/g40dVZGM15kpTUPvclxe43JPRXm0tROBHB68svJ6bZgvEHUv770u8e3w8DDLgO2IlcrFDCg3G4d0IT5b48fDEuTpxyLDt6O7K6M3V4YTX/rXiWQ2z1iWSx84gfgEw8MTOqBQZt86N6UmL89DhlMTeXEA1gsjMVnKZrG/Oy+mzSmXOFYdO6XK7TaBvO0x5NNwdzTfO2py1pADLaR/OdcVh6gjkPmgIeVAxh1noaOQ2vfM8cBnMITzW5CzmjDu8aj2dAf72OzlwfmvJiGPrLw9v0koUp3rNaON4PSdsjrq5tbaJp/Ac1vXHs= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Workflow Revisions"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/revisions/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflow Revisions"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/query"}></MethodEndpoint> Query Workflow Revisions -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revisions":{"items":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"type":"array","title":"Workflow Revisions","default":[]}},"type":"object","title":"WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Variant Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Revision Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Revision Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Revision Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>revisions</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "revisions": [\n {\n "author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "date": "2025-05-15T13:01:54.552Z",\n "message": "string",\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.552Z",\n "updated_at": "2025-05-15T13:01:54.552Z",\n "deleted_at": "2025-05-15T13:01:54.552Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": "string",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "data": {},\n "artifact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "artifact": {},\n "variant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "variant": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-workflow-variants.api.mdx b/docs/docs/reference/api/query-workflow-variants.api.mdx index 5a4cebfa85..37d8f158a6 100644 --- a/docs/docs/reference/api/query-workflow-variants.api.mdx +++ b/docs/docs/reference/api/query-workflow-variants.api.mdx @@ -5,67 +5,1088 @@ description: "Query Workflow Variants" sidebar_label: "Query Workflow Variants" hide_title: true hide_table_of_contents: true -api: eJzNWdty2zYQ/RXNPrUzjOV6+qSnqnYyduPGbu2kDxqNByJXEhKQYHCxo2j4750FQInUlbrFefJY2t1zcLDALlZTMGykodOD/6T6MhTyRUM/ApmjYobL7CaBDny1qCZPL8Hg6ZkpzjKjIYKcKZaiQUUhppCxFKEDM0ueQAQ8K0NABAq/Wq4wgc6QCY0R6HiMKYPOFFg2uRu6MGaSUxhtFM9GEMFQqpQZ6IC1PIEimllkVggo+hEYbgR9UC6idZNAQYbLjPQhlJhSjHy4wVSTxRaqDbnq1WS1sKMjCNiIxANhrWVxStGaifTgWKwkGPLxFbPtk2ewNuvmDH++7Jtz3yLvj8zGktT6rKyyev3srPKty+j+nFa1DwRRxUxQx4rndH+fGPqqglRlMBTssF1pgP3OYVRRzelBHxcxUzTsxJh/E0QVk2exsAk+MRWP+TMedO0NpBTIso0Ebjxeq1vi1RIcv5kffO9+IMg6hxfUR2aRMINvDKejtZGKQ66SkSJ5JTJ3HrlKRvCUH8SFZwZHqDbi3jqQmgYqQbUXLGY2pXaU6RizxMtA91n4h1AbH5w7x6KgjxTqXGYa3Q1/cX5Of6rXZAcebByj1kMrWv8GY4gglpnBzDiOeS547Lri9mdNPtPKCnJFPbPhHiGW1jstqDjnduksaG1DZoWBznkRLVU3F2tWmOoQ1Sb7FN1zBEwZPmSxOSJCN4QMCL5M1GLXF8n1U2y1ken+d5duXfoIRUTh8JkJy4xUh0R8Owvig45tyrJDAl67AEUxy245+IyxgeW9CVVvKVwR+VJUI8GShFO+MnFfk7VBFVp57tNB/ZPq6lZjQcxVbAVTv7yzQvylZfbmzprcml9hca0UJOR6Ey/ft21sEOq+sKTu9qIbhefxzyrqB3nLtdkq69rqtei+m0a+GYrCpX9I8xrVL+MjNKMRxAqZweSJmaMW2UsfttV1Ytk8OQXIRx82gCQo8AQgVz5sACnlGkyOeN+XYv05CTd+qddRUUq1ZiilYEdFKeWaobgH8Z656h+2ERyPnp89bK0f4aVaOejlA3jdo1ZXu5RefwcQPWukioLcfr+4WO67PjHBE9dVtd4qJdX+TVeChnGxoWUSMq59u8uN3V8v2K30BEnTVI9WDWbmVUVrNsK5+utNnRitR/p2leTzZrrn1uWhg10lLebyenXXL+PKy7dpf68fH++XAvq9rW/qP9Tyt1ZlUopmLGmonEv3SMqZGUMH2rnCZ44v7bKt1e2yB26X7weN6rmcNFsloANjY3LdabdjIW1yxkaYGXbGeJvl3J0NjbFV3EycS/f+5j1OrpHRo4ASuWLwQCnlk6RuNh8T5fw9EovwwulaM5aKf2fVKcvYe5EePBtK5152vo5cq3t/AxHQMrxQ52e/nZ3Donw1YzoNLHanocR2X0O0oMJs/RABpu4ogEGW/jH/gpiR8KFdDfHW79ZCVQ5aGPxm2rlg3KW8IzENG9mDsJEwf81QoMpvBn47+xGMKQM6PZhOB0zjRyWKgj7239OOJVyzgag8GL/gZOnnBWrFiZQ7tds99K4uYey5s8/OQLUx9p6ee4Pus8rFEWwT5zAObWJan2I28Sinjk1sTXPTMOJrYrpiMtdIFT9Da2YaRl1NjGejqCbG5aioUeAw35nb9sMZH9Bt16NqOS5v2mlw6sYx5lWEpeJOUWYF4v7u4RGK4n/c98CQ +api: eJzVWE1vGzcQ/SuLOTXARnKNnvZUxU4QJ23sRk56UASDImclxtzlhuTaVYX97wW/1qtv2ZFh9CRA5Lx582Y4Q+4CDJlqyEbwt1S3uZD3GsYpyAoVMVyWFwwy+FGjmt/chw03d0RxUhoNKVREkQINKguxgJIUCBm0OxXmkAIvIwakoPBHzRUyyHIiNKag6QwLAtkCSDm/zB2OmVcWRxvFyyk0aftPWQsBzTgFhpoqXlmKkMGH4eWnxO9OZJ4ozFFhSTFNsDftJYtvcIvzb5Ald0TU2EAKhhthAWPUyWfMoflZXMs0aBBE+h9I8NUzfTYFCjSEEUNeQobo+3AV/oxs90mxD3qDErmwZ+0FZHCOD9fgneO5T4CdoJ3oeUlFzfCGKDrjd8h+RoCJlAJJuVGBGMWF95cMor/GrirUlSw1aot7enJif5bDG9aUotZ5LZLPYTOkQGVpsDSOTVUJTl1b7H/X1mbR4Vop2zQN9x6orL1RYMlLg1NUHbHP3I4mhbadZgvgBgu9juaVfFxBRD+frO1qLp8Gdd6BaFKgColBdkPMLsAUcqkKuwcYMfjacMdnu5czD5sMnDp1xZ7DyRcPG5wwFPgMTs49bHAS5ZrMbzg70E9dc3aQWG/myQXr6nVUL1Gt1ksU7KheolytFy3q6VNrdWhtmxSOR89z8j18E6ScfEdqNtwtYjtdhW5SaGfjEiBhjNtDRsTVUhs4QIfYZ5a8FZPlf7pddLMvoFzRWhD1y7taiA9alq8va1PV5pWNbyleCxLa1iFWRCky36nziq0Vfd3jNuPu+CbK8JxQc8QSHQTIUKDRw+PqIYJsKom1YNfNw5Tu6OI1XZvj9qrBMCe1MJCNNmI/zN5RGFnjrQ51OxWbxmL9dnq6PkS/EsGZG5HJW6WkevoEZWgIFzuGopB0afUxp2O8Xbw/pCdo9S30tDPD23p5KDatyRQfMrF9qxMjubar+/Jg4/Kuw75xN7NRXq/u9jDOvXy7Cur99fXVGqDP7XJS/7I3taR9KnXKq0Azk/aJWElt3HvQzCCDfqXwjuN9f0I09uNzUPfjVacf734a1V18PNZKQAYzYyqd9ftUyJr1yBRLQ3qE90nFYZXXwK0mZ3arO6Yaaa24mTu8wdXFR5y/R8JQufrvbBjaovNltLytzSCp+Ee0FMMtdlCbmVT8X18b4Qo781ZWMV7m0pnHTuG5vSH0Fkt757VxetonvV97J9uCCQbJ4OoinJ3QXyIPtw3SFblaoSAFLNzBAYOk+P1hwbK0aSpI2cHbntuVC2PQxeA/pl8Jwt0BcSQWIe0jCGmHFGziIW2/BFi8zmcDn/5xCjNbNtkIFgtr8EWJprF/+3WbRMY1mYjO42CFVdtcnvIA3hTRLc7Xv2A4E8jA9ZIXorT8QeE4jA54Hu8n1HnfH4fVvtfqfkrxob2bj7fZ8Dx9MBuHsp3YMz2yU2MW+8ki2A8oxcp0rNaGnEVpG+XV5fAamuY/7/+j2A== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Workflow Variants"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/variants/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflow Variants"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/variants/query"}></MethodEndpoint> Query Workflow Variants -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variants":{"items":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"type":"array","title":"Workflow Variants","default":[]}},"type":"object","title":"WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of reference, e.g. {"key": value}', + title: "Workflow Ref", + }, + description: 'JSON string of reference, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of reference, e.g. {"key": value}', + title: "Variant Ref", + }, + description: 'JSON string of reference, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Variant Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Variant Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>variants</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "variants": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.416Z",\n "updated_at": "2025-05-15T13:01:54.416Z",\n "deleted_at": "2025-05-15T13:01:54.416Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {},\n "artifact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "artifact": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/query-workflows.api.mdx b/docs/docs/reference/api/query-workflows.api.mdx index bdde9cac84..0e7e52b155 100644 --- a/docs/docs/reference/api/query-workflows.api.mdx +++ b/docs/docs/reference/api/query-workflows.api.mdx @@ -5,67 +5,664 @@ description: "Query Workflows" sidebar_label: "Query Workflows" hide_title: true hide_table_of_contents: true -api: eJzNWE1v4zYQ/SvGnFqAG6dBTzrVTXaRdNMkbbLtITACWhrb3KVELT+S9Rr678WQ+rQdR4nttifD0sy8x8fRcDhLsHxmILqHv5X+MpXqycCYgcpRcytUdpFABF8d6sXDU23AIOeap2hRk+sSMp4iRFBZPIgEGIiscgUGGr86oTGBaMqlQQYmnmPKIVoCzxbXUx/GLnIKY6wW2QwYTJVOuYUInBMJFKy2yJyUUIwZWGElPajIDy4SKMhwnZHZhRLXmpOPsJgasniBak+uZjNZI91sDwL2InFLWM+yOKRo/US69SzaBP3PYdW5Iog2ZoIm1iKnL+LA0GctpDaDqeS77UYP7A8eo41qDw96t4qZouUHxvydINqYIoulS/CB63guHnGn8jVRSiLPthK4CHiDUYXXSXD8Zv/l+nlFkF0OT2j2zCLhFt9ZQZ/WVioeuU1GyeQ/InMdkNtkpEjFTlxEZnGGeivupQfpaKAT1G+CxcyldMBzE2OWBBmonpV/CLX3h3PtWRT0SKPJVWbQV/aT42P6aZfJCG5dHKMxUycHf5bGwCBWmcXMeo55LkXs+4zhZ0M+y9YKck1diBUBIVYuOK2o2HA79Ra0til30kJ0XDBompZo2RxE3dChtHY06xoI8xA7Y1X69u/dDE5DhIJROHzk0nGr9C4R39dBQtC5S3m2S8BzH6Ao6oxQk88YW1g/lsuTYi1cwUL57pDgSSJoj7m86cjao3Jv/FbSSfdJe3WbsSAWOnaS6x8+OCl/Myp7d+1s7uyPsLpWClLmSR+v0ONsPVS7vrCm7ssHFSub9P+rqFfqUhj7oqzPVvxV99dpFBoIVhbKXRo+1i1ge2jgGMQaucXkgdu9HkynIexg5MVyeXIIkE8hbAmSoMQDgJyFsCVIJddkQZfIPXU3lVi/Lvz9sNFrryiVWjVKJdheUSq5ahR/WXxjrobLH4P90Qv37xfPj9YXXt0SV01M+yi/H/eJauo2oyjI/ueTk/Wu5C8uReJ7jsF7rZV+e0uSoOVCbmkspIo7b19Tm8fPK3SpAkESMTWzTeOI5vwwhs+wkft5Uy/G4I7ebtK6aTXv/boCdGnXSoBG3qDu88s4C/Jt29jzu7ubtYBhb7ub+gc1xIN26qRo54qGV7nyV4ec2zlEMMw1Pgp8GtaN4bBqpg3qx2qg5bSECObW5iYaDmOpXHLEZ5hZfsTFkOfCJ73B2GlhF95ldHPxERfnyKlDpoRtGdxSBoWc6Jo1s5JcfERiUbb7I2fnSovvvD1ymAcvWr7Ipsq7l0qNPLnB6OYCGNAygi7HRz8dHcOqWh1jSn4e++SvsP1rYCsq1OsHBpj6zAeLPP2leUHMSO+yDy3jrW/OyjFbamDxmx3mkguf2R58We7bPZT7Bu2WnpUXoTGDOe1ydA/L5YQb/KRlUdDj8J62JxGGT2TrqvQFF2sjS2qoiYn/Il/2MK91KQd7r/bpC1SOxvqYdidafTyqCVQfW9vftBz39DHdMKXppUqYp/QzLccefYzrsUQf42ps0CtweddvbMf0Rwsy9rWFVbWAUjs4jeIY8zbC2lFGUeqyeHN9ewdF8Q9NJSOj +api: eJzFV01z2zYQ/SucPbUziOR6euKpit1MnLSxGzntwdF4IGIpIQYJBh92VA3/e2cBkqI+LbvO5OSxuPv27Vtgd7EEx2cW0hv4R5u7XOkHCxMGukLDndTlhYAUvno0i9uHzoBBxQ0v0KEh1yWUvEBIobW4NZgDA1m2vsDA4FcvDQpIc64sMrDZHAsO6RJ4ubjMA45bVIRjnZHlDGrW/VJ6paCeMBBoMyMrogYpvBtffkiidaLzxGDOEhzMBsnyM9zh4jOkyT1XHmtg4KRTBNXmmXzEHOrnIxK7zbxzRWL+gMxD4Cfk/iYQfSz7g6i78i/QccEd/xEStLGfoMKfLd3HhHgMu6eFLDPlBd5yk83lPYr/I8VUa4W83KlFm8xFjJeM2ng1fTVoK11atIR7enJCf9YzHPssQ2tzr5KPjTEwyHTpsHSBTVUpmYUmMPxiyWfZ41oZahFOxgiZ9tGpYSlLhzM0Pc3PgkXNYNVF0iVIh4XdhotSPu1stIE+kO9mPZ8Hdd6DqBlkBrlDccvdIUAGuTYF2YDgDl85Gfjsj3IWYZNRkMdX4nsE+RRhmyACFX6HIOcRtgnSyjVd3EpxZBzvpThKrNeL5EL09XrRKK1aXZRWsBeN0srVRbHKz557VsfkWzN4OXqRU5xouyD19AtmbkdbbWfLJnTNoJsPa4BcCEmXjKurtTZwhA5to1mLVkzXf+m30d2xIJMm84qbn954pd5ZXb669K7y7mfKby1fAmna1jFe3Bi+OKjzhi+Jvh1xn/Nqgm25bRdmZJzMedYPEeltm9ISIzDnXjlIbya70FeD7Kbp/5MdON1sqWsC+fX0dHsU/c2VFGHQJL8bo83z55BAx6U6MFmUzta+PuWITfbL9oeOBEnZws56k7C7eKuKWctnuKrBftMgRnJNXx8rAOUVQzd2vVqs5I3q7k/jPMp36Cy9vb6+2gKMtV0v6l+07yT981Sgm2t6TlTauvCGcHNIYVgZvJf4MJxyi8NuPRi2C5NFc9++M7xRkMLcucqmw2GmtBcDPsPS8QGXQ15J2KQxCl+TMzINN8di5o10i4A3urp4j4u3yAWacM57BmM6Y/HUrJt1BeOVfI9EsVn9Rt7NtZH/xqPQ7H3z6EUCyTLXwb3RsuH2mmd3WNKiSHlG2ieDXwYn+5JpHJLR1UVzVehSd3tTYwZsQ65OKGCARbgn4JAXv60+EEuqTsHLHt52KTeWq0YPh9/csFJchnsQgi+bKt9AU2VgQHWG/iLImuV4wmBORyO9geWSrD4ZVdf0c/xOFRPS8qnqrc8bVLrG8bS34a4E7nCx/aYNLpBC6BDPJvPYc+0IOu1T82UIHfF4OoJT7/l3mFb02/FUWrlN6B8jyS/cTNbeJDoF0X+UZVi5ntfWqCCUru1cXY6voa7/A4+BxtU= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Query Workflows"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/query"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Query Workflows"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/query"}></MethodEndpoint> Query Workflows -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflows":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"type":"array","title":"Workflows","default":[]}},"type":"object","title":"WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_ref", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of ref, e.g. {"key": value}', + title: "Workflow Ref", + }, + description: 'JSON string of ref, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_flags", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of flags, e.g. {"key": value}', + title: "Workflow Flags", + }, + description: 'JSON string of flags, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workflow_metadata", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + description: 'JSON string of metadata, e.g. {"key": value}', + title: "Workflow Metadata", + }, + description: 'JSON string of metadata, e.g. {"key": value}', + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "include_archived", + in: "query", + required: false, + schema: { + anyOf: [{ type: "boolean" }, { type: "null" }], + title: "Include Archived", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>workflows</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "count": 0,\n "workflows": [\n {\n "name": "string",\n "description": "string",\n "created_at": "2025-05-15T13:01:54.368Z",\n "updated_at": "2025-05-15T13:01:54.368Z",\n "deleted_at": "2025-05-15T13:01:54.368Z",\n "created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "deleted_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "slug": "string",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "flags": {},\n "metadata": {}\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/read-secret.api.mdx b/docs/docs/reference/api/read-secret.api.mdx index 211f3d0419..fee9af32d6 100644 --- a/docs/docs/reference/api/read-secret.api.mdx +++ b/docs/docs/reference/api/read-secret.api.mdx @@ -5,67 +5,761 @@ description: "Read Secret" sidebar_label: "Read Secret" hide_title: true hide_table_of_contents: true -api: eJzNV01P40gQ/StRnXYliwDaU07LDmgWATsImLlEUVS4K3EP7Q+6yxGeyP99Vd12Yifggcxh95S4P15XvVddXbUGxqWDyRTuKbbEDmYR5AVZZJ1nlwomYAnV3PlZiKBAiykxWdm0hgxTggmE6blWEIHOYAIFcgIRWHoutSUFE7YlReDihFKEyRq4KvxGtjpbQgSs2chAMGN0qaCuZwLgijxz5GTP6fGx/ChysdWFGCgbyjgm5xalGd01iyGCOM+YMpblWBRGx96f8Xcne9YdOwor3rIOJzzpTL1mHWVlKiQVNl9pRXb+RJWcUjrO03k7Ktz1/bgSvDoChexPw6z6svDEfezcvKAMtfcrISsOYla5GI38VUSFzhYWZdhQkaApEvlY2vwZIki1Y4vG78eME5sXOhYpyRaGXjRXforzJXFCdu6/5ESbl0xWgCjVme65x5gptOq2cb11dEPFPrVUDel+RRXUddTO54/fKeZeBE09xIAN98Sss6U7f/jycyixt2PuAKyHiz6qWAgNYfxH6QV7JGXz+AkicLikFJ88syuyTC9byv9XIn/yPrxf4tKafpD3yRESm5GsNAbqzlFfrRHsFVmnwxU9BOVbs72O2nA7BMWHYgT0whZdHwSV0pJI0Nx2PA+5rR9uQwdcBOTXYvR16nuRHUGaKzLeMs2Uun0hnCmXg0lW5v8rF7vX0Bu6F3E34t+Ozw0KWotVx5ObQEUnLOet84dI3xI+ahnyVEu232FpQ/wudt/QobO86aMrgf5ottqEwJuX1bPWmT2XB6iOQKshaiJY5DZFhgmUpVaD5l/6ZJAQvpoKQl1wmAj/yF55NLvv/GFQ5x2Ioev2d3CjjsDoBcVVbGjouY4tIZOaIx9q2KeAMDqTawRloX4R72tA2MF7rObDgr8H8q9qFLTeov465KAa17TEuLpulWgf4D7qO++Mr7w2cbpXoLUlY6gZBPOP09P9IvMbGq18CTm6sDa3h1eYihi1GcjdJo97s+/gWWdMSwnf2duJ8joPBvqk5gZfhxtyUqJsk9nbSz0ZoweZ/Zke4lc4ulnXfbc39AZ233bjPNA3eJcfHm73AIO2fVHvCNXovm1sUuIkl35n2fQ5nMAExissDY9XJ+PQ4rjxetPr1FLLkV21vZAvfyBhLtxkPI5NXqojXFLGeIR6jIX2d8FRXFrNld9ydnt5RVWTfSbTWXfBvURQiIn+so0cWOgr34c0XdhZyUlu9Y8gdNOJNZEv7utskfvtDVNn3rjR2e0ldEovOD46OTqGXbZ6iyX4MeZtpm+mIdphYeO/lMapj3xgwvTP7YRYVuSOU8w6eH1xdp6Cxn+mFx4XBrWP6qb6DMJNwQsnfp14mUJzG8Fk26rOIkhyx7J4vX5ER1+tqWsZfi7JikCzCFZoNT4KXdM1KO3kv4LJAo2jPbs2OQF+u2tC//cRRK/b24qYiYIrNKV8QVO5djpqf6vbd3baNFJwFsdUcGfnXhKSWNoE9eeLB6jrfwEzb2/I +api: eJydVk1v20YQ/SvCnFpgYdpGTjxVjYNUcNMYtpqLIBhj7kjaeMlldodCVYL/vZjlSqJM2UlzEsWdjzfvzcyyBcZ1gHwBX7CxDEsFriaPbFw105CDJ9SPgQpPDApq9FgSkxeXFiosCXLojx+NBgWmghxq5A0o8PStMZ405OwbUhCKDZUIeQu8q6Mje1OtQQEbtvLiIUaazDR03VIChNpVgYL4XF9eyo+mUHhTC0BxaIqCQlg1dnKfjEFB4SqmisUc69qaItaTfQ3i0w5w1F6qZdNneDaVPoeOqqYUimrvtkaTf3ymnWRpArvycf9WuDut41bidQo0csyG1e7zKhKXMrinr1TwCVOLHoWCs2EZK41e36Wzm/ln6NT/C6egdJpsGMZ9Hys5iTo4vRH4nQKjzxZxoGnlfIkMOTSN0UNcVWPtScRZpGVDKIBGMvRd9XqmtyL/Jb5C+bBLfi7UzSBE16kRyXu7P/oyOgXWrKjYFfY8+pHjn3vzFzImJOdynhE2NteBzFEP7qci5ugk5rvr6/EcfUFrdJySyQfvnf/5IdLEaKw8GaYyjA2sK05Of0AbUzGthePlkRP0HndDNl0PUIQow/qtLfOJQsB17JPe5HXTSMZkLqff00Pq6lMnu4EWR3p7dl8v46an782Gm8/vRgF7bU9FvSfUk4f97i6JN05W+jqtct5ADtlW9n62vcr6LR6y9rDOO1AQyG/3677xFnLYMNchz7LCukZf4Joqxgs0GdYGXiKYxtPJezGNwxWoaLzhXYw3vZvd0i7NT75YDg0epL36hjk1O2iFtbmNezjdQtOGN86bf/suSDdRGgvhxlQrF90TjQnb71g8U5wkqbOHfXlxdXH5WjHJYTK9m6UpwYKPeyuZgXpB14EouVDKOCLAhOVvxwNBWbvAJVaDeKcqvlhsiQumfzirLZrY/jFxmxReQFRY6ruKekaVQUF+vLaXCjYusBi37RMG+tvbrpPX3xryItZSwRa9wSehbtGCNkGeNeQrtIFGuA7LA365TzPy6wTUebx7QStRc4u2kX+gQK7Z4ddFHP/9rbFo0/m0KKjmgedoW0lfHbr/44c5dN1/GvQKkw== sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Read Secret"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/vault/v1/secrets/{secret_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Read Secret"}></Heading> +<MethodEndpoint method={"get"} path={"/vault/v1/secrets/{secret_id}"}></MethodEndpoint> Read Secret -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "secret_id", + in: "path", + required: true, + schema: { type: "string", title: "Secret Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Key", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Slug", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>header</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "kind": "provider_key",\n "data": {},\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "header": {\n "name": "string",\n "description": "string"\n },\n "lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/refresh-metrics-preview-evaluations-metrics-refresh-post.api.mdx b/docs/docs/reference/api/refresh-metrics-preview-evaluations-metrics-refresh-post.api.mdx deleted file mode 100644 index 62e5c3cd78..0000000000 --- a/docs/docs/reference/api/refresh-metrics-preview-evaluations-metrics-refresh-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: refresh-metrics-preview-evaluations-metrics-refresh-post -title: "Refresh Metrics" -description: "Refresh Metrics" -sidebar_label: "Refresh Metrics" -hide_title: true -hide_table_of_contents: true -api: eJztWEtz20YM/isanJIZxlI9PfFUNU4mapLaYyu5aDQeiISkTZdLeh9uVQ3/ewa7fEqyYjtyTz1ptATwYT8ABMAtWFwZiGfw7h6lQytyZWAeQV6Q9v8mKcSgaanJrG8zslok5rbQdC/o71tqlZpntWyRGwsRFKgxI0uaUbagMCM26NStSCECoSCGO0d6AxFounNCUwqx1Y4iMMmaMoR4C3ZTsJqxWqgVRLDMdYYWYnDOm7HCSha4dmowSaEsowbKJKRQi/wo3hKl6QGi2lwuvcfHoRmoklBOSijnrTM3FfKuR1ZkZCxmxWn9SdHSG7Z91KlpA951SShL+h7lz3jENlakj6JPapySTzWZIleGDNs7H434JyWTaFFwTjGFLknImKWTg+tKGCJIcmVJWe9FUUiR+BQcfjOss+34WGjOYysCQpK7oLTjcOveWy8RQUpLdNJCPCojqBKbFYWlzOwbXkpfRF1OME0FO4Xyqie6x9oizyWh6rJWhbacl1F9lC++UWKPUvveOxH8xWc6UyNHx4OaLfon3TscxoJE6MRJ1K/eOyn/MLl6c+ls4exrOHTHiufHaKHWuDlOTF8XnsTqZyaTNZ4f4f+A1D/zT8LYH9L60CX31J/G0bRKvEQTWkpv0Z70jfU2mB2MvVuuSF8C5EswW4GkJOkFQC6C2Qqkpmux4dZ0op5Tk/X7xnedlq+TotRsNSg1YSdFqelqUE5nOti7J21E6BmPqNo9I18r9TICY9G6o+UfASmX8aRVkErDyZ0jRzyVaKdUODKh4fFlUEinud2R1rnmowRVQlJSCh0v2sHtJjhxyOWmoTXoHDT8v1GcrFFcYGgUzST18yNS1JkUX2gEjHrj8UvMvVE96z9rit8JQHcgndWGD9bC52poK3fi3+vsXqJTHLP5IcgHjTcTaVmy3q/n5/sD7FeUIvVKg3dcxs+fXlOyKOSRKVTmSe/pU4p2/jBPn/LgoB8tzepQHFtKjcEVtaQ/LOrJGEz56Y/CzPcK0JVc9xXc0BvYffgaF4G+YwH+MJ1e7RkMse0H9TqsuIM2hTKy65w35WbrtWuIYVgtysPOojys9olhtSjzS5/0fb0gOy0hhrW1hYmHw0TmLj3DFSmLZyiGWAhfaoYSp4XdeJXx1eQjbT4QpqR9EncEbjibQn70xZrQYCE+EjNVrYJjZ9e5Fv+GoFf74Dpolf4Ft8y9esXa2Ds3GF9NoNNRYXT2y9kIdpnrCXMhYOILocb2jyHaYaG5PzfDzFcBWMLst/YBe8bcZ6g69vYD1XOn4cDSP3ZYSBQ+yz34torhDKoYMnbnG0m7F0b15xFOzDXHP57BdrtAQ1+0LEs+Dvs0BysVBheys1HveNS8HeDVdVUErwdtF+t7+hdtuh9T2D0W8iW+BxSE+59DHqPR/VzxGPnOt4RWfM5/tGB5n6JRnVLMSdAbJwkVtqO193ZkK02lXV3eTKEsvwPl8Gne -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Refresh Metrics"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluations/metrics/refresh"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Refresh Metrics - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"scenario_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},{"name":"timestamp","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/refresh-runs-admin-evaluations-runs-refresh-post.api.mdx b/docs/docs/reference/api/refresh-runs-admin-evaluations-runs-refresh-post.api.mdx deleted file mode 100644 index a8c9e1b29c..0000000000 --- a/docs/docs/reference/api/refresh-runs-admin-evaluations-runs-refresh-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: refresh-runs-admin-evaluations-runs-refresh-post -title: "Refresh Runs" -description: "Refresh Runs" -sidebar_label: "Refresh Runs" -hide_title: true -hide_table_of_contents: true -api: eJylVMtu2zAQ/BVjz6zlBEUPOtVAAsRIixiJ24thBBtpLTElKYWkgrgG/71YUvIzQVH0ZIvcx3BmZ7fgsXKQL+H6FVWHXjbGgYBpqaWBlYCmJRtPZyXkYGltydWPtjPuETnmkfZ56XiIaRvnQUCLFjV5stxlCwY1QQ7eyqoi+yiNJ/uKCgRIAzm8dGQ3IMDSSyctlZCvUTkS4IqaNEK+BTSbu3Ws5Tct1+IaFVkQoPFN6k5D/mUiQEuTPi6C2MWaTikIKwElrbFTHvILAV56xZeLBGo0G0AFzjxBXKInLzX9D2LnrTQVCFg3VqOHHLjqp1j2PbCnAK8GDIFvLbm2MY4c97qcTPinJFdY2bIskMNDVxTk3LpTo/s+GAQUjfFkfETYtkoWUcXs2XHOdo8/hBAEfL68PC/8E5UsY9ro2trG/kNVaC3PlpcJd0kepeJ/0pN25wGqKY5uPyL1gL9hMMIqiOEMrUWWa6D0W5MAQhCgXcWVT0UaQr+Tc1ixQn3Ix6GRjNGCb8O+d/P0TIU/mpVlfFdq3ccd6L2nN7H78TOuEn3vNRtCbhaL+VnBpO2xqPfJwKP7Lq4CTb5u2Pw7Q/sacsii/bMD+2ds/6y3PwhwZF8H23dWQQ61963Ls6xQTVeOsSLjcYwyw1bGOXdUdFb6TUyZzme3tLkhLMlCvlwdBjzwFKW5OA7bSYKtvCVmqLfvtPN1Y+XvJHbv3TplMQXSrJuY3rM1jeBG0/kMBPAzEjeT8cV4AqeMHQWzAbCIBhh6x2sQJyzs3g8CSMfpB0+ov+4vGBnTrtEc1DsR6AjLjgBPbz5rFco42rHzttduCVE7bnu09G2qNyi4ElCz5PkSttsndPTDqhD4OO08FqmUDp/Uwdb7RZv31zt3YlzRoH9JO9ix+7QVf1jJeXEcxCAf40j506Kg1h9knW0grrIb6PndwwJC+AMBkmey -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Refresh Runs"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/admin/evaluations/runs/refresh"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Refresh Runs - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"trigger_interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":60,"minimum":1},{"type":"null"}],"default":1,"title":"Trigger Interval"}},{"name":"trigger_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trigger Datetime"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/remove-app.api.mdx b/docs/docs/reference/api/remove-app.api.mdx index ee02ea8f79..3668164323 100644 --- a/docs/docs/reference/api/remove-app.api.mdx +++ b/docs/docs/reference/api/remove-app.api.mdx @@ -5,70 +5,292 @@ description: "Remove app, all its variant." sidebar_label: "Remove App" hide_title: true hide_table_of_contents: true -api: eJytVE1v2zAM/SsCTxugJlmxk08z0AAt2mFFm+2SBgVrM7E6W1IlOlhm6L8Pkp2vZi0wYKc4/NLj4yM7YFx5yOaQW+thIaEkXzhlWRkNGdxRY9Yk0FopsK6FYi/W6BRqHj3oB527VduQZp89aCFEDBRnZyK3VrARLmWDBGPJYSx5VUIGvfkRrQUJFh02xOQiig40NgQZoLWPqgQJKqKwyBVIcPTSKkclZOxakuCLihqErAPe2Jjl2Sm9AgmsuI6GiOOqhBAWMdtboz35mHA+mcSf42bv26Ig75dtLe6GYJBQGM2kOYajtbUqUiPjZx9zuj2IEEKQ8Pn8/LTwD6xVmdLE1Dnj/qEqWBfJY9XjLolR1fFLMTX+NKA2xZEX9ebbMjF7zFGQO4vSTCtyEBZBbm3oHG4OiLwxPUAIEhq/eo/zr+Q9rgh2xd4OTWSIWfSG/dvm6ZkKPpr3PPXVPz3ELfZl9vT27L7dxkVP398e24Zczma3JwX72TbElYkCLqkmpiReriCDMVrrx10v2gASPLn1VtGtqyGDitn6bDwuatOWI1yRZhyhGqNVENXpqWid4k1KyW+vrmlzSViSg2y+OAy4j8roZ30ctqMZrbqm2PWwS3nLlXHqdz/AYaWqPiu2pfTSpPTt0iRwIr+9AgmxjV7Ek9Gn0QReH4ij4ChqLJKot28nN8hXLOz6BwnUJEUDEzZf9o6IzBrPDeqDesM9ytPpOELS7Vfqf12tgU+mXzy2Naqk/tRIN0x+HpfXg4RsOFgLCZXxHD1d94Sevrs6hGh+acnF6S4kJChPket5B6Xy8buEbIm1p3e6+nA37MNH8Ra4rQJ0HP8a6zb+Awk/abM/qmnPq624usGZFwVZPkg7OUtRhbsVuJjeTGdTCOEPDUkdnw== +api: eJytVE1v2zAM/SsCTxugJlmxk0/z1gIN2mFF1+2SBgVrM7FaW1Ylulhm+L8PlJ2vZikwYKc44iP1+PTIFhiXAZIZpM4FmGvIKWTeODa1hQRuqKpfSKFzWmFZKsNBvaA3aHl0Z+9s6pdNRZZDcmeVUgJUJycqdU5xrXzMBg21I49ScppDAv3xPToHGhx6rIjJC4sWLFYECaBz9yYHDUZYOOQCNHh6boynHBL2DWkIWUEVQtICr5xkBfbGLkEDGy7lQHhMc+i6uWQHV9tAQRJOJxP52W/2e5NlFMKiKdXNAAYNWW2ZLAscnStNFhsZPwbJabckuq7rNHw8PT0s/BNLk8c0de597f+hKjgv4rHpeefEaEr5MkxVOASUdbYXRbv6tojK7mvU6c2JsUxL8tDNO70+Q+9xtSPkVd0ThE5DFZZvaf6VQsAlwabYcWgUQ91KtNveXT88UsZ77z2LffVXD7j5tsxW3l7d422c9fL97bI15OL29vqgYP+2FXFRi4FzKokpmpcLSGCMzoVx25u2Aw2B/Mva0Y0vIYGC2YVkPM7KuslHuCTLOEIzRmfg9dClMaq+CBTEuoGyxhtexXrp9fSSVheEOXlIZvNdwHexTW+EfdjmDdCZSxJJhkFLGy5qb373rzvMW9FnSc/GLuqYvp6onttnzJ7IyoBKnz3tyejDaHKsmSFBpdfTwf2YRfeveUQY6FdybYQCDVRF6wMTVp+2AWHp6sAV2p16w+JK447ZY9RuZ+9/rbdBW6ZfPHYlmjgmsZF2sMhMpjyAhmTYbHMNRR1YIm37gIF++LLr5Pi5IS8vPdcQqTyI7rMWchPkO4dkgWWgN7p6dzMMznt1jNzaDVas8IJlI/9AwxOttts3LoRibbR2CKZZRo530g72lzhyMytn51fnt+fQdX8AGEYsLg== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Remove App"} -> -</Heading> - -<MethodEndpoint - method={"delete"} - path={"/apps/{app_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"delete"} path={"/apps/{app_id}"}></MethodEndpoint> Remove app, all its variant. Arguments: - app -- App to remove +app -- App to remove <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/remove-trace.api.mdx b/docs/docs/reference/api/remove-trace.api.mdx new file mode 100644 index 0000000000..09926b99b6 --- /dev/null +++ b/docs/docs/reference/api/remove-trace.api.mdx @@ -0,0 +1,324 @@ +--- +id: remove-trace +title: "Remove Trace" +description: "Remove Trace" +sidebar_label: "Remove Trace" +hide_title: true +hide_table_of_contents: true +api: eJydVU1v2zAM/SsGTxsgJF2xk0/L2gAN2qFFm/USBIUqM7FaWVYlOVtm+L8PlGXH+eiG7WRbfCSfHj9cg+drB+kC5pYLqdewZFAatNzLUs8ySMFiUW7wyVsuEBgYbnmBHi151aB5gZBCsD7JDBhIDSkY7nNgYPGtkhYzSL2tkIETORYc0hq43t6uQgS/NRTBeUvpG9afSO1xjRaaJQMvvaIzYonJLIOGTi06U2qHjiKen53TI0MnrDREH1J4qIRA51aVSu4jGBiIUnvUPvAwRkkRbjt+ceRTD1gaS1p42WbYoHWyheyT3vF7jJCGklRtioPr7MAXAdEwUFK/upOqcGv5diiKrpTaU+Qm+DYN6xDl8wsKvyf+oqfe0RoEuJ2jCkF6gZqGwn0+P6HnI1cyC2olU2tL+/9iZui5VPQmPRbuGKBKsWf9p47ZydEqONCrbAmS7oVb/6mY39A5vkbog70PDWIkc7L+rRR0rzZ1xA1qsZO3Vff9a1y28p1K1kGu5vO7o4BtbfeLeh8mPJnHCS/Q5yVNfoYKfTvzPocUxsbiRuKPsW93RXiiG9fd9DfAwKHddMuhsgpSyL03Lh2PhSqrbMTXqD0fcTnmRsIhlUmwJhcEDW3uUFRW+m2IN7mbXeP2CnmGFtLFcgh4oD5rO2cftpslI6+RNIw7a1L5vLTyV9sOcXHlrReJJPWqDO5Rz8jtKxevqGnT9fsAzkafRmfvXSY6JJO7WRwXLsK4dDwCDNiBXL1QwACLMCvgkRdfdgZiaUrnC64H8Q7KucepF8PjTz82isswCCFzHeu8gFhn6qX4V2jf0AGjVR53/ZJBXjpPHnX9zB1+t6pp6PitQkslWzLYcCv5Mwm4qCGTjt4zSFdcOTwi1+8S+HAfR+ZjAuw06a6smmq64aqiL2DwitvhHyksg7zrmTqaJ0Kg8QPHo91FzdWPwuX0ZjqfQtP8BqNPclE= +sidebar_class_name: "delete api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Remove Trace"}></Heading> + +<MethodEndpoint method={"delete"} path={"/preview/tracing/traces/{trace_id}"}></MethodEndpoint> + +Remove Trace + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "trace_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string" }, { type: "integer" }], + title: "Trace Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"202"} value={"202"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"version"} + required={true} + schemaName={"Version (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Version" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>links</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"span_id"} + required={true} + schemaName={"Span Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Span Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"trace_id"} + required={true} + schemaName={"Trace Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Trace Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>attributes</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "version": "string",\n "count": 0,\n "links": [\n null\n ]\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/remove-user-from-workspace.api.mdx b/docs/docs/reference/api/remove-user-from-workspace.api.mdx index fb62afac86..80fad58a99 100644 --- a/docs/docs/reference/api/remove-user-from-workspace.api.mdx +++ b/docs/docs/reference/api/remove-user-from-workspace.api.mdx @@ -5,71 +5,321 @@ description: "Remove a user from a workspace." sidebar_label: "Remove User From Workspace" hide_title: true hide_table_of_contents: true -api: eJzNVE1v00AQ/SurOYG0SkrFySciNagRRVQlwKGNook9ibfYXrM7DgRr/zsaf8VpaSUQB06W1m/ezLyZNzUw7jxEt/DFuq++xJhgpSEhHztTsrEFRHBDud2TQlV5cmrrbK5Qfe/xk7virpi5nY/uCqWUohxNpl54di8jtUype8AkceS9slvFKbVUbNWGlGvokzZ6oF2bZEyyuOgjj4lBgy3JoZS5SCCClmkt3Gspcz1gQUOJDnNictJuDQXmBBGM84EGI/2WyClocPStMo4SiNhVpMHHKeUIUQ18KCXWszPFDjSw4UweBg3VIoEQ9JClkaCn/1aRO/wV/7yhCWElwb60hScv+POzM/mcTu1jFcfk/bbK1E0HBg2xLZgKFjiWZWbiRr3pvZeY+lhDCCFoeH1+/pj4M2YmacLU3Dnr/oAVSicTY9PWnRBLQ1ENhin3jwGZjU/+YnH4sG3GdyqRSN29mIJpRw7CKuj+DZ3Dw0jHK9sWCEFD7nfPSf6evMcdwUD2zHREDLWUv+GY227uKeaTcd82fbWpO9zqSHOUt1X36TYuWvl+l6yHXC6X148I29nmxKkV1ySUEbcO4RQimA6e8NN67I8wFWd50ODJ7XsjVS6DCFLm0kfTaZzZKpngjgrGCZoplgZkXz3FlTN8aEJm14t3dLgkTMhBdLsaAz7KrrTTP4UNwmNp3pHo0JlrVnFqnfnZjrQzWdpGSaOm2NomvNNk1hSnZtcL0CBttGt9Nnk1OYOHt+8ELGuOcbPmfe7mN+gHKgz9g+68HwET5m+OP6Sy0nrOsRjxdaf2k1zHt3Jov4wu2Ell9dF0//OB7mbG9IOnZYam8VwjVt3t2+3xBstqRQ8ucrtyKw2p9Szout6gp08uC0Ge22sqW5UYj5tMDLbFzNMzer246bz4Uj1V4lc6jO72HrNKMM0q79EZSfTvk/YLXhzGOftiToRpzlvaO6juILM4ppJHwY+usTQwOP9ifjVfziGEX3c8vLw= +api: eJzNVE1P20AQ/SurOYFkJSnqyaemJRURVEUQygEiNNiTeMH2mt1x2tTa/16Nv+JAQWrVQ0+W1m/ezLyZNxUwrh2EN3Bt7KMrMCJYBhCTi6wuWJscQrigzGxIoSodWbWyJlOovnf40W1+m0/t2oW3uVJKUYY6VQeO7WGoFgm1DxjHlpxTZqU4oYaKjbonZWv6uInuae90PCSZH3eRu8QQgCnIopQ5jyGEhulOuO+kzLseCwEUaDEjJivtVpBjRhDCMB8EoKXfAjmBACw9ldpSDCHbkgJwUUIZQlgBbwuJdWx1voYAWHMqD72Gah6D90GfpZago38qyW7/in9W03i/lGBXmNyRE/zRZCKf/aldllFEzq3KVF20YAggMjlTzgLHokh1VKs3fnASU+1q8N77AN4fHb0k/oapjuswNbPW2D9ghcLKxFg3dcfE0lBYgWbK3EtAaqK9v5hvv67q8e1LJFK3LzpnWpMFv/RB94bW4nag45lpCgQfQObWb0n+hZzDNUFP9sZ0RAy1kL9+l9vcP1DEe+O+qftqUre45Y5mJ2+j7uttHDfy/S5ZBzlZLM5fEDazzYgTI66JKSVuHMIJhDDuPeHG1dAffizOchCAI7vpjFTaFEJImAsXjsdRasp4hGvKGUeox1hoeH5PpvVf9UmgIMvsKCqt5m3NNz2fn9L2hDAmC+HNcgi4lEVqVmMf1k8FC31KIlLrvGnJibH6ZzPv1oFJEyUq6Hxl6vBWsLa2jxg9Ui4XQfpsyp6M3o0mrzXTBqjp+bz1A0a1H7o6ahgEz+TqhYKgPRIhMGH2YfdDqiyM4wzzAV97k6/kjH6Wi3w9OHV7FVY7d/7Pl7ydH9MPHhcp6tqctVhVu5g3u2MtOxg+O93Nbi4DSIxjQVfVPTq6sqn38tycXdmwWDu8T8WJK0wdvaHXwUVr2kP1WomPtB0c+A2mpWDqtd6g1ZLo3yftlj3fDnN2xewJU9/BpHNT1UKmUUQFD4JfnG1poD8Rx7Oz2WIG3v8CS2nLSw== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Remove User From Workspace"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/workspaces/{workspace_id}/users"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Remove a user from a workspace. Args: - email (str): The email address of the user to be removed - workspace_id (str): The ID of the workspace. +email (str): The email address of the user to be removed +workspace_id (str): The ID of the workspace. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}]} -> - -</ParamsDetails> +></Heading> -<RequestSchema - title={"Body"} - body={undefined} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "email", + in: "query", + required: true, + schema: { type: "string", title: "Email" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/resend-invitation.api.mdx b/docs/docs/reference/api/resend-invitation.api.mdx index 7d07068c69..bfd9be5d4e 100644 --- a/docs/docs/reference/api/resend-invitation.api.mdx +++ b/docs/docs/reference/api/resend-invitation.api.mdx @@ -5,75 +5,337 @@ description: "Resend an invitation to a user to an Organization." sidebar_label: "Resend User Invitation To Organization" hide_title: true hide_table_of_contents: true -api: eJztVlFv40QQ/iureQLJ1KE6XswLASpdOKBVmgOhNIom9iTeO3vXt7tuGyz/dzS7duwkbQAJeCJPsXf2m5lv5ptxAw53FpIl3JodKvk7OqkVrCLIyKZGVv4xgTlZUplAJaR6lM5bCacFitqS8f+UGENcPagHNUdpySYPSggh3i4WdzfPKXnIRKxHDtZfC+vQ1Xad6owS8dVk8uKd2eBbaSe2ulaZ0EbkaAU9V9JQdoL05hWk33QtsDCE2V5sqNBqxzm4XFqhR1m8hPag5uRqo/q8fri//XlOttLKUiI8Ue6EJeboBOp6MoEIdEXGW80ySMB4ktfDXYigQoMlOTJcpAYUlgQJjGNcywwikFylCl0OERj6VDMXkDhTUwQ2zalESBpw+4qvW2ek2kEETrqCX4wrJ2YZtG108PWkzUdbYUr/hKNfe7DgZRUwyLpvdbbni6eQqVaOlOMjrKpCpj7G+IPltmxGHivDZDpJlp+oRFlcCuTGG7Rt1FvozQdK3VFSyw5mNVwLOvB9SPMQObQtw5iuBbx7rm7SnGjovk5TsnZbF6LvF/jrCQYvb66vz4F/wUJmoXY3xmjzN1BPaMvIdbxJR6U9Nyh0enSKan+79Z15TDT3T/dGKkc7MtCuBrLRGNyPqvGjDgFCG0Fpd5cK9xNZizuCA9iFGjMZYsGnf1Zoziu47uxGNR/oDey+nsb3gb6XnPUmPIfOAENtS3K55jlQaeu89F0OCcRjsdu4OdF+Gx8EauNmLNY29pOE4jBXIAJL5rGfJLUpIIHcucomcZwWus6ucEfK4RXKGCsJrE5LaW2k2/sr07vZO9q/JczIQLJcjQ3uuaNCjxybHcqDlXxHzFY3V6a1y7XpN043WPJwi+ngXp0Pw+HmGcuqoJG4h14Dqbbau+pYnvpExPRuBhFwykEok6svr3jsHsvnyJiFg6kXTh+nP4bohLEDVxAdAnKE5TfDAWfBtSxRjfC6Vfqe9+ZooS300f48jbIZJP3/Mv53lnHXp46eXVwVKP008kVvOi0ujxavhQiS8008yJHPz7YnK9IPH6/JVQQ5qz1ZQtNs0NJ7U7Qtv/5Uk2HZrSJ4RCNxw429bCCTlv9nkGyxsHShTT6bdwPuc/Fadr00FevyEYuanyCCj7R/4SuDh/p/6P6IOr898n70NJ3Jd8HbF37GDxBnK48jDzemKbfdRdvVaBTf3d4vIIJN93VS6ozvGHziEuJTCFdXoR3484XfNVCg2tW8pRIImPz7A8Vm9Bw= +api: eJztVlFv40QQ/iureQLJ1KE6XswLvaPSlQNSpTkQSqNoYk/tvdq7vt1122D5v6PZtWMnbQNIwBN5itcz3+x8M9+MW3CYW0hWMDc5Kvk7OqkVrCPIyKZG1v4xgQVZUplAJaR6kM5bCacFisaS8f+UmEKc3apbtUBpySa3Sggh3i+X15dPKXnIRGwmATbfCuvQNXaT6owS8c1s9qLP1RhbaSfudKMyoY0o0Ap6qqWh7AjpzStIv+lGYGkIs53YUqlVzjm4QlqhJ1m8hHarFuQao4a8friZ/7wgW2tlKRGeKHfEEnN0BHU+m0EEuibjra4ySMB4kjejL0RQo8GKHBkuUgsKK4IEtMk3MoMIJBenRldABIY+N0wBJM40FIFNC6oQkhbcrmYv64xUOUTgpCv5YG5ycZVB10V75Edt7m2NKf0T+L8OYCHKOmCQdW91tmPHY8hUK0fK8Sus61Kmnob4k+UmbCcRa8PUOUmWn6hCWZ66yKU36LposNDbT5S6g6RWPcx6dAtd77uOFuHm0HUMY/qC+/Bcy6Q9UsxNk6Zk7V1TiqE74K8nGKK8OT9/DvwLljILrXVpjDZ/A/WItoxcz5t0VNnnBqVOD96i2s3vfB8eEs39059I5SgnA916JBuNwd2kGj/qcEHoIqhsfqpwP5G1mBPswU7UmMkQS377Z4XmvELo3m5S85HewO7raXwf6Hsp2GDCU+cZYKhtRa7QrPpaW+eF7gpIIJ6OHxu3QeldvNeljdupRrvYjwuKw/CACCyZh2FcNKaEBArnapvEcVrqJjvDnJTDM5Qx1hKOB/2FfyvesSmwYi2ljZFu5/Eurq8+0O49YUYGktV6anDDXRb65tBsXzKs5QdiBvtZc9G4Qpth5/TDpgheTBH372IcGJdPWNUlTQQ/9h9Idad9qJ75Po+3mN4HWpiTkOLs7Ouz2WuJ9w7i4vqqFxamXljDnb0ZREfU7kmFaH85R1h9N77gjLjWFaoJXr9YP/IWnay3pT7Ypse3bUfJ/7+a/53V3PesoycX1yVKP6180dteqys40CpEkOz38ihXPn62VFmxfiZ5za4jKHgIJCto2y1a+mjKruPjzw0ZVt46ggc0Erfc26sWMmn5fwbJHZaWTnTHF4t+7n0pXktqUKdiaT5g2fATRHBPu/FTg0f8fxj1gDG/S4ph6LS9ybsQ7Ss/8UeIZwuQbx48LlJuspO268lgvp7fLCGCbf+tUumMfQw+cuXwMVxX16H4/DHDZy2UqPKGd1YCAZN/fwBwe++q sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Resend User Invitation To Organization"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} - path={"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}/workspaces/{workspace_id}/invite/resend"} +></MethodEndpoint> Resend an invitation to a user to an Organization. Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 +HTTPException: _description_; status_code: 500 +HTTPException: Invitation not found or has expired; status_code: 400 +HTTPException: You already belong to this organization; status_code: 400 Returns: - JSONResponse: Resent invitation to user; status_code: 200 +JSONResponse: Resent invitation to user; status_code: 200 <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"email"} + required={true} + schemaName={"Email (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Email" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/reset-user-password.api.mdx b/docs/docs/reference/api/reset-user-password.api.mdx index 01ef5973a3..fcf9eaa90c 100644 --- a/docs/docs/reference/api/reset-user-password.api.mdx +++ b/docs/docs/reference/api/reset-user-password.api.mdx @@ -5,36 +5,36 @@ description: "Reset User Password" sidebar_label: "Reset User Password" hide_title: true hide_table_of_contents: true -api: eJyVVEFu2zAQ/IqwpxZgLTfoSacaaIEYaREjcXoxjGAjrS2mlMiQVFpV4N+LpWTZipMCPUkgZ3eHM0N2oA1Z9FLXywIysOTI3zeO7L1B535pW4AAgxYr8mQdZJsOaqwIMogoyfuyhgyeGrItCLD01EhLBWTeNiTA5SVVCFkHvjVc57yV9R4EeOkVL9w5ssmygBC2XO6Mrh05rriYz/lTkMutNMwSMrht8pyc2zUquRnAICDXtafaMxyNUTKPh0ofHdd0RxYhhCDg08XFeeMfqGQRy5Kv1mr7H13BWBbSy553QR6l4j/pqXLnAKXzyS7W7fUuijsVKYhxRdae9mQhbIM4rKG12J4o+U33BCEIqNz+X6J/J+dwTzA2exsaxUjWvBuOs/XDI+V+YvgmnqsfPeC2xzZHeXt13z7Gl16+14YdIJfr9eqsYe/t1NQbTnQSI7Y6JroiX2oOvNHOx4T7EjJIjdU7qSiN9+DDyRVwZJ8P+W+sggxK743L0jRXuilmuKfa4wxlikYCB9lR3ljp21iyWC2vqL0kLMhCttmeAm45RH0sprDRETTyilig4eYtGl9qK//0Xg/3r+yrWAFZ73QsH8RaRHLJYrUEAXyMXpr57ONsDi8Fm4A5/5jH/B9mx20QL1QYzw8CqIrhB09YfT5uMDOWu8L6pN/r/kwojTp4+u1To1DGgEcC3WDdBgbrYiAn5m0FlOxytoGue0BHd1aFwMv9k8X+FNLhg+IM71A5OiMwvgPw7maI+/sExOvEflI7eR6fUTWMirF4Rit5VEyBOLjGHPqyRZ6T8SdVZ+8Odxnzu7q+XUMIfwEUCfk/ +api: eJyVVMFu2zAM/RWDpw3QkqzYyael24AG3dCgTXcJgoK1mVitbKmS3M0z9O8DZceJm3bATjbER+rx8VEtaEMWvdTVIocULDnyd7Uje2fQuV/a5iDAoMWSPFkH6bqFCkuCFCJKclxWkMJTTbYBAZaeamkph9TbmgS4rKASIW3BN4bznLey2oEAL73ig1tHNlnkEMKG053RlSPHGWezGX9ycpmVhllCCjd1lpFz21ol1z0YBGS68lR5hqMxSmaxqemD45z2wCKEEAR8Ojs7LfwTlcxjWvLNWm3/oyoYy0J62fHOyaNU/Cc9le4UoHQ2imLVXG2juGORghhOZOVpRxbCJoj9GVqLzZGS33VHEIKA0u3+JfoPcg53BEOxt6FRjGTF0XC4W98/UOZHA1/Hvrqre9zmUOYgb6fu22187eR77bI95GK1Wp4U7GY7Huo1OzqJFlseHF2SLzQb3mjno8N9ASlMjdVbqWga9+DD0Qo4ss97/9dWQQqF98al02mmdJ1PcEeVxwnKKRoJL0nMYzT5wlBglzvKait9E+vNl4tLai4Ic7KQrjfHgBt2WOeZMWwYFxp5Saxev5bz2hfayj+dEfrlLLoslkdWWx3TeyV7bueYPVLFrXKfHe3Z5ONk9lYzfUIyXy76RcEsLsqeR4SBeCHXIBQIoDJuCXjC8vMhwCx5LiVWR/VeH+SI2qCJp99+ahTKuAmRQNvPeA39jKNzR1PeCCjYDuka2vYeHd1aFQIfd28bzyqXDu8Vm32LytEJgeHBgHfX/V68T0C8TuyRmtE7+oyqZlS0yDNayVdFR4j9BJlDlzbPMjL+KOvkgeIqg9GXVzcrCOEvvJsH3Q== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Reset User Password"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/profile/reset-password"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Reset User Password @@ -43,29 +43,254 @@ Reset User Password as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "user_id", + in: "query", + required: true, + schema: { type: "string", title: "User Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/retrieve-application-revision.api.mdx b/docs/docs/reference/api/retrieve-application-revision.api.mdx deleted file mode 100644 index 683793d6bc..0000000000 --- a/docs/docs/reference/api/retrieve-application-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: retrieve-application-revision -title: "Retrieve Application Revision" -description: "Retrieve Application Revision" -sidebar_label: "Retrieve Application Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWW1v2zYQ/ivGfdoAOU7TNt30aWnSolm7NnDS7oNhBGfpZLOlRJWk0nqG/vvAF9mSYju2awPB1nxwZOruOfO5F5LHGWgcKwgHcJbnnEWomcgUDAMQOUn77TKGECRpyeiObnEhdivpjikmMghA0teClH4p4imEM4hEpinT5rGm0PusRGbGVDShFM1TLo0dzUi1ZG8lJXYom35IIBy0Re9IWtMNET3NCUJQWrJsDGUwH8kKzqEcBqCZ5mbgk1cvA1C8GO8Kc210ywBYvA4hgETIFDWEUBQsXot4GUNZBtVrMfpMkYbF6z4lJCmLaAlIGTQIvEPJMNM/ifxRIqsw/8nk9kyu0asVnL5nuO+rTN9VEyiNviktTFIMoZYF2QGVi0w50k+Oj82/mFQkWa4t/3BdRBEplRS80/fCEOxalCJROCU/EZZpGpOszeTcSgQQU4IF1xAer4igddGzLHX358Ma2Z1PDr1j/BrANyG/JFx8O4DRvz10y2J9poeZYWtmB5iRs7B/ylpMSc0SjPYaCB6yslDoiZB7A3doZQAxatoQ1Yh2NUuX1Y8F9IUBLANISSkcr8VeB/OXVy8DSLjd+azOSKZuo0JpkS41NhKCE2brK6fqnDsEU5DVLd0hL1CvIHxDxFdzEAc6KVJcvuhsCPjGAmxYql9b1paumSlpbP4OjGNmlJBfNWvdw56rqmzDUjpqjtQnuNwWRExGBUf5y+uC8z+VyLofCp0X+ldoT9eAME3phlooJU7XUtvShXsErw9UjVbjXpA+JlLfi3dM6QdpXTXJe+rbcXTjQhEyTHcuCO/RFp7mBmI3qIsaRBlAJAk1xbeo91oIzx1s58ySVeTxIYx8dLDeSEycDmDkwsF6IxVdo+keV7uKrJdTv95VfO3VSsXW3EpF2F6tVHTNrfyXzxt2B4HrVuf9zb6QbFeUj5I5BL47AjcIE8KY5NaV/ucBdNUBtPqhw61WlDfeDYYCexzc1COPaE1+lBudLXxw7Yk3O0rMc5ZtugFqU7zNbqsyZB1vFvGdo99plwHkKDElvUNW/89jZbXy1YJS4yiSdyyiTdg1naOtYtBDl7ZrlLBx4Xrhh7B13jCwZcfsAu0x4Qf7bvvo3Pk2W2l7ds9OTu535T4hZ7Fr0LySUsjdW3IxaWR2yfWx2RbgImq83Sa3aiuGC+fFxN+JCKvtfarG94vO0kaDE1ktasno3Ji3y1hf9D8Hdl7OtJdrtI4qeh27q6dx4ehb5+I3NzdX9wCdb5tOrVq2nXr/rb+4GEpJT4S5QcqFMgZy1BMIoZebnih963EaYzTt1byvelW71Dw5dHDZbmvpYOb2WzDROldhrxdxUcRHOKZM4xGyHubMJpiiqJBMT63K2dXlW5q69R3CwbAuYFccFzhNsbnPMGdvyVDojpq+0cX+cdEQADNUuD2cpdUEcH9xJfbqO6Y5pxVXXPNt2yI03P5r8d3speBpgr89T06fdZ+/ePKi++z56Ul39DSJuifR76dPk9NTTPC03V9tXQId0lT7mmS/tsyGMkuE9UlVhqzHO2dXl1A7DMHx0ZOjY2jHaUPYlB2MbNmpHGpfQ9AKrXlQQQCU2poDmjD9Y/HC/DIT274J5/EeSotWu8GHmabvupdzZFntVOEyZgA+YyAAlzPQoF/ZSuHzxj77zBkGMDGpFw5gNhuhoo+Sl6UZ/lqQNMkx9I3skWF1MJyfRmzefKGpW6NMne7aImXEeeHSolWzTT11GmdRRLleKzusVYerD9c3EMDI3x+nIjY6Es10zWcIYK6k3UzDmRubAcdsXNh2MDhM8/cvWHmQGA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Retrieve Application Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/legacy/applications/revisions/retrieve"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Retrieve Application Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"application_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_variant_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"application_revision_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"ApplicationRevisionRetrieveRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application_revision":{"anyOf":[{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"ApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"ApplicationRevisionData"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},{"type":"null"}]}},"type":"object","title":"ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx b/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx deleted file mode 100644 index 0abb16dbae..0000000000 --- a/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: retrieve-evaluator-revision -title: "Retrieve Evaluator Revision" -description: "Retrieve Evaluator Revision" -sidebar_label: "Retrieve Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWW1v20YM/isGP22AHKdpm276tDRp0axvgZN2HwwjoCXKvlbSqfeS1DP034d7kWXZjmY7NlBszYfEkciH5nMkj8ebgcKxhHAAr+4w1ai4kDAMgBckUDGeX8YQgiAlGN3RLVVCt4LumGQ8hwAEfdMk1UseTyGcQcRzRbkyH7EoUhZZnN4XyXPzTEYTytB8KoSxohhJ898idGKV8+nHBMLBsuAdCWu4IaKmBUEIUgmWj6EM5k9ynaZQDgNQTKXmwWevXgYgUz3eFeba6JYBsLgNIYCEiwwVhKA1i1sRL2Moy6B6zUdfKFJQv+5TQoLyiNaAlMECfXcoGObqJ42Po7EK8J88bs9ji968zPQ9v31fW/quikBptE1JYYJiCJXQZB/IgufSUX5yfGz+xCQjwQpl2YdrHUUkZaLTTt8LQ7BrMYq4dkreDZYrGpNY8OPcSgQQU4I6VRAer42etshZTdn9rd6c5s5nh90x6xnAPRdfk5TfH8DkXx56yWLt5SG8W/LqAN44C/unq8kSCsUSjPZp4MxDVha0mnCxN3CHVgYQo6INUY1oV7FsXc2ooS8MYBlARlLiuBW7Dea9Vy8DSFLb4zyciUzeRloqnq01NuI8Jczbq6XsnDsEU4Rl3Sg9BnEe5h50ojNcv9FsCPjGAmxUnl9bztbukRkpbH4LjGNm6iqmVw1eN1i3qrI2LGWj5pNF99bbgoiJSKcofnmt0/RPyfPuR60KrX6FZWcNCFOUbaiFQuC0ldglXVihtz1MFVqNlRD9kUj9wN8xqf6V1oecXFHfjqMbF4qQY7ZzOfiAtuw0m4bdoC4WIMoAIkGoKL5FtdcyeO5gO2eWLF3EhzDyycF6IzGldAAjFw7WG6noGk33uNdVZL2c+t2u4muvViq25lYqwvZqpaJrbuW/fMKw/QO27c37814LtivKJ8EcQro7QmoQJoQxia0r/c8j50NHzuqLDrfaUd74ZTAU2CPgpivyA+3JP2Sjs8UaXHviTUeJRcHyTRugZYq36bYqQ3bhzSa+c/Q77TKAAgVmpHbI6v95rDysfFVTahaKxB2LaBN2zbRoqxj00KWdFCVsrN3U+xC2zhsGtpqRXaA9JDxqzvb4OZ0fqpV2Qvfs5GR1BvcZUxZb/zqvhOBi9wFcTAqZ3Wx9VC4LpDxqvN0mqxb2ChfItdvveIRVY5/J8Wq5WTtgcCIPi1oyOjfm7TrO62nnwPrlTHu5xsiootex+7AbF46+tgV+c3NztQLo1ra5qNWAth5HdPr15U9GasLNHVHBpYEvUE0ghF5hJqB035sPQmSvmomaTw4SXHLb0jmYufYKJkoVMuz1opTr+AjHlCs8QtbDgtl8khRpwdTUqpxdXb6lqdvOIRwMFwXsBuOipSk2Xygs2FsyvLmTpZ9qsb9dCATAjP+uZbNcmqjt17ddr75jVqS09vZq3qPV0eCarfp/0zjB0wR/e56cPus+f/HkRffZ89OT7uhpEnVPot9Pnyanp5jgKbTd7xzO0PINyH4tmc4xT7hdjWqoaNe6c3Z1CQunHjg+enJ0DMth2RA2VQYjW2WqpbSvIVgKqnk4QQCU2RIDijD7o35hvpkJZj9r83jtWbA0VfDhpei76hUpsnzh8OASZAA+QWCBcWlrgU8S+9mnyTCAiUmvcACz2QglfRJpWZrH3zQJkwlDP6IeGSIHw/lJwybJV5q6/cdU4q4tQ0Y81S4HlqqyqZhO4yyKqFCtssOFCnD18foGAhj5e+CMx0ZHoPHR/A4BzMWyst6FM/dsBinmY20HveAwzc8/W5R5+Q== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Retrieve Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/retrieve"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Retrieve Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"evaluator_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_variant_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"evaluator_revision_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionRetrieveRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/retrieve-query-revision.api.mdx b/docs/docs/reference/api/retrieve-query-revision.api.mdx deleted file mode 100644 index ff18235350..0000000000 --- a/docs/docs/reference/api/retrieve-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: retrieve-query-revision -title: "Retrieve Query Revision" -description: "Retrieve Query Revision" -sidebar_label: "Retrieve Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWV9T2zgQ/yqZfbrOGEJpS+/ydLTQKXctcIFyD5kMo9jrRK0sG0kGchl/95uVbMeOHRPS9B5u2gfqyNJvV/t/1wswbKphMIK/UlQcNYw9iBNUzPBYngUwAIVGcbzH27sU1fxW4T3XPJbggcK7FLV5FwdzGCzAj6VBaeiRJYngvsXof9WxpDXtzzBi9JQoomCI2mABBWxoD8r5RQiD0eqme1SWaG2LmScIA9BGcTmFzCtXZCoEZGMPDDeCFm7y45kHWqTTbWGu6GzmAQ+6EDwIYxUxAwNIUx50Ip4FkGVe8TqefEXfwPL1EENUKH1sAcm8XHT3THEmzU8Rbi/Cwqh/yvD5Muw4RzFlPsxlO8zjyNBFDcjoJIUQrjCAgVEp2gWdxFI7cR8eHNB/AWpf8cRYycNV6vuodZiK3jDfDN62wcePU3covwKXBqeoKnd4b3d4EGDIUmFgcNCwmi6Lqbvo7jRmRdu7cbg90p8Hu6dSx3d32fUdHDZThofM3yXzxzlkQSE1s1jtDNyhZR4EzOCGqLR1z/CozY+W0CcEmHkQodZs2ondBfM5P555EAqb5Ks4LAg4eQgTlzV7bVCaxLFAJqukCuLjhut38fPBMmHvZdiWzDSvXThsjXI0qa9U79BOC3yu/FQw9cuHVIg/dCz3LlKTpOYFtN2RG4w2PMWUYvNuwdTPwrOk+pmESSe21/B/INTz+BPX5kmxrrtk4/jzZHSdG55k0dbedM6s19Zz0XZQJxWIzANfITMY3DKz0yjy3sH2jq2w0iT4EUS+ONicSIACfwCREwebEynENdllJiqE9a5IR4W8dkqlkFZJpRDYTqkU4iqp/J+LVpt+WVcB9sBlED8QdscmiQ9Uku7Sas8dZOZBLIJdg184SIpp+Lgp9JMCPSeszAPBI94O2poYVlA+2dN0bxXgE/UWyjSi4QPTPsrArVGEzX+MO2Vg4cmipEF1z8TWHJ8VANR/rKvmmgmwgTO0hVtHP/R3aYutvWjIhUH1hKm64YwrZMueBJgMlhm1KV77Nqa2RsbEkHQrMlZQ1Vw85T4TFwWFzLZVLrNb2nnZs565kKMIKu1UyUlZ69gNmQffcL5tJPkT567bEemm6fzZBU1x06yljmsvdqh/fU5RcmPZz7yaQp/2FK7BA65vSY/VBBZHCVNcx7KivfUoeEfat3+nZA/C2Ce0j/R3Yh5kFf88jVBxfyNwbZgy+oGbmV0Mikdq0RmXdIGIGX+G9CT4N6wSurJoG9Hh0tnzLa+xSqXiRudnjBiYsYYwT7i/GQI+cm10zkX+o4JzSis0NmkDa8azYlNl1kDqtiZSuuA6z/OZxluNUnPD79vdoqWTaxZCTGPvqoSpsBIyoWlAg4/UpVsFbk3llDB6ny1Gg0RH/LzGR3ORy4Lw6yJgoj0FbMLRsRDP4sQZ2ZKT9UrN97RgLWdfozxw1hw6D7w2CpdtZpEhXsB4NTS1nNXVO406R3Ul8veM+E6YbUa3Pv9948V8FpjZweLrw8Pm6PCGCR7YwWDvVCnralvODQM0jItaTqxvELG/JmM+naQ6VPspdgzaOYqedqXayvzHbVm/1Qqjd01vnzJUupcjne+rp7RcvE66669x4sTXpdyP19eXDUCn27pSi7lyz40Th8vvUxGaWUyfsJJYE3TCzAwG0E9ocIsP/Tv3yatfzHHpyWGBBxoVNU5WZakSMICZMYke9Pu+iNNgn01RGrbPeJ8l3Pq8Rj9V3MztkePLsz9x/hGZrYFH4+qGKzIqZyb1baWGWMKpyilGFvm0kf/jdE8lL/HjTpFEyFyHy69xp48sSgQ2vq6VneDSBFxLt/xN7Rm8Ctmvb8Kj13tv3r58u/f6zdHh3uRV6O8d+r8dvQqPjljIjmDd96cfQ2T1C81uqdguIoytBoqMYPXbO748g0oLDQf7L/cPYNUGa5ttnePbkFKoz74Gb8WQShOikiKy8QQMsuj35QvijKw3YrKCt97kV8ZTuTkZfDT9RDBu44ZlYpF7wwhybwAnaW6rstIj7HPuE2MPZuRIgxEsFhOm8YsSWUbLVkVk5fk3iAlJcERhbFY4wMJV/JSbKN7u2WBTFvHN2Etx0Z049n1MTOfeccXXLy+urqmAzT9KR3FAZxSjC9LfAUCtoLJrCxBMTlM7bQeHSf/+BRfslUw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Retrieve Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/retrieve"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Retrieve Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"query_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/retrieve-testset-revision.api.mdx b/docs/docs/reference/api/retrieve-testset-revision.api.mdx deleted file mode 100644 index e01acddbdd..0000000000 --- a/docs/docs/reference/api/retrieve-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: retrieve-testset-revision -title: "Retrieve Testset Revision" -description: "Retrieve Testset Revision" -sidebar_label: "Retrieve Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWdtu4zYQ/RVjnlpAjrO5baunZje7SLqXBI43L4YRjKWRza1uS1Lpuob+vRiS8lV2HMcGisJ5SBSKc0Y8HB4Oh2PQOFDgd6FDSivSCnoeZDlJ1CJLb0LwQZKWgp7oUdsuj5KehBJZCh5I+lGQ0u+ycAT+GIIs1ZRqfsQ8j0VgUFrfVZZymwqGlCA/5ZJ9aEGK/5sCR8Y0Hd1G4HcXuz2RNG7nuuhRTuCD0lKkAyi9SUtaxDGUPQ+00DE3PDjz0gMVF4NtYe7ZtvRAhOsQPIgymaAGH4pChGsRb0IoS696nfW/U6Bh+rpNEUlKA6oBYTNH3hNKgemBxFeRWIX2gcWXs7jGzolL27HbdorStuoBJduylAhJIfhaFmQaVJ6lyhJ+cnzMf0JSgRS5NtzDfREEpFRUxI226wzetiIUZIU1coMQqaYByZlRvDc9PAgpwiLW4B/XRM66qFlcqrubN0dw48EiN3gePdi9n3n8ajy7H4fFR6lFhMEuHVw6yMpDoYeZ3Bm4RSs9CFHThqjctalFUremptBXDFh6kJBSOFiLvQ7mizMvPYhis/OvjtYhKrPlB+jW4JLDfpbFhOlaj9eoGp0JSulZWInBazEtxAaq89EMtFb2E9I4/xUYhoLlAuO7OTI2ILsSjDlPSX++ZXZ49b4gEDIoYpS/fCzi+E+Vpc3bQueF/hUWh8ogQlOyoRVKiaO1xC7YwhK562NLo7FYiqv/Eqlfs89C6WdpXTXIJfOXcdSxoQgpJluv4a9otGJ+L9wO6moGovQgkISawkfUO9Wu9xa2cWnIKvJwH06+WVjnJKSY9uDkysI6JxVd/dEON6iKrHcjt0VVfO3US8XWxEtF2E69VHRNvPyf02az6eNz6R9vg48iXJA/J+LPf8LmUl7tuY2bUFW5Ws1OPvFcn6nuK7PbLfb9BPegYAcF26uC7VozarLwjbOlmlS5Ur/ei7KSKkM+pG4bpG6HM8MezgzLW+eB1K1JvWIynzsYcy6wVUKx0Zm7qvTZT3lNrfC1lUZXFixNjfHs5GS5iviAsQhNjbDxQcpMbl9CDEmjiPlpRVoVZ8Hc25cEc29xsqaD/pzZDzTypAZ1iWRNAch2Wd3VkNHo8Ns6xqf12q4Zl3Xt+s2VDCt6Lburh3Fl6Vs3vdedzt0SoJ3b+UmtSsyNKu9sTy+tEtLDjG+28kwxeI56CD60cq7h0t8tl/yqVlXT5ScLB5y6Sj7GmFkrZAw+DLXOld9qBXFWhEc4oFTjEYoW5sKsIEVBIYUeGZPLu5tPNLomDEmC3+3NdrjnuLKRMt9tMkmYi0/EnNkCgqs4in/s9HsgeOxDa8WkcMS2p3d0H35iksdUc+c2OZlN48Aesab/c+oDpxH+dh5dnDXP37552zw7vzhp9k+joHkS/H5xGl1cYIQXsPpWal9uFu9tduuH8740ygxtVanXzHLj8u4GZo61cHz05ugYFoNxrjNrCwZGW6pJNK/BWwinSSCBB5QYYQFNmPwxfcFfxkGcYDqDty72F4pGLqw0/dStPEZhJMR8xtgtiy64ZQETtpVZ/W5pmGe3OHoeDHlJ+V0Yj/uo6JuMy5KbfxQkOf577lKizyR2WdKG1UoYw180MrcsRnubRni4e1zYyF/QYdZIa3EZBJTrtX17M6v+7va+Ax703Z11koVsI5FHyL99AL4C12Z0/ti2jSHGdFCY0jtYTP75F1m4qb0= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Retrieve Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/retrieve"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Retrieve Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"testset_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_variant_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"testset_revision_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionRetrieveRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/retrieve-workflow-revision.api.mdx b/docs/docs/reference/api/retrieve-workflow-revision.api.mdx deleted file mode 100644 index cedbe84963..0000000000 --- a/docs/docs/reference/api/retrieve-workflow-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: retrieve-workflow-revision -title: "Retrieve Workflow Revision" -description: "Retrieve Workflow Revision" -sidebar_label: "Retrieve Workflow Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWdtu20YQ/RVhnlqAshwncVo+1bGdxk2aGIrjPgiCMSKH0iZLLrMXJ6rAfy/2Qt3FSrIMBG38IFPLmTOaM7Ozu7MT0DhUEPfgLyE/Z1x8VdCPQJQkUTNRXKUQgyQtGd3T3dcgcyfpnikmCohA0hdDSr8U6RjiCSSi0FRo+4hlyVniYDqflCjsmEpGlKN9KqU1ohkp+20OOXO6xfh9BnFvWe6epLO7IKLHJUEMSktWDKGKpiOF4RyqfgSaaW4HboN6FYHiZrgvzAerW0XA0iaECDIhc9QQgzEsbUS8SqGqovq1GHyiRMPsdZcyklQktAakimbs3aNkWOgfLD6IxTq7f9C4O40NenWF6QZ6u6GsdH0Fgcoq23LCJKUQa2nIDahSFMozfnJ8bP+lpBLJSu3Ihw8mSUipzPBWNwhDtG8hSoTxSsELVmgakpxz49xJRJBShoZriI/X5U5T3qxM18OFrua4deuhWzaWERze0CL+1KNH8MRbQKlZhskhXTgLkLUFo0dCHgzco1URpKhpS1Qr2tYsXzezZtAXFrCKICelcNiI3QTzZ1CvIsi42wRszlim7hKjtMjXGhsIwQmL5pqiWucewZYqdUf3yA3qDYRviXg5BfGgI5Pj+nK8JeBrB7BNEXvlKFu7juSkcfFHYJoyW32QXy/QukXY6vqzYCkfLI7Me7feFiRMJoaj/OmV4fwPJYr2e6NLo3+GZV8tCNOUb6mFUuK4kdclXVhhtzlLNTqNlQz9nkh9J94ypf+V1k1OrqjvxtGNT0UoMN+7GrxDV3UWl9b9oC7mIKoIEkmoKb1DfdAqeO5hW2eOLFOmj2Hko4cNRlLi9AhGLjxsMFLTNRgfcKmryXo5DotdzddBrdRsTa3UhB3USk3X1Mp/eRvutg/YtDQfznsj2b4oHyXzCHx/BG4RRoQpyZ0r/Y9z2aZzWf1D+zutKK9DGCwF7qC0bUS+ozX5u9zo7BCDD4F4u6PEsmTFthugZYp32W3Vhlzg7SK+d/Z77SqCEiXmpPeY1f/zXNmsfD2j1AaK5D1LaBt2bU9lpxwM0JXrp2RsaHxb+DFsnS8Y2KWRdIHujPCQXtSDW1mh71S5Jtazk5PVNtUtcpY651qXUgq5f48qJY3MrbQhJZcFuEgW3u4ypeYWCp/FM6/figTrXX2uhqu1Zm1zwYtsFnVktG7s23WUzxqCPeeXNx3kFhpSNb2e3c1uXHj6muL7+ubmegXQx3YxqHUPszVtV3VnVyM56ZGwFyhDsuAl6hHE0Cltj5C+duqmmerUTUP75PHAT2tXNHsTv7GCkdalijudhAuTHuGQCo1HyDpYMjeTFCVGMj12KmfXV29o7BdyiHv9eQG3tPhUWRSbRglL9oYsaf5MGdpZ7G8f/wiYdd5v1hyRNmW7s5ugy2+Yl5zW3exMN2ezTPC7rNl3u2OCpxn+8jw7fdZ+/uLJi/az56cn7cHTLGmfJL+ePs1OTzHDU2i4+3g0O8u3A4c1ZDeMRSZcKOpWogt06+z6CuYOO3B89OToGJYTckHY1hdMXH2p4+heQ7SUUdNcgggod8UFNGH+2+yF/WWlUDp02AJeY/4v9RJCamn6pjslR1bMHRn83OhBmBsw41u5GhDmh3sOM6QfwUgobbUmkwEq+ih5VdnhL4aknQT90PgeWBp7/enxws2PzzT2i46twG1Xfqw4Nz79l6qxrZRe4yxJqNSNsv25qf/75Q1EMAi3o7lIrYpE66H9jAHsbat2zsUTPzYBjsXQuN4ueEj79w/32iiE -sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Retrieve Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/preview/workflows/revisions/retrieve"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Retrieve Workflow Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"workflow_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"workflow_variant_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]},"workflow_revision_ref":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionRetrieveRequest"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/revert-deployment-revision.api.mdx b/docs/docs/reference/api/revert-deployment-revision.api.mdx index 67030f54d3..3f46e90baf 100644 --- a/docs/docs/reference/api/revert-deployment-revision.api.mdx +++ b/docs/docs/reference/api/revert-deployment-revision.api.mdx @@ -5,36 +5,36 @@ description: "Revert Deployment Revision" sidebar_label: "Revert Deployment Revision" hide_title: true hide_table_of_contents: true -api: eJyVVMGO2jAQ/ZXonVrJInTVU05F3UqLttUilvaC0MqbDMTbxPbaDiqN/O+VnRBggZV6ItgzzzPvzZsWjm8ssiW+KrkWG4sVg9JkuBNKTgtkMLQl454K0pXa1STdk6GtsEJJMGhueE2OTMBoIXlNyHAh9kkUYBASGTR3JRgMvTbCUIHMmYYYbF5SzZG1cDsdUKwzQm7A4ISrwsHtAJvMe9hkWsD7VUCzWklLNgDcjMfhpyCbG6FDJ8jw2OQ5WbtuqmTeB4MhV9KRdCGca12JPDaevtiQ0x6K8t57hs83N+fAv3glipiWfDNGmf9AhTaBbCe6ugtyXFThSziq7XlApfKTWy53D+vI/Clnng0nQjrakIFfebY/48bw3RGx31VXIDxDbTfvafCDrOUbwgB2PTSSkSzCrT+8rZ5fKHcn+i9jX93TfdzqAHOgt2P3ehu3HX2XHtuH3C0WszPATttTUedx6pMLIxcKJVeq4A2trIsucCUypHnnofQw/2l72Qs+7WwFBktmu/dPYypkKJ3TNkvTvFJNMeIbko6PuEi5FgizbilvjHC7mDKZTe9pd0e8IINsuToOeAxz1k3OadggGtfingKHvXMnjSuVEX+7cegNW3ZZgSQh1yqm93xOYnHJZDYFQ2ijY288+jQa4y2nJ8HBIjyPFtm/Ha/B3rAw9A8GqqM/4IjXXw4XobIgRc3lEd67Ep5UNtDh6I9LdcVFtEKso+3VXaJXNybvIcGQXd12vcQrhjLMSbZE2z5zSz9N5X04fm3IBBVXDFtuBH8OnC5bFMKG7wLZmleWzqod1gs+zHsXfUzALnexV1oGmbe8asI/MPym3fVVHbdFuR+qtg+e5DlpdwRzttzC9A3umD08LuD9P7GdNUc= +api: eJyVVNFu2jAU/ZXoPm2SRVi1pzyNtZOKuqmIdntBqHKTC3Gb2J59g8Yi//t0nRCgQKU9Eezj43PPvcctkFx7yBZwbfRKrT0sBRiLTpIyelpABg436OipQFuZbY2anhxulFdGgwArnayR0DFHC1rWCBmcwT6pAgQoDRlYSSUIcPi7UQ4LyMg1KMDnJdYSshZoa5nFk1N6DQJIUcULNwNtMu9pk2kBISyZzVujPXomuBqP+adAnztluRLI4KHJc/R+1VTJvAeDgNxoQk0Ml9ZWKo+Fpy+ez7R7USGEIODz1dUp8S9ZqSIeS745Z9x/sIJ1bDapTneBJFXFX4qw9qeAyuRHu1Jv71fR+WPPghhWlCZco4OwDGK3Jp2T2wNjv5tOIAQBtV+/14Mf6L1cIwxkl6HRjOSRd8P+bvP8gjkd9X8R6+qu7nHLPc3e3s7dy2XcdPadu2wHuX18nJ0Qdr09buo8Tn1yZuRYKFJpOBvWeIopoBIySPMuQ+l+/tP2fBZC2sUKBHh0m11+GldBBiWR9Vma5pVpipFcoyY5kiqVVsFbnZO4m1wzFDgIHvPGKdpGvslseofbW5QFOsgWy0PAAw9hN1bHsKGj0qo7ZIP7WE8aKo1Tf7tZ6dNcdqfYQaVXJh7vze61fZX5K2qOP9fZyR6PPo3Gl4rpDyST2bTPksxjlnY6IgzEG7sGo0AA1jFIQCjrL/sNVsk9q6U+4Hu310cKB2sI/1BqK6liZqKOth+DBfRjEA/vKEFAdvFZ7GdhKaDkgcoW0LbP0uNPV4XAy78bdNzRpYCNdEo+s7+LFgrl+buAbCUrjydqh3cIPsz7uH1MQJyvYtd1zS3fyKrhfyDgFbeX3/T4rJS7AWt78CTP0dIBzckryJM4xGh2//AIIfwDxTZD1g== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Revert Deployment Revision"} -> -</Heading> +></Heading> <MethodEndpoint method={"post"} path={"/configs/deployment/{deployment_revision_id}/revert"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Revert Deployment Revision @@ -43,29 +43,254 @@ Revert Deployment Revision as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"deployment_revision_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Revision Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "deployment_revision_id", + in: "path", + required: true, + schema: { type: "string", title: "Deployment Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/sidebar.ts b/docs/docs/reference/api/sidebar.ts index 81c2a464b9..7e7a7c372e 100644 --- a/docs/docs/reference/api/sidebar.ts +++ b/docs/docs/reference/api/sidebar.ts @@ -4,7 +4,7 @@ const sidebar: SidebarsConfig = { apisidebar: [ { type: "doc", - id: "reference/api/agenta-api", + id: "reference/api/agenta-backend", }, { type: "category", @@ -128,339 +128,51 @@ const sidebar: SidebarsConfig = { }, { type: "doc", - id: "reference/api/fetch-evaluation-status", - label: "Fetch Evaluation Status", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/fetch-legacy-evaluation-results", - label: "Fetch Evaluation Results", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/fetch-legacy-evaluation-scenarios", - label: "Fetch Evaluation Scenarios", - className: "api-method get", + id: "reference/api/create-evaluation", + label: "Create Evaluation", + className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-legacy-evaluations", + id: "reference/api/fetch-list-evaluations-evaluations-get", label: "Fetch List Evaluations", className: "api-method get", }, { type: "doc", - id: "reference/api/delete-legacy-evaluations", + id: "reference/api/delete-evaluations", label: "Delete Evaluations", className: "api-method delete", }, { type: "doc", - id: "reference/api/fetch-legacy-evaluation", - label: "Fetch Evaluation", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/fetch-legacy-evaluation-scenarios-comparison-results", - label: "Fetch Evaluation Scenarios Comparison Results", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/start-evaluation", - label: "Start Evaluation", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/refresh-runs-admin-evaluations-runs-refresh-post", - label: "Refresh Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-runs-preview-evaluations-runs-post", - label: "Create Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/delete-runs-preview-evaluations-runs-delete", - label: "Delete Runs", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/edit-runs-preview-evaluations-runs-patch", - label: "Edit Runs", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/query-runs-preview-evaluations-runs-query-post", - label: "Query Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/close-runs-preview-evaluations-runs-close-post", - label: "Close Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/open-runs-preview-evaluations-runs-open-post", - label: "Open Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-run-preview-evaluations-runs-run-id-get", - label: "Fetch Run", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-run-preview-evaluations-runs-run-id-patch", - label: "Edit Run", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-run-preview-evaluations-runs-run-id-delete", - label: "Delete Run", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/close-run-preview-evaluations-runs-run-id-close-post", - label: "Close Run", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/open-run-preview-evaluations-runs-run-id-open-post", - label: "Open Run", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-scenarios-preview-evaluations-scenarios-post", - label: "Create Scenarios", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/delete-scenarios-preview-evaluations-scenarios-delete", - label: "Delete Scenarios", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/edit-scenarios-preview-evaluations-scenarios-patch", - label: "Edit Scenarios", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/query-scenarios-preview-evaluations-scenarios-query-post", - label: "Query Scenarios", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-scenario-preview-evaluations-scenarios-scenario-id-get", - label: "Fetch Scenario", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-scenario-preview-evaluations-scenarios-scenario-id-patch", - label: "Edit Scenario", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-scenario-preview-evaluations-scenarios-scenario-id-delete", - label: "Delete Scenario", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/create-results-preview-evaluations-results-post", - label: "Create Results", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/delete-results-preview-evaluations-results-delete", - label: "Delete Results", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/edit-results-preview-evaluations-results-patch", - label: "Edit Results", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/query-results-preview-evaluations-results-query-post", - label: "Query Results", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-result-preview-evaluations-results-result-id-get", - label: "Fetch Result", + id: "reference/api/fetch-evaluation-status", + label: "Fetch Evaluation Status", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-result-preview-evaluations-results-result-id-patch", - label: "Edit Result", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-result-preview-evaluations-results-result-id-delete", - label: "Delete Result", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/refresh-metrics-preview-evaluations-metrics-refresh-post", - label: "Refresh Metrics", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-metrics-preview-evaluations-metrics-post", - label: "Create Metrics", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/delete-metrics-preview-evaluations-metrics-delete", - label: "Delete Metrics", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/edit-metrics-preview-evaluations-metrics-patch", - label: "Edit Metrics", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/query-metrics-preview-evaluations-metrics-query-post", - label: "Query Metrics", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-queues-preview-evaluations-queues-post", - label: "Create Queues", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/delete-queues-preview-evaluations-queues-delete", - label: "Delete Queues", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/edit-queues-preview-evaluations-queues-patch", - label: "Edit Queues", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/query-queues-preview-evaluations-queues-query-post", - label: "Query Queues", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-queue-preview-evaluations-queues-queue-id-get", - label: "Fetch Queue", + id: "reference/api/fetch-evaluation-results", + label: "Fetch Evaluation Results", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-queue-preview-evaluations-queues-queue-id-patch", - label: "Edit Queue", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-queue-preview-evaluations-queues-queue-id-delete", - label: "Delete Queue", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/fetch-queue-scenarios-preview-evaluations-queues-queue-id-scenarios-get", - label: "Fetch Queue Scenarios", + id: "reference/api/fetch-evaluation-scenarios", + label: "Fetch Evaluation Scenarios", className: "api-method get", }, { type: "doc", - id: "reference/api/create-evaluation-preview-simple-evaluations-post", - label: "Create Evaluation", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-evaluation-preview-simple-evaluations-evaluation-id-get", + id: "reference/api/fetch-evaluation", label: "Fetch Evaluation", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-evaluation-preview-simple-evaluations-evaluation-id-patch", - label: "Edit Evaluation", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-evaluation-preview-simple-evaluations-evaluation-id-delete", - label: "Delete Evaluation", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/query-evaluations-preview-simple-evaluations-query-post", - label: "Query Evaluations", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/start-evaluation-preview-simple-evaluations-evaluation-id-start-post", - label: "Start Evaluation", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/stop-evaluation-preview-simple-evaluations-evaluation-id-stop-post", - label: "Stop Evaluation", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/close-evaluation-preview-simple-evaluations-evaluation-id-close-post", - label: "Close Evaluation", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/open-evaluation-preview-simple-evaluations-evaluation-id-open-post", - label: "Open Evaluation", - className: "api-method post", + id: "reference/api/fetch-evaluation-scenarios-evaluations-evaluation-scenarios-comparison-results-get", + label: "Fetch Evaluation Scenarios", + className: "api-method get", }, ], }, @@ -472,180 +184,6 @@ const sidebar: SidebarsConfig = { id: "reference/api/evaluators", }, items: [ - { - type: "doc", - id: "reference/api/create-evaluator", - label: "Create Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-evaluator", - label: "Fetch Evaluator", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-evaluator", - label: "Edit Evaluator", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-evaluator", - label: "Archive Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-evaluator", - label: "Unarchive Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-evaluators", - label: "Query Evaluators", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-evaluator-variant", - label: "Create Evaluator Variant", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-evaluator-variant", - label: "Fetch Evaluator Variant", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-evaluator-variant", - label: "Edit Evaluator Variant", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-evaluator-variant", - label: "Archive Evaluator Variant", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-evaluator-variant", - label: "Unarchive Evaluator Variant", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-evaluator-variants", - label: "Query Evaluator Variants", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fork-evaluator-variant", - label: "Fork Evaluator Variant", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/retrieve-evaluator-revision", - label: "Retrieve Evaluator Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-evaluator-revision", - label: "Create Evaluator Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-evaluator-revision", - label: "Fetch Evaluator Revision", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-evaluator-revision", - label: "Edit Evaluator Revision", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-evaluator-revision", - label: "Archive Evaluator Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-evaluator-revision", - label: "Unarchive Evaluator Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-evaluator-revisions", - label: "Query Evaluator Revisions", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/commit-evaluator-revision", - label: "Commit Evaluator Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/log-evaluator-revisions", - label: "Log Evaluator Revisions", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-simple-evaluator", - label: "Create Simple Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-simple-evaluator", - label: "Fetch Simple Evaluator", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-simple-evaluator", - label: "Edit Simple Evaluator", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-simple-evaluator", - label: "Archive Simple Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-simple-evaluator", - label: "Unarchive Simple Evaluator", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-simple-evaluators", - label: "Query Simple Evaluators", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/transfer-simple-evaluator", - label: "Transfer Simple Evaluator", - className: "api-method post", - }, { type: "doc", id: "reference/api/get-evaluators-endpoint-evaluators-get", @@ -728,12 +266,6 @@ const sidebar: SidebarsConfig = { label: "List Apps", className: "api-method get", }, - { - type: "doc", - id: "reference/api/create-app", - label: "Read App", - className: "api-method get", - }, { type: "doc", id: "reference/api/update-app", @@ -852,230 +384,110 @@ const sidebar: SidebarsConfig = { items: [ { type: "doc", - id: "reference/api/create-testset", - label: "Create Testset", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-testset", - label: "Fetch Testset", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-testset", - label: "Edit Testset", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-testset", - label: "Archive Testset", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-testset", - label: "Unarchive Testset", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-testsets", - label: "Query Testsets", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-testset-variant", - label: "Create Testset Variant", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-testset-variant", - label: "Fetch Testset Variant", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-testset-variant", - label: "Edit Testset Variant", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-testset-variant", - label: "Archive Testset Variant", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/unarchive-testset-variant", - label: "Unarchive Testset Variant", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/query-testset-variants", - label: "Query Testset Variants", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/retrieve-testset-revision", - label: "Retrieve Testset Revision", + id: "reference/api/upload-file", + label: "Upload File", className: "api-method post", }, { type: "doc", - id: "reference/api/create-testset-revision", - label: "Create Testset Revision", + id: "reference/api/import-testset", + label: "Import Testset", className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-testset-revision", - label: "Fetch Testset Revision", + id: "reference/api/get-testsets", + label: "Get Testsets", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-testset-revision", - label: "Edit Testset Revision", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/archive-testset-revision", - label: "Archive Testset Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/unarchive-testset-revision", - label: "Unarchive Testset Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-testset-revisions", - label: "Query Testset Revisions", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/commit-testset-revision", - label: "Commit Testset Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/log-testset-revisions", - label: "Log Testset Revisions", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-simple-testset", - label: "Create Simple Testset", + id: "reference/api/create-testset", + label: "Create Testset", className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-simple-testset", - label: "Fetch Simple Testset", - className: "api-method get", + id: "reference/api/delete-testsets", + label: "Delete Testsets", + className: "api-method delete", }, { type: "doc", - id: "reference/api/edit-simple-testset", - label: "Edit Simple Testset", + id: "reference/api/update-testset", + label: "Update Testset", className: "api-method put", }, { type: "doc", - id: "reference/api/archive-simple-testset", - label: "Archive Simple Testset", - className: "api-method post", + id: "reference/api/get-single-testset", + label: "Get Single Testset", + className: "api-method get", }, { type: "doc", - id: "reference/api/unarchive-simple-testset", - label: "Unarchive Simple Testset", - className: "api-method post", + id: "reference/api/list-testsets", + label: "Query Testsets", + className: "api-method get", }, { type: "doc", - id: "reference/api/query-simple-testsets", - label: "Query Simple Testsets", + id: "reference/api/create-testset", + label: "Create Testset", className: "api-method post", }, { type: "doc", - id: "reference/api/create-simple-testset-from-file", - label: "Create Simple Testset From File", - className: "api-method post", + id: "reference/api/fetch-testset", + label: "Fetch Testset", + className: "api-method get", }, { type: "doc", - id: "reference/api/edit-simple-testset-from-file", - label: "Edit Simple Testset From File", - className: "api-method post", + id: "reference/api/edit-testset", + label: "Edit Testset", + className: "api-method put", }, { type: "doc", - id: "reference/api/fetch-simple-testset-to-file", - label: "Fetch Simple Testset To File", + id: "reference/api/archive-testset", + label: "Archive Testset", className: "api-method post", }, { type: "doc", - id: "reference/api/transfer-simple-testset", - label: "Transfer Simple Testset", + id: "reference/api/unarchive-testset", + label: "Unarchive Testset", className: "api-method post", }, { type: "doc", - id: "reference/api/upload-file", - label: "Upload File", + id: "reference/api/query-testsets", + label: "Query Testsets", className: "api-method post", }, { type: "doc", - id: "reference/api/import-testset", - label: "Import Testset", + id: "reference/api/create-testset-from-file", + label: "Create Testset From File", className: "api-method post", }, { type: "doc", - id: "reference/api/get-testsets", - label: "Get Testsets", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/create-testset", - label: "Create Testset", + id: "reference/api/update-testset-from-file", + label: "Update Testset From File", className: "api-method post", }, { type: "doc", - id: "reference/api/delete-testsets", - label: "Delete Testsets", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/update-testset", - label: "Update Testset", - className: "api-method put", + id: "reference/api/fetch-testset-to-file", + label: "Fetch Testset To File", + className: "api-method post", }, { type: "doc", - id: "reference/api/get-single-testset", - label: "Get Single Testset", + id: "reference/api/fetch-testcase", + label: "Fetch Testcase", className: "api-method get", }, ], @@ -1141,7 +553,8 @@ const sidebar: SidebarsConfig = { { type: "doc", id: "reference/api/query-traces", - label: "Query traces, with optional grouping, windowing, filtering, and pagination.", + label: + "Query traces, with optional grouping, windowing, filtering, and pagination.", className: "api-method get", }, { @@ -1153,7 +566,8 @@ const sidebar: SidebarsConfig = { { type: "doc", id: "reference/api/query-analytics", - label: "Query analytics, with optional grouping, windowing, filtering.", + label: + "Query analytics, with optional grouping, windowing, filtering.", className: "api-method get", }, { @@ -1210,92 +624,20 @@ const sidebar: SidebarsConfig = { }, { type: "category", - label: "Billing", + label: "Admin", items: [ { type: "doc", - id: "reference/api/handle-events", - label: "Handle Events", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-portal", - label: "Create Portal User Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-checkout", - label: "Create Checkout User Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-plans", - label: "Fetch Plan User Route", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/switch-plans", - label: "Switch Plans User Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-subscription", - label: "Fetch Subscription User Route", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/cancel-plan", - label: "Cancel Subscription User Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-usage", - label: "Fetch Usage User Route", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/admin-create-portal", - label: "Create Portal Admin Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/admin-create-checkout", - label: "Create Checkout Admin Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/admin-switch-plans", - label: "Switch Plans Admin Route", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/admin-cancel-subscription", - label: "Cancel Subscription Admin Route", + id: "reference/api/create-accounts", + label: "Create Accounts", className: "api-method post", }, { type: "doc", - id: "reference/api/admin-report-usage", - label: "Report Usage", + id: "reference/api/create-account", + label: "Create Account", className: "api-method post", }, - ], - }, - { - type: "category", - label: "Admin", - items: [ { type: "doc", id: "reference/api/admin-create-portal", @@ -1326,24 +668,6 @@ const sidebar: SidebarsConfig = { label: "Report Usage", className: "api-method post", }, - { - type: "doc", - id: "reference/api/refresh-runs-admin-evaluations-runs-refresh-post", - label: "Refresh Runs", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-accounts", - label: "Create Accounts", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/create-account", - label: "Create Account", - className: "api-method post", - }, ], }, { @@ -1384,385 +708,283 @@ const sidebar: SidebarsConfig = { }, { type: "category", - label: "Secrets", - items: [ - { - type: "doc", - id: "reference/api/list-secrets", - label: "List Secrets", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/create-secret", - label: "Create Secret", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/read-secret", - label: "Read Secret", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/update-secret", - label: "Update Secret", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/delete-secret", - label: "Delete Secret", - className: "api-method delete", - }, - ], - }, - { - type: "category", - label: "Tracing", + label: "Billing", items: [ { type: "doc", - id: "reference/api/create-trace", - label: "Create Trace", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-trace", - label: "Fetch Trace", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-trace", - label: "Edit Trace", - className: "api-method put", - }, - { - type: "doc", - id: "reference/api/delete-trace", - label: "Delete Trace", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/ingest-spans", - label: "Ingest Spans", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/ingest-spans-rpc", - label: "Ingest Spans", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/query-spans-rpc", - label: "Query Spans", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-analytics", - label: "Fetch Legacy Analytics", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/fetch-new-analytics", - label: "Fetch Analytics", + id: "reference/api/handle-events", + label: "Handle Events", className: "api-method post", }, - ], - }, - { - type: "category", - label: "Invocations", - items: [ { type: "doc", - id: "reference/api/create-invocation", - label: "Create Invocation", + id: "reference/api/create-portal", + label: "Create Portal User Route", className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-invocation-by-trace-id", - label: "Fetch Invocation", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-invocation-by-trace-id", - label: "Edit Invocation", - className: "api-method patch", - }, - { - type: "doc", - id: "reference/api/delete-invocation-by-trace-id", - label: "Delete Invocation", - className: "api-method delete", - }, - { - type: "doc", - id: "reference/api/fetch-invocation", - label: "Fetch Invocation", - className: "api-method get", - }, - { - type: "doc", - id: "reference/api/edit-invocation", - label: "Edit Invocation", - className: "api-method patch", + id: "reference/api/create-checkout", + label: "Create Checkout User Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/delete-invocation", - label: "Delete Invocation", - className: "api-method delete", + id: "reference/api/fetch-plans", + label: "Fetch Plan User Route", + className: "api-method get", }, { type: "doc", - id: "reference/api/query-invocations", - label: "Query Invocations", + id: "reference/api/switch-plans", + label: "Switch Plans User Route", className: "api-method post", }, - ], - }, - { - type: "category", - label: "Annotations", - items: [ { type: "doc", - id: "reference/api/create-annotation", - label: "Create Annotation", - className: "api-method post", + id: "reference/api/fetch-subscription", + label: "Fetch Subscription User Route", + className: "api-method get", }, { type: "doc", - id: "reference/api/fetch-annotation-by-trace-id", - label: "Fetch Annotation", - className: "api-method get", + id: "reference/api/cancel-plan", + label: "Cancel Subscription User Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/edit-annotation-by-trace-id", - label: "Edit Annotation", - className: "api-method patch", + id: "reference/api/fetch-usage", + label: "Fetch Usage User Route", + className: "api-method get", }, { type: "doc", - id: "reference/api/delete-annotation-by-trace-id", - label: "Delete Annotation", - className: "api-method delete", + id: "reference/api/admin-create-portal", + label: "Create Portal Admin Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-annotation", - label: "Fetch Annotation", - className: "api-method get", + id: "reference/api/admin-create-checkout", + label: "Create Checkout Admin Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/edit-annotation", - label: "Edit Annotation", - className: "api-method patch", + id: "reference/api/admin-switch-plans", + label: "Switch Plans Admin Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/delete-annotation", - label: "Delete Annotation", - className: "api-method delete", + id: "reference/api/admin-cancel-subscription", + label: "Cancel Subscription Admin Route", + className: "api-method post", }, { type: "doc", - id: "reference/api/query-annotations", - label: "Query Annotations", + id: "reference/api/admin-report-usage", + label: "Report Usage", className: "api-method post", }, ], }, { type: "category", - label: "Testcases", + label: "Access Control", items: [ { type: "doc", - id: "reference/api/fetch-testcase-preview-testcases-testcase-id-get", - label: "Fetch Testcase", + id: "reference/api/verify-permissions", + label: "Verify Permissions", className: "api-method get", }, + ], + }, + { + type: "category", + label: "Scopes", + items: [ { type: "doc", - id: "reference/api/query-testcases-preview-testcases-query-post", - label: "Query Testcases", - className: "api-method post", + id: "reference/api/get-projects", + label: "Get Projects", + className: "api-method get", }, ], }, { type: "category", - label: "Queries", + label: "Api Keys", items: [ { type: "doc", - id: "reference/api/create-query", - label: "Create Query", - className: "api-method post", + id: "reference/api/list-api-keys", + label: "List Api Keys", + className: "api-method get", }, { type: "doc", - id: "reference/api/fetch-query", - label: "Fetch Query", - className: "api-method get", + id: "reference/api/create-api-key", + label: "Create Api Key", + className: "api-method post", }, { type: "doc", - id: "reference/api/edit-query", - label: "Edit Query", - className: "api-method put", + id: "reference/api/delete-api-key", + label: "Delete Api Key", + className: "api-method delete", }, + ], + }, + { + type: "category", + label: "Workspace", + items: [ { type: "doc", - id: "reference/api/archive-query", - label: "Archive Query", - className: "api-method post", + id: "reference/api/get-workspace", + label: "Get Workspace", + className: "api-method get", }, { type: "doc", - id: "reference/api/unarchive-query", - label: "Unarchive Query", - className: "api-method post", + id: "reference/api/get-all-workspace-roles", + label: "Get All Workspace Roles", + className: "api-method get", }, { type: "doc", - id: "reference/api/query-queries", - label: "Query Queries", - className: "api-method post", + id: "reference/api/remove-user-from-workspace", + label: "Remove User From Workspace", + className: "api-method delete", }, + ], + }, + { + type: "category", + label: "Tracing", + items: [ { type: "doc", - id: "reference/api/retrieve-query-revision", - label: "Retrieve Query Revision", - className: "api-method post", + id: "reference/api/edit-trace", + label: "Edit Trace", + className: "api-method put", }, { type: "doc", - id: "reference/api/create-query-revision", - label: "Create Query Revision", + id: "reference/api/add-trace", + label: "Add Trace", className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-query-revision", - label: "Fetch Query Revision", + id: "reference/api/fetch-trace", + label: "Fetch Trace", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-query-revision", - label: "Edit Query Revision", - className: "api-method put", + id: "reference/api/remove-trace", + label: "Remove Trace", + className: "api-method delete", }, { type: "doc", - id: "reference/api/archive-query-revision", - label: "Archive Query Revision", + id: "reference/api/ingest-spans", + label: "Ingest Spans", className: "api-method post", }, { type: "doc", - id: "reference/api/unarchive-query-revision", - label: "Unarchive Query Revision", - className: "api-method post", + id: "reference/api/query-spans", + label: "Query Spans", + className: "api-method get", }, { type: "doc", - id: "reference/api/query-query-revisions", - label: "Query Query Revisions", + id: "reference/api/ingest-spans-rpc", + label: "Ingest Spans", className: "api-method post", }, { type: "doc", - id: "reference/api/commit-query-revision", - label: "Commit Query Revision", + id: "reference/api/query-spans-rpc", + label: "Query Spans", className: "api-method post", }, + ], + }, + { + type: "category", + label: "Evals", + items: [ { type: "doc", - id: "reference/api/log-query-revisions", - label: "Log Query Revisions", - className: "api-method post", + id: "reference/api/list-evaluators", + label: "Query Evaluators", + className: "api-method get", }, { type: "doc", - id: "reference/api/create-simple-query", - label: "Create Simple Query", + id: "reference/api/create-evaluator", + label: "Create Evaluator", className: "api-method post", }, { type: "doc", - id: "reference/api/fetch-simple-query", - label: "Fetch Simple Query", + id: "reference/api/fetch-evaluator", + label: "Fetch Evaluator", className: "api-method get", }, { type: "doc", - id: "reference/api/edit-simple-query", - label: "Edit Simple Query", + id: "reference/api/edit-evaluator", + label: "Edit Evaluator", className: "api-method put", }, { type: "doc", - id: "reference/api/archive-simple-query", - label: "Archive Simple Query", + id: "reference/api/archive-evaluator", + label: "Archive Evaluator", className: "api-method post", }, { type: "doc", - id: "reference/api/unarchive-simple-query", - label: "Unarchive Simple Query", + id: "reference/api/unarchive-evaluator", + label: "Unarchive Evaluator", className: "api-method post", }, { type: "doc", - id: "reference/api/query-simple-queries", - label: "Query Simple Queries", + id: "reference/api/query-evaluators", + label: "Query Evaluators", className: "api-method post", }, - ], - }, - { - type: "category", - label: "Applications", - items: [ { type: "doc", - id: "reference/api/retrieve-application-revision", - label: "Retrieve Application Revision", + id: "reference/api/create-annotation", + label: "Create Annotation", className: "api-method post", }, { type: "doc", - id: "reference/api/create-legacy-application", - label: "Create Application", - className: "api-method post", + id: "reference/api/fetch-annotation", + label: "Fetch Annotation", + className: "api-method get", }, { type: "doc", - id: "reference/api/fetch-legacy-application", - label: "Fetch Application", - className: "api-method get", + id: "reference/api/delete-annotation", + label: "Delete Annotation", + className: "api-method delete", }, { type: "doc", - id: "reference/api/edit-legacy-application", - label: "Update Application", - className: "api-method put", + id: "reference/api/query-annotations", + label: "Query Annotations", + className: "api-method post", }, ], }, @@ -1776,6 +998,12 @@ const sidebar: SidebarsConfig = { label: "Create Workflow", className: "api-method post", }, + { + type: "doc", + id: "reference/api/list-workflows", + label: "Query Workflows", + className: "api-method get", + }, { type: "doc", id: "reference/api/fetch-workflow", @@ -1812,6 +1040,12 @@ const sidebar: SidebarsConfig = { label: "Create Workflow Variant", className: "api-method post", }, + { + type: "doc", + id: "reference/api/list-workflow-variants", + label: "Query Workflow Variants", + className: "api-method get", + }, { type: "doc", id: "reference/api/fetch-workflow-variant", @@ -1844,15 +1078,15 @@ const sidebar: SidebarsConfig = { }, { type: "doc", - id: "reference/api/fork-workflow-variant", - label: "Fork Workflow Variant", + id: "reference/api/commit-workflow-revision-by-variant-id", + label: "Commit Workflow Revision", className: "api-method post", }, { type: "doc", - id: "reference/api/retrieve-workflow-revision", - label: "Retrieve Workflow Revision", - className: "api-method get", + id: "reference/api/fork-workflow-variant", + label: "Fork Workflow Variant", + className: "api-method post", }, { type: "doc", @@ -1860,6 +1094,12 @@ const sidebar: SidebarsConfig = { label: "Create Workflow Revision", className: "api-method post", }, + { + type: "doc", + id: "reference/api/list-workflow-revisions", + label: "Query Workflow Revisions", + className: "api-method get", + }, { type: "doc", id: "reference/api/fetch-workflow-revision", @@ -1892,98 +1132,56 @@ const sidebar: SidebarsConfig = { }, { type: "doc", - id: "reference/api/commit-workflow-revision", - label: "Commit Workflow Revision", - className: "api-method post", - }, - { - type: "doc", - id: "reference/api/log-workflow-revisions", - label: "Log Workflow Revisions", + id: "reference/api/fork-workflow-variant-by-revision-id", + label: "Fork Workflow Variant", className: "api-method post", }, { type: "doc", - id: "reference/api/invoke-workflow", - label: "Invoke Workflow", + id: "reference/api/commit-workflow-revision", + label: "Commit Workflow Revision", className: "api-method post", }, { type: "doc", - id: "reference/api/inspect-workflow", - label: "Inspect Workflow", + id: "reference/api/log-workflow-revisions", + label: "Log Workflow Revisions", className: "api-method post", }, ], }, { type: "category", - label: "Access Control", - items: [ - { - type: "doc", - id: "reference/api/verify-permissions", - label: "Verify Permissions", - className: "api-method get", - }, - ], - }, - { - type: "category", - label: "Scopes", - items: [ - { - type: "doc", - id: "reference/api/get-projects", - label: "Get Projects", - className: "api-method get", - }, - ], - }, - { - type: "category", - label: "Api Keys", + label: "Vault", items: [ { type: "doc", - id: "reference/api/list-api-keys", - label: "List Api Keys", + id: "reference/api/list-secrets", + label: "List Secrets", className: "api-method get", }, { type: "doc", - id: "reference/api/create-api-key", - label: "Create Api Key", + id: "reference/api/create-secret", + label: "Create Secret", className: "api-method post", }, { type: "doc", - id: "reference/api/delete-api-key", - label: "Delete Api Key", - className: "api-method delete", - }, - ], - }, - { - type: "category", - label: "Workspace", - items: [ - { - type: "doc", - id: "reference/api/get-workspace", - label: "Get Workspace", + id: "reference/api/read-secret", + label: "Read Secret", className: "api-method get", }, { type: "doc", - id: "reference/api/get-all-workspace-roles", - label: "Get All Workspace Roles", - className: "api-method get", + id: "reference/api/update-secret", + label: "Update Secret", + className: "api-method put", }, { type: "doc", - id: "reference/api/remove-user-from-workspace", - label: "Remove User From Workspace", + id: "reference/api/delete-secret", + label: "Delete Secret", className: "api-method delete", }, ], diff --git a/docs/docs/reference/api/start-evaluation-preview-simple-evaluations-evaluation-id-start-post.api.mdx b/docs/docs/reference/api/start-evaluation-preview-simple-evaluations-evaluation-id-start-post.api.mdx deleted file mode 100644 index 50eb4f7319..0000000000 --- a/docs/docs/reference/api/start-evaluation-preview-simple-evaluations-evaluation-id-start-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: start-evaluation-preview-simple-evaluations-evaluation-id-start-post -title: "Start Evaluation" -description: "Start Evaluation" -sidebar_label: "Start Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzlWEtvG0cM/isCTwmwsVyjpz1VtR3Ejdu4lpKLIAjULiVNOvvwPNSqwv73gjO72pek2LEDFPDJ1i75kfzI5XC4A4MrDeEUrjcoLRqRpRpmAWQ5KffrJoYQtEFl5rQXmeeKNoL+nmuR5JIab/S8KSbi+dzr5pk2EECOChMypNjmDlJMCEJoaUAAIoUQcjRrCEDRgxWKYgiNshSAjtaUIIQ7MNucnG9KpCsIYJmpBA2EYK1DMcJIFqgjG9zEUBQzBtV5lmrSjHNxfs5/YtKREjnLQQhjG0Wk9dLKwX0pDAFEWWooNSyOeS5F5GCHXzXr7Bq+5YoJNMJbiDLrlUqXRWpoRarh46WTCCCmJVppIDwvggYtzmC6/bR0rLXBl9Jl8LiA0PNIZpopbAqVviyyTBKmUAT7R6mVEpimyrsbPbj0CEXAcFJs6Dlgt6zvoTAyzwQbeYSiCCqpbPGVInOwAu5t+t7x1QctAkjIYNsVjGPBeijvWpz2nC2rsAFbJbllKVm0nzRjPGwLIqEiK1G9eW+l/E1n6btP1uTWvIVuwAwiDCWP1EKlcHuS3Y4u9Cg+pfw7k8kavfL8P5H6R3YrtPkmrceC7Kk/jaOJL8WyDz6Kgb4LrFsE7f71fVBXDYgigEgRGornaE4BNhpvjIbeGeH8OW7l0sMORo4sm8c/wshnD1saiUnSDzBy5WFLIxVdiy2fYo+z446qx5D169YdXjVfL2qlYmtvpSLsRa1UdO2tvBy0x9uQ0s8o/y+lOseP3ZOgfaZqg8aebFoBUGoTnqxySmP/5MGSJR5NlE1T/0j7OYODRSGt4imDlMoUP4owjUhKimF26DAbeycOHmUPltR2rg3lHS/LA+LbZPePiWN9+1jgkdUmSyCAtU0whQDQmgzYu5LMLfcuP8QcMf6IHvonRzoYu0hZkbTRZF5F6BMfax18Yyh9FQSM6nhrEsqxOVOvgoLrKtqaAEU5oTncnQ4OUB3I+1L/1Eg9dhe/uhddoZv2ep3oCRDPVN9f04qC1X6+uOjf6r6gFLEvl2tust9/pYvJoJDuelVVVFtAZlHr7VOG21m3/Oqob7OoIgsSvTpUf/UArjWuqC6n46KOjMGE3x6ivL6DT11c3nQp1zxA9/R6do+HceXpO5XfD5PJXQ/Q57ZzVecFw6BRR+4it854cbFfO5g1hDAs1xZDv7YYNtYWw11rCVEM3dqCD2hSm2pdYZWEENbG5DocDiOZ2fgMV5QaPEMxxFy4z0hTZJUwW6cyurv5SNsPhDEpCKezpsCYa8tXS1tsnyjMxUdi3spFyciadabEv1WcblGy9lpMjEiXmVOv+qNzbjC6u4HGdATnZz+dnUOXx5YwfxYYuc+isu1eQ9BhYR8/d77EfRNgCJNf6hfsGSeCu2CNdyBtnStMSYKhf8wwlyhc0TvruzKjUygzyolyOYXm2oRnqLC7XPKJnQWw5toIp7DbLVDTZyWLgh+7yYlTFcAGlcAFMzndQSw0/x9DuESpqeftvpHAm/vye3k7qC+T7Siq/KacXHaQf0EAf9G2tw9z7WBdVdCulBlFEeWmod3rXlxq+w/h7tN4AkXxH7y/2xw= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Start Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/{evaluation_id}/start"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Start Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/start-evaluation.api.mdx b/docs/docs/reference/api/start-evaluation.api.mdx deleted file mode 100644 index a97eeac985..0000000000 --- a/docs/docs/reference/api/start-evaluation.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: start-evaluation -title: "Start Evaluation" -description: "Start Evaluation" -sidebar_label: "Start Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzNWUtv2zgQ/isCT7uAGrvBnnxa51HUm6QJ7LQXwxBoaWyzS5EqH0lcQ/99MaRkS7ItO64LbC9NqJlvyJmPw5nJihg616Q3JrcvlFtqmBSaTEIiM1Dut0FCekQbqkwEaxESEgU/LGhzJZMl6a1ILIUBYfBHmmWcxU6u811LgWs6XkBK8adMIbRhoPE3QVNwOmL5OCO98YqYZQbOomJiTvJwvSIs5ySfhMQww3HhC+rmuJMXpnHfEUscKDOQuh+aWOUCVYouyQZpWCIEg0SjXHFSqXQUSzFj89Nwb9cwwXUBg8KgjQYTsWQba6P77KWCQeLOSA1EnKXMbPtwSk28iDT7CRU8JgzMQVUAr1AsGKFYHpKUvkUKjCow9mo90LdgWMg5Xxu1jBLgdNmqhirL4MbJ5SFxCtEUzCuAiNyGD9h1qsGV1wiuCo1842s5/Q6xKYjIFCRI4oor6kes73zfhirkur9/GFoxpAbundfzkMRSKYhNRIV+BRXFkttUnEreaw8W9B1YcO3BDp2vTvWdPK3xq0ac6tWB1819J3meV80YZcEt6EwK7eN02e3ifwnoWLHMafXIyMYxaD2zPBgWwiQ8NRPE0nqlvZS4dhIYuxm13JBeF3dpRf1u1lFnnPq7u4lRXYDpKOZSQ7IzkFMpOVDRGsmBDq49Qh4iHGcvu1PakWD3qO+haGx+EazvEXbxqpGkmBRDKz45f22DYsYAQ+tboUnCUI/yp5pPj7gPZXRrltJpfaV6xt22SMxUbDlVf3yynP+jpfjwaE1mzZ+keWAEKUhyjJZP5W3ebeiSLRe3KT+gM1Fji57/J6d+kfdMm4Nu3ftAN9Xf56NnT8Wz1Ai1xHUa1E0FAl8DBdRAElHTBhiSmVQpypCEGvhgmNtPy7vgYYO+c5bNkt9h5KuHLYwkwOE3GLnxsIWR0l3TZVH3HGHHWpYc5ayrZVEmlf46q5XSW2srpcPOaqV019rK+aA93gso/Qv0/1ao5yF2A8a2JqWQgLApViwZiMSv/LBgwZUkVgi/pH0BgYehjFuF5QMoJRUuxVTEwDkk1cJl81iN/CZ2bXldIKytY9Bo8/mqFwLaQNY4056a4l+o1r5bhfsdLDd5br9jmMCEGBImXmRcNlVUCGn8L9VEiBB5SKRicybaQGOrjUxJSBY2pQ7QGlmFevQQrrybgQIRF6/LnlenfvIzUojb+akwI9Q9+wVpqZCGpau2368dQu7NctE9H50OtAUIsfOSDK24oYaODGQDUX+ADxc4A3+GY4wXEmuK1uh1aGfv2tTIXVPH3wxo08VthVADaFjoV9LFR9cXZxkTzaJsT+g2LWAjpEy09vZ3+L1S2eyT89XLIf8jWIHV5uoHf7Ky0wxdxjs1u2XULNrEnvD7ccxxUEds3FPlAGQRkeJwR6C+i3wPJTmO7qfQ0q526lj9tqEVdr4V9o6PR9Xrdj13vf9fl5fb3f03ylniNIJbfJNPb+0TMJTxli6dy7j29T29zmS/h+7LhxXvtZ638fUBtKZzaHu4155EZwT+TT7ARjyXN13IVR/DtXu9d/cf48a7ry26n5+fn7YAfWwbIxsc5Aa31UFuCmYhccibSW3K+9gjnc20V3cyHDzBa8fNgfF2gcJawIXIKk56ZGFMpnudTsylTS7oHIShF5R1aMbcFdIQW8XM0qn0nwZ3sPwMNAHliFsRGCGJPC3qYuuI0Izduczh0yfpW7OQiv0sD4QlEll4LfQA0nO4mVbfvtE047CZPm9C3Jgkj8svk90T4er36lC3Algb21YHtd3GCLbbmK129w5Nu/tHkZWJNBMz6XxWMKTvIhL0nwak0gqQ7sXHiy5psqQmjJeexqbiL/+ZhI3Qr4OOBWnqbjwxQNO/Nx8wHEgzLE43eDtI2ejXi8gbeDOdjFNfwTrrq4KvY1LhK7LYM9a9BMjZSUgWyO/emKxWU6rhq+J5jss/LCik5SQkL1QxOkV/jTGtLEqCFq8iufb578OzL3bQoCdkIxdinvIa/TiGzLTKTipX8Olx9ExCMi3+qJLKBHUUfXVceiU9gjVW5g/ZW/m1FeFUzC2mrx7xmPjvP3mE4JE= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Start Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/evaluations/preview/start"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Start Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"revisions_ids":{"items":{"type":"string"},"type":"array","title":"Revisions Ids"},"evaluators_configs":{"items":{"type":"string"},"type":"array","title":"Evaluators Configs"},"testset_id":{"type":"string","title":"Testset Id"},"rate_limit":{"properties":{"batch_size":{"type":"integer","title":"Batch Size"},"max_retries":{"type":"integer","title":"Max Retries"},"retry_delay":{"type":"integer","title":"Retry Delay"},"delay_between_batches":{"type":"integer","title":"Delay Between Batches"}},"type":"object","required":["batch_size","max_retries","retry_delay","delay_between_batches"],"title":"LLMRunRateLimit"},"correct_answer_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer Column"}},"type":"object","required":["revisions_ids","evaluators_configs","testset_id","rate_limit"],"title":"NewEvaluation"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"properties":{"steps":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"properties":{"column":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"step":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/stop-evaluation-preview-simple-evaluations-evaluation-id-stop-post.api.mdx b/docs/docs/reference/api/stop-evaluation-preview-simple-evaluations-evaluation-id-stop-post.api.mdx deleted file mode 100644 index 1769729b39..0000000000 --- a/docs/docs/reference/api/stop-evaluation-preview-simple-evaluations-evaluation-id-stop-post.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: stop-evaluation-preview-simple-evaluations-evaluation-id-stop-post -title: "Stop Evaluation" -description: "Stop Evaluation" -sidebar_label: "Stop Evaluation" -hide_title: true -hide_table_of_contents: true -api: eJzlWN1v20YM/1cMPrWAGmfBnvQ0L0nRrNmaxW5fDMM4S7R93Ul3uQ9vnqH/feCdZH3ZbtKkwIA8JZbIH8kfKR6PO7BsZSCewvWGCccsl7mBWQRSofa/blKIwVip5riXmCuNG45/zw3PlMDGGzNvivF0PveqShoLESimWYYWNVncQc4yhBhaChABzyEGxewaItD44LjGFGKrHUZgkjVmDOId2K1C75nm+QoiWEqdMQsxOOdRLLeCBOq4BjcpFMWMQI2SuUFDOBfn5/QnRZNorkgOYhi7JEFjlk4M7kthiCCRucXckjhTSvDEww6/GtLZNXxTmuizPFhIpAtKpcs8t7hC3fDx0ktEkOKSOWEhPi+iBi3eYL79tPSstcGXwufvuAA380RIQxQ2hUpfFlIKZDkU0f5R7oQAoqny7sYMLgNCERGc4Bt8Dtgt6Qcolthngo0CQlFElZRcfMXEHqyAe5e/93z1QYsIMrSs7QpLU056TNy1OO05W1ZhA7ZKcstStmg/acZ42BYkXCdOMP3mvRPiNyPzd5+cVc6+hW7ABMItZo/UYlqz7Ul2O7rQo/iU8u9EJmn0yvP/ROof8pYb+01ajwXZU38aR5NQimUffBQDfRdIt4ja/ev7oK4aEEUEiUZmMZ0zewqw0XhTZvGd5d6f41YuA+xg5MlyKv0RRj4H2NJIigJ/gJGrAFsaqehabOkUe5wdf1Q9hqxft/7wqvl6USsVW3srFWEvaqWia2/l5aAD3ga1eUb5fynVKX7WPQnaZ6qxzLqTTSsCzF1Gc5XCPA1PHhw6pNFEuzwPj0yYMyhYxoXTNGWg1lLTo4TlCQqBKcwOHWbj4MTBo+zBod7OjUXV8bI8IL5Ndv+YONa3jwWeOGNlBhGsXcZyiIA5K4G8K8ncUu8KQ8wR44/ooX9SpIOxj5QU0ViD9lWEPgmx1sE3htJXQcCojrcmoRybpX4VFFxX0dYEaFTI7OHudHCA6kDel/qnRuqxv/fVveiK+Wmv14meAPFM9f01rShI7eeLi/6t7gsTPA3lck1N9vuvdClaxoW/XlUV1RYQMmm9fcpwO+uWXx31rUwqsiAzq0P1Vw/gxrAV1uV0XNSTMZjQ20OU13fwqY8rmC7lmgfont7A7vEwrgJ9p/L7YTK56wGG3Hau6laqQaOM/D1uLWlrsd862DXEMCyXFsOwtBg2lhbDXWsHUQxpaUHHM+pNtaxwWkAMa2uViYfDREiXnrEV5padMT5kivuPyGDiNLdbrzK6u/mI2w/IUtQQT2dNgTFVVqiVttg+TUzxj0islWuSkbNrqfm/VZh+TbIOWkQLz5fSq1fd0Ts3GN3dQGM2gvOzn87OoctiS5g+Cpb4j6Ky7V9D1GFhHz/1vcx/EWCRZb/UL8gzygP1wBqvn7TO/aXkwOI/dqgE477ivfFdmc8plPmkPPmMQnNnQgNU3N0s+bTOIlhTYcRT2O0WzOBnLYqCHvupiRIVwYZpzhbE43QHKTf0fwrxkgmDPWf3TQTe3JffyttBfZFsB1FlN6fUkn/0CyL4C7e9XZhvBeuqfnalzChJUNmGdq9zUaHtv4K7T+MJFMV/lc/YrA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Stop Evaluation"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluations/{evaluation_id}/stop"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Stop Evaluation - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"properties":{"status":{"anyOf":[{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/switch-plans.api.mdx b/docs/docs/reference/api/switch-plans.api.mdx index 27be9b4a6b..53b013edf2 100644 --- a/docs/docs/reference/api/switch-plans.api.mdx +++ b/docs/docs/reference/api/switch-plans.api.mdx @@ -5,36 +5,33 @@ description: "Switch Plans User Route" sidebar_label: "Switch Plans User Route" hide_title: true hide_table_of_contents: true -api: eJyVVMFu2zAM/RWDpw0QkqzYyadl2IAW3dCgTXcJgoC2mVidLKmSnDUL9O8DZcdJmvawUxyJpB7fe+QeAm485Av4KpWSegNLAcaSwyCNvqkgB/9HhrJeWYXagwCLDhsK5DhrDxobghz4FgRIDTk8t+R2IMDRcysdVZAH15IAX9bUIOR7CDvLST44flEA6bZhDKUybbXaTla1KQouMRxYZ07/Fq2Xmrw/PavbBrUMu5XC4uzi5eIEN6QDrlByt0EGxWhm3EKMSwburdGePGO9mkz4pyJfOmmZFcjhoS1L8n7dquy+D+b6RgfSgcPRWiXLROL4yXPO/th/jDEK+Hx1dVn4FypZpbTsu3PG/UdVsI6FC7LDXVFAqfhLBmr8ZYAy5dkt6t3dOml6Lk8Uw4nUgTbkIC6jOJyhc8hSHWj8YTqAEAU0fvOW3IfQn+Q9bgiGYu+HJjKyOd/G49umeKIynFltkfrqnu7jTjQ+0tux+34b3zr63nrsEHI9n88uCnbavnJLmqCMDeazR08uuzdtYMc0FGrDQ2aND2m4Qg05jItuGMdp6MbdBIIAT257GLzWKcihDsH6fDxO1h51vh6hHKOVwFb2VLZOhl1Kmc5ubml3TViRg3yxPA14YBt1xjgPGzRBK2+JKepHftqG2jj5t1O7n/26y2IOpF6blN7TNU3gsunsBgRwGx05k9Gn0QReU3YWzBOAZZqAw9vpGsQrFob+eac0yf4QCJsvxwtGxmQ3qE/qva/QGayBi0AvgcWRyeYJxL4XbwG9eCxnvzN7AZcCatY5X8B+X6CnR6di5ONuZbJGlfRYKHbyGpWnCwDDNoAP973pP2Yg3gb2m3bH3bxF1XJI8sUWneR3kg3EQTYG0OVMy5JsOMm6WD1cZbDv7O5hDjH+A+mQJqo= +api: eJyVVE1vGjEQ/SurObWSBTTqaU+lH1KitApKSC8IoWF3YJ147Y3tpaHI/70ae1kghENPLPZ8PM97b3bgce0gn8FXqZTUa5gLMA1Z9NLomxJycH+kL6pFo1A7ENCgxZo8Wc7agcaaIAe+BQFSQw4vLdktCLD00kpLJeTetiTAFRXVCPkO/LbhJOctdxRAuq0ZQ6FMWy42o0Vllksu0R801hz/rdoatfTbhcKlO754PTvBNWmPC5T8Mi+94s4ThhvCnEG6xmhHjnFdjUb8U5IrrGx4ApDDQ1sU5NyqVdl9F8z1jfakPYdj0yhZxIENnxzn7A5vDSEEAZ+vrs4L/0Yly5iW/bDW2P+oCo1lkrxMuEvyKBV/SU+1Ow9Qpji5Rb29W0X+TqkIoj+R2tOaLIR5EPsztBaZlv0Yf5oEEIKA2q3fo3Yf+oucwzVBX+xyaBxGNuXbcOhtlk9U+BNZzeK7Uusu7ojjw3jTdC8/43sa33vN9iHX0+nkrGDi9o1aolsyFpjLHh3Z7N60nhVTk68MG6oxzkcj+QpyGC6T8YbRYMPkNhDgyG72Jmutghwq7xuXD4dR2oOk6wHKITYS3sIYx9vsG4cC69xR0Vrpt7HeeHJzS9trwpIs5LP5ccADayyp5jSsJwwbeUs8v87749ZXxsq/SQrdEqhSFg9I6pWJ6d0sO2xfsXgmXYIAfmeCPRp8GowuPaZLyMaTm84qWESr7HHEMBBvxtUPihdNHX0CnrD+crhglMxKjfqo3mUqT+D1c/H06plFGf0QQew6lmfQscy8d4u0Y3ouoGJB5DPY7Zbo6NGqEPg47VHmq5QOl4olv0Ll6AxAvzbgw33njo8ZiPeBPdP2sLA3qFoOiRrZoJXcJ0pC7ClkAClnXBTU+KOssx3FVXqdT+4ephDCPyc0LeI= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Switch Plans User Route"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/billing/plans/switch"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/billing/plans/switch"}></MethodEndpoint> Switch Plans User Route @@ -43,29 +40,264 @@ Switch Plans User Route as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai"],"title":"Plan"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "plan", + in: "query", + required: true, + schema: { + type: "string", + enum: [ + "cloud_v0_hobby", + "cloud_v0_pro", + "cloud_v0_humanity_labs", + "cloud_v0_x_labs", + "cloud_v0_agenta_ai", + ], + title: "Plan", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/testsets.tag.mdx b/docs/docs/reference/api/testsets.tag.mdx index 3d904ab06b..e36855ca64 100644 --- a/docs/docs/reference/api/testsets.tag.mdx +++ b/docs/docs/reference/api/testsets.tag.mdx @@ -5,16 +5,9 @@ description: "Testsets" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/transfer-simple-evaluator.api.mdx b/docs/docs/reference/api/transfer-simple-evaluator.api.mdx deleted file mode 100644 index d10b738e8a..0000000000 --- a/docs/docs/reference/api/transfer-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: transfer-simple-evaluator -title: "Transfer Simple Evaluator" -description: "Transfer Simple Evaluator" -sidebar_label: "Transfer Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJzNWEtvGkkQ/iuoTonUMY61pzktayeyk+wa2TgXhKxipoDO9jzSD++yaP571I8ZZhjDArYlTnGYqq+qv6rueqxA41xBNIZPTygM6lwqmDDIC5KoeZ7dJBCBlpipGclHxdNC0CNVssCgQIkpaZIWZQUZpgQR1BKPPAEGPIMICtQLYCDpp+GSEoi0NMRAxQtKEaIV6GVhdZWWPJsDg1kuU9QQgTEORXMtrEDtau8mgbKcWExV5JkiZWEuzs/tPwmpWPLCHgIiuDdxTErNjOjdBWFgEOeZpkxbcSwKwWN35v4PZXVWDdcKaRnR3FuIc+OVgsc80zQn2XDx0kkwSGiGRmiIzku2JsXZy5a3M0dZG3smXEC2C3D1GBul87QtFFyZ5rkgzKBk9U+ZEQIsS5VzN6p36RFKZuG2+HUYYh2UALowKWYvAbx2AGXJKqF8+oNi3SD53mVjbfizY66LWjJISWPbF0wSbmONYthit+NtyMYGbBXtlqV02v6lecjnbUHMZWwEynefjRBfVJ59uDW6MPo9bB7ZgnBN6Z5aKCUud9K7oQsdkncp/2nJtBqdRD0lUv/Kv3Gl/5fWbYfsqB/G0cinYngO92Kg64LVLVn7ITsO6qoBUTKIJaGm5BH1LsDGA5ygpg+aO3+2W7n0sL2BI8sUyVsYefCwwUhCgt7AyJWHDUYquqZLW832s+NK1j5k/bF0VWzN16taqdiqrVSEvaqViq7aihJmfmyu3ltdW0Nezb1wctysAe26+kRSveCKfQ/qNpKSH4vyILlHEMcjCIuwIExcT3bY+/xWlJxeQuzoK+5oRpKyuPVGVI5ODqoD1yEMZdXn7huRE6qkJ9meHBCD+0C87QOxKHi2b9uySfEhPVJlyAXelt6js99rl+1J61S7rpPMle3KwzWlNlAkn3hM+7DrR9cDcjBAl27mnPG58eP1W9i6bBk4YIC6QtfYd+an/RFepl0P5mVptX67uOjO8d9R8MSdrPdJSreBOHKIT0gjd2U25OOmgMjj1tdD7lOjSvgUXh/6Wx5j1Yinav7c4mM9aSmFc1rn9HZRR0ZvZL8+x/h66TJ25/Kmg1yzZNf0ena3H+PK07crvNej0bAD6GPbDuoo7Jd6PiEauwQ3ui9yu4QqcqXdvkkvIIJ+IemJ0z99v5Lq1zsM1V81l09lv1pegb/g1aLKtViw0LpQUb8fi9wkZzinTOMZ8j4W3N0pRbGRXC+dymB485WWvqRDNJ40BVyR8XnTFqtDhgX/SpbBsCIbGL3IJf/PJ0PYkfm2zbHKs1nu1AObA+dcbzC8AbbuzOD87OPZOWwy2hK2FwRjd0Eq2+4zsA0W6vMDA0rd7QBNmP6+/mA9s5EIy52AtyuAG+NrYEPTv7pfCORZo9/1sR1DiK2NmMODxu5MAYNoY71Yh3jCYGHTJBrDajVFRQ9SlKX9+achaaM4YfCEkuPUcjpeQcKV/TuBaIZCUcfd+nGBd3fhDr3vretT+xhVpDMbZuui/R8w+JuWmztR90IsqlRaBZFBHFOhG8qdB83mXH0lhrf3IyjLX5NDe8s= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Transfer Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluators/{evaluator_id}/transfer"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Transfer Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/transfer-simple-testset.api.mdx b/docs/docs/reference/api/transfer-simple-testset.api.mdx deleted file mode 100644 index e655dac986..0000000000 --- a/docs/docs/reference/api/transfer-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: transfer-simple-testset -title: "Transfer Simple Testset" -description: "Transfer Simple Testset" -sidebar_label: "Transfer Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWN9v20YM/lcMPrXANc6CPelpXrMiabsliN29GEZAS7R93elH707ZPEP/e8G7kyxZceKkDtCHPMWRyI/kRx6P4gYsLg1EU5iQsYasgZmAvCCNVubZZQIRWI2ZWZC+NTItFN1aLwkCCtSYkiXNCBvIMCWW9+9vZQICZAYRFGhXIEDTt1JqSiCyuiQBJl5RihBtwK4L1jRWy2wJAha5TtFCBGXpUKy0igWCk4PLBKpqxoimyDNDhkHOTk/5T0Im1rJg9yGCcRnHZMyiVIObIAwC4jyzlFkWx6JQMnbRDr8a1tm0HCs0c2GltxDnpVcK/srM0pJ0y8H3TkJAQgsslYXotBI1Ic5atr5aOLK6yAvl0rBfYIXGER9jiHYrGJyZ57kizKASzaOsVAqYp9q9CzSDSYNSCQ+rMf5RTA9RcbBeLJ9/pdj2U/fBBdrHqwSkZLHrBSaJ5MSguu6Q0fMzFE4Ltk5Nx1I67z5ph3e/LYiljkuF+s2HUqmPJs/eXZW2KO1b2A2VQaSl9EAt1BrXDxK7ows9ch9S/pPJZI1eXf1MpP6Vf5bGPkrrviB76k/jaOJLMfStgxjou8C6leh2nedBnbcgKgGxJrSU3KJ9CLDVKxO09M5K589+K+897GDkyCqL5CWMfPGwwUhCil7AyLmHDUZquuZrvngOs+Nul0PI+n3trpwtX0e1UrPVWKkJO6qVmq7GilHl8rm1OmbdSsDx3AuR4+4d0L0G6yvwViY7TSu03sddOLwB1zfl4DJxfWLP/dtY7rsaxqAjUdSefgQcF3vc4L72nde+86J959g9457Z+eAZ554Bt+5+syfNEvVc+zpwHTBwvU76LzDp96/OV1KfTeo5k/nY5yzPAs8aKA76Ur6hO2lknnlX+h/MDyCM3aIm4PyIbrMyqSrW+fXsrL9h+RuVTNz+ZPCH1rl+/nolIYtS8a89I5XK487bpxTybDdR25A/595B15rM8r4hcnvYjMFlK+v7RR0Zgwm/vY/v7TJs6uLypoNcq2a29Hp294dx7ul7KLkXk8l1D9DntpvUSdj5DXw5DCbNzi8lu8p5LVjkxu8A7QoiGBaa7iT9O/RLwmGYfs1ws52Dq2G9SgQeX/VdvTgstYIIVtYWJhoOY5WXyQkuKbN4gnKIhXSnyFBcamnXTmV0ffmJ1heECWmIprO2wJjry1dMV6xJFhbyEzF3YWU5Ku0q1/J/XwZha7nyWkyOzBa5Uw88jpxzg9H1JQjgMDxrpye/nJzCLpcdYT4aGLujUdt2r0HssNDEDwIodecCLGH62/YFe8ZZSDFr4e1P3c6OInBh6T87LBRKV//OiU3I6hRCVjlfDg2abaYBAVFn1dskdyZgxcURTWGzmaOhL1pVFT/+VpLm/M0E3KGWOGc2pxtIpOHfCUQLVIZ6rjYNBd7chHPzdrC9DLoh1DnOOMF3qEr+DwT8Q+vudtr1hFVdQpsgMIpjKmxLtdfCuNaaY3B9NZ5AVX0HIMT3rQ== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Transfer Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/{testset_id}/transfer"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Transfer Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-evaluator-revision.api.mdx b/docs/docs/reference/api/unarchive-evaluator-revision.api.mdx deleted file mode 100644 index b1fc5111ee..0000000000 --- a/docs/docs/reference/api/unarchive-evaluator-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-evaluator-revision -title: "Unarchive Evaluator Revision" -description: "Unarchive Evaluator Revision" -sidebar_label: "Unarchive Evaluator Revision" -hide_title: true -hide_table_of_contents: true -api: eJzNWdty2kgQ/RWqn5IqxXhd+6Sn9dpJ2ZtsTPm2DxTlaqQGJhlplLk4y1L69625SCAEBDBU8WSMuk9Pn+6ZaR1moHGsIO7Dx1fkBrWQCgYRiIIkaiby2xRiMDnKZMJe6YUqqxdJr0wxkUMEBUrMSJO0QDPIMSOIoW36wlKIgOUQQ4F6AhFI+mGYpBRiLQ1FoJIJZQjxDPS0sCBKS5aPIYKRkBlquxbjUDTT3BrUy+7chyid2xTKcmDBVSFyRcriXZyf2z8pqUSywmYGMTyYJCGlRoZ37oMxRJCIXFOurTkWBWeJI6L7TVmf2cIaC2lp0sxHSITxTmHpLNc0Jrmw1itnEUFKIzRcQ3xeRitocoHz6d3IsdkMMrd+Rckw15bThv1m4sqotsgN52B5alP57LEdkxH8FPL7iIufRwj5T4BeijjP8hjZLWV1hGx8hMPT1WQJpWYjTA4Z4DJAVhGMngh5MHCPVkaQoqYtUa3pB80y2gh9bQHLCDJSCscbsTfB/B3cywhG3J2L63ciUy+JUVpkK4MNheCE+cZot6pz5RHKyMLVXf8WxLrNA+jEZJi/BfDGAZRlVBmJ4TdK9Koj+JPjrI3nCqOxuQpMU2bPVeS9Bq9b1K06WRuRsmHzm8X0VseChMnEcJTvPhnO/1Ii/3BndGH0e1hO1oIwTdmWXiglTjcSu+QLLXo3t6lG59Fq0VMi9av4wpT+Ja3rkmy578bRo2/FMIzsdxx8RXfsNIeG/aCuFyDKCBJJqCl9QX3QY/DKw3YuHVmmSI8R5MnDhiApcTpCkGsPG4JUdA2nB7zrKrL+nIbbruLroFEqtuooFWEHjVLRVUd5JdkeJbdv1+fgXkaguBnvC/Ngfe09dLBEA4e4fJs07+bDZW8k2xflSTKPwPdH4BZhQpi6d6vdTvpjUXJ6DbFhNrmnEUnKk8ZpUy10sNONchPKUFavqdtW5ITu5JMcdHaowUMg3k6UWBQs33YAWqZ4l2mrCuQKby/xvbvfe5dNxeRU57eT7JX1zr05pbZQJF9ZQtuw65WnHXowQJdOKRqxsfFK2TFiXTUCbPUSVslg1+heElrvYrtgvNW/FtXK0vr9fnHR1uCekbPU5df5KKWQ+wtwKWlk7rINXblswEXSeLrLrlq4K3wjz9P+IhKsBvtMjVeplysEBm+y3tSR0Xm0T1dxPldO+y4vHzrYNSSjil7P7vo0rj19mwp88/jYawH62jaL+lQJxp22PgtODZgIKywXQmknIOsJxNAtrARKP7u1EqK6lSiqurOVgnLZrcVp8Nu+kqHd4AUTrQsVd7sJFyY9wzHlGs+QdbFgbqcpSoxkeupcLnu3n2nqL3qI+4NFA3f1+D5qmtUlxIJ9JstoEMC93sX+880RhG8/zDmWWT4Szr3Sx9ziOpe9W1gY4OH87Lezc1hmuGFsNwwmbsNUsd1jiJZYqPOHCChzuwU0YfbH/IFdmS1LkI0C3i8KuvSGHAjR9K/uFhxZvjAI+1r3IdQaFtRe5fo61BsiiNf9hDAv+SCCie2huA+z2RAVPUlelvbrH4akreogCLFDy3F/BilT9nMK8Qi5otba68MH3t2HPfa+M7/FmjlVlc9t2e1i7X8QwXearv0FxB0lk6rHZsH2Mkmo0AsorZPPNmO9cXp3D49Qlv8DfPzbsg== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Evaluator Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/revisions/{evaluator_revision_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Evaluator Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-evaluator-variant.api.mdx b/docs/docs/reference/api/unarchive-evaluator-variant.api.mdx deleted file mode 100644 index 435509ae19..0000000000 --- a/docs/docs/reference/api/unarchive-evaluator-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-evaluator-variant -title: "Unarchive Evaluator Variant" -description: "Unarchive Evaluator Variant" -sidebar_label: "Unarchive Evaluator Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV01v2zgQ/SvGnFqAjd1gTzqtN2kRb7sbo3G6B8MwxtLYYkuJKj+SdQ399wUpSrYs25ukLtBTPjTz3sybITmzAYMrDdEU3j2gsGik0jBjIAtSaLjMRwlEYHNUccofaE611fwBFcfcAIMCFWZkSDmcDeSYEUTQsZzzBBjwHCIo0KTAQNE3yxUlEBlliYGOU8oQog2YdeEwtFE8XwGDpVQZGheJ9SiGG+EMmqB7nyuS3iiBspw5bF3IXJN2cJeDgfuRkI4VL1xaEMGdjWPSemlF71MwBgaxzA3lxpljUQgeexX6X7Tz2eyEWCinkeEVQyxt5RQi57mhFamdUK+8BYOElmiFgWhQsq5Injdf3y69lG2OrTFP2nan5SpZY5FbIcDJ0xXQCcfgUaqvSyEfz0jxT4AMDKgMX2JszsgwDJCBYSl8Sx8Xkut5bLWR2cEAFlIKwvwk40j3riqEkjm4pjQ/gtjUIoCmNsP8RwBvPEBZstpILr5QbA6dn/desy5eySAjg+0oMEm4OxUoxi1dj9VyB7Y+Fy2mbNH+z256h7kg5iq2AtWr91aIP7XM39xaU1jzGvaTdSDcUPZEL1QK1yeF3fOFjrynnP9yYjqPTov+SqL+LT9ybf5X1mNJdtyfp9GkasXwkDxJgW4Izrdk7Sv/ZVDXOxAlg1gRGkrmaJ54fSVo6I3hPp7jLFcVbG/oxbJF8jNI7ivYQJKQoJ9Acl3BBpJarsX6jBd+LdYf63Dl13qdlaVWq2GpBTsrSy1Xw6KFXb20V++cr3s9zhaen6ee8ICE+evQE/IM92YQK0vn9tvlZXdu+4yCJ34q671TSqqXD20JGeTCTwTVA7FvIGTc+vqcu3hW7r0p26w/yipAV6lMrw4NvNv3Qmtc0fYCPW7qxehN3NdDkm+H7anPq6IOdjsF38pbqXs8jetKvlP1vZlMxh3Aqrbtot7XG0avM9KDH0FS6RaRQupq4zApRNAvFD1weuw345fuhzla9zeHFpCy36wywECTeqi3FqsERJAaU+io34+FtMkFrig3eIG8jwX3p0JTbBU3a+8yHI8+0PqGMCEF0XS2a3DnWq5qorZZUz8s+AdycoZ9aWhNKhX/XnVGWJTSysvpxfOl9O710OuD6w3HI2Dg0qiEHFy8vRjAvrwtY3daMPanpeb2n4HtqdDkDwwo80cFDGH2+/aDi8wVJUyqAe90Nffe5KCHoX9NvxDI/bHwgWxCoacQCg07G5N2aYdiA4PoyL65rfeMQeraJ5rCZrNATfdKlKX79zdLypV0FhAXTuDpBhKu3e8JREsUmjqRN9cOvPoUTtfr3nZSamdUlz1f+8CFdX8Bg6+0PrYt+zskrftrE0yHcUyF2QHpXHmuEZsjM769m0BZ/gc/SHX+ -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Evaluator Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/variants/{evaluator_variant_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Evaluator Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-evaluator.api.mdx b/docs/docs/reference/api/unarchive-evaluator.api.mdx index bac28c5f77..7ce3f5dd5a 100644 --- a/docs/docs/reference/api/unarchive-evaluator.api.mdx +++ b/docs/docs/reference/api/unarchive-evaluator.api.mdx @@ -5,67 +5,641 @@ description: "Unarchive Evaluator" sidebar_label: "Unarchive Evaluator" hide_title: true hide_table_of_contents: true -api: eJzNV9tu20YQ/RVhnhJgYylGn/hU1U5gNWltxHJfBMEYkSNx0+Ule1GrEvz3YpYXkaLkyo4D9MmyOHPm7JnhzlEBFjcGggV82KJyaDNtYCkgy0mjlVk6iyAAl6IOY7mlR2qiQECOGhOypDm/gBQTggDaiEcZgQCZQgA52hgEaPrmpKYIAqsdCTBhTAlCUIDd5ZxrrJbpBgSsM52g5crOo1hpFQe0JEezCMpyyZgmz1JDhmEuJxP+E5EJtcyZPgRw78KQjFk7NfpSB4OAMEstpZbDMc+VDP1px18N5xQdarlmLaysKoSZq5JqxjK1tCHdoXjlIwREtEanLASTUuxF8fXS3e3aS9bHXivfitMB0jyGztgs6QfVVFZZpghTKEX7VeqUAlapITczo6sKoRQMd4LX8xDbptSgsUsw/R7AGw9QlqIJylZfKbTH5uCj12yIVwpIyGKfBUaR5C6juuvpOuBZz2EHtulzr1Ky6n/TPd7xWhBKHTqF+s1Hp9SvJkvf3TqbO/sWDg/LINJScmYWao27J4U9yIWBvE8l/8ZicsZgRP9Pov6efZbG/qespw45SH+eRvNqFOuL8CwFhhQ4txT9K+xlUNcdiFJAqAktRY9onwLsXL0RWnpnpedzuspVBTuaerFcHv2IIg8VbF0kIkU/oMh1BVsXaeRa7XiPnVfHL6tzxPpl5/fXXq9XrdKo1VZpBHvVKo1cbRWj3Oals3rPubw9Xo2e9wdnLJBju+OcvNZKlCXH/3R5OXQef6CSkfcVow9ae8/0QtsRkUWpvAeoVsJhgMrC3tPn3L7L8mCL7I/7OasIcm8Sszlm1fYbwhjc0P7KPB3qxRjN+ekxrfc2ceHPVZWu4zot3stbqXv6GNeVfE819mY+vxsAVr3tN/Wh8cId3+PNRpyxVc4zY703tjEEMM41bSX9NW6NlhkXXYdcjltvDQIM6W1jp51WEEBsbW6C8ThUmYsucEOpxQuUY8ylH3dDodPS7nzK9G72iXY3hBFpCBbLbsA9T1Y1K/2wtk2Yy0/EqtVGfupsnGn5TzUAtZOPqyyWRabrzKfXCk49udH0bgYC+BiVXpOL9xcTOFSxF8wvBYb+pWhq+8cgDlRozw8CKPFvBFjC5Of9A2bGPagtaI13vGkHS7bWwdLfdpwrlH7qPYGi7ucC6n5Cx9IbEBAc/OrZN3UpIOaRCBZQFCs09KBVWfLX3xxp7ttSwBa1xBWruCggkoY/RxCsURka0GyvEHjzpX5T3o72PqdPv+ltyo1ljvwfCPiTdoe/1fw9EDfDU9Qh0zCk3HaSB9cWT1k7/ne393Moy38BoeTnoQ== +api: eJydVdtu2zAM/ZWATxsgxFmxJz8t6wI06IYGvewlCApWZmK1tqxKcrbM8L8PlC9xbhiwpzjWIXV4DklX4HHjIF7CbIuZg5WAwpBFrwo9TyCGUqOVqdrSM20xK9EXFgQYtJiTJ8uhFWjMCWLoEc8qAQFKQwwGfQoCLL2XylICsbclCXAypRwhrgD17m4dsvid4SzOW6U3IGBd2Bw9cyhVArU4RtQrAV75jF/NuqtH8wRqPrHkTKEdOb7kajLhn4SctMpwcRDDQyklObcus9F9CwYBstCetA/UjMmUDFpEr45jqgFxY1kpr5obZFE2QS1HpT1tiLXqKF4HRC32Mp0tv3h5JenhTGlDCXSZZVCv6lqcxO2lXraszunUV1zXnOTz1dWpQD8xU0kofzSzNhj/n+ok5FFl/KQ85e4UkBXy4PRSVwwk6BSuV3sR0FrcDbT7XjQEWfbcbQb+9F3WQX+Qc7gh6JNdhgYxRo98+i8DuK7m6hY38GIvb6Pu5TK+NfKdu6yD3Dw+Lk4SNt4emvrUDfRoNhjonHxa8Lybwvkw4D6FGCJjaavoV9T3rIuq4ZjXUb8gQIAju+12QmkziCH13rg4imRWlMkYN6Q9jlFFaBQcM5uG09E1Q8NwO5KlVX4X8k0X81va3RAmZCFeroaAB267ppEOYb2HaNQtsaTtqpqWPi2s+tN0R7ur0iaKNVN6XYTwVt6W21eUb6R5uXGdDe3J+NN4cqmYNmA0Xczb6UEZpqfjEWAgjuTqhQIBlIfRAU+Yf9kfMEs2K0c9yHfe3QNqvSaefvvIZKjCeAQCVWv8ElrjYbCuHAiIj3b83v2VgJR7J15CVb2goyeb1TW/fi/JsocrAVu0Cl9Y0WUFiXL8nEC8xszRCc1+18CH+3akPo5AnKff+azZZObI/0DAG+2Ov0xhYaRdI1UtZColGT8IPtlv3HH9nCzuHh6hrv8Cwzl9EQ== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/evaluators/{evaluator_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Unarchive Evaluator"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/evaluators/{evaluator_id}/unarchive"}></MethodEndpoint> Unarchive Evaluator -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Evaluator Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Evaluator"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "evaluator": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/unarchive-query-revision.api.mdx b/docs/docs/reference/api/unarchive-query-revision.api.mdx deleted file mode 100644 index 42e10ab045..0000000000 --- a/docs/docs/reference/api/unarchive-query-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-query-revision -title: "Unarchive Query Revision" -description: "Unarchive Query Revision" -sidebar_label: "Unarchive Query Revision" -hide_title: true -hide_table_of_contents: true -api: eJy9WVFz2zYM/is+PK13bJz19uSnZU17zdomWZJmDz6fj5Zgmy1FKSTlxPPpv+9AUopkyYrjuXtJZBn4AHwgCRDegOULA6Mx/JWjFmhgwiDNUHMrUnURwwhyxXW0FCucPuSo11ONK2FEqoBBxjVP0KImhA0oniCMoCk2FTEwEApGkHG7BAYaH3KhMYaR1TkyMNESEw6jDdh1RgDGaqEWwGCe6oRb8iF3KFZYSQLk63pwEywMLmIoigkBmyxVBg1hvTs9pX8xmkiLjKKBEdzmUYTGzHM5uAnCwCBKlUVlSZxnmRSRC3743ZDOpuZfpokaK7yFKM29UnBbKIsL1DU/3zsJBjHOeS4tjE4LtkWPM6rWV3PHYNOAl1xxLbiyxGNDtp+sglUSKpcSiJ8mffce17HH4PhWmvg+lmPH4LG5tmLOo2M6fxYgSwu5Xab6aOAerWAQc4t7opLoWysS7IU+J8CCQYLG8EUvdh/M16BeMJhLd0DUcXgcC9ohXF431mvL0ixNJXJVN1UanxSsfJXOvmNke/356JxwcVl+oDPtsMsN27CczJpv6jF024JI6CiXXP/yMZfyT5Oqt1e5zXL7BrpiFBaTPbW41nzdT0xTF17F6lcikzQOz/D/QOpl+kUY+yKtu4Jsqb+Oo7uw8HxtO2w3XXK3a5u16DCo8xpEwSDSyC3GU26Peoq897CDM0dWnsU/w8g3DxuMxCjxJxg597DBSEnX7JiVqCTrj7IclXwd1UrJVmWlJOyoVkq6Kisr1O0uZf/leh/UCwZG5otDYW5Jt2BwvEADh3y7mjQbsEeh4vSRsHuEFD6iOe6qvfSQBYNUxscGv/KQdKbh077QLxJ6SVgFAykS0Q3aWRi2UL44bYpbx/hCv4UqT+jiwk2EKvbv6IQNHya9HDh4WlHKol5xebDHFyVAwUDv6ubaBbCFc+Mat1Zpehb4u1qLbRhq04S0qF9Yqv5i5xvZ6k4CXMXPFbVNr/s2pWuNSskh5d+oVEM9c+lCRFxelRYKd63yld3ZDm3PbufmAmXcdQuseh0nUDD4getDT5LPuPa3HZnvW85f3dCUkRYdfVx3s+Pvwfs3JffO/YI1EvryThGGbuJmSnmsF7A0ybgWJlW17O1GwQfKvvu7oPUgrXtC90h/Z/ZR1fEv8wS1iPYCN5Zrax6FGxSgistHuqJzoSiAhNtoifQkxQ+sG7p1aHvZEcqv56louEqt4l76S04OLHmLzHMR7YeAT8JYE7wIH2o4H+gNqgi7wNrnWSlUmzVQut0Sqbbgrp0XcYNTg8oIK1bd26LjJtduhLjBwW0FU3NlzqXBggE+0S3dJfBgKx8IY/DVYbRM9Jyfd/hkrwIXhN+kgMvuErCPR2dSvsoTv8iePdmd1CDTgfU8QxuHg7OxocPB607h6ppZVog3MNk+mjp0TT2m8aQvoAq5qzT16LkZTjnFO+fuMnqw/n/RrWaBRUE6v7171x4d3nMpYjcYHHzQ2m21A+eGMVouZKMmNgVkGu2omC8XqZ7Ufkm9g26OYhZ9pbY2//Eiu0UdGYM7+valhUpxedNBrlnSAr2e3d1hnHv6+pL76e7uugXoc9tM6rdytj1ojpTBTZqWKc2/s9RYN+u2SxjBMKPJLT4OH/y8fFgOcs1w0xp8F8NqeA4MDOpVOSrPtYQRLK3NzGg4jGSaxyd8gcryEy6GPBPuJDAY5VrYtVM5u774jOtPyF1nPJ7UBW5pqfnF0xSr8sYzQb1POcgIM0jxj18RYUC/9FqFa4znqVMvDznn3ODs+gJqt0I4Pfn15BS2aW0Iu9IduV1S2nZfA9tioYqfqmTitghY5Mnvz1+QZ5SPhKsaXk8Wt0YugQyLT3aYSS7cXnBebEKCxxASDH5mLVynUSUZGIy6ft94zvOEwZJWzGgMm82MG/ymZVHQa6dHmQvT9hkRO95ALAw9x6F0tJyujhn45SbspjeD5469GUyZbkW5Dm0uQOiZO36acQfGslxUmyB3FkWY2RpC63yj1Vdtkeur2zsoin8BbdL6Pw== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Query Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/revisions/{query_revision_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Query Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-query.api.mdx b/docs/docs/reference/api/unarchive-query.api.mdx deleted file mode 100644 index 628cc88b6d..0000000000 --- a/docs/docs/reference/api/unarchive-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-query -title: "Unarchive Query" -description: "Unarchive Query" -sidebar_label: "Unarchive Query" -hide_title: true -hide_table_of_contents: true -api: eJy9V99z2zYM/ld8eGrv2NjN7UlP85r1mrVb3MbZi8+XgyXYYkf9CAlmc3X633ckJUuynTTxpX2yLAL4gA8gAFXAuDEQLeCzJS3JwFJAUZJGlkV+mUAENkcdp/Kebu8s6S0IKFFjRkzaKVaQY0YQgT+9lQkIkDlEUCKnIEDTnZWaEohYWxJg4pQyhKgC3pZOz7CW+QYErAudITtE662wZOUEnGfb0WUCdb109kxZ5IaMM3E+mbifhEysZelchgiubRyTMWurRl8aYRAQFzlTzk4cy1LJ2Ec4/mqcTtVzq9QufpYBIS5sUGq8lTnThnTPvXdeQkBCa7SKIZrUIpDhsfLt1drTNLS7Vp73vgAmiXQ+oZoNRDuJxodVUSjCHGqxT2K9rEX7qlh9pZj7QrlVChyHrevvvRO1gIwYT3SmRRYHFA2Qs9XwTT+G41gQSx1bhfrVe6vUH6bI31xZLi2/hmMxSqbsiVqoNW4fJ2aoC89i9U9HptM4PcM/gdS/ik/S8HdpfSjIA/XncTRvCi/0jicxcOiC063F8PafZuqiZ6IWEGtCpuQW+TGDvY6VINMblt6fh1HeBbOjqSfLlsmPALkJZhuQhBT9AJCLYLYBaela+fb/NBzf459C1m+h9Xd8vShKy9YOpSXsRVFaunYoRtnNqbV67XRrAS/nnh+t+7d3b/4eMfBdnd30rWsn+8v5+eGw/huVTPwoHv2udaFPn9QJMUrlnppRsC+ginhw+pyu25urYXp0oX4qgoN+jprNsc2mmwzG4Ia6VvmwqCdjNHenx3jutqqFjytAN3K91Hb0BnYfDuMi0PdYUj/M57MDgyG3w6TetCvj6HOzMmbEaeG2ybIw7FdITiGCcanpXtK/47uwfY6rdousx7u9EwQY0vftumm1gghS5tJE43GsCpuc4YZyxjOUYyylr21DsdWSt15lOrv8SNsPhAlpiBbLvsC1K6dQIEOxXW6wlB/JBdEsulPLaaHlt5D1ZttNg5bjQubrwqs3tE29c6Pp7BIEuDACSZOzt2cT2KduIOxuAsb+JrTY/hjEHgu7+EEAZf4aABNmv3YHzjNHfoZ5z95hpvamacMB0388LhVKX+YevGqSuIAmiRDWXnfbBES9z4Euk0sBqSuAaAFVtUJDN1rVtXvdLMyLpYB71BJXjrpFBYk07jmBaI3K0IF/u2YBr740d+L1qNtkhn63Cc1doPeorPsHAv6hbf8Dxt/2tK2WqjmexjGV3FM8aE6urHaFPru6nkNd/w8G65Br -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/queries/{query_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-simple-evaluator.api.mdx b/docs/docs/reference/api/unarchive-simple-evaluator.api.mdx deleted file mode 100644 index a206dffe31..0000000000 --- a/docs/docs/reference/api/unarchive-simple-evaluator.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-simple-evaluator -title: "Unarchive Simple Evaluator" -description: "Unarchive Simple Evaluator" -sidebar_label: "Unarchive Simple Evaluator" -hide_title: true -hide_table_of_contents: true -api: eJzNWFlvGzcQ/ivCPCUAYzlGn/apqp3ATtJa8JEXQTAo7kjLlHuEh1pV2P8e8NhLa6mSbAN6iqOd+Wb4zZBzrEHThYJoAp+WVBiqc6lgSiAvUFLN8+wmhghMRiVL+BKfFE8LgU9YCQOBgkqaokZpYdaQ0RQhglriicdAgGcQQUF1AgQk/jRcYgyRlgYJKJZgSiFag14VVldpybMFEJjnMqXaOmAciuZaWIHa18FNDGU5tZiqyDOFysJcnJ/bf2JUTPLCngIiuDeMoVJzIwZ3QRgIsDzTmGkrTotCcOYOPfyhrM665VohLSWaewssN14peMwzjQuULRcvnQSBGOfUCA3ReUkaUpy9bHU7d5R1sefCRWS7AFdPzCidp12h4MoszwXSDEpS/5QZIcCyVDl3owaXHqEkFm6LX4ch1kEJoIlJafYSwGsHUJakEspnP5DpFsn3Lhtrw58dc33UkkCKmnZ9oXHMbaypGHfY7XkbsrEFW0W7YymddX9pH/J5W8C4ZEZQ+e6zEeKLyrMPt0YXRr+HzSNbEK4x3VOLSklXO+nd0IUeybuU/7RkWo1eop4SqX/l37jS/0vrtkP21A/j6MGnYngO92Kg74LVLUn3ITsO6qoFURJgEqnG+InqXYCtBzimGj9o7vzZbuXSww5GjixTxG9h5NHDBiMxCnwDI1ceNhip6JqtbDXbz44rWfuQ9cfKVbGGr1e1UrFVW6kIe1UrFV21FSXM4thcvbe6toa8mnvh5HSzBnTr6hKlesEV+x7UbSQlPxblUXKPII5HEBYhQRq7nuyw9/mtKDm9hNjRV9zhHCVmrPNGVI5OD6oD1yEMZdXn7huRE6qkJ9meHBCD+0C87QNpUfBs37Zlk+JDeqTKkAu8Lb1HZ7/XLruT1ql2XSeZK9uVxw2lNlAol5zhPuz60fWAHAzQpZs553xh/Hz9FrYuOwYOGKCuqGvse/PT/ggv064H87K0Wr9dXPTn+O9U8NidbPBJSreBOHKIj1FT7spsyMdNAZGzztdD7lOrSvgUbg79LWe0asRTtXhu8dFMWkrRBTY5vV3UkTF4sF+fY7xZukzcubzpINcu2TW9nt3tx7jy9O0K7/XDw7gH6GPbDepjtWAa+IxoLRPc7J7kdg1V5Eq7hZNOIIJhIXHJ8Z+h30kN6yWGGq7b26dyWK+vwF/xalXlmixItC5UNBwykZv4jC4w0/SM8iEtuLtVCpmRXK+cymh88xVXvqhDNJm2BVyZ8ZnTFauDRgv+FS2HYUk2MjrJJf/Pp0PYkvnGzfHKs3nu1AOfI+fcYDS+AdL0ZnB+9vHsHDY57QjbK0KZuyKVbfcZyAYL9fmBAKbufoBGmv7efLCe2VCE9U7A2xnCjQk20KHxXz0sBOVZq+X10Z1AiK4NmcOD1vpMAYFoY8PYBHlKILGZEk1gvZ5RhY9SlKX9+adBaeM4JbCkktOZZXWyhpgr+3cM0ZwKhT1/6wcG3t2Fe/R+0NSo7jmqWGc20NZH+z8g8DeuNvei7pVIqmRaB5ERY1jolnLvUbNZV9+K8e39A5TlL/7Wfas= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Simple Evaluator"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/evaluators/{evaluator_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Simple Evaluator - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-simple-query.api.mdx b/docs/docs/reference/api/unarchive-simple-query.api.mdx deleted file mode 100644 index 0b46ac1aa3..0000000000 --- a/docs/docs/reference/api/unarchive-simple-query.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-simple-query -title: "Unarchive Simple Query" -description: "Unarchive Simple Query" -sidebar_label: "Unarchive Simple Query" -hide_title: true -hide_table_of_contents: true -api: eJzNWFFv2zgM/isBnzbAa3rDPeXpeuuG9ba1XdPtHoIgUGwm1iZLriSnzQL/9wMl2bFrJ02DDriX1pHFj+RHiqK5AcuWBkYT+Fqg5mhgGoHKUTPLlbxIYASFZDpO+Qpnhme5wNldgXoNEeRMswwtapLfgGQZwgjc2xlPIAIuYQQ5sylEoPGu4BoTGFldYAQmTjFjMNqAXeckZ6zmcgkRLJTOmCXFhUOx3AraQAauBxcJlOWU8EyupEFDEG9PT+lfgibWPCfLYQTjIo7RmEUhBjdhM0QQK2lRWtrO8lzw2Dk6/GFIZtMwK9dEg+VeQ6wKLxSs5dLiEnXDvHduRwQJLlghLIxOy8iT4XTJ9dXC0dTG9aQ137fpKKN6RRZCALleabwk2TJqu30c1HkDoowg1sgsJjNm9wE2QpUwi28sd/bs1vLOww7OLCkp8uR3KPnmYYOSBAX+BiXnHjYoqeiau7w/TI9L7kPI+tvn/JavF9VSsVVrqQh7US0VXbUWI4rlsbk6Jtkygpczz9u0EK4SNiFZknA6E0xct05tR+lcKYFMNrVUnkzLqFpS8x8Y272mfHBGkMjxxnQ5rKpVS3M2b680fejXBTHXcSGYfnWpPnNj/zFKvrkqbF7Y1/AcLzvi8CySbgNHGVr2/+XoQyHEkwxxi9mBUkxrtt6fPG3Z55H6hcikAsAek9q+se65TNQ9kbfvWsN7NC9bci89ZBmBEslLg195yDICiQ+HQj9ZVy4Jq4xA8Iz3g/Ym3SOUz06a/NYJ6v22oSwyauaYiVEmfo3ag/BjupcDB0+FVVrUKyaOtviiAigj0Mz2Nzjdw9XBuSHZspPF2w3/1rnYhaGKzoVF/USq+mZXad9Aht4NmEy2J69Lr3urqP2TigySfkUqDc3IqSWPmbiqNJSu/fRVw+kOp3+3cQuOIulrkusj7zaUEfzE9bEX6ieksgIrJopDe9FnF8vK07KnnPUXUv+ZcHj9+u7ML6NWQJ8+KdzQh4qZURyb3ZfKcqa5UbIRvd0oeEfRd3+XlA/Cuid0j/R3bu9lE/+yyFDz+CBwY5m25p677yiUSfVInzKMS3IgYzZOkZ4E/4lNRWOHdpAeLn0+z3jLVLqqD5JPGRmQsg6Z5zw+DAEfuLEmWBF+NHDe0wrKGPvAuvWs2tT4JqNwuxSpj+CukxczgzOD0nDLV/3Hoqfp63bxzOBgXMM0TFkwYbCMAB9YbGcugEdreU8Ygy8Oo6NiT/28xQd7Fbgg/DYFTPRfAYdYdCbEsyzxSba1ZHdQw54erO2IYRIKZ+tAh8LrqnDdbVU3xGuYPi5NPbKm6dNkus+hGrnvatoj56YcN7jihit5zlxP9hz5sZvROJTjJet5SVmSxJ9v33bHK9+Z4Ikbngzea+2O2ZGzlQQt46J1H7Y3CBXvuC2fvqD2hPWz8ga6Twmz3HfNfkFj2BK3HfXurY6MwS29fSpJyS+vOuxrX2eBXs/ubjfOPX37Qvvx9va6A+hj2w7qt2rWN/DZMPgaZn0Z2lTRNDBXxrrZn01hBMNc44rj/dCPBod3fog43FRTwHJYjw8hAoN6VY0LCy1gBKm1uRkNh7FQRXLCligtO2F8yHLuzr3BuNDcrp3I2fXFJ1x/ROb64Mm0uWFMyeXTpb2tjhTLOXU6UTWoPCtsqjT/5XMgTCtTL1W6NnihnHhV0pxxg7PrC4iA3PCUnZ78cXIKj4lsbXYXdWy3877wGqJHLNT+052YuUMBFln21/YFWUYxyJhs4O2M26PZYKDC4oMd5oJxl/vOhk0I6QRCSClcDgv8GJO79mLUGO9uIzuNIKW8GE1gs5kzg9+0KEtaDgPQyZT6S83ZnKicbCDhhp6TcDV0DK1LCby6CSfm9WDbkbcdqAIsyePQxgKEnng7kHa1IK2yZxNen8Ux5rYh2CldlGZ1/l9fjW+hLP8DyqHqIA== -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Simple Query"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/queries/{query_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Simple Query - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"properties":{"windowing":{"anyOf":[{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"properties":{"operator":{"default":"and","type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"conditions":{"items":{"anyOf":[{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},{"type":"string","enum":["in","not_in"],"title":"ListOperator"},{"type":"string","enum":["has","has_not"],"title":"DictOperator"},{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"circular(Filtering)"]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-simple-testset.api.mdx b/docs/docs/reference/api/unarchive-simple-testset.api.mdx deleted file mode 100644 index 05dd162ab1..0000000000 --- a/docs/docs/reference/api/unarchive-simple-testset.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-simple-testset -title: "Unarchive Simple Testset" -description: "Unarchive Simple Testset" -sidebar_label: "Unarchive Simple Testset" -hide_title: true -hide_table_of_contents: true -api: eJztWEtv40YM/isCT7vAbOwGPelUd9NF0t02Qez0YhgBLdHWbEePnRm5dQ3998U8JEuW7ThZB+ghpzgS+ZH8yOFQ3IDGpYJwChNSWpFWMGOQFyRR8zy7iSGEMkMZJXxFj4qnhaBH7USBQYESU9IkDcQGMkwJQvDvH3kMDHgGIRSoE2Ag6VvJJcUQalkSAxUllCKEG9DrwmgqLXm2BAaLXKaojfHSomiuhRHwXgY3MVTVzCCqIs8UKQNyORyaPzGpSPLC+A8hjMsoIqUWpQjuvTAwiPJMU6aNOBaF4JENd/BVGZ1Ny7FCGjI0dxaivHRK3l+eaVqSbDn40UowiGmBpdAQDitWE2KtZevbhSWri7wQNg+HBRJUlvgIfbRbQe/MPM8FYQYVax5lpRBgeKrdu0YVTBqUijlYidGPYjqIygTrxPL5V4p0P3WfbKB9vIpBShq7XmAcc5MYFHcdMnp++sJpwdap6VhK590n7fD224KIy6gUKN99KoX4XeXZh9tSF6V+D7uhGhCuKT1RC6XE9VFid3ShR+4x5T8MmUajV1f/J1L/zL9wpZ+k9VCQPfXncTRxpej71kkM9F0wuhXrdp2XQV21ICoGkSTUFD+iPgbY6pUxavqgufXnsJWPDjYYWbLKIn4NIw8O1huJSdArGLlysN5ITdd8bS6e0+zY2+UUsn5d2ytny9dZrdRsNVZqws5qpaarsaJEuXxprY6NbsXgfO75yHH3Duheg/UV+MjjnablW+/TLpzegOubMriJbZ84cP82lvuu+jHoTBS1px8G58UeN7hvfeet77xq3zl3z9gzO5884+wZcOvuN3vWLFHPtW8D1wkD19uk/wqTfv/qfCP1xaReGTKf+pw1s8CLBoqTvpTvacUVzzPnSv+D+QjC2C5qPM6P6DYrk6oyOj9fXvY3LH+h4LHdnwS/SZnLl69XYtLIhfl1YKQSedR5+5xCnu0mahvyl9w5aFuTWu4bIreHTSlctrJ+WNSSEUzM2318b5dhUxuXM+3lWjWzpdexeziMK0ffseReTyZ3PUCX225SH+qlX+DqIZg0S7+UdJKbxWCRK7cE1AmEMCgkrTj9M3BbwoEff9Vgsx2Eq0GzTAQzwMpVvTospYAQEq0LFQ4GkcjL+AKXlGm8QD7AgttzpCgqJddrqzK6u/lM62vCmCSE01lbYGwqzNVMV6xJFxb8Mxn2/NJyVOokl/w/Vwh+b5k4LUMPzxa5VfdMjqxzwejuBhiYMBxvw4ufLoawy2ZH2BwOjOzhqG3b18B2WGjiBwaU2pMBmjD9ZfvCeGbSkGLWwjuSvJ01hSdD0796UAjk9ghYLzY+r1PweTUJs2jQLDQVMAg7295temcMElMf4RQ2mzkqepCiqszjbyVJk8EZgxVKjnPD53QDMVfmdwzhAoWinq9NU4F39/7svA+2F0I3hjrLmUnxCkVp/gMGf9O6u6G2fSGpi2jjBUZRRIVuqfbamKm25iTc3Y4nUFXfAQ31+Y0= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Simple Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/simple/testsets/{testset_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Simple Testset - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-testset-revision.api.mdx b/docs/docs/reference/api/unarchive-testset-revision.api.mdx deleted file mode 100644 index ef68a09b58..0000000000 --- a/docs/docs/reference/api/unarchive-testset-revision.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-testset-revision -title: "Unarchive Testset Revision" -description: "Unarchive Testset Revision" -sidebar_label: "Unarchive Testset Revision" -hide_title: true -hide_table_of_contents: true -api: eJztWUtv20gM/isCTy0wjbPBnnTabLNFsu02QeLkYhgBLdH2dEePzoy86zX034t5KZZlO46rAHvIKY5FfiQ/cjgUvQKNMwXxCIaktCKtYMygKEmi5kV+lUIMVY4ymfMFPWon8yhpwRUvcmBQosSMNEkDsoIcM4IYNgUfeQoMeA4xlKjnwEDS94pLSiHWsiIGKplThhCvQC9LA6G05PkMGEwLmaE2flQWRXMtjIB3OLr1NqKrFOp6bKBVWeSKlEE7Oz01f1JSieSliQliuKuShJSaViK69cLAIClyTbk24liWgieWgsE3ZXRWax6W0hCkubOQFJVT8o7zXNOM5JqnH60Eg5SmWAkN8WnNOhRZs/nyemp5bJsIsguUHHNt2GxJ76esZo1EXgkBhqNNEh8csuWQQf922vghnv7jcPgoNZ9i0qeBcw8ZLFR6XsjewB1azSBFTQeiGtEPmme0F/rCANYMMlIKZ3ux98H85dVrBlNhO8buap2jsp0iQX8GOwYnRSEI870WL1FFwwalZg5WYvKzmA6iNmXoxIrJN0p0t7N8soF28SybGtteYJpy0y5Q3LTIOIDs0DBalrJJ+5v18LbbgoTLpBIo332qhPhTFfmH60qXlX4Pm6EaEK4pO1ALpcTlXmI3dKFD7v7a0mg1OnX1fyL1a/GFK/0srbuC7Ki/jKOhK0V/vx53hr+i7RXtu/A4qIs1iJpBIgk1pY+oe+1dHx1sdG7Jqsr0NYzcO1hvJCVBr2DkwsF6I4GuybLHCyqQ9fvSX1GBr16tBLYaK4GwXq0EuhorC5LdGenwcn3w6jUDJarZsTB3Rrdm0F+gnkPcvE2645+5Bh95utH+fBN/3oXDW3m4c6OrVIVZbctN3ljePqm+1mTXL/Zdg/vWwd462Kt2sL57xpYp/OBpacuoHLrf+EVTSZiQ30a3A0a3t3eGV3hn6F6db6QeTeqFIfO5F2MzCxw1UBz0zh2Wec6V7qv34Qg/p92sBevaaP16dtbdIj6g4KndEUZ/SFnI41eIKWnkwnzaMVaJImk9fUkxjzeT9RT0l8I5aNuTmm0bJLcsgJzIblFLRjQ0T7cx/rT5Hdm4nGkv11oZBnodu7vDuHD07Uvv5XB40wF0uW0n9T4su6PN/TLYFj4vzEq8LJS2y289hxgGpVni0j8DP/2qQVjqqsFqyyq8HjQrdTAjrVyE9XklBcQw17pU8WCQiKJKT3BGucYT5AMsuT1ZipJKcr20Kuc3V59peUmYkoR4NF4XuDP15iqoLdYkD0v+mQyXfnHvNpH8P1cWfmU/d1qGLJ5PC6seNpfWuej85grW3tLg9OSXk1PY5LYlbI4KJvaoBNv2MbANFpr4gQFl9pyAJsx+e3pgPDMpyTBfw9ubyo0liKdD0796UArk9khYP1Y+yyPwWYZmf61sNftMA4N4+88eT8keM5ibyolHsFpNUNG9FHVtvv5ekTT5HPvl+8SwO1pBypX5nEI8RaGo43fTcODdrT9X76OnC6MdT8h5bhK+QFGZ/4DB37Tc8ZuNbR7zUFsrL3meJFTqNYxOrzNF2ByWm+u7IdT1D1T4DRM= -sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Testset Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/revisions/{testset_revision_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Testset Revision - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-testset-variant.api.mdx b/docs/docs/reference/api/unarchive-testset-variant.api.mdx deleted file mode 100644 index 6113c76264..0000000000 --- a/docs/docs/reference/api/unarchive-testset-variant.api.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: unarchive-testset-variant -title: "Unarchive Testset Variant" -description: "Unarchive Testset Variant" -sidebar_label: "Unarchive Testset Variant" -hide_title: true -hide_table_of_contents: true -api: eJzNV01v20YQ/SvCnBJgYzlGTzxVjRvYTdoYsZyLIBgjciRtuvzI7qxbVeB/D/aDlEhKiuM4QE+iyJn3Zt7M7s5ugXFlIJnBlAwbYgNzAWVFGlmWxXUGCdgCdbqWD3TPweb+AbXEgkFAhRpzYtIOYwsF5gQJ9OzuZQYCZAEJVMhrEKDpi5WaMkhYWxJg0jXlCMkWeFM5BMNaFisQsCx1juyisB6FJStnEMMdfQoUo+sM6nrukE1VFoaMA7s4P3c/GZlUy8olBAnc2jQlY5ZWjT5GYxCQlgVTwc4cq0rJ1Oc//mycz3YvwEo7dVgGhrS0wSnGLQumFem9QN94CwEZLdEqhuS8Fn2BPGux+bD0InYZGlOZda1OC1WL1qKwSoGTpi+dk0wAapZLTJ+TYBIhI8NS+RY7nuIajW+tFGPdBkEsylIRFidZr9CMpi1KLQKsxvRHMQNE7coWzMrFZ0p52IxvfaJDvFpATozdKDDLpGsxVDcdMY4VYA+2abIOU77ovtlP7zAXpFKnVqF+8dYq9Ycpi1cfLFeWX0I/VQcimfJHeqHWuDkpbM8XBuKecv7Tiek8Bn31fxL1r/K9NPxNWY8lOXD/Po2moRXjjvwoBYYhON9adPfPp0Fd7kHUAlJNyJTdIz9yz8mQ6RVLH89xljcBdjTxYtkq+xkkdwE2kmSk6CeQXAbYSNLItdg84y7diPXbJu7TjV7PytKo1bI0gj0rSyNXy2KUXT21V2+dby3g+cLzw8k3j484yhw6QB7t3E40de2cfrm4GA5An1DJzI83o9+1LvXTp5+MGKVyT/Fw6BuoMu18/Z59eF73zpNdzu/LEKCrUm5Wh+bG3VlhDK5ot3keN/VijKbu6yHBdzPrzOcVqKPdXrF38gZ1j6dxGeQ7Vd2r6fRmABhq2y3qXTOkj3qTMfjhY126Sd6dIiLM4AmMK00Pkv4ZxwnTjOM0asbb4QBfj9trAAgwpB+amd9qBQmsmSuTjMepKm12hisqGM9QjrGSfikYSq2WvPEuk5vrd7S5IsxIQzKb7xvcul4L3dM1awuHlXxHTsd425hYXpda/hdaIl401sHLCSWLZendm/HUBzea3FyDAJdGUPD87PXZOfR17Ri7ZYKpXyYNt/8MoqdCmz8IoNyvEWDC/NfdBxdZVRrOsdjDO1XG3jEc1WD6l8eVQulXgw9jG0s8g1hiaG8cxqUcywwCkoM3tV2l5wLWpWEHtd0u0NCdVnXtXn+xpF0x5xFv4aSdbSGTxj1nkCxRGRpE3e408OJjXFAvR7vBqJtNU/Bi48NW1v0DAX/T5vAt028a66avttFwkqZU8R7EYI9zDdiukpu7KdT1V5xFLi4= -sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Testset Variant"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/preview/testsets/variants/{testset_variant_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> - - - -Unarchive Testset Variant - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file diff --git a/docs/docs/reference/api/unarchive-testset.api.mdx b/docs/docs/reference/api/unarchive-testset.api.mdx index da988934dc..b7e808abc0 100644 --- a/docs/docs/reference/api/unarchive-testset.api.mdx +++ b/docs/docs/reference/api/unarchive-testset.api.mdx @@ -5,67 +5,834 @@ description: "Unarchive Testset" sidebar_label: "Unarchive Testset" hide_title: true hide_table_of_contents: true -api: eJzNV9tu20YQ/RVhnhJgY6lGn/hUNW5gN2ktxHJfBMEYLUfipstL9qJWJfjvxS6XN1GyHdcB+iSJO3Nm5pzhzqgEgzsN0QqWpI0mo2HNIC9IoRF5dhNDBDZDxROxpwdT2wCDAhWmZEg53xIyTAkiCOcPIgYGIoMICjQJMFD01QpFMURGWWKgeUIpQlSCORTOUxslsh0w2OYqReOiWo9ihJHOIKQ3uYmhqtYOURd5pkk7kMvZzH3EpLkShUscIriznJPWWysnn4MxMOB5ZigzzhyLQgru65x+0c6n7CVWKMeCEXUEntvaKeQrMkM7Ur0E33sLBjFt0UoD0axiDSE+Wna43Xqyhshb6QU4b5Cg9sRzDNV2hiGZTZ5Lwgwq1j7KrJTgeGrSu0Y9WbYoFathFfL/illDVK7Y2izffCFuxtJ98IWO8SoGKRkcZoFxLJwwKBcDMkZ5hsbpwTbSDCKlm+GTfnmnYwEXiluJ6s0HK+WvOs/e3VpTWPMWjkt1IMJQ+kwvVAoPjxJ75Asjch9z/s2R6TxGffV/IvX3/JPQ5klazxU5cv82jpZ1K4Z761kMjFNwvhUb3jovg7rqQVQMuCI0FD+geQywd1fGaOidET6f81He17CTuSfLFvH3CHJfw4YgMUn6DkGuatgQpKFrc3CD53lx/HR5Dlk/H/zI6fh61SgNW22UhrBXjdLQ1UbR0u5e2qt3zrdi8Hrp+ZH+5Pg4NTme9monf1U56x8vL8eLwh8oRezXgMkvSuXq5VtCTAaFdN/CODg2kDkfnH7LzbuujiZIV+ynvE7Q6ZLq3am9qpsOWuOOuuvyvKknY7J0p6eY7na6la+rDh3sevJ29Nbsni/jqqbvMVmvl8vFCLDWdijqfbO0Tpbt0pqSSXK30Ra5rpdYk0AE00LRXtBf07Ct6WnZLbLVtF1/gYEmtW92XqskRJAYU+hoOuUyt/EF7igzeIFiioXwTa6JWyXMwbvMFzcf6XBNGJOCaLXuG9y5nqq7ZGjWCoSF+EiOr7Btz61JciX+qaUPC3dSezlCRLbNvXvgbu6Tm8wXN8DAlVEzNbv44WIGx/wNjN3rgNy/Dk1sfwzsiIW2fmBAqX8XwBCmP3UHLjPHf4pZD++UXEeDNbBg6G8zLSQK3+0+fBmUXEFQEtrNWwODaPC3pJNzzSBxjRCtoCw3qOleyapyj79aUk6xNYM9KoEbx9+qhFho9z2GaItS0yjF9tqAN5/D2/F20u01w9QbVTMn6R6ldb+AwZ90GP6V8m9+0jRNGQzmnFNheq6ji8p1V9vyi9u7JVTVv0olw3E= +api: eJydVcFu2zAM/RWDpw0Q4qzYyadl3YAG3dCgzXYJgkKVmVitLamSnC0z/O8DZdlxkgYDdopjPVKP75F0A55vHWQrWKLzDr2DNQNt0HIvtZrnkEGtuBWF3OGj7zDAwHDLK/RoKbYBxSuEDOL5o8yBgVSQgeG+AAYWX2tpMYfM2xoZOFFgxSFrgKv93Sbk8HtDOZy3Um2BwUbbinu6v5Y5tOwU0a4ZeOlLehXJJ/McWnpv0RmtHDq64mo6pZ8cnbDSUFmQwUMtBDq3qcvkPoKBgdDKo/KBmDGlFEGF9NlRTDOibSxp5GV3g9B1FxQZSuVxixYOBK8DomW9RG+Wrp+eUXg4K2tcvKrLEtp1S6lOog4iryKjc4WGWtuWUny8ujqX5icvZR4KT75aq+3/65Kj57KkJ+mxcueAUouj00vdMBKg17ZdHyTg1vL9SLdvuiNIglduO3Jm6K4e+h2d41uEIdllaBAjWdLpv+SnurqrI27kxEHeTt3LZXzp5Hvrsh5ys1wuzhJ23h6b+qMf4mQ5DHGFvtA04Ua7bqh9ARmkxuJO4q809qpLm8Ngt+mwDoCBQ7vrd0BtS8ig8N64LE1Fqet8wreoPJ9wmXIj4ZTTLJwm1wQN4+xQ1Fb6fcg3W8xvcX+DPEcL2Wo9BjxQw3UtdAwb3ONG3iKJGVfTrPaFtvJP1xdxOxVdFKkl1UaH8Chs5PaZixdUtM6ozo72dPJhMr1UTAxIZot5nBsuwtz0PAIM2Ilcg1DAAKswNOCRV58OB8SSjKq4GuV7y9cjYoMiHn/71JRchrEI1zfR8hVEy2FYUA4YZEf7/OD7mkFBHZOtoGmeuMMftmxbev1aoyX31gx23Er+RFquGsilo+ccsg0vHZ5RHPYLvLuPY/Q+AfY29d5hRfbueFnTP2Dwgvvjb1BYEUXfQE0EzIRA40ehZxuNOm2YjcXdwxLa9i/NUHRa sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Testset"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/testsets/{testset_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Unarchive Testset"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/testsets/{testset_id}/unarchive"}></MethodEndpoint> Unarchive Testset -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/unarchive-workflow-revision-rpc.api.mdx b/docs/docs/reference/api/unarchive-workflow-revision-rpc.api.mdx index 92d1c5fa3d..129828ef6f 100644 --- a/docs/docs/reference/api/unarchive-workflow-revision-rpc.api.mdx +++ b/docs/docs/reference/api/unarchive-workflow-revision-rpc.api.mdx @@ -5,67 +5,1999 @@ description: "Unarchive Workflow Revision" sidebar_label: "Unarchive Workflow Revision" hide_title: true hide_table_of_contents: true -api: eJzNWdtuGkkQ/RVUT4k0MV5rn+ZpvXYie5ONkW/7gJBVzBTQSc8lfcFL0Pz7qm8DwwALBEs8YZiqU12nqrt6juegcCwh7sM/hfg+4sWrhEEERUkCFSvy2xRi0DmKZMKm9PLqjV4ETZlkRf4iygQiKFFgRoqEgZpDjhlBDG1rlkIELIcYSlQTiEDQD80EpRAroSkCmUwoQ4jnoGalwZBKsHwMEYwKkaEyq9EWRTHFjUFYd+feB+ncplBVA4MtyyKXJA3cxfm5+UhJJoKVJjWI4UEnCUk50rxz740hgqTIFeXKmGNZcpZYJrrfpPGZLy2xFIYnxVyEpNDOya+c5YrGJJaWemUtIkhphJoriM+rqE2SjZvP7kaWymaM2niKgmGuDKEN8+2sVVFtkWvOwbDU4vHZQVsaIzh+oCZ+ndEbZOIioFBshMkxU7j0kCGCVpNCHA3coVURpKhoR1Rj+kGxjLZCXxvAKoKMpMTxVuxtMH979yqCEbfHx+aOZfIl0VIV2dpgw6LghPnWaLeyc+UQqsjA0RS5RrWB8B0RP9YgDnSiM8x/BfDGAlRVFIyK4TdK1JqD6pOlrA1n66KwuQhMU2ZOH+S9Bq07lC2cP41I2bD5y3J262NBwkSiOYp3nzTnf8ki/3CnVanVe1jN1YAwRdmOXigEzrbyuuILLXa3d6lC69Hq0FMi9WvxhUn1v7RuSrLlvh9Hj64V/cA+7DT4ivbUaY7Ww6CulyCqCBJBqCh9QXXUU/DKwXYuLVm6TN8iyJOD9UFS4vQGQa4drA8S6BrOjjjqAll/zvywC3wdNUpgq44SCDtqlEBXHWVKon3j2r1dn717FYHkenwozIPxNWPoaIl6DnF1mjRH8/Gy14IdivIkmEPghyNwgzAhTO37x34n/VtRcnoNseVqck8jEpQnjdMmLHSw10S58WWowrvcrhU5oZl8khedPWrw4Ik3N0osS5bvegFapXif21YIZAtvhvjB3e+8q6aqcKr3t5Pslc3OvQWlplAkpiyhXdh18swePeihK6unjNhYO0HpLWJdNQLs8g4WtKJrtO8IrVexPSB+0b3WnarKuP1+cdGWqZ6Rs9Qm1/koRCEO16hSUsjspPUtuWrAi6TxdJ8ttTQoXBcvsv5SJBhu9Zkcr9P31ogLzmSzqSWj82ierqN8oS32bV4utLdrCFKBXsfu5jSuHX3b6nvz+NhrAbraNov6FETVTkvBBKsETAqjvZaFVFZgVROIoVsalZBeu0E2k90gG8rufJ3eWnVr9Rbchg8irb1ywUSpUsbdbsILnZ7hmHKFZ8i6WDK7xyQlWjA1sy6XvdvPNHMjHuL+YNnADh3XRE2zun5Yss9k6PTysBO62E/XGV4Xdtc4SzHLR4V1D8KYXVznsncLS1d3OD/77ewcVultGJvdgondLSG2fQzRCgt1/hABZXargCLM/lg8MCszRfF6kcfbXs2VV2PPh6J/VbfkyPKlG7ArdB98oWGhkErb0r7YEEG8QV5f1HsQwcS0T9yH+XyIkp4Eryrz8w9NwpR04AXeoSG4P4eUSfN3CvEIuaTWyutjB97d+931vrMYXs2MQtlzU3Ojt5lvEMF3mm3654A9Qyahv+be9DJJqFRLIK0jzzRivWV6dw+PUFX/AaoBjX0= +api: eJydVcFu2zAM/RWDpw0Q4qzYyadl3YAG3dCgTbdDEBSqzMRqbUmV5HSZ4X8fKMuO07QbsFOU6JF6fHxkGvB86yBbwU9tHzelfnawZqANWu6lVvMcMqgVt6KQO7x7jqA7izvppFZ31ghgYLjlFXq0lKoBxSuEDAaQzIGBVJCB4b4ABhafamkxh8zbGhk4UWDFIWvA7w2FOm+l2gKDjbYV90SiDlm89CUBrmPuZJ5D264ppTNaOXSU5Ww6pY8cnbDSUCGQwU0tBDq3qcvkOoKBgdDKo/IE58aUUoS60wdHMc2ImbGkipfdC0LXXVAkLJXHLdoRw/OAaNkgQ3hC7a82QaMYp+8fUPhRWN+HvkBo2QBWdVlCu25bdhJ+UHQVua3fzjmU37aU6+PZ2alaP3gp86BF8tVabf9fqhw9lyWdpMfKnQJKLY5uT0SKbhgp0cvdrg9acGv5fqTkN90RpB5Ubvuau3rod3SObxGGZG9DgxjJkm7/1Qeqq3s64kYtOcjbqft2GV86+V57rIdcLJeLk4Rdb4+bettPctJbIhl8xqBCX2gaeKOdD1PtC8ggNeRgfE7vucO0XwEu7X3t0mY06W06rAtg4NDu+q1Q2xIyKLw3LktTUeo6n/AtKs8nXKbcSHhJdxZuk3OCAg25Q1Fb6fch32wxv8T9BfIcLWSr9RhwQ17s3HUMGxrLjbxE0jkuq1ntC23l784ycV0VXRQJKdVGh/CoeeT2mYtHVLSZqM6O9nTyYTJ9q5gYkMwW8zhSXISR6nkEGLAXcg1CAQOswjyBR159OlwQS+pcxdUo399bfkRx0MbjL5+aksswO4FIE92wgugGYEB+AAaDI+Cw6+icHe//gy3WDApyWLaCpqEkt7ZsW/r5qUZLzV0z2HEr+T1JvWogl47OOWQbXjo84T1sJnh3HQfwfQLs9Xp6Ayjq/o6XNX0DBo+4f/GnFbZL0RusiYiZEGj8KPZkGZITh2FaXN0soW3/AFlgjuA= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Workflow Revision"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/revisions/{workflow_revision_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Unarchive Workflow Revision"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/revisions/{revision_id}/unarchive"}></MethodEndpoint> Unarchive Workflow Revision -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "revision_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Revision Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>revision</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowRevision"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>author</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>date</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowData"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>service</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>configuration</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Artifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"WorkflowFlags"} + value={"0-item-properties"} + > + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "revision": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/unarchive-workflow-variant.api.mdx b/docs/docs/reference/api/unarchive-workflow-variant.api.mdx index e855606aae..78a04ea5c0 100644 --- a/docs/docs/reference/api/unarchive-workflow-variant.api.mdx +++ b/docs/docs/reference/api/unarchive-workflow-variant.api.mdx @@ -5,67 +5,1008 @@ description: "Unarchive Workflow Variant" sidebar_label: "Unarchive Workflow Variant" hide_title: true hide_table_of_contents: true -api: eJzNV01v20YQ/SvCnBJgY6lGTzxVtRNYTVoLsZweBEEYkSNxkyWX2Q+5qsD/XuxySYmipDiOAvTkD868N/NmdnZ2CwZXGqIp/C3Vl6WQTxpmDGRBCg2X+SiBCGyOKk75muZPwWi+RsUxN8CgQIUZGVIOZQs5ZgQRHBrOeQIMeA4RFGhSYKDoq+WKEoiMssRAxyllCNEWzKZwENoonq+AwVKqDI2Lw3oUw41wBnXEvU8VR2+UQFnOHLQuZK5JO7TrwcD9SEjHihcuJ4jgwcYxab20ovcxGAODWOaGcuPMsSgEj70E/c/a+Wz3IiyUE8jwiiGWtnIKgfPc0IrUXqQ33oJBQku0wkA0KFlHIk+bb+6XXsc2RWPLk7bZea1K1ljkVghw4nTUc6oxQGX4EmNzQYZhgAwMS+E77XSSXM9jq43MjgawkFIQ5mcZR7p3UyGUzMHRGoVFI9WPIL5tQCrQ1GaY/wjgnQcoS1YbycVnis2Rzn7nJevClQwyMtgOApOEu35FMW7JeqqUe7B1x7aYskX7P/vZHeeCmKvYClSv3lkh/tAyf3NvTWHNazjM1YFwQ9kzvVAp3JzV9cAXOuqec/7Tiek8Oh36fxL1L/mBa/NNWU8l2XH/Po0mVSuGAf8sBbohON+StYfxy6Bu9yBKBrEiNJTM0TxzeiVo6I3hPp7TLDcVbG/oxbJF8jNIHivYQJKQoJ9AclvBBpJarsXmgvO+Fuv3TZj4tV4XZanValhqwS7KUsvVsGhhVy/t1Qfn6y6Pi4XnN51v3x9hMTp2gzzfu1mQytJ5/Xp93d2nPqHgid+Wem+Vkurly1RCBrnw60B1PRwaCBm3vn7PJJ6VBzfKLukPsgrQ1SnTq2N76O620BpXtBufp029GL2J+3pM8d0OPPV5VdTBbq/cO3krdU+ncVvJd668d5PJuANY1bZd1Md67e8dbtrg949UusdBIXX1DDApRNAvFK05PfXrjVX3w3qr+9sjj4Ky3zwugIEmta4fElYJiCA1ptBRvx8LaZMrXFFu8Ap5HwvuD4Sm2CpuNt5lOB69p80dYUIKouls3+DB9VvVQW2zpnhY8PfktAxPmKE1qVT836otwuMlrbycWDxfSu9er7s+uN5wPAIGLo1KxcHVL1cDONS2ZeyOCsb+qNTc/jOwAxWa/IEBZf6cgCHMftt9cJG5koQdNeCdLeXBbRzkMPSP6RcCuT8SPo5tqPIUQpVh94rRLulQaWAQHX8A7oo9Y5C6zommsN0uUNOjEmXp/v3VknL1nAXAhVN3uoWEa/d7AtEShaZO3M3AgVcfw7l63dttSO186prnGx+3sO4vYPCFNider354pHVvbYPlMI6pMHsYnVnnmrA5LOP7hwmU5X9LvE7O +api: eJydVU1v2zAM/SsGTxsg1Fmxk0/LugELuqFBv3YIjEKVmVitLamS3C4z/N8HyrLjNM0G7BQleqQeHx+ZFjzfOMhW8FPbx3WlXxzkDLRBy73UalFABo3iVpTyGe9eIujumVvJlQcGhlteo0dLWVpQvEbIIN7fyQIYSAUZGO5LYGDxqZEWC8i8bZCBEyXWHLIW/NZQpPNWqg0wWGtbc0/PNyGLl74iwG2fOlkU0HU5ZXRGK4eOkpzOZvRRoBNWGqoAMrhqhEDn1k2VXEYwMBBaeVSe4NyYSopQcPrgKKadEDOW5PCyf0Hopg+KfKXyuEE7IXgWEB0bRAgvqO3FOggUw/T9Awo/iRr0j+VBx0asaqoKurzr2EH0Ts5VZJYfTTnW3nWU6uPp6aFUt7ySRRAi+Wqttv+vU4Gey4pO0mPtDgGVFnu3BxJFJ0yEGLTu8p0U3Fq+nej4XfcEqQG127zlrAH6A53jG4Qx2XFoECO5ptt/tYHq6p+OuHzq3UHeXt3jZXzp5XvrsQHy7fp6eZCw7+1+U2+G+U0GRyS34/zW6EtNU2606+fZl5BBaiw+S3xJ77nDdJh7l0ZPu7TdjXiXjhsCGDi0z8M2aGwFGZTeG5elqah0U5zwDSrPT7hMuZHwmus83CZnBAUab4eisdJvQ775cnGO22/IC7SQrfIp4IqM2FtrHzZ2lRt5jiRyXFLzxpfayt+9X+KeKvsoUlGqtQ7hUfDI7TMXj6hoJVGdPe3ZyYeT2bFiYkAyXy7iPHER5mngEWDAXsk1CgUMsA7DBB55/Wl3QSypbzVXk3x/7fcew1Eaj798aiouw9wEHm20wgqiFYABmQEYjHaAccnRMdvb+jtP5AxKMle2gralFDe26jr6+alBS53NY5570nnVQiEdnQvI1rxyeMB63Enw7jKO3vsE2NvVDN1X20C3augbMHjE7f4/VVgr5WCuNgLmQqDxk9CDLUguHMdoeXF1DV33B0hBhwo= sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Workflow Variant"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/variants/{workflow_variant_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Unarchive Workflow Variant"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/variants/{variant_id}/unarchive"}></MethodEndpoint> Unarchive Workflow Variant -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", format: "uuid", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>variant</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowVariant"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>artifact</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span + style={{ + opacity: "0.6", + }} + > + object + </span> + </summary> + <div + style={{ + marginLeft: "1rem", + }} + ></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "variant": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/unarchive-workflow.api.mdx b/docs/docs/reference/api/unarchive-workflow.api.mdx index c015a7c5ee..27a7b9151d 100644 --- a/docs/docs/reference/api/unarchive-workflow.api.mdx +++ b/docs/docs/reference/api/unarchive-workflow.api.mdx @@ -5,67 +5,598 @@ description: "Unarchive Workflow" sidebar_label: "Unarchive Workflow" hide_title: true hide_table_of_contents: true -api: eJzNV01v20YQ/SvCnBJgY6lGTzxVtRNYTVoLsdwcBMFYkSNxkyWX2Q+5KsH/XszyW5QcxXGAniRxZ97MvBnuPOVg+dZAsIRPSn/ZSPVoYMVAZai5FSqdRRCAS7kOY7HDh8fKCBhkXPMELWryziHlCUIAtcGDiICBSCGAjNsYGGj86oTGCAKrHTIwYYwJhyAHu8/I1Vgt0i0w2CidcEtxnUexwkoyqDMczSIoihVBmkylBg2hXE4m9BGhCbXIKHcI4M6FIRqzcXL0sTIGBqFKLaaWzHmWSRH6UsefDfnkncwyTURYUUYIlSudqoRFanGLupPhlbdgEOGGO2khmBSsocSHS/e3G89XH3ojfRdOGwjzEDpjVdI3qjJZKyWRp1Cw5lHqpAQiqc5tZkZXJULBCA53XDpulf4RxLcNSAkau4SnPwJ44wGKgtVGav0ZQ3tkCt55yoZwBYMELe8nwaNIUI+5nPdoHaRZDWEHtu5yL1Ky7j/pVnc8FoRCh05y/eqdk/IPo9I3t85mzr6Gw1oJRFhMzvTiWvP9k7we+MKA3aec/yQyyWMwof8nUv9SH4Sx36T1VJED9+/jaFGOYnUJnsXAMAXyLVj/Anse1HUHomAQauQWowdunwLs3LsRt/jGCp/P6ShXJexo6slyWfQzgtyXsFWQCCX+hCDXJWwVpKZrvacldl4cv6nOIev3vd9eLV8vGqVmq4lSE/aiUWq6mihGuu1zZ/WOfGl5vFh6Xh18e38cWx1nuDUyoijI/NfLy6Hq+JtLEXlNMXqrtdLPlxwRWi6kFwDlQjg0kCrsnX7P3bsqDnZIW+0HVSZInUnM9phKa/eDMXyL7YV52tSTMVrQ6TGqW4W49HWVoSu7ToNbekt2T5dxXdL3VF9vFov5ALDsbb+p97UIHn1qRXCCNlYkkTNlrBfFNoYAxpnGncDHca39zDjvKONi3ChqYGBQ72oV7bSEAGJrMxOMx6FULrrgW0wtv+BizDPhJ91g6LSwe+8ync/e4/4GeYQaguWqa3BHY1UOSt+s6RHPxHskyir9PnU2Vlr8W3a/UvBx6UWciHSjvHtF39QnN5rOZ8CAyijJmlz8cjGBQwp7xvRG8NC/EXVsfwzsgIWmfmCAiX8dwCJPfmsPKDPqQCU+K7yjHTtYrxUNFv+x40xy4Sfex8+rZi6haia0Ut4Ag6D/V6ft6IpBTNMQLCHP19zgvZZFQY+/OtTUtBWDHdeCr4nCZQ6RMPQ9gmDDpcFBks3lAa8+Vu/I61Grb/rJ141Nqaskz+kXMPiC+4P/Z/4CiOvBySuLaRhiZju+g/uKJqwZ/Pnt3QKK4j/5nOJ5 +api: eJydVU1v2zAM/SsGTxsgxFmxk0/LugENuqFBm66HIAhYmYnVypYryekyw/99oL/i1CkG7JQgeiQfH/mYEjzuHEQreDD2eavNq4O1AJOTRa9MNo8hgiJDKxO1p81rCwIBOVpMyZPl6BIyTAkiQOvVFqXfqBgEqAwieCnIHkCApZdCWYoh8rYgAU4mlCJEJfhDzrHOW5XtQMDW2BQ9Fy7qNF55zYBZmzyYx1BVa07pcpM5cpzlYjrlj5ictCpn8hDBXSElObctdHDbgkGANJmnzDMc81wrWfcaPjmOKQfMcstKeNVUkKZoglrCKvO0IztgeFkjKgG9UFwiO9xsa5HaOPP4RNIPwjrtuwahEj04K7SGal1VYhR+VHTVcluPc/ZtVxXn+HxxMVbpF2oV1xoE36019v8lismj0vxNeUrdGKCNPHkdidNuwUCBTuZqfdQArcXDQMEfpiHI2qdud26rOuhPcg53BH2y96G1GMGSX/+lP/fVlG5xg1Ec5W3Ufb+Nb41854p1kKvlcjFK2Mz2dKj3nWuDh6NrU/KJYU/nxvnaxT6BCMLc0l7Ra/iIjsJueV1Ydl83Kq7C/g6AAEd233m/sBoiSLzPXRSGUpsinuCOMo8TVCHmCt5ym9WvwSVDgZ3sSBZW+UOdb7aYX9PhijAmC9FqPQTc8eI1q3QK66eIubomFrU9SbPCJ8aqP81+tEcpaaJYNZVtTR3eXZmG21eUz5Tx+eE+G9rTyafJ9L1m2oBgtpi3/mEnR/1pbGAg3sjVCwUCKK3NA54w/XJ8YJY8rxSzQb6z8z1h1kvi6bcPc42q9kddv2xHv4J29CCAhw/H2+VAQDRYAKbeb8BaQMIrFK2gLDnw3uqq4p+be89zjJXDR83+2KJ2NGLX3xj4cNta6WMA4jzrZzqM/l/2qAtG1iu0R6u4XL0xopsw82hCZ1JS7gdRo7vGWXqDLG7ullBVfwELanMP sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Unarchive Workflow"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/preview/workflows/{workflow_id}/unarchive"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Unarchive Workflow"}></Heading> +<MethodEndpoint method={"post"} path={"/preview/base/workflows/{workflow_id}/unarchive"}></MethodEndpoint> Unarchive Workflow -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"properties":{"flags":{"anyOf":[{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(NoListJson-Output)","type":"object"},{"type":"null"}],"title":"NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Query Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "artifact_id", + in: "query", + required: true, + schema: { type: "string", format: "uuid", title: "Artifact Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>workflow</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowArtifact"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>flags</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"WorkflowFlags"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_custom</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_evaluator</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_human</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "workflow": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/unassign-role-from-user.api.mdx b/docs/docs/reference/api/unassign-role-from-user.api.mdx index c76f108f6f..7330953d5b 100644 --- a/docs/docs/reference/api/unassign-role-from-user.api.mdx +++ b/docs/docs/reference/api/unassign-role-from-user.api.mdx @@ -5,81 +5,349 @@ description: "Delete a role assignment from a user in a workspace." sidebar_label: "Unassign Role From User" hide_title: true hide_table_of_contents: true -api: eJztVt9v20YM/lcOfFkLCHYW7ElPMxAXNdqhQepsD4kRMBJtXSvdqcdTWk/Q/z7wTrLkeAm2dXnrk607kh/58cexhZw4c7r22hpI4YJK8qRQOVuSQma9MxUZr7bOVgpVw+SUNgrVV+s+c40ZzW7NrVm4Hae3Rik1XtzpXL1i716nal2QWl0ou1W+oCNV0aAKdTkVjQe9dID0Vjmq7AOFo+CceNQbsG6HRv+JEsSTqFOhXi/YmQiH7xEqxDy4MKjQl4bYq1dX8U+v+QbZLy5Xh2t7/4kyH6i5It84M7Bzb22ZqrVrSOntGMyE6a/IipssI+ZtU5Z7lYec5NEYaqbB1tv1+nL5LaOQvFStgj1HSrNCo8g5G3IVQAa/3MhpbomVsV4V+ECqJldpZm2NMFCT21oXo8dsQtk/xGzqHL02uwPaTxwC5RkkYGtyIQ2rHFJoTAz+Tu7vhPM7UYAEanRYkSfHkN60YLAiSGFaX5CAlrKt0ReQgESpHeWQetdQApwVVCGkLfh9LbrsnTY7SMBrX8rBH4Mxtcqh65IDSijBwfyXhtz+P9lfBjNTw49q9fshPkwMPo5CKP1+hCux0nUb0eXaGiYW8fOzM/k5HiAfD5WrrnphSCCzxpPxIo51XeoseDv/xKLTji50Xdcl8Mv5+anh37HUeQxyKVX2L6xC7aTkvI5+5+QlKWkL2lPFpwKlzY5u0ew/bEMJHjMkRPcn2njakYNu0yXDGTqH+wmN7210ELoEKt49x/hvxIw7goOxZyostNxabrsRO86fo2zfhLgidC+3Gc2M9EZ2nw7jItL3d2CDiAyJE4MxtxX5wkrbx6kWutwXkML80Nc8b6c93s3D4IAEmNzDMAwaV0IKhfc1p/N5Vtomn+GOjMcZ6jnWGqRembLGab8PKovL1TvavyXMyUF6s5kKfJRaidk/FjsQj7V+R8JD31qLxhfW9X039FgRtSRQbbY2qPecLIJzanG5ggQkjFjWZ7OfZ2eQPCr2I2Epc8xCmQ/Y4RqSRywc4oekn18peMLq1/FCPKst+wrNxN51P4KVdLp6I8/edRzBR261Y8f9WBR+LAovvyj0refpm5/XJeowOkPNt/3YuBnXAZkQ6aPlIE6OTQKFZS/SbXuPTNeu7Do5jm+iDIdcM96XMie3WDI9U/khoTJSX6unXPxM+8kK8YBlIzLhvXgBnNON4qUR+7VihNnIh9OC8/+zOQxgs59iDr4cZTw8v8Uw4dteZJFJGU6UT7YFCeDwMl0s3y/XS+i6vwDtNX7O +api: eJztVktv20YQ/iuLuTQBCMk1euKpaq0gQlLEcOT2YAvGmByRG5O7zM7SiUrwvxezfMqujbapbzlJ3J3nNzPfTgMpceJ05bU1EMMZFeRJoXK2IIXMOjMlGa/2zpYKVc3klDYK1Rfr7rjChBbX5tqsXMbxtVFKTRc3OlWv2LvXsdrmpDZnyu6Vz+lIVTSoRF3MRbuDXjq49FY5Ku09haMQnETUG7Aue9KZdRka/SdKgr14UJ8Jh+/JQ0h18Dyo0Oea2KtXF92fXvMNsl+db8Zre/uJEh8QuSBfOzOAcmttEautq0np/ZTDDOAvyIrrJCHmfV0UB5WGUqSdMdRMg6232+35+mtCoWax2gR7jpRmhUaRczaUKDgZ4nITlKklVsZ6leM9qYpcqZm1NYJARW5vXZc9JjPI/qHPukrRa5ON3n7gkCgvIAJbkQtl2KQQQ2265G/k/kYwvxEFiKBChyV5cgzxVQMGS4IY5m0FEWjp1gp9DhFIltpRCrF3NUXASU4lQtyAP1Siy95pk0EEXvtCDv4YjKlNCm0bjV5C5w3mP9fkDv/J/jqYmRvuWvTbLX9w2cOYBcBvN3whVtp2J7pcWcPEIn56ciI/xyzxcexTddELQwSJNZ6MF3GsqkInodjLTyw6zRRC27ZtBD+dnj42/DsWOg1qai099S+sQuWkwbzu4k7JSwniBrSnkh8LFDY5ukVz+LAPDXeMkADdn2jjKSMH7a6NhjN0Dg8zGN/bLkBoIyg5ew7x34gZM4LR2DP9FAZsK7ft5Ltjm6NqX4W8Ote93G4yM8Hboft0GmcdfH/nbBARSnhksKttST63MuQdh4WZ9jnEsBynmJfNfKLbZaAJiIDJ3Q+jX7sCYsi9rzheLpPC1ukCMzIeF6iXWGmIHjTQKtyqX0UUpJmZktppfwj2Vuebd3R4S5iSg/hqNxf4KI3Utcax2FgVrPQ7EpD6uVvVPreuf1qGAcw7LUFBm70N6j1gfWy/YHJHRqhA8uzCPln8uDh5KpleQa3ON/08YBLmYYgjiEH0AK4RKIh6WovBE5Y/TxcSZWXZl2hm9i57ZlZCCeqNvIaXHTMfhddMo/l9bfi+NrzY2tBPn6evflkVqAO1hlZvelq5mpYDYZD4warQMcsugtyyF+mmuUWmS1e0rRx3b6bwQ6oZbwvh0T0WTM80fCioUO5r9VSId3SYLRT3WNQiE96TF/Az7hcv7ajfNiY3O/lwWvz8/yAO1GsOc59DLEeFDq9yPnB704usEum+mfKjJUISGB+ss/X79XYNbfsXsWB6XA== sidebar_class_name: "delete api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Unassign Role From User"} -> -</Heading> +></Heading> <MethodEndpoint method={"delete"} path={"/workspaces/{workspace_id}/roles"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Delete a role assignment from a user in a workspace. Args: - workspace_id (str): The ID of the workspace. - email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. - role (str): The role to remove from the user. - request (Request): The FastAPI request object. +workspace_id (str): The ID of the workspace. +email (str): The email of the user to remove the role from. +org_id (str): The ID of the organization. +role (str): The role to remove from the user. +request (Request): The FastAPI request object. Returns: - bool: True if the role assignment was successfully deleted. +bool: True if the role assignment was successfully deleted. Raises: - HTTPException: If there is an error in the request or the user does not have permission to perform the action. - HTTPException: If there is an error in updating the user's roles. +HTTPException: If there is an error in the request or the user does not have permission to perform the action. +HTTPException: If there is an error in updating the user's roles. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}]} -> - -</ParamsDetails> +></Heading> -<RequestSchema - title={"Body"} - body={undefined} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "email", + in: "query", + required: true, + schema: { type: "string", title: "Email" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "query", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "role", + in: "query", + required: true, + schema: { type: "string", title: "Role" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-app.api.mdx b/docs/docs/reference/api/update-app.api.mdx index 4a27ce4da7..0ba076482c 100644 --- a/docs/docs/reference/api/update-app.api.mdx +++ b/docs/docs/reference/api/update-app.api.mdx @@ -5,77 +5,355 @@ description: "Update an app for a user or organization." sidebar_label: "Update App" hide_title: true hide_table_of_contents: true -api: eJztVk1v4zYQ/SvEXJoFVDsNetKp6m6AGNt2g2y2l8QIJuJY4lYiuSSVxBX03xdDSpadNG7RFuilhgHTmu83M4/qIWDlIb+BwloP6wwk+dIpG5TRkMMnKzGQQC3QWrExTqDoPDlh+FuhVr8jqy5u9a0uXOXzWy2EYO07JcWJD+5NLq5rEqt3wmxEqIlli6RlcdsYlOIkhSmsHZUnQWl0QKWVriZLobGlGO2KQuf0FHDn4UMXbBeSGxPPz71oemy2onSEgST7/MZzdqjlnnNUnibfF9fXl+dPJUVQcrGKZTgSyjMw5Jxxyd1+nsbFYwRLGvJCmyBqfCBhybXKe2W0CEZgWZL3O2AgA2PJRVBXEnLoYmF3aC1kYNFhS4Ect6wHThdySGBDBopbZjHUkIGjL51yJCEPrqMMfFlTi5D3ELaWrXxwSleQQVCh4QeFtWIlYRjWyZp8+NHILZs8d8aIkg4sQmsbVcZ8l589D02/F8s6riYo8qPuXcr5eBa/sM4wZJOSuf9MZTgo6mZ2tp6Nd1MAw8D2jrw12qfoZ6en/HM44B+7iP+ma8TVqAz/qD4l/wrG2b+PRZyAo6Ck1Rih+f7s7CUav2KjZKxVnPNY/30oJAVUDZ9UoNa/VGhMeSBFvf2wiVN9iMaQ7Z4oHagiB8N6hgOdw+0eZD+ZlCBD3PrqGLo/k/dYEeycva4awRDXLP2zVnBdKfSot9eJGd6E7utlvEvw/VGwSYVZ6YXD1NuWQm1k4oKyjrwRashhidb6ZZ+mZYAMPLmHiUw610AOdQjW58tl2ZhOLrAiHXCBaolWARODp7JzKmyjSXG5ek/bC0JJDvKb9b7CRx6M1OpDtR3KaNV74qJHGiu6UBs3XigTm9XJiqvikbuaeen8CVvb0CGvzFMDSm9MjDYtU6xFFJcryICrTiN/uvhucQrP770D5Xh/lHEFplSjGLJnoO3gggyojfMPgbD9YRZwIdb40KLe8zdes0Uk+YNM+nkB/7+M/4PLeJzVQE9haRtUkVhi1/txqyL7esggH1l4nUFtfGBJ39+jp0+uGQZ+/KUjx5uzzuABncJ7HsybHqTyfJaQb7DxdGQETq5GqnkjXktu2i7Nq/WATcf/IIPfaDu/K0QKrafF7Ufh2xTn20h0s/EL3mdOThZFyZ04qrve46PL4vrtBWRwP75XtEaykcNHZlF8TJmaWHikjvishwZ11TFX55Cc8ucrw6GrnA== +api: eJztVk1v4zYQ/SvEXJoFVDsNetKp2myAGNt2g6y3l8QIJuJY4q5EckkqiSvovy+GlPyRNG7RFuilRgArmjdfjzOP7iFg5SG/gcJaD6sMJPnSKRuU0ZDDJysxkEAt0FqxNk6g6Dw5YfivQq1+R4bObvWtLlzl81sthGD0nZLixAf3JhfLmsTinTBrEWpi2yyhLG4ag1KcpDSFtSN4MpRGB1Ra6WryFBpbitmuKXROTwm3ET50wXYhhTHx+XkUTY/NRpSOMJDkmN95rg613AuOytMU+3K5vLp4KimSkotFbMORUJ6JIeeMS+H26zQuPkaypCEvtAmixgcSllyrvFdGi2AEliV5vyUGMjCWXCR1ISGHLjZ2h9ZCBhYdthTI8ZH1wOVCDolsyEDxkVkMNWTg6GunHEnIg+soA1/W1CLkPYSNZS8fnNIVZBBUaPhFYa1YSBiGVfImH94auWGX58GYUdKBTWhto8pY7/yz56Hp93JZx90ERX7E3qWaj1fxK2OGIZtA5v4zleGgqZtdsNXOeTsFMAzs78hbo33KfnZ6yl+HA/6xi/yvu0Zcj2D4R/0p+Vc4zv59LuIEHCUlrcZIzY9nZy/Z+A0bJWOv4oLH+u9TISmgavhJBWr9S0BjygMr6s2HdZzqQzaGbPtG6UAVORhWOzrQOdzsUfazSQUyxa2vjrH7C3mPFcE22OvQSIZYsvXPjoL7SqlH3N5J7OhN7L7exrtE3x8lmyCsSi8CprNtKdRGJi0o66gboYYc5mitn/dpWgbIwJN7mMSkcw3kUIdgfT6fl43p5Awr0gFnqOZoFTy/HIpoFecMBVYNT2XnVNjEeMXV4j1tLgklOchvVvuAjzw1aQ4OYdsjQKveEzMyalzRhdq48baZpK5OXtwyz+P1TrQunrC1DR2Kzm6kQOm1idmmTUutvMXyC2leJKYldXk6+2F2+lrvo4MorhbjrmAZd2UqO8Ige8bullfIgNq4KBAI2592Bm7KGh9a1Hvxxvu4iLfBQUX9blP/v7X/g1t7nNtAT2FuG1RRgeKp9+P6RZn2kEE+yvUqg9r4wJa+v0dPn1wzDPz6a0eOt2iVwQM6hfc8pDc9SOX5WUK+xsbTkRE4uR416Y14rbhp0zSv2QM2Hf8HGXyhze5HRdTaelrifjSepzzfR0XcOb+4IFi8k0dR8kkcxa72hOuqWJ5fQgb34w+Q1kh2cvjIcouPqVITG48yEt/10KCuOhb1HFJQ/nwDDBi6Kw== sidebar_class_name: "patch api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update App"} -> -</Heading> - -<MethodEndpoint - method={"patch"} - path={"/apps/{app_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"patch"} path={"/apps/{app_id}"}></MethodEndpoint> Update an app for a user or organization. Args: - app_id (str): The ID of the app. - payload (UpdateApp): The payload containing the app name. +app_id (str): The ID of the app. +payload (UpdateApp): The payload containing the app name. Returns: - UpdateAppOutput: The output containing the newly created app's ID and name. +UpdateAppOutput: The output containing the newly created app's ID and name. Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. +HTTPException: If there is an error creating the app or the user does not have permission to access the app. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_name"],"title":"UpdateApp"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_id","app_name"],"title":"UpdateAppOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "app_id", + in: "path", + required: true, + schema: { type: "string", title: "App Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"app_id"} + required={true} + schemaName={"App Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"app_name"} + required={true} + schemaName={"App Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "App Name" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "app_id": "string",\n "app_name": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-evaluation-scenario-router-human-evaluations-evaluation-id-evaluation-scenario-evaluation-scenario-id-evaluation-type-put.api.mdx b/docs/docs/reference/api/update-evaluation-scenario-router-human-evaluations-evaluation-id-evaluation-scenario-evaluation-scenario-id-evaluation-type-put.api.mdx index f6f00a0c9a..2669342041 100644 --- a/docs/docs/reference/api/update-evaluation-scenario-router-human-evaluations-evaluation-id-evaluation-scenario-evaluation-scenario-id-evaluation-type-put.api.mdx +++ b/docs/docs/reference/api/update-evaluation-scenario-router-human-evaluations-evaluation-id-evaluation-scenario-evaluation-scenario-id-evaluation-type-put.api.mdx @@ -5,73 +5,552 @@ description: "Updates an evaluation scenario's vote or score based on its type." sidebar_label: "Update Evaluation Scenario Router" hide_title: true hide_table_of_contents: true -api: eJzdV0tv4zYQ/ivEXNoCWjsN9qRT3W2AGNsmRuLk4hgCLY1tbiVSS1JJXEH/fTGkZD3sOMm2wALNJQk5L37zzUMlWL4xEC7gssi4/HDxyNOCW6GkgWUACZpYi5z+hxDu8oRbNIxLhns5ZmKUXAv1k2GPyiJTmplYaWQrbjBhSjJhDbO7HEcP8kHecGHQhA+SMcYu5/PZxXOMzkPIpmtWOB9szUVqyFQheWG3Sot/MPH6aAstGwNXSmLIzs8+sivFPilpUVpmLLeFYbFKkBU5hVjEMRqzLtLa/ggCUDlq94JpAiH486h9V9S8K9KqsKijLQHUETBRV1ok0VHlo4ck3L0gcKIoLywEkHPNM7SoKSslSJ4hhNDzBAEIykfO7RYC0Pi1EBoTCK0uMAATbzHjEJZAdiEEY7WQGwjACpvSQZtlNk2gqoJjfjrR/pcOb2uzJzw7K9/rEmWREZ99uni0iiwa6++MkJsUo0wlmLpj4vhhjHMyWVVL7xaN/V0lO/I1jCL2hKMrnuepiJ36+Iuhcik7Qeaa2GYFGvqPysTpyN312mW5/whCpT6RRZpC1YnynnQrAkDptxoR0uIG9Um7t85eRW/SGmMbcWmeUH9vmJ+8FTbxVqoAVGHzwpq+QWExM0cA4lpwaYl5J0h176UckYK9jvfzFr1rL1lVQSOqVl8wtj26LbrBHHjpvNj1z5ZDDc0bJ3sfXGu+O4nddY1URSXwZsycaOSL6eW3T0mKXZFUYz6imN+gdO/EXkOrE0bf/utQOTfvQmoq90CZKBdSYnKUsCulUuTytC3DZt5CFYD8FxV65Sr0CEyvPN9PV6gq0tVociWNT+352Rn96g/j23am3dTC8PaO5L18PD8/NHzPU5H4Xn2htdLvsDqgZIKWi9SR8zhnUxX3bt/Ty5ZDorQA/6l8gJTJzGxOUfsvNIZvsGXdiRlGYLB6NpwuAnqXd13LdRv4Hl6P7svP+MPDd5JK8/nswKDPbYZ2q2izadYKu4UQxm4sfuhsMeOyt1tU4yMrQE+msxdUvQsKsqIpi/qxWV8KnUIIW2tzE47HcaqKZMQ3KC0fcTHmuXClYzAutLA7pzKZTT/j7hJ5QuNnsewK3BLTPHf6Yvu08Vx8RkKxXism9fboCVEvFVuvRTARh2/aKX/xzLM8xXZKtzyoJ257MJyU7c1+1i36s6yVGE6rPdOXbdNf9Jt6q9xr2z3Ntgv6BUX23uA6/lo5tGoCTVwu2GQ2paBQG98Dzka/js5guP/3hKkn8Nj1hAZqdw3BIOn7dNNylrmGABZ59lt7QYnIlbEZlx17viGyY7vjjVvJhwGWbaP6n32r1OS2+GzHecqFa20O5rKu7Hrh7VY2BBAOvxuO1PFArL/2h8O1fBnAVhlLDsuSULvTaVXR8dcCNVXwsmb3igi2KCERhv5OIFzz1OCJnP18U/fQX9hLb26qXO5cEfkKgAD+xt3BVxJNjR/jvIvhj4vCCbo5uW2aaVlL1ez7MPdfWo2Vg+FOwXuNSUzMPym77Ayd2d0cAljV3030wQUhaP5Eg5I/+YBV7mlKH1Z0VkLK5aagcRyCN0k/3wD7w9F0 +api: eJzdVktv4zYQ/ivEXNoCWjsN9qRTvWmAGNtmjcTZi2MItDS2uSuRWj6SuIL+ezEkbcmPGPsosEBziUzOfDOcxzfTgOUrA+kMblzF5ZvrJ146boWSBuYJFGhyLWr6DSk81AW3aBiXDHdyzOQouRbqF8OelEWmNDO50sgW3GDBlGTCGmY3NQ4e5aO848KgSR8lY4zdTKeT65ccvYWUjZfMeRtsyUVpCMpJ7uxaafEPFkEfrdNyC3CrJKbs8uItu1XsSkmL0jJjuXWG5apA5mpy0eU5GrN0ZcQfQAKqRu1fMC4ghXCede/Ktu/KtHIWdbamAPUETNaXFkV2UvnkIQn3Lyg4WVY7CwnUXPMKLWrKSgOSVwgp7FmCBATlo+Z2DQlo/OKExgJSqx0mYPI1VhzSBggXUjBWC7mCBKywJR10WWbjAto2OWWn5+1/afA+wp6x7FG+1yRKV1E9h3TxbJFZNDbcGSFXJWaVKrD0x1Tjxz5OCbJt58EsGvtOFRuydehFHgqOrnhdlyL36sNPhtql6TlZa6o2K9DQL2oTryM3H5Y+y/uPoKjEE+nKEtqelx9Jt6UAKP21IEJaXKE+i3vv8Vp6k9aY24xL84z6e928CihsFFDaBJSztbPmJCDXmm/O4n2I2i2VxQ/gjOUOxmS1kJKSeQJpoVSJXJ7HMmwSENoE5A/k9NbntE22AmrxCXPbax/PzV19blso8DG0LelqNLWSJlTY5cUF/dun7/uOBe+iMHx9DQcrby8vj4E/8lIUobuvtVb6G1APOqNAy0VJX8JiZY4FSpXv3X5L9c+7CIdC6QL8lwoOUiYrszpHZX+jMXzlWyWInGE9CgaLbHKc3Y5NZv5dwXSU67f8Lrwhuq8/488QvrOlNJ1OjgBDbiu0a0WzcDuI7BpSGHoifdObe8Nmbxq1wxNDY0+mN0navQtysiVeRv20HXhOl5DC2trapMNhXipXDPgKpeUDLoa8FnC4loz8LbsiUd9XBnOnhd14vNFk/B43N8gLYrPZvC9wT2UYCmtfrGOUWrxHCnGcUqO4jIRqiTNqHbQohlTgd93QuH7hVV1iR/pdkUQC7w4Oibe72VHnrIEnrgWXloZyT2J7GiR7bTDv+HLWhM8sPmWnHE4pK3ig2VFkmHdy7w2ei5fKRytWV0zFO55/RklrA6U1ZOli8Pvg4rXcRQU2mowjefDck8c27F4MkoPq2NUFzf3KMwdY5NUf3QUlpVbGVlz28AJzslNryZ3f9g4dbTpG+5+twbHQLb7YYV1y4TnQh7mJFBB3qT4FQALp4Up6ouEPxPY3yvRw45snsFbGksGmoag96LJt6fiLQ03dPI+VvqBimzVQCEPfBaRLXho8k7Nf7yLZ/sZee/O24+XGN1ToBkjgM26OFnAaLz/HeD+GP88LL+gH6npLrE2UitX3ZhqW+C3K0RZAzgeNUU6Vf1Z23ptOk4cpJLCIKznt8pCC5s80UflzcFjVoUxpZ6ezBkouV47mdgoBkv7+BV6vPIg= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Evaluation Scenario Router"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} - path={"/human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={ + "/human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}" + } +></MethodEndpoint> Updates an evaluation scenario's vote or score based on its type. Raises: - HTTPException: If update fails or unauthorized. +HTTPException: If update fails or unauthorized. Returns: - None: 204 No Content status code upon successful update. +None: 204 No Content status code upon successful update. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}},{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}},{"name":"evaluation_type","in":"path","required":true,"schema":{"type":"string","enum":["human_a_b_testing","single_model_test"],"title":"EvaluationType"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"vote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vote"},"score":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Score"},"correct_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer"},"outputs":{"anyOf":[{"items":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"variant_output":{"type":"string","title":"Variant Output"}},"type":"object","required":["variant_id","variant_output"],"title":"HumanEvaluationScenarioOutput"},"type":"array"},{"type":"null"}],"title":"Outputs"},"inputs":{"anyOf":[{"items":{"properties":{"input_name":{"type":"string","title":"Input Name"},"input_value":{"type":"string","title":"Input Value"}},"type":"object","required":["input_name","input_value"],"title":"HumanEvaluationScenarioInput"},"type":"array"},{"type":"null"}],"title":"Inputs"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"HumanEvaluationScenarioUpdate"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_scenario_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Scenario Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_type", + in: "path", + required: true, + schema: { + type: "string", + enum: ["human_a_b_testing", "single_model_test"], + title: "EvaluationType", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>vote</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>score</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + integer + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>correct_answer</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>outputs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_output"} + required={true} + schemaName={"Variant Output (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Output" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>inputs</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"input_name"} + required={true} + schemaName={"Input Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Input Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"input_value"} + required={true} + schemaName={"Input Value (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Input Value" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>is_pinned</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + boolean + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>note</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-put.api.mdx b/docs/docs/reference/api/update-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-put.api.mdx index 0b747730b6..6191952abf 100644 --- a/docs/docs/reference/api/update-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-put.api.mdx +++ b/docs/docs/reference/api/update-evaluation-scenario-score-router-human-evaluations-evaluation-scenario-evaluation-scenario-id-score-put.api.mdx @@ -5,73 +5,326 @@ description: "Updates the score of an evaluation scenario." sidebar_label: "Update Evaluation Scenario Score Router" hide_title: true hide_table_of_contents: true -api: eJzdVU1v4zYQ/SvEnFpAsd1gTzo1bQMk2HYb2EkvjmGMpbHFrURy+ZGNK+i/F0PKtvyR7PZaX2yTw8eZN28eW/C4cZDP4S40qK5uX7AO6KVWDhYZlOQKKw3/hxyeTImenPAVCVdoS0KvBSpB+0PCFaTQSj16Vs9qitKRy5+VEELcPT4+3L4WFMFyMSP7QlaQtdoKuY6YA5wQrxJrlLVLWOSDVTuwT1pRLq4nH8QnLX7VypPywnn0wYlClySC4WRCUZBz61D3eCPIQBuy8Y77EnJI68vDzctdBctY4dLq4MkuK2ZnEOYuHrm4KMtlj2WChwwMWmzIk2XaW1DYEORw+SRkIJl5g76CDCx9CdJSCbm3gTJwRUUNQt6C3xpGcd5KtYEMvPQ1Lxz6KWY9rLgvoesWCY2c/0WXW4Y4BS8SrbyFxtSyiDDjz4610A7uNpY59ZJcWteWBimp0KzIDlKaxYCuy3YRevWZCn9U3ryHWVyqZFdIBEqahK5jQEvOaOVSIteTCX8dS3h2kMS0D4bvLzXd8uH6+hz4L6xlmYi+ZU3/B9QTAkvyKGv+JT017jyg1sXRLqrtn+uopWMVdNl+RSpPG7LQLQ60o7W4HfTld50ShC6Dxm3eU9Uf5BxuCPZg7wgwDvgj736r5VxXurqPG3T/QG9i9+0yfkv0XbpsF8JWdAaYetuQrzQbw25WfQU5jOP4Xw3Gf3xhXsft5SHuxknMGbhoemnug60hh8p74/LxuKh1KEe4IeVxhHKMRgLPqKMiWOm38cjNw/1H2t4RlmQhny+GATNWU9LHcdi+NWjkR2Kmese5Cb7SVv6Tmt4bTZVOMRWs0+nBIm5fsTE1DUZ80vGhtY539NTexArEzcM9ZMC1pumYjH4aTeD0PTkK5mnBIk7LLsG4DdkJVXuSIANq4qiAJ2x+Pmxw+kY736Aa4CWrEJcsMVqJmEavP02zPQzy/+MF7PXg6dWPTY0yTnzkuO0FP4czwTPZ5+qGDPI3X669hVfaeQZt2xU6erJ11/Hyl0CWhb3I4AWtxBUraN5CKR3/LiFfY+3onXb8MO3t40fxVl078StWPmfK/yCDv2n79qsbbbLazVnbB/csX0UzO4CdeTv7bjpxU3C3341dDDzn4ekRMlj173GjSz5i8Sv7JH5NeWuT2sEPNq+1UKPaBHbjHBIkf/4F55hy1w== +api: eJzdVU1v2zgQ/SvEnLaAYrtBTzqt2wZI0N1uYCe9OIYxlsYWW4lkSSqNV9B/L4aUbfkr3b3WF9vk8HHmzbzHBjyuHaQzuK0rVFc3z1jW6KVWDuYJ5OQyKw3/hxQeTY6enPAFCZdpS0KvBCpBu0PCZaTQSj14Uk9qgtKRS5+UEELcPjzc37xkFMBSMSX7TFaQtdoKuQqYPZw6XCVWKEsXscjXVm3BPmtFqbgevROftfiglSflhfPoaycynZOoDSdTZxk5t6rLDm8ACWhDNtxxl0MKcX2xv3mxrWARKlxYXXuyi4LZ6YW5s0fOLsp80WGZ2kMCBi1W5Mky7Q0orAhSOH8SEpDMvEFfQAKWvtfSUg6ptzUl4LKCKoS0Ab8xjOK8lWoNCXjpS17Y91NMO1hxl0PbziMaOf9e5xuGOAbPIq28hcaUMgsww6+OZ6Hp3W0sc+olubiuLfVSUnW1JNtLaRoC2jbZRujlV8r8QXmzDmZ+rpJtIQEoziS0LQNackYrFxO5Ho3463CEp/uRmHTB8N9Ljbe8u74+Bf6Cpcwj0Tc80/8D9YjAnDzKkn9JT5U7DSh1drCLavPPKszS4RS0yW5FKk9rstDO97Sjtbjp9eUvHROENoHKrV+bqr/JOVwT7MBeGcAg8Afe/VXLua54dRfX6/6e3sju5TI+RvrOXbYNYSs6AYy9rcgXmo1hq1VfQArDIP+rnvyHZ/Q6bM6LuB3GYU7ABdOLuq9tCSkU3huXDodZqet8gGtSHgcoh2gkHNvvOOyKDxwKLGBHWW2l3wS88f3dJ9rcEuZkIZ3N+wFTHrU4PIdhu76hkZ+IaezsaFz7Qlv5b5yIzoWKeIp54iGe7P3j5gUrU1JP/6OWD610uKPjvSvgPWbfSLG3MRmxttHg7WB0qeLugBjf33WywizIaptsCIPkiNMdm5AAVUFT4AmrP/cbXIrRzleoenjRU8Q57wyeIybhUThOt9kr/vd4KrvZ8PTih6ZEGawhcNx0ypjBiTKY7FMZQALpxSdu5/WFdp5Bm2aJjh5t2ba8/L0my0M+T+AZrcQlT9OsgVw6/p1DusLS0Svt+GPS+cwbcamurRAUq4Az5X+QwDfaXH6eg58WW801XXDH8lVwvT3YySPABh1PjDPu9qux85453T8+QALL7uGudM5HLP5gQ8UfMW9tYjv4Zee1BkpU65ptO4UIyZ+fGoWBZg== sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Evaluation Scenario Score Router"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} path={"/human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Updates the score of an evaluation scenario. Raises: - HTTPException: Server error if the evaluation update fails. +HTTPException: Server error if the evaluation update fails. Returns: - None: 204 No Content status code upon successful update. +None: 204 No Content status code upon successful update. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"score":{"type":"number","title":"Score"}},"type":"object","required":["score"],"title":"EvaluationScenarioScoreUpdate"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_scenario_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Scenario Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"score"} + required={true} + schemaName={"Score (number)"} + qualifierMessage={undefined} + schema={{ type: "number", title: "Score" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-evaluator-config-evaluators-configs-evaluator-config-id-put.api.mdx b/docs/docs/reference/api/update-evaluator-config-evaluators-configs-evaluator-config-id-put.api.mdx index 414b3175c8..c5c9ddba0d 100644 --- a/docs/docs/reference/api/update-evaluator-config-evaluators-configs-evaluator-config-id-put.api.mdx +++ b/docs/docs/reference/api/update-evaluator-config-evaluators-configs-evaluator-config-id-put.api.mdx @@ -5,70 +5,366 @@ description: "Endpoint to update evaluator configurations for a specific app." sidebar_label: "Update Evaluator Config" hide_title: true hide_table_of_contents: true -api: eJzNVktv2zgQ/ivEnLaAameDPelUNw3QIN1dI49eHMNgpLHNrkSy5CitV9B/L4aULcl2nCKX1hfb5Dy/+WaGNZBceUhncPkki0qScR7mCeToM6csKaMhhUudW6M0CTKisrkkFLgVF5nRS7WqnGRhL5bGCSm8xUwtVSaktaMH/aBvkCqnffqghRDik/I023m8CBY+vJ+nYiIK5UmY5XMOhHn8ghn5ESRgLMbDqxxSiIEtdnqLqNcd+PbELw6FVL5Y2IogASudLJHQMSo1aFkipHBEARJQDI6VtIYEHH6tlMMcUnIVJuCzNZYS0hpoY9mEJ6f0ChIgRQUf7PIXEQBxlUPTzKMp9PTe5BvW37ecGU2oia+ktYXKAgbjL55rVfccW8cIkULP/2ImNUi9+XcZchsG1iS7E10VBXAk21D/Yd0m6cHwH25ea6zL+xo3bNUjkdIrv+CLGGxnV+a54vxkMe2lE5FoPURKnPR527oQn6OLptnX7ldwdhBSz9R94NkeeaFp2KRDb432MYfzszP+GrbSbZVl6P2yKsRNKwyvLqnKT/GL6ZTsyv6c1La01hnGYXHa5jRKiWj7gA4vU/0XljyBzKEkzBeSTgV7EaXEhO23Y+UlnUiKqPMCtcLkCFUZgL6P5iDaQRjHWmnAwr/Ozw+J91kWKo8j9NI5417PuhxJqiLwj7D0hwKFyQa3PzEklCZcoYNm3qEnnZObHsafTAyQq1L61aly/I3ey1XgdRQ5QU0GQ9zx7UuV47yi61auV4kO3oju82l8iPAdc7YV+Xh3Nz0wGGtbIq0Nr7vttqI1pDDulty4XXLj+sjOaoBbzz1tt1vlCkhhTWR9Oh5nhanykVyhJjmSaiytCh3lMaucok1QmUyvrnHzEWWODtLZvC9wy4yJHBiK7eCXVl0Hcrd7dVLR2jj1fyxsu1HXUYvTZS7edOvw8rssbYHdOuvquTeLuovDUcOGlV6aEFcL+SRkLSbTK0iA8Yldczb6c3QG+++hgTB3kcyoF1O85qYdwLsDlqMtQwsBoSzfdRccmTWeSql79uJwEfvvhf2w6q6hf9cXW8sCwu80toVUoZcDSnVL5VlXSB/BZTJDAumxJ9g8gbXxxGp1/Sg93ruiafj4a4WOCTtP4Ek6JR+5yrMacuX5dw7pUhYeT0D4x03b+m/Ec5FvSa2Z0YFekAIkEBl4LOAw39bb5qlbyYvo9G2YQp2lg6HMAzNqTLIMLZ2UnfeGxfT+DhJ4bB+UpclZxclvPODktxi0CRiE5g1nNRRSryoeoylEk/z5ATGJP5A= +api: eJzNVktv4zYQ/ivEnFpAtdOgJ53qZANskG1r5LEXxzAYaWxzVyK55Ci7rqD/XgwpW5JfKXJpc0lCzovf982MaiC58pDO4OZVFpUk4zzME8jRZ05ZUkZDCjc6t0ZpEmREZXNJKHBrLjKjl2pVOcnGXiyNE1J4i5laqkxIa0fP+lnfI1VO+/RZCyHEJ+Vptst4HSJ8uJqnYiIK5UmY5akEwrx8wYz8CBIwFuPhbQ4pxMIWO79F9OsOfHviF4dGKl8sbEWQgJVOlkjoGJUatCwRUjjiAAkoBsdKWkMCDr9VymEOKbkKE/DZGksJaQ20sRzCk1N6BQmQooIPdu8XEQBxm0PTzGMo9HRl8g3770fOjCbUxFfS2kJlAYPxF89c1b3E1jFCpNDzf/ElNUi9+WsZ3jYsrEl2J7oqCuBKtqX+yb5N0oPhK27eG6x79x1uOKpHIqVXfsEXsdgursxzxe+TxbT3nIhEmyFK4mzOhzaF+BxTNM2+d5/B2UFJvVBPQWd74oWm4ZAOvTXaxzdcXlzwr2ErPVRZht4vq0Lct8bwbkpVfk5fLKdkR/spqy211hnGYXE+5jRaiRj7QA5vS/0/pDyBzKEkzBeSzhV7Ha3EhOO3Y+UtnyiK6POGtMLkCKwMQN9Hc1DtoIxjrTRQ4W+Xl4fC+ywLlccReuOcce9XXY4kVRH0R1j6Q4PCZIPbfzEklCZcoYNm3qEnnZObHsafTCyQWSn96hwdf6D3chV0HU3OSJPBEI98+xZz/K6YurXrMdHBG9E9/YwPEb5jybYmHx8fpwcBI7cl0trwuttuK1pDCuNuyY3bJTeuj+ysBrj13Ot2u1WugBTWRNan43FWmCofyRVqkiOpxtIq2P8UmIRbcc2mod08ZpVTtAnxJtPbO9x8RJmjg3Q27xs8sJyiQIZmO26kVXdB+e3SnVS0Nk79HVlv1+06ejEWLNT7blfe/JClLbDbdR3Ze4OquzicQxxY6aUJdbV8tI++ktlX1NyqDGDE42L06+jiFEqtg5hMb9t2kxn16otm3N0DHnYMcOVl6DUglOXv3QVXaY2nUupevDiFxP6HxX55ddf5/9dPu1YRhD9obAupQtMHlOpW87OOVB/BZdVDAumxb7V5Amvjid3q+kV6fHJF0/Dxtwodi3eewKt0Sr4w47MacuX57xzSpSw8noHwp/t2RvwsTlW+FbhmdQepQQqQQFTjsYLDIFxvG6luLa9j0l/CuOoiHUxvnqzRY5JlaOms7bw3VaZPj5DAS/vlWZqcXZz8zpNQfo9Fm4BBaORwVkMh9arieZtCDMk//wD3SU4f sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Update Evaluator Config"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/evaluators/configs/{evaluator_config_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Update Evaluator Config"}></Heading> +<MethodEndpoint method={"put"} path={"/evaluators/configs/{evaluator_config_id}"}></MethodEndpoint> Endpoint to update evaluator configurations for a specific app. Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"evaluator_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"}},"type":"object","required":["settings_values"],"title":"UpdateEvaluatorConfig"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> +List[EvaluatorConfigDB]: A list of evaluator configuration objects. +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluator_config_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluator Config Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>evaluator_key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>string</div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"project_id"} + required={true} + schemaName={"Project Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Project Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"evaluator_key"} + required={true} + schemaName={"Evaluator Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Evaluator Key" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>settings_values</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={true} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Updated At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "project_id": "string",\n "evaluator_key": "string",\n "settings_values": {},\n "created_at": "string",\n "updated_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-human-evaluation.api.mdx b/docs/docs/reference/api/update-human-evaluation.api.mdx index d18c3e78e4..f9cdfce2dd 100644 --- a/docs/docs/reference/api/update-human-evaluation.api.mdx +++ b/docs/docs/reference/api/update-human-evaluation.api.mdx @@ -5,73 +5,346 @@ description: "Updates an evaluation's status." sidebar_label: "Update Human Evaluation" hide_title: true hide_table_of_contents: true -api: eJzlVt9vo0YQ/ldW89JWInYa3RNPpT03QZcmkU2uUh3L2sDE7BV2ud0hiQ/xv1ezYIPtS9Q+1y+G+bUz38x8SwMkNw7CJVzVpdRns2dZ1JKU0Q5WAWToUqsqfocQ7qtMEjohtcC93Q9OOJJUu8mDftBzqRy68EELIcRVktzNXlP0/qGInwTlKFJT1KV2Qmn/SuhIOCSRGaENiVJSmosXRblXK13VtDd+llZJTd1RSLXVu7NujMZQROLi/IO4MeI3owk19amJ1GQYCKUzlUpSeiMol+Qj1r4m8SKdcHWaonNPdTGBAEyF1hcYZxBCZ7bOGaT1UDwEUEkrSyS0jGIDWpYIIQwma5VBAIrxqyTlEIDFr7WymEFItsYAXJpjKSFsgLYVOzuySm8gAFJUsGDoiogzaNtVFwQd/WqyLXsex0y7+lklq6rwZRs9/eK4kc3oyMpyoaTQebmHy3vp7e2Tr+g4KdR1yQMz+xxd30dJfHuzjm/iJI6u479mHyEYKxZJNE+Ohb/HN/Hi6i3p+s84uVrP5vPb+eLIIoqvj72iy8v57PJAv/oebgtf2IxTb4N9TbouCmhXbRvsJObxC6Y0gt6vxRCnWwFoW/ax6CqjXQfdxfk5/x1uzGI/UmLeG8O/b053yoeLi9PAn2Whsm4iZtYa+x+iHrU8Q5Kq4CdFWLpTg8KkB9q3JmOEq9KEG7QM7R5Zaa3cjoC9Nl2C0AZQus174/8HOic3CPtg72wKgyES1n6vq8OaLH1d3dG93WhwBng7dN8u42MH37sjlCR3JwG73pZIuWF+qWryXEI5hDD1NHM2cIibNgeE0kIADu3zjnRqW0AIOVHlwuk0LUydTeQGNcmJVFNZKWDKcJjWVtHWu0R38SfcXqHM0EK4XI0NFjwqXfMPzfa4y0p9Qoahp7uoptxY9W1Hip7u8s6L6+QhnA+MNXuVZVXgmHHeopOWgz0Zf3aPZ+QrE9FdDAEwBt1KnE9+npzD8Z11YMwrIlO/IrvEvRqCIwj34DHflX4/gFCWvwwKLqsyjkqpR/E6fhCeNcRsfE8cpNUM2/r/ulX7+SF8pWlVSOXX32Pf9NO/hJPphwDCwwt1FUBuHLF10zxKh/e2aFsWf63R8oSvAvBlPfLILBvIlOPnDMInWTh8px8/znuS+Em8lfBuCzSvACfGbxDA37g9ufs9B+a7PWt6mx7JM89UQ4wT4mZS7TyilFv+ru1qRCh39wkE8Nh/HpQmYxcrX5gE5UuXrqk6ePn7gWUNFFJvaqbaELqQ/PsHaeR2tA== +api: eJzlVk1v20YQ/SuLubQFGMk1cuKpTKLaRFzbkOgUqC0Ia3IsbkLuMrtD2yrB/17MkhIpKTLac32xuPOx897MPLIBkmsH4T1c1qXU72bPsqglKaMdLAPI0KVWVfwMIdxVmSR0QmqBO7+fnHAkqXaTB/2g51I5dOGDFkKIyyS5nb2m6ONDET8JylGkpqhL7YTS/pHQkXBIIjNCGxKlpDQXL4pyb1a6qmnn/Cytkpq6q5Bqq7d3XRuNoYjE+dl7cW3ER6MJNfWlidRkGAilM5VKUnotKJfkM9Yek3iRTrg6TdG5p7qYQACmQusBxhmE0LmtciZpNYCHACppZYmElllsQMsSIYTBZaUyCEAxf5WkHAKw+L1WFjMIydYYgEtzLCWEDdCm4mBHVuk1BECKCj4YuiLiDNp22SVBRx9MtuHIw5xph59NsqoKD9vo6VfHjWxGV1aWgZJC5889XT5Kb26ePKLDolDXJQ/M7Et0dRcl8c31Kr6Okzi6iv+afYJgbFgk0Tw5PPw9vo4Xl6dOV3/GyeVqNp/fzBcHHlF8dRgVXVzMZxd79uWPeFt4YDMuvQ12mHRdFNAu2zbYnpjHr5jSiHq/FkOebgWgbTnGoquMdh1152dn/G9/Yxa7kRLz3hn+fXO6W96fnx8n/iILlXUTMbPW2P+Q9aDlGZJUBf9ShKU7dihMumc9NRkjXpUmXKNlanfMSmvlZkTslekKhDaA0q3fGv8/0Dm5Rtgle2NTmAyRsPVHXR3W5N7j6q7u/UaDM9DbsXsaxqeOvjdHKElujxJ2vS2RcsP6UtXktYRyCGHqZebdoCFu2uwJSgsBOLTPW9GpbQEh5ESVC6fTtDB1NpFr1CQnUk1lpeBQyiNvFR/ZFVhPHKa1VbTx+aLb+DNuLlFmaCG8X44dFjxH3WTsu+2aIiv1GZmjXgujmnJj1d9bxfRamHdRTAJP6HyQs9mrLKsCx3J0SmtaTvZk/N092T2wDzL9hpqVl0nqMJ9Nfp2cnWKiDxDRbdzvkkz9Lm1BeDcIDrjesczCWPpFAkJZ/jYYGGJlHJVSj/J1QiK8vIjZ+IWyV14zrPX/6/XbzxLhK02rQiqvE577pl+TezhaEwgg3H/zLgPIjSP2bppH6fDOFm3Lx99rtDztywA8rEcen/sGMuX4dwbhkywcvtGPn+e9mvwiThW83QjN68CF8RME8A03Rx8JXizz7c41vU/P5DsvaUOOI4Vn9e0iopRb/qbvcqQ8t3cJBPDYf0eUJuMQK19YLeVLV66pOnr5Q4PPGiikXtesySF0KfnvH7lMhUM= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Human Evaluation"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} path={"/human-evaluations/{evaluation_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Updates an evaluation's status. Raises: - HTTPException: If the columns in the test set do not match with the inputs in the variant. +HTTPException: If the columns in the test set do not match with the inputs in the variant. Returns: - None: A 204 No Content status code, indicating that the update was successful. +None: A 204 No Content status code, indicating that the update was successful. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"type":"string","enum":["EVALUATION_INITIALIZED","EVALUATION_STARTED","EVALUATION_FINISHED","EVALUATION_FINISHED_WITH_ERRORS","EVALUATION_FAILED","EVALUATION_AGGREGATION_FAILED"],"title":"EvaluationStatusEnum"},{"type":"null"}]}},"type":"object","title":"HumanEvaluationUpdate"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "evaluation_id", + in: "path", + required: true, + schema: { type: "string", title: "Evaluation Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>status</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"EvaluationStatusEnum"} + value={"0-item-properties"} + > + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + <div style={{ paddingTop: "1rem" }}> + **Possible values:** [`EVALUATION_INITIALIZED`, + `EVALUATION_STARTED`, `EVALUATION_FINISHED`, + `EVALUATION_FINISHED_WITH_ERRORS`, `EVALUATION_FAILED`, + `EVALUATION_AGGREGATION_FAILED`] + </div> + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-organization.api.mdx b/docs/docs/reference/api/update-organization.api.mdx index bbc8e9bff5..ed24966e7b 100644 --- a/docs/docs/reference/api/update-organization.api.mdx +++ b/docs/docs/reference/api/update-organization.api.mdx @@ -5,36 +5,36 @@ description: "Update Organization" sidebar_label: "Update Organization" hide_title: true hide_table_of_contents: true -api: eJydVU1v2zAM/SsBTxugNV2xk0/L1gEr9tGia3cJgoK12VibLWkS3S0z/N8HSk5sJ22xLZckFPlEPpJPLVhHHllbc1ZABo0rkOnG+jUa/TvaQYFDjzUx+QDZsgWDNUEGY6cbXYACbSADh1yCAk8/Gu2pgIx9QwpCXlKNkLXAGyfhgb02a1DAmisxnI/wZmcFdN0qwVDgN7bYSOw+am4Nk2E5Qucqncfo+bdgjdiGS52XQllTkH+pghbQbM7vYk3TpDq1s5imqkAy2ab5WWI7BQWF3GsXKfpPqNMRRKd68osb5P8FvE4IswVD16mtm739Rjk/wnQKga6TAE/BWRMSSSfHx/I1qRO+NHlOIdw11eyyd4a/b0O65dXJySHwV6x0kXr/znvr/wF1r7kFMepKfmmmOhw6VDafnP4F09owrclDtxpoRe9xM2L1o00JSivrsH5q1D9RCLiOY5RcHneNZMyu5PShlg4LsYx1pat7v9FkDPQmdh8v4zTR99T8vL+6ujgATL2dNjUN1+x8Kic1cWlFbVzDUV24hAzmYz0J83ZPXjpQEMjfb0Wo8RVkUDK7kM3neWWb4gjXZBiPUM/R6bgYgfLGa97EkMXF2QfavCcsyEO2XI0dvsgwpfGYuu06g05/ICGql79Fw6X1Q1VR/MoUJUzImF4O6vXuF9auokF9hlZPOduZx3IwjCRoc2djWn0zFrHo2eLiDBQIPQnm+Ojl0fEB+MRZ9gtzHqWUjuXuCbs7XkEB1XG5gAnr18OBVOxs4BrNCO/h/u8pZ88v0y+euwp10kIfNzjNxnLy1gRQkO0/PisFpQ0svm17i4GufdV1Yv7RkJf+rxTco9d4K6wtWyh0kN8FZHdYBTpIa6c+8OyyX7LnM1APp7udESMDco9VI/9AwXfaPPBSRhUpt3PY9l5v04Uv4q4PKAfSJ7KUIhZ5To6f9F2N1u3i+goU3PZPaW0LCfH4U2QEf6aErUsUy1srthYqNOtGxCqDBCmfP/Bq1Hw= +api: eJydVU1v3DgM/SsGT7uANpMGe/Jppx9Ag+5ugjTZy2AQMDZjq7UlVaLTzhr+7wUlz9jOJEHbuYxNkTT5+PjUg3XkkbU15yXk0LkSmW6tr9Do/6MdFDj02BKTD5BvejDYEuRgfXWrS1CgDeTgkGtQ4OlLpz2VkLPvSEEoamoR8h545yQqsNemAgWsuRHDha+y8xKGYZuiKfBrW+4k5HGywhomw3KEzjW6iAWuPgVrxDZ9y3lpizUFeUv19oBmd3EfO1jWMqiDxXRNA1LJvrp/JXZQUFIovHYRkF9M9XaWYlAj1OUt8q8mvEkZsjXDMKi9m737RAUvAT4MM4XAMEiAp+CsCQmks9NT+Vv0CR+7oqAQ7rsmuxqd4cfHkL7y59nZceL/sNFlDMveeW/9T2R9NNySGHUjT5qpDccOjS0Wpz+AtDZMFXkYthOs6D3uZqj+bVOBMso2VC8x/B8KAatIo+TyvGsEI7uW06dGOi3EJvaVPj36zZgxwZvQfb6Ntwm+l/jz/vr68ihhmu1yqIlc2cVSPFri2oq2uI6jlnANOazmEhNWfRKTARQE8g97pel8AznUzC7kq1XR2K48wYoM4wnqFToNj2tYx9PsjbjGZQlUdF7zLuZbX55/oN17wpI85Jvt3OGjECxRZul2mBY6/YEEvFEA1x3X1k+dRh2sU5SgI9S9mhTt3TdsXUOTIk3jX/ZwMM8lYqIpaHNvY1njgMaeX2PxmYwIsuCXUp2evDo5fQ6kMSBbX56P+4cFz8pLblLHYgyHAYACauPyARO2f00H0r2zgVs0s3xP8+ORso5YM33jlWtQJ630ccMTdzaw4A4oyMeraKugtoHFpe/vMNCNb4ZBzF868kKBrYIH9BrvBLhND6UO8lxCfo9NoKNqDqIEv12Nu/d7BurpKvc0McKRB2w6eQMFn2k3XZdRU+o9A/vx8E36zh9x86fgIyEUkUoR66Igxy/6bmfLd3lzDQruxou1taWEePwqooJfU53WJUDl5hVbDw2aqhPpyiGllN934ATQCg== sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Organization"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} - path={"/organizations/{organization_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}"} +></MethodEndpoint> Update Organization @@ -43,29 +43,331 @@ Update Organization as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-secret.api.mdx b/docs/docs/reference/api/update-secret.api.mdx index 4d287b8ac9..54349eb444 100644 --- a/docs/docs/reference/api/update-secret.api.mdx +++ b/docs/docs/reference/api/update-secret.api.mdx @@ -5,67 +5,1199 @@ description: "Update Secret" sidebar_label: "Update Secret" hide_title: true hide_table_of_contents: true -api: eJztWUtv2zgQ/ivGnHYBbpwWe9Jp0yTABmm3QR69BIYxkcYWG0pUSMqNavi/L4bU007U1Dnsoogvtvj4ODPfcGY0XoPDpYXoFq4oNuQszAToggw6qfOzBCIoiwQdza2fBwEFGszIkeFta8gxI4ggTM9lAgJkDhEU6FIQYOihlIYSiJwpSYCNU8oQojW4qvAbnZH5EgQ46RQPBEEmZwlsNrMAQNZ90EnFu7bxYp07yh1PYVEoGXvBp1+tznmsO64wrJaTZPkpJUzI+F159XnhNRmuCHr154cCb0Q7kpdKAcvaqPAP790ISMjGRhYs0b5QJz2IzUY06/TdV4pdz2p/B4V2oTai5mZM2XuZJ09xQnmZsXMURq9kQmZ+TxUIiEvrdDZvRmG2zd4547EB0OFrztUF5Sj5RJ2SIRCMZGNU/DMhKmS+MMjDiooUVZHyw9LoBxCQSesMKr8fc5caXciYHZhMoehRuspPOb0kl5KZ+yc+0ejSkWEgymQuB+o5zBM0yUWteqNoa4odT2OLjXj7OVVP8tr5+a2HGJHhipyT+dKeXH/+MRTL2xN3BNbDiZ9lLLgGW/x76Qm7o8To+B4EWFxShvfesisyjh47k/+vSD72Oryc4tKofa/3jVGMvSJjXxEkvtTbN6Jxt31QvCsKoEdn0A5BMEkkhyBUFz3NQwQeutvYAacBeSyMDU0/8GwBmU5Iecmko8zuEmFVuRxNLTz/X6nYv4Ze0B2P+8T6belco6AxWPU0+RRM0XPLeaP8PtQ3Bp80FvKm5mi/ZaXW8NvYQ0HHzvKiT84Z+mejVesCz15Wb7V++uQE9MJjfLLaSWVNGNzKqiM+fOMLpt7uDa82ZAud2+Co7w8P+WtQH8BVGcdk7aJUk8t6Mexd4Lxl9LeM/pbR3zL6W0Z/y+i/YEYXIJMx0whYaJOh4/5FKZNR8c98MOg6Ar9GHwCUXFBcxYrG0nVsCB0lc3T7CnYcECZHfI3qZtFr8EL1tI13V83HCX8J5IdqErjuUF8POcrGR1piXH1smHh5Lflcedr66U6B1pSMXcX55/v3u0XmF1Qy8SXk5NQYbfavMBNyKNVI7FY6Hsy+wM4yd7Rk9509Hyg/6iCgD2p2NDt8IsslShfMnl/qjTG55tkf8cF6haPrdf283Zo3WPd5NU6C+Ubv8vX1xQ5g4HZIavDGyVXTos3IpZp7t0UZOrYuhQimKyyVm67eTUND0E7Xbdd2w9UcmVXT1fUFEKTOFTaaTmOly+QAl5Q7PEA5xUL622ApLo10ld9ydHF2TlUdf6LbWX/BFftQ8IrhspYQLOS5fxOp+8lHpUu1kd8D1XVPufZ9NgB752XXGj59xKwIoa4L5E1ruuF6aLQu0XX90VALb78cNe889Wxb3fbrR1+ltZieI5kvtNewpvPI229ydHEGvfoQDg/eHRzuSDdYzDcUY9fTKUyD2CKqpYjr98xfT3CE2V/dBEtWaOsyzHt42x60lbFqkhw9ummhUPrLVxfJwbtuwXsXa/YOGpNaEBB1/wzMBKTaOl68Xt+hpRujNhsefijJsBfNBKzQSLxjg92uIZGWfycQLVBZ2pGrDV3w22V9Q3+fgHha3sbTcuZ0harkJxANda2YPvg0XnTbUHscjvrDh4hu/07E5GgWdhzFMRVudO2sd1cvbq755ar+n4PLIojA4DeOPvgtiKq95v4e+bE1KMyXJce4CAIkf/4FnOPaIw== +api: eJydVk1vGzkM/SsGT1tgNk6CPc1p3aRAjbRbI3F6MYyAGdG2mhlJlTRuvcb894LSfPmzaXyxPSIp8j0+crbgcekgncFXLHMP8wS0IYteajUWkEJpBHp6cpRZ8pCAQYsFebLstAWFBUEK8fhJCkhAKkjBoF9BApa+l9KSgNTbkhJw2YoKhHQLfmOCo7dSLSEBL33ODx5CpMFYQFXNYwBy/r0WG/baj5dp5Ul5PkJjcpmFxIffnFb8rLvOWC7LS3L8b0UoyAYvtfmyCJXUCennb5T5XkIfo22VtCaqzHOo5lVSl30+TpfyDF6kYoQEemSkd2u+nX45dkuVnEztMXDT867Y2pIzWrlY6fXlJX8JcpmVhsHh+8osI+cWZT64r43hzViGmo4QSqosuGZj9VoKsk8vtOFbSud18dQ8PYThjuNVNUh/iuzRsB6VQCsm9dkezq8Kl0ChBeWuH/cmVLITtXd6y+lXCUhxtIgWpoW2BXoWWinFEf67iOMAS9e6uzREIZ6+6Vzk/9iXIe93ydtC3fZCnGvdVlWQywVlmyw/nv2B46fG/PVyOaXAFsyDHmxU0Ynqn+vrQx19xVyKoJLBB2u1fbuIBHmUOf+Sngp3aJDrbOf0FdxI5WnJGM87TNBa3PTR1DFBJqJwy3OD+TM5h8vQJ9HktGkAYzDl09/xwXXFq2u7HhcdvBHd02XcRvjONtx0OjkIGLndJTUO1cFDs/AK8ivNm9CUcf/5FaQwXPO6HK6vhnEHuOG23YEV8Gaw62ZHljaHFFbeG5cOh1muS3GBS1IeL1AO0UjYz2EUTgc3bBrk5SgrrfSbEG80Gd/RplZQOpv3DR64wWLL7Jq1bKGRd2ES16t7VPqVtvL/2Af1+q6Fwehw6953W/jDTyxMFGs3ipq3gKYRdqtpW7O3L+PW2F8OzcyvT7UhhbI/h/mMNr2YgUCpFjpUWHNdw/cesxcKcmcqYi6XF1cXl6fwrh0Go8m4ljJmvldfNINkj9GWS956RdAxeMLi3+6AszTa+QJVL95+q+3N35owTz/90OQog0rD1du6DWcQ2pArvIIGXgcJpN0L2TyBlXaejbfbZ3T0aPOq4sffS7LcUfME1mglPjN4sy0I6fi3gHSBuaODvNoZB3/d11J+N4DkeL5N1ynmd415yf8gaWhs0wxTqumoWUPzTbzq7zBLOv+D0cpjL3qMsoyMP2s774l68jiFBJ7r10te8pCCxR88pvBHTFWHyoOmwrMt5KiWJQ/DFGJI/vwCjzTX1A== sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - -<Heading - as={"h1"} - className={"openapi__heading"} - children={"Update Secret"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/vault/v1/secrets/{secret_id}"} - context={"endpoint"} -> - -</MethodEndpoint> +<Heading as={"h1"} className={"openapi__heading"} children={"Update Secret"}></Heading> +<MethodEndpoint method={"put"} path={"/vault/v1/secrets/{secret_id}"}></MethodEndpoint> Update Secret -<Heading - id={"request"} - as={"h2"} - className={"openapi-tabs__heading"} - children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}]} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"header":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},{"type":"null"}]},"secret":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"kind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"data":{"anyOf":[{"properties":{"kind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"provider":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},{"properties":{"kind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"provider":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"models":{"items":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"lifecycle":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> - \ No newline at end of file +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "secret_id", + in: "path", + required: true, + schema: { type: "string", title: "Secret Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>header</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Header"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>secret</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"SecretDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Key" }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Slug" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"SecretKind (string)"} + qualifierMessage={"**Possible values:** [`provider_key`, `custom_provider`]"} + schema={{ + type: "string", + enum: ["provider_key", "custom_provider"], + title: "SecretKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>data</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"StandardProviderDTO"} value={"0-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"StandardProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "StandardProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"key"} + required={true} + schemaName={"Key (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Key", + }} + ></SchemaItem> + </div> + </details> + </SchemaItem> + </TabItem> + <TabItem label={"CustomProviderDTO"} value={"1-item-properties"}> + <SchemaItem + collapsible={false} + name={"kind"} + required={true} + schemaName={"CustomProviderKind (string)"} + qualifierMessage={ + "**Possible values:** [`custom`, `azure`, `bedrock`, `sagemaker`, `vertex`, `openai`, `cohere`, `anyscale`, `deepinfra`, `alephalpha`, `groq`, `mistralai`, `anthropic`, `perplexityai`, `togetherai`, `openrouter`, `gemini`]" + } + schema={{ + type: "string", + enum: [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + title: "CustomProviderKind", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>provider</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>url</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>version</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>key</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>models</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"slug"} + required={true} + schemaName={"Slug (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Slug", + }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>extras</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>provider_slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>model_keys</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>header</strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>lifecycle</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"LifecycleDTO"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "kind": "provider_key",\n "data": {},\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "header": {\n "name": "string",\n "description": "string"\n },\n "lifecycle": {}\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-testset-from-file.api.mdx b/docs/docs/reference/api/update-testset-from-file.api.mdx new file mode 100644 index 0000000000..b638a05a52 --- /dev/null +++ b/docs/docs/reference/api/update-testset-from-file.api.mdx @@ -0,0 +1,867 @@ +--- +id: update-testset-from-file +title: "Update Testset From File" +description: "Update Testset From File" +sidebar_label: "Update Testset From File" +hide_title: true +hide_table_of_contents: true +api: eJydVU2P20YM/SsCTy0wWW0WPelUZ9tFNkm7i9jJxTAMWqLtSSTNZIba1jX03wvOSLbkj7TIybJEch4fH9/sgXHjIZvDjDx7Yg8LBcaSQ9amfiwgg8YWyLTkGLBcO1Mt17okUGDRYUVMTkrsocaKIIM+UhegQNeQgUXeggJH3xrtqICMXUMKfL6lCiHbA9a7p3WowTsrNTw7XW9Awdq4CllgNLqAVp1GtAsFrLmUV10PyWMBrbyX88jzG1Ps5JDT43NTM9Usn6qmZG3RcSrnvSqQA6wjQOuEFNbk5V9oP/sO2JWu0e3gCO1BMloVMpcx7Tyd6qaSWdxPP4OCd9OnP2ExLpHMJKVtVZ9rVl8o5xG38whvkCkELK+OsW2lniNvTe1jf3e3t/JTkM+dtqIEyGDa5Dl5v27K5GMXDCMS0dpS50E46RcvOdcZzE0Tk7o+dM20ITdg7D5ESKcR8UWZHNo/kcBQKHVTltAu/ou0iOhcTYdeI0+/3N2dU/MZS12ExpPfnTPux3kpiFGX8qSZKn8eUJp89PXa5gwI6LltF0cK0Dkc6vODiQCF8MpvLqmzD/2DvMdNUPM1IfehgYz/p1npKx7dxQ0mcaQ3snu9jd8ifZcO60PezmbPZwXjbMdD/RQWJulN5cGZKnmIvlcRb414ozWegw/yFjJIraMXTX+lnWR9uj96YZs2tjQonujJvfSe2bgSMtgyW5+laV6aprjBDdWMN6hTtBpOcU3C1+ReQoP9ecobp3kX6k2eH9/T7i1hQQ6y+WIYMBXRRRmNww4TRKvfkxDaWfmk4a1x+p+ojc7NtzFLGNP12oT0jtwO2xvMv1ItrUqfEfbtzeub22vNdAnJ5Pmx2x3Mw+70OEIYqBO6DkSJeVZhcYAJq1+PHwSlTKnCelDvO7Md4TsQw/Q3p7ZEHTYkoNh3Y59DN3Y4eJUHBdnoGuxmv1CwFclkc9jvV+jpkyvbVl5/a8jJBBcKXtBpXAmf8z0U2stzAdkaS09n+A4+Az997Nbp5wTUZdz9lGsZ8QuWjfwDBV9pN763g1VsexHtu4D7eNarsNDHApcuT7GfmDTJc7I8CD+zQ5HoYaOen6YzULDq7uzKFJIjhUNddXwUcbftv/zLAGw= +sidebar_class_name: "post api-method" +info_path: reference/api/agenta-backend +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + +<Heading as={"h1"} className={"openapi__heading"} children={"Update Testset From File"}></Heading> + +<MethodEndpoint method={"post"} path={"/preview/testsets/{testset_id}/upload"}></MethodEndpoint> + +Update Testset From File + +<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading> + +<details style={{ marginBottom: "1rem" }} className={"openapi-markdown__details"} data-collapsed={false} open={true}> + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "string" }], + title: "Testset Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"multipart/form-data"} value={"multipart/form-data-schema"}> + <details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}> + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"file"} + required={true} + schemaName={"binary"} + qualifierMessage={undefined} + schema={{ type: "string", format: "binary", title: "File" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"file_type"} + required={false} + schemaName={"File Type (string)"} + qualifierMessage={"**Possible values:** [`CSV`, `JSON`]"} + schema={{ type: "string", enum: ["CSV", "JSON"], title: "File Type" }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"count"} + required={true} + schemaName={"Count (integer)"} + qualifierMessage={undefined} + schema={{ type: "integer", title: "Count" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"Testset"} value={"0-item-properties"}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>created_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>deleted_by_id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>slug</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>id</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testcases</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>property name*</strong> + <span className={"openapi-schema__name"}>FullJson-Output</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + <TabItem label={"MOD3"} value={"2-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + number + </div> + </TabItem> + <TabItem label={"MOD4"} value={"3-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + boolean + </div> + </TabItem> + <TabItem label={"MOD6"} value={"5-item-properties"}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"0"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"1"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"i"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"2"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"3"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"c"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"4"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"5"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"6"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"a"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"7"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"r"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"8"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"("} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"9"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"F"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"10"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"11"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"12"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"l"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"13"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"J"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"14"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"s"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"15"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"o"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"16"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"n"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"17"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"-"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"18"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"O"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"19"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"20"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"21"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"p"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"22"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"u"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"23"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={"t"} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"24"} + required={false} + schemaName={""} + qualifierMessage={undefined} + schema={")"} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>metadata</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + </div> + </details> + </SchemaItem> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={'{\n "count": 0,\n "testset": {}\n}'} + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-response"}> + <strong>Schema</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>detail</strong> + <span className={"openapi-schema__name"}>object[]</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}>loc</strong> + <span className={"openapi-schema__name"}>object[]</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem label={"MOD2"} value={"1-item-properties"}> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem label={"Example (from schema)"} value={"Example (from schema)"}> + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-testset.api.mdx b/docs/docs/reference/api/update-testset.api.mdx index fd669ceab9..11a5adda82 100644 --- a/docs/docs/reference/api/update-testset.api.mdx +++ b/docs/docs/reference/api/update-testset.api.mdx @@ -5,36 +5,33 @@ description: "Update a testset with given id, update the testset in Postgres." sidebar_label: "Update Testset" hide_title: true hide_table_of_contents: true -api: eJzlVU2P2zgM/SsCTzOAN5kOevJps90CHXQ7G0wze8kEhWIxtlpbciU6adbwfy9oKbGTaWa35+aSRCQfycevFkjmHtIlLNCTR/KwSkChz5yuSVsDKTzWShIKKSioiJ2mQuR6i0ZolYgmyKnAo4Y2Ym495Q795Mk8mZnLffpkoviTVuLKk7tOhVbCbo6mgm3JijVGUDV5MpnfKklSXN3jLgZ5nYp73In+maxwWJcyCxHYUh2i6D0/IDXOsHNPLhWLAn/k8+ANErA1OsmZ3ylIIQg+RURIoJZOVkjomLQWjKwQUhgSgwQ0k1ZLKiABh18b7VBBSq7BBHxWYCUhbYH2NVt6ctrkkABpKvkhpijuFHTdKiCgpz+s2rPZOWBmDaEhFsm6LnXWxz797Ll07chf7Tgz0uj5X4j7chT3LO8SiOSzqiaseluplGYnspyPMEM4Ec+uP2NGDBAfpHNyP8J/E3G77txmzNkyxDmEsRpFeOwG6DqGcehra3zI7/bmhr9OG/ljk2Xo/aYpxUNUhv/PYPDy+vb2OfA/stSqNxNvnbPuJ1DP6qKQpC5P6D5VKG12Wgyz/3vTt+JpKbvk+KINYY4OutXlevxlQ4BcssrnL7XGB/Re5jgU97JqT4ZYsPS/Cs15BddRb1Tqgd7A7uU0/gz0/cjZQeXdYjF/BhhqWyEVlqe+bsKoUwEpTONw+2k7jHkHCXh028MeaFwJKRREtU+n06y0jZrIHA3JidRTWWvgWfaYNU7TvjeZze/e4/4dSoUO0uVqrPCR2yMU/FTtyLWs9Xvk1OMGmjVUWKf/DVWMS6gIVpwbN97DsErefpNVXeKwCobiHUd+2fYdo83G9o4jgbM+LTGb30ECTECYgZvJq8kNnN+OE2WeCZnRyGkQQ3LG35E5SACrfiCAUFa/DwLOqbaeKmlGePFULY7r+iSadpjKX+yoxaYh/EbTupS6n/Oe8za2+fJwwzwkkI7u2SqBwnpijbZdS4+Pruw6fv7aoONWXiWwlU7LNbfHsgWlPf9WkG5k6fGFIlw9xA1wLS4FeWh3w72+lWXD/yCBL7g/vbt9rxaHaWqjwpvg67d+Bw0Az1Yyr8tgMcsyrOlF3dVoVcwfF5DAOl7nyio2cXLH603uQqy2T72f5v6thVKavOElmkKA5M93EkZMcw== +api: eJzlVVFv2zYQ/ivEPSWAZmfBnvQ0NyvQoFtmpM5eHKOgxbPEViJV8mTXE/TfixNpS3bqtHueX2yTd9/dfXf3sQWSuYd0CQv05JE8rBJQ6DOna9LWQApPtZKEQgoKJmKnqRC53qIRWiWiCfdU4NFCGzG3nnKHfvJsns3M5T59NvH6o1biypO7ToVWwm6OroJ9yYo1RlA1eTaZ3ypJUlw94C4meZ2KB9yJ/piscFiXMgsZ2FIdsugjPyI1znBwTy4ViwK/F/MQDRKwNTrJld8rSCFcfIyIkEAtnayQ0DFpLRhZIaQwFAYJaCatllRAAg6/NNqhgpRcgwn4rMBKQtoC7Wv29OS0ySEB0lTyQSxR3CvoulVAQE9vrNqz2zlgZg2hIb6SdV3qrM99+slz69pRvNpxZaTR87+Q9+UsHvi+SyCSz6aasOp9pVKag8hyPsIM6UQ8u/6EGTFAPJDOyf0I/y7idt25z5izZchzSGM1yvA4DdB1DOPQ19b4UN/tzQ1/nQ7yhybL0PtNU4rHaAw/z2CI8tvt7Uvgf2SpVe8m3jpn3X9APeuLQpK6PKH71KC02WkzzP7vTT+Kp63skuOJNoQ5OuhWl/vxpw0Jcssqn782Gn+h9zLHobmXTXsyxIJvf9RoriuEjnajVg/0BnYvl/FHoO97wQ4m7xaL+QvA0NsKqbC89XUTVp0KSGEal9tP22HNO0jAo9sedKBxJaRQENU+nU6z0jZqInM0JCdST2Wt4VxVZ/2tuGNT4EX3mDVO077Hm83v3+P+HUqFDtLlamzwgWcnTMOp2bERstbvkXmJ8jRrqLBO/xtaHBWqCF5cOE/l46Azb7/Kqi5x0Imhs0c9WLb9OGmzsX3gyG6s6o3MPqNhMWSGQsE3k18nN5doiA5iNr+PyyMzGiUQzCA5I/pIMSSAVb85QCir34cLrq+2nippRnjxTVscdf0kq3ZY3//Z6xcHiPArTetS6l4Qes7buA/Lw2PnIYF09PCtEiisJ7Zo27X0+OTKruPjLw06HutVAlvptFzzqCxbUNrzbwXpRpYeX2nC1WOUimtxKcnD6Bue+60sG/4HCXzG/ekD3c9tcdisNhrchVi/9GI1ALzQbtbV4DHLMqzpVdvVSFPmTwtIYB2f8coqdnFyxzoodyFX25feb3Z/1kIpTd6w2qYQIPnzDU5rWwI= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Testset"} -> -</Heading> - -<MethodEndpoint - method={"put"} - path={"/testsets/{testset_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"put"} path={"/testsets/{testset_id}"}></MethodEndpoint> Update a testset with given id, update the testset in Postgres. @@ -50,29 +47,294 @@ str: The id of the test set updated. as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","title":"Testset Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","title":"Name"},"csvdata":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Csvdata"}},"type":"object","required":["name","csvdata"],"title":"NewTestset"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "testset_id", + in: "path", + required: true, + schema: { type: "string", title: "Testset Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"csvdata"} + required={true} + schemaName={"object[]"} + qualifierMessage={undefined} + schema={{ + items: { additionalProperties: true, type: "object" }, + type: "array", + title: "Csvdata", + }} + ></SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-variant-parameters.api.mdx b/docs/docs/reference/api/update-variant-parameters.api.mdx index d3d0f14354..9792a11377 100644 --- a/docs/docs/reference/api/update-variant-parameters.api.mdx +++ b/docs/docs/reference/api/update-variant-parameters.api.mdx @@ -5,77 +5,370 @@ description: "Updates the parameters for an app variant." sidebar_label: "Update Variant Parameters" hide_title: true hide_table_of_contents: true -api: eJztVk1v4zYQ/SvEnLKAaqdBTzrV+QDW3e6ukY+9OIbBSGOLW4nkklQSV9B/L4YULSneeIugQHtoLo7I4eO8mTczbMDxrYV0CV+4EVw6C6sEcrSZEdoJJSGFO51zh5a5Apnmhlfo0Fi2UYZxybjW7DGcndzLezkzW5veS8ZYXF6LnJ1YZ96l7LZANr9kauPBBkeZU6z290zCWc13peI5Owm3d94t4vWLsN1BRuNMSceFFHLr8QNgPnDae3jNhcXo4/vb28XVc4aebMrm3jODTFgih8Yow54KUSJzZueBo6MvKQRsdLWREfy3m8+frtFqJS2mbOa/mekWXvN2GJWB55CA0mg4+TnPIYVgv45B7k0hgcFHumxA8gohhT4fkICg1GruCkjA4LdaGMwhdabGBGxWYMUhbcDtNJ20zgi5hQSccCUtdPlg8xzadhUQ0Lpzle/o2EtAoorS0RbXuhSZpzH9aklgzeA+bYikE2j914BGAzzPBR3j5WJgFS7o/FQPXzFzAz8XPUJLblSVcOsKreVb9Jhy93njYzRm2ib7FVmXJRDHiHnhUdjHDqVtD6/v+S+HJAYgR2UNbUuoUSme/dnpKf2MS/OmzjK0dlOXLOoM3hxtkb81IqQCcvdRWBHu6CyFdLhFM0jIdTRqE6hULjYC8/XD7pjWPnZm7HwXkig3YnvoflhfB62/jnbhzdgnMmuTf1hiP5DC0MXVS5cuzz07g9QF1twdJRGs2Mz9a7LeZ3ucx31+RlQG18y07lTfS8Gr/Zezs0OBf+GlyL182RX14rerO0fHRel17rCyhwalyka7fyOGUd7tqg8WN4bvBqn6XQUHveDt9qjQY+gj2OumPhjslnZ/lCjiFa7u7FbDNh7DG6L7Oo3LEL7vXRZNaJQeAIbcVugKRUNL186PJ1dACtNuINlp04+mdjqaZBbNYxxjtSkhhcI5bdPpNCtVnU/4FqXjEy6mXAuvZ4tZbYTb+SOzxfwD7t4jz9FAulwNDW5IKSH3Y7N92LkWH5Ci0A3QWe0KZcSfIaHdDC3CKaJJGrzuJ+HVM690iQeT7Dsl24sLhNwo70MsGM+QzRZzSIBiESrjdPLz5BRevtVGxv6BkflKiQT8NiQvQrkPIiSAlS8TcMirX/sNoqeVdRWXA7wwxVh8DSyGmRs51vRl+/978r/ynuxU7vDZTXXJhe9RXhlNV6LL+GakhKaj9+P4WVMo68i8aR64xTtTti0tf6vRUCGukgD0QIpeNpALS//nkG54afGIWE6uu1b2jr3mcSxWSZX6yMuaviCBP3A3fvT6Nl3EXtB0Bhfhrp98M+0BDmYL9f1wYpZRfo/argY9b3F3Cwk8dE/jSuV0xPAn6tP8KfiqPHXfi/xaAyWX2zr0hgBJf38B1oTAMw== +api: eJztVk1z2zYQ/SuYPTkzrOR6euKpiuOZqGkbjS3nIms8a3IlIiEBBABtqxz+984CpElJkZvccqguIoHdh3378cAGPG4dpCv4hFai8g7WCeTkMiuNl1pBCrcmR09O+IKEQYsVebJObLQVqAQaIx6j7+RO3amZ3br0Tgkh+uV7mYsz5+2bVCwLEvN3Qm8C2MhVeC3qcM4k+hrclRpzcRZP76Jb9Mcv4nYH2RtnWnmUSqptwI+A+SjoEOE1Skd9jO+Xy8XVc0aBbCrmITJLQjomR9ZqK54KWZLwdheA+0APKURs8rVVPfgfNx//viZntHKUill4F7ZbOBXtOCujyCEBbcgixznPIYVof98neTCFBEYv6aoBhRVBCkM9IAHJpTXoC0jA0tdaWsoh9bamBFxWUIWQNuB3hj2dt1JtIQEvfckLXT3EPIe2XUcEcv6tznfsdgjIVEl53kJjSpkFGtPPjhusGZ1nLJP0klx4G9FoAPNcshuWi5FVPKCLUz98psyP4lwMCC2HUVXS31fkHG4pYKrdx03I0T7TNnlZUXVZAnPsMS8DivirQ2nb4+MH/qsxiRHIq20NbcuofacE9hfn5/y3P5o3dZaRc5u6FH2fwfdnO57y28XFMfAnLGUe3MQVz8APoB7UMCePsuQn6alyxwalzvZ2v6MkUnnakoV2PeQercXdqPJ/6hgg171y29ea+aWSPdhp05AMseTd/6o784pHd3br8fj06Y3ZPU3jXUzftw7rTVjCjgBjbSvyhWaxMLUPsuALSGHaCYGbNoMktNM9BXFkH3v5qG0JKRTeG5dOp1mp63yCW1IeJyinaCQcXhmzsCsu2TTMjqOsttLvAt5sMf9Au/eEOVlIV+uxwQ23UWyMfbOXmqCRH4hT1KnarPaFtvKfWO1O2IroxTngBr0e5OnqGStT0pG8fEMehs4DqTY6xNDlvCP4FrMvpFhOOVmR+/nk18n5qYx0DmK2mHcjhVkYqZ5MMIPkIOcv2YYEqArzBJ6w+n3YYKpGO1+hGuFFmRG9XC/GJd4LsBnm+/8L/2e58LuO9/Tsp6ZEGcQsdEbTzfKqv9S5oOneBb9/7xTaeTZvmgd0dGvLtuXlrzVZHsp1EoEeuLtXDeTS8XMO6QZLR680y9l1p3lvxKmI+8FVPLWPWNb8Bgl8od3+V0nQ86LXhaYzuIxn/RJUdwA4uoT4goges4zr+6rteiSOi9slJPDQfbtUOmcXi08s6PgUY9WBetClsNZAiWpbR52IkPz7F3A47+g= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Variant Parameters"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} path={"/variants/{variant_id}/parameters"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Updates the parameters for an app variant. Args: - variant_id (str): The ID of the app variant to update. - payload (UpdateVariantParameterPayload): The payload containing the updated parameters. +variant_id (str): The ID of the app variant to update. +payload (UpdateVariantParameterPayload): The payload containing the updated parameters. Raises: - HTTPException: If there is an error while trying to update the app variant. +HTTPException: If there is an error while trying to update the app variant. Returns: - JSONResponse: A JSON response containing the updated app variant parameters. +JSONResponse: A JSON response containing the updated app variant parameters. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["parameters"],"title":"UpdateVariantParameterPayload"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"config":{"properties":{"config_name":{"type":"string","title":"Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name"],"title":"ConfigDB"},"created_at":{"type":"string","title":"Created At"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["revision","modified_by","config","created_at"],"title":"AppVariantRevision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "variant_id", + in: "path", + required: true, + schema: { type: "string", title: "Variant Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + parameters + </strong> + <span className={"openapi-schema__name"}>object</span> + <span className={"openapi-schema__divider"}></span> + <span className={"openapi-schema__required"}>required</span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "Parameters", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-variant-url.api.mdx b/docs/docs/reference/api/update-variant-url.api.mdx index 3044551fb2..c16d6c0266 100644 --- a/docs/docs/reference/api/update-variant-url.api.mdx +++ b/docs/docs/reference/api/update-variant-url.api.mdx @@ -5,77 +5,332 @@ description: "Updates the URL used in an app variant." sidebar_label: "Update Variant Url" hide_title: true hide_table_of_contents: true -api: eJztVlFv2zYQ/ivEPW2AZqfBnvQ0bw1Qt+lqOHZfHCNgpLPEViJV8lRHE/TfiyMlS3bWrAP2uLxEou4+Hu/77qNbIJk5iHfwUVolNTnYR5CiS6yqSBkNMWyrVBI6QTmK7fpW1A5TobSQWsiqEl9D4uxe3+uFzVx8r4UQw/KDSsVPjuzPsdjkKJavhTl4pEmqICNqv8ks5Na2mCbxptOQe72WyuGw05vNZnXzlKCvNxbLA1eG1horTJLU1oljrgoUZBulsxHpsoyAjFRbPUC/vfvw5xpdZbTDWCz8u7D9glA6VYkkBj3mSDlaD9mjH6UTrk4SdO5QF8JYoQ3NIAJToZVc6zKFGEL0w9Cu2hYQgcUvNTr63aQNxC0kRhNq4kdZVYXf1Oj5J8f8tOCSHEvJT5VlcFLo+I2x4haoqRBicGSVziACUlTwwtYW0EUwEvVScC8PsUw5JzFlqeihROdkhr4u3Xw4QLy7ROii04quiwK6/Yj5h0cR73uUrouGUPP4CRPqG6EspqzQ0JpJuROooNG+yO36diWbwsgUOgYdQcjW6BcCg75L11dX/O9c83cjcQP/EP0wD53f9tfr6+fAH2WhUp8mblii/wL1gt0USSpPsCIs3fOAwiRnX3+AIqUJM7TQ7UcupLWymSjh1oQCWQely14SzYnZAez7ob4ZYsNf/0kHfK6wdR+3n8p0aG/o7veP8Tq07+82G0LYWJ4BBm5LpNzw+FY1Z1SScohh3ovTzdtRpt3cof2qEhYQP6F1ngQ/nZATVS6ez5PC1OlMZqhJzqSay0r5WXGY1FZR41MWq+U7bN6gTNFCvNtPA+5YJoH487BTz2Wl3iG3QMuS3xc15caqvwKbESjWZx6y+IwswPVoRDdPsqwKPBnLyOHUQcbVS48Y5QZKH4wvrG/0wh9bLFZLRkPrwqxczV7NruDyOjoL5tmRiZ+d4VT+M0QX/T11FiLA0g8OEMryt/EDn7kyjkqpJ3jBWcTgf1tvQmcVTfz5/7vyP74re+kSPtG8KqTyrtPfa2HodoP8HEQQT6QYpo3nbh9BbhxxbNs+SodbW3QdL3+p0fJo7XsRP7Icd2x++TBkLXzGxl9WnuNfvEVxeFGHobpwbHbTkLFIuM8vxu4nTrLabiCCx/7KL03KKVYe2f3kEWLwPx042Q+5X2uhkDqrw3wFSP77Bi81Yjs= +api: eJztVsFu20YQ/ZXFnFqAlVyjJ56qJAaixm0E2cpFFowxORI3IXeZ3WFkVeC/F7NLirRcuynQY3URuZx5OzvvzSOPwLjzkK7hEzqNhj1sEsjJZ07XrK2BFFZ1jkxecUFqtbxWjadcaaPQKKxr9S0mTu7MnZm5nU/vjFKqX77XufrBs/sxVbcFqfk7ZbcBaZSq2KombDKJuY0rx0my6TjkzixRe+p3en97u7h6zCjUm6r5Vioj56xTNssa59W+0CUpdgdtdgPSeRkRmbhxpof+7ebjH0vytTWeUjUL98p1C0qbXGfIAroviAtyAbJD36NXvsky8n7blMo6ZSxPIAFbk0OpdZ5DCjH6vm9X40pIwNHXhjy/sfkB0iNk1jAZlkus6zJsas30sxd+juCzgiqUq9oJOGvycidY6RH4UBOk4Nlps4MEWHMpCytXQpvAQNRrwZ081DyXnMxWleb7irzHHYW6zOHjFtL1OUKbnFZMU5bQbgbMtwFF/d6htG3Sh9qHz5Rx1wjtKBeFxtaMyh1BRY12Ra6W1ws8lBZzaAV0AGHXUFiIDIYuXV5cyN9Tzd8MxPX8Q/LdPLRh218uL58Df8JS5yFNXYlE/wXqGbs5MepAsGaq/POA0mZPnn4HRdow7chBuxm4QOfwMFLCtY0Fig4qv3tNNCdme7CXQ0Mz1K08/ScdyLni1l3cZizTvr2xuy8f411s399t1oeIsTwDjNxWxIWV8a0byaiRC0hh2onTT4+DTNupJ/dNZyIguSLnAwlhOqFgrn06nWalbfIJ7sgwTlBPsdZwbsSz8FS9ldAwSJ6yxmk+BLzZYv6BDu8Jc3KQrjfjgBvRUFTF07ATIVjrDyT9MVjJ/azhwjr9Z6Q6AS0FFDFLGiDqXA4udfWIVV3SyXUGgsf2MqyeG8igRdBma0NhHQvdqd9g9oVMLojkfGzIxeTnycVLbeoS1Gwx74YMszBk/QlDGCRnRJwogASoChMGTFj9OjyQ89fWc4VmhBctSPVGuQpu9aSykZH//1L9j1+qnYyZHnlal6iDPXUvwDid616KHhJIR7KMYykDukmgsJ4l9nh8QE8rV7atLH9tyMmYbTpBP4g01+KSRT9wR/hCh/BWCxz/FLxMwssmDtiZtYvtxoxZJn1+NXYzspzF6hYSeOi+DSqbS4rDvdgk7iGF8I0hyWHgw9oRSjS7Js5ahJTfXzRScMo= sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Variant Url"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} path={"/variants/{variant_id}/service"} - context={"endpoint"} -> - -</MethodEndpoint> - - +></MethodEndpoint> Updates the URL used in an app variant. Args: - variant_id (str): The ID of the app variant to update. - url (str): The URL to update. +variant_id (str): The ID of the app variant to update. +url (str): The URL to update. Raises: - HTTPException: If an error occurs while trying to update the app variant. +HTTPException: If an error occurs while trying to update the app variant. Returns: - JSONResponse: A JSON response indicating whether the update was successful or not. +JSONResponse: A JSON response indicating whether the update was successful or not. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"application/json":{"schema":{"properties":{"url":{"type":"string","title":"Url"},"variant_id":{"type":"string","title":"Variant Id"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["url","variant_id"],"title":"UpdateVariantURLPayload"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"url"} + required={true} + schemaName={"Url (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Url" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"variant_id"} + required={true} + schemaName={"Variant Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Variant Id" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>commit_message</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/update-workspace.api.mdx b/docs/docs/reference/api/update-workspace.api.mdx index ec43985ce5..12585acd71 100644 --- a/docs/docs/reference/api/update-workspace.api.mdx +++ b/docs/docs/reference/api/update-workspace.api.mdx @@ -5,36 +5,36 @@ description: "Update Workspace" sidebar_label: "Update Workspace" hide_title: true hide_table_of_contents: true -api: eJy9GGtv2zbwrxj3acOU+NFHWn1a1hZo0HU10nQFFhgCI51tthKpklRcz/B/H46kJEq23C7oli8xj/fivU87kCUqZrgUVxnEUJUZM5hspPqsS5YiRFAyxQo0qDTEtzsQrECIQaoVE/xvS5nwDCLgAmIomVlDBAq/VFxhBrFRFUag0zUWDOIdmG1J5NooLlYQgeEmJ8C7gN/oKoP9PmpkNdr8CEEfa2ZOysLxQG1+k9mWCPssUykMCkNXrCxznlodx5+0FARrJZaKbGk4ajo53XfAxPbd0lquqxG9z0NEledAmtQ6/kG0+wgy1KniJcl7KKuXAYt95P2bJcycYhjBUqqCcIDQzwy3+gxL+eDYji4NOa5Gk3efMDXQR2s8APs9YSvUpRTamW02mdC/zsvhfZWmqPWyykfXHhke7JhUYWCCoTB54bDoReSHJatyMsdsMntyNp2eTWaj6SyePY0fPz1/NH02fX7xy2QSTyaHNh4SEJjsOwTMHk1bATw7xZjCOmrCbwjrvwsxh/YwVjcE30ed6vK9VYPoCizubKEKxXODhT6Mg0qjsohZxome5fPg3uX+YCATLYWuzB2zARl0nwy5AkVVQHwLciNQQQT3HDf2B2bcSPvjnuUVc7/bIsiyggsbNGUutwUKkxRMsBUqWBypc9cyx1rX5Ae4m/iNej4vURVcay7FkO2HHq+QZYneaoOFN0ESJLP21ghhlPk2OQmY3DPFmXA5lOMBsJAZX25rQJJKseSrSjXMW6KafUCsKpFoVPfc9kEvVGOq0NS6NiffOJuzZ9zFJt1Q3HMlhXVb68HgncMYwbMHcawcg9pobJi2R8+hBXg1W4Cl93HnjE1WaAGNRzo4nm8H5ln3YKRqz5tWZDhxWP4hwLMPQZ57CPK+prxOXGJGlNyJwI0DGnkoplNpGrY9aJ9L71qhRpOUTOuNVFn9ojue5z7WSVB7bN67zOVGh++tAWTy8Bw6Raq+CxzE4nypUHFsENpjGBa6FxfNPRNCml7edUAWi4t72cvOLqgXQomqjkVNDe5j6xQFU1weIwnvDqSgrnJzVFBz06cp0CieHqNpb/o0Xyqs8BiJvwgq5bypim1fBKYU254ssPOgmB6bptoB9TZoMMdK/wkFuvX824Jst6wb3jFZb23rbcazf/Pgt75rf0sHO/3bx3q83qBwtPs1CtlZ8/Fsdjhe/slynrnN45VStts+cLbM0DCenxgIcpl2br+jAXNhkHr7fjHsw999+tkZSK9OjUxvUWu2wnBSG0K1xhi5mewbrqF3OdEeL/BFa15n3eFnvHTmO7VCvL65mR8wdL7tOtXN16OPYYNAs5a05ZaVsYutWUMM4zCG9HjX22z346Zn6PEuXEX3EAGNB/VmXKkcYlgbU+p4PE5zWWXnbIXCsHPGx6zkNug1ppXiZmtJLudXb3D7GllGs+jtIkR4TzHmoqaL1jiMlfwNbuuciOGyMmup2r5kF+W1oyIDUfRet8vuq6+sKHNsl9U2ArqmbMDhZkObyuOzycXZ7PnN9En8ZBrPnp1PLqZ/2Q1FLKVV1Hvt0pphdDm/ooqKSjvGk/Pp+eRAXAeZEpGlJlDSXZM2HXs3lqbSXNgsBIOs+LW9IBuUUpuCiYDfkUDpTcne3Aa/mnGZM+42aWXz3AXRbacQUXeIDz+QtHFE952PGosI1lIbYrTb3TGNH1S+3xOYWjjFyiICO5jekT1vd5BxTb8ziJcs13igc1PA4Kdrn6c/jyA6/pY6ngQFE3U0OkEEn3F75FMP1ab/UXzHULYIrut82XmUF07a2Y1rCjWLg8pNmjuKyzTF0pzEXQQFY/7hBiK481+ICpkRiWIbqoJs47SVpan3HwvbQc7EqqJaG4NjSX//AHA5zc4= +api: eJy9Vttu2zgQ/RVhnrYoY8uujaJ6qpsWaNB2G6TOFljDCGhpbLORRJakkrqC/r0YUVfftgh21y+2qcOZ4ZnDM8pBKtTcCpleRRBApiJu8e5R6nujeIjAQHHNE7SoDQSLHFKeIAQg9eZORMBApBCA4nYLDDR+z4TGCAKrM2Rgwi0mHIIc7E7RLmO1SDfAwAob08JnvfGuIigK1kRucv8b8b/WwVyWpYuBxr6R0Y427ocMZWoxtfSIKxWLsORm+M3IlNbajEoTc1agoX+u9hx4uvu8LnnqV0Tnq1bSLI6BKqlr/JP2FgwiNKEWivI9NdTbToiCVd2M7rg9F5DBWuqEMEDwCyvKek5nuXVhvZmlxtUwufqGoYV9WNMBKApCazRKpsbRNvZ9+uqdHL5kYYjGrLPYu6nA8OTGhBo7FJySyaVD0YmoD2uexUTH2B9PL/zpxWjq+S+DF9Ng4g/8V5OxP37u+4HvH3J8KkGHst9J8HLUJhDRucAka9bI7xTqv5OYgz0t1JzWC0ZewlPxk9dlnTGLFlcwSDBZlbZ0JD3Xmu/OZv9U7T4m4dYVFlC6UElwhdsreHnEbRrdOs1PxuNDmf/FYxGVIbx3Wkv9dI1HaLmI6ZewmJhDQCzD3tPfaJZILW5QQ7Fs6XGctsf9KMO2F2ZzrnWf0Bi+wa5iTkFLMjynjX9oDZ3Lpa5wnV609Dp2Tx/jraPvnJW9n8+vDwK63vab6u6597UzPxO0W0mzVWW2HKd2CwEMuxoyw9zN02LYTD8zzLuTsAAGBvVDPYYzHUMAW2uVCYbDMJZZNOAbTC0fcDHkSsB+abPyqXdJ0PIiGAwzLeyujDe7vvqAu/fII9QQLJZdwBfSnVNSH9beNiU+4K6+JwHMMruVur4h1RDful1EGin6ph3E737wRMXYDtJWFf0zNMtd1+246Hz0IvBHwXQy8Cejv0v3TNeyLLTqZMXCGx7eY0o3mxh1wf3BaOCfoq3a4M2ur6qLykPbKdjBqLJeY5qWAANMylsKFnnyun1AfChpbMLTTrwjQtoz74p6iz/sUMVcuImvSx9wIlv0jMoAg6B5bWt1Rsu9d64lg600lvbn+YobvNVxUdDy9ww1yWXJ4IFrwVdE6SKHSBj6HUGw5rHBg1IbX4M/bqrr+8wDdvwItaRS0tMDjzP6Bwzucde+d5JT/Y9Ze/yUlritb0peQS5dtou5GxF1iAMfp8rdjlkYorJnscuOfVzfzoHBqnpvTWREWzR/JE/kj65aqVyn6cWW1nKIebrJyHkDcCHp8wsVpAit sidebar_class_name: "put api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Update Workspace"} -> -</Heading> +></Heading> <MethodEndpoint method={"put"} - path={"/organizations/{organization_id}/workspaces/{workspace_id}"} - context={"endpoint"} -> - -</MethodEndpoint> - - + path={"/organizations/{org_id}/workspaces/{workspace_id}"} +></MethodEndpoint> Update Workspace @@ -43,29 +43,810 @@ Update Workspace as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"}}}}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At","default":"2025-11-02 12:26:46.318197+00:00"},"updated_at":{"type":"string","title":"Updated At","default":"2025-11-02 12:26:46.318231+00:00"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","create_secret","view_secret","update_secret","delete_secret","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","name","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Path Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "org_id", + in: "path", + required: true, + schema: { type: "string", title: "Org Id" }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "workspace_id", + in: "path", + required: true, + schema: { type: "string", title: "Workspace Id" }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"application/json"} value={"application/json-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>updated_at</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"created_at"} + required={false} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Created At", + default: "2025-05-15 07:35:40.094202+00:00", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"updated_at"} + required={false} + schemaName={"Updated At (string)"} + qualifierMessage={undefined} + schema={{ + type: "string", + title: "Updated At", + default: "2025-05-15 07:35:40.094271+00:00", + }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>description</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>type</strong> + <span style={{ opacity: "0.6" }}>object</span> + <strong + style={{ + fontSize: "var(--ifm-code-font-size)", + color: "var(--openapi-required)", + }} + > + required + </strong> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"organization"} + required={true} + schemaName={"Organization (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Organization" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <strong>members</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + user + </strong> + <span + className={"openapi-schema__name"} + > + object + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <SchemaItem + name={"property name*"} + required={false} + schemaName={"any"} + qualifierMessage={undefined} + schema={{ + additionalProperties: true, + type: "object", + title: "User", + }} + collapsible={false} + discriminator={false} + ></SchemaItem> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span + className={"openapi-schema__container"} + > + <strong + className={"openapi-schema__property"} + > + roles + </strong> + <span + className={"openapi-schema__name"} + > + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={false} + name={"role_name"} + required={true} + schemaName={"WorkspaceRole (string)"} + qualifierMessage={ + "**Possible values:** [`owner`, `viewer`, `editor`, `evaluator`, `workspace_admin`, `deployment_manager`]" + } + schema={{ + type: "string", + enum: [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager", + ], + title: "WorkspaceRole", + }} + ></SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>role_description</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={ + "openapi-markdown__details" + } + > + <summary style={{}}> + <strong>permissions</strong> + <span style={{ opacity: "0.6" }}> + object + </span> + </summary> + <div + style={{ marginLeft: "1rem" }} + ></div> + <div> + <span + className={"badge badge--info"} + > + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + <div + style={{ + paddingTop: "1rem", + }} + > + **Possible values:** + [`read_system`, + `view_application`, + `edit_application`, + `create_application`, + `delete_application`, + `create_app_variant`, + `delete_app_variant`, + `modify_variant_configurations`, + `delete_application_variant`, + `run_service`, + `create_secret`, + `view_secret`, + `update_secret`, + `delete_secret`, + `view_app_environment_deployment`, + `edit_app_environment_deployment`, + `create_app_environment_deployment`, + `view_testset`, + `edit_testset`, + `create_testset`, + `delete_testset`, + `view_evaluation`, + `run_evaluations`, + `edit_evaluation`, + `create_evaluation`, + `delete_evaluation`, + `deploy_application`, + `view_workspace`, + `edit_workspace`, + `create_workspace`, + `delete_workspace`, + `modify_user_roles`, + `add_new_user_to_workspace`, + `edit_organization`, + `delete_organization`, + `add_new_user_to_organization`, + `reset_password`, + `view_billing`, + `edit_billing`, + `view_workflows`, + `edit_workflows`, + `view_evaluators`, + `edit_evaluators`, + `view_testsets`, + `edit_testsets`, + `view_annotations`, + `edit_annotations`, + `delete_annotations`] + </div> + </div> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: + "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "created_at": "2025-05-15 07:35:40.094202+00:00",\n "updated_at": "2025-05-15 07:35:40.094271+00:00",\n "id": "string",\n "name": "string",\n "description": "string",\n "type": "string",\n "organization": "string",\n "members": [\n null\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/upload-file.api.mdx b/docs/docs/reference/api/upload-file.api.mdx index 7e1762784d..d98d2edb79 100644 --- a/docs/docs/reference/api/upload-file.api.mdx +++ b/docs/docs/reference/api/upload-file.api.mdx @@ -5,75 +5,363 @@ description: "Uploads a CSV or JSON file and saves its data to Postgres." sidebar_label: "Upload File" hide_title: true hide_table_of_contents: true -api: eJztVsGOGzcM/RWBpwSY2JtFT3OqmybINm3WiJ1cvMZCHtEepRpJkThGXWP+vaA0tsfrzW7Qc04jS+Qj+fgoeQ8kNxHKBcwxUkSKsCxAYayC9qSdhRI+e+OkikKKN7MvwgXxx+z2o1hrg0JaJaLcYhSaolCSpCAnpi7SJmAc3dk7OwmbWN7ZNoHc086jKMVbTTUGIcXX6CxDVnGbEEd3VgiRwV/kwO+0wZelmNd4GZ+cyMC9H+Ui7q1sULy4TRVI87IUVKNIm26d1r2h0Gvhg9tqhSpl+wmpDZYTZjilK8qRA8bW0ME7x2TPCmMcQQHOY5Ac7UZBCX2xnCIUEPBbi5F+c2oH5R4qZwkt8bJpDWkvA43XLjSvmD/ejlWNTVr5wMCkMfKvAYf8M38hUtB2AwWQJoPHfok5H3cFpCweMeeQkqCElbYy7AYAzDh7DtlkBGl3t2soFw+xuuK4Y1tjoFuesHpZiY+M0TFoNnSrr1hRz44OqFiDKdWBM1N2PySzY4STB4UW00b0zsZM0vXVFX/OJTxrK+7UujXiU28MxbAT0nujq9TBMWvyqTZo9RT7N4qpO1D2PatMRwFVQEmo7iU9Zf0mW4kJPUuhVtBHPwN/0JEZ0kw33uCRjS5R+8v19SV5X6TRKlEj3obgwv9nTiFJbRKHhE28NDCuOjv9AcVpS7jBAN3yxIwMQQ4F/afLCTLjTdw8RfVfGKPcZPk/M2eJjH7MnukK15VD93aDfpzozex+v4zfM32PBTuYvJ/PpxeAubcNUu34dvIusouXVEMJ437K4zgPGhQQMWwxxMR7GwyUUBP5WI7HlXGtGskNWpIjqcfS6zTtEas2aNoll8n05gPu3qNUGKBcLIcGM1ZG7vW52ZFm6fUH3B1EXMKkpdoF/W9uYAGaJVlnLy5L27VL7j0Dk5ScmExvoAAuI4v4avR6dAUPn7YzYxa1rJKoD7HTMRQPWDjWDwVgkxQNhLL59XTAmTHPjbQDvP5mfpffhbNUBu/Czwf3Bx7cXi2E/9DYG6nTbKc27XtlLw7vV+QGZm0vC6hZ/eUC9vuVjPg5mK7j7W8tBpbvsoCtDFquWEwLvlPqg5D38Dfu+DbOjXqVJp/NTcupPPaY8z2VnSZVhZ4G5hf3Jo/JcUant7M5FLDq/zM0TrEPAyfc4rTkJLvuPxo/V5k= +api: eJztVk2P20YM/SsDnhJAsbeLnnSqs02QbdqsETu5eI0FLdHWJKMZZYZa1DX03wvOyLa83o+g554kj8hH8vGR4x0wbgLkC5hT4EAcYJlBSaHwumHtLOTwpTEOy6BQXc2+KufVH7ObT2qtDSm0pQp4T0FpDqpERsVOTV3gjacwurW3duI3Ib+1bQS5421DKlfvNFfkFapvwVmBLMJ9RBzdWqVUAn+VAr/Xhl7nal7ReXx2KgH3fpyKuLNYk3p1EytA8zpXXJGKh24d33tDpdeq8e5el1TGbD8Tt95KwgJX6oJTZE+hNbz3TjHFs6AQRpCBa8ijRLsuIYe+WEkRMvD0o6XAb125hXwHhbNMluW1bg3rBj2P187Xb4Q/OQ5FRXV8a7wAs6YgvwYcys/0hMBe2w1kwJoNHfql5vK5yyBm8Yi5hESGHFbaot8OAIRx8RyyKQhotzdryBcPsbrscGJbY6BbHrF6WalPgtEJaDJ0q29UcM+O9lSKBmOqA2eh7G5IZicIRw/2LcWD0DgbEkmXFxfyOJXwrC2kU+vWqM+9MWTDTmDTGF3EDo5Fk8+1QZfPsX9dCnV7yp6ySnRkUHhCpvIO+Tnrq2SlJvwihbqEPvoJ+IOOzIhnum4MHdjoIrW/Xl6ek/cVjS4jNeqd987/d+ZKYtQmcshUh3MD44qTrz+hOG2ZNuShWx6ZQe9xKOg/XUpQGK/D5jmq/6IQcJPk/8KcRTL6MXuhK1JXCt3bDfpxpDex+3QZvyf6Hgu2N/kwn0/PAFNva+LKyXZqXBCXBrmCHMb9lIdxGjTIIJC/Jx8i7603kEPF3IR8PC6Ma8sRbsgyjlCPsdHw8LqYxK/qSkzjKghUtF7zNuJNptcfafuBsCQP+WI5NJiJbJIQTs0OPcBGf6TtXuE5TFqunNf/pO5moCWBKnlJzdquXXTv6elze4vFd7JSqtSZ0r4Y/TK6eKqY3kFNpte9+rGI6t/nEc0ge0DXgSjIgOoofWDC+rfjB8lSGlKjHeD1K/x9ukBOUhpcIP/fzD9xM/fKYfqbx41BHZdAbNOuH4HF/qIL0sA0BMsMKhmTfAG73QoDffGm6+T4R0tepLzM4B69xpUIayHLp9qLegffaStrOzXqTVwRYm5aSeWxW18WWnKaFAU1PDA/W7AyModhnt7M5pDBqv9zUbtSfAQ44mbHV0my6/4Fa4RmKA== sidebar_class_name: "post api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Upload File"} -> -</Heading> - -<MethodEndpoint - method={"post"} - path={"/testsets/upload"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"post"} path={"/testsets/upload"}></MethodEndpoint> Uploads a CSV or JSON file and saves its data to Postgres. Args: upload_type : Either a json or csv file. - file (UploadFile): The CSV or JSON file to upload. - testset_name (Optional): the name of the testset if provided. +file (UploadFile): The CSV or JSON file to upload. +testset_name (Optional): the name of the testset if provided. Returns: - dict: The result of the upload process. +dict: The result of the upload process. <Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> - -<ParamsDetails - parameters={undefined} -> - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={{"content":{"multipart/form-data":{"schema":{"properties":{"upload_type":{"type":"string","title":"Upload Type"},"file":{"type":"string","format":"binary","title":"File"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"}},"type":"object","required":["file"],"title":"Body_upload_file"}}},"required":true}} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"TestSetSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - +></Heading> - \ No newline at end of file +<MimeTabs className={"openapi-tabs__mime"}> + <TabItem label={"multipart/form-data"} value={"multipart/form-data-schema"}> + <details + style={{}} + className={"openapi-markdown__details mime"} + data-collapsed={false} + open={true} + > + <summary style={{}} className={"openapi-markdown__details-summary-mime"}> + <h3 className={"openapi-markdown__details-summary-header-body"}> + Body + </h3> + <strong className={"openapi-schema__required"}>required</strong> + </summary> + <div style={{ textAlign: "left", marginLeft: "1rem" }}></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"upload_type"} + required={false} + schemaName={"Upload Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Upload Type" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"file"} + required={true} + schemaName={"binary"} + qualifierMessage={undefined} + schema={{ type: "string", format: "binary", title: "File" }} + ></SchemaItem> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details style={{}} className={"openapi-markdown__details"}> + <summary style={{}}> + <strong>testset_name</strong> + <span style={{ opacity: "0.6" }}>object</span> + </summary> + <div style={{ marginLeft: "1rem" }}></div> + <div> + <span className={"badge badge--info"}>anyOf</span> + <SchemaTabs> + <TabItem label={"MOD1"} value={"0-item-properties"}> + <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}> + string + </div> + </TabItem> + </SchemaTabs> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> +</MimeTabs> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem + collapsible={false} + name={"id"} + required={true} + schemaName={"Id (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Id" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"name"} + required={true} + schemaName={"Name (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Name" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"created_at"} + required={true} + schemaName={"Created At (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Created At" }} + ></SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "id": "string",\n "name": "string",\n "created_at": "string"\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/api/variants.tag.mdx b/docs/docs/reference/api/variants.tag.mdx index eb7cd6c70f..e158173a13 100644 --- a/docs/docs/reference/api/variants.tag.mdx +++ b/docs/docs/reference/api/variants.tag.mdx @@ -5,16 +5,9 @@ description: "Variants" custom_edit_url: null --- - - - - - - ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; <DocCardList items={useCurrentSidebarCategory().items}/> ``` - \ No newline at end of file diff --git a/docs/docs/reference/api/verify-permissions.api.mdx b/docs/docs/reference/api/verify-permissions.api.mdx index 6adc61c479..17f59cdddd 100644 --- a/docs/docs/reference/api/verify-permissions.api.mdx +++ b/docs/docs/reference/api/verify-permissions.api.mdx @@ -5,36 +5,33 @@ description: "Verify Permissions" sidebar_label: "Verify Permissions" hide_title: true hide_table_of_contents: true -api: eJy9Vk1v2zAM/SsBz0KcFTv5tGAb1qAbFrTZLkFQqDYTq5MlVaKLZYH/+0D5o3bSAimw9ZREeuSjHqmnHIDkLkC6hnmWYQiTj9aQtxo2AqxDL0lZs8ghhUf0aru/dehLFYKyJoAAJ70skdBzigMYWSKkIDOOAgHKQAoPFfo9CPD4UCmPOaRbqQMKCFmBpYT0ANLsv29jBto7zhDIK7ODWvQrptIa6o0AUqR5Yd6Q1IxpeUNmHd7GgP/LfcNEkxXvnvKr/B+wC9haX0qCFKpK5WdUs8hHtXgMtvLZm8hx3XKdKtJX8eai9DVFXTbMF5w1AQMzXMxm/JFjyLxycZBSuKniFdhWenLdgkFAZg2hoViXc1pl8Uok94FjDk9V13VdC3h/cXGa+KfUKo9hk8/eW/+KrOA8X0NSTd05klSavynCMpwCtM1Gu2e0UxnCHXqoN7Xo1qT3kpvUqfnVNgVCLaAMO8583JoO+g1DkDuEPtnL0ChGPzQdzN7dY0ajCVnHczXULW7Q6id5G3VfPsanRr7nyDrI5Wq1PEnY9PaoqdEPJ8uRH5ZIhWW33CFFe6QCUkgGppk0PgoCAvrHzjgrryGFgsiFNEkybat8KndoSE6lSqRTcbYDZpVXtI8h8+XiCveXKHP0kK43Q8ANj08zEGNY3wvp1BVyFe1FnVdUWK/+yKFzF00Un12ZrY3hnfvG4ibz5QIEPw2hEWU2fTedwbFUIzBPvszi5HfccRvEkQr9+UEAlnHsgVCWH542uDJnA5XSDPI925lRRb0MhL8pcVqqONmR/9B2bQ3jp67t20ZAYQPx/uFwJwP+8LquebkxNm5NroK80wNr+4X74bP4KHXF7PEWvgAevWXnB0SfPQd+/D68KuaIZcM/vOKQOImimxwWownlfxeOBlEnrsdZ+uvz5fMK6vov3Qntww== +api: eJy9Vk1vGjEQ/StozhbQqKc9laZRg9KqKKG9IBRNdgdw4rUd2xuVov3v1Xg/2IUgEanNCbDfzHt+4xmzg4BrD8kCJmlK3g8ujQ7OKFgKMJYcBmn0NIMEXsjJ1fbeksul99JoDwIsOswpkOMUO9CYEySAKUeBAKkhgeeC3BYEOHoupKMMkhUqTwJ8uqEcIdkB6u2PVcwQtpYz+OCkXkMp2hVdKAXlUkCQQfHCpCIpGVPz+tRYuo8B/5f7jokGc9495pfZP2AXsDIuxwAJFIXMzlAzzXpaHHlTuPRd7LituY4daVW8uymtpujLkvm8NdqTZ4aL8Zg/MvKpkzZepATuitgCq0INbmswCEiNDqRD1GWtkmlsidGj55jdXnVZlqWAjxcXx4l/oZJZDBtcOWfcG7KCddyGQVa6MwooFX+TgXJ/DFAm7e2eUU6pA63JQbksRbOGziEXqXHzm6kEQikg92vOfFiaBvqdvMc1QZvsNDSa0V6aBmYeHikNvRuyiOeqqGtcp9R7eyt3Tx/jS2Xfa2QN5Ho+nx0lrGp7UNQ4Dwez3jzMKWwMT8s1hTgewwYSGHWG5qiaoyDAk3tpBmfhFCSwCcH6ZDRKlSmyIa5JBxyiHKGVcEg/ibuDS4bGi+8pLZwM25hvMpve0PaaMCMHyWLZBdzx3apuSx/WFgqtvCGWWHfxpAgb4+Qf7I71TRXFxki9MjG8Gc2Vts+YPpHmxudzVrLHww/D8anD1AGDyWxatwimsUUaHREG4sCu1igQQHnsDwiE+af9Bqu0xoccdSffqyXsKWstCfQ7jKxCGVsg8u/q8i6g/ybWBV4K2BgfeH+3e0BPP50qS16uJiCXKZMeH1RnBj7Rtvt+vqAqmD226wlw79E7PyAO5HPghw/Jm2IOWJb8w0kOibdSNLeIzahC+W+IDZ2oo/HIWdo++3o1h7L8Cydh/FI= sidebar_class_name: "get api-method" -info_path: reference/api/agenta-api +info_path: reference/api/agenta-backend custom_edit_url: null --- +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; <Heading as={"h1"} className={"openapi__heading"} children={"Verify Permissions"} -> -</Heading> - -<MethodEndpoint - method={"get"} - path={"/permissions/verify"} - context={"endpoint"} -> - -</MethodEndpoint> - +></Heading> +<MethodEndpoint method={"get"} path={"/permissions/verify"}></MethodEndpoint> Verify Permissions @@ -43,29 +40,305 @@ Verify Permissions as={"h2"} className={"openapi-tabs__heading"} children={"Request"} -> -</Heading> +></Heading> -<ParamsDetails - parameters={[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}]} +<details + style={{ marginBottom: "1rem" }} + className={"openapi-markdown__details"} + data-collapsed={false} + open={true} > - -</ParamsDetails> - -<RequestSchema - title={"Body"} - body={undefined} -> - -</RequestSchema> - -<StatusCodes - id={undefined} - label={undefined} - responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} -> - -</StatusCodes> - - - \ No newline at end of file + <summary style={{}}> + <h3 className={"openapi-markdown__details-summary-header-params"}> + Query Parameters + </h3> + </summary> + <div> + <ul> + <ParamsItem + className={"paramsItem"} + param={{ + name: "action", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Action", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "scope_type", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Scope Type", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "scope_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Scope Id", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "resource_type", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string" }, { type: "null" }], + title: "Resource Type", + }, + }} + ></ParamsItem> + <ParamsItem + className={"paramsItem"} + param={{ + name: "resource_id", + in: "query", + required: false, + schema: { + anyOf: [{ type: "string", format: "uuid" }, { type: "null" }], + title: "Resource Id", + }, + }} + ></ParamsItem> + </ul> + </div> +</details> +<div> + <div> + <ApiTabs label={undefined} id={undefined}> + <TabItem label={"200"} value={"200"}> + <div>Successful Response</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}>any</ul> + </details> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + <TabItem label={"422"} value={"422"}> + <div>Validation Error</div> + <div> + <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}> + <TabItem label={"application/json"} value={"application/json"}> + <SchemaTabs className={"openapi-tabs__schema"}> + <TabItem label={"Schema"} value={"Schema"}> + <details + style={{}} + className={"openapi-markdown__details response"} + data-collapsed={false} + open={true} + > + <summary + style={{}} + className={"openapi-markdown__details-summary-response"} + > + <strong>Schema</strong> + </summary> + <div + style={{ textAlign: "left", marginLeft: "1rem" }} + ></div> + <ul style={{ marginLeft: "1rem" }}> + <SchemaItem collapsible={true} className={"schemaItem"}> + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong className={"openapi-schema__property"}> + detail + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <SchemaItem + collapsible={true} + className={"schemaItem"} + > + <details + style={{}} + className={"openapi-markdown__details"} + > + <summary style={{}}> + <span className={"openapi-schema__container"}> + <strong + className={"openapi-schema__property"} + > + loc + </strong> + <span className={"openapi-schema__name"}> + object[] + </span> + <span + className={"openapi-schema__divider"} + ></span> + <span + className={"openapi-schema__required"} + > + required + </span> + </span> + </summary> + <div style={{ marginLeft: "1rem" }}> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + paddingBottom: ".5rem", + }} + > + Array [ + </div> + </li> + <div> + <span className={"badge badge--info"}> + anyOf + </span> + <SchemaTabs> + <TabItem + label={"MOD1"} + value={"0-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + string + </div> + </TabItem> + <TabItem + label={"MOD2"} + value={"1-item-properties"} + > + <div + style={{ + marginTop: ".5rem", + marginBottom: ".5rem", + }} + > + integer + </div> + </TabItem> + </SchemaTabs> + </div> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + <SchemaItem + collapsible={false} + name={"msg"} + required={true} + schemaName={"Message (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Message" }} + ></SchemaItem> + <SchemaItem + collapsible={false} + name={"type"} + required={true} + schemaName={"Error Type (string)"} + qualifierMessage={undefined} + schema={{ type: "string", title: "Error Type" }} + ></SchemaItem> + <li> + <div + style={{ + fontSize: "var(--ifm-code-font-size)", + opacity: "0.6", + marginLeft: "-.5rem", + }} + > + ] + </div> + </li> + </div> + </details> + </SchemaItem> + </ul> + </details> + </TabItem> + <TabItem + label={"Example (from schema)"} + value={"Example (from schema)"} + > + <ResponseSamples + responseExample={ + '{\n "detail": [\n {\n "loc": [\n "string",\n 0\n ],\n "msg": "string",\n "type": "string"\n }\n ]\n}' + } + language={"json"} + ></ResponseSamples> + </TabItem> + </SchemaTabs> + </TabItem> + </MimeTabs> + </div> + </TabItem> + </ApiTabs> + </div> +</div> diff --git a/docs/docs/reference/openapi.json b/docs/docs/reference/openapi.json index 768da55536..911d93cc8c 100644 --- a/docs/docs/reference/openapi.json +++ b/docs/docs/reference/openapi.json @@ -1 +1,18053 @@ -{"openapi":"3.1.0","info":{"title":"Agenta API","version":"0.1.0","description":"Agenta API","contact":{"name":"Agenta","url":"https://agenta.ai","email":"team@agenta.ai"}},"paths":{"/billing/stripe/events/":{"post":{"tags":["Billing"],"summary":"Handle Events","operationId":"handle_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/portals/":{"post":{"tags":["Billing"],"summary":"Create Portal User Route","operationId":"create_portal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/checkouts/":{"post":{"tags":["Billing"],"summary":"Create Checkout User Route","operationId":"create_checkout","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Billing"],"summary":"Fetch Plan User Route","operationId":"fetch_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/plans/switch":{"post":{"tags":["Billing"],"summary":"Switch Plans User Route","operationId":"switch_plans","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["Billing"],"summary":"Fetch Subscription User Route","operationId":"fetch_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription User Route","operationId":"cancel_plan","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Fetch Usage User Route","operationId":"fetch_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/billing/stripe/portals/":{"post":{"tags":["Admin","Billing"],"summary":"Create Portal Admin Route","operationId":"admin_create_portal","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/stripe/checkouts/":{"post":{"tags":["Admin","Billing"],"summary":"Create Checkout Admin Route","operationId":"admin_create_checkout","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/plans/switch":{"post":{"tags":["Admin","Billing"],"summary":"Switch Plans Admin Route","operationId":"admin_switch_plans","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/subscription/cancel":{"post":{"tags":["Admin","Billing"],"summary":"Cancel Subscription Admin Route","operationId":"admin_cancel_subscription","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/usage/report":{"post":{"tags":["Admin","Billing"],"summary":"Report Usage","operationId":"admin_report_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/organizations/own":{"get":{"summary":"Get User Organization","operationId":"get_own_org","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOutput"}}}}}}},"/organizations/{organization_id}":{"get":{"tags":["Organization"],"summary":"Fetch Organization Details","description":"Return the details of the organization.","operationId":"fetch_organization_details","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Organization","operationId":"update_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces":{"post":{"summary":"Create Workspace","operationId":"create_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}":{"put":{"summary":"Update Workspace","operationId":"update_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/permissions":{"get":{"summary":"Get All Workspace Permissions","description":"Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.","operationId":"get_all_workspace_permissions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}}},"/workspaces/{workspace_id}/roles":{"post":{"summary":"Assign Role To User","description":"Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"assign_role_to_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Unassign Role From User","description":"Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n organization_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.","operationId":"unassign_role_from_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/by_resource":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation Ids","description":"Fetches evaluation ids for a given resource type and id.\n\nArguments:\n app_id (str): The ID of the app for which to fetch evaluations.\n resource_type (str): The type of resource for which to fetch evaluations.\n resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.\n\nRaises:\n HTTPException: If the resource_type is invalid or access is denied.\n\nReturns:\n List[str]: A list of evaluation ids.","operationId":"fetch_evaluation_ids_evaluations_by_resource_get","parameters":[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Resource Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Fetch Evaluation Ids Evaluations By Resource Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/{evaluation_id}/status":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation Status","description":"Fetches the status of the evaluation.\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n (str): the evaluation status","operationId":"fetch_evaluation_status","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/{evaluation_id}/results":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation Results","description":"Fetches the results of the evaluation\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n _type_: _description_","operationId":"fetch_legacy_evaluation_results","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/{evaluation_id}/evaluation_scenarios":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation Scenarios","description":"Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.","operationId":"fetch_legacy_evaluation_scenarios","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/oss__src__models__api__evaluation_model__EvaluationScenario"},"title":"Response Fetch Legacy Evaluation Scenarios"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations":{"get":{"tags":["Evaluations"],"summary":"Fetch List Evaluations","description":"Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[Evaluation]: A list of evaluations.","operationId":"fetch_legacy_evaluations","parameters":[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Evaluation"},"title":"Response Fetch Legacy Evaluations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluations","description":"Delete specific comparison tables based on their unique IDs.\n\nArgs:\ndelete_evaluations (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.","operationId":"delete_legacy_evaluations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEvaluation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Delete Legacy Evaluations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","description":"Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n Evaluation: The fetched evaluation.","operationId":"fetch_legacy_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/evaluation_scenarios/comparison-results":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation Scenarios Comparison Results","description":"Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.","operationId":"fetch_legacy_evaluation_scenarios_comparison_results","parameters":[{"name":"evaluations_ids","in":"query","required":true,"schema":{"type":"string","title":"Evaluations Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Fetch Legacy Evaluation Scenarios Comparison Results"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/preview/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_evaluation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEvaluation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations":{"post":{"tags":["Human-Evaluations"],"summary":"Create Human Evaluation","description":"Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_","operationId":"create_human_evaluation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewHumanEvaluation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Human-Evaluations"],"summary":"Fetch List Human Evaluations","description":"Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[HumanEvaluation]: A list of evaluations.","operationId":"fetch_list_human_evaluations_human_evaluations_get","parameters":[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HumanEvaluation"},"title":"Response Fetch List Human Evaluations Human Evaluations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Human-Evaluations"],"summary":"Delete Evaluations","description":"Delete specific comparison tables based on their unique IDs.\n\nArgs:\n payload (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.","operationId":"delete_evaluations_human_evaluations_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEvaluation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Delete Evaluations Human Evaluations Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations/{evaluation_id}":{"get":{"tags":["Human-Evaluations"],"summary":"Fetch Human Evaluation","description":"Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n HumanEvaluation: The fetched evaluation.","operationId":"fetch_human_evaluation_human_evaluations__evaluation_id__get","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanEvaluation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Human-Evaluations"],"summary":"Update Human Evaluation","description":"Updates an evaluation's status.\n\nRaises:\n HTTPException: If the columns in the test set do not match with the inputs in the variant.\n\nReturns:\n None: A 204 No Content status code, indicating that the update was successful.","operationId":"update_human_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanEvaluationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations/{evaluation_id}/evaluation_scenarios":{"get":{"tags":["Human-Evaluations"],"summary":"Fetch Human Evaluation Scenarios","description":"Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.","operationId":"fetch_human_evaluation_scenarios","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HumanEvaluationScenario"},"title":"Response Fetch Human Evaluation Scenarios"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}":{"put":{"tags":["Human-Evaluations"],"summary":"Update Evaluation Scenario Router","description":"Updates an evaluation scenario's vote or score based on its type.\n\nRaises:\n HTTPException: If update fails or unauthorized.\n\nReturns:\n None: 204 No Content status code upon successful update.","operationId":"update_evaluation_scenario_router_human_evaluations__evaluation_id__evaluation_scenario__evaluation_scenario_id___evaluation_type__put","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}},{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}},{"name":"evaluation_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EvaluationType"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanEvaluationScenarioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score":{"get":{"tags":["Human-Evaluations"],"summary":"Get Evaluation Scenario Score Router","description":"Fetch the score of a specific evaluation scenario.\n\nArgs:\n evaluation_scenario_id: The ID of the evaluation scenario to fetch.\n\nReturns:\n Dictionary containing the scenario ID and its score.","operationId":"get_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_get","parameters":[{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Evaluation Scenario Score Router Human Evaluations Evaluation Scenario Evaluation Scenario Id Score Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Human-Evaluations"],"summary":"Update Evaluation Scenario Score Router","description":"Updates the score of an evaluation scenario.\n\nRaises:\n HTTPException: Server error if the evaluation update fails.\n\nReturns:\n None: 204 No Content status code upon successful update.","operationId":"update_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_put","parameters":[{"name":"evaluation_scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioScoreUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/human-evaluations/{evaluation_id}/results":{"get":{"tags":["Human-Evaluations"],"summary":"Fetch Results","description":"Fetch all the results for one the comparison table\n\nArguments:\n evaluation_id -- _description_\n\nReturns:\n _description_","operationId":"fetch_results","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vault/v1/secrets/":{"get":{"tags":["Secrets"],"summary":"List Secrets","operationId":"list_secrets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}},"post":{"tags":["Secrets"],"summary":"Create Secret","operationId":"create_secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vault/v1/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Read Secret","operationId":"read_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Secrets"],"summary":"Update Secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete Secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/otlp/v1/traces":{"post":{"tags":["Observability"],"summary":"Receive /v1/traces via OTLP","description":"Receive traces via OTLP.","operationId":"otlp_v1_traces","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/observability/v1/otlp/traces":{"get":{"tags":["Observability"],"summary":"Status of OTLP endpoint","description":"Status of OTLP endpoint.","operationId":"otlp_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}},"post":{"tags":["Observability"],"summary":"Receive traces via OTLP","description":"Receive traces via OTLP.","operationId":"otlp_receiver","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/observability/v1/traces":{"get":{"tags":["Observability"],"summary":"Query traces, with optional grouping, windowing, filtering, and pagination.","description":"Query traces, with optional grouping, windowing, filtering, and pagination.","operationId":"query_traces","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["opentelemetry","agenta"],"type":"string","default":"agenta","title":"Format"}},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newest"}},{"name":"filtering","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filtering"}},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}},{"name":"stop","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/oss__src__apis__fastapi__observability__models__OTelTracingResponse"},{"$ref":"#/components/schemas/AgentaNodesResponse"},{"$ref":"#/components/schemas/AgentaTreesResponse"},{"$ref":"#/components/schemas/AgentaRootsResponse"}],"title":"Response Query Traces"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Observability"],"summary":"Delete traces","description":"Delete trace.","operationId":"delete_traces","parameters":[{"name":"node_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Node Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/observability/v1/analytics":{"get":{"tags":["Observability"],"summary":"Query analytics, with optional grouping, windowing, filtering.","operationId":"query_analytics","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["legacy","agenta"],"type":"string","default":"agenta","title":"Format"}},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"filtering","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filtering"}},{"name":"timeRange","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timerange"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}},{"name":"environment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment"}},{"name":"variant","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LegacyAnalyticsResponse"},{"$ref":"#/components/schemas/oss__src__apis__fastapi__observability__models__OldAnalyticsResponse"}],"title":"Response Query Analytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/observability/v1/traces/{trace_id}":{"get":{"tags":["Observability"],"summary":"Fetch trace by ID.","description":"Fetch trace by ID.","operationId":"fetch_trace_by_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Trace Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["opentelemetry","agenta"],"type":"string","default":"openetelemetry","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/oss__src__apis__fastapi__observability__models__OTelTracingResponse"},{"$ref":"#/components/schemas/AgentaNodesResponse"},{"$ref":"#/components/schemas/AgentaTreesResponse"},{"$ref":"#/components/schemas/AgentaRootsResponse"}],"title":"Response Fetch Trace By Id"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/traces/":{"post":{"tags":["Tracing"],"summary":"Create Trace","operationId":"create_trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/traces/{trace_id}":{"get":{"tags":["Tracing"],"summary":"Fetch Trace","operationId":"fetch_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/oss__src__apis__fastapi__tracing__models__OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tracing"],"summary":"Edit Trace","operationId":"edit_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tracing"],"summary":"Delete Trace","operationId":"delete_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/spans/":{"post":{"tags":["Tracing"],"summary":"Ingest Spans","operationId":"ingest_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/spans/ingest":{"post":{"tags":["Tracing"],"summary":"Ingest Spans","operationId":"ingest_spans_rpc","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/spans/query":{"post":{"tags":["Tracing"],"summary":"Query Spans","operationId":"query_spans_rpc","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/oss__src__apis__fastapi__tracing__models__OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/spans/analytics":{"post":{"tags":["Tracing"],"summary":"Fetch Legacy Analytics","operationId":"fetch_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/oss__src__apis__fastapi__tracing__models__OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/tracing/analytics/query":{"post":{"tags":["Tracing"],"summary":"Fetch Analytics","operationId":"fetch_new_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/invocations/":{"post":{"tags":["Invocations"],"summary":"Create Invocation","operationId":"create_invocation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/invocations/{trace_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/invocations/{trace_id}/{span_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/invocations/query":{"post":{"tags":["Invocations"],"summary":"Query Invocations","operationId":"query_invocations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/annotations/":{"post":{"tags":["Annotations"],"summary":"Create Annotation","operationId":"create_annotation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/annotations/{trace_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation_by_trace_id","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/annotations/{trace_id}/{span_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/annotations/query":{"post":{"tags":["Annotations"],"summary":"Query Annotations","operationId":"query_annotations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testcases/{testcase_id}":{"get":{"tags":["Testcases"],"summary":"Fetch Testcase","operationId":"fetch_testcase_preview_testcases__testcase_id__get","parameters":[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testcases/query":{"post":{"tags":["Testcases"],"summary":"Query Testcases","operationId":"query_testcases_preview_testcases_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Testset","operationId":"create_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset","operationId":"fetch_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset","operationId":"edit_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset","operationId":"archive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset","operationId":"unarchive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Testsets","operationId":"query_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/variants/":{"post":{"tags":["Testsets"],"summary":"Create Testset Variant","operationId":"create_testset_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/variants/{testset_variant_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Variant","operationId":"fetch_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Variant","operationId":"edit_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/variants/{testset_variant_id}/archive":{"put":{"tags":["Testsets"],"summary":"Archive Testset Variant","operationId":"archive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/variants/{testset_variant_id}/unarchive":{"put":{"tags":["Testsets"],"summary":"Unarchive Testset Variant","operationId":"unarchive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/variants/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Variants","operationId":"query_testset_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/retrieve":{"post":{"tags":["Testsets"],"summary":"Retrieve Testset Revision","operationId":"retrieve_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision","operationId":"create_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/{testset_revision_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Revision","operationId":"fetch_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Revision","operationId":"edit_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/{testset_revision_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Revision","operationId":"archive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/{testset_revision_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Revision","operationId":"unarchive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Revisions","operationId":"query_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/commit":{"post":{"tags":["Testsets"],"summary":"Commit Testset Revision","operationId":"commit_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/testsets/revisions/log":{"post":{"tags":["Testsets"],"summary":"Log Testset Revisions","operationId":"log_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset","operationId":"create_simple_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Simple Testset","operationId":"fetch_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Simple Testset","operationId":"edit_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Simple Testset","operationId":"archive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Simple Testset","operationId":"unarchive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Simple Testsets","operationId":"query_simple_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset From File","operationId":"create_simple_testset_from_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_simple_testset_from_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}/upload":{"post":{"tags":["Testsets"],"summary":"Edit Simple Testset From File","operationId":"edit_simple_testset_from_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_edit_simple_testset_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Simple Testset To File","operationId":"fetch_simple_testset_to_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/testsets/{testset_id}/transfer":{"post":{"tags":["Testsets"],"summary":"Transfer Simple Testset","operationId":"transfer_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/":{"post":{"tags":["Queries"],"summary":"Create Query","operationId":"create_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query","operationId":"fetch_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query","operationId":"edit_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query","operationId":"archive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query","operationId":"unarchive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/query":{"post":{"tags":["Queries"],"summary":"Query Queries","operationId":"query_queries","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/retrieve":{"post":{"tags":["Queries"],"summary":"Retrieve Query Revision","operationId":"retrieve_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/":{"post":{"tags":["Queries"],"summary":"Create Query Revision","operationId":"create_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/{query_revision_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Revision","operationId":"fetch_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Revision","operationId":"edit_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/{query_revision_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Revision","operationId":"archive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/{query_revision_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Revision","operationId":"unarchive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/query":{"post":{"tags":["Queries"],"summary":"Query Query Revisions","operationId":"query_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/commit":{"post":{"tags":["Queries"],"summary":"Commit Query Revision","operationId":"commit_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/queries/revisions/log":{"post":{"tags":["Queries"],"summary":"Log Query Revisions","operationId":"log_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/queries/":{"post":{"tags":["Queries"],"summary":"Create Simple Query","operationId":"create_simple_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Simple Query","operationId":"fetch_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Simple Query","operationId":"edit_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Simple Query","operationId":"archive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Simple Query","operationId":"unarchive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/queries/query":{"post":{"tags":["Queries"],"summary":"Query Simple Queries","operationId":"query_simple_queries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/legacy/applications/revisions/retrieve":{"post":{"tags":["Applications"],"summary":"Retrieve Application Revision","operationId":"retrieve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/legacy/applications/":{"post":{"tags":["Applications"],"summary":"Create Application","description":"Create a new application using workflow data stored in legacy format","operationId":"create_legacy_application","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyApplicationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/legacy/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application","description":"Get an application using workflow data stored in legacy format","operationId":"fetch_legacy_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Update Application","description":"Update an application using workflow data stored in legacy format","operationId":"edit_legacy_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Workflow","operationId":"create_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow","operationId":"fetch_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow","operationId":"edit_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow","operationId":"archive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow","operationId":"unarchive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Workflows","operationId":"query_workflows","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Variant","operationId":"create_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/{workflow_variant_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Variant","operationId":"fetch_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Variant","operationId":"edit_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/{workflow_variant_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Variant","operationId":"archive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/{workflow_variant_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Variant","operationId":"unarchive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Variants","operationId":"query_workflow_variants","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/variants/fork":{"post":{"tags":["Workflows"],"summary":"Fork Workflow Variant","operationId":"fork_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/retrieve":{"get":{"tags":["Workflows"],"summary":"Retrieve Workflow Revision","operationId":"retrieve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Revision","operationId":"create_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/{workflow_revision_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Revision","operationId":"fetch_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Revision","operationId":"edit_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/{workflow_revision_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Revision","operationId":"archive_workflow_revision_rpc","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/{workflow_revision_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Revision","operationId":"unarchive_workflow_revision_rpc","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Revisions","operationId":"query_workflow_revisions","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/commit":{"post":{"tags":["Workflows"],"summary":"Commit Workflow Revision","operationId":"commit_workflow_revision","parameters":[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/revisions/log":{"post":{"tags":["Workflows"],"summary":"Log Workflow Revisions","operationId":"log_workflow_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/invoke":{"post":{"tags":["Workflows"],"summary":"Invoke Workflow","operationId":"invoke_workflow","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_invoke_workflow"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/workflows/inspect":{"post":{"tags":["Workflows"],"summary":"Inspect Workflow","operationId":"inspect_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowServiceInterface-Input"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowServiceInterface-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator","operationId":"create_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator","operationId":"fetch_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator","operationId":"edit_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator","operationId":"archive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator","operationId":"unarchive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluators","operationId":"query_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Variant","operationId":"create_evaluator_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/{evaluator_variant_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Variant","operationId":"fetch_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Variant","operationId":"edit_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/{evaluator_variant_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Variant","operationId":"archive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/{evaluator_variant_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Variant","operationId":"unarchive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Variants","operationId":"query_evaluator_variants","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/variants/fork":{"post":{"tags":["Evaluators"],"summary":"Fork Evaluator Variant","operationId":"fork_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/retrieve":{"post":{"tags":["Evaluators"],"summary":"Retrieve Evaluator Revision","operationId":"retrieve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Revision","operationId":"create_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/{evaluator_revision_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Revision","operationId":"fetch_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Revision","operationId":"edit_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/{evaluator_revision_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Revision","operationId":"archive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/{evaluator_revision_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Revision","operationId":"unarchive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Revisions","operationId":"query_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/commit":{"post":{"tags":["Evaluators"],"summary":"Commit Evaluator Revision","operationId":"commit_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluators/revisions/log":{"post":{"tags":["Evaluators"],"summary":"Log Evaluator Revisions","operationId":"log_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Simple Evaluator","operationId":"create_simple_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Simple Evaluator","operationId":"fetch_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Simple Evaluator","operationId":"edit_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Simple Evaluator","operationId":"archive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Simple Evaluator","operationId":"unarchive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Simple Evaluators","operationId":"query_simple_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluators/{evaluator_id}/transfer":{"post":{"tags":["Evaluators"],"summary":"Transfer Simple Evaluator","operationId":"transfer_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evaluations/runs/refresh":{"post":{"tags":["Evaluations","Admin"],"summary":"Refresh Runs","operationId":"refresh_runs_admin_evaluations_runs_refresh_post","parameters":[{"name":"trigger_interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":60,"minimum":1},{"type":"null"}],"default":1,"title":"Trigger Interval"}},{"name":"trigger_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trigger Datetime"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/":{"post":{"tags":["Evaluations"],"summary":"Create Runs","operationId":"create_runs_preview_evaluations_runs__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Runs","operationId":"delete_runs_preview_evaluations_runs__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Runs","operationId":"edit_runs_preview_evaluations_runs__patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/query":{"post":{"tags":["Evaluations"],"summary":"Query Runs","operationId":"query_runs_preview_evaluations_runs_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/close":{"post":{"tags":["Evaluations"],"summary":"Close Runs","operationId":"close_runs_preview_evaluations_runs_close_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/open":{"post":{"tags":["Evaluations"],"summary":"Open Runs","operationId":"open_runs_preview_evaluations_runs_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/{run_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Run","operationId":"fetch_run_preview_evaluations_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Run","operationId":"edit_run_preview_evaluations_runs__run_id__patch","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Run","operationId":"delete_run_preview_evaluations_runs__run_id__delete","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/{run_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run_preview_evaluations_runs__run_id__close_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/runs/{run_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Run","operationId":"open_run_preview_evaluations_runs__run_id__open_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/scenarios/":{"post":{"tags":["Evaluations"],"summary":"Create Scenarios","operationId":"create_scenarios_preview_evaluations_scenarios__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenarios","operationId":"delete_scenarios_preview_evaluations_scenarios__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenarios","operationId":"edit_scenarios_preview_evaluations_scenarios__patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Scenarios","operationId":"query_scenarios_preview_evaluations_scenarios_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/scenarios/{scenario_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Scenario","operationId":"fetch_scenario_preview_evaluations_scenarios__scenario_id__get","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenario","operationId":"edit_scenario_preview_evaluations_scenarios__scenario_id__patch","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenario","operationId":"delete_scenario_preview_evaluations_scenarios__scenario_id__delete","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/results/":{"post":{"tags":["Evaluations"],"summary":"Create Results","operationId":"create_results_preview_evaluations_results__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Results","operationId":"delete_results_preview_evaluations_results__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Results","operationId":"edit_results_preview_evaluations_results__patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/results/query":{"post":{"tags":["Evaluations"],"summary":"Query Results","operationId":"query_results_preview_evaluations_results_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/results/{result_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Result","operationId":"fetch_result_preview_evaluations_results__result_id__get","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Result","operationId":"edit_result_preview_evaluations_results__result_id__patch","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Result","operationId":"delete_result_preview_evaluations_results__result_id__delete","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/metrics/refresh":{"post":{"tags":["Evaluations"],"summary":"Refresh Metrics","operationId":"refresh_metrics_preview_evaluations_metrics_refresh_post","parameters":[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"scenario_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},{"name":"timestamp","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/metrics/":{"post":{"tags":["Evaluations"],"summary":"Create Metrics","operationId":"create_metrics_preview_evaluations_metrics__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Metrics","operationId":"delete_metrics_preview_evaluations_metrics__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Metrics","operationId":"edit_metrics_preview_evaluations_metrics__patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/metrics/query":{"post":{"tags":["Evaluations"],"summary":"Query Metrics","operationId":"query_metrics_preview_evaluations_metrics_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queues","operationId":"create_queues_preview_evaluations_queues__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queues","operationId":"delete_queues_preview_evaluations_queues__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queues","operationId":"edit_queues_preview_evaluations_queues__patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_queues_preview_evaluations_queues_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_queue_preview_evaluations_queues__queue_id__get","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queue","operationId":"edit_queue_preview_evaluations_queues__queue_id__patch","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queue","operationId":"delete_queue_preview_evaluations_queues__queue_id__delete","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/evaluations/queues/{queue_id}/scenarios":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue Scenarios","operationId":"fetch_queue_scenarios_preview_evaluations_queues__queue_id__scenarios_get","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/":{"post":{"tags":["Evaluations"],"summary":"Create Evaluation","operationId":"create_evaluation_preview_simple_evaluations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","operationId":"fetch_evaluation_preview_simple_evaluations__evaluation_id__get","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Evaluation","operationId":"edit_evaluation_preview_simple_evaluations__evaluation_id__patch","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluation","operationId":"delete_evaluation_preview_simple_evaluations__evaluation_id__delete","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/query":{"post":{"tags":["Evaluations"],"summary":"Query Evaluations","operationId":"query_evaluations_preview_simple_evaluations_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/{evaluation_id}/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_evaluation_preview_simple_evaluations__evaluation_id__start_post","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/{evaluation_id}/stop":{"post":{"tags":["Evaluations"],"summary":"Stop Evaluation","operationId":"stop_evaluation_preview_simple_evaluations__evaluation_id__stop_post","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/{evaluation_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Evaluation","operationId":"close_evaluation_preview_simple_evaluations__evaluation_id__close_post","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/simple/evaluations/{evaluation_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Evaluation","operationId":"open_evaluation_preview_simple_evaluations__evaluation_id__open_post","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts":{"post":{"tags":["Admin"],"summary":"Create Accounts","operationId":"create_accounts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitiesRequestModel"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopesResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/account":{"post":{"tags":["Admin"],"summary":"Create Account","operationId":"create_account","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AccountRequest"},{"type":"null"}],"title":"Account"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/permissions/verify":{"get":{"tags":["Access Control"],"summary":"Verify Permissions","operationId":"verify_permissions","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["Scopes"],"summary":"Get Projects","operationId":"get_projects","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}}},"/profile":{"get":{"summary":"User Profile","operationId":"fetch_user_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/reset-password":{"post":{"summary":"Reset User Password","operationId":"reset_user_password","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/variants":{"get":{"tags":["Apps"],"summary":"List App Variants","description":"Retrieve a list of app variants for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve variants for.\n\nReturns:\n List[AppVariantResponse]: A list of app variants for the given app ID.","operationId":"list_app_variants","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppVariantResponse_"},"title":"Response List App Variants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/get_variant_by_env":{"get":{"tags":["Apps"],"summary":"Get Variant By Env","description":"Retrieve the app variant based on the provided app_id and environment.\n\nArgs:\n app_id (str): The ID of the app to retrieve the variant for.\n environment (str): The environment of the app variant to retrieve.\n\nRaises:\n HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).\n\nReturns:\n AppVariantResponse: The retrieved app variant.","operationId":"get_variant_by_env","parameters":[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","title":"Environment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVariantResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps":{"post":{"tags":["Apps"],"summary":"Create App","description":"Create a new app for a user or organization.\n\nArgs:\n payload (CreateApp): The payload containing the app name and organization ID (optional).\n\nReturns:\n CreateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.","operationId":"create_app","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApp_"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAppOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Apps"],"summary":"List Apps","description":"Retrieve a list of apps filtered by app_name.\n\nArgs:\n app_name (Optional[str]): The name of the app to filter by.\n\nReturns:\n List[App]: A list of apps filtered by app_name.\n\nRaises:\n HTTPException: If there was an error retrieving the list of apps.","operationId":"list_apps","parameters":[{"name":"app_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"},"title":"Response List Apps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}":{"get":{"tags":["Apps"],"summary":"Read App","description":"Retrieve an app by its ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve.\n\nReturns:\n ReadAppOutput: The output containing the app's ID and name.\n\nRaises:\n HTTPException: If there is an error retrieving the app or the user does not have permission to access the app.","operationId":"create_app","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAppOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Apps"],"summary":"Update App","description":"Update an app for a user or organization.\n\nArgs:\n app_id (str): The ID of the app.\n payload (UpdateApp): The payload containing the app name.\n\nReturns:\n UpdateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.","operationId":"update_app","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApp"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Apps"],"summary":"Remove App","description":"Remove app, all its variant.\n\nArguments:\n app -- App to remove","operationId":"remove_app","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/variant/from-service":{"post":{"tags":["Apps"],"summary":"Add Variant From Url Route","operationId":"add_variant_from_url","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVariantFromURLPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/variant/from-template":{"post":{"tags":["Apps"],"summary":"Add Variant From Key Route","operationId":"add_variant_from_key","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVariantFromKeyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/environments":{"get":{"tags":["Apps"],"summary":"List Environments","description":"Retrieve a list of environments for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve environments for.\n\nReturns:\n List[EnvironmentOutput]: A list of environment objects.","operationId":"list_environments","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentOutput_"},"title":"Response List Environments"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app_id}/revisions/{environment_name}":{"get":{"tags":["Apps"],"summary":"List App Environment Revisions","operationId":"environment_revisions","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"environment_name","in":"path","required":true,"schema":{"title":"Environment Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentOutputExtended_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/from-base":{"post":{"tags":["Variants"],"summary":"Add Variant From Base And Config","description":"Add a new variant based on an existing one.\nSame as POST /config\n\nArgs:\n payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters.\n\nRaises:\n HTTPException: Raised if the variant could not be added or accessed.\n\nReturns:\n Union[AppVariantResponse, Any]: New variant details or exception.","operationId":"add_variant_from_base_and_config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVariantFromBasePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AppVariantResponse_"},{}],"title":"Response Add Variant From Base And Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}":{"delete":{"tags":["Variants"],"summary":"Remove Variant","description":"Mark a variant as hidden from the UI.\n\nArguments:\n app_variant -- AppVariant to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant","operationId":"mark_variant_as_hidden","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Variants"],"summary":"Get Variant","operationId":"get_variant","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVariantResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}/parameters":{"put":{"tags":["Variants"],"summary":"Update Variant Parameters","description":"Updates the parameters for an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n payload (UpdateVariantParameterPayload): The payload containing the updated parameters.\n\nRaises:\n HTTPException: If there is an error while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response containing the updated app variant parameters.","operationId":"update_variant_parameters","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVariantParameterPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVariantRevision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}/service":{"put":{"tags":["Variants"],"summary":"Update Variant Url","description":"Updates the URL used in an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n url (str): The URL to update.\n\nRaises:\n HTTPException: If an error occurs while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response indicating whether the update was successful or not.","operationId":"update_variant_url","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVariantURLPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}/revisions":{"get":{"tags":["Variants"],"summary":"Get Variant Revisions","operationId":"get_variant_revisions","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppVariantRevision"},"title":"Response Get Variant Revisions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}/revisions/{revision_number}":{"get":{"tags":["Variants"],"summary":"Get Variant Revision","operationId":"get_variant_revision","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}},{"name":"revision_number","in":"path","required":true,"schema":{"type":"integer","title":"Revision Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVariantRevision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{variant_id}/revisions/{revision_id}":{"delete":{"tags":["Variants"],"summary":"Remove Variant Revision","description":"Mark a variant revision as hidden from the UI.\n\nArguments:\n app_variant -- AppVariant to remove\n revision_id -- Revision ID to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant","operationId":"mark_variant_revision_as_hidden","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/add":{"post":{"tags":["Variants"],"summary":"Configs Add","operationId":"configs_add","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_add"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fetch":{"post":{"tags":["Variants"],"summary":"Configs Fetch","description":"Fetch configuration for a variant or environment.\n\nEither variant_ref OR environment_ref must be provided (if neither is provided,\na default environment_ref with slug=\"production\" will be used).\n\nFor each reference object (variant_ref, environment_ref, application_ref):\n- Provide either 'slug' or 'id' field\n- 'version' is optional and can be set to null\n- If 'id' is provided, it will be used directly to fetch the resource\n- Otherwise, 'slug' will be used along with application_ref\n\nReturns:\n ConfigResponseModel: The configuration for the requested variant or environment.\n\nRaises:\n HTTPException: If the configuration is not found.","operationId":"configs_fetch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fetch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fork":{"post":{"tags":["Variants"],"summary":"Configs Fork","operationId":"configs_fork","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fork"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/commit":{"post":{"tags":["Variants"],"summary":"Configs Commit","operationId":"configs_commit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/deploy":{"post":{"tags":["Variants"],"summary":"Configs Deploy","operationId":"configs_deploy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_deploy"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/delete":{"post":{"tags":["Variants"],"summary":"Configs Delete","operationId":"configs_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_delete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"integer","title":"Response Configs Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/list":{"post":{"tags":["Variants"],"summary":"Configs List","operationId":"configs_list","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConfigResponseModel"},"type":"array","title":"Response Configs List"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/history":{"post":{"tags":["Variants"],"summary":"Configs History","operationId":"configs_history","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_history"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConfigResponseModel"},"type":"array","title":"Response Configs History"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/containers/templates":{"get":{"tags":["Containers"],"summary":"Container Templates","description":"Returns a list of templates available for creating new containers.","operationId":"container_templates","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/evaluators":{"get":{"tags":["Evaluators"],"summary":"Get Evaluators Endpoint","description":"Endpoint to fetch a list of evaluators.\n\nReturns:\n List[Evaluator]: A list of evaluator objects.","operationId":"get_evaluators_endpoint_evaluators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LegacyEvaluator"},"type":"array","title":"Response Get Evaluators Endpoint Evaluators Get"}}}}}}},"/evaluators/map":{"post":{"tags":["Evaluators"],"summary":"Evaluator Data Map","description":"Endpoint to map the experiment data tree to evaluator interface.\n\nArgs:\n request (Request): The request object.\n payload (EvaluatorMappingInputInterface): The payload containing the request data.\n\nReturns:\n EvaluatorMappingOutputInterface: the evaluator mapping output object","operationId":"evaluator_data_map_evaluators_map_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorMappingInputInterface"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorMappingOutputInterface"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_key}/run":{"post":{"tags":["Evaluators"],"summary":"Evaluator Run","description":"Endpoint to evaluate LLM app run\n\nArgs:\n request (Request): The request object.\n evaluator_key (str): The key of the evaluator.\n payload (EvaluatorInputInterface): The payload containing the request data.\n\nReturns:\n result: EvaluatorOutputInterface object containing the outputs.","operationId":"evaluator_run_evaluators__evaluator_key__run_post","parameters":[{"name":"evaluator_key","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorInputInterface"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorOutputInterface"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/configs":{"get":{"tags":["Evaluators"],"summary":"Get Evaluator Configs","description":"Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.","operationId":"get_evaluator_configs_evaluators_configs_get","parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatorConfig"},"title":"Response Get Evaluator Configs Evaluators Configs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Evaluators"],"summary":"Create New Evaluator Config","description":"Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n EvaluatorConfigDB: Evaluator configuration api model.","operationId":"create_new_evaluator_config_evaluators_configs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEvaluatorConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/configs/{evaluator_config_id}":{"get":{"tags":["Evaluators"],"summary":"Get Evaluator Config","description":"Endpoint to fetch evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.","operationId":"get_evaluator_config_evaluators_configs__evaluator_config_id__get","parameters":[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Update Evaluator Config","description":"Endpoint to update evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.","operationId":"update_evaluator_config_evaluators_configs__evaluator_config_id__put","parameters":[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvaluatorConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluators"],"summary":"Delete Evaluator Config","description":"Endpoint to delete a specific evaluator configuration.\n\nArgs:\n evaluator_config_id (str): The unique identifier of the evaluator configuration.\n\nReturns:\n bool: True if deletion was successful, False otherwise.","operationId":"delete_evaluator_config_evaluators_configs__evaluator_config_id__delete","parameters":[{"name":"evaluator_config_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Delete Evaluator Config Evaluators Configs Evaluator Config Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Upload File","description":"Uploads a CSV or JSON file and saves its data to Postgres.\n\nArgs:\nupload_type : Either a json or csv file.\n file (UploadFile): The CSV or JSON file to upload.\n testset_name (Optional): the name of the testset if provided.\n\nReturns:\n dict: The result of the upload process.","operationId":"upload_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSetSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/endpoint":{"post":{"tags":["Testsets"],"summary":"Import Testset","description":"Import JSON testset data from an endpoint and save it to Postgres.\n\nArgs:\n endpoint (str): An endpoint URL to import data from.\n testset_name (str): the name of the testset if provided.\n\nReturns:\n dict: The result of the import process.","operationId":"import_testset","parameters":[{"name":"authorization","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_import_testset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSetSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets":{"get":{"tags":["Testsets"],"summary":"Get Testsets","description":"Get all testsets.\n\nReturns:\n- A list of testset objects.\n\nRaises:\n- `HTTPException` with status code 404 if no testsets are found.","operationId":"get_testsets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TestSetOutputResponse"},"type":"array","title":"Response Get Testsets"}}}}}},"post":{"tags":["Testsets"],"summary":"Create Testset","description":"Create a testset with given name, save the testset to Postgres.\n\nArgs:\nname (str): name of the test set.\ntestset (Dict[str, str]): test set data.\n\nReturns:\nstr: The id of the test set created.","operationId":"create_testset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTestset"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSetSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Testsets"],"summary":"Delete Testsets","description":"Delete specific testsets based on their unique IDs.\n\nArgs:\ntestset_ids (List[str]): The unique identifiers of the testsets to delete.\n\nReturns:\nA list of the deleted testsets' IDs.","operationId":"delete_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTestsets"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Delete Testsets"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}":{"put":{"tags":["Testsets"],"summary":"Update Testset","description":"Update a testset with given id, update the testset in Postgres.\n\nArgs:\ntestset_id (str): id of the test set to be updated.\ncsvdata (NewTestset): New data to replace the old testset.\n\nReturns:\nstr: The id of the test set updated.","operationId":"update_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTestset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Testsets"],"summary":"Get Single Testset","description":"Fetch a specific testset in Postgres.\n\nArgs:\n testset_id (str): The id of the testset to fetch.\n\nReturns:\n The requested testset if found, else an HTTPException.","operationId":"get_single_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/deploy":{"post":{"tags":["Environments"],"summary":"Deploy To Environment","description":"Deploys a given variant to an environment\n\nArgs:\n environment_name: Name of the environment to deploy to.\n variant_id: variant id to deploy.\n\nRaises:\n HTTPException: If the deployment fails.","operationId":"deploy_to_environment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployToEnvironmentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bases":{"get":{"tags":["Bases"],"summary":"List Bases","description":"Retrieve a list of bases filtered by app_id and base_name.\n\nArgs:\n request (Request): The incoming request.\n app_id (str): The ID of the app to filter by.\n base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.\n\nReturns:\n List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.\n\nRaises:\n HTTPException: If there was an error retrieving the bases.","operationId":"list_bases","parameters":[{"name":"app_id","in":"query","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"base_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaseOutput"},"title":"Response List Bases"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configs":{"get":{"tags":["Configs"],"summary":"Get Config","operationId":"get_config","parameters":[{"name":"base_id","in":"query","required":true,"schema":{"type":"string","title":"Base Id"}},{"name":"config_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},{"name":"environment_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configs/deployment/{deployment_revision_id}":{"get":{"tags":["Configs"],"summary":"Get Config Deployment Revision","operationId":"get_config_deployment_revision","parameters":[{"name":"deployment_revision_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configs/deployment/{deployment_revision_id}/revert":{"post":{"tags":["Configs"],"summary":"Revert Deployment Revision","operationId":"revert_deployment_revision","parameters":[{"name":"deployment_revision_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys":{"get":{"tags":["Api Keys"],"summary":"List Api Keys","description":"List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}},"post":{"tags":["Api Keys"],"summary":"Create Api Key","description":"Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.","operationId":"create_api_key","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}}},"/keys/{key_prefix}":{"delete":{"tags":["Api Keys"],"summary":"Delete Api Key","description":"Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.","operationId":"delete_api_key","parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["Organization"],"summary":"List Organizations","description":"Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.","operationId":"list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Organization"},"type":"array","title":"Response List Organizations"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite":{"post":{"tags":["Organization"],"summary":"Invite User To Organization","description":"Assigns a role to a user in an organization.\n\nArgs:\n organization_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"invite_user_to_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequest"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend":{"post":{"tags":["Organization"],"summary":"Resend User Invitation To Organization","description":"Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200","operationId":"resend_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept":{"post":{"tags":["Organization"],"summary":"Accept Organization Invitation","description":"Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200","operationId":"accept_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["Workspace"],"summary":"Get Workspace","description":"Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.","operationId":"get_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Get Workspace"}}}}}}},"/workspaces/roles":{"get":{"tags":["Workspace"],"summary":"Get All Workspace Roles","description":"Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.","operationId":"get_all_workspace_roles","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}}},"/workspaces/{workspace_id}/users":{"delete":{"tags":["Workspace"],"summary":"Remove User From Workspace","description":"Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.","operationId":"remove_user_from_workspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountRequest":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/LegacyUserRequest"},{"type":"null"}]},"scope":{"anyOf":[{"$ref":"#/components/schemas/LegacyScopeRequest"},{"type":"null"}]},"subscription":{"anyOf":[{"$ref":"#/components/schemas/LegacySubscriptionRequest"},{"type":"null"}]}},"type":"object","title":"AccountRequest"},"AccountResponse":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/LegacyUserResponse"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"$ref":"#/components/schemas/LegacyScopesResponse"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","title":"AccountResponse"},"AddVariantFromBasePayload":{"properties":{"base_id":{"type":"string","title":"Base Id"},"new_variant_name":{"type":"string","title":"New Variant Name"},"new_config_name":{"type":"string","title":"New Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["base_id","new_variant_name","new_config_name","parameters"],"title":"AddVariantFromBasePayload"},"AddVariantFromKeyPayload":{"properties":{"variant_name":{"type":"string","title":"Variant Name"},"key":{"type":"string","title":"Key"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"base_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},"type":"object","required":["variant_name","key"],"title":"AddVariantFromKeyPayload"},"AddVariantFromURLPayload":{"properties":{"variant_name":{"type":"string","title":"Variant Name"},"url":{"type":"string","title":"Url"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"base_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Name"},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Name"}},"type":"object","required":["variant_name","url"],"title":"AddVariantFromURLPayload"},"AgentaNodeDTO-Input":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"root":{"$ref":"#/components/schemas/RootDTO"},"tree":{"$ref":"#/components/schemas/TreeDTO"},"node":{"$ref":"#/components/schemas/NodeDTO"},"parent":{"anyOf":[{"$ref":"#/components/schemas/ParentDTO"},{"type":"null"}]},"time":{"$ref":"#/components/schemas/TimeDTO"},"status":{"$ref":"#/components/schemas/StatusDTO"},"exception":{"anyOf":[{"$ref":"#/components/schemas/ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"$ref":"#/components/schemas/OTelExtraDTO-Input"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpanDTO-Input"},{"items":{"$ref":"#/components/schemas/SpanDTO-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"AgentaNodeDTO-Output":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"root":{"$ref":"#/components/schemas/RootDTO"},"tree":{"$ref":"#/components/schemas/TreeDTO"},"node":{"$ref":"#/components/schemas/NodeDTO"},"parent":{"anyOf":[{"$ref":"#/components/schemas/ParentDTO"},{"type":"null"}]},"time":{"$ref":"#/components/schemas/TimeDTO"},"status":{"$ref":"#/components/schemas/StatusDTO"},"exception":{"anyOf":[{"$ref":"#/components/schemas/ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"$ref":"#/components/schemas/OTelExtraDTO-Output"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpanDTO-Output"},{"items":{"$ref":"#/components/schemas/SpanDTO-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"AgentaNodeDTO"},"AgentaNodesResponse":{"properties":{"nodes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentaNodeDTO-Output"},"type":"array"},{"type":"null"}],"title":"Nodes","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaNodesResponse"},"AgentaRootDTO":{"properties":{"root":{"$ref":"#/components/schemas/RootDTO"},"trees":{"items":{"$ref":"#/components/schemas/AgentaTreeDTO"},"type":"array","title":"Trees"}},"type":"object","required":["root","trees"],"title":"AgentaRootDTO"},"AgentaRootsResponse":{"properties":{"roots":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentaRootDTO"},"type":"array"},{"type":"null"}],"title":"Roots","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaRootsResponse"},"AgentaTreeDTO":{"properties":{"tree":{"$ref":"#/components/schemas/TreeDTO"},"nodes":{"items":{"$ref":"#/components/schemas/AgentaNodeDTO-Output"},"type":"array","title":"Nodes"}},"type":"object","required":["tree","nodes"],"title":"AgentaTreeDTO"},"AgentaTreesResponse":{"properties":{"trees":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentaTreeDTO"},"type":"array"},{"type":"null"}],"title":"Trees","default":[]},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","title":"AgentaTreesResponse"},"AgentaVersionedTreeDTO-Input":{"properties":{"version":{"type":"string","title":"Version"},"nodes":{"items":{"$ref":"#/components/schemas/AgentaNodeDTO-Input"},"type":"array","title":"Nodes"}},"type":"object","required":["version","nodes"],"title":"AgentaVersionedTreeDTO"},"AgentaVersionedTreeDTO-Output":{"properties":{"version":{"type":"string","title":"Version"},"nodes":{"items":{"$ref":"#/components/schemas/AgentaNodeDTO-Output"},"type":"array","title":"Nodes"}},"type":"object","required":["version","nodes"],"title":"AgentaVersionedTreeDTO"},"AggregatedResult":{"properties":{"evaluator_config":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorConfig"},{"additionalProperties":true,"type":"object"}],"title":"Evaluator Config"},"result":{"$ref":"#/components/schemas/Result"}},"type":"object","required":["evaluator_config","result"],"title":"AggregatedResult"},"Analytics":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0.0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0.0}},"type":"object","title":"Analytics"},"AnalyticsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"buckets":{"items":{"$ref":"#/components/schemas/MetricsBucket"},"type":"array","title":"Buckets","default":[]},"query":{"$ref":"#/components/schemas/TracingQuery","default":{}},"specs":{"items":{"$ref":"#/components/schemas/MetricSpec"},"type":"array","title":"Specs","default":[]}},"type":"object","title":"AnalyticsResponse"},"Annotation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"AnnotationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"},"AnnotationCreateRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"},"AnnotationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"AnnotationEdit"},"AnnotationEditRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"},"AnnotationLinkResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"$ref":"#/components/schemas/Link"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"},"AnnotationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},"AnnotationQueryRequest":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"},"AnnotationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"$ref":"#/components/schemas/Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"},"AnnotationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"},"App":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["app_id","app_name","updated_at"],"title":"App"},"AppVariantResponse_":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"project_id":{"type":"string","title":"Project Id"},"base_name":{"type":"string","title":"Base Name"},"base_id":{"type":"string","title":"Base Id"},"config_name":{"type":"string","title":"Config Name"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"revision":{"type":"integer","title":"Revision"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"modified_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["app_id","app_name","variant_id","variant_name","project_id","base_name","base_id","config_name","revision"],"title":"AppVariantResponse_"},"AppVariantRevision":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"config":{"$ref":"#/components/schemas/ConfigDB"},"created_at":{"type":"string","title":"Created At"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["revision","modified_by","config","created_at"],"title":"AppVariantRevision"},"ApplicationFlags":{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"ApplicationFlags"},"ApplicationRevision":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},"ApplicationRevisionData":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}]}},"type":"object","title":"ApplicationRevisionResponse"},"ApplicationRevisionRetrieveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"ApplicationRevisionRetrieveRequest"},"BaseOutput":{"properties":{"base_id":{"type":"string","title":"Base Id"},"base_name":{"type":"string","title":"Base Name"}},"type":"object","required":["base_id","base_name"],"title":"BaseOutput"},"Body_configs_add":{"properties":{"variant_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"},"application_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"}},"type":"object","required":["variant_ref","application_ref"],"title":"Body_configs_add"},"Body_configs_delete":{"properties":{"variant_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref"],"title":"Body_configs_delete"},"Body_configs_deploy":{"properties":{"variant_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"},"environment_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref","environment_ref"],"title":"Body_configs_deploy"},"Body_configs_fetch":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch"},"Body_configs_fork":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]}},"type":"object","title":"Body_configs_fork"},"Body_configs_history":{"properties":{"variant_ref":{"$ref":"#/components/schemas/ReferenceRequestModel"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel"},{"type":"null"}]}},"type":"object","required":["variant_ref"],"title":"Body_configs_history"},"Body_create_simple_testset_from_file":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"},"Body_edit_simple_testset_from_file":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"},"Body_import_testset":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"testset_name":{"type":"string","title":"Testset Name"}},"type":"object","title":"Body_import_testset"},"Body_invoke_workflow":{"properties":{"workflow_service_request":{"$ref":"#/components/schemas/WorkflowServiceRequest"},"workflow_revision_data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]}},"type":"object","required":["workflow_service_request"],"title":"Body_invoke_workflow"},"Body_upload_file":{"properties":{"upload_type":{"type":"string","title":"Upload Type"},"file":{"type":"string","format":"binary","title":"File"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"}},"type":"object","required":["file"],"title":"Body_upload_file"},"Bucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/Analytics"},"errors":{"$ref":"#/components/schemas/Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"BucketDTO":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/MetricsDTO"},"error":{"$ref":"#/components/schemas/MetricsDTO"}},"type":"object","required":["timestamp","interval","total","error"],"title":"BucketDTO"},"CollectStatusResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CollectStatusResponse"},"ComparisonOperator":{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"$ref":"#/components/schemas/ComparisonOperator"},{"$ref":"#/components/schemas/NumericOperator"},{"$ref":"#/components/schemas/StringOperator"},{"$ref":"#/components/schemas/ListOperator"},{"$ref":"#/components/schemas/DictOperator"},{"$ref":"#/components/schemas/ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextOptions"},{"$ref":"#/components/schemas/ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"ConfigDB":{"properties":{"config_name":{"type":"string","title":"Config Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name"],"title":"ConfigDB"},"ConfigDTO":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigDTO"},"ConfigRequest":{"properties":{"config":{"$ref":"#/components/schemas/ConfigDTO"}},"type":"object","required":["config"],"title":"ConfigRequest"},"ConfigResponseModel":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceDTO"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["params"],"title":"ConfigResponseModel"},"CorrectAnswer":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"}},"type":"object","required":["key","value"],"title":"CorrectAnswer"},"CreateAppOutput":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_id","app_name"],"title":"CreateAppOutput"},"CreateApp_":{"properties":{"app_name":{"type":"string","title":"App Name"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["app_name"],"title":"CreateApp_"},"CreateSecretDTO":{"properties":{"header":{"$ref":"#/components/schemas/Header"},"secret":{"$ref":"#/components/schemas/SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"},"CreateWorkspace":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name"],"title":"CreateWorkspace"},"CustomModelSettingsDTO":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"CustomProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/CustomProviderKind"},"provider":{"$ref":"#/components/schemas/CustomProviderSettingsDTO"},"models":{"items":{"$ref":"#/components/schemas/CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"},"CustomProviderKind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"CustomProviderSettingsDTO":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"DeleteEvaluation":{"properties":{"evaluations_ids":{"items":{"type":"string"},"type":"array","title":"Evaluations Ids"}},"type":"object","required":["evaluations_ids"],"title":"DeleteEvaluation"},"DeleteTestsets":{"properties":{"testset_ids":{"items":{"type":"string"},"type":"array","title":"Testset Ids"}},"type":"object","required":["testset_ids"],"title":"DeleteTestsets"},"DeployToEnvironmentPayload":{"properties":{"environment_name":{"type":"string","title":"Environment Name"},"variant_id":{"type":"string","title":"Variant Id"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["environment_name","variant_id"],"title":"DeployToEnvironmentPayload"},"DictOperator":{"type":"string","enum":["has","has_not"],"title":"DictOperator"},"EntitiesRequestModel":{"properties":{"users":{"additionalProperties":{"$ref":"#/components/schemas/UserRequest"},"type":"object","title":"Users"},"organizations":{"additionalProperties":{"$ref":"#/components/schemas/OrganizationRequest"},"type":"object","title":"Organizations"},"workspaces":{"additionalProperties":{"$ref":"#/components/schemas/WorkspaceRequest"},"type":"object","title":"Workspaces"},"projects":{"additionalProperties":{"$ref":"#/components/schemas/ProjectRequest"},"type":"object","title":"Projects"},"organization_memberships":{"additionalProperties":{"$ref":"#/components/schemas/OrganizationMembershipRequest"},"type":"object","title":"Organization Memberships"},"workspace_memberships":{"additionalProperties":{"$ref":"#/components/schemas/WorkspaceMembershipRequest"},"type":"object","title":"Workspace Memberships"},"project_memberships":{"additionalProperties":{"$ref":"#/components/schemas/ProjectMembershipRequest"},"type":"object","title":"Project Memberships"}},"type":"object","required":["users","organizations","workspaces","projects","organization_memberships","workspace_memberships","project_memberships"],"title":"EntitiesRequestModel"},"EnvironmentOutputExtended_":{"properties":{"name":{"type":"string","title":"Name"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"deployed_app_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Id"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"},"deployed_app_variant_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision Id"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision"},"revisions":{"items":{"$ref":"#/components/schemas/EnvironmentRevision"},"type":"array","title":"Revisions"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["name","app_id","project_id","revisions"],"title":"EnvironmentOutputExtended_"},"EnvironmentOutput_":{"properties":{"name":{"type":"string","title":"Name"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"deployed_app_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Id"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"},"deployed_app_variant_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision Id"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["name","app_id","project_id"],"title":"EnvironmentOutput_"},"EnvironmentRevision":{"properties":{"id":{"type":"string","title":"Id"},"revision":{"type":"integer","title":"Revision"},"modified_by":{"type":"string","title":"Modified By"},"deployed_app_variant_revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed App Variant Revision"},"deployment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"created_at":{"type":"string","title":"Created At"},"deployed_variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Variant Name"}},"type":"object","required":["id","revision","modified_by","created_at"],"title":"EnvironmentRevision"},"Error":{"properties":{"message":{"type":"string","title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","required":["message"],"title":"Error"},"Evaluation":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variant_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variant Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Id"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"status":{"$ref":"#/components/schemas/Result"},"aggregated_results":{"items":{"$ref":"#/components/schemas/AggregatedResult"},"type":"array","title":"Aggregated Results"},"average_cost":{"anyOf":[{"$ref":"#/components/schemas/Result"},{"type":"null"}]},"total_cost":{"anyOf":[{"$ref":"#/components/schemas/Result"},{"type":"null"}]},"average_latency":{"anyOf":[{"$ref":"#/components/schemas/Result"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","variant_ids","variant_names","variant_revision_ids","revisions","status","aggregated_results","created_at","updated_at"],"title":"Evaluation"},"EvaluationMetrics":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"EvaluationMetricsCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"EvaluationMetricsCreateRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"},"EvaluationMetricsEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"EvaluationMetricsEditRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"},"EvaluationMetricsIdsRequest":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"},"EvaluationMetricsIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"},"EvaluationMetricsQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},"EvaluationMetricsQueryRequest":{"properties":{"metrics":{"anyOf":[{"$ref":"#/components/schemas/EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"},"EvaluationMetricsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"},"EvaluationQueue":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"EvaluationQueueCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"EvaluationQueueData":{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"}},"type":"object","title":"EvaluationQueueData"},"EvaluationQueueEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"EvaluationQueueEditRequest":{"properties":{"queue":{"$ref":"#/components/schemas/EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"},"EvaluationQueueFlags":{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},"EvaluationQueueIdResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"},"EvaluationQueueIdsRequest":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"},"EvaluationQueueIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"},"EvaluationQueueQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},"EvaluationQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"},"EvaluationQueueResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"},"EvaluationQueueScenarioIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationQueueScenarioIdsResponse"},"EvaluationQueuesCreateRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"},"EvaluationQueuesEditRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"},"EvaluationQueuesResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"},"EvaluationResult":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"EvaluationResultCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"EvaluationResultEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"EvaluationResultEditRequest":{"properties":{"result":{"$ref":"#/components/schemas/EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"},"EvaluationResultIdResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"},"EvaluationResultIdsRequest":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"},"EvaluationResultIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"},"EvaluationResultQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},"EvaluationResultQueryRequest":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"},"EvaluationResultResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"},"EvaluationResultsCreateRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"},"EvaluationResultsEditRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"},"EvaluationResultsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"$ref":"#/components/schemas/EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"},"EvaluationRun":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"EvaluationRunCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData-Input"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"EvaluationRunData-Input":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunData-Output":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunDataMapping":{"properties":{"column":{"$ref":"#/components/schemas/EvaluationRunDataMappingColumn"},"step":{"$ref":"#/components/schemas/EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"EvaluationRunDataMappingColumn":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"EvaluationRunDataMappingStep":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"},"EvaluationRunDataStep":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"EvaluationRunDataStepInput":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"EvaluationRunEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData-Input"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"EvaluationRunEditRequest":{"properties":{"run":{"$ref":"#/components/schemas/EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"},"EvaluationRunFlags":{"properties":{"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EvaluationRunFlags"},"EvaluationRunIdResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"},"EvaluationRunIdsRequest":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"},"EvaluationRunIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"},"EvaluationRunQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},"EvaluationRunQueryRequest":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"},"EvaluationRunResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"},"EvaluationRunsCreateRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"},"EvaluationRunsEditRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"},"EvaluationRunsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Runs","default":[]}},"type":"object","title":"EvaluationRunsResponse"},"EvaluationScenarioCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"EvaluationScenarioEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"EvaluationScenarioEditRequest":{"properties":{"scenario":{"$ref":"#/components/schemas/EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"},"EvaluationScenarioIdResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"},"EvaluationScenarioIdsRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"},"EvaluationScenarioIdsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"},"EvaluationScenarioInput":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"value":{"title":"Value"}},"type":"object","required":["name","type","value"],"title":"EvaluationScenarioInput"},"EvaluationScenarioOutput":{"properties":{"result":{"$ref":"#/components/schemas/Result"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency"}},"type":"object","required":["result"],"title":"EvaluationScenarioOutput"},"EvaluationScenarioQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},"EvaluationScenarioQueryRequest":{"properties":{"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"},"EvaluationScenarioResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__evaluations__types__EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"},"EvaluationScenarioResult":{"properties":{"evaluator_config":{"type":"string","title":"Evaluator Config"},"result":{"$ref":"#/components/schemas/Result"}},"type":"object","required":["evaluator_config","result"],"title":"EvaluationScenarioResult"},"EvaluationScenarioScoreUpdate":{"properties":{"score":{"type":"number","title":"Score"}},"type":"object","required":["score"],"title":"EvaluationScenarioScoreUpdate"},"EvaluationScenariosCreateRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"},"EvaluationScenariosEditRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"},"EvaluationScenariosResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/oss__src__core__evaluations__types__EvaluationScenario"},"type":"array","title":"Scenarios","default":[]}},"type":"object","title":"EvaluationScenariosResponse"},"EvaluationStatus":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"EvaluationStatusEnum":{"type":"string","enum":["EVALUATION_INITIALIZED","EVALUATION_STARTED","EVALUATION_FINISHED","EVALUATION_FINISHED_WITH_ERRORS","EVALUATION_FAILED","EVALUATION_AGGREGATION_FAILED"],"title":"EvaluationStatusEnum"},"EvaluationType":{"type":"string","enum":["human_a_b_testing","single_model_test"],"title":"EvaluationType"},"Evaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"EvaluatorConfig":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","title":"Project Id"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","project_id","evaluator_key","created_at","updated_at"],"title":"EvaluatorConfig"},"EvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"},"EvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorCreate"}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest"},"EvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"},"EvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorEdit"}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest"},"EvaluatorFlags":{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"EvaluatorFlags"},"EvaluatorFork":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"},"EvaluatorForkRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorFork"}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest"},"EvaluatorInputInterface":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"credentials":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credentials"}},"type":"object","title":"EvaluatorInputInterface"},"EvaluatorMappingInputInterface":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"mapping":{"additionalProperties":true,"type":"object","title":"Mapping"}},"type":"object","required":["inputs","mapping"],"title":"EvaluatorMappingInputInterface"},"EvaluatorMappingOutputInterface":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"EvaluatorMappingOutputInterface"},"EvaluatorOutputInterface":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs"}},"type":"object","required":["outputs"],"title":"EvaluatorOutputInterface"},"EvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"EvaluatorQuery"},"EvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluatorQueryRequest"},"EvaluatorResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Evaluator"},{"type":"null"}]}},"type":"object","title":"EvaluatorResponse"},"EvaluatorRevision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"EvaluatorRevisionCommit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionCommit"},"EvaluatorRevisionCommitRequest":{"properties":{"evaluator_revision_commit":{"$ref":"#/components/schemas/EvaluatorRevisionCommit"}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest"},"EvaluatorRevisionCreate":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"},"EvaluatorRevisionCreateRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionCreate"}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest"},"EvaluatorRevisionData-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionData-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"},"EvaluatorRevisionEditRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionEdit"}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest"},"EvaluatorRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},"EvaluatorRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},"EvaluatorRevisionQueryRequest":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"evaluator_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs"},"evaluator_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionQueryRequest"},"EvaluatorRevisionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionResponse"},"EvaluatorRevisionRetrieveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevisionRetrieveRequest"},"EvaluatorRevisionsLog":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"},"EvaluatorRevisionsLogRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorRevisionsLog"}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest"},"EvaluatorRevisionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_revisions":{"items":{"$ref":"#/components/schemas/EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","default":[]}},"type":"object","title":"EvaluatorRevisionsResponse"},"EvaluatorVariant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"EvaluatorVariantCreate":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"},"EvaluatorVariantCreateRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantCreate"}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest"},"EvaluatorVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"},"EvaluatorVariantEditRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantEdit"}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest"},"EvaluatorVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},"EvaluatorVariantResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariant"},{"type":"null"}]}},"type":"object","title":"EvaluatorVariantResponse"},"EvaluatorVariantsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator_variants":{"items":{"$ref":"#/components/schemas/EvaluatorVariant"},"type":"array","title":"Evaluator Variants","default":[]}},"type":"object","title":"EvaluatorVariantsResponse"},"EvaluatorsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/Evaluator"},"type":"array","title":"Evaluators","default":[]}},"type":"object","title":"EvaluatorsResponse"},"ExceptionDTO":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"type":"string","title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["timestamp","type"],"title":"ExceptionDTO"},"ExistenceOperator":{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},"Filtering-Input":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Input"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Filtering-Output":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Output"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Focus":{"type":"string","enum":["trace","span"],"title":"Focus"},"Format":{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},"Formatting":{"properties":{"focus":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}]},"format":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},"FullJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Input"},"type":"array"},{"type":"null"}]},"FullJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Output"},"type":"array"},{"type":"null"}]},"GetConfigResponse":{"properties":{"config_name":{"type":"string","title":"Config Name"},"current_version":{"type":"integer","title":"Current Version"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["config_name","current_version","parameters"],"title":"GetConfigResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"HumanEvaluation":{"properties":{"id":{"type":"string","title":"Id"},"app_id":{"type":"string","title":"App Id"},"project_id":{"type":"string","title":"Project Id"},"evaluation_type":{"type":"string","title":"Evaluation Type"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"variant_names":{"items":{"type":"string"},"type":"array","title":"Variant Names"},"variants_revision_ids":{"items":{"type":"string"},"type":"array","title":"Variants Revision Ids"},"revisions":{"items":{"type":"string"},"type":"array","title":"Revisions"},"testset_id":{"type":"string","title":"Testset Id"},"testset_name":{"type":"string","title":"Testset Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","app_id","project_id","evaluation_type","variant_ids","variant_names","variants_revision_ids","revisions","testset_id","testset_name","status","created_at","updated_at"],"title":"HumanEvaluation"},"HumanEvaluationScenario":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"evaluation_id":{"type":"string","title":"Evaluation Id"},"inputs":{"items":{"$ref":"#/components/schemas/HumanEvaluationScenarioInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/HumanEvaluationScenarioOutput"},"type":"array","title":"Outputs"},"vote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vote"},"score":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Score"},"correct_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["evaluation_id","inputs","outputs"],"title":"HumanEvaluationScenario"},"HumanEvaluationScenarioInput":{"properties":{"input_name":{"type":"string","title":"Input Name"},"input_value":{"type":"string","title":"Input Value"}},"type":"object","required":["input_name","input_value"],"title":"HumanEvaluationScenarioInput"},"HumanEvaluationScenarioOutput":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"variant_output":{"type":"string","title":"Variant Output"}},"type":"object","required":["variant_id","variant_output"],"title":"HumanEvaluationScenarioOutput"},"HumanEvaluationScenarioUpdate":{"properties":{"vote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vote"},"score":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Score"},"correct_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer"},"outputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/HumanEvaluationScenarioOutput"},"type":"array"},{"type":"null"}],"title":"Outputs"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/HumanEvaluationScenarioInput"},"type":"array"},{"type":"null"}],"title":"Inputs"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"HumanEvaluationScenarioUpdate"},"HumanEvaluationUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatusEnum"},{"type":"null"}]}},"type":"object","title":"HumanEvaluationUpdate"},"InviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteToken":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"},"Invocation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"InvocationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"},"InvocationCreateRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"},"InvocationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"InvocationEdit"},"InvocationEditRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"},"InvocationLinkResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"$ref":"#/components/schemas/Link"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"},"InvocationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},"InvocationQueryRequest":{"properties":{"invocation":{"anyOf":[{"$ref":"#/components/schemas/InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/Link"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"},"InvocationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"$ref":"#/components/schemas/Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"},"InvocationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"$ref":"#/components/schemas/Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"},"LLMRunRateLimit":{"properties":{"batch_size":{"type":"integer","title":"Batch Size"},"max_retries":{"type":"integer","title":"Max Retries"},"retry_delay":{"type":"integer","title":"Retry Delay"},"delay_between_batches":{"type":"integer","title":"Delay Between Batches"}},"type":"object","required":["batch_size","max_retries","retry_delay","delay_between_batches"],"title":"LLMRunRateLimit"},"LegacyAnalyticsResponse":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"failure_rate":{"type":"number","title":"Failure Rate"},"total_cost":{"type":"number","title":"Total Cost"},"avg_cost":{"type":"number","title":"Avg Cost"},"avg_latency":{"type":"number","title":"Avg Latency"},"total_tokens":{"type":"integer","title":"Total Tokens"},"avg_tokens":{"type":"number","title":"Avg Tokens"},"data":{"items":{"$ref":"#/components/schemas/LegacyDataPoint"},"type":"array","title":"Data"}},"type":"object","required":["total_count","failure_rate","total_cost","avg_cost","avg_latency","total_tokens","avg_tokens","data"],"title":"LegacyAnalyticsResponse"},"LegacyApplication":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationData-Output"},{"type":"null"}]}},"type":"object","title":"LegacyApplication"},"LegacyApplicationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationCreate"},"LegacyApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/LegacyApplicationCreate"}},"type":"object","required":["application"],"title":"LegacyApplicationCreateRequest"},"LegacyApplicationData-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},"LegacyApplicationData-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"LegacyApplicationData"},"LegacyApplicationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationEdit"},"LegacyApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/LegacyApplicationEdit"}},"type":"object","required":["application"],"title":"LegacyApplicationEditRequest"},"LegacyApplicationFlags":{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"LegacyApplicationFlags"},"LegacyApplicationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/LegacyApplication"},{"type":"null"}]}},"type":"object","title":"LegacyApplicationResponse"},"LegacyDataPoint":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"cost":{"type":"number","title":"Cost"},"latency":{"type":"number","title":"Latency"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["timestamp","success_count","failure_count","cost","latency","total_tokens"],"title":"LegacyDataPoint"},"LegacyEvaluator":{"properties":{"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"},"direct_use":{"type":"boolean","title":"Direct Use"},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","key","direct_use","settings_template","tags"],"title":"LegacyEvaluator"},"LegacyLifecycleDTO":{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},"LegacyScopeRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"LegacyScopeRequest"},"LegacyScopesResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials"}},"type":"object","title":"LegacyScopesResponse"},"LegacySubscriptionRequest":{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","title":"LegacySubscriptionRequest"},"LegacyUserRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"LegacyUserRequest"},"LegacyUserResponse":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"LegacyUserResponse"},"Link":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Link"},"LinkDTO":{"properties":{"type":{"$ref":"#/components/schemas/TreeType"},"id":{"type":"string","format":"uuid","title":"Id"},"tree_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tree Id"}},"type":"object","required":["type","id"],"title":"LinkDTO"},"ListAPIKeysResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"ListOperator":{"type":"string","enum":["in","not_in"],"title":"ListOperator"},"ListOptions":{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},"LogicalOperator":{"type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"MetricSpec":{"properties":{"type":{"$ref":"#/components/schemas/MetricType","default":"none"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"MetricType":{"type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"MetricsBucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"MetricsDTO":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost","default":0.0},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens","default":0}},"type":"object","title":"MetricsDTO"},"NewEvaluation":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"revisions_ids":{"items":{"type":"string"},"type":"array","title":"Revisions Ids"},"evaluators_configs":{"items":{"type":"string"},"type":"array","title":"Evaluators Configs"},"testset_id":{"type":"string","title":"Testset Id"},"rate_limit":{"$ref":"#/components/schemas/LLMRunRateLimit"},"correct_answer_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer Column"}},"type":"object","required":["revisions_ids","evaluators_configs","testset_id","rate_limit"],"title":"NewEvaluation"},"NewEvaluatorConfig":{"properties":{"name":{"type":"string","title":"Name"},"evaluator_key":{"type":"string","title":"Evaluator Key"},"settings_values":{"additionalProperties":true,"type":"object","title":"Settings Values"}},"type":"object","required":["name","evaluator_key","settings_values"],"title":"NewEvaluatorConfig"},"NewHumanEvaluation":{"properties":{"app_id":{"type":"string","title":"App Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"evaluation_type":{"$ref":"#/components/schemas/EvaluationType"},"inputs":{"items":{"type":"string"},"type":"array","title":"Inputs"},"testset_id":{"type":"string","title":"Testset Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["app_id","variant_ids","evaluation_type","inputs","testset_id","status"],"title":"NewHumanEvaluation"},"NewTestset":{"properties":{"name":{"type":"string","title":"Name"},"csvdata":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Csvdata"}},"type":"object","required":["name","csvdata"],"title":"NewTestset"},"NoListJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}]},"NoListJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}]},"NodeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"$ref":"#/components/schemas/NodeType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"NodeDTO"},"NodeType":{"type":"string","enum":["agent","workflow","chain","task","tool","embedding","query","completion","chat","rerank"],"title":"NodeType"},"NumericOperator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},"OTelContextDTO":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"}},"type":"object","required":["trace_id","span_id"],"title":"OTelContextDTO"},"OTelEvent-Input":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEvent-Output":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEventDTO":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"type":"string","title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEventDTO"},"OTelExtraDTO-Input":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},"OTelExtraDTO-Output":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelExtraDTO"},"OTelFlatSpan-Input":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode-Input"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"OTelFlatSpan-Output":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__tracing__dtos__OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelFlatSpan"},"OTelHash-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelHash-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelLink-Input":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"OTelLink-Output":{"properties":{"span_id":{"type":"string","title":"Span Id"},"trace_id":{"type":"string","title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["span_id","trace_id"],"title":"OTelLink"},"OTelLinkDTO":{"properties":{"context":{"$ref":"#/components/schemas/OTelContextDTO"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["context"],"title":"OTelLinkDTO"},"OTelLinksResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"OTelLinksResponse"},"OTelReference-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelReference-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelSpan-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/OTelSpan-Input"},{"items":{"$ref":"#/components/schemas/OTelSpan-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode-Input"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"OTelSpan-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/OTelSpan-Output"},{"items":{"$ref":"#/components/schemas/OTelSpan-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__tracing__dtos__OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"OTelSpan"},"OTelSpanDTO":{"properties":{"context":{"$ref":"#/components/schemas/OTelContextDTO"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/OTelSpanKind","default":"SPAN_KIND_UNSPECIFIED"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"status_code":{"$ref":"#/components/schemas/oss__src__core__observability__dtos__OTelStatusCode","default":"STATUS_CODE_UNSET"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEventDTO"},"type":"array"},{"type":"null"}],"title":"Events"},"parent":{"anyOf":[{"$ref":"#/components/schemas/OTelContextDTO"},{"type":"null"}]},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["context","name","start_time","end_time"],"title":"OTelSpanDTO"},"OTelSpanKind":{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"OTelSpansTree-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/OTelSpan-Input"},{"items":{"$ref":"#/components/schemas/OTelSpan-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"OTelSpansTree-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/OTelSpan-Output"},{"items":{"$ref":"#/components/schemas/OTelSpan-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"OTelSpansTree"},"OTelStatusCode-Input":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"OTelTracingRequest":{"properties":{"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelFlatSpan-Input"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelSpansTree-Input"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingRequest"},"Organization":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"description":{"type":"string","title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","name","owner","description"],"title":"Organization"},"OrganizationDetails":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"description":{"type":"string","title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","name","owner","description"],"title":"OrganizationDetails"},"OrganizationMembershipRequest":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"organization_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["role","is_demo","user_ref","organization_ref"],"title":"OrganizationMembershipRequest"},"OrganizationOutput":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrganizationOutput"},"OrganizationRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_paying":{"type":"boolean","title":"Is Paying"}},"type":"object","required":["name","description","is_paying"],"title":"OrganizationRequest"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"},"ParentDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ParentDTO"},"Permission":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","create_secret","view_secret","update_secret","delete_secret","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues"],"title":"Permission"},"Plan":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai"],"title":"Plan"},"ProjectMembershipRequest":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"project_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["role","is_demo","user_ref","project_ref"],"title":"ProjectMembershipRequest"},"ProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"workspace_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"organization_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["name","description","is_default","workspace_ref","organization_ref"],"title":"ProjectRequest"},"ProjectScope":{"properties":{"credentials":{"type":"string","title":"Credentials"},"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"tier":{"type":"string","title":"Tier"},"user":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"project":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"workspace":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"organization":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["credentials","role","tier","user","project","workspace","organization"],"title":"ProjectScope"},"ProjectsResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"QueriesResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"},"Query":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"QueryCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"},"QueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"},"QueryEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"},"QueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"},"QueryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"},"QueryRevision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"QueryRevisionCommit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionCommit"},"QueryRevisionCommitRequest":{"properties":{"query_revision_commit":{"$ref":"#/components/schemas/QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"},"QueryRevisionCreate":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"},"QueryRevisionCreateRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"},"QueryRevisionData-Input":{"properties":{"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},"QueryRevisionData-Output":{"properties":{"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevisionData"},"QueryRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"},"QueryRevisionEditRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"},"QueryRevisionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},"QueryRevisionQueryRequest":{"properties":{"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"},"QueryRevisionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"},"QueryRevisionRetrieveRequest":{"properties":{"query_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"},"QueryRevisionsLog":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"},"QueryRevisionsLogRequest":{"properties":{"query_revisions":{"$ref":"#/components/schemas/QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"},"QueryRevisionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"$ref":"#/components/schemas/QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"},"ReadAppOutput":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_id","app_name"],"title":"ReadAppOutput"},"ReferenceDTO":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["id"],"title":"ReferenceDTO"},"ReferenceRequest":{"properties":{"application_ref":{"$ref":"#/components/schemas/ReferenceDTO"}},"type":"object","required":["application_ref"],"title":"ReferenceRequest"},"ReferenceRequestModel":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ResendInviteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"},"Result":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"error":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"type":"null"}]}},"type":"object","required":["type"],"title":"Result"},"RevisionFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},"RootDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"RootDTO"},"ScopesResponseModel":{"properties":{"projects":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/ProjectScope"},"type":"object"},"type":"object","title":"Projects","default":{}}},"type":"object","title":"ScopesResponseModel"},"SecretDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},"SecretKind":{"type":"string","enum":["provider_key","custom_provider"],"title":"SecretKind"},"SecretResponseDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"$ref":"#/components/schemas/Header"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"SimpleEvaluation":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"SimpleEvaluationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025.07.14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"},"SimpleEvaluationCreateRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"},"SimpleEvaluationData":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},"SimpleEvaluationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"},"SimpleEvaluationEditRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"},"SimpleEvaluationIdResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"},"SimpleEvaluationOutput":{"properties":{"id":{"type":"string","title":"Id"},"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"},"app_id":{"type":"string","title":"App Id"},"status":{"type":"string","title":"Status"},"evaluation_type":{"$ref":"#/components/schemas/EvaluationType"}},"type":"object","required":["id","variant_ids","app_id","status","evaluation_type"],"title":"SimpleEvaluationOutput"},"SimpleEvaluationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},"SimpleEvaluationQueryRequest":{"properties":{"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"},"SimpleEvaluationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"},"SimpleEvaluationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"$ref":"#/components/schemas/SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"},"SimpleEvaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Output"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluator"},"SimpleEvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"},"SimpleEvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorCreate"}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest"},"SimpleEvaluatorData-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorData-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"},"SimpleEvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorEdit"}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest"},"SimpleEvaluatorFlags":{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"SimpleEvaluatorFlags"},"SimpleEvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"SimpleEvaluatorQuery"},"SimpleEvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQuery"},{"type":"null"}]},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorQueryRequest"},"SimpleEvaluatorResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluator"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorResponse"},"SimpleEvaluatorsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/SimpleEvaluator"},"type":"array","title":"Evaluators","default":[]}},"type":"object","title":"SimpleEvaluatorsResponse"},"SimpleQueriesResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"},"SimpleQuery":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"SimpleQuery"},"SimpleQueryCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"},"SimpleQueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"},"SimpleQueryEdit":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"},"SimpleQueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"},"SimpleQueryQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},"SimpleQueryQueryRequest":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"},"SimpleQueryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"},"SimpleTestset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"SimpleTestset"},"SimpleTestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"},"SimpleTestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetCreate"}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"},"SimpleTestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"},"SimpleTestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetEdit"}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"},"SimpleTestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"SimpleTestsetQuery"},"SimpleTestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestsetQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetQueryRequest"},"SimpleTestsetResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestset"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetResponse"},"SimpleTestsetsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testsets":{"items":{"$ref":"#/components/schemas/SimpleTestset"},"type":"array","title":"Testsets","default":[]}},"type":"object","title":"SimpleTestsetsResponse"},"SimpleTraceChannel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"SimpleTraceKind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"SimpleTraceOrigin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"SimpleTraceReferences":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testset":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"application":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"SpanDTO-Input":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"root":{"$ref":"#/components/schemas/RootDTO"},"tree":{"$ref":"#/components/schemas/TreeDTO"},"node":{"$ref":"#/components/schemas/NodeDTO"},"parent":{"anyOf":[{"$ref":"#/components/schemas/ParentDTO"},{"type":"null"}]},"time":{"$ref":"#/components/schemas/TimeDTO"},"status":{"$ref":"#/components/schemas/StatusDTO"},"exception":{"anyOf":[{"$ref":"#/components/schemas/ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"$ref":"#/components/schemas/OTelExtraDTO-Input"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpanDTO-Input"},{"items":{"$ref":"#/components/schemas/SpanDTO-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"SpanDTO-Output":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"root":{"$ref":"#/components/schemas/RootDTO"},"tree":{"$ref":"#/components/schemas/TreeDTO"},"node":{"$ref":"#/components/schemas/NodeDTO"},"parent":{"anyOf":[{"$ref":"#/components/schemas/ParentDTO"},{"type":"null"}]},"time":{"$ref":"#/components/schemas/TimeDTO"},"status":{"$ref":"#/components/schemas/StatusDTO"},"exception":{"anyOf":[{"$ref":"#/components/schemas/ExceptionDTO"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/LinkDTO"},"type":"array"},{"type":"null"}],"title":"Links"},"otel":{"anyOf":[{"$ref":"#/components/schemas/OTelExtraDTO-Output"},{"type":"null"}]},"nodes":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpanDTO-Output"},{"items":{"$ref":"#/components/schemas/SpanDTO-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Nodes"}},"type":"object","required":["trace_id","span_id","root","tree","node","time","status"],"title":"SpanDTO"},"SpanType":{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},"StandardProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/StandardProviderKind"},"provider":{"$ref":"#/components/schemas/StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},"StandardProviderKind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"StandardProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"},"Status":{"properties":{"code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code","default":500},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","default":"An unexpected error occurred. Please try again later."},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"StatusCode":{"type":"string","enum":["UNSET","OK","ERROR"],"title":"StatusCode"},"StatusDTO":{"properties":{"code":{"$ref":"#/components/schemas/StatusCode"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["code"],"title":"StatusDTO"},"StringOperator":{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},"TestSetOutputResponse":{"properties":{"_id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["_id","name","created_at","updated_at"],"title":"TestSetOutputResponse"},"TestSetSimpleResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"TestSetSimpleResponse"},"Testcase-Input":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"Testcase-Output":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"TestcaseResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Testcase-Output"},{"type":"null"}]}},"type":"object","title":"TestcaseResponse"},"TestcasesQueryRequest":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"TestcasesQueryRequest"},"TestcasesResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testcases":{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array","title":"Testcases","default":[]}},"type":"object","title":"TestcasesResponse"},"Testset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"TestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"},"TestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetCreate"}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"},"TestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"},"TestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetEdit"}},"type":"object","required":["testset"],"title":"TestsetEditRequest"},"TestsetFlags":{"properties":{"has_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testcases"},"has_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Traces"}},"type":"object","title":"TestsetFlags"},"TestsetLog":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetLog"},"TestsetLogRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetLog"}},"type":"object","required":["testset"],"title":"TestsetLogRequest"},"TestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TestsetQuery"},"TestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/TestsetQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetQueryRequest"},"TestsetResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/Testset"},{"type":"null"}]}},"type":"object","title":"TestsetResponse"},"TestsetRevision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"TestsetRevisionCommit":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionCommit"},"TestsetRevisionCommitRequest":{"properties":{"testset_revision_commit":{"$ref":"#/components/schemas/TestsetRevisionCommit"}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"},"TestsetRevisionCreate":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"},"TestsetRevisionCreateRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionCreate"}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"},"TestsetRevisionData-Input":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionData-Output":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"},"TestsetRevisionEditRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionEdit"}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"},"TestsetRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},"TestsetRevisionQueryRequest":{"properties":{"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs"},"testset_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionQueryRequest"},"TestsetRevisionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevision"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionResponse"},"TestsetRevisionRetrieveRequest":{"properties":{"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionRetrieveRequest"},"TestsetRevisionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_revisions":{"items":{"$ref":"#/components/schemas/TestsetRevision"},"type":"array","title":"Testset Revisions","default":[]}},"type":"object","title":"TestsetRevisionsResponse"},"TestsetVariant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"TestsetVariantCreate":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"},"TestsetVariantCreateRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantCreate"}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"},"TestsetVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"},"TestsetVariantEditRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantEdit"}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"},"TestsetVariantQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TestsetVariantQuery"},"TestsetVariantQueryRequest":{"properties":{"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariantQuery"},{"type":"null"}]},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs"},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"TestsetVariantQueryRequest"},"TestsetVariantResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariant"},{"type":"null"}]}},"type":"object","title":"TestsetVariantResponse"},"TestsetVariantsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testset_variants":{"items":{"$ref":"#/components/schemas/TestsetVariant"},"type":"array","title":"Testset Variants","default":[]}},"type":"object","title":"TestsetVariantsResponse"},"TestsetsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"testsets":{"items":{"$ref":"#/components/schemas/Testset"},"type":"array","title":"Testsets","default":[]}},"type":"object","title":"TestsetsResponse"},"TextOptions":{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},"TimeDTO":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"TimeDTO"},"TraceType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},"TracingQuery":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"TreeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"anyOf":[{"$ref":"#/components/schemas/TreeType"},{"type":"null"}]}},"type":"object","required":["id"],"title":"TreeDTO"},"TreeType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TreeType"},"UpdateApp":{"properties":{"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_name"],"title":"UpdateApp"},"UpdateAppOutput":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"}},"type":"object","required":["app_id","app_name"],"title":"UpdateAppOutput"},"UpdateEvaluatorConfig":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"evaluator_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Key"},"settings_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings Values"}},"type":"object","required":["settings_values"],"title":"UpdateEvaluatorConfig"},"UpdateSecretDTO":{"properties":{"header":{"anyOf":[{"$ref":"#/components/schemas/Header"},{"type":"null"}]},"secret":{"anyOf":[{"$ref":"#/components/schemas/SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"},"UpdateVariantParameterPayload":{"properties":{"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["parameters"],"title":"UpdateVariantParameterPayload"},"UpdateVariantURLPayload":{"properties":{"url":{"type":"string","title":"Url"},"variant_id":{"type":"string","title":"Variant Id"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"}},"type":"object","required":["url","variant_id"],"title":"UpdateVariantURLPayload"},"UpdateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"},"UserRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["name","email"],"title":"UserRequest"},"UserRole":{"properties":{"email":{"type":"string","title":"Email"},"organization_id":{"type":"string","title":"Organization Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["email","organization_id"],"title":"UserRole"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},"Windowing":{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},"Workflow":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"WorkflowCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"},"WorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowCreate"}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"},"WorkflowEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"},"WorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowEdit"}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"},"WorkflowFlags":{"properties":{"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Human"}},"type":"object","title":"WorkflowFlags"},"WorkflowFork":{"properties":{"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"},"WorkflowForkRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowFork"}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"},"WorkflowResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/Workflow"},{"type":"null"}]}},"type":"object","title":"WorkflowResponse"},"WorkflowRevision":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevisionCommit":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionCommit"},"WorkflowRevisionCommitRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCommit"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"},"WorkflowRevisionCreate":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"},"WorkflowRevisionCreateRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCreate"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"},"WorkflowRevisionData-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionData-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"service":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Service"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"},"WorkflowRevisionEditRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionEdit"}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"},"WorkflowRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},"WorkflowRevisionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionResponse"},"WorkflowRevisionRetrieveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"null"}]}},"type":"object","title":"WorkflowRevisionRetrieveRequest"},"WorkflowRevisionsLog":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"},"WorkflowRevisionsLogRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRevisionsLog"}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"},"WorkflowRevisionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_revisions":{"items":{"$ref":"#/components/schemas/WorkflowRevision"},"type":"array","title":"Workflow Revisions","default":[]}},"type":"object","title":"WorkflowRevisionsResponse"},"WorkflowServiceData-Input":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Outputs"},"trace_parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Trace Parameters"},"trace_inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Trace Inputs"},"trace_outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Trace Outputs"},"trace":{"anyOf":[{"$ref":"#/components/schemas/OTelSpansTree-Input"},{"type":"null"}]},"tree":{"anyOf":[{"$ref":"#/components/schemas/AgentaVersionedTreeDTO-Input"},{"type":"null"}]}},"type":"object","title":"WorkflowServiceData"},"WorkflowServiceData-Output":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Outputs"},"trace_parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Trace Parameters"},"trace_inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Trace Inputs"},"trace_outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Trace Outputs"},"trace":{"anyOf":[{"$ref":"#/components/schemas/OTelSpansTree-Output"},{"type":"null"}]},"tree":{"anyOf":[{"$ref":"#/components/schemas/AgentaVersionedTreeDTO-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowServiceData"},"WorkflowServiceInterface-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"WorkflowServiceInterface"},"WorkflowServiceInterface-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"schemas":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Schemas"},"mappings":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"WorkflowServiceInterface"},"WorkflowServiceRequest":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowServiceData-Input"},{"type":"null"}]},"references":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/oss__src__core__shared__dtos__Reference"},"type":"object"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"type":"null"}],"title":"Links"},"credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials"},"secrets":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Secrets"}},"type":"object","title":"WorkflowServiceRequest"},"WorkflowServiceResponse":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowServiceData-Output"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object"},{"type":"null"}],"title":"Links"},"status":{"$ref":"#/components/schemas/Status","default":{"code":500,"message":"An unexpected error occurred. Please try again later."}}},"type":"object","title":"WorkflowServiceResponse"},"WorkflowVariant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"WorkflowVariantCreate":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"},"WorkflowVariantCreateRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantCreate"}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"},"WorkflowVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"},"WorkflowVariantEditRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantEdit"}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"},"WorkflowVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},"WorkflowVariantResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariant"},{"type":"null"}]}},"type":"object","title":"WorkflowVariantResponse"},"WorkflowVariantsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflow_variants":{"items":{"$ref":"#/components/schemas/WorkflowVariant"},"type":"array","title":"Workflow Variants","default":[]}},"type":"object","title":"WorkflowVariantsResponse"},"WorkflowsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"workflows":{"items":{"$ref":"#/components/schemas/Workflow"},"type":"array","title":"Workflows","default":[]}},"type":"object","title":"WorkflowsResponse"},"Workspace":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"WorkspaceMemberResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"$ref":"#/components/schemas/WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"WorkspaceMembershipRequest":{"properties":{"role":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"Role"},"is_demo":{"type":"boolean","title":"Is Demo"},"user_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"},"workspace_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["role","is_demo","user_ref","workspace_ref"],"title":"WorkspaceMembershipRequest"},"WorkspacePermission":{"properties":{"role_name":{"$ref":"#/components/schemas/WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"WorkspaceRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"organization_ref":{"$ref":"#/components/schemas/ee__src__services__admin_manager__Reference"}},"type":"object","required":["name","description","is_default","organization_ref"],"title":"WorkspaceRequest"},"WorkspaceResponse":{"properties":{"created_at":{"type":"string","title":"Created At","default":"2025-11-02 12:26:46.318197+00:00"},"updated_at":{"type":"string","title":"Updated At","default":"2025-11-02 12:26:46.318231+00:00"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","name","type","organization"],"title":"WorkspaceResponse"},"WorkspaceRole":{"type":"string","enum":["owner","viewer","editor","evaluator","workspace_admin","deployment_manager"],"title":"WorkspaceRole"},"ee__src__services__admin_manager__Reference":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"Reference"},"oss__src__apis__fastapi__observability__models__OTelTracingResponse":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"spans":{"items":{"$ref":"#/components/schemas/OTelSpanDTO"},"type":"array","title":"Spans"}},"type":"object","required":["spans"],"title":"OTelTracingDataResponse"},"oss__src__apis__fastapi__observability__models__OldAnalyticsResponse":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"buckets":{"items":{"$ref":"#/components/schemas/BucketDTO"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"OldAnalyticsResponse"},"oss__src__apis__fastapi__tracing__models__OTelTracingResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelFlatSpan-Output"},"type":"array"},{"type":"null"}],"title":"Spans"},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelSpansTree-Output"},"type":"object"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"OTelTracingResponse"},"oss__src__apis__fastapi__tracing__models__OldAnalyticsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array","title":"Buckets","default":[]}},"type":"object","title":"OldAnalyticsResponse"},"oss__src__core__evaluations__types__EvaluationScenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Flags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/NoListJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"oss__src__core__observability__dtos__OTelStatusCode":{"type":"string","enum":["STATUS_CODE_OK","STATUS_CODE_ERROR","STATUS_CODE_UNSET"],"title":"OTelStatusCode"},"oss__src__core__shared__dtos__Reference":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"oss__src__core__tracing__dtos__OTelStatusCode":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"oss__src__models__api__evaluation_model__EvaluationScenario":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"evaluation_id":{"type":"string","title":"Evaluation Id"},"inputs":{"items":{"$ref":"#/components/schemas/EvaluationScenarioInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/EvaluationScenarioOutput"},"type":"array","title":"Outputs"},"correct_answers":{"anyOf":[{"items":{"$ref":"#/components/schemas/CorrectAnswer"},"type":"array"},{"type":"null"}],"title":"Correct Answers"},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"results":{"items":{"$ref":"#/components/schemas/EvaluationScenarioResult"},"type":"array","title":"Results"}},"type":"object","required":["evaluation_id","inputs","outputs","results"],"title":"LegacyEvaluationScenario"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"Authorization","in":"header"}}},"tags":[{"name":"Variants"},{"name":"Evaluations"},{"name":"Evaluators"},{"name":"Apps"},{"name":"Human-Evaluations"},{"name":"Testsets"},{"name":"Containers"},{"name":"Environments"},{"name":"Observability"},{"name":"Organizations"},{"name":"Bases"},{"name":"Configs"}],"security":[{"APIKeyHeader":[]}],"servers":[{"url":"https://cloud.agenta.ai/api"}]} +{ + "openapi": "3.1.0", + "info": { + "title": "Agenta Backend", + "version": "0.1.0", + "description": "Agenta Backend API", + "contact": { + "name": "Agenta", + "url": "https://agenta.ai", + "email": "team@agenta.ai" + } + }, + "servers": [ + { + "url": "https://cloud.agenta.ai/api", + "description": "Agenta Cloud" + } + ], + "paths": { + "/admin/accounts": { + "post": { + "tags": ["Admin"], + "summary": "Create Accounts", + "operationId": "create_accounts", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntitiesRequestModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScopesResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/account": { + "post": { + "tags": ["Admin"], + "summary": "Create Account", + "operationId": "create_account", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AccountRequest" + }, + { + "type": "null" + } + ], + "title": "Account" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/own": { + "get": { + "summary": "Get User Organization", + "operationId": "get_own_org", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationOutput" + } + } + } + } + } + } + }, + "/organizations/{org_id}": { + "get": { + "tags": ["Organization"], + "summary": "Fetch Organization Details", + "description": "Return the details of the organization.", + "operationId": "fetch_organization_details", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationDetails" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "summary": "Update Organization", + "operationId": "update_organization", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces": { + "post": { + "summary": "Create Workspace", + "operationId": "create_workspace", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkspace" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}": { + "put": { + "summary": "Update Workspace", + "operationId": "update_workspace", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkspace" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workspaces/permissions": { + "get": { + "summary": "Get All Workspace Permissions", + "description": "Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.", + "operationId": "get_all_workspace_permissions", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Permission" + }, + "type": "array", + "title": "Response Get All Workspace Permissions" + } + } + } + } + } + } + }, + "/workspaces/{workspace_id}/roles": { + "post": { + "summary": "Assign Role To User", + "description": "Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.", + "operationId": "assign_role_to_user", + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRole" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "Unassign Role From User", + "description": "Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n org_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.", + "operationId": "unassign_role_from_user", + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "email", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Email" + } + }, + { + "name": "org_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "role", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Role" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/by_resource": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation Ids", + "description": "Fetches evaluation ids for a given resource type and id.\n\nArguments:\n app_id (str): The ID of the app for which to fetch evaluations.\n resource_type (str): The type of resource for which to fetch evaluations.\n resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.\n\nRaises:\n HTTPException: If the resource_type is invalid or access is denied.\n\nReturns:\n List[str]: A list of evaluation ids.", + "operationId": "fetch_evaluation_ids_evaluations_by_resource_get", + "parameters": [ + { + "name": "resource_type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Resource Type" + } + }, + { + "name": "resource_ids", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Resource Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Response Fetch Evaluation Ids Evaluations By Resource Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations": { + "post": { + "tags": ["Evaluations"], + "summary": "Create Evaluation", + "description": "Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_", + "operationId": "create_evaluation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewEvaluation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evaluation" + }, + "title": "Response Create Evaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Evaluations"], + "summary": "Fetch List Evaluations", + "description": "Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[Evaluation]: A list of evaluations.", + "operationId": "fetch_list_evaluations_evaluations_get", + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evaluation" + }, + "title": "Response Fetch List Evaluations Evaluations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Evaluations"], + "summary": "Delete Evaluations", + "description": "Delete specific comparison tables based on their unique IDs.\n\nArgs:\ndelete_evaluations (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.", + "operationId": "delete_evaluations", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvaluation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Response Delete Evaluations" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/status": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation Status", + "description": "Fetches the status of the evaluation.\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n (str): the evaluation status", + "operationId": "fetch_evaluation_status", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/results": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation Results", + "description": "Fetches the results of the evaluation\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n _type_: _description_", + "operationId": "fetch_evaluation_results", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/evaluation_scenarios": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_evaluation_scenarios", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationScenario" + }, + "title": "Response Fetch Evaluation Scenarios" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation", + "description": "Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n Evaluation: The fetched evaluation.", + "operationId": "fetch_evaluation", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Evaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/evaluation_scenarios/comparison-results": { + "get": { + "tags": ["Evaluations"], + "summary": "Fetch Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_evaluation_scenarios_evaluations_evaluation_scenarios_comparison_results_get", + "parameters": [ + { + "name": "evaluations_ids", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Evaluations Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "title": "Response Fetch Evaluation Scenarios Evaluations Evaluation Scenarios Comparison Results Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations": { + "post": { + "tags": ["Human-Evaluations"], + "summary": "Create Human Evaluation", + "description": "Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_", + "operationId": "create_human_evaluation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewHumanEvaluation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleEvaluationOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Human-Evaluations"], + "summary": "Fetch List Human Evaluations", + "description": "Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[HumanEvaluation]: A list of evaluations.", + "operationId": "fetch_list_human_evaluations_human_evaluations_get", + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanEvaluation" + }, + "title": "Response Fetch List Human Evaluations Human Evaluations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Human-Evaluations"], + "summary": "Delete Evaluations", + "description": "Delete specific comparison tables based on their unique IDs.\n\nArgs:\n payload (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.", + "operationId": "delete_evaluations_human_evaluations_delete", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvaluation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Response Delete Evaluations Human Evaluations Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}": { + "get": { + "tags": ["Human-Evaluations"], + "summary": "Fetch Human Evaluation", + "description": "Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n HumanEvaluation: The fetched evaluation.", + "operationId": "fetch_human_evaluation_human_evaluations__evaluation_id__get", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Human-Evaluations"], + "summary": "Update Human Evaluation", + "description": "Updates an evaluation's status.\n\nRaises:\n HTTPException: If the columns in the test set do not match with the inputs in the variant.\n\nReturns:\n None: A 204 No Content status code, indicating that the update was successful.", + "operationId": "update_human_evaluation", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluationUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/evaluation_scenarios": { + "get": { + "tags": ["Human-Evaluations"], + "summary": "Fetch Human Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_human_evaluation_scenarios", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenario" + }, + "title": "Response Fetch Human Evaluation Scenarios" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}": { + "put": { + "tags": ["Human-Evaluations"], + "summary": "Update Evaluation Scenario Router", + "description": "Updates an evaluation scenario's vote or score based on its type.\n\nRaises:\n HTTPException: If update fails or unauthorized.\n\nReturns:\n None: 204 No Content status code upon successful update.", + "operationId": "update_evaluation_scenario_router_human_evaluations__evaluation_id__evaluation_scenario__evaluation_scenario_id___evaluation_type__put", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + }, + { + "name": "evaluation_scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + } + }, + { + "name": "evaluation_type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EvaluationType" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluationScenarioUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score": { + "get": { + "tags": ["Human-Evaluations"], + "summary": "Get Evaluation Scenario Score Router", + "description": "Fetch the score of a specific evaluation scenario.\n\nArgs:\n evaluation_scenario_id: The ID of the evaluation scenario to fetch.\n\nReturns:\n Dictionary containing the scenario ID and its score.", + "operationId": "get_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_get", + "parameters": [ + { + "name": "evaluation_scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Response Get Evaluation Scenario Score Router Human Evaluations Evaluation Scenario Evaluation Scenario Id Score Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Human-Evaluations"], + "summary": "Update Evaluation Scenario Score Router", + "description": "Updates the score of an evaluation scenario.\n\nRaises:\n HTTPException: Server error if the evaluation update fails.\n\nReturns:\n None: 204 No Content status code upon successful update.", + "operationId": "update_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_put", + "parameters": [ + { + "name": "evaluation_scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationScenarioScoreUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/results": { + "get": { + "tags": ["Human-Evaluations"], + "summary": "Fetch Results", + "description": "Fetch all the results for one the comparison table\n\nArguments:\n evaluation_id -- _description_\n\nReturns:\n _description_", + "operationId": "fetch_results", + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/billing/stripe/events/": { + "post": { + "tags": ["Billing"], + "summary": "Handle Events", + "operationId": "handle_events", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/billing/stripe/portals/": { + "post": { + "tags": ["Billing"], + "summary": "Create Portal User Route", + "operationId": "create_portal", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/billing/stripe/checkouts/": { + "post": { + "tags": ["Billing"], + "summary": "Create Checkout User Route", + "operationId": "create_checkout", + "parameters": [ + { + "name": "plan", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Plan" + } + }, + { + "name": "success_url", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Success Url" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/billing/plans": { + "get": { + "tags": ["Billing"], + "summary": "Fetch Plan User Route", + "operationId": "fetch_plans", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/billing/plans/switch": { + "post": { + "tags": ["Billing"], + "summary": "Switch Plans User Route", + "operationId": "switch_plans", + "parameters": [ + { + "name": "plan", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Plan" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/billing/subscription": { + "get": { + "tags": ["Billing"], + "summary": "Fetch Subscription User Route", + "operationId": "fetch_subscription", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/billing/subscription/cancel": { + "post": { + "tags": ["Billing"], + "summary": "Cancel Subscription User Route", + "operationId": "cancel_plan", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/billing/usage": { + "get": { + "tags": ["Billing"], + "summary": "Fetch Usage User Route", + "operationId": "fetch_usage", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/admin/billing/stripe/portals/": { + "post": { + "tags": ["Admin", "Billing"], + "summary": "Create Portal Admin Route", + "operationId": "admin_create_portal", + "parameters": [ + { + "name": "organization_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Organization Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/billing/stripe/checkouts/": { + "post": { + "tags": ["Admin", "Billing"], + "summary": "Create Checkout Admin Route", + "operationId": "admin_create_checkout", + "parameters": [ + { + "name": "organization_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Organization Id" + } + }, + { + "name": "plan", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Plan" + } + }, + { + "name": "success_url", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Success Url" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/billing/plans/switch": { + "post": { + "tags": ["Admin", "Billing"], + "summary": "Switch Plans Admin Route", + "operationId": "admin_switch_plans", + "parameters": [ + { + "name": "organization_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Organization Id" + } + }, + { + "name": "plan", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Plan" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/billing/subscription/cancel": { + "post": { + "tags": ["Admin", "Billing"], + "summary": "Cancel Subscription Admin Route", + "operationId": "admin_cancel_subscription", + "parameters": [ + { + "name": "organization_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Organization Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/billing/usage/report": { + "post": { + "tags": ["Admin", "Billing"], + "summary": "Report Usage", + "operationId": "admin_report_usage", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/health": { + "get": { + "summary": "Health Check", + "operationId": "health_check", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/permissions/verify": { + "get": { + "tags": ["Access Control"], + "summary": "Verify Permissions", + "operationId": "verify_permissions", + "parameters": [ + { + "name": "action", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Action" + } + }, + { + "name": "scope_type", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Scope Type" + } + }, + { + "name": "scope_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Scope Id" + } + }, + { + "name": "resource_type", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Resource Type" + } + }, + { + "name": "resource_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Resource Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/projects": { + "get": { + "tags": ["Scopes"], + "summary": "Get Projects", + "operationId": "get_projects", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProjectsResponse" + }, + "type": "array", + "title": "Response Get Projects" + } + } + } + } + } + } + }, + "/profile": { + "get": { + "summary": "User Profile", + "operationId": "fetch_user_profile", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/profile/reset-password": { + "post": { + "summary": "Reset User Password", + "operationId": "reset_user_password", + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/variants": { + "get": { + "tags": ["Apps"], + "summary": "List App Variants", + "description": "Retrieve a list of app variants for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve variants for.\n\nReturns:\n List[AppVariantResponse]: A list of app variants for the given app ID.", + "operationId": "list_app_variants", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppVariantResponse_" + }, + "title": "Response List App Variants" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/get_variant_by_env": { + "get": { + "tags": ["Apps"], + "summary": "Get Variant By Env", + "description": "Retrieve the app variant based on the provided app_id and environment.\n\nArgs:\n app_id (str): The ID of the app to retrieve the variant for.\n environment (str): The environment of the app variant to retrieve.\n\nRaises:\n HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).\n\nReturns:\n AppVariantResponse: The retrieved app variant.", + "operationId": "get_variant_by_env", + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "environment", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Environment" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantResponse_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps": { + "post": { + "tags": ["Apps"], + "summary": "Create App", + "description": "Create a new app for a user or organization.\n\nArgs:\n payload (CreateApp): The payload containing the app name and organization ID (optional).\n\nReturns:\n CreateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.", + "operationId": "create_app", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApp_" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAppOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Apps"], + "summary": "List Apps", + "description": "Retrieve a list of apps filtered by app_name.\n\nArgs:\n app_name (Optional[str]): The name of the app to filter by.\n\nReturns:\n List[App]: A list of apps filtered by app_name.\n\nRaises:\n HTTPException: If there was an error retrieving the list of apps.", + "operationId": "list_apps", + "parameters": [ + { + "name": "app_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/App" + }, + "title": "Response List Apps" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}": { + "patch": { + "tags": ["Apps"], + "summary": "Update App", + "description": "Update an app for a user or organization.\n\nArgs:\n app_id (str): The ID of the app.\n payload (UpdateApp): The payload containing the app name.\n\nReturns:\n UpdateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.", + "operationId": "update_app", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateApp" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAppOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Apps"], + "summary": "Remove App", + "description": "Remove app, all its variant.\n\nArguments:\n app -- App to remove", + "operationId": "remove_app", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/variant/from-service": { + "post": { + "tags": ["Apps"], + "summary": "Add Variant From Url Route", + "operationId": "add_variant_from_url", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVariantFromURLPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/variant/from-template": { + "post": { + "tags": ["Apps"], + "summary": "Add Variant From Key Route", + "operationId": "add_variant_from_key", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVariantFromKeyPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/environments": { + "get": { + "tags": ["Apps"], + "summary": "List Environments", + "description": "Retrieve a list of environments for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve environments for.\n\nReturns:\n List[EnvironmentOutput]: A list of environment objects.", + "operationId": "list_environments", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentOutput_" + }, + "title": "Response List Environments" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/revisions/{environment_name}": { + "get": { + "tags": ["Apps"], + "summary": "List App Environment Revisions", + "operationId": "environment_revisions", + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "environment_name", + "in": "path", + "required": true, + "schema": { + "title": "Environment Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentOutputExtended_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/from-base": { + "post": { + "tags": ["Variants"], + "summary": "Add Variant From Base And Config", + "description": "Add a new variant based on an existing one.\nSame as POST /config\n\nArgs:\n payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters.\n\nRaises:\n HTTPException: Raised if the variant could not be added or accessed.\n\nReturns:\n Union[AppVariantResponse, Any]: New variant details or exception.", + "operationId": "add_variant_from_base_and_config", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVariantFromBasePayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppVariantResponse_" + }, + {} + ], + "title": "Response Add Variant From Base And Config" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}": { + "delete": { + "tags": ["Variants"], + "summary": "Remove Variant", + "description": "Mark a variant as hidden from the UI.\n\nArguments:\n app_variant -- AppVariant to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant", + "operationId": "mark_variant_as_hidden", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Variants"], + "summary": "Get Variant", + "operationId": "get_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantResponse_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/parameters": { + "put": { + "tags": ["Variants"], + "summary": "Update Variant Parameters", + "description": "Updates the parameters for an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n payload (UpdateVariantParameterPayload): The payload containing the updated parameters.\n\nRaises:\n HTTPException: If there is an error while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response containing the updated app variant parameters.", + "operationId": "update_variant_parameters", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVariantParameterPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/service": { + "put": { + "tags": ["Variants"], + "summary": "Update Variant Url", + "description": "Updates the URL used in an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n url (str): The URL to update.\n\nRaises:\n HTTPException: If an error occurs while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response indicating whether the update was successful or not.", + "operationId": "update_variant_url", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVariantURLPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/revisions": { + "get": { + "tags": ["Variants"], + "summary": "Get Variant Revisions", + "operationId": "get_variant_revisions", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppVariantRevision" + }, + "title": "Response Get Variant Revisions" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/revisions/{revision_number}": { + "get": { + "tags": ["Variants"], + "summary": "Get Variant Revision", + "operationId": "get_variant_revision", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + }, + { + "name": "revision_number", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Revision Number" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantRevision" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/revisions/{revision_id}": { + "delete": { + "tags": ["Variants"], + "summary": "Remove Variant Revision", + "description": "Mark a variant revision as hidden from the UI.\n\nArguments:\n app_variant -- AppVariant to remove\n revision_id -- Revision ID to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant", + "operationId": "mark_variant_revision_as_hidden", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + } + }, + { + "name": "revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Revision Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/add": { + "post": { + "tags": ["Variants"], + "summary": "Configs Add", + "operationId": "configs_add", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_add" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/fetch": { + "post": { + "tags": ["Variants"], + "summary": "Configs Fetch", + "description": "Fetch configuration for a variant or environment.\n\nEither variant_ref OR environment_ref must be provided (if neither is provided,\na default environment_ref with slug=\"production\" will be used).\n\nFor each reference object (variant_ref, environment_ref, application_ref):\n- Provide either 'slug' or 'id' field\n- 'version' is optional and can be set to null\n- If 'id' is provided, it will be used directly to fetch the resource\n- Otherwise, 'slug' will be used along with application_ref\n\nReturns:\n ConfigResponseModel: The configuration for the requested variant or environment.\n\nRaises:\n HTTPException: If the configuration is not found.", + "operationId": "configs_fetch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_fetch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/fork": { + "post": { + "tags": ["Variants"], + "summary": "Configs Fork", + "operationId": "configs_fork", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_fork" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/commit": { + "post": { + "tags": ["Variants"], + "summary": "Configs Commit", + "operationId": "configs_commit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/deploy": { + "post": { + "tags": ["Variants"], + "summary": "Configs Deploy", + "operationId": "configs_deploy", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_deploy" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/delete": { + "post": { + "tags": ["Variants"], + "summary": "Configs Delete", + "operationId": "configs_delete", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_delete" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Configs Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/list": { + "post": { + "tags": ["Variants"], + "summary": "Configs List", + "operationId": "configs_list", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ConfigResponseModel" + }, + "type": "array", + "title": "Response Configs List" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/configs/history": { + "post": { + "tags": ["Variants"], + "summary": "Configs History", + "operationId": "configs_history", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_configs_history" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ConfigResponseModel" + }, + "type": "array", + "title": "Response Configs History" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/containers/templates": { + "get": { + "tags": ["Containers"], + "summary": "Container Templates", + "description": "Returns a list of templates available for creating new containers.", + "operationId": "container_templates", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/evaluators": { + "get": { + "tags": ["Evaluators"], + "summary": "Get Evaluators Endpoint", + "description": "Endpoint to fetch a list of evaluators.\n\nReturns:\n List[Evaluator]: A list of evaluator objects.", + "operationId": "get_evaluators_endpoint_evaluators_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/oss__src__models__api__evaluation_model__Evaluator" + }, + "type": "array", + "title": "Response Get Evaluators Endpoint Evaluators Get" + } + } + } + } + } + } + }, + "/evaluators/map": { + "post": { + "tags": ["Evaluators"], + "summary": "Evaluator Data Map", + "description": "Endpoint to map the experiment data tree to evaluator interface.\n\nArgs:\n request (Request): The request object.\n payload (EvaluatorMappingInputInterface): The payload containing the request data.\n\nReturns:\n EvaluatorMappingOutputInterface: the evaluator mapping output object", + "operationId": "evaluator_data_map_evaluators_map_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorMappingInputInterface" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorMappingOutputInterface" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluators/{evaluator_key}/run": { + "post": { + "tags": ["Evaluators"], + "summary": "Evaluator Run", + "description": "Endpoint to evaluate LLM app run\n\nArgs:\n request (Request): The request object.\n evaluator_key (str): The key of the evaluator.\n payload (EvaluatorInputInterface): The payload containing the request data.\n\nReturns:\n result: EvaluatorOutputInterface object containing the outputs.", + "operationId": "evaluator_run_evaluators__evaluator_key__run_post", + "parameters": [ + { + "name": "evaluator_key", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Key" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorInputInterface" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorOutputInterface" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluators/configs": { + "get": { + "tags": ["Evaluators"], + "summary": "Get Evaluator Configs", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "get_evaluator_configs_evaluators_configs_get", + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorConfig" + }, + "title": "Response Get Evaluator Configs Evaluators Configs Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": ["Evaluators"], + "summary": "Create New Evaluator Config", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n EvaluatorConfigDB: Evaluator configuration api model.", + "operationId": "create_new_evaluator_config_evaluators_configs_post", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewEvaluatorConfig" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluators/configs/{evaluator_config_id}": { + "get": { + "tags": ["Evaluators"], + "summary": "Get Evaluator Config", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "get_evaluator_config_evaluators_configs__evaluator_config_id__get", + "parameters": [ + { + "name": "evaluator_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Evaluators"], + "summary": "Update Evaluator Config", + "description": "Endpoint to update evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "update_evaluator_config_evaluators_configs__evaluator_config_id__put", + "parameters": [ + { + "name": "evaluator_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEvaluatorConfig" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Evaluators"], + "summary": "Delete Evaluator Config", + "description": "Endpoint to delete a specific evaluator configuration.\n\nArgs:\n evaluator_config_id (str): The unique identifier of the evaluator configuration.\n\nReturns:\n bool: True if deletion was successful, False otherwise.", + "operationId": "delete_evaluator_config_evaluators_configs__evaluator_config_id__delete", + "parameters": [ + { + "name": "evaluator_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Evaluator Config Evaluators Configs Evaluator Config Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/upload": { + "post": { + "tags": ["Testsets"], + "summary": "Upload File", + "description": "Uploads a CSV or JSON file and saves its data to Postgres.\n\nArgs:\nupload_type : Either a json or csv file.\n file (UploadFile): The CSV or JSON file to upload.\n testset_name (Optional): the name of the testset if provided.\n\nReturns:\n dict: The result of the upload process.", + "operationId": "upload_file", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_file" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/endpoint": { + "post": { + "tags": ["Testsets"], + "summary": "Import Testset", + "description": "Import JSON testset data from an endpoint and save it to Postgres.\n\nArgs:\n endpoint (str): An endpoint URL to import data from.\n testset_name (str): the name of the testset if provided.\n\nReturns:\n dict: The result of the import process.", + "operationId": "import_testset", + "parameters": [ + { + "name": "authorization", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Body_import_testset" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets": { + "get": { + "tags": ["Testsets"], + "summary": "Get Testsets", + "description": "Get all testsets.\n\nReturns:\n- A list of testset objects.\n\nRaises:\n- `HTTPException` with status code 404 if no testsets are found.", + "operationId": "get_testsets", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/TestSetOutputResponse" + }, + "type": "array", + "title": "Response Get Testsets" + } + } + } + } + } + }, + "post": { + "tags": ["Testsets"], + "summary": "Create Testset", + "description": "Create a testset with given name, save the testset to Postgres.\n\nArgs:\nname (str): name of the test set.\ntestset (Dict[str, str]): test set data.\n\nReturns:\nstr: The id of the test set created.", + "operationId": "create_testset", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTestset" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Testsets"], + "summary": "Delete Testsets", + "description": "Delete specific testsets based on their unique IDs.\n\nArgs:\ntestset_ids (List[str]): The unique identifiers of the testsets to delete.\n\nReturns:\nA list of the deleted testsets' IDs.", + "operationId": "delete_testsets", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTestsets" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Delete Testsets" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/{testset_id}": { + "put": { + "tags": ["Testsets"], + "summary": "Update Testset", + "description": "Update a testset with given id, update the testset in Postgres.\n\nArgs:\ntestset_id (str): id of the test set to be updated.\ncsvdata (NewTestset): New data to replace the old testset.\n\nReturns:\nstr: The id of the test set updated.", + "operationId": "update_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Testset Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTestset" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Testsets"], + "summary": "Get Single Testset", + "description": "Fetch a specific testset in Postgres.\n\nArgs:\n testset_id (str): The id of the testset to fetch.\n\nReturns:\n The requested testset if found, else an HTTPException.", + "operationId": "get_single_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Testset Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/environments/deploy": { + "post": { + "tags": ["Environments"], + "summary": "Deploy To Environment", + "description": "Deploys a given variant to an environment\n\nArgs:\n environment_name: Name of the environment to deploy to.\n variant_id: variant id to deploy.\n\nRaises:\n HTTPException: If the deployment fails.", + "operationId": "deploy_to_environment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeployToEnvironmentPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/bases": { + "get": { + "tags": ["Bases"], + "summary": "List Bases", + "description": "Retrieve a list of bases filtered by app_id and base_name.\n\nArgs:\n request (Request): The incoming request.\n app_id (str): The ID of the app to filter by.\n base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.\n\nReturns:\n List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.\n\nRaises:\n HTTPException: If there was an error retrieving the bases.", + "operationId": "list_bases", + "parameters": [ + { + "name": "app_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "base_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseOutput" + }, + "title": "Response List Bases" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs": { + "get": { + "tags": ["Configs"], + "summary": "Get Config", + "operationId": "get_config", + "parameters": [ + { + "name": "base_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Base Id" + } + }, + { + "name": "config_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Config Name" + } + }, + { + "name": "environment_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConfigResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs/deployment/{deployment_revision_id}": { + "get": { + "tags": ["Configs"], + "summary": "Get Config Deployment Revision", + "operationId": "get_config_deployment_revision", + "parameters": [ + { + "name": "deployment_revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Deployment Revision Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs/deployment/{deployment_revision_id}/revert": { + "post": { + "tags": ["Configs"], + "summary": "Revert Deployment Revision", + "operationId": "revert_deployment_revision", + "parameters": [ + { + "name": "deployment_revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Deployment Revision Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/keys": { + "get": { + "tags": ["Api Keys"], + "summary": "List Api Keys", + "description": "List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.", + "operationId": "list_api_keys", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ListAPIKeysResponse" + }, + "type": "array", + "title": "Response List Api Keys" + } + } + } + } + } + }, + "post": { + "tags": ["Api Keys"], + "summary": "Create Api Key", + "description": "Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.", + "operationId": "create_api_key", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Create Api Key" + } + } + } + } + } + } + }, + "/keys/{key_prefix}": { + "delete": { + "tags": ["Api Keys"], + "summary": "Delete Api Key", + "description": "Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.", + "operationId": "delete_api_key", + "parameters": [ + { + "name": "key_prefix", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Key Prefix" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Delete Api Key" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations": { + "get": { + "tags": ["Organization"], + "summary": "List Organizations", + "description": "Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.", + "operationId": "list_organizations", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Organization" + }, + "type": "array", + "title": "Response List Organizations" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite": { + "post": { + "tags": ["Organization"], + "summary": "Invite User To Organization", + "description": "Assigns a role to a user in an organization.\n\nArgs:\n org_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.", + "operationId": "invite_user_to_workspace", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteRequest" + }, + "title": "Payload" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite/resend": { + "post": { + "tags": ["Organization"], + "summary": "Resend User Invitation To Organization", + "description": "Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200", + "operationId": "resend_invitation", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResendInviteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite/accept": { + "post": { + "tags": ["Organization"], + "summary": "Accept Organization Invitation", + "description": "Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200", + "operationId": "accept_invitation", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "project_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Project Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteToken" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workspaces": { + "get": { + "tags": ["Workspace"], + "summary": "Get Workspace", + "description": "Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.", + "operationId": "get_workspace", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Workspace" + }, + "type": "array", + "title": "Response Get Workspace" + } + } + } + } + } + } + }, + "/workspaces/roles": { + "get": { + "tags": ["Workspace"], + "summary": "Get All Workspace Roles", + "description": "Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.", + "operationId": "get_all_workspace_roles", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array", + "title": "Response Get All Workspace Roles" + } + } + } + } + } + } + }, + "/workspaces/{workspace_id}/users": { + "delete": { + "tags": ["Workspace"], + "summary": "Remove User From Workspace", + "description": "Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.", + "operationId": "remove_user_from_workspace", + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "email", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Email" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/tracing/traces/": { + "put": { + "tags": ["Tracing"], + "summary": "Edit Trace", + "operationId": "edit_trace", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelTracingRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelLinksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": ["Tracing"], + "summary": "Add Trace", + "operationId": "add_trace", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelTracingRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelLinksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/tracing/traces/{trace_id}": { + "get": { + "tags": ["Tracing"], + "summary": "Fetch Trace", + "operationId": "fetch_trace", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "title": "Trace Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oss__src__apis__fastapi__tracing__models__OTelTracingResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Tracing"], + "summary": "Remove Trace", + "operationId": "remove_trace", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "title": "Trace Id" + } + } + ], + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelLinksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/tracing/spans/": { + "post": { + "tags": ["Tracing"], + "summary": "Ingest Spans", + "operationId": "ingest_spans", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelTracingRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelLinksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Tracing"], + "summary": "Query Spans", + "operationId": "query_spans", + "parameters": [ + { + "name": "focus", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Focus" + }, + { + "type": "null" + } + ], + "title": "Focus" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Format" + }, + { + "type": "null" + } + ], + "title": "Format" + } + }, + { + "name": "oldest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Oldest" + } + }, + { + "name": "newest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Newest" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "title": "Filter" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oss__src__apis__fastapi__tracing__models__OTelTracingResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/tracing/spans/ingest": { + "post": { + "tags": ["Tracing"], + "summary": "Ingest Spans", + "operationId": "ingest_spans_rpc", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelTracingRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTelLinksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/tracing/spans/query": { + "post": { + "tags": ["Tracing"], + "summary": "Query Spans", + "operationId": "query_spans_rpc", + "parameters": [ + { + "name": "focus", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Focus" + }, + { + "type": "null" + } + ], + "title": "Focus" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Format" + }, + { + "type": "null" + } + ], + "title": "Format" + } + }, + { + "name": "oldest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Oldest" + } + }, + { + "name": "newest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Newest" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "title": "Filter" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oss__src__apis__fastapi__tracing__models__OTelTracingResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/evaluators/": { + "get": { + "tags": ["Evals"], + "summary": "Query Evaluators", + "operationId": "list_evaluators", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorQueryRequest" + }, + { + "type": "null" + } + ], + "title": "Evaluator Query Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": ["Evals"], + "summary": "Create Evaluator", + "operationId": "create_evaluator", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/evaluators/{evaluator_id}": { + "get": { + "tags": ["Evals"], + "summary": "Fetch Evaluator", + "operationId": "fetch_evaluator", + "parameters": [ + { + "name": "evaluator_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Evaluator Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Evals"], + "summary": "Edit Evaluator", + "operationId": "edit_evaluator", + "parameters": [ + { + "name": "evaluator_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Evaluator Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/evaluators/{evaluator_id}/archive": { + "post": { + "tags": ["Evals"], + "summary": "Archive Evaluator", + "operationId": "archive_evaluator", + "parameters": [ + { + "name": "evaluator_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Evaluator Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/evaluators/{evaluator_id}/unarchive": { + "post": { + "tags": ["Evals"], + "summary": "Unarchive Evaluator", + "operationId": "unarchive_evaluator", + "parameters": [ + { + "name": "evaluator_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Evaluator Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/evaluators/query": { + "post": { + "tags": ["Evals"], + "summary": "Query Evaluators", + "operationId": "query_evaluators", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorQueryRequest" + }, + { + "type": "null" + } + ], + "title": "Evaluator Query Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/annotations/": { + "post": { + "tags": ["Evals"], + "summary": "Create Annotation", + "operationId": "create_annotation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/annotations/{trace_id}/{span_id}": { + "get": { + "tags": ["Evals"], + "summary": "Fetch Annotation", + "operationId": "fetch_annotation", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Trace Id" + } + }, + { + "name": "span_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Span Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Evals"], + "summary": "Delete Annotation", + "operationId": "delete_annotation", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Trace Id" + } + }, + { + "name": "span_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Span Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationLinkResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/annotations/query": { + "post": { + "tags": ["Evals"], + "summary": "Query Annotations", + "operationId": "query_annotations", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationQueryRequest" + }, + { + "type": "null" + } + ], + "title": "Query Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/": { + "post": { + "tags": ["Workflows"], + "summary": "Create Workflow", + "operationId": "create_workflow", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Workflows"], + "summary": "Query Workflows", + "operationId": "list_workflows", + "parameters": [ + { + "name": "workflow_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Workflow Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "workflow_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Workflow Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "workflow_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Workflow Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/{workflow_id}": { + "get": { + "tags": ["Workflows"], + "summary": "Fetch Workflow", + "operationId": "fetch_workflow", + "parameters": [ + { + "name": "artifact_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Artifact Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Workflows"], + "summary": "Edit Workflow", + "operationId": "edit_workflow", + "parameters": [ + { + "name": "workflow_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Workflow Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/{workflow_id}/archive": { + "post": { + "tags": ["Workflows"], + "summary": "Archive Workflow", + "operationId": "archive_workflow", + "parameters": [ + { + "name": "artifact_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Artifact Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/{workflow_id}/unarchive": { + "post": { + "tags": ["Workflows"], + "summary": "Unarchive Workflow", + "operationId": "unarchive_workflow", + "parameters": [ + { + "name": "artifact_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Artifact Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/query": { + "post": { + "tags": ["Workflows"], + "summary": "Query Workflows", + "operationId": "query_workflows", + "parameters": [ + { + "name": "workflow_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Workflow Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "workflow_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Workflow Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "workflow_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Workflow Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/": { + "post": { + "tags": ["Workflows"], + "summary": "Create Workflow Variant", + "operationId": "create_workflow_variant", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Workflows"], + "summary": "Query Workflow Variants", + "operationId": "list_workflow_variants", + "parameters": [ + { + "name": "workflow_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of reference, e.g. {\"key\": value}", + "title": "Workflow Ref" + }, + "description": "JSON string of reference, e.g. {\"key\": value}" + }, + { + "name": "variant_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of reference, e.g. {\"key\": value}", + "title": "Variant Ref" + }, + "description": "JSON string of reference, e.g. {\"key\": value}" + }, + { + "name": "variant_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Variant Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "variant_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Variant Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/{variant_id}": { + "get": { + "tags": ["Workflows"], + "summary": "Fetch Workflow Variant", + "operationId": "fetch_workflow_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Workflows"], + "summary": "Edit Workflow Variant", + "operationId": "edit_workflow_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Variant Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/{variant_id}/archive": { + "post": { + "tags": ["Workflows"], + "summary": "Archive Workflow Variant", + "operationId": "archive_workflow_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/{variant_id}/unarchive": { + "post": { + "tags": ["Workflows"], + "summary": "Unarchive Workflow Variant", + "operationId": "unarchive_workflow_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Variant Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/query": { + "post": { + "tags": ["Workflows"], + "summary": "Query Workflow Variants", + "operationId": "query_workflow_variants", + "parameters": [ + { + "name": "workflow_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of reference, e.g. {\"key\": value}", + "title": "Workflow Ref" + }, + "description": "JSON string of reference, e.g. {\"key\": value}" + }, + { + "name": "variant_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of reference, e.g. {\"key\": value}", + "title": "Variant Ref" + }, + "description": "JSON string of reference, e.g. {\"key\": value}" + }, + { + "name": "variant_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Variant Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "variant_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Variant Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/{variant_id}/commit": { + "post": { + "tags": ["Workflows"], + "summary": "Commit Workflow Revision", + "operationId": "commit_workflow_revision_by_variant_id", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/variants/{variant_id}/fork": { + "post": { + "tags": ["Workflows"], + "summary": "Fork Workflow Variant", + "operationId": "fork_workflow_variant", + "parameters": [ + { + "name": "variant_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + } + }, + { + "name": "revision_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Revision Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/": { + "post": { + "tags": ["Workflows"], + "summary": "Create Workflow Revision", + "operationId": "create_workflow_revision", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["Workflows"], + "summary": "Query Workflow Revisions", + "operationId": "list_workflow_revisions", + "parameters": [ + { + "name": "variant_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Variant Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "revision_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Revision Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "revision_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Revision Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "revision_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Revision Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/{revision_id}": { + "get": { + "tags": ["Workflows"], + "summary": "Fetch Workflow Revision", + "operationId": "fetch_workflow_revision", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_fetch_workflow_revision" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Workflows"], + "summary": "Edit Workflow Revision", + "operationId": "edit_workflow_revision", + "parameters": [ + { + "name": "revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Revision Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/{revision_id}/archive": { + "post": { + "tags": ["Workflows"], + "summary": "Archive Workflow Revision", + "operationId": "archive_workflow_revision_rpc", + "parameters": [ + { + "name": "revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Revision Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/{revision_id}/unarchive": { + "post": { + "tags": ["Workflows"], + "summary": "Unarchive Workflow Revision", + "operationId": "unarchive_workflow_revision_rpc", + "parameters": [ + { + "name": "revision_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Revision Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/query": { + "post": { + "tags": ["Workflows"], + "summary": "Query Workflow Revisions", + "operationId": "query_workflow_revisions", + "parameters": [ + { + "name": "variant_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Variant Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "revision_ref", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of ref, e.g. {\"key\": value}", + "title": "Revision Ref" + }, + "description": "JSON string of ref, e.g. {\"key\": value}" + }, + { + "name": "revision_metadata", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of metadata, e.g. {\"key\": value}", + "title": "Revision Metadata" + }, + "description": "JSON string of metadata, e.g. {\"key\": value}" + }, + { + "name": "revision_flags", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string of flags, e.g. {\"key\": value}", + "title": "Revision Flags" + }, + "description": "JSON string of flags, e.g. {\"key\": value}" + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Archived" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/{revision_id}/fork": { + "post": { + "tags": ["Workflows"], + "summary": "Fork Workflow Variant", + "operationId": "fork_workflow_variant_by_revision_id", + "parameters": [ + { + "name": "revision_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Revision Id" + } + }, + { + "name": "variant_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowVariantResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/commit": { + "post": { + "tags": ["Workflows"], + "summary": "Commit Workflow Revision", + "operationId": "commit_workflow_revision", + "parameters": [ + { + "name": "variant_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/base/workflows/revisions/log": { + "post": { + "tags": ["Workflows"], + "summary": "Log Workflow Revisions", + "operationId": "log_workflow_revisions", + "parameters": [ + { + "name": "depth", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Depth" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_log_workflow_revisions" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRevisionsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/": { + "get": { + "tags": ["Testsets"], + "summary": "Query Testsets", + "operationId": "list_testsets", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/TagsRequest" + }, + { + "type": "null" + } + ], + "title": "Metadata Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": ["Testsets"], + "summary": "Create Testset", + "operationId": "create_testset", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/{testset_id}": { + "get": { + "tags": ["Testsets"], + "summary": "Fetch Testset", + "operationId": "fetch_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Testsets"], + "summary": "Edit Testset", + "operationId": "edit_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/{testset_id}/archive": { + "post": { + "tags": ["Testsets"], + "summary": "Archive Testset", + "operationId": "archive_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/{testset_id}/unarchive": { + "post": { + "tags": ["Testsets"], + "summary": "Unarchive Testset", + "operationId": "unarchive_testset", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/query": { + "post": { + "tags": ["Testsets"], + "summary": "Query Testsets", + "operationId": "query_testsets", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/TagsRequest" + }, + { + "type": "null" + } + ], + "title": "Metadata Request" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/upload": { + "post": { + "tags": ["Testsets"], + "summary": "Create Testset From File", + "operationId": "create_testset_from_file", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_create_testset_from_file" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/{testset_id}/upload": { + "post": { + "tags": ["Testsets"], + "summary": "Update Testset From File", + "operationId": "update_testset_from_file", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_update_testset_from_file" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/{testset_id}/download": { + "post": { + "tags": ["Testsets"], + "summary": "Fetch Testset To File", + "operationId": "fetch_testset_to_file", + "parameters": [ + { + "name": "testset_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "title": "Testset Id" + } + }, + { + "name": "file_type", + "in": "query", + "required": false, + "schema": { + "enum": ["CSV", "JSON"], + "type": "string", + "title": "File Type" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestsetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/preview/testsets/testcases/{testcase_id}": { + "get": { + "tags": ["Testsets"], + "summary": "Fetch Testcase", + "operationId": "fetch_testcase", + "parameters": [ + { + "name": "testcase_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Testcase Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestcaseResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/otlp/v1/traces": { + "post": { + "tags": ["Observability"], + "summary": "Receive /v1/traces via OTLP", + "description": "Receive traces via OTLP.", + "operationId": "otlp_v1_traces", + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectStatusResponse" + } + } + } + } + } + } + }, + "/observability/v1/otlp/traces": { + "get": { + "tags": ["Observability"], + "summary": "Status of OTLP endpoint", + "description": "Status of OTLP endpoint.", + "operationId": "otlp_status", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectStatusResponse" + } + } + } + } + } + }, + "post": { + "tags": ["Observability"], + "summary": "Receive traces via OTLP", + "description": "Receive traces via OTLP.", + "operationId": "otlp_receiver", + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectStatusResponse" + } + } + } + } + } + } + }, + "/observability/v1/traces": { + "get": { + "tags": ["Observability"], + "summary": "Query traces, with optional grouping, windowing, filtering, and pagination.", + "description": "Query traces, with optional grouping, windowing, filtering, and pagination.", + "operationId": "query_traces", + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": ["opentelemetry", "agenta"], + "type": "string", + "default": "agenta", + "title": "Format" + } + }, + { + "name": "focus", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Focus" + } + }, + { + "name": "oldest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Oldest" + } + }, + { + "name": "newest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Newest" + } + }, + { + "name": "filtering", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filtering" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Page" + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Size" + } + }, + { + "name": "next", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next" + } + }, + { + "name": "stop", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stop" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__apis__fastapi__observability__models__OTelTracingResponse" + }, + { + "$ref": "#/components/schemas/AgentaNodesResponse" + }, + { + "$ref": "#/components/schemas/AgentaTreesResponse" + }, + { + "$ref": "#/components/schemas/AgentaRootsResponse" + } + ], + "title": "Response Query Traces" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Observability"], + "summary": "Delete traces", + "description": "Delete trace.", + "operationId": "delete_traces", + "parameters": [ + { + "name": "node_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid", + "title": "Node Id" + } + }, + { + "name": "node_ids", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "title": "Node Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectStatusResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/v1/analytics": { + "get": { + "tags": ["Observability"], + "summary": "Query analytics, with optional grouping, windowing, filtering.", + "operationId": "query_analytics", + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": ["legacy", "agenta"], + "type": "string", + "default": "agenta", + "title": "Format" + } + }, + { + "name": "focus", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Focus" + } + }, + { + "name": "oldest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Oldest" + } + }, + { + "name": "newest", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Newest" + } + }, + { + "name": "window", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Window" + } + }, + { + "name": "filtering", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filtering" + } + }, + { + "name": "timeRange", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Timerange" + } + }, + { + "name": "app_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Id" + } + }, + { + "name": "environment", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Environment" + } + }, + { + "name": "variant", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Variant" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacyAnalyticsResponse" + }, + { + "$ref": "#/components/schemas/AnalyticsResponse" + } + ], + "title": "Response Query Analytics" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/v1/traces/{trace_id}": { + "get": { + "tags": ["Observability"], + "summary": "Fetch trace by ID.", + "description": "Fetch trace by ID.", + "operationId": "fetch_trace_by_id", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "title": "Trace Id" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": ["opentelemetry", "agenta"], + "type": "string", + "default": "openetelemetry", + "title": "Format" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__apis__fastapi__observability__models__OTelTracingResponse" + }, + { + "$ref": "#/components/schemas/AgentaNodesResponse" + }, + { + "$ref": "#/components/schemas/AgentaTreesResponse" + }, + { + "$ref": "#/components/schemas/AgentaRootsResponse" + } + ], + "title": "Response Fetch Trace By Id" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/vault/v1/secrets": { + "get": { + "tags": ["Vault"], + "summary": "List Secrets", + "operationId": "list_secrets", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SecretResponseDTO" + }, + "type": "array", + "title": "Response List Secrets" + } + } + } + } + } + }, + "post": { + "tags": ["Vault"], + "summary": "Create Secret", + "operationId": "create_secret", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSecretDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretResponseDTO" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/vault/v1/secrets/{secret_id}": { + "get": { + "tags": ["Vault"], + "summary": "Read Secret", + "operationId": "read_secret", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretResponseDTO" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["Vault"], + "summary": "Update Secret", + "operationId": "update_secret", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSecretDTO" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretResponseDTO" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["Vault"], + "summary": "Delete Secret", + "operationId": "delete_secret", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AccountRequest": { + "properties": { + "user": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacyUserRequest" + }, + { + "type": "null" + } + ] + }, + "scope": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacyScopeRequest" + }, + { + "type": "null" + } + ] + }, + "subscription": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacySubscriptionRequest" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "AccountRequest" + }, + "AccountResponse": { + "properties": { + "user": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacyUserResponse" + }, + { + "type": "null" + } + ] + }, + "scopes": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LegacyScopesResponse" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Scopes" + } + }, + "type": "object", + "title": "AccountResponse" + }, + "AddVariantFromBasePayload": { + "properties": { + "base_id": { + "type": "string", + "title": "Base Id" + }, + "new_variant_name": { + "type": "string", + "title": "New Variant Name" + }, + "new_config_name": { + "type": "string", + "title": "New Config Name" + }, + "parameters": { + "additionalProperties": true, + "type": "object", + "title": "Parameters" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + } + }, + "type": "object", + "required": ["base_id", "new_variant_name", "new_config_name", "parameters"], + "title": "AddVariantFromBasePayload" + }, + "AddVariantFromKeyPayload": { + "properties": { + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "key": { + "type": "string", + "title": "Key" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "base_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Name" + }, + "config_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Config Name" + } + }, + "type": "object", + "required": ["variant_name", "key"], + "title": "AddVariantFromKeyPayload" + }, + "AddVariantFromURLPayload": { + "properties": { + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "url": { + "type": "string", + "title": "Url" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "base_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Name" + }, + "config_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Config Name" + } + }, + "type": "object", + "required": ["variant_name", "url"], + "title": "AddVariantFromURLPayload" + }, + "AgentaNodeDTO": { + "properties": { + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__LifecycleDTO" + }, + { + "type": "null" + } + ] + }, + "root": { + "$ref": "#/components/schemas/RootDTO" + }, + "tree": { + "$ref": "#/components/schemas/TreeDTO" + }, + "node": { + "$ref": "#/components/schemas/NodeDTO" + }, + "parent": { + "anyOf": [ + { + "$ref": "#/components/schemas/ParentDTO" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/components/schemas/TimeDTO" + }, + "status": { + "$ref": "#/components/schemas/StatusDTO" + }, + "exception": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExceptionDTO" + }, + { + "type": "null" + } + ] + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Data" + }, + "metrics": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metrics" + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "refs": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Refs" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LinkDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "otel": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelExtraDTO" + }, + { + "type": "null" + } + ] + }, + "nodes": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpanDTO" + }, + { + "items": { + "$ref": "#/components/schemas/SpanDTO" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Nodes" + } + }, + "type": "object", + "required": ["trace_id", "span_id", "root", "tree", "node", "time", "status"], + "title": "AgentaNodeDTO" + }, + "AgentaNodesResponse": { + "properties": { + "nodes": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/AgentaNodeDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Nodes", + "default": [] + }, + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count" + } + }, + "type": "object", + "required": ["version"], + "title": "AgentaNodesResponse" + }, + "AgentaRootDTO": { + "properties": { + "root": { + "$ref": "#/components/schemas/RootDTO" + }, + "trees": { + "items": { + "$ref": "#/components/schemas/AgentaTreeDTO" + }, + "type": "array", + "title": "Trees" + } + }, + "type": "object", + "required": ["root", "trees"], + "title": "AgentaRootDTO" + }, + "AgentaRootsResponse": { + "properties": { + "roots": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/AgentaRootDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Roots", + "default": [] + }, + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count" + } + }, + "type": "object", + "required": ["version"], + "title": "AgentaRootsResponse" + }, + "AgentaTreeDTO": { + "properties": { + "tree": { + "$ref": "#/components/schemas/TreeDTO" + }, + "nodes": { + "items": { + "$ref": "#/components/schemas/AgentaNodeDTO" + }, + "type": "array", + "title": "Nodes" + } + }, + "type": "object", + "required": ["tree", "nodes"], + "title": "AgentaTreeDTO" + }, + "AgentaTreesResponse": { + "properties": { + "trees": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/AgentaTreeDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Trees", + "default": [] + }, + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count" + } + }, + "type": "object", + "required": ["version"], + "title": "AgentaTreesResponse" + }, + "AggregatedResult": { + "properties": { + "evaluator_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorConfig" + }, + { + "additionalProperties": true, + "type": "object" + } + ], + "title": "Evaluator Config" + }, + "result": { + "$ref": "#/components/schemas/Result" + } + }, + "type": "object", + "required": ["evaluator_config", "result"], + "title": "AggregatedResult" + }, + "AnalyticsResponse": { + "properties": { + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count" + }, + "buckets": { + "items": { + "$ref": "#/components/schemas/BucketDTO" + }, + "type": "array", + "title": "Buckets" + } + }, + "type": "object", + "required": ["version", "buckets"], + "title": "AnalyticsResponse" + }, + "Annotation": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "kind": { + "$ref": "#/components/schemas/AnnotationKind", + "default": "custom" + }, + "source": { + "$ref": "#/components/schemas/AnnotationSource", + "default": "api" + }, + "data": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object", + "title": "Data" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "references": { + "$ref": "#/components/schemas/AnnotationReferences-Output" + }, + "links": { + "additionalProperties": { + "$ref": "#/components/schemas/AnnotationLink-Output" + }, + "type": "object", + "title": "Links" + } + }, + "type": "object", + "required": ["span_id", "trace_id", "data", "references", "links"], + "title": "Annotation" + }, + "AnnotationCreate": { + "properties": { + "kind": { + "$ref": "#/components/schemas/AnnotationKind", + "default": "custom" + }, + "source": { + "$ref": "#/components/schemas/AnnotationSource", + "default": "api" + }, + "data": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object", + "title": "Data" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "references": { + "$ref": "#/components/schemas/AnnotationReferences-Input" + }, + "links": { + "additionalProperties": { + "$ref": "#/components/schemas/AnnotationLink-Input" + }, + "type": "object", + "title": "Links" + } + }, + "type": "object", + "required": ["data", "references", "links"], + "title": "AnnotationCreate" + }, + "AnnotationCreateRequest": { + "properties": { + "annotation": { + "$ref": "#/components/schemas/AnnotationCreate" + } + }, + "type": "object", + "required": ["annotation"], + "title": "AnnotationCreateRequest" + }, + "AnnotationKind": { + "type": "string", + "enum": ["custom", "human", "auto"], + "title": "AnnotationKind" + }, + "AnnotationLink-Input": { + "properties": { + "span_id": { + "type": "string", + "title": "Span Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "attributes": { + "additionalProperties": true, + "type": "object", + "title": "Attributes" + } + }, + "type": "object", + "required": ["span_id", "trace_id"], + "title": "AnnotationLink" + }, + "AnnotationLink-Output": { + "properties": { + "span_id": { + "type": "string", + "title": "Span Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + } + }, + "type": "object", + "required": ["span_id", "trace_id"], + "title": "AnnotationLink" + }, + "AnnotationLinkResponse": { + "properties": { + "annotation": { + "$ref": "#/components/schemas/AnnotationLink-Output" + } + }, + "type": "object", + "required": ["annotation"], + "title": "AnnotationLinkResponse" + }, + "AnnotationQuery": { + "properties": { + "trace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trace Id" + }, + "span_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Span Id" + }, + "kind": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationKind" + }, + { + "type": "null" + } + ], + "default": "custom" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationSource" + }, + { + "type": "null" + } + ], + "default": "api" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "references": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationReferences-Input" + }, + { + "type": "null" + } + ] + }, + "links": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/AnnotationLink-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "title": "AnnotationQuery" + }, + "AnnotationQueryRequest": { + "properties": { + "annotation": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationQuery" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "AnnotationQueryRequest" + }, + "AnnotationReference-Input": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "attributes": { + "additionalProperties": true, + "type": "object", + "title": "Attributes" + } + }, + "type": "object", + "title": "AnnotationReference" + }, + "AnnotationReference-Output": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + } + }, + "type": "object", + "title": "AnnotationReference" + }, + "AnnotationReferences-Input": { + "properties": { + "evaluator": { + "$ref": "#/components/schemas/AnnotationReference-Input" + }, + "testset": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationReference-Input" + }, + { + "type": "null" + } + ] + }, + "testcase": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationReference-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["evaluator"], + "title": "AnnotationReferences" + }, + "AnnotationReferences-Output": { + "properties": { + "evaluator": { + "$ref": "#/components/schemas/AnnotationReference-Output" + }, + "testset": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationReference-Output" + }, + { + "type": "null" + } + ] + }, + "testcase": { + "anyOf": [ + { + "$ref": "#/components/schemas/AnnotationReference-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["evaluator"], + "title": "AnnotationReferences" + }, + "AnnotationResponse": { + "properties": { + "annotation": { + "anyOf": [ + { + "$ref": "#/components/schemas/Annotation" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "AnnotationResponse" + }, + "AnnotationSource": { + "type": "string", + "enum": ["web", "sdk", "api"], + "title": "AnnotationSource" + }, + "AnnotationsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "oldest": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Oldest" + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + }, + "annotations": { + "items": { + "$ref": "#/components/schemas/Annotation" + }, + "type": "array", + "title": "Annotations", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "AnnotationsResponse" + }, + "App": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + }, + "app_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Type" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + } + }, + "type": "object", + "required": ["app_id", "app_name", "updated_at"], + "title": "App" + }, + "AppVariantResponse_": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "base_name": { + "type": "string", + "title": "Base Name" + }, + "base_id": { + "type": "string", + "title": "Base Id" + }, + "config_name": { + "type": "string", + "title": "Config Name" + }, + "uri": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Uri" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "created_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "modified_by_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Modified By Id" + }, + "organization_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "app_id", + "app_name", + "variant_id", + "variant_name", + "project_id", + "base_name", + "base_id", + "config_name", + "revision" + ], + "title": "AppVariantResponse_" + }, + "AppVariantRevision": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "modified_by": { + "type": "string", + "title": "Modified By" + }, + "config": { + "$ref": "#/components/schemas/ConfigDB" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + } + }, + "type": "object", + "required": ["revision", "modified_by", "config", "created_at"], + "title": "AppVariantRevision" + }, + "Artifact-Input": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Flags" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "Artifact" + }, + "Artifact-Output": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Flags" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "Artifact" + }, + "BaseOutput": { + "properties": { + "base_id": { + "type": "string", + "title": "Base Id" + }, + "base_name": { + "type": "string", + "title": "Base Name" + } + }, + "type": "object", + "required": ["base_id", "base_name"], + "title": "BaseOutput" + }, + "Body_configs_add": { + "properties": { + "variant_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + "application_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + } + }, + "type": "object", + "required": ["variant_ref", "application_ref"], + "title": "Body_configs_add" + }, + "Body_configs_delete": { + "properties": { + "variant_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["variant_ref"], + "title": "Body_configs_delete" + }, + "Body_configs_deploy": { + "properties": { + "variant_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + "environment_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["variant_ref", "environment_ref"], + "title": "Body_configs_deploy" + }, + "Body_configs_fetch": { + "properties": { + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + }, + "environment_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Body_configs_fetch" + }, + "Body_configs_fork": { + "properties": { + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + }, + "environment_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Body_configs_fork" + }, + "Body_configs_history": { + "properties": { + "variant_ref": { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceRequestModel" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["variant_ref"], + "title": "Body_configs_history" + }, + "Body_create_testset_from_file": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File" + }, + "file_type": { + "type": "string", + "enum": ["CSV", "JSON"], + "title": "File Type" + }, + "testset_slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Slug" + }, + "testset_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Name" + }, + "testset_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Description" + }, + "testset_metadata": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Testset Metadata" + } + }, + "type": "object", + "required": ["file"], + "title": "Body_create_testset_from_file" + }, + "Body_fetch_workflow_revision": { + "properties": { + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__Reference" + }, + { + "type": "null" + } + ] + }, + "revision_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__Reference" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Body_fetch_workflow_revision" + }, + "Body_import_testset": { + "properties": { + "endpoint": { + "type": "string", + "title": "Endpoint" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + } + }, + "type": "object", + "title": "Body_import_testset" + }, + "Body_log_workflow_revisions": { + "properties": { + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__Reference" + }, + { + "type": "null" + } + ] + }, + "revision_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__Reference" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Body_log_workflow_revisions" + }, + "Body_update_testset_from_file": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File" + }, + "file_type": { + "type": "string", + "enum": ["CSV", "JSON"], + "title": "File Type" + } + }, + "type": "object", + "required": ["file"], + "title": "Body_update_testset_from_file" + }, + "Body_upload_file": { + "properties": { + "upload_type": { + "type": "string", + "title": "Upload Type" + }, + "file": { + "type": "string", + "format": "binary", + "title": "File" + }, + "testset_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Name" + } + }, + "type": "object", + "required": ["file"], + "title": "Body_upload_file" + }, + "BucketDTO": { + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "window": { + "type": "integer", + "title": "Window" + }, + "total": { + "$ref": "#/components/schemas/MetricsDTO" + }, + "error": { + "$ref": "#/components/schemas/MetricsDTO" + } + }, + "type": "object", + "required": ["timestamp", "window", "total", "error"], + "title": "BucketDTO" + }, + "CollectStatusResponse": { + "properties": { + "version": { + "type": "string", + "title": "Version" + }, + "status": { + "type": "string", + "title": "Status" + } + }, + "type": "object", + "required": ["version", "status"], + "title": "CollectStatusResponse" + }, + "ConfigDB": { + "properties": { + "config_name": { + "type": "string", + "title": "Config Name" + }, + "parameters": { + "additionalProperties": true, + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": ["config_name"], + "title": "ConfigDB" + }, + "ConfigDTO": { + "properties": { + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "service_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "environment_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "application_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/LifecycleDTO-Input" + }, + { + "type": "null" + } + ] + }, + "service_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/LifecycleDTO-Input" + }, + { + "type": "null" + } + ] + }, + "variant_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/LifecycleDTO-Input" + }, + { + "type": "null" + } + ] + }, + "environment_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/LifecycleDTO-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["params"], + "title": "ConfigDTO" + }, + "ConfigRequest": { + "properties": { + "config": { + "$ref": "#/components/schemas/ConfigDTO" + } + }, + "type": "object", + "required": ["config"], + "title": "ConfigRequest" + }, + "ConfigResponseModel": { + "properties": { + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "application_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "service_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "variant_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "environment_ref": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReferenceDTO" + }, + { + "type": "null" + } + ] + }, + "application_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__services__variants_manager__LifecycleDTO" + }, + { + "type": "null" + } + ] + }, + "service_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__services__variants_manager__LifecycleDTO" + }, + { + "type": "null" + } + ] + }, + "variant_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__services__variants_manager__LifecycleDTO" + }, + { + "type": "null" + } + ] + }, + "environment_lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__services__variants_manager__LifecycleDTO" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["params"], + "title": "ConfigResponseModel" + }, + "CorrectAnswer": { + "properties": { + "key": { + "type": "string", + "title": "Key" + }, + "value": { + "type": "string", + "title": "Value" + } + }, + "type": "object", + "required": ["key", "value"], + "title": "CorrectAnswer" + }, + "CreateAppOutput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + } + }, + "type": "object", + "required": ["app_id", "app_name"], + "title": "CreateAppOutput" + }, + "CreateApp_": { + "properties": { + "app_name": { + "type": "string", + "title": "App Name" + }, + "template_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Template Key" + }, + "project_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Project Id" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + }, + "organization_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + } + }, + "type": "object", + "required": ["app_name"], + "title": "CreateApp_" + }, + "CreateSecretDTO": { + "properties": { + "header": { + "$ref": "#/components/schemas/Header" + }, + "secret": { + "$ref": "#/components/schemas/SecretDTO" + } + }, + "type": "object", + "required": ["header", "secret"], + "title": "CreateSecretDTO" + }, + "CreateWorkspace": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type" + } + }, + "type": "object", + "required": ["name"], + "title": "CreateWorkspace" + }, + "CustomModelSettingsDTO": { + "properties": { + "slug": { + "type": "string", + "title": "Slug" + }, + "extras": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extras" + } + }, + "type": "object", + "required": ["slug"], + "title": "CustomModelSettingsDTO" + }, + "CustomProviderDTO": { + "properties": { + "kind": { + "$ref": "#/components/schemas/CustomProviderKind" + }, + "provider": { + "$ref": "#/components/schemas/CustomProviderSettingsDTO" + }, + "models": { + "items": { + "$ref": "#/components/schemas/CustomModelSettingsDTO" + }, + "type": "array", + "title": "Models" + }, + "provider_slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Slug" + }, + "model_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Model Keys" + } + }, + "type": "object", + "required": ["kind", "provider", "models"], + "title": "CustomProviderDTO" + }, + "CustomProviderKind": { + "type": "string", + "enum": [ + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini" + ], + "title": "CustomProviderKind" + }, + "CustomProviderSettingsDTO": { + "properties": { + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key" + }, + "extras": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extras" + } + }, + "type": "object", + "title": "CustomProviderSettingsDTO" + }, + "DeleteEvaluation": { + "properties": { + "evaluations_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Evaluations Ids" + } + }, + "type": "object", + "required": ["evaluations_ids"], + "title": "DeleteEvaluation" + }, + "DeleteTestsets": { + "properties": { + "testset_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Testset Ids" + } + }, + "type": "object", + "required": ["testset_ids"], + "title": "DeleteTestsets" + }, + "DeployToEnvironmentPayload": { + "properties": { + "environment_name": { + "type": "string", + "title": "Environment Name" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + } + }, + "type": "object", + "required": ["environment_name", "variant_id"], + "title": "DeployToEnvironmentPayload" + }, + "EntitiesRequestModel": { + "properties": { + "users": { + "additionalProperties": { + "$ref": "#/components/schemas/UserRequest" + }, + "type": "object", + "title": "Users" + }, + "organizations": { + "additionalProperties": { + "$ref": "#/components/schemas/OrganizationRequest" + }, + "type": "object", + "title": "Organizations" + }, + "workspaces": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkspaceRequest" + }, + "type": "object", + "title": "Workspaces" + }, + "projects": { + "additionalProperties": { + "$ref": "#/components/schemas/ProjectRequest" + }, + "type": "object", + "title": "Projects" + }, + "organization_memberships": { + "additionalProperties": { + "$ref": "#/components/schemas/OrganizationMembershipRequest" + }, + "type": "object", + "title": "Organization Memberships" + }, + "workspace_memberships": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkspaceMembershipRequest" + }, + "type": "object", + "title": "Workspace Memberships" + }, + "project_memberships": { + "additionalProperties": { + "$ref": "#/components/schemas/ProjectMembershipRequest" + }, + "type": "object", + "title": "Project Memberships" + } + }, + "type": "object", + "required": [ + "users", + "organizations", + "workspaces", + "projects", + "organization_memberships", + "workspace_memberships", + "project_memberships" + ], + "title": "EntitiesRequestModel" + }, + "EnvironmentOutputExtended_": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "deployed_app_variant_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed App Variant Id" + }, + "deployed_variant_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed Variant Name" + }, + "deployed_app_variant_revision_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed App Variant Revision Id" + }, + "revision": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Revision" + }, + "revisions": { + "items": { + "$ref": "#/components/schemas/EnvironmentRevision" + }, + "type": "array", + "title": "Revisions" + }, + "organization_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "name", + "app_id", + "project_id", + "deployed_app_variant_id", + "deployed_variant_name", + "deployed_app_variant_revision_id", + "revision", + "revisions" + ], + "title": "EnvironmentOutputExtended_" + }, + "EnvironmentOutput_": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "deployed_app_variant_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed App Variant Id" + }, + "deployed_variant_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed Variant Name" + }, + "deployed_app_variant_revision_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed App Variant Revision Id" + }, + "revision": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Revision" + }, + "organization_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "name", + "app_id", + "project_id", + "deployed_app_variant_id", + "deployed_variant_name", + "deployed_app_variant_revision_id", + "revision" + ], + "title": "EnvironmentOutput_" + }, + "EnvironmentRevision": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "modified_by": { + "type": "string", + "title": "Modified By" + }, + "deployed_app_variant_revision": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed App Variant Revision" + }, + "deployment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployment" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "deployed_variant_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deployed Variant Name" + } + }, + "type": "object", + "required": ["id", "revision", "modified_by", "created_at"], + "title": "EnvironmentRevision" + }, + "Error": { + "properties": { + "message": { + "type": "string", + "title": "Message" + }, + "stacktrace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stacktrace" + } + }, + "type": "object", + "required": ["message"], + "title": "Error" + }, + "Evaluation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "variant_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Names" + }, + "variant_revision_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Revision Ids" + }, + "revisions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Revisions" + }, + "testset_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Id" + }, + "testset_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Testset Name" + }, + "status": { + "$ref": "#/components/schemas/Result" + }, + "aggregated_results": { + "items": { + "$ref": "#/components/schemas/AggregatedResult" + }, + "type": "array", + "title": "Aggregated Results" + }, + "average_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Result" + }, + { + "type": "null" + } + ] + }, + "total_cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Result" + }, + { + "type": "null" + } + ] + }, + "average_latency": { + "anyOf": [ + { + "$ref": "#/components/schemas/Result" + }, + { + "type": "null" + } + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "variant_ids", + "variant_names", + "variant_revision_ids", + "revisions", + "status", + "aggregated_results", + "created_at", + "updated_at" + ], + "title": "Evaluation" + }, + "EvaluationScenario": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "evaluation_id": { + "type": "string", + "title": "Evaluation Id" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioInput" + }, + "type": "array", + "title": "Inputs" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioOutput" + }, + "type": "array", + "title": "Outputs" + }, + "correct_answers": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/CorrectAnswer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Correct Answers" + }, + "is_pinned": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Pinned" + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note" + }, + "results": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioResult" + }, + "type": "array", + "title": "Results" + } + }, + "type": "object", + "required": ["evaluation_id", "inputs", "outputs", "results"], + "title": "EvaluationScenario" + }, + "EvaluationScenarioInput": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "title": "Type" + }, + "value": { + "title": "Value" + } + }, + "type": "object", + "required": ["name", "type", "value"], + "title": "EvaluationScenarioInput" + }, + "EvaluationScenarioOutput": { + "properties": { + "result": { + "$ref": "#/components/schemas/Result" + }, + "cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cost" + }, + "latency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Latency" + } + }, + "type": "object", + "required": ["result"], + "title": "EvaluationScenarioOutput" + }, + "EvaluationScenarioResult": { + "properties": { + "evaluator_config": { + "type": "string", + "title": "Evaluator Config" + }, + "result": { + "$ref": "#/components/schemas/Result" + } + }, + "type": "object", + "required": ["evaluator_config", "result"], + "title": "EvaluationScenarioResult" + }, + "EvaluationScenarioScoreUpdate": { + "properties": { + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": ["score"], + "title": "EvaluationScenarioScoreUpdate" + }, + "EvaluationStatusEnum": { + "type": "string", + "enum": [ + "EVALUATION_INITIALIZED", + "EVALUATION_STARTED", + "EVALUATION_FINISHED", + "EVALUATION_FINISHED_WITH_ERRORS", + "EVALUATION_FAILED", + "EVALUATION_AGGREGATION_FAILED" + ], + "title": "EvaluationStatusEnum" + }, + "EvaluationType": { + "type": "string", + "enum": ["human_a_b_testing", "single_model_test"], + "title": "EvaluationType" + }, + "Evaluator-Input": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowData" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Evaluator" + }, + "EvaluatorConfig": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "evaluator_key": { + "type": "string", + "title": "Evaluator Key" + }, + "settings_values": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Settings Values" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + } + }, + "type": "object", + "required": ["id", "name", "project_id", "evaluator_key", "created_at", "updated_at"], + "title": "EvaluatorConfig" + }, + "EvaluatorInputInterface": { + "properties": { + "inputs": { + "additionalProperties": true, + "type": "object", + "title": "Inputs" + }, + "settings": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Settings" + }, + "credentials": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Credentials" + } + }, + "type": "object", + "title": "EvaluatorInputInterface" + }, + "EvaluatorMappingInputInterface": { + "properties": { + "inputs": { + "additionalProperties": true, + "type": "object", + "title": "Inputs" + }, + "mapping": { + "additionalProperties": true, + "type": "object", + "title": "Mapping" + } + }, + "type": "object", + "required": ["inputs", "mapping"], + "title": "EvaluatorMappingInputInterface" + }, + "EvaluatorMappingOutputInterface": { + "properties": { + "outputs": { + "additionalProperties": true, + "type": "object", + "title": "Outputs" + } + }, + "type": "object", + "required": ["outputs"], + "title": "EvaluatorMappingOutputInterface" + }, + "EvaluatorOutputInterface": { + "properties": { + "outputs": { + "additionalProperties": true, + "type": "object", + "title": "Outputs" + } + }, + "type": "object", + "required": ["outputs"], + "title": "EvaluatorOutputInterface" + }, + "EvaluatorQueryRequest": { + "properties": { + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object", + "title": "Metadata" + } + }, + "type": "object", + "required": ["metadata"], + "title": "EvaluatorQueryRequest" + }, + "EvaluatorRequest": { + "properties": { + "evaluator": { + "$ref": "#/components/schemas/Evaluator-Input" + } + }, + "type": "object", + "required": ["evaluator"], + "title": "EvaluatorRequest" + }, + "EvaluatorResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "evaluator": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__apis__fastapi__evaluators__models__Evaluator-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["count"], + "title": "EvaluatorResponse" + }, + "EvaluatorsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "evaluator": { + "items": { + "$ref": "#/components/schemas/oss__src__apis__fastapi__evaluators__models__Evaluator-Output" + }, + "type": "array", + "title": "Evaluator", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "EvaluatorsResponse" + }, + "ExceptionDTO": { + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "type": { + "type": "string", + "title": "Type" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "stacktrace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stacktrace" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["timestamp", "type"], + "title": "ExceptionDTO" + }, + "Focus": { + "type": "string", + "enum": ["trace", "span"], + "title": "Focus" + }, + "Format": { + "type": "string", + "enum": ["agenta", "opentelemetry"], + "title": "Format" + }, + "FullJson-Input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "FullJson-Output": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "GetConfigResponse": { + "properties": { + "config_name": { + "type": "string", + "title": "Config Name" + }, + "current_version": { + "type": "integer", + "title": "Current Version" + }, + "parameters": { + "additionalProperties": true, + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": ["config_name", "current_version", "parameters"], + "title": "GetConfigResponse" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "Header": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + } + }, + "type": "object", + "title": "Header" + }, + "HumanEvaluation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "evaluation_type": { + "type": "string", + "title": "Evaluation Type" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "variant_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Names" + }, + "variants_revision_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variants Revision Ids" + }, + "revisions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Revisions" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + }, + "status": { + "type": "string", + "title": "Status" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "project_id", + "evaluation_type", + "variant_ids", + "variant_names", + "variants_revision_ids", + "revisions", + "testset_id", + "testset_name", + "status", + "created_at", + "updated_at" + ], + "title": "HumanEvaluation" + }, + "HumanEvaluationScenario": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "evaluation_id": { + "type": "string", + "title": "Evaluation Id" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioInput" + }, + "type": "array", + "title": "Inputs" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioOutput" + }, + "type": "array", + "title": "Outputs" + }, + "vote": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Vote" + }, + "score": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Score" + }, + "correct_answer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Correct Answer" + }, + "is_pinned": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Pinned" + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note" + } + }, + "type": "object", + "required": ["evaluation_id", "inputs", "outputs"], + "title": "HumanEvaluationScenario" + }, + "HumanEvaluationScenarioInput": { + "properties": { + "input_name": { + "type": "string", + "title": "Input Name" + }, + "input_value": { + "type": "string", + "title": "Input Value" + } + }, + "type": "object", + "required": ["input_name", "input_value"], + "title": "HumanEvaluationScenarioInput" + }, + "HumanEvaluationScenarioOutput": { + "properties": { + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_output": { + "type": "string", + "title": "Variant Output" + } + }, + "type": "object", + "required": ["variant_id", "variant_output"], + "title": "HumanEvaluationScenarioOutput" + }, + "HumanEvaluationScenarioUpdate": { + "properties": { + "vote": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Vote" + }, + "score": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Score" + }, + "correct_answer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Correct Answer" + }, + "outputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioOutput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Outputs" + }, + "inputs": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioInput" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Inputs" + }, + "is_pinned": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Pinned" + }, + "note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Note" + } + }, + "type": "object", + "title": "HumanEvaluationScenarioUpdate" + }, + "HumanEvaluationUpdate": { + "properties": { + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluationStatusEnum" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "HumanEvaluationUpdate" + }, + "InviteRequest": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "roles": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Roles" + } + }, + "type": "object", + "required": ["email"], + "title": "InviteRequest" + }, + "InviteToken": { + "properties": { + "token": { + "type": "string", + "title": "Token" + }, + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "required": ["token", "email"], + "title": "InviteToken" + }, + "LLMRunRateLimit": { + "properties": { + "batch_size": { + "type": "integer", + "title": "Batch Size" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries" + }, + "retry_delay": { + "type": "integer", + "title": "Retry Delay" + }, + "delay_between_batches": { + "type": "integer", + "title": "Delay Between Batches" + } + }, + "type": "object", + "required": ["batch_size", "max_retries", "retry_delay", "delay_between_batches"], + "title": "LLMRunRateLimit" + }, + "LegacyAnalyticsResponse": { + "properties": { + "total_count": { + "type": "integer", + "title": "Total Count" + }, + "failure_rate": { + "type": "number", + "title": "Failure Rate" + }, + "total_cost": { + "type": "number", + "title": "Total Cost" + }, + "avg_cost": { + "type": "number", + "title": "Avg Cost" + }, + "avg_latency": { + "type": "number", + "title": "Avg Latency" + }, + "total_tokens": { + "type": "integer", + "title": "Total Tokens" + }, + "avg_tokens": { + "type": "number", + "title": "Avg Tokens" + }, + "data": { + "items": { + "$ref": "#/components/schemas/LegacyDataPoint" + }, + "type": "array", + "title": "Data" + } + }, + "type": "object", + "required": [ + "total_count", + "failure_rate", + "total_cost", + "avg_cost", + "avg_latency", + "total_tokens", + "avg_tokens", + "data" + ], + "title": "LegacyAnalyticsResponse" + }, + "LegacyDataPoint": { + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "success_count": { + "type": "integer", + "title": "Success Count" + }, + "failure_count": { + "type": "integer", + "title": "Failure Count" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "latency": { + "type": "number", + "title": "Latency" + }, + "total_tokens": { + "type": "integer", + "title": "Total Tokens" + } + }, + "type": "object", + "required": ["timestamp", "success_count", "failure_count", "cost", "latency", "total_tokens"], + "title": "LegacyDataPoint" + }, + "LegacyScopeRequest": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + } + }, + "type": "object", + "title": "LegacyScopeRequest" + }, + "LegacyScopesResponse": { + "properties": { + "organization_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + }, + "organization_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Name" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + }, + "workspace_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Name" + }, + "project_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Project Id" + }, + "project_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Project Name" + }, + "is_demo": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Demo" + }, + "user_role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Role" + }, + "credentials": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Credentials" + } + }, + "type": "object", + "title": "LegacyScopesResponse" + }, + "LegacySubscriptionRequest": { + "properties": { + "plan": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Plan" + } + }, + "type": "object", + "title": "LegacySubscriptionRequest" + }, + "LegacyUserRequest": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "title": "LegacyUserRequest" + }, + "LegacyUserResponse": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + } + }, + "type": "object", + "title": "LegacyUserResponse" + }, + "LifecycleDTO-Input": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "updated_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated By" + } + }, + "type": "object", + "title": "LifecycleDTO" + }, + "LinkDTO": { + "properties": { + "type": { + "$ref": "#/components/schemas/TreeType" + }, + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "tree_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Tree Id" + } + }, + "type": "object", + "required": ["type", "id"], + "title": "LinkDTO" + }, + "ListAPIKeysResponse": { + "properties": { + "prefix": { + "type": "string", + "title": "Prefix" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "last_used_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Used At" + }, + "expiration_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expiration Date" + } + }, + "type": "object", + "required": ["prefix", "created_at"], + "title": "ListAPIKeysResponse" + }, + "MetricsDTO": { + "properties": { + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count", + "default": 0 + }, + "duration": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration", + "default": 0 + }, + "cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cost", + "default": 0 + }, + "tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Tokens", + "default": 0 + } + }, + "type": "object", + "title": "MetricsDTO" + }, + "NewEvaluation": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "revisions_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Revisions Ids" + }, + "evaluators_configs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Evaluators Configs" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "rate_limit": { + "$ref": "#/components/schemas/LLMRunRateLimit" + }, + "correct_answer_column": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Correct Answer Column" + } + }, + "type": "object", + "required": ["app_id", "revisions_ids", "evaluators_configs", "testset_id", "rate_limit"], + "title": "NewEvaluation" + }, + "NewEvaluatorConfig": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "evaluator_key": { + "type": "string", + "title": "Evaluator Key" + }, + "settings_values": { + "additionalProperties": true, + "type": "object", + "title": "Settings Values" + } + }, + "type": "object", + "required": ["app_id", "name", "evaluator_key", "settings_values"], + "title": "NewEvaluatorConfig" + }, + "NewHumanEvaluation": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "evaluation_type": { + "$ref": "#/components/schemas/EvaluationType" + }, + "inputs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Inputs" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "status": { + "type": "string", + "title": "Status" + } + }, + "type": "object", + "required": ["app_id", "variant_ids", "evaluation_type", "inputs", "testset_id", "status"], + "title": "NewHumanEvaluation" + }, + "NewTestset": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "csvdata": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array", + "title": "Csvdata" + } + }, + "type": "object", + "required": ["name", "csvdata"], + "title": "NewTestset" + }, + "NodeDTO": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/NodeType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["id", "name"], + "title": "NodeDTO" + }, + "NodeType": { + "type": "string", + "enum": ["agent", "workflow", "chain", "task", "tool", "embedding", "query", "completion", "chat", "rerank"], + "title": "NodeType" + }, + "OTelContextDTO": { + "properties": { + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + } + }, + "type": "object", + "required": ["trace_id", "span_id"], + "title": "OTelContextDTO" + }, + "OTelEvent-Input": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "timestamp": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + } + ], + "title": "Timestamp" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["name", "timestamp"], + "title": "OTelEvent" + }, + "OTelEvent-Output": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "timestamp": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + } + ], + "title": "Timestamp" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["name", "timestamp"], + "title": "OTelEvent" + }, + "OTelEventDTO": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "timestamp": { + "type": "string", + "title": "Timestamp" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["name", "timestamp"], + "title": "OTelEventDTO" + }, + "OTelExtraDTO": { + "properties": { + "kind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Kind" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEventDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLinkDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "title": "OTelExtraDTO" + }, + "OTelFlatSpan-Input": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "span_kind": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpanKind" + }, + { + "type": "null" + } + ] + }, + "span_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Span Name" + }, + "start_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Time" + }, + "end_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time" + }, + "status_code": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelStatusCode-Input" + }, + { + "type": "null" + } + ] + }, + "status_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Message" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEvent-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLink-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["trace_id", "span_id"], + "title": "OTelFlatSpan" + }, + "OTelFlatSpan-Output": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "span_kind": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpanKind" + }, + { + "type": "null" + } + ] + }, + "span_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Span Name" + }, + "start_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Time" + }, + "end_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time" + }, + "status_code": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__tracing__dtos__OTelStatusCode" + }, + { + "type": "null" + } + ] + }, + "status_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Message" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEvent-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLink-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["trace_id", "span_id"], + "title": "OTelFlatSpan" + }, + "OTelLink-Input": { + "properties": { + "span_id": { + "type": "string", + "title": "Span Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["span_id", "trace_id"], + "title": "OTelLink" + }, + "OTelLink-Output": { + "properties": { + "span_id": { + "type": "string", + "title": "Span Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["span_id", "trace_id"], + "title": "OTelLink" + }, + "OTelLinkDTO": { + "properties": { + "context": { + "$ref": "#/components/schemas/OTelContextDTO" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "required": ["context"], + "title": "OTelLinkDTO" + }, + "OTelLinksResponse": { + "properties": { + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "type": "integer", + "title": "Count" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLink-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["version", "count"], + "title": "OTelLinksResponse" + }, + "OTelSpan-Input": { + "properties": { + "spans": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpan-Input" + }, + { + "items": { + "$ref": "#/components/schemas/OTelSpan-Input" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Spans" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "span_kind": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpanKind" + }, + { + "type": "null" + } + ] + }, + "span_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Span Name" + }, + "start_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Time" + }, + "end_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time" + }, + "status_code": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelStatusCode-Input" + }, + { + "type": "null" + } + ] + }, + "status_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Message" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEvent-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLink-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["trace_id", "span_id"], + "title": "OTelSpan" + }, + "OTelSpan-Output": { + "properties": { + "spans": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpan-Output" + }, + { + "items": { + "$ref": "#/components/schemas/OTelSpan-Output" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Spans" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "span_kind": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpanKind" + }, + { + "type": "null" + } + ] + }, + "span_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Span Name" + }, + "start_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Start Time" + }, + "end_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Time" + }, + "status_code": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__tracing__dtos__OTelStatusCode" + }, + { + "type": "null" + } + ] + }, + "status_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Message" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEvent-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLink-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["trace_id", "span_id"], + "title": "OTelSpan" + }, + "OTelSpanDTO": { + "properties": { + "context": { + "$ref": "#/components/schemas/OTelContextDTO" + }, + "name": { + "type": "string", + "title": "Name" + }, + "kind": { + "$ref": "#/components/schemas/OTelSpanKind", + "default": "SPAN_KIND_UNSPECIFIED" + }, + "start_time": { + "type": "string", + "format": "date-time", + "title": "Start Time" + }, + "end_time": { + "type": "string", + "format": "date-time", + "title": "End Time" + }, + "status_code": { + "$ref": "#/components/schemas/oss__src__core__observability__dtos__OTelStatusCode", + "default": "STATUS_CODE_UNSET" + }, + "status_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status Message" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + }, + "events": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelEventDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Events" + }, + "parent": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelContextDTO" + }, + { + "type": "null" + } + ] + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelLinkDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + } + }, + "type": "object", + "required": ["context", "name", "start_time", "end_time"], + "title": "OTelSpanDTO" + }, + "OTelSpanKind": { + "type": "string", + "enum": [ + "SPAN_KIND_UNSPECIFIED", + "SPAN_KIND_INTERNAL", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_PRODUCER", + "SPAN_KIND_CONSUMER" + ], + "title": "OTelSpanKind" + }, + "OTelSpansTree-Input": { + "properties": { + "spans": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpan-Input" + }, + { + "items": { + "$ref": "#/components/schemas/OTelSpan-Input" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Spans" + } + }, + "type": "object", + "title": "OTelSpansTree" + }, + "OTelSpansTree-Output": { + "properties": { + "spans": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelSpan-Output" + }, + { + "items": { + "$ref": "#/components/schemas/OTelSpan-Output" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Spans" + } + }, + "type": "object", + "title": "OTelSpansTree" + }, + "OTelStatusCode-Input": { + "type": "string", + "enum": ["STATUS_CODE_UNSET", "STATUS_CODE_OK", "STATUS_CODE_ERROR"], + "title": "OTelStatusCode" + }, + "OTelTracingRequest": { + "properties": { + "spans": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelFlatSpan-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Spans" + }, + "traces": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/OTelSpansTree-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Traces" + } + }, + "type": "object", + "title": "OTelTracingRequest" + }, + "Organization": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "owner": { + "type": "string", + "title": "Owner" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type" + }, + "workspaces": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Workspaces" + } + }, + "type": "object", + "required": ["id", "name", "owner", "description"], + "title": "Organization" + }, + "OrganizationDetails": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "owner": { + "type": "string", + "title": "Owner" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type" + }, + "workspaces": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Workspaces" + }, + "default_workspace": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Default Workspace" + } + }, + "type": "object", + "required": ["id", "name", "owner", "description"], + "title": "OrganizationDetails" + }, + "OrganizationMembershipRequest": { + "properties": { + "role": { + "type": "string", + "enum": ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"], + "title": "Role" + }, + "is_demo": { + "type": "boolean", + "title": "Is Demo" + }, + "user_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + }, + "organization_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + } + }, + "type": "object", + "required": ["role", "is_demo", "user_ref", "organization_ref"], + "title": "OrganizationMembershipRequest" + }, + "OrganizationOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": ["id", "name"], + "title": "OrganizationOutput" + }, + "OrganizationRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "is_paying": { + "type": "boolean", + "title": "Is Paying" + } + }, + "type": "object", + "required": ["name", "description", "is_paying"], + "title": "OrganizationRequest" + }, + "OrganizationUpdate": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "updated_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated At" + } + }, + "type": "object", + "title": "OrganizationUpdate" + }, + "ParentDTO": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + } + }, + "type": "object", + "required": ["id"], + "title": "ParentDTO" + }, + "Permission": { + "type": "string", + "enum": [ + "read_system", + "view_application", + "edit_application", + "create_application", + "delete_application", + "create_app_variant", + "delete_app_variant", + "modify_variant_configurations", + "delete_application_variant", + "run_service", + "create_secret", + "view_secret", + "update_secret", + "delete_secret", + "view_app_environment_deployment", + "edit_app_environment_deployment", + "create_app_environment_deployment", + "view_testset", + "edit_testset", + "create_testset", + "delete_testset", + "view_evaluation", + "run_evaluations", + "edit_evaluation", + "create_evaluation", + "delete_evaluation", + "deploy_application", + "view_workspace", + "edit_workspace", + "create_workspace", + "delete_workspace", + "modify_user_roles", + "add_new_user_to_workspace", + "edit_organization", + "delete_organization", + "add_new_user_to_organization", + "reset_password", + "view_billing", + "edit_billing", + "view_workflows", + "edit_workflows", + "view_evaluators", + "edit_evaluators", + "view_testsets", + "edit_testsets", + "view_annotations", + "edit_annotations", + "delete_annotations" + ], + "title": "Permission" + }, + "Plan": { + "type": "string", + "enum": ["cloud_v0_hobby", "cloud_v0_pro", "cloud_v0_humanity_labs", "cloud_v0_x_labs", "cloud_v0_agenta_ai"], + "title": "Plan" + }, + "ProjectMembershipRequest": { + "properties": { + "role": { + "type": "string", + "enum": ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"], + "title": "Role" + }, + "is_demo": { + "type": "boolean", + "title": "Is Demo" + }, + "user_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + }, + "project_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + } + }, + "type": "object", + "required": ["role", "is_demo", "user_ref", "project_ref"], + "title": "ProjectMembershipRequest" + }, + "ProjectRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "is_default": { + "type": "boolean", + "title": "Is Default" + }, + "workspace_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + }, + "organization_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + } + }, + "type": "object", + "required": ["name", "description", "is_default", "workspace_ref", "organization_ref"], + "title": "ProjectRequest" + }, + "ProjectScope": { + "properties": { + "credentials": { + "type": "string", + "title": "Credentials" + }, + "role": { + "type": "string", + "enum": ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"], + "title": "Role" + }, + "tier": { + "type": "string", + "title": "Tier" + }, + "user": { + "$ref": "#/components/schemas/Reference-Output" + }, + "project": { + "$ref": "#/components/schemas/Reference-Output" + }, + "workspace": { + "$ref": "#/components/schemas/Reference-Output" + }, + "organization": { + "$ref": "#/components/schemas/Reference-Output" + } + }, + "type": "object", + "required": ["credentials", "role", "tier", "user", "project", "workspace", "organization"], + "title": "ProjectScope" + }, + "ProjectsResponse": { + "properties": { + "organization_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Organization Id" + }, + "organization_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Organization Name" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + }, + "workspace_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Name" + }, + "project_id": { + "type": "string", + "format": "uuid", + "title": "Project Id" + }, + "project_name": { + "type": "string", + "title": "Project Name" + }, + "user_role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Role" + }, + "is_demo": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Demo" + } + }, + "type": "object", + "required": ["project_id", "project_name"], + "title": "ProjectsResponse" + }, + "Reference-Output": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + } + }, + "type": "object", + "title": "Reference" + }, + "ReferenceDTO": { + "properties": { + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + } + }, + "type": "object", + "required": ["id"], + "title": "ReferenceDTO" + }, + "ReferenceRequest": { + "properties": { + "application_ref": { + "$ref": "#/components/schemas/ReferenceDTO" + } + }, + "type": "object", + "required": ["application_ref"], + "title": "ReferenceRequest" + }, + "ReferenceRequestModel": { + "properties": { + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + } + }, + "type": "object", + "title": "ReferenceRequestModel" + }, + "ResendInviteRequest": { + "properties": { + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "required": ["email"], + "title": "ResendInviteRequest" + }, + "Result": { + "properties": { + "type": { + "type": "string", + "title": "Type" + }, + "value": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Value" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["type"], + "title": "Result" + }, + "RootDTO": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + } + }, + "type": "object", + "required": ["id"], + "title": "RootDTO" + }, + "ScopesResponseModel": { + "properties": { + "projects": { + "additionalProperties": { + "additionalProperties": { + "$ref": "#/components/schemas/ProjectScope" + }, + "type": "object" + }, + "type": "object", + "title": "Projects", + "default": {} + } + }, + "type": "object", + "title": "ScopesResponseModel" + }, + "SecretDTO": { + "properties": { + "kind": { + "$ref": "#/components/schemas/SecretKind" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/StandardProviderDTO" + }, + { + "$ref": "#/components/schemas/CustomProviderDTO" + } + ], + "title": "Data" + } + }, + "type": "object", + "required": ["kind", "data"], + "title": "SecretDTO" + }, + "SecretKind": { + "type": "string", + "enum": ["provider_key", "custom_provider"], + "title": "SecretKind" + }, + "SecretResponseDTO": { + "properties": { + "kind": { + "$ref": "#/components/schemas/SecretKind" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/StandardProviderDTO" + }, + { + "$ref": "#/components/schemas/CustomProviderDTO" + } + ], + "title": "Data" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "header": { + "$ref": "#/components/schemas/Header" + }, + "lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__LifecycleDTO" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["kind", "data", "header"], + "title": "SecretResponseDTO" + }, + "SimpleEvaluationOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "evaluation_type": { + "$ref": "#/components/schemas/EvaluationType" + } + }, + "type": "object", + "required": ["id", "variant_ids", "app_id", "status", "evaluation_type"], + "title": "SimpleEvaluationOutput" + }, + "SpanDTO": { + "properties": { + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "span_id": { + "type": "string", + "title": "Span Id" + }, + "lifecycle": { + "anyOf": [ + { + "$ref": "#/components/schemas/oss__src__core__shared__dtos__LifecycleDTO" + }, + { + "type": "null" + } + ] + }, + "root": { + "$ref": "#/components/schemas/RootDTO" + }, + "tree": { + "$ref": "#/components/schemas/TreeDTO" + }, + "node": { + "$ref": "#/components/schemas/NodeDTO" + }, + "parent": { + "anyOf": [ + { + "$ref": "#/components/schemas/ParentDTO" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/components/schemas/TimeDTO" + }, + "status": { + "$ref": "#/components/schemas/StatusDTO" + }, + "exception": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExceptionDTO" + }, + { + "type": "null" + } + ] + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Data" + }, + "metrics": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metrics" + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "refs": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Refs" + }, + "links": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/LinkDTO" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Links" + }, + "otel": { + "anyOf": [ + { + "$ref": "#/components/schemas/OTelExtraDTO" + }, + { + "type": "null" + } + ] + }, + "nodes": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpanDTO" + }, + { + "items": { + "$ref": "#/components/schemas/SpanDTO" + }, + "type": "array" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Nodes" + } + }, + "type": "object", + "required": ["trace_id", "span_id", "root", "tree", "node", "time", "status"], + "title": "SpanDTO" + }, + "StandardProviderDTO": { + "properties": { + "kind": { + "$ref": "#/components/schemas/StandardProviderKind" + }, + "provider": { + "$ref": "#/components/schemas/StandardProviderSettingsDTO" + } + }, + "type": "object", + "required": ["kind", "provider"], + "title": "StandardProviderDTO" + }, + "StandardProviderKind": { + "type": "string", + "enum": [ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini" + ], + "title": "StandardProviderKind" + }, + "StandardProviderSettingsDTO": { + "properties": { + "key": { + "type": "string", + "title": "Key" + } + }, + "type": "object", + "required": ["key"], + "title": "StandardProviderSettingsDTO" + }, + "StatusCode": { + "type": "string", + "enum": ["UNSET", "OK", "ERROR"], + "title": "StatusCode" + }, + "StatusDTO": { + "properties": { + "code": { + "$ref": "#/components/schemas/StatusCode" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + } + }, + "type": "object", + "required": ["code"], + "title": "StatusDTO" + }, + "TagsRequest": { + "properties": { + "metadata": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object", + "title": "Metadata" + } + }, + "type": "object", + "required": ["metadata"], + "title": "TagsRequest" + }, + "TestSetOutputResponse": { + "properties": { + "_id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + } + }, + "type": "object", + "required": ["_id", "name", "created_at", "updated_at"], + "title": "TestSetOutputResponse" + }, + "TestSetSimpleResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "name", "created_at"], + "title": "TestSetSimpleResponse" + }, + "TestcaseResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "testcase": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Testcase" + } + }, + "type": "object", + "required": ["count"], + "title": "TestcaseResponse" + }, + "Testset-Input": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "testcases": { + "anyOf": [ + { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Testcases" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "Testset" + }, + "Testset-Output": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "testcases": { + "anyOf": [ + { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Testcases" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "Testset" + }, + "TestsetRequest": { + "properties": { + "testset": { + "$ref": "#/components/schemas/Testset-Input" + } + }, + "type": "object", + "required": ["testset"], + "title": "TestsetRequest" + }, + "TestsetResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "testset": { + "anyOf": [ + { + "$ref": "#/components/schemas/Testset-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["count"], + "title": "TestsetResponse" + }, + "TestsetsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "testsets": { + "items": { + "$ref": "#/components/schemas/Testset-Output" + }, + "type": "array", + "title": "Testsets", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "TestsetsResponse" + }, + "TimeDTO": { + "properties": { + "start": { + "type": "string", + "format": "date-time", + "title": "Start" + }, + "end": { + "type": "string", + "format": "date-time", + "title": "End" + } + }, + "type": "object", + "required": ["start", "end"], + "title": "TimeDTO" + }, + "TreeDTO": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/TreeType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["id"], + "title": "TreeDTO" + }, + "TreeType": { + "type": "string", + "enum": ["invocation"], + "title": "TreeType" + }, + "UpdateApp": { + "properties": { + "app_name": { + "type": "string", + "title": "App Name" + } + }, + "type": "object", + "required": ["app_name"], + "title": "UpdateApp" + }, + "UpdateAppOutput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + } + }, + "type": "object", + "required": ["app_id", "app_name"], + "title": "UpdateAppOutput" + }, + "UpdateEvaluatorConfig": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "evaluator_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Evaluator Key" + }, + "settings_values": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Settings Values" + } + }, + "type": "object", + "required": ["settings_values"], + "title": "UpdateEvaluatorConfig" + }, + "UpdateSecretDTO": { + "properties": { + "header": { + "anyOf": [ + { + "$ref": "#/components/schemas/Header" + }, + { + "type": "null" + } + ] + }, + "secret": { + "anyOf": [ + { + "$ref": "#/components/schemas/SecretDTO" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "UpdateSecretDTO" + }, + "UpdateVariantParameterPayload": { + "properties": { + "parameters": { + "additionalProperties": true, + "type": "object", + "title": "Parameters" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + } + }, + "type": "object", + "required": ["parameters"], + "title": "UpdateVariantParameterPayload" + }, + "UpdateVariantURLPayload": { + "properties": { + "url": { + "type": "string", + "title": "Url" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + } + }, + "type": "object", + "required": ["url", "variant_id"], + "title": "UpdateVariantURLPayload" + }, + "UpdateWorkspace": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + } + }, + "type": "object", + "title": "UpdateWorkspace" + }, + "UserRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "required": ["name", "email"], + "title": "UserRequest" + }, + "UserRole": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Role" + } + }, + "type": "object", + "required": ["email", "organization_id"], + "title": "UserRole" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" + }, + "WorkflowArtifact-Input": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "WorkflowArtifact" + }, + "WorkflowArtifact-Output": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "WorkflowArtifact" + }, + "WorkflowData": { + "properties": { + "service": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Service" + }, + "configuration": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Configuration" + } + }, + "type": "object", + "title": "WorkflowData" + }, + "WorkflowFlags": { + "properties": { + "is_custom": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Custom", + "default": false + }, + "is_evaluator": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Evaluator", + "default": false + }, + "is_human": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Human", + "default": false + } + }, + "type": "object", + "title": "WorkflowFlags" + }, + "WorkflowRequest": { + "properties": { + "workflow": { + "$ref": "#/components/schemas/WorkflowArtifact-Input" + } + }, + "type": "object", + "required": ["workflow"], + "title": "WorkflowRequest" + }, + "WorkflowResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "workflow": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowArtifact-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowResponse" + }, + "WorkflowRevision-Input": { + "properties": { + "author": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Author" + }, + "date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Date" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowData" + }, + { + "type": "null" + } + ] + }, + "artifact_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Artifact Id" + }, + "artifact": { + "anyOf": [ + { + "$ref": "#/components/schemas/Artifact-Input" + }, + { + "type": "null" + } + ] + }, + "variant_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + }, + "variant": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowVariant-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "WorkflowRevision" + }, + "WorkflowRevision-Output": { + "properties": { + "author": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Author" + }, + "date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Date" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowData" + }, + { + "type": "null" + } + ] + }, + "artifact_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Artifact Id" + }, + "artifact": { + "anyOf": [ + { + "$ref": "#/components/schemas/Artifact-Output" + }, + { + "type": "null" + } + ] + }, + "variant_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Variant Id" + }, + "variant": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowVariant-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "WorkflowRevision" + }, + "WorkflowRevisionRequest": { + "properties": { + "revision": { + "$ref": "#/components/schemas/WorkflowRevision-Input" + } + }, + "type": "object", + "required": ["revision"], + "title": "WorkflowRevisionRequest" + }, + "WorkflowRevisionResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "revision": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowRevision-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowRevisionResponse" + }, + "WorkflowRevisionsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "revisions": { + "items": { + "$ref": "#/components/schemas/WorkflowRevision-Output" + }, + "type": "array", + "title": "Revisions", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowRevisionsResponse" + }, + "WorkflowVariant-Input": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "artifact_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Artifact Id" + }, + "artifact": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowArtifact-Input" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "WorkflowVariant" + }, + "WorkflowVariant-Output": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "artifact_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Artifact Id" + }, + "artifact": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowArtifact-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "WorkflowVariant" + }, + "WorkflowVariantRequest": { + "properties": { + "variant": { + "$ref": "#/components/schemas/WorkflowVariant-Input" + } + }, + "type": "object", + "required": ["variant"], + "title": "WorkflowVariantRequest" + }, + "WorkflowVariantResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "variant": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowVariant-Output" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowVariantResponse" + }, + "WorkflowVariantsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "variants": { + "items": { + "$ref": "#/components/schemas/WorkflowVariant-Output" + }, + "type": "array", + "title": "Variants", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowVariantsResponse" + }, + "WorkflowsResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "workflows": { + "items": { + "$ref": "#/components/schemas/WorkflowArtifact-Output" + }, + "type": "array", + "title": "Workflows", + "default": [] + } + }, + "type": "object", + "required": ["count"], + "title": "WorkflowsResponse" + }, + "Workspace": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type" + } + }, + "type": "object", + "required": ["name", "type"], + "title": "Workspace" + }, + "WorkspaceMemberResponse": { + "properties": { + "user": { + "additionalProperties": true, + "type": "object", + "title": "User" + }, + "roles": { + "items": { + "$ref": "#/components/schemas/WorkspacePermission" + }, + "type": "array", + "title": "Roles" + } + }, + "type": "object", + "required": ["user", "roles"], + "title": "WorkspaceMemberResponse" + }, + "WorkspaceMembershipRequest": { + "properties": { + "role": { + "type": "string", + "enum": ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"], + "title": "Role" + }, + "is_demo": { + "type": "boolean", + "title": "Is Demo" + }, + "user_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + }, + "workspace_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + } + }, + "type": "object", + "required": ["role", "is_demo", "user_ref", "workspace_ref"], + "title": "WorkspaceMembershipRequest" + }, + "WorkspacePermission": { + "properties": { + "role_name": { + "$ref": "#/components/schemas/WorkspaceRole" + }, + "role_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Role Description" + }, + "permissions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Permission" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Permissions" + } + }, + "type": "object", + "required": ["role_name"], + "title": "WorkspacePermission" + }, + "WorkspaceRequest": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "is_default": { + "type": "boolean", + "title": "Is Default" + }, + "organization_ref": { + "$ref": "#/components/schemas/ee__src__services__admin_manager__Reference" + } + }, + "type": "object", + "required": ["name", "description", "is_default", "organization_ref"], + "title": "WorkspaceRequest" + }, + "WorkspaceResponse": { + "properties": { + "created_at": { + "type": "string", + "title": "Created At", + "default": "2025-05-15 07:35:40.094202+00:00" + }, + "updated_at": { + "type": "string", + "title": "Updated At", + "default": "2025-05-15 07:35:40.094271+00:00" + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Type" + }, + "organization": { + "type": "string", + "title": "Organization" + }, + "members": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/WorkspaceMemberResponse" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Members" + } + }, + "type": "object", + "required": ["id", "name", "type", "organization"], + "title": "WorkspaceResponse" + }, + "WorkspaceRole": { + "type": "string", + "enum": ["owner", "viewer", "editor", "evaluator", "workspace_admin", "deployment_manager"], + "title": "WorkspaceRole" + }, + "ee__src__services__admin_manager__Reference": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + } + }, + "type": "object", + "title": "Reference" + }, + "oss__src__apis__fastapi__evaluators__models__Evaluator-Output": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "created_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Created By Id" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "deleted_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Deleted By Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowFlags" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowData" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "Evaluator" + }, + "oss__src__apis__fastapi__observability__models__OTelTracingResponse": { + "properties": { + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Count" + }, + "spans": { + "items": { + "$ref": "#/components/schemas/OTelSpanDTO" + }, + "type": "array", + "title": "Spans" + } + }, + "type": "object", + "required": ["version", "spans"], + "title": "OTelTracingResponse" + }, + "oss__src__apis__fastapi__tracing__models__OTelTracingResponse": { + "properties": { + "version": { + "type": "string", + "title": "Version" + }, + "count": { + "type": "integer", + "title": "Count" + }, + "oldest": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Oldest" + }, + "newest": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Newest" + }, + "spans": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/OTelFlatSpan-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Spans" + }, + "traces": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/OTelSpansTree-Output" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Traces" + } + }, + "type": "object", + "required": ["version", "count"], + "title": "OTelTracingResponse" + }, + "oss__src__core__observability__dtos__OTelStatusCode": { + "type": "string", + "enum": ["STATUS_CODE_OK", "STATUS_CODE_ERROR", "STATUS_CODE_UNSET"], + "title": "OTelStatusCode" + }, + "oss__src__core__shared__dtos__LifecycleDTO": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + } + }, + "type": "object", + "title": "LifecycleDTO" + }, + "oss__src__core__shared__dtos__Reference": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Slug" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "attributes": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/FullJson-Input" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Attributes" + } + }, + "type": "object", + "title": "Reference" + }, + "oss__src__core__tracing__dtos__OTelStatusCode": { + "type": "string", + "enum": ["STATUS_CODE_UNSET", "STATUS_CODE_OK", "STATUS_CODE_ERROR"], + "title": "OTelStatusCode" + }, + "oss__src__models__api__evaluation_model__Evaluator": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "key": { + "type": "string", + "title": "Key" + }, + "direct_use": { + "type": "boolean", + "title": "Direct Use" + }, + "settings_template": { + "additionalProperties": true, + "type": "object", + "title": "Settings Template" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "oss": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Oss", + "default": false + }, + "requires_llm_api_keys": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Requires Llm Api Keys", + "default": false + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags" + } + }, + "type": "object", + "required": ["name", "key", "direct_use", "settings_template", "tags"], + "title": "Evaluator" + }, + "oss__src__services__variants_manager__LifecycleDTO": { + "properties": { + "created_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "updated_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated At" + }, + "updated_by_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated By Id" + }, + "updated_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated By" + } + }, + "type": "object", + "title": "LifecycleDTO" + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } + }, + "tags": [ + { + "name": "Variants" + }, + { + "name": "Evaluations" + }, + { + "name": "Evaluators" + }, + { + "name": "Apps" + }, + { + "name": "Human-Evaluations" + }, + { + "name": "Testsets" + }, + { + "name": "Containers" + }, + { + "name": "Environments" + }, + { + "name": "Observability" + }, + { + "name": "Organizations" + }, + { + "name": "Bases" + }, + { + "name": "Configs" + } + ], + "security": [ + { + "APIKeyHeader": [] + } + ] +} diff --git a/docs/docs/reference/sdk/01-configuration-management.mdx b/docs/docs/reference/sdk/01-configuration-management.mdx index 1fe59a2128..977e3963c6 100644 --- a/docs/docs/reference/sdk/01-configuration-management.mdx +++ b/docs/docs/reference/sdk/01-configuration-management.mdx @@ -325,7 +325,7 @@ All configuration data must be nested under the `prompt` key. ``` :::note -You can use the `PromptTemplate` class in the SDK to create and validate a prompt configuration. See [how to commit a variant](/prompt-engineering/managing-prompts-programatically/create-and-commit#create-a-new-variant). +You can use the `PromptTemplate` class in the SDK to create and validate a prompt configuration. See [how to commit a variant](/prompt-engineering/prompt-management/prompt-management-sdk#create-a-new-variant). ::: ## Available Environments diff --git a/docs/docs/self-host/01-quick-start.mdx b/docs/docs/self-host/01-quick-start.mdx index 454ed8dcc7..ecf8947472 100644 --- a/docs/docs/self-host/01-quick-start.mdx +++ b/docs/docs/self-host/01-quick-start.mdx @@ -21,7 +21,7 @@ git clone https://github.com/Agenta-AI/agenta && cd agenta 3. Start Agenta services: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` 4. Access Agenta at `http://localhost`. @@ -44,7 +44,7 @@ Updating your local Agenta installation to the latest version, requires pulling 1. Pull the latest version: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d --pull always +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d --pull always ``` 2. Run migrations if needed: @@ -65,8 +65,7 @@ If Agenta doesn't start properly, check these common issues: docker logs agenta-oss-gh-web docker logs agenta-oss-gh-api ``` -4. SDK connectivity issues: If you're using the Agenta SDK from outside Docker to connect to your localhost Agenta instance and experiencing connection failures, ensure the `DOCKER_NETWORK_MODE` environment variable is unset (this is the default behavior). -5. Lack of memory provided to docker: If you are experiencing the web container restarting and dying unexpectedly, the most likely cause is that you are running out of memory. You may need to increase the memory allocated to docker (desktop). + :::info To set up a development environment with features like hot-reloading, refer to our [Development Guide](/misc/contributing/development-mode). @@ -74,6 +73,6 @@ To set up a development environment with features like hot-reloading, refer to o Need help? Either: - [Create a GitHub issue](https://github.com/Agenta-AI/agenta/issues/new/choose) -- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) for quick support +- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ) for quick support diff --git a/docs/docs/self-host/02-configuration.mdx b/docs/docs/self-host/02-configuration.mdx index 5879d32f47..43ba2511c0 100644 --- a/docs/docs/self-host/02-configuration.mdx +++ b/docs/docs/self-host/02-configuration.mdx @@ -13,7 +13,7 @@ The default environment variables are specified in `hosting/docker-compose/oss/. You can specify your own environment file using the `--env-file` flag when running `docker compose`: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file .my-env-file --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file .my-env-file --profile with-web up -d ``` ## Variable Categories @@ -37,9 +37,7 @@ Configuration for Docker and database connections: | Variable | Description | Default | |----------|-------------|---------| -| `AGENTA_WEB_IMAGE_TAG` | Docker image tag for the web frontend | `latest` | -| `AGENTA_API_IMAGE_TAG` | Docker image tag for the API backend | `latest` | -| `DOCKER_NETWORK_MODE` | Docker networking mode | `_(empty)_` (which falls back to `bridge`) | +| `DOCKER_NETWORK_MODE` | Docker networking mode | `bridge` | | `POSTGRES_PASSWORD` | PostgreSQL database password | `password` | | `POSTGRES_USERNAME` | PostgreSQL database username | `username` | @@ -56,9 +54,6 @@ Optional Agenta-specific configurations: | `AGENTA_TELEMETRY_ENABLED` | Enable telemetry collection | `true` | | `AGENTA_SEND_EMAIL_FROM_ADDRESS` | From address for system emails | `mail@example.com` | | `AGENTA_API_INTERNAL_URL` | Internal API URL for services | _(empty)_ | -| `AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED` | Enable middleware caching in the chat and completion services | `true` | -| `AGENTA_ALLOWED_DOMAINS` | Comma-separated list of email domains allowed to authenticate; when set, all other domains are rejected | _(empty)_ | -| `AGENTA_OTLP_MAX_BATCH_BYTES` | Max OTLP batch size before requests are rejected with 413 | `10485760` (10MB) | ### Third-party (Required) @@ -75,9 +70,7 @@ Essential third-party service configurations: #### Redis (Caching) | Variable | Description | Default | |----------|-------------|---------| -| `REDIS_URL` | Redis connection URL for task queue | `redis://redis:6379/0` | -| `REDIS_CACHE_HOST` | Redis cache hostname for application caching | `cache` | -| `REDIS_CACHE_PORT` | Redis cache port for application caching | `6378` | +| `REDIS_URL` | Redis connection URL | `redis://redis:6379/0` | #### RabbitMQ (Message Queue) | Variable | Description | Default | @@ -133,6 +126,7 @@ Optional port and service configurations: | `NGINX_PORT` | Nginx port (when using Nginx) | `80` | | `RABBITMQ_PORT` | RabbitMQ AMQP port | `5672` | | `RABBITMQ_UI_PORT` | RabbitMQ management UI port | `15672` | +| `REDIS_CACHE_PORT` | Redis cache port | `6378` | | `POSTGRES_PORT` | PostgreSQL port | `5432` | | `SUPERTOKENS_PORT` | SuperTokens port | `3567` | @@ -240,4 +234,5 @@ TRAEFIK_PORT=80 For configuration assistance: - Check the [GitHub issues](https://github.com/Agenta-AI/agenta/issues) -- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) +- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ) +- Review the deployment documentation for your specific setup \ No newline at end of file diff --git a/docs/docs/self-host/03-upgrading.mdx b/docs/docs/self-host/03-upgrading.mdx index 2a29860aea..5a3f0be81f 100644 --- a/docs/docs/self-host/03-upgrading.mdx +++ b/docs/docs/self-host/03-upgrading.mdx @@ -28,7 +28,7 @@ docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml pull Restart all services with the updated images: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` :::info diff --git a/docs/docs/self-host/04-sdk-host-configuration.mdx b/docs/docs/self-host/04-sdk-host-configuration.mdx new file mode 100644 index 0000000000..adb717b314 --- /dev/null +++ b/docs/docs/self-host/04-sdk-host-configuration.mdx @@ -0,0 +1,36 @@ +--- +title: SDK Host Configuration +sidebar_label: Host Configuration +description: Learn how the Agenta SDK automatically handles host configuration based on your deployment environment +--- + +This guide covers how Agenta SDK automatically handles host configuration based on your deployment environment, ensuring proper connectivity for your applications. + +## Overview + +The Agenta SDK automatically handles host configuration based on your deployment environment to ensure proper connectivity. + +## How it works + +The SDK uses the `DOCKER_NETWORK_MODE` setting to determine how to handle host URLs: + +- **Inside Docker containers** (network mode: bridge): The SDK automatically converts `localhost` references to `host.docker.internal` to enable communication between containers +- **Outside Docker** (network mode: host/default): The SDK preserves your original host configuration (e.g., `localhost` remains `localhost`). Note: "default" means `DOCKER_NETWORK_MODE` is not set when using the SDK outside Docker + +## Common scenarios + +| Environment | Network Mode | Host Setting | Result | +|------------|--------------|--------------|--------| +| AI services running in Docker | bridge | `localhost` | `host.docker.internal` | +| Local development outside Docker | host/default* | `localhost` | `localhost` | +| Custom host URL | any | `https://my-api.com` | `https://my-api.com` | + +*default = `DOCKER_NETWORK_MODE` environment variable is not set + +## Troubleshooting + +If you're experiencing connectivity issues, verify that: +- Your host configuration matches your deployment environment +- The `DOCKER_NETWORK_MODE` is correctly set for your environment (bridge for Docker, host/default for outside Docker) +- When running outside Docker, use `localhost` or your actual API URL +- When running inside Docker, the SDK will handle host resolution automatically diff --git a/docs/docs/self-host/99-faq.mdx b/docs/docs/self-host/99-faq.mdx deleted file mode 100644 index 42a8a52075..0000000000 --- a/docs/docs/self-host/99-faq.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Frequently Asked Questions -sidebar_label: FAQ -description: Self-hosting Agenta FAQ. Learn how to lock Agenta to a specific version, configure Docker images, and troubleshoot common deployment issues. ---- - -## How do I lock Agenta to a specific version? - -Use the `AGENTA_WEB_IMAGE_TAG` and `AGENTA_API_IMAGE_TAG` environment variables. - -```bash -AGENTA_WEB_IMAGE_TAG=v0.15.0 -AGENTA_API_IMAGE_TAG=v0.15.0 -``` - -These are set to `latest` by default. diff --git a/docs/docs/self-host/guides/01-deploy-remotely.mdx b/docs/docs/self-host/guides/01-deploy-remotely.mdx index 665a9e09ce..6cdd7641fe 100644 --- a/docs/docs/self-host/guides/01-deploy-remotely.mdx +++ b/docs/docs/self-host/guides/01-deploy-remotely.mdx @@ -87,7 +87,7 @@ For more advanced settings like SSL, authentication, or custom ports, see our [c ### Option 1: Deploy with Traefik (Recommended) ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` **What this command does:** @@ -101,7 +101,7 @@ docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=ho If you prefer Nginx or need to integrate with existing Nginx configurations: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-nginx up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile nginx up -d ``` ## Step 4: Verify Your Deployment @@ -178,4 +178,4 @@ This guide uses HTTP for initial setup. For production environments, configure H If you need assistance, you can: - [Create a GitHub issue](https://github.com/Agenta-AI/agenta/issues/new/choose) -- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw) for direct support +- Join our [Slack community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ) for direct support diff --git a/docs/docs/self-host/guides/02-using-ssl.mdx b/docs/docs/self-host/guides/02-using-ssl.mdx index fec77d6ed2..516e9f2dff 100644 --- a/docs/docs/self-host/guides/02-using-ssl.mdx +++ b/docs/docs/self-host/guides/02-using-ssl.mdx @@ -96,7 +96,7 @@ web: ### Start the SSL-enabled services: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.ssl.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.ssl.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` ### Monitor certificate generation: @@ -156,7 +156,7 @@ docker-compose -f docker-compose.gh.ssl.yml down rm /home/$(whoami)/ssl_certificates/acme.json touch /home/$(whoami)/ssl_certificates/acme.json chmod 600 /home/$(whoami)/ssl_certificates/acme.json -docker compose -f hosting/docker-compose/oss/docker-compose.gh.ssl.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.ssl.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` ### Cloudflare-Specific Issues: diff --git a/docs/docs/tutorials/cookbooks/01-capture-user-feedback.mdx b/docs/docs/tutorials/cookbooks/01-capture-user-feedback.mdx index 1633d97b31..40d80de901 100644 --- a/docs/docs/tutorials/cookbooks/01-capture-user-feedback.mdx +++ b/docs/docs/tutorials/cookbooks/01-capture-user-feedback.mdx @@ -1,15 +1,17 @@ --- -title: "Capture User Feedback with Trace Annotations" +title: "Capture user feedback" position: 1 sidebar_label: "Capture user feedback" +description: "Learn how to capture and store user feedback on LLM responses using Agenta to continuously improve your AI applications, find edge cases, and track performance over time" --- -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` +:::note + This guide is also available as a [Jupyter Notebook](https://github.com/Agenta-AI/agenta/blob/main/examples/jupyter/capture_user_feedback.ipynb). +::: + +# Capturing User Feedback with Annotations In this tutorial, we'll build a simple LLM application and learn how to capture user feedback using Agenta's annotation system. By the end, you'll be able to: @@ -17,11 +19,6 @@ In this tutorial, we'll build a simple LLM application and learn how to capture - Capture structured feedback about LLM responses - View this feedback in the Agenta UI - -<GoogleColabButton notebookPath="examples/jupyter/capture_user_feedback.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - This approach helps you collect valuable user insights and improve your LLM applications over time. diff --git a/docs/docs/tutorials/cookbooks/02-observability_langchain.mdx b/docs/docs/tutorials/cookbooks/02-observability_langchain.mdx index 5a0bc75291..da0694c776 100644 --- a/docs/docs/tutorials/cookbooks/02-observability_langchain.mdx +++ b/docs/docs/tutorials/cookbooks/02-observability_langchain.mdx @@ -1,15 +1,17 @@ --- -title: "Tracing and Observability for LangChain with Agenta" -sidebar_label: Tracing for LangChain -description: Learn how to instrument LangChain traces with Agenta for enhanced LLM observability. This guide covers setup, configuration, and best practices for monitoring LLM applications using LangChain and OpenAI models. +title: "Observability LangChain" --- ```mdx-code-block import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; + ``` +:::note +This guide is also available as a [Jupyter Notebook](https://github.com/Agenta-AI/agenta/blob/main/cookbook/observability_langchain.ipynb). +::: +# LLM Observability for LangChain with Agenta ## Introduction @@ -17,11 +19,6 @@ This guide shows you how to set up tracing for a RAG application in Langchain us Tracing allows us to debug effectively complex LLM applications. It allows us to view exact prompts sent and contexts retrieved. - -<GoogleColabButton notebookPath="examples/jupyter/observability_langchain.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - We'll build a simple Q&A RAG application that answers questions about Agenta's documentation. Then, we'll instrument the calls (i.e., trace them) and view the trace in Agenta. <Image @@ -104,7 +101,7 @@ prompt_template = ChatPromptTemplate([ llm = ChatOpenAI(model="gpt-4o-mini") loader = WebBaseLoader( - web_paths=("https://docs.agenta.ai/prompt-engineering/managing-prompts-programatically/create-and-commit",), + web_paths=("https://docs.agenta.ai/prompt-management/prompt-management-sdk",), bs_kwargs=dict( parse_only=bs4.SoupStrainer('article') # Only parse the core ), diff --git a/docs/docs/tutorials/cookbooks/_AI-powered-code-reviews.mdx b/docs/docs/tutorials/cookbooks/AI-powered-code-reviews.mdx similarity index 100% rename from docs/docs/tutorials/cookbooks/_AI-powered-code-reviews.mdx rename to docs/docs/tutorials/cookbooks/AI-powered-code-reviews.mdx diff --git a/docs/docs/tutorials/cookbooks/RAG-QA-docs.mdx b/docs/docs/tutorials/cookbooks/RAG-QA-docs.mdx new file mode 100644 index 0000000000..4088f94235 --- /dev/null +++ b/docs/docs/tutorials/cookbooks/RAG-QA-docs.mdx @@ -0,0 +1,580 @@ +--- +title: "RAG Q&A over Documentation" +description: "Build a Q&A system for your documentation using RAG with Agenta, Litellm and Qdrant. Evaluate it using Ragas Context relevancy and LLM-as-a-judge. Deploy it as an API endpoint." +--- + +:::info Open in Github +The code for this tutorial is available [here](https://github.com/Agenta-AI/agenta/tree/main/examples/custom_workflows/rag-docs-qa). +::: + +```mdx-code-block +import Image from "@theme/IdealImage"; +``` + +In this tutorial, we'll build a Q&A system for our documentation using RAG (Retrieval-Augmented Generation). Our AI assistant will answer user queries by retrieving relevant sections from our documentation and using them as context when calling an LLM. + +At the end, we will have: + +- A **playground** for testing different embeddings, adjusting top_k values (number of context chunks to include), and experimenting with various prompts and models +- **LLM-as-a-judge** and **RAG context relevancy** evaluations for our Q&A application +- **Observability** with Agenta to debug and monitor our application +- A **deployment** that we can either [directly invoke](/prompt-engineering/prompt-management/proxy-calls) **or** [fetch the configuration](/reference/sdk/configuration-management#get_from_registry) to run elsewhere + +You can try our playground by creating a free account at [https://cloud.agenta.ai](https://cloud.agenta.ai) and opening the demo. + +<Image + style={{ display: "block", margin: "10px auto" }} + img={require("/images/cookbooks/rag-qa-playground.png")} + alt="Playground for testing the RAG " + loading="lazy" +/> + +## Our stack + +- **Agenta** for playground, evaluation, observability, and deployment. +- **[LiteLLM](https://github.com/BerriAI/litellm)** for interacting with language models and embeddings. +- **[Qdrant](https://qdrant.tech/)** as our vector database for storing and querying document embeddings. + +## Ingestion pipeline + +The first step is to process our documentation and store it in a vector database for retrieval. Let's start by looking at how we ingest our documentation into Qdrant. + +```python title="ingest.py" + +OPENAI_EMBEDDING_DIM = 1536 # For text-embedding-ada-002 +COHERE_EMBEDDING_DIM = 1024 # For embed-english-v3.0 + +qdrant_client = QdrantClient( + url=os.getenv("QDRANT_URL"), api_key=os.getenv("QDRANT_API_KEY") +) + + +def chunk_text(text: str, max_chunk_size: int = 1500) -> List[str]: + """ + Split text into chunks based on paragraphs and size. + Tries to maintain context by keeping paragraphs together when possible. + """ + # Split by double newlines to preserve paragraph structure + paragraphs = [p.strip() for p in text.split("\n\n") if p.strip()] + + chunks = [] + current_chunk = [] + current_size = 0 + + for paragraph in paragraphs: + paragraph_size = len(paragraph) + + # If a single paragraph is too large, split it by sentences + if paragraph_size > max_chunk_size: + sentences = [s.strip() + "." for s in paragraph.split(".") if s.strip()] + for sentence in sentences: + if len(sentence) > max_chunk_size: + # If even a sentence is too long, split it by chunks + for i in range(0, len(sentence), max_chunk_size): + chunks.append(sentence[i : i + max_chunk_size]) + elif current_size + len(sentence) > max_chunk_size: + # Start new chunk + chunks.append(" ".join(current_chunk)) + current_chunk = [sentence] + current_size = len(sentence) + else: + current_chunk.append(sentence) + current_size += len(sentence) + # If adding this paragraph would exceed the limit, start a new chunk + elif current_size + paragraph_size > max_chunk_size: + chunks.append(" ".join(current_chunk)) + current_chunk = [paragraph] + current_size = paragraph_size + else: + current_chunk.append(paragraph) + current_size += paragraph_size + + # Add the last chunk if it exists + if current_chunk: + chunks.append(" ".join(current_chunk)) + + return chunks + + +def process_doc(file_path: str, docs_path: str, docs_base_url: str) -> List[Dict]: + """Process a single document into chunks with metadata.""" + with open(file_path, "r", encoding="utf-8") as f: + # Parse frontmatter and content + post = frontmatter.load(f) + content = post.content + + # Calculate document hash + doc_hash = calculate_doc_hash(content) + + # Get document URL + doc_url = get_doc_url(file_path, docs_path, docs_base_url) + + # Create base metadata + metadata = { + "title": post.get("title", ""), + "url": doc_url, + "file_path": file_path, + "last_updated": datetime.utcnow().isoformat(), + "doc_hash": doc_hash, + } + + # Chunk the content + chunks = chunk_text(content) + + return [ + {"content": chunk, "metadata": metadata, "doc_hash": doc_hash} + for chunk in chunks + ] + + +def get_embeddings(text: str) -> Dict[str, List[float]]: + """Get embeddings using both OpenAI and Cohere models via LiteLLM.""" + # Get OpenAI embedding + openai_response = embedding(model="text-embedding-ada-002", input=[text]) + openai_embedding = openai_response["data"][0]["embedding"] + + # Get Cohere embedding + cohere_response = embedding( + model="cohere/embed-english-v3.0", + input=[text], + input_type="search_document", # Specific to Cohere v3 models + ) + cohere_embedding = cohere_response["data"][0]["embedding"] + + return {"openai": openai_embedding, "cohere": cohere_embedding} + + +def setup_qdrant_collection(): + """Create or recreate the vector collection.""" + # Delete if exists + try: + qdrant_client.delete_collection(COLLECTION_NAME) + except Exception: + pass + + # Create collection with two vector types + qdrant_client.create_collection( + collection_name=COLLECTION_NAME, + vectors_config={ + "openai": models.VectorParams( + size=OPENAI_EMBEDDING_DIM, distance=models.Distance.COSINE + ), + "cohere": models.VectorParams( + size=COHERE_EMBEDDING_DIM, distance=models.Distance.COSINE + ), + }, + ) + + +def upsert_chunks(chunks: List[Dict]): + """Upsert document chunks to the vector store.""" + for i, chunk in enumerate(chunks): + # Get both embeddings using LiteLLM + embeddings = get_embeddings(chunk["content"]) + + # Create payload + payload = {**chunk["metadata"], "content": chunk["content"], "chunk_index": i} + + # Upsert to Qdrant + qdrant_client.upsert( + collection_name=COLLECTION_NAME, + points=[ + models.PointStruct( + id=f"{chunk['doc_hash']}", + payload=payload, + vector=embeddings, # Contains both 'openai' and 'cohere' embeddings + ) + ], + ) + + +def main(): + # Get environment variables + docs_path = os.getenv("DOCS_PATH") + docs_base_url = os.getenv("DOCS_BASE_URL") + + if not docs_path or not docs_base_url: + raise ValueError("DOCS_PATH and DOCS_BASE_URL must be set in .env file") + + # Create fresh collection + setup_qdrant_collection() + + # Process all documents + all_docs = get_all_docs(docs_path) + for doc_path in tqdm.tqdm(all_docs): + print(f"Processing {doc_path}") + chunks = process_doc(doc_path, docs_path, docs_base_url) + upsert_chunks(chunks) +``` + +This script performs the following steps: + +1. **Loads documentation files:** Reads all `.mdx` files from the documentation directory. +2. **Processes documents:** Chunks the text, adds metadata (e.g. the url where the page where to be found).. +3. **Generates embeddings:** Generate embeddings for each chunk using both OpenAI and Cohere models. We use both because we would like to compare them in the playground. +4. **Stores embeddings in Qdrant:** Upserts the embeddings into a Qdrant collection for later retrieval. We use named vectors to save multiple embeddings for the same document. + +To run the ingestion pipeline, you need first to create a collection in Qdrant and then set the following environment variables: + +- `QDRANT_URL`: The URL of your Qdrant instance. +- `QDRANT_API_KEY`: The API key for your Qdrant instance. +- `DOCS_PATH`: The folder containing the documentation (in our case it's under `agenta/docs/docs`). +- `DOCS_BASE_URL`: The base URL where the documentation can be found (in our case it's `https://docs.agenta.ai`). + +:::info +The complete ingestion script with a setup readme is [available in Github](https://github.com/Agenta-AI/agenta/tree/main/examples/custom_workflows/rag-docs-qa). +::: + +## The query RAG workflow + +Now that we have ingested the documentation into the Qdrant vector database, let's create the query logic for our assistant. Parts related to the Agenta integrations are highlighted. + +```python title="query.py" +#highlight-start +import agenta as ag +from pydantic import BaseModel, Field +from agenta.sdk.assets import supported_llm_models +from agenta.sdk.types import MCField +#highlight-end + +system_prompt = """ +You are a helpful assistant that answers questions based on the documentation. +""" +user_prompt = """ +Here is the query: {query} + +Here is the context: {context} +""" +#highlight-start +ag.init() +#highlight-end + +#highlight-start +litellm.callbacks = [ag.callbacks.litellm_handler()] +#highlight-end + +# Initialize Qdrant client +qdrant_client = QdrantClient( + url=os.getenv("QDRANT_URL"), api_key=os.getenv("QDRANT_API_KEY") +) + +#highlight-start +# We define here the configuration that will be used by the playground +class Config(BaseModel): + system_prompt: str = Field(default=system_prompt) + user_prompt: str = Field(default=user_prompt) + embedding_model: str = MCField(default="openai", choices=["openai", "cohere"]) + llm_model: str = MCField(default="gpt-3.5-turbo", choices=supported_llm_models) + top_k: int = Field(default=10, ge=1, le=25) + rerank_top_k: int = Field(default=3, ge=1, le=10) + use_rerank: bool = Field(default=True) +#highlight-end + + +def get_embeddings(text: str, model: str) -> Dict[str, List[float]]: + """Get embeddings using both OpenAI and Cohere models via LiteLLM.""" + if model == "openai": + return embedding(model="text-embedding-ada-002", input=[text])["data"][0]["embedding"] + elif model == "cohere": + return embedding( + model="cohere/embed-english-v3.0", + input=[text], + input_type="search_query", # Use search_query for queries + )["data"][0]["embedding"] + + raise ValueError(f"Unknown model: {model}") + +#highlight-next-line +@ag.instrument() +def search_docs( + query: str, collection_name: str = os.getenv("COLLECTION_NAME", "docs_collection") +) -> List[Dict]: + """ + Search the documentation using embeddings. + + Args: + query: The search query + collection_name: Name of the Qdrant collection to search + + Returns: + List of dictionaries containing matched documents and their metadata + """ + + #highlight-start + # Get embeddings for the query + config = ag.ConfigManager.get_from_route(Config) + #highlight-end + # Search using embeddings + results = qdrant_client.query_points( + collection_name=collection_name, + query=get_embeddings(query, config.embedding_model), + using=config.embedding_model, + limit=config.top_k, + ) + # Format results + formatted_results = [] + for result in results.points: + formatted_result = { + "content": result.payload["content"], + "metadata": { + "title": result.payload["title"], + "url": result.payload["url"], + "score": result.score, + }, + } + formatted_results.append(formatted_result) + + return formatted_results + +#highlight-next-line +@ag.instrument() +def llm(query: str, results: List[Dict]): + #highlight-next-line + config = ag.ConfigManager.get_from_route(Config) + context = [] + for i, result in enumerate(results, 1): + score = result["metadata"].get("rerank_score", result["metadata"]["score"]) + item = f"Result {i} (Score: {score:.3f})\n" + item += f"Title: {result['metadata']['title']}\n" + item += f"URL: {result['metadata']['url']}\n" + item += f"Content: {result['content']}\n" + item += "-" * 80 + "\n" + context.append(item) + #highlight-start + # We store the context in the trace so that it can be used for evaluation + ag.tracing.store_internals({"context": context}) + #highlight-end + response = completion( + model=config.llm_model, + messages=[ + {"role": "system", "content": config.system_prompt}, + { + "role": "user", + "content": config.user_prompt.format( + query=query, context="".join(context) + ), + }, + ], + ) + return response.choices[0].message.content + +#highlight-next-line +@ag.instrument() +def rerank_results(query: str, results: List[Dict]) -> List[Dict]: + """Rerank the search results using Cohere's reranker.""" + #highlight-start + config = ag.ConfigManager.get_from_route(Config) + #highlight-end + # Format documents for reranking + documents = [result["content"] for result in results] + + # Perform reranking + reranked = rerank( + model="cohere/rerank-english-v3.0", + query=query, + documents=documents, + top_n=config.rerank_top_k, + ) + # Reorder the original results based on reranking + reranked_results = [] + for item in reranked.results: + # The rerank function returns dictionaries with 'document' and 'index' keys + reranked_results.append(results[item["index"]]) + # Add rerank score to metadata + reranked_results[-1]["metadata"]["rerank_score"] = item["relevance_score"] + + return reranked_results + +#highlight-start +# We define here the route that will be used by the playground +@ag.route("/", config_schema=Config) +@ag.instrument() +#highlight-end +def generate(query: str): + #highlight-next-line + config = ag.ConfigManager.get_from_route(Config) + results = search_docs(query) + if config.use_rerank: + reranked_results = rerank_results(query, results) + return llm(query, reranked_results) + else: + return llm(query, results) +``` + +Our system uses a standard RAG workflow consisting of three main steps: + +1. **Searching the documentation:** Uses the query to retrieve relevant documents from Qdrant. +2. **Optionally reranking results:** Improves the relevance of results using Cohere's reranker. +3. **Generating the answer:** Constructs a prompt with the query and context, then calls the LLM to generate the final answer. + +To integrate this script with Agenta, we need to make two main adjustments: + +1. **Instrumentation:** Use `@ag.instrument()` decorator to trace inputs, outputs, and internal variables. +2. **Integration with the Playground:** Use `ag.route()` to define a route and later create a service that will be used to test the app in the playground. + +We'll discuss these in more detail in the next sections. + +## Instrumentation + +Tracing captures the inputs and outputs of all functions and LLM calls in our app. This helps us debug multi-step workflows (for example, determining whether an incorrect response stems from the LLM call or from incorrect context) and monitor usage over time. + +```python +@ag.instrument() +def generate(query: str): + ... +``` + +Instrumenting code in Agenta is straightforward. The `@ag.instrument()` decorator lets you capture function inputs and outputs to create a trace tree. + +Agenta also provides auto-instrumentation for most frameworks and libraries. Since we're using litellm, we'll use Agenta's callback function to automatically instrument its calls. + +For RAG evaluation of our applications, we need to evaluate the relevancy of retrieved context for each query. Since context isn't part of any function's input or output, we'll add it manually to a span using `ag.tracing.store_internals({"context": context})`, which stores internal variables in the ongoing span. + +<Image + style={{ display: "block", margin: "10px auto" }} + img={require("/images/cookbooks/rag-qa-tracing.png")} + alt="Trace view of the RAG Q&A assistant" + loading="lazy" +/> + +## Playground integration + +Agenta provides a custom playground for testing application parameters. Here, we can experiment with different embeddings, top_k values, and LLM models. + +Using the Agenta SDK, we'll define a configuration schema for our application and create an endpoint to enable playground communication. Then, we'll deploy the application to Agenta Cloud using the Agenta CLI for testing. Agenta handles all infrastructure work needed to create our application service. + +### Defining the configuration + +Let's define the configuration schema for our application. This schema will determine what elements appear in the playground UI and what parameters we can experiment with. + +Our configuration includes: + +- **System prompt:** The system prompt template +- **User prompt:** The user prompt template +- **Embedding model:** Choice between OpenAI and Cohere +- **LLM model:** Selection from supported language models +- **Top_k value:** Number of document chunks to retrieve from the vector database +- **Use rerank:** Toggle for Cohere's reranking feature +- **Rerank top_k value:** Number of chunks the reranker should return (used for both reordering and filtering) + +```python +from pydantic import BaseModel, Field +import agenta as ag +from agenta.sdk.assets import supported_llm_models +from agenta.sdk.types import MCField + +class Config(BaseModel): + system_prompt: str = Field(default=system_prompt) + user_prompt: str = Field(default=user_prompt) + embedding_model: str = MCField(default="openai", choices=["openai", "cohere"]) + llm_model: str = MCField(default="gpt-3.5-turbo", choices=supported_llm_models) + top_k: int = Field(default=10, ge=1, le=25) + rerank_top_k: int = Field(default=3, ge=1, le=10) + use_rerank: bool = Field(default=True) +``` + +We implement this using a standard `Config` Pydantic class that inherits from BaseModel. The fields use simple types (str or int). Agenta requires each field to have a default value. For multiple-choice fields, we use `MCField` to specify the available options. + +:::info +`supported_llm_models` is a helper variable provided by Agenta that contains the list available in LiteLLM. +::: + +### Creating the endpoint and using the configuration + +Next, we'll create an endpoint to enable communication between the playground and our application. + +```python +@ag.route("/", config_schema=Config) +def generate(query: str): + config = ag.ConfigManager.get_from_route(Config) + ... +``` + +[The decorator `@ag.route("/", config_schema=Config)`](https://www.notion.so/reference/sdk/custom-workflow#agroute-decorator) registers the `generate` function as an endpoint and uses the `Config` class to define the configuration schema. This creates a `POST /playground/run` endpoint that accepts the configuration as a parameter and runs the workflow. The playground uses this endpoint to interact with the service. + +To get the configuration from the request, we use `ag.ConfigManager.get_from_route(Config)`, which returns a Config object containing the values provided by the playground. + +We can use these configuration values throughout our workflow. For instance, we can use `config.use_rerank` in the `generate` function to control the reranking feature. + +Note that `ag.ConfigManager.get_from_route(Config)` is accessible in any function called within the generate function's execution path, as the configuration is preserved in the context. + +### Adding the application to Agenta + +To connect your application to Agenta, you first need to create a Uvicorn server using the FastAPI app object provided by Agenta. + +Add the following snippet to your application: + +```python +if __name__ == "__main__": + import uvicorn + uvicorn.run(ag.sdk.decorators.routing.app, host="0.0.0.0", port=8000) +``` + +This starts a local server at `http://0.0.0.0:8000`. To make it accessible from the internet, use a tunneling service like ngrok. + +Run the following command to start ngrok: + +```bash +ngrok http 8000 +``` + +ngrok will generate a public URL. Navigate to the overview page in Agenta, create a new custom workflow, and enter this URL. + +Once complete, you can access the playground and begin testing your application. + +<Image + style={{ display: "block", margin: "10px auto" }} + img={require("/images/cookbooks/rag-qa-playground.png")} + alt="Playground for testing the RAG Q&A assistant" + loading="lazy" +/> + +## Evaluating the assistant + +To ensure our assistant provides accurate and relevant answers, we'll use evaluators to assess its performance. We will create two evaluators: + +1. RAG Relevancy Evaluator: Measures how relevant the assistant's answers are with respect to the retrieved context. +2. LLM-as-a-Judge Evaluator: Rates the quality of the assistant's responses. + +For the first, we use the RAG Relevancy evaluator as described in [Agenta's evaluation documentation](/evaluation/evaluators/rag-evaluators). + +**Configuration:** + +- **Question key:** `trace.generate.inputs.query` +- **Answer key:** `trace.generate.outputs` +- **Contexts key:** `trace.generate.llm.internals.context` + +This evaluator measures how relevant the assistant's answers are with respect to the retrieved context. Note that we use `trace.generate.llm.internals.context`, which we previously stored in the span, to get the context from the trace. + +You can use the evaluator playground to configure the evaluator and identify the correct trace data to use in your configuration (see image below). + +<Image + style={{ display: "block", margin: "10px auto" }} + img={require("/images/cookbooks/rag-qa-eval-config.png")} + alt="Configuration of the RAG Relevancy evaluator" + loading="lazy" +/> + +We set and test an LLM-as-a-Judge evaluator to rate the quality of the assistant's responses the same way. More details on setting up LLM-as-a-Judge evaluators can be found [here](/evaluation/evaluators/llm-as-a-judge). + +## Deploying the assistant + +After iterating through various prompts and parameters and evaluating their performance, we can deploy our satisfied solution as an API endpoint using Agenta. + +Simply click the `Deploy` button in the playground to accomplish this. + +Agenta provides us with [two endpoints](/prompt-engineering/prompt-management/how-to-integrate-with-agenta) to interact with our deployed application: + +- The first allows us to directly invoke the deployed application with the production configuration. +- The second allows us to fetch the deployed configuration as a JSON and use it in our self-deployed application. + +## Conclusion + +In this tutorial, we built a documentation Q&A system using RAG, but more importantly, we created a comprehensive LLMOps workflow that includes: + +- A **playground** for testing different embeddings, prompts, and retrieval parameters in real time +- **Observability tools** for debugging multi-step RAG workflows and monitoring production performance +- **Evaluation pipelines** for assessing both RAG relevancy and response quality +- **Deployment capabilities** for smoothly transitioning from experimentation to production + +This workflow shows how to evolve beyond a basic RAG implementation to build a production-ready system with robust testing, monitoring, and iteration capabilities. diff --git a/docs/docs/tutorials/cookbooks/_RAG-QA-docs.mdx b/docs/docs/tutorials/cookbooks/_RAG-QA-docs.mdx deleted file mode 100644 index 61ea9a179c..0000000000 --- a/docs/docs/tutorials/cookbooks/_RAG-QA-docs.mdx +++ /dev/null @@ -1,580 +0,0 @@ ---- -title: "RAG Q&A over Documentation" -description: "Build a Q&A system for your documentation using RAG with Agenta, Litellm and Qdrant. Evaluate it using Ragas Context relevancy and LLM-as-a-judge. Deploy it as an API endpoint." ---- - -:::info Open in Github -The code for this tutorial is available [here](https://github.com/Agenta-AI/agenta/tree/main/examples/custom_workflows/rag-docs-qa). -::: - -```mdx-code-block -import Image from "@theme/IdealImage"; -``` - -In this tutorial, we'll build a Q&A system for our documentation using RAG (Retrieval-Augmented Generation). Our AI assistant will answer user queries by retrieving relevant sections from our documentation and using them as context when calling an LLM. - -At the end, we will have: - -- A **playground** for testing different embeddings, adjusting top_k values (number of context chunks to include), and experimenting with various prompts and models -- **LLM-as-a-judge** and **RAG context relevancy** evaluations for our Q&A application -- **Observability** with Agenta to debug and monitor our application -- A **deployment** that we can either [directly invoke](/prompt-engineering/integrating-prompts/proxy-calls) **or** [fetch the configuration](/reference/sdk/configuration-management#get_from_registry) to run elsewhere - -You can try our playground by creating a free account at [https://cloud.agenta.ai](https://cloud.agenta.ai) and opening the demo. - -<Image - style={{ display: "block", margin: "10px auto" }} - img={require("/images/cookbooks/rag-qa-playground.png")} - alt="Playground for testing the RAG " - loading="lazy" -/> - -## Our stack - -- **Agenta** for playground, evaluation, observability, and deployment. -- **[LiteLLM](https://github.com/BerriAI/litellm)** for interacting with language models and embeddings. -- **[Qdrant](https://qdrant.tech/)** as our vector database for storing and querying document embeddings. - -## Ingestion pipeline - -The first step is to process our documentation and store it in a vector database for retrieval. Let's start by looking at how we ingest our documentation into Qdrant. - -```python title="ingest.py" - -OPENAI_EMBEDDING_DIM = 1536 # For text-embedding-ada-002 -COHERE_EMBEDDING_DIM = 1024 # For embed-english-v3.0 - -qdrant_client = QdrantClient( - url=os.getenv("QDRANT_URL"), api_key=os.getenv("QDRANT_API_KEY") -) - - -def chunk_text(text: str, max_chunk_size: int = 1500) -> List[str]: - """ - Split text into chunks based on paragraphs and size. - Tries to maintain context by keeping paragraphs together when possible. - """ - # Split by double newlines to preserve paragraph structure - paragraphs = [p.strip() for p in text.split("\n\n") if p.strip()] - - chunks = [] - current_chunk = [] - current_size = 0 - - for paragraph in paragraphs: - paragraph_size = len(paragraph) - - # If a single paragraph is too large, split it by sentences - if paragraph_size > max_chunk_size: - sentences = [s.strip() + "." for s in paragraph.split(".") if s.strip()] - for sentence in sentences: - if len(sentence) > max_chunk_size: - # If even a sentence is too long, split it by chunks - for i in range(0, len(sentence), max_chunk_size): - chunks.append(sentence[i : i + max_chunk_size]) - elif current_size + len(sentence) > max_chunk_size: - # Start new chunk - chunks.append(" ".join(current_chunk)) - current_chunk = [sentence] - current_size = len(sentence) - else: - current_chunk.append(sentence) - current_size += len(sentence) - # If adding this paragraph would exceed the limit, start a new chunk - elif current_size + paragraph_size > max_chunk_size: - chunks.append(" ".join(current_chunk)) - current_chunk = [paragraph] - current_size = paragraph_size - else: - current_chunk.append(paragraph) - current_size += paragraph_size - - # Add the last chunk if it exists - if current_chunk: - chunks.append(" ".join(current_chunk)) - - return chunks - - -def process_doc(file_path: str, docs_path: str, docs_base_url: str) -> List[Dict]: - """Process a single document into chunks with metadata.""" - with open(file_path, "r", encoding="utf-8") as f: - # Parse frontmatter and content - post = frontmatter.load(f) - content = post.content - - # Calculate document hash - doc_hash = calculate_doc_hash(content) - - # Get document URL - doc_url = get_doc_url(file_path, docs_path, docs_base_url) - - # Create base metadata - metadata = { - "title": post.get("title", ""), - "url": doc_url, - "file_path": file_path, - "last_updated": datetime.utcnow().isoformat(), - "doc_hash": doc_hash, - } - - # Chunk the content - chunks = chunk_text(content) - - return [ - {"content": chunk, "metadata": metadata, "doc_hash": doc_hash} - for chunk in chunks - ] - - -def get_embeddings(text: str) -> Dict[str, List[float]]: - """Get embeddings using both OpenAI and Cohere models via LiteLLM.""" - # Get OpenAI embedding - openai_response = embedding(model="text-embedding-ada-002", input=[text]) - openai_embedding = openai_response["data"][0]["embedding"] - - # Get Cohere embedding - cohere_response = embedding( - model="cohere/embed-english-v3.0", - input=[text], - input_type="search_document", # Specific to Cohere v3 models - ) - cohere_embedding = cohere_response["data"][0]["embedding"] - - return {"openai": openai_embedding, "cohere": cohere_embedding} - - -def setup_qdrant_collection(): - """Create or recreate the vector collection.""" - # Delete if exists - try: - qdrant_client.delete_collection(COLLECTION_NAME) - except Exception: - pass - - # Create collection with two vector types - qdrant_client.create_collection( - collection_name=COLLECTION_NAME, - vectors_config={ - "openai": models.VectorParams( - size=OPENAI_EMBEDDING_DIM, distance=models.Distance.COSINE - ), - "cohere": models.VectorParams( - size=COHERE_EMBEDDING_DIM, distance=models.Distance.COSINE - ), - }, - ) - - -def upsert_chunks(chunks: List[Dict]): - """Upsert document chunks to the vector store.""" - for i, chunk in enumerate(chunks): - # Get both embeddings using LiteLLM - embeddings = get_embeddings(chunk["content"]) - - # Create payload - payload = {**chunk["metadata"], "content": chunk["content"], "chunk_index": i} - - # Upsert to Qdrant - qdrant_client.upsert( - collection_name=COLLECTION_NAME, - points=[ - models.PointStruct( - id=f"{chunk['doc_hash']}", - payload=payload, - vector=embeddings, # Contains both 'openai' and 'cohere' embeddings - ) - ], - ) - - -def main(): - # Get environment variables - docs_path = os.getenv("DOCS_PATH") - docs_base_url = os.getenv("DOCS_BASE_URL") - - if not docs_path or not docs_base_url: - raise ValueError("DOCS_PATH and DOCS_BASE_URL must be set in .env file") - - # Create fresh collection - setup_qdrant_collection() - - # Process all documents - all_docs = get_all_docs(docs_path) - for doc_path in tqdm.tqdm(all_docs): - print(f"Processing {doc_path}") - chunks = process_doc(doc_path, docs_path, docs_base_url) - upsert_chunks(chunks) -``` - -This script performs the following steps: - -1. **Loads documentation files:** Reads all `.mdx` files from the documentation directory. -2. **Processes documents:** Chunks the text, adds metadata (e.g. the url where the page where to be found).. -3. **Generates embeddings:** Generate embeddings for each chunk using both OpenAI and Cohere models. We use both because we would like to compare them in the playground. -4. **Stores embeddings in Qdrant:** Upserts the embeddings into a Qdrant collection for later retrieval. We use named vectors to save multiple embeddings for the same document. - -To run the ingestion pipeline, you need first to create a collection in Qdrant and then set the following environment variables: - -- `QDRANT_URL`: The URL of your Qdrant instance. -- `QDRANT_API_KEY`: The API key for your Qdrant instance. -- `DOCS_PATH`: The folder containing the documentation (in our case it's under `agenta/docs/docs`). -- `DOCS_BASE_URL`: The base URL where the documentation can be found (in our case it's `https://docs.agenta.ai`). - -:::info -The complete ingestion script with a setup readme is [available in Github](https://github.com/Agenta-AI/agenta/tree/main/examples/custom_workflows/rag-docs-qa). -::: - -## The query RAG workflow - -Now that we have ingested the documentation into the Qdrant vector database, let's create the query logic for our assistant. Parts related to the Agenta integrations are highlighted. - -```python title="query.py" -#highlight-start -import agenta as ag -from pydantic import BaseModel, Field -from agenta.sdk.assets import supported_llm_models -from agenta.sdk.types import MCField -#highlight-end - -system_prompt = """ -You are a helpful assistant that answers questions based on the documentation. -""" -user_prompt = """ -Here is the query: {query} - -Here is the context: {context} -""" -#highlight-start -ag.init() -#highlight-end - -#highlight-start -litellm.callbacks = [ag.callbacks.litellm_handler()] -#highlight-end - -# Initialize Qdrant client -qdrant_client = QdrantClient( - url=os.getenv("QDRANT_URL"), api_key=os.getenv("QDRANT_API_KEY") -) - -#highlight-start -# We define here the configuration that will be used by the playground -class Config(BaseModel): - system_prompt: str = Field(default=system_prompt) - user_prompt: str = Field(default=user_prompt) - embedding_model: str = MCField(default="openai", choices=["openai", "cohere"]) - llm_model: str = MCField(default="gpt-3.5-turbo", choices=supported_llm_models) - top_k: int = Field(default=10, ge=1, le=25) - rerank_top_k: int = Field(default=3, ge=1, le=10) - use_rerank: bool = Field(default=True) -#highlight-end - - -def get_embeddings(text: str, model: str) -> Dict[str, List[float]]: - """Get embeddings using both OpenAI and Cohere models via LiteLLM.""" - if model == "openai": - return embedding(model="text-embedding-ada-002", input=[text])["data"][0]["embedding"] - elif model == "cohere": - return embedding( - model="cohere/embed-english-v3.0", - input=[text], - input_type="search_query", # Use search_query for queries - )["data"][0]["embedding"] - - raise ValueError(f"Unknown model: {model}") - -#highlight-next-line -@ag.instrument() -def search_docs( - query: str, collection_name: str = os.getenv("COLLECTION_NAME", "docs_collection") -) -> List[Dict]: - """ - Search the documentation using embeddings. - - Args: - query: The search query - collection_name: Name of the Qdrant collection to search - - Returns: - List of dictionaries containing matched documents and their metadata - """ - - #highlight-start - # Get embeddings for the query - config = ag.ConfigManager.get_from_route(Config) - #highlight-end - # Search using embeddings - results = qdrant_client.query_points( - collection_name=collection_name, - query=get_embeddings(query, config.embedding_model), - using=config.embedding_model, - limit=config.top_k, - ) - # Format results - formatted_results = [] - for result in results.points: - formatted_result = { - "content": result.payload["content"], - "metadata": { - "title": result.payload["title"], - "url": result.payload["url"], - "score": result.score, - }, - } - formatted_results.append(formatted_result) - - return formatted_results - -#highlight-next-line -@ag.instrument() -def llm(query: str, results: List[Dict]): - #highlight-next-line - config = ag.ConfigManager.get_from_route(Config) - context = [] - for i, result in enumerate(results, 1): - score = result["metadata"].get("rerank_score", result["metadata"]["score"]) - item = f"Result {i} (Score: {score:.3f})\n" - item += f"Title: {result['metadata']['title']}\n" - item += f"URL: {result['metadata']['url']}\n" - item += f"Content: {result['content']}\n" - item += "-" * 80 + "\n" - context.append(item) - #highlight-start - # We store the context in the trace so that it can be used for evaluation - ag.tracing.store_internals({"context": context}) - #highlight-end - response = completion( - model=config.llm_model, - messages=[ - {"role": "system", "content": config.system_prompt}, - { - "role": "user", - "content": config.user_prompt.format( - query=query, context="".join(context) - ), - }, - ], - ) - return response.choices[0].message.content - -#highlight-next-line -@ag.instrument() -def rerank_results(query: str, results: List[Dict]) -> List[Dict]: - """Rerank the search results using Cohere's reranker.""" - #highlight-start - config = ag.ConfigManager.get_from_route(Config) - #highlight-end - # Format documents for reranking - documents = [result["content"] for result in results] - - # Perform reranking - reranked = rerank( - model="cohere/rerank-english-v3.0", - query=query, - documents=documents, - top_n=config.rerank_top_k, - ) - # Reorder the original results based on reranking - reranked_results = [] - for item in reranked.results: - # The rerank function returns dictionaries with 'document' and 'index' keys - reranked_results.append(results[item["index"]]) - # Add rerank score to metadata - reranked_results[-1]["metadata"]["rerank_score"] = item["relevance_score"] - - return reranked_results - -#highlight-start -# We define here the route that will be used by the playground -@ag.route("/", config_schema=Config) -@ag.instrument() -#highlight-end -def generate(query: str): - #highlight-next-line - config = ag.ConfigManager.get_from_route(Config) - results = search_docs(query) - if config.use_rerank: - reranked_results = rerank_results(query, results) - return llm(query, reranked_results) - else: - return llm(query, results) -``` - -Our system uses a standard RAG workflow consisting of three main steps: - -1. **Searching the documentation:** Uses the query to retrieve relevant documents from Qdrant. -2. **Optionally reranking results:** Improves the relevance of results using Cohere's reranker. -3. **Generating the answer:** Constructs a prompt with the query and context, then calls the LLM to generate the final answer. - -To integrate this script with Agenta, we need to make two main adjustments: - -1. **Instrumentation:** Use `@ag.instrument()` decorator to trace inputs, outputs, and internal variables. -2. **Integration with the Playground:** Use `ag.route()` to define a route and later create a service that will be used to test the app in the playground. - -We'll discuss these in more detail in the next sections. - -## Instrumentation - -Tracing captures the inputs and outputs of all functions and LLM calls in our app. This helps us debug multi-step workflows (for example, determining whether an incorrect response stems from the LLM call or from incorrect context) and monitor usage over time. - -```python -@ag.instrument() -def generate(query: str): - ... -``` - -Instrumenting code in Agenta is straightforward. The `@ag.instrument()` decorator lets you capture function inputs and outputs to create a trace tree. - -Agenta also provides auto-instrumentation for most frameworks and libraries. Since we're using litellm, we'll use Agenta's callback function to automatically instrument its calls. - -For RAG evaluation of our applications, we need to evaluate the relevancy of retrieved context for each query. Since context isn't part of any function's input or output, we'll add it manually to a span using `ag.tracing.store_internals({"context": context})`, which stores internal variables in the ongoing span. - -<Image - style={{ display: "block", margin: "10px auto" }} - img={require("/images/cookbooks/rag-qa-tracing.png")} - alt="Trace view of the RAG Q&A assistant" - loading="lazy" -/> - -## Playground integration - -Agenta provides a custom playground for testing application parameters. Here, we can experiment with different embeddings, top_k values, and LLM models. - -Using the Agenta SDK, we'll define a configuration schema for our application and create an endpoint to enable playground communication. Then, we'll deploy the application to Agenta Cloud using the Agenta CLI for testing. Agenta handles all infrastructure work needed to create our application service. - -### Defining the configuration - -Let's define the configuration schema for our application. This schema will determine what elements appear in the playground UI and what parameters we can experiment with. - -Our configuration includes: - -- **System prompt:** The system prompt template -- **User prompt:** The user prompt template -- **Embedding model:** Choice between OpenAI and Cohere -- **LLM model:** Selection from supported language models -- **Top_k value:** Number of document chunks to retrieve from the vector database -- **Use rerank:** Toggle for Cohere's reranking feature -- **Rerank top_k value:** Number of chunks the reranker should return (used for both reordering and filtering) - -```python -from pydantic import BaseModel, Field -import agenta as ag -from agenta.sdk.assets import supported_llm_models -from agenta.sdk.types import MCField - -class Config(BaseModel): - system_prompt: str = Field(default=system_prompt) - user_prompt: str = Field(default=user_prompt) - embedding_model: str = MCField(default="openai", choices=["openai", "cohere"]) - llm_model: str = MCField(default="gpt-3.5-turbo", choices=supported_llm_models) - top_k: int = Field(default=10, ge=1, le=25) - rerank_top_k: int = Field(default=3, ge=1, le=10) - use_rerank: bool = Field(default=True) -``` - -We implement this using a standard `Config` Pydantic class that inherits from BaseModel. The fields use simple types (str or int). Agenta requires each field to have a default value. For multiple-choice fields, we use `MCField` to specify the available options. - -:::info -`supported_llm_models` is a helper variable provided by Agenta that contains the list available in LiteLLM. -::: - -### Creating the endpoint and using the configuration - -Next, we'll create an endpoint to enable communication between the playground and our application. - -```python -@ag.route("/", config_schema=Config) -def generate(query: str): - config = ag.ConfigManager.get_from_route(Config) - ... -``` - -[The decorator `@ag.route("/", config_schema=Config)`](https://www.notion.so/reference/sdk/custom-workflow#agroute-decorator) registers the `generate` function as an endpoint and uses the `Config` class to define the configuration schema. This creates a `POST /playground/run` endpoint that accepts the configuration as a parameter and runs the workflow. The playground uses this endpoint to interact with the service. - -To get the configuration from the request, we use `ag.ConfigManager.get_from_route(Config)`, which returns a Config object containing the values provided by the playground. - -We can use these configuration values throughout our workflow. For instance, we can use `config.use_rerank` in the `generate` function to control the reranking feature. - -Note that `ag.ConfigManager.get_from_route(Config)` is accessible in any function called within the generate function's execution path, as the configuration is preserved in the context. - -### Adding the application to Agenta - -To connect your application to Agenta, you first need to create a Uvicorn server using the FastAPI app object provided by Agenta. - -Add the following snippet to your application: - -```python -if __name__ == "__main__": - import uvicorn - uvicorn.run(ag.sdk.decorators.routing.app, host="0.0.0.0", port=8000) -``` - -This starts a local server at `http://0.0.0.0:8000`. To make it accessible from the internet, use a tunneling service like ngrok. - -Run the following command to start ngrok: - -```bash -ngrok http 8000 -``` - -ngrok will generate a public URL. Navigate to the overview page in Agenta, create a new custom workflow, and enter this URL. - -Once complete, you can access the playground and begin testing your application. - -<Image - style={{ display: "block", margin: "10px auto" }} - img={require("/images/cookbooks/rag-qa-playground.png")} - alt="Playground for testing the RAG Q&A assistant" - loading="lazy" -/> - -## Evaluating the assistant - -To ensure our assistant provides accurate and relevant answers, we'll use evaluators to assess its performance. We will create two evaluators: - -1. RAG Relevancy Evaluator: Measures how relevant the assistant's answers are with respect to the retrieved context. -2. LLM-as-a-Judge Evaluator: Rates the quality of the assistant's responses. - -For the first, we use the RAG Relevancy evaluator as described in [Agenta's evaluation documentation](/evaluation/configure-evaluators/rag-evaluators). - -**Configuration:** - -- **Question key:** `trace.generate.inputs.query` -- **Answer key:** `trace.generate.outputs` -- **Contexts key:** `trace.generate.llm.internals.context` - -This evaluator measures how relevant the assistant's answers are with respect to the retrieved context. Note that we use `trace.generate.llm.internals.context`, which we previously stored in the span, to get the context from the trace. - -You can use the evaluator playground to configure the evaluator and identify the correct trace data to use in your configuration (see image below). - -<Image - style={{ display: "block", margin: "10px auto" }} - img={require("/images/cookbooks/rag-qa-eval-config.png")} - alt="Configuration of the RAG Relevancy evaluator" - loading="lazy" -/> - -We set and test an LLM-as-a-Judge evaluator to rate the quality of the assistant's responses the same way. More details on setting up LLM-as-a-Judge evaluators can be found [here](/evaluation/configure-evaluators/llm-as-a-judge). - -## Deploying the assistant - -After iterating through various prompts and parameters and evaluating their performance, we can deploy our satisfied solution as an API endpoint using Agenta. - -Simply click the `Deploy` button in the playground to accomplish this. - -Agenta provides us with [two endpoints](/prompt-engineering/integrating-prompts/integrating-with-agenta) to interact with our deployed application: - -- The first allows us to directly invoke the deployed application with the production configuration. -- The second allows us to fetch the deployed configuration as a JSON and use it in our self-deployed application. - -## Conclusion - -In this tutorial, we built a documentation Q&A system using RAG, but more importantly, we created a comprehensive LLMOps workflow that includes: - -- A **playground** for testing different embeddings, prompts, and retrieval parameters in real time -- **Observability tools** for debugging multi-step RAG workflows and monitoring production performance -- **Evaluation pipelines** for assessing both RAG relevancy and response quality -- **Deployment capabilities** for smoothly transitioning from experimentation to production - -This workflow shows how to evolve beyond a basic RAG implementation to build a production-ready system with robust testing, monitoring, and iteration capabilities. diff --git a/docs/docs/tutorials/sdk/_evaluate-with-SDK.mdx b/docs/docs/tutorials/sdk/_evaluate-with-SDK.mdx deleted file mode 100644 index d390b7962e..0000000000 --- a/docs/docs/tutorials/sdk/_evaluate-with-SDK.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "Run LLM Evaluations with SDK" -sidebar_label: "Evaluate with SDK" -description: Learn how to run LLM app evaluations programmatically using the Agenta SDK. This guide covers creating test sets, configuring evaluators, running evaluations, and retrieving results. ---- - -```mdx-code-block -import GoogleColabButton from "@site/src/components/GoogleColabButton"; -``` - -In this cookbook we will show how to interact with evaluation in agenta programatically. Either using the SDK (or the raw API). - -We will do the following: - -- Create a test set -- Create and configure an evaluator -- Run an evaluation -- Retrieve the results of evaluations - -We assume that you have already created an LLM application and variants in agenta. - -<GoogleColabButton notebookPath="examples/jupyter/evaluations_with_sdk.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> -### Architectural Overview: - -In this scenario, evaluations are executed on the Agenta backend. Specifically, Agenta invokes the LLM application for each row in the test set and subsequently processes the output using the designated evaluator. -This operation is managed through Celery tasks. The interactions with the LLM application are asynchronous, batched, and include retry mechanisms. Additionally, the batching configuration can be adjusted to avoid exceeding the rate limits imposed by the LLM provider. - -## Setup - -```python -! pip install -U agenta -``` - -## Configuration Setup - -```python -# Assuming an application has already been created through the user interface, you will need to obtain the application ID. -# In this example we will use the default template single_prompt which has the prompt "Determine the capital of {country}" - -# You can find the application ID in the URL. For example, in the URL https://cloud.agenta.ai/apps/666dde95962bbaffdb0072b5/playground?variant=app.default, the application ID is `666dde95962bbaffdb0072b5`. -from agenta.client.client import AgentaApi -# Let's list the applications -client.apps.list_apps() -``` - -```python - -app_id = "667d8cfad1812781f7e375d9" - -# You can create the API key under the settings page. If you are using the OSS version, you should keep this as an empty string -api_key = "EUqJGOUu.xxxx" - -# Host. -host = "https://cloud.agenta.ai" - -# Initialize the client - -client = AgentaApi(base_url=host + "/api", api_key=api_key) -``` - -## Create a test set - -```python -from agenta.client.types.new_testset import NewTestset - -csvdata = [ - {"country": "france", "capital": "Paris"}, - {"country": "Germany", "capital": "paris"} - ] - -response = client.testsets.create_testset(request=NewTestset(name="test set", csvdata=csvdata)) -test_set_id = response.id - -# let's now update it - -csvdata = [ - {"country": "france", "capital": "Paris"}, - {"country": "Germany", "capital": "Berlin"} - ] - -client.testsets.update_testset(testset_id=test_set_id, request=NewTestset(name="test set", csvdata=csvdata)) -``` - -# Create evaluators - -```python -# Create an evaluator that performs an exact match comparison on the 'capital' column -# You can find the list of evaluator keys and evaluators and their configurations in https://github.com/Agenta-AI/agenta/blob/main/agenta-backend/agenta_backend/resources/evaluators/evaluators.py -response = client.evaluators.create_new_evaluator_config(app_id=app_id, name="capital_evaluator", evaluator_key="auto_exact_match", settings_values={"correct_answer_key": "capital"}) -exact_match_eval_id = response.id - -code_snippet = """ -from typing import Dict - -def evaluate( - app_params: Dict[str, str], - inputs: Dict[str, str], - output: str, # output of the llm app - datapoint: Dict[str, str] # contains the testset row -) -> float: - if output and output[0].isupper(): - return 1.0 - else: - return 0.0 -""" - -response = client.evaluators.create_new_evaluator_config(app_id=app_id, name="capital_letter_evaluator", evaluator_key="auto_custom_code_run", settings_values={"code": code_snippet}) -letter_match_eval_id = response.id -``` - -```python -# get list of all evaluators -client.evaluators.get_evaluator_configs(app_id=app_id) -``` - -# Run an evaluation - -```python -response = client.apps.list_app_variants(app_id=app_id) -print(response) -myvariant_id = response[0].variant_id -``` - -```python -# Run an evaluation -from agenta.client.types.llm_run_rate_limit import LlmRunRateLimit -response = client.evaluations.create_evaluation(app_id=app_id, variant_ids=[myvariant_id], testset_id=test_set_id, evaluators_configs=[exact_match_eval_id, letter_match_eval_id], - rate_limit=LlmRunRateLimit( - batch_size=10, # number of rows to call in parallel - max_retries=3, # max number of time to retry a failed llm call - retry_delay=2, # delay before retrying a failed llm call - delay_between_batches=5, # delay between batches - ),) -print(response) -``` - -```python -# check the status -client.evaluations.fetch_evaluation_status('667d98fbd1812781f7e3761a') -``` - -```python -# fetch the overall results -response = client.evaluations.fetch_evaluation_results('667d98fbd1812781f7e3761a') - -results = [(evaluator["evaluator_config"]["name"], evaluator["result"]) for evaluator in response["results"]] -# End of Selection -``` - -```python -# fetch the detailed results -client.evaluations.fetch_evaluation_scenarios(evaluations_ids='667d98fbd1812781f7e3761a') -``` diff --git a/docs/docs/tutorials/sdk/evaluate-with-SDK.mdx b/docs/docs/tutorials/sdk/evaluate-with-SDK.mdx new file mode 100644 index 0000000000..82ff20c03d --- /dev/null +++ b/docs/docs/tutorials/sdk/evaluate-with-SDK.mdx @@ -0,0 +1,152 @@ +--- +title: "Evaluate with SDK" +--- + +:::note +This guide is also available as a [Jupyter Notebook](https://github.com/Agenta-AI/agenta/blob/main/cookbook/evaluations_with_sdk.ipynb). +::: + +# Using evaluations with the SDK + +In this cookbook we will show how to interact with evaluation in agenta programatically. Either using the SDK (or the raw API). + +We will do the following: + +- Create a test set +- Create and configure an evaluator +- Run an evaluation +- Retrieve the results of evaluations + +We assume that you have already created an LLM application and variants in agenta. + +### Architectural Overview: + +In this scenario, evaluations are executed on the Agenta backend. Specifically, Agenta invokes the LLM application for each row in the test set and subsequently processes the output using the designated evaluator. +This operation is managed through Celery tasks. The interactions with the LLM application are asynchronous, batched, and include retry mechanisms. Additionally, the batching configuration can be adjusted to avoid exceeding the rate limits imposed by the LLM provider. + +## Setup + +```python +! pip install -U agenta +``` + +## Configuration Setup + +```python +# Assuming an application has already been created through the user interface, you will need to obtain the application ID. +# In this example we will use the default template single_prompt which has the prompt "Determine the capital of {country}" + +# You can find the application ID in the URL. For example, in the URL https://cloud.agenta.ai/apps/666dde95962bbaffdb0072b5/playground?variant=app.default, the application ID is `666dde95962bbaffdb0072b5`. +from agenta.client.client import AgentaApi +# Let's list the applications +client.apps.list_apps() +``` + +```python + +app_id = "667d8cfad1812781f7e375d9" + +# You can create the API key under the settings page. If you are using the OSS version, you should keep this as an empty string +api_key = "EUqJGOUu.xxxx" + +# Host. +host = "https://cloud.agenta.ai" + +# Initialize the client + +client = AgentaApi(base_url=host + "/api", api_key=api_key) +``` + +## Create a test set + +```python +from agenta.client.types.new_testset import NewTestset + +csvdata = [ + {"country": "france", "capital": "Paris"}, + {"country": "Germany", "capital": "paris"} + ] + +response = client.testsets.create_testset(request=NewTestset(name="test set", csvdata=csvdata)) +test_set_id = response.id + +# let's now update it + +csvdata = [ + {"country": "france", "capital": "Paris"}, + {"country": "Germany", "capital": "Berlin"} + ] + +client.testsets.update_testset(testset_id=test_set_id, request=NewTestset(name="test set", csvdata=csvdata)) +``` + +# Create evaluators + +```python +# Create an evaluator that performs an exact match comparison on the 'capital' column +# You can find the list of evaluator keys and evaluators and their configurations in https://github.com/Agenta-AI/agenta/blob/main/agenta-backend/agenta_backend/resources/evaluators/evaluators.py +response = client.evaluators.create_new_evaluator_config(app_id=app_id, name="capital_evaluator", evaluator_key="auto_exact_match", settings_values={"correct_answer_key": "capital"}) +exact_match_eval_id = response.id + +code_snippet = """ +from typing import Dict + +def evaluate( + app_params: Dict[str, str], + inputs: Dict[str, str], + output: str, # output of the llm app + datapoint: Dict[str, str] # contains the testset row +) -> float: + if output and output[0].isupper(): + return 1.0 + else: + return 0.0 +""" + +response = client.evaluators.create_new_evaluator_config(app_id=app_id, name="capital_letter_evaluator", evaluator_key="auto_custom_code_run", settings_values={"code": code_snippet}) +letter_match_eval_id = response.id +``` + +```python +# get list of all evaluators +client.evaluators.get_evaluator_configs(app_id=app_id) +``` + +# Run an evaluation + +```python +response = client.apps.list_app_variants(app_id=app_id) +print(response) +myvariant_id = response[0].variant_id +``` + +```python +# Run an evaluation +from agenta.client.types.llm_run_rate_limit import LlmRunRateLimit +response = client.evaluations.create_evaluation(app_id=app_id, variant_ids=[myvariant_id], testset_id=test_set_id, evaluators_configs=[exact_match_eval_id, letter_match_eval_id], + rate_limit=LlmRunRateLimit( + batch_size=10, # number of rows to call in parallel + max_retries=3, # max number of time to retry a failed llm call + retry_delay=2, # delay before retrying a failed llm call + delay_between_batches=5, # delay between batches + ),) +print(response) +``` + +```python +# check the status +client.evaluations.fetch_evaluation_status('667d98fbd1812781f7e3761a') +``` + +```python +# fetch the overall results +response = client.evaluations.fetch_evaluation_results('667d98fbd1812781f7e3761a') + +results = [(evaluator["evaluator_config"]["name"], evaluator["result"]) for evaluator in response["results"]] +# End of Selection +``` + +```python +# fetch the detailed results +client.evaluations.fetch_evaluation_scenarios(evaluations_ids='667d98fbd1812781f7e3761a') +``` diff --git a/docs/docs/tutorials/sdk/manage-prompts-with-SDK.mdx b/docs/docs/tutorials/sdk/manage-prompts-with-SDK.mdx index b9316454b4..4532ae3852 100644 --- a/docs/docs/tutorials/sdk/manage-prompts-with-SDK.mdx +++ b/docs/docs/tutorials/sdk/manage-prompts-with-SDK.mdx @@ -3,22 +3,17 @@ title: "Manage Prompts with SDK" --- import Image from "@theme/IdealImage"; -import GoogleColabButton from "@site/src/components/GoogleColabButton"; You can manage prompts easily through Agenta's web UI. But sometimes you might want to do things programmatically instead of using the interface. In this tutorial, we'll use the Agenta SDK to create a new prompt, commit changes, deploy them to production, then fetch their configuration and use it to call the LLM. -<GoogleColabButton notebookPath="examples/jupyter/prompt-management/manage-prompts-with-sdk-tutorial.ipynb"> - Open in Google Colaboratory -</GoogleColabButton> - ## Tutorial Overview Before we begin, let's quickly review how Agenta versions prompts: Agenta follows a structure similar to **git** for prompt versioning. Instead of having one commit history, it uses **multiple branches (called variants)** where changes can be committed, and **environments** where these changes can be deployed (and used in your application). (You can read more about why we chose this approach [here](/concepts/concepts#motivation)). -You can find more about how prompt versioning works in the [concepts page](/prompt-engineering/concepts). +You can find more about how prompt versioning works in the [concepts page](/concepts/concepts). The workflow for deploying a change to production that we'll follow in this tutorial is: @@ -44,22 +39,14 @@ ag.init() ## Creating a new prompt -We're going to create a new completion prompt called `topic-explainer`. - +Each prompt in Agenta is a unique application. Currently, creating a prompt is only available in the web UI. To create a new prompt, click on "Create a new prompt" and select whether it's a chat or completion prompt. The name of the prompt is the slug we'll use for all operations below. -```Python -# Creates an empty application -app = ag.AppManager.create( - app_slug="topic-explainer", - template_key="SERVICE:completion", # we define here the app type, choices are SERVICE:completion, SERVICE:chat, CUSTOM -) -``` -:::warning -The app created until now is empty. You cannot use it from the UI yet. You need to create a variant and commit changes to it to be able to use it (next section). -::: +We're going to create a new completion prompt called `topic-explainer`. ## Creating a new variant +[Todo: Image showing before and after. The new elements are added in different colors] + Variants are similar to branches in **git**. Any change to the prompt must first be committed to a variant. Here, we'll create a new variant and make our first commit to it using the `VariantManager.create` method: ```python diff --git a/docs/docs/tutorials/videos/creating-test-sets-from-production-data.md b/docs/docs/tutorials/videos/creating-test-sets-from-production-data.md index 3289570b7c..2c56ba11f7 100644 --- a/docs/docs/tutorials/videos/creating-test-sets-from-production-data.md +++ b/docs/docs/tutorials/videos/creating-test-sets-from-production-data.md @@ -82,7 +82,7 @@ Once you have a test set, you can use it in several ways: - Compare your application's output against ground truth answers - Measure performance across different variants -For more information on evaluations, see our [Evaluation documentation](/evaluation/concepts). +For more information on evaluations, see our [Evaluation documentation](/evaluation/overview). ## Test Set Best Practices @@ -102,8 +102,8 @@ For more information on evaluations, see our [Evaluation documentation](/evaluat Even with just inputs (no ground truth), you can evaluate your application using: -1. **[Human evaluation](/evaluation/human-evaluation/quick-start)**: Have people review the outputs for quality -2. **[LLM as a judge](/evaluation/configure-evaluators/llm-as-a-judge)**: Use a prompt that assesses outputs based on criteria like relevance or accuracy +1. **[Human evaluation](/evaluation/human_evaluation)**: Have people review the outputs for quality +2. **[LLM as a judge](/evaluation/evaluators/llm-as-a-judge)**: Use a prompt that assesses outputs based on criteria like relevance or accuracy Adding ground truth expands your evaluation options, allowing you to: - Compare outputs against expected answers @@ -112,6 +112,6 @@ Adding ground truth expands your evaluation options, allowing you to: ## Related Resources -- [Creating Test Sets](/evaluation/managing-test-sets/upload-csv) -- [Configuring Evaluators](/evaluation/configure-evaluators/overview) -- [Running Evaluations](/evaluation/evaluation-from-ui/running-evaluations) +- [Creating Test Sets](/evaluation/create-test-sets) +- [Configuring Evaluators](/evaluation/configure-evaluators) +- [Running Evaluations](/evaluation/no-code-evaluation) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 4d89dcdcfd..50357fbd17 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -23,14 +23,14 @@ const config: Config = { titleDelimiter: "-", // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you - // may want to replace "en" with "zh-Hans". + // may want to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", locales: ["en"], }, scripts: [ - + { src: 'https://www.googletagmanager.com/gtag/js?id=G-LTF78FZS33', async: true, @@ -38,8 +38,8 @@ const config: Config = { { src: '/ga-script.js', async: true, - }, { - src: "/hotjar.js", + },{ + src:"/hotjar.js", async: true, }, ], @@ -84,8 +84,8 @@ const config: Config = { navbar: { logo: { alt: "agenta-ai", - src: "images/Agenta-logo-full-light.png", - srcDark: "images/Agenta-logo-full-dark-accent.png", + src: "images/light-complete-transparent-CROPPED.png", + srcDark: "images/dark-complete-transparent-CROPPED.png", }, hideOnScroll: false, items: [ @@ -95,64 +95,33 @@ const config: Config = { docId: "getting-started/introduction", position: "left", label: "Docs", - customProps: { - icon: { - name: "fileText", - }, - }, }, { type: "docSidebar", sidebarId: "guidesSidebar", position: "left", label: "Tutorials", - customProps: { - icon: { - name: "bookOpen", - }, - }, }, { type: "docSidebar", sidebarId: "refrenceSidebar", position: "left", label: "Reference", - customProps: { - icon: { - name: "code", - }, - }, }, { - to: "/roadmap", + to: "/changelog/main", position: "left", - label: "Roadmap", - customProps: { - icon: { - name: "route", - }, - }, + label: "Changelog", }, { - to: "/changelog/main", + to: "https://agenta.ai/pricing", position: "left", - label: "Changelog", - customProps: { - icon: { - name: "clock", - }, - }, + label: "Pricing", }, { - type: "docSidebar", - sidebarId: "selfHostSidebar", + to: "https://agenta.ai/blog", position: "left", - label: "Self-host", - customProps: { - icon: { - name: "server", - }, - }, + label: "Blog", }, // { @@ -181,7 +150,7 @@ const config: Config = { html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" class="theme-icon nav_github_icons"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" fill="currentColor" /></svg>', }, { - href: "https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw", + href: "https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ", html: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="theme-icon nav_slack_icons"><path d="M94.1 315.1c0 25.9-21.2 47.1-47.1 47.1S0 341 0 315.1c0-25.9 21.2-47.1 47.1-47.1h47.1v47.1zm23.7 0c0-25.9 21.2-47.1 47.1-47.1s47.1 21.2 47.1 47.1v117.8c0 25.9-21.2 47.1-47.1 47.1s-47.1-21.2-47.1-47.1V315.1zm47.1-189c-25.9 0-47.1-21.2-47.1-47.1S139 32 164.9 32s47.1 21.2 47.1 47.1v47.1H164.9zm0 23.7c25.9 0 47.1 21.2 47.1 47.1s-21.2 47.1-47.1 47.1H47.1C21.2 244 0 222.8 0 196.9s21.2-47.1 47.1-47.1H164.9zm189 47.1c0-25.9 21.2-47.1 47.1-47.1 25.9 0 47.1 21.2 47.1 47.1s-21.2 47.1-47.1 47.1h-47.1V196.9zm-23.7 0c0 25.9-21.2 47.1-47.1 47.1-25.9 0-47.1-21.2-47.1-47.1V79.1c0-25.9 21.2-47.1 47.1-47.1 25.9 0 47.1 21.2 47.1 47.1V196.9zM283.1 385.9c25.9 0 47.1 21.2 47.1 47.1 0 25.9-21.2 47.1-47.1 47.1-25.9 0-47.1-21.2-47.1-47.1v-47.1h47.1zm0-23.7c-25.9 0-47.1-21.2-47.1-47.1 0-25.9 21.2-47.1 47.1-47.1h117.8c25.9 0 47.1 21.2 47.1 47.1 0 25.9-21.2 47.1-47.1 47.1H283.1z" fill="currentColor" /></svg>', position: "right", }, @@ -190,11 +159,11 @@ const config: Config = { prism: { theme: prismThemes.github, darkTheme: prismThemes.vsDark, - + prism: { additionalLanguages: ["ruby", "csharp", "php", "java", "powershell", "json", "bash"], - + magicComments: [ // Remember to extend the default highlight class name as well! { @@ -258,7 +227,6 @@ const config: Config = { ], } satisfies Preset.ThemeConfig, algolia: { - askAi: 'I14hRlCxbWzW', appId: "0HZ4ONM2EC", apiKey: "18ab633e81d706cbda7c78d25d0fe763", indexName: "agenta", @@ -310,209 +278,78 @@ const config: Config = { }, ], [ - "@docusaurus/plugin-client-redirects", + "@docusaurus/plugin-client-redirects", { - redirects: [ - { - from: "/prompt-management/creating-a-custom-template", - to: "/custom-workflows/quick-start", - }, - { - from: "/self-host/deploy_remotely/host-remotely", - to: "/self-host/guides/deploy-remotely", - }, - { - from: "/self-host/deploy_remotely/host-on-kubernetes", - to: "/self-host/guides/deploy-to-kubernetes", - }, - { - from: "/self-host/migration/applying-schema-migration", - to: "/self-host/upgrading", - }, - { - from: "/reference/sdk/quick_start", - to: "/reference/sdk/configuration-management", - }, - { - from: "/prompt-management/overview", - to: "/prompt-engineering/concepts", - }, - { - from: "/prompt-management/quick-start", - to: "/prompt-engineering/quick-start", - }, - { - from: "/prompt-management/prompt-management-sdk", - to: "/prompt-engineering/managing-prompts-programatically/create-and-commit", - }, - { - from: "/prompt-management/adding-custom-providers", - to: "/prompt-engineering/playground/custom-providers", - }, - { - from: "/prompt-management/using-the-playground", - to: "/prompt-engineering/playground/using-playground", - }, - { - from: "/prompt-management/integration/how-to-integrate-with-agenta", - to: "/prompt-engineering/integrating-prompts/integrating-with-agenta", - }, - { - from: "/prompt-management/integration/fetch-prompts", - to: "/prompt-engineering/integrating-prompts/fetch-prompt-programatically", - }, - { - from: "/prompt-management/integration/proxy-calls", - to: "/prompt-engineering/integrating-prompts/proxy-calls", - }, - { - from: "/self-host/host-locally", - to: "/self-host/quick-start", - }, - { - from: "/self-host/host-remotely", - to: "/self-host/guides/deploy-remotely", - }, - { - from: "/self-host/host-on-kubernetes", - to: "/self-host/guides/deploy-to-kubernetes", - }, - { - from: "/self-host/applying-schema-migration", - to: "/self-host/upgrading", - }, - // Prompt Engineering restructure redirects - { - from: "/prompt-engineering/overview", - to: "/prompt-engineering/concepts", - }, - { - from: "/prompt-engineering/prompt-management/how-to-integrate-with-agenta", - to: "/prompt-engineering/integrating-prompts/integrating-with-agenta", - }, - { - from: "/prompt-engineering/prompt-management/prompt-management-sdk", - to: "/prompt-engineering/managing-prompts-programatically/create-and-commit", - }, - { - from: "/prompt-engineering/prompt-management/proxy-calls", - to: "/prompt-engineering/integrating-prompts/proxy-calls", - }, - { - from: "/prompt-engineering/playground/using-the-playground", - to: "/prompt-engineering/playground/using-playground", - }, - { - from: "/prompt-engineering/playground/adding-custom-providers", - to: "/prompt-engineering/playground/custom-providers", - }, - // Evaluation restructure redirects - { - from: "/evaluation/create-test-sets", - to: "/evaluation/managing-test-sets/upload-csv", - }, - { - from: "/evaluation/no-code-evaluation", - to: "/evaluation/evaluation-from-ui/running-evaluations", - }, - { - from: "/evaluation/sdk-evaluation", - to: "/evaluation/concepts", - }, - { - from: "/evaluation/configure-evaluators", - to: "/evaluation/configure-evaluators/overview", - }, - { - from: "/evaluation/human_evaluation", - to: "/evaluation/human-evaluation/quick-start", - }, - { - from: "/evaluation/annotate-api", - to: "/observability/trace-with-python-sdk/annotate-traces", - }, - { - from: "/evaluation/evaluators/classification-entiry-extraction", - to: "/evaluation/configure-evaluators/classification-entity-extraction", - }, - { - from: "/evaluation/evaluators/pattern-matching", - to: "/evaluation/configure-evaluators/regex-evaluator", - }, - { - from: "/evaluation/configure-evaluators/pattern-matching", - to: "/evaluation/configure-evaluators/regex-evaluator", - }, - { - from: "/evaluation/evaluators/semantic-similarity", - to: "/evaluation/configure-evaluators/semantic-similarity", - }, - { - from: "/evaluation/evaluators/llm-as-a-judge", - to: "/evaluation/configure-evaluators/llm-as-a-judge", - }, - { - from: "/evaluation/evaluators/rag-evaluators", - to: "/evaluation/configure-evaluators/rag-evaluators", - }, - { - from: "/evaluation/evaluators/custom-evaluator", - to: "/evaluation/configure-evaluators/custom-evaluator", - }, - { - from: "/evaluation/evaluators/webhook-evaluator", - to: "/evaluation/configure-evaluators/webhook-evaluator", - }, - { - from: "/evaluation/quick-start-ui", - to: "/evaluation/evaluation-from-ui/quick-start", - }, - { - from: "/evaluation/quick-start-sdk", - to: "/evaluation/concepts", - }, - { - from: "/evaluation/overview", - to: "/evaluation/concepts", - }, - // Observability restructure redirects - { - from: "/observability/observability-sdk", - to: "/observability/trace-with-python-sdk/setup-tracing", - }, - { - from: "/observability/opentelemetry", - to: "/observability/trace-with-opentelemetry/distributed-tracing", - }, - { - from: "/observability/otel-semconv", - to: "/observability/trace-with-opentelemetry/semantic-conventions", - }, - { - from: "/observability/overview", - to: "/observability/concepts", - }, - { - from: "/observability/quickstart", - to: "/observability/quickstart-python", - }, - { - from: "/observability/trace-with-opentelemetry/setup-tracing", - to: "/observability/trace-with-opentelemetry/getting-started", - }, - { - from: "/observability/using-the-ui/filtering-traces", - to: "/observability/concepts", - }, - { - from: "/observability/concepts/semantic-conventions", - to: "/observability/trace-with-opentelemetry/semantic-conventions", - }, - { - from: "/reference/api", - to: "/reference/api/category", - } - ], + redirects: [ + { + from: "/prompt-management/creating-a-custom-template", + to: "/custom-workflows/quick-start", + }, + { + from: "/self-host/deploy_remotely/host-remotely", + to: "/self-host/guides/deploy-remotely", + }, + { + from: "/self-host/deploy_remotely/host-on-kubernetes", + to: "/self-host/guides/deploy-to-kubernetes", + }, + { + from: "/self-host/migration/applying-schema-migration", + to: "/self-host/upgrading", + }, + { + from: "/reference/sdk/quick_start", + to: "/reference/sdk/configuration-management", + }, + { + from: "/prompt-management/overview", + to: "/prompt-engineering/overview", + }, + { + from: "/prompt-management/quick-start", + to: "/prompt-engineering/quick-start", + }, + { + from: "/prompt-management/prompt-management-sdk", + to: "/prompt-engineering/prompt-management/prompt-management-sdk", + }, + { + from: "/prompt-management/adding-custom-providers", + to: "/prompt-engineering/playground/adding-custom-providers", + }, + { + from: "/prompt-management/using-the-playground", + to: "/prompt-engineering/playground/using-the-playground", + }, + { + from: "/prompt-management/integration/how-to-integrate-with-agenta", + to: "/prompt-engineering/prompt-management/how-to-integrate-with-agenta", + }, + { + from: "/prompt-management/integration/fetch-prompts", + to: "/prompt-engineering/prompt-management/how-to-integrate-with-agenta", + }, + { + from: "/prompt-management/integration/proxy-calls", + to: "/prompt-engineering/prompt-management/proxy-calls", + }, + { + from: "/self-host/host-locally", + to: "/self-host/quick-start", + }, + { + from: "/self-host/host-remotely", + to: "/self-host/guides/deploy-remotely", + }, + { + from: "/self-host/host-on-kubernetes", + to: "/self-host/guides/deploy-to-kubernetes", + }, + { + from: "/self-host/applying-schema-migration", + to: "/self-host/upgrading", + } + ], createRedirects(existingPath) { if (existingPath.includes('/reference/sdk/core_functions')) { return [ @@ -522,7 +359,7 @@ const config: Config = { return undefined; }, - }, + }, ], [ diff --git a/docs/package-lock.json b/docs/package-lock.json index 91fe047adb..80f6cda35a 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -9,18 +9,17 @@ "version": "0.0.0", "dependencies": { "@cloudflare/stream-react": "1.9.1", - "@docsearch/react": "^4.2.0", - "@docusaurus/core": "^3.9.2", - "@docusaurus/plugin-client-redirects": "^3.9.2", - "@docusaurus/plugin-content-docs": "^3.9.2", - "@docusaurus/plugin-ideal-image": "^3.9.2", - "@docusaurus/preset-classic": "^3.9.2", - "@docusaurus/theme-search-algolia": "^3.9.2", + "@docusaurus/core": "3.4.0", + "@docusaurus/plugin-client-redirects": "^3.4.0", + "@docusaurus/plugin-content-docs": "^3.5.2", + "@docusaurus/plugin-ideal-image": "^3.4.0", + "@docusaurus/preset-classic": "3.4.0", + "@docusaurus/theme-search-algolia": "^3.5.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "docusaurus-plugin-image-zoom": "^2.0.0", - "docusaurus-plugin-openapi-docs": "^4.5.1", - "docusaurus-theme-openapi-docs": "^4.5.1", + "docusaurus-plugin-openapi-docs": "3.0.1", + "docusaurus-theme-openapi-docs": "3.0.1", "dotenv": "^16.4.5", "posthog-docusaurus": "^2.0.1", "prism-react-renderer": "^2.3.0", @@ -28,9 +27,9 @@ "react-dom": "^18.0.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.9.2", - "@docusaurus/tsconfig": "^3.9.2", - "@docusaurus/types": "^3.9.2", + "@docusaurus/module-type-aliases": "^3.5.2", + "@docusaurus/tsconfig": "^3.5.2", + "@docusaurus/types": "^3.5.2", "tailwindcss": "^3.4.10", "typescript": "^5.5.4" }, @@ -38,117 +37,45 @@ "node": ">=18.0" } }, - "node_modules/@ai-sdk/gateway": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-2.0.5.tgz", - "integrity": "sha512-5TTDSl0USWY6YGnb4QmJGplFZhk+p9OT7hZevAaER6OGiZ17LB1GypsGYDpNo/MiVMklk8kX4gk6p1/R/EiJ8Q==", - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "2.0.0", - "@ai-sdk/provider-utils": "3.0.15", - "@vercel/oidc": "3.0.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, - "node_modules/@ai-sdk/provider": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-2.0.0.tgz", - "integrity": "sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA==", - "license": "Apache-2.0", - "dependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@ai-sdk/provider-utils": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-3.0.15.tgz", - "integrity": "sha512-kOc6Pxb7CsRlNt+sLZKL7/VGQUd7ccl3/tIK+Bqf5/QhHR0Qm3qRBMz1IwU1RmjJEZA73x+KB5cUckbDl2WF7Q==", - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "2.0.0", - "@standard-schema/spec": "^1.0.0", - "eventsource-parser": "^3.0.6" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, - "node_modules/@ai-sdk/react": { - "version": "2.0.86", - "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-2.0.86.tgz", - "integrity": "sha512-vqxbbMOKMpYFHZy0aYEO4jtDcKaFCHL/rEtTqAIDlH14GT0uusSjN99gkDHHG3EnbyJSQmk9gqtqbd1GDwlRRg==", - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider-utils": "3.0.15", - "ai": "5.0.86", - "swr": "^2.2.5", - "throttleit": "2.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": "^18 || ^19 || ^19.0.0-rc", - "zod": "^3.25.76 || ^4.1.8" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, - "node_modules/@algolia/abtesting": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.8.0.tgz", - "integrity": "sha512-Hb4BkGNnvgCj3F9XzqjiFTpA5IGkjOXwGAOV13qtc27l2qNF8X9rzSp1H5hu8XewlC0DzYtQtZZIOYzRZDyuXg==", + "node_modules/@algolia/autocomplete-core": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.9.tgz", + "integrity": "sha512-O7BxrpLDPJWWHv/DLA9DRFWs+iY1uOJZkqUwjS5HSZAGcl0hIVCQ97LTLewiZmZ402JYUrun+8NqFP+hCknlbQ==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" - }, - "engines": { - "node": ">= 14.0.0" + "@algolia/autocomplete-plugin-algolia-insights": "1.17.9", + "@algolia/autocomplete-shared": "1.17.9" } }, - "node_modules/@algolia/autocomplete-core": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.19.2.tgz", - "integrity": "sha512-mKv7RyuAzXvwmq+0XRK8HqZXt9iZ5Kkm2huLjgn5JoCPtDy+oh9yxUMfDDaVCw0oyzZ1isdJBc7l9nuCyyR7Nw==", + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.9.tgz", + "integrity": "sha512-u1fEHkCbWF92DBeB/KHeMacsjsoI0wFhjZtlCq2ddZbAehshbZST6Hs0Avkc0s+4UyBGbMDnSuXHLuvRWK5iDQ==", "license": "MIT", "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.19.2", - "@algolia/autocomplete-shared": "1.19.2" + "@algolia/autocomplete-shared": "1.17.9" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" } }, - "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.2.tgz", - "integrity": "sha512-TjxbcC/r4vwmnZaPwrHtkXNeqvlpdyR+oR9Wi2XyfORkiGkLTVhX2j+O9SaCCINbKoDfc+c2PB8NjfOnz7+oKg==", + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.9.tgz", + "integrity": "sha512-Na1OuceSJeg8j7ZWn5ssMu/Ax3amtOwk76u4h5J4eK2Nx2KB5qt0Z4cOapCsxot9VcEN11ADV5aUSlQF4RhGjQ==", "license": "MIT", "dependencies": { - "@algolia/autocomplete-shared": "1.19.2" + "@algolia/autocomplete-shared": "1.17.9" }, "peerDependencies": { - "search-insights": ">= 1 < 3" + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" } }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.2.tgz", - "integrity": "sha512-jEazxZTVD2nLrC+wYlVHQgpBoBB5KPStrJxLzsIFl6Kqd1AlG9sIAGl39V5tECLpIQzB3Qa2T6ZPJ1ChkwMK/w==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.9.tgz", + "integrity": "sha512-iDf05JDQ7I0b7JEA/9IektxN/80a2MZ1ToohfmNS3rfeuQnIKI3IJlIafD0xu4StbtQTghx9T3Maa97ytkXenQ==", "license": "MIT", "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", @@ -160,7 +87,6 @@ "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.24.0.tgz", "integrity": "sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/cache-common": "4.24.0" } @@ -169,29 +95,27 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.24.0.tgz", "integrity": "sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@algolia/cache-in-memory": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.24.0.tgz", "integrity": "sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/cache-common": "4.24.0" } }, "node_modules/@algolia/client-abtesting": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.42.0.tgz", - "integrity": "sha512-JLyyG7bb7XOda+w/sp8ch7rEVy6LnWs3qtxr6VJJ2XIINqGsY6U+0L3aJ6QFliBRNUeEAr2QBDxSm8u9Sal5uA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.24.0.tgz", + "integrity": "sha512-pNTIB5YqVVwu6UogvdX8TqsRZENaflqMMjdY7/XIPMNGrBoNH9tewINLI7+qc9tIaOLcAp3ZldqoEwAihZZ3ig==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -202,7 +126,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.24.0.tgz", "integrity": "sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/client-search": "4.24.0", @@ -214,7 +137,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" @@ -225,7 +147,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", @@ -237,7 +158,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.24.0.tgz", "integrity": "sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/client-search": "4.24.0", @@ -250,7 +170,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" @@ -261,7 +180,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", @@ -269,24 +187,24 @@ } }, "node_modules/@algolia/client-common": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.42.0.tgz", - "integrity": "sha512-6iiFbm2tRn6B2OqFv9XDTcw5LdWPudiJWIbRk+fsTX+hkPrPm4e1/SbU+lEYBciPoaTShLkDbRge4UePEyCPMQ==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.24.0.tgz", + "integrity": "sha512-p8K6tiXQTebRBxbrzWIfGCvfkT+Umml+2lzI92acZjHsvl6KYH6igOfVstKqXJRei9pvRzEEvVDNDLXDVleGTA==", "license": "MIT", "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-insights": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.42.0.tgz", - "integrity": "sha512-iEokmw2k6FBa8g/TT7ClyEriaP/FUEmz3iczRoCklEHWSgoABMkaeYrxRXrA2yx76AN+gyZoC8FX0iCJ55dsOg==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.24.0.tgz", + "integrity": "sha512-jOHF0+tixR3IZJMhZPquFNdCVPzwzzXoiqVsbTvfKojeaY6ZXybgUiTSB8JNX+YpsUT8Ebhu3UvRy4mw2PbEzw==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -297,7 +215,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.24.0.tgz", "integrity": "sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", @@ -309,37 +226,36 @@ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" } }, "node_modules/@algolia/client-query-suggestions": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.42.0.tgz", - "integrity": "sha512-9+BIw6rerUfA+eLMIS2lF4mgoeBGTCIHiqb35PLn3699Rm3CaJXz03hChdwAWcA6SwGw0haYXYJa7LF0xI6EpA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.24.0.tgz", + "integrity": "sha512-F8ypOedSMhz6W7zuT5O1SXXsdXSOVhY2U6GkRbYk/mzrhs3jWFR3uQIfeQVWmsJjUwIGZmPoAr9E+T/Zm2M4wA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.42.0.tgz", - "integrity": "sha512-NZR7yyHj2WzK6D5X8gn+/KOxPdzYEXOqVdSaK/biU8QfYUpUuEA0sCWg/XlO05tPVEcJelF/oLrrNY3UjRbOww==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.24.0.tgz", + "integrity": "sha512-k+nuciQuq7WERNNE+hsx3DX636zIy+9R4xdtvW3PANT2a2BDGOv3fv2mta8+QUMcVTVcGe/Mo3QCb4pc1HNoxA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -352,15 +268,15 @@ "license": "MIT" }, "node_modules/@algolia/ingestion": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.42.0.tgz", - "integrity": "sha512-MBkjRymf4BT6VOvMpJlg6kq8K+PkH9q+N+K4YMNdzTXlL40YwOa1wIWQ5LxP/Jhlz64kW5g9/oaMWY06Sy9dcw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.24.0.tgz", + "integrity": "sha512-/lqVxmrvwoA+OyVK4XLMdz/PJaCTW4qYchX1AZ+98fdnH3K6XM/kMydQLfP0bUNGBQbmVrF88MqhqZRnZEn/MA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -370,29 +286,27 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.24.0.tgz", "integrity": "sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@algolia/logger-console": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.24.0.tgz", "integrity": "sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/logger-common": "4.24.0" } }, "node_modules/@algolia/monitoring": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.42.0.tgz", - "integrity": "sha512-kmLs7YfjT4cpr4FnhhRmnoSX4psh9KYZ9NAiWt/YcUV33m0B/Os5L4QId30zVXkOqAPAEpV5VbDPWep+/aoJdQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.24.0.tgz", + "integrity": "sha512-cRisDXQJhvfZCXL4hD22qca2CmW52TniOx6L7pvkaBDx0oQk1k9o+3w11fgfcCG+47OndMeNx5CMpu+K+COMzg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -403,7 +317,6 @@ "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.24.0.tgz", "integrity": "sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/cache-browser-local-storage": "4.24.0", "@algolia/cache-common": "4.24.0", @@ -423,7 +336,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" @@ -434,7 +346,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", @@ -446,7 +357,6 @@ "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0" } @@ -456,18 +366,17 @@ "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.42.0.tgz", - "integrity": "sha512-EbuxgteaYBlKgc2Fs3JzoPIKAIaevAIwmv1F+fakaEXeibG4pkmVNsyTUjpOZIgJ1kXeqNvDrcjRb6g3vYBJ9A==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.24.0.tgz", + "integrity": "sha512-B2Gc+iSxct1WSza5CF6AgfNgmLvVb61d5bqmIWUZixtJIhyAC6lSQZuF+nvt+lmKhQwuY2gYjGGClil8onQvKQ==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0" + "@algolia/client-common": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -477,28 +386,27 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.24.0.tgz", "integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@algolia/requester-fetch": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.42.0.tgz", - "integrity": "sha512-4vnFvY5Q8QZL9eDNkywFLsk/eQCRBXCBpE8HWs8iUsFNHYoamiOxAeYMin0W/nszQj6abc+jNxMChHmejO+ftQ==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.24.0.tgz", + "integrity": "sha512-6E5+hliqGc5w8ZbyTAQ+C3IGLZ/GiX623Jl2bgHA974RPyFWzVSj4rKqkboUAxQmrFY7Z02ybJWVZS5OhPQocA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0" + "@algolia/client-common": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-node-http": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.42.0.tgz", - "integrity": "sha512-gkLNpU+b1pCIwk1hKTJz2NWQPT8gsfGhQasnZ5QVv4jd79fKRL/1ikd86P0AzuIQs9tbbhlMwxsSTyJmlq502w==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.24.0.tgz", + "integrity": "sha512-zM+nnqZpiQj20PyAh6uvgdSz+hD7Rj7UfAZwizqNP+bLvcbGXZwABERobuilkCQqyDBBH4uv0yqIcPRl8dSBEg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0" + "@algolia/client-common": "5.24.0" }, "engines": { "node": ">= 14.0.0" @@ -509,7 +417,6 @@ "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.24.0.tgz", "integrity": "sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/cache-common": "4.24.0", "@algolia/logger-common": "4.24.0", @@ -2254,9 +2161,9 @@ } }, "node_modules/@csstools/cascade-layer-name-parser": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-2.0.5.tgz", - "integrity": "sha512-p1ko5eHgV+MgXFVa4STPKpvPxr6ReS8oS2jzTukjR74i5zJNyWO1ZM1m8YKBXnzDKWfBN1ztLYlHxbVemDD88A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-2.0.4.tgz", + "integrity": "sha512-7DFHlPuIxviKYZrOiwVU/PiHLm3lLUR23OMuEEtfEOQTOp9hzQ2JjdY6X5H18RVuUPJqSCI+qNnD5iOLMVE0bA==", "funding": [ { "type": "github", @@ -2272,14 +2179,14 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" } }, "node_modules/@csstools/color-helpers": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", - "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", + "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", "funding": [ { "type": "github", @@ -2296,9 +2203,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", - "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.3.tgz", + "integrity": "sha512-XBG3talrhid44BY1x3MHzUx/aTG8+x/Zi57M4aTKK9RFB4aLlF3TTSzfzn8nWVHWL3FgAXAxmupmDd6VWww+pw==", "funding": [ { "type": "github", @@ -2314,14 +2221,14 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" } }, "node_modules/@csstools/css-color-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", - "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.9.tgz", + "integrity": "sha512-wILs5Zk7BU86UArYBJTPy/FMPPKVKHMj1ycCEyf3VUptol0JNRLFU/BZsJ4aiIHJEbSLiizzRrw8Pc1uAEDrXw==", "funding": [ { "type": "github", @@ -2334,21 +2241,21 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^5.1.0", - "@csstools/css-calc": "^2.1.4" + "@csstools/color-helpers": "^5.0.2", + "@csstools/css-calc": "^2.1.3" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", - "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", "funding": [ { "type": "github", @@ -2364,13 +2271,13 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-tokenizer": "^3.0.3" } }, "node_modules/@csstools/css-tokenizer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", - "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", "funding": [ { "type": "github", @@ -2387,9 +2294,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", - "integrity": "sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz", + "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==", "funding": [ { "type": "github", @@ -2405,43 +2312,14 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" - } - }, - "node_modules/@csstools/postcss-alpha-function": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-alpha-function/-/postcss-alpha-function-1.0.1.tgz", - "integrity": "sha512-isfLLwksH3yHkFXfCI2Gcaqg7wGGHZZwunoJzEZk0yKYIokgre6hYVFibKL3SYAoR1kBXova8LB+JoO5vZzi9w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/utilities": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" } }, "node_modules/@csstools/postcss-cascade-layers": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-5.0.2.tgz", - "integrity": "sha512-nWBE08nhO8uWl6kSAeCx4im7QfVko3zLrtgWZY4/bP87zrSPpSyN/3W3TDqz1jJuH+kbKOHXg5rJnK+ZVYcFFg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-5.0.1.tgz", + "integrity": "sha512-XOfhI7GShVcKiKwmPAnWSqd2tBR0uxt+runAxttbSp/LY2U16yAVPmAf7e9q4JJ0d+xMNmpwNDLBXnmRCl3HMQ==", "funding": [ { "type": "github", @@ -2500,38 +2378,9 @@ } }, "node_modules/@csstools/postcss-color-function": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-4.0.12.tgz", - "integrity": "sha512-yx3cljQKRaSBc2hfh8rMZFZzChaFgwmO2JfFgFr1vMcF3C/uyy5I4RFIBOIWGq1D+XbKCG789CGkG6zzkLpagA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/utilities": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-color-function-display-p3-linear": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function-display-p3-linear/-/postcss-color-function-display-p3-linear-1.0.1.tgz", - "integrity": "sha512-E5qusdzhlmO1TztYzDIi8XPdPoYOjoTY6HBYBCYSj+Gn4gQRBlvjgPQXzfzuPQqt8EhkC/SzPKObg4Mbn8/xMg==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-4.0.9.tgz", + "integrity": "sha512-2UeQCGMO5+EeQsPQK2DqXp0dad+P6nIz6G2dI06APpBuYBKxZEq7CTH+UiztFQ8cB1f89dnO9+D/Kfr+JfI2hw==", "funding": [ { "type": "github", @@ -2544,10 +2393,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -2558,38 +2407,9 @@ } }, "node_modules/@csstools/postcss-color-mix-function": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-3.0.12.tgz", - "integrity": "sha512-4STERZfCP5Jcs13P1U5pTvI9SkgLgfMUMhdXW8IlJWkzOOOqhZIjcNhWtNJZes2nkBDsIKJ0CJtFtuaZ00moag==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/utilities": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-color-mix-variadic-function-arguments": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-variadic-function-arguments/-/postcss-color-mix-variadic-function-arguments-1.0.2.tgz", - "integrity": "sha512-rM67Gp9lRAkTo+X31DUqMEq+iK+EFqsidfecmhrteErxJZb6tUoJBVQca1Vn1GpDql1s1rD1pKcuYzMsg7Z1KQ==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-3.0.9.tgz", + "integrity": "sha512-Enj7ZIIkLD7zkGCN31SZFx4H1gKiCs2Y4taBo/v/cqaHN7p1qGrf5UTMNSjQFZ7MgClGufHx4pddwFTGL+ipug==", "funding": [ { "type": "github", @@ -2602,10 +2422,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -2616,37 +2436,9 @@ } }, "node_modules/@csstools/postcss-content-alt-text": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@csstools/postcss-content-alt-text/-/postcss-content-alt-text-2.0.8.tgz", - "integrity": "sha512-9SfEW9QCxEpTlNMnpSqFaHyzsiRpZ5J5+KqCu1u5/eEJAWsMhzT40qf0FIbeeglEvrGRMdDzAxMIz3wqoGSb+Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/utilities": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-contrast-color-function": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-contrast-color-function/-/postcss-contrast-color-function-2.0.12.tgz", - "integrity": "sha512-YbwWckjK3qwKjeYz/CijgcS7WDUCtKTd8ShLztm3/i5dhh4NaqzsbYnhm4bjrpFpnLZ31jVcbK8YL77z3GBPzA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@csstools/postcss-content-alt-text/-/postcss-content-alt-text-2.0.5.tgz", + "integrity": "sha512-9BOS535v6YmyOYk32jAHXeddRV+iyd4vRcbrEekpwxmueAXX5J8WgbceFnE4E4Pmw/ysnB9v+n/vSWoFmcLMcA==", "funding": [ { "type": "github", @@ -2659,10 +2451,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -2673,9 +2464,9 @@ } }, "node_modules/@csstools/postcss-exponential-functions": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-2.0.9.tgz", - "integrity": "sha512-abg2W/PI3HXwS/CZshSa79kNWNZHdJPMBXeZNyPQFbbj8sKO3jXxOt/wF7juJVjyDTc6JrvaUZYFcSBZBhaxjw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-2.0.8.tgz", + "integrity": "sha512-vHgDXtGIBPpFQnFNDftMQg4MOuXcWnK91L/7REjBNYzQ/p2Fa/6RcnehTqCRrNtQ46PNIolbRsiDdDuxiHolwQ==", "funding": [ { "type": "github", @@ -2688,9 +2479,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -2726,9 +2517,9 @@ } }, "node_modules/@csstools/postcss-gamut-mapping": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-2.0.11.tgz", - "integrity": "sha512-fCpCUgZNE2piVJKC76zFsgVW1apF6dpYsqGyH8SIeCcM4pTEsRTWTLCaJIMKFEundsCKwY1rwfhtrio04RJ4Dw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-2.0.9.tgz", + "integrity": "sha512-quksIsFm3DGsf8Qbr9KiSGBF2w3RwxSfOfma5wbORDB1AFF15r4EVW7sUuWw3s5IAEGMqzel/dE2rQsI7Yb8mA==", "funding": [ { "type": "github", @@ -2741,9 +2532,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -2753,9 +2544,9 @@ } }, "node_modules/@csstools/postcss-gradients-interpolation-method": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-5.0.12.tgz", - "integrity": "sha512-jugzjwkUY0wtNrZlFeyXzimUL3hN4xMvoPnIXxoZqxDvjZRiSh+itgHcVUWzJ2VwD/VAMEgCLvtaJHX+4Vj3Ow==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-5.0.9.tgz", + "integrity": "sha512-duqTeUHF4ambUybAmhX9KonkicLM/WNp2JjMUbegRD4O8A/tb6fdZ7jUNdp/UUiO1FIdDkMwmNw6856bT0XF8Q==", "funding": [ { "type": "github", @@ -2768,10 +2559,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -2782,9 +2573,9 @@ } }, "node_modules/@csstools/postcss-hwb-function": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-4.0.12.tgz", - "integrity": "sha512-mL/+88Z53KrE4JdePYFJAQWFrcADEqsLprExCM04GDNgHIztwFzj0Mbhd/yxMBngq0NIlz58VVxjt5abNs1VhA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-4.0.9.tgz", + "integrity": "sha512-sDpdPsoGAhYl/PMSYfu5Ez82wXb2bVkg1Cb8vsRLhpXhAk4OSlsJN+GodAql6tqc1B2G/WToxsFU6G74vkhPvA==", "funding": [ { "type": "github", @@ -2797,10 +2588,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -2811,9 +2602,9 @@ } }, "node_modules/@csstools/postcss-ic-unit": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-4.0.4.tgz", - "integrity": "sha512-yQ4VmossuOAql65sCPppVO1yfb7hDscf4GseF0VCA/DTDaBc0Wtf8MTqVPfjGYlT5+2buokG0Gp7y0atYZpwjg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-4.0.1.tgz", + "integrity": "sha512-lECc38i1w3qU9nhrUhP6F8y4BfcQJkR1cb8N6tZNf2llM6zPkxnqt04jRCwsUgNcB3UGKDy+zLenhOYGHqCV+Q==", "funding": [ { "type": "github", @@ -2826,7 +2617,7 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0", "postcss-value-parser": "^4.2.0" }, @@ -2860,9 +2651,9 @@ } }, "node_modules/@csstools/postcss-is-pseudo-class": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-5.0.3.tgz", - "integrity": "sha512-jS/TY4SpG4gszAtIg7Qnf3AS2pjcUM5SzxpApOrlndMeGhIbaTzWBzzP/IApXoNWEW7OhcjkRT48jnAUIFXhAQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-5.0.1.tgz", + "integrity": "sha512-JLp3POui4S1auhDR0n8wHd/zTOWmMsmK3nQd3hhL6FhWPaox5W7j1se6zXOG/aP07wV2ww0lxbKYGwbBszOtfQ==", "funding": [ { "type": "github", @@ -2921,9 +2712,9 @@ } }, "node_modules/@csstools/postcss-light-dark-function": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-2.0.11.tgz", - "integrity": "sha512-fNJcKXJdPM3Lyrbmgw2OBbaioU7yuKZtiXClf4sGdQttitijYlZMD5K7HrC/eF83VRWRrYq6OZ0Lx92leV2LFA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-2.0.8.tgz", + "integrity": "sha512-v8VU5WtrZIyEtk88WB4fkG22TGd8HyAfSFfZZQ1uNN0+arMJdZc++H3KYTfbYDpJRGy8GwADYH8ySXiILn+OyA==", "funding": [ { "type": "github", @@ -2936,9 +2727,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -3040,9 +2831,9 @@ } }, "node_modules/@csstools/postcss-logical-viewport-units": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-3.0.4.tgz", - "integrity": "sha512-q+eHV1haXA4w9xBwZLKjVKAWn3W2CMqmpNpZUk5kRprvSiBEGMgrNH3/sJZ8UA3JgyHaOt3jwT9uFa4wLX4EqQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-3.0.3.tgz", + "integrity": "sha512-OC1IlG/yoGJdi0Y+7duz/kU/beCwO+Gua01sD6GtOtLi7ByQUpcIqs7UE/xuRPay4cHgOMatWdnDdsIDjnWpPw==", "funding": [ { "type": "github", @@ -3055,7 +2846,7 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-tokenizer": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -3066,9 +2857,9 @@ } }, "node_modules/@csstools/postcss-media-minmax": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-2.0.9.tgz", - "integrity": "sha512-af9Qw3uS3JhYLnCbqtZ9crTvvkR+0Se+bBqSr7ykAnl9yKhk6895z9rf+2F4dClIDJWxgn0iZZ1PSdkhrbs2ig==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-2.0.8.tgz", + "integrity": "sha512-Skum5wIXw2+NyCQWUyfstN3c1mfSh39DRAo+Uh2zzXOglBG8xB9hnArhYFScuMZkzeM+THVa//mrByKAfumc7w==", "funding": [ { "type": "github", @@ -3081,10 +2872,10 @@ ], "license": "MIT", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/media-query-list-parser": "^4.0.3" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/media-query-list-parser": "^4.0.2" }, "engines": { "node": ">=18" @@ -3094,9 +2885,9 @@ } }, "node_modules/@csstools/postcss-media-queries-aspect-ratio-number-values": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-3.0.5.tgz", - "integrity": "sha512-zhAe31xaaXOY2Px8IYfoVTB3wglbJUVigGphFLj6exb7cjZRH9A6adyE22XfFK3P2PzwRk0VDeTJmaxpluyrDg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-3.0.4.tgz", + "integrity": "sha512-AnGjVslHMm5xw9keusQYvjVWvuS7KWK+OJagaG0+m9QnIjZsrysD2kJP/tr/UJIyYtMCtu8OkUd+Rajb4DqtIQ==", "funding": [ { "type": "github", @@ -3109,9 +2900,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/media-query-list-parser": "^4.0.3" + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/media-query-list-parser": "^4.0.2" }, "engines": { "node": ">=18" @@ -3172,9 +2963,9 @@ } }, "node_modules/@csstools/postcss-oklab-function": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-4.0.12.tgz", - "integrity": "sha512-HhlSmnE1NKBhXsTnNGjxvhryKtO7tJd1w42DKOGFD6jSHtYOrsJTQDKPMwvOfrzUAk8t7GcpIfRyM7ssqHpFjg==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-4.0.9.tgz", + "integrity": "sha512-UHrnujimwtdDw8BYDcWJtBXuJ13uc/BjAddPdfMc/RsWxhg8gG8UbvTF0tnMtHrZ4i7lwy85fPEzK1AiykMyRA==", "funding": [ { "type": "github", @@ -3187,10 +2978,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -3201,9 +2992,9 @@ } }, "node_modules/@csstools/postcss-progressive-custom-properties": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-4.2.1.tgz", - "integrity": "sha512-uPiiXf7IEKtUQXsxu6uWtOlRMXd2QWWy5fhxHDnPdXKCQckPP3E34ZgDoZ62r2iT+UOgWsSbM4NvHE5m3mAEdw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-4.0.1.tgz", + "integrity": "sha512-Ofz81HaY8mmbP8/Qr3PZlUzjsyV5WuxWmvtYn+jhYGvvjFazTmN9R2io5W5znY1tyk2CA9uM0IPWyY4ygDytCw==", "funding": [ { "type": "github", @@ -3226,9 +3017,9 @@ } }, "node_modules/@csstools/postcss-random-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-random-function/-/postcss-random-function-2.0.1.tgz", - "integrity": "sha512-q+FQaNiRBhnoSNo+GzqGOIBKoHQ43lYz0ICrV+UudfWnEF6ksS6DsBIJSISKQT2Bvu3g4k6r7t0zYrk5pDlo8w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-random-function/-/postcss-random-function-2.0.0.tgz", + "integrity": "sha512-MYZKxSr4AKfjECL8vg49BbfNNzK+t3p2OWX+Xf7rXgMaTP44oy/e8VGWu4MLnJ3NUd9tFVkisLO/sg+5wMTNsg==", "funding": [ { "type": "github", @@ -3241,9 +3032,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -3253,9 +3044,9 @@ } }, "node_modules/@csstools/postcss-relative-color-syntax": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-3.0.12.tgz", - "integrity": "sha512-0RLIeONxu/mtxRtf3o41Lq2ghLimw0w9ByLWnnEVuy89exmEEq8bynveBxNW3nyHqLAFEeNtVEmC1QK9MZ8Huw==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-3.0.9.tgz", + "integrity": "sha512-+AGOcLF5PmMnTRPnOdCvY7AwvD5veIOhTWbJV6vC3hB1tt0ii/k6QOwhWfsGGg1ZPQ0JY15u+wqLR4ZTtB0luA==", "funding": [ { "type": "github", @@ -3268,10 +3059,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -3320,9 +3111,9 @@ } }, "node_modules/@csstools/postcss-sign-functions": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-sign-functions/-/postcss-sign-functions-1.1.4.tgz", - "integrity": "sha512-P97h1XqRPcfcJndFdG95Gv/6ZzxUBBISem0IDqPZ7WMvc/wlO+yU0c5D/OCpZ5TJoTt63Ok3knGk64N+o6L2Pg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@csstools/postcss-sign-functions/-/postcss-sign-functions-1.1.3.tgz", + "integrity": "sha512-4F4GRhj8xNkBtLZ+3ycIhReaDfKJByXI+cQGIps3AzCO8/CJOeoDPxpMnL5vqZrWKOceSATHEQJUO/Q/r2y7OQ==", "funding": [ { "type": "github", @@ -3335,9 +3126,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -3347,9 +3138,9 @@ } }, "node_modules/@csstools/postcss-stepped-value-functions": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-4.0.9.tgz", - "integrity": "sha512-h9btycWrsex4dNLeQfyU3y3w40LMQooJWFMm/SK9lrKguHDcFl4VMkncKKoXi2z5rM9YGWbUQABI8BT2UydIcA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-4.0.8.tgz", + "integrity": "sha512-6Y4yhL4fNhgzbZ/wUMQ4EjFUfoNNMpEXZnDw1JrlcEBHUT15gplchtFsZGk7FNi8PhLHJfCUwVKrEHzhfhKK+g==", "funding": [ { "type": "github", @@ -3362,9 +3153,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -3374,9 +3165,9 @@ } }, "node_modules/@csstools/postcss-text-decoration-shorthand": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-4.0.3.tgz", - "integrity": "sha512-KSkGgZfx0kQjRIYnpsD7X2Om9BUXX/Kii77VBifQW9Ih929hK0KNjVngHDH0bFB9GmfWcR9vJYJJRvw/NQjkrA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-4.0.2.tgz", + "integrity": "sha512-8XvCRrFNseBSAGxeaVTaNijAu+FzUvjwFXtcrynmazGb/9WUdsPCpBX+mHEHShVRq47Gy4peYAoxYs8ltUnmzA==", "funding": [ { "type": "github", @@ -3389,7 +3180,7 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/color-helpers": "^5.1.0", + "@csstools/color-helpers": "^5.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -3400,9 +3191,9 @@ } }, "node_modules/@csstools/postcss-trigonometric-functions": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-4.0.9.tgz", - "integrity": "sha512-Hnh5zJUdpNrJqK9v1/E3BbrQhaDTj5YiX7P61TOvUhoDHnUmsNNxcDAgkQ32RrcWx9GVUvfUNPcUkn8R3vIX6A==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-4.0.8.tgz", + "integrity": "sha512-YcDvYTRu7f78/91B6bX+mE1WoAO91Su7/8KSRpuWbIGUB8hmaNSRu9wziaWSLJ1lOB1aQe+bvo9BIaLKqPOo/g==", "funding": [ { "type": "github", @@ -3415,9 +3206,9 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-calc": "^2.1.3", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" }, "engines": { "node": ">=18" @@ -3480,24 +3271,21 @@ } }, "node_modules/@docsearch/css": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.2.0.tgz", - "integrity": "sha512-65KU9Fw5fGsPPPlgIghonMcndyx1bszzrDQYLfierN+Ha29yotMHzVS94bPkZS6On9LS8dE4qmW4P/fGjtCf/g==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.9.0.tgz", + "integrity": "sha512-cQbnVbq0rrBwNAKegIac/t6a8nWoUAn8frnkLFW6YARaRmAQr5/Eoe6Ln2fqkUCZ40KpdrKbpSAmgrkviOxuWA==", "license": "MIT" }, "node_modules/@docsearch/react": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-4.2.0.tgz", - "integrity": "sha512-zSN/KblmtBcerf7Z87yuKIHZQmxuXvYc6/m0+qnjyNu+Ir67AVOagTa1zBqcxkVUVkmBqUExdcyrdo9hbGbqTw==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.9.0.tgz", + "integrity": "sha512-mb5FOZYZIkRQ6s/NWnM98k879vu5pscWqTLubLFBO87igYYT4VzVazh4h5o/zCvTIZgEt3PvsCOMOswOUo9yHQ==", "license": "MIT", "dependencies": { - "@ai-sdk/react": "^2.0.30", - "@algolia/autocomplete-core": "1.19.2", - "@docsearch/css": "4.2.0", - "ai": "^5.0.30", - "algoliasearch": "^5.28.0", - "marked": "^16.3.0", - "zod": "^4.1.8" + "@algolia/autocomplete-core": "1.17.9", + "@algolia/autocomplete-preset-algolia": "1.17.9", + "@docsearch/css": "3.9.0", + "algoliasearch": "^5.14.2" }, "peerDependencies": { "@types/react": ">= 16.8.0 < 20.0.0", @@ -3521,187 +3309,183 @@ } }, "node_modules/@docsearch/react/node_modules/@algolia/client-analytics": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.42.0.tgz", - "integrity": "sha512-SkCrvtZpdSWjNq9NGu/TtOg4TbzRuUToXlQqV6lLePa2s/WQlEyFw7QYjrz4itprWG9ASuH+StDlq7n49F2sBA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.24.0.tgz", + "integrity": "sha512-IF+r9RRQsIf0ylIBNFxo7c6hDxxuhIfIbffhBXEF1HD13rjhP5AVfiaea9RzbsAZoySkm318plDpH/nlGIjbRA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/@algolia/client-personalization": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.42.0.tgz", - "integrity": "sha512-ivVniRqX2ARd+jGvRHTxpWeOtO9VT+rK+OmiuRgkSunoTyxk0vjeDO7QkU7+lzBOXiYgakNjkZrBtIpW9c+muw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.24.0.tgz", + "integrity": "sha512-Fx/Fp6d8UmDBHecTt0XYF8C9TAaA3qeCQortfGSZzWp4gVmtrUCFNZ1SUwb8ULREnO9DanVrM5hGE8R8C4zZTQ==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/@algolia/recommend": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.42.0.tgz", - "integrity": "sha512-U5yZ8+Jj+A4ZC0IMfElpPcddQ9NCoawD1dKyWmjHP49nzN2Z4284IFVMAJWR6fq/0ddGf4OMjjYO9cnF8L+5tw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.24.0.tgz", + "integrity": "sha512-JTMz0JqN2gidvKa2QCF/rMe8LNtdHaght03px2cluZaZfBRYy8TgHgkCeBspKKvV/abWJwl7J0FzWThCshqT3w==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/algoliasearch": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.42.0.tgz", - "integrity": "sha512-X5+PtWc9EJIPafT/cj8ZG+6IU3cjRRnlHGtqMHK/9gsiupQbAyYlH5y7qt/FtsAhfX5AICHffZy69ZAsVrxWkQ==", - "license": "MIT", - "dependencies": { - "@algolia/abtesting": "1.8.0", - "@algolia/client-abtesting": "5.42.0", - "@algolia/client-analytics": "5.42.0", - "@algolia/client-common": "5.42.0", - "@algolia/client-insights": "5.42.0", - "@algolia/client-personalization": "5.42.0", - "@algolia/client-query-suggestions": "5.42.0", - "@algolia/client-search": "5.42.0", - "@algolia/ingestion": "1.42.0", - "@algolia/monitoring": "1.42.0", - "@algolia/recommend": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.24.0.tgz", + "integrity": "sha512-CkaUygzZ91Xbw11s0CsHMawrK3tl+Ue57725HGRgRzKgt2Z4wvXVXRCtQfvzh8K7Tp4Zp7f1pyHAtMROtTJHxg==", + "license": "MIT", + "dependencies": { + "@algolia/client-abtesting": "5.24.0", + "@algolia/client-analytics": "5.24.0", + "@algolia/client-common": "5.24.0", + "@algolia/client-insights": "5.24.0", + "@algolia/client-personalization": "5.24.0", + "@algolia/client-query-suggestions": "5.24.0", + "@algolia/client-search": "5.24.0", + "@algolia/ingestion": "1.24.0", + "@algolia/monitoring": "1.24.0", + "@algolia/recommend": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, "engines": { "node": ">= 14.0.0" } }, - "node_modules/@docusaurus/core": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.9.2.tgz", - "integrity": "sha512-HbjwKeC+pHUFBfLMNzuSjqFE/58+rLVKmOU3lxQrpsxLBOGosYco/Q0GduBb0/jEMRiyEqjNT/01rRdOMWq5pw==", - "license": "MIT", - "dependencies": { - "@docusaurus/babel": "3.9.2", - "@docusaurus/bundler": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "boxen": "^6.2.1", - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "cli-table3": "^0.6.3", - "combine-promises": "^1.1.0", - "commander": "^5.1.0", - "core-js": "^3.31.1", - "detect-port": "^1.5.1", - "escape-html": "^1.0.3", - "eta": "^2.2.0", - "eval": "^0.1.8", - "execa": "5.1.1", + "node_modules/@docusaurus/babel": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.7.0.tgz", + "integrity": "sha512-0H5uoJLm14S/oKV3Keihxvh8RV+vrid+6Gv+2qhuzbqHanawga8tYnsdpjEyt36ucJjqlby2/Md2ObWjA02UXQ==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.25.9", + "@babel/preset-env": "^7.25.9", + "@babel/preset-react": "^7.25.9", + "@babel/preset-typescript": "^7.25.9", + "@babel/runtime": "^7.25.9", + "@babel/runtime-corejs3": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "babel-plugin-dynamic-import-node": "^2.3.3", "fs-extra": "^11.1.1", - "html-tags": "^3.3.1", - "html-webpack-plugin": "^5.6.0", - "leven": "^3.1.0", - "lodash": "^4.17.21", - "open": "^8.4.0", - "p-map": "^4.0.0", - "prompts": "^2.4.2", - "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", - "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", - "react-loadable-ssr-addon-v5-slorber": "^1.0.1", - "react-router": "^5.3.4", - "react-router-config": "^5.1.1", - "react-router-dom": "^5.3.4", - "semver": "^7.5.4", - "serve-handler": "^6.1.6", - "tinypool": "^1.0.2", - "tslib": "^2.6.0", - "update-notifier": "^6.0.2", - "webpack": "^5.95.0", - "webpack-bundle-analyzer": "^4.10.2", - "webpack-dev-server": "^5.2.2", - "webpack-merge": "^6.0.1" - }, - "bin": { - "docusaurus": "bin/docusaurus.mjs" + "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" + } + }, + "node_modules/@docusaurus/babel/node_modules/@docusaurus/logger": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.7.0.tgz", + "integrity": "sha512-z7g62X7bYxCYmeNNuO9jmzxLQG95q9QxINCwpboVcNff3SJiHJbGrarxxOVMVmAh1MsrSfxWkVGv4P41ktnFsA==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "tslib": "^2.6.0" }, - "peerDependencies": { - "@mdx-js/react": "^3.0.0", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "engines": { + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/@docusaurus/babel": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.9.2.tgz", - "integrity": "sha512-GEANdi/SgER+L7Japs25YiGil/AUDnFFHaCGPBbundxoWtCkA2lmy7/tFmgED4y1htAy6Oi4wkJEQdGssnw9MA==", + "node_modules/@docusaurus/babel/node_modules/@docusaurus/utils": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.7.0.tgz", + "integrity": "sha512-e7zcB6TPnVzyUaHMJyLSArKa2AG3h9+4CfvKXKKWNx6hRs+p0a+u7HHTJBgo6KW2m+vqDnuIHK4X+bhmoghAFA==", "license": "MIT", "dependencies": { - "@babel/core": "^7.25.9", - "@babel/generator": "^7.25.9", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.25.9", - "@babel/preset-env": "^7.25.9", - "@babel/preset-react": "^7.25.9", - "@babel/preset-typescript": "^7.25.9", - "@babel/runtime": "^7.25.9", - "@babel/runtime-corejs3": "^7.25.9", - "@babel/traverse": "^7.25.9", - "@docusaurus/logger": "3.9.2", - "@docusaurus/utils": "3.9.2", - "babel-plugin-dynamic-import-node": "^2.3.3", + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/@docusaurus/babel/node_modules/@docusaurus/utils-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.7.0.tgz", + "integrity": "sha512-IZeyIfCfXy0Mevj6bWNg7DG7B8G+S6o6JVpddikZtWyxJguiQ7JYr0SIZ0qWd8pGNuMyVwriWmbWqMnK7Y5PwA==", + "license": "MIT", + "dependencies": { + "@docusaurus/types": "3.7.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/@docusaurus/bundler": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.9.2.tgz", - "integrity": "sha512-ZOVi6GYgTcsZcUzjblpzk3wH1Fya2VNpd5jtHoCCFcJlMQ1EYXZetfAnRHLcyiFeBABaI1ltTYbOBtH/gahGVA==", + "node_modules/@docusaurus/bundler": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.7.0.tgz", + "integrity": "sha512-CUUT9VlSGukrCU5ctZucykvgCISivct+cby28wJwCC/fkQFgAHRp/GKv2tx38ZmXb7nacrKzFTcp++f9txUYGg==", "license": "MIT", "dependencies": { "@babel/core": "^7.25.9", - "@docusaurus/babel": "3.9.2", - "@docusaurus/cssnano-preset": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", + "@docusaurus/babel": "3.7.0", + "@docusaurus/cssnano-preset": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils": "3.7.0", "babel-loader": "^9.2.1", - "clean-css": "^5.3.3", + "clean-css": "^5.3.2", "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.11.0", + "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "cssnano": "^6.1.2", "file-loader": "^6.2.0", "html-minifier-terser": "^7.2.0", - "mini-css-extract-plugin": "^2.9.2", + "mini-css-extract-plugin": "^2.9.1", "null-loader": "^4.0.1", - "postcss": "^8.5.4", - "postcss-loader": "^7.3.4", - "postcss-preset-env": "^10.2.1", + "postcss": "^8.4.26", + "postcss-loader": "^7.3.3", + "postcss-preset-env": "^10.1.0", + "react-dev-utils": "^12.0.1", "terser-webpack-plugin": "^5.3.9", "tslib": "^2.6.0", "url-loader": "^4.1.1", @@ -3709,7 +3493,7 @@ "webpackbar": "^6.0.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { "@docusaurus/faster": "*" @@ -3720,291 +3504,389 @@ } } }, - "node_modules/@docusaurus/core/node_modules/@types/express-serve-static-core": { - "version": "4.19.7", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", - "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", + "node_modules/@docusaurus/bundler/node_modules/@docusaurus/cssnano-preset": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.7.0.tgz", + "integrity": "sha512-X9GYgruZBSOozg4w4dzv9uOz8oK/EpPVQXkp0MM6Tsgp/nRIU9hJzJ0Pxg1aRa3xCeEQTOimZHcocQFlLwYajQ==", "license": "MIT", "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@docusaurus/core/node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "license": "MIT" - }, - "node_modules/@docusaurus/core/node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "license": "MIT", - "engines": { - "node": ">=12" + "cssnano-preset-advanced": "^6.1.2", + "postcss": "^8.4.38", + "postcss-sort-media-queries": "^5.2.0", + "tslib": "^2.6.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/webpack-dev-server": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.2.tgz", - "integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==", - "license": "MIT", - "dependencies": { - "@types/bonjour": "^3.5.13", - "@types/connect-history-api-fallback": "^1.5.4", - "@types/express": "^4.17.21", - "@types/express-serve-static-core": "^4.17.21", - "@types/serve-index": "^1.9.4", - "@types/serve-static": "^1.15.5", - "@types/sockjs": "^0.3.36", - "@types/ws": "^8.5.10", - "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.2.1", - "chokidar": "^3.6.0", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^2.0.0", - "express": "^4.21.2", - "graceful-fs": "^4.2.6", - "http-proxy-middleware": "^2.0.9", - "ipaddr.js": "^2.1.0", - "launch-editor": "^2.6.1", - "open": "^10.0.3", - "p-retry": "^6.2.0", - "schema-utils": "^4.2.0", - "selfsigned": "^2.4.1", - "serve-index": "^1.9.1", - "sockjs": "^0.3.24", - "spdy": "^4.0.2", - "webpack-dev-middleware": "^7.4.2", - "ws": "^8.18.0" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" + "node_modules/@docusaurus/bundler/node_modules/@docusaurus/logger": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.7.0.tgz", + "integrity": "sha512-z7g62X7bYxCYmeNNuO9jmzxLQG95q9QxINCwpboVcNff3SJiHJbGrarxxOVMVmAh1MsrSfxWkVGv4P41ktnFsA==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "tslib": "^2.6.0" }, "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - }, - "webpack-cli": { - "optional": true - } + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/webpack-dev-server/node_modules/open": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", - "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "node_modules/@docusaurus/bundler/node_modules/@docusaurus/utils": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.7.0.tgz", + "integrity": "sha512-e7zcB6TPnVzyUaHMJyLSArKa2AG3h9+4CfvKXKKWNx6hRs+p0a+u7HHTJBgo6KW2m+vqDnuIHK4X+bhmoghAFA==", "license": "MIT", "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "wsl-utils": "^0.1.0" + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/webpack-merge": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", - "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", + "node_modules/@docusaurus/bundler/node_modules/@docusaurus/utils-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.7.0.tgz", + "integrity": "sha512-IZeyIfCfXy0Mevj6bWNg7DG7B8G+S6o6JVpddikZtWyxJguiQ7JYr0SIZ0qWd8pGNuMyVwriWmbWqMnK7Y5PwA==", "license": "MIT", "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.1" + "@docusaurus/types": "3.7.0", + "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=18.0" } }, - "node_modules/@docusaurus/core/node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "node_modules/@docusaurus/bundler/node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", "license": "MIT", "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": "^14.18.0 || >=16.10.0" } }, - "node_modules/@docusaurus/cssnano-preset": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.9.2.tgz", - "integrity": "sha512-8gBKup94aGttRduABsj7bpPFTX7kbwu+xh3K9NMCF5K4bWBqTFYW+REKHF6iBVDHRJ4grZdIPbvkiHd/XNKRMQ==", + "node_modules/@docusaurus/bundler/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/@docusaurus/bundler/node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", "license": "MIT", "dependencies": { - "cssnano-preset-advanced": "^6.1.2", - "postcss": "^8.5.4", - "postcss-sort-media-queries": "^5.2.0", - "tslib": "^2.6.0" + "repeat-string": "^1.0.0" }, - "engines": { - "node": ">=20.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@docusaurus/logger": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.9.2.tgz", - "integrity": "sha512-/SVCc57ByARzGSU60c50rMyQlBuMIJCjcsJlkphxY6B0GV4UH3tcA1994N8fFfbJ9kX3jIBe/xg3XP5qBtGDbA==", + "node_modules/@docusaurus/bundler/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "license": "MIT", "dependencies": { - "chalk": "^4.1.2", - "tslib": "^2.6.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=20.0" + "node": ">=8" } }, - "node_modules/@docusaurus/lqip-loader": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/lqip-loader/-/lqip-loader-3.9.2.tgz", - "integrity": "sha512-Q9QO0E+HLKhcpKVOIXRVBdJ1bbxxpfSwBll5NsmGxcx1fArH0fFi68cpEztqBg7WwbFRb976MTlqlBuGrMLpuw==", + "node_modules/@docusaurus/bundler/node_modules/webpackbar": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-6.0.1.tgz", + "integrity": "sha512-TnErZpmuKdwWBdMoexjio3KKX6ZtoKHRVvLIU0A47R0VVBDtx3ZyOJDktgYixhoJokZTYTt1Z37OkO9pnGJa9Q==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.9.2", - "file-loader": "^6.2.0", - "lodash": "^4.17.21", - "sharp": "^0.32.3", - "tslib": "^2.6.0" + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "consola": "^3.2.3", + "figures": "^3.2.0", + "markdown-table": "^2.0.0", + "pretty-time": "^1.1.0", + "std-env": "^3.7.0", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=20.0" + "node": ">=14.21.3" + }, + "peerDependencies": { + "webpack": "3 || 4 || 5" } }, - "node_modules/@docusaurus/mdx-loader": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.9.2.tgz", - "integrity": "sha512-wiYoGwF9gdd6rev62xDU8AAM8JuLI/hlwOtCzMmYcspEkzecKrP8J8X+KpYnTlACBUUtXNJpSoCwFWJhLRevzQ==", + "node_modules/@docusaurus/bundler/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "@mdx-js/mdx": "^3.0.0", - "@slorber/remark-comment": "^1.0.0", - "escape-html": "^1.0.3", - "estree-util-value-to-estree": "^3.0.1", - "file-loader": "^6.2.0", - "fs-extra": "^11.1.1", - "image-size": "^2.0.2", - "mdast-util-mdx": "^3.0.0", - "mdast-util-to-string": "^4.0.0", - "rehype-raw": "^7.0.0", - "remark-directive": "^3.0.0", - "remark-emoji": "^4.0.0", - "remark-frontmatter": "^5.0.0", - "remark-gfm": "^4.0.0", - "stringify-object": "^3.3.0", - "tslib": "^2.6.0", - "unified": "^11.0.3", - "unist-util-visit": "^5.0.0", - "url-loader": "^4.1.1", - "vfile": "^6.0.1", - "webpack": "^5.88.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=20.0" + "node": ">=10" }, - "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@docusaurus/module-type-aliases": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.9.2.tgz", - "integrity": "sha512-8qVe2QA9hVLzvnxP46ysuofJUIc/yYQ82tvA/rBTrnpXtCjNSFLxEZfd5U8cYZuJIVlkPxamsIgwd5tGZXfvew==", + "node_modules/@docusaurus/core": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.4.0.tgz", + "integrity": "sha512-g+0wwmN2UJsBqy2fQRQ6fhXruoEa62JDeEa5d8IdTJlMoaDaEDfHh7WjwGRn4opuTQWpjAwP/fbcgyHKlE+64w==", "license": "MIT", "dependencies": { - "@docusaurus/types": "3.9.2", - "@types/history": "^4.7.11", - "@types/react": "*", - "@types/react-router-config": "*", - "@types/react-router-dom": "*", - "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", - "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" - }, - "peerDependencies": { + "@babel/core": "^7.23.3", + "@babel/generator": "^7.23.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "@babel/preset-react": "^7.22.5", + "@babel/preset-typescript": "^7.22.5", + "@babel/runtime": "^7.22.6", + "@babel/runtime-corejs3": "^7.22.6", + "@babel/traverse": "^7.22.8", + "@docusaurus/cssnano-preset": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "autoprefixer": "^10.4.14", + "babel-loader": "^9.1.3", + "babel-plugin-dynamic-import-node": "^2.3.3", + "boxen": "^6.2.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "clean-css": "^5.3.2", + "cli-table3": "^0.6.3", + "combine-promises": "^1.1.0", + "commander": "^5.1.0", + "copy-webpack-plugin": "^11.0.0", + "core-js": "^3.31.1", + "css-loader": "^6.8.1", + "css-minimizer-webpack-plugin": "^5.0.1", + "cssnano": "^6.1.2", + "del": "^6.1.1", + "detect-port": "^1.5.1", + "escape-html": "^1.0.3", + "eta": "^2.2.0", + "eval": "^0.1.8", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "html-minifier-terser": "^7.2.0", + "html-tags": "^3.3.1", + "html-webpack-plugin": "^5.5.3", + "leven": "^3.1.0", + "lodash": "^4.17.21", + "mini-css-extract-plugin": "^2.7.6", + "p-map": "^4.0.0", + "postcss": "^8.4.26", + "postcss-loader": "^7.3.3", + "prompts": "^2.4.2", + "react-dev-utils": "^12.0.1", + "react-helmet-async": "^1.3.0", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", + "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-router": "^5.3.4", + "react-router-config": "^5.1.1", + "react-router-dom": "^5.3.4", + "rtl-detect": "^1.0.4", + "semver": "^7.5.4", + "serve-handler": "^6.1.5", + "shelljs": "^0.8.5", + "terser-webpack-plugin": "^5.3.9", + "tslib": "^2.6.0", + "update-notifier": "^6.0.2", + "url-loader": "^4.1.1", + "webpack": "^5.88.1", + "webpack-bundle-analyzer": "^4.9.0", + "webpack-dev-server": "^4.15.1", + "webpack-merge": "^5.9.0", + "webpackbar": "^5.0.2" + }, + "bin": { + "docusaurus": "bin/docusaurus.mjs" + }, + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/@docusaurus/cssnano-preset": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.4.0.tgz", + "integrity": "sha512-qwLFSz6v/pZHy/UP32IrprmH5ORce86BGtN0eBtG75PpzQJAzp9gefspox+s8IEOr0oZKuQ/nhzZ3xwyc3jYJQ==", + "license": "MIT", + "dependencies": { + "cssnano-preset-advanced": "^6.1.2", + "postcss": "^8.4.38", + "postcss-sort-media-queries": "^5.2.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/@docusaurus/logger": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.4.0.tgz", + "integrity": "sha512-bZwkX+9SJ8lB9kVRkXw+xvHYSMGG4bpYHKGXeXFvyVc79NMeeBSGgzd4TQLHH+DYeOJoCdl8flrFJVxlZ0wo/Q==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/@docusaurus/lqip-loader": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/lqip-loader/-/lqip-loader-3.4.0.tgz", + "integrity": "sha512-F//Gjqcz925zLL1l3Y3XOtQvn927GBIr9ZouvzWF4jHNKuuHBqzOPSADF5O/cT3Vq1ucPWooyhPBxYcvSGF4SA==", + "license": "MIT", + "dependencies": { + "@docusaurus/logger": "3.4.0", + "file-loader": "^6.2.0", + "lodash": "^4.17.21", + "sharp": "^0.32.3", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/@docusaurus/mdx-loader": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.4.0.tgz", + "integrity": "sha512-kSSbrrk4nTjf4d+wtBA9H+FGauf2gCax89kV8SUSJu3qaTdSIKdWERlngsiHaCFgZ7laTJ8a67UFf+xlFPtuTw==", + "license": "MIT", + "dependencies": { + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@mdx-js/mdx": "^3.0.0", + "@slorber/remark-comment": "^1.0.0", + "escape-html": "^1.0.3", + "estree-util-value-to-estree": "^3.0.1", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "image-size": "^1.0.2", + "mdast-util-mdx": "^3.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-raw": "^7.0.0", + "remark-directive": "^3.0.0", + "remark-emoji": "^4.0.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "stringify-object": "^3.3.0", + "tslib": "^2.6.0", + "unified": "^11.0.3", + "unist-util-visit": "^5.0.0", + "url-loader": "^4.1.1", + "vfile": "^6.0.1", + "webpack": "^5.88.1" + }, + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/@docusaurus/module-type-aliases": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.7.0.tgz", + "integrity": "sha512-g7WdPqDNaqA60CmBrr0cORTrsOit77hbsTj7xE2l71YhBn79sxdm7WMK7wfhcaafkbpIh7jv5ef5TOpf1Xv9Lg==", + "license": "MIT", + "dependencies": { + "@docusaurus/types": "3.7.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "@types/react-router-dom": "*", + "react-helmet-async": "npm:@slorber/react-helmet-async@*", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" + }, + "peerDependencies": { "react": "*", "react-dom": "*" } }, "node_modules/@docusaurus/plugin-client-redirects": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.9.2.tgz", - "integrity": "sha512-lUgMArI9vyOYMzLRBUILcg9vcPTCyyI2aiuXq/4npcMVqOr6GfmwtmBYWSbNMlIUM0147smm4WhpXD0KFboffw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-3.4.0.tgz", + "integrity": "sha512-Pr8kyh/+OsmYCvdZhc60jy/FnrY6flD2TEAhl4rJxeVFxnvvRgEhoaIVX8q9MuJmaQoh6frPk94pjs7/6YgBDQ==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "eta": "^2.2.0", "fs-extra": "^11.1.1", "lodash": "^4.17.21", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.9.2.tgz", - "integrity": "sha512-3I2HXy3L1QcjLJLGAoTvoBnpOwa6DPUa3Q0dMK19UTY9mhPkKQg/DYhAGTiBUKcTR0f08iw7kLPqOhIgdV3eVQ==", - "license": "MIT", - "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/theme-common": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "cheerio": "1.0.0-rc.12", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.4.0.tgz", + "integrity": "sha512-vv6ZAj78ibR5Jh7XBUT4ndIjmlAxkijM3Sx5MAAzC1gyv0vupDQNhzuFg1USQmQVj3P5I6bquk12etPV3LJ+Xw==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "cheerio": "^1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^11.1.1", "lodash": "^4.17.21", - "schema-dts": "^1.1.2", + "reading-time": "^1.5.0", "srcset": "^4.0.0", "tslib": "^2.6.0", "unist-util-visit": "^5.0.0", @@ -4012,1761 +3894,2802 @@ "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { - "@docusaurus/plugin-content-docs": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/@docusaurus/plugin-content-blog/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", + "license": "MIT", + "dependencies": { + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", - "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", - "license": "MIT", - "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/module-type-aliases": "3.9.2", - "@docusaurus/theme-common": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.7.0.tgz", + "integrity": "sha512-GXg5V7kC9FZE4FkUZA8oo/NrlRb06UwuICzI6tcbzj0+TVgjq/mpUXXzSgKzMS82YByi4dY2Q808njcBCyy6tQ==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/module-type-aliases": "3.7.0", + "@docusaurus/theme-common": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", "@types/react-router-config": "^5.0.7", "combine-promises": "^1.1.0", "fs-extra": "^11.1.1", "js-yaml": "^4.1.0", "lodash": "^4.17.21", - "schema-dts": "^1.1.2", "tslib": "^2.6.0", "utility-types": "^3.10.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-content-pages": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.9.2.tgz", - "integrity": "sha512-s4849w/p4noXUrGpPUF0BPqIAfdAe76BLaRGAGKZ1gTDNiGxGcpsLcwJ9OTi1/V8A+AzvsmI9pkjie2zjIQZKA==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/core": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.7.0.tgz", + "integrity": "sha512-b0fUmaL+JbzDIQaamzpAFpTviiaU4cX3Qz8cuo14+HGBCwa0evEK0UYCBFY3n4cLzL8Op1BueeroUD2LYAIHbQ==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", + "@docusaurus/babel": "3.7.0", + "@docusaurus/bundler": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "boxen": "^6.2.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cli-table3": "^0.6.3", + "combine-promises": "^1.1.0", + "commander": "^5.1.0", + "core-js": "^3.31.1", + "del": "^6.1.1", + "detect-port": "^1.5.1", + "escape-html": "^1.0.3", + "eta": "^2.2.0", + "eval": "^0.1.8", "fs-extra": "^11.1.1", + "html-tags": "^3.3.1", + "html-webpack-plugin": "^5.6.0", + "leven": "^3.1.0", + "lodash": "^4.17.21", + "p-map": "^4.0.0", + "prompts": "^2.4.2", + "react-dev-utils": "^12.0.1", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", + "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-router": "^5.3.4", + "react-router-config": "^5.1.1", + "react-router-dom": "^5.3.4", + "semver": "^7.5.4", + "serve-handler": "^6.1.6", + "shelljs": "^0.8.5", "tslib": "^2.6.0", - "webpack": "^5.88.1" + "update-notifier": "^6.0.2", + "webpack": "^5.95.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-dev-server": "^4.15.2", + "webpack-merge": "^6.0.1" + }, + "bin": { + "docusaurus": "bin/docusaurus.mjs" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { + "@mdx-js/react": "^3.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-css-cascade-layers": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-css-cascade-layers/-/plugin-css-cascade-layers-3.9.2.tgz", - "integrity": "sha512-w1s3+Ss+eOQbscGM4cfIFBlVg/QKxyYgj26k5AnakuHkKxH6004ZtuLe5awMBotIYF2bbGDoDhpgQ4r/kcj4rQ==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/logger": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.7.0.tgz", + "integrity": "sha512-z7g62X7bYxCYmeNNuO9jmzxLQG95q9QxINCwpboVcNff3SJiHJbGrarxxOVMVmAh1MsrSfxWkVGv4P41ktnFsA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", + "chalk": "^4.1.2", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" } }, - "node_modules/@docusaurus/plugin-debug": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.9.2.tgz", - "integrity": "sha512-j7a5hWuAFxyQAkilZwhsQ/b3T7FfHZ+0dub6j/GxKNFJp2h9qk/P1Bp7vrGASnvA9KNQBBL1ZXTe7jlh4VdPdA==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/mdx-loader": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.7.0.tgz", + "integrity": "sha512-OFBG6oMjZzc78/U3WNPSHs2W9ZJ723ewAcvVJaqS0VgyeUfmzUV8f1sv+iUHA0DtwiR5T5FjOxj6nzEE8LY6VA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "@mdx-js/mdx": "^3.0.0", + "@slorber/remark-comment": "^1.0.0", + "escape-html": "^1.0.3", + "estree-util-value-to-estree": "^3.0.1", + "file-loader": "^6.2.0", "fs-extra": "^11.1.1", - "react-json-view-lite": "^2.3.0", - "tslib": "^2.6.0" + "image-size": "^1.0.2", + "mdast-util-mdx": "^3.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-raw": "^7.0.0", + "remark-directive": "^3.0.0", + "remark-emoji": "^4.0.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "stringify-object": "^3.3.0", + "tslib": "^2.6.0", + "unified": "^11.0.3", + "unist-util-visit": "^5.0.0", + "url-loader": "^4.1.1", + "vfile": "^6.0.1", + "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-google-analytics": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.9.2.tgz", - "integrity": "sha512-mAwwQJ1Us9jL/lVjXtErXto4p4/iaLlweC54yDUK1a97WfkC6Z2k5/769JsFgwOwOP+n5mUQGACXOEQ0XDuVUw==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/theme-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.7.0.tgz", + "integrity": "sha512-8eJ5X0y+gWDsURZnBfH0WabdNm8XMCXHv8ENy/3Z/oQKwaB/EHt5lP9VsTDTf36lKEp0V6DjzjFyFIB+CetL0A==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "tslib": "^2.6.0" + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/module-type-aliases": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "clsx": "^2.0.0", + "parse-numeric-range": "^1.3.0", + "prism-react-renderer": "^2.3.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { + "@docusaurus/plugin-content-docs": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@docusaurus/plugin-google-gtag": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.9.2.tgz", - "integrity": "sha512-YJ4lDCphabBtw19ooSlc1MnxtYGpjFV9rEdzjLsUnBCeis2djUyCozZaFhCg6NGEwOn7HDDyMh0yzcdRpnuIvA==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/utils": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.7.0.tgz", + "integrity": "sha512-e7zcB6TPnVzyUaHMJyLSArKa2AG3h9+4CfvKXKKWNx6hRs+p0a+u7HHTJBgo6KW2m+vqDnuIHK4X+bhmoghAFA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "@types/gtag.js": "^0.0.12", - "tslib": "^2.6.0" + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" - }, - "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "node": ">=18.0" } }, - "node_modules/@docusaurus/plugin-google-tag-manager": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.9.2.tgz", - "integrity": "sha512-LJtIrkZN/tuHD8NqDAW1Tnw0ekOwRTfobWPsdO15YxcicBo2ykKF0/D6n0vVBfd3srwr9Z6rzrIWYrMzBGrvNw==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/utils-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.7.0.tgz", + "integrity": "sha512-IZeyIfCfXy0Mevj6bWNg7DG7B8G+S6o6JVpddikZtWyxJguiQ7JYr0SIZ0qWd8pGNuMyVwriWmbWqMnK7Y5PwA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", + "@docusaurus/types": "3.7.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" - }, - "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "node": ">=18.0" } }, - "node_modules/@docusaurus/plugin-ideal-image": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-ideal-image/-/plugin-ideal-image-3.9.2.tgz", - "integrity": "sha512-YYYbmC2wSYFd7o4//5rPXt9+DkZwfwjCUmyGi5OIVqEbwELK80o3COXs2Xd0BtVIpuRvG7pKCYrMQwVo32Y9qw==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/@docusaurus/utils-validation": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.7.0.tgz", + "integrity": "sha512-w8eiKk8mRdN+bNfeZqC4nyFoxNyI1/VExMKAzD9tqpJfLLbsa46Wfn5wcKH761g9WkKh36RtFV49iL9lh1DYBA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/lqip-loader": "3.9.2", - "@docusaurus/responsive-loader": "^1.7.0", - "@docusaurus/theme-translations": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "sharp": "^0.32.3", - "tslib": "^2.6.0", - "webpack": "^5.88.1" + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "fs-extra": "^11.2.0", + "joi": "^17.9.2", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" - }, - "peerDependencies": { - "jimp": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "jimp": { - "optional": true - } + "node": ">=18.0" } }, - "node_modules/@docusaurus/plugin-sitemap": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.9.2.tgz", - "integrity": "sha512-WLh7ymgDXjG8oPoM/T4/zUP7KcSuFYRZAUTl8vR6VzYkfc18GBM4xLhcT+AKOwun6kBivYKUJf+vlqYJkm+RHw==", + "node_modules/@docusaurus/plugin-content-docs/node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "fs-extra": "^11.1.1", - "sitemap": "^7.1.1", - "tslib": "^2.6.0" + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" }, "engines": { - "node": ">=20.0" - }, - "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "node": ">=18.0.0" } }, - "node_modules/@docusaurus/plugin-svgr": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-svgr/-/plugin-svgr-3.9.2.tgz", - "integrity": "sha512-n+1DE+5b3Lnf27TgVU5jM1d4x5tUh2oW5LTsBxJX4PsAPV0JGcmI6p3yLYtEY0LRVEIJh+8RsdQmRE66wSV8mw==", + "node_modules/@docusaurus/plugin-content-pages": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.4.0.tgz", + "integrity": "sha512-h2+VN/0JjpR8fIkDEAoadNjfR3oLzB+v1qSXbIAKjQ46JAHx3X22n9nqS+BWSQnTnp1AjkjSvZyJMekmcwxzxg==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "@svgr/core": "8.1.0", - "@svgr/webpack": "^8.1.0", + "@docusaurus/core": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "fs-extra": "^11.1.1", "tslib": "^2.6.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/preset-classic": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.9.2.tgz", - "integrity": "sha512-IgyYO2Gvaigi21LuDIe+nvmN/dfGXAiMcV/murFqcpjnZc7jxFAxW+9LEjdPt61uZLxG4ByW/oUmX/DDK9t/8w==", + "node_modules/@docusaurus/plugin-content-pages/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/plugin-content-blog": "3.9.2", - "@docusaurus/plugin-content-docs": "3.9.2", - "@docusaurus/plugin-content-pages": "3.9.2", - "@docusaurus/plugin-css-cascade-layers": "3.9.2", - "@docusaurus/plugin-debug": "3.9.2", - "@docusaurus/plugin-google-analytics": "3.9.2", - "@docusaurus/plugin-google-gtag": "3.9.2", - "@docusaurus/plugin-google-tag-manager": "3.9.2", - "@docusaurus/plugin-sitemap": "3.9.2", - "@docusaurus/plugin-svgr": "3.9.2", - "@docusaurus/theme-classic": "3.9.2", - "@docusaurus/theme-common": "3.9.2", - "@docusaurus/theme-search-algolia": "3.9.2", - "@docusaurus/types": "3.9.2" - }, - "engines": { - "node": ">=20.0" + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/responsive-loader": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@docusaurus/responsive-loader/-/responsive-loader-1.7.1.tgz", - "integrity": "sha512-jAebZ43f8GVpZSrijLGHVVp7Y0OMIPRaL+HhiIWQ+f/b72lTsKLkSkOVHEzvd2psNJ9lsoiM3gt6akpak6508w==", - "license": "BSD-3-Clause", + "node_modules/@docusaurus/plugin-debug": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.4.0.tgz", + "integrity": "sha512-uV7FDUNXGyDSD3PwUaf5YijX91T5/H9SX4ErEcshzwgzWwBtK37nUWPU3ZLJfeTavX3fycTOqk9TglpOLaWkCg==", + "license": "MIT", "dependencies": { - "loader-utils": "^2.0.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "jimp": "*", - "sharp": "*" - }, - "peerDependenciesMeta": { - "jimp": { - "optional": true - }, - "sharp": { - "optional": true - } - } - }, - "node_modules/@docusaurus/theme-classic": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.9.2.tgz", - "integrity": "sha512-IGUsArG5hhekXd7RDb11v94ycpJpFdJPkLnt10fFQWOVxAtq5/D7hT6lzc2fhyQKaaCE62qVajOMKL7OiAFAIA==", - "license": "MIT", - "dependencies": { - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/module-type-aliases": "3.9.2", - "@docusaurus/plugin-content-blog": "3.9.2", - "@docusaurus/plugin-content-docs": "3.9.2", - "@docusaurus/plugin-content-pages": "3.9.2", - "@docusaurus/theme-common": "3.9.2", - "@docusaurus/theme-translations": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "@mdx-js/react": "^3.0.0", - "clsx": "^2.0.0", - "infima": "0.2.0-alpha.45", - "lodash": "^4.17.21", - "nprogress": "^0.2.0", - "postcss": "^8.5.4", - "prism-react-renderer": "^2.3.0", - "prismjs": "^1.29.0", - "react-router-dom": "^5.3.4", - "rtlcss": "^4.1.0", - "tslib": "^2.6.0", - "utility-types": "^3.10.0" + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "fs-extra": "^11.1.1", + "react-json-view-lite": "^1.2.0", + "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-common": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.9.2.tgz", - "integrity": "sha512-6c4DAbR6n6nPbnZhY2V3tzpnKnGL+6aOsLvFL26VRqhlczli9eWG0VDUNoCQEPnGwDMhPS42UhSAnz5pThm5Ag==", + "node_modules/@docusaurus/plugin-debug/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@docusaurus/mdx-loader": "3.9.2", - "@docusaurus/module-type-aliases": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", + "@mdx-js/mdx": "^3.0.0", "@types/history": "^4.7.11", "@types/react": "*", - "@types/react-router-config": "*", - "clsx": "^2.0.0", - "parse-numeric-range": "^1.3.0", - "prism-react-renderer": "^2.3.0", - "tslib": "^2.6.0", - "utility-types": "^3.10.0" - }, - "engines": { - "node": ">=20.0" + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, "peerDependencies": { - "@docusaurus/plugin-content-docs": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-search-algolia": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.9.2.tgz", - "integrity": "sha512-GBDSFNwjnh5/LdkxCKQHkgO2pIMX1447BxYUBG2wBiajS21uj64a+gH/qlbQjDLxmGrbrllBrtJkUHxIsiwRnw==", - "license": "MIT", - "dependencies": { - "@docsearch/react": "^3.9.0 || ^4.1.0", - "@docusaurus/core": "3.9.2", - "@docusaurus/logger": "3.9.2", - "@docusaurus/plugin-content-docs": "3.9.2", - "@docusaurus/theme-common": "3.9.2", - "@docusaurus/theme-translations": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-validation": "3.9.2", - "algoliasearch": "^5.37.0", - "algoliasearch-helper": "^3.26.0", - "clsx": "^2.0.0", - "eta": "^2.2.0", - "fs-extra": "^11.1.1", - "lodash": "^4.17.21", - "tslib": "^2.6.0", - "utility-types": "^3.10.0" + "node_modules/@docusaurus/plugin-google-analytics": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.4.0.tgz", + "integrity": "sha512-mCArluxEGi3cmYHqsgpGGt3IyLCrFBxPsxNZ56Mpur0xSlInnIHoeLDH7FvVVcPJRPSQ9/MfRqLsainRw+BojA==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/client-analytics": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.42.0.tgz", - "integrity": "sha512-SkCrvtZpdSWjNq9NGu/TtOg4TbzRuUToXlQqV6lLePa2s/WQlEyFw7QYjrz4itprWG9ASuH+StDlq7n49F2sBA==", + "node_modules/@docusaurus/plugin-google-analytics/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, - "engines": { - "node": ">= 14.0.0" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/client-personalization": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.42.0.tgz", - "integrity": "sha512-ivVniRqX2ARd+jGvRHTxpWeOtO9VT+rK+OmiuRgkSunoTyxk0vjeDO7QkU7+lzBOXiYgakNjkZrBtIpW9c+muw==", + "node_modules/@docusaurus/plugin-google-gtag": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.4.0.tgz", + "integrity": "sha512-Dsgg6PLAqzZw5wZ4QjUYc8Z2KqJqXxHxq3vIoyoBWiLEEfigIs7wHR+oiWUQy3Zk9MIk6JTYj7tMoQU0Jm3nqA==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@types/gtag.js": "^0.0.12", + "tslib": "^2.6.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/recommend": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.42.0.tgz", - "integrity": "sha512-U5yZ8+Jj+A4ZC0IMfElpPcddQ9NCoawD1dKyWmjHP49nzN2Z4284IFVMAJWR6fq/0ddGf4OMjjYO9cnF8L+5tw==", + "node_modules/@docusaurus/plugin-google-gtag/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@algolia/client-common": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@docusaurus/theme-search-algolia/node_modules/algoliasearch": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.42.0.tgz", - "integrity": "sha512-X5+PtWc9EJIPafT/cj8ZG+6IU3cjRRnlHGtqMHK/9gsiupQbAyYlH5y7qt/FtsAhfX5AICHffZy69ZAsVrxWkQ==", - "license": "MIT", - "dependencies": { - "@algolia/abtesting": "1.8.0", - "@algolia/client-abtesting": "5.42.0", - "@algolia/client-analytics": "5.42.0", - "@algolia/client-common": "5.42.0", - "@algolia/client-insights": "5.42.0", - "@algolia/client-personalization": "5.42.0", - "@algolia/client-query-suggestions": "5.42.0", - "@algolia/client-search": "5.42.0", - "@algolia/ingestion": "1.42.0", - "@algolia/monitoring": "1.42.0", - "@algolia/recommend": "5.42.0", - "@algolia/requester-browser-xhr": "5.42.0", - "@algolia/requester-fetch": "5.42.0", - "@algolia/requester-node-http": "5.42.0" + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, - "engines": { - "node": ">= 14.0.0" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/theme-translations": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.9.2.tgz", - "integrity": "sha512-vIryvpP18ON9T9rjgMRFLr2xJVDpw1rtagEGf8Ccce4CkTrvM/fRB8N2nyWYOW5u3DdjkwKw5fBa+3tbn9P4PA==", + "node_modules/@docusaurus/plugin-google-tag-manager": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.4.0.tgz", + "integrity": "sha512-O9tX1BTwxIhgXpOLpFDueYA9DWk69WCbDRrjYoMQtFHSkTyE7RhNgyjSPREUWJb9i+YUg3OrsvrBYRl64FCPCQ==", "license": "MIT", "dependencies": { - "fs-extra": "^11.1.1", + "@docusaurus/core": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/tsconfig": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.9.2.tgz", - "integrity": "sha512-j6/Fp4Rlpxsc632cnRnl5HpOWeb6ZKssDj6/XzzAzVGXXfm9Eptx3rxCC+fDzySn9fHTS+CWJjPineCR1bB5WQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@docusaurus/types": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.9.2.tgz", - "integrity": "sha512-Ux1JUNswg+EfUEmajJjyhIohKceitY/yzjRUpu04WXgvVz+fbhVC0p+R0JhvEu4ytw8zIAys2hrdpQPBHRIa8Q==", + "node_modules/@docusaurus/plugin-google-tag-manager/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { "@mdx-js/mdx": "^3.0.0", "@types/history": "^4.7.11", - "@types/mdast": "^4.0.2", "@types/react": "*", "commander": "^5.1.0", "joi": "^17.9.2", - "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", + "react-helmet-async": "^1.3.0", "utility-types": "^3.10.0", - "webpack": "^5.95.0", + "webpack": "^5.88.1", "webpack-merge": "^5.9.0" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/utils": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.9.2.tgz", - "integrity": "sha512-lBSBiRruFurFKXr5Hbsl2thmGweAPmddhF3jb99U4EMDA5L+e5Y1rAkOS07Nvrup7HUMBDrCV45meaxZnt28nQ==", + "node_modules/@docusaurus/plugin-ideal-image": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-ideal-image/-/plugin-ideal-image-3.4.0.tgz", + "integrity": "sha512-s8N/PRiv1R66UY+WX/2E9a+GjkRooXVcf0VJNEYA3yZ6c24Path15ivjmdMtKaSo/6OXYbejGlA4DJZ5TPLkCQ==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.9.2", - "@docusaurus/types": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "escape-string-regexp": "^4.0.0", - "execa": "5.1.1", - "file-loader": "^6.2.0", - "fs-extra": "^11.1.1", - "github-slugger": "^1.5.0", - "globby": "^11.1.0", - "gray-matter": "^4.0.3", - "jiti": "^1.20.0", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "micromatch": "^4.0.5", - "p-queue": "^6.6.2", - "prompts": "^2.4.2", - "resolve-pathname": "^3.0.0", + "@docusaurus/core": "3.4.0", + "@docusaurus/lqip-loader": "3.4.0", + "@docusaurus/responsive-loader": "^1.7.0", + "@docusaurus/theme-translations": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@slorber/react-ideal-image": "^0.0.12", + "react-waypoint": "^10.3.0", + "sharp": "^0.32.3", "tslib": "^2.6.0", - "url-loader": "^4.1.1", - "utility-types": "^3.10.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" + }, + "peerDependencies": { + "jimp": "*", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "jimp": { + "optional": true + } } }, - "node_modules/@docusaurus/utils-common": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.9.2.tgz", - "integrity": "sha512-I53UC1QctruA6SWLvbjbhCpAw7+X7PePoe5pYcwTOEXD/PxeP8LnECAhTHHwWCblyUX5bMi4QLRkxvyZ+IT8Aw==", + "node_modules/@docusaurus/plugin-ideal-image/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@docusaurus/types": "3.9.2", - "tslib": "^2.6.0" + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, - "engines": { - "node": ">=20.0" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@docusaurus/utils-validation": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.9.2.tgz", - "integrity": "sha512-l7yk3X5VnNmATbwijJkexdhulNsQaNDwoagiwujXoxFbWLcxHQqNQ+c/IAlzrfMMOfa/8xSBZ7KEKDesE/2J7A==", + "node_modules/@docusaurus/plugin-sitemap": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.4.0.tgz", + "integrity": "sha512-+0VDvx9SmNrFNgwPoeoCha+tRoAjopwT0+pYO1xAbyLcewXSemq+eLxEa46Q1/aoOaJQ0qqHELuQM7iS2gp33Q==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.9.2", - "@docusaurus/utils": "3.9.2", - "@docusaurus/utils-common": "3.9.2", - "fs-extra": "^11.2.0", - "joi": "^17.9.2", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "fs-extra": "^11.1.1", + "sitemap": "^7.1.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=20.0" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@exodus/schemasafe": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", - "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", - "license": "MIT" - }, - "node_modules/@faker-js/faker": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", - "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==", - "deprecated": "Please update to a newer version.", - "license": "MIT" - }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@hookform/error-message": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@hookform/error-message/-/error-message-2.0.1.tgz", - "integrity": "sha512-U410sAr92xgxT1idlu9WWOVjndxLdgPUHEB8Schr27C9eh7/xUnITWpCMF93s+lGiG++D4JnbSnrb5A21AdSNg==", + "node_modules/@docusaurus/plugin-sitemap/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", + "dependencies": { + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" + }, "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0", - "react-hook-form": "^7.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + "node_modules/@docusaurus/preset-classic": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.4.0.tgz", + "integrity": "sha512-Ohj6KB7siKqZaQhNJVMBBUzT3Nnp6eTKqO+FXO3qu/n1hJl3YLwVKTWBg28LF7MWrKu46UuYavwMRxud0VyqHg==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/plugin-debug": "3.4.0", + "@docusaurus/plugin-google-analytics": "3.4.0", + "@docusaurus/plugin-google-gtag": "3.4.0", + "@docusaurus/plugin-google-tag-manager": "3.4.0", + "@docusaurus/plugin-sitemap": "3.4.0", + "@docusaurus/theme-classic": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-search-algolia": "3.4.0", + "@docusaurus/types": "3.4.0" }, "engines": { - "node": ">=12" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/module-type-aliases": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.4.0.tgz", + "integrity": "sha512-A1AyS8WF5Bkjnb8s+guTDuYmUiwJzNrtchebBHpc0gz0PyHJNMaybUlSrmJjHVcGrya0LKI4YcR3lBDQfXRYLw==", "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "@docusaurus/types": "3.4.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "@types/react-router-dom": "*", + "react-helmet-async": "*", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "peerDependencies": { + "react": "*", + "react-dom": "*" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/plugin-content-docs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.4.0.tgz", + "integrity": "sha512-HkUCZffhBo7ocYheD9oZvMcDloRnGhBMOZRyVcAQRFmZPmNqSyISlXA1tQCIxW+r478fty97XXAGjNYzBjpCsg==", "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@types/react-router-config": "^5.0.7", + "combine-promises": "^1.1.0", + "fs-extra": "^11.1.1", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.6.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, "engines": { - "node": ">=12" + "node": ">=18.0" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" + "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/theme-classic": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.4.0.tgz", + "integrity": "sha512-0IPtmxsBYv2adr1GnZRdMkEQt1YW6tpzrUPj02YxNpvJ5+ju4E13J5tB4nfdaen/tfR1hmpSPlTFPvTf4kwy8Q==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-translations": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@mdx-js/react": "^3.0.0", + "clsx": "^2.0.0", + "copy-text-to-clipboard": "^3.2.0", + "infima": "0.2.0-alpha.43", + "lodash": "^4.17.21", + "nprogress": "^0.2.0", + "postcss": "^8.4.26", + "prism-react-renderer": "^2.3.0", + "prismjs": "^1.29.0", + "react-router-dom": "^5.3.4", + "rtlcss": "^4.1.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/theme-search-algolia": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.4.0.tgz", + "integrity": "sha512-aiHFx7OCw4Wck1z6IoShVdUWIjntC8FHCw9c5dR8r3q4Ynh+zkS8y2eFFunN/DL6RXPzpnvKCg3vhLQYJDmT9Q==", "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@docsearch/react": "^3.5.2", + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/theme-common": "3.4.0", + "@docusaurus/theme-translations": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "algoliasearch": "^4.18.0", + "algoliasearch-helper": "^3.13.3", + "clsx": "^2.0.0", + "eta": "^2.2.0", + "fs-extra": "^11.1.1", + "lodash": "^4.17.21", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "node_modules/@docusaurus/preset-classic/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@docusaurus/preset-classic/node_modules/infima": { + "version": "0.2.0-alpha.43", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.43.tgz", + "integrity": "sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ==", "license": "MIT", "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" + "node": ">=12" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "license": "MIT", + "node_modules/@docusaurus/responsive-loader": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@docusaurus/responsive-loader/-/responsive-loader-1.7.1.tgz", + "integrity": "sha512-jAebZ43f8GVpZSrijLGHVVp7Y0OMIPRaL+HhiIWQ+f/b72lTsKLkSkOVHEzvd2psNJ9lsoiM3gt6akpak6508w==", + "license": "BSD-3-Clause", "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "license": "MIT" - }, - "node_modules/@jsonjoy.com/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" + "loader-utils": "^2.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "engines": { + "node": ">=12" }, "peerDependencies": { - "tslib": "2" + "jimp": "*", + "sharp": "*" + }, + "peerDependenciesMeta": { + "jimp": { + "optional": true + }, + "sharp": { + "optional": true + } } }, - "node_modules/@jsonjoy.com/buffers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", - "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" + "node_modules/@docusaurus/theme-classic": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.7.0.tgz", + "integrity": "sha512-MnLxG39WcvLCl4eUzHr0gNcpHQfWoGqzADCly54aqCofQX6UozOS9Th4RK3ARbM9m7zIRv3qbhggI53dQtx/hQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@docusaurus/core": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/module-type-aliases": "3.7.0", + "@docusaurus/plugin-content-blog": "3.7.0", + "@docusaurus/plugin-content-docs": "3.7.0", + "@docusaurus/plugin-content-pages": "3.7.0", + "@docusaurus/theme-common": "3.7.0", + "@docusaurus/theme-translations": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "@mdx-js/react": "^3.0.0", + "clsx": "^2.0.0", + "copy-text-to-clipboard": "^3.2.0", + "infima": "0.2.0-alpha.45", + "lodash": "^4.17.21", + "nprogress": "^0.2.0", + "postcss": "^8.4.26", + "prism-react-renderer": "^2.3.0", + "prismjs": "^1.29.0", + "react-router-dom": "^5.3.4", + "rtlcss": "^4.1.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "engines": { + "node": ">=18.0" }, "peerDependencies": { - "tslib": "2" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@jsonjoy.com/codegen": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz", - "integrity": "sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==", - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/core": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.7.0.tgz", + "integrity": "sha512-b0fUmaL+JbzDIQaamzpAFpTviiaU4cX3Qz8cuo14+HGBCwa0evEK0UYCBFY3n4cLzL8Op1BueeroUD2LYAIHbQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@docusaurus/babel": "3.7.0", + "@docusaurus/bundler": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "boxen": "^6.2.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cli-table3": "^0.6.3", + "combine-promises": "^1.1.0", + "commander": "^5.1.0", + "core-js": "^3.31.1", + "del": "^6.1.1", + "detect-port": "^1.5.1", + "escape-html": "^1.0.3", + "eta": "^2.2.0", + "eval": "^0.1.8", + "fs-extra": "^11.1.1", + "html-tags": "^3.3.1", + "html-webpack-plugin": "^5.6.0", + "leven": "^3.1.0", + "lodash": "^4.17.21", + "p-map": "^4.0.0", + "prompts": "^2.4.2", + "react-dev-utils": "^12.0.1", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", + "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-router": "^5.3.4", + "react-router-config": "^5.1.1", + "react-router-dom": "^5.3.4", + "semver": "^7.5.4", + "serve-handler": "^6.1.6", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "update-notifier": "^6.0.2", + "webpack": "^5.95.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-dev-server": "^4.15.2", + "webpack-merge": "^6.0.1" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "bin": { + "docusaurus": "bin/docusaurus.mjs" + }, + "engines": { + "node": ">=18.0" }, "peerDependencies": { - "tslib": "2" + "@mdx-js/react": "^3.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@jsonjoy.com/json-pack": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz", - "integrity": "sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==", - "license": "Apache-2.0", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/logger": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.7.0.tgz", + "integrity": "sha512-z7g62X7bYxCYmeNNuO9jmzxLQG95q9QxINCwpboVcNff3SJiHJbGrarxxOVMVmAh1MsrSfxWkVGv4P41ktnFsA==", + "license": "MIT", + "peer": true, "dependencies": { - "@jsonjoy.com/base64": "^1.1.2", - "@jsonjoy.com/buffers": "^1.2.0", - "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/json-pointer": "^1.0.2", - "@jsonjoy.com/util": "^1.9.0", - "hyperdyperid": "^1.2.0", - "thingies": "^2.5.0", - "tree-dump": "^1.1.0" + "chalk": "^4.1.2", + "tslib": "^2.6.0" }, "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" + "node": ">=18.0" } }, - "node_modules/@jsonjoy.com/json-pointer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", - "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", - "license": "Apache-2.0", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/mdx-loader": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.7.0.tgz", + "integrity": "sha512-OFBG6oMjZzc78/U3WNPSHs2W9ZJ723ewAcvVJaqS0VgyeUfmzUV8f1sv+iUHA0DtwiR5T5FjOxj6nzEE8LY6VA==", + "license": "MIT", + "peer": true, "dependencies": { - "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/util": "^1.9.0" + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "@mdx-js/mdx": "^3.0.0", + "@slorber/remark-comment": "^1.0.0", + "escape-html": "^1.0.3", + "estree-util-value-to-estree": "^3.0.1", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "image-size": "^1.0.2", + "mdast-util-mdx": "^3.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-raw": "^7.0.0", + "remark-directive": "^3.0.0", + "remark-emoji": "^4.0.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "stringify-object": "^3.3.0", + "tslib": "^2.6.0", + "unified": "^11.0.3", + "unist-util-visit": "^5.0.0", + "url-loader": "^4.1.1", + "vfile": "^6.0.1", + "webpack": "^5.88.1" }, "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "node": ">=18.0" }, "peerDependencies": { - "tslib": "2" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@jsonjoy.com/util": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.9.0.tgz", - "integrity": "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==", - "license": "Apache-2.0", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/plugin-content-blog": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.7.0.tgz", + "integrity": "sha512-EFLgEz6tGHYWdPU0rK8tSscZwx+AsyuBW/r+tNig2kbccHYGUJmZtYN38GjAa3Fda4NU+6wqUO5kTXQSRBQD3g==", + "license": "MIT", + "peer": true, "dependencies": { - "@jsonjoy.com/buffers": "^1.0.0", - "@jsonjoy.com/codegen": "^1.0.0" + "@docusaurus/core": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/theme-common": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "cheerio": "1.0.0-rc.12", + "feed": "^4.2.2", + "fs-extra": "^11.1.1", + "lodash": "^4.17.21", + "reading-time": "^1.5.0", + "srcset": "^4.0.0", + "tslib": "^2.6.0", + "unist-util-visit": "^5.0.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "node": ">=18.0" }, "peerDependencies": { - "tslib": "2" + "@docusaurus/plugin-content-docs": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", - "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", - "license": "MIT" - }, - "node_modules/@mdx-js/mdx": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz", - "integrity": "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/plugin-content-pages": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.7.0.tgz", + "integrity": "sha512-YJSU3tjIJf032/Aeao8SZjFOrXJbz/FACMveSMjLyMH4itQyZ2XgUIzt4y+1ISvvk5zrW4DABVT2awTCqBkx0Q==", "license": "MIT", + "peer": true, "dependencies": { - "@types/estree": "^1.0.0", - "@types/estree-jsx": "^1.0.0", - "@types/hast": "^3.0.0", - "@types/mdx": "^2.0.0", - "collapse-white-space": "^2.0.0", - "devlop": "^1.0.0", - "estree-util-is-identifier-name": "^3.0.0", - "estree-util-scope": "^1.0.0", - "estree-walker": "^3.0.0", - "hast-util-to-jsx-runtime": "^2.0.0", - "markdown-extensions": "^2.0.0", - "recma-build-jsx": "^1.0.0", - "recma-jsx": "^1.0.0", - "recma-stringify": "^1.0.0", - "rehype-recma": "^1.0.0", - "remark-mdx": "^3.0.0", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.0.0", - "source-map": "^0.7.0", - "unified": "^11.0.0", - "unist-util-position-from-estree": "^2.0.0", - "unist-util-stringify-position": "^4.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" + "@docusaurus/core": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "fs-extra": "^11.1.1", + "tslib": "^2.6.0", + "webpack": "^5.88.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@mdx-js/react": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", - "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/theme-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.7.0.tgz", + "integrity": "sha512-8eJ5X0y+gWDsURZnBfH0WabdNm8XMCXHv8ENy/3Z/oQKwaB/EHt5lP9VsTDTf36lKEp0V6DjzjFyFIB+CetL0A==", "license": "MIT", + "peer": true, "dependencies": { - "@types/mdx": "^2.0.0" + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/module-type-aliases": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "clsx": "^2.0.0", + "parse-numeric-range": "^1.3.0", + "prism-react-renderer": "^2.3.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=18.0" }, "peerDependencies": { - "@types/react": ">=16", - "react": ">=16" + "@docusaurus/plugin-content-docs": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/theme-translations": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.7.0.tgz", + "integrity": "sha512-Ewq3bEraWDmienM6eaNK7fx+/lHMtGDHQyd1O+4+3EsDxxUmrzPkV7Ct3nBWTuE0MsoZr3yNwQVKjllzCMuU3g==", "license": "MIT", + "peer": true, "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "fs-extra": "^11.1.1", + "tslib": "^2.6.0" }, "engines": { - "node": ">= 8" + "node": ">=18.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/utils": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.7.0.tgz", + "integrity": "sha512-e7zcB6TPnVzyUaHMJyLSArKa2AG3h9+4CfvKXKKWNx6hRs+p0a+u7HHTJBgo6KW2m+vqDnuIHK4X+bhmoghAFA==", "license": "MIT", + "peer": true, + "dependencies": { + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" + }, "engines": { - "node": ">= 8" + "node": ">=18.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/utils-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.7.0.tgz", + "integrity": "sha512-IZeyIfCfXy0Mevj6bWNg7DG7B8G+S6o6JVpddikZtWyxJguiQ7JYr0SIZ0qWd8pGNuMyVwriWmbWqMnK7Y5PwA==", "license": "MIT", + "peer": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@docusaurus/types": "3.7.0", + "tslib": "^2.6.0" }, "engines": { - "node": ">= 8" + "node": ">=18.0" } }, - "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "license": "Apache-2.0", + "node_modules/@docusaurus/theme-classic/node_modules/@docusaurus/utils-validation": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.7.0.tgz", + "integrity": "sha512-w8eiKk8mRdN+bNfeZqC4nyFoxNyI1/VExMKAzD9tqpJfLLbsa46Wfn5wcKH761g9WkKh36RtFV49iL9lh1DYBA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "fs-extra": "^11.2.0", + "joi": "^17.9.2", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.6.0" + }, "engines": { - "node": ">=8.0.0" + "node": ">=18.0" } }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "hasInstallScript": true, + "node_modules/@docusaurus/theme-classic/node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", "license": "MIT", - "optional": true, + "peer": true, "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">= 6" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" + "node_modules/@docusaurus/theme-classic/node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } ], "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], + "node_modules/@docusaurus/theme-classic/node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" + "peer": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "node_modules/@docusaurus/theme-common": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.4.0.tgz", + "integrity": "sha512-0A27alXuv7ZdCg28oPE8nH/Iz73/IUejVaCazqu9elS4ypjiLhK3KfzdSQBnL/g7YfHSlymZKdiOHEo8fJ0qMA==", + "license": "MIT", + "dependencies": { + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/plugin-content-blog": "3.4.0", + "@docusaurus/plugin-content-docs": "3.4.0", + "@docusaurus/plugin-content-pages": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "clsx": "^2.0.0", + "parse-numeric-range": "^1.3.0", + "prism-react-renderer": "^2.3.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], + "node_modules/@docusaurus/theme-common/node_modules/@docusaurus/module-type-aliases": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.4.0.tgz", + "integrity": "sha512-A1AyS8WF5Bkjnb8s+guTDuYmUiwJzNrtchebBHpc0gz0PyHJNMaybUlSrmJjHVcGrya0LKI4YcR3lBDQfXRYLw==", "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "@docusaurus/types": "3.4.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "@types/react-router-dom": "*", + "react-helmet-async": "*", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "react": "*", + "react-dom": "*" } }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], + "node_modules/@docusaurus/theme-common/node_modules/@docusaurus/plugin-content-docs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.4.0.tgz", + "integrity": "sha512-HkUCZffhBo7ocYheD9oZvMcDloRnGhBMOZRyVcAQRFmZPmNqSyISlXA1tQCIxW+r478fty97XXAGjNYzBjpCsg==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@docusaurus/core": "3.4.0", + "@docusaurus/logger": "3.4.0", + "@docusaurus/mdx-loader": "3.4.0", + "@docusaurus/module-type-aliases": "3.4.0", + "@docusaurus/types": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@docusaurus/utils-validation": "3.4.0", + "@types/react-router-config": "^5.0.7", + "combine-promises": "^1.1.0", + "fs-extra": "^11.1.1", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.6.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], + "node_modules/@docusaurus/theme-common/node_modules/@docusaurus/types": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.4.0.tgz", + "integrity": "sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.88.1", + "webpack-merge": "^5.9.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "node_modules/@docusaurus/theme-search-algolia": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.7.0.tgz", + "integrity": "sha512-Al/j5OdzwRU1m3falm+sYy9AaB93S1XF1Lgk9Yc6amp80dNxJVplQdQTR4cYdzkGtuQqbzUA8+kaoYYO0RbK6g==", + "license": "MIT", + "dependencies": { + "@docsearch/react": "^3.8.1", + "@docusaurus/core": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/plugin-content-docs": "3.7.0", + "@docusaurus/theme-common": "3.7.0", + "@docusaurus/theme-translations": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "algoliasearch": "^5.17.1", + "algoliasearch-helper": "^3.22.6", + "clsx": "^2.0.0", + "eta": "^2.2.0", + "fs-extra": "^11.1.1", + "lodash": "^4.17.21", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], + "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/client-analytics": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.24.0.tgz", + "integrity": "sha512-IF+r9RRQsIf0ylIBNFxo7c6hDxxuhIfIbffhBXEF1HD13rjhP5AVfiaea9RzbsAZoySkm318plDpH/nlGIjbRA==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], + "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/client-personalization": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.24.0.tgz", + "integrity": "sha512-Fx/Fp6d8UmDBHecTt0XYF8C9TAaA3qeCQortfGSZzWp4gVmtrUCFNZ1SUwb8ULREnO9DanVrM5hGE8R8C4zZTQ==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], + "node_modules/@docusaurus/theme-search-algolia/node_modules/@algolia/recommend": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.24.0.tgz", + "integrity": "sha512-JTMz0JqN2gidvKa2QCF/rMe8LNtdHaght03px2cluZaZfBRYy8TgHgkCeBspKKvV/abWJwl7J0FzWThCshqT3w==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "@algolia/client-common": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "node": ">= 14.0.0" } }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/core": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.7.0.tgz", + "integrity": "sha512-b0fUmaL+JbzDIQaamzpAFpTviiaU4cX3Qz8cuo14+HGBCwa0evEK0UYCBFY3n4cLzL8Op1BueeroUD2LYAIHbQ==", "license": "MIT", - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "@docusaurus/babel": "3.7.0", + "@docusaurus/bundler": "3.7.0", + "@docusaurus/logger": "3.7.0", + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "boxen": "^6.2.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cli-table3": "^0.6.3", + "combine-promises": "^1.1.0", + "commander": "^5.1.0", + "core-js": "^3.31.1", + "del": "^6.1.1", + "detect-port": "^1.5.1", + "escape-html": "^1.0.3", + "eta": "^2.2.0", + "eval": "^0.1.8", + "fs-extra": "^11.1.1", + "html-tags": "^3.3.1", + "html-webpack-plugin": "^5.6.0", + "leven": "^3.1.0", + "lodash": "^4.17.21", + "p-map": "^4.0.0", + "prompts": "^2.4.2", + "react-dev-utils": "^12.0.1", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", + "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", + "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-router": "^5.3.4", + "react-router-config": "^5.1.1", + "react-router-dom": "^5.3.4", + "semver": "^7.5.4", + "serve-handler": "^6.1.6", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "update-notifier": "^6.0.2", + "webpack": "^5.95.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-dev-server": "^4.15.2", + "webpack-merge": "^6.0.1" + }, + "bin": { + "docusaurus": "bin/docusaurus.mjs" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "@mdx-js/react": "^3.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/logger": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.7.0.tgz", + "integrity": "sha512-z7g62X7bYxCYmeNNuO9jmzxLQG95q9QxINCwpboVcNff3SJiHJbGrarxxOVMVmAh1MsrSfxWkVGv4P41ktnFsA==", "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "chalk": "^4.1.2", + "tslib": "^2.6.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=18.0" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/mdx-loader": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.7.0.tgz", + "integrity": "sha512-OFBG6oMjZzc78/U3WNPSHs2W9ZJ723ewAcvVJaqS0VgyeUfmzUV8f1sv+iUHA0DtwiR5T5FjOxj6nzEE8LY6VA==", "license": "MIT", - "optional": true, + "dependencies": { + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-validation": "3.7.0", + "@mdx-js/mdx": "^3.0.0", + "@slorber/remark-comment": "^1.0.0", + "escape-html": "^1.0.3", + "estree-util-value-to-estree": "^3.0.1", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "image-size": "^1.0.2", + "mdast-util-mdx": "^3.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-raw": "^7.0.0", + "remark-directive": "^3.0.0", + "remark-emoji": "^4.0.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "stringify-object": "^3.3.0", + "tslib": "^2.6.0", + "unified": "^11.0.3", + "unist-util-visit": "^5.0.0", + "url-loader": "^4.1.1", + "vfile": "^6.0.1", + "webpack": "^5.88.1" + }, "engines": { - "node": ">=14" + "node": ">=18.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@pnpm/config.env-replace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", - "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/theme-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.7.0.tgz", + "integrity": "sha512-8eJ5X0y+gWDsURZnBfH0WabdNm8XMCXHv8ENy/3Z/oQKwaB/EHt5lP9VsTDTf36lKEp0V6DjzjFyFIB+CetL0A==", "license": "MIT", + "dependencies": { + "@docusaurus/mdx-loader": "3.7.0", + "@docusaurus/module-type-aliases": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "clsx": "^2.0.0", + "parse-numeric-range": "^1.3.0", + "prism-react-renderer": "^2.3.0", + "tslib": "^2.6.0", + "utility-types": "^3.10.0" + }, "engines": { - "node": ">=12.22.0" + "node": ">=18.0" + }, + "peerDependencies": { + "@docusaurus/plugin-content-docs": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@pnpm/network.ca-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", - "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/theme-translations": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.7.0.tgz", + "integrity": "sha512-Ewq3bEraWDmienM6eaNK7fx+/lHMtGDHQyd1O+4+3EsDxxUmrzPkV7Ct3nBWTuE0MsoZr3yNwQVKjllzCMuU3g==", "license": "MIT", "dependencies": { - "graceful-fs": "4.2.10" + "fs-extra": "^11.1.1", + "tslib": "^2.6.0" }, "engines": { - "node": ">=12.22.0" + "node": ">=18.0" } }, - "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "license": "ISC" - }, - "node_modules/@pnpm/npm-conf": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", - "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/utils": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.7.0.tgz", + "integrity": "sha512-e7zcB6TPnVzyUaHMJyLSArKa2AG3h9+4CfvKXKKWNx6hRs+p0a+u7HHTJBgo6KW2m+vqDnuIHK4X+bhmoghAFA==", "license": "MIT", "dependencies": { - "@pnpm/config.env-replace": "^1.1.0", - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" + "@docusaurus/logger": "3.7.0", + "@docusaurus/types": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, "engines": { - "node": ">=12" + "node": ">=18.0" } }, - "node_modules/@polka/url": { - "version": "1.0.0-next.29", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", - "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", - "license": "MIT" - }, - "node_modules/@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/utils-common": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.7.0.tgz", + "integrity": "sha512-IZeyIfCfXy0Mevj6bWNg7DG7B8G+S6o6JVpddikZtWyxJguiQ7JYr0SIZ0qWd8pGNuMyVwriWmbWqMnK7Y5PwA==", "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" + "@docusaurus/types": "3.7.0", + "tslib": "^2.6.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=18.0" } }, - "node_modules/@redocly/config": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", - "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", - "license": "MIT" - }, - "node_modules/@redocly/openapi-core": { - "version": "1.34.2", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.2.tgz", - "integrity": "sha512-glfkQFJizLdq2fBkNvc2FJW0sxDb5exd0wIXhFk+WHaFLMREBC3CxRo2Zq7uJIdfV9U3YTceMbXJklpDfmmwFQ==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/@docusaurus/utils-validation": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.7.0.tgz", + "integrity": "sha512-w8eiKk8mRdN+bNfeZqC4nyFoxNyI1/VExMKAzD9tqpJfLLbsa46Wfn5wcKH761g9WkKh36RtFV49iL9lh1DYBA==", "license": "MIT", "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.22.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.5", - "js-levenshtein": "^1.1.6", + "@docusaurus/logger": "3.7.0", + "@docusaurus/utils": "3.7.0", + "@docusaurus/utils-common": "3.7.0", + "fs-extra": "^11.2.0", + "joi": "^17.9.2", "js-yaml": "^4.1.0", - "minimatch": "^5.0.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" + "lodash": "^4.17.21", + "tslib": "^2.6.0" }, "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" + "node": ">=18.0" } }, - "node_modules/@reduxjs/toolkit": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", - "integrity": "sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==", - "license": "MIT", - "dependencies": { - "immer": "^9.0.21", - "redux": "^4.2.1", - "redux-thunk": "^2.4.2", - "reselect": "^4.1.8" - }, - "peerDependencies": { - "react": "^16.9.0 || ^17.0.0 || ^18", - "react-redux": "^7.2.1 || ^8.0.2" + "node_modules/@docusaurus/theme-search-algolia/node_modules/algoliasearch": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.24.0.tgz", + "integrity": "sha512-CkaUygzZ91Xbw11s0CsHMawrK3tl+Ue57725HGRgRzKgt2Z4wvXVXRCtQfvzh8K7Tp4Zp7f1pyHAtMROtTJHxg==", + "license": "MIT", + "dependencies": { + "@algolia/client-abtesting": "5.24.0", + "@algolia/client-analytics": "5.24.0", + "@algolia/client-common": "5.24.0", + "@algolia/client-insights": "5.24.0", + "@algolia/client-personalization": "5.24.0", + "@algolia/client-query-suggestions": "5.24.0", + "@algolia/client-search": "5.24.0", + "@algolia/ingestion": "1.24.0", + "@algolia/monitoring": "1.24.0", + "@algolia/recommend": "5.24.0", + "@algolia/requester-browser-xhr": "5.24.0", + "@algolia/requester-fetch": "5.24.0", + "@algolia/requester-node-http": "5.24.0" }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-redux": { - "optional": true - } - } - }, - "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "license": "BSD-3-Clause" - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "license": "MIT" - }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "node_modules/@docusaurus/theme-search-algolia/node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@slorber/remark-comment": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@slorber/remark-comment/-/remark-comment-1.0.0.tgz", - "integrity": "sha512-RCE24n7jsOj1M0UPvIQCHTe7fI0sFL4S2nwKVWwHyVr/wI/H8GosgsJGyhnsZoGFnD/P2hLf1mSbrrgSLN93NA==", + "node_modules/@docusaurus/theme-translations": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.4.0.tgz", + "integrity": "sha512-zSxCSpmQCCdQU5Q4CnX/ID8CSUUI3fvmq4hU/GNP/XoAWtXo9SAVnM3TzpU8Gb//H3WCsT8mJcTfyOk3d9ftNg==", "license": "MIT", "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.1.0", - "micromark-util-symbol": "^1.0.1" + "fs-extra": "^11.1.1", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=18.0" } }, - "node_modules/@standard-schema/spec": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", - "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "node_modules/@docusaurus/tsconfig": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.7.0.tgz", + "integrity": "sha512-vRsyj3yUZCjscgfgcFYjIsTcAru/4h4YH2/XAE8Rs7wWdnng98PgWKvP5ovVc4rmRpRg2WChVW0uOy2xHDvDBQ==", + "dev": true, "license": "MIT" }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", + "node_modules/@docusaurus/types": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.7.0.tgz", + "integrity": "sha512-kOmZg5RRqJfH31m+6ZpnwVbkqMJrPOG5t0IOl4i/+3ruXyNfWzZ0lVtVrD0u4ONc/0NOsS9sWYaxxWNkH1LdLQ==", "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "dependencies": { + "@mdx-js/mdx": "^3.0.0", + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.9.2", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.95.0", + "webpack-merge": "^5.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, - "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", + "node_modules/@docusaurus/utils": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.4.0.tgz", + "integrity": "sha512-fRwnu3L3nnWaXOgs88BVBmG1yGjcQqZNHG+vInhEa2Sz2oQB+ZjbEMO5Rh9ePFpZ0YDiDUhpaVjwmS+AU2F14g==", "license": "MIT", - "engines": { - "node": ">=14" + "dependencies": { + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "@svgr/webpack": "^8.1.0", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^11.1.1", + "github-slugger": "^1.5.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "jiti": "^1.20.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "prompts": "^2.4.2", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "utility-types": "^3.10.0", + "webpack": "^5.88.1" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "engines": { + "node": ">=18.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@docusaurus/types": "*" + }, + "peerDependenciesMeta": { + "@docusaurus/types": { + "optional": true + } } }, - "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", - "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", + "node_modules/@docusaurus/utils-common": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.4.0.tgz", + "integrity": "sha512-NVx54Wr4rCEKsjOH5QEVvxIqVvm+9kh7q8aYTU5WzUU9/Hctd6aTrcZ3G0Id4zYJ+AeaG5K5qHA4CY5Kcm2iyQ==", "license": "MIT", - "engines": { - "node": ">=14" + "dependencies": { + "tslib": "^2.6.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "engines": { + "node": ">=18.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@docusaurus/types": "*" + }, + "peerDependenciesMeta": { + "@docusaurus/types": { + "optional": true + } } }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", - "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", + "node_modules/@docusaurus/utils-validation": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.4.0.tgz", + "integrity": "sha512-hYQ9fM+AXYVTWxJOT1EuNaRnrR2WGpRdLDQG07O8UOpsvCPWUVOeo26Rbm0JWY2sGLfzAb+tvJ62yF+8F+TV0g==", "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "dependencies": { + "@docusaurus/logger": "3.4.0", + "@docusaurus/utils": "3.4.0", + "@docusaurus/utils-common": "3.4.0", + "fs-extra": "^11.2.0", + "joi": "^17.9.2", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.6.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0" } }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", - "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "license": "MIT" + }, + "node_modules/@faker-js/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==", + "deprecated": "Please update to a newer version.", + "license": "MIT" + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@hookform/error-message": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hookform/error-message/-/error-message-2.0.1.tgz", + "integrity": "sha512-U410sAr92xgxT1idlu9WWOVjndxLdgPUHEB8Schr27C9eh7/xUnITWpCMF93s+lGiG++D4JnbSnrb5A21AdSNg==", "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "react": ">=16.8.0", + "react-dom": ">=16.8.0", + "react-hook-form": "^7.0.0" } }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", - "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "license": "MIT", "engines": { - "node": ">=14" + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", - "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", - "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@svgr/babel-preset": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", - "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "license": "MIT", "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", - "@svgr/babel-plugin-transform-svg-component": "8.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=14" + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@svgr/core": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", - "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "license": "MIT", "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "camelcase": "^6.2.0", - "cosmiconfig": "^8.1.3", - "snake-case": "^3.0.4" + "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", - "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "license": "MIT", "dependencies": { - "@babel/types": "^7.21.3", - "entities": "^4.4.0" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@svgr/plugin-jsx": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", - "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "license": "MIT", "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "@svgr/hast-util-to-babel-ast": "8.0.0", - "svg-parser": "^2.0.4" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" + "node": ">=6.0.0" } }, - "node_modules/@svgr/plugin-svgo": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-8.1.0.tgz", - "integrity": "sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "license": "MIT", - "dependencies": { - "cosmiconfig": "^8.1.3", - "deepmerge": "^4.3.1", - "svgo": "^3.0.2" - }, "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" + "node": ">=6.0.0" } }, - "node_modules/@svgr/webpack": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-8.1.0.tgz", - "integrity": "sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "license": "MIT", - "dependencies": { - "@babel/core": "^7.21.3", - "@babel/plugin-transform-react-constant-elements": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.21.0", - "@svgr/core": "8.1.0", - "@svgr/plugin-jsx": "8.1.0", - "@svgr/plugin-svgo": "8.1.0" - }, "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" + "node": ">=6.0.0" } }, - "node_modules/@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "license": "MIT", "dependencies": { - "defer-to-connect": "^2.0.1" - }, - "engines": { - "node": ">=14.16" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, - "node_modules/@trysound/sax": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", - "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", - "license": "ISC", - "engines": { - "node": ">=10.13.0" - } + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, - "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "license": "MIT", "dependencies": { - "@types/connect": "*", - "@types/node": "*" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@types/bonjour": { - "version": "3.5.13", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", - "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "license": "MIT" }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "license": "MIT" }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", - "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "node_modules/@mdx-js/mdx": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz", + "integrity": "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==", "license": "MIT", "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "license": "MIT", + "@types/estree": "^1.0.0", + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdx": "^2.0.0", + "collapse-white-space": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "estree-util-scope": "^1.0.0", + "estree-walker": "^3.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "markdown-extensions": "^2.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", + "remark-mdx": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "source-map": "^0.7.0", + "unified": "^11.0.0", + "unist-util-position-from-estree": "^2.0.0", + "unist-util-stringify-position": "^4.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mdx-js/react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", + "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", + "license": "MIT", + "dependencies": { + "@types/mdx": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=16", + "react": ">=16" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "license": "MIT", + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "license": "MIT", + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "license": "ISC" + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "license": "MIT", + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", + "license": "MIT" + }, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@redocly/config": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", + "license": "MIT" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.34.2", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.2.tgz", + "integrity": "sha512-glfkQFJizLdq2fBkNvc2FJW0sxDb5exd0wIXhFk+WHaFLMREBC3CxRo2Zq7uJIdfV9U3YTceMbXJklpDfmmwFQ==", + "license": "MIT", + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/@reduxjs/toolkit": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", + "integrity": "sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==", + "license": "MIT", + "dependencies": { + "immer": "^9.0.21", + "redux": "^4.2.1", + "redux-thunk": "^2.4.2", + "reselect": "^4.1.8" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18", + "react-redux": "^7.2.1 || ^8.0.2" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, + "node_modules/@sideway/address": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@slorber/react-ideal-image": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@slorber/react-ideal-image/-/react-ideal-image-0.0.12.tgz", + "integrity": "sha512-u8KiDTEkMA7/KAeA5ywg/P7YG4zuKhWtswfVZDH8R8HXgQsFcHIYU2WaQnGuK/Du7Wdj90I+SdFmajSGFRvoKA==", + "license": "MIT", + "engines": { + "node": ">= 8.9.0", + "npm": "> 3" + }, + "peerDependencies": { + "prop-types": ">=15", + "react": ">=0.14.x", + "react-waypoint": ">=9.0.2" + } + }, + "node_modules/@slorber/remark-comment": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@slorber/remark-comment/-/remark-comment-1.0.0.tgz", + "integrity": "sha512-RCE24n7jsOj1M0UPvIQCHTe7fI0sFL4S2nwKVWwHyVr/wI/H8GosgsJGyhnsZoGFnD/P2hLf1mSbrrgSLN93NA==", + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.1.0", + "micromark-util-symbol": "^1.0.1" + } + }, + "node_modules/@svgr/babel-plugin-add-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", + "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", + "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-dynamic-title": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", + "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-em-dimensions": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", + "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-react-native-svg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", + "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-svg-component": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", + "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-preset": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", + "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", + "license": "MIT", + "dependencies": { + "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", + "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", + "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", + "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", + "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", + "@svgr/babel-plugin-transform-svg-component": "8.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/core": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", + "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "camelcase": "^6.2.0", + "cosmiconfig": "^8.1.3", + "snake-case": "^3.0.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/hast-util-to-babel-ast": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", + "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.21.3", + "entities": "^4.4.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/plugin-jsx": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", + "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "@svgr/hast-util-to-babel-ast": "8.0.0", + "svg-parser": "^2.0.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@svgr/core": "*" + } + }, + "node_modules/@svgr/plugin-svgo": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-8.1.0.tgz", + "integrity": "sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA==", + "license": "MIT", + "dependencies": { + "cosmiconfig": "^8.1.3", + "deepmerge": "^4.3.1", + "svgo": "^3.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@svgr/core": "*" + } + }, + "node_modules/@svgr/webpack": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-8.1.0.tgz", + "integrity": "sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.21.3", + "@babel/plugin-transform-react-constant-elements": "^7.21.3", + "@babel/preset-env": "^7.20.2", + "@babel/preset-react": "^7.18.6", + "@babel/preset-typescript": "^7.21.0", + "@svgr/core": "8.1.0", + "@svgr/plugin-jsx": "8.1.0", + "@svgr/plugin-svgo": "8.1.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "license": "ISC", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", + "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "license": "MIT", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", "dependencies": { "@types/ms": "*" } @@ -5975,6 +6898,12 @@ "@types/node": "*" } }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", + "license": "MIT" + }, "node_modules/@types/parse5": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", @@ -6059,9 +6988,9 @@ } }, "node_modules/@types/retry": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", - "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "license": "MIT" }, "node_modules/@types/sax": { @@ -6148,15 +7077,6 @@ "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", "license": "ISC" }, - "node_modules/@vercel/oidc": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.0.3.tgz", - "integrity": "sha512-yNEQvPcVrK9sIe637+I0jD6leluPxzwJKx/Haw6F4H77CdDsszUn5V3o96LPziXkSNE2B83+Z3mjqGKBK/R6Gg==", - "license": "Apache-2.0", - "engines": { - "node": ">= 20" - } - }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -6315,6 +7235,18 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "license": "Apache-2.0" }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -6401,24 +7333,6 @@ "node": ">=8" } }, - "node_modules/ai": { - "version": "5.0.86", - "resolved": "https://registry.npmjs.org/ai/-/ai-5.0.86.tgz", - "integrity": "sha512-ooHwNTkLdedFf98iQhtSc5btc/P4UuXuOpYneoifq0190vqosLunNdW8Hs6CiE0Am7YOGNplDK56JIPlHZIL4w==", - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/gateway": "2.0.5", - "@ai-sdk/provider": "2.0.0", - "@ai-sdk/provider-utils": "3.0.15", - "@opentelemetry/api": "1.9.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, "node_modules/ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -6483,7 +7397,6 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.24.0.tgz", "integrity": "sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/cache-browser-local-storage": "4.24.0", "@algolia/cache-common": "4.24.0", @@ -6503,9 +7416,9 @@ } }, "node_modules/algoliasearch-helper": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.26.0.tgz", - "integrity": "sha512-Rv2x3GXleQ3ygwhkhJubhhYGsICmShLAiqtUuJTUkr9uOCOXyF2E71LVT4XDnVffbknv8XgScP4U0Oxtgm+hIw==", + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.25.0.tgz", + "integrity": "sha512-vQoK43U6HXA9/euCqLjvyNdM4G2Fiu/VFp4ae0Gau9sZeIKBPvUPnXfLYAe65Bg7PFuw03coeu5K6lTPSXRObw==", "license": "MIT", "dependencies": { "@algolia/events": "^4.0.1" @@ -6519,7 +7432,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" @@ -6530,7 +7442,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", @@ -6542,7 +7453,6 @@ "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0" } @@ -6552,20 +7462,10 @@ "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/requester-common": "4.24.0" } }, - "node_modules/allof-merge": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/allof-merge/-/allof-merge-0.6.7.tgz", - "integrity": "sha512-slvjkM56OdeVkm1tllrnaumtSHwqyHrepXkAe6Am+CW4WdbHkNqdOKPF6cvY3/IouzvXk1BoLICT5LY7sCoFGw==", - "license": "MIT", - "dependencies": { - "json-crawl": "^0.5.3" - } - }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -6704,6 +7604,36 @@ "node": ">=8" } }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, "node_modules/astring": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", @@ -6765,6 +7695,21 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", @@ -6953,15 +7898,6 @@ ], "license": "MIT" }, - "node_modules/baseline-browser-mapping": { - "version": "2.8.23", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.23.tgz", - "integrity": "sha512-616V5YX4bepJFzNyOfce5Fa8fDJMfoxzOIzDCZwaGL8MKVpFrXqfNUoIpRn9YMI5pXf/VKgzjB4htFMsFKKdiQ==", - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.js" - } - }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -7038,6 +7974,12 @@ "node": ">= 6" } }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "license": "MIT" + }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -7104,2773 +8046,2382 @@ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/bonjour-service": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", - "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "multicast-dns": "^7.2.5" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "license": "ISC" - }, - "node_modules/boxen": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz", - "integrity": "sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==", - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^6.2.0", - "chalk": "^4.1.2", - "cli-boxes": "^3.0.0", - "string-width": "^5.0.1", - "type-fest": "^2.5.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", - "update-browserslist-db": "^1.1.4" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "license": "MIT" - }, - "node_modules/bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", - "license": "MIT", - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacheable-lookup": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", - "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", - "license": "MIT", - "engines": { - "node": ">=14.16" - } - }, - "node_modules/cacheable-request": { - "version": "10.2.14", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", - "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", - "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "^4.0.2", - "get-stream": "^6.0.1", - "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.3", - "mimic-response": "^4.0.0", - "normalize-url": "^8.0.0", - "responselike": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/cacheable-request/node_modules/mimic-response": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", - "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-me-maybe": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", - "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", - "license": "MIT" - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "license": "MIT", + "side-channel": "^1.0.6" + }, "engines": { - "node": ">=10" + "node": ">=0.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "node_modules/bonjour-service": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", "license": "MIT", "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001753", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz", - "integrity": "sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/ccount": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", - "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "license": "ISC" }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/boxen": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz", + "integrity": "sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "ansi-align": "^3.0.1", + "camelcase": "^6.2.0", + "chalk": "^4.1.2", + "cli-boxes": "^3.0.0", + "string-width": "^5.0.1", + "type-fest": "^2.5.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/character-entities-html4": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", - "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "node_modules/character-reference-invalid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", - "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "node_modules/charset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", - "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "node_modules/browserify-rsa": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", + "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", "license": "MIT", + "dependencies": { + "bn.js": "^5.2.1", + "randombytes": "^2.1.0", + "safe-buffer": "^5.2.1" + }, "engines": { - "node": ">=4.0.0" + "node": ">= 0.10" } }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "license": "MIT", + "node_modules/browserify-sign": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", + "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", + "license": "ISC", "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.5", + "hash-base": "~3.0", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" }, "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + "node": ">= 0.12" } }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "license": "BSD-2-Clause", + "node_modules/browserify-sign/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/browserify-sign/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "safe-buffer": "~5.1.0" } }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC" + "node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/browserslist": { + "version": "4.24.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", + "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001716", + "electron-to-chromium": "^1.5.149", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, "engines": { - "node": ">=6.0" + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "funding": [ { "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } ], "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/clean-css": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", - "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "license": "MIT" + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "license": "MIT", - "dependencies": { - "source-map": "~0.6.0" - }, "engines": { - "node": ">= 10.0" + "node": ">= 0.8" } }, - "node_modules/clean-css/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "license": "BSD-3-Clause", + "node_modules/cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=14.16" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + }, "engines": { - "node": ">=6" + "node": ">=14.16" } }, - "node_modules/cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "node_modules/cacheable-request/node_modules/mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", "license": "MIT", "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-table3": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", - "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "license": "MIT", "dependencies": { - "string-width": "^4.2.0" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" }, "engines": { - "node": "10.* || >= 12.*" + "node": ">= 0.4" }, - "optionalDependencies": { - "@colors/colors": "1.5.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cli-table3/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/cli-table3/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { - "node": ">=12" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", "license": "MIT" }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 6" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "license": "MIT", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001717", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz", + "integrity": "sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "license": "MIT", - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", "license": "MIT", - "engines": { - "node": ">=6" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/collapse-white-space": { + "node_modules/character-entities-html4": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", - "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/color-convert": { + "node_modules/character-reference-invalid": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colord": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "license": "MIT" - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "license": "MIT" - }, - "node_modules/combine-promises": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/combine-promises/-/combine-promises-1.2.0.tgz", - "integrity": "sha512-VcQB1ziGD0NXrhKxiwyNbCDmRzs/OShMs2GqW2DlU2A/Sd0nQxE1oWDAE5O0ygSx5mgQOn9eIFh7yKPgFRVkPQ==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "node_modules/charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", "license": "MIT", "engines": { - "node": ">= 6" + "node": ">=4.0.0" } }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", - "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "license": "ISC" - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "node_modules/cheerio": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", + "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", "license": "MIT", "dependencies": { - "mime-db": ">= 1.43.0 < 2" + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^9.1.0", + "parse5": "^7.1.2", + "parse5-htmlparser2-tree-adapter": "^7.0.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^6.19.5", + "whatwg-mimetype": "^4.0.0" }, "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", - "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "compressible": "~2.0.18", - "debug": "2.6.9", - "negotiator": "~0.6.4", - "on-headers": "~1.1.0", - "safe-buffer": "5.2.1", - "vary": "~1.1.2" + "node": ">=18.17" }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/compute-gcd": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", - "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/compute-lcm": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", - "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "license": "BSD-2-Clause", "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "license": "MIT", "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/configstore": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", - "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", - "license": "BSD-2-Clause", - "dependencies": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=12" + "node": ">= 8.10.0" }, "funding": { - "url": "https://github.com/yeoman/configstore?sponsor=1" + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "license": "MIT", "engines": { - "node": ">=0.8" + "node": ">=6.0" } }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "license": "MIT", "engines": { - "node": "^14.18.0 || >=16.10.0" + "node": ">=8" } }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, "engines": { - "node": ">= 0.6" + "node": ">= 0.10" } }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, "engines": { - "node": ">= 0.6" + "node": ">= 10.0" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" + "node_modules/clean-css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=6" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" - }, - "node_modules/copy-text-to-clipboard": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz", - "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==", + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "license": "MIT", "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/copy-webpack-plugin": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", - "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", "license": "MIT", "dependencies": { - "fast-glob": "^3.2.11", - "glob-parent": "^6.0.1", - "globby": "^13.1.1", - "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" + "string-width": "^4.2.0" }, "engines": { - "node": ">= 14.15.0" + "node": "10.* || >= 12.*" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-table3/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "peerDependencies": { - "webpack": "^5.1.0" + "engines": { + "node": ">=8" } }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "license": "ISC", "dependencies": { - "is-glob": "^4.0.3" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=12" } }, - "node_modules/copy-webpack-plugin/node_modules/globby": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", - "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "license": "MIT", "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/copy-webpack-plugin/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/core-js": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.42.0.tgz", - "integrity": "sha512-Sz4PP4ZA+Rq4II21qkNqOEDTDrCvcANId3xpIgB34NDkWc3UduWj2dqEtN9yZIq8Dk3HyPI33x9sqqU5C8sr0g==", - "hasInstallScript": true, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/core-js-compat": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz", - "integrity": "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==", + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "license": "MIT", - "dependencies": { - "browserslist": "^4.24.4" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "engines": { + "node": ">=6" } }, - "node_modules/core-js-pure": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.42.0.tgz", - "integrity": "sha512-007bM04u91fF4kMgwom2I5cQxAFIy8jVulgr9eozILl/SZE53QOqnW/+vviC+wQWLv+AunBG+8Q0TLoeSsSxRQ==", - "hasInstallScript": true, + "node_modules/collapse-white-space": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", + "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", "license": "MIT", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" - }, - "node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", "license": "MIT", "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" + "color-convert": "^2.0.1", + "color-string": "^1.9.0" }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=12.5.0" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">= 8" + "node": ">=7.0.0" } }, - "node_modules/crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, - "node_modules/crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", "license": "MIT", "dependencies": { - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" } }, - "node_modules/crypto-random-string/node_modules/type-fest": { + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "license": "MIT" + }, + "node_modules/colorette": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "license": "(MIT OR CC0-1.0)", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "license": "MIT" + }, + "node_modules/combine-promises": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/combine-promises/-/combine-promises-1.2.0.tgz", + "integrity": "sha512-VcQB1ziGD0NXrhKxiwyNbCDmRzs/OShMs2GqW2DlU2A/Sd0nQxE1oWDAE5O0ygSx5mgQOn9eIFh7yKPgFRVkPQ==", + "license": "MIT", "engines": { "node": ">=10" - }, + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/css-blank-pseudo": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-7.0.1.tgz", - "integrity": "sha512-jf+twWGDf6LDoXDUode+nc7ZlrqfaNphrBIBrcmeP3D8yw1uPaix1gCC8LUQUGQ6CycuK2opkbFFWFuq/a94ag==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "license": "ISC" + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "license": "MIT", "dependencies": { - "postcss-selector-parser": "^7.0.0" + "mime-db": ">= 1.43.0 < 2" }, "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" + "node": ">= 0.6" } }, - "node_modules/css-blank-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "node_modules/compression": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", + "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", "license": "MIT", "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "negotiator": "~0.6.4", + "on-headers": "~1.0.2", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" }, "engines": { - "node": ">=4" + "node": ">= 0.8.0" } }, - "node_modules/css-declaration-sorter": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", - "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", - "license": "ISC", + "node_modules/compression/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.0.9" + "node": ">= 0.8" } }, - "node_modules/css-has-pseudo": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-7.0.3.tgz", - "integrity": "sha512-oG+vKuGyqe/xvEMoxAQrhi7uY16deJR3i7wwhBerVrGQKSqUC5GiOVxTpM9F9B9hw0J+eKeOWLH7E9gZ1Dr5rA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { - "@csstools/selector-specificity": "^5.0.0", - "postcss-selector-parser": "^7.0.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" + "ms": "2.0.0" } }, - "node_modules/css-has-pseudo/node_modules/@csstools/selector-specificity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", - "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^7.0.0" + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" } }, - "node_modules/css-has-pseudo/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "license": "MIT", + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" } }, - "node_modules/css-loader": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", - "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "license": "MIT", "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.33", - "postcss-modules-extract-imports": "^3.1.0", - "postcss-modules-local-by-default": "^4.0.5", - "postcss-modules-scope": "^3.2.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "@rspack/core": { - "optional": true - }, - "webpack": { - "optional": true - } + "ini": "^1.3.4", + "proto-list": "~1.2.1" } }, - "node_modules/css-minimizer-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-5.0.1.tgz", - "integrity": "sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==", - "license": "MIT", + "node_modules/configstore": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", + "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", + "license": "BSD-2-Clause", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "cssnano": "^6.0.1", - "jest-worker": "^29.4.3", - "postcss": "^8.4.24", - "schema-utils": "^4.0.1", - "serialize-javascript": "^6.0.1" + "dot-prop": "^6.0.1", + "graceful-fs": "^4.2.6", + "unique-string": "^3.0.0", + "write-file-atomic": "^3.0.3", + "xdg-basedir": "^5.0.1" }, "engines": { - "node": ">= 14.15.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "@parcel/css": { - "optional": true - }, - "@swc/css": { - "optional": true - }, - "clean-css": { - "optional": true - }, - "csso": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "lightningcss": { - "optional": true - } + "url": "https://github.com/yeoman/configstore?sponsor=1" } }, - "node_modules/css-prefers-color-scheme": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-10.0.0.tgz", - "integrity": "sha512-VCtXZAWivRglTZditUfB4StnsWr6YVZ2PRtuxQLKTNRdtAf8tpzaVPE9zXIF3VaSc7O70iK/j1+NXxyQCqdPjQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "license": "MIT", "engines": { - "node": ">=18" - }, - "peerDependencies": { - "postcss": "^8.4" + "node": ">=0.8" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "license": "MIT" + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "node_modules/consolidated-events": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz", + "integrity": "sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ==", + "license": "MIT" + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" } }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "license": "MIT", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + "node": ">= 0.6" } }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "license": "BSD-2-Clause", + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "node": ">= 0.6" } }, - "node_modules/cssdb": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.4.2.tgz", - "integrity": "sha512-PzjkRkRUS+IHDJohtxkIczlxPPZqRo0nXplsYXOMBRPjcVRjj1W4DfvRgshUYTVuUigU7ptVYkFJQ7abUB0nyg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - } - ], - "license": "MIT-0" + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "node_modules/copy-text-to-clipboard": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz", + "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==", "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cssnano": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", - "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", + "node_modules/copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", "license": "MIT", "dependencies": { - "cssnano-preset-default": "^6.1.2", - "lilconfig": "^3.1.1" + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" }, "engines": { - "node": "^14 || ^16 || >=18.0" + "node": ">= 14.15.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/cssnano" + "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "postcss": "^8.4.31" + "webpack": "^5.1.0" } }, - "node_modules/cssnano-preset-advanced": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-6.1.2.tgz", - "integrity": "sha512-Nhao7eD8ph2DoHolEzQs5CfRpiEP0xa1HBdnFZ82kvqdmbwVBUr2r1QuQ4t1pi+D1ZpqpcO4T+wy/7RxzJ/WPQ==", - "license": "MIT", + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "license": "ISC", "dependencies": { - "autoprefixer": "^10.4.19", - "browserslist": "^4.23.0", - "cssnano-preset-default": "^6.1.2", - "postcss-discard-unused": "^6.0.5", - "postcss-merge-idents": "^6.0.3", - "postcss-reduce-idents": "^6.0.3", - "postcss-zindex": "^6.0.2" + "is-glob": "^4.0.3" }, "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" + "node": ">=10.13.0" } }, - "node_modules/cssnano-preset-default": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", - "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", + "node_modules/copy-webpack-plugin/node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", "license": "MIT", "dependencies": { - "browserslist": "^4.23.0", - "css-declaration-sorter": "^7.2.0", - "cssnano-utils": "^4.0.2", - "postcss-calc": "^9.0.1", - "postcss-colormin": "^6.1.0", - "postcss-convert-values": "^6.1.0", - "postcss-discard-comments": "^6.0.2", - "postcss-discard-duplicates": "^6.0.3", - "postcss-discard-empty": "^6.0.3", - "postcss-discard-overridden": "^6.0.2", - "postcss-merge-longhand": "^6.0.5", - "postcss-merge-rules": "^6.1.1", - "postcss-minify-font-values": "^6.1.0", - "postcss-minify-gradients": "^6.0.3", - "postcss-minify-params": "^6.1.0", - "postcss-minify-selectors": "^6.0.4", - "postcss-normalize-charset": "^6.0.2", - "postcss-normalize-display-values": "^6.0.2", - "postcss-normalize-positions": "^6.0.2", - "postcss-normalize-repeat-style": "^6.0.2", - "postcss-normalize-string": "^6.0.2", - "postcss-normalize-timing-functions": "^6.0.2", - "postcss-normalize-unicode": "^6.1.0", - "postcss-normalize-url": "^6.0.2", - "postcss-normalize-whitespace": "^6.0.2", - "postcss-ordered-values": "^6.0.2", - "postcss-reduce-initial": "^6.1.0", - "postcss-reduce-transforms": "^6.0.2", - "postcss-svgo": "^6.0.3", - "postcss-unique-selectors": "^6.0.4" + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" }, "engines": { - "node": "^14 || ^16 || >=18.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependencies": { - "postcss": "^8.4.31" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cssnano-utils": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", - "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", + "node_modules/copy-webpack-plugin/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "license": "MIT", "engines": { - "node": "^14 || ^16 || >=18.0" + "node": ">=12" }, - "peerDependencies": { - "postcss": "^8.4.31" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", + "node_modules/core-js": { + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.42.0.tgz", + "integrity": "sha512-Sz4PP4ZA+Rq4II21qkNqOEDTDrCvcANId3xpIgB34NDkWc3UduWj2dqEtN9yZIq8Dk3HyPI33x9sqqU5C8sr0g==", + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "node_modules/csso/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", + "node_modules/core-js-compat": { + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz", + "integrity": "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==", "license": "MIT", "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" + "browserslist": "^4.24.4" }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "license": "CC0-1.0" - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "license": "MIT" + "node_modules/core-js-pure": { + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.42.0.tgz", + "integrity": "sha512-007bM04u91fF4kMgwom2I5cQxAFIy8jVulgr9eozILl/SZE53QOqnW/+vviC+wQWLv+AunBG+8Q0TLoeSsSxRQ==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "license": "MIT" }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "license": "MIT", "dependencies": { - "ms": "^2.1.3" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" }, "peerDependenciesMeta": { - "supports-color": { + "typescript": { "optional": true } } }, - "node_modules/decode-named-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.1.0.tgz", - "integrity": "sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==", + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "license": "MIT", "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "license": "MIT", "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "license": "MIT", - "engines": { - "node": ">=4.0.0" + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/default-browser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", - "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "node_modules/crypto-browserify": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", "license": "MIT", "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" }, "engines": { - "node": ">=18" + "node": ">= 0.10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/default-browser-id": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", - "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + }, + "node_modules/crypto-random-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", + "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", "license": "MIT", + "dependencies": { + "type-fest": "^1.0.1" + }, "engines": { - "node": ">=18" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "license": "MIT", + "node_modules/crypto-random-string/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", + "node_modules/css-blank-pseudo": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-7.0.1.tgz", + "integrity": "sha512-jf+twWGDf6LDoXDUode+nc7ZlrqfaNphrBIBrcmeP3D8yw1uPaix1gCC8LUQUGQ6CycuK2opkbFFWFuq/a94ag==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "postcss-selector-parser": "^7.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "license": "MIT", - "engines": { - "node": ">=8" + "peerDependencies": { + "postcss": "^8.4" } }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "node_modules/css-blank-pseudo/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", + "node_modules/css-declaration-sorter": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", + "license": "ISC", "engines": { - "node": ">= 0.8" + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.0.9" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "license": "MIT", + "node_modules/css-has-pseudo": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-7.0.2.tgz", + "integrity": "sha512-nzol/h+E0bId46Kn2dQH5VElaknX2Sr0hFuB/1EomdC7j+OISt2ZzK7EHX9DZDY53WbIVAR7FYKSO2XnSf07MQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/selector-specificity": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0" + }, "engines": { - "node": ">=6" + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", + "node_modules/css-has-pseudo/node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" + "node": ">=18" }, - "engines": { - "node": ">=0.10" + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" } }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "license": "MIT" - }, - "node_modules/detect-package-manager": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/detect-package-manager/-/detect-package-manager-3.0.2.tgz", - "integrity": "sha512-8JFjJHutStYrfWwzfretQoyNGoZVW1Fsrp4JO9spa7h/fBfwgTMEIy4/LBzRDGsxwVPHU0q+T9YvwLDJoOApLQ==", + "node_modules/css-has-pseudo/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", "dependencies": { - "execa": "^5.1.1" + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/detect-port": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.6.1.tgz", - "integrity": "sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==", + "node_modules/css-loader": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", + "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", "license": "MIT", "dependencies": { - "address": "^1.0.1", - "debug": "4" - }, - "bin": { - "detect": "bin/detect-port.js", - "detect-port": "bin/detect-port.js" + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" }, "engines": { - "node": ">= 4.0.0" + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "node_modules/css-minimizer-webpack-plugin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-5.0.1.tgz", + "integrity": "sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==", "license": "MIT", "dependencies": { - "dequal": "^2.0.0" + "@jridgewell/trace-mapping": "^0.3.18", + "cssnano": "^6.0.1", + "jest-worker": "^29.4.3", + "postcss": "^8.4.24", + "schema-utils": "^4.0.1", + "serialize-javascript": "^6.0.1" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "license": "BSD-3-Clause", "engines": { - "node": ">=0.3.1" + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@parcel/css": { + "optional": true + }, + "@swc/css": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "csso": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "lightningcss": { + "optional": true + } } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, + "node_modules/css-prefers-color-scheme": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-10.0.0.tgz", + "integrity": "sha512-VCtXZAWivRglTZditUfB4StnsWr6YVZ2PRtuxQLKTNRdtAf8tpzaVPE9zXIF3VaSc7O70iK/j1+NXxyQCqdPjQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", "engines": { - "node": ">=8" - } - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true, - "license": "MIT" - }, - "node_modules/dns-packet": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", - "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", - "license": "MIT", - "dependencies": { - "@leichtgewicht/ip-codec": "^2.0.1" + "node": ">=18" }, - "engines": { - "node": ">=6" + "peerDependencies": { + "postcss": "^8.4" } }, - "node_modules/docusaurus-plugin-image-zoom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/docusaurus-plugin-image-zoom/-/docusaurus-plugin-image-zoom-2.0.0.tgz", - "integrity": "sha512-TWHQZeoiged+95CESlZk++lihzl3pqw34n0/fbexx2AocmFhbo9K2scYDgYB8amki4/X6mUCLTPZE1pQvT+00Q==", - "license": "MIT", + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "license": "BSD-2-Clause", "dependencies": { - "medium-zoom": "^1.0.8", - "validate-peer-dependencies": "^2.2.0" + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" }, - "peerDependencies": { - "@docusaurus/theme-classic": ">=3.0.0" + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/docusaurus-plugin-openapi-docs": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/docusaurus-plugin-openapi-docs/-/docusaurus-plugin-openapi-docs-4.5.1.tgz", - "integrity": "sha512-3I6Sjz19D/eM86a24/nVkYfqNkl/zuXSP04XVo7qm/vlPeCpHVM4li2DLj7PzElr6dlS9RbaS4HVIQhEOPGBRQ==", + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.5.4", - "@redocly/openapi-core": "^1.10.5", - "allof-merge": "^0.6.6", - "chalk": "^4.1.2", - "clsx": "^1.1.1", - "fs-extra": "^9.0.1", - "json-pointer": "^0.6.2", - "json5": "^2.2.3", - "lodash": "^4.17.20", - "mustache": "^4.2.0", - "openapi-to-postmanv2": "^4.21.0", - "postman-collection": "^4.4.0", - "slugify": "^1.6.5", - "swagger2openapi": "^7.0.8", - "xml-formatter": "^2.6.1" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" }, "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@docusaurus/plugin-content-docs": "^3.5.0", - "@docusaurus/utils": "^3.5.0", - "@docusaurus/utils-validation": "^3.5.0", - "react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0" + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, - "node_modules/docusaurus-plugin-openapi-docs/node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "license": "BSD-2-Clause", "engines": { - "node": ">=6" - } - }, - "node_modules/docusaurus-plugin-openapi-docs/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "node": ">= 6" }, - "engines": { - "node": ">=10" + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/docusaurus-plugin-sass": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.6.tgz", - "integrity": "sha512-2hKQQDkrufMong9upKoG/kSHJhuwd+FA3iAe/qzS/BmWpbIpe7XKmq5wlz4J5CJaOPu4x+iDJbgAxZqcoQf0kg==", + "node_modules/cssdb": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.2.5.tgz", + "integrity": "sha512-leAt8/hdTCtzql9ZZi86uYAmCLzVKpJMMdjbvOGVnXFXz/BWFpBmM1MHEHU/RqtPyRYmabVmEW1DtX3YGLuuLA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + } + ], + "license": "MIT-0" + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "license": "MIT", - "peer": true, - "dependencies": { - "sass-loader": "^16.0.2" + "bin": { + "cssesc": "bin/cssesc" }, - "peerDependencies": { - "@docusaurus/core": "^2.0.0-beta || ^3.0.0-alpha", - "sass": "^1.30.0" + "engines": { + "node": ">=4" } }, - "node_modules/docusaurus-theme-openapi-docs": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/docusaurus-theme-openapi-docs/-/docusaurus-theme-openapi-docs-4.5.1.tgz", - "integrity": "sha512-C7mYh9JC3l9jjRtqJVu0EIyOgxHB08jE0Tp5NSkNkrrBak4A13SrXCisNjvt1eaNjS+tsz7qD0bT3aI5hsRvWA==", + "node_modules/cssnano": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", + "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", "license": "MIT", "dependencies": { - "@hookform/error-message": "^2.0.1", - "@reduxjs/toolkit": "^1.7.1", - "allof-merge": "^0.6.6", - "buffer": "^6.0.3", - "clsx": "^1.1.1", - "copy-text-to-clipboard": "^3.1.0", - "crypto-js": "^4.1.1", - "file-saver": "^2.0.5", - "lodash": "^4.17.20", - "pako": "^2.1.0", - "postman-code-generators": "^1.10.1", - "postman-collection": "^4.4.0", - "prism-react-renderer": "^2.3.0", - "process": "^0.11.10", - "react-hook-form": "^7.43.8", - "react-live": "^4.0.0", - "react-magic-dropzone": "^1.0.1", - "react-markdown": "^8.0.1", - "react-modal": "^3.15.1", - "react-redux": "^7.2.0", - "rehype-raw": "^6.1.1", - "remark-gfm": "3.0.1", - "sass": "^1.80.4", - "sass-loader": "^16.0.2", - "unist-util-visit": "^5.0.0", - "url": "^0.11.1", - "xml-formatter": "^2.6.1" + "cssnano-preset-default": "^6.1.2", + "lilconfig": "^3.1.1" }, "engines": { - "node": ">=14" + "node": "^14 || ^16 || >=18.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" }, "peerDependencies": { - "@docusaurus/theme-common": "^3.5.0", - "docusaurus-plugin-openapi-docs": "^4.0.0", - "docusaurus-plugin-sass": "^0.2.3", - "react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/@types/hast": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", - "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2" + "postcss": "^8.4.31" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/@types/mdast": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", - "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", + "node_modules/cssnano-preset-advanced": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-6.1.2.tgz", + "integrity": "sha512-Nhao7eD8ph2DoHolEzQs5CfRpiEP0xa1HBdnFZ82kvqdmbwVBUr2r1QuQ4t1pi+D1ZpqpcO4T+wy/7RxzJ/WPQ==", "license": "MIT", "dependencies": { - "@types/unist": "^2" - } - }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "license": "MIT", + "autoprefixer": "^10.4.19", + "browserslist": "^4.23.0", + "cssnano-preset-default": "^6.1.2", + "postcss-discard-unused": "^6.0.5", + "postcss-merge-idents": "^6.0.3", + "postcss-reduce-idents": "^6.0.3", + "postcss-zindex": "^6.0.2" + }, "engines": { - "node": ">=12" + "node": "^14 || ^16 || >=18.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "postcss": "^8.4.31" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-from-parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", - "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", + "node_modules/cssnano-preset-default": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", + "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", "license": "MIT", "dependencies": { - "@types/hast": "^2.0.0", - "@types/unist": "^2.0.0", - "hastscript": "^7.0.0", - "property-information": "^6.0.0", - "vfile": "^5.0.0", - "vfile-location": "^4.0.0", - "web-namespaces": "^2.0.0" + "browserslist": "^4.23.0", + "css-declaration-sorter": "^7.2.0", + "cssnano-utils": "^4.0.2", + "postcss-calc": "^9.0.1", + "postcss-colormin": "^6.1.0", + "postcss-convert-values": "^6.1.0", + "postcss-discard-comments": "^6.0.2", + "postcss-discard-duplicates": "^6.0.3", + "postcss-discard-empty": "^6.0.3", + "postcss-discard-overridden": "^6.0.2", + "postcss-merge-longhand": "^6.0.5", + "postcss-merge-rules": "^6.1.1", + "postcss-minify-font-values": "^6.1.0", + "postcss-minify-gradients": "^6.0.3", + "postcss-minify-params": "^6.1.0", + "postcss-minify-selectors": "^6.0.4", + "postcss-normalize-charset": "^6.0.2", + "postcss-normalize-display-values": "^6.0.2", + "postcss-normalize-positions": "^6.0.2", + "postcss-normalize-repeat-style": "^6.0.2", + "postcss-normalize-string": "^6.0.2", + "postcss-normalize-timing-functions": "^6.0.2", + "postcss-normalize-unicode": "^6.1.0", + "postcss-normalize-url": "^6.0.2", + "postcss-normalize-whitespace": "^6.0.2", + "postcss-ordered-values": "^6.0.2", + "postcss-reduce-initial": "^6.1.0", + "postcss-reduce-transforms": "^6.0.2", + "postcss-svgo": "^6.0.3", + "postcss-unique-selectors": "^6.0.4" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": "^14 || ^16 || >=18.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-parse-selector": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", - "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "node_modules/cssnano-utils": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", + "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", "license": "MIT", - "dependencies": { - "@types/hast": "^2.0.0" + "engines": { + "node": "^14 || ^16 || >=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "peerDependencies": { + "postcss": "^8.4.31" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-raw": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", - "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "node_modules/csso": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", "license": "MIT", "dependencies": { - "@types/hast": "^2.0.0", - "@types/parse5": "^6.0.0", - "hast-util-from-parse5": "^7.0.0", - "hast-util-to-parse5": "^7.0.0", - "html-void-elements": "^2.0.0", - "parse5": "^6.0.0", - "unist-util-position": "^4.0.0", - "unist-util-visit": "^4.0.0", - "vfile": "^5.0.0", - "web-namespaces": "^2.0.0", - "zwitch": "^2.0.0" + "css-tree": "~2.2.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-to-parse5": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", - "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", + "node_modules/csso/node_modules/css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", "license": "MIT", "dependencies": { - "@types/hast": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "property-information": "^6.0.0", - "space-separated-tokens": "^2.0.0", - "web-namespaces": "^2.0.0", - "zwitch": "^2.0.0" + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/hastscript": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", - "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", + "license": "CC0-1.0" + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" + }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { - "@types/hast": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-parse-selector": "^3.0.0", - "property-information": "^6.0.0", - "space-separated-tokens": "^2.0.0" + "ms": "^2.1.3" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/html-void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", - "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "node_modules/decode-named-character-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.1.0.tgz", + "integrity": "sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==", "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-find-and-replace": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.2.tgz", - "integrity": "sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw==", + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "license": "MIT", "dependencies": { - "@types/mdast": "^3.0.0", - "escape-string-regexp": "^5.0.0", - "unist-util-is": "^5.0.0", - "unist-util-visit-parents": "^5.0.0" + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-from-markdown": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", - "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "mdast-util-to-string": "^3.1.0", - "micromark": "^3.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-decode-string": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "unist-util-stringify-position": "^3.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=4.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-2.0.2.tgz", - "integrity": "sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==", + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "license": "BSD-2-Clause", "dependencies": { - "mdast-util-from-markdown": "^1.0.0", - "mdast-util-gfm-autolink-literal": "^1.0.0", - "mdast-util-gfm-footnote": "^1.0.0", - "mdast-util-gfm-strikethrough": "^1.0.0", - "mdast-util-gfm-table": "^1.0.0", - "mdast-util-gfm-task-list-item": "^1.0.0", - "mdast-util-to-markdown": "^1.0.0" + "execa": "^5.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">= 10" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm-autolink-literal": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.3.tgz", - "integrity": "sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA==", + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "ccount": "^2.0.0", - "mdast-util-find-and-replace": "^2.0.0", - "micromark-util-character": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=10" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm-footnote": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.2.tgz", - "integrity": "sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ==", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "license": "MIT", "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-markdown": "^1.3.0", - "micromark-util-normalize-identifier": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm-strikethrough": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.3.tgz", - "integrity": "sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ==", + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-markdown": "^1.3.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=8" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm-table": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.7.tgz", - "integrity": "sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg==", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "license": "MIT", "dependencies": { - "@types/mdast": "^3.0.0", - "markdown-table": "^3.0.0", - "mdast-util-from-markdown": "^1.0.0", - "mdast-util-to-markdown": "^1.3.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-gfm-task-list-item": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.2.tgz", - "integrity": "sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ==", + "node_modules/del": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", "license": "MIT", "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-markdown": "^1.3.0" + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-phrasing": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", - "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==", + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">= 0.8" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-to-markdown": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", - "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==", + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "longest-streak": "^3.0.0", - "mdast-util-phrasing": "^3.0.0", - "mdast-util-to-string": "^3.0.0", - "micromark-util-decode-string": "^1.0.0", - "unist-util-visit": "^4.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=6" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-to-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", - "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", "license": "MIT", "dependencies": { - "@types/mdast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", - "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "micromark-core-commonmark": "^1.0.1", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-core-commonmark": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", - "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "license": "MIT" + }, + "node_modules/detect-package-manager": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/detect-package-manager/-/detect-package-manager-3.0.2.tgz", + "integrity": "sha512-8JFjJHutStYrfWwzfretQoyNGoZVW1Fsrp4JO9spa7h/fBfwgTMEIy4/LBzRDGsxwVPHU0q+T9YvwLDJoOApLQ==", "license": "MIT", "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-factory-destination": "^1.0.0", - "micromark-factory-label": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-factory-title": "^1.0.0", - "micromark-factory-whitespace": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-html-tag-name": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" + "execa": "^5.1.1" + }, + "engines": { + "node": ">=12" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-2.0.3.tgz", - "integrity": "sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ==", + "node_modules/detect-port": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.6.1.tgz", + "integrity": "sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==", "license": "MIT", "dependencies": { - "micromark-extension-gfm-autolink-literal": "^1.0.0", - "micromark-extension-gfm-footnote": "^1.0.0", - "micromark-extension-gfm-strikethrough": "^1.0.0", - "micromark-extension-gfm-table": "^1.0.0", - "micromark-extension-gfm-tagfilter": "^1.0.0", - "micromark-extension-gfm-task-list-item": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-types": "^1.0.0" + "address": "^1.0.1", + "debug": "4" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" + }, + "engines": { + "node": ">= 4.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-autolink-literal": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.5.tgz", - "integrity": "sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg==", + "node_modules/detect-port-alt": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", + "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", "license": "MIT", "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" + "address": "^1.0.1", + "debug": "^2.6.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "bin": { + "detect": "bin/detect-port", + "detect-port": "bin/detect-port" + }, + "engines": { + "node": ">= 4.2.1" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-footnote": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.1.2.tgz", - "integrity": "sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q==", + "node_modules/detect-port-alt/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "license": "MIT", "dependencies": { - "micromark-core-commonmark": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "ms": "2.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-strikethrough": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.7.tgz", - "integrity": "sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==", + "node_modules/detect-port-alt/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", "license": "MIT", "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" + "dequal": "^2.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-table": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.7.tgz", - "integrity": "sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw==", + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "license": "MIT", "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-tagfilter": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.2.tgz", - "integrity": "sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g==", + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "license": "MIT", "dependencies": { - "micromark-util-types": "^1.0.0" + "path-type": "^4.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=8" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-extension-gfm-task-list-item": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.5.tgz", - "integrity": "sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ==", + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", "license": "MIT", "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" + "@leichtgewicht/ip-codec": "^2.0.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=6" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-destination": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", - "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-image-zoom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-image-zoom/-/docusaurus-plugin-image-zoom-2.0.0.tgz", + "integrity": "sha512-TWHQZeoiged+95CESlZk++lihzl3pqw34n0/fbexx2AocmFhbo9K2scYDgYB8amki4/X6mUCLTPZE1pQvT+00Q==", "license": "MIT", "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" + "medium-zoom": "^1.0.8", + "validate-peer-dependencies": "^2.2.0" + }, + "peerDependencies": { + "@docusaurus/theme-classic": ">=3.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-label": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", - "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-openapi-docs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-openapi-docs/-/docusaurus-plugin-openapi-docs-3.0.1.tgz", + "integrity": "sha512-6SRqwey/TXMNu2G02mbWgxrifhpjGOjDr30N+58AR0Ytgc+HXMqlPAUIvTe+e7sOBfAtBbiNlmOWv5KSYIjf3w==", "license": "MIT", "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" + "@apidevtools/json-schema-ref-parser": "^11.5.4", + "@docusaurus/plugin-content-docs": "^3.0.1", + "@docusaurus/utils": "^3.0.1", + "@docusaurus/utils-validation": "^3.0.1", + "@redocly/openapi-core": "^1.10.5", + "chalk": "^4.1.2", + "clsx": "^1.1.1", + "fs-extra": "^9.0.1", + "json-pointer": "^0.6.2", + "json-schema-merge-allof": "^0.8.1", + "json5": "^2.2.3", + "lodash": "^4.17.20", + "mustache": "^4.2.0", + "openapi-to-postmanv2": "^4.21.0", + "postman-collection": "^4.4.0", + "slugify": "^1.6.5", + "swagger2openapi": "^7.0.8", + "xml-formatter": "^2.6.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-title": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", - "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-openapi-docs/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", "license": "MIT", - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" + "engines": { + "node": ">=6" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-whitespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", - "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-openapi-docs/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "license": "MIT", "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-chunked": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", - "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-sass": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.6.tgz", + "integrity": "sha512-2hKQQDkrufMong9upKoG/kSHJhuwd+FA3iAe/qzS/BmWpbIpe7XKmq5wlz4J5CJaOPu4x+iDJbgAxZqcoQf0kg==", "license": "MIT", "dependencies": { - "micromark-util-symbol": "^1.0.0" + "sass-loader": "^16.0.2" + }, + "peerDependencies": { + "@docusaurus/core": "^2.0.0-beta || ^3.0.0-alpha", + "sass": "^1.30.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-classify-character": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", - "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-plugin-sass/node_modules/sass-loader": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.5.tgz", + "integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==", "license": "MIT", "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-combine-extensions": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", - "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-types": "^1.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-decode-numeric-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", - "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/docusaurus-theme-openapi-docs/-/docusaurus-theme-openapi-docs-3.0.1.tgz", + "integrity": "sha512-tqypV91tC3wuWj9O+4n0M/e5AgHOeMT2nvPj1tjlPkC7/dLinZvpwQStT4YDUPYSoHRseqxd7lhivFQHcmlryg==", "license": "MIT", "dependencies": { - "micromark-util-symbol": "^1.0.0" + "@docusaurus/theme-common": "^3.0.1", + "@hookform/error-message": "^2.0.1", + "@reduxjs/toolkit": "^1.7.1", + "clsx": "^1.1.1", + "copy-text-to-clipboard": "^3.1.0", + "crypto-js": "^4.1.1", + "docusaurus-plugin-openapi-docs": "^3.0.1", + "docusaurus-plugin-sass": "^0.2.3", + "file-saver": "^2.0.5", + "lodash": "^4.17.20", + "node-polyfill-webpack-plugin": "^2.0.1", + "postman-code-generators": "^1.10.1", + "postman-collection": "^4.4.0", + "prism-react-renderer": "^2.3.0", + "react-hook-form": "^7.43.8", + "react-live": "^4.0.0", + "react-magic-dropzone": "^1.0.1", + "react-markdown": "^8.0.1", + "react-modal": "^3.15.1", + "react-redux": "^7.2.0", + "rehype-raw": "^6.1.1", + "sass": "^1.58.1", + "sass-loader": "^13.3.2", + "webpack": "^5.61.0", + "xml-formatter": "^2.6.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-decode-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", - "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", "license": "MIT", "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" + "@types/unist": "^2" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", - "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "license": "MIT" }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-html-tag-name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", - "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" + "node_modules/docusaurus-theme-openapi-docs/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-normalize-identifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", - "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-from-parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", "license": "MIT", "dependencies": { - "micromark-util-symbol": "^1.0.0" + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-resolve-all": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", - "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", "license": "MIT", "dependencies": { - "micromark-util-types": "^1.0.0" + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-sanitize-uri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", - "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", "license": "MIT", "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-subtokenize": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", - "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], + "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", "license": "MIT", "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", - "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" + "node_modules/docusaurus-theme-openapi-docs/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/docusaurus-theme-openapi-docs/node_modules/parse5": { "version": "6.0.1", @@ -9903,22 +10454,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/docusaurus-theme-openapi-docs/node_modules/remark-gfm": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz", - "integrity": "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-gfm": "^2.0.0", - "micromark-extension-gfm": "^2.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/docusaurus-theme-openapi-docs/node_modules/unified": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", @@ -10073,6 +10608,18 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, + "node_modules/domain-browser": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.23.0.tgz", + "integrity": "sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==", + "license": "Artistic-2.0", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -10193,11 +10740,32 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.244", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz", - "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==", + "version": "1.5.150", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.150.tgz", + "integrity": "sha512-rOOkP2ZUMx1yL4fCxXQKDHQ8ZXwisb2OycOQVKHgvB3ZI4CvehOd4y2tfnnLDieJ3Zs1RL1Dlp3cMkyIn7nnXA==", "license": "ISC" }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -10238,6 +10806,19 @@ "node": ">= 0.8" } }, + "node_modules/encoding-sniffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", + "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -10592,7 +11173,16 @@ "require-like": ">= 0.1.1" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" } }, "node_modules/eventemitter3": { @@ -10610,13 +11200,14 @@ "node": ">=0.8.x" } }, - "node_modules/eventsource-parser": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", - "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "license": "MIT", - "engines": { - "node": ">=18.0.0" + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "node_modules/execa": { @@ -10966,6 +11557,15 @@ "node": ">=0.10.0" } }, + "node_modules/filesize": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz", + "integrity": "sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -10978,6 +11578,15 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", @@ -11072,6 +11681,21 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", @@ -11106,6 +11730,156 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", + "integrity": "sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@types/json-schema": "^7.0.5", + "chalk": "^4.1.0", + "chokidar": "^3.4.2", + "cosmiconfig": "^6.0.0", + "deepmerge": "^4.2.2", + "fs-extra": "^9.0.0", + "glob": "^7.1.6", + "memfs": "^3.1.2", + "minimatch": "^3.0.4", + "schema-utils": "2.7.0", + "semver": "^7.3.2", + "tapable": "^1.0.0" + }, + "engines": { + "node": ">=10", + "yarn": ">=1.0.0" + }, + "peerDependencies": { + "eslint": ">= 6", + "typescript": ">= 2.7", + "vue-template-compiler": "*", + "webpack": ">= 4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + }, + "vue-template-compiler": { + "optional": true + } + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -11174,6 +11948,12 @@ "node": ">=14.14" } }, + "node_modules/fs-monkey": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", + "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", + "license": "Unlicense" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -11321,22 +12101,6 @@ "node": ">= 6" } }, - "node_modules/glob-to-regex.js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/glob-to-regex.js/-/glob-to-regex.js-1.2.0.tgz", - "integrity": "sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -11344,9 +12108,9 @@ "license": "BSD-2-Clause" }, "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -11389,6 +12153,44 @@ "node": ">=10" } }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "license": "MIT", + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "license": "MIT", + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -11573,6 +12375,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-yarn": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", @@ -11585,6 +12402,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hash-base": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -11792,6 +12632,17 @@ "value-equal": "^1.0.1" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -11843,6 +12694,22 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -11964,9 +12831,9 @@ } }, "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { @@ -11978,8 +12845,8 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "domutils": "^3.1.0", + "entities": "^4.5.0" } }, "node_modules/http-cache-semantics": { @@ -12091,6 +12958,12 @@ "node": ">=10.19.0" } }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "license": "MIT" + }, "node_modules/https-proxy-agent": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", @@ -12113,15 +12986,6 @@ "node": ">=10.17.0" } }, - "node_modules/hyperdyperid": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", - "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", - "license": "MIT", - "engines": { - "node": ">=10.18" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -12176,10 +13040,13 @@ } }, "node_modules/image-size": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-2.0.2.tgz", - "integrity": "sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz", + "integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==", "license": "MIT", + "dependencies": { + "queue": "6.0.2" + }, "bin": { "image-size": "bin/image-size.js" }, @@ -12251,6 +13118,7 @@ "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.45.tgz", "integrity": "sha512-uyH0zfr1erU1OohLk0fT4Rrb94AOhguWNOcD9uGrSpRvNB+6gZXUoJX5J0NtvzBO10YZ9PgvA4NFgt+fYg8ojw==", "license": "MIT", + "peer": true, "engines": { "node": ">=12" } @@ -12335,6 +13203,22 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -12376,6 +13260,18 @@ "node": ">=4" } }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", @@ -12455,6 +13351,24 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -12477,39 +13391,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-inside-container/node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -12526,16 +13407,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-network-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.0.tgz", - "integrity": "sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==", + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, "engines": { - "node": ">=16" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-npm": { @@ -12568,6 +13453,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -12601,6 +13495,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -12610,6 +13522,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-root": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", + "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -12622,6 +13543,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -12799,15 +13735,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "license": "MIT" }, - "node_modules/json-crawl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/json-crawl/-/json-crawl-0.5.3.tgz", - "integrity": "sha512-BEjjCw8c7SxzNK4orhlWD5cXQh8vCk2LqDr4WgQq4CV+5dvopeYwt1Tskg67SuSLKvoFH5g0yuYtg7rcfKV6YA==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -12823,12 +13750,6 @@ "foreach": "^2.0.4" } }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, "node_modules/json-schema-compare": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", @@ -13106,18 +14027,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/marked": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.1.tgz", - "integrity": "sha512-ntROs7RaN3EvWfy3EZi14H4YxmT6A5YvywfhO+0pm+cH/dnSQRmdAmoFIc3B9aiwTehyk7pESH4ofyBY+V5hZg==", - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 20" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -13127,6 +14036,17 @@ "node": ">= 0.4" } }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "node_modules/mdast-util-definitions": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", @@ -13623,21 +14543,15 @@ "license": "MIT" }, "node_modules/memfs": { - "version": "4.50.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.50.0.tgz", - "integrity": "sha512-N0LUYQMUA1yS5tJKmMtU9yprPm6ZIg24yr/OVv/7t6q0kKDIho4cBbXRi1XKttUmNYDYgF/q45qrKE/UhGO0CA==", - "license": "Apache-2.0", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", + "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "license": "Unlicense", "dependencies": { - "@jsonjoy.com/json-pack": "^1.11.0", - "@jsonjoy.com/util": "^1.9.0", - "glob-to-regex.js": "^1.0.1", - "thingies": "^2.5.0", - "tree-dump": "^1.0.3", - "tslib": "^2.0.0" + "fs-monkey": "^1.0.4" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "engines": { + "node": ">= 4.0.0" } }, "node_modules/merge-descriptors": { @@ -15470,6 +16384,25 @@ "node": ">=8.6" } }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -15559,6 +16492,12 @@ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "license": "ISC" }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" + }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -15785,6 +16724,45 @@ "node": ">= 6.13.0" } }, + "node_modules/node-polyfill-webpack-plugin": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz", + "integrity": "sha512-ZUMiCnZkP1LF0Th2caY6J/eKKoA0TefpoVa68m/LQU1I/mE8rGt4fNYGgNuCcK+aG8P8P43nbeJ2RqJMOL/Y1A==", + "license": "MIT", + "dependencies": { + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.12.0", + "domain-browser": "^4.22.0", + "events": "^3.3.0", + "filter-obj": "^2.0.2", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^2.1.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^4.0.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "^0.0.1", + "type-fest": "^2.14.0", + "url": "^0.11.0", + "util": "^0.12.4", + "vm-browserify": "^1.1.2" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "webpack": ">=5" + } + }, "node_modules/node-readfiles": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", @@ -15795,9 +16773,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "license": "MIT" }, "node_modules/normalize-path": { @@ -16049,6 +17027,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -16097,9 +17091,9 @@ } }, "node_modules/on-headers": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", - "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -16192,6 +17186,12 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "license": "MIT" + }, "node_modules/p-cancelable": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", @@ -16201,15 +17201,6 @@ "node": ">=12.20" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", @@ -16255,49 +17246,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-queue": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", - "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.4", - "p-timeout": "^3.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-retry": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", - "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", "license": "MIT", "dependencies": { - "@types/retry": "0.12.2", - "is-network-error": "^1.0.0", + "@types/retry": "0.12.0", "retry": "^0.13.1" }, "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "license": "MIT", - "dependencies": { - "p-finally": "^1.0.0" - }, "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/package-json": { @@ -16325,9 +17293,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "license": "(MIT AND Zlib)" }, "node_modules/param-case": { @@ -16352,6 +17320,23 @@ "node": ">=6" } }, + "node_modules/parse-asn1": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", + "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", + "license": "ISC", + "dependencies": { + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -16426,6 +17411,18 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/parse5/node_modules/entities": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", @@ -16585,6 +17582,22 @@ "inherits": "2.0.3" } }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -16637,6 +17650,79 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "license": "MIT", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-up/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -16646,10 +17732,19 @@ "node": ">=4" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "funding": [ { "type": "opencollective", @@ -16666,7 +17761,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -16744,9 +17839,9 @@ } }, "node_modules/postcss-color-functional-notation": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-7.0.12.tgz", - "integrity": "sha512-TLCW9fN5kvO/u38/uesdpbx3e8AkTYhMvDZYa9JpmImWuTE99bDQ7GU7hdOADIZsiI9/zuxfAJxny/khknp1Zw==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-7.0.9.tgz", + "integrity": "sha512-WScwD3pSsIz+QP97sPkGCeJm7xUH0J18k6zV5o8O2a4cQJyv15vLUx/WFQajuJVgZhmJL5awDu8zHnqzAzm4lw==", "funding": [ { "type": "github", @@ -16759,10 +17854,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -16859,9 +17954,9 @@ } }, "node_modules/postcss-custom-media": { - "version": "11.0.6", - "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-11.0.6.tgz", - "integrity": "sha512-C4lD4b7mUIw+RZhtY7qUbf4eADmb7Ey8BFA2px9jUbwg7pjTZDl4KY4bvlUV+/vXQvzQRfiGEVJyAbtOsCMInw==", + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-11.0.5.tgz", + "integrity": "sha512-SQHhayVNgDvSAdX9NQ/ygcDQGEY+aSF4b/96z7QUX6mqL5yl/JgG/DywcF6fW9XbnCRE+aVYk+9/nqGuzOPWeQ==", "funding": [ { "type": "github", @@ -16874,10 +17969,10 @@ ], "license": "MIT", "dependencies": { - "@csstools/cascade-layer-name-parser": "^2.0.5", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/media-query-list-parser": "^4.0.3" + "@csstools/cascade-layer-name-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/media-query-list-parser": "^4.0.2" }, "engines": { "node": ">=18" @@ -16887,9 +17982,9 @@ } }, "node_modules/postcss-custom-properties": { - "version": "14.0.6", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-14.0.6.tgz", - "integrity": "sha512-fTYSp3xuk4BUeVhxCSJdIPhDLpJfNakZKoiTDx7yRGCdlZrSJR7mWKVOBS4sBF+5poPQFMj2YdXx1VHItBGihQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-14.0.4.tgz", + "integrity": "sha512-QnW8FCCK6q+4ierwjnmXF9Y9KF8q0JkbgVfvQEMa93x1GT8FvOiUevWCN2YLaOWyByeDX8S6VFbZEeWoAoXs2A==", "funding": [ { "type": "github", @@ -16902,9 +17997,9 @@ ], "license": "MIT", "dependencies": { - "@csstools/cascade-layer-name-parser": "^2.0.5", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", + "@csstools/cascade-layer-name-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", "@csstools/utilities": "^2.0.0", "postcss-value-parser": "^4.2.0" }, @@ -16916,9 +18011,9 @@ } }, "node_modules/postcss-custom-selectors": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-8.0.5.tgz", - "integrity": "sha512-9PGmckHQswiB2usSO6XMSswO2yFWVoCAuih1yl9FVcwkscLjRKjwsjM3t+NIWpSU2Jx3eOiK2+t4vVTQaoCHHg==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-8.0.4.tgz", + "integrity": "sha512-ASOXqNvDCE0dAJ/5qixxPeL1aOVGHGW2JwSy7HyjWNbnWTQCl+fDc968HY1jCmZI0+BaYT5CxsOiUhavpG/7eg==", "funding": [ { "type": "github", @@ -16931,9 +18026,9 @@ ], "license": "MIT", "dependencies": { - "@csstools/cascade-layer-name-parser": "^2.0.5", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", + "@csstools/cascade-layer-name-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", "postcss-selector-parser": "^7.0.0" }, "engines": { @@ -17058,9 +18153,9 @@ } }, "node_modules/postcss-double-position-gradients": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-6.0.4.tgz", - "integrity": "sha512-m6IKmxo7FxSP5nF2l63QbCC3r+bWpFUWmZXZf096WxG0m7Vl1Q1+ruFOhpdDRmKrRS+S3Jtk+TVk/7z0+BVK6g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-6.0.1.tgz", + "integrity": "sha512-ZitCwmvOR4JzXmKw6sZblTgwV1dcfLvClcyjADuqZ5hU0Uk4SVNpvSN9w8NcJ7XuxhRYxVA8m8AB3gy+HNBQOA==", "funding": [ { "type": "github", @@ -17073,7 +18168,7 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0", "postcss-value-parser": "^4.2.0" }, @@ -17256,9 +18351,9 @@ } }, "node_modules/postcss-lab-function": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-7.0.12.tgz", - "integrity": "sha512-tUcyRk1ZTPec3OuKFsqtRzW2Go5lehW29XA21lZ65XmzQkz43VY2tyWEC202F7W3mILOjw0voOiuxRGTsN+J9w==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-7.0.9.tgz", + "integrity": "sha512-IGbsIXbqMDusymJAKYX+f9oakPo89wL9Pzd/qRBQOVf3EIQWT9hgvqC4Me6Dkzxp3KPuIBf6LPkjrLHe/6ZMIQ==", "funding": [ { "type": "github", @@ -17271,10 +18366,10 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", "@csstools/utilities": "^2.0.0" }, "engines": { @@ -17606,9 +18701,9 @@ } }, "node_modules/postcss-nesting": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-13.0.2.tgz", - "integrity": "sha512-1YCI290TX+VP0U/K/aFxzHzQWHWURL+CtHMSbex1lCdpXD1SoR2sYuxDu5aNI9lPoXpKTCggFZiDJbwylU0LEQ==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-13.0.1.tgz", + "integrity": "sha512-VbqqHkOBOt4Uu3G8Dm8n6lU5+9cJFxiuty9+4rcoyRPO9zZS1JIs6td49VIoix3qYqELHlJIn46Oih9SAKo+yQ==", "funding": [ { "type": "github", @@ -17621,7 +18716,7 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/selector-resolve-nested": "^3.1.0", + "@csstools/selector-resolve-nested": "^3.0.0", "@csstools/selector-specificity": "^5.0.0", "postcss-selector-parser": "^7.0.0" }, @@ -17633,9 +18728,9 @@ } }, "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.1.0.tgz", - "integrity": "sha512-mf1LEW0tJLKfWyvn5KdDrhpxHyuxpbNwTIwOYLIvsTffeyOf85j5oIzfG0yosxDgx/sswlqBnESYUcQH0vgZ0g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.0.0.tgz", + "integrity": "sha512-ZoK24Yku6VJU1gS79a5PFmC8yn3wIapiKmPgun0hZgEI5AOqgH2kiPRsPz1qkGv4HL+wuDLH83yQyk6inMYrJQ==", "funding": [ { "type": "github", @@ -17920,9 +19015,9 @@ } }, "node_modules/postcss-preset-env": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-10.4.0.tgz", - "integrity": "sha512-2kqpOthQ6JhxqQq1FSAAZGe9COQv75Aw8WbsOvQVNJ2nSevc9Yx/IKZGuZ7XJ+iOTtVon7LfO7ELRzg8AZ+sdw==", + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-10.1.6.tgz", + "integrity": "sha512-1jRD7vttKLJ7o0mcmmYWKRLm7W14rI8K1I7Y41OeXUPEVc/CAzfTssNUeJ0zKbR+zMk4boqct/gwS/poIFF5Lg==", "funding": [ { "type": "github", @@ -17935,66 +19030,62 @@ ], "license": "MIT-0", "dependencies": { - "@csstools/postcss-alpha-function": "^1.0.1", - "@csstools/postcss-cascade-layers": "^5.0.2", - "@csstools/postcss-color-function": "^4.0.12", - "@csstools/postcss-color-function-display-p3-linear": "^1.0.1", - "@csstools/postcss-color-mix-function": "^3.0.12", - "@csstools/postcss-color-mix-variadic-function-arguments": "^1.0.2", - "@csstools/postcss-content-alt-text": "^2.0.8", - "@csstools/postcss-contrast-color-function": "^2.0.12", - "@csstools/postcss-exponential-functions": "^2.0.9", + "@csstools/postcss-cascade-layers": "^5.0.1", + "@csstools/postcss-color-function": "^4.0.9", + "@csstools/postcss-color-mix-function": "^3.0.9", + "@csstools/postcss-content-alt-text": "^2.0.5", + "@csstools/postcss-exponential-functions": "^2.0.8", "@csstools/postcss-font-format-keywords": "^4.0.0", - "@csstools/postcss-gamut-mapping": "^2.0.11", - "@csstools/postcss-gradients-interpolation-method": "^5.0.12", - "@csstools/postcss-hwb-function": "^4.0.12", - "@csstools/postcss-ic-unit": "^4.0.4", + "@csstools/postcss-gamut-mapping": "^2.0.9", + "@csstools/postcss-gradients-interpolation-method": "^5.0.9", + "@csstools/postcss-hwb-function": "^4.0.9", + "@csstools/postcss-ic-unit": "^4.0.1", "@csstools/postcss-initial": "^2.0.1", - "@csstools/postcss-is-pseudo-class": "^5.0.3", - "@csstools/postcss-light-dark-function": "^2.0.11", + "@csstools/postcss-is-pseudo-class": "^5.0.1", + "@csstools/postcss-light-dark-function": "^2.0.8", "@csstools/postcss-logical-float-and-clear": "^3.0.0", "@csstools/postcss-logical-overflow": "^2.0.0", "@csstools/postcss-logical-overscroll-behavior": "^2.0.0", "@csstools/postcss-logical-resize": "^3.0.0", - "@csstools/postcss-logical-viewport-units": "^3.0.4", - "@csstools/postcss-media-minmax": "^2.0.9", - "@csstools/postcss-media-queries-aspect-ratio-number-values": "^3.0.5", + "@csstools/postcss-logical-viewport-units": "^3.0.3", + "@csstools/postcss-media-minmax": "^2.0.8", + "@csstools/postcss-media-queries-aspect-ratio-number-values": "^3.0.4", "@csstools/postcss-nested-calc": "^4.0.0", "@csstools/postcss-normalize-display-values": "^4.0.0", - "@csstools/postcss-oklab-function": "^4.0.12", - "@csstools/postcss-progressive-custom-properties": "^4.2.1", - "@csstools/postcss-random-function": "^2.0.1", - "@csstools/postcss-relative-color-syntax": "^3.0.12", + "@csstools/postcss-oklab-function": "^4.0.9", + "@csstools/postcss-progressive-custom-properties": "^4.0.1", + "@csstools/postcss-random-function": "^2.0.0", + "@csstools/postcss-relative-color-syntax": "^3.0.9", "@csstools/postcss-scope-pseudo-class": "^4.0.1", - "@csstools/postcss-sign-functions": "^1.1.4", - "@csstools/postcss-stepped-value-functions": "^4.0.9", - "@csstools/postcss-text-decoration-shorthand": "^4.0.3", - "@csstools/postcss-trigonometric-functions": "^4.0.9", + "@csstools/postcss-sign-functions": "^1.1.3", + "@csstools/postcss-stepped-value-functions": "^4.0.8", + "@csstools/postcss-text-decoration-shorthand": "^4.0.2", + "@csstools/postcss-trigonometric-functions": "^4.0.8", "@csstools/postcss-unset-value": "^4.0.0", "autoprefixer": "^10.4.21", - "browserslist": "^4.26.0", + "browserslist": "^4.24.4", "css-blank-pseudo": "^7.0.1", - "css-has-pseudo": "^7.0.3", + "css-has-pseudo": "^7.0.2", "css-prefers-color-scheme": "^10.0.0", - "cssdb": "^8.4.2", + "cssdb": "^8.2.5", "postcss-attribute-case-insensitive": "^7.0.1", "postcss-clamp": "^4.1.0", - "postcss-color-functional-notation": "^7.0.12", + "postcss-color-functional-notation": "^7.0.9", "postcss-color-hex-alpha": "^10.0.0", "postcss-color-rebeccapurple": "^10.0.0", - "postcss-custom-media": "^11.0.6", - "postcss-custom-properties": "^14.0.6", - "postcss-custom-selectors": "^8.0.5", + "postcss-custom-media": "^11.0.5", + "postcss-custom-properties": "^14.0.4", + "postcss-custom-selectors": "^8.0.4", "postcss-dir-pseudo-class": "^9.0.1", - "postcss-double-position-gradients": "^6.0.4", + "postcss-double-position-gradients": "^6.0.1", "postcss-focus-visible": "^10.0.1", "postcss-focus-within": "^9.0.1", "postcss-font-variant": "^5.0.0", "postcss-gap-properties": "^6.0.0", "postcss-image-set-function": "^7.0.0", - "postcss-lab-function": "^7.0.12", + "postcss-lab-function": "^7.0.9", "postcss-logical": "^8.1.0", - "postcss-nesting": "^13.0.2", + "postcss-nesting": "^13.0.1", "postcss-opacity-percentage": "^3.0.0", "postcss-overflow-shorthand": "^6.0.0", "postcss-page-break": "^3.0.4", @@ -18347,9 +19438,9 @@ } }, "node_modules/prebuild-install/node_modules/tar-fs": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", - "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", "license": "MIT", "dependencies": { "chownr": "^1.1.1", @@ -18488,10 +19579,30 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "license": "MIT", - "engines": { - "node": ">= 0.10" + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -18541,6 +19652,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "license": "MIT", + "dependencies": { + "inherits": "~2.0.3" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -18582,6 +19710,16 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", @@ -18663,6 +19801,132 @@ "node": ">=0.10.0" } }, + "node_modules/react-dev-utils": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", + "integrity": "sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.0", + "address": "^1.1.2", + "browserslist": "^4.18.1", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.3", + "detect-port-alt": "^1.1.6", + "escape-string-regexp": "^4.0.0", + "filesize": "^8.0.6", + "find-up": "^5.0.0", + "fork-ts-checker-webpack-plugin": "^6.5.0", + "global-modules": "^2.0.0", + "globby": "^11.0.4", + "gzip-size": "^6.0.0", + "immer": "^9.0.7", + "is-root": "^2.1.0", + "loader-utils": "^3.2.0", + "open": "^8.4.0", + "pkg-up": "^3.1.0", + "prompts": "^2.4.2", + "react-error-overlay": "^6.0.11", + "recursive-readdir": "^2.2.2", + "shell-quote": "^1.7.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/react-dev-utils/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/loader-utils": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.3.1.tgz", + "integrity": "sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/react-dev-utils/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", @@ -18676,6 +19940,12 @@ "react": "^18.3.1" } }, + "node_modules/react-error-overlay": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.1.0.tgz", + "integrity": "sha512-SN/U6Ytxf1QGkw/9ve5Y+NxBbZM6Ht95tuXNMKs8EJyFa/Vy/+Co3stop3KBHARfn/giv+Lj1uUnTfOJ3moFEQ==", + "license": "MIT" + }, "node_modules/react-fast-compare": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", @@ -18722,15 +19992,15 @@ "license": "MIT" }, "node_modules/react-json-view-lite": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-2.5.0.tgz", - "integrity": "sha512-tk7o7QG9oYyELWHL8xiMQ8x4WzjCzbWNyig3uexmkLb54r8jO0yH3WCWx8UZS0c49eSA4QUmG5caiRJ8fAn58g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-1.5.0.tgz", + "integrity": "sha512-nWqA1E4jKPklL2jvHWs6s+7Na0qNgw9HCP6xehdQJeg6nPBTFZgGwyko9Q0oj+jQWKTTVRS30u0toM5wiuL3iw==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=14" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0" + "react": "^16.13.1 || ^17.0.0 || ^18.0.0" } }, "node_modules/react-lifecycles-compat": { @@ -19563,6 +20833,27 @@ "react": ">=15" } }, + "node_modules/react-waypoint": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/react-waypoint/-/react-waypoint-10.3.0.tgz", + "integrity": "sha512-iF1y2c1BsoXuEGz08NoahaLFIGI9gTUAAOKip96HUmylRT6DUtpgoBPjk/Y8dfcFVmfVDvUzWjNXpZyKTOV0SQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "consolidated-events": "^1.1.0 || ^2.0.0", + "prop-types": "^15.0.0", + "react-is": "^17.0.1 || ^18.0.0" + }, + "peerDependencies": { + "react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-waypoint/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -19573,6 +20864,22 @@ "pify": "^2.3.0" } }, + "node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -19585,6 +20892,12 @@ "node": ">=8.10.0" } }, + "node_modules/reading-time": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", + "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==", + "license": "MIT" + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -19660,6 +20973,40 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "license": "MIT", + "dependencies": { + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/recursive-readdir/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/recursive-readdir/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/redux": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", @@ -20180,6 +21527,38 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rtl-detect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.1.2.tgz", + "integrity": "sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==", + "license": "BSD-3-Clause" + }, "node_modules/rtlcss": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-4.3.0.tgz", @@ -20198,18 +21577,6 @@ "node": ">=12.0.0" } }, - "node_modules/run-applescript": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", - "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -20265,6 +21632,23 @@ ], "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -20292,29 +21676,29 @@ } }, "node_modules/sass-loader": { - "version": "16.0.6", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.6.tgz", - "integrity": "sha512-sglGzId5gmlfxNs4gK2U3h7HlVRfx278YK6Ono5lwzuvi1jxig80YiuHkaDBVsYIKFhx8wN7XSCI0M2IDS/3qA==", + "version": "13.3.3", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.3.tgz", + "integrity": "sha512-mt5YN2F1MOZr3d/wBRcZxeFgwgkH44wVc2zohO2YF6JiOMkiXe4BYRZpSu2sO1g71mo/j16txzUhsKZlqjVGzA==", "license": "MIT", "dependencies": { "neo-async": "^2.6.2" }, "engines": { - "node": ">= 18.12.0" + "node": ">= 14.15.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "@rspack/core": "0.x || 1.x", + "fibers": ">= 3.1.0", "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", "sass": "^1.3.0", "sass-embedded": "*", "webpack": "^5.0.0" }, "peerDependenciesMeta": { - "@rspack/core": { + "fibers": { "optional": true }, "node-sass": { @@ -20325,9 +21709,6 @@ }, "sass-embedded": { "optional": true - }, - "webpack": { - "optional": true } } }, @@ -20374,12 +21755,6 @@ "loose-envify": "^1.1.0" } }, - "node_modules/schema-dts": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/schema-dts/-/schema-dts-1.1.5.tgz", - "integrity": "sha512-RJr9EaCmsLzBX2NDiO5Z3ux2BVosNZN5jo0gWgsyKvxKIUL5R3swNvoorulAeL9kLB0iTSX7V6aokhla2m7xbg==", - "license": "Apache-2.0" - }, "node_modules/schema-utils": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", @@ -20547,9 +21922,9 @@ } }, "node_modules/serve-handler/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -20699,12 +22074,31 @@ "node": ">= 0.4" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -21226,12 +22620,62 @@ "node": ">= 0.8" } }, - "node_modules/std-env": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", - "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", - "license": "MIT" - }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "license": "MIT" + }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "license": "MIT", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "license": "MIT", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/stream-http/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/streamx": { "version": "2.22.0", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz", @@ -21608,19 +23052,6 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/swr": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/swr/-/swr-2.3.6.tgz", - "integrity": "sha512-wfHRmHWk/isGNMwlLGlZX5Gzz/uTgo0o2IRuTMcf4CPuPFJZlq0rDaKUx+ozB5nBOReNV1kiOyzMfj+MBMikLw==", - "license": "MIT", - "dependencies": { - "dequal": "^2.0.3", - "use-sync-external-store": "^1.4.0" - }, - "peerDependencies": { - "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/tailwindcss": { "version": "3.4.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", @@ -21682,9 +23113,9 @@ } }, "node_modules/tar-fs": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", - "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz", + "integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==", "license": "MIT", "dependencies": { "pump": "^3.0.0", @@ -21802,6 +23233,12 @@ "b4a": "^1.6.4" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "license": "MIT" + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -21823,40 +23260,24 @@ "node": ">=0.8" } }, - "node_modules/thingies": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.5.0.tgz", - "integrity": "sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw==", - "license": "MIT", - "engines": { - "node": ">=10.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "^2" - } - }, - "node_modules/throttleit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-2.1.0.tgz", - "integrity": "sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "license": "MIT" }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "license": "MIT", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", @@ -21869,15 +23290,6 @@ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", "license": "MIT" }, - "node_modules/tinypool": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", - "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -21914,22 +23326,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "license": "MIT" }, - "node_modules/tree-dump": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.1.0.tgz", - "integrity": "sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA==", - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -21962,6 +23358,12 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "license": "MIT" + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -22012,7 +23414,6 @@ "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -22022,6 +23423,15 @@ "node": ">=14.17" } }, + "node_modules/undici": { + "version": "6.21.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", + "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", @@ -22221,9 +23631,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "funding": [ { "type": "opencollective", @@ -22443,13 +23853,17 @@ "react": ">= 16.8.0" } }, - "node_modules/use-sync-external-store": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", - "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" } }, "node_modules/util-deprecate": { @@ -22621,6 +24035,12 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "license": "MIT" + }, "node_modules/warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", @@ -22751,32 +24171,26 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.5.tgz", - "integrity": "sha512-uxQ6YqGdE4hgDKNf7hUiPXOdtkXvBJXrfEGYSx7P7LC8hnUYGK70X6xQXUvXeNyBDDcsiQXpG2m3G9vxowaEuA==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "license": "MIT", "dependencies": { "colorette": "^2.0.10", - "memfs": "^4.43.1", - "mime-types": "^3.0.1", - "on-finished": "^2.4.1", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", "range-parser": "^1.2.1", "schema-utils": "^4.0.0" }, "engines": { - "node": ">= 18.12.0" + "node": ">= 12.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - } + "webpack": "^4.0.0 || ^5.0.0" } }, "node_modules/webpack-dev-middleware/node_modules/colorette": { @@ -22785,34 +24199,99 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/webpack-dev-middleware/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "node_modules/webpack-dev-middleware/node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/webpack-dev-middleware/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "node_modules/webpack-dev-server": { + "version": "4.15.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz", + "integrity": "sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==", "license": "MIT", "dependencies": { - "mime-db": "^1.54.0" + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.5", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "launch-editor": "^2.6.0", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.4", + "ws": "^8.13.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" }, "engines": { - "node": ">= 0.6" + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.37.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } } }, - "node_modules/webpack-dev-middleware/node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "node_modules/webpack-dev-server/node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "license": "MIT" + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/webpack-merge": { @@ -22839,77 +24318,23 @@ } }, "node_modules/webpackbar": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-6.0.1.tgz", - "integrity": "sha512-TnErZpmuKdwWBdMoexjio3KKX6ZtoKHRVvLIU0A47R0VVBDtx3ZyOJDktgYixhoJokZTYTt1Z37OkO9pnGJa9Q==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz", + "integrity": "sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==", "license": "MIT", "dependencies": { - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "consola": "^3.2.3", - "figures": "^3.2.0", - "markdown-table": "^2.0.0", + "chalk": "^4.1.0", + "consola": "^2.15.3", "pretty-time": "^1.1.0", - "std-env": "^3.7.0", - "wrap-ansi": "^7.0.0" + "std-env": "^3.0.1" }, "engines": { - "node": ">=14.21.3" + "node": ">=12" }, "peerDependencies": { "webpack": "3 || 4 || 5" } }, - "node_modules/webpackbar/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/webpackbar/node_modules/markdown-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", - "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", - "license": "MIT", - "dependencies": { - "repeat-string": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/webpackbar/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpackbar/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -22933,6 +24358,27 @@ "node": ">=0.8.0" } }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -22958,6 +24404,27 @@ "node": ">= 8" } }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -23112,36 +24579,6 @@ } } }, - "node_modules/wsl-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", - "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", - "license": "MIT", - "dependencies": { - "is-wsl": "^3.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wsl-utils/node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -23187,6 +24624,15 @@ "node": ">= 10" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -23276,15 +24722,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zod": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", - "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/zwitch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", diff --git a/docs/package.json b/docs/package.json index efc2de4bf3..58d713fb80 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,18 +19,17 @@ }, "dependencies": { "@cloudflare/stream-react": "1.9.1", - "@docsearch/react": "^4.2.0", - "@docusaurus/core": "^3.9.2", - "@docusaurus/plugin-client-redirects": "^3.9.2", - "@docusaurus/plugin-content-docs": "^3.9.2", - "@docusaurus/plugin-ideal-image": "^3.9.2", - "@docusaurus/preset-classic": "^3.9.2", - "@docusaurus/theme-search-algolia": "^3.9.2", + "@docusaurus/core": "3.4.0", + "@docusaurus/plugin-client-redirects": "^3.4.0", + "@docusaurus/plugin-content-docs": "^3.5.2", + "@docusaurus/plugin-ideal-image": "^3.4.0", + "@docusaurus/preset-classic": "3.4.0", + "@docusaurus/theme-search-algolia": "^3.5.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "docusaurus-plugin-image-zoom": "^2.0.0", - "docusaurus-plugin-openapi-docs": "^4.5.1", - "docusaurus-theme-openapi-docs": "^4.5.1", + "docusaurus-plugin-openapi-docs": "3.0.1", + "docusaurus-theme-openapi-docs": "3.0.1", "dotenv": "^16.4.5", "posthog-docusaurus": "^2.0.1", "prism-react-renderer": "^2.3.0", @@ -38,9 +37,9 @@ "react-dom": "^18.0.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.9.2", - "@docusaurus/tsconfig": "^3.9.2", - "@docusaurus/types": "^3.9.2", + "@docusaurus/module-type-aliases": "^3.5.2", + "@docusaurus/tsconfig": "^3.5.2", + "@docusaurus/types": "^3.5.2", "tailwindcss": "^3.4.10", "typescript": "^5.5.4" }, diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 229a6d9e31..8d345d8e31 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -19,45 +19,40 @@ const sidebars: SidebarsConfig = { label: "Prompt Engineering", ...CATEGORY_UTILITIES, items: [{ type: "autogenerated", dirName: "prompt-engineering" }, - { - type: "category", - collapsed: true, - collapsible: true, - label: "Tutorials", - items: ["tutorials/sdk/manage-prompts-with-SDK"] - }], + {type: "category", + collapsed: true, + collapsible: true, + label: "Tutorials", + items: [ "tutorials/sdk/manage-prompts-with-SDK"]}], }, { label: "Evaluation", ...CATEGORY_UTILITIES, items: [{ type: "autogenerated", dirName: "evaluation" }, - { - type: "category", - collapsed: true, - collapsible: true, - label: "Tutorials", - items: ["tutorials/cookbooks/capture-user-feedback"] - }], + {type: "category", + collapsed: false, + collapsible: true, + label: "Tutorials", + items: [ "tutorials/cookbooks/capture-user-feedback", + "tutorials/sdk/evaluate-with-SDK"]}], }, { label: "Observability", ...CATEGORY_UTILITIES, items: [{ type: "autogenerated", dirName: "observability" }, - { - type: "category", - collapsed: true, - collapsible: true, - label: "Tutorials", - items: ["tutorials/cookbooks/capture-user-feedback", - "tutorials/cookbooks/observability_langchain"] - }], + {type: "category", + collapsed: true, + collapsible: true, + label: "Tutorials", + items: [ "tutorials/cookbooks/capture-user-feedback", + "tutorials/cookbooks/observability_langchain"]}], }, { label: "Custom Workflows", ...CATEGORY_UTILITIES, items: [{ type: "autogenerated", dirName: "custom-workflows" } - ], + ], }, { label: "Concepts", @@ -69,6 +64,11 @@ const sidebars: SidebarsConfig = { ...CATEGORY_UTILITIES, items: [{ type: "autogenerated", dirName: "misc" }], }, + { + label: "Self-host", + ...CATEGORY_UTILITIES, + items: [{ type: "autogenerated", dirName: "self-host" }], + }, ], guidesSidebar: [ @@ -107,13 +107,6 @@ const sidebars: SidebarsConfig = { items: require("./docs/reference/api/sidebar.js"), }, ], - selfHostSidebar: [ - { - label: "Self-host", - ...CATEGORY_UTILITIES, - items: [{ type: "autogenerated", dirName: "self-host" }], - }, - ], }; export default sidebars; diff --git a/docs/src/components/CARD_ICON_USAGE.md b/docs/src/components/CARD_ICON_USAGE.md deleted file mode 100644 index fa42c216e0..0000000000 --- a/docs/src/components/CARD_ICON_USAGE.md +++ /dev/null @@ -1,156 +0,0 @@ -# Custom Card Icon Usage Guide - -This guide explains how to use custom icons with DocCard components in the documentation. - -## Quick Start - -Import the CustomDocCard component in your MDX files: - -```mdx -import CustomDocCard from '@site/src/components/CustomDocCard'; -``` - -## Usage Examples - -### 1. Default Card (Standard Arrow Icon) -```mdx -import DocCard from '@theme/DocCard'; - -<DocCard item={{ - type: 'link', - href: '/docs/getting-started', - label: 'Getting Started', - description: 'Learn the basics' -}} /> -``` - -### 2. Card with Emoji Icon -```mdx -import CustomDocCard from '@site/src/components/CustomDocCard'; - -<CustomDocCard - item={{ - type: 'link', - href: '/docs/getting-started', - label: 'Getting Started', - description: 'Learn the basics' - }} - icon="🚀" -/> -``` - -### 3. Card with Image/SVG Icon -```mdx -import CustomDocCard from '@site/src/components/CustomDocCard'; - -<CustomDocCard - item={{ - type: 'link', - href: '/docs/api', - label: 'API Reference', - description: 'Explore our API' - }} - imagePath="/img/icons/api.svg" -/> -``` - -### 4. Card Without Icon -```mdx -import CustomDocCard from '@site/src/components/CustomDocCard'; - -<CustomDocCard - item={{ - type: 'link', - href: '/docs/faq', - label: 'FAQ', - description: 'Frequently asked questions' - }} - noIcon={true} -/> -``` - -## Using with DocCardList - -For auto-generated card lists, you'll need to use a custom wrapper: - -```mdx -import { useCurrentSidebarCategory } from '@docusaurus/theme-common'; -import CustomDocCard from '@site/src/components/CustomDocCard'; - -export function CustomCardList({ icons = {} }) { - const category = useCurrentSidebarCategory(); - - return ( - <div className="row"> - {category.items.map((item, index) => ( - <article key={index} className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={item} - icon={icons[item.docId]} - /> - </article> - ))} - </div> - ); -} - -<CustomCardList icons={{ - 'getting-started': '🚀', - 'api-reference': '📚', - 'tutorials': '🎓' -}} /> -``` - -## Direct HTML Approach (Alternative) - -If you prefer not to use the component, you can add custom classes directly to regular DocCard: - -### Using data attribute for emoji: -```mdx -<div data-card-icon="🎯"> - <DocCard item={{...}} /> -</div> -``` - -### Using className for no icon: -```mdx -<div className="no-icon"> - <DocCard item={{...}} /> -</div> -``` - -## Supported Icon Types - -| Type | Method | Example | -|------|--------|---------| -| Emoji | `icon` prop | `icon="🚀"` | -| Unicode | `icon` prop | `icon="★"` | -| SVG File | `imagePath` prop | `imagePath="/img/icon.svg"` | -| PNG/JPG | `imagePath` prop | `imagePath="/img/icon.png"` | -| None | `noIcon` prop | `noIcon={true}` | - -## Icon Best Practices - -1. **Emoji Size**: Emojis are automatically sized at 24px -2. **Image Icons**: Should be square (24x24px recommended) for best results -3. **SVG Icons**: Preferred for crisp rendering at any resolution -4. **Consistency**: Use similar icon styles across related cards -5. **Accessibility**: Icons are decorative - ensure card titles are descriptive - -## CSS Classes Reference - -- `.custom-icon` - Applied when using emoji/text icons -- `.icon-img` - Applied when using image/SVG icons -- `.no-icon` - Applied when hiding the default icon -- `[data-card-icon]` - Attribute used to pass emoji/text content - -## Troubleshooting - -**Icons not showing?** -- Clear browser cache (Ctrl+Shift+R / Cmd+Shift+R) -- Verify image paths are correct (relative to /static folder) -- Check that CSS custom.css has been updated - -**Default arrow still showing?** -- Ensure you're using `CustomDocCard` component or proper class names -- Verify the `noIcon` prop is set to `true` diff --git a/docs/src/components/CustomCardExample.mdx b/docs/src/components/CustomCardExample.mdx deleted file mode 100644 index fc696bb2e7..0000000000 --- a/docs/src/components/CustomCardExample.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Custom Card Icons Example -description: Example page showing different card icon options ---- - -import CustomDocCard from '@site/src/components/CustomDocCard'; -import DocCard from '@theme/DocCard'; - -# Custom Card Icons Example - -This page demonstrates the different ways to use custom icons with DocCard components. - -## Default Card (Standard Arrow) - -<DocCard item={{ - type: 'link', - href: '/docs/', - label: 'Documentation Home', - description: 'Standard card with default arrow icon' -}} /> - -## Card with Emoji Icon - -<CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'Getting Started', - description: 'Card with a rocket emoji icon' - }} - icon="🚀" -/> - -## Card with Different Emoji - -<div className="row"> - <div className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'API Reference', - description: 'Explore our API endpoints' - }} - icon="📚" - /> - </div> - <div className="col col--6 margin-bottom--lg"> - <CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'Tutorials', - description: 'Step-by-step guides' - }} - icon="🎓" - /> - </div> -</div> - -## Card Without Icon - -<CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'FAQ', - description: 'Frequently asked questions - no icon needed' - }} - noIcon={true} -/> - -## More Examples - -<div className="row"> - <div className="col col--4 margin-bottom--lg"> - <CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'Quick Start', - description: 'Get up and running fast' - }} - icon="⚡" - /> - </div> - <div className="col col--4 margin-bottom--lg"> - <CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'Configuration', - description: 'Configure your setup' - }} - icon="⚙️" - /> - </div> - <div className="col col--4 margin-bottom--lg"> - <CustomDocCard - item={{ - type: 'link', - href: '/docs/', - label: 'Best Practices', - description: 'Learn the best approaches' - }} - icon="✨" - /> - </div> -</div> diff --git a/docs/src/components/CustomDocCard.tsx b/docs/src/components/CustomDocCard.tsx deleted file mode 100644 index a03abbf428..0000000000 --- a/docs/src/components/CustomDocCard.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import DocCard from '@theme/DocCard'; -import type { PropSidebarItem } from '@docusaurus/plugin-content-docs'; - -interface CustomDocCardProps { - item: PropSidebarItem; - icon?: string; // Emoji or text icon - imagePath?: string; // Path to SVG/image icon - noIcon?: boolean; // Set to true to hide the default icon -} - -/** - * CustomDocCard - A wrapper around Docusaurus DocCard with custom icon support - * - * Usage examples: - * - * 1. With emoji icon: - * <CustomDocCard item={item} icon="🚀" /> - * - * 2. With image/SVG icon: - * <CustomDocCard item={item} imagePath="/img/icons/rocket.svg" /> - * - * 3. Without icon: - * <CustomDocCard item={item} noIcon={true} /> - * - * 4. Default (standard arrow): - * <CustomDocCard item={item} /> - */ -export default function CustomDocCard({ - item, - icon, - imagePath, - noIcon -}: CustomDocCardProps) { - const getClassName = () => { - if (noIcon) return 'no-icon'; - if (imagePath) return 'icon-img'; - if (icon) return 'custom-icon'; - return ''; - }; - - const getStyle = () => { - if (imagePath) { - return { - '--card-icon-image': `url(${imagePath})`, - } as React.CSSProperties; - } - return {}; - }; - - // For image icons, we need to apply the background via inline style - const cardProps: any = { - item, - }; - - return ( - <div - className={getClassName()} - style={{ - ...(icon && { '--card-icon': `"${icon}"` }), - ...(imagePath && { '--card-icon-bg': `url(${imagePath})` }) - } as React.CSSProperties} - > - <DocCard {...cardProps} /> - </div> - ); -} diff --git a/docs/src/components/GitHubExampleButton.module.css b/docs/src/components/GitHubExampleButton.module.css deleted file mode 100644 index 8ffab5fa25..0000000000 --- a/docs/src/components/GitHubExampleButton.module.css +++ /dev/null @@ -1,72 +0,0 @@ -.githubButton { - display: table !important; - width: 100% !important; - height: 48px !important; - background-color: var(--ifm-background-surface-color) !important; - color: var(--ifm-color-content) !important; - text-decoration: none !important; - border-radius: 8px !important; - border: 1px solid var(--ifm-color-emphasis-300) !important; - font-weight: 500 !important; - font-size: 16px !important; - cursor: pointer !important; - transition: all 0.2s ease !important; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important; - box-sizing: border-box !important; - position: relative !important; -} - -.githubButton:hover { - border-color: var(--ifm-color-primary) !important; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; - transform: translateY(-1px) !important; - text-decoration: none !important; -} - -.githubButton:visited { - color: var(--ifm-color-content) !important; - text-decoration: none !important; -} - -.githubButton:active { - text-decoration: none !important; -} - -.logo { - position: absolute !important; - left: 16px !important; - top: 50% !important; - transform: translateY(-50%) !important; - width: 24px !important; - height: 24px !important; - display: block !important; -} - -.text { - display: block !important; - text-align: center !important; - text-decoration: none !important; - line-height: 48px !important; - margin: 0 !important; - padding: 0 !important; - white-space: nowrap !important; - font-family: inherit !important; - font-size: 16px !important; - font-weight: 500 !important; - color: inherit !important; - width: 100% !important; - height: 48px !important; - position: absolute !important; - top: 0 !important; - left: 0 !important; -} - -.arrow { - position: absolute !important; - right: 16px !important; - top: 50% !important; - transform: translateY(-50%) !important; - width: 16px !important; - height: 16px !important; - display: block !important; -} \ No newline at end of file diff --git a/docs/src/components/GitHubExampleButton.tsx b/docs/src/components/GitHubExampleButton.tsx deleted file mode 100644 index 11e70ca8f0..0000000000 --- a/docs/src/components/GitHubExampleButton.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import styles from './GitHubExampleButton.module.css'; - -interface GitHubExampleButtonProps { - examplePath: string; - children?: React.ReactNode; -} - -const GitHubExampleButton: React.FC<GitHubExampleButtonProps> = ({ examplePath, children }) => { - const baseUrl = 'https://github.com/Agenta-AI/agenta/tree/main'; - const githubUrl = `${baseUrl}/${examplePath}`; - - return ( - <div className="margin-bottom--lg"> - <a - href={githubUrl} - target="_blank" - rel="noopener noreferrer" - className={styles.githubButton} - > - {/* GitHub Logo */} - <svg - viewBox="0 0 24 24" - fill="currentColor" - className={styles.logo} - > - <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /> - </svg> - - {/* Text - centered in the remaining space */} - <span className={styles.text}> - {children || 'View Example on GitHub'} - </span> - - {/* Arrow */} - <svg - viewBox="0 0 24 24" - fill="none" - stroke="currentColor" - strokeWidth="2" - className={styles.arrow} - > - <polyline points="9,18 15,12 9,6"></polyline> - </svg> - </a> - </div> - ); -}; - -export default GitHubExampleButton; - diff --git a/docs/src/components/GoogleColabButton.module.css b/docs/src/components/GoogleColabButton.module.css deleted file mode 100644 index 82dc3acaac..0000000000 --- a/docs/src/components/GoogleColabButton.module.css +++ /dev/null @@ -1,73 +0,0 @@ -.colabButton { - display: table !important; - width: 100% !important; - height: 48px !important; - background-color: var(--ifm-background-surface-color) !important; - color: var(--ifm-color-content) !important; - text-decoration: none !important; - border-radius: 8px !important; - border: 1px solid var(--ifm-color-emphasis-300) !important; - font-weight: 500 !important; - font-size: 16px !important; - cursor: pointer !important; - transition: all 0.2s ease !important; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important; - box-sizing: border-box !important; - position: relative !important; -} - -.colabButton:hover { - border-color: var(--ifm-color-primary) !important; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; - transform: translateY(-1px) !important; - text-decoration: none !important; -} - -.colabButton:visited { - color: var(--ifm-color-content) !important; - text-decoration: none !important; -} - -.colabButton:active { - text-decoration: none !important; -} - -.logo { - position: absolute !important; - left: 16px !important; - top: 50% !important; - transform: translateY(-50%) !important; - width: 24px !important; - height: 24px !important; - object-fit: contain !important; - display: block !important; -} - -.text { - display: block !important; - text-align: center !important; - text-decoration: none !important; - line-height: 48px !important; - margin: 0 !important; - padding: 0 !important; - white-space: nowrap !important; - font-family: inherit !important; - font-size: 16px !important; - font-weight: 500 !important; - color: inherit !important; - width: 100% !important; - height: 48px !important; - position: absolute !important; - top: 0 !important; - left: 0 !important; -} - -.arrow { - position: absolute !important; - right: 16px !important; - top: 50% !important; - transform: translateY(-50%) !important; - width: 16px !important; - height: 16px !important; - display: block !important; -} \ No newline at end of file diff --git a/docs/src/components/GoogleColabButton.tsx b/docs/src/components/GoogleColabButton.tsx deleted file mode 100644 index 5ace0fbb4c..0000000000 --- a/docs/src/components/GoogleColabButton.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import styles from './GoogleColabButton.module.css'; - -interface GoogleColabButtonProps { - notebookPath: string; - children?: React.ReactNode; -} - -const GoogleColabButton: React.FC<GoogleColabButtonProps> = ({ notebookPath, children }) => { - const baseUrl = 'https://colab.research.google.com/github/Agenta-AI/agenta/blob/main'; - const colabUrl = `${baseUrl}/${notebookPath}`; - - return ( - <div className="margin-bottom--lg"> - <a - href={colabUrl} - target="_blank" - rel="noopener noreferrer" - className={styles.colabButton} - > - {/* Google Colab Logo */} - <img - src="/images/google_collab.png" - alt="Google Colaboratory" - className={styles.logo} - /> - - {/* Text - centered in the remaining space */} - <span className={styles.text}> - {children || 'Google Colaboratory'} - </span> - - {/* Arrow */} - <svg - viewBox="0 0 24 24" - fill="none" - stroke="currentColor" - strokeWidth="2" - className={styles.arrow} - > - <polyline points="9,18 15,12 9,6"></polyline> - </svg> - </a> - </div> - ); -}; - -export default GoogleColabButton; \ No newline at end of file diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index ac810733c1..2609aa9c84 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -7,409 +7,74 @@ /* You can override the default Infima variables here. */ :root { - /* Brand colors - Light mode */ - --brand-main-black: #000; - --brand-heading-black: #242424; - --brand-secondary-text: #676771; - --brand-border-grey: #DCD5D1; - --brand-grey-bg: #413F40; - --brand-white-bg: #FFF; - - /* Primary color mapping */ - --ifm-color-primary: #676771; - --ifm-color-primary-dark: #676771; - --ifm-color-primary-darker: #242424; - --ifm-color-primary-darkest: #242424; - --ifm-color-primary-light: #676771; - --ifm-color-primary-lighter: #DCD5D1; - --ifm-color-primary-lightest: #DCD5D1; - - /* Background colors */ - --ifm-background-color: #FFF; - --ifm-navbar-background-color: #FFF; - - /* Border colors */ - --ifm-toc-border-color: #DCD5D1; - --ifm-color-emphasis-200: #DCD5D1; - - /* Text colors */ - --ifm-font-color-base: #000; - --ifm-heading-color: #242424; - --ifm-link-color: #242424; - - /* Code highlighting */ - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.05); - - /* Typography */ + --ifm-color-primary: #6b7280; + --ifm-color-primary-dark: hsl(209, 13%, 40%); + --ifm-color-primary-darker: hsl(210, 21%, 28%); + --ifm-color-primary-darkest: hsl(211, 37%, 17%); + --ifm-color-primary-light: hsl(209, 14%, 55%); + --ifm-color-primary-lighter: hsl(210, 18%, 78%); + --ifm-color-primary-lightest: hsl(210, 24%, 87%); + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.274); --ifm-font-weight-normal: 400; - --ifm-font-weight-semibold: 500; - --ifm-font-weight-bold: 600; - --ifm-heading-font-weight: 600; - --ifm-h1-font-weight: 600; - --ifm-h2-font-weight: 500; - --ifm-h3-font-weight: 500; - --ifm-h4-font-weight: 500; - --ifm-navbar-height: 6.5rem; + --ifm-navbar-height: 3.9rem; --ifm-link-color: var(--ifm-color-primary-darker); --ifm-heading-color: var(--ifm-color-primary-darkest); --ifm-heading-h1-font-size: 32px; --ifm-heading-h2-font-size: 26px; --ifm-heading-h3-font-size: 20px; --ifm-heading-h4-font-size: 16px; - - /* Spacing scale */ - --spacing-xs: 4px; - --spacing-sm: 8px; - --spacing-md: 16px; - --spacing-lg: 24px; - --spacing-xl: 40px; - - /* Border radius scale */ - --border-radius-sm: 4px; - --border-radius-md: 6px; - --border-radius-lg: 8px; - - /* UI element colors - Light mode */ - --navbar-link-color: var(--brand-secondary-text); - --navbar-link-active-color: var(--brand-heading-black); - --sidebar-link-color: var(--brand-secondary-text); - --sidebar-link-active-color: var(--brand-heading-black); - --toc-link-color: var(--brand-secondary-text); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme="dark"] { - /* Brand colors - Dark mode */ - --brand-black-bg: #1E1C1D; - --brand-main-text-dark: #FFF; - --brand-secondary-text-dark: #787777; - - /* Primary color mapping for dark mode */ - --ifm-color-primary: #787777; - --ifm-color-primary-dark: #787777; - --ifm-color-primary-darker: #FFF; - --ifm-color-primary-darkest: #FFF; - --ifm-color-primary-light: #787777; - --ifm-color-primary-lighter: #413F40; - --ifm-color-primary-lightest: #2A2A2A; - - /* Background colors */ - --ifm-background-color: #1E1C1D; - --ifm-navbar-background-color: #1E1C1D; - --ifm-background-surface-color: #1E1C1D; - - /* Border colors */ - --ifm-toc-border-color: #413F40; - --ifm-color-emphasis-200: #413F40; - - /* Text colors */ - --ifm-font-color-base: #D0D0D0; - --ifm-heading-color: #FFF; - --ifm-link-color: #FFF; - - /* Code highlighting */ - --docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.05); - - /* UI element colors - Dark mode */ - --navbar-link-color: #C0C0C0; - --navbar-link-active-color: var(--brand-main-text-dark); - --sidebar-link-color: #C0C0C0; - --sidebar-link-active-color: var(--brand-main-text-dark); - --toc-link-color: #C0C0C0; + --ifm-color-primary: #758391; + --ifm-color-primary-dark: #bdc7d1; + --ifm-color-primary-darker: #d6dee6; + --ifm-color-primary-darkest: #eaeff5; + --ifm-color-primary-light: #758391; + --ifm-color-primary-lighter: #586673; + --ifm-color-primary-lightest: #394857; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } *:not(code *):not(pre) { font-family: "Inter", sans-serif !important; } - body { - color: var(--ifm-font-color-base); + color: var(--ifm-color-primary-darker); font-size: 16px; - line-height: 1.6; -} - -/* Lighter bold text weight for better readability */ -strong, -b { - font-weight: var(--ifm-font-weight-bold) !important; } - code *, pre { font-family: "IBM Plex Mono", monospace !important; } - -/* Code block typography improvements */ -pre { - font-size: 14px; - line-height: 1.7; - padding: 1.25rem; -} - -pre code { - font-size: 14px; - letter-spacing: -0.01em; -} - -/* Inline code */ -code:not(pre code) { - font-size: 0.9em; - font-weight: 500; - letter-spacing: -0.02em; - padding: 0.2em 0.4em; - background-color: rgba(0, 0, 0, 0.05); - border-radius: 3px; -} - -[data-theme="dark"] code:not(pre code) { - background-color: rgba(255, 255, 255, 0.1); -} - -/* Clean 2D code block styling - remove shadows, add border */ -pre, -div[class*="codeBlock"], -div[class*="prism"] { - box-shadow: none !important; - border: 0.5px solid rgba(203, 203, 203, 0.3) !important; - border-radius: var(--border-radius-md); - background-color: #FAFAFA !important; -} - -[data-theme="dark"] pre, -[data-theme="dark"] div[class*="codeBlock"], -[data-theme="dark"] div[class*="prism"] { - border: 0.5px solid rgba(255, 255, 255, 0.1) !important; - background-color: #1A1A1A !important; -} - -/* Custom refined syntax highlighting - Light mode */ -[data-theme="light"] .token.comment, -[data-theme="light"] .token.prolog, -[data-theme="light"] .token.doctype, -[data-theme="light"] .token.cdata { - color: #6A737D; - font-style: italic; -} - -[data-theme="light"] .token.punctuation { - color: #5E6687; -} - -[data-theme="light"] .token.property, -[data-theme="light"] .token.tag, -[data-theme="light"] .token.boolean, -[data-theme="light"] .token.number, -[data-theme="light"] .token.constant, -[data-theme="light"] .token.symbol, -[data-theme="light"] .token.deleted { - color: #0184BC; -} - -[data-theme="light"] .token.selector, -[data-theme="light"] .token.attr-name, -[data-theme="light"] .token.string, -[data-theme="light"] .token.char, -[data-theme="light"] .token.builtin, -[data-theme="light"] .token.inserted { - color: #0C7C59; -} - -[data-theme="light"] .token.operator, -[data-theme="light"] .token.entity, -[data-theme="light"] .token.url, -[data-theme="light"] .language-css .token.string, -[data-theme="light"] .style .token.string { - color: #A626A4; -} - -[data-theme="light"] .token.atrule, -[data-theme="light"] .token.attr-value, -[data-theme="light"] .token.keyword { - color: #D73A49; -} - -[data-theme="light"] .token.function, -[data-theme="light"] .token.class-name { - color: #6F42C1; -} - -[data-theme="light"] .token.regex, -[data-theme="light"] .token.important, -[data-theme="light"] .token.variable { - color: #E36209; -} - -/* Custom refined syntax highlighting - Dark mode */ -[data-theme="dark"] .token.comment, -[data-theme="dark"] .token.prolog, -[data-theme="dark"] .token.doctype, -[data-theme="dark"] .token.cdata { - color: #8B949E; - font-style: italic; -} - -[data-theme="dark"] .token.punctuation { - color: #C9D1D9; -} - -[data-theme="dark"] .token.property, -[data-theme="dark"] .token.tag, -[data-theme="dark"] .token.boolean, -[data-theme="dark"] .token.number, -[data-theme="dark"] .token.constant, -[data-theme="dark"] .token.symbol, -[data-theme="dark"] .token.deleted { - color: #79C0FF; -} - -[data-theme="dark"] .token.selector, -[data-theme="dark"] .token.attr-name, -[data-theme="dark"] .token.string, -[data-theme="dark"] .token.char, -[data-theme="dark"] .token.builtin, -[data-theme="dark"] .token.inserted { - color: #7EE787; -} - -[data-theme="dark"] .token.operator, -[data-theme="dark"] .token.entity, -[data-theme="dark"] .token.url, -[data-theme="dark"] .language-css .token.string, -[data-theme="dark"] .style .token.string { - color: #D2A8FF; -} - -[data-theme="dark"] .token.atrule, -[data-theme="dark"] .token.attr-value, -[data-theme="dark"] .token.keyword { - color: #FF7B72; -} - -[data-theme="dark"] .token.function, -[data-theme="dark"] .token.class-name { - color: #D2A8FF; -} - -[data-theme="dark"] .token.regex, -[data-theme="dark"] .token.important, -[data-theme="dark"] .token.variable { - color: #FFA657; -} - -/* Clean 2D admonition/callout styling - remove left accent and shadows */ -.theme-admonition, -div[class*="admonition"] { - box-shadow: none !important; - border-left: none !important; - border-radius: var(--border-radius-md); -} - -/* Note admonition - blue */ -.theme-admonition.alert--secondary, -.theme-admonition-note { - border: 1px solid rgba(84, 104, 255, 0.4) !important; -} - -[data-theme="dark"] .theme-admonition.alert--secondary, -[data-theme="dark"] .theme-admonition-note { - border: 1px solid rgba(84, 104, 255, 0.5) !important; -} - -/* Info admonition - cyan */ -.theme-admonition.alert--info, -.theme-admonition-info { - border: 1px solid rgba(84, 199, 236, 0.5) !important; -} - -[data-theme="dark"] .theme-admonition.alert--info, -[data-theme="dark"] .theme-admonition-info { - border: 1px solid rgba(84, 199, 236, 0.6) !important; -} - -/* Tip admonition - green */ -.theme-admonition.alert--success, -.theme-admonition-tip { - border: 1px solid rgba(0, 184, 148, 0.5) !important; -} - -[data-theme="dark"] .theme-admonition.alert--success, -[data-theme="dark"] .theme-admonition-tip { - border: 1px solid rgba(0, 184, 148, 0.6) !important; -} - -/* Caution/Warning admonition - orange */ -.theme-admonition.alert--warning, -.theme-admonition-caution, -.theme-admonition-warning { - border: 1px solid rgba(255, 165, 0, 0.6) !important; -} - -[data-theme="dark"] .theme-admonition.alert--warning, -[data-theme="dark"] .theme-admonition-caution, -[data-theme="dark"] .theme-admonition-warning { - border: 1px solid rgba(255, 165, 0, 0.7) !important; -} - -/* Danger admonition - red */ -.theme-admonition.alert--danger, -.theme-admonition-danger { - border: 1px solid rgba(220, 38, 38, 0.6) !important; -} - -[data-theme="dark"] .theme-admonition.alert--danger, -[data-theme="dark"] .theme-admonition-danger { - border: 1px solid rgba(239, 68, 68, 0.7) !important; -} - -h1:not([class*="openapi"]) { +h1 { font-size: var(--ifm-heading-h1-font-size) !important; - line-height: 1.25; - font-weight: var(--ifm-h1-font-weight) !important; - letter-spacing: -0.01em; + line-height: 40px; } - -h2:not([class*="openapi"]) { +h2 { font-size: var(--ifm-heading-h2-font-size) !important; - line-height: 1.3; - font-weight: var(--ifm-h2-font-weight) !important; - letter-spacing: -0.01em; + line-height: 34px; } - - -h3:not([class*="openapi"]) { +h3 { font-size: var(--ifm-heading-h3-font-size) !important; - line-height: 1.35; - font-weight: var(--ifm-h3-font-weight) !important; + line-height: 28px; } - -h4:not([class*="openapi"]) { +h4 { font-size: var(--ifm-heading-h4-font-size) !important; - line-height: 1.5; - font-weight: var(--ifm-h4-font-weight) !important; + line-height: 28px; } - /* link underline style */ article a { text-decoration: underline !important; - text-underline-offset: 3px !important; - text-decoration-thickness: 1px !important; - text-decoration-color: rgba(0, 0, 0, 0.22) !important; - transition: text-decoration-color 200ms ease, text-underline-offset 200ms ease !important; -} - -[data-theme="dark"] article a { - text-decoration-color: rgba(255, 255, 255, 0.25) !important; + text-underline-offset: 4px; + text-decoration-thickness: 1px; + text-decoration-color: var(--ifm-color-primary); } - article a:hover { - text-decoration-color: rgba(0, 0, 0, 0.45) !important; - text-underline-offset: 4px !important; -} - -[data-theme="dark"] article a:hover { - text-decoration-color: rgba(255, 255, 255, 0.55) !important; + text-decoration-thickness: 2px !important; + transition-duration: 400ms; } - .cardContainer_node_modules-\@docusaurus-theme-classic-lib-theme-DocCard-styles-module, .title_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module a, .cardContainer_fWXF, @@ -418,62 +83,29 @@ article a:hover { text-decoration: none !important; } -/* Remove underline from card container links */ -a[class*="cardContainer"], -a[class*="cardContainer"]:hover { - text-decoration: none !important; -} - /** Navbar **/ - -/* Two-row navbar layout */ -.two-row-navbar { - --ifm-navbar-height: 6.5rem; - padding: 0 !important; -} - -.two-row-navbar .navbar__inner { - flex-direction: column; - align-items: stretch; - padding: 0 !important; -} - -/* Hide mobile toggle on desktop for bottom row */ -@media (min-width: 997px) { - .two-row-navbar .navbar__toggle { - display: none; - } -} - @media (min-width: 1851px) { - .main-wrapper, .navbar__inner { width: 1550px; margin: auto; } } - @media (min-width: 1350px) and (max-width: 1850px) { - .main-wrapper, .navbar__inner { width: 95%; margin: auto; } } - @media (min-width: 1024px) and (max-width: 1350px) { - .main-wrapper, .navbar__inner { width: 95%; margin: auto; } } - @media (max-width: 1024px) { - .main-wrapper, .navbar__inner { width: 100%; @@ -481,119 +113,80 @@ a[class*="cardContainer"]:hover { } } -/* Target CSS module classes properly - these override the module's own styles */ -.two-row-navbar :global(.navbarTopRow) { - padding: 10px 0 0 0 !important; -} - -.two-row-navbar :global(.navbarBottomRow) { - padding: 0 !important; - margin-top: 17px !important; -} - -/* Add left margin to logo in desktop two-row mode */ -@media (min-width: 997px) { - .two-row-navbar .navbar__logo { - margin-left: 8px; - } -} - -/* Mobile: reset to single row with normal navbar height */ -@media (max-width: 996px) { - .two-row-navbar { - --ifm-navbar-height: 3.5rem; - padding: 8px 16px !important; - } - - .two-row-navbar :global(.navbarTopRow) { - padding: 0 !important; - } -} - .navbar__link { font-size: 14px; padding: 0px 8px; - color: var(--navbar-link-color); - font-weight: var(--ifm-font-weight-normal); - letter-spacing: 0.01em; + color: var(--ifm-color-primary); + font-weight: 400; +} +[data-theme="dark"] .navbar__link { + color: var(--ifm-color-primary-darker); } - .navbar__link--active { - color: var(--navbar-link-active-color); - font-weight: var(--ifm-font-weight-semibold); + color: var(--ifm-color-primary-darkest); + font-weight: 500; +} +[data-theme="dark"] .navbar__link--active { + color: var(--ifm-color-primary-darkest); } - .nav_github_icons, .nav_slack_icons { width: 22px; height: 22px; } - .navbar__item:has(.nav_github_icons), .navbar__item:has(.nav_slack_icons) { display: flex; justify-content: center; align-items: center; } - .theme-icon { color: var(--ifm-color-primary-darkest); } - .navbar__item:has(.nav_slack_icons) { margin-right: 3px; } - .nav_primary_button { background-color: var(--ifm-color-primary-darkest); color: var(--ifm-color-primary-lightest); margin-right: 25px; padding: 8px 16px; } - [data-theme="dark"] .nav_primary_button { background-color: var(--ifm-color-primary-lightest); color: var(--ifm-color-primary-darkest); } - .nav_secondary_button { background-color: transparent; color: var(--ifm-color-primary); margin-left: 10px; padding: 8px 12px; } - [data-theme="dark"] .nav_secondary_button { - color: var(--navbar-link-color); + color: var(--ifm-color-primary-dark); } - .nav_primary_button, .nav_secondary_button { font-size: 14px; - border-radius: var(--border-radius-md); + border-radius: 6px; outline: none; border: none; cursor: pointer; } - @media (max-width: 995px) { - .navbar__item:has(.nav_github_icons), .navbar__item:has(.nav_slack_icons) { display: none; } - .navbar-sidebar .menu__link:has(.nav_github_icons), .navbar-sidebar .menu__link:has(.nav_slack_icons) { position: absolute; top: -48px; left: 172px; } - .navbar-sidebar .menu__link:has(.nav_slack_icons) { left: 215px; } - .navbar-sidebar .menu__link:has(.nav_secondary_button), .navbar-sidebar .menu__link:has(.nav_primary_button) { padding: 0px; @@ -603,18 +196,15 @@ a[class*="cardContainer"]:hover { left: 50%; transform: translateX(-50%); } - .navbar-sidebar .menu__link:has(.nav_secondary_button) { bottom: 65px; } - .navbar-sidebar .menu__link:has(.nav_secondary_button):hover, .navbar-sidebar .menu__link:has(.nav_primary_button):hover, .navbar-sidebar .menu__link:has(.nav_github_icons):hover, .navbar-sidebar .menu__link:has(.nav_slack_icons):hover { background: transparent; } - .nav_primary_button, .nav_secondary_button { width: 100%; @@ -627,61 +217,41 @@ a[class*="cardContainer"]:hover { [data-theme="dark"] .DocSearch-Button { background-color: #181818; } - [data-theme="dark"] .DocSearch-Button:hover { background-color: #1b1b1d; } - [data-theme="dark"] .DocSearch-Modal { background-color: #1b1b1d; } - [data-theme="dark"] .DocSearch-Footer { background-color: #242526; opacity: 0.9; } - [data-theme="dark"] .DocSearch-Form { background-color: #181818; box-shadow: none; border: 2px solid #3d4144; } - .DocSearch-Button { - border-radius: var(--border-radius-md) !important; + border-radius: 6px !important; padding: 0 2px 0px 8px !important; } - -/* Search bar in two-row navbar should be wider */ -.two-row-navbar .navbar__search { - width: auto !important; - flex: 1 1 auto !important; -} - -.two-row-navbar .DocSearch { - width: 100% !important; -} - -.two-row-navbar .DocSearch-Button { - min-width: 400px !important; - max-width: 740px !important; - width: 100% !important; +@media (min-width: 1350px) { + .DocSearch-Button { + width: 250px; + } } - @media (max-width: 768px) { .DocSearch-Button { padding: 0 8px 0px 8px !important; } } - .DocSearch-Search-Icon { color: var(--ifm-color-primary) !important; } - .DocSearch-Button-Placeholder { font-size: 14px !important; } - .DocSearch-Button-Key { box-shadow: none !important; background: transparent !important; @@ -690,137 +260,73 @@ a[class*="cardContainer"]:hover { } /*************************** Sidebar ***************************/ - @media (min-width: 1350px) { .theme-doc-sidebar-container { margin-right: 40px; } } - @media (min-width: 1024px) and (max-width: 1350px) { .theme-doc-sidebar-container { margin-right: 20px; } } - -li.sidebar-section-title>div.menu__list-item-collapsible:hover { +li.sidebar-section-title > div.menu__list-item-collapsible:hover { background-color: transparent !important; } - -li.sidebar-section-title>div.menu__list-item-collapsible { +li.sidebar-section-title > div.menu__list-item-collapsible { margin-top: 25px !important; } - -li.sidebar-section-title>div.menu__list-item-collapsible a { - font-weight: var(--ifm-font-weight-bold) !important; +li.sidebar-section-title > div.menu__list-item-collapsible a { + font-weight: 600 !important; } - .menu__link { font-size: 14px; line-height: 22px; - font-weight: var(--ifm-font-weight-normal); - color: var(--sidebar-link-color); + font-weight: 400; + color: var(--ifm-color-primary); padding: 4px; - letter-spacing: 0.01em; } - .menu__link--active { - font-weight: var(--ifm-font-weight-semibold); - color: var(--sidebar-link-active-color); -} - -/* Flexbox layout for all collapsible items */ -.menu__list-item-collapsible { - display: flex !important; - align-items: center !important; - width: 100% !important; - padding: 0 !important; + font-weight: 500; + color: var(--ifm-color-primary-darkest); } - -/* Make links take available space */ -.menu__list-item-collapsible>.menu__link { - flex: 1 !important; - min-width: 0 !important; - padding-right: 0 !important; +[data-theme="dark"] .menu__link { + color: var(--ifm-color-primary-darker); } - -/* Position separate caret buttons at the right - adjusted to match built-in carets */ -.menu__list-item-collapsible>.menu__caret { - margin-left: auto !important; - margin-right: 0px !important; - flex-shrink: 0 !important; - padding: 0 !important; -} - -/* For links with built-in caret (using ::after) */ -.menu__link--sublist-caret { - display: flex !important; - justify-content: space-between !important; - align-items: center !important; - padding-right: 4px !important; +[data-theme="dark"] .menu__link--active { + color: var(--ifm-color-primary-darkest); } - .menu__link--sublist-caret:after, .menu__caret:before { - margin-left: auto !important; + margin: 0 10px; background: var(--ifm-menu-link-sublist-icon) 50% / 1.4rem 1.4rem; height: 10px; opacity: 0.8; - flex-shrink: 0 !important; } - .menu__list { padding-right: 5px; - padding-left: 4px; -} - -.menu { - padding-left: 0px !important; } - -/* Sidebar container - always hide border */ .docSidebarContainer_node_modules-\@docusaurus-theme-classic-lib-theme-DocRoot-Layout-Sidebar-styles-module, -.docSidebarContainer_YfHR, -.theme-doc-sidebar-container, -div[class*="docSidebarContainer"] { +.docSidebarContainer_YfHR { border-right: none !important; } /**************************** Article section ****************************/ -.container>.row { +.container > .row { justify-content: space-between; } - .markdown img { margin-bottom: 24px; } - -/* Ensure IdealImage wrapper divs get bottom margin */ -.markdown div:has(img.medium-zoom-image) { - margin-bottom: 24px; -} - -/* Target IdealImage wrapper divs - they have background-size in their inline styles */ -.markdown div[style*="background-size"] { - margin-bottom: 24px !important; -} - -/* Override the negative margin on IdealImage img tags */ -.markdown img.medium-zoom-image { - margin-bottom: 0 !important; -} - .theme-doc-markdown h1:first-child, .title_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module, .title_kItE { padding-top: 40px; } - .docItemCol_node_modules-docusaurus-theme-openapi-docs-lib-theme-ApiItem-Layout-styles-module { line-height: 24px; } - -.breadcrumbs__item--active>span { +.breadcrumbs__item--active > span { padding: 3px 15px; } @@ -828,23 +334,21 @@ div[class*="docSidebarContainer"] { .col--3 { --ifm-col-width: calc(2.8 / 12 * 100%); } - @media (max-width: 995px) { - .tocCollapsibleButton_node_modules-\@docusaurus-theme-classic-lib-theme-TOCCollapsible-CollapseButton-styles-module, .tocCollapsibleButtonExpanded_MG3E { color: var(--ifm-color-primary); } } - .table-of-contents__link { font-size: 14px; line-height: 20px; - font-weight: var(--ifm-font-weight-normal); - color: var(--toc-link-color); - letter-spacing: 0.01em; + font-weight: 400; + color: var(--ifm-color-primary-light); +} +[data-theme="dark"] .table-of-contents__link { + color: var(--ifm-color-primary-dark); } - .table-of-contents__left-border { border: none !important; } @@ -853,55 +357,49 @@ div[class*="docSidebarContainer"] { [href="/reference/api/agenta-backend"], .list_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module article:first-child, .list_eTzJ article:first-child, -.generatedIndexPage_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module header p, +.generatedIndexPage_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module + header + p, .generatedIndexPage_vN6x header p { display: none; } - -.api-method>.menu__link { +.api-method > .menu__link { align-items: center; justify-content: start; } - -.api-method>.menu__link::before { +.api-method > .menu__link::before { width: 35px; height: 18px; font-size: 10px; line-height: 18px; text-transform: uppercase; font-weight: 600; - border-radius: var(--border-radius-sm); + border-radius: 0.25rem; margin-right: var(--ifm-spacing-horizontal); text-align: center; flex-shrink: 0; color: white; } - -.get>.menu__link::before { +.get > .menu__link::before { content: "get"; background-color: var(--ifm-color-primary); } - -.put>.menu__link::before { +.put > .menu__link::before { content: "put"; background-color: var(--openapi-code-blue); } - -.post>.menu__link::before { +.post > .menu__link::before { content: "post"; background-color: var(--openapi-code-green); } - -.delete>.menu__link::before { +.delete > .menu__link::before { content: "del"; background-color: var(--openapi-code-red); } - -.patch>.menu__link::before { +.patch > .menu__link::before { content: "patch"; background-color: var(--openapi-code-orange); } - .openapi__method-endpoint-path, .openapi-markdown__details-summary-header-params, .openapi-markdown__details-summary-header-body { @@ -912,127 +410,87 @@ div[class*="docSidebarContainer"] { /****************************** changelog file ******************************/ .container_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Info-styles-module, .container_mt6G { - display: flex; - justify-content: space-between; - align-items: center; - font-size: 0.9rem; - margin-bottom: 0; - margin-top: 10px; - max-width: 1030px; - margin-right: auto; - margin-left: auto; + display: none; } - .title_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module, .title_f1Hy { margin-top: 40px; margin-bottom: 10px; - max-width: 1030px; - margin-right: auto; - margin-left: auto; -} - -/* center the changelog main header and hide its date */ -.changelog-main header .margin-vert--md { - display: none; -} - -.changelog-main header h1 { - text-align: center; + padding-left: 20%; } - .blog-post-page .col[class*="col--"] { flex: 0 !important; position: relative; } - .blog-post-page .col--2 { display: none !important; } - .blog-post-page .col { --ifm-col-width: 100% !important; flex: 0 0; margin-left: 0; - max-width: 1030px !important; + max-width: 100% !important; padding: 0 var(--ifm-spacing-horizontal); width: 100%; - margin-right: auto; - margin-left: auto; } - .blog-post-page .row { display: block; } - .changelog { width: 80%; margin-left: auto; } - .changelog em { font-style: normal; - font-weight: var(--ifm-font-weight-semibold); + font-weight: 500; position: absolute; left: 15px; margin-top: -42px; - color: var(--sidebar-link-active-color); + color: var(--ifm-color-primary-darker); +} +[data-theme="dark"] .changelog em { + color: var(--ifm-color-primary-light); } - .changelog hr { margin-top: 70px; width: 97%; position: absolute; left: 50%; transform: translateX(-50%); - background-color: var(--brand-border-grey); -} - -[data-theme="dark"] .changelog hr { - background-color: var(--brand-grey-bg); + background-color: var(--ifm-color-primary-lightest); } - .changelog h3 { margin-top: 160px; } - .changelog h3:first-child { margin-top: 60px; } - @media (max-width: 995px) { - .title_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module, .title_f1Hy { padding-left: 0px; } - .changelog { width: 100%; margin-left: auto; } - .changelog hr { margin-top: 50px; width: 96%; } - .changelog em { font-weight: 500; position: absolute; left: auto; margin-top: -100px !important; } - .changelog h3 { margin-top: 195px; } - .changelog h3:first-child { margin-top: 110px; } } - @media (max-width: 520px) { .changelog hr { margin: 50px auto 28%; @@ -1041,14 +499,12 @@ div[class*="docSidebarContainer"] { left: 0; transform: translateX(0); } - .changelog em { font-weight: 500; position: absolute; left: auto; margin-top: -105px !important; } - .changelog h3 { margin-top: 0px; height: auto; @@ -1070,16 +526,13 @@ div[class*="docSidebarContainer"] { .medium-zoom-overlay { background-color: #0000009f !important; } - [data-theme="dark"] .medium-zoom-overlay { background-color: #000000b4 !important; } - .medium-zoom-image--opened, .medium-zoom-overlay { z-index: 9999999; } - [data-theme="dark"] .medium-zoom-image--opened { border: 1px solid rgba(255, 255, 255, 0.096); } @@ -1140,90 +593,28 @@ div[class*='scrollbar'] { } [class*="cardTitle"] { - font-size: var(--ifm-heading-h4-font-size) !important; - font-weight: var(--ifm-font-weight-normal) !important; - margin-bottom: 8px; - font-variant-emoji: no-emoji !important; + font-size: var(--ifm-heading-h4-font-size) !important; + font-weight: var(--ifm-font-weight-normal) !important; + margin-bottom: 8px; + font-variant-emoji: no-emoji !important; } [class*="cardDescription"] { font-size: 14px !important; -} - +} a[class*="cardContainer"] { /* --ifm-link-color: var(--ifm-color-emphasis-100); */ /* --ifm-link-hover-color: var(--ifm-color-emphasis-100); */ --ifm-link-hover-decoration: none; box-shadow: 0 0 0 1px rgba(50, 50, 93, 0.01); - border: 1px solid var(--brand-border-grey); - border-radius: var(--border-radius-sm); + border: 1px solid var(--ifm-color-emphasis-200); + border-radius: 4px; transition: all var(--ifm-transition-fast) ease-in-out; transition-property: border, box-shadow; padding: 18px; font-variant-emoji: no-emoji !important; - position: relative; -} - -[data-theme="dark"] a[class*="cardContainer"] { - border: 1px solid var(--brand-grey-bg); -} - -/* Custom icon support for cards using CSS custom properties */ -/* Usage: <CustomDocCard item={{...}} icon="🚀" /> */ -/* Or for no icon: <CustomDocCard item={{...}} noIcon={true} /> */ - -/* First, hide the text content of the title that contains the emoji */ -.custom-icon [class*="cardTitle"], -.no-icon [class*="cardTitle"], -.icon-img [class*="cardTitle"] { - font-size: 0 !important; -} - -/* Then restore the text size for actual title text */ -.custom-icon [class*="cardTitle"]::after, -.no-icon [class*="cardTitle"]::after, -.icon-img [class*="cardTitle"]::after { - content: attr(title) !important; - font-size: var(--ifm-heading-h4-font-size) !important; - display: inline !important; -} - -/* Replace the default document emoji with custom icon */ -.custom-icon [class*="cardTitle"]::before { - content: var(--card-icon) !important; - font-size: 18px !important; - margin-right: 8px !important; - display: inline-block !important; - line-height: 1 !important; - flex-shrink: 0 !important; - vertical-align: text-bottom !important; - position: relative !important; - top: 2px !important; -} - -/* For no-icon cards, hide the emoji completely by not showing before pseudo */ -.no-icon [class*="cardTitle"]::before { - content: '' !important; - display: none !important; -} - -/* For SVG/image icons - replace the default emoji with background image */ -.icon-img [class*="cardTitle"]::before { - content: '' !important; - width: 18px !important; - height: 18px !important; - margin-right: 8px !important; - display: inline-block !important; - background-size: contain !important; - background-repeat: no-repeat !important; - background-position: center !important; - background-image: var(--card-icon-bg) !important; - flex-shrink: 0 !important; - vertical-align: text-bottom !important; - position: relative !important; - top: 2px !important; } @@ -1232,7 +623,7 @@ a[class*="cardContainer"] { padding: 18px !important; } -details:not([class*="openapi"]) { +details { background-color: var(--background-color) !important; border: 1px solid var(--ifm-color-emphasis-200) !important; --docusaurus-details-decoration-color: grey !important; diff --git a/docs/src/data/roadmap.ts b/docs/src/data/roadmap.ts deleted file mode 100644 index 5d4d37a7bc..0000000000 --- a/docs/src/data/roadmap.ts +++ /dev/null @@ -1,440 +0,0 @@ -export type Label = { - name: string; - color?: string; // hex without '#' -}; - -export type ShippedFeature = { - id: string; - title: string; - description?: string; - changelogPath: string; // e.g. "/changelog/2025-06-18-feature-name" - shippedAt: string; // ISO date string or any displayable date - labels?: Label[]; -}; - -export type PlannedFeature = { - id: string; - title: string; - description: string; - githubUrl: string; // issue or discussion URL - labels?: Label[]; -}; - -export const shippedFeatures: ShippedFeature[] = [ - // Playground: BCFF78 - // Observability: DE74FF - // Evaluation: 86B7FF - // Integration: FFA500 - { - id: "vertex-ai-provider-support", - title: "Vertex AI Provider Support", - description: - "Use Google Cloud's Vertex AI models including Gemini and partner models in the playground, Model Hub, and through Gateway endpoints.", - changelogPath: "/changelog/vertex-ai-provider-support", - shippedAt: "2025-10-24", - labels: [ - { - name: "Integration", - color: "FFA500", - }, - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "filtering-by-annotation", - title: "Filtering Traces by Annotation", - description: - "Filter and search for traces based on their annotations. Find traces with low scores or feedback quickly using the rebuilt filtering system.", - changelogPath: "/changelog/filtering-traces-by-annotation", - shippedAt: "2025-10-14", - labels: [ - { - name: "Observability", - color: "DE74FF", - }, - ], - }, - { - id: "evaluation-results-dashboard", - title: "New Evaluation Results Dashboard", - description: - "Completely redesigned evaluation results dashboard with performance plots, side-by-side comparison, improved testcases view, focused detail view, configuration visibility, and run naming.", - changelogPath: "/changelog/new-evaluation-results-dashboard", - shippedAt: "2025-09-26", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "deep-url-support", - title: "Deep URL Support for Sharable Links", - description: - "URLs now include workspace context, making them shareable between team members. Fixed workspace bugs with page refresh and workspace selection.", - changelogPath: "/changelog/deep-url-support-for-sharable-links", - shippedAt: "2025-09-24", - labels: [ - { - name: "Misc", - color: "000000", - }, - ], - }, - { - id: "speed-improvements-playground", - title: "Speed Improvements in the Playground", - description: - "We improved the speed of the playground (creation of prompts, navigation, etc.) especially with hundreds of revisions.", - changelogPath: "/changelog/speed-improvements-in-the-playground", - shippedAt: "2025-09-19", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "markdown-support", - title: "Markdown support ", - description: - "You can view prompt and messages in markdown both in the playground and in the observability drawer.", - changelogPath: "/changelog/major-playground-improvements-and-enhancements", - shippedAt: "2025-08-07", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - { - name: "Observability", - color: "DE74FF", - }, - ], - }, - { - id: "images-in-playground", - title: "Image Support in playground", - description: - "You can now upload images to the playground and use them in your prompts.", - changelogPath: "/changelog/support-for-images-in-playground", - shippedAt: "2025-07-29", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "llamaindex-integration", - title: "LLamaIndex Integration", - description: "You can trace your calls from LlamaIndex in one line.", - changelogPath: "/changelog/llamaindex-integration", - shippedAt: "2025-06-17", - labels: [ - { - name: "Observability", - color: "DE74FF", - }, - ], - }, - { - id: "annotate-llm-response", - title: "Endpoint to Capture User Feedback for Traces", - description: - "You can now use the annotation API to add annotations (e.g. scores, feedback) to LLM responses traced in Agenta.", - changelogPath: "/changelog/annotate-your-llm-response-preview", - shippedAt: "2025-05-15", - labels: [ - { - name: "Observability", - color: "DE74FF", - }, - ], - }, - { - id: "tool-support-playground", - title: "Tool Support in the Playground", - description: - "You can now define and test tools in the playground. You can save tool definitions as part of your prompts.", - changelogPath: "/changelog/tool-support-in-the-playground", - shippedAt: "2025-05-10", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "structured-output-playground", - title: "Structured Output Support in the Playground", - description: - "We support now structured output in the playground. You can now define and validate structured output formats and save them as part of your prompt.", - changelogPath: "/changelog/structured-output-support-in-the-playground", - shippedAt: "2025-04-15", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, -]; -export const inProgressFeatures: PlannedFeature[] = [ - { - id: "llm-judge-structured-output", - title: - "Structured Output and Multiple Outputs in LLM-as-a-Judge Evaluators", - description: - "Use structured output formats and generate multiple output fields (explanation, confidence, suggestions, issue categories) in LLM-as-a-judge evaluators.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2855", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "jinja2-playground", - title: "Jinja2 Template Support in the Playground", - description: - "Add Jinja2 template support to enable conditional logic, filters, and template blocks in prompts. The prompt type will be stored in the schema, and the SDK will handle rendering.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2856", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "pdf-support-playground", - title: "PDF Support in the Playground", - description: - "Add PDF support for models that support it (OpenAI, Gemini, etc.) through base64 encoding, URLs, or file IDs. Support extends to human evaluation for reviewing model responses on PDF inputs.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2857", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "prompt-snippets", - title: "Prompt Snippets", - description: - "Create reusable prompt snippets that can be referenced across multiple prompts. Reference specific versions or always use the latest version to maintain consistency across prompt variants.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2858", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "online-evaluation", - title: "Online Evaluation", - description: - "Adding the ability to configure evaluators (llm-as-a-judge or custom) and run them automatically on new traces.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2721", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "evaluation-sdk", - title: "Programmatic Evaluation through the SDK", - description: - "Until now evaluations were only available as managed by Agenta. We are now adding the ability to run evaluations programmatically through the SDK.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2725", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "date-range-filtering", - title: "Date Range Filtering in Metrics Dashboard", - description: - "We are adding the ability to filter traces by date range in the metrics dashboard.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2774", - labels: [ - { - name: "Observability", - color: "DE74FF", - }, - ], - }, -]; - -export const plannedFeatures: PlannedFeature[] = [ - { - id: "prompt-folders", - title: "Folders for Prompt Organization", - description: - "Create folders and subfolders to organize prompts in the playground. Move prompts between folders and search within specific folders to structure prompt libraries.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2859", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "projects-workspaces", - title: "Projects and Workspaces", - description: - "Improve organization structure by adding projects and workspaces. Create projects for different products, set up workspaces for different environments or teams, and scope resources to specific workspaces.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2860", - labels: [ - { - name: "Misc", - color: "000000", - }, - ], - }, - { - id: "ai-prompt-refinement", - title: "AI-Powered Prompt Refinement in the Playground", - description: - "Analyze prompts and suggest improvements based on best practices. Identify issues, propose refined versions, and allow users to accept, modify, or reject suggestions.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2861", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "open-spans-playground", - title: "Open Observability Spans Directly in the Playground", - description: - "Add a button in observability to open any chat span directly in the playground. Creates a stateless playground session pre-filled with the exact prompt, configuration, and inputs for immediate iteration.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2862", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - { - name: "Observability", - color: "DE74FF", - }, - ], - }, - { - id: "navigation-in-the-playground", - title: "Improving Navigation between Testsets in the Playground", - description: - "We are making it easy to use and navigate in the playground with large testsets .", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2731", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "appending-single-test-cases", - title: "Appending Single Testcases in the Playground", - description: - "Using testcases from different testsets is not possible right now in the Playground. We are adding the ability to append a single testcase to a testset.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2732", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - { - id: "test-set-view", - title: "Improving Testset View", - description: - "We are reworking the testset view to make it easier to visualize and edit testsets.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2733", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "prompt-caching-sdk", - title: "Prompt Caching in the SDK", - description: "We are adding the ability to cache prompts in the SDK.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2734", - labels: [ - { - name: "SDK", - color: "DE74FF", - }, - ], - }, - { - id: "test-set-versioning", - title: "Testset Versioning", - description: - "We are adding the ability to version testsets. This is useful for correctly comparing evaluation results.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2735", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "tagging", - title: "Tagging Traces, Testsets, Evaluations and Prompts", - description: - "We are adding the ability to tag traces, testsets, evaluations and prompts. This is useful for organizing and filtering your data.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2736", - labels: [ - { - name: "Evaluation", - color: "86B7FF", - }, - ], - }, - { - id: "tools-playground", - title: "Support for built-in LLM Tools (e.g. web search) in the Playground", - description: - "We are adding the ability to use built-in LLM tools (e.g. web search) in the playground.", - githubUrl: "https://github.com/Agenta-AI/agenta/discussions/2577", - labels: [ - { - name: "Playground", - color: "BCFF78", - }, - ], - }, - - // Example: - // { - // id: "plg-cost-dashboard", - // title: "Cost Dashboard", - // description: "Track token usage and cost across environments and models.", - // githubUrl: "https://github.com/Agenta-AI/agenta/discussions/5678", - // }, -]; diff --git a/docs/src/icons/library.tsx b/docs/src/icons/library.tsx deleted file mode 100644 index 9713461ae3..0000000000 --- a/docs/src/icons/library.tsx +++ /dev/null @@ -1,253 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import {useColorMode} from '@docusaurus/theme-common'; - -type IconComponent = React.ComponentType<React.SVGProps<SVGSVGElement>>; - -export type IconDescriptor = { - name: string; - library?: string; -}; - -type IconLibrary = Record<string, IconComponent>; - -// Base props for stroke-based icons (light mode) -const strokeSvgProps: React.SVGProps<SVGSVGElement> = { - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - strokeWidth: 2, - strokeLinecap: "square", - xmlns: "http://www.w3.org/2000/svg", -}; - -// Base props for filled icons (dark mode) -const filledSvgProps: React.SVGProps<SVGSVGElement> = { - viewBox: "0 0 24 24", - fill: "currentColor", - xmlns: "http://www.w3.org/2000/svg", -}; - -const FileTextIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path fillRule="evenodd" clipRule="evenodd" d="M4 2H20V22H4V2ZM8 6V8H16V6H8ZM8 10V12H16V10H8ZM8 14V16H12V14H8Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props}> - <path d="M9 7H15M9 11H15M9 15H11M5 3H19V21H5V3Z" /> - </svg> - ); -}; - -const LayersIcon: IconComponent = (props) => ( - <svg {...strokeSvgProps} {...props}> - <path d="M12 4l8 4-8 4-8-4 8-4z" /> - <path d="M4 12l8 4 8-4" /> - <path d="M4 16l8 4 8-4" /> - </svg> -); - -const CodeIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path fillRule="evenodd" clipRule="evenodd" d="M3 3H21V21H3V3ZM9.79289 8.29289L11.2071 9.70711L8.91421 12L11.2071 14.2929L9.79289 15.7071L6.08579 12L9.79289 8.29289ZM12.7929 9.70711L15.0858 12L12.7929 14.2929L14.2071 15.7071L17.9142 12L14.2071 8.29289L12.7929 9.70711Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props}> - <path d="M10.5 9L7.5 12L10.5 15M13.5 9L16.5 12L13.5 15M4 4H20V20H4V4Z" /> - </svg> - ); -}; - -const BookOpenIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path d="M11 8C11 5.79086 9.20914 4 7 4H1V20H9C10.1046 20 11 20.8954 11 22V8Z" /> - <path d="M13 22C13 20.8954 13.8954 20 15 20H23V4H17C14.7909 4 13 5.79086 13 8V22Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props} strokeLinecap="round"> - <path d="M12 8C12 6.34315 10.6569 5 9 5H2V19H9C10.6569 19 12 20.3431 12 22M12 8C12 6.34315 13.3431 5 15 5H22V19H15C13.3431 19 12 20.3431 12 22M12 8V22" /> - </svg> - ); -}; - -const RouteIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path fillRule="evenodd" clipRule="evenodd" d="M19.5 3L23.25 8L19.5 13H13V21H11V17H4.5L0.75 12L4.5 7H11V3H19.5ZM13 5V11H18.5L20.75 8L18.5 5H13Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props}> - <path d="M12 12H19L22 8L19 4H12V8M12 12V8M12 12V16M12 8H5L2 12L5 16H12M12 16V20" /> - </svg> - ); -}; - -const HistoryIcon: IconComponent = (props) => ( - <svg {...strokeSvgProps} {...props}> - <path d="M12 8v4l3 3" /> - <path d="M3 12a9 9 0 1 0 3-6.7" /> - <path d="M3 5v4h4" /> - </svg> -); - -const ClockIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path fillRule="evenodd" clipRule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM11 12.4142V7H13V11.5858L15.9142 14.5L14.5 15.9142L11 12.4142Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props}> - <path d="M12 8V12L14.5 14.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" /> - </svg> - ); -}; - -const CookbookIcon: IconComponent = (props) => ( - <svg {...strokeSvgProps} {...props}> - <circle cx="8.5" cy="8" r="2.1" /> - <circle cx="12" cy="6.5" r="2.4" /> - <circle cx="15.5" cy="8" r="2.1" /> - <path d="M5 11h14v3.5a3.5 3.5 0 0 1-3.5 3.5H8.5A3.5 3.5 0 0 1 5 14.5z" /> - <path d="M9 18v2" /> - <path d="M15 18v2" /> - </svg> -); - -const SettingsIcon: IconComponent = (props) => ( - <svg {...strokeSvgProps} {...props}> - <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> - <circle cx="12" cy="12" r="3" /> - </svg> -); - -const ServerIcon: IconComponent = (props) => { - const {colorMode} = useColorMode(); - const isDark = colorMode === 'dark'; - - return isDark ? ( - // Dark mode - filled - <svg {...filledSvgProps} {...props}> - <path fillRule="evenodd" clipRule="evenodd" d="M2 4H22V11H2V4ZM6.5 7.5C6.5 8.05228 6.05228 8.5 5.5 8.5C4.94772 8.5 4.5 8.05228 4.5 7.5C4.5 6.94772 4.94772 6.5 5.5 6.5C6.05228 6.5 6.5 6.94772 6.5 7.5Z" /> - <path fillRule="evenodd" clipRule="evenodd" d="M2 13H22V20H2V13ZM6.5 16.5C6.5 17.0523 6.05228 17.5 5.5 17.5C4.94772 17.5 4.5 17.0523 4.5 16.5C4.5 15.9477 4.94772 15.5 5.5 15.5C6.05228 15.5 6.5 15.9477 6.5 16.5Z" /> - </svg> - ) : ( - // Light mode - stroke - <svg {...strokeSvgProps} {...props}> - <path d="M21 12V5H3V12M21 12H3M21 12V19H3V12" /> - <path d="M6.5 14.625C6.98325 14.625 7.375 15.0168 7.375 15.5C7.375 15.9832 6.98325 16.375 6.5 16.375C6.01675 16.375 5.625 15.9832 5.625 15.5C5.625 15.0168 6.01675 14.625 6.5 14.625ZM6.5 7.625C6.98325 7.625 7.375 8.01675 7.375 8.5C7.375 8.98325 6.98325 9.375 6.5 9.375C6.01675 9.375 5.625 8.98325 5.625 8.5C5.625 8.01675 6.01675 7.625 6.5 7.625Z" fill="currentColor" stroke="currentColor" strokeWidth="0.75" /> - </svg> - ); -}; - -const SunIcon: IconComponent = (props) => ( - <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}> - <path d="M13 1H11V4H13V1Z" fill="currentColor" /> - <path d="M13 20H11V23H13V20Z" fill="currentColor" /> - <path d="M20.4841 4.93005L18.3598 7.05427L16.9456 5.64005L19.0698 3.51584L20.4841 4.93005Z" fill="currentColor" /> - <path d="M7.05437 18.36L5.64016 16.9458L3.51594 19.07L4.93016 20.4842L7.05437 18.36Z" fill="currentColor" /> - <path d="M20 11H23V13H20V11Z" fill="currentColor" /> - <path d="M1 11V13H4V11H1Z" fill="currentColor" /> - <path d="M18.3598 16.9458L20.4841 19.07L19.0698 20.4842L16.9456 18.36L18.3598 16.9458Z" fill="currentColor" /> - <path d="M4.93016 3.51584L3.51594 4.93005L5.64016 7.05427L7.05437 5.64005L4.93016 3.51584Z" fill="currentColor" /> - <path d="M7.75736 7.75736C10.1005 5.41421 13.8995 5.41421 16.2426 7.75736C18.5858 10.1005 18.5858 13.8995 16.2426 16.2426C13.8995 18.5858 10.1005 18.5858 7.75736 16.2426C5.41421 13.8995 5.41421 10.1005 7.75736 7.75736Z" fill="currentColor" /> - </svg> -); - -const MoonIcon: IconComponent = (props) => ( - <svg {...strokeSvgProps} {...props} strokeLinecap="round"> - <path d="M10.5498 3.08105C10.1951 3.98582 10 4.97071 10 6C10.0001 10.4182 13.5818 14 18 14C19.0291 14 20.0133 13.8038 20.918 13.4492C20.2236 17.7485 16.4972 21.0322 12.002 21.0322C7.01255 21.0322 2.96779 16.9874 2.96777 11.998C2.96777 7.503 6.25084 3.77575 10.5498 3.08105Z" /> - </svg> -); - -const ICON_LIBRARIES: Record<string, IconLibrary> = { - lucide: { - fileText: FileTextIcon, - layers: LayersIcon, - code: CodeIcon, - bookOpen: BookOpenIcon, - route: RouteIcon, - history: HistoryIcon, - clock: ClockIcon, - cookbook: CookbookIcon, - settings: SettingsIcon, - server: ServerIcon, - sun: SunIcon, - moon: MoonIcon, - }, -}; - -const DEFAULT_LIBRARY = "lucide"; -const DEFAULT_SIZE = 18; - -export type NavIconProps = IconDescriptor & { - className?: string; - size?: number; -}; - -function resolveIcon(descriptor: IconDescriptor): IconComponent | null { - const libraryName = descriptor.library ?? DEFAULT_LIBRARY; - const library = ICON_LIBRARIES[libraryName]; - - if (!library) { - return null; - } - - return library[descriptor.name] ?? null; -} - -export function NavIcon({ - className, - size = DEFAULT_SIZE, - ...descriptor -}: NavIconProps) { - const Icon = resolveIcon(descriptor); - - if (!Icon) { - return null; - } - - return ( - <Icon - className={clsx(className)} - width={size} - height={size} - aria-hidden="true" - focusable="false" - /> - ); -} - -/** - * Utility that makes it easier to extend the icon registry in one place. - * Consumers can swap `DEFAULT_LIBRARY` or append to `ICON_LIBRARIES` to change - * the icon sources without touching navbar components. - */ -export const iconLibraries = ICON_LIBRARIES; diff --git a/docs/src/pages/roadmap.module.css b/docs/src/pages/roadmap.module.css deleted file mode 100644 index d673e58e3e..0000000000 --- a/docs/src/pages/roadmap.module.css +++ /dev/null @@ -1,451 +0,0 @@ -.container { - max-width: 1000px; - margin: 0 auto; - padding: 2rem 1rem 4rem; -} - -.pageHeader { - margin-bottom: 2rem; -} - -.pageTitle { - font-size: 2.25rem; - font-weight: 700; - margin: 0 0 0.25rem 0; -} - -.pageSubtitle { - color: var(--ifm-color-emphasis-600); - margin: 0; -} - -.sectionHeader { - font-size: 1.75rem; - font-weight: 800; - margin: 3rem 0 1.5rem 0; - padding-bottom: 0.75rem; - border-bottom: 3px solid var(--ifm-color-primary-lightest); - position: relative; -} - -.sectionHeader::before { - content: ''; - position: absolute; - bottom: -3px; - left: 0; - width: 60px; - height: 3px; - background: var(--ifm-color-primary); -} - -.sectionList { - display: flex; - flex-direction: column; - gap: 0.75rem; - background: var(--ifm-background-surface-color); - margin-bottom: 2rem; -} - -.featureCard { - display: flex; - flex-direction: column; - border: 1px solid var(--ifm-toc-border-color); - border-radius: 12px; - padding: 1rem 1.25rem; - background: var(--ifm-background-surface-color); - text-decoration: none !important; - transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease; -} - -.featureCardLeft { - min-width: 0; -} - -.featureCard:hover { - box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); - transform: translateY(-2px); - border-color: var(--ifm-color-primary-lightest); -} - -.featureTitleRow { - display: flex; - align-items: center; - gap: 0.75rem; -} - -.featureTitleAndDate { - display: inline-flex; - align-items: baseline; - gap: 0.5rem; - flex: 1 1 auto; - min-width: 0; -} - -.featureTitle { - font-weight: 700; - font-size: 1.25rem; -} - -.featureDescription { - color: var(--ifm-color-emphasis-700); - margin-top: 0.35rem; - font-size: 1.05rem; - line-height: 1.6; -} - -.featureCardRight { - margin-left: 1rem; -} - -.featureMetaDate { - color: var(--ifm-color-emphasis-600); - font-size: 0.95rem; - margin-top: 0.5rem; -} - -.featureMetaDateInline { - color: var(--ifm-color-emphasis-600); - font-size: 0.95rem; -} - -.featureTitleRight { - margin-left: auto; - display: inline-flex; - justify-content: flex-end; - gap: 0.35rem; -} - -/* removed neutral variant to allow data-defined colors */ - -.discussionsIntro { - color: var(--ifm-color-emphasis-700); -} - -.tableWrapper { - overflow-x: auto; -} - -.table { - width: 100%; - border-collapse: collapse; -} - -.table th, -.table td { - border-bottom: 1px solid var(--ifm-toc-border-color); - padding: 0.6rem 0.5rem; - text-align: left; -} - -.loading, -.empty, -.errorBox { - padding: 0.75rem 1rem; - border: 1px solid var(--ifm-toc-border-color); - border-radius: 6px; - display: inline-block; -} - -.errorBox { - border-color: var(--ifm-color-danger); -} - -.upvoteLink { - font-weight: 600; -} - -/* --- Cards view for discussions --- */ -.cardsGrid { - display: grid; - grid-template-columns: repeat(1, minmax(0, 1fr)); - gap: 0.75rem; -} - -@media (min-width: 640px) { - .cardsGrid { - grid-template-columns: repeat(1, minmax(0, 1fr)); - } -} - -@media (min-width: 1024px) { - .cardsGrid { - grid-template-columns: repeat(1, minmax(0, 1fr)); - } -} - -.card { - border: 1px solid var(--ifm-toc-border-color); - border-radius: 10px; - background: var(--ifm-background-surface-color); - padding: 0.85rem 1rem; - display: flex; - flex-direction: row; - gap: 0.75rem; - transition: box-shadow 150ms ease, transform 150ms ease; -} - -.card:hover { - box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); - transform: translateY(-2px); - border-color: var(--ifm-color-primary-lightest); -} - -.cardHeader { - display: flex; - flex-direction: column; - gap: 0.4rem; -} - -.voteColumn { - display: flex; - align-items: center; - justify-content: center; - padding-right: 0.5rem; -} - -.upvotePill { - display: none; -} - -.upvoteButton { - display: inline-flex; - align-items: center; - justify-content: center; - flex-direction: column; - width: 44px; - height: 44px; - border-radius: 8px; - border: 1px solid var(--ifm-toc-border-color); - background: var(--ifm-color-emphasis-100); - color: var(--ifm-color-emphasis-900); - cursor: pointer; - transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease; -} - -.upvoteButton:hover { - background: var(--ifm-color-emphasis-200); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); -} - -.upvoteIcon { - display: block; - margin: 0; -} - -.upvoteCount { - font-size: 0.8rem; - font-weight: 600; - line-height: 1; -} - -.cardMain { - display: flex; - flex-direction: column; - min-width: 0; - flex: 1 1 auto; -} - -.cardTitle { - font-weight: 700; - line-height: 1.35; - font-size: 1.05rem; -} - -.metaRow { - display: flex; - align-items: center; - gap: 0.5rem; - color: var(--ifm-color-emphasis-600); - font-size: 0.9rem; -} - -/* Replace badge with GitHub-like comments link */ -.commentsLink { - display: inline-flex; - align-items: center; - gap: 0.35rem; - color: var(--ifm-color-emphasis-700); - text-decoration: none !important; -} - -.commentsLink:hover { - text-decoration: underline; -} - -.commentIcon { - opacity: 0.85; - display: block; -} - -.commentCount { - font-weight: 500; -} - -.createdAt { - font-size: 0.9rem; -} - -.labelsRow { - display: flex; - flex-wrap: wrap; - gap: 0.35rem; -} - -.labelsRowInline { - display: inline-flex; - flex-wrap: wrap; - gap: 0.35rem; -} - -.labelChip { - --chip-bg: var(--ifm-color-primary); - display: inline-flex; - align-items: center; - gap: 0.35rem; - font-size: 0.9rem; - line-height: 1; - border-radius: 999px; - padding: 0.28rem 0.6rem; - background-color: color-mix(in oklab, var(--chip-bg) 18%, transparent); - color: color-mix(in oklab, var(--chip-bg) 80%, black); - border: 1px solid color-mix(in oklab, var(--chip-bg) 35%, transparent); -} - -.labelIcon { - font-size: 0.85rem; - line-height: 1; -} - -.metaSpacer { - flex: 1 1 auto; -} - -.actionsBar { - display: flex; - justify-content: flex-start; - margin: 0.5rem 0 1rem; -} - -.primaryAction { - text-decoration: none !important; -} - -.card { - text-decoration: none !important; -} - -/* Discussions controls */ -.discussionsControls { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 1.5rem; - padding: 1rem; - background: var(--ifm-background-surface-color); - border: 1px solid var(--ifm-toc-border-color); - border-radius: 8px; -} - -.sortControls { - display: flex; - align-items: center; - gap: 0.5rem; -} - -.sortLabel { - font-weight: 600; - color: var(--ifm-color-emphasis-800); -} - -.sortSelect { - padding: 0.5rem 2.5rem 0.5rem 0.75rem; - border: 1px solid var(--ifm-toc-border-color); - border-radius: 8px; - background: var(--ifm-background-surface-color); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 0.5rem center; - background-repeat: no-repeat; - background-size: 1.5em 1.5em; - color: var(--ifm-color-emphasis-900); - font-size: 0.95rem; - font-weight: 500; - appearance: none; - cursor: pointer; - transition: border-color 150ms ease, box-shadow 150ms ease; - min-width: 140px; -} - -.sortSelect:hover { - border-color: var(--ifm-color-primary); -} - -.sortSelect:focus { - outline: none; - border-color: var(--ifm-color-primary); - box-shadow: 0 0 0 3px rgba(var(--ifm-color-primary-rgb), 0.1); -} - -.resultsInfo { - color: var(--ifm-color-emphasis-600); - font-size: 0.9rem; -} - -/* Pagination */ -.pagination { - display: flex; - justify-content: center; - align-items: center; - gap: 0.5rem; - margin-top: 2rem; - padding: 1rem 0; -} - -.paginationButton { - padding: 0.5rem 1rem; - border: 1px solid var(--ifm-toc-border-color); - border-radius: 6px; - background: var(--ifm-background-surface-color); - color: var(--ifm-color-emphasis-900); - cursor: pointer; - transition: all 150ms ease; -} - -.paginationButton:hover:not(.disabled) { - background: var(--ifm-color-primary-lightest); - border-color: var(--ifm-color-primary); -} - -.paginationButton.disabled { - opacity: 0.5; - cursor: not-allowed; -} - -.paginationNumbers { - display: flex; - gap: 0.25rem; -} - -.paginationNumber { - width: 40px; - height: 40px; - border: 1px solid var(--ifm-toc-border-color); - border-radius: 6px; - background: var(--ifm-background-surface-color); - color: var(--ifm-color-emphasis-900); - cursor: pointer; - transition: all 150ms ease; - display: flex; - align-items: center; - justify-content: center; -} - -.paginationNumber:hover { - background: var(--ifm-color-primary-lightest); - border-color: var(--ifm-color-primary); -} - -.paginationNumber.active { - background: var(--ifm-color-primary); - color: white; - border-color: var(--ifm-color-primary); -} \ No newline at end of file diff --git a/docs/src/pages/roadmap.tsx b/docs/src/pages/roadmap.tsx deleted file mode 100644 index 5ceadd9650..0000000000 --- a/docs/src/pages/roadmap.tsx +++ /dev/null @@ -1,454 +0,0 @@ -import React, { useEffect, useMemo, useState } from 'react'; -import Layout from '@theme/Layout'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Link from '@docusaurus/Link'; -import BrowserOnly from '@docusaurus/BrowserOnly'; -import clsx from 'clsx'; -import styles from './roadmap.module.css'; - -import { - shippedFeatures, - inProgressFeatures, - plannedFeatures, - ShippedFeature, - PlannedFeature, - Label, -} from '../data/roadmap'; - -type GithubDiscussion = { - id: string; - title: string; - url: string; - comments: number; - category?: string; - categorySlug?: string; - createdAt?: string; - state?: string; - labels?: Array<{ - name: string; - color?: string; // hex without '#' - }>; - upvotes?: number; -}; - -// Configure your GitHub org/repo here. -const GITHUB_OWNER = 'Agenta-AI'; -const GITHUB_REPO = 'agenta'; -const NEW_DISCUSSION_URL = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/discussions/new?category=ideas`; - -// We will use the Discussions list API via the REST endpoint. -// Note: For unauthenticated requests there is a low rate-limit. You can -// set an environment var in production to add a token if needed and pass it -// through a runtime-config script, or rely on unauthenticated for now. -async function fetchDiscussions(signal?: AbortSignal): Promise<GithubDiscussion[]> { - // Paginate to collect more "Ideas" items, not just the first page - const perPage = 50; - const maxPages = 5; // cap to avoid too many requests client-side - const collected: GithubDiscussion[] = []; - - for (let page = 1; page <= maxPages; page += 1) { - const url = `https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/discussions?per_page=${perPage}&state=open&sort=created&direction=desc&page=${page}`; - const res = await fetch(url, { - headers: { - Accept: 'application/vnd.github+json', - }, - signal, - }); - if (!res.ok) { - break; - } - const data = await res.json(); - if (!Array.isArray(data) || data.length === 0) { - break; - } - - const normalized: GithubDiscussion[] = (data || []).map((d: any) => ({ - id: String(d.id), - title: d.title as string, - url: d.html_url as string, - comments: d.comments as number, - category: d.category?.name as string | undefined, - categorySlug: d.category?.slug as string | undefined, - createdAt: d.created_at as string | undefined, - state: d.state as string | undefined, - labels: Array.isArray(d.labels) - ? d.labels.map((l: any) => ({ name: String(l.name), color: l.color ? String(l.color) : undefined })) - : [], - upvotes: typeof d?.reactions?.["+1"] === 'number' ? Number(d.reactions["+1"]) : 0, - })); - - const onlyIdeasOpen = normalized.filter((d) => { - const cat = (d.categorySlug ?? d.category ?? '').toLowerCase(); - const isIdeas = cat === 'ideas'; - const isOpen = (d.state ?? '').toLowerCase() === 'open'; - return isIdeas && isOpen; - }); - - collected.push(...onlyIdeasOpen); - - if (data.length < perPage) { - // no more pages - break; - } - } - - // Sort by createdAt DESC (most recent first) - collected.sort((a, b) => { - const da = a.createdAt ? Date.parse(a.createdAt) : 0; - const db = b.createdAt ? Date.parse(b.createdAt) : 0; - return db - da; - }); - - return collected; -} - -function SectionHeader({ children }: { children: React.ReactNode }) { - return ( - <h2 className={styles.sectionHeader}>{children}</h2> - ); -} - -function getCategoryIcon(categoryName: string): string { - const icons: Record<string, string> = { - 'Playground': '🎮', - 'Evaluation': '📊', - 'Observability': '👁️', - 'SDK': '⚙️', - 'API': '🔗', - 'UI': '🎨', - 'Performance': '⚡', - 'Security': '🔒', - 'Integration': '🔌', - 'Analytics': '📈', - 'Workflow': '🔄', - 'Testing': '🧪', - 'Documentation': '📝', - 'DevOps': '🚀', - }; - return icons[categoryName] || '🏷️'; -} - -function LabelsInline({ labels, variant = 'colored' }: { labels?: Label[]; variant?: 'colored' | 'neutral' }) { - if (!labels || labels.length === 0) return null; - return ( - <span className={styles.labelsRowInline}> - {labels.map((l) => ( - <span - key={l.name} - className={styles.labelChip} - style={variant === 'neutral' ? undefined : (l.color ? { ['--chip-bg' as any]: `#${l.color}` } : undefined)} - > - <span className={styles.labelIcon} aria-hidden="true">{getCategoryIcon(l.name)}</span> - {l.name} - </span> - ))} - </span> - ); -} - -function FeatureCardClickable({ - title, - description, - href, - labels, - date, - target = "_blank", -}: { - title: string; - description?: string; - href: string; - labels?: Label[]; - date?: string; - target?: string; -}) { - return ( - <a - className={styles.featureCard} - href={href} - target={target} - rel={target === "_blank" ? "noreferrer noopener" : undefined} - > - <div className={styles.featureTitleRow}> - <div className={styles.featureTitleAndDate}> - <div className={styles.featureTitle}>{title}</div> - {date && ( - <div className={styles.featureMetaDateInline}> - {new Date(date).toLocaleDateString()} - </div> - )} - </div> - <div className={styles.featureTitleRight}> - <LabelsInline labels={labels} /> - </div> - </div> - {description && <div className={styles.featureDescription}>{description}</div>} - </a> - ); -} - -function DiscussionsTable() { - return ( - <BrowserOnly> - {() => <DiscussionsTableClient />} - </BrowserOnly> - ); -} - -type SortOption = 'created' | 'upvotes' | 'comments'; - -function DiscussionsTableClient() { - const [discussions, setDiscussions] = useState<GithubDiscussion[] | null>(null); - const [error, setError] = useState<string | null>(null); - const [sortBy, setSortBy] = useState<SortOption>('created'); - const [currentPage, setCurrentPage] = useState(1); - const itemsPerPage = 10; - - useEffect(() => { - const controller = new AbortController(); - fetchDiscussions(controller.signal) - .then(setDiscussions) - .catch(() => setError('Failed to load discussions')); - return () => controller.abort(); - }, []); - - if (error) { - return <div className={styles.errorBox}>{error}</div>; - } - if (!discussions) { - return <div className={styles.loading}>Loading GitHub discussions…</div>; - } - if (discussions.length === 0) { - return <div className={styles.empty}>No open discussions found.</div>; - } - - // Sort discussions - const sortedDiscussions = [...discussions].sort((a, b) => { - switch (sortBy) { - case 'upvotes': - return (b.upvotes || 0) - (a.upvotes || 0); - case 'comments': - return b.comments - a.comments; - case 'created': - default: - const da = a.createdAt ? Date.parse(a.createdAt) : 0; - const db = b.createdAt ? Date.parse(b.createdAt) : 0; - return db - da; - } - }); - - // Paginate discussions - const totalPages = Math.ceil(sortedDiscussions.length / itemsPerPage); - const startIndex = (currentPage - 1) * itemsPerPage; - const paginatedDiscussions = sortedDiscussions.slice(startIndex, startIndex + itemsPerPage); - - return ( - <div> - <div className={styles.discussionsControls}> - <div className={styles.sortControls}> - <label className={styles.sortLabel}>Sort by:</label> - <select - className={styles.sortSelect} - value={sortBy} - onChange={(e) => { - setSortBy(e.target.value as SortOption); - setCurrentPage(1); - }} - > - <option value="created">Newest</option> - <option value="upvotes">Most upvoted</option> - <option value="comments">Most commented</option> - </select> - </div> - <div className={styles.resultsInfo}> - Showing {startIndex + 1}-{Math.min(startIndex + itemsPerPage, sortedDiscussions.length)} of {sortedDiscussions.length} discussions - </div> - </div> - - <div className={styles.cardsGrid}> - {paginatedDiscussions.map((d) => ( - <div - key={d.id} - className={styles.card} - role="link" - tabIndex={0} - onClick={() => window.open(d.url, '_blank', 'noopener,noreferrer')} - onKeyDown={(e) => { if (e.key === 'Enter') window.open(d.url, '_blank', 'noopener,noreferrer'); }} - > - <div className={styles.voteColumn}> - <button - aria-label={`Open on GitHub to upvote`} - type="button" - className={styles.upvoteButton} - onClick={(e) => { - e.stopPropagation(); - window.open(d.url, '_blank', 'noopener,noreferrer'); - }} - > - <svg aria-hidden="true" height="16" width="16" viewBox="0 0 16 16" className={styles.upvoteIcon}> - <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z" /> - </svg> - <span className={styles.upvoteCount}>{(typeof d.upvotes === 'number' ? d.upvotes : 0) + 1}</span> - </button> - </div> - <div className={styles.cardMain}> - <div className={styles.cardHeader}> - <div className={styles.cardTitle}>{d.title}</div> - <div className={styles.metaRow}> - <a - className={styles.commentsLink} - href={d.url} - target="_blank" - rel="noreferrer noopener" - aria-label={`${d.comments} comments`} - onClick={(e) => e.stopPropagation()} - > - <svg aria-hidden="true" height="16" width="16" viewBox="0 0 16 16" className={styles.commentIcon}> - <path d="M1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 13.25 12H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 13.543V12H2.75A1.75 1.75 0 0 1 1 10.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> - </svg> - {d.comments} - </a> - {d.createdAt && ( - <time className={styles.createdAt} dateTime={d.createdAt}> - {new Date(d.createdAt).toLocaleDateString()} - </time> - )} - <span className={styles.metaSpacer} /> - {Array.isArray(d.labels) && d.labels.length > 0 && ( - <span className={styles.labelsRowInline}> - {d.labels.map((l) => ( - <span - key={l.name} - className={styles.labelChip} - style={l.color ? { ['--chip-bg' as any]: `#${l.color}` } : undefined} - > - {l.name} - </span> - ))} - </span> - )} - </div> - </div> - </div> - </div> - ))} - </div> - - {totalPages > 1 && ( - <div className={styles.pagination}> - <button - className={clsx(styles.paginationButton, { [styles.disabled]: currentPage === 1 })} - onClick={() => setCurrentPage(prev => Math.max(1, prev - 1))} - disabled={currentPage === 1} - > - Previous - </button> - - <div className={styles.paginationNumbers}> - {Array.from({ length: totalPages }, (_, i) => i + 1).map(page => ( - <button - key={page} - className={clsx(styles.paginationNumber, { [styles.active]: page === currentPage })} - onClick={() => setCurrentPage(page)} - > - {page} - </button> - ))} - </div> - - <button - className={clsx(styles.paginationButton, { [styles.disabled]: currentPage === totalPages })} - onClick={() => setCurrentPage(prev => Math.min(totalPages, prev + 1))} - disabled={currentPage === totalPages} - > - Next - </button> - </div> - )} - </div> - ); -} - -export default function RoadmapPage() { - const { siteConfig } = useDocusaurusContext(); - const pageTitle = 'Roadmap'; - const pageDescription = 'What we shipped, what we are building next, and what we plan to build.'; - - return ( - <Layout title={pageTitle} description={pageDescription}> - <main className={styles.container}> - <header className={styles.pageHeader}> - <h1 className={styles.pageTitle}>Roadmap</h1> - <p className={styles.pageSubtitle}>{pageDescription}</p> - </header> - - <SectionHeader>Last Shipped</SectionHeader> - <div className={styles.sectionList}> - {shippedFeatures.slice(0, 7).map((f: ShippedFeature) => ( - <FeatureCardClickable - key={f.id} - title={f.title} - description={f.description} - href={f.changelogPath} - labels={f.labels} - date={f.shippedAt} - target="_self" - /> - ))} - {shippedFeatures.length === 0 && ( - <div className={styles.empty}>No shipped items listed yet.</div> - )} - </div> - - <SectionHeader>In progress</SectionHeader> - <div className={styles.sectionList}> - {inProgressFeatures.map((f: PlannedFeature) => ( - <FeatureCardClickable - key={f.id} - title={f.title} - description={f.description} - href={f.githubUrl} - labels={f.labels} - /> - ))} - {inProgressFeatures.length === 0 && ( - <div className={styles.empty}>No in-progress items listed yet.</div> - )} - </div> - - <SectionHeader>Planned</SectionHeader> - <div className={styles.sectionList}> - {plannedFeatures.map((f: PlannedFeature) => ( - <FeatureCardClickable - key={f.id} - title={f.title} - description={f.description} - href={f.githubUrl} - labels={f.labels} - /> - ))} - {plannedFeatures.length === 0 && ( - <div className={styles.empty}>No planned items listed yet.</div> - )} - </div> - - <SectionHeader>Feature Requests</SectionHeader> - <p className={styles.discussionsIntro}> - Upvote or comment on the features you care about or request a new feature. - </p> - <div className={styles.actionsBar}> - <a - className={clsx('nav_primary_button', styles.primaryAction)} - href={NEW_DISCUSSION_URL} - target="_blank" - rel="noreferrer noopener" - > - Request a feature - </a> - </div> - <DiscussionsTable /> - </main> - </Layout> - ); -} - - diff --git a/docs/src/theme/Navbar/Content/index.tsx b/docs/src/theme/Navbar/Content/index.tsx deleted file mode 100644 index 60f1744e2d..0000000000 --- a/docs/src/theme/Navbar/Content/index.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import React from 'react'; -import {useThemeConfig, ErrorCauseBoundary} from '@docusaurus/theme-common'; -import { - splitNavbarItems, - useNavbarMobileSidebar, -} from '@docusaurus/theme-common/internal'; -import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem'; -import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; -import SearchBar from '@theme/SearchBar'; -import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle'; -import NavbarLogo from '@theme/Navbar/Logo'; -import NavbarSearch from '@theme/Navbar/Search'; - -import styles from './styles.module.css'; - -function useNavbarItems() { - return useThemeConfig().navbar.items as NavbarItemConfig[]; -} - -function NavbarItems({items}: {items: NavbarItemConfig[]}): JSX.Element { - return ( - <> - {items.map((item, i) => ( - <ErrorCauseBoundary - key={i} - onError={(error) => - new Error( - `A theme navbar item failed to render. -Please double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config: -${JSON.stringify(item, null, 2)}`, - {cause: error}, - ) - }> - <NavbarItem {...item} /> - </ErrorCauseBoundary> - ))} - </> - ); -} - -function NavbarContentLayout({ - left, - right, - mobileSidebarToggle, -}: { - left: React.ReactNode; - right: React.ReactNode; - mobileSidebarToggle: React.ReactNode; -}) { - return ( - <div className="navbar__inner"> - {/* First Row: Logo, Search, Actions */} - <div className={styles.navbarTopRow}> - <div className={styles.navbarLeft}> - {mobileSidebarToggle} - <NavbarLogo /> - </div> - <div className={styles.navbarCenter}> - <NavbarSearch> - <SearchBar /> - </NavbarSearch> - </div> - <div className={styles.navbarRight}>{right}</div> - </div> - - {/* Second Row: Navigation Links */} - <div className={styles.navbarBottomRow}> - <div className={styles.navbarLinks}>{left}</div> - </div> - </div> - ); -} - -export default function NavbarContent(): JSX.Element { - const mobileSidebar = useNavbarMobileSidebar(); - - const items = useNavbarItems(); - const [leftItems, rightItems] = splitNavbarItems(items); - - // Filter out search from right items as we're placing it in center - const filteredRightItems = rightItems.filter( - (item) => item.type !== 'search', - ); - - // All left items go to bottom row (Docs, Tutorials, Reference, etc.) - const navLinks = leftItems; - - return ( - <NavbarContentLayout - mobileSidebarToggle={ - !mobileSidebar.disabled ? <NavbarMobileSidebarToggle /> : null - } - left={ - <> - <NavbarItems items={navLinks} /> - </> - } - right={ - <> - <NavbarItems items={filteredRightItems} /> - <NavbarColorModeToggle className={styles.colorModeToggle} /> - </> - } - /> - ); -} diff --git a/docs/src/theme/Navbar/Content/styles.module.css b/docs/src/theme/Navbar/Content/styles.module.css deleted file mode 100644 index 00c9021535..0000000000 --- a/docs/src/theme/Navbar/Content/styles.module.css +++ /dev/null @@ -1,98 +0,0 @@ -/* Two-row navbar layout */ -.navbarTopRow { - display: flex; - align-items: center; - justify-content: space-between; - height: 56px; -} - -.navbarBottomRow { - display: flex; - align-items: center; - height: 48px; -} - -.navbarLeft { - display: flex; - align-items: center; - flex: 0 0 auto; -} - -.navbarCenter { - display: flex; - align-items: center; - justify-content: center; - flex: 1 1 auto; - max-width: 740px; - margin: 0 auto; -} - -.navbarRight { - display: flex; - align-items: center; - flex: 0 0 auto; - justify-content: flex-end; -} - -.navbarLinks { - display: flex; - align-items: center; -} - -.colorModeToggle { - margin-left: 0; -} - -/* Mobile responsive - single row layout */ -@media (max-width: 996px) { - .navbarTopRow { - height: auto; - } - - .navbarLeft { - flex: 0 0 auto; - display: flex; - align-items: center; - gap: 0.5rem; - } - - .navbarCenter { - flex: 1; - display: flex; - align-items: center; - justify-content: flex-end; - max-width: none; - margin: 0; - } - - .navbarRight { - display: none; - } - - .navbarBottomRow { - display: none; - } - - .navbarLinks { - display: none; - } -} - -/* Adjust search bar styling within the center area */ -.navbarCenter :global(.navbar__search) { - flex: 1 1 auto; - display: flex; -} - -.navbarCenter :global(.DocSearch) { - flex: 1 1 auto; - display: flex; -} - -/* On mobile, reset search bar width constraints */ -@media (max-width: 996px) { - .navbarCenter :global(.DocSearch-Button) { - min-width: auto !important; - max-width: none !important; - } -} diff --git a/docs/src/theme/Navbar/Layout/index.tsx b/docs/src/theme/Navbar/Layout/index.tsx deleted file mode 100644 index e2539ed0eb..0000000000 --- a/docs/src/theme/Navbar/Layout/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import clsx from 'clsx'; -import {useThemeConfig} from '@docusaurus/theme-common'; -import { - useHideableNavbar, - useNavbarMobileSidebar, -} from '@docusaurus/theme-common/internal'; -import {translate} from '@docusaurus/Translate'; -import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar'; -import type {Props} from '@theme/Navbar/Layout'; - -import styles from './styles.module.css'; - -function NavbarBackdrop(props: React.ComponentProps<'div'>) { - return ( - <div - role="presentation" - {...props} - className={clsx('navbar-sidebar__backdrop', props.className)} - /> - ); -} - -export default function NavbarLayout({children}: Props): JSX.Element { - const { - navbar: {hideOnScroll, style}, - } = useThemeConfig(); - const mobileSidebar = useNavbarMobileSidebar(); - const {navbarRef, isNavbarVisible} = useHideableNavbar(hideOnScroll); - return ( - <nav - ref={navbarRef} - aria-label={translate({ - id: 'theme.NavBar.navAriaLabel', - message: 'Main', - description: 'The ARIA label for the main navigation', - })} - className={clsx( - 'navbar', - 'navbar--fixed-top', - 'two-row-navbar', - hideOnScroll && [ - styles.navbarHideable, - !isNavbarVisible && styles.navbarHidden, - ], - { - 'navbar--dark': style === 'dark', - 'navbar--primary': style === 'primary', - 'navbar-sidebar--show': mobileSidebar.shown, - }, - )}> - {children} - <NavbarBackdrop onClick={mobileSidebar.toggle} /> - <NavbarMobileSidebar /> - </nav> - ); -} diff --git a/docs/src/theme/Navbar/Layout/styles.module.css b/docs/src/theme/Navbar/Layout/styles.module.css deleted file mode 100644 index e72891a44f..0000000000 --- a/docs/src/theme/Navbar/Layout/styles.module.css +++ /dev/null @@ -1,7 +0,0 @@ -.navbarHideable { - transition: transform var(--ifm-transition-fast) ease; -} - -.navbarHidden { - transform: translate3d(0, calc(-100% - 2px), 0); -} diff --git a/docs/src/theme/Navbar/index.tsx b/docs/src/theme/Navbar/index.tsx deleted file mode 100644 index a9b61f1ee5..0000000000 --- a/docs/src/theme/Navbar/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import NavbarLayout from '@theme/Navbar/Layout'; -import NavbarContent from '@theme/Navbar/Content'; - -export default function Navbar(): JSX.Element { - return ( - <NavbarLayout> - <NavbarContent /> - </NavbarLayout> - ); -} diff --git a/docs/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx b/docs/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx deleted file mode 100644 index 24bdd79f92..0000000000 --- a/docs/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import NavbarNavLink from "@theme/NavbarItem/NavbarNavLink"; - -import type { ExtendedNavbarItemProps, IconConfig } from ".."; -import { NavIcon } from "@site/src/icons/library"; -import styles from "../styles.module.css"; - -type DesktopNavbarItemProps = ExtendedNavbarItemProps & { - className?: string; - isDropdownItem?: boolean; -}; - -function renderLabel( - label: React.ReactNode, - icon?: IconConfig -): React.ReactNode { - if (!icon) { - return label; - } - - return ( - <span className={styles.labelWithIcon}> - <NavIcon {...icon} className={styles.icon} /> - <span className={styles.text}>{label}</span> - </span> - ); -} - -export default function DefaultNavbarItemDesktop({ - className, - isDropdownItem = false, - customProps, - label, - html, - ...props -}: DesktopNavbarItemProps) { - const icon = customProps?.icon as IconConfig | undefined; - const shouldUseRawLabel = Boolean(html) || label === undefined; - const linkLabel = shouldUseRawLabel ? label : renderLabel(label, icon); - - const element = ( - <NavbarNavLink - className={clsx( - isDropdownItem ? "dropdown__link" : "navbar__item navbar__link", - styles.navItem, - className - )} - isDropdownLink={isDropdownItem} - label={html ? undefined : linkLabel} - html={html} - {...props} - /> - ); - - if (isDropdownItem) { - return <li>{element}</li>; - } - - return element; -} diff --git a/docs/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx b/docs/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx deleted file mode 100644 index c6575916b5..0000000000 --- a/docs/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import NavbarNavLink from "@theme/NavbarItem/NavbarNavLink"; - -import type { ExtendedNavbarItemProps, IconConfig } from ".."; -import { NavIcon } from "@site/src/icons/library"; -import styles from "../styles.module.css"; - -type MobileNavbarItemProps = ExtendedNavbarItemProps & { - className?: string; - isDropdownItem?: boolean; -}; - -function renderLabel( - label: React.ReactNode, - icon?: IconConfig -): React.ReactNode { - if (!icon) { - return label; - } - - return ( - <span className={styles.labelWithIcon}> - <NavIcon {...icon} className={styles.icon} /> - <span className={styles.text}>{label}</span> - </span> - ); -} - -export default function DefaultNavbarItemMobile({ - className, - customProps, - label, - html, - ...props -}: MobileNavbarItemProps) { - const icon = customProps?.icon as IconConfig | undefined; - const shouldUseRawLabel = Boolean(html) || label === undefined; - const linkLabel = shouldUseRawLabel ? label : renderLabel(label, icon); - - return ( - <li className="menu__list-item"> - <NavbarNavLink - className={clsx("menu__link", styles.navItem, className)} - label={html ? undefined : linkLabel} - html={html} - {...props} - /> - </li> - ); -} diff --git a/docs/src/theme/NavbarItem/DefaultNavbarItem/index.tsx b/docs/src/theme/NavbarItem/DefaultNavbarItem/index.tsx deleted file mode 100644 index 825ceaa899..0000000000 --- a/docs/src/theme/NavbarItem/DefaultNavbarItem/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; -import DefaultNavbarItemMobile from "./Mobile"; -import DefaultNavbarItemDesktop from "./Desktop"; - -export type IconConfig = { - name: string; - library?: string; -}; - -export type ExtendedNavbarItemProps = { - mobile?: boolean; - customProps?: { - icon?: IconConfig; - [key: string]: unknown; - }; - label?: React.ReactNode; - html?: string; - [key: string]: unknown; -}; - -export default function DefaultNavbarItem({ - mobile = false, - position, // Avoid passing position on to DOM elements - ...props -}: ExtendedNavbarItemProps) { - const Comp = mobile ? DefaultNavbarItemMobile : DefaultNavbarItemDesktop; - - return ( - <Comp - {...props} - activeClassName={ - props.activeClassName ?? - (mobile ? "menu__link--active" : "navbar__link--active") - } - /> - ); -} diff --git a/docs/src/theme/NavbarItem/DefaultNavbarItem/styles.module.css b/docs/src/theme/NavbarItem/DefaultNavbarItem/styles.module.css deleted file mode 100644 index 7d3b42e8ae..0000000000 --- a/docs/src/theme/NavbarItem/DefaultNavbarItem/styles.module.css +++ /dev/null @@ -1,20 +0,0 @@ -.labelWithIcon { - display: inline-flex; - align-items: center; - gap: 0.4rem; -} - -.icon { - display: inline-flex; -} - -.text { - display: inline-block; - line-height: 1.2; -} - -.navItem { - display: inline-flex; - align-items: center; - gap: 0.4rem; -} diff --git a/docs/src/theme/ResponseSamples/index.tsx b/docs/src/theme/ResponseSamples/index.tsx deleted file mode 100644 index 65184088d7..0000000000 --- a/docs/src/theme/ResponseSamples/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from "react"; -import CodeBlock from "@theme/CodeBlock"; - -type ResponseSamplesProps = { - responseExample?: string | Record<string, unknown> | Array<unknown>; - language?: string; - title?: string; - className?: string; -}; - -function formatExample( - example: ResponseSamplesProps["responseExample"] -): string { - if (example == null) { - return ""; - } - - if (typeof example === "string") { - return example; - } - - try { - return JSON.stringify(example, null, 2); - } catch (error) { - console.warn("Failed to stringify responseExample:", error); - return ""; - } -} - -export default function ResponseSamples({ - responseExample, - language = "json", - title, - className, -}: ResponseSamplesProps) { - const formattedExample = formatExample(responseExample); - - if (!formattedExample) { - return null; - } - - return ( - <CodeBlock language={language} title={title} className={className}> - {formattedExample} - </CodeBlock> - ); -} diff --git a/docs/static/examples/sentiment140_first50.csv b/docs/static/examples/sentiment140_first50.csv deleted file mode 100644 index c8321a8598..0000000000 --- a/docs/static/examples/sentiment140_first50.csv +++ /dev/null @@ -1,51 +0,0 @@ -correct_answer,tweet -negative,"@switchfoot http://twitpic.com/2y1zl - Awww, that's a bummer. You shoulda got David Carr of Third Day to do it. ;D" -negative,is upset that he can't update his Facebook by texting it... and might cry as a result School today also. Blah! -negative,@Kenichan I dived many times for the ball. Managed to save 50% The rest go out of bounds -negative,my whole body feels itchy and like its on fire -negative,"@nationwideclass no, it's not behaving at all. i'm mad. why am i here? because I can't see you all over there. " -negative,@Kwesidei not the whole crew -negative,Need a hug -negative,"@LOLTrish hey long time no see! Yes.. Rains a bit ,only a bit LOL , I'm fine thanks , how's you ?" -negative,@Tatiana_K nope they didn't have it -negative,@twittera que me muera ? -negative,spring break in plain city... it's snowing -negative,I just re-pierced my ears -negative,@caregiving I couldn't bear to watch it. And I thought the UA loss was embarrassing . . . . . -negative,"@octolinz16 It it counts, idk why I did either. you never talk to me anymore " -negative,"@smarrison i would've been the first, but i didn't have a gun. not really though, zac snyder's just a doucheclown." -negative,@iamjazzyfizzle I wish I got to watch it with you!! I miss you and @iamlilnicki how was the premiere?! -negative,Hollis' death scene will hurt me severely to watch on film wry is directors cut not out now? -negative,about to file taxes -negative,@LettyA ahh ive always wanted to see rent love the soundtrack!! -negative,@FakerPattyPattz Oh dear. Were you drinking out of the forgotten table drinks? -negative,@alydesigns i was out most of the day so didn't get much done -negative,"one of my friend called me, and asked to meet with her at Mid Valley today...but i've no time *sigh* " -negative,@angry_barista I baked you a cake but I ated it -negative,this week is not going as i had hoped -negative,blagh class at 8 tomorrow -negative,I hate when I have to call and wake people up -negative,Just going to cry myself to sleep after watching Marley and Me. -negative,im sad now Miss.Lilly -negative,ooooh.... LOL that leslie.... and ok I won't do it again so leslie won't get mad again -negative,Meh... Almost Lover is the exception... this track gets me depressed every time. -negative,some1 hacked my account on aim now i have to make a new one -negative,@alielayus I want to go to promote GEAR AND GROOVE but unfornately no ride there I may b going to the one in Anaheim in May though -negative,thought sleeping in was an option tomorrow but realizing that it now is not. evaluations in the morning and work in the afternoon! -negative,@julieebaby awe i love you too!!!! 1 am here i miss you -negative,@HumpNinja I cry my asian eyes to sleep at night -negative,ok I'm sick and spent an hour sitting in the shower cause I was too sick to stand and held back the puke like a champ. BED now -negative,@cocomix04 ill tell ya the story later not a good day and ill be workin for like three more hours... -negative,@MissXu sorry! bed time came here (GMT+1) http://is.gd/fNge -negative,@fleurylis I don't either. Its depressing. I don't think I even want to know about the kids in suitcases. -negative,Bed. Class 8-12. Work 12-3. Gym 3-5 or 6. Then class 6-10. Another day that's gonna fly by. I miss my girlfriend -negative,really don't feel like getting up today... but got to study to for tomorrows practical exam... -negative,He's the reason for the teardrops on my guitar the only one who has enough of me to break my heart -negative,"Sad, sad, sad. I don't know why but I hate this feeling I wanna sleep and I still can't!" -negative,@JonathanRKnight Awww I soo wish I was there to see you finally comfortable! Im sad that I missed it -negative,Falling asleep. Just heard about that Tracy girl's body being found. How sad My heart breaks for that family. -negative,@Viennah Yay! I'm happy for you with your job! But that also means less time for me and you... -negative,"Just checked my user timeline on my blackberry, it looks like the twanking is still happening Are ppl still having probs w/ BGs and UIDs?" -negative,Oh man...was ironing @jeancjumbe's fave top to wear to a meeting. Burnt it -negative,is strangely sad about LiLo and SamRo breaking up. -negative,@tea oh! i'm so sorry i didn't think about that before retweeting. diff --git a/docs/static/images/Agenta-logo-full-dark-accent.png b/docs/static/images/Agenta-logo-full-dark-accent.png deleted file mode 100644 index a270afc094..0000000000 Binary files a/docs/static/images/Agenta-logo-full-dark-accent.png and /dev/null differ diff --git a/docs/static/images/Agenta-logo-full-light.png b/docs/static/images/Agenta-logo-full-light.png deleted file mode 100644 index bddc2359bd..0000000000 Binary files a/docs/static/images/Agenta-logo-full-light.png and /dev/null differ diff --git a/docs/static/images/changelog/agenta_askai.png b/docs/static/images/changelog/agenta_askai.png deleted file mode 100644 index eee2ba8ff0..0000000000 Binary files a/docs/static/images/changelog/agenta_askai.png and /dev/null differ diff --git a/docs/static/images/changelog/agenta_dspy.png b/docs/static/images/changelog/agenta_dspy.png deleted file mode 100644 index ea3d16b89f..0000000000 Binary files a/docs/static/images/changelog/agenta_dspy.png and /dev/null differ diff --git a/docs/static/images/changelog/agenta_llamaindex.png b/docs/static/images/changelog/agenta_llamaindex.png deleted file mode 100644 index e804558728..0000000000 Binary files a/docs/static/images/changelog/agenta_llamaindex.png and /dev/null differ diff --git a/docs/static/images/changelog/changelog-annotation-filter.png b/docs/static/images/changelog/changelog-annotation-filter.png deleted file mode 100644 index 172c97eac5..0000000000 Binary files a/docs/static/images/changelog/changelog-annotation-filter.png and /dev/null differ diff --git a/docs/static/images/changelog/changelog-filters-observability.png b/docs/static/images/changelog/changelog-filters-observability.png deleted file mode 100644 index 6a2da97c18..0000000000 Binary files a/docs/static/images/changelog/changelog-filters-observability.png and /dev/null differ diff --git a/docs/static/images/dark-complete-transparent-CROPPED.png b/docs/static/images/dark-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..df1ed7e261 Binary files /dev/null and b/docs/static/images/dark-complete-transparent-CROPPED.png differ diff --git a/docs/static/images/dark-logo.svg b/docs/static/images/dark-logo.svg new file mode 100644 index 0000000000..6cb8ef3330 --- /dev/null +++ b/docs/static/images/dark-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="9eaf1304b2"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#9eaf1304b2)"><path fill="#00ff19" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/docs/static/images/evaluation/comparing-evaluations.gif b/docs/static/images/evaluation/comparing-evaluations.gif new file mode 100644 index 0000000000..87cfd4b4f6 Binary files /dev/null and b/docs/static/images/evaluation/comparing-evaluations.gif differ diff --git a/docs/static/images/evaluation/comparing-evaluations.png b/docs/static/images/evaluation/comparing-evaluations.png deleted file mode 100644 index 6031a4cd6b..0000000000 Binary files a/docs/static/images/evaluation/comparing-evaluations.png and /dev/null differ diff --git a/docs/static/images/evaluation/comparison-view-configuration.png b/docs/static/images/evaluation/comparison-view-configuration.png deleted file mode 100644 index ae9c692e9e..0000000000 Binary files a/docs/static/images/evaluation/comparison-view-configuration.png and /dev/null differ diff --git a/docs/static/images/evaluation/comparison-view-drawer.png b/docs/static/images/evaluation/comparison-view-drawer.png deleted file mode 100644 index 3bd4b21c40..0000000000 Binary files a/docs/static/images/evaluation/comparison-view-drawer.png and /dev/null differ diff --git a/docs/static/images/evaluation/comparison-view-testset.png b/docs/static/images/evaluation/comparison-view-testset.png deleted file mode 100644 index e45b8eb4f2..0000000000 Binary files a/docs/static/images/evaluation/comparison-view-testset.png and /dev/null differ diff --git a/docs/static/images/evaluation/configure-evaluators-1.png b/docs/static/images/evaluation/configure-evaluators-1.png index b202b1e5ec..fc61f18144 100644 Binary files a/docs/static/images/evaluation/configure-evaluators-1.png and b/docs/static/images/evaluation/configure-evaluators-1.png differ diff --git a/docs/static/images/evaluation/configure-evaluators-3.png b/docs/static/images/evaluation/configure-evaluators-3.png index 5c8f8001ac..5e36236191 100644 Binary files a/docs/static/images/evaluation/configure-evaluators-3.png and b/docs/static/images/evaluation/configure-evaluators-3.png differ diff --git a/docs/static/images/evaluation/detailed-evaluation-drawer.png b/docs/static/images/evaluation/detailed-evaluation-drawer.png deleted file mode 100644 index e4c131ca30..0000000000 Binary files a/docs/static/images/evaluation/detailed-evaluation-drawer.png and /dev/null differ diff --git a/docs/static/images/evaluation/detailed-evaluation-results.png b/docs/static/images/evaluation/detailed-evaluation-results.png index 0c40be89a2..e72e4715bc 100644 Binary files a/docs/static/images/evaluation/detailed-evaluation-results.png and b/docs/static/images/evaluation/detailed-evaluation-results.png differ diff --git a/docs/static/images/evaluation/evaluate-sdk.png b/docs/static/images/evaluation/evaluate-sdk.png new file mode 100644 index 0000000000..dc91bc0379 Binary files /dev/null and b/docs/static/images/evaluation/evaluate-sdk.png differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/01-evaluation-ui-prompt.png b/docs/static/images/evaluation/evaluation-from-ui/01-evaluation-ui-prompt.png deleted file mode 100644 index 151caefb2e..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/01-evaluation-ui-prompt.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/02-running-evaluation.png b/docs/static/images/evaluation/evaluation-from-ui/02-running-evaluation.png deleted file mode 100644 index 28ff95d629..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/02-running-evaluation.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/03-results-overview.png b/docs/static/images/evaluation/evaluation-from-ui/03-results-overview.png deleted file mode 100644 index 21828bab9d..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/03-results-overview.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/04-results-testcase.png b/docs/static/images/evaluation/evaluation-from-ui/04-results-testcase.png deleted file mode 100644 index 7cacec545e..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/04-results-testcase.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/05-results-testcase-drawer.png b/docs/static/images/evaluation/evaluation-from-ui/05-results-testcase-drawer.png deleted file mode 100644 index 21ae52e5b9..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/05-results-testcase-drawer.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-from-ui/06-comparison-view.png b/docs/static/images/evaluation/evaluation-from-ui/06-comparison-view.png deleted file mode 100644 index b3abf9af9b..0000000000 Binary files a/docs/static/images/evaluation/evaluation-from-ui/06-comparison-view.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluation-prompt-config.png b/docs/static/images/evaluation/evaluation-prompt-config.png deleted file mode 100644 index 6d94eaa57d..0000000000 Binary files a/docs/static/images/evaluation/evaluation-prompt-config.png and /dev/null differ diff --git a/docs/static/images/evaluation/evaluators-inout.png b/docs/static/images/evaluation/evaluators-inout.png new file mode 100644 index 0000000000..1cd8bc76ff Binary files /dev/null and b/docs/static/images/evaluation/evaluators-inout.png differ diff --git a/docs/static/images/evaluation/human-evaluation/configuring-evaluators.png b/docs/static/images/evaluation/human-evaluation/configuring-evaluators.png deleted file mode 100644 index 117694e912..0000000000 Binary files a/docs/static/images/evaluation/human-evaluation/configuring-evaluators.png and /dev/null differ diff --git a/docs/static/images/evaluation/human-evaluation/human-evaluation-config-1.png b/docs/static/images/evaluation/human-evaluation/human-evaluation-config-1.png deleted file mode 100644 index 82dd8f9f90..0000000000 Binary files a/docs/static/images/evaluation/human-evaluation/human-evaluation-config-1.png and /dev/null differ diff --git a/docs/static/images/evaluation/human-evaluation/human-evaluation-view.png b/docs/static/images/evaluation/human-evaluation/human-evaluation-view.png deleted file mode 100644 index c075f4a45a..0000000000 Binary files a/docs/static/images/evaluation/human-evaluation/human-evaluation-view.png and /dev/null differ diff --git a/docs/static/images/evaluation/human-evaluation/starting-human-evaluation.png b/docs/static/images/evaluation/human-evaluation/starting-human-evaluation.png deleted file mode 100644 index c83f886e41..0000000000 Binary files a/docs/static/images/evaluation/human-evaluation/starting-human-evaluation.png and /dev/null differ diff --git a/docs/static/images/evaluation/new-evaluation-modal.png b/docs/static/images/evaluation/new-evaluation-modal.png index 309ce88c90..cb805118e8 100644 Binary files a/docs/static/images/evaluation/new-evaluation-modal.png and b/docs/static/images/evaluation/new-evaluation-modal.png differ diff --git a/docs/static/images/evaluation/overview-results.png b/docs/static/images/evaluation/overview-results.png deleted file mode 100644 index 640bb31abc..0000000000 Binary files a/docs/static/images/evaluation/overview-results.png and /dev/null differ diff --git a/docs/static/images/evaluation/start-new-evaluation.png b/docs/static/images/evaluation/start-new-evaluation.png index 5d77da863d..a26a72a045 100644 Binary files a/docs/static/images/evaluation/start-new-evaluation.png and b/docs/static/images/evaluation/start-new-evaluation.png differ diff --git a/docs/static/images/favicon.ico b/docs/static/images/favicon.ico index dad02fe072..4dc8619b1d 100644 Binary files a/docs/static/images/favicon.ico and b/docs/static/images/favicon.ico differ diff --git a/docs/static/images/getting-started-ui-screenshots/00_provide_openapi_token.png b/docs/static/images/getting-started-ui-screenshots/00_provide_openapi_token.png new file mode 100644 index 0000000000..28454049a7 Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/00_provide_openapi_token.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/01_create_new_app.png b/docs/static/images/getting-started-ui-screenshots/01_create_new_app.png index 0a07171145..d660ac0156 100644 Binary files a/docs/static/images/getting-started-ui-screenshots/01_create_new_app.png and b/docs/static/images/getting-started-ui-screenshots/01_create_new_app.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/02_select_model.png b/docs/static/images/getting-started-ui-screenshots/02_select_model.png deleted file mode 100644 index d2886aabe2..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/02_select_model.png and /dev/null differ diff --git a/docs/static/images/getting-started-ui-screenshots/02_select_template.png b/docs/static/images/getting-started-ui-screenshots/02_select_template.png new file mode 100644 index 0000000000..988b21bb3f Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/02_select_template.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/03_1_create_new_variant.png b/docs/static/images/getting-started-ui-screenshots/03_1_create_new_variant.png new file mode 100644 index 0000000000..9093fbbe58 Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/03_1_create_new_variant.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/03_2_testing_in_playground.png b/docs/static/images/getting-started-ui-screenshots/03_2_testing_in_playground.png new file mode 100644 index 0000000000..4eae10e3b6 Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/03_2_testing_in_playground.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/03_commit.png b/docs/static/images/getting-started-ui-screenshots/03_commit.png deleted file mode 100644 index a3d0bea4b5..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/03_commit.png and /dev/null differ diff --git a/docs/static/images/getting-started-ui-screenshots/03_playground.png b/docs/static/images/getting-started-ui-screenshots/03_playground.png new file mode 100644 index 0000000000..54ec231e82 Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/03_playground.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/04_add_correct_answer_to_testset.png b/docs/static/images/getting-started-ui-screenshots/04_add_correct_answer_to_testset.png new file mode 100644 index 0000000000..5342724a6f Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/04_add_correct_answer_to_testset.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/04_add_to_test_set.png b/docs/static/images/getting-started-ui-screenshots/04_add_to_test_set.png deleted file mode 100644 index 7eb8977958..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/04_add_to_test_set.png and /dev/null differ diff --git a/docs/static/images/getting-started-ui-screenshots/05_1_wrong_Evaluation.png b/docs/static/images/getting-started-ui-screenshots/05_1_wrong_Evaluation.png new file mode 100644 index 0000000000..1f00d33ef0 Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/05_1_wrong_Evaluation.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/05_evaluation_selection.png b/docs/static/images/getting-started-ui-screenshots/05_evaluation_selection.png new file mode 100644 index 0000000000..16748b45bf Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/05_evaluation_selection.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/05_new_evaluation.png b/docs/static/images/getting-started-ui-screenshots/05_new_evaluation.png deleted file mode 100644 index 5dac19fe15..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/05_new_evaluation.png and /dev/null differ diff --git a/docs/static/images/getting-started-ui-screenshots/06_deploy.png b/docs/static/images/getting-started-ui-screenshots/06_deploy.png deleted file mode 100644 index 1d73a1e1ff..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/06_deploy.png and /dev/null differ diff --git a/docs/static/images/getting-started-ui-screenshots/06_deployment.png b/docs/static/images/getting-started-ui-screenshots/06_deployment.png new file mode 100644 index 0000000000..075188c52f Binary files /dev/null and b/docs/static/images/getting-started-ui-screenshots/06_deployment.png differ diff --git a/docs/static/images/getting-started-ui-screenshots/07_observability.png b/docs/static/images/getting-started-ui-screenshots/07_observability.png deleted file mode 100644 index e62a0b761d..0000000000 Binary files a/docs/static/images/getting-started-ui-screenshots/07_observability.png and /dev/null differ diff --git a/docs/static/images/google_collab.png b/docs/static/images/google_collab.png deleted file mode 100644 index c5b77f1626..0000000000 Binary files a/docs/static/images/google_collab.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-openinference-agno-trace.png b/docs/static/images/integrations/agenta-openinference-agno-trace.png deleted file mode 100644 index 204c694f7a..0000000000 Binary files a/docs/static/images/integrations/agenta-openinference-agno-trace.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-openinference-dspy-trace.png b/docs/static/images/integrations/agenta-openinference-dspy-trace.png deleted file mode 100644 index 0d07a08c5b..0000000000 Binary files a/docs/static/images/integrations/agenta-openinference-dspy-trace.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-openinference-langgraph-trace.png b/docs/static/images/integrations/agenta-openinference-langgraph-trace.png deleted file mode 100644 index 93a3542074..0000000000 Binary files a/docs/static/images/integrations/agenta-openinference-langgraph-trace.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-openinference-llamaindex-trace.png b/docs/static/images/integrations/agenta-openinference-llamaindex-trace.png deleted file mode 100644 index eaac5064c5..0000000000 Binary files a/docs/static/images/integrations/agenta-openinference-llamaindex-trace.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-openinference-openai-agents-trace.png b/docs/static/images/integrations/agenta-openinference-openai-agents-trace.png deleted file mode 100644 index d8a7f67952..0000000000 Binary files a/docs/static/images/integrations/agenta-openinference-openai-agents-trace.png and /dev/null differ diff --git a/docs/static/images/integrations/agenta-pydanticai-logfire-trace.png b/docs/static/images/integrations/agenta-pydanticai-logfire-trace.png deleted file mode 100644 index d9291b726e..0000000000 Binary files a/docs/static/images/integrations/agenta-pydanticai-logfire-trace.png and /dev/null differ diff --git a/docs/static/images/light-complete-transparent-CROPPED.png b/docs/static/images/light-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..6be2e99e08 Binary files /dev/null and b/docs/static/images/light-complete-transparent-CROPPED.png differ diff --git a/docs/static/images/light-logo.svg b/docs/static/images/light-logo.svg new file mode 100644 index 0000000000..9c795f8e88 --- /dev/null +++ b/docs/static/images/light-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="74817b5f98"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#74817b5f98)"><path fill="#000000" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/docs/static/images/observability/observability-mockup.png b/docs/static/images/observability/observability-mockup.png deleted file mode 100644 index 9df9e7c022..0000000000 Binary files a/docs/static/images/observability/observability-mockup.png and /dev/null differ diff --git a/docs/static/images/observability/observability_quickstart.png b/docs/static/images/observability/observability_quickstart.png deleted file mode 100644 index 128a1dee28..0000000000 Binary files a/docs/static/images/observability/observability_quickstart.png and /dev/null differ diff --git a/docs/static/images/prompt_management/deploy-api.gif b/docs/static/images/prompt_management/deploy-api.gif index 9438605d5e..e7a367b9af 100644 Binary files a/docs/static/images/prompt_management/deploy-api.gif and b/docs/static/images/prompt_management/deploy-api.gif differ diff --git a/docs/static/images/social-card.png b/docs/static/images/social-card.png index 49fe2b893e..d62f2f99b9 100644 Binary files a/docs/static/images/social-card.png and b/docs/static/images/social-card.png differ diff --git a/ee/LICENSE b/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/examples/jupyter/capture_user_feedback.ipynb b/examples/jupyter/capture_user_feedback.ipynb index a8dcb2e146..9693d437ef 100644 --- a/examples/jupyter/capture_user_feedback.ipynb +++ b/examples/jupyter/capture_user_feedback.ipynb @@ -75,9 +75,7 @@ "# Note: Replace these with your actual API keys\n", "\n", "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key_here\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Use your self-hosted URL if applicable\n", + "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Use your self-hosted URL if applicable\n", "os.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key_here\"" ] }, @@ -122,13 +120,13 @@ "source": [ "def annotate(trace_id, span_id, annotation, evaluator_slug):\n", " \"\"\"Create an annotation for a specific trace/span with evaluation data.\n", - "\n", + " \n", " Args:\n", " trace_id: The ID of the trace to annotate\n", " span_id: The ID of the span to annotate\n", " annotation: Dictionary containing evaluation data (scores, comments, etc.)\n", " evaluator_slug: Identifier for the evaluator (creates one if it doesn't exist)\n", - "\n", + " \n", " Returns:\n", " The annotation response data if successful, None otherwise\n", " \"\"\"\n", @@ -142,12 +140,8 @@ " annotation_data = {\n", " \"annotation\": {\n", " \"data\": {\"outputs\": annotation}, # Your feedback data goes here\n", - " \"references\": {\n", - " \"evaluator\": {\"slug\": evaluator_slug}\n", - " }, # Evaluator reference\n", - " \"links\": {\n", - " \"invocation\": {\"trace_id\": trace_id, \"span_id\": span_id}\n", - " }, # Link to the trace\n", + " \"references\": {\"evaluator\": {\"slug\": evaluator_slug}}, # Evaluator reference\n", + " \"links\": {\"invocation\": {\"trace_id\": trace_id, \"span_id\": span_id}}, # Link to the trace\n", " }\n", " }\n", "\n", @@ -213,10 +207,10 @@ "@ag.instrument() # This decorator creates a root span for tracking the entire function\n", "def generate(topic: str):\n", " \"\"\"Generate a story about the given topic and add feedback as an annotation.\n", - "\n", + " \n", " Args:\n", " topic: The subject of the story to generate\n", - "\n", + " \n", " Returns:\n", " The generated story text\n", " \"\"\"\n", @@ -234,35 +228,34 @@ " },\n", " ],\n", " )\n", - "\n", + " \n", " # In a real application, you would obtain trace_id and span_id dynamically\n", " # using one of these methods:\n", - "\n", + " \n", " # Method 1: Get the current span context\n", " # span_ctx = ag.tracing.get_span_context()\n", " # trace_id = f\"{span_ctx.trace_id:032x}\" # Format as hexadecimal\n", " # span_id = f\"{span_ctx.span_id:016x}\" # Format as hexadecimal\n", - "\n", + " \n", " # Method 2: Use the helper function\n", " link = ag.tracing.build_invocation_link()\n", " trace_id = link.trace_id\n", " span_id = link.span_id\n", - "\n", + " \n", " # Add feedback annotation (simulating user feedback)\n", " annotate(\n", " trace_id=trace_id,\n", " span_id=span_id,\n", " annotation={\n", - " \"score\": 5, # Numerical score (1-5)\n", - " \"comment\": \"This is a comment\", # Text feedback\n", + " \"score\": 5, # Numerical score (1-5)\n", + " \"comment\": \"This is a comment\" # Text feedback\n", " },\n", - " evaluator_slug=\"score-evaluator\", # Creates this evaluator if it doesn't exist\n", - " )\n", - "\n", + " evaluator_slug=\"score-evaluator\" # Creates this evaluator if it doesn't exist\n", + " ) \n", + " \n", " # Return the generated story\n", " return response.choices[0].message.content\n", "\n", - "\n", "# Test our function by generating a story about AI\n", "generate(topic=\"AI\")" ] diff --git a/examples/jupyter/evaluations_with_sdk.ipynb b/examples/jupyter/evaluations_with_sdk.ipynb index 74e3d9ff9e..1c3e91069d 100644 --- a/examples/jupyter/evaluations_with_sdk.ipynb +++ b/examples/jupyter/evaluations_with_sdk.ipynb @@ -9,7 +9,7 @@ "\n", "We will do the following:\n", "\n", - "- Create a testset\n", + "- Create a test set\n", "- Create and configure an evaluator\n", "- Run an evaluation\n", "- Retrieve the results of evaluations\n", @@ -18,7 +18,7 @@ "\n", "\n", "### Architectural Overview:\n", - "In this scenario, evaluations are executed on the Agenta backend. Specifically, Agenta invokes the LLM application for each row in the testset and subsequently processes the output using the designated evaluator. \n", + "In this scenario, evaluations are executed on the Agenta backend. Specifically, Agenta invokes the LLM application for each row in the test set and subsequently processes the output using the designated evaluator. \n", "This operation is managed through Celery tasks. The interactions with the LLM application are asynchronous, batched, and include retry mechanisms. Additionally, the batching configuration can be adjusted to avoid exceeding the rate limits imposed by the LLM provider.\n" ] }, @@ -84,7 +84,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Create a testset" + "## Create a test set" ] }, { @@ -101,9 +101,9 @@ "]\n", "\n", "response = client.testsets.create_testset(\n", - " request=NewTestset(name=\"testset\", csvdata=csvdata)\n", + " request=NewTestset(name=\"test set\", csvdata=csvdata)\n", ")\n", - "testset_id = response.id\n", + "test_set_id = response.id\n", "\n", "# let's now update it\n", "\n", @@ -113,7 +113,7 @@ "]\n", "\n", "client.testsets.update_testset(\n", - " testset_id=testset_id, request=NewTestset(name=\"testset\", csvdata=csvdata)\n", + " testset_id=test_set_id, request=NewTestset(name=\"test set\", csvdata=csvdata)\n", ")" ] }, @@ -204,7 +204,7 @@ "response = client.evaluations.create_evaluation(\n", " app_id=app_id,\n", " variant_ids=[myvariant_id],\n", - " testset_id=testsetid,\n", + " testset_id=test_set_id,\n", " evaluators_configs=[exact_match_eval_id, letter_match_eval_id],\n", " rate_limit=LlmRunRateLimit(\n", " batch_size=10, # number of rows to call in parallel\n", diff --git a/examples/jupyter/integrations/agno-integration.ipynb b/examples/jupyter/integrations/agno-integration.ipynb deleted file mode 100644 index f00ab1788d..0000000000 --- a/examples/jupyter/integrations/agno-integration.ipynb +++ /dev/null @@ -1,825 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with Agno\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **Agno** for comprehensive observability and debugging of your AI agent applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is Agno?** [Agno](https://github.com/agno-agi/agno) is a Python framework for building AI agents with tools, structured outputs, and efficient workflows. It provides a simple yet powerful interface for creating intelligent agents that can interact with external systems and perform complex tasks." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up Agno with Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install agenta openinference-instrumentation-agno agno" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform\n", - "- `agno`: Framework for building AI agents with tools and structured workflows\n", - "- `openinference-instrumentation-agno`: Automatic instrumentation library for Agno operations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize the Agenta SDK:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import re\n", - "from itertools import permutations\n", - "import agenta as ag\n", - "from agno.agent import Agent\n", - "from agno.models.openai import OpenAIChat\n", - "from openinference.instrumentation.agno import AgnoInstrumentor\n", - "\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\"AGENTA_HOST\"] = (\n", - " \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - ")\n", - "\n", - "# Start Agenta SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable Agno Monitoring\n", - "\n", - "Initialize the OpenInference Agno instrumentation to automatically capture agent operations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Enable Agno instrumentation\n", - "AgnoInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Build Your Instrumented Agno Application\n", - "\n", - "Here's a complete example showcasing a logistics dispatch agent with Agenta instrumentation:\n", - "\n", - "#### Setup Logistics Data" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Simulated logistics data\n", - "tracking_data = {\n", - " \"TRK10001\": \"In transit at Berlin Friedrichshain Distribution Center\",\n", - " \"TRK10002\": \"Delivered on 2025-06-14 at 18:32 in Charlottenburg\",\n", - " \"TRK10003\": \"Out for delivery — last scanned near Tempelhofer Feld\",\n", - " \"TRK10004\": \"Held at customs near Berlin Brandenburg Airport (BER)\",\n", - " \"TRK10005\": \"Awaiting pickup at Berlin Hauptbahnhof Parcel Station\",\n", - "}\n", - "\n", - "distance_matrix = {\n", - " \"Warehouse\": {\"A\": 10, \"B\": 15, \"C\": 20},\n", - " \"A\": {\"Warehouse\": 10, \"B\": 12, \"C\": 5},\n", - " \"B\": {\"Warehouse\": 15, \"A\": 12, \"C\": 8},\n", - " \"C\": {\"Warehouse\": 20, \"A\": 5, \"B\": 8},\n", - "}\n", - "\n", - "driver_load = {\"Alice\": 2, \"Bob\": 3, \"Charlie\": 1}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create Tools for the Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Tool: TrackingTool\n", - "class TrackingTool:\n", - " def __init__(self):\n", - " self.name = \"TrackingTool\"\n", - " self.description = \"Provides shipment status updates given a tracking ID.\"\n", - "\n", - " def run(self, query: str) -> str:\n", - " match = re.search(r\"\\bTRK\\d+\\b\", query.upper())\n", - " if not match:\n", - " return \"Please provide a valid tracking ID.\"\n", - " tid = match.group(0)\n", - " status = tracking_data.get(tid)\n", - " return f\"Status for {tid}: {status}\" if status else f\"No information for {tid}.\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Tool: RouteTool\n", - "class RouteTool:\n", - " def __init__(self):\n", - " self.name = \"RouteTool\"\n", - " self.description = \"Computes the best delivery route given a start and destinations.\"\n", - "\n", - " def run(self, query: str) -> str:\n", - " m = re.search(r\"from\\s+([\\w\\s]+)\\s+to\\s+(.+)\", query, re.IGNORECASE)\n", - " if not m:\n", - " return \"Specify route as 'from <Origin> to <Dest1>, <Dest2>, ...'.\"\n", - " origin = m.group(1).strip()\n", - " dests = [d.strip() for d in re.split(r\",| and \", m.group(2)) if d.strip()]\n", - " \n", - " if origin not in distance_matrix:\n", - " return f\"Unknown origin: {origin}.\"\n", - "\n", - " for loc in dests:\n", - " if loc not in distance_matrix:\n", - " return f\"Unknown destination: {loc}.\"\n", - " \n", - " best_distance = float(\"inf\")\n", - " best_order = None\n", - " for perm in permutations(dests):\n", - " total = 0\n", - " cur = origin\n", - "\n", - " for nxt in perm:\n", - " total += distance_matrix[cur][nxt]\n", - " cur = nxt\n", - "\n", - " if total < best_distance:\n", - " best_distance = total\n", - " best_order = perm\n", - " \n", - " route_plan = \" → \".join([origin] + list(best_order)) if best_order else origin\n", - " return f\"Optimal route: {route_plan} (Total distance: {best_distance} km)\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Tool: WorkloadBalancerTool\n", - "class WorkloadBalancerTool:\n", - " def __init__(self):\n", - " self.name = \"WorkloadBalancerTool\"\n", - " self.description = \"Assigns delivery locations to the least busy driver.\"\n", - " self.drivers = driver_load.copy()\n", - "\n", - " def run(self, query: str) -> str:\n", - " m = re.search(r\"deliver(?:y|ies)? to (.+)\", query, re.IGNORECASE)\n", - " if not m:\n", - " return \"Please specify delivery locations like 'deliver to A, B, C'.\"\n", - "\n", - " locations = [\n", - " loc.strip() for loc in re.split(r\",| and \", m.group(1)) if loc.strip()\n", - " ]\n", - " assignments = []\n", - " for loc in locations:\n", - " least_loaded = min(self.drivers, key=lambda d: self.drivers[d])\n", - " assignments.append(f\"{loc} → {least_loaded}\")\n", - " self.drivers[least_loaded] += 1\n", - "\n", - " return \"Delivery assignments:\\n\" + \"\\n\".join(assignments)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create and Configure the Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Create the dispatch agent\n", - "agent = Agent(\n", - " model=OpenAIChat(id=\"gpt-4o\"),\n", - " description=\"You are a smart dispatch assistant for a logistics team.\",\n", - " instructions=[\n", - " \"Use TrackingTool for shipment queries.\",\n", - " \"Use RouteTool for route optimization.\",\n", - " \"Use WorkloadBalancerTool to assign deliveries to drivers.\",\n", - " \"Always return concise, formatted answers with relevant detail.\",\n", - " ],\n", - " tools=[TrackingTool(), RouteTool(), WorkloadBalancerTool()],\n", - " show_tool_calls=False,\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create Instrumented Handler Function" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "def handle_dispatch_request(query: str):\n", - " result = agent.run(query)\n", - " return result.content" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test the Logistics Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test individual functionalities\n", - "print(\"Testing Shipment Tracking:\")\n", - "tracking_response = handle_dispatch_request(\"Where is shipment TRK10001?\")\n", - "print(tracking_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"\\nTesting Route Optimization:\")\n", - "route_response = handle_dispatch_request(\"Find the best route from Warehouse to A, B and C\")\n", - "print(route_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"\\nTesting Workload Assignment:\")\n", - "workload_response = handle_dispatch_request(\"Assign deliveries to A, B, and C\")\n", - "print(workload_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"\\nTesting Combined Multi-Tool Request:\")\n", - "combined_response = handle_dispatch_request(\n", - " \"Where is shipment TRK10001? Also, find the best route from Warehouse to A, B and C, \"\n", - " \"and assign deliveries to the least busy drivers.\"\n", - ")\n", - "print(combined_response)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"agent\")\n", - "def logistics_agent_handler(query: str):\n", - " # Agent-specific logic implementation\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete agent workflow execution timeline\n", - "- Agno agent initialization and tool configuration\n", - "- Tool execution sequences and decision-making processes\n", - "- LLM interactions and response generation\n", - "- Tool call chains and data flow between tools\n", - "- Performance metrics and timing analysis\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-openinference-agno-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing Agno application trace with detailed execution steps\">\n", - "\n", - "The observability interface provides insights for:\n", - "- Debug complex agent interactions and tool usage patterns\n", - "- Monitor tool execution performance and decision logic\n", - "- Analyze LLM reasoning and response quality\n", - "- Track multi-tool workflows and coordination" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Advanced Usage\n", - "\n", - "### Custom Span Configuration\n", - "\n", - "Customize instrumentation for different application components:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def logistics_pipeline(request: str):\n", - " return handle_dispatch_request(request)\n", - "\n", - "\n", - "@ag.instrument(spankind=\"tool\")\n", - "def external_system_integration(data: dict):\n", - " # External system call logic\n", - " pass\n", - "\n", - "\n", - "@ag.instrument(spankind=\"agent\")\n", - "def specialized_logistics_agent(context: dict):\n", - " # Specialized agent implementation\n", - " return context" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Real-world Examples\n", - "\n", - "#### Customer Service Agent System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Customer service data\n", - "customer_db = {\n", - " \"CUST001\": {\"name\": \"John Doe\", \"tier\": \"Premium\", \"issues\": []},\n", - " \"CUST002\": {\"name\": \"Jane Smith\", \"tier\": \"Standard\", \"issues\": [\"billing\"]},\n", - "}\n", - "\n", - "ticket_system = {\n", - " \"TKT001\": {\"customer\": \"CUST001\", \"status\": \"open\", \"priority\": \"high\"},\n", - " \"TKT002\": {\"customer\": \"CUST002\", \"status\": \"resolved\", \"priority\": \"medium\"},\n", - "}\n", - "\n", - "class CustomerLookupTool:\n", - " def __init__(self):\n", - " self.name = \"CustomerLookupTool\"\n", - " self.description = \"Retrieves customer information by ID.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " match = re.search(r\"\\bCUST\\d+\\b\", query.upper())\n", - " if not match:\n", - " return \"Please provide a valid customer ID.\"\n", - "\n", - " cust_id = match.group(0)\n", - " customer = customer_db.get(cust_id)\n", - " if customer:\n", - " return f\"Customer {cust_id}: {customer['name']}, Tier: {customer['tier']}\"\n", - " return f\"No customer found for {cust_id}.\"\n", - "\n", - "class TicketManagementTool:\n", - " def __init__(self):\n", - " self.name = \"TicketManagementTool\"\n", - " self.description = \"Manages support tickets and escalations.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " if \"create ticket\" in query.lower():\n", - " return \"New ticket TKT003 created successfully.\"\n", - "\n", - " elif \"escalate\" in query.lower():\n", - " return \"Ticket escalated to senior support team.\"\n", - "\n", - " match = re.search(r\"\\bTKT\\d+\\b\", query.upper())\n", - " if match:\n", - " ticket_id = match.group(0)\n", - " ticket = ticket_system.get(ticket_id)\n", - " if ticket:\n", - " return f\"Ticket {ticket_id}: Status: {ticket['status']}, Priority: {ticket['priority']}\"\n", - "\n", - " return \"Please specify a valid ticket action or ID.\"\n", - "\n", - "\n", - "customer_service_agent = Agent(\n", - " model=OpenAIChat(id=\"gpt-4o\"),\n", - " description=\"You are a customer service agent helping with inquiries and ticket management.\",\n", - " instructions=[\n", - " \"Use CustomerLookupTool to find customer information.\",\n", - " \"Use TicketManagementTool to manage support tickets.\",\n", - " \"Always be helpful and professional in your responses.\",\n", - " ],\n", - " tools=[CustomerLookupTool(), TicketManagementTool()],\n", - " show_tool_calls=False,\n", - ")\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def handle_customer_request(query: str):\n", - " result = customer_service_agent.run(query)\n", - " return result.content" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Customer Service Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test customer service functionality\n", - "customer_response = handle_customer_request(\"Look up customer CUST001 and check ticket TKT001\")\n", - "print(\"Customer Service Response:\", customer_response)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### E-commerce Order Management System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# E-commerce data\n", - "inventory = {\n", - " \"PROD001\": {\"name\": \"Laptop\", \"stock\": 5, \"price\": 999.99},\n", - " \"PROD002\": {\"name\": \"Mouse\", \"stock\": 25, \"price\": 29.99},\n", - " \"PROD003\": {\"name\": \"Keyboard\", \"stock\": 0, \"price\": 79.99},\n", - "}\n", - "\n", - "orders = {\n", - " \"ORD001\": {\"customer\": \"CUST001\", \"items\": [\"PROD001\"], \"status\": \"shipped\"},\n", - " \"ORD002\": {\"customer\": \"CUST002\", \"items\": [\"PROD002\"], \"status\": \"processing\"},\n", - "}\n", - "\n", - "class InventoryTool:\n", - " def __init__(self):\n", - " self.name = \"InventoryTool\"\n", - " self.description = \"Checks product availability and stock levels.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " match = re.search(r\"\\bPROD\\d+\\b\", query.upper())\n", - " if not match:\n", - " return \"Please provide a valid product ID.\"\n", - "\n", - " prod_id = match.group(0)\n", - " product = inventory.get(prod_id)\n", - " if product:\n", - " status = \"In Stock\" if product[\"stock\"] > 0 else \"Out of Stock\"\n", - " return f\"Product {prod_id}: {product['name']}, Stock: {product['stock']}, Price: ${product['price']}, Status: {status}\"\n", - "\n", - " return f\"Product {prod_id} not found.\"\n", - "\n", - "\n", - "class OrderManagementTool:\n", - " def __init__(self):\n", - " self.name = \"OrderManagementTool\"\n", - " self.description = \"Manages order status and updates.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " match = re.search(r\"\\bORD\\d+\\b\", query.upper())\n", - " if not match:\n", - " return \"Please provide a valid order ID.\"\n", - "\n", - " order_id = match.group(0)\n", - " order = orders.get(order_id)\n", - " if order:\n", - " return f\"Order {order_id}: Customer: {order['customer']}, Items: {order['items']}, Status: {order['status']}\"\n", - " return f\"Order {order_id} not found.\"\n", - "\n", - "\n", - "ecommerce_agent = Agent(\n", - " model=OpenAIChat(id=\"gpt-4o\"),\n", - " description=\"You are an e-commerce assistant helping with inventory and order management.\",\n", - " instructions=[\n", - " \"Use InventoryTool to check product availability.\",\n", - " \"Use OrderManagementTool to track orders.\",\n", - " \"Provide clear and helpful information about products and orders.\",\n", - " ],\n", - " tools=[InventoryTool(), OrderManagementTool()],\n", - " show_tool_calls=False,\n", - ")\n", - "\n", - "\n", - "@ag.instrument(spankind=\"agent\")\n", - "def handle_ecommerce_request(query: str):\n", - " result = ecommerce_agent.run(query)\n", - " return result.content" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test E-commerce Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test e-commerce functionality\n", - "ecommerce_response = handle_ecommerce_request(\"Check availability of PROD001 and status of order ORD001\")\n", - "print(\"E-commerce Response:\", ecommerce_response)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Financial Trading Assistant" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Financial data\n", - "portfolio = {\n", - " \"AAPL\": {\"shares\": 100, \"avg_price\": 150.00, \"current_price\": 175.50},\n", - " \"GOOGL\": {\"shares\": 50, \"avg_price\": 2800.00, \"current_price\": 2950.00},\n", - " \"TSLA\": {\"shares\": 25, \"avg_price\": 800.00, \"current_price\": 725.00},\n", - "}\n", - "\n", - "market_data = {\n", - " \"AAPL\": {\"price\": 175.50, \"change\": \"+2.5%\", \"volume\": \"45M\"},\n", - " \"GOOGL\": {\"price\": 2950.00, \"change\": \"+1.8%\", \"volume\": \"12M\"},\n", - " \"TSLA\": {\"price\": 725.00, \"change\": \"-3.2%\", \"volume\": \"28M\"},\n", - "}\n", - "\n", - "class PortfolioTool:\n", - " def __init__(self):\n", - " self.name = \"PortfolioTool\"\n", - " self.description = \"Provides portfolio information and performance analysis.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " if \"portfolio\" in query.lower():\n", - " total_value = sum(stock[\"shares\"] * stock[\"current_price\"] for stock in portfolio.values())\n", - " return f\"Portfolio Total Value: ${total_value:,.2f}\"\n", - " \n", - " match = re.search(r\"\\b[A-Z]{2,5}\\b\", query.upper())\n", - " if match:\n", - " symbol = match.group(0)\n", - " if symbol in portfolio:\n", - " stock = portfolio[symbol]\n", - " current_value = stock[\"shares\"] * stock[\"current_price\"]\n", - " return f\"{symbol}: {stock['shares']} shares @ ${stock['current_price']}, Value: ${current_value:,.2f}\"\n", - "\n", - " return \"Please specify a valid stock symbol or ask about your portfolio.\"\n", - "\n", - "\n", - "class MarketDataTool:\n", - " def __init__(self):\n", - " self.name = \"MarketDataTool\"\n", - " self.description = \"Provides real-time market data and stock information.\"\n", - " \n", - " def run(self, query: str) -> str:\n", - " match = re.search(r\"\\b[A-Z]{2,5}\\b\", query.upper())\n", - " if not match:\n", - " return \"Please provide a valid stock symbol.\"\n", - "\n", - " symbol = match.group(0)\n", - " if symbol in market_data:\n", - " data = market_data[symbol]\n", - " return f\"{symbol}: ${data['price']}, Change: {data['change']}, Volume: {data['volume']}\"\n", - " return f\"No market data available for {symbol}.\"\n", - "\n", - "\n", - "trading_agent = Agent(\n", - " model=OpenAIChat(id=\"gpt-4o\"),\n", - " description=\"You are a financial trading assistant providing portfolio and market analysis.\",\n", - " instructions=[\n", - " \"Use PortfolioTool to analyze portfolio holdings.\",\n", - " \"Use MarketDataTool to get current market information.\",\n", - " \"Provide clear financial insights and recommendations.\",\n", - " ],\n", - " tools=[PortfolioTool(), MarketDataTool()],\n", - " show_tool_calls=False,\n", - ")\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def handle_trading_request(query: str):\n", - " result = trading_agent.run(query)\n", - " return result.content" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Trading Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test trading functionality\n", - "trading_response = handle_trading_request(\"Show me my AAPL holdings and current market data for GOOGL\")\n", - "print(\"Trading Response:\", trading_response)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Additional Testing Examples" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test portfolio overview\n", - "portfolio_overview = handle_trading_request(\"What is my total portfolio value?\")\n", - "print(\"Portfolio Overview:\", portfolio_overview)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test customer service ticket creation\n", - "ticket_creation = handle_customer_request(\"Create a new ticket for billing issues\")\n", - "print(\"Ticket Creation:\", ticket_creation)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test inventory check for out of stock item\n", - "inventory_check = handle_ecommerce_request(\"Check if PROD003 is available for purchase\")\n", - "print(\"Inventory Check:\", inventory_check)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/integrations/dspy-integration.ipynb b/examples/jupyter/integrations/dspy-integration.ipynb deleted file mode 100644 index 6909808cf5..0000000000 --- a/examples/jupyter/integrations/dspy-integration.ipynb +++ /dev/null @@ -1,385 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with DSPy\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **DSPy** for comprehensive observability and debugging of your LLM applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is DSPy?** [DSPy](https://dspy-docs.vercel.app/) ([GitHub](https://github.com/stanfordnlp/dspy)) is a framework for algorithmically optimizing LM prompts and weights. It provides composable and declarative modules for instructing language models in a more systematic way than traditional prompting." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up DSPy with Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install agenta dspy openinference-instrumentation-dspy" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform\n", - "- `dspy`: Framework for building systematic LLM applications with prompt optimization\n", - "- `openinference-instrumentation-dspy`: Automatic instrumentation library for DSPy operations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize the Agenta SDK:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import agenta as ag\n", - "import dspy\n", - "from openinference.instrumentation.dspy import DSPyInstrumentor\n", - "\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "os.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key\" # Required for OpenAI models\n", - "\n", - "\n", - "# Start Agenta SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable DSPy Monitoring\n", - "\n", - "Initialize the OpenInference DSPy instrumentation to automatically capture DSPy operations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Activate DSPy monitoring\n", - "DSPyInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Configure DSPy Language Model\n", - "\n", - "Set up your DSPy language model configuration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Configure DSPy with your preferred language model\n", - "lm = dspy.LM(\"openai/gpt-4o\")\n", - "dspy.configure(lm=lm)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Build Your Instrumented Application\n", - "\n", - "Here's a complete example showcasing multiple DSPy use cases with Agenta instrumentation:\n", - "\n", - "#### Use Case 1: Math Reasoning with Chain of Thought" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "def math_reasoning(question: str):\n", - " cot = dspy.ChainOfThought(\"question -> answer: float\")\n", - " response = cot(question=question)\n", - " return response" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Use Case 2: Retrieval-Augmented Generation (RAG) with Wikipedia Search" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"query\")\n", - "def search_wikipedia(query: str) -> list[str]:\n", - " results = dspy.ColBERTv2(url=\"http://20.102.90.50:2017/wiki17_abstracts\")(\n", - " query, k=3\n", - " )\n", - " return [x[\"text\"] for x in results]\n", - "\n", - "\n", - "@ag.instrument()\n", - "def rag(question: str):\n", - " cot = dspy.ChainOfThought(\"context, question -> response\")\n", - " response = cot(context=search_wikipedia(question), question=question)\n", - " return response" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Use Case 3: Article Generation with Outline and Sections" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class Outline(dspy.Signature):\n", - " \"\"\"Outline a thorough overview of a topic.\"\"\"\n", - "\n", - " topic: str = dspy.InputField()\n", - " title: str = dspy.OutputField()\n", - " sections: list[str] = dspy.OutputField()\n", - " section_subheadings: dict[str, list[str]] = dspy.OutputField(\n", - " desc=\"mapping from section headings to subheadings\"\n", - " )\n", - "\n", - "\n", - "class DraftSection(dspy.Signature):\n", - " \"\"\"Draft a top-level section of an article.\"\"\"\n", - "\n", - " topic: str = dspy.InputField()\n", - " section_heading: str = dspy.InputField()\n", - " section_subheadings: list[str] = dspy.InputField()\n", - " content: str = dspy.OutputField(desc=\"markdown-formatted section\")\n", - "\n", - "\n", - "class DraftArticle(dspy.Module):\n", - " def __init__(self):\n", - " self.build_outline = dspy.ChainOfThought(Outline)\n", - " self.draft_section = dspy.ChainOfThought(DraftSection)\n", - "\n", - " def forward(self, topic):\n", - " outline = self.build_outline(topic=topic)\n", - " sections = []\n", - " for heading, subheadings in outline.section_subheadings.items():\n", - " section, subheadings = f\"## {heading}\", [\n", - " f\"### {subheading}\" for subheading in subheadings\n", - " ]\n", - " section = self.draft_section(\n", - " topic=outline.title,\n", - " section_heading=section,\n", - " section_subheadings=subheadings,\n", - " )\n", - " sections.append(section.content)\n", - " return dspy.Prediction(title=outline.title, sections=sections)\n", - "\n", - "\n", - "@ag.instrument()\n", - "def journalist(topic: str):\n", - " draft_article = DraftArticle()\n", - " article = draft_article(topic=topic)\n", - " return article" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Run the Examples" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Use case 1: Chain of Thought reasoning\n", - "response = math_reasoning(\"What is 2 + 2?\")\n", - "print(\"Chain of Thought response:\", response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Use case 2: RAG with Wikipedia\n", - "rag_response = rag(\"What's the name of the castle that David Gregory inherited?\")\n", - "print(\"RAG response:\", rag_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Use case 3: Article generation\n", - "article = journalist(\"The impact of AI on society\")\n", - "print(\"Article generation response:\", article)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"query\")\n", - "def search_knowledge_base(search_term: str):\n", - " # Knowledge base search implementation\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 7: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete workflow execution timeline\n", - "- DSPy module initialization and configuration steps\n", - "- Chain of Thought reasoning processes\n", - "- Retrieval operations and context augmentation\n", - "- Language model calls and response generation\n", - "- Performance metrics and timing analysis\n", - "\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-openinference-dspy-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing DSPy application trace with detailed execution steps\">\n", - "\n", - "\n", - "The observability interface provides insights for:\n", - "- Debug complex reasoning chains and prompt optimization\n", - "- Monitor retrieval effectiveness and context quality\n", - "- Analyze language model performance and token usage\n", - "- Track application behavior trends and optimization opportunities" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/integrations/images/agenta-openinference-agno-trace.png b/examples/jupyter/integrations/images/agenta-openinference-agno-trace.png deleted file mode 100644 index 204c694f7a..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-openinference-agno-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/images/agenta-openinference-dspy-trace.png b/examples/jupyter/integrations/images/agenta-openinference-dspy-trace.png deleted file mode 100644 index 0d07a08c5b..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-openinference-dspy-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/images/agenta-openinference-langgraph-trace.png b/examples/jupyter/integrations/images/agenta-openinference-langgraph-trace.png deleted file mode 100644 index 93a3542074..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-openinference-langgraph-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/images/agenta-openinference-llamaindex-trace.png b/examples/jupyter/integrations/images/agenta-openinference-llamaindex-trace.png deleted file mode 100644 index eaac5064c5..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-openinference-llamaindex-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/images/agenta-openinference-openai-agents-trace.png b/examples/jupyter/integrations/images/agenta-openinference-openai-agents-trace.png deleted file mode 100644 index d8a7f67952..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-openinference-openai-agents-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/images/agenta-pydanticai-logfire-trace.png b/examples/jupyter/integrations/images/agenta-pydanticai-logfire-trace.png deleted file mode 100644 index d9291b726e..0000000000 Binary files a/examples/jupyter/integrations/images/agenta-pydanticai-logfire-trace.png and /dev/null differ diff --git a/examples/jupyter/integrations/langgraph-integration.ipynb b/examples/jupyter/integrations/langgraph-integration.ipynb deleted file mode 100644 index 30797cc017..0000000000 --- a/examples/jupyter/integrations/langgraph-integration.ipynb +++ /dev/null @@ -1,683 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with LangGraph (Openinference)\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **LangGraph** for comprehensive observability and debugging of your graph-based LLM applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is LangGraph?** [LangGraph](https://langchain-ai.github.io/langgraph/) is a library for building stateful, multi-actor applications with LLMs. It extends LangChain's capabilities by enabling the creation of complex workflows as directed graphs where nodes represent different processing steps and edges define the flow between them." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up LangGraph with Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install agenta langchain langgraph langchain-openai langchain-community llama-index openinference-instrumentation-langchain" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform\n", - "- `langchain`: Framework for building LLM applications with chains and agents\n", - "- `langgraph`: Extension for creating graph-based LLM workflows\n", - "- `langchain-openai`: OpenAI integrations for LangChain\n", - "- `langchain-community`: Community extensions for LangChain\n", - "- `llama-index`: Document loading and processing utilities\n", - "- `openinference-instrumentation-langchain`: Automatic instrumentation library for LangChain operations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize the Agenta SDK:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import agenta as ag\n", - "from typing import TypedDict, Dict, Any\n", - "from langgraph.graph import StateGraph, END\n", - "from langchain_openai import ChatOpenAI\n", - "from llama_index.core import SimpleDirectoryReader\n", - "from langchain_core.runnables import RunnableLambda\n", - "from openinference.instrumentation.langchain import LangChainInstrumentor\n", - "\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "os.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key\" # Required for OpenAI Agents SDK\n", - "\n", - "\n", - "# Start Agenta SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable LangChain Monitoring\n", - "\n", - "Initialize the OpenInference LangChain instrumentation to automatically capture LangGraph operations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Enable LangChain instrumentation (includes LangGraph)\n", - "LangChainInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Configure Language Model\n", - "\n", - "Set up your language model for the LangGraph workflow:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Configure ChatOpenAI model\n", - "llm = ChatOpenAI(model=\"gpt-4\", temperature=0)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Build Your Instrumented LangGraph Application\n", - "\n", - "Here's a complete example showcasing a meeting transcript analysis workflow with Agenta instrumentation:\n", - "\n", - "#### Define State Structure" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Define state structure for the graph\n", - "class SummarizerState(TypedDict):\n", - " input: str\n", - " segments: Dict[str, list[str]]\n", - " speaker_summaries: Dict[str, str]\n", - " actions: str" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Load Meeting Transcripts" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Load meeting transcripts from documents\n", - "# Note: Create a 'meetings' directory with .txt or .md files for this to work\n", - "try:\n", - " documents = SimpleDirectoryReader(\"meetings\").load_data()\n", - " full_transcript = \"\\n\".join(doc.text for doc in documents)\n", - "except:\n", - " # Fallback sample transcript for demonstration\n", - " full_transcript = \"\"\"\n", - "John: Good morning everyone, let's start our weekly standup.\n", - "Sarah: I finished the user authentication feature yesterday.\n", - "Mike: I'm working on the database optimization, should be done by Friday.\n", - "John: Great! Sarah, can you help Mike with testing once he's done?\n", - "Sarah: Absolutely, I'll be available.\n", - "John: Perfect. Our action items are: Sarah to help Mike with testing, and Mike to finish database optimization by Friday.\n", - "\"\"\".strip()\n", - "\n", - "print(\"Sample transcript loaded:\", full_transcript[:100] + \"...\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Define Graph Nodes" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Node 1: Segment speaker contributions\n", - "def segment_by_speaker(state):\n", - " transcript = state[\"input\"]\n", - " speakers = {}\n", - " for line in transcript.split(\"\\n\"):\n", - " if \":\" in line:\n", - " name, text = line.split(\":\", 1)\n", - " speakers.setdefault(name.strip(), []).append(text.strip())\n", - " return {**state, \"segments\": speakers}\n", - "\n", - "\n", - "# Node 2: Summarize each speaker's contributions\n", - "def summarize_per_speaker(state):\n", - " segments = state[\"segments\"]\n", - " summaries = {}\n", - " for speaker, texts in segments.items():\n", - " joined_text = \" \".join(texts)\n", - " summary = llm.invoke(f\"Summarize what {speaker} said: {joined_text}\")\n", - " summaries[speaker] = summary.content\n", - " return {**state, \"speaker_summaries\": summaries}\n", - "\n", - "\n", - "# Node 3: Extract action items\n", - "def extract_actions(state):\n", - " transcript = state[\"input\"]\n", - " result = llm.invoke(f\"List all action items from this transcript:\\n{transcript}\")\n", - " return {**state, \"actions\": result.content}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create Instrumented Analysis Function" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "def meeting_analyzer(transcript: str):\n", - " # Build LangGraph workflow\n", - " builder = StateGraph(SummarizerState)\n", - " builder.add_node(\"segment\", RunnableLambda(segment_by_speaker))\n", - " builder.add_node(\"summarize\", RunnableLambda(summarize_per_speaker))\n", - " builder.add_node(\"extract_actions\", RunnableLambda(extract_actions))\n", - "\n", - " builder.set_entry_point(\"segment\")\n", - " builder.add_edge(\"segment\", \"summarize\")\n", - " builder.add_edge(\"summarize\", \"extract_actions\")\n", - " builder.add_edge(\"extract_actions\", END)\n", - "\n", - " graph = builder.compile()\n", - " result = graph.invoke({\"input\": transcript})\n", - " return result" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Run the Analysis" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example usage\n", - "result = meeting_analyzer(full_transcript)\n", - "print(\"Analysis Result:\")\n", - "print(\"Segments:\", result[\"segments\"])\n", - "print(\"\\nSpeaker Summaries:\", result[\"speaker_summaries\"])\n", - "print(\"\\nAction Items:\", result[\"actions\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"chain\")\n", - "def document_processing_chain(documents: list):\n", - " # Document processing workflow\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 7: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete graph workflow execution timeline\n", - "- Individual node processing steps and state transitions\n", - "- LLM invocations and response generation\n", - "- State updates and data flow between nodes\n", - "- Document loading and preprocessing operations\n", - "- Performance metrics and timing analysis\n", - "\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-openinference-langgraph-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing LangGraph application trace with detailed execution steps\">\n", - "\n", - "\n", - "The observability interface provides insights for:\n", - "- Debug complex graph workflows and state management\n", - "- Monitor node execution performance and bottlenecks\n", - "- Analyze LLM usage patterns and token consumption\n", - "- Track data flow and state transitions between nodes" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Advanced Usage\n", - "\n", - "### Custom Span Configuration\n", - "\n", - "Customize instrumentation for different application components:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def document_analysis_pipeline(file_path: str):\n", - " return meeting_analyzer(file_path)\n", - "\n", - "\n", - "@ag.instrument(spankind=\"tool\")\n", - "def custom_document_loader(directory: str):\n", - " # Custom document loading logic\n", - " pass\n", - "\n", - "\n", - "@ag.instrument(spankind=\"chain\")\n", - "def multi_step_analysis(transcript: str):\n", - " # Multi-step analysis workflow\n", - " return transcript" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Real-world Examples\n", - "\n", - "#### Customer Feedback Analysis System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class FeedbackState(TypedDict):\n", - " input: str\n", - " sentiment: str\n", - " categories: list[str]\n", - " priority: str\n", - " response_draft: str\n", - "\n", - "\n", - "def analyze_sentiment(state):\n", - " feedback = state[\"input\"]\n", - " result = llm.invoke(f\"Analyze sentiment of this feedback: {feedback}\")\n", - " return {**state, \"sentiment\": result.content}\n", - "\n", - "\n", - "def categorize_feedback(state):\n", - " feedback = state[\"input\"]\n", - " result = llm.invoke(f\"Categorize this feedback into relevant topics: {feedback}\")\n", - " return {**state, \"categories\": result.content.split(\", \")}\n", - "\n", - "\n", - "def determine_priority(state):\n", - " sentiment = state[\"sentiment\"]\n", - " categories = state[\"categories\"]\n", - " result = llm.invoke(\n", - " f\"Determine priority (high/medium/low) based on sentiment: {sentiment} and categories: {categories}\"\n", - " )\n", - " return {**state, \"priority\": result.content}\n", - "\n", - "\n", - "def draft_response(state):\n", - " feedback = state[\"input\"]\n", - " sentiment = state[\"sentiment\"]\n", - " result = llm.invoke(\n", - " f\"Draft a professional response to this {sentiment} feedback: {feedback}\"\n", - " )\n", - " return {**state, \"response_draft\": result.content}\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def feedback_processor(feedback_text: str):\n", - " builder = StateGraph(FeedbackState)\n", - " builder.add_node(\"sentiment\", RunnableLambda(analyze_sentiment))\n", - " builder.add_node(\"categorize\", RunnableLambda(categorize_feedback))\n", - " builder.add_node(\"priority\", RunnableLambda(determine_priority))\n", - " builder.add_node(\"response\", RunnableLambda(draft_response))\n", - "\n", - " builder.set_entry_point(\"sentiment\")\n", - " builder.add_edge(\"sentiment\", \"categorize\")\n", - " builder.add_edge(\"categorize\", \"priority\")\n", - " builder.add_edge(\"priority\", \"response\")\n", - " builder.add_edge(\"response\", END)\n", - "\n", - " graph = builder.compile()\n", - " return graph.invoke({\"input\": feedback_text})" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Customer Feedback Analysis" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test feedback analysis\n", - "sample_feedback = \"Your product is amazing but the customer service was terrible. I waited 2 hours on hold!\"\n", - "feedback_result = feedback_processor(sample_feedback)\n", - "print(\"Feedback Analysis Result:\")\n", - "print(\"Sentiment:\", feedback_result[\"sentiment\"])\n", - "print(\"Categories:\", feedback_result[\"categories\"])\n", - "print(\"Priority:\", feedback_result[\"priority\"])\n", - "print(\"Response Draft:\", feedback_result[\"response_draft\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Research Paper Analysis Pipeline" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class ResearchState(TypedDict):\n", - " input: str\n", - " abstract_summary: str\n", - " key_findings: list[str]\n", - " methodology: str\n", - " limitations: str\n", - " relevance_score: float\n", - "\n", - "\n", - "@ag.instrument(spankind=\"chain\")\n", - "def research_analyzer(paper_text: str):\n", - " def extract_abstract(state):\n", - " paper = state[\"input\"]\n", - " result = llm.invoke(\n", - " f\"Extract and summarize the abstract from this research paper: {paper}\"\n", - " )\n", - " return {**state, \"abstract_summary\": result.content}\n", - "\n", - " def identify_findings(state):\n", - " paper = state[\"input\"]\n", - " result = llm.invoke(f\"List the key findings from this research paper: {paper}\")\n", - " return {**state, \"key_findings\": result.content.split(\"\\n\")}\n", - "\n", - " def analyze_methodology(state):\n", - " paper = state[\"input\"]\n", - " result = llm.invoke(f\"Describe the methodology used in this research: {paper}\")\n", - " return {**state, \"methodology\": result.content}\n", - "\n", - " def assess_limitations(state):\n", - " paper = state[\"input\"]\n", - " result = llm.invoke(f\"Identify limitations mentioned in this research: {paper}\")\n", - " return {**state, \"limitations\": result.content}\n", - "\n", - " def score_relevance(state):\n", - " abstract = state[\"abstract_summary\"]\n", - " result = llm.invoke(\n", - " f\"Rate the relevance of this research on a scale of 0-10: {abstract}\"\n", - " )\n", - " try:\n", - " score = float(result.content.strip())\n", - " except:\n", - " score = 5.0\n", - " return {**state, \"relevance_score\": score}\n", - "\n", - " builder = StateGraph(ResearchState)\n", - " builder.add_node(\"abstract\", RunnableLambda(extract_abstract))\n", - " builder.add_node(\"findings\", RunnableLambda(identify_findings))\n", - " builder.add_node(\"methodology\", RunnableLambda(analyze_methodology))\n", - " builder.add_node(\"limitations\", RunnableLambda(assess_limitations))\n", - " builder.add_node(\"relevance\", RunnableLambda(score_relevance))\n", - "\n", - " builder.set_entry_point(\"abstract\")\n", - " builder.add_edge(\"abstract\", \"findings\")\n", - " builder.add_edge(\"findings\", \"methodology\")\n", - " builder.add_edge(\"methodology\", \"limitations\")\n", - " builder.add_edge(\"limitations\", \"relevance\")\n", - " builder.add_edge(\"relevance\", END)\n", - "\n", - " graph = builder.compile()\n", - " return graph.invoke({\"input\": paper_text})" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Content Moderation Workflow" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class ModerationState(TypedDict):\n", - " input: str\n", - " toxicity_score: float\n", - " content_categories: list[str]\n", - " action_required: str\n", - " explanation: str\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def content_moderator(user_content: str):\n", - " def assess_toxicity(state):\n", - " content = state[\"input\"]\n", - " result = llm.invoke(f\"Rate toxicity of this content from 0-10: {content}\")\n", - " try:\n", - " score = float(result.content.strip())\n", - " except:\n", - " score = 0.0\n", - " return {**state, \"toxicity_score\": score}\n", - "\n", - " def categorize_content(state):\n", - " content = state[\"input\"]\n", - " result = llm.invoke(\n", - " f\"Categorize this content (spam, harassment, hate speech, etc.): {content}\"\n", - " )\n", - " return {**state, \"content_categories\": result.content.split(\", \")}\n", - "\n", - " def determine_action(state):\n", - " toxicity = state[\"toxicity_score\"]\n", - " categories = state[\"content_categories\"]\n", - " if toxicity > 7:\n", - " action = \"remove\"\n", - " elif toxicity > 4:\n", - " action = \"flag_for_review\"\n", - " else:\n", - " action = \"approve\"\n", - " explanation = (\n", - " f\"Decision based on toxicity score: {toxicity} and categories: {categories}\"\n", - " )\n", - " return {**state, \"action_required\": action, \"explanation\": explanation}\n", - "\n", - " builder = StateGraph(ModerationState)\n", - " builder.add_node(\"toxicity\", RunnableLambda(assess_toxicity))\n", - " builder.add_node(\"categorize\", RunnableLambda(categorize_content))\n", - " builder.add_node(\"action\", RunnableLambda(determine_action))\n", - "\n", - " builder.set_entry_point(\"toxicity\")\n", - " builder.add_edge(\"toxicity\", \"categorize\")\n", - " builder.add_edge(\"categorize\", \"action\")\n", - " builder.add_edge(\"action\", END)\n", - "\n", - " graph = builder.compile()\n", - " return graph.invoke({\"input\": user_content})" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Content Moderation" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test content moderation\n", - "sample_content = \"This is a great product, I highly recommend it to everyone!\"\n", - "moderation_result = content_moderator(sample_content)\n", - "print(\"Content Moderation Result:\")\n", - "print(\"Toxicity Score:\", moderation_result[\"toxicity_score\"])\n", - "print(\"Categories:\", moderation_result[\"content_categories\"])\n", - "print(\"Action Required:\", moderation_result[\"action_required\"])\n", - "print(\"Explanation:\", moderation_result[\"explanation\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/integrations/observability-openinference-llamaindex.ipynb b/examples/jupyter/integrations/observability-openinference-llamaindex.ipynb deleted file mode 100644 index 9b4dfe2aa1..0000000000 --- a/examples/jupyter/integrations/observability-openinference-llamaindex.ipynb +++ /dev/null @@ -1,271 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with LlamaIndex (Openinference)\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **LlamaIndex** for comprehensive observability and debugging of your LLM applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is LlamaIndex?** [LlamaIndex](https://www.llamaindex.ai/) ([GitHub](https://github.com/run-llama/llama_index)) is a powerful data framework that connects LLMs with your private data sources. It simplifies working with various data formats and creates searchable indices for context-aware AI applications." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up LlamaIndex with Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install agenta llama_index openinference-instrumentation-llama_index" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform\n", - "- `llama_index`: Framework for building data-connected LLM applications\n", - "- `openinference-instrumentation-llama_index`: Automatic instrumentation library for LlamaIndex operations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize the Agenta SDK:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import agenta as ag\n", - "\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "\n", - "\n", - "# Start Agenta SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable LlamaIndex Monitoring\n", - "\n", - "Initialize the OpenInference LlamaIndex instrumentation to automatically capture LlamaIndex operations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from openinference.instrumentation.llama_index import LlamaIndexInstrumentor\n", - "\n", - "# Activate LlamaIndex monitoring\n", - "LlamaIndexInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Build Your Instrumented Application\n", - "\n", - "Here's a complete example of a LlamaIndex application with Agenta instrumentation:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import agenta as ag\n", - "from openinference.instrumentation.llama_index import LlamaIndexInstrumentor\n", - "from llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n", - "\n", - "\n", - "# Configuration setup\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "\n", - "# Initialize observability\n", - "ag.init()\n", - "\n", - "# Enable LlamaIndex instrumentation\n", - "LlamaIndexInstrumentor().instrument()\n", - "\n", - "\n", - "@ag.instrument()\n", - "def document_search_app(user_query: str):\n", - " \"\"\"\n", - " Document search application using LlamaIndex.\n", - " Loads documents, builds a searchable index, and answers user queries.\n", - " \"\"\"\n", - " # Load documents from local directory\n", - " docs = SimpleDirectoryReader(\"data\").load_data()\n", - "\n", - " # Build vector search index\n", - " search_index = VectorStoreIndex.from_documents(docs)\n", - "\n", - " # Initialize query processor\n", - " query_processor = search_index.as_query_engine()\n", - "\n", - " # Process user query\n", - " answer = query_processor.query(user_query)\n", - "\n", - " return answer\n", - "\n", - "\n", - "# Run the application\n", - "if __name__ == \"__main__\":\n", - " result = document_search_app(\"What is Agenta?\")\n", - " print(f\"Answer: {result}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"query\")\n", - "def search_knowledge_base(search_term: str):\n", - " # Knowledge base search implementation\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete workflow execution timeline\n", - "- Document loading and indexing processes\n", - "- Vector search operations and retrieval steps\n", - "- Query processing and response generation\n", - "- Performance metrics and timing analysis\n", - "\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-openinference-llamaindex-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing LlamaIndex application trace with detailed execution steps\">\n", - "\n", - "\n", - "The observability interface provides insights for:\n", - "- Performance optimization opportunities\n", - "- Query pattern analysis\n", - "- Document retrieval validation\n", - "- Application behavior tracking" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.7" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/integrations/openai-agents-integration.ipynb b/examples/jupyter/integrations/openai-agents-integration.ipynb deleted file mode 100644 index 976b0d3160..0000000000 --- a/examples/jupyter/integrations/openai-agents-integration.ipynb +++ /dev/null @@ -1,523 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with OpenAI Agents SDK\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **OpenAI Agents** for comprehensive observability and debugging of your multi-agent applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is OpenAI Agents?** The [OpenAI Agents](https://github.com/openai/openai-agents-python) SDK is a framework for building AI agents that can interact with tools, run asynchronous operations, and orchestrate complex multi-agent workflows. It provides a structured approach to creating intelligent agents with tool calling capabilities." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up OpenAI Agents SDK with Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install agenta openinference-instrumentation-openai-agents openai-agents" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform\n", - "- `openai-agents`: Framework for building multi-agent systems with tool calling capabilities\n", - "- `openinference-instrumentation-openai-agents`: Automatic instrumentation library for OpenAI Agents operations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize the Agenta SDK:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import asyncio\n", - "import agenta as ag\n", - "from agents import Agent, Runner\n", - "from openinference.instrumentation.openai_agents import OpenAIAgentsInstrumentor\n", - "\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "os.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key\" # Required for OpenAI Agents SDK\n", - "\n", - "\n", - "# Start Agenta SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable OpenAI Agents Monitoring\n", - "\n", - "Initialize the OpenInference OpenAI Agents instrumentation to automatically capture agent operations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Enable OpenAI Agents instrumentation\n", - "OpenAIAgentsInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Build Your Instrumented Multi-Agent Application\n", - "\n", - "Here's a complete example showcasing a multi-agent translation system with Agenta instrumentation:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Define specialized translation agents\n", - "spanish_agent = Agent(\n", - " name=\"Spanish agent\",\n", - " instructions=\"You translate the user's message to Spanish\",\n", - ")\n", - "\n", - "french_agent = Agent(\n", - " name=\"French agent\",\n", - " instructions=\"You translate the user's message to French\",\n", - ")\n", - "\n", - "german_agent = Agent(\n", - " name=\"German agent\",\n", - " instructions=\"You translate the user's message to German\",\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Create orchestrator agent with tool integration\n", - "orchestrator_agent = Agent(\n", - " name=\"orchestrator_agent\",\n", - " instructions=(\n", - " \"You are a translation agent. You use the tools given to you to translate.\"\n", - " \"If asked for multiple translations, you call the relevant tools.\"\n", - " ),\n", - " tools=[\n", - " spanish_agent.as_tool(\n", - " tool_name=\"translate_to_spanish\",\n", - " tool_description=\"Translate the user's message to Spanish\",\n", - " ),\n", - " french_agent.as_tool(\n", - " tool_name=\"translate_to_french\",\n", - " tool_description=\"Translate the user's message to French\",\n", - " ),\n", - " german_agent.as_tool(\n", - " tool_name=\"translate_to_german\",\n", - " tool_description=\"Translate the user's message to German\",\n", - " ),\n", - " ],\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "async def duolingo(query: str):\n", - " result = await Runner.run(orchestrator_agent, input=query)\n", - " return result.final_output" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Run the Example" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example usage\n", - "async def main():\n", - " response = await duolingo(\"What is 'What's your name' in French?\")\n", - " print(\"Response:\", response)\n", - "\n", - "\n", - "# Run the example\n", - "await main()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"agent\")\n", - "def specialized_agent_function(input_data: str):\n", - " # Agent-specific logic implementation\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 7: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete multi-agent workflow execution timeline\n", - "- Agent initialization and configuration steps\n", - "- Tool calling and inter-agent communication\n", - "- Orchestrator decision-making processes\n", - "- Individual agent reasoning and response generation\n", - "- Performance metrics and timing analysis\n", - "\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-openinference-openai-agents-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing OpenAI Agents SDK application trace with detailed execution steps\">\n", - "\n", - "\n", - "The observability interface provides insights for:\n", - "- Debug complex multi-agent interactions and tool calling\n", - "- Monitor agent performance and decision-making patterns\n", - "- Analyze orchestration effectiveness and workflow optimization\n", - "- Track application behavior trends and identify bottlenecks" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Advanced Usage\n", - "\n", - "### Custom Span Configuration\n", - "\n", - "Customize instrumentation for different application components:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def multi_agent_pipeline(query: str):\n", - " return asyncio.run(duolingo(query))\n", - "\n", - "\n", - "@ag.instrument(spankind=\"agent\")\n", - "def custom_agent_handler(agent_input: str):\n", - " # Custom agent logic\n", - " pass\n", - "\n", - "\n", - "@ag.instrument(spankind=\"tool\")\n", - "def external_tool_integration(tool_input: str):\n", - " # External tool integration\n", - " return tool_input" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Real-world Examples\n", - "\n", - "#### Customer Support Agent System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "support_agent = Agent(\n", - " name=\"Support Agent\",\n", - " instructions=\"You help customers with their inquiries and route complex issues to specialists\",\n", - ")\n", - "\n", - "billing_agent = Agent(\n", - " name=\"Billing Agent\",\n", - " instructions=\"You handle billing-related questions and payment issues\",\n", - ")\n", - "\n", - "technical_agent = Agent(\n", - " name=\"Technical Agent\",\n", - " instructions=\"You provide technical support and troubleshooting assistance\",\n", - ")\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "async def customer_support_system(customer_query: str):\n", - " orchestrator = Agent(\n", - " name=\"Support Orchestrator\",\n", - " instructions=\"Route customer queries to the appropriate specialist agent\",\n", - " tools=[\n", - " support_agent.as_tool(\n", - " \"general_support\", \"Handle general customer inquiries\"\n", - " ),\n", - " billing_agent.as_tool(\n", - " \"billing_support\", \"Handle billing and payment issues\"\n", - " ),\n", - " technical_agent.as_tool(\n", - " \"technical_support\", \"Provide technical assistance\"\n", - " ),\n", - " ],\n", - " )\n", - "\n", - " result = await Runner.run(orchestrator, input=customer_query)\n", - " return result.final_output" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Research Analysis Team" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"chain\")\n", - "async def research_analysis_pipeline(research_topic: str):\n", - " data_collector = Agent(\n", - " name=\"Data Collector\",\n", - " instructions=\"Gather relevant information and data on the given topic\",\n", - " )\n", - "\n", - " analyst = Agent(\n", - " name=\"Research Analyst\",\n", - " instructions=\"Analyze collected data and provide insights\",\n", - " )\n", - "\n", - " reporter = Agent(\n", - " name=\"Report Writer\",\n", - " instructions=\"Create comprehensive reports based on analysis\",\n", - " tools=[\n", - " data_collector.as_tool(\"collect_data\", \"Gather relevant research data\"),\n", - " analyst.as_tool(\"analyze_data\", \"Perform data analysis and insights\"),\n", - " ],\n", - " )\n", - "\n", - " result = await Runner.run(reporter, input=research_topic)\n", - " return result.final_output" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Content Creation Workflow" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "async def content_creation_system(content_brief: str):\n", - " writer = Agent(\n", - " name=\"Content Writer\",\n", - " instructions=\"Create engaging content based on the brief\",\n", - " )\n", - "\n", - " editor = Agent(\n", - " name=\"Content Editor\",\n", - " instructions=\"Review and improve content quality and style\",\n", - " )\n", - "\n", - " seo_specialist = Agent(\n", - " name=\"SEO Specialist\",\n", - " instructions=\"Optimize content for search engines\",\n", - " )\n", - "\n", - " content_manager = Agent(\n", - " name=\"Content Manager\",\n", - " instructions=\"Coordinate the content creation process and ensure quality\",\n", - " tools=[\n", - " writer.as_tool(\"write_content\", \"Generate initial content draft\"),\n", - " editor.as_tool(\"edit_content\", \"Review and edit content\"),\n", - " seo_specialist.as_tool(\"optimize_seo\", \"Optimize content for SEO\"),\n", - " ],\n", - " )\n", - "\n", - " result = await Runner.run(content_manager, input=content_brief)\n", - " return result.final_output" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test the Advanced Examples" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test customer support system\n", - "support_response = await customer_support_system(\n", - " \"I have a billing question about my subscription\"\n", - ")\n", - "print(\"Support Response:\", support_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test research analysis pipeline\n", - "research_response = await research_analysis_pipeline(\"Impact of AI on healthcare\")\n", - "print(\"Research Response:\", research_response)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test content creation system\n", - "content_response = await content_creation_system(\n", - " \"Write a blog post about sustainable energy solutions\"\n", - ")\n", - "print(\"Content Response:\", content_response)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/integrations/pydanticai-integration.ipynb b/examples/jupyter/integrations/pydanticai-integration.ipynb deleted file mode 100644 index 630bcddcee..0000000000 --- a/examples/jupyter/integrations/pydanticai-integration.ipynb +++ /dev/null @@ -1,710 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Integrate Agenta with PydanticAI Logfire\n", - "\n", - "This notebook demonstrates how to connect **Agenta** with **PydanticAI** and **Logfire** for comprehensive observability and debugging of your AI agent applications.\n", - "\n", - "> **What is Agenta?** [Agenta](https://agenta.ai) is an open-source LLMOps platform designed to streamline the deployment, management, and scaling of large language models. It offers comprehensive observability, testing, and deployment capabilities for AI applications.\n", - "\n", - "> **What is PydanticAI?** [PydanticAI](https://ai.pydantic.dev/) is a Python agent framework designed to make it less painful to build production-grade applications with generative AI. It provides type safety, structured outputs, and dependency injection for building robust AI agents.\n", - "\n", - "> **What is Logfire?** [Logfire](https://logfire.pydantic.dev/) is an observability platform from Pydantic that provides structured logging and tracing capabilities, specifically designed to work seamlessly with PydanticAI applications." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Implementation Guide\n", - "\n", - "Follow this tutorial to set up PydanticAI with Logfire and Agenta's observability platform for real-time application insights." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 1: Install Required Dependencies\n", - "\n", - "Install the necessary Python packages for this integration:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install pydantic-ai[examples] logfire agenta" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Package Descriptions:**\n", - "- `pydantic-ai[examples]`: The PydanticAI framework with example dependencies\n", - "- `logfire`: Pydantic's observability platform for structured logging and tracing\n", - "- `agenta`: Core SDK for Agenta's prompt engineering and observability platform" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 2: Setup and Configuration\n", - "\n", - "Configure your environment and initialize both Agenta and Logfire:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from dataclasses import dataclass\n", - "from pydantic import BaseModel, Field\n", - "from pydantic_ai import Agent, RunContext\n", - "import logfire\n", - "import agenta as ag\n", - "\n", - "# Load configuration from environment\n", - "os.environ[\"AGENTA_API_KEY\"] = \"your_agenta_api_key\"\n", - "os.environ[\n", - " \"AGENTA_HOST\"\n", - "] = \"https://cloud.agenta.ai\" # Optional, defaults to the Agenta cloud API\n", - "\n", - "# Initialize Agenta SDK\n", - "ag.init()\n", - "\n", - "# Configure Logfire for local development\n", - "logfire.configure(\n", - " service_name=\"my_logfire_service\", send_to_logfire=False, scrubbing=False\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**What does `ag.init()` do?**\n", - "This function initializes the Agenta SDK and sets up the necessary configuration for observability. It establishes connection to the Agenta platform, configures tracing and logging settings, and prepares the instrumentation context for your application.\n", - "\n", - "**Logfire Configuration:**\n", - "The `logfire.configure()` function sets up Logfire's observability features. Setting `send_to_logfire=False` keeps traces local for development, while `scrubbing=False` preserves all data for debugging." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 3: Enable PydanticAI Instrumentation\n", - "\n", - "PydanticAI comes with built-in observability support that integrates with OpenTelemetry-compatible systems:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Enable automatic instrumentation for async database operations\n", - "logfire.instrument_asyncpg()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 4: Build Your Instrumented PydanticAI Application\n", - "\n", - "Here's a complete example showcasing a banking support agent with Agenta instrumentation:\n", - "\n", - "#### Create Mock Database" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Mock database for demonstration\n", - "class DatabaseConn:\n", - " \"\"\"Fake database for example purposes.\"\"\"\n", - "\n", - " @classmethod\n", - " async def customer_name(cls, *, id: int) -> str | None:\n", - " if id == 123:\n", - " return \"John\"\n", - " return None\n", - "\n", - " @classmethod\n", - " async def customer_balance(cls, *, id: int, include_pending: bool) -> float:\n", - " if id == 123 and include_pending:\n", - " return 123.45\n", - " else:\n", - " raise ValueError(\"Customer not found\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Define Dependencies and Output Models" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Dependencies for the support agent\n", - "@dataclass\n", - "class SupportDependencies:\n", - " customer_id: int\n", - " including_pending: bool\n", - " db: DatabaseConn\n", - "\n", - "\n", - "# Structured output model\n", - "class SupportOutput(BaseModel):\n", - " support_advice: str = Field(description=\"Advice returned to the customer\")\n", - " block_card: bool = Field(description=\"Whether to block their card or not\")\n", - " risk: int = Field(description=\"Risk level of query\", ge=0, le=10)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create the Support Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Create the support agent with instrumentation\n", - "support_agent = Agent(\n", - " \"openai:gpt-4o\",\n", - " deps_type=SupportDependencies,\n", - " output_type=SupportOutput,\n", - " system_prompt=(\n", - " \"You are a support agent in our bank, give the \"\n", - " \"customer support and judge the risk level of their query. \"\n", - " \"Reply using the customer's name.\"\n", - " ),\n", - " instrument=True, # Enable built-in PydanticAI instrumentation\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Add Dynamic System Prompt and Tools" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Dynamic system prompt with customer context\n", - "@support_agent.system_prompt\n", - "async def add_customer_name(ctx: RunContext[SupportDependencies]) -> str:\n", - " customer_name = await ctx.deps.db.customer_name(id=ctx.deps.customer_id)\n", - " return f\"The customer's name is {customer_name!r}\"\n", - "\n", - "\n", - "# Agent tool for balance inquiries\n", - "@support_agent.tool\n", - "async def customer_balance(ctx: RunContext[SupportDependencies]) -> str:\n", - " \"\"\"Returns the customer's current account balance.\"\"\"\n", - " balance = await ctx.deps.db.customer_balance(\n", - " id=ctx.deps.customer_id,\n", - " include_pending=ctx.deps.including_pending,\n", - " )\n", - " return f\"${balance:.2f}\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Create Agenta-Instrumented Functions" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Agenta-instrumented functions\n", - "@ag.instrument()\n", - "def bank_balance(customer_id: int, query: str, include_pending: bool = True):\n", - " \"\"\"Returns the customer's current account balance.\"\"\"\n", - " deps = SupportDependencies(\n", - " customer_id=customer_id,\n", - " including_pending=include_pending,\n", - " db=DatabaseConn(),\n", - " )\n", - " result = support_agent.run_sync(query, deps=deps)\n", - " return result\n", - "\n", - "\n", - "@ag.instrument()\n", - "def block_card(customer_id: int, query: str, include_pending: bool = True):\n", - " \"\"\"Blocks the customer's card if they report it lost.\"\"\"\n", - " deps = SupportDependencies(\n", - " customer_id=customer_id,\n", - " including_pending=include_pending,\n", - " db=DatabaseConn(),\n", - " )\n", - " result = support_agent.run_sync(query, deps=deps)\n", - " return result" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test the Banking Support Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example usage\n", - "# Agent 1: get user's account balance\n", - "result = bank_balance(123, \"What is my balance?\", True)\n", - "print(\"Balance Query Result:\")\n", - "print(f\"Advice: {result.output.support_advice}\")\n", - "print(f\"Risk Level: {result.output.risk}\")\n", - "print(f\"Block Card: {result.output.block_card}\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Agent 2: block user's card if they report it lost\n", - "result = block_card(123, \"I just lost my card!\", True)\n", - "print(\"Card Block Result:\")\n", - "print(f\"Advice: {result.output.support_advice}\")\n", - "print(f\"Risk Level: {result.output.risk}\")\n", - "print(f\"Block Card: {result.output.block_card}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 5: Understanding the @ag.instrument() Decorator\n", - "\n", - "The `@ag.instrument()` decorator automatically captures all input and output data from your function, enabling comprehensive observability without manual instrumentation.\n", - "\n", - "**Span Type Configuration:**\n", - "Use the `spankind` parameter to categorize operations in Agenta WebUI. Available options:\n", - "\n", - "- `agent` - Autonomous agent behaviors\n", - "- `chain` - Sequential processing workflows\n", - "- `workflow` - Complete application processes (default)\n", - "- `tool` - Utility and helper functions\n", - "- `embedding` - Vector embedding operations\n", - "- `query` - Search and retrieval tasks\n", - "- `completion` - Text generation operations\n", - "- `chat` - Conversational interfaces\n", - "- `rerank` - Result ordering operations\n", - "\n", - "**Standard Behavior:**\n", - "By default, when `spankind` is not specified, the operation becomes a root-level span, categorized as a `workflow` in Agenta." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example with custom span classification:\n", - "@ag.instrument(spankind=\"agent\")\n", - "def customer_service_agent(query: str):\n", - " # Agent-specific logic implementation\n", - " pass" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Step 6: View Traces in Agenta\n", - "\n", - "After running your application, access detailed execution traces through Agenta's dashboard. The observability data includes:\n", - "\n", - "- Complete agent workflow execution timeline\n", - "- PydanticAI agent initialization and configuration\n", - "- Tool function calls and dependency injection\n", - "- LLM interactions and structured output validation\n", - "- Database queries and external service calls\n", - "- Performance metrics and timing analysis\n", - "\n", - "<img \n", - " style=\"display: block; margin: 20px; text-align: center\"\n", - " src=\"./images/agenta-pydanticai-logfire-trace.png\"\n", - " width=\"90%\"\n", - " alt=\"Agenta dashboard showing PydanticAI application trace with detailed execution steps\">\n", - "\n", - "The observability interface provides insights for:\n", - "- Debug complex agent interactions and tool usage\n", - "- Monitor dependency injection and context management\n", - "- Analyze LLM performance and structured output validation\n", - "- Track database queries and external API calls" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Advanced Usage\n", - "\n", - "### Custom Span Configuration\n", - "\n", - "Customize instrumentation for different application components:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def customer_support_pipeline(customer_id: int, query: str):\n", - " return bank_balance(customer_id, query)\n", - "\n", - "\n", - "@ag.instrument(spankind=\"tool\")\n", - "def external_api_integration(data: dict):\n", - " # External API call logic\n", - " pass\n", - "\n", - "\n", - "@ag.instrument(spankind=\"agent\")\n", - "def specialized_banking_agent(context: dict):\n", - " # Specialized agent implementation\n", - " return context" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Real-world Examples\n", - "\n", - "#### Multi-Agent Customer Service System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class CustomerServiceDeps:\n", - " def __init__(self, customer_id: int, db: DatabaseConn):\n", - " self.customer_id = customer_id\n", - " self.db = db\n", - "\n", - "\n", - "class ServiceOutput(BaseModel):\n", - " response: str = Field(description=\"Customer service response\")\n", - " escalate: bool = Field(description=\"Whether to escalate to human agent\")\n", - " satisfaction_score: int = Field(description=\"Predicted satisfaction\", ge=1, le=10)\n", - "\n", - "\n", - "# General inquiry agent\n", - "general_agent = Agent(\n", - " \"openai:gpt-4o\",\n", - " deps_type=CustomerServiceDeps,\n", - " output_type=ServiceOutput,\n", - " system_prompt=\"You are a helpful customer service agent for general inquiries.\",\n", - " instrument=True,\n", - ")\n", - "\n", - "# Technical support agent\n", - "technical_agent = Agent(\n", - " \"openai:gpt-4o\",\n", - " deps_type=CustomerServiceDeps,\n", - " output_type=ServiceOutput,\n", - " system_prompt=\"You are a technical support specialist for banking applications.\",\n", - " instrument=True,\n", - ")\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def route_customer_query(customer_id: int, query: str, query_type: str = \"general\"):\n", - " \"\"\"Route customer queries to appropriate specialized agents.\"\"\"\n", - " deps = CustomerServiceDeps(customer_id=customer_id, db=DatabaseConn())\n", - "\n", - " if query_type == \"technical\":\n", - " result = technical_agent.run_sync(query, deps=deps)\n", - " else:\n", - " result = general_agent.run_sync(query, deps=deps)\n", - "\n", - " return result" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Multi-Agent System" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test general inquiry\n", - "general_result = route_customer_query(123, \"What are your bank hours?\", \"general\")\n", - "print(\"General Inquiry Result:\")\n", - "print(f\"Response: {general_result.output.response}\")\n", - "print(f\"Escalate: {general_result.output.escalate}\")\n", - "print(f\"Satisfaction Score: {general_result.output.satisfaction_score}\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test technical inquiry\n", - "technical_result = route_customer_query(123, \"My mobile app is crashing\", \"technical\")\n", - "print(\"Technical Inquiry Result:\")\n", - "print(f\"Response: {technical_result.output.response}\")\n", - "print(f\"Escalate: {technical_result.output.escalate}\")\n", - "print(f\"Satisfaction Score: {technical_result.output.satisfaction_score}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Fraud Detection Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class FraudDeps:\n", - " def __init__(self, transaction_id: str, customer_id: int):\n", - " self.transaction_id = transaction_id\n", - " self.customer_id = customer_id\n", - "\n", - "\n", - "class FraudOutput(BaseModel):\n", - " is_fraudulent: bool = Field(description=\"Whether transaction is fraudulent\")\n", - " confidence: float = Field(description=\"Confidence score\", ge=0.0, le=1.0)\n", - " reason: str = Field(description=\"Explanation for the decision\")\n", - " action: str = Field(description=\"Recommended action\")\n", - "\n", - "\n", - "fraud_agent = Agent(\n", - " \"openai:gpt-4o\",\n", - " deps_type=FraudDeps,\n", - " output_type=FraudOutput,\n", - " system_prompt=(\n", - " \"You are a fraud detection specialist. Analyze transactions \"\n", - " \"and determine if they are potentially fraudulent.\"\n", - " ),\n", - " instrument=True,\n", - ")\n", - "\n", - "\n", - "@fraud_agent.tool\n", - "async def get_transaction_history(ctx: RunContext[FraudDeps]) -> str:\n", - " \"\"\"Get recent transaction history for the customer.\"\"\"\n", - " # Mock transaction history\n", - " return f\"Recent transactions for customer {ctx.deps.customer_id}: $50.00, $25.00, $100.00\"\n", - "\n", - "\n", - "@fraud_agent.tool\n", - "async def get_customer_profile(ctx: RunContext[FraudDeps]) -> str:\n", - " \"\"\"Get customer profile and spending patterns.\"\"\"\n", - " # Mock customer profile\n", - " return f\"Customer {ctx.deps.customer_id}: Average monthly spending $500, Location: New York\"\n", - "\n", - "\n", - "@ag.instrument(spankind=\"agent\")\n", - "def analyze_transaction(\n", - " transaction_id: str, customer_id: int, amount: float, location: str\n", - "):\n", - " \"\"\"Analyze a transaction for potential fraud.\"\"\"\n", - " deps = FraudDeps(transaction_id=transaction_id, customer_id=customer_id)\n", - " query = f\"Analyze transaction {transaction_id}: ${amount} in {location}\"\n", - "\n", - " result = fraud_agent.run_sync(query, deps=deps)\n", - " return result" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Fraud Detection" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test fraud detection\n", - "fraud_result = analyze_transaction(\"txn_12345\", 123, 5000.0, \"Nigeria\")\n", - "print(\"Fraud Detection Result:\")\n", - "print(f\"Is Fraudulent: {fraud_result.output.is_fraudulent}\")\n", - "print(f\"Confidence: {fraud_result.output.confidence}\")\n", - "print(f\"Reason: {fraud_result.output.reason}\")\n", - "print(f\"Action: {fraud_result.output.action}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Investment Advisory Agent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "class InvestmentDeps:\n", - " def __init__(self, customer_id: int, portfolio_value: float):\n", - " self.customer_id = customer_id\n", - " self.portfolio_value = portfolio_value\n", - "\n", - "\n", - "class InvestmentOutput(BaseModel):\n", - " recommendation: str = Field(description=\"Investment recommendation\")\n", - " risk_level: str = Field(description=\"Risk level assessment\")\n", - " expected_return: float = Field(description=\"Expected annual return percentage\")\n", - " timeframe: str = Field(description=\"Recommended investment timeframe\")\n", - "\n", - "\n", - "investment_agent = Agent(\n", - " \"openai:gpt-4o\",\n", - " deps_type=InvestmentDeps,\n", - " output_type=InvestmentOutput,\n", - " system_prompt=(\n", - " \"You are an investment advisor. Provide personalized investment \"\n", - " \"recommendations based on customer profile and market conditions.\"\n", - " ),\n", - " instrument=True,\n", - ")\n", - "\n", - "\n", - "@investment_agent.tool\n", - "async def get_market_data(ctx: RunContext[InvestmentDeps]) -> str:\n", - " \"\"\"Get current market conditions and trends.\"\"\"\n", - " return \"Current market: S&P 500 up 2%, bonds stable, commodities mixed\"\n", - "\n", - "\n", - "@investment_agent.tool\n", - "async def get_customer_risk_profile(ctx: RunContext[InvestmentDeps]) -> str:\n", - " \"\"\"Get customer's risk tolerance and investment goals.\"\"\"\n", - " return f\"Customer {ctx.deps.customer_id}: Moderate risk tolerance, retirement savings goal\"\n", - "\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def get_investment_advice(customer_id: int, portfolio_value: float, query: str):\n", - " \"\"\"Provide investment advice based on customer profile and query.\"\"\"\n", - " deps = InvestmentDeps(customer_id=customer_id, portfolio_value=portfolio_value)\n", - " result = investment_agent.run_sync(query, deps=deps)\n", - " return result" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Test Investment Advisory" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Test investment advice\n", - "investment_result = get_investment_advice(\n", - " 123, 50000.0, \"I want to diversify my portfolio for retirement\"\n", - ")\n", - "print(\"Investment Advisory Result:\")\n", - "print(f\"Recommendation: {investment_result.output.recommendation}\")\n", - "print(f\"Risk Level: {investment_result.output.risk_level}\")\n", - "print(f\"Expected Return: {investment_result.output.expected_return}%\")\n", - "print(f\"Timeframe: {investment_result.output.timeframe}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "For more detailed information about Agenta's observability features and advanced configuration options, visit the [Agenta Observability SDK Documentation](/observability/observability-sdk)." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/observability/analytics-api-tutorial.ipynb b/examples/jupyter/observability/analytics-api-tutorial.ipynb deleted file mode 100644 index d5097dfbf6..0000000000 --- a/examples/jupyter/observability/analytics-api-tutorial.ipynb +++ /dev/null @@ -1,714 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Analytics API - Tutorial\n", - "\n", - "This tutorial demonstrates how to use the Agenta Analytics API to analyze LLM performance metrics. You'll learn how to:\n", - "\n", - "- Retrieve aggregated metrics over time\n", - "- Analyze costs, latency, and token usage\n", - "- Filter analytics by status and other attributes\n", - "- Track error trends and failure rates\n", - "- Compare performance across different time periods\n", - "\n", - "## What You'll Build\n", - "\n", - "We'll create analytics queries that:\n", - "1. Track daily LLM costs and spending trends\n", - "2. Monitor error rates and identify peak error times\n", - "3. Analyze token usage patterns\n", - "4. Compare performance metrics over time\n", - "5. Generate cost reports and visualizations" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Setup\n", - "\n", - "Before using the API, you need your Agenta API key. You can create API keys from the Settings page in your Agenta workspace." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import requests\n", - "import json\n", - "from datetime import datetime, timedelta, timezone\n", - "from getpass import getpass\n", - "\n", - "# Configuration\n", - "AGENTA_HOST = os.getenv(\"AGENTA_HOST\", \"https://cloud.agenta.ai\")\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " api_key = getpass(\"Enter your Agenta API key: \")\n", - " os.environ[\"AGENTA_API_KEY\"] = api_key\n", - "\n", - "# Setup base configuration\n", - "BASE_URL = f\"{AGENTA_HOST}/api/preview/tracing/spans/analytics\"\n", - "HEADERS = {\n", - " \"Authorization\": f\"ApiKey {api_key}\",\n", - " \"Content-Type\": \"application/json\"\n", - "}\n", - "\n", - "print(\"✅ Setup complete!\")\n", - "print(f\"API endpoint: {BASE_URL}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 1: Get Recent Metrics\n", - "\n", - "Let's start by retrieving metrics for the last 7 days with daily buckets. Each bucket contains aggregated metrics for all traces within that day." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get analytics for last 7 days with daily buckets\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=7)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # 1440 minutes = daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "print(f\"📊 Found {data['count']} daily buckets\\n\")\n", - "\n", - "# Show all days with activity\n", - "for bucket in data['buckets']:\n", - " if bucket['total']['count'] > 0:\n", - " date = bucket['timestamp'][:10]\n", - " print(f\"Date: {date}\")\n", - " print(f\" Traces: {bucket['total']['count']}\")\n", - " print(f\" Cost: ${bucket['total']['costs']:.4f}\")\n", - " print(f\" Tokens: {bucket['total']['tokens']:,.0f}\")\n", - " print(f\" Errors: {bucket['errors']['count']}\\n\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 2: Track Daily Costs\n", - "\n", - "Calculate total costs and generate summary statistics over a time period." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get daily metrics for last 30 days\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=30)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "# Calculate totals\n", - "total_traces = sum(b['total']['count'] for b in data['buckets'])\n", - "total_cost = sum(b['total']['costs'] for b in data['buckets'])\n", - "total_tokens = sum(b['total']['tokens'] for b in data['buckets'])\n", - "total_errors = sum(b['errors']['count'] for b in data['buckets'])\n", - "\n", - "print(\"💰 Cost Summary (Last 30 Days)\")\n", - "print(\"=\" * 50)\n", - "print(f\"Total Cost: ${total_cost:.2f}\")\n", - "print(f\"Total Requests: {total_traces:,}\")\n", - "if total_traces > 0:\n", - " print(f\"Average Cost per Request: ${total_cost/total_traces:.6f}\")\n", - " print(f\"Total Tokens: {total_tokens:,.0f}\")\n", - " print(f\"Average Tokens per Request: {total_tokens/total_traces:.1f}\")\n", - " print(f\"Error Rate: {(total_errors/total_traces)*100:.2f}%\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 3: Analyze Error Trends\n", - "\n", - "Monitor error rates over time to identify patterns and peak error times." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get hourly metrics for last 7 days\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=7)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 60, # Hourly buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "print(\"🚨 Error Analysis\")\n", - "print(\"=\" * 50)\n", - "\n", - "# Find hours with high error rates\n", - "high_error_periods = []\n", - "for bucket in data['buckets']:\n", - " if bucket['total']['count'] > 0:\n", - " error_rate = (bucket['errors']['count'] / bucket['total']['count']) * 100\n", - " if error_rate > 5: # Flag periods with > 5% errors\n", - " high_error_periods.append({\n", - " 'time': bucket['timestamp'],\n", - " 'error_rate': error_rate,\n", - " 'total': bucket['total']['count'],\n", - " 'errors': bucket['errors']['count']\n", - " })\n", - "\n", - "if high_error_periods:\n", - " print(f\"\\nFound {len(high_error_periods)} periods with high error rates (>5%):\\n\")\n", - " for period in high_error_periods[:10]: # Show top 10\n", - " print(f\" {period['time']}\")\n", - " print(f\" Error Rate: {period['error_rate']:.1f}%\")\n", - " print(f\" Total: {period['total']}, Errors: {period['errors']}\\n\")\n", - "else:\n", - " print(\"✅ No high error rates detected in the last 7 days\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 4: Filter by Status Code\n", - "\n", - "Analyze only successful traces by filtering on status code." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get successful traces only\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=7)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " },\n", - " \"filter\": {\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"status.code\",\n", - " \"operator\": \"eq\",\n", - " \"value\": \"STATUS_CODE_OK\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "# Calculate success metrics\n", - "total_count = sum(b['total']['count'] for b in data['buckets'])\n", - "total_cost = sum(b['total']['costs'] for b in data['buckets'])\n", - "total_duration = sum(b['total']['duration'] for b in data['buckets'])\n", - "\n", - "print(\"✅ Successful Traces (Last 7 Days)\")\n", - "print(\"=\" * 50)\n", - "print(f\"Count: {total_count:,}\")\n", - "print(f\"Total Cost: ${total_cost:.4f}\")\n", - "if total_count > 0:\n", - " print(f\"Avg Duration: {total_duration/total_count:.0f}ms\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 5: Track Token Usage\n", - "\n", - "Monitor token consumption patterns over time." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get daily token usage for last 7 days\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=7)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "print(\"🎯 Token Usage Analysis\")\n", - "print(\"=\" * 50)\n", - "print(\"\\nDaily Token Usage:\\n\")\n", - "\n", - "for bucket in data['buckets']:\n", - " if bucket['total']['count'] > 0:\n", - " date = bucket['timestamp'][:10]\n", - " avg_tokens = bucket['total']['tokens'] / bucket['total']['count']\n", - " print(f\" {date}: {bucket['total']['tokens']:>8,.0f} total ({avg_tokens:>6.0f} avg)\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 6: Analyze Performance\n", - "\n", - "Track latency trends over time to identify performance changes." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get hourly performance for last 24 hours\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=1)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 60, # Hourly buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "print(\"⚡ Performance Analysis (Last 24 Hours)\")\n", - "print(\"=\" * 50)\n", - "print(\"\\nHourly Average Latency:\\n\")\n", - "\n", - "latencies = []\n", - "for bucket in data['buckets']:\n", - " if bucket['total']['count'] > 0:\n", - " avg_duration = bucket['total']['duration'] / bucket['total']['count']\n", - " latencies.append(avg_duration)\n", - " hour = bucket['timestamp'][11:16] # Extract HH:MM\n", - " print(f\" {hour}: {avg_duration:7.0f}ms\")\n", - "\n", - "if latencies:\n", - " print(f\"\\n📈 Statistics:\")\n", - " print(f\" Min: {min(latencies):.0f}ms\")\n", - " print(f\" Max: {max(latencies):.0f}ms\")\n", - " print(f\" Avg: {sum(latencies)/len(latencies):.0f}ms\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 7: Generate Monthly Cost Report\n", - "\n", - "Create a comprehensive monthly report with cost breakdown and usage statistics." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get monthly metrics\n", - "newest = datetime.now(timezone.utc)\n", - "oldest = newest - timedelta(days=30)\n", - "\n", - "payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - "data = response.json()\n", - "\n", - "# Calculate totals\n", - "total_traces = sum(b['total']['count'] for b in data['buckets'])\n", - "total_cost = sum(b['total']['costs'] for b in data['buckets'])\n", - "total_tokens = sum(b['total']['tokens'] for b in data['buckets'])\n", - "total_duration = sum(b['total']['duration'] for b in data['buckets'])\n", - "total_errors = sum(b['errors']['count'] for b in data['buckets'])\n", - "\n", - "print(\"📊 MONTHLY COST REPORT\")\n", - "print(\"=\" * 60)\n", - "print(f\"Period: {oldest.strftime('%Y-%m-%d')} to {newest.strftime('%Y-%m-%d')}\")\n", - "print(\"=\" * 60)\n", - "\n", - "print(\"\\n💰 Cost Summary:\")\n", - "print(f\" Total Cost: ${total_cost:.2f}\")\n", - "if total_traces > 0:\n", - " print(f\" Average Cost per Request: ${total_cost/total_traces:.6f}\")\n", - "daily_cost = total_cost / 30\n", - "print(f\" Average Daily Cost: ${daily_cost:.2f}\")\n", - "print(f\" Projected Monthly Cost: ${daily_cost * 30:.2f}\")\n", - "\n", - "print(\"\\n📊 Usage Statistics:\")\n", - "print(f\" Total Requests: {total_traces:,}\")\n", - "successful = total_traces - total_errors\n", - "print(f\" Successful: {successful:,}\")\n", - "print(f\" Failed: {total_errors:,}\")\n", - "if total_traces > 0:\n", - " print(f\" Failure Rate: {(total_errors/total_traces)*100:.2f}%\")\n", - " print(f\" Average Daily Requests: {total_traces/30:.0f}\")\n", - "\n", - "print(\"\\n🎯 Performance Metrics:\")\n", - "if total_traces > 0:\n", - " print(f\" Average Latency: {total_duration/total_traces:.0f}ms\")\n", - "print(f\" Total Tokens: {total_tokens:,.0f}\")\n", - "if total_traces > 0:\n", - " print(f\" Average Tokens per Request: {total_tokens/total_traces:.1f}\")\n", - " print(f\" Average Daily Tokens: {total_tokens/30:,.0f}\")\n", - "\n", - "# Cost per 1K tokens\n", - "if total_tokens > 0:\n", - " cost_per_1k = (total_cost / total_tokens) * 1000\n", - " print(f\" Cost per 1K Tokens: ${cost_per_1k:.4f}\")\n", - "\n", - "# Find most expensive days\n", - "print(\"\\n📅 Top 5 Most Expensive Days:\")\n", - "days_with_data = [(b['timestamp'][:10], b['total']['costs'], b['total']['count']) \n", - " for b in data['buckets'] if b['total']['count'] > 0]\n", - "sorted_days = sorted(days_with_data, key=lambda x: x[1], reverse=True)\n", - "for i, (date, cost, count) in enumerate(sorted_days[:5], 1):\n", - " print(f\" {i}. {date}: ${cost:.4f} ({count} requests)\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 8: Compare Week-over-Week Performance\n", - "\n", - "Analyze how metrics change from one week to the next." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Helper function to get weekly metrics\n", - "def get_weekly_metrics(weeks_ago=0):\n", - " newest = datetime.now(timezone.utc) - timedelta(weeks=weeks_ago)\n", - " oldest = newest - timedelta(days=7)\n", - " \n", - " payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 10080, # Weekly bucket\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - " }\n", - " \n", - " response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - " data = response.json()\n", - " \n", - " if data['buckets']:\n", - " bucket = data['buckets'][0]\n", - " return {\n", - " 'count': bucket['total']['count'],\n", - " 'costs': bucket['total']['costs'],\n", - " 'duration': bucket['total']['duration'],\n", - " 'tokens': bucket['total']['tokens'],\n", - " 'errors': bucket['errors']['count']\n", - " }\n", - " return None\n", - "\n", - "this_week = get_weekly_metrics(0)\n", - "last_week = get_weekly_metrics(1)\n", - "\n", - "def calc_change(current, previous):\n", - " if previous == 0:\n", - " return \"N/A\"\n", - " change = ((current - previous) / previous) * 100\n", - " symbol = \"📈\" if change > 0 else \"📉\" if change < 0 else \"➡️\"\n", - " return f\"{symbol} {change:+.1f}%\"\n", - "\n", - "print(\"📊 Week-over-Week Comparison\")\n", - "print(\"=\" * 60)\n", - "\n", - "if this_week and last_week:\n", - " print(\"\\n💰 Cost:\")\n", - " print(f\" Last Week: ${last_week['costs']:.4f}\")\n", - " print(f\" This Week: ${this_week['costs']:.4f}\")\n", - " print(f\" Change: {calc_change(this_week['costs'], last_week['costs'])}\")\n", - "\n", - " print(\"\\n📊 Volume:\")\n", - " print(f\" Last Week: {last_week['count']:,} requests\")\n", - " print(f\" This Week: {this_week['count']:,} requests\")\n", - " print(f\" Change: {calc_change(this_week['count'], last_week['count'])}\")\n", - "\n", - " print(\"\\n⚡ Performance:\")\n", - " last_avg = last_week['duration'] / last_week['count'] if last_week['count'] > 0 else 0\n", - " this_avg = this_week['duration'] / this_week['count'] if this_week['count'] > 0 else 0\n", - " print(f\" Last Week: {last_avg:.0f}ms\")\n", - " print(f\" This Week: {this_avg:.0f}ms\")\n", - " print(f\" Change: {calc_change(this_avg, last_avg)}\")\n", - "\n", - " print(\"\\n🚨 Error Rate:\")\n", - " last_err_rate = (last_week['errors'] / last_week['count'] * 100) if last_week['count'] > 0 else 0\n", - " this_err_rate = (this_week['errors'] / this_week['count'] * 100) if this_week['count'] > 0 else 0\n", - " print(f\" Last Week: {last_err_rate:.2f}%\")\n", - " print(f\" This Week: {this_err_rate:.2f}%\")\n", - " print(f\" Change: {calc_change(this_err_rate, last_err_rate)}\")\n", - "else:\n", - " print(\"\\n⚠️ Not enough data for comparison\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 9: Create Visualizations\n", - "\n", - "Visualize cost and usage trends using matplotlib." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "try:\n", - " import matplotlib.pyplot as plt\n", - " import matplotlib.dates as mdates\n", - " from datetime import datetime\n", - " \n", - " # Get daily metrics for last 30 days\n", - " newest = datetime.now(timezone.utc)\n", - " oldest = newest - timedelta(days=30)\n", - "\n", - " payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - " }\n", - "\n", - " response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - " data = response.json()\n", - "\n", - " # Extract dates and metrics\n", - " dates = [datetime.fromisoformat(b['timestamp'].replace('Z', '+00:00')) \n", - " for b in data['buckets'] if b['total']['count'] > 0]\n", - " costs = [b['total']['costs'] for b in data['buckets'] if b['total']['count'] > 0]\n", - " counts = [b['total']['count'] for b in data['buckets'] if b['total']['count'] > 0]\n", - "\n", - " # Create figure with two subplots\n", - " fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 8))\n", - "\n", - " # Plot 1: Daily Cost\n", - " ax1.plot(dates, costs, marker='o', linewidth=2, markersize=4, color='#2563eb')\n", - " ax1.set_title('Daily LLM Costs (Last 30 Days)', fontsize=14, fontweight='bold')\n", - " ax1.set_ylabel('Cost ($)', fontsize=12)\n", - " ax1.grid(True, alpha=0.3)\n", - " ax1.xaxis.set_major_formatter(mdates.DateFormatter('%m/%d'))\n", - " plt.setp(ax1.xaxis.get_majorticklabels(), rotation=45)\n", - "\n", - " # Plot 2: Daily Request Volume\n", - " ax2.bar(dates, counts, alpha=0.7, color='steelblue')\n", - " ax2.set_title('Daily Request Volume (Last 30 Days)', fontsize=14, fontweight='bold')\n", - " ax2.set_xlabel('Date', fontsize=12)\n", - " ax2.set_ylabel('Requests', fontsize=12)\n", - " ax2.grid(True, alpha=0.3, axis='y')\n", - " ax2.xaxis.set_major_formatter(mdates.DateFormatter('%m/%d'))\n", - " plt.setp(ax2.xaxis.get_majorticklabels(), rotation=45)\n", - "\n", - " plt.tight_layout()\n", - " plt.show()\n", - " \n", - " print(\"✅ Visualizations created successfully!\")\n", - " \n", - "except ImportError:\n", - " print(\"⚠️ matplotlib not installed. Run: pip install matplotlib\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 10: Export Data to DataFrame\n", - "\n", - "Convert analytics data to a pandas DataFrame for further analysis." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "try:\n", - " import pandas as pd\n", - " \n", - " # Get daily metrics for last 30 days\n", - " newest = datetime.now(timezone.utc)\n", - " oldest = newest - timedelta(days=30)\n", - "\n", - " payload = {\n", - " \"focus\": \"trace\",\n", - " \"interval\": 1440, # Daily buckets\n", - " \"windowing\": {\n", - " \"oldest\": oldest.isoformat(),\n", - " \"newest\": newest.isoformat()\n", - " }\n", - " }\n", - "\n", - " response = requests.post(BASE_URL, headers=HEADERS, json=payload)\n", - " data = response.json()\n", - "\n", - " # Convert to DataFrame\n", - " rows = []\n", - " for bucket in data['buckets']:\n", - " if bucket['total']['count'] > 0: # Only include days with data\n", - " rows.append({\n", - " 'timestamp': bucket['timestamp'],\n", - " 'total_count': bucket['total']['count'],\n", - " 'total_cost': bucket['total']['costs'],\n", - " 'total_duration': bucket['total']['duration'],\n", - " 'total_tokens': bucket['total']['tokens'],\n", - " 'error_count': bucket['errors']['count'],\n", - " 'error_duration': bucket['errors']['duration'],\n", - " 'avg_duration': bucket['total']['duration'] / bucket['total']['count'],\n", - " 'avg_cost': bucket['total']['costs'] / bucket['total']['count'],\n", - " 'error_rate': (bucket['errors']['count'] / bucket['total']['count'] * 100)\n", - " })\n", - "\n", - " df = pd.DataFrame(rows)\n", - " df['timestamp'] = pd.to_datetime(df['timestamp'])\n", - "\n", - " print(\"📊 Analytics Data Summary\\n\")\n", - " print(df.describe())\n", - " \n", - " print(\"\\n📅 Recent Days:\")\n", - " print(df.tail(10).to_string())\n", - " \n", - " # Optional: Save to CSV\n", - " # df.to_csv('analytics_export.csv', index=False)\n", - " # print(\"\\n✅ Data exported to analytics_export.csv\")\n", - " \n", - "except ImportError:\n", - " print(\"⚠️ pandas not installed. Run: pip install pandas\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "In this tutorial, you learned how to:\n", - "\n", - "1. ✅ **Retrieve aggregated metrics** using the Analytics API\n", - "2. ✅ **Track daily costs** and generate spending reports\n", - "3. ✅ **Analyze error trends** to identify reliability issues\n", - "4. ✅ **Filter by status code** to analyze successful vs failed traces\n", - "5. ✅ **Track token usage** patterns over time\n", - "6. ✅ **Monitor performance** and latency trends\n", - "7. ✅ **Generate monthly reports** with comprehensive cost breakdowns\n", - "8. ✅ **Compare week-over-week** metrics to identify trends\n", - "9. ✅ **Visualize data** using matplotlib\n", - "10. ✅ **Export to DataFrame** for further analysis\n", - "\n", - "## Next Steps\n", - "\n", - "- Learn about [Query API](/observability/query-data/query-api) for detailed trace analysis\n", - "- Explore [Using the UI](/observability/using-the-ui/filtering-traces) for visual analytics\n", - "- Check out [Semantic Conventions](/observability/concepts/semantic-conventions) for available metrics\n", - "- Read about [Cost Tracking](/observability/trace-with-python-sdk/track-costs) for automatic cost calculation" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/jupyter/observability/annotate-traces-tutorial.ipynb b/examples/jupyter/observability/annotate-traces-tutorial.ipynb deleted file mode 100644 index 4fccc69fd3..0000000000 --- a/examples/jupyter/observability/annotate-traces-tutorial.ipynb +++ /dev/null @@ -1,438 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "intro", - "metadata": {}, - "source": [ - "# Annotate Traces Tutorial\n", - "\n", - "Annotations in Agenta let you enrich the traces created by your LLM applications. You can add scores, comments, expected answers and other metrics to help evaluate your application's performance.\n", - "\n", - "In this tutorial, we'll:\n", - "1. Set up the Agenta SDK and create a traced LLM application\n", - "2. Run the application to generate traces\n", - "3. Add annotations to those traces programmatically\n", - "4. Query and view the annotations\n", - "\n", - "## What You Can Do With Annotations\n", - "\n", - "- Collect user feedback on LLM responses\n", - "- Run custom evaluation workflows\n", - "- Measure application performance in real-time" - ] - }, - { - "cell_type": "markdown", - "id": "install", - "metadata": {}, - "source": [ - "## Step 1: Install Required Packages\n", - "\n", - "First, install the Agenta SDK, OpenAI, and the OpenTelemetry instrumentor:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "install-deps", - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -U agenta openai opentelemetry-instrumentation-openai requests" - ] - }, - { - "cell_type": "markdown", - "id": "setup", - "metadata": {}, - "source": [ - "## Step 2: Configure Environment Variables\n", - "\n", - "To start tracing your application and adding annotations, you'll need an API key:\n", - "\n", - "1. Visit the Agenta API Keys page under settings\n", - "2. Click on **Create New API Key** and follow the prompts\n", - "\n", - "Then set your environment variables:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "env-setup", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "\n", - "# Set your API keys here\n", - "os.environ[\"AGENTA_API_KEY\"] = \"\"\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Change for self-hosted\n", - "os.environ[\"OPENAI_API_KEY\"] = \"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "init-sdk", - "metadata": {}, - "outputs": [], - "source": [ - "import agenta as ag\n", - "from getpass import getpass\n", - "\n", - "# Initialize the SDK with your API key\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " os.environ[\"AGENTA_API_KEY\"] = getpass(\"Enter your Agenta API key: \")\n", - "\n", - "openai_api_key = os.getenv(\"OPENAI_API_KEY\")\n", - "if not openai_api_key:\n", - " os.environ[\"OPENAI_API_KEY\"] = getpass(\"Enter your OpenAI API key: \")\n", - "\n", - "# Initialize Agenta\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "id": "instrument", - "metadata": {}, - "source": [ - "## Step 3: Create and Instrument an LLM Application\n", - "\n", - "Let's create a simple LLM application that we can trace and annotate:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "setup-openai", - "metadata": {}, - "outputs": [], - "source": [ - "import openai\n", - "from opentelemetry.instrumentation.openai import OpenAIInstrumentor\n", - "\n", - "# Instrument OpenAI to automatically capture traces\n", - "OpenAIInstrumentor().instrument()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "create-function", - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "def answer_question(question: str) -> tuple[str, str, str]:\n", - " \"\"\"A simple question-answering function that we'll trace and annotate.\n", - " \n", - " Returns:\n", - " Tuple of (answer, trace_id, span_id)\n", - " \"\"\"\n", - " response = openai.chat.completions.create(\n", - " model=\"gpt-3.5-turbo\",\n", - " messages=[\n", - " {\"role\": \"system\", \"content\": \"You are a helpful assistant that answers questions concisely.\"},\n", - " {\"role\": \"user\", \"content\": question},\n", - " ],\n", - " )\n", - " \n", - " # Automatically get the trace_id and span_id from the current span\n", - " link = ag.tracing.build_invocation_link()\n", - " \n", - " return response.choices[0].message.content, link.trace_id, link.span_id" - ] - }, - { - "cell_type": "markdown", - "id": "generate-trace", - "metadata": {}, - "source": [ - "## Step 4: Generate a Trace\n", - "\n", - "Let's run our function to generate a trace. The function will automatically capture the trace_id and span_id using `ag.tracing.build_invocation_link()`." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "run-function", - "metadata": {}, - "outputs": [], - "source": [ - "# Run the function to create a trace and get the IDs automatically\n", - "question = \"What is the capital of France?\"\n", - "result, trace_id, span_id = answer_question(question)\n", - "\n", - "print(f\"Question: {question}\")\n", - "print(f\"Answer: {result}\")\n", - "print(f\"\\n✅ Trace captured!\")\n", - "print(f\"Trace ID: {trace_id}\")\n", - "print(f\"Span ID: {span_id}\")" - ] - }, - { - "cell_type": "markdown", - "id": "create-annotation", - "metadata": {}, - "source": [ - "## Step 5: Create an Annotation\n", - "\n", - "Now let's add an annotation to the trace we just created. We'll use the trace_id and span_id that were automatically captured." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "annotate-trace", - "metadata": {}, - "outputs": [], - "source": "import requests\n\nbase_url = os.environ.get(\"AGENTA_HOST\", \"https://cloud.agenta.ai\")\napi_key = os.environ[\"AGENTA_API_KEY\"]\n\nheaders = {\n \"Content-Type\": \"application/json\",\n \"Authorization\": f\"ApiKey {api_key}\"\n}\n\n# Create an annotation with a score and reasoning\nannotation_data = {\n \"annotation\": {\n \"data\": {\n \"outputs\": {\n \"score\": 90,\n \"normalized_score\": 0.9,\n \"reasoning\": \"The answer is correct and concise\",\n \"expected_answer\": \"The capital of France is Paris\"\n }\n },\n \"references\": {\n \"evaluator\": {\n \"slug\": \"accuracy_evaluator\"\n }\n },\n \"links\": {\n \"invocation\": {\n \"trace_id\": trace_id,\n \"span_id\": span_id\n }\n },\n \"metadata\": {\n \"annotator\": \"tutorial_user\",\n \"timestamp\": \"2025-10-30T00:00:00Z\"\n }\n }\n}\n\n# Make the API request (note the trailing slash!)\nresponse = requests.post(\n f\"{base_url}/api/preview/annotations/\",\n headers=headers,\n json=annotation_data\n)\n\n# Process the response\nif response.status_code == 200:\n print(\"✅ Annotation created successfully!\")\n annotation_response = response.json()\n print(f\"\\nAnnotation ID: {annotation_response['annotation']['trace_id']}\")\n print(f\"Span ID: {annotation_response['annotation']['span_id']}\")\n print(f\"\\nAnnotation data:\")\n print(annotation_response)\nelse:\n print(f\"❌ Error: {response.status_code}\")\n print(response.text)" - }, - { - "cell_type": "markdown", - "id": "multiple-annotations", - "metadata": {}, - "source": [ - "## Step 6: Create Additional Annotations\n", - "\n", - "You can add multiple annotations to the same trace from different evaluators:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "create-second-annotation", - "metadata": {}, - "outputs": [], - "source": "# Create another annotation for quality assessment\nquality_annotation = {\n \"annotation\": {\n \"data\": {\n \"outputs\": {\n \"score\": 85,\n \"reasoning\": \"Response is helpful and well-formatted\",\n \"labels\": [\"Helpful\", \"Accurate\", \"Concise\"]\n }\n },\n \"references\": {\n \"evaluator\": {\n \"slug\": \"quality_evaluator\"\n }\n },\n \"links\": {\n \"invocation\": {\n \"trace_id\": trace_id,\n \"span_id\": span_id\n }\n }\n }\n}\n\nresponse = requests.post(\n f\"{base_url}/api/preview/annotations/\", # Note the trailing slash!\n headers=headers,\n json=quality_annotation\n)\n\nif response.status_code == 200:\n print(\"✅ Quality annotation created successfully!\")\nelse:\n print(f\"❌ Error: {response.status_code}\")\n print(response.text)" - }, - { - "cell_type": "markdown", - "id": "query-annotations", - "metadata": {}, - "source": [ - "## Step 7: Query Annotations\n", - "\n", - "Now let's query all annotations for our invocation:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "query-by-invocation", - "metadata": {}, - "outputs": [], - "source": [ - "# Query all annotations for the invocation\n", - "query_data = {\n", - " \"annotation\": {\n", - " \"links\": {\n", - " \"invocation\": {\n", - " \"trace_id\": trace_id,\n", - " \"span_id\": span_id\n", - " }\n", - " }\n", - " }\n", - "}\n", - "\n", - "response = requests.post(\n", - " f\"{base_url}/api/preview/annotations/query\",\n", - " headers=headers,\n", - " json=query_data\n", - ")\n", - "\n", - "if response.status_code == 200:\n", - " print(\"✅ Annotations retrieved successfully!\")\n", - " annotations = response.json()\n", - " print(f\"\\nFound {len(annotations.get('annotations', []))} annotation(s)\")\n", - " print(\"\\nAnnotations:\")\n", - " for idx, ann in enumerate(annotations.get('annotations', []), 1):\n", - " print(f\"\\n--- Annotation {idx} ---\")\n", - " print(f\"Evaluator: {ann['references']['evaluator']['slug']}\")\n", - " print(f\"Data: {ann['data']}\")\n", - "else:\n", - " print(f\"❌ Error: {response.status_code}\")\n", - " print(response.text)" - ] - }, - { - "cell_type": "markdown", - "id": "view-ui", - "metadata": {}, - "source": [ - "## Step 8: View Annotations in the UI\n", - "\n", - "You can see all annotations for a trace in the Agenta UI:\n", - "\n", - "1. Log in to your Agenta dashboard\n", - "2. Navigate to the **Observability** section\n", - "3. Find your trace\n", - "4. Check the **Annotations** tab to see detailed information\n", - "\n", - "The right sidebar will show average metrics for each evaluator." - ] - }, - { - "cell_type": "markdown", - "id": "understanding-structure", - "metadata": {}, - "source": [ - "## Understanding Automatic Trace Capture\n", - "\n", - "The `ag.tracing.build_invocation_link()` function is a helper that automatically:\n", - "1. Gets the current span context from the active trace\n", - "2. Formats the trace_id and span_id as hex strings\n", - "3. Returns a Link object with both IDs ready to use\n", - "\n", - "This is much more convenient than manually querying the UI for trace IDs!\n", - "\n", - "**Alternative Method:**\n", - "You can also use `ag.tracing.get_span_context()` if you need more control:\n", - "\n", - "```python\n", - "span_ctx = ag.tracing.get_span_context()\n", - "trace_id = f\"{span_ctx.trace_id:032x}\" # Format as hexadecimal\n", - "span_id = f\"{span_ctx.span_id:016x}\" # Format as hexadecimal\n", - "```\n", - "\n", - "## Understanding Annotation Structure\n", - "\n", - "An annotation has four main parts:\n", - "\n", - "1. **Data**: The actual evaluation content (scores, comments)\n", - "2. **References**: Which evaluator to use (will be created automatically if it doesn't exist)\n", - "3. **Links**: Which trace and span you're annotating\n", - "4. **Metadata** (optional): Any extra information you want to include\n", - "\n", - "### Annotation Data Examples\n", - "\n", - "You can include various types of data in your annotations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "annotation-examples", - "metadata": {}, - "outputs": [], - "source": [ - "# Example 1: Simple score\n", - "simple_annotation = {\n", - " \"outputs\": {\n", - " \"score\": 3\n", - " }\n", - "}\n", - "\n", - "# Example 2: Score with explanation\n", - "detailed_annotation = {\n", - " \"outputs\": {\n", - " \"score\": 3,\n", - " \"comment\": \"The response is not grounded\"\n", - " }\n", - "}\n", - "\n", - "# Example 3: Multiple metrics with reference information\n", - "comprehensive_annotation = {\n", - " \"outputs\": {\n", - " \"score\": 3,\n", - " \"normalized_score\": 0.5,\n", - " \"comment\": \"The response is not grounded\",\n", - " \"expected_answer\": \"The capital of France is Paris\",\n", - " \"labels\": [\"factual\", \"concise\"]\n", - " }\n", - "}\n", - "\n", - "print(\"Annotation data can include:\")\n", - "print(\"- Numbers (scores, ratings)\")\n", - "print(\"- Categories (labels, classifications)\")\n", - "print(\"- Text (comments, reasoning)\")\n", - "print(\"- Booleans (true/false values)\")" - ] - }, - { - "cell_type": "markdown", - "id": "cleanup", - "metadata": {}, - "source": [ - "## Optional: Remove an Annotation\n", - "\n", - "If you need to remove an annotation, you can delete it by its trace_id and span_id:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "delete-annotation", - "metadata": {}, - "outputs": [], - "source": [ - "# Uncomment and replace with your annotation's trace_id and span_id to delete\n", - "# annotation_trace_id = \"your_annotation_trace_id\"\n", - "# annotation_span_id = \"your_annotation_span_id\"\n", - "\n", - "# response = requests.delete(\n", - "# f\"{base_url}/api/preview/annotations/{annotation_trace_id}/{annotation_span_id}\",\n", - "# headers=headers\n", - "# )\n", - "\n", - "# if response.status_code == 200:\n", - "# print(\"✅ Annotation deleted successfully\")\n", - "# else:\n", - "# print(f\"❌ Error: {response.status_code}\")\n", - "# print(response.text)" - ] - }, - { - "cell_type": "markdown", - "id": "summary", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "In this tutorial, we've covered:\n", - "\n", - "1. ✅ Setting up the Agenta SDK and instrumenting an LLM application\n", - "2. ✅ Generating traces by running the application\n", - "3. ✅ Creating annotations with scores, reasoning, and metadata\n", - "4. ✅ Adding multiple annotations from different evaluators\n", - "5. ✅ Querying annotations programmatically\n", - "6. ✅ Understanding annotation structure and capabilities\n", - "\n", - "## Next Steps\n", - "\n", - "Now that you know how to annotate traces, you can:\n", - "\n", - "- Integrate annotation creation into your evaluation workflows\n", - "- Build custom evaluators that automatically annotate traces\n", - "- Use annotations to track user feedback in production\n", - "- Analyze annotation data to improve your LLM applications" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/examples/jupyter/observability/query-data-api-tutorial.ipynb b/examples/jupyter/observability/query-data-api-tutorial.ipynb deleted file mode 100644 index 09ad0a7ecc..0000000000 --- a/examples/jupyter/observability/query-data-api-tutorial.ipynb +++ /dev/null @@ -1,643 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Query Data API - Tutorial\n", - "\n", - "This tutorial shows you how to use the Agenta Query Data API to retrieve and analyze your LLM traces. You'll learn how to:\n", - "\n", - "- Set up the API client with authentication\n", - "- Query spans and traces with filters\n", - "- Filter by attributes, time ranges, and status codes\n", - "- Use advanced filters with logical operators\n", - "- Analyze trace data to calculate costs and latencies\n", - "\n", - "## What You'll Build\n", - "\n", - "We'll create scripts that:\n", - "1. Query recent traces from your applications\n", - "2. Filter traces by type, status, and custom attributes\n", - "3. Analyze cost and performance metrics\n", - "4. Find problematic traces (errors, slow responses)\n", - "5. Export trace data for further analysis" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "pip install -U requests pandas" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": "## Setup\n\nBefore using the API, you need your Agenta API key. You can create API keys from the Settings page in your Agenta workspace." - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Default value, change for self-hosted\n", - "os.environ[\"AGENTA_API_KEY\"] = \"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import requests\n", - "from getpass import getpass\n", - "from datetime import datetime, timedelta, timezone\n", - "import json\n", - "\n", - "# Get API credentials\n", - "AGENTA_HOST = os.getenv(\"AGENTA_HOST\", \"https://cloud.agenta.ai\")\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " api_key = getpass(\"Enter your Agenta API key: \")\n", - " os.environ[\"AGENTA_API_KEY\"] = api_key\n", - "\n", - "# Setup base configuration\n", - "BASE_URL = f\"{AGENTA_HOST}/api/preview/tracing/spans/query\"\n", - "HEADERS = {\n", - " \"Authorization\": f\"ApiKey {api_key}\",\n", - " \"Content-Type\": \"application/json\"\n", - "}\n", - "\n", - "print(f\"\u2713 Connected to {AGENTA_HOST}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 1: Query Recent Traces\n", - "\n", - "Let's start by querying traces from the last 7 days. We'll use the `focus=trace` parameter to get complete trace trees instead of individual spans." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Query traces from the last 7 days\n", - "now = datetime.now(timezone.utc)\n", - "week_ago = now - timedelta(days=7)\n", - "\n", - "query = {\n", - " \"focus\": \"trace\",\n", - " \"oldest\": week_ago.isoformat(),\n", - " \"newest\": now.isoformat(),\n", - " \"limit\": 5\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} traces\")\n", - "print(f\"Trace IDs: {list(data.get('traces', {}).keys())}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 2: Query Spans with Filters\n", - "\n", - "Now let's query individual spans and filter by type. We'll look for LLM spans specifically." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Query LLM spans\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 10,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} LLM spans\")\n", - "\n", - "# Display first span details\n", - "if data.get('spans'):\n", - " span = data['spans'][0]\n", - " print(f\"\\nFirst span:\")\n", - " print(f\" Name: {span.get('span_name')}\")\n", - " print(f\" Status: {span.get('status_code')}\")\n", - " print(f\" Start: {span.get('start_time')}\")\n", - " print(f\" End: {span.get('end_time')}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 3: Filter by Status Code\n", - "\n", - "Let's find traces that encountered errors. This is useful for debugging and monitoring application health." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Find error traces\n", - "query = {\n", - " \"focus\": \"trace\",\n", - " \"limit\": 10,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"status_code\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"STATUS_CODE_ERROR\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} traces with errors\")\n", - "\n", - "if data.get('traces'):\n", - " for trace_id in list(data['traces'].keys())[:3]:\n", - " print(f\"\\nError trace: {trace_id}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 4: Advanced Filtering with Multiple Conditions\n", - "\n", - "Let's use multiple filters to find specific traces. We'll look for successful LLM calls that took longer than 2 seconds." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Find slow but successful LLM calls\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 10,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " },\n", - " {\n", - " \"field\": \"status_code\",\n", - " \"operator\": \"is_not\",\n", - " \"value\": \"STATUS_CODE_ERROR\"\n", - " },\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.metrics.unit.duration\",\n", - " \"operator\": \"gt\",\n", - " \"value\": 2000 # milliseconds\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} slow LLM spans (>2s)\")\n", - "\n", - "if data.get('spans'):\n", - " for span in data['spans'][:3]:\n", - " duration = span.get('attributes', {}).get('ag', {}).get('metrics', {}).get('duration', {}).get('cumulative', 'N/A')\n", - " print(f\" {span.get('span_name')}: {duration}ms\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 5: Nested Logical Operators\n", - "\n", - "Let's create a more complex query using nested logical operators. We'll find spans that are either errors OR slow responses." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Find problematic spans (errors OR slow)\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 10,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " },\n", - " {\n", - " \"operator\": \"or\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"status_code\",\n", - " \"value\": \"STATUS_CODE_ERROR\"\n", - " },\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.metrics.unit.duration\",\n", - " \"operator\": \"gt\",\n", - " \"value\": 5000\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} problematic spans\")\n", - "\n", - "if data.get('spans'):\n", - " for span in data['spans'][:5]:\n", - " status = span.get('status_code')\n", - " duration = span.get('attributes', {}).get('ag', {}).get('metrics', {}).get('duration', {}).get('cumulative', 'N/A')\n", - " print(f\" {span.get('span_name')}: Status={status}, Duration={duration}ms\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 6: Analyze Cost and Token Usage\n", - "\n", - "Let's query LLM spans and analyze their costs and token usage. This helps you understand your LLM spending." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Query LLM spans with cost tracking\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 50,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " },\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.metrics.unit.cost\",\n", - " \"operator\": \"exists\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Analyzing {data['count']} LLM spans with cost data\\n\")\n", - "\n", - "if data.get('spans'):\n", - " total_cost = 0\n", - " total_tokens = 0\n", - " total_duration = 0\n", - " \n", - " for span in data['spans']:\n", - " metrics = span.get('attributes', {}).get('ag', {}).get('metrics', {})\n", - " \n", - " # Extract cost\n", - " cost = metrics.get('costs', {}).get('cumulative', {}).get('total', 0)\n", - " total_cost += cost\n", - " \n", - " # Extract tokens\n", - " tokens = metrics.get('tokens', {}).get('cumulative', {}).get('total', 0)\n", - " total_tokens += tokens\n", - " \n", - " # Extract duration\n", - " duration = metrics.get('duration', {}).get('cumulative', 0)\n", - " total_duration += duration\n", - " \n", - " print(f\"Summary:\")\n", - " print(f\" Total Cost: ${total_cost:.4f}\")\n", - " print(f\" Total Tokens: {total_tokens:,}\")\n", - " print(f\" Average Cost per Span: ${(total_cost/len(data['spans'])):.4f}\")\n", - " print(f\" Average Tokens per Span: {int(total_tokens/len(data['spans']))}\")\n", - " print(f\" Average Duration: {int(total_duration/len(data['spans']))}ms\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 7: Filter by Span Name Pattern\n", - "\n", - "Let's use string matching operators to find specific types of operations. We'll search for OpenAI-related spans." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Find OpenAI spans using pattern matching\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 10,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"span_name\",\n", - " \"operator\": \"contains\",\n", - " \"value\": \"openai\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Found {data['count']} OpenAI spans\")\n", - "\n", - "if data.get('spans'):\n", - " span_names = set(span.get('span_name') for span in data['spans'])\n", - " print(f\"\\nUnique span names:\")\n", - " for name in span_names:\n", - " print(f\" - {name}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 8: Export Trace Data to DataFrame\n", - "\n", - "Let's export our trace data to a pandas DataFrame for further analysis and visualization." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd\n", - "\n", - "# Query recent spans\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"limit\": 100,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "# Convert to DataFrame\n", - "records = []\n", - "for span in data.get('spans', []):\n", - " metrics = span.get('attributes', {}).get('ag', {}).get('metrics', {})\n", - " \n", - " record = {\n", - " 'trace_id': span.get('trace_id'),\n", - " 'span_id': span.get('span_id'),\n", - " 'span_name': span.get('span_name'),\n", - " 'status': span.get('status_code'),\n", - " 'start_time': span.get('start_time'),\n", - " 'end_time': span.get('end_time'),\n", - " 'duration_ms': metrics.get('duration', {}).get('cumulative', 0),\n", - " 'cost': metrics.get('costs', {}).get('cumulative', {}).get('total', 0),\n", - " 'total_tokens': metrics.get('tokens', {}).get('cumulative', {}).get('total', 0),\n", - " 'prompt_tokens': metrics.get('tokens', {}).get('cumulative', {}).get('prompt', 0),\n", - " 'completion_tokens': metrics.get('tokens', {}).get('cumulative', {}).get('completion', 0),\n", - " }\n", - " records.append(record)\n", - "\n", - "df = pd.DataFrame(records)\n", - "\n", - "print(f\"Created DataFrame with {len(df)} rows\\n\")\n", - "print(\"First 5 rows:\")\n", - "print(df.head())\n", - "\n", - "print(\"\\nBasic statistics:\")\n", - "print(df[['duration_ms', 'cost', 'total_tokens']].describe())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 9: Time-Based Analysis\n", - "\n", - "Let's analyze how your costs and latencies change over time." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Convert timestamps to datetime\n", - "df['start_time'] = pd.to_datetime(df['start_time'])\n", - "df['end_time'] = pd.to_datetime(df['end_time'])\n", - "\n", - "# Group by hour\n", - "df['hour'] = df['start_time'].dt.floor('H')\n", - "hourly_stats = df.groupby('hour').agg({\n", - " 'span_id': 'count',\n", - " 'duration_ms': 'mean',\n", - " 'cost': 'sum',\n", - " 'total_tokens': 'sum'\n", - "}).rename(columns={'span_id': 'num_calls'})\n", - "\n", - "print(\"Hourly statistics:\")\n", - "print(hourly_stats)\n", - "\n", - "print(f\"\\nPeak usage hour: {hourly_stats['num_calls'].idxmax()}\")\n", - "print(f\"Highest cost hour: {hourly_stats['cost'].idxmax()} (${hourly_stats['cost'].max():.4f})\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 10: Filter by Time Range\n", - "\n", - "Let's query traces from a specific time window. This is useful for analyzing specific incidents or time periods." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Query last 24 hours\n", - "now = datetime.now(timezone.utc)\n", - "yesterday = now - timedelta(days=1)\n", - "\n", - "query = {\n", - " \"focus\": \"span\",\n", - " \"oldest\": yesterday.isoformat(),\n", - " \"newest\": now.isoformat(),\n", - " \"limit\": 100,\n", - " \"filter\": {\n", - " \"operator\": \"and\",\n", - " \"conditions\": [\n", - " {\n", - " \"field\": \"attributes\",\n", - " \"key\": \"ag.type.span\",\n", - " \"operator\": \"is\",\n", - " \"value\": \"llm\"\n", - " }\n", - " ]\n", - " }\n", - "}\n", - "\n", - "response = requests.post(BASE_URL, headers=HEADERS, json=query)\n", - "data = response.json()\n", - "\n", - "print(f\"Last 24 hours: {data['count']} LLM spans\")\n", - "\n", - "if data.get('spans'):\n", - " # Calculate totals\n", - " total_cost = sum(\n", - " span.get('attributes', {}).get('ag', {}).get('metrics', {}).get('costs', {}).get('cumulative', {}).get('total', 0)\n", - " for span in data['spans']\n", - " )\n", - " \n", - " error_count = sum(\n", - " 1 for span in data['spans']\n", - " if span.get('status_code') == 'STATUS_CODE_ERROR'\n", - " )\n", - " \n", - " print(f\"\\nSummary for last 24 hours:\")\n", - " print(f\" Total Cost: ${total_cost:.4f}\")\n", - " print(f\" Error Rate: {(error_count/len(data['spans'])*100):.2f}%\")\n", - " print(f\" Success Rate: {((len(data['spans'])-error_count)/len(data['spans'])*100):.2f}%\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "In this tutorial, you learned how to:\n", - "\n", - "1. \u2713 Set up the Agenta Query Data API client\n", - "2. \u2713 Query traces and spans with filters\n", - "3. \u2713 Filter by attributes, status codes, and time ranges\n", - "4. \u2713 Use advanced filters with logical operators\n", - "5. \u2713 Analyze cost and performance metrics\n", - "6. \u2713 Export trace data to pandas DataFrames\n", - "7. \u2713 Perform time-based analysis\n", - "\n", - "## Next Steps\n", - "\n", - "- Learn about the [Analytics Data API](/observability/query-data/analytics-data) for aggregated metrics\n", - "- Explore [filtering in the UI](/observability/using-the-ui/filtering-traces) for visual query building\n", - "- Check out [trace annotations](/observability/trace-with-python-sdk/annotate-traces) for adding feedback data\n", - "- Read the complete [API reference](/reference/api) for all available endpoints" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/examples/jupyter/observability/quickstart.ipynb b/examples/jupyter/observability/quickstart.ipynb deleted file mode 100644 index a16891c606..0000000000 --- a/examples/jupyter/observability/quickstart.ipynb +++ /dev/null @@ -1,328 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "a1b2c3d4", - "metadata": {}, - "source": [ - "# Quick Start: Observability with Agenta\n", - "\n", - "Agenta enables you to capture all inputs, outputs, and metadata from your LLM applications, **whether they're hosted within Agenta or running in your own environment**.\n", - "\n", - "This guide will walk you through setting up observability for an OpenAI application running locally.\n", - "\n", - "**Note:** If you create an application through the Agenta UI, tracing is enabled by default. No additional setup is required—simply go to the observability view to see all your requests." - ] - }, - { - "cell_type": "markdown", - "id": "b2c3d4e5", - "metadata": {}, - "source": [ - "## Step 1: Install Required Packages\n", - "\n", - "First, install the Agenta SDK, OpenAI, and the OpenTelemetry instrumentor for OpenAI:" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "c3d4e5f6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: agenta in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (0.51.6)\n", - "Collecting agenta\n", - " Downloading agenta-0.59.6-py3-none-any.whl.metadata (31 kB)\n", - "Requirement already satisfied: openai in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (1.107.1)\n", - "Collecting openai\n", - " Downloading openai-2.6.1-py3-none-any.whl.metadata (29 kB)\n", - "Requirement already satisfied: opentelemetry-instrumentation-openai in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (0.46.2)\n", - "Collecting opentelemetry-instrumentation-openai\n", - " Downloading opentelemetry_instrumentation_openai-0.47.5-py3-none-any.whl.metadata (2.2 kB)\n", - "Requirement already satisfied: decorator<6.0.0,>=5.2.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (5.2.1)\n", - "Requirement already satisfied: fastapi<0.117.0,>=0.116.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.116.1)\n", - "Requirement already satisfied: google-auth<3,>=2.23 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (2.40.3)\n", - "Requirement already satisfied: h11<0.17.0,>=0.16.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.16.0)\n", - "Requirement already satisfied: httpx<0.29.0,>=0.28.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.28.1)\n", - "Requirement already satisfied: huggingface-hub<0.31.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.30.2)\n", - "Requirement already satisfied: importlib-metadata<9.0,>=8.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (8.7.0)\n", - "Requirement already satisfied: jinja2<4.0.0,>=3.1.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (3.1.6)\n", - "Collecting litellm==1.78.7 (from agenta)\n", - " Downloading litellm-1.78.7-py3-none-any.whl.metadata (42 kB)\n", - "Collecting openai\n", - " Downloading openai-1.109.1-py3-none-any.whl.metadata (29 kB)\n", - "Requirement already satisfied: opentelemetry-api<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-instrumentation>=0.56b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.57b0)\n", - "Requirement already satisfied: opentelemetry-sdk<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: pydantic<3,>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (2.11.7)\n", - "Requirement already satisfied: python-dotenv<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.1.1)\n", - "Requirement already satisfied: pyyaml<7.0.0,>=6.0.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (6.0.2)\n", - "Requirement already satisfied: starlette<0.48.0,>=0.47.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.47.3)\n", - "Requirement already satisfied: structlog<26.0.0,>=25.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (25.4.0)\n", - "Requirement already satisfied: tiktoken==0.11.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.11.0)\n", - "Requirement already satisfied: toml<0.11.0,>=0.10.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.10.2)\n", - "Requirement already satisfied: aiohttp>=3.10 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.78.7->agenta) (3.12.15)\n", - "Requirement already satisfied: click in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.78.7->agenta) (8.2.1)\n", - "Collecting fastuuid>=0.13.0 (from litellm==1.78.7->agenta)\n", - " Downloading fastuuid-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.1 kB)\n", - "Requirement already satisfied: jsonschema<5.0.0,>=4.22.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.78.7->agenta) (4.25.1)\n", - "Requirement already satisfied: tokenizers in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.78.7->agenta) (0.22.0)\n", - "Requirement already satisfied: regex>=2022.1.18 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from tiktoken==0.11.0->agenta) (2025.9.1)\n", - "Requirement already satisfied: requests>=2.26.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from tiktoken==0.11.0->agenta) (2.32.5)\n", - "Requirement already satisfied: anyio<5,>=3.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (4.10.0)\n", - "Requirement already satisfied: distro<2,>=1.7.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (1.9.0)\n", - "Requirement already satisfied: jiter<1,>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (0.10.0)\n", - "Requirement already satisfied: sniffio in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (1.3.1)\n", - "Requirement already satisfied: tqdm>4 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (4.67.1)\n", - "Requirement already satisfied: typing-extensions<5,>=4.11 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (4.15.0)\n", - "Requirement already satisfied: idna>=2.8 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from anyio<5,>=3.5.0->openai) (3.10)\n", - "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from google-auth<3,>=2.23->agenta) (5.5.2)\n", - "Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from google-auth<3,>=2.23->agenta) (0.4.2)\n", - "Requirement already satisfied: rsa<5,>=3.1.4 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from google-auth<3,>=2.23->agenta) (4.9.1)\n", - "Requirement already satisfied: certifi in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from httpx<0.29.0,>=0.28.0->agenta) (2025.8.3)\n", - "Requirement already satisfied: httpcore==1.* in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from httpx<0.29.0,>=0.28.0->agenta) (1.0.9)\n", - "Requirement already satisfied: filelock in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (3.19.1)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (2025.7.0)\n", - "Requirement already satisfied: packaging>=20.9 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (25.0)\n", - "Requirement already satisfied: zipp>=3.20 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from importlib-metadata<9.0,>=8.0.0->agenta) (3.23.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jinja2<4.0.0,>=3.1.6->agenta) (3.0.2)\n", - "Requirement already satisfied: attrs>=22.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.78.7->agenta) (25.3.0)\n", - "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.78.7->agenta) (2025.4.1)\n", - "Requirement already satisfied: referencing>=0.28.4 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.78.7->agenta) (0.36.2)\n", - "Requirement already satisfied: rpds-py>=0.7.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.78.7->agenta) (0.27.1)\n", - "Requirement already satisfied: googleapis-common-protos~=1.52 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.70.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-common==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-proto==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: protobuf<7.0,>=5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-proto==1.36.0->opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (6.32.0)\n", - "Requirement already satisfied: opentelemetry-semantic-conventions==0.57b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-sdk<2.0.0,>=1.27.0->agenta) (0.57b0)\n", - "Requirement already satisfied: annotated-types>=0.6.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic<3,>=2->agenta) (0.7.0)\n", - "Requirement already satisfied: pydantic-core==2.33.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic<3,>=2->agenta) (2.33.2)\n", - "Requirement already satisfied: typing-inspection>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic<3,>=2->agenta) (0.4.1)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests>=2.26.0->tiktoken==0.11.0->agenta) (3.4.3)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests>=2.26.0->tiktoken==0.11.0->agenta) (2.5.0)\n", - "Requirement already satisfied: pyasn1>=0.1.3 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from rsa<5,>=3.1.4->google-auth<3,>=2.23->agenta) (0.6.1)\n", - "Requirement already satisfied: opentelemetry-semantic-conventions-ai<0.5.0,>=0.4.13 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-instrumentation-openai) (0.4.13)\n", - "Requirement already satisfied: aiohappyeyeballs>=2.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (2.6.1)\n", - "Requirement already satisfied: aiosignal>=1.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (1.4.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (1.7.0)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (6.6.4)\n", - "Requirement already satisfied: propcache>=0.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (0.3.2)\n", - "Requirement already satisfied: yarl<2.0,>=1.17.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.78.7->agenta) (1.20.1)\n", - "Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-instrumentation>=0.56b0->agenta) (1.17.3)\n", - "Downloading agenta-0.59.6-py3-none-any.whl (339 kB)\n", - "Downloading litellm-1.78.7-py3-none-any.whl (9.9 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m9.9/9.9 MB\u001b[0m \u001b[31m80.7 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", - "\u001b[?25hDownloading openai-1.109.1-py3-none-any.whl (948 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m948.6/948.6 kB\u001b[0m \u001b[31m26.3 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", - "\u001b[?25hDownloading opentelemetry_instrumentation_openai-0.47.5-py3-none-any.whl (35 kB)\n", - "Downloading fastuuid-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278 kB)\n", - "Installing collected packages: fastuuid, openai, litellm, opentelemetry-instrumentation-openai, agenta\n", - "\u001b[2K Attempting uninstall: openai\n", - "\u001b[2K Found existing installation: openai 1.107.1\n", - "\u001b[2K Uninstalling openai-1.107.1:\n", - "\u001b[2K Successfully uninstalled openai-1.107.1\n", - "\u001b[2K Attempting uninstall: litellm[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1/5\u001b[0m [openai]\n", - "\u001b[2K Found existing installation: litellm 1.76.0━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1/5\u001b[0m [openai]\n", - "\u001b[2K Uninstalling litellm-1.76.0:m╺\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Successfully uninstalled litellm-1.76.0━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Attempting uninstall: opentelemetry-instrumentation-openai━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Found existing installation: opentelemetry-instrumentation-openai 0.46.2[0m [litellm]\n", - "\u001b[2K Uninstalling opentelemetry-instrumentation-openai-0.46.2:━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Successfully uninstalled opentelemetry-instrumentation-openai-0.46.25\u001b[0m [litellm]\n", - "\u001b[2K Attempting uninstall: agenta\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Found existing installation: agenta 0.51.6━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Uninstalling agenta-0.51.6:[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K Successfully uninstalled agenta-0.51.6━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/5\u001b[0m [litellm]\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5/5\u001b[0m [agenta]2m4/5\u001b[0m [agenta]\n", - "\u001b[1A\u001b[2KSuccessfully installed agenta-0.59.6 fastuuid-0.14.0 litellm-1.78.7 openai-1.109.1 opentelemetry-instrumentation-openai-0.47.5\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "pip install -U agenta openai opentelemetry-instrumentation-openai" - ] - }, - { - "cell_type": "markdown", - "id": "d4e5f6g7", - "metadata": {}, - "source": [ - "## Step 2: Configure Environment Variables\n", - "\n", - "To start tracing your application, you'll need an API key:\n", - "\n", - "1. Visit the Agenta API Keys page under settings.\n", - "2. Click on **Create New API Key** and follow the prompts.\n", - "\n", - "Then set your environment variables:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e5f6g7h8", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "\n", - "# Set your API key here\n", - "os.environ[\"AGENTA_API_KEY\"] = \"\"\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Change for self-hosted\n", - "os.environ[\"OPENAI_API_KEY\"] = \"\"" - ] - }, - { - "cell_type": "markdown", - "id": "f6g7h8i9", - "metadata": {}, - "source": [ - "## Step 3: Instrument Your Application\n", - "\n", - "Below is a sample script to instrument an OpenAI application:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "g7h8i9j0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2025-10-28T10:24:18.411Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - SDK version: 0.59.6 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-10-28T10:24:18.411Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - Host: https://cloud.agenta.ai \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-10-28T10:24:18.412Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - OLTP URL: https://cloud.agenta.ai/api/otlp/v1/traces \u001b[38;5;245m[agenta.sdk.tracing.tracing]\u001b[0m \n" - ] - } - ], - "source": [ - "import agenta as ag\n", - "from opentelemetry.instrumentation.openai import OpenAIInstrumentor\n", - "import openai\n", - "\n", - "# Initialize Agenta\n", - "ag.init()\n", - "\n", - "# Instrument OpenAI\n", - "OpenAIInstrumentor().instrument()" - ] - }, - { - "cell_type": "markdown", - "id": "h8i9j0k1", - "metadata": {}, - "source": [ - "## Step 4: Create an Instrumented Function\n", - "\n", - "Decorate your function with `@ag.instrument()` to enable tracing:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "i9j0k1l2", - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument()\n", - "def generate():\n", - " response = openai.chat.completions.create(\n", - " model=\"gpt-3.5-turbo\",\n", - " messages=[\n", - " {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n", - " {\"role\": \"user\", \"content\": \"Write a short story about AI Engineering.\"},\n", - " ],\n", - " )\n", - " return response.choices[0].message.content" - ] - }, - { - "cell_type": "markdown", - "id": "j0k1l2m3", - "metadata": {}, - "source": [ - "## Step 5: Run Your Application\n", - "\n", - "Call your instrumented function to generate a trace:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "k1l2m3n4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "In a future where artificial intelligence had revolutionized society, a young engineer named Maya was fascinated by the endless possibilities of AI technology. She dedicated her life to mastering the complexities of AI engineering, pushing the boundaries of what was thought possible.\n", - "\n", - "Maya worked tirelessly, constantly experimenting and innovating to create AI systems that could change the world for the better. Her creations helped streamline businesses, improve healthcare outcomes, and enhance everyday tasks for people around the globe.\n", - "\n", - "However, Maya soon realized that not all AI technology was being used ethically. Some companies exploited AI for profit, using it to manipulate data or invade people's privacy. Troubled by this misuse of technology, Maya made it her mission to advocate for responsible AI engineering practices.\n", - "\n", - "Through her dedication and leadership, Maya became a voice for ethical AI engineering, pushing for regulations and guidelines to ensure that AI technology was used for the greater good of humanity. Her passion inspired others in the field to prioritize ethics and social responsibility in their work.\n", - "\n", - "As the world grappled with the emerging challenges of AI technology, Maya stood at the forefront, a shining example of how innovation and integrity could go hand in hand in the exciting world of AI engineering.\n" - ] - } - ], - "source": [ - "if __name__ == \"__main__\":\n", - " result = generate()\n", - " print(result)" - ] - }, - { - "cell_type": "markdown", - "id": "l2m3n4o5", - "metadata": {}, - "source": [ - "## Step 6: View Traces in the Agenta UI\n", - "\n", - "After running your application, you can view the captured traces in Agenta:\n", - "\n", - "1. Log in to your Agenta dashboard.\n", - "2. Navigate to the **Observability** section.\n", - "3. You'll see a list of traces corresponding to your application's requests.\n", - "\n", - "Each trace will show you the inputs, outputs, and metadata from your LLM application, including:\n", - "- Function execution time\n", - "- OpenAI API calls and responses\n", - "- Token usage\n", - "- Any errors or exceptions" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb b/examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb deleted file mode 100644 index d40d9dc9af..0000000000 --- a/examples/jupyter/observability/trace-with-python-sdk-tutorial.ipynb +++ /dev/null @@ -1,524 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Trace with Python SDK - Tutorial\n", - "\n", - "This tutorial demonstrates how to use the Agenta Python SDK to trace your LLM applications. You'll learn how to:\n", - "\n", - "- Set up tracing with the Agenta SDK\n", - "- Instrument functions and OpenAI calls automatically\n", - "- Start and end spans manually to capture internals\n", - "- Reference prompt versions in your traces\n", - "- Redact sensitive data from traces\n", - "\n", - "## What You'll Build\n", - "\n", - "We'll create a simple LLM application that:\n", - "1. Uses OpenAI auto-instrumentation to trace API calls\n", - "2. Instruments custom functions to capture workflow steps\n", - "3. Stores internal data like retrieved context\n", - "4. Links traces to deployed prompt versions\n", - "5. Redacts sensitive information from traces" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "pip install -U agenta openai opentelemetry-instrumentation-openai" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Setup\n", - "\n", - "Before using the SDK, we need to initialize it with your API keys. The SDK requires:\n", - "- **Agenta API Key**: For sending traces to Agenta\n", - "- **OpenAI API Key**: For making LLM calls\n", - "\n", - "You can get your Agenta API key from the [API Keys page](https://cloud.agenta.ai/settings?tab=apiKeys)." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai/\" # Default value, change for self-hosted\n", - "os.environ[\"AGENTA_API_KEY\"] = \"\"\n", - "os.environ[\"OPENAI_API_KEY\"] = \"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import agenta as ag\n", - "from getpass import getpass\n", - "\n", - "# Initialize the SDK with your API key\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " os.environ[\"AGENTA_API_KEY\"] = getpass(\"Enter your Agenta API key: \")\n", - "\n", - "openai_api_key = os.getenv(\"OPENAI_API_KEY\")\n", - "if not openai_api_key:\n", - " os.environ[\"OPENAI_API_KEY\"] = getpass(\"Enter your OpenAI API key: \")\n", - "\n", - "# Initialize the SDK\n", - "ag.init()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 1: Setup Tracing with OpenAI Auto-Instrumentation\n", - "\n", - "The Agenta SDK provides two powerful mechanisms for tracing:\n", - "\n", - "1. **Auto-instrumentation**: Automatically traces third-party libraries like OpenAI\n", - "2. **Function decorators**: Manually instrument your custom functions\n", - "\n", - "Let's start by setting up OpenAI auto-instrumentation, which will capture all OpenAI API calls automatically." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from opentelemetry.instrumentation.openai import OpenAIInstrumentor\n", - "import openai\n", - "\n", - "# Instrument OpenAI to automatically trace all API calls\n", - "OpenAIInstrumentor().instrument()\n", - "\n", - "print(\"OpenAI auto-instrumentation enabled!\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 2: Instrument Functions\n", - "\n", - "Now let's create a simple function and instrument it using the `@ag.instrument()` decorator. This will create a span for the function and automatically capture its inputs and outputs.\n", - "\n", - "The decorator accepts a `spankind` parameter to categorize the span. Available types include: `agent`, `chain`, `workflow`, `tool`, `embedding`, `query`, `completion`, `chat`, `rerank`." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def generate_story(topic: str):\n", - " \"\"\"Generate a short story about the given topic.\"\"\"\n", - " response = openai.chat.completions.create(\n", - " model=\"gpt-3.5-turbo\",\n", - " messages=[\n", - " {\"role\": \"system\", \"content\": \"You are a creative storyteller.\"},\n", - " {\"role\": \"user\", \"content\": f\"Write a short story about {topic}.\"},\n", - " ],\n", - " )\n", - " return response.choices[0].message.content\n", - "\n", - "# Test the instrumented function\n", - "story = generate_story(\"AI Engineering\")\n", - "print(\"Generated story:\")\n", - "print(story)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 3: Starting Spans and Storing Internals\n", - "\n", - "Sometimes you need to capture intermediate data that isn't part of the function's inputs or outputs. The SDK provides two methods:\n", - "\n", - "- `ag.tracing.store_meta()`: Add metadata to a span (saved under `ag.meta`)\n", - "- `ag.tracing.store_internals()`: Store internal data (saved under `ag.data.internals`)\n", - "\n", - "Internals are especially useful because they:\n", - "1. Are searchable using plain text queries\n", - "2. Appear in the overview tab of the observability drawer\n", - "\n", - "Let's create a RAG (Retrieval-Augmented Generation) example that captures the retrieved context:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"tool\")\n", - "def retrieve_context(query: str):\n", - " \"\"\"Simulate retrieving context from a knowledge base.\"\"\"\n", - " # In a real application, this would query a vector database\n", - " context = [\n", - " \"Agenta is an open-source LLM developer platform.\",\n", - " \"Agenta provides tools for prompt management, evaluation, and observability.\",\n", - " \"The Agenta SDK supports tracing with OpenTelemetry.\",\n", - " ]\n", - " \n", - " # Store metadata about the retrieval\n", - " ag.tracing.store_meta({\n", - " \"retrieval_method\": \"vector_search\",\n", - " \"num_results\": len(context)\n", - " })\n", - " \n", - " return context\n", - "\n", - "@ag.instrument(spankind=\"workflow\")\n", - "def rag_workflow(query: str):\n", - " \"\"\"Answer a question using retrieved context.\"\"\"\n", - " # Retrieve context\n", - " context = retrieve_context(query)\n", - " \n", - " # Store the retrieved context as internals\n", - " # This makes it visible in the UI and searchable\n", - " ag.tracing.store_internals({\"retrieved_context\": context})\n", - " \n", - " # Generate answer using context\n", - " context_str = \"\\n\".join(context)\n", - " prompt = f\"Answer the following question based on the context:\\n\\nContext:\\n{context_str}\\n\\nQuestion: {query}\"\n", - " \n", - " response = openai.chat.completions.create(\n", - " model=\"gpt-3.5-turbo\",\n", - " messages=[\n", - " {\"role\": \"system\", \"content\": \"You are a helpful assistant. Answer questions based only on the provided context.\"},\n", - " {\"role\": \"user\", \"content\": prompt},\n", - " ],\n", - " )\n", - " \n", - " return response.choices[0].message.content\n", - "\n", - "# Test the RAG workflow\n", - "answer = rag_workflow(\"What is Agenta?\")\n", - "print(\"Answer:\")\n", - "print(answer)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 4: Reference Prompt Versions\n", - "\n", - "One of Agenta's powerful features is linking traces to specific prompt versions. This allows you to:\n", - "- Filter traces by application, variant, or environment\n", - "- Compare performance across different variants\n", - "- Track production behavior\n", - "\n", - "Let's create a prompt using the SDK, deploy it, and then reference it in our traces." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create and Deploy a Prompt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "from agenta.sdk.types import PromptTemplate, Message, ModelConfig\nfrom pydantic import BaseModel\n\n# Define the prompt configuration\nclass Config(BaseModel):\n prompt: PromptTemplate\n\nconfig = Config(\n prompt=PromptTemplate(\n messages=[\n Message(role=\"system\", content=\"You are a helpful assistant that explains topics clearly.\"),\n Message(role=\"user\", content=\"Explain {{topic}} in simple terms.\"),\n ],\n llm_config=ModelConfig(\n model=\"gpt-3.5-turbo\",\n max_tokens=200,\n temperature=0.7,\n top_p=1.0,\n frequency_penalty=0.0,\n presence_penalty=0.0,\n ),\n template_format=\"curly\"\n )\n)\n\n# Create an application and variant\napp = ag.AppManager.create(\n app_slug=\"topic-explainer-traced\",\n template_key=\"SERVICE:completion\",\n)\n\nprint(f\"Created application: {app.app_name}\")\n\n# Create a variant with the prompt configuration\nvariant = ag.VariantManager.create(\n parameters=config.model_dump(),\n app_slug=\"topic-explainer-traced\",\n variant_slug=\"production-variant\"\n)\n\nprint(f\"Created variant: {variant.variant_slug} (version {variant.variant_version})\")\n\n# Deploy to production environment\ndeployment = ag.DeploymentManager.deploy(\n app_slug=\"topic-explainer-traced\",\n variant_slug=\"production-variant\",\n environment_slug=\"production\",\n)\n\nprint(f\"Deployed to {deployment.environment_slug} environment\")" - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Reference the Prompt in Traces\n", - "\n", - "Now we'll create a function that uses the deployed prompt and links its traces to the application and environment." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(spankind=\"workflow\")\n", - "def explain_topic_with_prompt(topic: str):\n", - " \"\"\"Explain a topic using the deployed prompt configuration.\"\"\"\n", - " \n", - " # Fetch the prompt configuration from production\n", - " prompt_config = ag.ConfigManager.get_from_registry(\n", - " app_slug=\"topic-explainer-traced\",\n", - " environment_slug=\"production\"\n", - " )\n", - " \n", - " # Format the prompt with the topic\n", - " prompt_template = PromptTemplate(**prompt_config[\"prompt\"])\n", - " formatted_prompt = prompt_template.format(topic=topic)\n", - " \n", - " # Make the OpenAI call\n", - " response = openai.chat.completions.create(\n", - " **formatted_prompt.to_openai_kwargs()\n", - " )\n", - " \n", - " # Link this trace to the application and environment\n", - " ag.tracing.store_refs({\n", - " \"application.slug\": \"topic-explainer-traced\",\n", - " \"variant.slug\": \"production-variant\",\n", - " \"environment.slug\": \"production\",\n", - " })\n", - " \n", - " return response.choices[0].message.content\n", - "\n", - "# Test the function\n", - "explanation = explain_topic_with_prompt(\"machine learning\")\n", - "print(\"Explanation:\")\n", - "print(explanation)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Part 5: Redact Sensitive Data\n", - "\n", - "When working with production data, you often need to exclude sensitive information from traces. The Agenta SDK provides several ways to redact data:\n", - "\n", - "1. **Simple redaction**: Ignore all inputs/outputs\n", - "2. **Selective redaction**: Ignore specific fields\n", - "3. **Custom redaction**: Use a callback function for fine-grained control\n", - "4. **Global redaction**: Apply rules across all instrumented functions\n", - "\n", - "Let's explore these different approaches." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Simple Redaction: Ignore All Inputs/Outputs" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(\n", - " spankind=\"workflow\",\n", - " ignore_inputs=True,\n", - " ignore_outputs=True\n", - ")\n", - "def process_sensitive_data(user_email: str, credit_card: str):\n", - " \"\"\"Process sensitive data without logging inputs/outputs.\"\"\"\n", - " # The function inputs and outputs won't be captured in the trace\n", - " result = f\"Processed data for {user_email}\"\n", - " return result\n", - "\n", - "# This trace will not contain inputs or outputs\n", - "result = process_sensitive_data(\"user@example.com\", \"4111-1111-1111-1111\")\n", - "print(result)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Selective Redaction: Ignore Specific Fields" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "@ag.instrument(\n", - " spankind=\"workflow\",\n", - " ignore_inputs=[\"api_key\", \"password\"],\n", - " ignore_outputs=[\"internal_token\"]\n", - ")\n", - "def authenticate_user(username: str, password: str, api_key: str):\n", - " \"\"\"Authenticate a user (password and api_key will be redacted).\"\"\"\n", - " # Simulate authentication\n", - " return {\n", - " \"username\": username,\n", - " \"authenticated\": True,\n", - " \"internal_token\": \"secret-token-12345\", # This will be redacted\n", - " }\n", - "\n", - "# The trace will show username but not password or api_key\n", - "auth_result = authenticate_user(\"john_doe\", \"secret123\", \"sk-abc123\")\n", - "print(f\"Authenticated: {auth_result['authenticated']}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Custom Redaction: Use a Callback Function" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "\n", - "def redact_pii(name: str, field: str, data: dict):\n", - " \"\"\"Custom redaction function that removes PII.\"\"\"\n", - " if field == \"inputs\":\n", - " # Redact email addresses\n", - " if \"email\" in data:\n", - " data[\"email\"] = \"[REDACTED]\"\n", - " # Redact phone numbers\n", - " if \"phone\" in data:\n", - " data[\"phone\"] = \"[REDACTED]\"\n", - " \n", - " if field == \"outputs\":\n", - " # Redact any credit card patterns\n", - " if isinstance(data, dict):\n", - " for key, value in data.items():\n", - " if isinstance(value, str):\n", - " # Simple credit card pattern\n", - " data[key] = re.sub(r'\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}', '[CARD-REDACTED]', value)\n", - " \n", - " return data\n", - "\n", - "@ag.instrument(\n", - " spankind=\"workflow\",\n", - " redact=redact_pii,\n", - " redact_on_error=False # Don't apply redaction if it raises an error\n", - ")\n", - "def process_customer_order(name: str, email: str, phone: str, card_number: str):\n", - " \"\"\"Process a customer order with PII redaction.\"\"\"\n", - " return {\n", - " \"status\": \"processed\",\n", - " \"customer\": name,\n", - " \"payment_info\": f\"Charged card ending in {card_number[-4:]}\",\n", - " \"full_card\": card_number # This will be redacted\n", - " }\n", - "\n", - "# Test with sample data\n", - "order = process_customer_order(\n", - " name=\"Jane Smith\",\n", - " email=\"jane@example.com\", # Will be redacted\n", - " phone=\"555-1234\", # Will be redacted\n", - " card_number=\"4111-1111-1111-1111\" # Will be redacted in output\n", - ")\n", - "print(f\"Order status: {order['status']}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Global Redaction: Apply Rules Across All Functions\n", - "\n", - "For organization-wide policies, you can set up global redaction rules during initialization. Note: Since we already called `ag.init()`, this is just for demonstration. In a real application, you would set this during the initial setup." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Example of global redaction setup (would be done during ag.init())\n", - "from typing import Dict, Any\n", - "\n", - "def global_redact_function(name: str, field: str, data: Dict[str, Any]):\n", - " \"\"\"Global redaction that applies to all instrumented functions.\"\"\"\n", - " # Remove any field containing 'api_key' or 'secret'\n", - " if isinstance(data, dict):\n", - " keys_to_redact = [k for k in data.keys() if 'api_key' in k.lower() or 'secret' in k.lower()]\n", - " for key in keys_to_redact:\n", - " data[key] = \"[REDACTED]\"\n", - " \n", - " return data\n", - "\n", - "# In production, you would initialize like this:\n", - "# ag.init(\n", - "# redact=global_redact_function,\n", - "# redact_on_error=True\n", - "# )\n", - "\n", - "print(\"Global redaction would be configured during ag.init()\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "In this tutorial, you learned how to:\n", - "\n", - "1. ✅ **Set up tracing** with the Agenta SDK and OpenAI auto-instrumentation\n", - "2. ✅ **Instrument functions** using the `@ag.instrument()` decorator\n", - "3. ✅ **Store internals and metadata** to capture intermediate data in your workflows\n", - "4. ✅ **Reference prompt versions** by creating, deploying, and linking traces to applications\n", - "5. ✅ **Redact sensitive data** using multiple approaches for privacy protection\n", - "\n", - "## Next Steps\n", - "\n", - "- Explore [distributed tracing](/observability/trace-with-python-sdk/distributed-tracing) for multi-service applications\n", - "- Learn about [cost tracking](/observability/trace-with-python-sdk/track-costs) to monitor LLM expenses\n", - "- Understand [trace annotations](/observability/trace-with-python-sdk/annotate-traces) for collecting feedback\n", - "- Check out the [Agenta UI guide](/observability/using-the-ui/filtering-traces) for filtering and analyzing traces" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.0" - }, - "colab": { - "provenance": [] - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/examples/jupyter/observability_langchain.ipynb b/examples/jupyter/observability_langchain.ipynb index 0fa0e070e0..f2b6321392 100644 --- a/examples/jupyter/observability_langchain.ipynb +++ b/examples/jupyter/observability_langchain.ipynb @@ -74,10 +74,10 @@ "import os\n", "import getpass\n", "\n", - "os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(prompt=\"OpenAI API key:\")\n", + "os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(prompt=\"OpenAI API key:\") \n", "# Create an Agenta API key under https://cloud.agenta.ai/settings?tab=apiKeys\n", - "os.environ[\"AGENTA_API_KEY\"] = getpass.getpass(prompt=\"Agenta API key:\")\n", - "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Change for self-hosted" + "os.environ[\"AGENTA_API_KEY\"] = getpass.getpass(prompt=\"Agenta API key:\") \n", + "os.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai\" # Change for self-hosted\n" ] }, { @@ -115,7 +115,7 @@ "\n", "ag.init()\n", "\n", - "LangchainInstrumentor().instrument()" + "LangchainInstrumentor().instrument()\n" ] }, { @@ -174,19 +174,17 @@ "Answer:\n", "\"\"\"\n", "\n", - "prompt_template = ChatPromptTemplate(\n", - " [\n", - " (\"human\", prompt),\n", - " ]\n", - ")\n", + "prompt_template = ChatPromptTemplate([\n", + " (\"human\", prompt),\n", + "])\n", "\n", "llm = ChatOpenAI(model=\"gpt-4o-mini\")\n", "\n", "loader = WebBaseLoader(\n", - " web_paths=(\n", - " \"https://docs.agenta.ai/prompt-engineering/managing-prompts-programatically/create-and-commit\",\n", + " web_paths=(\"https://docs.agenta.ai/prompt-engineering/prompt-management/prompt-management-sdk\",),\n", + " bs_kwargs=dict(\n", + " parse_only=bs4.SoupStrainer('article') # Only parse the core\n", " ),\n", - " bs_kwargs=dict(parse_only=bs4.SoupStrainer(\"article\")), # Only parse the core\n", ")\n", "docs = loader.load()\n", "\n", @@ -205,7 +203,8 @@ " | StrOutputParser()\n", ")\n", "\n", - "rag_chain.invoke(\"How can I save a new version of a prompt in Agenta?\")" + "rag_chain.invoke(\"How can I save a new version of a prompt in Agenta?\")\n", + "\n" ] } ], diff --git a/examples/jupyter/prompt-management/how-to-prompt-management.ipynb b/examples/jupyter/prompt-management/how-to-prompt-management.ipynb deleted file mode 100644 index abc071f818..0000000000 --- a/examples/jupyter/prompt-management/how-to-prompt-management.ipynb +++ /dev/null @@ -1,826 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "fe036c83", - "metadata": {}, - "source": [ - "# A How-To Guide for Prompt Management with the SDK in Agenta\n", - "\n", - "This guide covers all prompt management operations using the Agenta SDK: creating variants, committing changes, deploying to environments, and fetching configurations.\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "d96a3129", - "metadata": { - "vscode": { - "languageId": "bat" - } - }, - "source": [ - "## Install dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "35bbfebe", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: agenta in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (0.51.6)\n", - "Requirement already satisfied: decorator<6.0.0,>=5.2.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (5.2.1)\n", - "Requirement already satisfied: fastapi<0.117.0,>=0.116.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.116.1)\n", - "Requirement already satisfied: h11>=0.16.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.16.0)\n", - "Requirement already satisfied: httpx>=0.28.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.28.1)\n", - "Requirement already satisfied: huggingface-hub<0.31.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.30.2)\n", - "Requirement already satisfied: importlib-metadata<9.0,>=8.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (8.7.0)\n", - "Requirement already satisfied: jinja2<4.0.0,>=3.1.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (3.1.6)\n", - "Requirement already satisfied: litellm==1.76.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.76.0)\n", - "Requirement already satisfied: openai>=1.100.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.106.1)\n", - "Requirement already satisfied: opentelemetry-api<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-instrumentation>=0.56b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.57b0)\n", - "Requirement already satisfied: opentelemetry-sdk<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: pydantic>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (2.11.7)\n", - "Requirement already satisfied: python-dotenv<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.1.1)\n", - "Requirement already satisfied: pyyaml<7.0.0,>=6.0.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (6.0.2)\n", - "Requirement already satisfied: starlette<0.48.0,>=0.47.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.47.3)\n", - "Requirement already satisfied: structlog<26.0.0,>=25.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (25.4.0)\n", - "Requirement already satisfied: toml<0.11.0,>=0.10.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.10.2)\n", - "Requirement already satisfied: aiohttp>=3.10 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (3.12.15)\n", - "Requirement already satisfied: click in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (8.2.1)\n", - "Requirement already satisfied: jsonschema<5.0.0,>=4.22.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (4.25.1)\n", - "Requirement already satisfied: tiktoken>=0.7.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (0.11.0)\n", - "Requirement already satisfied: tokenizers in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (0.22.0)\n", - "Requirement already satisfied: typing-extensions>=4.8.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from fastapi<0.117.0,>=0.116.0->agenta) (4.15.0)\n", - "Requirement already satisfied: filelock in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (3.19.1)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (2025.7.0)\n", - "Requirement already satisfied: packaging>=20.9 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (25.0)\n", - "Requirement already satisfied: requests in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (2.32.5)\n", - "Requirement already satisfied: tqdm>=4.42.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (4.67.1)\n", - "Requirement already satisfied: zipp>=3.20 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from importlib-metadata<9.0,>=8.0.0->agenta) (3.23.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jinja2<4.0.0,>=3.1.6->agenta) (3.0.2)\n", - "Requirement already satisfied: attrs>=22.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (25.3.0)\n", - "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (2025.4.1)\n", - "Requirement already satisfied: referencing>=0.28.4 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (0.36.2)\n", - "Requirement already satisfied: rpds-py>=0.7.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (0.27.1)\n", - "Requirement already satisfied: googleapis-common-protos~=1.52 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.70.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-common==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-proto==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: protobuf<7.0,>=5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-proto==1.36.0->opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (6.32.0)\n", - "Requirement already satisfied: opentelemetry-semantic-conventions==0.57b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-sdk<2.0.0,>=1.27.0->agenta) (0.57b0)\n", - "Requirement already satisfied: annotated-types>=0.6.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (0.7.0)\n", - "Requirement already satisfied: pydantic-core==2.33.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (2.33.2)\n", - "Requirement already satisfied: typing-inspection>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (0.4.1)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (3.4.3)\n", - "Requirement already satisfied: idna<4,>=2.5 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (3.10)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (2.5.0)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (2025.8.3)\n", - "Requirement already satisfied: anyio<5,>=3.6.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from starlette<0.48.0,>=0.47.0->agenta) (4.10.0)\n", - "Requirement already satisfied: sniffio>=1.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from anyio<5,>=3.6.2->starlette<0.48.0,>=0.47.0->agenta) (1.3.1)\n", - "Requirement already satisfied: aiohappyeyeballs>=2.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (2.6.1)\n", - "Requirement already satisfied: aiosignal>=1.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.4.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.7.0)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (6.6.4)\n", - "Requirement already satisfied: propcache>=0.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (0.3.2)\n", - "Requirement already satisfied: yarl<2.0,>=1.17.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.20.1)\n", - "Requirement already satisfied: httpcore==1.* in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from httpx>=0.28.0->agenta) (1.0.9)\n", - "Requirement already satisfied: distro<2,>=1.7.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai>=1.100.0->agenta) (1.9.0)\n", - "Requirement already satisfied: jiter<1,>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai>=1.100.0->agenta) (0.10.0)\n", - "Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-instrumentation>=0.56b0->agenta) (1.17.3)\n", - "Requirement already satisfied: regex>=2022.1.18 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from tiktoken>=0.7.0->litellm==1.76.0->agenta) (2025.9.1)\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "pip install -U agenta" - ] - }, - { - "cell_type": "markdown", - "id": "09579f66", - "metadata": {}, - "source": [ - "## Setup" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "02fa644e", - "metadata": {}, - "outputs": [], - "source": "import os\n\nos.environ[\"AGENTA_API_KEY\"] = \"\"\nos.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai/\"" - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "e43db2b5", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2025-09-11T13:55:47.580Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - SDK version: 0.51.6 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-09-11T13:55:47.582Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - Host: http://144.76.237.122 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-09-11T13:55:47.583Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - OLTP URL: https://http://144.76.237.122/api/otlp/v1/traces \u001b[38;5;245m[agenta.sdk.tracing.tracing]\u001b[0m \n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Overriding of current TracerProvider is not allowed\n" - ] - } - ], - "source": [ - "import agenta as ag\n", - "from getpass import getpass\n", - "\n", - "# Get API key from environment or prompt user\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " os.environ[\"AGENTA_API_KEY\"] = getpass(\"Enter your Agenta API key: \")\n", - "\n", - "\n", - "# Initialize the Agenta client\n", - "ag.init()\n" - ] - }, - { - "cell_type": "markdown", - "id": "564c90d6", - "metadata": {}, - "source": [ - "## Create new prompts" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "05786812", - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "from agenta.sdk.types import PromptTemplate, Message, ModelConfig\n", - "from pydantic import BaseModel\n", - "\n", - "# Creates an empty application\n", - "app = ag.AppManager.create(\n", - " app_slug=\"my-completion\",\n", - " template_key=\"SERVICE:completion\", # we define here the app type\n", - " # template_key=\"SERVICE:chat\" # chat prompts\n", - " # template_key=\"CUSTOM\" # custom configuration (schema-less, however unless you provide a URI, you can only use the registry but not the playground)\n", - ")\n", - "\n", - "# Define your configuration model it should alway be of this format for completion and chat apps\n", - "class Config(BaseModel):\n", - " prompt: PromptTemplate\n", - "\n", - "# Create the initial configuration\n", - "config = Config(\n", - " prompt=PromptTemplate(\n", - " messages=[\n", - " Message(role=\"system\", content=\"You are an assistant that provides concise answers\"),\n", - " Message(role=\"user\", content=\"Explain {{topic}} in simple terms\"),\n", - " ],\n", - " llm_config=ModelConfig(\n", - " model=\"gpt-3.5-turbo\",\n", - " max_tokens=150,\n", - " temperature=0.7,\n", - " top_p=1.0,\n", - " frequency_penalty=0.0,\n", - " presence_penalty=0.0,\n", - " ),\n", - " )\n", - ")\n", - "\n", - "# Create a new variant with the first revision \n", - "variant = ag.VariantManager.create(\n", - " parameters=config.model_dump(),\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"default\",\n", - ")\n" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "25ae5452", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-ac32-7783-a385-09d0a1d084af\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 1,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:21.728674+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"gpt-3.5-turbo\",\n", - " \"temperature\": 0.7,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "\n", - "print(variant)\n" - ] - }, - { - "cell_type": "markdown", - "id": "d36a543a", - "metadata": {}, - "source": [ - "## Creating a new revision" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "ff9382d2", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-cbea-7ca2-bc6e-2920316958c3\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:21.728674+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides VERY concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"anthropic/claude-3-5-sonnet-20240620\",\n", - " \"temperature\": 0.7,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "config2=Config(\n", - " prompt=PromptTemplate(\n", - " messages=[\n", - " Message(role=\"system\", content=\"You are an assistant that provides VERY concise answers\"),\n", - " Message(role=\"user\", content=\"Explain {{topic}} in simple terms\"),\n", - " ],\n", - " llm_config=ModelConfig(\n", - " model=\"anthropic/claude-3-5-sonnet-20240620\",\n", - " max_tokens=150,\n", - " temperature=0.7,\n", - " top_p=1.0,\n", - " frequency_penalty=0.0,\n", - " presence_penalty=0.0,\n", - " ),\n", - " )\n", - ")\n", - "\n", - "\n", - "# Commit the new version\n", - "variant = ag.VariantManager.commit(\n", - " parameters=config2.model_dump(),\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"default\",\n", - ")\n", - "\n", - "print(variant)" - ] - }, - { - "cell_type": "markdown", - "id": "79553cec", - "metadata": {}, - "source": [ - "## Deploying to an environment" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "5fbd3d75", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Deployed to staging\n" - ] - } - ], - "source": [ - "deployment = ag.DeploymentManager.deploy(\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"default\",\n", - " variant_version=None, # Deploys latest version if not specified\n", - " environment_slug=\"staging\" # Options: development, staging, production\n", - ")\n", - "\n", - "print(f\"Deployed to {deployment.environment_slug}\")\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "7fbae284", - "metadata": {}, - "source": [ - "## Fetching configurations" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "6ab6bab6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Fetched configuration for variant default version 2:\n", - "{'prompt': {'messages': [{'role': 'system', 'content': 'You are an assistant that provides VERY concise answers', 'name': None, 'tool_calls': None, 'tool_call_id': None}, {'role': 'user', 'content': 'Explain {{topic}} in simple terms', 'name': None, 'tool_calls': None, 'tool_call_id': None}], 'system_prompt': None, 'user_prompt': None, 'template_format': 'curly', 'input_keys': None, 'llm_config': {'model': 'anthropic/claude-3-5-sonnet-20240620', 'temperature': 0.7, 'max_tokens': 150, 'top_p': 1.0, 'frequency_penalty': 0.0, 'presence_penalty': 0.0, 'response_format': None, 'stream': None, 'tools': None, 'tool_choice': None}}}\n", - "Fetched configuration for staging environment version 1:\n", - "{'prompt': {'messages': [{'role': 'system', 'content': 'You are an assistant that provides VERY concise answers', 'name': None, 'tool_calls': None, 'tool_call_id': None}, {'role': 'user', 'content': 'Explain {{topic}} in simple terms', 'name': None, 'tool_calls': None, 'tool_call_id': None}], 'system_prompt': None, 'user_prompt': None, 'template_format': 'curly', 'input_keys': None, 'llm_config': {'model': 'anthropic/claude-3-5-sonnet-20240620', 'temperature': 0.7, 'max_tokens': 150, 'top_p': 1.0, 'frequency_penalty': 0.0, 'presence_penalty': 0.0, 'response_format': None, 'stream': None, 'tools': None, 'tool_choice': None}}}\n" - ] - } - ], - "source": [ - "# Fetching by variant reference\n", - "config = ag.ConfigManager.get_from_registry(\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"default\",\n", - " variant_version=2 # Optional: fetches latest if not provided\n", - ")\n", - "print(\"Fetched configuration for variant default version 2:\")\n", - "print(config)\n", - "\n", - "# Fetching by environment reference (from staging)\n", - "config = ag.ConfigManager.get_from_registry(\n", - " app_slug=\"my-completion\",\n", - " environment_slug=\"staging\",\n", - " environment_version=1 # Optional: If not provided, fetches the latest version\n", - ")\n", - "\n", - "print(f\"Fetched configuration for staging environment version 1:\")\n", - "print(config)\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "4e298bae", - "metadata": {}, - "source": [ - "## Listing all variants" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "792e7804", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-cbea-7ca2-bc6e-2920316958c3\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:29.930593+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides VERY concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"anthropic/claude-3-5-sonnet-20240620\",\n", - " \"temperature\": 0.7,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}]\n" - ] - } - ], - "source": [ - "variants = ag.VariantManager.list(\n", - " app_slug=\"my-completion\"\n", - ")\n", - "\n", - "print(variants)\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "23503c53", - "metadata": {}, - "source": [ - "## Fetching variant history" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "9fcf9a8b", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-abe0-74a1-9e4c-80779f36c9e5\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:21.733212+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {}\n", - "}, {\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-abe0-74a1-9e4c-80779f36c9e5\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:21.810617+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"gpt-3.5-turbo\",\n", - " \"temperature\": 0.7,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}, {\n", - " \"app_id\": \"0199396b-aba7-7451-8db4-6fb5e4a1c8d2\",\n", - " \"app_slug\": \"my-completion\",\n", - " \"variant_id\": \"0199396b-abe0-74a1-9e4c-80779f36c9e5\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:36:29.930593+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides VERY concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"anthropic/claude-3-5-sonnet-20240620\",\n", - " \"temperature\": 0.7,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}]\n" - ] - } - ], - "source": [ - "versions = ag.VariantManager.history(\n", - " variant_slug=\"default\",\n", - " app_slug=\"my-completion\"\n", - ")\n", - "\n", - "print(versions)\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "e8f52205", - "metadata": {}, - "source": [ - "## Deleting a variant" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "id": "9d8d2e39", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "204" - ] - }, - "execution_count": 50, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "variant = ag.VariantManager.create(\n", - " parameters=config,\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"to-remove\",\n", - ")\n", - "\n", - "ag.VariantManager.delete(\n", - " app_slug=\"my-completion\",\n", - " variant_slug=\"to-remove\"\n", - ")\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "efad781d", - "metadata": {}, - "source": [ - "## Creating an app with a custom configuration (schema-less)" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "id": "dfb8437e", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"app_id\": \"01993970-5fa6-7561-bd77-edb117ee6788\",\n", - " \"app_slug\": \"my-rag-config\",\n", - " \"variant_id\": \"01993970-6008-7ca3-abb8-d5bfdf798fc4\",\n", - " \"variant_slug\": \"default\",\n", - " \"variant_version\": 1,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:41:29.923484+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"rag-prompt\": \"You are a helpful assistant that can answer questions and help with tasks.\",\n", - " \"rag-chunk_size\": 100,\n", - " \"rag-chunk_overlap\": 20\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "app = ag.AppManager.create(\n", - " app_slug=\"my-rag-config\",\n", - " template_key=\"CUSTOM\", # we define here the app type\n", - ")\n", - "\n", - "rag_config = {\n", - " \"rag-prompt\": \"You are a helpful assistant that can answer questions and help with tasks.\",\n", - " \"rag-chunk_size\": 100,\n", - " \"rag-chunk_overlap\": 20,\n", - "}\n", - "variant = ag.VariantManager.create(\n", - " parameters=rag_config,\n", - " app_slug=\"my-rag-config\",\n", - " variant_slug=\"default\",\n", - ")\n", - "\n", - "print(variant)\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv (3.12.3)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/examples/jupyter/prompt-management/manage-prompts-with-sdk-tutorial.ipynb b/examples/jupyter/prompt-management/manage-prompts-with-sdk-tutorial.ipynb deleted file mode 100644 index 3eaa4c44e7..0000000000 --- a/examples/jupyter/prompt-management/manage-prompts-with-sdk-tutorial.ipynb +++ /dev/null @@ -1,634 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Manage Prompts with SDK - Tutorial\n", - "\n", - "You can manage prompts easily through Agenta's web UI. But sometimes you might want to do things programmatically instead of using the interface.\n", - "\n", - "In this tutorial, we'll use the Agenta SDK to create a new prompt, commit changes, deploy them to production, then fetch their configuration and use it to call the LLM.\n", - "\n", - "## Tutorial Overview\n", - "\n", - "Before we begin, let's quickly review how Agenta versions prompts:\n", - "\n", - "Agenta follows a structure similar to **git** for prompt versioning. Instead of having one commit history, it uses **multiple branches (called variants)** where changes can be committed, and **environments** where these changes can be deployed (and used in your application).\n", - "\n", - "The workflow for deploying a change to production that we'll follow in this tutorial is:\n", - "\n", - "1. Create a new variant\n", - "2. Commit a change to that variant\n", - "3. Deploy that commit (variant/version) to the production environment\n", - "4. Commit a new change to that variant\n", - "5. Fetch the config from that environment\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install dependencies\n" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: agenta in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (0.51.6)\n", - "Requirement already satisfied: openai in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (1.106.1)\n", - "Collecting openai\n", - " Downloading openai-1.107.1-py3-none-any.whl.metadata (29 kB)\n", - "Requirement already satisfied: decorator<6.0.0,>=5.2.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (5.2.1)\n", - "Requirement already satisfied: fastapi<0.117.0,>=0.116.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.116.1)\n", - "Requirement already satisfied: h11>=0.16.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.16.0)\n", - "Requirement already satisfied: httpx>=0.28.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.28.1)\n", - "Requirement already satisfied: huggingface-hub<0.31.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.30.2)\n", - "Requirement already satisfied: importlib-metadata<9.0,>=8.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (8.7.0)\n", - "Requirement already satisfied: jinja2<4.0.0,>=3.1.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (3.1.6)\n", - "Requirement already satisfied: litellm==1.76.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.76.0)\n", - "Requirement already satisfied: opentelemetry-api<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-instrumentation>=0.56b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.57b0)\n", - "Requirement already satisfied: opentelemetry-sdk<2.0.0,>=1.27.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.36.0)\n", - "Requirement already satisfied: pydantic>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (2.11.7)\n", - "Requirement already satisfied: python-dotenv<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (1.1.1)\n", - "Requirement already satisfied: pyyaml<7.0.0,>=6.0.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (6.0.2)\n", - "Requirement already satisfied: starlette<0.48.0,>=0.47.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.47.3)\n", - "Requirement already satisfied: structlog<26.0.0,>=25.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (25.4.0)\n", - "Requirement already satisfied: toml<0.11.0,>=0.10.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from agenta) (0.10.2)\n", - "Requirement already satisfied: aiohttp>=3.10 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (3.12.15)\n", - "Requirement already satisfied: click in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (8.2.1)\n", - "Requirement already satisfied: jsonschema<5.0.0,>=4.22.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (4.25.1)\n", - "Requirement already satisfied: tiktoken>=0.7.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (0.11.0)\n", - "Requirement already satisfied: tokenizers in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from litellm==1.76.0->agenta) (0.22.0)\n", - "Requirement already satisfied: typing-extensions>=4.8.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from fastapi<0.117.0,>=0.116.0->agenta) (4.15.0)\n", - "Requirement already satisfied: filelock in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (3.19.1)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (2025.7.0)\n", - "Requirement already satisfied: packaging>=20.9 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (25.0)\n", - "Requirement already satisfied: requests in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (2.32.5)\n", - "Requirement already satisfied: tqdm>=4.42.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from huggingface-hub<0.31.0->agenta) (4.67.1)\n", - "Requirement already satisfied: zipp>=3.20 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from importlib-metadata<9.0,>=8.0.0->agenta) (3.23.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jinja2<4.0.0,>=3.1.6->agenta) (3.0.2)\n", - "Requirement already satisfied: attrs>=22.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (25.3.0)\n", - "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (2025.4.1)\n", - "Requirement already satisfied: referencing>=0.28.4 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (0.36.2)\n", - "Requirement already satisfied: rpds-py>=0.7.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm==1.76.0->agenta) (0.27.1)\n", - "Requirement already satisfied: googleapis-common-protos~=1.52 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.70.0)\n", - "Requirement already satisfied: opentelemetry-exporter-otlp-proto-common==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: opentelemetry-proto==1.36.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (1.36.0)\n", - "Requirement already satisfied: protobuf<7.0,>=5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-proto==1.36.0->opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.27.0->agenta) (6.32.0)\n", - "Requirement already satisfied: opentelemetry-semantic-conventions==0.57b0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-sdk<2.0.0,>=1.27.0->agenta) (0.57b0)\n", - "Requirement already satisfied: annotated-types>=0.6.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (0.7.0)\n", - "Requirement already satisfied: pydantic-core==2.33.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (2.33.2)\n", - "Requirement already satisfied: typing-inspection>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from pydantic>=2->agenta) (0.4.1)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (3.4.3)\n", - "Requirement already satisfied: idna<4,>=2.5 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (3.10)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (2.5.0)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from requests->huggingface-hub<0.31.0->agenta) (2025.8.3)\n", - "Requirement already satisfied: anyio<5,>=3.6.2 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from starlette<0.48.0,>=0.47.0->agenta) (4.10.0)\n", - "Requirement already satisfied: sniffio>=1.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from anyio<5,>=3.6.2->starlette<0.48.0,>=0.47.0->agenta) (1.3.1)\n", - "Requirement already satisfied: distro<2,>=1.7.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (1.9.0)\n", - "Requirement already satisfied: jiter<1,>=0.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from openai) (0.10.0)\n", - "Requirement already satisfied: httpcore==1.* in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from httpx>=0.28.0->agenta) (1.0.9)\n", - "Requirement already satisfied: aiohappyeyeballs>=2.5.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (2.6.1)\n", - "Requirement already satisfied: aiosignal>=1.4.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.4.0)\n", - "Requirement already satisfied: frozenlist>=1.1.1 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.7.0)\n", - "Requirement already satisfied: multidict<7.0,>=4.5 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (6.6.4)\n", - "Requirement already satisfied: propcache>=0.2.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (0.3.2)\n", - "Requirement already satisfied: yarl<2.0,>=1.17.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from aiohttp>=3.10->litellm==1.76.0->agenta) (1.20.1)\n", - "Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from opentelemetry-instrumentation>=0.56b0->agenta) (1.17.3)\n", - "Requirement already satisfied: regex>=2022.1.18 in /home/mahmoud/code/agenta_cloud/.venv/lib/python3.12/site-packages (from tiktoken>=0.7.0->litellm==1.76.0->agenta) (2025.9.1)\n", - "Downloading openai-1.107.1-py3-none-any.whl (945 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m945.2/945.2 kB\u001b[0m \u001b[31m22.6 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", - "\u001b[?25hInstalling collected packages: openai\n", - " Attempting uninstall: openai\n", - " Found existing installation: openai 1.106.1\n", - " Uninstalling openai-1.106.1:\n", - " Successfully uninstalled openai-1.106.1\n", - "Successfully installed openai-1.107.1\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "pip install -U agenta openai\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Setup\n", - "\n", - "Before using the SDK, we need to initialize it using the `ag.init()` method, which takes the host (default `cloud.agenta.ai`) and the API key (not required for community editions):\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": "import os\nos.environ[\"AGENTA_HOST\"] = \"https://cloud.agenta.ai/\" # Default value, no need to set explicitly unless self-hosted\nos.environ[\"AGENTA_API_KEY\"] = \"\"\nos.environ[\"OPENAI_API_KEY\"] = \"\"" - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2025-09-11T15:56:10.922Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - SDK version: 0.51.6 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-09-11T15:56:10.923Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - Host: http://144.76.237.122 \u001b[38;5;245m[agenta.sdk.agenta_init]\u001b[0m \n", - "2025-09-11T15:56:10.923Z \u001b[38;5;70m[INFO.]\u001b[0m Agenta - OLTP URL: http://144.76.237.122/api/otlp/v1/traces \u001b[38;5;245m[agenta.sdk.tracing.tracing]\u001b[0m \n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Overriding of current TracerProvider is not allowed\n" - ] - } - ], - "source": [ - "import os\n", - "import agenta as ag\n", - "from getpass import getpass\n", - "\n", - "# Initialize the SDK with your API key\n", - "api_key = os.getenv(\"AGENTA_API_KEY\")\n", - "if not api_key:\n", - " os.environ[\"AGENTA_API_KEY\"] = getpass(\"Enter your Agenta API key: \")\n", - "\n", - "openai_api_key = os.getenv(\"OPENAI_API_KEY\")\n", - "if not openai_api_key:\n", - " os.environ[\"OPENAI_API_KEY\"] = getpass(\"Enter your OpenAI API key: \")\n", - "\n", - "# Initialize the SDK\n", - "ag.init()\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Creating a new prompt\n", - "\n", - "We're going to create a new completion prompt called `topic-explainer`.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Created application:\n", - "app_id='0199397d-14f4-7bb2-a9c5-9a12934fb6c3' app_name='topic-explainer'\n" - ] - } - ], - "source": [ - "# Creates an empty application\n", - "app = ag.AppManager.create(\n", - " app_slug=\"topic-explainer\",\n", - " template_key=\"SERVICE:completion\", # we define here the app type, choices are SERVICE:completion, SERVICE:chat, CUSTOM\n", - ")\n", - "\n", - "print(\"Created application:\")\n", - "print(app)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - ":::warning\n", - "The app created until now is empty. You cannot use it from the UI yet. You need to create a variant and commit changes to it to be able to use it (next section).\n", - ":::\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Creating a new variant\n", - "\n", - "Variants are similar to branches in **git**. Any change to the prompt must first be committed to a variant. Here, we'll create a new variant and make our first commit to it using the `VariantManager.create` method:\n" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Created variant:\n", - "{\n", - " \"app_id\": \"0199397d-14f4-7bb2-a9c5-9a12934fb6c3\",\n", - " \"app_slug\": \"topic-explainer\",\n", - " \"variant_id\": \"0199397d-1d46-74c3-bc3f-e63f2357c7dc\",\n", - " \"variant_slug\": \"new-variant\",\n", - " \"variant_version\": 1,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:55:24.842469+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Explain {{topic}} in simple terms\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"gpt-3.5-turbo\",\n", - " \"temperature\": 0.6,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "from agenta.sdk.types import PromptTemplate, Message, ModelConfig\n", - "from pydantic import BaseModel\n", - "\n", - "# We need to create a Pydantic Model with a `prompt` field of type `PromptTemplate`\n", - "class Config(BaseModel):\n", - " prompt: PromptTemplate\n", - "\n", - "config = Config(\n", - " prompt=PromptTemplate(\n", - " messages=[\n", - " Message(role=\"system\", content=\"You are an assistant that provides concise answers\"),\n", - " Message(role=\"user\", content=\"Explain {{topic}} in simple terms\"),\n", - " ],\n", - " llm_config=ModelConfig(\n", - " model=\"gpt-3.5-turbo\",\n", - " max_tokens=150,\n", - " temperature=0.6,\n", - " top_p=1.0,\n", - " frequency_penalty=0.0,\n", - " presence_penalty=0.0,\n", - " ),\n", - " template_format=\"curly\"\n", - " )\n", - ")\n", - "\n", - "# Create a new variant\n", - "variant = ag.VariantManager.create(\n", - " parameters=config.model_dump(),\n", - " app_slug=\"topic-explainer\",\n", - " variant_slug=\"new-variant\"\n", - ")\n", - "\n", - "print(\"Created variant:\")\n", - "print(variant)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This command will create a new variant and initialize it with the first commit containing the provided parameters.\n", - "\n", - "- **Parameters:**\n", - " - `app_slug`: The unique slug of your application.\n", - " - `variant_slug`: The unique slug of the new variant.\n", - " - `parameters`: A dictionary containing the initial configuration parameters.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Deploying changes to the production environment\n", - "\n", - "To deploy our commit to an environment, use the `DeploymentManager.deploy` method.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Deployed variant to environment:\n", - "{\n", - " \"app_id\": \"0199397d-14f4-7bb2-a9c5-9a12934fb6c3\",\n", - " \"app_slug\": \"topic-explainer\",\n", - " \"variant_id\": \"0199397d-1d46-74c3-bc3f-e63f2357c7dc\",\n", - " \"variant_slug\": \"new-variant\",\n", - " \"variant_version\": 1,\n", - " \"environment_id\": \"0199397d-23fe-7621-8d30-29426339a777\",\n", - " \"environment_slug\": \"production\",\n", - " \"environment_version\": 1,\n", - " \"committed_at\": \"2025-09-11T15:55:24.842469+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": \"2025-09-11T15:55:26.590624+00:00\",\n", - " \"deployed_by\": \"mahmoud@agenta.ai\",\n", - " \"deployed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\"\n", - "}\n" - ] - } - ], - "source": [ - "# Deploy the variant to the production environment\n", - "deployment = ag.DeploymentManager.deploy(\n", - " app_slug=\"topic-explainer\",\n", - " variant_slug=\"new-variant\",\n", - " environment_slug=\"production\",\n", - ")\n", - "\n", - "print(\"Deployed variant to environment:\")\n", - "print(deployment)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "- **Parameters:**\n", - " - `environment_slug`: The slug of the environment (`development`, `staging`, or `production`).\n", - "\n", - "- **Notes:**\n", - " - Deploying a variant without specifying a `variant_version` deploys the latest version.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Committing a change to variant\n", - "\n", - "We're now going to commit changes to our variant. Note that this will not modify the version in deployment!\n", - "\n", - "To save changes to a variant (creating a new version), we are going to use the `VariantManager.commit` method with explicit parameters.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Committed new version of variant:\n", - "{\n", - " \"app_id\": \"0199397d-14f4-7bb2-a9c5-9a12934fb6c3\",\n", - " \"app_slug\": \"topic-explainer\",\n", - " \"variant_id\": \"0199397d-2a70-7f20-ba60-2b810e512400\",\n", - " \"variant_slug\": \"new-variant\",\n", - " \"variant_version\": 2,\n", - " \"environment_id\": null,\n", - " \"environment_slug\": null,\n", - " \"environment_version\": null,\n", - " \"committed_at\": \"2025-09-11T15:55:24.842469+00:00\",\n", - " \"committed_by\": \"mahmoud@agenta.ai\",\n", - " \"committed_by_id\": \"0198eb1b-012a-7891-955e-15ef49443ece\",\n", - " \"deployed_at\": null,\n", - " \"deployed_by\": null,\n", - " \"deployed_by_id\": null,\n", - " \"params\": {\n", - " \"prompt\": {\n", - " \"messages\": [\n", - " {\n", - " \"role\": \"system\",\n", - " \"content\": \"You are an assistant that provides concise answers\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " },\n", - " {\n", - " \"role\": \"user\",\n", - " \"content\": \"Use Paul Graham style to explain {{topic}} in simple terms.\",\n", - " \"name\": null,\n", - " \"tool_calls\": null,\n", - " \"tool_call_id\": null\n", - " }\n", - " ],\n", - " \"system_prompt\": null,\n", - " \"user_prompt\": null,\n", - " \"template_format\": \"curly\",\n", - " \"input_keys\": null,\n", - " \"llm_config\": {\n", - " \"model\": \"gpt-3.5-turbo\",\n", - " \"temperature\": 0.9,\n", - " \"max_tokens\": 150,\n", - " \"top_p\": 1.0,\n", - " \"frequency_penalty\": 0.0,\n", - " \"presence_penalty\": 0.0,\n", - " \"response_format\": null,\n", - " \"stream\": null,\n", - " \"tools\": null,\n", - " \"tool_choice\": null\n", - " }\n", - " }\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "config2 = Config(\n", - " prompt=PromptTemplate(\n", - " messages=[\n", - " Message(role=\"system\", content=\"You are an assistant that provides concise answers\"),\n", - " Message(role=\"user\", content=\"Use Paul Graham style to explain {{topic}} in simple terms.\"),\n", - " ],\n", - " llm_config=ModelConfig(\n", - " model=\"gpt-3.5-turbo\",\n", - " max_tokens=150,\n", - " temperature=0.9,\n", - " top_p=1.0,\n", - " frequency_penalty=0.0,\n", - " presence_penalty=0.0,\n", - " ),\n", - " template_format=\"curly\"\n", - " )\n", - ")\n", - "\n", - "# Commit the new version\n", - "variant = ag.VariantManager.commit(\n", - " parameters=config2.model_dump(),\n", - " app_slug=\"topic-explainer\",\n", - " variant_slug=\"new-variant\"\n", - ")\n", - "\n", - "print(\"Committed new version of variant:\")\n", - "print(variant)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - ":::info Immutability\n", - "Each commit creates a new version of the variant. Versions are immutable once created.\n", - ":::\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Fetching the prompt in production\n", - "\n", - "Now we'll fetch and use the prompt that's in production. Keep in mind that the production environment still references the first version of our variant. If we want it to reflect the latest changes, we'll need to deploy it again.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Fetched configuration from production:\n", - "{'prompt': {'messages': [{'role': 'system', 'content': 'You are an assistant that provides concise answers', 'name': None, 'tool_calls': None, 'tool_call_id': None}, {'role': 'user', 'content': 'Explain {{topic}} in simple terms', 'name': None, 'tool_calls': None, 'tool_call_id': None}], 'system_prompt': None, 'user_prompt': None, 'template_format': 'curly', 'input_keys': None, 'llm_config': {'model': 'gpt-3.5-turbo', 'temperature': 0.6, 'max_tokens': 150, 'top_p': 1.0, 'frequency_penalty': 0.0, 'presence_penalty': 0.0, 'response_format': None, 'stream': None, 'tools': None, 'tool_choice': None}}}\n" - ] - } - ], - "source": [ - "# Fetch configuration from the production environment\n", - "config = ag.ConfigManager.get_from_registry(\n", - " app_slug=\"topic-explainer\",\n", - " environment_slug=\"production\"\n", - ")\n", - "\n", - "print(\"Fetched configuration from production:\")\n", - "print(config)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Response for topic 'artificial intelligence':\n", - "Artificial intelligence (AI) is the ability of a computer or machine to perform tasks that typically require human intelligence, such as learning, problem-solving, and decision-making. It involves creating algorithms and systems that can process information, recognize patterns, and make predictions without explicit programming.\n" - ] - } - ], - "source": [ - "# Using the configuration with OpenAI client\n", - "from openai import OpenAI\n", - "\n", - "# Format the prompt with your topic\n", - "topic = \"artificial intelligence\"\n", - "prompt = PromptTemplate(**config[\"prompt\"]).format(topic=topic)\n", - "client = OpenAI()\n", - "\n", - "response = client.chat.completions.create(\n", - " **prompt.to_openai_kwargs()\n", - ")\n", - "\n", - "print(f\"Response for topic '{topic}':\")\n", - "print(response.choices[0].message.content)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Next Steps\n", - "\n", - "Now that you've learned how to manage configurations using the SDK, you can:\n", - "\n", - "- Read the guide to explore more advanced features of the SDK\n", - "- Read how to reference prompts in your traces\n", - "- Read how to manage configuration for your workflows (chain of prompts, RAG..)\n", - "\n", - "## Summary\n", - "\n", - "In this tutorial, we've covered the complete workflow for managing prompts with the Agenta SDK:\n", - "\n", - "1. ✅ Created a new application\n", - "2. ✅ Created a variant with initial configuration\n", - "3. ✅ Deployed the variant to production environment\n", - "4. ✅ Committed changes to create a new version\n", - "5. ✅ Fetched configuration from production and used it with OpenAI\n", - "\n", - "This demonstrates the Git-like workflow that Agenta uses for prompt versioning, allowing you to manage different variants and deploy specific versions to different environments.\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv (3.12.3)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.3" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} \ No newline at end of file diff --git a/examples/node/observability-opentelemetry/.gitignore b/examples/node/observability-opentelemetry/.gitignore deleted file mode 100644 index 2cd0f44931..0000000000 --- a/examples/node/observability-opentelemetry/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules/ -.env -*.log - diff --git a/examples/node/observability-opentelemetry/README.md b/examples/node/observability-opentelemetry/README.md deleted file mode 100644 index 9d61b4984f..0000000000 --- a/examples/node/observability-opentelemetry/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# OpenTelemetry Quick Start Example - -This example demonstrates how to instrument a Node.js application with OpenTelemetry and send traces to Agenta. - -## Prerequisites - -- Node.js 18+ installed -- Agenta API key ([get one here](https://cloud.agenta.ai)) -- OpenAI API key - -## Version Compatibility - -This example uses the latest stable versions: -- **OpenAI SDK** (`latest` - v6.x) -- **OpenInference Instrumentation** (`latest` - v3.x) -- **OpenInference Semantic Conventions** (`latest` - v2.x) - -## Setup - -1. Install dependencies: -```bash -npm install -``` - -2. Create a `.env` file with your credentials: -```bash -cp .env.example .env -# Edit .env and add your API keys -``` - -3. Run the example: -```bash -npm start -``` - -## What's Happening? - -1. **instrumentation.js** - Configures OpenTelemetry to: - - Send traces to Agenta via OTLP - - Automatically instrument OpenAI calls using OpenInference - - Use SimpleSpanProcessor for immediate export (ideal for short scripts) - -2. **app.js** - A simple application that: - - Creates a manual span using Agenta's semantic conventions - - Calls OpenAI's chat completion API (auto-instrumented) - - Demonstrates proper use of `ag.data.inputs`, `ag.data.outputs`, and `ag.data.internals` - -3. All traces are sent to Agenta where you can: - - View the complete trace timeline - - See inputs/outputs with proper formatting - - Monitor costs and latency - - Debug issues - -## Semantic Conventions - -This example follows Agenta's semantic conventions for proper trace display: - -- **`ag.type.node`** - Defines the operation type (workflow, task, tool, etc.) -- **`ag.data.inputs`** - Stores input parameters as JSON -- **`ag.data.outputs`** - Stores output results as JSON -- **`ag.data.internals`** - Stores intermediate values and metadata - -See [SEMANTIC_CONVENTIONS.md](./SEMANTIC_CONVENTIONS.md) for detailed documentation. - -## View Your Traces - -After running the example, log in to [Agenta](https://cloud.agenta.ai) and navigate to the Observability section to see your traces! - diff --git a/examples/node/observability-opentelemetry/app.js b/examples/node/observability-opentelemetry/app.js deleted file mode 100644 index b3dce7e794..0000000000 --- a/examples/node/observability-opentelemetry/app.js +++ /dev/null @@ -1,80 +0,0 @@ -// app.js -import OpenAI from "openai"; -import { trace } from "@opentelemetry/api"; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, -}); - -const tracer = trace.getTracer("test-app", "1.0.0"); - -async function generate() { - // Create a manual span using Agenta's semantic conventions - // This demonstrates how to manually instrument functions with proper attributes - return tracer.startActiveSpan("generate", async (span) => { - try { - // Define the messages for the chat completion - const messages = [ - { role: "system", content: "You are a helpful assistant." }, - { role: "user", content: "Write a short story about AI Engineering." }, - ]; - - // Agenta Semantic Convention: ag.type.node - // Defines the type of operation (workflow, task, tool, etc.) - span.setAttribute("ag.type.node", "workflow"); - - // Agenta Semantic Convention: ag.data.inputs - // Stores the input parameters as JSON - span.setAttribute("ag.data.inputs", JSON.stringify({ - messages: messages, - model: "gpt-3.5-turbo" - })); - - const response = await openai.chat.completions.create({ - model: "gpt-3.5-turbo", - messages: messages, - }); - - const content = response.choices[0].message.content; - - // Agenta Semantic Convention: ag.data.internals - // Stores intermediate values and metadata (optional) - span.setAttribute("ag.data.internals", JSON.stringify({ - response_length: content.length - })); - - // Agenta Semantic Convention: ag.data.outputs - // Stores the output results as JSON - span.setAttribute("ag.data.outputs", JSON.stringify({ - content: content - })); - - return content; - } finally { - span.end(); - } - }); -} - -async function main() { - try { - const result = await generate(); - console.log("\n" + result); - - console.log("\n⏳ Flushing traces..."); - // Ensure traces are flushed before exit - const tracerProvider = trace.getTracerProvider(); - if (tracerProvider && typeof tracerProvider.forceFlush === 'function') { - await tracerProvider.forceFlush(); - } - // Extra wait to ensure export completes - await new Promise(resolve => setTimeout(resolve, 1000)); - console.log("✅ Done!"); - } catch (error) { - console.error("❌ Error:", error.message); - process.exit(1); - } -} - -main(); - diff --git a/examples/node/observability-opentelemetry/instrumentation.js b/examples/node/observability-opentelemetry/instrumentation.js deleted file mode 100644 index 4921de9bf7..0000000000 --- a/examples/node/observability-opentelemetry/instrumentation.js +++ /dev/null @@ -1,74 +0,0 @@ -// instrumentation.js -import { registerInstrumentations } from "@opentelemetry/instrumentation"; -import { OpenAIInstrumentation } from "@arizeai/openinference-instrumentation-openai"; -import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api"; -import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto"; -import { Resource } from "@opentelemetry/resources"; -import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base"; -import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; -import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; -import { SEMRESATTRS_PROJECT_NAME } from "@arizeai/openinference-semantic-conventions"; -import OpenAI from "openai"; - -// For troubleshooting, set the log level to DiagLogLevel.DEBUG -diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO); - -// Get Agenta configuration from environment variables -const AGENTA_HOST = process.env.AGENTA_HOST || "https://cloud.agenta.ai"; -const AGENTA_API_KEY = process.env.AGENTA_API_KEY; - -if (!AGENTA_API_KEY) { - console.error("❌ AGENTA_API_KEY environment variable is required"); - process.exit(1); -} - -// Configure the OTLP exporter to send traces to Agenta -const otlpExporter = new OTLPTraceExporter({ - url: `${AGENTA_HOST}/api/otlp/v1/traces`, - headers: { - Authorization: `ApiKey ${AGENTA_API_KEY}`, - }, - timeoutMillis: 5000, // 5 second timeout -}); - -// Add logging to the exporter for debugging -const originalExport = otlpExporter.export.bind(otlpExporter); -otlpExporter.export = function (spans, resultCallback) { - console.log(`📤 Exporting ${spans.length} span(s)...`); - originalExport(spans, (result) => { - if (result.code === 0) { - console.log('✅ Spans exported successfully'); - } else { - console.error('❌ Export failed:', result.error); - } - resultCallback(result); - }); -}; - -// Create and configure the tracer provider -const tracerProvider = new NodeTracerProvider({ - resource: new Resource({ - [ATTR_SERVICE_NAME]: "openai-quickstart", - // Project name in Agenta, defaults to "default" - [SEMRESATTRS_PROJECT_NAME]: "openai-quickstart", - }), -}); - -// Use SimpleSpanProcessor for immediate export (better for short-lived scripts) -// For long-running services, use: new BatchSpanProcessor(otlpExporter) -tracerProvider.addSpanProcessor(new SimpleSpanProcessor(otlpExporter)); - -// Register the tracer provider -tracerProvider.register(); - -// Register OpenAI instrumentation with manual instrumentation -// This is required for OpenInference to properly instrument the OpenAI client -const instrumentation = new OpenAIInstrumentation(); -instrumentation.manuallyInstrument(OpenAI); - -registerInstrumentations({ - instrumentations: [instrumentation], -}); - -console.log("✅ OpenTelemetry instrumentation initialized"); - diff --git a/examples/node/observability-opentelemetry/package-lock.json b/examples/node/observability-opentelemetry/package-lock.json deleted file mode 100644 index c9c0ef0ae5..0000000000 --- a/examples/node/observability-opentelemetry/package-lock.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "name": "agenta-opentelemetry-quickstart", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "agenta-opentelemetry-quickstart", - "version": "1.0.0", - "dependencies": { - "@arizeai/openinference-instrumentation-openai": "^3.2.3", - "@arizeai/openinference-semantic-conventions": "^2.1.2", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/exporter-trace-otlp-proto": "^0.54.0", - "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/resources": "^1.28.0", - "@opentelemetry/sdk-trace-base": "^1.28.0", - "@opentelemetry/sdk-trace-node": "^1.28.0", - "@opentelemetry/semantic-conventions": "^1.28.0", - "openai": "^6.7.0" - }, - "devDependencies": { - "@types/node": "^22.0.0", - "typescript": "^5.7.0" - } - }, - "node_modules/@arizeai/openinference-core": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@arizeai/openinference-core/-/openinference-core-1.0.7.tgz", - "integrity": "sha512-O9WYkrHNh/0mGTV+T9SWC3tkxVrT16gBrFiByG3aukBsqdOfSzoRj6QINk+Oi+VEDNIoQUzVQPFh81/gEL/thA==", - "license": "Apache-2.0", - "dependencies": { - "@arizeai/openinference-semantic-conventions": "2.1.2", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/core": "^1.25.1" - } - }, - "node_modules/@arizeai/openinference-instrumentation-openai": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@arizeai/openinference-instrumentation-openai/-/openinference-instrumentation-openai-3.2.3.tgz", - "integrity": "sha512-4GiUyUIafNkAf7milnsS4Xjh0rZwjPvhHu+xkcj2MQ19a0Teu6PcFDa7DCt7YV/xw2o+wcxeaLfVURmGGLAHOg==", - "license": "Apache-2.0", - "dependencies": { - "@arizeai/openinference-core": "1.0.7", - "@arizeai/openinference-semantic-conventions": "2.1.2", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/core": "^1.25.1", - "@opentelemetry/instrumentation": "^0.46.0" - } - }, - "node_modules/@arizeai/openinference-instrumentation-openai/node_modules/@opentelemetry/instrumentation": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz", - "integrity": "sha512-a9TijXZZbk0vI5TGLZl+0kxyFfrXHhX6Svtz7Pp2/VBlCSKrazuULEyoJQrOknJyFWNMEmbbJgOciHCCpQcisw==", - "license": "Apache-2.0", - "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.7.1", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.2", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@arizeai/openinference-instrumentation-openai/node_modules/import-in-the-middle": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz", - "integrity": "sha512-1LrZPDtW+atAxH42S6288qyDFNQ2YCty+2mxEPRtfazH6Z5QwkaBSTS2ods7hnVJioF6rkRfNoA6A/MstpFXLg==", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.8.2", - "acorn-import-assertions": "^1.9.0", - "cjs-module-lexer": "^1.2.2", - "module-details-from-path": "^1.0.3" - } - }, - "node_modules/@arizeai/openinference-semantic-conventions": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@arizeai/openinference-semantic-conventions/-/openinference-semantic-conventions-2.1.2.tgz", - "integrity": "sha512-u7UeuU9bJ1LxzHk0MPWb+1ZcotCcJwPnKDXi7Rl2cPs1pWMFg9Ogq7zzYZX+sDcibD2AEa1U+ElyOD8DwZc9gw==", - "license": "Apache-2.0" - }, - "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "license": "Apache-2.0", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.54.2.tgz", - "integrity": "sha512-4MTVwwmLgUh5QrJnZpYo6YRO5IBLAggf2h8gWDblwRagDStY13aEvt7gGk3jewrMaPlHiF83fENhIx0HO97/cQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.30.1.tgz", - "integrity": "sha512-s5vvxXPVdjqS3kTLKMeBMvop9hbWkwzBpu+mUO2M7sZtlkyDJGwFe33wRKnbaYDo8ExRVBIIdwIGrqpxHuKttA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/core": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.27.0.tgz", - "integrity": "sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/core/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.54.2.tgz", - "integrity": "sha512-XSmm1N2wAhoWDXP1q/N6kpLebWaxl6VIADv4WA5QWKHLRpF3gLz5NAWNJBR8ygsvv8jQcrwnXgwfnJ18H3v1fg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/otlp-exporter-base": "0.54.2", - "@opentelemetry/otlp-transformer": "0.54.2", - "@opentelemetry/resources": "1.27.0", - "@opentelemetry/sdk-trace-base": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.27.0.tgz", - "integrity": "sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.27.0.tgz", - "integrity": "sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/resources": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.54.2.tgz", - "integrity": "sha512-go6zpOVoZVztT9r1aPd79Fr3OWiD4N24bCPJsIKkBses8oyFo12F/Ew3UBTdIu6hsW4HC4MVEJygG6TEyJI/lg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.54.2", - "@types/shimmer": "^1.2.0", - "import-in-the-middle": "^1.8.1", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.2", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.54.2.tgz", - "integrity": "sha512-NrNyxu6R/bGAwanhz1HI0aJWKR6xUED4TjCH4iWMlAfyRukGbI9Kt/Akd2sYLwRKNhfS+sKetKGCUQPMDyYYMA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/otlp-transformer": "0.54.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.54.2.tgz", - "integrity": "sha512-2tIjahJlMRRUz0A2SeE+qBkeBXBFkSjR0wqJ08kuOqaL8HNGan5iZf+A8cfrfmZzPUuMKCyY9I+okzFuFs6gKQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.54.2", - "@opentelemetry/core": "1.27.0", - "@opentelemetry/resources": "1.27.0", - "@opentelemetry/sdk-logs": "0.54.2", - "@opentelemetry/sdk-metrics": "1.27.0", - "@opentelemetry/sdk-trace-base": "1.27.0", - "protobufjs": "^7.3.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.27.0.tgz", - "integrity": "sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.27.0.tgz", - "integrity": "sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/resources": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/propagator-b3": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.30.1.tgz", - "integrity": "sha512-oATwWWDIJzybAZ4pO76ATN5N6FFbOA1otibAVlS8v90B4S1wClnhRUk7K+2CHAwN1JKYuj4jh/lpCEG5BAqFuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.30.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz", - "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", - "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.30.1.tgz", - "integrity": "sha512-Pj/BfnYEKIOImirH76M4hDaBSx6HyZ2CXUqk+Kj02m6BB80c/yo4BdWkn/1gDFfU+YPY+bPR2U0DKBfdxCKwmg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.30.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz", - "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", - "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.30.1.tgz", - "integrity": "sha512-5UxZqiAgLYGFjS4s9qm5mBVo433u+dSPUFWVWXmLAD4wB65oMCoXaJP1KJa9DIYYMeHu3z4BZcStG3LC593cWA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.30.1", - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz", - "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", - "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sdk-logs": { - "version": "0.54.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.54.2.tgz", - "integrity": "sha512-yIbYqDLS/AtBbPjCjh6eSToGNRMqW2VR8RrKEy+G+J7dFG7pKoptTH5T+XlKPleP9NY8JZYIpgJBlI+Osi0rFw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.54.2", - "@opentelemetry/core": "1.27.0", - "@opentelemetry/resources": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.27.0.tgz", - "integrity": "sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sdk-metrics": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.27.0.tgz", - "integrity": "sha512-JzWgzlutoXCydhHWIbLg+r76m+m3ncqvkCcsswXAQ4gqKS+LOHKhq+t6fx1zNytvLuaOUBur7EvWxECc4jPQKg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/resources": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.27.0.tgz", - "integrity": "sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.27.0", - "@opentelemetry/semantic-conventions": "1.27.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.30.1.tgz", - "integrity": "sha512-jVPgBbH1gCy2Lb7X0AVQ8XAfgg0pJ4nvl8/IiQA6nxOsPvS+0zMJaFSs2ltXe0J6C8dqjcnpyqINDJmU30+uOg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.30.1", - "@opentelemetry/resources": "1.30.1", - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz", - "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", - "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sdk-trace-node": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.30.1.tgz", - "integrity": "sha512-cBjYOINt1JxXdpw1e5MlHmFRc5fgj4GW/86vsKFxJCJ8AL4PdVtYH41gWwl4qd4uQjqEL1oJVrXkSy5cnduAnQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/context-async-hooks": "1.30.1", - "@opentelemetry/core": "1.30.1", - "@opentelemetry/propagator-b3": "1.30.1", - "@opentelemetry/propagator-jaeger": "1.30.1", - "@opentelemetry/sdk-trace-base": "1.30.1", - "semver": "^7.5.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz", - "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", - "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.37.0.tgz", - "integrity": "sha512-JD6DerIKdJGmRp4jQyX5FlrQjA4tjOw1cvfsPAZXfOOEErMUHjPcPSICS+6WnM0nB0efSFARh0KAZss+bvExOA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" - }, - "node_modules/@types/node": { - "version": "22.18.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.12.tgz", - "integrity": "sha512-BICHQ67iqxQGFSzfCFTT7MRQ5XcBjG5aeKh5Ok38UBbPe5fxTyE+aHFxwVrGyr8GNlqFMLKD1D3P2K/1ks8tog==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/shimmer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz", - "integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==", - "license": "MIT" - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "deprecated": "package has been renamed to acorn-import-attributes", - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/import-in-the-middle": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.15.0.tgz", - "integrity": "sha512-bpQy+CrsRmYmoPMAE/0G33iwRqwW4ouqdRg8jgbH3aKuCtOc8lxgmYXg2dMM92CRiGP660EtBcymH/eVUpCSaA==", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.14.0", - "acorn-import-attributes": "^1.9.5", - "cjs-module-lexer": "^1.2.2", - "module-details-from-path": "^1.0.3" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/module-details-from-path": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", - "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/openai": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/openai/-/openai-6.7.0.tgz", - "integrity": "sha512-mgSQXa3O/UXTbA8qFzoa7aydbXBJR5dbLQXCRapAOtoNT+v69sLdKMZzgiakpqhclRnhPggPAXoniVGn2kMY2A==", - "license": "Apache-2.0", - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "ws": "^8.18.0", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "ws": { - "optional": true - }, - "zod": { - "optional": true - } - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "license": "MIT" - }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/require-in-the-middle": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.5.2.tgz", - "integrity": "sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "module-details-from-path": "^1.0.3", - "resolve": "^1.22.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==", - "license": "BSD-2-Clause" - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - } - } -} diff --git a/examples/node/observability-opentelemetry/package.json b/examples/node/observability-opentelemetry/package.json deleted file mode 100644 index bc74d98dae..0000000000 --- a/examples/node/observability-opentelemetry/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "agenta-opentelemetry-quickstart", - "version": "1.0.0", - "description": "Quick start example for using OpenTelemetry with Agenta", - "type": "module", - "scripts": { - "start": "node --import ./instrumentation.js app.js" - }, - "dependencies": { - "@arizeai/openinference-instrumentation-openai": "^3.2.3", - "@arizeai/openinference-semantic-conventions": "^2.1.2", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/exporter-trace-otlp-proto": "^0.54.0", - "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/resources": "^1.28.0", - "@opentelemetry/sdk-trace-base": "^1.28.0", - "@opentelemetry/sdk-trace-node": "^1.28.0", - "@opentelemetry/semantic-conventions": "^1.28.0", - "openai": "^6.7.0" - }, - "devDependencies": { - "@types/node": "^22.0.0", - "typescript": "^5.7.0" - } -} diff --git a/examples/node/observability-opentelemetry/test.sh b/examples/node/observability-opentelemetry/test.sh deleted file mode 100755 index 56fb36d592..0000000000 --- a/examples/node/observability-opentelemetry/test.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Test script for OpenTelemetry example - -# Check if required environment variables are set -if [ -z "$AGENTA_API_KEY" ]; then - echo "❌ Error: AGENTA_API_KEY is not set" - echo " Set it with: export AGENTA_API_KEY='your_key_here'" - exit 1 -fi - -if [ -z "$OPENAI_API_KEY" ]; then - echo "❌ Error: OPENAI_API_KEY is not set" - echo " Set it with: export OPENAI_API_KEY='your_key_here'" - exit 1 -fi - -# Set default AGENTA_HOST if not provided -if [ -z "$AGENTA_HOST" ]; then - export AGENTA_HOST="https://cloud.staging.agenta.ai" - echo "ℹ️ Using default AGENTA_HOST: $AGENTA_HOST" -fi - -echo "✅ Environment variables configured" -echo "" -echo "🚀 Running example..." -echo "" - -npm start - diff --git a/examples/python/custom_workflows/ai-code-reviewer/ai-code-reviewer.py b/examples/python/custom_workflows/ai-code-reviewer/ai-code-reviewer.py index 2703c420d2..4ab89887a1 100644 --- a/examples/python/custom_workflows/ai-code-reviewer/ai-code-reviewer.py +++ b/examples/python/custom_workflows/ai-code-reviewer/ai-code-reviewer.py @@ -89,4 +89,6 @@ def generate_critique(pr_url: str): if __name__ == "__main__": import uvicorn - uvicorn.run("agenta:app", host="0.0.0.0", port=8000, reload=True) + uvicorn.run( + "agenta.sdk.decorators.routing:app", host="0.0.0.0", port=8000, reload=True + ) diff --git a/examples/python/custom_workflows/chain_of_prompts/cop.py b/examples/python/custom_workflows/chain_of_prompts/cop.py index 1af034895d..163daf542a 100644 --- a/examples/python/custom_workflows/chain_of_prompts/cop.py +++ b/examples/python/custom_workflows/chain_of_prompts/cop.py @@ -38,4 +38,6 @@ def generate(blog_post: str): if __name__ == "__main__": import uvicorn - uvicorn.run("agenta:app", host="0.0.0.0", port=8000, reload=True) + uvicorn.run( + "agenta.sdk.decorators.routing:app", host="0.0.0.0", port=8000, reload=True + ) diff --git a/examples/python/custom_workflows/rag-docs-qa/README.md b/examples/python/custom_workflows/rag-docs-qa/README.md index e02e4dd77c..fe844b9bd3 100644 --- a/examples/python/custom_workflows/rag-docs-qa/README.md +++ b/examples/python/custom_workflows/rag-docs-qa/README.md @@ -61,4 +61,4 @@ python query.py ## Notes: -- `generate_testset.py` is used to generate a testset of questions based on the documentation for evaluation. +- `generate_test_set.py` is used to generate a test set of questions based on the documentation for evaluation. diff --git a/examples/python/custom_workflows/rag-docs-qa/generate_test_set.py b/examples/python/custom_workflows/rag-docs-qa/generate_test_set.py new file mode 100644 index 0000000000..3210a8c244 --- /dev/null +++ b/examples/python/custom_workflows/rag-docs-qa/generate_test_set.py @@ -0,0 +1,99 @@ +import os +import glob +from pathlib import Path +import pandas as pd +from dotenv import load_dotenv +from litellm import completion +import frontmatter +import tqdm +import json + +# Load environment variables +load_dotenv() + + +def get_files(docs_path): + """Get all markdown files recursively.""" + return + + +def extract_content(file_path): + """Extract content from markdown file.""" + with open(file_path, "r", encoding="utf-8") as f: + post = frontmatter.load(f) + # Get title from frontmatter or filename + title = post.get("title", Path(file_path).stem) + # Get content without frontmatter + content = post.content + return title, content + + +def generate_questions(title, content): + """Generate questions using OpenAI.""" + system_prompt = """You are a helpful assistant that generates questions based on documentation content. + Generate 5 questions that could be answered using the provided documentation. + Your response must be a JSON object with a single key "questions" containing an array of strings.""" + + user_prompt = f""" + Title: {title} + + Content: {content} # Limit content length to avoid token limits + + Generate 5 questions about this documentation. Put yourself in the shoes of a user attempting to 1) figure how to use the product for a use case 2) troubleshoot an issue 3) learn about the features of the product. + The user in this case is a technical user (AI engineer) who is trying to build an llm application. + The user would write the questions they would ask in a chat with a human. Therefore, not all questions will be clear and well written. + """ + + try: + response = completion( + model="gpt-3.5-turbo-0125", # Using the latest model that supports JSON mode + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt}, + ], + response_format={"type": "json_object"}, + ) + + # Check if the response was complete + if response.choices[0].finish_reason == "length": + print(f"Warning: Response was truncated for {title}") + return [] + + # Parse JSON response - no need for eval() + result = json.loads(response.choices[0].message.content) + return result["questions"] + + except Exception as e: + print(f"Error generating questions for {title}: {str(e)}") + return [] + + +def main(): + docs_path = os.getenv("DOCS_PATH") + if not docs_path: + raise ValueError("DOCS_PATH environment variable not set") + + # Get all files + files = glob.glob(os.path.join(docs_path, "**/*.mdx"), recursive=True) + all_questions = [] + # Process each file + for file_path in tqdm.tqdm(files, desc="Processing documentation files"): + if "/reference/api" in file_path: + # skip api docs + continue + try: + title, content = extract_content(file_path) + questions = generate_questions(title, content) + all_questions.extend(questions) + except Exception as e: + print(f"Error processing {file_path}: {str(e)}") + continue + + # Save to CSV + df = pd.DataFrame({"query": all_questions}) + df.to_csv("test_set.csv", index=False, lineterminator="\n") + print(f"Generated {len(all_questions)} questions and saved to test_set.csv") + + +if __name__ == "__main__": + main() diff --git a/examples/python/custom_workflows/rag-docs-qa/generate_testset.py b/examples/python/custom_workflows/rag-docs-qa/generate_testset.py deleted file mode 100644 index 0eb362fd6d..0000000000 --- a/examples/python/custom_workflows/rag-docs-qa/generate_testset.py +++ /dev/null @@ -1,99 +0,0 @@ -import os -import glob -from pathlib import Path -import pandas as pd -from dotenv import load_dotenv -from litellm import completion -import frontmatter -import tqdm -import json - -# Load environment variables -load_dotenv() - - -def get_files(docs_path): - """Get all markdown files recursively.""" - return - - -def extract_content(file_path): - """Extract content from markdown file.""" - with open(file_path, "r", encoding="utf-8") as f: - post = frontmatter.load(f) - # Get title from frontmatter or filename - title = post.get("title", Path(file_path).stem) - # Get content without frontmatter - content = post.content - return title, content - - -def generate_questions(title, content): - """Generate questions using OpenAI.""" - system_prompt = """You are a helpful assistant that generates questions based on documentation content. - Generate 5 questions that could be answered using the provided documentation. - Your response must be a JSON object with a single key "questions" containing an array of strings.""" - - user_prompt = f""" - Title: {title} - - Content: {content} # Limit content length to avoid token limits - - Generate 5 questions about this documentation. Put yourself in the shoes of a user attempting to 1) figure how to use the product for a use case 2) troubleshoot an issue 3) learn about the features of the product. - The user in this case is a technical user (AI engineer) who is trying to build an llm application. - The user would write the questions they would ask in a chat with a human. Therefore, not all questions will be clear and well written. - """ - - try: - response = completion( - model="gpt-3.5-turbo-0125", # Using the latest model that supports JSON mode - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_prompt}, - ], - response_format={"type": "json_object"}, - ) - - # Check if the response was complete - if response.choices[0].finish_reason == "length": - print(f"Warning: Response was truncated for {title}") - return [] - - # Parse JSON response - no need for eval() - result = json.loads(response.choices[0].message.content) - return result["questions"] - - except Exception as e: - print(f"Error generating questions for {title}: {str(e)}") - return [] - - -def main(): - docs_path = os.getenv("DOCS_PATH") - if not docs_path: - raise ValueError("DOCS_PATH environment variable not set") - - # Get all files - files = glob.glob(os.path.join(docs_path, "**/*.mdx"), recursive=True) - all_questions = [] - # Process each file - for file_path in tqdm.tqdm(files, desc="Processing documentation files"): - if "/reference/api" in file_path: - # skip api docs - continue - try: - title, content = extract_content(file_path) - questions = generate_questions(title, content) - all_questions.extend(questions) - except Exception as e: - print(f"Error processing {file_path}: {str(e)}") - continue - - # Save to CSV - df = pd.DataFrame({"query": all_questions}) - df.to_csv("testset.csv", index=False, lineterminator="\n") - print(f"Generated {len(all_questions)} questions and saved to testset.csv") - - -if __name__ == "__main__": - main() diff --git a/examples/python/custom_workflows/rag-docs-qa/query.py b/examples/python/custom_workflows/rag-docs-qa/query.py index 2bee1789e3..f5d494bac7 100644 --- a/examples/python/custom_workflows/rag-docs-qa/query.py +++ b/examples/python/custom_workflows/rag-docs-qa/query.py @@ -164,4 +164,6 @@ def generate(query: str): if __name__ == "__main__": import uvicorn - uvicorn.run("agenta:app", host="0.0.0.0", port=8000, reload=True) + uvicorn.run( + "agenta.sdk.decorators.routing:app", host="0.0.0.0", port=8000, reload=True + ) diff --git a/examples/python/custom_workflows/rag-docs-qa/test_set.csv b/examples/python/custom_workflows/rag-docs-qa/test_set.csv new file mode 100644 index 0000000000..9c7d6028b4 --- /dev/null +++ b/examples/python/custom_workflows/rag-docs-qa/test_set.csv @@ -0,0 +1,311 @@ +query,correct_answer +How can I deploy Agenta locally in production mode?, +What command should I run to update Agenta to the latest version?, +How do I start Agenta in development mode?, +What steps should I take to troubleshoot if I encounter a port conflict issue?, +Where can I seek help or report issues related to Agenta?, +How can I deploy Agenta on Kubernetes for my AI model hosting use case?, +"I'm having trouble accessing the Kubernetes deployment feature in Agenta Enterprise, how can I troubleshoot this?", +Can Agenta Enterprise on Kubernetes support scaling my AI models automatically based on demand?, +What tools are provided by Agenta Enterprise to manage multiple users and teams?, +Can you provide more details about Agenta Enterprise's early access stage for select partners?, +How can I deploy Agenta on AWS EC2 using Terraform?, +What are the open ports created by the Terraform module for Agenta on AWS EC2?, +How do I serve a variant to an instance after hosting Agenta?, +What steps are involved in SSH-ing into the instance where Agenta is hosted?, +How can I delete all the resources created by Terraform for Agenta on AWS?, +How can I deploy Agenta on Google Cloud Engine using Terraform?, +What are the prerequisites for deploying Agenta on Google Cloud Engine?, +How do I SSH into the instance after deploying Agenta on Google Cloud Engine?, +What security considerations should I keep in mind when allowing SSH access to the instance?, +How can I delete all the resources created by Terraform for Agenta on Google Cloud Engine?, +How can I host Agenta on a remote server like an AWS EC2 instance?, +What are the prerequisites for deploying Agenta on a remote server?, +How do I obtain the public IP of my AWS EC2 instance?, +What environment variables do I need to set before launching the Agenta server?, +"After starting the Agenta server, how can I verify that it is running correctly on the remote server?", +How can I apply schema migrations to my PostgreSQL database using the provided instructions?, +What command should I run to ensure that Alembic looks for the configuration file and other necessary files in the specified directory before executing?, +"If I need to revert a schema migration due to encountered issues, how can I do that according to the documentation?", +"Is there a way to automate the application of migrations without manually running the upgrade command? If so, how can I achieve this?", +"After completing the migration, what should I do to verify data integrity in PostgreSQL and ensure that everything works fine?", +How can I back up my MongoDB database before running the migration script?, +What Docker command should I use to start the local instance of Agenta for migration?, +"After initiating the migration, how can I access the running docker containers?", +How can I verify the data integrity in PostgreSQL post migration?, +"In case I encounter issues during migration, how can I revert the migration and what should I do next?", +How can I upgrade to the latest version of Agenta using Docker?, +What database does Agenta now use starting from version 0.19?, +How can I access the backend Docker container for Agenta?, +What is Beanie and how does it relate to MongoDB ODM for Python?, +What are the steps involved in performing a database migration using Beanie with Agenta backend system?, +Where can I find answers to common questions about Agenta?, +How can I get community support for Agenta? Is there a Slack community?, +What is the recommended channel for reporting bugs in Agenta?, +"As a Pro plan cloud user, how can I access direct team support?", +"If I'm interested in demos or have sales inquiries, how can I schedule a call with the founders?", +How can I add new users to my workspace?, +What are the different user roles available and what are their respective rights?, +"As a Workspace Admin, what are the limitations in terms of managing the workspace?", +What is the role of a Deployment Manager and what tasks do they handle within the workspace?, +How can I switch between different workspaces if I am a member of multiple workspaces?, +How do I format backend and CLI code using Black in specific directories?, +"What are the main steps to contribute to Agenta, especially when picking an issue?", +Can you guide me through running backend tests locally before making a pull request?, +How can I update the .env.local file in the frontend directory to include my OpenAI API Key?, +What are the rules regarding issue assignment and PR activity to prevent zombie issues in the Agenta project?, +How can I use my own version of Agenta CLI or SDK instead of the installed one?, +What steps can I take if I'm unable to run Agenta in my terminal even after following the provided instructions?, +How can I quickly work and test a new type of parameter like IntParam in the SDK?, +Are there any specific steps needed for working on the backend code in Agenta?, +How can I efficiently debug the backend code in Agenta using Docker or Visual Studio Code?, +How can I report a bug using the bug report template?, +Where can I find the network logs in the browser and why are they important when reporting an issue?, +What command should I run to get information about Docker containers and how can I provide this information when filing an issue?, +"When reporting an issue related to a specific llm app, what are the steps to provide container information using Docker Desktop or the terminal?", +Why is providing network logs and Docker container information crucial when filing an issue?, +How can I start monitoring and understanding the behavior of my LLM application with Agenta?, +What are the advantages of using OpenTelemetry (OTel) with Agenta's observability features?, +What is the relationship between traces and spans in the context of Agenta?, +Where can I find a Quick Start guide to get started with observability in Agenta?, +How can I learn to instrument specific applications like OpenAI or LangChain with Agenta?, +How can I enable tracing for OpenAI calls using Agenta SDK?, +What packages do I need to install to set up observability for an OpenAI application running locally?, +How can I configure environment variables for Agenta OSS running locally?, +Where can I find the captured traces of my application's requests in the Agenta UI?, +Is tracing enabled by default if I create an application through the Agenta UI?, +How can I install the Agenta SDK?, +What is the purpose of the @ag.instrument() decorator in Agenta SDK?, +How can I add additional metadata to a span in Agenta?, +"Can you explain how to link spans to applications, variants, and environments in Agenta?", +What options are available for redacting sensitive data in Agenta SDK?, +How do I install LiteLLM and Agenta SDK?, +What are the different environments I can configure while setting up LiteLLM with Agenta?, +How can I initialize Agenta SDK in my LiteLLM application?, +What does the @ag.instrument() decorator do in the code example provided?, +Why is it important to set up the callback handler for LiteLLM while using Agenta?, +How can I install the required packages for using LangChain with Agenta?, +What environment variables do I need to configure when using Agenta Cloud or Enterprise?, +What steps are involved in the code example provided for a LangChain application?, +How do I initialize Agenta in my LangChain application?, +Why is it important to call 'LangchainInstrumentor().instrument()' before running my LangChain application?, +How can I instrument OpenAI API calls with Agenta using `opentelemetry-instrumentation-openai` package?, +What packages do I need to install to instrument OpenAI API calls with Agenta using `opentelemetry-instrumentation-openai` package?, +How do I configure environment variables for Agenta Cloud or Enterprise when instrumenting OpenAI API calls?, +What decorator can I use to monitor multiple calls in a function or workflow as a single trace?, +How can I associate traces with specific parts of an Agenta project when instrumenting functions?, +How do I install the required packages for using Instructor with Agenta?, +What environment variables do I need to configure for Agenta Cloud or Enterprise setup?, +What must I ensure the order of when instrumenting OpenAI and creating the Instructor client?, +Why is it mentioned to instrument OpenAI before creating the Instructor client?, +"What does the @ag.instrument(spankind=""WORKFLOW"") decorator do in the code example?", +How can I experiment and compare prompts using Agenta?, +What types of workflows does Agenta support for prompt management and evaluation?, +How can I collaborate with product teams using Agenta for prompt engineering and evaluation?, +What are the different ways to deploy an application with Agenta?, +"Is Agenta compatible with various LLM app architectures and model providers? If so, how?", +How can I create a new LLM app using an existing template in Agenta?, +Where can I find the API endpoint after deploying my application in Agenta?, +What steps do I need to follow to test the application in the playground?, +How do I add my OpenAI API keys when self-hosting Agenta?, +What are some next steps after creating my first LLM application in Agenta?, +How can I create custom templates for my LLM-powered applications in Agenta?, +What are the predefined environments in Agenta and their purposes?, +"Explain the relationship between variants, versions, and commits in Agenta.", +Can you describe the difference between Completion Application Template and Chat Application Template in Agenta?, +What can I do if the deployment of a variant to an environment does not update automatically in Agenta?, +How does Agenta enable rapid experimentation and evaluation for LLM applications?, +What is the significance of Agenta treating each application as a microservice?, +How does Agenta handle the separation of application logic and configuration?, +What role does Agenta's backend play in managing applications and configurations?, +Can you explain the purpose and functionality of Agenta's SDK for a Python library?, +How can I collaborate with subject matter experts using custom workflows in Agenta?, +What is the main problem with traditional prompt playgrounds?, +Can I trust the outputs of traditional prompt playgrounds?, +How does Agenta's Custom Workflows simplify debugging for AI engineers?, +What frameworks and models are compatible with Agenta?, +How can I create a custom workflow with two prompts using Agenta?, +What are the steps to serve an application in Agenta using the CLI?, +How do I initialize the Agenta SDK in my Python code?, +What is the purpose of the `CoPConfig` class in the provided code snippet?, +Can you explain the concept of entry points in Agenta and how they are used in the code example?, +How can I configure evaluators for my LLM application?, +What tools are available for creating test sets for evaluation?, +Can I run evaluations directly from the web UI in Agenta?, +What types of evaluators are available for classification/entity extraction in LLM applications?, +How can I evaluate the faithfulness of outputs in RAG workflows?, +How can I create a test set for evaluation in agenta SDK?, +What is the purpose of creating evaluators in the agenta SDK?, +How can I run an evaluation job using the agenta SDK?, +What is the function of the rate limit configuration in evaluation jobs?, +How can I retrieve the detailed results of an evaluation using the agenta SDK?, +How can I initiate a single model evaluation in the Human Evaluation feature?, +What steps are involved in starting a new evaluation with the single model test?, +How do I compare the performance of two different variants manually using A/B Test in the Human Evaluation feature?, +Can collaborators be invited to collaborate on an A/B Test evaluation in the Human Evaluation feature?, +Is there a way to switch between card and table view in the evaluation process? How can this be done?, +How do I create a test set in Agenta using a CSV or JSON file?, +What is the default column name for the reference answer in a CSV test set?, +What is the structure of a valid JSON file for a test set in Agenta?, +How can I add data to a test set from the playground in Agenta?, +"In Agenta, how can I upload a test set using the API?", +How do I start a new evaluation in the UI?, +What parameters can be specified when setting up a new evaluation?, +What are the advanced configuration options available for adjusting batching and retry parameters?, +How can I analyze the results of an evaluation in more detail?, +"Can I compare multiple evaluations from the same test set in the UI? If yes, how?", +How can I configure evaluators for my LLM application?, +What are the inputs that evaluators typically take?, +Which button should I click to create a new evaluator?, +Can I create custom evaluators for my LLM application?, +What is the purpose of mappings evaluator's inputs to the LLM data?, +How can I create a webhook evaluator for a specific use case in Agenta?, +What are the limitations in terms of security measures when using webhook evaluators?, +What input parameters are required for a webhook evaluator in Agenta?, +What is the expected format of the webhook request body for a webhook evaluator?, +What should the webhook response body contain in order to be considered properly-formatted?, +How does the Exact Match evaluator determine if the model's output is correct?, +What does the Contains JSON evaluator check for in the model's output?, +How does the JSON Field Match evaluator compare specific fields within JSON data?, +Can you explain the process of JSON Diff Match evaluation?, +What configuration options are available for the JSON Diff Match evaluator and how do they affect the comparison process?, +How can I assess the performance of LLMs by identifying specific patterns within the output generated by the model?, +What is the purpose of the 'Regex Test' evaluator in Agenta and how does it work?, +Could you provide an example of using the 'Starts With' evaluator in Agenta and its significance?, +How does the 'Contains Any' evaluator in Agenta differ from the 'Contains All' evaluator?, +In what situations would I use the 'Ends With' evaluator in Agenta and how does it handle case sensitivity?, +How can I create a custom evaluator in Agenta?, +What is the function signature for the 'evaluate' function in a custom evaluator?, +What is the purpose of the 'evaluate' function in a custom evaluator?, +Which language is used for writing custom evaluators in Agenta?, +What ranges of scores can the 'evaluate' function return?, +How can I configure and use RAG evaluators in my custom-built application?, +What version of the Python SDK is required to access internal variables and intermediate outputs for RAG Evaluators?, +Where can I find the source code for a simple RAG Application that fetches movies and generates summaries?, +How can I troubleshoot if the RAG Evaluator and `view trace` are not accessible in Agenta OSS?, +Which utility can I use in Agenta to add internal variables (internals) to stages of a workflow?, +How does the Similarity Match evaluator determine a match between the generated output and the correct answer?, +What configuration parameter is needed for the Semantic Similarity Match evaluator?, +What is the cost associated with using the Semantic Similarity Match evaluator that uses OpenAI embeddings?, +In what use cases is the Levenshtein Distance evaluator particularly useful?, +Can you explain how the Levenshtein Distance evaluator works for comparing text outputs?, +How can I configure the prompt for LLM-as-a-Judge evaluation?, +"What variables can be used to reference inputs, outputs, and reference answers in the prompt?", +What is the default prompt used for the country expert demo application?, +"Which models are supported by LLM-as-a-Judge, and how can I select a specific model?", +Where do I need to set my OpenAI or Anthropic API key to use LLM-as-a-Judge?, +How can I create a test set using the SDK?, +What is the process for creating and configuring an evaluator programmatically?, +How can I check the status of an evaluation run?, +Where can I find the list of evaluator keys and configurations?, +What should I do if I encounter rate limits during the evaluation process?, +How can I create a new prompt using the Agenta SDK?, +How do I deploy changes to the production environment using the SDK?, +"What is the structure used by Agenta for prompt versioning, and how does it differ from traditional versioning systems?", +"In case of an issue with deploying changes using the SDK, what steps can I take to troubleshoot?", +Can you explain the concept of variants in Agenta and how they are similar to branches in Git?, +How can I set up tracing for a RAG application in LangChain using Agenta?, +What is the purpose of tracing in LLM applications?, +"How do I install the necessary dependencies for LangChain, Agenta, and instrumentation?", +Can you provide an example of a Q&A RAG application in LangChain and how it works?, +How can I retrieve and generate answers using relevant snippets of documentation in Agenta?, +How can I fetch the diff for a GitHub pull request using Python?, +What role does LiteLLM play in the AI assistant workflow described in the tutorial?, +How can I add observability to my LLM application using Agenta?, +What is the purpose of creating an LLM playground for the application?, +How can I deploy my AI assistant to production using Agenta?, +How can I version prompts in Agenta?, +What capabilities does Agenta provide for prompt management?, +Why do I need a prompt management system?, +What is the purpose of configuration management in Agenta?, +How can I publish a prompt to an endpoint from the web UI?, +How can I create a prompt using the web UI?, +Why do I need to publish a variant to a deployment?, +How can I integrate the prompt configuration with my Python code using the Agenta SDK?, +"Can I revert to a previous deployment version, and if so, how?", +What is the purpose of using Pydantic for schema validation in the SDK integration process?, +How can I create reusable prompts using prompt templates in the agenta playground?, +Where can I find the option to add new inputs to the LLM app in the playground?, +"What is the process for creating a new variant of an application in agenta, and where can I provide a new name for the variant?", +"How can I test a variant dynamically in the playground, and is there a way to run all inputs in a test set?", +"In the agenta playground, how do I compare variants side by side? Can I interact with different variants simultaneously in a chat application?", +How can I create a new prompt using the SDK?, +What is the structure followed by Agenta for prompt versioning?, +How can I delete a variant in Agenta? Is this action reversible?, +Can I list all variants of an application using the SDK? How can I do that?, +What is the default behavior for fetching configurations in Agenta?, +How can I use the Agenta SDK to invoke the deployed version of my prompt?, +Where can I find the call to invoke the deployed version of my prompt within the Agenta UI?, +What parameters do I need to provide when invoking a deployed prompt through the REST API?, +What does the 'inputs' dictionary in the parameters contain and how should it be structured?, +How can I control which environment version of my prompt is being called when using the REST API?, +How do I fetch the deployed version of my prompt in my code using the Agenta SDK?, +What Python SDK do I need to install for using the Agenta SDK?, +What environment variables need to be set up for fetching prompts?, +"In the sample output, what is the value of 'model' fetched from staging configuration?", +Which slugs should I provide when fetching prompts using Agenta SDK?, +How can Agenta help me manage prompts in my application?, +What are the advantages of using Agenta as a prompt management system?, +What considerations should I keep in mind when integrating observability manually with Agenta?, +When should I consider using Agenta as a middleware/model proxy?, +Does using Agenta as a proxy add any latency to the response?, +How can I install the agenta CLI tool?, +What is the command to install agenta using pip?, +Where can I find a quick usage guide for the agenta CLI?, +How do I get an overview of the main commands and capabilities of agenta CLI?, +Is there a tutorial available for deploying an LLM app from code using agenta CLI?, +How can I initialize a new Agenta project using the CLI?, +"What options can be provided with the 'agenta init' command, and how do they affect the project initialization process?", +"For the 'agenta variant list' command, where should it be executed, and what information does it provide?", +What are the steps involved in removing a variant from an application using the 'agenta variant remove' command?, +"How can I deploy an application variant to the Agenta platform using the 'agenta variant serve' command, and what additional options are available for deployment?", +How can I create a new variant with initial configuration parameters?, +What method should I use to commit changes to an existing variant?, +Which method is used to deploy a variant to a specific environment?, +How can I retrieve the version history of a variant?, +What are the available predefined environments for deployment?, +How can I store additional data within the current span in a trace?, +What utility function can I use to validate if a string is a valid attribute key?, +How can I link spans to specific Agenta resources using the SDK?, +What method should I use to set the status of a span in the CustomSpan class?, +When should I apply the @ag.instrument() decorator in my Python code?, +How can I expose specific stages of LLM workflows as API endpoints using the Custom Workflows SDK?, +What types of fields are accepted in the configuration schema when defining a configuration for a function?, +How can I define fields with constraints and defaults in the configuration schema when using `@ag.route` or `@ag.entrypoint` decorators?, +"How are different field types represented in the Agenta playground UI, and what are the input methods for each type?", +How can I retrieve configuration information from the route context using `ag.ConfigManager.get_from_route()` and how is this configuration used in a function?, +How do I experiment with AI applications using the agenta SDK?, +What is the purpose of the deprecated SDK v2 mentioned on the page?, +How can I initialize my variant using the agenta SDK?, +What function should I use to set the default configuration in the agenta SDK?, +Can the agenta SDK be used with any Foundational Model?, +How can I display a text area widget in the playground using the SDK v2?, +What is the difference between IntParam and FloatParam in terms of the widgets they display in the playground?, +Can you provide an example of how to use BinaryParam in the SDK v2 configuration?, +What is the purpose of the GroupedMultipleChoiceParam in the configuration settings?, +What is the important note mentioned regarding the initialization of BinaryParam in the SDK v2?, +How do I access the parameters in the configuration in my code?, +What is the purpose of the 'config' object in the SDK v2?, +Can I experiment with different parameters using the 'config' object?, +What is the significance of calling 'agenta.init()' before using the 'config' object?, +What are some examples of parameters that can be saved in the 'config' object for an LLM variant?, +Why is it recommended to call `agenta.init()` only once at the entry point of the code?, +What happens if `agenta.init()` is called multiple times in the code?, +How does calling `agenta.init()` help in initializing the variant?, +Is there a different method to initialize the variant in the deprecated SDK v2?, +What could be the potential impact of using the deprecated SDK v2 for building an llm application?, +How can I set the default configuration for my variant using the register_default method?, +What happens if I set the default prompt value to 'Hello World' in my configuration?, +When should I use the register_default method in my llm application development?, +What parameters can I set using the register_default method for my llm application?, +How can I access the prompt1 parameter value from the configuration in the backend?, +How do I push configuration using agenta.config.push()?, +What happens if I set overwrite to True when pushing a configuration?, +How can I avoid overwriting an existing configuration when using agenta.config.push()?, +Where does the pushed configuration get stored for a specific code base?, +Can I push configurations for multiple variants using agenta.config.push()?, +How can I pull a configuration with a specific name?, +What happens when I pull a configuration using the 'production' environment?, +How can I access the parameters after pulling the configuration?, +Can I pull configurations for different variants using this function?, +Why does the documentation mention that this page is for the deprecated SDK v2?, \ No newline at end of file diff --git a/examples/python/custom_workflows/rag-docs-qa/testset_small.csv b/examples/python/custom_workflows/rag-docs-qa/test_set_small.csv similarity index 100% rename from examples/python/custom_workflows/rag-docs-qa/testset_small.csv rename to examples/python/custom_workflows/rag-docs-qa/test_set_small.csv diff --git a/examples/python/custom_workflows/rag-docs-qa/testset.csv b/examples/python/custom_workflows/rag-docs-qa/testset.csv deleted file mode 100644 index e10dd18aac..0000000000 --- a/examples/python/custom_workflows/rag-docs-qa/testset.csv +++ /dev/null @@ -1,311 +0,0 @@ -query,correct_answer -How can I deploy Agenta locally in production mode?, -What command should I run to update Agenta to the latest version?, -How do I start Agenta in development mode?, -What steps should I take to troubleshoot if I encounter a port conflict issue?, -Where can I seek help or report issues related to Agenta?, -How can I deploy Agenta on Kubernetes for my AI model hosting use case?, -"I'm having trouble accessing the Kubernetes deployment feature in Agenta Enterprise, how can I troubleshoot this?", -Can Agenta Enterprise on Kubernetes support scaling my AI models automatically based on demand?, -What tools are provided by Agenta Enterprise to manage multiple users and teams?, -Can you provide more details about Agenta Enterprise's early access stage for select partners?, -How can I deploy Agenta on AWS EC2 using Terraform?, -What are the open ports created by the Terraform module for Agenta on AWS EC2?, -How do I serve a variant to an instance after hosting Agenta?, -What steps are involved in SSH-ing into the instance where Agenta is hosted?, -How can I delete all the resources created by Terraform for Agenta on AWS?, -How can I deploy Agenta on Google Cloud Engine using Terraform?, -What are the prerequisites for deploying Agenta on Google Cloud Engine?, -How do I SSH into the instance after deploying Agenta on Google Cloud Engine?, -What security considerations should I keep in mind when allowing SSH access to the instance?, -How can I delete all the resources created by Terraform for Agenta on Google Cloud Engine?, -How can I host Agenta on a remote server like an AWS EC2 instance?, -What are the prerequisites for deploying Agenta on a remote server?, -How do I obtain the public IP of my AWS EC2 instance?, -What environment variables do I need to set before launching the Agenta server?, -"After starting the Agenta server, how can I verify that it is running correctly on the remote server?", -How can I apply schema migrations to my PostgreSQL database using the provided instructions?, -What command should I run to ensure that Alembic looks for the configuration file and other necessary files in the specified directory before executing?, -"If I need to revert a schema migration due to encountered issues, how can I do that according to the documentation?", -"Is there a way to automate the application of migrations without manually running the upgrade command? If so, how can I achieve this?", -"After completing the migration, what should I do to verify data integrity in PostgreSQL and ensure that everything works fine?", -How can I back up my MongoDB database before running the migration script?, -What Docker command should I use to start the local instance of Agenta for migration?, -"After initiating the migration, how can I access the running docker containers?", -How can I verify the data integrity in PostgreSQL post migration?, -"In case I encounter issues during migration, how can I revert the migration and what should I do next?", -How can I upgrade to the latest version of Agenta using Docker?, -What database does Agenta now use starting from version 0.19?, -How can I access the backend Docker container for Agenta?, -What is Beanie and how does it relate to MongoDB ODM for Python?, -What are the steps involved in performing a database migration using Beanie with Agenta backend system?, -Where can I find answers to common questions about Agenta?, -How can I get community support for Agenta? Is there a Slack community?, -What is the recommended channel for reporting bugs in Agenta?, -"As a Pro plan cloud user, how can I access direct team support?", -"If I'm interested in demos or have sales inquiries, how can I schedule a call with the founders?", -How can I add new users to my workspace?, -What are the different user roles available and what are their respective rights?, -"As a Workspace Admin, what are the limitations in terms of managing the workspace?", -What is the role of a Deployment Manager and what tasks do they handle within the workspace?, -How can I switch between different workspaces if I am a member of multiple workspaces?, -How do I format backend and CLI code using Black in specific directories?, -"What are the main steps to contribute to Agenta, especially when picking an issue?", -Can you guide me through running backend tests locally before making a pull request?, -How can I update the .env.local file in the frontend directory to include my OpenAI API Key?, -What are the rules regarding issue assignment and PR activity to prevent zombie issues in the Agenta project?, -How can I use my own version of Agenta CLI or SDK instead of the installed one?, -What steps can I take if I'm unable to run Agenta in my terminal even after following the provided instructions?, -How can I quickly work and test a new type of parameter like IntParam in the SDK?, -Are there any specific steps needed for working on the backend code in Agenta?, -How can I efficiently debug the backend code in Agenta using Docker or Visual Studio Code?, -How can I report a bug using the bug report template?, -Where can I find the network logs in the browser and why are they important when reporting an issue?, -What command should I run to get information about Docker containers and how can I provide this information when filing an issue?, -"When reporting an issue related to a specific llm app, what are the steps to provide container information using Docker Desktop or the terminal?", -Why is providing network logs and Docker container information crucial when filing an issue?, -How can I start monitoring and understanding the behavior of my LLM application with Agenta?, -What are the advantages of using OpenTelemetry (OTel) with Agenta's observability features?, -What is the relationship between traces and spans in the context of Agenta?, -Where can I find a Quick Start guide to get started with observability in Agenta?, -How can I learn to instrument specific applications like OpenAI or LangChain with Agenta?, -How can I enable tracing for OpenAI calls using Agenta SDK?, -What packages do I need to install to set up observability for an OpenAI application running locally?, -How can I configure environment variables for Agenta OSS running locally?, -Where can I find the captured traces of my application's requests in the Agenta UI?, -Is tracing enabled by default if I create an application through the Agenta UI?, -How can I install the Agenta SDK?, -What is the purpose of the @ag.instrument() decorator in Agenta SDK?, -How can I add additional metadata to a span in Agenta?, -"Can you explain how to link spans to applications, variants, and environments in Agenta?", -What options are available for redacting sensitive data in Agenta SDK?, -How do I install LiteLLM and Agenta SDK?, -What are the different environments I can configure while setting up LiteLLM with Agenta?, -How can I initialize Agenta SDK in my LiteLLM application?, -What does the @ag.instrument() decorator do in the code example provided?, -Why is it important to set up the callback handler for LiteLLM while using Agenta?, -How can I install the required packages for using LangChain with Agenta?, -What environment variables do I need to configure when using Agenta Cloud or Enterprise?, -What steps are involved in the code example provided for a LangChain application?, -How do I initialize Agenta in my LangChain application?, -Why is it important to call 'LangchainInstrumentor().instrument()' before running my LangChain application?, -How can I instrument OpenAI API calls with Agenta using `opentelemetry-instrumentation-openai` package?, -What packages do I need to install to instrument OpenAI API calls with Agenta using `opentelemetry-instrumentation-openai` package?, -How do I configure environment variables for Agenta Cloud or Enterprise when instrumenting OpenAI API calls?, -What decorator can I use to monitor multiple calls in a function or workflow as a single trace?, -How can I associate traces with specific parts of an Agenta project when instrumenting functions?, -How do I install the required packages for using Instructor with Agenta?, -What environment variables do I need to configure for Agenta Cloud or Enterprise setup?, -What must I ensure the order of when instrumenting OpenAI and creating the Instructor client?, -Why is it mentioned to instrument OpenAI before creating the Instructor client?, -"What does the @ag.instrument(spankind=""WORKFLOW"") decorator do in the code example?", -How can I experiment and compare prompts using Agenta?, -What types of workflows does Agenta support for prompt management and evaluation?, -How can I collaborate with product teams using Agenta for prompt engineering and evaluation?, -What are the different ways to deploy an application with Agenta?, -"Is Agenta compatible with various LLM app architectures and model providers? If so, how?", -How can I create a new LLM app using an existing template in Agenta?, -Where can I find the API endpoint after deploying my application in Agenta?, -What steps do I need to follow to test the application in the playground?, -How do I add my OpenAI API keys when self-hosting Agenta?, -What are some next steps after creating my first LLM application in Agenta?, -How can I create custom templates for my LLM-powered applications in Agenta?, -What are the predefined environments in Agenta and their purposes?, -"Explain the relationship between variants, versions, and commits in Agenta.", -Can you describe the difference between Completion Application Template and Chat Application Template in Agenta?, -What can I do if the deployment of a variant to an environment does not update automatically in Agenta?, -How does Agenta enable rapid experimentation and evaluation for LLM applications?, -What is the significance of Agenta treating each application as a microservice?, -How does Agenta handle the separation of application logic and configuration?, -What role does Agenta's backend play in managing applications and configurations?, -Can you explain the purpose and functionality of Agenta's SDK for a Python library?, -How can I collaborate with subject matter experts using custom workflows in Agenta?, -What is the main problem with traditional prompt playgrounds?, -Can I trust the outputs of traditional prompt playgrounds?, -How does Agenta's Custom Workflows simplify debugging for AI engineers?, -What frameworks and models are compatible with Agenta?, -How can I create a custom workflow with two prompts using Agenta?, -What are the steps to serve an application in Agenta using the CLI?, -How do I initialize the Agenta SDK in my Python code?, -What is the purpose of the `CoPConfig` class in the provided code snippet?, -Can you explain the concept of entry points in Agenta and how they are used in the code example?, -How can I configure evaluators for my LLM application?, -What tools are available for creating testsets for evaluation?, -Can I run evaluations directly from the web UI in Agenta?, -What types of evaluators are available for classification/entity extraction in LLM applications?, -How can I evaluate the faithfulness of outputs in RAG workflows?, -How can I create a testset for evaluation in agenta SDK?, -What is the purpose of creating evaluators in the agenta SDK?, -How can I run an evaluation job using the agenta SDK?, -What is the function of the rate limit configuration in evaluation jobs?, -How can I retrieve the detailed results of an evaluation using the agenta SDK?, -How can I initiate a single model evaluation in the Human Evaluation feature?, -What steps are involved in starting a new evaluation with the single model test?, -How do I compare the performance of two different variants manually using A/B Test in the Human Evaluation feature?, -Can collaborators be invited to collaborate on an A/B Test evaluation in the Human Evaluation feature?, -Is there a way to switch between card and table view in the evaluation process? How can this be done?, -How do I create a testset in Agenta using a CSV or JSON file?, -What is the default column name for the reference answer in a CSV testset?, -What is the structure of a valid JSON file for a testset in Agenta?, -How can I add data to a testset from the playground in Agenta?, -"In Agenta, how can I upload a testset using the API?", -How do I start a new evaluation in the UI?, -What parameters can be specified when setting up a new evaluation?, -What are the advanced configuration options available for adjusting batching and retry parameters?, -How can I analyze the results of an evaluation in more detail?, -"Can I compare multiple evaluations from the same testset in the UI? If yes, how?", -How can I configure evaluators for my LLM application?, -What are the inputs that evaluators typically take?, -Which button should I click to create a new evaluator?, -Can I create custom evaluators for my LLM application?, -What is the purpose of mappings evaluator's inputs to the LLM data?, -How can I create a webhook evaluator for a specific use case in Agenta?, -What are the limitations in terms of security measures when using webhook evaluators?, -What input parameters are required for a webhook evaluator in Agenta?, -What is the expected format of the webhook request body for a webhook evaluator?, -What should the webhook response body contain in order to be considered properly-formatted?, -How does the Exact Match evaluator determine if the model's output is correct?, -What does the Contains JSON evaluator check for in the model's output?, -How does the JSON Field Match evaluator compare specific fields within JSON data?, -Can you explain the process of JSON Diff Match evaluation?, -What configuration options are available for the JSON Diff Match evaluator and how do they affect the comparison process?, -How can I assess the performance of LLMs by identifying specific patterns within the output generated by the model?, -What is the purpose of the 'Regex Test' evaluator in Agenta and how does it work?, -Could you provide an example of using the 'Starts With' evaluator in Agenta and its significance?, -How does the 'Contains Any' evaluator in Agenta differ from the 'Contains All' evaluator?, -In what situations would I use the 'Ends With' evaluator in Agenta and how does it handle case sensitivity?, -How can I create a custom evaluator in Agenta?, -What is the function signature for the 'evaluate' function in a custom evaluator?, -What is the purpose of the 'evaluate' function in a custom evaluator?, -Which language is used for writing custom evaluators in Agenta?, -What ranges of scores can the 'evaluate' function return?, -How can I configure and use RAG evaluators in my custom-built application?, -What version of the Python SDK is required to access internal variables and intermediate outputs for RAG Evaluators?, -Where can I find the source code for a simple RAG Application that fetches movies and generates summaries?, -How can I troubleshoot if the RAG Evaluator and `view trace` are not accessible in Agenta OSS?, -Which utility can I use in Agenta to add internal variables (internals) to stages of a workflow?, -How does the Similarity Match evaluator determine a match between the generated output and the correct answer?, -What configuration parameter is needed for the Semantic Similarity Match evaluator?, -What is the cost associated with using the Semantic Similarity Match evaluator that uses OpenAI embeddings?, -In what use cases is the Levenshtein Distance evaluator particularly useful?, -Can you explain how the Levenshtein Distance evaluator works for comparing text outputs?, -How can I configure the prompt for LLM-as-a-Judge evaluation?, -"What variables can be used to reference inputs, outputs, and reference answers in the prompt?", -What is the default prompt used for the country expert demo application?, -"Which models are supported by LLM-as-a-Judge, and how can I select a specific model?", -Where do I need to set my OpenAI or Anthropic API key to use LLM-as-a-Judge?, -How can I create a testset using the SDK?, -What is the process for creating and configuring an evaluator programmatically?, -How can I check the status of an evaluation run?, -Where can I find the list of evaluator keys and configurations?, -What should I do if I encounter rate limits during the evaluation process?, -How can I create a new prompt using the Agenta SDK?, -How do I deploy changes to the production environment using the SDK?, -"What is the structure used by Agenta for prompt versioning, and how does it differ from traditional versioning systems?", -"In case of an issue with deploying changes using the SDK, what steps can I take to troubleshoot?", -Can you explain the concept of variants in Agenta and how they are similar to branches in Git?, -How can I set up tracing for a RAG application in LangChain using Agenta?, -What is the purpose of tracing in LLM applications?, -"How do I install the necessary dependencies for LangChain, Agenta, and instrumentation?", -Can you provide an example of a Q&A RAG application in LangChain and how it works?, -How can I retrieve and generate answers using relevant snippets of documentation in Agenta?, -How can I fetch the diff for a GitHub pull request using Python?, -What role does LiteLLM play in the AI assistant workflow described in the tutorial?, -How can I add observability to my LLM application using Agenta?, -What is the purpose of creating an LLM playground for the application?, -How can I deploy my AI assistant to production using Agenta?, -How can I version prompts in Agenta?, -What capabilities does Agenta provide for prompt management?, -Why do I need a prompt management system?, -What is the purpose of configuration management in Agenta?, -How can I publish a prompt to an endpoint from the web UI?, -How can I create a prompt using the web UI?, -Why do I need to publish a variant to a deployment?, -How can I integrate the prompt configuration with my Python code using the Agenta SDK?, -"Can I revert to a previous deployment version, and if so, how?", -What is the purpose of using Pydantic for schema validation in the SDK integration process?, -How can I create reusable prompts using prompt templates in the agenta playground?, -Where can I find the option to add new inputs to the LLM app in the playground?, -"What is the process for creating a new variant of an application in agenta, and where can I provide a new name for the variant?", -"How can I test a variant dynamically in the playground, and is there a way to run all inputs in a testset?", -"In the agenta playground, how do I compare variants side by side? Can I interact with different variants simultaneously in a chat application?", -How can I create a new prompt using the SDK?, -What is the structure followed by Agenta for prompt versioning?, -How can I delete a variant in Agenta? Is this action reversible?, -Can I list all variants of an application using the SDK? How can I do that?, -What is the default behavior for fetching configurations in Agenta?, -How can I use the Agenta SDK to invoke the deployed version of my prompt?, -Where can I find the call to invoke the deployed version of my prompt within the Agenta UI?, -What parameters do I need to provide when invoking a deployed prompt through the REST API?, -What does the 'inputs' dictionary in the parameters contain and how should it be structured?, -How can I control which environment version of my prompt is being called when using the REST API?, -How do I fetch the deployed version of my prompt in my code using the Agenta SDK?, -What Python SDK do I need to install for using the Agenta SDK?, -What environment variables need to be set up for fetching prompts?, -"In the sample output, what is the value of 'model' fetched from staging configuration?", -Which slugs should I provide when fetching prompts using Agenta SDK?, -How can Agenta help me manage prompts in my application?, -What are the advantages of using Agenta as a prompt management system?, -What considerations should I keep in mind when integrating observability manually with Agenta?, -When should I consider using Agenta as a middleware/model proxy?, -Does using Agenta as a proxy add any latency to the response?, -How can I install the agenta CLI tool?, -What is the command to install agenta using pip?, -Where can I find a quick usage guide for the agenta CLI?, -How do I get an overview of the main commands and capabilities of agenta CLI?, -Is there a tutorial available for deploying an LLM app from code using agenta CLI?, -How can I initialize a new Agenta project using the CLI?, -"What options can be provided with the 'agenta init' command, and how do they affect the project initialization process?", -"For the 'agenta variant list' command, where should it be executed, and what information does it provide?", -What are the steps involved in removing a variant from an application using the 'agenta variant remove' command?, -"How can I deploy an application variant to the Agenta platform using the 'agenta variant serve' command, and what additional options are available for deployment?", -How can I create a new variant with initial configuration parameters?, -What method should I use to commit changes to an existing variant?, -Which method is used to deploy a variant to a specific environment?, -How can I retrieve the version history of a variant?, -What are the available predefined environments for deployment?, -How can I store additional data within the current span in a trace?, -What utility function can I use to validate if a string is a valid attribute key?, -How can I link spans to specific Agenta resources using the SDK?, -What method should I use to set the status of a span in the CustomSpan class?, -When should I apply the @ag.instrument() decorator in my Python code?, -How can I expose specific stages of LLM workflows as API endpoints using the Custom Workflows SDK?, -What types of fields are accepted in the configuration schema when defining a configuration for a function?, -How can I define fields with constraints and defaults in the configuration schema when using `@ag.route` or `@ag.entrypoint` decorators?, -"How are different field types represented in the Agenta playground UI, and what are the input methods for each type?", -How can I retrieve configuration information from the route context using `ag.ConfigManager.get_from_route()` and how is this configuration used in a function?, -How do I experiment with AI applications using the agenta SDK?, -What is the purpose of the deprecated SDK v2 mentioned on the page?, -How can I initialize my variant using the agenta SDK?, -What function should I use to set the default configuration in the agenta SDK?, -Can the agenta SDK be used with any Foundational Model?, -How can I display a text area widget in the playground using the SDK v2?, -What is the difference between IntParam and FloatParam in terms of the widgets they display in the playground?, -Can you provide an example of how to use BinaryParam in the SDK v2 configuration?, -What is the purpose of the GroupedMultipleChoiceParam in the configuration settings?, -What is the important note mentioned regarding the initialization of BinaryParam in the SDK v2?, -How do I access the parameters in the configuration in my code?, -What is the purpose of the 'config' object in the SDK v2?, -Can I experiment with different parameters using the 'config' object?, -What is the significance of calling 'agenta.init()' before using the 'config' object?, -What are some examples of parameters that can be saved in the 'config' object for an LLM variant?, -Why is it recommended to call `agenta.init()` only once at the entry point of the code?, -What happens if `agenta.init()` is called multiple times in the code?, -How does calling `agenta.init()` help in initializing the variant?, -Is there a different method to initialize the variant in the deprecated SDK v2?, -What could be the potential impact of using the deprecated SDK v2 for building an llm application?, -How can I set the default configuration for my variant using the register_default method?, -What happens if I set the default prompt value to 'Hello World' in my configuration?, -When should I use the register_default method in my llm application development?, -What parameters can I set using the register_default method for my llm application?, -How can I access the prompt1 parameter value from the configuration in the backend?, -How do I push configuration using agenta.config.push()?, -What happens if I set overwrite to True when pushing a configuration?, -How can I avoid overwriting an existing configuration when using agenta.config.push()?, -Where does the pushed configuration get stored for a specific code base?, -Can I push configurations for multiple variants using agenta.config.push()?, -How can I pull a configuration with a specific name?, -What happens when I pull a configuration using the 'production' environment?, -How can I access the parameters after pulling the configuration?, -Can I pull configurations for different variants using this function?, -Why does the documentation mention that this page is for the deprecated SDK v2?, \ No newline at end of file diff --git a/hooks/setup.sh b/hooks/setup.sh deleted file mode 100755 index 287d31bab6..0000000000 --- a/hooks/setup.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "🔧 Setting up Git hooks with pre-commit + gitleaks..." - -# --- check dependencies --- -if ! command -v python3 >/dev/null 2>&1; then - echo "❌ Python3 is required but not installed." - exit 1 -fi -if ! command -v pip3 >/dev/null 2>&1; then - echo "❌ pip3 is required but not installed." - exit 1 -fi - -# --- install pre-commit globally if missing --- -if ! command -v pre-commit >/dev/null 2>&1; then - echo "📦 Installing pre-commit..." - pip3 install pre-commit -fi - -# --- install gitleaks globally if missing --- -if ! command -v gitleaks >/dev/null 2>&1; then - echo "📦 Installing gitleaks..." - if command -v brew >/dev/null 2>&1; then - brew install gitleaks - else - # fallback: go install (requires Go installed) - go install github.com/zricethezav/gitleaks/v8@latest - export PATH="$PATH:$(go env GOPATH)/bin" - echo "----------------------------------------------------------------------" - echo "⚠️⚠️ PLEASE ADD $(go env GOPATH)/bin TO YOUR PATH IN YOUR .bashrc OR .zshrc ⚠️⚠️" - echo "----------------------------------------------------------------------" - fi -fi - -# --- install hooks into .git/hooks/ --- -echo "⚙️ Installing pre-commit hooks..." -pre-commit install --install-hooks -pre-commit install --hook-type pre-push - -# --- one-time full scans --- -echo "🔍 Running one-time gitleaks scans..." - -gitleaks --config .gitleaks.toml --exit-code 1 --verbose detect --no-git --source . || { - echo "❌ Gitleaks detected potential secrets in the working directory." - exit 1 -} - -echo "✅ Setup complete! Hooks installed and initial scan passed. You are safe to commit." diff --git a/hosting/old/aws/agenta_instance.tf b/hosting/aws/agenta_instance.tf similarity index 100% rename from hosting/old/aws/agenta_instance.tf rename to hosting/aws/agenta_instance.tf diff --git a/hosting/old/aws/agenta_instance_sg.tf b/hosting/aws/agenta_instance_sg.tf similarity index 100% rename from hosting/old/aws/agenta_instance_sg.tf rename to hosting/aws/agenta_instance_sg.tf diff --git a/hosting/old/aws/instance-setup.sh b/hosting/aws/instance-setup.sh similarity index 100% rename from hosting/old/aws/instance-setup.sh rename to hosting/aws/instance-setup.sh diff --git a/hosting/old/aws/main.tf b/hosting/aws/main.tf similarity index 100% rename from hosting/old/aws/main.tf rename to hosting/aws/main.tf diff --git a/hosting/docker-compose/ee/LICENSE b/hosting/docker-compose/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/hosting/docker-compose/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/hosting/docker-compose/ee/docker-compose.dev.yml b/hosting/docker-compose/ee/docker-compose.dev.yml index 09861d7b20..96d045d525 100644 --- a/hosting/docker-compose/ee/docker-compose.dev.yml +++ b/hosting/docker-compose/ee/docker-compose.dev.yml @@ -1,25 +1,13 @@ name: agenta-ee-dev services: - .api: - image: agenta-ee-dev-api:latest - build: - context: ../../../api - dockerfile: ee/docker/Dockerfile.dev - command: ["true"] # exits immediately - - .web: - image: agenta-ee-dev-web:latest - build: - context: ../../../web - dockerfile: ee/docker/Dockerfile.dev - command: ["true"] # exits immediately - web: profiles: - with-web - - image: agenta-ee-dev-web:latest + + build: + context: ../../../web + dockerfile: ee/docker/Dockerfile.dev volumes: - ../../../web/ee/src:/app/ee/src @@ -42,14 +30,16 @@ services: - "traefik.http.routers.agenta-web.entrypoints=web" - "traefik.http.services.agenta-web.loadbalancer.server.port=3000" + command: sh -c "pnpm dev-ee" api: - image: agenta-ee-dev-api:latest + build: + context: ../../../api + dockerfile: ee/docker/Dockerfile.dev volumes: - ../../../api:/app - - ../../../sdk:/sdk env_file: - ${ENV_FILE:-./.env.ee.dev} @@ -92,11 +82,12 @@ services: condition: service_healthy worker: - image: agenta-ee-dev-api:latest + build: + context: ../../../api + dockerfile: ee/docker/Dockerfile.dev volumes: - ../../../api:/app - - ../../../sdk:/sdk env_file: - ${ENV_FILE:-./.env.ee.dev} @@ -115,14 +106,15 @@ services: - agenta-network command: > - watchmedo auto-restart --directory=/app/ --pattern=*.py --recursive -- celery -A entrypoint.celery_app worker --concurrency=1 --max-tasks-per-child=1 --prefetch-multiplier=1 --loglevel=DEBUG + watchmedo auto-restart --directory=/app/ --pattern=*.py --recursive -- celery -A entrypoint.celery_app worker --concurrency=1 cron: - image: agenta-ee-dev-api:latest + build: + context: ../../../api + dockerfile: ee/docker/Dockerfile.dev volumes: - ../../../api/ee/src/crons/meters.sh:/meters.sh - - ../../../api/oss/src/crons/queries.sh:/queries.sh env_file: - ${ENV_FILE:-./.env.ee.dev} @@ -142,11 +134,12 @@ services: command: cron -f alembic: - image: agenta-ee-dev-api:latest + build: + context: ../../../api + dockerfile: ee/docker/Dockerfile.dev volumes: - - ../../../api:/app - - ../../../sdk:/sdk + - ../../../api:/app/ env_file: - ${ENV_FILE:-./.env.ee.dev} @@ -157,12 +150,12 @@ services: networks: - agenta-network - command: sh -c "python -m ee.databases.postgres.migrations.runner" + command: sh -c "python -c 'from ee.databases.postgres.migrations.utils import split_core_and_tracing as split; split(); from ee.databases.postgres.migrations.core.utils import run_alembic_migration as run; run(); from ee.databases.postgres.migrations.tracing.utils import run_alembic_migration as run; run(); from ee.databases.postgres.migrations.utils import copy_nodes_from_core_to_tracing as copy; copy();'" completion: build: context: ../../../services/completion - dockerfile: ee/docker/Dockerfile.dev + dockerfile: oss/docker/Dockerfile.dev volumes: - ../../../services/completion:/app @@ -191,7 +184,7 @@ services: chat: build: context: ../../../services/chat - dockerfile: ee/docker/Dockerfile.dev + dockerfile: oss/docker/Dockerfile.dev volumes: - ../../../services/chat:/app diff --git a/hosting/docker-compose/ee/env.ee.dev.example b/hosting/docker-compose/ee/env.ee.dev.example deleted file mode 100644 index c42666965b..0000000000 --- a/hosting/docker-compose/ee/env.ee.dev.example +++ /dev/null @@ -1,91 +0,0 @@ -# First-party (required) -AGENTA_LICENSE=ee -AGENTA_STAGE=dev -AGENTA_PROVIDER=local -AGENTA_WEB_URL=http://localhost -AGENTA_API_URL=http://localhost/api -AGENTA_SERVICES_URL=http://localhost/services -AGENTA_AUTH_KEY=change-me -AGENTA_CRYPT_KEY=change-me -AGENTA_API_IMAGE_NAME=agenta-api -AGENTA_API_IMAGE_TAG=latest -AGENTA_WEB_IMAGE_NAME=agenta-web -AGENTA_WEB_IMAGE_TAG=latest - -# First-party (registry & service) -DOCKER_NETWORK_MODE=bridge -POSTGRES_USERNAME=username -POSTGRES_PASSWORD=password - -# First-party (optional) -AGENTA_AUTO_MIGRATIONS=true -AGENTA_PRICING= -AGENTA_DEMOS= -AGENTA_RUNTIME_PREFIX= -AGENTA_API_INTERNAL_URL= -AGENTA_LITELLM_MOCK= -POSTGRES_USERNAME_ADMIN= -POSTGRES_PASSWORD_ADMIN= -AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED=true -AGENTA_OTLP_MAX_BATCH_BYTES=10485760 - -# Third-party (required) -TRAEFIK_DOMAIN= -TRAEFIK_PROTOCOL= -TRAEFIK_PORT= - -REDIS_URL=redis://redis:6379/0 -RABBITMQ_DEFAULT_PASS=guest -RABBITMQ_DEFAULT_USER=guest - -CELERY_BROKER_URL=amqp://guest@rabbitmq// -CELERY_RESULT_BACKEND=redis://redis:6379/0 - -POSTGRES_URI_SUPERTOKENS="postgresql://username:password@postgres:5432/agenta_ee_supertokens" -POSTGRES_URI_CORE="postgresql+asyncpg://username:password@postgres:5432/agenta_ee_core" -POSTGRES_URI_TRACING="postgresql+asyncpg://username:password@postgres:5432/agenta_ee_tracing" - -ALEMBIC_CFG_PATH_CORE=/app/ee/databases/postgres/migrations/core/alembic.ini -ALEMBIC_CFG_PATH_TRACING=/app/ee/databases/postgres/migrations/tracing/alembic.ini - -SUPERTOKENS_CONNECTION_URI=http://supertokens:3567 - -# Third-party (optional) -AWS_ECR_URL= -AWS_RDS_SECRET= - -POSTHOG_API_KEY=phc_3urGRy5TL1HhaHnRYL0JSHxJxigRVackhphHtozUmdp - -GITHUB_OAUTH_CLIENT_ID= -GITHUB_OAUTH_CLIENT_SECRET= -GOOGLE_OAUTH_CLIENT_ID= -GOOGLE_OAUTH_CLIENT_SECRET= - -SUPERTOKENS_API_KEY=replace-me - -NEW_RELIC_LICENSE_KEY= -NRIA_LICENSE_KEY= - -LOOPS_API_KEY= - -SENDGRID_API_KEY= - -CRISP_WEBSITE_ID= - -STRIPE_API_KEY= -STRIPE_WEBHOOK_SECRET= -STRIPE_TARGET= - -# Third-party - LLM (optional) -ALEPHALPHA_API_KEY= -ANTHROPIC_API_KEY= -ANYSCALE_API_KEY= -COHERE_API_KEY= -DEEPINFRA_API_KEY= -GEMINI_API_KEY= -GROQ_API_KEY= -MISTRAL_API_KEY= -OPENAI_API_KEY= -OPENROUTER_API_KEY= -PERPLEXITYAI_API_KEY= -TOGETHERAI_API_KEY= diff --git a/hosting/docker-compose/ee/env.ee.gh.example b/hosting/docker-compose/ee/env.ee.gh.example deleted file mode 100644 index 5cba09c18c..0000000000 --- a/hosting/docker-compose/ee/env.ee.gh.example +++ /dev/null @@ -1,80 +0,0 @@ -# First-party (required) -AGENTA_LICENSE=ee -AGENTA_STAGE=dev -AGENTA_PROVIDER=local -AGENTA_API_URL=http://localhost/api -AGENTA_WEB_URL=http://localhost -AGENTA_SERVICES_URL=http://localhost/services -AGENTA_AUTH_KEY=change-me -AGENTA_CRYPT_KEY=change-me - -# First-party (registry & service) -DOCKER_NETWORK_MODE=bridge -POSTGRES_PASSWORD=password -POSTGRES_USERNAME=username - -# First-party (optional) -AGENTA_AUTO_MIGRATIONS=true -AGENTA_PRICING= -AGENTA_DEMOS= -AGENTA_RUNTIME_PREFIX= -AGENTA_API_INTERNAL_URL= -AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED=true -AGENTA_OTLP_MAX_BATCH_BYTES=10485760 - -# Third-party (required) -TRAEFIK_DOMAIN= -TRAEFIK_PROTOCOL= -TRAEFIK_PORT= - -REDIS_URL=redis://redis:6379/0 -RABBITMQ_DEFAULT_PASS=guest -RABBITMQ_DEFAULT_USER=guest - -CELERY_BROKER_URL=amqp://guest@rabbitmq// -CELERY_RESULT_BACKEND=redis://redis:6379/0 - -POSTGRES_URI_SUPERTOKENS="postgresql://username:password@postgres:5432/agenta_ee_supertokens" -POSTGRES_URI_CORE="postgresql+asyncpg://username:password@postgres:5432/agenta_ee_core" -POSTGRES_URI_TRACING="postgresql+asyncpg://username:password@postgres:5432/agenta_ee_tracing" - -ALEMBIC_CFG_PATH_CORE=/app/ee/databases/postgres/migrations/core/alembic.ini -ALEMBIC_CFG_PATH_TRACING=/app/ee/databases/postgres/migrations/tracing/alembic.ini - -SUPERTOKENS_API_KEY=replace-me -SUPERTOKENS_CONNECTION_URI=http://supertokens:3567 - -# Third-party (optional) -POSTHOG_API_KEY=phc_3urGRy5TL1HhaHnRYL0JSHxJxigRVackhphHtozUmdp - -GITHUB_OAUTH_CLIENT_ID= -GITHUB_OAUTH_CLIENT_SECRET= - -GOOGLE_OAUTH_CLIENT_ID= -GOOGLE_OAUTH_CLIENT_SECRET= - -NEW_RELIC_LICENSE_KEY= -NRIA_LICENSE_KEY= - -LOOPS_API_KEY= - -SENDGRID_API_KEY= - -CRISP_WEBSITE_ID= - -STRIPE_API_KEY= -STRIPE_WEBHOOK_SECRET= - -# Third-party - LLM (optional) -ALEPHALPHA_API_KEY= -ANTHROPIC_API_KEY= -ANYSCALE_API_KEY= -COHERE_API_KEY= -DEEPINFRA_API_KEY= -GEMINI_API_KEY= -GROQ_API_KEY= -MISTRAL_API_KEY= -OPENAI_API_KEY= -OPENROUTER_API_KEY= -PERPLEXITYAI_API_KEY= -TOGETHERAI_API_KEY= \ No newline at end of file diff --git a/hosting/docker-compose/oss/docker-compose.dev.yml b/hosting/docker-compose/oss/docker-compose.dev.yml index 53c0eaef52..7b2481c3b5 100644 --- a/hosting/docker-compose/oss/docker-compose.dev.yml +++ b/hosting/docker-compose/oss/docker-compose.dev.yml @@ -37,7 +37,6 @@ services: volumes: - ../../../api/entrypoint.py:/app/entrypoint.py - ../../../api/oss:/app/oss - - ../../../sdk:/sdk env_file: - ${ENV_FILE:-./.env.oss.dev} @@ -84,7 +83,6 @@ services: volumes: - ../../../api/entrypoint.py:/app/entrypoint.py - ../../../api/oss:/app/oss - - ../../../sdk:/sdk env_file: - ${ENV_FILE:-./.env.oss.dev} @@ -101,31 +99,7 @@ services: restart: always command: > - watchmedo auto-restart --directory=/app/ --pattern=*.py --recursive -- celery -A entrypoint.celery_app worker --concurrency=1 --max-tasks-per-child=1 --prefetch-multiplier=1 - - cron: - image: agenta-oss-dev-api:latest - - volumes: - # - - ../../../api/oss/src/crons/queries.sh:/queries.sh - - env_file: - - ${ENV_FILE:-./.env.oss.dev} - - depends_on: - - postgres - - api - - extra_hosts: - - "host.docker.internal:host-gateway" - - restart: always - - networks: - - agenta-network - - command: cron -f + watchmedo auto-restart --directory=/app/ --pattern=*.py --recursive -- celery -A entrypoint.celery_app worker --concurrency=1 alembic: build: @@ -135,7 +109,6 @@ services: volumes: - ../../../api/entrypoint.py:/app/entrypoint.py - ../../../api/oss:/app/oss - - ../../../sdk:/sdk env_file: - ${ENV_FILE:-./.env.oss.dev} @@ -146,7 +119,7 @@ services: networks: - agenta-network - command: sh -c "python -m oss.databases.postgres.migrations.runner" + command: sh -c "python -c 'from oss.databases.postgres.migrations.utils import split_core_and_tracing as split; split(); from oss.databases.postgres.migrations.core.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.tracing.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.utils import copy_nodes_from_core_to_tracing as copy; copy();'" completion: build: @@ -285,7 +258,7 @@ services: command: --api.dashboard=true --api.insecure=true --providers.docker --entrypoints.web.address=:${TRAEFIK_PORT:-80} ports: - - "${TRAEFIK_PORT:-80}:${TRAEFIK_PORT:-80}" + - "${TRAEFIK_PORT:-80}:80" - "${TRAEFIK_UI_PORT:-8080}:8080" volumes: - /var/run/docker.sock:/var/run/docker.sock diff --git a/hosting/docker-compose/oss/docker-compose.gh.ssl.yml b/hosting/docker-compose/oss/docker-compose.gh.ssl.yml index c7dbd5c730..fd87b9ec55 100644 --- a/hosting/docker-compose/oss/docker-compose.gh.ssl.yml +++ b/hosting/docker-compose/oss/docker-compose.gh.ssl.yml @@ -91,9 +91,7 @@ services: "-A", "entrypoint.celery_app", "worker", - "--concurrency=1", - "--max-tasks-per-child=1", - "--prefetch-multiplier=1" + "--concurrency=2" ] depends_on: postgres: @@ -104,26 +102,6 @@ services: condition: service_healthy restart: always - cron: - image: agenta-oss-dev-api:latest - - env_file: - - ${ENV_FILE:-./.env.oss.dev} - - depends_on: - - postgres - - api - - extra_hosts: - - "host.docker.internal:host-gateway" - - restart: always - - networks: - - agenta-network - - command: cron -f - alembic: build: context: ../../../api @@ -137,8 +115,7 @@ services: env_file: - ${ENV_FILE:-./.env.oss.gh} - command: sh -c "python -m oss.databases.postgres.migrations.runner" - + command: sh -c "python -c 'from oss.databases.postgres.migrations.utils import split_core_and_tracing as split; split(); from oss.databases.postgres.migrations.core.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.tracing.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.utils import copy_nodes_from_core_to_tracing as copy; copy();'" depends_on: postgres: condition: service_healthy @@ -299,9 +276,9 @@ services: networks: - agenta-gh-ssl-network ports: - - "${TRAEFIK_PORT:-80}:${TRAEFIK_PORT:-80}" + - "${TRAEFIK_PORT:-80}:80" - "${TRAEFIK_UI_PORT:-8080}:8080" - - "${TRAEFIK_HTTPS_PORT:-443}:${TRAEFIK_HTTPS_PORT:-443}" + - "${TRAEFIK_HTTPS_PORT:-443}:443" restart: always supertokens: diff --git a/hosting/docker-compose/oss/docker-compose.gh.yml b/hosting/docker-compose/oss/docker-compose.gh.yml index e079346a68..713caa0031 100644 --- a/hosting/docker-compose/oss/docker-compose.gh.yml +++ b/hosting/docker-compose/oss/docker-compose.gh.yml @@ -5,10 +5,6 @@ services: profiles: - with-web - # build: - # context: ../../../web - # dockerfile: oss/docker/Dockerfile.gh - image: ghcr.io/agenta-ai/${AGENTA_WEB_IMAGE_NAME:-agenta-web}:${AGENTA_WEB_IMAGE_TAG:-latest} env_file: @@ -72,7 +68,7 @@ services: - ${ENV_FILE:-./.env.oss.gh} command: > - celery -A entrypoint.celery_app worker --concurrency=1 --max-tasks-per-child=1 --prefetch-multiplier=1 + celery -A entrypoint.celery_app worker --concurrency=1 depends_on: - postgres @@ -80,26 +76,6 @@ services: - redis restart: always - cron: - image: agenta-oss-dev-api:latest - - env_file: - - ${ENV_FILE:-./.env.oss.dev} - - depends_on: - - postgres - - api - - extra_hosts: - - "host.docker.internal:host-gateway" - - restart: always - - networks: - - agenta-network - - command: cron -f - alembic: build: context: ../../../api @@ -113,7 +89,7 @@ services: env_file: - ${ENV_FILE:-./.env.oss.gh} - command: sh -c "python -m oss.databases.postgres.migrations.runner" + command: sh -c "python -c 'from oss.databases.postgres.migrations.utils import split_core_and_tracing as split; split(); from oss.databases.postgres.migrations.core.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.tracing.utils import run_alembic_migration as run; run(); from oss.databases.postgres.migrations.utils import copy_nodes_from_core_to_tracing as copy; copy();'" depends_on: postgres: @@ -268,7 +244,7 @@ services: - ${ENV_FILE:-./.env.oss.gh} ports: - - "${TRAEFIK_PORT:-80}:${TRAEFIK_PORT:-80}" + - "${TRAEFIK_PORT:-80}:80" - "${TRAEFIK_UI_PORT:-8080}:8080" restart: always diff --git a/hosting/docker-compose/oss/env.oss.dev.example b/hosting/docker-compose/oss/env.oss.dev.example deleted file mode 100644 index 05e16eda8a..0000000000 --- a/hosting/docker-compose/oss/env.oss.dev.example +++ /dev/null @@ -1,103 +0,0 @@ -# First-party (required) -AGENTA_LICENSE=oss -AGENTA_API_URL=http://localhost/api -AGENTA_WEB_URL=http://localhost -AGENTA_SERVICES_URL=http://localhost/services -AGENTA_AUTH_KEY=replace-me -AGENTA_CRYPT_KEY=replace-me - -# First-party (registry & service) -POSTGRES_PASSWORD=password -POSTGRES_USERNAME=username - -# First-party (optional) -AGENTA_AUTO_MIGRATIONS=true -AGENTA_PRICING= -AGENTA_DEMOS= -DOCKER_NETWORK_MODE=bridge -AGENTA_RUNTIME_PREFIX= -AGENTA_SEND_EMAIL_FROM_ADDRESS=mail@example.com -AGENTA_API_INTERNAL_URL= -AGENTA_TELEMETRY_ENABLED=true -AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED=true -AGENTA_OTLP_MAX_BATCH_BYTES=10485760 - -# Third-party (required) -TRAEFIK_DOMAIN=localhost -TRAEFIK_PORT=80 -TRAEFIK_PROTOCOL=http -TRAEFIK_UI_PORT=8080 -TRAEFIK_HTTPS_PORT=443 - -REDIS_URL=redis://redis:6379/0 -RABBITMQ_DEFAULT_USER=guest -RABBITMQ_DEFAULT_PASS=guest - -CELERY_BROKER_URL=amqp://guest@rabbitmq// -CELERY_RESULT_BACKEND=redis://redis:6379/0 - - -POSTGRES_URI_SUPERTOKENS=postgresql://username:password@postgres:5432/agenta_oss_supertokens -POSTGRES_URI_CORE=postgresql+asyncpg://username:password@postgres:5432/agenta_oss_core -POSTGRES_URI_TRACING=postgresql+asyncpg://username:password@postgres:5432/agenta_oss_tracing - -ALEMBIC_CFG_PATH_CORE=/app/oss/databases/postgres/migrations/core/alembic.ini -ALEMBIC_CFG_PATH_TRACING=/app/oss/databases/postgres/migrations/tracing/alembic.ini - -SUPERTOKENS_CONNECTION_URI=http://supertokens:3567 - -POSTHOG_API_KEY=phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7 - -# Third-party (required for TLS/SSL) -AGENTA_SSL_DIR= - -# Third-party (optional) -NGINX_PORT=80 -SUPERTOKENS_API_KEY= -RABBITMQ_PORT= -RABBITMQ_UI_PORT= -REDIS_CACHE_HOST= -REDIS_CACHE_PORT= -POSTGRES_PORT= -SUPERTOKENS_PORT= - -GOOGLE_OAUTH_CLIENT_ID= -GOOGLE_OAUTH_CLIENT_SECRET= -GITHUB_OAUTH_CLIENT_ID= -GITHUB_OAUTH_CLIENT_SECRET= - -NEW_RELIC_LICENSE_KEY= -NRIA_LICENSE_KEY= - -LOOPS_API_KEY= - -SENDGRID_API_KEY= - -CRISP_WEBSITE_ID= - -STRIPE_API_KEY= -STRIPE_WEBHOOK_SECRET= - -# Third-party — LLM (optional) -ALEPHALPHA_API_KEY= -ANTHROPIC_API_KEY= -ANYSCALE_API_KEY= -COHERE_API_KEY= -DEEPINFRA_API_KEY= -GEMINI_API_KEY= -GROQ_API_KEY= -MISTRAL_API_KEY= -OPENAI_API_KEY= -OPENROUTER_API_KEY= -PERPLEXITYAI_API_KEY= -TOGETHERAI_API_KEY= - -# Legacy (deprecated, to be removed) -AGENTA_PORT=80 -BARE_DOMAIN_NAME=localhost -DOMAIN_NAME=http://localhost -WEBSITE_DOMAIN_NAME=http://localhost -SERVICE_URL_TEMPLATE=http://localhost:80/services/{path} -POSTGRES_DB=agenta_oss -POSTGRES_URI=postgresql+asyncpg://username:password@postgres:5432/agenta_oss -ALEMBIC_CFG_PATH=/app/oss/databases/postgres/migrations/alembic.oss.ini diff --git a/hosting/docker-compose/oss/env.oss.gh.example b/hosting/docker-compose/oss/env.oss.gh.example deleted file mode 100644 index 05e16eda8a..0000000000 --- a/hosting/docker-compose/oss/env.oss.gh.example +++ /dev/null @@ -1,103 +0,0 @@ -# First-party (required) -AGENTA_LICENSE=oss -AGENTA_API_URL=http://localhost/api -AGENTA_WEB_URL=http://localhost -AGENTA_SERVICES_URL=http://localhost/services -AGENTA_AUTH_KEY=replace-me -AGENTA_CRYPT_KEY=replace-me - -# First-party (registry & service) -POSTGRES_PASSWORD=password -POSTGRES_USERNAME=username - -# First-party (optional) -AGENTA_AUTO_MIGRATIONS=true -AGENTA_PRICING= -AGENTA_DEMOS= -DOCKER_NETWORK_MODE=bridge -AGENTA_RUNTIME_PREFIX= -AGENTA_SEND_EMAIL_FROM_ADDRESS=mail@example.com -AGENTA_API_INTERNAL_URL= -AGENTA_TELEMETRY_ENABLED=true -AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED=true -AGENTA_OTLP_MAX_BATCH_BYTES=10485760 - -# Third-party (required) -TRAEFIK_DOMAIN=localhost -TRAEFIK_PORT=80 -TRAEFIK_PROTOCOL=http -TRAEFIK_UI_PORT=8080 -TRAEFIK_HTTPS_PORT=443 - -REDIS_URL=redis://redis:6379/0 -RABBITMQ_DEFAULT_USER=guest -RABBITMQ_DEFAULT_PASS=guest - -CELERY_BROKER_URL=amqp://guest@rabbitmq// -CELERY_RESULT_BACKEND=redis://redis:6379/0 - - -POSTGRES_URI_SUPERTOKENS=postgresql://username:password@postgres:5432/agenta_oss_supertokens -POSTGRES_URI_CORE=postgresql+asyncpg://username:password@postgres:5432/agenta_oss_core -POSTGRES_URI_TRACING=postgresql+asyncpg://username:password@postgres:5432/agenta_oss_tracing - -ALEMBIC_CFG_PATH_CORE=/app/oss/databases/postgres/migrations/core/alembic.ini -ALEMBIC_CFG_PATH_TRACING=/app/oss/databases/postgres/migrations/tracing/alembic.ini - -SUPERTOKENS_CONNECTION_URI=http://supertokens:3567 - -POSTHOG_API_KEY=phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7 - -# Third-party (required for TLS/SSL) -AGENTA_SSL_DIR= - -# Third-party (optional) -NGINX_PORT=80 -SUPERTOKENS_API_KEY= -RABBITMQ_PORT= -RABBITMQ_UI_PORT= -REDIS_CACHE_HOST= -REDIS_CACHE_PORT= -POSTGRES_PORT= -SUPERTOKENS_PORT= - -GOOGLE_OAUTH_CLIENT_ID= -GOOGLE_OAUTH_CLIENT_SECRET= -GITHUB_OAUTH_CLIENT_ID= -GITHUB_OAUTH_CLIENT_SECRET= - -NEW_RELIC_LICENSE_KEY= -NRIA_LICENSE_KEY= - -LOOPS_API_KEY= - -SENDGRID_API_KEY= - -CRISP_WEBSITE_ID= - -STRIPE_API_KEY= -STRIPE_WEBHOOK_SECRET= - -# Third-party — LLM (optional) -ALEPHALPHA_API_KEY= -ANTHROPIC_API_KEY= -ANYSCALE_API_KEY= -COHERE_API_KEY= -DEEPINFRA_API_KEY= -GEMINI_API_KEY= -GROQ_API_KEY= -MISTRAL_API_KEY= -OPENAI_API_KEY= -OPENROUTER_API_KEY= -PERPLEXITYAI_API_KEY= -TOGETHERAI_API_KEY= - -# Legacy (deprecated, to be removed) -AGENTA_PORT=80 -BARE_DOMAIN_NAME=localhost -DOMAIN_NAME=http://localhost -WEBSITE_DOMAIN_NAME=http://localhost -SERVICE_URL_TEMPLATE=http://localhost:80/services/{path} -POSTGRES_DB=agenta_oss -POSTGRES_URI=postgresql+asyncpg://username:password@postgres:5432/agenta_oss -ALEMBIC_CFG_PATH=/app/oss/databases/postgres/migrations/alembic.oss.ini diff --git a/hosting/docker-compose/run.sh b/hosting/docker-compose/run.sh index d7da3e712f..5efb0db186 100755 --- a/hosting/docker-compose/run.sh +++ b/hosting/docker-compose/run.sh @@ -10,7 +10,6 @@ AGENTA_WEB_URL= # Use env var if available, otherwise default ENV_FILE="" # Default to no env file BUILD=false # Default to no forced build NO_CACHE=false # Default to using cache -NUKE=false # Default to not nuking volumes show_usage() { echo "Usage: $0 [OPTIONS]" @@ -24,7 +23,6 @@ show_usage() { echo " --env-file <path> Specify an environment file to load variables (default: built-in)" echo " --build Force a fresh build of containers (default: false)" echo " --no-cache Build without using cache [implies --build] (default: false)" - echo " --nuke Remove related volumes before starting containers" echo " --help Show this help message and exit" exit 0 } @@ -81,9 +79,6 @@ while [[ "$#" -gt 0 ]]; do NO_CACHE=true BUILD=true # --no-cache implies --build ;; - --nuke) - NUKE=true - ;; --help) show_usage ;; @@ -119,6 +114,7 @@ fi # Export the ENV_FILE to the environment export ENV_FILE="$ENV_FILE" +#export ENV_FILE="$ENV_FILE" # Always append --env-file flag to COMPOSE_CMD COMPOSE_CMD+=" --env-file ./hosting/docker-compose/$LICENSE/$ENV_FILE" @@ -133,43 +129,32 @@ else COMPOSE_CMD+=" --profile with-traefik" fi -if [[ "$STAGE" == "dev" ]]; then - if $NO_CACHE; then - echo "Building containers with no cache (dev)..." - $COMPOSE_CMD build --parallel --no-cache || error_exit "Build failed" - elif $BUILD; then - echo "Building containers (dev)..." - $COMPOSE_CMD build --parallel || error_exit "Build failed" - fi -else - if $NO_CACHE; then - echo "Pulling latest images (non-dev with --no-cache)..." - $COMPOSE_CMD pull || error_exit "Pull failed" - fi - # else: do nothing +# Handle build options +BUILD_CMD="up -d" +if $BUILD; then + BUILD_CMD+=" --build" +fi + +if $NO_CACHE; then + BUILD_CMD+=" --no-cache" fi -# Shutdown with optional nuke +# Restart Docker Compose safely echo "Stopping existing Docker containers..." # Include all profiles to ensure clean shutdown SHUTDOWN_CMD="$COMPOSE_CMD --profile with-web --profile with-nginx --profile with-traefik down" - -if $NUKE; then - SHUTDOWN_CMD+=" --volumes" -fi - $SHUTDOWN_CMD || error_exit "Failed to stop existing containers." echo "Starting Docker containers with domain: $AGENTA_WEB_URL ..." -AGENTA_WEB_URL="$AGENTA_WEB_URL" $COMPOSE_CMD up -d || error_exit "Failed to start Docker containers." +AGENTA_WEB_URL="$AGENTA_WEB_URL" $COMPOSE_CMD $BUILD_CMD || error_exit "Failed to start Docker containers." echo "✅ Setup complete!" # Start the web development environment unless --no-web is provided if ! $WITH_WEB ; then echo "Setting up web environment..." - + if [[ ! -d "web" ]]; then error_exit "Web directory not found!" fi @@ -184,7 +169,7 @@ if ! $WITH_WEB ; then echo "Starting development server for $LICENSE..." sh -c "AGENTA_LICENSE=${LICENSE} ENTRYPOINT_DIR=. sh ./entrypoint.sh" - + cd $LICENSE pnpm dev || error_exit "Failed to start development server." fi diff --git a/hosting/old/gcp/agenta-instance.tf b/hosting/gcp/agenta-instance.tf similarity index 100% rename from hosting/old/gcp/agenta-instance.tf rename to hosting/gcp/agenta-instance.tf diff --git a/hosting/old/gcp/credentials.json b/hosting/gcp/credentials.json similarity index 100% rename from hosting/old/gcp/credentials.json rename to hosting/gcp/credentials.json diff --git a/hosting/old/gcp/main.tf b/hosting/gcp/main.tf similarity index 100% rename from hosting/old/gcp/main.tf rename to hosting/gcp/main.tf diff --git a/sdk/README.md b/sdk/README.md index d07ac59e52..845120c2d1 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -2,12 +2,11 @@ <p align="center"> <a href="https://agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme"> <picture > - <source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/97e31bfc-b1fc-4d19-b443-5aedf6029017" > - <source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/fdc5f23f-2095-4cfc-9511-14c6851c1262" > + <source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/Agenta-AI/agenta/assets/4510758/cdddf5ad-2352-4920-b1d9-ae7f8d9d7735" > + <source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/Agenta-AI/agenta/assets/4510758/ab75cbac-b807-496f-aab3-57463a33f726" > <img alt="Shows the logo of agenta" src="https://github.com/Agenta-AI/agenta/assets/4510758/68e055d4-d7b8-4943-992f-761558c64253" > </picture> </a> - <div align="center"> <strong> <h1> The Open-source LLMOps Platform </h1></strong> Build reliable LLM applications faster with integrated prompt management, evaluation, and observability. @@ -51,7 +50,7 @@ </p> <p align="center"> - <a href="https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw"> + <a href="https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ"> <img src="https://img.shields.io/badge/JOIN US ON SLACK-4A154B?style=for-the-badge&logo=slack&logoColor=white" /> </a> <a href="https://www.linkedin.com/company/agenta-ai/"> @@ -84,15 +83,15 @@ Agenta is a platform for building production-grade LLM applications. It helps ** Collaborate with Subject Matter Experts (SMEs) on prompt engineering and make sure nothing breaks in production. - **Interactive Playground**: Compare prompts side by side against your test cases -- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://docs.agenta.ai/prompt-engineering/playground/custom-providers?utm_source=github&utm_medium=referral&utm_campaign=readme) +- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://docs.agenta.ai/prompt-engineering/playground/adding-custom-providers?utm_source=github&utm_medium=referral&utm_campaign=readme) - **Version Control**: Version prompts and configurations with branching and environments - **Complex Configurations**: Enable SMEs to collaborate on [complex configuration schemas](https://docs.agenta.ai/custom-workflows/overview?utm_source=github&utm_medium=referral&utm_campaign=readme) beyond simple prompts -[Explore prompt management →](https://docs.agenta.ai/prompt-engineering/concepts?utm_source=github&utm_medium=referral&utm_campaign=readme) +[Explore prompt management →](https://docs.agenta.ai/prompt-engineering/overview?utm_source=github&utm_medium=referral&utm_campaign=readme) ### 📊 Evaluation & Testing Evaluate your LLM applications systematically with both human and automated feedback. -- **Flexible Testsets**: Create testcases from production data, playground experiments, or upload CSVs +- **Flexible Test Sets**: Create test cases from production data, playground experiments, or upload CSVs - **Pre-built and Custom Evaluators**: Use LLM-as-judge, one of our 20+ pre-built evaluators, or you custom evaluators - **UI and API Access**: Run evaluations via UI (for SMEs) or programmatically (for engineers) - **Human Feedback Integration**: Collect and incorporate expert annotations @@ -141,7 +140,7 @@ git clone https://github.com/Agenta-AI/agenta && cd agenta 2. Start Agenta services: ```bash -docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web --profile with-traefik up -d +docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d ``` 3. Access Agenta at `http://localhost`. @@ -156,7 +155,7 @@ Find help, explore resources, or get involved: - **📚 [Documentation](https://docs.agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Full guides and API reference - **📋 [Changelog](https://docs.agenta.ai/changelog/main?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Track recent updates -- **💬 [Slack Community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw)** – Ask questions and get support +- **💬 [Slack Community](https://join.slack.com/t/agenta-hq/shared_invite/zt-2yewk6o2b-DmhyA4h_lkKwecDtIsj1AQ)** – Ask questions and get support ### 🤝 Contribute @@ -182,7 +181,7 @@ We welcome contributions of all kinds — from filing issues and sharing ideas t ## Contributors ✨ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> -[![All Contributors](https://img.shields.io/badge/all_contributors-50-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END --> Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): diff --git a/sdk/__init__.py b/sdk/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/__init__.py b/sdk/agenta/__init__.py index a85ac5093f..cdf7f6f0a7 100644 --- a/sdk/agenta/__init__.py +++ b/sdk/agenta/__init__.py @@ -2,7 +2,6 @@ from .sdk.utils.preinit import PreInitObject -from agenta.client import AgentaApi, AsyncAgentaApi import agenta.client.backend.types as client_types # pylint: disable=wrong-import-order from .sdk.types import ( @@ -21,19 +20,13 @@ PromptTemplate, ) -from .sdk.agenta_init import Config, AgentaSingleton, init as _init from .sdk.utils.logging import get_module_logger -from .sdk.utils.costs import calculate_token_usage from .sdk.tracing import Tracing, get_tracer -from .sdk.tracing.conventions import Reference from .sdk.decorators.tracing import instrument -from .sdk.decorators.running import ( - workflow, - application, - evaluator, -) -from .sdk.decorators.serving import route, app -from .sdk.context.running import workflow_mode_enabled +from .sdk.tracing.conventions import Reference +from .sdk.decorators.routing import entrypoint, app, route +from .sdk.agenta_init import Config, AgentaSingleton, init as _init +from .sdk.utils.costs import calculate_token_usage from .sdk.litellm import litellm as callbacks from .sdk.managers.apps import AppManager from .sdk.managers.vault import VaultManager @@ -44,17 +37,13 @@ from .sdk import assets as assets from .sdk import tracer -# evaluations -from .sdk import testsets as testsets - - config = PreInitObject("agenta.config", Config) DEFAULT_AGENTA_SINGLETON_INSTANCE = AgentaSingleton() types = client_types -api = AgentaApi -async_api = AsyncAgentaApi +api = None +async_api = None tracing = DEFAULT_AGENTA_SINGLETON_INSTANCE.tracing # type: ignore tracer = get_tracer(tracing) @@ -62,7 +51,6 @@ def init( host: Optional[str] = None, - api_url: Optional[str] = None, api_key: Optional[str] = None, config_fname: Optional[str] = None, redact: Optional[Callable[..., Any]] = None, @@ -74,7 +62,6 @@ def init( _init( host=host, - api_url=api_url, api_key=api_key, config_fname=config_fname, redact=redact, diff --git a/sdk/agenta/client/Readme.md b/sdk/agenta/client/Readme.md index fac3ed89e5..1e7a7577db 100644 --- a/sdk/agenta/client/Readme.md +++ b/sdk/agenta/client/Readme.md @@ -1,282 +1,104 @@ -# Common Fern Issues with Pydantic Models +Client code to communicate with the backend. -When using Fern to generate SDKs from FastAPI applications with Pydantic models, you may encounter several issues related to model naming conflicts, schema generation, and recursive type definitions. This document outlines the most common problems and their solutions. +Currently the models are manually copied from the backend code. This needs to change. -## Issue 1: Model Name Conflicts +# Generate Backend -### Problem Description +To generate the client code using Fern, follow the steps below. -When you have multiple Pydantic models with the same name across different modules/folders and are used by different endpoints, Fern merges them into a single schema, causing field conflicts and unexpected behaviour. - -**Example:** -```python -# users/models.py -class User(BaseModel): - id: int - username: str - email: str - -# admin_users/models.py -class User(BaseModel): - id: int - username: str - permissions: List[str] - is_admin: bool +1. Open a Terminal and navigate to the folder where this Readme.md file is. For example; +```bash +cd agenta/sdk/agenta/client ``` -Fern will merge these into one `User` schema, and when you run the `fern generate` command, it results in an error that involves conflicting field definitions. - -### Solutions - -#### Solution 1: Use Unique Model Names - -Rename your models to be more specific and avoid conflicts: - -```python -# users/models.py -class RegularUser(BaseModel): - id: int - username: str - email: str - -# admin_users/models.py -class AdminUser(BaseModel): - id: int - username: str - permissions: List[str] - is_admin: bool +2. Next ensure you have installed Fern by executing the command; +```bash +npm install -g fern-api ``` -#### Solution 2: Use Pydantic's `model_config` with Custom Titles - -Override the schema title to make models unique: - -```python -# users/models.py -class User(BaseModel): - model_config = ConfigDict(title="RegularUser") - - id: int - username: str - email: str - -# admin_users/models.py -class User(BaseModel): - model_config = ConfigDict(title="AdminUser") - - id: int - username: str - permissions: List[str] - is_admin: bool +3. Execute this command to initialize Fern to import and use the OpenAPI spec; + +> To use an OpenAPI spec, you can pass in the filepath or URL. +> We'll need to log in to use fern. +> We'll be using a url to the openapi.json for [Agenta Cloud](https://cloud.agenta.ai). +> Alternatively, for `cloud-dev` we could use [Cloud Local](http://localhost). + +```bash +fern init --openapi https://cloud.agenta.ai/api/openapi.json +# fern init --openapi http://localhost/api/openapi.json +``` + +4. Add the Fern Python SDK; +```bash +fern add fern-python-sdk ``` -#### Solution 3: Use Module-Prefixed Aliases - -Create type aliases that include module context: - -```python -# users/models.py -class User(BaseModel): - id: int - username: str - email: str - -# Create an alias for external use -UserModel = User - -# admin_users/models.py -class User(BaseModel): - id: int - username: str - permissions: List[str] - is_admin: bool - -# Create an alias for external use -AdminUserModel = User +5. Go to the generators.yml, which would look like this; +```yaml +default-group: local +groups: + local: + generators: + - name: fernapi/fern-typescript-node-sdk + version: 0.9.5 + output: + location: local-file-system + path: ../sdks/typescript + - name: fernapi/fern-python-sdk + version: 0.6.0 ``` -Then use the aliases in your endpoints: - -```python -from users.models import UserModel -from admin_users.models import AdminUserModel - -@app.get("/users/{user_id}", response_model=UserModel) -async def get_user(user_id: int): - # ... - -@app.get("/admin/users/{user_id}", response_model=AdminUserModel) -async def get_admin_user(user_id: int): - # ... +6. Remove `fernapi/fern-typescript-node-sdk`; +```yaml +default-group: local +groups: + local: + generators: + - name: fernapi/fern-python-sdk + version: 3.10.6 ``` -## Issue 2: Enum Schema Generation - -### Problem Description - -When multiple Pydantic models reference the same Enum, Fern doesn't create a shared enum schema and instead inlines the enum values in each model, leading to code duplication and inconsistency. - -**Example:** -```python -class Status(Enum): - ACTIVE = "active" - INACTIVE = "inactive" - PENDING = "pending" - -class User(BaseModel): - id: int - status: Status - -class Order(BaseModel): - id: int - status: Status # Same enum, but Fern will not reuse the schema +7. Update `fernapi/fern-python-sdk`, which would look like this; +```yaml +default-group: local +groups: + local: + generators: + - name: fernapi/fern-python-sdk + version: 3.10.6 + output: + location: local-file-system + path: ./ ``` +<img width="1001" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/f537691d-8dbb-4363-b7c0-ecef9f464053"> -### Solutions -#### Solution 1: Explicit Schema Registration +8. Go to the fern.config.json file and change the value of "organization" to `agenta` +<img width="593" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/0f44255e-50b5-4d78-863b-d33a3ec2eea0"> -Force Pydantic to generate a proper schema reference by using the enum in a standalone model first: - -```python -from enum import Enum -from typing import Union -from pydantic import BaseModel - -class Status(str, Enum): - ACTIVE = "active" - INACTIVE = "inactive" - PENDING = "pending" - -# Create a dedicated schema model -class StatusSchema(BaseModel): - status: Status - -class User(BaseModel): - id: int - status: Status - -class Order(BaseModel): - id: int - status: Status + +9. Generate the client code +```bash + fern generate ``` -#### Solution 2: Use Field with Schema Customization - -Customize the field schema to ensure proper enum handling: - +10. Go to `./containers/client.py`, search for the `build_image` function in the AgentaApi class and update `timeout_in_seconds` to `600` in `request_options'. It should now look like this; ```python -from pydantic import BaseModel, Field -from enum import Enum - -class Status(str, Enum): - ACTIVE = "active" - INACTIVE = "inactive" - PENDING = "pending" - -class User(BaseModel): - id: int - status: Status = Field( - ..., - json_schema_extra={ - "$ref": "#/components/schemas/Status" - } - ) - -class Order(BaseModel): - id: int - status: Status = Field( - ..., - json_schema_extra={ - "$ref": "#/components/schemas/Status" - } - ) -``` - -## Issue 3: Recursive Type Definitions - -### Problem Description - -When using recursive type definitions with Pydantic v2 and Fern-generated SDKs, you may encounter infinite recursion during schema generation. This happens particularly with self-referential or mutually recursive types, such as JSON structures that can contain nested versions of themselves. - -**Example of problematic recursive type definitions:** - -```python -from typing_extensions import TypeAliasType -from typing import Union, Dict, List - -# This approach causes infinite recursion during schema generation -OTelJson: TypeAliasType = TypeAliasType( - "OTelJson", - Union[str, int, float, bool, None, Dict[str, "OTelJson"], List["OTelJson"]], -) - -OTelNumericJson: TypeAliasType = TypeAliasType( - "OTelNumericJson", - Union[int, float, Dict[str, "OTelNumericJson"], List["OTelNumericJson"]], +_response = self._client_wrapper.httpx_client.request( + "containers/build_image", + method="POST", + params={ + "app_id": app_id, + "base_name": base_name, + }, + data={}, + files={ + "tar_file": tar_file, + }, + request_options={**request_options, "timeout_in_seconds": 600}, + omit=OMIT, ) ``` +<img width="995" alt="image" src="https://github.com/Agenta-AI/agenta/assets/56418363/8fab19e3-5226-405b-8a6f-4dcb6df588c9"> -Despite `TypeAliasType` being recommended in Pydantic v2 documentation for recursive types, it doesn't work well with Fern-generated models because: - -1. Fern's model generation may not properly handle these recursive references -2. During schema generation, Pydantic attempts to expand these types infinitely -3. Runtime errors occur during initialization or when creating JSON schemas - -### Solutions - -#### Solution: Break Recursion with `Any` Type - -Replace recursive self-references with `Any` for dictionary values and list items: - -```python -from typing import Any, Union, Dict, List - -# Safe non-recursive version that prevents schema generation issues -OTelJson = Union[str, int, float, bool, None, Dict[str, Any], List[Any]] - -# Using Any to break recursion cycle during schema generation -OTelNumericJson = Union[int, float, Dict[str, Any], List[Any]] -``` - -#### Why This Works - -1. **Breaks the recursion cycle**: Using `Any` eliminates the self-reference that causes infinite recursion -2. **Maintains functionality**: The types still functionally represent nested JSON structures -3. **No schema generation issues**: Pydantic can generate schemas without infinite expansion -4. **Simple implementation**: Requires no complex patches or runtime modifications - -#### What to Avoid - -1. **Don't use complex monkey patching**: Patching Pydantic internals to handle recursion is fragile -2. **Avoid disabling schema generation globally**: This impacts all models and API documentation -3. **Don't use custom serialization for every model**: Introduces unnecessary complexity - -When Fern generates your SDK, always check for recursive type definitions and convert them to use `Any` at appropriate recursion points to prevent these issues. - - -## Troubleshooting - -### Debug Schema Generation - -Add debugging to see what schemas are being generated: - -```python -import json -from your_app import app - -# Generate and inspect OpenAPI schema -schema = app.openapi() -with open("debug_openapi.json", "w") as f: - json.dump(schema, f, indent=2) - -# Check for duplicate schemas -schemas = schema.get("components", {}).get("schemas", {}) -print("Generated schemas:", list(schemas.keys())) -``` - -### Common Error Patterns - -1. **"Schema conflict"** - Usually indicates duplicate model names -2. **"Enum already exists"** - Enum not properly registered in other components/schemas -3. **"Field type mismatch"** - Different models with same name have conflicting fields +11. Delete the `./fern` folder. diff --git a/sdk/agenta/client/__init__.py b/sdk/agenta/client/__init__.py index 2c1a34d94e..7b7da0dbab 100644 --- a/sdk/agenta/client/__init__.py +++ b/sdk/agenta/client/__init__.py @@ -1,16 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -# Apply Pydantic recursion patch before any models are imported -try: - # This will prevent recursion errors during schema generation - from .backend.pydantic_patch import patch_pydantic_recursion -except ImportError: - pass - from .backend.types import ( - AccountRequest, AccountResponse, AgentaNodeDto, + AgentaNodeDtoNodesValue, AgentaNodesResponse, AgentaRootDto, AgentaRootsResponse, @@ -19,25 +12,10 @@ AggregatedResult, AggregatedResultEvaluatorConfig, AnalyticsResponse, - Annotation, - AnnotationCreate, - AnnotationEdit, - AnnotationKind, - AnnotationLink, - AnnotationLinkResponse, - AnnotationQuery, - AnnotationQueryRequest, - AnnotationReference, - AnnotationReferences, - AnnotationResponse, - AnnotationSource, - AnnotationsResponse, App, AppVariantResponse, AppVariantRevision, - Artifact, BaseOutput, - BodyFetchWorkflowRevision, BodyImportTestset, BucketDto, CollectStatusResponse, @@ -46,12 +24,8 @@ ConfigResponseModel, CorrectAnswer, CreateAppOutput, - CustomModelSettingsDto, - CustomProviderDto, - CustomProviderKind, - CustomProviderSettingsDto, - Data, DeleteEvaluation, + DockerEnvVars, EnvironmentOutput, EnvironmentOutputExtended, EnvironmentRevision, @@ -65,80 +39,46 @@ EvaluationType, Evaluator, EvaluatorConfig, - EvaluatorFlags, EvaluatorMappingOutputInterface, EvaluatorOutputInterface, - EvaluatorQuery, - EvaluatorQueryRequest, - EvaluatorRequest, - EvaluatorResponse, - EvaluatorsResponse, ExceptionDto, - Focus, - Format, - FullJsonInput, - FullJsonOutput, GetConfigResponse, - Header, + HeaderDto, HttpValidationError, HumanEvaluation, HumanEvaluationScenario, HumanEvaluationScenarioInput, HumanEvaluationScenarioOutput, + Image, InviteRequest, LegacyAnalyticsResponse, LegacyDataPoint, - LegacyEvaluator, LegacyScopeRequest, LegacyScopesResponse, - LegacySubscriptionRequest, LegacyUserRequest, LegacyUserResponse, LifecycleDto, LinkDto, ListApiKeysResponse, LlmRunRateLimit, - MetaRequest, MetricsDto, NewTestset, NodeDto, NodeType, OTelContextDto, - OTelEvent, OTelEventDto, OTelExtraDto, - OTelFlatSpan, - OTelFlatSpanInputEndTime, - OTelFlatSpanInputStartTime, - OTelFlatSpanOutputEndTime, - OTelFlatSpanOutputStartTime, - OTelLink, OTelLinkDto, - OTelLinksResponse, - OTelSpan, OTelSpanDto, - OTelSpanInputEndTime, - OTelSpanInputSpansValue, - OTelSpanInputStartTime, OTelSpanKind, - OTelSpanOutputEndTime, - OTelSpanOutputSpansValue, - OTelSpanOutputStartTime, - OTelSpansTree, - OTelSpansTreeInputSpansValue, - OTelSpansTreeOutputSpansValue, + OTelSpansResponse, OTelStatusCode, - OTelTracingDataResponse, - OTelTracingRequest, - OTelTracingResponse, Organization, - OrganizationDetails, OrganizationMembershipRequest, OrganizationOutput, OrganizationRequest, ParentDto, Permission, - Plan, ProjectMembershipRequest, ProjectRequest, ProjectScope, @@ -155,96 +95,61 @@ SecretKind, SecretResponseDto, SimpleEvaluationOutput, - StandardProviderDto, - StandardProviderKind, - StandardProviderSettingsDto, + SpanDto, + SpanDtoNodesValue, StatusCode, StatusDto, - TestsetOutputResponse, - TestsetSimpleResponse, - TestcaseResponse, - Testset, - TestsetRequest, - TestsetResponse, - TestsetsResponse, + Template, + TemplateImageInfo, + TestSetOutputResponse, + TestSetSimpleResponse, TimeDto, - Timestamp, TreeDto, TreeType, UpdateAppOutput, + Uri, UserRequest, ValidationError, ValidationErrorLocItem, - WorkflowArtifact, - WorkflowData, - WorkflowFlags, - WorkflowRequest, - WorkflowResponse, - WorkflowRevision, - WorkflowRevisionRequest, - WorkflowRevisionResponse, - WorkflowRevisionsResponse, - WorkflowVariant, - WorkflowVariantRequest, - WorkflowVariantResponse, - WorkflowVariantsResponse, - WorkflowsResponse, - Workspace, + VariantAction, + VariantActionEnum, WorkspaceMemberResponse, WorkspaceMembershipRequest, WorkspacePermission, WorkspaceRequest, WorkspaceResponse, WorkspaceRole, + WorkspaceRoleResponse, ) from .backend.errors import UnprocessableEntityError from .backend import ( access_control, admin, - api_keys, apps, bases, - billing, configs, containers, environments, - evals, evaluations, evaluators, human_evaluations, observability, - organization, scopes, testsets, - tracing, variants, vault, - workflows, - workspace, ) from .client import AgentaApi, AsyncAgentaApi -from .backend.environment import AgentaApiEnvironment -from .backend.observability import ( - FetchTraceByIdRequestTraceId, - FetchTraceByIdResponse, - QueryAnalyticsResponse, - QueryTracesResponse, -) -from .backend.testsets import ( - CreateTestsetFromFileRequestFileType, - FetchTestsetToFileRequestFileType, - UpdateTestsetFromFileRequestFileType, -) -from .backend.tracing import FetchTraceRequestTraceId, RemoveTraceRequestTraceId +from .backend.containers import ContainerTemplatesResponse +from .backend.observability import Format, QueryAnalyticsResponse, QueryTracesResponse from .backend.variants import AddVariantFromBaseAndConfigResponse __all__ = [ - "AccountRequest", "AccountResponse", "AddVariantFromBaseAndConfigResponse", "AgentaApi", - "AgentaApiEnvironment", "AgentaNodeDto", + "AgentaNodeDtoNodesValue", "AgentaNodesResponse", "AgentaRootDto", "AgentaRootsResponse", @@ -253,41 +158,22 @@ "AggregatedResult", "AggregatedResultEvaluatorConfig", "AnalyticsResponse", - "Annotation", - "AnnotationCreate", - "AnnotationEdit", - "AnnotationKind", - "AnnotationLink", - "AnnotationLinkResponse", - "AnnotationQuery", - "AnnotationQueryRequest", - "AnnotationReference", - "AnnotationReferences", - "AnnotationResponse", - "AnnotationSource", - "AnnotationsResponse", "App", "AppVariantResponse", "AppVariantRevision", - "Artifact", "AsyncAgentaApi", "BaseOutput", - "BodyFetchWorkflowRevision", "BodyImportTestset", "BucketDto", "CollectStatusResponse", "ConfigDb", "ConfigDto", "ConfigResponseModel", + "ContainerTemplatesResponse", "CorrectAnswer", "CreateAppOutput", - "CreateTestsetFromFileRequestFileType", - "CustomModelSettingsDto", - "CustomProviderDto", - "CustomProviderKind", - "CustomProviderSettingsDto", - "Data", "DeleteEvaluation", + "DockerEnvVars", "EnvironmentOutput", "EnvironmentOutputExtended", "EnvironmentRevision", @@ -301,84 +187,47 @@ "EvaluationType", "Evaluator", "EvaluatorConfig", - "EvaluatorFlags", "EvaluatorMappingOutputInterface", "EvaluatorOutputInterface", - "EvaluatorQuery", - "EvaluatorQueryRequest", - "EvaluatorRequest", - "EvaluatorResponse", - "EvaluatorsResponse", "ExceptionDto", - "FetchTestsetToFileRequestFileType", - "FetchTraceByIdRequestTraceId", - "FetchTraceByIdResponse", - "FetchTraceRequestTraceId", - "Focus", "Format", - "FullJsonInput", - "FullJsonOutput", "GetConfigResponse", - "Header", + "HeaderDto", "HttpValidationError", "HumanEvaluation", "HumanEvaluationScenario", "HumanEvaluationScenarioInput", "HumanEvaluationScenarioOutput", + "Image", "InviteRequest", "LegacyAnalyticsResponse", "LegacyDataPoint", - "LegacyEvaluator", "LegacyScopeRequest", "LegacyScopesResponse", - "LegacySubscriptionRequest", "LegacyUserRequest", "LegacyUserResponse", "LifecycleDto", "LinkDto", "ListApiKeysResponse", "LlmRunRateLimit", - "MetaRequest", "MetricsDto", "NewTestset", "NodeDto", "NodeType", "OTelContextDto", - "OTelEvent", "OTelEventDto", "OTelExtraDto", - "OTelFlatSpan", - "OTelFlatSpanInputEndTime", - "OTelFlatSpanInputStartTime", - "OTelFlatSpanOutputEndTime", - "OTelFlatSpanOutputStartTime", - "OTelLink", "OTelLinkDto", - "OTelLinksResponse", - "OTelSpan", "OTelSpanDto", - "OTelSpanInputEndTime", - "OTelSpanInputSpansValue", - "OTelSpanInputStartTime", "OTelSpanKind", - "OTelSpanOutputEndTime", - "OTelSpanOutputSpansValue", - "OTelSpanOutputStartTime", - "OTelSpansTree", - "OTelSpansTreeInputSpansValue", - "OTelSpansTreeOutputSpansValue", + "OTelSpansResponse", "OTelStatusCode", - "OTelTracingDataResponse", - "OTelTracingRequest", - "OTelTracingResponse", "Organization", - "OrganizationDetails", "OrganizationMembershipRequest", "OrganizationOutput", "OrganizationRequest", "ParentDto", "Permission", - "Plan", "ProjectMembershipRequest", "ProjectRequest", "ProjectScope", @@ -388,7 +237,6 @@ "Reference", "ReferenceDto", "ReferenceRequestModel", - "RemoveTraceRequestTraceId", "Result", "Role", "RootDto", @@ -398,69 +246,45 @@ "SecretKind", "SecretResponseDto", "SimpleEvaluationOutput", - "StandardProviderDto", - "StandardProviderKind", - "StandardProviderSettingsDto", + "SpanDto", + "SpanDtoNodesValue", "StatusCode", "StatusDto", - "TestsetOutputResponse", - "TestsetSimpleResponse", - "TestcaseResponse", - "Testset", - "TestsetRequest", - "TestsetResponse", - "TestsetsResponse", + "Template", + "TemplateImageInfo", + "TestSetOutputResponse", + "TestSetSimpleResponse", "TimeDto", - "Timestamp", "TreeDto", "TreeType", "UnprocessableEntityError", "UpdateAppOutput", - "UpdateTestsetFromFileRequestFileType", + "Uri", "UserRequest", "ValidationError", "ValidationErrorLocItem", - "WorkflowArtifact", - "WorkflowData", - "WorkflowFlags", - "WorkflowRequest", - "WorkflowResponse", - "WorkflowRevision", - "WorkflowRevisionRequest", - "WorkflowRevisionResponse", - "WorkflowRevisionsResponse", - "WorkflowVariant", - "WorkflowVariantRequest", - "WorkflowVariantResponse", - "WorkflowVariantsResponse", - "WorkflowsResponse", - "Workspace", + "VariantAction", + "VariantActionEnum", "WorkspaceMemberResponse", "WorkspaceMembershipRequest", "WorkspacePermission", "WorkspaceRequest", "WorkspaceResponse", "WorkspaceRole", + "WorkspaceRoleResponse", "access_control", "admin", - "api_keys", "apps", "bases", - "billing", "configs", "containers", "environments", - "evals", "evaluations", "evaluators", "human_evaluations", "observability", - "organization", "scopes", "testsets", - "tracing", "variants", "vault", - "workflows", - "workspace", ] diff --git a/sdk/agenta/client/backend/__init__.py b/sdk/agenta/client/backend/__init__.py deleted file mode 100644 index 0b53630f3c..0000000000 --- a/sdk/agenta/client/backend/__init__.py +++ /dev/null @@ -1,461 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .types import ( - AccountRequest, - AccountResponse, - AgentaNodeDto, - AgentaNodesResponse, - AgentaRootDto, - AgentaRootsResponse, - AgentaTreeDto, - AgentaTreesResponse, - AggregatedResult, - AggregatedResultEvaluatorConfig, - AnalyticsResponse, - Annotation, - AnnotationCreate, - AnnotationEdit, - AnnotationKind, - AnnotationLink, - AnnotationLinkResponse, - AnnotationQuery, - AnnotationQueryRequest, - AnnotationReference, - AnnotationReferences, - AnnotationResponse, - AnnotationSource, - AnnotationsResponse, - App, - AppVariantResponse, - AppVariantRevision, - Artifact, - BaseOutput, - BodyFetchWorkflowRevision, - BodyImportTestset, - BucketDto, - CollectStatusResponse, - ConfigDb, - ConfigDto, - ConfigResponseModel, - CorrectAnswer, - CreateAppOutput, - CustomModelSettingsDto, - CustomProviderDto, - CustomProviderKind, - CustomProviderSettingsDto, - Data, - DeleteEvaluation, - EnvironmentOutput, - EnvironmentOutputExtended, - EnvironmentRevision, - Error, - Evaluation, - EvaluationScenario, - EvaluationScenarioInput, - EvaluationScenarioOutput, - EvaluationScenarioResult, - EvaluationStatusEnum, - EvaluationType, - Evaluator, - EvaluatorConfig, - EvaluatorFlags, - EvaluatorMappingOutputInterface, - EvaluatorOutputInterface, - EvaluatorQuery, - EvaluatorQueryRequest, - EvaluatorRequest, - EvaluatorResponse, - EvaluatorsResponse, - ExceptionDto, - Focus, - Format, - FullJsonInput, - FullJsonOutput, - GetConfigResponse, - Header, - HttpValidationError, - HumanEvaluation, - HumanEvaluationScenario, - HumanEvaluationScenarioInput, - HumanEvaluationScenarioOutput, - InviteRequest, - LegacyAnalyticsResponse, - LegacyDataPoint, - LegacyEvaluator, - LegacyScopeRequest, - LegacyScopesResponse, - LegacySubscriptionRequest, - LegacyUserRequest, - LegacyUserResponse, - LifecycleDto, - LinkDto, - ListApiKeysResponse, - LlmRunRateLimit, - MetaRequest, - MetricsDto, - NewTestset, - NodeDto, - NodeType, - OTelContextDto, - OTelEvent, - OTelEventDto, - OTelExtraDto, - OTelFlatSpan, - OTelFlatSpanInputEndTime, - OTelFlatSpanInputStartTime, - OTelFlatSpanOutputEndTime, - OTelFlatSpanOutputStartTime, - OTelLink, - OTelLinkDto, - OTelLinksResponse, - OTelSpan, - OTelSpanDto, - OTelSpanInputEndTime, - OTelSpanInputSpansValue, - OTelSpanInputStartTime, - OTelSpanKind, - OTelSpanOutputEndTime, - OTelSpanOutputSpansValue, - OTelSpanOutputStartTime, - OTelSpansTree, - OTelSpansTreeInputSpansValue, - OTelSpansTreeOutputSpansValue, - OTelStatusCode, - OTelTracingDataResponse, - OTelTracingRequest, - OTelTracingResponse, - Organization, - OrganizationDetails, - OrganizationMembershipRequest, - OrganizationOutput, - OrganizationRequest, - ParentDto, - Permission, - Plan, - ProjectMembershipRequest, - ProjectRequest, - ProjectScope, - ProjectsResponse, - Reference, - ReferenceDto, - ReferenceRequestModel, - Result, - Role, - RootDto, - ScopesResponseModel, - Score, - SecretDto, - SecretKind, - SecretResponseDto, - SimpleEvaluationOutput, - StandardProviderDto, - StandardProviderKind, - StandardProviderSettingsDto, - StatusCode, - StatusDto, - TestsetOutputResponse, - TestsetSimpleResponse, - TestcaseResponse, - Testset, - TestsetRequest, - TestsetResponse, - TestsetsResponse, - TimeDto, - Timestamp, - TreeDto, - TreeType, - UpdateAppOutput, - UserRequest, - ValidationError, - ValidationErrorLocItem, - WorkflowArtifact, - WorkflowData, - WorkflowFlags, - WorkflowRequest, - WorkflowResponse, - WorkflowRevision, - WorkflowRevisionRequest, - WorkflowRevisionResponse, - WorkflowRevisionsResponse, - WorkflowVariant, - WorkflowVariantRequest, - WorkflowVariantResponse, - WorkflowVariantsResponse, - WorkflowsResponse, - Workspace, - WorkspaceMemberResponse, - WorkspaceMembershipRequest, - WorkspacePermission, - WorkspaceRequest, - WorkspaceResponse, - WorkspaceRole, -) -from .errors import UnprocessableEntityError -from . import ( - access_control, - admin, - api_keys, - apps, - bases, - billing, - configs, - containers, - environments, - evals, - evaluations, - evaluators, - human_evaluations, - observability, - organization, - scopes, - testsets, - tracing, - variants, - vault, - workflows, - workspace, -) -from .client import AgentaApi, AsyncAgentaApi -from .environment import AgentaApiEnvironment -from .observability import ( - FetchTraceByIdRequestTraceId, - FetchTraceByIdResponse, - QueryAnalyticsResponse, - QueryTracesResponse, -) -from .testsets import ( - CreateTestsetFromFileRequestFileType, - FetchTestsetToFileRequestFileType, - UpdateTestsetFromFileRequestFileType, -) -from .tracing import FetchTraceRequestTraceId, RemoveTraceRequestTraceId -from .variants import AddVariantFromBaseAndConfigResponse - -__all__ = [ - "AccountRequest", - "AccountResponse", - "AddVariantFromBaseAndConfigResponse", - "AgentaApi", - "AgentaApiEnvironment", - "AgentaNodeDto", - "AgentaNodesResponse", - "AgentaRootDto", - "AgentaRootsResponse", - "AgentaTreeDto", - "AgentaTreesResponse", - "AggregatedResult", - "AggregatedResultEvaluatorConfig", - "AnalyticsResponse", - "Annotation", - "AnnotationCreate", - "AnnotationEdit", - "AnnotationKind", - "AnnotationLink", - "AnnotationLinkResponse", - "AnnotationQuery", - "AnnotationQueryRequest", - "AnnotationReference", - "AnnotationReferences", - "AnnotationResponse", - "AnnotationSource", - "AnnotationsResponse", - "App", - "AppVariantResponse", - "AppVariantRevision", - "Artifact", - "AsyncAgentaApi", - "BaseOutput", - "BodyFetchWorkflowRevision", - "BodyImportTestset", - "BucketDto", - "CollectStatusResponse", - "ConfigDb", - "ConfigDto", - "ConfigResponseModel", - "CorrectAnswer", - "CreateAppOutput", - "CreateTestsetFromFileRequestFileType", - "CustomModelSettingsDto", - "CustomProviderDto", - "CustomProviderKind", - "CustomProviderSettingsDto", - "Data", - "DeleteEvaluation", - "EnvironmentOutput", - "EnvironmentOutputExtended", - "EnvironmentRevision", - "Error", - "Evaluation", - "EvaluationScenario", - "EvaluationScenarioInput", - "EvaluationScenarioOutput", - "EvaluationScenarioResult", - "EvaluationStatusEnum", - "EvaluationType", - "Evaluator", - "EvaluatorConfig", - "EvaluatorFlags", - "EvaluatorMappingOutputInterface", - "EvaluatorOutputInterface", - "EvaluatorQuery", - "EvaluatorQueryRequest", - "EvaluatorRequest", - "EvaluatorResponse", - "EvaluatorsResponse", - "ExceptionDto", - "FetchTestsetToFileRequestFileType", - "FetchTraceByIdRequestTraceId", - "FetchTraceByIdResponse", - "FetchTraceRequestTraceId", - "Focus", - "Format", - "FullJsonInput", - "FullJsonOutput", - "GetConfigResponse", - "Header", - "HttpValidationError", - "HumanEvaluation", - "HumanEvaluationScenario", - "HumanEvaluationScenarioInput", - "HumanEvaluationScenarioOutput", - "InviteRequest", - "LegacyAnalyticsResponse", - "LegacyDataPoint", - "LegacyEvaluator", - "LegacyScopeRequest", - "LegacyScopesResponse", - "LegacySubscriptionRequest", - "LegacyUserRequest", - "LegacyUserResponse", - "LifecycleDto", - "LinkDto", - "ListApiKeysResponse", - "LlmRunRateLimit", - "MetaRequest", - "MetricsDto", - "NewTestset", - "NodeDto", - "NodeType", - "OTelContextDto", - "OTelEvent", - "OTelEventDto", - "OTelExtraDto", - "OTelFlatSpan", - "OTelFlatSpanInputEndTime", - "OTelFlatSpanInputStartTime", - "OTelFlatSpanOutputEndTime", - "OTelFlatSpanOutputStartTime", - "OTelLink", - "OTelLinkDto", - "OTelLinksResponse", - "OTelSpan", - "OTelSpanDto", - "OTelSpanInputEndTime", - "OTelSpanInputSpansValue", - "OTelSpanInputStartTime", - "OTelSpanKind", - "OTelSpanOutputEndTime", - "OTelSpanOutputSpansValue", - "OTelSpanOutputStartTime", - "OTelSpansTree", - "OTelSpansTreeInputSpansValue", - "OTelSpansTreeOutputSpansValue", - "OTelStatusCode", - "OTelTracingDataResponse", - "OTelTracingRequest", - "OTelTracingResponse", - "Organization", - "OrganizationDetails", - "OrganizationMembershipRequest", - "OrganizationOutput", - "OrganizationRequest", - "ParentDto", - "Permission", - "Plan", - "ProjectMembershipRequest", - "ProjectRequest", - "ProjectScope", - "ProjectsResponse", - "QueryAnalyticsResponse", - "QueryTracesResponse", - "Reference", - "ReferenceDto", - "ReferenceRequestModel", - "RemoveTraceRequestTraceId", - "Result", - "Role", - "RootDto", - "ScopesResponseModel", - "Score", - "SecretDto", - "SecretKind", - "SecretResponseDto", - "SimpleEvaluationOutput", - "StandardProviderDto", - "StandardProviderKind", - "StandardProviderSettingsDto", - "StatusCode", - "StatusDto", - "TestsetOutputResponse", - "TestsetSimpleResponse", - "TestcaseResponse", - "Testset", - "TestsetRequest", - "TestsetResponse", - "TestsetsResponse", - "TimeDto", - "Timestamp", - "TreeDto", - "TreeType", - "UnprocessableEntityError", - "UpdateAppOutput", - "UpdateTestsetFromFileRequestFileType", - "UserRequest", - "ValidationError", - "ValidationErrorLocItem", - "WorkflowArtifact", - "WorkflowData", - "WorkflowFlags", - "WorkflowRequest", - "WorkflowResponse", - "WorkflowRevision", - "WorkflowRevisionRequest", - "WorkflowRevisionResponse", - "WorkflowRevisionsResponse", - "WorkflowVariant", - "WorkflowVariantRequest", - "WorkflowVariantResponse", - "WorkflowVariantsResponse", - "WorkflowsResponse", - "Workspace", - "WorkspaceMemberResponse", - "WorkspaceMembershipRequest", - "WorkspacePermission", - "WorkspaceRequest", - "WorkspaceResponse", - "WorkspaceRole", - "access_control", - "admin", - "api_keys", - "apps", - "bases", - "billing", - "configs", - "containers", - "environments", - "evals", - "evaluations", - "evaluators", - "human_evaluations", - "observability", - "organization", - "scopes", - "testsets", - "tracing", - "variants", - "vault", - "workflows", - "workspace", -] diff --git a/sdk/agenta/client/backend/access_control/__init__.py b/sdk/agenta/client/backend/access_control/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/access_control/__init__.py +++ b/sdk/agenta/client/backend/access_control/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/access_control/client.py b/sdk/agenta/client/backend/access_control/client.py index e2a4b0bc5f..0a23474e41 100644 --- a/sdk/agenta/client/backend/access_control/client.py +++ b/sdk/agenta/client/backend/access_control/client.py @@ -1,33 +1,24 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from .raw_client import AsyncRawAccessControlClient, RawAccessControlClient +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper class AccessControlClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawAccessControlClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawAccessControlClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawAccessControlClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def verify_permissions( self, *, action: typing.Optional[str] = None, - scope_type: typing.Optional[str] = None, - scope_id: typing.Optional[str] = None, resource_type: typing.Optional[str] = None, resource_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, @@ -37,10 +28,6 @@ def verify_permissions( ---------- action : typing.Optional[str] - scope_type : typing.Optional[str] - - scope_id : typing.Optional[str] - resource_type : typing.Optional[str] resource_id : typing.Optional[str] @@ -59,41 +46,53 @@ def verify_permissions( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.access_control.verify_permissions() """ - _response = self._raw_client.verify_permissions( - action=action, - scope_type=scope_type, - scope_id=scope_id, - resource_type=resource_type, - resource_id=resource_id, + _response = self._client_wrapper.httpx_client.request( + "permissions/verify", + method="GET", + params={ + "action": action, + "resource_type": resource_type, + "resource_id": resource_id, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncAccessControlClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawAccessControlClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawAccessControlClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawAccessControlClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def verify_permissions( self, *, action: typing.Optional[str] = None, - scope_type: typing.Optional[str] = None, - scope_id: typing.Optional[str] = None, resource_type: typing.Optional[str] = None, resource_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, @@ -103,10 +102,6 @@ async def verify_permissions( ---------- action : typing.Optional[str] - scope_type : typing.Optional[str] - - scope_id : typing.Optional[str] - resource_type : typing.Optional[str] resource_id : typing.Optional[str] @@ -127,6 +122,7 @@ async def verify_permissions( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -136,12 +132,36 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.verify_permissions( - action=action, - scope_type=scope_type, - scope_id=scope_id, - resource_type=resource_type, - resource_id=resource_id, + _response = await self._client_wrapper.httpx_client.request( + "permissions/verify", + method="GET", + params={ + "action": action, + "resource_type": resource_type, + "resource_id": resource_id, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/access_control/raw_client.py b/sdk/agenta/client/backend/access_control/raw_client.py deleted file mode 100644 index 52e57c2067..0000000000 --- a/sdk/agenta/client/backend/access_control/raw_client.py +++ /dev/null @@ -1,180 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError - - -class RawAccessControlClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def verify_permissions( - self, - *, - action: typing.Optional[str] = None, - scope_type: typing.Optional[str] = None, - scope_id: typing.Optional[str] = None, - resource_type: typing.Optional[str] = None, - resource_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - action : typing.Optional[str] - - scope_type : typing.Optional[str] - - scope_id : typing.Optional[str] - - resource_type : typing.Optional[str] - - resource_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "permissions/verify", - method="GET", - params={ - "action": action, - "scope_type": scope_type, - "scope_id": scope_id, - "resource_type": resource_type, - "resource_id": resource_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawAccessControlClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def verify_permissions( - self, - *, - action: typing.Optional[str] = None, - scope_type: typing.Optional[str] = None, - scope_id: typing.Optional[str] = None, - resource_type: typing.Optional[str] = None, - resource_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - action : typing.Optional[str] - - scope_type : typing.Optional[str] - - scope_id : typing.Optional[str] - - resource_type : typing.Optional[str] - - resource_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "permissions/verify", - method="GET", - params={ - "action": action, - "scope_type": scope_type, - "scope_id": scope_id, - "resource_type": resource_type, - "resource_id": resource_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/admin/__init__.py b/sdk/agenta/client/backend/admin/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/admin/__init__.py +++ b/sdk/agenta/client/backend/admin/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/admin/client.py b/sdk/agenta/client/backend/admin/client.py index 4748158fcf..859bba1d43 100644 --- a/sdk/agenta/client/backend/admin/client.py +++ b/sdk/agenta/client/backend/admin/client.py @@ -1,21 +1,26 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.account_request import AccountRequest -from ..types.account_response import AccountResponse -from ..types.organization_membership_request import OrganizationMembershipRequest +from ..core.client_wrapper import SyncClientWrapper +from ..types.user_request import UserRequest from ..types.organization_request import OrganizationRequest -from ..types.plan import Plan -from ..types.project_membership_request import ProjectMembershipRequest +from ..types.workspace_request import WorkspaceRequest from ..types.project_request import ProjectRequest -from ..types.scopes_response_model import ScopesResponseModel -from ..types.user_request import UserRequest +from ..types.organization_membership_request import OrganizationMembershipRequest from ..types.workspace_membership_request import WorkspaceMembershipRequest -from ..types.workspace_request import WorkspaceRequest -from .raw_client import AsyncRawAdminClient, RawAdminClient +from ..types.project_membership_request import ProjectMembershipRequest +from ..core.request_options import RequestOptions +from ..types.scopes_response_model import ScopesResponseModel +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.legacy_user_request import LegacyUserRequest +from ..types.legacy_scope_request import LegacyScopeRequest +from ..types.account_response import AccountResponse +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -23,18 +28,7 @@ class AdminClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawAdminClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawAdminClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawAdminClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def create_accounts( self, @@ -89,6 +83,7 @@ def create_accounts( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.admin.create_accounts( users={ @@ -147,247 +142,161 @@ def create_accounts( }, ) """ - _response = self._raw_client.create_accounts( - users=users, - organizations=organizations, - workspaces=workspaces, - projects=projects, - organization_memberships=organization_memberships, - workspace_memberships=workspace_memberships, - project_memberships=project_memberships, + _response = self._client_wrapper.httpx_client.request( + "admin/accounts", + method="POST", + json={ + "users": convert_and_respect_annotation_metadata( + object_=users, + annotation=typing.Dict[str, UserRequest], + direction="write", + ), + "organizations": convert_and_respect_annotation_metadata( + object_=organizations, + annotation=typing.Dict[str, OrganizationRequest], + direction="write", + ), + "workspaces": convert_and_respect_annotation_metadata( + object_=workspaces, + annotation=typing.Dict[str, WorkspaceRequest], + direction="write", + ), + "projects": convert_and_respect_annotation_metadata( + object_=projects, + annotation=typing.Dict[str, ProjectRequest], + direction="write", + ), + "organization_memberships": convert_and_respect_annotation_metadata( + object_=organization_memberships, + annotation=typing.Dict[str, OrganizationMembershipRequest], + direction="write", + ), + "workspace_memberships": convert_and_respect_annotation_metadata( + object_=workspace_memberships, + annotation=typing.Dict[str, WorkspaceMembershipRequest], + direction="write", + ), + "project_memberships": convert_and_respect_annotation_metadata( + object_=project_memberships, + annotation=typing.Dict[str, ProjectMembershipRequest], + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ScopesResponseModel, + parse_obj_as( + type_=ScopesResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_account( self, *, - request: typing.Optional[AccountRequest] = None, + user: LegacyUserRequest, + scope: LegacyScopeRequest, request_options: typing.Optional[RequestOptions] = None, ) -> AccountResponse: """ Parameters ---------- - request : typing.Optional[AccountRequest] + user : LegacyUserRequest - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AccountResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.admin.create_account() - """ - _response = self._raw_client.create_account( - request=request, request_options=request_options - ) - return _response.data - - def create_portal( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str + scope : LegacyScopeRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.admin.create_portal( - organization_id="organization_id", - ) - """ - _response = self._raw_client.create_portal( - organization_id=organization_id, request_options=request_options - ) - return _response.data - - def create_checkout( - self, - *, - organization_id: str, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] + AccountResponse Successful Response Examples -------- - from agenta import AgentaApi + from agenta import AgentaApi, LegacyScopeRequest, LegacyUserRequest client = AgentaApi( api_key="YOUR_API_KEY", - ) - client.admin.create_checkout( - organization_id="organization_id", - plan="cloud_v0_hobby", - success_url="success_url", - ) - """ - _response = self._raw_client.create_checkout( - organization_id=organization_id, - plan=plan, - success_url=success_url, + base_url="https://yourhost.com/path/to/api", + ) + client.admin.create_account( + user=LegacyUserRequest( + name="name", + email="email", + ), + scope=LegacyScopeRequest( + name="name", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "admin/account", + method="POST", + json={ + "user": convert_and_respect_annotation_metadata( + object_=user, annotation=LegacyUserRequest, direction="write" + ), + "scope": convert_and_respect_annotation_metadata( + object_=scope, annotation=LegacyScopeRequest, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data - - def switch_plans( - self, - *, - organization_id: str, - plan: Plan, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.admin.switch_plans( - organization_id="organization_id", - plan="cloud_v0_hobby", - ) - """ - _response = self._raw_client.switch_plans( - organization_id=organization_id, plan=plan, request_options=request_options - ) - return _response.data - - def cancel_subscription( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.admin.cancel_subscription( - organization_id="organization_id", - ) - """ - _response = self._raw_client.cancel_subscription( - organization_id=organization_id, request_options=request_options - ) - return _response.data - - def report_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.admin.report_usage() - """ - _response = self._raw_client.report_usage(request_options=request_options) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AccountResponse, + parse_obj_as( + type_=AccountResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncAdminClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawAdminClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawAdminClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawAdminClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def create_accounts( self, @@ -444,6 +353,7 @@ async def create_accounts( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -508,276 +418,161 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_accounts( - users=users, - organizations=organizations, - workspaces=workspaces, - projects=projects, - organization_memberships=organization_memberships, - workspace_memberships=workspace_memberships, - project_memberships=project_memberships, + _response = await self._client_wrapper.httpx_client.request( + "admin/accounts", + method="POST", + json={ + "users": convert_and_respect_annotation_metadata( + object_=users, + annotation=typing.Dict[str, UserRequest], + direction="write", + ), + "organizations": convert_and_respect_annotation_metadata( + object_=organizations, + annotation=typing.Dict[str, OrganizationRequest], + direction="write", + ), + "workspaces": convert_and_respect_annotation_metadata( + object_=workspaces, + annotation=typing.Dict[str, WorkspaceRequest], + direction="write", + ), + "projects": convert_and_respect_annotation_metadata( + object_=projects, + annotation=typing.Dict[str, ProjectRequest], + direction="write", + ), + "organization_memberships": convert_and_respect_annotation_metadata( + object_=organization_memberships, + annotation=typing.Dict[str, OrganizationMembershipRequest], + direction="write", + ), + "workspace_memberships": convert_and_respect_annotation_metadata( + object_=workspace_memberships, + annotation=typing.Dict[str, WorkspaceMembershipRequest], + direction="write", + ), + "project_memberships": convert_and_respect_annotation_metadata( + object_=project_memberships, + annotation=typing.Dict[str, ProjectMembershipRequest], + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ScopesResponseModel, + parse_obj_as( + type_=ScopesResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_account( self, *, - request: typing.Optional[AccountRequest] = None, + user: LegacyUserRequest, + scope: LegacyScopeRequest, request_options: typing.Optional[RequestOptions] = None, ) -> AccountResponse: """ Parameters ---------- - request : typing.Optional[AccountRequest] + user : LegacyUserRequest - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AccountResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.admin.create_account() - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_account( - request=request, request_options=request_options - ) - return _response.data - - async def create_portal( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str + scope : LegacyScopeRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.admin.create_portal( - organization_id="organization_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_portal( - organization_id=organization_id, request_options=request_options - ) - return _response.data - - async def create_checkout( - self, - *, - organization_id: str, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] + AccountResponse Successful Response Examples -------- import asyncio - from agenta import AsyncAgentaApi + from agenta import AsyncAgentaApi, LegacyScopeRequest, LegacyUserRequest client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.admin.create_checkout( - organization_id="organization_id", - plan="cloud_v0_hobby", - success_url="success_url", + await client.admin.create_account( + user=LegacyUserRequest( + name="name", + email="email", + ), + scope=LegacyScopeRequest( + name="name", + ), ) asyncio.run(main()) """ - _response = await self._raw_client.create_checkout( - organization_id=organization_id, - plan=plan, - success_url=success_url, + _response = await self._client_wrapper.httpx_client.request( + "admin/account", + method="POST", + json={ + "user": convert_and_respect_annotation_metadata( + object_=user, annotation=LegacyUserRequest, direction="write" + ), + "scope": convert_and_respect_annotation_metadata( + object_=scope, annotation=LegacyScopeRequest, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data - - async def switch_plans( - self, - *, - organization_id: str, - plan: Plan, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.admin.switch_plans( - organization_id="organization_id", - plan="cloud_v0_hobby", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.switch_plans( - organization_id=organization_id, plan=plan, request_options=request_options - ) - return _response.data - - async def cancel_subscription( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.admin.cancel_subscription( - organization_id="organization_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.cancel_subscription( - organization_id=organization_id, request_options=request_options - ) - return _response.data - - async def report_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.admin.report_usage() - - - asyncio.run(main()) - """ - _response = await self._raw_client.report_usage(request_options=request_options) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AccountResponse, + parse_obj_as( + type_=AccountResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/admin/raw_client.py b/sdk/agenta/client/backend/admin/raw_client.py deleted file mode 100644 index f0d36bc834..0000000000 --- a/sdk/agenta/client/backend/admin/raw_client.py +++ /dev/null @@ -1,1017 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.account_request import AccountRequest -from ..types.account_response import AccountResponse -from ..types.http_validation_error import HttpValidationError -from ..types.organization_membership_request import OrganizationMembershipRequest -from ..types.organization_request import OrganizationRequest -from ..types.plan import Plan -from ..types.project_membership_request import ProjectMembershipRequest -from ..types.project_request import ProjectRequest -from ..types.scopes_response_model import ScopesResponseModel -from ..types.user_request import UserRequest -from ..types.workspace_membership_request import WorkspaceMembershipRequest -from ..types.workspace_request import WorkspaceRequest - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawAdminClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def create_accounts( - self, - *, - users: typing.Dict[str, UserRequest], - organizations: typing.Dict[str, OrganizationRequest], - workspaces: typing.Dict[str, WorkspaceRequest], - projects: typing.Dict[str, ProjectRequest], - organization_memberships: typing.Dict[str, OrganizationMembershipRequest], - workspace_memberships: typing.Dict[str, WorkspaceMembershipRequest], - project_memberships: typing.Dict[str, ProjectMembershipRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ScopesResponseModel]: - """ - Parameters - ---------- - users : typing.Dict[str, UserRequest] - - organizations : typing.Dict[str, OrganizationRequest] - - workspaces : typing.Dict[str, WorkspaceRequest] - - projects : typing.Dict[str, ProjectRequest] - - organization_memberships : typing.Dict[str, OrganizationMembershipRequest] - - workspace_memberships : typing.Dict[str, WorkspaceMembershipRequest] - - project_memberships : typing.Dict[str, ProjectMembershipRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ScopesResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/accounts", - method="POST", - json={ - "users": convert_and_respect_annotation_metadata( - object_=users, - annotation=typing.Dict[str, UserRequest], - direction="write", - ), - "organizations": convert_and_respect_annotation_metadata( - object_=organizations, - annotation=typing.Dict[str, OrganizationRequest], - direction="write", - ), - "workspaces": convert_and_respect_annotation_metadata( - object_=workspaces, - annotation=typing.Dict[str, WorkspaceRequest], - direction="write", - ), - "projects": convert_and_respect_annotation_metadata( - object_=projects, - annotation=typing.Dict[str, ProjectRequest], - direction="write", - ), - "organization_memberships": convert_and_respect_annotation_metadata( - object_=organization_memberships, - annotation=typing.Dict[str, OrganizationMembershipRequest], - direction="write", - ), - "workspace_memberships": convert_and_respect_annotation_metadata( - object_=workspace_memberships, - annotation=typing.Dict[str, WorkspaceMembershipRequest], - direction="write", - ), - "project_memberships": convert_and_respect_annotation_metadata( - object_=project_memberships, - annotation=typing.Dict[str, ProjectMembershipRequest], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ScopesResponseModel, - parse_obj_as( - type_=ScopesResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_account( - self, - *, - request: typing.Optional[AccountRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AccountResponse]: - """ - Parameters - ---------- - request : typing.Optional[AccountRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AccountResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/account", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=AccountRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AccountResponse, - parse_obj_as( - type_=AccountResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_portal( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/billing/stripe/portals/", - method="POST", - params={ - "organization_id": organization_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_checkout( - self, - *, - organization_id: str, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/billing/stripe/checkouts/", - method="POST", - params={ - "organization_id": organization_id, - "plan": plan, - "success_url": success_url, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def switch_plans( - self, - *, - organization_id: str, - plan: Plan, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/billing/plans/switch", - method="POST", - params={ - "organization_id": organization_id, - "plan": plan, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def cancel_subscription( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/billing/subscription/cancel", - method="POST", - params={ - "organization_id": organization_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def report_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/billing/usage/report", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawAdminClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def create_accounts( - self, - *, - users: typing.Dict[str, UserRequest], - organizations: typing.Dict[str, OrganizationRequest], - workspaces: typing.Dict[str, WorkspaceRequest], - projects: typing.Dict[str, ProjectRequest], - organization_memberships: typing.Dict[str, OrganizationMembershipRequest], - workspace_memberships: typing.Dict[str, WorkspaceMembershipRequest], - project_memberships: typing.Dict[str, ProjectMembershipRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ScopesResponseModel]: - """ - Parameters - ---------- - users : typing.Dict[str, UserRequest] - - organizations : typing.Dict[str, OrganizationRequest] - - workspaces : typing.Dict[str, WorkspaceRequest] - - projects : typing.Dict[str, ProjectRequest] - - organization_memberships : typing.Dict[str, OrganizationMembershipRequest] - - workspace_memberships : typing.Dict[str, WorkspaceMembershipRequest] - - project_memberships : typing.Dict[str, ProjectMembershipRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ScopesResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/accounts", - method="POST", - json={ - "users": convert_and_respect_annotation_metadata( - object_=users, - annotation=typing.Dict[str, UserRequest], - direction="write", - ), - "organizations": convert_and_respect_annotation_metadata( - object_=organizations, - annotation=typing.Dict[str, OrganizationRequest], - direction="write", - ), - "workspaces": convert_and_respect_annotation_metadata( - object_=workspaces, - annotation=typing.Dict[str, WorkspaceRequest], - direction="write", - ), - "projects": convert_and_respect_annotation_metadata( - object_=projects, - annotation=typing.Dict[str, ProjectRequest], - direction="write", - ), - "organization_memberships": convert_and_respect_annotation_metadata( - object_=organization_memberships, - annotation=typing.Dict[str, OrganizationMembershipRequest], - direction="write", - ), - "workspace_memberships": convert_and_respect_annotation_metadata( - object_=workspace_memberships, - annotation=typing.Dict[str, WorkspaceMembershipRequest], - direction="write", - ), - "project_memberships": convert_and_respect_annotation_metadata( - object_=project_memberships, - annotation=typing.Dict[str, ProjectMembershipRequest], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ScopesResponseModel, - parse_obj_as( - type_=ScopesResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_account( - self, - *, - request: typing.Optional[AccountRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AccountResponse]: - """ - Parameters - ---------- - request : typing.Optional[AccountRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AccountResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/account", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=AccountRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AccountResponse, - parse_obj_as( - type_=AccountResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_portal( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/billing/stripe/portals/", - method="POST", - params={ - "organization_id": organization_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_checkout( - self, - *, - organization_id: str, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/billing/stripe/checkouts/", - method="POST", - params={ - "organization_id": organization_id, - "plan": plan, - "success_url": success_url, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def switch_plans( - self, - *, - organization_id: str, - plan: Plan, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/billing/plans/switch", - method="POST", - params={ - "organization_id": organization_id, - "plan": plan, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def cancel_subscription( - self, - *, - organization_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/billing/subscription/cancel", - method="POST", - params={ - "organization_id": organization_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def report_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/billing/usage/report", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/api_keys/__init__.py b/sdk/agenta/client/backend/api_keys/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/api_keys/__init__.py +++ b/sdk/agenta/client/backend/api_keys/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/api_keys/client.py b/sdk/agenta/client/backend/api_keys/client.py index 167b48913e..7d11d34e39 100644 --- a/sdk/agenta/client/backend/api_keys/client.py +++ b/sdk/agenta/client/backend/api_keys/client.py @@ -1,27 +1,21 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.list_api_keys_response import ListApiKeysResponse -from .raw_client import AsyncRawApiKeysClient, RawApiKeysClient +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.jsonable_encoder import jsonable_encoder +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..core.client_wrapper import AsyncClientWrapper class ApiKeysClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawApiKeysClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawApiKeysClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawApiKeysClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def list_api_keys( self, *, request_options: typing.Optional[RequestOptions] = None @@ -51,11 +45,28 @@ def list_api_keys( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.api_keys.list_api_keys() """ - _response = self._raw_client.list_api_keys(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "keys", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ListApiKeysResponse], + parse_obj_as( + type_=typing.List[ListApiKeysResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_api_key( self, *, request_options: typing.Optional[RequestOptions] = None @@ -85,17 +96,34 @@ def create_api_key( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.api_keys.create_api_key() """ - _response = self._raw_client.create_api_key(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "keys", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_api_key( self, key_prefix: str, *, - request_options: typing.Optional[RequestOptions] = None + request_options: typing.Optional[RequestOptions] = None, ) -> typing.Dict[str, typing.Optional[typing.Any]]: """ Delete an API key with the given key prefix for the authenticated user. @@ -128,31 +156,109 @@ def delete_api_key( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.api_keys.delete_api_key( key_prefix="key_prefix", ) """ - _response = self._raw_client.delete_api_key( - key_prefix, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"keys/{jsonable_encoder(key_prefix)}", + method="DELETE", + request_options=request_options, ) - return _response.data - + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, typing.Optional[typing.Any]], + parse_obj_as( + type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def validate_api_key( + self, + key_prefix: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> bool: + """ + This Function is called by the CLI and is used to validate an API key provided by a user in agenta init setup. + Returns: + bool: True. If the request reaches this point, the API key is valid. -class AsyncApiKeysClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawApiKeysClient(client_wrapper=client_wrapper) + Parameters + ---------- + key_prefix : str - @property - def with_raw_response(self) -> AsyncRawApiKeysClient: - """ - Retrieves a raw implementation of this client that returns raw responses. + request_options : typing.Optional[RequestOptions] + Request-specific configuration. Returns ------- - AsyncRawApiKeysClient + bool + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.api_keys.validate_api_key( + key_prefix="key_prefix", + ) """ - return self._raw_client + _response = self._client_wrapper.httpx_client.request( + f"keys/{jsonable_encoder(key_prefix)}/validate", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncApiKeysClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper async def list_api_keys( self, *, request_options: typing.Optional[RequestOptions] = None @@ -184,6 +290,7 @@ async def list_api_keys( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -193,10 +300,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_api_keys( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "keys", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ListApiKeysResponse], + parse_obj_as( + type_=typing.List[ListApiKeysResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_api_key( self, *, request_options: typing.Optional[RequestOptions] = None @@ -228,6 +349,7 @@ async def create_api_key( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -237,16 +359,30 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_api_key( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "keys", + method="POST", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + str, + parse_obj_as( + type_=str, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_api_key( self, key_prefix: str, *, - request_options: typing.Optional[RequestOptions] = None + request_options: typing.Optional[RequestOptions] = None, ) -> typing.Dict[str, typing.Optional[typing.Any]]: """ Delete an API key with the given key prefix for the authenticated user. @@ -281,6 +417,7 @@ async def delete_api_key( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -292,7 +429,103 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_api_key( - key_prefix, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"keys/{jsonable_encoder(key_prefix)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, typing.Optional[typing.Any]], + parse_obj_as( + type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def validate_api_key( + self, + key_prefix: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> bool: + """ + This Function is called by the CLI and is used to validate an API key provided by a user in agenta init setup. + Returns: + bool: True. If the request reaches this point, the API key is valid. + + Parameters + ---------- + key_prefix : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + bool + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.api_keys.validate_api_key( + key_prefix="key_prefix", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"keys/{jsonable_encoder(key_prefix)}/validate", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/api_keys/raw_client.py b/sdk/agenta/client/backend/api_keys/raw_client.py deleted file mode 100644 index 42c6863a4e..0000000000 --- a/sdk/agenta/client/backend/api_keys/raw_client.py +++ /dev/null @@ -1,364 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.list_api_keys_response import ListApiKeysResponse - - -class RawApiKeysClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_api_keys( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[ListApiKeysResponse]]: - """ - List all API keys associated with the authenticated user. - - Args: - request (Request): The incoming request object. - - Returns: - List[ListAPIKeysResponse]: A list of API Keys associated with the user. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[ListApiKeysResponse]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "keys", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ListApiKeysResponse], - parse_obj_as( - type_=typing.List[ListApiKeysResponse], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_api_key( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[str]: - """ - Creates an API key for a user. - - Args: - request (Request): The request object containing the user ID in the request state. - - Returns: - str: The created API key. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[str] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "keys", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - str, - parse_obj_as( - type_=str, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_api_key( - self, - key_prefix: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]: - """ - Delete an API key with the given key prefix for the authenticated user. - - Args: - key_prefix (str): The prefix of the API key to be deleted. - request (Request): The incoming request object. - - Returns: - dict: A dictionary containing a success message upon successful deletion. - - Raises: - HTTPException: If the API key is not found or does not belong to the user. - - Parameters - ---------- - key_prefix : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Dict[str, typing.Optional[typing.Any]]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"keys/{jsonable_encoder(key_prefix)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Dict[str, typing.Optional[typing.Any]], - parse_obj_as( - type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawApiKeysClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_api_keys( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[ListApiKeysResponse]]: - """ - List all API keys associated with the authenticated user. - - Args: - request (Request): The incoming request object. - - Returns: - List[ListAPIKeysResponse]: A list of API Keys associated with the user. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[ListApiKeysResponse]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "keys", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ListApiKeysResponse], - parse_obj_as( - type_=typing.List[ListApiKeysResponse], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_api_key( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[str]: - """ - Creates an API key for a user. - - Args: - request (Request): The request object containing the user ID in the request state. - - Returns: - str: The created API key. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[str] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "keys", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - str, - parse_obj_as( - type_=str, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_api_key( - self, - key_prefix: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]: - """ - Delete an API key with the given key prefix for the authenticated user. - - Args: - key_prefix (str): The prefix of the API key to be deleted. - request (Request): The incoming request object. - - Returns: - dict: A dictionary containing a success message upon successful deletion. - - Raises: - HTTPException: If the API key is not found or does not belong to the user. - - Parameters - ---------- - key_prefix : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Dict[str, typing.Optional[typing.Any]]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"keys/{jsonable_encoder(key_prefix)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Dict[str, typing.Optional[typing.Any]], - parse_obj_as( - type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/apps/__init__.py b/sdk/agenta/client/backend/apps/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/apps/__init__.py +++ b/sdk/agenta/client/backend/apps/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/apps/client.py b/sdk/agenta/client/backend/apps/client.py index 283715ce2c..94b979ad53 100644 --- a/sdk/agenta/client/backend/apps/client.py +++ b/sdk/agenta/client/backend/apps/client.py @@ -1,16 +1,21 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.app import App from ..types.app_variant_response import AppVariantResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.app import App from ..types.create_app_output import CreateAppOutput +from ..types.update_app_output import UpdateAppOutput from ..types.environment_output import EnvironmentOutput from ..types.environment_output_extended import EnvironmentOutputExtended -from ..types.update_app_output import UpdateAppOutput -from .raw_client import AsyncRawAppsClient, RawAppsClient +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -18,18 +23,7 @@ class AppsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawAppsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawAppsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawAppsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def list_app_variants( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -61,15 +55,40 @@ def list_app_variants( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.list_app_variants( app_id="app_id", ) """ - _response = self._raw_client.list_app_variants( - app_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variants", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[AppVariantResponse], + parse_obj_as( + type_=typing.List[AppVariantResponse], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_variant_by_env( self, @@ -111,16 +130,45 @@ def get_variant_by_env( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.get_variant_by_env( app_id="app_id", environment="environment", ) """ - _response = self._raw_client.get_variant_by_env( - app_id=app_id, environment=environment, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "apps/get_variant_by_env", + method="GET", + params={ + "app_id": app_id, + "environment": environment, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantResponse, + parse_obj_as( + type_=AppVariantResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def list_apps( self, @@ -158,13 +206,41 @@ def list_apps( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.list_apps() """ - _response = self._raw_client.list_apps( - app_name=app_name, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "apps", + method="GET", + params={ + "app_name": app_name, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[App], + parse_obj_as( + type_=typing.List[App], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_app( self, @@ -214,26 +290,57 @@ def create_app( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.create_app( app_name="app_name", ) """ - _response = self._raw_client.create_app( - app_name=app_name, - template_key=template_key, - project_id=project_id, - workspace_id=workspace_id, - organization_id=organization_id, + _response = self._client_wrapper.httpx_client.request( + "apps", + method="POST", + json={ + "app_name": app_name, + "template_key": template_key, + "project_id": project_id, + "workspace_id": workspace_id, + "organization_id": organization_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CreateAppOutput, + parse_obj_as( + type_=CreateAppOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def remove_app( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.Optional[typing.Any]: """ - Remove app, all its variant. + Remove app, all its variant, containers and images Arguments: app -- App to remove @@ -256,13 +363,40 @@ def remove_app( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.remove_app( app_id="app_id", ) """ - _response = self._raw_client.remove_app(app_id, request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_app( self, @@ -279,7 +413,7 @@ def update_app( payload (UpdateApp): The payload containing the app name. Returns: - UpdateAppOutput: The output containing the newly created app's ID and name. + UpdateAppOuput: The output containing the newly created app's ID and name. Raises: HTTPException: If there is an error creating the app or the user does not have permission to access the app. @@ -304,16 +438,149 @@ def update_app( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.update_app( app_id="app_id", app_name="app_name", ) """ - _response = self._raw_client.update_app( - app_id, app_name=app_name, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}", + method="PATCH", + json={ + "app_name": app_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + UpdateAppOutput, + parse_obj_as( + type_=UpdateAppOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def add_variant_from_image( + self, + app_id: str, + *, + variant_name: str, + docker_id: str, + tags: str, + base_name: typing.Optional[str] = OMIT, + config_name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Add a new variant to an app based on a Docker image. + + Args: + app_id (str): The ID of the app to add the variant to. + payload (AddVariantFromImagePayload): The payload containing information about the variant to add. + + Raises: + HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app. + + Returns: + dict: The newly added variant. + + Parameters + ---------- + app_id : str + + variant_name : str + + docker_id : str + + tags : str + + base_name : typing.Optional[str] + + config_name : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.apps.add_variant_from_image( + app_id="app_id", + variant_name="variant_name", + docker_id="docker_id", + tags="tags", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-image", + method="POST", + json={ + "variant_name": variant_name, + "docker_id": docker_id, + "tags": tags, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def add_variant_from_url( self, @@ -321,12 +588,23 @@ def add_variant_from_url( *, variant_name: str, url: str, - commit_message: typing.Optional[str] = OMIT, base_name: typing.Optional[str] = OMIT, config_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ + Add a new variant to an app based on a URL. + + Args: + app_id (str): The ID of the app to add the variant to. + payload (AddVariantFromURLPayload): The payload containing information about the variant to add. + + Raises: + HTTPException: If the user does not have access to the app or if there is an error adding the variant. + + Returns: + dict: The newly added variant. + Parameters ---------- app_id : str @@ -335,8 +613,6 @@ def add_variant_from_url( url : str - commit_message : typing.Optional[str] - base_name : typing.Optional[str] config_name : typing.Optional[str] @@ -355,6 +631,7 @@ def add_variant_from_url( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.add_variant_from_url( app_id="app_id", @@ -362,16 +639,44 @@ def add_variant_from_url( url="url", ) """ - _response = self._raw_client.add_variant_from_url( - app_id, - variant_name=variant_name, - url=url, - commit_message=commit_message, - base_name=base_name, - config_name=config_name, + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-service", + method="POST", + json={ + "variant_name": variant_name, + "url": url, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def add_variant_from_key( self, @@ -379,7 +684,6 @@ def add_variant_from_key( *, variant_name: str, key: str, - commit_message: typing.Optional[str] = OMIT, base_name: typing.Optional[str] = OMIT, config_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -393,8 +697,6 @@ def add_variant_from_key( key : str - commit_message : typing.Optional[str] - base_name : typing.Optional[str] config_name : typing.Optional[str] @@ -413,6 +715,7 @@ def add_variant_from_key( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.add_variant_from_key( app_id="app_id", @@ -420,16 +723,44 @@ def add_variant_from_key( key="key", ) """ - _response = self._raw_client.add_variant_from_key( - app_id, - variant_name=variant_name, - key=key, - commit_message=commit_message, - base_name=base_name, - config_name=config_name, + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-template", + method="POST", + json={ + "variant_name": variant_name, + "key": key, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def list_environments( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -461,15 +792,40 @@ def list_environments( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.list_environments( app_id="app_id", ) """ - _response = self._raw_client.list_environments( - app_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/environments", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EnvironmentOutput], + parse_obj_as( + type_=typing.List[EnvironmentOutput], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def environment_revisions( self, @@ -499,32 +855,46 @@ def environment_revisions( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.apps.environment_revisions( app_id="app_id", environment_name={"key": "value"}, ) """ - _response = self._raw_client.environment_revisions( - app_id, environment_name, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/revisions/{jsonable_encoder(environment_name)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EnvironmentOutputExtended, + parse_obj_as( + type_=EnvironmentOutputExtended, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncAppsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawAppsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawAppsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawAppsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def list_app_variants( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -558,6 +928,7 @@ async def list_app_variants( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -569,10 +940,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_app_variants( - app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variants", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[AppVariantResponse], + parse_obj_as( + type_=typing.List[AppVariantResponse], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_variant_by_env( self, @@ -616,6 +1011,7 @@ async def get_variant_by_env( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -628,10 +1024,38 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_variant_by_env( - app_id=app_id, environment=environment, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "apps/get_variant_by_env", + method="GET", + params={ + "app_id": app_id, + "environment": environment, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantResponse, + parse_obj_as( + type_=AppVariantResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def list_apps( self, @@ -671,6 +1095,7 @@ async def list_apps( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -680,10 +1105,37 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_apps( - app_name=app_name, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "apps", + method="GET", + params={ + "app_name": app_name, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[App], + parse_obj_as( + type_=typing.List[App], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_app( self, @@ -735,6 +1187,7 @@ async def create_app( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -746,21 +1199,51 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_app( - app_name=app_name, - template_key=template_key, - project_id=project_id, - workspace_id=workspace_id, - organization_id=organization_id, + _response = await self._client_wrapper.httpx_client.request( + "apps", + method="POST", + json={ + "app_name": app_name, + "template_key": template_key, + "project_id": project_id, + "workspace_id": workspace_id, + "organization_id": organization_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CreateAppOutput, + parse_obj_as( + type_=CreateAppOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def remove_app( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.Optional[typing.Any]: """ - Remove app, all its variant. + Remove app, all its variant, containers and images Arguments: app -- App to remove @@ -785,6 +1268,7 @@ async def remove_app( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -796,10 +1280,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.remove_app( - app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_app( self, @@ -816,7 +1324,7 @@ async def update_app( payload (UpdateApp): The payload containing the app name. Returns: - UpdateAppOutput: The output containing the newly created app's ID and name. + UpdateAppOuput: The output containing the newly created app's ID and name. Raises: HTTPException: If there is an error creating the app or the user does not have permission to access the app. @@ -843,6 +1351,7 @@ async def update_app( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -855,10 +1364,150 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_app( - app_id, app_name=app_name, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}", + method="PATCH", + json={ + "app_name": app_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + UpdateAppOutput, + parse_obj_as( + type_=UpdateAppOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def add_variant_from_image( + self, + app_id: str, + *, + variant_name: str, + docker_id: str, + tags: str, + base_name: typing.Optional[str] = OMIT, + config_name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Add a new variant to an app based on a Docker image. + + Args: + app_id (str): The ID of the app to add the variant to. + payload (AddVariantFromImagePayload): The payload containing information about the variant to add. + + Raises: + HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app. + + Returns: + dict: The newly added variant. + + Parameters + ---------- + app_id : str + + variant_name : str + + docker_id : str + + tags : str + + base_name : typing.Optional[str] + + config_name : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.apps.add_variant_from_image( + app_id="app_id", + variant_name="variant_name", + docker_id="docker_id", + tags="tags", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-image", + method="POST", + json={ + "variant_name": variant_name, + "docker_id": docker_id, + "tags": tags, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def add_variant_from_url( self, @@ -866,12 +1515,23 @@ async def add_variant_from_url( *, variant_name: str, url: str, - commit_message: typing.Optional[str] = OMIT, base_name: typing.Optional[str] = OMIT, config_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ + Add a new variant to an app based on a URL. + + Args: + app_id (str): The ID of the app to add the variant to. + payload (AddVariantFromURLPayload): The payload containing information about the variant to add. + + Raises: + HTTPException: If the user does not have access to the app or if there is an error adding the variant. + + Returns: + dict: The newly added variant. + Parameters ---------- app_id : str @@ -880,8 +1540,6 @@ async def add_variant_from_url( url : str - commit_message : typing.Optional[str] - base_name : typing.Optional[str] config_name : typing.Optional[str] @@ -902,6 +1560,7 @@ async def add_variant_from_url( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -915,16 +1574,44 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.add_variant_from_url( - app_id, - variant_name=variant_name, - url=url, - commit_message=commit_message, - base_name=base_name, - config_name=config_name, + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-service", + method="POST", + json={ + "variant_name": variant_name, + "url": url, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def add_variant_from_key( self, @@ -932,7 +1619,6 @@ async def add_variant_from_key( *, variant_name: str, key: str, - commit_message: typing.Optional[str] = OMIT, base_name: typing.Optional[str] = OMIT, config_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -946,8 +1632,6 @@ async def add_variant_from_key( key : str - commit_message : typing.Optional[str] - base_name : typing.Optional[str] config_name : typing.Optional[str] @@ -968,6 +1652,7 @@ async def add_variant_from_key( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -981,16 +1666,44 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.add_variant_from_key( - app_id, - variant_name=variant_name, - key=key, - commit_message=commit_message, - base_name=base_name, - config_name=config_name, + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/variant/from-template", + method="POST", + json={ + "variant_name": variant_name, + "key": key, + "base_name": base_name, + "config_name": config_name, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def list_environments( self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1024,6 +1737,7 @@ async def list_environments( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1035,10 +1749,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_environments( - app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/environments", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EnvironmentOutput], + parse_obj_as( + type_=typing.List[EnvironmentOutput], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def environment_revisions( self, @@ -1070,6 +1808,7 @@ async def environment_revisions( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1082,7 +1821,31 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.environment_revisions( - app_id, environment_name, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"apps/{jsonable_encoder(app_id)}/revisions/{jsonable_encoder(environment_name)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EnvironmentOutputExtended, + parse_obj_as( + type_=EnvironmentOutputExtended, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/apps/raw_client.py b/sdk/agenta/client/backend/apps/raw_client.py deleted file mode 100644 index 8e8296d2bf..0000000000 --- a/sdk/agenta/client/backend/apps/raw_client.py +++ /dev/null @@ -1,1516 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.app import App -from ..types.app_variant_response import AppVariantResponse -from ..types.create_app_output import CreateAppOutput -from ..types.environment_output import EnvironmentOutput -from ..types.environment_output_extended import EnvironmentOutputExtended -from ..types.http_validation_error import HttpValidationError -from ..types.update_app_output import UpdateAppOutput - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawAppsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_app_variants( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[AppVariantResponse]]: - """ - Retrieve a list of app variants for a given app ID. - - Args: - app_id (str): The ID of the app to retrieve variants for. - - Returns: - List[AppVariantResponse]: A list of app variants for the given app ID. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[AppVariantResponse]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variants", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[AppVariantResponse], - parse_obj_as( - type_=typing.List[AppVariantResponse], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_variant_by_env( - self, - *, - app_id: str, - environment: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AppVariantResponse]: - """ - Retrieve the app variant based on the provided app_id and environment. - - Args: - app_id (str): The ID of the app to retrieve the variant for. - environment (str): The environment of the app variant to retrieve. - - Raises: - HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500). - - Returns: - AppVariantResponse: The retrieved app variant. - - Parameters - ---------- - app_id : str - - environment : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AppVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "apps/get_variant_by_env", - method="GET", - params={ - "app_id": app_id, - "environment": environment, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantResponse, - parse_obj_as( - type_=AppVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_apps( - self, - *, - app_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[App]]: - """ - Retrieve a list of apps filtered by app_name. - - Args: - app_name (Optional[str]): The name of the app to filter by. - - Returns: - List[App]: A list of apps filtered by app_name. - - Raises: - HTTPException: If there was an error retrieving the list of apps. - - Parameters - ---------- - app_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[App]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "apps", - method="GET", - params={ - "app_name": app_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[App], - parse_obj_as( - type_=typing.List[App], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_app( - self, - *, - app_name: str, - template_key: typing.Optional[str] = OMIT, - project_id: typing.Optional[str] = OMIT, - workspace_id: typing.Optional[str] = OMIT, - organization_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[CreateAppOutput]: - """ - Create a new app for a user or organization. - - Args: - payload (CreateApp): The payload containing the app name and organization ID (optional). - - Returns: - CreateAppOutput: The output containing the newly created app's ID and name. - - Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. - - Parameters - ---------- - app_name : str - - template_key : typing.Optional[str] - - project_id : typing.Optional[str] - - workspace_id : typing.Optional[str] - - organization_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CreateAppOutput] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "apps", - method="POST", - json={ - "app_name": app_name, - "template_key": template_key, - "project_id": project_id, - "workspace_id": workspace_id, - "organization_id": organization_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CreateAppOutput, - parse_obj_as( - type_=CreateAppOutput, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def remove_app( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Remove app, all its variant. - - Arguments: - app -- App to remove - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_app( - self, - app_id: str, - *, - app_name: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[UpdateAppOutput]: - """ - Update an app for a user or organization. - - Args: - app_id (str): The ID of the app. - payload (UpdateApp): The payload containing the app name. - - Returns: - UpdateAppOutput: The output containing the newly created app's ID and name. - - Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. - - Parameters - ---------- - app_id : str - - app_name : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[UpdateAppOutput] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}", - method="PATCH", - json={ - "app_name": app_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - UpdateAppOutput, - parse_obj_as( - type_=UpdateAppOutput, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def add_variant_from_url( - self, - app_id: str, - *, - variant_name: str, - url: str, - commit_message: typing.Optional[str] = OMIT, - base_name: typing.Optional[str] = OMIT, - config_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - app_id : str - - variant_name : str - - url : str - - commit_message : typing.Optional[str] - - base_name : typing.Optional[str] - - config_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variant/from-service", - method="POST", - json={ - "variant_name": variant_name, - "url": url, - "commit_message": commit_message, - "base_name": base_name, - "config_name": config_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def add_variant_from_key( - self, - app_id: str, - *, - variant_name: str, - key: str, - commit_message: typing.Optional[str] = OMIT, - base_name: typing.Optional[str] = OMIT, - config_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - app_id : str - - variant_name : str - - key : str - - commit_message : typing.Optional[str] - - base_name : typing.Optional[str] - - config_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variant/from-template", - method="POST", - json={ - "variant_name": variant_name, - "key": key, - "commit_message": commit_message, - "base_name": base_name, - "config_name": config_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_environments( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[EnvironmentOutput]]: - """ - Retrieve a list of environments for a given app ID. - - Args: - app_id (str): The ID of the app to retrieve environments for. - - Returns: - List[EnvironmentOutput]: A list of environment objects. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[EnvironmentOutput]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/environments", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EnvironmentOutput], - parse_obj_as( - type_=typing.List[EnvironmentOutput], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def environment_revisions( - self, - app_id: str, - environment_name: typing.Optional[typing.Any], - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EnvironmentOutputExtended]: - """ - Parameters - ---------- - app_id : str - - environment_name : typing.Optional[typing.Any] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EnvironmentOutputExtended] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/revisions/{jsonable_encoder(environment_name)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EnvironmentOutputExtended, - parse_obj_as( - type_=EnvironmentOutputExtended, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawAppsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_app_variants( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[AppVariantResponse]]: - """ - Retrieve a list of app variants for a given app ID. - - Args: - app_id (str): The ID of the app to retrieve variants for. - - Returns: - List[AppVariantResponse]: A list of app variants for the given app ID. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[AppVariantResponse]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variants", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[AppVariantResponse], - parse_obj_as( - type_=typing.List[AppVariantResponse], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_variant_by_env( - self, - *, - app_id: str, - environment: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AppVariantResponse]: - """ - Retrieve the app variant based on the provided app_id and environment. - - Args: - app_id (str): The ID of the app to retrieve the variant for. - environment (str): The environment of the app variant to retrieve. - - Raises: - HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500). - - Returns: - AppVariantResponse: The retrieved app variant. - - Parameters - ---------- - app_id : str - - environment : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AppVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "apps/get_variant_by_env", - method="GET", - params={ - "app_id": app_id, - "environment": environment, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantResponse, - parse_obj_as( - type_=AppVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_apps( - self, - *, - app_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[App]]: - """ - Retrieve a list of apps filtered by app_name. - - Args: - app_name (Optional[str]): The name of the app to filter by. - - Returns: - List[App]: A list of apps filtered by app_name. - - Raises: - HTTPException: If there was an error retrieving the list of apps. - - Parameters - ---------- - app_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[App]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "apps", - method="GET", - params={ - "app_name": app_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[App], - parse_obj_as( - type_=typing.List[App], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_app( - self, - *, - app_name: str, - template_key: typing.Optional[str] = OMIT, - project_id: typing.Optional[str] = OMIT, - workspace_id: typing.Optional[str] = OMIT, - organization_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[CreateAppOutput]: - """ - Create a new app for a user or organization. - - Args: - payload (CreateApp): The payload containing the app name and organization ID (optional). - - Returns: - CreateAppOutput: The output containing the newly created app's ID and name. - - Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. - - Parameters - ---------- - app_name : str - - template_key : typing.Optional[str] - - project_id : typing.Optional[str] - - workspace_id : typing.Optional[str] - - organization_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CreateAppOutput] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "apps", - method="POST", - json={ - "app_name": app_name, - "template_key": template_key, - "project_id": project_id, - "workspace_id": workspace_id, - "organization_id": organization_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CreateAppOutput, - parse_obj_as( - type_=CreateAppOutput, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def remove_app( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Remove app, all its variant. - - Arguments: - app -- App to remove - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_app( - self, - app_id: str, - *, - app_name: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[UpdateAppOutput]: - """ - Update an app for a user or organization. - - Args: - app_id (str): The ID of the app. - payload (UpdateApp): The payload containing the app name. - - Returns: - UpdateAppOutput: The output containing the newly created app's ID and name. - - Raises: - HTTPException: If there is an error creating the app or the user does not have permission to access the app. - - Parameters - ---------- - app_id : str - - app_name : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[UpdateAppOutput] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}", - method="PATCH", - json={ - "app_name": app_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - UpdateAppOutput, - parse_obj_as( - type_=UpdateAppOutput, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def add_variant_from_url( - self, - app_id: str, - *, - variant_name: str, - url: str, - commit_message: typing.Optional[str] = OMIT, - base_name: typing.Optional[str] = OMIT, - config_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - app_id : str - - variant_name : str - - url : str - - commit_message : typing.Optional[str] - - base_name : typing.Optional[str] - - config_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variant/from-service", - method="POST", - json={ - "variant_name": variant_name, - "url": url, - "commit_message": commit_message, - "base_name": base_name, - "config_name": config_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def add_variant_from_key( - self, - app_id: str, - *, - variant_name: str, - key: str, - commit_message: typing.Optional[str] = OMIT, - base_name: typing.Optional[str] = OMIT, - config_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - app_id : str - - variant_name : str - - key : str - - commit_message : typing.Optional[str] - - base_name : typing.Optional[str] - - config_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/variant/from-template", - method="POST", - json={ - "variant_name": variant_name, - "key": key, - "commit_message": commit_message, - "base_name": base_name, - "config_name": config_name, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_environments( - self, app_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[EnvironmentOutput]]: - """ - Retrieve a list of environments for a given app ID. - - Args: - app_id (str): The ID of the app to retrieve environments for. - - Returns: - List[EnvironmentOutput]: A list of environment objects. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[EnvironmentOutput]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/environments", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EnvironmentOutput], - parse_obj_as( - type_=typing.List[EnvironmentOutput], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def environment_revisions( - self, - app_id: str, - environment_name: typing.Optional[typing.Any], - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EnvironmentOutputExtended]: - """ - Parameters - ---------- - app_id : str - - environment_name : typing.Optional[typing.Any] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EnvironmentOutputExtended] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"apps/{jsonable_encoder(app_id)}/revisions/{jsonable_encoder(environment_name)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EnvironmentOutputExtended, - parse_obj_as( - type_=EnvironmentOutputExtended, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/bases/__init__.py b/sdk/agenta/client/backend/bases/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/bases/__init__.py +++ b/sdk/agenta/client/backend/bases/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/bases/client.py b/sdk/agenta/client/backend/bases/client.py index 5739fbcf6e..3a98a5ca3e 100644 --- a/sdk/agenta/client/backend/bases/client.py +++ b/sdk/agenta/client/backend/bases/client.py @@ -1,27 +1,20 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.base_output import BaseOutput -from .raw_client import AsyncRawBasesClient, RawBasesClient +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper class BasesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawBasesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawBasesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawBasesClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def list_bases( self, @@ -64,31 +57,49 @@ def list_bases( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.bases.list_bases( app_id="app_id", ) """ - _response = self._raw_client.list_bases( - app_id=app_id, base_name=base_name, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "bases", + method="GET", + params={ + "app_id": app_id, + "base_name": base_name, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[BaseOutput], + parse_obj_as( + type_=typing.List[BaseOutput], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncBasesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawBasesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawBasesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawBasesClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def list_bases( self, @@ -133,6 +144,7 @@ async def list_bases( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -144,7 +156,35 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_bases( - app_id=app_id, base_name=base_name, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "bases", + method="GET", + params={ + "app_id": app_id, + "base_name": base_name, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[BaseOutput], + parse_obj_as( + type_=typing.List[BaseOutput], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/bases/raw_client.py b/sdk/agenta/client/backend/bases/raw_client.py deleted file mode 100644 index 9835d7b56f..0000000000 --- a/sdk/agenta/client/backend/bases/raw_client.py +++ /dev/null @@ -1,179 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.base_output import BaseOutput -from ..types.http_validation_error import HttpValidationError - - -class RawBasesClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_bases( - self, - *, - app_id: str, - base_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[BaseOutput]]: - """ - Retrieve a list of bases filtered by app_id and base_name. - - Args: - request (Request): The incoming request. - app_id (str): The ID of the app to filter by. - base_name (Optional[str], optional): The name of the base to filter by. Defaults to None. - - Returns: - List[BaseOutput]: A list of BaseOutput objects representing the filtered bases. - - Raises: - HTTPException: If there was an error retrieving the bases. - - Parameters - ---------- - app_id : str - - base_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[BaseOutput]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "bases", - method="GET", - params={ - "app_id": app_id, - "base_name": base_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[BaseOutput], - parse_obj_as( - type_=typing.List[BaseOutput], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawBasesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_bases( - self, - *, - app_id: str, - base_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[BaseOutput]]: - """ - Retrieve a list of bases filtered by app_id and base_name. - - Args: - request (Request): The incoming request. - app_id (str): The ID of the app to filter by. - base_name (Optional[str], optional): The name of the base to filter by. Defaults to None. - - Returns: - List[BaseOutput]: A list of BaseOutput objects representing the filtered bases. - - Raises: - HTTPException: If there was an error retrieving the bases. - - Parameters - ---------- - app_id : str - - base_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[BaseOutput]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "bases", - method="GET", - params={ - "app_id": app_id, - "base_name": base_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[BaseOutput], - parse_obj_as( - type_=typing.List[BaseOutput], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/billing/__init__.py b/sdk/agenta/client/backend/billing/__init__.py deleted file mode 100644 index dadae709c6..0000000000 --- a/sdk/agenta/client/backend/billing/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/billing/client.py b/sdk/agenta/client/backend/billing/client.py deleted file mode 100644 index c4040b5cdc..0000000000 --- a/sdk/agenta/client/backend/billing/client.py +++ /dev/null @@ -1,564 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.plan import Plan -from .raw_client import AsyncRawBillingClient, RawBillingClient - - -class BillingClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawBillingClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawBillingClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawBillingClient - """ - return self._raw_client - - def handle_events( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.handle_events() - """ - _response = self._raw_client.handle_events(request_options=request_options) - return _response.data - - def create_portal( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.create_portal() - """ - _response = self._raw_client.create_portal(request_options=request_options) - return _response.data - - def create_checkout( - self, - *, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.create_checkout( - plan="cloud_v0_hobby", - success_url="success_url", - ) - """ - _response = self._raw_client.create_checkout( - plan=plan, success_url=success_url, request_options=request_options - ) - return _response.data - - def fetch_plans( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.fetch_plans() - """ - _response = self._raw_client.fetch_plans(request_options=request_options) - return _response.data - - def switch_plans( - self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.switch_plans( - plan="cloud_v0_hobby", - ) - """ - _response = self._raw_client.switch_plans( - plan=plan, request_options=request_options - ) - return _response.data - - def fetch_subscription( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.fetch_subscription() - """ - _response = self._raw_client.fetch_subscription(request_options=request_options) - return _response.data - - def cancel_plan( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.cancel_plan() - """ - _response = self._raw_client.cancel_plan(request_options=request_options) - return _response.data - - def fetch_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.billing.fetch_usage() - """ - _response = self._raw_client.fetch_usage(request_options=request_options) - return _response.data - - -class AsyncBillingClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawBillingClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawBillingClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawBillingClient - """ - return self._raw_client - - async def handle_events( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.handle_events() - - - asyncio.run(main()) - """ - _response = await self._raw_client.handle_events( - request_options=request_options - ) - return _response.data - - async def create_portal( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.create_portal() - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_portal( - request_options=request_options - ) - return _response.data - - async def create_checkout( - self, - *, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.create_checkout( - plan="cloud_v0_hobby", - success_url="success_url", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_checkout( - plan=plan, success_url=success_url, request_options=request_options - ) - return _response.data - - async def fetch_plans( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.fetch_plans() - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_plans(request_options=request_options) - return _response.data - - async def switch_plans( - self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.switch_plans( - plan="cloud_v0_hobby", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.switch_plans( - plan=plan, request_options=request_options - ) - return _response.data - - async def fetch_subscription( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.fetch_subscription() - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_subscription( - request_options=request_options - ) - return _response.data - - async def cancel_plan( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.cancel_plan() - - - asyncio.run(main()) - """ - _response = await self._raw_client.cancel_plan(request_options=request_options) - return _response.data - - async def fetch_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.billing.fetch_usage() - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_usage(request_options=request_options) - return _response.data diff --git a/sdk/agenta/client/backend/billing/raw_client.py b/sdk/agenta/client/backend/billing/raw_client.py deleted file mode 100644 index 055805a444..0000000000 --- a/sdk/agenta/client/backend/billing/raw_client.py +++ /dev/null @@ -1,805 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.plan import Plan - - -class RawBillingClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def handle_events( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/stripe/events/", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_portal( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/stripe/portals/", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_checkout( - self, - *, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/stripe/checkouts/", - method="POST", - params={ - "plan": plan, - "success_url": success_url, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_plans( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/plans", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def switch_plans( - self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/plans/switch", - method="POST", - params={ - "plan": plan, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_subscription( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/subscription", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def cancel_plan( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/subscription/cancel", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "billing/usage", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawBillingClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def handle_events( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/stripe/events/", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_portal( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/stripe/portals/", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_checkout( - self, - *, - plan: Plan, - success_url: str, - request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - plan : Plan - - success_url : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/stripe/checkouts/", - method="POST", - params={ - "plan": plan, - "success_url": success_url, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_plans( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/plans", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def switch_plans( - self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - plan : Plan - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/plans/switch", - method="POST", - params={ - "plan": plan, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_subscription( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/subscription", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def cancel_plan( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/subscription/cancel", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_usage( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "billing/usage", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/client.py b/sdk/agenta/client/backend/client.py deleted file mode 100644 index 0e17bad524..0000000000 --- a/sdk/agenta/client/backend/client.py +++ /dev/null @@ -1,1276 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import httpx -from .access_control.client import AccessControlClient, AsyncAccessControlClient -from .admin.client import AdminClient, AsyncAdminClient -from .api_keys.client import ApiKeysClient, AsyncApiKeysClient -from .apps.client import AppsClient, AsyncAppsClient -from .bases.client import AsyncBasesClient, BasesClient -from .billing.client import AsyncBillingClient, BillingClient -from .configs.client import AsyncConfigsClient, ConfigsClient -from .containers.client import AsyncContainersClient, ContainersClient -from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .core.request_options import RequestOptions -from .environment import AgentaApiEnvironment -from .environments.client import AsyncEnvironmentsClient, EnvironmentsClient -from .evals.client import AsyncEvalsClient, EvalsClient -from .evaluations.client import AsyncEvaluationsClient, EvaluationsClient -from .evaluators.client import AsyncEvaluatorsClient, EvaluatorsClient -from .human_evaluations.client import ( - AsyncHumanEvaluationsClient, - HumanEvaluationsClient, -) -from .observability.client import AsyncObservabilityClient, ObservabilityClient -from .organization.client import AsyncOrganizationClient, OrganizationClient -from .raw_client import AsyncRawAgentaApi, RawAgentaApi -from .scopes.client import AsyncScopesClient, ScopesClient -from .testsets.client import AsyncTestsetsClient, TestsetsClient -from .tracing.client import AsyncTracingClient, TracingClient -from .types.organization_output import OrganizationOutput -from .types.permission import Permission -from .types.workspace_response import WorkspaceResponse -from .variants.client import AsyncVariantsClient, VariantsClient -from .vault.client import AsyncVaultClient, VaultClient -from .workflows.client import AsyncWorkflowsClient, WorkflowsClient -from .workspace.client import AsyncWorkspaceClient, WorkspaceClient - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class AgentaApi: - """ - Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. - - Parameters - ---------- - base_url : typing.Optional[str] - The base url to use for requests from the client. - - environment : AgentaApiEnvironment - The environment to use for requests from the client. from .environment import AgentaApiEnvironment - - - - Defaults to AgentaApiEnvironment.DEFAULT - - - - api_key : str - timeout : typing.Optional[float] - The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. - - follow_redirects : typing.Optional[bool] - Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. - - httpx_client : typing.Optional[httpx.Client] - The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - """ - - def __init__( - self, - *, - base_url: typing.Optional[str] = None, - environment: AgentaApiEnvironment = AgentaApiEnvironment.DEFAULT, - api_key: str, - timeout: typing.Optional[float] = None, - follow_redirects: typing.Optional[bool] = True, - httpx_client: typing.Optional[httpx.Client] = None, - ): - _defaulted_timeout = ( - timeout - if timeout is not None - else 60 - if httpx_client is None - else httpx_client.timeout.read - ) - self._client_wrapper = SyncClientWrapper( - base_url=_get_base_url(base_url=base_url, environment=environment), - api_key=api_key, - httpx_client=( - httpx_client - if httpx_client is not None - else ( - httpx.Client( - timeout=_defaulted_timeout, follow_redirects=follow_redirects - ) - if follow_redirects is not None - else httpx.Client(timeout=_defaulted_timeout) - ) - ), - timeout=_defaulted_timeout, - ) - self._raw_client = RawAgentaApi(client_wrapper=self._client_wrapper) - self.admin = AdminClient(client_wrapper=self._client_wrapper) - self.organization = OrganizationClient(client_wrapper=self._client_wrapper) - self.evaluations = EvaluationsClient(client_wrapper=self._client_wrapper) - self.human_evaluations = HumanEvaluationsClient( - client_wrapper=self._client_wrapper - ) - self.billing = BillingClient(client_wrapper=self._client_wrapper) - self.access_control = AccessControlClient(client_wrapper=self._client_wrapper) - self.scopes = ScopesClient(client_wrapper=self._client_wrapper) - self.apps = AppsClient(client_wrapper=self._client_wrapper) - self.variants = VariantsClient(client_wrapper=self._client_wrapper) - self.containers = ContainersClient(client_wrapper=self._client_wrapper) - self.evaluators = EvaluatorsClient(client_wrapper=self._client_wrapper) - self.testsets = TestsetsClient(client_wrapper=self._client_wrapper) - self.environments = EnvironmentsClient(client_wrapper=self._client_wrapper) - self.bases = BasesClient(client_wrapper=self._client_wrapper) - self.configs = ConfigsClient(client_wrapper=self._client_wrapper) - self.api_keys = ApiKeysClient(client_wrapper=self._client_wrapper) - self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) - self.tracing = TracingClient(client_wrapper=self._client_wrapper) - self.evals = EvalsClient(client_wrapper=self._client_wrapper) - self.workflows = WorkflowsClient(client_wrapper=self._client_wrapper) - self.observability = ObservabilityClient(client_wrapper=self._client_wrapper) - self.vault = VaultClient(client_wrapper=self._client_wrapper) - - @property - def with_raw_response(self) -> RawAgentaApi: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawAgentaApi - """ - return self._raw_client - - def get_own_org( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> OrganizationOutput: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OrganizationOutput - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.get_own_org() - """ - _response = self._raw_client.get_own_org(request_options=request_options) - return _response.data - - def update_organization( - self, - organization_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.update_organization( - organization_id="organization_id", - ) - """ - _response = self._raw_client.update_organization( - organization_id, - name=name, - description=description, - updated_at=updated_at, - request_options=request_options, - ) - return _response.data - - def create_workspace( - self, - organization_id: str, - *, - name: str, - description: typing.Optional[str] = OMIT, - type: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkspaceResponse: - """ - Parameters - ---------- - organization_id : str - - name : str - - description : typing.Optional[str] - - type : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkspaceResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.create_workspace( - organization_id="organization_id", - name="name", - ) - """ - _response = self._raw_client.create_workspace( - organization_id, - name=name, - description=description, - type=type, - request_options=request_options, - ) - return _response.data - - def update_workspace( - self, - organization_id: str, - workspace_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[dt.datetime] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkspaceResponse: - """ - Parameters - ---------- - organization_id : str - - workspace_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[dt.datetime] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkspaceResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.update_workspace( - organization_id="organization_id", - workspace_id="workspace_id", - ) - """ - _response = self._raw_client.update_workspace( - organization_id, - workspace_id, - name=name, - description=description, - updated_at=updated_at, - request_options=request_options, - ) - return _response.data - - def get_all_workspace_permissions( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[Permission]: - """ - Get all workspace permissions. - - Returns a list of all available workspace permissions. - - Returns: - List[Permission]: A list of Permission objects representing the available workspace permissions. - - Raises: - HTTPException: If there is an error retrieving the workspace permissions. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[Permission] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.get_all_workspace_permissions() - """ - _response = self._raw_client.get_all_workspace_permissions( - request_options=request_options - ) - return _response.data - - def assign_role_to_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Assigns a role to a user in a workspace. - - Args: - payload (UserRole): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.assign_role_to_user( - workspace_id="workspace_id", - email="email", - organization_id="organization_id", - ) - """ - _response = self._raw_client.assign_role_to_user( - workspace_id, - email=email, - organization_id=organization_id, - role=role, - request_options=request_options, - ) - return _response.data - - def unassign_role_from_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Delete a role assignment from a user in a workspace. - - Args: - workspace_id (str): The ID of the workspace. - email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. - role (str): The role to remove from the user. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role assignment was successfully deleted. - - Raises: - HTTPException: If there is an error in the request or the user does not have permission to perform the action. - HTTPException: If there is an error in updating the user's roles. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.unassign_role_from_user( - workspace_id="workspace_id", - email="email", - organization_id="organization_id", - role="role", - ) - """ - _response = self._raw_client.unassign_role_from_user( - workspace_id, - email=email, - organization_id=organization_id, - role=role, - request_options=request_options, - ) - return _response.data - - def delete_accounts( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.delete_accounts() - """ - _response = self._raw_client.delete_accounts(request_options=request_options) - return _response.data - - def health_check( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.health_check() - """ - _response = self._raw_client.health_check(request_options=request_options) - return _response.data - - def fetch_user_profile( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.fetch_user_profile() - """ - _response = self._raw_client.fetch_user_profile(request_options=request_options) - return _response.data - - def reset_user_password( - self, *, user_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - user_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.reset_user_password( - user_id="user_id", - ) - """ - _response = self._raw_client.reset_user_password( - user_id=user_id, request_options=request_options - ) - return _response.data - - -class AsyncAgentaApi: - """ - Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. - - Parameters - ---------- - base_url : typing.Optional[str] - The base url to use for requests from the client. - - environment : AgentaApiEnvironment - The environment to use for requests from the client. from .environment import AgentaApiEnvironment - - - - Defaults to AgentaApiEnvironment.DEFAULT - - - - api_key : str - timeout : typing.Optional[float] - The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. - - follow_redirects : typing.Optional[bool] - Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. - - httpx_client : typing.Optional[httpx.AsyncClient] - The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. - - Examples - -------- - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - """ - - def __init__( - self, - *, - base_url: typing.Optional[str] = None, - environment: AgentaApiEnvironment = AgentaApiEnvironment.DEFAULT, - api_key: str, - timeout: typing.Optional[float] = None, - follow_redirects: typing.Optional[bool] = True, - httpx_client: typing.Optional[httpx.AsyncClient] = None, - ): - _defaulted_timeout = ( - timeout - if timeout is not None - else 60 - if httpx_client is None - else httpx_client.timeout.read - ) - self._client_wrapper = AsyncClientWrapper( - base_url=_get_base_url(base_url=base_url, environment=environment), - api_key=api_key, - httpx_client=( - httpx_client - if httpx_client is not None - else ( - httpx.AsyncClient( - timeout=_defaulted_timeout, follow_redirects=follow_redirects - ) - if follow_redirects is not None - else httpx.AsyncClient(timeout=_defaulted_timeout) - ) - ), - timeout=_defaulted_timeout, - ) - self._raw_client = AsyncRawAgentaApi(client_wrapper=self._client_wrapper) - self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper) - self.organization = AsyncOrganizationClient(client_wrapper=self._client_wrapper) - self.evaluations = AsyncEvaluationsClient(client_wrapper=self._client_wrapper) - self.human_evaluations = AsyncHumanEvaluationsClient( - client_wrapper=self._client_wrapper - ) - self.billing = AsyncBillingClient(client_wrapper=self._client_wrapper) - self.access_control = AsyncAccessControlClient( - client_wrapper=self._client_wrapper - ) - self.scopes = AsyncScopesClient(client_wrapper=self._client_wrapper) - self.apps = AsyncAppsClient(client_wrapper=self._client_wrapper) - self.variants = AsyncVariantsClient(client_wrapper=self._client_wrapper) - self.containers = AsyncContainersClient(client_wrapper=self._client_wrapper) - self.evaluators = AsyncEvaluatorsClient(client_wrapper=self._client_wrapper) - self.testsets = AsyncTestsetsClient(client_wrapper=self._client_wrapper) - self.environments = AsyncEnvironmentsClient(client_wrapper=self._client_wrapper) - self.bases = AsyncBasesClient(client_wrapper=self._client_wrapper) - self.configs = AsyncConfigsClient(client_wrapper=self._client_wrapper) - self.api_keys = AsyncApiKeysClient(client_wrapper=self._client_wrapper) - self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) - self.tracing = AsyncTracingClient(client_wrapper=self._client_wrapper) - self.evals = AsyncEvalsClient(client_wrapper=self._client_wrapper) - self.workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper) - self.observability = AsyncObservabilityClient( - client_wrapper=self._client_wrapper - ) - self.vault = AsyncVaultClient(client_wrapper=self._client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawAgentaApi: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawAgentaApi - """ - return self._raw_client - - async def get_own_org( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> OrganizationOutput: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OrganizationOutput - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.get_own_org() - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_own_org(request_options=request_options) - return _response.data - - async def update_organization( - self, - organization_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - organization_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.update_organization( - organization_id="organization_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_organization( - organization_id, - name=name, - description=description, - updated_at=updated_at, - request_options=request_options, - ) - return _response.data - - async def create_workspace( - self, - organization_id: str, - *, - name: str, - description: typing.Optional[str] = OMIT, - type: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkspaceResponse: - """ - Parameters - ---------- - organization_id : str - - name : str - - description : typing.Optional[str] - - type : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkspaceResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.create_workspace( - organization_id="organization_id", - name="name", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_workspace( - organization_id, - name=name, - description=description, - type=type, - request_options=request_options, - ) - return _response.data - - async def update_workspace( - self, - organization_id: str, - workspace_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[dt.datetime] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkspaceResponse: - """ - Parameters - ---------- - organization_id : str - - workspace_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[dt.datetime] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkspaceResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.update_workspace( - organization_id="organization_id", - workspace_id="workspace_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_workspace( - organization_id, - workspace_id, - name=name, - description=description, - updated_at=updated_at, - request_options=request_options, - ) - return _response.data - - async def get_all_workspace_permissions( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[Permission]: - """ - Get all workspace permissions. - - Returns a list of all available workspace permissions. - - Returns: - List[Permission]: A list of Permission objects representing the available workspace permissions. - - Raises: - HTTPException: If there is an error retrieving the workspace permissions. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[Permission] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.get_all_workspace_permissions() - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_all_workspace_permissions( - request_options=request_options - ) - return _response.data - - async def assign_role_to_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Assigns a role to a user in a workspace. - - Args: - payload (UserRole): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.assign_role_to_user( - workspace_id="workspace_id", - email="email", - organization_id="organization_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.assign_role_to_user( - workspace_id, - email=email, - organization_id=organization_id, - role=role, - request_options=request_options, - ) - return _response.data - - async def unassign_role_from_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Delete a role assignment from a user in a workspace. - - Args: - workspace_id (str): The ID of the workspace. - email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. - role (str): The role to remove from the user. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role assignment was successfully deleted. - - Raises: - HTTPException: If there is an error in the request or the user does not have permission to perform the action. - HTTPException: If there is an error in updating the user's roles. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.unassign_role_from_user( - workspace_id="workspace_id", - email="email", - organization_id="organization_id", - role="role", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unassign_role_from_user( - workspace_id, - email=email, - organization_id=organization_id, - role=role, - request_options=request_options, - ) - return _response.data - - async def delete_accounts( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.delete_accounts() - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete_accounts( - request_options=request_options - ) - return _response.data - - async def health_check( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.health_check() - - - asyncio.run(main()) - """ - _response = await self._raw_client.health_check(request_options=request_options) - return _response.data - - async def fetch_user_profile( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.fetch_user_profile() - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_user_profile( - request_options=request_options - ) - return _response.data - - async def reset_user_password( - self, *, user_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: - """ - Parameters - ---------- - user_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.reset_user_password( - user_id="user_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.reset_user_password( - user_id=user_id, request_options=request_options - ) - return _response.data - - -def _get_base_url( - *, base_url: typing.Optional[str] = None, environment: AgentaApiEnvironment -) -> str: - if base_url is not None: - return base_url - elif environment is not None: - return environment.value - else: - raise Exception( - "Please pass in either base_url or environment to construct the client" - ) diff --git a/sdk/agenta/client/backend/configs/__init__.py b/sdk/agenta/client/backend/configs/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/configs/__init__.py +++ b/sdk/agenta/client/backend/configs/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/configs/client.py b/sdk/agenta/client/backend/configs/client.py index 11b1d9d062..ab54844eb9 100644 --- a/sdk/agenta/client/backend/configs/client.py +++ b/sdk/agenta/client/backend/configs/client.py @@ -1,27 +1,24 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions from ..types.get_config_response import GetConfigResponse -from .raw_client import AsyncRawConfigsClient, RawConfigsClient +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.jsonable_encoder import jsonable_encoder +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) class ConfigsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawConfigsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawConfigsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawConfigsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def get_config( self, @@ -54,18 +51,127 @@ def get_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.configs.get_config( base_id="base_id", ) """ - _response = self._raw_client.get_config( - base_id=base_id, - config_name=config_name, - environment_name=environment_name, + _response = self._client_wrapper.httpx_client.request( + "configs", + method="GET", + params={ + "base_id": base_id, + "config_name": config_name, + "environment_name": environment_name, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + GetConfigResponse, + parse_obj_as( + type_=GetConfigResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def save_config( + self, + *, + base_id: str, + config_name: str, + parameters: typing.Dict[str, typing.Optional[typing.Any]], + overwrite: bool, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Parameters + ---------- + base_id : str + + config_name : str + + parameters : typing.Dict[str, typing.Optional[typing.Any]] + + overwrite : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.configs.save_config( + base_id="base_id", + config_name="config_name", + parameters={"key": "value"}, + overwrite=True, + ) + """ + _response = self._client_wrapper.httpx_client.request( + "configs", + method="POST", + json={ + "base_id": base_id, + "config_name": config_name, + "parameters": parameters, + "overwrite": overwrite, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_config_deployment_revision( self, @@ -92,15 +198,40 @@ def get_config_deployment_revision( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.configs.get_config_deployment_revision( deployment_revision_id="deployment_revision_id", ) """ - _response = self._raw_client.get_config_deployment_revision( - deployment_revision_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"configs/deployment/{jsonable_encoder(deployment_revision_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def revert_deployment_revision( self, @@ -127,31 +258,45 @@ def revert_deployment_revision( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.configs.revert_deployment_revision( deployment_revision_id="deployment_revision_id", ) """ - _response = self._raw_client.revert_deployment_revision( - deployment_revision_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"configs/deployment/{jsonable_encoder(deployment_revision_id)}/revert", + method="POST", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncConfigsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawConfigsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawConfigsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawConfigsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def get_config( self, @@ -186,6 +331,7 @@ async def get_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -197,13 +343,129 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_config( - base_id=base_id, - config_name=config_name, - environment_name=environment_name, + _response = await self._client_wrapper.httpx_client.request( + "configs", + method="GET", + params={ + "base_id": base_id, + "config_name": config_name, + "environment_name": environment_name, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + GetConfigResponse, + parse_obj_as( + type_=GetConfigResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def save_config( + self, + *, + base_id: str, + config_name: str, + parameters: typing.Dict[str, typing.Optional[typing.Any]], + overwrite: bool, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Parameters + ---------- + base_id : str + + config_name : str + + parameters : typing.Dict[str, typing.Optional[typing.Any]] + + overwrite : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.configs.save_config( + base_id="base_id", + config_name="config_name", + parameters={"key": "value"}, + overwrite=True, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "configs", + method="POST", + json={ + "base_id": base_id, + "config_name": config_name, + "parameters": parameters, + "overwrite": overwrite, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_config_deployment_revision( self, @@ -232,6 +494,7 @@ async def get_config_deployment_revision( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -243,10 +506,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_config_deployment_revision( - deployment_revision_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"configs/deployment/{jsonable_encoder(deployment_revision_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def revert_deployment_revision( self, @@ -275,6 +562,7 @@ async def revert_deployment_revision( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -286,7 +574,31 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.revert_deployment_revision( - deployment_revision_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"configs/deployment/{jsonable_encoder(deployment_revision_id)}/revert", + method="POST", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/configs/raw_client.py b/sdk/agenta/client/backend/configs/raw_client.py deleted file mode 100644 index a98dd2a7d8..0000000000 --- a/sdk/agenta/client/backend/configs/raw_client.py +++ /dev/null @@ -1,402 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.get_config_response import GetConfigResponse -from ..types.http_validation_error import HttpValidationError - - -class RawConfigsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get_config( - self, - *, - base_id: str, - config_name: typing.Optional[str] = None, - environment_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[GetConfigResponse]: - """ - Parameters - ---------- - base_id : str - - config_name : typing.Optional[str] - - environment_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[GetConfigResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "configs", - method="GET", - params={ - "base_id": base_id, - "config_name": config_name, - "environment_name": environment_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetConfigResponse, - parse_obj_as( - type_=GetConfigResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_config_deployment_revision( - self, - deployment_revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - deployment_revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"configs/deployment/{jsonable_encoder(deployment_revision_id)}", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def revert_deployment_revision( - self, - deployment_revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - deployment_revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"configs/deployment/{jsonable_encoder(deployment_revision_id)}/revert", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawConfigsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get_config( - self, - *, - base_id: str, - config_name: typing.Optional[str] = None, - environment_name: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[GetConfigResponse]: - """ - Parameters - ---------- - base_id : str - - config_name : typing.Optional[str] - - environment_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[GetConfigResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "configs", - method="GET", - params={ - "base_id": base_id, - "config_name": config_name, - "environment_name": environment_name, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - GetConfigResponse, - parse_obj_as( - type_=GetConfigResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_config_deployment_revision( - self, - deployment_revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - deployment_revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"configs/deployment/{jsonable_encoder(deployment_revision_id)}", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def revert_deployment_revision( - self, - deployment_revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - deployment_revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"configs/deployment/{jsonable_encoder(deployment_revision_id)}/revert", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/containers/__init__.py b/sdk/agenta/client/backend/containers/__init__.py index dadae709c6..3d1974f7ad 100644 --- a/sdk/agenta/client/backend/containers/__init__.py +++ b/sdk/agenta/client/backend/containers/__init__.py @@ -1,3 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file +from .types import ContainerTemplatesResponse + +__all__ = ["ContainerTemplatesResponse"] diff --git a/sdk/agenta/client/backend/containers/client.py b/sdk/agenta/client/backend/containers/client.py index ff926cc18c..b8543e41ab 100644 --- a/sdk/agenta/client/backend/containers/client.py +++ b/sdk/agenta/client/backend/containers/client.py @@ -1,33 +1,195 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper +from .. import core from ..core.request_options import RequestOptions -from .raw_client import AsyncRawContainersClient, RawContainersClient +from ..types.image import Image +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from .types.container_templates_response import ContainerTemplatesResponse +from ..types.uri import Uri +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) class ContainersClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawContainersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + + def build_image( + self, + *, + app_id: str, + base_name: str, + tar_file: core.File, + request_options: typing.Optional[RequestOptions] = None, + ) -> Image: + """ + Builds a Docker image from a tar file containing the application code. + + Args: + app_id (str): The ID of the application to build the image for. + base_name (str): The base name of the image to build. + tar_file (UploadFile): The tar file containing the application code. + + Returns: + Image: The Docker image that was built. + + Parameters + ---------- + app_id : str + + base_name : str + + tar_file : core.File + See core.File for more documentation + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Image + Successful Response + + Examples + -------- + from agenta import AgentaApi - @property - def with_raw_response(self) -> RawContainersClient: + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.containers.build_image( + app_id="app_id", + base_name="base_name", + ) """ - Retrieves a raw implementation of this client that returns raw responses. + _response = self._client_wrapper.httpx_client.request( + "containers/build_image", + method="POST", + params={ + "app_id": app_id, + "base_name": base_name, + }, + data={}, + files={ + "tar_file": tar_file, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Image, + parse_obj_as( + type_=Image, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def restart_container( + self, + *, + variant_id: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, typing.Optional[typing.Any]]: + """ + Restart docker container. + + Args: + payload (RestartAppContainer) -- the required data (app_name and variant_name) + + Parameters + ---------- + variant_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. Returns ------- - RawContainersClient + typing.Dict[str, typing.Optional[typing.Any]] + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.containers.restart_container( + variant_id="variant_id", + ) """ - return self._raw_client + _response = self._client_wrapper.httpx_client.request( + "containers/restart_container", + method="POST", + json={ + "variant_id": variant_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, typing.Optional[typing.Any]], + parse_obj_as( + type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def container_templates( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: + ) -> ContainerTemplatesResponse: """ Returns a list of templates available for creating new containers. + Returns: + Union[List[Template], str]: A list of templates or an error message. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -35,7 +197,7 @@ def container_templates( Returns ------- - typing.Optional[typing.Any] + ContainerTemplatesResponse Successful Response Examples @@ -44,36 +206,296 @@ def container_templates( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.containers.container_templates() """ - _response = self._raw_client.container_templates( - request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "containers/templates", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ContainerTemplatesResponse, + parse_obj_as( + type_=ContainerTemplatesResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def construct_app_container_url( + self, + *, + base_id: typing.Optional[str] = None, + variant_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Uri: + """ + Constructs the URL for an app container based on the provided base_id or variant_id. + + Args: + base_id (Optional[str]): The ID of the base to use for the app container. + variant_id (Optional[str]): The ID of the variant to use for the app container. + request (Request): The request object. + + Returns: + URI: The URI for the app container. + + Raises: + HTTPException: If the base or variant cannot be found or the user does not have access. + + Parameters + ---------- + base_id : typing.Optional[str] + + variant_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Uri + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.containers.construct_app_container_url() + """ + _response = self._client_wrapper.httpx_client.request( + "containers/container_url", + method="GET", + params={ + "base_id": base_id, + "variant_id": variant_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Uri, + parse_obj_as( + type_=Uri, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncContainersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawContainersClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + + async def build_image( + self, + *, + app_id: str, + base_name: str, + tar_file: core.File, + request_options: typing.Optional[RequestOptions] = None, + ) -> Image: + """ + Builds a Docker image from a tar file containing the application code. + + Args: + app_id (str): The ID of the application to build the image for. + base_name (str): The base name of the image to build. + tar_file (UploadFile): The tar file containing the application code. + + Returns: + Image: The Docker image that was built. + + Parameters + ---------- + app_id : str + + base_name : str + + tar_file : core.File + See core.File for more documentation + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Image + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.containers.build_image( + app_id="app_id", + base_name="base_name", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "containers/build_image", + method="POST", + params={ + "app_id": app_id, + "base_name": base_name, + }, + data={}, + files={ + "tar_file": tar_file, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Image, + parse_obj_as( + type_=Image, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - @property - def with_raw_response(self) -> AsyncRawContainersClient: + async def restart_container( + self, + *, + variant_id: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Dict[str, typing.Optional[typing.Any]]: """ - Retrieves a raw implementation of this client that returns raw responses. + Restart docker container. + + Args: + payload (RestartAppContainer) -- the required data (app_name and variant_name) + + Parameters + ---------- + variant_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. Returns ------- - AsyncRawContainersClient + typing.Dict[str, typing.Optional[typing.Any]] + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.containers.restart_container( + variant_id="variant_id", + ) + + + asyncio.run(main()) """ - return self._raw_client + _response = await self._client_wrapper.httpx_client.request( + "containers/restart_container", + method="POST", + json={ + "variant_id": variant_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, typing.Optional[typing.Any]], + parse_obj_as( + type_=typing.Dict[str, typing.Optional[typing.Any]], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def container_templates( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.Optional[typing.Any]: + ) -> ContainerTemplatesResponse: """ Returns a list of templates available for creating new containers. + Returns: + Union[List[Template], str]: A list of templates or an error message. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -81,7 +503,7 @@ async def container_templates( Returns ------- - typing.Optional[typing.Any] + ContainerTemplatesResponse Successful Response Examples @@ -92,6 +514,7 @@ async def container_templates( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -101,7 +524,107 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.container_templates( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "containers/templates", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ContainerTemplatesResponse, + parse_obj_as( + type_=ContainerTemplatesResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def construct_app_container_url( + self, + *, + base_id: typing.Optional[str] = None, + variant_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> Uri: + """ + Constructs the URL for an app container based on the provided base_id or variant_id. + + Args: + base_id (Optional[str]): The ID of the base to use for the app container. + variant_id (Optional[str]): The ID of the variant to use for the app container. + request (Request): The request object. + + Returns: + URI: The URI for the app container. + + Raises: + HTTPException: If the base or variant cannot be found or the user does not have access. + + Parameters + ---------- + base_id : typing.Optional[str] + + variant_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Uri + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.containers.construct_app_container_url() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "containers/container_url", + method="GET", + params={ + "base_id": base_id, + "variant_id": variant_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Uri, + parse_obj_as( + type_=Uri, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/containers/raw_client.py b/sdk/agenta/client/backend/containers/raw_client.py deleted file mode 100644 index 0737859a4e..0000000000 --- a/sdk/agenta/client/backend/containers/raw_client.py +++ /dev/null @@ -1,112 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions - - -class RawContainersClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def container_templates( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Returns a list of templates available for creating new containers. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "containers/templates", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawContainersClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def container_templates( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Returns a list of templates available for creating new containers. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "containers/templates", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/containers/types/__init__.py b/sdk/agenta/client/backend/containers/types/__init__.py new file mode 100644 index 0000000000..b68c5ab25e --- /dev/null +++ b/sdk/agenta/client/backend/containers/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .container_templates_response import ContainerTemplatesResponse + +__all__ = ["ContainerTemplatesResponse"] diff --git a/sdk/agenta/client/backend/containers/types/container_templates_response.py b/sdk/agenta/client/backend/containers/types/container_templates_response.py new file mode 100644 index 0000000000..27177d4d0a --- /dev/null +++ b/sdk/agenta/client/backend/containers/types/container_templates_response.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ...types.template import Template + +ContainerTemplatesResponse = typing.Union[typing.List[Template], str] diff --git a/sdk/agenta/client/backend/core/__init__.py b/sdk/agenta/client/backend/core/__init__.py index 31bbb81894..f03aecbfe1 100644 --- a/sdk/agenta/client/backend/core/__init__.py +++ b/sdk/agenta/client/backend/core/__init__.py @@ -1,13 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - from .api_error import ApiError from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper from .datetime_utils import serialize_datetime from .file import File, convert_file_dict_to_httpx_tuples, with_content_type from .http_client import AsyncHttpClient, HttpClient -from .http_response import AsyncHttpResponse, HttpResponse from .jsonable_encoder import jsonable_encoder from .pydantic_utilities import ( IS_PYDANTIC_V2, @@ -27,12 +24,10 @@ "ApiError", "AsyncClientWrapper", "AsyncHttpClient", - "AsyncHttpResponse", "BaseClientWrapper", "FieldMetadata", "File", "HttpClient", - "HttpResponse", "IS_PYDANTIC_V2", "RequestOptions", "SyncClientWrapper", diff --git a/sdk/agenta/client/backend/core/api_error.py b/sdk/agenta/client/backend/core/api_error.py index 6f850a60cb..da734b5806 100644 --- a/sdk/agenta/client/backend/core/api_error.py +++ b/sdk/agenta/client/backend/core/api_error.py @@ -1,23 +1,17 @@ # This file was auto-generated by Fern from our API Definition. -from typing import Any, Dict, Optional +import typing class ApiError(Exception): - headers: Optional[Dict[str, str]] - status_code: Optional[int] - body: Any + status_code: typing.Optional[int] + body: typing.Any def __init__( - self, - *, - headers: Optional[Dict[str, str]] = None, - status_code: Optional[int] = None, - body: Any = None, - ) -> None: - self.headers = headers + self, *, status_code: typing.Optional[int] = None, body: typing.Any = None + ): self.status_code = status_code self.body = body def __str__(self) -> str: - return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}" + return f"status_code: {self.status_code}, body: {self.body}" diff --git a/sdk/agenta/client/backend/core/client_wrapper.py b/sdk/agenta/client/backend/core/client_wrapper.py index 84887b5aaa..3c2a647bb4 100644 --- a/sdk/agenta/client/backend/core/client_wrapper.py +++ b/sdk/agenta/client/backend/core/client_wrapper.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. import typing - import httpx -from .http_client import AsyncHttpClient, HttpClient +from .http_client import HttpClient +from .http_client import AsyncHttpClient class BaseClientWrapper: @@ -35,7 +35,7 @@ def __init__( api_key: str, base_url: str, timeout: typing.Optional[float] = None, - httpx_client: httpx.Client + httpx_client: httpx.Client, ): super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( @@ -53,7 +53,7 @@ def __init__( api_key: str, base_url: str, timeout: typing.Optional[float] = None, - httpx_client: httpx.AsyncClient + httpx_client: httpx.AsyncClient, ): super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( diff --git a/sdk/agenta/client/backend/core/file.py b/sdk/agenta/client/backend/core/file.py index c6d11fc708..3467175cb7 100644 --- a/sdk/agenta/client/backend/core/file.py +++ b/sdk/agenta/client/backend/core/file.py @@ -53,7 +53,9 @@ def with_content_type(*, file: File, default_content_type: str) -> File: filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore return (filename, content, default_content_type) elif len(file) == 3: - filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore + filename, content, file_content_type = cast( + Tuple[Optional[str], FileContent, Optional[str]], file + ) # type: ignore out_content_type = file_content_type or default_content_type return (filename, content, out_content_type) elif len(file) == 4: diff --git a/sdk/agenta/client/backend/core/force_multipart.py b/sdk/agenta/client/backend/core/force_multipart.py deleted file mode 100644 index ae24ccff1a..0000000000 --- a/sdk/agenta/client/backend/core/force_multipart.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - - -class ForceMultipartDict(dict): - """ - A dictionary subclass that always evaluates to True in boolean contexts. - - This is used to force multipart/form-data encoding in HTTP requests even when - the dictionary is empty, which would normally evaluate to False. - """ - - def __bool__(self): - return True - - -FORCE_MULTIPART = ForceMultipartDict() diff --git a/sdk/agenta/client/backend/core/http_client.py b/sdk/agenta/client/backend/core/http_client.py index 9726651786..2d1652ecbf 100644 --- a/sdk/agenta/client/backend/core/http_client.py +++ b/sdk/agenta/client/backend/core/http_client.py @@ -2,6 +2,7 @@ import asyncio import email.utils +import json import re import time import typing @@ -10,13 +11,12 @@ from random import random import httpx + from .file import File, convert_file_dict_to_httpx_tuples -from .force_multipart import FORCE_MULTIPART from .jsonable_encoder import jsonable_encoder from .query_encoder import encode_query from .remove_none_from_dict import remove_none_from_dict from .request_options import RequestOptions -from httpx._types import RequestFiles INITIAL_RETRY_DELAY_SECONDS = 0.5 MAX_RETRY_DELAY_SECONDS = 10 @@ -148,9 +148,9 @@ def get_request_body( json_body = maybe_filter_request_body(json, request_options, omit) # If you have an empty JSON body, you should just send None - return (json_body if json_body != {} else None), ( - data_body if data_body != {} else None - ) + return ( + json_body if json_body != {} else None + ), data_body if data_body != {} else None class HttpClient: @@ -191,18 +191,12 @@ def request( typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]] ] = None, files: typing.Optional[ - typing.Union[ - typing.Dict[ - str, typing.Optional[typing.Union[File, typing.List[File]]] - ], - typing.List[typing.Tuple[str, File]], - ] + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]] ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, - force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -216,17 +210,6 @@ def request( json=json, data=data, request_options=request_options, omit=omit ) - request_files: typing.Optional[RequestFiles] = ( - convert_file_dict_to_httpx_tuples( - remove_omit_from_dict(remove_none_from_dict(files), omit) - ) - if (files is not None and files is not omit and isinstance(files, dict)) - else None - ) - - if (request_files is None or len(request_files) == 0) and force_multipart: - request_files = FORCE_MULTIPART - response = self.httpx_client.request( method=method, url=urllib.parse.urljoin(f"{base_url}/", path), @@ -266,7 +249,13 @@ def request( json=json_body, data=data_body, content=content, - files=request_files, + files=( + convert_file_dict_to_httpx_tuples( + remove_omit_from_dict(remove_none_from_dict(files), omit) + ) + if (files is not None and files is not omit) + else None + ), timeout=timeout, ) @@ -306,18 +295,12 @@ def stream( typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]] ] = None, files: typing.Optional[ - typing.Union[ - typing.Dict[ - str, typing.Optional[typing.Union[File, typing.List[File]]] - ], - typing.List[typing.Tuple[str, File]], - ] + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]] ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, - force_multipart: typing.Optional[bool] = None, ) -> typing.Iterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -327,17 +310,6 @@ def stream( else self.base_timeout() ) - request_files: typing.Optional[RequestFiles] = ( - convert_file_dict_to_httpx_tuples( - remove_omit_from_dict(remove_none_from_dict(files), omit) - ) - if (files is not None and files is not omit and isinstance(files, dict)) - else None - ) - - if (request_files is None or len(request_files) == 0) and force_multipart: - request_files = FORCE_MULTIPART - json_body, data_body = get_request_body( json=json, data=data, request_options=request_options, omit=omit ) @@ -380,7 +352,13 @@ def stream( json=json_body, data=data_body, content=content, - files=request_files, + files=( + convert_file_dict_to_httpx_tuples( + remove_omit_from_dict(remove_none_from_dict(files), omit) + ) + if (files is not None and files is not omit) + else None + ), timeout=timeout, ) as stream: yield stream @@ -424,18 +402,12 @@ async def request( typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]] ] = None, files: typing.Optional[ - typing.Union[ - typing.Dict[ - str, typing.Optional[typing.Union[File, typing.List[File]]] - ], - typing.List[typing.Tuple[str, File]], - ] + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]] ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, - force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -445,17 +417,6 @@ async def request( else self.base_timeout() ) - request_files: typing.Optional[RequestFiles] = ( - convert_file_dict_to_httpx_tuples( - remove_omit_from_dict(remove_none_from_dict(files), omit) - ) - if (files is not None and files is not omit and isinstance(files, dict)) - else None - ) - - if (request_files is None or len(request_files) == 0) and force_multipart: - request_files = FORCE_MULTIPART - json_body, data_body = get_request_body( json=json, data=data, request_options=request_options, omit=omit ) @@ -500,7 +461,13 @@ async def request( json=json_body, data=data_body, content=content, - files=request_files, + files=( + convert_file_dict_to_httpx_tuples( + remove_omit_from_dict(remove_none_from_dict(files), omit) + ) + if files is not None + else None + ), timeout=timeout, ) @@ -539,18 +506,12 @@ async def stream( typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]] ] = None, files: typing.Optional[ - typing.Union[ - typing.Dict[ - str, typing.Optional[typing.Union[File, typing.List[File]]] - ], - typing.List[typing.Tuple[str, File]], - ] + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]] ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, - force_multipart: typing.Optional[bool] = None, ) -> typing.AsyncIterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -560,17 +521,6 @@ async def stream( else self.base_timeout() ) - request_files: typing.Optional[RequestFiles] = ( - convert_file_dict_to_httpx_tuples( - remove_omit_from_dict(remove_none_from_dict(files), omit) - ) - if (files is not None and files is not omit and isinstance(files, dict)) - else None - ) - - if (request_files is None or len(request_files) == 0) and force_multipart: - request_files = FORCE_MULTIPART - json_body, data_body = get_request_body( json=json, data=data, request_options=request_options, omit=omit ) @@ -613,7 +563,13 @@ async def stream( json=json_body, data=data_body, content=content, - files=request_files, + files=( + convert_file_dict_to_httpx_tuples( + remove_omit_from_dict(remove_none_from_dict(files), omit) + ) + if files is not None + else None + ), timeout=timeout, ) as stream: yield stream diff --git a/sdk/agenta/client/backend/core/http_response.py b/sdk/agenta/client/backend/core/http_response.py deleted file mode 100644 index 48a1798a56..0000000000 --- a/sdk/agenta/client/backend/core/http_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from typing import Dict, Generic, TypeVar - -import httpx - -T = TypeVar("T") -"""Generic to represent the underlying type of the data wrapped by the HTTP response.""" - - -class BaseHttpResponse: - """Minimalist HTTP response wrapper that exposes response headers.""" - - _response: httpx.Response - - def __init__(self, response: httpx.Response): - self._response = response - - @property - def headers(self) -> Dict[str, str]: - return dict(self._response.headers) - - -class HttpResponse(Generic[T], BaseHttpResponse): - """HTTP response wrapper that exposes response headers and data.""" - - _data: T - - def __init__(self, response: httpx.Response, data: T): - super().__init__(response) - self._data = data - - @property - def data(self) -> T: - return self._data - - def close(self) -> None: - self._response.close() - - -class AsyncHttpResponse(Generic[T], BaseHttpResponse): - """HTTP response wrapper that exposes response headers and data.""" - - _data: T - - def __init__(self, response: httpx.Response, data: T): - super().__init__(response) - self._data = data - - @property - def data(self) -> T: - return self._data - - async def close(self) -> None: - await self._response.aclose() diff --git a/sdk/agenta/client/backend/core/jsonable_encoder.py b/sdk/agenta/client/backend/core/jsonable_encoder.py index 90f53dfa72..12a8b52fc2 100644 --- a/sdk/agenta/client/backend/core/jsonable_encoder.py +++ b/sdk/agenta/client/backend/core/jsonable_encoder.py @@ -17,6 +17,7 @@ from typing import Any, Callable, Dict, List, Optional, Set, Union import pydantic + from .datetime_utils import serialize_datetime from .pydantic_utilities import ( IS_PYDANTIC_V2, diff --git a/sdk/agenta/client/backend/core/pydantic_utilities.py b/sdk/agenta/client/backend/core/pydantic_utilities.py index 9035a193ec..147ff03b50 100644 --- a/sdk/agenta/client/backend/core/pydantic_utilities.py +++ b/sdk/agenta/client/backend/core/pydantic_utilities.py @@ -2,83 +2,93 @@ # nopycln: file import datetime as dt +import typing from collections import defaultdict -from typing import ( - Any, - Callable, - ClassVar, - Dict, - List, - Mapping, - Optional, - Set, - Tuple, - Type, - TypeVar, - Union, - cast, -) + +import typing_extensions import pydantic +from .datetime_utils import serialize_datetime +from .serialization import convert_and_respect_annotation_metadata + IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") if IS_PYDANTIC_V2: - from pydantic.v1.datetime_parse import parse_date as parse_date - from pydantic.v1.datetime_parse import parse_datetime as parse_datetime - from pydantic.v1.fields import ModelField as ModelField - from pydantic.v1.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[attr-defined] - from pydantic.v1.typing import get_args as get_args - from pydantic.v1.typing import get_origin as get_origin - from pydantic.v1.typing import is_literal_type as is_literal_type - from pydantic.v1.typing import is_union as is_union + # isort will try to reformat the comments on these imports, which breaks mypy + # isort: off + from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + parse_date as parse_date, + ) + from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + parse_datetime as parse_datetime, + ) + from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + ENCODERS_BY_TYPE as encoders_by_type, + ) + from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + get_args as get_args, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + get_origin as get_origin, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + is_literal_type as is_literal_type, + ) + from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 + is_union as is_union, + ) + from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore[no-redef] - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore[no-redef] - from pydantic.fields import ModelField as ModelField # type: ignore[attr-defined, no-redef] - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[no-redef] - from pydantic.typing import get_args as get_args # type: ignore[no-redef] - from pydantic.typing import get_origin as get_origin # type: ignore[no-redef] - from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef] - from pydantic.typing import is_union as is_union # type: ignore[no-redef] + from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 + from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 + from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 + from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 + from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 + from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 + from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 + from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 + + # isort: on -from .datetime_utils import serialize_datetime -from .serialization import convert_and_respect_annotation_metadata -from typing_extensions import TypeAlias -T = TypeVar("T") -Model = TypeVar("Model", bound=pydantic.BaseModel) +T = typing.TypeVar("T") +Model = typing.TypeVar("Model", bound=pydantic.BaseModel) -def parse_obj_as(type_: Type[T], object_: Any) -> T: +def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: dealiased_object = convert_and_respect_annotation_metadata( object_=object_, annotation=type_, direction="read" ) if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined] + adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 return adapter.validate_python(dealiased_object) - return pydantic.parse_obj_as(type_, dealiased_object) + else: + return pydantic.parse_obj_as(type_, dealiased_object) def to_jsonable_with_fallback( - obj: Any, fallback_serializer: Callable[[Any], Any] -) -> Any: + obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] +) -> typing.Any: if IS_PYDANTIC_V2: from pydantic_core import to_jsonable_python return to_jsonable_python(obj, fallback=fallback_serializer) - return fallback_serializer(obj) + else: + return fallback_serializer(obj) class UniversalBaseModel(pydantic.BaseModel): if IS_PYDANTIC_V2: - model_config: ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # type: ignore[typeddict-unknown-key] + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # Allow fields beginning with `model_` to be used in the model protected_namespaces=(), - ) + ) # type: ignore # Pydantic v2 - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore[attr-defined] - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> Any: # type: ignore[name-defined] + @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2 + def serialize_model( + self, handler: pydantic.SerializerFunctionWrapHandler + ) -> typing.Any: # type: ignore # Pydantic v2 serialized = handler(self) data = { k: serialize_datetime(v) if isinstance(v, dt.datetime) else v @@ -94,7 +104,9 @@ class Config: @classmethod def model_construct( - cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any + cls: typing.Type["Model"], + _fields_set: typing.Optional[typing.Set[str]] = None, + **values: typing.Any, ) -> "Model": dealiased_object = convert_and_respect_annotation_metadata( object_=values, annotation=cls, direction="read" @@ -103,26 +115,30 @@ def model_construct( @classmethod def construct( - cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any + cls: typing.Type["Model"], + _fields_set: typing.Optional[typing.Set[str]] = None, + **values: typing.Any, ) -> "Model": dealiased_object = convert_and_respect_annotation_metadata( object_=values, annotation=cls, direction="read" ) if IS_PYDANTIC_V2: - return super().model_construct(_fields_set, **dealiased_object) # type: ignore[misc] - return super().construct(_fields_set, **dealiased_object) + return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2 + else: + return super().construct(_fields_set, **dealiased_object) - def json(self, **kwargs: Any) -> str: - kwargs_with_defaults = { + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { "by_alias": True, "exclude_unset": True, **kwargs, } if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore[misc] - return super().json(**kwargs_with_defaults) + return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 + else: + return super().json(**kwargs_with_defaults) - def dict(self, **kwargs: Any) -> Dict[str, Any]: + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: """ Override the default dict method to `exclude_unset` by default. This function patches `exclude_unset` to work include fields within non-None default values. @@ -133,21 +149,21 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models # that we have less control over, and this is less intrusive than custom serializers for now. if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset = { + kwargs_with_defaults_exclude_unset: typing.Any = { **kwargs, "by_alias": True, "exclude_unset": True, "exclude_none": False, } - kwargs_with_defaults_exclude_none = { + kwargs_with_defaults_exclude_none: typing.Any = { **kwargs, "by_alias": True, "exclude_none": True, "exclude_unset": False, } dict_dump = deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore[misc] - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore[misc] + super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 + super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 ) else: @@ -169,7 +185,7 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: if default is not None: self.__fields_set__.add(name) - kwargs_with_defaults_exclude_unset_include_fields = { + kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { "by_alias": True, "exclude_unset": True, "include": _fields_set, @@ -186,11 +202,11 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: def _union_list_of_pydantic_dicts( - source: List[Any], destination: List[Any] -) -> List[Any]: - converted_list: List[Any] = [] + source: typing.List[typing.Any], destination: typing.List[typing.Any] +) -> typing.List[typing.Any]: + converted_list: typing.List[typing.Any] = [] for i, item in enumerate(source): - destination_value = destination[i] + destination_value = destination[i] # type: ignore if isinstance(item, dict): converted_list.append(deep_union_pydantic_dicts(item, destination_value)) elif isinstance(item, list): @@ -203,8 +219,8 @@ def _union_list_of_pydantic_dicts( def deep_union_pydantic_dicts( - source: Dict[str, Any], destination: Dict[str, Any] -) -> Dict[str, Any]: + source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] +) -> typing.Dict[str, typing.Any]: for key, value in source.items(): node = destination.setdefault(key, {}) if isinstance(value, dict): @@ -222,18 +238,18 @@ def deep_union_pydantic_dicts( if IS_PYDANTIC_V2: - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore[misc, name-defined, type-arg] + class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 pass - UniversalRootModel: TypeAlias = V2RootModel # type: ignore[misc] + UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore else: - UniversalRootModel: TypeAlias = UniversalBaseModel # type: ignore[misc, no-redef] + UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore -def encode_by_type(o: Any) -> Any: - encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict( - tuple - ) +def encode_by_type(o: typing.Any) -> typing.Any: + encoders_by_class_tuples: typing.Dict[ + typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...] + ] = defaultdict(tuple) for type_, encoder in encoders_by_type.items(): encoders_by_class_tuples[encoder] += (type_,) @@ -244,51 +260,60 @@ def encode_by_type(o: Any) -> Any: return encoder(o) -def update_forward_refs(model: Type["Model"], **localns: Any) -> None: +def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore[attr-defined] + model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 else: model.update_forward_refs(**localns) # Mirrors Pydantic's internal typing -AnyCallable = Callable[..., Any] +AnyCallable = typing.Callable[..., typing.Any] def universal_root_validator( pre: bool = False, -) -> Callable[[AnyCallable], AnyCallable]: +) -> typing.Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return cast(AnyCallable, pydantic.model_validator(mode="before" if pre else "after")(func)) # type: ignore[attr-defined] - return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload] + return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 + else: + return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 return decorator def universal_field_validator( field_name: str, pre: bool = False -) -> Callable[[AnyCallable], AnyCallable]: +) -> typing.Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return cast(AnyCallable, pydantic.field_validator(field_name, mode="before" if pre else "after")(func)) # type: ignore[attr-defined] - return cast(AnyCallable, pydantic.validator(field_name, pre=pre)(func)) + return pydantic.field_validator( + field_name, mode="before" if pre else "after" + )( + func + ) # type: ignore # Pydantic v2 + else: + return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 return decorator -PydanticField = Union[ModelField, pydantic.fields.FieldInfo] +PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] -def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]: +def _get_model_fields( + model: typing.Type["Model"], +) -> typing.Mapping[str, PydanticField]: if IS_PYDANTIC_V2: - return cast(Mapping[str, PydanticField], model.model_fields) # type: ignore[attr-defined] - return cast(Mapping[str, PydanticField], model.__fields__) + return model.model_fields # type: ignore # Pydantic v2 + else: + return model.__fields__ # type: ignore # Pydantic v1 -def _get_field_default(field: PydanticField) -> Any: +def _get_field_default(field: PydanticField) -> typing.Any: try: - value = field.get_default() # type: ignore[union-attr] + value = field.get_default() # type: ignore # Pydantic < v1.10.15 except: value = field.default if IS_PYDANTIC_V2: diff --git a/sdk/agenta/client/backend/core/serialization.py b/sdk/agenta/client/backend/core/serialization.py index ad6eb8d7f7..5679deb8a5 100644 --- a/sdk/agenta/client/backend/core/serialization.py +++ b/sdk/agenta/client/backend/core/serialization.py @@ -4,9 +4,10 @@ import inspect import typing -import pydantic import typing_extensions +import pydantic + class FieldMetadata: """ @@ -162,14 +163,7 @@ def _convert_mapping( direction: typing.Literal["read", "write"], ) -> typing.Mapping[str, object]: converted_object: typing.Dict[str, object] = {} - try: - annotations = typing_extensions.get_type_hints( - expected_type, include_extras=True - ) - except NameError: - # The TypedDict contains a circular reference, so - # we use the __annotations__ attribute directly. - annotations = getattr(expected_type, "__annotations__", {}) + annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) aliases_to_field_names = _get_alias_to_field_name(annotations) for key, value in object_.items(): if direction == "read" and key in aliases_to_field_names: diff --git a/sdk/agenta/client/backend/environment.py b/sdk/agenta/client/backend/environment.py deleted file mode 100644 index 22ed3c9e2d..0000000000 --- a/sdk/agenta/client/backend/environment.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum - - -class AgentaApiEnvironment(enum.Enum): - DEFAULT = "https://cloud.agenta.ai/api" diff --git a/sdk/agenta/client/backend/environments/__init__.py b/sdk/agenta/client/backend/environments/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/environments/__init__.py +++ b/sdk/agenta/client/backend/environments/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/environments/client.py b/sdk/agenta/client/backend/environments/client.py index b58fb77479..c79f50ec01 100644 --- a/sdk/agenta/client/backend/environments/client.py +++ b/sdk/agenta/client/backend/environments/client.py @@ -1,10 +1,14 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from .raw_client import AsyncRawEnvironmentsClient, RawEnvironmentsClient +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -12,25 +16,13 @@ class EnvironmentsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawEnvironmentsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawEnvironmentsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawEnvironmentsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def deploy_to_environment( self, *, environment_name: str, variant_id: str, - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -49,8 +41,6 @@ def deploy_to_environment( variant_id : str - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -65,42 +55,60 @@ def deploy_to_environment( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.environments.deploy_to_environment( environment_name="environment_name", variant_id="variant_id", ) """ - _response = self._raw_client.deploy_to_environment( - environment_name=environment_name, - variant_id=variant_id, - commit_message=commit_message, + _response = self._client_wrapper.httpx_client.request( + "environments/deploy", + method="POST", + json={ + "environment_name": environment_name, + "variant_id": variant_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncEnvironmentsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawEnvironmentsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawEnvironmentsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawEnvironmentsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def deploy_to_environment( self, *, environment_name: str, variant_id: str, - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -119,8 +127,6 @@ async def deploy_to_environment( variant_id : str - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -137,6 +143,7 @@ async def deploy_to_environment( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -149,10 +156,39 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.deploy_to_environment( - environment_name=environment_name, - variant_id=variant_id, - commit_message=commit_message, + _response = await self._client_wrapper.httpx_client.request( + "environments/deploy", + method="POST", + json={ + "environment_name": environment_name, + "variant_id": variant_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/environments/raw_client.py b/sdk/agenta/client/backend/environments/raw_client.py deleted file mode 100644 index 6f2c2644f1..0000000000 --- a/sdk/agenta/client/backend/environments/raw_client.py +++ /dev/null @@ -1,193 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawEnvironmentsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def deploy_to_environment( - self, - *, - environment_name: str, - variant_id: str, - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Deploys a given variant to an environment - - Args: - environment_name: Name of the environment to deploy to. - variant_id: variant id to deploy. - - Raises: - HTTPException: If the deployment fails. - - Parameters - ---------- - environment_name : str - - variant_id : str - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "environments/deploy", - method="POST", - json={ - "environment_name": environment_name, - "variant_id": variant_id, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawEnvironmentsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def deploy_to_environment( - self, - *, - environment_name: str, - variant_id: str, - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Deploys a given variant to an environment - - Args: - environment_name: Name of the environment to deploy to. - variant_id: variant id to deploy. - - Raises: - HTTPException: If the deployment fails. - - Parameters - ---------- - environment_name : str - - variant_id : str - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "environments/deploy", - method="POST", - json={ - "environment_name": environment_name, - "variant_id": variant_id, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/errors/__init__.py b/sdk/agenta/client/backend/errors/__init__.py index 67183e0141..cb64e066bf 100644 --- a/sdk/agenta/client/backend/errors/__init__.py +++ b/sdk/agenta/client/backend/errors/__init__.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - from .unprocessable_entity_error import UnprocessableEntityError __all__ = ["UnprocessableEntityError"] diff --git a/sdk/agenta/client/backend/errors/unprocessable_entity_error.py b/sdk/agenta/client/backend/errors/unprocessable_entity_error.py index 89731bb3b8..47470a70e7 100644 --- a/sdk/agenta/client/backend/errors/unprocessable_entity_error.py +++ b/sdk/agenta/client/backend/errors/unprocessable_entity_error.py @@ -1,15 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -import typing - from ..core.api_error import ApiError from ..types.http_validation_error import HttpValidationError class UnprocessableEntityError(ApiError): - def __init__( - self, - body: HttpValidationError, - headers: typing.Optional[typing.Dict[str, str]] = None, - ): - super().__init__(status_code=422, headers=headers, body=body) + def __init__(self, body: HttpValidationError): + super().__init__(status_code=422, body=body) diff --git a/sdk/agenta/client/backend/evals/__init__.py b/sdk/agenta/client/backend/evals/__init__.py deleted file mode 100644 index dadae709c6..0000000000 --- a/sdk/agenta/client/backend/evals/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/evals/client.py b/sdk/agenta/client/backend/evals/client.py deleted file mode 100644 index bbba094939..0000000000 --- a/sdk/agenta/client/backend/evals/client.py +++ /dev/null @@ -1,1042 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.annotation_create import AnnotationCreate -from ..types.annotation_edit import AnnotationEdit -from ..types.annotation_link_response import AnnotationLinkResponse -from ..types.annotation_query_request import AnnotationQueryRequest -from ..types.annotation_response import AnnotationResponse -from ..types.annotations_response import AnnotationsResponse -from ..types.evaluator import Evaluator -from ..types.evaluator_query_request import EvaluatorQueryRequest -from ..types.evaluator_response import EvaluatorResponse -from ..types.evaluators_response import EvaluatorsResponse -from .raw_client import AsyncRawEvalsClient, RawEvalsClient - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class EvalsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawEvalsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawEvalsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawEvalsClient - """ - return self._raw_client - - def list_evaluators( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> EvaluatorsResponse: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.list_evaluators() - """ - _response = self._raw_client.list_evaluators(request_options=request_options) - return _response.data - - def create_evaluator( - self, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, Evaluator - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.create_evaluator( - evaluator=Evaluator(), - ) - """ - _response = self._raw_client.create_evaluator( - evaluator=evaluator, request_options=request_options - ) - return _response.data - - def fetch_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.fetch_evaluator( - evaluator_id="evaluator_id", - ) - """ - _response = self._raw_client.fetch_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - def edit_evaluator( - self, - evaluator_id: str, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, Evaluator - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.edit_evaluator( - evaluator_id="evaluator_id", - evaluator=Evaluator(), - ) - """ - _response = self._raw_client.edit_evaluator( - evaluator_id, evaluator=evaluator, request_options=request_options - ) - return _response.data - - def archive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.archive_evaluator( - evaluator_id="evaluator_id", - ) - """ - _response = self._raw_client.archive_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - def unarchive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.unarchive_evaluator( - evaluator_id="evaluator_id", - ) - """ - _response = self._raw_client.unarchive_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - def query_evaluators( - self, - *, - request: typing.Optional[EvaluatorQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorsResponse: - """ - Parameters - ---------- - request : typing.Optional[EvaluatorQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.query_evaluators() - """ - _response = self._raw_client.query_evaluators( - request=request, request_options=request_options - ) - return _response.data - - def query_annotations( - self, - *, - request: typing.Optional[AnnotationQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationsResponse: - """ - Parameters - ---------- - request : typing.Optional[AnnotationQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.query_annotations() - """ - _response = self._raw_client.query_annotations( - request=request, request_options=request_options - ) - return _response.data - - def create_annotation( - self, - *, - annotation: AnnotationCreate, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - annotation : AnnotationCreate - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - from agenta import ( - AgentaApi, - AnnotationCreate, - AnnotationLink, - AnnotationReference, - AnnotationReferences, - ) - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.create_annotation( - annotation=AnnotationCreate( - data={}, - references=AnnotationReferences( - evaluator=AnnotationReference(), - ), - links={ - "key": AnnotationLink( - span_id="span_id", - trace_id="trace_id", - ) - }, - ), - ) - """ - _response = self._raw_client.create_annotation( - annotation=annotation, request_options=request_options - ) - return _response.data - - def fetch_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.fetch_annotation( - trace_id="trace_id", - span_id="span_id", - ) - """ - _response = self._raw_client.fetch_annotation( - trace_id, span_id, request_options=request_options - ) - return _response.data - - def delete_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationLinkResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationLinkResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.delete_annotation( - trace_id="trace_id", - span_id="span_id", - ) - """ - _response = self._raw_client.delete_annotation( - trace_id, span_id, request_options=request_options - ) - return _response.data - - def edit_annotation( - self, - trace_id: str, - span_id: str, - *, - annotation: AnnotationEdit, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - annotation : AnnotationEdit - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, AnnotationEdit - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.evals.edit_annotation( - trace_id="trace_id", - span_id="span_id", - annotation=AnnotationEdit( - data={}, - ), - ) - """ - _response = self._raw_client.edit_annotation( - trace_id, span_id, annotation=annotation, request_options=request_options - ) - return _response.data - - -class AsyncEvalsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawEvalsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawEvalsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawEvalsClient - """ - return self._raw_client - - async def list_evaluators( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> EvaluatorsResponse: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.list_evaluators() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_evaluators( - request_options=request_options - ) - return _response.data - - async def create_evaluator( - self, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, Evaluator - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.create_evaluator( - evaluator=Evaluator(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_evaluator( - evaluator=evaluator, request_options=request_options - ) - return _response.data - - async def fetch_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.fetch_evaluator( - evaluator_id="evaluator_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - async def edit_evaluator( - self, - evaluator_id: str, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, Evaluator - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.edit_evaluator( - evaluator_id="evaluator_id", - evaluator=Evaluator(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_evaluator( - evaluator_id, evaluator=evaluator, request_options=request_options - ) - return _response.data - - async def archive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.archive_evaluator( - evaluator_id="evaluator_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.archive_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - async def unarchive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorResponse: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.unarchive_evaluator( - evaluator_id="evaluator_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unarchive_evaluator( - evaluator_id, request_options=request_options - ) - return _response.data - - async def query_evaluators( - self, - *, - request: typing.Optional[EvaluatorQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> EvaluatorsResponse: - """ - Parameters - ---------- - request : typing.Optional[EvaluatorQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - EvaluatorsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.query_evaluators() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_evaluators( - request=request, request_options=request_options - ) - return _response.data - - async def query_annotations( - self, - *, - request: typing.Optional[AnnotationQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationsResponse: - """ - Parameters - ---------- - request : typing.Optional[AnnotationQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.query_annotations() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_annotations( - request=request, request_options=request_options - ) - return _response.data - - async def create_annotation( - self, - *, - annotation: AnnotationCreate, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - annotation : AnnotationCreate - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import ( - AnnotationCreate, - AnnotationLink, - AnnotationReference, - AnnotationReferences, - AsyncAgentaApi, - ) - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.create_annotation( - annotation=AnnotationCreate( - data={}, - references=AnnotationReferences( - evaluator=AnnotationReference(), - ), - links={ - "key": AnnotationLink( - span_id="span_id", - trace_id="trace_id", - ) - }, - ), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_annotation( - annotation=annotation, request_options=request_options - ) - return _response.data - - async def fetch_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.fetch_annotation( - trace_id="trace_id", - span_id="span_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_annotation( - trace_id, span_id, request_options=request_options - ) - return _response.data - - async def delete_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationLinkResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationLinkResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.delete_annotation( - trace_id="trace_id", - span_id="span_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete_annotation( - trace_id, span_id, request_options=request_options - ) - return _response.data - - async def edit_annotation( - self, - trace_id: str, - span_id: str, - *, - annotation: AnnotationEdit, - request_options: typing.Optional[RequestOptions] = None, - ) -> AnnotationResponse: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - annotation : AnnotationEdit - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AnnotationResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AnnotationEdit, AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.evals.edit_annotation( - trace_id="trace_id", - span_id="span_id", - annotation=AnnotationEdit( - data={}, - ), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_annotation( - trace_id, span_id, annotation=annotation, request_options=request_options - ) - return _response.data diff --git a/sdk/agenta/client/backend/evals/raw_client.py b/sdk/agenta/client/backend/evals/raw_client.py deleted file mode 100644 index 9eba64fafc..0000000000 --- a/sdk/agenta/client/backend/evals/raw_client.py +++ /dev/null @@ -1,1549 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.annotation_create import AnnotationCreate -from ..types.annotation_edit import AnnotationEdit -from ..types.annotation_link_response import AnnotationLinkResponse -from ..types.annotation_query_request import AnnotationQueryRequest -from ..types.annotation_response import AnnotationResponse -from ..types.annotations_response import AnnotationsResponse -from ..types.evaluator import Evaluator -from ..types.evaluator_query_request import EvaluatorQueryRequest -from ..types.evaluator_response import EvaluatorResponse -from ..types.evaluators_response import EvaluatorsResponse -from ..types.http_validation_error import HttpValidationError - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawEvalsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_evaluators( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[EvaluatorsResponse]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/evaluators/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorsResponse, - parse_obj_as( - type_=EvaluatorsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_evaluator( - self, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/evaluators/", - method="POST", - json={ - "evaluator": convert_and_respect_annotation_metadata( - object_=evaluator, annotation=Evaluator, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_evaluator( - self, - evaluator_id: str, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}", - method="PUT", - json={ - "evaluator": convert_and_respect_annotation_metadata( - object_=evaluator, annotation=Evaluator, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def archive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unarchive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_evaluators( - self, - *, - request: typing.Optional[EvaluatorQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorsResponse]: - """ - Parameters - ---------- - request : typing.Optional[EvaluatorQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/evaluators/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=EvaluatorQueryRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorsResponse, - parse_obj_as( - type_=EvaluatorsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_annotations( - self, - *, - request: typing.Optional[AnnotationQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AnnotationsResponse]: - """ - Parameters - ---------- - request : typing.Optional[AnnotationQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AnnotationsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/annotations/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=AnnotationQueryRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationsResponse, - parse_obj_as( - type_=AnnotationsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_annotation( - self, - *, - annotation: AnnotationCreate, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - annotation : AnnotationCreate - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AnnotationResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/annotations/", - method="POST", - json={ - "annotation": convert_and_respect_annotation_metadata( - object_=annotation, annotation=AnnotationCreate, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AnnotationResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AnnotationLinkResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AnnotationLinkResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationLinkResponse, - parse_obj_as( - type_=AnnotationLinkResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_annotation( - self, - trace_id: str, - span_id: str, - *, - annotation: AnnotationEdit, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - annotation : AnnotationEdit - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AnnotationResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="PATCH", - json={ - "annotation": convert_and_respect_annotation_metadata( - object_=annotation, annotation=AnnotationEdit, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawEvalsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_evaluators( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[EvaluatorsResponse]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/evaluators/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorsResponse, - parse_obj_as( - type_=EvaluatorsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_evaluator( - self, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/evaluators/", - method="POST", - json={ - "evaluator": convert_and_respect_annotation_metadata( - object_=evaluator, annotation=Evaluator, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_evaluator( - self, - evaluator_id: str, - *, - evaluator: Evaluator, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - evaluator : Evaluator - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}", - method="PUT", - json={ - "evaluator": convert_and_respect_annotation_metadata( - object_=evaluator, annotation=Evaluator, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def archive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unarchive_evaluator( - self, - evaluator_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorResponse]: - """ - Parameters - ---------- - evaluator_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/evaluators/{jsonable_encoder(evaluator_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorResponse, - parse_obj_as( - type_=EvaluatorResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_evaluators( - self, - *, - request: typing.Optional[EvaluatorQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorsResponse]: - """ - Parameters - ---------- - request : typing.Optional[EvaluatorQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/evaluators/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=EvaluatorQueryRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorsResponse, - parse_obj_as( - type_=EvaluatorsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_annotations( - self, - *, - request: typing.Optional[AnnotationQueryRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AnnotationsResponse]: - """ - Parameters - ---------- - request : typing.Optional[AnnotationQueryRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AnnotationsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/annotations/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=AnnotationQueryRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationsResponse, - parse_obj_as( - type_=AnnotationsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_annotation( - self, - *, - annotation: AnnotationCreate, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - annotation : AnnotationCreate - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AnnotationResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/annotations/", - method="POST", - json={ - "annotation": convert_and_respect_annotation_metadata( - object_=annotation, annotation=AnnotationCreate, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AnnotationResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_annotation( - self, - trace_id: str, - span_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AnnotationLinkResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AnnotationLinkResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationLinkResponse, - parse_obj_as( - type_=AnnotationLinkResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_annotation( - self, - trace_id: str, - span_id: str, - *, - annotation: AnnotationEdit, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AnnotationResponse]: - """ - Parameters - ---------- - trace_id : str - - span_id : str - - annotation : AnnotationEdit - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AnnotationResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/annotations/{jsonable_encoder(trace_id)}/{jsonable_encoder(span_id)}", - method="PATCH", - json={ - "annotation": convert_and_respect_annotation_metadata( - object_=annotation, annotation=AnnotationEdit, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AnnotationResponse, - parse_obj_as( - type_=AnnotationResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/evaluations/__init__.py b/sdk/agenta/client/backend/evaluations/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/evaluations/__init__.py +++ b/sdk/agenta/client/backend/evaluations/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/evaluations/client.py b/sdk/agenta/client/backend/evaluations/client.py index d1210a8cd5..947ffdeac3 100644 --- a/sdk/agenta/client/backend/evaluations/client.py +++ b/sdk/agenta/client/backend/evaluations/client.py @@ -1,13 +1,19 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError from ..types.evaluation import Evaluation -from ..types.evaluation_scenario import EvaluationScenario from ..types.llm_run_rate_limit import LlmRunRateLimit -from .raw_client import AsyncRawEvaluationsClient, RawEvaluationsClient +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.jsonable_encoder import jsonable_encoder +from ..types.evaluation_scenario import EvaluationScenario +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -15,18 +21,7 @@ class EvaluationsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawEvaluationsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawEvaluationsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawEvaluationsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def fetch_evaluation_ids( self, @@ -69,17 +64,44 @@ def fetch_evaluation_ids( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_evaluation_ids( resource_type="resource_type", ) """ - _response = self._raw_client.fetch_evaluation_ids( - resource_type=resource_type, - resource_ids=resource_ids, + _response = self._client_wrapper.httpx_client.request( + "evaluations/by_resource", + method="GET", + params={ + "resource_type": resource_type, + "resource_ids": resource_ids, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_list_evaluations( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -111,24 +133,55 @@ def fetch_list_evaluations( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_list_evaluations( app_id="app_id", ) """ - _response = self._raw_client.fetch_list_evaluations( - app_id=app_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluations", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluation], + parse_obj_as( + type_=typing.List[Evaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_evaluation( self, *, app_id: str, - revisions_ids: typing.Sequence[str], + variant_ids: typing.Sequence[str], evaluators_configs: typing.Sequence[str], testset_id: str, rate_limit: LlmRunRateLimit, + lm_providers_keys: typing.Optional[ + typing.Dict[str, typing.Optional[str]] + ] = OMIT, correct_answer_column: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Evaluation]: @@ -143,7 +196,7 @@ def create_evaluation( ---------- app_id : str - revisions_ids : typing.Sequence[str] + variant_ids : typing.Sequence[str] evaluators_configs : typing.Sequence[str] @@ -151,6 +204,8 @@ def create_evaluation( rate_limit : LlmRunRateLimit + lm_providers_keys : typing.Optional[typing.Dict[str, typing.Optional[str]]] + correct_answer_column : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -167,10 +222,11 @@ def create_evaluation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.create_evaluation( app_id="app_id", - revisions_ids=["revisions_ids"], + variant_ids=["variant_ids"], evaluators_configs=["evaluators_configs"], testset_id="testset_id", rate_limit=LlmRunRateLimit( @@ -181,16 +237,49 @@ def create_evaluation( ), ) """ - _response = self._raw_client.create_evaluation( - app_id=app_id, - revisions_ids=revisions_ids, - evaluators_configs=evaluators_configs, - testset_id=testset_id, - rate_limit=rate_limit, - correct_answer_column=correct_answer_column, + _response = self._client_wrapper.httpx_client.request( + "evaluations", + method="POST", + json={ + "app_id": app_id, + "variant_ids": variant_ids, + "evaluators_configs": evaluators_configs, + "testset_id": testset_id, + "rate_limit": convert_and_respect_annotation_metadata( + object_=rate_limit, annotation=LlmRunRateLimit, direction="write" + ), + "lm_providers_keys": lm_providers_keys, + "correct_answer_column": correct_answer_column, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluation], + parse_obj_as( + type_=typing.List[Evaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_evaluations( self, @@ -225,15 +314,44 @@ def delete_evaluations( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.delete_evaluations( evaluations_ids=["evaluations_ids"], ) """ - _response = self._raw_client.delete_evaluations( - evaluations_ids=evaluations_ids, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluations", + method="DELETE", + json={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_evaluation_status( self, @@ -269,15 +387,40 @@ def fetch_evaluation_status( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_evaluation_status( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_evaluation_status( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/status", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_evaluation_results( self, @@ -313,15 +456,40 @@ def fetch_evaluation_results( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_evaluation_results( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_evaluation_results( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/results", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_evaluation_scenarios( self, @@ -359,15 +527,40 @@ def fetch_evaluation_scenarios( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_evaluation_scenarios( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_evaluation_scenarios( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EvaluationScenario], + parse_obj_as( + type_=typing.List[EvaluationScenario], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_evaluation( self, @@ -402,17 +595,42 @@ def fetch_evaluation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluations.fetch_evaluation( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_evaluation( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Evaluation, + parse_obj_as( + type_=Evaluation, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def fetch_evaluation_scenarios_comparison_results( + def fetch_evaluation_scenarios( self, *, evaluations_ids: str, @@ -448,31 +666,48 @@ def fetch_evaluation_scenarios_comparison_results( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.evaluations.fetch_evaluation_scenarios_comparison_results( + client.evaluations.fetch_evaluation_scenarios( evaluations_ids="evaluations_ids", ) """ - _response = self._raw_client.fetch_evaluation_scenarios_comparison_results( - evaluations_ids=evaluations_ids, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluations/evaluation_scenarios/comparison-results", + method="GET", + params={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncEvaluationsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawEvaluationsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawEvaluationsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawEvaluationsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def fetch_evaluation_ids( self, @@ -517,6 +752,7 @@ async def fetch_evaluation_ids( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -528,12 +764,38 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_evaluation_ids( - resource_type=resource_type, - resource_ids=resource_ids, + _response = await self._client_wrapper.httpx_client.request( + "evaluations/by_resource", + method="GET", + params={ + "resource_type": resource_type, + "resource_ids": resource_ids, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_list_evaluations( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -567,6 +829,7 @@ async def fetch_list_evaluations( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -578,19 +841,49 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_list_evaluations( - app_id=app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "evaluations", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluation], + parse_obj_as( + type_=typing.List[Evaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_evaluation( self, *, app_id: str, - revisions_ids: typing.Sequence[str], + variant_ids: typing.Sequence[str], evaluators_configs: typing.Sequence[str], testset_id: str, rate_limit: LlmRunRateLimit, + lm_providers_keys: typing.Optional[ + typing.Dict[str, typing.Optional[str]] + ] = OMIT, correct_answer_column: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Evaluation]: @@ -605,7 +898,7 @@ async def create_evaluation( ---------- app_id : str - revisions_ids : typing.Sequence[str] + variant_ids : typing.Sequence[str] evaluators_configs : typing.Sequence[str] @@ -613,6 +906,8 @@ async def create_evaluation( rate_limit : LlmRunRateLimit + lm_providers_keys : typing.Optional[typing.Dict[str, typing.Optional[str]]] + correct_answer_column : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -631,13 +926,14 @@ async def create_evaluation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: await client.evaluations.create_evaluation( app_id="app_id", - revisions_ids=["revisions_ids"], + variant_ids=["variant_ids"], evaluators_configs=["evaluators_configs"], testset_id="testset_id", rate_limit=LlmRunRateLimit( @@ -651,16 +947,49 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_evaluation( - app_id=app_id, - revisions_ids=revisions_ids, - evaluators_configs=evaluators_configs, - testset_id=testset_id, - rate_limit=rate_limit, - correct_answer_column=correct_answer_column, + _response = await self._client_wrapper.httpx_client.request( + "evaluations", + method="POST", + json={ + "app_id": app_id, + "variant_ids": variant_ids, + "evaluators_configs": evaluators_configs, + "testset_id": testset_id, + "rate_limit": convert_and_respect_annotation_metadata( + object_=rate_limit, annotation=LlmRunRateLimit, direction="write" + ), + "lm_providers_keys": lm_providers_keys, + "correct_answer_column": correct_answer_column, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluation], + parse_obj_as( + type_=typing.List[Evaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_evaluations( self, @@ -697,6 +1026,7 @@ async def delete_evaluations( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -708,10 +1038,38 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_evaluations( - evaluations_ids=evaluations_ids, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "evaluations", + method="DELETE", + json={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_evaluation_status( self, @@ -749,6 +1107,7 @@ async def fetch_evaluation_status( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -760,10 +1119,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_evaluation_status( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/status", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_evaluation_results( self, @@ -801,6 +1184,7 @@ async def fetch_evaluation_results( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -812,10 +1196,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_evaluation_results( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/results", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_evaluation_scenarios( self, @@ -855,6 +1263,7 @@ async def fetch_evaluation_scenarios( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -866,10 +1275,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_evaluation_scenarios( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EvaluationScenario], + parse_obj_as( + type_=typing.List[EvaluationScenario], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_evaluation( self, @@ -906,6 +1339,7 @@ async def fetch_evaluation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -917,12 +1351,36 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_evaluation( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluations/{jsonable_encoder(evaluation_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Evaluation, + parse_obj_as( + type_=Evaluation, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - async def fetch_evaluation_scenarios_comparison_results( + async def fetch_evaluation_scenarios( self, *, evaluations_ids: str, @@ -960,20 +1418,46 @@ async def fetch_evaluation_scenarios_comparison_results( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.evaluations.fetch_evaluation_scenarios_comparison_results( + await client.evaluations.fetch_evaluation_scenarios( evaluations_ids="evaluations_ids", ) asyncio.run(main()) """ - _response = ( - await self._raw_client.fetch_evaluation_scenarios_comparison_results( - evaluations_ids=evaluations_ids, request_options=request_options - ) + _response = await self._client_wrapper.httpx_client.request( + "evaluations/evaluation_scenarios/comparison-results", + method="GET", + params={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/evaluations/raw_client.py b/sdk/agenta/client/backend/evaluations/raw_client.py deleted file mode 100644 index e763f5505c..0000000000 --- a/sdk/agenta/client/backend/evaluations/raw_client.py +++ /dev/null @@ -1,1344 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.evaluation import Evaluation -from ..types.evaluation_scenario import EvaluationScenario -from ..types.http_validation_error import HttpValidationError -from ..types.llm_run_rate_limit import LlmRunRateLimit - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawEvaluationsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def fetch_evaluation_ids( - self, - *, - resource_type: str, - resource_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[str]]: - """ - Fetches evaluation ids for a given resource type and id. - - Arguments: - app_id (str): The ID of the app for which to fetch evaluations. - resource_type (str): The type of resource for which to fetch evaluations. - resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. - - Raises: - HTTPException: If the resource_type is invalid or access is denied. - - Returns: - List[str]: A list of evaluation ids. - - Parameters - ---------- - resource_type : str - - resource_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[str]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluations/by_resource", - method="GET", - params={ - "resource_type": resource_type, - "resource_ids": resource_ids, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_list_evaluations( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[Evaluation]]: - """ - Fetches a list of evaluations, optionally filtered by an app ID. - - Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - - Returns: - List[Evaluation]: A list of evaluations. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[Evaluation]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluations", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Evaluation], - parse_obj_as( - type_=typing.List[Evaluation], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_evaluation( - self, - *, - app_id: str, - revisions_ids: typing.Sequence[str], - evaluators_configs: typing.Sequence[str], - testset_id: str, - rate_limit: LlmRunRateLimit, - correct_answer_column: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[Evaluation]]: - """ - Creates a new comparison table document - Raises: - HTTPException: _description_ - Returns: - _description_ - - Parameters - ---------- - app_id : str - - revisions_ids : typing.Sequence[str] - - evaluators_configs : typing.Sequence[str] - - testset_id : str - - rate_limit : LlmRunRateLimit - - correct_answer_column : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[Evaluation]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluations", - method="POST", - json={ - "app_id": app_id, - "revisions_ids": revisions_ids, - "evaluators_configs": evaluators_configs, - "testset_id": testset_id, - "rate_limit": convert_and_respect_annotation_metadata( - object_=rate_limit, annotation=LlmRunRateLimit, direction="write" - ), - "correct_answer_column": correct_answer_column, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Evaluation], - parse_obj_as( - type_=typing.List[Evaluation], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_evaluations( - self, - *, - evaluations_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[str]]: - """ - Delete specific comparison tables based on their unique IDs. - - Args: - delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. - - Returns: - A list of the deleted comparison tables' IDs. - - Parameters - ---------- - evaluations_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[str]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluations", - method="DELETE", - json={ - "evaluations_ids": evaluations_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluation_status( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Fetches the status of the evaluation. - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - (str): the evaluation status - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/status", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluation_results( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Fetches the results of the evaluation - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - _type_: _description_ - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/results", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluation_scenarios( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[EvaluationScenario]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[EvaluationScenario]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EvaluationScenario], - parse_obj_as( - type_=typing.List[EvaluationScenario], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluation( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[Evaluation]: - """ - Fetches a single evaluation based on its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - Evaluation: The fetched evaluation. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[Evaluation] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Evaluation, - parse_obj_as( - type_=Evaluation, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_evaluation_scenarios_comparison_results( - self, - *, - evaluations_ids: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluations_ids : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluations/evaluation_scenarios/comparison-results", - method="GET", - params={ - "evaluations_ids": evaluations_ids, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawEvaluationsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def fetch_evaluation_ids( - self, - *, - resource_type: str, - resource_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[str]]: - """ - Fetches evaluation ids for a given resource type and id. - - Arguments: - app_id (str): The ID of the app for which to fetch evaluations. - resource_type (str): The type of resource for which to fetch evaluations. - resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations. - - Raises: - HTTPException: If the resource_type is invalid or access is denied. - - Returns: - List[str]: A list of evaluation ids. - - Parameters - ---------- - resource_type : str - - resource_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[str]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluations/by_resource", - method="GET", - params={ - "resource_type": resource_type, - "resource_ids": resource_ids, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_list_evaluations( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[Evaluation]]: - """ - Fetches a list of evaluations, optionally filtered by an app ID. - - Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - - Returns: - List[Evaluation]: A list of evaluations. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[Evaluation]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluations", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Evaluation], - parse_obj_as( - type_=typing.List[Evaluation], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_evaluation( - self, - *, - app_id: str, - revisions_ids: typing.Sequence[str], - evaluators_configs: typing.Sequence[str], - testset_id: str, - rate_limit: LlmRunRateLimit, - correct_answer_column: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[Evaluation]]: - """ - Creates a new comparison table document - Raises: - HTTPException: _description_ - Returns: - _description_ - - Parameters - ---------- - app_id : str - - revisions_ids : typing.Sequence[str] - - evaluators_configs : typing.Sequence[str] - - testset_id : str - - rate_limit : LlmRunRateLimit - - correct_answer_column : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[Evaluation]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluations", - method="POST", - json={ - "app_id": app_id, - "revisions_ids": revisions_ids, - "evaluators_configs": evaluators_configs, - "testset_id": testset_id, - "rate_limit": convert_and_respect_annotation_metadata( - object_=rate_limit, annotation=LlmRunRateLimit, direction="write" - ), - "correct_answer_column": correct_answer_column, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Evaluation], - parse_obj_as( - type_=typing.List[Evaluation], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_evaluations( - self, - *, - evaluations_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[str]]: - """ - Delete specific comparison tables based on their unique IDs. - - Args: - delete_evaluations (List[str]): The unique identifiers of the comparison tables to delete. - - Returns: - A list of the deleted comparison tables' IDs. - - Parameters - ---------- - evaluations_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[str]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluations", - method="DELETE", - json={ - "evaluations_ids": evaluations_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluation_status( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Fetches the status of the evaluation. - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - (str): the evaluation status - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/status", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluation_results( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Fetches the results of the evaluation - - Args: - evaluation_id (str): the evaluation id - request (Request): the request object - - Returns: - _type_: _description_ - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/results", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluation_scenarios( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[EvaluationScenario]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[EvaluationScenario]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EvaluationScenario], - parse_obj_as( - type_=typing.List[EvaluationScenario], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluation( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[Evaluation]: - """ - Fetches a single evaluation based on its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - Evaluation: The fetched evaluation. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[Evaluation] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluations/{jsonable_encoder(evaluation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - Evaluation, - parse_obj_as( - type_=Evaluation, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_evaluation_scenarios_comparison_results( - self, - *, - evaluations_ids: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluations_ids : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluations/evaluation_scenarios/comparison-results", - method="GET", - params={ - "evaluations_ids": evaluations_ids, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/evaluators/__init__.py b/sdk/agenta/client/backend/evaluators/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/evaluators/__init__.py +++ b/sdk/agenta/client/backend/evaluators/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/evaluators/client.py b/sdk/agenta/client/backend/evaluators/client.py index 1973fe2ffd..ecd8fb554b 100644 --- a/sdk/agenta/client/backend/evaluators/client.py +++ b/sdk/agenta/client/backend/evaluators/client.py @@ -1,14 +1,19 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.evaluator_config import EvaluatorConfig +from ..types.evaluator import Evaluator +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError from ..types.evaluator_mapping_output_interface import EvaluatorMappingOutputInterface +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError from ..types.evaluator_output_interface import EvaluatorOutputInterface -from ..types.legacy_evaluator import LegacyEvaluator -from .raw_client import AsyncRawEvaluatorsClient, RawEvaluatorsClient +from ..core.jsonable_encoder import jsonable_encoder +from ..types.evaluator_config import EvaluatorConfig +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -16,22 +21,11 @@ class EvaluatorsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawEvaluatorsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawEvaluatorsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawEvaluatorsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def get_evaluators_endpoint( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LegacyEvaluator]: + ) -> typing.List[Evaluator]: """ Endpoint to fetch a list of evaluators. @@ -45,7 +39,7 @@ def get_evaluators_endpoint( Returns ------- - typing.List[LegacyEvaluator] + typing.List[Evaluator] Successful Response Examples @@ -54,13 +48,28 @@ def get_evaluators_endpoint( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.get_evaluators_endpoint() """ - _response = self._raw_client.get_evaluators_endpoint( - request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluators", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluator], + parse_obj_as( + type_=typing.List[Evaluator], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def evaluator_data_map( self, @@ -99,16 +108,49 @@ def evaluator_data_map( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.evaluator_data_map( inputs={"key": "value"}, mapping={"key": "value"}, ) """ - _response = self._raw_client.evaluator_data_map( - inputs=inputs, mapping=mapping, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluators/map", + method="POST", + json={ + "inputs": inputs, + "mapping": mapping, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorMappingOutputInterface, + parse_obj_as( + type_=EvaluatorMappingOutputInterface, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def evaluator_run( self, @@ -156,19 +198,49 @@ def evaluator_run( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.evaluator_run( evaluator_key="evaluator_key", ) """ - _response = self._raw_client.evaluator_run( - evaluator_key, - inputs=inputs, - settings=settings, - credentials=credentials, + _response = self._client_wrapper.httpx_client.request( + f"evaluators/{jsonable_encoder(evaluator_key)}/run", + method="POST", + json={ + "inputs": inputs, + "settings": settings, + "credentials": credentials, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorOutputInterface, + parse_obj_as( + type_=EvaluatorOutputInterface, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_evaluator_configs( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -200,15 +272,43 @@ def get_evaluator_configs( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.get_evaluator_configs( app_id="app_id", ) """ - _response = self._raw_client.get_evaluator_configs( - app_id=app_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "evaluators/configs", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EvaluatorConfig], + parse_obj_as( + type_=typing.List[EvaluatorConfig], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_new_evaluator_config( self, @@ -252,6 +352,7 @@ def create_new_evaluator_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.create_new_evaluator_config( app_id="app_id", @@ -260,14 +361,44 @@ def create_new_evaluator_config( settings_values={"key": "value"}, ) """ - _response = self._raw_client.create_new_evaluator_config( - app_id=app_id, - name=name, - evaluator_key=evaluator_key, - settings_values=settings_values, + _response = self._client_wrapper.httpx_client.request( + "evaluators/configs", + method="POST", + json={ + "app_id": app_id, + "name": name, + "evaluator_key": evaluator_key, + "settings_values": settings_values, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_evaluator_config( self, @@ -299,15 +430,40 @@ def get_evaluator_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.get_evaluator_config( evaluator_config_id="evaluator_config_id", ) """ - _response = self._raw_client.get_evaluator_config( - evaluator_config_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_evaluator_config( self, @@ -350,19 +506,49 @@ def update_evaluator_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.update_evaluator_config( evaluator_config_id="evaluator_config_id", ) """ - _response = self._raw_client.update_evaluator_config( - evaluator_config_id, - name=name, - evaluator_key=evaluator_key, - settings_values=settings_values, + _response = self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="PUT", + json={ + "name": name, + "evaluator_key": evaluator_key, + "settings_values": settings_values, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_evaluator_config( self, @@ -397,35 +583,49 @@ def delete_evaluator_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.evaluators.delete_evaluator_config( evaluator_config_id="evaluator_config_id", ) """ - _response = self._raw_client.delete_evaluator_config( - evaluator_config_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncEvaluatorsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawEvaluatorsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawEvaluatorsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawEvaluatorsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def get_evaluators_endpoint( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[LegacyEvaluator]: + ) -> typing.List[Evaluator]: """ Endpoint to fetch a list of evaluators. @@ -439,7 +639,7 @@ async def get_evaluators_endpoint( Returns ------- - typing.List[LegacyEvaluator] + typing.List[Evaluator] Successful Response Examples @@ -450,6 +650,7 @@ async def get_evaluators_endpoint( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -459,10 +660,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_evaluators_endpoint( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "evaluators", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Evaluator], + parse_obj_as( + type_=typing.List[Evaluator], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def evaluator_data_map( self, @@ -503,6 +718,7 @@ async def evaluator_data_map( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -515,10 +731,42 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.evaluator_data_map( - inputs=inputs, mapping=mapping, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "evaluators/map", + method="POST", + json={ + "inputs": inputs, + "mapping": mapping, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorMappingOutputInterface, + parse_obj_as( + type_=EvaluatorMappingOutputInterface, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def evaluator_run( self, @@ -568,6 +816,7 @@ async def evaluator_run( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -579,14 +828,43 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.evaluator_run( - evaluator_key, - inputs=inputs, - settings=settings, - credentials=credentials, + _response = await self._client_wrapper.httpx_client.request( + f"evaluators/{jsonable_encoder(evaluator_key)}/run", + method="POST", + json={ + "inputs": inputs, + "settings": settings, + "credentials": credentials, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorOutputInterface, + parse_obj_as( + type_=EvaluatorOutputInterface, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_evaluator_configs( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -620,6 +898,7 @@ async def get_evaluator_configs( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -631,10 +910,37 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_evaluator_configs( - app_id=app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "evaluators/configs", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[EvaluatorConfig], + parse_obj_as( + type_=typing.List[EvaluatorConfig], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_new_evaluator_config( self, @@ -680,6 +986,7 @@ async def create_new_evaluator_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -694,14 +1001,44 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_new_evaluator_config( - app_id=app_id, - name=name, - evaluator_key=evaluator_key, - settings_values=settings_values, + _response = await self._client_wrapper.httpx_client.request( + "evaluators/configs", + method="POST", + json={ + "app_id": app_id, + "name": name, + "evaluator_key": evaluator_key, + "settings_values": settings_values, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_evaluator_config( self, @@ -735,6 +1072,7 @@ async def get_evaluator_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -746,10 +1084,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_evaluator_config( - evaluator_config_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_evaluator_config( self, @@ -794,6 +1156,7 @@ async def update_evaluator_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -805,14 +1168,43 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_evaluator_config( - evaluator_config_id, - name=name, - evaluator_key=evaluator_key, - settings_values=settings_values, + _response = await self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="PUT", + json={ + "name": name, + "evaluator_key": evaluator_key, + "settings_values": settings_values, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + EvaluatorConfig, + parse_obj_as( + type_=EvaluatorConfig, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_evaluator_config( self, @@ -849,6 +1241,7 @@ async def delete_evaluator_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -860,7 +1253,31 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_evaluator_config( - evaluator_config_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + bool, + parse_obj_as( + type_=bool, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/evaluators/raw_client.py b/sdk/agenta/client/backend/evaluators/raw_client.py deleted file mode 100644 index c951330055..0000000000 --- a/sdk/agenta/client/backend/evaluators/raw_client.py +++ /dev/null @@ -1,1182 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.evaluator_config import EvaluatorConfig -from ..types.evaluator_mapping_output_interface import EvaluatorMappingOutputInterface -from ..types.evaluator_output_interface import EvaluatorOutputInterface -from ..types.http_validation_error import HttpValidationError -from ..types.legacy_evaluator import LegacyEvaluator - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawEvaluatorsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get_evaluators_endpoint( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[LegacyEvaluator]]: - """ - Endpoint to fetch a list of evaluators. - - Returns: - List[Evaluator]: A list of evaluator objects. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[LegacyEvaluator]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluators", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[LegacyEvaluator], - parse_obj_as( - type_=typing.List[LegacyEvaluator], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def evaluator_data_map( - self, - *, - inputs: typing.Dict[str, typing.Optional[typing.Any]], - mapping: typing.Dict[str, typing.Optional[typing.Any]], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorMappingOutputInterface]: - """ - Endpoint to map the experiment data tree to evaluator interface. - - Args: - request (Request): The request object. - payload (EvaluatorMappingInputInterface): The payload containing the request data. - - Returns: - EvaluatorMappingOutputInterface: the evaluator mapping output object - - Parameters - ---------- - inputs : typing.Dict[str, typing.Optional[typing.Any]] - - mapping : typing.Dict[str, typing.Optional[typing.Any]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorMappingOutputInterface] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluators/map", - method="POST", - json={ - "inputs": inputs, - "mapping": mapping, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorMappingOutputInterface, - parse_obj_as( - type_=EvaluatorMappingOutputInterface, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def evaluator_run( - self, - evaluator_key: str, - *, - inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - settings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - credentials: typing.Optional[ - typing.Dict[str, typing.Optional[typing.Any]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorOutputInterface]: - """ - Endpoint to evaluate LLM app run - - Args: - request (Request): The request object. - evaluator_key (str): The key of the evaluator. - payload (EvaluatorInputInterface): The payload containing the request data. - - Returns: - result: EvaluatorOutputInterface object containing the outputs. - - Parameters - ---------- - evaluator_key : str - - inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - settings : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - credentials : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorOutputInterface] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluators/{jsonable_encoder(evaluator_key)}/run", - method="POST", - json={ - "inputs": inputs, - "settings": settings, - "credentials": credentials, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorOutputInterface, - parse_obj_as( - type_=EvaluatorOutputInterface, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_evaluator_configs( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[EvaluatorConfig]]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Args: - app_id (str): The ID of the app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[EvaluatorConfig]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluators/configs", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EvaluatorConfig], - parse_obj_as( - type_=typing.List[EvaluatorConfig], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_new_evaluator_config( - self, - *, - app_id: str, - name: str, - evaluator_key: str, - settings_values: typing.Dict[str, typing.Optional[typing.Any]], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorConfig]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Args: - app_id (str): The ID of the app. - - Returns: - EvaluatorConfigDB: Evaluator configuration api model. - - Parameters - ---------- - app_id : str - - name : str - - evaluator_key : str - - settings_values : typing.Dict[str, typing.Optional[typing.Any]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorConfig] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "evaluators/configs", - method="POST", - json={ - "app_id": app_id, - "name": name, - "evaluator_key": evaluator_key, - "settings_values": settings_values, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_evaluator_config( - self, - evaluator_config_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorConfig]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - evaluator_config_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorConfig] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_evaluator_config( - self, - evaluator_config_id: str, - *, - name: typing.Optional[str] = OMIT, - evaluator_key: typing.Optional[str] = OMIT, - settings_values: typing.Optional[ - typing.Dict[str, typing.Optional[typing.Any]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[EvaluatorConfig]: - """ - Endpoint to update evaluator configurations for a specific app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - evaluator_config_id : str - - name : typing.Optional[str] - - evaluator_key : typing.Optional[str] - - settings_values : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[EvaluatorConfig] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="PUT", - json={ - "name": name, - "evaluator_key": evaluator_key, - "settings_values": settings_values, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_evaluator_config( - self, - evaluator_config_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[bool]: - """ - Endpoint to delete a specific evaluator configuration. - - Args: - evaluator_config_id (str): The unique identifier of the evaluator configuration. - - Returns: - bool: True if deletion was successful, False otherwise. - - Parameters - ---------- - evaluator_config_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[bool] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - bool, - parse_obj_as( - type_=bool, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawEvaluatorsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get_evaluators_endpoint( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[LegacyEvaluator]]: - """ - Endpoint to fetch a list of evaluators. - - Returns: - List[Evaluator]: A list of evaluator objects. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[LegacyEvaluator]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluators", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[LegacyEvaluator], - parse_obj_as( - type_=typing.List[LegacyEvaluator], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def evaluator_data_map( - self, - *, - inputs: typing.Dict[str, typing.Optional[typing.Any]], - mapping: typing.Dict[str, typing.Optional[typing.Any]], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorMappingOutputInterface]: - """ - Endpoint to map the experiment data tree to evaluator interface. - - Args: - request (Request): The request object. - payload (EvaluatorMappingInputInterface): The payload containing the request data. - - Returns: - EvaluatorMappingOutputInterface: the evaluator mapping output object - - Parameters - ---------- - inputs : typing.Dict[str, typing.Optional[typing.Any]] - - mapping : typing.Dict[str, typing.Optional[typing.Any]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorMappingOutputInterface] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluators/map", - method="POST", - json={ - "inputs": inputs, - "mapping": mapping, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorMappingOutputInterface, - parse_obj_as( - type_=EvaluatorMappingOutputInterface, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def evaluator_run( - self, - evaluator_key: str, - *, - inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - settings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, - credentials: typing.Optional[ - typing.Dict[str, typing.Optional[typing.Any]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorOutputInterface]: - """ - Endpoint to evaluate LLM app run - - Args: - request (Request): The request object. - evaluator_key (str): The key of the evaluator. - payload (EvaluatorInputInterface): The payload containing the request data. - - Returns: - result: EvaluatorOutputInterface object containing the outputs. - - Parameters - ---------- - evaluator_key : str - - inputs : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - settings : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - credentials : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorOutputInterface] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluators/{jsonable_encoder(evaluator_key)}/run", - method="POST", - json={ - "inputs": inputs, - "settings": settings, - "credentials": credentials, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorOutputInterface, - parse_obj_as( - type_=EvaluatorOutputInterface, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_evaluator_configs( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[EvaluatorConfig]]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Args: - app_id (str): The ID of the app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[EvaluatorConfig]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluators/configs", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[EvaluatorConfig], - parse_obj_as( - type_=typing.List[EvaluatorConfig], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_new_evaluator_config( - self, - *, - app_id: str, - name: str, - evaluator_key: str, - settings_values: typing.Dict[str, typing.Optional[typing.Any]], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorConfig]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Args: - app_id (str): The ID of the app. - - Returns: - EvaluatorConfigDB: Evaluator configuration api model. - - Parameters - ---------- - app_id : str - - name : str - - evaluator_key : str - - settings_values : typing.Dict[str, typing.Optional[typing.Any]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorConfig] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "evaluators/configs", - method="POST", - json={ - "app_id": app_id, - "name": name, - "evaluator_key": evaluator_key, - "settings_values": settings_values, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_evaluator_config( - self, - evaluator_config_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorConfig]: - """ - Endpoint to fetch evaluator configurations for a specific app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - evaluator_config_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorConfig] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_evaluator_config( - self, - evaluator_config_id: str, - *, - name: typing.Optional[str] = OMIT, - evaluator_key: typing.Optional[str] = OMIT, - settings_values: typing.Optional[ - typing.Dict[str, typing.Optional[typing.Any]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[EvaluatorConfig]: - """ - Endpoint to update evaluator configurations for a specific app. - - Returns: - List[EvaluatorConfigDB]: A list of evaluator configuration objects. - - Parameters - ---------- - evaluator_config_id : str - - name : typing.Optional[str] - - evaluator_key : typing.Optional[str] - - settings_values : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[EvaluatorConfig] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="PUT", - json={ - "name": name, - "evaluator_key": evaluator_key, - "settings_values": settings_values, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - EvaluatorConfig, - parse_obj_as( - type_=EvaluatorConfig, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_evaluator_config( - self, - evaluator_config_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[bool]: - """ - Endpoint to delete a specific evaluator configuration. - - Args: - evaluator_config_id (str): The unique identifier of the evaluator configuration. - - Returns: - bool: True if deletion was successful, False otherwise. - - Parameters - ---------- - evaluator_config_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[bool] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"evaluators/configs/{jsonable_encoder(evaluator_config_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - bool, - parse_obj_as( - type_=bool, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/human_evaluations/__init__.py b/sdk/agenta/client/backend/human_evaluations/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/human_evaluations/__init__.py +++ b/sdk/agenta/client/backend/human_evaluations/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/human_evaluations/client.py b/sdk/agenta/client/backend/human_evaluations/client.py index 272a81d48e..5c6a1c0617 100644 --- a/sdk/agenta/client/backend/human_evaluations/client.py +++ b/sdk/agenta/client/backend/human_evaluations/client.py @@ -1,18 +1,24 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.evaluation_status_enum import EvaluationStatusEnum -from ..types.evaluation_type import EvaluationType from ..types.human_evaluation import HumanEvaluation +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.evaluation_type import EvaluationType +from ..types.simple_evaluation_output import SimpleEvaluationOutput +from ..core.jsonable_encoder import jsonable_encoder +from ..types.evaluation_status_enum import EvaluationStatusEnum from ..types.human_evaluation_scenario import HumanEvaluationScenario -from ..types.human_evaluation_scenario_input import HumanEvaluationScenarioInput -from ..types.human_evaluation_scenario_output import HumanEvaluationScenarioOutput from ..types.score import Score -from ..types.simple_evaluation_output import SimpleEvaluationOutput -from .raw_client import AsyncRawHumanEvaluationsClient, RawHumanEvaluationsClient +from ..types.human_evaluation_scenario_output import HumanEvaluationScenarioOutput +from ..types.human_evaluation_scenario_input import HumanEvaluationScenarioInput +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -20,18 +26,7 @@ class HumanEvaluationsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawHumanEvaluationsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawHumanEvaluationsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawHumanEvaluationsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def fetch_list_human_evaluations( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -63,15 +58,43 @@ def fetch_list_human_evaluations( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.fetch_list_human_evaluations( app_id="app_id", ) """ - _response = self._raw_client.fetch_list_human_evaluations( - app_id=app_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "human-evaluations", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[HumanEvaluation], + parse_obj_as( + type_=typing.List[HumanEvaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_human_evaluation( self, @@ -119,6 +142,7 @@ def create_human_evaluation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.create_human_evaluation( app_id="app_id", @@ -129,16 +153,46 @@ def create_human_evaluation( status="status", ) """ - _response = self._raw_client.create_human_evaluation( - app_id=app_id, - variant_ids=variant_ids, - evaluation_type=evaluation_type, - inputs=inputs, - testset_id=testset_id, - status=status, + _response = self._client_wrapper.httpx_client.request( + "human-evaluations", + method="POST", + json={ + "app_id": app_id, + "variant_ids": variant_ids, + "evaluation_type": evaluation_type, + "inputs": inputs, + "testset_id": testset_id, + "status": status, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SimpleEvaluationOutput, + parse_obj_as( + type_=SimpleEvaluationOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_evaluations( self, @@ -173,15 +227,44 @@ def delete_evaluations( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.delete_evaluations( evaluations_ids=["evaluations_ids"], ) """ - _response = self._raw_client.delete_evaluations( - evaluations_ids=evaluations_ids, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "human-evaluations", + method="DELETE", + json={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_human_evaluation( self, @@ -216,15 +299,40 @@ def fetch_human_evaluation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.fetch_human_evaluation( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_human_evaluation( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + HumanEvaluation, + parse_obj_as( + type_=HumanEvaluation, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_human_evaluation( self, @@ -237,7 +345,7 @@ def update_human_evaluation( Updates an evaluation's status. Raises: - HTTPException: If the columns in the testset do not match with the inputs in the variant. + HTTPException: If the columns in the test set do not match with the inputs in the variant. Returns: None: A 204 No Content status code, indicating that the update was successful. @@ -262,15 +370,47 @@ def update_human_evaluation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.update_human_evaluation( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.update_human_evaluation( - evaluation_id, status=status, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}", + method="PUT", + json={ + "status": status, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_human_evaluation_scenarios( self, @@ -308,15 +448,40 @@ def fetch_human_evaluation_scenarios( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.fetch_human_evaluation_scenarios( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_human_evaluation_scenarios( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[HumanEvaluationScenario], + parse_obj_as( + type_=typing.List[HumanEvaluationScenario], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_evaluation_scenario_router( self, @@ -378,6 +543,7 @@ def update_evaluation_scenario_router( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.update_evaluation_scenario_router( evaluation_id="evaluation_id", @@ -385,20 +551,55 @@ def update_evaluation_scenario_router( evaluation_type="human_a_b_testing", ) """ - _response = self._raw_client.update_evaluation_scenario_router( - evaluation_id, - evaluation_scenario_id, - evaluation_type, - vote=vote, - score=score, - correct_answer=correct_answer, - outputs=outputs, - inputs=inputs, - is_pinned=is_pinned, - note=note, + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/{jsonable_encoder(evaluation_type)}", + method="PUT", + json={ + "vote": vote, + "score": score, + "correct_answer": correct_answer, + "outputs": convert_and_respect_annotation_metadata( + object_=outputs, + annotation=typing.Sequence[HumanEvaluationScenarioOutput], + direction="write", + ), + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, + annotation=typing.Sequence[HumanEvaluationScenarioInput], + direction="write", + ), + "is_pinned": is_pinned, + "note": note, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_evaluation_scenario_score_router( self, @@ -433,15 +634,40 @@ def get_evaluation_scenario_score_router( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.get_evaluation_scenario_score_router( evaluation_scenario_id="evaluation_scenario_id", ) """ - _response = self._raw_client.get_evaluation_scenario_score_router( - evaluation_scenario_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, str], + parse_obj_as( + type_=typing.Dict[str, str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_evaluation_scenario_score_router( self, @@ -479,16 +705,48 @@ def update_evaluation_scenario_score_router( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.update_evaluation_scenario_score_router( evaluation_scenario_id="evaluation_scenario_id", score=1.1, ) """ - _response = self._raw_client.update_evaluation_scenario_score_router( - evaluation_scenario_id, score=score, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", + method="PUT", + json={ + "score": score, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_results( self, @@ -523,31 +781,45 @@ def fetch_results( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.human_evaluations.fetch_results( evaluation_id="evaluation_id", ) """ - _response = self._raw_client.fetch_results( - evaluation_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/results", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncHumanEvaluationsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawHumanEvaluationsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawHumanEvaluationsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawHumanEvaluationsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def fetch_list_human_evaluations( self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None @@ -581,6 +853,7 @@ async def fetch_list_human_evaluations( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -592,10 +865,37 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_list_human_evaluations( - app_id=app_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "human-evaluations", + method="GET", + params={ + "app_id": app_id, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[HumanEvaluation], + parse_obj_as( + type_=typing.List[HumanEvaluation], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_human_evaluation( self, @@ -645,6 +945,7 @@ async def create_human_evaluation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -661,16 +962,46 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_human_evaluation( - app_id=app_id, - variant_ids=variant_ids, - evaluation_type=evaluation_type, - inputs=inputs, - testset_id=testset_id, - status=status, + _response = await self._client_wrapper.httpx_client.request( + "human-evaluations", + method="POST", + json={ + "app_id": app_id, + "variant_ids": variant_ids, + "evaluation_type": evaluation_type, + "inputs": inputs, + "testset_id": testset_id, + "status": status, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SimpleEvaluationOutput, + parse_obj_as( + type_=SimpleEvaluationOutput, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_evaluations( self, @@ -707,6 +1038,7 @@ async def delete_evaluations( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -718,10 +1050,38 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_evaluations( - evaluations_ids=evaluations_ids, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "human-evaluations", + method="DELETE", + json={ + "evaluations_ids": evaluations_ids, + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_human_evaluation( self, @@ -758,6 +1118,7 @@ async def fetch_human_evaluation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -769,10 +1130,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_human_evaluation( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + HumanEvaluation, + parse_obj_as( + type_=HumanEvaluation, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_human_evaluation( self, @@ -785,7 +1170,7 @@ async def update_human_evaluation( Updates an evaluation's status. Raises: - HTTPException: If the columns in the testset do not match with the inputs in the variant. + HTTPException: If the columns in the test set do not match with the inputs in the variant. Returns: None: A 204 No Content status code, indicating that the update was successful. @@ -812,6 +1197,7 @@ async def update_human_evaluation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -823,10 +1209,41 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_human_evaluation( - evaluation_id, status=status, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}", + method="PUT", + json={ + "status": status, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_human_evaluation_scenarios( self, @@ -866,6 +1283,7 @@ async def fetch_human_evaluation_scenarios( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -877,10 +1295,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_human_evaluation_scenarios( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[HumanEvaluationScenario], + parse_obj_as( + type_=typing.List[HumanEvaluationScenario], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_evaluation_scenario_router( self, @@ -944,6 +1386,7 @@ async def update_evaluation_scenario_router( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -957,20 +1400,55 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_evaluation_scenario_router( - evaluation_id, - evaluation_scenario_id, - evaluation_type, - vote=vote, - score=score, - correct_answer=correct_answer, - outputs=outputs, - inputs=inputs, - is_pinned=is_pinned, - note=note, + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/{jsonable_encoder(evaluation_type)}", + method="PUT", + json={ + "vote": vote, + "score": score, + "correct_answer": correct_answer, + "outputs": convert_and_respect_annotation_metadata( + object_=outputs, + annotation=typing.Sequence[HumanEvaluationScenarioOutput], + direction="write", + ), + "inputs": convert_and_respect_annotation_metadata( + object_=inputs, + annotation=typing.Sequence[HumanEvaluationScenarioInput], + direction="write", + ), + "is_pinned": is_pinned, + "note": note, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_evaluation_scenario_score_router( self, @@ -1007,6 +1485,7 @@ async def get_evaluation_scenario_score_router( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1018,10 +1497,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_evaluation_scenario_score_router( - evaluation_scenario_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Dict[str, str], + parse_obj_as( + type_=typing.Dict[str, str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_evaluation_scenario_score_router( self, @@ -1061,6 +1564,7 @@ async def update_evaluation_scenario_score_router( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1073,10 +1577,41 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_evaluation_scenario_score_router( - evaluation_scenario_id, score=score, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", + method="PUT", + json={ + "score": score, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_results( self, @@ -1113,6 +1648,7 @@ async def fetch_results( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1124,7 +1660,31 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.fetch_results( - evaluation_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"human-evaluations/{jsonable_encoder(evaluation_id)}/results", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/human_evaluations/raw_client.py b/sdk/agenta/client/backend/human_evaluations/raw_client.py deleted file mode 100644 index 84c4c53a02..0000000000 --- a/sdk/agenta/client/backend/human_evaluations/raw_client.py +++ /dev/null @@ -1,1577 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.evaluation_status_enum import EvaluationStatusEnum -from ..types.evaluation_type import EvaluationType -from ..types.http_validation_error import HttpValidationError -from ..types.human_evaluation import HumanEvaluation -from ..types.human_evaluation_scenario import HumanEvaluationScenario -from ..types.human_evaluation_scenario_input import HumanEvaluationScenarioInput -from ..types.human_evaluation_scenario_output import HumanEvaluationScenarioOutput -from ..types.score import Score -from ..types.simple_evaluation_output import SimpleEvaluationOutput - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawHumanEvaluationsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def fetch_list_human_evaluations( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[HumanEvaluation]]: - """ - Fetches a list of evaluations, optionally filtered by an app ID. - - Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - - Returns: - List[HumanEvaluation]: A list of evaluations. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[HumanEvaluation]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "human-evaluations", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[HumanEvaluation], - parse_obj_as( - type_=typing.List[HumanEvaluation], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_human_evaluation( - self, - *, - app_id: str, - variant_ids: typing.Sequence[str], - evaluation_type: EvaluationType, - inputs: typing.Sequence[str], - testset_id: str, - status: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[SimpleEvaluationOutput]: - """ - Creates a new comparison table document - Raises: - HTTPException: _description_ - Returns: - _description_ - - Parameters - ---------- - app_id : str - - variant_ids : typing.Sequence[str] - - evaluation_type : EvaluationType - - inputs : typing.Sequence[str] - - testset_id : str - - status : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[SimpleEvaluationOutput] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "human-evaluations", - method="POST", - json={ - "app_id": app_id, - "variant_ids": variant_ids, - "evaluation_type": evaluation_type, - "inputs": inputs, - "testset_id": testset_id, - "status": status, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SimpleEvaluationOutput, - parse_obj_as( - type_=SimpleEvaluationOutput, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_evaluations( - self, - *, - evaluations_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[str]]: - """ - Delete specific comparison tables based on their unique IDs. - - Args: - payload (List[str]): The unique identifiers of the comparison tables to delete. - - Returns: - A list of the deleted comparison tables' IDs. - - Parameters - ---------- - evaluations_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[str]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "human-evaluations", - method="DELETE", - json={ - "evaluations_ids": evaluations_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_human_evaluation( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[HumanEvaluation]: - """ - Fetches a single evaluation based on its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - HumanEvaluation: The fetched evaluation. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[HumanEvaluation] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - HumanEvaluation, - parse_obj_as( - type_=HumanEvaluation, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_human_evaluation( - self, - evaluation_id: str, - *, - status: typing.Optional[EvaluationStatusEnum] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Updates an evaluation's status. - - Raises: - HTTPException: If the columns in the testset do not match with the inputs in the variant. - - Returns: - None: A 204 No Content status code, indicating that the update was successful. - - Parameters - ---------- - evaluation_id : str - - status : typing.Optional[EvaluationStatusEnum] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}", - method="PUT", - json={ - "status": status, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_human_evaluation_scenarios( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[HumanEvaluationScenario]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[HumanEvaluationScenario]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[HumanEvaluationScenario], - parse_obj_as( - type_=typing.List[HumanEvaluationScenario], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_evaluation_scenario_router( - self, - evaluation_id: str, - evaluation_scenario_id: str, - evaluation_type: EvaluationType, - *, - vote: typing.Optional[str] = OMIT, - score: typing.Optional[Score] = OMIT, - correct_answer: typing.Optional[str] = OMIT, - outputs: typing.Optional[typing.Sequence[HumanEvaluationScenarioOutput]] = OMIT, - inputs: typing.Optional[typing.Sequence[HumanEvaluationScenarioInput]] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, - note: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Updates an evaluation scenario's vote or score based on its type. - - Raises: - HTTPException: If update fails or unauthorized. - - Returns: - None: 204 No Content status code upon successful update. - - Parameters - ---------- - evaluation_id : str - - evaluation_scenario_id : str - - evaluation_type : EvaluationType - - vote : typing.Optional[str] - - score : typing.Optional[Score] - - correct_answer : typing.Optional[str] - - outputs : typing.Optional[typing.Sequence[HumanEvaluationScenarioOutput]] - - inputs : typing.Optional[typing.Sequence[HumanEvaluationScenarioInput]] - - is_pinned : typing.Optional[bool] - - note : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/{jsonable_encoder(evaluation_type)}", - method="PUT", - json={ - "vote": vote, - "score": score, - "correct_answer": correct_answer, - "outputs": convert_and_respect_annotation_metadata( - object_=outputs, - annotation=typing.Sequence[HumanEvaluationScenarioOutput], - direction="write", - ), - "inputs": convert_and_respect_annotation_metadata( - object_=inputs, - annotation=typing.Sequence[HumanEvaluationScenarioInput], - direction="write", - ), - "is_pinned": is_pinned, - "note": note, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_evaluation_scenario_score_router( - self, - evaluation_scenario_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Dict[str, str]]: - """ - Fetch the score of a specific evaluation scenario. - - Args: - evaluation_scenario_id: The ID of the evaluation scenario to fetch. - - Returns: - Dictionary containing the scenario ID and its score. - - Parameters - ---------- - evaluation_scenario_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Dict[str, str]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Dict[str, str], - parse_obj_as( - type_=typing.Dict[str, str], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_evaluation_scenario_score_router( - self, - evaluation_scenario_id: str, - *, - score: float, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Updates the score of an evaluation scenario. - - Raises: - HTTPException: Server error if the evaluation update fails. - - Returns: - None: 204 No Content status code upon successful update. - - Parameters - ---------- - evaluation_scenario_id : str - - score : float - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", - method="PUT", - json={ - "score": score, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_results( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Fetch all the results for one the comparison table - - Arguments: - evaluation_id -- _description_ - - Returns: - _description_ - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/results", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawHumanEvaluationsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def fetch_list_human_evaluations( - self, *, app_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[HumanEvaluation]]: - """ - Fetches a list of evaluations, optionally filtered by an app ID. - - Args: - app_id (Optional[str]): An optional app ID to filter the evaluations. - - Returns: - List[HumanEvaluation]: A list of evaluations. - - Parameters - ---------- - app_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[HumanEvaluation]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "human-evaluations", - method="GET", - params={ - "app_id": app_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[HumanEvaluation], - parse_obj_as( - type_=typing.List[HumanEvaluation], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_human_evaluation( - self, - *, - app_id: str, - variant_ids: typing.Sequence[str], - evaluation_type: EvaluationType, - inputs: typing.Sequence[str], - testset_id: str, - status: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[SimpleEvaluationOutput]: - """ - Creates a new comparison table document - Raises: - HTTPException: _description_ - Returns: - _description_ - - Parameters - ---------- - app_id : str - - variant_ids : typing.Sequence[str] - - evaluation_type : EvaluationType - - inputs : typing.Sequence[str] - - testset_id : str - - status : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[SimpleEvaluationOutput] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "human-evaluations", - method="POST", - json={ - "app_id": app_id, - "variant_ids": variant_ids, - "evaluation_type": evaluation_type, - "inputs": inputs, - "testset_id": testset_id, - "status": status, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SimpleEvaluationOutput, - parse_obj_as( - type_=SimpleEvaluationOutput, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_evaluations( - self, - *, - evaluations_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[str]]: - """ - Delete specific comparison tables based on their unique IDs. - - Args: - payload (List[str]): The unique identifiers of the comparison tables to delete. - - Returns: - A list of the deleted comparison tables' IDs. - - Parameters - ---------- - evaluations_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[str]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "human-evaluations", - method="DELETE", - json={ - "evaluations_ids": evaluations_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_human_evaluation( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[HumanEvaluation]: - """ - Fetches a single evaluation based on its ID. - - Args: - evaluation_id (str): The ID of the evaluation to fetch. - - Returns: - HumanEvaluation: The fetched evaluation. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[HumanEvaluation] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - HumanEvaluation, - parse_obj_as( - type_=HumanEvaluation, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_human_evaluation( - self, - evaluation_id: str, - *, - status: typing.Optional[EvaluationStatusEnum] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Updates an evaluation's status. - - Raises: - HTTPException: If the columns in the testset do not match with the inputs in the variant. - - Returns: - None: A 204 No Content status code, indicating that the update was successful. - - Parameters - ---------- - evaluation_id : str - - status : typing.Optional[EvaluationStatusEnum] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}", - method="PUT", - json={ - "status": status, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_human_evaluation_scenarios( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[HumanEvaluationScenario]]: - """ - Fetches evaluation scenarios for a given evaluation ID. - - Arguments: - evaluation_id (str): The ID of the evaluation for which to fetch scenarios. - - Raises: - HTTPException: If the evaluation is not found or access is denied. - - Returns: - List[EvaluationScenario]: A list of evaluation scenarios. - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[HumanEvaluationScenario]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenarios", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[HumanEvaluationScenario], - parse_obj_as( - type_=typing.List[HumanEvaluationScenario], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_evaluation_scenario_router( - self, - evaluation_id: str, - evaluation_scenario_id: str, - evaluation_type: EvaluationType, - *, - vote: typing.Optional[str] = OMIT, - score: typing.Optional[Score] = OMIT, - correct_answer: typing.Optional[str] = OMIT, - outputs: typing.Optional[typing.Sequence[HumanEvaluationScenarioOutput]] = OMIT, - inputs: typing.Optional[typing.Sequence[HumanEvaluationScenarioInput]] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, - note: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Updates an evaluation scenario's vote or score based on its type. - - Raises: - HTTPException: If update fails or unauthorized. - - Returns: - None: 204 No Content status code upon successful update. - - Parameters - ---------- - evaluation_id : str - - evaluation_scenario_id : str - - evaluation_type : EvaluationType - - vote : typing.Optional[str] - - score : typing.Optional[Score] - - correct_answer : typing.Optional[str] - - outputs : typing.Optional[typing.Sequence[HumanEvaluationScenarioOutput]] - - inputs : typing.Optional[typing.Sequence[HumanEvaluationScenarioInput]] - - is_pinned : typing.Optional[bool] - - note : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/{jsonable_encoder(evaluation_type)}", - method="PUT", - json={ - "vote": vote, - "score": score, - "correct_answer": correct_answer, - "outputs": convert_and_respect_annotation_metadata( - object_=outputs, - annotation=typing.Sequence[HumanEvaluationScenarioOutput], - direction="write", - ), - "inputs": convert_and_respect_annotation_metadata( - object_=inputs, - annotation=typing.Sequence[HumanEvaluationScenarioInput], - direction="write", - ), - "is_pinned": is_pinned, - "note": note, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_evaluation_scenario_score_router( - self, - evaluation_scenario_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Dict[str, str]]: - """ - Fetch the score of a specific evaluation scenario. - - Args: - evaluation_scenario_id: The ID of the evaluation scenario to fetch. - - Returns: - Dictionary containing the scenario ID and its score. - - Parameters - ---------- - evaluation_scenario_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Dict[str, str]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Dict[str, str], - parse_obj_as( - type_=typing.Dict[str, str], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_evaluation_scenario_score_router( - self, - evaluation_scenario_id: str, - *, - score: float, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Updates the score of an evaluation scenario. - - Raises: - HTTPException: Server error if the evaluation update fails. - - Returns: - None: 204 No Content status code upon successful update. - - Parameters - ---------- - evaluation_scenario_id : str - - score : float - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/evaluation_scenario/{jsonable_encoder(evaluation_scenario_id)}/score", - method="PUT", - json={ - "score": score, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_results( - self, - evaluation_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Fetch all the results for one the comparison table - - Arguments: - evaluation_id -- _description_ - - Returns: - _description_ - - Parameters - ---------- - evaluation_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"human-evaluations/{jsonable_encoder(evaluation_id)}/results", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/observability/__init__.py b/sdk/agenta/client/backend/observability/__init__.py index 5cf8102eb3..780ddec649 100644 --- a/sdk/agenta/client/backend/observability/__init__.py +++ b/sdk/agenta/client/backend/observability/__init__.py @@ -1,17 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file +from .types import Format, QueryAnalyticsResponse, QueryTracesResponse -from .types import ( - FetchTraceByIdRequestTraceId, - FetchTraceByIdResponse, - QueryAnalyticsResponse, - QueryTracesResponse, -) - -__all__ = [ - "FetchTraceByIdRequestTraceId", - "FetchTraceByIdResponse", - "QueryAnalyticsResponse", - "QueryTracesResponse", -] +__all__ = ["Format", "QueryAnalyticsResponse", "QueryTracesResponse"] diff --git a/sdk/agenta/client/backend/observability/client.py b/sdk/agenta/client/backend/observability/client.py index 5daf79c77e..c95809a7c0 100644 --- a/sdk/agenta/client/backend/observability/client.py +++ b/sdk/agenta/client/backend/observability/client.py @@ -1,32 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.collect_status_response import CollectStatusResponse -from ..types.format import Format -from .raw_client import AsyncRawObservabilityClient, RawObservabilityClient -from .types.fetch_trace_by_id_request_trace_id import FetchTraceByIdRequestTraceId -from .types.fetch_trace_by_id_response import FetchTraceByIdResponse -from .types.query_analytics_response import QueryAnalyticsResponse +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from .types.format import Format from .types.query_traces_response import QueryTracesResponse +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from .types.query_analytics_response import QueryAnalyticsResponse +from ..core.client_wrapper import AsyncClientWrapper class ObservabilityClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawObservabilityClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawObservabilityClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawObservabilityClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def otlp_v_1_traces( self, *, request_options: typing.Optional[RequestOptions] = None @@ -50,11 +41,28 @@ def otlp_v_1_traces( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.otlp_v_1_traces() """ - _response = self._raw_client.otlp_v_1_traces(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "otlp/v1/traces", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def otlp_status( self, *, request_options: typing.Optional[RequestOptions] = None @@ -78,11 +86,28 @@ def otlp_status( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.otlp_status() """ - _response = self._raw_client.otlp_status(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "observability/v1/otlp/traces", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def otlp_receiver( self, *, request_options: typing.Optional[RequestOptions] = None @@ -106,11 +131,28 @@ def otlp_receiver( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.otlp_receiver() """ - _response = self._raw_client.otlp_receiver(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "observability/v1/otlp/traces", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def query_traces( self, @@ -163,22 +205,49 @@ def query_traces( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.query_traces() """ - _response = self._raw_client.query_traces( - format=format, - focus=focus, - oldest=oldest, - newest=newest, - filtering=filtering, - page=page, - size=size, - next=next, - stop=stop, + _response = self._client_wrapper.httpx_client.request( + "observability/v1/traces", + method="GET", + params={ + "format": format, + "focus": focus, + "oldest": oldest, + "newest": newest, + "filtering": filtering, + "page": page, + "size": size, + "next": next, + "stop": stop, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + QueryTracesResponse, + parse_obj_as( + type_=QueryTracesResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_traces( self, @@ -210,13 +279,42 @@ def delete_traces( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.delete_traces() """ - _response = self._raw_client.delete_traces( - node_id=node_id, node_ids=node_ids, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "observability/v1/traces", + method="DELETE", + params={ + "node_id": node_id, + "node_ids": node_ids, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def query_analytics( self, @@ -270,79 +368,55 @@ def query_analytics( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.observability.query_analytics() """ - _response = self._raw_client.query_analytics( - format=format, - focus=focus, - oldest=oldest, - newest=newest, - window=window, - filtering=filtering, - time_range=time_range, - app_id=app_id, - environment=environment, - variant=variant, + _response = self._client_wrapper.httpx_client.request( + "observability/v1/analytics", + method="GET", + params={ + "format": format, + "focus": focus, + "oldest": oldest, + "newest": newest, + "window": window, + "filtering": filtering, + "timeRange": time_range, + "app_id": app_id, + "environment": environment, + "variant": variant, + }, request_options=request_options, ) - return _response.data - - def fetch_trace_by_id( - self, - trace_id: FetchTraceByIdRequestTraceId, - *, - format: typing.Optional[Format] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> FetchTraceByIdResponse: - """ - Fetch trace by ID. - - Parameters - ---------- - trace_id : FetchTraceByIdRequestTraceId - - format : typing.Optional[Format] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - FetchTraceByIdResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.observability.fetch_trace_by_id( - trace_id="trace_id", - ) - """ - _response = self._raw_client.fetch_trace_by_id( - trace_id, format=format, request_options=request_options - ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + QueryAnalyticsResponse, + parse_obj_as( + type_=QueryAnalyticsResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncObservabilityClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawObservabilityClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawObservabilityClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawObservabilityClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def otlp_v_1_traces( self, *, request_options: typing.Optional[RequestOptions] = None @@ -368,6 +442,7 @@ async def otlp_v_1_traces( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -377,10 +452,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.otlp_v_1_traces( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "otlp/v1/traces", + method="POST", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def otlp_status( self, *, request_options: typing.Optional[RequestOptions] = None @@ -406,6 +495,7 @@ async def otlp_status( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -415,8 +505,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.otlp_status(request_options=request_options) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "observability/v1/otlp/traces", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def otlp_receiver( self, *, request_options: typing.Optional[RequestOptions] = None @@ -442,6 +548,7 @@ async def otlp_receiver( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -451,10 +558,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.otlp_receiver( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "observability/v1/otlp/traces", + method="POST", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def query_traces( self, @@ -509,6 +630,7 @@ async def query_traces( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -518,19 +640,45 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.query_traces( - format=format, - focus=focus, - oldest=oldest, - newest=newest, - filtering=filtering, - page=page, - size=size, - next=next, - stop=stop, + _response = await self._client_wrapper.httpx_client.request( + "observability/v1/traces", + method="GET", + params={ + "format": format, + "focus": focus, + "oldest": oldest, + "newest": newest, + "filtering": filtering, + "page": page, + "size": size, + "next": next, + "stop": stop, + }, request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + QueryTracesResponse, + parse_obj_as( + type_=QueryTracesResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_traces( self, @@ -564,6 +712,7 @@ async def delete_traces( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -573,10 +722,38 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_traces( - node_id=node_id, node_ids=node_ids, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "observability/v1/traces", + method="DELETE", + params={ + "node_id": node_id, + "node_ids": node_ids, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + CollectStatusResponse, + parse_obj_as( + type_=CollectStatusResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def query_analytics( self, @@ -632,6 +809,7 @@ async def query_analytics( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -641,65 +819,43 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.query_analytics( - format=format, - focus=focus, - oldest=oldest, - newest=newest, - window=window, - filtering=filtering, - time_range=time_range, - app_id=app_id, - environment=environment, - variant=variant, + _response = await self._client_wrapper.httpx_client.request( + "observability/v1/analytics", + method="GET", + params={ + "format": format, + "focus": focus, + "oldest": oldest, + "newest": newest, + "window": window, + "filtering": filtering, + "timeRange": time_range, + "app_id": app_id, + "environment": environment, + "variant": variant, + }, request_options=request_options, ) - return _response.data - - async def fetch_trace_by_id( - self, - trace_id: FetchTraceByIdRequestTraceId, - *, - format: typing.Optional[Format] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> FetchTraceByIdResponse: - """ - Fetch trace by ID. - - Parameters - ---------- - trace_id : FetchTraceByIdRequestTraceId - - format : typing.Optional[Format] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - FetchTraceByIdResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.observability.fetch_trace_by_id( - trace_id="trace_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_trace_by_id( - trace_id, format=format, request_options=request_options - ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + QueryAnalyticsResponse, + parse_obj_as( + type_=QueryAnalyticsResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/observability/raw_client.py b/sdk/agenta/client/backend/observability/raw_client.py deleted file mode 100644 index a213f1f9a2..0000000000 --- a/sdk/agenta/client/backend/observability/raw_client.py +++ /dev/null @@ -1,943 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.collect_status_response import CollectStatusResponse -from ..types.format import Format -from ..types.http_validation_error import HttpValidationError -from .types.fetch_trace_by_id_request_trace_id import FetchTraceByIdRequestTraceId -from .types.fetch_trace_by_id_response import FetchTraceByIdResponse -from .types.query_analytics_response import QueryAnalyticsResponse -from .types.query_traces_response import QueryTracesResponse - - -class RawObservabilityClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def otlp_v_1_traces( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[CollectStatusResponse]: - """ - Receive traces via OTLP. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CollectStatusResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "otlp/v1/traces", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def otlp_status( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[CollectStatusResponse]: - """ - Status of OTLP endpoint. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CollectStatusResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "observability/v1/otlp/traces", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def otlp_receiver( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[CollectStatusResponse]: - """ - Receive traces via OTLP. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CollectStatusResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "observability/v1/otlp/traces", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_traces( - self, - *, - format: typing.Optional[Format] = None, - focus: typing.Optional[str] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - filtering: typing.Optional[str] = None, - page: typing.Optional[int] = None, - size: typing.Optional[int] = None, - next: typing.Optional[str] = None, - stop: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[QueryTracesResponse]: - """ - Query traces, with optional grouping, windowing, filtering, and pagination. - - Parameters - ---------- - format : typing.Optional[Format] - - focus : typing.Optional[str] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - filtering : typing.Optional[str] - - page : typing.Optional[int] - - size : typing.Optional[int] - - next : typing.Optional[str] - - stop : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[QueryTracesResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "observability/v1/traces", - method="GET", - params={ - "format": format, - "focus": focus, - "oldest": oldest, - "newest": newest, - "filtering": filtering, - "page": page, - "size": size, - "next": next, - "stop": stop, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - QueryTracesResponse, - parse_obj_as( - type_=QueryTracesResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_traces( - self, - *, - node_id: typing.Optional[str] = None, - node_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[CollectStatusResponse]: - """ - Delete trace. - - Parameters - ---------- - node_id : typing.Optional[str] - - node_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[CollectStatusResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "observability/v1/traces", - method="DELETE", - params={ - "node_id": node_id, - "node_ids": node_ids, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_analytics( - self, - *, - format: typing.Optional[Format] = None, - focus: typing.Optional[str] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - window: typing.Optional[int] = None, - filtering: typing.Optional[str] = None, - time_range: typing.Optional[str] = None, - app_id: typing.Optional[str] = None, - environment: typing.Optional[str] = None, - variant: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[QueryAnalyticsResponse]: - """ - Parameters - ---------- - format : typing.Optional[Format] - - focus : typing.Optional[str] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - window : typing.Optional[int] - - filtering : typing.Optional[str] - - time_range : typing.Optional[str] - - app_id : typing.Optional[str] - - environment : typing.Optional[str] - - variant : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[QueryAnalyticsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "observability/v1/analytics", - method="GET", - params={ - "format": format, - "focus": focus, - "oldest": oldest, - "newest": newest, - "window": window, - "filtering": filtering, - "timeRange": time_range, - "app_id": app_id, - "environment": environment, - "variant": variant, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - QueryAnalyticsResponse, - parse_obj_as( - type_=QueryAnalyticsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_trace_by_id( - self, - trace_id: FetchTraceByIdRequestTraceId, - *, - format: typing.Optional[Format] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[FetchTraceByIdResponse]: - """ - Fetch trace by ID. - - Parameters - ---------- - trace_id : FetchTraceByIdRequestTraceId - - format : typing.Optional[Format] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[FetchTraceByIdResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"observability/v1/traces/{jsonable_encoder(trace_id)}", - method="GET", - params={ - "format": format, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - FetchTraceByIdResponse, - parse_obj_as( - type_=FetchTraceByIdResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawObservabilityClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def otlp_v_1_traces( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[CollectStatusResponse]: - """ - Receive traces via OTLP. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CollectStatusResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "otlp/v1/traces", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def otlp_status( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[CollectStatusResponse]: - """ - Status of OTLP endpoint. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CollectStatusResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "observability/v1/otlp/traces", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def otlp_receiver( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[CollectStatusResponse]: - """ - Receive traces via OTLP. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CollectStatusResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "observability/v1/otlp/traces", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_traces( - self, - *, - format: typing.Optional[Format] = None, - focus: typing.Optional[str] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - filtering: typing.Optional[str] = None, - page: typing.Optional[int] = None, - size: typing.Optional[int] = None, - next: typing.Optional[str] = None, - stop: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[QueryTracesResponse]: - """ - Query traces, with optional grouping, windowing, filtering, and pagination. - - Parameters - ---------- - format : typing.Optional[Format] - - focus : typing.Optional[str] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - filtering : typing.Optional[str] - - page : typing.Optional[int] - - size : typing.Optional[int] - - next : typing.Optional[str] - - stop : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[QueryTracesResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "observability/v1/traces", - method="GET", - params={ - "format": format, - "focus": focus, - "oldest": oldest, - "newest": newest, - "filtering": filtering, - "page": page, - "size": size, - "next": next, - "stop": stop, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - QueryTracesResponse, - parse_obj_as( - type_=QueryTracesResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_traces( - self, - *, - node_id: typing.Optional[str] = None, - node_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[CollectStatusResponse]: - """ - Delete trace. - - Parameters - ---------- - node_id : typing.Optional[str] - - node_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[CollectStatusResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "observability/v1/traces", - method="DELETE", - params={ - "node_id": node_id, - "node_ids": node_ids, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - CollectStatusResponse, - parse_obj_as( - type_=CollectStatusResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_analytics( - self, - *, - format: typing.Optional[Format] = None, - focus: typing.Optional[str] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - window: typing.Optional[int] = None, - filtering: typing.Optional[str] = None, - time_range: typing.Optional[str] = None, - app_id: typing.Optional[str] = None, - environment: typing.Optional[str] = None, - variant: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[QueryAnalyticsResponse]: - """ - Parameters - ---------- - format : typing.Optional[Format] - - focus : typing.Optional[str] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - window : typing.Optional[int] - - filtering : typing.Optional[str] - - time_range : typing.Optional[str] - - app_id : typing.Optional[str] - - environment : typing.Optional[str] - - variant : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[QueryAnalyticsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "observability/v1/analytics", - method="GET", - params={ - "format": format, - "focus": focus, - "oldest": oldest, - "newest": newest, - "window": window, - "filtering": filtering, - "timeRange": time_range, - "app_id": app_id, - "environment": environment, - "variant": variant, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - QueryAnalyticsResponse, - parse_obj_as( - type_=QueryAnalyticsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_trace_by_id( - self, - trace_id: FetchTraceByIdRequestTraceId, - *, - format: typing.Optional[Format] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[FetchTraceByIdResponse]: - """ - Fetch trace by ID. - - Parameters - ---------- - trace_id : FetchTraceByIdRequestTraceId - - format : typing.Optional[Format] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[FetchTraceByIdResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"observability/v1/traces/{jsonable_encoder(trace_id)}", - method="GET", - params={ - "format": format, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - FetchTraceByIdResponse, - parse_obj_as( - type_=FetchTraceByIdResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/observability/types/__init__.py b/sdk/agenta/client/backend/observability/types/__init__.py index 8fdff52de5..bf6cbe689d 100644 --- a/sdk/agenta/client/backend/observability/types/__init__.py +++ b/sdk/agenta/client/backend/observability/types/__init__.py @@ -1,15 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - -from .fetch_trace_by_id_request_trace_id import FetchTraceByIdRequestTraceId -from .fetch_trace_by_id_response import FetchTraceByIdResponse +from .format import Format from .query_analytics_response import QueryAnalyticsResponse from .query_traces_response import QueryTracesResponse -__all__ = [ - "FetchTraceByIdRequestTraceId", - "FetchTraceByIdResponse", - "QueryAnalyticsResponse", - "QueryTracesResponse", -] +__all__ = ["Format", "QueryAnalyticsResponse", "QueryTracesResponse"] diff --git a/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_request_trace_id.py b/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_request_trace_id.py deleted file mode 100644 index 671d715f0b..0000000000 --- a/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_request_trace_id.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -FetchTraceByIdRequestTraceId = typing.Union[str, int] diff --git a/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_response.py b/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_response.py deleted file mode 100644 index 9ace4cb8e0..0000000000 --- a/sdk/agenta/client/backend/observability/types/fetch_trace_by_id_response.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ...types.agenta_nodes_response import AgentaNodesResponse -from ...types.agenta_roots_response import AgentaRootsResponse -from ...types.agenta_trees_response import AgentaTreesResponse -from ...types.o_tel_tracing_data_response import OTelTracingDataResponse - -FetchTraceByIdResponse = typing.Union[ - OTelTracingDataResponse, - AgentaNodesResponse, - AgentaTreesResponse, - AgentaRootsResponse, -] diff --git a/sdk/agenta/client/backend/observability/types/format.py b/sdk/agenta/client/backend/observability/types/format.py new file mode 100644 index 0000000000..b3b01bea42 --- /dev/null +++ b/sdk/agenta/client/backend/observability/types/format.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +Format = typing.Union[typing.Literal["legacy", "agenta"], typing.Any] diff --git a/sdk/agenta/client/backend/observability/types/query_analytics_response.py b/sdk/agenta/client/backend/observability/types/query_analytics_response.py index d6b44a55bc..ada2858ab8 100644 --- a/sdk/agenta/client/backend/observability/types/query_analytics_response.py +++ b/sdk/agenta/client/backend/observability/types/query_analytics_response.py @@ -1,8 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ...types.analytics_response import AnalyticsResponse from ...types.legacy_analytics_response import LegacyAnalyticsResponse +from ...types.analytics_response import AnalyticsResponse QueryAnalyticsResponse = typing.Union[LegacyAnalyticsResponse, AnalyticsResponse] diff --git a/sdk/agenta/client/backend/observability/types/query_traces_response.py b/sdk/agenta/client/backend/observability/types/query_traces_response.py index 232149ebb4..4219a5b7e9 100644 --- a/sdk/agenta/client/backend/observability/types/query_traces_response.py +++ b/sdk/agenta/client/backend/observability/types/query_traces_response.py @@ -1,15 +1,11 @@ # This file was auto-generated by Fern from our API Definition. import typing - +from ...types.o_tel_spans_response import OTelSpansResponse from ...types.agenta_nodes_response import AgentaNodesResponse -from ...types.agenta_roots_response import AgentaRootsResponse from ...types.agenta_trees_response import AgentaTreesResponse -from ...types.o_tel_tracing_data_response import OTelTracingDataResponse +from ...types.agenta_roots_response import AgentaRootsResponse QueryTracesResponse = typing.Union[ - OTelTracingDataResponse, - AgentaNodesResponse, - AgentaTreesResponse, - AgentaRootsResponse, + OTelSpansResponse, AgentaNodesResponse, AgentaTreesResponse, AgentaRootsResponse ] diff --git a/sdk/agenta/client/backend/organization/__init__.py b/sdk/agenta/client/backend/organization/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/organization/__init__.py +++ b/sdk/agenta/client/backend/organization/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/organization/client.py b/sdk/agenta/client/backend/organization/client.py index bac17e1d92..d8922a9d43 100644 --- a/sdk/agenta/client/backend/organization/client.py +++ b/sdk/agenta/client/backend/organization/client.py @@ -1,13 +1,19 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.invite_request import InviteRequest from ..types.organization import Organization +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError from ..types.organization_details import OrganizationDetails -from .raw_client import AsyncRawOrganizationClient, RawOrganizationClient +from ..core.jsonable_encoder import jsonable_encoder +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..types.invite_request import InviteRequest +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -15,38 +21,28 @@ class OrganizationClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawOrganizationClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper - @property - def with_raw_response(self) -> RawOrganizationClient: + def list_organizations( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[Organization]: """ - Retrieves a raw implementation of this client that returns raw responses. + Returns a list of organizations associated with the user's session. - Returns - ------- - RawOrganizationClient - """ - return self._raw_client + Returns: + list[Organization]: A list of organizations associated with the user's session. - def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OrganizationDetails: - """ - Return the details of the organization. + Raises: + HTTPException: If there is an error retrieving the organizations from the database. Parameters ---------- - organization_id : str - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - OrganizationDetails + typing.List[Organization] Successful Response Examples @@ -55,36 +51,45 @@ def fetch_organization_details( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.organization.fetch_organization_details( - organization_id="organization_id", - ) + client.organization.list_organizations() """ - _response = self._raw_client.fetch_organization_details( - organization_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "organizations", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Organization], + parse_obj_as( + type_=typing.List[Organization], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def list_organizations( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[Organization]: + def fetch_organization_details( + self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> OrganizationDetails: """ - Returns a list of organizations associated with the user's session. - - Returns: - list[Organization]: A list of organizations associated with the user's session. - - Raises: - HTTPException: If there is an error retrieving the organizations from the database. + Return the details of the organization. Parameters ---------- + org_id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[Organization] + OrganizationDetails Successful Response Examples @@ -93,15 +98,44 @@ def list_organizations( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.organization.fetch_organization_details( + org_id="org_id", ) - client.organization.list_organizations() """ - _response = self._raw_client.list_organizations(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + OrganizationDetails, + parse_obj_as( + type_=OrganizationDetails, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def invite_user_to_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, request: typing.Sequence[InviteRequest], @@ -111,7 +145,7 @@ def invite_user_to_workspace( Assigns a role to a user in an organization. Args: - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. payload (InviteRequest): The payload containing the organization id, user email, and role to assign. workspace_id (str): The ID of the workspace. @@ -124,7 +158,7 @@ def invite_user_to_workspace( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -144,28 +178,57 @@ def invite_user_to_workspace( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.organization.invite_user_to_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", request=[ InviteRequest( email="email", + roles=["roles"], ) ], ) """ - _response = self._raw_client.invite_user_to_workspace( - organization_id, - workspace_id, - request=request, + _response = self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, + annotation=typing.Sequence[InviteRequest], + direction="write", + ), request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def resend_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, email: str, @@ -184,7 +247,7 @@ def resend_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -204,21 +267,53 @@ def resend_invitation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.organization.resend_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", email="email", ) """ - _response = self._raw_client.resend_invitation( - organization_id, workspace_id, email=email, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", + method="POST", + json={ + "email": email, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def accept_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, project_id: str, @@ -239,7 +334,7 @@ def accept_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -263,60 +358,81 @@ def accept_invitation( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.organization.accept_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", project_id="project_id", token="token", email="email", ) """ - _response = self._raw_client.accept_invitation( - organization_id, - workspace_id, - project_id=project_id, - token=token, - email=email, + _response = self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", + method="POST", + params={ + "project_id": project_id, + }, + json={ + "token": token, + "email": email, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncOrganizationClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawOrganizationClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper - @property - def with_raw_response(self) -> AsyncRawOrganizationClient: + async def list_organizations( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[Organization]: """ - Retrieves a raw implementation of this client that returns raw responses. + Returns a list of organizations associated with the user's session. - Returns - ------- - AsyncRawOrganizationClient - """ - return self._raw_client + Returns: + list[Organization]: A list of organizations associated with the user's session. - async def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OrganizationDetails: - """ - Return the details of the organization. + Raises: + HTTPException: If there is an error retrieving the organizations from the database. Parameters ---------- - organization_id : str - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - OrganizationDetails + typing.List[Organization] Successful Response Examples @@ -327,42 +443,51 @@ async def fetch_organization_details( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.organization.fetch_organization_details( - organization_id="organization_id", - ) + await client.organization.list_organizations() asyncio.run(main()) """ - _response = await self._raw_client.fetch_organization_details( - organization_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "organizations", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Organization], + parse_obj_as( + type_=typing.List[Organization], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - async def list_organizations( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[Organization]: + async def fetch_organization_details( + self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> OrganizationDetails: """ - Returns a list of organizations associated with the user's session. - - Returns: - list[Organization]: A list of organizations associated with the user's session. - - Raises: - HTTPException: If there is an error retrieving the organizations from the database. + Return the details of the organization. Parameters ---------- + org_id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[Organization] + OrganizationDetails Successful Response Examples @@ -373,23 +498,50 @@ async def list_organizations( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.organization.list_organizations() + await client.organization.fetch_organization_details( + org_id="org_id", + ) asyncio.run(main()) """ - _response = await self._raw_client.list_organizations( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + OrganizationDetails, + parse_obj_as( + type_=OrganizationDetails, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def invite_user_to_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, request: typing.Sequence[InviteRequest], @@ -399,7 +551,7 @@ async def invite_user_to_workspace( Assigns a role to a user in an organization. Args: - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. payload (InviteRequest): The payload containing the organization id, user email, and role to assign. workspace_id (str): The ID of the workspace. @@ -412,7 +564,7 @@ async def invite_user_to_workspace( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -434,16 +586,18 @@ async def invite_user_to_workspace( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: await client.organization.invite_user_to_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", request=[ InviteRequest( email="email", + roles=["roles"], ) ], ) @@ -451,17 +605,44 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.invite_user_to_workspace( - organization_id, - workspace_id, - request=request, + _response = await self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, + annotation=typing.Sequence[InviteRequest], + direction="write", + ), request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def resend_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, email: str, @@ -480,7 +661,7 @@ async def resend_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -502,12 +683,13 @@ async def resend_invitation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: await client.organization.resend_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", email="email", ) @@ -515,14 +697,45 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.resend_invitation( - organization_id, workspace_id, email=email, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", + method="POST", + json={ + "email": email, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def accept_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, project_id: str, @@ -543,7 +756,7 @@ async def accept_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -569,12 +782,13 @@ async def accept_invitation( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: await client.organization.accept_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", project_id="project_id", token="token", @@ -584,12 +798,42 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.accept_invitation( - organization_id, - workspace_id, - project_id=project_id, - token=token, - email=email, + _response = await self._client_wrapper.httpx_client.request( + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", + method="POST", + params={ + "project_id": project_id, + }, + json={ + "token": token, + "email": email, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/organization/raw_client.py b/sdk/agenta/client/backend/organization/raw_client.py deleted file mode 100644 index 01b9d88a99..0000000000 --- a/sdk/agenta/client/backend/organization/raw_client.py +++ /dev/null @@ -1,780 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.invite_request import InviteRequest -from ..types.organization import Organization -from ..types.organization_details import OrganizationDetails - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawOrganizationClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OrganizationDetails]: - """ - Return the details of the organization. - - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OrganizationDetails] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OrganizationDetails, - parse_obj_as( - type_=OrganizationDetails, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_organizations( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[Organization]]: - """ - Returns a list of organizations associated with the user's session. - - Returns: - list[Organization]: A list of organizations associated with the user's session. - - Raises: - HTTPException: If there is an error retrieving the organizations from the database. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[Organization]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "organizations", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Organization], - parse_obj_as( - type_=typing.List[Organization], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def invite_user_to_workspace( - self, - organization_id: str, - workspace_id: str, - *, - request: typing.Sequence[InviteRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Assigns a role to a user in an organization. - - Args: - organization_id (str): The ID of the organization. - payload (InviteRequest): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - organization_id : str - - workspace_id : str - - request : typing.Sequence[InviteRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, - annotation=typing.Sequence[InviteRequest], - direction="write", - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def resend_invitation( - self, - organization_id: str, - workspace_id: str, - *, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Resend an invitation to a user to an Organization. - - Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 - - Returns: - JSONResponse: Resent invitation to user; status_code: 200 - - Parameters - ---------- - organization_id : str - - workspace_id : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", - method="POST", - json={ - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def accept_invitation( - self, - organization_id: str, - workspace_id: str, - *, - project_id: str, - token: str, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Accept an invitation to an organization. - - Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 - - Returns: - JSONResponse: Accepted invitation to workspace; status_code: 200 - - Parameters - ---------- - organization_id : str - - workspace_id : str - - project_id : str - - token : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", - method="POST", - params={ - "project_id": project_id, - }, - json={ - "token": token, - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawOrganizationClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OrganizationDetails]: - """ - Return the details of the organization. - - Parameters - ---------- - organization_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OrganizationDetails] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OrganizationDetails, - parse_obj_as( - type_=OrganizationDetails, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_organizations( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[Organization]]: - """ - Returns a list of organizations associated with the user's session. - - Returns: - list[Organization]: A list of organizations associated with the user's session. - - Raises: - HTTPException: If there is an error retrieving the organizations from the database. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[Organization]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "organizations", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Organization], - parse_obj_as( - type_=typing.List[Organization], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def invite_user_to_workspace( - self, - organization_id: str, - workspace_id: str, - *, - request: typing.Sequence[InviteRequest], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Assigns a role to a user in an organization. - - Args: - organization_id (str): The ID of the organization. - payload (InviteRequest): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - organization_id : str - - workspace_id : str - - request : typing.Sequence[InviteRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, - annotation=typing.Sequence[InviteRequest], - direction="write", - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def resend_invitation( - self, - organization_id: str, - workspace_id: str, - *, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Resend an invitation to a user to an Organization. - - Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 - - Returns: - JSONResponse: Resent invitation to user; status_code: 200 - - Parameters - ---------- - organization_id : str - - workspace_id : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", - method="POST", - json={ - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def accept_invitation( - self, - organization_id: str, - workspace_id: str, - *, - project_id: str, - token: str, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Accept an invitation to an organization. - - Raises: - HTTPException: _description_; status_code: 500 - HTTPException: Invitation not found or has expired; status_code: 400 - HTTPException: You already belong to this organization; status_code: 400 - - Returns: - JSONResponse: Accepted invitation to workspace; status_code: 200 - - Parameters - ---------- - organization_id : str - - workspace_id : str - - project_id : str - - token : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", - method="POST", - params={ - "project_id": project_id, - }, - json={ - "token": token, - "email": email, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/raw_client.py b/sdk/agenta/client/backend/raw_client.py deleted file mode 100644 index a4b4a7857b..0000000000 --- a/sdk/agenta/client/backend/raw_client.py +++ /dev/null @@ -1,1432 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing -from json.decoder import JSONDecodeError - -from .core.api_error import ApiError -from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .core.http_response import AsyncHttpResponse, HttpResponse -from .core.jsonable_encoder import jsonable_encoder -from .core.pydantic_utilities import parse_obj_as -from .core.request_options import RequestOptions -from .errors.unprocessable_entity_error import UnprocessableEntityError -from .types.http_validation_error import HttpValidationError -from .types.organization_output import OrganizationOutput -from .types.permission import Permission -from .types.workspace_response import WorkspaceResponse - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawAgentaApi: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get_own_org( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[OrganizationOutput]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OrganizationOutput] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "organizations/own", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OrganizationOutput, - parse_obj_as( - type_=OrganizationOutput, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_organization( - self, - organization_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", - method="PUT", - json={ - "name": name, - "description": description, - "updated_at": updated_at, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_workspace( - self, - organization_id: str, - *, - name: str, - description: typing.Optional[str] = OMIT, - type: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkspaceResponse]: - """ - Parameters - ---------- - organization_id : str - - name : str - - description : typing.Optional[str] - - type : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkspaceResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces", - method="POST", - json={ - "name": name, - "description": description, - "type": type, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkspaceResponse, - parse_obj_as( - type_=WorkspaceResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_workspace( - self, - organization_id: str, - workspace_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[dt.datetime] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkspaceResponse]: - """ - Parameters - ---------- - organization_id : str - - workspace_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[dt.datetime] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkspaceResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}", - method="PUT", - json={ - "name": name, - "description": description, - "updated_at": updated_at, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkspaceResponse, - parse_obj_as( - type_=WorkspaceResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_all_workspace_permissions( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[Permission]]: - """ - Get all workspace permissions. - - Returns a list of all available workspace permissions. - - Returns: - List[Permission]: A list of Permission objects representing the available workspace permissions. - - Raises: - HTTPException: If there is an error retrieving the workspace permissions. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[Permission]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "workspaces/permissions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Permission], - parse_obj_as( - type_=typing.List[Permission], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def assign_role_to_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Assigns a role to a user in a workspace. - - Args: - payload (UserRole): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/roles", - method="POST", - json={ - "email": email, - "organization_id": organization_id, - "role": role, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unassign_role_from_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Delete a role assignment from a user in a workspace. - - Args: - workspace_id (str): The ID of the workspace. - email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. - role (str): The role to remove from the user. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role assignment was successfully deleted. - - Raises: - HTTPException: If there is an error in the request or the user does not have permission to perform the action. - HTTPException: If there is an error in updating the user's roles. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/roles", - method="DELETE", - params={ - "email": email, - "organization_id": organization_id, - "role": role, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_accounts( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "admin/accounts/delete-all", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def health_check( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "health", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_user_profile( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "profile", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def reset_user_password( - self, *, user_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - user_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "profile/reset-password", - method="POST", - params={ - "user_id": user_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawAgentaApi: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get_own_org( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[OrganizationOutput]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OrganizationOutput] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "organizations/own", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OrganizationOutput, - parse_obj_as( - type_=OrganizationOutput, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_organization( - self, - organization_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - organization_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", - method="PUT", - json={ - "name": name, - "description": description, - "updated_at": updated_at, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_workspace( - self, - organization_id: str, - *, - name: str, - description: typing.Optional[str] = OMIT, - type: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkspaceResponse]: - """ - Parameters - ---------- - organization_id : str - - name : str - - description : typing.Optional[str] - - type : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkspaceResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces", - method="POST", - json={ - "name": name, - "description": description, - "type": type, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkspaceResponse, - parse_obj_as( - type_=WorkspaceResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_workspace( - self, - organization_id: str, - workspace_id: str, - *, - name: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - updated_at: typing.Optional[dt.datetime] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkspaceResponse]: - """ - Parameters - ---------- - organization_id : str - - workspace_id : str - - name : typing.Optional[str] - - description : typing.Optional[str] - - updated_at : typing.Optional[dt.datetime] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkspaceResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}", - method="PUT", - json={ - "name": name, - "description": description, - "updated_at": updated_at, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkspaceResponse, - parse_obj_as( - type_=WorkspaceResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_all_workspace_permissions( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[Permission]]: - """ - Get all workspace permissions. - - Returns a list of all available workspace permissions. - - Returns: - List[Permission]: A list of Permission objects representing the available workspace permissions. - - Raises: - HTTPException: If there is an error retrieving the workspace permissions. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[Permission]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "workspaces/permissions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Permission], - parse_obj_as( - type_=typing.List[Permission], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def assign_role_to_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Assigns a role to a user in a workspace. - - Args: - payload (UserRole): The payload containing the organization id, user email, and role to assign. - workspace_id (str): The ID of the workspace. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role was successfully assigned, False otherwise. - - Raises: - HTTPException: If the user does not have permission to perform this action. - HTTPException: If there is an error assigning the role to the user. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/roles", - method="POST", - json={ - "email": email, - "organization_id": organization_id, - "role": role, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unassign_role_from_user( - self, - workspace_id: str, - *, - email: str, - organization_id: str, - role: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Delete a role assignment from a user in a workspace. - - Args: - workspace_id (str): The ID of the workspace. - email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. - role (str): The role to remove from the user. - request (Request): The FastAPI request object. - - Returns: - bool: True if the role assignment was successfully deleted. - - Raises: - HTTPException: If there is an error in the request or the user does not have permission to perform the action. - HTTPException: If there is an error in updating the user's roles. - - Parameters - ---------- - workspace_id : str - - email : str - - organization_id : str - - role : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/roles", - method="DELETE", - params={ - "email": email, - "organization_id": organization_id, - "role": role, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_accounts( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "admin/accounts/delete-all", - method="POST", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def health_check( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "health", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_user_profile( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "profile", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def reset_user_password( - self, *, user_id: str, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Parameters - ---------- - user_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "profile/reset-password", - method="POST", - params={ - "user_id": user_id, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/scopes/__init__.py b/sdk/agenta/client/backend/scopes/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/scopes/__init__.py +++ b/sdk/agenta/client/backend/scopes/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/scopes/client.py b/sdk/agenta/client/backend/scopes/client.py index 304674d38e..7c437da103 100644 --- a/sdk/agenta/client/backend/scopes/client.py +++ b/sdk/agenta/client/backend/scopes/client.py @@ -1,27 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.projects_response import ProjectsResponse -from .raw_client import AsyncRawScopesClient, RawScopesClient +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper class ScopesClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawScopesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawScopesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawScopesClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def get_projects( self, *, request_options: typing.Optional[RequestOptions] = None @@ -43,27 +34,33 @@ def get_projects( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.scopes.get_projects() """ - _response = self._raw_client.get_projects(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "projects", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ProjectsResponse], + parse_obj_as( + type_=typing.List[ProjectsResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncScopesClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawScopesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawScopesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawScopesClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def get_projects( self, *, request_options: typing.Optional[RequestOptions] = None @@ -87,6 +84,7 @@ async def get_projects( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -96,5 +94,21 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_projects(request_options=request_options) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "projects", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ProjectsResponse], + parse_obj_as( + type_=typing.List[ProjectsResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/scopes/raw_client.py b/sdk/agenta/client/backend/scopes/raw_client.py deleted file mode 100644 index 50b04978f3..0000000000 --- a/sdk/agenta/client/backend/scopes/raw_client.py +++ /dev/null @@ -1,105 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..types.projects_response import ProjectsResponse - - -class RawScopesClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get_projects( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[ProjectsResponse]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[ProjectsResponse]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "projects", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ProjectsResponse], - parse_obj_as( - type_=typing.List[ProjectsResponse], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawScopesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get_projects( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[ProjectsResponse]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[ProjectsResponse]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "projects", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ProjectsResponse], - parse_obj_as( - type_=typing.List[ProjectsResponse], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/testsets/__init__.py b/sdk/agenta/client/backend/testsets/__init__.py index 98c08f20d0..67a41b2742 100644 --- a/sdk/agenta/client/backend/testsets/__init__.py +++ b/sdk/agenta/client/backend/testsets/__init__.py @@ -1,15 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .types import ( - CreateTestsetFromFileRequestFileType, - FetchTestsetToFileRequestFileType, - UpdateTestsetFromFileRequestFileType, -) - -__all__ = [ - "CreateTestsetFromFileRequestFileType", - "FetchTestsetToFileRequestFileType", - "UpdateTestsetFromFileRequestFileType", -] diff --git a/sdk/agenta/client/backend/testsets/client.py b/sdk/agenta/client/backend/testsets/client.py index b9cd2862b8..881432a112 100644 --- a/sdk/agenta/client/backend/testsets/client.py +++ b/sdk/agenta/client/backend/testsets/client.py @@ -1,27 +1,18 @@ # This file was auto-generated by Fern from our API Definition. import typing - +from ..core.client_wrapper import SyncClientWrapper from .. import core -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.meta_request import MetaRequest -from ..types.testset_output_response import TestsetOutputResponse -from ..types.testset_simple_response import TestsetSimpleResponse -from ..types.testcase_response import TestcaseResponse -from ..types.testset import Testset -from ..types.testset_response import TestsetResponse -from ..types.testsets_response import TestsetsResponse -from .raw_client import AsyncRawTestsetsClient, RawTestsetsClient -from .types.create_testset_from_file_request_file_type import ( - CreateTestsetFromFileRequestFileType, -) -from .types.fetch_testset_to_file_request_file_type import ( - FetchTestsetToFileRequestFileType, -) -from .types.update_testset_from_file_request_file_type import ( - UpdateTestsetFromFileRequestFileType, -) +from ..types.test_set_simple_response import TestSetSimpleResponse +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.test_set_output_response import TestSetOutputResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -29,18 +20,7 @@ class TestsetsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawTestsetsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawTestsetsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawTestsetsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def upload_file( self, @@ -49,7 +29,7 @@ def upload_file( upload_type: typing.Optional[str] = OMIT, testset_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetSimpleResponse: + ) -> TestSetSimpleResponse: """ Uploads a CSV or JSON file and saves its data to Postgres. @@ -75,7 +55,7 @@ def upload_file( Returns ------- - TestsetSimpleResponse + TestSetSimpleResponse Successful Response Examples @@ -84,16 +64,46 @@ def upload_file( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.upload_file() """ - _response = self._raw_client.upload_file( - file=file, - upload_type=upload_type, - testset_name=testset_name, + _response = self._client_wrapper.httpx_client.request( + "testsets/upload", + method="POST", + data={ + "upload_type": upload_type, + "testset_name": testset_name, + }, + files={ + "file": file, + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def import_testset( self, @@ -102,7 +112,7 @@ def import_testset( endpoint: typing.Optional[str] = OMIT, testset_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetSimpleResponse: + ) -> TestSetSimpleResponse: """ Import JSON testset data from an endpoint and save it to Postgres. @@ -126,7 +136,7 @@ def import_testset( Returns ------- - TestsetSimpleResponse + TestSetSimpleResponse Successful Response Examples @@ -135,20 +145,50 @@ def import_testset( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.import_testset() """ - _response = self._raw_client.import_testset( - authorization=authorization, - endpoint=endpoint, - testset_name=testset_name, + _response = self._client_wrapper.httpx_client.request( + "testsets/endpoint", + method="POST", + params={ + "authorization": authorization, + }, + json={ + "endpoint": endpoint, + "testset_name": testset_name, + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_testsets( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[TestsetOutputResponse]: + ) -> typing.List[TestSetOutputResponse]: """ Get all testsets. @@ -165,7 +205,7 @@ def get_testsets( Returns ------- - typing.List[TestsetOutputResponse] + typing.List[TestSetOutputResponse] Successful Response Examples @@ -174,46 +214,106 @@ def get_testsets( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.get_testsets() """ - _response = self._raw_client.get_testsets(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "testsets", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[TestSetOutputResponse], + parse_obj_as( + type_=typing.List[TestSetOutputResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_testset( self, *, - testset: Testset, + name: str, + csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> TestSetSimpleResponse: """ + Create a testset with given name, save the testset to Postgres. + + Args: + name (str): name of the test set. + testset (Dict[str, str]): test set data. + + Returns: + str: The id of the test set created. + Parameters ---------- - testset : Testset + name : str + + csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + TestSetSimpleResponse Successful Response Examples -------- - from agenta import AgentaApi, Testset + from agenta import AgentaApi client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.create_testset( - testset=Testset(), + name="name", + csvdata=[{"key": "value"}], ) """ - _response = self._raw_client.create_testset( - testset=testset, request_options=request_options - ) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "testsets", + method="POST", + json={ + "name": name, + "csvdata": csvdata, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_testsets( self, @@ -248,15 +348,47 @@ def delete_testsets( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.delete_testsets( testset_ids=["testset_ids"], ) """ - _response = self._raw_client.delete_testsets( - testset_ids=testset_ids, request_options=request_options - ) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "testsets", + method="DELETE", + json={ + "testset_ids": testset_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_single_testset( self, @@ -291,15 +423,40 @@ def get_single_testset( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.get_single_testset( testset_id="testset_id", ) """ - _response = self._raw_client.get_single_testset( - testset_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"testsets/{jsonable_encoder(testset_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_testset( self, @@ -313,11 +470,11 @@ def update_testset( Update a testset with given id, update the testset in Postgres. Args: - testset_id (str): id of the testset to be updated. + testset_id (str): id of the test set to be updated. csvdata (NewTestset): New data to replace the old testset. Returns: - str: The id of the testset updated. + str: The id of the test set updated. Parameters ---------- @@ -341,6 +498,7 @@ def update_testset( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.testsets.update_testset( testset_id="testset_id", @@ -348,1153 +506,561 @@ def update_testset( csvdata=[{"key": "value"}], ) """ - _response = self._raw_client.update_testset( - testset_id, name=name, csvdata=csvdata, request_options=request_options - ) - return _response.data - - def list_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> TestsetResponse: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response + _response = self._client_wrapper.httpx_client.request( + f"testsets/{jsonable_encoder(testset_id)}", + method="PUT", + json={ + "name": name, + "csvdata": csvdata, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - Examples - -------- - from agenta import AgentaApi - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.testsets.list_testsets() - """ - _response = self._raw_client.list_testsets(request_options=request_options) - return _response.data +class AsyncTestsetsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper - def fetch_testset( + async def upload_file( self, - testset_id: str, *, + file: core.File, + upload_type: typing.Optional[str] = OMIT, + testset_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> TestSetSimpleResponse: """ + Uploads a CSV or JSON file and saves its data to Postgres. + + Args: + upload_type : Either a json or csv file. + file (UploadFile): The CSV or JSON file to upload. + testset_name (Optional): the name of the testset if provided. + + Returns: + dict: The result of the upload process. + Parameters ---------- - testset_id : str + file : core.File + See core.File for more documentation + + upload_type : typing.Optional[str] + + testset_name : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + TestSetSimpleResponse Successful Response Examples -------- - from agenta import AgentaApi + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.fetch_testset( - testset_id="testset_id", - ) + + + async def main() -> None: + await client.testsets.upload_file() + + + asyncio.run(main()) """ - _response = self._raw_client.fetch_testset( - testset_id, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "testsets/upload", + method="POST", + data={ + "upload_type": upload_type, + "testset_name": testset_name, + }, + files={ + "file": file, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def edit_testset( + async def import_testset( self, - testset_id: str, *, - testset: Testset, + authorization: typing.Optional[str] = None, + endpoint: typing.Optional[str] = OMIT, + testset_name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> TestSetSimpleResponse: """ + Import JSON testset data from an endpoint and save it to Postgres. + + Args: + endpoint (str): An endpoint URL to import data from. + testset_name (str): the name of the testset if provided. + + Returns: + dict: The result of the import process. + Parameters ---------- - testset_id : str + authorization : typing.Optional[str] + + endpoint : typing.Optional[str] - testset : Testset + testset_name : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + TestSetSimpleResponse Successful Response Examples -------- - from agenta import AgentaApi, Testset + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.edit_testset( - testset_id="testset_id", - testset=Testset(), - ) + + + async def main() -> None: + await client.testsets.import_testset() + + + asyncio.run(main()) """ - _response = self._raw_client.edit_testset( - testset_id, testset=testset, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "testsets/endpoint", + method="POST", + params={ + "authorization": authorization, + }, + json={ + "endpoint": endpoint, + "testset_name": testset_name, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def archive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + async def get_testsets( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[TestSetOutputResponse]: """ + Get all testsets. + + Returns: + - A list of testset objects. + + Raises: + - `HTTPException` with status code 404 if no testsets are found. + Parameters ---------- - testset_id : str - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + typing.List[TestSetOutputResponse] Successful Response Examples -------- - from agenta import AgentaApi + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.archive_testset( - testset_id="testset_id", - ) + + + async def main() -> None: + await client.testsets.get_testsets() + + + asyncio.run(main()) """ - _response = self._raw_client.archive_testset( - testset_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "testsets", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[TestSetOutputResponse], + parse_obj_as( + type_=typing.List[TestSetOutputResponse], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def unarchive_testset( + async def create_testset( self, - testset_id: str, *, + name: str, + csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> TestSetSimpleResponse: """ + Create a testset with given name, save the testset to Postgres. + + Args: + name (str): name of the test set. + testset (Dict[str, str]): test set data. + + Returns: + str: The id of the test set created. + Parameters ---------- - testset_id : str + name : str + + csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + TestSetSimpleResponse Successful Response Examples -------- - from agenta import AgentaApi + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.unarchive_testset( - testset_id="testset_id", - ) + + + async def main() -> None: + await client.testsets.create_testset( + name="name", + csvdata=[{"key": "value"}], + ) + + + asyncio.run(main()) """ - _response = self._raw_client.unarchive_testset( - testset_id, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "testsets", + method="POST", + json={ + "name": name, + "csvdata": csvdata, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + TestSetSimpleResponse, + parse_obj_as( + type_=TestSetSimpleResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def query_testsets( + async def delete_testsets( self, *, - request: typing.Optional[MetaRequest] = None, + testset_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetsResponse: + ) -> typing.List[str]: """ + Delete specific testsets based on their unique IDs. + + Args: + testset_ids (List[str]): The unique identifiers of the testsets to delete. + + Returns: + A list of the deleted testsets' IDs. + Parameters ---------- - request : typing.Optional[MetaRequest] + testset_ids : typing.Sequence[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetsResponse + typing.List[str] Successful Response Examples -------- - from agenta import AgentaApi + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.query_testsets() + + + async def main() -> None: + await client.testsets.delete_testsets( + testset_ids=["testset_ids"], + ) + + + asyncio.run(main()) """ - _response = self._raw_client.query_testsets( - request=request, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "testsets", + method="DELETE", + json={ + "testset_ids": testset_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[str], + parse_obj_as( + type_=typing.List[str], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def create_testset_from_file( + async def get_single_testset( self, + testset_id: str, *, - file: core.File, - file_type: typing.Optional[CreateTestsetFromFileRequestFileType] = OMIT, - testset_slug: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - testset_description: typing.Optional[str] = OMIT, - testset_meta: typing.Optional[typing.List[str]] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> typing.Optional[typing.Any]: """ - Parameters - ---------- - file : core.File - See core.File for more documentation - - file_type : typing.Optional[CreateTestsetFromFileRequestFileType] - - testset_slug : typing.Optional[str] + Fetch a specific testset in Postgres. - testset_name : typing.Optional[str] + Args: + testset_id (str): The id of the testset to fetch. - testset_description : typing.Optional[str] + Returns: + The requested testset if found, else an HTTPException. - testset_meta : typing.Optional[typing.List[str]] + Parameters + ---------- + testset_id : str request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + typing.Optional[typing.Any] Successful Response Examples -------- - from agenta import AgentaApi + import asyncio - client = AgentaApi( + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.testsets.create_testset_from_file() + + + async def main() -> None: + await client.testsets.get_single_testset( + testset_id="testset_id", + ) + + + asyncio.run(main()) """ - _response = self._raw_client.create_testset_from_file( - file=file, - file_type=file_type, - testset_slug=testset_slug, - testset_name=testset_name, - testset_description=testset_description, - testset_meta=testset_meta, + _response = await self._client_wrapper.httpx_client.request( + f"testsets/{jsonable_encoder(testset_id)}", + method="GET", request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def update_testset_from_file( - self, - testset_id: str, - *, - file: core.File, - file_type: typing.Optional[UpdateTestsetFromFileRequestFileType] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - file : core.File - See core.File for more documentation - - file_type : typing.Optional[UpdateTestsetFromFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.testsets.update_testset_from_file( - testset_id="testset_id", - ) - """ - _response = self._raw_client.update_testset_from_file( - testset_id, file=file, file_type=file_type, request_options=request_options - ) - return _response.data - - def fetch_testset_to_file( - self, - testset_id: str, - *, - file_type: typing.Optional[FetchTestsetToFileRequestFileType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - file_type : typing.Optional[FetchTestsetToFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.testsets.fetch_testset_to_file( - testset_id="testset_id", - ) - """ - _response = self._raw_client.fetch_testset_to_file( - testset_id, file_type=file_type, request_options=request_options - ) - return _response.data - - def fetch_testcase( - self, - testcase_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestcaseResponse: - """ - Parameters - ---------- - testcase_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestcaseResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.testsets.fetch_testcase( - testcase_id="testcase_id", - ) - """ - _response = self._raw_client.fetch_testcase( - testcase_id, request_options=request_options - ) - return _response.data - - -class AsyncTestsetsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawTestsetsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawTestsetsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawTestsetsClient - """ - return self._raw_client - - async def upload_file( - self, - *, - file: core.File, - upload_type: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetSimpleResponse: - """ - Uploads a CSV or JSON file and saves its data to Postgres. - - Args: - upload_type : Either a json or csv file. - file (UploadFile): The CSV or JSON file to upload. - testset_name (Optional): the name of the testset if provided. - - Returns: - dict: The result of the upload process. - - Parameters - ---------- - file : core.File - See core.File for more documentation - - upload_type : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetSimpleResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.upload_file() - - - asyncio.run(main()) - """ - _response = await self._raw_client.upload_file( - file=file, - upload_type=upload_type, - testset_name=testset_name, - request_options=request_options, - ) - return _response.data - - async def import_testset( - self, - *, - authorization: typing.Optional[str] = None, - endpoint: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetSimpleResponse: - """ - Import JSON testset data from an endpoint and save it to Postgres. - - Args: - endpoint (str): An endpoint URL to import data from. - testset_name (str): the name of the testset if provided. - - Returns: - dict: The result of the import process. - - Parameters - ---------- - authorization : typing.Optional[str] - - endpoint : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetSimpleResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.import_testset() - - - asyncio.run(main()) - """ - _response = await self._raw_client.import_testset( - authorization=authorization, - endpoint=endpoint, - testset_name=testset_name, - request_options=request_options, - ) - return _response.data - - async def get_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[TestsetOutputResponse]: - """ - Get all testsets. - - Returns: - - A list of testset objects. - - Raises: - - `HTTPException` with status code 404 if no testsets are found. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[TestsetOutputResponse] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.get_testsets() - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_testsets(request_options=request_options) - return _response.data - - async def create_testset( - self, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, Testset - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.create_testset( - testset=Testset(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_testset( - testset=testset, request_options=request_options - ) - return _response.data - - async def delete_testsets( - self, - *, - testset_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[str]: - """ - Delete specific testsets based on their unique IDs. - - Args: - testset_ids (List[str]): The unique identifiers of the testsets to delete. - - Returns: - A list of the deleted testsets' IDs. - - Parameters - ---------- - testset_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[str] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.delete_testsets( - testset_ids=["testset_ids"], - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete_testsets( - testset_ids=testset_ids, request_options=request_options - ) - return _response.data - - async def get_single_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Fetch a specific testset in Postgres. - - Args: - testset_id (str): The id of the testset to fetch. - - Returns: - The requested testset if found, else an HTTPException. - - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.get_single_testset( - testset_id="testset_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_single_testset( - testset_id, request_options=request_options - ) - return _response.data - - async def update_testset( - self, - testset_id: str, - *, - name: str, - csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: - """ - Update a testset with given id, update the testset in Postgres. - - Args: - testset_id (str): id of the testset to be updated. - csvdata (NewTestset): New data to replace the old testset. - - Returns: - str: The id of the testset updated. - - Parameters - ---------- - testset_id : str - - name : str - - csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.Optional[typing.Any] - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.update_testset( - testset_id="testset_id", - name="name", - csvdata=[{"key": "value"}], - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_testset( - testset_id, name=name, csvdata=csvdata, request_options=request_options - ) - return _response.data - - async def list_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> TestsetResponse: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.list_testsets() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_testsets( - request_options=request_options - ) - return _response.data - - async def fetch_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.fetch_testset( - testset_id="testset_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_testset( - testset_id, request_options=request_options - ) - return _response.data - - async def edit_testset( - self, - testset_id: str, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, Testset - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.edit_testset( - testset_id="testset_id", - testset=Testset(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_testset( - testset_id, testset=testset, request_options=request_options - ) - return _response.data - - async def archive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.archive_testset( - testset_id="testset_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.archive_testset( - testset_id, request_options=request_options - ) - return _response.data - - async def unarchive_testset( + async def update_testset( self, testset_id: str, *, + name: str, + csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.unarchive_testset( - testset_id="testset_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unarchive_testset( - testset_id, request_options=request_options - ) - return _response.data - - async def query_testsets( - self, - *, - request: typing.Optional[MetaRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetsResponse: - """ - Parameters - ---------- - request : typing.Optional[MetaRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.query_testsets() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_testsets( - request=request, request_options=request_options - ) - return _response.data - - async def create_testset_from_file( - self, - *, - file: core.File, - file_type: typing.Optional[CreateTestsetFromFileRequestFileType] = OMIT, - testset_slug: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - testset_description: typing.Optional[str] = OMIT, - testset_meta: typing.Optional[typing.List[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: + ) -> typing.Optional[typing.Any]: """ - Parameters - ---------- - file : core.File - See core.File for more documentation - - file_type : typing.Optional[CreateTestsetFromFileRequestFileType] - - testset_slug : typing.Optional[str] - - testset_name : typing.Optional[str] - - testset_description : typing.Optional[str] - - testset_meta : typing.Optional[typing.List[str]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.create_testset_from_file() + Update a testset with given id, update the testset in Postgres. + Args: + testset_id (str): id of the test set to be updated. + csvdata (NewTestset): New data to replace the old testset. - asyncio.run(main()) - """ - _response = await self._raw_client.create_testset_from_file( - file=file, - file_type=file_type, - testset_slug=testset_slug, - testset_name=testset_name, - testset_description=testset_description, - testset_meta=testset_meta, - request_options=request_options, - ) - return _response.data + Returns: + str: The id of the test set updated. - async def update_testset_from_file( - self, - testset_id: str, - *, - file: core.File, - file_type: typing.Optional[UpdateTestsetFromFileRequestFileType] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ Parameters ---------- testset_id : str - file : core.File - See core.File for more documentation - - file_type : typing.Optional[UpdateTestsetFromFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestsetResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.update_testset_from_file( - testset_id="testset_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.update_testset_from_file( - testset_id, file=file, file_type=file_type, request_options=request_options - ) - return _response.data - - async def fetch_testset_to_file( - self, - testset_id: str, - *, - file_type: typing.Optional[FetchTestsetToFileRequestFileType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestsetResponse: - """ - Parameters - ---------- - testset_id : str + name : str - file_type : typing.Optional[FetchTestsetToFileRequestFileType] + csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - TestsetResponse + typing.Optional[typing.Any] Successful Response Examples @@ -1505,61 +1071,50 @@ async def fetch_testset_to_file( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.testsets.fetch_testset_to_file( + await client.testsets.update_testset( testset_id="testset_id", + name="name", + csvdata=[{"key": "value"}], ) asyncio.run(main()) """ - _response = await self._raw_client.fetch_testset_to_file( - testset_id, file_type=file_type, request_options=request_options - ) - return _response.data - - async def fetch_testcase( - self, - testcase_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> TestcaseResponse: - """ - Parameters - ---------- - testcase_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - TestcaseResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.testsets.fetch_testcase( - testcase_id="testcase_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_testcase( - testcase_id, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + f"testsets/{jsonable_encoder(testset_id)}", + method="PUT", + json={ + "name": name, + "csvdata": csvdata, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/testsets/raw_client.py b/sdk/agenta/client/backend/testsets/raw_client.py deleted file mode 100644 index ff8421e847..0000000000 --- a/sdk/agenta/client/backend/testsets/raw_client.py +++ /dev/null @@ -1,2348 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from .. import core -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.meta_request import MetaRequest -from ..types.testset_output_response import TestsetOutputResponse -from ..types.testset_simple_response import TestsetSimpleResponse -from ..types.testcase_response import TestcaseResponse -from ..types.testset import Testset -from ..types.testset_response import TestsetResponse -from ..types.testsets_response import TestsetsResponse -from .types.create_testset_from_file_request_file_type import ( - CreateTestsetFromFileRequestFileType, -) -from .types.fetch_testset_to_file_request_file_type import ( - FetchTestsetToFileRequestFileType, -) -from .types.update_testset_from_file_request_file_type import ( - UpdateTestsetFromFileRequestFileType, -) - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawTestsetsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def upload_file( - self, - *, - file: core.File, - upload_type: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetSimpleResponse]: - """ - Uploads a CSV or JSON file and saves its data to Postgres. - - Args: - upload_type : Either a json or csv file. - file (UploadFile): The CSV or JSON file to upload. - testset_name (Optional): the name of the testset if provided. - - Returns: - dict: The result of the upload process. - - Parameters - ---------- - file : core.File - See core.File for more documentation - - upload_type : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetSimpleResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "testsets/upload", - method="POST", - data={ - "upload_type": upload_type, - "testset_name": testset_name, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetSimpleResponse, - parse_obj_as( - type_=TestsetSimpleResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def import_testset( - self, - *, - authorization: typing.Optional[str] = None, - endpoint: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetSimpleResponse]: - """ - Import JSON testset data from an endpoint and save it to Postgres. - - Args: - endpoint (str): An endpoint URL to import data from. - testset_name (str): the name of the testset if provided. - - Returns: - dict: The result of the import process. - - Parameters - ---------- - authorization : typing.Optional[str] - - endpoint : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetSimpleResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "testsets/endpoint", - method="POST", - params={ - "authorization": authorization, - }, - data={ - "endpoint": endpoint, - "testset_name": testset_name, - }, - headers={ - "content-type": "application/x-www-form-urlencoded", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetSimpleResponse, - parse_obj_as( - type_=TestsetSimpleResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[TestsetOutputResponse]]: - """ - Get all testsets. - - Returns: - - A list of testset objects. - - Raises: - - `HTTPException` with status code 404 if no testsets are found. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[TestsetOutputResponse]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "testsets", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[TestsetOutputResponse], - parse_obj_as( - type_=typing.List[TestsetOutputResponse], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_testset( - self, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/testsets/", - method="POST", - json={ - "testset": convert_and_respect_annotation_metadata( - object_=testset, annotation=Testset, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_testsets( - self, - *, - testset_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[str]]: - """ - Delete specific testsets based on their unique IDs. - - Args: - testset_ids (List[str]): The unique identifiers of the testsets to delete. - - Returns: - A list of the deleted testsets' IDs. - - Parameters - ---------- - testset_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[str]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "testsets", - method="DELETE", - json={ - "testset_ids": testset_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_single_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Fetch a specific testset in Postgres. - - Args: - testset_id (str): The id of the testset to fetch. - - Returns: - The requested testset if found, else an HTTPException. - - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"testsets/{jsonable_encoder(testset_id)}", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_testset( - self, - testset_id: str, - *, - name: str, - csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Update a testset with given id, update the testset in Postgres. - - Args: - testset_id (str): id of the testset to be updated. - csvdata (NewTestset): New data to replace the old testset. - - Returns: - str: The id of the testset updated. - - Parameters - ---------- - testset_id : str - - name : str - - csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"testsets/{jsonable_encoder(testset_id)}", - method="PUT", - json={ - "name": name, - "csvdata": csvdata, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/testsets/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_testset( - self, - testset_id: str, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}", - method="PUT", - json={ - "testset": convert_and_respect_annotation_metadata( - object_=testset, annotation=Testset, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def archive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unarchive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_testsets( - self, - *, - request: typing.Optional[MetaRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetsResponse]: - """ - Parameters - ---------- - request : typing.Optional[MetaRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/testsets/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=MetaRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetsResponse, - parse_obj_as( - type_=TestsetsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_testset_from_file( - self, - *, - file: core.File, - file_type: typing.Optional[CreateTestsetFromFileRequestFileType] = OMIT, - testset_slug: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - testset_description: typing.Optional[str] = OMIT, - testset_meta: typing.Optional[typing.List[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - file : core.File - See core.File for more documentation - - file_type : typing.Optional[CreateTestsetFromFileRequestFileType] - - testset_slug : typing.Optional[str] - - testset_name : typing.Optional[str] - - testset_description : typing.Optional[str] - - testset_meta : typing.Optional[typing.List[str]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/testsets/upload", - method="POST", - data={ - "file_type": file_type, - "testset_slug": testset_slug, - "testset_name": testset_name, - "testset_description": testset_description, - "testset_meta": testset_meta, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_testset_from_file( - self, - testset_id: str, - *, - file: core.File, - file_type: typing.Optional[UpdateTestsetFromFileRequestFileType] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - file : core.File - See core.File for more documentation - - file_type : typing.Optional[UpdateTestsetFromFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/upload", - method="POST", - data={ - "file_type": file_type, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_testset_to_file( - self, - testset_id: str, - *, - file_type: typing.Optional[FetchTestsetToFileRequestFileType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - file_type : typing.Optional[FetchTestsetToFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestsetResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/download", - method="POST", - params={ - "file_type": file_type, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_testcase( - self, - testcase_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TestcaseResponse]: - """ - Parameters - ---------- - testcase_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[TestcaseResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/testsets/testcases/{jsonable_encoder(testcase_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestcaseResponse, - parse_obj_as( - type_=TestcaseResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawTestsetsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def upload_file( - self, - *, - file: core.File, - upload_type: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetSimpleResponse]: - """ - Uploads a CSV or JSON file and saves its data to Postgres. - - Args: - upload_type : Either a json or csv file. - file (UploadFile): The CSV or JSON file to upload. - testset_name (Optional): the name of the testset if provided. - - Returns: - dict: The result of the upload process. - - Parameters - ---------- - file : core.File - See core.File for more documentation - - upload_type : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetSimpleResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "testsets/upload", - method="POST", - data={ - "upload_type": upload_type, - "testset_name": testset_name, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetSimpleResponse, - parse_obj_as( - type_=TestsetSimpleResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def import_testset( - self, - *, - authorization: typing.Optional[str] = None, - endpoint: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetSimpleResponse]: - """ - Import JSON testset data from an endpoint and save it to Postgres. - - Args: - endpoint (str): An endpoint URL to import data from. - testset_name (str): the name of the testset if provided. - - Returns: - dict: The result of the import process. - - Parameters - ---------- - authorization : typing.Optional[str] - - endpoint : typing.Optional[str] - - testset_name : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetSimpleResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "testsets/endpoint", - method="POST", - params={ - "authorization": authorization, - }, - data={ - "endpoint": endpoint, - "testset_name": testset_name, - }, - headers={ - "content-type": "application/x-www-form-urlencoded", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetSimpleResponse, - parse_obj_as( - type_=TestsetSimpleResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[TestsetOutputResponse]]: - """ - Get all testsets. - - Returns: - - A list of testset objects. - - Raises: - - `HTTPException` with status code 404 if no testsets are found. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[TestsetOutputResponse]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "testsets", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[TestsetOutputResponse], - parse_obj_as( - type_=typing.List[TestsetOutputResponse], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_testset( - self, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/testsets/", - method="POST", - json={ - "testset": convert_and_respect_annotation_metadata( - object_=testset, annotation=Testset, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_testsets( - self, - *, - testset_ids: typing.Sequence[str], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[str]]: - """ - Delete specific testsets based on their unique IDs. - - Args: - testset_ids (List[str]): The unique identifiers of the testsets to delete. - - Returns: - A list of the deleted testsets' IDs. - - Parameters - ---------- - testset_ids : typing.Sequence[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[str]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "testsets", - method="DELETE", - json={ - "testset_ids": testset_ids, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[str], - parse_obj_as( - type_=typing.List[str], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_single_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Fetch a specific testset in Postgres. - - Args: - testset_id (str): The id of the testset to fetch. - - Returns: - The requested testset if found, else an HTTPException. - - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"testsets/{jsonable_encoder(testset_id)}", - method="GET", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_testset( - self, - testset_id: str, - *, - name: str, - csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]], - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Update a testset with given id, update the testset in Postgres. - - Args: - testset_id (str): id of the testset to be updated. - csvdata (NewTestset): New data to replace the old testset. - - Returns: - str: The id of the testset updated. - - Parameters - ---------- - testset_id : str - - name : str - - csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"testsets/{jsonable_encoder(testset_id)}", - method="PUT", - json={ - "name": name, - "csvdata": csvdata, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_testsets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/testsets/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_testset( - self, - testset_id: str, - *, - testset: Testset, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - testset : Testset - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}", - method="PUT", - json={ - "testset": convert_and_respect_annotation_metadata( - object_=testset, annotation=Testset, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def archive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unarchive_testset( - self, - testset_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_testsets( - self, - *, - request: typing.Optional[MetaRequest] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetsResponse]: - """ - Parameters - ---------- - request : typing.Optional[MetaRequest] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/testsets/query", - method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=MetaRequest, direction="write" - ), - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetsResponse, - parse_obj_as( - type_=TestsetsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_testset_from_file( - self, - *, - file: core.File, - file_type: typing.Optional[CreateTestsetFromFileRequestFileType] = OMIT, - testset_slug: typing.Optional[str] = OMIT, - testset_name: typing.Optional[str] = OMIT, - testset_description: typing.Optional[str] = OMIT, - testset_meta: typing.Optional[typing.List[str]] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - file : core.File - See core.File for more documentation - - file_type : typing.Optional[CreateTestsetFromFileRequestFileType] - - testset_slug : typing.Optional[str] - - testset_name : typing.Optional[str] - - testset_description : typing.Optional[str] - - testset_meta : typing.Optional[typing.List[str]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/testsets/upload", - method="POST", - data={ - "file_type": file_type, - "testset_slug": testset_slug, - "testset_name": testset_name, - "testset_description": testset_description, - "testset_meta": testset_meta, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_testset_from_file( - self, - testset_id: str, - *, - file: core.File, - file_type: typing.Optional[UpdateTestsetFromFileRequestFileType] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - file : core.File - See core.File for more documentation - - file_type : typing.Optional[UpdateTestsetFromFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/upload", - method="POST", - data={ - "file_type": file_type, - }, - files={ - "file": file, - }, - request_options=request_options, - omit=OMIT, - force_multipart=True, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_testset_to_file( - self, - testset_id: str, - *, - file_type: typing.Optional[FetchTestsetToFileRequestFileType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestsetResponse]: - """ - Parameters - ---------- - testset_id : str - - file_type : typing.Optional[FetchTestsetToFileRequestFileType] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestsetResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/{jsonable_encoder(testset_id)}/download", - method="POST", - params={ - "file_type": file_type, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestsetResponse, - parse_obj_as( - type_=TestsetResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_testcase( - self, - testcase_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TestcaseResponse]: - """ - Parameters - ---------- - testcase_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[TestcaseResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/testsets/testcases/{jsonable_encoder(testcase_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - TestcaseResponse, - parse_obj_as( - type_=TestcaseResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/testsets/types/__init__.py b/sdk/agenta/client/backend/testsets/types/__init__.py deleted file mode 100644 index 91c092674d..0000000000 --- a/sdk/agenta/client/backend/testsets/types/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .create_testset_from_file_request_file_type import ( - CreateTestsetFromFileRequestFileType, -) -from .fetch_testset_to_file_request_file_type import FetchTestsetToFileRequestFileType -from .update_testset_from_file_request_file_type import ( - UpdateTestsetFromFileRequestFileType, -) - -__all__ = [ - "CreateTestsetFromFileRequestFileType", - "FetchTestsetToFileRequestFileType", - "UpdateTestsetFromFileRequestFileType", -] diff --git a/sdk/agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py b/sdk/agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py deleted file mode 100644 index 2ad7ded39c..0000000000 --- a/sdk/agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CreateTestsetFromFileRequestFileType = typing.Union[ - typing.Literal["CSV", "JSON"], typing.Any -] diff --git a/sdk/agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py b/sdk/agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py deleted file mode 100644 index 80f0bb59f0..0000000000 --- a/sdk/agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -FetchTestsetToFileRequestFileType = typing.Union[ - typing.Literal["CSV", "JSON"], typing.Any -] diff --git a/sdk/agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py b/sdk/agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py deleted file mode 100644 index d68a9f929d..0000000000 --- a/sdk/agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -UpdateTestsetFromFileRequestFileType = typing.Union[ - typing.Literal["CSV", "JSON"], typing.Any -] diff --git a/sdk/agenta/client/backend/tracing/__init__.py b/sdk/agenta/client/backend/tracing/__init__.py deleted file mode 100644 index 2de5185d45..0000000000 --- a/sdk/agenta/client/backend/tracing/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .types import FetchTraceRequestTraceId, RemoveTraceRequestTraceId - -__all__ = ["FetchTraceRequestTraceId", "RemoveTraceRequestTraceId"] diff --git a/sdk/agenta/client/backend/tracing/client.py b/sdk/agenta/client/backend/tracing/client.py deleted file mode 100644 index 17352ed9fd..0000000000 --- a/sdk/agenta/client/backend/tracing/client.py +++ /dev/null @@ -1,782 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.focus import Focus -from ..types.format import Format -from ..types.o_tel_flat_span import OTelFlatSpan -from ..types.o_tel_links_response import OTelLinksResponse -from ..types.o_tel_spans_tree import OTelSpansTree -from ..types.o_tel_tracing_response import OTelTracingResponse -from .raw_client import AsyncRawTracingClient, RawTracingClient -from .types.fetch_trace_request_trace_id import FetchTraceRequestTraceId -from .types.remove_trace_request_trace_id import RemoveTraceRequestTraceId - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class TracingClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawTracingClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawTracingClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawTracingClient - """ - return self._raw_client - - def add_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.add_trace() - """ - _response = self._raw_client.add_trace( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - def edit_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.edit_trace() - """ - _response = self._raw_client.edit_trace( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - def fetch_trace( - self, - trace_id: FetchTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - trace_id : FetchTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.fetch_trace( - trace_id="trace_id", - ) - """ - _response = self._raw_client.fetch_trace( - trace_id, request_options=request_options - ) - return _response.data - - def remove_trace( - self, - trace_id: RemoveTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - trace_id : RemoveTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.remove_trace( - trace_id="trace_id", - ) - """ - _response = self._raw_client.remove_trace( - trace_id, request_options=request_options - ) - return _response.data - - def query_spans( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.query_spans( - filter="filter", - ) - """ - _response = self._raw_client.query_spans( - filter=filter, - focus=focus, - format=format, - oldest=oldest, - newest=newest, - limit=limit, - request_options=request_options, - ) - return _response.data - - def ingest_spans( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.ingest_spans() - """ - _response = self._raw_client.ingest_spans( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - def ingest_spans_rpc( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.ingest_spans_rpc() - """ - _response = self._raw_client.ingest_spans_rpc( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - def query_spans_rpc( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.tracing.query_spans_rpc( - filter="filter", - ) - """ - _response = self._raw_client.query_spans_rpc( - filter=filter, - focus=focus, - format=format, - oldest=oldest, - newest=newest, - limit=limit, - request_options=request_options, - ) - return _response.data - - -class AsyncTracingClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawTracingClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawTracingClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawTracingClient - """ - return self._raw_client - - async def add_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.add_trace() - - - asyncio.run(main()) - """ - _response = await self._raw_client.add_trace( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - async def edit_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.edit_trace() - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_trace( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - async def fetch_trace( - self, - trace_id: FetchTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - trace_id : FetchTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.fetch_trace( - trace_id="trace_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_trace( - trace_id, request_options=request_options - ) - return _response.data - - async def remove_trace( - self, - trace_id: RemoveTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - trace_id : RemoveTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.remove_trace( - trace_id="trace_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.remove_trace( - trace_id, request_options=request_options - ) - return _response.data - - async def query_spans( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.query_spans( - filter="filter", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_spans( - filter=filter, - focus=focus, - format=format, - oldest=oldest, - newest=newest, - limit=limit, - request_options=request_options, - ) - return _response.data - - async def ingest_spans( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.ingest_spans() - - - asyncio.run(main()) - """ - _response = await self._raw_client.ingest_spans( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - async def ingest_spans_rpc( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelLinksResponse: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelLinksResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.ingest_spans_rpc() - - - asyncio.run(main()) - """ - _response = await self._raw_client.ingest_spans_rpc( - spans=spans, traces=traces, request_options=request_options - ) - return _response.data - - async def query_spans_rpc( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> OTelTracingResponse: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - OTelTracingResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.tracing.query_spans_rpc( - filter="filter", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_spans_rpc( - filter=filter, - focus=focus, - format=format, - oldest=oldest, - newest=newest, - limit=limit, - request_options=request_options, - ) - return _response.data diff --git a/sdk/agenta/client/backend/tracing/raw_client.py b/sdk/agenta/client/backend/tracing/raw_client.py deleted file mode 100644 index 175a6c479f..0000000000 --- a/sdk/agenta/client/backend/tracing/raw_client.py +++ /dev/null @@ -1,1223 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.focus import Focus -from ..types.format import Format -from ..types.http_validation_error import HttpValidationError -from ..types.o_tel_flat_span import OTelFlatSpan -from ..types.o_tel_links_response import OTelLinksResponse -from ..types.o_tel_spans_tree import OTelSpansTree -from ..types.o_tel_tracing_response import OTelTracingResponse -from .types.fetch_trace_request_trace_id import FetchTraceRequestTraceId -from .types.remove_trace_request_trace_id import RemoveTraceRequestTraceId - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawTracingClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def add_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelLinksResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/traces/", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelLinksResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/traces/", - method="PUT", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_trace( - self, - trace_id: FetchTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - trace_id : FetchTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelTracingResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/tracing/traces/{jsonable_encoder(trace_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def remove_trace( - self, - trace_id: RemoveTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - trace_id : RemoveTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelLinksResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/tracing/traces/{jsonable_encoder(trace_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_spans( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelTracingResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/spans/", - method="GET", - params={ - "focus": focus, - "format": format, - "oldest": oldest, - "newest": newest, - "limit": limit, - "filter": filter, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def ingest_spans( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelLinksResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/spans/", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def ingest_spans_rpc( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelLinksResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/spans/ingest", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_spans_rpc( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[OTelTracingResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/tracing/spans/query", - method="POST", - params={ - "focus": focus, - "format": format, - "oldest": oldest, - "newest": newest, - "limit": limit, - "filter": filter, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawTracingClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def add_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelLinksResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/traces/", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_trace( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelLinksResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/traces/", - method="PUT", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_trace( - self, - trace_id: FetchTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - trace_id : FetchTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelTracingResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/tracing/traces/{jsonable_encoder(trace_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def remove_trace( - self, - trace_id: RemoveTraceRequestTraceId, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - trace_id : RemoveTraceRequestTraceId - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelLinksResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/tracing/traces/{jsonable_encoder(trace_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_spans( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelTracingResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/spans/", - method="GET", - params={ - "focus": focus, - "format": format, - "oldest": oldest, - "newest": newest, - "limit": limit, - "filter": filter, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def ingest_spans( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelLinksResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/spans/", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def ingest_spans_rpc( - self, - *, - spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT, - traces: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTree]] - ] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelLinksResponse]: - """ - Parameters - ---------- - spans : typing.Optional[typing.Sequence[OTelFlatSpan]] - - traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelLinksResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/spans/ingest", - method="POST", - json={ - "spans": convert_and_respect_annotation_metadata( - object_=spans, - annotation=typing.Sequence[OTelFlatSpan], - direction="write", - ), - "traces": convert_and_respect_annotation_metadata( - object_=traces, - annotation=typing.Dict[str, typing.Optional[OTelSpansTree]], - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelLinksResponse, - parse_obj_as( - type_=OTelLinksResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_spans_rpc( - self, - *, - filter: str, - focus: typing.Optional[Focus] = None, - format: typing.Optional[Format] = None, - oldest: typing.Optional[str] = None, - newest: typing.Optional[str] = None, - limit: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[OTelTracingResponse]: - """ - Parameters - ---------- - filter : str - - focus : typing.Optional[Focus] - - format : typing.Optional[Format] - - oldest : typing.Optional[str] - - newest : typing.Optional[str] - - limit : typing.Optional[int] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[OTelTracingResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/tracing/spans/query", - method="POST", - params={ - "focus": focus, - "format": format, - "oldest": oldest, - "newest": newest, - "limit": limit, - "filter": filter, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - OTelTracingResponse, - parse_obj_as( - type_=OTelTracingResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/tracing/types/__init__.py b/sdk/agenta/client/backend/tracing/types/__init__.py deleted file mode 100644 index c376105667..0000000000 --- a/sdk/agenta/client/backend/tracing/types/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .fetch_trace_request_trace_id import FetchTraceRequestTraceId -from .remove_trace_request_trace_id import RemoveTraceRequestTraceId - -__all__ = ["FetchTraceRequestTraceId", "RemoveTraceRequestTraceId"] diff --git a/sdk/agenta/client/backend/tracing/types/fetch_trace_request_trace_id.py b/sdk/agenta/client/backend/tracing/types/fetch_trace_request_trace_id.py deleted file mode 100644 index f90960fdf9..0000000000 --- a/sdk/agenta/client/backend/tracing/types/fetch_trace_request_trace_id.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -FetchTraceRequestTraceId = typing.Union[str, int] diff --git a/sdk/agenta/client/backend/tracing/types/remove_trace_request_trace_id.py b/sdk/agenta/client/backend/tracing/types/remove_trace_request_trace_id.py deleted file mode 100644 index fe9c825d97..0000000000 --- a/sdk/agenta/client/backend/tracing/types/remove_trace_request_trace_id.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -RemoveTraceRequestTraceId = typing.Union[str, int] diff --git a/sdk/agenta/client/backend/types/__init__.py b/sdk/agenta/client/backend/types/__init__.py index 06ad2a7e86..3c4aea7c62 100644 --- a/sdk/agenta/client/backend/types/__init__.py +++ b/sdk/agenta/client/backend/types/__init__.py @@ -1,17 +1,8 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - -# Import Pydantic schema fix to prevent recursion errors -# try: -# from .__pydantic_init__ import SafeGenerateJsonSchema, disable_schema_generation -# except ImportError: -# pass # Fallback gracefully if the file doesn't exist - - -from .account_request import AccountRequest from .account_response import AccountResponse from .agenta_node_dto import AgentaNodeDto +from .agenta_node_dto_nodes_value import AgentaNodeDtoNodesValue from .agenta_nodes_response import AgentaNodesResponse from .agenta_root_dto import AgentaRootDto from .agenta_roots_response import AgentaRootsResponse @@ -20,25 +11,10 @@ from .aggregated_result import AggregatedResult from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig from .analytics_response import AnalyticsResponse -from .annotation import Annotation -from .annotation_create import AnnotationCreate -from .annotation_edit import AnnotationEdit -from .annotation_kind import AnnotationKind -from .annotation_link import AnnotationLink -from .annotation_link_response import AnnotationLinkResponse -from .annotation_query import AnnotationQuery -from .annotation_query_request import AnnotationQueryRequest -from .annotation_reference import AnnotationReference -from .annotation_references import AnnotationReferences -from .annotation_response import AnnotationResponse -from .annotation_source import AnnotationSource -from .annotations_response import AnnotationsResponse from .app import App from .app_variant_response import AppVariantResponse from .app_variant_revision import AppVariantRevision -from .artifact import Artifact from .base_output import BaseOutput -from .body_fetch_workflow_revision import BodyFetchWorkflowRevision from .body_import_testset import BodyImportTestset from .bucket_dto import BucketDto from .collect_status_response import CollectStatusResponse @@ -53,6 +29,7 @@ from .custom_provider_settings_dto import CustomProviderSettingsDto from .data import Data from .delete_evaluation import DeleteEvaluation +from .docker_env_vars import DockerEnvVars from .environment_output import EnvironmentOutput from .environment_output_extended import EnvironmentOutputExtended from .environment_revision import EnvironmentRevision @@ -66,72 +43,40 @@ from .evaluation_type import EvaluationType from .evaluator import Evaluator from .evaluator_config import EvaluatorConfig -from .evaluator_flags import EvaluatorFlags from .evaluator_mapping_output_interface import EvaluatorMappingOutputInterface from .evaluator_output_interface import EvaluatorOutputInterface -from .evaluator_query import EvaluatorQuery -from .evaluator_query_request import EvaluatorQueryRequest -from .evaluator_request import EvaluatorRequest -from .evaluator_response import EvaluatorResponse -from .evaluators_response import EvaluatorsResponse from .exception_dto import ExceptionDto -from .focus import Focus -from .format import Format -from .full_json_input import FullJsonInput -from .full_json_output import FullJsonOutput from .get_config_response import GetConfigResponse -from .header import Header +from .header_dto import HeaderDto from .http_validation_error import HttpValidationError from .human_evaluation import HumanEvaluation from .human_evaluation_scenario import HumanEvaluationScenario from .human_evaluation_scenario_input import HumanEvaluationScenarioInput from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput +from .image import Image from .invite_request import InviteRequest from .legacy_analytics_response import LegacyAnalyticsResponse from .legacy_data_point import LegacyDataPoint -from .legacy_evaluator import LegacyEvaluator from .legacy_scope_request import LegacyScopeRequest from .legacy_scopes_response import LegacyScopesResponse -from .legacy_subscription_request import LegacySubscriptionRequest from .legacy_user_request import LegacyUserRequest from .legacy_user_response import LegacyUserResponse from .lifecycle_dto import LifecycleDto from .link_dto import LinkDto from .list_api_keys_response import ListApiKeysResponse from .llm_run_rate_limit import LlmRunRateLimit -from .meta_request import MetaRequest from .metrics_dto import MetricsDto from .new_testset import NewTestset from .node_dto import NodeDto from .node_type import NodeType from .o_tel_context_dto import OTelContextDto -from .o_tel_event import OTelEvent from .o_tel_event_dto import OTelEventDto from .o_tel_extra_dto import OTelExtraDto -from .o_tel_flat_span import OTelFlatSpan -from .o_tel_flat_span_input_end_time import OTelFlatSpanInputEndTime -from .o_tel_flat_span_input_start_time import OTelFlatSpanInputStartTime -from .o_tel_flat_span_output_end_time import OTelFlatSpanOutputEndTime -from .o_tel_flat_span_output_start_time import OTelFlatSpanOutputStartTime -from .o_tel_link import OTelLink from .o_tel_link_dto import OTelLinkDto -from .o_tel_links_response import OTelLinksResponse -from .o_tel_span import OTelSpan from .o_tel_span_dto import OTelSpanDto -from .o_tel_span_input_end_time import OTelSpanInputEndTime -from .o_tel_span_input_spans_value import OTelSpanInputSpansValue -from .o_tel_span_input_start_time import OTelSpanInputStartTime from .o_tel_span_kind import OTelSpanKind -from .o_tel_span_output_end_time import OTelSpanOutputEndTime -from .o_tel_span_output_spans_value import OTelSpanOutputSpansValue -from .o_tel_span_output_start_time import OTelSpanOutputStartTime -from .o_tel_spans_tree import OTelSpansTree -from .o_tel_spans_tree_input_spans_value import OTelSpansTreeInputSpansValue -from .o_tel_spans_tree_output_spans_value import OTelSpansTreeOutputSpansValue +from .o_tel_spans_response import OTelSpansResponse from .o_tel_status_code import OTelStatusCode -from .o_tel_tracing_data_response import OTelTracingDataResponse -from .o_tel_tracing_request import OTelTracingRequest -from .o_tel_tracing_response import OTelTracingResponse from .organization import Organization from .organization_details import OrganizationDetails from .organization_membership_request import OrganizationMembershipRequest @@ -139,7 +84,6 @@ from .organization_request import OrganizationRequest from .parent_dto import ParentDto from .permission import Permission -from .plan import Plan from .project_membership_request import ProjectMembershipRequest from .project_request import ProjectRequest from .project_scope import ProjectScope @@ -156,52 +100,40 @@ from .secret_kind import SecretKind from .secret_response_dto import SecretResponseDto from .simple_evaluation_output import SimpleEvaluationOutput +from .span_dto import SpanDto +from .span_dto_nodes_value import SpanDtoNodesValue from .standard_provider_dto import StandardProviderDto from .standard_provider_kind import StandardProviderKind from .standard_provider_settings_dto import StandardProviderSettingsDto from .status_code import StatusCode from .status_dto import StatusDto -from .testset_output_response import TestsetOutputResponse -from .testset_simple_response import TestsetSimpleResponse -from .testcase_response import TestcaseResponse -from .testset import Testset -from .testset_request import TestsetRequest -from .testset_response import TestsetResponse -from .testsets_response import TestsetsResponse +from .template import Template +from .template_image_info import TemplateImageInfo +from .test_set_output_response import TestSetOutputResponse +from .test_set_simple_response import TestSetSimpleResponse from .time_dto import TimeDto -from .timestamp import Timestamp from .tree_dto import TreeDto from .tree_type import TreeType from .update_app_output import UpdateAppOutput +from .uri import Uri from .user_request import UserRequest from .validation_error import ValidationError from .validation_error_loc_item import ValidationErrorLocItem -from .workflow_artifact import WorkflowArtifact -from .workflow_data import WorkflowData -from .workflow_flags import WorkflowFlags -from .workflow_request import WorkflowRequest -from .workflow_response import WorkflowResponse -from .workflow_revision import WorkflowRevision -from .workflow_revision_request import WorkflowRevisionRequest -from .workflow_revision_response import WorkflowRevisionResponse -from .workflow_revisions_response import WorkflowRevisionsResponse -from .workflow_variant import WorkflowVariant -from .workflow_variant_request import WorkflowVariantRequest -from .workflow_variant_response import WorkflowVariantResponse -from .workflow_variants_response import WorkflowVariantsResponse -from .workflows_response import WorkflowsResponse +from .variant_action import VariantAction +from .variant_action_enum import VariantActionEnum from .workspace import Workspace from .workspace_member_response import WorkspaceMemberResponse from .workspace_membership_request import WorkspaceMembershipRequest from .workspace_permission import WorkspacePermission from .workspace_request import WorkspaceRequest from .workspace_response import WorkspaceResponse +from .workspace_role_response import WorkspaceRoleResponse from .workspace_role import WorkspaceRole __all__ = [ - "AccountRequest", "AccountResponse", "AgentaNodeDto", + "AgentaNodeDtoNodesValue", "AgentaNodesResponse", "AgentaRootDto", "AgentaRootsResponse", @@ -210,25 +142,10 @@ "AggregatedResult", "AggregatedResultEvaluatorConfig", "AnalyticsResponse", - "Annotation", - "AnnotationCreate", - "AnnotationEdit", - "AnnotationKind", - "AnnotationLink", - "AnnotationLinkResponse", - "AnnotationQuery", - "AnnotationQueryRequest", - "AnnotationReference", - "AnnotationReferences", - "AnnotationResponse", - "AnnotationSource", - "AnnotationsResponse", "App", "AppVariantResponse", "AppVariantRevision", - "Artifact", "BaseOutput", - "BodyFetchWorkflowRevision", "BodyImportTestset", "BucketDto", "CollectStatusResponse", @@ -243,6 +160,7 @@ "CustomProviderSettingsDto", "Data", "DeleteEvaluation", + "DockerEnvVars", "EnvironmentOutput", "EnvironmentOutputExtended", "EnvironmentRevision", @@ -256,72 +174,40 @@ "EvaluationType", "Evaluator", "EvaluatorConfig", - "EvaluatorFlags", "EvaluatorMappingOutputInterface", "EvaluatorOutputInterface", - "EvaluatorQuery", - "EvaluatorQueryRequest", - "EvaluatorRequest", - "EvaluatorResponse", - "EvaluatorsResponse", "ExceptionDto", - "Focus", - "Format", - "FullJsonInput", - "FullJsonOutput", "GetConfigResponse", - "Header", + "HeaderDto", "HttpValidationError", "HumanEvaluation", "HumanEvaluationScenario", "HumanEvaluationScenarioInput", "HumanEvaluationScenarioOutput", + "Image", "InviteRequest", "LegacyAnalyticsResponse", "LegacyDataPoint", - "LegacyEvaluator", "LegacyScopeRequest", "LegacyScopesResponse", - "LegacySubscriptionRequest", "LegacyUserRequest", "LegacyUserResponse", "LifecycleDto", "LinkDto", "ListApiKeysResponse", "LlmRunRateLimit", - "MetaRequest", "MetricsDto", "NewTestset", "NodeDto", "NodeType", "OTelContextDto", - "OTelEvent", "OTelEventDto", "OTelExtraDto", - "OTelFlatSpan", - "OTelFlatSpanInputEndTime", - "OTelFlatSpanInputStartTime", - "OTelFlatSpanOutputEndTime", - "OTelFlatSpanOutputStartTime", - "OTelLink", "OTelLinkDto", - "OTelLinksResponse", - "OTelSpan", "OTelSpanDto", - "OTelSpanInputEndTime", - "OTelSpanInputSpansValue", - "OTelSpanInputStartTime", "OTelSpanKind", - "OTelSpanOutputEndTime", - "OTelSpanOutputSpansValue", - "OTelSpanOutputStartTime", - "OTelSpansTree", - "OTelSpansTreeInputSpansValue", - "OTelSpansTreeOutputSpansValue", + "OTelSpansResponse", "OTelStatusCode", - "OTelTracingDataResponse", - "OTelTracingRequest", - "OTelTracingResponse", "Organization", "OrganizationDetails", "OrganizationMembershipRequest", @@ -329,7 +215,6 @@ "OrganizationRequest", "ParentDto", "Permission", - "Plan", "ProjectMembershipRequest", "ProjectRequest", "ProjectScope", @@ -346,45 +231,33 @@ "SecretKind", "SecretResponseDto", "SimpleEvaluationOutput", + "SpanDto", + "SpanDtoNodesValue", "StandardProviderDto", "StandardProviderKind", "StandardProviderSettingsDto", "StatusCode", "StatusDto", - "TestsetOutputResponse", - "TestsetSimpleResponse", - "TestcaseResponse", - "Testset", - "TestsetRequest", - "TestsetResponse", - "TestsetsResponse", + "Template", + "TemplateImageInfo", + "TestSetOutputResponse", + "TestSetSimpleResponse", "TimeDto", - "Timestamp", "TreeDto", "TreeType", "UpdateAppOutput", + "Uri", "UserRequest", "ValidationError", "ValidationErrorLocItem", - "WorkflowArtifact", - "WorkflowData", - "WorkflowFlags", - "WorkflowRequest", - "WorkflowResponse", - "WorkflowRevision", - "WorkflowRevisionRequest", - "WorkflowRevisionResponse", - "WorkflowRevisionsResponse", - "WorkflowVariant", - "WorkflowVariantRequest", - "WorkflowVariantResponse", - "WorkflowVariantsResponse", - "WorkflowsResponse", + "VariantAction", + "VariantActionEnum", "Workspace", "WorkspaceMemberResponse", "WorkspaceMembershipRequest", "WorkspacePermission", "WorkspaceRequest", "WorkspaceResponse", + "WorkspaceRoleResponse", "WorkspaceRole", ] diff --git a/sdk/agenta/client/backend/types/account_request.py b/sdk/agenta/client/backend/types/account_request.py deleted file mode 100644 index 1c133345f3..0000000000 --- a/sdk/agenta/client/backend/types/account_request.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .legacy_scope_request import LegacyScopeRequest -from .legacy_subscription_request import LegacySubscriptionRequest -from .legacy_user_request import LegacyUserRequest - - -class AccountRequest(UniversalBaseModel): - user: typing.Optional[LegacyUserRequest] = None - scope: typing.Optional[LegacyScopeRequest] = None - subscription: typing.Optional[LegacySubscriptionRequest] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/account_response.py b/sdk/agenta/client/backend/types/account_response.py index 6cb5ecbcd6..a0e9ac49d0 100644 --- a/sdk/agenta/client/backend/types/account_response.py +++ b/sdk/agenta/client/backend/types/account_response.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .legacy_scopes_response import LegacyScopesResponse from .legacy_user_response import LegacyUserResponse +from .legacy_scopes_response import LegacyScopesResponse +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AccountResponse(UniversalBaseModel): @@ -13,7 +13,9 @@ class AccountResponse(UniversalBaseModel): scopes: typing.Optional[typing.List[LegacyScopesResponse]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/agenta_node_dto.py b/sdk/agenta/client/backend/types/agenta_node_dto.py index 507b46f080..8f8c933eac 100644 --- a/sdk/agenta/client/backend/types/agenta_node_dto.py +++ b/sdk/agenta/client/backend/types/agenta_node_dto.py @@ -1,25 +1,23 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .agenta_node_dto_nodes_value import AgentaNodeDtoNodesValue -from .exception_dto import ExceptionDto from .lifecycle_dto import LifecycleDto -from .link_dto import LinkDto +from .root_dto import RootDto +from .tree_dto import TreeDto from .node_dto import NodeDto -from .o_tel_extra_dto import OTelExtraDto from .parent_dto import ParentDto -from .root_dto import RootDto -from .status_dto import StatusDto from .time_dto import TimeDto -from .tree_dto import TreeDto +from .status_dto import StatusDto +from .exception_dto import ExceptionDto +from .link_dto import LinkDto +from .o_tel_extra_dto import OTelExtraDto +from .agenta_node_dto_nodes_value import AgentaNodeDtoNodesValue +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaNodeDto(UniversalBaseModel): - trace_id: str - span_id: str lifecycle: typing.Optional[LifecycleDto] = None root: RootDto tree: TreeDto @@ -39,7 +37,9 @@ class AgentaNodeDto(UniversalBaseModel): ] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/agenta_node_dto_nodes_value.py b/sdk/agenta/client/backend/types/agenta_node_dto_nodes_value.py index bb2767d526..771c4f8e9f 100644 --- a/sdk/agenta/client/backend/types/agenta_node_dto_nodes_value.py +++ b/sdk/agenta/client/backend/types/agenta_node_dto_nodes_value.py @@ -1,7 +1,6 @@ # This file was auto-generated by Fern from our API Definition. import typing - from .span_dto import SpanDto AgentaNodeDtoNodesValue = typing.Union[SpanDto, typing.List[SpanDto]] diff --git a/sdk/agenta/client/backend/types/agenta_nodes_response.py b/sdk/agenta/client/backend/types/agenta_nodes_response.py index 77494ee114..ba48bcb550 100644 --- a/sdk/agenta/client/backend/types/agenta_nodes_response.py +++ b/sdk/agenta/client/backend/types/agenta_nodes_response.py @@ -1,31 +1,25 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .span_dto import SpanDto import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) from .agenta_node_dto import AgentaNodeDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaNodesResponse(UniversalBaseModel): - nodes: typing.Optional[typing.List[AgentaNodeDto]] = None + nodes: typing.List[AgentaNodeDto] version: str count: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .span_dto import SpanDto # noqa: E402, F401, I001 - -update_forward_refs(AgentaNodesResponse) diff --git a/sdk/agenta/client/backend/types/agenta_root_dto.py b/sdk/agenta/client/backend/types/agenta_root_dto.py index 5490cf802d..8df9532d9c 100644 --- a/sdk/agenta/client/backend/types/agenta_root_dto.py +++ b/sdk/agenta/client/backend/types/agenta_root_dto.py @@ -1,17 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel +from .span_dto import SpanDto +from .root_dto import RootDto import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) from .agenta_tree_dto import AgentaTreeDto -from .root_dto import RootDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaRootDto(UniversalBaseModel): @@ -19,15 +14,12 @@ class AgentaRootDto(UniversalBaseModel): trees: typing.List[AgentaTreeDto] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .span_dto import SpanDto # noqa: E402, F401, I001 - -update_forward_refs(AgentaRootDto) diff --git a/sdk/agenta/client/backend/types/agenta_roots_response.py b/sdk/agenta/client/backend/types/agenta_roots_response.py index 9d6b877368..a168ce5be5 100644 --- a/sdk/agenta/client/backend/types/agenta_roots_response.py +++ b/sdk/agenta/client/backend/types/agenta_roots_response.py @@ -1,33 +1,25 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel +from .span_dto import SpanDto import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) from .agenta_root_dto import AgentaRootDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaRootsResponse(UniversalBaseModel): - roots: typing.Optional[typing.List[AgentaRootDto]] = None + roots: typing.List[AgentaRootDto] version: str count: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .span_dto import SpanDto # noqa: E402, F401, I001 - -update_forward_refs(AgentaRootsResponse) diff --git a/sdk/agenta/client/backend/types/agenta_tree_dto.py b/sdk/agenta/client/backend/types/agenta_tree_dto.py index 6ee850955b..89f6b987e7 100644 --- a/sdk/agenta/client/backend/types/agenta_tree_dto.py +++ b/sdk/agenta/client/backend/types/agenta_tree_dto.py @@ -1,17 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel +from .span_dto import SpanDto +from .tree_dto import TreeDto import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) from .agenta_node_dto import AgentaNodeDto -from .tree_dto import TreeDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaTreeDto(UniversalBaseModel): @@ -19,15 +14,12 @@ class AgentaTreeDto(UniversalBaseModel): nodes: typing.List[AgentaNodeDto] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .span_dto import SpanDto # noqa: E402, F401, I001 - -update_forward_refs(AgentaTreeDto) diff --git a/sdk/agenta/client/backend/types/agenta_trees_response.py b/sdk/agenta/client/backend/types/agenta_trees_response.py index d3acaf17d3..27d8c526e8 100644 --- a/sdk/agenta/client/backend/types/agenta_trees_response.py +++ b/sdk/agenta/client/backend/types/agenta_trees_response.py @@ -1,33 +1,25 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel +from .span_dto import SpanDto import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) from .agenta_tree_dto import AgentaTreeDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AgentaTreesResponse(UniversalBaseModel): - trees: typing.Optional[typing.List[AgentaTreeDto]] = None + trees: typing.List[AgentaTreeDto] version: str count: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .span_dto import SpanDto # noqa: E402, F401, I001 - -update_forward_refs(AgentaTreesResponse) diff --git a/sdk/agenta/client/backend/types/aggregated_result.py b/sdk/agenta/client/backend/types/aggregated_result.py index 5318a7c568..808bddac66 100644 --- a/sdk/agenta/client/backend/types/aggregated_result.py +++ b/sdk/agenta/client/backend/types/aggregated_result.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.pydantic_utilities import UniversalBaseModel from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig from .result import Result +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic class AggregatedResult(UniversalBaseModel): @@ -13,7 +13,9 @@ class AggregatedResult(UniversalBaseModel): result: Result if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/aggregated_result_evaluator_config.py b/sdk/agenta/client/backend/types/aggregated_result_evaluator_config.py index 5bcc8dbb26..4a9069b4e8 100644 --- a/sdk/agenta/client/backend/types/aggregated_result_evaluator_config.py +++ b/sdk/agenta/client/backend/types/aggregated_result_evaluator_config.py @@ -1,7 +1,6 @@ # This file was auto-generated by Fern from our API Definition. import typing - from .evaluator_config import EvaluatorConfig AggregatedResultEvaluatorConfig = typing.Union[ diff --git a/sdk/agenta/client/backend/types/analytics_response.py b/sdk/agenta/client/backend/types/analytics_response.py index f3002caf54..87195da026 100644 --- a/sdk/agenta/client/backend/types/analytics_response.py +++ b/sdk/agenta/client/backend/types/analytics_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .bucket_dto import BucketDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AnalyticsResponse(UniversalBaseModel): @@ -13,7 +13,9 @@ class AnalyticsResponse(UniversalBaseModel): buckets: typing.List[BucketDto] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/annotation.py b/sdk/agenta/client/backend/types/annotation.py deleted file mode 100644 index a3247c4b4e..0000000000 --- a/sdk/agenta/client/backend/types/annotation.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .annotation_kind import AnnotationKind -from .annotation_link import AnnotationLink -from .annotation_references import AnnotationReferences -from .annotation_source import AnnotationSource - - -class Annotation(UniversalBaseModel): - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - span_id: str - trace_id: str - kind: typing.Optional[AnnotationKind] = None - source: typing.Optional[AnnotationSource] = None - data: typing.Dict[str, typing.Optional["FullJsonOutput"]] - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - references: AnnotationReferences - links: typing.Dict[str, AnnotationLink] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(Annotation) diff --git a/sdk/agenta/client/backend/types/annotation_create.py b/sdk/agenta/client/backend/types/annotation_create.py deleted file mode 100644 index deb2cb42e7..0000000000 --- a/sdk/agenta/client/backend/types/annotation_create.py +++ /dev/null @@ -1,39 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .annotation_kind import AnnotationKind -from .annotation_link import AnnotationLink -from .annotation_references import AnnotationReferences -from .annotation_source import AnnotationSource - - -class AnnotationCreate(UniversalBaseModel): - kind: typing.Optional[AnnotationKind] = None - source: typing.Optional[AnnotationSource] = None - data: typing.Dict[str, typing.Optional["FullJsonInput"]] - metadata: typing.Optional[typing.Dict[str, typing.Optional["FullJsonInput"]]] = None - references: AnnotationReferences - links: typing.Dict[str, AnnotationLink] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(AnnotationCreate) diff --git a/sdk/agenta/client/backend/types/annotation_edit.py b/sdk/agenta/client/backend/types/annotation_edit.py deleted file mode 100644 index 2e5a99b974..0000000000 --- a/sdk/agenta/client/backend/types/annotation_edit.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class AnnotationEdit(UniversalBaseModel): - data: typing.Dict[str, typing.Optional["FullJsonInput"]] - meta: typing.Optional[typing.Dict[str, typing.Optional["FullJsonInput"]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(AnnotationEdit) diff --git a/sdk/agenta/client/backend/types/annotation_kind.py b/sdk/agenta/client/backend/types/annotation_kind.py deleted file mode 100644 index ea4c7e7322..0000000000 --- a/sdk/agenta/client/backend/types/annotation_kind.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -AnnotationKind = typing.Union[typing.Literal["custom", "human", "auto"], typing.Any] diff --git a/sdk/agenta/client/backend/types/annotation_link.py b/sdk/agenta/client/backend/types/annotation_link.py deleted file mode 100644 index 8643681c52..0000000000 --- a/sdk/agenta/client/backend/types/annotation_link.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class AnnotationLink(UniversalBaseModel): - span_id: str - trace_id: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_link_response.py b/sdk/agenta/client/backend/types/annotation_link_response.py deleted file mode 100644 index b6bc1cade3..0000000000 --- a/sdk/agenta/client/backend/types/annotation_link_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .annotation_link import AnnotationLink - - -class AnnotationLinkResponse(UniversalBaseModel): - annotation: AnnotationLink - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_query.py b/sdk/agenta/client/backend/types/annotation_query.py deleted file mode 100644 index ac5033a31e..0000000000 --- a/sdk/agenta/client/backend/types/annotation_query.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .annotation_kind import AnnotationKind -from .annotation_link import AnnotationLink -from .annotation_references import AnnotationReferences -from .annotation_source import AnnotationSource - - -class AnnotationQuery(UniversalBaseModel): - trace_id: typing.Optional[str] = None - span_id: typing.Optional[str] = None - kind: typing.Optional[AnnotationKind] = None - source: typing.Optional[AnnotationSource] = None - metadata: typing.Optional[typing.Dict[str, typing.Optional["FullJsonInput"]]] = None - references: typing.Optional[AnnotationReferences] = None - links: typing.Optional[typing.Dict[str, typing.Optional[AnnotationLink]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(AnnotationQuery) diff --git a/sdk/agenta/client/backend/types/annotation_query_request.py b/sdk/agenta/client/backend/types/annotation_query_request.py deleted file mode 100644 index 85fff1453e..0000000000 --- a/sdk/agenta/client/backend/types/annotation_query_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .annotation_query import AnnotationQuery - - -class AnnotationQueryRequest(UniversalBaseModel): - annotation: typing.Optional[AnnotationQuery] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_reference.py b/sdk/agenta/client/backend/types/annotation_reference.py deleted file mode 100644 index e3a8899ef7..0000000000 --- a/sdk/agenta/client/backend/types/annotation_reference.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class AnnotationReference(UniversalBaseModel): - id: typing.Optional[str] = None - slug: typing.Optional[str] = None - version: typing.Optional[str] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_references.py b/sdk/agenta/client/backend/types/annotation_references.py deleted file mode 100644 index f580cc93eb..0000000000 --- a/sdk/agenta/client/backend/types/annotation_references.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .annotation_reference import AnnotationReference - - -class AnnotationReferences(UniversalBaseModel): - evaluator: AnnotationReference - testset: typing.Optional[AnnotationReference] = None - testcase: typing.Optional[AnnotationReference] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_response.py b/sdk/agenta/client/backend/types/annotation_response.py deleted file mode 100644 index e42904a404..0000000000 --- a/sdk/agenta/client/backend/types/annotation_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .annotation import Annotation - - -class AnnotationResponse(UniversalBaseModel): - annotation: typing.Optional[Annotation] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/annotation_source.py b/sdk/agenta/client/backend/types/annotation_source.py deleted file mode 100644 index ad722bbd92..0000000000 --- a/sdk/agenta/client/backend/types/annotation_source.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -AnnotationSource = typing.Union[typing.Literal["web", "sdk", "api"], typing.Any] diff --git a/sdk/agenta/client/backend/types/annotations_response.py b/sdk/agenta/client/backend/types/annotations_response.py deleted file mode 100644 index 4ca6ac4504..0000000000 --- a/sdk/agenta/client/backend/types/annotations_response.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .annotation import Annotation - - -class AnnotationsResponse(UniversalBaseModel): - count: int - oldest: typing.Optional[dt.datetime] = None - limit: typing.Optional[int] = None - annotations: typing.Optional[typing.List[Annotation]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/app.py b/sdk/agenta/client/backend/types/app.py index 1fdbeee2d9..c98d4e9faf 100644 --- a/sdk/agenta/client/backend/types/app.py +++ b/sdk/agenta/client/backend/types/app.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class App(UniversalBaseModel): @@ -13,7 +13,9 @@ class App(UniversalBaseModel): updated_at: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/app_variant_response.py b/sdk/agenta/client/backend/types/app_variant_response.py index d6fe10e48b..d173208b14 100644 --- a/sdk/agenta/client/backend/types/app_variant_response.py +++ b/sdk/agenta/client/backend/types/app_variant_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AppVariantResponse(UniversalBaseModel): @@ -12,6 +12,7 @@ class AppVariantResponse(UniversalBaseModel): variant_id: str variant_name: str project_id: str + parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None base_name: str base_id: str config_name: str @@ -24,7 +25,9 @@ class AppVariantResponse(UniversalBaseModel): workspace_id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/app_variant_revision.py b/sdk/agenta/client/backend/types/app_variant_revision.py index 709d9f8f2c..7e7d80e93e 100644 --- a/sdk/agenta/client/backend/types/app_variant_revision.py +++ b/sdk/agenta/client/backend/types/app_variant_revision.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .config_db import ConfigDb +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class AppVariantRevision(UniversalBaseModel): @@ -13,10 +13,11 @@ class AppVariantRevision(UniversalBaseModel): modified_by: str config: ConfigDb created_at: str - commit_message: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/artifact.py b/sdk/agenta/client/backend/types/artifact.py deleted file mode 100644 index d6fa55c584..0000000000 --- a/sdk/agenta/client/backend/types/artifact.py +++ /dev/null @@ -1,44 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class Artifact(UniversalBaseModel): - name: typing.Optional[str] = None - description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - flags: typing.Optional[typing.Dict[str, typing.Optional[bool]]] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(Artifact) diff --git a/sdk/agenta/client/backend/types/base_output.py b/sdk/agenta/client/backend/types/base_output.py index cc04f56e96..ba70c79376 100644 --- a/sdk/agenta/client/backend/types/base_output.py +++ b/sdk/agenta/client/backend/types/base_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BaseOutput(UniversalBaseModel): @@ -11,7 +11,9 @@ class BaseOutput(UniversalBaseModel): base_name: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/body_fetch_workflow_revision.py b/sdk/agenta/client/backend/types/body_fetch_workflow_revision.py deleted file mode 100644 index ef14df0220..0000000000 --- a/sdk/agenta/client/backend/types/body_fetch_workflow_revision.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference - - -class BodyFetchWorkflowRevision(UniversalBaseModel): - variant_ref: typing.Optional[Reference] = None - revision_ref: typing.Optional[Reference] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/body_import_testset.py b/sdk/agenta/client/backend/types/body_import_testset.py index 11f4de5d00..9243142a3e 100644 --- a/sdk/agenta/client/backend/types/body_import_testset.py +++ b/sdk/agenta/client/backend/types/body_import_testset.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BodyImportTestset(UniversalBaseModel): @@ -11,7 +11,9 @@ class BodyImportTestset(UniversalBaseModel): testset_name: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/bucket_dto.py b/sdk/agenta/client/backend/types/bucket_dto.py index 663d00d6a4..fe02e3e5bd 100644 --- a/sdk/agenta/client/backend/types/bucket_dto.py +++ b/sdk/agenta/client/backend/types/bucket_dto.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import datetime as dt +from .metrics_dto import MetricsDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .metrics_dto import MetricsDto class BucketDto(UniversalBaseModel): @@ -15,7 +15,9 @@ class BucketDto(UniversalBaseModel): error: MetricsDto if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/collect_status_response.py b/sdk/agenta/client/backend/types/collect_status_response.py index 10494451ee..d52eed32ce 100644 --- a/sdk/agenta/client/backend/types/collect_status_response.py +++ b/sdk/agenta/client/backend/types/collect_status_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CollectStatusResponse(UniversalBaseModel): @@ -11,7 +11,9 @@ class CollectStatusResponse(UniversalBaseModel): status: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/config_db.py b/sdk/agenta/client/backend/types/config_db.py index ddf00f6ac2..c11ef70b91 100644 --- a/sdk/agenta/client/backend/types/config_db.py +++ b/sdk/agenta/client/backend/types/config_db.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ConfigDb(UniversalBaseModel): @@ -11,7 +11,9 @@ class ConfigDb(UniversalBaseModel): parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/config_dto.py b/sdk/agenta/client/backend/types/config_dto.py index 5a9a9e0233..6d012c8148 100644 --- a/sdk/agenta/client/backend/types/config_dto.py +++ b/sdk/agenta/client/backend/types/config_dto.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .lifecycle_dto import LifecycleDto from .reference_dto import ReferenceDto +from .lifecycle_dto import LifecycleDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class ConfigDto(UniversalBaseModel): @@ -21,7 +21,9 @@ class ConfigDto(UniversalBaseModel): environment_lifecycle: typing.Optional[LifecycleDto] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/config_response_model.py b/sdk/agenta/client/backend/types/config_response_model.py index e8946ddfe6..45b6ffb420 100644 --- a/sdk/agenta/client/backend/types/config_response_model.py +++ b/sdk/agenta/client/backend/types/config_response_model.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .lifecycle_dto import LifecycleDto from .reference_dto import ReferenceDto +from .lifecycle_dto import LifecycleDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class ConfigResponseModel(UniversalBaseModel): @@ -21,7 +21,9 @@ class ConfigResponseModel(UniversalBaseModel): environment_lifecycle: typing.Optional[LifecycleDto] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/correct_answer.py b/sdk/agenta/client/backend/types/correct_answer.py index 774b58a351..f0d8340c70 100644 --- a/sdk/agenta/client/backend/types/correct_answer.py +++ b/sdk/agenta/client/backend/types/correct_answer.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CorrectAnswer(UniversalBaseModel): @@ -11,7 +11,9 @@ class CorrectAnswer(UniversalBaseModel): value: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/create_app_output.py b/sdk/agenta/client/backend/types/create_app_output.py index dc7ccf44cf..0cfa349505 100644 --- a/sdk/agenta/client/backend/types/create_app_output.py +++ b/sdk/agenta/client/backend/types/create_app_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CreateAppOutput(UniversalBaseModel): @@ -11,7 +11,9 @@ class CreateAppOutput(UniversalBaseModel): app_name: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/custom_model_settings_dto.py b/sdk/agenta/client/backend/types/custom_model_settings_dto.py index 11542da489..824a2ceb07 100644 --- a/sdk/agenta/client/backend/types/custom_model_settings_dto.py +++ b/sdk/agenta/client/backend/types/custom_model_settings_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CustomModelSettingsDto(UniversalBaseModel): @@ -11,7 +11,9 @@ class CustomModelSettingsDto(UniversalBaseModel): extras: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/custom_provider_dto.py b/sdk/agenta/client/backend/types/custom_provider_dto.py index 9fe91614d3..31fe8fa4ff 100644 --- a/sdk/agenta/client/backend/types/custom_provider_dto.py +++ b/sdk/agenta/client/backend/types/custom_provider_dto.py @@ -1,23 +1,26 @@ # This file was auto-generated by Fern from our API Definition. -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .custom_model_settings_dto import CustomModelSettingsDto +from ..core.pydantic_utilities import UniversalBaseModel from .custom_provider_kind import CustomProviderKind from .custom_provider_settings_dto import CustomProviderSettingsDto +import typing +from .custom_model_settings_dto import CustomModelSettingsDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class CustomProviderDto(UniversalBaseModel): kind: CustomProviderKind provider: CustomProviderSettingsDto models: typing.List[CustomModelSettingsDto] + provider_slug: typing.Optional[str] = None model_keys: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/custom_provider_kind.py b/sdk/agenta/client/backend/types/custom_provider_kind.py index 8c7cc2772e..fbaba3260a 100644 --- a/sdk/agenta/client/backend/types/custom_provider_kind.py +++ b/sdk/agenta/client/backend/types/custom_provider_kind.py @@ -4,11 +4,6 @@ CustomProviderKind = typing.Union[ typing.Literal[ - "custom", - "azure", - "bedrock", - "sagemaker", - "vertex_ai", "openai", "cohere", "anyscale", @@ -21,6 +16,11 @@ "togetherai", "openrouter", "gemini", + "custom", + "azure", + "bedrock", + "sagemaker", + "vertex", ], typing.Any, ] diff --git a/sdk/agenta/client/backend/types/custom_provider_settings_dto.py b/sdk/agenta/client/backend/types/custom_provider_settings_dto.py index 6742ce5647..bfe17f968a 100644 --- a/sdk/agenta/client/backend/types/custom_provider_settings_dto.py +++ b/sdk/agenta/client/backend/types/custom_provider_settings_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CustomProviderSettingsDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class CustomProviderSettingsDto(UniversalBaseModel): extras: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/data.py b/sdk/agenta/client/backend/types/data.py index 3858cd8cc5..9ba26a9293 100644 --- a/sdk/agenta/client/backend/types/data.py +++ b/sdk/agenta/client/backend/types/data.py @@ -1,8 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from .custom_provider_dto import CustomProviderDto from .standard_provider_dto import StandardProviderDto +from .custom_provider_dto import CustomProviderDto Data = typing.Union[StandardProviderDto, CustomProviderDto] diff --git a/sdk/agenta/client/backend/types/delete_evaluation.py b/sdk/agenta/client/backend/types/delete_evaluation.py index ee5a46656d..627b6dea3c 100644 --- a/sdk/agenta/client/backend/types/delete_evaluation.py +++ b/sdk/agenta/client/backend/types/delete_evaluation.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class DeleteEvaluation(UniversalBaseModel): evaluations_ids: typing.List[str] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/docker_env_vars.py b/sdk/agenta/client/backend/types/docker_env_vars.py new file mode 100644 index 0000000000..71da4ea95b --- /dev/null +++ b/sdk/agenta/client/backend/types/docker_env_vars.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class DockerEnvVars(UniversalBaseModel): + env_vars: typing.Dict[str, str] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/environment_output.py b/sdk/agenta/client/backend/types/environment_output.py index cb846cdd7d..57d1216bfd 100644 --- a/sdk/agenta/client/backend/types/environment_output.py +++ b/sdk/agenta/client/backend/types/environment_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EnvironmentOutput(UniversalBaseModel): @@ -18,7 +18,9 @@ class EnvironmentOutput(UniversalBaseModel): workspace_id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/environment_output_extended.py b/sdk/agenta/client/backend/types/environment_output_extended.py index 5058b3e323..1b0ef8b470 100644 --- a/sdk/agenta/client/backend/types/environment_output_extended.py +++ b/sdk/agenta/client/backend/types/environment_output_extended.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .environment_revision import EnvironmentRevision +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class EnvironmentOutputExtended(UniversalBaseModel): @@ -20,7 +20,9 @@ class EnvironmentOutputExtended(UniversalBaseModel): workspace_id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/environment_revision.py b/sdk/agenta/client/backend/types/environment_revision.py index 885f714679..a1e2d29231 100644 --- a/sdk/agenta/client/backend/types/environment_revision.py +++ b/sdk/agenta/client/backend/types/environment_revision.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EnvironmentRevision(UniversalBaseModel): @@ -12,12 +12,12 @@ class EnvironmentRevision(UniversalBaseModel): modified_by: str deployed_app_variant_revision: typing.Optional[str] = None deployment: typing.Optional[str] = None - commit_message: typing.Optional[str] = None created_at: str - deployed_variant_name: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/error.py b/sdk/agenta/client/backend/types/error.py index faebb12bed..4b47a34d06 100644 --- a/sdk/agenta/client/backend/types/error.py +++ b/sdk/agenta/client/backend/types/error.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class Error(UniversalBaseModel): @@ -11,7 +11,9 @@ class Error(UniversalBaseModel): stacktrace: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluation.py b/sdk/agenta/client/backend/types/evaluation.py index b811b63a7d..75c947ee11 100644 --- a/sdk/agenta/client/backend/types/evaluation.py +++ b/sdk/agenta/client/backend/types/evaluation.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -import datetime as dt +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .aggregated_result import AggregatedResult from .result import Result +from .aggregated_result import AggregatedResult +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class Evaluation(UniversalBaseModel): @@ -28,7 +28,9 @@ class Evaluation(UniversalBaseModel): updated_at: dt.datetime if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluation_scenario.py b/sdk/agenta/client/backend/types/evaluation_scenario.py index a4386cba17..1a856e7a24 100644 --- a/sdk/agenta/client/backend/types/evaluation_scenario.py +++ b/sdk/agenta/client/backend/types/evaluation_scenario.py @@ -1,13 +1,13 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .correct_answer import CorrectAnswer from .evaluation_scenario_input import EvaluationScenarioInput from .evaluation_scenario_output import EvaluationScenarioOutput +from .correct_answer import CorrectAnswer from .evaluation_scenario_result import EvaluationScenarioResult +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class EvaluationScenario(UniversalBaseModel): @@ -21,7 +21,9 @@ class EvaluationScenario(UniversalBaseModel): results: typing.List[EvaluationScenarioResult] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluation_scenario_input.py b/sdk/agenta/client/backend/types/evaluation_scenario_input.py index 6839f0009e..bbc89f33c0 100644 --- a/sdk/agenta/client/backend/types/evaluation_scenario_input.py +++ b/sdk/agenta/client/backend/types/evaluation_scenario_input.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EvaluationScenarioInput(UniversalBaseModel): @@ -12,7 +12,9 @@ class EvaluationScenarioInput(UniversalBaseModel): value: typing.Optional[typing.Any] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluation_scenario_output.py b/sdk/agenta/client/backend/types/evaluation_scenario_output.py index c8dc74923a..4c1f489f59 100644 --- a/sdk/agenta/client/backend/types/evaluation_scenario_output.py +++ b/sdk/agenta/client/backend/types/evaluation_scenario_output.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .result import Result import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .result import Result class EvaluationScenarioOutput(UniversalBaseModel): @@ -13,7 +13,9 @@ class EvaluationScenarioOutput(UniversalBaseModel): latency: typing.Optional[float] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluation_scenario_result.py b/sdk/agenta/client/backend/types/evaluation_scenario_result.py index ec1a1b1016..8bb8f3e9ea 100644 --- a/sdk/agenta/client/backend/types/evaluation_scenario_result.py +++ b/sdk/agenta/client/backend/types/evaluation_scenario_result.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .result import Result +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .result import Result class EvaluationScenarioResult(UniversalBaseModel): @@ -12,7 +12,9 @@ class EvaluationScenarioResult(UniversalBaseModel): result: Result if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluator.py b/sdk/agenta/client/backend/types/evaluator.py index 107548ff21..bafa1ba61d 100644 --- a/sdk/agenta/client/backend/types/evaluator.py +++ b/sdk/agenta/client/backend/types/evaluator.py @@ -1,47 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - -import datetime as dt +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .workflow_data import WorkflowData -from .workflow_flags import WorkflowFlags class Evaluator(UniversalBaseModel): - name: typing.Optional[str] = None + name: str + key: str + direct_use: bool + settings_template: typing.Dict[str, typing.Optional[typing.Any]] description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - flags: typing.Optional[WorkflowFlags] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - data: typing.Optional[WorkflowData] = None + oss: typing.Optional[bool] = None + requires_llm_api_keys: typing.Optional[bool] = None + tags: typing.List[str] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(Evaluator) diff --git a/sdk/agenta/client/backend/types/evaluator_config.py b/sdk/agenta/client/backend/types/evaluator_config.py index 7134db5e79..59fe19fc40 100644 --- a/sdk/agenta/client/backend/types/evaluator_config.py +++ b/sdk/agenta/client/backend/types/evaluator_config.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EvaluatorConfig(UniversalBaseModel): @@ -18,7 +18,9 @@ class EvaluatorConfig(UniversalBaseModel): updated_at: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluator_flags.py b/sdk/agenta/client/backend/types/evaluator_flags.py deleted file mode 100644 index 14aadde2b5..0000000000 --- a/sdk/agenta/client/backend/types/evaluator_flags.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class EvaluatorFlags(UniversalBaseModel): - is_custom: typing.Optional[bool] = None - is_evaluator: typing.Optional[bool] = None - is_human: typing.Optional[bool] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/evaluator_mapping_output_interface.py b/sdk/agenta/client/backend/types/evaluator_mapping_output_interface.py index a3aeeb0757..91cf2f87d4 100644 --- a/sdk/agenta/client/backend/types/evaluator_mapping_output_interface.py +++ b/sdk/agenta/client/backend/types/evaluator_mapping_output_interface.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EvaluatorMappingOutputInterface(UniversalBaseModel): outputs: typing.Dict[str, typing.Optional[typing.Any]] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluator_output_interface.py b/sdk/agenta/client/backend/types/evaluator_output_interface.py index 1db8220dfb..acd295c331 100644 --- a/sdk/agenta/client/backend/types/evaluator_output_interface.py +++ b/sdk/agenta/client/backend/types/evaluator_output_interface.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class EvaluatorOutputInterface(UniversalBaseModel): outputs: typing.Dict[str, typing.Optional[typing.Any]] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/evaluator_query.py b/sdk/agenta/client/backend/types/evaluator_query.py deleted file mode 100644 index 7ed73abd28..0000000000 --- a/sdk/agenta/client/backend/types/evaluator_query.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .evaluator_flags import EvaluatorFlags - - -class EvaluatorQuery(UniversalBaseModel): - flags: typing.Optional[EvaluatorFlags] = None - meta: typing.Optional[typing.Dict[str, typing.Optional["FullJsonInput"]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(EvaluatorQuery) diff --git a/sdk/agenta/client/backend/types/evaluator_query_request.py b/sdk/agenta/client/backend/types/evaluator_query_request.py deleted file mode 100644 index 0d2d0bbe16..0000000000 --- a/sdk/agenta/client/backend/types/evaluator_query_request.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .workflow_flags import WorkflowFlags - - -class EvaluatorQueryRequest(UniversalBaseModel): - flags: typing.Optional[WorkflowFlags] = None - metadata: typing.Dict[str, typing.Optional["FullJsonInput"]] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(EvaluatorQueryRequest) diff --git a/sdk/agenta/client/backend/types/evaluator_request.py b/sdk/agenta/client/backend/types/evaluator_request.py deleted file mode 100644 index b98fee8c76..0000000000 --- a/sdk/agenta/client/backend/types/evaluator_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .evaluator import Evaluator - - -class EvaluatorRequest(UniversalBaseModel): - evaluator: Evaluator - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/evaluator_response.py b/sdk/agenta/client/backend/types/evaluator_response.py deleted file mode 100644 index 6c51063e19..0000000000 --- a/sdk/agenta/client/backend/types/evaluator_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .evaluator import Evaluator - - -class EvaluatorResponse(UniversalBaseModel): - count: int - evaluator: typing.Optional[Evaluator] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/evaluators_response.py b/sdk/agenta/client/backend/types/evaluators_response.py deleted file mode 100644 index 6767051b1f..0000000000 --- a/sdk/agenta/client/backend/types/evaluators_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .evaluator import Evaluator - - -class EvaluatorsResponse(UniversalBaseModel): - count: int - evaluator: typing.Optional[typing.List[Evaluator]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/exception_dto.py b/sdk/agenta/client/backend/types/exception_dto.py index da5e15f981..a3e780d345 100644 --- a/sdk/agenta/client/backend/types/exception_dto.py +++ b/sdk/agenta/client/backend/types/exception_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import datetime as dt import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ExceptionDto(UniversalBaseModel): @@ -15,7 +15,9 @@ class ExceptionDto(UniversalBaseModel): attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/extended_o_tel_tracing_response.py b/sdk/agenta/client/backend/types/extended_o_tel_tracing_response.py deleted file mode 100644 index b71c3072be..0000000000 --- a/sdk/agenta/client/backend/types/extended_o_tel_tracing_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_span_dto import OTelSpanDto - - -class ExtendedOTelTracingResponse(UniversalBaseModel): - version: str - count: typing.Optional[int] = None - spans: typing.List[OTelSpanDto] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/focus.py b/sdk/agenta/client/backend/types/focus.py deleted file mode 100644 index f4f01b0a89..0000000000 --- a/sdk/agenta/client/backend/types/focus.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -Focus = typing.Union[typing.Literal["trace", "span"], typing.Any] diff --git a/sdk/agenta/client/backend/types/format.py b/sdk/agenta/client/backend/types/format.py deleted file mode 100644 index 242cacf742..0000000000 --- a/sdk/agenta/client/backend/types/format.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -Format = typing.Union[typing.Literal["agenta", "opentelemetry"], typing.Any] diff --git a/sdk/agenta/client/backend/types/full_json_input.py b/sdk/agenta/client/backend/types/full_json_input.py deleted file mode 100644 index f85d786a91..0000000000 --- a/sdk/agenta/client/backend/types/full_json_input.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -# Break recursion by using Any instead of recursive references -FullJsonInput = typing.Union[ - str, - int, - float, - bool, - typing.Dict[str, typing.Any], # Use Any instead of recursive FullJsonInput - typing.List[typing.Any], # Use Any instead of recursive FullJsonInput - None, -] - - -# Helper function for safe conversion -def sanitize_json_input(value: typing.Any) -> typing.Any: - """Convert potentially recursive structures to safe non-recursive ones""" - if isinstance(value, dict): - return {k: sanitize_json_input(v) for k, v in value.items()} - elif isinstance(value, list): - return [sanitize_json_input(item) for item in value] - elif hasattr(value, "model_dump"): - # It's a Pydantic V2 model - return sanitize_json_input(value.model_dump()) - elif hasattr(value, "dict"): - # It's a Pydantic V1 model - return sanitize_json_input(value.dict()) - else: - # Primitive value - return value diff --git a/sdk/agenta/client/backend/types/full_json_output.py b/sdk/agenta/client/backend/types/full_json_output.py deleted file mode 100644 index bb787d580b..0000000000 --- a/sdk/agenta/client/backend/types/full_json_output.py +++ /dev/null @@ -1,29 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. -# Heavily modified to prevent recursion errors completely - -from __future__ import annotations - -import typing -from typing import Any, Dict, List, Optional, Union - -# IMPORTANT: Completely non-recursive version of JSON type -# Using Any to prevent any possibility of recursion -FullJsonOutput = Union[str, int, float, bool, Dict[str, Any], List[Any], None] - - -# No recursive types at all -def sanitize_json(value: Any) -> Any: - """Convert potentially recursive structures to safe non-recursive ones""" - if isinstance(value, dict): - return {k: sanitize_json(v) for k, v in value.items()} - elif isinstance(value, list): - return [sanitize_json(item) for item in value] - elif hasattr(value, "model_dump"): - # It's a Pydantic V2 model - return sanitize_json(value.model_dump()) - elif hasattr(value, "dict"): - # It's a Pydantic V1 model - return sanitize_json(value.dict()) - else: - # Primitive value - return value diff --git a/sdk/agenta/client/backend/types/get_config_response.py b/sdk/agenta/client/backend/types/get_config_response.py index 332e10b131..6f65d16d13 100644 --- a/sdk/agenta/client/backend/types/get_config_response.py +++ b/sdk/agenta/client/backend/types/get_config_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class GetConfigResponse(UniversalBaseModel): @@ -12,7 +12,9 @@ class GetConfigResponse(UniversalBaseModel): parameters: typing.Dict[str, typing.Optional[typing.Any]] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/header.py b/sdk/agenta/client/backend/types/header.py deleted file mode 100644 index f274f59b7b..0000000000 --- a/sdk/agenta/client/backend/types/header.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class Header(UniversalBaseModel): - name: typing.Optional[str] = None - description: typing.Optional[str] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/header_dto.py b/sdk/agenta/client/backend/types/header_dto.py new file mode 100644 index 0000000000..31f6050a21 --- /dev/null +++ b/sdk/agenta/client/backend/types/header_dto.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class HeaderDto(UniversalBaseModel): + name: typing.Optional[str] = None + description: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/http_validation_error.py b/sdk/agenta/client/backend/types/http_validation_error.py index 70a0f5f172..988ebed269 100644 --- a/sdk/agenta/client/backend/types/http_validation_error.py +++ b/sdk/agenta/client/backend/types/http_validation_error.py @@ -1,17 +1,19 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .validation_error import ValidationError +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class HttpValidationError(UniversalBaseModel): detail: typing.Optional[typing.List[ValidationError]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/human_evaluation.py b/sdk/agenta/client/backend/types/human_evaluation.py index 562b47ac09..9d9ba8b490 100644 --- a/sdk/agenta/client/backend/types/human_evaluation.py +++ b/sdk/agenta/client/backend/types/human_evaluation.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HumanEvaluation(UniversalBaseModel): @@ -22,7 +22,9 @@ class HumanEvaluation(UniversalBaseModel): updated_at: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/human_evaluation_scenario.py b/sdk/agenta/client/backend/types/human_evaluation_scenario.py index dcdc3d4fdf..1321dde09b 100644 --- a/sdk/agenta/client/backend/types/human_evaluation_scenario.py +++ b/sdk/agenta/client/backend/types/human_evaluation_scenario.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .human_evaluation_scenario_input import HumanEvaluationScenarioInput from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput from .score import Score +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class HumanEvaluationScenario(UniversalBaseModel): @@ -21,7 +21,9 @@ class HumanEvaluationScenario(UniversalBaseModel): note: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/human_evaluation_scenario_input.py b/sdk/agenta/client/backend/types/human_evaluation_scenario_input.py index f6245cbbc8..e2fa9b4082 100644 --- a/sdk/agenta/client/backend/types/human_evaluation_scenario_input.py +++ b/sdk/agenta/client/backend/types/human_evaluation_scenario_input.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HumanEvaluationScenarioInput(UniversalBaseModel): @@ -11,7 +11,9 @@ class HumanEvaluationScenarioInput(UniversalBaseModel): input_value: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/human_evaluation_scenario_output.py b/sdk/agenta/client/backend/types/human_evaluation_scenario_output.py index df597596e9..affac190e1 100644 --- a/sdk/agenta/client/backend/types/human_evaluation_scenario_output.py +++ b/sdk/agenta/client/backend/types/human_evaluation_scenario_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HumanEvaluationScenarioOutput(UniversalBaseModel): @@ -11,7 +11,9 @@ class HumanEvaluationScenarioOutput(UniversalBaseModel): variant_output: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/image.py b/sdk/agenta/client/backend/types/image.py new file mode 100644 index 0000000000..f8c17d044e --- /dev/null +++ b/sdk/agenta/client/backend/types/image.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class Image(UniversalBaseModel): + type: typing.Optional[str] = None + docker_id: str + tags: str + organization_id: typing.Optional[str] = None + workspace_id: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/invite_request.py b/sdk/agenta/client/backend/types/invite_request.py index e5386bd40f..9c16852671 100644 --- a/sdk/agenta/client/backend/types/invite_request.py +++ b/sdk/agenta/client/backend/types/invite_request.py @@ -1,17 +1,19 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class InviteRequest(UniversalBaseModel): email: str - roles: typing.Optional[typing.List[str]] = None + roles: typing.List[str] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_analytics_response.py b/sdk/agenta/client/backend/types/legacy_analytics_response.py index c3125eb2b3..8201c64567 100644 --- a/sdk/agenta/client/backend/types/legacy_analytics_response.py +++ b/sdk/agenta/client/backend/types/legacy_analytics_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .legacy_data_point import LegacyDataPoint +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class LegacyAnalyticsResponse(UniversalBaseModel): @@ -18,7 +18,9 @@ class LegacyAnalyticsResponse(UniversalBaseModel): data: typing.List[LegacyDataPoint] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_data_point.py b/sdk/agenta/client/backend/types/legacy_data_point.py index 99fa9a1ba5..26c987726a 100644 --- a/sdk/agenta/client/backend/types/legacy_data_point.py +++ b/sdk/agenta/client/backend/types/legacy_data_point.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LegacyDataPoint(UniversalBaseModel): @@ -16,7 +16,9 @@ class LegacyDataPoint(UniversalBaseModel): total_tokens: int if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_evaluator.py b/sdk/agenta/client/backend/types/legacy_evaluator.py deleted file mode 100644 index 2cfef45886..0000000000 --- a/sdk/agenta/client/backend/types/legacy_evaluator.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class LegacyEvaluator(UniversalBaseModel): - name: str - key: str - direct_use: bool - settings_template: typing.Dict[str, typing.Optional[typing.Any]] - description: typing.Optional[str] = None - oss: typing.Optional[bool] = None - requires_llm_api_keys: typing.Optional[bool] = None - tags: typing.List[str] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/legacy_scope_request.py b/sdk/agenta/client/backend/types/legacy_scope_request.py index b4eb0af563..1f01a1f151 100644 --- a/sdk/agenta/client/backend/types/legacy_scope_request.py +++ b/sdk/agenta/client/backend/types/legacy_scope_request.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LegacyScopeRequest(UniversalBaseModel): - name: typing.Optional[str] = None + name: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_scopes_response.py b/sdk/agenta/client/backend/types/legacy_scopes_response.py index 8e26d5830d..cd393d7e1a 100644 --- a/sdk/agenta/client/backend/types/legacy_scopes_response.py +++ b/sdk/agenta/client/backend/types/legacy_scopes_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LegacyScopesResponse(UniversalBaseModel): @@ -18,7 +18,9 @@ class LegacyScopesResponse(UniversalBaseModel): credentials: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_subscription_request.py b/sdk/agenta/client/backend/types/legacy_subscription_request.py deleted file mode 100644 index 84f3d4db8b..0000000000 --- a/sdk/agenta/client/backend/types/legacy_subscription_request.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class LegacySubscriptionRequest(UniversalBaseModel): - plan: typing.Optional[str] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/legacy_user_request.py b/sdk/agenta/client/backend/types/legacy_user_request.py index f3c1631bc0..67f17ca7dc 100644 --- a/sdk/agenta/client/backend/types/legacy_user_request.py +++ b/sdk/agenta/client/backend/types/legacy_user_request.py @@ -1,17 +1,19 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LegacyUserRequest(UniversalBaseModel): - name: typing.Optional[str] = None - email: typing.Optional[str] = None + name: str + email: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/legacy_user_response.py b/sdk/agenta/client/backend/types/legacy_user_response.py index 76d5b11542..dcad931c20 100644 --- a/sdk/agenta/client/backend/types/legacy_user_response.py +++ b/sdk/agenta/client/backend/types/legacy_user_response.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LegacyUserResponse(UniversalBaseModel): id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/lifecycle_dto.py b/sdk/agenta/client/backend/types/lifecycle_dto.py index d9a958d835..098f83505e 100644 --- a/sdk/agenta/client/backend/types/lifecycle_dto.py +++ b/sdk/agenta/client/backend/types/lifecycle_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LifecycleDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class LifecycleDto(UniversalBaseModel): updated_by: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/link_dto.py b/sdk/agenta/client/backend/types/link_dto.py index 7ec2c9ef42..91c76de759 100644 --- a/sdk/agenta/client/backend/types/link_dto.py +++ b/sdk/agenta/client/backend/types/link_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .tree_type import TreeType import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .tree_type import TreeType class LinkDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class LinkDto(UniversalBaseModel): tree_id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/list_api_keys_response.py b/sdk/agenta/client/backend/types/list_api_keys_response.py index f369b622c2..0ed671ca27 100644 --- a/sdk/agenta/client/backend/types/list_api_keys_response.py +++ b/sdk/agenta/client/backend/types/list_api_keys_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ListApiKeysResponse(UniversalBaseModel): @@ -13,7 +13,9 @@ class ListApiKeysResponse(UniversalBaseModel): expiration_date: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/llm_run_rate_limit.py b/sdk/agenta/client/backend/types/llm_run_rate_limit.py index 0980d9214d..b0c9f46899 100644 --- a/sdk/agenta/client/backend/types/llm_run_rate_limit.py +++ b/sdk/agenta/client/backend/types/llm_run_rate_limit.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class LlmRunRateLimit(UniversalBaseModel): @@ -13,7 +13,9 @@ class LlmRunRateLimit(UniversalBaseModel): delay_between_batches: int if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/meta_request.py b/sdk/agenta/client/backend/types/meta_request.py deleted file mode 100644 index c6c5c2f637..0000000000 --- a/sdk/agenta/client/backend/types/meta_request.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class MetaRequest(UniversalBaseModel): - meta: typing.Dict[str, typing.Optional["FullJsonInput"]] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(MetaRequest) diff --git a/sdk/agenta/client/backend/types/metrics_dto.py b/sdk/agenta/client/backend/types/metrics_dto.py index a0eefd86f5..34be8ae995 100644 --- a/sdk/agenta/client/backend/types/metrics_dto.py +++ b/sdk/agenta/client/backend/types/metrics_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class MetricsDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class MetricsDto(UniversalBaseModel): tokens: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/new_testset.py b/sdk/agenta/client/backend/types/new_testset.py index decf6d3828..9643d26a1f 100644 --- a/sdk/agenta/client/backend/types/new_testset.py +++ b/sdk/agenta/client/backend/types/new_testset.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class NewTestset(UniversalBaseModel): @@ -11,7 +11,9 @@ class NewTestset(UniversalBaseModel): csvdata: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/node_dto.py b/sdk/agenta/client/backend/types/node_dto.py index 259f18b33c..6caa131c32 100644 --- a/sdk/agenta/client/backend/types/node_dto.py +++ b/sdk/agenta/client/backend/types/node_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .node_type import NodeType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class NodeDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class NodeDto(UniversalBaseModel): type: typing.Optional[NodeType] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_context_dto.py b/sdk/agenta/client/backend/types/o_tel_context_dto.py index 2faa593ba4..ab99bfac46 100644 --- a/sdk/agenta/client/backend/types/o_tel_context_dto.py +++ b/sdk/agenta/client/backend/types/o_tel_context_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OTelContextDto(UniversalBaseModel): @@ -11,7 +11,9 @@ class OTelContextDto(UniversalBaseModel): span_id: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_event.py b/sdk/agenta/client/backend/types/o_tel_event.py deleted file mode 100644 index f5a2bc7cc5..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_event.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .timestamp import Timestamp - - -class OTelEvent(UniversalBaseModel): - name: str - timestamp: Timestamp - attributes: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(OTelEvent) diff --git a/sdk/agenta/client/backend/types/o_tel_event_dto.py b/sdk/agenta/client/backend/types/o_tel_event_dto.py index 2031177463..e5eed83822 100644 --- a/sdk/agenta/client/backend/types/o_tel_event_dto.py +++ b/sdk/agenta/client/backend/types/o_tel_event_dto.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OTelEventDto(UniversalBaseModel): @@ -12,7 +12,9 @@ class OTelEventDto(UniversalBaseModel): attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_extra_dto.py b/sdk/agenta/client/backend/types/o_tel_extra_dto.py index 68b5fca1f2..c7e9294db3 100644 --- a/sdk/agenta/client/backend/types/o_tel_extra_dto.py +++ b/sdk/agenta/client/backend/types/o_tel_extra_dto.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .o_tel_event_dto import OTelEventDto from .o_tel_link_dto import OTelLinkDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class OTelExtraDto(UniversalBaseModel): @@ -15,7 +15,9 @@ class OTelExtraDto(UniversalBaseModel): links: typing.Optional[typing.List[OTelLinkDto]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_flat_span.py b/sdk/agenta/client/backend/types/o_tel_flat_span.py deleted file mode 100644 index 5873d6d85c..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_flat_span.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .o_tel_event import OTelEvent -from .o_tel_flat_span_output_end_time import OTelFlatSpanOutputEndTime -from .o_tel_flat_span_output_start_time import OTelFlatSpanOutputStartTime -from .o_tel_link import OTelLink -from .o_tel_span_kind import OTelSpanKind -from .o_tel_status_code import OTelStatusCode - - -class OTelFlatSpan(UniversalBaseModel): - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - trace_id: str - span_id: str - parent_id: typing.Optional[str] = None - span_kind: typing.Optional[OTelSpanKind] = None - span_name: typing.Optional[str] = None - start_time: typing.Optional[OTelFlatSpanOutputStartTime] = None - end_time: typing.Optional[OTelFlatSpanOutputEndTime] = None - status_code: typing.Optional[OTelStatusCode] = None - status_message: typing.Optional[str] = None - attributes: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - events: typing.Optional[typing.List[OTelEvent]] = None - links: typing.Optional[typing.List[OTelLink]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(OTelFlatSpan) diff --git a/sdk/agenta/client/backend/types/o_tel_flat_span_input_end_time.py b/sdk/agenta/client/backend/types/o_tel_flat_span_input_end_time.py deleted file mode 100644 index a95b1d424a..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_flat_span_input_end_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelFlatSpanInputEndTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_flat_span_input_start_time.py b/sdk/agenta/client/backend/types/o_tel_flat_span_input_start_time.py deleted file mode 100644 index f712154a7b..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_flat_span_input_start_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelFlatSpanInputStartTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_flat_span_output_end_time.py b/sdk/agenta/client/backend/types/o_tel_flat_span_output_end_time.py deleted file mode 100644 index c668cd7415..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_flat_span_output_end_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelFlatSpanOutputEndTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_flat_span_output_start_time.py b/sdk/agenta/client/backend/types/o_tel_flat_span_output_start_time.py deleted file mode 100644 index e7a7596e93..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_flat_span_output_start_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelFlatSpanOutputStartTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_link.py b/sdk/agenta/client/backend/types/o_tel_link.py deleted file mode 100644 index 0d449c52b9..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_link.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class OTelLink(UniversalBaseModel): - span_id: str - trace_id: str - attributes: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(OTelLink) diff --git a/sdk/agenta/client/backend/types/o_tel_link_dto.py b/sdk/agenta/client/backend/types/o_tel_link_dto.py index 7261632637..75ec3d1f1b 100644 --- a/sdk/agenta/client/backend/types/o_tel_link_dto.py +++ b/sdk/agenta/client/backend/types/o_tel_link_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .o_tel_context_dto import OTelContextDto import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_context_dto import OTelContextDto class OTelLinkDto(UniversalBaseModel): @@ -12,7 +12,9 @@ class OTelLinkDto(UniversalBaseModel): attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_links_response.py b/sdk/agenta/client/backend/types/o_tel_links_response.py deleted file mode 100644 index 9f7be47a34..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_links_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_link import OTelLink - - -class OTelLinksResponse(UniversalBaseModel): - version: str - count: int - links: typing.Optional[typing.List[OTelLink]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/o_tel_span.py b/sdk/agenta/client/backend/types/o_tel_span.py deleted file mode 100644 index a39377066f..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .o_tel_event import OTelEvent -from .o_tel_link import OTelLink -from .o_tel_span_kind import OTelSpanKind -from .o_tel_span_output_end_time import OTelSpanOutputEndTime -from .o_tel_span_output_start_time import OTelSpanOutputStartTime -from .o_tel_status_code import OTelStatusCode - - -class OTelSpan(UniversalBaseModel): - # Complete break of recursion cycle - using pure Dict[str, Any] instead of any recursive types - spans: typing.Optional[typing.Dict[str, typing.Any]] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - trace_id: str - span_id: str - parent_id: typing.Optional[str] = None - span_kind: typing.Optional[OTelSpanKind] = None - span_name: typing.Optional[str] = None - start_time: typing.Optional[OTelSpanOutputStartTime] = None - end_time: typing.Optional[OTelSpanOutputEndTime] = None - status_code: typing.Optional[OTelStatusCode] = None - status_message: typing.Optional[str] = None - attributes: typing.Optional[typing.Dict[str, typing.Any]] = None - events: typing.Optional[typing.List[OTelEvent]] = None - links: typing.Optional[typing.List[OTelLink]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="allow", - frozen=True, - json_schema_extra=lambda schema, model: None, # Disable schema generation to prevent recursion - ) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -update_forward_refs(OTelSpan) diff --git a/sdk/agenta/client/backend/types/o_tel_span_dto.py b/sdk/agenta/client/backend/types/o_tel_span_dto.py index 24999a7127..66632172c9 100644 --- a/sdk/agenta/client/backend/types/o_tel_span_dto.py +++ b/sdk/agenta/client/backend/types/o_tel_span_dto.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.pydantic_utilities import UniversalBaseModel from .o_tel_context_dto import OTelContextDto -from .o_tel_event_dto import OTelEventDto -from .o_tel_link_dto import OTelLinkDto +import typing from .o_tel_span_kind import OTelSpanKind +import datetime as dt from .o_tel_status_code import OTelStatusCode +from .o_tel_event_dto import OTelEventDto +from .o_tel_link_dto import OTelLinkDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class OTelSpanDto(UniversalBaseModel): @@ -26,7 +26,9 @@ class OTelSpanDto(UniversalBaseModel): links: typing.Optional[typing.List[OTelLinkDto]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/o_tel_span_input_end_time.py b/sdk/agenta/client/backend/types/o_tel_span_input_end_time.py deleted file mode 100644 index 577d94f4bf..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_input_end_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelSpanInputEndTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_span_input_spans_value.py b/sdk/agenta/client/backend/types/o_tel_span_input_spans_value.py deleted file mode 100644 index 4f4b88840b..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_input_spans_value.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .o_tel_span import OTelSpan - -OTelSpanInputSpansValue = typing.Union[OTelSpan, typing.List[OTelSpan]] diff --git a/sdk/agenta/client/backend/types/o_tel_span_input_start_time.py b/sdk/agenta/client/backend/types/o_tel_span_input_start_time.py deleted file mode 100644 index 087859003f..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_input_start_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelSpanInputStartTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_span_output_end_time.py b/sdk/agenta/client/backend/types/o_tel_span_output_end_time.py deleted file mode 100644 index a6b256fb80..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_output_end_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelSpanOutputEndTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_span_output_spans_value.py b/sdk/agenta/client/backend/types/o_tel_span_output_spans_value.py deleted file mode 100644 index aff5245479..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_output_spans_value.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. -# Modified to prevent recursion errors - -from __future__ import annotations - -import typing -from typing import Any, Dict, List, Optional, Union - -# BREAK RECURSION: Use Any instead of recursive types -OTelSpanOutputSpansValue = Union[Dict[str, Any], List[Dict[str, Any]]] - - -# Export a function to get a proper dict representation without recursion -def get_non_recursive_representation(data): - """Convert an OTelSpan to a dict without recursion""" - if data is None: - return None - - if isinstance(data, list): - return [get_non_recursive_representation(item) for item in data] - - if hasattr(data, "model_dump"): - # It's a Pydantic v2 model, use model_dump - return data.model_dump() - elif hasattr(data, "dict"): - # It's a Pydantic v1 model, use dict() - return data.dict() - - # Plain dict or other type - return data diff --git a/sdk/agenta/client/backend/types/o_tel_span_output_start_time.py b/sdk/agenta/client/backend/types/o_tel_span_output_start_time.py deleted file mode 100644 index 1a02204c26..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_span_output_start_time.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -OTelSpanOutputStartTime = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/o_tel_spans_response.py b/sdk/agenta/client/backend/types/o_tel_spans_response.py new file mode 100644 index 0000000000..b9fb641427 --- /dev/null +++ b/sdk/agenta/client/backend/types/o_tel_spans_response.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .o_tel_span_dto import OTelSpanDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class OTelSpansResponse(UniversalBaseModel): + version: str + count: typing.Optional[int] = None + spans: typing.List[OTelSpanDto] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/o_tel_spans_tree.py b/sdk/agenta/client/backend/types/o_tel_spans_tree.py deleted file mode 100644 index c58bc757ad..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_spans_tree.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_spans_tree_output_spans_value import OTelSpansTreeOutputSpansValue - - -class OTelSpansTree(UniversalBaseModel): - spans: typing.Optional[ - typing.Dict[str, typing.Optional[OTelSpansTreeOutputSpansValue]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py b/sdk/agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py deleted file mode 100644 index 967189150b..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .o_tel_span import OTelSpan - -OTelSpansTreeInputSpansValue = typing.Union[OTelSpan, typing.List[OTelSpan]] diff --git a/sdk/agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py b/sdk/agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py deleted file mode 100644 index b554d6ea4a..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. -import typing -from .o_tel_span import OTelSpan - -OTelSpansTreeOutputSpansValue = typing.Union[OTelSpan, typing.List[OTelSpan]] diff --git a/sdk/agenta/client/backend/types/o_tel_status_code.py b/sdk/agenta/client/backend/types/o_tel_status_code.py index d3df42ba2b..d5a60e6006 100644 --- a/sdk/agenta/client/backend/types/o_tel_status_code.py +++ b/sdk/agenta/client/backend/types/o_tel_status_code.py @@ -3,6 +3,6 @@ import typing OTelStatusCode = typing.Union[ - typing.Literal["STATUS_CODE_UNSET", "STATUS_CODE_OK", "STATUS_CODE_ERROR"], + typing.Literal["STATUS_CODE_OK", "STATUS_CODE_ERROR", "STATUS_CODE_UNSET"], typing.Any, ] diff --git a/sdk/agenta/client/backend/types/o_tel_tracing_data_response.py b/sdk/agenta/client/backend/types/o_tel_tracing_data_response.py deleted file mode 100644 index 078d7899c8..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_tracing_data_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_span_dto import OTelSpanDto - - -class OTelTracingDataResponse(UniversalBaseModel): - version: str - count: typing.Optional[int] = None - spans: typing.List[OTelSpanDto] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/o_tel_tracing_request.py b/sdk/agenta/client/backend/types/o_tel_tracing_request.py deleted file mode 100644 index 73a7395f4a..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_tracing_request.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_flat_span import OTelFlatSpan -from .o_tel_spans_tree import OTelSpansTree - - -class OTelTracingRequest(UniversalBaseModel): - spans: typing.Optional[typing.List[OTelFlatSpan]] = None - traces: typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/o_tel_tracing_response.py b/sdk/agenta/client/backend/types/o_tel_tracing_response.py deleted file mode 100644 index 63739203ab..0000000000 --- a/sdk/agenta/client/backend/types/o_tel_tracing_response.py +++ /dev/null @@ -1,27 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .o_tel_flat_span import OTelFlatSpan -from .o_tel_spans_tree import OTelSpansTree - - -class OTelTracingResponse(UniversalBaseModel): - version: str - count: int - oldest: typing.Optional[dt.datetime] = None - newest: typing.Optional[dt.datetime] = None - spans: typing.Optional[typing.List[OTelFlatSpan]] = None - traces: typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/organization.py b/sdk/agenta/client/backend/types/organization.py index 182b59e638..d186df6722 100644 --- a/sdk/agenta/client/backend/types/organization.py +++ b/sdk/agenta/client/backend/types/organization.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class Organization(UniversalBaseModel): @@ -15,7 +15,9 @@ class Organization(UniversalBaseModel): workspaces: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/organization_details.py b/sdk/agenta/client/backend/types/organization_details.py index fe92068238..82e0ee5fca 100644 --- a/sdk/agenta/client/backend/types/organization_details.py +++ b/sdk/agenta/client/backend/types/organization_details.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OrganizationDetails(UniversalBaseModel): @@ -18,7 +18,9 @@ class OrganizationDetails(UniversalBaseModel): ] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/organization_membership_request.py b/sdk/agenta/client/backend/types/organization_membership_request.py index a68fbb3359..b9821851ee 100644 --- a/sdk/agenta/client/backend/types/organization_membership_request.py +++ b/sdk/agenta/client/backend/types/organization_membership_request.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .role import Role +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference -from .role import Role class OrganizationMembershipRequest(UniversalBaseModel): @@ -15,7 +15,9 @@ class OrganizationMembershipRequest(UniversalBaseModel): organization_ref: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/organization_output.py b/sdk/agenta/client/backend/types/organization_output.py index 55d4a1aea3..702802f814 100644 --- a/sdk/agenta/client/backend/types/organization_output.py +++ b/sdk/agenta/client/backend/types/organization_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OrganizationOutput(UniversalBaseModel): @@ -11,7 +11,9 @@ class OrganizationOutput(UniversalBaseModel): name: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/organization_request.py b/sdk/agenta/client/backend/types/organization_request.py index 688eeaff1b..8f74b0bb2e 100644 --- a/sdk/agenta/client/backend/types/organization_request.py +++ b/sdk/agenta/client/backend/types/organization_request.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OrganizationRequest(UniversalBaseModel): @@ -12,7 +12,9 @@ class OrganizationRequest(UniversalBaseModel): is_paying: bool if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/parent_dto.py b/sdk/agenta/client/backend/types/parent_dto.py index 285505beae..7bf3c33715 100644 --- a/sdk/agenta/client/backend/types/parent_dto.py +++ b/sdk/agenta/client/backend/types/parent_dto.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ParentDto(UniversalBaseModel): id: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/permission.py b/sdk/agenta/client/backend/types/permission.py index 7d57b24f4b..8f6889da90 100644 --- a/sdk/agenta/client/backend/types/permission.py +++ b/sdk/agenta/client/backend/types/permission.py @@ -41,17 +41,6 @@ "delete_organization", "add_new_user_to_organization", "reset_password", - "view_billing", - "edit_billing", - "view_workflows", - "edit_workflows", - "view_evaluators", - "edit_evaluators", - "view_testsets", - "edit_testsets", - "view_annotations", - "edit_annotations", - "delete_annotations", ], typing.Any, ] diff --git a/sdk/agenta/client/backend/types/plan.py b/sdk/agenta/client/backend/types/plan.py deleted file mode 100644 index 5b13dcc013..0000000000 --- a/sdk/agenta/client/backend/types/plan.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -Plan = typing.Union[ - typing.Literal[ - "cloud_v0_hobby", - "cloud_v0_pro", - "cloud_v0_humanity_labs", - "cloud_v0_x_labs", - "cloud_v0_agenta_ai", - ], - typing.Any, -] diff --git a/sdk/agenta/client/backend/types/project_membership_request.py b/sdk/agenta/client/backend/types/project_membership_request.py index efbb405623..1ae71eb87d 100644 --- a/sdk/agenta/client/backend/types/project_membership_request.py +++ b/sdk/agenta/client/backend/types/project_membership_request.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .role import Role +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference -from .role import Role class ProjectMembershipRequest(UniversalBaseModel): @@ -15,7 +15,9 @@ class ProjectMembershipRequest(UniversalBaseModel): project_ref: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/project_request.py b/sdk/agenta/client/backend/types/project_request.py index 7fc1a9429a..d4cb6e582a 100644 --- a/sdk/agenta/client/backend/types/project_request.py +++ b/sdk/agenta/client/backend/types/project_request.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference class ProjectRequest(UniversalBaseModel): @@ -15,7 +15,9 @@ class ProjectRequest(UniversalBaseModel): organization_ref: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/project_scope.py b/sdk/agenta/client/backend/types/project_scope.py index 17d17438bd..b6082d6538 100644 --- a/sdk/agenta/client/backend/types/project_scope.py +++ b/sdk/agenta/client/backend/types/project_scope.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .role import Role +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference -from .role import Role class ProjectScope(UniversalBaseModel): @@ -18,7 +18,9 @@ class ProjectScope(UniversalBaseModel): organization: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/projects_response.py b/sdk/agenta/client/backend/types/projects_response.py index 2688ea5348..31fd82d4ac 100644 --- a/sdk/agenta/client/backend/types/projects_response.py +++ b/sdk/agenta/client/backend/types/projects_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ProjectsResponse(UniversalBaseModel): @@ -17,7 +17,9 @@ class ProjectsResponse(UniversalBaseModel): is_demo: typing.Optional[bool] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/provider_key_dto.py b/sdk/agenta/client/backend/types/provider_key_dto.py new file mode 100644 index 0000000000..bbb1f4306f --- /dev/null +++ b/sdk/agenta/client/backend/types/provider_key_dto.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class StandardProviderSettingsDto(UniversalBaseModel): + key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/provider_kind.py b/sdk/agenta/client/backend/types/provider_kind.py new file mode 100644 index 0000000000..683b6ae9c3 --- /dev/null +++ b/sdk/agenta/client/backend/types/provider_kind.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +StandardProviderKind = typing.Union[ + typing.Literal[ + "openai", + "cohere", + "anyscale", + "deepinfra", + "alephalpha", + "groq", + "mistralai", + "anthropic", + "perplexityai", + "togetherai", + "openrouter", + "gemini", + ], + typing.Any, +] diff --git a/sdk/agenta/client/backend/types/recursive_types.py b/sdk/agenta/client/backend/types/recursive_types.py deleted file mode 100644 index 95b5165f73..0000000000 --- a/sdk/agenta/client/backend/types/recursive_types.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Properly defined recursive types for the SDK to prevent Pydantic recursion errors. -These use TypeAliasType from typing_extensions as recommended by Pydantic documentation. -""" - -from typing import Dict, List, Optional, Union, Any -from typing_extensions import TypeAliasType - -# Define a non-recursive JSON type that breaks the recursion -# This will be used in place of recursive types in the models -JsonValue = Union[Dict[str, Any], List[Any], str, int, float, bool, None] - -# Define properly structured recursive types that Pydantic can handle -RecursiveJson = TypeAliasType( - "RecursiveJson", - 'Union[Dict[str, "RecursiveJson"], List["RecursiveJson"], str, int, float, bool, None]', -) - -# Define a type for OTel spans that properly handles recursion -OTelSpanValue = TypeAliasType("OTelSpanValue", 'Union["OTelSpan", List["OTelSpan"]]') - -# The actual implementation will import this later -OTelSpan = Any diff --git a/sdk/agenta/client/backend/types/reference.py b/sdk/agenta/client/backend/types/reference.py index ef16defd21..1e91c3bb99 100644 --- a/sdk/agenta/client/backend/types/reference.py +++ b/sdk/agenta/client/backend/types/reference.py @@ -1,35 +1,22 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) class Reference(UniversalBaseModel): id: typing.Optional[str] = None slug: typing.Optional[str] = None - version: typing.Optional[str] = None - attributes: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonInput"]] - ] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: frozen = True smart_union = True extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(Reference) diff --git a/sdk/agenta/client/backend/types/reference_dto.py b/sdk/agenta/client/backend/types/reference_dto.py index c4ce3b6094..67fd56b0a8 100644 --- a/sdk/agenta/client/backend/types/reference_dto.py +++ b/sdk/agenta/client/backend/types/reference_dto.py @@ -1,19 +1,20 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ReferenceDto(UniversalBaseModel): slug: typing.Optional[str] = None version: typing.Optional[int] = None - commit_message: typing.Optional[str] = None id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/reference_request_model.py b/sdk/agenta/client/backend/types/reference_request_model.py index 37e8f65155..91d1ad80d5 100644 --- a/sdk/agenta/client/backend/types/reference_request_model.py +++ b/sdk/agenta/client/backend/types/reference_request_model.py @@ -1,19 +1,20 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ReferenceRequestModel(UniversalBaseModel): slug: typing.Optional[str] = None version: typing.Optional[int] = None - commit_message: typing.Optional[str] = None id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/result.py b/sdk/agenta/client/backend/types/result.py index 8eec65536a..e651345b9c 100644 --- a/sdk/agenta/client/backend/types/result.py +++ b/sdk/agenta/client/backend/types/result.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .error import Error +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class Result(UniversalBaseModel): @@ -13,7 +13,9 @@ class Result(UniversalBaseModel): error: typing.Optional[Error] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/root_dto.py b/sdk/agenta/client/backend/types/root_dto.py index e099af2cbb..7b7e8f5aeb 100644 --- a/sdk/agenta/client/backend/types/root_dto.py +++ b/sdk/agenta/client/backend/types/root_dto.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class RootDto(UniversalBaseModel): id: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/scopes_response_model.py b/sdk/agenta/client/backend/types/scopes_response_model.py index 4531c11be0..14bf117afb 100644 --- a/sdk/agenta/client/backend/types/scopes_response_model.py +++ b/sdk/agenta/client/backend/types/scopes_response_model.py @@ -1,17 +1,19 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .project_scope import ProjectScope +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class ScopesResponseModel(UniversalBaseModel): projects: typing.Optional[typing.Dict[str, typing.Dict[str, ProjectScope]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/secret_dto.py b/sdk/agenta/client/backend/types/secret_dto.py index 9aa3259b53..746d857fd1 100644 --- a/sdk/agenta/client/backend/types/secret_dto.py +++ b/sdk/agenta/client/backend/types/secret_dto.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .secret_kind import SecretKind +from .data import Data +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .data import Data -from .secret_kind import SecretKind class SecretDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class SecretDto(UniversalBaseModel): data: Data if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/secret_response_dto.py b/sdk/agenta/client/backend/types/secret_response_dto.py index 77c2a45945..adbb15e401 100644 --- a/sdk/agenta/client/backend/types/secret_response_dto.py +++ b/sdk/agenta/client/backend/types/secret_response_dto.py @@ -1,24 +1,24 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .header_dto import HeaderDto +from .secret_dto import SecretDto import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .data import Data -from .header import Header from .lifecycle_dto import LifecycleDto -from .secret_kind import SecretKind +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class SecretResponseDto(UniversalBaseModel): - kind: SecretKind - data: Data - id: typing.Optional[str] = None - header: Header + header: HeaderDto + secret: SecretDto + id: str lifecycle: typing.Optional[LifecycleDto] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/simple_evaluation_output.py b/sdk/agenta/client/backend/types/simple_evaluation_output.py index c0b927f73c..ae5997391c 100644 --- a/sdk/agenta/client/backend/types/simple_evaluation_output.py +++ b/sdk/agenta/client/backend/types/simple_evaluation_output.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .evaluation_type import EvaluationType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class SimpleEvaluationOutput(UniversalBaseModel): @@ -15,7 +15,9 @@ class SimpleEvaluationOutput(UniversalBaseModel): evaluation_type: EvaluationType if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/span_dto.py b/sdk/agenta/client/backend/types/span_dto.py index 691d71a6f9..80fdb2b0a3 100644 --- a/sdk/agenta/client/backend/types/span_dto.py +++ b/sdk/agenta/client/backend/types/span_dto.py @@ -1,30 +1,24 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations - +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .exception_dto import ExceptionDto from .lifecycle_dto import LifecycleDto -from .link_dto import LinkDto +from .root_dto import RootDto +from .tree_dto import TreeDto from .node_dto import NodeDto -from .o_tel_extra_dto import OTelExtraDto from .parent_dto import ParentDto -from .root_dto import RootDto -from .status_dto import StatusDto from .time_dto import TimeDto -from .tree_dto import TreeDto +from .status_dto import StatusDto +from .exception_dto import ExceptionDto +from .link_dto import LinkDto +from .o_tel_extra_dto import OTelExtraDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from ..core.pydantic_utilities import update_forward_refs class SpanDto(UniversalBaseModel): - trace_id: str - span_id: str lifecycle: typing.Optional[LifecycleDto] = None root: RootDto tree: TreeDto @@ -44,7 +38,9 @@ class SpanDto(UniversalBaseModel): ] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: @@ -53,6 +49,6 @@ class Config: extra = pydantic.Extra.allow -from .span_dto_nodes_value import SpanDtoNodesValue # noqa: E402, F401, I001 +from .span_dto_nodes_value import SpanDtoNodesValue # noqa: E402 update_forward_refs(SpanDto) diff --git a/sdk/agenta/client/backend/types/span_dto_nodes_value.py b/sdk/agenta/client/backend/types/span_dto_nodes_value.py index 10d96d9e6b..93e28b70de 100644 --- a/sdk/agenta/client/backend/types/span_dto_nodes_value.py +++ b/sdk/agenta/client/backend/types/span_dto_nodes_value.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations - +import typing import typing if typing.TYPE_CHECKING: diff --git a/sdk/agenta/client/backend/types/standard_provider_dto.py b/sdk/agenta/client/backend/types/standard_provider_dto.py index df25d76d4d..791df41ae7 100644 --- a/sdk/agenta/client/backend/types/standard_provider_dto.py +++ b/sdk/agenta/client/backend/types/standard_provider_dto.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.pydantic_utilities import UniversalBaseModel from .standard_provider_kind import StandardProviderKind from .standard_provider_settings_dto import StandardProviderSettingsDto +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic class StandardProviderDto(UniversalBaseModel): @@ -13,7 +13,9 @@ class StandardProviderDto(UniversalBaseModel): provider: StandardProviderSettingsDto if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/standard_provider_settings_dto.py b/sdk/agenta/client/backend/types/standard_provider_settings_dto.py index c0bc92be60..bbb1f4306f 100644 --- a/sdk/agenta/client/backend/types/standard_provider_settings_dto.py +++ b/sdk/agenta/client/backend/types/standard_provider_settings_dto.py @@ -1,16 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class StandardProviderSettingsDto(UniversalBaseModel): key: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/status_dto.py b/sdk/agenta/client/backend/types/status_dto.py index 47a96e3984..44f2ef907b 100644 --- a/sdk/agenta/client/backend/types/status_dto.py +++ b/sdk/agenta/client/backend/types/status_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .status_code import StatusCode import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .status_code import StatusCode class StatusDto(UniversalBaseModel): @@ -12,7 +12,9 @@ class StatusDto(UniversalBaseModel): message: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/tags_request.py b/sdk/agenta/client/backend/types/tags_request.py deleted file mode 100644 index 5ee86f99d9..0000000000 --- a/sdk/agenta/client/backend/types/tags_request.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class TagsRequest(UniversalBaseModel): - metadata: typing.Dict[str, typing.Optional["FullJsonInput"]] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_input import FullJsonInput # noqa: E402, F401, I001 - -update_forward_refs(TagsRequest) diff --git a/sdk/agenta/client/backend/types/template.py b/sdk/agenta/client/backend/types/template.py new file mode 100644 index 0000000000..af02645289 --- /dev/null +++ b/sdk/agenta/client/backend/types/template.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .template_image_info import TemplateImageInfo +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class Template(UniversalBaseModel): + id: str + image: TemplateImageInfo + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/template_image_info.py b/sdk/agenta/client/backend/types/template_image_info.py new file mode 100644 index 0000000000..b179682fda --- /dev/null +++ b/sdk/agenta/client/backend/types/template_image_info.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class TemplateImageInfo(UniversalBaseModel): + name: str + size: typing.Optional[int] = None + digest: typing.Optional[str] = None + title: str + description: str + last_pushed: typing.Optional[dt.datetime] = None + repo_name: typing.Optional[str] = None + template_uri: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/test_set_output_response.py b/sdk/agenta/client/backend/types/test_set_output_response.py new file mode 100644 index 0000000000..34023d5c7a --- /dev/null +++ b/sdk/agenta/client/backend/types/test_set_output_response.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing_extensions +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class TestSetOutputResponse(UniversalBaseModel): + id: typing_extensions.Annotated[str, FieldMetadata(alias="_id")] + name: str + created_at: str + updated_at: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/test_set_simple_response.py b/sdk/agenta/client/backend/types/test_set_simple_response.py new file mode 100644 index 0000000000..659d429caa --- /dev/null +++ b/sdk/agenta/client/backend/types/test_set_simple_response.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class TestSetSimpleResponse(UniversalBaseModel): + id: str + name: str + created_at: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/testcase_response.py b/sdk/agenta/client/backend/types/testcase_response.py deleted file mode 100644 index 56fab720ae..0000000000 --- a/sdk/agenta/client/backend/types/testcase_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class TestcaseResponse(UniversalBaseModel): - count: int - testcase: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(TestcaseResponse) diff --git a/sdk/agenta/client/backend/types/testset.py b/sdk/agenta/client/backend/types/testset.py deleted file mode 100644 index 5a50875540..0000000000 --- a/sdk/agenta/client/backend/types/testset.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) - - -class Testset(UniversalBaseModel): - name: typing.Optional[str] = None - description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - testcases: typing.Optional[ - typing.List[typing.Dict[str, typing.Optional["FullJsonOutput"]]] - ] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(Testset) diff --git a/sdk/agenta/client/backend/types/testset_output_response.py b/sdk/agenta/client/backend/types/testset_output_response.py deleted file mode 100644 index c73add9298..0000000000 --- a/sdk/agenta/client/backend/types/testset_output_response.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class TestsetOutputResponse(UniversalBaseModel): - id: typing_extensions.Annotated[str, FieldMetadata(alias="_id")] - name: str - created_at: str - updated_at: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/testset_request.py b/sdk/agenta/client/backend/types/testset_request.py deleted file mode 100644 index 1e0448b2d3..0000000000 --- a/sdk/agenta/client/backend/types/testset_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .testset import Testset - - -class TestsetRequest(UniversalBaseModel): - testset: Testset - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/testset_response.py b/sdk/agenta/client/backend/types/testset_response.py deleted file mode 100644 index 55a02c3e83..0000000000 --- a/sdk/agenta/client/backend/types/testset_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .testset import Testset - - -class TestsetResponse(UniversalBaseModel): - count: int - testset: typing.Optional[Testset] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/testset_simple_response.py b/sdk/agenta/client/backend/types/testset_simple_response.py deleted file mode 100644 index abd4e66869..0000000000 --- a/sdk/agenta/client/backend/types/testset_simple_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class TestsetSimpleResponse(UniversalBaseModel): - id: str - name: str - created_at: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/testsets_response.py b/sdk/agenta/client/backend/types/testsets_response.py deleted file mode 100644 index e1778bf1eb..0000000000 --- a/sdk/agenta/client/backend/types/testsets_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .testset import Testset - - -class TestsetsResponse(UniversalBaseModel): - count: int - testsets: typing.Optional[typing.List[Testset]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/time_dto.py b/sdk/agenta/client/backend/types/time_dto.py index 7f0aa58a57..5def8ab023 100644 --- a/sdk/agenta/client/backend/types/time_dto.py +++ b/sdk/agenta/client/backend/types/time_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class TimeDto(UniversalBaseModel): @@ -12,7 +12,9 @@ class TimeDto(UniversalBaseModel): end: dt.datetime if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/timestamp.py b/sdk/agenta/client/backend/types/timestamp.py deleted file mode 100644 index d570208d25..0000000000 --- a/sdk/agenta/client/backend/types/timestamp.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -Timestamp = typing.Union[dt.datetime, int] diff --git a/sdk/agenta/client/backend/types/tree_dto.py b/sdk/agenta/client/backend/types/tree_dto.py index f62fd7f7e4..dfb98faaac 100644 --- a/sdk/agenta/client/backend/types/tree_dto.py +++ b/sdk/agenta/client/backend/types/tree_dto.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .tree_type import TreeType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class TreeDto(UniversalBaseModel): @@ -12,7 +12,9 @@ class TreeDto(UniversalBaseModel): type: typing.Optional[TreeType] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/update_app_output.py b/sdk/agenta/client/backend/types/update_app_output.py index b96c4af042..deede4ef37 100644 --- a/sdk/agenta/client/backend/types/update_app_output.py +++ b/sdk/agenta/client/backend/types/update_app_output.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UpdateAppOutput(UniversalBaseModel): @@ -11,7 +11,9 @@ class UpdateAppOutput(UniversalBaseModel): app_name: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/uri.py b/sdk/agenta/client/backend/types/uri.py new file mode 100644 index 0000000000..7c9a2fab47 --- /dev/null +++ b/sdk/agenta/client/backend/types/uri.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class Uri(UniversalBaseModel): + uri: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/user_request.py b/sdk/agenta/client/backend/types/user_request.py index f36c14bbed..199f0ea762 100644 --- a/sdk/agenta/client/backend/types/user_request.py +++ b/sdk/agenta/client/backend/types/user_request.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UserRequest(UniversalBaseModel): @@ -11,7 +11,9 @@ class UserRequest(UniversalBaseModel): email: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/validation_error.py b/sdk/agenta/client/backend/types/validation_error.py index e388c3c1c1..4b6d592bda 100644 --- a/sdk/agenta/client/backend/types/validation_error.py +++ b/sdk/agenta/client/backend/types/validation_error.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .validation_error_loc_item import ValidationErrorLocItem +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class ValidationError(UniversalBaseModel): @@ -13,7 +13,9 @@ class ValidationError(UniversalBaseModel): type: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/variant_action.py b/sdk/agenta/client/backend/types/variant_action.py new file mode 100644 index 0000000000..0dec29eea2 --- /dev/null +++ b/sdk/agenta/client/backend/types/variant_action.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .variant_action_enum import VariantActionEnum +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class VariantAction(UniversalBaseModel): + action: VariantActionEnum + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/variant_action_enum.py b/sdk/agenta/client/backend/types/variant_action_enum.py new file mode 100644 index 0000000000..1bc746b0fd --- /dev/null +++ b/sdk/agenta/client/backend/types/variant_action_enum.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +VariantActionEnum = typing.Union[typing.Literal["START", "STOP"], typing.Any] diff --git a/sdk/agenta/client/backend/types/workflow_artifact.py b/sdk/agenta/client/backend/types/workflow_artifact.py deleted file mode 100644 index 4ea448652c..0000000000 --- a/sdk/agenta/client/backend/types/workflow_artifact.py +++ /dev/null @@ -1,45 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .workflow_flags import WorkflowFlags - - -class WorkflowArtifact(UniversalBaseModel): - name: typing.Optional[str] = None - description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - flags: typing.Optional[WorkflowFlags] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(WorkflowArtifact) diff --git a/sdk/agenta/client/backend/types/workflow_data.py b/sdk/agenta/client/backend/types/workflow_data.py deleted file mode 100644 index 81b144eb04..0000000000 --- a/sdk/agenta/client/backend/types/workflow_data.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class WorkflowData(UniversalBaseModel): - service: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None - configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_flags.py b/sdk/agenta/client/backend/types/workflow_flags.py deleted file mode 100644 index fe1e606e5c..0000000000 --- a/sdk/agenta/client/backend/types/workflow_flags.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class WorkflowFlags(UniversalBaseModel): - is_custom: typing.Optional[bool] = None - is_evaluator: typing.Optional[bool] = None - is_human: typing.Optional[bool] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_request.py b/sdk/agenta/client/backend/types/workflow_request.py deleted file mode 100644 index 2a00daa602..0000000000 --- a/sdk/agenta/client/backend/types/workflow_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_artifact import WorkflowArtifact - - -class WorkflowRequest(UniversalBaseModel): - workflow: WorkflowArtifact - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_response.py b/sdk/agenta/client/backend/types/workflow_response.py deleted file mode 100644 index 62583827bb..0000000000 --- a/sdk/agenta/client/backend/types/workflow_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_artifact import WorkflowArtifact - - -class WorkflowResponse(UniversalBaseModel): - count: int - workflow: typing.Optional[WorkflowArtifact] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_revision.py b/sdk/agenta/client/backend/types/workflow_revision.py deleted file mode 100644 index a114ebb0a8..0000000000 --- a/sdk/agenta/client/backend/types/workflow_revision.py +++ /dev/null @@ -1,57 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .artifact import Artifact -from .workflow_data import WorkflowData -from .workflow_flags import WorkflowFlags -from .workflow_variant import WorkflowVariant - - -class WorkflowRevision(UniversalBaseModel): - author: typing.Optional[str] = None - date: typing.Optional[dt.datetime] = None - message: typing.Optional[str] = None - name: typing.Optional[str] = None - description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - version: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - flags: typing.Optional[WorkflowFlags] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - data: typing.Optional[WorkflowData] = None - artifact_id: typing.Optional[str] = None - artifact: typing.Optional[Artifact] = None - variant_id: typing.Optional[str] = None - variant: typing.Optional[WorkflowVariant] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(WorkflowRevision) diff --git a/sdk/agenta/client/backend/types/workflow_revision_request.py b/sdk/agenta/client/backend/types/workflow_revision_request.py deleted file mode 100644 index 49f78fdfb6..0000000000 --- a/sdk/agenta/client/backend/types/workflow_revision_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_revision import WorkflowRevision - - -class WorkflowRevisionRequest(UniversalBaseModel): - revision: WorkflowRevision - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_revision_response.py b/sdk/agenta/client/backend/types/workflow_revision_response.py deleted file mode 100644 index 3f6169a7d8..0000000000 --- a/sdk/agenta/client/backend/types/workflow_revision_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_revision import WorkflowRevision - - -class WorkflowRevisionResponse(UniversalBaseModel): - count: int - revision: typing.Optional[WorkflowRevision] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_revisions_response.py b/sdk/agenta/client/backend/types/workflow_revisions_response.py deleted file mode 100644 index 23e72a17e2..0000000000 --- a/sdk/agenta/client/backend/types/workflow_revisions_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_revision import WorkflowRevision - - -class WorkflowRevisionsResponse(UniversalBaseModel): - count: int - revisions: typing.Optional[typing.List[WorkflowRevision]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_variant.py b/sdk/agenta/client/backend/types/workflow_variant.py deleted file mode 100644 index 2cea82ae9e..0000000000 --- a/sdk/agenta/client/backend/types/workflow_variant.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - update_forward_refs, -) -from .workflow_artifact import WorkflowArtifact -from .workflow_flags import WorkflowFlags - - -class WorkflowVariant(UniversalBaseModel): - name: typing.Optional[str] = None - description: typing.Optional[str] = None - created_at: typing.Optional[dt.datetime] = None - updated_at: typing.Optional[dt.datetime] = None - deleted_at: typing.Optional[dt.datetime] = None - created_by_id: typing.Optional[str] = None - updated_by_id: typing.Optional[str] = None - deleted_by_id: typing.Optional[str] = None - slug: typing.Optional[str] = None - id: typing.Optional[str] = None - flags: typing.Optional[WorkflowFlags] = None - metadata: typing.Optional[ - typing.Dict[str, typing.Optional["FullJsonOutput"]] - ] = None - artifact_id: typing.Optional[str] = None - artifact: typing.Optional[WorkflowArtifact] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .full_json_output import FullJsonOutput # noqa: E402, F401, I001 - -update_forward_refs(WorkflowVariant) diff --git a/sdk/agenta/client/backend/types/workflow_variant_request.py b/sdk/agenta/client/backend/types/workflow_variant_request.py deleted file mode 100644 index 78044e7682..0000000000 --- a/sdk/agenta/client/backend/types/workflow_variant_request.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_variant import WorkflowVariant - - -class WorkflowVariantRequest(UniversalBaseModel): - variant: WorkflowVariant - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_variant_response.py b/sdk/agenta/client/backend/types/workflow_variant_response.py deleted file mode 100644 index 1622e4709d..0000000000 --- a/sdk/agenta/client/backend/types/workflow_variant_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_variant import WorkflowVariant - - -class WorkflowVariantResponse(UniversalBaseModel): - count: int - variant: typing.Optional[WorkflowVariant] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflow_variants_response.py b/sdk/agenta/client/backend/types/workflow_variants_response.py deleted file mode 100644 index b97a378f72..0000000000 --- a/sdk/agenta/client/backend/types/workflow_variants_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_variant import WorkflowVariant - - -class WorkflowVariantsResponse(UniversalBaseModel): - count: int - variants: typing.Optional[typing.List[WorkflowVariant]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workflows_response.py b/sdk/agenta/client/backend/types/workflows_response.py deleted file mode 100644 index 8bf9724d44..0000000000 --- a/sdk/agenta/client/backend/types/workflows_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .workflow_artifact import WorkflowArtifact - - -class WorkflowsResponse(UniversalBaseModel): - count: int - workflows: typing.Optional[typing.List[WorkflowArtifact]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/sdk/agenta/client/backend/types/workspace.py b/sdk/agenta/client/backend/types/workspace.py index 0cb0f3340b..fabd086fc6 100644 --- a/sdk/agenta/client/backend/types/workspace.py +++ b/sdk/agenta/client/backend/types/workspace.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class Workspace(UniversalBaseModel): @@ -13,7 +13,9 @@ class Workspace(UniversalBaseModel): type: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/workspace_member_response.py b/sdk/agenta/client/backend/types/workspace_member_response.py index 487d9c405d..60f29c7110 100644 --- a/sdk/agenta/client/backend/types/workspace_member_response.py +++ b/sdk/agenta/client/backend/types/workspace_member_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .workspace_permission import WorkspacePermission +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class WorkspaceMemberResponse(UniversalBaseModel): @@ -12,7 +12,9 @@ class WorkspaceMemberResponse(UniversalBaseModel): roles: typing.List[WorkspacePermission] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/workspace_membership_request.py b/sdk/agenta/client/backend/types/workspace_membership_request.py index d6767b4237..607e6c3481 100644 --- a/sdk/agenta/client/backend/types/workspace_membership_request.py +++ b/sdk/agenta/client/backend/types/workspace_membership_request.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .role import Role +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference -from .role import Role class WorkspaceMembershipRequest(UniversalBaseModel): @@ -15,7 +15,9 @@ class WorkspaceMembershipRequest(UniversalBaseModel): workspace_ref: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/workspace_permission.py b/sdk/agenta/client/backend/types/workspace_permission.py index b493882843..028e712cd6 100644 --- a/sdk/agenta/client/backend/types/workspace_permission.py +++ b/sdk/agenta/client/backend/types/workspace_permission.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .workspace_role import WorkspaceRole import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .permission import Permission -from .workspace_role import WorkspaceRole +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class WorkspacePermission(UniversalBaseModel): @@ -14,7 +14,9 @@ class WorkspacePermission(UniversalBaseModel): permissions: typing.Optional[typing.List[Permission]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/workspace_request.py b/sdk/agenta/client/backend/types/workspace_request.py index 301bce0e26..410ba71708 100644 --- a/sdk/agenta/client/backend/types/workspace_request.py +++ b/sdk/agenta/client/backend/types/workspace_request.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel +from .reference import Reference +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing - import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .reference import Reference class WorkspaceRequest(UniversalBaseModel): @@ -14,7 +14,9 @@ class WorkspaceRequest(UniversalBaseModel): organization_ref: Reference if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/types/workspace_response.py b/sdk/agenta/client/backend/types/workspace_response.py index c79b86eb73..a042d463e8 100644 --- a/sdk/agenta/client/backend/types/workspace_response.py +++ b/sdk/agenta/client/backend/types/workspace_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.pydantic_utilities import UniversalBaseModel import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .workspace_member_response import WorkspaceMemberResponse +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic class WorkspaceResponse(UniversalBaseModel): @@ -18,7 +18,9 @@ class WorkspaceResponse(UniversalBaseModel): members: typing.Optional[typing.List[WorkspaceMemberResponse]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 else: class Config: diff --git a/sdk/agenta/client/backend/variants/__init__.py b/sdk/agenta/client/backend/variants/__init__.py index bcbb069e44..71317185ab 100644 --- a/sdk/agenta/client/backend/variants/__init__.py +++ b/sdk/agenta/client/backend/variants/__init__.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - from .types import AddVariantFromBaseAndConfigResponse __all__ = ["AddVariantFromBaseAndConfigResponse"] diff --git a/sdk/agenta/client/backend/variants/client.py b/sdk/agenta/client/backend/variants/client.py index 487cfc6fbf..e16d951187 100644 --- a/sdk/agenta/client/backend/variants/client.py +++ b/sdk/agenta/client/backend/variants/client.py @@ -1,19 +1,28 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions +from .types.add_variant_from_base_and_config_response import ( + AddVariantFromBaseAndConfigResponse, +) +from ..core.pydantic_utilities import parse_obj_as +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError from ..types.app_variant_response import AppVariantResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..types.variant_action import VariantAction +from ..types.docker_env_vars import DockerEnvVars +from ..types.uri import Uri +from ..core.serialization import convert_and_respect_annotation_metadata from ..types.app_variant_revision import AppVariantRevision -from ..types.config_dto import ConfigDto +from ..types.reference_request_model import ReferenceRequestModel from ..types.config_response_model import ConfigResponseModel +from ..types.config_dto import ConfigDto from ..types.reference_dto import ReferenceDto -from ..types.reference_request_model import ReferenceRequestModel -from .raw_client import AsyncRawVariantsClient, RawVariantsClient -from .types.add_variant_from_base_and_config_response import ( - AddVariantFromBaseAndConfigResponse, -) +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -21,18 +30,7 @@ class VariantsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawVariantsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawVariantsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawVariantsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def add_variant_from_base_and_config( self, @@ -41,7 +39,6 @@ def add_variant_from_base_and_config( new_variant_name: str, new_config_name: str, parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AddVariantFromBaseAndConfigResponse: """ @@ -67,8 +64,6 @@ def add_variant_from_base_and_config( parameters : typing.Dict[str, typing.Optional[typing.Any]] - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -83,6 +78,7 @@ def add_variant_from_base_and_config( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.add_variant_from_base_and_config( base_id="base_id", @@ -91,15 +87,44 @@ def add_variant_from_base_and_config( parameters={"key": "value"}, ) """ - _response = self._raw_client.add_variant_from_base_and_config( - base_id=base_id, - new_variant_name=new_variant_name, - new_config_name=new_config_name, - parameters=parameters, - commit_message=commit_message, + _response = self._client_wrapper.httpx_client.request( + "variants/from-base", + method="POST", + json={ + "base_id": base_id, + "new_variant_name": new_variant_name, + "new_config_name": new_config_name, + "parameters": parameters, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AddVariantFromBaseAndConfigResponse, + parse_obj_as( + type_=AddVariantFromBaseAndConfigResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_variant( self, @@ -126,24 +151,144 @@ def get_variant( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.get_variant( variant_id="variant_id", ) """ - _response = self._raw_client.get_variant( - variant_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantResponse, + parse_obj_as( + type_=AppVariantResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def start_variant( + self, + variant_id: str, + *, + action: VariantAction, + env_vars: typing.Optional[DockerEnvVars] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Uri: + """ + Start a variant of an app. + + Args: + variant_id (str): The ID of the variant to start. + action (VariantAction): The action to perform on the variant (start). + env_vars (Optional[DockerEnvVars], optional): The environment variables to inject to the Docker container. Defaults to None. + = + Returns: + URI: The URL of the started variant. + + Raises: + HTTPException: If the app container cannot be started. + + Parameters + ---------- + variant_id : str + + action : VariantAction + + env_vars : typing.Optional[DockerEnvVars] - def mark_variant_as_hidden( + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Uri + Successful Response + + Examples + -------- + from agenta import AgentaApi, VariantAction + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", + ) + client.variants.start_variant( + variant_id="variant_id", + action=VariantAction( + action="START", + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="PUT", + json={ + "action": convert_and_respect_annotation_metadata( + object_=action, annotation=VariantAction, direction="write" + ), + "env_vars": convert_and_respect_annotation_metadata( + object_=env_vars, annotation=DockerEnvVars, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Uri, + parse_obj_as( + type_=Uri, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def remove_variant( self, variant_id: str, *, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ - Mark a variant as hidden from the UI. + Remove a variant from the server. + In the case it's the last variant using the image, stop the container and remove the image. Arguments: app_variant -- AppVariant to remove @@ -169,22 +314,46 @@ def mark_variant_as_hidden( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.variants.mark_variant_as_hidden( + client.variants.remove_variant( variant_id="variant_id", ) """ - _response = self._raw_client.mark_variant_as_hidden( - variant_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_variant_parameters( self, variant_id: str, *, parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -206,8 +375,6 @@ def update_variant_parameters( parameters : typing.Dict[str, typing.Optional[typing.Any]] - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -222,27 +389,151 @@ def update_variant_parameters( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.update_variant_parameters( variant_id="variant_id", parameters={"key": "value"}, ) """ - _response = self._raw_client.update_variant_parameters( - variant_id, - parameters=parameters, - commit_message=commit_message, + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/parameters", + method="PUT", + json={ + "parameters": parameters, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def update_variant_image( + self, + variant_id: str, + *, + docker_id: str, + tags: str, + type: typing.Optional[str] = OMIT, + organization_id: typing.Optional[str] = OMIT, + workspace_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Updates the image used in an app variant. + + Args: + variant_id (str): The ID of the app variant to update. + image (Image): The image information to update. + + Raises: + HTTPException: If an error occurs while trying to update the app variant. + + Returns: + JSONResponse: A JSON response indicating whether the update was successful or not. + + Parameters + ---------- + variant_id : str + + docker_id : str + + tags : str + + type : typing.Optional[str] + + organization_id : typing.Optional[str] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from agenta import AgentaApi + + client = AgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - return _response.data + client.variants.update_variant_image( + variant_id="variant_id", + docker_id="docker_id", + tags="tags", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/image", + method="PUT", + json={ + "type": type, + "docker_id": docker_id, + "tags": tags, + "organization_id": organization_id, + "workspace_id": workspace_id, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_variant_url( self, variant_id: str, *, url: str, - update_variant_url_payload_variant_id: str, - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -264,10 +555,6 @@ def update_variant_url( url : str - update_variant_url_payload_variant_id : str - - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -282,28 +569,51 @@ def update_variant_url( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.update_variant_url( variant_id="variant_id", url="url", - update_variant_url_payload_variant_id="variant_id", ) """ - _response = self._raw_client.update_variant_url( - variant_id, - url=url, - update_variant_url_payload_variant_id=update_variant_url_payload_variant_id, - commit_message=commit_message, + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/service", + method="PUT", + params={ + "url": url, + }, request_options=request_options, ) - return _response.data - - def get_variant_revisions( + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def retrieve_variant_logs( self, variant_id: str, *, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AppVariantRevision]: + ) -> typing.Optional[typing.Any]: """ Parameters ---------- @@ -314,7 +624,7 @@ def get_variant_revisions( Returns ------- - typing.List[AppVariantRevision] + typing.Optional[typing.Any] Successful Response Examples @@ -323,36 +633,58 @@ def get_variant_revisions( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.variants.get_variant_revisions( + client.variants.retrieve_variant_logs( variant_id="variant_id", ) """ - _response = self._raw_client.get_variant_revisions( - variant_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/logs", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def get_variant_revision( + def get_variant_revisions( self, variant_id: str, - revision_number: int, *, request_options: typing.Optional[RequestOptions] = None, - ) -> AppVariantRevision: + ) -> typing.List[AppVariantRevision]: """ Parameters ---------- variant_id : str - revision_number : int - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AppVariantRevision + typing.List[AppVariantRevision] Successful Response Examples @@ -361,46 +693,61 @@ def get_variant_revision( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.variants.get_variant_revision( + client.variants.get_variant_revisions( variant_id="variant_id", - revision_number=1, ) """ - _response = self._raw_client.get_variant_revision( - variant_id, revision_number, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/revisions", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[AppVariantRevision], + parse_obj_as( + type_=typing.List[AppVariantRevision], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - def mark_variant_revision_as_hidden( + def get_variant_revision( self, variant_id: str, - revision_id: str, + revision_number: int, *, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: + ) -> AppVariantRevision: """ - Mark a variant revision as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - revision_id -- Revision ID to remove - - Raises: - HTTPException: If there is a problem removing the app variant - Parameters ---------- variant_id : str - revision_id : str + revision_number : int request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.Optional[typing.Any] + AppVariantRevision Successful Response Examples @@ -409,16 +756,41 @@ def mark_variant_revision_as_hidden( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - client.variants.mark_variant_revision_as_hidden( + client.variants.get_variant_revision( variant_id="variant_id", - revision_id="revision_id", + revision_number=1, ) """ - _response = self._raw_client.mark_variant_revision_as_hidden( - variant_id, revision_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_number)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantRevision, + parse_obj_as( + type_=AppVariantRevision, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_add( self, @@ -448,18 +820,57 @@ def configs_add( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_add( variant_ref=ReferenceRequestModel(), application_ref=ReferenceRequestModel(), ) """ - _response = self._raw_client.configs_add( - variant_ref=variant_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/add", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_fetch( self, @@ -470,23 +881,6 @@ def configs_fetch( request_options: typing.Optional[RequestOptions] = None, ) -> ConfigResponseModel: """ - Fetch configuration for a variant or environment. - - Either variant_ref OR environment_ref must be provided (if neither is provided, - a default environment_ref with slug="production" will be used). - - For each reference object (variant_ref, environment_ref, application_ref): - - Provide either 'slug' or 'id' field - - 'version' is optional and can be set to null - - If 'id' is provided, it will be used directly to fetch the resource - - Otherwise, 'slug' will be used along with application_ref - - Returns: - ConfigResponseModel: The configuration for the requested variant or environment. - - Raises: - HTTPException: If the configuration is not found. - Parameters ---------- variant_ref : typing.Optional[ReferenceRequestModel] @@ -509,16 +903,59 @@ def configs_fetch( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_fetch() """ - _response = self._raw_client.configs_fetch( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/fetch", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_fork( self, @@ -551,16 +988,59 @@ def configs_fork( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_fork() """ - _response = self._raw_client.configs_fork( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/fork", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_commit( self, @@ -587,6 +1067,7 @@ def configs_commit( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_commit( config=ConfigDto( @@ -594,10 +1075,43 @@ def configs_commit( ), ) """ - _response = self._raw_client.configs_commit( - config=config, request_options=request_options - ) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "variants/configs/commit", + method="POST", + json={ + "config": convert_and_respect_annotation_metadata( + object_=config, annotation=ConfigDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_deploy( self, @@ -630,19 +1144,62 @@ def configs_deploy( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_deploy( variant_ref=ReferenceRequestModel(), environment_ref=ReferenceRequestModel(), ) """ - _response = self._raw_client.configs_deploy( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/deploy", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_delete( self, @@ -672,17 +1229,56 @@ def configs_delete( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_delete( variant_ref=ReferenceRequestModel(), ) """ - _response = self._raw_client.configs_delete( - variant_ref=variant_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/delete", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_list( self, @@ -709,15 +1305,49 @@ def configs_list( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_list( application_ref=ReferenceDto(), ) """ - _response = self._raw_client.configs_list( - application_ref=application_ref, request_options=request_options - ) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "variants/configs/list", + method="POST", + json={ + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, annotation=ReferenceDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ConfigResponseModel], + parse_obj_as( + type_=typing.List[ConfigResponseModel], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def configs_history( self, @@ -747,33 +1377,61 @@ def configs_history( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.variants.configs_history( variant_ref=ReferenceRequestModel(), ) """ - _response = self._raw_client.configs_history( - variant_ref=variant_ref, - application_ref=application_ref, + _response = self._client_wrapper.httpx_client.request( + "variants/configs/history", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ConfigResponseModel], + parse_obj_as( + type_=typing.List[ConfigResponseModel], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncVariantsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawVariantsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawVariantsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawVariantsClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def add_variant_from_base_and_config( self, @@ -782,7 +1440,6 @@ async def add_variant_from_base_and_config( new_variant_name: str, new_config_name: str, parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AddVariantFromBaseAndConfigResponse: """ @@ -808,8 +1465,6 @@ async def add_variant_from_base_and_config( parameters : typing.Dict[str, typing.Optional[typing.Any]] - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -826,6 +1481,7 @@ async def add_variant_from_base_and_config( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -840,15 +1496,44 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.add_variant_from_base_and_config( - base_id=base_id, - new_variant_name=new_variant_name, - new_config_name=new_config_name, - parameters=parameters, - commit_message=commit_message, + _response = await self._client_wrapper.httpx_client.request( + "variants/from-base", + method="POST", + json={ + "base_id": base_id, + "new_variant_name": new_variant_name, + "new_config_name": new_config_name, + "parameters": parameters, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AddVariantFromBaseAndConfigResponse, + parse_obj_as( + type_=AddVariantFromBaseAndConfigResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_variant( self, @@ -877,6 +1562,7 @@ async def get_variant( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -888,19 +1574,146 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_variant( - variant_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantResponse, + parse_obj_as( + type_=AppVariantResponse, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def start_variant( + self, + variant_id: str, + *, + action: VariantAction, + env_vars: typing.Optional[DockerEnvVars] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Uri: + """ + Start a variant of an app. + + Args: + variant_id (str): The ID of the variant to start. + action (VariantAction): The action to perform on the variant (start). + env_vars (Optional[DockerEnvVars], optional): The environment variables to inject to the Docker container. Defaults to None. + = + Returns: + URI: The URL of the started variant. + + Raises: + HTTPException: If the app container cannot be started. + + Parameters + ---------- + variant_id : str + + action : VariantAction + + env_vars : typing.Optional[DockerEnvVars] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Uri + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi, VariantAction + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - return _response.data - async def mark_variant_as_hidden( + + async def main() -> None: + await client.variants.start_variant( + variant_id="variant_id", + action=VariantAction( + action="START", + ), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="PUT", + json={ + "action": convert_and_respect_annotation_metadata( + object_=action, annotation=VariantAction, direction="write" + ), + "env_vars": convert_and_respect_annotation_metadata( + object_=env_vars, annotation=DockerEnvVars, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Uri, + parse_obj_as( + type_=Uri, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def remove_variant( self, variant_id: str, *, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ - Mark a variant as hidden from the UI. + Remove a variant from the server. + In the case it's the last variant using the image, stop the container and remove the image. Arguments: app_variant -- AppVariant to remove @@ -928,28 +1741,52 @@ async def mark_variant_as_hidden( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.variants.mark_variant_as_hidden( + await client.variants.remove_variant( variant_id="variant_id", ) asyncio.run(main()) """ - _response = await self._raw_client.mark_variant_as_hidden( - variant_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_variant_parameters( self, variant_id: str, *, parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -971,8 +1808,6 @@ async def update_variant_parameters( parameters : typing.Dict[str, typing.Optional[typing.Any]] - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -989,6 +1824,7 @@ async def update_variant_parameters( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1001,21 +1837,152 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_variant_parameters( - variant_id, - parameters=parameters, - commit_message=commit_message, + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/parameters", + method="PUT", + json={ + "parameters": parameters, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def update_variant_image( + self, + variant_id: str, + *, + docker_id: str, + tags: str, + type: typing.Optional[str] = OMIT, + organization_id: typing.Optional[str] = OMIT, + workspace_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Optional[typing.Any]: + """ + Updates the image used in an app variant. + + Args: + variant_id (str): The ID of the app variant to update. + image (Image): The image information to update. + + Raises: + HTTPException: If an error occurs while trying to update the app variant. + + Returns: + JSONResponse: A JSON response indicating whether the update was successful or not. + + Parameters + ---------- + variant_id : str + + docker_id : str + + tags : str + + type : typing.Optional[str] + + organization_id : typing.Optional[str] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from agenta import AsyncAgentaApi + + client = AsyncAgentaApi( + api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) - return _response.data + + + async def main() -> None: + await client.variants.update_variant_image( + variant_id="variant_id", + docker_id="docker_id", + tags="tags", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/image", + method="PUT", + json={ + "type": type, + "docker_id": docker_id, + "tags": tags, + "organization_id": organization_id, + "workspace_id": workspace_id, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_variant_url( self, variant_id: str, *, url: str, - update_variant_url_payload_variant_id: str, - commit_message: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ @@ -1037,10 +2004,6 @@ async def update_variant_url( url : str - update_variant_url_payload_variant_id : str - - commit_message : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1057,6 +2020,7 @@ async def update_variant_url( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1064,27 +2028,49 @@ async def main() -> None: await client.variants.update_variant_url( variant_id="variant_id", url="url", - update_variant_url_payload_variant_id="variant_id", ) asyncio.run(main()) """ - _response = await self._raw_client.update_variant_url( - variant_id, - url=url, - update_variant_url_payload_variant_id=update_variant_url_payload_variant_id, - commit_message=commit_message, + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/service", + method="PUT", + params={ + "url": url, + }, request_options=request_options, ) - return _response.data - - async def get_variant_revisions( + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def retrieve_variant_logs( self, variant_id: str, *, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AppVariantRevision]: + ) -> typing.Optional[typing.Any]: """ Parameters ---------- @@ -1095,7 +2081,7 @@ async def get_variant_revisions( Returns ------- - typing.List[AppVariantRevision] + typing.Optional[typing.Any] Successful Response Examples @@ -1106,42 +2092,64 @@ async def get_variant_revisions( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.variants.get_variant_revisions( + await client.variants.retrieve_variant_logs( variant_id="variant_id", ) asyncio.run(main()) """ - _response = await self._raw_client.get_variant_revisions( - variant_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/logs", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_variant_revision( + async def get_variant_revisions( self, variant_id: str, - revision_number: int, *, request_options: typing.Optional[RequestOptions] = None, - ) -> AppVariantRevision: + ) -> typing.List[AppVariantRevision]: """ Parameters ---------- variant_id : str - revision_number : int - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AppVariantRevision + typing.List[AppVariantRevision] Successful Response Examples @@ -1152,52 +2160,67 @@ async def get_variant_revision( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.variants.get_variant_revision( + await client.variants.get_variant_revisions( variant_id="variant_id", - revision_number=1, ) asyncio.run(main()) """ - _response = await self._raw_client.get_variant_revision( - variant_id, revision_number, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/revisions", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[AppVariantRevision], + parse_obj_as( + type_=typing.List[AppVariantRevision], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - async def mark_variant_revision_as_hidden( + async def get_variant_revision( self, variant_id: str, - revision_id: str, + revision_number: int, *, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Optional[typing.Any]: + ) -> AppVariantRevision: """ - Mark a variant revision as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - revision_id -- Revision ID to remove - - Raises: - HTTPException: If there is a problem removing the app variant - Parameters ---------- variant_id : str - revision_id : str + revision_number : int request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.Optional[typing.Any] + AppVariantRevision Successful Response Examples @@ -1208,22 +2231,47 @@ async def mark_variant_revision_as_hidden( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: - await client.variants.mark_variant_revision_as_hidden( + await client.variants.get_variant_revision( variant_id="variant_id", - revision_id="revision_id", + revision_number=1, ) asyncio.run(main()) """ - _response = await self._raw_client.mark_variant_revision_as_hidden( - variant_id, revision_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_number)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AppVariantRevision, + parse_obj_as( + type_=AppVariantRevision, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_add( self, @@ -1255,6 +2303,7 @@ async def configs_add( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1267,12 +2316,50 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_add( - variant_ref=variant_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/add", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_fetch( self, @@ -1283,23 +2370,6 @@ async def configs_fetch( request_options: typing.Optional[RequestOptions] = None, ) -> ConfigResponseModel: """ - Fetch configuration for a variant or environment. - - Either variant_ref OR environment_ref must be provided (if neither is provided, - a default environment_ref with slug="production" will be used). - - For each reference object (variant_ref, environment_ref, application_ref): - - Provide either 'slug' or 'id' field - - 'version' is optional and can be set to null - - If 'id' is provided, it will be used directly to fetch the resource - - Otherwise, 'slug' will be used along with application_ref - - Returns: - ConfigResponseModel: The configuration for the requested variant or environment. - - Raises: - HTTPException: If the configuration is not found. - Parameters ---------- variant_ref : typing.Optional[ReferenceRequestModel] @@ -1324,6 +2394,7 @@ async def configs_fetch( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1333,13 +2404,55 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_fetch( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/fetch", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_fork( self, @@ -1374,6 +2487,7 @@ async def configs_fork( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1383,13 +2497,55 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_fork( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/fork", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_commit( self, @@ -1418,6 +2574,7 @@ async def configs_commit( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1431,10 +2588,43 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_commit( - config=config, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/commit", + method="POST", + json={ + "config": convert_and_respect_annotation_metadata( + object_=config, annotation=ConfigDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_deploy( self, @@ -1469,6 +2659,7 @@ async def configs_deploy( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1481,13 +2672,55 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_deploy( - variant_ref=variant_ref, - environment_ref=environment_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/deploy", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "environment_ref": convert_and_respect_annotation_metadata( + object_=environment_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ConfigResponseModel, + parse_obj_as( + type_=ConfigResponseModel, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_delete( self, @@ -1519,6 +2752,7 @@ async def configs_delete( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1530,12 +2764,50 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_delete( - variant_ref=variant_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/delete", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + int, + parse_obj_as( + type_=int, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_list( self, @@ -1564,6 +2836,7 @@ async def configs_list( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1575,10 +2848,43 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_list( - application_ref=application_ref, request_options=request_options - ) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/list", + method="POST", + json={ + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, annotation=ReferenceDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ConfigResponseModel], + parse_obj_as( + type_=typing.List[ConfigResponseModel], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def configs_history( self, @@ -1610,6 +2916,7 @@ async def configs_history( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -1621,9 +2928,47 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.configs_history( - variant_ref=variant_ref, - application_ref=application_ref, + _response = await self._client_wrapper.httpx_client.request( + "variants/configs/history", + method="POST", + json={ + "variant_ref": convert_and_respect_annotation_metadata( + object_=variant_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + "application_ref": convert_and_respect_annotation_metadata( + object_=application_ref, + annotation=ReferenceRequestModel, + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, - ) - return _response.data + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[ConfigResponseModel], + parse_obj_as( + type_=typing.List[ConfigResponseModel], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/variants/raw_client.py b/sdk/agenta/client/backend/variants/raw_client.py deleted file mode 100644 index f019a42c54..0000000000 --- a/sdk/agenta/client/backend/variants/raw_client.py +++ /dev/null @@ -1,2482 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.app_variant_response import AppVariantResponse -from ..types.app_variant_revision import AppVariantRevision -from ..types.config_dto import ConfigDto -from ..types.config_response_model import ConfigResponseModel -from ..types.http_validation_error import HttpValidationError -from ..types.reference_dto import ReferenceDto -from ..types.reference_request_model import ReferenceRequestModel -from .types.add_variant_from_base_and_config_response import ( - AddVariantFromBaseAndConfigResponse, -) - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawVariantsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def add_variant_from_base_and_config( - self, - *, - base_id: str, - new_variant_name: str, - new_config_name: str, - parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AddVariantFromBaseAndConfigResponse]: - """ - Add a new variant based on an existing one. - Same as POST /config - - Args: - payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters. - - Raises: - HTTPException: Raised if the variant could not be added or accessed. - - Returns: - Union[AppVariantResponse, Any]: New variant details or exception. - - Parameters - ---------- - base_id : str - - new_variant_name : str - - new_config_name : str - - parameters : typing.Dict[str, typing.Optional[typing.Any]] - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AddVariantFromBaseAndConfigResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/from-base", - method="POST", - json={ - "base_id": base_id, - "new_variant_name": new_variant_name, - "new_config_name": new_config_name, - "parameters": parameters, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AddVariantFromBaseAndConfigResponse, - parse_obj_as( - type_=AddVariantFromBaseAndConfigResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AppVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AppVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantResponse, - parse_obj_as( - type_=AppVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def mark_variant_as_hidden( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Mark a variant as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - - Raises: - HTTPException: If there is a problem removing the app variant - - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_variant_parameters( - self, - variant_id: str, - *, - parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Updates the parameters for an app variant. - - Args: - variant_id (str): The ID of the app variant to update. - payload (UpdateVariantParameterPayload): The payload containing the updated parameters. - - Raises: - HTTPException: If there is an error while trying to update the app variant. - - Returns: - JSONResponse: A JSON response containing the updated app variant parameters. - - Parameters - ---------- - variant_id : str - - parameters : typing.Dict[str, typing.Optional[typing.Any]] - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/parameters", - method="PUT", - json={ - "parameters": parameters, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_variant_url( - self, - variant_id: str, - *, - url: str, - update_variant_url_payload_variant_id: str, - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Updates the URL used in an app variant. - - Args: - variant_id (str): The ID of the app variant to update. - url (str): The URL to update. - - Raises: - HTTPException: If an error occurs while trying to update the app variant. - - Returns: - JSONResponse: A JSON response indicating whether the update was successful or not. - - Parameters - ---------- - variant_id : str - - url : str - - update_variant_url_payload_variant_id : str - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/service", - method="PUT", - json={ - "url": url, - "variant_id": update_variant_url_payload_variant_id, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_variant_revisions( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[AppVariantRevision]]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[AppVariantRevision]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[AppVariantRevision], - parse_obj_as( - type_=typing.List[AppVariantRevision], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_variant_revision( - self, - variant_id: str, - revision_number: int, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[AppVariantRevision]: - """ - Parameters - ---------- - variant_id : str - - revision_number : int - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[AppVariantRevision] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_number)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantRevision, - parse_obj_as( - type_=AppVariantRevision, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def mark_variant_revision_as_hidden( - self, - variant_id: str, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Mark a variant revision as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - revision_id -- Revision ID to remove - - Raises: - HTTPException: If there is a problem removing the app variant - - Parameters - ---------- - variant_id : str - - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_add( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: ReferenceRequestModel, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : ReferenceRequestModel - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ConfigResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/add", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_fetch( - self, - *, - variant_ref: typing.Optional[ReferenceRequestModel] = OMIT, - environment_ref: typing.Optional[ReferenceRequestModel] = OMIT, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ConfigResponseModel]: - """ - Fetch configuration for a variant or environment. - - Either variant_ref OR environment_ref must be provided (if neither is provided, - a default environment_ref with slug="production" will be used). - - For each reference object (variant_ref, environment_ref, application_ref): - - Provide either 'slug' or 'id' field - - 'version' is optional and can be set to null - - If 'id' is provided, it will be used directly to fetch the resource - - Otherwise, 'slug' will be used along with application_ref - - Returns: - ConfigResponseModel: The configuration for the requested variant or environment. - - Raises: - HTTPException: If the configuration is not found. - - Parameters - ---------- - variant_ref : typing.Optional[ReferenceRequestModel] - - environment_ref : typing.Optional[ReferenceRequestModel] - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ConfigResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/fetch", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_fork( - self, - *, - variant_ref: typing.Optional[ReferenceRequestModel] = OMIT, - environment_ref: typing.Optional[ReferenceRequestModel] = OMIT, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : typing.Optional[ReferenceRequestModel] - - environment_ref : typing.Optional[ReferenceRequestModel] - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ConfigResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/fork", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_commit( - self, - *, - config: ConfigDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - config : ConfigDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ConfigResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/commit", - method="POST", - json={ - "config": convert_and_respect_annotation_metadata( - object_=config, annotation=ConfigDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_deploy( - self, - *, - variant_ref: ReferenceRequestModel, - environment_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - environment_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ConfigResponseModel] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/deploy", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_delete( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[int]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[int] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/delete", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - int, - parse_obj_as( - type_=int, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_list( - self, - *, - application_ref: ReferenceDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[ConfigResponseModel]]: - """ - Parameters - ---------- - application_ref : ReferenceDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[ConfigResponseModel]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/list", - method="POST", - json={ - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, annotation=ReferenceDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ConfigResponseModel], - parse_obj_as( - type_=typing.List[ConfigResponseModel], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def configs_history( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.List[ConfigResponseModel]]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[ConfigResponseModel]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "variants/configs/history", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ConfigResponseModel], - parse_obj_as( - type_=typing.List[ConfigResponseModel], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawVariantsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def add_variant_from_base_and_config( - self, - *, - base_id: str, - new_variant_name: str, - new_config_name: str, - parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AddVariantFromBaseAndConfigResponse]: - """ - Add a new variant based on an existing one. - Same as POST /config - - Args: - payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters. - - Raises: - HTTPException: Raised if the variant could not be added or accessed. - - Returns: - Union[AppVariantResponse, Any]: New variant details or exception. - - Parameters - ---------- - base_id : str - - new_variant_name : str - - new_config_name : str - - parameters : typing.Dict[str, typing.Optional[typing.Any]] - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AddVariantFromBaseAndConfigResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/from-base", - method="POST", - json={ - "base_id": base_id, - "new_variant_name": new_variant_name, - "new_config_name": new_config_name, - "parameters": parameters, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AddVariantFromBaseAndConfigResponse, - parse_obj_as( - type_=AddVariantFromBaseAndConfigResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AppVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AppVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantResponse, - parse_obj_as( - type_=AppVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def mark_variant_as_hidden( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Mark a variant as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - - Raises: - HTTPException: If there is a problem removing the app variant - - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_variant_parameters( - self, - variant_id: str, - *, - parameters: typing.Dict[str, typing.Optional[typing.Any]], - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Updates the parameters for an app variant. - - Args: - variant_id (str): The ID of the app variant to update. - payload (UpdateVariantParameterPayload): The payload containing the updated parameters. - - Raises: - HTTPException: If there is an error while trying to update the app variant. - - Returns: - JSONResponse: A JSON response containing the updated app variant parameters. - - Parameters - ---------- - variant_id : str - - parameters : typing.Dict[str, typing.Optional[typing.Any]] - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/parameters", - method="PUT", - json={ - "parameters": parameters, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_variant_url( - self, - variant_id: str, - *, - url: str, - update_variant_url_payload_variant_id: str, - commit_message: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Updates the URL used in an app variant. - - Args: - variant_id (str): The ID of the app variant to update. - url (str): The URL to update. - - Raises: - HTTPException: If an error occurs while trying to update the app variant. - - Returns: - JSONResponse: A JSON response indicating whether the update was successful or not. - - Parameters - ---------- - variant_id : str - - url : str - - update_variant_url_payload_variant_id : str - - commit_message : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/service", - method="PUT", - json={ - "url": url, - "variant_id": update_variant_url_payload_variant_id, - "commit_message": commit_message, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_variant_revisions( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[AppVariantRevision]]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[AppVariantRevision]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[AppVariantRevision], - parse_obj_as( - type_=typing.List[AppVariantRevision], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_variant_revision( - self, - variant_id: str, - revision_number: int, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[AppVariantRevision]: - """ - Parameters - ---------- - variant_id : str - - revision_number : int - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[AppVariantRevision] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_number)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - AppVariantRevision, - parse_obj_as( - type_=AppVariantRevision, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def mark_variant_revision_as_hidden( - self, - variant_id: str, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Mark a variant revision as hidden from the UI. - - Arguments: - app_variant -- AppVariant to remove - revision_id -- Revision ID to remove - - Raises: - HTTPException: If there is a problem removing the app variant - - Parameters - ---------- - variant_id : str - - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"variants/{jsonable_encoder(variant_id)}/revisions/{jsonable_encoder(revision_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_add( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: ReferenceRequestModel, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : ReferenceRequestModel - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ConfigResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/add", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_fetch( - self, - *, - variant_ref: typing.Optional[ReferenceRequestModel] = OMIT, - environment_ref: typing.Optional[ReferenceRequestModel] = OMIT, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ConfigResponseModel]: - """ - Fetch configuration for a variant or environment. - - Either variant_ref OR environment_ref must be provided (if neither is provided, - a default environment_ref with slug="production" will be used). - - For each reference object (variant_ref, environment_ref, application_ref): - - Provide either 'slug' or 'id' field - - 'version' is optional and can be set to null - - If 'id' is provided, it will be used directly to fetch the resource - - Otherwise, 'slug' will be used along with application_ref - - Returns: - ConfigResponseModel: The configuration for the requested variant or environment. - - Raises: - HTTPException: If the configuration is not found. - - Parameters - ---------- - variant_ref : typing.Optional[ReferenceRequestModel] - - environment_ref : typing.Optional[ReferenceRequestModel] - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ConfigResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/fetch", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_fork( - self, - *, - variant_ref: typing.Optional[ReferenceRequestModel] = OMIT, - environment_ref: typing.Optional[ReferenceRequestModel] = OMIT, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : typing.Optional[ReferenceRequestModel] - - environment_ref : typing.Optional[ReferenceRequestModel] - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ConfigResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/fork", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_commit( - self, - *, - config: ConfigDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - config : ConfigDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ConfigResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/commit", - method="POST", - json={ - "config": convert_and_respect_annotation_metadata( - object_=config, annotation=ConfigDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_deploy( - self, - *, - variant_ref: ReferenceRequestModel, - environment_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ConfigResponseModel]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - environment_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ConfigResponseModel] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/deploy", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "environment_ref": convert_and_respect_annotation_metadata( - object_=environment_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ConfigResponseModel, - parse_obj_as( - type_=ConfigResponseModel, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_delete( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[int]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[int] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/delete", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - int, - parse_obj_as( - type_=int, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_list( - self, - *, - application_ref: ReferenceDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[ConfigResponseModel]]: - """ - Parameters - ---------- - application_ref : ReferenceDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[ConfigResponseModel]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/list", - method="POST", - json={ - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, annotation=ReferenceDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ConfigResponseModel], - parse_obj_as( - type_=typing.List[ConfigResponseModel], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def configs_history( - self, - *, - variant_ref: ReferenceRequestModel, - application_ref: typing.Optional[ReferenceRequestModel] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.List[ConfigResponseModel]]: - """ - Parameters - ---------- - variant_ref : ReferenceRequestModel - - application_ref : typing.Optional[ReferenceRequestModel] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[ConfigResponseModel]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "variants/configs/history", - method="POST", - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - "application_ref": convert_and_respect_annotation_metadata( - object_=application_ref, - annotation=ReferenceRequestModel, - direction="write", - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[ConfigResponseModel], - parse_obj_as( - type_=typing.List[ConfigResponseModel], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/variants/types/__init__.py b/sdk/agenta/client/backend/variants/types/__init__.py index 50e843ee3f..fac6b42753 100644 --- a/sdk/agenta/client/backend/variants/types/__init__.py +++ b/sdk/agenta/client/backend/variants/types/__init__.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -# isort: skip_file - from .add_variant_from_base_and_config_response import ( AddVariantFromBaseAndConfigResponse, ) diff --git a/sdk/agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py b/sdk/agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py index 81c25ed063..0b9252e08b 100644 --- a/sdk/agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +++ b/sdk/agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py @@ -1,7 +1,6 @@ # This file was auto-generated by Fern from our API Definition. import typing - from ...types.app_variant_response import AppVariantResponse AddVariantFromBaseAndConfigResponse = typing.Union[ diff --git a/sdk/agenta/client/backend/vault/__init__.py b/sdk/agenta/client/backend/vault/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/vault/__init__.py +++ b/sdk/agenta/client/backend/vault/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/vault/client.py b/sdk/agenta/client/backend/vault/client.py index 8a199d26cc..847cf0fc0b 100644 --- a/sdk/agenta/client/backend/vault/client.py +++ b/sdk/agenta/client/backend/vault/client.py @@ -1,13 +1,19 @@ # This file was auto-generated by Fern from our API Definition. import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.client_wrapper import SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.header import Header -from ..types.secret_dto import SecretDto from ..types.secret_response_dto import SecretResponseDto -from .raw_client import AsyncRawVaultClient, RawVaultClient +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.header_dto import HeaderDto +from ..types.secret_dto import SecretDto +from ..core.serialization import convert_and_respect_annotation_metadata +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..core.jsonable_encoder import jsonable_encoder +from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -15,18 +21,7 @@ class VaultClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawVaultClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawVaultClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawVaultClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def list_secrets( self, *, request_options: typing.Optional[RequestOptions] = None @@ -48,23 +43,40 @@ def list_secrets( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.vault.list_secrets() """ - _response = self._raw_client.list_secrets(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "vault/v1/secrets", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[SecretResponseDto], + parse_obj_as( + type_=typing.List[SecretResponseDto], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def create_secret( self, *, - header: Header, + header: HeaderDto, secret: SecretDto, request_options: typing.Optional[RequestOptions] = None, ) -> SecretResponseDto: """ Parameters ---------- - header : Header + header : HeaderDto secret : SecretDto @@ -80,7 +92,7 @@ def create_secret( -------- from agenta import ( AgentaApi, - Header, + HeaderDto, SecretDto, StandardProviderDto, StandardProviderSettingsDto, @@ -88,9 +100,10 @@ def create_secret( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.vault.create_secret( - header=Header(), + header=HeaderDto(), secret=SecretDto( kind="provider_key", data=StandardProviderDto( @@ -102,10 +115,46 @@ def create_secret( ), ) """ - _response = self._raw_client.create_secret( - header=header, secret=secret, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "vault/v1/secrets", + method="POST", + json={ + "header": convert_and_respect_annotation_metadata( + object_=header, annotation=HeaderDto, direction="write" + ), + "secret": convert_and_respect_annotation_metadata( + object_=secret, annotation=SecretDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def read_secret( self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -129,21 +178,46 @@ def read_secret( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.vault.read_secret( secret_id="secret_id", ) """ - _response = self._raw_client.read_secret( - secret_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def update_secret( self, secret_id: str, *, - header: typing.Optional[Header] = OMIT, + header: typing.Optional[HeaderDto] = OMIT, secret: typing.Optional[SecretDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SecretResponseDto: @@ -152,7 +226,7 @@ def update_secret( ---------- secret_id : str - header : typing.Optional[Header] + header : typing.Optional[HeaderDto] secret : typing.Optional[SecretDto] @@ -170,15 +244,52 @@ def update_secret( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.vault.update_secret( secret_id="secret_id", ) """ - _response = self._raw_client.update_secret( - secret_id, header=header, secret=secret, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="PUT", + json={ + "header": convert_and_respect_annotation_metadata( + object_=header, annotation=HeaderDto, direction="write" + ), + "secret": convert_and_respect_annotation_metadata( + object_=secret, annotation=SecretDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def delete_secret( self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -201,31 +312,39 @@ def delete_secret( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.vault.delete_secret( secret_id="secret_id", ) """ - _response = self._raw_client.delete_secret( - secret_id, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncVaultClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawVaultClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawVaultClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawVaultClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def list_secrets( self, *, request_options: typing.Optional[RequestOptions] = None @@ -249,6 +368,7 @@ async def list_secrets( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -258,20 +378,36 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.list_secrets(request_options=request_options) - return _response.data + _response = await self._client_wrapper.httpx_client.request( + "vault/v1/secrets", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[SecretResponseDto], + parse_obj_as( + type_=typing.List[SecretResponseDto], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def create_secret( self, *, - header: Header, + header: HeaderDto, secret: SecretDto, request_options: typing.Optional[RequestOptions] = None, ) -> SecretResponseDto: """ Parameters ---------- - header : Header + header : HeaderDto secret : SecretDto @@ -289,7 +425,7 @@ async def create_secret( from agenta import ( AsyncAgentaApi, - Header, + HeaderDto, SecretDto, StandardProviderDto, StandardProviderSettingsDto, @@ -297,12 +433,13 @@ async def create_secret( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) async def main() -> None: await client.vault.create_secret( - header=Header(), + header=HeaderDto(), secret=SecretDto( kind="provider_key", data=StandardProviderDto( @@ -317,10 +454,46 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_secret( - header=header, secret=secret, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "vault/v1/secrets", + method="POST", + json={ + "header": convert_and_respect_annotation_metadata( + object_=header, annotation=HeaderDto, direction="write" + ), + "secret": convert_and_respect_annotation_metadata( + object_=secret, annotation=SecretDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def read_secret( self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -346,6 +519,7 @@ async def read_secret( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -357,16 +531,40 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.read_secret( - secret_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def update_secret( self, secret_id: str, *, - header: typing.Optional[Header] = OMIT, + header: typing.Optional[HeaderDto] = OMIT, secret: typing.Optional[SecretDto] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SecretResponseDto: @@ -375,7 +573,7 @@ async def update_secret( ---------- secret_id : str - header : typing.Optional[Header] + header : typing.Optional[HeaderDto] secret : typing.Optional[SecretDto] @@ -395,6 +593,7 @@ async def update_secret( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -406,10 +605,46 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.update_secret( - secret_id, header=header, secret=secret, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="PUT", + json={ + "header": convert_and_respect_annotation_metadata( + object_=header, annotation=HeaderDto, direction="write" + ), + "secret": convert_and_respect_annotation_metadata( + object_=secret, annotation=SecretDto, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + SecretResponseDto, + parse_obj_as( + type_=SecretResponseDto, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def delete_secret( self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -434,6 +669,7 @@ async def delete_secret( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -445,7 +681,25 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_secret( - secret_id, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"vault/v1/secrets/{jsonable_encoder(secret_id)}", + method="DELETE", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/vault/raw_client.py b/sdk/agenta/client/backend/vault/raw_client.py deleted file mode 100644 index 67afe3a2c0..0000000000 --- a/sdk/agenta/client/backend/vault/raw_client.py +++ /dev/null @@ -1,616 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.header import Header -from ..types.http_validation_error import HttpValidationError -from ..types.secret_dto import SecretDto -from ..types.secret_response_dto import SecretResponseDto - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawVaultClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_secrets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[SecretResponseDto]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[SecretResponseDto]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "vault/v1/secrets/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[SecretResponseDto], - parse_obj_as( - type_=typing.List[SecretResponseDto], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_secret( - self, - *, - header: Header, - secret: SecretDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - header : Header - - secret : SecretDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[SecretResponseDto] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "vault/v1/secrets/", - method="POST", - json={ - "header": convert_and_respect_annotation_metadata( - object_=header, annotation=Header, direction="write" - ), - "secret": convert_and_respect_annotation_metadata( - object_=secret, annotation=SecretDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def read_secret( - self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - secret_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[SecretResponseDto] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def update_secret( - self, - secret_id: str, - *, - header: typing.Optional[Header] = OMIT, - secret: typing.Optional[SecretDto] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - secret_id : str - - header : typing.Optional[Header] - - secret : typing.Optional[SecretDto] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[SecretResponseDto] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="PUT", - json={ - "header": convert_and_respect_annotation_metadata( - object_=header, annotation=Header, direction="write" - ), - "secret": convert_and_respect_annotation_metadata( - object_=secret, annotation=SecretDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def delete_secret( - self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[None]: - """ - Parameters - ---------- - secret_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[None] - """ - _response = self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return HttpResponse(response=_response, data=None) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawVaultClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_secrets( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[SecretResponseDto]]: - """ - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[SecretResponseDto]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "vault/v1/secrets/", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[SecretResponseDto], - parse_obj_as( - type_=typing.List[SecretResponseDto], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_secret( - self, - *, - header: Header, - secret: SecretDto, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - header : Header - - secret : SecretDto - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[SecretResponseDto] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "vault/v1/secrets/", - method="POST", - json={ - "header": convert_and_respect_annotation_metadata( - object_=header, annotation=Header, direction="write" - ), - "secret": convert_and_respect_annotation_metadata( - object_=secret, annotation=SecretDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def read_secret( - self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - secret_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[SecretResponseDto] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def update_secret( - self, - secret_id: str, - *, - header: typing.Optional[Header] = OMIT, - secret: typing.Optional[SecretDto] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[SecretResponseDto]: - """ - Parameters - ---------- - secret_id : str - - header : typing.Optional[Header] - - secret : typing.Optional[SecretDto] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[SecretResponseDto] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="PUT", - json={ - "header": convert_and_respect_annotation_metadata( - object_=header, annotation=Header, direction="write" - ), - "secret": convert_and_respect_annotation_metadata( - object_=secret, annotation=SecretDto, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - SecretResponseDto, - parse_obj_as( - type_=SecretResponseDto, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def delete_secret( - self, secret_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[None]: - """ - Parameters - ---------- - secret_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[None] - """ - _response = await self._client_wrapper.httpx_client.request( - f"vault/v1/secrets/{jsonable_encoder(secret_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return AsyncHttpResponse(response=_response, data=None) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/workflows/__init__.py b/sdk/agenta/client/backend/workflows/__init__.py deleted file mode 100644 index dadae709c6..0000000000 --- a/sdk/agenta/client/backend/workflows/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/workflows/client.py b/sdk/agenta/client/backend/workflows/client.py deleted file mode 100644 index f0cc5a7063..0000000000 --- a/sdk/agenta/client/backend/workflows/client.py +++ /dev/null @@ -1,2398 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.reference import Reference -from ..types.workflow_artifact import WorkflowArtifact -from ..types.workflow_response import WorkflowResponse -from ..types.workflow_revision import WorkflowRevision -from ..types.workflow_revision_response import WorkflowRevisionResponse -from ..types.workflow_revisions_response import WorkflowRevisionsResponse -from ..types.workflow_variant import WorkflowVariant -from ..types.workflow_variant_response import WorkflowVariantResponse -from ..types.workflow_variants_response import WorkflowVariantsResponse -from ..types.workflows_response import WorkflowsResponse -from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class WorkflowsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawWorkflowsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawWorkflowsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawWorkflowsClient - """ - return self._raw_client - - def list_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.list_workflows() - """ - _response = self._raw_client.list_workflows( - workflow_ref=workflow_ref, - workflow_flags=workflow_flags, - workflow_meta=workflow_meta, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def create_workflow( - self, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowArtifact - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.create_workflow( - workflow=WorkflowArtifact(), - ) - """ - _response = self._raw_client.create_workflow( - workflow=workflow, request_options=request_options - ) - return _response.data - - def fetch_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.fetch_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - """ - _response = self._raw_client.fetch_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - def edit_workflow( - self, - workflow_id: str, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowArtifact - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.edit_workflow( - workflow_id="workflow_id", - workflow=WorkflowArtifact(), - ) - """ - _response = self._raw_client.edit_workflow( - workflow_id, workflow=workflow, request_options=request_options - ) - return _response.data - - def archive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.archive_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - """ - _response = self._raw_client.archive_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - def unarchive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.unarchive_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - """ - _response = self._raw_client.unarchive_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - def query_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.query_workflows() - """ - _response = self._raw_client.query_workflows( - workflow_ref=workflow_ref, - workflow_flags=workflow_flags, - workflow_meta=workflow_meta, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def list_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.list_workflow_variants() - """ - _response = self._raw_client.list_workflow_variants( - workflow_ref=workflow_ref, - variant_ref=variant_ref, - variant_meta=variant_meta, - variant_flags=variant_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def create_workflow_variant( - self, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowVariant - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.create_workflow_variant( - variant=WorkflowVariant(), - ) - """ - _response = self._raw_client.create_workflow_variant( - variant=variant, request_options=request_options - ) - return _response.data - - def fetch_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.fetch_workflow_variant( - variant_id="variant_id", - ) - """ - _response = self._raw_client.fetch_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - def edit_workflow_variant( - self, - variant_id: str, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowVariant - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.edit_workflow_variant( - variant_id="variant_id", - variant=WorkflowVariant(), - ) - """ - _response = self._raw_client.edit_workflow_variant( - variant_id, variant=variant, request_options=request_options - ) - return _response.data - - def archive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.archive_workflow_variant( - variant_id="variant_id", - ) - """ - _response = self._raw_client.archive_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - def unarchive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.unarchive_workflow_variant( - variant_id="variant_id", - ) - """ - _response = self._raw_client.unarchive_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - def query_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.query_workflow_variants() - """ - _response = self._raw_client.query_workflow_variants( - workflow_ref=workflow_ref, - variant_ref=variant_ref, - variant_meta=variant_meta, - variant_flags=variant_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def commit_workflow_revision_by_variant_id( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.commit_workflow_revision_by_variant_id( - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.commit_workflow_revision_by_variant_id( - variant_id, revision=revision, request_options=request_options - ) - return _response.data - - def fork_workflow_variant( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - revision_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - revision_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.fork_workflow_variant( - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.fork_workflow_variant( - variant_id, - revision=revision, - revision_id=revision_id, - request_options=request_options, - ) - return _response.data - - def list_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.list_workflow_revisions() - """ - _response = self._raw_client.list_workflow_revisions( - variant_ref=variant_ref, - revision_ref=revision_ref, - revision_meta=revision_meta, - revision_flags=revision_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def create_workflow_revision( - self, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.create_workflow_revision( - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.create_workflow_revision( - revision=revision, request_options=request_options - ) - return _response.data - - def fetch_workflow_revision( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.fetch_workflow_revision( - revision_id="revision_id", - ) - """ - _response = self._raw_client.fetch_workflow_revision( - revision_id, request_options=request_options - ) - return _response.data - - def edit_workflow_revision( - self, - revision_id: str, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.edit_workflow_revision( - revision_id="revision_id", - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.edit_workflow_revision( - revision_id, revision=revision, request_options=request_options - ) - return _response.data - - def archive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.archive_workflow_revision_rpc( - revision_id="revision_id", - ) - """ - _response = self._raw_client.archive_workflow_revision_rpc( - revision_id, request_options=request_options - ) - return _response.data - - def unarchive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.unarchive_workflow_revision_rpc( - revision_id="revision_id", - ) - """ - _response = self._raw_client.unarchive_workflow_revision_rpc( - revision_id, request_options=request_options - ) - return _response.data - - def query_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.query_workflow_revisions() - """ - _response = self._raw_client.query_workflow_revisions( - variant_ref=variant_ref, - revision_ref=revision_ref, - revision_meta=revision_meta, - revision_flags=revision_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - def fork_workflow_variant_by_revision_id( - self, - revision_id: typing.Optional[str], - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - revision_id : typing.Optional[str] - - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.fork_workflow_variant_by_revision_id( - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.fork_workflow_variant_by_revision_id( - revision_id, - revision=revision, - variant_id=variant_id, - request_options=request_options, - ) - return _response.data - - def commit_workflow_revision( - self, - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi, WorkflowRevision - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.commit_workflow_revision( - revision=WorkflowRevision(), - ) - """ - _response = self._raw_client.commit_workflow_revision( - revision=revision, variant_id=variant_id, request_options=request_options - ) - return _response.data - - def log_workflow_revisions( - self, - *, - depth: typing.Optional[int] = None, - variant_ref: typing.Optional[Reference] = OMIT, - revision_ref: typing.Optional[Reference] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - depth : typing.Optional[int] - - variant_ref : typing.Optional[Reference] - - revision_ref : typing.Optional[Reference] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - from agenta import AgentaApi - - client = AgentaApi( - api_key="YOUR_API_KEY", - ) - client.workflows.log_workflow_revisions() - """ - _response = self._raw_client.log_workflow_revisions( - depth=depth, - variant_ref=variant_ref, - revision_ref=revision_ref, - request_options=request_options, - ) - return _response.data - - -class AsyncWorkflowsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawWorkflowsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawWorkflowsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawWorkflowsClient - """ - return self._raw_client - - async def list_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.list_workflows() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_workflows( - workflow_ref=workflow_ref, - workflow_flags=workflow_flags, - workflow_meta=workflow_meta, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def create_workflow( - self, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowArtifact - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.create_workflow( - workflow=WorkflowArtifact(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_workflow( - workflow=workflow, request_options=request_options - ) - return _response.data - - async def fetch_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.fetch_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - async def edit_workflow( - self, - workflow_id: str, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowArtifact - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.edit_workflow( - workflow_id="workflow_id", - workflow=WorkflowArtifact(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_workflow( - workflow_id, workflow=workflow, request_options=request_options - ) - return _response.data - - async def archive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.archive_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.archive_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - async def unarchive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowResponse: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.unarchive_workflow( - workflow_id="workflow_id", - artifact_id="artifact_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unarchive_workflow( - workflow_id, artifact_id=artifact_id, request_options=request_options - ) - return _response.data - - async def query_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.query_workflows() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_workflows( - workflow_ref=workflow_ref, - workflow_flags=workflow_flags, - workflow_meta=workflow_meta, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def list_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.list_workflow_variants() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_workflow_variants( - workflow_ref=workflow_ref, - variant_ref=variant_ref, - variant_meta=variant_meta, - variant_flags=variant_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def create_workflow_variant( - self, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowVariant - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.create_workflow_variant( - variant=WorkflowVariant(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_workflow_variant( - variant=variant, request_options=request_options - ) - return _response.data - - async def fetch_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.fetch_workflow_variant( - variant_id="variant_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - async def edit_workflow_variant( - self, - variant_id: str, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowVariant - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.edit_workflow_variant( - variant_id="variant_id", - variant=WorkflowVariant(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_workflow_variant( - variant_id, variant=variant, request_options=request_options - ) - return _response.data - - async def archive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.archive_workflow_variant( - variant_id="variant_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.archive_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - async def unarchive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.unarchive_workflow_variant( - variant_id="variant_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unarchive_workflow_variant( - variant_id, request_options=request_options - ) - return _response.data - - async def query_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantsResponse: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.query_workflow_variants() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_workflow_variants( - workflow_ref=workflow_ref, - variant_ref=variant_ref, - variant_meta=variant_meta, - variant_flags=variant_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def commit_workflow_revision_by_variant_id( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.commit_workflow_revision_by_variant_id( - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.commit_workflow_revision_by_variant_id( - variant_id, revision=revision, request_options=request_options - ) - return _response.data - - async def fork_workflow_variant( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - revision_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - revision_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.fork_workflow_variant( - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fork_workflow_variant( - variant_id, - revision=revision, - revision_id=revision_id, - request_options=request_options, - ) - return _response.data - - async def list_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.list_workflow_revisions() - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_workflow_revisions( - variant_ref=variant_ref, - revision_ref=revision_ref, - revision_meta=revision_meta, - revision_flags=revision_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def create_workflow_revision( - self, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.create_workflow_revision( - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_workflow_revision( - revision=revision, request_options=request_options - ) - return _response.data - - async def fetch_workflow_revision( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.fetch_workflow_revision( - revision_id="revision_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fetch_workflow_revision( - revision_id, request_options=request_options - ) - return _response.data - - async def edit_workflow_revision( - self, - revision_id: str, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.edit_workflow_revision( - revision_id="revision_id", - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.edit_workflow_revision( - revision_id, revision=revision, request_options=request_options - ) - return _response.data - - async def archive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.archive_workflow_revision_rpc( - revision_id="revision_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.archive_workflow_revision_rpc( - revision_id, request_options=request_options - ) - return _response.data - - async def unarchive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.unarchive_workflow_revision_rpc( - revision_id="revision_id", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.unarchive_workflow_revision_rpc( - revision_id, request_options=request_options - ) - return _response.data - - async def query_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.query_workflow_revisions() - - - asyncio.run(main()) - """ - _response = await self._raw_client.query_workflow_revisions( - variant_ref=variant_ref, - revision_ref=revision_ref, - revision_meta=revision_meta, - revision_flags=revision_flags, - include_archived=include_archived, - request_options=request_options, - ) - return _response.data - - async def fork_workflow_variant_by_revision_id( - self, - revision_id: typing.Optional[str], - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowVariantResponse: - """ - Parameters - ---------- - revision_id : typing.Optional[str] - - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowVariantResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.fork_workflow_variant_by_revision_id( - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.fork_workflow_variant_by_revision_id( - revision_id, - revision=revision, - variant_id=variant_id, - request_options=request_options, - ) - return _response.data - - async def commit_workflow_revision( - self, - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionResponse: - """ - Parameters - ---------- - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi, WorkflowRevision - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.commit_workflow_revision( - revision=WorkflowRevision(), - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.commit_workflow_revision( - revision=revision, variant_id=variant_id, request_options=request_options - ) - return _response.data - - async def log_workflow_revisions( - self, - *, - depth: typing.Optional[int] = None, - variant_ref: typing.Optional[Reference] = OMIT, - revision_ref: typing.Optional[Reference] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> WorkflowRevisionsResponse: - """ - Parameters - ---------- - depth : typing.Optional[int] - - variant_ref : typing.Optional[Reference] - - revision_ref : typing.Optional[Reference] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WorkflowRevisionsResponse - Successful Response - - Examples - -------- - import asyncio - - from agenta import AsyncAgentaApi - - client = AsyncAgentaApi( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.workflows.log_workflow_revisions() - - - asyncio.run(main()) - """ - _response = await self._raw_client.log_workflow_revisions( - depth=depth, - variant_ref=variant_ref, - revision_ref=revision_ref, - request_options=request_options, - ) - return _response.data diff --git a/sdk/agenta/client/backend/workflows/raw_client.py b/sdk/agenta/client/backend/workflows/raw_client.py deleted file mode 100644 index e74406049d..0000000000 --- a/sdk/agenta/client/backend/workflows/raw_client.py +++ /dev/null @@ -1,3639 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..core.serialization import convert_and_respect_annotation_metadata -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.reference import Reference -from ..types.workflow_artifact import WorkflowArtifact -from ..types.workflow_response import WorkflowResponse -from ..types.workflow_revision import WorkflowRevision -from ..types.workflow_revision_response import WorkflowRevisionResponse -from ..types.workflow_revisions_response import WorkflowRevisionsResponse -from ..types.workflow_variant import WorkflowVariant -from ..types.workflow_variant_response import WorkflowVariantResponse -from ..types.workflow_variants_response import WorkflowVariantsResponse -from ..types.workflows_response import WorkflowsResponse - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawWorkflowsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/", - method="GET", - params={ - "workflow_ref": workflow_ref, - "workflow_flags": workflow_flags, - "workflow_meta": workflow_meta, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowsResponse, - parse_obj_as( - type_=WorkflowsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_workflow( - self, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/", - method="POST", - json={ - "workflow": convert_and_respect_annotation_metadata( - object_=workflow, annotation=WorkflowArtifact, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}", - method="GET", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_workflow( - self, - workflow_id: str, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}", - method="PUT", - json={ - "workflow": convert_and_respect_annotation_metadata( - object_=workflow, annotation=WorkflowArtifact, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def archive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}/archive", - method="POST", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unarchive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}/unarchive", - method="POST", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/query", - method="POST", - params={ - "workflow_ref": workflow_ref, - "workflow_flags": workflow_flags, - "workflow_meta": workflow_meta, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowsResponse, - parse_obj_as( - type_=WorkflowsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/", - method="GET", - params={ - "workflow_ref": workflow_ref, - "variant_ref": variant_ref, - "variant_meta": variant_meta, - "variant_flags": variant_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantsResponse, - parse_obj_as( - type_=WorkflowVariantsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_workflow_variant( - self, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/", - method="POST", - json={ - "variant": convert_and_respect_annotation_metadata( - object_=variant, annotation=WorkflowVariant, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_workflow_variant( - self, - variant_id: str, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}", - method="PUT", - json={ - "variant": convert_and_respect_annotation_metadata( - object_=variant, annotation=WorkflowVariant, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def archive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unarchive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/query", - method="POST", - params={ - "workflow_ref": workflow_ref, - "variant_ref": variant_ref, - "variant_meta": variant_meta, - "variant_flags": variant_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantsResponse, - parse_obj_as( - type_=WorkflowVariantsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def commit_workflow_revision_by_variant_id( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/commit", - method="POST", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fork_workflow_variant( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - revision_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - revision_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/fork", - method="POST", - params={ - "revision_id": revision_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def list_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/", - method="GET", - params={ - "variant_ref": variant_ref, - "revision_ref": revision_ref, - "revision_meta": revision_meta, - "revision_flags": revision_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def create_workflow_revision( - self, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/", - method="POST", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fetch_workflow_revision( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def edit_workflow_revision( - self, - revision_id: str, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}", - method="PUT", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def archive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def unarchive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def query_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/query", - method="POST", - params={ - "variant_ref": variant_ref, - "revision_ref": revision_ref, - "revision_meta": revision_meta, - "revision_flags": revision_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def fork_workflow_variant_by_revision_id( - self, - revision_id: typing.Optional[str], - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - revision_id : typing.Optional[str] - - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/fork", - method="POST", - params={ - "variant_id": variant_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def commit_workflow_revision( - self, - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/commit", - method="POST", - params={ - "variant_id": variant_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def log_workflow_revisions( - self, - *, - depth: typing.Optional[int] = None, - variant_ref: typing.Optional[Reference] = OMIT, - revision_ref: typing.Optional[Reference] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - depth : typing.Optional[int] - - variant_ref : typing.Optional[Reference] - - revision_ref : typing.Optional[Reference] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/log", - method="POST", - params={ - "depth": depth, - }, - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, annotation=Reference, direction="write" - ), - "revision_ref": convert_and_respect_annotation_metadata( - object_=revision_ref, annotation=Reference, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawWorkflowsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/", - method="GET", - params={ - "workflow_ref": workflow_ref, - "workflow_flags": workflow_flags, - "workflow_meta": workflow_meta, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowsResponse, - parse_obj_as( - type_=WorkflowsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_workflow( - self, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/", - method="POST", - json={ - "workflow": convert_and_respect_annotation_metadata( - object_=workflow, annotation=WorkflowArtifact, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}", - method="GET", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_workflow( - self, - workflow_id: str, - *, - workflow: WorkflowArtifact, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - workflow : WorkflowArtifact - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}", - method="PUT", - json={ - "workflow": convert_and_respect_annotation_metadata( - object_=workflow, annotation=WorkflowArtifact, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def archive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}/archive", - method="POST", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unarchive_workflow( - self, - workflow_id: str, - *, - artifact_id: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowResponse]: - """ - Parameters - ---------- - workflow_id : str - - artifact_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/{jsonable_encoder(workflow_id)}/unarchive", - method="POST", - params={ - "artifact_id": artifact_id, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowResponse, - parse_obj_as( - type_=WorkflowResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_workflows( - self, - *, - workflow_ref: typing.Optional[str] = None, - workflow_flags: typing.Optional[str] = None, - workflow_meta: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - workflow_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - workflow_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/query", - method="POST", - params={ - "workflow_ref": workflow_ref, - "workflow_flags": workflow_flags, - "workflow_meta": workflow_meta, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowsResponse, - parse_obj_as( - type_=WorkflowsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/", - method="GET", - params={ - "workflow_ref": workflow_ref, - "variant_ref": variant_ref, - "variant_meta": variant_meta, - "variant_flags": variant_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantsResponse, - parse_obj_as( - type_=WorkflowVariantsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_workflow_variant( - self, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/", - method="POST", - json={ - "variant": convert_and_respect_annotation_metadata( - object_=variant, annotation=WorkflowVariant, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_workflow_variant( - self, - variant_id: str, - *, - variant: WorkflowVariant, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - variant : WorkflowVariant - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}", - method="PUT", - json={ - "variant": convert_and_respect_annotation_metadata( - object_=variant, annotation=WorkflowVariant, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def archive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unarchive_workflow_variant( - self, - variant_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_workflow_variants( - self, - *, - workflow_ref: typing.Optional[str] = None, - variant_ref: typing.Optional[str] = None, - variant_meta: typing.Optional[str] = None, - variant_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantsResponse]: - """ - Parameters - ---------- - workflow_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_ref : typing.Optional[str] - JSON string of reference, e.g. {"key": value} - - variant_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - variant_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/variants/query", - method="POST", - params={ - "workflow_ref": workflow_ref, - "variant_ref": variant_ref, - "variant_meta": variant_meta, - "variant_flags": variant_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantsResponse, - parse_obj_as( - type_=WorkflowVariantsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def commit_workflow_revision_by_variant_id( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/commit", - method="POST", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fork_workflow_variant( - self, - variant_id: typing.Optional[str], - *, - revision: WorkflowRevision, - revision_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - variant_id : typing.Optional[str] - - revision : WorkflowRevision - - revision_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/variants/{jsonable_encoder(variant_id)}/fork", - method="POST", - params={ - "revision_id": revision_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def list_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/", - method="GET", - params={ - "variant_ref": variant_ref, - "revision_ref": revision_ref, - "revision_meta": revision_meta, - "revision_flags": revision_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def create_workflow_revision( - self, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/", - method="POST", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fetch_workflow_revision( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def edit_workflow_revision( - self, - revision_id: str, - *, - revision: WorkflowRevision, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - revision : WorkflowRevision - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}", - method="PUT", - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def archive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/archive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def unarchive_workflow_revision_rpc( - self, - revision_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision_id : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/unarchive", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def query_workflow_revisions( - self, - *, - variant_ref: typing.Optional[str] = None, - revision_ref: typing.Optional[str] = None, - revision_meta: typing.Optional[str] = None, - revision_flags: typing.Optional[str] = None, - include_archived: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - variant_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_ref : typing.Optional[str] - JSON string of ref, e.g. {"key": value} - - revision_meta : typing.Optional[str] - JSON string of meta, e.g. {"key": value} - - revision_flags : typing.Optional[str] - JSON string of flags, e.g. {"key": value} - - include_archived : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/query", - method="POST", - params={ - "variant_ref": variant_ref, - "revision_ref": revision_ref, - "revision_meta": revision_meta, - "revision_flags": revision_flags, - "include_archived": include_archived, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def fork_workflow_variant_by_revision_id( - self, - revision_id: typing.Optional[str], - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowVariantResponse]: - """ - Parameters - ---------- - revision_id : typing.Optional[str] - - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowVariantResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"preview/base/workflows/revisions/{jsonable_encoder(revision_id)}/fork", - method="POST", - params={ - "variant_id": variant_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowVariantResponse, - parse_obj_as( - type_=WorkflowVariantResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def commit_workflow_revision( - self, - *, - revision: WorkflowRevision, - variant_id: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionResponse]: - """ - Parameters - ---------- - revision : WorkflowRevision - - variant_id : typing.Optional[str] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/commit", - method="POST", - params={ - "variant_id": variant_id, - }, - json={ - "revision": convert_and_respect_annotation_metadata( - object_=revision, annotation=WorkflowRevision, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionResponse, - parse_obj_as( - type_=WorkflowRevisionResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def log_workflow_revisions( - self, - *, - depth: typing.Optional[int] = None, - variant_ref: typing.Optional[Reference] = OMIT, - revision_ref: typing.Optional[Reference] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[WorkflowRevisionsResponse]: - """ - Parameters - ---------- - depth : typing.Optional[int] - - variant_ref : typing.Optional[Reference] - - revision_ref : typing.Optional[Reference] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[WorkflowRevisionsResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "preview/base/workflows/revisions/log", - method="POST", - params={ - "depth": depth, - }, - json={ - "variant_ref": convert_and_respect_annotation_metadata( - object_=variant_ref, annotation=Reference, direction="write" - ), - "revision_ref": convert_and_respect_annotation_metadata( - object_=revision_ref, annotation=Reference, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - WorkflowRevisionsResponse, - parse_obj_as( - type_=WorkflowRevisionsResponse, # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/backend/workspace/__init__.py b/sdk/agenta/client/backend/workspace/__init__.py index dadae709c6..67a41b2742 100644 --- a/sdk/agenta/client/backend/workspace/__init__.py +++ b/sdk/agenta/client/backend/workspace/__init__.py @@ -1,3 +1 @@ # This file was auto-generated by Fern from our API Definition. - -# isort: skip_file diff --git a/sdk/agenta/client/backend/workspace/client.py b/sdk/agenta/client/backend/workspace/client.py index 9997c212af..d8c0bf7d38 100644 --- a/sdk/agenta/client/backend/workspace/client.py +++ b/sdk/agenta/client/backend/workspace/client.py @@ -1,27 +1,21 @@ # This file was auto-generated by Fern from our API Definition. +from ..core.client_wrapper import SyncClientWrapper import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.workspace import Workspace -from .raw_client import AsyncRawWorkspaceClient, RawWorkspaceClient +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.jsonable_encoder import jsonable_encoder +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError +from ..core.client_wrapper import AsyncClientWrapper class WorkspaceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawWorkspaceClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawWorkspaceClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawWorkspaceClient - """ - return self._raw_client + self._client_wrapper = client_wrapper def get_workspace( self, *, request_options: typing.Optional[RequestOptions] = None @@ -53,11 +47,28 @@ def get_workspace( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.workspace.get_workspace() """ - _response = self._raw_client.get_workspace(request_options=request_options) - return _response.data + _response = self._client_wrapper.httpx_client.request( + "workspaces", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Workspace], + parse_obj_as( + type_=typing.List[Workspace], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def get_all_workspace_roles( self, *, request_options: typing.Optional[RequestOptions] = None @@ -89,20 +100,35 @@ def get_all_workspace_roles( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.workspace.get_all_workspace_roles() """ - _response = self._raw_client.get_all_workspace_roles( - request_options=request_options + _response = self._client_wrapper.httpx_client.request( + "workspaces/roles", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[typing.Dict[str, str]], + parse_obj_as( + type_=typing.List[typing.Dict[str, str]], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) def remove_user_from_workspace( self, workspace_id: str, *, email: str, - request_options: typing.Optional[RequestOptions] = None + request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ Remove a user from a workspace. @@ -131,32 +157,49 @@ def remove_user_from_workspace( client = AgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) client.workspace.remove_user_from_workspace( workspace_id="workspace_id", email="email", ) """ - _response = self._raw_client.remove_user_from_workspace( - workspace_id, email=email, request_options=request_options + _response = self._client_wrapper.httpx_client.request( + f"workspaces/{jsonable_encoder(workspace_id)}/users", + method="DELETE", + params={ + "email": email, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) class AsyncWorkspaceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawWorkspaceClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawWorkspaceClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawWorkspaceClient - """ - return self._raw_client + self._client_wrapper = client_wrapper async def get_workspace( self, *, request_options: typing.Optional[RequestOptions] = None @@ -190,6 +233,7 @@ async def get_workspace( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -199,10 +243,24 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_workspace( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "workspaces", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[Workspace], + parse_obj_as( + type_=typing.List[Workspace], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def get_all_workspace_roles( self, *, request_options: typing.Optional[RequestOptions] = None @@ -236,6 +294,7 @@ async def get_all_workspace_roles( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -245,17 +304,31 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.get_all_workspace_roles( - request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + "workspaces/roles", + method="GET", + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[typing.Dict[str, str]], + parse_obj_as( + type_=typing.List[typing.Dict[str, str]], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) async def remove_user_from_workspace( self, workspace_id: str, *, email: str, - request_options: typing.Optional[RequestOptions] = None + request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: """ Remove a user from a workspace. @@ -286,6 +359,7 @@ async def remove_user_from_workspace( client = AsyncAgentaApi( api_key="YOUR_API_KEY", + base_url="https://yourhost.com/path/to/api", ) @@ -298,7 +372,34 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.remove_user_from_workspace( - workspace_id, email=email, request_options=request_options + _response = await self._client_wrapper.httpx_client.request( + f"workspaces/{jsonable_encoder(workspace_id)}/users", + method="DELETE", + params={ + "email": email, + }, + request_options=request_options, ) - return _response.data + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + HttpValidationError, + parse_obj_as( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdk/agenta/client/backend/workspace/raw_client.py b/sdk/agenta/client/backend/workspace/raw_client.py deleted file mode 100644 index 33f6643ba3..0000000000 --- a/sdk/agenta/client/backend/workspace/raw_client.py +++ /dev/null @@ -1,376 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from json.decoder import JSONDecodeError - -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.http_response import AsyncHttpResponse, HttpResponse -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.http_validation_error import HttpValidationError -from ..types.workspace import Workspace - - -class RawWorkspaceClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def get_workspace( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[Workspace]]: - """ - Get workspace details. - - Returns details about the workspace associated with the user's session. - - Returns: - Workspace: The details of the workspace. - - Raises: - HTTPException: If the user does not have permission to perform this action. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[Workspace]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "workspaces", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Workspace], - parse_obj_as( - type_=typing.List[Workspace], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def get_all_workspace_roles( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[typing.Dict[str, str]]]: - """ - Get all workspace roles. - - Returns a list of all available workspace roles. - - Returns: - List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles. - - Raises: - HTTPException: If an error occurs while retrieving the workspace roles. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[typing.Dict[str, str]]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "workspaces/roles", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[typing.Dict[str, str]], - parse_obj_as( - type_=typing.List[typing.Dict[str, str]], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - def remove_user_from_workspace( - self, - workspace_id: str, - *, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[typing.Optional[typing.Any]]: - """ - Remove a user from a workspace. - - Args: - email (str): The email address of the user to be removed - workspace_id (str): The ID of the workspace. - - Parameters - ---------- - workspace_id : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/users", - method="DELETE", - params={ - "email": email, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return HttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - -class AsyncRawWorkspaceClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def get_workspace( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[Workspace]]: - """ - Get workspace details. - - Returns details about the workspace associated with the user's session. - - Returns: - Workspace: The details of the workspace. - - Raises: - HTTPException: If the user does not have permission to perform this action. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[Workspace]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "workspaces", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[Workspace], - parse_obj_as( - type_=typing.List[Workspace], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def get_all_workspace_roles( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[typing.Dict[str, str]]]: - """ - Get all workspace roles. - - Returns a list of all available workspace roles. - - Returns: - List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles. - - Raises: - HTTPException: If an error occurs while retrieving the workspace roles. - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[typing.Dict[str, str]]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "workspaces/roles", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[typing.Dict[str, str]], - parse_obj_as( - type_=typing.List[typing.Dict[str, str]], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) - - async def remove_user_from_workspace( - self, - workspace_id: str, - *, - email: str, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: - """ - Remove a user from a workspace. - - Args: - email (str): The email address of the user to be removed - workspace_id (str): The ID of the workspace. - - Parameters - ---------- - workspace_id : str - - email : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.Optional[typing.Any]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - f"workspaces/{jsonable_encoder(workspace_id)}/users", - method="DELETE", - params={ - "email": email, - }, - request_options=request_options, - ) - try: - if _response is None or not _response.text.strip(): - return AsyncHttpResponse(response=_response, data=None) - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - HttpValidationError, - parse_obj_as( - type_=HttpValidationError, # type: ignore - object_=_response.json(), - ), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response.text, - ) - raise ApiError( - status_code=_response.status_code, - headers=dict(_response.headers), - body=_response_json, - ) diff --git a/sdk/agenta/client/client.py b/sdk/agenta/client/client.py index 305f7fc9c6..535818f5d2 100644 --- a/sdk/agenta/client/client.py +++ b/sdk/agenta/client/client.py @@ -99,17 +99,13 @@ def __init__( self._client_wrapper = SyncClientWrapper( base_url=base_url, api_key=api_key, - httpx_client=( - httpx_client - if httpx_client is not None - else ( - httpx.Client( - timeout=_defaulted_timeout, follow_redirects=follow_redirects - ) - if follow_redirects is not None - else httpx.Client(timeout=_defaulted_timeout) - ) - ), + httpx_client=httpx_client + if httpx_client is not None + else httpx.Client( + timeout=_defaulted_timeout, follow_redirects=follow_redirects + ) + if follow_redirects is not None + else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) self.admin = AdminClient(client_wrapper=self._client_wrapper) @@ -546,10 +542,7 @@ def get_own_org( raise ApiError(status_code=_response.status_code, body=_response_json) def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, + self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.Optional[typing.Any]: """ Get an organization's details. @@ -563,7 +556,7 @@ def fetch_organization_details( Parameters ---------- - organization_id : str + org_id : str request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -582,11 +575,11 @@ def fetch_organization_details( base_url="https://yourhost.com/path/to/api", ) client.fetch_organization_details( - organization_id="organization_id", + org_id="org_id", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", + f"organizations/{jsonable_encoder(org_id)}", method="GET", request_options=request_options, ) @@ -616,7 +609,7 @@ def fetch_organization_details( def update_organization( self, - organization_id: str, + org_id: str, *, name: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, @@ -626,7 +619,7 @@ def update_organization( """ Parameters ---------- - organization_id : str + org_id : str name : typing.Optional[str] @@ -651,11 +644,11 @@ def update_organization( base_url="https://yourhost.com/path/to/api", ) client.update_organization( - organization_id="organization_id", + org_id="org_id", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", + f"organizations/{jsonable_encoder(org_id)}", method="PUT", json={ "name": name, @@ -694,7 +687,7 @@ def update_organization( def invite_user_to_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, request: typing.Sequence[InviteRequest], @@ -703,7 +696,7 @@ def invite_user_to_workspace( """ Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -726,7 +719,7 @@ def invite_user_to_workspace( base_url="https://yourhost.com/path/to/api", ) client.invite_user_to_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", request=[ InviteRequest( @@ -737,7 +730,7 @@ def invite_user_to_workspace( ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", method="POST", json=convert_and_respect_annotation_metadata( object_=request, @@ -773,7 +766,7 @@ def invite_user_to_workspace( def resend_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, email: str, @@ -792,7 +785,7 @@ def resend_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -815,13 +808,13 @@ def resend_invitation( base_url="https://yourhost.com/path/to/api", ) client.resend_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", email="email", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", method="POST", json={ "email": email, @@ -858,7 +851,7 @@ def resend_invitation( def accept_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, project_id: str, @@ -878,7 +871,7 @@ def accept_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -903,14 +896,14 @@ def accept_invitation( base_url="https://yourhost.com/path/to/api", ) client.accept_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", project_id="project_id", token="token", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", method="POST", params={ "project_id": project_id, @@ -950,7 +943,7 @@ def accept_invitation( def create_workspace( self, - organization_id: str, + org_id: str, *, name: str, description: typing.Optional[str] = OMIT, @@ -960,7 +953,7 @@ def create_workspace( """ Parameters ---------- - organization_id : str + org_id : str name : str @@ -985,12 +978,12 @@ def create_workspace( base_url="https://yourhost.com/path/to/api", ) client.create_workspace( - organization_id="organization_id", + org_id="org_id", name="name", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces", + f"organizations/{jsonable_encoder(org_id)}/workspaces", method="POST", json={ "name": name, @@ -1029,7 +1022,7 @@ def create_workspace( def update_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, name: typing.Optional[str] = OMIT, @@ -1040,7 +1033,7 @@ def update_workspace( """ Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -1067,12 +1060,12 @@ def update_workspace( base_url="https://yourhost.com/path/to/api", ) client.update_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", ) """ _response = self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}", method="PUT", json={ "name": name, @@ -1314,7 +1307,7 @@ def unassign_role_from_user( workspace_id: str, *, email: str, - organization_id: str, + org_id: str, role: str, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: @@ -1324,7 +1317,7 @@ def unassign_role_from_user( Args: workspace_id (str): The ID of the workspace. email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. role (str): The role to remove from the user. request (Request): The FastAPI request object. @@ -1341,7 +1334,7 @@ def unassign_role_from_user( email : str - organization_id : str + org_id : str role : str @@ -1364,7 +1357,7 @@ def unassign_role_from_user( client.unassign_role_from_user( workspace_id="workspace_id", email="email", - organization_id="organization_id", + org_id="org_id", role="role", ) """ @@ -1373,7 +1366,7 @@ def unassign_role_from_user( method="DELETE", params={ "email": email, - "organization_id": organization_id, + "org_id": org_id, "role": role, }, request_options=request_options, @@ -1406,7 +1399,7 @@ def remove_user_from_workspace( self, workspace_id: str, *, - organization_id: str, + org_id: str, email: str, request_options: typing.Optional[RequestOptions] = None, ) -> WorkspaceResponse: @@ -1429,7 +1422,7 @@ def remove_user_from_workspace( ---------- workspace_id : str - organization_id : str + org_id : str email : str @@ -1451,7 +1444,7 @@ def remove_user_from_workspace( ) client.remove_user_from_workspace( workspace_id="workspace_id", - organization_id="organization_id", + org_id="org_id", email="email", ) """ @@ -1459,7 +1452,7 @@ def remove_user_from_workspace( f"workspaces/{jsonable_encoder(workspace_id)}/users", method="DELETE", params={ - "organization_id": organization_id, + "org_id": org_id, "email": email, }, request_options=request_options, @@ -1637,17 +1630,13 @@ def __init__( self._client_wrapper = AsyncClientWrapper( base_url=base_url, api_key=api_key, - httpx_client=( - httpx_client - if httpx_client is not None - else ( - httpx.AsyncClient( - timeout=_defaulted_timeout, follow_redirects=follow_redirects - ) - if follow_redirects is not None - else httpx.AsyncClient(timeout=_defaulted_timeout) - ) - ), + httpx_client=httpx_client + if httpx_client is not None + else httpx.AsyncClient( + timeout=_defaulted_timeout, follow_redirects=follow_redirects + ) + if follow_redirects is not None + else httpx.AsyncClient(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper) @@ -2144,10 +2133,7 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response_json) async def fetch_organization_details( - self, - organization_id: str, - *, - request_options: typing.Optional[RequestOptions] = None, + self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.Optional[typing.Any]: """ Get an organization's details. @@ -2161,7 +2147,7 @@ async def fetch_organization_details( Parameters ---------- - organization_id : str + org_id : str request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2185,14 +2171,14 @@ async def fetch_organization_details( async def main() -> None: await client.fetch_organization_details( - organization_id="organization_id", + org_id="org_id", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", + f"organizations/{jsonable_encoder(org_id)}", method="GET", request_options=request_options, ) @@ -2222,7 +2208,7 @@ async def main() -> None: async def update_organization( self, - organization_id: str, + org_id: str, *, name: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, @@ -2232,7 +2218,7 @@ async def update_organization( """ Parameters ---------- - organization_id : str + org_id : str name : typing.Optional[str] @@ -2262,14 +2248,14 @@ async def update_organization( async def main() -> None: await client.update_organization( - organization_id="organization_id", + org_id="org_id", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}", + f"organizations/{jsonable_encoder(org_id)}", method="PUT", json={ "name": name, @@ -2308,7 +2294,7 @@ async def main() -> None: async def invite_user_to_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, request: typing.Sequence[InviteRequest], @@ -2317,7 +2303,7 @@ async def invite_user_to_workspace( """ Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -2345,7 +2331,7 @@ async def invite_user_to_workspace( async def main() -> None: await client.invite_user_to_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", request=[ InviteRequest( @@ -2359,7 +2345,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite", method="POST", json=convert_and_respect_annotation_metadata( object_=request, @@ -2395,7 +2381,7 @@ async def main() -> None: async def resend_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, email: str, @@ -2414,7 +2400,7 @@ async def resend_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -2442,7 +2428,7 @@ async def resend_invitation( async def main() -> None: await client.resend_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", email="email", ) @@ -2451,7 +2437,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend", method="POST", json={ "email": email, @@ -2488,7 +2474,7 @@ async def main() -> None: async def accept_invitation( self, - organization_id: str, + org_id: str, workspace_id: str, *, project_id: str, @@ -2508,7 +2494,7 @@ async def accept_invitation( Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -2538,7 +2524,7 @@ async def accept_invitation( async def main() -> None: await client.accept_invitation( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", project_id="project_id", token="token", @@ -2548,7 +2534,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept", method="POST", params={ "project_id": project_id, @@ -2588,7 +2574,7 @@ async def main() -> None: async def create_workspace( self, - organization_id: str, + org_id: str, *, name: str, description: typing.Optional[str] = OMIT, @@ -2598,7 +2584,7 @@ async def create_workspace( """ Parameters ---------- - organization_id : str + org_id : str name : str @@ -2628,7 +2614,7 @@ async def create_workspace( async def main() -> None: await client.create_workspace( - organization_id="organization_id", + org_id="org_id", name="name", ) @@ -2636,7 +2622,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces", + f"organizations/{jsonable_encoder(org_id)}/workspaces", method="POST", json={ "name": name, @@ -2675,7 +2661,7 @@ async def main() -> None: async def update_workspace( self, - organization_id: str, + org_id: str, workspace_id: str, *, name: typing.Optional[str] = OMIT, @@ -2686,7 +2672,7 @@ async def update_workspace( """ Parameters ---------- - organization_id : str + org_id : str workspace_id : str @@ -2718,7 +2704,7 @@ async def update_workspace( async def main() -> None: await client.update_workspace( - organization_id="organization_id", + org_id="org_id", workspace_id="workspace_id", ) @@ -2726,7 +2712,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}", + f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}", method="PUT", json={ "name": name, @@ -2992,7 +2978,7 @@ async def unassign_role_from_user( workspace_id: str, *, email: str, - organization_id: str, + org_id: str, role: str, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[typing.Any]: @@ -3002,7 +2988,7 @@ async def unassign_role_from_user( Args: workspace_id (str): The ID of the workspace. email (str): The email of the user to remove the role from. - organization_id (str): The ID of the organization. + org_id (str): The ID of the organization. role (str): The role to remove from the user. request (Request): The FastAPI request object. @@ -3019,7 +3005,7 @@ async def unassign_role_from_user( email : str - organization_id : str + org_id : str role : str @@ -3047,7 +3033,7 @@ async def main() -> None: await client.unassign_role_from_user( workspace_id="workspace_id", email="email", - organization_id="organization_id", + org_id="org_id", role="role", ) @@ -3059,7 +3045,7 @@ async def main() -> None: method="DELETE", params={ "email": email, - "organization_id": organization_id, + "org_id": org_id, "role": role, }, request_options=request_options, @@ -3092,7 +3078,7 @@ async def remove_user_from_workspace( self, workspace_id: str, *, - organization_id: str, + org_id: str, email: str, request_options: typing.Optional[RequestOptions] = None, ) -> WorkspaceResponse: @@ -3115,7 +3101,7 @@ async def remove_user_from_workspace( ---------- workspace_id : str - organization_id : str + org_id : str email : str @@ -3142,7 +3128,7 @@ async def remove_user_from_workspace( async def main() -> None: await client.remove_user_from_workspace( workspace_id="workspace_id", - organization_id="organization_id", + org_id="org_id", email="email", ) @@ -3153,7 +3139,7 @@ async def main() -> None: f"workspaces/{jsonable_encoder(workspace_id)}/users", method="DELETE", params={ - "organization_id": organization_id, + "org_id": org_id, "email": email, }, request_options=request_options, diff --git a/sdk/agenta/client/types.py b/sdk/agenta/client/types.py deleted file mode 100644 index c49625c942..0000000000 --- a/sdk/agenta/client/types.py +++ /dev/null @@ -1,4 +0,0 @@ -# Compatibility layer to maintain backward compatibility -# Re-exports all types from backend.types - -from .backend.types import * diff --git a/sdk/agenta/sdk/__init__.py b/sdk/agenta/sdk/__init__.py index 6f908168d5..f8f704288f 100644 --- a/sdk/agenta/sdk/__init__.py +++ b/sdk/agenta/sdk/__init__.py @@ -2,50 +2,6 @@ from .utils.preinit import PreInitObject # always the first import! -__all__ = [ - # Decorators - "workflow", - "application", - "evaluator", - "instrument", - "route", - "app", - # Initialization - "init", - "config", - # Types - "DictInput", - "MultipleChoice", - "FloatParam", - "IntParam", - "MultipleChoiceParam", - "GroupedMultipleChoiceParam", - "TextParam", - "MessagesInput", - "FileInputURL", - "BinaryParam", - "Prompt", - # Tracing - "Tracing", - "tracing", - "tracer", - "get_tracer", - "Reference", - # Managers - "AppManager", - "VaultManager", - "SecretsManager", - "ConfigManager", - "VariantManager", - "DeploymentManager", - # Utilities - "calculate_token_usage", - # API clients - "api", - "async_api", - "types", -] - import agenta.client.backend.types as client_types # pylint: disable=wrong-import-order from .types import ( @@ -65,14 +21,9 @@ ) from .tracing import Tracing, get_tracer -from agenta.sdk.decorators.tracing import instrument -from agenta.sdk.decorators.running import ( - workflow, - application, - evaluator, -) -from agenta.sdk.decorators.serving import route, app +from .decorators.tracing import instrument from .tracing.conventions import Reference +from .decorators.routing import entrypoint, app, route from .agenta_init import Config, AgentaSingleton, init as _init from .utils.costs import calculate_token_usage from .managers.apps import AppManager @@ -81,7 +32,6 @@ from .managers.config import ConfigManager from .managers.variant import VariantManager from .managers.deployment import DeploymentManager -from .managers import testsets as testsets config = PreInitObject("agenta.config", Config) diff --git a/sdk/agenta/sdk/agenta_init.py b/sdk/agenta/sdk/agenta_init.py index 45c85a13ff..eaf3acfedb 100644 --- a/sdk/agenta/sdk/agenta_init.py +++ b/sdk/agenta/sdk/agenta_init.py @@ -9,7 +9,7 @@ from agenta.client.client import AgentaApi, AsyncAgentaApi from agenta.sdk.tracing import Tracing -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context log = get_module_logger(__name__) @@ -27,7 +27,6 @@ class AgentaSingleton: def __init__(self): self.host = None - self.api_url = None self.api_key = None self.scope_type = None @@ -42,7 +41,6 @@ def init( self, *, host: Optional[str] = None, - api_url: Optional[str] = None, api_key: Optional[str] = None, config_fname: Optional[str] = None, redact: Optional[Callable[..., Any]] = None, @@ -70,7 +68,7 @@ def init( """ - log.info("Agenta - SDK ver: %s", version("agenta")) + log.info("Agenta - SDK version: %s", version("agenta")) config = {} if config_fname: @@ -79,29 +77,16 @@ def init( _host = ( host or getenv("AGENTA_HOST") + or config.get("backend_host") or config.get("host") - or "https://cloud.agenta.ai" + or getenv("AGENTA_API_URL", "https://cloud.agenta.ai") ) - _api_url = ( - api_url - or getenv("AGENTA_API_URL") - or config.get("api_url") - or None # NO FALLBACK - ) - - if _api_url: - _host = _api_url.rsplit("/api", 1)[0] - - if _host and not _api_url: - _api_url = _host + "/api" - try: assert _host and isinstance( _host, str ), "Host is required. Please provide a valid host or set AGENTA_HOST environment variable." self.host = parse_url(url=_host) - self.api_url = self.host + "/api" except AssertionError as e: log.error(str(e)) raise @@ -109,27 +94,19 @@ def init( log.error(f"Failed to parse host URL '{_host}': {e}") raise - self.api_key = ( - api_key - or getenv("AGENTA_API_KEY") - or config.get("api_key") - or None # NO FALLBACK - ) + log.info("Agenta - Host: %s", self.host) - log.info("Agenta - API URL: %s", self.api_url) + self.api_key = api_key or getenv("AGENTA_API_KEY") or config.get("api_key") self.scope_type = ( scope_type or getenv("AGENTA_SCOPE_TYPE") or config.get("scope_type") - or None # NO FALLBACK + or None ) self.scope_id = ( - scope_id - or getenv("AGENTA_SCOPE_ID") - or config.get("scope_id") - or None # NO FALLBACK + scope_id or getenv("AGENTA_SCOPE_ID") or config.get("scope_id") or None ) self.tracing = Tracing( @@ -143,12 +120,12 @@ def init( ) self.api = AgentaApi( - base_url=self.api_url, + base_url=self.host + "/api", api_key=self.api_key if self.api_key else "", ) self.async_api = AsyncAgentaApi( - base_url=self.api_url, + base_url=self.host + "/api", api_key=self.api_key if self.api_key else "", ) @@ -172,7 +149,7 @@ def get_default(self): return self.default_parameters def __getattr__(self, key): - context = RoutingContext.get() + context = routing_context.get() parameters = context.parameters @@ -195,7 +172,6 @@ def __getattr__(self, key): def init( host: Optional[str] = None, - api_url: Optional[str] = None, api_key: Optional[str] = None, config_fname: Optional[str] = None, redact: Optional[Callable[..., Any]] = None, @@ -224,7 +200,6 @@ def init( singleton.init( host=host, - api_url=api_url, api_key=api_key, config_fname=config_fname, redact=redact, diff --git a/sdk/agenta/sdk/assets.py b/sdk/agenta/sdk/assets.py index e4b0b44be4..e967657bfb 100644 --- a/sdk/agenta/sdk/assets.py +++ b/sdk/agenta/sdk/assets.py @@ -1,8 +1,5 @@ supported_llm_models = { - "anthropic": [ - "anthropic/claude-sonnet-4-5", - "anthropic/claude-haiku-4-5", - "anthropic/claude-opus-4-1", + "Anthropic": [ "anthropic/claude-sonnet-4-20250514", "anthropic/claude-opus-4-20250514", "anthropic/claude-3-7-sonnet-20250219", @@ -15,32 +12,28 @@ "anthropic/claude-2.1", "anthropic/claude-2", ], - "cohere": [ + "Cohere": [ "cohere/command-light", "cohere/command-r-plus", "cohere/command-nightly", ], - "deepinfra": [ + "DeepInfra": [ "deepinfra/meta-llama/Llama-2-70b-chat-hf", "deepinfra/meta-llama/Llama-2-13b-chat-hf", "deepinfra/codellama/CodeLlama-34b-Instruct-hf", "deepinfra/mistralai/Mistral-7B-Instruct-v0.1", ], - "gemini": [ - "gemini/gemini-2.5-pro", - "gemini/gemini-2.5-pro-preview-05-06", - "gemini/gemini-2.5-flash", - "gemini/gemini-2.5-flash-preview-09-2025", - "gemini/gemini-2.5-flash-preview-05-20", + "Gemini": [ "gemini/gemini-2.5-flash-preview-04-17", - "gemini/gemini-2.5-flash-lite", - "gemini/gemini-2.5-flash-lite-preview-09-2025", - "gemini/gemini-2.0-flash", + "gemini/gemini-2.5-pro-exp-03-25", "gemini/gemini-2.0-flash-001", - "gemini/gemini-2.0-flash-lite", "gemini/gemini-2.0-flash-lite-preview-02-05", + "gemini/gemini-1.5-pro-latest", + "gemini/gemini-1.5-flash", + "gemini/gemini-1.5-flash-8b", + "gemini/gemma-3-27b-it", ], - "groq": [ + "Groq": [ "groq/deepseek-r1-distill-llama-70b", "groq/deepseek-r1-distill-llama-70b-specdec", "groq/gemma2-9b-it", @@ -56,16 +49,13 @@ "groq/llama3-8b-8192", "groq/mixtral-8x7b-32768", ], - "mistral": [ + "Mistral": [ "mistral/mistral-tiny", "mistral/mistral-small", "mistral/mistral-medium", "mistral/mistral-large-latest", ], - "openai": [ - "gpt-5", - "gpt-5-mini", - "gpt-5-nano", + "OpenAI": [ "gpt-4.5-preview", "gpt-3.5-turbo-1106", "gpt-3.5-turbo", @@ -78,7 +68,7 @@ "gpt-4.1-nano", "o4-mini", ], - "openrouter": [ + "OpenRouter": [ "openrouter/qwen/qwen3-235b-a22b", "openrouter/qwen/qwen3-32b", "openrouter/qwen/qwen3-30b-a3b", @@ -148,13 +138,13 @@ "openrouter/google/gemini-2.0-flash-001", "openrouter/perplexity/sonar-reasoning", ], - "perplexity": [ + "Perplexity AI": [ "perplexity/sonar", "perplexity/sonar-pro", "perplexity/sonar-reasoning", "perplexity/sonar-reasoning-pro", ], - "together_ai": [ + "togetherai": [ "together_ai/deepseek-ai/DeepSeek-R1", "together_ai/deepseek-ai/DeepSeek-R1-Distill-Llama-70B", "together_ai/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", diff --git a/sdk/agenta/sdk/context/exporting.py b/sdk/agenta/sdk/context/exporting.py new file mode 100644 index 0000000000..2fe03a09cd --- /dev/null +++ b/sdk/agenta/sdk/context/exporting.py @@ -0,0 +1,25 @@ +from typing import Optional + +from contextlib import contextmanager +from contextvars import ContextVar + +from pydantic import BaseModel + + +class ExportingContext(BaseModel): + credentials: Optional[str] = None + + +exporting_context = ContextVar("exporting_context", default=ExportingContext()) + + +@contextmanager +def exporting_context_manager( + *, + context: Optional[ExportingContext] = None, +): + token = exporting_context.set(context) + try: + yield + finally: + exporting_context.reset(token) diff --git a/sdk/agenta/sdk/context/routing.py b/sdk/agenta/sdk/context/routing.py new file mode 100644 index 0000000000..f1972e78df --- /dev/null +++ b/sdk/agenta/sdk/context/routing.py @@ -0,0 +1,27 @@ +from typing import Any, Dict, List, Optional + +from contextlib import contextmanager +from contextvars import ContextVar + +from pydantic import BaseModel + + +class RoutingContext(BaseModel): + parameters: Optional[Dict[str, Any]] = None + secrets: Optional[List[Any]] = None + mock: Optional[str] = None + + +routing_context = ContextVar("routing_context", default=RoutingContext()) + + +@contextmanager +def routing_context_manager( + *, + context: Optional[RoutingContext] = None, +): + token = routing_context.set(context) + try: + yield + finally: + routing_context.reset(token) diff --git a/sdk/agenta/sdk/context/running.py b/sdk/agenta/sdk/context/running.py deleted file mode 100644 index b856685a7c..0000000000 --- a/sdk/agenta/sdk/context/running.py +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Dict, Any, Optional -from contextvars import ContextVar -from contextlib import contextmanager - -from pydantic import BaseModel - -workflow_mode_enabled_context: ContextVar[bool] = ContextVar( - "ag.workflow_context_enabled", - default=False, -) - - -@contextmanager -def workflow_mode_enabled(): - token = workflow_mode_enabled_context.set(True) - try: - yield - finally: - workflow_mode_enabled_context.reset(token) - - -@contextmanager -async def async_workflow_mode_enabled(): - token = workflow_mode_enabled_context.set(True) - try: - yield - finally: - workflow_mode_enabled_context.reset(token) - - -class WorkflowRegistryContext(BaseModel): - version: Optional[str] = None - handlers: Dict[str, Any] = {} - - -workflow_registry_context: ContextVar[WorkflowRegistryContext] = ContextVar( - "ag.workflow_registry", - default=WorkflowRegistryContext(), -) diff --git a/sdk/agenta/sdk/context/serving.py b/sdk/agenta/sdk/context/serving.py deleted file mode 100644 index 6fe648f59e..0000000000 --- a/sdk/agenta/sdk/context/serving.py +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Any, Dict, List, Optional - -from contextlib import contextmanager -from contextvars import ContextVar, Token - -from pydantic import BaseModel - - -class RoutingContext(BaseModel): - parameters: Optional[Dict[str, Any]] = None - secrets: Optional[List[Any]] = None - mock: Optional[str] = None - - @classmethod - def get(cls) -> "RoutingContext": - try: - return routing_context.get() - except LookupError: - return RoutingContext() - - @classmethod - def set(cls, ctx: "RoutingContext") -> Token: - return routing_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return routing_context.reset(token) - - -routing_context: ContextVar[RoutingContext] = ContextVar("routing_context") - - -@contextmanager -def routing_context_manager(context: RoutingContext): - token = RoutingContext.set(context) - try: - yield - finally: - RoutingContext.reset(token) diff --git a/sdk/agenta/sdk/context/tracing.py b/sdk/agenta/sdk/context/tracing.py index 8431fd2757..90f90b8bf9 100644 --- a/sdk/agenta/sdk/context/tracing.py +++ b/sdk/agenta/sdk/context/tracing.py @@ -1,7 +1,7 @@ from typing import Any, Dict, Optional from contextlib import contextmanager -from contextvars import ContextVar, Token +from contextvars import ContextVar from pydantic import BaseModel @@ -13,62 +13,18 @@ class TracingContext(BaseModel): parameters: Optional[Dict[str, Any]] = None references: Optional[Dict[str, Any]] = None link: Optional[Dict[str, Any]] = None - type: Optional[str] = None - @classmethod - def get(cls) -> "TracingContext": - try: - return tracing_context.get() - except LookupError: - return TracingContext() - @classmethod - def set(cls, ctx: "TracingContext") -> Token: - return tracing_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return tracing_context.reset(token) - - -tracing_context: ContextVar[TracingContext] = ContextVar("ag.tracing_context") - - -@contextmanager -def tracing_context_manager(context: TracingContext): - token = TracingContext.set(context) - try: - yield - finally: - TracingContext.reset(token) - - -class OTLPContext(BaseModel): - credentials: Optional[str] = None - - @classmethod - def get(cls) -> "OTLPContext": - try: - return otlp_context.get() - except LookupError: - return OTLPContext() - - @classmethod - def set(cls, ctx: "OTLPContext") -> Token: - return otlp_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return otlp_context.reset(token) - - -otlp_context: ContextVar[OTLPContext] = ContextVar("ag.otlp_context") +tracing_context = ContextVar("tracing_context", default=TracingContext()) @contextmanager -def otlp_context_manager(context: OTLPContext): - token = otlp_context.set(context) +def tracing_context_manager( + *, + context: Optional[TracingContext] = None, +): + token = tracing_context.set(context) try: yield finally: - otlp_context.reset(token) + tracing_context.reset(token) diff --git a/sdk/agenta/sdk/contexts/__init__.py b/sdk/agenta/sdk/contexts/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/contexts/routing.py b/sdk/agenta/sdk/contexts/routing.py deleted file mode 100644 index 4996fdf1f6..0000000000 --- a/sdk/agenta/sdk/contexts/routing.py +++ /dev/null @@ -1,38 +0,0 @@ -from typing import Optional -from contextvars import ContextVar, Token -from contextlib import contextmanager - -from pydantic import BaseModel - - -class RoutingContext(BaseModel): - parameters: Optional[dict] = None - secrets: Optional[list] = None - mock: Optional[str] = None - - @classmethod - def get(cls) -> "RoutingContext": - try: - return routing_context.get() - except LookupError: - return RoutingContext() - - @classmethod - def set(cls, ctx: "RoutingContext") -> Token: - return routing_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return routing_context.reset(token) - - -routing_context: ContextVar[RoutingContext] = ContextVar("routing_context") - - -@contextmanager -def routing_context_manager(context: RoutingContext): - token = RoutingContext.set(context) - try: - yield - finally: - RoutingContext.reset(token) diff --git a/sdk/agenta/sdk/contexts/running.py b/sdk/agenta/sdk/contexts/running.py deleted file mode 100644 index 8359131a77..0000000000 --- a/sdk/agenta/sdk/contexts/running.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional, Union, Callable -from contextvars import Token, ContextVar -from contextlib import contextmanager - - -from pydantic import BaseModel - -from agenta.sdk.models.workflows import ( - WorkflowServiceInterface, - WorkflowServiceConfiguration, -) - - -class RunningContext(BaseModel): - flags: Optional[dict] = None - tags: Optional[dict] = None - meta: Optional[dict] = None - - aggregate: Optional[Union[bool, Callable]] = None # stream to batch - annotate: Optional[bool] = None # annotation vs invocation - - interface: Optional[WorkflowServiceInterface] = None - configuration: Optional[WorkflowServiceConfiguration] = None - parameters: Optional[dict] = None - schemas: Optional[dict] = None - - secrets: Optional[list] = None - credentials: Optional[str] = None - - handler: Optional[Callable] = None - - @classmethod - def get(cls) -> "RunningContext": - try: - return running_context.get() - except LookupError: - return RunningContext() - - @classmethod - def set(cls, ctx: "RunningContext") -> Token: - return running_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return running_context.reset(token) - - -running_context: ContextVar[RunningContext] = ContextVar("running_context") - - -@contextmanager -def running_context_manager(context: RunningContext): - token = RunningContext.set(context) - try: - yield - finally: - RunningContext.reset(token) diff --git a/sdk/agenta/sdk/contexts/tracing.py b/sdk/agenta/sdk/contexts/tracing.py deleted file mode 100644 index 8425350ceb..0000000000 --- a/sdk/agenta/sdk/contexts/tracing.py +++ /dev/null @@ -1,86 +0,0 @@ -from typing import Optional, Union, Callable -from contextvars import ContextVar, Token -from contextlib import contextmanager - -from pydantic import BaseModel - - -class TracingContext(BaseModel): - traceparent: Optional[dict] = None - baggage: Optional[dict] = None - # - credentials: Optional[str] = None - # - script: Optional[dict] = None - parameters: Optional[dict] = None - # - flags: Optional[dict] = None - tags: Optional[dict] = None - meta: Optional[dict] = None - # - references: Optional[dict] = None - links: Optional[dict] = None - # - type: Optional[str] = None - aggregate: Optional[Union[bool, Callable]] = None # stream to batch - annotate: Optional[bool] = None # annotation vs invocation - # - link: Optional[dict] = None - - @classmethod - def get(cls) -> "TracingContext": - try: - return tracing_context.get() - except LookupError: - return TracingContext() - - @classmethod - def set(cls, ctx: "TracingContext") -> Token: - return tracing_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return tracing_context.reset(token) - - -tracing_context: ContextVar[TracingContext] = ContextVar("ag.tracing_context") - - -@contextmanager -def tracing_context_manager(context: TracingContext): - token = TracingContext.set(context) - try: - yield - finally: - TracingContext.reset(token) - - -class OTLPContext(BaseModel): - credentials: Optional[str] = None - - @classmethod - def get(cls) -> "OTLPContext": - try: - return otlp_context.get() - except LookupError: - return OTLPContext() - - @classmethod - def set(cls, ctx: "OTLPContext") -> Token: - return otlp_context.set(ctx) - - @classmethod - def reset(cls, token: Token) -> None: - return otlp_context.reset(token) - - -otlp_context: ContextVar[OTLPContext] = ContextVar("ag.otlp_context") - - -@contextmanager -def otlp_context_manager(context: OTLPContext): - token = OTLPContext.set(context) - try: - yield - finally: - OTLPContext.reset(token) diff --git a/sdk/agenta/sdk/decorators/__init__.py b/sdk/agenta/sdk/decorators/__init__.py index 629cec59bb..e69de29bb2 100644 --- a/sdk/agenta/sdk/decorators/__init__.py +++ b/sdk/agenta/sdk/decorators/__init__.py @@ -1 +0,0 @@ -from .running import application, evaluator diff --git a/sdk/agenta/sdk/decorators/routing.py b/sdk/agenta/sdk/decorators/routing.py index 6f4f8a2318..5dfa828779 100644 --- a/sdk/agenta/sdk/decorators/routing.py +++ b/sdk/agenta/sdk/decorators/routing.py @@ -1,282 +1,711 @@ -# /agenta/sdk/decorators/routing.py - -from typing import Any, Callable, Optional, AsyncGenerator, Union -from json import dumps -from uuid import UUID +from typing import Type, Any, Callable, Dict, Optional, Tuple, List +from inspect import signature, iscoroutinefunction, Signature, Parameter +from functools import wraps from traceback import format_exception - -from fastapi import FastAPI, APIRouter, Request -from fastapi.responses import JSONResponse, StreamingResponse, Response - -from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.models.workflows import ( - WorkflowServiceRequest, - WorkflowServiceStatus, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, - WorkflowServiceBaseResponse, +from asyncio import sleep +from uuid import UUID +from pydantic import BaseModel, HttpUrl, ValidationError +from os import environ + +from fastapi import Body, FastAPI, HTTPException, Request + +from agenta.sdk.middleware.mock import MockMiddleware +from agenta.sdk.middleware.inline import InlineMiddleware +from agenta.sdk.middleware.vault import VaultMiddleware +from agenta.sdk.middleware.config import ConfigMiddleware +from agenta.sdk.middleware.otel import OTelMiddleware +from agenta.sdk.middleware.auth import AuthMiddleware +from agenta.sdk.middleware.cors import CORSMiddleware + +from agenta.sdk.context.routing import ( + routing_context_manager, + RoutingContext, +) +from agenta.sdk.context.tracing import ( + tracing_context_manager, + tracing_context, + TracingContext, +) +from agenta.sdk.router import router +from agenta.sdk.utils.exceptions import suppress, display_exception +from agenta.sdk.utils.logging import get_module_logger +from agenta.sdk.utils.helpers import get_current_version +from agenta.sdk.types import ( + MultipleChoice, + BaseResponse, + MCField, ) -from agenta.sdk.middlewares.routing.cors import CORSMiddleware -from agenta.sdk.middlewares.routing.auth import AuthMiddleware -from agenta.sdk.middlewares.routing.otel import OTelMiddleware -from agenta.sdk.contexts.running import running_context_manager, RunningContext -from agenta.sdk.contexts.tracing import tracing_context_manager, TracingContext -from agenta.sdk.decorators.running import auto_workflow, Workflow -from agenta.sdk.workflows.errors import ErrorStatus +import agenta as ag -def create_app(**kwargs: Any) -> FastAPI: - app = FastAPI(**kwargs) +log = get_module_logger(__name__) - app.add_middleware(CORSMiddleware) - app.add_middleware(AuthMiddleware) - app.add_middleware(OTelMiddleware) +AGENTA_RUNTIME_PREFIX = environ.get("AGENTA_RUNTIME_PREFIX", "") - return app +app = FastAPI( + docs_url=f"{AGENTA_RUNTIME_PREFIX}/docs", # Swagger UI + openapi_url=f"{AGENTA_RUNTIME_PREFIX}/openapi.json", # OpenAPI schema +) +app.include_router(router, prefix=AGENTA_RUNTIME_PREFIX) -default_app: FastAPI = create_app() +class PathValidator(BaseModel): + url: HttpUrl -def _pick_stream_format(request: Request) -> str: - if "text/event-stream" in request.headers.get("accept", ""): - return "sse" - return "ndjson" +class route: # pylint: disable=invalid-name + # This decorator is used to expose specific stages of a workflow (embedding, retrieval, summarization, etc.) + # as independent endpoints. It is designed for backward compatibility with existing code that uses + # the @entrypoint decorator, which has certain limitations. By using @route(), we can create new + # routes without altering the main workflow entrypoint. This helps in modularizing the services + # and provides flexibility in how we expose different functionalities as APIs. + def __init__( + self, + path: Optional[str] = "/", + config_schema: Optional[BaseModel] = None, + ): + self.config_schema: BaseModel = config_schema + path = "/" + path.strip("/").strip() + path = "" if path == "/" else path + PathValidator(url=f"http://example.com{path}") -def _ndjson_stream(aiter: AsyncGenerator[Any, None]): - async def gen(): - async for chunk in aiter: - yield dumps(chunk, ensure_ascii=False) + "\n" + self.route_path = path - return gen() + self.e = None + def __call__(self, f): + self.e = entrypoint( + f, + route_path=self.route_path, + config_schema=self.config_schema, + ) -def _sse_stream(aiter: AsyncGenerator[Any, None]): - async def gen(): - async for chunk in aiter: - yield "data: " + dumps(chunk, ensure_ascii=False) + "\n\n" + return f - return gen() +class entrypoint: + """ + Decorator class to wrap a function for HTTP POST, terminal exposure and enable tracing. -def _set_common_headers( - res: Response, - response: WorkflowServiceBaseResponse, -) -> Response: - res.headers.setdefault("x-ag-version", response.version or "unknown") + This decorator generates the following endpoints: - if response.trace_id: - res.headers.setdefault("x-ag-trace-id", response.trace_id) + Playground Endpoints + - /generate with @entrypoint, @route("/"), @route(path="") # LEGACY + - /playground/run with @entrypoint, @route("/"), @route(path="") + - /playground/run/{route} with @route({route}), @route(path={route}) - if response.span_id: - res.headers.setdefault("x-ag-span-id", response.span_id) + Deployed Endpoints: + - /generate_deployed with @entrypoint, @route("/"), @route(path="") # LEGACY + - /run with @entrypoint, @route("/"), @route(path="") + - /run/{route} with @route({route}), @route(path={route}) - return res + The rationale is: + - There may be multiple endpoints, based on the different routes. + - It's better to make it explicit that an endpoint is for the playground. + - Prefixing the routes with /run is more futureproof in case we add more endpoints. + Example: + ```python + import agenta as ag -def _make_json_response( - response: WorkflowServiceBatchResponse, -) -> JSONResponse: - res = JSONResponse( - status_code=((response.status.code or 200) if response.status else 200), - content=response.model_dump(mode="json", exclude_none=True), - ) + @ag.entrypoint + async def chain_of_prompts_llm(prompt: str): + return ... + ``` + """ - return _set_common_headers(res, response) # type: ignore + routes = list() + _middleware = False + _run_path = f"{AGENTA_RUNTIME_PREFIX}/run" + _test_path = f"{AGENTA_RUNTIME_PREFIX}/test" + _config_key = "ag_config" + # LEGACY + _legacy_generate_path = f"{AGENTA_RUNTIME_PREFIX}/generate" + _legacy_generate_deployed_path = f"{AGENTA_RUNTIME_PREFIX}/generate_deployed" -def _make_stream_response( - req: Request, - response: WorkflowServiceStreamResponse, -) -> StreamingResponse: - aiter = response.iterator() + def __init__( + self, + func: Callable[..., Any], + route_path: str = "", + config_schema: Optional[BaseModel] = None, + ): + self.func = func + self.route_path = route_path + self.config_schema = config_schema + + signature_parameters = signature(func).parameters + config, default_parameters = self.parse_config() + + ### --- Middleware --- # + if not entrypoint._middleware: + entrypoint._middleware = True + app.add_middleware(MockMiddleware) + app.add_middleware(InlineMiddleware) + app.add_middleware(VaultMiddleware) + app.add_middleware(ConfigMiddleware) + app.add_middleware(AuthMiddleware) + app.add_middleware(OTelMiddleware) + app.add_middleware(CORSMiddleware) + ### ------------------ # + + ### --- Run --- # + @wraps(func) + async def run_wrapper(request: Request, *args, **kwargs) -> Any: + # LEGACY + # TODO: Removing this implies breaking changes in : + # - calls to /generate_deployed + kwargs = { + k: v + for k, v in kwargs.items() + if k not in ["config", "environment", "app"] + } + # LEGACY + + kwargs, _ = self.process_kwargs(kwargs, default_parameters) + if ( + request.state.config["parameters"] is None + or request.state.config["references"] is None + ): + raise HTTPException( + status_code=400, + detail="Config not found based on provided references.", + ) - if _pick_stream_format(req) == "sse": - res = StreamingResponse( - _sse_stream(aiter), - media_type="text/event-stream", - ) - else: - res = StreamingResponse( - _ndjson_stream(aiter), - media_type="application/x-ndjson", + return await self.execute_wrapper(request, *args, **kwargs) + + self.update_run_wrapper_signature(wrapper=run_wrapper) + + run_route = f"{route_path}{entrypoint._run_path}" + app.post( + run_route, + response_model=BaseResponse, + response_model_exclude_none=True, + )(run_wrapper) + + # LEGACY + # TODO: Removing this implies breaking changes in : + # - calls to /generate_deployed must be replaced with calls to /run + if route_path == "": + run_route = entrypoint._legacy_generate_deployed_path + app.post( + run_route, + response_model=BaseResponse, + response_model_exclude_none=True, + )(run_wrapper) + # LEGACY + ### ----------- # + + ### --- Test --- # + @wraps(func) + async def test_wrapper(request: Request, *args, **kwargs) -> Any: + kwargs, config = self.process_kwargs(kwargs, default_parameters) + request.state.inline = True + request.state.config["parameters"] = config + if request.state.config["references"]: + request.state.config["references"] = { + k: v + for k, v in request.state.config["references"].items() + if k.startswith("application") + } or None + return await self.execute_wrapper(request, *args, **kwargs) + + self.update_test_wrapper_signature(wrapper=test_wrapper, config_instance=config) + + test_route = f"{route_path}{entrypoint._test_path}" + app.post( + test_route, + response_model=BaseResponse, + response_model_exclude_none=True, + )(test_wrapper) + + # LEGACY + # TODO: Removing this implies breaking changes in : + # - calls to /generate must be replaced with calls to /test + if route_path == "": + test_route = entrypoint._legacy_generate_path + app.post( + test_route, + response_model=BaseResponse, + response_model_exclude_none=True, + )(test_wrapper) + # LEGACY + + ### --- OpenAPI --- # + test_route = f"{route_path}{entrypoint._test_path}" + entrypoint.routes.append( + { + "func": func.__name__, + "endpoint": test_route, + "params": signature_parameters, + "config": config, + } ) - return _set_common_headers(res, response) # type: ignore + # LEGACY + if route_path == "": + test_route = entrypoint._legacy_generate_path + entrypoint.routes.append( + { + "func": func.__name__, + "endpoint": test_route, + "params": ( + {**default_parameters, **signature_parameters} + if not config + else signature_parameters + ), + "config": config, + } + ) + # LEGACY + + openapi_schema = self.openapi() + + for _route in entrypoint.routes: + if _route["config"] is not None: + self.override_config_in_schema( + openapi_schema=openapi_schema, + func_name=_route["func"], + endpoint=_route["endpoint"].replace(AGENTA_RUNTIME_PREFIX, ""), + config=_route["config"], + ) + app.openapi_schema = openapi_schema + ### --------------- # -async def handle_invoke_success( - req: Request, - response: Any, -) -> Response: - if isinstance(response, WorkflowServiceBatchResponse): - return _make_json_response(response) + def parse_config(self) -> Tuple[Optional[Type[BaseModel]], Dict[str, Any]]: + """Parse the config schema and return the config class and default parameters.""" + config = None + default_parameters = {} - if isinstance(response, WorkflowServiceStreamResponse): - return _make_stream_response(req, response) + if self.config_schema: + try: + config = self.config_schema() if self.config_schema else None + default_parameters = config.dict() if config else {} + except ValidationError as e: + raise ValueError( + f"Error initializing config_schema. Please ensure all required fields have default values: {str(e)}" + ) from e + except Exception as e: + raise ValueError( + f"Unexpected error initializing config_schema: {str(e)}" + ) from e + + return config, default_parameters + + def process_kwargs( + self, kwargs: Dict[str, Any], default_parameters: Dict[str, Any] + ) -> Tuple[Dict[str, Any], Dict[str, Any]]: + """Remove the config parameters from the kwargs.""" + # Extract agenta_config if present + config_params = kwargs.pop(self._config_key, {}) + if isinstance(config_params, BaseModel): + config_params = config_params.dict() + # Merge with default parameters + config = {**default_parameters, **config_params} + + return kwargs, config + + async def execute_wrapper( + self, + request: Request, + *args, + **kwargs, + ): + if not request: + raise HTTPException(status_code=500, detail="Missing 'request'.") + + state = request.state + traceparent = state.otel.get("traceparent") + baggage = state.otel.get("baggage") + credentials = state.auth.get("credentials") + parameters = state.config.get("parameters") + references = state.config.get("references") + secrets = state.vault.get("secrets") + inline = state.inline + mock = state.mock + + with routing_context_manager( + context=RoutingContext( + parameters=parameters, + secrets=secrets, + mock=mock, + ) + ): + with tracing_context_manager( + context=TracingContext( + traceparent=traceparent, + baggage=baggage, + credentials=credentials, + parameters=parameters, + references=references, + ) + ): + try: + result = ( + await self.func(*args, **kwargs) + if iscoroutinefunction(self.func) + else self.func(*args, **kwargs) + ) - batch = WorkflowServiceBatchResponse(data=response) + return await self.handle_success(result, inline) - return _make_json_response(batch) + except Exception as error: # pylint: disable=broad-except + self.handle_failure(error) + async def handle_success( + self, + result: Any, + inline: bool, + ): + data = None + tree = None + content_type = "text/plain" + tree_id = None + trace_id = None + span_id = None + + with suppress(): + if isinstance(result, (dict, list)): + content_type = "application/json" + data = self.patch_result(result) + + ( + tree, + tree_id, + trace_id, + span_id, + ) = await self.fetch_inline_trace(inline) + + try: + return BaseResponse( + data=data, + tree=tree, + content_type=content_type, + tree_id=tree_id, + trace_id=trace_id, + span_id=span_id, + ) + except: # pylint: disable=bare-except + try: + return BaseResponse( + data=data, + content_type=content_type, + tree_id=tree_id, + trace_id=trace_id, + span_id=span_id, + ) + except: # pylint: disable=bare-except + return BaseResponse( + data=data, + content_type=content_type, + ) -async def handle_invoke_failure(exception: Exception) -> Response: - status = None + def handle_failure( + self, + error: Exception, + ): + display_exception("Application Exception") - if isinstance(exception, ErrorStatus): - status = WorkflowServiceStatus( - type=exception.type, - code=exception.code, - message=exception.message, - stacktrace=exception.stacktrace, + status_code = ( + getattr(error, "status_code") if hasattr(error, "status_code") else 500 ) + if status_code in [401, 403]: # Reserved HTTP codes for auth middleware + status_code = 424 # Proxy Authentication Required - else: - type = "https://docs.agenta.ai/errors#v1:sdk:unknown-workflow-invoke-error" + stacktrace = format_exception(error, value=error, tb=error.__traceback__) # type: ignore - code = ( - getattr(exception, "status_code") - if hasattr(exception, "status_code") - else 500 + raise HTTPException( + status_code=status_code, + detail={"message": str(error), "stacktrace": stacktrace}, ) - if code in [401, 403]: - code = 424 + def patch_result( + self, + result: Any, + ): + """ + Patch the result to only include the message if the result is a FuncResponse-style dictionary with message, cost, and usage keys. + + Example: + ```python + result = { + "message": "Hello, world!", + "cost": 0.5, + "usage": { + "prompt_tokens": 10, + "completion_tokens": 20, + "total_tokens": 30 + } + } + result = patch_result(result) + print(result) + # Output: "Hello, world!" + ``` + """ + data = ( + result["message"] + if isinstance(result, dict) + and all(key in result for key in ["message", "cost", "usage"]) + else result + ) - message = str(exception) or "Internal Server Error" + if data is None: + data = ( + "Function executed successfully, but did return None. \n Are you sure you did not forget to return a value?", + ) - stacktrace = format_exception( - exception, # type: ignore - value=exception, - tb=exception.__traceback__, - ) + if not isinstance(result, dict): + data = str(data) - status = WorkflowServiceStatus( - type=type, - code=code, - message=message, - stacktrace=stacktrace, - ) + return data - trace_id = None - span_id = None + async def fetch_inline_trace_id( + self, + ): + context = tracing_context.get() - with suppress(): - link = (TracingContext.get().link) or {} + link = context.link _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None + tree_id = ( + str(UUID(int=_trace_id)) if _trace_id else None + ) # in uuid_as_str format - error = WorkflowServiceBatchResponse( - status=status, - trace_id=trace_id, - span_id=span_id, - ) + return tree_id - return _make_json_response(error) + async def fetch_inline_trace( + self, + inline: bool, + ): + TIMEOUT = 1 + TIMESTEP = 0.1 + NOFSTEPS = TIMEOUT / TIMESTEP + context = tracing_context.get() -async def handle_inspect_success( - request: Optional[WorkflowServiceRequest], -): - if request: - return JSONResponse(request.model_dump(mode="json", exclude_none=True)) + link = context.link - return JSONResponse({"details": {"message": "Workflow not found"}}, status_code=404) + _trace_id = link.get("trace_id") if link else None # in int format + _span_id = link.get("span_id") if link else None # in int format + tree = None + tree_id = str(UUID(int=_trace_id)) if _trace_id else None + trace_id = UUID(int=_trace_id).hex if _trace_id else None + span_id = UUID(int=_span_id).hex[16:] if _span_id else None -async def handle_inspect_failure(exception: Exception) -> Response: - code = ( - getattr(exception, "status_code") if hasattr(exception, "status_code") else 500 - ) + if _trace_id is not None: + if inline: + remaining_steps = NOFSTEPS + while ( + not ag.tracing.is_inline_trace_ready(_trace_id) + and remaining_steps > 0 + ): + await sleep(TIMESTEP) - if code in [401, 403]: - code = 424 + remaining_steps -= 1 - message = str(exception) or "Internal Server Error" + tree = ag.tracing.get_inline_trace(_trace_id) - return JSONResponse({"details": message}, status_code=code) + return tree, tree_id, trace_id, span_id + # --- OpenAPI --- # -class route: - def __init__( + def add_request_to_signature( self, - path: str = "/", - app: Optional[FastAPI] = None, - router: Optional[APIRouter] = None, + wrapper: Callable[..., Any], ): - path = path.rstrip("/") - path = path if path else "/" - path = path if path.startswith("/") else "/" + path - self.path = path - self.root = app or router or default_app - - def __call__(self, foo: Optional[Union[Callable[..., Any], Workflow]] = None): - if foo is None: - return self - - workflow = auto_workflow(foo) - - async def invoke_endpoint(req: Request, request: WorkflowServiceRequest): - credentials = req.state.auth.get("credentials") - - try: - response = await workflow.invoke( - request=request, - credentials=credentials, - ) - - return await handle_invoke_success(req, response) - - except Exception as exception: - return await handle_invoke_failure(exception) - - async def inspect_endpoint(req: Request): - credentials = req.state.auth.get("credentials") + original_sig = signature(wrapper) + parameters = [ + Parameter( + "request", + kind=Parameter.POSITIONAL_OR_KEYWORD, + annotation=Request, + ), + *original_sig.parameters.values(), + ] + new_sig = Signature( + parameters, + return_annotation=original_sig.return_annotation, + ) + wrapper.__signature__ = new_sig - try: - request = await workflow.inspect( - credentials=credentials, - ) + def update_wrapper_signature( + self, wrapper: Callable[..., Any], updated_params: List + ): + """ + Updates the signature of a wrapper function with a new list of parameters. - return await handle_inspect_success(request) - - except Exception as exception: - return await handle_inspect_failure(exception) - - invoke_responses: dict = { - 200: { - "description": "Response batch JSON or stream NDJSON/SSE", - "content": { - "application/json": { - "schema": WorkflowServiceBatchResponse.model_json_schema() - }, - "application/x-ndjson": { - "schema": {"type": "string", "description": "NDJSON stream"} - }, - "text/event-stream": { - "schema": {"type": "string", "description": "SSE stream"} - }, - }, - } - } + Args: + wrapper (callable): A callable object, such as a function or a method, that requires a signature update. + updated_params (List[Parameter]): A list of `Parameter` objects representing the updated parameters + for the wrapper function. + """ - self.root.add_api_route( - self.path + "/invoke", - invoke_endpoint, - methods=["POST"], - responses=invoke_responses, - ) + wrapper_signature = signature(wrapper) + wrapper_signature = wrapper_signature.replace(parameters=updated_params) + wrapper.__signature__ = wrapper_signature # type: ignore - self.root.add_api_route( - self.path + "/inspect", - inspect_endpoint, - methods=["GET"], - response_model=WorkflowServiceRequest, + def update_test_wrapper_signature( + self, + wrapper: Callable[..., Any], + config_instance: Type[BaseModel], # TODO: change to our type + ) -> None: + """Update the function signature to include new parameters.""" + + updated_params: List[Parameter] = [] + self.add_config_params_to_parser(updated_params, config_instance) + self.add_func_params_to_parser(updated_params) + self.update_wrapper_signature(wrapper, updated_params) + self.add_request_to_signature(wrapper) + + def update_run_wrapper_signature( + self, + wrapper: Callable[..., Any], + ) -> None: + """Update the function signature to include new parameters.""" + + updated_params: List[Parameter] = [] + self.add_func_params_to_parser(updated_params) + self.update_wrapper_signature(wrapper, updated_params) + self.add_request_to_signature(wrapper) + + def add_config_params_to_parser( + self, updated_params: list, config_instance: Type[BaseModel] + ) -> None: + """Add configuration parameters to function signature.""" + + for name, field in config_instance.model_fields.items(): + assert field.default is not None, f"Field {name} has no default value" + + updated_params.append( + Parameter( + name=self._config_key, + kind=Parameter.KEYWORD_ONLY, + annotation=type(config_instance), # Get the actual class type + default=Body(config_instance), # Use the instance directly + ) ) - return foo + def add_func_params_to_parser(self, updated_params: list) -> None: + """Add function parameters to function signature.""" + for name, param in signature(self.func).parameters.items(): + assert ( + len(param.default.__class__.__bases__) == 1 + ), f"Inherited standard type of {param.default.__class__} needs to be one." + updated_params.append( + Parameter( + name, + Parameter.KEYWORD_ONLY, + default=Body(..., embed=True), + annotation=param.default.__class__.__bases__[ + 0 + ], # determines and get the base (parent/inheritance) type of the sdk-type at run-time. \ + # E.g __class__ is ag.MessagesInput() and accessing it parent type will return (<class 'list'>,), \ + # thus, why we are accessing the first item. + ) + ) + + def openapi(self): + app.openapi_schema = None # Forces FastAPI to re-generate the schema + + openapi_schema = app.openapi() + + # ✅ Fix paths by removing the prefix + updated_paths = {} + for path, methods in openapi_schema["paths"].items(): + new_path = ( + path[len(AGENTA_RUNTIME_PREFIX) :] + if path.startswith(AGENTA_RUNTIME_PREFIX) + else path + ) + updated_paths[new_path] = methods + openapi_schema["paths"] = updated_paths # Replace paths + + # ✅ Fix schema names and update `$ref` references + if "components" in openapi_schema and "schemas" in openapi_schema["components"]: + updated_schemas = {} + schema_name_map = {} # Map old schema names to new schema names + + for schema_name, schema_value in openapi_schema["components"][ + "schemas" + ].items(): + if AGENTA_RUNTIME_PREFIX and AGENTA_RUNTIME_PREFIX != "": + new_schema_name = schema_name.replace( + AGENTA_RUNTIME_PREFIX.lstrip("/").replace("/", "_") + "_", "" + ).strip("_") + else: + new_schema_name = schema_name + updated_schemas[new_schema_name] = schema_value + schema_name_map[schema_name] = new_schema_name # Store mapping + + # ✅ Fix `$ref` references + for path, methods in updated_paths.items(): + for method in methods.values(): + if "requestBody" in method and "content" in method["requestBody"]: + for content_type, content in method["requestBody"][ + "content" + ].items(): + if "$ref" in content["schema"]: + old_ref = content["schema"]["$ref"] + schema_name = old_ref.split("/")[ + -1 + ] # Extract schema name + if schema_name in schema_name_map: + content["schema"][ + "$ref" + ] = f"#/components/schemas/{schema_name_map[schema_name]}" + + if "responses" in method: + for status_code, response in method["responses"].items(): + if "content" in response: + for content_type, content in response[ + "content" + ].items(): + if "$ref" in content["schema"]: + old_ref = content["schema"]["$ref"] + schema_name = old_ref.split("/")[ + -1 + ] # Extract schema name + if schema_name in schema_name_map: + content["schema"][ + "$ref" + ] = f"#/components/schemas/{schema_name_map[schema_name]}" + + # ✅ Update OpenAPI schema with fixed schemas + openapi_schema["components"]["schemas"] = updated_schemas + + # ✅ Add Agenta SDK version info + openapi_schema["agenta_sdk"] = {"version": get_current_version()} + + return openapi_schema + + def override_config_in_schema( + self, + openapi_schema: dict, + func_name: str, + endpoint: str, + config: Type[BaseModel], + ): + """Override config in OpenAPI schema to add agenta-specific metadata.""" + endpoint = endpoint[1:].replace("/", "_") + + # Get the config class name to find its schema + config_class_name = type(config).__name__ + config_schema = openapi_schema["components"]["schemas"][config_class_name] + # Process each field in the config class + for field_name, field in config.__class__.model_fields.items(): + # Check if field has Annotated metadata for MultipleChoice + if hasattr(field, "metadata") and field.metadata: + for meta in field.metadata: + if isinstance(meta, MultipleChoice): + choices = meta.choices + if isinstance(choices, dict): + config_schema["properties"][field_name].update( + {"x-parameter": "grouped_choice", "choices": choices} + ) + elif isinstance(choices, list): + config_schema["properties"][field_name].update( + {"x-parameter": "choice", "enum": choices} + ) diff --git a/sdk/agenta/sdk/decorators/running.py b/sdk/agenta/sdk/decorators/running.py deleted file mode 100644 index 0a44bcd072..0000000000 --- a/sdk/agenta/sdk/decorators/running.py +++ /dev/null @@ -1,732 +0,0 @@ -# /agenta/sdk/decorators/running.py - -from typing import Any, Callable, Optional, Protocol, Union, Dict -from functools import update_wrapper, wraps -from typing import Callable, Any -from inspect import signature -from uuid import UUID, uuid4 - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.models.workflows import ( - WorkflowRevisionData, - WorkflowRevision, - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceInterface, - WorkflowServiceConfiguration, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, - Reference, - Link, -) -from agenta.sdk.contexts.running import RunningContext, running_context_manager -from agenta.sdk.contexts.tracing import TracingContext, tracing_context_manager -from agenta.sdk.middlewares.running.normalizer import ( - NormalizerMiddleware, -) -from agenta.sdk.middlewares.running.resolver import ( - ResolverMiddleware, - resolve_interface, - resolve_configuration, -) -from agenta.sdk.middlewares.running.vault import ( - VaultMiddleware, - get_secrets, -) -from agenta.sdk.decorators.tracing import auto_instrument -from agenta.sdk.workflows.utils import ( - register_handler, - retrieve_handler, - retrieve_interface, - retrieve_configuration, - is_custom_uri, -) - -import agenta as ag - - -log = get_module_logger(__name__) - - -class InvokeFn(Protocol): - async def __call__( - self, - request: Union[WorkflowServiceRequest, dict], - ) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - ... - - -class InspectFn(Protocol): - async def __call__(self) -> WorkflowServiceRequest: - ... - - -class Workflow: - def __init__(self, fn: Callable[..., Any]): - self._fn = fn - - update_wrapper(self, fn) - - # self.invoke: InvokeFn - # self.inspect: InspectFn - self.workflow: workflow - - async def invoke( - self, - *, - request: Union[WorkflowServiceRequest, dict], - # - secrets: Optional[list] = None, - credentials: Optional[str] = None, - # - **kwargs, - ) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - ... - - async def inspect( - self, - *, - credentials: Optional[str] = None, - # - **kwargs, - ) -> WorkflowServiceRequest: - ... - - def __call__(self, *args, **kwargs) -> Any: - return self._fn(*args, **kwargs) - - def __repr__(self) -> str: - return repr(self._fn) - - def __str__(self) -> str: - return str(self._fn) - - -class workflow: - def __init__( - self, - *, - # -------------------------------------------------------------------- # - id: Optional[UUID] = None, - slug: Optional[str] = None, - version: Optional[str] = None, - # - references: Optional[Dict[str, Union[Reference, Dict[str, Any]]]] = None, - # -------------------------------------------------------------------- # - links: Optional[Dict[str, Union[Link, Dict[str, Any]]]] = None, - # -------------------------------------------------------------------- # - name: Optional[str] = None, - description: Optional[str] = None, - # -------------------------------------------------------------------- # - flags: Optional[dict] = None, - tags: Optional[dict] = None, - meta: Optional[dict] = None, - # -------------------------------------------------------------------- # - uri: Optional[str] = None, - url: Optional[str] = None, - headers: Optional[dict] = None, - schemas: Optional[dict] = None, - # - interface: Optional[ - Union[ - WorkflowServiceInterface, - Dict[str, Any], - ] - ] = None, - # -------------------------------------------------------------------- # - script: Optional[dict] = None, - parameters: Optional[dict] = None, - # - configuration: Optional[ - Union[ - WorkflowServiceConfiguration, - Dict[str, Any], - ] - ] = None, - # -------------------------------------------------------------------- # - aggregate: Optional[Union[bool, Callable]] = None, # stream to batch - annotate: Optional[bool] = None, # annotation vs invocation - # -------------------------------------------------------------------- # - **kwargs, - ): - # -------------------------------------------------------------------- # - self.id = id - self.slug = slug - self.version = version - # - self.references = references # FIX TYPING - # -------------------------------------------------------------------- # - self.links = links - # -------------------------------------------------------------------- # - self.name = name - self.description = description - # -------------------------------------------------------------------- # - self.flags = flags - self.tags = tags - self.meta = meta - # -------------------------------------------------------------------- # - self.uri = uri - self.url = url - self.headers = headers - self.schemas = schemas - # - self.interface = interface - # -------------------------------------------------------------------- # - self.script = script - self.parameters = parameters - # - self.configuration = configuration - # -------------------------------------------------------------------- # - self.aggregate = aggregate - self.annotate = annotate - # -------------------------------------------------------------------- # - self.kwargs = kwargs - # -------------------------------------------------------------------- # - - self.handler = None - - self.middlewares = [ - VaultMiddleware(), - ResolverMiddleware(), - NormalizerMiddleware(), - ] - - self.default_request = None - - self.uri = uri or (interface.uri if interface else None) - - if self.uri is not None: - self._retrieve_handler(self.uri) - - if self.handler: - self.interface = retrieve_interface(self.uri) or self.interface - if isinstance(self.interface, WorkflowServiceInterface): - self.uri = self.interface.uri or self.uri - self.configuration = self.configuration or retrieve_configuration( - self.uri - ) - if not isinstance(self.configuration, WorkflowServiceConfiguration): - self.configuration = WorkflowServiceConfiguration() - self.configuration.parameters = ( - self.parameters or self.configuration.parameters - ) - self.parameters = self.configuration.parameters - - if is_custom_uri(self.uri): - self.flags = self.flags or dict() - self.flags["is_custom"] = True - - def __call__(self, handler: Optional[Callable[..., Any]] = None) -> Workflow: - if self.handler is None and handler is not None: - self._register_handler( - handler, - uri=self.uri, - ) - - if self.handler is not None: - self._extend_handler() - - if is_custom_uri(self.uri): - self.flags = self.flags or dict() - self.flags["is_custom"] = True - - return self.handler - - raise NotImplementedError("workflow without handler is not implemented yet") - - def _register_handler( - self, - handler: Optional[Callable[..., Any]] = None, - uri: Optional[str] = None, - ): - """Register a handler function with the workflow system. - - Takes a callable handler, instruments it for observability, and registers it - in the global handler registry with a URI. Also initializes or updates the - workflow's interface with the URI and schemas. - - Args: - handler: The callable function to register as the workflow handler - uri: Optional URI to use for registration; if None, one will be generated - """ - if handler is not None and callable(handler): - instrumented = auto_instrument(handler) - uri = register_handler(instrumented, uri=uri) - if self.interface is None: - self.interface = WorkflowServiceInterface() - self.uri = uri - self.interface.uri = uri - self.interface.schemas = self.schemas - self.handler = instrumented - - def _retrieve_handler(self, uri: str): - self.handler = retrieve_handler(uri) - if self.handler is None: - raise ValueError(f"Unable to retrieve handler for URI: {uri}") - if self.interface is None: - self.interface = WorkflowServiceInterface() - self.uri = uri - self.interface.uri = uri - self.interface.schemas = self.schemas - - def _extend_handler(self): - """Extend the registered handler with additional workflow capabilities. - - Wraps the handler function to: - 1. Automatically inject workflow parameters if the handler expects them - 2. Expose workflow-specific methods (invoke, inspect) on the handler - 3. Mark the handler with is_workflow flag for identification - 4. Wrap everything in a Workflow object for consistent interface - - This transforms a plain function into a full-featured workflow that can be - invoked programmatically via .invoke() or inspected via .inspect(). - - Raises: - RuntimeError: If no handler has been registered yet - ValueError: If handler becomes None during extension (should never happen) - """ - if self.handler is None: - raise RuntimeError("No handler registered") - - func = self.handler - - @wraps(func) - def wrapper(*args: Any, **kwargs: Any): - if "parameters" in signature(func).parameters: - return func( - *args, - **{**{"parameters": self.parameters}, **kwargs}, - ) - else: - return func(*args, **kwargs) - - # expose workflow extras - wrapper.invoke = self.invoke # type: ignore[attr-defined] - wrapper.inspect = self.inspect # type: ignore[attr-defined] - wrapper.is_workflow = True # type: ignore[attr-defined] - - if self.handler is None: - raise ValueError("handler must be set before extending") - - self.handler = Workflow(wrapper) - - async def invoke( - self, - *, - request: WorkflowServiceRequest, - # - secrets: Optional[list] = None, - credentials: Optional[str] = None, - # - **kwargs, - ) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - _flags = {**(self.flags or {}), **(request.flags or {})} - _tags = {**(self.tags or {}), **(request.tags or {})} - _meta = {**(self.meta or {}), **(request.meta or {})} - - credentials = credentials or ( - f"ApiKey {ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key}" - if ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key - else None - ) - - with tracing_context_manager(TracingContext.get()): - tracing_ctx = TracingContext.get() - - tracing_ctx.credentials = credentials - - tracing_ctx.aggregate = self.aggregate - tracing_ctx.annotate = self.annotate - - tracing_ctx.flags = _flags - tracing_ctx.tags = _tags - tracing_ctx.meta = _meta - - tracing_ctx.references = self.references - tracing_ctx.links = self.links - - with running_context_manager(RunningContext.get()): - running_ctx = RunningContext.get() - - running_ctx.secrets = secrets - running_ctx.credentials = credentials - - running_ctx.interface = self.interface - running_ctx.schemas = self.schemas - running_ctx.configuration = self.configuration - running_ctx.parameters = self.parameters - - running_ctx.aggregate = self.aggregate - running_ctx.annotate = self.annotate - - async def terminal(req: WorkflowServiceRequest): - return None - - call_next = terminal - - for mw in reversed(self.middlewares): - prev_next = call_next - - async def make_call(mw, prev_next): - async def _call( - req: WorkflowServiceRequest, - ): - return await mw(req, prev_next) - - return _call - - call_next = await make_call(mw, prev_next) - - return await call_next(request) - - async def inspect( - self, - *, - credentials: Optional[str] = None, - # - **kwargs, - ) -> WorkflowServiceRequest: - with tracing_context_manager(TracingContext.get()): - tracing_ctx = TracingContext.get() - - tracing_ctx.credentials = credentials - - tracing_ctx.aggregate = self.aggregate - tracing_ctx.annotate = self.annotate - - tracing_ctx.references = self.references - tracing_ctx.links = self.links - - with running_context_manager(RunningContext.get()): - running_ctx = RunningContext.get() - - running_ctx.credentials = credentials - - running_ctx.interface = self.interface - running_ctx.schemas = self.schemas - running_ctx.configuration = self.configuration - running_ctx.parameters = self.parameters - - running_ctx.aggregate = self.aggregate - running_ctx.annotate = self.annotate - - if self.default_request is None: - interface = await resolve_interface( - interface=self.interface, - **self.kwargs, - ) - configuration = await resolve_configuration( - configuration=self.configuration, - **self.kwargs, - ) - - self.default_request = WorkflowServiceRequest( - # - interface=interface, - configuration=configuration, - # - references=self.references, - links=self.links, - # - flags=self.flags, - tags=self.tags, - meta=self.meta, - # - data=WorkflowServiceRequestData( - revision=WorkflowRevision( - id=self.id, - slug=self.slug, - version=self.version, - # - name=self.name, - description=self.description, - ).model_dump( - mode="json", - exclude_none=True, - ), - ), - ) - - return self.default_request - - -def is_workflow(obj: Any) -> bool: - return getattr(obj, "is_workflow", False) or isinstance( - getattr(obj, "workflow", None), workflow - ) - - -def auto_workflow(obj: Any, **kwargs) -> Workflow: - if is_workflow(obj): - return obj - if isinstance(obj, workflow): - return obj() - if isinstance(getattr(obj, "workflow", None), workflow): - return obj - - return workflow(**kwargs)(obj) - - -async def invoke_workflow( - request: WorkflowServiceRequest, - # - secrets: Optional[list] = None, - credentials: Optional[str] = None, - # - **kwargs, -) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - return await workflow( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - # - **kwargs, - )().invoke( - request=request, - # - secrets=secrets, - credentials=credentials, - # - **kwargs, - ) - - -async def inspect_workflow( - request: WorkflowServiceRequest, - # - credentials: Optional[str] = None, - # - **kwargs, -) -> WorkflowServiceRequest: - return await workflow( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - )().inspect( - credentials=credentials, - # - **kwargs, - ) - - -class application(workflow): - def __init__( - self, - # - slug: Optional[str] = None, - *, - name: Optional[str] = None, - description: Optional[str] = None, - # - parameters: Optional[dict] = None, - schemas: Optional[dict] = None, - # - variant_slug: Optional[str] = None, - # - **kwargs, - ): - kwargs["flags"] = dict( - # is_custom=False, # None / False / missing is the same - # is_evaluator=False, # None / False / missing is the same - # is_human=False, # None / False / missing is the same - ) - - if not "references" in kwargs or not isinstance(kwargs["references"], dict): - kwargs["references"] = dict() - - for key in kwargs["references"]: - if key.startswith("evaluator_"): - del kwargs["references"][key] - - if slug is not None: - kwargs["references"]["application"] = {"slug": slug} - if variant_slug is not None: - kwargs["references"]["application_variant"] = {"slug": variant_slug} - - super().__init__( - name=name, - description=description, - # - parameters=parameters, - schemas=schemas, - # - **kwargs, - ) - - -async def invoke_application( - request: WorkflowServiceRequest, - # - secrets: Optional[list] = None, - credentials: Optional[str] = None, - # - **kwargs, -) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - return await application( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - # - **kwargs, - )().invoke( - request=request, - # - secrets=secrets, - credentials=credentials, - # - **kwargs, - ) - - -async def inspect_application( - request: WorkflowServiceRequest, - # - credentials: Optional[str] = None, - # - **kwargs, -) -> WorkflowServiceRequest: - return await application( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - )().inspect( - credentials=credentials, - # - **kwargs, - ) - - -class evaluator(workflow): - def __init__( - self, - # - slug: Optional[str] = None, - *, - name: Optional[str] = None, - description: Optional[str] = None, - # - parameters: Optional[dict] = None, - schemas: Optional[dict] = None, - # - variant_slug: Optional[str] = None, - # - **kwargs, - ): - kwargs["flags"] = dict( - # is_custom=False, # None / False / missing is the same - is_evaluator=True, - # is_human=False, # None / False / missing is the same - ) - - if not "references" in kwargs or not isinstance(kwargs["references"], dict): - kwargs["references"] = dict() - - for key in kwargs["references"]: - if key.startswith("application_"): - del kwargs["references"][key] - - if slug is not None: - kwargs["references"]["evaluator"] = {"slug": slug} - if variant_slug is not None: - kwargs["references"]["evaluator_variant"] = {"slug": variant_slug} - - super().__init__( - name=name, - description=description, - # - parameters=parameters, - schemas=schemas, - # - **kwargs, - ) - - -async def invoke_evaluator( - request: WorkflowServiceRequest, - # - secrets: Optional[list] = None, - credentials: Optional[str] = None, - # - **kwargs, -) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse]: - return await evaluator( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - # - **kwargs, - )().invoke( - request=request, - # - secrets=secrets, - credentials=credentials, - # - **kwargs, - ) - - -async def inspect_evaluator( - request: WorkflowServiceRequest, - # - credentials: Optional[str] = None, - # - **kwargs, -) -> WorkflowServiceRequest: - return await evaluator( - data=request.data, - # - interface=request.interface, - configuration=request.configuration, - # - flags=request.flags, - tags=request.tags, - meta=request.meta, - # - references=request.references, - links=request.links, - )().inspect( - credentials=credentials, - # - **kwargs, - ) diff --git a/sdk/agenta/sdk/decorators/serving.py b/sdk/agenta/sdk/decorators/serving.py deleted file mode 100644 index c8683e4f63..0000000000 --- a/sdk/agenta/sdk/decorators/serving.py +++ /dev/null @@ -1,776 +0,0 @@ -from typing import Type, Any, Callable, Dict, Optional, Tuple, List -from inspect import ( - iscoroutinefunction, - isgenerator, - isasyncgen, - signature, - Signature, - Parameter, -) -from functools import wraps -from traceback import format_exception -from asyncio import sleep -from uuid import UUID -from pydantic import BaseModel, HttpUrl, ValidationError -from os import environ - -from starlette.responses import ( - Response as StarletteResponse, - StreamingResponse, -) -from fastapi import Body, FastAPI, HTTPException, Request - -from agenta.sdk.middleware.mock import MockMiddleware -from agenta.sdk.middleware.inline import InlineMiddleware -from agenta.sdk.middleware.vault import VaultMiddleware -from agenta.sdk.middleware.config import ConfigMiddleware -from agenta.sdk.middleware.otel import OTelMiddleware -from agenta.sdk.middleware.auth import AuthHTTPMiddleware -from agenta.sdk.middleware.cors import CORSMiddleware - -from agenta.sdk.contexts.routing import ( - routing_context_manager, - RoutingContext, -) -from agenta.sdk.contexts.tracing import ( - tracing_context_manager, - TracingContext, -) -from agenta.sdk.router import router -from agenta.sdk.utils.exceptions import suppress, display_exception -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.utils.helpers import get_current_version -from agenta.sdk.types import ( - MultipleChoice, - BaseResponse, - StreamResponse, - MCField, -) - -import agenta as ag - -log = get_module_logger(__name__) - -AGENTA_RUNTIME_PREFIX = environ.get("AGENTA_RUNTIME_PREFIX", "") - -app = FastAPI( - docs_url=f"{AGENTA_RUNTIME_PREFIX}/docs", # Swagger UI - openapi_url=f"{AGENTA_RUNTIME_PREFIX}/openapi.json", # OpenAPI schema -) - -app.include_router(router, prefix=AGENTA_RUNTIME_PREFIX) - - -class PathValidator(BaseModel): - url: HttpUrl - - -class route: # pylint: disable=invalid-name - # This decorator is used to expose specific stages of a workflow (embedding, retrieval, summarization, etc.) - # as independent endpoints. It is designed for backward compatibility with existing code that uses - # the @entrypoint decorator, which has certain limitations. By using @route(), we can create new - # routes without altering the main workflow entrypoint. This helps in modularizing the services - # and provides flexibility in how we expose different functionalities as APIs. - def __init__( - self, - path: Optional[str] = "/", - config_schema: Optional[BaseModel] = None, - ): - self.config_schema: BaseModel = config_schema - path = "/" + path.strip("/").strip() - path = "" if path == "/" else path - PathValidator(url=f"http://example.com{path}") - - self.route_path = path - - self.e = None - - def __call__(self, f): - self.e = entrypoint( - f, - route_path=self.route_path, - config_schema=self.config_schema, - ) - - return f - - -class entrypoint: - """ - Decorator class to wrap a function for HTTP POST, terminal exposure and enable tracing. - - This decorator generates the following endpoints: - - Playground Endpoints - - /generate with @entrypoint, @route("/"), @route(path="") # LEGACY - - /playground/run with @entrypoint, @route("/"), @route(path="") - - /playground/run/{route} with @route({route}), @route(path={route}) - - Deployed Endpoints: - - /generate_deployed with @entrypoint, @route("/"), @route(path="") # LEGACY - - /run with @entrypoint, @route("/"), @route(path="") - - /run/{route} with @route({route}), @route(path={route}) - - The rationale is: - - There may be multiple endpoints, based on the different routes. - - It's better to make it explicit that an endpoint is for the playground. - - Prefixing the routes with /run is more futureproof in case we add more endpoints. - - Example: - ```python - import agenta as ag - - @ag.entrypoint - async def chain_of_prompts_llm(prompt: str): - return ... - ``` - """ - - routes = list() - - _middleware = False - _run_path = f"{AGENTA_RUNTIME_PREFIX}/run" - _test_path = f"{AGENTA_RUNTIME_PREFIX}/test" - _config_key = "ag_config" - # LEGACY - _legacy_generate_path = f"{AGENTA_RUNTIME_PREFIX}/generate" - _legacy_generate_deployed_path = f"{AGENTA_RUNTIME_PREFIX}/generate_deployed" - - def __init__( - self, - func: Callable[..., Any], - route_path: str = "", - config_schema: Optional[BaseModel] = None, - ): - self.func = func - self.route_path = route_path - self.config_schema = config_schema - - signature_parameters = signature(func).parameters - config, default_parameters = self.parse_config() - - ### --- Middleware --- # - if not entrypoint._middleware: - entrypoint._middleware = True - app.add_middleware(MockMiddleware) - app.add_middleware(InlineMiddleware) - app.add_middleware(VaultMiddleware) - app.add_middleware(ConfigMiddleware) - app.add_middleware(AuthHTTPMiddleware) - app.add_middleware(OTelMiddleware) - app.add_middleware(CORSMiddleware) - ### ------------------ # - - ### --- Run --- # - @wraps(func) - async def run_wrapper(request: Request, *args, **kwargs) -> Any: - # LEGACY - # TODO: Removing this implies breaking changes in : - # - calls to /generate_deployed - kwargs = { - k: v - for k, v in kwargs.items() - if k not in ["config", "environment", "app"] - } - # LEGACY - - kwargs, _ = self.process_kwargs(kwargs, default_parameters) - if ( - request.state.config["parameters"] is None - or request.state.config["references"] is None - ): - raise HTTPException( - status_code=400, - detail="Config not found based on provided references.", - ) - - return await self.execute_wrapper(request, *args, **kwargs) - - self.update_run_wrapper_signature(wrapper=run_wrapper) - - run_route = f"{route_path}{entrypoint._run_path}" - app.post( - run_route, - response_model=BaseResponse, - response_model_exclude_none=True, - )(run_wrapper) - - # LEGACY - # TODO: Removing this implies breaking changes in : - # - calls to /generate_deployed must be replaced with calls to /run - if route_path == "": - run_route = entrypoint._legacy_generate_deployed_path - app.post( - run_route, - response_model=BaseResponse, - response_model_exclude_none=True, - )(run_wrapper) - # LEGACY - ### ----------- # - - ### --- Test --- # - @wraps(func) - async def test_wrapper(request: Request, *args, **kwargs) -> Any: - kwargs, config = self.process_kwargs(kwargs, default_parameters) - request.state.inline = True - request.state.config["parameters"] = config - if request.state.config["references"]: - request.state.config["references"] = { - k: v - for k, v in request.state.config["references"].items() - if k.startswith("application") - } or None - return await self.execute_wrapper(request, *args, **kwargs) - - self.update_test_wrapper_signature(wrapper=test_wrapper, config_instance=config) - - test_route = f"{route_path}{entrypoint._test_path}" - app.post( - test_route, - response_model=BaseResponse, - response_model_exclude_none=True, - )(test_wrapper) - - # LEGACY - # TODO: Removing this implies breaking changes in : - # - calls to /generate must be replaced with calls to /test - if route_path == "": - test_route = entrypoint._legacy_generate_path - app.post( - test_route, - response_model=BaseResponse, - response_model_exclude_none=True, - )(test_wrapper) - # LEGACY - - ### --- OpenAPI --- # - test_route = f"{route_path}{entrypoint._test_path}" - entrypoint.routes.append( - { - "func": func.__name__, - "endpoint": test_route, - "params": signature_parameters, - "config": config, - } - ) - - # LEGACY - if route_path == "": - test_route = entrypoint._legacy_generate_path - entrypoint.routes.append( - { - "func": func.__name__, - "endpoint": test_route, - "params": ( - {**default_parameters, **signature_parameters} - if not config - else signature_parameters - ), - "config": config, - } - ) - # LEGACY - - openapi_schema = self.openapi() - - for _route in entrypoint.routes: - if _route["config"] is not None: - self.override_config_in_schema( - openapi_schema=openapi_schema, - func_name=_route["func"], - endpoint=_route["endpoint"].replace(AGENTA_RUNTIME_PREFIX, ""), - config=_route["config"], - ) - - app.openapi_schema = openapi_schema - ### --------------- # - - def parse_config(self) -> Tuple[Optional[Type[BaseModel]], Dict[str, Any]]: - """Parse the config schema and return the config class and default parameters.""" - config = None - default_parameters = {} - - if self.config_schema: - try: - config = self.config_schema() if self.config_schema else None - default_parameters = config.dict() if config else {} - except ValidationError as e: - raise ValueError( - f"Error initializing config_schema. Please ensure all required fields have default values: {str(e)}" - ) from e - except Exception as e: - raise ValueError( - f"Unexpected error initializing config_schema: {str(e)}" - ) from e - - return config, default_parameters - - def process_kwargs( - self, kwargs: Dict[str, Any], default_parameters: Dict[str, Any] - ) -> Tuple[Dict[str, Any], Dict[str, Any]]: - """Remove the config parameters from the kwargs.""" - # Extract agenta_config if present - config_params = kwargs.pop(self._config_key, {}) - if isinstance(config_params, BaseModel): - config_params = config_params.dict() - # Merge with default parameters - config = {**default_parameters, **config_params} - - return kwargs, config - - async def execute_wrapper( - self, - request: Request, - *args, - **kwargs, - ): - if not request: - raise HTTPException(status_code=500, detail="Missing 'request'.") - - state = request.state - traceparent = state.otel.get("traceparent") - baggage = state.otel.get("baggage") - credentials = state.auth.get("credentials") - parameters = state.config.get("parameters") - references = state.config.get("references") - secrets = state.vault.get("secrets") - inline = state.inline - mock = state.mock - - with routing_context_manager( - context=RoutingContext( - parameters=parameters, - secrets=secrets, - mock=mock, - ) - ): - with tracing_context_manager( - context=TracingContext( - traceparent=traceparent, - baggage=baggage, - credentials=credentials, - parameters=parameters, - references=references, - ) - ): - try: - result = ( - await self.func(*args, **kwargs) - if iscoroutinefunction(self.func) - else self.func(*args, **kwargs) - ) - - return await self.handle_success(result, inline) - - except Exception as error: # pylint: disable=broad-except - await self.handle_failure(error, inline) - - async def handle_success( - self, - result: Any, - inline: bool, - ): - data = None - content_type = "text/plain" - - tree = None - tree_id = None - trace_id = None - span_id = None - - with suppress(): - if isinstance(result, (dict, list)): - content_type = "application/json" - - data = self.patch_result(result) - - ( - tree, - tree_id, - trace_id, - span_id, - ) = await self.fetch_inline_trace(inline) - - try: - if isinstance(result, StarletteResponse): - result.headers.setdefault("x-ag-version", "3.0") - if content_type: - result.headers.setdefault("x-ag-content-type", content_type) - if tree_id: - result.headers.setdefault("x-ag-tree-id", tree_id) - if trace_id: - result.headers.setdefault("x-ag-trace-id", trace_id) - if span_id: - result.headers.setdefault("x-ag-span-id", span_id) - - return result - except: - return result - - try: - if isasyncgen(result) or isgenerator(result): - return StreamResponse( - content=result, - content_type=content_type, - tree_id=tree_id, - trace_id=trace_id, - span_id=span_id, - ) - except: - return StreamingResponse( - result, - media_type="text/event-stream", - ) - - try: - return BaseResponse( - data=data, - content_type=content_type, - tree=tree, - tree_id=tree_id, - trace_id=trace_id, - span_id=span_id, - ) - except: # pylint: disable=bare-except - try: - return BaseResponse( - data=data, - content_type=content_type, - tree_id=tree_id, - trace_id=trace_id, - span_id=span_id, - ) - except: # pylint: disable=bare-except - return BaseResponse( - data=data, - content_type=content_type, - ) - - async def handle_failure( - self, - error: Exception, - inline: bool, - ): - display_exception("Application Exception") - - status_code = ( - getattr(error, "status_code") if hasattr(error, "status_code") else 500 - ) - if status_code in [401, 403]: # Reserved HTTP codes for auth middleware - status_code = 424 # Proxy Authentication Required - - stacktrace = format_exception(error, value=error, tb=error.__traceback__) # type: ignore - - tree = None - tree_id = None - trace_id = None - span_id = None - - with suppress(): - ( - tree, - tree_id, - trace_id, - span_id, - ) = await self.fetch_inline_trace(inline) - - raise HTTPException( - status_code=status_code, - detail=dict( - message=str(error), - stacktrace=stacktrace, - tree=tree, - tree_id=tree_id, - trace_id=trace_id, - span_id=span_id, - ), - ) - - def patch_result( - self, - result: Any, - ): - """ - Patch the result to only include the message if the result is a FuncResponse-style dictionary with message, cost, and usage keys. - - Example: - ```python - result = { - "message": "Hello, world!", - "cost": 0.5, - "usage": { - "prompt_tokens": 10, - "completion_tokens": 20, - "total_tokens": 30 - } - } - result = patch_result(result) - print(result) - # Output: "Hello, world!" - ``` - """ - data = ( - result["message"] - if isinstance(result, dict) - and all(key in result for key in ["message", "cost", "usage"]) - else result - ) - - if data is None: - data = ( - "Function executed successfully, but did return None. \n Are you sure you did not forget to return a value?", - ) - - if not isinstance(result, dict): - data = str(data) - - return data - - async def fetch_inline_trace_id( - self, - ): - context = TracingContext.get() - - link = context.link - - _trace_id = link.get("trace_id") if link else None # in int format - tree_id = ( - str(UUID(int=_trace_id)) if _trace_id else None - ) # in uuid_as_str format - - return tree_id - - async def fetch_inline_trace( - self, - inline: bool, - ): - TIMEOUT = 1 - TIMESTEP = 0.1 - NOFSTEPS = TIMEOUT / TIMESTEP - - context = TracingContext.get() - - link = context.link - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - tree = None - tree_id = str(UUID(int=_trace_id)) if _trace_id else None - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - if _trace_id is not None: - if inline: - remaining_steps = NOFSTEPS - while ( - not ag.tracing.is_inline_trace_ready(_trace_id) - and remaining_steps > 0 - ): - await sleep(TIMESTEP) - - remaining_steps -= 1 - - tree = ag.tracing.get_inline_trace(_trace_id) - - return tree, tree_id, trace_id, span_id - - # --- OpenAPI --- # - - def add_request_to_signature( - self, - wrapper: Callable[..., Any], - ): - original_sig = signature(wrapper) - parameters = [ - Parameter( - "request", - kind=Parameter.POSITIONAL_OR_KEYWORD, - annotation=Request, - ), - *original_sig.parameters.values(), - ] - new_sig = Signature( - parameters, - return_annotation=original_sig.return_annotation, - ) - wrapper.__signature__ = new_sig - - def update_wrapper_signature( - self, wrapper: Callable[..., Any], updated_params: List - ): - """ - Updates the signature of a wrapper function with a new list of parameters. - - Args: - wrapper (callable): A callable object, such as a function or a method, that requires a signature update. - updated_params (List[Parameter]): A list of `Parameter` objects representing the updated parameters - for the wrapper function. - """ - - wrapper_signature = signature(wrapper) - wrapper_signature = wrapper_signature.replace(parameters=updated_params) - wrapper.__signature__ = wrapper_signature # type: ignore - - def update_test_wrapper_signature( - self, - wrapper: Callable[..., Any], - config_instance: Type[BaseModel], # TODO: change to our type - ) -> None: - """Update the function signature to include new parameters.""" - - updated_params: List[Parameter] = [] - self.add_config_params_to_parser(updated_params, config_instance) - self.add_func_params_to_parser(updated_params) - self.update_wrapper_signature(wrapper, updated_params) - self.add_request_to_signature(wrapper) - - def update_run_wrapper_signature( - self, - wrapper: Callable[..., Any], - ) -> None: - """Update the function signature to include new parameters.""" - - updated_params: List[Parameter] = [] - self.add_func_params_to_parser(updated_params) - self.update_wrapper_signature(wrapper, updated_params) - self.add_request_to_signature(wrapper) - - def add_config_params_to_parser( - self, updated_params: list, config_instance: Type[BaseModel] - ) -> None: - """Add configuration parameters to function signature.""" - - for name, field in config_instance.model_fields.items(): - assert field.default is not None, f"Field {name} has no default value" - - updated_params.append( - Parameter( - name=self._config_key, - kind=Parameter.KEYWORD_ONLY, - annotation=type(config_instance), # Get the actual class type - default=Body(config_instance), # Use the instance directly - ) - ) - - def add_func_params_to_parser(self, updated_params: list) -> None: - """Add function parameters to function signature.""" - for name, param in signature(self.func).parameters.items(): - assert ( - len(param.default.__class__.__bases__) == 1 - ), f"Inherited standard type of {param.default.__class__} needs to be one." - updated_params.append( - Parameter( - name, - Parameter.KEYWORD_ONLY, - default=Body(..., embed=True), - annotation=param.default.__class__.__bases__[ - 0 - ], # determines and get the base (parent/inheritance) type of the sdk-type at run-time. \ - # E.g __class__ is ag.MessagesInput() and accessing it parent type will return (<class 'list'>,), \ - # thus, why we are accessing the first item. - ) - ) - - def openapi(self): - app.openapi_schema = None # Forces FastAPI to re-generate the schema - - openapi_schema = app.openapi() - - # ✅ Fix paths by removing the prefix - updated_paths = {} - for path, methods in openapi_schema["paths"].items(): - new_path = ( - path[len(AGENTA_RUNTIME_PREFIX) :] - if path.startswith(AGENTA_RUNTIME_PREFIX) - else path - ) - updated_paths[new_path] = methods - openapi_schema["paths"] = updated_paths # Replace paths - - # ✅ Fix schema names and update `$ref` references - if "components" in openapi_schema and "schemas" in openapi_schema["components"]: - updated_schemas = {} - schema_name_map = {} # Map old schema names to new schema names - - for schema_name, schema_value in openapi_schema["components"][ - "schemas" - ].items(): - if AGENTA_RUNTIME_PREFIX and AGENTA_RUNTIME_PREFIX != "": - new_schema_name = schema_name.replace( - AGENTA_RUNTIME_PREFIX.lstrip("/").replace("/", "_") + "_", "" - ).strip("_") - else: - new_schema_name = schema_name - updated_schemas[new_schema_name] = schema_value - schema_name_map[schema_name] = new_schema_name # Store mapping - - # ✅ Fix `$ref` references - for path, methods in updated_paths.items(): - for method in methods.values(): - if "requestBody" in method and "content" in method["requestBody"]: - for content_type, content in method["requestBody"][ - "content" - ].items(): - if "$ref" in content["schema"]: - old_ref = content["schema"]["$ref"] - schema_name = old_ref.split("/")[ - -1 - ] # Extract schema name - if schema_name in schema_name_map: - content["schema"][ - "$ref" - ] = f"#/components/schemas/{schema_name_map[schema_name]}" - - if "responses" in method: - for status_code, response in method["responses"].items(): - if "content" in response: - for content_type, content in response[ - "content" - ].items(): - if "$ref" in content["schema"]: - old_ref = content["schema"]["$ref"] - schema_name = old_ref.split("/")[ - -1 - ] # Extract schema name - if schema_name in schema_name_map: - content["schema"][ - "$ref" - ] = f"#/components/schemas/{schema_name_map[schema_name]}" - - # ✅ Update OpenAPI schema with fixed schemas - openapi_schema["components"]["schemas"] = updated_schemas - - # ✅ Add Agenta SDK version info - openapi_schema["agenta_sdk"] = {"version": get_current_version()} - - return openapi_schema - - def override_config_in_schema( - self, - openapi_schema: dict, - func_name: str, - endpoint: str, - config: Type[BaseModel], - ): - """Override config in OpenAPI schema to add agenta-specific metadata.""" - endpoint = endpoint[1:].replace("/", "_") - - # Get the config class name to find its schema - config_class_name = type(config).__name__ - config_schema = openapi_schema["components"]["schemas"][config_class_name] - # Process each field in the config class - for field_name, field in config.__class__.model_fields.items(): - # Check if field has Annotated metadata for MultipleChoice - if hasattr(field, "metadata") and field.metadata: - for meta in field.metadata: - if isinstance(meta, MultipleChoice): - choices = meta.choices - if isinstance(choices, dict): - config_schema["properties"][field_name].update( - {"x-parameter": "grouped_choice", "choices": choices} - ) - elif isinstance(choices, list): - config_schema["properties"][field_name].update( - {"x-parameter": "choice", "enum": choices} - ) diff --git a/sdk/agenta/sdk/decorators/tracing.py b/sdk/agenta/sdk/decorators/tracing.py index e94dd7f3f1..8209e42848 100644 --- a/sdk/agenta/sdk/decorators/tracing.py +++ b/sdk/agenta/sdk/decorators/tracing.py @@ -1,49 +1,24 @@ -# /agenta/sdk/decorators/tracing.py - from typing import Callable, Optional, Any, Dict, List, Union -from opentelemetry import context as otel_context -from opentelemetry.context import attach, detach - - from functools import wraps from itertools import chain -from inspect import ( - getfullargspec, - iscoroutinefunction, - isgeneratorfunction, - isasyncgenfunction, -) - -from pydantic import BaseModel +from inspect import iscoroutinefunction, getfullargspec from opentelemetry import baggage +from opentelemetry.trace import NonRecordingSpan from opentelemetry.context import attach, detach, get_current from opentelemetry.baggage import set_baggage, get_all -from agenta.sdk.utils.logging import get_module_logger from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.contexts.tracing import ( - TracingContext, - tracing_context_manager, -) +from agenta.sdk.context.tracing import tracing_context from agenta.sdk.tracing.conventions import parse_span_kind -import agenta as ag - - -log = get_module_logger(__name__) - - -def _has_instrument(handler: Callable[..., Any]) -> bool: - return bool(getattr(handler, "__has_instrument__", False)) +from agenta.sdk.utils.logging import get_module_logger -def auto_instrument(handler: Callable[..., Any]) -> Callable[..., Any]: - if _has_instrument(handler): - return handler +import agenta as ag - return instrument()(handler) +log = get_module_logger(__name__) class instrument: # pylint: disable=invalid-name @@ -58,8 +33,6 @@ def __init__( redact: Optional[Callable[..., Any]] = None, redact_on_error: Optional[bool] = True, max_depth: Optional[int] = 2, - aggregate: Optional[Union[bool, Callable]] = None, # stream to batch - annotate: Optional[bool] = None, # annotation vs invocation # DEPRECATING kind: str = "task", spankind: Optional[str] = "TASK", @@ -72,212 +45,67 @@ def __init__( self.redact = redact self.redact_on_error = redact_on_error self.max_depth = max_depth - self.aggregate = aggregate - self.annotate = annotate - - def __call__(self, handler: Callable[..., Any]): - is_coroutine_function = iscoroutinefunction(handler) - is_sync_generator = isgeneratorfunction(handler) - is_async_generator = isasyncgenfunction(handler) - - # ---- ASYNC GENERATOR ---- - if is_async_generator: - - @wraps(handler) - def astream_wrapper(*args, **kwargs): - with tracing_context_manager(context=TracingContext.get()): - # debug_otel_context("[BEFORE STREAM] [BEFORE SETUP]") - - captured_ctx = otel_context.get_current() - - self._parse_type_and_kind() - - self._attach_baggage() - - ctx = self._get_traceparent() - - # debug_otel_context("[BEFORE STREAM] [AFTER SETUP]") - - async def wrapped_generator(): - # debug_otel_context("[WITHIN STREAM] [BEFORE ATTACH]") - - otel_token = otel_context.attach(captured_ctx) - - # debug_otel_context("[WITHIN STREAM] [AFTER ATTACH]") - - try: - with ag.tracer.start_as_current_span( - name=handler.__name__, - kind=self.kind, - context=ctx, - ): - self._set_link() - self._pre_instrument(handler, *args, **kwargs) - - _result = [] - - agen = handler(*args, **kwargs) - - try: - async for chunk in agen: - _result.append(chunk) - yield chunk - - finally: - if self.aggregate and callable(self.aggregate): - result = self.aggregate(_result) - elif all(isinstance(r, str) for r in _result): - result = "".join(_result) - elif all(isinstance(r, bytes) for r in _result): - result = b"".join(_result) - else: - result = _result - - self._post_instrument(result) - finally: - # debug_otel_context("[WITHIN STREAM] [BEFORE DETACH]") + def __call__(self, func: Callable[..., Any]): + is_coroutine_function = iscoroutinefunction(func) - otel_context.detach(otel_token) - - # debug_otel_context("[WITHIN STREAM] [AFTER DETACH]") - - return wrapped_generator() - - setattr(astream_wrapper, "__has_instrument__", True) - setattr(astream_wrapper, "__original_handler__", handler) - return astream_wrapper - - # ---- SYNC GENERATOR ---- - if is_sync_generator: - - @wraps(handler) - def stream_wrapper(*args, **kwargs): - with tracing_context_manager(context=TracingContext.get()): - self._parse_type_and_kind() - - token = self._attach_baggage() - - ctx = self._get_traceparent() - - def wrapped_generator(): - try: - with ag.tracer.start_as_current_span( - name=handler.__name__, - kind=self.kind, - context=ctx, - ): - self._set_link() - - self._pre_instrument(handler, *args, **kwargs) - - _result = [] - - gen = handler(*args, **kwargs) - - gen_return = None - - try: - while True: - try: - chunk = next(gen) - except StopIteration as e: - gen_return = e.value - break - - _result.append(chunk) - yield chunk - - finally: - if self.aggregate and callable(self.aggregate): - result = self.aggregate(_result) - elif all(isinstance(r, str) for r in _result): - result = "".join(_result) - elif all(isinstance(r, bytes) for r in _result): - result = b"".join(_result) - else: - result = _result - - self._post_instrument(result) - - return gen_return - - finally: - self._detach_baggage(token) - - return wrapped_generator() - - setattr(stream_wrapper, "__has_instrument__", True) - setattr(stream_wrapper, "__original_handler__", handler) - return stream_wrapper - - # ---- ASYNC FUNCTION ---- - if is_coroutine_function: - - @wraps(handler) - async def awrapper(*args, **kwargs): - with tracing_context_manager(context=TracingContext.get()): - self._parse_type_and_kind() - - token = self._attach_baggage() + @wraps(func) + async def awrapper(*args, **kwargs): + async def aauto_instrumented(*args, **kwargs): + self._parse_type_and_kind() - ctx = self._get_traceparent() + token = self._attach_baggage() - try: - with ag.tracer.start_as_current_span( - name=handler.__name__, - kind=self.kind, - context=ctx, - ): - self._set_link() + ctx = self._get_traceparent() - self._pre_instrument(handler, *args, **kwargs) + with ag.tracer.start_as_current_span( + name=func.__name__, + kind=self.kind, + context=ctx, + ) as span: + self._set_link() - result = await handler(*args, **kwargs) + self._pre_instrument(func, *args, **kwargs) - self._post_instrument(result) + result = await func(*args, **kwargs) - finally: - self._detach_baggage(token) + self._post_instrument(result) return result - setattr(awrapper, "__has_instrument__", True) - setattr(awrapper, "__original_handler__", handler) - return awrapper + self._detach_baggage(token) - # ---- SYNC FUNCTION ---- - @wraps(handler) + return await aauto_instrumented(*args, **kwargs) + + @wraps(func) def wrapper(*args, **kwargs): - with tracing_context_manager(context=TracingContext.get()): + def auto_instrumented(*args, **kwargs): self._parse_type_and_kind() token = self._attach_baggage() ctx = self._get_traceparent() - try: - with ag.tracer.start_as_current_span( - name=handler.__name__, - kind=self.kind, - context=ctx, - ): - self._set_link() + with ag.tracer.start_as_current_span( + name=func.__name__, + kind=self.kind, + context=ctx, + ) as span: + self._set_link() - self._pre_instrument(handler, *args, **kwargs) + self._pre_instrument(func, *args, **kwargs) - result = handler(*args, **kwargs) + result = func(*args, **kwargs) - self._post_instrument(result) + self._post_instrument(result) - finally: - self._detach_baggage(token) + return result - return result + self._detach_baggage(token) - setattr(wrapper, "__has_instrument__", True) - setattr(wrapper, "__original_handler__", handler) - return wrapper + return auto_instrumented(*args, **kwargs) + + return awrapper if is_coroutine_function else wrapper def _parse_type_and_kind(self): if not ag.tracing.get_current_span().is_recording(): @@ -286,7 +114,7 @@ def _parse_type_and_kind(self): self.kind = parse_span_kind(self.type) def _get_traceparent(self): - context = TracingContext.get() + context = tracing_context.get() traceparent = context.traceparent @@ -299,7 +127,7 @@ def _get_traceparent(self): def _set_link(self): span = ag.tracing.get_current_span() - context = TracingContext.get() + context = tracing_context.get() if not context.link: context.link = { @@ -307,10 +135,10 @@ def _set_link(self): "span_id": span.get_span_context().span_id, } - TracingContext.set(context) + tracing_context.set(context) def _attach_baggage(self): - context = TracingContext.get() + context = tracing_context.get() references = context.references @@ -330,25 +158,21 @@ def _detach_baggage( def _pre_instrument( self, - handler, + func, *args, **kwargs, ): span = ag.tracing.get_current_span() - context = TracingContext.get() + context = tracing_context.get() with suppress(): trace_id = span.context.trace_id ag.tracing.credentials.put(trace_id, context.credentials) - span_type = self.type or "task" - span.set_attributes( - attributes={ - "node": span_type, - }, + attributes={"node": self.type}, namespace="type", ) @@ -361,7 +185,7 @@ def _pre_instrument( _inputs = self._redact( name=span.name, field="inputs", - io=self._parse(handler, *args, **kwargs), + io=self._parse(func, *args, **kwargs), ignore=self.ignore_inputs, ) @@ -432,14 +256,14 @@ def _post_instrument( def _parse( self, - handler, + func, *args, **kwargs, ) -> Dict[str, Any]: inputs = { key: value for key, value in chain( - zip(getfullargspec(handler).args, args), + zip(getfullargspec(func).args, args), kwargs.items(), ) } @@ -493,22 +317,6 @@ def _redact( if ag.tracing.redact_on_error: io = {} - if "request" in io: - with suppress(): - if isinstance(io["request"], BaseModel): - io["request"] = io["request"].model_dump( - mode="json", - exclude_none=True, - ) - - if "response" in io: - with suppress(): - if isinstance(io["response"], BaseModel): - io["response"] = io["response"].model_dump( - mode="json", - exclude_none=True, - ) - return io def _patch( diff --git a/sdk/agenta/sdk/engines/__init__.py b/sdk/agenta/sdk/engines/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/engines/running/__init__.py b/sdk/agenta/sdk/engines/running/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/engines/running/registry.py b/sdk/agenta/sdk/engines/running/registry.py deleted file mode 100644 index 4cdc411e0e..0000000000 --- a/sdk/agenta/sdk/engines/running/registry.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Union -from json import dumps - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.workflows.types import Data - - -log = get_module_logger(__name__) - - -async def exact_match_v1( - *, - parameters: Data, - inputs: Data, - outputs: Union[Data, str], -) -> Data: - success = False - - try: - reference_key = parameters.get("reference_key", None) - reference_outputs = inputs.get(reference_key, None) - - if isinstance(outputs, str) and isinstance(reference_outputs, str): - success = outputs == reference_outputs - elif isinstance(outputs, dict) and isinstance(reference_outputs, dict): - outputs = dumps(outputs, sort_keys=True) - reference_outputs = dumps(reference_outputs, sort_keys=True) - success = outputs == reference_outputs - - except: # pylint: disable=bare-except - log.error("Error in exact_match_v1", exc_info=True) - - return {"success": success} diff --git a/sdk/agenta/sdk/engines/running/utils.py b/sdk/agenta/sdk/engines/running/utils.py deleted file mode 100644 index 6f51847449..0000000000 --- a/sdk/agenta/sdk/engines/running/utils.py +++ /dev/null @@ -1,17 +0,0 @@ -from typing import Optional, Tuple - - -async def parse_service_uri( - uri: str, -) -> Tuple[Optional[str], Optional[str], Optional[str], Optional[str]]: - if not uri or not uri.strip(): - return None, None, None, None - - # uri ~ [<provider>|empty]:<kind>:<key>:[<version>|'latest'|empty] - - parts = uri.split(":") - - if len(parts) != 4: - return None, None, None, None - - return tuple(parts) diff --git a/sdk/agenta/sdk/engines/tracing/__init__.py b/sdk/agenta/sdk/engines/tracing/__init__.py deleted file mode 100644 index 734c38b64d..0000000000 --- a/sdk/agenta/sdk/engines/tracing/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .tracing import Tracing, get_tracer diff --git a/sdk/agenta/sdk/engines/tracing/attributes.py b/sdk/agenta/sdk/engines/tracing/attributes.py deleted file mode 100644 index bdc042c9bb..0000000000 --- a/sdk/agenta/sdk/engines/tracing/attributes.py +++ /dev/null @@ -1,185 +0,0 @@ -from json import loads, dumps -from typing import Optional, Union, Sequence, Any, Dict - -Primitive = Union[str, int, float, bool, bytes] -PrimitivesSequence = Sequence[Primitive] -Attribute = Union[Primitive, PrimitivesSequence] - - -def _marshal( - unmarshalled: Dict[str, Any], - *, - parent_key: Optional[str] = "", - depth: Optional[int] = 0, - max_depth: Optional[int] = None, -) -> Dict[str, Any]: - """ - Marshals a dictionary of unmarshalled attributes into a flat dictionary - - Example: - unmarshalled = { - "ag": { - "type": "tree", - "node": { - "name": "root", - "children": [ - { - "name": "child1", - }, - { - "name": "child2", - } - ] - } - } - } - marshalled = { - "ag.type": "tree", - "ag.node.name": "root", - "ag.node.children.0.name": "child1", - "ag.node.children.1.name": "child2" - } - """ - marshalled = {} - - # If max_depth is set and we've reached it, - # just return the unmarshalled attributes - if max_depth is not None and depth >= max_depth: - marshalled[parent_key] = unmarshalled - # MISSING ENCODING TO JSON IF NOT PRIMITIVE - - return marshalled - - # Otherwise, - # iterate over the unmarshalled attributes and marshall them - for key, value in unmarshalled.items(): - child_key = f"{parent_key}.{key}" if parent_key else key - - if isinstance(value, dict): - dict_key = child_key - - marshalled.update( - _marshal( - value, - parent_key=dict_key, - depth=depth + 1, - max_depth=max_depth, - ) - ) - elif isinstance(value, list): - if max_depth is not None and depth + 1 >= max_depth: - marshalled[child_key] = value - # MISSING ENCODING TO JSON IF NOT PRIMITIVE - else: - for i, item in enumerate(value): - list_key = f"{child_key}.{i}" - - if isinstance(item, (dict, list)): - marshalled.update( - _marshal( - item, - parent_key=list_key, - depth=depth + 1, - max_depth=max_depth, - ) - ) - else: - marshalled[list_key] = item - # MISSING ENCODING TO JSON IF NOT PRIMITIVE - else: - marshalled[child_key] = value - # MISSING ENCODING TO JSON IF NOT PRIMITIVE - - return marshalled - - -def _encode_key( - namespace: Optional[str] = None, - key: str = "", -) -> str: - if namespace is None: - return key - - return f"ag.{namespace}.{key}" - - -def _make_serializable(value: Any) -> Any: - """ - Transform complex nested structures into JSON-serializable form. - Handles Pydantic models, nested dictionaries and lists recursively. - """ - if value is None or isinstance(value, (str, int, float, bool, bytes)): - return value - - # Handle Pydantic objects (prioritize v2 over v1 API) - if hasattr(value, "model_dump"): # Pydantic v2 - return value.model_dump() - elif hasattr(value, "dict"): # Pydantic v1 - return value.dict() - - if isinstance(value, dict): - try: - # Test serialization without modifying - optimizes for already-serializable dicts - dumps( - value - ) # If serialization fails, we'll catch the exception and process deeply - return value # Avoid unnecessary recursion for serializable dicts - except TypeError: - return {k: _make_serializable(v) for k, v in value.items()} - elif isinstance(value, list): - try: - # Test serialization without modifying - optimizes for already-serializable lists - dumps( - value - ) # If serialization fails, we'll catch the exception and process deeply - return value # Avoid unnecessary recursion for serializable lists - except TypeError: - return [_make_serializable(item) for item in value] - - return repr(value) - - -def _encode_value(value: Any) -> Optional[Attribute]: - """ - Encode values for tracing, ensuring proper JSON serialization. - Adds the @ag.type=json: prefix only to appropriate values. - """ - if value is None: - return None - - if isinstance(value, (str, int, float, bool, bytes)): - return value - - try: - if ( - isinstance(value, (dict, list)) - or hasattr(value, "model_dump") - or hasattr(value, "dict") - ): - serializable_value = _make_serializable(value) - return "@ag.type=json:" + dumps(serializable_value) - except TypeError: - pass - - return repr(value) - - -def serialize( - *, - namespace: str, - attributes: Dict[str, Any], - max_depth: Optional[int] = None, -) -> Dict[str, str]: - if not isinstance(attributes, dict): - return {} - - _attributes = { - k: v - for k, v in { - _encode_key(namespace, key): _encode_value(value) - for key, value in _marshal(attributes, max_depth=max_depth).items() - }.items() - if v is not None - } - - return _attributes diff --git a/sdk/agenta/sdk/engines/tracing/conventions.py b/sdk/agenta/sdk/engines/tracing/conventions.py deleted file mode 100644 index 018cf64dea..0000000000 --- a/sdk/agenta/sdk/engines/tracing/conventions.py +++ /dev/null @@ -1,49 +0,0 @@ -from enum import Enum -from re import fullmatch - -from opentelemetry.trace import SpanKind - - -class Reference(str, Enum): - # - VARIANT_ID = "variant.id" - VARIANT_SLUG = "variant.slug" - VARIANT_VERSION = "variant.version" - # - ENVIRONMENT_ID = "environment.id" - ENVIRONMENT_SLUG = "environment.slug" - ENVIRONMENT_VERSION = "environment.version" - # - APPLICATION_ID = "application.id" - APPLICATION_SLUG = "application.slug" - # - - -_PATTERN = r"[A-Za-z0-9._-]+" - - -def is_valid_attribute_key( - string: str, -): - return bool(fullmatch(_PATTERN, string)) - - -def parse_span_kind(type: str) -> SpanKind: - kind = SpanKind.INTERNAL - if type in [ - "agent", - "chain", - "workflow", - ]: - kind = SpanKind.SERVER - elif type in [ - "tool", - "embedding", - "query", - "completion", - "chat", - "rerank", - ]: - kind = SpanKind.CLIENT - - return kind diff --git a/sdk/agenta/sdk/engines/tracing/exporters.py b/sdk/agenta/sdk/engines/tracing/exporters.py deleted file mode 100644 index 0cea71d4d8..0000000000 --- a/sdk/agenta/sdk/engines/tracing/exporters.py +++ /dev/null @@ -1,130 +0,0 @@ -from typing import Sequence, Dict, List, Optional - -from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter -from opentelemetry.sdk.trace.export import ( - ConsoleSpanExporter, - SpanExporter, - SpanExportResult, - ReadableSpan, -) - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.utils.cache import TTLLRUCache -from agenta.sdk.contexts.tracing import ( - otlp_context_manager, - otlp_context, - OTLPContext, -) - - -log = get_module_logger(__name__) - - -class InlineTraceExporter(SpanExporter): - def __init__( - self, - registry: Dict[str, List[ReadableSpan]], - ): - self._shutdown = False - self._registry = registry - - def export( - self, - spans: Sequence[ReadableSpan], - ) -> SpanExportResult: - if self._shutdown: - return - - with suppress(): - for span in spans: - trace_id = span.get_span_context().trace_id - - if trace_id not in self._registry: - self._registry[trace_id] = [] - - self._registry[trace_id].append(span) - - def shutdown(self) -> None: - self._shutdown = True - - def force_flush(self, timeout_millis: int = 30000) -> bool: - return True - - def is_ready( - self, - trace_id: int, - ) -> bool: - is_ready = trace_id in self._registry - return is_ready - - def fetch( - self, - trace_id: int, - ) -> List[ReadableSpan]: - trace = self._registry.get(trace_id, []) - - if trace_id in self._registry: - del self._registry[trace_id] - - return trace - - -class OTLPExporter(OTLPSpanExporter): - _MAX_RETRY_TIMEOUT = 2 - - def __init__( - self, - *args, - credentials: Optional[TTLLRUCache] = None, - **kwargs, - ): - super().__init__(*args, **kwargs) - - self.credentials = credentials - - def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: - grouped_spans: Dict[str, List[str]] = {} - - for span in spans: - trace_id = span.get_span_context().trace_id - - credentials = None - if self.credentials: - credentials = self.credentials.get(trace_id) - - if credentials not in grouped_spans: - grouped_spans[credentials] = [] - - grouped_spans[credentials].append(span) - - serialized_spans = [] - - for credentials, _spans in grouped_spans.items(): - with otlp_context_manager( - context=OTLPContext( - credentials=credentials, - ) - ): - serialized_spans.append(super().export(_spans)) - - if all(serialized_spans): - return SpanExportResult.SUCCESS - else: - return SpanExportResult.FAILURE - - def _export(self, serialized_data: bytes, timeout_sec: Optional[float] = None): - credentials = otlp_context.get().credentials - - if credentials: - self._session.headers.update({"Authorization": credentials}) - - with suppress(): - if timeout_sec is not None: - return super()._export(serialized_data, timeout_sec) - else: - return super()._export(serialized_data) - - -ConsoleExporter = ConsoleSpanExporter -InlineExporter = InlineTraceExporter diff --git a/sdk/agenta/sdk/engines/tracing/inline.py b/sdk/agenta/sdk/engines/tracing/inline.py deleted file mode 100644 index 971c4a108d..0000000000 --- a/sdk/agenta/sdk/engines/tracing/inline.py +++ /dev/null @@ -1,1154 +0,0 @@ -############################ -### services.shared.dtos ### -### -------------------- ### - -from typing import Optional - -from pydantic import BaseModel -from uuid import UUID -from datetime import datetime -from enum import Enum -from collections import OrderedDict - - -class ProjectScopeDTO(BaseModel): - project_id: UUID - - -class LifecycleDTO(BaseModel): - created_at: datetime - updated_at: Optional[datetime] = None - - updated_by_id: Optional[UUID] = None - - -### -------------------- ### -### services.shared.dtos ### -############################ - - -################################### -### services.observability.dtos ### -### --------------------------- ### - -from typing import List, Dict, Any, Union, Optional - -from enum import Enum -from datetime import datetime -from uuid import UUID - - -class TimeDTO(BaseModel): - start: datetime - end: datetime - - -class StatusCode(Enum): - UNSET = "UNSET" - OK = "OK" - ERROR = "ERROR" - - -class StatusDTO(BaseModel): - code: StatusCode - message: Optional[str] = None - stacktrace: Optional[str] = None - - -AttributeValueType = Any -Attributes = Dict[str, AttributeValueType] - - -class TreeType(Enum): - # --- VARIANTS --- # - INVOCATION = "invocation" - ANNOTATION = "annotation" - # --- VARIANTS --- # - - -class NodeType(Enum): - # --- VARIANTS --- # - ## SPAN_KIND_SERVER - AGENT = "agent" - WORKFLOW = "workflow" - CHAIN = "chain" - ## SPAN_KIND_INTERNAL - TASK = "task" - ## SPAN_KIND_CLIENT - TOOL = "tool" - EMBEDDING = "embedding" - QUERY = "query" - COMPLETION = "completion" - CHAT = "chat" - RERANK = "rerank" - # --- VARIANTS --- # - - -class RootDTO(BaseModel): - id: UUID - - -class TreeDTO(BaseModel): - id: UUID - type: Optional[TreeType] = None - - -class NodeDTO(BaseModel): - id: UUID - type: Optional[NodeType] = None - name: str - - -Data = Dict[str, Any] -Metrics = Dict[str, Any] -Metadata = Dict[str, Any] -Tags = Dict[str, Any] -Refs = Dict[str, Any] - - -class LinkDTO(BaseModel): - type: str - id: UUID - tree_id: Optional[UUID] = None - - -class ParentDTO(BaseModel): - id: UUID - - -class OTelSpanKind(Enum): - SPAN_KIND_UNSPECIFIED = "SPAN_KIND_UNSPECIFIED" - # INTERNAL - SPAN_KIND_INTERNAL = "SPAN_KIND_INTERNAL" - # SYNCHRONOUS - SPAN_KIND_SERVER = "SPAN_KIND_SERVER" - SPAN_KIND_CLIENT = "SPAN_KIND_CLIENT" - # ASYNCHRONOUS - SPAN_KIND_PRODUCER = "SPAN_KIND_PRODUCER" - SPAN_KIND_CONSUMER = "SPAN_KIND_CONSUMER" - - -class OTelStatusCode(Enum): - STATUS_CODE_OK = "STATUS_CODE_OK" - STATUS_CODE_ERROR = "STATUS_CODE_ERROR" - STATUS_CODE_UNSET = "STATUS_CODE_UNSET" - - -class OTelContextDTO(BaseModel): - trace_id: str - span_id: str - - -class OTelEventDTO(BaseModel): - name: str - timestamp: datetime - - attributes: Optional[Attributes] = None - - -class OTelLinkDTO(BaseModel): - context: OTelContextDTO - - attributes: Optional[Attributes] = None - - -class OTelExtraDTO(BaseModel): - kind: Optional[str] = None - - attributes: Optional[Attributes] = None - events: Optional[List[OTelEventDTO]] = None - links: Optional[List[OTelLinkDTO]] = None - - -class SpanDTO(BaseModel): - trace_id: str - span_id: str - - scope: Optional[ProjectScopeDTO] = None - - lifecycle: Optional[LifecycleDTO] = None - - root: RootDTO - tree: TreeDTO - node: NodeDTO - - parent: Optional[ParentDTO] = None - - time: TimeDTO - status: StatusDTO - - data: Optional[Data] = None - metrics: Optional[Metrics] = None - meta: Optional[Metadata] = None - tags: Optional[Tags] = None - refs: Optional[Refs] = None - - links: Optional[List[LinkDTO]] = None - - otel: Optional[OTelExtraDTO] = None - - nodes: Optional[Dict[str, Union["SpanDTO", List["SpanDTO"]]]] = None - - -class OTelSpanDTO(BaseModel): - context: OTelContextDTO - - name: str - kind: OTelSpanKind = OTelSpanKind.SPAN_KIND_UNSPECIFIED - - start_time: datetime - end_time: datetime - - status_code: OTelStatusCode = OTelStatusCode.STATUS_CODE_UNSET - status_message: Optional[str] = None - - attributes: Optional[Attributes] = None - events: Optional[List[OTelEventDTO]] = None - - parent: Optional[OTelContextDTO] = None - links: Optional[List[OTelLinkDTO]] = None - - -### --------------------------- ### -### services.observability.dtos ### -################################### - - -#################################### -### services.observability.utils ### -### ---------------------------- ### - -from typing import List, Dict, OrderedDict - - -def parse_span_dtos_to_span_idx( - span_dtos: List[SpanDTO], -) -> Dict[str, SpanDTO]: - span_idx = {span_dto.node.id: span_dto for span_dto in span_dtos} - - return span_idx - - -def parse_span_idx_to_span_id_tree( - span_idx: Dict[str, SpanDTO], -) -> OrderedDict: - span_id_tree = OrderedDict() - index = {} - - def push(span_dto: SpanDTO) -> None: - if span_dto.parent is None: - span_id_tree[span_dto.node.id] = OrderedDict() - index[span_dto.node.id] = span_id_tree[span_dto.node.id] - elif span_dto.parent.id in index: - index[span_dto.parent.id][span_dto.node.id] = OrderedDict() - index[span_dto.node.id] = index[span_dto.parent.id][span_dto.node.id] - - for span_dto in sorted(span_idx.values(), key=lambda span_dto: span_dto.time.start): - push(span_dto) - - return span_id_tree - - -def cumulate_costs( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, SpanDTO], -) -> None: - def _get_unit(span: SpanDTO): - if span.metrics is not None: - return span.metrics.get("unit.costs.total", 0.0) - - return 0.0 - - def _get_acc(span: SpanDTO): - if span.metrics is not None: - return span.metrics.get("acc.costs.total", 0.0) - - return 0.0 - - def _acc(a: float, b: float): - return a + b - - def _set(span: SpanDTO, cost: float): - if span.metrics is None: - span.metrics = {} - - if cost != 0.0: - span.metrics["acc.costs.total"] = cost - - _cumulate_tree_dfs(spans_id_tree, spans_idx, _get_unit, _get_acc, _acc, _set) - - -def cumulate_tokens( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, dict], -) -> None: - def _get_unit(span: SpanDTO): - _tokens = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.metrics is not None: - return { - "prompt": span.metrics.get("unit.tokens.prompt", 0.0), - "completion": span.metrics.get("unit.tokens.completion", 0.0), - "total": span.metrics.get("unit.tokens.total", 0.0), - } - - return _tokens - - def _get_acc(span: SpanDTO): - _tokens = { - "prompt": 0.0, - "completion": 0.0, - "total": 0.0, - } - - if span.metrics is not None: - return { - "prompt": span.metrics.get("acc.tokens.prompt", 0.0), - "completion": span.metrics.get("acc.tokens.completion", 0.0), - "total": span.metrics.get("acc.tokens.total", 0.0), - } - - return _tokens - - def _acc(a: dict, b: dict): - return { - "prompt": a.get("prompt", 0.0) + b.get("prompt", 0.0), - "completion": a.get("completion", 0.0) + b.get("completion", 0.0), - "total": a.get("total", 0.0) + b.get("total", 0.0), - } - - def _set(span: SpanDTO, tokens: dict): - if span.metrics is None: - span.metrics = {} - - if tokens.get("prompt", 0.0) != 0.0: - span.metrics["acc.tokens.prompt"] = tokens.get("prompt", 0.0) - if tokens.get("completion", 0.0) != 0.0: - span.metrics["acc.tokens.completion"] = ( - tokens.get("completion", 0.0) - if tokens.get("completion", 0.0) != 0.0 - else None - ) - if tokens.get("total", 0.0) != 0.0: - span.metrics["acc.tokens.total"] = ( - tokens.get("total", 0.0) if tokens.get("total", 0.0) != 0.0 else None - ) - - _cumulate_tree_dfs(spans_id_tree, spans_idx, _get_unit, _get_acc, _acc, _set) - - -def _cumulate_tree_dfs( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, SpanDTO], - get_unit_metric, - get_acc_metric, - accumulate_metric, - set_metric, -): - for span_id, children_spans_id_tree in spans_id_tree.items(): - children_spans_id_tree: OrderedDict - - cumulated_metric = get_unit_metric(spans_idx[span_id]) - - _cumulate_tree_dfs( - children_spans_id_tree, - spans_idx, - get_unit_metric, - get_acc_metric, - accumulate_metric, - set_metric, - ) - - for child_span_id in children_spans_id_tree.keys(): - marginal_metric = get_acc_metric(spans_idx[child_span_id]) - cumulated_metric = accumulate_metric(cumulated_metric, marginal_metric) - - set_metric(spans_idx[span_id], cumulated_metric) - - -def connect_children( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, dict], -) -> None: - _connect_tree_dfs(spans_id_tree, spans_idx) - - -def _connect_tree_dfs( - spans_id_tree: OrderedDict, - spans_idx: Dict[str, SpanDTO], -): - for span_id, children_spans_id_tree in spans_id_tree.items(): - children_spans_id_tree: OrderedDict - - parent_span = spans_idx[span_id] - - parent_span.nodes = dict() - - _connect_tree_dfs(children_spans_id_tree, spans_idx) - - for child_span_id in children_spans_id_tree.keys(): - child_span_name = spans_idx[child_span_id].node.name - if child_span_name not in parent_span.nodes: - parent_span.nodes[child_span_name] = spans_idx[child_span_id] - else: - if not isinstance(parent_span.nodes[child_span_name], list): - parent_span.nodes[child_span_name] = [ - parent_span.nodes[child_span_name] - ] - - parent_span.nodes[child_span_name].append(spans_idx[child_span_id]) - - if len(parent_span.nodes) == 0: - parent_span.nodes = None - - -### ---------------------------- ### -### services.observability.utils ### -#################################### - - -######################################################## -### apis.fastapi.observability.opentelemetry.semconv ### -### ------------------------------------------------ ### - -from json import loads - -VERSION = "0.4.1" - -V_0_4_1_ATTRIBUTES_EXACT = [ - # OPENLLMETRY - ("gen_ai.system", "ag.meta.system"), - ("gen_ai.request.base_url", "ag.meta.request.base_url"), - ("gen_ai.request.endpoint", "ag.meta.request.endpoint"), - ("gen_ai.request.headers", "ag.meta.request.headers"), - ("gen_ai.request.type", "ag.type.node"), - ("gen_ai.request.streaming", "ag.meta.request.streaming"), - ("gen_ai.request.model", "ag.meta.request.model"), - ("gen_ai.request.max_tokens", "ag.meta.request.max_tokens"), - ("gen_ai.request.temperature", "ag.meta.request.temperature"), - ("gen_ai.request.top_p", "ag.meta.request.top_p"), - ("gen_ai.response.model", "ag.meta.response.model"), - ("gen_ai.usage.prompt_tokens", "ag.metrics.unit.tokens.prompt"), - ("gen_ai.usage.completion_tokens", "ag.metrics.unit.tokens.completion"), - ("gen_ai.usage.total_tokens", "ag.metrics.unit.tokens.total"), - ("llm.headers", "ag.meta.request.headers"), - ("llm.request.type", "ag.type.node"), - ("llm.top_k", "ag.meta.request.top_k"), - ("llm.is_streaming", "ag.meta.request.streaming"), - ("llm.usage.total_tokens", "ag.metrics.unit.tokens.total"), - ("gen_ai.openai.api_base", "ag.meta.request.base_url"), - ("db.system", "ag.meta.system"), - ("db.vector.query.top_k", "ag.meta.request.top_k"), - ("pinecone.query.top_k", "ag.meta.request.top_k"), - ("traceloop.span.kind", "ag.type.node"), - ("traceloop.entity.name", "ag.node.name"), - # OPENINFERENCE - ("output.value", "ag.data.outputs"), - ("input.value", "ag.data.inputs"), - ("embedding.model_name", "ag.meta.request.model"), - ("llm.invocation_parameters", "ag.meta.request"), - ("llm.model_name", "ag.meta.request.model"), - ("llm.provider", "ag.meta.provider"), - ("llm.system", "ag.meta.system"), -] -V_0_4_1_ATTRIBUTES_PREFIX = [ - # OPENLLMETRY - ("gen_ai.prompt", "ag.data.inputs.prompt"), - ("gen_ai.completion", "ag.data.outputs.completion"), - ("llm.request.functions", "ag.data.inputs.functions"), - ("llm.request.tools", "ag.data.inputs.tools"), - # OPENINFERENCE - ("llm.token_count", "ag.metrics.unit.tokens"), - ("llm.input_messages", "ag.data.inputs.prompt"), - ("llm.output_messages", "ag.data.outputs.completion"), -] - -V_0_4_1_ATTRIBUTES_DYNAMIC = [ - # OPENLLMETRY - ("traceloop.entity.input", lambda x: ("ag.data.inputs", loads(x).get("inputs"))), - ("traceloop.entity.output", lambda x: ("ag.data.outputs", loads(x).get("outputs"))), -] - - -V_0_4_1_MAPS = { - "attributes": { - "exact": { - "from": {otel: agenta for otel, agenta in V_0_4_1_ATTRIBUTES_EXACT[::-1]}, - "to": {agenta: otel for otel, agenta in V_0_4_1_ATTRIBUTES_EXACT[::-1]}, - }, - "prefix": { - "from": {otel: agenta for otel, agenta in V_0_4_1_ATTRIBUTES_PREFIX[::-1]}, - "to": {agenta: otel for otel, agenta in V_0_4_1_ATTRIBUTES_PREFIX[::-1]}, - }, - "dynamic": { - "from": {otel: agenta for otel, agenta in V_0_4_1_ATTRIBUTES_DYNAMIC[::-1]} - }, - }, -} -V_0_4_1_KEYS = { - "attributes": { - "exact": { - "from": list(V_0_4_1_MAPS["attributes"]["exact"]["from"].keys()), - "to": list(V_0_4_1_MAPS["attributes"]["exact"]["to"].keys()), - }, - "prefix": { - "from": list(V_0_4_1_MAPS["attributes"]["prefix"]["from"].keys()), - "to": list(V_0_4_1_MAPS["attributes"]["prefix"]["to"].keys()), - }, - "dynamic": { - "from": list(V_0_4_1_MAPS["attributes"]["dynamic"]["from"].keys()), - }, - }, -} - - -MAPS = { - "0.4.1": V_0_4_1_MAPS, # LATEST -} -KEYS = { - "0.4.1": V_0_4_1_KEYS, # LATEST -} - -CODEX = {"maps": MAPS[VERSION], "keys": KEYS[VERSION]} - - -### ------------------------------------------------ ### -### apis.fastapi.observability.opentelemetry.semconv ### -######################################################## - - -######################################## -### apis.fastapi.observability.utils ### -### -------------------------------- ### - -from typing import Optional, Union, Tuple, Any, List, Dict -from uuid import UUID -from collections import OrderedDict -from json import loads, JSONDecodeError, dumps -from copy import copy - - -def _unmarshal_attributes( - marshalled: Dict[str, Any], -) -> Dict[str, Any]: - """ - Unmarshals a dictionary of marshalled attributes into a nested dictionary - - Example: - marshalled = { - "ag.type": "tree", - "ag.node.name": "root", - "ag.node.children.0.name": "child1", - "ag.node.children.1.name": "child2" - } - unmarshalled = { - "ag": { - "type": "tree", - "node": { - "name": "root", - "children": [ - { - "name": "child1", - }, - { - "name": "child2", - } - ] - } - } - } - """ - unmarshalled = {} - - for key, value in marshalled.items(): - keys = key.split(".") - - level = unmarshalled - - for i, part in enumerate(keys[:-1]): - if part.isdigit(): - part = int(part) - - if not isinstance(level, list): - level = [] - - while len(level) <= part: - level.append({}) - - level = level[part] - - else: - if part not in level: - level[part] = {} if not keys[i + 1].isdigit() else [] - - level = level[part] - - last_key = keys[-1] - - if last_key.isdigit(): - last_key = int(last_key) - - if not isinstance(level, list): - level = [] - - while len(level) <= last_key: - level.append(None) - - level[last_key] = value - - else: - level[last_key] = value - - return unmarshalled - - -def _encode_key( - namespace, - key: str, -) -> str: - return f"ag.{namespace}.{key}" - - -def _decode_key( - namespace, - key: str, -) -> str: - return key.replace(f"ag.{namespace}.", "") - - -def _decode_value( - value: Any, -) -> Any: - if isinstance(value, (int, float, bool, bytes)): - return value - - if isinstance(value, str): - if value == "@ag.type=none:": - return None - - if value.startswith("@ag.type=json:"): - encoded = value[len("@ag.type=json:") :] - value = loads(encoded) - return value - - return value - - return value - - -def _get_attributes( - attributes: Attributes, - namespace: str, -): - return { - _decode_key(namespace, key): _decode_value(value) - for key, value in attributes.items() - if key != _decode_key(namespace, key) - } - - -def _parse_from_types( - otel_span_dto: OTelSpanDTO, -) -> dict: - types = _get_attributes(otel_span_dto.attributes, "type") - - if types.get("tree"): - del otel_span_dto.attributes[_encode_key("type", "tree")] - - if types.get("node"): - del otel_span_dto.attributes[_encode_key("type", "node")] - - return types - - -def _parse_from_semconv( - attributes: Attributes, -) -> None: - _attributes = copy(attributes) - - for old_key, value in _attributes.items(): - if old_key in CODEX["keys"]["attributes"]["exact"]["from"]: - new_key = CODEX["maps"]["attributes"]["exact"]["from"][old_key] - - attributes[new_key] = value - - del attributes[old_key] - - else: - for prefix_key in CODEX["keys"]["attributes"]["prefix"]["from"]: - if old_key.startswith(prefix_key): - prefix = CODEX["maps"]["attributes"]["prefix"]["from"][prefix_key] - - new_key = old_key.replace(prefix_key, prefix) - - attributes[new_key] = value - - del attributes[old_key] - - for dynamic_key in CODEX["keys"]["attributes"]["dynamic"]["from"]: - if old_key == dynamic_key: - try: - new_key, new_value = CODEX["maps"]["attributes"]["dynamic"][ - "from" - ][dynamic_key](value) - - attributes[new_key] = new_value - - except: # pylint: disable=bare-except - pass - - -def _parse_from_links( - otel_span_dto: OTelSpanDTO, -) -> dict: - # LINKS - links = None - otel_links = None - - if otel_span_dto.links: - links = list() - otel_links = list() - - for link in otel_span_dto.links: - _links = _get_attributes(link.attributes, "type") - - if _links: - link_type = _links.get("link") - link_tree_id = str(UUID(link.context.trace_id[2:])) - link_node_id = str( - UUID(link.context.trace_id[2 + 16 :] + link.context.span_id[2:]) - ) - - links.append( - LinkDTO( - type=link_type, - tree_id=link_tree_id, - id=link_node_id, - ) - ) - else: - otel_links.append(link) - - links = links if links else None - otel_links = otel_links if otel_links else None - - otel_span_dto.links = otel_links - - return links - - -def _parse_from_attributes( - otel_span_dto: OTelSpanDTO, -) -> Tuple[dict, dict, dict, dict, dict]: - # DATA - _data = _get_attributes(otel_span_dto.attributes, "data") - - for key in _data.keys(): - del otel_span_dto.attributes[_encode_key("data", key)] - - # _data = _unmarshal_attributes(_data) - _data = _data if _data else None - - # METRICS - _metrics = _get_attributes(otel_span_dto.attributes, "metrics") - - for key in _metrics.keys(): - del otel_span_dto.attributes[_encode_key("metrics", key)] - - # _metrics = _unmarshal_attributes(_metrics) - _metrics = _metrics if _metrics else None - - # META - _meta = _get_attributes(otel_span_dto.attributes, "meta") - - for key in _meta.keys(): - del otel_span_dto.attributes[_encode_key("meta", key)] - - # _meta = _unmarshal_attributes(_meta) - _meta = _meta if _meta else None - - # TAGS - _tags = _get_attributes(otel_span_dto.attributes, "tags") - - for key in _tags.keys(): - del otel_span_dto.attributes[_encode_key("tags", key)] - - _tags = _tags if _tags else None - - # REFS - _refs = _get_attributes(otel_span_dto.attributes, "refs") - - for key in _refs.keys(): - del otel_span_dto.attributes[_encode_key("refs", key)] - - _refs = _refs if _refs else None - - if len(otel_span_dto.attributes.keys()) < 1: - otel_span_dto.attributes = None - - return _data, _metrics, _meta, _tags, _refs - - -def parse_from_otel_span_dto( - otel_span_dto: OTelSpanDTO, -) -> SpanDTO: - trace_id = str(otel_span_dto.context.trace_id[2:]) - span_id = str(otel_span_dto.context.span_id[2:]) - - lifecyle = LifecycleDTO( - created_at=datetime.now(), - ) - - _parse_from_semconv(otel_span_dto.attributes) - - types = _parse_from_types(otel_span_dto) - - tree_id = UUID(trace_id) - - tree_type: str = types.get("tree") - - tree = TreeDTO( - id=tree_id, - type=tree_type.lower() if tree_type else None, - ) - - node_id = UUID(trace_id[16:] + span_id) - - node_type = NodeType.TASK - try: - node_type = NodeType(types.get("node", "").lower()) - except: # pylint: disable=bare-except - pass - - node = NodeDTO( - id=node_id, - type=node_type, - name=otel_span_dto.name, - ) - - parent = ( - ParentDTO( - id=( - UUID( - otel_span_dto.parent.trace_id[2 + 16 :] - + otel_span_dto.parent.span_id[2:] - ) - ) - ) - if otel_span_dto.parent - else None - ) - - time = TimeDTO( - start=otel_span_dto.start_time, - end=otel_span_dto.end_time, - ) - - status = StatusDTO( - code=otel_span_dto.status_code.value.replace("STATUS_CODE_", ""), - message=otel_span_dto.status_message, - ) - - links = _parse_from_links(otel_span_dto) - - data, metrics, meta, tags, refs = _parse_from_attributes(otel_span_dto) - - duration = (otel_span_dto.end_time - otel_span_dto.start_time).total_seconds() - - if metrics is None: - metrics = dict() - - metrics["acc.duration.total"] = round(duration * 1_000, 3) # milliseconds - - root_id = str(tree_id) - if refs is not None: - root_id = refs.get("scenario.id", root_id) - - root = RootDTO(id=UUID(root_id)) - - otel = OTelExtraDTO( - kind=otel_span_dto.kind.value, - attributes=otel_span_dto.attributes, - events=otel_span_dto.events, - links=otel_span_dto.links, - ) - - span_dto = SpanDTO( - trace_id=trace_id, - span_id=span_id, - lifecycle=lifecyle, - root=root, - tree=tree, - node=node, - parent=parent, - time=time, - status=status, - data=data, - metrics=metrics, - meta=meta, - tags=tags, - refs=refs, - links=links, - otel=otel, - ) - - return span_dto - - -def parse_to_agenta_span_dto( - span_dto: SpanDTO, -) -> SpanDTO: - # DATA - if span_dto.data: - span_dto.data = _unmarshal_attributes(span_dto.data) - - if "outputs" in span_dto.data: - if "__default__" in span_dto.data["outputs"]: - span_dto.data["outputs"] = span_dto.data["outputs"]["__default__"] - - # METRICS - if span_dto.metrics: - span_dto.metrics = _unmarshal_attributes(span_dto.metrics) - - # META - if span_dto.meta: - span_dto.meta = _unmarshal_attributes(span_dto.meta) - - # TAGS - if span_dto.tags: - span_dto.tags = _unmarshal_attributes(span_dto.tags) - - # REFS - if span_dto.refs: - span_dto.refs = _unmarshal_attributes(span_dto.refs) - - if isinstance(span_dto.links, list): - for link in span_dto.links: - link.tree_id = None - - if span_dto.nodes: - for v in span_dto.nodes.values(): - if isinstance(v, list): - for n in v: - parse_to_agenta_span_dto(n) - else: - parse_to_agenta_span_dto(v) - - # MASK LINKS FOR NOW - span_dto.links = None - # ------------------ - - # MASK LIFECYCLE FOR NOW - # span_dto.lifecycle = None - if span_dto.lifecycle: - span_dto.lifecycle.updated_at = None - span_dto.lifecycle.updated_by_id = None - # ---------------------- - - return span_dto - - -### -------------------------------- ### -### apis.fastapi.observability.utils ### -######################################## - - -from litellm import cost_calculator -from opentelemetry.sdk.trace import ReadableSpan - -from agenta.sdk.types import AgentaNodeDto, AgentaNodesResponse - - -def parse_inline_trace( - spans: Dict[str, ReadableSpan], -): - otel_span_dtos = _parse_readable_spans(spans) - - ############################################################ - ### apis.fastapi.observability.api.otlp_collect_traces() ### - ### ---------------------------------------------------- ### - span_dtos = [ - parse_from_otel_span_dto(otel_span_dto) for otel_span_dto in otel_span_dtos - ] - ### ---------------------------------------------------- ### - ### apis.fastapi.observability.api.otlp_collect_traces() ### - ############################################################ - - ##################################################### - ### services.observability.service.ingest/query() ### - ### --------------------------------------------- ### - span_idx = parse_span_dtos_to_span_idx(span_dtos) - span_id_tree = parse_span_idx_to_span_id_tree(span_idx) - ### --------------------------------------------- ### - ### services.observability.service.ingest/query() ### - ##################################################### - - ############################################### - ### services.observability.service.ingest() ### - ### --------------------------------------- ### - calculate_costs(span_idx) - cumulate_costs(span_id_tree, span_idx) - cumulate_tokens(span_id_tree, span_idx) - ### --------------------------------------- ### - ### services.observability.service.ingest() ### - ############################################### - - ############################################## - ### services.observability.service.query() ### - ### -------------------------------------- ### - connect_children(span_id_tree, span_idx) - root_span_dtos = [span_idx[span_id] for span_id in span_id_tree.keys()] - agenta_span_dtos = [ - parse_to_agenta_span_dto(span_dto) for span_dto in root_span_dtos - ] - ### -------------------------------------- ### - ### services.observability.service.query() ### - ############################################## - - spans = [ - span_dto.model_dump( - mode="json", - exclude_none=True, - exclude_defaults=True, - ) - for span_dto in agenta_span_dtos - ] - inline_trace = AgentaNodesResponse( - version="1.0.0", - nodes=[AgentaNodeDto(**span) for span in spans], - ).model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) - return inline_trace - - -def _parse_readable_spans( - spans: List[ReadableSpan], -) -> List[OTelSpanDTO]: - otel_span_dtos = list() - - for span in spans: - otel_events = [ - OTelEventDTO( - name=event.name, - timestamp=_timestamp_ns_to_datetime(event.timestamp), - attributes=event.attributes, - ) - for event in span.events - ] - otel_links = [ - OTelLinkDTO( - context=OTelContextDTO( - trace_id=_int_to_hex(link.context.trace_id, 128), - span_id=_int_to_hex(link.context.span_id, 64), - ), - attributes=link.attributes, - ) - for link in span.links - ] - otel_span_dto = OTelSpanDTO( - context=OTelContextDTO( - trace_id=_int_to_hex(span.get_span_context().trace_id, 128), - span_id=_int_to_hex(span.get_span_context().span_id, 64), - ), - name=span.name, - kind=OTelSpanKind( - "SPAN_KIND_" - + (span.kind if isinstance(span.kind, str) else span.kind.name) - ), - start_time=_timestamp_ns_to_datetime(span.start_time), - end_time=_timestamp_ns_to_datetime(span.end_time), - status_code=OTelStatusCode("STATUS_CODE_" + span.status.status_code.name), - status_message=span.status.description, - attributes=span.attributes, - events=otel_events if len(otel_events) > 0 else None, - parent=( - OTelContextDTO( - trace_id=_int_to_hex(span.parent.trace_id, 128), - span_id=_int_to_hex(span.parent.span_id, 64), - ) - if span.parent and not span.parent.is_remote - else None - ), - links=otel_links if len(otel_links) > 0 else None, - ) - - otel_span_dtos.append(otel_span_dto) - - return otel_span_dtos - - -def _int_to_hex(integer, bits): - _hex = hex(integer)[2:] - - _hex = _hex.zfill(bits // 4) - - _hex = "0x" + _hex - - return _hex - - -def _timestamp_ns_to_datetime(timestamp_ns): - _datetime = datetime.fromtimestamp( - timestamp_ns / 1_000_000_000, - ).isoformat( - timespec="microseconds", - ) - - return _datetime - - -class LlmTokens(BaseModel): - prompt_tokens: Optional[int] = 0 - completion_tokens: Optional[int] = 0 - total_tokens: Optional[int] = 0 - - -TYPES_WITH_COSTS = [ - "embedding", - "query", - "completion", - "chat", - "rerank", -] - - -def calculate_costs(span_idx: Dict[str, SpanDTO]): - for span in span_idx.values(): - if ( - span.node.type - and span.node.type.name.lower() in TYPES_WITH_COSTS - and span.meta - and span.metrics - ): - model = span.meta.get("response.model") or span.meta.get( - "configuration.model" - ) - prompt_tokens = span.metrics.get("unit.tokens.prompt", 0.0) - completion_tokens = span.metrics.get("unit.tokens.completion", 0.0) - - try: - costs = cost_calculator.cost_per_token( - model=model, - prompt_tokens=prompt_tokens, - completion_tokens=completion_tokens, - ) - - if not costs: - continue - - prompt_cost, completion_cost = costs - total_cost = prompt_cost + completion_cost - - span.metrics["unit.costs.prompt"] = prompt_cost - span.metrics["unit.costs.completion"] = completion_cost - span.metrics["unit.costs.total"] = total_cost - - except: # pylint: disable=bare-except - pass diff --git a/sdk/agenta/sdk/engines/tracing/processors.py b/sdk/agenta/sdk/engines/tracing/processors.py deleted file mode 100644 index 963738e5fe..0000000000 --- a/sdk/agenta/sdk/engines/tracing/processors.py +++ /dev/null @@ -1,190 +0,0 @@ -from typing import Optional, Dict, List -from threading import Lock - -from opentelemetry.baggage import get_all as get_baggage -from opentelemetry.context import Context -from opentelemetry.sdk.trace import Span, SpanProcessor -from opentelemetry.sdk.trace.export import ( - SpanExporter, - ReadableSpan, - BatchSpanProcessor, -) - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.engines.tracing.conventions import Reference - -log = get_module_logger(__name__) - - -class TraceProcessor(SpanProcessor): - def __init__( - self, - span_exporter: SpanExporter, - references: Dict[str, str] = None, - inline: bool = False, - max_queue_size: int = None, - schedule_delay_millis: float = None, - max_export_batch_size: int = None, - export_timeout_millis: float = None, - ): - self.references = references or dict() - self.inline = inline is True - - self._registry = dict() - self._exporter = span_exporter - self._spans: Dict[int, List[ReadableSpan]] = dict() - - # --- DISTRIBUTED - if not self.inline: - self._delegate = BatchSpanProcessor( - span_exporter, - max_queue_size, - schedule_delay_millis, - max_export_batch_size, - export_timeout_millis, - ) - # --- DISTRIBUTED - - def on_start( - self, - span: Span, - parent_context: Optional[Context] = None, - ) -> None: - for key in self.references.keys(): - span.set_attribute(f"ag.refs.{key}", self.references[key]) - - baggage = get_baggage(parent_context) - - for key in baggage.keys(): - if key.startswith("ag.refs."): - _key = key.replace("ag.refs.", "") - if _key in [_.value for _ in Reference.__members__.values()]: - span.set_attribute(key, baggage[key]) - - trace_id = span.context.trace_id - span_id = span.context.span_id - - self._registry.setdefault(trace_id, {}) - self._registry[trace_id][span_id] = True - - def on_end( - self, - span: ReadableSpan, - ): - trace_id = span.context.trace_id - span_id = span.context.span_id - - self._spans.setdefault(trace_id, []).append(span) - self._registry.setdefault(trace_id, {}) - self._registry[trace_id].pop(span_id, None) - - if not self._registry[trace_id]: - spans = self._spans.pop(trace_id, []) - self._registry.pop(trace_id, None) - - # --- INLINE - if self.inline: - self._exporter.export(spans) - # --- INLINE - - # --- DISTRIBUTED - else: - for span in spans: - self._delegate.on_end(span) - - self._delegate.force_flush() - # --- DISTRIBUTED - - def force_flush( - self, - timeout_millis: int = None, - ) -> bool: - # --- INLINE - if self.inline: - try: - ret = self._exporter.force_flush(timeout_millis) - except: # pylint: disable=bare-except - ret = True - # --- INLINE - - # --- DISTRIBUTED - else: - ret = self._delegate.force_flush(timeout_millis) - # --- DISTRIBUTED - - if not ret: - log.warning("Agenta - Skipping export due to timeout.") - - return ret - - def shutdown(self) -> None: - # --- INLINE - if self.inline: - self._exporter.shutdown() - # --- INLINE - - # --- DISTRIBUTED - else: - self._delegate.shutdown() - # --- DISTRIBUTED - - def is_ready( - self, - trace_id: Optional[int] = None, - ) -> bool: - is_ready = True - - # --- INLINE - if self.inline: - try: - is_ready = self._exporter.is_ready(trace_id) - except: # pylint: disable=bare-except - pass - # --- INLINE - - return is_ready - - def fetch( - self, - trace_id: Optional[int] = None, - ) -> Dict[str, ReadableSpan]: - trace = None - - # --- INLINE - if self.inline: - try: - trace = self._exporter.fetch(trace_id) # type: ignore - except: # pylint: disable=bare-except - pass - # --- INLINE - - return trace - - -# Internal storage for the last ended span context -_last_ended_span_context = None -_lock = Lock() - - -def _set_last_ended(span_ctx) -> None: - """Set the last ended span context""" - with _lock: - global _last_ended_span_context - _last_ended_span_context = span_ctx - - -def _get_last_ended(): - """Get the last ended span context""" - with _lock: - return _last_ended_span_context - - -class EndedSpanRecorder(SpanProcessor): - """Records the last ended span context for later reference. - - This allows accessing span information even after the span has been ended, - which is useful for linking annotations to auto-instrumented spans. - """ - - def on_end(self, span): - _set_last_ended(span.get_span_context()) diff --git a/sdk/agenta/sdk/engines/tracing/propagation.py b/sdk/agenta/sdk/engines/tracing/propagation.py deleted file mode 100644 index 8327c27ef1..0000000000 --- a/sdk/agenta/sdk/engines/tracing/propagation.py +++ /dev/null @@ -1,102 +0,0 @@ -from typing import Tuple, Optional, Dict, Any - -from opentelemetry.trace import Span, set_span_in_context, get_current_span -from opentelemetry.baggage.propagation import W3CBaggagePropagator -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator -from opentelemetry.baggage import set_baggage -from opentelemetry.context import get_current - -from agenta.sdk.contexts.tracing import TracingContext - -import agenta as ag - - -def extract( - headers: Dict[str, str], -) -> Tuple[Optional[str], Optional[Any], Dict[str, str]]: - # --- Extract credentials --- # - credentials = None - - try: - credentials = ( - headers.get("Authorization") # Uppercase - or headers.get("authorization") # Lowercase - or None - ) - - except: # pylint: disable=bare-except - pass - - # --- Extract traceparent --- # - traceparent = None - - try: - _carrier = { - "traceparent": headers.get("Traceparent") # Uppercase - or headers.get("traceparent") # Lowercase - or "", - } - - _context = TraceContextTextMapPropagator().extract(_carrier) - - traceparent = _context - except: # pylint: disable=bare-except - pass - - # --- Extract baggage --- # - baggage = {} - - try: - _carrier = { - "baggage": headers.get("Baggage") # Uppercase - or headers.get("baggage") # Lowercase - or "", - } - - _context = W3CBaggagePropagator().extract(_carrier) - - if _context: - for partial in _context.values(): - for key, value in partial.items(): - baggage[key] = value - - except: # pylint: disable=bare-except - pass - - # --- # - return credentials, traceparent, baggage - - -def inject( - headers: Optional[Dict[str, str]] = None, -) -> Dict[str, str]: - headers = headers or {} - - _context = get_current() - - ctx = TracingContext.get() - - # --- Inject traceparent --- # - try: - TraceContextTextMapPropagator().inject(headers, context=_context) - - except: # pylint: disable=bare-except - pass - - # --- Inject baggage --- # - try: - if ctx.baggage: - for key, value in ctx.baggage.items(): - _context = set_baggage(key, value, context=_context) - - W3CBaggagePropagator().inject(headers, context=_context) - - except: # pylint: disable=bare-except - pass - - # --- Inject credentials --- # - if ctx.credentials: - headers["Authorization"] = ctx.credentials - - # --- # - return headers diff --git a/sdk/agenta/sdk/engines/tracing/spans.py b/sdk/agenta/sdk/engines/tracing/spans.py deleted file mode 100644 index 8b581013a5..0000000000 --- a/sdk/agenta/sdk/engines/tracing/spans.py +++ /dev/null @@ -1,136 +0,0 @@ -from typing import Optional, Union, Any, Dict - -from opentelemetry.trace import SpanContext -from opentelemetry.trace.status import Status, StatusCode -from opentelemetry.sdk.trace import Span - -from agenta.sdk.engines.tracing.attributes import serialize - - -class CustomSpan(Span): # INHERITANCE FOR TYPING ONLY - def __init__( - self, - span: Span, - ) -> None: - super().__init__( # INHERITANCE FOR TYPING ONLY - name=span.name, - context=span.context, - parent=span.parent, - sampler=span._sampler, - trace_config=span._trace_config, - resource=span.resource, - attributes=span.attributes, - events=span.events, - links=span.links, - kind=span.kind, - span_processor=span._span_processor, - instrumentation_info=span.instrumentation_info, - record_exception=span._record_exception, - set_status_on_exception=span._set_status_on_exception, - limits=span._limits, - instrumentation_scope=span.instrumentation_scope, - ) - - self._span = span - - ## --- PROXY METHODS --- ## - - def get_span_context(self): - return self._span.get_span_context() - - def is_recording(self) -> bool: - return self._span.is_recording() - - def update_name( - self, - name: str, - ) -> None: - self._span.update_name(name) - - def set_status( - self, - status: Union[Status, StatusCode], - description: Optional[str] = None, - ) -> None: - self._span.set_status( - status=status, - description=description, - ) - - def end(self) -> None: - self._span.end() - - ## --- CUSTOM METHODS W/ ATTRIBUTES SERALIZATION --- ## - - def set_attributes( - self, - attributes: Dict[str, Any], - namespace: Optional[str] = None, - max_depth: Optional[int] = None, - ) -> None: - self._span.set_attributes( - attributes=serialize( - namespace=namespace, - attributes=attributes, - max_depth=max_depth, - ) - ) - - def set_attribute( - self, - key: str, - value: Any, - namespace: Optional[str] = None, - ) -> None: - self.set_attributes( - attributes={key: value}, - namespace=namespace, - ) - - def add_event( - self, - name: str, - attributes: Optional[Dict[str, Any]] = None, - timestamp: Optional[int] = None, - namespace: Optional[str] = None, - ) -> None: - self._span.add_event( - name=name, - attributes=serialize( - namespace=namespace, - attributes=attributes, - ), - timestamp=timestamp, - ) - - def add_link( - self, - context: SpanContext, - attributes: Optional[Dict[str, Any]] = None, - namespace: Optional[str] = None, - ) -> None: - self._span.add_link( - context=context, - attributes=serialize( - namespace=namespace, - attributes=attributes, - ), - ) - - def record_exception( - self, - exception: BaseException, - attributes: Optional[Dict[str, Any]] = None, - timestamp: Optional[int] = None, - escaped: bool = False, - namespace: Optional[str] = None, - ) -> None: - self._span.record_exception( - exception=exception, - attributes=serialize( - namespace=namespace, - attributes=attributes, - ), - timestamp=timestamp, - escaped=escaped, - ) diff --git a/sdk/agenta/sdk/engines/tracing/tracing.py b/sdk/agenta/sdk/engines/tracing/tracing.py deleted file mode 100644 index 081effcd39..0000000000 --- a/sdk/agenta/sdk/engines/tracing/tracing.py +++ /dev/null @@ -1,324 +0,0 @@ -from typing import Optional, Any, Dict, Callable -from enum import Enum - -from pydantic import BaseModel - - -from opentelemetry.trace import ( - get_current_span, - set_tracer_provider, - get_tracer_provider, - Status, - StatusCode, -) -from opentelemetry.sdk import trace -from opentelemetry.sdk.trace import Span, Tracer, TracerProvider -from opentelemetry.sdk.resources import Resource - - -from agenta.sdk.utils.singleton import Singleton -from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.engines.tracing.processors import ( - TraceProcessor, - EndedSpanRecorder, - _get_last_ended, -) -from agenta.sdk.engines.tracing.exporters import InlineExporter, OTLPExporter -from agenta.sdk.engines.tracing.spans import CustomSpan -from agenta.sdk.engines.tracing.inline import parse_inline_trace -from agenta.sdk.engines.tracing.conventions import Reference, is_valid_attribute_key -from agenta.sdk.engines.tracing.propagation import extract, inject -from agenta.sdk.utils.cache import TTLLRUCache - - -log = get_module_logger(__name__) - - -_original_init = trace.TracerProvider.__init__ - - -def patched_init(self, *args, **kwargs): - _original_init(self, *args, **kwargs) - self.add_span_processor(EndedSpanRecorder()) - - -trace.TracerProvider.__init__ = patched_init - - -class Link(BaseModel): - trace_id: str - span_id: str - - -class Tracing(metaclass=Singleton): - Status = Status - StatusCode = StatusCode - - def __init__( - self, - url: str, - redact: Optional[Callable[..., Any]] = None, - redact_on_error: Optional[bool] = True, - ) -> None: - # ENDPOINT (OTLP) - self.otlp_url = url - # HEADERS (OTLP) - self.headers: Dict[str, str] = dict() - # REFERENCES - self.references: Dict[str, str] = dict() - # CREDENTIALS - self.credentials: TTLLRUCache = TTLLRUCache(ttl=(60 * 60)) # 1 hour x 512 keys - - # TRACER PROVIDER - self.tracer_provider: Optional[TracerProvider] = None - # TRACE PROCESSORS -- INLINE - self.inline: Optional[TraceProcessor] = None - # TRACER - self.tracer: Optional[Tracer] = None - # INLINE SPANS for INLINE TRACES (INLINE PROCESSOR) - self.inline_spans: Dict[str, Any] = dict() - - # REDACT - self.redact = redact - self.redact_on_error = redact_on_error - - # PUBLIC - - def configure( - self, - api_key: Optional[str] = None, - inline: Optional[bool] = True, - ): - # HEADERS (OTLP) - if api_key: - self.headers["Authorization"] = f"ApiKey {api_key}" - - # TRACER PROVIDER - self.tracer_provider = TracerProvider( - resource=Resource(attributes={"service.name": "agenta-sdk"}) - ) - - # --- INLINE - if inline: - # TRACE PROCESSORS -- INLINE - self.inline = TraceProcessor( - InlineExporter( - registry=self.inline_spans, - ), - references=self.references, - inline=inline, - ) - self.tracer_provider.add_span_processor(self.inline) - # --- INLINE - - # TRACE PROCESSORS -- OTLP - try: - log.info("Agenta - OLTP URL: %s", self.otlp_url) - - _otlp = TraceProcessor( - OTLPExporter( - endpoint=self.otlp_url, - headers=self.headers, - credentials=self.credentials, - ), - references=self.references, - ) - - self.tracer_provider.add_span_processor(_otlp) - except: # pylint: disable=bare-except - log.warning("Agenta - OLTP unreachable, skipping exports.") - - # GLOBAL TRACER PROVIDER -- INSTRUMENTATION LIBRARIES - set_tracer_provider(self.tracer_provider) - # TRACER - self.tracer: Tracer = self.tracer_provider.get_tracer("agenta.tracer") - - def get_current_span(self): - _span = None - - with suppress(): - _span = get_current_span() - - if _span.is_recording(): - return CustomSpan(_span) - - return _span - - def store_internals( - self, - attributes: Dict[str, Any], - span: Optional[Span] = None, - ): - with suppress(): - if span is None: - span = self.get_current_span() - - span.set_attributes( - attributes={"internals": attributes}, - namespace="data", - ) - - def store_refs( - self, - refs: Dict[str, str], - span: Optional[Span] = None, - ): - with suppress(): - if span is None: - span = self.get_current_span() - - for key in refs.keys(): - if key in [_.value for _ in Reference.__members__.values()]: - # ADD REFERENCE TO THIS SPAN - span.set_attribute( - key.value if isinstance(key, Enum) else key, - refs[key], - namespace="refs", - ) - - # AND TO ALL SPANS CREATED AFTER THIS ONE - self.references[key] = refs[key] - # TODO: THIS SHOULD BE REPLACED BY A TRACE CONTEXT !!! - - def store_meta( - self, - meta: Dict[str, Any], - span: Optional[Span] = None, - ): - with suppress(): - if span is None: - span = self.get_current_span() - - for key in meta.keys(): - if is_valid_attribute_key(key): - span.set_attribute( - key, - meta[key], - namespace="meta", - ) - - def store_metrics( - self, - metrics: Dict[str, Any], - span: Optional[Span] = None, - ): - with suppress(): - if span is None: - span = self.get_current_span() - - for key in metrics.keys(): - if is_valid_attribute_key(key): - span.set_attribute( - key, - metrics[key], - namespace="metrics", - ) - - def is_inline_trace_ready( - self, - trace_id: Optional[int] = None, - ) -> bool: - is_ready = True - - with suppress(): - if self.inline and trace_id: - is_ready = self.inline.is_ready(trace_id) - - return is_ready - - def get_inline_trace( - self, - trace_id: Optional[int] = None, - ) -> Dict[str, Any]: - _inline_trace = {} - - with suppress(): - if self.inline and trace_id: - is_ready = self.inline.is_ready(trace_id) - - if is_ready is True: - otel_spans = self.inline.fetch(trace_id) - - if otel_spans: - _inline_trace = parse_inline_trace(otel_spans) - - return _inline_trace - - def extract( - self, - *args, - **kwargs, - ): - return extract(*args, **kwargs) - - def inject( - self, - *args, - **kwargs, - ): - return inject(*args, **kwargs) - - def get_current_span_context(self): - """Get the current active span context if available. - - Returns: - SpanContext or None if no active span - """ - span = get_current_span() - ctx = span.get_span_context() - return ctx if ctx and ctx.is_valid else None - - def get_last_span_context(self): - """Get the last closed span context if available. - - This is useful for accessing span information after a span has closed, - particularly with auto-instrumentation libraries. - - Returns: - SpanContext or None if no spans have been closed - """ - return _get_last_ended() - - def get_span_context(self): - """Get the most relevant span context. - - First tries to get the current active span context. - If no active span exists, falls back to the last closed span. - - Returns: - SpanContext or None if no relevant span context is available - """ - return self.get_current_span_context() or self.get_last_span_context() - - def build_invocation_link(self, span_ctx=None) -> Optional[Link]: - """ - Builds a Link object containing the hex-formatted trace_id and span_id - from the current (or fallback last ended) span context. - Useful to link annotations to spans. - - Args: - span_ctx: Optional SpanContext to convert to a Link - - Returns: - Link object with trace_id and span_id or None if no valid context - """ - if span_ctx is None: - span_ctx = self.get_span_context() - - if span_ctx and span_ctx.is_valid: - return Link( - trace_id=f"{span_ctx.trace_id:032x}", - span_id=f"{span_ctx.span_id:016x}", - ) - - return None - - -def get_tracer( - tracing: Tracing, -) -> Tracer: - if tracing is None or tracing.tracer is None or tracing.tracer_provider is None: - return get_tracer_provider().get_tracer("default.tracer") - - return tracing.tracer diff --git a/sdk/agenta/sdk/evaluations/__init__.py b/sdk/agenta/sdk/evaluations/__init__.py deleted file mode 100644 index 4e5223d757..0000000000 --- a/sdk/agenta/sdk/evaluations/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .preview.evaluate import aevaluate -from .preview.utils import display_evaluation_results as display diff --git a/sdk/agenta/sdk/evaluations/metrics.py b/sdk/agenta/sdk/evaluations/metrics.py deleted file mode 100644 index be684c5875..0000000000 --- a/sdk/agenta/sdk/evaluations/metrics.py +++ /dev/null @@ -1,37 +0,0 @@ -from typing import Optional -from uuid import UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.models.evaluations import EvaluationMetrics - -# TODO: ADD TYPES - - -async def arefresh( - run_id: UUID, - scenario_id: Optional[UUID] = None, - # timestamp: Optional[str] = None, - # interval: Optional[float] = None, -) -> EvaluationMetrics: - payload = dict( - run_id=str(run_id), - scenario_id=str(scenario_id) if scenario_id else None, - ) - - response = authed_api()( - method="POST", - endpoint=f"/preview/evaluations/metrics/refresh", - params=payload, - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - metrics = EvaluationMetrics(**response["metrics"][0]) - - return metrics diff --git a/sdk/agenta/sdk/evaluations/preview/__init__.py b/sdk/agenta/sdk/evaluations/preview/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/evaluations/preview/evaluate.py b/sdk/agenta/sdk/evaluations/preview/evaluate.py deleted file mode 100644 index c5e460ffb6..0000000000 --- a/sdk/agenta/sdk/evaluations/preview/evaluate.py +++ /dev/null @@ -1,770 +0,0 @@ -from typing import Dict, List, Any, Union, Optional, Tuple -from uuid import UUID -from copy import deepcopy -from datetime import datetime - -from pydantic import BaseModel - -from agenta.sdk.models.evaluations import ( - Origin, - Target, - Link, - Reference, - SimpleEvaluationData, -) -from agenta.sdk.models.workflows import ( - ApplicationRevision, - EvaluatorRevision, - WorkflowServiceRequestData, - ApplicationServiceRequest, - EvaluatorServiceRequest, -) -from agenta.sdk.models.testsets import TestsetRevision - -from agenta.sdk.utils.references import get_slug_from_name_and_id -from agenta.sdk.evaluations.preview.utils import fetch_trace_data - -from agenta.sdk.managers.testsets import ( - acreate as acreate_testset, - aretrieve as aretrieve_testset, -) -from agenta.sdk.managers.applications import ( - aupsert as aupsert_application, - aretrieve as aretrieve_application, -) -from agenta.sdk.managers.evaluators import ( - aupsert as aupsert_evaluator, - aretrieve as aretrieve_evaluator, -) -from agenta.sdk.evaluations.runs import ( - acreate as acreate_run, - aclose as aclose_run, - aurl as aget_url, -) -from agenta.sdk.evaluations.scenarios import ( - acreate as aadd_scenario, -) -from agenta.sdk.evaluations.results import ( - acreate as alog_result, -) -from agenta.sdk.evaluations.metrics import ( - arefresh as acompute_metrics, -) - - -from agenta.sdk.models.workflows import ( - WorkflowServiceInterface, - WorkflowServiceConfiguration, -) -from agenta.sdk.decorators.running import ( - invoke_application, - invoke_evaluator, -) - - -class EvaluateSpecs(BaseModel): - testsets: Optional[Target] = None - applications: Optional[Target] = None - evaluators: Optional[Target] = None - - repeats: Optional[int] = None - - -async def _parse_evaluate_kwargs( - *, - testsets: Optional[Target] = None, - applications: Optional[Target] = None, - evaluators: Optional[Target] = None, - # - repeats: Optional[int] = None, - # - specs: Optional[Union[EvaluateSpecs, Dict[str, Any]]] = None, -) -> SimpleEvaluationData: - _specs = deepcopy(specs) - if isinstance(_specs, dict): - _specs = EvaluateSpecs(**_specs) - if _specs and not isinstance(_specs, EvaluateSpecs): - _specs = None - - simple_evaluation_data = SimpleEvaluationData( - testset_steps=testsets or (_specs.testsets if _specs else None), - application_steps=applications or (_specs.applications if _specs else None), - evaluator_steps=evaluators or (_specs.evaluators if _specs else None), - # - repeats=repeats or (_specs.repeats if _specs else None), - ) - - if not simple_evaluation_data.testset_steps: - raise ValueError("Invalid 'evaluate()' specs: missing testsets") - if not simple_evaluation_data.application_steps: - raise ValueError("Invalid 'evaluate()' specs: missing applications") - if not simple_evaluation_data.evaluator_steps: - raise ValueError("Invalid 'evaluate()' specs: missing evaluators") - - return simple_evaluation_data - - -async def _upsert_entities( - simple_evaluation_data: SimpleEvaluationData, -) -> SimpleEvaluationData: - if simple_evaluation_data.testset_steps: - if isinstance(simple_evaluation_data.testset_steps, list): - testset_steps: Dict[str, Origin] = {} - - if all( - isinstance(testset_revision_id, UUID) - for testset_revision_id in simple_evaluation_data.testset_steps - ): - for testset_revision_id in simple_evaluation_data.testset_steps: - if isinstance(testset_revision_id, UUID): - testset_steps[str(testset_revision_id)] = "custom" - - elif all( - isinstance(testcases_data, List) - for testcases_data in simple_evaluation_data.testset_steps - ): - for testcases_data in simple_evaluation_data.testset_steps: - if isinstance(testcases_data, List): - if all(isinstance(step, Dict) for step in testcases_data): - testset_revision_id = await acreate_testset( - data=testcases_data, - ) - testset_steps[str(testset_revision_id)] = "custom" - - simple_evaluation_data.testset_steps = testset_steps - - if not simple_evaluation_data.testset_steps or not isinstance( - simple_evaluation_data.testset_steps, dict - ): - raise ValueError( - "Invalid 'evaluate()' specs: missing or invalid testset steps", - ) - - if simple_evaluation_data.application_steps: - if isinstance(simple_evaluation_data.application_steps, list): - application_steps: Dict[str, Origin] = {} - - if all( - isinstance(application_revision_id, UUID) - for application_revision_id in simple_evaluation_data.application_steps - ): - for application_revision_id in simple_evaluation_data.application_steps: - if isinstance(application_revision_id, UUID): - application_steps[str(application_revision_id)] = "custom" - - elif all( - callable(application_handler) - for application_handler in simple_evaluation_data.application_steps - ): - for application_handler in simple_evaluation_data.application_steps: - if callable(application_handler): - application_revision_id = await aupsert_application( - handler=application_handler, - ) - application_steps[str(application_revision_id)] = "custom" - - simple_evaluation_data.application_steps = application_steps - - if not simple_evaluation_data.application_steps or not isinstance( - simple_evaluation_data.application_steps, dict - ): - raise ValueError( - "Invalid 'evaluate()' specs: missing or invalid application steps", - ) - - if simple_evaluation_data.evaluator_steps: - if isinstance(simple_evaluation_data.evaluator_steps, list): - evaluator_steps: Dict[str, Origin] = {} - - if all( - isinstance(evaluator_revision_id, UUID) - for evaluator_revision_id in simple_evaluation_data.evaluator_steps - ): - for evaluator_revision_id in simple_evaluation_data.evaluator_steps: - if isinstance(evaluator_revision_id, UUID): - evaluator_steps[str(evaluator_revision_id)] = "custom" - - elif all( - callable(evaluator_handler) - for evaluator_handler in simple_evaluation_data.evaluator_steps - ): - for evaluator_handler in simple_evaluation_data.evaluator_steps: - if callable(evaluator_handler): - evaluator_revision_id = await aupsert_evaluator( - handler=evaluator_handler, - ) - evaluator_steps[str(evaluator_revision_id)] = "custom" - - simple_evaluation_data.evaluator_steps = evaluator_steps - - if not simple_evaluation_data.evaluator_steps or not isinstance( - simple_evaluation_data.evaluator_steps, dict - ): - raise ValueError( - "Invalid 'evaluate()' specs: missing or invalid evaluator steps", - ) - - return simple_evaluation_data - - -async def _retrieve_entities( - simple_evaluation_data: SimpleEvaluationData, -) -> Tuple[ - Dict[UUID, TestsetRevision], - Dict[UUID, ApplicationRevision], - Dict[UUID, EvaluatorRevision], -]: - testset_revisions: Dict[UUID, TestsetRevision] = {} - # for testset_revision_id, origin in simple_evaluation_data.testset_steps.items(): - # testset_revision = await retrieve_testset( - # testset_revision_id=testset_revision_id, - # ) - for testset_id, origin in simple_evaluation_data.testset_steps.items(): - testset_revision = await aretrieve_testset( - testset_id=testset_id, - ) - - if not testset_revision or not testset_revision.id: - continue - - testset_revisions[testset_revision.id] = testset_revision - - application_revisions: Dict[UUID, ApplicationRevision] = {} - for ( - application_revision_id, - origin, - ) in simple_evaluation_data.application_steps.items(): - application_revision = await aretrieve_application( - application_revision_id=application_revision_id, - ) - - if not application_revision: - continue - - application_revisions[application_revision_id] = application_revision - - evaluator_revisions: Dict[UUID, EvaluatorRevision] = {} - for evaluator_revision_id, origin in simple_evaluation_data.evaluator_steps.items(): - evaluator_revision = await aretrieve_evaluator( - evaluator_revision_id=evaluator_revision_id, - ) - - if not evaluator_revision: - continue - - evaluator_revisions[evaluator_revision_id] = evaluator_revision - - return testset_revisions, application_revisions, evaluator_revisions - - -def _timestamp_suffix(): - suffix = datetime.now().strftime("%y-%m-%d · %H:%M") - return f" [{suffix}]" - - -UNICODE = { - "here": "• ", - "root": "┌─ ", - "next": "├─ ", - "last": "└─ ", - "pipe": "│ ", - "skip": " ", - "this": "── ", -} - - -# @debug -async def aevaluate( - *, - name: Optional[str] = None, - description: Optional[str] = None, - # - testsets: Optional[Target] = None, - applications: Optional[Target] = None, - evaluators: Optional[Target] = None, - # - repeats: Optional[int] = None, - # - specs: Optional[Union[EvaluateSpecs, Dict[str, Any]]] = None, -): - simple_evaluation_data = await _parse_evaluate_kwargs( - testsets=testsets, - applications=applications, - evaluators=evaluators, - repeats=repeats, - specs=specs, - ) - - simple_evaluation_data = await _upsert_entities( - simple_evaluation_data=simple_evaluation_data, - ) - - print() - print( - "──────────────────────────────────────" - "──────────────────────────────────────" - ) - print(f"Evaluation running...") - print( - "──────────────────────────────────────" - "──────────────────────────────────────" - ) - - suffix = _timestamp_suffix() - name = f"{name}{suffix}" - - run = await acreate_run( - name=name, - description=description, - # - testset_steps=simple_evaluation_data.testset_steps, - application_steps=simple_evaluation_data.application_steps, - evaluator_steps=simple_evaluation_data.evaluator_steps, - # - repeats=simple_evaluation_data.repeats, - ) - - print( - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f" run_id={str(run.id)}", - ) - - if not run.id: - print("[failure] could not create evaluation") - return None - - ( - testset_revisions, - application_revisions, - evaluator_revisions, - ) = await _retrieve_entities( - simple_evaluation_data=simple_evaluation_data, - ) - - scenarios = list() - - metrics = dict() - - for testset_revision in testset_revisions.values(): - if not testset_revision.data or not testset_revision.data.testcases: - continue - - testcases = testset_revision.data.testcases - - print( - f"{UNICODE['next']}" - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f" testset_id={str(testset_revision.testset_id)}", - ) - - for testcase_idx, testcase in enumerate(testcases): - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - "-----------------------" - "--------------------------------------" - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['next'if testcase_idx < len(testcases) - 1 else 'last']}" - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"testcase_id={str(testcase.id)}", - ) - - scenario = await aadd_scenario( - run_id=run.id, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe' if testcase_idx < len(testcases) - 1 else 'skip']}" - f"{UNICODE['next']}" - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f"scenario_id={str(scenario.id)}", - ) - - results = dict() - - result = await alog_result( - run_id=run.id, - scenario_id=scenario.id, - step_key="testset-" + testset_revision.slug, # type: ignore - testcase_id=testcase.id, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe' if testcase_idx < len(testcases) - 1 else 'skip']}" - f"{UNICODE['pipe']}" - f"{UNICODE['next']}" - f"{UNICODE['here']}" - f" result_id={str(result.id)} (testcase)", - ) - - results[testset_revision.slug] = result - - _testcase = testcase.model_dump( - mode="json", - exclude_none=True, - ) # type: ignore - inputs = testcase.data - if isinstance(inputs, dict): - if "testcase_dedup_id" in inputs: - del inputs["testcase_dedup_id"] - - for application_revision in application_revisions.values(): - if not application_revision or not application_revision.data: - print("Missing or invalid application revision") - if application_revision: - print(application_revision.model_dump(exclude_none=True)) - continue - - # print(f" Application {application_revision.model_dump(exclude_none=True)}") # type: ignore - - references = dict( - testset=Reference( - id=testset_revision.testset_id, - ), - testset_variant=Reference( - id=testset_revision.testset_variant_id, - ), - testset_revision=Reference( - id=testset_revision.id, - slug=testset_revision.slug, - version=testset_revision.version, - ), - application=Reference( - id=application_revision.application_id, - ), - application_variant=Reference( - id=application_revision.application_variant_id, - ), - application_revision=Reference( - id=application_revision.id, - slug=application_revision.slug, - version=application_revision.version, - ), - ) - links = None - - _revision = application_revision.model_dump( - mode="json", - exclude_none=True, - ) - interface = WorkflowServiceInterface( - **( - application_revision.data.model_dump() - if application_revision.data - else {} - ) - ) - configuration = WorkflowServiceConfiguration( - **( - application_revision.data.model_dump() - if application_revision.data - else {} - ) - ) - parameters = application_revision.data.parameters - - _trace = None - outputs = None - - workflow_service_request_data = WorkflowServiceRequestData( - revision=_revision, - parameters=parameters, - # - testcase=_testcase, - inputs=inputs, - # - trace=_trace, - outputs=outputs, - ) - - application_request = ApplicationServiceRequest( - interface=interface, - configuration=configuration, - # - data=workflow_service_request_data, - # - references=references, # type: ignore - links=links, # type: ignore - ) - - application_response = await invoke_application( - request=application_request, - ) - - if ( - not application_response - or not application_response.data - or not application_response.trace_id - ): - print("Missing or invalid application response") - if application_response: - print(application_response.model_dump(exclude_none=True)) - continue - - trace_id = application_response.trace_id - - if not application_revision.id or not application_revision.name: - print("Missing application revision ID or name") - continue - - application_slug = get_slug_from_name_and_id( - name=application_revision.name, - id=application_revision.id, - ) - - trace = fetch_trace_data(trace_id, max_retries=30, delay=1.0) - - result = await alog_result( - run_id=run.id, - scenario_id=scenario.id, - step_key="application-" + application_slug, # type: ignore - trace_id=trace_id, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe' if testcase_idx < len(testcases) - 1 else 'skip']}" - f"{UNICODE['pipe']}" - f"{UNICODE['next']}" - f"{UNICODE['here']}" - f" result_id={str(result.id)} (invocation)", - ) - - results[application_slug] = result - - trace = await trace - - if not trace: - print("Failed to fetch trace data for application") - continue - - root_span = list(trace.get("spans", {}).values())[0] - trace_attributes: dict = root_span.get("attributes", {}) - trace_attributes_ag: dict = trace_attributes.get("ag", {}) - trace_attributes_ag_data: dict = trace_attributes_ag.get("data", {}) - outputs = trace_attributes_ag_data.get("outputs") - inputs = inputs or trace_attributes_ag_data.get("inputs") - - for i, evaluator_revision in enumerate(evaluator_revisions.values()): - if not evaluator_revision or not evaluator_revision.data: - print("Missing or invalid evaluator revision") - if evaluator_revision: - print(evaluator_revision.model_dump(exclude_none=True)) - continue - - references = dict( - testset=Reference( - id=testset_revision.testset_id, - ), - testset_variant=Reference( - id=testset_revision.testset_variant_id, - ), - testset_revision=Reference( - id=testset_revision.id, - slug=testset_revision.slug, - version=testset_revision.version, - ), - evaluator=Reference( - id=evaluator_revision.evaluator_id, - ), - evaluator_variant=Reference( - id=evaluator_revision.evaluator_variant_id, - ), - evaluator_revision=Reference( - id=evaluator_revision.id, - slug=evaluator_revision.slug, - version=evaluator_revision.version, - ), - ) - links = ( - dict( - invocation=Link( - trace_id=application_response.trace_id, - span_id=application_response.span_id, - ) - ) - if application_response.trace_id - and application_response.span_id - else None - ) - - _revision = evaluator_revision.model_dump( - mode="json", - exclude_none=True, - ) - interface = WorkflowServiceInterface( - **( - evaluator_revision.data.model_dump() - if evaluator_revision.data - else {} - ) - ) - configuration = WorkflowServiceConfiguration( - **( - evaluator_revision.data.model_dump() - if evaluator_revision.data - else {} - ) - ) - parameters = evaluator_revision.data.parameters - - workflow_service_request_data = WorkflowServiceRequestData( - revision=_revision, - parameters=parameters, - # - testcase=_testcase, - inputs=inputs, - # - trace=trace, - outputs=outputs, - ) - - evaluator_request = EvaluatorServiceRequest( - version="2025.07.14", - # - interface=interface, - configuration=configuration, - # - data=workflow_service_request_data, - # - references=references, # type: ignore - links=links, # type: ignore - ) - - evaluator_response = await invoke_evaluator( - request=evaluator_request, - # - annotate=True, - ) - - if ( - not evaluator_response - or not evaluator_response.data - or not evaluator_response.trace_id - ): - print("Missing or invalid evaluator response") - if evaluator_response: - print(evaluator_response.model_dump(exclude_none=True)) - continue - - trace_id = evaluator_response.trace_id - - trace = fetch_trace_data(trace_id, max_retries=20, delay=1.0) - - result = await alog_result( - run_id=run.id, - scenario_id=scenario.id, - step_key="evaluator-" + evaluator_revision.slug, # type: ignore - trace_id=trace_id, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe' if testcase_idx < len(testcases) - 1 else 'skip']}" - f"{UNICODE['pipe']}" - f"{UNICODE['last' if (i == len(evaluator_revisions) - 1) else 'next']}" - f"{UNICODE['here']}" - f" result_id={str(result.id)} (annotation)", - ) - - results[evaluator_revision.slug] = result - - trace = await trace - - if not trace: - print("Failed to fetch trace data for evaluator") - continue - - metrics = await acompute_metrics( - run_id=run.id, - scenario_id=scenario.id, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['pipe' if testcase_idx < len(testcases) - 1 else 'skip']}" - f"{UNICODE['last']}" - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f" metrics_id={str(metrics.id)}", - ) - - scenarios.append( - { - "scenario": scenario, - "results": results, - "metrics": metrics, - }, - ) - - print( - f"{UNICODE['pipe']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - "-----------------------" - "--------------------------------------" - ) - - metrics = dict() - - if len(scenarios) > 0: - metrics = await acompute_metrics( - run_id=run.id, - ) - - print( - f"{UNICODE['last']}" - f"{UNICODE['here']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f"{UNICODE['skip']}" - f" metrics_id={str(metrics.id)}", - ) - - run = await aclose_run( - run_id=run.id, - ) - - run_url = await aget_url(run_id=run.id) - - print( - "──────────────────────────────────────" - "──────────────────────────────────────" - ) - print(f"Evaluation finished.") - print( - "--------------------------------------" - "--------------------------------------" - ) - print(f"Evaluation URL: {run_url or '[unavailable]'}") - print( - "──────────────────────────────────────" - "──────────────────────────────────────" - ) - print() - - return dict( - run=run, - scenarios=scenarios, - metrics=metrics, - ) diff --git a/sdk/agenta/sdk/evaluations/preview/utils.py b/sdk/agenta/sdk/evaluations/preview/utils.py deleted file mode 100644 index 609ecfce47..0000000000 --- a/sdk/agenta/sdk/evaluations/preview/utils.py +++ /dev/null @@ -1,861 +0,0 @@ -""" -Utilities for formatting and displaying evaluation results. -Contains helper functions for Rich text formatting and table generation. -""" - -import json -from typing import Dict, List, Any, Optional -import asyncio -from uuid import UUID -from dataclasses import dataclass, field - -import unicodedata -import re - - -@dataclass -class EvaluationTestcaseData: - """ - Data model for a single evaluation testcase. - - Attributes: - case_id: Unique identifier for the testcase - inputs: Input data for the testcase - application_outputs: Outputs from the application under test - evaluator_outputs: Outputs from evaluators (scores and assertions) - """ - - case_id: str = "" - inputs: Dict[str, Any] = field(default_factory=dict) - application_outputs: Dict[str, Any] = field(default_factory=dict) - evaluator_outputs: Dict[str, Any] = field(default_factory=dict) - - def get_scores(self) -> Dict[str, float]: - """Extract numeric scores from evaluator outputs.""" - scores = {} - for key, value in self.evaluator_outputs.items(): - if isinstance(value, (int, float)) and not isinstance(value, bool): - scores[key] = value - return scores - - def get_assertions(self) -> Dict[str, Any]: - """Extract boolean assertions from evaluator outputs.""" - assertions = {} - for key, value in self.evaluator_outputs.items(): - if isinstance(value, bool): - assertions[key] = value - elif isinstance(value, list) and all(isinstance(v, bool) for v in value): - assertions[key] = value - return assertions - - -@dataclass -class EvaluationReport: - """ - Data model for the complete evaluation report. - - Attributes: - run_id: Unique identifier for the evaluation run - cases: List of evaluation case data - summary: Summary statistics for the evaluation - """ - - run_id: str = "" - cases: List[EvaluationTestcaseData] = field(default_factory=list) - summary: Dict[str, Any] = field(default_factory=dict) - - def get_total_cases(self) -> int: - """Get total number of testcases.""" - return len(self.cases) - - def get_all_evaluator_keys(self) -> set[str]: - """Get all unique evaluator keys across all cases.""" - all_keys = set() - for case in self.cases: - all_keys.update(case.evaluator_outputs.keys()) - return all_keys - - def calculate_averages(self) -> Dict[str, float]: - """Calculate average scores across all cases.""" - averages = {} - all_scores = {} - - # Collect all scores - for case in self.cases: - case_scores = case.get_scores() - for key, value in case_scores.items(): - if key not in all_scores: - all_scores[key] = [] - all_scores[key].append(value) - - # Calculate averages - for key, values in all_scores.items(): - if values: - averages[key] = sum(values) / len(values) - - return averages - - def calculate_assertion_percentage(self) -> float: - """Calculate overall assertion success percentage.""" - all_assertions = [] - - for case in self.cases: - case_assertions = case.get_assertions() - for value in case_assertions.values(): - if isinstance(value, bool): - all_assertions.append(value) - elif isinstance(value, list): - all_assertions.extend(value) - - if not all_assertions: - return 0.0 - - return (sum(all_assertions) / len(all_assertions)) * 100 - - -# Rich imports for progress tracking -try: - from rich.progress import track - - RICH_AVAILABLE = True -except ImportError: - RICH_AVAILABLE = False - - # Use simple iteration when Rich is not available - def track(iterable, description="Processing..."): - return iterable - - -# Try to import Rich for enhanced formatting, fall back to plain text if not available -try: - from rich.console import Console - from rich.table import Table - from rich.text import Text - from rich import box - - _HAS_RICH = True -except ImportError: - _HAS_RICH = False - - # Fallback implementations for when Rich is not available - class Text: - def __init__(self, text="", style=None): - self.text = str(text) - - def __str__(self): - return self.text - - @staticmethod - def from_markup(text): - # Remove Rich markup for plain text fallback - import re - - clean_text = re.sub(r'\[/?\w+(?:\s+\w+="[^"]*")*\]', "", text) - return Text(clean_text) - - class Table: - def __init__(self, *args, **kwargs): - self.rows = [] - self.headers = [] - - def add_column(self, header, **kwargs): - self.headers.append(header) - - def add_row(self, *args): - self.rows.append([str(arg) for arg in args]) - - def add_section(self): - # Add separator in fallback mode - pass - - class Console: - def __init__(self, width=None, **kwargs): - self.width = width - - -def smart_format_content(content: Any, max_length: int = 200) -> str: - """ - Smart content formatting with size awareness and Rich markup support. - - Args: - content: Content to format (dict, list, str, etc.) - max_length: Maximum character length before truncation - - Returns: - Formatted string with optional Rich markup - """ - if content is None: - return "" - - if isinstance(content, str): - if len(content) <= max_length: - return content - else: - return f"{content[:max_length-3]}..." - - if isinstance(content, (dict, list)): - try: - json_str = json.dumps(content, indent=None, separators=(",", ":")) - if len(json_str) <= max_length: - return json_str - else: - # For large objects, show structure with key-value pairs - if isinstance(content, dict): - items = list(content.items())[:3] - item_preview = ", ".join(f'"{k}": "{v}"' for k, v in items) - more_indicator = ( - f" (+{len(content) - len(items)} more)" - if len(content) > len(items) - else "" - ) - full_preview = f"{{{item_preview}{more_indicator}}}" - # Truncate the entire string to fit the column width - if len(full_preview) <= max_length: - return full_preview - else: - return f"{full_preview[:max_length-3]}..." - else: # list - count = len(content) - item_preview = ( - str(content[0])[:50] + "..." - if content and len(str(content[0])) > 50 - else str(content[0]) - if content - else "" - ) - return ( - f"[{item_preview}] ({count} items)" - if count > 1 - else f"[{item_preview}]" - ) - except (TypeError, ValueError): - # Fallback for non-serializable objects - str_repr = str(content) - return ( - str_repr[: max_length - 3] + "..." - if len(str_repr) > max_length - else str_repr - ) - - # For other types - str_repr = str(content) - return ( - str_repr[: max_length - 3] + "..." if len(str_repr) > max_length else str_repr - ) - - -def format_number(value: float, max_precision: int = 3) -> str: - """ - Format numbers with intelligent precision and comma separators. - - Args: - value: The numeric value to format - max_precision: Maximum decimal places to show - - Returns: - Formatted number string - """ - if abs(value) >= 1000: - # Use comma separators for large numbers - return f"{value:,.{max_precision}f}".rstrip("0").rstrip(".") - elif abs(value) < 0.001 and value != 0: - # Use scientific notation for very small numbers - return f"{value:.{max_precision}e}" - else: - # Standard formatting with up to max_precision decimal places - formatted = f"{value:.{max_precision}f}".rstrip("0").rstrip(".") - return formatted if formatted else "0" - - -def format_evaluation_report_rich( - report_data: List[Dict[str, Any]], console_width: Optional[int] = None -) -> str: - """Format evaluation results using Rich tables with enhanced styling.""" - if not _HAS_RICH: - return _format_with_unicode_table(report_data, console_width) - - if not report_data: - return "No evaluation data available" - - # Create Rich table with responsive design - table = Table( - title="Evaluation Results", - box=box.ROUNDED, - show_header=True, - header_style="bold magenta", - width=console_width, - ) - - # Add columns with responsive widths - table.add_column("Testcases", style="cyan", width=10) - table.add_column("Inputs", style="green", width=40, overflow="fold") - table.add_column("Outputs", style="blue", width=40, overflow="fold") - table.add_column("Scores", style="yellow", width=40) - table.add_column("Assertions", style="red", width=10) - - # Collect totals for summary - total_scores = {} - total_assertions = [] - - for case_data in report_data: - case_id = case_data.get("case_id", "unknown") - inputs = case_data.get("inputs", {}) - outputs = case_data.get("application_outputs", {}) - - # Format inputs and outputs with Rich Text for better display - inputs_text = Text.from_markup(smart_format_content(inputs, 400)) - outputs_text = Text.from_markup(smart_format_content(outputs, 500)) - - # Format scores (numeric values). One score per line for readability. - scores_parts = [] - for key, value in case_data.get("evaluator_outputs", {}).items(): - - def _maybe_add(k: str, v: Any): - if isinstance(v, bool): - return - num: Optional[float] = None - if isinstance(v, (int, float)): - num = float(v) - elif isinstance(v, str): - try: - num = float(v) - except Exception: - num = None - if num is not None: - formatted_value = format_number(num) - scores_parts.append(f"{k}: {formatted_value}") - if k not in total_scores: - total_scores[k] = [] - total_scores[k].append(num) - - if isinstance(value, list): - for idx, v in enumerate(value): - _maybe_add(key, v) - else: - _maybe_add(key, value) - scores_text = Text("\n".join(scores_parts)) - - # Format assertions (boolean values) - show each evaluator's result - assertions_parts = [] - for key, value in case_data.get("evaluator_outputs", {}).items(): - if isinstance(value, bool): - symbol = "[green]✔[/green]" if value else "[red]✗[/red]" - assertions_parts.append(symbol) - total_assertions.append(value) - elif isinstance(value, list) and all(isinstance(v, bool) for v in value): - # Handle multiple evaluators with same key name - for v in value: - symbol = "[green]✔[/green]" if v else "[red]✗[/red]" - assertions_parts.append(symbol) - total_assertions.append(v) - # Join with spaces to show multiple assertions clearly - assertions_text = Text.from_markup( - " ".join(assertions_parts) if assertions_parts else "" - ) - - table.add_row(case_id, inputs_text, outputs_text, scores_text, assertions_text) - # Add a separator after each data row for readability - table.add_section() - - # Add a separator line before averages - table.add_section() - - # Add averages row - avg_scores_parts = [] - for key, values in total_scores.items(): - avg = sum(values) / len(values) if values else 0 - avg_scores_parts.append(f"{key}: {format_number(avg)}") - - assertion_pct = ( - (sum(total_assertions) / len(total_assertions) * 100) if total_assertions else 0 - ) - assertion_summary = f"{assertion_pct:.1f}%" - - table.add_row( - "[bold italic]Averages[/bold italic]", - "", - "", - Text("\n".join(avg_scores_parts)), - Text(assertion_summary), - ) - - # Render the table - console = Console(width=console_width) - from io import StringIO - - string_buffer = StringIO() - console.file = string_buffer - console.print(table) - return string_buffer.getvalue() - - -def _format_with_unicode_table( - report_data: List[Dict[str, Any]], console_width: Optional[int] -) -> str: - """Fallback Unicode table formatting (enhanced version)""" - if not report_data: - return "No evaluation data available" - - # Enhanced table formatting helpers - def make_border(widths, left="┏", mid="┳", right="┓", fill="━"): - return left + mid.join(fill * w for w in widths) + right - - def make_separator(widths, left="├", mid="┼", right="┤", fill="─"): - return left + mid.join(fill * w for w in widths) + right - - def make_row(values, widths, left="┃", mid="┃", right="┃"): - formatted = [] - for val, width in zip(values, widths): - # Handle multi-line content better - val_str = str(val) - if "\n" in val_str: - # Take first line for table display - val_str = val_str.split("\n")[0] - formatted.append(f" {val_str:<{width-2}} ") - return left + mid.join(formatted) + right - - # Responsive column widths - if console_width and console_width < 120: - col_widths = [12, 20, 30, 20, 10] # Compact - else: - col_widths = [15, 30, 40, 25, 12] # Full width - - # Build enhanced table - lines = [] - - # Header with styling - lines.append(make_border(col_widths)) - lines.append( - make_row( - ["Testcase ID", "Inputs", "Outputs", "Scores", "Assertions"], col_widths - ) - ) - lines.append(make_border(col_widths, "┡", "╇", "┩", "━")) - - # Data rows with improved formatting - total_scores = {} - total_assertions = [] - - for case_data in report_data: - case_id = case_data.get("case_id", "unknown") - - # Smart content formatting - inputs = case_data.get("inputs", {}) - outputs = case_data.get("application_outputs", {}) - - inputs_str = smart_format_content(inputs, col_widths[1] - 4) - outputs_str = smart_format_content(outputs, col_widths[2] - 4) - - # Format scores with proper number formatting, one per line - scores_parts = [] - for key, value in case_data.get("evaluator_outputs", {}).items(): - if isinstance(value, (int, float)) and not isinstance(value, bool): - formatted_value = format_number(value) - scores_parts.append(f"{key}: {formatted_value}") - if key not in total_scores: - total_scores[key] = [] - total_scores[key].append(value) - # Preserve line breaks for better readability in plain table - scores_str = "\n".join(scores_parts) - - # Format assertions with colored symbols (fallback) - show each evaluator's result - assertions_parts = [] - for key, value in case_data.get("evaluator_outputs", {}).items(): - if isinstance(value, bool): - assertions_parts.append("✔" if value else "✗") - total_assertions.append(value) - elif isinstance(value, list) and all(isinstance(v, bool) for v in value): - # Handle multiple evaluators with same key name - for v in value: - assertions_parts.append("✔" if v else "✗") - total_assertions.append(v) - # Join with spaces to show multiple assertions clearly - assertions_str = " ".join(assertions_parts) if assertions_parts else "" - - lines.append( - make_row( - [case_id, inputs_str, outputs_str, scores_str, assertions_str], - col_widths, - ) - ) - lines.append(make_separator(col_widths)) - - # Enhanced summary row - avg_scores_parts = [] - for key, values in total_scores.items(): - avg = sum(values) / len(values) if values else 0 - avg_scores_parts.append(f"{key}: {format_number(avg)}") - avg_scores_str = smart_format_content( - ", ".join(avg_scores_parts), col_widths[3] - 4 - ) - - assertion_pct = ( - (sum(total_assertions) / len(total_assertions) * 100) if total_assertions else 0 - ) - assertion_summary = f"{assertion_pct:.1f}%" - - # Add separator line before averages for clarity - lines.append(make_border(col_widths, "┠", "╂", "┨", "━")) - lines.append( - make_row(["Averages", "", "", avg_scores_str, assertion_summary], col_widths) - ) - lines.append(make_border(col_widths, "└", "┴", "┘", "─")) - - return "\n".join(lines) - - -# Main function that chooses the best available formatting -def format_evaluation_report( - report_data: List[Dict[str, Any]], console_width: Optional[int] = None -) -> str: - """Format evaluation results with best available method""" - return format_evaluation_report_rich(report_data, console_width) - - -async def display_evaluation_results( - eval_data, show_detailed_logs=True, console_width=None -): - """Enhanced display evaluation results with Rich-like formatting and progress tracking""" - # Give traces a moment to be stored - print() - print("⏳ Waiting for traces to be available...") - await asyncio.sleep(2) - - print() - print("📊 Processing evaluation results...") - print(f" run_id={eval_data['run'].id}") # type:ignore - - # Collect data for the report table with progress tracking - report_data = [] - scenarios_to_process = eval_data["scenarios"] - - # Use Rich progress bar if available, otherwise simple iteration - if RICH_AVAILABLE: - scenario_iterator = track( - scenarios_to_process, description="📋 Processing scenarios" - ) - else: - scenario_iterator = scenarios_to_process - print(f"📋 Processing {len(scenarios_to_process)} scenarios...") - - for i, scenario in enumerate(scenario_iterator): - if not RICH_AVAILABLE and show_detailed_logs: - print( - f" 📄 scenario {i+1}/{len(scenarios_to_process)}: {scenario['scenario'].id}" - ) # type:ignore - elif show_detailed_logs: - print(f" scenario_id={scenario['scenario'].id}") # type:ignore - - case_data = EvaluationTestcaseData().__dict__ - - for step_key, result in scenario["results"].items(): # type:ignore - if result.testcase_id: - if show_detailed_logs: - print( - f" step_key={str(step_key).ljust(32)}, testcase_id={result.testcase_id}" - ) - # Use a more readable case ID - testcase_short = str(result.testcase_id)[:8] - case_data["case_id"] = f"{testcase_short}..." - - elif result.trace_id: - if show_detailed_logs: - print( - f" step_key={str(step_key).ljust(32)}, trace_id={result.trace_id}" - ) - - # Fetch and process trace data using services module - try: - trace_data = await fetch_trace_data(result.trace_id) - if trace_data and "spans" in trace_data: - for span_key in trace_data["spans"].keys(): - step_data = extract_trace_step_data(trace_data, span_key) - if step_data: - inputs = step_data["inputs"] - outputs = step_data["outputs"] - trace_type = step_data["trace_type"] - trace_evaluator_name = step_data.get("evaluator_name") - - # Store inputs for report - if inputs: - case_data["inputs"] = clean_inputs_for_display( - **(inputs if isinstance(inputs, dict) else {}) - ) - if show_detailed_logs: - print( - f" inputs={inputs}" - ) - - # Determine if this is application or evaluator - if outputs: - # Heuristic to classify outputs: - # 1. If outputs is a single string value, it's likely the application output - # 2. If outputs is a dict with keys like 'score', 'myscore', 'success', it's evaluator output - # 3. If we already have application_outputs, everything else is evaluator output - - is_application_output = False - if not case_data.get("application_outputs"): - # Check if this looks like a simple application output (single string) - if isinstance(outputs, str): - is_application_output = True - elif ( - isinstance(outputs, dict) - and len(outputs) == 0 - ): - # Empty dict, skip - is_application_output = False - elif isinstance(outputs, dict): - # If it's a dict with typical evaluator keys, it's an evaluator - evaluator_keys = { - "score", - "myscore", - "success", - "failure", - "passed", - "failed", - } - if any( - key in evaluator_keys - for key in outputs.keys() - ): - is_application_output = False - else: - # Otherwise, it might be application output - is_application_output = True - - if is_application_output: - case_data["application_outputs"] = outputs - else: - # This is an evaluator output - # Use the evaluator name from trace data, or fall back to step_key hash - evaluator_name = trace_evaluator_name or ( - step_key[:8] if step_key else None - ) - process_evaluator_outputs( - case_data, - outputs, - evaluator_name=evaluator_name, - ) - - if show_detailed_logs: - print( - f" outputs={outputs}" - ) - else: - if show_detailed_logs: - print( - f" ⚠️ no_trace_data" - ) - except Exception as e: - if show_detailed_logs: - print( - f" ❌ trace_fetch_error: {e}" - ) - else: - if show_detailed_logs: - print( - f" step_key={str(step_key).ljust(32)}, ❌ error={result.error}" - ) - - if case_data["case_id"]: - report_data.append(case_data) - - # if show_detailed_logs: - # print( - # f"📈 metrics={json.dumps(eval_data['metrics'].data, indent=4)}" - # ) # type:ignore - - # Display the enhanced formatted report table - print() - print("📋 Evaluation Report:") - print(format_evaluation_report(report_data, console_width)) - - # Add summary statistics - if report_data: - print() - print(f"✅ Successfully processed {len(report_data)} testcases") - - # Count total evaluators - all_evaluator_keys = set() - for case in report_data: - all_evaluator_keys.update(case.get("evaluator_outputs", {}).keys()) - - if all_evaluator_keys: - print( - f"🔍 Evaluated with {len(all_evaluator_keys)} metrics: {', '.join(sorted(all_evaluator_keys))}" - ) - else: - print("⚠️ No evaluation data found") - - -from typing import Callable, Dict, Optional, Any - -from agenta.sdk.utils.client import authed_api -import asyncio -import json -from typing import Dict, Any, Optional - - -async def fetch_trace_data( - trace_id: str, max_retries: int = 3, delay: float = 1.0 -) -> Optional[Dict[str, Any]]: - """ - Fetch trace data from the API with retry logic. - - Args: - trace_id: The trace ID to fetch - max_retries: Maximum number of retry attempts - delay: Delay between retries in seconds - - Returns: - Trace data dictionary or None if not found - """ - for attempt in range(max_retries): - try: - response = authed_api()( - method="GET", endpoint=f"/preview/tracing/traces/{trace_id}" - ) - response.raise_for_status() - trace_data = response.json() - - # print(trace_data) - - # Get the traces dictionary - traces = trace_data.get("traces", {}) - if traces: - # Get the first (and usually only) trace - for trace_key, trace_content in traces.items(): - if ( - trace_content - and "spans" in trace_content - and trace_content["spans"] - ): - return trace_content - - # If no data yet, retry on next iteration - if attempt < max_retries - 1: - await asyncio.sleep(delay) - - except Exception as e: - if attempt < max_retries - 1: - await asyncio.sleep(delay) - continue - else: - print(f"Error fetching trace data: {e}") - return None - - print("Failed to fetch trace data after retries") - return None - - -def extract_trace_step_data( - trace_data: Dict[str, Any], step_key: str -) -> Optional[Dict[str, Any]]: - """ - Extract step data from trace information. - - Args: - trace_data: The complete trace data - step_key: The step key to extract data for - - Returns: - Step data dictionary or None if not found - """ - if not trace_data: - return None - - spans = trace_data.get("spans", {}) - if not spans or step_key not in spans: - return None - - span_info = spans[step_key] - # Extract the actual evaluation data using the correct data structure - ag_data = span_info.get("attributes", {}).get("ag", {}).get("data", {}) - - if not ag_data: - return None - - # Try to extract evaluator/application name from span - # The span_name field contains the workflow/evaluator name - evaluator_name = span_info.get("span_name") or span_info.get("name") - - return { - "inputs": ag_data.get("inputs", {}), - "outputs": ag_data.get("outputs", {}), - "trace_type": span_info.get("trace_type"), - "evaluator_name": evaluator_name, - "span_info": span_info, - } - - -def process_evaluator_outputs( - case_data: Dict[str, Any], - outputs: Dict[str, Any], - evaluator_name: Optional[str] = None, -) -> None: - """ - Process evaluator outputs and handle multiple evaluators with same key names. - - Args: - case_data: The case data to update - outputs: The evaluator outputs to process - evaluator_name: Optional evaluator identifier for labeling - """ - # Handle multiple evaluators with same key names (like 'success', 'score') - for key, value in outputs.items(): - # Label numeric scores by evaluator to distinguish between multiple evaluators - display_key = key - - # If we have an evaluator name and this is a numeric value, prefix it - if ( - evaluator_name - and isinstance(value, (int, float)) - and not isinstance(value, bool) - ): - display_key = f"{evaluator_name}.{key}" - - # Store the value - if the key already exists, convert to list to preserve all values - if display_key in case_data["evaluator_outputs"]: - # Create lists for duplicate keys to preserve all values - existing = case_data["evaluator_outputs"][display_key] - if not isinstance(existing, list): - case_data["evaluator_outputs"][display_key] = [existing] - case_data["evaluator_outputs"][display_key].append(value) - else: - case_data["evaluator_outputs"][display_key] = value - - -def clean_inputs_for_display(**kwargs) -> Dict[str, Any]: - """ - Clean inputs by removing internal IDs and trace data for cleaner display. - - Args: - inputs: Raw inputs dictionary - - Returns: - Cleaned inputs dictionary with only user-facing testcase fields - """ - inputs = kwargs.get("inputs") - if inputs: - # List of keys to exclude from display - # - Internal IDs (ending with _id) - # - Testcase internal fields (starting with testcase_) - # - Trace data (the 'trace' key which contains the full trace structure) - excluded_keys = { - "revision", - "parameters", - "testcase", - # "inputs", - "trace", - "outputs", - } - - clean_inputs = { - k: v - for k, v in inputs.items() - if not k.endswith("_id") - and not k.startswith("testcase_") - and k not in excluded_keys - } - return clean_inputs or inputs - return inputs diff --git a/sdk/agenta/sdk/evaluations/results.py b/sdk/agenta/sdk/evaluations/results.py deleted file mode 100644 index 56ab1b99cb..0000000000 --- a/sdk/agenta/sdk/evaluations/results.py +++ /dev/null @@ -1,66 +0,0 @@ -from typing import Optional, Dict, Any -from uuid import UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.models.evaluations import EvaluationResult - -# TODO: ADD TYPES - - -async def acreate( - *, - run_id: UUID, - scenario_id: UUID, - step_key: str, - # repeat_idx: str, - # timestamp: datetime, - # interval: float, - # - testcase_id: Optional[UUID] = None, - trace_id: Optional[str] = None, - error: Optional[dict] = None, - # - flags: Optional[Dict[str, Any]] = None, - tags: Optional[Dict[str, Any]] = None, - meta: Optional[Dict[str, Any]] = None, -) -> EvaluationResult: - payload = dict( - results=[ - dict( - flags=flags, - tags=tags, - meta=meta, - # - testcase_id=str(testcase_id) if testcase_id else None, - trace_id=trace_id, - error=error, - # - # interval=interval, - # timestamp=timestamp, - # repeat_idx=repeat_idx, - step_key=step_key, - run_id=str(run_id), - scenario_id=str(scenario_id), - # - status="success", - ) - ] - ) - - response = authed_api()( - method="POST", - endpoint=f"/preview/evaluations/results/", - json=payload, - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - result = EvaluationResult(**response["results"][0]) - - return result diff --git a/sdk/agenta/sdk/evaluations/runs.py b/sdk/agenta/sdk/evaluations/runs.py deleted file mode 100644 index c4a12a40f1..0000000000 --- a/sdk/agenta/sdk/evaluations/runs.py +++ /dev/null @@ -1,153 +0,0 @@ -from typing import Optional, Dict, Any -from uuid import UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.models.evaluations import EvaluationRun, Target - -import agenta as ag - -# TODO: ADD TYPES - - -async def afetch( - *, - run_id: UUID, -) -> Optional[EvaluationRun]: - response = authed_api()( - method="GET", - endpoint=f"/preview/evaluations/runs/{run_id}", - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - if (not "count" in response) or (response["count"] == 0) or (not "run" in response): - return None - - run = EvaluationRun(**response["run"]) - - return run - - -async def acreate( - *, - name: Optional[str] = None, - description: Optional[str] = None, - # - flags: Optional[Dict[str, Any]] = None, - tags: Optional[Dict[str, Any]] = None, - meta: Optional[Dict[str, Any]] = None, - # - query_steps: Optional[Target] = None, - testset_steps: Optional[Target] = None, - application_steps: Optional[Target] = None, - evaluator_steps: Optional[Target] = None, - # - repeats: Optional[int] = None, -) -> Optional[EvaluationRun]: - payload = dict( - evaluation=dict( - name=name, - description=description, - # - flags=flags, - tags=tags, - meta=meta, - # - data=dict( - status="running", - query_steps=query_steps, - testset_steps=testset_steps, - application_steps=application_steps, - evaluator_steps=evaluator_steps, - repeats=repeats, - ), - # - jit={"testsets": True, "evaluators": False}, - ) - ) - - response = authed_api()( - method="POST", - endpoint=f"/preview/simple/evaluations/", - json=payload, - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - if (not "evaluation" in response) or (not "id" in response["evaluation"]): - return None - - run_id = UUID(response["evaluation"]["id"]) - - return await afetch(run_id=run_id) - - -async def aclose( - *, - run_id: UUID, - # - status: Optional[str] = "success", -) -> Optional[EvaluationRun]: - response = authed_api()( - method="POST", - endpoint=f"/preview/evaluations/runs/{run_id}/close/{status}", - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - if (not "run" in response) or (not "id" in response["run"]): - return None - - run_id = UUID(response["run"]["id"]) - - return await afetch(run_id=run_id) - - -async def aurl( - *, - run_id: UUID, -) -> str: - response = authed_api()( - method="GET", - endpoint=f"/projects", - params={"scope": "project"}, - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - if len(response.json()) != 1: - return None - - project_info = response.json()[0] - - workspace_id = project_info.get("workspace_id") - project_id = project_info.get("project_id") - - return ( - f"{ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.host}" - f"/w/{workspace_id}" - f"/p/{project_id}" - f"/evaluations/results/{run_id}" - ) diff --git a/sdk/agenta/sdk/evaluations/scenarios.py b/sdk/agenta/sdk/evaluations/scenarios.py deleted file mode 100644 index 98c9c47e1f..0000000000 --- a/sdk/agenta/sdk/evaluations/scenarios.py +++ /dev/null @@ -1,48 +0,0 @@ -from typing import Optional, Dict, Any -from uuid import UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.models.evaluations import EvaluationScenario - -# TODO: ADD TYPES - - -async def acreate( - *, - run_id: UUID, - # - flags: Optional[Dict[str, Any]] = None, - tags: Optional[Dict[str, Any]] = None, - meta: Optional[Dict[str, Any]] = None, -) -> EvaluationScenario: - payload = dict( - scenarios=[ - dict( - flags=flags, - tags=tags, - meta=meta, - # - run_id=str(run_id), - # - status="success", - ) - ] - ) - - response = authed_api()( - method="POST", - endpoint=f"/preview/evaluations/scenarios/", - json=payload, - ) - - try: - response.raise_for_status() - except: - print(response.text) - raise - - response = response.json() - - scenario = EvaluationScenario(**response["scenarios"][0]) - - return scenario diff --git a/sdk/agenta/sdk/litellm/mockllm.py b/sdk/agenta/sdk/litellm/mockllm.py index 01b9fecff2..7b47903306 100644 --- a/sdk/agenta/sdk/litellm/mockllm.py +++ b/sdk/agenta/sdk/litellm/mockllm.py @@ -1,81 +1,28 @@ from typing import Optional, Protocol, Any from os import environ -from contextlib import contextmanager - -import litellm from agenta.sdk.utils.logging import get_module_logger from agenta.sdk.litellm.mocks import MOCKS -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context AGENTA_LITELLM_MOCK = environ.get("AGENTA_LITELLM_MOCK") or None log = get_module_logger(__name__) -ENV_KEYS_TO_CLEAR = [ - # anything that could inject Lambda/ECS role creds - "AWS_SESSION_TOKEN", - "AWS_SECURITY_TOKEN", - "AWS_WEB_IDENTITY_TOKEN_FILE", - "AWS_ROLE_ARN", - "AWS_CONTAINER_CREDENTIALS_FULL_URI", - "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", - "AWS_ECS_CONTAINER_AUTHORIZATION_TOKEN", - "AWS_PROFILE", - "AWS_SHARED_CREDENTIALS_FILE", - "AWS_CONFIG_FILE", -] - -ENV_KEYS_FROM_USER = [ - "AWS_ACCESS_KEY_ID", - "AWS_SECRET_ACCESS_KEY", - "AWS_SESSION_TOKEN", - "AWS_REGION", - "AWS_DEFAULT_REGION", -] - - -@contextmanager -def user_aws_credentials_from(ps: dict): - old = {} - try: - # Save original state of ALL keys we'll modify - for k in ENV_KEYS_TO_CLEAR + ENV_KEYS_FROM_USER: - if k in environ: - old[k] = environ[k] - - # Clear AWS role credentials - for k in ENV_KEYS_TO_CLEAR: - environ.pop(k, None) - - # Set user credentials - for k in ENV_KEYS_FROM_USER: - if ps.get(k.upper()) is None: - environ.pop(k, None) - else: - environ[k] = ps[k.upper()] - yield - finally: - # Restore all environment variables to original state - for k in ENV_KEYS_TO_CLEAR + ENV_KEYS_FROM_USER: - if k in old: - environ[k] = old[k] - else: - environ.pop(k, None) +class LitellmProtocol(Protocol): + async def acompletion(self, *args: Any, **kwargs: Any) -> Any: ... -class LitellmProtocol(Protocol): - async def acompletion(self, *args: Any, **kwargs: Any) -> Any: - ... +litellm: Optional[LitellmProtocol] = None # pylint: disable=invalid-name async def acompletion(*args, **kwargs): - mock = AGENTA_LITELLM_MOCK or RoutingContext.get().mock + mock = AGENTA_LITELLM_MOCK or routing_context.get().mock if mock: - # log.debug("Mocking litellm: %s.", mock) + log.debug("Mocking litellm: %s.", mock) if mock not in MOCKS: mock = "hello" diff --git a/sdk/agenta/sdk/litellm/mocks/__init__.py b/sdk/agenta/sdk/litellm/mocks/__init__.py index 59f3947c8b..41d9b56876 100644 --- a/sdk/agenta/sdk/litellm/mocks/__init__.py +++ b/sdk/agenta/sdk/litellm/mocks/__init__.py @@ -3,8 +3,6 @@ from pydantic import BaseModel -from agenta.sdk.decorators.tracing import instrument - class MockMessageModel(BaseModel): content: str @@ -18,7 +16,6 @@ class MockResponseModel(BaseModel): choices: list[MockChoiceModel] -@instrument() def hello_mock_response(*args, **kwargs) -> MockResponseModel: return MockResponseModel( choices=[ @@ -31,7 +28,6 @@ def hello_mock_response(*args, **kwargs) -> MockResponseModel: ) -@instrument() def chat_mock_response(*args, **kwargs) -> MockResponseModel: return MockResponseModel( choices=[ @@ -45,7 +41,6 @@ def chat_mock_response(*args, **kwargs) -> MockResponseModel: ) -@instrument() def delay_mock_response(*args, **kwargs) -> MockResponseModel: sleep(2) @@ -60,147 +55,8 @@ def delay_mock_response(*args, **kwargs) -> MockResponseModel: ) -@instrument() -def capital_mock_response(*args, **kwargs) -> MockResponseModel: - country = kwargs.get("messages", [{}, {}])[1].get( - "content", "What is the capital of _____?" - )[len("What is the capital of ") :][:-1] - - capital = CAPITALS.get(country, "Unknown") - return MockResponseModel( - choices=[ - MockChoiceModel( - message=MockMessageModel( - content=f"The capital of {country} is {capital}.", - ) - ) - ], - ) - - MOCKS: dict[str, Callable[..., MockResponseModel]] = { "hello": hello_mock_response, "chat": chat_mock_response, "delay": delay_mock_response, - "capital": capital_mock_response, -} - -CAPITALS = { - "Afghanistan": "Kabul", - "Albania": "Tirana", - "Algeria": "Algiers", - "Andorra": "Andorra la Vella", - "Angola": "Luanda", - "Antigua and Barbuda": "St. John's", - "Argentina": "Buenos Aires", - "Armenia": "Yerevan", - "Australia": "Canberra", - "Austria": "Vienna", - "Azerbaijan": "Baku", - "Bahamas": "Nassau", - "Bahrain": "Manama", - "Bangladesh": "Dhaka", - "Barbados": "Bridgetown", - "Belarus": "Minsk", - "Belgium": "Brussels", - "Belize": "Belmopan", - "Benin": "Porto-Novo", - "Bhutan": "Thimphu", - "Bolivia": "Sucre", - "Bosnia and Herzegovina": "Sarajevo", - "Botswana": "Gaborone", - "Brazil": "Bras\u00edlia", - "Brunei": "Bandar Seri Begawan", - "Bulgaria": "Sofia", - "Burkina Faso": "Ouagadougou", - "Burundi": "Gitega", - "Cabo Verde": "Praia", - "Cambodia": "Phnom Penh", - "Cameroon": "Yaound\u00e9", - "Canada": "Ottawa", - "Central African Republic": "Bangui", - "Chad": "N'Djamena", - "Chile": "Santiago", - "China": "Beijing", - "Colombia": "Bogot\u00e1", - "Comoros": "Moroni", - "Congo (Brazzaville)": "Brazzaville", - "Congo (Kinshasa)": "Kinshasa", - "Costa Rica": "San Jos\u00e9", - "Croatia": "Zagreb", - "Cuba": "Havana", - "Cyprus": "Nicosia", - "Czech Republic": "Prague", - "Denmark": "Copenhagen", - "Djibouti": "Djibouti", - "Dominica": "Roseau", - "Dominican Republic": "Santo Domingo", - "East Timor": "Dili", - "Ecuador": "Quito", - "Egypt": "Cairo", - "El Salvador": "San Salvador", - "Equatorial Guinea": "Malabo", - "Eritrea": "Asmara", - "Estonia": "Tallinn", - "Eswatini": "Mbabane", - "Ethiopia": "Addis Ababa", - "Fiji": "Suva", - "Finland": "Helsinki", - "France": "Paris", - "Gabon": "Libreville", - "Gambia": "Banjul", - "Georgia": "Tbilisi", - "Germany": "Berlin", - "Ghana": "Accra", - "Greece": "Athens", - "Grenada": "St. George's", - "Guatemala": "Guatemala City", - "Guinea": "Conakry", - "Guinea-Bissau": "Bissau", - "Guyana": "Georgetown", - "Haiti": "Port-au-Prince", - "Honduras": "Tegucigalpa", - "Hungary": "Budapest", - "Iceland": "Reykjavik", - "India": "New Delhi", - "Indonesia": "Jakarta", - "Iran": "Tehran", - "Iraq": "Baghdad", - "Ireland": "Dublin", - "Israel": "Jerusalem", - "Italy": "Rome", - "Ivory Coast": "Yamoussoukro", - "Jamaica": "Kingston", - "Japan": "Tokyo", - "Jordan": "Amman", - "Kazakhstan": "Astana", - "Kenya": "Nairobi", - "Kiribati": "South Tarawa", - "North Korea": "Pyongyang", - "South Korea": "Seoul", - "Kosovo": "Pristina", - "Kuwait": "Kuwait City", - "Kyrgyzstan": "Bishkek", - "Laos": "Vientiane", - "Latvia": "Riga", - "Lebanon": "Beirut", - "Lesotho": "Maseru", - "Liberia": "Monrovia", - "Libya": "Tripoli", - "Liechtenstein": "Vaduz", - "Lithuania": "Vilnius", - "Luxembourg": "Luxembourg", - "Madagascar": "Antananarivo", - "Malawi": "Lilongwe", - "Malaysia": "Kuala Lumpur", - "Maldives": "Mal\u00e9", - "Mali": "Bamako", - "Malta": "Valletta", - "Marshall Islands": "Majuro", - "Mauritania": "Nouakchott", - "Mauritius": "Port Louis", - "Mexico": "Mexico City", - "Micronesia": "Palikir", - "Moldova": "Chi\u0219in\u0103u", - "Monaco": "Monaco", } diff --git a/sdk/agenta/sdk/managers/applications.py b/sdk/agenta/sdk/managers/applications.py deleted file mode 100644 index a5600bc3d8..0000000000 --- a/sdk/agenta/sdk/managers/applications.py +++ /dev/null @@ -1,304 +0,0 @@ -from typing import Dict, Any, Callable, Optional -from uuid import uuid4, UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.decorators.running import auto_workflow, is_workflow -from agenta.sdk.models.workflows import ( - ApplicationRevision, - # - ApplicationRevisionResponse, - # - LegacyApplicationFlags, - LegacyApplicationData, - LegacyApplicationCreate, - LegacyApplicationEdit, - # - LegacyApplicationResponse, - # - Reference, -) - -from agenta.sdk.utils.references import get_slug_from_name_and_id - - -async def _retrieve_application( - application_id: Optional[UUID] = None, - application_slug: Optional[str] = None, - application_revision_id: Optional[UUID] = None, - application_revision_slug: Optional[str] = None, -) -> Optional[ApplicationRevision]: - payload = { - "application_ref": ( - { - "id": str(application_id) if application_id else None, - "slug": str(application_slug), - } - if application_id or application_slug - else None - ), - "application_revision_ref": ( - { - "id": ( - str(application_revision_id) if application_revision_id else None - ), - "slug": application_revision_slug, - } - if application_revision_id or application_revision_slug - else None - ), - } - - # print(" --- payload:", payload) - - response = authed_api()( - method="POST", - endpoint=f"/preview/legacy/applications/revisions/retrieve", - json=payload, - ) - response.raise_for_status() - - application_revision_response = ApplicationRevisionResponse(**response.json()) - - application_revision = application_revision_response.application_revision - - # print(" --- application_revision:", application_revision) - - return application_revision - - -async def aretrieve( - application_revision_id: Optional[UUID] = None, -) -> Optional[ApplicationRevision]: - # print("\n--------- RETRIEVE APPLICATION") - - response = await _retrieve_application( - application_revision_id=application_revision_id, - ) - - return response - - -async def aupsert( - *, - application_id: Optional[UUID] = None, - application_slug: Optional[str] = None, - application_revision_id: Optional[UUID] = None, - application_revision_slug: Optional[str] = None, - # - handler: Callable, - script: Optional[str] = None, - parameters: Optional[Dict[str, Any]] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, -) -> Optional[UUID]: - # print("\n--------- UPSERT APPLICATION") - try: - if not is_workflow(handler): - application_workflow = auto_workflow( - handler, - # - script=script, - parameters=parameters, - # - name=name, - description=description, - ) - else: - application_workflow = handler - - req = await application_workflow.inspect() - - legacy_application_flags = LegacyApplicationFlags(**req.flags) - - legacy_application_data = LegacyApplicationData( - **( - req.interface.model_dump(mode="json", exclude_none=True) - if req and req.interface - else {} - ), - **( - req.configuration.model_dump(mode="json", exclude_none=True) - if req and req.configuration - else {} - ), - ) - - # print( - # " ---:", legacy_application_data.model_dump(mode="json", exclude_none=True) - # ) - - retrieve_response = None - - if req.references is not None: - _application_revision_ref = req.references.get("application_revision", {}) - if isinstance(_application_revision_ref, Reference): - _application_revision_ref = _application_revision_ref.model_dump( - mode="json", - exclude_none=True, - ) - if not isinstance(_application_revision_ref, dict): - _application_revision_ref = {} - _application_revision_id = _application_revision_ref.get("id") - _application_revision_slug = _application_revision_ref.get("slug") - - application_revision_id = ( - application_revision_id or _application_revision_id - ) - application_revision_slug = ( - application_revision_slug or _application_revision_slug - ) - - _application_ref = req.references.get("application", {}) - if isinstance(_application_ref, Reference): - _application_ref = _application_ref.model_dump( - mode="json", - exclude_none=True, - ) - if not isinstance(_application_ref, dict): - _application_ref = {} - _application_id = _application_ref.get("id") - _application_slug = _application_ref.get("slug") - - application_id = application_id or _application_id - application_slug = application_slug or _application_slug - - revision = req.data.revision if req and req.data else None - if revision: - name = name or revision.get("name") - description = description or revision.get("description") - - name = ( - name or req.data.revision.get("name") - if req and req.data and req.data.revision - else None - ) - - description = ( - description or req.data.revision.get("description") - if req and req.data and req.data.revision - else None - ) - - application_slug = ( - application_slug - or get_slug_from_name_and_id( - name=name, - id=application_id or uuid4(), - ) - if name - else uuid4().hex[-12:] - ) - - # print( - # application_id, - # application_slug, - # application_revision_id, - # application_revision_slug, - # ) - - if application_revision_id or application_revision_slug: - retrieve_response = await _retrieve_application( - application_revision_id=application_revision_id, - application_revision_slug=application_revision_slug, - ) - elif application_id or application_slug: - retrieve_response = await _retrieve_application( - application_id=application_id, - application_slug=application_slug, - ) - - except Exception as e: - print("[ERROR]: Failed to prepare application:", e) - return None - - # print("Retrieve response:", retrieve_response) - - if retrieve_response and retrieve_response.id and retrieve_response.application_id: - application_id = retrieve_response.application_id - # print(" --- Updating application...", application_id) - application_edit_request = LegacyApplicationEdit( - id=application_id, - # - name=name, - description=description, - # - flags=legacy_application_flags, - # - data=legacy_application_data, - ) - - # print(" --- application_edit_request:", application_edit_request) - - response = authed_api()( - method="PUT", - endpoint=f"/preview/legacy/applications/{application_id}", - json={ - "application": application_edit_request.model_dump( - mode="json", - exclude_none=True, - ) - }, - ) - - # print(" --- response:", response.status_code, response.text) - - try: - response.raise_for_status() - except Exception as e: - print("[ERROR]: Failed to update application:", e) - return None - - else: - # print(" --- Creating application...") - application_create_request = LegacyApplicationCreate( - slug=application_slug or uuid4().hex[-12:], - # - name=name, - description=description, - # - flags=legacy_application_flags, - # - data=legacy_application_data, - ) - - # print(" --- application_create_request:", application_create_request) - - response = authed_api()( - method="POST", - endpoint="/preview/legacy/applications/", - json={ - "application": application_create_request.model_dump( - mode="json", - exclude_none=True, - ) - }, - ) - - # print(" --- response:", response.status_code, response.text) - - try: - response.raise_for_status() - except Exception as e: - print("[ERROR]: Failed to create application:", e) - return None - - application_response = LegacyApplicationResponse(**response.json()) - - application = application_response.application - - if not application or not application.id: - return None - - # print(" --- application:", application) - - application_revision = await _retrieve_application( - application_id=application.id, - ) - - if not application_revision or not application_revision.id: - return None - - # print(application_revision, "----------") - - return application_revision.id diff --git a/sdk/agenta/sdk/managers/config.py b/sdk/agenta/sdk/managers/config.py index 7e2513a74b..631d4c547a 100644 --- a/sdk/agenta/sdk/managers/config.py +++ b/sdk/agenta/sdk/managers/config.py @@ -7,7 +7,7 @@ from agenta.sdk.utils.logging import get_module_logger from agenta.sdk.managers.shared import SharedManager -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context T = TypeVar("T", bound=BaseModel) @@ -45,7 +45,7 @@ def get_from_route( Only one of these should be provided. """ - context = RoutingContext.get() + context = routing_context.get() parameters = context.parameters diff --git a/sdk/agenta/sdk/managers/evaluations.py b/sdk/agenta/sdk/managers/evaluations.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/managers/evaluators.py b/sdk/agenta/sdk/managers/evaluators.py deleted file mode 100644 index c948e23da4..0000000000 --- a/sdk/agenta/sdk/managers/evaluators.py +++ /dev/null @@ -1,303 +0,0 @@ -from typing import Dict, Any, Callable, Optional -from uuid import uuid4, UUID -from traceback import print_exc - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.decorators.running import auto_workflow, is_workflow -from agenta.sdk.models.workflows import ( - EvaluatorRevision, - # - EvaluatorRevisionResponse, - # - SimpleEvaluatorFlags, - SimpleEvaluatorData, - SimpleEvaluatorCreate, - SimpleEvaluatorEdit, - # - SimpleEvaluatorResponse, - # - Reference, -) - -from agenta.sdk.utils.references import get_slug_from_name_and_id - - -async def _retrieve_evaluator( - evaluator_id: Optional[UUID] = None, - evaluator_slug: Optional[str] = None, - evaluator_revision_id: Optional[UUID] = None, - evaluator_revision_slug: Optional[str] = None, -) -> Optional[EvaluatorRevision]: - payload = { - "evaluator_ref": ( - { - "id": str(evaluator_id) if evaluator_id else None, - "slug": str(evaluator_slug), - } - if evaluator_id or evaluator_slug - else None - ), - "evaluator_revision_ref": ( - { - "id": str(evaluator_revision_id) if evaluator_revision_id else None, - "slug": evaluator_revision_slug, - } - if evaluator_revision_id or evaluator_revision_slug - else None - ), - } - - # print(" --- payload:", payload) - - response = authed_api()( - method="POST", - endpoint=f"/preview/evaluators/revisions/retrieve", - json=payload, - ) - - response.raise_for_status() - - evaluator_revision_response = EvaluatorRevisionResponse(**response.json()) - - evaluator_revision = evaluator_revision_response.evaluator_revision - - # print(" --- evaluator_revision:", evaluator_revision) - - return evaluator_revision - - -async def aretrieve( - evaluator_revision_id: Optional[UUID] = None, -) -> Optional[EvaluatorRevision]: - # print("\n--------- RETRIEVE EVALUATOR") - response = await _retrieve_evaluator( - evaluator_revision_id=evaluator_revision_id, - ) - - return response - - -async def aupsert( - *, - evaluator_id: Optional[UUID] = None, - evaluator_slug: Optional[str] = None, - evaluator_revision_id: Optional[UUID] = None, - evaluator_revision_slug: Optional[str] = None, - # - handler: Callable, - script: Optional[str] = None, - parameters: Optional[Dict[str, Any]] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, -) -> Optional[UUID]: - # print("\n--------- UPSERT EVALUATOR") - try: - if not is_workflow(handler): - evaluator_workflow = auto_workflow( - handler, - # - script=script, - parameters=parameters, - # - name=name, - description=description, - ) - else: - evaluator_workflow = handler - - req = await evaluator_workflow.inspect() - - legacy_application_flags = SimpleEvaluatorFlags(**req.flags) - - simple_evaluator_data = SimpleEvaluatorData( - **( - req.interface.model_dump(mode="json", exclude_none=True) - if req and req.interface - else {} - ), - **( - req.configuration.model_dump(mode="json", exclude_none=True) - if req and req.configuration - else {} - ), - ) - # print(" ---:", simple_evaluator_data.model_dump(mode="json", exclude_none=True)) - - retrieve_response = None - - if req.references is not None: - _evaluator_revision_ref = req.references.get("evaluator_revision", {}) - if isinstance(_evaluator_revision_ref, Reference): - _evaluator_revision_ref = _evaluator_revision_ref.model_dump( - mode="json", - exclude_none=True, - ) - if not isinstance(_evaluator_revision_ref, dict): - _evaluator_revision_ref = {} - - _evaluator_revision_id = _evaluator_revision_ref.get("id") - _evaluator_revision_slug = _evaluator_revision_ref.get("slug") - - evaluator_revision_id = evaluator_revision_id or _evaluator_revision_id - evaluator_revision_slug = ( - evaluator_revision_slug or _evaluator_revision_slug - ) - - _evaluator_ref = req.references.get("evaluator", {}) - if isinstance(_evaluator_ref, Reference): - _evaluator_ref = _evaluator_ref.model_dump( - mode="json", - exclude_none=True, - ) - if not isinstance(_evaluator_ref, dict): - _evaluator_ref = {} - - _evaluator_id = _evaluator_ref.get("id") - _evaluator_slug = _evaluator_ref.get("slug") - - evaluator_id = evaluator_id or _evaluator_id - evaluator_slug = evaluator_slug or _evaluator_slug - - revision = req.data.revision if req and req.data else None - if revision: - name = name or revision.get("name") - description = description or revision.get("description") - - name = ( - name or req.data.revision.get("name") - if req and req.data and req.data.revision - else None - ) - - description = ( - description or req.data.revision.get("description") - if req and req.data and req.data.revision - else None - ) - - evaluator_slug = ( - evaluator_slug - or get_slug_from_name_and_id( - name=name, - id=evaluator_id or uuid4(), - ) - if name - else uuid4().hex[-12:] - ) - - # print( - # evaluator_id, - # evaluator_slug, - # evaluator_revision_id, - # evaluator_revision_slug, - # ) - - if evaluator_revision_id or evaluator_revision_slug: - retrieve_response = await _retrieve_evaluator( - evaluator_revision_id=evaluator_revision_id, - evaluator_revision_slug=evaluator_revision_slug, - ) - elif evaluator_id or evaluator_slug: - retrieve_response = await _retrieve_evaluator( - evaluator_id=evaluator_id, - evaluator_slug=evaluator_slug, - ) - - except Exception as e: - print("[ERROR]: Failed to prepare evaluator:") - print_exc() - return None - - # print("Retrieve response:", retrieve_response) - - if retrieve_response and retrieve_response.id and retrieve_response.evaluator_id: - evaluator_id = retrieve_response.evaluator_id - # print(" --- Updating evaluator...", evaluator_id) - evaluator_edit_request = SimpleEvaluatorEdit( - id=evaluator_id, - # - name=name, - description=description, - # - flags=legacy_application_flags, - # - data=simple_evaluator_data, - ) - - # print(" --- evaluator_edit_request:", evaluator_edit_request) - - response = authed_api()( - method="PUT", - endpoint=f"/preview/simple/evaluators/{evaluator_id}", - json={ - "evaluator": evaluator_edit_request.model_dump( - mode="json", - exclude_none=True, - ) - }, - ) - - # print(" --- response:", response.status_code, response.text) - - try: - response.raise_for_status() - except Exception as e: - print("[ERROR]: Failed to update evaluator:", e) - print_exc() - return None - - else: - # print(" --- Creating evaluator...") - evaluator_create_request = SimpleEvaluatorCreate( - slug=evaluator_slug or uuid4().hex[-12:], - # - name=name, - description=description, - # - flags=legacy_application_flags, - # - data=simple_evaluator_data, - ) - - # print(" --- evaluator_create_request:", evaluator_create_request) - - response = authed_api()( - method="POST", - endpoint="/preview/simple/evaluators/", - json={ - "evaluator": evaluator_create_request.model_dump( - mode="json", - exclude_none=True, - ) - }, - ) - - # print(" --- response:", response.status_code, response.text) - - try: - response.raise_for_status() - except Exception as e: - print("[ERROR]: Failed to create evaluator:", e) - print_exc() - return None - - evaluator_response = SimpleEvaluatorResponse(**response.json()) - - evaluator = evaluator_response.evaluator - - if not evaluator or not evaluator.id: - return None - - # print(" --- evaluator:", evaluator) - - evaluator_revision = await _retrieve_evaluator( - evaluator_id=evaluator.id, - ) - - if not evaluator_revision or not evaluator_revision.id: - return None - - # print(evaluator_revision, "----------") - - return evaluator_revision.id diff --git a/sdk/agenta/sdk/managers/secrets.py b/sdk/agenta/sdk/managers/secrets.py index 1e3344e9cf..690db42b67 100644 --- a/sdk/agenta/sdk/managers/secrets.py +++ b/sdk/agenta/sdk/managers/secrets.py @@ -1,24 +1,19 @@ import re from typing import Optional, Dict, Any, List -from agenta.sdk.contexts.routing import RoutingContext -from agenta.sdk.contexts.running import RunningContext +from agenta.sdk.context.routing import routing_context from agenta.sdk.assets import model_to_provider_mapping as _standard_providers -from agenta.sdk.middlewares.running.vault import get_secrets - -import agenta as ag - class SecretsManager: @staticmethod def get_from_route() -> Optional[List[Dict[str, Any]]]: - context = RoutingContext.get() + context = routing_context.get() secrets = context.secrets if not secrets: - return [] + return None return secrets @@ -124,17 +119,11 @@ def _get_compatible_model(*, model: str, provider_slug: str): # The reason is that custom providers are in fact openai compatible providers # They need to be passed in litellm as openai/modelname - modified_model = model - - if "custom" in modified_model: - modified_model = modified_model.replace( - f"{provider_slug}/custom/", "openai/" - ) - - if provider_slug: - modified_model = modified_model.replace(f"{provider_slug}/", "") + if "custom" in model: + modified_model = model.replace(f"{provider_slug}/custom/", "openai/") + return modified_model.replace(f"{provider_slug}/", "") - return modified_model + return model.replace(f"{provider_slug}/", "") @staticmethod def get_provider_settings(model: str) -> Optional[Dict]: @@ -148,12 +137,10 @@ def get_provider_settings(model: str) -> Optional[Dict]: Dict: A dictionary containing all parameters needed for litellm.completion """ - request_provider_model = model - # STEP 1: get vault secrets from route context and transform it secrets = SecretsManager.get_from_route() if not secrets: - return [] + return None # STEP 1b: Parse secrets into usable format secrets = SecretsManager._parse_secrets(secrets=secrets) @@ -213,108 +200,3 @@ def get_provider_settings(model: str) -> Optional[Dict]: continue return provider_settings - - @staticmethod - async def retrieve_secrets(): - return await get_secrets( - f"{ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.host}/api", - RunningContext.get().credentials, - ) - - @staticmethod - async def ensure_secrets_in_workflow(): - ctx = RunningContext.get() - - ctx.secrets = await SecretsManager.retrieve_secrets() - - RunningContext.set(ctx) - - return ctx.secrets - - @staticmethod - def get_provider_settings_from_workflow(model: str) -> Optional[Dict]: - """ - Builds the LLM request with appropriate kwargs based on the custom provider/model - - Args: - model (str): The name of the model - - Returns: - Dict: A dictionary containing all parameters needed for litellm.completion - """ - - request_provider_model = model - - # STEP 1: get vault secrets from route context and transform it - secrets = RunningContext.get().secrets - if not secrets: - return [] - - # STEP 1b: Parse secrets into usable format - secrets = SecretsManager._parse_secrets(secrets=secrets) - - # STEP 2: check model exists in supported standard models - provider = _standard_providers.get(request_provider_model) - if not provider: - # check and get provider kind if model exists in custom provider models - provider = SecretsManager._custom_providers_get( - model=request_provider_model, - secrets=secrets, - ) - - # STEP 2b: return None in the case provider is None - if not provider: - return None - - # STEP 2c: get litellm compatible model - request_provider_slug = ( - SecretsManager._custom_provider_slug_get( - model=request_provider_model, secrets=secrets - ) - or "" - ) - compatible_provider_model = SecretsManager._get_compatible_model( - model=request_provider_model, provider_slug=request_provider_slug - ) - - # STEP 3: initialize provider settings and simplify provider name - provider_settings = dict(model=compatible_provider_model) - request_provider_kind = re.sub( - r"[\s-]+", "", provider.lower() - ) # normalizing other special characters too (azure-openai) - - # STEP 4: get credentials for model - for secret in secrets: - secret_data = secret.get("data", {}) - provider_info = secret_data.get("provider", {}) - - # i). Extract API key if present - # (for standard models -- openai/anthropic/gemini, etc) - if secret.get("kind") == "provider_key": - secret_provider_kind = secret_data.get("kind", "") - - if request_provider_kind == secret_provider_kind: - if "key" in provider_info: - provider_settings["api_key"] = provider_info["key"] - continue - - # ii). Extract Credentials if present - # (for custom providers -- aws bedrock/sagemaker, vertex_ai, etc) - elif secret.get("kind") == "custom_provider": - secret_provider_kind = ( - provider_info.get("kind", "").lower().replace(" ", "") - ) - secret_provider_slug = secret_data.get("provider_slug", "") - secret_provider_models = secret_data.get("models", "") - secret_provider_extras = provider_info.get("extras", {}) - - if ( - request_provider_kind == secret_provider_kind - and request_provider_slug == secret_provider_slug - and request_provider_model in secret_provider_models - ): - if secret_provider_extras: - provider_settings.update(secret_provider_extras) - continue - - return provider_settings diff --git a/sdk/agenta/sdk/managers/testsets.py b/sdk/agenta/sdk/managers/testsets.py deleted file mode 100644 index c10cb0f49e..0000000000 --- a/sdk/agenta/sdk/managers/testsets.py +++ /dev/null @@ -1,441 +0,0 @@ -from typing import List, Dict, Any, Optional -from uuid import UUID - -from agenta.sdk.utils.client import authed_api -from agenta.sdk.utils.references import get_slug_from_name_and_id -from agenta.sdk.models.testsets import ( - LegacyTestset, - # - Testcase, - TestsetRevisionData, - TestsetRevision, - # - TestsetRevisionResponse, -) - - -async def _create_legacy_testset( - *, - csvdata: List[Dict[str, Any]], - name: str, - testset_id: Optional[UUID] = None, -) -> Optional[TestsetRevision]: - response = authed_api()( - method="POST", - endpoint="/testsets/", - json={ - "testset_id": str(testset_id) if testset_id else None, - "name": name, - "csvdata": csvdata, - }, - ) - - if response.status_code != 200: - print("Failed to create testset:", response.status_code, response.text) - return None - - legacy_testset = LegacyTestset(**response.json()) - - # print(" --- legacy_testset:", legacy_testset) - - if not legacy_testset.id or not legacy_testset.name: - return None - - testset_revision = TestsetRevision( - id=UUID(legacy_testset.id), - slug=get_slug_from_name_and_id( - name=legacy_testset.name, - id=UUID(legacy_testset.id), - ), - name=legacy_testset.name, - data=TestsetRevisionData( - testcases=[ - Testcase( - data=testcase_data, - testset_id=UUID(legacy_testset.id), - ) - for testcase_data in csvdata - ] - ), - ) - - # print(" --- testset_revision:", testset_revision) - - return testset_revision - - -async def _fetch_legacy_testset( - testset_id: Optional[UUID] = None, - # - name: Optional[str] = None, -) -> Optional[TestsetRevision]: - legacy_testset = None - - if testset_id: - response = authed_api()( - method="GET", - endpoint=f"/testsets/{testset_id}", - ) - - if response.status_code != 200: - if response.status_code != 404: - print("Failed to fetch testset:", response.status_code, response.text) - return None - - legacy_testset = LegacyTestset(**response.json()) - elif name: - response = authed_api()( - method="GET", - endpoint="/testsets/", - params={"name": name}, - ) - - if response.status_code != 200: - print("Failed to list testsets:", response.status_code, response.text) - return None - - _testsets = response.json() - - for testset in _testsets: - _id = testset.pop("_id", None) - testset["id"] = _id - - legacy_testsets = [LegacyTestset(**testset) for testset in _testsets] - - if len(legacy_testsets) != 1: - print("Expected exactly one testset with name:", name) - return None - - legacy_testset = legacy_testsets[0] - - # print(" --- legacy_testset:", legacy_testset) - - if not legacy_testset.id or not legacy_testset.name: - return None - - testset_revision = TestsetRevision( - testset_id=UUID(legacy_testset.id), - slug=get_slug_from_name_and_id( - name=legacy_testset.name, - id=UUID(legacy_testset.id), - ), - name=legacy_testset.name, - data=( - TestsetRevisionData( - testcases=[ - Testcase( - data=testcase_data, - testset_id=UUID(legacy_testset.id), - ) - for testcase_data in legacy_testset.csvdata - ] - ) - if legacy_testset.csvdata - else None - ), - ) - - # print(" --- testset_revision:", testset_revision) - - return testset_revision - - -async def _edit_legacy_testset( - *, - testset_id: UUID, - csvdata: List[Dict[str, Any]], - name: Optional[str] = None, -) -> Optional[TestsetRevision]: - response = authed_api()( - method="PUT", - endpoint=f"/testsets/{testset_id}", - json={ - "name": name, - "csvdata": csvdata, - }, - ) - - if response.status_code != 200: - print("Failed to edit testset:", response.status_code, response.text) - return None - - response = authed_api()( - method="GET", - endpoint=f"/testsets/{testset_id}", - ) - - legacy_testset = LegacyTestset(**response.json()) - - # print(" --- legacy_testset:", legacy_testset) - - if not legacy_testset.id or not legacy_testset.name: - return None - - testset_revision = TestsetRevision( - id=UUID(legacy_testset.id), - slug=get_slug_from_name_and_id( - name=legacy_testset.name, - id=UUID(legacy_testset.id), - ), - name=legacy_testset.name, - data=( - TestsetRevisionData( - testcases=[ - Testcase( - data=testcase_data, - testset_id=UUID(legacy_testset.id), - ) - for testcase_data in legacy_testset.csvdata - ] - ) - if legacy_testset.csvdata - else None - ), - ) - - # print(" --- testset_revision:", testset_revision) - - return testset_revision - - -async def _list_legacy_testsets( - # -) -> List[TestsetRevision]: - response = authed_api()( - method="GET", - endpoint="/testsets/", - ) - - if response.status_code != 200: - print("Failed to list testsets:", response.status_code, response.text) - return [] - - legacy_testsets = [LegacyTestset(**testset) for testset in response.json()] - - # print(" --- legacy_testsets:", legacy_testsets) - - testset_revisions = [ - TestsetRevision( - id=UUID(legacy_testset.id), - slug=get_slug_from_name_and_id( - name=legacy_testset.name, - id=UUID(legacy_testset.id), - ), - name=legacy_testset.name, - data=( - TestsetRevisionData( - testcases=[ - Testcase( - data=testcase_data, - testset_id=UUID(legacy_testset.id), - ) - for testcase_data in legacy_testset.csvdata - ] - ) - if legacy_testset.csvdata - else None - ), - ) - for legacy_testset in legacy_testsets - if legacy_testset.id and legacy_testset.name - ] - - # print(" --- testset_revisions:", testset_revisions) - - return testset_revisions - - -async def _retrieve_testset( - testset_id: Optional[UUID] = None, - testset_revision_id: Optional[UUID] = None, -) -> Optional[TestsetRevision]: - payload = { - "testset_ref": ( - { - "id": str(testset_id) if testset_id else None, - } - if testset_id - else None - ), - "testset_revision_ref": ( - { - "id": str(testset_revision_id) if testset_revision_id else None, - } - if testset_revision_id - else None - ), - } - - # print(" --- payload:", payload) - - response = authed_api()( - method="POST", - endpoint="/preview/testsets/revisions/retrieve", - json=payload, - ) - response.raise_for_status() - - testset_revision_response = TestsetRevisionResponse(**response.json()) - - testset_revision = testset_revision_response.testset_revision - - # print(" --- testset_revision:", testset_revision) - - return testset_revision - - -async def _sync_legacy_testset( - *, - testset_id: Optional[UUID] = None, - # - csvdata: List[Dict[str, Any]], - # - name: Optional[str] = None, -) -> Optional[TestsetRevision]: - try: - # print("\n--------- UPSERT TESTSET") - - # print(" ---:", testset_revision_data.model_dump(mode="json", exclude_none=True)) - - testset_revision = await _fetch_legacy_testset( - testset_id=testset_id, - name=name, - ) - - except Exception as e: - print("[ERROR]: Failed to prepare testset:", e) - return None - - # print("Fetch response:", testset_revision) - - if testset_revision and testset_revision.testset_id: - # print(" --- Editing testset...", testset_id) - - testset_revision = await _edit_legacy_testset( - testset_id=testset_revision.testset_id, - name=name, - csvdata=csvdata, - ) - - # print("Edit response:", testset_revision) - - else: - # print(" --- Creating testset...", name, data) - - testset_revision = await _create_legacy_testset( - testset_id=testset_id, - name=name, - csvdata=csvdata, - ) - - if not testset_revision or not testset_revision.id: - return None - - # print(" --- testset_revision:", testset_revision) - - return testset_revision - - -async def aupsert( - *, - testset_id: Optional[UUID] = None, - # - name: Optional[str] = None, - # - data: List[Dict[str, Any]] | TestsetRevisionData, -) -> Optional[TestsetRevision]: - csvdata = list() - if isinstance(data, TestsetRevisionData) and data.testcases: - csvdata = [testcase.data for testcase in data.testcases] - elif isinstance(data, list): - csvdata = data - else: - csvdata = list() - - return await _sync_legacy_testset( - testset_id=testset_id, - name=name, - csvdata=csvdata, # type: ignore - ) - - -async def acreate( - *, - testset_id: Optional[UUID | str] = None, - # - name: Optional[str] = None, - # - data: List[Dict[str, Any]] | TestsetRevisionData, -) -> Optional[TestsetRevision]: - csvdata = list() - if isinstance(data, TestsetRevisionData) and data.testcases: - csvdata = [testcase.data for testcase in data.testcases] - elif isinstance(data, list): - csvdata = data - else: - csvdata = list() - - return await _create_legacy_testset( - testset_id=( - testset_id - if isinstance(testset_id, UUID) - else UUID(testset_id) - if testset_id - else None - ), - name=name, - csvdata=csvdata, # type: ignore - ) - - -async def aedit( - *, - testset_id: UUID | str, - # - name: Optional[str] = None, - # - data: List[Dict[str, Any]] | TestsetRevisionData, -) -> Optional[TestsetRevision]: - csvdata = list() - if isinstance(data, TestsetRevisionData) and data.testcases: - csvdata = [testcase.data for testcase in data.testcases] - elif isinstance(data, list): - csvdata = data - else: - csvdata = list() - - return await _edit_legacy_testset( - testset_id=testset_id if isinstance(testset_id, UUID) else UUID(testset_id), - name=name, - csvdata=csvdata, # type: ignore - ) - - -async def afetch( - *, - testset_id: UUID | str, -) -> Optional[TestsetRevision]: - return await _fetch_legacy_testset( - testset_id=testset_id if isinstance(testset_id, UUID) else UUID(testset_id) - ) - - -async def alist( - # -) -> List[TestsetRevision]: - return await _list_legacy_testsets() - - -async def aretrieve( - testset_id: Optional[UUID] = None, - # - testset_revision_id: Optional[UUID] = None, -) -> Optional[TestsetRevision]: - # print("\n--------- RETRIEVE TESTSET") - - response = await _retrieve_testset( - testset_id=testset_id, - testset_revision_id=testset_revision_id, - ) - - return response diff --git a/sdk/agenta/sdk/managers/vault.py b/sdk/agenta/sdk/managers/vault.py index ec641881d4..f559af19d2 100644 --- a/sdk/agenta/sdk/managers/vault.py +++ b/sdk/agenta/sdk/managers/vault.py @@ -1,16 +1,16 @@ from typing import Optional, Dict, Any -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context class VaultManager: @staticmethod def get_from_route() -> Optional[Dict[str, Any]]: - context = RoutingContext.get() + context = routing_context.get() secrets = context.secrets if not secrets: - return [] + return None return secrets diff --git a/sdk/agenta/sdk/middleware/__pycache__/vault.cpython-310.pyc.281472971036736 b/sdk/agenta/sdk/middleware/__pycache__/vault.cpython-310.pyc.281472971036736 new file mode 100644 index 0000000000..4f620e8d26 Binary files /dev/null and b/sdk/agenta/sdk/middleware/__pycache__/vault.cpython-310.pyc.281472971036736 differ diff --git a/sdk/agenta/sdk/middleware/auth.py b/sdk/agenta/sdk/middleware/auth.py index 0e77dae130..e5ba5ebe83 100644 --- a/sdk/agenta/sdk/middleware/auth.py +++ b/sdk/agenta/sdk/middleware/auth.py @@ -20,9 +20,7 @@ AGENTA_RUNTIME_PREFIX = getenv("AGENTA_RUNTIME_PREFIX", "") -_CACHE_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED", "true").lower() in TRUTHY -) +_CACHE_ENABLED = getenv("AGENTA_MIDDLEWARE_CACHE_ENABLED", "false").lower() in TRUTHY _ALWAYS_ALLOW_LIST = [f"{AGENTA_RUNTIME_PREFIX}/health"] @@ -53,7 +51,7 @@ def __init__( self.content = content -class AuthHTTPMiddleware(BaseHTTPMiddleware): +class AuthMiddleware(BaseHTTPMiddleware): def __init__(self, app: FastAPI): super().__init__(app) @@ -100,8 +98,8 @@ async def _get_credentials(self, request: Request) -> Optional[str]: access_token = request.cookies.get("sAccessToken", None) cookies = {"sAccessToken": access_token} if access_token else None - # if not headers and not cookies: - # log.debug("No auth header nor auth cookie found in the request") + if not headers and not cookies: + log.debug("No auth header nor auth cookie found in the request") # PARAMS params = {} @@ -112,9 +110,8 @@ async def _get_credentials(self, request: Request) -> Optional[str]: # ALTERNATIVE or request.query_params.get("project_id") ) - # if not project_id: - # log.debug("No project ID found in request") - + if not project_id: + log.debug("No project ID found in request") if project_id: params["project_id"] = project_id ## SCOPE @@ -140,7 +137,7 @@ async def _get_credentials(self, request: Request) -> Optional[str]: credentials = _cache.get(_hash) if credentials: - # log.debug("Using cached credentials") + log.debug("Using cached credentials") return credentials try: @@ -154,46 +151,46 @@ async def _get_credentials(self, request: Request) -> Optional[str]: timeout=30.0, ) except httpx.TimeoutException as exc: - # log.debug(f"Timeout error while verify credentials: {exc}") + log.debug(f"Timeout error while verify credentials: {exc}") raise DenyException( status_code=504, - content=f"Could not verify credentials: connection to {self.host} timed out. Please check your network connection.", + content="Could not verify credentials: connection to {self.host} timed out. Please check your network connection.", ) from exc except httpx.ConnectError as exc: - # log.debug(f"Connection error while verify credentials: {exc}") + log.debug(f"Connection error while verify credentials: {exc}") raise DenyException( status_code=503, content=f"Could not verify credentials: connection to {self.host} failed. Please check if agenta is available.", ) from exc except httpx.NetworkError as exc: - # log.debug(f"Network error while verify credentials: {exc}") + log.debug(f"Network error while verify credentials: {exc}") raise DenyException( status_code=503, - content=f"Could not verify credentials: connection to {self.host} failed. Please check your network connection.", + content="Could not verify credentials: connection to {self.host} failed. Please check your network connection.", ) from exc except httpx.HTTPError as exc: - # log.debug(f"HTTP error while verify credentials: {exc}") + log.debug(f"HTTP error while verify credentials: {exc}") raise DenyException( status_code=502, content=f"Could not verify credentials: connection to {self.host} failed. Please check if agenta is available.", ) from exc if response.status_code == 401: - # log.debug("Agenta returned 401 - Invalid credentials") + log.debug("Agenta returned 401 - Invalid credentials") raise DenyException( status_code=401, content="Invalid credentials. Please check your credentials or login again.", ) elif response.status_code == 403: - # log.debug("Agenta returned 403 - Permission denied") + log.debug("Agenta returned 403 - Permission denied") raise DenyException( status_code=403, content="Permission denied. Please check your permissions or contact your administrator.", ) elif response.status_code != 200: - # log.debug( - # f"Agenta returned {response.status_code} - Unexpected status code" - # ) + log.debug( + f"Agenta returned {response.status_code} - Unexpected status code" + ) raise DenyException( status_code=500, content=f"Could not verify credentials: {self.host} returned unexpected status code {response.status_code}. Please try again later or contact support if the issue persists.", @@ -202,16 +199,16 @@ async def _get_credentials(self, request: Request) -> Optional[str]: try: auth = response.json() except ValueError as exc: - # log.debug(f"Agenta returned invalid JSON response: {exc}") + log.debug(f"Agenta returned invalid JSON response: {exc}") raise DenyException( status_code=500, content=f"Could not verify credentials: {self.host} returned unexpected invalid JSON response. Please try again later or contact support if the issue persists.", ) from exc if not isinstance(auth, dict): - # log.debug( - # f"Agenta returned invalid response format: {type(auth)}" - # ) + log.debug( + f"Agenta returned invalid response format: {type(auth)}" + ) raise DenyException( status_code=500, content=f"Could not verify credentials: {self.host} returned unexpected invalid response format. Please try again later or contact support if the issue persists.", @@ -219,7 +216,7 @@ async def _get_credentials(self, request: Request) -> Optional[str]: effect = auth.get("effect") if effect != "allow": - # log.debug("Access denied by Agenta - effect: {effect}") + log.debug("Access denied by Agenta - effect: {effect}") raise DenyException( status_code=403, content="Permission denied. Please check your permissions or contact your administrator.", @@ -227,8 +224,8 @@ async def _get_credentials(self, request: Request) -> Optional[str]: credentials = auth.get("credentials") - # if not credentials: - # log.debug("No credentials found in the response") + if not credentials: + log.debug("No credentials found in the response") _cache.put(_hash, credentials) @@ -237,9 +234,9 @@ async def _get_credentials(self, request: Request) -> Optional[str]: except DenyException as deny: raise deny except Exception as exc: # pylint: disable=bare-except - # log.debug( - # f"Unexpected error while verifying credentials (remote): {exc}" - # ) + log.debug( + f"Unexpected error while verifying credentials (remote): {exc}" + ) raise DenyException( status_code=500, content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.", @@ -248,7 +245,7 @@ async def _get_credentials(self, request: Request) -> Optional[str]: except DenyException as deny: raise deny except Exception as exc: - # log.debug(f"Unexpected error while verifying credentials (local): {exc}") + log.debug(f"Unexpected error while verifying credentials (local): {exc}") raise DenyException( status_code=500, content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.", diff --git a/sdk/agenta/sdk/middleware/config.py b/sdk/agenta/sdk/middleware/config.py index cda301ff07..6c0cdff761 100644 --- a/sdk/agenta/sdk/middleware/config.py +++ b/sdk/agenta/sdk/middleware/config.py @@ -17,9 +17,7 @@ import agenta as ag -_CACHE_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED", "true").lower() in TRUTHY -) +_CACHE_ENABLED = getenv("AGENTA_MIDDLEWARE_CACHE_ENABLED", "false").lower() in TRUTHY _cache = TTLLRUCache() @@ -93,18 +91,13 @@ async def _get_config(self, request: Request) -> Optional[Tuple[Dict, Dict]]: return parameters, references - config = dict() - app_ref = None + config = {} is_test_path = request.url.path.endswith("/test") are_refs_missing = not variant_ref and not environment_ref - should_fetch_application_revision = not is_test_path or not are_refs_missing - is_app_ref_incomplete = ( - application_ref and application_ref.id and not application_ref.slug - ) - should_fetch_application = is_app_ref_incomplete + should_fetch = not is_test_path or not are_refs_missing - if should_fetch_application_revision: + if should_fetch: async with httpx.AsyncClient() as client: response = await client.post( f"{self.host}/api/variants/configs/fetch", @@ -115,26 +108,13 @@ async def _get_config(self, request: Request) -> Optional[Tuple[Dict, Dict]]: if response.status_code == 200: config = response.json() - elif should_fetch_application: - async with httpx.AsyncClient() as client: - response = await client.get( - f"{self.host}/api/apps/{application_ref.id}", - headers=headers, - ) - - if response.status_code == 200: - app = response.json() - app_ref = { - "id": app.get("app_id"), - "slug": app.get("app_name"), - } - - if config: - parameters = config.get("params") - else: - # by default, application_ref will always have an id - config["application_ref"] = app_ref or refs["application_ref"] + if not config: + config["application_ref"] = refs[ + "application_ref" + ] # by default, application_ref will always have an id parameters = None + else: + parameters = config.get("params") references = {} diff --git a/sdk/agenta/sdk/middleware/vault.py b/sdk/agenta/sdk/middleware/vault.py index 52c02fa186..881f03393e 100644 --- a/sdk/agenta/sdk/middleware/vault.py +++ b/sdk/agenta/sdk/middleware/vault.py @@ -24,9 +24,7 @@ for provider_kind in StandardProviderKind.__args__[0].__args__: # type: ignore _PROVIDER_KINDS.append(provider_kind) -_CACHE_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED", "true").lower() in TRUTHY -) +_CACHE_ENABLED = getenv("AGENTA_MIDDLEWARE_CACHE_ENABLED", "false").lower() in TRUTHY _cache = TTLLRUCache() @@ -85,7 +83,7 @@ async def _get_secrets(self, request: Request) -> Optional[Dict]: continue secret = SecretDTO( - kind="provider_key", # type: ignore + kind="provider_kind", # type: ignore data=StandardProviderDTO( kind=provider, provider=StandardProviderSettingsDTO(key=key), @@ -101,7 +99,7 @@ async def _get_secrets(self, request: Request) -> Optional[Dict]: try: async with httpx.AsyncClient() as client: response = await client.get( - f"{self.host}/api/vault/v1/secrets/", + f"{self.host}/api/vault/v1/secrets", headers=headers, ) diff --git a/sdk/agenta/sdk/middlewares/__init__.py b/sdk/agenta/sdk/middlewares/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/middlewares/routing/__init__.py b/sdk/agenta/sdk/middlewares/routing/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/middlewares/routing/auth.py b/sdk/agenta/sdk/middlewares/routing/auth.py deleted file mode 100644 index f176a118fb..0000000000 --- a/sdk/agenta/sdk/middlewares/routing/auth.py +++ /dev/null @@ -1,263 +0,0 @@ -from typing import Callable, Optional -from os import getenv -from json import dumps - -import httpx - -from starlette.types import ASGIApp -from starlette.middleware.base import BaseHTTPMiddleware -from fastapi import Request -from fastapi.responses import JSONResponse - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.utils.exceptions import display_exception -from agenta.sdk.utils.cache import TTLLRUCache -from agenta.sdk.utils.constants import TRUTHY - -# import agenta as ag - - -log = get_module_logger(__name__) - -AGENTA_RUNTIME_PREFIX = getenv("AGENTA_RUNTIME_PREFIX", "") - -_AUTH_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_AUTH_ENABLED", "true").lower() in TRUTHY -) - -_CACHE_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED", "true").lower() in TRUTHY -) - -_ALWAYS_ALLOW_LIST = [f"{AGENTA_RUNTIME_PREFIX}/health"] - -_cache = TTLLRUCache() - - -class DenyResponse(JSONResponse): - def __init__( - self, - status_code: int = 401, - detail: str = "Unauthorized", - ) -> None: - super().__init__( - status_code=status_code, - content={"detail": detail}, - ) - - -class DenyException(Exception): - def __init__( - self, - status_code: int = 401, - content: str = "Unauthorized", - ) -> None: - super().__init__() - - self.status_code = status_code - self.content = content - - -class AuthMiddleware(BaseHTTPMiddleware): - def __init__(self, app: ASGIApp, **options): - super().__init__(app) - - # self.host = ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.host - - # self.scope_type = ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.scope_type - # self.scope_id = ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.scope_id - - async def dispatch(self, request: Request, call_next: Callable): - try: - if request.url.path in _ALWAYS_ALLOW_LIST: - request.state.auth = {} - - else: - credentials = await self._get_credentials(request) - - request.state.auth = {"credentials": credentials} - - return await call_next(request) - - except DenyException as deny: - display_exception("Auth Middleware Exception") - - return DenyResponse( - status_code=deny.status_code, - detail=deny.content, - ) - - except: # pylint: disable=bare-except - display_exception("Auth Middleware Exception") - - return DenyResponse( - status_code=500, - detail="Auth: Unexpected Error.", - ) - - async def _get_credentials(self, request: Request) -> Optional[str]: - try: - if not _AUTH_ENABLED: - return request.headers.get("authorization", None) - - # HEADERS - authorization = request.headers.get("authorization", None) - headers = {"Authorization": authorization} if authorization else None - - # COOKIES - access_token = request.cookies.get("sAccessToken", None) - cookies = {"sAccessToken": access_token} if access_token else None - - # if not headers and not cookies: - # log.debug("No auth header nor auth cookie found in the request") - - # PARAMS - params = {} - ## PROJECT_ID - project_id = ( - # CLEANEST - request.state.otel["baggage"].get("project_id") - # ALTERNATIVE - or request.query_params.get("project_id") - ) - # if not project_id: - # log.debug("No project ID found in request") - - if project_id: - params["project_id"] = project_id - ## SCOPE - if self.scope_type and self.scope_id: - params["scope_type"] = self.scope_type - params["scope_id"] = self.scope_id - ## ACTION - params["action"] = "run_service" - ## RESOURCE - params["resource_type"] = "service" - # params["resource_id"] = None - - _hash = dumps( - { - "headers": headers, - "cookies": cookies, - "params": params, - }, - sort_keys=True, - ) - - if _CACHE_ENABLED: - credentials = _cache.get(_hash) - - if credentials: - # log.debug("Using cached credentials") - return credentials - - try: - async with httpx.AsyncClient() as client: - try: - response = await client.get( - f"{self.host}/api/permissions/verify", - headers=headers, - cookies=cookies, - params=params, - timeout=30.0, - ) - except httpx.TimeoutException as exc: - # log.debug(f"Timeout error while verify credentials: {exc}") - raise DenyException( - status_code=504, - content=f"Could not verify credentials: connection to {self.host} timed out. Please check your network connection.", - ) from exc - except httpx.ConnectError as exc: - # log.debug(f"Connection error while verify credentials: {exc}") - raise DenyException( - status_code=503, - content=f"Could not verify credentials: connection to {self.host} failed. Please check if agenta is available.", - ) from exc - except httpx.NetworkError as exc: - # log.debug(f"Network error while verify credentials: {exc}") - raise DenyException( - status_code=503, - content=f"Could not verify credentials: connection to {self.host} failed. Please check your network connection.", - ) from exc - except httpx.HTTPError as exc: - # log.debug(f"HTTP error while verify credentials: {exc}") - raise DenyException( - status_code=502, - content=f"Could not verify credentials: connection to {self.host} failed. Please check if agenta is available.", - ) from exc - - if response.status_code == 401: - # log.debug("Agenta returned 401 - Invalid credentials") - raise DenyException( - status_code=401, - content="Invalid credentials. Please check your credentials or login again.", - ) - elif response.status_code == 403: - # log.debug("Agenta returned 403 - Permission denied") - raise DenyException( - status_code=403, - content="Permission denied. Please check your permissions or contact your administrator.", - ) - elif response.status_code != 200: - # log.debug( - # f"Agenta returned {response.status_code} - Unexpected status code" - # ) - raise DenyException( - status_code=500, - content=f"Could not verify credentials: {self.host} returned unexpected status code {response.status_code}. Please try again later or contact support if the issue persists.", - ) - - try: - auth = response.json() - except ValueError as exc: - # log.debug(f"Agenta returned invalid JSON response: {exc}") - raise DenyException( - status_code=500, - content=f"Could not verify credentials: {self.host} returned unexpected invalid JSON response. Please try again later or contact support if the issue persists.", - ) from exc - - if not isinstance(auth, dict): - # log.debug( - # f"Agenta returned invalid response format: {type(auth)}" - # ) - raise DenyException( - status_code=500, - content=f"Could not verify credentials: {self.host} returned unexpected invalid response format. Please try again later or contact support if the issue persists.", - ) - - effect = auth.get("effect") - if effect != "allow": - # log.debug("Access denied by Agenta - effect: {effect}") - raise DenyException( - status_code=403, - content="Permission denied. Please check your permissions or contact your administrator.", - ) - - credentials = auth.get("credentials") - - # if not credentials: - # log.debug("No credentials found in the response") - - _cache.put(_hash, credentials) - - return credentials - - except DenyException as deny: - raise deny - except Exception as exc: # pylint: disable=bare-except - # log.debug( - # f"Unexpected error while verifying credentials (remote): {exc}" - # ) - raise DenyException( - status_code=500, - content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.", - ) from exc - - except DenyException as deny: - raise deny - except Exception as exc: - # log.debug(f"Unexpected error while verifying credentials (local): {exc}") - raise DenyException( - status_code=500, - content=f"Could not verify credentials: unexpected error - {str(exc)}. Please try again later or contact support if the issue persists.", - ) from exc diff --git a/sdk/agenta/sdk/middlewares/routing/cors.py b/sdk/agenta/sdk/middlewares/routing/cors.py deleted file mode 100644 index 934efa86f1..0000000000 --- a/sdk/agenta/sdk/middlewares/routing/cors.py +++ /dev/null @@ -1,30 +0,0 @@ -from os import getenv - -from starlette.types import ASGIApp, Receive, Scope, Send -from fastapi.middleware.cors import CORSMiddleware as BaseCORSMiddleware - -from agenta.sdk.utils.constants import TRUTHY - -_USE_CORS = getenv("AGENTA_USE_CORS", "enable").lower() in TRUTHY - - -class CORSMiddleware(BaseCORSMiddleware): - def __init__(self, app: ASGIApp, **options): - self.app = app - - if _USE_CORS: - super().__init__( - app=app, - allow_origins=["*"], - allow_methods=["*"], - allow_headers=["*"], - allow_credentials=True, - expose_headers=None, - max_age=None, - ) - - async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: - if _USE_CORS: - return await super().__call__(scope, receive, send) - - return await self.app(scope, receive, send) diff --git a/sdk/agenta/sdk/middlewares/routing/otel.py b/sdk/agenta/sdk/middlewares/routing/otel.py deleted file mode 100644 index e1aeecc698..0000000000 --- a/sdk/agenta/sdk/middlewares/routing/otel.py +++ /dev/null @@ -1,29 +0,0 @@ -from typing import Callable - -from starlette.types import ASGIApp -from starlette.middleware.base import BaseHTTPMiddleware -from fastapi import Request - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.engines.tracing.propagation import extract - - -log = get_module_logger(__name__) - - -class OTelMiddleware(BaseHTTPMiddleware): - async def dispatch(self, request: Request, call_next: Callable): - request.state.otel = {"baggage": {}, "traceparent": None} - - headers: dict = dict(request.headers) - - if "newrelic" in headers: - headers["traceparent"] = None - - with suppress(): - _, traceparent, baggage = extract(headers) - - request.state.otel = {"baggage": baggage, "traceparent": traceparent} - - return await call_next(request) diff --git a/sdk/agenta/sdk/middlewares/running/__init__.py b/sdk/agenta/sdk/middlewares/running/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/middlewares/running/normalizer.py b/sdk/agenta/sdk/middlewares/running/normalizer.py deleted file mode 100644 index e3fdd2acdd..0000000000 --- a/sdk/agenta/sdk/middlewares/running/normalizer.py +++ /dev/null @@ -1,318 +0,0 @@ -# /agenta/sdk/middlewares/running/normalizer.py -import inspect -from typing import Any, Dict, Callable, Union -from inspect import isawaitable, isasyncgen, isgenerator -from traceback import format_exception -from uuid import UUID - - -from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.models.workflows import ( - WorkflowServiceStatus, - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, -) -from agenta.sdk.workflows.errors import ErrorStatus -from agenta.sdk.contexts.running import RunningContext -from agenta.sdk.contexts.tracing import TracingContext - - -class NormalizerMiddleware: - """Middleware that normalizes workflow service requests and responses. - - This middleware performs two key normalization operations: - - 1. **Request Normalization**: Transforms a WorkflowServiceRequest into the appropriate - keyword arguments for the workflow handler function by: - - Mapping request data fields to handler function parameters - - Extracting inputs from request.data.inputs and mapping them to function parameters - - Handling special parameters like 'request' and WorkflowServiceRequestData fields - - Supporting **kwargs expansion for additional fields - - 2. **Response Normalization**: Transforms handler function results into standardized - WorkflowServiceBatchResponse or WorkflowServiceStreamResponse objects by: - - Handling various return types (plain values, awaitables, generators, async generators) - - Aggregating streaming results into batches when aggregate flag is set - - Extracting trace_id and span_id from TracingContext for observability - - Wrapping raw outputs in proper response structures - - The middleware ensures consistent interfaces between the workflow service layer and - the actual handler functions, allowing handlers to use simple function signatures - while maintaining structured request/response formats at the service boundary. - """ - - DATA_FIELDS = set(("request",)) | set( - WorkflowServiceRequestData.model_fields.keys() - ) - - async def _normalize_request( - self, - request: WorkflowServiceRequest, - handler: Callable, - ) -> Dict[str, Any]: - """Transform a WorkflowServiceRequest into kwargs for the handler function. - - Inspects the handler's function signature and maps the request data to the - appropriate parameter names and values. The mapping follows this priority order: - - 1. If parameter name is 'request': passes the entire WorkflowServiceRequest - 2. If parameter name matches DATA_FIELDS (like 'inputs', 'outputs', 'parameters'): - extracts that field from request.data - 3. If parameter is **kwargs: includes all unconsumed DATA_FIELDS - 4. Otherwise: looks up the parameter name in request.data.inputs dict - - Args: - request: The workflow service request containing inputs and data - handler: The callable workflow handler whose signature to inspect - - Returns: - Dictionary mapping parameter names to values for calling the handler - """ - sig = inspect.signature(handler) - params = sig.parameters - normalized: Dict[str, Any] = {} - consumed = set() - - for name, param in params.items(): - if name == "request": - normalized[name] = request - consumed.add(name) - - elif name in self.DATA_FIELDS: - normalized[name] = ( - getattr(request.data, name, None) if request.data else None - ) - consumed.add(name) - - elif param.kind == inspect.Parameter.VAR_KEYWORD: - if request.data: - for f in self.DATA_FIELDS - consumed: - normalized[f] = getattr(request.data, f, None) - consumed |= self.DATA_FIELDS - - else: - if request.data and isinstance(request.data.inputs, dict): - if name in request.data.inputs: - normalized[name] = request.data.inputs[name] - consumed.add(name) - continue - normalized[name] = None - - return normalized - - async def _normalize_response( - self, - result: Any, - ) -> Union[WorkflowServiceBatchResponse, WorkflowServiceStreamResponse,]: - if isawaitable(result): - result = await result - - if isinstance( - result, (WorkflowServiceBatchResponse, WorkflowServiceStreamResponse) - ): - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - result.trace_id = trace_id - result.span_id = span_id - - return result - - if isasyncgen(result): - if RunningContext.get().aggregate: - collected = [item async for item in result] - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - return WorkflowServiceBatchResponse( - data=WorkflowServiceResponseData(outputs=collected), - trace_id=trace_id, - span_id=span_id, - ) - - async def iterator(): - async for item in result: - yield item - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - return WorkflowServiceStreamResponse( - generator=iterator, - trace_id=trace_id, - span_id=span_id, - ) - - if isgenerator(result): - if RunningContext.get().aggregate: - collected = list(result) - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - return WorkflowServiceBatchResponse( - data=WorkflowServiceResponseData(outputs=collected), - trace_id=trace_id, - span_id=span_id, - ) - - async def iterator(): - for item in result: - yield item - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - return WorkflowServiceStreamResponse( - generator=iterator, - trace_id=trace_id, - span_id=span_id, - ) - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - return WorkflowServiceBatchResponse( - data=WorkflowServiceResponseData(outputs=result), - trace_id=trace_id, - span_id=span_id, - ) - - async def _normalize_exception( - self, - exc: Exception, - ) -> WorkflowServiceBatchResponse: - error_status = None - - if isinstance(exc, ErrorStatus): - error_status = WorkflowServiceStatus( - type=exc.type, - code=exc.code, - message=exc.message, - stacktrace=exc.stacktrace, - ) - else: - type = "https://docs.agenta.ai/errors#v1:sdk:unknown-workflow-invoke-error" - - code = getattr(exc, "status_code") if hasattr(exc, "status_code") else 500 - - if code in [401, 403]: - code = 424 - - message = str(exc) or "Internal Server Error" - - stacktrace = format_exception( - exc, # type: ignore - value=exc, - tb=exc.__traceback__, - ) - - error_status = WorkflowServiceStatus( - type=type, - code=code, - message=message, - stacktrace=stacktrace, - ) - - trace_id = None - span_id = None - - with suppress(): - link = (TracingContext.get().link) or {} - - _trace_id = link.get("trace_id") if link else None # in int format - _span_id = link.get("span_id") if link else None # in int format - - trace_id = UUID(int=_trace_id).hex if _trace_id else None - span_id = UUID(int=_span_id).hex[16:] if _span_id else None - - error_response = WorkflowServiceBatchResponse( - status=error_status, - trace_id=trace_id, - span_id=span_id, - ) - - return error_response - - async def __call__( - self, - request: WorkflowServiceRequest, - call_next: Callable[[WorkflowServiceRequest], Any], - ): - ctx = RunningContext.get() - handler = ctx.handler - - if not handler: - raise RuntimeError("NormalizerMiddleware: no handler set in context") - - kwargs = await self._normalize_request(request, handler) - - try: - response = handler(**kwargs) - - normalized = await self._normalize_response(response) - - except Exception as exception: - normalized = await self._normalize_exception(exception) - - return normalized - - return normalized diff --git a/sdk/agenta/sdk/middlewares/running/resolver.py b/sdk/agenta/sdk/middlewares/running/resolver.py deleted file mode 100644 index 8081313c75..0000000000 --- a/sdk/agenta/sdk/middlewares/running/resolver.py +++ /dev/null @@ -1,161 +0,0 @@ -# /agenta/sdk/middlewares/running/resolver.py -from typing import Callable, Any, Optional - -from agenta.sdk.utils.logging import get_module_logger -from agenta.sdk.models.workflows import ( - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceInterface, - WorkflowServiceConfiguration, -) -from agenta.sdk.contexts.running import RunningContext -from agenta.sdk.workflows.utils import ( - retrieve_handler, - retrieve_interface, - retrieve_configuration, -) -from agenta.sdk.workflows.errors import InvalidInterfaceURIV0Error - - -log = get_module_logger(__name__) - - -async def resolve_interface( - *, - request: Optional[WorkflowServiceRequest] = None, - interface: Optional[WorkflowServiceInterface] = None, -) -> Optional[WorkflowServiceInterface]: - """Resolve the workflow service interface from multiple sources. - - Checks for interface in this priority order: - 1. Provided interface parameter - 2. Interface from the request - 3. Interface from the RunningContext - - Args: - request: Optional workflow service request that may contain an interface - interface: Optional interface to use directly - - Returns: - The resolved WorkflowServiceInterface or None if not found - """ - if interface is not None: - return interface - - if request and request.interface: - return request.interface - - ctx = RunningContext.get() - return ctx.interface - - -async def resolve_configuration( - *, - request: Optional[WorkflowServiceRequest] = None, - configuration: Optional[WorkflowServiceConfiguration] = None, -) -> Optional[WorkflowServiceConfiguration]: - """Resolve workflow parameters from multiple sources. - - Checks for parameters in this priority order: - 1. Provided parameters parameter - 2. Parameters from request.data.parameters - 3. Parameters from the RunningContext - - Args: - request: Optional workflow service request that may contain parameters - parameters: Optional parameters dict to use directly - - Returns: - The resolved parameters dict or None if not found - """ - if configuration is not None: - return configuration - - if request and request.configuration: - return request.configuration - - ctx = RunningContext.get() - return ctx.configuration - - -async def resolve_handler( - *, - uri: Optional[str] = None, -): - """Retrieve and validate a workflow handler by its URI. - - Looks up a registered handler function using the provided URI. - Raises an exception if the URI is None or if no handler is found. - - Args: - uri: The service URI identifying the handler to retrieve - - Returns: - The resolved handler callable - - Raises: - InvalidInterfaceURIV0Error: If uri is None or if no handler found for the URI - """ - if uri is None: - raise InvalidInterfaceURIV0Error(got="None") - - handler = retrieve_handler(uri) - - if handler is None: - raise InvalidInterfaceURIV0Error(got=uri) - - return handler - - -class ResolverMiddleware: - """Middleware that resolves workflow components before execution. - - This middleware is responsible for resolving three critical components needed - to execute a workflow: - - 1. **Interface**: The WorkflowServiceInterface containing the service URI and schemas - 2. **Parameters**: Configuration parameters for the workflow - 3. **Handler**: The actual callable function that implements the workflow logic - - The middleware resolves these components from various sources (request, context, registry) - and stores them in the RunningContext for downstream middleware and the handler to use. - It also ensures the request.data.parameters is populated for the workflow execution. - """ - - async def __call__( - self, - request: WorkflowServiceRequest, - call_next: Callable[[WorkflowServiceRequest], Any], - ): - """Resolve workflow components and populate the running context. - - Args: - request: The workflow service request being processed - call_next: The next middleware or handler in the chain - - Returns: - The result from calling the next middleware/handler in the chain - - Raises: - InvalidInterfaceURIV0Error: If the handler cannot be resolved from the interface URI - """ - interface = await resolve_interface(request=request) - configuration = await resolve_configuration(request=request) - handler = await resolve_handler(uri=(interface.uri if interface else None)) - - ctx = RunningContext.get() - ctx.interface = interface - ctx.configuration = configuration - ctx.handler = handler - - if not request.data: - request.data = WorkflowServiceRequestData() - - request.data.parameters = ( - request.data.parameters or configuration.parameters - if configuration - else None - ) - - return await call_next(request) diff --git a/sdk/agenta/sdk/middlewares/running/vault.py b/sdk/agenta/sdk/middlewares/running/vault.py deleted file mode 100644 index f35a233e95..0000000000 --- a/sdk/agenta/sdk/middlewares/running/vault.py +++ /dev/null @@ -1,137 +0,0 @@ -from os import getenv -from json import dumps -from typing import Callable, Dict, Optional, List, Any - -import httpx - -from agenta.sdk.utils.constants import TRUTHY -from agenta.sdk.utils.cache import TTLLRUCache -from agenta.sdk.utils.exceptions import suppress, display_exception - -from agenta.sdk.models.workflows import WorkflowServiceRequest -from agenta.sdk.contexts.running import RunningContext - -from agenta.client.backend.types import SecretDto as SecretDTO -from agenta.client.backend.types import ( - StandardProviderKind, - StandardProviderDto as StandardProviderDTO, - StandardProviderSettingsDto as StandardProviderSettingsDTO, -) - -import agenta as ag - - -_PROVIDER_KINDS = [] - -for provider_kind in StandardProviderKind.__args__[0].__args__: # type: ignore - _PROVIDER_KINDS.append(provider_kind) - -_CACHE_ENABLED = ( - getenv("AGENTA_SERVICE_MIDDLEWARE_CACHE_ENABLED", "true").lower() in TRUTHY -) - -_cache = TTLLRUCache() - - -async def get_secrets(api_url, credentials) -> list: - headers = None - if credentials: - headers = {"Authorization": credentials} - - _hash = dumps( - { - "headers": headers, - }, - sort_keys=True, - ) - - if _CACHE_ENABLED: - secrets_cache = _cache.get(_hash) - - if secrets_cache: - secrets = secrets_cache.get("secrets") - - return secrets - - local_secrets: List[Dict[str, Any]] = [] - - try: - for provider_kind in _PROVIDER_KINDS: - provider = provider_kind - key_name = f"{provider.upper()}_API_KEY" - key = getenv(key_name) - - if not key: - continue - - secret = SecretDTO( - kind="provider_key", # type: ignore - data=StandardProviderDTO( - kind=provider, - provider=StandardProviderSettingsDTO(key=key), - ), - ) - - local_secrets.append(secret.model_dump()) - except: # pylint: disable=bare-except - display_exception("Vault: Local Secrets Exception") - - vault_secrets: List[Dict[str, Any]] = [] - - try: - async with httpx.AsyncClient() as client: - response = await client.get( - f"{api_url}/vault/v1/secrets", - headers=headers, - ) - - if response.status_code != 200: - vault_secrets = [] - - else: - vault_secrets = response.json() - except: # pylint: disable=bare-except - display_exception("Vault: Vault Secrets Exception") - - secrets = local_secrets + vault_secrets - - standard_secrets = {} - custom_secrets = [] - - if local_secrets: - for secret in local_secrets: - standard_secrets[secret["data"]["kind"]] = secret # type: ignore - - if vault_secrets: - for secret in vault_secrets: - if secret["kind"] == "provider_key": # type: ignore - standard_secrets[secret["data"]["kind"]] = secret # type: ignore - elif secret["kind"] == "custom_provider": # type: ignore - custom_secrets.append(secret) - - standard_secrets = list(standard_secrets.values()) - - secrets = standard_secrets + custom_secrets - - _cache.put(_hash, {"secrets": secrets}) - - return secrets - - -class VaultMiddleware: - async def __call__( - self, - request: WorkflowServiceRequest, - call_next: Callable[[WorkflowServiceRequest], Any], - ): - api_url = f"{ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.host}/api" - - with suppress(): - ctx = RunningContext.get() - credentials = ctx.credentials - - secrets = await get_secrets(api_url, credentials) - - ctx.secrets = secrets - - return await call_next(request) diff --git a/sdk/agenta/sdk/models/__init__.py b/sdk/agenta/sdk/models/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/models/blobs.py b/sdk/agenta/sdk/models/blobs.py deleted file mode 100644 index 188dbe2601..0000000000 --- a/sdk/agenta/sdk/models/blobs.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Optional -from uuid import UUID - - -from agenta.sdk.models.shared import ( - TraceID, - SpanID, - Link, - Identifier, - Slug, - Version, - Reference, - Lifecycle, - Header, - Flags, - Tags, - Meta, - Metadata, - Data, - Commit, - AliasConfig, - sync_alias, -) - - -class Blob(Identifier, Lifecycle): - flags: Optional[Flags] = None # type: ignore - tags: Optional[Tags] = None # type: ignore - meta: Optional[Meta] = None # type: ignore - - data: Optional[Data] = None # type: ignore - - set_id: Optional[UUID] = None diff --git a/sdk/agenta/sdk/models/evaluations.py b/sdk/agenta/sdk/models/evaluations.py deleted file mode 100644 index 38c22cf6cd..0000000000 --- a/sdk/agenta/sdk/models/evaluations.py +++ /dev/null @@ -1,119 +0,0 @@ -from typing import Dict, List, Optional, Union, Literal, Callable, Any -from enum import Enum -from uuid import UUID -from datetime import datetime - -from pydantic import BaseModel - -from agenta.sdk.models.shared import ( - TraceID, - SpanID, - Link, - Identifier, - Slug, - Version, - Reference, - Lifecycle, - Header, - Flags, - Tags, - Meta, - Metadata, - Data, - Commit, - AliasConfig, - sync_alias, -) - - -# ------------------------------------------------------------------------------ - - -Origin = Literal["custom", "human", "auto"] -# Target = Union[List[UUID], Dict[UUID, Origin], List[Callable]] -Target = Union[ - List[List[Dict[str, Any]]], # testcases_data - List[Callable], # workflow_handlers - List[UUID], # entity_ids - Dict[UUID, Origin], # entity_ids with origins -] - - -# oss.src.core.evaluations.types - - -class EvaluationStatus(str, Enum): - PENDING = "pending" - QUEUED = "queued" - RUNNING = "running" - SUCCESS = "success" - FAILURE = "failure" - ERRORS = "errors" - CANCELLED = "cancelled" - - -class EvaluationRunFlags(BaseModel): - is_closed: Optional[bool] = None # Indicates if the run is immutable - is_live: Optional[bool] = None # Indicates if the run is updated periodically - is_active: Optional[bool] = None # Indicates if the run is currently active - - -class SimpleEvaluationFlags(EvaluationRunFlags): - pass - - -SimpleEvaluationStatus = EvaluationStatus - - -class SimpleEvaluationData(BaseModel): - status: Optional[SimpleEvaluationStatus] = None - - query_steps: Optional[Target] = None - testset_steps: Optional[Target] = None - application_steps: Optional[Target] = None - evaluator_steps: Optional[Target] = None - - repeats: Optional[int] = None - - -class EvaluationRun(BaseModel): - id: UUID - - -class EvaluationScenario(BaseModel): - id: UUID - - run_id: UUID - - -class EvaluationResult(BaseModel): - id: UUID - - run_id: UUID - scenario_id: UUID - step_key: str - - testcase_id: Optional[UUID] = None - trace_id: Optional[UUID] = None - error: Optional[dict] = None - - flags: Optional[Dict[str, Any]] = None - tags: Optional[Dict[str, Any]] = None - meta: Optional[Dict[str, Any]] = None - - -class EvaluationMetrics(Identifier, Lifecycle): - flags: Optional[Dict[str, Any]] = None - tags: Optional[Dict[str, Any]] = None - meta: Optional[Dict[str, Any]] = None - - status: Optional[EvaluationStatus] = None - - timestamp: Optional[datetime] = None - interval: Optional[int] = None - - data: Optional[Data] = None - - scenario_id: Optional[UUID] = None - - run_id: UUID diff --git a/sdk/agenta/sdk/models/git.py b/sdk/agenta/sdk/models/git.py deleted file mode 100644 index 57c2028038..0000000000 --- a/sdk/agenta/sdk/models/git.py +++ /dev/null @@ -1,126 +0,0 @@ -from typing import List, Optional -from uuid import UUID - -from pydantic import BaseModel, Field - -from agenta.sdk.models.shared import ( - TraceID, - SpanID, - Link, - Identifier, - Slug, - Version, - Reference, - Lifecycle, - Header, - Flags, - Tags, - Meta, - Metadata, - Data, - Commit, - AliasConfig, - sync_alias, -) - - -from typing import Optional, List -from uuid import UUID - -from pydantic import BaseModel - - -# artifacts -------------------------------------------------------------------- - - -class Artifact(Identifier, Slug, Lifecycle, Header, Metadata): - pass - - -class ArtifactCreate(Slug, Header, Metadata): - pass - - -class ArtifactEdit(Identifier, Header, Metadata): - pass - - -class ArtifactQuery(Metadata): - pass - - -# variants --------------------------------------------------------------------- - - -class Variant(Identifier, Slug, Lifecycle, Header, Metadata): - artifact_id: Optional[UUID] = None - - -class VariantCreate(Slug, Header, Metadata): - artifact_id: Optional[UUID] = None - - -class VariantEdit(Identifier, Header, Metadata): - pass - - -class VariantQuery(Metadata): - pass - - -# revisions -------------------------------------------------------------------- - - -class Revision(Identifier, Slug, Version, Lifecycle, Header, Metadata, Commit): - data: Optional[Data] = None - - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - - -class RevisionCreate(Slug, Header, Metadata): - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - - -class RevisionEdit(Identifier, Header, Metadata): - pass - - -class RevisionQuery(Metadata): - authors: Optional[List[UUID]] = None - - -class RevisionCommit(Slug, Header, Metadata): - data: Optional[Data] = None - - message: Optional[str] = None - - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - - -class RevisionsLog(BaseModel): - artifact_id: Optional[UUID] = None - variant_id: Optional[UUID] = None - revision_id: Optional[UUID] = None - - depth: Optional[int] = None - - -# forks ------------------------------------------------------------------------ - - -class RevisionFork(Slug, Header, Metadata): - data: Optional[Data] = None - - message: Optional[str] = None - - -class VariantFork(Slug, Header, Metadata): - pass - - -class ArtifactFork(RevisionsLog): - variant: Optional[VariantFork] = None - revision: Optional[RevisionFork] = None diff --git a/sdk/agenta/sdk/models/shared.py b/sdk/agenta/sdk/models/shared.py deleted file mode 100644 index 4425e0fd50..0000000000 --- a/sdk/agenta/sdk/models/shared.py +++ /dev/null @@ -1,167 +0,0 @@ -from typing import Optional, Dict, List, Union, Literal -from typing_extensions import TypeAliasType -from datetime import datetime -from uuid import UUID -from re import match - -from pydantic import BaseModel, field_validator - -BoolJson = TypeAliasType( # type: ignore - "BoolJson", - Union[bool, Dict[str, "BoolJson"]], # type: ignore -) - -StringJson = TypeAliasType( # type: ignore - "StringJson", - Union[str, Dict[str, "StringJson"]], # type: ignore -) - -FullJson = TypeAliasType( # type: ignore - "FullJson", - Union[str, int, float, bool, None, Dict[str, "FullJson"], List["FullJson"]], # type: ignore -) - -NumericJson = TypeAliasType( # type: ignore - "NumericJson", - Union[int, float, Dict[str, "NumericJson"]], # type: ignore -) - -NoListJson = TypeAliasType( # type: ignore - "NoListJson", - Union[str, int, float, bool, None, Dict[str, "NoListJson"]], # type: ignore -) - -LabelJson = TypeAliasType( # type: ignore - "LabelJson", - Union[bool, str, Dict[str, "LabelJson"]], # type: ignore -) - -Json = Dict[str, FullJson] # type: ignore - -Data = Dict[str, FullJson] # type: ignore - -Flags = Dict[str, LabelJson] # type: ignore - -Tags = Dict[str, LabelJson] # type: ignore - -Meta = Dict[str, FullJson] # type: ignore - -Hashes = Dict[str, StringJson] # type: ignore - -Metrics = Dict[str, NumericJson] # type: ignore - -Schema = Dict[str, FullJson] # type: ignore - -Mappings = Dict[str, str] - - -class Lifecycle(BaseModel): - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None - - created_by_id: Optional[UUID] = None - updated_by_id: Optional[UUID] = None - deleted_by_id: Optional[UUID] = None - - -class TraceID(BaseModel): - trace_id: Optional[str] = None - - -class SpanID(BaseModel): - span_id: Optional[str] = None - - -class Link(TraceID, SpanID): - pass - - -class Identifier(BaseModel): - id: Optional[UUID] = None - - -class Slug(BaseModel): - slug: Optional[str] = None - - @field_validator("slug") - def check_url_safety(cls, v): - if v is not None: - if not match(r"^[a-zA-Z0-9_-]+$", v): - raise ValueError("slug must be URL-safe.") - return v - - -class Version(BaseModel): - version: Optional[str] = None - - -class Reference(Identifier, Slug, Version): - pass - - -class Header(BaseModel): - name: Optional[str] = None - description: Optional[str] = None - - -class Metadata(BaseModel): - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - - -class Commit(BaseModel): - author: Optional[UUID] = None - date: Optional[datetime] = None - message: Optional[str] = None - - -class Status(BaseModel): - code: Optional[int] = 200 - message: Optional[str] = "Success" - - -class AliasConfig(BaseModel): - model_config = { - "populate_by_name": True, - "from_attributes": True, - } - - -def sync_alias(primary: str, alias: str, instance: BaseModel) -> None: - primary_val = getattr(instance, primary) - alias_val = getattr(instance, alias) - - if primary_val and alias_val is None: - object.__setattr__(instance, alias, primary_val) - elif alias_val and primary_val is None: - object.__setattr__(instance, primary, alias_val) - - -class Windowing(BaseModel): - # RANGE - newest: Optional[datetime] = None - oldest: Optional[datetime] = None - # TOKEN - next: Optional[UUID] = None - # LIMIT - limit: Optional[int] = None - # ORDER - order: Optional[Literal["ascending", "descending"]] = None - # BUCKETS - interval: Optional[int] = None - # SAMPLES - rate: Optional[float] = None - - @field_validator("rate") - def check_rate(cls, v): - if v is not None and (v < 0.0 or v > 1.0): - raise ValueError("Sampling rate must be between 0.0 and 1.0.") - return v - - @field_validator("interval") - def check_interval(cls, v): - if v is not None and v <= 0: - raise ValueError("Bucket interval must be a positive integer.") - return v diff --git a/sdk/agenta/sdk/models/testsets.py b/sdk/agenta/sdk/models/testsets.py deleted file mode 100644 index 25b73f0224..0000000000 --- a/sdk/agenta/sdk/models/testsets.py +++ /dev/null @@ -1,163 +0,0 @@ -from typing import List, Optional, Dict, Any -from uuid import UUID - -from pydantic import BaseModel, Field - -from agenta.sdk.models.shared import ( - TraceID, - SpanID, - Link, - Identifier, - Slug, - Version, - Reference, - Lifecycle, - Header, - Flags, - Tags, - Meta, - Metadata, - Data, - Commit, - AliasConfig, - sync_alias, -) - -from agenta.sdk.models.git import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - VariantFork, - Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, - RevisionsLog, - RevisionFork, -) - -from agenta.sdk.models.blobs import ( - Blob, -) - - -class TestsetIdAlias(AliasConfig): - testset_id: Optional[UUID] = None - set_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_id", - ) - - -class TestsetVariantIdAlias(AliasConfig): - testset_variant_id: Optional[UUID] = None - variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="testset_variant_id", - ) - - -class Testcase(Blob, TestsetIdAlias): - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "set_id", self) - - -class TestsetFlags(BaseModel): - has_testcases: Optional[bool] = None - has_traces: Optional[bool] = None - - -class TestsetRevisionData(BaseModel): - testcase_ids: Optional[List[UUID]] = None - testcases: Optional[List[Testcase]] = None - - -class SimpleTestset( - Identifier, - Slug, - Lifecycle, - Header, -): - flags: Optional[TestsetFlags] = None - tags: Optional[Tags] = None # type: ignore - meta: Optional[Meta] = None # type: ignore - - data: Optional[TestsetRevisionData] = None - - -class Testset(Artifact): - flags: Optional[TestsetFlags] = None # type: ignore - - -class TestsetRevision( - Revision, - TestsetIdAlias, - TestsetVariantIdAlias, -): - flags: Optional[TestsetFlags] = None # type: ignore - - data: Optional[TestsetRevisionData] = None # type: ignore - - def model_post_init(self, __context) -> None: - sync_alias("testset_id", "artifact_id", self) - sync_alias("testset_variant_id", "variant_id", self) - - -class SimpleTestsetCreate(Slug, Header): - tags: Optional[Tags] = None # type: ignore - meta: Optional[Meta] = None # type: ignore - data: Optional[TestsetRevisionData] = None - - -class SimpleTestsetEdit( - Identifier, - Header, -): - # flags: Optional[TestsetFlags] = None - tags: Optional[Tags] = None # type: ignore - meta: Optional[Meta] = None # type: ignore - - data: Optional[TestsetRevisionData] = None - - -class TestsetResponse(BaseModel): - count: int = 0 - testset: Optional[Testset] = None - - -class TestsetRevisionResponse(BaseModel): - count: int = 0 - testset_revision: Optional[TestsetRevision] = None - - -class SimpleTestsetResponse(BaseModel): - count: int = 0 - testset: Optional[SimpleTestset] = None - - -class TestsetsResponse(BaseModel): - count: int = 0 - testsets: List[Testset] = [] - - -class SimpleTestsetsResponse(BaseModel): - count: int = 0 - testsets: List[SimpleTestset] = [] - - -# LEGACY TESTSETS -------------------------------------------------------------- - - -class LegacyTestset(BaseModel): - id: str - name: Optional[str] = None - csvdata: Optional[List[Dict[str, Any]]] = None diff --git a/sdk/agenta/sdk/models/tracing.py b/sdk/agenta/sdk/models/tracing.py deleted file mode 100644 index 6b13ad0e0a..0000000000 --- a/sdk/agenta/sdk/models/tracing.py +++ /dev/null @@ -1,202 +0,0 @@ -import random -import string -from enum import Enum -from datetime import datetime, timezone -from typing import List, Dict, Any, Union, Optional - -from pydantic import BaseModel, model_validator, Field - - -from agenta.sdk.models.shared import ( - Json, - Data, - Flags, - Tags, - Meta, - Metrics, - Lifecycle, - TraceID, - SpanID, - Identifier, - Reference, -) - - -class TraceType(Enum): - INVOCATION = "invocation" - ANNOTATION = "annotation" - UNKNOWN = "unknown" - - -class SpanType(Enum): - AGENT = "agent" - CHAIN = "chain" - WORKFLOW = "workflow" - TASK = "task" - TOOL = "tool" - EMBEDDING = "embedding" - QUERY = "query" - LLM = "llm" - COMPLETION = "completion" - CHAT = "chat" - RERANK = "rerank" - UNKNOWN = "unknown" - - -class AgMetricEntryAttributes(BaseModel): - cumulative: Optional[Metrics] = None - incremental: Optional[Metrics] = None - - -class AgMetricsAttributes(BaseModel): - duration: Optional[AgMetricEntryAttributes] = None - errors: Optional[AgMetricEntryAttributes] = None - tokens: Optional[AgMetricEntryAttributes] = None - costs: Optional[AgMetricEntryAttributes] = None - - -class AgTypeAttributes(BaseModel): - trace: Optional[TraceType] = TraceType.INVOCATION - span: Optional[SpanType] = SpanType.TASK - - -class AgDataAttributes(BaseModel): - inputs: Optional[Dict[str, Any]] = None - outputs: Optional[Any] = None - internals: Optional[Dict[str, Any]] = None - - -class AgAttributes(BaseModel): - type: AgTypeAttributes = Field(default_factory=AgTypeAttributes) - data: AgDataAttributes = Field(default_factory=AgDataAttributes) - - metrics: Optional[AgMetricsAttributes] = None - flags: Optional[Flags] = None - tags: Optional[Tags] = None - meta: Optional[Meta] = None - exception: Optional[Data] = None - references: Optional[Dict[str, "OTelReference"]] = None - unsupported: Optional[Data] = None - - -class OTelStatusCode(Enum): - STATUS_CODE_UNSET = "STATUS_CODE_UNSET" - STATUS_CODE_OK = "STATUS_CODE_OK" - STATUS_CODE_ERROR = "STATUS_CODE_ERROR" - - -class OTelSpanKind(Enum): - SPAN_KIND_UNSPECIFIED = "SPAN_KIND_UNSPECIFIED" - SPAN_KIND_INTERNAL = "SPAN_KIND_INTERNAL" - SPAN_KIND_SERVER = "SPAN_KIND_SERVER" - SPAN_KIND_CLIENT = "SPAN_KIND_CLIENT" - SPAN_KIND_PRODUCER = "SPAN_KIND_PRODUCER" - SPAN_KIND_CONSUMER = "SPAN_KIND_CONSUMER" - - -OTelAttributes = Json -OTelMetrics = Metrics -OTelTags = Tags - - -class OTelEvent(BaseModel): - name: str - timestamp: Union[datetime, int] - - attributes: Optional[OTelAttributes] = None - - -OTelEvents = List[OTelEvent] - - -class OTelHash(Identifier): - attributes: Optional[OTelAttributes] = None - - -OTelHashes = List[OTelHash] - - -class OTelLink(TraceID, SpanID): - attributes: Optional[OTelAttributes] = None - - -OTelLinks = List[OTelLink] - - -class OTelReference(Reference): - attributes: Optional[OTelAttributes] = None - - -OTelReferences = List[OTelReference] - - -class OTelSpansTree(BaseModel): - spans: Optional["OTelNestedSpans"] = None - - -OTelSpansTrees = List[OTelSpansTree] - - -class OTelFlatSpan(Lifecycle): - trace_id: str - span_id: str - parent_id: Optional[str] = None - - trace_type: Optional[TraceType] = None - span_type: Optional[SpanType] = None - - span_kind: Optional[OTelSpanKind] = None - span_name: Optional[str] = None - - start_time: Optional[Union[datetime, int]] = None - end_time: Optional[Union[datetime, int]] = None - - status_code: Optional[OTelStatusCode] = None - status_message: Optional[str] = None - - attributes: Optional[OTelAttributes] = None - references: Optional[OTelReferences] = None - links: Optional[OTelLinks] = None - hashes: Optional[OTelHashes] = None - - exception: Optional[Data] = None - - events: Optional[OTelEvents] = None - - @model_validator(mode="after") - def set_defaults(self): - if self.trace_type is None: - self.trace_type = TraceType.INVOCATION - if self.span_type is None: - self.span_type = SpanType.TASK - if self.span_kind is None: - self.span_kind = OTelSpanKind.SPAN_KIND_UNSPECIFIED - if self.status_code is None: - self.status_code = OTelStatusCode.STATUS_CODE_UNSET - if self.end_time is None and self.start_time is not None: - self.end_time = self.start_time - if self.start_time is None and self.end_time is not None: - self.start_time = self.end_time - if self.start_time is None and self.end_time is None: - now = datetime.now(timezone.utc) - self.start_time = now - self.end_time = now - if self.span_name is None: - self.span_name = "".join( - random.choices(string.ascii_letters + string.digits, k=8) - ) - return self - - -class OTelSpan(OTelFlatSpan, OTelSpansTree): - pass - - -OTelFlatSpans = List[OTelFlatSpan] -OTelNestedSpans = Dict[str, Union[OTelSpan, List[OTelSpan]]] -OTelTraceTree = Dict[str, OTelSpansTree] -OTelTraceTrees = List[OTelTraceTree] -OTelSpans = List[OTelSpan] - -Attributes = OTelAttributes -Trace = OTelTraceTree diff --git a/sdk/agenta/sdk/models/workflows.py b/sdk/agenta/sdk/models/workflows.py deleted file mode 100644 index 43f4350d7b..0000000000 --- a/sdk/agenta/sdk/models/workflows.py +++ /dev/null @@ -1,753 +0,0 @@ -# /agenta/sdk/models/running.py - -from typing import Any, Dict, Optional, Union, List -from uuid import UUID -from urllib.parse import urlparse - -from jsonschema.exceptions import SchemaError -from jsonschema import ( - Draft202012Validator, - Draft201909Validator, - Draft7Validator, - Draft4Validator, - Draft6Validator, -) -from pydantic import ( - BaseModel, - ConfigDict, - model_validator, - ValidationError, - Field, -) - -from agenta.sdk.models.shared import ( - TraceID, - SpanID, - Link, - Identifier, - Slug, - Reference, - Lifecycle, - Header, - Metadata, - Data, - Schema, - Status, - Commit, - AliasConfig, - sync_alias, -) - -from agenta.sdk.models.git import ( - Artifact, - ArtifactCreate, - ArtifactEdit, - ArtifactQuery, - ArtifactFork, - Variant, - VariantCreate, - VariantEdit, - VariantQuery, - VariantFork, - Revision, - RevisionCreate, - RevisionEdit, - RevisionQuery, - RevisionCommit, - RevisionsLog, - RevisionFork, -) - - -# oss.src.core.workflows.dtos -from typing import Optional, Dict, Any -from uuid import UUID, uuid4 -from urllib.parse import urlparse - -from pydantic import ( - BaseModel, - Field, - model_validator, - ValidationError, -) - -from jsonschema import ( - Draft202012Validator, - Draft201909Validator, - Draft7Validator, - Draft4Validator, - Draft6Validator, -) -from jsonschema.exceptions import SchemaError - - -class JsonSchemas(BaseModel): - parameters: Optional[Schema] = None - inputs: Optional[Schema] = None - outputs: Optional[Schema] = None - - -class WorkflowFlags(BaseModel): - is_custom: bool = False - is_evaluator: bool = False - is_human: bool = False - - -class WorkflowServiceInterface(BaseModel): - version: str = "2025.07.14" - - uri: Optional[str] = None - url: Optional[str] = None - headers: Optional[Dict[str, Union[str, Reference]]] = None - schemas: Optional[JsonSchemas] = None - - @model_validator(mode="after") - def validate_jsonschemas_and_url(self) -> "WorkflowServiceInterface": - errors = [] - - if self.schemas: - for key, schema in self.schemas.model_dump().items(): - try: - if not schema: - continue - - validator_class = self._get_validator_class_from_schema(schema) - validator_class.check_schema(schema) - except SchemaError as e: - errors.append( - { - "loc": ("schemas", key), - "msg": f"Invalid JSON Schema: {e.message}", - "type": "value_error.jsonschema", - "ctx": {"error": str(e)}, - "input": schema, - } - ) - - if self.url: - if not self._is_valid_http_url(self.url): - errors.append( - { - "loc": ("url",), - "msg": "Invalid HTTP(S) URL", - "type": "value_error.url", - "ctx": {"error": "Invalid URL format"}, - "input": self.url, - } - ) - - if errors: - raise ValidationError.from_exception_data( - self.__class__.__name__, - errors, # type: ignore - ) - - return self - - @staticmethod - def _get_validator_class_from_schema(schema: Dict[str, Any]): - """Detect JSON Schema draft from $schema or fallback to 2020-12.""" - schema_uri = schema.get( - "$schema", "https://json-schema.org/draft/2020-12/schema" - ) - if "2020-12" in schema_uri: - return Draft202012Validator - elif "2019-09" in schema_uri: - return Draft201909Validator - elif "draft-07" in schema_uri: - return Draft7Validator - elif "draft-06" in schema_uri: - return Draft6Validator - elif "draft-04" in schema_uri: - return Draft4Validator - else: - return Draft202012Validator - - @staticmethod - def _is_valid_http_url(url: str) -> bool: - parsed = urlparse(url) - return parsed.scheme in ("http", "https") and bool(parsed.netloc) - - -class WorkflowServiceConfiguration(BaseModel): - script: Optional[Data] = None - parameters: Optional[Data] = None - - -class WorkflowRevisionData( - WorkflowServiceInterface, - WorkflowServiceConfiguration, -): - pass - - -class WorkflowServiceStatus(Status): - type: Optional[str] = None - stacktrace: Optional[Union[list[str], str]] = None - - -class WorkflowServiceRequestData(BaseModel): - revision: Optional[dict] = None - parameters: Optional[dict] = None - # - testcase: Optional[dict] = None - inputs: Optional[dict] = None - # - trace: Optional[dict] = None - outputs: Optional[Any] = None - - -class WorkflowServiceResponseData(BaseModel): - outputs: Optional[Any] = None - - -class WorkflowServiceBaseRequest(Metadata): - version: str = "2025.07.14" - - interface: Optional[Union[WorkflowServiceInterface, Dict[str, Any]]] = None - configuration: Optional[Union[WorkflowServiceConfiguration, Dict[str, Any]]] = None - - references: Optional[Dict[str, Union[Reference, Dict[str, Any]]]] = None - links: Optional[Dict[str, Union[Link, Dict[str, Any]]]] = None - - secrets: Optional[Dict[str, Any]] = None - credentials: Optional[str] = None - - @model_validator(mode="before") - def _coerce_nested_models(cls, values: Dict[str, Any]) -> Dict[str, Any]: - """Convert dicts into their respective Pydantic models.""" - if "interface" in values and isinstance(values["interface"], dict): - values["interface"] = WorkflowServiceInterface(**values["interface"]) - - if "configuration" in values and isinstance(values["configuration"], dict): - values["configuration"] = WorkflowServiceConfiguration( - **values["configuration"] - ) - - if "references" in values and isinstance(values["references"], dict): - values["references"] = { - k: (Reference(**v) if isinstance(v, dict) else v) - for k, v in values["references"].items() - } - - if "links" in values and isinstance(values["links"], dict): - values["links"] = { - k: (Link(**v) if isinstance(v, dict) else v) - for k, v in values["links"].items() - } - - return values - - -class WorkflowServiceRequest(WorkflowServiceBaseRequest): - data: Optional[WorkflowServiceRequestData] = None - - -class WorkflowServiceBaseResponse(TraceID, SpanID): - version: str = "2025.07.14" - - status: Optional[WorkflowServiceStatus] = WorkflowServiceStatus() - - -class WorkflowServiceBatchResponse(WorkflowServiceBaseResponse): - data: Optional[WorkflowServiceResponseData] = None - - -class WorkflowServiceStreamResponse(WorkflowServiceBaseResponse): - generator: Any # Callable[[], AsyncGenerator[Any, None]] - - model_config = ConfigDict(arbitrary_types_allowed=True) - - async def iterator(self): - async for item in self.generator(): - yield item - - -WorkflowServiceResponse = Union[ - WorkflowServiceBatchResponse, - WorkflowServiceStreamResponse, -] - - -# aliases ---------------------------------------------------------------------- - - -class WorkflowIdAlias(AliasConfig): - workflow_id: Optional[UUID] = None - artifact_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_id", - ) - - -class WorkflowVariantIdAlias(AliasConfig): - workflow_variant_id: Optional[UUID] = None - variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_variant_id", - ) - - -class WorkflowRevisionIdAlias(AliasConfig): - workflow_revision_id: Optional[UUID] = None - revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="workflow_revision_id", - ) - - -# workflows -------------------------------------------------------------------- - - -class Workflow(Artifact): - flags: Optional[WorkflowFlags] = None - - -class WorkflowCreate(ArtifactCreate): - flags: Optional[WorkflowFlags] = None - - -class WorkflowEdit(ArtifactEdit): - flags: Optional[WorkflowFlags] = None - - -# workflow variants ------------------------------------------------------------ - - -class WorkflowVariant( - Variant, - WorkflowIdAlias, -): - flags: Optional[WorkflowFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - - -class WorkflowVariantCreate( - VariantCreate, - WorkflowIdAlias, -): - flags: Optional[WorkflowFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - - -class WorkflowVariantEdit(VariantEdit): - flags: Optional[WorkflowFlags] = None - - -class WorkflowVariantQuery(VariantQuery): - flags: Optional[WorkflowFlags] = None - - -# workflow revisions ----------------------------------------------------------- - -from agenta.sdk.models.workflows import WorkflowRevisionData - - -class WorkflowRevision( - Revision, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): - flags: Optional[WorkflowFlags] = None - - data: Optional[WorkflowRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - - -class WorkflowRevisionCreate( - RevisionCreate, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): - flags: Optional[WorkflowFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - - -class WorkflowRevisionEdit(RevisionEdit): - flags: Optional[WorkflowFlags] = None - - -class WorkflowRevisionQuery(RevisionQuery): - flags: Optional[WorkflowFlags] = None - - -class WorkflowRevisionCommit( - RevisionCommit, - WorkflowIdAlias, - WorkflowVariantIdAlias, -): - flags: Optional[WorkflowFlags] = None - - data: Optional[WorkflowRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - - -class WorkflowRevisionsLog( - RevisionsLog, - WorkflowIdAlias, - WorkflowVariantIdAlias, - WorkflowRevisionIdAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - sync_alias("workflow_revision_id", "revision_id", self) - - -# forks ------------------------------------------------------------------------ - - -class WorkflowRevisionFork(RevisionFork): - flags: Optional[WorkflowFlags] = None - - data: Optional[WorkflowRevisionData] = None - - -class WorkflowRevisionForkAlias(AliasConfig): - workflow_revision: Optional[WorkflowRevisionFork] = None - - revision: Optional[RevisionFork] = Field( - default=None, - exclude=True, - alias="workflow_revision", - ) - - -class WorkflowVariantFork(VariantFork): - flags: Optional[WorkflowFlags] = None - - -class WorkflowVariantForkAlias(AliasConfig): - workflow_variant: Optional[WorkflowVariantFork] = None - - variant: Optional[VariantFork] = Field( - default=None, - exclude=True, - alias="workflow_variant", - ) - - -class WorkflowFork( - ArtifactFork, - WorkflowIdAlias, - WorkflowVariantIdAlias, - WorkflowVariantForkAlias, - WorkflowRevisionIdAlias, - WorkflowRevisionForkAlias, -): - def model_post_init(self, __context) -> None: - sync_alias("workflow_id", "artifact_id", self) - sync_alias("workflow_variant_id", "variant_id", self) - sync_alias("workflow_variant", "variant", self) - sync_alias("workflow_revision_id", "revision_id", self) - sync_alias("workflow_revision", "revision", self) - - -# ------------------------------------------------------------------------------ - - -class EvaluatorRevision(BaseModel): - id: Optional[UUID] = None - slug: Optional[str] = None - version: Optional[str] = None - - data: Optional[WorkflowRevisionData] = None - - evaluator_id: Optional[UUID] = None - evaluator_variant_id: Optional[UUID] = None - - -class ApplicationServiceRequest(WorkflowServiceRequest): - pass - - -class ApplicationServiceBatchResponse(WorkflowServiceBatchResponse): - pass - - -class EvaluatorServiceRequest(WorkflowServiceRequest): - pass - - -class EvaluatorServiceBatchResponse(WorkflowServiceBatchResponse): - pass - - -# oss.src.core.evaluators.dtos - - -class EvaluatorIdAlias(AliasConfig): - evaluator_id: Optional[UUID] = None - workflow_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="evaluator_id", - ) - - -class EvaluatorVariantIdAlias(AliasConfig): - evaluator_variant_id: Optional[UUID] = None - workflow_variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="evaluator_variant_id", - ) - - -class EvaluatorRevisionData(WorkflowRevisionData): - pass - - -class EvaluatorFlags(WorkflowFlags): - def __init__(self, **data): - data["is_evaluator"] = True - - super().__init__(**data) - - -class SimpleEvaluatorFlags(EvaluatorFlags): - pass - - -class SimpleEvaluatorData(EvaluatorRevisionData): - pass - - -class Evaluator(Workflow): - flags: Optional[EvaluatorFlags] = None - - -class SimpleEvaluatorRevision( - WorkflowRevision, - EvaluatorIdAlias, - EvaluatorVariantIdAlias, -): - flags: Optional[EvaluatorFlags] = None - - data: Optional[EvaluatorRevisionData] = None - - -class SimpleEvaluator(Identifier, Slug, Lifecycle, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorCreate(Slug, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorEdit(Identifier, Header, Metadata): - flags: Optional[SimpleEvaluatorFlags] = None - - data: Optional[SimpleEvaluatorData] = None - - -class SimpleEvaluatorResponse(BaseModel): - count: int = 0 - evaluator: Optional[SimpleEvaluator] = None - - -class EvaluatorRevisionResponse(BaseModel): - count: int = 0 - evaluator_revision: Optional[EvaluatorRevision] = None - - -# oss.src.core.applications.dtos - -# aliases ---------------------------------------------------------------------- - - -class ApplicationIdAlias(AliasConfig): - application_id: Optional[UUID] = None - workflow_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_id", - ) - - -class ApplicationVariantIdAlias(AliasConfig): - application_variant_id: Optional[UUID] = None - workflow_variant_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_variant_id", - ) - - -class ApplicationRevisionIdAlias(AliasConfig): - application_revision_id: Optional[UUID] = None - workflow_revision_id: Optional[UUID] = Field( - default=None, - exclude=True, - alias="application_revision_id", - ) - - -# globals ---------------------------------------------------------------------- - - -class ApplicationFlags(WorkflowFlags): - def __init__(self, **data): - data["is_evaluator"] = False - - super().__init__(**data) - - -# applications ------------------------------------------------------------------- - - -class Application(Workflow): - flags: Optional[ApplicationFlags] = None - - -class ApplicationCreate(WorkflowCreate): - flags: Optional[ApplicationFlags] = None - - -class ApplicationEdit(WorkflowEdit): - flags: Optional[ApplicationFlags] = None - - -# application variants ----------------------------------------------------------- - - -class ApplicationVariant( - WorkflowVariant, - ApplicationIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - - -class ApplicationVariantCreate( - WorkflowVariantCreate, - ApplicationIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - - -class ApplicationVariantEdit(WorkflowVariantEdit): - flags: Optional[ApplicationFlags] = None - - -# application revisions ----------------------------------------------------- - - -class ApplicationRevisionData(WorkflowRevisionData): - pass - - -class ApplicationRevision( - WorkflowRevision, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - data: Optional[ApplicationRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionCreate( - WorkflowRevisionCreate, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionEdit(WorkflowRevisionEdit): - flags: Optional[ApplicationFlags] = None - - -class ApplicationRevisionCommit( - WorkflowRevisionCommit, - ApplicationIdAlias, - ApplicationVariantIdAlias, -): - flags: Optional[ApplicationFlags] = None - - data: Optional[ApplicationRevisionData] = None - - def model_post_init(self, __context) -> None: - sync_alias("application_id", "workflow_id", self) - sync_alias("application_variant_id", "workflow_variant_id", self) - - -class ApplicationRevisionResponse(BaseModel): - count: int = 0 - application_revision: Optional[ApplicationRevision] = None - - -class ApplicationRevisionsResponse(BaseModel): - count: int = 0 - application_revisions: List[ApplicationRevision] = [] - - -# simple applications ------------------------------------------------------------ - - -class LegacyApplicationFlags(WorkflowFlags): - pass - - -class LegacyApplicationData(WorkflowRevisionData): - pass - - -class LegacyApplication(Identifier, Slug, Lifecycle, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationCreate(Slug, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationEdit(Identifier, Header, Metadata): - flags: Optional[LegacyApplicationFlags] = None - - data: Optional[LegacyApplicationData] = None - - -class LegacyApplicationResponse(BaseModel): - count: int = 0 - application: Optional[LegacyApplication] = None - - -# end of oss.src.core.applications.dtos diff --git a/sdk/agenta/sdk/tracing/attributes.py b/sdk/agenta/sdk/tracing/attributes.py index 4fd99c00b9..bdc042c9bb 100644 --- a/sdk/agenta/sdk/tracing/attributes.py +++ b/sdk/agenta/sdk/tracing/attributes.py @@ -6,7 +6,7 @@ Attribute = Union[Primitive, PrimitivesSequence] -def _marshall( +def _marshal( unmarshalled: Dict[str, Any], *, parent_key: Optional[str] = "", @@ -59,7 +59,7 @@ def _marshall( dict_key = child_key marshalled.update( - _marshall( + _marshal( value, parent_key=dict_key, depth=depth + 1, @@ -76,7 +76,7 @@ def _marshall( if isinstance(item, (dict, list)): marshalled.update( - _marshall( + _marshal( item, parent_key=list_key, depth=depth + 1, @@ -177,7 +177,7 @@ def serialize( k: v for k, v in { _encode_key(namespace, key): _encode_value(value) - for key, value in _marshall(attributes, max_depth=max_depth).items() + for key, value in _marshal(attributes, max_depth=max_depth).items() }.items() if v is not None } diff --git a/sdk/agenta/sdk/tracing/exporters.py b/sdk/agenta/sdk/tracing/exporters.py index a121bd857a..4cedc0775e 100644 --- a/sdk/agenta/sdk/tracing/exporters.py +++ b/sdk/agenta/sdk/tracing/exporters.py @@ -1,7 +1,4 @@ -from typing import Sequence, Dict, List, Optional, Any -from threading import Thread -from os import environ -from uuid import UUID +from typing import Sequence, Dict, List, Optional from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from opentelemetry.sdk.trace.export import ( @@ -11,21 +8,18 @@ ReadableSpan, ) -from agenta.sdk.utils.constants import TRUTHY -from agenta.sdk.utils.logging import get_module_logger from agenta.sdk.utils.exceptions import suppress -from agenta.sdk.utils.cache import TTLLRUCache -from agenta.sdk.contexts.tracing import ( - otlp_context_manager, - otlp_context, - OTLPContext, +from agenta.sdk.context.exporting import ( + exporting_context_manager, + exporting_context, + ExportingContext, ) +from agenta.sdk.utils.cache import TTLLRUCache +from agenta.sdk.utils.logging import get_module_logger log = get_module_logger(__name__) -_ASYNC_EXPORT = environ.get("AGENTA_OTLP_ASYNC_EXPORT", "true").lower() in TRUTHY - class InlineTraceExporter(SpanExporter): def __init__( @@ -51,8 +45,6 @@ def export( self._registry[trace_id].append(span) - return - def shutdown(self) -> None: self._shutdown = True @@ -92,38 +84,28 @@ def __init__( self.credentials = credentials def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: - grouped_spans: Dict[Optional[str], List[ReadableSpan]] = dict() + grouped_spans: Dict[str, List[str]] = {} for span in spans: trace_id = span.get_span_context().trace_id credentials = None if self.credentials: - credentials = str(self.credentials.get(trace_id)) + credentials = self.credentials.get(trace_id) if credentials not in grouped_spans: - grouped_spans[credentials] = list() + grouped_spans[credentials] = [] grouped_spans[credentials].append(span) serialized_spans = [] for credentials, _spans in grouped_spans.items(): - with otlp_context_manager( - context=OTLPContext( + with exporting_context_manager( + context=ExportingContext( credentials=credentials, ) ): - for _span in _spans: - trace_id = _span.get_span_context().trace_id - span_id = _span.get_span_context().span_id - - # log.debug( - # "[SPAN] [EXPORT]", - # trace_id=UUID(int=trace_id).hex, - # span_id=UUID(int=span_id).hex[-16:], - # ) - serialized_spans.append(super().export(_spans)) if all(serialized_spans): @@ -131,49 +113,13 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: else: return SpanExportResult.FAILURE - def _export(self, serialized_data: bytes, timeout_sec: Optional[float] = None): - try: - credentials = otlp_context.get().credentials - - if credentials: - self._session.headers.update({"Authorization": credentials}) - - def __export(): - with suppress(): - resp = None - if timeout_sec is not None: - resp = super(OTLPExporter, self)._export( - serialized_data, - timeout_sec, - ) - else: - resp = super(OTLPExporter, self)._export( - serialized_data, - ) - - # log.debug( - # "[SPAN] [_EXPORT]", - # data=serialized_data, - # resp=resp, - # ) - - if _ASYNC_EXPORT is True: - # log.debug("[SPAN] [ASYNC.X]") - thread = Thread(target=__export, daemon=True) - thread.start() - else: - # log.debug("[SPAN] [ SYNC.X]") - return __export() - - except Exception as e: - log.error(f"Export failed with error: {e}", exc_info=True) - - finally: - - class Response: - ok = True - - return Response() + def _export(self, serialized_data: bytes): + credentials = exporting_context.get().credentials + + if credentials: + self._session.headers.update({"Authorization": credentials}) + + return super()._export(serialized_data) ConsoleExporter = ConsoleSpanExporter diff --git a/sdk/agenta/sdk/tracing/inline.py b/sdk/agenta/sdk/tracing/inline.py index 7400cde35c..fc97354048 100644 --- a/sdk/agenta/sdk/tracing/inline.py +++ b/sdk/agenta/sdk/tracing/inline.py @@ -62,7 +62,6 @@ class StatusDTO(BaseModel): class TreeType(Enum): # --- VARIANTS --- # INVOCATION = "invocation" - ANNOTATION = "annotation" # --- VARIANTS --- # @@ -532,11 +531,11 @@ def _connect_tree_dfs( from copy import copy -def _unmarshall_attributes( +def _unmarshal_attributes( marshalled: Dict[str, Any], ) -> Dict[str, Any]: """ - Unmarshalls a dictionary of marshalled attributes into a nested dictionary + Unmarshals a dictionary of marshalled attributes into a nested dictionary Example: marshalled = { @@ -566,34 +565,42 @@ def _unmarshall_attributes( for key, value in marshalled.items(): keys = key.split(".") - current = unmarshalled - - for i, key in enumerate(keys): - is_last = i == len(keys) - 1 - next_key = keys[i + 1] if not is_last else None - is_index = key.isdigit() - key = int(key) if is_index else key - - if is_last: - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append(None) - current[key] = value - elif isinstance(current, dict): - current[key] = value + + level = unmarshalled + + for i, part in enumerate(keys[:-1]): + if part.isdigit(): + part = int(part) + + if not isinstance(level, list): + level = [] + + while len(level) <= part: + level.append({}) + + level = level[part] + else: - next_is_index = next_key.isdigit() if next_key else False - - if isinstance(current, list) and isinstance(key, int): - while len(current) <= key: - current.append([] if next_is_index else {}) - if current[key] is None: - current[key] = [] if next_is_index else {} - current = current[key] - elif isinstance(current, dict): - if key not in current: - current[key] = [] if next_is_index else {} - current = current[key] + if part not in level: + level[part] = {} if not keys[i + 1].isdigit() else [] + + level = level[part] + + last_key = keys[-1] + + if last_key.isdigit(): + last_key = int(last_key) + + if not isinstance(level, list): + level = [] + + while len(level) <= last_key: + level.append(None) + + level[last_key] = value + + else: + level[last_key] = value return unmarshalled @@ -742,7 +749,7 @@ def _parse_from_attributes( for key in _data.keys(): del otel_span_dto.attributes[_encode_key("data", key)] - # _data = _unmarshall_attributes(_data) + # _data = _unmarshal_attributes(_data) _data = _data if _data else None # METRICS @@ -751,7 +758,7 @@ def _parse_from_attributes( for key in _metrics.keys(): del otel_span_dto.attributes[_encode_key("metrics", key)] - # _metrics = _unmarshall_attributes(_metrics) + # _metrics = _unmarshal_attributes(_metrics) _metrics = _metrics if _metrics else None # META @@ -760,7 +767,7 @@ def _parse_from_attributes( for key in _meta.keys(): del otel_span_dto.attributes[_encode_key("meta", key)] - # _meta = _unmarshall_attributes(_meta) + # _meta = _unmarshal_attributes(_meta) _meta = _meta if _meta else None # TAGS @@ -896,7 +903,7 @@ def parse_to_agenta_span_dto( ) -> SpanDTO: # DATA if span_dto.data: - span_dto.data = _unmarshall_attributes(span_dto.data) + span_dto.data = _unmarshal_attributes(span_dto.data) if "outputs" in span_dto.data: if "__default__" in span_dto.data["outputs"]: @@ -904,19 +911,19 @@ def parse_to_agenta_span_dto( # METRICS if span_dto.metrics: - span_dto.metrics = _unmarshall_attributes(span_dto.metrics) + span_dto.metrics = _unmarshal_attributes(span_dto.metrics) # META if span_dto.meta: - span_dto.meta = _unmarshall_attributes(span_dto.meta) + span_dto.meta = _unmarshal_attributes(span_dto.meta) # TAGS if span_dto.tags: - span_dto.tags = _unmarshall_attributes(span_dto.tags) + span_dto.tags = _unmarshal_attributes(span_dto.tags) # REFS if span_dto.refs: - span_dto.refs = _unmarshall_attributes(span_dto.refs) + span_dto.refs = _unmarshal_attributes(span_dto.refs) if isinstance(span_dto.links, list): for link in span_dto.links: @@ -1002,21 +1009,18 @@ def parse_inline_trace( ############################################## spans = [ - span_dto.model_dump( - mode="json", - exclude_none=True, - exclude_defaults=True, + loads( + span_dto.model_dump_json( + exclude_none=True, + exclude_defaults=True, + ) ) for span_dto in agenta_span_dtos ] inline_trace = AgentaNodesResponse( version="1.0.0", nodes=[AgentaNodeDto(**span) for span in spans], - ).model_dump( - mode="json", - exclude_none=True, - exclude_unset=True, - ) + ).model_dump(exclude_none=True, exclude_unset=True) return inline_trace diff --git a/sdk/agenta/sdk/tracing/processors.py b/sdk/agenta/sdk/tracing/processors.py index 88c2f40a12..8cbc2701df 100644 --- a/sdk/agenta/sdk/tracing/processors.py +++ b/sdk/agenta/sdk/tracing/processors.py @@ -1,7 +1,5 @@ from typing import Optional, Dict, List from threading import Lock -from json import dumps -from uuid import UUID from opentelemetry.baggage import get_all as get_baggage from opentelemetry.context import Context @@ -10,18 +8,19 @@ SpanExporter, ReadableSpan, BatchSpanProcessor, + _DEFAULT_MAX_QUEUE_SIZE, + _DEFAULT_SCHEDULE_DELAY_MILLIS, + _DEFAULT_MAX_EXPORT_BATCH_SIZE, + _DEFAULT_EXPORT_TIMEOUT_MILLIS, ) -from opentelemetry.trace import SpanContext from agenta.sdk.utils.logging import get_module_logger from agenta.sdk.tracing.conventions import Reference -from agenta.sdk.contexts.tracing import TracingContext - log = get_module_logger(__name__) -class TraceProcessor(SpanProcessor): +class TraceProcessor(BatchSpanProcessor): def __init__( self, span_exporter: SpanExporter, @@ -32,38 +31,29 @@ def __init__( max_export_batch_size: int = None, export_timeout_millis: float = None, ): + super().__init__( + span_exporter, + _DEFAULT_MAX_QUEUE_SIZE, + 5 * 1000 if inline else _DEFAULT_SCHEDULE_DELAY_MILLIS, # < 5 seconds + _DEFAULT_MAX_EXPORT_BATCH_SIZE, + 500 if inline else _DEFAULT_EXPORT_TIMEOUT_MILLIS, # < 1 second + ) + self.references = references or dict() self.inline = inline is True - self._registry = dict() - self._exporter = span_exporter - self._spans: Dict[int, List[ReadableSpan]] = dict() - - # --- DISTRIBUTED - if not self.inline: - self._delegate = BatchSpanProcessor( - span_exporter, - max_queue_size, - schedule_delay_millis, - max_export_batch_size, - export_timeout_millis, - ) - # --- DISTRIBUTED + # --- INLINE + if self.inline: + self._registry = dict() + self._exporter = span_exporter + self._spans: Dict[int, List[ReadableSpan]] = dict() + # --- INLINE def on_start( self, span: Span, parent_context: Optional[Context] = None, ) -> None: - trace_id = span.context.trace_id - span_id = span.context.span_id - - # log.debug( - # "[SPAN] [START] ", - # trace_id=UUID(int=trace_id).hex, - # span_id=UUID(int=span_id).hex[-16:], - # ) - for key in self.references.keys(): span.set_attribute(f"ag.refs.{key}", self.references[key]) @@ -75,155 +65,64 @@ def on_start( if _key in [_.value for _ in Reference.__members__.values()]: span.set_attribute(key, baggage[key]) - context = TracingContext.get() - - trace_type = span.attributes.get("trace_type") if span.attributes else None - - context.annotate = ( - context.annotate - or (context.type == "annotation") - or (trace_type == "annotation") - ) - context.type = ( - (str(trace_type) if trace_type else None) - or context.type - or ("annotation" if context.annotate else "invocation") - ) - - span.set_attribute("ag.type.tree", context.type) - - if context.flags: - for key in context.flags.keys(): - span.set_attribute(f"ag.flags.{key}", context.flags[key]) - # if context.tags: - # for key in context.tags.keys(): - # span.set_attribute(f"ag.tags.{key}", context.tags[key]) - # if context.meta: - # span.set_attribute(f"ag.meta.", dumps(context.meta)) + # --- INLINE + if self.inline: + if span.context.trace_id not in self._registry: + self._registry[span.context.trace_id] = dict() - # --- DISTRIBUTED - if not self.inline: - if context.links: - for key, link in context.links.items(): - try: - link = link.model_dump(mode="json", exclude_none=True) - except: # pylint: disable=bare-except - pass - if not isinstance(link, dict): - continue - if not link.get("trace_id") or not link.get("span_id"): - continue - - span.add_link( - context=SpanContext( - trace_id=int(str(link.get("trace_id")), 16), - span_id=int(str(link.get("span_id")), 16), - is_remote=True, - ), - attributes=dict( - key=str(key), - ), - ) - - if context.references: - for key, ref in context.references.items(): - try: - ref = ref.model_dump(mode="json", exclude_none=True) - except: # pylint: disable=bare-except - pass - if not isinstance(ref, dict): - continue - if not ref.get("id") and not ref.get("slug") and not ref.get("version"): - continue - - if ref.get("id"): - span.set_attribute( - f"ag.refs.{key}.id", - str(ref.get("id")), - ) - if ref.get("slug"): - span.set_attribute( - f"ag.refs.{key}.slug", - str(ref.get("slug")), - ) - if ref.get("version"): - span.set_attribute( - f"ag.refs.{key}.version", - str(ref.get("version")), - ) - - trace_id = span.context.trace_id - span_id = span.context.span_id - - self._registry.setdefault(trace_id, {}) - self._registry[trace_id][span_id] = True + self._registry[span.context.trace_id][span.context.span_id] = True + # --- INLINE def on_end( self, span: ReadableSpan, ): - trace_id = span.context.trace_id - span_id = span.context.span_id - - # log.debug( - # "[SPAN] [END] ", - # trace_id=UUID(int=trace_id).hex, - # span_id=UUID(int=span_id).hex[-16:], - # ) - - self._spans.setdefault(trace_id, []).append(span) - self._registry.setdefault(trace_id, {}) - self._registry[trace_id].pop(span_id, None) - - if not self._registry[trace_id]: - spans = self._spans.pop(trace_id, []) - self._registry.pop(trace_id, None) + # --- INLINE + if self.inline: + if self.done: + return - # --- INLINE - if self.inline: - self._exporter.export(spans) - # --- INLINE + if span.context.trace_id not in self._spans: + self._spans[span.context.trace_id] = list() - # --- DISTRIBUTED - else: - for span in spans: - self._delegate.on_end(span) + self._spans[span.context.trace_id].append(span) - self._delegate.force_flush() - # --- DISTRIBUTED + del self._registry[span.context.trace_id][span.context.span_id] - def force_flush( - self, - timeout_millis: int = None, - ) -> bool: - # --- INLINE - if self.inline: - try: - ret = self._exporter.force_flush(timeout_millis) - except: # pylint: disable=bare-except - ret = True + if len(self._registry[span.context.trace_id]) == 0: + self.export(span.context.trace_id) # --- INLINE # --- DISTRIBUTED else: - ret = self._delegate.force_flush(timeout_millis) + super().on_end(span) # --- DISTRIBUTED - if not ret: - log.warning("Agenta - Skipping export due to timeout.") - - return ret - - def shutdown(self) -> None: + def export( + self, + trace_id: int, + ): # --- INLINE if self.inline: - self._exporter.shutdown() + spans = self._spans[trace_id] + + for span in spans: + self.queue.appendleft(span) + + with self.condition: + self.condition.notify() + + del self._spans[trace_id] # --- INLINE - # --- DISTRIBUTED - else: - self._delegate.shutdown() - # --- DISTRIBUTED + def force_flush( + self, + timeout_millis: int = None, + ) -> bool: + ret = super().force_flush(timeout_millis) + + if not ret: + log.warning("Agenta - Skipping export due to timeout.") def is_ready( self, diff --git a/sdk/agenta/sdk/tracing/propagation.py b/sdk/agenta/sdk/tracing/propagation.py index 8327c27ef1..32da48b322 100644 --- a/sdk/agenta/sdk/tracing/propagation.py +++ b/sdk/agenta/sdk/tracing/propagation.py @@ -6,8 +6,6 @@ from opentelemetry.baggage import set_baggage from opentelemetry.context import get_current -from agenta.sdk.contexts.tracing import TracingContext - import agenta as ag @@ -74,7 +72,7 @@ def inject( _context = get_current() - ctx = TracingContext.get() + ctx = ag.sdk.context.tracing.tracing_context.get() # --- Inject traceparent --- # try: diff --git a/sdk/agenta/sdk/tracing/spans.py b/sdk/agenta/sdk/tracing/spans.py index 5145d6cbbf..eaee49b0f8 100644 --- a/sdk/agenta/sdk/tracing/spans.py +++ b/sdk/agenta/sdk/tracing/spans.py @@ -35,10 +35,6 @@ def __init__( ## --- PROXY METHODS --- ## - @property - def name(self) -> str: - return self._span.name - def get_span_context(self): return self._span.get_span_context() diff --git a/sdk/agenta/sdk/tracing/tracing.py b/sdk/agenta/sdk/tracing/tracing.py index 5f9c082d41..4a343d85af 100644 --- a/sdk/agenta/sdk/tracing/tracing.py +++ b/sdk/agenta/sdk/tracing/tracing.py @@ -1,7 +1,9 @@ from typing import Optional, Any, Dict, Callable from enum import Enum +from uuid import UUID from pydantic import BaseModel +from httpx import get as check from opentelemetry.trace import ( @@ -31,6 +33,7 @@ from agenta.sdk.tracing.propagation import extract, inject from agenta.sdk.utils.cache import TTLLRUCache +from agenta.sdk.context.tracing import tracing_context log = get_module_logger(__name__) @@ -52,6 +55,8 @@ class Link(BaseModel): class Tracing(metaclass=Singleton): + VERSION = "0.1.0" + Status = Status StatusCode = StatusCode @@ -99,9 +104,27 @@ def configure( resource=Resource(attributes={"service.name": "agenta-sdk"}) ) + # --- INLINE + if inline: + # TRACE PROCESSORS -- INLINE + self.inline = TraceProcessor( + InlineExporter( + registry=self.inline_spans, + ), + references=self.references, + inline=inline, + ) + self.tracer_provider.add_span_processor(self.inline) + # --- INLINE + # TRACE PROCESSORS -- OTLP try: log.info("Agenta - OLTP URL: %s", self.otlp_url) + # check( + # self.otlp_url, + # headers=self.headers, + # timeout=1, + # ) _otlp = TraceProcessor( OTLPExporter( @@ -116,19 +139,6 @@ def configure( except: # pylint: disable=bare-except log.warning("Agenta - OLTP unreachable, skipping exports.") - # --- INLINE - if inline: - # TRACE PROCESSORS -- INLINE - self.inline = TraceProcessor( - InlineExporter( - registry=self.inline_spans, - ), - references=self.references, - inline=inline, - ) - self.tracer_provider.add_span_processor(self.inline) - # --- INLINE - # GLOBAL TRACER PROVIDER -- INSTRUMENTATION LIBRARIES set_tracer_provider(self.tracer_provider) # TRACER diff --git a/sdk/agenta/sdk/types.py b/sdk/agenta/sdk/types.py index da45b2c9b8..3792744736 100644 --- a/sdk/agenta/sdk/types.py +++ b/sdk/agenta/sdk/types.py @@ -5,9 +5,6 @@ from pydantic import ConfigDict, BaseModel, HttpUrl from pydantic import BaseModel, Field, model_validator -from starlette.responses import StreamingResponse - - from agenta.sdk.assets import supported_llm_models from agenta.client.backend.types import AgentaNodesResponse, AgentaNodeDto @@ -21,19 +18,13 @@ def MCField( # pylint: disable=invalid-name default: str, choices: Union[List[str], Dict[str, List[str]]], ) -> Field: - # Pydantic 2.12+ no longer allows post-creation mutation of field properties + field = Field(default=default, description="ID of the model to use") if isinstance(choices, dict): - json_extra = {"choices": choices, "x-parameter": "grouped_choice"} + field.json_schema_extra = {"choices": choices, "x-parameter": "grouped_choice"} elif isinstance(choices, list): - json_extra = {"choices": choices, "x-parameter": "choice"} - else: - json_extra = {} - - return Field( - default=default, - description="ID of the model to use", - json_schema_extra=json_extra, - ) + field.json_schema_extra = {"choices": choices, "x-parameter": "choice"} + + return field class LLMTokenUsage(BaseModel): @@ -54,42 +45,6 @@ class BaseResponse(BaseModel): model_config = ConfigDict(use_enum_values=True, exclude_none=True) -class StreamResponse(StreamingResponse): - def __init__( - self, - content, - media_type: str = "text/event-stream", - *, - version: Optional[str] = "3.0", - tree_id: Optional[str] = None, - trace_id: Optional[str] = None, - span_id: Optional[str] = None, - content_type: Optional[str] = None, - extra_headers: Optional[Dict[str, str]] = None, - status_code: int = 200, - background=None, - ): - headers = dict(extra_headers or {}) - if version is not None: - headers["x-ag-version"] = version - if content_type: - headers["x-ag-content-type"] = content_type - if tree_id: - headers["x-ag-tree-id"] = tree_id - if trace_id: - headers["x-ag-trace-id"] = trace_id - if span_id: - headers["x-ag-span-id"] = span_id - - super().__init__( - content=content, - media_type=media_type, - status_code=status_code, - headers=headers, - background=background, - ) - - class DictInput(dict): def __new__(cls, default_keys: Optional[List[str]] = None): instance = super().__new__(cls, default_keys) @@ -320,27 +275,9 @@ class ToolCall(BaseModel): function: Dict[str, str] -class ImageURL(BaseModel): - url: str - detail: Optional[Literal["auto", "low", "high"]] = None - - -class ContentPartText(BaseModel): - type: Literal["text"] = "text" - text: str - - -class ContentPartImage(BaseModel): - type: Literal["image_url"] = "image_url" - image_url: ImageURL - - -ContentPart = Union[ContentPartText, ContentPartImage] - - class Message(BaseModel): role: Literal["system", "user", "assistant", "tool", "function"] - content: Optional[Union[str, List[ContentPart]]] = None + content: Optional[str] = None name: Optional[str] = None tool_calls: Optional[List[ToolCall]] = None tool_call_id: Optional[str] = None @@ -387,7 +324,7 @@ class ModelConfig(BaseModel): """Configuration for model parameters""" model: str = MCField( - default="gpt-4o-mini", + default="gpt-3.5-turbo", choices=supported_llm_models, ) @@ -462,154 +399,6 @@ def __init__(self, message: str, original_error: Optional[Exception] = None): super().__init__(message) -import json -import re -from typing import Any, Dict, Iterable, Tuple, Optional - -# --- Optional dependency: python-jsonpath (provides JSONPath + JSON Pointer) --- -try: - import jsonpath # ✅ use module API - from jsonpath import JSONPointer # pointer class is fine to use -except Exception: - jsonpath = None - JSONPointer = None - -# ========= Scheme detection ========= - - -def detect_scheme(expr: str) -> str: - """Return 'json-path', 'json-pointer', or 'dot-notation' based on the placeholder prefix.""" - if expr.startswith("$"): - return "json-path" - if expr.startswith("/"): - return "json-pointer" - return "dot-notation" - - -# ========= Resolvers ========= - - -def resolve_dot_notation(expr: str, data: dict) -> object: - if "[" in expr or "]" in expr: - raise KeyError(f"Bracket syntax is not supported in dot-notation: {expr!r}") - - # First, check if the expression exists as a literal key (e.g., "topic.story" as a single key) - # This allows users to use dots in their variable names without nested access - if expr in data: - return data[expr] - - # If not found as a literal key, try to parse as dot-notation path - cur = data - for token in (p for p in expr.split(".") if p): - if isinstance(cur, list) and token.isdigit(): - cur = cur[int(token)] - else: - if not isinstance(cur, dict): - raise KeyError( - f"Cannot access key {token!r} on non-dict while resolving {expr!r}" - ) - if token not in cur: - raise KeyError(f"Missing key {token!r} while resolving {expr!r}") - cur = cur[token] - return cur - - -def resolve_json_path(expr: str, data: dict) -> object: - if jsonpath is None: - raise ImportError("python-jsonpath is required for json-path ($...)") - - if not (expr == "$" or expr.startswith("$.") or expr.startswith("$[")): - raise ValueError( - f"Invalid json-path expression {expr!r}. " - "Must start with '$', '$.' or '$[' (no implicit normalization)." - ) - - # Use package-level APIf - results = jsonpath.findall(expr, data) # always returns a list - return results[0] if len(results) == 1 else results - - -def resolve_json_pointer(expr: str, data: Dict[str, Any]) -> Any: - """Resolve a JSON Pointer; returns a single value.""" - if JSONPointer is None: - raise ImportError("python-jsonpath is required for json-pointer (/...)") - return JSONPointer(expr).resolve(data) - - -def resolve_any(expr: str, data: Dict[str, Any]) -> Any: - """Dispatch to the right resolver based on detected scheme.""" - scheme = detect_scheme(expr) - if scheme == "json-path": - return resolve_json_path(expr, data) - if scheme == "json-pointer": - return resolve_json_pointer(expr, data) - return resolve_dot_notation(expr, data) - - -# ========= Placeholder & coercion helpers ========= - -_PLACEHOLDER_RE = re.compile(r"\{\{\s*(.*?)\s*\}\}") - - -def extract_placeholders(template: str) -> Iterable[str]: - """Yield the inner text of all {{ ... }} occurrences (trimmed).""" - for m in _PLACEHOLDER_RE.finditer(template): - yield m.group(1).strip() - - -def coerce_to_str(value: Any) -> str: - """Pretty stringify values for embedding into templates.""" - if isinstance(value, (dict, list)): - return json.dumps(value, ensure_ascii=False) - return str(value) - - -def build_replacements( - placeholders: Iterable[str], data: Dict[str, Any] -) -> Tuple[Dict[str, str], set]: - """ - Resolve all placeholders against data. - Returns (replacements, unresolved_placeholders). - """ - replacements: Dict[str, str] = {} - unresolved: set = set() - for expr in set(placeholders): - try: - val = resolve_any(expr, data) - # Escape backslashes to avoid regex replacement surprises - replacements[expr] = coerce_to_str(val).replace("\\", "\\\\") - except Exception: - unresolved.add(expr) - return replacements, unresolved - - -def apply_replacements(template: str, replacements: Dict[str, str]) -> str: - """Replace {{ expr }} using a callback to avoid regex-injection issues.""" - - def _repl(m: re.Match) -> str: - expr = m.group(1).strip() - return replacements.get(expr, m.group(0)) - - return _PLACEHOLDER_RE.sub(_repl, template) - - -def compute_truly_unreplaced(original: set, rendered: str) -> set: - """Only count placeholders that were in the original template and remain.""" - now = set(extract_placeholders(rendered)) - return original & now - - -def missing_lib_hints(unreplaced: set) -> Optional[str]: - """Suggest installing python-jsonpath if placeholders indicate json-path or json-pointer usage.""" - if any(expr.startswith("$") or expr.startswith("/") for expr in unreplaced) and ( - jsonpath is None or JSONPointer is None - ): - return ( - "Install python-jsonpath to enable json-path ($...) and json-pointer (/...)" - ) - return None - - class PromptTemplate(BaseModel): """A template for generating prompts with formatting capabilities""" @@ -656,7 +445,6 @@ def _format_with_template(self, content: str, kwargs: Dict[str, Any]) -> str: try: if self.template_format == "fstring": return content.format(**kwargs) - elif self.template_format == "jinja2": from jinja2 import Template, TemplateError @@ -667,33 +455,22 @@ def _format_with_template(self, content: str, kwargs: Dict[str, Any]) -> str: f"Jinja2 template error in content: '{content}'. Error: {str(e)}", original_error=e, ) - elif self.template_format == "curly": - original_placeholders = set(extract_placeholders(content)) + import re - replacements, _unresolved = build_replacements( - original_placeholders, kwargs - ) - - result = apply_replacements(content, replacements) - - truly_unreplaced = compute_truly_unreplaced( - original_placeholders, result - ) - if truly_unreplaced: - hint = missing_lib_hints(truly_unreplaced) - suffix = f" Hint: {hint}" if hint else "" + result = content + for key, value in kwargs.items(): + result = re.sub(r"\{\{" + key + r"\}\}", str(value), result) + if re.search(r"\{\{.*?\}\}", result): + unreplaced = re.findall(r"\{\{(.*?)\}\}", result) raise TemplateFormatError( - f"Unreplaced variables in curly template: {sorted(truly_unreplaced)}.{suffix}" + f"Unreplaced variables in curly template: {unreplaced}" ) - return result - else: raise TemplateFormatError( f"Unknown template format: {self.template_format}" ) - except KeyError as e: key = str(e).strip("'") raise TemplateFormatError( @@ -701,30 +478,9 @@ def _format_with_template(self, content: str, kwargs: Dict[str, Any]) -> str: ) except Exception as e: raise TemplateFormatError( - f"Error formatting template '{content}': {str(e)}", - original_error=e, + f"Error formatting template '{content}': {str(e)}", original_error=e ) - def _substitute_variables(self, obj: Any, kwargs: Dict[str, Any]) -> Any: - """Recursively substitute variables within strings of a JSON-like object. - - This now processes placeholders in both keys and values so that - structures like ``{"my_{{var}}": "{{val}}"}`` are fully substituted. - """ - if isinstance(obj, str): - return self._format_with_template(obj, kwargs) - if isinstance(obj, list): - return [self._substitute_variables(item, kwargs) for item in obj] - if isinstance(obj, dict): - new_dict = {} - for k, v in obj.items(): - new_key = ( - self._format_with_template(k, kwargs) if isinstance(k, str) else k - ) - new_dict[new_key] = self._substitute_variables(v, kwargs) - return new_dict - return obj - def format(self, **kwargs) -> "PromptTemplate": """ Format the template with provided inputs. @@ -777,17 +533,10 @@ def format(self, **kwargs) -> "PromptTemplate": ) ) - new_llm_config = self.llm_config.model_copy(deep=True) - if new_llm_config.response_format is not None: - rf_dict = new_llm_config.response_format.model_dump(by_alias=True) - substituted = self._substitute_variables(rf_dict, kwargs) - rf_type = type(new_llm_config.response_format) - new_llm_config.response_format = rf_type(**substituted) - return PromptTemplate( messages=new_messages, template_format=self.template_format, - llm_config=new_llm_config, + llm_config=self.llm_config, input_keys=self.input_keys, ) diff --git a/sdk/agenta/sdk/utils/cache.py b/sdk/agenta/sdk/utils/cache.py index e82bf26ee0..26686c8fd6 100644 --- a/sdk/agenta/sdk/utils/cache.py +++ b/sdk/agenta/sdk/utils/cache.py @@ -5,7 +5,7 @@ from threading import Lock CACHE_CAPACITY = int(getenv("AGENTA_MIDDLEWARE_CACHE_CAPACITY", "512")) -CACHE_TTL = int(getenv("AGENTA_MIDDLEWARE_CACHE_TTL", str(1 * 60))) # 1 minutes +CACHE_TTL = int(getenv("AGENTA_MIDDLEWARE_CACHE_TTL", str(5 * 60))) # 5 minutes class TTLLRUCache: @@ -38,7 +38,7 @@ def get(self, key): return value - def put(self, key, value, ttl: Optional[int] = None): + def put(self, key, value): with self.lock: try: # LRU update @@ -50,4 +50,4 @@ def put(self, key, value, ttl: Optional[int] = None): self.cache.popitem(last=False) # Put - self.cache[key] = (value, time() + (ttl if ttl is not None else self.ttl)) + self.cache[key] = (value, time() + self.ttl) diff --git a/sdk/agenta/sdk/utils/client.py b/sdk/agenta/sdk/utils/client.py deleted file mode 100644 index dba0cb6309..0000000000 --- a/sdk/agenta/sdk/utils/client.py +++ /dev/null @@ -1,38 +0,0 @@ -import requests - -BASE_TIMEOUT = 10 - -from agenta.sdk.utils.logging import get_module_logger - -import agenta as ag - -log = get_module_logger(__name__) - - -def authed_api(): - """ - Preconfigured requests for authenticated endpoints (supports all methods). - """ - - api_url = ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_url - api_key = ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key - - if not api_url or not api_key: - log.error("Please call ag.init() first.") - log.error("And don't forget to set AGENTA_API_URL and AGENTA_API_KEY.") - raise ValueError("API URL and API Key must be set.") - - def _request(method: str, endpoint: str, **kwargs): - url = f"{api_url}{endpoint}" - headers = kwargs.pop("headers", {}) - headers.setdefault("Authorization", f"ApiKey {api_key}") - - return requests.request( - method=method, - url=url, - headers=headers, - timeout=BASE_TIMEOUT, - **kwargs, - ) - - return _request diff --git a/sdk/agenta/sdk/utils/helpers.py b/sdk/agenta/sdk/utils/helpers.py index 20c47d81b0..c72c03a25b 100644 --- a/sdk/agenta/sdk/utils/helpers.py +++ b/sdk/agenta/sdk/utils/helpers.py @@ -32,12 +32,11 @@ def parse_url(url: str) -> str: if internal_url: return internal_url - docker_network_mode = os.getenv("DOCKER_NETWORK_MODE") - - if docker_network_mode and docker_network_mode.lower() == "bridge": + docker_network_mode = os.getenv("DOCKER_NETWORK_MODE", "").lower() + if docker_network_mode == "bridge": return url.replace("localhost", "host.docker.internal") - if not docker_network_mode or docker_network_mode.lower() == "host": + if not docker_network_mode or docker_network_mode == "host": return url # For any other network mode, return the URL unchanged diff --git a/sdk/agenta/sdk/utils/logging.py b/sdk/agenta/sdk/utils/logging.py index cc4789b93c..1091ceefd0 100644 --- a/sdk/agenta/sdk/utils/logging.py +++ b/sdk/agenta/sdk/utils/logging.py @@ -8,6 +8,15 @@ import structlog from structlog.typing import EventDict, WrappedLogger, Processor +# from datetime import datetime +# from logging.handlers import RotatingFileHandler + +# from opentelemetry.trace import get_current_span +# from opentelemetry._logs import set_logger_provider +# from opentelemetry.sdk._logs import LoggingHandler, LoggerProvider +# from opentelemetry.sdk._logs.export import BatchLogRecordProcessor +# from opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter + TRACE_LEVEL = 1 logging.TRACE = TRACE_LEVEL logging.addLevelName(TRACE_LEVEL, "TRACE") @@ -31,6 +40,15 @@ def bound_logger_trace(self, *args, **kwargs): AGENTA_LOG_CONSOLE_ENABLED = os.getenv("AGENTA_LOG_CONSOLE_ENABLED", "true") == "true" AGENTA_LOG_CONSOLE_LEVEL = os.getenv("AGENTA_LOG_CONSOLE_LEVEL", "TRACE").upper() +# AGENTA_LOG_OTLP_ENABLED = os.getenv("AGENTA_LOG_OTLP_ENABLED", "false") == "true" +# AGENTA_LOG_OTLP_LEVEL = os.getenv("AGENTA_LOG_OTLP_LEVEL", "INFO").upper() + +# AGENTA_LOG_FILE_ENABLED = os.getenv("AGENTA_LOG_FILE_ENABLED", "true") == "true" +# AGENTA_LOG_FILE_LEVEL = os.getenv("AGENTA_LOG_FILE_LEVEL", "WARNING").upper() +# AGENTA_LOG_FILE_BASE = os.getenv("AGENTA_LOG_FILE_PATH", "error") +# LOG_FILE_DATE = datetime.utcnow().strftime("%Y-%m-%d") +# AGENTA_LOG_FILE_PATH = f"{AGENTA_LOG_FILE_BASE}-{LOG_FILE_DATE}.log" + # COLORS LEVEL_COLORS = { "TRACE": "\033[97m", @@ -70,6 +88,15 @@ def process_positional_args(_, __, event_dict: EventDict) -> EventDict: return event_dict +# def add_trace_context(_, __, event_dict: EventDict) -> EventDict: +# span = get_current_span() +# if span and span.get_span_context().is_valid: +# ctx = span.get_span_context() +# event_dict["TraceId"] = format(ctx.trace_id, "032x") +# event_dict["SpanId"] = format(ctx.span_id, "016x") +# return event_dict + + def add_logger_info( logger: WrappedLogger, method_name: str, event_dict: EventDict ) -> EventDict: @@ -116,9 +143,36 @@ def render(_, __, event_dict: EventDict) -> str: return render +# def plain_renderer() -> Processor: +# hidden = { +# "SeverityText", +# "SeverityNumber", +# "MethodName", +# "logger_factory", +# "LoggerName", +# "level", +# } + +# def render(_, __, event_dict: EventDict) -> str: +# ts = event_dict.pop("Timestamp", "")[:23] + "Z" +# level = event_dict.get("level", "") +# msg = event_dict.pop("event", "") +# padded = f"[{level:<5}]" +# logger = f"[{event_dict.pop('logger', '')}]" +# extras = " ".join(f"{k}={v}" for k, v in event_dict.items() if k not in hidden) +# return f"{ts} {padded} {msg} {logger} {extras}" + +# return render + + +# def json_renderer() -> Processor: +# return structlog.processors.JSONRenderer() + + SHARED_PROCESSORS: list[Processor] = [ structlog.processors.TimeStamper(fmt="iso", utc=True, key="Timestamp"), process_positional_args, + # add_trace_context, add_logger_info, structlog.processors.format_exc_info, structlog.processors.dict_tracebacks, @@ -139,30 +193,36 @@ def create_struct_logger( ) -# Guard against double initialization -_LOGGING_CONFIGURED = False - # CONFIGURE HANDLERS AND STRUCTLOG LOGGERS handlers = [] loggers = [] -if AGENTA_LOG_CONSOLE_ENABLED and not _LOGGING_CONFIGURED: - _LOGGING_CONFIGURED = True - - # Check if console logger already has handlers (from OSS module) - console_logger = logging.getLogger("console") - - if not console_logger.handlers: - # Only add handler if it doesn't exist yet - h = logging.StreamHandler(sys.stdout) - h.setLevel(getattr(logging, AGENTA_LOG_CONSOLE_LEVEL, TRACE_LEVEL)) - h.setFormatter(logging.Formatter("%(message)s")) - console_logger.addHandler(h) - console_logger.setLevel(TRACE_LEVEL) - console_logger.propagate = False - +if AGENTA_LOG_CONSOLE_ENABLED: + h = logging.StreamHandler(sys.stdout) + h.setLevel(getattr(logging, AGENTA_LOG_CONSOLE_LEVEL, TRACE_LEVEL)) + h.setFormatter(logging.Formatter("%(message)s")) + logging.getLogger("console").addHandler(h) loggers.append(create_struct_logger([colored_console_renderer()], "console")) +# if AGENTA_LOG_FILE_ENABLED: +# h = RotatingFileHandler(AGENTA_LOG_FILE_PATH, maxBytes=10 * 1024 * 1024, backupCount=5) +# h.setLevel(getattr(logging, AGENTA_LOG_FILE_LEVEL, logging.WARNING)) +# h.setFormatter(logging.Formatter("%(message)s")) +# logging.getLogger("file").addHandler(h) +# loggers.append(create_struct_logger([plain_renderer()], "file")) + +# if AGENTA_LOG_OTLP_ENABLED: +# provider = LoggerProvider() +# exporter = OTLPLogExporter() +# provider.add_log_record_processor(BatchLogRecordProcessor(exporter)) +# set_logger_provider(provider) +# h = LoggingHandler( +# level=getattr(logging, AGENTA_LOG_OTLP_LEVEL, logging.INFO), logger_provider=provider +# ) +# h.setFormatter(logging.Formatter("%(message)s")) +# logging.getLogger("otel").addHandler(h) +# loggers.append(create_struct_logger([json_renderer()], "otel")) + class MultiLogger: def __init__(self, *loggers: structlog.stdlib.BoundLogger): diff --git a/sdk/agenta/sdk/utils/otel.py b/sdk/agenta/sdk/utils/otel.py deleted file mode 100644 index 7451777132..0000000000 --- a/sdk/agenta/sdk/utils/otel.py +++ /dev/null @@ -1,21 +0,0 @@ -from opentelemetry import context as otel_context -from opentelemetry.trace import get_current_span -from opentelemetry.baggage import get_all as get_all_baggage - - -def debug_otel_context(label: str = "OTEL CONTEXT"): - ctx = otel_context.get_current() - span = get_current_span() - baggage = get_all_baggage(ctx) - - print("\n===== {} =====".format(label)) - print("Context object:", ctx) - print("Baggage:", baggage or "{}") - if span and span.get_span_context().is_valid: - print("Current Span:") - print(" Trace ID:", format(span.get_span_context().trace_id, "032x")) - print(" Span ID:", format(span.get_span_context().span_id, "016x")) - # print(" Is Recording:", span.is_recording()) - else: - print("Current Span: None or Invalid") - print("=" * 40) diff --git a/sdk/agenta/sdk/utils/preinit.py b/sdk/agenta/sdk/utils/preinit.py index 1ea805036a..f039b149f9 100644 --- a/sdk/agenta/sdk/utils/preinit.py +++ b/sdk/agenta/sdk/utils/preinit.py @@ -1,4 +1,10 @@ from typing import Any, Optional +from dotenv import load_dotenv + +# from .context import setup_db + +load_dotenv() +# setup_db() class PreInitObject: diff --git a/sdk/agenta/sdk/utils/references.py b/sdk/agenta/sdk/utils/references.py deleted file mode 100644 index 865be8d1ab..0000000000 --- a/sdk/agenta/sdk/utils/references.py +++ /dev/null @@ -1,23 +0,0 @@ -from uuid import UUID -import re -import unicodedata - - -def get_slug_from_name_and_id( - name: str, - id: UUID, # pylint: disable=redefined-builtin -) -> str: - # Normalize Unicode (e.g., é → e) - name = unicodedata.normalize("NFKD", name) - # Remove non-ASCII characters - name = name.encode("ascii", "ignore").decode("ascii") - # Lowercase and remove non-word characters except hyphens and spaces - name = re.sub(r"[^\w\s-]", "", name.lower()) - # Replace any sequence of hyphens or whitespace with a single hyphen - name = re.sub(r"[-\s]+", "-", name) - # Trim leading/trailing hyphens - name = name.strip("-") - # Last 12 characters of the ID - slug = f"{name}-{id.hex[-12:]}" - - return slug.lower() diff --git a/sdk/agenta/sdk/workflows/__init__.py b/sdk/agenta/sdk/workflows/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/agenta/sdk/workflows/builtin.py b/sdk/agenta/sdk/workflows/builtin.py deleted file mode 100644 index 96fe546f66..0000000000 --- a/sdk/agenta/sdk/workflows/builtin.py +++ /dev/null @@ -1,600 +0,0 @@ -from typing import Optional, Union, Dict - -from agenta.sdk.models.workflows import Reference -from agenta.sdk.decorators.running import workflow, Workflow, application, evaluator -from agenta.sdk.workflows.handlers import SinglePromptConfig - - -def echo( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, -) -> Workflow: - return workflow( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="echo", - )() - - -def auto_exact_match( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - correct_answer_key: Optional[str] = "correct_answer", -) -> Workflow: - parameters = dict( - correct_answer_key=correct_answer_key, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_exact_match", - # - parameters=parameters, - )() - - -def auto_regex_test( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - regex_pattern: str, - # - regex_should_match: Optional[bool] = True, - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - regex_pattern=regex_pattern, - regex_should_match=regex_should_match, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_regex_test", - # - parameters=parameters, - )() - - -def field_match_test( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - json_field: str, - # - correct_answer_key: Optional[str] = "correct_answer", -) -> Workflow: - parameters = dict( - json_field=json_field, - correct_answer_key=correct_answer_key, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="field_match_test", - # - parameters=parameters, - )() - - -def auto_webhook_test( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - webhook_url: str, - # - correct_answer_key: Optional[str] = "correct_answer", -) -> Workflow: - parameters = dict( - webhook_url=webhook_url, - correct_answer_key=correct_answer_key, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_webhook_test", - # - parameters=parameters, - )() - - -def auto_custom_code_run( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - code: str, - # - correct_answer_key: Optional[str] = "correct_answer", - threshold: Optional[float] = 0.5, -) -> Workflow: - parameters = dict( - code=code, - correct_answer_key=correct_answer_key, - threshold=threshold, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_custom_code_run", - # - parameters=parameters, - )() - - -def auto_ai_critique( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - prompt_template: list[dict[str, str]], - # - correct_answer_key: Optional[str] = "correct_answer", - model: Optional[str] = "gpt-3.5-turbo", -) -> Workflow: - parameters = dict( - prompt_template=prompt_template, - correct_answer_key=correct_answer_key, - model=model, - version=3, - template_format="curly", - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_ai_critique", - # - parameters=parameters, - )() - - -def auto_starts_with( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - prefix: str, - # - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - prefix=prefix, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_starts_with", - # - parameters=parameters, - )() - - -def auto_ends_with( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - suffix: str, - # - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - suffix=suffix, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_ends_with", - # - parameters=parameters, - )() - - -def auto_contains( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - substring: str, - # - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - substring=substring, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_contains", - # - parameters=parameters, - )() - - -def auto_contains_any( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - substrings: list[str], - # - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - substrings=substrings, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_contains_any", - # - parameters=parameters, - )() - - -def auto_contains_all( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - substrings: list[str], - # - case_sensitive: Optional[bool] = True, -) -> Workflow: - parameters = dict( - substrings=substrings, - case_sensitive=case_sensitive, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_contains_all", - # - parameters=parameters, - )() - - -def auto_contains_json( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, -) -> Workflow: - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_contains_json", - )() - - -def auto_json_diff( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - correct_answer_key: Optional[str] = "correct_answer", - threshold: Optional[float] = 0.5, - predict_keys: Optional[bool] = False, - case_insensitive_keys: Optional[bool] = False, - compare_schema_only: Optional[bool] = False, -) -> Workflow: - parameters = dict( - correct_answer_key=correct_answer_key, - threshold=threshold, - predict_keys=predict_keys, - case_insensitive_keys=case_insensitive_keys, - compare_schema_only=compare_schema_only, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_json_diff", - # - parameters=parameters, - )() - - -def auto_levenshtein_distance( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - correct_answer_key: Optional[str] = "correct_answer", - case_sensitive: Optional[bool] = True, - threshold: Optional[float] = 0.5, -) -> Workflow: - parameters = dict( - correct_answer_key=correct_answer_key, - case_sensitive=case_sensitive, - threshold=threshold, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_levenshtein_distance", - # - parameters=parameters, - )() - - -def auto_similarity_match( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - correct_answer_key: Optional[str] = "correct_answer", - case_sensitive: Optional[bool] = True, - threshold: Optional[float] = 0.5, -) -> Workflow: - parameters = dict( - correct_answer_key=correct_answer_key, - case_sensitive=case_sensitive, - threshold=threshold, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_similarity_match", - # - parameters=parameters, - )() - - -def auto_semantic_similarity( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - correct_answer_key: Optional[str] = "correct_answer", - threshold: Optional[float] = 0.5, - embedding_model: Optional[str] = "text-embedding-3-small", -) -> Workflow: - parameters = dict( - correct_answer_key=correct_answer_key, - threshold=threshold, - embedding_model=embedding_model, - ) - - return evaluator( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="auto_semantic_similarity", - # - parameters=parameters, - )() - - -def completion( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - config: SinglePromptConfig, -) -> Workflow: - parameters = config.model_dump( - mode="json", - exclude_none=True, - ) - - return application( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="completion", - # - parameters=parameters, - )() - - -def chat( - *, - slug: Optional[str] = None, - # - name: Optional[str] = None, - description: Optional[str] = None, - # - variant_slug: Optional[str] = None, - # - config: SinglePromptConfig, -) -> Workflow: - parameters = config.model_dump( - mode="json", - exclude_none=True, - ) - - return application( - slug=slug, - # - name=name, - description=description, - # - variant_slug=variant_slug, - # - uri="chat", - # - parameters=parameters, - )() diff --git a/sdk/agenta/sdk/workflows/configurations.py b/sdk/agenta/sdk/workflows/configurations.py deleted file mode 100644 index 9086047c53..0000000000 --- a/sdk/agenta/sdk/workflows/configurations.py +++ /dev/null @@ -1,22 +0,0 @@ -from agenta.sdk.models.workflows import WorkflowServiceConfiguration - - -echo_v0_configuration = WorkflowServiceConfiguration() -auto_exact_match_v0_configuration = WorkflowServiceConfiguration() -auto_regex_test_v0_configuration = WorkflowServiceConfiguration() -field_match_test_v0_configuration = WorkflowServiceConfiguration() -auto_webhook_test_v0_configuration = WorkflowServiceConfiguration() -auto_custom_code_run_v0_configuration = WorkflowServiceConfiguration() -auto_ai_critique_v0_configuration = WorkflowServiceConfiguration() -auto_starts_with_v0_configuration = WorkflowServiceConfiguration() -auto_ends_with_v0_configuration = WorkflowServiceConfiguration() -auto_contains_v0_configuration = WorkflowServiceConfiguration() -auto_contains_any_v0_configuration = WorkflowServiceConfiguration() -auto_contains_all_v0_configuration = WorkflowServiceConfiguration() -auto_contains_json_v0_configuration = WorkflowServiceConfiguration() -auto_json_diff_v0_configuration = WorkflowServiceConfiguration() -auto_levenshtein_distance_v0_configuration = WorkflowServiceConfiguration() -auto_similarity_match_v0_configuration = WorkflowServiceConfiguration() -auto_semantic_similarity_v0_configuration = WorkflowServiceConfiguration() -completion_v0_configuration = WorkflowServiceConfiguration() -chat_v0_configuration = WorkflowServiceConfiguration() diff --git a/sdk/agenta/sdk/workflows/errors.py b/sdk/agenta/sdk/workflows/errors.py deleted file mode 100644 index ac12803f27..0000000000 --- a/sdk/agenta/sdk/workflows/errors.py +++ /dev/null @@ -1,292 +0,0 @@ -from typing import Optional, Any - -ERRORS_BASE_URL = "https://docs.agenta.ai/errors" - - -class ErrorStatus(Exception): - code: int - type: str - message: str - stacktrace: Optional[str] = None - - def __init__( - self, - code: int, - type: str, - message: str, - stacktrace: Optional[str] = None, - ): - super().__init__() - self.code = code - self.type = type - self.message = message - self.stacktrace = stacktrace - - def __str__(self): - return f"[EVAL] {self.code} - {self.message} ({self.type})" + ( - f"\nStacktrace: {self.stacktrace}" if self.stacktrace else "" - ) - - def __repr__(self): - return f"ErrorStatus(code={self.code}, type='{self.type}', message='{self.message}')" - - -class InvalidInterfaceURIV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:interface:invalid-uri" - - def __init__(self, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid uri:\nExpected (see registry)\nGot '{got}'.", - ) - - -class InvalidConfigurationParametersV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-parameters" - - def __init__(self, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid parameters:\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class MissingConfigurationParameterV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:missing-parameter" - - def __init__(self, path: str): - super().__init__( - code=self.code, - type=self.type, - message=f"Missing parameter:\nAt '{path}'", - ) - - -class InvalidConfigurationParameterV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-parameter" - - def __init__(self, path: str, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid parameter:\nAt '{path}'\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class InvalidInputsV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-inputs" - - def __init__(self, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid inputs:\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class MissingInputV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:missing-input" - - def __init__(self, path: str): - super().__init__( - code=self.code, - type=self.type, - message=f"Missing input:\nAt '{path}'", - ) - - -class InvalidInputV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-input" - - def __init__(self, path: str, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid input:\nAt '{path}'\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class InvalidOutputsV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-outputs" - - def __init__(self, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid outputs:\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class MissingOutputV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:missing-output" - - def __init__(self, path: str): - super().__init__( - code=self.code, - type=self.type, - message=f"Missing output:\nAt '{path}'", - ) - - -class InvalidSecretsV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:invalid-secrets" - - def __init__(self, expected: Any, got: Any): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid secrets:\nExpected '{expected}'\nGot ('{type(got).__name__}') '{got}'.", - ) - - -class MissingSecretV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:schemas:missing-secret" - - def __init__(self, path: str): - super().__init__( - code=self.code, - type=self.type, - message=f"Missing secrets:\nAt '{path}'", - ) - - -class JSONDiffV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:json-diff-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class LevenshteinDistanceV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:levenshtein-distance-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class SyntacticSimilarityV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:syntactic-similarity-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class SemanticSimilarityV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:semantic-similarity-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class WebhookServerV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:custom-hook-server-error" - - def __init__(self, code: int, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=code or self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class WebhookClientV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:custom-hook-client-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class CustomCodeServerV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:custom-code-server-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class RegexPatternV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:regex-pattern-error" - - def __init__(self, pattern: str): - super().__init__( - code=self.code, - type=self.type, - message=f"Invalid regex pattern: '{pattern}'.", - ) - - -class PromptFormattingV0Error(ErrorStatus): - code: int = 400 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:prompt-formatting-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) - - -class PromptCompletionV0Error(ErrorStatus): - code: int = 500 - type: str = f"{ERRORS_BASE_URL}#v0:workflows:prompt-completion-error" - - def __init__(self, message: str, stacktrace: Optional[str] = None): - super().__init__( - code=self.code, - type=self.type, - message=message, - stacktrace=stacktrace, - ) diff --git a/sdk/agenta/sdk/workflows/handlers.py b/sdk/agenta/sdk/workflows/handlers.py deleted file mode 100644 index 738392f345..0000000000 --- a/sdk/agenta/sdk/workflows/handlers.py +++ /dev/null @@ -1,1787 +0,0 @@ -from typing import List, Any, Optional, Any, Dict, Union -from json import dumps, loads -import traceback -import json -import re -import math - -import httpx - -import litellm - -from pydantic import BaseModel, Field -from openai import AsyncOpenAI, OpenAIError -from difflib import SequenceMatcher - -from agenta.sdk.utils.logging import get_module_logger - -from agenta.sdk.litellm import mockllm -from agenta.sdk.types import PromptTemplate, Message -from agenta.sdk.managers.secrets import SecretsManager - -from agenta.sdk.decorators.tracing import instrument - -from agenta.sdk.models.shared import Data -from agenta.sdk.models.tracing import Trace -from agenta.sdk.workflows.sandbox import execute_code_safely -from agenta.sdk.workflows.errors import ( - InvalidConfigurationParametersV0Error, - MissingConfigurationParameterV0Error, - InvalidConfigurationParameterV0Error, - InvalidInputsV0Error, - MissingInputV0Error, - InvalidInputV0Error, - InvalidOutputsV0Error, - MissingOutputV0Error, - InvalidSecretsV0Error, - JSONDiffV0Error, - LevenshteinDistanceV0Error, - SyntacticSimilarityV0Error, - SemanticSimilarityV0Error, - WebhookServerV0Error, - WebhookClientV0Error, - CustomCodeServerV0Error, - RegexPatternV0Error, - PromptFormattingV0Error, - PromptCompletionV0Error, -) - -from agenta.sdk.litellm import mockllm -from agenta.sdk.litellm.litellm import litellm_handler - -litellm.logging = False -litellm.set_verbose = False -litellm.drop_params = True -# litellm.turn_off_message_logging = True -mockllm.litellm = litellm - -litellm.callbacks = [litellm_handler()] - -log = get_module_logger(__name__) - - -async def _compute_embedding(openai: Any, model: str, input: str) -> List[float]: - response = await openai.embeddings.create(model=model, input=input) - # embeddings API already returns a list of floats - return response.data[0].embedding - - -def _compute_similarity(embedding_1: List[float], embedding_2: List[float]) -> float: - # Cosine similarity - dot = sum(a * b for a, b in zip(embedding_1, embedding_2)) - norm1 = math.sqrt(sum(a * a for a in embedding_1)) - norm2 = math.sqrt(sum(b * b for b in embedding_2)) - if norm1 == 0 or norm2 == 0: - return 0.0 - return dot / (norm1 * norm2) - - -import json -import re -from typing import Any, Dict, Iterable, Tuple, Optional - -try: - import jsonpath # ✅ use module API - from jsonpath import JSONPointer # pointer class is fine to use -except Exception: - jsonpath = None - JSONPointer = None - -# ========= Scheme detection ========= - - -def detect_scheme(expr: str) -> str: - """Return 'json-path', 'json-pointer', or 'dot-notation' based on the placeholder prefix.""" - if expr.startswith("$"): - return "json-path" - if expr.startswith("/"): - return "json-pointer" - return "dot-notation" - - -# ========= Resolvers ========= - - -def resolve_dot_notation(expr: str, data: dict) -> object: - if "[" in expr or "]" in expr: - raise KeyError(f"Bracket syntax is not supported in dot-notation: {expr!r}") - - # First, check if the expression exists as a literal key (e.g., "topic.story" as a single key) - # This allows users to use dots in their variable names without nested access - if expr in data: - return data[expr] - - # If not found as a literal key, try to parse as dot-notation path - cur = data - for token in (p for p in expr.split(".") if p): - if isinstance(cur, list) and token.isdigit(): - cur = cur[int(token)] - else: - if not isinstance(cur, dict): - raise KeyError( - f"Cannot access key {token!r} on non-dict while resolving {expr!r}" - ) - if token not in cur: - raise KeyError(f"Missing key {token!r} while resolving {expr!r}") - cur = cur[token] - return cur - - -def resolve_json_path(expr: str, data: dict) -> object: - if jsonpath is None: - raise ImportError("python-jsonpath is required for json-path ($...)") - - if not (expr == "$" or expr.startswith("$.") or expr.startswith("$[")): - raise ValueError( - f"Invalid json-path expression {expr!r}. " - "Must start with '$', '$.' or '$[' (no implicit normalization)." - ) - - # Use package-level APIf - results = jsonpath.findall(expr, data) # always returns a list - return results[0] if len(results) == 1 else results - - -def resolve_json_pointer(expr: str, data: Dict[str, Any]) -> Any: - """Resolve a JSON Pointer; returns a single value.""" - if JSONPointer is None: - raise ImportError("python-jsonpath is required for json-pointer (/...)") - return JSONPointer(expr).resolve(data) - - -def resolve_any(expr: str, data: Dict[str, Any]) -> Any: - """Dispatch to the right resolver based on detected scheme.""" - scheme = detect_scheme(expr) - if scheme == "json-path": - return resolve_json_path(expr, data) - if scheme == "json-pointer": - return resolve_json_pointer(expr, data) - return resolve_dot_notation(expr, data) - - -# ========= Placeholder & coercion helpers ========= - -_PLACEHOLDER_RE = re.compile(r"\{\{\s*(.*?)\s*\}\}") - - -def extract_placeholders(template: str) -> Iterable[str]: - """Yield the inner text of all {{ ... }} occurrences (trimmed).""" - for m in _PLACEHOLDER_RE.finditer(template): - yield m.group(1).strip() - - -def coerce_to_str(value: Any) -> str: - """Pretty stringify values for embedding into templates.""" - if isinstance(value, (dict, list)): - return json.dumps(value, ensure_ascii=False) - return str(value) - - -def build_replacements( - placeholders: Iterable[str], data: Dict[str, Any] -) -> Tuple[Dict[str, str], set]: - """ - Resolve all placeholders against data. - Returns (replacements, unresolved_placeholders). - """ - replacements: Dict[str, str] = {} - unresolved: set = set() - for expr in set(placeholders): - try: - val = resolve_any(expr, data) - # Escape backslashes to avoid regex replacement surprises - replacements[expr] = coerce_to_str(val).replace("\\", "\\\\") - except Exception: - unresolved.add(expr) - return replacements, unresolved - - -def apply_replacements(template: str, replacements: Dict[str, str]) -> str: - """Replace {{ expr }} using a callback to avoid regex-injection issues.""" - - def _repl(m: re.Match) -> str: - expr = m.group(1).strip() - return replacements.get(expr, m.group(0)) - - return _PLACEHOLDER_RE.sub(_repl, template) - - -def compute_truly_unreplaced(original: set, rendered: str) -> set: - """Only count placeholders that were in the original template and remain.""" - now = set(extract_placeholders(rendered)) - return original & now - - -def missing_lib_hints(unreplaced: set) -> Optional[str]: - """Suggest installing python-jsonpath if placeholders indicate json-path or json-pointer usage.""" - if any(expr.startswith("$") or expr.startswith("/") for expr in unreplaced) and ( - jsonpath is None or JSONPointer is None - ): - return ( - "Install python-jsonpath to enable json-path ($...) and json-pointer (/...)" - ) - return None - - -def _format_with_template( - content: str, - format: str, - kwargs: Dict[str, Any], -) -> str: - """Internal method to format content based on template_format""" - if format == "fstring": - return content.format(**kwargs) - - elif format == "jinja2": - from jinja2 import Template, TemplateError - - try: - return Template(content).render(**kwargs) - except TemplateError: - return content - - elif format == "curly": - original_placeholders = set(extract_placeholders(content)) - - replacements, _unresolved = build_replacements(original_placeholders, kwargs) - - result = apply_replacements(content, replacements) - - truly_unreplaced = compute_truly_unreplaced(original_placeholders, result) - - if truly_unreplaced: - hint = missing_lib_hints(truly_unreplaced) - suffix = f" Hint: {hint}" if hint else "" - raise ValueError( - f"Template variables not found or unresolved: " - f"{', '.join(sorted(truly_unreplaced))}.{suffix}" - ) - - return result - - return content - - -def _flatten_json(json_obj: Union[list, dict]) -> Dict[str, Any]: - """ - This function takes a (nested) JSON object and flattens it into a single-level dictionary where each key represents the path to the value in the original JSON structure. This is done recursively, ensuring that the full hierarchical context is preserved in the keys. - - Args: - json_obj (Union[list, dict]): The (nested) JSON object to flatten. It can be either a dictionary or a list. - - Returns: - Dict[str, Any]: The flattened JSON object as a dictionary, with keys representing the paths to the values in the original structure. - """ - - output = {} - - def flatten(obj: Union[list, dict], path: str = "") -> None: - if isinstance(obj, dict): - for key, value in obj.items(): - new_key = f"{path}.{key}" if path else key - if isinstance(value, (dict, list)): - flatten(value, new_key) - else: - output[new_key] = value - - elif isinstance(obj, list): - for index, value in enumerate(obj): - new_key = f"{path}.{index}" if path else str(index) - if isinstance(value, (dict, list)): - flatten(value, new_key) - else: - output[new_key] = value - - flatten(json_obj) - return output - - -def _compare_jsons( - ground_truth: Union[list, dict], - app_output: Union[list, dict], - settings_values: dict, -): - """ - This function takes two JSON objects (ground truth and application output), flattens them using the `_flatten_json` function, and then compares the fields. - - Args: - ground_truth (list | dict): The ground truth - app_output (list | dict): The application output - settings_values: dict: The advanced configuration of the evaluator - - Returns: - the average score between both JSON objects - """ - - def normalize_keys(d: Dict[str, Any], case_insensitive: bool) -> Dict[str, Any]: - if not case_insensitive: - return d - return {k.lower(): v for k, v in d.items()} - - def diff(ground_truth: Any, app_output: Any, compare_schema_only: bool) -> float: - gt_key, gt_value = next(iter(ground_truth.items())) - ao_key, ao_value = next(iter(app_output.items())) - - if compare_schema_only: - return ( - 1.0 if (gt_key == ao_key and type(gt_value) == type(ao_value)) else 0.0 - ) - return 1.0 if (gt_key == ao_key and gt_value == ao_value) else 0.0 - - flattened_ground_truth = _flatten_json(ground_truth) - flattened_app_output = _flatten_json(app_output) - - keys = set(flattened_ground_truth.keys()) - if settings_values.get("predict_keys", False): - keys = keys.union(set(flattened_app_output.keys())) - - cumulated_score = 0.0 - no_of_keys = len(keys) - - case_insensitive_keys = settings_values.get("case_insensitive_keys", False) - compare_schema_only = settings_values.get("compare_schema_only", False) - flattened_ground_truth = normalize_keys( - flattened_ground_truth, case_insensitive_keys - ) - flattened_app_output = normalize_keys(flattened_app_output, case_insensitive_keys) - - for key in keys: - ground_truth_value = flattened_ground_truth.get(key, None) - llm_app_output_value = flattened_app_output.get(key, None) - - key_score = 0.0 - if ground_truth_value is not None and llm_app_output_value is not None: - key_score = diff( - {key: ground_truth_value}, - {key: llm_app_output_value}, - compare_schema_only, - ) - - cumulated_score += key_score - try: - average_score = cumulated_score / no_of_keys - return average_score - except ZeroDivisionError: - return 0.0 - - -@instrument() -def echo_v0(aloha: Any): - return {"got": aloha} - - -@instrument(annotate=True) -def auto_exact_match_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Exact match evaluator for comparing outputs against reference outputs. - - inputs: Testcase data, which may contain reference outputs - outputs: Output from the workflow execution - parameters: Configuration for the evaluator - - Returns: - Evaluation result with success flag (True for match, False for mismatch) - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - # -------------------------------------------------------------------------- - success = False - if isinstance(outputs, str) and isinstance(correct_answer, str): - success = outputs == correct_answer - elif isinstance(outputs, dict) and isinstance(correct_answer, dict): - outputs = dumps(outputs, sort_keys=True) - correct_answer = dumps(correct_answer, sort_keys=True) - success = outputs == correct_answer - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_regex_test_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Regex test evaluator for checking if output matches a regex pattern. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with regex pattern and matching flag - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "regex_pattern" in parameters: - raise MissingConfigurationParameterV0Error(path="regex_pattern") - - regex_pattern = parameters["regex_pattern"] - - if not isinstance(regex_pattern, str): - raise InvalidConfigurationParameterV0Error( - path="regex_pattern", - expected="str", - got=regex_pattern, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - regex_should_match = parameters.get("regex_should_match", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - try: - pattern = re.compile( - regex_pattern, - flags=0 if case_sensitive else re.IGNORECASE, - ) - except Exception as e: - raise RegexPatternV0Error(pattern=regex_pattern) from e - - result = pattern.search(outputs_str) - - success = bool(result) == regex_should_match - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def field_match_test_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Field match test evaluator for extracting and comparing a specific field from JSON output. - - Args: - inputs: Testcase data with ground truth - outputs: Output from the workflow execution (expected to be JSON string or dict) - parameters: Configuration for the evaluator with json_field to extract - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "json_field" in parameters: - raise MissingConfigurationParameterV0Error(path="json_field") - - json_field = str(parameters["json_field"]) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_dict = outputs - if isinstance(outputs, str): - try: - outputs_dict = loads(outputs) - except json.JSONDecodeError as e: - raise InvalidOutputsV0Error(expected="dict", got=outputs) from e - - if not isinstance(outputs_dict, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - if not json_field in outputs_dict: - raise MissingOutputV0Error(path=json_field) - - # -------------------------------------------------------------------------- - success = outputs_dict[json_field] == correct_answer - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -async def auto_webhook_test_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Webhook test evaluator for sending output to an external service for evaluation. - - Args: - inputs: Testcase data with ground truth - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with webhook_url - - Returns: - Evaluation result with score from the webhook - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "webhook_url" in parameters: - raise MissingConfigurationParameterV0Error(path="webhook_url") - - webhook_url = str(parameters["webhook_url"]) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - json_payload = { - "inputs": inputs, - "output": outputs_str, - "correct_answer": correct_answer, - } - - async with httpx.AsyncClient() as client: - try: - response = await client.post( - url=webhook_url, - json=json_payload, - ) - except Exception as e: - raise WebhookClientV0Error( - message=str(e), - ) from e - - if response.status_code != 200: - raise WebhookServerV0Error( - code=response.status_code, - message=response.json(), - ) - - try: - _outputs = response.json() - except Exception as e: - raise WebhookClientV0Error( - message=str(e), - ) from e - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - if isinstance(_outputs, bool): - return {"success": _outputs} - - if isinstance(_outputs, dict) or isinstance(_outputs, str): - return _outputs - - raise InvalidOutputsV0Error(expected=["dict", "str"], got=_outputs) - - -@instrument(annotate=True) -async def auto_custom_code_run_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Custom code execution evaluator for running arbitrary code to evaluate outputs. - - Args: - inputs: Testcase data with ground truth - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with code to execute - - Returns: - Evaluation result with score from the custom code - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "code" in parameters: - raise MissingConfigurationParameterV0Error(path="code") - - code = str(parameters["code"]) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - try: - _outputs = execute_code_safely( - app_params={}, - inputs=inputs, - output=outputs, - correct_answer=correct_answer, - code=code, - ) - except Exception as e: - raise CustomCodeServerV0Error( - message=str(e), - stacktrace=traceback.format_exc(), - ) from e - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - if isinstance(_outputs, bool): - return {"success": _outputs} - - if isinstance(_outputs, dict) or isinstance(_outputs, str): - return _outputs - - raise InvalidOutputsV0Error(expected=["dict", "str"], got=_outputs) - - -@instrument(annotate=True) -async def auto_ai_critique_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - # return {"score": 0.75, "success": True} - - """ - AI critique evaluator for using an LLM to evaluate outputs. - - Args: - inputs: Testcase data with ground truth - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with prompt_template and model - - Returns: - Evaluation result with score from the AI - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - correct_answer_key = parameters.get("correct_answer_key") - - if not "prompt_template" in parameters: - raise MissingConfigurationParameterV0Error(path="prompt_template") - - prompt_template = parameters.get("prompt_template") - - if not isinstance(prompt_template, list): - raise InvalidConfigurationParameterV0Error( - path="prompt_template", - expected="list", - got=prompt_template, - ) - - template_version = parameters.get("version") or "3" - - default_format = "fstring" if template_version == "2" else "curly" - - template_format = str(parameters.get("template_format") or default_format) - - model = parameters.get("model") or "gpt-3.5-turbo" - - if not isinstance(model, str): - raise InvalidConfigurationParameterV0Error( - path="model", - expected="str", - got=model, - ) - - response_type = parameters.get("response_type") or ( - "json_schema" if template_version == "4" else "text" - ) - - if not response_type in ["text", "json_object", "json_schema"]: - raise InvalidConfigurationParameterV0Error( - path="response_type", - expected=["text", "json_object", "json_schema"], - got=response_type, - ) - - json_schema = parameters.get("json_schema") or None - - json_schema = json_schema if response_type == "json_schema" else None - - if response_type == "json_schema" and not isinstance(json_schema, dict): - raise InvalidConfigurationParameterV0Error( - path="json_schema", - expected="dict", - got=json_schema, - ) - - response_format: dict = dict(type=response_type) - - if response_type == "json_schema": - response_format["json_schema"] = json_schema - - correct_answer = None - - if inputs: - if not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if correct_answer_key: - if correct_answer_key in inputs: - correct_answer = inputs[correct_answer_key] - - secrets = await SecretsManager.retrieve_secrets() - - if secrets is None or not isinstance(secrets, list): - raise InvalidSecretsV0Error(expected="list", got=secrets) - - openai_api_key = None # secrets.get("OPENAI_API_KEY") - anthropic_api_key = None # secrets.get("ANTHROPIC_API_KEY") - openrouter_api_key = None # secrets.get("OPENROUTER_API_KEY") - cohere_api_key = None # secrets.get("COHERE_API_KEY") - azure_api_key = None # secrets.get("AZURE_API_KEY") - groq_api_key = None # secrets.get("GROQ_API_KEY") - - for secret in secrets: - if secret.get("kind") == "provider_key": - secret_data = secret.get("data", {}) - if secret_data.get("kind") == "openai": - provider_data = secret_data.get("provider", {}) - openai_api_key = provider_data.get("key") or openai_api_key - if secret_data.get("kind") == "anthropic": - provider_data = secret_data.get("provider", {}) - anthropic_api_key = provider_data.get("key") or anthropic_api_key - if secret_data.get("kind") == "openrouter": - provider_data = secret_data.get("provider", {}) - openrouter_api_key = provider_data.get("key") or openrouter_api_key - if secret_data.get("kind") == "cohere": - provider_data = secret_data.get("provider", {}) - cohere_api_key = provider_data.get("key") or cohere_api_key - if secret_data.get("kind") == "azure": - provider_data = secret_data.get("provider", {}) - azure_api_key = provider_data.get("key") or azure_api_key - if secret_data.get("kind") == "groq": - provider_data = secret_data.get("provider", {}) - groq_api_key = provider_data.get("key") or groq_api_key - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - litellm.openai_key = openai_api_key - litellm.anthropic_key = anthropic_api_key - litellm.openrouter_key = openrouter_api_key - litellm.cohere_key = cohere_api_key - litellm.azure_key = azure_api_key - litellm.groq_key = groq_api_key - - context: Dict[str, Any] = dict() - - if parameters: - context.update( - **{ - "parameters": parameters, - } - ) - - if correct_answer: - context.update( - **{ - "ground_truth": correct_answer, - "correct_answer": correct_answer, - "reference": correct_answer, - } - ) - - if outputs: - context.update( - **{ - "prediction": outputs, - "outputs": outputs, - } - ) - - if inputs: - context.update(**inputs) - context.update( - **{ - "inputs": inputs, - } - ) - - try: - formatted_prompt_template = [ - { - "role": message["role"], - "content": _format_with_template( - content=message["content"], - format=template_format, - kwargs=context, - ), - } - for message in prompt_template - ] - except Exception as e: - raise PromptFormattingV0Error( - message=str(e), - stacktrace=traceback.format_exc(), - ) from e - - try: - response = await litellm.acompletion( - model=model, - messages=formatted_prompt_template, - temperature=0.01, - response_format=response_format, - ) - - _outputs = response.choices[0].message.content.strip() # type: ignore - - except litellm.AuthenticationError as e: # type: ignore - e.message = e.message.replace( - "litellm.AuthenticationError: AuthenticationError: ", "" - ) - raise e - - except Exception as e: - raise PromptCompletionV0Error( - message=str(e), - stacktrace=traceback.format_exc(), - ) from e - # -------------------------------------------------------------------------- - - try: - _outputs = json.loads(_outputs) - except: - pass - - if isinstance(_outputs, (int, float)): - return { - "score": _outputs, - "success": _outputs >= threshold, - } - - if isinstance(_outputs, bool): - return { - "success": _outputs, - } - - if isinstance(_outputs, dict): - return _outputs - - raise InvalidOutputsV0Error(expected=["dict", "str", "int", "float"], got=_outputs) - - -@instrument(annotate=True) -def auto_starts_with_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Starts with evaluator for checking if output starts with a specific prefix. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with prefix and case sensitivity setting - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "prefix" in parameters: - raise MissingConfigurationParameterV0Error(path="prefix") - - prefix = parameters["prefix"] - - if not isinstance(prefix, str): - raise InvalidConfigurationParameterV0Error( - path="prefix", - expected="str", - got=prefix, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - prefix = prefix.lower() - - success = outputs_str.startswith(prefix) - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_ends_with_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Ends with evaluator for checking if output ends with a specific suffix. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with suffix and case sensitivity setting - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "suffix" in parameters: - raise MissingConfigurationParameterV0Error(path="suffix") - - suffix = parameters["suffix"] - - if not isinstance(suffix, str): - raise InvalidConfigurationParameterV0Error( - path="suffix", - expected="str", - got=suffix, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - suffix = suffix.lower() - - success = outputs_str.endswith(suffix) - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_contains_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Contains evaluator for checking if output contains a specific substring. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with substring and case sensitivity setting - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "substring" in parameters: - raise MissingConfigurationParameterV0Error(path="substring") - - substring = parameters["substring"] - - if not isinstance(substring, str): - raise InvalidConfigurationParameterV0Error( - path="substring", - expected="str", - got=substring, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - substring = substring.lower() - - success = substring in outputs_str - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_contains_any_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Contains any evaluator for checking if output contains any of the specified substrings. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with substrings list and case sensitivity setting - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "substrings" in parameters: - raise MissingConfigurationParameterV0Error(path="substrings") - - substrings = parameters["substrings"] - - if not isinstance(substrings, list): - raise InvalidConfigurationParameterV0Error( - path="substrings", - expected="list", - got=substrings, - ) - - substrings = [s.strip() for s in substrings] - - if not all(isinstance(s, str) for s in substrings): - raise InvalidConfigurationParameterV0Error( - path="substrings", - expected="list[str]", - got=substrings, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - substrings = [s.lower() for s in substrings] - - success = any(substring in outputs_str for substring in substrings) - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_contains_all_v0( - parameters: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Contains all evaluator for checking if output contains all of the specified substrings. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with substrings list and case sensitivity setting - - Returns: - Evaluation result with success flag - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "substrings" in parameters: - raise MissingConfigurationParameterV0Error(path="substrings") - - substrings = parameters["substrings"] - - if not isinstance(substrings, list): - raise InvalidConfigurationParameterV0Error( - path="substrings", - expected="list", - got=substrings, - ) - - substrings = [s.strip() for s in substrings] - - if not all(isinstance(s, str) for s in substrings): - raise InvalidConfigurationParameterV0Error( - path="substrings", - expected="list[str]", - got=substrings, - ) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - substrings = [s.lower() for s in substrings] - - success = all(substring in outputs_str for substring in substrings) - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_contains_json_v0( - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Contains JSON evaluator for checking if output contains valid JSON content. - - Args: - inputs: Testcase data - outputs: Output from the workflow execution - parameters: Configuration for the evaluator - - Returns: - Evaluation result with success flag - """ - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - # -------------------------------------------------------------------------- - success = True - potential_json = "" - - try: - start_index = outputs_str.index("{") - end_index = outputs_str.rindex("}") + 1 - potential_json = outputs_str[start_index:end_index] - except Exception: # pylint: disable=broad-exception-caught - success = False - - if success: - try: - json.loads(potential_json) - except Exception: # pylint: disable=broad-exception-caught - success = False - # -------------------------------------------------------------------------- - - return {"success": success} - - -@instrument(annotate=True) -def auto_json_diff_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - JSON diff evaluator for finding differences between JSON structures. - - Args: - inputs: Testcase data with reference JSON - outputs: Output from the workflow execution - parameters: Configuration for the evaluator - - Returns: - Evaluation result with score only (no diff explanation) - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(correct_answer, str) and not isinstance(correct_answer, dict): - raise InvalidInputV0Error( - path=correct_answer_key, expected=["dict", "str"], got=correct_answer - ) - - correct_answer_dict = ( - correct_answer if isinstance(correct_answer, dict) else loads(correct_answer) - ) - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_dict = outputs - if isinstance(outputs, str): - try: - outputs_dict = loads(outputs) - except json.JSONDecodeError as e: - raise InvalidOutputsV0Error(expected="dict", got=outputs) from e - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - try: - _outputs = _compare_jsons( - ground_truth=correct_answer_dict, - app_output=outputs_dict, # type: ignore - settings_values=parameters, - ) - - except Exception as e: - raise JSONDiffV0Error(message=str(e), stacktrace=traceback.format_exc()) from e - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - raise JSONDiffV0Error( - message=f"json-diff error: got ({type(_outputs)}) {_outputs}, expected (int, float)." - ) - - -@instrument(annotate=True) -def auto_levenshtein_distance_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Levenshtein distance evaluator using pure Python implementation. - Measures edit distance and returns normalized similarity score. - - Args: - inputs: Testcase data with reference string. - outputs: Output from the workflow execution. - parameters: Configuration for the evaluator. - - Returns: - Dictionary with normalized similarity score (0 to 1), - or error message if evaluation fails. - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(correct_answer, str) and not isinstance(correct_answer, dict): - raise InvalidInputV0Error( - path=correct_answer_key, expected=["dict", "str"], got=correct_answer - ) - - correct_answer_str = ( - correct_answer if isinstance(correct_answer, str) else dumps(correct_answer) - ) - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - correct_answer_str = correct_answer_str.lower() - - try: - # Compute Levenshtein distance - if len(correct_answer_str) == 0: - distance = len(outputs_str) - else: - previous_row = list(range(len(correct_answer_str) + 1)) - for i, c1 in enumerate(outputs_str): - current_row = [i + 1] - for j, c2 in enumerate(correct_answer_str): - insert = previous_row[j + 1] + 1 - delete = current_row[j] + 1 - substitute = previous_row[j] + (c1 != c2) - current_row.append(min(insert, delete, substitute)) - previous_row = current_row - distance = previous_row[-1] - - # Normalize similarity score - max_length = max(len(outputs_str), len(correct_answer_str)) - _outputs = 1.0 if max_length == 0 else 1.0 - (distance / max_length) - except Exception as e: - raise LevenshteinDistanceV0Error( - message=str(e), stacktrace=traceback.format_exc() - ) from e - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - raise LevenshteinDistanceV0Error( - message=f"levenshtein-distance error: got ({type(_outputs)}) {_outputs}, expected (int, float)." - ) - - -@instrument(annotate=True) -def auto_similarity_match_v0( - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Similarity match evaluator for measuring string similarity between output and reference. - - Args: - inputs: Testcase data with reference string - outputs: Output from the workflow execution - parameters: Configuration for the evaluator - - Returns: - Evaluation result with similarity score - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - case_sensitive = parameters.get("case_sensitive", True) is True - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(correct_answer, str) and not isinstance(correct_answer, dict): - raise InvalidInputV0Error( - path=correct_answer_key, expected=["dict", "str"], got=correct_answer - ) - - correct_answer_str = ( - correct_answer if isinstance(correct_answer, str) else dumps(correct_answer) - ) - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - threshold = ( - parameters.get("threshold") or parameters.get("similarity_threshold") or 0.5 - ) - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - if not case_sensitive: - outputs_str = outputs_str.lower() - correct_answer_str = correct_answer_str.lower() - - try: - matcher = SequenceMatcher(None, outputs_str, correct_answer_str) - - _outputs = matcher.ratio() - except Exception as e: - raise SyntacticSimilarityV0Error( - message=str(e), stacktrace=traceback.format_exc() - ) from e - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - raise SyntacticSimilarityV0Error( - message=f"syntactic-similarity-match error: got ({type(_outputs)}) {_outputs}, expected (int, float)." - ) - - -@instrument(annotate=True) -async def auto_semantic_similarity_v0( - *, - parameters: Optional[Data] = None, - inputs: Optional[Data] = None, - outputs: Optional[Union[Data, str]] = None, -) -> Any: - """ - Semantic similarity evaluator for measuring semantic similarity between output and reference using embeddings. - - Args: - inputs: Testcase data with reference string - outputs: Output from the workflow execution - parameters: Configuration for the evaluator with embedding model and credentials - - Returns: - Evaluation result with cosine similarity score - """ - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "correct_answer_key" in parameters: - raise MissingConfigurationParameterV0Error(path="correct_answer_key") - - correct_answer_key = str(parameters["correct_answer_key"]) - - embedding_model = parameters.get("embedding_model", "text-embedding-3-small") - - if not isinstance(embedding_model, str): - raise InvalidConfigurationParametersV0Error(expected="str", got=embedding_model) - - if inputs is None or not isinstance(inputs, dict): - raise InvalidInputsV0Error(expected="dict", got=inputs) - - if not correct_answer_key in inputs: - raise MissingInputV0Error(path=correct_answer_key) - - correct_answer = inputs[correct_answer_key] - - if not isinstance(correct_answer, str) and not isinstance(correct_answer, dict): - raise InvalidInputV0Error( - path=correct_answer_key, expected=["dict", "str"], got=correct_answer - ) - - correct_answer_str = ( - correct_answer if isinstance(correct_answer, str) else dumps(correct_answer) - ) - - if not isinstance(outputs, str) and not isinstance(outputs, dict): - raise InvalidOutputsV0Error(expected=["dict", "str"], got=outputs) - - outputs_str = outputs if isinstance(outputs, str) else dumps(outputs) - - secrets = await SecretsManager.retrieve_secrets() - - if secrets is None or not isinstance(secrets, list): - raise InvalidSecretsV0Error(expected="list", got=secrets) - - openai_api_key = None # secrets.get("OPENAI_API_KEY") - - for secret in secrets: - if secret.get("kind") == "provider_key": - secret_data = secret.get("data", {}) - if secret_data.get("kind") == "openai": - provider_data = secret_data.get("provider", {}) - openai_api_key = provider_data.get("key") or openai_api_key - - threshold = parameters.get("threshold") or 0.5 - - if not isinstance(threshold, float): - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float", - got=threshold, - ) - - if not 0.0 < threshold <= 1.0: - raise InvalidConfigurationParameterV0Error( - path="threshold", - expected="float[0.0, 1.0]", - got=threshold, - ) - - _outputs = None - - # -------------------------------------------------------------------------- - try: - openai = AsyncOpenAI(api_key=openai_api_key) - except OpenAIError as e: - raise OpenAIError("OpenAIException - " + e.args[0]) - - output_embedding = await _compute_embedding( - openai, - embedding_model, - outputs_str, - ) - - reference_embedding = await _compute_embedding( - openai, - embedding_model, - correct_answer_str, - ) - - _outputs = float( - _compute_similarity( - output_embedding, - reference_embedding, - ) - ) - # -------------------------------------------------------------------------- - - if isinstance(_outputs, (int, float)): - return {"score": _outputs, "success": _outputs >= threshold} - - raise SemanticSimilarityV0Error( - message=f"semantic-similarity error: got ({type(_outputs)}) {_outputs}, expected (int, float)." - ) - - -class SinglePromptConfig(BaseModel): - prompt: PromptTemplate = Field( - default=PromptTemplate( - system_prompt="You are an expert in geography", - user_prompt="What is the capital of {{country}}?", - ) - ) - - -@instrument() -async def completion_v0( - parameters: Data, - inputs: Dict[str, str], -) -> Any: - if parameters is None or not isinstance(parameters, dict): - raise InvalidConfigurationParametersV0Error(expected="dict", got=parameters) - - if not "prompt" in parameters: - raise MissingConfigurationParameterV0Error(path="prompt") - - params: Dict[str, Any] = {**(parameters or {})} - - config = SinglePromptConfig(**params) - if config.prompt.input_keys is not None: - required_keys = set(config.prompt.input_keys) - provided_keys = set(inputs.keys()) - - if required_keys != provided_keys: - raise InvalidInputsV0Error( - expected=sorted(required_keys), - got=sorted(provided_keys), - ) - - await SecretsManager.ensure_secrets_in_workflow() - - provider_settings = SecretsManager.get_provider_settings_from_workflow( - config.prompt.llm_config.model - ) - - if not provider_settings: - raise InvalidSecretsV0Error(expected="dict", got=provider_settings) - - with mockllm.user_aws_credentials_from(provider_settings): - response = await mockllm.acompletion( - **{ - k: v - for k, v in config.prompt.format(**inputs).to_openai_kwargs().items() - if k != "model" - }, - **provider_settings, - ) - - message = response.choices[0].message # type: ignore - - if message.content is not None: - return message.content - if hasattr(message, "refusal") and message.refusal is not None: # type: ignore - return message.refusal # type: ignore - if hasattr(message, "parsed") and message.parsed is not None: # type: ignore - return message.parsed # type: ignore - if hasattr(message, "tool_calls") and message.tool_calls is not None: - return [tool_call.dict() for tool_call in message.tool_calls] - - -@instrument() -async def chat_v0( - parameters: Data, - inputs: Optional[Dict[str, str]] = None, - messages: Optional[List[Message]] = None, -): - params: Dict[str, Any] = {**(parameters or {})} - - config = SinglePromptConfig(**params) - if config.prompt.input_keys is not None: - required_keys = set(config.prompt.input_keys) - provided_keys = set(inputs.keys()) if inputs is not None else set() - - if required_keys != provided_keys: - raise InvalidInputsV0Error( - expected=sorted(required_keys), - got=sorted(provided_keys), - ) - - if inputs is not None: - formatted_prompt = config.prompt.format(**inputs) - else: - formatted_prompt = config.prompt - openai_kwargs = formatted_prompt.to_openai_kwargs() - - if messages is not None: - openai_kwargs["messages"].extend(messages) - - await SecretsManager.ensure_secrets_in_workflow() - - provider_settings = SecretsManager.get_provider_settings_from_workflow( - config.prompt.llm_config.model - ) - - if not provider_settings: - raise InvalidSecretsV0Error(expected="dict", got=provider_settings) - - with mockllm.user_aws_credentials_from(provider_settings): - response = await mockllm.acompletion( - **{ - k: v for k, v in openai_kwargs.items() if k != "model" - }, # we should use the model_name from provider_settings - **provider_settings, - ) - - return response.choices[0].message.model_dump(exclude_none=True) # type: ignore diff --git a/sdk/agenta/sdk/workflows/interfaces.py b/sdk/agenta/sdk/workflows/interfaces.py deleted file mode 100644 index 85334ab6cb..0000000000 --- a/sdk/agenta/sdk/workflows/interfaces.py +++ /dev/null @@ -1,948 +0,0 @@ -from agenta.sdk.models.workflows import WorkflowServiceInterface - -echo_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:echo:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Echo Parameters", - "description": "No configuration parameters required.", - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Echo Input", - "description": "Arbitrary input to be echoed back.", - }, - outputs={ - "type": "object", - "title": "Echo Output", - "description": "The echoed response object.", - "properties": { - "got": { - "type": "string", - "title": "Echoed Value", - "description": "The input value passed back unchanged.", - } - }, - "required": ["got"], - "additionalProperties": False, - }, - ), -) - -auto_exact_match_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_exact_match:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Exact Match Parameters", - "description": "Configuration for the Exact Match evaluator.", - "properties": { - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "The name of the column in the test data that contains the correct answer.", - "default": "correct_answer", - } - }, - "required": ["correct_answer_key"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Exact Match Inputs", - "description": "Testcase data including the correct answer.", - }, - outputs={ - "type": "object", - "title": "Exact Match Outputs", - "description": "Result indicating whether the output exactly matched the expected answer.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if the outputs exactly matched, False otherwise.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_regex_test_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_regex_test:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Regex Test Parameters", - "description": "Settings for evaluating whether output matches a regex pattern.", - "properties": { - "regex_pattern": { - "type": "string", - "title": "Regex Pattern", - "description": "Pattern for regex testing (e.g., ^this_word\\d{3}$).", - "default": "", - }, - "regex_should_match": { - "type": "boolean", - "title": "Match or Mismatch", - "description": "If True, regex must match; if False, regex must not match.", - "default": True, - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, regex matching is case-sensitive.", - "default": True, - }, - }, - "required": ["regex_pattern"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Regex Test Inputs", - "description": "Output from the workflow execution to be tested against the regex.", - }, - outputs={ - "type": "object", - "title": "Regex Test Outputs", - "description": "Result indicating whether regex matched as configured.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if regex condition passed, False otherwise.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -field_match_test_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:field_match_test:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Field Match Parameters", - "description": "Settings for comparing a specific JSON field against the expected answer.", - "properties": { - "json_field": { - "type": "string", - "title": "JSON Field", - "description": "The field in the JSON output to evaluate.", - "default": "", - }, - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - }, - "required": ["json_field", "correct_answer_key"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Field Match Inputs", - "description": "Testcase data including the correct answer.", - }, - outputs={ - "type": "object", - "title": "Field Match Outputs", - "description": "Result indicating whether the selected field matched the expected answer.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if the JSON field matched the expected answer.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_webhook_test_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_webhook_test:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Webhook Test Parameters", - "description": "Settings for sending evaluation requests to a webhook service.", - "properties": { - "webhook_url": { - "type": "string", - "format": "uri", - "title": "Webhook URL", - "description": "The endpoint that will receive the evaluation payload.", - }, - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Score threshold to determine success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - }, - "required": ["webhook_url"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Webhook Test Inputs", - "description": "Payload including inputs, output, and correct answer sent to the webhook.", - }, - outputs={ - "type": "object", - "title": "Webhook Test Outputs", - "description": "Score and success flag returned by the webhook evaluation.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Numeric evaluation score returned by the webhook.", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if the score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_custom_code_run_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_custom_code_run:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Custom Code Evaluation Parameters", - "description": "Settings for running custom Python code to evaluate workflow outputs.", - "properties": { - "code": { - "type": "string", - "title": "Evaluation Code", - "description": "Python code snippet that will be executed to evaluate the output.", - "default": ( - "from typing import Dict, Union, Any\n\n" - "def evaluate(\n" - " app_params: Dict[str, str],\n" - " inputs: Dict[str, str],\n" - " output: Union[str, Dict[str, Any]],\n" - " correct_answer: str\n" - ") -> float:\n" - " if output in correct_answer:\n" - " return 1.0\n" - " return 0.0\n" - ), - }, - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in the test data containing the correct answer.", - "default": "correct_answer", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Score threshold used to determine success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - }, - "required": ["code"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Custom Code Evaluation Inputs", - "description": "Testcase data and workflow outputs available to the custom code.", - }, - outputs={ - "type": "object", - "title": "Custom Code Evaluation Outputs", - "description": "Score and success flag returned by the custom evaluation code.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Numeric score computed by the custom code.", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_ai_critique_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_ai_critique:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "LLM-as-a-Judge Parameters", - "description": "Configuration for using an AI model to critique workflow outputs.", - "properties": { - "prompt_template": { - "type": "array", - "title": "Prompt Template", - "description": "Template messages used by the LLM to evaluate outputs.", - "items": {"type": "object"}, - }, - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - "model": { - "type": "string", - "title": "Model", - "description": "The LLM model to use for evaluation.", - "default": "gpt-3.5-turbo", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Score threshold to determine success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - "version": { - "type": "string", - "title": "Evaluator Version", - "description": "Internal evaluator version identifier.", - "default": "3", - }, - }, - "required": ["prompt_template"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "AI Critique Inputs", - "description": "Testcase data and workflow outputs provided to the LLM judge.", - }, - outputs={ - "type": "object", - "title": "AI Critique Outputs", - "description": "Score and success flag returned by the AI critique evaluator.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Numeric evaluation score assigned by the AI.", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if the score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_starts_with_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_starts_with:v0", - schemas=dict( # type: ignore # type: ignore - parameters={ - "type": "object", - "title": "Starts With Parameters", - "description": "Configuration for checking if output starts with a specific prefix.", - "properties": { - "prefix": { - "type": "string", - "title": "Prefix", - "description": "The string to match at the start of the output.", - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, matching is case-sensitive.", - "default": True, - }, - }, - "required": ["prefix"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Starts With Inputs", - "description": "Workflow output to be checked against the prefix.", - }, - outputs={ - "type": "object", - "title": "Starts With Outputs", - "description": "Result of the prefix check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if output starts with the given prefix.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_ends_with_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_ends_with:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Ends With Parameters", - "description": "Configuration for checking if output ends with a specific suffix.", - "properties": { - "suffix": { - "type": "string", - "title": "Suffix", - "description": "The string to match at the end of the output.", - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, matching is case-sensitive.", - "default": True, - }, - }, - "required": ["suffix"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Ends With Inputs", - "description": "Workflow output to be checked against the suffix.", - }, - outputs={ - "type": "object", - "title": "Ends With Outputs", - "description": "Result of the suffix check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if output ends with the given suffix.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_contains_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_contains:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Contains Parameters", - "description": "Configuration for checking if output contains a given substring.", - "properties": { - "substring": { - "type": "string", - "title": "Substring", - "description": "The string to check for in the output.", - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, substring search is case-sensitive.", - "default": True, - }, - }, - "required": ["substring"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Contains Inputs", - "description": "Workflow output to be checked for substring presence.", - }, - outputs={ - "type": "object", - "title": "Contains Outputs", - "description": "Result of the substring presence check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if substring is found in the output.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_contains_any_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_contains_any:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Contains Any Parameters", - "description": "Configuration for checking if output contains any of the specified substrings.", - "properties": { - "substrings": { - "type": "array", - "title": "Substrings", - "description": "List of substrings to check for. The evaluation passes if any substring is found.", - "items": {"type": "string"}, - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, substring checks are case-sensitive.", - "default": True, - }, - }, - "required": ["substrings"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Contains Any Inputs", - "description": "Workflow output to be checked for substrings.", - }, - outputs={ - "type": "object", - "title": "Contains Any Outputs", - "description": "Result of the 'contains any' substring check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if any substring is found in the output.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_contains_all_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_contains_all:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Contains All Parameters", - "description": "Configuration for checking if output contains all of the specified substrings.", - "properties": { - "substrings": { - "type": "array", - "title": "Substrings", - "description": "List of substrings to check for. The evaluation passes only if all substrings are found.", - "items": {"type": "string"}, - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, substring checks are case-sensitive.", - "default": True, - }, - }, - "required": ["substrings"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Contains All Inputs", - "description": "Workflow output to be checked for substrings.", - }, - outputs={ - "type": "object", - "title": "Contains All Outputs", - "description": "Result of the 'contains all' substring check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if all substrings are found in the output.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_contains_json_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_contains_json:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Contains JSON Parameters", - "description": "No configuration parameters required.", - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Contains JSON Inputs", - "description": "Workflow output to be checked for valid JSON content.", - }, - outputs={ - "type": "object", - "title": "Contains JSON Outputs", - "description": "Result of the JSON validity check.", - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "True if valid JSON content was found in the output.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, - ), -) - -auto_json_diff_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_json_diff:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "JSON Diff Parameters", - "description": "Settings for comparing predicted JSON output against ground truth JSON.", - "properties": { - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct JSON answer.", - "default": "correct_answer", - }, - "compare_schema_only": { - "type": "boolean", - "title": "Compare Schema Only", - "description": "If True, only keys and their types are compared; values are ignored.", - "default": False, - }, - "predict_keys": { - "type": "boolean", - "title": "Include Prediction Keys", - "description": "If True, prediction keys not present in ground truth are ignored.", - "default": False, - }, - "case_insensitive_keys": { - "type": "boolean", - "title": "Case-Insensitive Keys", - "description": "If True, key comparisons are case-insensitive.", - "default": False, - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Minimum similarity score required for success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - }, - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "JSON Diff Inputs", - "description": "Workflow output and ground truth JSON to compare.", - }, - outputs={ - "type": "object", - "title": "JSON Diff Outputs", - "description": "Score and success flag for the JSON comparison.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Similarity score between prediction and ground truth.", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_levenshtein_distance_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_levenshtein_distance:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Levenshtein Distance Parameters", - "description": "Settings for computing normalized Levenshtein similarity between outputs and ground truth.", - "properties": { - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Minimum similarity score required for success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, comparison is case-sensitive.", - "default": True, - }, - }, - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Levenshtein Inputs", - "description": "Workflow output and ground truth string to compare.", - }, - outputs={ - "type": "object", - "title": "Levenshtein Outputs", - "description": "Score and success flag for the Levenshtein similarity comparison.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Normalized Levenshtein similarity score (0–1).", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_similarity_match_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_similarity_match:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Similarity Match Parameters", - "description": "Settings for comparing predicted output against ground truth using string similarity.", - "properties": { - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Minimum similarity score required for success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - "similarity_threshold": { - "type": "number", - "title": "Similarity Threshold (Alias)", - "description": "Alternative field for threshold, retained for compatibility.", - "minimum": 0, - "maximum": 1, - }, - "case_sensitive": { - "type": "boolean", - "title": "Case Sensitive", - "description": "If True, similarity comparison is case-sensitive.", - "default": True, - }, - }, - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Similarity Match Inputs", - "description": "Workflow output and ground truth string to compare.", - }, - outputs={ - "type": "object", - "title": "Similarity Match Outputs", - "description": "Score and success flag for the similarity comparison.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Similarity score (0–1).", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -auto_semantic_similarity_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:auto_semantic_similarity:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Semantic Similarity Parameters", - "description": "Settings for semantic similarity using embeddings.", - "properties": { - "correct_answer_key": { - "type": "string", - "title": "Expected Answer Column", - "description": "Column in test data containing the correct answer.", - "default": "correct_answer", - }, - "embedding_model": { - "type": "string", - "title": "Embedding Model", - "description": "The model used to generate embeddings.", - "default": "text-embedding-3-small", - }, - "threshold": { - "type": "number", - "title": "Threshold", - "description": "Minimum semantic similarity score required for success.", - "minimum": 0, - "maximum": 1, - "default": 0.5, - }, - }, - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Semantic Similarity Inputs", - "description": "Workflow output and ground truth string to embed and compare.", - }, - outputs={ - "type": "object", - "title": "Semantic Similarity Outputs", - "description": "Score and success flag for the semantic similarity comparison.", - "properties": { - "score": { - "type": "number", - "title": "Score", - "description": "Cosine similarity score between output and ground truth embeddings.", - }, - "success": { - "type": "boolean", - "title": "Success", - "description": "True if score meets or exceeds the threshold.", - }, - }, - "required": ["score", "success"], - "additionalProperties": False, - }, - ), -) - -completion_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:completion:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Completion App Parameters", - "description": "Configuration for running a completion workflow.", - "properties": { - "prompt": { - "type": "object", - "title": "Prompt Template", - "description": "Prompt template configuration including system and user prompts.", - } - }, - "required": ["prompt"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Completion App Inputs", - "description": "Inputs required by the completion workflow, matching the prompt template’s input keys.", - }, - outputs={ - "type": ["string", "object", "array"], - "title": "Completion App Outputs", - "description": "Generated response, which may be text or structured data.", - }, - ), -) - -chat_v0_interface = WorkflowServiceInterface( - uri="agenta:built-in:chat:v0", - schemas=dict( # type: ignore - parameters={ - "type": "object", - "title": "Chat App Parameters", - "description": "Configuration for running a chat-based workflow.", - "properties": { - "prompt": { - "type": "object", - "title": "Prompt Template", - "description": "Prompt template configuration for initializing the chat.", - } - }, - "required": ["prompt"], - "additionalProperties": False, - }, - inputs={ - "type": "object", - "title": "Chat App Inputs", - "description": "Optional inputs provided to format the prompt.", - }, - outputs={ - "type": "object", - "title": "Chat App Outputs", - "description": "Final chat message returned by the workflow.", - "properties": { - "role": { - "type": "string", - "description": "Role of the message sender.", - }, - "content": {"type": "string", "description": "Content of the message."}, - }, - "required": ["role", "content"], - "additionalProperties": True, # allows OpenAI-style message fields like tool_calls - }, - ), -) diff --git a/sdk/agenta/sdk/workflows/sandbox.py b/sdk/agenta/sdk/workflows/sandbox.py deleted file mode 100644 index fc9f5386e2..0000000000 --- a/sdk/agenta/sdk/workflows/sandbox.py +++ /dev/null @@ -1,118 +0,0 @@ -from typing import Union, Text, Dict, Any - -from RestrictedPython import safe_builtins, compile_restricted, utility_builtins -from RestrictedPython.Eval import ( - default_guarded_getiter, - default_guarded_getitem, -) -from RestrictedPython.Guards import ( - guarded_iter_unpack_sequence, - full_write_guard, -) - - -def is_import_safe(python_code: Text) -> bool: - """Checks if the imports in the python code contains a system-level import. - - Args: - python_code (str): The Python code to be executed - - Returns: - bool - module is secured or not - """ - - disallowed_imports = ["os", "subprocess", "threading", "multiprocessing"] - for import_ in disallowed_imports: - if import_ in python_code: - return False - return True - - -def execute_code_safely( - app_params: Dict[str, Any], - inputs: Dict[str, Any], - output: Union[dict, str], - correct_answer: Any, # for backward compatibility reasons - code: Text, -) -> Union[float, None]: - """ - Execute the provided Python code safely using RestrictedPython. - - Args: - - app_params (Dict[str, str]): The parameters of the app variant. - - inputs (dict): Inputs to be used during code execution. - - output (str): The output of the app variant after being called. - - correct_answer (str): The correct answer (or target) of the app variant. - - code (Text): The Python code to be executed. - - datapoint (Dict[str, str]): The test datapoint. - - Returns: - - (float): Result of the execution if successful. Should be between 0 and 1. - - None if execution fails or result is not a float between 0 and 1. - """ - # Define the available built-ins - local_builtins = safe_builtins.copy() - - # Add the __import__ built-in function to the local builtins - local_builtins["__import__"] = __import__ - - # Define supported packages - allowed_imports = [ - "math", - "random", - "datetime", - "json", - "requests", - "typing", - ] - - # Create a dictionary to simulate allowed imports - allowed_modules = {} - for package_name in allowed_imports: - allowed_modules[package_name] = __import__(package_name) - - # Add the allowed modules to the local built-ins - local_builtins.update(allowed_modules) - local_builtins.update(utility_builtins) - - # Define the environment for the code execution - environment = { - "_getiter_": default_guarded_getiter, - "_getitem_": default_guarded_getitem, - "_iter_unpack_sequence_": guarded_iter_unpack_sequence, - "_write_": full_write_guard, - "__builtins__": local_builtins, - } - - # Compile the code in a restricted environment - byte_code = compile_restricted(code, filename="<inline>", mode="exec") - - # Call the evaluation function, extract the result if it exists - # and is a float between 0 and 1 - try: - # Execute the code - exec(byte_code, environment) - - # Call the evaluation function, extract the result - result = environment["evaluate"](app_params, inputs, output, correct_answer) - - # Attempt to convert result to float - if isinstance(result, (float, int, str)): - try: - result = float(result) - except ValueError as e: - raise ValueError(f"Result cannot be converted to float: {e}") - - if not isinstance(result, float): - raise TypeError(f"Result is not a float after conversion: {type(result)}") - - return result - - except KeyError as e: - raise KeyError(f"Missing expected key in environment: {e}") - - except SyntaxError as e: - raise SyntaxError(f"Syntax error in provided code: {e}") - - except Exception as e: - raise RuntimeError(f"Error during code execution: {e}") diff --git a/sdk/agenta/sdk/workflows/utils.py b/sdk/agenta/sdk/workflows/utils.py deleted file mode 100644 index d86f499da4..0000000000 --- a/sdk/agenta/sdk/workflows/utils.py +++ /dev/null @@ -1,314 +0,0 @@ -# /agenta/sdk/workflows/utils.py - -from typing import Optional, Tuple, Callable - -from agenta.sdk.models.workflows import WorkflowServiceInterface - -from agenta.sdk.workflows.handlers import ( - echo_v0, - auto_exact_match_v0, - auto_regex_test_v0, - field_match_test_v0, - auto_webhook_test_v0, - auto_custom_code_run_v0, - auto_ai_critique_v0, - auto_starts_with_v0, - auto_ends_with_v0, - auto_contains_v0, - auto_contains_any_v0, - auto_contains_all_v0, - auto_contains_json_v0, - auto_json_diff_v0, - auto_levenshtein_distance_v0, - auto_similarity_match_v0, - auto_semantic_similarity_v0, - completion_v0, - chat_v0, -) - -from agenta.sdk.workflows.interfaces import ( - echo_v0_interface, - auto_exact_match_v0_interface, - auto_regex_test_v0_interface, - field_match_test_v0_interface, - auto_webhook_test_v0_interface, - auto_custom_code_run_v0_interface, - auto_ai_critique_v0_interface, - auto_starts_with_v0_interface, - auto_ends_with_v0_interface, - auto_contains_v0_interface, - auto_contains_any_v0_interface, - auto_contains_all_v0_interface, - auto_contains_json_v0_interface, - auto_json_diff_v0_interface, - auto_levenshtein_distance_v0_interface, - auto_similarity_match_v0_interface, - auto_semantic_similarity_v0_interface, - completion_v0_interface, - chat_v0_interface, -) - - -from agenta.sdk.workflows.configurations import ( - echo_v0_configuration, - auto_exact_match_v0_configuration, - auto_regex_test_v0_configuration, - field_match_test_v0_configuration, - auto_webhook_test_v0_configuration, - auto_custom_code_run_v0_configuration, - auto_ai_critique_v0_configuration, - auto_starts_with_v0_configuration, - auto_ends_with_v0_configuration, - auto_contains_v0_configuration, - auto_contains_any_v0_configuration, - auto_contains_all_v0_configuration, - auto_contains_json_v0_configuration, - auto_json_diff_v0_configuration, - auto_levenshtein_distance_v0_configuration, - auto_similarity_match_v0_configuration, - auto_semantic_similarity_v0_configuration, - completion_v0_configuration, - chat_v0_configuration, -) - -INTERFACE_REGISTRY: dict = dict( - agenta={ - "built-in": dict( - echo=dict(v0=echo_v0_interface), - auto_exact_match=dict(v0=auto_exact_match_v0_interface), - auto_regex_test=dict(v0=auto_regex_test_v0_interface), - field_match_test=dict(v0=field_match_test_v0_interface), - auto_webhook_test=dict(v0=auto_webhook_test_v0_interface), - auto_custom_code_run=dict(v0=auto_custom_code_run_v0_interface), - auto_ai_critique=dict(v0=auto_ai_critique_v0_interface), - auto_starts_with=dict(v0=auto_starts_with_v0_interface), - auto_ends_with=dict(v0=auto_ends_with_v0_interface), - auto_contains=dict(v0=auto_contains_v0_interface), - auto_contains_any=dict(v0=auto_contains_any_v0_interface), - auto_contains_all=dict(v0=auto_contains_all_v0_interface), - auto_contains_json=dict(v0=auto_contains_json_v0_interface), - auto_json_diff=dict(v0=auto_json_diff_v0_interface), - auto_levenshtein_distance=dict(v0=auto_levenshtein_distance_v0_interface), - auto_similarity_match=dict(v0=auto_similarity_match_v0_interface), - auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0_interface), - completion=dict(v0=completion_v0_interface), - chat=dict(v0=chat_v0_interface), - ), - }, -) - -CONFIGURATION_REGISTRY: dict = dict( - agenta={ - "built-in": dict( - echo=dict(v0=echo_v0_configuration), - auto_exact_match=dict(v0=auto_exact_match_v0_configuration), - auto_regex_test=dict(v0=auto_regex_test_v0_configuration), - field_match_test=dict(v0=field_match_test_v0_configuration), - auto_webhook_test=dict(v0=auto_webhook_test_v0_configuration), - auto_custom_code_run=dict(v0=auto_custom_code_run_v0_configuration), - auto_ai_critique=dict(v0=auto_ai_critique_v0_configuration), - auto_starts_with=dict(v0=auto_starts_with_v0_configuration), - auto_ends_with=dict(v0=auto_ends_with_v0_configuration), - auto_contains=dict(v0=auto_contains_v0_configuration), - auto_contains_any=dict(v0=auto_contains_any_v0_configuration), - auto_contains_all=dict(v0=auto_contains_all_v0_configuration), - auto_contains_json=dict(v0=auto_contains_json_v0_configuration), - auto_json_diff=dict(v0=auto_json_diff_v0_configuration), - auto_levenshtein_distance=dict( - v0=auto_levenshtein_distance_v0_configuration - ), - auto_similarity_match=dict(v0=auto_similarity_match_v0_configuration), - auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0_configuration), - completion=dict(v0=completion_v0_configuration), - chat=dict(v0=chat_v0_configuration), - ), - }, -) - -# Global registry for workflow handlers organized by URI structure. -# -# URI Format: provider:kind:key:version -# -# Structure: -# HANDLER_REGISTRY[provider][kind][key][version] = handler_callable -# -# Components: -# - provider: The source/namespace of the handler (e.g., "agenta", "user") -# - kind: The category/type of handler (e.g., "built-in", "custom") -# - key: The unique identifier for the handler (e.g., "echo", "auto_exact_match", "module.function_name") -# - version: The version identifier (e.g., "v0", "v1", "latest") -# -# Examples: -# - URI: "agenta:built-in:echo:v0" -# Access: HANDLER_REGISTRY["agenta"]["built-in"]["echo"]["v0"] -# -# - URI: "user:custom:mymodule.my_workflow:latest" -# Access: HANDLER_REGISTRY["user"]["custom"]["mymodule.my_workflow"]["latest"] -# -# Usage: -# - register_handler(fn, uri) - Registers a new handler with the given URI -# - retrieve_handler(uri) - Retrieves a handler by its URI -# - retrieve_interface(uri) - Retrieves the interface configuration for a handler -# - retrieve_configuration(uri) - Retrieves default parameters for a handler -# -# The registry supports automatic URI generation for user-defined workflows: -# If no URI is provided, register_handler() generates: "user:custom:{module}.{name}:latest" -HANDLER_REGISTRY: dict = dict( - agenta={ - "built-in": dict( - echo=dict(v0=echo_v0), - auto_exact_match=dict(v0=auto_exact_match_v0), - auto_regex_test=dict(v0=auto_regex_test_v0), - field_match_test=dict(v0=field_match_test_v0), - auto_webhook_test=dict(v0=auto_webhook_test_v0), - auto_custom_code_run=dict(v0=auto_custom_code_run_v0), - auto_ai_critique=dict(v0=auto_ai_critique_v0), - auto_starts_with=dict(v0=auto_starts_with_v0), - auto_ends_with=dict(v0=auto_ends_with_v0), - auto_contains=dict(v0=auto_contains_v0), - auto_contains_any=dict(v0=auto_contains_any_v0), - auto_contains_all=dict(v0=auto_contains_all_v0), - auto_contains_json=dict(v0=auto_contains_json_v0), - auto_json_diff=dict(v0=auto_json_diff_v0), - auto_levenshtein_distance=dict(v0=auto_levenshtein_distance_v0), - auto_similarity_match=dict(v0=auto_similarity_match_v0), - auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0), - completion=dict(v0=completion_v0), - chat=dict(v0=chat_v0), - ), - }, -) - - -def parse_uri( - uri: str, -) -> Tuple[Optional[str], Optional[str], Optional[str], Optional[str]]: - if not uri or not uri.strip(): - return None, None, None, None - - parts = uri.split(":") - - # 1 → key - # 2 → kind:key - # 3 → provider:kind:key - # 4 → provider:kind:key:version - if len(parts) == 1: - provider, kind, key, version = "agenta", "built-in", parts[0], "latest" - elif len(parts) == 2: - provider, kind, key, version = "agenta", parts[0], parts[1], "latest" - elif len(parts) == 3: - provider, kind, key, version = parts[0], parts[1], parts[2], "latest" - elif len(parts) == 4: - provider, kind, key, version = parts[0], parts[1], parts[2], parts[3] - else: - return None, None, None, None - - return provider, kind, key, version - - -def register_handler(fn: Callable, uri: Optional[str] = None) -> str: - """Register a handler function in the global handler registry. - - Stores a callable in the HANDLER_REGISTRY with a hierarchical URI structure - of provider:kind:key:version. If no URI is provided, generates one automatically - using the function's module and name (user:custom:module.name:latest). - - The URI is parsed into components and used to create nested dictionary entries - in the registry for later retrieval by retrieve_handler(). - - Args: - fn: The callable function to register - uri: Optional URI string in format "provider:kind:key:version". - If None, auto-generates "user:custom:{module}.{name}:latest" - - Returns: - The URI string used for registration - - Raises: - ValueError: If the URI is invalid or missing required components - - Example: - >>> def my_workflow(): pass - >>> uri = register_handler(my_workflow, "user:custom:my_workflow:v1") - >>> uri - 'user:custom:my_workflow:v1' - """ - if not uri: - key = f"{fn.__module__}.{fn.__name__}" - uri = f"user:custom:{key}:latest" - - provider, kind, key, version = parse_uri(uri) # type: ignore - - if not provider or not kind or not key or not version: - raise ValueError(f"Invalid URI: {uri}") - - HANDLER_REGISTRY.setdefault(provider, {}).setdefault(kind, {}).setdefault( - key, {} - ).setdefault(version, fn) - - return uri - - -def _get_with_latest( - registry: dict, - provider: Optional[str] = None, - kind: Optional[str] = None, - key: Optional[str] = None, - version: Optional[str] = None, -): - kind_dict = registry.get(provider, {}).get(kind, {}).get(key, {}) - - if not isinstance(kind_dict, dict) or not kind_dict: - return None - - if version == "latest": - # if "latest" explicitly exists, prefer it - if "latest" in kind_dict: - return kind_dict.get("latest") - - # collect keys of the form vN - candidates = [ - (int(v[1:]), v) - for v in kind_dict.keys() - if isinstance(v, str) and v.startswith("v") and v[1:].isdigit() - ] - if not candidates: - return None - # get the highest int N - _, best_key = max(candidates, key=lambda x: x[0]) - return kind_dict.get(best_key) - - return kind_dict.get(version) - - -def retrieve_handler(uri: Optional[str] = None) -> Optional[Callable]: - if not uri: - return None - provider, kind, key, version = parse_uri(uri) - - return _get_with_latest(HANDLER_REGISTRY, provider, kind, key, version) - - -def retrieve_interface(uri: Optional[str] = None) -> Optional[WorkflowServiceInterface]: - if not uri: - return None - provider, kind, key, version = parse_uri(uri) - - return _get_with_latest(INTERFACE_REGISTRY, provider, kind, key, version) - - -def retrieve_configuration(uri: Optional[str] = None) -> Optional[dict]: - if not uri: - return None - provider, kind, key, version = parse_uri(uri) - - return _get_with_latest(CONFIGURATION_REGISTRY, provider, kind, key, version) - - -def is_custom_uri(uri: Optional[str] = None) -> bool: - if not uri: - return True - - provider, kind, key, version = parse_uri(uri) - - return provider == "user" and kind == "custom" diff --git a/sdk/patches/litellm_vertex_ai_partner_models.py b/sdk/patches/litellm_vertex_ai_partner_models.py deleted file mode 100644 index c68041f8f0..0000000000 --- a/sdk/patches/litellm_vertex_ai_partner_models.py +++ /dev/null @@ -1,248 +0,0 @@ -## litellm/llms/vertex_ai/vertex_ai_partner_models/main.py - -# What is this? -## API Handler for calling Vertex AI Partner Models -from enum import Enum -from typing import Callable, Optional, Union - -import httpx # type: ignore - -import litellm -from litellm import LlmProviders -from litellm.types.llms.vertex_ai import VertexPartnerProvider -from litellm.utils import ModelResponse - -from ...custom_httpx.llm_http_handler import BaseLLMHTTPHandler -from ..vertex_llm_base import VertexBase - -base_llm_http_handler = BaseLLMHTTPHandler() - - -class VertexAIError(Exception): - def __init__(self, status_code, message): - self.status_code = status_code - self.message = message - self.request = httpx.Request( - method="POST", url=" https://cloud.google.com/vertex-ai/" - ) - self.response = httpx.Response(status_code=status_code, request=self.request) - super().__init__( - self.message - ) # Call the base class constructor with the parameters it needs - - -class PartnerModelPrefixes(str, Enum): - META_PREFIX = "meta/" - DEEPSEEK_PREFIX = "deepseek-ai" - MISTRAL_PREFIX = "mistral" - CODERESTAL_PREFIX = "codestral" - JAMBA_PREFIX = "jamba" - CLAUDE_PREFIX = "claude" - QWEN_PREFIX = "qwen" - GPT_OSS_PREFIX = "openai/gpt-oss-" - - -class VertexAIPartnerModels(VertexBase): - @staticmethod - def is_vertex_partner_model(model: str): - """ - Check if the model string is a Vertex AI Partner Model - Only use this once you have confirmed that custom_llm_provider is vertex_ai - - Returns: - bool: True if the model string is a Vertex AI Partner Model, False otherwise - """ - if ( - model.startswith(PartnerModelPrefixes.META_PREFIX) - or model.startswith(PartnerModelPrefixes.DEEPSEEK_PREFIX) - or model.startswith(PartnerModelPrefixes.MISTRAL_PREFIX) - or model.startswith(PartnerModelPrefixes.CODERESTAL_PREFIX) - or model.startswith(PartnerModelPrefixes.JAMBA_PREFIX) - or model.startswith(PartnerModelPrefixes.CLAUDE_PREFIX) - or model.startswith(PartnerModelPrefixes.QWEN_PREFIX) - or model.startswith(PartnerModelPrefixes.GPT_OSS_PREFIX) - ): - return True - return False - - @staticmethod - def should_use_openai_handler(model: str): - OPENAI_LIKE_VERTEX_PROVIDERS = [ - "llama", - PartnerModelPrefixes.DEEPSEEK_PREFIX, - PartnerModelPrefixes.QWEN_PREFIX, - PartnerModelPrefixes.GPT_OSS_PREFIX, - ] - if any(provider in model for provider in OPENAI_LIKE_VERTEX_PROVIDERS): - return True - return False - - def completion( - self, - model: str, - messages: list, - model_response: ModelResponse, - print_verbose: Callable, - encoding, - logging_obj, - api_base: Optional[str], - optional_params: dict, - custom_prompt_dict: dict, - headers: Optional[dict], - timeout: Union[float, httpx.Timeout], - litellm_params: dict, - vertex_project=None, - vertex_location=None, - vertex_credentials=None, - logger_fn=None, - acompletion: bool = False, - client=None, - ): - try: - from litellm.llms.anthropic.chat import AnthropicChatCompletion - from litellm.llms.codestral.completion.handler import ( - CodestralTextCompletion, - ) - from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler - from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import ( - VertexLLM, - ) - except Exception as e: - raise VertexAIError( - status_code=400, message=f"Failed to import partner handlers: {e}" - ) - - try: - access_token, project_id = self._ensure_access_token( - credentials=vertex_credentials, - project_id=vertex_project, - custom_llm_provider="vertex_ai", - ) - - openai_like_chat_completions = OpenAILikeChatHandler() - codestral_fim_completions = CodestralTextCompletion() - anthropic_chat_completions = AnthropicChatCompletion() - - ## CONSTRUCT API BASE - stream: bool = optional_params.get("stream", False) or False - - optional_params["stream"] = stream - - if self.should_use_openai_handler(model): - partner = VertexPartnerProvider.llama - elif "mistral" in model or "codestral" in model: - partner = VertexPartnerProvider.mistralai - elif "jamba" in model: - partner = VertexPartnerProvider.ai21 - elif "claude" in model: - partner = VertexPartnerProvider.claude - else: - raise ValueError(f"Unknown partner model: {model}") - - api_base = self.get_complete_vertex_url( - custom_api_base=api_base, - vertex_location=vertex_location, - vertex_project=vertex_project, - project_id=project_id, - partner=partner, - stream=stream, - model=model, - ) - - if "codestral" in model or "mistral" in model: - model = model.split("@")[0] - - if "codestral" in model and litellm_params.get("text_completion") is True: - optional_params["model"] = model - text_completion_model_response = litellm.TextCompletionResponse( - stream=stream - ) - return codestral_fim_completions.completion( - model=model, - messages=messages, - api_base=api_base, - api_key=access_token, - custom_prompt_dict=custom_prompt_dict, - model_response=text_completion_model_response, - print_verbose=print_verbose, - logging_obj=logging_obj, - optional_params=optional_params, - acompletion=acompletion, - litellm_params=litellm_params, - logger_fn=logger_fn, - timeout=timeout, - encoding=encoding, - ) - elif "claude" in model: - if headers is None: - headers = {} - headers.update({"Authorization": "Bearer {}".format(access_token)}) - - optional_params.update( - { - "anthropic_version": "vertex-2023-10-16", - "is_vertex_request": True, - } - ) - - return anthropic_chat_completions.completion( - model=model, - messages=messages, - api_base=api_base, - acompletion=acompletion, - custom_prompt_dict=litellm.custom_prompt_dict, - model_response=model_response, - print_verbose=print_verbose, - optional_params=optional_params, - litellm_params=litellm_params, - logger_fn=logger_fn, - encoding=encoding, # for calculating input/output tokens - api_key=access_token, - logging_obj=logging_obj, - headers=headers, - timeout=timeout, - client=client, - custom_llm_provider=LlmProviders.VERTEX_AI.value, - ) - elif self.should_use_openai_handler(model): - return base_llm_http_handler.completion( - model=model, - stream=stream, - messages=messages, - acompletion=acompletion, - api_base=api_base, - model_response=model_response, - optional_params=optional_params, - litellm_params=litellm_params, - custom_llm_provider="vertex_ai", - timeout=timeout, - headers=headers, - encoding=encoding, - api_key=access_token, - logging_obj=logging_obj, # model call logging done inside the class as we make need to modify I/O to fit aleph alpha's requirements - client=client, - ) - return openai_like_chat_completions.completion( - model=model, - messages=messages, - api_base=api_base, - api_key=access_token, - custom_prompt_dict=custom_prompt_dict, - model_response=model_response, - print_verbose=print_verbose, - logging_obj=logging_obj, - optional_params=optional_params, - acompletion=acompletion, - litellm_params=litellm_params, - logger_fn=logger_fn, - client=client, - timeout=timeout, - encoding=encoding, - custom_llm_provider="vertex_ai", - custom_endpoint=True, - ) - - except Exception as e: - if hasattr(e, "status_code"): - raise e - raise VertexAIError(status_code=500, message=str(e)) diff --git a/sdk/poetry.lock b/sdk/poetry.lock index dce11a6848..039c24f1ab 100644 --- a/sdk/poetry.lock +++ b/sdk/poetry.lock @@ -14,137 +14,99 @@ files = [ [[package]] name = "aiohttp" -version = "3.13.2" +version = "3.11.18" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiohttp-3.13.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2372b15a5f62ed37789a6b383ff7344fc5b9f243999b0cd9b629d8bc5f5b4155"}, - {file = "aiohttp-3.13.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7f8659a48995edee7229522984bd1009c1213929c769c2daa80b40fe49a180c"}, - {file = "aiohttp-3.13.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:939ced4a7add92296b0ad38892ce62b98c619288a081170695c6babe4f50e636"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6315fb6977f1d0dd41a107c527fee2ed5ab0550b7d885bc15fee20ccb17891da"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6e7352512f763f760baaed2637055c49134fd1d35b37c2dedfac35bfe5cf8725"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e09a0a06348a2dd73e7213353c90d709502d9786219f69b731f6caa0efeb46f5"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a09a6d073fb5789456545bdee2474d14395792faa0527887f2f4ec1a486a59d3"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b59d13c443f8e049d9e94099c7e412e34610f1f49be0f230ec656a10692a5802"}, - {file = "aiohttp-3.13.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:20db2d67985d71ca033443a1ba2001c4b5693fe09b0e29f6d9358a99d4d62a8a"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:960c2fc686ba27b535f9fd2b52d87ecd7e4fd1cf877f6a5cba8afb5b4a8bd204"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6c00dbcf5f0d88796151e264a8eab23de2997c9303dd7c0bf622e23b24d3ce22"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fed38a5edb7945f4d1bcabe2fcd05db4f6ec7e0e82560088b754f7e08d93772d"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:b395bbca716c38bef3c764f187860e88c724b342c26275bc03e906142fc5964f"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:204ffff2426c25dfda401ba08da85f9c59525cdc42bda26660463dd1cbcfec6f"}, - {file = "aiohttp-3.13.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:05c4dd3c48fb5f15db31f57eb35374cb0c09afdde532e7fb70a75aede0ed30f6"}, - {file = "aiohttp-3.13.2-cp310-cp310-win32.whl", hash = "sha256:e574a7d61cf10351d734bcddabbe15ede0eaa8a02070d85446875dc11189a251"}, - {file = "aiohttp-3.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:364f55663085d658b8462a1c3f17b2b84a5c2e1ba858e1b79bff7b2e24ad1514"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4647d02df098f6434bafd7f32ad14942f05a9caa06c7016fdcc816f343997dd0"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e3403f24bcb9c3b29113611c3c16a2a447c3953ecf86b79775e7be06f7ae7ccb"}, - {file = "aiohttp-3.13.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:43dff14e35aba17e3d6d5ba628858fb8cb51e30f44724a2d2f0c75be492c55e9"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e2a9ea08e8c58bb17655630198833109227dea914cd20be660f52215f6de5613"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53b07472f235eb80e826ad038c9d106c2f653584753f3ddab907c83f49eedead"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e736c93e9c274fce6419af4aac199984d866e55f8a4cec9114671d0ea9688780"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ff5e771f5dcbc81c64898c597a434f7682f2259e0cd666932a913d53d1341d1a"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3b6fb0c207cc661fa0bf8c66d8d9b657331ccc814f4719468af61034b478592"}, - {file = "aiohttp-3.13.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:97a0895a8e840ab3520e2288db7cace3a1981300d48babeb50e7425609e2e0ab"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9e8f8afb552297aca127c90cb840e9a1d4bfd6a10d7d8f2d9176e1acc69bad30"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ed2f9c7216e53c3df02264f25d824b079cc5914f9e2deba94155190ef648ee40"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:99c5280a329d5fa18ef30fd10c793a190d996567667908bef8a7f81f8202b948"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2ca6ffef405fc9c09a746cb5d019c1672cd7f402542e379afc66b370833170cf"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:47f438b1a28e926c37632bff3c44df7d27c9b57aaf4e34b1def3c07111fdb782"}, - {file = "aiohttp-3.13.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9acda8604a57bb60544e4646a4615c1866ee6c04a8edef9b8ee6fd1d8fa2ddc8"}, - {file = "aiohttp-3.13.2-cp311-cp311-win32.whl", hash = "sha256:868e195e39b24aaa930b063c08bb0c17924899c16c672a28a65afded9c46c6ec"}, - {file = "aiohttp-3.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:7fd19df530c292542636c2a9a85854fab93474396a52f1695e799186bbd7f24c"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b1e56bab2e12b2b9ed300218c351ee2a3d8c8fdab5b1ec6193e11a817767e47b"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:364e25edaabd3d37b1db1f0cbcee8c73c9a3727bfa262b83e5e4cf3489a2a9dc"}, - {file = "aiohttp-3.13.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c5c94825f744694c4b8db20b71dba9a257cd2ba8e010a803042123f3a25d50d7"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba2715d842ffa787be87cbfce150d5e88c87a98e0b62e0f5aa489169a393dbbb"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:585542825c4bc662221fb257889e011a5aa00f1ae4d75d1d246a5225289183e3"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:39d02cb6025fe1aabca329c5632f48c9532a3dabccd859e7e2f110668972331f"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e67446b19e014d37342f7195f592a2a948141d15a312fe0e700c2fd2f03124f6"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4356474ad6333e41ccefd39eae869ba15a6c5299c9c01dfdcfdd5c107be4363e"}, - {file = "aiohttp-3.13.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeacf451c99b4525f700f078becff32c32ec327b10dcf31306a8a52d78166de7"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8a9b889aeabd7a4e9af0b7f4ab5ad94d42e7ff679aaec6d0db21e3b639ad58d"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:fa89cb11bc71a63b69568d5b8a25c3ca25b6d54c15f907ca1c130d72f320b76b"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8aa7c807df234f693fed0ecd507192fc97692e61fee5702cdc11155d2e5cadc8"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:9eb3e33fdbe43f88c3c75fa608c25e7c47bbd80f48d012763cb67c47f39a7e16"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9434bc0d80076138ea986833156c5a48c9c7a8abb0c96039ddbb4afc93184169"}, - {file = "aiohttp-3.13.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ff15c147b2ad66da1f2cbb0622313f2242d8e6e8f9b79b5206c84523a4473248"}, - {file = "aiohttp-3.13.2-cp312-cp312-win32.whl", hash = "sha256:27e569eb9d9e95dbd55c0fc3ec3a9335defbf1d8bc1d20171a49f3c4c607b93e"}, - {file = "aiohttp-3.13.2-cp312-cp312-win_amd64.whl", hash = "sha256:8709a0f05d59a71f33fd05c17fc11fcb8c30140506e13c2f5e8ee1b8964e1b45"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7519bdc7dfc1940d201651b52bf5e03f5503bda45ad6eacf64dda98be5b2b6be"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:088912a78b4d4f547a1f19c099d5a506df17eacec3c6f4375e2831ec1d995742"}, - {file = "aiohttp-3.13.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5276807b9de9092af38ed23ce120539ab0ac955547b38563a9ba4f5b07b95293"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1237c1375eaef0db4dcd7c2559f42e8af7b87ea7d295b118c60c36a6e61cb811"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:96581619c57419c3d7d78703d5b78c1e5e5fc0172d60f555bdebaced82ded19a"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a2713a95b47374169409d18103366de1050fe0ea73db358fc7a7acb2880422d4"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:228a1cd556b3caca590e9511a89444925da87d35219a49ab5da0c36d2d943a6a"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ac6cde5fba8d7d8c6ac963dbb0256a9854e9fafff52fbcc58fdf819357892c3e"}, - {file = "aiohttp-3.13.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2bef8237544f4e42878c61cef4e2839fee6346dc60f5739f876a9c50be7fcdb"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:16f15a4eac3bc2d76c45f7ebdd48a65d41b242eb6c31c2245463b40b34584ded"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:bb7fb776645af5cc58ab804c58d7eba545a97e047254a52ce89c157b5af6cd0b"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e1b4951125ec10c70802f2cb09736c895861cd39fd9dcb35107b4dc8ae6220b8"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:550bf765101ae721ee1d37d8095f47b1f220650f85fe1af37a90ce75bab89d04"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:fe91b87fc295973096251e2d25a811388e7d8adf3bd2b97ef6ae78bc4ac6c476"}, - {file = "aiohttp-3.13.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0c8e31cfcc4592cb200160344b2fb6ae0f9e4effe06c644b5a125d4ae5ebe23"}, - {file = "aiohttp-3.13.2-cp313-cp313-win32.whl", hash = "sha256:0740f31a60848d6edb296a0df827473eede90c689b8f9f2a4cdde74889eb2254"}, - {file = "aiohttp-3.13.2-cp313-cp313-win_amd64.whl", hash = "sha256:a88d13e7ca367394908f8a276b89d04a3652044612b9a408a0bb22a5ed976a1a"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:2475391c29230e063ef53a66669b7b691c9bfc3f1426a0f7bcdf1216bdbac38b"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:f33c8748abef4d8717bb20e8fb1b3e07c6adacb7fd6beaae971a764cf5f30d61"}, - {file = "aiohttp-3.13.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ae32f24bbfb7dbb485a24b30b1149e2f200be94777232aeadba3eecece4d0aa4"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d7f02042c1f009ffb70067326ef183a047425bb2ff3bc434ead4dd4a4a66a2b"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93655083005d71cd6c072cdab54c886e6570ad2c4592139c3fb967bfc19e4694"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0db1e24b852f5f664cd728db140cf11ea0e82450471232a394b3d1a540b0f906"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b009194665bcd128e23eaddef362e745601afa4641930848af4c8559e88f18f9"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c038a8fdc8103cd51dbd986ecdce141473ffd9775a7a8057a6ed9c3653478011"}, - {file = "aiohttp-3.13.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66bac29b95a00db411cd758fea0e4b9bdba6d549dfe333f9a945430f5f2cc5a6"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4ebf9cfc9ba24a74cf0718f04aac2a3bbe745902cc7c5ebc55c0f3b5777ef213"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a4b88ebe35ce54205c7074f7302bd08a4cb83256a3e0870c72d6f68a3aaf8e49"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:98c4fb90bb82b70a4ed79ca35f656f4281885be076f3f970ce315402b53099ae"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:ec7534e63ae0f3759df3a1ed4fa6bc8f75082a924b590619c0dd2f76d7043caa"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5b927cf9b935a13e33644cbed6c8c4b2d0f25b713d838743f8fe7191b33829c4"}, - {file = "aiohttp-3.13.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:88d6c017966a78c5265d996c19cdb79235be5e6412268d7e2ce7dee339471b7a"}, - {file = "aiohttp-3.13.2-cp314-cp314-win32.whl", hash = "sha256:f7c183e786e299b5d6c49fb43a769f8eb8e04a2726a2bd5887b98b5cc2d67940"}, - {file = "aiohttp-3.13.2-cp314-cp314-win_amd64.whl", hash = "sha256:fe242cd381e0fb65758faf5ad96c2e460df6ee5b2de1072fe97e4127927e00b4"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:f10d9c0b0188fe85398c61147bbd2a657d616c876863bfeff43376e0e3134673"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:e7c952aefdf2460f4ae55c5e9c3e80aa72f706a6317e06020f80e96253b1accd"}, - {file = "aiohttp-3.13.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c20423ce14771d98353d2e25e83591fa75dfa90a3c1848f3d7c68243b4fbded3"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e96eb1a34396e9430c19d8338d2ec33015e4a87ef2b4449db94c22412e25ccdf"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:23fb0783bc1a33640036465019d3bba069942616a6a2353c6907d7fe1ccdaf4e"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e1a9bea6244a1d05a4e57c295d69e159a5c50d8ef16aa390948ee873478d9a5"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0a3d54e822688b56e9f6b5816fb3de3a3a64660efac64e4c2dc435230ad23bad"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7a653d872afe9f33497215745da7a943d1dc15b728a9c8da1c3ac423af35178e"}, - {file = "aiohttp-3.13.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56d36e80d2003fa3fc0207fac644216d8532e9504a785ef9a8fd013f84a42c61"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:78cd586d8331fb8e241c2dd6b2f4061778cc69e150514b39a9e28dd050475661"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:20b10bbfbff766294fe99987f7bb3b74fdd2f1a2905f2562132641ad434dcf98"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9ec49dff7e2b3c85cdeaa412e9d438f0ecd71676fde61ec57027dd392f00c693"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:94f05348c4406450f9d73d38efb41d669ad6cd90c7ee194810d0eefbfa875a7a"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:fa4dcb605c6f82a80c7f95713c2b11c3b8e9893b3ebd2bc9bde93165ed6107be"}, - {file = "aiohttp-3.13.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cf00e5db968c3f67eccd2778574cf64d8b27d95b237770aa32400bd7a1ca4f6c"}, - {file = "aiohttp-3.13.2-cp314-cp314t-win32.whl", hash = "sha256:d23b5fe492b0805a50d3371e8a728a9134d8de5447dce4c885f5587294750734"}, - {file = "aiohttp-3.13.2-cp314-cp314t-win_amd64.whl", hash = "sha256:ff0a7b0a82a7ab905cbda74006318d1b12e37c797eb1b0d4eb3e316cf47f658f"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7fbdf5ad6084f1940ce88933de34b62358d0f4a0b6ec097362dcd3e5a65a4989"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7c3a50345635a02db61792c85bb86daffac05330f6473d524f1a4e3ef9d0046d"}, - {file = "aiohttp-3.13.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0e87dff73f46e969af38ab3f7cb75316a7c944e2e574ff7c933bc01b10def7f5"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2adebd4577724dcae085665f294cc57c8701ddd4d26140504db622b8d566d7aa"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e036a3a645fe92309ec34b918394bb377950cbb43039a97edae6c08db64b23e2"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:23ad365e30108c422d0b4428cf271156dd56790f6dd50d770b8e360e6c5ab2e6"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1f9b2c2d4b9d958b1f9ae0c984ec1dd6b6689e15c75045be8ccb4011426268ca"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3a92cf4b9bea33e15ecbaa5c59921be0f23222608143d025c989924f7e3e0c07"}, - {file = "aiohttp-3.13.2-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:070599407f4954021509193404c4ac53153525a19531051661440644728ba9a7"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:29562998ec66f988d49fb83c9b01694fa927186b781463f376c5845c121e4e0b"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4dd3db9d0f4ebca1d887d76f7cdbcd1116ac0d05a9221b9dad82c64a62578c4d"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:d7bc4b7f9c4921eba72677cd9fedd2308f4a4ca3e12fab58935295ad9ea98700"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:dacd50501cd017f8cccb328da0c90823511d70d24a323196826d923aad865901"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:8b2f1414f6a1e0683f212ec80e813f4abef94c739fd090b66c9adf9d2a05feac"}, - {file = "aiohttp-3.13.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04c3971421576ed24c191f610052bcb2f059e395bc2489dd99e397f9bc466329"}, - {file = "aiohttp-3.13.2-cp39-cp39-win32.whl", hash = "sha256:9f377d0a924e5cc94dc620bc6366fc3e889586a7f18b748901cf016c916e2084"}, - {file = "aiohttp-3.13.2-cp39-cp39-win_amd64.whl", hash = "sha256:9c705601e16c03466cb72011bd1af55d68fa65b045356d8f96c216e5f6db0fa5"}, - {file = "aiohttp-3.13.2.tar.gz", hash = "sha256:40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:96264854fedbea933a9ca4b7e0c745728f01380691687b7365d18d9e977179c4"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9602044ff047043430452bc3a2089743fa85da829e6fc9ee0025351d66c332b6"}, + {file = "aiohttp-3.11.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5691dc38750fcb96a33ceef89642f139aa315c8a193bbd42a0c33476fd4a1609"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:554c918ec43f8480b47a5ca758e10e793bd7410b83701676a4782672d670da55"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a4076a2b3ba5b004b8cffca6afe18a3b2c5c9ef679b4d1e9859cf76295f8d4f"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:767a97e6900edd11c762be96d82d13a1d7c4fc4b329f054e88b57cdc21fded94"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0ddc9337a0fb0e727785ad4f41163cc314376e82b31846d3835673786420ef1"}, + {file = "aiohttp-3.11.18-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f414f37b244f2a97e79b98d48c5ff0789a0b4b4609b17d64fa81771ad780e415"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdb239f47328581e2ec7744ab5911f97afb10752332a6dd3d98e14e429e1a9e7"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2c50bad73ed629cc326cc0f75aed8ecfb013f88c5af116f33df556ed47143eb"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8d8f20c39d3fa84d1c28cdb97f3111387e48209e224408e75f29c6f8e0861d"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:106032eaf9e62fd6bc6578c8b9e6dc4f5ed9a5c1c7fb2231010a1b4304393421"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:b491e42183e8fcc9901d8dcd8ae644ff785590f1727f76ca86e731c61bfe6643"}, + {file = "aiohttp-3.11.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ad8c745ff9460a16b710e58e06a9dec11ebc0d8f4dd82091cefb579844d69868"}, + {file = "aiohttp-3.11.18-cp310-cp310-win32.whl", hash = "sha256:8e57da93e24303a883146510a434f0faf2f1e7e659f3041abc4e3fb3f6702a9f"}, + {file = "aiohttp-3.11.18-cp310-cp310-win_amd64.whl", hash = "sha256:cc93a4121d87d9f12739fc8fab0a95f78444e571ed63e40bfc78cd5abe700ac9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:427fdc56ccb6901ff8088544bde47084845ea81591deb16f957897f0f0ba1be9"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c828b6d23b984255b85b9b04a5b963a74278b7356a7de84fda5e3b76866597b"}, + {file = "aiohttp-3.11.18-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c2eaa145bb36b33af1ff2860820ba0589e165be4ab63a49aebfd0981c173b66"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d518ce32179f7e2096bf4e3e8438cf445f05fedd597f252de9f54c728574756"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0700055a6e05c2f4711011a44364020d7a10fbbcd02fbf3e30e8f7e7fddc8717"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bd1cde83e4684324e6ee19adfc25fd649d04078179890be7b29f76b501de8e4"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73b8870fe1c9a201b8c0d12c94fe781b918664766728783241a79e0468427e4f"}, + {file = "aiohttp-3.11.18-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25557982dd36b9e32c0a3357f30804e80790ec2c4d20ac6bcc598533e04c6361"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e889c9df381a2433802991288a61e5a19ceb4f61bd14f5c9fa165655dcb1fd1"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9ea345fda05bae217b6cce2acf3682ce3b13d0d16dd47d0de7080e5e21362421"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9f26545b9940c4b46f0a9388fd04ee3ad7064c4017b5a334dd450f616396590e"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3a621d85e85dccabd700294494d7179ed1590b6d07a35709bb9bd608c7f5dd1d"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9c23fd8d08eb9c2af3faeedc8c56e134acdaf36e2117ee059d7defa655130e5f"}, + {file = "aiohttp-3.11.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9e6b0e519067caa4fd7fb72e3e8002d16a68e84e62e7291092a5433763dc0dd"}, + {file = "aiohttp-3.11.18-cp311-cp311-win32.whl", hash = "sha256:122f3e739f6607e5e4c6a2f8562a6f476192a682a52bda8b4c6d4254e1138f4d"}, + {file = "aiohttp-3.11.18-cp311-cp311-win_amd64.whl", hash = "sha256:e6f3c0a3a1e73e88af384b2e8a0b9f4fb73245afd47589df2afcab6b638fa0e6"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:63d71eceb9cad35d47d71f78edac41fcd01ff10cacaa64e473d1aec13fa02df2"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d1929da615840969929e8878d7951b31afe0bac883d84418f92e5755d7b49508"}, + {file = "aiohttp-3.11.18-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d0aebeb2392f19b184e3fdd9e651b0e39cd0f195cdb93328bd124a1d455cd0e"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3849ead845e8444f7331c284132ab314b4dac43bfae1e3cf350906d4fff4620f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5e8452ad6b2863709f8b3d615955aa0807bc093c34b8e25b3b52097fe421cb7f"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b8d2b42073611c860a37f718b3d61ae8b4c2b124b2e776e2c10619d920350ec"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40fbf91f6a0ac317c0a07eb328a1384941872f6761f2e6f7208b63c4cc0a7ff6"}, + {file = "aiohttp-3.11.18-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ff5625413fec55216da5eaa011cf6b0a2ed67a565914a212a51aa3755b0009"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7f33a92a2fde08e8c6b0c61815521324fc1612f397abf96eed86b8e31618fdb4"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:11d5391946605f445ddafda5eab11caf310f90cdda1fd99865564e3164f5cff9"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3cc314245deb311364884e44242e00c18b5896e4fe6d5f942e7ad7e4cb640adb"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0f421843b0f70740772228b9e8093289924359d306530bcd3926f39acbe1adda"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e220e7562467dc8d589e31c1acd13438d82c03d7f385c9cd41a3f6d1d15807c1"}, + {file = "aiohttp-3.11.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab2ef72f8605046115bc9aa8e9d14fd49086d405855f40b79ed9e5c1f9f4faea"}, + {file = "aiohttp-3.11.18-cp312-cp312-win32.whl", hash = "sha256:12a62691eb5aac58d65200c7ae94d73e8a65c331c3a86a2e9670927e94339ee8"}, + {file = "aiohttp-3.11.18-cp312-cp312-win_amd64.whl", hash = "sha256:364329f319c499128fd5cd2d1c31c44f234c58f9b96cc57f743d16ec4f3238c8"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:474215ec618974054cf5dc465497ae9708543cbfc312c65212325d4212525811"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ced70adf03920d4e67c373fd692123e34d3ac81dfa1c27e45904a628567d804"}, + {file = "aiohttp-3.11.18-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2d9f6c0152f8d71361905aaf9ed979259537981f47ad099c8b3d81e0319814bd"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a35197013ed929c0aed5c9096de1fc5a9d336914d73ab3f9df14741668c0616c"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:540b8a1f3a424f1af63e0af2d2853a759242a1769f9f1ab053996a392bd70118"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9e6710ebebfce2ba21cee6d91e7452d1125100f41b906fb5af3da8c78b764c1"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8af2ef3b4b652ff109f98087242e2ab974b2b2b496304063585e3d78de0b000"}, + {file = "aiohttp-3.11.18-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28c3f975e5ae3dbcbe95b7e3dcd30e51da561a0a0f2cfbcdea30fc1308d72137"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c28875e316c7b4c3e745172d882d8a5c835b11018e33432d281211af35794a93"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:13cd38515568ae230e1ef6919e2e33da5d0f46862943fcda74e7e915096815f3"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0e2a92101efb9f4c2942252c69c63ddb26d20f46f540c239ccfa5af865197bb8"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e6d3e32b8753c8d45ac550b11a1090dd66d110d4ef805ffe60fa61495360b3b2"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ea4cf2488156e0f281f93cc2fd365025efcba3e2d217cbe3df2840f8c73db261"}, + {file = "aiohttp-3.11.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d4df95ad522c53f2b9ebc07f12ccd2cb15550941e11a5bbc5ddca2ca56316d7"}, + {file = "aiohttp-3.11.18-cp313-cp313-win32.whl", hash = "sha256:cdd1bbaf1e61f0d94aced116d6e95fe25942f7a5f42382195fd9501089db5d78"}, + {file = "aiohttp-3.11.18-cp313-cp313-win_amd64.whl", hash = "sha256:bdd619c27e44382cf642223f11cfd4d795161362a5a1fc1fa3940397bc89db01"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:469ac32375d9a716da49817cd26f1916ec787fc82b151c1c832f58420e6d3533"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3cec21dd68924179258ae14af9f5418c1ebdbba60b98c667815891293902e5e0"}, + {file = "aiohttp-3.11.18-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b426495fb9140e75719b3ae70a5e8dd3a79def0ae3c6c27e012fc59f16544a4a"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad2f41203e2808616292db5d7170cccf0c9f9c982d02544443c7eb0296e8b0c7"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc0ae0a5e9939e423e065a3e5b00b24b8379f1db46046d7ab71753dfc7dd0e1"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe7cdd3f7d1df43200e1c80f1aed86bb36033bf65e3c7cf46a2b97a253ef8798"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5199be2a2f01ffdfa8c3a6f5981205242986b9e63eb8ae03fd18f736e4840721"}, + {file = "aiohttp-3.11.18-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ccec9e72660b10f8e283e91aa0295975c7bd85c204011d9f5eb69310555cf30"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1596ebf17e42e293cbacc7a24c3e0dc0f8f755b40aff0402cb74c1ff6baec1d3"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:eab7b040a8a873020113ba814b7db7fa935235e4cbaf8f3da17671baa1024863"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5d61df4a05476ff891cff0030329fee4088d40e4dc9b013fac01bc3c745542c2"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:46533e6792e1410f9801d09fd40cbbff3f3518d1b501d6c3c5b218f427f6ff08"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c1b90407ced992331dd6d4f1355819ea1c274cc1ee4d5b7046c6761f9ec11829"}, + {file = "aiohttp-3.11.18-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a2fd04ae4971b914e54fe459dd7edbbd3f2ba875d69e057d5e3c8e8cac094935"}, + {file = "aiohttp-3.11.18-cp39-cp39-win32.whl", hash = "sha256:b2f317d1678002eee6fe85670039fb34a757972284614638f82b903a03feacdc"}, + {file = "aiohttp-3.11.18-cp39-cp39-win_amd64.whl", hash = "sha256:5e7007b8d1d09bce37b54111f593d173691c530b80f27c6493b928dabed9e6ef"}, + {file = "aiohttp-3.11.18.tar.gz", hash = "sha256:ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a"}, ] [package.dependencies] -aiohappyeyeballs = ">=2.5.0" -aiosignal = ">=1.4.0" +aiohappyeyeballs = ">=2.3.0" +aiosignal = ">=1.1.2" +async-timeout = {version = ">=4.0,<6.0", markers = "python_version < \"3.11\""} attrs = ">=17.3.0" frozenlist = ">=1.1.1" multidict = ">=4.5,<7.0" @@ -152,23 +114,22 @@ propcache = ">=0.2.0" yarl = ">=1.17.0,<2.0" [package.extras] -speedups = ["Brotli", "aiodns (>=3.3.0)", "backports.zstd", "brotlicffi"] +speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" -version = "1.4.0" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e"}, - {file = "aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] frozenlist = ">=1.1.0" -typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} [[package]] name = "annotated-types" @@ -184,36 +145,60 @@ files = [ [[package]] name = "anyio" -version = "4.11.0" -description = "High-level concurrency and networking framework on top of asyncio or Trio" +version = "4.9.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc"}, - {file = "anyio-4.11.0.tar.gz", hash = "sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4"}, + {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, + {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, ] [package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -trio = ["trio (>=0.31.0)"] +doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] +trio = ["trio (>=0.26.1)"] + +[[package]] +name = "async-timeout" +version = "5.0.1" +description = "Timeout context manager for asyncio programs" +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.11\"" +files = [ + {file = "async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c"}, + {file = "async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3"}, +] [[package]] name = "attrs" -version = "25.4.0" +version = "25.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373"}, - {file = "attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11"}, + {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, + {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] +[package.extras] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] + [[package]] name = "backoff" version = "2.2.1" @@ -228,201 +213,171 @@ files = [ [[package]] name = "boto3" -version = "1.40.69" +version = "1.38.20" description = "The AWS SDK for Python" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "boto3-1.40.69-py3-none-any.whl", hash = "sha256:c3f710a1990c4be1c0db43b938743d4e404c7f1f06d5f1fa0c8e9b1cea4290b2"}, - {file = "boto3-1.40.69.tar.gz", hash = "sha256:5273f6bac347331a87db809dff97d8736c50c3be19f2bb36ad08c5131c408976"}, + {file = "boto3-1.38.20-py3-none-any.whl", hash = "sha256:0494bafa771561c02ae5926143ce69b6ee4017f11ced22d0293a8372acb7472a"}, + {file = "boto3-1.38.20.tar.gz", hash = "sha256:aa1424213678a249fe828fb9345deac5e33f9a2266fd1b23ec72e02857b018a2"}, ] [package.dependencies] -botocore = ">=1.40.69,<1.41.0" +botocore = ">=1.38.20,<1.39.0" jmespath = ">=0.7.1,<2.0.0" -s3transfer = ">=0.14.0,<0.15.0" +s3transfer = ">=0.12.0,<0.13.0" [package.extras] crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.40.69" +version = "1.38.20" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "botocore-1.40.69-py3-none-any.whl", hash = "sha256:5d810efeb9e18f91f32690642fa81ae60e482eefeea0d35ec72da2e3d924c1a5"}, - {file = "botocore-1.40.69.tar.gz", hash = "sha256:df310ddc4d2de5543ba3df4e4b5f9907a2951896d63a9fbae115c26ca0976951"}, + {file = "botocore-1.38.20-py3-none-any.whl", hash = "sha256:70feba9b3f73946a9739d0c16703190d79379f065cf6e29883b5d7f791b247b8"}, + {file = "botocore-1.38.20.tar.gz", hash = "sha256:03a5027a207fc66cd0bf8cd1abb98db41fd4d23e6bd5f43f68586af9736240fc"}, ] [package.dependencies] jmespath = ">=0.7.1,<2.0.0" python-dateutil = ">=2.1,<3.0.0" -urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""} +urllib3 = [ + {version = ">=1.25.4,<1.27", markers = "python_version < \"3.10\""}, + {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""}, +] [package.extras] -crt = ["awscrt (==0.27.6)"] - -[[package]] -name = "cachetools" -version = "6.2.1" -description = "Extensible memoizing collections and decorators" -optional = false -python-versions = ">=3.9" -groups = ["main"] -files = [ - {file = "cachetools-6.2.1-py3-none-any.whl", hash = "sha256:09868944b6dde876dfd44e1d47e18484541eaf12f26f29b7af91b26cc892d701"}, - {file = "cachetools-6.2.1.tar.gz", hash = "sha256:3f391e4bd8f8bf0931169baf7456cc822705f4e2a31f840d218f445b9a854201"}, -] +crt = ["awscrt (==0.23.8)"] [[package]] name = "certifi" -version = "2025.10.5" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" groups = ["main", "dev"] files = [ - {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, - {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] name = "charset-normalizer" -version = "3.4.4" +version = "3.4.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d"}, - {file = "charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016"}, - {file = "charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525"}, - {file = "charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14"}, - {file = "charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c"}, - {file = "charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_riscv64.whl", hash = "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-win32.whl", hash = "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa"}, - {file = "charset_normalizer-3.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win32.whl", hash = "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966"}, - {file = "charset_normalizer-3.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50"}, - {file = "charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f"}, - {file = "charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, + {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, + {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, ] [[package]] name = "click" -version = "8.3.0" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false -python-versions = ">=3.10" +python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc"}, - {file = "click-8.3.0.tar.gz", hash = "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -442,17 +397,23 @@ files = [ markers = {main = "platform_system == \"Windows\"", dev = "platform_system == \"Windows\" or sys_platform == \"win32\""} [[package]] -name = "decorator" -version = "5.2.1" -description = "Decorators for Humans" +name = "deprecated" +version = "1.2.18" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false -python-versions = ">=3.8" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" groups = ["main"] files = [ - {file = "decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a"}, - {file = "decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360"}, + {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, + {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, ] +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools", "tox"] + [[package]] name = "distro" version = "1.9.0" @@ -465,6 +426,25 @@ files = [ {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, ] +[[package]] +name = "exceptiongroup" +version = "1.3.0" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version < \"3.11\"" +files = [ + {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, + {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "execnet" version = "2.1.1" @@ -482,276 +462,166 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "fastapi" -version = "0.116.2" +version = "0.115.12" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "fastapi-0.116.2-py3-none-any.whl", hash = "sha256:c3a7a8fb830b05f7e087d920e0d786ca1fc9892eb4e9a84b227be4c1bc7569db"}, - {file = "fastapi-0.116.2.tar.gz", hash = "sha256:231a6af2fe21cfa2c32730170ad8514985fc250bec16c9b242d3b94c835ef529"}, + {file = "fastapi-0.115.12-py3-none-any.whl", hash = "sha256:e94613d6c05e27be7ffebdd6ea5f388112e5e430c8f7d6494a9d1d88d43e814d"}, + {file = "fastapi-0.115.12.tar.gz", hash = "sha256:1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.40.0,<0.49.0" +starlette = ">=0.40.0,<0.47.0" typing-extensions = ">=4.8.0" [package.extras] -all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] -standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] - -[[package]] -name = "fastuuid" -version = "0.14.0" -description = "Python bindings to Rust's UUID library." -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:6e6243d40f6c793c3e2ee14c13769e341b90be5ef0c23c82fa6515a96145181a"}, - {file = "fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:13ec4f2c3b04271f62be2e1ce7e95ad2dd1cf97e94503a3760db739afbd48f00"}, - {file = "fastuuid-0.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b2fdd48b5e4236df145a149d7125badb28e0a383372add3fbaac9a6b7a394470"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f74631b8322d2780ebcf2d2d75d58045c3e9378625ec51865fe0b5620800c39d"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83cffc144dc93eb604b87b179837f2ce2af44871a7b323f2bfed40e8acb40ba8"}, - {file = "fastuuid-0.14.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a771f135ab4523eb786e95493803942a5d1fc1610915f131b363f55af53b219"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4edc56b877d960b4eda2c4232f953a61490c3134da94f3c28af129fb9c62a4f6"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bcc96ee819c282e7c09b2eed2b9bd13084e3b749fdb2faf58c318d498df2efbe"}, - {file = "fastuuid-0.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7a3c0bca61eacc1843ea97b288d6789fbad7400d16db24e36a66c28c268cfe3d"}, - {file = "fastuuid-0.14.0-cp310-cp310-win32.whl", hash = "sha256:7f2f3efade4937fae4e77efae1af571902263de7b78a0aee1a1653795a093b2a"}, - {file = "fastuuid-0.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:ae64ba730d179f439b0736208b4c279b8bc9c089b102aec23f86512ea458c8a4"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:73946cb950c8caf65127d4e9a325e2b6be0442a224fd51ba3b6ac44e1912ce34"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:12ac85024637586a5b69645e7ed986f7535106ed3013640a393a03e461740cb7"}, - {file = "fastuuid-0.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:05a8dde1f395e0c9b4be515b7a521403d1e8349443e7641761af07c7ad1624b1"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09378a05020e3e4883dfdab438926f31fea15fd17604908f3d39cbeb22a0b4dc"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbb0c4b15d66b435d2538f3827f05e44e2baafcc003dd7d8472dc67807ab8fd8"}, - {file = "fastuuid-0.14.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cd5a7f648d4365b41dbf0e38fe8da4884e57bed4e77c83598e076ac0c93995e7"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c0a94245afae4d7af8c43b3159d5e3934c53f47140be0be624b96acd672ceb73"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:2b29e23c97e77c3a9514d70ce343571e469098ac7f5a269320a0f0b3e193ab36"}, - {file = "fastuuid-0.14.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1e690d48f923c253f28151b3a6b4e335f2b06bf669c68a02665bc150b7839e94"}, - {file = "fastuuid-0.14.0-cp311-cp311-win32.whl", hash = "sha256:a6f46790d59ab38c6aa0e35c681c0484b50dc0acf9e2679c005d61e019313c24"}, - {file = "fastuuid-0.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:e150eab56c95dc9e3fefc234a0eedb342fac433dacc273cd4d150a5b0871e1fa"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77e94728324b63660ebf8adb27055e92d2e4611645bf12ed9d88d30486471d0a"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:caa1f14d2102cb8d353096bc6ef6c13b2c81f347e6ab9d6fbd48b9dea41c153d"}, - {file = "fastuuid-0.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d23ef06f9e67163be38cece704170486715b177f6baae338110983f99a72c070"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c9ec605ace243b6dbe3bd27ebdd5d33b00d8d1d3f580b39fdd15cd96fd71796"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:808527f2407f58a76c916d6aa15d58692a4a019fdf8d4c32ac7ff303b7d7af09"}, - {file = "fastuuid-0.14.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fb3c0d7fef6674bbeacdd6dbd386924a7b60b26de849266d1ff6602937675c8"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab3f5d36e4393e628a4df337c2c039069344db5f4b9d2a3c9cea48284f1dd741"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:b9a0ca4f03b7e0b01425281ffd44e99d360e15c895f1907ca105854ed85e2057"}, - {file = "fastuuid-0.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3acdf655684cc09e60fb7e4cf524e8f42ea760031945aa8086c7eae2eeeabeb8"}, - {file = "fastuuid-0.14.0-cp312-cp312-win32.whl", hash = "sha256:9579618be6280700ae36ac42c3efd157049fe4dd40ca49b021280481c78c3176"}, - {file = "fastuuid-0.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:d9e4332dc4ba054434a9594cbfaf7823b57993d7d8e7267831c3e059857cf397"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77a09cb7427e7af74c594e409f7731a0cf887221de2f698e1ca0ebf0f3139021"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:9bd57289daf7b153bfa3e8013446aa144ce5e8c825e9e366d455155ede5ea2dc"}, - {file = "fastuuid-0.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac60fc860cdf3c3f327374db87ab8e064c86566ca8c49d2e30df15eda1b0c2d5"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab32f74bd56565b186f036e33129da77db8be09178cd2f5206a5d4035fb2a23f"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33e678459cf4addaedd9936bbb038e35b3f6b2061330fd8f2f6a1d80414c0f87"}, - {file = "fastuuid-0.14.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1e3cc56742f76cd25ecb98e4b82a25f978ccffba02e4bdce8aba857b6d85d87b"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cb9a030f609194b679e1660f7e32733b7a0f332d519c5d5a6a0a580991290022"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:09098762aad4f8da3a888eb9ae01c84430c907a297b97166b8abc07b640f2995"}, - {file = "fastuuid-0.14.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1383fff584fa249b16329a059c68ad45d030d5a4b70fb7c73a08d98fd53bcdab"}, - {file = "fastuuid-0.14.0-cp313-cp313-win32.whl", hash = "sha256:a0809f8cc5731c066c909047f9a314d5f536c871a7a22e815cc4967c110ac9ad"}, - {file = "fastuuid-0.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:0df14e92e7ad3276327631c9e7cec09e32572ce82089c55cb1bb8df71cf394ed"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b852a870a61cfc26c884af205d502881a2e59cc07076b60ab4a951cc0c94d1ad"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c7502d6f54cd08024c3ea9b3514e2d6f190feb2f46e6dbcd3747882264bb5f7b"}, - {file = "fastuuid-0.14.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1ca61b592120cf314cfd66e662a5b54a578c5a15b26305e1b8b618a6f22df714"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa75b6657ec129d0abded3bec745e6f7ab642e6dba3a5272a68247e85f5f316f"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8a0dfea3972200f72d4c7df02c8ac70bad1bb4c58d7e0ec1e6f341679073a7f"}, - {file = "fastuuid-0.14.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1bf539a7a95f35b419f9ad105d5a8a35036df35fdafae48fb2fd2e5f318f0d75"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:9a133bf9cc78fdbd1179cb58a59ad0100aa32d8675508150f3658814aeefeaa4"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_i686.whl", hash = "sha256:f54d5b36c56a2d5e1a31e73b950b28a0d83eb0c37b91d10408875a5a29494bad"}, - {file = "fastuuid-0.14.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:ec27778c6ca3393ef662e2762dba8af13f4ec1aaa32d08d77f71f2a70ae9feb8"}, - {file = "fastuuid-0.14.0-cp314-cp314-win32.whl", hash = "sha256:e23fc6a83f112de4be0cc1990e5b127c27663ae43f866353166f87df58e73d06"}, - {file = "fastuuid-0.14.0-cp314-cp314-win_amd64.whl", hash = "sha256:df61342889d0f5e7a32f7284e55ef95103f2110fee433c2ae7c2c0956d76ac8a"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:47c821f2dfe95909ead0085d4cb18d5149bca704a2b03e03fb3f81a5202d8cea"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3964bab460c528692c70ab6b2e469dd7a7b152fbe8c18616c58d34c93a6cf8d4"}, - {file = "fastuuid-0.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c501561e025b7aea3508719c5801c360c711d5218fc4ad5d77bf1c37c1a75779"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dce5d0756f046fa792a40763f36accd7e466525c5710d2195a038f93ff96346"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193ca10ff553cf3cc461572da83b5780fc0e3eea28659c16f89ae5202f3958d4"}, - {file = "fastuuid-0.14.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0737606764b29785566f968bd8005eace73d3666bd0862f33a760796e26d1ede"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e0976c0dff7e222513d206e06341503f07423aceb1db0b83ff6851c008ceee06"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6fbc49a86173e7f074b1a9ec8cf12ca0d54d8070a85a06ebf0e76c309b84f0d0"}, - {file = "fastuuid-0.14.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:de01280eabcd82f7542828ecd67ebf1551d37203ecdfd7ab1f2e534edb78d505"}, - {file = "fastuuid-0.14.0-cp38-cp38-win32.whl", hash = "sha256:af5967c666b7d6a377098849b07f83462c4fedbafcf8eb8bc8ff05dcbe8aa209"}, - {file = "fastuuid-0.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3091e63acf42f56a6f74dc65cfdb6f99bfc79b5913c8a9ac498eb7ca09770a8"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:2ec3d94e13712a133137b2805073b65ecef4a47217d5bac15d8ac62376cefdb4"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:139d7ff12bb400b4a0c76be64c28cbe2e2edf60b09826cbfd85f33ed3d0bbe8b"}, - {file = "fastuuid-0.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d55b7e96531216fc4f071909e33e35e5bfa47962ae67d9e84b00a04d6e8b7173"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0eb25f0fd935e376ac4334927a59e7c823b36062080e2e13acbaf2af15db836"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:089c18018fdbdda88a6dafd7d139f8703a1e7c799618e33ea25eb52503d28a11"}, - {file = "fastuuid-0.14.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fc37479517d4d70c08696960fad85494a8a7a0af4e93e9a00af04d74c59f9e3"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:73657c9f778aba530bc96a943d30e1a7c80edb8278df77894fe9457540df4f85"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d31f8c257046b5617fc6af9c69be066d2412bdef1edaa4bdf6a214cf57806105"}, - {file = "fastuuid-0.14.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5816d41f81782b209843e52fdef757a361b448d782452d96abedc53d545da722"}, - {file = "fastuuid-0.14.0-cp39-cp39-win32.whl", hash = "sha256:448aa6833f7a84bfe37dd47e33df83250f404d591eb83527fa2cac8d1e57d7f3"}, - {file = "fastuuid-0.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:84b0779c5abbdec2a9511d5ffbfcd2e53079bf889824b32be170c0d8ef5fc74c"}, - {file = "fastuuid-0.14.0.tar.gz", hash = "sha256:178947fc2f995b38497a74172adee64fdeb8b7ec18f2a5934d037641ba265d26"}, -] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "filelock" -version = "3.20.0" +version = "3.18.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "filelock-3.20.0-py3-none-any.whl", hash = "sha256:339b4732ffda5cd79b13f4e2711a31b0365ce445d95d243bb996273d072546a2"}, - {file = "filelock-3.20.0.tar.gz", hash = "sha256:711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4"}, + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, ] +[package.extras] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] +typing = ["typing-extensions (>=4.12.2)"] + [[package]] name = "frozenlist" -version = "1.8.0" +version = "1.6.0" description = "A list-like structure which implements collections.abc.MutableSequence" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011"}, - {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565"}, - {file = "frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450"}, - {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f"}, - {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7"}, - {file = "frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a"}, - {file = "frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6"}, - {file = "frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9"}, - {file = "frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581"}, - {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd"}, - {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967"}, - {file = "frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25"}, - {file = "frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b"}, - {file = "frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b"}, - {file = "frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b"}, - {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608"}, - {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa"}, - {file = "frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf"}, - {file = "frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746"}, - {file = "frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7"}, - {file = "frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5"}, - {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8"}, - {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed"}, - {file = "frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496"}, - {file = "frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231"}, - {file = "frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c"}, - {file = "frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714"}, - {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0"}, - {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888"}, - {file = "frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f"}, - {file = "frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e"}, - {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30"}, - {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7"}, - {file = "frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806"}, - {file = "frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0"}, - {file = "frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed"}, - {file = "frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a"}, - {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a"}, - {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd"}, - {file = "frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d8b7138e5cd0647e4523d6685b0eac5d4be9a184ae9634492f25c6eb38c12a47"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6483e309ca809f1efd154b4d37dc6d9f61037d6c6a81c2dc7a15cb22c8c5dca"}, - {file = "frozenlist-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b9290cf81e95e93fdf90548ce9d3c1211cf574b8e3f4b3b7cb0537cf2227068"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:59a6a5876ca59d1b63af8cd5e7ffffb024c3dc1e9cf9301b21a2e76286505c95"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc4126390929823e2d2d9dc79ab4046ed74680360fc5f38b585c12c66cdf459"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:332db6b2563333c5671fecacd085141b5800cb866be16d5e3eb15a2086476675"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ff15928d62a0b80bb875655c39bf517938c7d589554cbd2669be42d97c2cb61"}, - {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7bf6cdf8e07c8151fba6fe85735441240ec7f619f935a5205953d58009aef8c6"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:48e6d3f4ec5c7273dfe83ff27c91083c6c9065af655dc2684d2c200c94308bb5"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:1a7607e17ad33361677adcd1443edf6f5da0ce5e5377b798fba20fae194825f3"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3a935c3a4e89c733303a2d5a7c257ea44af3a56c8202df486b7f5de40f37e1"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:940d4a017dbfed9daf46a3b086e1d2167e7012ee297fef9e1c545c4d022f5178"}, - {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b9be22a69a014bc47e78072d0ecae716f5eb56c15238acca0f43d6eb8e4a5bda"}, - {file = "frozenlist-1.8.0-cp39-cp39-win32.whl", hash = "sha256:1aa77cb5697069af47472e39612976ed05343ff2e84a3dcf15437b232cbfd087"}, - {file = "frozenlist-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:7398c222d1d405e796970320036b1b563892b65809d9e5261487bb2c7f7b5c6a"}, - {file = "frozenlist-1.8.0-cp39-cp39-win_arm64.whl", hash = "sha256:b4f3b365f31c6cd4af24545ca0a244a53688cad8834e32f56831c4923b50a103"}, - {file = "frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d"}, - {file = "frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e6e558ea1e47fd6fa8ac9ccdad403e5dd5ecc6ed8dda94343056fa4277d5c65e"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f4b3cd7334a4bbc0c472164f3744562cb72d05002cc6fcf58adb104630bbc352"}, + {file = "frozenlist-1.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9799257237d0479736e2b4c01ff26b5c7f7694ac9692a426cb717f3dc02fff9b"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3a7bb0fe1f7a70fb5c6f497dc32619db7d2cdd53164af30ade2f34673f8b1fc"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:36d2fc099229f1e4237f563b2a3e0ff7ccebc3999f729067ce4e64a97a7f2869"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f27a9f9a86dcf00708be82359db8de86b80d029814e6693259befe82bb58a106"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75ecee69073312951244f11b8627e3700ec2bfe07ed24e3a685a5979f0412d24"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2c7d5aa19714b1b01a0f515d078a629e445e667b9da869a3cd0e6fe7dec78bd"}, + {file = "frozenlist-1.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69bbd454f0fb23b51cadc9bdba616c9678e4114b6f9fa372d462ff2ed9323ec8"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7daa508e75613809c7a57136dec4871a21bca3080b3a8fc347c50b187df4f00c"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:89ffdb799154fd4d7b85c56d5fa9d9ad48946619e0eb95755723fffa11022d75"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:920b6bd77d209931e4c263223381d63f76828bec574440f29eb497cf3394c249"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d3ceb265249fb401702fce3792e6b44c1166b9319737d21495d3611028d95769"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52021b528f1571f98a7d4258c58aa8d4b1a96d4f01d00d51f1089f2e0323cb02"}, + {file = "frozenlist-1.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0f2ca7810b809ed0f1917293050163c7654cefc57a49f337d5cd9de717b8fad3"}, + {file = "frozenlist-1.6.0-cp310-cp310-win32.whl", hash = "sha256:0e6f8653acb82e15e5443dba415fb62a8732b68fe09936bb6d388c725b57f812"}, + {file = "frozenlist-1.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f1a39819a5a3e84304cd286e3dc62a549fe60985415851b3337b6f5cc91907f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae8337990e7a45683548ffb2fee1af2f1ed08169284cd829cdd9a7fa7470530d"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8c952f69dd524558694818a461855f35d36cc7f5c0adddce37e962c85d06eac0"}, + {file = "frozenlist-1.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8f5fef13136c4e2dee91bfb9a44e236fff78fc2cd9f838eddfc470c3d7d90afe"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:716bbba09611b4663ecbb7cd022f640759af8259e12a6ca939c0a6acd49eedba"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7b8c4dc422c1a3ffc550b465090e53b0bf4839047f3e436a34172ac67c45d595"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b11534872256e1666116f6587a1592ef395a98b54476addb5e8d352925cb5d4a"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c6eceb88aaf7221f75be6ab498dc622a151f5f88d536661af3ffc486245a626"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62c828a5b195570eb4b37369fcbbd58e96c905768d53a44d13044355647838ff"}, + {file = "frozenlist-1.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1c6bd2c6399920c9622362ce95a7d74e7f9af9bfec05fff91b8ce4b9647845a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ba23817781e22fcbd45fd9ff2b9b8cdb7b16a42a4851ab8025cae7b22e96d0"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:431ef6937ae0f853143e2ca67d6da76c083e8b1fe3df0e96f3802fd37626e606"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9d124b38b3c299ca68433597ee26b7819209cb8a3a9ea761dfe9db3a04bba584"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:118e97556306402e2b010da1ef21ea70cb6d6122e580da64c056b96f524fbd6a"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fb3b309f1d4086b5533cf7bbcf3f956f0ae6469664522f1bde4feed26fba60f1"}, + {file = "frozenlist-1.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54dece0d21dce4fdb188a1ffc555926adf1d1c516e493c2914d7c370e454bc9e"}, + {file = "frozenlist-1.6.0-cp311-cp311-win32.whl", hash = "sha256:654e4ba1d0b2154ca2f096bed27461cf6160bc7f504a7f9a9ef447c293caf860"}, + {file = "frozenlist-1.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e911391bffdb806001002c1f860787542f45916c3baf764264a52765d5a5603"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:c5b9e42ace7d95bf41e19b87cec8f262c41d3510d8ad7514ab3862ea2197bfb1"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ca9973735ce9f770d24d5484dcb42f68f135351c2fc81a7a9369e48cf2998a29"}, + {file = "frozenlist-1.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ac40ec76041c67b928ca8aaffba15c2b2ee3f5ae8d0cb0617b5e63ec119ca25"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b7a8a3180dfb280eb044fdec562f9b461614c0ef21669aea6f1d3dac6ee576"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c444d824e22da6c9291886d80c7d00c444981a72686e2b59d38b285617cb52c8"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb52c8166499a8150bfd38478248572c924c003cbb45fe3bcd348e5ac7c000f9"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b35298b2db9c2468106278537ee529719228950a5fdda686582f68f247d1dc6e"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d108e2d070034f9d57210f22fefd22ea0d04609fc97c5f7f5a686b3471028590"}, + {file = "frozenlist-1.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e1be9111cb6756868ac242b3c2bd1f09d9aea09846e4f5c23715e7afb647103"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:94bb451c664415f02f07eef4ece976a2c65dcbab9c2f1705b7031a3a75349d8c"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d1a686d0b0949182b8faddea596f3fc11f44768d1f74d4cad70213b2e139d821"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ea8e59105d802c5a38bdbe7362822c522230b3faba2aa35c0fa1765239b7dd70"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:abc4e880a9b920bc5020bf6a431a6bb40589d9bca3975c980495f63632e8382f"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9a79713adfe28830f27a3c62f6b5406c37376c892b05ae070906f07ae4487046"}, + {file = "frozenlist-1.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9a0318c2068e217a8f5e3b85e35899f5a19e97141a45bb925bb357cfe1daf770"}, + {file = "frozenlist-1.6.0-cp312-cp312-win32.whl", hash = "sha256:853ac025092a24bb3bf09ae87f9127de9fe6e0c345614ac92536577cf956dfcc"}, + {file = "frozenlist-1.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:2bdfe2d7e6c9281c6e55523acd6c2bf77963cb422fdc7d142fb0cb6621b66878"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:1d7fb014fe0fbfee3efd6a94fc635aeaa68e5e1720fe9e57357f2e2c6e1a647e"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01bcaa305a0fdad12745502bfd16a1c75b14558dabae226852f9159364573117"}, + {file = "frozenlist-1.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b314faa3051a6d45da196a2c495e922f987dc848e967d8cfeaee8a0328b1cd4"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da62fecac21a3ee10463d153549d8db87549a5e77eefb8c91ac84bb42bb1e4e3"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1eb89bf3454e2132e046f9599fbcf0a4483ed43b40f545551a39316d0201cd1"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18689b40cb3936acd971f663ccb8e2589c45db5e2c5f07e0ec6207664029a9c"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e67ddb0749ed066b1a03fba812e2dcae791dd50e5da03be50b6a14d0c1a9ee45"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc5e64626e6682638d6e44398c9baf1d6ce6bc236d40b4b57255c9d3f9761f1f"}, + {file = "frozenlist-1.6.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:437cfd39564744ae32ad5929e55b18ebd88817f9180e4cc05e7d53b75f79ce85"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62dd7df78e74d924952e2feb7357d826af8d2f307557a779d14ddf94d7311be8"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a66781d7e4cddcbbcfd64de3d41a61d6bdde370fc2e38623f30b2bd539e84a9f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:482fe06e9a3fffbcd41950f9d890034b4a54395c60b5e61fae875d37a699813f"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e4f9373c500dfc02feea39f7a56e4f543e670212102cc2eeb51d3a99c7ffbde6"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e69bb81de06827147b7bfbaeb284d85219fa92d9f097e32cc73675f279d70188"}, + {file = "frozenlist-1.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7613d9977d2ab4a9141dde4a149f4357e4065949674c5649f920fec86ecb393e"}, + {file = "frozenlist-1.6.0-cp313-cp313-win32.whl", hash = "sha256:4def87ef6d90429f777c9d9de3961679abf938cb6b7b63d4a7eb8a268babfce4"}, + {file = "frozenlist-1.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:37a8a52c3dfff01515e9bbbee0e6063181362f9de3db2ccf9bc96189b557cbfd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:46138f5a0773d064ff663d273b309b696293d7a7c00a0994c5c13a5078134b64"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f88bc0a2b9c2a835cb888b32246c27cdab5740059fb3688852bf91e915399b91"}, + {file = "frozenlist-1.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:777704c1d7655b802c7850255639672e90e81ad6fa42b99ce5ed3fbf45e338dd"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ef8d41764c7de0dcdaf64f733a27352248493a85a80661f3c678acd27e31f2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:da5cb36623f2b846fb25009d9d9215322318ff1c63403075f812b3b2876c8506"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cbb56587a16cf0fb8acd19e90ff9924979ac1431baea8681712716a8337577b0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6154c3ba59cda3f954c6333025369e42c3acd0c6e8b6ce31eb5c5b8116c07e0"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e8246877afa3f1ae5c979fe85f567d220f86a50dc6c493b9b7d8191181ae01e"}, + {file = "frozenlist-1.6.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b0f6cce16306d2e117cf9db71ab3a9e8878a28176aeaf0dbe35248d97b28d0c"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1b8e8cd8032ba266f91136d7105706ad57770f3522eac4a111d77ac126a25a9b"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:e2ada1d8515d3ea5378c018a5f6d14b4994d4036591a52ceaf1a1549dec8e1ad"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:cdb2c7f071e4026c19a3e32b93a09e59b12000751fc9b0b7758da899e657d215"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:03572933a1969a6d6ab509d509e5af82ef80d4a5d4e1e9f2e1cdd22c77a3f4d2"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:77effc978947548b676c54bbd6a08992759ea6f410d4987d69feea9cd0919911"}, + {file = "frozenlist-1.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a2bda8be77660ad4089caf2223fdbd6db1858462c4b85b67fbfa22102021e497"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win32.whl", hash = "sha256:a4d96dc5bcdbd834ec6b0f91027817214216b5b30316494d2b1aebffb87c534f"}, + {file = "frozenlist-1.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:e18036cb4caa17ea151fd5f3d70be9d354c99eb8cf817a3ccde8a7873b074348"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:536a1236065c29980c15c7229fbb830dedf809708c10e159b8136534233545f0"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ed5e3a4462ff25ca84fb09e0fada8ea267df98a450340ead4c91b44857267d70"}, + {file = "frozenlist-1.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e19c0fc9f4f030fcae43b4cdec9e8ab83ffe30ec10c79a4a43a04d1af6c5e1ad"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c608f833897501dac548585312d73a7dca028bf3b8688f0d712b7acfaf7fb3"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0dbae96c225d584f834b8d3cc688825911960f003a85cb0fd20b6e5512468c42"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:625170a91dd7261a1d1c2a0c1a353c9e55d21cd67d0852185a5fef86587e6f5f"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1db8b2fc7ee8a940b547a14c10e56560ad3ea6499dc6875c354e2335812f739d"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4da6fc43048b648275a220e3a61c33b7fff65d11bdd6dcb9d9c145ff708b804c"}, + {file = "frozenlist-1.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef8e7e8f2f3820c5f175d70fdd199b79e417acf6c72c5d0aa8f63c9f721646f"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa733d123cc78245e9bb15f29b44ed9e5780dc6867cfc4e544717b91f980af3b"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:ba7f8d97152b61f22d7f59491a781ba9b177dd9f318486c5fbc52cde2db12189"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:56a0b8dd6d0d3d971c91f1df75e824986667ccce91e20dca2023683814344791"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5c9e89bf19ca148efcc9e3c44fd4c09d5af85c8a7dd3dbd0da1cb83425ef4983"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1330f0a4376587face7637dfd245380a57fe21ae8f9d360c1c2ef8746c4195fa"}, + {file = "frozenlist-1.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2187248203b59625566cac53572ec8c2647a140ee2738b4e36772930377a533c"}, + {file = "frozenlist-1.6.0-cp39-cp39-win32.whl", hash = "sha256:2b8cf4cfea847d6c12af06091561a89740f1f67f331c3fa8623391905e878530"}, + {file = "frozenlist-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:1255d5d64328c5a0d066ecb0f02034d086537925f1f04b50b1ae60d37afbf572"}, + {file = "frozenlist-1.6.0-py3-none-any.whl", hash = "sha256:535eec9987adb04701266b92745d6cdcef2e77669299359c3009c3404dd5d191"}, + {file = "frozenlist-1.6.0.tar.gz", hash = "sha256:b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68"}, ] [[package]] name = "fsspec" -version = "2025.10.0" +version = "2025.5.0" description = "File-system specification" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "fsspec-2025.10.0-py3-none-any.whl", hash = "sha256:7c7712353ae7d875407f97715f0e1ffcc21e33d5b24556cb1e090ae9409ec61d"}, - {file = "fsspec-2025.10.0.tar.gz", hash = "sha256:b6789427626f068f9a83ca4e8a3cc050850b6c0f71f99ddb4f542b8266a26a59"}, + {file = "fsspec-2025.5.0-py3-none-any.whl", hash = "sha256:0ca253eca6b5333d8a2b8bd98c7326fe821f1f0fdbd34e1b445bddde8e804c95"}, + {file = "fsspec-2025.5.0.tar.gz", hash = "sha256:e4f4623bb6221f7407fd695cc535d1f857a077eb247580f4ada34f5dc25fd5c8"}, ] [package.extras] @@ -759,7 +629,7 @@ abfs = ["adlfs"] adl = ["adlfs"] arrow = ["pyarrow (>=1)"] dask = ["dask", "distributed"] -dev = ["pre-commit", "ruff (>=0.5)"] +dev = ["pre-commit", "ruff"] doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"] dropbox = ["dropbox", "dropboxdrivefs", "requests"] full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] @@ -782,43 +652,16 @@ test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask[dataframe,test]", "moto test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tqdm", "urllib3", "zarr", "zstandard"] tqdm = ["tqdm"] -[[package]] -name = "google-auth" -version = "2.43.0" -description = "Google Authentication Library" -optional = false -python-versions = ">=3.7" -groups = ["main"] -files = [ - {file = "google_auth-2.43.0-py2.py3-none-any.whl", hash = "sha256:af628ba6fa493f75c7e9dbe9373d148ca9f4399b5ea29976519e0a3848eddd16"}, - {file = "google_auth-2.43.0.tar.gz", hash = "sha256:88228eee5fc21b62a1b5fe773ca15e67778cb07dc8363adcb4a8827b52d81483"}, -] - -[package.dependencies] -cachetools = ">=2.0.0,<7.0" -pyasn1-modules = ">=0.2.1" -rsa = ">=3.1.4,<5" - -[package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0)", "requests (>=2.20.0,<3.0.0)"] -enterprise-cert = ["cryptography", "pyopenssl"] -pyjwt = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyjwt (>=2.0)"] -pyopenssl = ["cryptography (<39.0.0)", "cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] -reauth = ["pyu2f (>=0.1.5)"] -requests = ["requests (>=2.20.0,<3.0.0)"] -testing = ["aiohttp (<3.10.0)", "aiohttp (>=3.6.2,<4.0.0)", "aioresponses", "cryptography (<39.0.0)", "cryptography (<39.0.0)", "cryptography (>=38.0.3)", "cryptography (>=38.0.3)", "flask", "freezegun", "grpcio", "mock", "oauth2client", "packaging", "pyjwt (>=2.0)", "pyopenssl (<24.3.0)", "pyopenssl (>=20.0.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-localserver", "pyu2f (>=0.1.5)", "requests (>=2.20.0,<3.0.0)", "responses", "urllib3"] -urllib3 = ["packaging", "urllib3"] - [[package]] name = "googleapis-common-protos" -version = "1.72.0" +version = "1.70.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038"}, - {file = "googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5"}, + {file = "googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8"}, + {file = "googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257"}, ] [package.dependencies] @@ -924,14 +767,14 @@ typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "t [[package]] name = "idna" -version = "3.11" +version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.8" +python-versions = ">=3.6" groups = ["main", "dev"] files = [ - {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, - {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, ] [package.extras] @@ -939,14 +782,14 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "8.7.0" +version = "8.6.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"}, - {file = "importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000"}, + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, ] [package.dependencies] @@ -963,14 +806,14 @@ type = ["pytest-mypy"] [[package]] name = "iniconfig" -version = "2.3.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.10" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"}, - {file = "iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -993,114 +836,89 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jiter" -version = "0.12.0" +version = "0.10.0" description = "Fast iterable JSON parser." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "jiter-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:e7acbaba9703d5de82a2c98ae6a0f59ab9770ab5af5fa35e43a303aee962cf65"}, - {file = "jiter-0.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:364f1a7294c91281260364222f535bc427f56d4de1d8ffd718162d21fbbd602e"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ee4d25805d4fb23f0a5167a962ef8e002dbfb29c0989378488e32cf2744b62"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:796f466b7942107eb889c08433b6e31b9a7ed31daceaecf8af1be26fb26c0ca8"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35506cb71f47dba416694e67af996bbdefb8e3608f1f78799c2e1f9058b01ceb"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:726c764a90c9218ec9e4f99a33d6bf5ec169163f2ca0fc21b654e88c2abc0abc"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa47810c5565274810b726b0dc86d18dce5fd17b190ebdc3890851d7b2a0e74"}, - {file = "jiter-0.12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ec0259d3f26c62aed4d73b198c53e316ae11f0f69c8fbe6682c6dcfa0fcce2"}, - {file = "jiter-0.12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:79307d74ea83465b0152fa23e5e297149506435535282f979f18b9033c0bb025"}, - {file = "jiter-0.12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cf6e6dd18927121fec86739f1a8906944703941d000f0639f3eb6281cc601dca"}, - {file = "jiter-0.12.0-cp310-cp310-win32.whl", hash = "sha256:b6ae2aec8217327d872cbfb2c1694489057b9433afce447955763e6ab015b4c4"}, - {file = "jiter-0.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:c7f49ce90a71e44f7e1aa9e7ec415b9686bbc6a5961e57eab511015e6759bc11"}, - {file = "jiter-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d8f8a7e317190b2c2d60eb2e8aa835270b008139562d70fe732e1c0020ec53c9"}, - {file = "jiter-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2218228a077e784c6c8f1a8e5d6b8cb1dea62ce25811c356364848554b2056cd"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9354ccaa2982bf2188fd5f57f79f800ef622ec67beb8329903abf6b10da7d423"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2607185ea89b4af9a604d4c7ec40e45d3ad03ee66998b031134bc510232bb7"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a585a5e42d25f2e71db5f10b171f5e5ea641d3aa44f7df745aa965606111cc2"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd9e21d34edff5a663c631f850edcb786719c960ce887a5661e9c828a53a95d9"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a612534770470686cd5431478dc5a1b660eceb410abade6b1b74e320ca98de6"}, - {file = "jiter-0.12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3985aea37d40a908f887b34d05111e0aae822943796ebf8338877fee2ab67725"}, - {file = "jiter-0.12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b1207af186495f48f72529f8d86671903c8c10127cac6381b11dddc4aaa52df6"}, - {file = "jiter-0.12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef2fb241de583934c9915a33120ecc06d94aa3381a134570f59eed784e87001e"}, - {file = "jiter-0.12.0-cp311-cp311-win32.whl", hash = "sha256:453b6035672fecce8007465896a25b28a6b59cfe8fbc974b2563a92f5a92a67c"}, - {file = "jiter-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:ca264b9603973c2ad9435c71a8ec8b49f8f715ab5ba421c85a51cde9887e421f"}, - {file = "jiter-0.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:cb00ef392e7d684f2754598c02c409f376ddcef857aae796d559e6cacc2d78a5"}, - {file = "jiter-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:305e061fa82f4680607a775b2e8e0bcb071cd2205ac38e6ef48c8dd5ebe1cf37"}, - {file = "jiter-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5c1860627048e302a528333c9307c818c547f214d8659b0705d2195e1a94b274"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df37577a4f8408f7e0ec3205d2a8f87672af8f17008358063a4d6425b6081ce3"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fdd787356c1c13a4f40b43c2156276ef7a71eb487d98472476476d803fb2cf"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1eb5db8d9c65b112aacf14fcd0faae9913d07a8afea5ed06ccdd12b724e966a1"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73c568cc27c473f82480abc15d1301adf333a7ea4f2e813d6a2c7d8b6ba8d0df"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4321e8a3d868919bcb1abb1db550d41f2b5b326f72df29e53b2df8b006eb9403"}, - {file = "jiter-0.12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0a51bad79f8cc9cac2b4b705039f814049142e0050f30d91695a2d9a6611f126"}, - {file = "jiter-0.12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:2a67b678f6a5f1dd6c36d642d7db83e456bc8b104788262aaefc11a22339f5a9"}, - {file = "jiter-0.12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efe1a211fe1fd14762adea941e3cfd6c611a136e28da6c39272dbb7a1bbe6a86"}, - {file = "jiter-0.12.0-cp312-cp312-win32.whl", hash = "sha256:d779d97c834b4278276ec703dc3fc1735fca50af63eb7262f05bdb4e62203d44"}, - {file = "jiter-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:e8269062060212b373316fe69236096aaf4c49022d267c6736eebd66bbbc60bb"}, - {file = "jiter-0.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:06cb970936c65de926d648af0ed3d21857f026b1cf5525cb2947aa5e01e05789"}, - {file = "jiter-0.12.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:6cc49d5130a14b732e0612bc76ae8db3b49898732223ef8b7599aa8d9810683e"}, - {file = "jiter-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:37f27a32ce36364d2fa4f7fdc507279db604d27d239ea2e044c8f148410defe1"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbc0944aa3d4b4773e348cda635252824a78f4ba44328e042ef1ff3f6080d1cf"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da25c62d4ee1ffbacb97fac6dfe4dcd6759ebdc9015991e92a6eae5816287f44"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:048485c654b838140b007390b8182ba9774621103bd4d77c9c3f6f117474ba45"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:635e737fbb7315bef0037c19b88b799143d2d7d3507e61a76751025226b3ac87"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e017c417b1ebda911bd13b1e40612704b1f5420e30695112efdbed8a4b389ed"}, - {file = "jiter-0.12.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:89b0bfb8b2bf2351fba36bb211ef8bfceba73ef58e7f0c68fb67b5a2795ca2f9"}, - {file = "jiter-0.12.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:f5aa5427a629a824a543672778c9ce0c5e556550d1569bb6ea28a85015287626"}, - {file = "jiter-0.12.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed53b3d6acbcb0fd0b90f20c7cb3b24c357fe82a3518934d4edfa8c6898e498c"}, - {file = "jiter-0.12.0-cp313-cp313-win32.whl", hash = "sha256:4747de73d6b8c78f2e253a2787930f4fffc68da7fa319739f57437f95963c4de"}, - {file = "jiter-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:e25012eb0c456fcc13354255d0338cd5397cce26c77b2832b3c4e2e255ea5d9a"}, - {file = "jiter-0.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:c97b92c54fe6110138c872add030a1f99aea2401ddcdaa21edf74705a646dd60"}, - {file = "jiter-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:53839b35a38f56b8be26a7851a48b89bc47e5d88e900929df10ed93b95fea3d6"}, - {file = "jiter-0.12.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94f669548e55c91ab47fef8bddd9c954dab1938644e715ea49d7e117015110a4"}, - {file = "jiter-0.12.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:351d54f2b09a41600ffea43d081522d792e81dcfb915f6d2d242744c1cc48beb"}, - {file = "jiter-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2a5e90604620f94bf62264e7c2c038704d38217b7465b863896c6d7c902b06c7"}, - {file = "jiter-0.12.0-cp313-cp313t-win_arm64.whl", hash = "sha256:88ef757017e78d2860f96250f9393b7b577b06a956ad102c29c8237554380db3"}, - {file = "jiter-0.12.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c46d927acd09c67a9fb1416df45c5a04c27e83aae969267e98fba35b74e99525"}, - {file = "jiter-0.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:774ff60b27a84a85b27b88cd5583899c59940bcc126caca97eb2a9df6aa00c49"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5433fab222fb072237df3f637d01b81f040a07dcac1cb4a5c75c7aa9ed0bef1"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f8c593c6e71c07866ec6bfb790e202a833eeec885022296aff6b9e0b92d6a70e"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90d32894d4c6877a87ae00c6b915b609406819dce8bc0d4e962e4de2784e567e"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:798e46eed9eb10c3adbbacbd3bdb5ecd4cf7064e453d00dbef08802dae6937ff"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3f1368f0a6719ea80013a4eb90ba72e75d7ea67cfc7846db2ca504f3df0169a"}, - {file = "jiter-0.12.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:65f04a9d0b4406f7e51279710b27484af411896246200e461d80d3ba0caa901a"}, - {file = "jiter-0.12.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:fd990541982a24281d12b67a335e44f117e4c6cbad3c3b75c7dea68bf4ce3a67"}, - {file = "jiter-0.12.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:b111b0e9152fa7df870ecaebb0bd30240d9f7fff1f2003bcb4ed0f519941820b"}, - {file = "jiter-0.12.0-cp314-cp314-win32.whl", hash = "sha256:a78befb9cc0a45b5a5a0d537b06f8544c2ebb60d19d02c41ff15da28a9e22d42"}, - {file = "jiter-0.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:e1fe01c082f6aafbe5c8faf0ff074f38dfb911d53f07ec333ca03f8f6226debf"}, - {file = "jiter-0.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:d72f3b5a432a4c546ea4bedc84cce0c3404874f1d1676260b9c7f048a9855451"}, - {file = "jiter-0.12.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e6ded41aeba3603f9728ed2b6196e4df875348ab97b28fc8afff115ed42ba7a7"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a947920902420a6ada6ad51892082521978e9dd44a802663b001436e4b771684"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:add5e227e0554d3a52cf390a7635edaffdf4f8fce4fdbcef3cc2055bb396a30c"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f9b1cda8fcb736250d7e8711d4580ebf004a46771432be0ae4796944b5dfa5d"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:deeb12a2223fe0135c7ff1356a143d57f95bbf1f4a66584f1fc74df21d86b993"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c596cc0f4cb574877550ce4ecd51f8037469146addd676d7c1a30ebe6391923f"}, - {file = "jiter-0.12.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ab4c823b216a4aeab3fdbf579c5843165756bd9ad87cc6b1c65919c4715f783"}, - {file = "jiter-0.12.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e427eee51149edf962203ff8db75a7514ab89be5cb623fb9cea1f20b54f1107b"}, - {file = "jiter-0.12.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:edb868841f84c111255ba5e80339d386d937ec1fdce419518ce1bd9370fac5b6"}, - {file = "jiter-0.12.0-cp314-cp314t-win32.whl", hash = "sha256:8bbcfe2791dfdb7c5e48baf646d37a6a3dcb5a97a032017741dea9f817dca183"}, - {file = "jiter-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2fa940963bf02e1d8226027ef461e36af472dea85d36054ff835aeed944dd873"}, - {file = "jiter-0.12.0-cp314-cp314t-win_arm64.whl", hash = "sha256:506c9708dd29b27288f9f8f1140c3cb0e3d8ddb045956d7757b1fa0e0f39a473"}, - {file = "jiter-0.12.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c9d28b218d5f9e5f69a0787a196322a5056540cb378cac8ff542b4fa7219966c"}, - {file = "jiter-0.12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d0ee12028daf8cfcf880dd492349a122a64f42c059b6c62a2b0c96a83a8da820"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b135ebe757a82d67ed2821526e72d0acf87dd61f6013e20d3c45b8048af927b"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:15d7fafb81af8a9e3039fc305529a61cd933eecee33b4251878a1c89859552a3"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92d1f41211d8a8fe412faad962d424d334764c01dac6691c44691c2e4d3eedaf"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3a64a48d7c917b8f32f25c176df8749ecf08cec17c466114727efe7441e17f6d"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:122046f3b3710b85de99d9aa2f3f0492a8233a2f54a64902b096efc27ea747b5"}, - {file = "jiter-0.12.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:27ec39225e03c32c6b863ba879deb427882f243ae46f0d82d68b695fa5b48b40"}, - {file = "jiter-0.12.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26b9e155ddc132225a39b1995b3b9f0fe0f79a6d5cbbeacf103271e7d309b404"}, - {file = "jiter-0.12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9ab05b7c58e29bb9e60b70c2e0094c98df79a1e42e397b9bb6eaa989b7a66dd0"}, - {file = "jiter-0.12.0-cp39-cp39-win32.whl", hash = "sha256:59f9f9df87ed499136db1c2b6c9efb902f964bed42a582ab7af413b6a293e7b0"}, - {file = "jiter-0.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:d3719596a1ebe7a48a498e8d5d0c4bf7553321d4c3eee1d620628d51351a3928"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:4739a4657179ebf08f85914ce50332495811004cc1747852e8b2041ed2aab9b8"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:41da8def934bf7bec16cb24bd33c0ca62126d2d45d81d17b864bd5ad721393c3"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c44ee814f499c082e69872d426b624987dbc5943ab06e9bbaa4f81989fdb79e"}, - {file = "jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd2097de91cf03eaa27b3cbdb969addf83f0179c6afc41bbc4513705e013c65d"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:e8547883d7b96ef2e5fe22b88f8a4c8725a56e7f4abafff20fd5272d634c7ecb"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:89163163c0934854a668ed783a2546a0617f71706a2551a4a0666d91ab365d6b"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d96b264ab7d34bbb2312dedc47ce07cd53f06835eacbc16dde3761f47c3a9e7f"}, - {file = "jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24e864cb30ab82311c6425655b0cdab0a98c5d973b065c66a3f020740c2324c"}, - {file = "jiter-0.12.0.tar.gz", hash = "sha256:64dfcd7d5c168b38d3f9f8bba7fc639edb3418abcc74f22fdbe6b8938293f30b"}, + {file = "jiter-0.10.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:cd2fb72b02478f06a900a5782de2ef47e0396b3e1f7d5aba30daeb1fce66f303"}, + {file = "jiter-0.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:32bb468e3af278f095d3fa5b90314728a6916d89ba3d0ffb726dd9bf7367285e"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8b3e0068c26ddedc7abc6fac37da2d0af16b921e288a5a613f4b86f050354f"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:286299b74cc49e25cd42eea19b72aa82c515d2f2ee12d11392c56d8701f52224"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ed5649ceeaeffc28d87fb012d25a4cd356dcd53eff5acff1f0466b831dda2a7"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2ab0051160cb758a70716448908ef14ad476c3774bd03ddce075f3c1f90a3d6"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03997d2f37f6b67d2f5c475da4412be584e1cec273c1cfc03d642c46db43f8cf"}, + {file = "jiter-0.10.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c404a99352d839fed80d6afd6c1d66071f3bacaaa5c4268983fc10f769112e90"}, + {file = "jiter-0.10.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66e989410b6666d3ddb27a74c7e50d0829704ede652fd4c858e91f8d64b403d0"}, + {file = "jiter-0.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b532d3af9ef4f6374609a3bcb5e05a1951d3bf6190dc6b176fdb277c9bbf15ee"}, + {file = "jiter-0.10.0-cp310-cp310-win32.whl", hash = "sha256:da9be20b333970e28b72edc4dff63d4fec3398e05770fb3205f7fb460eb48dd4"}, + {file = "jiter-0.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:f59e533afed0c5b0ac3eba20d2548c4a550336d8282ee69eb07b37ea526ee4e5"}, + {file = "jiter-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3bebe0c558e19902c96e99217e0b8e8b17d570906e72ed8a87170bc290b1e978"}, + {file = "jiter-0.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:558cc7e44fd8e507a236bee6a02fa17199ba752874400a0ca6cd6e2196cdb7dc"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d613e4b379a07d7c8453c5712ce7014e86c6ac93d990a0b8e7377e18505e98d"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f62cf8ba0618eda841b9bf61797f21c5ebd15a7a1e19daab76e4e4b498d515b2"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:919d139cdfa8ae8945112398511cb7fca58a77382617d279556b344867a37e61"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13ddbc6ae311175a3b03bd8994881bc4635c923754932918e18da841632349db"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c440ea003ad10927a30521a9062ce10b5479592e8a70da27f21eeb457b4a9c5"}, + {file = "jiter-0.10.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dc347c87944983481e138dea467c0551080c86b9d21de6ea9306efb12ca8f606"}, + {file = "jiter-0.10.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:13252b58c1f4d8c5b63ab103c03d909e8e1e7842d302473f482915d95fefd605"}, + {file = "jiter-0.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7d1bbf3c465de4a24ab12fb7766a0003f6f9bce48b8b6a886158c4d569452dc5"}, + {file = "jiter-0.10.0-cp311-cp311-win32.whl", hash = "sha256:db16e4848b7e826edca4ccdd5b145939758dadf0dc06e7007ad0e9cfb5928ae7"}, + {file = "jiter-0.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c9c1d5f10e18909e993f9641f12fe1c77b3e9b533ee94ffa970acc14ded3812"}, + {file = "jiter-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1e274728e4a5345a6dde2d343c8da018b9d4bd4350f5a472fa91f66fda44911b"}, + {file = "jiter-0.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7202ae396446c988cb2a5feb33a543ab2165b786ac97f53b59aafb803fef0744"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23ba7722d6748b6920ed02a8f1726fb4b33e0fd2f3f621816a8b486c66410ab2"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:371eab43c0a288537d30e1f0b193bc4eca90439fc08a022dd83e5e07500ed026"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c675736059020365cebc845a820214765162728b51ab1e03a1b7b3abb70f74c"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0c5867d40ab716e4684858e4887489685968a47e3ba222e44cde6e4a2154f959"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:395bb9a26111b60141757d874d27fdea01b17e8fac958b91c20128ba8f4acc8a"}, + {file = "jiter-0.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6842184aed5cdb07e0c7e20e5bdcfafe33515ee1741a6835353bb45fe5d1bd95"}, + {file = "jiter-0.10.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:62755d1bcea9876770d4df713d82606c8c1a3dca88ff39046b85a048566d56ea"}, + {file = "jiter-0.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533efbce2cacec78d5ba73a41756beff8431dfa1694b6346ce7af3a12c42202b"}, + {file = "jiter-0.10.0-cp312-cp312-win32.whl", hash = "sha256:8be921f0cadd245e981b964dfbcd6fd4bc4e254cdc069490416dd7a2632ecc01"}, + {file = "jiter-0.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7c7d785ae9dda68c2678532a5a1581347e9c15362ae9f6e68f3fdbfb64f2e49"}, + {file = "jiter-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e0588107ec8e11b6f5ef0e0d656fb2803ac6cf94a96b2b9fc675c0e3ab5e8644"}, + {file = "jiter-0.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cafc4628b616dc32530c20ee53d71589816cf385dd9449633e910d596b1f5c8a"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:520ef6d981172693786a49ff5b09eda72a42e539f14788124a07530f785c3ad6"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:554dedfd05937f8fc45d17ebdf298fe7e0c77458232bcb73d9fbbf4c6455f5b3"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc299da7789deacf95f64052d97f75c16d4fc8c4c214a22bf8d859a4288a1c2"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5161e201172de298a8a1baad95eb85db4fb90e902353b1f6a41d64ea64644e25"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e2227db6ba93cb3e2bf67c87e594adde0609f146344e8207e8730364db27041"}, + {file = "jiter-0.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:15acb267ea5e2c64515574b06a8bf393fbfee6a50eb1673614aa45f4613c0cca"}, + {file = "jiter-0.10.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:901b92f2e2947dc6dfcb52fd624453862e16665ea909a08398dde19c0731b7f4"}, + {file = "jiter-0.10.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d0cb9a125d5a3ec971a094a845eadde2db0de85b33c9f13eb94a0c63d463879e"}, + {file = "jiter-0.10.0-cp313-cp313-win32.whl", hash = "sha256:48a403277ad1ee208fb930bdf91745e4d2d6e47253eedc96e2559d1e6527006d"}, + {file = "jiter-0.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:75f9eb72ecb640619c29bf714e78c9c46c9c4eaafd644bf78577ede459f330d4"}, + {file = "jiter-0.10.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:28ed2a4c05a1f32ef0e1d24c2611330219fed727dae01789f4a335617634b1ca"}, + {file = "jiter-0.10.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14a4c418b1ec86a195f1ca69da8b23e8926c752b685af665ce30777233dfe070"}, + {file = "jiter-0.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:d7bfed2fe1fe0e4dda6ef682cee888ba444b21e7a6553e03252e4feb6cf0adca"}, + {file = "jiter-0.10.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:5e9251a5e83fab8d87799d3e1a46cb4b7f2919b895c6f4483629ed2446f66522"}, + {file = "jiter-0.10.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:023aa0204126fe5b87ccbcd75c8a0d0261b9abdbbf46d55e7ae9f8e22424eeb8"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c189c4f1779c05f75fc17c0c1267594ed918996a231593a21a5ca5438445216"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:15720084d90d1098ca0229352607cd68256c76991f6b374af96f36920eae13c4"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4f2fb68e5f1cfee30e2b2a09549a00683e0fde4c6a2ab88c94072fc33cb7426"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce541693355fc6da424c08b7edf39a2895f58d6ea17d92cc2b168d20907dee12"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31c50c40272e189d50006ad5c73883caabb73d4e9748a688b216e85a9a9ca3b9"}, + {file = "jiter-0.10.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fa3402a2ff9815960e0372a47b75c76979d74402448509ccd49a275fa983ef8a"}, + {file = "jiter-0.10.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:1956f934dca32d7bb647ea21d06d93ca40868b505c228556d3373cbd255ce853"}, + {file = "jiter-0.10.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:fcedb049bdfc555e261d6f65a6abe1d5ad68825b7202ccb9692636c70fcced86"}, + {file = "jiter-0.10.0-cp314-cp314-win32.whl", hash = "sha256:ac509f7eccca54b2a29daeb516fb95b6f0bd0d0d8084efaf8ed5dfc7b9f0b357"}, + {file = "jiter-0.10.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5ed975b83a2b8639356151cef5c0d597c68376fc4922b45d0eb384ac058cfa00"}, + {file = "jiter-0.10.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa96f2abba33dc77f79b4cf791840230375f9534e5fac927ccceb58c5e604a5"}, + {file = "jiter-0.10.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bd6292a43c0fc09ce7c154ec0fa646a536b877d1e8f2f96c19707f65355b5a4d"}, + {file = "jiter-0.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:39de429dcaeb6808d75ffe9effefe96a4903c6a4b376b2f6d08d77c1aaee2f18"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52ce124f13a7a616fad3bb723f2bfb537d78239d1f7f219566dc52b6f2a9e48d"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:166f3606f11920f9a1746b2eea84fa2c0a5d50fd313c38bdea4edc072000b0af"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:28dcecbb4ba402916034fc14eba7709f250c4d24b0c43fc94d187ee0580af181"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86c5aa6910f9bebcc7bc4f8bc461aff68504388b43bfe5e5c0bd21efa33b52f4"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ceeb52d242b315d7f1f74b441b6a167f78cea801ad7c11c36da77ff2d42e8a28"}, + {file = "jiter-0.10.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ff76d8887c8c8ee1e772274fcf8cc1071c2c58590d13e33bd12d02dc9a560397"}, + {file = "jiter-0.10.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a9be4d0fa2b79f7222a88aa488bd89e2ae0a0a5b189462a12def6ece2faa45f1"}, + {file = "jiter-0.10.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9ab7fd8738094139b6c1ab1822d6f2000ebe41515c537235fd45dabe13ec9324"}, + {file = "jiter-0.10.0-cp39-cp39-win32.whl", hash = "sha256:5f51e048540dd27f204ff4a87f5d79294ea0aa3aa552aca34934588cf27023cf"}, + {file = "jiter-0.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:1b28302349dc65703a9e4ead16f163b1c339efffbe1049c30a44b001a2a4fff9"}, + {file = "jiter-0.10.0.tar.gz", hash = "sha256:07a7142c38aacc85194391108dc91b5b57093c978a9932bd86a36862759d9500"}, ] [[package]] @@ -1117,14 +935,14 @@ files = [ [[package]] name = "jsonschema" -version = "4.25.1" +version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "jsonschema-4.25.1-py3-none-any.whl", hash = "sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63"}, - {file = "jsonschema-4.25.1.tar.gz", hash = "sha256:e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85"}, + {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, + {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, ] [package.dependencies] @@ -1135,18 +953,18 @@ rpds-py = ">=0.7.1" [package.extras] format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "rfc3987-syntax (>=1.1.0)", "uri-template", "webcolors (>=24.6.0)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] [[package]] name = "jsonschema-specifications" -version = "2025.9.1" +version = "2025.4.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe"}, - {file = "jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d"}, + {file = "jsonschema_specifications-2025.4.1-py3-none-any.whl", hash = "sha256:4653bffbd6584f7de83a67e0d620ef16900b390ddc7939d56684d6c81e33f1af"}, + {file = "jsonschema_specifications-2025.4.1.tar.gz", hash = "sha256:630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608"}, ] [package.dependencies] @@ -1154,135 +972,103 @@ referencing = ">=0.31.0" [[package]] name = "litellm" -version = "1.78.7" +version = "1.70.2" description = "Library to easily interface with LLM API providers" optional = false python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" groups = ["main"] files = [ - {file = "litellm-1.78.7-py3-none-any.whl", hash = "sha256:aa93ae1fefe02fb00b2a78eba3c95002f9ef478bade3e22e63508830182e2dfe"}, - {file = "litellm-1.78.7.tar.gz", hash = "sha256:6b10f5c7dc217bde3481fa4f70b5c37edbfa617bec7149276833d311f76a6783"}, + {file = "litellm-1.70.2-py3-none-any.whl", hash = "sha256:765bb4314e0f764735cb036dcfabfddfec84320831df17275a47d3bb48b577a3"}, + {file = "litellm-1.70.2.tar.gz", hash = "sha256:d2e45076f76d668f2b420c98067c9a992dfaa7fea3031a02d0ed89589a2f8841"}, ] [package.dependencies] -aiohttp = ">=3.10" +aiohttp = "*" click = "*" -fastuuid = ">=0.13.0" httpx = ">=0.23.0" importlib-metadata = ">=6.8.0" jinja2 = ">=3.1.2,<4.0.0" jsonschema = ">=4.22.0,<5.0.0" -openai = ">=1.99.5" -pydantic = ">=2.5.0,<3.0.0" +openai = ">=1.68.2,<1.76.0" +pydantic = ">=2.0.0,<3.0.0" python-dotenv = ">=0.2.0" tiktoken = ">=0.7.0" tokenizers = "*" [package.extras] -caching = ["diskcache (>=5.6.1,<6.0.0)"] -extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-iam (>=2.19.1,<3.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "redisvl (>=0.4.1,<0.5.0)", "resend (>=0.8.0,<0.9.0)"] -mlflow = ["mlflow (>3.1.4)"] -proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "azure-identity (>=1.15.0,<2.0.0)", "azure-storage-blob (>=12.25.1,<13.0.0)", "backoff", "boto3 (==1.36.0)", "cryptography", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=23.0.0,<24.0.0)", "litellm-enterprise (==0.1.20)", "litellm-proxy-extras (==0.2.27)", "mcp (>=1.10.0,<2.0.0)", "orjson (>=3.9.7,<4.0.0)", "polars (>=1.31.0,<2.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rich (==13.7.1)", "rq", "uvicorn (>=0.29.0,<0.30.0)", "uvloop (>=0.21.0,<0.22.0)", "websockets (>=13.1.0,<14.0.0)"] -semantic-router = ["semantic-router"] +extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "redisvl (>=0.4.1,<0.5.0)", "resend (>=0.8.0,<0.9.0)"] +proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", "boto3 (==1.34.34)", "cryptography (>=43.0.1,<44.0.0)", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=23.0.0,<24.0.0)", "litellm-enterprise (==0.1.5)", "litellm-proxy-extras (==0.1.21)", "mcp (==1.5.0)", "orjson (>=3.9.7,<4.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rich (==13.7.1)", "rq", "uvicorn (>=0.29.0,<0.30.0)", "uvloop (>=0.21.0,<0.22.0)", "websockets (>=13.1.0,<14.0.0)"] utils = ["numpydoc"] [[package]] name = "markupsafe" -version = "3.0.3" +version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559"}, - {file = "markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591"}, - {file = "markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6"}, - {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1"}, - {file = "markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa"}, - {file = "markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8"}, - {file = "markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1"}, - {file = "markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad"}, - {file = "markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf"}, - {file = "markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115"}, - {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a"}, - {file = "markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19"}, - {file = "markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01"}, - {file = "markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c"}, - {file = "markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e"}, - {file = "markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d"}, - {file = "markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f"}, - {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b"}, - {file = "markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d"}, - {file = "markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c"}, - {file = "markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f"}, - {file = "markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795"}, - {file = "markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676"}, - {file = "markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc"}, - {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12"}, - {file = "markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed"}, - {file = "markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5"}, - {file = "markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485"}, - {file = "markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73"}, - {file = "markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025"}, - {file = "markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb"}, - {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218"}, - {file = "markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287"}, - {file = "markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe"}, - {file = "markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97"}, - {file = "markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf"}, - {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe"}, - {file = "markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9"}, - {file = "markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581"}, - {file = "markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4"}, - {file = "markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab"}, - {file = "markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50"}, - {file = "markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523"}, - {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9"}, - {file = "markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa"}, - {file = "markupsafe-3.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26"}, - {file = "markupsafe-3.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42"}, - {file = "markupsafe-3.0.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2"}, - {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d"}, - {file = "markupsafe-3.0.3-cp39-cp39-win32.whl", hash = "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7"}, - {file = "markupsafe-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e"}, - {file = "markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8"}, - {file = "markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] [[package]] @@ -1299,211 +1085,166 @@ files = [ [[package]] name = "multidict" -version = "6.7.0" +version = "6.4.4" description = "multidict implementation" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "multidict-6.7.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9f474ad5acda359c8758c8accc22032c6abe6dc87a8be2440d097785e27a9349"}, - {file = "multidict-6.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b7a9db5a870f780220e931d0002bbfd88fb53aceb6293251e2c839415c1b20e"}, - {file = "multidict-6.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03ca744319864e92721195fa28c7a3b2bc7b686246b35e4078c1e4d0eb5466d3"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f0e77e3c0008bc9316e662624535b88d360c3a5d3f81e15cf12c139a75250046"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08325c9e5367aa379a3496aa9a022fe8837ff22e00b94db256d3a1378c76ab32"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e2862408c99f84aa571ab462d25236ef9cb12a602ea959ba9c9009a54902fc73"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4d72a9a2d885f5c208b0cb91ff2ed43636bb7e345ec839ff64708e04f69a13cc"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:478cc36476687bac1514d651cbbaa94b86b0732fb6855c60c673794c7dd2da62"}, - {file = "multidict-6.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6843b28b0364dc605f21481c90fadb5f60d9123b442eb8a726bb74feef588a84"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23bfeee5316266e5ee2d625df2d2c602b829435fc3a235c2ba2131495706e4a0"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:680878b9f3d45c31e1f730eef731f9b0bc1da456155688c6745ee84eb818e90e"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:eb866162ef2f45063acc7a53a88ef6fe8bf121d45c30ea3c9cd87ce7e191a8d4"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:df0e3bf7993bdbeca5ac25aa859cf40d39019e015c9c91809ba7093967f7a648"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:661709cdcd919a2ece2234f9bae7174e5220c80b034585d7d8a755632d3e2111"}, - {file = "multidict-6.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:096f52730c3fb8ed419db2d44391932b63891b2c5ed14850a7e215c0ba9ade36"}, - {file = "multidict-6.7.0-cp310-cp310-win32.whl", hash = "sha256:afa8a2978ec65d2336305550535c9c4ff50ee527914328c8677b3973ade52b85"}, - {file = "multidict-6.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:b15b3afff74f707b9275d5ba6a91ae8f6429c3ffb29bbfd216b0b375a56f13d7"}, - {file = "multidict-6.7.0-cp310-cp310-win_arm64.whl", hash = "sha256:4b73189894398d59131a66ff157837b1fafea9974be486d036bb3d32331fdbf0"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4d409aa42a94c0b3fa617708ef5276dfe81012ba6753a0370fcc9d0195d0a1fc"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14c9e076eede3b54c636f8ce1c9c252b5f057c62131211f0ceeec273810c9721"}, - {file = "multidict-6.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c09703000a9d0fa3c3404b27041e574cc7f4df4c6563873246d0e11812a94b6"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a265acbb7bb33a3a2d626afbe756371dce0279e7b17f4f4eda406459c2b5ff1c"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51cb455de290ae462593e5b1cb1118c5c22ea7f0d3620d9940bf695cea5a4bd7"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:db99677b4457c7a5c5a949353e125ba72d62b35f74e26da141530fbb012218a7"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f470f68adc395e0183b92a2f4689264d1ea4b40504a24d9882c27375e6662bb9"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0db4956f82723cc1c270de9c6e799b4c341d327762ec78ef82bb962f79cc07d8"}, - {file = "multidict-6.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e56d780c238f9e1ae66a22d2adf8d16f485381878250db8d496623cd38b22bd"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d14baca2ee12c1a64740d4531356ba50b82543017f3ad6de0deb943c5979abb"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:295a92a76188917c7f99cda95858c822f9e4aae5824246bba9b6b44004ddd0a6"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39f1719f57adbb767ef592a50ae5ebb794220d1188f9ca93de471336401c34d2"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0a13fb8e748dfc94749f622de065dd5c1def7e0d2216dba72b1d8069a389c6ff"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e3aa16de190d29a0ea1b48253c57d99a68492c8dd8948638073ab9e74dc9410b"}, - {file = "multidict-6.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a048ce45dcdaaf1defb76b2e684f997fb5abf74437b6cb7b22ddad934a964e34"}, - {file = "multidict-6.7.0-cp311-cp311-win32.whl", hash = "sha256:a90af66facec4cebe4181b9e62a68be65e45ac9b52b67de9eec118701856e7ff"}, - {file = "multidict-6.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:95b5ffa4349df2887518bb839409bcf22caa72d82beec453216802f475b23c81"}, - {file = "multidict-6.7.0-cp311-cp311-win_arm64.whl", hash = "sha256:329aa225b085b6f004a4955271a7ba9f1087e39dcb7e65f6284a988264a63912"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:8a3862568a36d26e650a19bb5cbbba14b71789032aebc0423f8cc5f150730184"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:960c60b5849b9b4f9dcc9bea6e3626143c252c74113df2c1540aebce70209b45"}, - {file = "multidict-6.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2049be98fb57a31b4ccf870bf377af2504d4ae35646a19037ec271e4c07998aa"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0934f3843a1860dd465d38895c17fce1f1cb37295149ab05cd1b9a03afacb2a7"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3e34f3a1b8131ba06f1a73adab24f30934d148afcd5f5de9a73565a4404384e"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:efbb54e98446892590dc2458c19c10344ee9a883a79b5cec4bc34d6656e8d546"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a35c5fc61d4f51eb045061e7967cfe3123d622cd500e8868e7c0c592a09fedc4"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29fe6740ebccba4175af1b9b87bf553e9c15cd5868ee967e010efcf94e4fd0f1"}, - {file = "multidict-6.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:123e2a72e20537add2f33a79e605f6191fba2afda4cbb876e35c1a7074298a7d"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b284e319754366c1aee2267a2036248b24eeb17ecd5dc16022095e747f2f4304"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:803d685de7be4303b5a657b76e2f6d1240e7e0a8aa2968ad5811fa2285553a12"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c04a328260dfd5db8c39538f999f02779012268f54614902d0afc775d44e0a62"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8a19cdb57cd3df4cd865849d93ee14920fb97224300c88501f16ecfa2604b4e0"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b2fd74c52accced7e75de26023b7dccee62511a600e62311b918ec5c168fc2a"}, - {file = "multidict-6.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3e8bfdd0e487acf992407a140d2589fe598238eaeffa3da8448d63a63cd363f8"}, - {file = "multidict-6.7.0-cp312-cp312-win32.whl", hash = "sha256:dd32a49400a2c3d52088e120ee00c1e3576cbff7e10b98467962c74fdb762ed4"}, - {file = "multidict-6.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:92abb658ef2d7ef22ac9f8bb88e8b6c3e571671534e029359b6d9e845923eb1b"}, - {file = "multidict-6.7.0-cp312-cp312-win_arm64.whl", hash = "sha256:490dab541a6a642ce1a9d61a4781656b346a55c13038f0b1244653828e3a83ec"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:bee7c0588aa0076ce77c0ea5d19a68d76ad81fcd9fe8501003b9a24f9d4000f6"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7ef6b61cad77091056ce0e7ce69814ef72afacb150b7ac6a3e9470def2198159"}, - {file = "multidict-6.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9c0359b1ec12b1d6849c59f9d319610b7f20ef990a6d454ab151aa0e3b9f78ca"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cd240939f71c64bd658f186330603aac1a9a81bf6273f523fca63673cb7378a8"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60a4d75718a5efa473ebd5ab685786ba0c67b8381f781d1be14da49f1a2dc60"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53a42d364f323275126aff81fb67c5ca1b7a04fda0546245730a55c8c5f24bc4"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b29b980d0ddbecb736735ee5bef69bb2ddca56eff603c86f3f29a1128299b4f"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8a93b1c0ed2d04b97a5e9336fd2d33371b9a6e29ab7dd6503d63407c20ffbaf"}, - {file = "multidict-6.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ff96e8815eecacc6645da76c413eb3b3d34cfca256c70b16b286a687d013c32"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7516c579652f6a6be0e266aec0acd0db80829ca305c3d771ed898538804c2036"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:040f393368e63fb0f3330e70c26bfd336656bed925e5cbe17c9da839a6ab13ec"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b3bc26a951007b1057a1c543af845f1c7e3e71cc240ed1ace7bf4484aa99196e"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7b022717c748dd1992a83e219587aabe45980d88969f01b316e78683e6285f64"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:9600082733859f00d79dee64effc7aef1beb26adb297416a4ad2116fd61374bd"}, - {file = "multidict-6.7.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94218fcec4d72bc61df51c198d098ce2b378e0ccbac41ddbed5ef44092913288"}, - {file = "multidict-6.7.0-cp313-cp313-win32.whl", hash = "sha256:a37bd74c3fa9d00be2d7b8eca074dc56bd8077ddd2917a839bd989612671ed17"}, - {file = "multidict-6.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:30d193c6cc6d559db42b6bcec8a5d395d34d60c9877a0b71ecd7c204fcf15390"}, - {file = "multidict-6.7.0-cp313-cp313-win_arm64.whl", hash = "sha256:ea3334cabe4d41b7ccd01e4d349828678794edbc2d3ae97fc162a3312095092e"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:ad9ce259f50abd98a1ca0aa6e490b58c316a0fce0617f609723e40804add2c00"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07f5594ac6d084cbb5de2df218d78baf55ef150b91f0ff8a21cc7a2e3a5a58eb"}, - {file = "multidict-6.7.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0591b48acf279821a579282444814a2d8d0af624ae0bc600aa4d1b920b6e924b"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:749a72584761531d2b9467cfbdfd29487ee21124c304c4b6cb760d8777b27f9c"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b4c3d199f953acd5b446bf7c0de1fe25d94e09e79086f8dc2f48a11a129cdf1"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9fb0211dfc3b51efea2f349ec92c114d7754dd62c01f81c3e32b765b70c45c9b"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a027ec240fe73a8d6281872690b988eed307cd7d91b23998ff35ff577ca688b5"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1d964afecdf3a8288789df2f5751dc0a8261138c3768d9af117ed384e538fad"}, - {file = "multidict-6.7.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:caf53b15b1b7df9fbd0709aa01409000a2b4dd03a5f6f5cc548183c7c8f8b63c"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:654030da3197d927f05a536a66186070e98765aa5142794c9904555d3a9d8fb5"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:2090d3718829d1e484706a2f525e50c892237b2bf9b17a79b059cb98cddc2f10"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2d2cfeec3f6f45651b3d408c4acec0ebf3daa9bc8a112a084206f5db5d05b754"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:4ef089f985b8c194d341eb2c24ae6e7408c9a0e2e5658699c92f497437d88c3c"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e93a0617cd16998784bf4414c7e40f17a35d2350e5c6f0bd900d3a8e02bd3762"}, - {file = "multidict-6.7.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f0feece2ef8ebc42ed9e2e8c78fc4aa3cf455733b507c09ef7406364c94376c6"}, - {file = "multidict-6.7.0-cp313-cp313t-win32.whl", hash = "sha256:19a1d55338ec1be74ef62440ca9e04a2f001a04d0cc49a4983dc320ff0f3212d"}, - {file = "multidict-6.7.0-cp313-cp313t-win_amd64.whl", hash = "sha256:3da4fb467498df97e986af166b12d01f05d2e04f978a9c1c680ea1988e0bc4b6"}, - {file = "multidict-6.7.0-cp313-cp313t-win_arm64.whl", hash = "sha256:b4121773c49a0776461f4a904cdf6264c88e42218aaa8407e803ca8025872792"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3bab1e4aff7adaa34410f93b1f8e57c4b36b9af0426a76003f441ee1d3c7e842"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b8512bac933afc3e45fb2b18da8e59b78d4f408399a960339598374d4ae3b56b"}, - {file = "multidict-6.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:79dcf9e477bc65414ebfea98ffd013cb39552b5ecd62908752e0e413d6d06e38"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:31bae522710064b5cbeddaf2e9f32b1abab70ac6ac91d42572502299e9953128"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a0df7ff02397bb63e2fd22af2c87dfa39e8c7f12947bc524dbdc528282c7e34"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a0222514e8e4c514660e182d5156a415c13ef0aabbd71682fc714e327b95e99"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2397ab4daaf2698eb51a76721e98db21ce4f52339e535725de03ea962b5a3202"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8891681594162635948a636c9fe0ff21746aeb3dd5463f6e25d9bea3a8a39ca1"}, - {file = "multidict-6.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18706cc31dbf402a7945916dd5cddf160251b6dab8a2c5f3d6d5a55949f676b3"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f844a1bbf1d207dd311a56f383f7eda2d0e134921d45751842d8235e7778965d"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d4393e3581e84e5645506923816b9cc81f5609a778c7e7534054091acc64d1c6"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:fbd18dc82d7bf274b37aa48d664534330af744e03bccf696d6f4c6042e7d19e7"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b6234e14f9314731ec45c42fc4554b88133ad53a09092cc48a88e771c125dadb"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:08d4379f9744d8f78d98c8673c06e202ffa88296f009c71bbafe8a6bf847d01f"}, - {file = "multidict-6.7.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fe04da3f79387f450fd0061d4dd2e45a72749d31bf634aecc9e27f24fdc4b3f"}, - {file = "multidict-6.7.0-cp314-cp314-win32.whl", hash = "sha256:fbafe31d191dfa7c4c51f7a6149c9fb7e914dcf9ffead27dcfd9f1ae382b3885"}, - {file = "multidict-6.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:2f67396ec0310764b9222a1728ced1ab638f61aadc6226f17a71dd9324f9a99c"}, - {file = "multidict-6.7.0-cp314-cp314-win_arm64.whl", hash = "sha256:ba672b26069957ee369cfa7fc180dde1fc6f176eaf1e6beaf61fbebbd3d9c000"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:c1dcc7524066fa918c6a27d61444d4ee7900ec635779058571f70d042d86ed63"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:27e0b36c2d388dc7b6ced3406671b401e84ad7eb0656b8f3a2f46ed0ce483718"}, - {file = "multidict-6.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a7baa46a22e77f0988e3b23d4ede5513ebec1929e34ee9495be535662c0dfe2"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7bf77f54997a9166a2f5675d1201520586439424c2511723a7312bdb4bcc034e"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e011555abada53f1578d63389610ac8a5400fc70ce71156b0aa30d326f1a5064"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:28b37063541b897fd6a318007373930a75ca6d6ac7c940dbe14731ffdd8d498e"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05047ada7a2fde2631a0ed706f1fd68b169a681dfe5e4cf0f8e4cb6618bbc2cd"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:716133f7d1d946a4e1b91b1756b23c088881e70ff180c24e864c26192ad7534a"}, - {file = "multidict-6.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1bed1b467ef657f2a0ae62844a607909ef1c6889562de5e1d505f74457d0b96"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca43bdfa5d37bd6aee89d85e1d0831fb86e25541be7e9d376ead1b28974f8e5e"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:44b546bd3eb645fd26fb949e43c02a25a2e632e2ca21a35e2e132c8105dc8599"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:a6ef16328011d3f468e7ebc326f24c1445f001ca1dec335b2f8e66bed3006394"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:5aa873cbc8e593d361ae65c68f85faadd755c3295ea2c12040ee146802f23b38"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:3d7b6ccce016e29df4b7ca819659f516f0bc7a4b3efa3bb2012ba06431b044f9"}, - {file = "multidict-6.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:171b73bd4ee683d307599b66793ac80981b06f069b62eea1c9e29c9241aa66b0"}, - {file = "multidict-6.7.0-cp314-cp314t-win32.whl", hash = "sha256:b2d7f80c4e1fd010b07cb26820aae86b7e73b681ee4889684fb8d2d4537aab13"}, - {file = "multidict-6.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:09929cab6fcb68122776d575e03c6cc64ee0b8fca48d17e135474b042ce515cd"}, - {file = "multidict-6.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:cc41db090ed742f32bd2d2c721861725e6109681eddf835d0a82bd3a5c382827"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:363eb68a0a59bd2303216d2346e6c441ba10d36d1f9969fcb6f1ba700de7bb5c"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d874eb056410ca05fed180b6642e680373688efafc7f077b2a2f61811e873a40"}, - {file = "multidict-6.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8b55d5497b51afdfde55925e04a022f1de14d4f4f25cdfd4f5d9b0aa96166851"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f8e5c0031b90ca9ce555e2e8fd5c3b02a25f14989cbc310701823832c99eb687"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cf41880c991716f3c7cec48e2f19ae4045fc9db5fc9cff27347ada24d710bb5"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8cfc12a8630a29d601f48d47787bd7eb730e475e83edb5d6c5084317463373eb"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3996b50c3237c4aec17459217c1e7bbdead9a22a0fcd3c365564fbd16439dde6"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7f5170993a0dd3ab871c74f45c0a21a4e2c37a2f2b01b5f722a2ad9c6650469e"}, - {file = "multidict-6.7.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ec81878ddf0e98817def1e77d4f50dae5ef5b0e4fe796fae3bd674304172416e"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9281bf5b34f59afbc6b1e477a372e9526b66ca446f4bf62592839c195a718b32"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:68af405971779d8b37198726f2b6fe3955db846fee42db7a4286fc542203934c"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3ba3ef510467abb0667421a286dc906e30eb08569365f5cdb131d7aff7c2dd84"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b61189b29081a20c7e4e0b49b44d5d44bb0dc92be3c6d06a11cc043f81bf9329"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fb287618b9c7aa3bf8d825f02d9201b2f13078a5ed3b293c8f4d953917d84d5e"}, - {file = "multidict-6.7.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:521f33e377ff64b96c4c556b81c55d0cfffb96a11c194fd0c3f1e56f3d8dd5a4"}, - {file = "multidict-6.7.0-cp39-cp39-win32.whl", hash = "sha256:ce8fdc2dca699f8dbf055a61d73eaa10482569ad20ee3c36ef9641f69afa8c91"}, - {file = "multidict-6.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:7e73299c99939f089dd9b2120a04a516b95cdf8c1cd2b18c53ebf0de80b1f18f"}, - {file = "multidict-6.7.0-cp39-cp39-win_arm64.whl", hash = "sha256:6bdce131e14b04fd34a809b6380dbfd826065c3e2fe8a50dbae659fa0c390546"}, - {file = "multidict-6.7.0-py3-none-any.whl", hash = "sha256:394fc5c42a333c9ffc3e421a4c85e08580d990e08b99f6bf35b4132114c5dcb3"}, - {file = "multidict-6.7.0.tar.gz", hash = "sha256:c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5"}, + {file = "multidict-6.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8adee3ac041145ffe4488ea73fa0a622b464cc25340d98be76924d0cda8545ff"}, + {file = "multidict-6.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b61e98c3e2a861035aaccd207da585bdcacef65fe01d7a0d07478efac005e028"}, + {file = "multidict-6.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:75493f28dbadecdbb59130e74fe935288813301a8554dc32f0c631b6bdcdf8b0"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffc3c6a37e048b5395ee235e4a2a0d639c2349dffa32d9367a42fc20d399772"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:87cb72263946b301570b0f63855569a24ee8758aaae2cd182aae7d95fbc92ca7"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bbf7bd39822fd07e3609b6b4467af4c404dd2b88ee314837ad1830a7f4a8299"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1f7cbd4f1f44ddf5fd86a8675b7679176eae770f2fc88115d6dddb6cefb59bc"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5ac9e5bfce0e6282e7f59ff7b7b9a74aa8e5c60d38186a4637f5aa764046ad"}, + {file = "multidict-6.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4efc31dfef8c4eeb95b6b17d799eedad88c4902daba39ce637e23a17ea078915"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9fcad2945b1b91c29ef2b4050f590bfcb68d8ac8e0995a74e659aa57e8d78e01"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d877447e7368c7320832acb7159557e49b21ea10ffeb135c1077dbbc0816b598"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:33a12ebac9f380714c298cbfd3e5b9c0c4e89c75fe612ae496512ee51028915f"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0f14ea68d29b43a9bf37953881b1e3eb75b2739e896ba4a6aa4ad4c5b9ffa145"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0327ad2c747a6600e4797d115d3c38a220fdb28e54983abe8964fd17e95ae83c"}, + {file = "multidict-6.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d1a20707492db9719a05fc62ee215fd2c29b22b47c1b1ba347f9abc831e26683"}, + {file = "multidict-6.4.4-cp310-cp310-win32.whl", hash = "sha256:d83f18315b9fca5db2452d1881ef20f79593c4aa824095b62cb280019ef7aa3d"}, + {file = "multidict-6.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:9c17341ee04545fd962ae07330cb5a39977294c883485c8d74634669b1f7fe04"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4f5f29794ac0e73d2a06ac03fd18870adc0135a9d384f4a306a951188ed02f95"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c04157266344158ebd57b7120d9b0b35812285d26d0e78193e17ef57bfe2979a"}, + {file = "multidict-6.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bb61ffd3ab8310d93427e460f565322c44ef12769f51f77277b4abad7b6f7223"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e0ba18a9afd495f17c351d08ebbc4284e9c9f7971d715f196b79636a4d0de44"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9faf1b1dcaadf9f900d23a0e6d6c8eadd6a95795a0e57fcca73acce0eb912065"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a4d1cb1327c6082c4fce4e2a438483390964c02213bc6b8d782cf782c9b1471f"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:941f1bec2f5dbd51feeb40aea654c2747f811ab01bdd3422a48a4e4576b7d76a"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5f8a146184da7ea12910a4cec51ef85e44f6268467fb489c3caf0cd512f29c2"}, + {file = "multidict-6.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:232b7237e57ec3c09be97206bfb83a0aa1c5d7d377faa019c68a210fa35831f1"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:55ae0721c1513e5e3210bca4fc98456b980b0c2c016679d3d723119b6b202c42"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:51d662c072579f63137919d7bb8fc250655ce79f00c82ecf11cab678f335062e"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0e05c39962baa0bb19a6b210e9b1422c35c093b651d64246b6c2e1a7e242d9fd"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5b1cc3ab8c31d9ebf0faa6e3540fb91257590da330ffe6d2393d4208e638925"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:93ec84488a384cd7b8a29c2c7f467137d8a73f6fe38bb810ecf29d1ade011a7c"}, + {file = "multidict-6.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b308402608493638763abc95f9dc0030bbd6ac6aff784512e8ac3da73a88af08"}, + {file = "multidict-6.4.4-cp311-cp311-win32.whl", hash = "sha256:343892a27d1a04d6ae455ecece12904d242d299ada01633d94c4f431d68a8c49"}, + {file = "multidict-6.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:73484a94f55359780c0f458bbd3c39cb9cf9c182552177d2136e828269dee529"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:dc388f75a1c00000824bf28b7633e40854f4127ede80512b44c3cfeeea1839a2"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:98af87593a666f739d9dba5d0ae86e01b0e1a9cfcd2e30d2d361fbbbd1a9162d"}, + {file = "multidict-6.4.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aff4cafea2d120327d55eadd6b7f1136a8e5a0ecf6fb3b6863e8aca32cd8e50a"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:169c4ba7858176b797fe551d6e99040c531c775d2d57b31bcf4de6d7a669847f"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b9eb4c59c54421a32b3273d4239865cb14ead53a606db066d7130ac80cc8ec93"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7cf3bd54c56aa16fdb40028d545eaa8d051402b61533c21e84046e05513d5780"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f682c42003c7264134bfe886376299db4cc0c6cd06a3295b41b347044bcb5482"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920f9cf2abdf6e493c519492d892c362007f113c94da4c239ae88429835bad1"}, + {file = "multidict-6.4.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:530d86827a2df6504526106b4c104ba19044594f8722d3e87714e847c74a0275"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ecde56ea2439b96ed8a8d826b50c57364612ddac0438c39e473fafad7ae1c23b"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:dc8c9736d8574b560634775ac0def6bdc1661fc63fa27ffdfc7264c565bcb4f2"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:7f3d3b3c34867579ea47cbd6c1f2ce23fbfd20a273b6f9e3177e256584f1eacc"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:87a728af265e08f96b6318ebe3c0f68b9335131f461efab2fc64cc84a44aa6ed"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9f193eeda1857f8e8d3079a4abd258f42ef4a4bc87388452ed1e1c4d2b0c8740"}, + {file = "multidict-6.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:be06e73c06415199200e9a2324a11252a3d62030319919cde5e6950ffeccf72e"}, + {file = "multidict-6.4.4-cp312-cp312-win32.whl", hash = "sha256:622f26ea6a7e19b7c48dd9228071f571b2fbbd57a8cd71c061e848f281550e6b"}, + {file = "multidict-6.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:5e2bcda30d5009996ff439e02a9f2b5c3d64a20151d34898c000a6281faa3781"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:82ffabefc8d84c2742ad19c37f02cde5ec2a1ee172d19944d380f920a340e4b9"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6a2f58a66fe2c22615ad26156354005391e26a2f3721c3621504cd87c1ea87bf"}, + {file = "multidict-6.4.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5883d6ee0fd9d8a48e9174df47540b7545909841ac82354c7ae4cbe9952603bd"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9abcf56a9511653fa1d052bfc55fbe53dbee8f34e68bd6a5a038731b0ca42d15"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6ed5ae5605d4ad5a049fad2a28bb7193400700ce2f4ae484ab702d1e3749c3f9"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbfcb60396f9bcfa63e017a180c3105b8c123a63e9d1428a36544e7d37ca9e20"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0f1987787f5f1e2076b59692352ab29a955b09ccc433c1f6b8e8e18666f608b"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d0121ccce8c812047d8d43d691a1ad7641f72c4f730474878a5aeae1b8ead8c"}, + {file = "multidict-6.4.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83ec4967114295b8afd120a8eec579920c882831a3e4c3331d591a8e5bfbbc0f"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:995f985e2e268deaf17867801b859a282e0448633f1310e3704b30616d269d69"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:d832c608f94b9f92a0ec8b7e949be7792a642b6e535fcf32f3e28fab69eeb046"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d21c1212171cf7da703c5b0b7a0e85be23b720818aef502ad187d627316d5645"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:cbebaa076aaecad3d4bb4c008ecc73b09274c952cf6a1b78ccfd689e51f5a5b0"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c93a6fb06cc8e5d3628b2b5fda215a5db01e8f08fc15fadd65662d9b857acbe4"}, + {file = "multidict-6.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8cd8f81f1310182362fb0c7898145ea9c9b08a71081c5963b40ee3e3cac589b1"}, + {file = "multidict-6.4.4-cp313-cp313-win32.whl", hash = "sha256:3e9f1cd61a0ab857154205fb0b1f3d3ace88d27ebd1409ab7af5096e409614cd"}, + {file = "multidict-6.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:8ffb40b74400e4455785c2fa37eba434269149ec525fc8329858c862e4b35373"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:6a602151dbf177be2450ef38966f4be3467d41a86c6a845070d12e17c858a156"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0d2b9712211b860d123815a80b859075d86a4d54787e247d7fbee9db6832cf1c"}, + {file = "multidict-6.4.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d2fa86af59f8fc1972e121ade052145f6da22758f6996a197d69bb52f8204e7e"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50855d03e9e4d66eab6947ba688ffb714616f985838077bc4b490e769e48da51"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5bce06b83be23225be1905dcdb6b789064fae92499fbc458f59a8c0e68718601"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:66ed0731f8e5dfd8369a883b6e564aca085fb9289aacabd9decd70568b9a30de"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:329ae97fc2f56f44d91bc47fe0972b1f52d21c4b7a2ac97040da02577e2daca2"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c27e5dcf520923d6474d98b96749e6805f7677e93aaaf62656005b8643f907ab"}, + {file = "multidict-6.4.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:058cc59b9e9b143cc56715e59e22941a5d868c322242278d28123a5d09cdf6b0"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:69133376bc9a03f8c47343d33f91f74a99c339e8b58cea90433d8e24bb298031"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d6b15c55721b1b115c5ba178c77104123745b1417527ad9641a4c5e2047450f0"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:a887b77f51d3d41e6e1a63cf3bc7ddf24de5939d9ff69441387dfefa58ac2e26"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:632a3bf8f1787f7ef7d3c2f68a7bde5be2f702906f8b5842ad6da9d974d0aab3"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:a145c550900deb7540973c5cdb183b0d24bed6b80bf7bddf33ed8f569082535e"}, + {file = "multidict-6.4.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc5d83c6619ca5c9672cb78b39ed8542f1975a803dee2cda114ff73cbb076edd"}, + {file = "multidict-6.4.4-cp313-cp313t-win32.whl", hash = "sha256:3312f63261b9df49be9d57aaa6abf53a6ad96d93b24f9cc16cf979956355ce6e"}, + {file = "multidict-6.4.4-cp313-cp313t-win_amd64.whl", hash = "sha256:ba852168d814b2c73333073e1c7116d9395bea69575a01b0b3c89d2d5a87c8fb"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:603f39bd1cf85705c6c1ba59644b480dfe495e6ee2b877908de93322705ad7cf"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fc60f91c02e11dfbe3ff4e1219c085695c339af72d1641800fe6075b91850c8f"}, + {file = "multidict-6.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:496bcf01c76a70a31c3d746fd39383aad8d685ce6331e4c709e9af4ced5fa221"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4219390fb5bf8e548e77b428bb36a21d9382960db5321b74d9d9987148074d6b"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef4e9096ff86dfdcbd4a78253090ba13b1d183daa11b973e842465d94ae1772"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:49a29d7133b1fc214e818bbe025a77cc6025ed9a4f407d2850373ddde07fd04a"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e32053d6d3a8b0dfe49fde05b496731a0e6099a4df92154641c00aa76786aef5"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc403092a49509e8ef2d2fd636a8ecefc4698cc57bbe894606b14579bc2a955"}, + {file = "multidict-6.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5363f9b2a7f3910e5c87d8b1855c478c05a2dc559ac57308117424dfaad6805c"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2e543a40e4946cf70a88a3be87837a3ae0aebd9058ba49e91cacb0b2cd631e2b"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:60d849912350da557fe7de20aa8cf394aada6980d0052cc829eeda4a0db1c1db"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:19d08b4f22eae45bb018b9f06e2838c1e4b853c67628ef8ae126d99de0da6395"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:d693307856d1ef08041e8b6ff01d5b4618715007d288490ce2c7e29013c12b9a"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fad6daaed41021934917f4fb03ca2db8d8a4d79bf89b17ebe77228eb6710c003"}, + {file = "multidict-6.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c10d17371bff801af0daf8b073c30b6cf14215784dc08cd5c43ab5b7b8029bbc"}, + {file = "multidict-6.4.4-cp39-cp39-win32.whl", hash = "sha256:7e23f2f841fcb3ebd4724a40032d32e0892fbba4143e43d2a9e7695c5e50e6bd"}, + {file = "multidict-6.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d7b50b673ffb4ff4366e7ab43cf1f0aef4bd3608735c5fbdf0bdb6f690da411"}, + {file = "multidict-6.4.4-py3-none-any.whl", hash = "sha256:bd4557071b561a8b3b6075c3ce93cf9bfb6182cb241805c3d66ced3b75eff4ac"}, + {file = "multidict-6.4.4.tar.gz", hash = "sha256:69ee9e6ba214b5245031b76233dd95408a0fd57fdb019ddcc1ead4790932a8e8"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.11\""} + [[package]] name = "mypy" -version = "1.18.2" +version = "1.15.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "mypy-1.18.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c1eab0cf6294dafe397c261a75f96dc2c31bffe3b944faa24db5def4e2b0f77c"}, - {file = "mypy-1.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7a780ca61fc239e4865968ebc5240bb3bf610ef59ac398de9a7421b54e4a207e"}, - {file = "mypy-1.18.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:448acd386266989ef11662ce3c8011fd2a7b632e0ec7d61a98edd8e27472225b"}, - {file = "mypy-1.18.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f9e171c465ad3901dc652643ee4bffa8e9fef4d7d0eece23b428908c77a76a66"}, - {file = "mypy-1.18.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:592ec214750bc00741af1f80cbf96b5013d81486b7bb24cb052382c19e40b428"}, - {file = "mypy-1.18.2-cp310-cp310-win_amd64.whl", hash = "sha256:7fb95f97199ea11769ebe3638c29b550b5221e997c63b14ef93d2e971606ebed"}, - {file = "mypy-1.18.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:807d9315ab9d464125aa9fcf6d84fde6e1dc67da0b6f80e7405506b8ac72bc7f"}, - {file = "mypy-1.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:776bb00de1778caf4db739c6e83919c1d85a448f71979b6a0edd774ea8399341"}, - {file = "mypy-1.18.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1379451880512ffce14505493bd9fe469e0697543717298242574882cf8cdb8d"}, - {file = "mypy-1.18.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1331eb7fd110d60c24999893320967594ff84c38ac6d19e0a76c5fd809a84c86"}, - {file = "mypy-1.18.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ca30b50a51e7ba93b00422e486cbb124f1c56a535e20eff7b2d6ab72b3b2e37"}, - {file = "mypy-1.18.2-cp311-cp311-win_amd64.whl", hash = "sha256:664dc726e67fa54e14536f6e1224bcfce1d9e5ac02426d2326e2bb4e081d1ce8"}, - {file = "mypy-1.18.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:33eca32dd124b29400c31d7cf784e795b050ace0e1f91b8dc035672725617e34"}, - {file = "mypy-1.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a3c47adf30d65e89b2dcd2fa32f3aeb5e94ca970d2c15fcb25e297871c8e4764"}, - {file = "mypy-1.18.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d6c838e831a062f5f29d11c9057c6009f60cb294fea33a98422688181fe2893"}, - {file = "mypy-1.18.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01199871b6110a2ce984bde85acd481232d17413868c9807e95c1b0739a58914"}, - {file = "mypy-1.18.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a2afc0fa0b0e91b4599ddfe0f91e2c26c2b5a5ab263737e998d6817874c5f7c8"}, - {file = "mypy-1.18.2-cp312-cp312-win_amd64.whl", hash = "sha256:d8068d0afe682c7c4897c0f7ce84ea77f6de953262b12d07038f4d296d547074"}, - {file = "mypy-1.18.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:07b8b0f580ca6d289e69209ec9d3911b4a26e5abfde32228a288eb79df129fcc"}, - {file = "mypy-1.18.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ed4482847168439651d3feee5833ccedbf6657e964572706a2adb1f7fa4dfe2e"}, - {file = "mypy-1.18.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3ad2afadd1e9fea5cf99a45a822346971ede8685cc581ed9cd4d42eaf940986"}, - {file = "mypy-1.18.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a431a6f1ef14cf8c144c6b14793a23ec4eae3db28277c358136e79d7d062f62d"}, - {file = "mypy-1.18.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7ab28cc197f1dd77a67e1c6f35cd1f8e8b73ed2217e4fc005f9e6a504e46e7ba"}, - {file = "mypy-1.18.2-cp313-cp313-win_amd64.whl", hash = "sha256:0e2785a84b34a72ba55fb5daf079a1003a34c05b22238da94fcae2bbe46f3544"}, - {file = "mypy-1.18.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:62f0e1e988ad41c2a110edde6c398383a889d95b36b3e60bcf155f5164c4fdce"}, - {file = "mypy-1.18.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8795a039bab805ff0c1dfdb8cd3344642c2b99b8e439d057aba30850b8d3423d"}, - {file = "mypy-1.18.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6ca1e64b24a700ab5ce10133f7ccd956a04715463d30498e64ea8715236f9c9c"}, - {file = "mypy-1.18.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d924eef3795cc89fecf6bedc6ed32b33ac13e8321344f6ddbf8ee89f706c05cb"}, - {file = "mypy-1.18.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:20c02215a080e3a2be3aa50506c67242df1c151eaba0dcbc1e4e557922a26075"}, - {file = "mypy-1.18.2-cp314-cp314-win_amd64.whl", hash = "sha256:749b5f83198f1ca64345603118a6f01a4e99ad4bf9d103ddc5a3200cc4614adf"}, - {file = "mypy-1.18.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:25a9c8fb67b00599f839cf472713f54249a62efd53a54b565eb61956a7e3296b"}, - {file = "mypy-1.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2b9c7e284ee20e7598d6f42e13ca40b4928e6957ed6813d1ab6348aa3f47133"}, - {file = "mypy-1.18.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d6985ed057513e344e43a26cc1cd815c7a94602fb6a3130a34798625bc2f07b6"}, - {file = "mypy-1.18.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22f27105f1525ec024b5c630c0b9f36d5c1cc4d447d61fe51ff4bd60633f47ac"}, - {file = "mypy-1.18.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:030c52d0ea8144e721e49b1f68391e39553d7451f0c3f8a7565b59e19fcb608b"}, - {file = "mypy-1.18.2-cp39-cp39-win_amd64.whl", hash = "sha256:aa5e07ac1a60a253445797e42b8b2963c9675563a94f11291ab40718b016a7a0"}, - {file = "mypy-1.18.2-py3-none-any.whl", hash = "sha256:22a1748707dd62b58d2ae53562ffc4d7f8bcc727e8ac7cbc69c053ddc874d47e"}, - {file = "mypy-1.18.2.tar.gz", hash = "sha256:06a398102a5f203d7477b2923dda3634c36727fa5c237d8f859ef90c42a9924b"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be68172e9fd9ad8fb876c6389f16d1c1b5f100ffa779f77b1fb2176fcc9ab95b"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7be1e46525adfa0d97681432ee9fcd61a3964c2446795714699a998d193f1a3"}, + {file = "mypy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2e2c2e6d3593f6451b18588848e66260ff62ccca522dd231cd4dd59b0160668b"}, + {file = "mypy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:6983aae8b2f653e098edb77f893f7b6aca69f6cffb19b2cc7443f23cce5f4828"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2922d42e16d6de288022e5ca321cd0618b238cfc5570e0263e5ba0a77dbef56f"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2ee2d57e01a7c35de00f4634ba1bbf015185b219e4dc5909e281016df43f5ee5"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:973500e0774b85d9689715feeffcc980193086551110fd678ebe1f4342fb7c5e"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a95fb17c13e29d2d5195869262f8125dfdb5c134dc8d9a9d0aecf7525b10c2c"}, + {file = "mypy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1905f494bfd7d85a23a88c5d97840888a7bd516545fc5aaedff0267e0bb54e2f"}, + {file = "mypy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:c9817fa23833ff189db061e6d2eff49b2f3b6ed9856b4a0a73046e41932d744f"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:aea39e0583d05124836ea645f412e88a5c7d0fd77a6d694b60d9b6b2d9f184fd"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f2147ab812b75e5b5499b01ade1f4a81489a147c01585cda36019102538615f"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce436f4c6d218a070048ed6a44c0bbb10cd2cc5e272b29e7845f6a2f57ee4464"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8023ff13985661b50a5928fc7a5ca15f3d1affb41e5f0a9952cb68ef090b31ee"}, + {file = "mypy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1124a18bc11a6a62887e3e137f37f53fbae476dc36c185d549d4f837a2a6a14e"}, + {file = "mypy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:171a9ca9a40cd1843abeca0e405bc1940cd9b305eaeea2dda769ba096932bb22"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93faf3fdb04768d44bf28693293f3904bbb555d076b781ad2530214ee53e3445"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:811aeccadfb730024c5d3e326b2fbe9249bb7413553f15499a4050f7c30e801d"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:98b7b9b9aedb65fe628c62a6dc57f6d5088ef2dfca37903a7d9ee374d03acca5"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036"}, + {file = "mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357"}, + {file = "mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b"}, + {file = "mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2"}, + {file = "mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980"}, + {file = "mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e"}, + {file = "mypy-1.15.0.tar.gz", hash = "sha256:404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43"}, ] [package.dependencies] mypy_extensions = ">=1.0.0" -pathspec = ">=0.9.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing_extensions = ">=4.6.0" [package.extras] @@ -1527,149 +1268,130 @@ files = [ [[package]] name = "openai" -version = "2.7.1" +version = "1.75.0" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "openai-2.7.1-py3-none-any.whl", hash = "sha256:2f2530354d94c59c614645a4662b9dab0a5b881c5cd767a8587398feac0c9021"}, - {file = "openai-2.7.1.tar.gz", hash = "sha256:df4d4a3622b2df3475ead8eb0fbb3c27fd1c070fa2e55d778ca4f40e0186c726"}, + {file = "openai-1.75.0-py3-none-any.whl", hash = "sha256:fe6f932d2ded3b429ff67cc9ad118c71327db32eb9d32dd723de3acfca337125"}, + {file = "openai-1.75.0.tar.gz", hash = "sha256:fb3ea907efbdb1bcfd0c44507ad9c961afd7dce3147292b54505ecfd17be8fd1"}, ] [package.dependencies] anyio = ">=3.5.0,<5" distro = ">=1.7.0,<2" httpx = ">=0.23.0,<1" -jiter = ">=0.10.0,<1" +jiter = ">=0.4.0,<1" pydantic = ">=1.9.0,<3" sniffio = "*" tqdm = ">4" typing-extensions = ">=4.11,<5" [package.extras] -aiohttp = ["aiohttp", "httpx-aiohttp (>=0.1.9)"] datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] realtime = ["websockets (>=13,<16)"] voice-helpers = ["numpy (>=2.0.2)", "sounddevice (>=0.5.1)"] [[package]] name = "opentelemetry-api" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Python API" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_api-1.38.0-py3-none-any.whl", hash = "sha256:2891b0197f47124454ab9f0cf58f3be33faca394457ac3e09daba13ff50aa582"}, - {file = "opentelemetry_api-1.38.0.tar.gz", hash = "sha256:f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12"}, + {file = "opentelemetry_api-1.33.1-py3-none-any.whl", hash = "sha256:4db83ebcf7ea93e64637ec6ee6fabee45c5cbe4abd9cf3da95c43828ddb50b83"}, + {file = "opentelemetry_api-1.33.1.tar.gz", hash = "sha256:1c6055fc0a2d3f23a50c7e17e16ef75ad489345fd3df1f8b8af7c0bbf8a109e8"}, ] [package.dependencies] -importlib-metadata = ">=6.0,<8.8.0" -typing-extensions = ">=4.5.0" +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0,<8.7.0" [[package]] name = "opentelemetry-exporter-otlp-proto-common" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Protobuf encoding" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_exporter_otlp_proto_common-1.38.0-py3-none-any.whl", hash = "sha256:03cb76ab213300fe4f4c62b7d8f17d97fcfd21b89f0b5ce38ea156327ddda74a"}, - {file = "opentelemetry_exporter_otlp_proto_common-1.38.0.tar.gz", hash = "sha256:e333278afab4695aa8114eeb7bf4e44e65c6607d54968271a249c180b2cb605c"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.33.1-py3-none-any.whl", hash = "sha256:b81c1de1ad349785e601d02715b2d29d6818aed2c809c20219f3d1f20b038c36"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.33.1.tar.gz", hash = "sha256:c57b3fa2d0595a21c4ed586f74f948d259d9949b58258f11edb398f246bec131"}, ] [package.dependencies] -opentelemetry-proto = "1.38.0" +opentelemetry-proto = "1.33.1" [[package]] name = "opentelemetry-exporter-otlp-proto-http" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Collector Protobuf over HTTP Exporter" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_exporter_otlp_proto_http-1.38.0-py3-none-any.whl", hash = "sha256:84b937305edfc563f08ec69b9cb2298be8188371217e867c1854d77198d0825b"}, - {file = "opentelemetry_exporter_otlp_proto_http-1.38.0.tar.gz", hash = "sha256:f16bd44baf15cbe07633c5112ffc68229d0edbeac7b37610be0b2def4e21e90b"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.33.1-py3-none-any.whl", hash = "sha256:ebd6c523b89a2ecba0549adb92537cc2bf647b4ee61afbbd5a4c6535aa3da7cf"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.33.1.tar.gz", hash = "sha256:46622d964a441acb46f463ebdc26929d9dec9efb2e54ef06acdc7305e8593c38"}, ] [package.dependencies] +deprecated = ">=1.2.6" googleapis-common-protos = ">=1.52,<2.0" opentelemetry-api = ">=1.15,<2.0" -opentelemetry-exporter-otlp-proto-common = "1.38.0" -opentelemetry-proto = "1.38.0" -opentelemetry-sdk = ">=1.38.0,<1.39.0" +opentelemetry-exporter-otlp-proto-common = "1.33.1" +opentelemetry-proto = "1.33.1" +opentelemetry-sdk = ">=1.33.1,<1.34.0" requests = ">=2.7,<3.0" -typing-extensions = ">=4.5.0" - -[[package]] -name = "opentelemetry-instrumentation" -version = "0.59b0" -description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" -optional = false -python-versions = ">=3.9" -groups = ["main"] -files = [ - {file = "opentelemetry_instrumentation-0.59b0-py3-none-any.whl", hash = "sha256:44082cc8fe56b0186e87ee8f7c17c327c4c2ce93bdbe86496e600985d74368ee"}, - {file = "opentelemetry_instrumentation-0.59b0.tar.gz", hash = "sha256:6010f0faaacdaf7c4dff8aac84e226d23437b331dcda7e70367f6d73a7db1adc"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.4,<2.0" -opentelemetry-semantic-conventions = "0.59b0" -packaging = ">=18.0" -wrapt = ">=1.0.0,<2.0.0" [[package]] name = "opentelemetry-proto" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Python Proto" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_proto-1.38.0-py3-none-any.whl", hash = "sha256:b6ebe54d3217c42e45462e2a1ae28c3e2bf2ec5a5645236a490f55f45f1a0a18"}, - {file = "opentelemetry_proto-1.38.0.tar.gz", hash = "sha256:88b161e89d9d372ce723da289b7da74c3a8354a8e5359992be813942969ed468"}, + {file = "opentelemetry_proto-1.33.1-py3-none-any.whl", hash = "sha256:243d285d9f29663fc7ea91a7171fcc1ccbbfff43b48df0774fd64a37d98eda70"}, + {file = "opentelemetry_proto-1.33.1.tar.gz", hash = "sha256:9627b0a5c90753bf3920c398908307063e4458b287bb890e5c1d6fa11ad50b68"}, ] [package.dependencies] -protobuf = ">=5.0,<7.0" +protobuf = ">=5.0,<6.0" [[package]] name = "opentelemetry-sdk" -version = "1.38.0" +version = "1.33.1" description = "OpenTelemetry Python SDK" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_sdk-1.38.0-py3-none-any.whl", hash = "sha256:1c66af6564ecc1553d72d811a01df063ff097cdc82ce188da9951f93b8d10f6b"}, - {file = "opentelemetry_sdk-1.38.0.tar.gz", hash = "sha256:93df5d4d871ed09cb4272305be4d996236eedb232253e3ab864c8620f051cebe"}, + {file = "opentelemetry_sdk-1.33.1-py3-none-any.whl", hash = "sha256:19ea73d9a01be29cacaa5d6c8ce0adc0b7f7b4d58cc52f923e4413609f670112"}, + {file = "opentelemetry_sdk-1.33.1.tar.gz", hash = "sha256:85b9fcf7c3d23506fbc9692fd210b8b025a1920535feec50bd54ce203d57a531"}, ] [package.dependencies] -opentelemetry-api = "1.38.0" -opentelemetry-semantic-conventions = "0.59b0" -typing-extensions = ">=4.5.0" +opentelemetry-api = "1.33.1" +opentelemetry-semantic-conventions = "0.54b1" +typing-extensions = ">=3.7.4" [[package]] name = "opentelemetry-semantic-conventions" -version = "0.59b0" +version = "0.54b1" description = "OpenTelemetry Semantic Conventions" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "opentelemetry_semantic_conventions-0.59b0-py3-none-any.whl", hash = "sha256:35d3b8833ef97d614136e253c1da9342b4c3c083bbaf29ce31d572a1c3825eed"}, - {file = "opentelemetry_semantic_conventions-0.59b0.tar.gz", hash = "sha256:7a6db3f30d70202d5bf9fa4b69bc866ca6a30437287de6c510fb594878aed6b0"}, + {file = "opentelemetry_semantic_conventions-0.54b1-py3-none-any.whl", hash = "sha256:29dab644a7e435b58d3a3918b58c333c92686236b30f7891d5e51f02933ca60d"}, + {file = "opentelemetry_semantic_conventions-0.54b1.tar.gz", hash = "sha256:d1cecedae15d19bdaafca1e56b29a66aa286f50b5d08f036a145c7f3e9ef9cee"}, ] [package.dependencies] -opentelemetry-api = "1.38.0" -typing-extensions = ">=4.5.0" +deprecated = ">=1.2.6" +opentelemetry-api = "1.33.1" [[package]] name = "packaging" @@ -1683,18 +1405,6 @@ files = [ {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] -[[package]] -name = "pathspec" -version = "0.12.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - [[package]] name = "pexpect" version = "4.9.0" @@ -1754,14 +1464,14 @@ test = ["anthropic", "coverage", "django", "flake8", "freezegun (==1.5.1)", "lan [[package]] name = "prompt-toolkit" -version = "3.0.52" +version = "3.0.51" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955"}, - {file = "prompt_toolkit-3.0.52.tar.gz", hash = "sha256:28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855"}, + {file = "prompt_toolkit-3.0.51-py3-none-any.whl", hash = "sha256:52742911fde84e2d423e2f9a4cf1de7d7ac4e51958f648d9540e0fb8db077b07"}, + {file = "prompt_toolkit-3.0.51.tar.gz", hash = "sha256:931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed"}, ] [package.dependencies] @@ -1769,154 +1479,131 @@ wcwidth = "*" [[package]] name = "propcache" -version = "0.4.1" +version = "0.3.1" description = "Accelerated property cache" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db"}, - {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8"}, - {file = "propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db"}, - {file = "propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900"}, - {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c"}, - {file = "propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb"}, - {file = "propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37"}, - {file = "propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5"}, - {file = "propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc"}, - {file = "propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757"}, - {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f"}, - {file = "propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1"}, - {file = "propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6"}, - {file = "propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403"}, - {file = "propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4"}, - {file = "propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9"}, - {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75"}, - {file = "propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8"}, - {file = "propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db"}, - {file = "propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311"}, - {file = "propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c"}, - {file = "propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61"}, - {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66"}, - {file = "propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81"}, - {file = "propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e"}, - {file = "propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566"}, - {file = "propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b"}, - {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7"}, - {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1"}, - {file = "propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717"}, - {file = "propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37"}, - {file = "propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c"}, - {file = "propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44"}, - {file = "propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49"}, - {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144"}, - {file = "propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f"}, - {file = "propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153"}, - {file = "propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393"}, - {file = "propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc"}, - {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36"}, - {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455"}, - {file = "propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85"}, - {file = "propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1"}, - {file = "propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3d233076ccf9e450c8b3bc6720af226b898ef5d051a2d145f7d765e6e9f9bcff"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:357f5bb5c377a82e105e44bd3d52ba22b616f7b9773714bff93573988ef0a5fb"}, - {file = "propcache-0.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cbc3b6dfc728105b2a57c06791eb07a94229202ea75c59db644d7d496b698cac"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:182b51b421f0501952d938dc0b0eb45246a5b5153c50d42b495ad5fb7517c888"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b536b39c5199b96fc6245eb5fb796c497381d3942f169e44e8e392b29c9ebcc"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:db65d2af507bbfbdcedb254a11149f894169d90488dd3e7190f7cdcb2d6cd57a"}, - {file = "propcache-0.4.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd2dbc472da1f772a4dae4fa24be938a6c544671a912e30529984dd80400cd88"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:daede9cd44e0f8bdd9e6cc9a607fc81feb80fae7a5fc6cecaff0e0bb32e42d00"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:71b749281b816793678ae7f3d0d84bd36e694953822eaad408d682efc5ca18e0"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:0002004213ee1f36cfb3f9a42b5066100c44276b9b72b4e1504cddd3d692e86e"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fe49d0a85038f36ba9e3ffafa1103e61170b28e95b16622e11be0a0ea07c6781"}, - {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:99d43339c83aaf4d32bda60928231848eee470c6bda8d02599cc4cebe872d183"}, - {file = "propcache-0.4.1-cp39-cp39-win32.whl", hash = "sha256:a129e76735bc792794d5177069691c3217898b9f5cee2b2661471e52ffe13f19"}, - {file = "propcache-0.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:948dab269721ae9a87fd16c514a0a2c2a1bdb23a9a61b969b0f9d9ee2968546f"}, - {file = "propcache-0.4.1-cp39-cp39-win_arm64.whl", hash = "sha256:5fd37c406dd6dc85aa743e214cef35dc54bbdd1419baac4f6ae5e5b1a2976938"}, - {file = "propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237"}, - {file = "propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f27785888d2fdd918bc36de8b8739f2d6c791399552333721b58193f68ea3e98"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4e89cde74154c7b5957f87a355bb9c8ec929c167b59c83d90654ea36aeb6180"}, + {file = "propcache-0.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:730178f476ef03d3d4d255f0c9fa186cb1d13fd33ffe89d39f2cda4da90ceb71"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967a8eec513dbe08330f10137eacb427b2ca52118769e82ebcfcab0fba92a649"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b9145c35cc87313b5fd480144f8078716007656093d23059e8993d3a8fa730f"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e64e948ab41411958670f1093c0a57acfdc3bee5cf5b935671bbd5313bcf229"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:319fa8765bfd6a265e5fa661547556da381e53274bc05094fc9ea50da51bfd46"}, + {file = "propcache-0.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66d8ccbc902ad548312b96ed8d5d266d0d2c6d006fd0f66323e9d8f2dd49be7"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2d219b0dbabe75e15e581fc1ae796109b07c8ba7d25b9ae8d650da582bed01b0"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:cd6a55f65241c551eb53f8cf4d2f4af33512c39da5d9777694e9d9c60872f519"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9979643ffc69b799d50d3a7b72b5164a2e97e117009d7af6dfdd2ab906cb72cd"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4cf9e93a81979f1424f1a3d155213dc928f1069d697e4353edb8a5eba67c6259"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2fce1df66915909ff6c824bbb5eb403d2d15f98f1518e583074671a30fe0c21e"}, + {file = "propcache-0.3.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4d0dfdd9a2ebc77b869a0b04423591ea8823f791293b527dc1bb896c1d6f1136"}, + {file = "propcache-0.3.1-cp310-cp310-win32.whl", hash = "sha256:1f6cc0ad7b4560e5637eb2c994e97b4fa41ba8226069c9277eb5ea7101845b42"}, + {file = "propcache-0.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:47ef24aa6511e388e9894ec16f0fbf3313a53ee68402bc428744a367ec55b833"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7f30241577d2fef2602113b70ef7231bf4c69a97e04693bde08ddab913ba0ce5"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:43593c6772aa12abc3af7784bff4a41ffa921608dd38b77cf1dfd7f5c4e71371"}, + {file = "propcache-0.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a75801768bbe65499495660b777e018cbe90c7980f07f8aa57d6be79ea6f71da"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6f1324db48f001c2ca26a25fa25af60711e09b9aaf4b28488602776f4f9a744"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cdb0f3e1eb6dfc9965d19734d8f9c481b294b5274337a8cb5cb01b462dcb7e0"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eb34d90aac9bfbced9a58b266f8946cb5935869ff01b164573a7634d39fbcb5"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f35c7070eeec2cdaac6fd3fe245226ed2a6292d3ee8c938e5bb645b434c5f256"}, + {file = "propcache-0.3.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b23c11c2c9e6d4e7300c92e022046ad09b91fd00e36e83c44483df4afa990073"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3e19ea4ea0bf46179f8a3652ac1426e6dcbaf577ce4b4f65be581e237340420d"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:bd39c92e4c8f6cbf5f08257d6360123af72af9f4da75a690bef50da77362d25f"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b0313e8b923b3814d1c4a524c93dfecea5f39fa95601f6a9b1ac96cd66f89ea0"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e861ad82892408487be144906a368ddbe2dc6297074ade2d892341b35c59844a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:61014615c1274df8da5991a1e5da85a3ccb00c2d4701ac6f3383afd3ca47ab0a"}, + {file = "propcache-0.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:71ebe3fe42656a2328ab08933d420df5f3ab121772eef78f2dc63624157f0ed9"}, + {file = "propcache-0.3.1-cp311-cp311-win32.whl", hash = "sha256:58aa11f4ca8b60113d4b8e32d37e7e78bd8af4d1a5b5cb4979ed856a45e62005"}, + {file = "propcache-0.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:9532ea0b26a401264b1365146c440a6d78269ed41f83f23818d4b79497aeabe7"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f78eb8422acc93d7b69964012ad7048764bb45a54ba7a39bb9e146c72ea29723"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:89498dd49c2f9a026ee057965cdf8192e5ae070ce7d7a7bd4b66a8e257d0c976"}, + {file = "propcache-0.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09400e98545c998d57d10035ff623266927cb784d13dd2b31fd33b8a5316b85b"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8efd8c5adc5a2c9d3b952815ff8f7710cefdcaf5f2c36d26aff51aeca2f12f"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2fe5c910f6007e716a06d269608d307b4f36e7babee5f36533722660e8c4a70"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a0ab8cf8cdd2194f8ff979a43ab43049b1df0b37aa64ab7eca04ac14429baeb7"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:563f9d8c03ad645597b8d010ef4e9eab359faeb11a0a2ac9f7b4bc8c28ebef25"}, + {file = "propcache-0.3.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb6e0faf8cb6b4beea5d6ed7b5a578254c6d7df54c36ccd3d8b3eb00d6770277"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1c5c7ab7f2bb3f573d1cb921993006ba2d39e8621019dffb1c5bc94cdbae81e8"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:050b571b2e96ec942898f8eb46ea4bfbb19bd5502424747e83badc2d4a99a44e"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e1c4d24b804b3a87e9350f79e2371a705a188d292fd310e663483af6ee6718ee"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e4fe2a6d5ce975c117a6bb1e8ccda772d1e7029c1cca1acd209f91d30fa72815"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:feccd282de1f6322f56f6845bf1207a537227812f0a9bf5571df52bb418d79d5"}, + {file = "propcache-0.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ec314cde7314d2dd0510c6787326bbffcbdc317ecee6b7401ce218b3099075a7"}, + {file = "propcache-0.3.1-cp312-cp312-win32.whl", hash = "sha256:7d2d5a0028d920738372630870e7d9644ce437142197f8c827194fca404bf03b"}, + {file = "propcache-0.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:88c423efef9d7a59dae0614eaed718449c09a5ac79a5f224a8b9664d603f04a3"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1528ec4374617a7a753f90f20e2f551121bb558fcb35926f99e3c42367164b8"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc1915ec523b3b494933b5424980831b636fe483d7d543f7afb7b3bf00f0c10f"}, + {file = "propcache-0.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a110205022d077da24e60b3df8bcee73971be9575dec5573dd17ae5d81751111"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d249609e547c04d190e820d0d4c8ca03ed4582bcf8e4e160a6969ddfb57b62e5"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ced33d827625d0a589e831126ccb4f5c29dfdf6766cac441d23995a65825dcb"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4114c4ada8f3181af20808bedb250da6bae56660e4b8dfd9cd95d4549c0962f7"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:975af16f406ce48f1333ec5e912fe11064605d5c5b3f6746969077cc3adeb120"}, + {file = "propcache-0.3.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a34aa3a1abc50740be6ac0ab9d594e274f59960d3ad253cd318af76b996dd654"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9cec3239c85ed15bfaded997773fdad9fb5662b0a7cbc854a43f291eb183179e"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:05543250deac8e61084234d5fc54f8ebd254e8f2b39a16b1dce48904f45b744b"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:5cb5918253912e088edbf023788de539219718d3b10aef334476b62d2b53de53"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f3bbecd2f34d0e6d3c543fdb3b15d6b60dd69970c2b4c822379e5ec8f6f621d5"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aca63103895c7d960a5b9b044a83f544b233c95e0dcff114389d64d762017af7"}, + {file = "propcache-0.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a0a9898fdb99bf11786265468571e628ba60af80dc3f6eb89a3545540c6b0ef"}, + {file = "propcache-0.3.1-cp313-cp313-win32.whl", hash = "sha256:3a02a28095b5e63128bcae98eb59025924f121f048a62393db682f049bf4ac24"}, + {file = "propcache-0.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:813fbb8b6aea2fc9659815e585e548fe706d6f663fa73dff59a1677d4595a037"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a444192f20f5ce8a5e52761a031b90f5ea6288b1eef42ad4c7e64fef33540b8f"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0fbe94666e62ebe36cd652f5fc012abfbc2342de99b523f8267a678e4dfdee3c"}, + {file = "propcache-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f011f104db880f4e2166bcdcf7f58250f7a465bc6b068dc84c824a3d4a5c94dc"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e584b6d388aeb0001d6d5c2bd86b26304adde6d9bb9bfa9c4889805021b96de"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a17583515a04358b034e241f952f1715243482fc2c2945fd99a1b03a0bd77d6"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5aed8d8308215089c0734a2af4f2e95eeb360660184ad3912686c181e500b2e7"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d8e309ff9a0503ef70dc9a0ebd3e69cf7b3894c9ae2ae81fc10943c37762458"}, + {file = "propcache-0.3.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b655032b202028a582d27aeedc2e813299f82cb232f969f87a4fde491a233f11"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f64d91b751df77931336b5ff7bafbe8845c5770b06630e27acd5dbb71e1931c"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:19a06db789a4bd896ee91ebc50d059e23b3639c25d58eb35be3ca1cbe967c3bf"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:bef100c88d8692864651b5f98e871fb090bd65c8a41a1cb0ff2322db39c96c27"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:87380fb1f3089d2a0b8b00f006ed12bd41bd858fabfa7330c954c70f50ed8757"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e474fc718e73ba5ec5180358aa07f6aded0ff5f2abe700e3115c37d75c947e18"}, + {file = "propcache-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:17d1c688a443355234f3c031349da69444be052613483f3e4158eef751abcd8a"}, + {file = "propcache-0.3.1-cp313-cp313t-win32.whl", hash = "sha256:359e81a949a7619802eb601d66d37072b79b79c2505e6d3fd8b945538411400d"}, + {file = "propcache-0.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e7fb9a84c9abbf2b2683fa3e7b0d7da4d8ecf139a1c635732a8bda29c5214b0e"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ed5f6d2edbf349bd8d630e81f474d33d6ae5d07760c44d33cd808e2f5c8f4ae6"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:668ddddc9f3075af019f784456267eb504cb77c2c4bd46cc8402d723b4d200bf"}, + {file = "propcache-0.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0c86e7ceea56376216eba345aa1fc6a8a6b27ac236181f840d1d7e6a1ea9ba5c"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83be47aa4e35b87c106fc0c84c0fc069d3f9b9b06d3c494cd404ec6747544894"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c6ac6aa9fc7bc662f594ef380707494cb42c22786a558d95fcdedb9aa5d035"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64a956dff37080b352c1c40b2966b09defb014347043e740d420ca1eb7c9b908"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82de5da8c8893056603ac2d6a89eb8b4df49abf1a7c19d536984c8dd63f481d5"}, + {file = "propcache-0.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3c3a203c375b08fd06a20da3cf7aac293b834b6f4f4db71190e8422750cca5"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b303b194c2e6f171cfddf8b8ba30baefccf03d36a4d9cab7fd0bb68ba476a3d7"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:916cd229b0150129d645ec51614d38129ee74c03293a9f3f17537be0029a9641"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a461959ead5b38e2581998700b26346b78cd98540b5524796c175722f18b0294"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:069e7212890b0bcf9b2be0a03afb0c2d5161d91e1bf51569a64f629acc7defbf"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ef2e4e91fb3945769e14ce82ed53007195e616a63aa43b40fb7ebaaf907c8d4c"}, + {file = "propcache-0.3.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:8638f99dca15b9dff328fb6273e09f03d1c50d9b6512f3b65a4154588a7595fe"}, + {file = "propcache-0.3.1-cp39-cp39-win32.whl", hash = "sha256:6f173bbfe976105aaa890b712d1759de339d8a7cef2fc0a1714cc1a1e1c47f64"}, + {file = "propcache-0.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:603f1fe4144420374f1a69b907494c3acbc867a581c2d49d4175b0de7cc64566"}, + {file = "propcache-0.3.1-py3-none-any.whl", hash = "sha256:9a8ecf38de50a7f518c21568c80f985e776397b902f1ce0b01f799aba1608b40"}, + {file = "propcache-0.3.1.tar.gz", hash = "sha256:40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf"}, ] [[package]] name = "protobuf" -version = "6.33.0" +version = "5.29.4" description = "" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "protobuf-6.33.0-cp310-abi3-win32.whl", hash = "sha256:d6101ded078042a8f17959eccd9236fb7a9ca20d3b0098bbcb91533a5680d035"}, - {file = "protobuf-6.33.0-cp310-abi3-win_amd64.whl", hash = "sha256:9a031d10f703f03768f2743a1c403af050b6ae1f3480e9c140f39c45f81b13ee"}, - {file = "protobuf-6.33.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:905b07a65f1a4b72412314082c7dbfae91a9e8b68a0cc1577515f8df58ecf455"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:e0697ece353e6239b90ee43a9231318302ad8353c70e6e45499fa52396debf90"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:e0a1715e4f27355afd9570f3ea369735afc853a6c3951a6afe1f80d8569ad298"}, - {file = "protobuf-6.33.0-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:35be49fd3f4fefa4e6e2aacc35e8b837d6703c37a2168a55ac21e9b1bc7559ef"}, - {file = "protobuf-6.33.0-cp39-cp39-win32.whl", hash = "sha256:cd33a8e38ea3e39df66e1bbc462b076d6e5ba3a4ebbde58219d777223a7873d3"}, - {file = "protobuf-6.33.0-cp39-cp39-win_amd64.whl", hash = "sha256:c963e86c3655af3a917962c9619e1a6b9670540351d7af9439d06064e3317cc9"}, - {file = "protobuf-6.33.0-py3-none-any.whl", hash = "sha256:25c9e1963c6734448ea2d308cfa610e692b801304ba0908d7bfa564ac5132995"}, - {file = "protobuf-6.33.0.tar.gz", hash = "sha256:140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954"}, + {file = "protobuf-5.29.4-cp310-abi3-win32.whl", hash = "sha256:13eb236f8eb9ec34e63fc8b1d6efd2777d062fa6aaa68268fb67cf77f6839ad7"}, + {file = "protobuf-5.29.4-cp310-abi3-win_amd64.whl", hash = "sha256:bcefcdf3976233f8a502d265eb65ea740c989bacc6c30a58290ed0e519eb4b8d"}, + {file = "protobuf-5.29.4-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:307ecba1d852ec237e9ba668e087326a67564ef83e45a0189a772ede9e854dd0"}, + {file = "protobuf-5.29.4-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:aec4962f9ea93c431d5714ed1be1c93f13e1a8618e70035ba2b0564d9e633f2e"}, + {file = "protobuf-5.29.4-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:d7d3f7d1d5a66ed4942d4fefb12ac4b14a29028b209d4bfb25c68ae172059922"}, + {file = "protobuf-5.29.4-cp38-cp38-win32.whl", hash = "sha256:1832f0515b62d12d8e6ffc078d7e9eb06969aa6dc13c13e1036e39d73bebc2de"}, + {file = "protobuf-5.29.4-cp38-cp38-win_amd64.whl", hash = "sha256:476cb7b14914c780605a8cf62e38c2a85f8caff2e28a6a0bad827ec7d6c85d68"}, + {file = "protobuf-5.29.4-cp39-cp39-win32.whl", hash = "sha256:fd32223020cb25a2cc100366f1dedc904e2d71d9322403224cdde5fdced0dabe"}, + {file = "protobuf-5.29.4-cp39-cp39-win_amd64.whl", hash = "sha256:678974e1e3a9b975b8bc2447fca458db5f93a2fb6b0c8db46b6675b5b5346812"}, + {file = "protobuf-5.29.4-py3-none-any.whl", hash = "sha256:3fde11b505e1597f71b875ef2fc52062b6a9740e5f7c8997ce878b6009145862"}, + {file = "protobuf-5.29.4.tar.gz", hash = "sha256:4f1dfcd7997b31ef8f53ec82781ff434a28bf71d9102ddde14d076adcfc78c99"}, ] [[package]] @@ -1931,50 +1618,23 @@ files = [ {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] -[[package]] -name = "pyasn1" -version = "0.6.1" -description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, - {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, -] - -[[package]] -name = "pyasn1-modules" -version = "0.4.2" -description = "A collection of ASN.1-based protocols modules" -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a"}, - {file = "pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6"}, -] - -[package.dependencies] -pyasn1 = ">=0.6.1,<0.7.0" - [[package]] name = "pydantic" -version = "2.12.4" +version = "2.11.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic-2.12.4-py3-none-any.whl", hash = "sha256:92d3d202a745d46f9be6df459ac5a064fdaa3c1c4cd8adcfa332ccf3c05f871e"}, - {file = "pydantic-2.12.4.tar.gz", hash = "sha256:0f8cb9555000a4b5b617f66bfd2566264c4984b27589d3b845685983e8ea85ac"}, + {file = "pydantic-2.11.4-py3-none-any.whl", hash = "sha256:d9615eaa9ac5a063471da949c8fc16376a84afb5024688b3ff885693506764eb"}, + {file = "pydantic-2.11.4.tar.gz", hash = "sha256:32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.41.5" -typing-extensions = ">=4.14.1" -typing-inspection = ">=0.4.2" +pydantic-core = "2.33.2" +typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -1982,174 +1642,138 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.41.5" +version = "2.33.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146"}, - {file = "pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a"}, - {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556"}, - {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49"}, - {file = "pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba"}, - {file = "pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9"}, - {file = "pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6"}, - {file = "pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594"}, - {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe"}, - {file = "pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f"}, - {file = "pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7"}, - {file = "pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c"}, - {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294"}, - {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815"}, - {file = "pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3"}, - {file = "pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9"}, - {file = "pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586"}, - {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e"}, - {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11"}, - {file = "pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd"}, - {file = "pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a"}, - {file = "pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375"}, - {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07"}, - {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf"}, - {file = "pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c"}, - {file = "pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008"}, - {file = "pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf"}, - {file = "pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3"}, - {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5"}, - {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3"}, - {file = "pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460"}, - {file = "pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2"}, - {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56"}, - {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963"}, - {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f"}, - {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51"}, - {file = "pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2b3d326aaef0c0399d9afffeb6367d5e26ddc24d351dbc9c636840ac355dc5d8"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e5b2671f05ba48b94cb90ce55d8bdcaaedb8ba00cc5359f6810fc918713983d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0069c9acc3f3981b9ff4cdfaf088e98d83440a4c7ea1bc07460af3d4dc22e72d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d53b22f2032c42eaaf025f7c40c2e3b94568ae077a606f006d206a463bc69572"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0405262705a123b7ce9f0b92f123334d67b70fd1f20a9372b907ce1080c7ba02"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b25d91e288e2c4e0662b8038a28c6a07eaac3e196cfc4ff69de4ea3db992a1b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bdfe4b3789761f3bcb4b1ddf33355a71079858958e3a552f16d5af19768fef2"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:efec8db3266b76ef9607c2c4c419bdb06bf335ae433b80816089ea7585816f6a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:031c57d67ca86902726e0fae2214ce6770bbe2f710dc33063187a68744a5ecac"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:f8de619080e944347f5f20de29a975c2d815d9ddd8be9b9b7268e2e3ef68605a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73662edf539e72a9440129f231ed3757faab89630d291b784ca99237fb94db2b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win32.whl", hash = "sha256:0a39979dcbb70998b0e505fb1556a1d550a0781463ce84ebf915ba293ccb7e22"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0379a2b24882fef529ec3b4987cb5d003b9cda32256024e6fe1586ac45fc640"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a2b911a5b90e0374d03813674bf0a5fbbb7741570dcd4b4e85a2e48d17def29d"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fa6dfc3e4d1f734a34710f391ae822e0a8eb8559a85c6979e14e65ee6ba2954"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c54c939ee22dc8e2d545da79fc5381f1c020d6d3141d3bd747eab59164dc89fb"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53a57d2ed685940a504248187d5685e49eb5eef0f696853647bf37c418c538f7"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09fb9dd6571aacd023fe6aaca316bd01cf60ab27240d7eb39ebd66a3a15293b4"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0e6116757f7959a712db11f3e9c0a99ade00a5bbedae83cb801985aa154f071b"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d55ab81c57b8ff8548c3e4947f119551253f4e3787a7bbc0b6b3ca47498a9d3"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c20c462aa4434b33a2661701b861604913f912254e441ab8d78d30485736115a"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44857c3227d3fb5e753d5fe4a3420d6376fa594b07b621e220cd93703fe21782"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:eb9b459ca4df0e5c87deb59d37377461a538852765293f9e6ee834f0435a93b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9fcd347d2cc5c23b06de6d3b7b8275be558a0c90549495c699e379a80bf8379e"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win32.whl", hash = "sha256:83aa99b1285bc8f038941ddf598501a86f1536789740991d7d8756e34f1e74d9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:f481959862f57f29601ccced557cc2e817bce7533ab8e01a797a48b49c9692b3"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c4aa4e82353f65e548c476b37e64189783aa5384903bfea4f41580f255fddfa"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d946c8bf0d5c24bf4fe333af284c59a19358aa3ec18cb3dc4370080da1e8ad29"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87b31b6846e361ef83fedb187bb5b4372d0da3f7e28d85415efa92d6125d6e6d"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa9d91b338f2df0508606f7009fde642391425189bba6d8c653afd80fd6bb64e"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2058a32994f1fde4ca0480ab9d1e75a0e8c87c22b53a3ae66554f9af78f2fe8c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:0e03262ab796d986f978f79c943fc5f620381be7287148b8010b4097f79a39ec"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1a8695a8d00c73e50bff9dfda4d540b7dee29ff9b8053e38380426a85ef10052"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa754d1850735a0b0e03bcffd9d4b4343eb417e47196e4485d9cca326073a42c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a11c8d26a50bfab49002947d3d237abe4d9e4b5bdc8846a63537b6488e197808"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:87acbfcf8e90ca885206e98359d7dca4bcbb35abdc0ff66672a293e1d7a19101"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f92c15cd1e97d4b12acd1cc9004fa092578acfa57b67ad5e43a197175d01a64"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f26877a748dc4251cfcfda9dfb5f13fcb034f5308388066bcfe9031b63ae7d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac89aea9af8cd672fa7b510e7b8c33b0bba9a43186680550ccf23020f32d535"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:970919794d126ba8645f3837ab6046fb4e72bbc057b3709144066204c19a455d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3eb3fe62804e8f859c49ed20a8451342de53ed764150cb14ca71357c765dc2a6"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:3abcd9392a36025e3bd55f9bd38d908bd17962cc49bc6da8e7e96285336e2bca"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3a1c81334778f9e3af2f8aeb7a960736e5cab1dfebfb26aabca09afd2906c039"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2807668ba86cb38c6817ad9bc66215ab8584d1d304030ce4f0887336f28a5e27"}, + {file = "pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc"}, ] [package.dependencies] -typing-extensions = ">=4.14.1" - -[[package]] -name = "pygments" -version = "2.19.2" -description = "Pygments is a syntax highlighting package written in Python." -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, - {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, -] - -[package.extras] -windows-terminal = ["colorama (>=0.4.6)"] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pytest" -version = "8.4.2" +version = "8.3.5" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, - {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, + {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, + {file = "pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845"}, ] [package.dependencies] -colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} -iniconfig = ">=1" -packaging = ">=20" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" pluggy = ">=1.5,<2" -pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -2172,14 +1796,14 @@ testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] name = "pytest-xdist" -version = "3.8.0" +version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88"}, - {file = "pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1"}, + {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, + {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, ] [package.dependencies] @@ -2208,120 +1832,92 @@ six = ">=1.5" [[package]] name = "python-dotenv" -version = "1.2.1" +version = "1.1.0" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "python_dotenv-1.2.1-py3-none-any.whl", hash = "sha256:b81ee9561e9ca4004139c6cbba3a238c32b03e4894671e181b671e8cb8425d61"}, - {file = "python_dotenv-1.2.1.tar.gz", hash = "sha256:42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6"}, + {file = "python_dotenv-1.1.0-py3-none-any.whl", hash = "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d"}, + {file = "python_dotenv-1.1.0.tar.gz", hash = "sha256:41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5"}, ] [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "python-jsonpath" -version = "2.0.1" -description = "JSONPath, JSON Pointer and JSON Patch for Python." -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "python_jsonpath-2.0.1-py3-none-any.whl", hash = "sha256:ebd518b7c883acc5b976518d76b6c96288405edec7d9ef838641869c1e1a5eb7"}, - {file = "python_jsonpath-2.0.1.tar.gz", hash = "sha256:32a84ebb2dc0ec1b42a6e165b0f9174aef8310bad29154ad9aee31ac37cca18f"}, -] - -[package.extras] -strict = ["iregexp-check (>=0.1.4)", "regex"] - [[package]] name = "pyyaml" -version = "6.0.3" +version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b"}, - {file = "pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198"}, - {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b"}, - {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0"}, - {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69"}, - {file = "pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e"}, - {file = "pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c"}, - {file = "pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e"}, - {file = "pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00"}, - {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d"}, - {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a"}, - {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4"}, - {file = "pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b"}, - {file = "pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf"}, - {file = "pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196"}, - {file = "pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c"}, - {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc"}, - {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e"}, - {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea"}, - {file = "pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5"}, - {file = "pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b"}, - {file = "pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd"}, - {file = "pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8"}, - {file = "pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5"}, - {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6"}, - {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6"}, - {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be"}, - {file = "pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26"}, - {file = "pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c"}, - {file = "pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb"}, - {file = "pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac"}, - {file = "pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788"}, - {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5"}, - {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764"}, - {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35"}, - {file = "pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac"}, - {file = "pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3"}, - {file = "pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3"}, - {file = "pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702"}, - {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c"}, - {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065"}, - {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65"}, - {file = "pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9"}, - {file = "pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b"}, - {file = "pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da"}, - {file = "pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5"}, - {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a"}, - {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926"}, - {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7"}, - {file = "pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0"}, - {file = "pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007"}, - {file = "pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] [[package]] name = "questionary" -version = "2.1.1" +version = "2.1.0" description = "Python library to build pretty command line user prompts ⭐️" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "questionary-2.1.1-py3-none-any.whl", hash = "sha256:a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59"}, - {file = "questionary-2.1.1.tar.gz", hash = "sha256:3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d"}, + {file = "questionary-2.1.0-py3-none-any.whl", hash = "sha256:44174d237b68bc828e4878c763a9ad6790ee61990e0ae72927694ead57bab8ec"}, + {file = "questionary-2.1.0.tar.gz", hash = "sha256:6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587"}, ] [package.dependencies] @@ -2329,14 +1925,14 @@ prompt_toolkit = ">=2.0,<4.0" [[package]] name = "referencing" -version = "0.37.0" +version = "0.36.2" description = "JSON Referencing + Python" optional = false -python-versions = ">=3.10" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231"}, - {file = "referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8"}, + {file = "referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0"}, + {file = "referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa"}, ] [package.dependencies] @@ -2346,144 +1942,123 @@ typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} [[package]] name = "regex" -version = "2025.11.3" +version = "2024.11.6" description = "Alternative regular expression module, to replace re." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "regex-2025.11.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2b441a4ae2c8049106e8b39973bfbddfb25a179dda2bdb99b0eeb60c40a6a3af"}, - {file = "regex-2025.11.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2fa2eed3f76677777345d2f81ee89f5de2f5745910e805f7af7386a920fa7313"}, - {file = "regex-2025.11.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d8b4a27eebd684319bdf473d39f1d79eed36bf2cd34bd4465cdb4618d82b3d56"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cf77eac15bd264986c4a2c63353212c095b40f3affb2bc6b4ef80c4776c1a28"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b7f9ee819f94c6abfa56ec7b1dbab586f41ebbdc0a57e6524bd5e7f487a878c7"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:838441333bc90b829406d4a03cb4b8bf7656231b84358628b0406d803931ef32"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfe6d3f0c9e3b7e8c0c694b24d25e677776f5ca26dce46fd6b0489f9c8339391"}, - {file = "regex-2025.11.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2ab815eb8a96379a27c3b6157fcb127c8f59c36f043c1678110cea492868f1d5"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:728a9d2d173a65b62bdc380b7932dd8e74ed4295279a8fe1021204ce210803e7"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:509dc827f89c15c66a0c216331260d777dd6c81e9a4e4f830e662b0bb296c313"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:849202cd789e5f3cf5dcc7822c34b502181b4824a65ff20ce82da5524e45e8e9"}, - {file = "regex-2025.11.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b6f78f98741dcc89607c16b1e9426ee46ce4bf31ac5e6b0d40e81c89f3481ea5"}, - {file = "regex-2025.11.3-cp310-cp310-win32.whl", hash = "sha256:149eb0bba95231fb4f6d37c8f760ec9fa6fabf65bab555e128dde5f2475193ec"}, - {file = "regex-2025.11.3-cp310-cp310-win_amd64.whl", hash = "sha256:ee3a83ce492074c35a74cc76cf8235d49e77b757193a5365ff86e3f2f93db9fd"}, - {file = "regex-2025.11.3-cp310-cp310-win_arm64.whl", hash = "sha256:38af559ad934a7b35147716655d4a2f79fcef2d695ddfe06a06ba40ae631fa7e"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eadade04221641516fa25139273505a1c19f9bf97589a05bc4cfcd8b4a618031"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:feff9e54ec0dd3833d659257f5c3f5322a12eee58ffa360984b716f8b92983f4"}, - {file = "regex-2025.11.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3b30bc921d50365775c09a7ed446359e5c0179e9e2512beec4a60cbcef6ddd50"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f99be08cfead2020c7ca6e396c13543baea32343b7a9a5780c462e323bd8872f"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6dd329a1b61c0ee95ba95385fb0c07ea0d3fe1a21e1349fa2bec272636217118"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4c5238d32f3c5269d9e87be0cf096437b7622b6920f5eac4fd202468aaeb34d2"}, - {file = "regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10483eefbfb0adb18ee9474498c9a32fcf4e594fbca0543bb94c48bac6183e2e"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:78c2d02bb6e1da0720eedc0bad578049cad3f71050ef8cd065ecc87691bed2b0"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e6b49cd2aad93a1790ce9cffb18964f6d3a4b0b3dbdbd5de094b65296fce6e58"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:885b26aa3ee56433b630502dc3d36ba78d186a00cc535d3806e6bfd9ed3c70ab"}, - {file = "regex-2025.11.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ddd76a9f58e6a00f8772e72cff8ebcff78e022be95edf018766707c730593e1e"}, - {file = "regex-2025.11.3-cp311-cp311-win32.whl", hash = "sha256:3e816cc9aac1cd3cc9a4ec4d860f06d40f994b5c7b4d03b93345f44e08cc68bf"}, - {file = "regex-2025.11.3-cp311-cp311-win_amd64.whl", hash = "sha256:087511f5c8b7dfbe3a03f5d5ad0c2a33861b1fc387f21f6f60825a44865a385a"}, - {file = "regex-2025.11.3-cp311-cp311-win_arm64.whl", hash = "sha256:1ff0d190c7f68ae7769cd0313fe45820ba07ffebfddfaa89cc1eb70827ba0ddc"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bc8ab71e2e31b16e40868a40a69007bc305e1109bd4658eb6cad007e0bf67c41"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:22b29dda7e1f7062a52359fca6e58e548e28c6686f205e780b02ad8ef710de36"}, - {file = "regex-2025.11.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3a91e4a29938bc1a082cc28fdea44be420bf2bebe2665343029723892eb073e1"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08b884f4226602ad40c5d55f52bf91a9df30f513864e0054bad40c0e9cf1afb7"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3e0b11b2b2433d1c39c7c7a30e3f3d0aeeea44c2a8d0bae28f6b95f639927a69"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87eb52a81ef58c7ba4d45c3ca74e12aa4b4e77816f72ca25258a85b3ea96cb48"}, - {file = "regex-2025.11.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a12ab1f5c29b4e93db518f5e3872116b7e9b1646c9f9f426f777b50d44a09e8c"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7521684c8c7c4f6e88e35ec89680ee1aa8358d3f09d27dfbdf62c446f5d4c695"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7fe6e5440584e94cc4b3f5f4d98a25e29ca12dccf8873679a635638349831b98"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8e026094aa12b43f4fd74576714e987803a315c76edb6b098b9809db5de58f74"}, - {file = "regex-2025.11.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:435bbad13e57eb5606a68443af62bed3556de2f46deb9f7d4237bc2f1c9fb3a0"}, - {file = "regex-2025.11.3-cp312-cp312-win32.whl", hash = "sha256:3839967cf4dc4b985e1570fd8d91078f0c519f30491c60f9ac42a8db039be204"}, - {file = "regex-2025.11.3-cp312-cp312-win_amd64.whl", hash = "sha256:e721d1b46e25c481dc5ded6f4b3f66c897c58d2e8cfdf77bbced84339108b0b9"}, - {file = "regex-2025.11.3-cp312-cp312-win_arm64.whl", hash = "sha256:64350685ff08b1d3a6fff33f45a9ca183dc1d58bbfe4981604e70ec9801bbc26"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c1e448051717a334891f2b9a620fe36776ebf3dd8ec46a0b877c8ae69575feb4"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9b5aca4d5dfd7fbfbfbdaf44850fcc7709a01146a797536a8f84952e940cca76"}, - {file = "regex-2025.11.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:04d2765516395cf7dda331a244a3282c0f5ae96075f728629287dfa6f76ba70a"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d9903ca42bfeec4cebedba8022a7c97ad2aab22e09573ce9976ba01b65e4361"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:639431bdc89d6429f6721625e8129413980ccd62e9d3f496be618a41d205f160"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f117efad42068f9715677c8523ed2be1518116d1c49b1dd17987716695181efe"}, - {file = "regex-2025.11.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4aecb6f461316adf9f1f0f6a4a1a3d79e045f9b71ec76055a791affa3b285850"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3b3a5f320136873cc5561098dfab677eea139521cb9a9e8db98b7e64aef44cbc"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:75fa6f0056e7efb1f42a1c34e58be24072cb9e61a601340cc1196ae92326a4f9"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:dbe6095001465294f13f1adcd3311e50dd84e5a71525f20a10bd16689c61ce0b"}, - {file = "regex-2025.11.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:454d9b4ae7881afbc25015b8627c16d88a597479b9dea82b8c6e7e2e07240dc7"}, - {file = "regex-2025.11.3-cp313-cp313-win32.whl", hash = "sha256:28ba4d69171fc6e9896337d4fc63a43660002b7da53fc15ac992abcf3410917c"}, - {file = "regex-2025.11.3-cp313-cp313-win_amd64.whl", hash = "sha256:bac4200befe50c670c405dc33af26dad5a3b6b255dd6c000d92fe4629f9ed6a5"}, - {file = "regex-2025.11.3-cp313-cp313-win_arm64.whl", hash = "sha256:2292cd5a90dab247f9abe892ac584cb24f0f54680c73fcb4a7493c66c2bf2467"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:1eb1ebf6822b756c723e09f5186473d93236c06c579d2cc0671a722d2ab14281"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1e00ec2970aab10dc5db34af535f21fcf32b4a31d99e34963419636e2f85ae39"}, - {file = "regex-2025.11.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a4cb042b615245d5ff9b3794f56be4138b5adc35a4166014d31d1814744148c7"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44f264d4bf02f3176467d90b294d59bf1db9fe53c141ff772f27a8b456b2a9ed"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7be0277469bf3bd7a34a9c57c1b6a724532a0d235cd0dc4e7f4316f982c28b19"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0d31e08426ff4b5b650f68839f5af51a92a5b51abd8554a60c2fbc7c71f25d0b"}, - {file = "regex-2025.11.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e43586ce5bd28f9f285a6e729466841368c4a0353f6fd08d4ce4630843d3648a"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0f9397d561a4c16829d4e6ff75202c1c08b68a3bdbfe29dbfcdb31c9830907c6"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:dd16e78eb18ffdb25ee33a0682d17912e8cc8a770e885aeee95020046128f1ce"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:ffcca5b9efe948ba0661e9df0fa50d2bc4b097c70b9810212d6b62f05d83b2dd"}, - {file = "regex-2025.11.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c56b4d162ca2b43318ac671c65bd4d563e841a694ac70e1a976ac38fcf4ca1d2"}, - {file = "regex-2025.11.3-cp313-cp313t-win32.whl", hash = "sha256:9ddc42e68114e161e51e272f667d640f97e84a2b9ef14b7477c53aac20c2d59a"}, - {file = "regex-2025.11.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7a7c7fdf755032ffdd72c77e3d8096bdcb0eb92e89e17571a196f03d88b11b3c"}, - {file = "regex-2025.11.3-cp313-cp313t-win_arm64.whl", hash = "sha256:df9eb838c44f570283712e7cff14c16329a9f0fb19ca492d21d4b7528ee6821e"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9697a52e57576c83139d7c6f213d64485d3df5bf84807c35fa409e6c970801c6"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e18bc3f73bd41243c9b38a6d9f2366cd0e0137a9aebe2d8ff76c5b67d4c0a3f4"}, - {file = "regex-2025.11.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:61a08bcb0ec14ff4e0ed2044aad948d0659604f824cbd50b55e30b0ec6f09c73"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9c30003b9347c24bcc210958c5d167b9e4f9be786cb380a7d32f14f9b84674f"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4e1e592789704459900728d88d41a46fe3969b82ab62945560a31732ffc19a6d"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6538241f45eb5a25aa575dbba1069ad786f68a4f2773a29a2bd3dd1f9de787be"}, - {file = "regex-2025.11.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bce22519c989bb72a7e6b36a199384c53db7722fe669ba891da75907fe3587db"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:66d559b21d3640203ab9075797a55165d79017520685fb407b9234d72ab63c62"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:669dcfb2e38f9e8c69507bace46f4889e3abbfd9b0c29719202883c0a603598f"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:32f74f35ff0f25a5021373ac61442edcb150731fbaa28286bbc8bb1582c89d02"}, - {file = "regex-2025.11.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e6c7a21dffba883234baefe91bc3388e629779582038f75d2a5be918e250f0ed"}, - {file = "regex-2025.11.3-cp314-cp314-win32.whl", hash = "sha256:795ea137b1d809eb6836b43748b12634291c0ed55ad50a7d72d21edf1cd565c4"}, - {file = "regex-2025.11.3-cp314-cp314-win_amd64.whl", hash = "sha256:9f95fbaa0ee1610ec0fc6b26668e9917a582ba80c52cc6d9ada15e30aa9ab9ad"}, - {file = "regex-2025.11.3-cp314-cp314-win_arm64.whl", hash = "sha256:dfec44d532be4c07088c3de2876130ff0fbeeacaa89a137decbbb5f665855a0f"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ba0d8a5d7f04f73ee7d01d974d47c5834f8a1b0224390e4fe7c12a3a92a78ecc"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:442d86cf1cfe4faabf97db7d901ef58347efd004934da045c745e7b5bd57ac49"}, - {file = "regex-2025.11.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fd0a5e563c756de210bb964789b5abe4f114dacae9104a47e1a649b910361536"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf3490bcbb985a1ae97b2ce9ad1c0f06a852d5b19dde9b07bdf25bf224248c95"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3809988f0a8b8c9dcc0f92478d6501fac7200b9ec56aecf0ec21f4a2ec4b6009"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f4ff94e58e84aedb9c9fce66d4ef9f27a190285b451420f297c9a09f2b9abee9"}, - {file = "regex-2025.11.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eb542fd347ce61e1321b0a6b945d5701528dca0cd9759c2e3bb8bd57e47964d"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d6c2d5919075a1f2e413c00b056ea0c2f065b3f5fe83c3d07d325ab92dce51d6"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3f8bf11a4827cc7ce5a53d4ef6cddd5ad25595d3c1435ef08f76825851343154"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:22c12d837298651e5550ac1d964e4ff57c3f56965fc1812c90c9fb2028eaf267"}, - {file = "regex-2025.11.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:62ba394a3dda9ad41c7c780f60f6e4a70988741415ae96f6d1bf6c239cf01379"}, - {file = "regex-2025.11.3-cp314-cp314t-win32.whl", hash = "sha256:4bf146dca15cdd53224a1bf46d628bd7590e4a07fbb69e720d561aea43a32b38"}, - {file = "regex-2025.11.3-cp314-cp314t-win_amd64.whl", hash = "sha256:adad1a1bcf1c9e76346e091d22d23ac54ef28e1365117d99521631078dfec9de"}, - {file = "regex-2025.11.3-cp314-cp314t-win_arm64.whl", hash = "sha256:c54f768482cef41e219720013cd05933b6f971d9562544d691c68699bf2b6801"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:81519e25707fc076978c6143b81ea3dc853f176895af05bf7ec51effe818aeec"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3bf28b1873a8af8bbb58c26cc56ea6e534d80053b41fb511a35795b6de507e6a"}, - {file = "regex-2025.11.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:856a25c73b697f2ce2a24e7968285579e62577a048526161a2c0f53090bea9f9"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a3d571bd95fade53c86c0517f859477ff3a93c3fde10c9e669086f038e0f207"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:732aea6de26051af97b94bc98ed86448821f839d058e5d259c72bf6d73ad0fc0"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:51c1c1847128238f54930edb8805b660305dca164645a9fd29243f5610beea34"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22dd622a402aad4558277305350699b2be14bc59f64d64ae1d928ce7d072dced"}, - {file = "regex-2025.11.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f3b5a391c7597ffa96b41bd5cbd2ed0305f515fcbb367dfa72735679d5502364"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:cc4076a5b4f36d849fd709284b4a3b112326652f3b0466f04002a6c15a0c96c1"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a295ca2bba5c1c885826ce3125fa0b9f702a1be547d821c01d65f199e10c01e2"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b4774ff32f18e0504bfc4e59a3e71e18d83bc1e171a3c8ed75013958a03b2f14"}, - {file = "regex-2025.11.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22e7d1cdfa88ef33a2ae6aa0d707f9255eb286ffbd90045f1088246833223aee"}, - {file = "regex-2025.11.3-cp39-cp39-win32.whl", hash = "sha256:74d04244852ff73b32eeede4f76f51c5bcf44bc3c207bc3e6cf1c5c45b890708"}, - {file = "regex-2025.11.3-cp39-cp39-win_amd64.whl", hash = "sha256:7a50cd39f73faa34ec18d6720ee25ef10c4c1839514186fcda658a06c06057a2"}, - {file = "regex-2025.11.3-cp39-cp39-win_arm64.whl", hash = "sha256:43b4fb020e779ca81c1b5255015fe2b82816c76ec982354534ad9ec09ad7c9e3"}, - {file = "regex-2025.11.3.tar.gz", hash = "sha256:1fedc720f9bb2494ce31a58a1631f9c82df6a09b49c19517ea5cc280b4541e01"}, + {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"}, + {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"}, + {file = "regex-2024.11.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:164d8b7b3b4bcb2068b97428060b2a53be050085ef94eca7f240e7947f1b080e"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3660c82f209655a06b587d55e723f0b813d3a7db2e32e5e7dc64ac2a9e86fde"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d22326fcdef5e08c154280b71163ced384b428343ae16a5ab2b3354aed12436e"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1ac758ef6aebfc8943560194e9fd0fa18bcb34d89fd8bd2af18183afd8da3a2"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:997d6a487ff00807ba810e0f8332c18b4eb8d29463cfb7c820dc4b6e7562d0cf"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02a02d2bb04fec86ad61f3ea7f49c015a0681bf76abb9857f945d26159d2968c"}, + {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f02f93b92358ee3f78660e43b4b0091229260c5d5c408d17d60bf26b6c900e86"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:06eb1be98df10e81ebaded73fcd51989dcf534e3c753466e4b60c4697a003b67"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:040df6fe1a5504eb0f04f048e6d09cd7c7110fef851d7c567a6b6e09942feb7d"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabbfc59f2c6edba2a6622c647b716e34e8e3867e0ab975412c5c2f79b82da2"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8447d2d39b5abe381419319f942de20b7ecd60ce86f16a23b0698f22e1b70008"}, + {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:da8f5fc57d1933de22a9e23eec290a0d8a5927a5370d24bda9a6abe50683fe62"}, + {file = "regex-2024.11.6-cp310-cp310-win32.whl", hash = "sha256:b489578720afb782f6ccf2840920f3a32e31ba28a4b162e13900c3e6bd3f930e"}, + {file = "regex-2024.11.6-cp310-cp310-win_amd64.whl", hash = "sha256:5071b2093e793357c9d8b2929dfc13ac5f0a6c650559503bb81189d0a3814519"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7"}, + {file = "regex-2024.11.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0"}, + {file = "regex-2024.11.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d"}, + {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45"}, + {file = "regex-2024.11.6-cp311-cp311-win32.whl", hash = "sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9"}, + {file = "regex-2024.11.6-cp311-cp311-win_amd64.whl", hash = "sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9"}, + {file = "regex-2024.11.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e"}, + {file = "regex-2024.11.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51"}, + {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad"}, + {file = "regex-2024.11.6-cp312-cp312-win32.whl", hash = "sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54"}, + {file = "regex-2024.11.6-cp312-cp312-win_amd64.whl", hash = "sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4"}, + {file = "regex-2024.11.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c"}, + {file = "regex-2024.11.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4"}, + {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d"}, + {file = "regex-2024.11.6-cp313-cp313-win32.whl", hash = "sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff"}, + {file = "regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3a51ccc315653ba012774efca4f23d1d2a8a8f278a6072e29c7147eee7da446b"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ad182d02e40de7459b73155deb8996bbd8e96852267879396fb274e8700190e3"}, + {file = "regex-2024.11.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ba9b72e5643641b7d41fa1f6d5abda2c9a263ae835b917348fc3c928182ad467"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40291b1b89ca6ad8d3f2b82782cc33807f1406cf68c8d440861da6304d8ffbbd"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cdf58d0e516ee426a48f7b2c03a332a4114420716d55769ff7108c37a09951bf"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a36fdf2af13c2b14738f6e973aba563623cb77d753bbbd8d414d18bfaa3105dd"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1cee317bfc014c2419a76bcc87f071405e3966da434e03e13beb45f8aced1a6"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50153825ee016b91549962f970d6a4442fa106832e14c918acd1c8e479916c4f"}, + {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea1bfda2f7162605f6e8178223576856b3d791109f15ea99a9f95c16a7636fb5"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:df951c5f4a1b1910f1a99ff42c473ff60f8225baa1cdd3539fe2819d9543e9df"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:072623554418a9911446278f16ecb398fb3b540147a7828c06e2011fa531e773"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f654882311409afb1d780b940234208a252322c24a93b442ca714d119e68086c"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:89d75e7293d2b3e674db7d4d9b1bee7f8f3d1609428e293771d1a962617150cc"}, + {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:f65557897fc977a44ab205ea871b690adaef6b9da6afda4790a2484b04293a5f"}, + {file = "regex-2024.11.6-cp38-cp38-win32.whl", hash = "sha256:6f44ec28b1f858c98d3036ad5d7d0bfc568bdd7a74f9c24e25f41ef1ebfd81a4"}, + {file = "regex-2024.11.6-cp38-cp38-win_amd64.whl", hash = "sha256:bb8f74f2f10dbf13a0be8de623ba4f9491faf58c24064f32b65679b021ed0001"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5704e174f8ccab2026bd2f1ab6c510345ae8eac818b613d7d73e785f1310f839"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:220902c3c5cc6af55d4fe19ead504de80eb91f786dc102fbd74894b1551f095e"}, + {file = "regex-2024.11.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e7e351589da0850c125f1600a4c4ba3c722efefe16b297de54300f08d734fbf"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5056b185ca113c88e18223183aa1a50e66507769c9640a6ff75859619d73957b"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e34b51b650b23ed3354b5a07aab37034d9f923db2a40519139af34f485f77d0"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5670bce7b200273eee1840ef307bfa07cda90b38ae56e9a6ebcc9f50da9c469b"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08986dce1339bc932923e7d1232ce9881499a0e02925f7402fb7c982515419ef"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93c0b12d3d3bc25af4ebbf38f9ee780a487e8bf6954c115b9f015822d3bb8e48"}, + {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:764e71f22ab3b305e7f4c21f1a97e1526a25ebdd22513e251cf376760213da13"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f056bf21105c2515c32372bbc057f43eb02aae2fda61052e2f7622c801f0b4e2"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:69ab78f848845569401469da20df3e081e6b5a11cb086de3eed1d48f5ed57c95"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:86fddba590aad9208e2fa8b43b4c098bb0ec74f15718bb6a704e3c63e2cef3e9"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:684d7a212682996d21ca12ef3c17353c021fe9de6049e19ac8481ec35574a70f"}, + {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a03e02f48cd1abbd9f3b7e3586d97c8f7a9721c436f51a5245b3b9483044480b"}, + {file = "regex-2024.11.6-cp39-cp39-win32.whl", hash = "sha256:41758407fc32d5c3c5de163888068cfee69cb4c2be844e7ac517a52770f9af57"}, + {file = "regex-2024.11.6-cp39-cp39-win_amd64.whl", hash = "sha256:b2837718570f95dd41675328e111345f9b7095d821bac435aac173ac80b19983"}, + {file = "regex-2024.11.6.tar.gz", hash = "sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519"}, ] [[package]] name = "requests" -version = "2.32.5" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, - {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] certifi = ">=2017.4.17" -charset_normalizer = ">=2,<4" +charset-normalizer = ">=2,<4" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<3" @@ -2491,173 +2066,140 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] -[[package]] -name = "restrictedpython" -version = "8.1" -description = "RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment." -optional = false -python-versions = "<3.15,>=3.9" -groups = ["main"] -markers = "python_version < \"3.14\"" -files = [ - {file = "restrictedpython-8.1-py3-none-any.whl", hash = "sha256:4769449c6cdb10f2071649ba386902befff0eff2a8fd6217989fa7b16aeae926"}, - {file = "restrictedpython-8.1.tar.gz", hash = "sha256:4a69304aceacf6bee74bdf153c728221d4e3109b39acbfe00b3494927080d898"}, -] - -[package.extras] -docs = ["Sphinx", "furo"] -test = ["pytest", "pytest-mock"] - [[package]] name = "rpds-py" -version = "0.28.0" +version = "0.25.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false -python-versions = ">=3.10" -groups = ["main"] -files = [ - {file = "rpds_py-0.28.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:7b6013db815417eeb56b2d9d7324e64fcd4fa289caeee6e7a78b2e11fc9b438a"}, - {file = "rpds_py-0.28.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a4c6b05c685c0c03f80dabaeb73e74218c49deea965ca63f76a752807397207"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4794c6c3fbe8f9ac87699b131a1f26e7b4abcf6d828da46a3a52648c7930eba"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2e8456b6ee5527112ff2354dd9087b030e3429e43a74f480d4a5ca79d269fd85"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:beb880a9ca0a117415f241f66d56025c02037f7c4efc6fe59b5b8454f1eaa50d"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6897bebb118c44b38c9cb62a178e09f1593c949391b9a1a6fe777ccab5934ee7"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1b553dd06e875249fd43efd727785efb57a53180e0fde321468222eabbeaafa"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:f0b2044fdddeea5b05df832e50d2a06fe61023acb44d76978e1b060206a8a476"}, - {file = "rpds_py-0.28.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05cf1e74900e8da73fa08cc76c74a03345e5a3e37691d07cfe2092d7d8e27b04"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:efd489fec7c311dae25e94fe7eeda4b3d06be71c68f2cf2e8ef990ffcd2cd7e8"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:ada7754a10faacd4f26067e62de52d6af93b6d9542f0df73c57b9771eb3ba9c4"}, - {file = "rpds_py-0.28.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c2a34fd26588949e1e7977cfcbb17a9a42c948c100cab890c6d8d823f0586457"}, - {file = "rpds_py-0.28.0-cp310-cp310-win32.whl", hash = "sha256:f9174471d6920cbc5e82a7822de8dfd4dcea86eb828b04fc8c6519a77b0ee51e"}, - {file = "rpds_py-0.28.0-cp310-cp310-win_amd64.whl", hash = "sha256:6e32dd207e2c4f8475257a3540ab8a93eff997abfa0a3fdb287cae0d6cd874b8"}, - {file = "rpds_py-0.28.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:03065002fd2e287725d95fbc69688e0c6daf6c6314ba38bdbaa3895418e09296"}, - {file = "rpds_py-0.28.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:28ea02215f262b6d078daec0b45344c89e161eab9526b0d898221d96fdda5f27"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25dbade8fbf30bcc551cb352376c0ad64b067e4fc56f90e22ba70c3ce205988c"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c03002f54cc855860bfdc3442928ffdca9081e73b5b382ed0b9e8efe6e5e205"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b9699fa7990368b22032baf2b2dce1f634388e4ffc03dfefaaac79f4695edc95"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b9b06fe1a75e05e0713f06ea0c89ecb6452210fd60e2f1b6ddc1067b990e08d9"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac9f83e7b326a3f9ec3ef84cda98fb0a74c7159f33e692032233046e7fd15da2"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:0d3259ea9ad8743a75a43eb7819324cdab393263c91be86e2d1901ee65c314e0"}, - {file = "rpds_py-0.28.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a7548b345f66f6695943b4ef6afe33ccd3f1b638bd9afd0f730dd255c249c9e"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9a40040aa388b037eb39416710fbcce9443498d2eaab0b9b45ae988b53f5c67"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8f60c7ea34e78c199acd0d3cda37a99be2c861dd2b8cf67399784f70c9f8e57d"}, - {file = "rpds_py-0.28.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1571ae4292649100d743b26d5f9c63503bb1fedf538a8f29a98dce2d5ba6b4e6"}, - {file = "rpds_py-0.28.0-cp311-cp311-win32.whl", hash = "sha256:5cfa9af45e7c1140af7321fa0bef25b386ee9faa8928c80dc3a5360971a29e8c"}, - {file = "rpds_py-0.28.0-cp311-cp311-win_amd64.whl", hash = "sha256:dd8d86b5d29d1b74100982424ba53e56033dc47720a6de9ba0259cf81d7cecaa"}, - {file = "rpds_py-0.28.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e27d3a5709cc2b3e013bf93679a849213c79ae0573f9b894b284b55e729e120"}, - {file = "rpds_py-0.28.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6b4f28583a4f247ff60cd7bdda83db8c3f5b05a7a82ff20dd4b078571747708f"}, - {file = "rpds_py-0.28.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d678e91b610c29c4b3d52a2c148b641df2b4676ffe47c59f6388d58b99cdc424"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e819e0e37a44a78e1383bf1970076e2ccc4dc8c2bbaa2f9bd1dc987e9afff628"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5ee514e0f0523db5d3fb171f397c54875dbbd69760a414dccf9d4d7ad628b5bd"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3fa06d27fdcee47f07a39e02862da0100cb4982508f5ead53ec533cd5fe55e"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46959ef2e64f9e4a41fc89aa20dbca2b85531f9a72c21099a3360f35d10b0d5a"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8455933b4bcd6e83fde3fefc987a023389c4b13f9a58c8d23e4b3f6d13f78c84"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:ad50614a02c8c2962feebe6012b52f9802deec4263946cddea37aaf28dd25a66"}, - {file = "rpds_py-0.28.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e5deca01b271492553fdb6c7fd974659dce736a15bae5dad7ab8b93555bceb28"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:735f8495a13159ce6a0d533f01e8674cec0c57038c920495f87dcb20b3ddb48a"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:961ca621ff10d198bbe6ba4957decca61aa2a0c56695384c1d6b79bf61436df5"}, - {file = "rpds_py-0.28.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2374e16cc9131022e7d9a8f8d65d261d9ba55048c78f3b6e017971a4f5e6353c"}, - {file = "rpds_py-0.28.0-cp312-cp312-win32.whl", hash = "sha256:d15431e334fba488b081d47f30f091e5d03c18527c325386091f31718952fe08"}, - {file = "rpds_py-0.28.0-cp312-cp312-win_amd64.whl", hash = "sha256:a410542d61fc54710f750d3764380b53bf09e8c4edbf2f9141a82aa774a04f7c"}, - {file = "rpds_py-0.28.0-cp312-cp312-win_arm64.whl", hash = "sha256:1f0cfd1c69e2d14f8c892b893997fa9a60d890a0c8a603e88dca4955f26d1edd"}, - {file = "rpds_py-0.28.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e9e184408a0297086f880556b6168fa927d677716f83d3472ea333b42171ee3b"}, - {file = "rpds_py-0.28.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:edd267266a9b0448f33dc465a97cfc5d467594b600fe28e7fa2f36450e03053a"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85beb8b3f45e4e32f6802fb6cd6b17f615ef6c6a52f265371fb916fae02814aa"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d2412be8d00a1b895f8ad827cc2116455196e20ed994bb704bf138fe91a42724"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cf128350d384b777da0e68796afdcebc2e9f63f0e9f242217754e647f6d32491"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a2036d09b363aa36695d1cc1a97b36865597f4478470b0697b5ee9403f4fe399"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8e1e9be4fa6305a16be628959188e4fd5cd6f1b0e724d63c6d8b2a8adf74ea6"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0a403460c9dd91a7f23fc3188de6d8977f1d9603a351d5db6cf20aaea95b538d"}, - {file = "rpds_py-0.28.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d7366b6553cdc805abcc512b849a519167db8f5e5c3472010cd1228b224265cb"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5b43c6a3726efd50f18d8120ec0551241c38785b68952d240c45ea553912ac41"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:0cb7203c7bc69d7c1585ebb33a2e6074492d2fc21ad28a7b9d40457ac2a51ab7"}, - {file = "rpds_py-0.28.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7a52a5169c664dfb495882adc75c304ae1d50df552fbd68e100fdc719dee4ff9"}, - {file = "rpds_py-0.28.0-cp313-cp313-win32.whl", hash = "sha256:2e42456917b6687215b3e606ab46aa6bca040c77af7df9a08a6dcfe8a4d10ca5"}, - {file = "rpds_py-0.28.0-cp313-cp313-win_amd64.whl", hash = "sha256:e0a0311caedc8069d68fc2bf4c9019b58a2d5ce3cd7cb656c845f1615b577e1e"}, - {file = "rpds_py-0.28.0-cp313-cp313-win_arm64.whl", hash = "sha256:04c1b207ab8b581108801528d59ad80aa83bb170b35b0ddffb29c20e411acdc1"}, - {file = "rpds_py-0.28.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f296ea3054e11fc58ad42e850e8b75c62d9a93a9f981ad04b2e5ae7d2186ff9c"}, - {file = "rpds_py-0.28.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5a7306c19b19005ad98468fcefeb7100b19c79fc23a5f24a12e06d91181193fa"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5d9b86aa501fed9862a443c5c3116f6ead8bc9296185f369277c42542bd646b"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e5bbc701eff140ba0e872691d573b3d5d30059ea26e5785acba9132d10c8c31d"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a5690671cd672a45aa8616d7374fdf334a1b9c04a0cac3c854b1136e92374fe"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9f1d92ecea4fa12f978a367c32a5375a1982834649cdb96539dcdc12e609ab1a"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d252db6b1a78d0a3928b6190156042d54c93660ce4d98290d7b16b5296fb7cc"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:d61b355c3275acb825f8777d6c4505f42b5007e357af500939d4a35b19177259"}, - {file = "rpds_py-0.28.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:acbe5e8b1026c0c580d0321c8aae4b0a1e1676861d48d6e8c6586625055b606a"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8aa23b6f0fc59b85b4c7d89ba2965af274346f738e8d9fc2455763602e62fd5f"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:7b14b0c680286958817c22d76fcbca4800ddacef6f678f3a7c79a1fe7067fe37"}, - {file = "rpds_py-0.28.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:bcf1d210dfee61a6c86551d67ee1031899c0fdbae88b2d44a569995d43797712"}, - {file = "rpds_py-0.28.0-cp313-cp313t-win32.whl", hash = "sha256:3aa4dc0fdab4a7029ac63959a3ccf4ed605fee048ba67ce89ca3168da34a1342"}, - {file = "rpds_py-0.28.0-cp313-cp313t-win_amd64.whl", hash = "sha256:7b7d9d83c942855e4fdcfa75d4f96f6b9e272d42fffcb72cd4bb2577db2e2907"}, - {file = "rpds_py-0.28.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:dcdcb890b3ada98a03f9f2bb108489cdc7580176cb73b4f2d789e9a1dac1d472"}, - {file = "rpds_py-0.28.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f274f56a926ba2dc02976ca5b11c32855cbd5925534e57cfe1fda64e04d1add2"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4fe0438ac4a29a520ea94c8c7f1754cdd8feb1bc490dfda1bfd990072363d527"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8a358a32dd3ae50e933347889b6af9a1bdf207ba5d1a3f34e1a38cd3540e6733"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e80848a71c78aa328fefaba9c244d588a342c8e03bda518447b624ea64d1ff56"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f586db2e209d54fe177e58e0bc4946bea5fb0102f150b1b2f13de03e1f0976f8"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ae8ee156d6b586e4292491e885d41483136ab994e719a13458055bec14cf370"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:a805e9b3973f7e27f7cab63a6b4f61d90f2e5557cff73b6e97cd5b8540276d3d"}, - {file = "rpds_py-0.28.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5d3fd16b6dc89c73a4da0b4ac8b12a7ecc75b2864b95c9e5afed8003cb50a728"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:6796079e5d24fdaba6d49bda28e2c47347e89834678f2bc2c1b4fc1489c0fb01"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:76500820c2af232435cbe215e3324c75b950a027134e044423f59f5b9a1ba515"}, - {file = "rpds_py-0.28.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bbdc5640900a7dbf9dd707fe6388972f5bbd883633eb68b76591044cfe346f7e"}, - {file = "rpds_py-0.28.0-cp314-cp314-win32.whl", hash = "sha256:adc8aa88486857d2b35d75f0640b949759f79dc105f50aa2c27816b2e0dd749f"}, - {file = "rpds_py-0.28.0-cp314-cp314-win_amd64.whl", hash = "sha256:66e6fa8e075b58946e76a78e69e1a124a21d9a48a5b4766d15ba5b06869d1fa1"}, - {file = "rpds_py-0.28.0-cp314-cp314-win_arm64.whl", hash = "sha256:a6fe887c2c5c59413353b7c0caff25d0e566623501ccfff88957fa438a69377d"}, - {file = "rpds_py-0.28.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7a69df082db13c7070f7b8b1f155fa9e687f1d6aefb7b0e3f7231653b79a067b"}, - {file = "rpds_py-0.28.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b1cde22f2c30ebb049a9e74c5374994157b9b70a16147d332f89c99c5960737a"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5338742f6ba7a51012ea470bd4dc600a8c713c0c72adaa0977a1b1f4327d6592"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e1460ebde1bcf6d496d80b191d854adedcc619f84ff17dc1c6d550f58c9efbba"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e3eb248f2feba84c692579257a043a7699e28a77d86c77b032c1d9fbb3f0219c"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3bbba5def70b16cd1c1d7255666aad3b290fbf8d0fe7f9f91abafb73611a91"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3114f4db69ac5a1f32e7e4d1cbbe7c8f9cf8217f78e6e002cedf2d54c2a548ed"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:4b0cb8a906b1a0196b863d460c0222fb8ad0f34041568da5620f9799b83ccf0b"}, - {file = "rpds_py-0.28.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf681ac76a60b667106141e11a92a3330890257e6f559ca995fbb5265160b56e"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1e8ee6413cfc677ce8898d9cde18cc3a60fc2ba756b0dec5b71eb6eb21c49fa1"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b3072b16904d0b5572a15eb9d31c1954e0d3227a585fc1351aa9878729099d6c"}, - {file = "rpds_py-0.28.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b670c30fd87a6aec281c3c9896d3bae4b205fd75d79d06dc87c2503717e46092"}, - {file = "rpds_py-0.28.0-cp314-cp314t-win32.whl", hash = "sha256:8014045a15b4d2b3476f0a287fcc93d4f823472d7d1308d47884ecac9e612be3"}, - {file = "rpds_py-0.28.0-cp314-cp314t-win_amd64.whl", hash = "sha256:7a4e59c90d9c27c561eb3160323634a9ff50b04e4f7820600a2beb0ac90db578"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f5e7101145427087e493b9c9b959da68d357c28c562792300dd21a095118ed16"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:31eb671150b9c62409a888850aaa8e6533635704fe2b78335f9aaf7ff81eec4d"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48b55c1f64482f7d8bd39942f376bfdf2f6aec637ee8c805b5041e14eeb771db"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24743a7b372e9a76171f6b69c01aedf927e8ac3e16c474d9fe20d552a8cb45c7"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:389c29045ee8bbb1627ea190b4976a310a295559eaf9f1464a1a6f2bf84dde78"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23690b5827e643150cf7b49569679ec13fe9a610a15949ed48b85eb7f98f34ec"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f0c9266c26580e7243ad0d72fc3e01d6b33866cfab5084a6da7576bcf1c4f72"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:4c6c4db5d73d179746951486df97fd25e92396be07fc29ee8ff9a8f5afbdfb27"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3b695a8fa799dd2cfdb4804b37096c5f6dba1ac7f48a7fbf6d0485bcd060316"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:6aa1bfce3f83baf00d9c5fcdbba93a3ab79958b4c7d7d1f55e7fe68c20e63912"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:7b0f9dceb221792b3ee6acb5438eb1f02b0cb2c247796a72b016dcc92c6de829"}, - {file = "rpds_py-0.28.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:5d0145edba8abd3db0ab22b5300c99dc152f5c9021fab861be0f0544dc3cbc5f"}, - {file = "rpds_py-0.28.0.tar.gz", hash = "sha256:abd4df20485a0983e2ca334a216249b6186d6e3c1627e106651943dbdb791aea"}, -] - -[[package]] -name = "rsa" -version = "4.9.1" -description = "Pure-Python RSA implementation" -optional = false -python-versions = "<4,>=3.6" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762"}, - {file = "rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75"}, + {file = "rpds_py-0.25.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c146a24a8f0dc4a7846fb4640b88b3a68986585b8ce8397af15e66b7c5817439"}, + {file = "rpds_py-0.25.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:77814c7a4e1dc43fba73aeb4c1ef0fe37d901f3aa869a4823de5ea843a283fd0"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5afbff2822016db3c696cb0c1432e6b1f0e34aa9280bc5184dc216812a24e70d"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ffae52cd76837a5c16409359d236b1fced79e42e0792e8adf375095a5e855368"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddf9426b740a7047b2b0dddcba775211542e8053ce1e509a1759b665fe573508"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cad834f1a8f51eb037c3c4dc72c884c9e1e0644d900e2d45aa76450e4aa6282"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c46bd76986e05689376d28fdc2b97d899576ce3e3aaa5a5f80f67a8300b26eb3"}, + {file = "rpds_py-0.25.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f3353a2d7eb7d5e0af8a7ca9fc85a34ba12619119bcdee6b8a28a6373cda65ce"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fdc648d4e81eef5ac4bb35d731562dffc28358948410f3274d123320e125d613"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:098d446d76d26e394b440d73921b49c1c90274d46ccbaadf346b1b78f9fdd4b1"}, + {file = "rpds_py-0.25.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c624c82e645f6b5465d08cdc802fb0cd53aa1478782fb2992b9e09f2c9426865"}, + {file = "rpds_py-0.25.0-cp310-cp310-win32.whl", hash = "sha256:9d0041bd9e2d2ef803b32d84a0c8115d178132da5691346465953a2a966ba8ca"}, + {file = "rpds_py-0.25.0-cp310-cp310-win_amd64.whl", hash = "sha256:d8b41195a6b03280ab00749a438fbce761e7acfd5381051a570239d752376f27"}, + {file = "rpds_py-0.25.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6587ece9f205097c62d0e3d3cb7c06991eb0083ab6a9cf48951ec49c2ab7183c"}, + {file = "rpds_py-0.25.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b0a5651e350997cebcdc23016dca26c4d1993d29015a535284da3159796e30b6"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3752a015db89ea3e9c04d5e185549be4aa29c1882150e094c614c0de8e788feb"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a05b199c11d2f39c72de8c30668734b5d20974ad44b65324ea3e647a211f135d"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2f91902fc0c95dd1fa6b30ebd2af83ace91e592f7fd6340a375588a9d4b9341b"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98c729193e7abe498565266933c125780fb646e977e94289cadbb36e4eeeb370"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36a7564deaac3f372e8b8b701eb982ea3113516e8e08cd87e3dc6ccf29bad14b"}, + {file = "rpds_py-0.25.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6b0c0f671a53c129ea48f9481e95532579cc489ab5a0ffe750c9020787181c48"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d21408eaa157063f56e58ca50da27cad67c4395a85fb44cc7a31253ea4e58918"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a413674eb2bd2ecb2b93fcc928871b19f7220ee04bca4af3375c50a2b32b5a50"}, + {file = "rpds_py-0.25.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:94f89161a3e358db33310a8a064852a6eb119ed1aa1a3dba927b4e5140e65d00"}, + {file = "rpds_py-0.25.0-cp311-cp311-win32.whl", hash = "sha256:540cd89d256119845b7f8f56c4bb80cad280cab92d9ca473be49ea13e678fd44"}, + {file = "rpds_py-0.25.0-cp311-cp311-win_amd64.whl", hash = "sha256:2649ff19291928243f90c86e4dc9cd86c8c4c6a73c3693ba2e23bc2fbcd8338c"}, + {file = "rpds_py-0.25.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:89260601d497fa5957c3e46f10b16cfa2a4808ad4dd46cddc0b997461923a7d9"}, + {file = "rpds_py-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:637ec39f97e342a3f76af739eda96800549d92f3aa27a2170b6dcbdffd49f480"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bd08c82336412a39a598e5baccab2ee2d7bd54e9115c8b64f2febb45da5c368"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:837fd066f974e5b98c69ac83ec594b79a2724a39a92a157b8651615e5032e530"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:653a066d2a4a332d4f8a11813e8124b643fa7b835b78468087a9898140469eee"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91a51499be506022b9f09facfc42f0c3a1c45969c0fc8f0bbebc8ff23ab9e531"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb91471640390a82744b164f8a0be4d7c89d173b1170713f9639c6bad61e9e64"}, + {file = "rpds_py-0.25.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28bd2969445acc2d6801a22f97a43134ae3cb18e7495d668bfaa8d82b8526cdc"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f933b35fa563f047896a70b69414dfb3952831817e4c4b3a6faa96737627f363"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:80b37b37525492250adc7cbca20ae7084f86eb3eb62414b624d2a400370853b1"}, + {file = "rpds_py-0.25.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:864573b6440b770db5a8693547a8728d7fd32580d4903010a8eee0bb5b03b130"}, + {file = "rpds_py-0.25.0-cp312-cp312-win32.whl", hash = "sha256:ad4a896896346adab86d52b31163c39d49e4e94c829494b96cc064bff82c5851"}, + {file = "rpds_py-0.25.0-cp312-cp312-win_amd64.whl", hash = "sha256:4fbec54cc42fa90ca69158d75f125febc4116b2d934e71c78f97de1388a8feb2"}, + {file = "rpds_py-0.25.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:4e5fe366fa53bd6777cf5440245366705338587b2cf8d61348ddaad744eb591a"}, + {file = "rpds_py-0.25.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:54f925ff8d4443b7cae23a5215954abbf4736a3404188bde53c4d744ac001d89"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58258a66255b2500ddaa4f33191ada5ec983a429c09eb151daf81efbb9aa115"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f3a57f08c558d0983a708bfe6d1265f47b5debff9b366b2f2091690fada055c"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7d60d42f1b9571341ad2322e748f7a60f9847546cd801a3a0eb72a1b54c6519"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a54b94b0e4de95aa92618906fb631779d9fde29b4bf659f482c354a3a79fd025"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af1c2241919304cc2f90e7dcb3eb1c1df6fb4172dd338e629dd6410e48b3d1a0"}, + {file = "rpds_py-0.25.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7d34547810bfd61acf8a441e8a3651e7a919e8e8aed29850be14a1b05cfc6f41"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:66568caacf18542f0cf213db7adf3de2da6ad58c7bf2c4fafec0d81ae557443b"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e49e4c3e899c32884d7828c91d6c3aff08d2f18857f50f86cc91187c31a4ca58"}, + {file = "rpds_py-0.25.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:20af08b0b2d5b196a2bcb70becf0b97ec5af579cee0ae6750b08a2eea3b6c77d"}, + {file = "rpds_py-0.25.0-cp313-cp313-win32.whl", hash = "sha256:d3dc8d6ce8f001c80919bdb49d8b0b815185933a0b8e9cdeaea42b0b6f27eeb0"}, + {file = "rpds_py-0.25.0-cp313-cp313-win_amd64.whl", hash = "sha256:113d134dc5a8d2503630ca2707b58a1bf5b1b3c69b35c7dab8690ee650c111b8"}, + {file = "rpds_py-0.25.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:6c72a4a8fab10bc96720ad40941bb471e3b1150fb8d62dab205d495511206cf1"}, + {file = "rpds_py-0.25.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb979162323f3534dce84b59f86e689a0761a2a300e0212bfaedfa80d4eb8100"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35c8cb5dcf7d36d3adf2ae0730b60fb550a8feb6e432bee7ef84162a0d15714b"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:673ba018df5ae5e7b6c9a021d51ffe39c0ae1daa0041611ed27a0bca634b2d2e"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:16fb28d3a653f67c871a47c5ca0be17bce9fab8adb8bcf7bd09f3771b8c4d860"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12a84c3851f9e68633d883c01347db3cb87e6160120a489f9c47162cd276b0a5"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b5f457afffb45d3804728a54083e31fbaf460e902e3f7d063e56d0d0814301e"}, + {file = "rpds_py-0.25.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9442cbff21122e9a529b942811007d65eabe4182e7342d102caf119b229322c6"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:383cf0d4288baf5a16812ed70d54ecb7f2064e255eb7fe42c38e926adeae4534"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:0dcdee07ebf76223092666c72a9552db276fbe46b98830ecd1bb836cc98adc81"}, + {file = "rpds_py-0.25.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5bbfbd9c74c4dd74815bd532bf29bedea6d27d38f35ef46f9754172a14e4c655"}, + {file = "rpds_py-0.25.0-cp313-cp313t-win32.whl", hash = "sha256:90dbd2c42cb6463c07020695800ae8f347e7dbeff09da2975a988e467b624539"}, + {file = "rpds_py-0.25.0-cp313-cp313t-win_amd64.whl", hash = "sha256:8c2ad59c4342a176cb3e0d5753e1c911eabc95c210fc6d0e913c32bf560bf012"}, + {file = "rpds_py-0.25.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:9f9a1b15b875160186177f659cde2b0f899182b0aca49457d6396afc4bbda7b9"}, + {file = "rpds_py-0.25.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e849315963eb08c26167d0f2c0f9319c9bd379daea75092b3c595d70be6209d"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ad37c29adc435e6d8b24be86b03596183ee8d4bb8580cc4c676879b0b896a99"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:587cad3959d3d85127cf5df1624cdce569bb3796372e00420baad46af7c56b9b"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce0518667855a1598d9b1f4fcf0fed1182c67c5ba4fe6a2c6bce93440a65cead"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c18cb2f6805861dcdf11fb0b3c111a0335f6475411687db2f6636f32bed66b0"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a21f4584f69547ae03aaa21be98753e85599f3437b84039da5dc20b53abe987"}, + {file = "rpds_py-0.25.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3d7d65aa934899849628137ab391562cdb487c6ffb9b9781319a64a9c66afbce"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fd9167e9604cb5a218a2e847aa8cdc5f98b379a673371978ee7b0c11b4d2e140"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6c27156c8d836e7ff760767e93245b286ae028bfd81d305db676662d1f642637"}, + {file = "rpds_py-0.25.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:66087711faf29cb3ac8ab05341939aec29968626aff8ef18e483e229055dd9a7"}, + {file = "rpds_py-0.25.0-cp39-cp39-win32.whl", hash = "sha256:f2e69415e4e33cdeee50ebc2c4d8fcbef12c3181d9274e512ccd2a905a76aad1"}, + {file = "rpds_py-0.25.0-cp39-cp39-win_amd64.whl", hash = "sha256:58cfaa54752d6d2b4f10e87571688dbb7792327a69eca5417373d77d42787058"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:57e9616a2a9da08fe0994e37a0c6f578fbaf6d35911bcba31e99660542d60c45"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6d95521901896a90a858993bfa3ec0f9160d3d97e8c8fefc279b3306cdadfee0"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d33aef3914a5b49db12ed3f24d214ffa50caefc8f4b0c7c7b9485bd4b231a898"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4acbe2349a3baac9cc212005b6cb4bbb7e5b34538886cde4f55dfc29173da1d6"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9b75b5d3416b00d064a5e6f4814fdfb18a964a7cf38dc00b5c2c02fa30a7dd0b"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:542a6f1d0f400b9ce1facb3e30dd3dc84e4affc60353509b00a7bdcd064be91e"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60ba9d104f4e8496107b1cb86e45a68a16d13511dc3986e0780e9f85c2136f9"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6065a489b7b284efb29d57adffae2b9b5e9403d3c8d95cfa04e04e024e6b4e77"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:6bcca4d0d24d8c37bfe0cafdaaf4346b6c516db21ccaad5c7fba0a0df818dfc9"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:8155e21203161e5c78791fc049b99f0bbbf14d1d1839c8c93c8344957f9e8e1e"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6a1eda14db1ac7a2ab4536dfe69e4d37fdd765e8e784ae4451e61582ebb76012"}, + {file = "rpds_py-0.25.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:de34a7d1893be76cb015929690dce3bde29f4de08143da2e9ad1cedb11dbf80e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0d63a86b457069d669c423f093db4900aa102f0e5a626973eff4db8355c0fd96"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89bb2b20829270aca28b1e5481be8ee24cb9aa86e6c0c81cb4ada2112c9588c5"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83e103b48e63fd2b8a8e2b21ab5b5299a7146045626c2ed4011511ea8122d217"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fccd24c080850715c58a80200d367bc62b4bff6c9fb84e9564da1ebcafea6418"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12b42790c91e0041a98f0ec04244fb334696938793e785a5d4c7e56ca534d7da"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc907ea12216cfc5560148fc42459d86740fc739981c6feb94230dab09362679"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e11065b759c38c4945f8c9765ed2910e31fa5b2f7733401eb7d966f468367a2"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8abc1a3e29b599bf8bb5ad455256a757e8b0ed5621e7e48abe8209932dc6d11e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:cd36b71f9f3bf195b2dd9be5eafbfc9409e6c8007aebc38a4dc051f522008033"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:805a0dff0674baa3f360c21dcbc622ae544f2bb4753d87a4a56a1881252a477e"}, + {file = "rpds_py-0.25.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:96742796f499ac23b59856db734e65b286d1214a0d9b57bcd7bece92d9201fa4"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7715597186a7277be12729c896019226321bad1f047da381ab707b177aa5017c"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5b049dd0792d51f07193cd934acec89abe84d2607109e6ca223b2f0ff24f0c7d"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87c6ff87b38f46d712418d78b34db1198408a3d9a42eddc640644aea561216b1"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:240251fd95b057c26f8538d0e673bf983eba4f38da95fbaf502bfc1a768b3984"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85587479f210350e9d9d25e505f422dd636e561658382ee8947357a4bac491ad"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:551897221bbc9de17bce4574810347db8ec1ba4ec2f50f35421790d34bdb6ef9"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3d50ac3b772c10e0b918a5ce2e871138896bfb5f35050ff1ff87ddca45961fc"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8029c19c8a32ef3093c417dd16a5f806e7f529fcceea7c627b2635e9da5104da"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:fe7439d9c5b402af2c9911c7facda1808d0c8dbfa9cf085e6aeac511a23f7d87"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:77910d6bec321c9fccfe9cf5e407fed9d2c48a5e510473b4f070d5cf2413c003"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:0ee0cc81f875e853ccdf3badb44b67f771fb9149baa9e752777ccdcaf052ad26"}, + {file = "rpds_py-0.25.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:469054e6b2f8e41f1fe62b95f617082019d343eddeec3219ff3909067e672fb9"}, + {file = "rpds_py-0.25.0.tar.gz", hash = "sha256:4d97661bf5848dd9e5eb7ded480deccf9d32ce2cd500b88a26acbf7bd2864985"}, ] -[package.dependencies] -pyasn1 = ">=0.1.3" - [[package]] name = "s3transfer" -version = "0.14.0" +version = "0.12.0" description = "An Amazon S3 Transfer Manager" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "s3transfer-0.14.0-py3-none-any.whl", hash = "sha256:ea3b790c7077558ed1f02a3072fb3cb992bbbd253392f4b6e9e8976941c7d456"}, - {file = "s3transfer-0.14.0.tar.gz", hash = "sha256:eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125"}, + {file = "s3transfer-0.12.0-py3-none-any.whl", hash = "sha256:35b314d7d82865756edab59f7baebc6b477189e6ab4c53050e28c1de4d9cce18"}, + {file = "s3transfer-0.12.0.tar.gz", hash = "sha256:8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c"}, ] [package.dependencies] @@ -2713,74 +2255,83 @@ files = [ [[package]] name = "starlette" -version = "0.47.3" +version = "0.46.2" description = "The little ASGI library that shines." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "starlette-0.47.3-py3-none-any.whl", hash = "sha256:89c0778ca62a76b826101e7c709e70680a1699ca7da6b44d38eb0a7e61fe4b51"}, - {file = "starlette-0.47.3.tar.gz", hash = "sha256:6bc94f839cc176c4858894f1f8908f0ab79dfec1a6b8402f6da9be26ebea52e9"}, + {file = "starlette-0.46.2-py3-none-any.whl", hash = "sha256:595633ce89f8ffa71a015caed34a5b2dc1c0cdb3f0f1fbd1e69339cf2abeec35"}, + {file = "starlette-0.46.2.tar.gz", hash = "sha256:7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5"}, ] [package.dependencies] anyio = ">=3.6.2,<5" -typing-extensions = {version = ">=4.10.0", markers = "python_version < \"3.13\""} +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] [[package]] name = "structlog" -version = "25.5.0" +version = "25.3.0" description = "Structured Logging for Python" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "structlog-25.5.0-py3-none-any.whl", hash = "sha256:a8453e9b9e636ec59bd9e79bbd4a72f025981b3ba0f5837aebf48f02f37a7f9f"}, - {file = "structlog-25.5.0.tar.gz", hash = "sha256:098522a3bebed9153d4570c6d0288abf80a031dfdb2048d59a49e9dc2190fc98"}, + {file = "structlog-25.3.0-py3-none-any.whl", hash = "sha256:a341f5524004c158498c3127eecded091eb67d3a611e7a3093deca30db06e172"}, + {file = "structlog-25.3.0.tar.gz", hash = "sha256:8dab497e6f6ca962abad0c283c46744185e0c9ba900db52a423cb6db99f7abeb"}, ] +[package.dependencies] +typing-extensions = {version = "*", markers = "python_version < \"3.11\""} + +[package.extras] +dev = ["freezegun (>=0.2.8)", "mypy (>=1.4)", "pretend", "pytest (>=6.0)", "pytest-asyncio (>=0.17)", "rich", "simplejson", "twisted"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-mermaid", "sphinxext-opengraph", "twisted"] +tests = ["freezegun (>=0.2.8)", "pretend", "pytest (>=6.0)", "pytest-asyncio (>=0.17)", "simplejson"] +typing = ["mypy (>=1.4)", "rich", "twisted"] + [[package]] name = "tiktoken" -version = "0.11.0" +version = "0.9.0" description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tiktoken-0.11.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:8a9b517d6331d7103f8bef29ef93b3cca95fa766e293147fe7bacddf310d5917"}, - {file = "tiktoken-0.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b4ddb1849e6bf0afa6cc1c5d809fb980ca240a5fffe585a04e119519758788c0"}, - {file = "tiktoken-0.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10331d08b5ecf7a780b4fe4d0281328b23ab22cdb4ff65e68d56caeda9940ecc"}, - {file = "tiktoken-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b062c82300341dc87e0258c69f79bed725f87e753c21887aea90d272816be882"}, - {file = "tiktoken-0.11.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:195d84bec46169af3b1349a1495c151d37a0ff4cba73fd08282736be7f92cc6c"}, - {file = "tiktoken-0.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:fe91581b0ecdd8783ce8cb6e3178f2260a3912e8724d2f2d49552b98714641a1"}, - {file = "tiktoken-0.11.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4ae374c46afadad0f501046db3da1b36cd4dfbfa52af23c998773682446097cf"}, - {file = "tiktoken-0.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25a512ff25dc6c85b58f5dd4f3d8c674dc05f96b02d66cdacf628d26a4e4866b"}, - {file = "tiktoken-0.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2130127471e293d385179c1f3f9cd445070c0772be73cdafb7cec9a3684c0458"}, - {file = "tiktoken-0.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21e43022bf2c33f733ea9b54f6a3f6b4354b909f5a73388fb1b9347ca54a069c"}, - {file = "tiktoken-0.11.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:adb4e308eb64380dc70fa30493e21c93475eaa11669dea313b6bbf8210bfd013"}, - {file = "tiktoken-0.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:ece6b76bfeeb61a125c44bbefdfccc279b5288e6007fbedc0d32bfec602df2f2"}, - {file = "tiktoken-0.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fd9e6b23e860973cf9526544e220b223c60badf5b62e80a33509d6d40e6c8f5d"}, - {file = "tiktoken-0.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6a76d53cee2da71ee2731c9caa747398762bda19d7f92665e882fef229cb0b5b"}, - {file = "tiktoken-0.11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ef72aab3ea240646e642413cb363b73869fed4e604dcfd69eec63dc54d603e8"}, - {file = "tiktoken-0.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f929255c705efec7a28bf515e29dc74220b2f07544a8c81b8d69e8efc4578bd"}, - {file = "tiktoken-0.11.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:61f1d15822e4404953d499fd1dcc62817a12ae9fb1e4898033ec8fe3915fdf8e"}, - {file = "tiktoken-0.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:45927a71ab6643dfd3ef57d515a5db3d199137adf551f66453be098502838b0f"}, - {file = "tiktoken-0.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a5f3f25ffb152ee7fec78e90a5e5ea5b03b4ea240beed03305615847f7a6ace2"}, - {file = "tiktoken-0.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7dc6e9ad16a2a75b4c4be7208055a1f707c9510541d94d9cc31f7fbdc8db41d8"}, - {file = "tiktoken-0.11.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a0517634d67a8a48fd4a4ad73930c3022629a85a217d256a6e9b8b47439d1e4"}, - {file = "tiktoken-0.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fb4effe60574675118b73c6fbfd3b5868e5d7a1f570d6cc0d18724b09ecf318"}, - {file = "tiktoken-0.11.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94f984c9831fd32688aef4348803b0905d4ae9c432303087bae370dc1381a2b8"}, - {file = "tiktoken-0.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:2177ffda31dec4023356a441793fed82f7af5291120751dee4d696414f54db0c"}, - {file = "tiktoken-0.11.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:13220f12c9e82e399377e768640ddfe28bea962739cc3a869cad98f42c419a89"}, - {file = "tiktoken-0.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f2db627f5c74477c0404b4089fd8a28ae22fa982a6f7d9c7d4c305c375218f3"}, - {file = "tiktoken-0.11.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2302772f035dceb2bcf8e55a735e4604a0b51a6dd50f38218ff664d46ec43807"}, - {file = "tiktoken-0.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20b977989afe44c94bcc50db1f76971bb26dca44218bd203ba95925ef56f8e7a"}, - {file = "tiktoken-0.11.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:669a1aa1ad6ebf1b3c26b45deb346f345da7680f845b5ea700bba45c20dea24c"}, - {file = "tiktoken-0.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:e363f33c720a055586f730c00e330df4c7ea0024bf1c83a8a9a9dbc054c4f304"}, - {file = "tiktoken-0.11.0.tar.gz", hash = "sha256:3c518641aee1c52247c2b97e74d8d07d780092af79d5911a6ab5e79359d9b06a"}, + {file = "tiktoken-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:586c16358138b96ea804c034b8acf3f5d3f0258bd2bc3b0227af4af5d622e382"}, + {file = "tiktoken-0.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9c59ccc528c6c5dd51820b3474402f69d9a9e1d656226848ad68a8d5b2e5108"}, + {file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0968d5beeafbca2a72c595e8385a1a1f8af58feaebb02b227229b69ca5357fd"}, + {file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92a5fb085a6a3b7350b8fc838baf493317ca0e17bd95e8642f95fc69ecfed1de"}, + {file = "tiktoken-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:15a2752dea63d93b0332fb0ddb05dd909371ededa145fe6a3242f46724fa7990"}, + {file = "tiktoken-0.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:26113fec3bd7a352e4b33dbaf1bd8948de2507e30bd95a44e2b1156647bc01b4"}, + {file = "tiktoken-0.9.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f32cc56168eac4851109e9b5d327637f15fd662aa30dd79f964b7c39fbadd26e"}, + {file = "tiktoken-0.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:45556bc41241e5294063508caf901bf92ba52d8ef9222023f83d2483a3055348"}, + {file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03935988a91d6d3216e2ec7c645afbb3d870b37bcb67ada1943ec48678e7ee33"}, + {file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b3d80aad8d2c6b9238fc1a5524542087c52b860b10cbf952429ffb714bc1136"}, + {file = "tiktoken-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b2a21133be05dc116b1d0372af051cd2c6aa1d2188250c9b553f9fa49301b336"}, + {file = "tiktoken-0.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:11a20e67fdf58b0e2dea7b8654a288e481bb4fc0289d3ad21291f8d0849915fb"}, + {file = "tiktoken-0.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e88f121c1c22b726649ce67c089b90ddda8b9662545a8aeb03cfef15967ddd03"}, + {file = "tiktoken-0.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a6600660f2f72369acb13a57fb3e212434ed38b045fd8cc6cdd74947b4b5d210"}, + {file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95e811743b5dfa74f4b227927ed86cbc57cad4df859cb3b643be797914e41794"}, + {file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99376e1370d59bcf6935c933cb9ba64adc29033b7e73f5f7569f3aad86552b22"}, + {file = "tiktoken-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:badb947c32739fb6ddde173e14885fb3de4d32ab9d8c591cbd013c22b4c31dd2"}, + {file = "tiktoken-0.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:5a62d7a25225bafed786a524c1b9f0910a1128f4232615bf3f8257a73aaa3b16"}, + {file = "tiktoken-0.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b0e8e05a26eda1249e824156d537015480af7ae222ccb798e5234ae0285dbdb"}, + {file = "tiktoken-0.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:27d457f096f87685195eea0165a1807fae87b97b2161fe8c9b1df5bd74ca6f63"}, + {file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cf8ded49cddf825390e36dd1ad35cd49589e8161fdcb52aa25f0583e90a3e01"}, + {file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc156cb314119a8bb9748257a2eaebd5cc0753b6cb491d26694ed42fc7cb3139"}, + {file = "tiktoken-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cd69372e8c9dd761f0ab873112aba55a0e3e506332dd9f7522ca466e817b1b7a"}, + {file = "tiktoken-0.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:5ea0edb6f83dc56d794723286215918c1cde03712cbbafa0348b33448faf5b95"}, + {file = "tiktoken-0.9.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c6386ca815e7d96ef5b4ac61e0048cd32ca5a92d5781255e13b31381d28667dc"}, + {file = "tiktoken-0.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:75f6d5db5bc2c6274b674ceab1615c1778e6416b14705827d19b40e6355f03e0"}, + {file = "tiktoken-0.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e15b16f61e6f4625a57a36496d28dd182a8a60ec20a534c5343ba3cafa156ac7"}, + {file = "tiktoken-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebcec91babf21297022882344c3f7d9eed855931466c3311b1ad6b64befb3df"}, + {file = "tiktoken-0.9.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e5fd49e7799579240f03913447c0cdfa1129625ebd5ac440787afc4345990427"}, + {file = "tiktoken-0.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:26242ca9dc8b58e875ff4ca078b9a94d2f0813e6a535dcd2205df5d49d927cc7"}, + {file = "tiktoken-0.9.0.tar.gz", hash = "sha256:d02a5ca6a938e0490e1ff957bc48c8b078c88cb83977be1625b1fd8aac792c5d"}, ] [package.dependencies] @@ -2792,36 +2343,36 @@ blobfile = ["blobfile (>=2)"] [[package]] name = "tokenizers" -version = "0.22.1" +version = "0.21.1" description = "" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "tokenizers-0.22.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:59fdb013df17455e5f950b4b834a7b3ee2e0271e6378ccb33aa74d178b513c73"}, - {file = "tokenizers-0.22.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8d4e484f7b0827021ac5f9f71d4794aaef62b979ab7608593da22b1d2e3c4edc"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19d2962dd28bc67c1f205ab180578a78eef89ac60ca7ef7cbe9635a46a56422a"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:38201f15cdb1f8a6843e6563e6e79f4abd053394992b9bbdf5213ea3469b4ae7"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1cbe5454c9a15df1b3443c726063d930c16f047a3cc724b9e6e1a91140e5a21"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e7d094ae6312d69cc2a872b54b91b309f4f6fbce871ef28eb27b52a98e4d0214"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afd7594a56656ace95cdd6df4cca2e4059d294c5cfb1679c57824b605556cb2f"}, - {file = "tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ef6063d7a84994129732b47e7915e8710f27f99f3a3260b8a38fc7ccd083f4"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ba0a64f450b9ef412c98f6bcd2a50c6df6e2443b560024a09fa6a03189726879"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:331d6d149fa9c7d632cde4490fb8bbb12337fa3a0232e77892be656464f4b446"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:607989f2ea68a46cb1dfbaf3e3aabdf3f21d8748312dbeb6263d1b3b66c5010a"}, - {file = "tokenizers-0.22.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a0f307d490295717726598ef6fa4f24af9d484809223bbc253b201c740a06390"}, - {file = "tokenizers-0.22.1-cp39-abi3-win32.whl", hash = "sha256:b5120eed1442765cd90b903bb6cfef781fd8fe64e34ccaecbae4c619b7b12a82"}, - {file = "tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138"}, - {file = "tokenizers-0.22.1.tar.gz", hash = "sha256:61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9"}, + {file = "tokenizers-0.21.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e78e413e9e668ad790a29456e677d9d3aa50a9ad311a40905d6861ba7692cf41"}, + {file = "tokenizers-0.21.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:cd51cd0a91ecc801633829fcd1fda9cf8682ed3477c6243b9a095539de4aecf3"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28da6b72d4fb14ee200a1bd386ff74ade8992d7f725f2bde2c495a9a98cf4d9f"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:34d8cfde551c9916cb92014e040806122295a6800914bab5865deb85623931cf"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aaa852d23e125b73d283c98f007e06d4595732104b65402f46e8ef24b588d9f8"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a21a15d5c8e603331b8a59548bbe113564136dc0f5ad8306dd5033459a226da0"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2fdbd4c067c60a0ac7eca14b6bd18a5bebace54eb757c706b47ea93204f7a37c"}, + {file = "tokenizers-0.21.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dd9a0061e403546f7377df940e866c3e678d7d4e9643d0461ea442b4f89e61a"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:db9484aeb2e200c43b915a1a0150ea885e35f357a5a8fabf7373af333dcc8dbf"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:ed248ab5279e601a30a4d67bdb897ecbe955a50f1e7bb62bd99f07dd11c2f5b6"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:9ac78b12e541d4ce67b4dfd970e44c060a2147b9b2a21f509566d556a509c67d"}, + {file = "tokenizers-0.21.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e5a69c1a4496b81a5ee5d2c1f3f7fbdf95e90a0196101b0ee89ed9956b8a168f"}, + {file = "tokenizers-0.21.1-cp39-abi3-win32.whl", hash = "sha256:1039a3a5734944e09de1d48761ade94e00d0fa760c0e0551151d4dd851ba63e3"}, + {file = "tokenizers-0.21.1-cp39-abi3-win_amd64.whl", hash = "sha256:0f0dcbcc9f6e13e675a66d7a5f2f225a736745ce484c1a4e07476a89ccdad382"}, + {file = "tokenizers-0.21.1.tar.gz", hash = "sha256:a1bb04dc5b448985f86ecd4b05407f5a8d97cb2c0532199b2a302a604a0165ab"}, ] [package.dependencies] -huggingface-hub = ">=0.16.4,<2.0" +huggingface-hub = ">=0.16.4,<1.0" [package.extras] dev = ["tokenizers[testing]"] docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"] -testing = ["black (==22.3)", "datasets", "numpy", "pytest", "pytest-asyncio", "requests", "ruff"] +testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests", "ruff"] [[package]] name = "toml" @@ -2835,6 +2386,49 @@ files = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +[[package]] +name = "tomli" +version = "2.2.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.11\"" +files = [ + {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, + {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, + {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, + {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, + {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, + {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, + {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, + {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, + {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, +] + [[package]] name = "tqdm" version = "4.67.1" @@ -2859,26 +2453,26 @@ telegram = ["requests"] [[package]] name = "typing-extensions" -version = "4.15.0" -description = "Backported and Experimental Type Hints for Python 3.9+" +version = "4.13.2" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, - {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, + {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, + {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, ] [[package]] name = "typing-inspection" -version = "0.4.2" +version = "0.4.0" description = "Runtime typing introspection tools" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"}, - {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"}, + {file = "typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f"}, + {file = "typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122"}, ] [package.dependencies] @@ -2886,14 +2480,33 @@ typing-extensions = ">=4.12.0" [[package]] name = "urllib3" -version = "2.5.0" +version = "1.26.20" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +groups = ["main", "dev"] +markers = "python_version < \"3.10\"" +files = [ + {file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"}, + {file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"}, +] + +[package.extras] +brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "urllib3" +version = "2.4.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" groups = ["main", "dev"] +markers = "python_version >= \"3.10\"" files = [ - {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"}, - {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"}, + {file = "urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813"}, + {file = "urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466"}, ] [package.extras] @@ -2904,264 +2517,237 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.34.3" +version = "0.34.2" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "uvicorn-0.34.3-py3-none-any.whl", hash = "sha256:16246631db62bdfbf069b0645177d6e8a77ba950cfedbfd093acef9444e4d885"}, - {file = "uvicorn-0.34.3.tar.gz", hash = "sha256:35919a9a979d7a59334b6b10e05d77c1d0d574c50e0fc98b8b1a0f165708b55a"}, + {file = "uvicorn-0.34.2-py3-none-any.whl", hash = "sha256:deb49af569084536d269fe0a6d67e3754f104cf03aba7c11c40f01aadf33c403"}, + {file = "uvicorn-0.34.2.tar.gz", hash = "sha256:0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328"}, ] [package.dependencies] click = ">=7.0" h11 = ">=0.8" +typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] [[package]] name = "wcwidth" -version = "0.2.14" +version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" optional = false -python-versions = ">=3.6" +python-versions = "*" groups = ["dev"] files = [ - {file = "wcwidth-0.2.14-py2.py3-none-any.whl", hash = "sha256:a7bb560c8aee30f9957e5f9895805edd20602f2d7f720186dfd906e82b4982e1"}, - {file = "wcwidth-0.2.14.tar.gz", hash = "sha256:4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605"}, + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, ] [[package]] name = "wrapt" -version = "1.17.3" +version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04"}, - {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2"}, - {file = "wrapt-1.17.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c"}, - {file = "wrapt-1.17.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775"}, - {file = "wrapt-1.17.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd"}, - {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05"}, - {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418"}, - {file = "wrapt-1.17.3-cp310-cp310-win32.whl", hash = "sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390"}, - {file = "wrapt-1.17.3-cp310-cp310-win_amd64.whl", hash = "sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6"}, - {file = "wrapt-1.17.3-cp310-cp310-win_arm64.whl", hash = "sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85"}, - {file = "wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f"}, - {file = "wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311"}, - {file = "wrapt-1.17.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1"}, - {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5"}, - {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2"}, - {file = "wrapt-1.17.3-cp311-cp311-win32.whl", hash = "sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89"}, - {file = "wrapt-1.17.3-cp311-cp311-win_amd64.whl", hash = "sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77"}, - {file = "wrapt-1.17.3-cp311-cp311-win_arm64.whl", hash = "sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba"}, - {file = "wrapt-1.17.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd"}, - {file = "wrapt-1.17.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828"}, - {file = "wrapt-1.17.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9"}, - {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396"}, - {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc"}, - {file = "wrapt-1.17.3-cp312-cp312-win32.whl", hash = "sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe"}, - {file = "wrapt-1.17.3-cp312-cp312-win_amd64.whl", hash = "sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c"}, - {file = "wrapt-1.17.3-cp312-cp312-win_arm64.whl", hash = "sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77"}, - {file = "wrapt-1.17.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7"}, - {file = "wrapt-1.17.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277"}, - {file = "wrapt-1.17.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d"}, - {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa"}, - {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050"}, - {file = "wrapt-1.17.3-cp313-cp313-win32.whl", hash = "sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8"}, - {file = "wrapt-1.17.3-cp313-cp313-win_amd64.whl", hash = "sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb"}, - {file = "wrapt-1.17.3-cp313-cp313-win_arm64.whl", hash = "sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235"}, - {file = "wrapt-1.17.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c"}, - {file = "wrapt-1.17.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b"}, - {file = "wrapt-1.17.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa"}, - {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7"}, - {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4"}, - {file = "wrapt-1.17.3-cp314-cp314-win32.whl", hash = "sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10"}, - {file = "wrapt-1.17.3-cp314-cp314-win_amd64.whl", hash = "sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6"}, - {file = "wrapt-1.17.3-cp314-cp314-win_arm64.whl", hash = "sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067"}, - {file = "wrapt-1.17.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454"}, - {file = "wrapt-1.17.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e"}, - {file = "wrapt-1.17.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f"}, - {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056"}, - {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804"}, - {file = "wrapt-1.17.3-cp314-cp314t-win32.whl", hash = "sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977"}, - {file = "wrapt-1.17.3-cp314-cp314t-win_amd64.whl", hash = "sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116"}, - {file = "wrapt-1.17.3-cp314-cp314t-win_arm64.whl", hash = "sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:70d86fa5197b8947a2fa70260b48e400bf2ccacdcab97bb7de47e3d1e6312225"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df7d30371a2accfe4013e90445f6388c570f103d61019b6b7c57e0265250072a"}, - {file = "wrapt-1.17.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:caea3e9c79d5f0d2c6d9ab96111601797ea5da8e6d0723f77eabb0d4068d2b2f"}, - {file = "wrapt-1.17.3-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:758895b01d546812d1f42204bd443b8c433c44d090248bf22689df673ccafe00"}, - {file = "wrapt-1.17.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02b551d101f31694fc785e58e0720ef7d9a10c4e62c1c9358ce6f63f23e30a56"}, - {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:656873859b3b50eeebe6db8b1455e99d90c26ab058db8e427046dbc35c3140a5"}, - {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a9a2203361a6e6404f80b99234fe7fb37d1fc73487b5a78dc1aa5b97201e0f22"}, - {file = "wrapt-1.17.3-cp38-cp38-win32.whl", hash = "sha256:55cbbc356c2842f39bcc553cf695932e8b30e30e797f961860afb308e6b1bb7c"}, - {file = "wrapt-1.17.3-cp38-cp38-win_amd64.whl", hash = "sha256:ad85e269fe54d506b240d2d7b9f5f2057c2aa9a2ea5b32c66f8902f768117ed2"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:30ce38e66630599e1193798285706903110d4f057aab3168a34b7fdc85569afc"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:65d1d00fbfb3ea5f20add88bbc0f815150dbbde3b026e6c24759466c8b5a9ef9"}, - {file = "wrapt-1.17.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a7c06742645f914f26c7f1fa47b8bc4c91d222f76ee20116c43d5ef0912bba2d"}, - {file = "wrapt-1.17.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7e18f01b0c3e4a07fe6dfdb00e29049ba17eadbc5e7609a2a3a4af83ab7d710a"}, - {file = "wrapt-1.17.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f5f51a6466667a5a356e6381d362d259125b57f059103dd9fdc8c0cf1d14139"}, - {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:59923aa12d0157f6b82d686c3fd8e1166fa8cdfb3e17b42ce3b6147ff81528df"}, - {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:46acc57b331e0b3bcb3e1ca3b421d65637915cfcd65eb783cb2f78a511193f9b"}, - {file = "wrapt-1.17.3-cp39-cp39-win32.whl", hash = "sha256:3e62d15d3cfa26e3d0788094de7b64efa75f3a53875cdbccdf78547aed547a81"}, - {file = "wrapt-1.17.3-cp39-cp39-win_amd64.whl", hash = "sha256:1f23fa283f51c890eda8e34e4937079114c74b4c81d2b2f1f1d94948f5cc3d7f"}, - {file = "wrapt-1.17.3-cp39-cp39-win_arm64.whl", hash = "sha256:24c2ed34dc222ed754247a2702b1e1e89fdbaa4016f324b4b8f1a802d4ffe87f"}, - {file = "wrapt-1.17.3-py3-none-any.whl", hash = "sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22"}, - {file = "wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:80dd7db6a7cb57ffbc279c4394246414ec99537ae81ffd702443335a61dbf3a7"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a6e821770cf99cc586d33833b2ff32faebdbe886bd6322395606cf55153246c"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b60fb58b90c6d63779cb0c0c54eeb38941bae3ecf7a73c764c52c88c2dcb9d72"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b870b5df5b71d8c3359d21be8f0d6c485fa0ebdb6477dda51a1ea54a9b558061"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4011d137b9955791f9084749cba9a367c68d50ab8d11d64c50ba1688c9b457f2"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:1473400e5b2733e58b396a04eb7f35f541e1fb976d0c0724d0223dd607e0f74c"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3cedbfa9c940fdad3e6e941db7138e26ce8aad38ab5fe9dcfadfed9db7a54e62"}, + {file = "wrapt-1.17.2-cp310-cp310-win32.whl", hash = "sha256:582530701bff1dec6779efa00c516496968edd851fba224fbd86e46cc6b73563"}, + {file = "wrapt-1.17.2-cp310-cp310-win_amd64.whl", hash = "sha256:58705da316756681ad3c9c73fd15499aa4d8c69f9fd38dc8a35e06c12468582f"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ff04ef6eec3eee8a5efef2401495967a916feaa353643defcc03fc74fe213b58"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4db983e7bca53819efdbd64590ee96c9213894272c776966ca6306b73e4affda"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9abc77a4ce4c6f2a3168ff34b1da9b0f311a8f1cfd694ec96b0603dff1c79438"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b929ac182f5ace000d459c59c2c9c33047e20e935f8e39371fa6e3b85d56f4a"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f09b286faeff3c750a879d336fb6d8713206fc97af3adc14def0cdd349df6000"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a7ed2d9d039bd41e889f6fb9364554052ca21ce823580f6a07c4ec245c1f5d6"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:129a150f5c445165ff941fc02ee27df65940fcb8a22a61828b1853c98763a64b"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1fb5699e4464afe5c7e65fa51d4f99e0b2eadcc176e4aa33600a3df7801d6662"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9a2bce789a5ea90e51a02dfcc39e31b7f1e662bc3317979aa7e5538e3a034f72"}, + {file = "wrapt-1.17.2-cp311-cp311-win32.whl", hash = "sha256:4afd5814270fdf6380616b321fd31435a462019d834f83c8611a0ce7484c7317"}, + {file = "wrapt-1.17.2-cp311-cp311-win_amd64.whl", hash = "sha256:acc130bc0375999da18e3d19e5a86403667ac0c4042a094fefb7eec8ebac7cf3"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d5e2439eecc762cd85e7bd37161d4714aa03a33c5ba884e26c81559817ca0925"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fc7cb4c1c744f8c05cd5f9438a3caa6ab94ce8344e952d7c45a8ed59dd88392"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8fdbdb757d5390f7c675e558fd3186d590973244fab0c5fe63d373ade3e99d40"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb1d0dbf99411f3d871deb6faa9aabb9d4e744d67dcaaa05399af89d847a91d"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d18a4865f46b8579d44e4fe1e2bcbc6472ad83d98e22a26c963d46e4c125ef0b"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc570b5f14a79734437cb7b0500376b6b791153314986074486e0b0fa8d71d98"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6d9187b01bebc3875bac9b087948a2bccefe464a7d8f627cf6e48b1bbae30f82"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9e8659775f1adf02eb1e6f109751268e493c73716ca5761f8acb695e52a756ae"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8b2816ebef96d83657b56306152a93909a83f23994f4b30ad4573b00bd11bb9"}, + {file = "wrapt-1.17.2-cp312-cp312-win32.whl", hash = "sha256:468090021f391fe0056ad3e807e3d9034e0fd01adcd3bdfba977b6fdf4213ea9"}, + {file = "wrapt-1.17.2-cp312-cp312-win_amd64.whl", hash = "sha256:ec89ed91f2fa8e3f52ae53cd3cf640d6feff92ba90d62236a81e4e563ac0e991"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6ed6ffac43aecfe6d86ec5b74b06a5be33d5bb9243d055141e8cabb12aa08125"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:35621ae4c00e056adb0009f8e86e28eb4a41a4bfa8f9bfa9fca7d343fe94f998"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a604bf7a053f8362d27eb9fefd2097f82600b856d5abe996d623babd067b1ab5"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cbabee4f083b6b4cd282f5b817a867cf0b1028c54d445b7ec7cfe6505057cf8"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49703ce2ddc220df165bd2962f8e03b84c89fee2d65e1c24a7defff6f988f4d6"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8112e52c5822fc4253f3901b676c55ddf288614dc7011634e2719718eaa187dc"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9fee687dce376205d9a494e9c121e27183b2a3df18037f89d69bd7b35bcf59e2"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:18983c537e04d11cf027fbb60a1e8dfd5190e2b60cc27bc0808e653e7b218d1b"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:703919b1633412ab54bcf920ab388735832fdcb9f9a00ae49387f0fe67dad504"}, + {file = "wrapt-1.17.2-cp313-cp313-win32.whl", hash = "sha256:abbb9e76177c35d4e8568e58650aa6926040d6a9f6f03435b7a522bf1c487f9a"}, + {file = "wrapt-1.17.2-cp313-cp313-win_amd64.whl", hash = "sha256:69606d7bb691b50a4240ce6b22ebb319c1cfb164e5f6569835058196e0f3a845"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:4a721d3c943dae44f8e243b380cb645a709ba5bd35d3ad27bc2ed947e9c68192"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:766d8bbefcb9e00c3ac3b000d9acc51f1b399513f44d77dfe0eb026ad7c9a19b"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e496a8ce2c256da1eb98bd15803a79bee00fc351f5dfb9ea82594a3f058309e0"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d615e4fe22f4ad3528448c193b218e077656ca9ccb22ce2cb20db730f8d306"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5aaeff38654462bc4b09023918b7f21790efb807f54c000a39d41d69cf552cb"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7d15bbd2bc99e92e39f49a04653062ee6085c0e18b3b7512a4f2fe91f2d681"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3890b508a23299083e065f435a492b5435eba6e304a7114d2f919d400888cc6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8c8b293cd65ad716d13d8dd3624e42e5a19cc2a2f1acc74b30c2c13f15cb61a6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c82b8785d98cdd9fed4cac84d765d234ed3251bd6afe34cb7ac523cb93e8b4f"}, + {file = "wrapt-1.17.2-cp313-cp313t-win32.whl", hash = "sha256:13e6afb7fe71fe7485a4550a8844cc9ffbe263c0f1a1eea569bc7091d4898555"}, + {file = "wrapt-1.17.2-cp313-cp313t-win_amd64.whl", hash = "sha256:eaf675418ed6b3b31c7a989fd007fa7c3be66ce14e5c3b27336383604c9da85c"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5c803c401ea1c1c18de70a06a6f79fcc9c5acfc79133e9869e730ad7f8ad8ef9"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f917c1180fdb8623c2b75a99192f4025e412597c50b2ac870f156de8fb101119"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ecc840861360ba9d176d413a5489b9a0aff6d6303d7e733e2c4623cfa26904a6"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb87745b2e6dc56361bfde481d5a378dc314b252a98d7dd19a651a3fa58f24a9"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58455b79ec2661c3600e65c0a716955adc2410f7383755d537584b0de41b1d8a"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4e42a40a5e164cbfdb7b386c966a588b1047558a990981ace551ed7e12ca9c2"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:91bd7d1773e64019f9288b7a5101f3ae50d3d8e6b1de7edee9c2ccc1d32f0c0a"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:bb90fb8bda722a1b9d48ac1e6c38f923ea757b3baf8ebd0c82e09c5c1a0e7a04"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:08e7ce672e35efa54c5024936e559469436f8b8096253404faeb54d2a878416f"}, + {file = "wrapt-1.17.2-cp38-cp38-win32.whl", hash = "sha256:410a92fefd2e0e10d26210e1dfb4a876ddaf8439ef60d6434f21ef8d87efc5b7"}, + {file = "wrapt-1.17.2-cp38-cp38-win_amd64.whl", hash = "sha256:95c658736ec15602da0ed73f312d410117723914a5c91a14ee4cdd72f1d790b3"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99039fa9e6306880572915728d7f6c24a86ec57b0a83f6b2491e1d8ab0235b9a"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2696993ee1eebd20b8e4ee4356483c4cb696066ddc24bd70bcbb80fa56ff9061"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:612dff5db80beef9e649c6d803a8d50c409082f1fedc9dbcdfde2983b2025b82"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c2caa1585c82b3f7a7ab56afef7b3602021d6da34fbc1cf234ff139fed3cd9"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c958bcfd59bacc2d0249dcfe575e71da54f9dcf4a8bdf89c4cb9a68a1170d73f"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc78a84e2dfbc27afe4b2bd7c80c8db9bca75cc5b85df52bfe634596a1da846b"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ba0f0eb61ef00ea10e00eb53a9129501f52385c44853dbd6c4ad3f403603083f"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1e1fe0e6ab7775fd842bc39e86f6dcfc4507ab0ffe206093e76d61cde37225c8"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c86563182421896d73858e08e1db93afdd2b947a70064b813d515d66549e15f9"}, + {file = "wrapt-1.17.2-cp39-cp39-win32.whl", hash = "sha256:f393cda562f79828f38a819f4788641ac7c4085f30f1ce1a68672baa686482bb"}, + {file = "wrapt-1.17.2-cp39-cp39-win_amd64.whl", hash = "sha256:36ccae62f64235cf8ddb682073a60519426fdd4725524ae38874adf72b5f2aeb"}, + {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, + {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] [[package]] name = "yarl" -version = "1.22.0" +version = "1.20.0" description = "Yet another URL library" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "yarl-1.22.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c7bd6683587567e5a49ee6e336e0612bec8329be1b7d4c8af5687dcdeb67ee1e"}, - {file = "yarl-1.22.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5cdac20da754f3a723cceea5b3448e1a2074866406adeb4ef35b469d089adb8f"}, - {file = "yarl-1.22.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07a524d84df0c10f41e3ee918846e1974aba4ec017f990dc735aad487a0bdfdf"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1b329cb8146d7b736677a2440e422eadd775d1806a81db2d4cded80a48efc1a"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:75976c6945d85dbb9ee6308cd7ff7b1fb9409380c82d6119bd778d8fcfe2931c"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:80ddf7a5f8c86cb3eb4bc9028b07bbbf1f08a96c5c0bc1244be5e8fefcb94147"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d332fc2e3c94dad927f2112395772a4e4fedbcf8f80efc21ed7cdfae4d574fdb"}, - {file = "yarl-1.22.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cf71bf877efeac18b38d3930594c0948c82b64547c1cf420ba48722fe5509f6"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:663e1cadaddae26be034a6ab6072449a8426ddb03d500f43daf952b74553bba0"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6dcbb0829c671f305be48a7227918cfcd11276c2d637a8033a99a02b67bf9eda"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f0d97c18dfd9a9af4490631905a3f131a8e4c9e80a39353919e2cfed8f00aedc"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:437840083abe022c978470b942ff832c3940b2ad3734d424b7eaffcd07f76737"}, - {file = "yarl-1.22.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a899cbd98dce6f5d8de1aad31cb712ec0a530abc0a86bd6edaa47c1090138467"}, - {file = "yarl-1.22.0-cp310-cp310-win32.whl", hash = "sha256:595697f68bd1f0c1c159fcb97b661fc9c3f5db46498043555d04805430e79bea"}, - {file = "yarl-1.22.0-cp310-cp310-win_amd64.whl", hash = "sha256:cb95a9b1adaa48e41815a55ae740cfda005758104049a640a398120bf02515ca"}, - {file = "yarl-1.22.0-cp310-cp310-win_arm64.whl", hash = "sha256:b85b982afde6df99ecc996990d4ad7ccbdbb70e2a4ba4de0aecde5922ba98a0b"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ab72135b1f2db3fed3997d7e7dc1b80573c67138023852b6efb336a5eae6511"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:669930400e375570189492dc8d8341301578e8493aec04aebc20d4717f899dd6"}, - {file = "yarl-1.22.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:792a2af6d58177ef7c19cbf0097aba92ca1b9cb3ffdd9c7470e156c8f9b5e028"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ea66b1c11c9150f1372f69afb6b8116f2dd7286f38e14ea71a44eee9ec51b9d"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3e2daa88dc91870215961e96a039ec73e4937da13cf77ce17f9cad0c18df3503"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba440ae430c00eee41509353628600212112cd5018d5def7e9b05ea7ac34eb65"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e6438cc8f23a9c1478633d216b16104a586b9761db62bfacb6425bac0a36679e"}, - {file = "yarl-1.22.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c52a6e78aef5cf47a98ef8e934755abf53953379b7d53e68b15ff4420e6683d"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3b06bcadaac49c70f4c88af4ffcfbe3dc155aab3163e75777818092478bcbbe7"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:6944b2dc72c4d7f7052683487e3677456050ff77fcf5e6204e98caf785ad1967"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5372ca1df0f91a86b047d1277c2aaf1edb32d78bbcefffc81b40ffd18f027ed"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:51af598701f5299012b8416486b40fceef8c26fc87dc6d7d1f6fc30609ea0aa6"}, - {file = "yarl-1.22.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b266bd01fedeffeeac01a79ae181719ff848a5a13ce10075adbefc8f1daee70e"}, - {file = "yarl-1.22.0-cp311-cp311-win32.whl", hash = "sha256:a9b1ba5610a4e20f655258d5a1fdc7ebe3d837bb0e45b581398b99eb98b1f5ca"}, - {file = "yarl-1.22.0-cp311-cp311-win_amd64.whl", hash = "sha256:078278b9b0b11568937d9509b589ee83ef98ed6d561dfe2020e24a9fd08eaa2b"}, - {file = "yarl-1.22.0-cp311-cp311-win_arm64.whl", hash = "sha256:b6a6f620cfe13ccec221fa312139135166e47ae169f8253f72a0abc0dae94376"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e340382d1afa5d32b892b3ff062436d592ec3d692aeea3bef3a5cfe11bbf8c6f"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f1e09112a2c31ffe8d80be1b0988fa6a18c5d5cad92a9ffbb1c04c91bfe52ad2"}, - {file = "yarl-1.22.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:939fe60db294c786f6b7c2d2e121576628468f65453d86b0fe36cb52f987bd74"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1651bf8e0398574646744c1885a41198eba53dc8a9312b954073f845c90a8df"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b8a0588521a26bf92a57a1705b77b8b59044cdceccac7151bd8d229e66b8dedb"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42188e6a615c1a75bcaa6e150c3fe8f3e8680471a6b10150c5f7e83f47cc34d2"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6d2cb59377d99718913ad9a151030d6f83ef420a2b8f521d94609ecc106ee82"}, - {file = "yarl-1.22.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50678a3b71c751d58d7908edc96d332af328839eea883bb554a43f539101277a"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e8fbaa7cec507aa24ea27a01456e8dd4b6fab829059b69844bd348f2d467124"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:433885ab5431bc3d3d4f2f9bd15bfa1614c522b0f1405d62c4f926ccd69d04fa"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b790b39c7e9a4192dc2e201a282109ed2985a1ddbd5ac08dc56d0e121400a8f7"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31f0b53913220599446872d757257be5898019c85e7971599065bc55065dc99d"}, - {file = "yarl-1.22.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a49370e8f711daec68d09b821a34e1167792ee2d24d405cbc2387be4f158b520"}, - {file = "yarl-1.22.0-cp312-cp312-win32.whl", hash = "sha256:70dfd4f241c04bd9239d53b17f11e6ab672b9f1420364af63e8531198e3f5fe8"}, - {file = "yarl-1.22.0-cp312-cp312-win_amd64.whl", hash = "sha256:8884d8b332a5e9b88e23f60bb166890009429391864c685e17bd73a9eda9105c"}, - {file = "yarl-1.22.0-cp312-cp312-win_arm64.whl", hash = "sha256:ea70f61a47f3cc93bdf8b2f368ed359ef02a01ca6393916bc8ff877427181e74"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8dee9c25c74997f6a750cd317b8ca63545169c098faee42c84aa5e506c819b53"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01e73b85a5434f89fc4fe27dcda2aff08ddf35e4d47bbbea3bdcd25321af538a"}, - {file = "yarl-1.22.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:22965c2af250d20c873cdbee8ff958fb809940aeb2e74ba5f20aaf6b7ac8c70c"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4f15793aa49793ec8d1c708ab7f9eded1aa72edc5174cae703651555ed1b601"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5542339dcf2747135c5c85f68680353d5cb9ffd741c0f2e8d832d054d41f35a"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5c401e05ad47a75869c3ab3e35137f8468b846770587e70d71e11de797d113df"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:243dda95d901c733f5b59214d28b0120893d91777cb8aa043e6ef059d3cddfe2"}, - {file = "yarl-1.22.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bec03d0d388060058f5d291a813f21c011041938a441c593374da6077fe21b1b"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b0748275abb8c1e1e09301ee3cf90c8a99678a4e92e4373705f2a2570d581273"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:47fdb18187e2a4e18fda2c25c05d8251a9e4a521edaed757fef033e7d8498d9a"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c7044802eec4524fde550afc28edda0dd5784c4c45f0be151a2d3ba017daca7d"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:139718f35149ff544caba20fce6e8a2f71f1e39b92c700d8438a0b1d2a631a02"}, - {file = "yarl-1.22.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e1b51bebd221006d3d2f95fbe124b22b247136647ae5dcc8c7acafba66e5ee67"}, - {file = "yarl-1.22.0-cp313-cp313-win32.whl", hash = "sha256:d3e32536234a95f513bd374e93d717cf6b2231a791758de6c509e3653f234c95"}, - {file = "yarl-1.22.0-cp313-cp313-win_amd64.whl", hash = "sha256:47743b82b76d89a1d20b83e60d5c20314cbd5ba2befc9cda8f28300c4a08ed4d"}, - {file = "yarl-1.22.0-cp313-cp313-win_arm64.whl", hash = "sha256:5d0fcda9608875f7d052eff120c7a5da474a6796fe4d83e152e0e4d42f6d1a9b"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:719ae08b6972befcba4310e49edb1161a88cdd331e3a694b84466bd938a6ab10"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:47d8a5c446df1c4db9d21b49619ffdba90e77c89ec6e283f453856c74b50b9e3"}, - {file = "yarl-1.22.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cfebc0ac8333520d2d0423cbbe43ae43c8838862ddb898f5ca68565e395516e9"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4398557cbf484207df000309235979c79c4356518fd5c99158c7d38203c4da4f"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2ca6fd72a8cd803be290d42f2dec5cdcd5299eeb93c2d929bf060ad9efaf5de0"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca1f59c4e1ab6e72f0a23c13fca5430f889634166be85dbf1013683e49e3278e"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c5010a52015e7c70f86eb967db0f37f3c8bd503a695a49f8d45700144667708"}, - {file = "yarl-1.22.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d7672ecf7557476642c88497c2f8d8542f8e36596e928e9bcba0e42e1e7d71f"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3b7c88eeef021579d600e50363e0b6ee4f7f6f728cd3486b9d0f3ee7b946398d"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f4afb5c34f2c6fecdcc182dfcfc6af6cccf1aa923eed4d6a12e9d96904e1a0d8"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:59c189e3e99a59cf8d83cbb31d4db02d66cda5a1a4374e8a012b51255341abf5"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:5a3bf7f62a289fa90f1990422dc8dff5a458469ea71d1624585ec3a4c8d6960f"}, - {file = "yarl-1.22.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:de6b9a04c606978fdfe72666fa216ffcf2d1a9f6a381058d4378f8d7b1e5de62"}, - {file = "yarl-1.22.0-cp313-cp313t-win32.whl", hash = "sha256:1834bb90991cc2999f10f97f5f01317f99b143284766d197e43cd5b45eb18d03"}, - {file = "yarl-1.22.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff86011bd159a9d2dfc89c34cfd8aff12875980e3bd6a39ff097887520e60249"}, - {file = "yarl-1.22.0-cp313-cp313t-win_arm64.whl", hash = "sha256:7861058d0582b847bc4e3a4a4c46828a410bca738673f35a29ba3ca5db0b473b"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:34b36c2c57124530884d89d50ed2c1478697ad7473efd59cfd479945c95650e4"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:0dd9a702591ca2e543631c2a017e4a547e38a5c0f29eece37d9097e04a7ac683"}, - {file = "yarl-1.22.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:594fcab1032e2d2cc3321bb2e51271e7cd2b516c7d9aee780ece81b07ff8244b"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f3d7a87a78d46a2e3d5b72587ac14b4c16952dd0887dbb051451eceac774411e"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:852863707010316c973162e703bddabec35e8757e67fcb8ad58829de1ebc8590"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:131a085a53bfe839a477c0845acf21efc77457ba2bcf5899618136d64f3303a2"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:078a8aefd263f4d4f923a9677b942b445a2be970ca24548a8102689a3a8ab8da"}, - {file = "yarl-1.22.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bca03b91c323036913993ff5c738d0842fc9c60c4648e5c8d98331526df89784"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:68986a61557d37bb90d3051a45b91fa3d5c516d177dfc6dd6f2f436a07ff2b6b"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4792b262d585ff0dff6bcb787f8492e40698443ec982a3568c2096433660c694"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ebd4549b108d732dba1d4ace67614b9545b21ece30937a63a65dd34efa19732d"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f87ac53513d22240c7d59203f25cc3beac1e574c6cd681bbfd321987b69f95fd"}, - {file = "yarl-1.22.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:22b029f2881599e2f1b06f8f1db2ee63bd309e2293ba2d566e008ba12778b8da"}, - {file = "yarl-1.22.0-cp314-cp314-win32.whl", hash = "sha256:6a635ea45ba4ea8238463b4f7d0e721bad669f80878b7bfd1f89266e2ae63da2"}, - {file = "yarl-1.22.0-cp314-cp314-win_amd64.whl", hash = "sha256:0d6e6885777af0f110b0e5d7e5dda8b704efed3894da26220b7f3d887b839a79"}, - {file = "yarl-1.22.0-cp314-cp314-win_arm64.whl", hash = "sha256:8218f4e98d3c10d683584cb40f0424f4b9fd6e95610232dd75e13743b070ee33"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:45c2842ff0e0d1b35a6bf1cd6c690939dacb617a70827f715232b2e0494d55d1"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:d947071e6ebcf2e2bee8fce76e10faca8f7a14808ca36a910263acaacef08eca"}, - {file = "yarl-1.22.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:334b8721303e61b00019474cc103bdac3d7b1f65e91f0bfedeec2d56dfe74b53"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e7ce67c34138a058fd092f67d07a72b8e31ff0c9236e751957465a24b28910c"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d77e1b2c6d04711478cb1c4ab90db07f1609ccf06a287d5607fcd90dc9863acf"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4647674b6150d2cae088fc07de2738a84b8bcedebef29802cf0b0a82ab6face"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efb07073be061c8f79d03d04139a80ba33cbd390ca8f0297aae9cce6411e4c6b"}, - {file = "yarl-1.22.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e51ac5435758ba97ad69617e13233da53908beccc6cfcd6c34bbed8dcbede486"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:33e32a0dd0c8205efa8e83d04fc9f19313772b78522d1bdc7d9aed706bfd6138"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:bf4a21e58b9cde0e401e683ebd00f6ed30a06d14e93f7c8fd059f8b6e8f87b6a"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e4b582bab49ac33c8deb97e058cd67c2c50dac0dd134874106d9c774fd272529"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0b5bcc1a9c4839e7e30b7b30dd47fe5e7e44fb7054ec29b5bb8d526aa1041093"}, - {file = "yarl-1.22.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c0232bce2170103ec23c454e54a57008a9a72b5d1c3105dc2496750da8cfa47c"}, - {file = "yarl-1.22.0-cp314-cp314t-win32.whl", hash = "sha256:8009b3173bcd637be650922ac455946197d858b3630b6d8787aa9e5c4564533e"}, - {file = "yarl-1.22.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9fb17ea16e972c63d25d4a97f016d235c78dd2344820eb35bc034bc32012ee27"}, - {file = "yarl-1.22.0-cp314-cp314t-win_arm64.whl", hash = "sha256:9f6d73c1436b934e3f01df1e1b21ff765cd1d28c77dfb9ace207f746d4610ee1"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3aa27acb6de7a23785d81557577491f6c38a5209a254d1191519d07d8fe51748"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:af74f05666a5e531289cb1cc9c883d1de2088b8e5b4de48004e5ca8a830ac859"}, - {file = "yarl-1.22.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:62441e55958977b8167b2709c164c91a6363e25da322d87ae6dd9c6019ceecf9"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b580e71cac3f8113d3135888770903eaf2f507e9421e5697d6ee6d8cd1c7f054"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e81fda2fb4a07eda1a2252b216aa0df23ebcd4d584894e9612e80999a78fd95b"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:99b6fc1d55782461b78221e95fc357b47ad98b041e8e20f47c1411d0aacddc60"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:088e4e08f033db4be2ccd1f34cf29fe994772fb54cfe004bbf54db320af56890"}, - {file = "yarl-1.22.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e4e1f6f0b4da23e61188676e3ed027ef0baa833a2e633c29ff8530800edccba"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:84fc3ec96fce86ce5aa305eb4aa9358279d1aa644b71fab7b8ed33fe3ba1a7ca"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5dbeefd6ca588b33576a01b0ad58aa934bc1b41ef89dee505bf2932b22ddffba"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:14291620375b1060613f4aab9ebf21850058b6b1b438f386cc814813d901c60b"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:a4fcfc8eb2c34148c118dfa02e6427ca278bfd0f3df7c5f99e33d2c0e81eae3e"}, - {file = "yarl-1.22.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:029866bde8d7b0878b9c160e72305bbf0a7342bcd20b9999381704ae03308dc8"}, - {file = "yarl-1.22.0-cp39-cp39-win32.whl", hash = "sha256:4dcc74149ccc8bba31ce1944acee24813e93cfdee2acda3c172df844948ddf7b"}, - {file = "yarl-1.22.0-cp39-cp39-win_amd64.whl", hash = "sha256:10619d9fdee46d20edc49d3479e2f8269d0779f1b031e6f7c2aa1c76be04b7ed"}, - {file = "yarl-1.22.0-cp39-cp39-win_arm64.whl", hash = "sha256:dd7afd3f8b0bfb4e0d9fc3c31bfe8a4ec7debe124cfd90619305def3c8ca8cd2"}, - {file = "yarl-1.22.0-py3-none-any.whl", hash = "sha256:1380560bdba02b6b6c90de54133c81c9f2a453dee9912fe58c1dcced1edb7cff"}, - {file = "yarl-1.22.0.tar.gz", hash = "sha256:bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f1f6670b9ae3daedb325fa55fbe31c22c8228f6e0b513772c2e1c623caa6ab22"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85a231fa250dfa3308f3c7896cc007a47bc76e9e8e8595c20b7426cac4884c62"}, + {file = "yarl-1.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a06701b647c9939d7019acdfa7ebbfbb78ba6aa05985bb195ad716ea759a569"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7595498d085becc8fb9203aa314b136ab0516c7abd97e7d74f7bb4eb95042abe"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af5607159085dcdb055d5678fc2d34949bd75ae6ea6b4381e784bbab1c3aa195"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:95b50910e496567434cb77a577493c26bce0f31c8a305135f3bda6a2483b8e10"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b594113a301ad537766b4e16a5a6750fcbb1497dcc1bc8a4daae889e6402a634"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:083ce0393ea173cd37834eb84df15b6853b555d20c52703e21fbababa8c129d2"}, + {file = "yarl-1.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f1a350a652bbbe12f666109fbddfdf049b3ff43696d18c9ab1531fbba1c977a"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fb0caeac4a164aadce342f1597297ec0ce261ec4532bbc5a9ca8da5622f53867"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d88cc43e923f324203f6ec14434fa33b85c06d18d59c167a0637164863b8e995"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e52d6ed9ea8fd3abf4031325dc714aed5afcbfa19ee4a89898d663c9976eb487"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ce360ae48a5e9961d0c730cf891d40698a82804e85f6e74658fb175207a77cb2"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:06d06c9d5b5bc3eb56542ceeba6658d31f54cf401e8468512447834856fb0e61"}, + {file = "yarl-1.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c27d98f4e5c4060582f44e58309c1e55134880558f1add7a87c1bc36ecfade19"}, + {file = "yarl-1.20.0-cp310-cp310-win32.whl", hash = "sha256:f4d3fa9b9f013f7050326e165c3279e22850d02ae544ace285674cb6174b5d6d"}, + {file = "yarl-1.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:bc906b636239631d42eb8a07df8359905da02704a868983265603887ed68c076"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fdb5204d17cb32b2de2d1e21c7461cabfacf17f3645e4b9039f210c5d3378bf3"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:eaddd7804d8e77d67c28d154ae5fab203163bd0998769569861258e525039d2a"}, + {file = "yarl-1.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:634b7ba6b4a85cf67e9df7c13a7fb2e44fa37b5d34501038d174a63eaac25ee2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d409e321e4addf7d97ee84162538c7258e53792eb7c6defd0c33647d754172e"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ea52f7328a36960ba3231c6677380fa67811b414798a6e071c7085c57b6d20a9"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8703517b924463994c344dcdf99a2d5ce9eca2b6882bb640aa555fb5efc706a"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:077989b09ffd2f48fb2d8f6a86c5fef02f63ffe6b1dd4824c76de7bb01e4f2e2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0acfaf1da020253f3533526e8b7dd212838fdc4109959a2c53cafc6db611bff2"}, + {file = "yarl-1.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b4230ac0b97ec5eeb91d96b324d66060a43fd0d2a9b603e3327ed65f084e41f8"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a6a1e6ae21cdd84011c24c78d7a126425148b24d437b5702328e4ba640a8902"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:86de313371ec04dd2531f30bc41a5a1a96f25a02823558ee0f2af0beaa7ca791"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dd59c9dd58ae16eaa0f48c3d0cbe6be8ab4dc7247c3ff7db678edecbaf59327f"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a0bc5e05f457b7c1994cc29e83b58f540b76234ba6b9648a4971ddc7f6aa52da"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c9471ca18e6aeb0e03276b5e9b27b14a54c052d370a9c0c04a68cefbd1455eb4"}, + {file = "yarl-1.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40ed574b4df723583a26c04b298b283ff171bcc387bc34c2683235e2487a65a5"}, + {file = "yarl-1.20.0-cp311-cp311-win32.whl", hash = "sha256:db243357c6c2bf3cd7e17080034ade668d54ce304d820c2a58514a4e51d0cfd6"}, + {file = "yarl-1.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:8c12cd754d9dbd14204c328915e23b0c361b88f3cffd124129955e60a4fbfcfb"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e06b9f6cdd772f9b665e5ba8161968e11e403774114420737f7884b5bd7bdf6f"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b9ae2fbe54d859b3ade40290f60fe40e7f969d83d482e84d2c31b9bff03e359e"}, + {file = "yarl-1.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d12b8945250d80c67688602c891237994d203d42427cb14e36d1a732eda480e"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:087e9731884621b162a3e06dc0d2d626e1542a617f65ba7cc7aeab279d55ad33"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:69df35468b66c1a6e6556248e6443ef0ec5f11a7a4428cf1f6281f1879220f58"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b2992fe29002fd0d4cbaea9428b09af9b8686a9024c840b8a2b8f4ea4abc16f"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4c903e0b42aab48abfbac668b5a9d7b6938e721a6341751331bcd7553de2dcae"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf099e2432131093cc611623e0b0bcc399b8cddd9a91eded8bfb50402ec35018"}, + {file = "yarl-1.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a7f62f5dc70a6c763bec9ebf922be52aa22863d9496a9a30124d65b489ea672"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:54ac15a8b60382b2bcefd9a289ee26dc0920cf59b05368c9b2b72450751c6eb8"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:25b3bc0763a7aca16a0f1b5e8ef0f23829df11fb539a1b70476dcab28bd83da7"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b2586e36dc070fc8fad6270f93242124df68b379c3a251af534030a4a33ef594"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:866349da9d8c5290cfefb7fcc47721e94de3f315433613e01b435473be63daa6"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:33bb660b390a0554d41f8ebec5cd4475502d84104b27e9b42f5321c5192bfcd1"}, + {file = "yarl-1.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737e9f171e5a07031cbee5e9180f6ce21a6c599b9d4b2c24d35df20a52fabf4b"}, + {file = "yarl-1.20.0-cp312-cp312-win32.whl", hash = "sha256:839de4c574169b6598d47ad61534e6981979ca2c820ccb77bf70f4311dd2cc64"}, + {file = "yarl-1.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:3d7dbbe44b443b0c4aa0971cb07dcb2c2060e4a9bf8d1301140a33a93c98e18c"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2137810a20b933b1b1b7e5cf06a64c3ed3b4747b0e5d79c9447c00db0e2f752f"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:447c5eadd750db8389804030d15f43d30435ed47af1313303ed82a62388176d3"}, + {file = "yarl-1.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42fbe577272c203528d402eec8bf4b2d14fd49ecfec92272334270b850e9cd7d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18e321617de4ab170226cd15006a565d0fa0d908f11f724a2c9142d6b2812ab0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4345f58719825bba29895011e8e3b545e6e00257abb984f9f27fe923afca2501"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d9b980d7234614bc4674468ab173ed77d678349c860c3af83b1fffb6a837ddc"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af4baa8a445977831cbaa91a9a84cc09debb10bc8391f128da2f7bd070fc351d"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:123393db7420e71d6ce40d24885a9e65eb1edefc7a5228db2d62bcab3386a5c0"}, + {file = "yarl-1.20.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab47acc9332f3de1b39e9b702d9c916af7f02656b2a86a474d9db4e53ef8fd7a"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4a34c52ed158f89876cba9c600b2c964dfc1ca52ba7b3ab6deb722d1d8be6df2"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:04d8cfb12714158abf2618f792c77bc5c3d8c5f37353e79509608be4f18705c9"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7dc63ad0d541c38b6ae2255aaa794434293964677d5c1ec5d0116b0e308031f5"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d02b591a64e4e6ca18c5e3d925f11b559c763b950184a64cf47d74d7e41877"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:95fc9876f917cac7f757df80a5dda9de59d423568460fe75d128c813b9af558e"}, + {file = "yarl-1.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb769ae5760cd1c6a712135ee7915f9d43f11d9ef769cb3f75a23e398a92d384"}, + {file = "yarl-1.20.0-cp313-cp313-win32.whl", hash = "sha256:70e0c580a0292c7414a1cead1e076c9786f685c1fc4757573d2967689b370e62"}, + {file = "yarl-1.20.0-cp313-cp313-win_amd64.whl", hash = "sha256:4c43030e4b0af775a85be1fa0433119b1565673266a70bf87ef68a9d5ba3174c"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b6c4c3d0d6a0ae9b281e492b1465c72de433b782e6b5001c8e7249e085b69051"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8681700f4e4df891eafa4f69a439a6e7d480d64e52bf460918f58e443bd3da7d"}, + {file = "yarl-1.20.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:84aeb556cb06c00652dbf87c17838eb6d92cfd317799a8092cee0e570ee11229"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f166eafa78810ddb383e930d62e623d288fb04ec566d1b4790099ae0f31485f1"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5d3d6d14754aefc7a458261027a562f024d4f6b8a798adb472277f675857b1eb"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a8f64df8ed5d04c51260dbae3cc82e5649834eebea9eadfd829837b8093eb00"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4d9949eaf05b4d30e93e4034a7790634bbb41b8be2d07edd26754f2e38e491de"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c366b254082d21cc4f08f522ac201d0d83a8b8447ab562732931d31d80eb2a5"}, + {file = "yarl-1.20.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91bc450c80a2e9685b10e34e41aef3d44ddf99b3a498717938926d05ca493f6a"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c2aa4387de4bc3a5fe158080757748d16567119bef215bec643716b4fbf53f9"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:d2cbca6760a541189cf87ee54ff891e1d9ea6406079c66341008f7ef6ab61145"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:798a5074e656f06b9fad1a162be5a32da45237ce19d07884d0b67a0aa9d5fdda"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f106e75c454288472dbe615accef8248c686958c2e7dd3b8d8ee2669770d020f"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:3b60a86551669c23dc5445010534d2c5d8a4e012163218fc9114e857c0586fdd"}, + {file = "yarl-1.20.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:3e429857e341d5e8e15806118e0294f8073ba9c4580637e59ab7b238afca836f"}, + {file = "yarl-1.20.0-cp313-cp313t-win32.whl", hash = "sha256:65a4053580fe88a63e8e4056b427224cd01edfb5f951498bfefca4052f0ce0ac"}, + {file = "yarl-1.20.0-cp313-cp313t-win_amd64.whl", hash = "sha256:53b2da3a6ca0a541c1ae799c349788d480e5144cac47dba0266c7cb6c76151fe"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:119bca25e63a7725b0c9d20ac67ca6d98fa40e5a894bd5d4686010ff73397914"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:35d20fb919546995f1d8c9e41f485febd266f60e55383090010f272aca93edcc"}, + {file = "yarl-1.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:484e7a08f72683c0f160270566b4395ea5412b4359772b98659921411d32ad26"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d8a3d54a090e0fff5837cd3cc305dd8a07d3435a088ddb1f65e33b322f66a94"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f0cf05ae2d3d87a8c9022f3885ac6dea2b751aefd66a4f200e408a61ae9b7f0d"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a884b8974729e3899d9287df46f015ce53f7282d8d3340fa0ed57536b440621c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8d8aa8dd89ffb9a831fedbcb27d00ffd9f4842107d52dc9d57e64cb34073d5c"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4e88d6c3c8672f45a30867817e4537df1bbc6f882a91581faf1f6d9f0f1b5a"}, + {file = "yarl-1.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdb77efde644d6f1ad27be8a5d67c10b7f769804fff7a966ccb1da5a4de4b656"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4ba5e59f14bfe8d261a654278a0f6364feef64a794bd456a8c9e823071e5061c"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d0bf955b96ea44ad914bc792c26a0edcd71b4668b93cbcd60f5b0aeaaed06c64"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:27359776bc359ee6eaefe40cb19060238f31228799e43ebd3884e9c589e63b20"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:04d9c7a1dc0a26efb33e1acb56c8849bd57a693b85f44774356c92d610369efa"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:faa709b66ae0e24c8e5134033187a972d849d87ed0a12a0366bedcc6b5dc14a5"}, + {file = "yarl-1.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:44869ee8538208fe5d9342ed62c11cc6a7a1af1b3d0bb79bb795101b6e77f6e0"}, + {file = "yarl-1.20.0-cp39-cp39-win32.whl", hash = "sha256:b7fa0cb9fd27ffb1211cde944b41f5c67ab1c13a13ebafe470b1e206b8459da8"}, + {file = "yarl-1.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:d4fad6e5189c847820288286732075f213eabf81be4d08d6cc309912e62be5b7"}, + {file = "yarl-1.20.0-py3-none-any.whl", hash = "sha256:5d0fe6af927a47a230f31e6004621fd0959eaa915fc62acfafa67ff7229a3124"}, + {file = "yarl-1.20.0.tar.gz", hash = "sha256:686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307"}, ] [package.dependencies] @@ -3171,14 +2757,14 @@ propcache = ">=0.2.1" [[package]] name = "zipp" -version = "3.23.0" +version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, - {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, + {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, + {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, ] [package.extras] @@ -3186,10 +2772,10 @@ check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = "^3.11" -content-hash = "f2b3913ac70cfb499bdfaab2f11ad61438db4b24d6c8d757d4838f62ed9d6bb0" +python-versions = "^3.9" +content-hash = "5597e1e1ee8fcc77235ae5bcd70f0bbf7763f8a175a9b34f3a08889d7aa8850b" diff --git a/sdk/pyproject.toml b/sdk/pyproject.toml index 47db074d71..f0bb865db7 100644 --- a/sdk/pyproject.toml +++ b/sdk/pyproject.toml @@ -1,12 +1,9 @@ [tool.poetry] name = "agenta" -version = "0.62.0" +version = "0.48.0" description = "The SDK for agenta is an open-source LLMOps platform." readme = "README.md" -authors = [ - "Mahmoud Mabrouk <mahmoud@agenta.ai>", - "Juan Vega <jp@agenta.ai>" -] +authors = ["Mahmoud Mabrouk <mahmoud@agenta.ai>"] classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", @@ -23,38 +20,29 @@ exclude = [ ] [tool.poetry.dependencies] -python = "^3.11" -starlette = "^0.47.0" -fastapi = "^0.116.0" -pydantic = "^2" +python = "^3.9" +fastapi = ">=0.100.0" +pydantic = ">=2" python-dotenv = "^1.0.0" importlib-metadata = ">=8.0.0,<9.0" -httpx = "^0.28.0" +httpx = ">=0.28.0" pyyaml = "^6.0.2" toml = "^0.10.2" -litellm = "==1.78.7" +litellm = ">=1.68.0" jinja2 = "^3.1.6" -python-jsonpath = "^2.0.0" -opentelemetry-api = "^1.27.0" -opentelemetry-sdk = "^1.27.0" -opentelemetry-instrumentation = ">=0.56b0" -opentelemetry-exporter-otlp-proto-http ="^1.27.0" +opentelemetry-api = ">=1.27.0,<2.0.0" +opentelemetry-sdk = ">=1.27.0,<2.0.0" +opentelemetry-exporter-otlp-proto-http =">=1.27.0,<2.0.0" structlog = "^25.2.0" huggingface-hub = "<0.31.0" -restrictedpython = { version = "^8.0", python = ">=3.11,<3.14" } # audit fixes -h11 = "^0.16.0" -decorator = "^5.2.1" -openai = ">=1.106.0" -tiktoken = "0.11.0" -google-auth = ">=2.23,<3" - +h11 = ">=0.16.0" [tool.poetry.group.dev.dependencies] posthog = "^3.1.0" questionary = ">=1.10,<3.0" -pytest = "^8.4.2" +pytest = "^8.3" setuptools = ">=71.1,<79.0" pytest-asyncio = "^0.24.0" mypy = "^1.13.0" @@ -62,7 +50,7 @@ pytest-xdist = "^3.6.1" uvicorn = "^0.34.0" requests = "^2.32.3" pexpect = "^4.9.0" -boto3 = "^1.40.25" +boto3 = "^1.35.87" [build-system] requires = ["poetry-core"] diff --git a/sdk/pytest.ini b/sdk/pytest.ini deleted file mode 100644 index 69ca41b535..0000000000 --- a/sdk/pytest.ini +++ /dev/null @@ -1,25 +0,0 @@ -[pytest] -testpaths = - tests/pytest -addopts = -ras -asyncio_mode = auto -markers = - coverage_smoke: breadth over depth - coverage_full: breadth and depth - lens_functional: it works - lens_performance: it works fast - lens_security: it works securely - plan_hobby: organization as hobby - plan_pro: organization as pro - plan_business: organization as business - plan_enterprise: organization as enterprise - role_owner: user as owner - role_admin: user as admin - role_editor: user as editor - role_viewer: user as viewer - path_happy: desired behavior - path_grumpy: undesired behavior - case_typical: likely behavior - case_edge: unlikely behavior - speed_fast: ~ milliseconds - speed_slow: ~ seconds \ No newline at end of file diff --git a/sdk/run-tests.py b/sdk/run-tests.py deleted file mode 100644 index f9899bfd52..0000000000 --- a/sdk/run-tests.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env python3 -from typing import Optional -import os -import subprocess -import click - -from dotenv import load_dotenv - - -TYPES = { - "license": ["ee", "oss"], - "coverage": ["smoke"], - "lens": ["functional", "performance", "security"], - "plan": ["hobby", "pro", "business", "enterprise"], - "role": ["owner", "admin", "editor", "viewer"], - "path": ["happy", "grumpy"], - "case": ["typical", "edge"], - "speed": ["fast", "slow"], -} - - -@click.command() -@click.option( - "--env-file", - type=click.Path(exists=True, dir_okay=False), - help="Path to a .env.* file with AGENTA_API_URL and AGENTA_AUTH_KEY", -) -@click.option( - "--api-url", - type=str, - help="API URL for Agenta", - envvar="AGENTA_API_URL", -) -@click.option( - "--auth-key", - type=str, - help="Access token for Agenta", - envvar="AGENTA_AUTH_KEY", -) -@click.option( - "--license", - default="oss", - type=click.Choice(TYPES["license"]), - help="License [oss|ee]", - show_default=True, -) -@click.option( - "--coverage", - type=click.Choice(TYPES["coverage"]), - help="Coverage [smoke]", - show_default=True, -) -@click.option( - "--lens", - type=click.Choice(TYPES["lens"]), - help="Lens [functional|performance|security]", - show_default=True, -) -@click.option( - "--plan", - type=click.Choice(TYPES["plan"]), - help="Plan [hobby|pro|business|enterprise]", -) -@click.option( - "--role", - type=click.Choice(TYPES["role"]), - help="Role [owner|admin|editor|viewer]", -) -@click.option( - "--path", - type=click.Choice(TYPES["path"]), - help="Path [happy|grumpy]", -) -@click.option( - "--case", - type=click.Choice(TYPES["case"]), - help="Case [typical|edge]", -) -@click.option( - "--speed", - type=click.Choice(TYPES["speed"]), - help="Speed [fast|slow]", -) -@click.option( - "--scope", - help="Scope [...]", -) -@click.argument( - "pytest_args", - nargs=-1, - type=click.UNPROCESSED, -) -def run_tests( - license: str, # pylint: disable=redefined-builtin - env_file: Optional[str] = None, - api_url: Optional[str] = None, - auth_key: Optional[str] = None, - coverage: Optional[str] = None, - lens: Optional[str] = None, - plan: Optional[str] = None, - role: Optional[str] = None, - path: Optional[str] = None, - case: Optional[str] = None, - speed: Optional[str] = None, - scope: Optional[str] = None, - pytest_args: Optional[tuple] = None, -): - """ - Run pytest with dynamic markers and environment configuration. - - Additional args after '--' are passed directly to pytest. - """ - marker_args = [] - - if env_file: - load_dotenv(env_file) - - # ---------------------------------------------------------------------- - # THIS IS NEEDED BECAUSE OTHERWISE THE SDK THINKS - # IT IS RUNNING IN THE SAME (BRIDGE) NETWORK AS THE API - os.environ["DOCKER_NETWORK_MODE"] = "host" - # ---------------------------------------------------------------------- - - click.echo(f"Loaded environment variables from {env_file}") - _license = os.getenv("AGENTA_LICENSE") - if _license in TYPES["license"]: - license = _license - if not api_url: - api_url = os.getenv("AGENTA_API_URL") - if not auth_key: - auth_key = os.getenv("AGENTA_AUTH_KEY") - - # Set API_URL and AUTH_KEY as env vars for tests - if api_url: - os.environ["AGENTA_API_URL"] = api_url - click.echo(f"AGENTA_API_URL={api_url}") - if auth_key: - os.environ["AGENTA_AUTH_KEY"] = auth_key - L = len(auth_key) - message = f"AGENTA_AUTH_KEY={auth_key[:2]}" + "." * (L - 4) + f"{auth_key[-2:]}" - click.echo(message) - - # Set optional dimensions - for name, value in [ - ("COVERAGE", coverage), - ("LENS", lens), - ("PLAN", plan), - ("ROLE", role), - ("PATH", path), - ("CASE", case), - ("SPEED", speed), - ("SCOPE", scope), - ]: - if value: - os.environ[name] = value - click.echo(f"{name}={value}") - marker_args.append(f"{name.lower()}_{value}") - - test_dirs = ["tests/pytest"] - - cmd = ["pytest"] + test_dirs - - if marker_args: - marker_expr = " and ".join(marker_args) - cmd += ["-m", marker_expr] - if pytest_args: - cmd += list(pytest_args) - - click.echo(f"Executing: {' '.join(cmd)}") - - subprocess.run(cmd, check=True) - - -if __name__ == "__main__": - run_tests() diff --git a/sdk/tests/legacy/annotations/Readme.md b/sdk/tests/annotations/Readme.md similarity index 100% rename from sdk/tests/legacy/annotations/Readme.md rename to sdk/tests/annotations/Readme.md diff --git a/sdk/tests/legacy/annotations/agenta_instrumented.py b/sdk/tests/annotations/agenta_instrumented.py similarity index 98% rename from sdk/tests/legacy/annotations/agenta_instrumented.py rename to sdk/tests/annotations/agenta_instrumented.py index 52d3e331e9..918e6496ef 100644 --- a/sdk/tests/legacy/annotations/agenta_instrumented.py +++ b/sdk/tests/annotations/agenta_instrumented.py @@ -2,7 +2,7 @@ from typing import List, Dict import litellm from agenta.sdk.litellm import mockllm -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context # Set up mockllm to use litellm mockllm.litellm = litellm @@ -99,7 +99,7 @@ def search_docs( async def llm(query: str, results: List[Dict]): # Set the mock in the routing context to use the 'hello' mock # You can replace 'hello' with any mock defined in the MOCKS dictionary - ctx = RoutingContext.get() + ctx = routing_context.get() ctx.mock = "hello" config = Config() diff --git a/sdk/tests/legacy/annotations/openai_instrumented.py b/sdk/tests/annotations/openai_instrumented.py similarity index 100% rename from sdk/tests/legacy/annotations/openai_instrumented.py rename to sdk/tests/annotations/openai_instrumented.py diff --git a/sdk/tests/legacy/annotations/requirements.txt b/sdk/tests/annotations/requirements.txt similarity index 100% rename from sdk/tests/legacy/annotations/requirements.txt rename to sdk/tests/annotations/requirements.txt diff --git a/sdk/tests/legacy/baggage/_main.py b/sdk/tests/baggage/_main.py similarity index 100% rename from sdk/tests/legacy/baggage/_main.py rename to sdk/tests/baggage/_main.py diff --git a/sdk/tests/legacy/baggage/app.py b/sdk/tests/baggage/app.py similarity index 100% rename from sdk/tests/legacy/baggage/app.py rename to sdk/tests/baggage/app.py diff --git a/sdk/tests/baggage/config.toml b/sdk/tests/baggage/config.toml new file mode 100644 index 0000000000..f32346649b --- /dev/null +++ b/sdk/tests/baggage/config.toml @@ -0,0 +1,4 @@ +app_name = "baggage" +app_id = "0193b67a-b673-7919-85c2-0b5b0a2183d3" +backend_host = "http://localhost" +api_key = "XELnjVve.c1f177c87250b603cf1ed2a69ebdfc1cec3124776058e7afcbba93890c515e74" diff --git a/sdk/tests/legacy/conftest.py b/sdk/tests/conftest.py similarity index 100% rename from sdk/tests/legacy/conftest.py rename to sdk/tests/conftest.py diff --git a/sdk/tests/legacy/custom_workflows/Readme.md b/sdk/tests/custom_workflows/Readme.md similarity index 100% rename from sdk/tests/legacy/custom_workflows/Readme.md rename to sdk/tests/custom_workflows/Readme.md diff --git a/sdk/tests/legacy/custom_workflows/chat_custom.py b/sdk/tests/custom_workflows/chat_custom.py similarity index 97% rename from sdk/tests/legacy/custom_workflows/chat_custom.py rename to sdk/tests/custom_workflows/chat_custom.py index 45ae1c1089..dc4505bb0a 100644 --- a/sdk/tests/legacy/custom_workflows/chat_custom.py +++ b/sdk/tests/custom_workflows/chat_custom.py @@ -2,7 +2,7 @@ from typing import List, Dict import litellm from agenta.sdk.litellm import mockllm -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context # Set up mockllm to use litellm mockllm.litellm = litellm @@ -95,7 +95,7 @@ def search_docs( async def llm(query: str, results: List[Dict]): # Set the mock in the routing context to use the 'hello' mock # You can replace 'hello' with any mock defined in the MOCKS dictionary - ctx = RoutingContext.get() + ctx = routing_context.get() ctx.mock = "hello" config = ag.ConfigManager.get_from_route(Config) diff --git a/sdk/tests/legacy/custom_workflows/completion_custom.py b/sdk/tests/custom_workflows/completion_custom.py similarity index 97% rename from sdk/tests/legacy/custom_workflows/completion_custom.py rename to sdk/tests/custom_workflows/completion_custom.py index efeefbbca1..954fc38a3f 100644 --- a/sdk/tests/legacy/custom_workflows/completion_custom.py +++ b/sdk/tests/custom_workflows/completion_custom.py @@ -2,7 +2,7 @@ from typing import List, Dict import litellm from agenta.sdk.litellm import mockllm -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context # Set up mockllm to use litellm mockllm.litellm = litellm @@ -95,7 +95,7 @@ def search_docs( async def llm(query: str, results: List[Dict]): # Set the mock in the routing context to use the 'hello' mock # You can replace 'hello' with any mock defined in the MOCKS dictionary - ctx = RoutingContext.get() + ctx = routing_context.get() ctx.mock = "hello" config = ag.ConfigManager.get_from_route(Config) diff --git a/sdk/tests/legacy/custom_workflows/exception_workflow.py b/sdk/tests/custom_workflows/exception_workflow.py similarity index 97% rename from sdk/tests/legacy/custom_workflows/exception_workflow.py rename to sdk/tests/custom_workflows/exception_workflow.py index 78c876afc1..ebe9c0aa65 100644 --- a/sdk/tests/legacy/custom_workflows/exception_workflow.py +++ b/sdk/tests/custom_workflows/exception_workflow.py @@ -2,7 +2,7 @@ from typing import List, Dict import litellm from agenta.sdk.litellm import mockllm -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context # Set up mockllm to use litellm mockllm.litellm = litellm @@ -93,7 +93,7 @@ def search_docs( async def llm(query: str, results: List[Dict]): # Set the mock in the routing context to use the 'hello' mock # You can replace 'hello' with any mock defined in the MOCKS dictionary - ctx = RoutingContext.get() + ctx = routing_context.get() ctx.mock = "hello" config = ag.ConfigManager.get_from_route(Config) diff --git a/sdk/tests/legacy/custom_workflows/noinstrument_custom.py b/sdk/tests/custom_workflows/noinstrument_custom.py similarity index 97% rename from sdk/tests/legacy/custom_workflows/noinstrument_custom.py rename to sdk/tests/custom_workflows/noinstrument_custom.py index ffdeeb3a6c..1c693e0f3e 100644 --- a/sdk/tests/legacy/custom_workflows/noinstrument_custom.py +++ b/sdk/tests/custom_workflows/noinstrument_custom.py @@ -2,7 +2,7 @@ from typing import List, Dict import litellm from agenta.sdk.litellm import mockllm -from agenta.sdk.contexts.routing import RoutingContext +from agenta.sdk.context.routing import routing_context # Set up mockllm to use litellm mockllm.litellm = litellm @@ -93,7 +93,7 @@ def search_docs( async def llm(query: str, results: List[Dict]): # Set the mock in the routing context to use the 'hello' mock # You can replace 'hello' with any mock defined in the MOCKS dictionary - ctx = RoutingContext.get() + ctx = routing_context.get() ctx.mock = "hello" config = ag.ConfigManager.get_from_route(Config) diff --git a/sdk/tests/legacy/custom_workflows/requirements.txt b/sdk/tests/custom_workflows/requirements.txt similarity index 100% rename from sdk/tests/legacy/custom_workflows/requirements.txt rename to sdk/tests/custom_workflows/requirements.txt diff --git a/sdk/tests/legacy/debugging/simple-app/_app.py b/sdk/tests/debugging/simple-app/_app.py similarity index 100% rename from sdk/tests/legacy/debugging/simple-app/_app.py rename to sdk/tests/debugging/simple-app/_app.py diff --git a/sdk/tests/debugging/simple-app/config.toml b/sdk/tests/debugging/simple-app/config.toml new file mode 100644 index 0000000000..389b22a2bf --- /dev/null +++ b/sdk/tests/debugging/simple-app/config.toml @@ -0,0 +1,6 @@ +app_name = "asdf" +app_id = "0193bbaa-4f2b-7510-9170-9bdf95249ca0" +backend_host = "https://cloud.agenta.ai" +api_key = "dWdKluoL.fc56608c5e0ce7b262e9e9a795b6a5e9371200c573cafbd975ebb6b4368b6032" +variants = [] +variant_ids = [] diff --git a/sdk/tests/legacy/debugging/simple-app/main.py b/sdk/tests/debugging/simple-app/main.py similarity index 100% rename from sdk/tests/legacy/debugging/simple-app/main.py rename to sdk/tests/debugging/simple-app/main.py diff --git a/sdk/tests/legacy/baggage/config.toml b/sdk/tests/legacy/baggage/config.toml deleted file mode 100644 index ff48c26621..0000000000 --- a/sdk/tests/legacy/baggage/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -app_name = "baggage" -app_id = "0193b67a-b673-7919-85c2-0b5b0a2183d3" -backend_host = "http://localhost" -api_key = "..." diff --git a/sdk/tests/legacy/debugging/simple-app/config.toml b/sdk/tests/legacy/debugging/simple-app/config.toml deleted file mode 100644 index 4fe4679ba2..0000000000 --- a/sdk/tests/legacy/debugging/simple-app/config.toml +++ /dev/null @@ -1,6 +0,0 @@ -app_name = "asdf" -app_id = "0193bbaa-4f2b-7510-9170-9bdf95249ca0" -backend_host = "https://cloud.agenta.ai" -api_key = "..." -variants = [] -variant_ids = [] diff --git a/sdk/tests/legacy/management/config/__init__.py b/sdk/tests/legacy/management/config/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/management/conftest.py b/sdk/tests/legacy/management/conftest.py deleted file mode 100644 index 295627dbb6..0000000000 --- a/sdk/tests/legacy/management/conftest.py +++ /dev/null @@ -1,126 +0,0 @@ -import os -import uuid -import asyncio - -import httpx -import pytest -import pytest_asyncio -from pytest_asyncio import is_async_test - -from tests.legacy.conftest import get_admin_user_credentials, API_BASE_URL - - -OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", None) - - -def pytest_collection_modifyitems(items): - """ - Mark all tests to run inside the same event loop. - - NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes - """ - - pytest_asyncio_tests = (item for item in items if is_async_test(item)) - session_scope_marker = pytest.mark.asyncio(loop_scope="session") - for async_test in pytest_asyncio_tests: - async_test.add_marker(session_scope_marker, append=False) - - -@pytest_asyncio.fixture(scope="session") -async def http_client(): - """ - Create an HTTP client for API testing. - """ - - programmatic_access = get_admin_user_credentials() - async with httpx.AsyncClient( - base_url=API_BASE_URL, - timeout=httpx.Timeout(timeout=6, read=None, write=5), - headers={ - "Authorization": f"{programmatic_access}", - "Content-Type": "application/json", - }, - ) as client: - yield client - - -@pytest_asyncio.fixture(scope="session") -async def fetch_templates(http_client): - """ - Fetch available templates. - """ - - response = await http_client.get("containers/templates/") - return response.json() - - -@pytest_asyncio.fixture(scope="session") -async def fetch_completion_template(fetch_templates): - """ - Find the chat_openai template. - """ - - return next( - (temp for temp in fetch_templates if temp["image"]["name"] == "chat_openai"), - None, - ) - - -def get_random_name(): - return f"completion_{uuid.uuid4().hex[:8]}" - - -@pytest_asyncio.fixture(scope="session") -async def app_from_template_payload(fetch_completion_template): - """ - Prepare payload for creating an app from a template. - """ - - return { - "app_name": get_random_name(), - "env_vars": {"OPENAI_API_KEY": OPENAI_API_KEY}, - "template_id": fetch_completion_template.get("id", None), - } - - -@pytest_asyncio.fixture(scope="session") -async def get_completion_app_from_list(http_client): - """ - Retrieve the first available application. - """ - - list_app_response = await http_client.get("apps/") - list_app_response.raise_for_status() - - apps_response = list_app_response.json() - if not apps_response: - raise ValueError("No applications found") - - return apps_response[0] - - -@pytest_asyncio.fixture(scope="session") -async def create_app_from_template(app_from_template_payload, http_client): - # Create app - create_app_response = await http_client.post( - "apps/app_and_variant_from_template", json=app_from_template_payload - ) - create_app_response.raise_for_status() - - # Small delay to ensure app is ready - await asyncio.sleep(3) - - # Get response data - app_response = create_app_response.json() - try: - # Yield the app for tests to use - yield app_response - finally: - # Cleanup: Delete the app after all tests in the class are complete - try: - delete_response = await http_client.delete( - f"apps/{app_response.get('app_id', None)}" - ) - delete_response.raise_for_status() - except Exception as e: - print(f"Error during app cleanup: {e}") diff --git a/sdk/tests/legacy/management/deployment/__init__.py b/sdk/tests/legacy/management/deployment/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/management/variant/__init__.py b/sdk/tests/legacy/management/variant/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/__init__.py b/sdk/tests/legacy/new_tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/admin/__init__.py b/sdk/tests/legacy/new_tests/admin/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/apps/__init__.py b/sdk/tests/legacy/new_tests/apps/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/auth/__init__.py b/sdk/tests/legacy/new_tests/auth/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/conftest.py b/sdk/tests/legacy/new_tests/conftest.py deleted file mode 100644 index 7a3782a6bd..0000000000 --- a/sdk/tests/legacy/new_tests/conftest.py +++ /dev/null @@ -1,1144 +0,0 @@ -import os -import uuid -import logging -import json -from json import loads -from traceback import format_exc -from typing import Optional, Any - -import boto3 -import httpx -import pytest -import agenta as ag -import pytest_asyncio -from dotenv import load_dotenv -from httpx import AsyncClient, Timeout -from pytest_asyncio import is_async_test - - -AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") -API_BASE_URL = f"{AGENTA_HOST}/api/" - - -def pytest_addoption(parser): - """Register the --env-file option.""" - - parser.addoption( - "--env-file", action="store", default=".env", help="Path to the .env file" - ) - - -def pytest_configure(config): - """Load the environment variables from the specified .env file.""" - env_file = config.getoption("--env-file") - print(f"Loading environment variables from: {env_file}") - load_dotenv(dotenv_path=env_file) - - -@pytest.fixture -def sample_testset_endpoint_json(): - return f"{API_BASE_URL}testsets/sample" - - -# Set global variables -AGENTA_SECRET_KEY = os.getenv("_SECRET_KEY", "AGENTA_AUTH_KEY") -AGENTA_SECRET_ARN = os.getenv("AGENTA_AUTH_KEY_SECRET_ARN", None) -AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") -API_BASE_URL = f"{AGENTA_HOST}/api/" -API_KEYS_MAPPING = { - "OPENAI_API_KEY": "openai", - "MISTRAL_API_KEY": "mistralai", - "COHERE_API_KEY": "cohere", - "ANTHROPIC_API_KEY": "anthropic", - "ANYSCALE_API_KEY": "anyscale", - "PERPLEXITYAI_API_KEY": "perplexityai", - "DEEPINFRA_API_KEY": "deepinfra", - "TOGETHERAI_API_KEY": "togetherai", - "ALEPHALPHA_API_KEY": "alephalpha", - "OPENROUTER_API_KEY": "openrouter", - "GROQ_API_KEY": "groq", - "GEMINI_API_KEY": "gemini", -} - - -logger = logging.getLogger(__name__) -logger.setLevel(logging.DEBUG) - - -def pytest_collection_modifyitems(items): - """ - Mark all tests to run inside the same event loop. - - NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes - """ - - pytest_asyncio_tests = (item for item in items if is_async_test(item)) - session_scope_marker = pytest.mark.asyncio(loop_scope="class") - for async_test in pytest_asyncio_tests: - async_test.add_marker(session_scope_marker, append=False) - - -def fetch_secret() -> Optional[Any]: - try: - secret = os.getenv("AWS_SECRET_KEY") - return secret - - except: # pylint: disable=bare-except - logger.error("Failed to fetch secrets with: %s", format_exc()) - return None - - -async def ahttp_client(): - access_key = fetch_secret() - async with AsyncClient( - base_url=API_BASE_URL, - timeout=httpx.Timeout(timeout=6, read=None, write=5), - headers={"Authorization": f"Access {access_key}"}, - ) as client: - yield client - - -@pytest_asyncio.fixture(scope="class") -async def http_client(): - """ - Fixture to create an AsyncClient for API testing. - """ - - async with AsyncClient( - base_url=API_BASE_URL, - timeout=Timeout(timeout=6, read=None, write=5), - ) as client: - yield client - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_owner_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_owner_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": {f"{user_email}": {"name": {user_name}, "email": f"{user_email}"}}, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_paying_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": False, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_non_member_user(ahttp_client): - client = ahttp_client - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": False, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def create_programmatic_all_users(ahttp_client): - client = ahttp_client - users_data = {} - - roles = [ - "owner", - "editor", - "workspace_admin", - ] - for i in range(0, 3): - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}_{i}" - user_email = f"{user_name}@agenta.ai" - - users_data[user_email] = { - "user_name": user_name, - "user_email": user_email, - "organization": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - }, - "workspace": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": user_email}, - }, - "project": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": user_email}, - "organization_ref": {"slug": user_email}, - }, - "organization_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "organization_ref": {"slug": user_email}, - }, - "workspace_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "workspace_ref": {"slug": user_email}, - }, - "project_membership": { - "role": roles[i], - "is_demo": True, - "user_ref": {"slug": user_email}, - "project_ref": {"slug": user_email}, - }, - } - - json_payload = { - "users": { - email: {"name": data["user_name"], "email": data["user_email"]} - for email, data in users_data.items() - }, - "organizations": { - email: { - "name": data["organization"]["name"], - "description": data["organization"]["description"], - "is_paying": data["organization"]["is_paying"], - } - for email, data in users_data.items() - }, - "workspaces": { - email: { - "name": data["workspace"]["name"], - "description": data["workspace"]["description"], - "is_default": data["workspace"]["is_default"], - "organization_ref": data["workspace"]["organization_ref"], - } - for email, data in users_data.items() - }, - "projects": { - email: { - "name": data["project"]["name"], - "description": data["project"]["description"], - "is_default": data["project"]["is_default"], - "workspace_ref": data["project"]["workspace_ref"], - "organization_ref": data["project"]["organization_ref"], - } - for email, data in users_data.items() - }, - "organization_memberships": { - email: { - "role": data["organization_membership"]["role"], - "is_demo": data["organization_membership"]["is_demo"], - "user_ref": data["organization_membership"]["user_ref"], - "organization_ref": data["organization_membership"]["organization_ref"], - } - for email, data in users_data.items() - }, - "workspace_memberships": { - email: { - "role": data["workspace_membership"]["role"], - "is_demo": data["workspace_membership"]["is_demo"], - "user_ref": data["workspace_membership"]["user_ref"], - "workspace_ref": data["workspace_membership"]["workspace_ref"], - } - for email, data in users_data.items() - }, - "project_memberships": { - email: { - "role": data["project_membership"]["role"], - "is_demo": data["project_membership"]["is_demo"], - "user_ref": data["project_membership"]["user_ref"], - "project_ref": data["project_membership"]["project_ref"], - } - for email, data in users_data.items() - }, - } - - response = await client.post("admin/accounts", json=json_payload) - response.raise_for_status() - return { - email: response.json().get("projects", {}).get(email, {}).get(email, {}) - for email in users_data - } - - -async def get_user_profile(client: AsyncClient): - response = await client.get("profile") - - response.raise_for_status() - return response.json() - - -async def get_project(client: AsyncClient): - response = await client.get("projects") - - response.raise_for_status() - return response.json()[0] - - -def get_mock_response(): - mock_response = os.getenv("AUTH_IN_TESTS", "false").lower() == "false" - return mock_response - - -async def mocked_programmatic_user(): - mock_response = get_mock_response() - if mock_response: - profile_response = await get_user_profile(client=http_client) - project_response = await get_project(client=http_client) - return True, { - "project_id": project_response.get("project_id"), - "credentials": "ApiKey ", - "email": profile_response.get("email"), - "name": profile_response.get("name"), - } - - return False, {} - - -@pytest_asyncio.fixture(scope="class") -async def programmatic_user(): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data - - client = await ahttp_client().__anext__() - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -@pytest_asyncio.fixture(scope="class") -async def programmatic_non_member_user(): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data - - client = await ahttp_client().__anext__() - randomness = uuid.uuid4().hex[:8] - user_name = f"programmatic_test_user_{randomness}" - user_email = f"{user_name}@agenta.ai" - response = await client.post( - "admin/accounts", - json={ - "users": { - f"{user_email}": { - "name": user_name, - "email": f"{user_email}", - } - }, - "organizations": { - f"{user_email}": { - "name": f"{user_name}'s Organization", - "description": f"Organization belonging to {user_name}", - "is_paying": True, - } - }, - "workspaces": { - f"{user_email}": { - "name": f"{user_name}'s Workspace", - "description": f"Workspace belonging to {user_name}", - "is_default": True, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "projects": { - f"{user_email}": { - "name": f"{user_name}'s Project", - "description": f"Project belonging to {user_name}", - "is_default": True, - "workspace_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "organization_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "organization_ref": {"slug": f"{user_email}"}, - } - }, - "workspace_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "workspace_ref": {"slug": f"{user_email}"}, - } - }, - "project_memberships": { - f"{user_email}": { - "role": "owner", - "is_demo": True, - "user_ref": {"slug": f"{user_email}"}, - "project_ref": {"slug": f"{user_email}"}, - } - }, - }, - ) - response.raise_for_status() - return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) - - -async def create_app(client: AsyncClient, payload: dict, headers: dict): - response = await client.post( - "apps", - json=payload, - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data - - -async def create_variant( - client: AsyncClient, app_id: str, payload: dict, headers: dict -): - response = await client.post( - f"apps/{app_id}/variant/from-template", - json=payload, - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data - - -async def update_variant_parameters( - client: AsyncClient, variant_id: str, headers: dict -): - response = await client.put( - f"variants/{variant_id}/parameters", - json={ - "parameters": { - "prompt": { - "input_keys": ["country"], - "llm_config": { - "frequency_penalty": 0, - "model": "gpt-3.5-turbo", - "presence_penalty": 0, - "temperature": 0.2, - "top_p": 0.5, - }, - "messages": [ - { - "content": "You are an expert in geographyfc", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - } - }, - headers=headers, - ) - response.raise_for_status() - - -async def deploy_variant_to_environment( - client: AsyncClient, variant_id: str, environment_name: str, headers: dict -): - response = await client.post( - f"environments/deploy", - json={"environment_name": environment_name, "variant_id": variant_id}, - headers=headers, - ) - response.raise_for_status() - - -async def delete_application(client: AsyncClient, app_id: str, headers: dict): - response = await client.delete(url=f"apps/{app_id}", headers=headers) - response.raise_for_status() - - return response.status_code - - -@pytest_asyncio.fixture(scope="class") -async def create_app_and_variant( - http_client, programmatic_user, programmatic_non_member_user -): - app_payload = { - "app_name": f"app_{uuid.uuid4().hex[:8]}", - "template_key": "SERVICE:completion", - } - variant_payload = { - "variant_name": "app.key", - "key": "SERVICE:completion", - "base_name": "app", - "config_name": "key", - } - - user_scope_credentials = programmatic_user.get("credentials", None) - non_member_scope_credentials = programmatic_non_member_user.get("credentials", None) - headers = {"Authorization": user_scope_credentials} - - app_response = await create_app( - client=http_client, payload=app_payload, headers=headers - ) - variant_response = await create_variant( - client=http_client, - app_id=app_response.get("app_id", None), - payload=variant_payload, - headers=headers, - ) - await update_variant_parameters( - http_client, variant_response.get("variant_id"), headers - ) - await deploy_variant_to_environment( - http_client, - variant_response.get("variant_id"), - "production", - headers, - ) - yield { - "app": app_response, - "variant": variant_response, - "scope_project_id": programmatic_user.get("project", {}).get("id", ""), - "non_member_project_id": programmatic_non_member_user.get("project", {}).get( - "id", "" - ), - "credentials": user_scope_credentials, - "non_member_credentials": non_member_scope_credentials, - } - - await delete_application(http_client, app_response.get("app_id"), headers) - - -@pytest_asyncio.fixture(scope="class") -async def create_chat_app_and_variant(http_client, programmatic_user): - app_payload = { - "app_name": f"app_{uuid.uuid4().hex[:8]}", - "template_key": "SERVICE:completion", - } - variant_payload = { - "variant_name": "app.key", - "key": "SERVICE:completion", - "base_name": "app", - "config_name": "key", - } - - user_scope_credentials = programmatic_user.get("credentials", None) - headers = {"Authorization": user_scope_credentials} - - app_response = await create_app( - client=http_client, payload=app_payload, headers=headers - ) - variant_response = await create_variant( - client=http_client, - app_id=app_response.get("app_id", None), - payload=variant_payload, - headers=headers, - ) - yield { - "app": app_response, - "variant": variant_response, - "credentials": user_scope_credentials, - } - - await delete_application(http_client, app_response.get("app_id"), headers) - - -async def reset_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return mock_data.get("credentials", None), mock_data.get("project_id", None) - - response = await client.get("vault/v1/secrets/", headers=headers) - response.raise_for_status() - - response_data = response.json() - - for secret in response_data: - delete_response = await client.delete( - f"vault/v1/secrets/{secret.get('id', '')}" - ) - delete_response.raise_for_status() - - -async def set_valid_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return - - for api_key_name in list(API_KEYS_MAPPING.keys()): - response = await client.post( - "vault/v1/secrets/", - json={ - "header": {"name": API_KEYS_MAPPING[api_key_name], "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": API_KEYS_MAPPING[api_key_name], - "key": os.environ[api_key_name], - }, - }, - }, - headers=headers, - ) - response.raise_for_status() - - -async def set_invalid_llm_keys(client: AsyncClient, headers: dict): - is_mocked, mock_data = await mocked_programmatic_user() - if is_mocked: - return - - response = await client.get("vault/v1/secrets/", headers=headers) - response.raise_for_status() - - response_data = response.json() - - for secret in response_data: - provider_name = secret.get("secret", {}).get("data", {}).get("provider") - response = await client.put( - f"vault/v1/secrets/{secret.get('id', '')}", - json={ - "header": {"name": provider_name, "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": provider_name, - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - response.raise_for_status() - - -@pytest.fixture -def get_all_supported_models(): - supported_llm_models = { - "Mistral AI": [ - "mistral/mistral-tiny", - "mistral/mistral-small", - "mistral/mistral-medium", - "mistral/mistral-large-latest", - ], - "Open AI": [ - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo", - "gpt-4", - "gpt-4o", - "gpt-4o-mini", - "gpt-4-1106-preview", - ], - "Gemini": [ - "gemini/gemini-2.5-flash-preview-05-20", - "gemini/gemini-2.5-flash-preview-04-17", - "gemini/gemini-2.0-flash-001", - "gemini/gemini-2.5-pro-preview-05-06", - "gemini/gemini-2.0-flash-lite-preview-02-05", - "gemini/gemini-2.5-pro", - "gemini/gemini-2.5-flash", - "gemini/gemini-2.5-flash-preview-09-2025", - "gemini/gemini-2.5-flash-lite", - "gemini/gemini-2.5-flash-lite-preview-09-2025", - "gemini/gemini-2.0-flash", - "gemini/gemini-2.0-flash-lite", - ], - "Cohere": [ - "cohere/command-light", - "cohere/command-r-plus", - "cohere/command-nightly", - ], - "Anthropic": [ - "anthropic/claude-3-5-sonnet-20240620", - "anthropic/claude-3-opus-20240229", - "anthropic/claude-3-sonnet-20240229", - "anthropic/claude-3-haiku-20240307", - "anthropic/claude-2.1", - "anthropic/claude-2", - "anthropic/claude-instant-1.2", - "anthropic/claude-instant-1", - ], - "Perplexity AI": [ - "perplexity/llama-3.1-sonar-small-128k-online", - "perplexity/llama-3.1-sonar-large-128k-online", - "perplexity/llama-3.1-sonar-huge-128k-online", - ], - "DeepInfra": [ - "deepinfra/meta-llama/Llama-2-70b-chat-hf", - "deepinfra/meta-llama/Llama-2-13b-chat-hf", - "deepinfra/codellama/CodeLlama-34b-Instruct-hf", - "deepinfra/mistralai/Mistral-7B-Instruct-v0.1", - "deepinfra/jondurbin/airoboros-l2-70b-gpt4-1.4.1", - ], - "Together AI": [ - "together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo", - "together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", - ], - "OpenRouter": [ - "openrouter/openai/gpt-3.5-turbo", - "openrouter/openai/gpt-3.5-turbo-16k", - "openrouter/google/palm-2-chat-bison", - "openrouter/google/palm-2-codechat-bison", - "openrouter/meta-llama/llama-2-13b-chat", - ], - "Groq": [ - "groq/llama-3.1-8b-instant", - "groq/llama-3.1-70b-versatile", - "groq/llama3-8b-8192", - "groq/llama3-70b-8192", - "groq/mixtral-8x7b-32768", - ], - } - flattened_models = [ - model for models in supported_llm_models.values() for model in models - ] - return flattened_models - - -async def fetch_trace_by_trace_id(client: AsyncClient, headers: dict, project_id: str): - response = await client.get( - f"observability/v1/traces?project_id={project_id}", headers=headers - ) - response.raise_for_status() - - return response.json() - - -async def fetch_variant_revision(client: AsyncClient, headers: dict, variant_id: str): - response = await client.get( - f"variants/{variant_id}/revisions", - headers=headers, - ) - response.raise_for_status() - - response_data = response.json() - return response_data[-1] - - -async def fetch_app_environment_revisions( - client: AsyncClient, app_id: str, environment_name: str, headers: dict -): - response = await client.get( - f"apps/{app_id}/revisions/{environment_name}", - headers=headers, - ) - response.raise_for_status() - - return response.json() - - -@pytest.fixture -def valid_run_generate_payload(): - return { - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "max_tokens": 200, - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - } - - -@pytest.fixture -def invalid_run_generate_payload(): - return { - "ag_config": { - "prompt": { - "llm_configs": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "input": {"country": "France"}, - } - - -@pytest.fixture -def valid_parameters_payload(): - return { - "prompt": { - "messages": [ - {"role": "system", "content": "You are an expert in geographyfc"}, - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "input_keys": ["country"], - "llm_config": { - "model": "gpt-3.5-turbo", - "top_p": 0.5, - "temperature": 0.2, - "presence_penalty": 0, - "frequency_penalty": 0, - }, - "template_format": "fstring", - } - } - - -def exclude_lifecycle(data): - """ - Recursively exclude the 'lifecycle' field with its 'created_at' value. - """ - - if isinstance(data, dict): - # Check if the 'lifecycle' field is present and remove it - if "lifecycle" in data: - del data["lifecycle"] - # Recursively apply to all key-value pairs - return {k: exclude_lifecycle(v) for k, v in data.items()} - elif isinstance(data, list): - # Recursively apply to all list items - return [exclude_lifecycle(item) for item in data] - return data - - -def exact_match(obj1, obj2): - """ - Compares two JSON-like objects for exact match by normalizing their key order. - """ - - obj1_normalized = json.dumps(obj1, sort_keys=True) - obj2_normalized = json.dumps(obj2, sort_keys=True) - - return obj1_normalized == obj2_normalized - - -def initialize_agenta( - api_key: str, -): - ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key = None - ag.init(api_key=api_key) diff --git a/sdk/tests/legacy/new_tests/requirements.test.txt b/sdk/tests/legacy/new_tests/requirements.test.txt deleted file mode 100644 index 8dee73e0a9..0000000000 --- a/sdk/tests/legacy/new_tests/requirements.test.txt +++ /dev/null @@ -1,9 +0,0 @@ -pytest-asyncio==0.24.0 -pytest-xdist==3.6.1 -uvicorn==0.34.0 -requests>=2.32.4 -pexpect==4.9.0 -boto3==1.35.87 -httpx>=0.24,<0.28 -python-dotenv==1.0.0 -fastapi>=0.100.0 \ No newline at end of file diff --git a/sdk/tests/legacy/new_tests/sdk/__init__.py b/sdk/tests/legacy/new_tests/sdk/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/sdk/apps/__init__.py b/sdk/tests/legacy/new_tests/sdk/apps/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/sdk/apps/tests.py b/sdk/tests/legacy/new_tests/sdk/apps/tests.py deleted file mode 100644 index 3d379d5d5f..0000000000 --- a/sdk/tests/legacy/new_tests/sdk/apps/tests.py +++ /dev/null @@ -1,429 +0,0 @@ -import uuid - -import pytest -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestAppsManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_create_app_successfully(self, http_client, setup_class_fixture): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ASSERT - assert response.app_name == app_name - assert isinstance( - response.model_dump(), dict - ), "Response data is not a dictionary." - - # CLEANUP - await delete_application( - http_client, response.app_id, {"Authorization": scope_credentials} - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_app_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.AppManager.acreate( - project_id=scope_project_id, - ) - - # ASSERT - assert ( - response - == "TypeError: AppManager.create() missing 1 required keyword-only argument: 'app_name'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_create_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_name = str(uuid.uuid4()) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_member_credentials", "" - # ) - # ag.init(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.acreate( - # app_name=app_name, - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.functional - async def test_create_app_unsuccessfully_due_to_invalid_credentials( - self, setup_class_fixture - ): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - ag.init(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_list_apps_successfully(self, http_client, setup_class_fixture): - # ARRANGE - app_name = str(uuid.uuid4()) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials" - ) - ag.init(api_key=scope_credentials.strip("ApiKey ")) - await ag.AppManager.acreate( - app_name=app_name, - project_id=scope_project_id, - ) - - # ACT - list_apps_response = await ag.AppManager.alist() - - # ASSERT - assert len(list_apps_response) >= 1 - assert isinstance(list_apps_response, list) - - # CLEANUP - for app_response in list_apps_response: - await delete_application( - http_client, app_response.app_id, {"Authorization": scope_credentials} - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_list_apps_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # non_member_headers = {"Authorization": non_member_credentials} - - # # ACT - # response = await http_client.get( - # f"apps/?project_id={scope_project_id}", - # headers=non_member_headers, - # ) - # response_data = response.json() - - # # ASSERT - # assert response.status_code == 403 - # assert ( - # response_data["detail"] - # == "You do not have access to perform this action. Please contact your organization admin." - # ) - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_list_apps_unsuccessfully_due_to_invalid_credentials(self): - # ARRANGE - ag.init(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.alist() - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_update_app_successfully(self, setup_class_fixture): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - app_id = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_id", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.aupdate( - app_id=app_id, - app_name=app_name, - ) - - # ASSERT - assert response.app_name == app_name - assert isinstance(response.model_dump(), dict) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_update_app_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.AppManager.aupdate( - application_id=app_id, - ) - - # ASSERT - assert ( - response - == "TypeError: AppManager.aupdate() got an unexpected keyword argument 'application_id'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_update_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.aupdate( - # app_id=app_id, - # app_name=app_name, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_update_app_unsuccessfully_due_to_invalid_credentials( - self, setup_class_fixture - ): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - initialize_agenta(api_key="xxxxx") - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.aupdate( - app_id=app_id, - app_name=app_name, - ) - - # ASSERT - assert exc_info.value.status_code == 401 - assert exc_info.value.body == "Unauthorized" - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.functional - @pytest.mark.typical - async def test_update_app_unsuccessfully_due_to_invalid_app_id( - self, setup_class_fixture - ): - # ARRANGE - app_name = f"updated_{str(uuid.uuid4().hex[:8])}" - invalid_app_id = str(uuid.uuid4()) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.aupdate( - app_id=invalid_app_id, - app_name=app_name, - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == { - "detail": f"No application with ID '{invalid_app_id}' found" - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_delete_app_successfully(self, setup_class_fixture): - # ARRANGE - app_id = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_id", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.AppManager.adelete( - app_id=app_id, - ) - - # ASSERT - assert response is None - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_delete_app_unsuccessfully_due_to_invalid_scope( - # self, setup_class_fixture - # ): - # # ARRANGE - # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.AppManager.adelete( - # app_id=app_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.functional - async def test_delete_app_unsuccessfully_due_to_invalid_app_id( - self, setup_class_fixture - ): - # ARRANGE - invalid_app_id = str(uuid.uuid4()) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.AppManager.adelete( - app_id=invalid_app_id, - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == { - "detail": f"No application with ID '{invalid_app_id}' found" - } diff --git a/sdk/tests/legacy/new_tests/sdk/deployments/__init__.py b/sdk/tests/legacy/new_tests/sdk/deployments/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/sdk/deployments/tests.py b/sdk/tests/legacy/new_tests/sdk/deployments/tests.py deleted file mode 100644 index ea2127414c..0000000000 --- a/sdk/tests/legacy/new_tests/sdk/deployments/tests.py +++ /dev/null @@ -1,154 +0,0 @@ -import pytest - -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestDeploymentManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_deploy_success_with_variant_ref_slug(self, setup_class_fixture): - # ARRANGE - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.DeploymentManager.adeploy( - variant_slug=variant_slug, - environment_slug="production", - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_deploy_not_successful_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.DeploymentManager.adeploy( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: DeploymentManager.adeploy() missing 1 required keyword-only argument: 'environment_slug'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_deploy_not_successful_due_to_no_config(self, setup_class_fixture): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.DeploymentManager.adeploy( - variant_slug="default.appvariant", - variant_version=3, - environment_slug="production", - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_deploy_not_successful_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = fetch_variant_revision(http_client, headers, variant_id) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # ag.init(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.DeploymentManager.adeploy( - # variant_slug=variant_revision.get("config_name"), - # variant_version=variant_revision.get("revision", None), - # environment_slug="production", - # # scope arguments - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } diff --git a/sdk/tests/legacy/new_tests/sdk/secrets/__init__.py b/sdk/tests/legacy/new_tests/sdk/secrets/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/sdk/secrets/tests.py b/sdk/tests/legacy/new_tests/sdk/secrets/tests.py deleted file mode 100644 index 54945865d2..0000000000 --- a/sdk/tests/legacy/new_tests/sdk/secrets/tests.py +++ /dev/null @@ -1,103 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestSecretsCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.grumpy - @pytest.mark.typical - @pytest.mark.security - async def test_completion_generate_with_valid_secrets_and_invalid_scope( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_valid_llm_keys(http_client, headers) - scope_project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - non_member_credentials = setup_class_fixture["app_variant_response"].get( - "non_scope_credentials", None - ) - non_member_headers = {"Authorization": non_member_credentials} - - # ACT - response = await http_client.post( - f"{service_url}/generate?project_id={scope_project_id}", - json=payload, - headers=non_member_headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 403 - assert response_data["detail"] == "Service execution not allowed." - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_completion_generate_with_valid_secrets( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_valid_llm_keys(http_client, headers) - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_completion_generate_with_invalid_secrets( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - await set_invalid_llm_keys(http_client, headers) - - # ACT - response = await http_client.post( - f"{service_url}/generate?middleware_cache_enabled=false", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 401 - assert ( - "litellm.AuthenticationError: AuthenticationError: OpenAIException" - in response_data["detail"].get("message", "") - ) diff --git a/sdk/tests/legacy/new_tests/sdk/variants/__init__.py b/sdk/tests/legacy/new_tests/sdk/variants/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/sdk/variants/tests.py b/sdk/tests/legacy/new_tests/sdk/variants/tests.py deleted file mode 100644 index e074ba9d51..0000000000 --- a/sdk/tests/legacy/new_tests/sdk/variants/tests.py +++ /dev/null @@ -1,502 +0,0 @@ -import uuid - -import pytest -import agenta as ag -from agenta.client.core.api_error import ApiError - -from tests.legacy.conftest import * - - -class TestVariantManagerCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_create_variant_successfully( - self, setup_class_fixture, valid_parameters_payload - ): - # ARRANGE - payload = valid_parameters_payload - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - new_variant_slug = f"{variant_slug}_{uuid.uuid4().hex[:4]}" - - # ACT - response = await ag.VariantManager.acreate( - parameters=payload, - variant_slug=new_variant_slug, - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert new_variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_variant_unsuccessfully_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.acreate( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: VariantManager.acreate() missing 1 required keyword-only argument: 'parameters'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_create_variant_unsuccessfully_due_to_no_config( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.VariantManager.acreate( - parameters={}, - variant_slug="default.appvariant", - app_id=str(uuid.uuid4().hex), - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_create_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture, valid_parameters_payload - # ): - # # ARRANGE - # payload = valid_parameters_payload - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # application_name = ( - # setup_class_fixture["app_variant_response"] - # .get("app", {}) - # .get("app_name", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.acreate( - # parameters=payload, - # variant_slug=variant_revision.get("config_name"), - # app_slug=application_name, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_commit_variant_successfully( - self, setup_class_fixture, valid_parameters_payload - ): - # ARRANGE - payload = valid_parameters_payload - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.acommit( - parameters=payload, - variant_slug=variant_slug, - app_slug=application_name, - ) - response_data = response.model_dump() - - # ASSERT - assert response is not None - assert isinstance(response_data, dict) - assert variant_slug == response_data["variant_slug"] - assert application_name == response_data["app_slug"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_commit_variant_unsuccessfully_due_to_invalid_payload( - self, http_client, setup_class_fixture - ): - # ARRANGE - headers = setup_class_fixture["headers"] - variant_id = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("variant_id", None) - ) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.acommit( - variant_slug=variant_revision.get("config_name"), - ) - - # ASSERT - assert ( - response - == "TypeError: VariantManager.acommit() missing 1 required keyword-only argument: 'parameters'" - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_commit_variant_unsuccessfully_due_to_no_config( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(ApiError) as exc_info: - await ag.VariantManager.acommit( - parameters={}, - variant_slug="default.appvariant", - app_id=str(uuid.uuid4().hex), - ) - - # ASSERT - assert exc_info.value.status_code == 404 - assert exc_info.value.body == {"detail": "Config not found."} - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_commit_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.acommit( - # variant_slug=variant_revision.get("config_name"), - # variant_version=variant_revision.get("revision", None), - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_list_variants_successfully(self, setup_class_fixture): - # ARRANGE - application_name = ( - setup_class_fixture["app_variant_response"] - .get("app", {}) - .get("app_name", None) - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.alist( - app_slug=application_name, - ) - - # ASSERT - assert response is not None - assert isinstance(response, list) - assert len(response) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_list_variants_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.alist(application_slug="name") - - # ASSERT - assert ( - response - == "TypeError: VariantManager.alist() got an unexpected keyword argument 'application_slug'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_list_variants_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.alist( - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - @pytest.mark.typical - async def test_delete_variant_successfully(self, setup_class_fixture): - # ARRANGE - variant_slug = ( - setup_class_fixture["app_variant_response"] - .get("variant", {}) - .get("config_name") - ) - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.adelete( - variant_slug=variant_slug, - ) - - # ASSERT - assert response is not None - assert response == 204 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_delete_variant_unsuccessfully_due_to_non_existent_config( - self, http_client, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - response = await ag.VariantManager.adelete(variant_slug=str(uuid.uuid4().hex)) - - # ASSERT - assert response == 204 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_delete_variant_unsuccessfully_due_to_invalid_payload( - self, setup_class_fixture - ): - # ARRANGE - scope_credentials = setup_class_fixture["app_variant_response"].get( - "credentials", "" - ) - scope_api_key = scope_credentials.strip("ApiKey ") - initialize_agenta(api_key=scope_api_key) - - # ACT - with pytest.raises(TypeError): - response = await ag.VariantManager.adelete() - - # ASSERT - assert ( - response - == "TypeError: VariantManager.adelete() missing 1 required keyword-only argument: 'variant_slug'" - ) - - # @pytest.mark.asyncio - # @pytest.mark.grumpy - # @pytest.mark.typical - # @pytest.mark.security - # async def test_delete_variant_unsuccessfully_due_to_invalid_scope( - # self, http_client, setup_class_fixture - # ): - # # ARRANGE - # variant_id = ( - # setup_class_fixture["app_variant_response"] - # .get("variant", {}) - # .get("variant_id", None) - # ) - # headers = setup_class_fixture["headers"] - # variant_revision = await fetch_variant_revision( - # http_client, headers, variant_id - # ) - # scope_project_id = setup_class_fixture["app_variant_response"].get( - # "scope_project_id", None - # ) - # non_member_credentials = setup_class_fixture["app_variant_response"].get( - # "non_scope_credentials", None - # ) - # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) - - # # ACT - # with pytest.raises(ApiError) as exc_info: - # await ag.VariantManager.adelete( - # variant_slug=variant_revision.get("config_name"), - # project_id=scope_project_id, - # ) - - # # ASSERT - # assert exc_info.value.status_code == 403 - # assert exc_info.value.body == { - # "detail": "You do not have access to perform this action. Please contact your organization admin." - # } diff --git a/sdk/tests/legacy/new_tests/testsets/__init__.py b/sdk/tests/legacy/new_tests/testsets/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/__init__.py b/sdk/tests/legacy/new_tests/workflows/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/admin/__init__.py b/sdk/tests/legacy/new_tests/workflows/admin/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/auth/__init__.py b/sdk/tests/legacy/new_tests/workflows/auth/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/config/__init__.py b/sdk/tests/legacy/new_tests/workflows/config/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/config/tests.py b/sdk/tests/legacy/new_tests/workflows/config/tests.py deleted file mode 100644 index add28d63d1..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/config/tests.py +++ /dev/null @@ -1,286 +0,0 @@ -import uuid - -import pytest - -from tests.legacy.conftest import ( - fetch_variant_revision, - set_valid_llm_keys, - fetch_app_environment_revisions, -) - - -class TestServiceConfig: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, http_client, get_mock_response, create_app_and_variant - ): - app_variant_response = create_app_and_variant - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return app_variant_response - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_refs(self, http_client, setup_class_fixture): - # ARRANGE - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id=&application_slug=&variant_id=&variant_slug=&environment_id=&environment_slug=&environment_version=", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_ref_and_variant_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_version = 0 - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - custom_headers = {"Authorization": setup_class_fixture.get("credentials", None)} - - # ACT - response = await http_client.post( - f"{service_url}/run?mock=hello&variant_slug={variant_slug}&variant_version={variant_version}", - json=payload, - headers=custom_headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_ref_and_environment_ref_id( - self, http_client, setup_class_fixture - ): - # ARRANGE - environment_id = None - environment_slug = None - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_and_invalid_variant_ref( - self, http_client, setup_class_fixture - ): - # ARRANGE - variant_id = str(uuid.uuid4()) - variant_slug = "my-variant" - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_service_with_missing_application_and_invalid_environment_ref( - self, http_client, setup_class_fixture - ): - # ARRANGE - environment_id = str(uuid.uuid4()) - environment_slug = "pre-production" - application_id = None - application_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_variant_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - variant_revision = await fetch_variant_revision( - http_client, headers, variant_id - ) - variant_revision_id = variant_revision.get("id", None) - - # ACT - response = await http_client.post( - f"{service_url}/generate?variant_id={variant_revision_id}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_variant_ref_excluding_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - variant_version = 1 # this is 1 because there's a fixture that creates it - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/generate?application_id=&application_slug=&variant_version={variant_version}&variant_slug={variant_slug}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_environment_ref_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - app_id = setup_class_fixture.get("app", {}).get("app_id", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - environment_revisions = await fetch_app_environment_revisions( - http_client, app_id, "production", headers - ) - environment_revision_id = environment_revisions.get("revisions")[-1].get( - "id", "" - ) - - # ACT - response = await http_client.post( - f"{service_url}/generate?environment_id={environment_revision_id}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.happy - @pytest.mark.functional - async def test_service_with_environment_ref_excluding_id( - self, http_client, setup_class_fixture, valid_run_generate_payload - ): - # ARRANGE - payload = valid_run_generate_payload - environment_version = 1 # this is 1 because there's a fixture that creates it - environment_slug = ( - "production" # by default, this gets created along with the variant - ) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/generate?environment_version={environment_version}&environment_slug={environment_slug}", - headers=headers, - json=payload, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "tree" in response_data - assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 diff --git a/sdk/tests/legacy/new_tests/workflows/core/__init__.py b/sdk/tests/legacy/new_tests/workflows/core/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/core/tests.py b/sdk/tests/legacy/new_tests/workflows/core/tests.py deleted file mode 100644 index 0c392c3769..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/core/tests.py +++ /dev/null @@ -1,242 +0,0 @@ -import uuid - -import pytest - -from tests.legacy.conftest import * - - -class TestServiceCore: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant): - app_variant_response = create_app_and_variant - return app_variant_response - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_config(self, http_client, setup_class_fixture): - # ARRANGE - variant_id = None - variant_slug = None - application_id = None - application_slug = None - environment_id = None - environment_slug = None - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_available_config_with_invalid_config( - self, http_client, setup_class_fixture - ): - # ARRANGE - variant_id = str(uuid.uuid4()) - variant_slug = "new-variant" - application_id = str(uuid.uuid4()) - application_slug = "my-app" - environment_id = str(uuid.uuid4()) - environment_slug = "pre-production" - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", - headers=headers, - json={"inputs": ""}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 400 - assert ( - response_data.get("detail") - == "Config not found based on provided references." - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_variables(self, http_client, setup_class_fixture): - # ARRANGE - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - application_id = setup_class_fixture.get("app", {}).get("app_id", None) - application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json={}, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data.get("detail") == [ - { - "input": None, - "loc": ["body", "inputs"], - "msg": "Field required", - "type": "missing", - } - ] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_available_variables_with_invalid_variables( - self, http_client, invalid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - expected_status = 422 - payload = invalid_run_generate_payload - variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) - variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) - application_id = setup_class_fixture.get("app", {}).get("app_id", None) - application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", - headers=headers, - json=payload, - ) - response_data = response.json().get("detail", []) - - # ASSERT - assert response.status_code == expected_status - assert response_data[0].get("msg") == "Field required" - assert isinstance(response_data, list) - assert response_data[0].get("loc") == ["body", "inputs"] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - async def test_missing_model( - self, http_client, valid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - payload = valid_run_generate_payload - headers = {"Authorization": setup_class_fixture.get("credentials", None)} - service_url = setup_class_fixture.get("variant", {}).get("uri", None) - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 424 - assert "API key not found for model" in response_data["detail"].get( - "message", None - ) - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.functional - @pytest.mark.not_available_in_oss - async def test_missing_provider_key( - self, - http_client, - setup_class_fixture, - ): - # ARRANGE - expected_status = 422 - app_variant_response = setup_class_fixture - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # ACT - response = await http_client.post( - "vault/v1/secrets/", - json={ - "header": {"name": "OpenAI", "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - response_data = response.json().get("detail", []) - - # ASSERT - assert response.status_code == expected_status - assert response_data[0].get("msg") == "Field required" - assert isinstance(response_data, list) - assert response_data[0].get("loc") == [ - "body", - "secret", - "data", - "provider", - ] - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.security - @pytest.mark.not_available_in_oss - async def test_available_provider_key_with_invalid_provider_key( - self, - http_client, - setup_class_fixture, - ): - # ARRANGE - app_variant_response = setup_class_fixture - llm_api_keys_names = list(API_KEYS_MAPPING.keys()) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # ACT - list_of_status_codes = [] - for llm_api_key_name in llm_api_keys_names: - response = await http_client.post( - "vault/v1/secrets/", - json={ - "header": {"name": llm_api_key_name, "description": ""}, - "secret": { - "kind": "provider_key", - "data": { - "provider": "", - "key": str(uuid.uuid4().hex[:14]), - }, - }, - }, - headers=headers, - ) - list_of_status_codes.append(response.status_code) - - # ASSERT - assert list_of_status_codes.count(422) == 12 diff --git a/sdk/tests/legacy/new_tests/workflows/health/__init__.py b/sdk/tests/legacy/new_tests/workflows/health/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/litellm/__init__.py b/sdk/tests/legacy/new_tests/workflows/litellm/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/litellm/tests.py b/sdk/tests/legacy/new_tests/workflows/litellm/tests.py deleted file mode 100644 index 4b7f42b4c6..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/litellm/tests.py +++ /dev/null @@ -1,159 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestLitellmCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_completion_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_chat_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_chat_generate_with_multiple_messages( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json={ - "messages": [ - {"role": "assistant", "content": "You are an expert in Geography."}, - {"role": "user", "content": "What is the capital of {country}?"}, - {"role": "assistant", "content": "The capital of France is Paris."}, - { - "role": "user", - "content": "How many states are there in {country}?", - }, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.slow - @pytest.mark.functional - async def test_completion_generate_with_all_models( - self, - http_client, - valid_run_generate_payload, - setup_class_fixture, - get_all_supported_models, - ): - # ARRANGE - payload = valid_run_generate_payload - headers = setup_class_fixture["headers"] - service_url = setup_class_fixture["service_url"] - supported_models = get_all_supported_models - number_of_working_models = 28 - - # ACT - list_of_status_codes = [] - for supported_model in supported_models: - payload["ag_config"]["prompt"]["llm_config"]["model"] = supported_model - response = await http_client.post( - f"{service_url}/generate", - json=payload, - headers=headers, - ) - list_of_status_codes.append(response.status_code) - - # ASSERT - assert list_of_status_codes.count(200) == number_of_working_models - # assert list_of_status_codes.count(424) == ( - # len(supported_models) - number_of_working_models - # ) diff --git a/sdk/tests/legacy/new_tests/workflows/mock/__init__.py b/sdk/tests/legacy/new_tests/workflows/mock/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/mock/chat_tests.py b/sdk/tests/legacy/new_tests/workflows/mock/chat_tests.py deleted file mode 100644 index 82c89488bf..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/mock/chat_tests.py +++ /dev/null @@ -1,187 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockChat: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_chat_app_and_variant, http_client - ): - app_variant_response = create_chat_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate?mock=hello", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate_with_multiple_messages( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate?mock=hello", - json={ - "messages": [ - {"role": "assistant", "content": "You are an expert in Geography."}, - {"role": "user", "content": "What is the capital of {country}?"}, - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - assert response_data["data"] == "content='world'" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_generate_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data == { - "detail": [ - { - "type": "missing", - "loc": ["body", "inputs"], - "msg": "Field required", - "input": None, - } - ] - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_run_with_invalid_inputs(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/run", - json={"input": {"messages": "What is the capital of France?"}}, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_test(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "messages": [ - {"role": "user", "content": "What is the capital of {country}?"} - ], - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert "data" in response_data - assert response_data["data"] == "content='world'" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_chat_test_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "inputs": [ - {"role": "user", "content": "What is the capital of France?"} - ] - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 - assert response_data == { - "detail": [ - { - "type": "missing", - "loc": ["body", "messages"], - "msg": "Field required", - "input": None, - } - ] - } diff --git a/sdk/tests/legacy/new_tests/workflows/mock/completion_tests.py b/sdk/tests/legacy/new_tests/workflows/mock/completion_tests.py deleted file mode 100644 index 1f56fc462d..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/mock/completion_tests.py +++ /dev/null @@ -1,152 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockCompletion: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_run(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/generate?mock=hello", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - assert response_data["data"] == "world" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_run_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/run", - json={ - "input": {"country_name": "France"}, - }, - headers=headers, - ) - - # ASSERT - assert response.status_code == 422 - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_test(self, http_client, setup_class_fixture): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test?mock=hello", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "version" in response_data - assert response_data["data"] == "world" - - @pytest.mark.asyncio - @pytest.mark.functional - async def test_completion_test_with_invalid_inputs( - self, http_client, setup_class_fixture - ): - # ARRANGE - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - - # ACT - response = await http_client.post( - f"{service_url}/test", - json={ - "messages": ["France"], - "input": {"country_name": "France"}, - }, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 422 diff --git a/sdk/tests/legacy/new_tests/workflows/observability/__init__.py b/sdk/tests/legacy/new_tests/workflows/observability/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/observability/tests.py b/sdk/tests/legacy/new_tests/workflows/observability/tests.py deleted file mode 100644 index 3e215fab92..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/observability/tests.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestObservabilityCoverage: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture( - self, get_mock_response, create_app_and_variant, http_client - ): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys (only when authentication is required) - mock_response = get_mock_response - if not mock_response: - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.happy - @pytest.mark.functional - async def test_completion_generate_observability_tree( - self, http_client, valid_run_generate_payload, setup_class_fixture - ): - # ARRANGE - payload = valid_run_generate_payload - service_url = setup_class_fixture["service_url"] - headers = setup_class_fixture["headers"] - project_id = setup_class_fixture["app_variant_response"].get( - "scope_project_id", None - ) - - # ACT - response = await http_client.post( - f"{service_url}/generate", - json=payload, - headers=headers, - ) - response_data = response.json() - - # ASSERT - assert response.status_code == 200 - assert response_data["content_type"] == "text/plain" - assert "data" in response_data and "tree" in response_data - - # Get observability tree - trace_responses = await fetch_trace_by_trace_id( - http_client, headers, project_id=project_id - ) - - # Compare tree structures - workflow_response = response_data - observability_response = trace_responses - - # Step 1: Exclude lifecycle attribute from response(s) - workflow_response_final = exclude_lifecycle(workflow_response) - observability_response_final = exclude_lifecycle(observability_response) - - # Step 2: Compare structures with Jest-like matcher - workflow_nodes = workflow_response_final.get("tree", {}).get("nodes", []) - observability_nodes = observability_response_final.get("trees", {})[0].get( - "nodes", [] - ) - - is_match = exact_match(workflow_nodes, observability_nodes) - assert ( - is_match is True - ), "Workflow nodes does not match nodes from observability" diff --git a/sdk/tests/legacy/new_tests/workflows/openapi/__init__.py b/sdk/tests/legacy/new_tests/workflows/openapi/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/permissions/__init__.py b/sdk/tests/legacy/new_tests/workflows/permissions/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/new_tests/workflows/permissions/tests.py b/sdk/tests/legacy/new_tests/workflows/permissions/tests.py deleted file mode 100644 index 97dcb14561..0000000000 --- a/sdk/tests/legacy/new_tests/workflows/permissions/tests.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest - -from tests.legacy.conftest import * - - -class TestMockCompletion: - @pytest.fixture(autouse=True, scope="class") - async def setup_class_fixture(self, create_app_and_variant, http_client): - app_variant_response = create_app_and_variant - service_url = app_variant_response.get("variant", {}).get("uri", None) - headers = {"Authorization": app_variant_response.get("credentials", None)} - - # Set valid LLM keys - await set_valid_llm_keys(client=http_client, headers=headers) - - return { - "app_variant_response": app_variant_response, - "headers": headers, - "service_url": service_url, - } - - @pytest.mark.asyncio - @pytest.mark.typical - @pytest.mark.grumpy - @pytest.mark.security - @pytest.mark.not_available_in_oss - async def test_permissions_principal_not_in_scope( - self, http_client, setup_class_fixture - ): - # Arrange: Prepare data - expected_status = 403 - description = "Principal not in scope for POST" - service_url = setup_class_fixture["service_url"] - app_variant_response = setup_class_fixture["app_variant_response"] - user_scope_project_id = app_variant_response.get("scope_project_id") - non_member_credentials = app_variant_response.get("non_member_credentials", "") - non_member_headers = {"Authorization": non_member_credentials} - await set_valid_llm_keys(client=http_client, headers=non_member_headers) - - # Act - response = await http_client.post( - f"{service_url}/generate?project_id={user_scope_project_id}", - json={ - "ag_config": { - "prompt": { - "llm_config": { - "model": "gpt-4", - "response_format": {"type": "text"}, - }, - "messages": [ - { - "content": "You are an expert in geography.", - "role": "system", - }, - { - "content": "What is the capital of {country}?", - "role": "user", - }, - ], - "template_format": "fstring", - } - }, - "inputs": {"country": "France"}, - }, - headers=non_member_headers, - ) - response_data = response.json() - - # Assert: Verify the response - assert ( - response.status_code == expected_status - ), f"Failed for case: {description}" - assert ( - response.json().get("detail") == "Service execution not allowed." - ), f"Failed for case: {description}" diff --git a/sdk/tests/legacy/sdk_routing/__init__.py b/sdk/tests/legacy/sdk_routing/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/legacy/sdk_routing/conftest.py b/sdk/tests/legacy/sdk_routing/conftest.py deleted file mode 100644 index d02938591b..0000000000 --- a/sdk/tests/legacy/sdk_routing/conftest.py +++ /dev/null @@ -1,189 +0,0 @@ -import os -import sys -import time -import uuid -import socket -import random -import threading -import subprocess -from pathlib import Path -from importlib.metadata import version - -import httpx -import pytest - -from tests.legacy.conftest import get_admin_user_credentials, API_BASE_URL - - -BASE_URL = os.getenv("BASE_URL", "http://127.0.0.1") - - -def get_free_port(start=8001, end=8999, max_attempts=100): - """ - Find an available port within the specified range with a maximum number of attempts. - """ - - attempts = 0 - - while attempts < max_attempts: - port = random.randint(start, end) - - with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: - try: - s.bind(("127.0.0.1", port)) - return port - - except OSError: - attempts += 1 - - raise RuntimeError("Could not find a free port within the range") - - -@pytest.fixture(scope="class") -def get_agenta_version(): - return version("agenta") - - -@pytest.fixture(scope="class") -def executable_python(): - """ - Fixture to provide the current Python executable. - """ - - python_executable = sys.executable - return python_executable - - -@pytest.fixture(scope="class") -def get_port_number(): - port = get_free_port() - return port - - -@pytest.fixture(scope="class") -def http_client(get_port_number): - """ - Create an HTTP client for API testing. - """ - - programmatic_access = get_admin_user_credentials() - with httpx.Client( - base_url=f"{BASE_URL}:{get_port_number}", - timeout=httpx.Timeout(timeout=6, read=None, write=5), - headers={ - "Authorization": f"{programmatic_access}", - "Content-Type": "application/json", - }, - ) as client: - yield client - - -@pytest.fixture(scope="class") -def create_application(http_client): - """ - Create an application and set the APP_ID in the environment - """ - - response = http_client.post( - f"{API_BASE_URL}apps/", json={"app_name": f"app_{uuid.uuid4().hex[:8]}"} - ) - response.raise_for_status() - response_data = response.json() - return response_data - - -@pytest.fixture(scope="class") -def fastapi_server( - request, get_port_number, create_application, http_client, executable_python -): - """ - Run the FastAPI server as a subprocess on a random port and return its base URL. - """ - - app_id = create_application.get("app_id", None) - app_file = request.param.get("app_file", "main.py") - env_vars = request.param.get("env_vars", {}) - - app_folder = Path(__file__).parent - - if not (app_folder / app_file).exists(): - raise FileNotFoundError(f"FastAPI app not found at: {app_folder / app_file}") - - env_vars.update( - { - "AGENTA_APP_ID": app_id, - "AGENTA_HOST": BASE_URL, - "HOST": "0.0.0.0", - "PORT": str(get_port_number), - } - ) - - command = [ - executable_python, - app_file, - ] - - process = subprocess.Popen( - command, - cwd=app_folder, - env=env_vars, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - text=True, - bufsize=1, - ) - - def print_logs(pipe, prefix): - for line in iter(pipe.readline, ""): - print(f"{prefix}: {line.strip()}") - pipe.close() - - threading.Thread( - target=print_logs, - args=(process.stdout, "STDOUT"), - daemon=True, - ).start() - threading.Thread( - target=print_logs, - args=(process.stderr, "STDERR"), - daemon=True, - ).start() - - # Wait a bit for the server to start - time.sleep(2) - - yield BASE_URL, process - - process.terminate() - process.wait() - - # Remove application after server teardown - response = http_client.delete(f"{API_BASE_URL}apps/{app_id}") - response.raise_for_status() - - -@pytest.fixture(scope="class") -def ensure_server(fastapi_server, http_client): - """ - Ensure the server is running by checking the health endpoint. - """ - - _, process = fastapi_server - - for i in range(10): - try: - response = http_client.get("/") - if response.status_code == 200: - return - - print( - f"Health check attempt {i+1}/10 failed with status {response.status_code}" - ) - except (ConnectionError, TimeoutError) as e: - print(f"Health check attempt {i+1}/10 failed: {e}") - time.sleep(2) - - stdout, stderr = process.communicate(timeout=1) - raise RuntimeError( - f"Server failed to respond to health checks\nStdout: {stdout}\nStderr: {stderr}" - ) diff --git a/sdk/tests/legacy/sdk_tests/__init__.py b/sdk/tests/legacy/sdk_tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/api/oss/tests/legacy/old_tests/__init__.py b/sdk/tests/management/config/__init__.py similarity index 100% rename from api/oss/tests/legacy/old_tests/__init__.py rename to sdk/tests/management/config/__init__.py diff --git a/sdk/tests/legacy/management/config/fixtures.py b/sdk/tests/management/config/fixtures.py similarity index 100% rename from sdk/tests/legacy/management/config/fixtures.py rename to sdk/tests/management/config/fixtures.py diff --git a/sdk/tests/legacy/management/config/test_config_manager.py b/sdk/tests/management/config/test_config_manager.py similarity index 100% rename from sdk/tests/legacy/management/config/test_config_manager.py rename to sdk/tests/management/config/test_config_manager.py diff --git a/sdk/tests/management/conftest.py b/sdk/tests/management/conftest.py new file mode 100644 index 0000000000..980bde41d6 --- /dev/null +++ b/sdk/tests/management/conftest.py @@ -0,0 +1,126 @@ +import os +import uuid +import asyncio + +import httpx +import pytest +import pytest_asyncio +from pytest_asyncio import is_async_test + +from tests.conftest import get_admin_user_credentials, API_BASE_URL + + +OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", None) + + +def pytest_collection_modifyitems(items): + """ + Mark all tests to run inside the same event loop. + + NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes + """ + + pytest_asyncio_tests = (item for item in items if is_async_test(item)) + session_scope_marker = pytest.mark.asyncio(loop_scope="session") + for async_test in pytest_asyncio_tests: + async_test.add_marker(session_scope_marker, append=False) + + +@pytest_asyncio.fixture(scope="session") +async def http_client(): + """ + Create an HTTP client for API testing. + """ + + programmatic_access = get_admin_user_credentials() + async with httpx.AsyncClient( + base_url=API_BASE_URL, + timeout=httpx.Timeout(timeout=6, read=None, write=5), + headers={ + "Authorization": f"{programmatic_access}", + "Content-Type": "application/json", + }, + ) as client: + yield client + + +@pytest_asyncio.fixture(scope="session") +async def fetch_templates(http_client): + """ + Fetch available templates. + """ + + response = await http_client.get("containers/templates/") + return response.json() + + +@pytest_asyncio.fixture(scope="session") +async def fetch_completion_template(fetch_templates): + """ + Find the chat_openai template. + """ + + return next( + (temp for temp in fetch_templates if temp["image"]["name"] == "chat_openai"), + None, + ) + + +def get_random_name(): + return f"completion_app_{uuid.uuid4().hex[:8]}" + + +@pytest_asyncio.fixture(scope="session") +async def app_from_template_payload(fetch_completion_template): + """ + Prepare payload for creating an app from a template. + """ + + return { + "app_name": get_random_name(), + "env_vars": {"OPENAI_API_KEY": OPENAI_API_KEY}, + "template_id": fetch_completion_template.get("id", None), + } + + +@pytest_asyncio.fixture(scope="session") +async def get_completion_app_from_list(http_client): + """ + Retrieve the first available application. + """ + + list_app_response = await http_client.get("apps/") + list_app_response.raise_for_status() + + apps_response = list_app_response.json() + if not apps_response: + raise ValueError("No applications found") + + return apps_response[0] + + +@pytest_asyncio.fixture(scope="session") +async def create_app_from_template(app_from_template_payload, http_client): + # Create app + create_app_response = await http_client.post( + "apps/app_and_variant_from_template", json=app_from_template_payload + ) + create_app_response.raise_for_status() + + # Small delay to ensure app is ready + await asyncio.sleep(3) + + # Get response data + app_response = create_app_response.json() + try: + # Yield the app for tests to use + yield app_response + finally: + # Cleanup: Delete the app after all tests in the class are complete + try: + delete_response = await http_client.delete( + f"apps/{app_response.get('app_id', None)}" + ) + delete_response.raise_for_status() + except Exception as e: + print(f"Error during app cleanup: {e}") diff --git a/api/oss/tests/legacy/sdk/__init__.py b/sdk/tests/management/deployment/__init__.py similarity index 100% rename from api/oss/tests/legacy/sdk/__init__.py rename to sdk/tests/management/deployment/__init__.py diff --git a/sdk/tests/legacy/management/deployment/fixtures.py b/sdk/tests/management/deployment/fixtures.py similarity index 100% rename from sdk/tests/legacy/management/deployment/fixtures.py rename to sdk/tests/management/deployment/fixtures.py diff --git a/sdk/tests/legacy/management/deployment/test_deployment_manager.py b/sdk/tests/management/deployment/test_deployment_manager.py similarity index 100% rename from sdk/tests/legacy/management/deployment/test_deployment_manager.py rename to sdk/tests/management/deployment/test_deployment_manager.py diff --git a/api/oss/tests/legacy/sdk/apps/__init__.py b/sdk/tests/management/variant/__init__.py similarity index 100% rename from api/oss/tests/legacy/sdk/apps/__init__.py rename to sdk/tests/management/variant/__init__.py diff --git a/sdk/tests/legacy/management/variant/test_variant_manager.py b/sdk/tests/management/variant/test_variant_manager.py similarity index 100% rename from sdk/tests/legacy/management/variant/test_variant_manager.py rename to sdk/tests/management/variant/test_variant_manager.py diff --git a/sdk/tests/manual/__init__.py b/sdk/tests/manual/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/manual/workflows/__init__.py b/sdk/tests/manual/workflows/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/manual/workflows/interface.py b/sdk/tests/manual/workflows/interface.py deleted file mode 100644 index 4630426e2c..0000000000 --- a/sdk/tests/manual/workflows/interface.py +++ /dev/null @@ -1,761 +0,0 @@ -from typing import Callable, Union -from asyncio import run as run_async -from time import time_ns -from uuid import uuid4 -from os import getenv -from sys import argv - -from pydantic import BaseModel -from aiohttp import ClientSession -from fastapi import FastAPI - -from agenta.sdk.models.workflows import ( - WorkflowRevision, - WorkflowRevisionData, - WorkflowServiceRequest, - WorkflowServiceResponse, - WorkflowServiceInterface, - WorkflowServiceRequestData, - WorkflowServiceRequestData, - WorkflowServiceResponseData, - Status, - Data, -) - -from agenta.sdk.workflows.utils import parse_service_uri -from agenta.sdk.workflows.handlers import exact_match_v1 - -import agenta as ag - -AGENTA_API_URL = "http://localhost/api" -AGENTA_API_KEY = getenv("AGENTA_API_KEY") - -# TODO: -# - Add service URI definitions -# - Add URI-based service schemas -# - Talk about paths -# - Check if it should be revision or revision.data in invoke - - -def debug(func): - async def wrapper(*args, **kwargs): - start_time = time_ns() - print("-" * 40) - print(f"Running: {func.__name__}") - # print(f"Request: {args} & {kwargs}") - result = await func(*args, **kwargs) - end_time = time_ns() - if isinstance(result, BaseModel): - print(f"Response: {result.model_dump(mode='json', exclude_none=True)}") - else: - print(f"Response: {result}") - print(f"Elapsed: {(end_time - start_time) / 1_000_000} ms") - return result - - return wrapper - - -TEST_INPUTS = { - "text": "Hello, world!", - "result": "Hello, World!", -} - -TEST_OUTPUTS = "Hello, World!" - -TEST_PARAMETERS = { - "/": { - "reference_key": "result", - } -} - -TEST_SCRIPT = """ -# - THIS WILL BE PART OF THE SDK (import agenta as ag) ----------------- START - - -from typing import Callable -from uuid import uuid4 - -from agenta.sdk.workflows.types import ( - WorkflowRevision, - WorkflowRevisionData, - WorkflowServiceRequestData, - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceResponse, - WorkflowServiceInterface, - Status, - Data, -) - -from agenta.sdk.workflows.utils import parse_service_uri - -async def local_call( - request: WorkflowServiceRequest, - revision: WorkflowRevision, - handler: Callable, -): - parameters = revision.data.parameters.get(request.path, {}) - - # INPUTS/PARAMETERS VALUES MAPPINGS - # INPUTS/PARAMETERS SCHEMAS VALIDATION - - outputs = await handler( - # request=request, - # revision=revision, - inputs=request.data.inputs, - parameters=parameters, - outputs=request.data.outputs, - ) - - # OUTPUTS/RESULTS VALUES MAPPINGS - # OUTPUTS/RESULTS SCHEMAS VALIDATION - - response = WorkflowServiceResponse( - id=uuid4(), - version="2025.07.14", - status=Status( - code=200, - message="Success", - ), - data=WorkflowServiceRequestData( - outputs=outputs, - # trace= - ), - ) - - return response - -def ag_workflow( - workflow_handler: Callable, -) -> Data: - async def workflow_decorator_wrapper( - workflow_service_request: WorkflowServiceRequest, - workflow_revision_data: WorkflowRevisionData, - ): - workflow_revision = WorkflowRevision( - data=workflow_revision_data, - ) - - return await local_call( - request=workflow_service_request, - revision=workflow_revision, - handler=workflow_handler, - ) - - return workflow_decorator_wrapper - -def ag_instrument( - workflow_handler: Callable, -) -> Data: - - return workflow_handler - -# - THIS WILL BE PART OF THE SDK (import agenta as ag) ----------------- END --- - - -# - THIS IS THE USER'S CODE -------------------------------------------- START - - -from json import dumps - -from agenta.sdk.workflows.types import Data - - -@ag_workflow -@ag_instrument -async def exact_match_v1( - *, - inputs: Data, - outputs: Data | str, - parameters: Data, -) -> Data: - reference_key = parameters.get("reference_key", None) - reference_outputs = inputs.get(reference_key, None) - - if isinstance(outputs, str) and isinstance(reference_outputs, str): - success = outputs == reference_outputs - elif isinstance(outputs, dict) and isinstance(reference_outputs, dict): - outputs = dumps(outputs, sort_keys=True) - reference_outputs = dumps(reference_outputs, sort_keys=True) - success = outputs == reference_outputs - else: - success = False - - return {"success": success} - -# - THIS IS THE USER'S CODE -------------------------------------------- END --- - - -# - THIS WILL BE PART OF THE SDK (via @ag.workflow) -------------------- START - - -__ag_workflow_registry__ = { - "/": { - "invoke": exact_match_v1, - } -} - -# - THIS WILL BE PART OF THE SDK (via @ag.workflow) -------------------- END --- -""" - -EXEC_SCRIPT = """ -# - THIS WILL BE PART OF THE BACKEND (via @ag.workflow) ---------------- START - - -async def __ag_workflow_runner__(): - path = {workflow_revision_data}.get("parameters", {{}}).get("path", "/") - method = {workflow_revision_data}.get("parameters", {{}}).get("method", "invoke") - handler = __ag_workflow_registry__.get(path, {{}}).get(method, None) - - if not handler: - return WorkflowServiceResponse( - status=Status( - code=400, - message="Could not find service handler for the given URI, path, and method.", - ) - ) - - return await handler( - workflow_service_request=WorkflowServiceRequest(**{workflow_service_request}), - workflow_revision_data=WorkflowRevisionData(**{workflow_revision_data}), - ) - -return await __ag_workflow_runner__() # UNCOMMENT THIS - -# - THIS WILL BE PART OF THE BACKEND (via @ag.workflow) ---------------- END --- - - -""" - - -async def run_script_locally( - *, - workflow_service_request: WorkflowServiceRequest, - workflow_revision_data: WorkflowRevisionData, -) -> Union[Data, str]: - actual_script = ( - TEST_SCRIPT - + "\n" - + EXEC_SCRIPT.format( - workflow_service_request=workflow_service_request.model_dump( - mode="json", - exclude_none=True, - ), - workflow_revision_data=workflow_revision_data.model_dump( - mode="json", - exclude_none=True, - ), - ) - ) - - async def async_exec(code: str, globals_dict=None, locals_dict=None): - # Wrap code in async def so we can await it - wrapper_name = "__ag_workflow_script__" - indented_code = "\n".join(f" {line}" for line in code.splitlines()) - wrapped = f"async def {wrapper_name}():\n{indented_code}" - - exec_globals = globals_dict if globals_dict is not None else {} - exec_locals = locals_dict if locals_dict is not None else exec_globals - - # Compile the async wrapper - exec(wrapped, exec_globals, exec_locals) - - # Await and return result - return await exec_locals[wrapper_name]() - - result = await async_exec(actual_script) - - return result - - -# A DECORATOR THAT USES local_call to wrap functions, like exact_match -def workflow_decorator( - workflow_handler: Callable, -) -> Data: - async def local_call( - request: WorkflowServiceRequest, - revision: WorkflowRevision, - handler: Callable, - ): - parameters = revision.data.parameters.get(request.path, {}) - - outputs = await handler( - # request=request, - # revision=revision, - inputs=request.data.inputs, - parameters=parameters, - outputs=request.data.outputs, - ) - - # OUTPUTS/RESULTS VALUES MAPPINGS - # OUTPUTS/RESULTS SCHEMAS VALIDATION - - response = WorkflowServiceResponse( - id=uuid4(), - version="2025.07.14", - status=Status( - code=200, - message="Success", - ), - data=WorkflowServiceRequestData( - outputs=outputs, - # trace= - ), - ) - - return response - - async def workflow_decorator_wrapper( - workflow_service_request: WorkflowServiceRequest, - workflow_revision_data: WorkflowRevisionData, - ): - workflow_revision = WorkflowRevision( - data=workflow_revision_data, - ) - - return await local_call( - request=workflow_service_request, - revision=workflow_revision, - handler=workflow_handler, - ) - - return workflow_decorator_wrapper - - -HANDLER_REGISTRY = { - "agenta": { - "function": { - "exact_match": { - "latest": workflow_decorator(exact_match_v1), - "v1": workflow_decorator(exact_match_v1), - }, - }, - "code": { - "local": { - "latest": run_script_locally, - "v1": run_script_locally, - } - }, - }, -} - - -app = FastAPI() - -app.add_api_route( - "/agenta-function-exact_match-latest", - workflow_decorator(exact_match_v1), - methods=["POST"], -) - - -async def health_check(): - return {"status": "ok"} - - -app.add_api_route( - "/health", - health_check, -) - - -class WorkflowServiceHandler: - def __init__( - self, - api_url: str, - api_key: str, - ): - self.api_url = api_url - self.api_key = api_key - - async def invoke( - self, - *, - request: WorkflowServiceRequest, - revision: WorkflowRevision, - force_remote: bool = False, - ): - ( - service_provider, - service_kind, - service_key, - service_version, - ) = await parse_service_uri( - uri=revision.data.uri, - ) - - if force_remote: - return await self.remote_call( - request=request, - revision=revision, - ) - - handler = ( - HANDLER_REGISTRY.get(service_provider, {}) - .get(service_kind, {}) - .get(service_key, {}) - .get(service_version, None) - ) - - if not handler: - return WorkflowServiceResponse( - status=Status( - code=400, - message="Could not find service handler for the given URI.", - ) - ) - - return await handler( - workflow_service_request=request, - workflow_revision_data=revision.data, - ) - - async def remote_call( - self, - *, - request: WorkflowServiceRequest, - revision: WorkflowRevision, - ): - # CALL API_URL - async with ClientSession() as session: - async with session.post( - f"{self.api_url}/preview/workflows/invoke", - json={ - "workflow_service_request": request.model_dump( - mode="json", - exclude_none=True, - ), - "workflow_revision_data": revision.data.model_dump( - mode="json", - exclude_none=True, - ), - }, - headers={"Authorization": f"ApiKey {self.api_key}"}, - ) as response: - if response.status != 200: - return WorkflowServiceResponse( - status=Status( - code=response.status, - message=response.reason, - ) - ) - - data = await response.json() - - return WorkflowServiceResponse(**data) - - -workflow_service_handler = WorkflowServiceHandler( - api_url=AGENTA_API_URL, - api_key=AGENTA_API_KEY, -) - - -@debug -async def test_noop(): - pass - - -@debug -async def test_local_function_workflow_by_value(): - # create the workflow revision - workflow_revision = WorkflowRevision( - data=WorkflowRevisionData( - uri="agenta:function:exact_match:latest", - parameters=TEST_PARAMETERS, - ) - ) - - print( - "Revision:", workflow_revision.data.model_dump(mode="json", exclude_none=True) - ) - - # create the workflow request - workflow_service_request = WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs=TEST_INPUTS, - outputs=TEST_OUTPUTS, - ) - ) - - print( - "Request: ", - workflow_service_request.data.model_dump(mode="json", exclude_none=True), - ) - - # invoke the workflow service - workflow_service_response = await workflow_service_handler.invoke( - request=workflow_service_request, - revision=workflow_revision, - ) - - # check response - if not workflow_service_response: - return - - # check response - status = workflow_service_response.status - if status.code == "200": - print("Check: ", workflow_service_response.data.outputs["success"]) - else: - print("Check: ", status.model_dump(mode="json", exclude_none=True)) - - return workflow_service_response - - -@debug -async def test_remote_function_workflow_by_value(): - # create the workflow revision - workflow_revision = WorkflowRevision( - data=WorkflowRevisionData( - uri="agenta:function:exact_match:latest", - parameters=TEST_PARAMETERS, - ) - ) - - print( - "Revision:", workflow_revision.data.model_dump(mode="json", exclude_none=True) - ) - - # create the workflow request - workflow_service_request = WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs=TEST_INPUTS, - outputs=TEST_OUTPUTS, - ) - ) - - print( - "Request: ", - workflow_service_request.data.model_dump(mode="json", exclude_none=True), - ) - - # invoke the workflow service - workflow_service_response = await workflow_service_handler.invoke( - request=workflow_service_request, - revision=workflow_revision, - force_remote=True, - ) - - # check response - if not workflow_service_response: - return - - # check response - status = workflow_service_response.status - if status.code == "200": - print("Check: ", workflow_service_response.data.outputs["success"]) - else: - print("Check: ", status.model_dump(mode="json", exclude_none=True)) - - return workflow_service_response - - -@debug -async def test_code_workflow_by_value(): - # create the workflow revision - workflow_revision = WorkflowRevision( - data=WorkflowRevisionData( - uri="agenta:code:local:latest", - script=TEST_SCRIPT, - parameters=TEST_PARAMETERS, - ) - ) - - print( - "Revision:", - { - **workflow_revision.data.model_dump( - mode="json", exclude_none=True, exclude={"script"} - ), - "script": "<some-long-script>", - }, - ) - - # create the workflow request - workflow_service_request = WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs=TEST_INPUTS, - outputs=TEST_OUTPUTS, - ) - ) - - print( - "Request: ", - workflow_service_request.data.model_dump(mode="json", exclude_none=True), - ) - - # invoke the workflow service - workflow_service_response = await workflow_service_handler.invoke( - request=workflow_service_request, - revision=workflow_revision, - ) - - # check response - if not workflow_service_response: - return - - status = workflow_service_response.status - if status.code == "200": - print("Check: ", workflow_service_response.data.outputs["success"]) - else: - print("Check: ", status.model_dump(mode="json", exclude_none=True)) - - return workflow_service_response - - -@debug -async def test_hook_workflow_by_value_direct(): - # create the workflow revision - workflow_revision = WorkflowRevision( - data=WorkflowRevisionData( - url="http://localhost:8888/agenta-function-exact_match-latest", - parameters=TEST_PARAMETERS, - ) - ) - - print( - "Revision:", workflow_revision.data.model_dump(mode="json", exclude_none=True) - ) - - # create the workflow request - workflow_service_request = WorkflowServiceRequest( - data=WorkflowServiceRequestData( - inputs=TEST_INPUTS, - outputs=TEST_OUTPUTS, - ) - ) - - print( - "Request: ", - workflow_service_request.data.model_dump(mode="json", exclude_none=True), - ) - - url = workflow_revision.data.url - - data = { - "workflow_service_request": workflow_service_request.model_dump( - mode="json", - exclude_none=True, - ), - "workflow_revision_data": workflow_revision.data.model_dump( - mode="json", - exclude_none=True, - ), - } - - headers = {"Authorization": f"ApiKey {AGENTA_API_KEY}"} - if workflow_revision.data and workflow_revision.data.headers: - path_headers = workflow_revision.data.headers[workflow_service_request.path] - for key, value in (path_headers or {}).items(): - if isinstance(value, str): - headers[key] = path_headers[value] - else: - pass - - # invoke the workflow service - async with ClientSession() as session: - async with session.post( - url=url, - json=data, - headers=headers, - ) as response: - if response.status != 200: - workflow_service_response = WorkflowServiceResponse( - status=Status( - code=response.status, - message=response.reason, - ) - ) - else: - data = await response.json() - - workflow_service_response = WorkflowServiceResponse(**data) - - # check response - if not workflow_service_response: - return - - # check response - status = workflow_service_response.status - if status.code == "200": - print("Check: ", workflow_service_response.data.outputs["success"]) - else: - print("Check: ", status.model_dump(mode="json", exclude_none=True)) - - return workflow_service_response - - -@debug -async def test_local_function_workflow_by_reference(): - # invoke the workflow - - # check response - pass - - -@debug -async def test_remote_function_workflow_by_reference(): - # invoke the workflow - - # check response - pass - - -@debug -async def test_code_workflow_by_reference(): - # create a workflow (incl variant and revision) - - # invoke the workflow - - # check response - pass - - -@debug -async def test_hook_workflow_by_reference(): - # create a workflow (incl variant and revision) - - # invoke the workflow - - # check response - pass - - -print("-------------------------------------------------") - -ag.init( - api_url=AGENTA_API_URL, - api_key=AGENTA_API_KEY, -) - - -async def main(): - await test_noop() - - await test_local_function_workflow_by_value() - await test_remote_function_workflow_by_value() - await test_code_workflow_by_value() - await test_hook_workflow_by_value_direct() - - # await test_local_function_workflow_by_reference() - # await test_remote_function_workflow_by_reference() - # await test_code_workflow_by_reference() - # await test_hook_workflow_by_reference() - - -if __name__ == "__main__": - args = argv[1:] - serve = "--serve" in args - - if not serve: - run_async(main()) - - else: - import uvicorn - - # quit with ctrl+c - uvicorn.run( - "tests.manual.workflows.interface:app", - host="0.0.0.0", - port=8888, - log_level="info", - reload=True, - ) diff --git a/sdk/tests/manual/workflows/sdk_test.py b/sdk/tests/manual/workflows/sdk_test.py deleted file mode 100644 index eec99d3879..0000000000 --- a/sdk/tests/manual/workflows/sdk_test.py +++ /dev/null @@ -1,181 +0,0 @@ -# - THIS WOULD BE PART OF THE BACKEND ---------------------------------- START - -from os import getenv - -import agenta as ag - -AGENTA_API_URL = "http://localhost/api" -AGENTA_API_KEY = getenv("AGENTA_API_KEY") - -ag.init( - api_url=AGENTA_API_URL, - api_key=AGENTA_API_KEY, -) -# - THIS WOULD BE PART OF THE BACKEND ---------------------------------- END --- - - -# - THIS IS THE USER'S CODE -------------------------------------------- START - - -VERSION = "2025.07.14" - -SCHEMAS = { - "parameters": { - "type": "object", - "properties": { - "reference_path": { - "type": "string", - "description": "The key in the inputs to compare against the trace outputs.", - } - }, - "required": ["reference_path"], - "additionalProperties": True, - }, - "inputs": {"type": "object"}, - "outputs": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "description": "Indicates whether the trace outputs match the reference outputs.", - } - }, - "required": ["success"], - "additionalProperties": False, - }, -} - - -from json import dumps - - -@ag.workflow( - version=VERSION, - schemas=SCHEMAS, -) -@ag.instrument() -async def exact_match_v1( - *, - parameters: dict, - inputs: dict, - outputs: dict | str, -) -> dict: - reference_path = parameters.get("reference_path", None) - reference_outputs = inputs.get(reference_path, None) - - if isinstance(outputs, str) and isinstance(reference_outputs, str): - success = outputs == reference_outputs - elif isinstance(outputs, dict) and isinstance(reference_outputs, dict): - outputs = dumps(outputs, sort_keys=True) - reference_outputs = dumps(reference_outputs, sort_keys=True) - success = outputs == reference_outputs - else: - success = False - - outputs = {"success": success} - - return outputs - - -# - THIS IS THE USER'S CODE -------------------------------------------- END --- - -from asyncio import run as run_async - -from agenta.sdk.models.workflows import ( - WorkflowRevision, - WorkflowRevisionData, - WorkflowServiceRequestData, - WorkflowServiceResponseData, - WorkflowServiceRequest, - WorkflowServiceResponse, - Status, - Data, -) - - -TEST_INPUTS = { - "text": "Hello, world!", - "result": "Hello, World!", -} - -TEST_OUTPUTS = "Hello, World!" - -TEST_PARAMETERS = { - "reference_path": "result", -} - - -async def main(): - # create the workflow revision - workflow_revision = WorkflowRevision( - data=WorkflowRevisionData( - uri="agenta:function:exact_match:latest", - parameters=TEST_PARAMETERS, - ) - ) - - print( - "Revision:", workflow_revision.data.model_dump(mode="json", exclude_none=True) - ) - - # create the workflow request - workflow_service_request = WorkflowServiceRequest( - flags={"is_annotation": True}, - data=WorkflowServiceRequestData( - inputs=TEST_INPUTS, - outputs=TEST_OUTPUTS, - ), - credentials=f"ApiKey {AGENTA_API_KEY}", - ) - - print( - "Request: ", - workflow_service_request.data.model_dump(mode="json", exclude_none=True), - ) - - # invoke the workflow service - # - THIS WILL BE PART OF THE BACKEND (via @ag.workflow) ---------------- START - - - # print("Registry:", ag.workflow.get_registry()) - - method = workflow_service_request.method or "invoke" - - workflow_registry = ag.workflows.get_registry() - - handler = workflow_registry.handlers.get(method, None) - - if not handler: - return WorkflowServiceResponse( - status=Status( - code=400, - message="Could not find service handler for the given URI, path, and method.", - ) - ) - - print("Handler: ", handler) - - with ag.workflow_mode_enabled(): - workflow_service_response: WorkflowServiceResponse = await handler( - request=workflow_service_request, - revision=workflow_revision, - ) - - print( - f"Response: {workflow_service_response.model_dump(mode='json', exclude_none=True)}" - ) - - outputs = await handler( - inputs=workflow_service_request.data.inputs, - outputs=workflow_service_request.data.outputs, - parameters=workflow_revision.data.parameters, - ) - - print(f"Outputs: {outputs}") - - return workflow_service_response - - # - THIS WILL BE PART OF THE BACKEND (via @ag.workflow) ---------------- END --- - - -if __name__ == "__main__": - print() - run_async(main()) - print() diff --git a/sdk/tests/legacy/new_tests/.gitignore b/sdk/tests/new_tests/.gitignore similarity index 100% rename from sdk/tests/legacy/new_tests/.gitignore rename to sdk/tests/new_tests/.gitignore diff --git a/api/oss/tests/legacy/sdk/deployments/__init__.py b/sdk/tests/new_tests/__init__.py similarity index 100% rename from api/oss/tests/legacy/sdk/deployments/__init__.py rename to sdk/tests/new_tests/__init__.py diff --git a/api/oss/tests/legacy/sdk/secrets/__init__.py b/sdk/tests/new_tests/admin/__init__.py similarity index 100% rename from api/oss/tests/legacy/sdk/secrets/__init__.py rename to sdk/tests/new_tests/admin/__init__.py diff --git a/sdk/tests/legacy/new_tests/admin/tests.py b/sdk/tests/new_tests/admin/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/admin/tests.py rename to sdk/tests/new_tests/admin/tests.py diff --git a/api/oss/tests/legacy/sdk/variants/__init__.py b/sdk/tests/new_tests/apps/__init__.py similarity index 100% rename from api/oss/tests/legacy/sdk/variants/__init__.py rename to sdk/tests/new_tests/apps/__init__.py diff --git a/sdk/tests/legacy/new_tests/apps/fixtures.py b/sdk/tests/new_tests/apps/fixtures.py similarity index 100% rename from sdk/tests/legacy/new_tests/apps/fixtures.py rename to sdk/tests/new_tests/apps/fixtures.py diff --git a/sdk/tests/legacy/new_tests/apps/tests.py b/sdk/tests/new_tests/apps/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/apps/tests.py rename to sdk/tests/new_tests/apps/tests.py diff --git a/api/oss/tests/legacy/testsets/__init__.py b/sdk/tests/new_tests/auth/__init__.py similarity index 100% rename from api/oss/tests/legacy/testsets/__init__.py rename to sdk/tests/new_tests/auth/__init__.py diff --git a/sdk/tests/legacy/new_tests/auth/tests.py b/sdk/tests/new_tests/auth/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/auth/tests.py rename to sdk/tests/new_tests/auth/tests.py diff --git a/sdk/tests/new_tests/conftest.py b/sdk/tests/new_tests/conftest.py new file mode 100644 index 0000000000..762903c329 --- /dev/null +++ b/sdk/tests/new_tests/conftest.py @@ -0,0 +1,1131 @@ +import os +import uuid +import logging +import json +from json import loads +from traceback import format_exc +from typing import Optional, Any + +import boto3 +import httpx +import pytest +import agenta as ag +import pytest_asyncio +from dotenv import load_dotenv +from httpx import AsyncClient, Timeout +from pytest_asyncio import is_async_test + + +AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") +API_BASE_URL = f"{AGENTA_HOST}/api/" + + +def pytest_addoption(parser): + """Register the --env-file option.""" + + parser.addoption( + "--env-file", action="store", default=".env", help="Path to the .env file" + ) + + +def pytest_configure(config): + """Load the environment variables from the specified .env file.""" + env_file = config.getoption("--env-file") + print(f"Loading environment variables from: {env_file}") + load_dotenv(dotenv_path=env_file) + + +@pytest.fixture +def sample_testset_endpoint_json(): + return f"{API_BASE_URL}testsets/sample" + + +# Set global variables +AGENTA_SECRET_KEY = os.getenv("_SECRET_KEY", "AGENTA_AUTH_KEY") +AGENTA_SECRET_ARN = os.getenv("AGENTA_AUTH_KEY_SECRET_ARN", None) +AGENTA_HOST = os.getenv("AGENTA_HOST", "http://localhost") +API_BASE_URL = f"{AGENTA_HOST}/api/" +API_KEYS_MAPPING = { + "OPENAI_API_KEY": "openai", + "MISTRAL_API_KEY": "mistralai", + "COHERE_API_KEY": "cohere", + "ANTHROPIC_API_KEY": "anthropic", + "ANYSCALE_API_KEY": "anyscale", + "PERPLEXITYAI_API_KEY": "perplexityai", + "DEEPINFRA_API_KEY": "deepinfra", + "TOGETHERAI_API_KEY": "togetherai", + "ALEPHALPHA_API_KEY": "alephalpha", + "OPENROUTER_API_KEY": "openrouter", + "GROQ_API_KEY": "groq", + "GEMINI_API_KEY": "gemini", +} + + +logger = logging.getLogger(__name__) +logger.setLevel(logging.DEBUG) + + +def pytest_collection_modifyitems(items): + """ + Mark all tests to run inside the same event loop. + + NOTE: remove as soon as a solution for https://github.com/pytest-dev/pytest-asyncio/issues/793 is proposed and the issue closes + """ + + pytest_asyncio_tests = (item for item in items if is_async_test(item)) + session_scope_marker = pytest.mark.asyncio(loop_scope="class") + for async_test in pytest_asyncio_tests: + async_test.add_marker(session_scope_marker, append=False) + + +def fetch_secret() -> Optional[Any]: + try: + secret = os.getenv("AWS_SECRET_KEY") + return secret + + except: # pylint: disable=bare-except + logger.error("Failed to fetch secrets with: %s", format_exc()) + return None + + +async def ahttp_client(): + access_key = fetch_secret() + async with AsyncClient( + base_url=API_BASE_URL, + timeout=httpx.Timeout(timeout=6, read=None, write=5), + headers={"Authorization": f"Access {access_key}"}, + ) as client: + yield client + + +@pytest_asyncio.fixture(scope="class") +async def http_client(): + """ + Fixture to create an AsyncClient for API testing. + """ + + async with AsyncClient( + base_url=API_BASE_URL, + timeout=Timeout(timeout=6, read=None, write=5), + ) as client: + yield client + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_owner_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_owner_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": {f"{user_email}": {"name": {user_name}, "email": f"{user_email}"}}, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_paying_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": False, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_non_member_user(ahttp_client): + client = ahttp_client + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": False, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def create_programmatic_all_users(ahttp_client): + client = ahttp_client + users_data = {} + + roles = [ + "owner", + "editor", + "workspace_admin", + ] + for i in range(0, 3): + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}_{i}" + user_email = f"{user_name}@agenta.ai" + + users_data[user_email] = { + "user_name": user_name, + "user_email": user_email, + "organization": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + }, + "workspace": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": user_email}, + }, + "project": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": user_email}, + "organization_ref": {"slug": user_email}, + }, + "organization_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "organization_ref": {"slug": user_email}, + }, + "workspace_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "workspace_ref": {"slug": user_email}, + }, + "project_membership": { + "role": roles[i], + "is_demo": True, + "user_ref": {"slug": user_email}, + "project_ref": {"slug": user_email}, + }, + } + + json_payload = { + "users": { + email: {"name": data["user_name"], "email": data["user_email"]} + for email, data in users_data.items() + }, + "organizations": { + email: { + "name": data["organization"]["name"], + "description": data["organization"]["description"], + "is_paying": data["organization"]["is_paying"], + } + for email, data in users_data.items() + }, + "workspaces": { + email: { + "name": data["workspace"]["name"], + "description": data["workspace"]["description"], + "is_default": data["workspace"]["is_default"], + "organization_ref": data["workspace"]["organization_ref"], + } + for email, data in users_data.items() + }, + "projects": { + email: { + "name": data["project"]["name"], + "description": data["project"]["description"], + "is_default": data["project"]["is_default"], + "workspace_ref": data["project"]["workspace_ref"], + "organization_ref": data["project"]["organization_ref"], + } + for email, data in users_data.items() + }, + "organization_memberships": { + email: { + "role": data["organization_membership"]["role"], + "is_demo": data["organization_membership"]["is_demo"], + "user_ref": data["organization_membership"]["user_ref"], + "organization_ref": data["organization_membership"]["organization_ref"], + } + for email, data in users_data.items() + }, + "workspace_memberships": { + email: { + "role": data["workspace_membership"]["role"], + "is_demo": data["workspace_membership"]["is_demo"], + "user_ref": data["workspace_membership"]["user_ref"], + "workspace_ref": data["workspace_membership"]["workspace_ref"], + } + for email, data in users_data.items() + }, + "project_memberships": { + email: { + "role": data["project_membership"]["role"], + "is_demo": data["project_membership"]["is_demo"], + "user_ref": data["project_membership"]["user_ref"], + "project_ref": data["project_membership"]["project_ref"], + } + for email, data in users_data.items() + }, + } + + response = await client.post("admin/accounts", json=json_payload) + response.raise_for_status() + return { + email: response.json().get("projects", {}).get(email, {}).get(email, {}) + for email in users_data + } + + +async def get_user_profile(client: AsyncClient): + response = await client.get("profile") + + response.raise_for_status() + return response.json() + + +async def get_project(client: AsyncClient): + response = await client.get("projects") + + response.raise_for_status() + return response.json()[0] + + +def get_mock_response(): + mock_response = os.getenv("AUTH_IN_TESTS", "false").lower() == "false" + return mock_response + + +async def mocked_programmatic_user(): + mock_response = get_mock_response() + if mock_response: + profile_response = await get_user_profile(client=http_client) + project_response = await get_project(client=http_client) + return True, { + "project_id": project_response.get("project_id"), + "credentials": "ApiKey ", + "email": profile_response.get("email"), + "name": profile_response.get("name"), + } + + return False, {} + + +@pytest_asyncio.fixture(scope="class") +async def programmatic_user(): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data + + client = await ahttp_client().__anext__() + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +@pytest_asyncio.fixture(scope="class") +async def programmatic_non_member_user(): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data + + client = await ahttp_client().__anext__() + randomness = uuid.uuid4().hex[:8] + user_name = f"programmatic_test_user_{randomness}" + user_email = f"{user_name}@agenta.ai" + response = await client.post( + "admin/accounts", + json={ + "users": { + f"{user_email}": { + "name": user_name, + "email": f"{user_email}", + } + }, + "organizations": { + f"{user_email}": { + "name": f"{user_name}'s Organization", + "description": f"Organization belonging to {user_name}", + "is_paying": True, + } + }, + "workspaces": { + f"{user_email}": { + "name": f"{user_name}'s Workspace", + "description": f"Workspace belonging to {user_name}", + "is_default": True, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "projects": { + f"{user_email}": { + "name": f"{user_name}'s Project", + "description": f"Project belonging to {user_name}", + "is_default": True, + "workspace_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "organization_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "organization_ref": {"slug": f"{user_email}"}, + } + }, + "workspace_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "workspace_ref": {"slug": f"{user_email}"}, + } + }, + "project_memberships": { + f"{user_email}": { + "role": "owner", + "is_demo": True, + "user_ref": {"slug": f"{user_email}"}, + "project_ref": {"slug": f"{user_email}"}, + } + }, + }, + ) + response.raise_for_status() + return response.json().get("projects", {}).get(user_email, {}).get(user_email, {}) + + +async def create_app(client: AsyncClient, payload: dict, headers: dict): + response = await client.post( + "apps", + json=payload, + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data + + +async def create_variant( + client: AsyncClient, app_id: str, payload: dict, headers: dict +): + response = await client.post( + f"apps/{app_id}/variant/from-template", + json=payload, + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data + + +async def update_variant_parameters( + client: AsyncClient, variant_id: str, headers: dict +): + response = await client.put( + f"variants/{variant_id}/parameters", + json={ + "parameters": { + "prompt": { + "input_keys": ["country"], + "llm_config": { + "frequency_penalty": 0, + "model": "gpt-3.5-turbo", + "presence_penalty": 0, + "temperature": 0.2, + "top_p": 0.5, + }, + "messages": [ + { + "content": "You are an expert in geographyfc", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + } + }, + headers=headers, + ) + response.raise_for_status() + + +async def deploy_variant_to_environment( + client: AsyncClient, variant_id: str, environment_name: str, headers: dict +): + response = await client.post( + f"environments/deploy", + json={"environment_name": environment_name, "variant_id": variant_id}, + headers=headers, + ) + response.raise_for_status() + + +async def delete_application(client: AsyncClient, app_id: str, headers: dict): + response = await client.delete(url=f"apps/{app_id}", headers=headers) + response.raise_for_status() + + return response.status_code + + +@pytest_asyncio.fixture(scope="class") +async def create_app_and_variant( + http_client, programmatic_user, programmatic_non_member_user +): + app_payload = { + "app_name": f"app_{uuid.uuid4().hex[:8]}", + "template_key": "SERVICE:completion", + } + variant_payload = { + "variant_name": "app.key", + "key": "SERVICE:completion", + "base_name": "app", + "config_name": "key", + } + + user_scope_credentials = programmatic_user.get("credentials", None) + non_member_scope_credentials = programmatic_non_member_user.get("credentials", None) + headers = {"Authorization": user_scope_credentials} + + app_response = await create_app( + client=http_client, payload=app_payload, headers=headers + ) + variant_response = await create_variant( + client=http_client, + app_id=app_response.get("app_id", None), + payload=variant_payload, + headers=headers, + ) + await update_variant_parameters( + http_client, variant_response.get("variant_id"), headers + ) + await deploy_variant_to_environment( + http_client, + variant_response.get("variant_id"), + "production", + headers, + ) + yield { + "app": app_response, + "variant": variant_response, + "scope_project_id": programmatic_user.get("project", {}).get("id", ""), + "non_member_project_id": programmatic_non_member_user.get("project", {}).get( + "id", "" + ), + "credentials": user_scope_credentials, + "non_member_credentials": non_member_scope_credentials, + } + + await delete_application(http_client, app_response.get("app_id"), headers) + + +@pytest_asyncio.fixture(scope="class") +async def create_chat_app_and_variant(http_client, programmatic_user): + app_payload = { + "app_name": f"app_{uuid.uuid4().hex[:8]}", + "template_key": "SERVICE:completion", + } + variant_payload = { + "variant_name": "app.key", + "key": "SERVICE:completion", + "base_name": "app", + "config_name": "key", + } + + user_scope_credentials = programmatic_user.get("credentials", None) + headers = {"Authorization": user_scope_credentials} + + app_response = await create_app( + client=http_client, payload=app_payload, headers=headers + ) + variant_response = await create_variant( + client=http_client, + app_id=app_response.get("app_id", None), + payload=variant_payload, + headers=headers, + ) + yield { + "app": app_response, + "variant": variant_response, + "credentials": user_scope_credentials, + } + + await delete_application(http_client, app_response.get("app_id"), headers) + + +async def reset_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return mock_data.get("credentials", None), mock_data.get("project_id", None) + + response = await client.get("vault/v1/secrets", headers=headers) + response.raise_for_status() + + response_data = response.json() + + for secret in response_data: + delete_response = await client.delete( + f"vault/v1/secrets/{secret.get('id', '')}" + ) + delete_response.raise_for_status() + + +async def set_valid_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return + + for api_key_name in list(API_KEYS_MAPPING.keys()): + response = await client.post( + "vault/v1/secrets", + json={ + "header": {"name": API_KEYS_MAPPING[api_key_name], "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": API_KEYS_MAPPING[api_key_name], + "key": os.environ[api_key_name], + }, + }, + }, + headers=headers, + ) + response.raise_for_status() + + +async def set_invalid_llm_keys(client: AsyncClient, headers: dict): + is_mocked, mock_data = await mocked_programmatic_user() + if is_mocked: + return + + response = await client.get("vault/v1/secrets", headers=headers) + response.raise_for_status() + + response_data = response.json() + + for secret in response_data: + provider_name = secret.get("secret", {}).get("data", {}).get("provider") + response = await client.put( + f"vault/v1/secrets/{secret.get('id', '')}", + json={ + "header": {"name": provider_name, "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": provider_name, + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + response.raise_for_status() + + +@pytest.fixture +def get_all_supported_models(): + supported_llm_models = { + "Mistral AI": [ + "mistral/mistral-tiny", + "mistral/mistral-small", + "mistral/mistral-medium", + "mistral/mistral-large-latest", + ], + "Open AI": [ + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo", + "gpt-4", + "gpt-4o", + "gpt-4o-mini", + "gpt-4-1106-preview", + ], + "Gemini": ["gemini/gemini-1.5-pro-latest", "gemini/gemini-1.5-flash"], + "Cohere": [ + "cohere/command-light", + "cohere/command-r-plus", + "cohere/command-nightly", + ], + "Anthropic": [ + "anthropic/claude-3-5-sonnet-20240620", + "anthropic/claude-3-opus-20240229", + "anthropic/claude-3-sonnet-20240229", + "anthropic/claude-3-haiku-20240307", + "anthropic/claude-2.1", + "anthropic/claude-2", + "anthropic/claude-instant-1.2", + "anthropic/claude-instant-1", + ], + "Perplexity AI": [ + "perplexity/llama-3.1-sonar-small-128k-online", + "perplexity/llama-3.1-sonar-large-128k-online", + "perplexity/llama-3.1-sonar-huge-128k-online", + ], + "DeepInfra": [ + "deepinfra/meta-llama/Llama-2-70b-chat-hf", + "deepinfra/meta-llama/Llama-2-13b-chat-hf", + "deepinfra/codellama/CodeLlama-34b-Instruct-hf", + "deepinfra/mistralai/Mistral-7B-Instruct-v0.1", + "deepinfra/jondurbin/airoboros-l2-70b-gpt4-1.4.1", + ], + "Together AI": [ + "together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo", + "together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", + ], + "OpenRouter": [ + "openrouter/openai/gpt-3.5-turbo", + "openrouter/openai/gpt-3.5-turbo-16k", + "openrouter/google/palm-2-chat-bison", + "openrouter/google/palm-2-codechat-bison", + "openrouter/meta-llama/llama-2-13b-chat", + ], + "Groq": [ + "groq/llama-3.1-8b-instant", + "groq/llama-3.1-70b-versatile", + "groq/llama3-8b-8192", + "groq/llama3-70b-8192", + "groq/mixtral-8x7b-32768", + ], + } + flattened_models = [ + model for models in supported_llm_models.values() for model in models + ] + return flattened_models + + +async def fetch_trace_by_trace_id(client: AsyncClient, headers: dict, project_id: str): + response = await client.get( + f"observability/v1/traces?project_id={project_id}", headers=headers + ) + response.raise_for_status() + + return response.json() + + +async def fetch_variant_revision(client: AsyncClient, headers: dict, variant_id: str): + response = await client.get( + f"variants/{variant_id}/revisions", + headers=headers, + ) + response.raise_for_status() + + response_data = response.json() + return response_data[-1] + + +async def fetch_app_environment_revisions( + client: AsyncClient, app_id: str, environment_name: str, headers: dict +): + response = await client.get( + f"apps/{app_id}/revisions/{environment_name}", + headers=headers, + ) + response.raise_for_status() + + return response.json() + + +@pytest.fixture +def valid_run_generate_payload(): + return { + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "max_tokens": 200, + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + } + + +@pytest.fixture +def invalid_run_generate_payload(): + return { + "ag_config": { + "prompt": { + "llm_configs": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "input": {"country": "France"}, + } + + +@pytest.fixture +def valid_parameters_payload(): + return { + "prompt": { + "messages": [ + {"role": "system", "content": "You are an expert in geographyfc"}, + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "input_keys": ["country"], + "llm_config": { + "model": "gpt-3.5-turbo", + "top_p": 0.5, + "temperature": 0.2, + "presence_penalty": 0, + "frequency_penalty": 0, + }, + "template_format": "fstring", + } + } + + +def exclude_lifecycle(data): + """ + Recursively exclude the 'lifecycle' field with its 'created_at' value. + """ + + if isinstance(data, dict): + # Check if the 'lifecycle' field is present and remove it + if "lifecycle" in data: + del data["lifecycle"] + # Recursively apply to all key-value pairs + return {k: exclude_lifecycle(v) for k, v in data.items()} + elif isinstance(data, list): + # Recursively apply to all list items + return [exclude_lifecycle(item) for item in data] + return data + + +def exact_match(obj1, obj2): + """ + Compares two JSON-like objects for exact match by normalizing their key order. + """ + + obj1_normalized = json.dumps(obj1, sort_keys=True) + obj2_normalized = json.dumps(obj2, sort_keys=True) + + return obj1_normalized == obj2_normalized + + +def initialize_agenta( + api_key: str, +): + ag.DEFAULT_AGENTA_SINGLETON_INSTANCE.api_key = None + ag.init(api_key=api_key) diff --git a/sdk/tests/legacy/new_tests/pytest.ini b/sdk/tests/new_tests/pytest.ini similarity index 100% rename from sdk/tests/legacy/new_tests/pytest.ini rename to sdk/tests/new_tests/pytest.ini diff --git a/sdk/tests/new_tests/requirements.test.txt b/sdk/tests/new_tests/requirements.test.txt new file mode 100644 index 0000000000..a89e1f3d80 --- /dev/null +++ b/sdk/tests/new_tests/requirements.test.txt @@ -0,0 +1,9 @@ +pytest-asyncio==0.24.0 +pytest-xdist==3.6.1 +uvicorn==0.34.0 +requests==2.32.3 +pexpect==4.9.0 +boto3==1.35.87 +httpx>=0.24,<0.28 +python-dotenv==1.0.0 +fastapi>=0.100.0 \ No newline at end of file diff --git a/api/oss/tests/legacy/workflows/__init__.py b/sdk/tests/new_tests/sdk/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/__init__.py rename to sdk/tests/new_tests/sdk/__init__.py diff --git a/api/oss/tests/legacy/workflows/admin/__init__.py b/sdk/tests/new_tests/sdk/apps/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/admin/__init__.py rename to sdk/tests/new_tests/sdk/apps/__init__.py diff --git a/sdk/tests/new_tests/sdk/apps/tests.py b/sdk/tests/new_tests/sdk/apps/tests.py new file mode 100644 index 0000000000..347073fcf1 --- /dev/null +++ b/sdk/tests/new_tests/sdk/apps/tests.py @@ -0,0 +1,429 @@ +import uuid + +import pytest +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestAppsManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_create_app_successfully(self, http_client, setup_class_fixture): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ASSERT + assert response.app_name == app_name + assert isinstance( + response.model_dump(), dict + ), "Response data is not a dictionary." + + # CLEANUP + await delete_application( + http_client, response.app_id, {"Authorization": scope_credentials} + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_app_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.AppManager.acreate( + project_id=scope_project_id, + ) + + # ASSERT + assert ( + response + == "TypeError: AppManager.create() missing 1 required keyword-only argument: 'app_name'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_create_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_name = str(uuid.uuid4()) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_member_credentials", "" + # ) + # ag.init(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.acreate( + # app_name=app_name, + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.functional + async def test_create_app_unsuccessfully_due_to_invalid_credentials( + self, setup_class_fixture + ): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + ag.init(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_list_apps_successfully(self, http_client, setup_class_fixture): + # ARRANGE + app_name = str(uuid.uuid4()) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials" + ) + ag.init(api_key=scope_credentials.strip("ApiKey ")) + await ag.AppManager.acreate( + app_name=app_name, + project_id=scope_project_id, + ) + + # ACT + list_apps_response = await ag.AppManager.alist() + + # ASSERT + assert len(list_apps_response) >= 1 + assert isinstance(list_apps_response, list) + + # CLEANUP + for app_response in list_apps_response: + await delete_application( + http_client, app_response.app_id, {"Authorization": scope_credentials} + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_list_apps_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # non_member_headers = {"Authorization": non_member_credentials} + + # # ACT + # response = await http_client.get( + # f"apps/?project_id={scope_project_id}", + # headers=non_member_headers, + # ) + # response_data = response.json() + + # # ASSERT + # assert response.status_code == 403 + # assert ( + # response_data["detail"] + # == "You do not have access to perform this action. Please contact your organization admin." + # ) + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_list_apps_unsuccessfully_due_to_invalid_credentials(self): + # ARRANGE + ag.init(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.alist() + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_update_app_successfully(self, setup_class_fixture): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + app_id = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_id", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.aupdate( + app_id=app_id, + app_name=app_name, + ) + + # ASSERT + assert response.app_name == app_name + assert isinstance(response.model_dump(), dict) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_update_app_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.AppManager.aupdate( + application_id=app_id, + ) + + # ASSERT + assert ( + response + == "TypeError: AppManager.aupdate() got an unexpected keyword argument 'application_id'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_update_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.aupdate( + # app_id=app_id, + # app_name=app_name, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_update_app_unsuccessfully_due_to_invalid_credentials( + self, setup_class_fixture + ): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + initialize_agenta(api_key="xxxxx") + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.aupdate( + app_id=app_id, + app_name=app_name, + ) + + # ASSERT + assert exc_info.value.status_code == 401 + assert exc_info.value.body == "Unauthorized" + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.functional + @pytest.mark.typical + async def test_update_app_unsuccessfully_due_to_invalid_app_id( + self, setup_class_fixture + ): + # ARRANGE + app_name = f"updated_{str(uuid.uuid4().hex[:8])}" + invalid_app_id = str(uuid.uuid4()) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.aupdate( + app_id=invalid_app_id, + app_name=app_name, + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == { + "detail": f"No application with ID '{invalid_app_id}' found" + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_delete_app_successfully(self, setup_class_fixture): + # ARRANGE + app_id = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_id", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.AppManager.adelete( + app_id=app_id, + ) + + # ASSERT + assert response is None + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_delete_app_unsuccessfully_due_to_invalid_scope( + # self, setup_class_fixture + # ): + # # ARRANGE + # app_id = setup_class_fixture["app_variant_response"].get("app_id", None) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.AppManager.adelete( + # app_id=app_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.functional + async def test_delete_app_unsuccessfully_due_to_invalid_app_id( + self, setup_class_fixture + ): + # ARRANGE + invalid_app_id = str(uuid.uuid4()) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.AppManager.adelete( + app_id=invalid_app_id, + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == { + "detail": f"No application with ID '{invalid_app_id}' found" + } diff --git a/api/oss/tests/legacy/workflows/auth/__init__.py b/sdk/tests/new_tests/sdk/deployments/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/auth/__init__.py rename to sdk/tests/new_tests/sdk/deployments/__init__.py diff --git a/sdk/tests/new_tests/sdk/deployments/tests.py b/sdk/tests/new_tests/sdk/deployments/tests.py new file mode 100644 index 0000000000..d1be029685 --- /dev/null +++ b/sdk/tests/new_tests/sdk/deployments/tests.py @@ -0,0 +1,154 @@ +import pytest + +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestDeploymentManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_deploy_success_with_variant_ref_slug(self, setup_class_fixture): + # ARRANGE + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.DeploymentManager.adeploy( + variant_slug=variant_slug, + environment_slug="production", + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_deploy_not_successful_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.DeploymentManager.adeploy( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: DeploymentManager.adeploy() missing 1 required keyword-only argument: 'environment_slug'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_deploy_not_successful_due_to_no_config(self, setup_class_fixture): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.DeploymentManager.adeploy( + variant_slug="default.appvariant", + variant_version=3, + environment_slug="production", + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_deploy_not_successful_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = fetch_variant_revision(http_client, headers, variant_id) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # ag.init(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.DeploymentManager.adeploy( + # variant_slug=variant_revision.get("config_name"), + # variant_version=variant_revision.get("revision", None), + # environment_slug="production", + # # scope arguments + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } diff --git a/api/oss/tests/legacy/workflows/config/__init__.py b/sdk/tests/new_tests/sdk/secrets/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/config/__init__.py rename to sdk/tests/new_tests/sdk/secrets/__init__.py diff --git a/sdk/tests/new_tests/sdk/secrets/tests.py b/sdk/tests/new_tests/sdk/secrets/tests.py new file mode 100644 index 0000000000..9bb67b0b1d --- /dev/null +++ b/sdk/tests/new_tests/sdk/secrets/tests.py @@ -0,0 +1,103 @@ +import pytest + +from tests.conftest import * + + +class TestSecretsCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.grumpy + @pytest.mark.typical + @pytest.mark.security + async def test_completion_generate_with_valid_secrets_and_invalid_scope( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_valid_llm_keys(http_client, headers) + scope_project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + non_member_credentials = setup_class_fixture["app_variant_response"].get( + "non_scope_credentials", None + ) + non_member_headers = {"Authorization": non_member_credentials} + + # ACT + response = await http_client.post( + f"{service_url}/generate?project_id={scope_project_id}", + json=payload, + headers=non_member_headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 403 + assert response_data["detail"] == "Service execution not allowed." + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_completion_generate_with_valid_secrets( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_valid_llm_keys(http_client, headers) + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_completion_generate_with_invalid_secrets( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + await set_invalid_llm_keys(http_client, headers) + + # ACT + response = await http_client.post( + f"{service_url}/generate?middleware_cache_enabled=false", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 401 + assert ( + "litellm.AuthenticationError: AuthenticationError: OpenAIException" + in response_data["detail"].get("message", "") + ) diff --git a/api/oss/tests/legacy/workflows/core/__init__.py b/sdk/tests/new_tests/sdk/variants/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/core/__init__.py rename to sdk/tests/new_tests/sdk/variants/__init__.py diff --git a/sdk/tests/new_tests/sdk/variants/tests.py b/sdk/tests/new_tests/sdk/variants/tests.py new file mode 100644 index 0000000000..771d0ee25f --- /dev/null +++ b/sdk/tests/new_tests/sdk/variants/tests.py @@ -0,0 +1,502 @@ +import uuid + +import pytest +import agenta as ag +from agenta.client.core.api_error import ApiError + +from tests.conftest import * + + +class TestVariantManagerCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_create_variant_successfully( + self, setup_class_fixture, valid_parameters_payload + ): + # ARRANGE + payload = valid_parameters_payload + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + new_variant_slug = f"{variant_slug}_{uuid.uuid4().hex[:4]}" + + # ACT + response = await ag.VariantManager.acreate( + parameters=payload, + variant_slug=new_variant_slug, + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert new_variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_variant_unsuccessfully_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.acreate( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: VariantManager.acreate() missing 1 required keyword-only argument: 'parameters'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_create_variant_unsuccessfully_due_to_no_config( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.VariantManager.acreate( + parameters={}, + variant_slug="default.appvariant", + app_id=str(uuid.uuid4().hex), + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_create_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture, valid_parameters_payload + # ): + # # ARRANGE + # payload = valid_parameters_payload + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # application_name = ( + # setup_class_fixture["app_variant_response"] + # .get("app", {}) + # .get("app_name", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.acreate( + # parameters=payload, + # variant_slug=variant_revision.get("config_name"), + # app_slug=application_name, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_commit_variant_successfully( + self, setup_class_fixture, valid_parameters_payload + ): + # ARRANGE + payload = valid_parameters_payload + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.acommit( + parameters=payload, + variant_slug=variant_slug, + app_slug=application_name, + ) + response_data = response.model_dump() + + # ASSERT + assert response is not None + assert isinstance(response_data, dict) + assert variant_slug == response_data["variant_slug"] + assert application_name == response_data["app_slug"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_commit_variant_unsuccessfully_due_to_invalid_payload( + self, http_client, setup_class_fixture + ): + # ARRANGE + headers = setup_class_fixture["headers"] + variant_id = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("variant_id", None) + ) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.acommit( + variant_slug=variant_revision.get("config_name"), + ) + + # ASSERT + assert ( + response + == "TypeError: VariantManager.acommit() missing 1 required keyword-only argument: 'parameters'" + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_commit_variant_unsuccessfully_due_to_no_config( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(ApiError) as exc_info: + await ag.VariantManager.acommit( + parameters={}, + variant_slug="default.appvariant", + app_id=str(uuid.uuid4().hex), + ) + + # ASSERT + assert exc_info.value.status_code == 404 + assert exc_info.value.body == {"detail": "Config not found."} + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_commit_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.acommit( + # variant_slug=variant_revision.get("config_name"), + # variant_version=variant_revision.get("revision", None), + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_list_variants_successfully(self, setup_class_fixture): + # ARRANGE + application_name = ( + setup_class_fixture["app_variant_response"] + .get("app", {}) + .get("app_name", None) + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.alist( + app_slug=application_name, + ) + + # ASSERT + assert response is not None + assert isinstance(response, list) + assert len(response) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_list_variants_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.alist(application_slug="name") + + # ASSERT + assert ( + response + == "TypeError: VariantManager.alist() got an unexpected keyword argument 'application_slug'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_list_variants_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.alist( + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + @pytest.mark.typical + async def test_delete_variant_successfully(self, setup_class_fixture): + # ARRANGE + variant_slug = ( + setup_class_fixture["app_variant_response"] + .get("variant", {}) + .get("config_name") + ) + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.adelete( + variant_slug=variant_slug, + ) + + # ASSERT + assert response is not None + assert response == 204 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_delete_variant_unsuccessfully_due_to_non_existent_config( + self, http_client, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + response = await ag.VariantManager.adelete(variant_slug=str(uuid.uuid4().hex)) + + # ASSERT + assert response == 204 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_delete_variant_unsuccessfully_due_to_invalid_payload( + self, setup_class_fixture + ): + # ARRANGE + scope_credentials = setup_class_fixture["app_variant_response"].get( + "credentials", "" + ) + scope_api_key = scope_credentials.strip("ApiKey ") + initialize_agenta(api_key=scope_api_key) + + # ACT + with pytest.raises(TypeError): + response = await ag.VariantManager.adelete() + + # ASSERT + assert ( + response + == "TypeError: VariantManager.adelete() missing 1 required keyword-only argument: 'variant_slug'" + ) + + # @pytest.mark.asyncio + # @pytest.mark.grumpy + # @pytest.mark.typical + # @pytest.mark.security + # async def test_delete_variant_unsuccessfully_due_to_invalid_scope( + # self, http_client, setup_class_fixture + # ): + # # ARRANGE + # variant_id = ( + # setup_class_fixture["app_variant_response"] + # .get("variant", {}) + # .get("variant_id", None) + # ) + # headers = setup_class_fixture["headers"] + # variant_revision = await fetch_variant_revision( + # http_client, headers, variant_id + # ) + # scope_project_id = setup_class_fixture["app_variant_response"].get( + # "scope_project_id", None + # ) + # non_member_credentials = setup_class_fixture["app_variant_response"].get( + # "non_scope_credentials", None + # ) + # initialize_agenta(api_key=non_member_credentials.strip("ApiKey ")) + + # # ACT + # with pytest.raises(ApiError) as exc_info: + # await ag.VariantManager.adelete( + # variant_slug=variant_revision.get("config_name"), + # project_id=scope_project_id, + # ) + + # # ASSERT + # assert exc_info.value.status_code == 403 + # assert exc_info.value.body == { + # "detail": "You do not have access to perform this action. Please contact your organization admin." + # } diff --git a/api/oss/tests/legacy/workflows/health/__init__.py b/sdk/tests/new_tests/testsets/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/health/__init__.py rename to sdk/tests/new_tests/testsets/__init__.py diff --git a/sdk/tests/legacy/new_tests/testsets/assets/baby_names.csv b/sdk/tests/new_tests/testsets/assets/baby_names.csv similarity index 100% rename from sdk/tests/legacy/new_tests/testsets/assets/baby_names.csv rename to sdk/tests/new_tests/testsets/assets/baby_names.csv diff --git a/sdk/tests/legacy/new_tests/testsets/fixtures.py b/sdk/tests/new_tests/testsets/fixtures.py similarity index 100% rename from sdk/tests/legacy/new_tests/testsets/fixtures.py rename to sdk/tests/new_tests/testsets/fixtures.py diff --git a/sdk/tests/legacy/new_tests/testsets/tests.py b/sdk/tests/new_tests/testsets/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/testsets/tests.py rename to sdk/tests/new_tests/testsets/tests.py diff --git a/sdk/tests/legacy/new_tests/vault_router/__pytest.ini b/sdk/tests/new_tests/vault_router/__pytest.ini similarity index 100% rename from sdk/tests/legacy/new_tests/vault_router/__pytest.ini rename to sdk/tests/new_tests/vault_router/__pytest.ini diff --git a/sdk/tests/legacy/new_tests/vault_router/conftest.py b/sdk/tests/new_tests/vault_router/conftest.py similarity index 100% rename from sdk/tests/legacy/new_tests/vault_router/conftest.py rename to sdk/tests/new_tests/vault_router/conftest.py diff --git a/sdk/tests/legacy/new_tests/vault_router/test_vault_secrets_apis.py b/sdk/tests/new_tests/vault_router/test_vault_secrets_apis.py similarity index 100% rename from sdk/tests/legacy/new_tests/vault_router/test_vault_secrets_apis.py rename to sdk/tests/new_tests/vault_router/test_vault_secrets_apis.py diff --git a/api/oss/tests/legacy/workflows/litellm/__init__.py b/sdk/tests/new_tests/workflows/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/litellm/__init__.py rename to sdk/tests/new_tests/workflows/__init__.py diff --git a/api/oss/tests/legacy/workflows/mock/__init__.py b/sdk/tests/new_tests/workflows/admin/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/mock/__init__.py rename to sdk/tests/new_tests/workflows/admin/__init__.py diff --git a/sdk/tests/legacy/new_tests/workflows/admin/tests.py b/sdk/tests/new_tests/workflows/admin/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/workflows/admin/tests.py rename to sdk/tests/new_tests/workflows/admin/tests.py diff --git a/api/oss/tests/legacy/workflows/observability/__init__.py b/sdk/tests/new_tests/workflows/auth/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/observability/__init__.py rename to sdk/tests/new_tests/workflows/auth/__init__.py diff --git a/sdk/tests/legacy/new_tests/workflows/auth/tests.py b/sdk/tests/new_tests/workflows/auth/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/workflows/auth/tests.py rename to sdk/tests/new_tests/workflows/auth/tests.py diff --git a/api/oss/tests/legacy/workflows/openapi/__init__.py b/sdk/tests/new_tests/workflows/config/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/openapi/__init__.py rename to sdk/tests/new_tests/workflows/config/__init__.py diff --git a/sdk/tests/new_tests/workflows/config/tests.py b/sdk/tests/new_tests/workflows/config/tests.py new file mode 100644 index 0000000000..17e1c87994 --- /dev/null +++ b/sdk/tests/new_tests/workflows/config/tests.py @@ -0,0 +1,286 @@ +import uuid + +import pytest + +from tests.conftest import ( + fetch_variant_revision, + set_valid_llm_keys, + fetch_app_environment_revisions, +) + + +class TestServiceConfig: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, http_client, get_mock_response, create_app_and_variant + ): + app_variant_response = create_app_and_variant + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return app_variant_response + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_refs(self, http_client, setup_class_fixture): + # ARRANGE + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id=&application_slug=&variant_id=&variant_slug=&environment_id=&environment_slug=&environment_version=", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_ref_and_variant_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_version = 0 + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + custom_headers = {"Authorization": setup_class_fixture.get("credentials", None)} + + # ACT + response = await http_client.post( + f"{service_url}/run?mock=hello&variant_slug={variant_slug}&variant_version={variant_version}", + json=payload, + headers=custom_headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_ref_and_environment_ref_id( + self, http_client, setup_class_fixture + ): + # ARRANGE + environment_id = None + environment_slug = None + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_and_invalid_variant_ref( + self, http_client, setup_class_fixture + ): + # ARRANGE + variant_id = str(uuid.uuid4()) + variant_slug = "my-variant" + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_service_with_missing_application_and_invalid_environment_ref( + self, http_client, setup_class_fixture + ): + # ARRANGE + environment_id = str(uuid.uuid4()) + environment_slug = "pre-production" + application_id = None + application_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_variant_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + variant_revision = await fetch_variant_revision( + http_client, headers, variant_id + ) + variant_revision_id = variant_revision.get("id", None) + + # ACT + response = await http_client.post( + f"{service_url}/generate?variant_id={variant_revision_id}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_variant_ref_excluding_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + variant_version = 1 # this is 1 because there's a fixture that creates it + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/generate?application_id=&application_slug=&variant_version={variant_version}&variant_slug={variant_slug}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_environment_ref_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + app_id = setup_class_fixture.get("app", {}).get("app_id", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + environment_revisions = await fetch_app_environment_revisions( + http_client, app_id, "production", headers + ) + environment_revision_id = environment_revisions.get("revisions")[-1].get( + "id", "" + ) + + # ACT + response = await http_client.post( + f"{service_url}/generate?environment_id={environment_revision_id}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.happy + @pytest.mark.functional + async def test_service_with_environment_ref_excluding_id( + self, http_client, setup_class_fixture, valid_run_generate_payload + ): + # ARRANGE + payload = valid_run_generate_payload + environment_version = 1 # this is 1 because there's a fixture that creates it + environment_slug = ( + "production" # by default, this gets created along with the variant + ) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/generate?environment_version={environment_version}&environment_slug={environment_slug}", + headers=headers, + json=payload, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "tree" in response_data + assert len(response_data.get("tree", {}).get("nodes", [])) >= 1 diff --git a/api/oss/tests/legacy/workflows/permissions/__init__.py b/sdk/tests/new_tests/workflows/core/__init__.py similarity index 100% rename from api/oss/tests/legacy/workflows/permissions/__init__.py rename to sdk/tests/new_tests/workflows/core/__init__.py diff --git a/sdk/tests/new_tests/workflows/core/tests.py b/sdk/tests/new_tests/workflows/core/tests.py new file mode 100644 index 0000000000..ae0431c10e --- /dev/null +++ b/sdk/tests/new_tests/workflows/core/tests.py @@ -0,0 +1,242 @@ +import uuid + +import pytest + +from tests.conftest import * + + +class TestServiceCore: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant): + app_variant_response = create_app_and_variant + return app_variant_response + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_config(self, http_client, setup_class_fixture): + # ARRANGE + variant_id = None + variant_slug = None + application_id = None + application_slug = None + environment_id = None + environment_slug = None + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_available_config_with_invalid_config( + self, http_client, setup_class_fixture + ): + # ARRANGE + variant_id = str(uuid.uuid4()) + variant_slug = "new-variant" + application_id = str(uuid.uuid4()) + application_slug = "my-app" + environment_id = str(uuid.uuid4()) + environment_slug = "pre-production" + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}&environment_id={environment_id}&environment_slug={environment_slug}", + headers=headers, + json={"inputs": ""}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 400 + assert ( + response_data.get("detail") + == "Config not found based on provided references." + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_variables(self, http_client, setup_class_fixture): + # ARRANGE + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + application_id = setup_class_fixture.get("app", {}).get("app_id", None) + application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json={}, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data.get("detail") == [ + { + "input": None, + "loc": ["body", "inputs"], + "msg": "Field required", + "type": "missing", + } + ] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_available_variables_with_invalid_variables( + self, http_client, invalid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + expected_status = 422 + payload = invalid_run_generate_payload + variant_id = setup_class_fixture.get("variant", {}).get("variant_id", None) + variant_slug = setup_class_fixture.get("variant", {}).get("variant_name", None) + application_id = setup_class_fixture.get("app", {}).get("app_id", None) + application_slug = setup_class_fixture.get("variant", {}).get("app_name", None) + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/run?application_id={application_id}&application_slug={application_slug}&variant_id={variant_id}&variant_slug={variant_slug}", + headers=headers, + json=payload, + ) + response_data = response.json().get("detail", []) + + # ASSERT + assert response.status_code == expected_status + assert response_data[0].get("msg") == "Field required" + assert isinstance(response_data, list) + assert response_data[0].get("loc") == ["body", "inputs"] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + async def test_missing_model( + self, http_client, valid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + payload = valid_run_generate_payload + headers = {"Authorization": setup_class_fixture.get("credentials", None)} + service_url = setup_class_fixture.get("variant", {}).get("uri", None) + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 424 + assert "API key not found for model" in response_data["detail"].get( + "message", None + ) + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.functional + @pytest.mark.not_available_in_oss + async def test_missing_provider_key( + self, + http_client, + setup_class_fixture, + ): + # ARRANGE + expected_status = 422 + app_variant_response = setup_class_fixture + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # ACT + response = await http_client.post( + "vault/v1/secrets", + json={ + "header": {"name": "OpenAI", "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + response_data = response.json().get("detail", []) + + # ASSERT + assert response.status_code == expected_status + assert response_data[0].get("msg") == "Field required" + assert isinstance(response_data, list) + assert response_data[0].get("loc") == [ + "body", + "secret", + "data", + "provider", + ] + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.security + @pytest.mark.not_available_in_oss + async def test_available_provider_key_with_invalid_provider_key( + self, + http_client, + setup_class_fixture, + ): + # ARRANGE + app_variant_response = setup_class_fixture + llm_api_keys_names = list(API_KEYS_MAPPING.keys()) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # ACT + list_of_status_codes = [] + for llm_api_key_name in llm_api_keys_names: + response = await http_client.post( + "vault/v1/secrets", + json={ + "header": {"name": llm_api_key_name, "description": ""}, + "secret": { + "kind": "provider_key", + "data": { + "provider": "", + "key": str(uuid.uuid4().hex[:14]), + }, + }, + }, + headers=headers, + ) + list_of_status_codes.append(response.status_code) + + # ASSERT + assert list_of_status_codes.count(422) == 12 diff --git a/api/oss/tests/manual/__init__.py b/sdk/tests/new_tests/workflows/health/__init__.py similarity index 100% rename from api/oss/tests/manual/__init__.py rename to sdk/tests/new_tests/workflows/health/__init__.py diff --git a/sdk/tests/legacy/new_tests/workflows/health/tests.py b/sdk/tests/new_tests/workflows/health/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/workflows/health/tests.py rename to sdk/tests/new_tests/workflows/health/tests.py diff --git a/api/oss/tests/manual/workflows/__init__.py b/sdk/tests/new_tests/workflows/litellm/__init__.py similarity index 100% rename from api/oss/tests/manual/workflows/__init__.py rename to sdk/tests/new_tests/workflows/litellm/__init__.py diff --git a/sdk/tests/new_tests/workflows/litellm/tests.py b/sdk/tests/new_tests/workflows/litellm/tests.py new file mode 100644 index 0000000000..90aca45cf0 --- /dev/null +++ b/sdk/tests/new_tests/workflows/litellm/tests.py @@ -0,0 +1,159 @@ +import pytest + +from tests.conftest import * + + +class TestLitellmCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_completion_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_chat_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_chat_generate_with_multiple_messages( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json={ + "messages": [ + {"role": "assistant", "content": "You are an expert in Geography."}, + {"role": "user", "content": "What is the capital of {country}?"}, + {"role": "assistant", "content": "The capital of France is Paris."}, + { + "role": "user", + "content": "How many states are there in {country}?", + }, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.slow + @pytest.mark.functional + async def test_completion_generate_with_all_models( + self, + http_client, + valid_run_generate_payload, + setup_class_fixture, + get_all_supported_models, + ): + # ARRANGE + payload = valid_run_generate_payload + headers = setup_class_fixture["headers"] + service_url = setup_class_fixture["service_url"] + supported_models = get_all_supported_models + number_of_working_models = 28 + + # ACT + list_of_status_codes = [] + for supported_model in supported_models: + payload["ag_config"]["prompt"]["llm_config"]["model"] = supported_model + response = await http_client.post( + f"{service_url}/generate", + json=payload, + headers=headers, + ) + list_of_status_codes.append(response.status_code) + + # ASSERT + assert list_of_status_codes.count(200) == number_of_working_models + # assert list_of_status_codes.count(424) == ( + # len(supported_models) - number_of_working_models + # ) diff --git a/api/oss/tests/pytest/annotations/__init__.py b/sdk/tests/new_tests/workflows/mock/__init__.py similarity index 100% rename from api/oss/tests/pytest/annotations/__init__.py rename to sdk/tests/new_tests/workflows/mock/__init__.py diff --git a/sdk/tests/new_tests/workflows/mock/chat_tests.py b/sdk/tests/new_tests/workflows/mock/chat_tests.py new file mode 100644 index 0000000000..e4f1a13a3e --- /dev/null +++ b/sdk/tests/new_tests/workflows/mock/chat_tests.py @@ -0,0 +1,187 @@ +import pytest + +from tests.conftest import * + + +class TestMockChat: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_chat_app_and_variant, http_client + ): + app_variant_response = create_chat_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate?mock=hello", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate_with_multiple_messages( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate?mock=hello", + json={ + "messages": [ + {"role": "assistant", "content": "You are an expert in Geography."}, + {"role": "user", "content": "What is the capital of {country}?"}, + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + assert response_data["data"] == "content='world'" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_generate_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data == { + "detail": [ + { + "type": "missing", + "loc": ["body", "inputs"], + "msg": "Field required", + "input": None, + } + ] + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_run_with_invalid_inputs(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/run", + json={"input": {"messages": "What is the capital of France?"}}, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_test(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "messages": [ + {"role": "user", "content": "What is the capital of {country}?"} + ], + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert "data" in response_data + assert response_data["data"] == "content='world'" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_chat_test_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "inputs": [ + {"role": "user", "content": "What is the capital of France?"} + ] + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 + assert response_data == { + "detail": [ + { + "type": "missing", + "loc": ["body", "messages"], + "msg": "Field required", + "input": None, + } + ] + } diff --git a/sdk/tests/new_tests/workflows/mock/completion_tests.py b/sdk/tests/new_tests/workflows/mock/completion_tests.py new file mode 100644 index 0000000000..4fc4a334fe --- /dev/null +++ b/sdk/tests/new_tests/workflows/mock/completion_tests.py @@ -0,0 +1,152 @@ +import pytest + +from tests.conftest import * + + +class TestMockCompletion: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_run(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/generate?mock=hello", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + assert response_data["data"] == "world" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_run_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/run", + json={ + "input": {"country_name": "France"}, + }, + headers=headers, + ) + + # ASSERT + assert response.status_code == 422 + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_test(self, http_client, setup_class_fixture): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test?mock=hello", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "version" in response_data + assert response_data["data"] == "world" + + @pytest.mark.asyncio + @pytest.mark.functional + async def test_completion_test_with_invalid_inputs( + self, http_client, setup_class_fixture + ): + # ARRANGE + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + + # ACT + response = await http_client.post( + f"{service_url}/test", + json={ + "messages": ["France"], + "input": {"country_name": "France"}, + }, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 422 diff --git a/api/oss/tests/pytest/evaluations/__init__.py b/sdk/tests/new_tests/workflows/observability/__init__.py similarity index 100% rename from api/oss/tests/pytest/evaluations/__init__.py rename to sdk/tests/new_tests/workflows/observability/__init__.py diff --git a/sdk/tests/new_tests/workflows/observability/tests.py b/sdk/tests/new_tests/workflows/observability/tests.py new file mode 100644 index 0000000000..12d4a461c2 --- /dev/null +++ b/sdk/tests/new_tests/workflows/observability/tests.py @@ -0,0 +1,75 @@ +import pytest + +from tests.conftest import * + + +class TestObservabilityCoverage: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture( + self, get_mock_response, create_app_and_variant, http_client + ): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys (only when authentication is required) + mock_response = get_mock_response + if not mock_response: + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.happy + @pytest.mark.functional + async def test_completion_generate_observability_tree( + self, http_client, valid_run_generate_payload, setup_class_fixture + ): + # ARRANGE + payload = valid_run_generate_payload + service_url = setup_class_fixture["service_url"] + headers = setup_class_fixture["headers"] + project_id = setup_class_fixture["app_variant_response"].get( + "scope_project_id", None + ) + + # ACT + response = await http_client.post( + f"{service_url}/generate", + json=payload, + headers=headers, + ) + response_data = response.json() + + # ASSERT + assert response.status_code == 200 + assert response_data["content_type"] == "text/plain" + assert "data" in response_data and "tree" in response_data + + # Get observability tree + trace_responses = await fetch_trace_by_trace_id( + http_client, headers, project_id=project_id + ) + + # Compare tree structures + workflow_response = response_data + observability_response = trace_responses + + # Step 1: Exclude lifecycle attribute from response(s) + workflow_response_final = exclude_lifecycle(workflow_response) + observability_response_final = exclude_lifecycle(observability_response) + + # Step 2: Compare structures with Jest-like matcher + workflow_nodes = workflow_response_final.get("tree", {}).get("nodes", []) + observability_nodes = observability_response_final.get("trees", {})[0].get( + "nodes", [] + ) + + is_match = exact_match(workflow_nodes, observability_nodes) + assert ( + is_match is True + ), "Workflow nodes does not match nodes from observability" diff --git a/api/oss/tests/pytest/evaluators/__init__.py b/sdk/tests/new_tests/workflows/openapi/__init__.py similarity index 100% rename from api/oss/tests/pytest/evaluators/__init__.py rename to sdk/tests/new_tests/workflows/openapi/__init__.py diff --git a/sdk/tests/legacy/new_tests/workflows/openapi/tests.py b/sdk/tests/new_tests/workflows/openapi/tests.py similarity index 100% rename from sdk/tests/legacy/new_tests/workflows/openapi/tests.py rename to sdk/tests/new_tests/workflows/openapi/tests.py diff --git a/api/oss/tests/pytest/healthchecks/__init__.py b/sdk/tests/new_tests/workflows/permissions/__init__.py similarity index 100% rename from api/oss/tests/pytest/healthchecks/__init__.py rename to sdk/tests/new_tests/workflows/permissions/__init__.py diff --git a/sdk/tests/new_tests/workflows/permissions/tests.py b/sdk/tests/new_tests/workflows/permissions/tests.py new file mode 100644 index 0000000000..ed78a6c56f --- /dev/null +++ b/sdk/tests/new_tests/workflows/permissions/tests.py @@ -0,0 +1,75 @@ +import pytest + +from tests.conftest import * + + +class TestMockCompletion: + @pytest.fixture(autouse=True, scope="class") + async def setup_class_fixture(self, create_app_and_variant, http_client): + app_variant_response = create_app_and_variant + service_url = app_variant_response.get("variant", {}).get("uri", None) + headers = {"Authorization": app_variant_response.get("credentials", None)} + + # Set valid LLM keys + await set_valid_llm_keys(client=http_client, headers=headers) + + return { + "app_variant_response": app_variant_response, + "headers": headers, + "service_url": service_url, + } + + @pytest.mark.asyncio + @pytest.mark.typical + @pytest.mark.grumpy + @pytest.mark.security + @pytest.mark.not_available_in_oss + async def test_permissions_principal_not_in_scope( + self, http_client, setup_class_fixture + ): + # Arrange: Prepare data + expected_status = 403 + description = "Principal not in scope for POST" + service_url = setup_class_fixture["service_url"] + app_variant_response = setup_class_fixture["app_variant_response"] + user_scope_project_id = app_variant_response.get("scope_project_id") + non_member_credentials = app_variant_response.get("non_member_credentials", "") + non_member_headers = {"Authorization": non_member_credentials} + await set_valid_llm_keys(client=http_client, headers=non_member_headers) + + # Act + response = await http_client.post( + f"{service_url}/generate?project_id={user_scope_project_id}", + json={ + "ag_config": { + "prompt": { + "llm_config": { + "model": "gpt-4", + "response_format": {"type": "text"}, + }, + "messages": [ + { + "content": "You are an expert in geography.", + "role": "system", + }, + { + "content": "What is the capital of {country}?", + "role": "user", + }, + ], + "template_format": "fstring", + } + }, + "inputs": {"country": "France"}, + }, + headers=non_member_headers, + ) + response_data = response.json() + + # Assert: Verify the response + assert ( + response.status_code == expected_status + ), f"Failed for case: {description}" + assert ( + response.json().get("detail") == "Service execution not allowed." + ), f"Failed for case: {description}" diff --git a/sdk/tests/legacy/observability_sdk/Readme.md b/sdk/tests/observability_sdk/Readme.md similarity index 100% rename from sdk/tests/legacy/observability_sdk/Readme.md rename to sdk/tests/observability_sdk/Readme.md diff --git a/sdk/tests/legacy/observability_sdk/integrations/instructor/01_simple_local.py b/sdk/tests/observability_sdk/integrations/instructor/01_simple_local.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/instructor/01_simple_local.py rename to sdk/tests/observability_sdk/integrations/instructor/01_simple_local.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/instructor/requirements.txt b/sdk/tests/observability_sdk/integrations/instructor/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/instructor/requirements.txt rename to sdk/tests/observability_sdk/integrations/instructor/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/langchain/01_simple_chain_openllmetery_noworkflow.py b/sdk/tests/observability_sdk/integrations/langchain/01_simple_chain_openllmetery_noworkflow.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/langchain/01_simple_chain_openllmetery_noworkflow.py rename to sdk/tests/observability_sdk/integrations/langchain/01_simple_chain_openllmetery_noworkflow.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/langchain/02_simple_chain_openllmetery_workflow.py b/sdk/tests/observability_sdk/integrations/langchain/02_simple_chain_openllmetery_workflow.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/langchain/02_simple_chain_openllmetery_workflow.py rename to sdk/tests/observability_sdk/integrations/langchain/02_simple_chain_openllmetery_workflow.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/langchain/requirements.txt b/sdk/tests/observability_sdk/integrations/langchain/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/langchain/requirements.txt rename to sdk/tests/observability_sdk/integrations/langchain/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/langchain/simple_chain_openinference.py b/sdk/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/langchain/simple_chain_openinference.py rename to sdk/tests/observability_sdk/integrations/langchain/simple_chain_openinference.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/langchain/stateoftheunion.txt b/sdk/tests/observability_sdk/integrations/langchain/stateoftheunion.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/langchain/stateoftheunion.txt rename to sdk/tests/observability_sdk/integrations/langchain/stateoftheunion.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/litellm/01_litellm_implementation.py b/sdk/tests/observability_sdk/integrations/litellm/01_litellm_implementation.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/litellm/01_litellm_implementation.py rename to sdk/tests/observability_sdk/integrations/litellm/01_litellm_implementation.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/litellm/01_sanity_check.py b/sdk/tests/observability_sdk/integrations/litellm/01_sanity_check.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/litellm/01_sanity_check.py rename to sdk/tests/observability_sdk/integrations/litellm/01_sanity_check.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/litellm/02_agenta_implementation.py b/sdk/tests/observability_sdk/integrations/litellm/02_agenta_implementation.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/litellm/02_agenta_implementation.py rename to sdk/tests/observability_sdk/integrations/litellm/02_agenta_implementation.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/litellm/03_agenta_implementationa_streaming.py b/sdk/tests/observability_sdk/integrations/litellm/03_agenta_implementationa_streaming.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/litellm/03_agenta_implementationa_streaming.py rename to sdk/tests/observability_sdk/integrations/litellm/03_agenta_implementationa_streaming.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/litellm/requirements.txt b/sdk/tests/observability_sdk/integrations/litellm/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/litellm/requirements.txt rename to sdk/tests/observability_sdk/integrations/litellm/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/llama_index/01_simple_RAG.py b/sdk/tests/observability_sdk/integrations/llama_index/01_simple_RAG.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/llama_index/01_simple_RAG.py rename to sdk/tests/observability_sdk/integrations/llama_index/01_simple_RAG.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/llama_index/data/paul_graham/paul_graham_essay.txt b/sdk/tests/observability_sdk/integrations/llama_index/data/paul_graham/paul_graham_essay.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/llama_index/data/paul_graham/paul_graham_essay.txt rename to sdk/tests/observability_sdk/integrations/llama_index/data/paul_graham/paul_graham_essay.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/llama_index/requirements.txt b/sdk/tests/observability_sdk/integrations/llama_index/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/llama_index/requirements.txt rename to sdk/tests/observability_sdk/integrations/llama_index/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/01_with_workflow_local_async.py b/sdk/tests/observability_sdk/integrations/openai/01_with_workflow_local_async.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/01_with_workflow_local_async.py rename to sdk/tests/observability_sdk/integrations/openai/01_with_workflow_local_async.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/02_with_workflow_local_async_function_call.py b/sdk/tests/observability_sdk/integrations/openai/02_with_workflow_local_async_function_call.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/02_with_workflow_local_async_function_call.py rename to sdk/tests/observability_sdk/integrations/openai/02_with_workflow_local_async_function_call.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/app.py b/sdk/tests/observability_sdk/integrations/openai/app.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/app.py rename to sdk/tests/observability_sdk/integrations/openai/app.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/app_image.py b/sdk/tests/observability_sdk/integrations/openai/app_image.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/app_image.py rename to sdk/tests/observability_sdk/integrations/openai/app_image.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/app_no_workflow.py b/sdk/tests/observability_sdk/integrations/openai/app_no_workflow.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/app_no_workflow.py rename to sdk/tests/observability_sdk/integrations/openai/app_no_workflow.py diff --git a/sdk/tests/legacy/observability_sdk/integrations/openai/requirements.txt b/sdk/tests/observability_sdk/integrations/openai/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/integrations/openai/requirements.txt rename to sdk/tests/observability_sdk/integrations/openai/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/01_app_sanity.py b/sdk/tests/observability_sdk/sanity_check/01_app_sanity.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/01_app_sanity.py rename to sdk/tests/observability_sdk/sanity_check/01_app_sanity.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/02_app_local.py b/sdk/tests/observability_sdk/sanity_check/02_app_local.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/02_app_local.py rename to sdk/tests/observability_sdk/sanity_check/02_app_local.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/03_app_errors_local.py b/sdk/tests/observability_sdk/sanity_check/03_app_errors_local.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/03_app_errors_local.py rename to sdk/tests/observability_sdk/sanity_check/03_app_errors_local.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/04_app_old_sdk_agenta.py b/sdk/tests/observability_sdk/sanity_check/04_app_old_sdk_agenta.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/04_app_old_sdk_agenta.py rename to sdk/tests/observability_sdk/sanity_check/04_app_old_sdk_agenta.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/05_app_meta.py b/sdk/tests/observability_sdk/sanity_check/05_app_meta.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/05_app_meta.py rename to sdk/tests/observability_sdk/sanity_check/05_app_meta.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/05_app_new_sdk_agenta.py b/sdk/tests/observability_sdk/sanity_check/05_app_new_sdk_agenta.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/05_app_new_sdk_agenta.py rename to sdk/tests/observability_sdk/sanity_check/05_app_new_sdk_agenta.py diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/requirements.txt b/sdk/tests/observability_sdk/sanity_check/requirements.txt similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/requirements.txt rename to sdk/tests/observability_sdk/sanity_check/requirements.txt diff --git a/sdk/tests/legacy/observability_sdk/sanity_check/sanity_sdk.py b/sdk/tests/observability_sdk/sanity_check/sanity_sdk.py similarity index 100% rename from sdk/tests/legacy/observability_sdk/sanity_check/sanity_sdk.py rename to sdk/tests/observability_sdk/sanity_check/sanity_sdk.py diff --git a/sdk/tests/legacy/pytest.ini b/sdk/tests/pytest.ini similarity index 100% rename from sdk/tests/legacy/pytest.ini rename to sdk/tests/pytest.ini diff --git a/sdk/tests/pytest/__init__.py b/sdk/tests/pytest/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/pytest/conftest.py b/sdk/tests/pytest/conftest.py deleted file mode 100644 index 1b9dd6bd09..0000000000 --- a/sdk/tests/pytest/conftest.py +++ /dev/null @@ -1,9 +0,0 @@ -import pytest - -from tests.pytest.utils.env import ag_env -from tests.pytest.utils.sdk import ag_sdk -from tests.pytest.utils.accounts import ( - foo_account, - cls_account, - mod_account, -) diff --git a/sdk/tests/pytest/healthchecks/__init__.py b/sdk/tests/pytest/healthchecks/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/pytest/healthchecks/test_healthchecks.py b/sdk/tests/pytest/healthchecks/test_healthchecks.py deleted file mode 100644 index 9d5bd56300..0000000000 --- a/sdk/tests/pytest/healthchecks/test_healthchecks.py +++ /dev/null @@ -1,21 +0,0 @@ -import agenta as ag - - -class TestHealthCheck: - def test_unauthenticated(self): - # ACT ------------------------------------------------------------------ - response = ag.api.health_check() - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response["status"] == "ok" - # ---------------------------------------------------------------------- - - def test_authenticated(self): - # ACT ------------------------------------------------------------------ - response = ag.api.fetch_user_profile() - # ---------------------------------------------------------------------- - - # ASSERT --------------------------------------------------------------- - assert response["email"].endswith("@test.agenta.ai") - # ---------------------------------------------------------------------- diff --git a/sdk/tests/pytest/utils/__init__.py b/sdk/tests/pytest/utils/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/tests/pytest/utils/accounts.py b/sdk/tests/pytest/utils/accounts.py deleted file mode 100644 index ca8bd97b28..0000000000 --- a/sdk/tests/pytest/utils/accounts.py +++ /dev/null @@ -1,59 +0,0 @@ -import requests -import pytest - -from tests.pytest.utils.constants import BASE_TIMEOUT - - -def create_account(ag_env): - api_url = ag_env["api_url"] - auth_key = ag_env["auth_key"] - - headers = {"Authorization": f"Access {auth_key}"} - url = f"{api_url}/admin/account" - - response = requests.post( - url=url, - headers=headers, - timeout=BASE_TIMEOUT, - ) - - assert response is not None, "Response should not be None" - assert response.status_code == 200, f"Expected 200, got {response.status_code}" - - json_data = response.json() - assert isinstance(json_data, dict), "Response JSON should not be None" - - scopes = json_data.get("scopes") - assert scopes and len(scopes) > 0, "No scopes returned in response" - - scope_data = scopes[0] - assert isinstance(scope_data, dict), "Scope should be a dictionary" - - credentials = scope_data.get("credentials") - assert credentials, "No credentials in scopes" - - return { - "api_url": api_url, - "credentials": credentials, - } - - -@pytest.fixture(scope="function") -def foo_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for function-scoped account goes here.") - - -@pytest.fixture(scope="class") -def cls_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for class-scoped account goes here.") - - -@pytest.fixture(scope="module") -def mod_account(ag_env): - account_data = create_account(ag_env) - yield account_data - print("Teardown for module-scoped account goes here.") diff --git a/sdk/tests/pytest/utils/constants.py b/sdk/tests/pytest/utils/constants.py deleted file mode 100644 index c8edc5d853..0000000000 --- a/sdk/tests/pytest/utils/constants.py +++ /dev/null @@ -1 +0,0 @@ -BASE_TIMEOUT = 10 # seconds diff --git a/sdk/tests/pytest/utils/env.py b/sdk/tests/pytest/utils/env.py deleted file mode 100644 index bf46ef2bd2..0000000000 --- a/sdk/tests/pytest/utils/env.py +++ /dev/null @@ -1,20 +0,0 @@ -import os -import pytest - - -def get_ag_env(): - api_url = os.getenv("AGENTA_API_URL") - auth_key = os.getenv("AGENTA_AUTH_KEY") - - assert api_url, "AGENTA_API_URL must be set" - assert auth_key, "AGENTA_AUTH_KEY must be set" - - return { - "api_url": api_url, - "auth_key": auth_key, - } - - -@pytest.fixture(scope="session") -def ag_env(): - return get_ag_env() diff --git a/sdk/tests/pytest/utils/sdk.py b/sdk/tests/pytest/utils/sdk.py deleted file mode 100644 index 296b8696da..0000000000 --- a/sdk/tests/pytest/utils/sdk.py +++ /dev/null @@ -1,19 +0,0 @@ -import pytest - -import agenta as ag - - -def setup_agenta(cls_account): - api_url = cls_account["api_url"] - credentials = cls_account["credentials"] - - ag.init( - host=api_url[:-4], - api_key=credentials[7:], - ) - - -@pytest.fixture(scope="class", autouse=True) -def ag_sdk(cls_account): - setup_agenta(cls_account) - yield diff --git a/sdk/tests/legacy/redact/01_ignore_all.py b/sdk/tests/redact/01_ignore_all.py similarity index 100% rename from sdk/tests/legacy/redact/01_ignore_all.py rename to sdk/tests/redact/01_ignore_all.py diff --git a/sdk/tests/legacy/redact/02_ignore_all_inputs.py b/sdk/tests/redact/02_ignore_all_inputs.py similarity index 100% rename from sdk/tests/legacy/redact/02_ignore_all_inputs.py rename to sdk/tests/redact/02_ignore_all_inputs.py diff --git a/sdk/tests/legacy/redact/03_ignore_all_outputs.py b/sdk/tests/redact/03_ignore_all_outputs.py similarity index 100% rename from sdk/tests/legacy/redact/03_ignore_all_outputs.py rename to sdk/tests/redact/03_ignore_all_outputs.py diff --git a/sdk/tests/legacy/redact/04_ignore_some.py b/sdk/tests/redact/04_ignore_some.py similarity index 100% rename from sdk/tests/legacy/redact/04_ignore_some.py rename to sdk/tests/redact/04_ignore_some.py diff --git a/sdk/tests/legacy/redact/05_redact_instrument.py b/sdk/tests/redact/05_redact_instrument.py similarity index 100% rename from sdk/tests/legacy/redact/05_redact_instrument.py rename to sdk/tests/redact/05_redact_instrument.py diff --git a/sdk/tests/legacy/redact/06_redact_init.py b/sdk/tests/redact/06_redact_init.py similarity index 100% rename from sdk/tests/legacy/redact/06_redact_init.py rename to sdk/tests/redact/06_redact_init.py diff --git a/sdk/tests/legacy/redact/07_redact_combined.py b/sdk/tests/redact/07_redact_combined.py similarity index 100% rename from sdk/tests/legacy/redact/07_redact_combined.py rename to sdk/tests/redact/07_redact_combined.py diff --git a/sdk/tests/legacy/redact/08_redect_or_error_false.py b/sdk/tests/redact/08_redect_or_error_false.py similarity index 100% rename from sdk/tests/legacy/redact/08_redect_or_error_false.py rename to sdk/tests/redact/08_redect_or_error_false.py diff --git a/sdk/tests/legacy/redact/08_redect_or_error_true.py b/sdk/tests/redact/08_redect_or_error_true.py similarity index 100% rename from sdk/tests/legacy/redact/08_redect_or_error_true.py rename to sdk/tests/redact/08_redect_or_error_true.py diff --git a/sdk/tests/legacy/redact/requirements.txt b/sdk/tests/redact/requirements.txt similarity index 100% rename from sdk/tests/legacy/redact/requirements.txt rename to sdk/tests/redact/requirements.txt diff --git a/sdk/tests/requirements.txt b/sdk/tests/requirements.txt deleted file mode 100644 index 65bd60926d..0000000000 --- a/sdk/tests/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -click -python-dotenv -requests>=2.32.4 -pytest -pytest-asyncio -pytest-cov -pytest-mock \ No newline at end of file diff --git a/sdk/tests/legacy/run_cli_sdk_tests.sh b/sdk/tests/run_cli_sdk_tests.sh similarity index 100% rename from sdk/tests/legacy/run_cli_sdk_tests.sh rename to sdk/tests/run_cli_sdk_tests.sh diff --git a/sdk/tests/legacy/run_pytest.sh b/sdk/tests/run_pytest.sh similarity index 100% rename from sdk/tests/legacy/run_pytest.sh rename to sdk/tests/run_pytest.sh diff --git a/sdk/tests/legacy/run_sdk_cli_tests.sh b/sdk/tests/run_sdk_cli_tests.sh similarity index 100% rename from sdk/tests/legacy/run_sdk_cli_tests.sh rename to sdk/tests/run_sdk_cli_tests.sh diff --git a/sdk/tests/legacy/run_tests.sh b/sdk/tests/run_tests.sh similarity index 100% rename from sdk/tests/legacy/run_tests.sh rename to sdk/tests/run_tests.sh diff --git a/api/oss/tests/pytest/testsets/__init__.py b/sdk/tests/sdk_routing/__init__.py similarity index 100% rename from api/oss/tests/pytest/testsets/__init__.py rename to sdk/tests/sdk_routing/__init__.py diff --git a/sdk/tests/legacy/sdk_routing/assets/greetings/.agentaignore b/sdk/tests/sdk_routing/assets/greetings/.agentaignore similarity index 100% rename from sdk/tests/legacy/sdk_routing/assets/greetings/.agentaignore rename to sdk/tests/sdk_routing/assets/greetings/.agentaignore diff --git a/sdk/tests/legacy/sdk_routing/assets/greetings/app.py b/sdk/tests/sdk_routing/assets/greetings/app.py similarity index 100% rename from sdk/tests/legacy/sdk_routing/assets/greetings/app.py rename to sdk/tests/sdk_routing/assets/greetings/app.py diff --git a/sdk/tests/legacy/sdk_routing/assets/greetings/main.py b/sdk/tests/sdk_routing/assets/greetings/main.py similarity index 100% rename from sdk/tests/legacy/sdk_routing/assets/greetings/main.py rename to sdk/tests/sdk_routing/assets/greetings/main.py diff --git a/sdk/tests/legacy/sdk_routing/assets/greetings/requirements.txt b/sdk/tests/sdk_routing/assets/greetings/requirements.txt similarity index 100% rename from sdk/tests/legacy/sdk_routing/assets/greetings/requirements.txt rename to sdk/tests/sdk_routing/assets/greetings/requirements.txt diff --git a/sdk/tests/sdk_routing/conftest.py b/sdk/tests/sdk_routing/conftest.py new file mode 100644 index 0000000000..33c7f06331 --- /dev/null +++ b/sdk/tests/sdk_routing/conftest.py @@ -0,0 +1,189 @@ +import os +import sys +import time +import uuid +import socket +import random +import threading +import subprocess +from pathlib import Path +from importlib.metadata import version + +import httpx +import pytest + +from tests.conftest import get_admin_user_credentials, API_BASE_URL + + +BASE_URL = os.getenv("BASE_URL", "http://127.0.0.1") + + +def get_free_port(start=8001, end=8999, max_attempts=100): + """ + Find an available port within the specified range with a maximum number of attempts. + """ + + attempts = 0 + + while attempts < max_attempts: + port = random.randint(start, end) + + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + try: + s.bind(("127.0.0.1", port)) + return port + + except OSError: + attempts += 1 + + raise RuntimeError("Could not find a free port within the range") + + +@pytest.fixture(scope="class") +def get_agenta_version(): + return version("agenta") + + +@pytest.fixture(scope="class") +def executable_python(): + """ + Fixture to provide the current Python executable. + """ + + python_executable = sys.executable + return python_executable + + +@pytest.fixture(scope="class") +def get_port_number(): + port = get_free_port() + return port + + +@pytest.fixture(scope="class") +def http_client(get_port_number): + """ + Create an HTTP client for API testing. + """ + + programmatic_access = get_admin_user_credentials() + with httpx.Client( + base_url=f"{BASE_URL}:{get_port_number}", + timeout=httpx.Timeout(timeout=6, read=None, write=5), + headers={ + "Authorization": f"{programmatic_access}", + "Content-Type": "application/json", + }, + ) as client: + yield client + + +@pytest.fixture(scope="class") +def create_application(http_client): + """ + Create an application and set the APP_ID in the environment + """ + + response = http_client.post( + f"{API_BASE_URL}apps/", json={"app_name": f"app_{uuid.uuid4().hex[:8]}"} + ) + response.raise_for_status() + response_data = response.json() + return response_data + + +@pytest.fixture(scope="class") +def fastapi_server( + request, get_port_number, create_application, http_client, executable_python +): + """ + Run the FastAPI server as a subprocess on a random port and return its base URL. + """ + + app_id = create_application.get("app_id", None) + app_file = request.param.get("app_file", "main.py") + env_vars = request.param.get("env_vars", {}) + + app_folder = Path(__file__).parent + + if not (app_folder / app_file).exists(): + raise FileNotFoundError(f"FastAPI app not found at: {app_folder / app_file}") + + env_vars.update( + { + "AGENTA_APP_ID": app_id, + "AGENTA_HOST": BASE_URL, + "HOST": "0.0.0.0", + "PORT": str(get_port_number), + } + ) + + command = [ + executable_python, + app_file, + ] + + process = subprocess.Popen( + command, + cwd=app_folder, + env=env_vars, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + bufsize=1, + ) + + def print_logs(pipe, prefix): + for line in iter(pipe.readline, ""): + print(f"{prefix}: {line.strip()}") + pipe.close() + + threading.Thread( + target=print_logs, + args=(process.stdout, "STDOUT"), + daemon=True, + ).start() + threading.Thread( + target=print_logs, + args=(process.stderr, "STDERR"), + daemon=True, + ).start() + + # Wait a bit for the server to start + time.sleep(2) + + yield BASE_URL, process + + process.terminate() + process.wait() + + # Remove application after server teardown + response = http_client.delete(f"{API_BASE_URL}apps/{app_id}") + response.raise_for_status() + + +@pytest.fixture(scope="class") +def ensure_server(fastapi_server, http_client): + """ + Ensure the server is running by checking the health endpoint. + """ + + _, process = fastapi_server + + for i in range(10): + try: + response = http_client.get("/") + if response.status_code == 200: + return + + print( + f"Health check attempt {i+1}/10 failed with status {response.status_code}" + ) + except (ConnectionError, TimeoutError) as e: + print(f"Health check attempt {i+1}/10 failed: {e}") + time.sleep(2) + + stdout, stderr = process.communicate(timeout=1) + raise RuntimeError( + f"Server failed to respond to health checks\nStdout: {stdout}\nStderr: {stderr}" + ) diff --git a/sdk/tests/legacy/sdk_routing/test_routers.py b/sdk/tests/sdk_routing/test_routers.py similarity index 100% rename from sdk/tests/legacy/sdk_routing/test_routers.py rename to sdk/tests/sdk_routing/test_routers.py diff --git a/api/oss/tests/pytest/testsets/legacy/__init__.py b/sdk/tests/sdk_tests/__init__.py similarity index 100% rename from api/oss/tests/pytest/testsets/legacy/__init__.py rename to sdk/tests/sdk_tests/__init__.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_baby_name.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_baby_name.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_baby_name.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_baby_name.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_chat_prompt.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_chat_prompt.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_chat_prompt.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_chat_prompt.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_single_prompt.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_single_prompt.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_single_prompt.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/new_single_prompt.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/requirements.txt b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/requirements.txt similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/requirements.txt rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/requirements.txt diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/run_local.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/run_local.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/run_local.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/run_local.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/v3.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/v3.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/v3.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_new_sdk/v3.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/baby_name.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/baby_name.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/baby_name.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/baby_name.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/chat_prompt.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/chat_prompt.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/chat_prompt.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/chat_prompt.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/requirements.txt b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/requirements.txt similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/requirements.txt rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/requirements.txt diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/run_local.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/run_local.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/run_local.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/run_local.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/single_prompt.py b/sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/single_prompt.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/single_prompt.py rename to sdk/tests/sdk_tests/management_sdk/manual_tests/apps_with_old_sdk/single_prompt.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/run_local.py b/sdk/tests/sdk_tests/management_sdk/run_local.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/run_local.py rename to sdk/tests/sdk_tests/management_sdk/run_local.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/v1.py b/sdk/tests/sdk_tests/management_sdk/v1.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/v1.py rename to sdk/tests/sdk_tests/management_sdk/v1.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/v2.py b/sdk/tests/sdk_tests/management_sdk/v2.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/v2.py rename to sdk/tests/sdk_tests/management_sdk/v2.py diff --git a/sdk/tests/legacy/sdk_tests/management_sdk/v4_prompt.py b/sdk/tests/sdk_tests/management_sdk/v4_prompt.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/management_sdk/v4_prompt.py rename to sdk/tests/sdk_tests/management_sdk/v4_prompt.py diff --git a/sdk/tests/legacy/sdk_tests/prompt_sdk/conftest.py b/sdk/tests/sdk_tests/prompt_sdk/conftest.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/prompt_sdk/conftest.py rename to sdk/tests/sdk_tests/prompt_sdk/conftest.py diff --git a/sdk/tests/legacy/sdk_tests/prompt_sdk/test_client.py b/sdk/tests/sdk_tests/prompt_sdk/test_client.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/prompt_sdk/test_client.py rename to sdk/tests/sdk_tests/prompt_sdk/test_client.py diff --git a/sdk/tests/legacy/sdk_tests/prompt_sdk/test_config_manager.py b/sdk/tests/sdk_tests/prompt_sdk/test_config_manager.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/prompt_sdk/test_config_manager.py rename to sdk/tests/sdk_tests/prompt_sdk/test_config_manager.py diff --git a/sdk/tests/legacy/sdk_tests/prompt_sdk/test_deployment_manager.py b/sdk/tests/sdk_tests/prompt_sdk/test_deployment_manager.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/prompt_sdk/test_deployment_manager.py rename to sdk/tests/sdk_tests/prompt_sdk/test_deployment_manager.py diff --git a/sdk/tests/legacy/sdk_tests/prompt_sdk/test_variant_manager.py b/sdk/tests/sdk_tests/prompt_sdk/test_variant_manager.py similarity index 100% rename from sdk/tests/legacy/sdk_tests/prompt_sdk/test_variant_manager.py rename to sdk/tests/sdk_tests/prompt_sdk/test_variant_manager.py diff --git a/sdk/tests/legacy/start_server.sh b/sdk/tests/start_server.sh similarity index 100% rename from sdk/tests/legacy/start_server.sh rename to sdk/tests/start_server.sh diff --git a/sdk/tests/legacy/stop_server.sh b/sdk/tests/stop_server.sh similarity index 100% rename from sdk/tests/legacy/stop_server.sh rename to sdk/tests/stop_server.sh diff --git a/sdk/tests/unit/README.md b/sdk/tests/unit/README.md deleted file mode 100644 index 9ff5d12981..0000000000 --- a/sdk/tests/unit/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Unit Tests for Agenta SDK - -This directory contains unit tests for the Agenta SDK components. - -## Quick Start - -```bash -# Run all tests -poetry run pytest tests/unit/ -v - -# Run specific test file -poetry run pytest tests/unit/test_tracing_decorators.py -v - -# Run specific test class -poetry run pytest tests/unit/test_tracing_decorators.py::TestGeneratorTracing -v -``` - -## Test Organization - -- **`conftest.py`** - Shared fixtures and test configuration -- **`test_*.py`** - Individual test modules -- **`TESTING_PATTERNS.md`** - Common testing approaches and patterns - -## Prerequisites - -```bash -# Install dependencies -poetry install -``` - -## Running Tests - -### Basic Execution -```bash -poetry run pytest tests/unit/ -v -``` - -### With Coverage -```bash -poetry run pytest tests/unit/ --cov=agenta.sdk --cov-report=html -``` - -### Debug Mode -```bash -poetry run pytest tests/unit/ --pdb -``` - -## Adding New Tests - -1. Create a new `test_*.py` file -2. Add any shared fixtures to `conftest.py` -3. See `TESTING_PATTERNS.md` for detailed guidance on testing approaches - -## Test Dependencies - -Tests use pytest with the following key dependencies: -- `pytest` - Test framework -- `pytest-mock` - Mocking utilities -- `pytest-cov` - Coverage reporting - -For detailed testing patterns, architecture, and module-specific guidance, see `TESTING_PATTERNS.md`. \ No newline at end of file diff --git a/sdk/tests/unit/TESTING_PATTERNS.md b/sdk/tests/unit/TESTING_PATTERNS.md deleted file mode 100644 index ce14f1f467..0000000000 --- a/sdk/tests/unit/TESTING_PATTERNS.md +++ /dev/null @@ -1,290 +0,0 @@ -# Testing Patterns & Architecture - -This document covers the detailed testing approaches, patterns, and architecture used in our unit tests. - -## Our Testing Strategy - -We use comprehensive mocking to isolate component logic from external dependencies. This approach allows us to: -- Test the actual business logic without external service dependencies -- Verify that external calls are made correctly -- Ensure tests are fast and reliable -- Focus on the component's behavior rather than integration concerns - -## Mock Architecture - -### Core Mocking Strategy - -Tests use comprehensive mocking to isolate the tracing decorator logic from external dependencies: - -```python -# Mock setup in setup_method() -self.mock_tracer = Mock() # Mocks ag.tracer -self.mock_span = Mock() # Mocks individual spans -self.mock_tracing = Mock() # Mocks ag.tracing utilities - -# Usage in tests -mock_ag.tracer = self.mock_tracer -mock_ag.tracing = self.mock_tracing -``` - -### What Gets Mocked - -1. **OpenTelemetry Tracer**: `ag.tracer.start_as_current_span()` -2. **Span Management**: `span.set_attributes()`, `span.set_status()` -3. **Tracing Utilities**: `ag.tracing.get_current_span()` -4. **Context Management**: Span enter/exit behavior - -### What Doesn't Get Mocked - -- Function execution logic (the actual generators/functions run normally) -- Python's generator mechanics (`yield`, `next()`, `StopIteration`) -- Function inspection (`isgeneratorfunction`, etc.) - -## Test Categories - -### 1. Regression Tests (`TestExistingFunctionality`) - -**Purpose**: Ensure existing sync/async function tracing continues to work after generator support was added. - -**What it tests**: -- ✅ Basic sync function tracing -- ✅ Basic async function tracing -- ✅ Exception handling for both sync/async -- ✅ Complex parameter handling -- ✅ Cost/usage metrics extraction from return values - -**Run command**: -```bash -poetry run pytest tests/unit/test_tracing_decorators.py::TestExistingFunctionality -v -``` - -### 2. Generator Tests (`TestGeneratorTracing`) - -**Purpose**: Comprehensive testing of new generator tracing functionality. - -**What it tests**: -- ✅ Sync generator tracing (`test_sync_generator_basic`) -- ✅ Async generator tracing (`test_async_generator_basic`) -- ✅ Generator return value preservation (`test_sync_generator_with_return_value`) -- ✅ Empty generator handling (`test_sync_generator_empty`, `test_async_generator_empty`) -- ✅ Exception handling with all-or-nothing behavior (`test_sync_generator_exception`) -- ✅ Input parameter tracing (`test_generator_input_tracing`) -- ✅ Output format validation (`test_generator_output_format`) -- ✅ Function type detection (`test_function_type_detection`) -- ✅ Early termination scenarios (`test_generator_finite_early_termination`) -- ✅ Nested tracing calls (`test_nested_generator_calls`) - -**Run command**: -```bash -poetry run pytest tests/unit/test_tracing_decorators.py::TestGeneratorTracing -v -``` - -## Test Data Patterns - -### Simple Testcases -```python -# Basic generator -def simple_generator(): - yield "first" - yield "second" - yield "third" - -# Expected result: ["first", "second", "third"] -``` - -### Complex Testcases -```python -# Generator with return value -def generator_with_return(): - yield 1 - yield 2 - return "done" - -# Expected: yields=[1, 2], return_value="done" -``` - -### Error Cases -```python -# Generator that fails mid-stream -def failing_generator(): - yield "good" - yield "still good" - raise ValueError("something broke") - -# Expected: ValueError raised, no partial results (all-or-nothing) -``` - -## Common Issues & Solutions - -### Issue: Tests hang indefinitely - -**Cause**: Test includes infinite generator -**Solution**: Replace with finite generator for testing - -```python -# ❌ Don't do this (will hang) -def infinite_generator(): - i = 0 - while True: - yield f"item_{i}" - i += 1 - -# ✅ Do this instead -def finite_generator(): - for i in range(10): - yield f"item_{i}" -``` - -### Issue: Mock assertion failures - -**Cause**: Missing mock setup for both `ag.tracer` and `ag.tracing` -**Solution**: Ensure both are mocked - -```python -# ✅ Correct mock setup -mock_ag.tracer = self.mock_tracer -mock_ag.tracing = self.mock_tracing # Don't forget this! -``` - -### Issue: Import errors during test collection - -**Cause**: Missing dependencies or incorrect Python path -**Solution**: Use Poetry environment - -```bash -# ✅ Always run with Poetry -poetry run pytest tests/unit/ -v -``` - -## Extending Tests - -### Adding New Testcases - -1. **Choose appropriate test class**: - - `TestExistingFunctionality`: For regression tests - - `TestGeneratorTracing`: For generator-specific tests - -2. **Follow naming conventions**: - ```python - def test_[sync|async]_[generator|function]_[specific_scenario](self, mock_ag): - """Clear description of what this test verifies.""" - ``` - -3. **Include proper mock setup**: - ```python - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - ``` - -4. **Test both behavior and tracing**: - ```python - # Test the actual function behavior - result = list(traced_generator()) - assert result == expected_result - - # Test the tracing behavior - mock_ag.tracer.start_as_current_span.assert_called_once() - self.mock_span.set_status.assert_called_with("OK") - ``` - -### Performance Testing - -For performance-critical tests, consider adding: - -```python -import time - -def test_generator_performance(self, mock_ag): - """Test that generator tracing doesn't add significant overhead.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - - @instrument() - def large_generator(): - for i in range(10000): - yield i - - start_time = time.time() - result = list(large_generator()) - duration = time.time() - start_time - - assert len(result) == 10000 - assert duration < 1.0 # Should complete in under 1 second -``` - -## Advanced Test Options - -### Parallel Execution -```bash -# Run tests in parallel (faster execution) -poetry run pytest tests/unit/ -n auto -``` - -### Coverage Reporting -```bash -# Detailed coverage with HTML report -poetry run pytest tests/unit/ --cov=agenta.sdk.decorators --cov-report=html - -# XML coverage for CI integration -poetry run pytest tests/unit/ --cov=agenta.sdk --cov-report=xml -``` - -### Debugging -```bash -# Run with pdb debugger on failures -poetry run pytest tests/unit/ --pdb - -# Detailed traceback -poetry run pytest tests/unit/ -v --tb=long - -# Stop on first failure -poetry run pytest tests/unit/ -x -``` - -## CI/CD Integration - -### GitHub Actions Example - -```yaml -# .github/workflows/test.yml -name: Test -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install - - name: Run unit tests - run: poetry run pytest tests/unit/ -v --cov=agenta.sdk --cov-report=xml - - name: Upload coverage - uses: codecov/codecov-action@v3 -``` - -This ensures tests run consistently across environments and maintains code quality standards. - -## Project Structure - -Tests expect the following project structure: -``` -sdk/ -├── agenta/ -│ └── sdk/ -│ └── decorators/ -│ └── tracing.py # Implementation under test -├── tests/ -│ └── unit/ -│ ├── README.md # Quick start guide -│ ├── TESTING_PATTERNS.md # This file -│ ├── conftest.py # Shared fixtures -│ └── test_tracing_decorators.py -├── pyproject.toml # Poetry configuration with test dependencies -└── pytest.ini # Pytest configuration -``` diff --git a/sdk/tests/unit/__init__.py b/sdk/tests/unit/__init__.py deleted file mode 100644 index 4a5d26360b..0000000000 --- a/sdk/tests/unit/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Unit tests package diff --git a/sdk/tests/unit/conftest.py b/sdk/tests/unit/conftest.py deleted file mode 100644 index 6f26bb7ece..0000000000 --- a/sdk/tests/unit/conftest.py +++ /dev/null @@ -1 +0,0 @@ -# Empty conftest.py for unit tests - no external dependencies diff --git a/sdk/tests/unit/test_tracing_decorators.py b/sdk/tests/unit/test_tracing_decorators.py deleted file mode 100644 index 67ffc59da5..0000000000 --- a/sdk/tests/unit/test_tracing_decorators.py +++ /dev/null @@ -1,682 +0,0 @@ -""" -Comprehensive test suite for the Agenta SDK tracing decorators. - -This module tests the @instrument() decorator functionality across all supported -function types: synchronous, asynchronous, generator, and async generator functions. - -Test Architecture: ------------------ -The tests are organized into two main classes: - -1. TestExistingFunctionality: Regression tests ensuring that existing sync/async - function tracing continues to work without issues after generator support was added. - -2. TestGeneratorTracing: Comprehensive tests for the new generator tracing functionality, - covering both sync and async generators. - -Tracing Strategy: ----------------- -The implementation uses a "consume-first" strategy for generators: -- The entire generator is consumed during span creation -- All yielded values are collected and logged as {"generator_outputs": [...]} -- A new generator is returned with the collected results -- This approach is optimal for LLM applications requiring complete response logging - -Mock Setup: ------------ -Tests use comprehensive mocking to isolate the tracing decorator logic: -- mock_ag.tracer: Mocks the OpenTelemetry tracer -- mock_ag.tracing: Mocks the tracing utilities used by _post_instrument -- All span creation, attribute setting, and status updates are mocked - -Coverage: ---------- -✅ Sync function tracing (regression) -✅ Async function tracing (regression) -✅ Exception handling for sync/async functions (regression) -✅ Parameter handling and complex return types (regression) -✅ Sync generator tracing -✅ Async generator tracing -✅ Generator return value preservation -✅ Generator exception handling (all-or-nothing behavior) -✅ Empty generator handling -✅ Function type detection accuracy -✅ Nested tracing scenarios -""" - -import pytest -import asyncio -from unittest.mock import Mock, MagicMock, patch - -from agenta.sdk.decorators.tracing import instrument - - -class TestExistingFunctionality: - """Test existing sync/async function tracing to ensure no regressions.""" - - def setup_method(self): - """Set up test fixtures.""" - self.mock_tracer = Mock() - self.mock_span = Mock() - self.mock_tracer.start_as_current_span.return_value.__enter__ = Mock( - return_value=self.mock_span - ) - self.mock_tracer.start_as_current_span.return_value.__exit__ = Mock( - return_value=None - ) - - # Mock both tracer and tracing since they're used in different places - self.mock_tracer.get_current_span.return_value = self.mock_span - - # Set up mock_tracing for _post_instrument calls - self.mock_tracing = Mock() - self.mock_tracing.get_current_span.return_value = self.mock_span - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_function_basic(self, mock_ag): - """Test basic sync function tracing (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def simple_function(x, y): - return x + y - - # Execute the function - result = simple_function(5, 3) - - # Verify result - assert result == 8 - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "simple_function" - - # Verify span was set to OK status - self.mock_span.set_status.assert_called_with("OK") - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_function_basic(self, mock_ag): - """Test basic async function tracing (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def simple_async_function(x, y): - await asyncio.sleep(0.001) # Small delay - return x * y - - # Execute the async function - result = await simple_async_function(4, 5) - - # Verify result - assert result == 20 - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "simple_async_function" - - # Verify span was set to OK status - self.mock_span.set_status.assert_called_with("OK") - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_function_with_exception(self, mock_ag): - """Test sync function that raises exception (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def failing_function(): - raise ValueError("test error") - - # Execute the function and expect exception - with pytest.raises(ValueError, match="test error"): - failing_function() - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_function_with_exception(self, mock_ag): - """Test async function that raises exception (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def failing_async_function(): - await asyncio.sleep(0.001) - raise ValueError("async test error") - - # Execute the async function and expect exception - with pytest.raises(ValueError, match="async test error"): - await failing_async_function() - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_function_with_parameters(self, mock_ag): - """Test sync function with various parameter types (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def complex_function(a, b=10, *args, **kwargs): - return { - "a": a, - "b": b, - "args": args, - "kwargs": kwargs, - "sum": a + b + sum(args) + sum(kwargs.values()), - } - - # Execute the function with complex parameters - result = complex_function(1, 2, 3, 4, x=5, y=6) - - # Verify result - expected = { - "a": 1, - "b": 2, - "args": (3, 4), - "kwargs": {"x": 5, "y": 6}, - "sum": 21, # 1+2+3+4+5+6 - } - assert result == expected - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_function_return_dict_with_cost_usage(self, mock_ag): - """Test sync function that returns dict with cost/usage info (regression test).""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def function_with_metrics(): - return { - "result": "success", - "cost": 0.05, - "usage": { - "prompt_tokens": 10, - "completion_tokens": 20, - "total_tokens": 30, - }, - } - - # Execute the function - result = function_with_metrics() - - # Verify result - expected = { - "result": "success", - "cost": 0.05, - "usage": {"prompt_tokens": 10, "completion_tokens": 20, "total_tokens": 30}, - } - assert result == expected - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - -class TestGeneratorTracing: - """ - Comprehensive test suite for generator function tracing. - - This class tests the @instrument() decorator's ability to handle both - synchronous and asynchronous generator functions. The implementation - uses a consume-first strategy optimized for LLM streaming applications. - - Key Test Categories: - ------------------- - 1. Basic Functionality: Simple generators with known outputs - 2. Return Values: Generators that use the 'return' statement - 3. Empty Generators: Edge case handling for generators that yield nothing - 4. Exception Handling: All-or-nothing behavior on generator failures - 5. Input/Output Tracing: Parameter capture and output formatting - 6. Function Type Detection: Ensuring proper generator identification - 7. Integration: Nested calls and complex scenarios - """ - - def setup_method(self): - """Set up test fixtures.""" - self.mock_tracer = Mock() - self.mock_span = Mock() - self.mock_tracer.start_as_current_span.return_value.__enter__ = Mock( - return_value=self.mock_span - ) - self.mock_tracer.start_as_current_span.return_value.__exit__ = Mock( - return_value=None - ) - - # Mock both tracer and tracing since they're used in different places - self.mock_tracer.get_current_span.return_value = self.mock_span - - # Set up mock_tracing for _post_instrument calls - self.mock_tracing = Mock() - self.mock_tracing.get_current_span.return_value = self.mock_span - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_generator_basic(self, mock_ag): - """Test basic sync generator tracing.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def simple_generator(): - yield "first" - yield "second" - yield "third" - - # Execute the generator - results = list(simple_generator()) - - # Verify results - assert results == ["first", "second", "third"] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "simple_generator" - - # Verify span was set to OK status - self.mock_span.set_status.assert_called_with("OK") - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_generator_with_return_value(self, mock_ag): - """Test sync generator that returns a value.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def generator_with_return(): - yield 1 - yield 2 - return "done" - - # Execute the generator - results = [] - gen = generator_with_return() - try: - while True: - results.append(next(gen)) - except StopIteration as e: - return_value = e.value - - # Verify results and return value - assert results == [1, 2] - assert return_value == "done" - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_generator_empty(self, mock_ag): - """Test empty sync generator.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def empty_generator(): - return - yield # unreachable - - # Execute the generator - results = list(empty_generator()) - - # Verify empty results - assert results == [] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_sync_generator_exception(self, mock_ag): - """Test sync generator that raises an exception.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def failing_generator(): - yield "good" - yield "still good" - raise ValueError("something broke") - - # Execute the generator and expect exception - # With Option 1 approach: exception happens during consumption, no partial results - with pytest.raises(ValueError, match="something broke"): - list(failing_generator()) - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_generator_basic(self, mock_ag): - """Test basic async generator tracing.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def simple_async_generator(): - yield "async_first" - await asyncio.sleep(0.001) # Small delay - yield "async_second" - yield "async_third" - - # Execute the async generator - results = [] - async for item in simple_async_generator(): - results.append(item) - - # Verify results - assert results == ["async_first", "async_second", "async_third"] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "simple_async_generator" - - # Verify span was set to OK status - self.mock_span.set_status.assert_called_with("OK") - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_generator_empty(self, mock_ag): - """Test empty async generator.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def empty_async_generator(): - return - yield # unreachable - - # Execute the async generator - results = [] - async for item in empty_async_generator(): - results.append(item) - - # Verify empty results - assert results == [] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_generator_exception(self, mock_ag): - """Test async generator that raises an exception.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def failing_async_generator(): - yield "async_good" - await asyncio.sleep(0.001) - yield "async_still_good" - raise ValueError("async broke") - - # Execute the async generator and expect exception - # With Option 1 approach: exception happens during consumption, no partial results - with pytest.raises(ValueError, match="async broke"): - async_gen = failing_async_generator() - results = [] - async for item in async_gen: - results.append(item) - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_input_tracing(self, mock_ag): - """Test that generator inputs are properly traced.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def parametrized_generator(count, prefix="item"): - for i in range(count): - yield f"{prefix}_{i}" - - # Execute the generator with specific parameters - results = list(parametrized_generator(3, "test")) - - # Verify results - assert results == ["test_0", "test_1", "test_2"] - - # Verify span was created with proper name - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "parametrized_generator" - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_output_format(self, mock_ag): - """Test that generator outputs are formatted correctly.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def test_generator(): - yield {"data": 1} - yield {"data": 2} - yield {"data": 3} - - # Execute the generator - results = list(test_generator()) - - # Verify results - expected = [{"data": 1}, {"data": 2}, {"data": 3}] - assert results == expected - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - def test_function_type_detection(self): - """Test that function types are correctly detected.""" - - def regular_func(): - return "regular" - - def generator_func(): - yield "generator" - - async def async_func(): - return "async" - - async def async_generator_func(): - yield "async_generator" - - # Test detection logic directly - from inspect import iscoroutinefunction, isgeneratorfunction, isasyncgenfunction - - assert not iscoroutinefunction(regular_func) - assert not isgeneratorfunction(regular_func) - assert not isasyncgenfunction(regular_func) - - assert not iscoroutinefunction(generator_func) - assert isgeneratorfunction(generator_func) - assert not isasyncgenfunction(generator_func) - - assert iscoroutinefunction(async_func) - assert not isgeneratorfunction(async_func) - assert not isasyncgenfunction(async_func) - - assert not iscoroutinefunction(async_generator_func) - assert not isgeneratorfunction(async_generator_func) - assert isasyncgenfunction(async_generator_func) - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_finite_early_termination(self, mock_ag): - """Test finite generator that is terminated early.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def finite_generator(): - # Finite generator for Option 1 approach - for i in range(10): - yield f"item_{i}" - - # Take only first 3 items from our wrapper - results = [] - gen = finite_generator() - for _ in range(3): - results.append(next(gen)) - - # With Option 1: we consumed entire generator (10 items), then yield first 3 - assert results == ["item_0", "item_1", "item_2"] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - - @patch("agenta.sdk.decorators.tracing.ag") - def test_nested_generator_calls(self, mock_ag): - """Test generators that call other traced functions.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def helper_function(x): - return f"processed_{x}" - - @instrument() - def generator_with_nested_calls(): - for i in range(3): - # This should create nested spans - processed = helper_function(i) - yield processed - - # Execute the generator - results = list(generator_with_nested_calls()) - - # Verify results - assert results == ["processed_0", "processed_1", "processed_2"] - - # Verify spans were created (should be called for both functions) - assert mock_ag.tracer.start_as_current_span.call_count >= 2 - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_with_large_output(self, mock_ag): - """Test generator with many items to verify memory handling.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def large_generator(): - for i in range(1000): - yield f"item_{i}" - - # Execute the generator - results = list(large_generator()) - - # Verify we got all 1000 items - assert len(results) == 1000 - assert results[0] == "item_0" - assert results[999] == "item_999" - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - self.mock_span.set_status.assert_called_with("OK") - - @pytest.mark.asyncio - @patch("agenta.sdk.decorators.tracing.ag") - async def test_async_generator_with_delay(self, mock_ag): - """Test async generator with realistic delays.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - async def delayed_generator(): - for i in range(3): - await asyncio.sleep(0.001) # Small delay to simulate real async work - yield f"delayed_{i}" - - # Execute the async generator - results = [] - async for item in delayed_generator(): - results.append(item) - - # Verify results - assert results == ["delayed_0", "delayed_1", "delayed_2"] - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - self.mock_span.set_status.assert_called_with("OK") - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_with_mixed_types(self, mock_ag): - """Test generator that yields different types of objects.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument() - def mixed_type_generator(): - yield "string" - yield 42 - yield {"key": "value"} - yield [1, 2, 3] - yield None - - # Execute the generator - results = list(mixed_type_generator()) - - # Verify all types are preserved - expected = ["string", 42, {"key": "value"}, [1, 2, 3], None] - assert results == expected - - # Verify span was created - mock_ag.tracer.start_as_current_span.assert_called_once() - self.mock_span.set_status.assert_called_with("OK") - - @patch("agenta.sdk.decorators.tracing.ag") - def test_generator_with_decorator_parameters(self, mock_ag): - """Test generator with instrument decorator parameters.""" - mock_ag.tracer = self.mock_tracer - mock_ag.tracing = self.mock_tracing - mock_ag.tracing.get_current_span.return_value.is_recording.return_value = True - - @instrument(type="llm", ignore_inputs=True, ignore_outputs=False) - def parameterized_generator(prompt): - yield f"Processing: {prompt}" - yield "Thinking..." - yield "Complete!" - - # Execute the generator - results = list(parameterized_generator("test prompt")) - - # Verify results - expected = ["Processing: test prompt", "Thinking...", "Complete!"] - assert results == expected - - # Verify span was created with correct parameters - mock_ag.tracer.start_as_current_span.assert_called_once() - call_args = mock_ag.tracer.start_as_current_span.call_args - assert call_args[1]["name"] == "parameterized_generator" - - # Verify span was set to OK status - self.mock_span.set_status.assert_called_with("OK") diff --git a/services/chat/ee/LICENSE b/services/chat/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/services/chat/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/services/chat/ee/docker/Dockerfile.dev b/services/chat/ee/docker/Dockerfile.dev deleted file mode 100644 index 40a0e7981e..0000000000 --- a/services/chat/ee/docker/Dockerfile.dev +++ /dev/null @@ -1,18 +0,0 @@ -FROM python:3.11-slim - -ARG ROOT_PATH=/ -ENV ROOT_PATH=${ROOT_PATH} - -WORKDIR /app/ - -RUN pip install --upgrade pip - -COPY ./requirements.txt /app/requirements.txt - -RUN pip install -r requirements.txt - -COPY ./oss /app/oss/ - -ENV PYTHONPATH=/sdk:$PYTHONPATH - -EXPOSE 80 diff --git a/services/chat/ee/docker/Dockerfile.gh b/services/chat/ee/docker/Dockerfile.gh index 5cc58a9410..7e2351a555 100644 --- a/services/chat/ee/docker/Dockerfile.gh +++ b/services/chat/ee/docker/Dockerfile.gh @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} @@ -13,6 +13,6 @@ RUN pip install -r requirements.txt COPY ./oss /app/oss/ -# +ENV PYTHONPATH=/sdk:$PYTHONPATH EXPOSE 80 diff --git a/services/chat/oss/docker/Dockerfile.dev b/services/chat/oss/docker/Dockerfile.dev index 597d3686a9..ac539e48cc 100644 --- a/services/chat/oss/docker/Dockerfile.dev +++ b/services/chat/oss/docker/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} diff --git a/services/chat/oss/docker/Dockerfile.gh b/services/chat/oss/docker/Dockerfile.gh index 5cc58a9410..7e2351a555 100644 --- a/services/chat/oss/docker/Dockerfile.gh +++ b/services/chat/oss/docker/Dockerfile.gh @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} @@ -13,6 +13,6 @@ RUN pip install -r requirements.txt COPY ./oss /app/oss/ -# +ENV PYTHONPATH=/sdk:$PYTHONPATH EXPOSE 80 diff --git a/services/chat/oss/src/service.py b/services/chat/oss/src/service.py index 429abd233c..1a1d688be7 100644 --- a/services/chat/oss/src/service.py +++ b/services/chat/oss/src/service.py @@ -6,15 +6,16 @@ import agenta as ag -from agenta.sdk.litellm import mockllm from agenta.sdk.types import PromptTemplate, Message +from agenta.sdk.litellm import mockllm litellm.drop_params = True +litellm.callbacks = [ag.callbacks.litellm_handler()] + mockllm.litellm = litellm ag.init() -litellm.callbacks = [ag.callbacks.litellm_handler()] class MyConfig(BaseModel): @@ -61,12 +62,11 @@ async def generate( detail=f"Credentials not found for model {config.prompt.llm_config.model}. Please configure them under settings.", ) - with mockllm.user_aws_credentials_from(provider_settings): - response = await mockllm.acompletion( - **{ - k: v for k, v in openai_kwargs.items() if k != "model" - }, # we should use the model_name from provider_settings - **provider_settings, - ) + response = await mockllm.acompletion( + **{ + k: v for k, v in openai_kwargs.items() if k != "model" + }, # we should use the model_name from provider_settings + **provider_settings, + ) return response.choices[0].message.model_dump(exclude_none=True) diff --git a/services/chat/requirements.txt b/services/chat/requirements.txt index 2d1c54bf2e..acd72a9c81 100644 --- a/services/chat/requirements.txt +++ b/services/chat/requirements.txt @@ -1,12 +1,6 @@ agenta uvicorn boto3 +litellm structlog - -# test -google-auth>=2.23,<3 -google-cloud-aiplatform>=1.38 - -# temporary -decorator -restrictedpython \ No newline at end of file +huggingface-hub<0.31.0 diff --git a/services/completion/ee/LICENSE b/services/completion/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/services/completion/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/services/completion/ee/docker/Dockerfile.dev b/services/completion/ee/docker/Dockerfile.dev deleted file mode 100644 index 40a0e7981e..0000000000 --- a/services/completion/ee/docker/Dockerfile.dev +++ /dev/null @@ -1,18 +0,0 @@ -FROM python:3.11-slim - -ARG ROOT_PATH=/ -ENV ROOT_PATH=${ROOT_PATH} - -WORKDIR /app/ - -RUN pip install --upgrade pip - -COPY ./requirements.txt /app/requirements.txt - -RUN pip install -r requirements.txt - -COPY ./oss /app/oss/ - -ENV PYTHONPATH=/sdk:$PYTHONPATH - -EXPOSE 80 diff --git a/services/completion/ee/docker/Dockerfile.gh b/services/completion/ee/docker/Dockerfile.gh index 5cc58a9410..7e2351a555 100644 --- a/services/completion/ee/docker/Dockerfile.gh +++ b/services/completion/ee/docker/Dockerfile.gh @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} @@ -13,6 +13,6 @@ RUN pip install -r requirements.txt COPY ./oss /app/oss/ -# +ENV PYTHONPATH=/sdk:$PYTHONPATH EXPOSE 80 diff --git a/services/completion/oss/docker/Dockerfile.dev b/services/completion/oss/docker/Dockerfile.dev index 13ce22b08e..05799923e7 100644 --- a/services/completion/oss/docker/Dockerfile.dev +++ b/services/completion/oss/docker/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} diff --git a/services/completion/oss/docker/Dockerfile.gh b/services/completion/oss/docker/Dockerfile.gh index 5cc58a9410..7e2351a555 100644 --- a/services/completion/oss/docker/Dockerfile.gh +++ b/services/completion/oss/docker/Dockerfile.gh @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.10-slim ARG ROOT_PATH=/ ENV ROOT_PATH=${ROOT_PATH} @@ -13,6 +13,6 @@ RUN pip install -r requirements.txt COPY ./oss /app/oss/ -# +ENV PYTHONPATH=/sdk:$PYTHONPATH EXPOSE 80 diff --git a/services/completion/oss/src/service.py b/services/completion/oss/src/service.py index bf908b65cb..eb787b5ab5 100644 --- a/services/completion/oss/src/service.py +++ b/services/completion/oss/src/service.py @@ -6,15 +6,16 @@ import agenta as ag -from agenta.sdk.litellm import mockllm from agenta.sdk.types import PromptTemplate +from agenta.sdk.litellm import mockllm litellm.drop_params = True +litellm.callbacks = [ag.callbacks.litellm_handler()] + mockllm.litellm = litellm ag.init() -litellm.callbacks = [ag.callbacks.litellm_handler()] class MyConfig(BaseModel): @@ -52,15 +53,14 @@ async def generate( detail=f"Credentials not found for model {config.prompt.llm_config.model}. Please configure them under settings.", ) - with mockllm.user_aws_credentials_from(provider_settings): - response = await mockllm.acompletion( - **{ - k: v - for k, v in config.prompt.format(**inputs).to_openai_kwargs().items() - if k != "model" - }, - **provider_settings, - ) + response = await mockllm.acompletion( + **{ + k: v + for k, v in config.prompt.format(**inputs).to_openai_kwargs().items() + if k != "model" + }, + **provider_settings, + ) message = response.choices[0].message diff --git a/services/completion/requirements.txt b/services/completion/requirements.txt index 2d1c54bf2e..acd72a9c81 100644 --- a/services/completion/requirements.txt +++ b/services/completion/requirements.txt @@ -1,12 +1,6 @@ agenta uvicorn boto3 +litellm structlog - -# test -google-auth>=2.23,<3 -google-cloud-aiplatform>=1.38 - -# temporary -decorator -restrictedpython \ No newline at end of file +huggingface-hub<0.31.0 diff --git a/web/ee/.gitignore b/web/ee/.gitignore index 6d61ed9526..b9ee6fdab8 100644 --- a/web/ee/.gitignore +++ b/web/ee/.gitignore @@ -34,4 +34,7 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts +# cypress videos +cypress/videos +cypress/screenshots diff --git a/web/ee/LICENSE b/web/ee/LICENSE deleted file mode 100644 index ae7a2f38f4..0000000000 --- a/web/ee/LICENSE +++ /dev/null @@ -1,37 +0,0 @@ -Agenta Enterprise License (the “Enterprise License”) -Copyright (c) 2023–2025 -Agentatech UG (haftungsbeschränkt), doing business as “Agenta” (“Agenta”) - -With regard to the Agenta Software: - -This software and associated documentation files (the "Software") may only be -used in production, if you (and any entity that you represent) have agreed to, -and are in compliance with, the Agenta Subscription Terms of Service, available -at https://agenta.ai/terms (the “Enterprise Terms”), or other -agreement governing the use of the Software, as agreed by you and Agenta, -and otherwise have a valid Agenta Enterprise License. - -Subject to the foregoing sentence, you are free to modify this Software and -publish patches to the Software. You agree that Agenta and/or its licensors -(as applicable) retain all right, title and interest in and to all such -modifications and/or patches, and all such modifications and/or patches may -only be used, copied, modified, displayed, distributed, or otherwise exploited -with a valid Agenta Enterprise License. Notwithstanding the foregoing, you may -copy and modify the Software for development and testing purposes, without -requiring a subscription. You agree that Agenta and/or its licensors (as -applicable) retain all right, title and interest in and to all such -modifications. You are not granted any other rights beyond what is expressly -stated herein. Subject to the foregoing, it is forbidden to copy, merge, -publish, distribute, sublicense, and/or sell the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For all third party components incorporated into the Agenta Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/web/ee/next.config.ts b/web/ee/next.config.ts index 7de0509f9c..64f395d45e 100644 --- a/web/ee/next.config.ts +++ b/web/ee/next.config.ts @@ -1,69 +1,33 @@ import path from "path" -import {createRequire} from "module" import ossConfig from "@agenta/oss/next.config" -const require = createRequire(import.meta.url) -const reduxToolkitCjsEntry = path.join( - path.dirname(require.resolve("@reduxjs/toolkit/package.json")), - "dist/cjs/index.js", -) - const config = { ...ossConfig, - outputFileTracingRoot: path.resolve(__dirname, ".."), - turbopack: { - // root: path.resolve(__dirname, ".."), - resolveAlias: { - "@/oss/*": ["@/agenta-oss-common/*"], - }, - }, + outputFileTracingRoot: path.join(__dirname, "../"), experimental: { optimizePackageImports: ["@agenta/oss"], + turbo: { + root: path.resolve(__dirname, ".."), + resolveAlias: { + "@/oss/*": ["@/agenta-oss-common/*"], + "@/@agenta/ee/*": ["../ee/src/*"], + }, + }, }, - transpilePackages: ["jotai-devtools"], typescript: { ignoreBuildErrors: true, }, - webpack: (webpackConfig: any, options: any) => { - const baseConfig = - typeof ossConfig.webpack === "function" - ? ossConfig.webpack(webpackConfig, options) - : webpackConfig - - baseConfig.resolve ??= {} - baseConfig.resolve.alias = { - ...(baseConfig.resolve.alias ?? {}), - "@reduxjs/toolkit": reduxToolkitCjsEntry, - } - - return baseConfig - }, async redirects() { return [ - { - source: "/apps", - destination: "/w", - permanent: true, - }, - { - source: "/apps/:app_id", - destination: "/w", - permanent: true, - }, - { - source: "/apps/:app_id/:path*", - destination: "/w", - permanent: true, - }, { source: "/", - destination: "/w", + destination: "/apps", permanent: true, }, { - source: "/:workspace_id/apps/:app_id", - destination: "/:workspace_id/apps/:app_id/overview/", + source: "/apps/:app_id", + destination: "/apps/:app_id/overview/", permanent: true, }, ] diff --git a/web/ee/package.json b/web/ee/package.json index 3a7d0209d2..bb1563feba 100644 --- a/web/ee/package.json +++ b/web/ee/package.json @@ -1,6 +1,6 @@ { "name": "@agenta/ee", - "version": "0.62.0", + "version": "0.48.0", "private": true, "engines": { "node": ">=18" @@ -29,66 +29,45 @@ "@ant-design/cssinjs": "^1.22.1", "@ant-design/icons": "^5.5.2", "@ant-design/v5-patch-for-react-19": "^1.0.3", - "@lexical/code-shiki": "^0.35.0", "@monaco-editor/react": "^4.7.0-rc.0", - "@phosphor-icons/react": "^2.1.10", - "@tanstack/query-core": "^5.87.1", - "@tanstack/react-query": "^5.87.1", + "@phosphor-icons/react": "^2.1.7", "@tremor/react": "^3.18.7", "@types/js-yaml": "^4.0.9", - "@types/lodash": "^4.17.18", + "@types/lodash": "^4.14.201", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", - "@types/react-resizable": "^3.0.7", - "@types/react-window": "^1.8.8", - "@types/recharts": "^2.0.1", - "@types/uuid": "^10.0.0", - "antd": "^5.26.1", + "@types/uuid": "^9.0.7", + "antd": "^5.24.1", "autoprefixer": "10.4.20", - "axios": "^1.12.2", + "axios": "^1.7.7", "classnames": "^2.3.2", "clsx": "^2.1.1", - "crisp-sdk-web": "^1.0.25", "dayjs": "^1.11.10", - "dotenv": "^16.5.0", - "fast-deep-equal": "^3.1.3", - "immer": "^10.1.1", - "jotai": "^2.13.1", - "jotai-devtools": "^0.12.0", - "jotai-eager": "^0.2.3", - "jotai-immer": "^0.4.1", - "jotai-tanstack-query": "^0.11.0", + "dotenv": "^16.3.1", + "jotai": "^2.12.1", "js-yaml": "^4.1.0", - "jsonrepair": "^3.13.0", "lodash": "^4.17.21", - "postcss": "^8.5.6", + "postcss": "^8.4.47", "postcss-antd-fixes": "^0.2.0", "posthog-js": "^1.223.3", - "rc-virtual-list": "^3.19.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-jss": "^10.10.0", - "react-resizable": "^3.0.5", - "react-window": "^1.8.11", - "recharts": "^3.1.0", - "shiki": "^3.12.2", "supertokens-auth-react": "^0.47.0", "supertokens-node": "^21.0.0", "swc-loader": "^0.2.6", "swr": "^2.3.0", "tailwindcss": "^3.4.4", - "typescript": "5.8.3", + "typescript": "5.7.3", "use-animation-frame": "^0.2.1", "usehooks-ts": "^3.1.0", - "uuid": "^11.1.0" + "uuid": "^9.0.1" }, "devDependencies": { "@agenta/web-tests": "workspace:../tests", - "@swc-jotai/debug-label": "^0.2.0", - "@swc-jotai/react-refresh": "^0.3.0", "@types/node": "^20.8.10", "@types/prismjs": "^1.26.5", - "node-mocks-http": "^1.17.2", + "node-mocks-http": "^1.12.2", "tailwind-scrollbar": "^3" } } diff --git a/web/ee/public/assets/Agenta-logo-full-dark-accent.png b/web/ee/public/assets/Agenta-logo-full-dark-accent.png deleted file mode 100644 index c14833dab1..0000000000 Binary files a/web/ee/public/assets/Agenta-logo-full-dark-accent.png and /dev/null differ diff --git a/web/ee/public/assets/Agenta-logo-full-light.png b/web/ee/public/assets/Agenta-logo-full-light.png deleted file mode 100644 index 4c9b31a813..0000000000 Binary files a/web/ee/public/assets/Agenta-logo-full-light.png and /dev/null differ diff --git a/web/ee/public/assets/dark-complete-transparent-CROPPED.png b/web/ee/public/assets/dark-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..7d134ac59a Binary files /dev/null and b/web/ee/public/assets/dark-complete-transparent-CROPPED.png differ diff --git a/web/ee/public/assets/dark-complete-transparent_white_logo.png b/web/ee/public/assets/dark-complete-transparent_white_logo.png new file mode 100644 index 0000000000..8685bbf981 Binary files /dev/null and b/web/ee/public/assets/dark-complete-transparent_white_logo.png differ diff --git a/web/ee/public/assets/dark-logo.svg b/web/ee/public/assets/dark-logo.svg new file mode 100644 index 0000000000..6cb8ef3330 --- /dev/null +++ b/web/ee/public/assets/dark-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="9eaf1304b2"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#9eaf1304b2)"><path fill="#00ff19" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/web/ee/public/assets/favicon.ico b/web/ee/public/assets/favicon.ico index dad02fe072..4dc8619b1d 100644 Binary files a/web/ee/public/assets/favicon.ico and b/web/ee/public/assets/favicon.ico differ diff --git a/web/ee/public/assets/light-complete-transparent-CROPPED.png b/web/ee/public/assets/light-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..6be2e99e08 Binary files /dev/null and b/web/ee/public/assets/light-complete-transparent-CROPPED.png differ diff --git a/web/ee/public/assets/light-logo.svg b/web/ee/public/assets/light-logo.svg new file mode 100644 index 0000000000..9c795f8e88 --- /dev/null +++ b/web/ee/public/assets/light-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="74817b5f98"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#74817b5f98)"><path fill="#000000" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/web/ee/src/components/Banners/BillingPlanBanner/FreePlanBanner.tsx b/web/ee/src/components/Banners/BillingPlanBanner/FreePlanBanner.tsx index 02ca075130..27b22c8bcd 100644 --- a/web/ee/src/components/Banners/BillingPlanBanner/FreePlanBanner.tsx +++ b/web/ee/src/components/Banners/BillingPlanBanner/FreePlanBanner.tsx @@ -3,11 +3,8 @@ import {memo} from "react" import {Button, Typography} from "antd" import {useRouter} from "next/router" -import useURL from "@/oss/hooks/useURL" - const FreePlanBanner = () => { const router = useRouter() - const {projectURL} = useURL() return ( <section className="p-4 rounded-lg flex flex-col gap-2 bg-[#F5F7FA]"> @@ -16,10 +13,7 @@ const FreePlanBanner = () => { Create unlimited applications & run unlimited evaluations. Upgrade today and get more out of Agenta.{" "} </Typography.Text> - <Button - onClick={() => router.push(`${projectURL || ""}/settings?tab=billing`)} - className="self-start" - > + <Button onClick={() => router.push("/settings?tab=billing")} className="self-start"> Upgrade </Button> </section> diff --git a/web/ee/src/components/Banners/BillingPlanBanner/FreeTrialBanner.tsx b/web/ee/src/components/Banners/BillingPlanBanner/FreeTrialBanner.tsx index 7fb69da69a..ee09c03d77 100644 --- a/web/ee/src/components/Banners/BillingPlanBanner/FreeTrialBanner.tsx +++ b/web/ee/src/components/Banners/BillingPlanBanner/FreeTrialBanner.tsx @@ -1,14 +1,12 @@ import {Button, Typography} from "antd" import {useRouter} from "next/router" -import useURL from "@/oss/hooks/useURL" import {SubscriptionType} from "@/oss/services/billing/types" import SubscriptionPlanDetails from "@/agenta-oss-common/components/pages/settings/Billing/Modals/PricingModal/assets/SubscriptionPlanDetails" const FreeTrialBanner = ({subscription}: {subscription: SubscriptionType}) => { const router = useRouter() - const {projectURL} = useURL() return ( <section className="p-4 rounded-lg flex flex-col gap-1 bg-[#F5F7FA]"> @@ -20,7 +18,7 @@ const FreeTrialBanner = ({subscription}: {subscription: SubscriptionType}) => { plan features. </Typography.Text> <Button - onClick={() => router.push(`${projectURL || ""}/settings?tab=billing`)} + onClick={() => router.push("/settings?tab=billing")} type="primary" className="self-start" > diff --git a/web/ee/src/components/Banners/UpdateBanner.tsx b/web/ee/src/components/Banners/UpdateBanner.tsx new file mode 100644 index 0000000000..25636eaaa0 --- /dev/null +++ b/web/ee/src/components/Banners/UpdateBanner.tsx @@ -0,0 +1,34 @@ +import {memo} from "react" +import {Tag, Typography} from "antd" +import Link from "next/link" +import {CloseOutlined} from "@ant-design/icons" + +import {SidebarUpdate} from "@/oss/components/SidePanel/assets/updates" + +const UpdateBanner = ({update, onClose}: {update: SidebarUpdate; onClose: () => void}) => { + return ( + <section className="relative p-4 rounded-lg flex flex-col gap-2 bg-[#F5F7FA]"> + <div className="absolute left-2 top-2 flex items-center gap-2"> + <Tag className="text-[10px] font-medium" color="#E6F4FF" bordered={false}> + <span className="text-[#1677FF]">What's new</span> + </Tag> + </div> + <CloseOutlined + onClick={onClose} + className="absolute right-2 top-2 text-gray-400 hover:text-gray-600 cursor-pointer" + /> + <Typography.Text className="mt-4 text-base font-semibold">{update.title}</Typography.Text> + <Typography.Text className="text-sm text-[#586673]">{update.description}</Typography.Text> + {update.link ? ( + <Link + href={update.link} + className="text-sm text-blue-600 hover:text-blue-800 underline underline-offset-1" + > + Learn more + </Link> + ) : null} + </section> + ) +} + +export default memo(UpdateBanner) diff --git a/web/ee/src/components/DeploymentHistory/DeploymentHistory.tsx b/web/ee/src/components/DeploymentHistory/DeploymentHistory.tsx index 3b6f9cdb32..48b9b503cb 100644 --- a/web/ee/src/components/DeploymentHistory/DeploymentHistory.tsx +++ b/web/ee/src/components/DeploymentHistory/DeploymentHistory.tsx @@ -10,12 +10,8 @@ import {createUseStyles} from "react-jss" import {useAppTheme} from "@/oss/components/Layout/ThemeContextProvider" import ResultComponent from "@/oss/components/ResultComponent/ResultComponent" import {Environment, JSSTheme} from "@/oss/lib/Types" -import { - createRevertDeploymentRevision, - fetchAllDeploymentRevisions, -} from "@/oss/services/deploymentVersioning/api" -import {DeploymentRevisionConfig, DeploymentRevisions} from "@agenta/oss/src/lib/types_ee" +import {DeploymentRevisionConfig, DeploymentRevisions} from "../../lib/types_ee" dayjs.extend(relativeTime) dayjs.extend(duration) @@ -118,6 +114,10 @@ const DeploymentHistory: React.FC<DeploymentHistoryProps> = ({selectedEnvironmen const fetchData = async () => { setIsLoading(true) try { + const mod = await import("@/oss/services/deploymentVersioning/api") + const fetchAllDeploymentRevisions = mod?.fetchAllDeploymentRevisions + if (!mod || !fetchAllDeploymentRevisions) return + const data = await fetchAllDeploymentRevisions( selectedEnvironment?.app_id, selectedEnvironment?.name, @@ -134,6 +134,10 @@ const DeploymentHistory: React.FC<DeploymentHistoryProps> = ({selectedEnvironmen const handleRevert = useCallback(async (deploymentRevisionId: string) => { setIsReverted(true) try { + const mod = await import("@/oss/services/deploymentVersioning/api") + const createRevertDeploymentRevision = mod?.createRevertDeploymentRevision + if (!mod || !createRevertDeploymentRevision) return + const response = await createRevertDeploymentRevision(deploymentRevisionId) notification.success({ message: "Environment Revision", diff --git a/web/oss/src/components/Evaluations/ShareEvaluationModal.tsx b/web/ee/src/components/Evaluations/ShareEvaluationModal.tsx similarity index 96% rename from web/oss/src/components/Evaluations/ShareEvaluationModal.tsx rename to web/ee/src/components/Evaluations/ShareEvaluationModal.tsx index 4f6a1f647d..4286030791 100644 --- a/web/oss/src/components/Evaluations/ShareEvaluationModal.tsx +++ b/web/ee/src/components/Evaluations/ShareEvaluationModal.tsx @@ -5,8 +5,8 @@ import {useRouter} from "next/router" import {createUseStyles} from "react-jss" import CopyButton from "@/oss/components/CopyButton/CopyButton" +import {useOrgData} from "@/oss/contexts/org.context" import {EvaluationType} from "@/oss/lib/enums" -import {useOrgData} from "@/oss/state/org" const useStyles = createUseStyles({ row: { diff --git a/web/ee/src/components/PostSignupForm/PostSignupForm.tsx b/web/ee/src/components/PostSignupForm/PostSignupForm.tsx index d481fc3350..af592c3a86 100644 --- a/web/ee/src/components/PostSignupForm/PostSignupForm.tsx +++ b/web/ee/src/components/PostSignupForm/PostSignupForm.tsx @@ -1,86 +1,60 @@ import {useCallback, useEffect, useMemo, useState} from "react" -import {ArrowRight} from "@phosphor-icons/react" -import {Button, Checkbox, Form, FormProps, Input, Radio, Space, Spin, Typography} from "antd" +import {ArrowRight, CaretDown, SignOut} from "@phosphor-icons/react" +import { + Button, + Checkbox, + Dropdown, + Form, + FormProps, + Input, + Radio, + Space, + Spin, + Typography, +} from "antd" import Image from "next/image" -import {useRouter} from "next/router" +import Router from "next/router" import {MultipleSurveyQuestion} from "posthog-js" -import ListOfOrgs from "@/oss/components/Sidebar/components/ListOfOrgs" -import useURL from "@/oss/hooks/useURL" +import AlertPopup from "@/oss/components/AlertPopup/AlertPopup" +import Avatar from "@/oss/components/Avatar/Avatar" +import {useOrgData} from "@/oss/contexts/org.context" +import {useProfileData} from "@/oss/contexts/profile.context" +import {useSession} from "@/oss/hooks/useSession" import {usePostHogAg} from "@/oss/lib/helpers/analytics/hooks/usePostHogAg" import {useSurvey} from "@/oss/lib/helpers/analytics/hooks/useSurvey" -import {useOrgData} from "@/oss/state/org" -import {useProfileData} from "@/oss/state/profile" -import {buildPostLoginPath, waitForWorkspaceContext} from "@/oss/state/url/postLoginRedirect" +import {getEnv} from "@/oss/lib/helpers/dynamicEnv" import {useStyles} from "./assets/styles" import {FormDataType} from "./assets/types" const PostSignupForm = () => { const [form] = Form.useForm() - const router = useRouter() + const {logout} = useSession() const posthog = usePostHogAg() const {user} = useProfileData() const classes = useStyles() - const {orgs} = useOrgData() + const {selectedOrg, changeSelectedOrg} = useOrgData() const selectedHearAboutUsOption = Form.useWatch("hearAboutUs", form) const formData = Form.useWatch([], form) const [stepOneFormData, setStepOneFormData] = useState<any>({} as any) const [currentStep, setCurrentStep] = useState(0) - const {survey, loading, error} = useSurvey("Signup 2") - const {baseAppURL} = useURL() - const [autoRedirectAttempted, setAutoRedirectAttempted] = useState(false) - const redirectParam = useMemo( - () => (router.query.redirect as string) || "", - [router.query.redirect], - ) - const redirect = useCallback( - async (target: string | null | undefined) => { - if (!target) return false - - try { - const normalizedTarget = target.split("?")[0] - const latestPath = router.asPath.split("?")[0] + const {survey, loading} = useSurvey("Signup 2") - if (normalizedTarget === latestPath) return false + useEffect(() => { + let timer: number | undefined - await router.replace(target) - return true - } catch (error) { - console.error("post-signup redirect failed", error) - return false + timer = window.setTimeout(() => { + if (!getEnv("NEXT_PUBLIC_POSTHOG_API_KEY") || !survey || !survey?.id) { + Router.push("/apps") } - }, - [router], - ) - - const navigateToPostSignupDestination = useCallback(async () => { - if (await redirect(redirectParam)) return - if (await redirect(baseAppURL)) return - - try { - const context = await waitForWorkspaceContext({ - timeoutMs: 1500, - requireProjectId: false, - requireOrgData: true, - }) - const fallbackPath = buildPostLoginPath(context) + }, 2000) - if (await redirect(fallbackPath)) return - } catch (error) { - console.error("post-signup fallback redirect failed", error) + return () => { + clearTimeout(timer) } - - await redirect("/w") - }, [baseAppURL, redirect, redirectParam]) - - useEffect(() => { - if (!error || autoRedirectAttempted) return - - setAutoRedirectAttempted(true) - void navigateToPostSignupDestination() - }, [autoRedirectAttempted, error, navigateToPostSignupDestination]) + }, [survey]) const handleStepOneFormData: FormProps<FormDataType>["onFinish"] = useCallback( async (values: any) => { @@ -96,49 +70,22 @@ const PostSignupForm = () => { values.hearAboutUs == "Other" ? values.hearAboutUsInputOption : values.hearAboutUs try { - const responses = survey?.questions?.reduce( - (acc: Record<string, unknown>, question, index) => { - const key = `$survey_response_${question.id}` - switch (index) { - case 0: - acc[key] = [stepOneFormData.companySize] - break - case 1: - acc[key] = stepOneFormData.userRole - break - case 2: - acc[key] = stepOneFormData.userExperience - break - case 3: - acc[key] = values.userInterests - break - case 4: - acc[key] = [hearAboutUs] - break - case 5: - // the user's email is captured as a survey - // response only; posthog.identify is called - // elsewhere so we don't send a separate - // `user_email` property - acc[key] = user?.email - break - } - return acc - }, - {}, - ) - await posthog?.capture?.("survey sent", { $survey_id: survey?.id, $survey_name: survey?.name, - ...responses, + $survey_response: stepOneFormData.userRole, + $survey_response_1: stepOneFormData.userExperience, + $survey_response_2: hearAboutUs, + $survey_response_3: values.userInterests, + $survey_response_4: user?.email, + $survey_response_5: stepOneFormData.companySize, }) form.resetFields() } catch (error) { console.error("Error submitting form:", error) } finally { - await navigateToPostSignupDestination() + Router.push("/apps") } }, [ @@ -150,7 +97,6 @@ const PostSignupForm = () => { survey?.id, survey?.name, user?.email, - navigateToPostSignupDestination, ], ) @@ -338,31 +284,64 @@ const PostSignupForm = () => { survey?.questions, ]) - const showSurveyForm = Boolean(survey?.questions?.length) - const isSurveyLoading = loading && !error - return ( <> <section className="w-[90%] flex items-center justify-between mx-auto mt-12 mb-5"> <Image - src="/assets/Agenta-logo-full-light.png" + src="/assets/light-complete-transparent-CROPPED.png" alt="agenta-ai" width={114} height={40} /> - <ListOfOrgs - collapsed={false} - interactive={true} - orgSelectionEnabled={false} - buttonProps={{className: "w-[186px] !p-1 !h-10 rounded"}} - overrideOrgId={orgs?.[0]?.id} - /> + <Dropdown + trigger={["hover"]} + menu={{ + items: [ + { + key: "logout", + label: ( + <div className="flex items-center gap-2"> + <SignOut size={16} /> + <Typography.Text>Logout</Typography.Text> + </div> + ), + onClick: () => { + AlertPopup({ + title: "Logout", + message: "Are you sure you want to logout?", + onOk: logout, + }) + }, + }, + ], + selectedKeys: [selectedOrg?.id as string], + onClick: ({key}) => { + if (["logout"].includes(key)) return + changeSelectedOrg(key) + }, + }} + > + <Button + className="w-[186px] !p-1 !h-10 rounded" + icon={<CaretDown size={14} />} + iconPosition="end" + > + <div className="flex items-center w-[85%]"> + <Avatar + className="text-lg !rounded" + name={selectedOrg?.name as string} + /> + + <Typography.Paragraph className="ml-2 w-[70%] truncate !mb-0"> + {selectedOrg?.name} + </Typography.Paragraph> + </div> + </Button> + </Dropdown> </section> - <Spin spinning={isSurveyLoading}> - {showSurveyForm ? steps[currentStep]?.content : null} - </Spin> + <Spin spinning={loading && !survey?.id}>{steps[currentStep]?.content}</Spin> </> ) } diff --git a/web/ee/src/components/PromptVersioningDrawer/PromptVersioningDrawer.tsx b/web/ee/src/components/PromptVersioningDrawer/PromptVersioningDrawer.tsx index 12530e2b99..87e3fbdb67 100644 --- a/web/ee/src/components/PromptVersioningDrawer/PromptVersioningDrawer.tsx +++ b/web/ee/src/components/PromptVersioningDrawer/PromptVersioningDrawer.tsx @@ -73,7 +73,7 @@ const PromptVersioningDrawer: React.FC<PromptVersioningDrawerProps> = ({ open={isDrawerOpen} title="History" size="default" - destroyOnHidden + destroyOnClose onClose={() => setIsDrawerOpen(false)} > {historyStatus.loading ? ( diff --git a/web/ee/src/components/Scripts/assets/CloudScripts.tsx b/web/ee/src/components/Scripts/assets/CloudScripts.tsx index b4cb916c02..5d12920c85 100644 --- a/web/ee/src/components/Scripts/assets/CloudScripts.tsx +++ b/web/ee/src/components/Scripts/assets/CloudScripts.tsx @@ -1,22 +1,7 @@ -import {useEffect} from "react" - -import {Crisp} from "crisp-sdk-web" import Head from "next/head" import Script from "next/script" -import {getEnv} from "@/oss/lib/helpers/dynamicEnv" - const CloudScripts = () => { - useEffect(() => { - const isCrispEnabled = !!getEnv("NEXT_PUBLIC_CRISP_WEBSITE_ID") - - if (!isCrispEnabled) { - return - } - - Crisp.configure(getEnv("NEXT_PUBLIC_CRISP_WEBSITE_ID")) - }, []) - return ( <> <Head> @@ -37,6 +22,19 @@ const CloudScripts = () => { gtag('js', new Date()); gtag('config', 'G-PV7R8H9KDM'); + `} + </Script> + <Script id="crisp-chat" strategy="afterInteractive"> + {` + window.$crisp=[]; + window.CRISP_WEBSITE_ID="5bba54ec-9734-4881-ac1e-a2cb3c74bbd5"; + (function(){ + d=document; + s=d.createElement("script"); + s.src="https://client.crisp.chat/l.js"; + s.async=1; + d.getElementsByTagName("head")[0].appendChild(s); + })(); `} </Script> </div> diff --git a/web/ee/src/components/SidePanel/Subscription.tsx b/web/ee/src/components/SidePanel/Subscription.tsx index c05efdca56..c1ca73cc00 100644 --- a/web/ee/src/components/SidePanel/Subscription.tsx +++ b/web/ee/src/components/SidePanel/Subscription.tsx @@ -2,20 +2,33 @@ import {useMemo} from "react" import FreePlanBanner from "@/oss/components/Banners/BillingPlanBanner/FreePlanBanner" import FreeTrialBanner from "@/oss/components/Banners/BillingPlanBanner/FreeTrialBanner" +import {useCurrentSidebarUpdate} from "@/oss/components/SidePanel/Updates" import {isDemo} from "@/oss/lib/helpers/utils" import {Plan} from "@/oss/lib/Types" import {useSubscriptionData} from "@/oss/services/billing" -const SidePanelSubscription = () => { +const SidePanelSubscription = ({ + collapsed, + isHovered, +}: { + collapsed: boolean + isHovered: boolean +}) => { const {subscription} = useSubscriptionData() + const {current: currentUpdate} = useCurrentSidebarUpdate() const isShowFreePlanBannerVisible = useMemo( - () => isDemo() && !subscription?.free_trial && subscription?.plan === Plan.Hobby, - [subscription], + () => + !currentUpdate && + isDemo() && + (!collapsed || (collapsed && isHovered)) && + !subscription?.free_trial && + subscription?.plan === Plan.Hobby, + [subscription, collapsed, isHovered, currentUpdate], ) const isShowFreeTrialBannerVisible = useMemo( - () => isDemo() && subscription?.free_trial, - [subscription], + () => isDemo() && (!collapsed || (collapsed && isHovered)) && subscription?.free_trial, + [isHovered, subscription, collapsed], ) return ( diff --git a/web/ee/src/components/SidePanel/Updates.tsx b/web/ee/src/components/SidePanel/Updates.tsx new file mode 100644 index 0000000000..77554b9a15 --- /dev/null +++ b/web/ee/src/components/SidePanel/Updates.tsx @@ -0,0 +1,37 @@ +import {useMemo} from "react" +import {useLocalStorage} from "usehooks-ts" + +import UpdateBanner from "@/oss/components/Banners/UpdateBanner" +import {SIDEBAR_UPDATES, SidebarUpdate} from "@/oss/components/SidePanel/assets/updates" + +export const useCurrentSidebarUpdate = () => { + const [dismissed, setDismissed] = useLocalStorage<string[]>("agenta-updates-dismissed", []) + + const current = useMemo<SidebarUpdate | undefined>(() => { + return SIDEBAR_UPDATES.find((u) => !dismissed.includes(u.id)) + }, [dismissed]) + + const dismiss = (id: string) => setDismissed([...dismissed, id]) + + return {current, dismiss} +} + +const SidePanelUpdates = ({ + collapsed, + isHovered, +}: { + collapsed: boolean + isHovered: boolean +}) => { + const {current: currentUpdate, dismiss} = useCurrentSidebarUpdate() + + if (!currentUpdate) return null + + if (collapsed && !isHovered) return null + + const handleClose = () => dismiss(currentUpdate.id) + + return <UpdateBanner update={currentUpdate} onClose={handleClose} /> +} + +export default SidePanelUpdates diff --git a/web/ee/src/components/SidePanel/assets/updates.ts b/web/ee/src/components/SidePanel/assets/updates.ts new file mode 100644 index 0000000000..94e2d739d0 --- /dev/null +++ b/web/ee/src/components/SidePanel/assets/updates.ts @@ -0,0 +1,15 @@ +export interface SidebarUpdate { + id: string + title: string + description: string + link?: string +} + +export const SIDEBAR_UPDATES: SidebarUpdate[] = [ + { + id: "2025-05-15-annotations", + title: "Annotate responses", + description: "Capture user feedback with new annotation API.", + link: "/changelog/main#annotate-your-llm-response-preview", + }, +] diff --git a/web/ee/src/components/pages/app-management/components/ApiKeyInput.tsx b/web/ee/src/components/pages/app-management/components/ApiKeyInput.tsx index ad44cdb4ea..005734ad81 100644 --- a/web/ee/src/components/pages/app-management/components/ApiKeyInput.tsx +++ b/web/ee/src/components/pages/app-management/components/ApiKeyInput.tsx @@ -2,9 +2,9 @@ import {useMemo, useState} from "react" import {Button, Input, Space, Typography, message} from "antd" +import {useOrgData} from "@/oss/contexts/org.context" import {isDemo} from "@/oss/lib/helpers/utils" import {createApiKey} from "@/oss/services/apiKeys/api" -import {useOrgData} from "@/oss/state/org" const {Text} = Typography diff --git a/web/ee/src/components/pages/app-management/components/DemoApplicationsSection.tsx b/web/ee/src/components/pages/app-management/components/DemoApplicationsSection.tsx index 605ef9a773..d4ae3ae59b 100644 --- a/web/ee/src/components/pages/app-management/components/DemoApplicationsSection.tsx +++ b/web/ee/src/components/pages/app-management/components/DemoApplicationsSection.tsx @@ -2,9 +2,9 @@ import {Button, Card, Flex, Space, Typography} from "antd" import Image from "next/image" import {createUseStyles} from "react-jss" +import {useOrgData} from "@/oss/contexts/org.context" +import {useProjectData} from "@/oss/contexts/project.context" import {JSSTheme} from "@/oss/lib/Types" -import {useOrgData} from "@/oss/state/org" -import {useProjectData} from "@/oss/state/project" const useStyles = createUseStyles((theme: JSSTheme) => ({ demoAppCard: { diff --git a/web/ee/src/components/pages/app-management/components/ObservabilityDashboardSection.tsx b/web/ee/src/components/pages/app-management/components/ObservabilityDashboardSection.tsx index d41ea8d433..ef32cf2eca 100644 --- a/web/ee/src/components/pages/app-management/components/ObservabilityDashboardSection.tsx +++ b/web/ee/src/components/pages/app-management/components/ObservabilityDashboardSection.tsx @@ -1,14 +1,16 @@ -import {useMemo, type ComponentProps} from "react" +import {useEffect, useState, type ComponentProps} from "react" import {AreaChart} from "@tremor/react" import {Spin, Typography} from "antd" import round from "lodash/round" import {createUseStyles} from "react-jss" -import {formatCurrency, formatLatency, formatNumber} from "@/oss/lib/helpers/formatters" +import {useAppId} from "@/oss/hooks/useAppId" +import {formatCurrency, formatNumber} from "@/oss/lib/helpers/formatters" import {JSSTheme} from "@/oss/lib/Types" +import {GenerationDashboardData} from "@/oss/lib/types_ee" +import {fetchGenerationsDashboardData} from "@/oss/services/observability/api" -import {useObservabilityDashboard} from "../../../../state/observability" import WidgetCard from "../../observability/dashboard/widgetCard" const useStyles = createUseStyles((theme: JSSTheme) => ({ @@ -45,29 +47,36 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ const ObservabilityDashboardSection = () => { const classes = useStyles() - const {data, loading, isFetching} = useObservabilityDashboard() + const appId = useAppId() + const [loading, setLoading] = useState(false) + const [data, setData] = useState<GenerationDashboardData>() - const chartData = useMemo(() => (data?.data?.length ? data.data : [{}]), [data]) + const defaultGraphProps: ComponentProps<typeof AreaChart> = { + className: "h-[168px] p-0", + colors: ["cyan", "red"], + connectNulls: true, + tickGap: 15, + curveType: "monotone", + showGridLines: false, + showLegend: false, + index: "timestamp", + data: data?.data?.length ? data.data : [{}], + categories: [], + } - const defaultGraphProps = useMemo<ComponentProps<typeof AreaChart>>( - () => ({ - className: "h-[168px] p-0", - colors: ["cyan", "red"], - connectNulls: true, - tickGap: 15, - curveType: "monotone", - showGridLines: false, - showLegend: false, - index: "timestamp", - data: chartData, - categories: [], - }), - [chartData], - ) + useEffect(() => { + setLoading(true) + fetchGenerationsDashboardData(appId, {range: "30_days"}) + .then((data) => { + setData(data) + }) + .catch(console.error) + .finally(() => setLoading(false)) + }, [appId]) return ( <div className={classes.container}> - <Spin spinning={loading || isFetching}> + <Spin spinning={loading}> <div className={classes.widgetContainer}> <div className="flex-1"> <WidgetCard @@ -112,7 +121,7 @@ const ObservabilityDashboardSection = () => { <Typography.Text>Avg:</Typography.Text>{" "} <span> {data?.avg_latency - ? `${formatNumber(data.avg_latency)}ms` + ? `${round(data?.avg_latency ?? 0, 2)}s` : "-"} </span> </div> diff --git a/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/DebugSection.tsx b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/DebugSection.tsx new file mode 100644 index 0000000000..e42f3d00b5 --- /dev/null +++ b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/DebugSection.tsx @@ -0,0 +1,675 @@ +// @ts-nocheck +import {Dispatch, SetStateAction, useMemo, useRef, useState} from "react" + +import {getAllMetadata} from "@agenta/oss/src/lib/hooks/useStatelessVariants/state" +import { + CheckCircleOutlined, + CloseCircleOutlined, + ExclamationCircleOutlined, + MoreOutlined, +} from "@ant-design/icons" +import {Editor} from "@monaco-editor/react" +import {Database, Lightning, Play} from "@phosphor-icons/react" +import { + Button, + Divider, + Dropdown, + Flex, + FormInstance, + message, + Space, + Tabs, + Tooltip, + Typography, +} from "antd" +import yaml from "js-yaml" +import {createUseStyles} from "react-jss" + +import {useAppTheme} from "@/oss/components/Layout/ThemeContextProvider" +import {useAppId} from "@/oss/hooks/useAppId" +import {useVaultSecret} from "@/oss/hooks/useVaultSecret" +import {mapTestcaseAndEvalValues, transformTraceKeysInSettings} from "@/oss/lib/helpers/evaluate" +import {buildNodeTree, observabilityTransformer} from "@/oss/lib/helpers/observability_helpers" +import {isBaseResponse, isFuncResponse} from "@/oss/lib/helpers/playgroundResp" +import { + apiKeyObject, + extractChatMessages, + getStringOrJson, + removeKeys, + safeParse, +} from "@/oss/lib/helpers/utils" +import {getAllVariantParameters} from "@/oss/lib/helpers/variantHelper" +import {transformToRequestBody} from "@/oss/lib/shared/variant/transformer/transformToRequestBody" +import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" +import { + buildNodeTreeV3, + fromBaseResponseToTraceSpanType, + transformTraceTreeToJson, +} from "@/oss/lib/transformers" +import { + BaseResponse, + ChatMessage, + Evaluator, + JSSTheme, + Parameter, + testset, + Variant, +} from "@/oss/lib/Types" +import {callVariant} from "@/oss/services/api" +import { + createEvaluatorDataMapping, + createEvaluatorRunExecution, +} from "@/oss/services/evaluations/api_ee" +import {AgentaNodeDTO} from "@/oss/services/observability/types" + +import EvaluatorTestcaseModal from "./EvaluatorTestcaseModal" +import EvaluatorVariantModal from "./EvaluatorVariantModal" +interface DebugSectionProps { + selectedTestcase: { + testcase: Record<string, any> | null + } + selectedVariant: EnhancedVariant + // NonNullable<ReturnType<typeof useStatelessVariants>["variants"]>[number] + testsets: testset[] | null + traceTree: { + trace: Record<string, any> | string | null + } + setTraceTree: Dispatch< + SetStateAction<{ + trace: Record<string, any> | string | null + }> + > + selectedEvaluator: Evaluator + form: FormInstance<any> + debugEvaluator: boolean + setSelectedVariant: Dispatch<SetStateAction<Variant | null>> + variants: Variant[] | null + setSelectedTestcase: Dispatch< + SetStateAction<{ + testcase: Record<string, any> | null + }> + > + setSelectedTestset: Dispatch<SetStateAction<string>> + selectedTestset: string +} + +const useStyles = createUseStyles((theme: JSSTheme) => ({ + title: { + fontSize: theme.fontSizeLG, + fontWeight: theme.fontWeightMedium, + lineHeight: theme.lineHeightLG, + }, + formTitleText: { + fontSize: theme.fontSize, + lineHeight: theme.lineHeight, + fontWeight: theme.fontWeightMedium, + }, + editor: { + border: `1px solid ${theme.colorBorder}`, + borderRadius: theme.borderRadius, + overflow: "hidden", + }, + variantTab: { + flex: 1, + "& .ant-tabs-content": { + height: "100%", + "& .ant-tabs-tabpane": { + height: "100%", + }, + }, + }, +})) + +const DebugSection = ({ + selectedTestcase, + selectedVariant: _selectedVariant, + testsets, + traceTree, + setTraceTree, + selectedEvaluator, + form, + debugEvaluator, + variants, + setSelectedVariant, + setSelectedTestcase, + selectedTestset, + setSelectedTestset, +}: DebugSectionProps) => { + const appId = useAppId() + const classes = useStyles() + const {appTheme} = useAppTheme() + const [baseResponseData, setBaseResponseData] = useState<BaseResponse | null>(null) + const [outputResult, setOutputResult] = useState("") + const [isLoadingResult, setIsLoadingResult] = useState(false) + const abortControllersRef = useRef<AbortController | null>(null) + const [isRunningVariant, setIsRunningVariant] = useState(false) + const [variantResult, setVariantResult] = useState("") + const [openVariantModal, setOpenVariantModal] = useState(false) + const [openTestcaseModal, setOpenTestcaseModal] = useState(false) + const [variantStatus, setVariantStatus] = useState({ + success: false, + error: false, + }) + const [evalOutputStatus, setEvalOutputStatus] = useState({ + success: false, + error: false, + }) + const {secrets} = useVaultSecret() + + const selectedVariant = useMemo(() => { + const revs = _selectedVariant.revisions + // find the most recent revision by looking at the updatedAtTimestamp + const variant = revs.sort((a, b) => b.updatedAtTimestamp - a.updatedAtTimestamp)[0] + return variant + }, [_selectedVariant]) + + const activeTestset = useMemo(() => { + return testsets?.find((item) => item._id === selectedTestset) + }, [selectedTestset, testsets]) + + const fetchEvalMapper = async () => { + if (!baseResponseData || !selectedTestcase.testcase) return + + try { + setEvalOutputStatus({success: false, error: false}) + setIsLoadingResult(true) + + const settingsValues = form.getFieldValue("settings_values") || {} + const {testcaseObj, evalMapObj} = mapTestcaseAndEvalValues( + settingsValues, + selectedTestcase.testcase, + ) + let outputs = {} + + if (Object.keys(evalMapObj).length && selectedEvaluator.key.startsWith("rag_")) { + const mapResponse = await createEvaluatorDataMapping({ + inputs: baseResponseData, + mapping: transformTraceKeysInSettings(evalMapObj), + }) + outputs = {...outputs, ...mapResponse.outputs} + } + + if (Object.keys(testcaseObj).length) { + outputs = {...outputs, ...testcaseObj} + } + + if (!selectedEvaluator.key.startsWith("rag_")) { + const correctAnswerKey = settingsValues.correct_answer_key + const groundTruthKey = + typeof correctAnswerKey === "string" && correctAnswerKey.startsWith("testcase.") + ? correctAnswerKey.split(".")[1] + : correctAnswerKey + + outputs = { + ...selectedTestcase["testcase"], + ground_truth: selectedTestcase["testcase"][groundTruthKey], + prediction: variantResult, + ...(selectedEvaluator.key === "auto_custom_code_run" ? {app_config: {}} : {}), + } + } + + const runResponse = await createEvaluatorRunExecution(selectedEvaluator.key, { + inputs: outputs, + settings: transformTraceKeysInSettings(settingsValues), + ...(selectedEvaluator.requires_llm_api_keys || settingsValues?.requires_llm_api_keys + ? {credentials: apiKeyObject(secrets)} + : {}), + }) + setEvalOutputStatus({success: true, error: false}) + + setOutputResult( + getStringOrJson( + runResponse.outputs.success !== undefined + ? runResponse.outputs.success + : runResponse.outputs.score !== undefined + ? runResponse.outputs.score + : runResponse.outputs, + ), + ) + } catch (error: any) { + console.error(error) + setEvalOutputStatus({success: false, error: true}) + if (error.response.data.detail) { + setOutputResult(getStringOrJson(formatJson(error.response.data.detail))) + } else { + setOutputResult("Error occured") + } + } finally { + setIsLoadingResult(false) + } + } + + const handleRunVariant = async () => { + if (!selectedTestcase.testcase || !selectedVariant) return + const controller = new AbortController() + abortControllersRef.current = controller + + try { + setVariantStatus({success: false, error: false}) + setIsRunningVariant(true) + + const params = {} as { + inputs: Parameter[] + parameters: unknown + isChatVariant: boolean + isCustom: boolean + messages: ChatMessage[] + } + + if (selectedVariant.parameters) { + params.inputs = selectedVariant.inputParams + params.parameters = transformToRequestBody({ + variant: selectedVariant, + allMetadata: getAllMetadata(), + }) + params.isChatVariant = selectedVariant.isChatVariant + params.messages = params.isChatVariant + ? extractChatMessages(selectedTestcase.testcase) + : [] + params.isCustom = selectedVariant.isCustom + } else { + const {parameters, inputs, isChatVariant} = await getAllVariantParameters( + appId, + selectedVariant, + ) + params.parameters = parameters + params.inputs = inputs + params.isChatVariant = isChatVariant + params.messages = params.isChatVariant + ? JSON.parse(selectedTestcase.testcase.chat) || [{}] + : [] + params.isCustom = selectedVariant.isCustom + } + + const result = await callVariant( + params.isChatVariant + ? removeKeys(selectedTestcase.testcase, ["chat"]) + : selectedTestcase.testcase, + params.inputs || [], + params.parameters || [], + appId, + selectedVariant.baseId, + params.messages, + controller.signal, + true, + selectedVariant.parameters && !!selectedVariant._parentVariant, + params.isCustom, + selectedVariant?.uriObject, + selectedVariant.variantId, + ) + + if (typeof result === "string") { + setVariantResult(getStringOrJson(result)) + setTraceTree({trace: result}) + setVariantStatus({success: true, error: false}) + } else if (isFuncResponse(result)) { + setVariantResult(getStringOrJson(result)) + setTraceTree({trace: result}) + setVariantStatus({success: true, error: false}) + } else if (isBaseResponse(result)) { + setBaseResponseData(result) + const {trace, tree, data} = result + setVariantResult(getStringOrJson(data)) + + if (trace && trace?.spans) { + setTraceTree({ + trace: transformTraceTreeToJson( + fromBaseResponseToTraceSpanType(trace.spans, trace.trace_id)[0], + ), + }) + } + + if (tree) { + const traceTree = tree.nodes + .flatMap((node: AgentaNodeDTO) => buildNodeTree(node)) + .flatMap((item: any) => observabilityTransformer(item)) + .map((item) => { + const {key, children, ...trace} = item + + return trace + })[0] + + setTraceTree({ + trace: buildNodeTreeV3(traceTree), + }) + } + setVariantStatus({success: true, error: false}) + } else { + console.error("Unknown response type:", result) + } + } catch (error: any) { + if (!controller.signal.aborted) { + console.error("error: ", error) + message.error(error.message) + if (error.response.data.detail) { + setVariantResult(getStringOrJson(error.response.data.detail)) + } else { + setVariantResult("Error occured") + } + setVariantStatus({success: false, error: true}) + } + } finally { + setIsRunningVariant(false) + } + } + + const formatJson = (data: Record<string, any>): Record<string, any> => { + const formattedJson: Record<string, any> = {} + + for (const [key, value] of Object.entries(data)) { + if (typeof value === "string") { + if (value.includes("Traceback")) { + formattedJson[key] = value.split("\n").map((line) => line.trim()) + } else { + const parsedValue = safeParse(value, value) + if (typeof parsedValue === "string") { + formattedJson[key] = parsedValue.replace(/\\n/g, "\n").replace(/\\"/g, '"') + } else { + formattedJson[key] = parsedValue + } + } + } else if (typeof value === "object" && value !== null) { + formattedJson[key] = formatJson(value) + } else { + formattedJson[key] = value + } + } + + return formattedJson + } + + const formatOutput = (str: string) => { + try { + const parsed = JSON.parse(str) + return yaml.dump(parsed) + } catch (e) { + return str + } + } + + return ( + <> + {debugEvaluator && ( + <> + <Divider type="vertical" className="h-full" /> + + <div className="flex-1 flex flex-col gap-4"> + <Space direction="vertical" size={0}> + <Typography.Text className={classes.title}> + Test evaluator + </Typography.Text> + <Typography.Text type="secondary"> + Test your evaluator by generating a test data + </Typography.Text> + </Space> + + <div className="flex-[0.3] flex flex-col h-full gap-1"> + <div className="flex items-center justify-between"> + <Space size={5}> + <Typography.Text className={classes.formTitleText}> + Testcase + </Typography.Text> + + {activeTestset && selectedTestcase.testcase && ( + <> + <CheckCircleOutlined style={{color: "green"}} /> + <Typography.Text type="secondary"> + loaded from {activeTestset.name} + </Typography.Text> + </> + )} + </Space> + + <Tooltip + title={testsets?.length === 0 ? "No testset" : ""} + placement="bottom" + > + <Button + size="small" + className="flex items-center gap-2" + onClick={() => setOpenTestcaseModal(true)} + disabled={testsets?.length === 0} + > + <Database /> + Load testcase + </Button> + </Tooltip> + </div> + + <Editor + className={classes.editor} + width="100%" + language="json" + theme={`vs-${appTheme}`} + value={getStringOrJson( + selectedTestcase.testcase ? formatJson(selectedTestcase) : "", + )} + onChange={(value) => { + try { + if (value) { + const parsedValue = JSON.parse(value) + setSelectedTestcase(parsedValue) + } + } catch (error) { + console.error("Failed to parse test case JSON", error) + } + }} + options={{ + wordWrap: "on", + minimap: {enabled: false}, + lineNumbers: "off", + }} + /> + </div> + + <div className="flex-[0.45] flex flex-col h-full"> + <div className="flex items-center justify-between"> + <Space size={5}> + <Typography.Text className={classes.formTitleText}> + Application + </Typography.Text> + {variantStatus.success && ( + <> + <CheckCircleOutlined style={{color: "green"}} /> + <Typography.Text type="secondary"> + Success + </Typography.Text> + </> + )} + {variantStatus.error && ( + <ExclamationCircleOutlined style={{color: "red"}} /> + )} + </Space> + + {isRunningVariant ? ( + <Button + size="small" + className="w-[120px]" + danger + onClick={() => { + if (abortControllersRef.current) { + abortControllersRef.current.abort() + } + }} + > + <CloseCircleOutlined /> + Cancel + </Button> + ) : ( + <Dropdown.Button + className="w-fit" + disabled={!selectedTestcase.testcase} + size="small" + onClick={handleRunVariant} + loading={isRunningVariant} + icon={<MoreOutlined />} + menu={{ + items: [ + { + key: "change_variant", + icon: <Lightning />, + label: "Change Variant", + onClick: () => setOpenVariantModal(true), + }, + ], + }} + > + <div + className="flex items-center gap-2" + key={ + selectedVariant?.variantId || + selectedVariant?.variantName || + "default" + } + > + <Play /> + {/* Adding key above ensures React re-renders this label when variant changes */} + Run {selectedVariant?.variantName || "variant"} + </div> + </Dropdown.Button> + )} + </div> + + <Tabs + defaultActiveKey="output" + className={classes.variantTab} + items={[ + { + key: "output", + label: "Output", + children: ( + <Editor + className={classes.editor} + width="100%" + language="markdown" + theme={`vs-${appTheme}`} + value={variantResult} + options={{ + wordWrap: "on", + minimap: {enabled: false}, + lineNumbers: "off", + lineDecorationsWidth: 0, + }} + onChange={(value) => { + if (value) { + setVariantResult(value) + } + }} + /> + ), + }, + { + key: "trace", + label: "Trace", + children: ( + <Editor + className={classes.editor} + width="100%" + language="json" + theme={`vs-${appTheme}`} + value={ + traceTree.trace + ? getStringOrJson(traceTree) + : "" + } + options={{ + wordWrap: "on", + minimap: {enabled: false}, + lineNumbers: "off", + }} + onChange={(value) => { + try { + if (value) { + const parsedValue = JSON.parse(value) + setTraceTree(parsedValue) + } + } catch (error) { + console.error( + "Failed to parse trace tree JSON", + error, + ) + } + }} + /> + ), + }, + ]} + /> + </div> + + <div className="flex flex-col gap-1 flex-[0.25] h-full"> + <Flex justify="space-between"> + <Space size={5}> + <Typography.Text className={classes.formTitleText}> + Evaluator Output + </Typography.Text> + {evalOutputStatus.success && ( + <> + <CheckCircleOutlined style={{color: "green"}} /> + <Typography.Text type="secondary"> + Successful + </Typography.Text> + </> + )} + {evalOutputStatus.error && ( + <ExclamationCircleOutlined style={{color: "red"}} /> + )} + </Space> + <Tooltip + title={baseResponseData ? "" : "BaseResponse feature"} + placement="bottom" + > + <Button + className="flex items-center gap-2" + size="small" + onClick={fetchEvalMapper} + disabled={!baseResponseData} + loading={isLoadingResult} + > + <Play /> Run evaluator + </Button> + </Tooltip> + </Flex> + + <Editor + className={classes.editor} + width="100%" + language="yaml" + theme={`vs-${appTheme}`} + options={{ + wordWrap: "on", + minimap: {enabled: false}, + readOnly: true, + lineNumbers: "off", + lineDecorationsWidth: 0, + }} + value={formatOutput(outputResult)} + /> + </div> + </div> + </> + )} + + <EvaluatorVariantModal + variants={variants} + open={openVariantModal} + onCancel={() => setOpenVariantModal(false)} + setSelectedVariant={setSelectedVariant} + selectedVariant={selectedVariant} + /> + + {testsets?.length && ( + <EvaluatorTestcaseModal + open={openTestcaseModal} + onCancel={() => setOpenTestcaseModal(false)} + testsets={testsets} + setSelectedTestcase={setSelectedTestcase} + selectedTestset={selectedTestset} + setSelectedTestset={setSelectedTestset} + /> + )} + </> + ) +} + +export default DebugSection diff --git a/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorTestcaseModal.tsx b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorTestcaseModal.tsx new file mode 100644 index 0000000000..dd30b5b2b6 --- /dev/null +++ b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorTestcaseModal.tsx @@ -0,0 +1,208 @@ +import {useEffect, useMemo, useState} from "react" + +import {CloseOutlined} from "@ant-design/icons" +import {Play} from "@phosphor-icons/react" +import {Button, Divider, Input, Menu, Modal, Table, Typography} from "antd" +import {ColumnsType} from "antd/es/table" +import {createUseStyles} from "react-jss" + +import {JSSTheme, testset, TestSet} from "@/oss/lib/Types" +import {fetchTestset} from "@/oss/services/testsets/api" + +type EvaluatorTestcaseModalProps = { + testsets: testset[] + setSelectedTestcase: React.Dispatch< + React.SetStateAction<{ + testcase: Record<string, any> | null + }> + > + setSelectedTestset: React.Dispatch<React.SetStateAction<string>> + selectedTestset: string +} & React.ComponentProps<typeof Modal> + +const useStyles = createUseStyles((theme: JSSTheme) => ({ + container: { + "& .ant-modal-body": { + height: 600, + overflowY: "auto", + }, + }, + title: { + fontSize: theme.fontSizeHeading4, + lineHeight: theme.lineHeightLG, + fontWeight: theme.fontWeightStrong, + }, + subTitle: { + fontSize: theme.fontSizeLG, + lineHeight: theme.lineHeightLG, + fontWeight: theme.fontWeightMedium, + }, + sidebar: { + display: "flex", + flexDirection: "column", + gap: theme.padding, + width: 200, + }, + menu: { + height: 500, + overflowY: "auto", + borderInlineEnd: `0px !important`, + }, +})) + +const EvaluatorTestcaseModal = ({ + testsets, + setSelectedTestcase, + selectedTestset, + setSelectedTestset, + ...props +}: EvaluatorTestcaseModalProps) => { + const classes = useStyles() + const [isLoadingTestset, setIsLoadingTestset] = useState(false) + const [testsetCsvData, setTestsetCsvData] = useState<TestSet["csvdata"][]>([]) + const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]) + const [searchTerm, setSearchTerm] = useState("") + + const filteredTestset = useMemo(() => { + if (!searchTerm) return testsets + return testsets.filter((item) => item.name.toLowerCase().includes(searchTerm.toLowerCase())) + }, [searchTerm, testsets]) + + useEffect(() => { + const testsetFetcher = async () => { + try { + setIsLoadingTestset(true) + const data = await fetchTestset(selectedTestset) + setTestsetCsvData(data.csvdata) + } catch (error) { + console.error(error) + } finally { + setIsLoadingTestset(false) + } + } + + testsetFetcher() + }, [selectedTestset]) + + const columnDef = useMemo(() => { + const columns: ColumnsType<TestSet["csvdata"]> = [] + + if (testsetCsvData.length > 0) { + const keys = Object.keys(testsetCsvData[0]) + + columns.push( + ...keys.map((key, index) => ({ + title: key, + dataIndex: key, + key: index, + width: 300, + onHeaderCell: () => ({ + style: {minWidth: 160}, + }), + render: (_: any, record: any) => { + return <div>{record[key]}</div> + }, + })), + ) + } + + return columns + }, [testsetCsvData]) + + const rowSelection = { + selectedRowKeys, + onChange: (keys: React.Key[]) => { + setSelectedRowKeys(keys) + }, + } + + const loadTestCase = () => { + const selectedTestCase = testsetCsvData.find((_, index) => index === selectedRowKeys[0]) + + if (selectedTestCase) { + setSelectedTestcase({testcase: selectedTestCase}) + props.onCancel?.({} as any) + } + } + + return ( + <Modal + centered + width={1150} + closeIcon={null} + okText="Load test case" + okButtonProps={{ + icon: <Play />, + iconPosition: "end", + disabled: !selectedRowKeys.length, + onClick: loadTestCase, + loading: isLoadingTestset, + }} + className={classes.container} + title={ + <div className="flex items-center justify-between"> + <Typography.Text className={classes.title}>Load Testcase</Typography.Text> + <Button + onClick={() => props.onCancel?.({} as any)} + type="text" + icon={<CloseOutlined />} + /> + </div> + } + {...props} + > + <div className="flex gap-4 flex-1 mt-4"> + <div className={classes.sidebar}> + <Input.Search + placeholder="Search" + allowClear + onChange={(e) => setSearchTerm(e.target.value)} + /> + + <Divider className="m-0" /> + + <Menu + items={filteredTestset.map((testset) => ({ + key: testset._id, + label: testset.name, + }))} + onSelect={({key}) => { + setSelectedTestset(key) + setSelectedRowKeys([]) + }} + defaultSelectedKeys={[selectedTestset]} + className={classes.menu} + /> + </div> + <Divider type="vertical" className="m-0 h-full" /> + <div className="flex flex-col gap-4 flex-1 overflow-x-auto"> + <Typography.Text className={classes.subTitle}> + Select a testcase + </Typography.Text> + + <Table + rowSelection={{type: "radio", ...rowSelection}} + loading={isLoadingTestset} + dataSource={testsetCsvData.map((data, index) => ({...data, id: index}))} + columns={columnDef} + className="flex-1" + bordered + rowKey={"id"} + pagination={false} + scroll={{y: 500, x: "max-content"}} + onRow={(_, rowIndex) => ({ + className: "cursor-pointer", + onClick: () => { + if (rowIndex !== undefined) { + setSelectedRowKeys([rowIndex]) + } + }, + })} + /> + </div> + </div> + </Modal> + ) +} + +export default EvaluatorTestcaseModal diff --git a/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorVariantModal.tsx b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorVariantModal.tsx new file mode 100644 index 0000000000..822db23a83 --- /dev/null +++ b/web/ee/src/components/pages/evaluations/autoEvaluation/EvaluatorsModal/ConfigureEvaluator/EvaluatorVariantModal.tsx @@ -0,0 +1,142 @@ +import { + useCallback, + useMemo, + useState, + useEffect, + type ComponentProps, + type Dispatch, + type SetStateAction, + type Key, +} from "react" + +import {CloseOutlined} from "@ant-design/icons" +import {Play} from "@phosphor-icons/react" +import {Button, Input, Modal, Typography} from "antd" +import {createUseStyles} from "react-jss" + +import VariantsTable from "@/oss/components/VariantsComponents/Table" +import {JSSTheme, Variant as BaseVariant} from "@/oss/lib/Types" + +type Variant = BaseVariant & {id?: string} +type EvaluatorVariantModalProps = { + variants: Variant[] | null + setSelectedVariant: Dispatch<SetStateAction<Variant | null>> + selectedVariant: Variant | null +} & ComponentProps<typeof Modal> + +const useStyles = createUseStyles((theme: JSSTheme) => ({ + title: { + fontSize: theme.fontSizeHeading4, + lineHeight: theme.lineHeightLG, + fontWeight: theme.fontWeightStrong, + }, + container: { + "& .ant-modal-body": { + height: 600, + }, + }, + table: { + "& .ant-table-thead > tr > th": { + height: 32, + padding: "0 16px", + }, + "& .ant-table-tbody > tr > td": { + height: 48, + padding: "0 16px", + }, + }, +})) + +const EvaluatorVariantModal = ({ + variants, + setSelectedVariant, + selectedVariant, + ...props +}: EvaluatorVariantModalProps) => { + const classes = useStyles() + const [searchTerm, setSearchTerm] = useState("") + const [selectedRowKeys, setSelectedRowKeys] = useState<Key[]>([]) + + // Clear selection when modal is opened + useEffect(() => { + if (props.open) { + const newKey = selectedVariant?.variantId ?? null + setSelectedRowKeys(newKey ? [newKey] : []) + } + }, [props.open, selectedVariant]) + + const filtered = useMemo(() => { + if (!searchTerm) return variants + if (variants) { + return variants.filter((item) => + item.variantName.toLowerCase().includes(searchTerm.toLowerCase()), + ) + } + }, [searchTerm, variants]) + + const loadVariant = useCallback(() => { + const selectedVariant = filtered?.find( + (variant) => variant.variantId === selectedRowKeys[0], + ) + + if (selectedVariant) { + setSelectedVariant(selectedVariant) + props.onCancel?.({} as any) + } + }, [filtered, selectedRowKeys, setSelectedVariant, props]) + + return ( + <Modal + closeIcon={null} + width={1150} + className={classes.container} + okText="Load variant" + okButtonProps={{ + icon: <Play />, + iconPosition: "end", + disabled: !selectedRowKeys.length, + onClick: loadVariant, + }} + title={ + <div className="flex items-center justify-between"> + <Typography.Text className={classes.title}> + Select variant to run + </Typography.Text> + <Button + onClick={() => props.onCancel?.({} as any)} + type="text" + icon={<CloseOutlined />} + /> + </div> + } + centered + {...props} + > + <div className="flex flex-col gap-4 flex-1 mt-4"> + <Input.Search + value={searchTerm} + onChange={(e) => setSearchTerm(e.target.value)} + placeholder="Search" + allowClear + className="w-[240px]" + /> + + <VariantsTable + variants={(filtered as any) || []} + rowSelection={{ + selectedRowKeys, + onChange: (value) => setSelectedRowKeys(value), + type: "radio", + }} + isLoading={false} + onRowClick={() => {}} + rowKey={"variantId"} + className={classes.table} + showActionsDropdown={false} + /> + </div> + </Modal> + ) +} + +export default EvaluatorVariantModal diff --git a/web/ee/src/components/pages/overview/deployments/DeploymentHistoryModal.tsx b/web/ee/src/components/pages/overview/deployments/DeploymentHistoryModal.tsx index 77af135044..bf433d3302 100644 --- a/web/ee/src/components/pages/overview/deployments/DeploymentHistoryModal.tsx +++ b/web/ee/src/components/pages/overview/deployments/DeploymentHistoryModal.tsx @@ -260,7 +260,7 @@ const DeploymentHistoryModal = ({ <Modal footer={null} closeIcon={null} - destroyOnHidden + destroyOnClose title={ <Space className={classes.modalTitle}> <Button diff --git a/web/ee/src/components/pages/overview/deployments/DeploymentRevertModal.tsx b/web/ee/src/components/pages/overview/deployments/DeploymentRevertModal.tsx index a4279b9136..b1abc7d332 100644 --- a/web/ee/src/components/pages/overview/deployments/DeploymentRevertModal.tsx +++ b/web/ee/src/components/pages/overview/deployments/DeploymentRevertModal.tsx @@ -53,7 +53,7 @@ const DeploymentModal = ({ </div> } centered - destroyOnHidden + destroyOnClose zIndex={3000} {...props} > diff --git a/web/ee/src/components/pages/overview/deployments/HistoryConfig.tsx b/web/ee/src/components/pages/overview/deployments/HistoryConfig.tsx index 5c915177a2..17476ee54b 100644 --- a/web/ee/src/components/pages/overview/deployments/HistoryConfig.tsx +++ b/web/ee/src/components/pages/overview/deployments/HistoryConfig.tsx @@ -1,15 +1,14 @@ import {useMemo} from "react" import {Typography} from "antd" -import {useAtomValue} from "jotai" import {createUseStyles} from "react-jss" import {NewVariantParametersView} from "@/oss/components/VariantsComponents/Drawers/VariantDrawer/assets/Parameters" +import {useAppsData} from "@/oss/contexts/app.context" import {filterVariantParameters} from "@/oss/lib/helpers/utils" import {useVariants} from "@/oss/lib/hooks/useVariants" import {JSSTheme, Variant} from "@/oss/lib/Types" import {DeploymentRevisionConfig} from "@/oss/lib/types_ee" -import {currentAppAtom} from "@/oss/state/app" const useStyles = createUseStyles((theme: JSSTheme) => ({ title: { @@ -61,9 +60,14 @@ interface HistoryConfigProps { const HistoryConfig = ({depRevisionConfig, variant: propsVariant}: HistoryConfigProps) => { const classes = useStyles() - const currentApp = useAtomValue(currentAppAtom) + const {currentApp} = useAppsData() // @ts-ignore - const {data, isLoading} = useVariants(currentApp, [propsVariant]) + const {data, isLoading} = useVariants(currentApp)( + { + appId: currentApp?.app_id, + }, + [propsVariant], + ) const variant = useMemo( // @ts-ignore () => data?.variants.find((v) => v.id === propsVariant.id), diff --git a/web/ee/src/components/pages/overview/observability/ObservabilityOverview.tsx b/web/ee/src/components/pages/overview/observability/ObservabilityOverview.tsx index 34ffe5bf56..2a81cbb457 100644 --- a/web/ee/src/components/pages/overview/observability/ObservabilityOverview.tsx +++ b/web/ee/src/components/pages/overview/observability/ObservabilityOverview.tsx @@ -1,14 +1,16 @@ -import {useMemo} from "react" +import {useEffect, useState} from "react" import {AreaChart} from "@tremor/react" import {Col, Row, Spin, Typography} from "antd" import round from "lodash/round" import {createUseStyles} from "react-jss" -import {formatCurrency, formatLatency, formatNumber} from "@/oss/lib/helpers/formatters" +import {useAppId} from "@/oss/hooks/useAppId" +import {formatCurrency, formatNumber} from "@/oss/lib/helpers/formatters" import {JSSTheme} from "@/oss/lib/Types" +import {GenerationDashboardData} from "@/oss/lib/types_ee" +import {fetchGenerationsDashboardData} from "@/oss/services/observability/api" -import {useObservabilityDashboard} from "../../../../state/observability" import WidgetCard from "../../observability/dashboard/widgetCard" const useStyles = createUseStyles((theme: JSSTheme) => ({ @@ -19,29 +21,36 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ const ObservabilityOverview = () => { const classes = useStyles() - const {data, loading, isFetching} = useObservabilityDashboard() + const appId = useAppId() + const [loading, setLoading] = useState(false) + const [data, setData] = useState<GenerationDashboardData>() - const chartData = useMemo(() => (data?.data?.length ? data.data : [{}]), [data]) + const defaultGraphProps: React.ComponentProps<typeof AreaChart> = { + className: "h-[168px] p-0", + colors: ["cyan", "red"], + connectNulls: true, + tickGap: 15, + curveType: "monotone", + showGridLines: false, + showLegend: false, + index: "timestamp", + data: data?.data?.length ? data.data : [{}], + categories: [], + } - const defaultGraphProps = useMemo<React.ComponentProps<typeof AreaChart>>( - () => ({ - className: "h-[168px] p-0", - colors: ["cyan", "red"], - connectNulls: true, - tickGap: 15, - curveType: "monotone", - showGridLines: false, - showLegend: false, - index: "timestamp", - data: chartData, - categories: [], - }), - [chartData], - ) + useEffect(() => { + setLoading(true) + fetchGenerationsDashboardData(appId, {range: "30_days"}) + .then((data) => { + setData(data) + }) + .catch(console.error) + .finally(() => setLoading(false)) + }, [appId]) return ( <div> - <Spin spinning={loading || isFetching}> + <Spin spinning={loading}> <Row gutter={[16, 16]}> <Col span={12}> <WidgetCard @@ -80,7 +89,7 @@ const ObservabilityOverview = () => { <Typography.Text className={classes.statText}> <Typography.Text type="secondary">Avg:</Typography.Text>{" "} {data?.avg_latency - ? `${formatNumber(data.avg_latency)}ms` + ? `${round(data?.avg_latency ?? 0, 2)}s` : "-"} </Typography.Text> } diff --git a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx index 0c9f98ba30..980e9c9b53 100644 --- a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx @@ -8,31 +8,20 @@ import {PricingCardProps} from "../types" const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardProps) => { const _isLoading = isLoading === plan.plan - const isDisabled = useMemo(() => { - if (isLoading !== null && isLoading !== plan.plan) { - return true - } - - if (currentPlan?.plan === plan.plan) { - return true - } - - if (currentPlan?.plan === Plan.Enterprise) { - return true - } - - if (currentPlan?.plan === Plan.Business && plan.plan === Plan.Pro) { - return true - } - - return false - }, [isLoading, currentPlan?.plan, plan.plan]) + const isDisabled = useMemo( + () => + (isLoading !== null && isLoading !== plan.plan) || + currentPlan?.plan == plan.plan || + currentPlan?.plan == Plan.Business || + currentPlan?.plan == Plan.Enterprise, + [isLoading, currentPlan, plan], + ) return ( <Card hoverable key={plan.plan} - className={`relative w-full md:w-1/3`} + className={`relative w-full md:w-1/4`} title={plan.title} classNames={{ body: "!p-3 flex-1", @@ -41,16 +30,23 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP }} rootClassName="flex flex-col justify-between" actions={[ - plan.title == "Enterprise" ? ( + plan.title == "Enterprise" || plan.title == "Business" ? ( <Button disabled={isDisabled} className="w-full" - type={currentPlan?.plan == Plan.Enterprise ? "link" : "primary"} + type={ + currentPlan?.plan == Plan.Business || + currentPlan?.plan == Plan.Enterprise + ? "link" + : "primary" + } onClick={() => window.open("https://cal.com/mahmoud-mabrouk-ogzgey/demo", "_blank") } > - {currentPlan?.plan == Plan.Enterprise ? "Current plan" : "Talk to us"} + {currentPlan?.plan == Plan.Business || currentPlan?.plan == Plan.Enterprise + ? "Current plan" + : "Talk to us"} </Button> ) : ( <Button @@ -58,13 +54,7 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP loading={_isLoading} className="w-full" onClick={() => onOptionClick(plan)} - type={ - currentPlan?.plan === plan.plan - ? "link" - : plan.plan === Plan.Hobby - ? "text" - : "default" - } + type={currentPlan?.plan === plan.plan ? "link" : "default"} > {currentPlan?.plan === plan.plan ? "Current plan" @@ -89,7 +79,7 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP </Typography.Text> </div> - <ul className="-ml-5 overflow-auto"> + <ul className="-ml-5"> {plan.features?.map((point, idx) => { return ( <li className="text-[#586673]" key={idx}> diff --git a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx index 4c391361af..485f9ca51e 100644 --- a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx @@ -2,12 +2,10 @@ import {useCallback, useState} from "react" import {message, Spin, Typography} from "antd" -import useURL from "@/oss/hooks/useURL" -import {getEnv} from "@/oss/lib/helpers/dynamicEnv" +import {getAgentaApiUrl} from "@/oss/lib/helpers/utils" import {Plan} from "@/oss/lib/Types" import { checkoutNewSubscription, - switchSubscription, usePricingPlans, useSubscriptionData, useUsageData, @@ -21,7 +19,6 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC const {plans, isLoadingPlan} = usePricingPlans() const {subscription, mutateSubscription} = useSubscriptionData() const {mutateUsage} = useUsageData() - const {projectURL} = useURL() const [isLoading, setIsLoading] = useState<string | null>(null) @@ -33,18 +30,16 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC // 2. subscription-pan is cloud_v0_hobby then we trigger the checkout endpoint // 3. if the user can custom plan like cloud_v0_business then we trigger the switch endpoint - if (plan.plan === Plan.Hobby && subscription?.plan !== Plan.Hobby) { + if (plan.plan === Plan.Hobby && subscription.plan !== Plan.Hobby) { onCancelSubscription() return - } else if (!subscription || subscription?.plan === Plan.Hobby) { + } else { const data = await checkoutNewSubscription({ plan: plan.plan, - success_url: `${getEnv("NEXT_PUBLIC_AGENTA_WEB_URL")}${projectURL || ""}/settings?tab=billing`, + success_url: `${getAgentaApiUrl()}/settings?tab=billing`, }) window.open(data.data.checkout_url, "_blank") - } else { - await switchSubscription({plan: plan.plan}) } setTimeout(() => { @@ -60,14 +55,7 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC setIsLoading(null) } }, - [ - onCancelSubscription, - checkoutNewSubscription, - switchSubscription, - mutateSubscription, - mutateUsage, - projectURL, - ], + [onCancelSubscription, checkoutNewSubscription, mutateSubscription, mutateUsage], ) if (isLoadingPlan) { diff --git a/web/ee/src/components/pages/settings/Billing/index.tsx b/web/ee/src/components/pages/settings/Billing/index.tsx index 3a5ec92157..63812a655f 100644 --- a/web/ee/src/components/pages/settings/Billing/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/index.tsx @@ -4,7 +4,6 @@ import {Button, message, Spin, Typography} from "antd" import dayjs from "dayjs" import {useRouter} from "next/router" -import useURL from "@/oss/hooks/useURL" import {Plan} from "@/oss/lib/Types" import {editSubscriptionInfo, useSubscriptionData, useUsageData} from "@/oss/services/billing" @@ -17,7 +16,6 @@ const {Link} = Typography const Billing = () => { const router = useRouter() - const {projectURL} = useURL() const [isLoadingOpenBillingPortal, setIsLoadingOpenBillingPortal] = useState(false) const {subscription, isSubLoading} = useSubscriptionData() const {usage, isUsageLoading} = useUsageData() @@ -44,8 +42,8 @@ const Billing = () => { }, [editSubscriptionInfo]) const navigateToWorkspaceTab = useCallback(() => { - router.push(`${projectURL}/settings`, {query: {tab: "workspace"}}) - }, [router, projectURL]) + router.push("/settings", {query: {tab: "workspace"}}) + }, [router]) if (isSubLoading || isUsageLoading) { return ( @@ -74,14 +72,15 @@ const Billing = () => { </Typography.Text> )} - {subscription?.plan === Plan.Enterprise ? ( + {subscription?.plan === Plan.Enterprise || + subscription?.plan === Plan.Business ? ( <Typography.Text className="text-[#586673]"> For queries regarding your plan,{" "} <a href="https://cal.com/mahmoud-mabrouk-ogzgey/demo" target="_blank"> click here to contact us </a> </Typography.Text> - ) : subscription?.plan === Plan.Pro || subscription?.plan === Plan.Business ? ( + ) : subscription?.plan === Plan.Pro ? ( <div className="flex items-center gap-2"> <Button type="primary" onClick={() => setIsOpenPricingModal(true)}> Upgrade plan @@ -104,7 +103,7 @@ const Billing = () => { <div className="w-full grid grid-cols-3 gap-4"> {Object.entries(usage) - ?.filter(([key]) => (key !== "users" && key !== "applications")) + ?.filter(([key]) => key !== "users") ?.map(([key, info]) => { return ( <UsageProgressBar diff --git a/web/ee/src/hooks/useCrispChat.ts b/web/ee/src/hooks/useCrispChat.ts deleted file mode 100644 index 19db37e57f..0000000000 --- a/web/ee/src/hooks/useCrispChat.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {useState, useCallback, useEffect} from "react" - -import {Crisp} from "crisp-sdk-web" - -import {getEnv} from "@/oss/lib/helpers/dynamicEnv" - -export const useCrispChat = () => { - const isCrispEnabled = !!getEnv("NEXT_PUBLIC_CRISP_WEBSITE_ID") - - const [isVisible, setIsVisible] = useState(false) - - const updateVisibility = useCallback( - (visible: boolean) => { - if (isCrispEnabled) { - if (visible) { - Crisp.chat.show() - Crisp.chat.open() - } else { - Crisp.chat.hide() - } - setIsVisible(visible) - } - }, - [isCrispEnabled], - ) - - const toggle = useCallback(() => { - if (isCrispEnabled) { - updateVisibility(!isVisible) - } - }, [isVisible, updateVisibility, isCrispEnabled]) - - useEffect(() => { - updateVisibility(false) - }, [updateVisibility]) - - return { - isVisible, - setVisible: updateVisibility, - toggle, - isCrispEnabled, - } -} diff --git a/web/oss/src/lib/types_ee.ts b/web/ee/src/lib/types_ee.ts similarity index 88% rename from web/oss/src/lib/types_ee.ts rename to web/ee/src/lib/types_ee.ts index 92fb607149..1699888619 100644 --- a/web/oss/src/lib/types_ee.ts +++ b/web/ee/src/lib/types_ee.ts @@ -74,27 +74,6 @@ export interface GenerationDashboardData { avg_tokens: number } -export interface TracingDashboardData { - buckets: { - errors: { - costs: number - count: number - duration: number - tokens: number - } - timestamp: string - total: { - costs: number - count: number - duration: number - tokens: number - } - window: number - }[] - count: number - version: string -} - export interface Trace extends Generation {} export interface TraceDetails extends GenerationDetails { diff --git a/web/ee/src/pages/_app.tsx b/web/ee/src/pages/_app.tsx index 92dfb3e135..015b6c5c2a 100644 --- a/web/ee/src/pages/_app.tsx +++ b/web/ee/src/pages/_app.tsx @@ -1,11 +1,4 @@ import "@ant-design/v5-patch-for-react-19" -import "@/oss/styles/globals.css" -import "@/oss/assets/custom-resize-handle.css" -import "react-resizable/css/styles.css" -import "@ag-grid-community/styles/ag-grid.css" -import "@ag-grid-community/styles/ag-theme-alpine.css" -import "jotai-devtools/styles.css" +import _AppPage from "@agenta/oss/src/pages/_app" -import AppPage from "@/oss/components/pages/_app" - -export default AppPage +export default _AppPage diff --git a/web/ee/src/pages/apps/[app_id]/deployments/index.tsx b/web/ee/src/pages/apps/[app_id]/deployments/index.tsx new file mode 100644 index 0000000000..f3917150d6 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/deployments/index.tsx @@ -0,0 +1,3 @@ +import DeploymentPage from "@agenta/oss/src/pages/apps/[app_id]/deployments" + +export default DeploymentPage diff --git a/web/ee/src/pages/apps/[app_id]/endpoints/index.tsx b/web/ee/src/pages/apps/[app_id]/endpoints/index.tsx new file mode 100644 index 0000000000..528fa60360 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/endpoints/index.tsx @@ -0,0 +1,5 @@ +import AppEndpointsPage from "@agenta/oss/src/pages/apps/[app_id]/endpoints" +import {createParams} from "@agenta/oss/src/pages/apps/[app_id]/endpoints" + +export {createParams} +export default AppEndpointsPage diff --git a/web/ee/src/pages/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx b/web/ee/src/pages/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx new file mode 100644 index 0000000000..b9e91c70d9 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx @@ -0,0 +1,87 @@ +import {useEffect, useState} from "react" + +import {useAtom} from "jotai" +import {useRouter} from "next/router" + +import ABTestingEvaluationTable from "@/oss/components/EvaluationTable/ABTestingEvaluationTable" +import {evaluationAtom, evaluationScenariosAtom} from "@/oss/lib/atoms/evaluation" +import {getTestsetChatColumn} from "@/oss/lib/helpers/testset" +import type {Evaluation} from "@/oss/lib/Types" +import {fetchVariants} from "@/oss/services/api" +import { + fetchLoadEvaluation, + fetchAllLoadEvaluationsScenarios, +} from "@/oss/services/human-evaluations/api" +import {fetchTestset} from "@/oss/services/testsets/api" + +import "@ag-grid-community/styles/ag-grid.css" +import "@ag-grid-community/styles/ag-theme-alpine.css" + +export default function Evaluation() { + const router = useRouter() + const evaluationTableId = router.query.evaluation_id + ? router.query.evaluation_id.toString() + : "" + const [evaluationScenarios, setEvaluationScenarios] = useAtom(evaluationScenariosAtom) + const [evaluation, setEvaluation] = useAtom(evaluationAtom) + const [isLoading, setIsLoading] = useState(true) + const appId = router.query.app_id as string + const columnsCount = 2 + + useEffect(() => { + if (!evaluation) { + return + } + const init = async () => { + setIsLoading(true) + try { + const data = await fetchAllLoadEvaluationsScenarios(evaluationTableId, evaluation) + setEvaluationScenarios(data) + } finally { + setTimeout(() => setIsLoading(false), 1000) + } + } + init() + }, [evaluation]) + + useEffect(() => { + if (!evaluationTableId) { + return + } + const init = async () => { + const evaluation: Evaluation = await fetchLoadEvaluation(evaluationTableId) + const backendVariants = await fetchVariants(appId) + const testset = await fetchTestset(evaluation.testset._id) + // Create a map for faster access to first array elements + const backendVariantsMap = new Map() + backendVariants.forEach((obj) => backendVariantsMap.set(obj.variantId, obj)) + + // Update variants in second object + evaluation.variants = evaluation.variants.map((variant) => { + const backendVariant = backendVariantsMap.get(variant.variantId) + return backendVariant ? backendVariant : variant + }) + evaluation.testset = { + ...evaluation.testset, + ...testset, + testsetChatColumn: getTestsetChatColumn(testset.csvdata), + } + setEvaluation(evaluation) + } + + init() + }, [evaluationTableId]) + + return ( + <div className="evalautionContainer"> + {evaluationTableId && evaluationScenarios && evaluation && ( + <ABTestingEvaluationTable + columnsCount={columnsCount} + evaluationScenarios={evaluationScenarios as any[]} + evaluation={evaluation} + isLoading={isLoading} + /> + )} + </div> + ) +} diff --git a/web/ee/src/pages/apps/[app_id]/evaluations/index.tsx b/web/ee/src/pages/apps/[app_id]/evaluations/index.tsx new file mode 100644 index 0000000000..7df5069d84 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/evaluations/index.tsx @@ -0,0 +1,93 @@ +import {ChartDonut, ListChecks, TestTube} from "@phosphor-icons/react" +import {Tabs, TabsProps, Typography} from "antd" +import dynamic from "next/dynamic" +import {createUseStyles} from "react-jss" + +const AbTestingEvaluation = dynamic( + () => import("@/oss/components/HumanEvaluations/AbTestingEvaluation"), + {ssr: false}, +) +const SingleModelEvaluation = dynamic( + () => import("@/oss/components/HumanEvaluations/SingleModelEvaluation"), + {ssr: false}, +) + +const AutoEvaluation = dynamic( + () => import("@/oss/components/pages/evaluations/autoEvaluation/AutoEvaluation"), + {ssr: false}, +) + +import {useQueryParam} from "@/oss/hooks/useQuery" +import {JSSTheme} from "@/oss/lib/Types" + +import "@ag-grid-community/styles/ag-grid.css" +import "@ag-grid-community/styles/ag-theme-alpine.css" + +const useStyles = createUseStyles((theme: JSSTheme) => ({ + container: { + display: "flex", + flexDirection: "column", + gap: theme.marginLG, + }, + title: { + fontSize: theme.fontSizeLG, + fontWeight: theme.fontWeightMedium, + lineHeight: theme.lineHeightHeading4, + }, + evaluationTabContainer: { + "& .ant-tabs-nav": { + marginBottom: theme.marginLG, + }, + "& .ant-tabs-tab-btn": { + display: "flex", + alignItems: "center", + "& .ant-tabs-tab-icon": { + display: "flex", + }, + }, + }, +})) + +const EvaluationsPage = () => { + const classes = useStyles() + const [selectedEvaluation, setSelectedEvaluation] = useQueryParam( + "selectedEvaluation", + "auto_evaluation", + ) + + const items: TabsProps["items"] = [ + { + key: "auto_evaluation", + label: "Automatic Evaluation", + icon: <ChartDonut size={16} />, + children: <AutoEvaluation />, + }, + { + key: "human_annotation", + label: "Human annotation", + icon: <ListChecks size={16} />, + children: <SingleModelEvaluation viewType="evaluation" />, + }, + { + key: "human_ab_testing", + label: "Human A/B Testing", + icon: <TestTube size={16} />, + children: <AbTestingEvaluation viewType="evaluation" />, + }, + ] + + return ( + <div className={classes.container}> + <Typography.Text className={classes.title}>Evaluations</Typography.Text> + + <Tabs + className={classes.evaluationTabContainer} + items={items} + defaultActiveKey={selectedEvaluation} + onChange={setSelectedEvaluation} + /> + </div> + ) +} + +export default EvaluationsPage diff --git a/web/ee/src/pages/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx b/web/ee/src/pages/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx new file mode 100644 index 0000000000..d7aa3e5704 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx @@ -0,0 +1,10 @@ +import EvaluationScenarios from "@/oss/components/pages/evaluations/evaluationScenarios/EvaluationScenarios" + +import "@ag-grid-community/styles/ag-grid.css" +import "@ag-grid-community/styles/ag-theme-alpine.css" + +const EvaluationDetail = () => { + return <EvaluationScenarios /> +} + +export default EvaluationDetail diff --git a/web/ee/src/pages/apps/[app_id]/evaluations/results/compare/index.tsx b/web/ee/src/pages/apps/[app_id]/evaluations/results/compare/index.tsx new file mode 100644 index 0000000000..47b5b82faf --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/evaluations/results/compare/index.tsx @@ -0,0 +1,10 @@ +import EvaluationCompare from "@/oss/components/pages/evaluations/evaluationCompare/EvaluationCompare" + +import "@ag-grid-community/styles/ag-grid.css" +import "@ag-grid-community/styles/ag-theme-alpine.css" + +const EvaluationCompareDetails = () => { + return <EvaluationCompare /> +} + +export default EvaluationCompareDetails diff --git a/web/ee/src/pages/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx b/web/ee/src/pages/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx new file mode 100644 index 0000000000..5085479a01 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx @@ -0,0 +1,88 @@ +import {useEffect, useState} from "react" + +import {useRouter} from "next/router" + +import SingleModelEvaluationTable from "@/oss/components/EvaluationTable/SingleModelEvaluationTable" +import {getTestsetChatColumn} from "@/oss/lib/helpers/testset" +import type {Evaluation, EvaluationScenario, GenericObject} from "@/oss/lib/Types" +import {fetchVariants} from "@/oss/services/api" +import { + fetchLoadEvaluation, + fetchAllLoadEvaluationsScenarios, +} from "@/oss/services/human-evaluations/api" +import {fetchTestset} from "@/oss/services/testsets/api" + +import "@ag-grid-community/styles/ag-grid.css" +import "@ag-grid-community/styles/ag-theme-alpine.css" + +export default function Evaluation() { + const router = useRouter() + const evaluationTableId = router.query.evaluation_id + ? router.query.evaluation_id.toString() + : "" + const [evaluationScenarios, setEvaluationScenarios] = useState<EvaluationScenario[]>([]) + const [isLoading, setIsLoading] = useState(true) + const [evaluation, setEvaluation] = useState<Evaluation>() + const appId = router.query.app_id as string + + useEffect(() => { + if (!evaluation) { + return + } + const init = async () => { + setIsLoading(true) + try { + const data = await fetchAllLoadEvaluationsScenarios(evaluationTableId, evaluation) + setEvaluationScenarios( + data.map((item: GenericObject) => { + const numericScore = parseInt(item.score) + return {...item, score: isNaN(numericScore) ? null : numericScore} + }), + ) + } finally { + setTimeout(() => setIsLoading(false), 1000) + } + } + init() + }, [evaluation, evaluationTableId]) + + useEffect(() => { + if (!evaluationTableId) { + return + } + const init = async () => { + const evaluation: Evaluation = await fetchLoadEvaluation(evaluationTableId) + const backendVariants = await fetchVariants(appId) + const testset = await fetchTestset(evaluation.testset._id) + // Create a map for faster access to first array elements + const backendVariantsMap = new Map() + backendVariants.forEach((obj) => backendVariantsMap.set(obj.variantId, obj)) + + // Update variants in second object + evaluation.variants = evaluation.variants.map((variant) => { + const backendVariant = backendVariantsMap.get(variant.variantId) + return backendVariant ? backendVariant : variant + }) + evaluation.testset = { + ...evaluation.testset, + ...testset, + testsetChatColumn: getTestsetChatColumn(testset.csvdata), + } + setEvaluation(evaluation) + } + + init() + }, [evaluationTableId, appId]) + + return ( + <div className="evalautionContainer"> + {evaluationTableId && evaluationScenarios && evaluation && ( + <SingleModelEvaluationTable + evaluationScenarios={evaluationScenarios as any[]} + evaluation={evaluation} + isLoading={isLoading} + /> + )} + </div> + ) +} diff --git a/web/ee/src/pages/apps/[app_id]/overview/index.tsx b/web/ee/src/pages/apps/[app_id]/overview/index.tsx new file mode 100644 index 0000000000..c49356f79a --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/overview/index.tsx @@ -0,0 +1,3 @@ +import OverviewPage from "@agenta/oss/src/pages/apps/[app_id]/overview" + +export default OverviewPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/playground/index.tsx b/web/ee/src/pages/apps/[app_id]/playground/index.tsx similarity index 100% rename from web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/playground/index.tsx rename to web/ee/src/pages/apps/[app_id]/playground/index.tsx diff --git a/web/ee/src/pages/apps/[app_id]/traces/index.tsx b/web/ee/src/pages/apps/[app_id]/traces/index.tsx new file mode 100644 index 0000000000..079ea8cd31 --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/traces/index.tsx @@ -0,0 +1,3 @@ +import TracesPage from "@agenta/oss/src/pages/apps/[app_id]/traces" + +export default TracesPage diff --git a/web/ee/src/pages/apps/[app_id]/variants/index.tsx b/web/ee/src/pages/apps/[app_id]/variants/index.tsx new file mode 100644 index 0000000000..bc090aee2c --- /dev/null +++ b/web/ee/src/pages/apps/[app_id]/variants/index.tsx @@ -0,0 +1,3 @@ +import VariantsPage from "@agenta/oss/src/pages/apps/[app_id]/variants" + +export default VariantsPage diff --git a/web/ee/src/pages/apps/index.tsx b/web/ee/src/pages/apps/index.tsx new file mode 100644 index 0000000000..d946c485ac --- /dev/null +++ b/web/ee/src/pages/apps/index.tsx @@ -0,0 +1,3 @@ +import AppsPage from "@agenta/oss/src/pages/apps" + +export default AppsPage diff --git a/web/ee/src/pages/evaluations/share/index.tsx b/web/ee/src/pages/evaluations/share/index.tsx new file mode 100644 index 0000000000..67e58a9f09 --- /dev/null +++ b/web/ee/src/pages/evaluations/share/index.tsx @@ -0,0 +1,88 @@ +import {useEffect, useRef} from "react" + +import {useRouter} from "next/router" + +import ProtectedRoute from "@/oss/components/ProtectedRoute/ProtectedRoute" +import ContentSpinner from "@/oss/components/Spinner/ContentSpinner" +import {useOrgData} from "@/oss/contexts/org.context" +import {EvaluationType} from "@/oss/lib/enums" +import {getAllVariantParameters} from "@/oss/lib/helpers/variantHelper" +import {GenericObject, Variant} from "@/oss/lib/Types" +import {fetchVariants} from "@/oss/services/api" +import {createNewEvaluation} from "@/oss/services/human-evaluations/api" + +const EvaluationShare: React.FC = () => { + const router = useRouter() + const {changeSelectedOrg, selectedOrg, loading} = useOrgData() + const called = useRef(false) + + useEffect(() => { + const {app, org, variants: variantIds, testset, type} = router.query + + //1. check all the required params are present + if (app && org && testset && type && Array.isArray(variantIds) && !loading) { + const executor = async () => { + //make sure this is only called once + if (called.current) { + return + } + called.current = true + + //fetch variants' data to get the inputs + const allVariants = await fetchVariants(app as string) + const variants = variantIds + .map((id) => allVariants.find((item) => item.variantId === id)) + .filter((item) => item !== undefined) as Variant[] + + //get the inputs for each variant + const results = await Promise.all( + variants.map((variant) => + getAllVariantParameters(app as string, variant).then((data) => ({ + variantName: variant.variantName, + inputs: data?.inputs.map((inputParam) => inputParam.name) || [], + })), + ), + ) + const inputs: Record<string, string[]> = results.reduce( + (acc: GenericObject, result) => { + acc[result.variantName] = result.inputs + return acc + }, + {}, + ) + + //create the evaluation + const evalId = await createNewEvaluation({ + variant_ids: variantIds, + appId: app as string, + inputs: inputs[variants[0].variantName], + evaluationType: type as EvaluationType, + evaluationTypeSettings: {}, + llmAppPromptTemplate: "", + selectedCustomEvaluationID: "", + testsetId: testset as string, + }) + + //redirect to the evaluation detail page once all work is done + router.push(`/apps/${app}/annotations/${type}/${evalId}`) + } + + if (selectedOrg?.id !== org) { + //2. change the selected org to the one in the query + changeSelectedOrg(org as string, () => { + executor() + }) + } else { + executor() + } + } + }, [router.query, loading]) + + return <ContentSpinner /> +} + +export default () => ( + <ProtectedRoute> + <EvaluationShare /> + </ProtectedRoute> +) diff --git a/web/ee/src/pages/index.tsx b/web/ee/src/pages/index.tsx new file mode 100644 index 0000000000..2ff9b86470 --- /dev/null +++ b/web/ee/src/pages/index.tsx @@ -0,0 +1,3 @@ +import DashboardPage from "@agenta/oss/src/pages" + +export default DashboardPage diff --git a/web/ee/src/pages/observability/index.tsx b/web/ee/src/pages/observability/index.tsx new file mode 100644 index 0000000000..59a765eb4d --- /dev/null +++ b/web/ee/src/pages/observability/index.tsx @@ -0,0 +1,3 @@ +import ObservabilityPage from "@agenta/oss/src/pages/observability" + +export default ObservabilityPage diff --git a/web/ee/src/pages/settings/index.tsx b/web/ee/src/pages/settings/index.tsx new file mode 100644 index 0000000000..551818acf1 --- /dev/null +++ b/web/ee/src/pages/settings/index.tsx @@ -0,0 +1,3 @@ +import SettingsPage from "@agenta/oss/src/pages/settings" + +export default SettingsPage diff --git a/web/ee/src/pages/testsets/[testset_id]/index.tsx b/web/ee/src/pages/testsets/[testset_id]/index.tsx new file mode 100644 index 0000000000..9848cf7f10 --- /dev/null +++ b/web/ee/src/pages/testsets/[testset_id]/index.tsx @@ -0,0 +1,3 @@ +import TestsetPage from "@agenta/oss/src/pages/testsets/[testset_id]" + +export default TestsetPage diff --git a/web/ee/src/pages/testsets/index.tsx b/web/ee/src/pages/testsets/index.tsx new file mode 100644 index 0000000000..f5f8d751c2 --- /dev/null +++ b/web/ee/src/pages/testsets/index.tsx @@ -0,0 +1,3 @@ +import TestsetsPage from "@agenta/oss/src/pages/testsets" + +export default TestsetsPage diff --git a/web/ee/src/pages/w/[workspace_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/index.tsx deleted file mode 100644 index 24b7e01d2e..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import WorkspaceRedirect from "@/oss/components/pages/WorkspaceRedirect" - -export default WorkspaceRedirect diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/deployments/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/deployments/index.tsx deleted file mode 100644 index 15d4a5ea5f..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/deployments/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import DeploymentPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/deployments" - -export default DeploymentPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints/index.tsx deleted file mode 100644 index 5dccd2cacb..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import AppEndpointsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints" -import {createParams} from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints" - -export {createParams} -export default AppEndpointsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx deleted file mode 100644 index 76e6526898..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/human_a_b_testing/[evaluation_id]/index.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import {useEffect, useState} from "react" - -import {useAtom, useAtomValue} from "jotai" -import dynamic from "next/dynamic" -import {useRouter} from "next/router" - -// Avoid SSR for this heavy component to prevent server-side ReferenceErrors from client-only libs -const ABTestingEvaluationTable = dynamic( - () => import("@/oss/components/EvaluationTable/ABTestingEvaluationTable"), - {ssr: false}, -) -import useURL from "@/oss/hooks/useURL" -import {evaluationAtom, evaluationScenariosAtom} from "@/oss/lib/atoms/evaluation" -import {getTestsetChatColumn} from "@/oss/lib/helpers/testset" -import {useBreadcrumbsEffect} from "@/oss/lib/hooks/useBreadcrumbs" -import type {Evaluation} from "@/oss/lib/Types" -import { - fetchLoadEvaluation, - fetchAllLoadEvaluationsScenarios, -} from "@/oss/services/human-evaluations/api" -import {fetchTestset} from "@/oss/services/testsets/api" -import {projectIdAtom} from "@/oss/state/project" -import {variantsAtom} from "@/oss/state/variant/atoms/fetcher" - -export default function Evaluation() { - const router = useRouter() - const projectId = useAtomValue(projectIdAtom) - const evaluationTableId = router.query.evaluation_id - ? router.query.evaluation_id.toString() - : "" - const [evaluationScenarios, setEvaluationScenarios] = useAtom(evaluationScenariosAtom) - const [evaluation, setEvaluation] = useAtom(evaluationAtom) - const [isLoading, setIsLoading] = useState(true) - const appId = router.query.app_id as string - const columnsCount = 2 - const {baseAppURL} = useURL() - // variants from global store - const variantsStore = useAtomValue(variantsAtom) - - useEffect(() => { - if (!evaluation || !projectId) { - return - } - const init = async () => { - setIsLoading(true) - try { - const data = await fetchAllLoadEvaluationsScenarios(evaluationTableId, evaluation) - setEvaluationScenarios(data) - } finally { - setTimeout(() => setIsLoading(false), 1000) - } - } - init() - }, [evaluation, projectId]) - - useEffect(() => { - if (!evaluationTableId) { - return - } - const init = async () => { - const evaluation: Evaluation = await fetchLoadEvaluation(evaluationTableId) - const backendVariants = variantsStore - const testset = await fetchTestset(evaluation.testset._id) - // Create a map for faster access to first array elements - const backendVariantsMap = new Map() - backendVariants.forEach((obj) => backendVariantsMap.set(obj.variantId, obj)) - - // Update variants in second object - evaluation.variants = evaluation.variants.map((variant) => { - const backendVariant = backendVariantsMap.get(variant.variantId) - return backendVariant ? backendVariant : variant - }) - evaluation.testset = { - ...evaluation.testset, - ...testset, - testsetChatColumn: getTestsetChatColumn(testset.csvdata), - } - setEvaluation(evaluation) - } - - init() - }, [evaluationTableId]) - - // breadcrumbs - useBreadcrumbsEffect( - { - breadcrumbs: { - appPage: { - label: "human ab testing", - href: `${baseAppURL}/${appId}/evaluations?selectedEvaluation=human_ab_testing`, - }, - "eval-detail": { - label: evaluationTableId, - value: evaluationTableId, - }, - }, - type: "append", - condition: !!evaluationTableId, - }, - [evaluationTableId], - ) - - return ( - <div className="evaluationContainer"> - {evaluationTableId && evaluationScenarios && evaluation && ( - <ABTestingEvaluationTable - columnsCount={columnsCount} - evaluationScenarios={evaluationScenarios as any[]} - evaluation={evaluation} - isLoading={isLoading} - /> - )} - </div> - ) -} diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/index.tsx deleted file mode 100644 index 5f9c0ce406..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvaluationsView from "@/oss/components/pages/evaluations/EvaluationsView" - -const AppEvaluationsPage = () => { - return <EvaluationsView scope="app" /> -} - -export default AppEvaluationsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx deleted file mode 100644 index 8a3e7e4523..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/[evaluation_id]/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import {useRouter} from "next/router" - -import EvalRunDetailsPage from "@/oss/components/EvalRunDetails" - -const AppEvaluationResultsPage = () => { - const router = useRouter() - const rawType = - (Array.isArray(router.query.eval_type) - ? router.query.eval_type[0] - : router.query.eval_type) || - (Array.isArray(router.query.type) ? router.query.type[0] : router.query.type) - const normalized = - rawType === "online" - ? "online" - : rawType === "human" - ? "human" - : rawType === "custom" - ? "custom" - : "auto" - return <EvalRunDetailsPage evalType={normalized} /> -} - -export default AppEvaluationResultsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/compare/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/compare/index.tsx deleted file mode 100644 index 9a24e505d7..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/results/compare/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvaluationCompare from "@/oss/components/pages/evaluations/evaluationCompare/EvaluationCompare" - -const EvaluationCompareDetails = () => { - return <EvaluationCompare /> -} - -export default EvaluationCompareDetails diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx deleted file mode 100644 index 209e1772ec..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/evaluations/single_model_test/[evaluation_id]/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvalRunDetailsPage from "@/oss/components/EvalRunDetails" - -const EvaluationPage = () => { - return <EvalRunDetailsPage evalType="human" /> -} - -export default EvaluationPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx deleted file mode 100644 index cc56265403..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import OverviewPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview" - -export default OverviewPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/traces/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/traces/index.tsx deleted file mode 100644 index 128eb8aa0f..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/traces/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import TracesPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/traces" - -export default TracesPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/variants/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/variants/index.tsx deleted file mode 100644 index 96ba4c5973..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/variants/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import VariantsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/variants" - -export default VariantsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/index.tsx deleted file mode 100644 index df81bc9d9d..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import AppsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/apps" - -export default AppsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/index.tsx deleted file mode 100644 index b01b145bb4..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvaluationsView from "@/oss/components/pages/evaluations/EvaluationsView" - -const ProjectEvaluationsPage = () => { - return <EvaluationsView scope="project" /> -} - -export default ProjectEvaluationsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/[evaluation_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/[evaluation_id]/index.tsx deleted file mode 100644 index 8cabe50e3a..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/[evaluation_id]/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import {useRouter} from "next/router" - -import EvalRunDetailsPage from "@/oss/components/EvalRunDetails" - -const ProjectEvaluationResultsPage = () => { - const router = useRouter() - const rawType = - (Array.isArray(router.query.eval_type) - ? router.query.eval_type[0] - : router.query.eval_type) || - (Array.isArray(router.query.type) ? router.query.type[0] : router.query.type) - const normalized = - rawType === "online" - ? "online" - : rawType === "human" - ? "human" - : rawType === "custom" - ? "custom" - : "auto" - return <EvalRunDetailsPage evalType={normalized} /> -} - -export default ProjectEvaluationResultsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/compare/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/compare/index.tsx deleted file mode 100644 index 4fc96755ce..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/results/compare/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvaluationCompare from "@/oss/components/pages/evaluations/evaluationCompare/EvaluationCompare" - -const ProjectEvaluationCompareDetails = () => { - return <EvaluationCompare /> -} - -export default ProjectEvaluationCompareDetails diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/single_model_test/[evaluation_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/single_model_test/[evaluation_id]/index.tsx deleted file mode 100644 index 67c0827984..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluations/single_model_test/[evaluation_id]/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import EvalRunDetailsPage from "@/oss/components/EvalRunDetails" - -const ProjectHumanEvaluationPage = () => { - return <EvalRunDetailsPage evalType="human" /> -} - -export default ProjectHumanEvaluationPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/configure/[evaluator_id].tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/configure/[evaluator_id].tsx deleted file mode 100644 index 97047a940b..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/configure/[evaluator_id].tsx +++ /dev/null @@ -1,3 +0,0 @@ -import EvaluatorConfigureRoute from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/evaluators/configure/[evaluator_id]" - -export default EvaluatorConfigureRoute diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/index.tsx deleted file mode 100644 index a5cb6daf29..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import ProjectEvaluatorsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/evaluators/index" - -export default ProjectEvaluatorsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/observability/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/observability/index.tsx deleted file mode 100644 index 73d6cb12eb..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/observability/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import ObservabilityPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/observability" - -export default ObservabilityPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx deleted file mode 100644 index 2ce2ce1d4a..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import SettingsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/settings" - -export default SettingsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/share/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/share/index.tsx deleted file mode 100644 index 8a46c8ffae..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/share/index.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import {useEffect, useRef} from "react" - -import {useAtomValue} from "jotai" -import {useRouter} from "next/router" - -import ProtectedRoute from "@/oss/components/ProtectedRoute/ProtectedRoute" -import ContentSpinner from "@/oss/components/Spinner/ContentSpinner" -import useURL from "@/oss/hooks/useURL" -import {EvaluationType} from "@/oss/lib/enums" -import {getAllVariantParameters} from "@/oss/lib/helpers/variantHelper" -import {GenericObject, Variant} from "@/oss/lib/Types" -import {createNewEvaluation} from "@/oss/services/human-evaluations/api" -import {useOrgData} from "@/oss/state/org" -import {variantsAtom} from "@/oss/state/variant/atoms/fetcher" - -const EvaluationShare: React.FC = () => { - const router = useRouter() - const {changeSelectedOrg, selectedOrg, loading} = useOrgData() - const called = useRef(false) - const {baseAppURL} = useURL() - - useEffect(() => { - const {app, org, variants: variantIds, testset, type} = router.query - - //1. check all the required params are present - if (app && org && testset && type && Array.isArray(variantIds) && !loading) { - const executor = async () => { - //make sure this is only called once - if (called.current) { - return - } - called.current = true - - // variants from global store - const allVariants = useAtomValue(variantsAtom) - const variants = variantIds - .map((id) => allVariants.find((item) => item.variantId === id)) - .filter((item) => item !== undefined) as Variant[] - - //get the inputs for each variant - const results = await Promise.all( - variants.map((variant) => - getAllVariantParameters(app as string, variant).then((data) => ({ - variantName: variant.variantName, - inputs: data?.inputs.map((inputParam) => inputParam.name) || [], - })), - ), - ) - const inputs: Record<string, string[]> = results.reduce( - (acc: GenericObject, result) => { - acc[result.variantName] = result.inputs - return acc - }, - {}, - ) - - //create the evaluation - const evalId = await createNewEvaluation({ - variant_ids: variantIds, - inputs: inputs[variants[0].variantName], - evaluationType: type as EvaluationType, - evaluationTypeSettings: {}, - llmAppPromptTemplate: "", - selectedCustomEvaluationID: "", - testsetId: testset as string, - }) - - //redirect to the evaluation detail page once all work is done - router.push(`${baseAppURL}/${app}/annotations/${type}/${evalId}`) - } - - if (selectedOrg?.id !== org) { - //2. change the selected org to the one in the query - changeSelectedOrg(org as string, () => { - executor() - }) - } else { - executor() - } - } - }, [router.query, loading]) - - return <ContentSpinner /> -} - -export default () => <EvaluationShare /> diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/[testset_id]/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/[testset_id]/index.tsx deleted file mode 100644 index 157e0d2acc..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/[testset_id]/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import TestsetPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/testsets/[testset_id]" - -export default TestsetPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/index.tsx deleted file mode 100644 index 0f0dad4db6..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import TestsetsPage from "@agenta/oss/src/pages/w/[workspace_id]/p/[project_id]/testsets" - -export default TestsetsPage diff --git a/web/ee/src/pages/w/[workspace_id]/p/index.tsx b/web/ee/src/pages/w/[workspace_id]/p/index.tsx deleted file mode 100644 index 06971bcc49..0000000000 --- a/web/ee/src/pages/w/[workspace_id]/p/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import WorkspaceProjectRedirect from "@/oss/components/pages/WorkspaceProjectRedirect" - -export default WorkspaceProjectRedirect diff --git a/web/ee/src/pages/w/index.tsx b/web/ee/src/pages/w/index.tsx deleted file mode 100644 index cea69f3950..0000000000 --- a/web/ee/src/pages/w/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import WorkspaceSelection from "@/oss/components/pages/WorkspaceSelection" - -export default WorkspaceSelection diff --git a/web/ee/src/services/billing/index.tsx b/web/ee/src/services/billing/index.tsx index 7adf4fda77..2b9bda7a62 100644 --- a/web/ee/src/services/billing/index.tsx +++ b/web/ee/src/services/billing/index.tsx @@ -1,58 +1,79 @@ -// Re-export the new atom-based billing hooks and actions -export { - useUsageData, - useSubscriptionData, - usePricingPlans, - useSubscriptionActions, - useBilling, -} from "../../state/billing" - -// Legacy function exports for backward compatibility -// These now use direct API calls for backward compatibility +import useSWR from "swr" + +import {DEFAULT_UUID, getCurrentProject} from "@/oss/contexts/project.context" import axios from "@/oss/lib/api/assets/axiosConfig" -import {getAgentaApiUrl} from "@/oss/lib/helpers/api" -import {getProjectValues} from "@/oss/state/project" +import {getAgentaApiUrl} from "@/oss/lib/helpers/utils" + +import {BillingPlan, DataUsageType, SubscriptionType} from "./types" + +export const useUsageData = () => { + const {data, isLoading, mutate, ...restData} = useSWR(`${getAgentaApiUrl()}/billing/usage`, { + revalidateOnFocus: false, + shouldRetryOnError: false, + }) + + return { + usage: data as DataUsageType, + isUsageLoading: isLoading, + mutateUsage: mutate, + ...restData, + } +} + +export const useSubscriptionData = () => { + const {projectId} = getCurrentProject() + + const {data, isLoading, mutate, ...restData} = useSWR( + projectId === DEFAULT_UUID + ? null + : `${getAgentaApiUrl()}/billing/subscription?project_id=${projectId}`, + { + revalidateOnFocus: false, + shouldRetryOnError: false, + }, + ) + + return { + subscription: data as SubscriptionType, + isSubLoading: isLoading, + mutateSubscription: mutate, + ...restData, + } +} + +export const usePricingPlans = () => { + const {data, isLoading, ...restData} = useSWR(`${getAgentaApiUrl()}/billing/plans`, { + revalidateOnFocus: false, + shouldRetryOnError: false, + }) + + return {plans: data as BillingPlan[], isLoadingPlan: isLoading, ...restData} +} -/** - * @deprecated Use useSubscriptionActions().switchSubscription instead - * Legacy function for switching subscription plans - */ export const switchSubscription = async (payload: {plan: string}) => { - const {projectId} = getProjectValues() const response = await axios.post( - `${getAgentaApiUrl()}/billing/plans/switch?plan=${payload.plan}&project_id=${projectId}`, + `${getAgentaApiUrl()}/billing/plans/switch?plan=${payload.plan}`, ) + return response } -/** - * @deprecated Use useSubscriptionActions().cancelSubscription instead - * Legacy function for canceling subscription - */ export const cancelSubscription = async () => { - const {projectId} = getProjectValues() - const response = await axios.post( - `${getAgentaApiUrl()}/billing/subscription/cancel?project_id=${projectId}`, - ) + const response = await axios.post(`${getAgentaApiUrl()}/billing/subscription/cancel`) + return response } -/** - * @deprecated Use useSubscriptionActions().checkoutSubscription instead - * Legacy function for creating new subscription checkout - */ export const checkoutNewSubscription = async (payload: {plan: string; success_url: string}) => { const response = await axios.post( `${getAgentaApiUrl()}/billing/stripe/checkouts/?plan=${payload.plan}&success_url=${payload.success_url}`, ) + return response } -/** - * @deprecated Use useSubscriptionActions().editSubscription instead - * Legacy function for editing subscription info - */ export const editSubscriptionInfo = async () => { const response = await axios.post(`${getAgentaApiUrl()}/billing/stripe/portals/`) + return response } diff --git a/web/ee/src/services/deploymentVersioning/api/index.ts b/web/ee/src/services/deploymentVersioning/api/index.ts new file mode 100644 index 0000000000..2657a5f860 --- /dev/null +++ b/web/ee/src/services/deploymentVersioning/api/index.ts @@ -0,0 +1,55 @@ +import {getCurrentProject} from "@/oss/contexts/project.context" +import axios from "@/oss/lib/api/assets/axiosConfig" +import {getAgentaApiUrl} from "@/oss/lib/helpers/utils" +import {DeploymentRevisionConfig, DeploymentRevisions} from "@/oss/lib/types_ee" + +//Prefix convention: +// - fetch: GET single entity from server +// - fetchAll: GET all entities from server +// - create: POST data to server +// - update: PUT data to server +// - delete: DELETE data from server + +export const fetchAllDeploymentRevisionConfig = async ( + deploymentRevisionId: string, + signal?: AbortSignal, + ignoreAxiosError = true, +): Promise<DeploymentRevisionConfig> => { + const {projectId} = getCurrentProject() + + const {data} = await axios( + `${getAgentaApiUrl()}/configs/deployment/${deploymentRevisionId}?project_id=${projectId}`, + {signal, _ignoreError: ignoreAxiosError} as any, + ) + + return data +} + +export const fetchAllDeploymentRevisions = async ( + appId: string, + environmentName: string, + ignoreAxiosError = false, +): Promise<DeploymentRevisions> => { + const {projectId} = getCurrentProject() + + const {data} = await axios.get( + `${getAgentaApiUrl()}/apps/${appId}/revisions/${environmentName}?project_id=${projectId}`, + { + _ignoreError: ignoreAxiosError, + } as any, + ) + return data +} + +export const createRevertDeploymentRevision = async ( + deploymentRevisionId: string, + ignoreAxiosError = false, +) => { + const {projectId} = getCurrentProject() + + const response = await axios.post( + `${getAgentaApiUrl()}/configs/deployment/${deploymentRevisionId}/revert?project_id=${projectId}`, + {_ignoreError: ignoreAxiosError} as any, + ) + return response +} diff --git a/web/ee/src/services/evaluations/api_ee/index.ts b/web/ee/src/services/evaluations/api_ee/index.ts new file mode 100644 index 0000000000..82a73d9850 --- /dev/null +++ b/web/ee/src/services/evaluations/api_ee/index.ts @@ -0,0 +1,44 @@ +import {getCurrentProject} from "@/oss/contexts/project.context" +import axios from "@/oss/lib/api/assets/axiosConfig" +import {getAgentaApiUrl} from "@/oss/lib/helpers/utils" + +//Prefix convention: +// - fetch: GET single entity from server +// - fetchAll: GET all entities from server +// - create: POST data to server +// - update: PUT data to server +// - delete: DELETE data from server + +import { + EvaluatorInputInterface, + EvaluatorMappingInput, + EvaluatorMappingOutput, + EvaluatorOutputInterface, +} from "../../../lib/types_ee" + +export const createEvaluatorDataMapping = async ( + config: EvaluatorMappingInput, +): Promise<EvaluatorMappingOutput> => { + const {projectId} = getCurrentProject() + + const response = await axios.post( + `${getAgentaApiUrl()}/evaluators/map?project_id=${projectId}`, + {...config}, + ) + return response.data +} + +export const createEvaluatorRunExecution = async ( + evaluatorKey: string, + config: EvaluatorInputInterface, +): Promise<EvaluatorOutputInterface> => { + const {projectId} = getCurrentProject() + + const response = await axios.post( + `${getAgentaApiUrl()}/evaluators/${evaluatorKey}/run?project_id=${projectId}`, + { + ...config, + }, + ) + return response.data +} diff --git a/web/ee/src/services/observability/api/index.ts b/web/ee/src/services/observability/api/index.ts new file mode 100644 index 0000000000..4e12bebce1 --- /dev/null +++ b/web/ee/src/services/observability/api/index.ts @@ -0,0 +1,240 @@ +import dayjs from "dayjs" +import meanBy from "lodash/meanBy" +import random from "lodash/random" +import round from "lodash/round" +import sumBy from "lodash/sumBy" +import Router from "next/router" + +import {getCurrentProject} from "@/oss/contexts/project.context" +import axios from "@/oss/lib/api/assets/axiosConfig" +import {delay, pickRandom} from "@/oss/lib/helpers/utils" +import {GenericObject, WithPagination} from "@/oss/lib/Types" +import { + Generation, + GenerationDashboardData, + GenerationDetails, + Trace, + TraceDetails, +} from "@/oss/lib/types_ee" + +import {ObservabilityMock} from "./mock" + +//Prefix convention: +// - fetch: GET single entity from server +// - fetchAll: GET all entities from server +// - create: POST data to server +// - update: PUT data to server +// - delete: DELETE data from server + +const mock = false + +interface TableParams { + pagination?: { + page: number + pageSize: number + } + sorters?: GenericObject + filters?: GenericObject +} + +function tableParamsToApiParams(options?: Partial<TableParams>) { + const {page = 1, pageSize = 20} = options?.pagination || {} + const res: GenericObject = {page, pageSize} + if (options?.sorters) { + Object.entries(options.sorters).forEach( + ([key, val]) => (res[key] = val === "ascend" ? "asc" : "desc"), + ) + } + if (options?.filters) { + Object.entries(options.filters).forEach(([key, val]) => (res[key] = val)) + } + return res +} + +const generations = pickRandom(ObservabilityMock.generations, 100).map((item, ix) => ({ + ...item, + id: ix + 1 + "", +})) + +export const fetchAllGenerations = async (appId: string, options?: Partial<TableParams>) => { + const {projectId} = getCurrentProject() + + const params = tableParamsToApiParams(options) + if (mock) { + const {page, pageSize} = params + await delay(800) + return { + data: generations.slice((page - 1) * pageSize, page * pageSize), + total: generations.length, + page, + pageSize, + } as WithPagination<Generation> + } + + const response = await axios.get(`/api/observability/spans?project_id=${projectId}`, { + params: {app_id: appId, type: "generation", ...params}, + }) + return response.data as WithPagination<Generation> +} + +export const fetchGeneration = async (generationId: string) => { + const {projectId} = getCurrentProject() + + if (mock) { + await delay(800) + const generation = generations.find((item) => item.id === generationId) + if (!generation) throw new Error("not found!") + + return { + ...generation, + ...ObservabilityMock.generationDetail, + } as GenerationDetails + } + + const response = await axios.get( + `/api/observability/spans/${generationId}?project_id=${projectId}`, + { + params: {type: "generation"}, + }, + ) + return response.data as GenerationDetails +} + +export const fetchGenerationsDashboardData = async ( + appId: string, + options: { + range: string + environment?: string + variant?: string + }, +) => { + const {projectId} = getCurrentProject() + + const {range, environment, variant} = options + if (mock) { + await delay(1200) + const startTs = Date.now() + const endTs = dayjs() + .subtract(1, range === "24_hours" ? "day" : range === "7_days" ? "week" : "month") + .valueOf() + + const data = ObservabilityMock.dashboardData().filter( + (item) => + (item as any).timestamp >= endTs && + (item as any).timestamp <= startTs && + (!environment || item.enviornment === environment), + ) + + const successCount = sumBy(data, "success_count") + const failureCount = sumBy(data, "failure_count") + return { + data: data.map((item) => ({ + ...item, + timestamp: dayjs(item.timestamp).format( + range === "24_hours" ? "h:mm a" : range === "7_days" ? "ddd" : "D MMM", + ), + })) as any, + total_count: successCount + failureCount, + failure_rate: round(failureCount / (successCount + failureCount), 2), + total_cost: sumBy(data, "cost"), + avg_cost: meanBy(data, "cost"), + avg_latency: meanBy(data, "latency"), + total_tokens: sumBy(data, "total_tokens"), + avg_tokens: meanBy(data, "total_tokens"), + } as GenerationDashboardData + } + const response = await axios.get(`/api/observability/v1/analytics?project_id=${projectId}`, { + params: { + app_id: appId, + timeRange: range, + environment, + variant, + format: "legacy", + }, + }) + const val = response.data as GenerationDashboardData + val.data = val.data.map((item) => ({ + ...item, + timestamp: dayjs(item.timestamp).format( + range === "24_hours" ? "h:mm a" : range === "7_days" ? "ddd" : "D MMM", + ), + })) + return val +} + +export const deleteGeneration = async ( + generationIds: string[], + type = "generation", + ignoreAxiosError = true, +) => { + const {projectId} = getCurrentProject() + + await axios.delete(`/api/observability/spans?project_id=${projectId}`, { + data: generationIds, + _ignoreError: ignoreAxiosError, + } as any) + return true +} + +export const fetchAllTraces = async (appId: string, options?: Partial<TableParams>) => { + const {projectId} = getCurrentProject() + + const params = tableParamsToApiParams(options) + if (mock) { + const {page, pageSize} = params + await delay(800) + return { + data: generations.slice((page - 1) * pageSize, page * pageSize), + total: generations.length, + page, + pageSize, + } as WithPagination<Trace> + } + const response = await axios.get(`/api/observability/traces?project_id=${projectId}`, { + params: {app_id: appId, type: "generation", ...params}, + }) + return response.data as WithPagination<Trace> +} + +export const fetchTrace = async (traceId: string) => { + const {projectId} = getCurrentProject() + + if (mock) { + await delay(800) + const generation = generations.find((item) => item.id === traceId) + if (!generation) throw new Error("not found!") + + return { + ...generation, + ...ObservabilityMock.generationDetail, + spans: await fetchSpansOfTrace(traceId), + } as TraceDetails + } + const [trace, spans] = await Promise.all([ + axios.get(`/api/observability/traces/${traceId}?project_id=${projectId}`), + fetchSpansOfTrace(traceId), + ]) + const response = trace.data + response.spans = spans + return response as TraceDetails +} + +export const fetchSpansOfTrace = async (traceId: string) => { + const {projectId} = getCurrentProject() + + if (mock) { + await delay(200) + const lower = random(0, 100) + const upper = random(lower, 100) + + return generations.slice(lower, upper).map((item) => ({ + ...item, + ...ObservabilityMock.generationDetail, + })) + } + + const response = await axios.get(`/api/observability/spans?project_id=${projectId}`, { + params: {trace_id: traceId, app_id: Router.query.app_id}, + }) + return response.data as Generation[] +} diff --git a/web/ee/src/services/observability/api/mock.ts b/web/ee/src/services/observability/api/mock.ts new file mode 100644 index 0000000000..a13e172d46 --- /dev/null +++ b/web/ee/src/services/observability/api/mock.ts @@ -0,0 +1,148 @@ +import dayjs from "dayjs" + +import {randNum} from "@/oss/lib/helpers/utils" +import { + Generation, + GenerationKind, + GenerationDashboardData, + GenerationStatus, +} from "@/oss/lib/types_ee" + +const generations: Generation[] = [ + { + id: "1", + created_at: "2021-10-01T00:00:00Z", + variant: { + variant_id: "1", + variant_name: "default", + revision: 1, + }, + environment: "production", + status: GenerationStatus.OK, + spankind: GenerationKind.LLM, + metadata: { + cost: 0.0001, + latency: 0.32, + usage: { + total_tokens: 72, + prompt_tokens: 25, + completion_tokens: 47, + }, + }, + user_id: "u-8k3j4", + content: { + inputs: [ + {input_name: "country", input_value: "Pakistan"}, + {input_name: "criteria", input_value: "Most population"}, + ], + outputs: ["The most populous city in Pakistan is Karachi"], + internals: [], + }, + }, + { + id: "2", + created_at: "2023-10-01T00:00:00Z", + variant: { + variant_id: "2", + variant_name: "test", + revision: 1, + }, + environment: "staging", + status: GenerationStatus.ERROR, + spankind: GenerationKind.LLM, + metadata: { + cost: 0.0004, + latency: 0.845, + usage: { + total_tokens: 143, + prompt_tokens: 25, + completion_tokens: 118, + }, + }, + user_id: "u-8k3j4", + content: { + inputs: [], + outputs: [], + internals: [], + }, + }, + { + id: "3", + created_at: "2024-10-01T00:00:00Z", + variant: { + variant_id: "1", + variant_name: "default", + revision: 2, + }, + environment: "development", + status: GenerationStatus.OK, + spankind: GenerationKind.LLM, + metadata: { + cost: 0.0013, + latency: 0.205, + usage: { + total_tokens: 61, + prompt_tokens: 25, + completion_tokens: 36, + }, + }, + user_id: "u-7tij2", + content: { + inputs: [], + outputs: [], + internals: [], + }, + }, +] + +const generationDetail = { + content: { + inputs: [ + {input_name: "country", input_value: "Pakistan"}, + {input_name: "criteria", input_value: "Most population"}, + ], + outputs: ["The most populous city in Pakistan is Karachi"], + internals: [], + }, + config: { + system: "You are an expert in geography.", + user: "What is the city of {country} with the criteria {criteria}?", + variables: [ + {name: "country", type: "string"}, + {name: "criteria", type: "string"}, + ], + temperature: 0.7, + model: "gpt-3.5-turbo", + max_tokens: 100, + top_p: 0.9, + frequency_penalty: 0.5, + presence_penalty: 0, + }, +} + +const dashboardData = (count = 300): GenerationDashboardData["data"] => { + return Array(count) + .fill(true) + .map(() => { + const totalTokens = randNum(0, 600) + const promptTokens = randNum(0, 150) + return { + timestamp: randNum(dayjs().subtract(30, "days").valueOf(), dayjs().valueOf()), // b/w last 30 days + success_count: randNum(0, 20), + failure_count: randNum(0, 5), + latency: Math.random() * 1.5, + cost: Math.random() * 0.01, + total_tokens: totalTokens, + prompt_tokens: promptTokens, + completion_tokens: totalTokens - promptTokens, + enviornment: ["production", "staging", "development"][randNum(0, 2)], + variant: "default", + } + }) +} + +export const ObservabilityMock = { + generations, + generationDetail, + dashboardData, +} diff --git a/web/ee/src/services/promptVersioning/api/index.ts b/web/ee/src/services/promptVersioning/api/index.ts new file mode 100644 index 0000000000..3c130a5e37 --- /dev/null +++ b/web/ee/src/services/promptVersioning/api/index.ts @@ -0,0 +1,41 @@ +import {getCurrentProject} from "@/oss/contexts/project.context" +import axios from "@/oss/lib/api/assets/axiosConfig" +import {getAgentaApiUrl} from "@/oss/lib/helpers/utils" + +//Prefix convention: +// - fetch: GET single entity from server +// - fetchAll: GET all entities from server +// - create: POST data to server +// - update: PUT data to server +// - delete: DELETE data from server + +// versioning +export const fetchAllPromptVersioning = async (variantId: string, ignoreAxiosError = false) => { + const {projectId} = getCurrentProject() + + const {data} = await axios.get( + `${getAgentaApiUrl()}/variants/${variantId}/revisions?project_id=${projectId}`, + { + _ignoreError: ignoreAxiosError, + } as any, + ) + + return data +} + +export const fetchPromptRevision = async ( + variantId: string, + revisionNumber: number, + ignoreAxiosError = false, +) => { + const {projectId} = getCurrentProject() + + const {data} = await axios.get( + `${getAgentaApiUrl()}/variants/${variantId}/revisions/${revisionNumber}?project_id=${projectId}`, + { + _ignoreError: ignoreAxiosError, + } as any, + ) + + return data +} diff --git a/web/ee/src/state/billing/atoms.ts b/web/ee/src/state/billing/atoms.ts deleted file mode 100644 index 974e9a8dec..0000000000 --- a/web/ee/src/state/billing/atoms.ts +++ /dev/null @@ -1,239 +0,0 @@ -import {atom} from "jotai" -import {atomWithMutation, atomWithQuery} from "jotai-tanstack-query" - -import axios from "@/oss/lib/api/assets/axiosConfig" -import {getAgentaApiUrl} from "@/oss/lib/helpers/api" -import {User} from "@/oss/lib/Types" -import {selectedOrgIdAtom} from "@/oss/state/org" -import {profileQueryAtom} from "@/oss/state/profile/selectors/user" -import {projectIdAtom} from "@/oss/state/project" - -import {BillingPlan, DataUsageType, SubscriptionType} from "../../services/billing/types" - -/** - * Query atom for fetching billing usage data - * Only enabled when user is authenticated and project is not default - */ -export const usageQueryAtom = atomWithQuery((get) => { - const profileQuery = get(profileQueryAtom) - const user = profileQuery.data as User | undefined - const projectId = get(projectIdAtom) - - return { - queryKey: ["billing", "usage", projectId, user?.id], - queryFn: async () => { - const response = await axios.get( - `${getAgentaApiUrl()}/billing/usage?project_id=${projectId}`, - ) - return response.data as DataUsageType - }, - staleTime: 1000 * 60 * 2, // 2 minutes - refetchOnWindowFocus: false, - refetchOnReconnect: false, - refetchOnMount: true, - enabled: !!user && !!projectId, - retry: (failureCount, error) => { - // Don't retry on client errors - if ((error as any)?.response?.status >= 400 && (error as any)?.response?.status < 500) { - return false - } - return failureCount < 2 - }, - } -}) - -/** - * Query atom for fetching subscription data - * Only enabled when user is authenticated and project is not default - */ -export const subscriptionQueryAtom = atomWithQuery((get) => { - const profileQuery = get(profileQueryAtom) - const user = profileQuery.data as User | undefined - const projectId = get(projectIdAtom) - const organizationId = get(selectedOrgIdAtom) - - return { - queryKey: ["billing", "subscription", projectId, user?.id, organizationId], - queryFn: async () => { - const response = await axios.get( - `${getAgentaApiUrl()}/billing/subscription?project_id=${projectId}`, - ) - return response.data as SubscriptionType - }, - staleTime: 1000 * 60 * 5, // 5 minutes - refetchOnWindowFocus: false, - refetchOnReconnect: false, - refetchOnMount: true, - enabled: !!organizationId && !!user && !!projectId, - retry: (failureCount, error) => { - // Don't retry on client errors - if ((error as any)?.response?.status >= 400 && (error as any)?.response?.status < 500) { - return false - } - return failureCount < 2 - }, - } -}) - -/** - * Query atom for fetching pricing plans - * Only enabled when user is authenticated and project is not default - */ -export const pricingPlansQueryAtom = atomWithQuery((get) => { - const profileQuery = get(profileQueryAtom) - const user = profileQuery.data as User | undefined - const projectId = get(projectIdAtom) - - return { - queryKey: ["billing", "plans", projectId, user?.id], - queryFn: async () => { - const response = await axios.get( - `${getAgentaApiUrl()}/billing/plans?project_id=${projectId}`, - ) - return response.data as BillingPlan[] - }, - staleTime: 1000 * 60 * 10, // 10 minutes - plans don't change often - refetchOnWindowFocus: false, - refetchOnReconnect: false, - refetchOnMount: true, - enabled: !!user && !!projectId, - retry: (failureCount, error) => { - // Don't retry on client errors - if ((error as any)?.response?.status >= 400 && (error as any)?.response?.status < 500) { - return false - } - return failureCount < 2 - }, - } -}) - -/** - * Mutation atom for switching subscription plans - */ -export const switchSubscriptionMutationAtom = atomWithMutation(() => ({ - mutationFn: async (payload: {plan: string}) => { - const store = await import("jotai").then((m) => m.getDefaultStore()) - const projectId = store.get(projectIdAtom) - - const response = await axios.post( - `${getAgentaApiUrl()}/billing/plans/switch?plan=${payload.plan}&project_id=${projectId}`, - ) - return response.data - }, - onSuccess: () => { - // Subscription data will be invalidated by the hook - }, -})) - -/** - * Mutation atom for canceling subscription - */ -export const cancelSubscriptionMutationAtom = atomWithMutation(() => ({ - mutationFn: async () => { - const store = await import("jotai").then((m) => m.getDefaultStore()) - const projectId = store.get(projectIdAtom) - - const response = await axios.post( - `${getAgentaApiUrl()}/billing/subscription/cancel?project_id=${projectId}`, - ) - return response.data - }, - onSuccess: () => { - // Subscription data will be invalidated by the hook - }, -})) - -/** - * Mutation atom for creating new subscription checkout - */ -export const checkoutSubscriptionMutationAtom = atomWithMutation(() => ({ - mutationFn: async (payload: {plan: string; success_url: string}) => { - const response = await axios.post( - `${getAgentaApiUrl()}/billing/stripe/checkouts/?plan=${payload.plan}&success_url=${payload.success_url}`, - ) - return response.data - }, -})) - -/** - * Mutation atom for editing subscription info (Stripe portal) - */ -export const editSubscriptionMutationAtom = atomWithMutation(() => ({ - mutationFn: async () => { - const response = await axios.post(`${getAgentaApiUrl()}/billing/stripe/portals/`) - return response.data - }, -})) - -/** - * Action atom for switching subscription with automatic data refresh - */ -export const switchSubscriptionAtom = atom(null, async (get, set, payload: {plan: string}) => { - const switchMutation = get(switchSubscriptionMutationAtom) - - try { - const result = await switchMutation.mutateAsync(payload) - - // Refetch subscription and usage data after successful switch - set(subscriptionQueryAtom) - set(usageQueryAtom) - - return result - } catch (error) { - console.error("Failed to switch subscription:", error) - throw error - } -}) - -/** - * Action atom for canceling subscription with automatic data refresh - */ -export const cancelSubscriptionAtom = atom(null, async (get, set) => { - const cancelMutation = get(cancelSubscriptionMutationAtom) - - try { - const result = await cancelMutation.mutateAsync() - - // Refetch subscription and usage data after successful cancellation - set(subscriptionQueryAtom) - set(usageQueryAtom) - - return result - } catch (error) { - console.error("Failed to cancel subscription:", error) - throw error - } -}) - -/** - * Action atom for checkout with no automatic refresh (redirect expected) - */ -export const checkoutSubscriptionAtom = atom( - null, - async (get, set, payload: {plan: string; success_url: string}) => { - const checkoutMutation = get(checkoutSubscriptionMutationAtom) - - try { - const result = await checkoutMutation.mutateAsync(payload) - return result - } catch (error) { - console.error("Failed to create checkout:", error) - throw error - } - }, -) - -/** - * Action atom for editing subscription info (Stripe portal) - */ -export const editSubscriptionAtom = atom(null, async (get, set) => { - const editMutation = get(editSubscriptionMutationAtom) - - try { - const result = await editMutation.mutateAsync() - return result - } catch (error) { - console.error("Failed to open subscription portal:", error) - throw error - } -}) diff --git a/web/ee/src/state/billing/hooks.ts b/web/ee/src/state/billing/hooks.ts deleted file mode 100644 index 050234db73..0000000000 --- a/web/ee/src/state/billing/hooks.ts +++ /dev/null @@ -1,137 +0,0 @@ -import {useCallback} from "react" - -import {useAtom, useAtomValue} from "jotai" - -import { - usageQueryAtom, - subscriptionQueryAtom, - pricingPlansQueryAtom, - switchSubscriptionAtom, - cancelSubscriptionAtom, - checkoutSubscriptionAtom, - editSubscriptionAtom, -} from "./atoms" - -/** - * Hook for managing billing usage data - * Provides the same interface as the original SWR-based useUsageData hook - */ -export const useUsageData = () => { - const usageQuery = useAtomValue(usageQueryAtom) - - return { - usage: usageQuery.data, - isUsageLoading: usageQuery.isPending, - mutateUsage: usageQuery.refetch, - error: usageQuery.error, - isError: usageQuery.isError, - isSuccess: usageQuery.isSuccess, - } -} - -/** - * Hook for managing subscription data - * Provides the same interface as the original SWR-based useSubscriptionData hook - */ -export const useSubscriptionData = () => { - const subscriptionQuery = useAtomValue(subscriptionQueryAtom) - - return { - subscription: subscriptionQuery.data, - isSubLoading: subscriptionQuery.isPending, - mutateSubscription: subscriptionQuery.refetch, - error: subscriptionQuery.error, - isError: subscriptionQuery.isError, - isSuccess: subscriptionQuery.isSuccess, - } -} - -/** - * Hook for managing pricing plans data - * Provides the same interface as the original SWR-based usePricingPlans hook - */ -export const usePricingPlans = () => { - const plansQuery = useAtomValue(pricingPlansQueryAtom) - - return { - plans: plansQuery.data, - isLoadingPlan: plansQuery.isPending, - error: plansQuery.error, - isError: plansQuery.isError, - isSuccess: plansQuery.isSuccess, - refetch: plansQuery.refetch, - } -} - -/** - * Hook for managing subscription actions - * Provides mutation functions for subscription management - */ -export const useSubscriptionActions = () => { - const [, switchSubscription] = useAtom(switchSubscriptionAtom) - const [, cancelSubscription] = useAtom(cancelSubscriptionAtom) - const [, checkoutSubscription] = useAtom(checkoutSubscriptionAtom) - const [, editSubscription] = useAtom(editSubscriptionAtom) - - const handleSwitchSubscription = useCallback( - async (payload: {plan: string}) => { - return await switchSubscription(payload) - }, - [switchSubscription], - ) - - const handleCancelSubscription = useCallback(async () => { - return await cancelSubscription() - }, [cancelSubscription]) - - const handleCheckoutSubscription = useCallback( - async (payload: {plan: string; success_url: string}) => { - return await checkoutSubscription(payload) - }, - [checkoutSubscription], - ) - - const handleEditSubscription = useCallback(async () => { - return await editSubscription() - }, [editSubscription]) - - return { - switchSubscription: handleSwitchSubscription, - cancelSubscription: handleCancelSubscription, - checkoutSubscription: handleCheckoutSubscription, - editSubscription: handleEditSubscription, - } -} - -/** - * Combined hook for all billing functionality - * Provides a comprehensive interface for billing management - */ -export const useBilling = () => { - const usage = useUsageData() - const subscription = useSubscriptionData() - const plans = usePricingPlans() - const actions = useSubscriptionActions() - - return { - // Usage data - usage: usage.usage, - isUsageLoading: usage.isUsageLoading, - mutateUsage: usage.mutateUsage, - usageError: usage.error, - - // Subscription data - subscription: subscription.subscription, - isSubLoading: subscription.isSubLoading, - mutateSubscription: subscription.mutateSubscription, - subscriptionError: subscription.error, - - // Plans data - plans: plans.plans, - isLoadingPlan: plans.isLoadingPlan, - plansError: plans.error, - - // Actions - ...actions, - } -} diff --git a/web/ee/src/state/billing/index.ts b/web/ee/src/state/billing/index.ts deleted file mode 100644 index e49d36ee3b..0000000000 --- a/web/ee/src/state/billing/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Billing atoms -export { - usageQueryAtom, - subscriptionQueryAtom, - pricingPlansQueryAtom, - switchSubscriptionMutationAtom, - cancelSubscriptionMutationAtom, - checkoutSubscriptionMutationAtom, - editSubscriptionMutationAtom, - switchSubscriptionAtom, - cancelSubscriptionAtom, - checkoutSubscriptionAtom, - editSubscriptionAtom, -} from "./atoms" - -// Billing hooks -export { - useUsageData, - useSubscriptionData, - usePricingPlans, - useSubscriptionActions, - useBilling, -} from "./hooks" diff --git a/web/ee/src/state/observability/dashboard.ts b/web/ee/src/state/observability/dashboard.ts deleted file mode 100644 index 6d040b22d7..0000000000 --- a/web/ee/src/state/observability/dashboard.ts +++ /dev/null @@ -1,61 +0,0 @@ -import {useAtom} from "jotai" -import {eagerAtom} from "jotai-eager" -import {atomWithQuery} from "jotai-tanstack-query" - -import {GenerationDashboardData} from "@/oss/lib/types_ee" -import {fetchGenerationsDashboardData} from "@/oss/services/tracing/api" -import {routerAppIdAtom} from "@/oss/state/app/atoms/fetcher" -import {projectIdAtom} from "@/oss/state/project" - -const DEFAULT_RANGE = "30_days" - -export const observabilityDashboardQueryAtom = atomWithQuery<GenerationDashboardData | null>( - (get) => { - const appId = get(routerAppIdAtom) - const projectId = get(projectIdAtom) - - return { - queryKey: [ - "observability", - "dashboard", - appId ?? "__global__", - projectId ?? null, - DEFAULT_RANGE, - ], - queryFn: async ({signal}) => { - if (!projectId) return null - return fetchGenerationsDashboardData(appId, { - range: DEFAULT_RANGE, - projectId, - signal, - }) - }, - enabled: Boolean(projectId), - staleTime: 1000 * 60, - refetchOnWindowFocus: false, - } - }, -) - -export const observabilityDashboardAtom = eagerAtom<GenerationDashboardData | null>((get) => { - const result = (get(observabilityDashboardQueryAtom) as any) - ?.data as GenerationDashboardData | null - return result ?? null -}) - -export const useObservabilityDashboard = () => { - const [query] = useAtom(observabilityDashboardQueryAtom) - - const {data, isPending, isFetching, isLoading, error, refetch, fetchStatus} = query as any - - const fetching = fetchStatus === "fetching" - const loading = Boolean(fetching || isPending || isLoading) - - return { - data: (data as GenerationDashboardData | null) ?? null, - loading, - isFetching: Boolean(isFetching) || fetching, - error, - refetch, - } -} diff --git a/web/ee/src/state/observability/index.ts b/web/ee/src/state/observability/index.ts deleted file mode 100644 index fec8ad0fe4..0000000000 --- a/web/ee/src/state/observability/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./dashboard" diff --git a/web/ee/tests/1-settings/api-keys-management.spec.ts b/web/ee/tests/1-settings/api-keys-management.spec.ts deleted file mode 100644 index 1395cba61f..0000000000 --- a/web/ee/tests/1-settings/api-keys-management.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import apiKeysTests from "@agenta/oss/tests/1-settings/api-keys" - -test.skip("Settings: API Keys Management", apiKeysTests) diff --git a/web/ee/tests/1-settings/model-hub.spec.ts b/web/ee/tests/1-settings/model-hub.spec.ts deleted file mode 100644 index 186de6222c..0000000000 --- a/web/ee/tests/1-settings/model-hub.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import modelHubTests from "@agenta/oss/tests/1-settings/model-hub" - -test.describe("Settings: Model Hub", modelHubTests) diff --git a/web/ee/tests/2-app/create.spec.ts b/web/ee/tests/2-app/create.spec.ts deleted file mode 100644 index de0137e3cd..0000000000 --- a/web/ee/tests/2-app/create.spec.ts +++ /dev/null @@ -1,5 +0,0 @@ -import tests, {test} from "@agenta/oss/tests/2-app" - -test.describe(`EE App Creation Flow`, () => { - tests() -}) diff --git a/web/ee/tests/3-playground/run-variant.spec.ts b/web/ee/tests/3-playground/run-variant.spec.ts deleted file mode 100644 index 5fc8618686..0000000000 --- a/web/ee/tests/3-playground/run-variant.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import playgroundTests from "@agenta/oss/tests/3-playground" - -test.describe("Playground: Run Variant", playgroundTests) diff --git a/web/ee/tests/4-prompt-registry/prompt-registry-flow.spec.ts b/web/ee/tests/4-prompt-registry/prompt-registry-flow.spec.ts deleted file mode 100644 index 511bd060ef..0000000000 --- a/web/ee/tests/4-prompt-registry/prompt-registry-flow.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import promptRegistryTests from "@agenta/oss/tests/4-prompt-registry" - -test.describe("Prompt Registry Flow", promptRegistryTests) diff --git a/web/ee/tests/5-testsset/testset.spec.ts b/web/ee/tests/5-testsset/testset.spec.ts deleted file mode 100644 index 5f5ed87486..0000000000 --- a/web/ee/tests/5-testsset/testset.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import testsetTests from "@agenta/oss/tests/5-testsset" - -test.describe("Testsets: Interact with testsets", testsetTests) diff --git a/web/ee/tests/6-auto-evaluation/assets/README.md b/web/ee/tests/6-auto-evaluation/assets/README.md deleted file mode 100644 index 04a8b108c9..0000000000 --- a/web/ee/tests/6-auto-evaluation/assets/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Auto Evaluation Test Fixtures - -This directory contains test fixtures for automating the evaluation process in the Agenta platform. These fixtures provide reusable functions to interact with the evaluation UI and perform common evaluation tasks. - -## Available Fixtures - -### 1. `navigateToEvaluation` - -Navigates to the Automatic Evaluation section for a specific application. - -**Parameters:** - -- `appId` (string): The ID of the application to evaluate - -**Usage:** - -```typescript -await test("navigate to evaluation", async ({navigateToEvaluation}) => { - await navigateToEvaluation("your-app-id") -}) -``` - -### 2. `runAutoEvaluation` - -Runs an automatic evaluation with the specified configuration. - -**Parameters (object):** - -- `evaluators` (string[]): List of evaluator names to use -- `testset` (string, optional): Name of the testset to evaluate against -- `variants` (string[]): List of variant names to evaluate - -**Usage:** - -```typescript -await test("run evaluation", async ({runAutoEvaluation}) => { - await runAutoEvaluation({ - evaluators: ["factual-accuracy", "relevance"], - testset: "my-testset", - variants: ["variant-1", "variant-2"], - }) -}) -``` - -## How It Works - -1. **Testsetup**: The fixtures extend the base test fixture with evaluation-specific functionality. -2. **UI Automation**: They handle all the necessary UI interactions, including: - - Navigating to the evaluation section - - Selecting testsets - - Choosing variants - - Configuring evaluators - - Managing the evaluation creation flow -3. **State Management**: The fixtures handle waiting for async operations and ensure the UI is in the correct state before proceeding. - -## Best Practices - -- Always wait for navigation and UI updates to complete -- Use the provided helper methods instead of direct page interactions -- Keep test data (evaluators, testsets, variants) in separate configuration files -- Combine fixtures for complex test scenarios - -## Dependencies - -- Base test fixtures from `@agenta/web-tests` -- Playwright test runner -- Agenta UI components and API helpers diff --git a/web/ee/tests/6-auto-evaluation/assets/types.ts b/web/ee/tests/6-auto-evaluation/assets/types.ts deleted file mode 100644 index 9160b106d5..0000000000 --- a/web/ee/tests/6-auto-evaluation/assets/types.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {GenerationChatRow, GenerationInputRow} from "@/oss/components/Playground/state/types" -import {ConfigMetadata, OpenAPISpec} from "@/oss/lib/shared/variant/genericTransformer/types" -import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" -import {BaseFixture} from "@agenta/web-tests/tests/fixtures/base.fixture/types" - -export type InvokedVariant = { - variant: EnhancedVariant - allMetadata: Record<string, ConfigMetadata> - inputRow: GenerationInputRow - messageRow?: GenerationChatRow - rowId: string - appId: string - uri: { - runtimePrefix: string - routePath?: string - status?: boolean - } - headers: Record<string, string> - projectId: string - messageId?: string - chatHistory?: any[] - spec: OpenAPISpec - runId: string -} - -export enum Role { - SYSTEM = "system", - USER = "user", - ASSISTANT = "assistant", - TOOL = "tool", - FUNCTION = "function", -} -export type RunAutoEvalFixtureType = { - evaluators: string[] - testset?: string - variants: string[] -} - -export interface EvaluationFixtures extends BaseFixture { - navigateToEvaluation: (appId: string) => Promise<void> - runAutoEvaluation: (config: RunAutoEvalFixtureType) => Promise<void> -} diff --git a/web/ee/tests/6-auto-evaluation/index.ts b/web/ee/tests/6-auto-evaluation/index.ts deleted file mode 100644 index ddcd75920f..0000000000 --- a/web/ee/tests/6-auto-evaluation/index.ts +++ /dev/null @@ -1,92 +0,0 @@ -import {test as baseAutoEvalTest} from "./tests" - -import {expect} from "@agenta/web-tests/utils" -import { - createTagString, - TestCoverage, - TestPath, - TestScope, -} from "@agenta/web-tests/playwright/config/testTags" - -const testAutoEval = () => { - baseAutoEvalTest( - "should run a single evaluation", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.SMOKE), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({page, apiHelpers, runAutoEvaluation, navigateToEvaluation}) => { - // 1. Fetch apps, variants from API - const app = await apiHelpers.getApp("completion") - const appId = app.app_id - - const variants = await apiHelpers.getVariants(appId) - const variantName = variants[0].name || variants[0].variant_name - - // 2. Navigate to evaluation - await navigateToEvaluation(appId) - - // 4. Run auto evaluation - await runAutoEvaluation({ - evaluators: ["Exact Match"], - variants: [variantName], - }) - - await expect(page.locator(".ant-modal").first()).toHaveCount(0) - - // 10. Check evaluation table - const evalTable = page.getByRole("table") - await evalTable.waitFor({state: "visible"}) - - const newRow = evalTable.getByRole("row").first() - await newRow.waitFor({state: "visible"}) - // const evaLoadingState = page.getByText("Running").first() - // await expect(evaLoadingState).toBeVisible() - // await expect(evaLoadingState).not.toBeVisible() - await expect(page.getByText("Completed").first()).toBeVisible() - }, - ) - - baseAutoEvalTest( - "should show an error when attempting to create an evaluation with a mismatched testset", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.SMOKE), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({page, apiHelpers, runAutoEvaluation, navigateToEvaluation}) => { - // 1. Fetch apps, variants from API - const app = await apiHelpers.getApp("chat") - const appId = app.app_id - - const variants = await apiHelpers.getVariants(appId) - const variantName = variants[0].name || variants[0].variant_name - - // 2. Navigate to evaluation - await navigateToEvaluation(appId) - - // 4. Run auto evaluation - await runAutoEvaluation({ - evaluators: ["Exact Match"], - variants: [variantName], - }) - - const message = page.locator(".ant-message").first() - await expect(message).toBeVisible() - await expect(message).toHaveText( - "The testset columns do not match the selected variant input parameters", - ) - }, - ) -} - -export default testAutoEval diff --git a/web/ee/tests/6-auto-evaluation/run-auto-evaluation.spec.ts b/web/ee/tests/6-auto-evaluation/run-auto-evaluation.spec.ts deleted file mode 100644 index b295d76ced..0000000000 --- a/web/ee/tests/6-auto-evaluation/run-auto-evaluation.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import testAutoEval from "." - -test.describe("Auto Evaluation: Run evaluation", testAutoEval) diff --git a/web/ee/tests/6-auto-evaluation/tests.ts b/web/ee/tests/6-auto-evaluation/tests.ts deleted file mode 100644 index 7a29a28a3a..0000000000 --- a/web/ee/tests/6-auto-evaluation/tests.ts +++ /dev/null @@ -1,97 +0,0 @@ -import {test as baseTest} from "@agenta/web-tests/tests/fixtures/base.fixture" -import {expect} from "@agenta/web-tests/utils" -import {EvaluationFixtures, RunAutoEvalFixtureType} from "./assets/types" - -/** - * Evaluation-specific test fixtures extending the base test fixture. - * Provides high-level actions for evaluation tests. - */ -const testWithEvaluationFixtures = baseTest.extend<EvaluationFixtures>({ - navigateToEvaluation: async ({page, uiHelpers}, use) => { - await use(async (appId: string) => { - await page.goto(`/apps/${appId}/evaluations`) - await uiHelpers.expectPath(`/apps/${appId}/evaluations`) - - // Move to Automatic Evaluation tab - await uiHelpers.clickTab("Automatic Evaluation") - await page.locator("span").filter({hasText: /^Evaluations$/}) - - // Wait for Evaluations to load - const spinner = page.locator(".ant-spin").first() - if (await spinner.count()) { - await spinner.waitFor({state: "hidden"}) - } - }) - }, - - runAutoEvaluation: async ({page, uiHelpers}, use) => { - await use(async ({evaluators, testset, variants}: RunAutoEvalFixtureType) => { - // 1. Open modal - await uiHelpers.clickButton("Start new Evaluation") - const modal = page.locator(".ant-modal").first() - await expect(modal).toBeVisible() - - // Helper: Select tab by name - const goToStep = async (step: string) => { - const tab = modal.getByRole("tab", {name: step}) - await tab.click() - } - - // 2. Select Testset - const selectedTestset = testset - - await goToStep("Testset") - await uiHelpers.selectTableRowInput({ - rowText: selectedTestset, - inputType: "radio", - checked: true, - }) - await expect( - page - .locator(".ant-tabs-tab", {hasText: "Testset"}) - .locator(".ant-tag", {hasText: selectedTestset}), - ).toBeVisible() - - // 3. Select Variant(s) - await goToStep("Variant") - const variantRow = page.getByRole("row").filter({ - has: page - .locator("td", {hasText: variants[0]}) - .locator(".ant-tag", {hasText: "v1"}), - }) - - await expect(variantRow).toBeVisible() - await variantRow.getByRole("radio").check() - - // 4. Select Evaluator(s) - await goToStep("Evaluator") - for (const evaluator of evaluators) { - await uiHelpers.selectTableRowInput({ - rowText: evaluator, - inputType: "checkbox", - checked: true, - }) - await expect( - page - .locator(".ant-tabs-tab", {hasText: "Evaluator"}) - .locator(".ant-tag", {hasText: evaluator}), - ).toBeVisible() - } - - await expect - .poll(async () => { - return await page.locator(".ant-tabs-nav-list .ant-tag").count() - }) - .toBe(3) - - // 5. Create Evaluation - const createButton = page.getByRole("button", {name: "Create"}).last() - await createButton.scrollIntoViewIfNeeded() - await createButton.click() - - await expect(createButton).toHaveClass(/ant-btn-loading/) - }) - }, -}) - -export {testWithEvaluationFixtures as test} diff --git a/web/ee/tests/7-observability/observability.spec.ts b/web/ee/tests/7-observability/observability.spec.ts deleted file mode 100644 index 98908200a9..0000000000 --- a/web/ee/tests/7-observability/observability.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import observabilityTests from "@agenta/oss/tests/7-observability" - -test.describe("Observability: test observability", observabilityTests) diff --git a/web/ee/tests/8-deployment/deploy-variant.spec.ts b/web/ee/tests/8-deployment/deploy-variant.spec.ts deleted file mode 100644 index 0f613a356e..0000000000 --- a/web/ee/tests/8-deployment/deploy-variant.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import deploymentTests from "@agenta/oss/tests/8-deployment" - -test.describe("Deployment: test deployment", deploymentTests) diff --git a/web/ee/tests/9-human-annotation/assets/types.ts b/web/ee/tests/9-human-annotation/assets/types.ts deleted file mode 100644 index 968f6d2a00..0000000000 --- a/web/ee/tests/9-human-annotation/assets/types.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type {BaseFixture} from "@agenta/web-tests/tests/fixtures/base.fixture/types" -import {Locator} from "@agenta/web-tests/utils" - -export type HumanEvaluationConfig = { - testset?: string - variants: string - name: string - skipEvaluatorCreation?: boolean -} - -export interface HumanEvaluationFixtures extends BaseFixture { - navigateToHumanEvaluation: (appId: string) => Promise<void> - navigateToHumanAnnotationRun: (appId: string) => Promise<void> - createHumanEvaluationRun: (config: HumanEvaluationConfig) => Promise<void> - runAllScenarios: () => Promise<void> - verifyStatusUpdate: (row: Locator) => Promise<void> - switchToTableView: () => Promise<void> - runScenarioFromFocusView: () => Promise<void> - navigateBetweenScenarios: () => Promise<void> - annotateFromFocusView: () => Promise<void> - annotateFromTableView: () => Promise<void> -} diff --git a/web/ee/tests/9-human-annotation/human-annotation.spec.ts b/web/ee/tests/9-human-annotation/human-annotation.spec.ts deleted file mode 100644 index 6c26f40717..0000000000 --- a/web/ee/tests/9-human-annotation/human-annotation.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {test} from "@agenta/web-tests/tests/fixtures/base.fixture" -import humanAnnotationTests from "." - -test.describe("Human Annotation", humanAnnotationTests) diff --git a/web/ee/tests/9-human-annotation/index.ts b/web/ee/tests/9-human-annotation/index.ts deleted file mode 100644 index a3e701e2d7..0000000000 --- a/web/ee/tests/9-human-annotation/index.ts +++ /dev/null @@ -1,181 +0,0 @@ -import {test as baseHumanTest, expect} from "./tests" -import { - createTagString, - TestCoverage, - TestPath, - TestScope, -} from "@agenta/web-tests/playwright/config/testTags" - -const humanAnnotationTests = () => { - baseHumanTest( - "should show an error when attempting to create an evaluation with a mismatched testset", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.SMOKE), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({page, apiHelpers, navigateToHumanEvaluation, createHumanEvaluationRun}) => { - const app = await apiHelpers.getApp("chat") - const appId = app.app_id - - const variants = await apiHelpers.getVariants(appId) - const variantName = variants[0].name || variants[0].variant_name - - await navigateToHumanEvaluation(appId) - - await createHumanEvaluationRun({ - variants: variantName, - name: `e2e-human-${Date.now()}`, - }) - - const message = page.locator(".ant-message").first() - await expect(message).toBeVisible() - await expect(message).toHaveText( - "The testset columns do not match the selected variant input parameters", - ) - }, - ) - - baseHumanTest( - "should create human evaluation run", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.SMOKE), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({page, apiHelpers, navigateToHumanEvaluation, createHumanEvaluationRun}) => { - const app = await apiHelpers.getApp() - const appId = app.app_id - - const variants = await apiHelpers.getVariants(appId) - const variantName = variants[0].name || variants[0].variant_name - - await navigateToHumanEvaluation(appId) - - await createHumanEvaluationRun({ - variants: variantName, - name: `e2e-human-${Date.now()}`, - skipEvaluatorCreation: true, - }) - - await expect(page.locator(".ant-modal").first()).toHaveCount(0) - - await expect(page).toHaveURL(/single_model_test\/.*scenarioId=.*/) - }, - ) - - baseHumanTest( - "should run scenarios and update status", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({ - navigateToHumanAnnotationRun, - page, - apiHelpers, - verifyStatusUpdate, - switchToTableView, - runScenarioFromFocusView, - }) => { - const app = await apiHelpers.getApp() - const appId = app.app_id - - await navigateToHumanAnnotationRun(appId) - - // --- Focus View: Single Scenario --- - await runScenarioFromFocusView() - - // --- Focus View: Run All --- - // await page.getByRole("button", {name: "Run All"}).click() - // await expect(page.locator("span").filter({hasText: "Running"})).toBeVisible() - // await expect(page.locator("span").filter({hasText: "Success"})).toBeVisible() - - // --- Table View --- - await switchToTableView() - - // Table Row: Run Individual - const row = page.locator(".ant-table-row").nth(1) - await row.getByRole("button", {name: "Run"}).click() - await verifyStatusUpdate(row) - - // Table View: Run All - await page.getByRole("button", {name: "Run All"}).click() - - const rows = page.locator(".ant-table-row") - const rowCount = await rows.count() - - for (let i = 0; i < rowCount; i++) { - const currentRow = rows.nth(i) - await verifyStatusUpdate(currentRow) - } - }, - ) - - baseHumanTest( - "should allow annotating scenarios", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({ - navigateToHumanAnnotationRun, - apiHelpers, - page, - switchToTableView, - annotateFromFocusView, - annotateFromTableView, - }) => { - const app = await apiHelpers.getApp() - const appId = app.app_id - - await navigateToHumanAnnotationRun(appId) - - await page.locator(".ant-segmented-item").nth(2).click() - - await annotateFromFocusView() - - await switchToTableView() - - // await annotateFromTableView() - }, - ) - - baseHumanTest( - "should navigate scenarios with filters", - { - tag: [ - createTagString("scope", TestScope.EVALUATIONS), - createTagString("coverage", TestCoverage.LIGHT), - createTagString("coverage", TestCoverage.FULL), - createTagString("path", TestPath.HAPPY), - ], - }, - async ({apiHelpers, navigateToHumanAnnotationRun, navigateBetweenScenarios}) => { - const app = await apiHelpers.getApp() - const appId = app.app_id - - await navigateToHumanAnnotationRun(appId) - - await navigateBetweenScenarios() - }, - ) -} - -export default humanAnnotationTests diff --git a/web/ee/tests/9-human-annotation/tests.ts b/web/ee/tests/9-human-annotation/tests.ts deleted file mode 100644 index ea09afb526..0000000000 --- a/web/ee/tests/9-human-annotation/tests.ts +++ /dev/null @@ -1,244 +0,0 @@ -import {test as baseTest} from "@agenta/web-tests/tests/fixtures/base.fixture" -import {expect, Locator} from "@agenta/web-tests/utils" - -import type {HumanEvaluationFixtures, HumanEvaluationConfig} from "./assets/types" -import {waitForApiResponse} from "tests/tests/fixtures/base.fixture/apiHelpers" -import {EvaluationRun} from "@/oss/lib/hooks/usePreviewEvaluations/types" -import {SnakeToCamelCaseKeys} from "@/oss/lib/Types" - -const testWithHumanFixtures = baseTest.extend<HumanEvaluationFixtures>({ - navigateToHumanEvaluation: async ({page, uiHelpers, apiHelpers}, use) => { - await use(async (appId: string) => { - await page.goto(`/apps/${appId}/evaluations?selectedEvaluation=human_annotation`) - await expect(page).toHaveURL( - `/apps/${appId}/evaluations?selectedEvaluation=human_annotation`, - ) - - const evaluationRunsResponse = await waitForApiResponse<{ - runs: SnakeToCamelCaseKeys<EvaluationRun>[] - count: number - }>(page, { - route: `/api/preview/evaluations/runs/query`, - method: "POST", - }) - - const evaluationRuns = await evaluationRunsResponse - - expect(Array.isArray(evaluationRuns.runs)).toBe(true) - - await expect(page.locator("span").filter({hasText: /^Evaluations$/})).toBeVisible() - - await uiHelpers.clickTab("Human annotation") - - if (evaluationRunsResponse.runs.length > 0) { - await page.locator(".ant-checkbox").first().click() - - // click delete button - await uiHelpers.clickButton("Delete") - - // confirm delete in modal - await uiHelpers.confirmModal("Delete") - } - - await expect(evaluationRunsResponse.runs.length).toBe(0) - - await expect( - page.locator(".ant-btn-primary", {hasText: "Start new evaluation"}).first(), - ).toBeVisible() - }) - }, - - navigateToHumanAnnotationRun: async ({page, uiHelpers, apiHelpers}, use) => { - await use(async (appId: string) => { - await page.goto(`/apps/${appId}/evaluations?selectedEvaluation=human_annotation`) - await expect(page).toHaveURL( - `/apps/${appId}/evaluations?selectedEvaluation=human_annotation`, - ) - - const runs = await apiHelpers.getEvaluationRuns() - - await expect(page.locator("span").filter({hasText: /^Evaluations$/})).toBeVisible() - - await uiHelpers.clickTab("Human annotation") - - await page.locator(`tr[data-row-key="${runs[0].id}"]`).click() - - await expect(page).toHaveURL( - new RegExp(`/apps/${appId}/evaluations/single_model_test/${runs[0].id}(\\?|$)`), - ) - - await expect(page.locator("h4").filter({hasText: runs[0].name})).toBeVisible() - }) - }, - - createHumanEvaluationRun: async ({page, uiHelpers}, use) => { - await use(async (config: HumanEvaluationConfig) => { - await uiHelpers.clickButton("Start new evaluation") - const modal = page.locator(".ant-modal").first() - await expect(modal).toBeVisible() - - const goToStep = async (step: string) => { - await modal.getByRole("tab", {name: step}).click() - } - - await uiHelpers.typeWithDelay('input[placeholder="Enter a name"]', config.name) - - await goToStep("Testset") - await uiHelpers.selectTableRowInput({ - rowText: config.testset, - inputType: "radio", - checked: true, - }) - - await goToStep("Variant") - const variantRow = page.getByRole("row").filter({ - has: page - .locator("td", {hasText: config.variants}) - .locator(".ant-tag", {hasText: "v1"}), - }) - - await expect(variantRow).toBeVisible() - await variantRow.getByRole("radio").check() - - await goToStep("Evaluator") - - const evaluatorName = "evaluator_test" - - if (!config.skipEvaluatorCreation) { - await uiHelpers.clickButton("Create new") - const evalDrawer = page.locator(".ant-drawer-content") - await expect(evalDrawer).toBeVisible() - await expect(evalDrawer).toContainText("Create new evaluator") - - await uiHelpers.typeWithDelay("#evaluatorName", evaluatorName) - await expect(page.locator("#evaluatorSlug")).toHaveValue(evaluatorName) - - await uiHelpers.typeWithDelay("#metrics_0_name", "isTestWorking") - - await page.locator(".ant-select").click() - - const dropdownOption = page.locator('div[title="Boolean (True/False)"]') - await expect(dropdownOption).toBeVisible() - - await dropdownOption.click() - - await uiHelpers.clickButton("Save") - - await expect(evalDrawer).toHaveCount(0) - - const successMessage = page - .locator(".ant-message") - .getByText("Evaluator created successfully") - await expect(successMessage).toBeVisible() - } - - await uiHelpers.selectTableRowInput({ - rowText: evaluatorName, - inputType: "checkbox", - checked: true, - }) - - await expect - .poll(async () => { - return await page.locator(".ant-tabs-nav-list .ant-tag").count() - }) - .toBe(3) - - const createButton = modal.getByRole("button", {name: "Create"}).last() - await createButton.click() - await expect(createButton).toHaveClass(/ant-btn-loading/) - }) - }, - - verifyStatusUpdate: async ({page, uiHelpers}, use) => { - await use(async (row: Locator) => { - await expect(row.locator(".ant-table-cell").nth(1)).toHaveText(/Running|Incomplete/) - await expect(row.getByRole("button", {name: "Annotate"})).toBeVisible() - }) - }, - - switchToTableView: async ({page, uiHelpers}, use) => { - await use(async () => { - await page.locator(".ant-radio-button-wrapper", {hasText: "Table View"}).click() - await expect(page).toHaveURL(/view=table/) - }) - }, - - runScenarioFromFocusView: async ({page, uiHelpers}, use) => { - await use(async () => { - await expect(page.locator("span").filter({hasText: "Pending"})).toBeVisible() - await page.getByRole("button", {name: "Run Scenario"}).first().click() - await expect(page.locator("span").filter({hasText: "Running"})).toBeVisible() - await expect(page.locator("span").filter({hasText: "Incomplete"}).first()).toBeVisible() - }) - }, - - annotateFromFocusView: async ({page}, use) => { - await use(async () => { - const collapseBox = page.locator(".ant-collapse-content-box") - await expect(collapseBox.getByText("isTestWorking")).toBeVisible() - - await collapseBox.locator(".ant-radio-button-wrapper").first().click() - - const annotateBtn = page.getByRole("button", {name: "Annotate"}) - await expect(annotateBtn).toBeEnabled() - - await annotateBtn.click() - - await expect(page.locator("span", {hasText: "Annotating"}).first()).toBeVisible() - - await expect(page.locator("span", {hasText: "Success"})).toHaveCount(2) - }) - }, - - annotateFromTableView: async ({page}, use) => { - await use(async () => { - const row = page.locator(".ant-table-row").first() - - await row.getByRole("button", {name: "Annotate"}).click() - - const drawer = page.locator(".ant-drawer-content") - await expect(drawer).toBeVisible() - await expect(drawer).toContainText("Annotate scenario") - await expect(drawer.getByText("isTestWorking")).toBeVisible() - - await drawer.locator(".ant-radio-button-wrapper").first().click() - - const annotateBtn = drawer.getByRole("button", {name: "Annotate"}) - await expect(annotateBtn).toBeEnabled() - await annotateBtn.click() - - await expect(drawer).toHaveCount(0) - }) - }, - - navigateBetweenScenarios: async ({page}, use) => { - await use(async () => { - const prevBtn = page.getByRole("button", {name: "Prev"}) - const nextBtn = page.getByRole("button", {name: "Next"}) - - // Initial state - await expect(prevBtn).toBeDisabled() - await expect(nextBtn).toBeEnabled() - - // Navigate: 1 → 2 - await expect(page.locator('span[title="Testcase: 1"]').first()).toBeVisible() - await nextBtn.click() - await expect(page.locator('span[title="Testcase: 2"]').first()).toBeVisible() - - // Navigate: 2 → 3 - await nextBtn.click() - await expect(page.locator('span[title="Testcase: 3"]').first()).toBeVisible() - - // Backward: 3 → 2 - await prevBtn.click() - await expect(page.locator('span[title="Testcase: 2"]').first()).toBeVisible() - - // Backward: 2 → 1 - await prevBtn.click() - await expect(page.locator('span[title="Testcase: 1"]').first()).toBeVisible() - }) - }, -}) - -export {testWithHumanFixtures as test, expect} diff --git a/web/ee/tests/app/create.spec.ts b/web/ee/tests/app/create.spec.ts new file mode 100644 index 0000000000..e10f1c4247 --- /dev/null +++ b/web/ee/tests/app/create.spec.ts @@ -0,0 +1,9 @@ +import {tests} from "@agenta/oss/tests/app/create.spec" +import {test as baseTest, tags, createAuthTest} from "tests/tests/app/test" +import {AppType, type AppFixtures} from "tests/tests/app/types" + +const test = createAuthTest<AppFixtures>(baseTest) +// Tags can now be added directly to the describe block title +test.describeWithAuth(`App Creation Flow ${tags} @requiresAuth`, () => { + tests() +}) diff --git a/web/oss/.gitignore b/web/oss/.gitignore index d61cb7e83c..999e236e02 100644 --- a/web/oss/.gitignore +++ b/web/oss/.gitignore @@ -34,7 +34,6 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts -# tests -tests/datalayer/results - - +# cypress videos +cypress/videos +cypress/screenshots diff --git a/web/oss/README.md b/web/oss/README.md index f1df3618ce..1686309c9e 100644 --- a/web/oss/README.md +++ b/web/oss/README.md @@ -183,11 +183,13 @@ Our folder structure follows a module-based architecture that prioritizes mainta #### Core Principles 1. **Modular Organization** + - Modules represent distinct feature areas (similar to pages) - Each module is self-contained with its own components, hooks, and assets - Shared functionality is elevated to appropriate hierarchy levels 2. **Component Structure** + - Components are organized by their scope of use - Each component may contain: - Presentational logic (`Component.tsx`) @@ -207,12 +209,14 @@ Our folder structure follows a module-based architecture that prioritizes mainta #### State Management 1. **Store Organization** + - Each module can have its own `store` folder containing: - Jotai atoms for reactive state - Context providers for complex state/dependency injection - Global store at root level for cross-module state 2. **State Movement Guidelines** + - State used only within a component stays as local state - State shared between components in a module uses module-level store - State shared across modules moves to root `/store` @@ -229,27 +233,27 @@ Our folder structure follows a module-based architecture that prioritizes mainta #### Implementation Strategy -- **Current Approach**: Gradual adoption during regular development -- **Migration**: Update components to follow this structure as they are modified -- **No Big Bang**: Avoid large-scale refactoring -- **Progressive Enhancement**: Easy to implement incrementally +- **Current Approach**: Gradual adoption during regular development +- **Migration**: Update components to follow this structure as they are modified +- **No Big Bang**: Avoid large-scale refactoring +- **Progressive Enhancement**: Easy to implement incrementally This structure supports: -- Clear ownership and responsibility -- Easy code review and modification -- Identification of reusable patterns -- Natural code organization based on usage -- Scalable architecture that grows with the application +- Clear ownership and responsibility +- Easy code review and modification +- Identification of reusable patterns +- Natural code organization based on usage +- Scalable architecture that grows with the application ### Data Fetching Best Practices We recommend using SWR with Axios for data fetching instead of useEffect patterns. This helps achieve cleaner code while, -- simplifying management of fetch states. -- handling cache better -- having a more interactive UI by revalidating in background -- utilizing optimistic mutations. +- simplifying management of fetch states. +- handling cache better +- having a more interactive UI by revalidating in background +- utilizing optimistic mutations. #### Example: Converting useEffect Data Fetching to SWR with Axios @@ -408,11 +412,3 @@ const items = useMemo( ;<AccordionTreePanel items={items} /> ``` - -## Tailwind Tokens - -The frontend uses Ant Design tokens which are transformed for Tailwind. If you modify `web/oss/src/styles/tokens/antd-themeConfig.json`, regenerate the Tailwind token file by running in the web directory and commit the changes: - -```bash -pnpm generate:tailwind-tokens -``` diff --git a/web/oss/cat_all_cypress.sh b/web/oss/cat_all_cypress.sh new file mode 100755 index 0000000000..5d427b140e --- /dev/null +++ b/web/oss/cat_all_cypress.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Directory containing the Cypress files +CYPRESS_DIR="cypress" + +# Function to add file content with header +add_file_content() { + local file_path="$1" + if [ -f "$file_path" ]; then + echo "/***** $file_path **/" + cat "$file_path" + echo + else + echo "Warning: File not found - $file_path" >&2 + fi +} + +# Concatenate all files +( + # e2e directory files + for file in ${CYPRESS_DIR}/e2e/*.cy.ts; do + if [ -f "$file" ]; then + add_file_content "$file" + fi + done + + # support directory files + for file in ${CYPRESS_DIR}/support/commands/*.ts; do + if [ -f "$file" ]; then + add_file_content "$file" + fi + done + + # support/e2e.ts file + add_file_content "${CYPRESS_DIR}/support/e2e.ts" + add_file_content "cypress.config.ts" +) | pbcopy + +echo "All specified Cypress files have been concatenated and copied to clipboard." \ No newline at end of file diff --git a/web/oss/cypress.config.ts b/web/oss/cypress.config.ts new file mode 100644 index 0000000000..ce1946f300 --- /dev/null +++ b/web/oss/cypress.config.ts @@ -0,0 +1,33 @@ +import {defineConfig} from "cypress" +import {config} from "dotenv" + +// read in the environment variables from .env.local file +config({path: ".env.local"}) + +export default defineConfig({ + video: false, + screenshotOnRunFailure: false, + e2e: { + baseUrl: "http://localhost:3000", + defaultCommandTimeout: 120000, + requestTimeout: 120000, + pageLoadTimeout: 120000, + responseTimeout: 120000, + taskTimeout: 120000, + execTimeout: 120000, + setupNodeEvents(on) { + on("task", { + log(message) { + console.log(message) + return null + }, + }) + }, + experimentalStudio: true, + }, + env: { + baseApiURL: "http://localhost/api", + NEXT_PUBLIC_OPENAI_API_KEY: process.env.NEXT_PUBLIC_OPENAI_API_KEY, + NEXT_PUBLIC_AGENTA_LICENSE: false, + }, +}) diff --git a/web/oss/cypress/data/countries-genders.csv b/web/oss/cypress/data/countries-genders.csv new file mode 100644 index 0000000000..31448cc304 --- /dev/null +++ b/web/oss/cypress/data/countries-genders.csv @@ -0,0 +1,11 @@ +country,gender +USA,Male +Spain,Female +China,Male +Germany,Female +India,Male +Australia,Female +Brazil,Male +Canada,Female +Italy,Male +South Africa,Female \ No newline at end of file diff --git a/web/oss/cypress/data/product_pains.csv b/web/oss/cypress/data/product_pains.csv new file mode 100644 index 0000000000..ead8640a7b --- /dev/null +++ b/web/oss/cypress/data/product_pains.csv @@ -0,0 +1,18 @@ +pain_name,customer_feedback +"Difficult Navigation","I found it hard to navigate through the application. Couldn't find the settings option." +"Slow Loading","The app takes too much time to load, even on a high-speed internet connection." +"Unintuitive UI","The user interface is not intuitive, it's hard to understand where everything is." +"Poor Customer Service","I had an issue and contacted customer service but didn't get a satisfactory resolution." +"Buggy features","There are several features in the app that don't work as they're supposed to." +"Lack of Features","The app doesn't have all the features I need. I had to use multiple apps to achieve my goal." +"High Pricing","The pricing for the premium features is too high compared to the value provided." +"Confusing Settings","The settings are too complicated. I don't understand how to adjust the app to my needs." +"Frequent Crashes","The app crashes frequently. I can't get through a single use without it crashing." +"Hard to Sync","It's difficult to sync the app across multiple devices. My progress isn't saved." +"Ads Intrusion","There are too many pop-up ads that interrupt my workflow. It's really annoying." +"Outdated Design","The app's design feels outdated. It needs a modern look and feel." +"Unclear Instructions","The instructions for using the app are unclear. I'm not sure what I'm supposed to do." +"No Offline Mode","The app doesn't work when I'm offline. This is a major limitation for me." +"Poor Search Functionality","The search function doesn't work well. It doesn't find what I'm looking for." +"Security Concerns","I'm concerned about the security of my data when using this app. The app doesn't have strong security features." +"Lack of Updates","The app is not updated frequently. It's lacking the latest features that competitors offer." \ No newline at end of file diff --git a/web/oss/cypress/data/products-list.csv b/web/oss/cypress/data/products-list.csv new file mode 100644 index 0000000000..fffade7b81 --- /dev/null +++ b/web/oss/cypress/data/products-list.csv @@ -0,0 +1,11 @@ +Name,Price,Company +AstroViz Interactive Smart Projector,$499,AstroViz Technologies +Quantum One Supercomputer,"$8,000,000",QuantumX Systems +VirtuGlass Augmented Reality Glasses,$899,VirtuTech Inc. +EchoNet Wi-Fi 7 Router,$199,Amazon +ChargeMaster 20K Solar Power Bank,$80,EcoTech +Neptune Pro Gaming Laptop,"$2,300",Neptune Computers +Omega Smartwatch 7,$399,Apple +Titan Pro Graphics Tablet,$899,Wacom +NoiseCanceller Pro Headphones,$299,Bose +Tranquil Night Sleep Aid Device,$150,HealthTech Solutions \ No newline at end of file diff --git a/web/oss/cypress/data/recipes_and_ingredients.csv b/web/oss/cypress/data/recipes_and_ingredients.csv new file mode 100644 index 0000000000..ddfeff91c1 --- /dev/null +++ b/web/oss/cypress/data/recipes_and_ingredients.csv @@ -0,0 +1,18 @@ +recipe_name,correct_answer +Chicken Parmesan,Chicken +"Beef, Stew",Beef +Fried Rice,Rice +Tomato Soup,Tomato +Pancakes,Flour +Spaghetti Bolognese,Pasta +Caesar Salad,Romaine Lettuce +Apple Pie,Apples +Tacos,Tortillas +Cheesecake,Cream Cheese +Eggplant Parmesan,Eggplant +Chocolate Chip Cookies,Flour +Lobster Bisque,Lobster +Ratatouille,Eggplant +Margherita Pizza,Dough +Scrambled Eggs,Eggs +Chicken Alfredo,Chicken \ No newline at end of file diff --git a/web/oss/cypress/data/startup-list.csv b/web/oss/cypress/data/startup-list.csv new file mode 100644 index 0000000000..a9fe5ddd9c --- /dev/null +++ b/web/oss/cypress/data/startup-list.csv @@ -0,0 +1,11 @@ +startup_name,startup_idea,startup_founder +FoodieFinder,"An app for discovering local, unique dining experiences.",Zoe Kellerman +CodeCove,Online peer-to-peer coding mentorship platform.,Oliver Chen +EcoMovers,A sustainable logistics company using electric vehicles.,Hannah Rodriguez +PetNet,A social network for pet owners to share tips and arrange meetups.,Arjun Gupta +HealthTrack,AI-powered health and fitness app that provides personalized workout and nutrition plans.,Amina Yusuf +StudyBuddy,AI-based platform that offers personalized learning paths for students.,Elliott Baker +GreenGrow,"Subscription service for urban gardeners providing seeds, soil, and tips.",Lena Schwartz +SpaceSaver,A marketplace to rent unused storage spaces in private homes.,Hiroshi Tanaka +ChefAR,An augmented reality cooking app that offers real-time culinary assistance.,Carmen Martinez +SkillBridge,Online platform connecting freelancers with local businesses.,Dev Patel \ No newline at end of file diff --git a/web/oss/cypress/data/translations.csv b/web/oss/cypress/data/translations.csv new file mode 100644 index 0000000000..880108555a --- /dev/null +++ b/web/oss/cypress/data/translations.csv @@ -0,0 +1,21 @@ +"text","language","correct_answer" +"The sun glistens upon the ocean waves, reflecting a myriad of colors onto the sandy shores.","Spanish","El sol brilla sobre las olas del océano, reflejando una miríada de colores en las orillas arenosas." +"Reading books not only enriches the mind but also transports us to different worlds and times.","French","Lire des livres n'enrichit pas seulement l'esprit, mais nous transporte également vers d'autres mondes et époques." +"The city's skyline is a testament to its rapid development and architectural prowess.","Chinese","这座城市的天际线证明了它的快速发展和建筑造诣。" +"A balanced diet and regular exercise are essential for maintaining good health.","Italian","Una dieta equilibrata e l'esercizio regolare sono essenziali per mantenere una buona salute." +"The mountain's peak, shrouded in mist, remains a challenge for many climbers.","Japanese","霧に包まれた山の頂上は、多くの登山者にとって挑戦的なままです。" +"Music transcends boundaries, connecting people from all walks of life.","Portuguese","A música transcende fronteiras, conectando pessoas de todas as caminhadas da vida." +"The vast expanse of the desert is both awe-inspiring and intimidating.","Arabic","إن الفضاء الواسع للصحراء ملهم ومخيف في نفس الوقت." +"The intricate patterns on traditional pottery reveal the artist's meticulous attention to detail.","Russian","Сложные узоры на традиционной глиняной посуде отражают дотошное внимание художника к деталям." +"Rainforests play a crucial role in maintaining our planet's biodiversity and climate balance.","German","Regenwälder spielen eine entscheidende Rolle bei der Erhaltung der biologischen Vielfalt und des Klimagleichgewichts unseres Planeten." +"Cultural exchanges promote understanding and strengthen bonds between nations.","Korean","문화 교류는 이해를 증진시키고 국가 간의 유대를 강화시킵니다." +"Stargazing is a humble reminder of our tiny presence in the vast universe.","Spanish","Mirar las estrellas es un humilde recordatorio de nuestra pequeña presencia en el vasto universo." +"The renaissance period was a time of artistic, cultural, and scientific awakening.","French","La période de la Renaissance a été un moment d'éveil artistique, culturel et scientifique." +"Understanding different cultures enriches our perspectives and broadens our horizons.","Chinese","了解不同的文化可以丰富我们的视野并拓宽我们的视野。" +"Jazz music, with its improvisational nature, captures the essence of spontaneity.","Italian","La musica jazz, con la sua natura improvvisativa, cattura l'essenza della spontaneità." +"Philosophy encourages us to ponder life's big questions and seek profound answers.","Japanese","哲学は私たちに人生の大きな疑問について考え、深い答えを探求するよう促します。" +"Technology has bridged distances, turning the world into a global village.","Portuguese","A tecnologia encurtou distâncias, transformando o mundo em uma aldeia global." +"The fragrance of freshly baked bread evokes feelings of warmth and nostalgia.","Arabic","رائحة الخبز المُحمص حديثًا تُثير الشعور بالدفء والحنين." +"Folk tales carry the wisdom and traditions of a culture through generations.","Russian","Народные сказки передают мудрость и традиции культуры через поколения." +"Traveling enriches the soul, exposing us to different cultures and experiences.","German","Reisen bereichert die Seele, indem sie uns verschiedenen Kulturen und Erfahrungen aussetzt." +"Nature's beauty is a source of inspiration for many artists and poets.","Korean","자연의 아름다움은 많은 예술가와 시인에게 영감을 줍니다." \ No newline at end of file diff --git a/web/oss/cypress/e2e/1-smoke-tests.cy.ts b/web/oss/cypress/e2e/1-smoke-tests.cy.ts new file mode 100644 index 0000000000..ae03877fe8 --- /dev/null +++ b/web/oss/cypress/e2e/1-smoke-tests.cy.ts @@ -0,0 +1,18 @@ +describe("Basic smoke tests to see if app has loaded correctly", () => { + beforeEach(() => { + cy.visit("/apps") + }) + + it("should navigate successfully to the app page", () => { + cy.location("pathname").should("include", "/apps") + cy.contains("Apps").should("be.visible") + }) + + it("should navigate successfully to Settings", () => { + cy.clickLinkAndWait('[data-cy="settings-link"]') + cy.location("pathname").should("include", "/settings") + cy.get('[data-cy="secrets"]').within(() => { + cy.contains("Model Hub") + }) + }) +}) diff --git a/web/oss/cypress/e2e/ab-testing-evaluation.cy.ts b/web/oss/cypress/e2e/ab-testing-evaluation.cy.ts new file mode 100644 index 0000000000..e9172ee5d8 --- /dev/null +++ b/web/oss/cypress/e2e/ab-testing-evaluation.cy.ts @@ -0,0 +1,99 @@ +import {randString} from "../../src/lib/helpers/utils" + +describe("A/B Testing Evaluation workflow", () => { + let app_v2 = randString(5) + let app_id + let testset_name + before(() => { + cy.createVariantsAndTestsets() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + cy.get("@testsetName").then((testsetName) => { + testset_name = testsetName + }) + }) + + context("When creating an app variant", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/playground`) + }) + + it("Should successfully create a new app variant", () => { + cy.clickLinkAndWait("button.ant-tabs-nav-add") + cy.get('[data-cy="new-variant-modal"]').should("exist") + cy.get('[data-cy="new-variant-modal-select"]').click() + cy.get('[data-cy^="new-variant-modal-label"]').contains("app.default").click() + cy.get('[data-cy="new-variant-modal-input"]').type(app_v2) + cy.get('[data-cy="new-variant-modal"]').within(() => { + cy.get("button.ant-btn").contains(/ok/i).click() + }) + cy.url().should("include", `/playground?variant=app.${app_v2}`) + cy.get('[data-cy="playground-save-changes-button"]').eq(1).click() + cy.get('[data-cy="playground-publish-button"]').should("exist") + cy.get(".ant-message-notice-content").should("exist") + }) + + it("Should verify user has more than one app variant", () => { + cy.get(".ant-tabs-nav-list").within(() => { + cy.get(".ant-tabs-tab").should("have.length.gt", 1) + }) + }) + }) + + context("When executing the evaluation", () => { + it("Should successfully execute the evaluation process", () => { + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=human_ab_testing`) + cy.url().should("include", "/evaluations?selectedEvaluation=human_ab_testing") + cy.clickLinkAndWait('[data-cy="new-human-eval-modal-button"]') + + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseover") + cy.get(".ant-dropdown") + .eq(0) + .within(() => { + cy.get('[data-cy="variant-0"]').contains("app.default").click() + }) + cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseout") + + cy.get('[data-cy="variants-dropdown-1"]').trigger("mouseover") + cy.get(".ant-dropdown") + .eq(1) + .within(() => { + cy.get('[data-cy="variant-1"]').contains(`app.${app_v2}`).click() + }) + cy.get('[data-cy="variants-dropdown-1"]').trigger("mouseout") + + cy.get('[data-cy="selected-testset"]').trigger("mouseover") + cy.get('[data-cy^="testset"]').contains(testset_name).click() + cy.get('[data-cy="selected-testset"]').trigger("mouseout") + + cy.clickLinkAndWait('[data-cy="start-new-evaluation-button"]') + cy.url().should("include", "/human_a_b_testing") + cy.get('[data-cy="evalInstructionsShown-ok-btn"]').click() + + cy.get('[data-cy="evaluation-vote-panel-comparison-vote-button"]').should("not.exist") + cy.get( + '[data-cy="evaluation-vote-panel-comparison-both-bad-vote-button-button"]', + ).should("not.exist") + + cy.intercept("POST", "**/app/test", { + statusCode: 200, + fixture: "single-prompt-openai/human-evaluation.json", + }).as("generateRequest") + + cy.wait(1000) + cy.get('[data-cy="abTesting-run-all-button"]').click() + + cy.get('[data-cy="evaluation-vote-panel-comparison-vote-button"]').eq(0).click() + cy.get('[data-cy="evaluation-vote-panel-comparison-vote-button"]').eq(1).click() + cy.get( + '[data-cy="evaluation-vote-panel-comparison-both-good-vote-button-button"]', + ).click() + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/app-navigation.cy.ts b/web/oss/cypress/e2e/app-navigation.cy.ts new file mode 100644 index 0000000000..0375ed3988 --- /dev/null +++ b/web/oss/cypress/e2e/app-navigation.cy.ts @@ -0,0 +1,68 @@ +import {isDemo} from "../support/commands/utils" + +describe("App Navigation without errors", () => { + let app_id + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + + beforeEach(() => { + cy.visit(`/apps/${app_id}/playground`) + cy.contains(/modify parameters/i) + }) + + it("should navigate successfully to Playground", () => { + cy.location("pathname").should("include", "/playground") + cy.get('[data-cy="playground-header"]').within(() => { + cy.get("h2").should("contain.text", "1. Modify Parameters") + cy.get("button").should("have.length", 4) + }) + }) + + it("should navigate successfully to Testsets", () => { + cy.clickLinkAndWait('[data-cy="app-testsets-link"]') + cy.location("pathname").should("include", "/testsets") + cy.get('[data-cy="app-testset-list"]').should("exist") + }) + + it("should navigate successfully to Evaluations page", () => { + cy.clickLinkAndWait('[data-cy="app-evaluations-link"]') + cy.url().should("include", "/evaluations") + cy.contains(/evaluations/i) + + cy.get(".ant-tabs-tab").eq(1).click() + cy.url().should("include", "/evaluations?selectedEvaluation=human_annotation") + + cy.get(".ant-tabs-tab").eq(2).click() + cy.url().should("include", "/evaluations?selectedEvaluation=human_ab_testing") + + cy.get(".ant-tabs-tab").eq(0).click() + cy.url().should("include", "/evaluations?selectedEvaluation=auto_evaluation") + }) + + if (isDemo()) { + it("should navigate successfully to Endpoints", () => { + cy.clickLinkAndWait('[data-cy="app-deployment-link"]') + cy.clickLinkAndWait('[data-cy="app-endpoints-link"]') + cy.location("pathname").should("include", "/endpoints") + cy.get('[data-cy="endpoints"]').within(() => { + cy.contains("API endpoint") + }) + }) + } + + it("should navigate successfully to Settings", () => { + cy.clickLinkAndWait('[data-cy="settings-link"]') + cy.location("pathname").should("include", "/settings") + cy.get('[data-cy="secrets"]').within(() => { + cy.contains("Model Hub") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/eval.comparison.cy.ts b/web/oss/cypress/e2e/eval.comparison.cy.ts new file mode 100644 index 0000000000..6fcf92e7da --- /dev/null +++ b/web/oss/cypress/e2e/eval.comparison.cy.ts @@ -0,0 +1,75 @@ +import {randString} from "../../src/lib/helpers/utils" + +describe("Evaluation Comparison Test", function () { + let app_id + let app_v2 = randString(5) + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + + context("When creating an app variant", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/playground`) + }) + + it("Should successfully create a new app variant", () => { + cy.clickLinkAndWait("button.ant-tabs-nav-add") + cy.get('[data-cy="new-variant-modal"]').should("exist") + cy.get('[data-cy="new-variant-modal-select"]').click() + cy.get('[data-cy^="new-variant-modal-label"]').contains("app.default").click() + cy.get('[data-cy="new-variant-modal-input"]').type(app_v2) + cy.get('[data-cy="new-variant-modal"]').within(() => { + cy.get("button.ant-btn").contains(/ok/i).click() + }) + cy.url().should("include", `/playground?variant=app.${app_v2}`) + cy.get('[data-cy="playground-save-changes-button"]').eq(1).click() + cy.get('[data-cy="playground-publish-button"]').should("exist") + cy.get(".ant-message-notice-content").should("exist") + }) + + it("Should verify user has more than one app variant", () => { + cy.get(".ant-tabs-nav-list").within(() => { + cy.get(".ant-tabs-tab").should("have.length.gt", 1) + }) + }) + }) + + context("Executing Evaluation Comparison Workflow", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/evaluations`) + cy.location("pathname").should("include", "/evaluations") + }) + + it("Should create 2 new Evaluations", () => { + cy.createNewEvaluation() + }) + + it("Should verify that there are completed evaluations in the list", () => { + cy.get(".ant-table-row").eq(0).should("exist") + cy.get(".ant-table-row").eq(1).should("exist") + cy.get('[data-cy="evaluation-status-cell"]', {timeout: 60000}) + .eq(0) + .should("contain.text", "Completed") + cy.get('[data-cy="evaluation-status-cell"]', {timeout: 60000}) + .eq(1) + .should("contain.text", "Completed") + }) + + it("Should select 2 evaluations, click on the compare button, and successfully navigate to the comparison page", () => { + cy.get(".ant-checkbox-input").eq(0).check() + + cy.get('[data-cy="evaluation-results-compare-button"]').should("not.be.disabled") + cy.get('[data-cy="evaluation-results-compare-button"]').click() + cy.location("pathname").should("include", "/evaluations/results/compare") + cy.contains(/Evaluations Comparison/i) + cy.get('[data-cy="evaluation-compare-table"]').should("exist") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/eval.evaluations.cy.ts b/web/oss/cypress/e2e/eval.evaluations.cy.ts new file mode 100644 index 0000000000..fee60cf455 --- /dev/null +++ b/web/oss/cypress/e2e/eval.evaluations.cy.ts @@ -0,0 +1,95 @@ +import {randString} from "../../src/lib/helpers/utils" + +describe("Evaluations CRUD Operations Test", function () { + let newEvalName = randString(5) + let app_id + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + + context("Executing Evaluations CRUD operations", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/evaluations`) + cy.location("pathname").should("include", "/evaluations") + }) + + it("Should successfully create an Evaluation", () => { + cy.createNewEvaluation() + }) + + it("Should throw warning when creating an evaluation without selecting testset, variants, and evaluators", () => { + cy.get('[data-cy="new-evaluation-button"]').click() + cy.get(".ant-modal-content").should("exist") + + cy.get(".ant-modal-footer > .ant-btn-primary").click() + cy.get(".ant-message").should("contain.text", "Please select a test set") + }) + + it("Should verify the successful creation and completion of the evaluation", () => { + cy.get(".ant-table-row").eq(0).should("exist") + cy.get('[data-cy="evaluation-status-cell"]').should("contain.text", "Completed") + }) + + it("Should select evaluation and successfully delete it", () => { + cy.get(".ant-checkbox-wrapper").should("exist") + cy.get(".ant-checkbox-input").eq(0).check() + cy.get('[data-cy="delete-evaluation-button"]').click() + + cy.get(".ant-modal-content").should("exist") + cy.get(".ant-modal-footer > .ant-btn-primary").click() + }) + }) + + context("Executing Evaluation with different answer column", () => { + it("Should successfully rename the testset columns", () => { + cy.visit(`/testsets`) + cy.location("pathname").should("include", "/testsets") + cy.get(".ant-table-row").eq(0).click() + cy.wait(1000) + cy.contains(/create a new test set/i).should("be.visible") + cy.get(".ag-root").should("exist") + cy.wait(3000) + cy.get('[data-cy="testset-header-column-edit-button"]').eq(1).click() + cy.get('[data-cy="testset-header-column-edit-input"]').clear() + cy.get('[data-cy="testset-header-column-edit-input"]').type("answer") + cy.get('[data-cy="testset-header-column-save-button"]').click() + cy.get('[data-cy="testset-save-button"]').click() + }) + + it("Should successfully create an Evaluator", () => { + cy.visit(`/apps/${app_id}/evaluations?configureEvaluatorModal=open`) + cy.url().should("include", "/evaluations?configureEvaluatorModal=open") + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="create-new-evaluator-button"]').click() + cy.get('[data-cy="new-evaluator-list"]').eq(2).click() + cy.contains(/configure new evaluator/i) + cy.get('[data-cy="configure-new-evaluator-modal-input"]').type(newEvalName) + + cy.get('[data-cy="new-evaluator-advance-settings"]').click() + cy.get('[data-cy="new-evaluator-advance-settings-input"]').clear() + cy.get('[data-cy="new-evaluator-advance-settings-input"]').type("answer") + cy.get('[data-cy="configure-new-evaluator-modal-save-btn"]').click() + cy.get('[data-cy="evaluator-list"]').should("have.length.gt", 2) + }) + + it("Should successfully create an Evaluation", () => { + cy.visit(`/apps/${app_id}/evaluations`) + cy.location("pathname").should("include", "/evaluations") + cy.createNewEvaluation(newEvalName) + }) + + it("Should verify the successful creation and completion of the evaluation", () => { + cy.visit(`/apps/${app_id}/evaluations`) + cy.location("pathname").should("include", "/evaluations") + cy.get(".ant-table-row").eq(0).should("exist") + cy.get('[data-cy="evaluation-status-cell"]').should("contain.text", "Completed") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/eval.evaluators.cy.ts b/web/oss/cypress/e2e/eval.evaluators.cy.ts new file mode 100644 index 0000000000..426ea6f112 --- /dev/null +++ b/web/oss/cypress/e2e/eval.evaluators.cy.ts @@ -0,0 +1,54 @@ +import {randString} from "../../src/lib/helpers/utils" + +describe("Evaluators CRUD Operations Test", function () { + let newEvalName = randString(5) + let editedEvalName = randString(5) + let app_id + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + + context("Executing Evaluators CRUD operations", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/evaluations?configureEvaluatorModal=open`) + cy.url().should("include", "/evaluations?configureEvaluatorModal=open") + }) + + it("Should successfully create an evaluator", () => { + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="create-new-evaluator-button"]').click() + cy.get('[data-cy="new-evaluator-list"]').eq(0).click() + cy.contains(/configure new evaluator/i) + cy.get('[data-cy="configure-new-evaluator-modal-input"]').type(newEvalName) + cy.get('[data-cy="configure-new-evaluator-modal-save-btn"]').click() + cy.get('[data-cy="evaluator-list"]').should("have.length.gt", 2) + }) + + it("Should successfully edit an evaluator", () => { + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="evaluator-menu-button"]').eq(0).click() + cy.get(".ant-dropdown-menu").should("be.visible") + cy.get(".ant-dropdown-menu-item").eq(0).click() + cy.get('[data-cy="configure-new-evaluator-modal-input"]').clear() + cy.get('[data-cy="configure-new-evaluator-modal-input"]').type(editedEvalName) + cy.get('[data-cy="configure-new-evaluator-modal-save-btn"]').click() + }) + + it("Should successfully delete an evaluator", () => { + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="evaluator-menu-button"]').eq(0).click() + cy.get(".ant-dropdown-menu").should("be.visible") + cy.get(".ant-dropdown-menu-item") + .contains(/delete/i) + .click() + cy.get(".ant-modal-footer > .ant-btn-primary").click() + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/eval.scenarios.cy.ts b/web/oss/cypress/e2e/eval.scenarios.cy.ts new file mode 100644 index 0000000000..9478c51f3f --- /dev/null +++ b/web/oss/cypress/e2e/eval.scenarios.cy.ts @@ -0,0 +1,37 @@ +describe("Evaluation Scenarios Test", function () { + let app_id + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + + context("Executing Evaluation Scenarios Workflow", () => { + beforeEach(() => { + cy.visit(`/apps/${app_id}/evaluations`) + cy.location("pathname").should("include", "/evaluations") + }) + + it("Should successfully create an Evaluation", () => { + cy.createNewEvaluation() + }) + + it("Should verify that evalaution was created and completed successfully", () => { + cy.get(".ant-table-row").eq(0).should("exist") + cy.get('[data-cy="evaluation-status-cell"]').should("contain.text", "Completed") + }) + + it("Should double click on the Evaluation and successfully navigate to the evalaution results page", () => { + cy.get(".ant-table-row").eq(0).should("exist") + cy.get(".ant-table-row").click({force: true}) + cy.wait(1000) + cy.contains(/Evaluation Results/i) + cy.get('[data-cy="evalaution-scenarios-table"]').should("exist") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/playground.cy.ts b/web/oss/cypress/e2e/playground.cy.ts new file mode 100644 index 0000000000..1c44993205 --- /dev/null +++ b/web/oss/cypress/e2e/playground.cy.ts @@ -0,0 +1,29 @@ +describe("Playground Prompt Test", function () { + let app_id + before(() => { + cy.createVariant() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + }) + it("Should test prompt functionality in the Playground", () => { + cy.visit(`/apps/${app_id}/playground`) + cy.url().should("include", "/playground") + cy.contains(/modify parameters/i) + cy.get('[data-cy^="testview-input-parameters"]').eq(0).type("Germany") + cy.get('[data-cy="testview-input-parameters-run-button"]').click() + cy.intercept("POST", "**/demo/app/test", { + statusCode: 200, + fixture: "single-prompt-openai/playground.json", + }) + cy.get('[data-cy="testview-input-parameters-result"]').should( + "contain.text", + "The capital of Germany is Berlin.", + ) + cy.get(".ant-message-notice-content").should("not.exist") + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/single-model-test-evaluation.cy.ts b/web/oss/cypress/e2e/single-model-test-evaluation.cy.ts new file mode 100644 index 0000000000..2aa183d90f --- /dev/null +++ b/web/oss/cypress/e2e/single-model-test-evaluation.cy.ts @@ -0,0 +1,75 @@ +import {randString} from "../../src/lib/helpers/utils" + +describe("Single Model Test workflow", () => { + let app_id + let testset_name + const saved_testset_name = randString(8) + before(() => { + cy.createVariantsAndTestsets() + cy.get("@app_id").then((appId) => { + app_id = appId + }) + cy.get("@testsetName").then((testsetName) => { + testset_name = testsetName + }) + }) + + context("When executing the evaluation", () => { + it("Should successfully execute the evaluation process", () => { + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=human_annotation`) + cy.url().should("include", "/evaluations?selectedEvaluation=human_annotation") + cy.clickLinkAndWait('[data-cy="new-human-eval-modal-button"]') + + cy.get(".ant-modal-content").should("exist") + + cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseover") + cy.get('[data-cy="variant-0"]').click() + cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseout") + + cy.get('[data-cy="selected-testset"]').trigger("mouseover") + cy.get('[data-cy^="testset"]').contains(testset_name).click() + cy.get('[data-cy="selected-testset"]').trigger("mouseout") + + cy.clickLinkAndWait('[data-cy="start-new-evaluation-button"]') + cy.url().should("include", "/single_model_test") + cy.get('[data-cy="evalInstructionsShown-ok-btn"]').click() + + cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').should("not.exist") + + cy.intercept("POST", "**/app/test", { + statusCode: 200, + fixture: "single-prompt-openai/human-evaluation.json", + }).as("generateRequest") + + cy.wait(1000) + cy.get('[data-cy="single-model-run-all-button"]').click() + cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').type("100") + }) + + it("Should modify the evaluation vote scores", () => { + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=human_annotation`) + cy.url().should("include", "/evaluations?selectedEvaluation=human_annotation") + cy.wait(1000) + cy.clickLinkAndWait(".ant-table-row").eq(0) + cy.get('[data-cy="evalInstructionsShown-ok-btn"]').click() + cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').clear() + cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').type("85") + cy.get('[data-cy="single-model-save-testset-button"]').click() + cy.get(".ant-modal-content").contains("Add new test set").should("be.visible") + cy.get('[data-cy="single-model-save-testset-modal-input"]').type(saved_testset_name) + cy.get(".ant-modal-footer > .ant-btn-primary").contains("Submit").click() + cy.wait(1000) + }) + + it("Should check the evaluation testset is successfully saved", () => { + cy.visit(`/testsets`) + cy.url().should("include", "/testsets") + cy.get('[data-cy="app-testset-list"]').as("table") + cy.get("@table").contains(saved_testset_name).as("tempTestSet").should("be.visible") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/e2e/testset.cy.ts b/web/oss/cypress/e2e/testset.cy.ts new file mode 100644 index 0000000000..c1a9a2e147 --- /dev/null +++ b/web/oss/cypress/e2e/testset.cy.ts @@ -0,0 +1,86 @@ +import {randString} from "../../src/lib/helpers/utils" + +const countries = [ + {country: "France", capital: "Paris"}, + {country: "Germany", capital: "Berlin"}, + {country: "Sweden", capital: "Stockholm"}, +] + +describe("Testsets crud and UI functionality", () => { + before(() => { + cy.createVariant() + }) + + context("Testing creation process of testset", () => { + beforeEach(() => { + // navigate to the new testset page + cy.visit(`/testsets`) + }) + + it("Should successfully creates the testset and navigates to the list", () => { + cy.url().should("include", "/testsets") + cy.get('[data-cy="create-testset-modal-button"]').click() + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="create-testset-from-scratch"]').click() + + const testsetName = randString(8) + cy.get('[data-cy="testset-name-input"]').type(testsetName) + cy.clickLinkAndWait('[data-cy="create-new-testset-button"]') + + cy.get(".ag-row").should("have.length", 1) + countries.forEach((country, index) => { + if (index !== 0) { + cy.get('[data-cy="add-new-testset-row"]').click() + } + + cy.get(`.ag-center-cols-container .ag-row[row-index="${index}"]`).within(() => { + cy.get(".ag-cell").eq(1).type(country.country) + cy.get(".ag-cell") + .eq(2) + .type(`The capital of ${country.country} is ${country.capital}.`) + }) + }) + cy.intercept("/api/testsets/*").as("saveTestsetRequest") + cy.get('[data-cy="testset-save-button"]').click() + //wait for the save api to complete + cy.wait("@saveTestsetRequest") + cy.clickLinkAndWait('[data-cy="app-testsets-link"]') + cy.url().should("include", "/testsets") + + // validate that the new testset is in the list + cy.get('[data-cy="app-testset-list"]').as("table") + cy.get("@table").contains(testsetName).as("tempTestSet").should("be.visible") + }) + }) + + context("When uploading testset", () => { + const testset_name = randString(8) + beforeEach(() => { + cy.visit(`/testsets`) + }) + + it("Should successfully upload a testset", () => { + cy.url().should("include", "/testsets") + + cy.get('[data-cy="create-testset-modal-button"]').click() + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="upload-testset"]').click() + + cy.get('[data-cy="upload-testset-file-name"]').type(testset_name) + cy.get('[type="file"]').selectFile("cypress/data/countries-genders.csv", {force: true}) + cy.wait(1000) + cy.contains("countries-genders.csv").should("be.visible") + cy.clickLinkAndWait('[data-cy="testset-upload-button"]') + }) + + it("Should check the uploaded testset is present", () => { + cy.url().should("include", "/testsets") + cy.get('[data-cy="app-testset-list"]').as("table") + cy.get("@table").contains(testset_name).as("tempTestSet").should("be.visible") + }) + }) + + after(() => { + cy.cleanupVariantAndTestset() + }) +}) diff --git a/web/oss/cypress/fixtures/single-prompt-openai/human-evaluation.json b/web/oss/cypress/fixtures/single-prompt-openai/human-evaluation.json new file mode 100644 index 0000000000..5d4425f4bb --- /dev/null +++ b/web/oss/cypress/fixtures/single-prompt-openai/human-evaluation.json @@ -0,0 +1,10 @@ +{ + "cost": 0.0000535, + "latency": 2.6284, + "message": "The capital of France is Paris.", + "usage": { + "completion_tokens": 8, + "prompt_tokens": 25, + "total_tokens": 33 + } +} diff --git a/web/oss/cypress/fixtures/single-prompt-openai/playground.json b/web/oss/cypress/fixtures/single-prompt-openai/playground.json new file mode 100644 index 0000000000..4b8133a6b6 --- /dev/null +++ b/web/oss/cypress/fixtures/single-prompt-openai/playground.json @@ -0,0 +1,10 @@ +{ + "cost": 0.0000535, + "latency": 2.6284, + "message": "The capital of Germany is Berlin.", + "usage": { + "completion_tokens": 8, + "prompt_tokens": 25, + "total_tokens": 33 + } +} diff --git a/web/oss/cypress/support/commands/evaluations.ts b/web/oss/cypress/support/commands/evaluations.ts new file mode 100644 index 0000000000..1747649de4 --- /dev/null +++ b/web/oss/cypress/support/commands/evaluations.ts @@ -0,0 +1,118 @@ +import {randString} from "../../../src/lib/helpers/utils" +import {removeLlmProviderKey} from "../../../src/lib/helpers/llmProviders" + +let app_id + +const countries = [ + {country: "France", capital: "Paris"}, + {country: "Germany", capital: "Berlin"}, + {country: "Sweden", capital: "Stockholm"}, +] + +const apiKey = Cypress.env("NEXT_PUBLIC_OPENAI_API_KEY") + +Cypress.Commands.add("createVariant", () => { + cy.addingOpenaiKey() + cy.visit("/apps") + + cy.get('[data-cy="create-from-template"]').click() + + const appName = randString(5) + cy.task("log", `App name: ${appName}`) + + cy.get('[data-cy^="enter-app-name-input"]').type(appName) + + cy.get('[data-cy="app-template-card"]').contains("Completion Prompt").click() + + cy.get('[data-cy="create-app-from-template-button"]').click() + + cy.url().should("include", "/playground") + cy.url().then((url) => { + app_id = url.match(/\/apps\/([a-fA-F0-9-]+)\/playground/)[1] + + cy.wrap(app_id).as("app_id") + }) + cy.removeLlmProviderKey() +}) + +Cypress.Commands.add("createVariantsAndTestsets", () => { + cy.createVariant() + + cy.visit("/testsets") + cy.url().should("include", "/testsets") + cy.get('[data-cy="create-testset-modal-button"]').click() + cy.get(".ant-modal-content").should("exist") + cy.get('[data-cy="create-testset-from-scratch"]').click() + + const testsetName = randString(5) + cy.get('[data-cy="testset-name-input"]').type(testsetName) + cy.clickLinkAndWait('[data-cy="create-new-testset-button"]') + cy.wrap(testsetName).as("testsetName") + + cy.get(".ag-row").should("have.length", 1) + cy.wait(2000) + cy.get('[data-cy="testset-header-column-edit-button"]').eq(0).should("exist").click() + cy.get('[data-cy="testset-header-column-edit-input"]').clear() + cy.get('[data-cy="testset-header-column-edit-input"]').type("country") + cy.get('[data-cy="testset-header-column-save-button"]').click() + + countries.forEach((country, index) => { + if (index !== 0) { + cy.get('[data-cy="add-new-testset-row"]').click() + } + + cy.get(`.ag-center-cols-container .ag-row[row-index="${index}"]`).within(() => { + cy.get(".ag-cell").eq(1).type(country.country) + cy.get(".ag-cell") + .eq(2) + .type(`The capital of ${country.country} is ${country.capital}.`) + }) + }) + + cy.get('[data-cy="testset-save-button"]').click() +}) + +Cypress.Commands.add("cleanupVariantAndTestset", () => { + cy.request({ + url: `${Cypress.env().baseApiURL}/apps/${app_id}/`, + method: "DELETE", + body: { + app_id, + }, + }) + + cy.removeLlmProviderKey() +}) + +Cypress.Commands.add("addingOpenaiKey", () => { + cy.visit("/settings") + cy.get('[data-cy="openai-api-input"]').eq(0).type(apiKey) + cy.get('[data-cy="openai-api-save"]').eq(0).click() +}) + +Cypress.Commands.add("removeLlmProviderKey", () => { + removeLlmProviderKey() +}) + +Cypress.Commands.add("createNewEvaluation", (evaluatorName = "Exact Match") => { + cy.request({ + url: `${Cypress.env().baseApiURL}/evaluations?app_id=${app_id}`, + method: "GET", + }).then((resp) => { + cy.get('[data-cy="new-evaluation-button"]').click() + }) + cy.get(".ant-modal-content").should("exist") + + cy.get('[data-cy="evaluation-testset-table"]').find('input[type="radio"]').eq(0).check() + + cy.get('[data-cy="evaluation-variant-table"]').find('input[type="checkbox"]').eq(0).check() + + cy.get('[data-cy="evaluation-evaluator-collapse-header"]').click() + cy.get('[data-cy="evaluation-search-evaluator"]') + .type(evaluatorName) + .should("have.value", evaluatorName) + cy.get('[data-cy="evaluation-evaluator-table"]').find('input[type="checkbox"]').eq(1).check() + + cy.get(".ant-modal-footer > .ant-btn-primary").click() + cy.wait(1000) +}) diff --git a/web/oss/cypress/support/commands/index.ts b/web/oss/cypress/support/commands/index.ts new file mode 100644 index 0000000000..d9a45d1a23 --- /dev/null +++ b/web/oss/cypress/support/commands/index.ts @@ -0,0 +1,19 @@ +/// <reference types="cypress" /> + +import "./utils" +import "./evaluations" + +declare global { + namespace Cypress { + interface Chainable { + clickLinkAndWait(selector: string): Chainable<void> + createVariantsAndTestsets(): Chainable<void> + cleanupVariantAndTestset(): Chainable<void> + createVariant(): Chainable<void> + saveOpenAiKey(): Chainable<void> + removeLlmProviderKey(): Chainable<void> + addingOpenaiKey(): Chainable<void> + createNewEvaluation(evaluatorName?: string): Chainable<void> + } + } +} diff --git a/web/oss/cypress/support/commands/utils.ts b/web/oss/cypress/support/commands/utils.ts new file mode 100644 index 0000000000..7fdcf47237 --- /dev/null +++ b/web/oss/cypress/support/commands/utils.ts @@ -0,0 +1,11 @@ +Cypress.Commands.add("clickLinkAndWait", (selector) => { + cy.get(selector).first().as("link") + cy.get("@link").click() +}) + +export const isDemo = () => { + if (Cypress.env["NEXT_PUBLIC_AGENTA_LICENSE"]) { + return ["cloud", "ee"].includes(Cypress.env["NEXT_PUBLIC_AGENTA_LICENSE"]) + } + return false +} diff --git a/web/oss/cypress/support/e2e.ts b/web/oss/cypress/support/e2e.ts new file mode 100644 index 0000000000..b6eca7540d --- /dev/null +++ b/web/oss/cypress/support/e2e.ts @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.ts is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import "./commands" + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/web/oss/cypress/tsconfig.json b/web/oss/cypress/tsconfig.json new file mode 100644 index 0000000000..dc618360a0 --- /dev/null +++ b/web/oss/cypress/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress", "node"] + }, + "include": ["**/*.ts"] +} diff --git a/web/oss/next.config.ts b/web/oss/next.config.ts index fd65177200..26b8412ecd 100644 --- a/web/oss/next.config.ts +++ b/web/oss/next.config.ts @@ -1,13 +1,7 @@ -import {createRequire} from "module" import path from "path" import type {NextConfig} from "next" -const require = createRequire(import.meta.url) -const reduxToolkitCjsEntry = path.join( - path.dirname(require.resolve("@reduxjs/toolkit/package.json")), - "dist/cjs/index.js", -) const isDevelopment = process.env.NODE_ENV === "development" const COMMON_CONFIG: NextConfig = { @@ -15,7 +9,6 @@ const COMMON_CONFIG: NextConfig = { reactStrictMode: true, pageExtensions: ["ts", "tsx", "js", "jsx"], productionBrowserSourceMaps: true, - outputFileTracingRoot: path.resolve(__dirname, ".."), images: { remotePatterns: [{hostname: "fps.cdnpk.net"}], }, @@ -27,29 +20,14 @@ const COMMON_CONFIG: NextConfig = { }, async redirects() { return [ - { - source: "/apps", - destination: "/w", - permanent: true, - }, - { - source: "/apps/:app_id", - destination: "/w", - permanent: true, - }, - { - source: "/apps/:app_id/:path*", - destination: "/w", - permanent: true, - }, { source: "/", - destination: "/w", + destination: "/apps", permanent: true, }, { - source: "/:workspace_id/apps/:app_id", - destination: "/:workspace_id/apps/:app_id/overview/", + source: "/apps/:app_id", + destination: "/apps/:app_id/overview/", permanent: true, }, ] @@ -68,12 +46,6 @@ const COMMON_CONFIG: NextConfig = { "@ant-design/icons-svg", ], webpack: (config, {webpack, isServer}) => { - config.resolve ??= {} - config.resolve.alias = { - ...(config.resolve.alias ?? {}), - "@reduxjs/toolkit": reduxToolkitCjsEntry, - } - const envs: Record<string, string | undefined> = {} config.cache = false @@ -100,8 +72,10 @@ const COMMON_CONFIG: NextConfig = { }, } : { - turbopack: { - root: path.resolve(__dirname, ".."), + experimental: { + turbo: { + root: path.resolve(__dirname, ".."), + }, }, }), } diff --git a/web/oss/package.json b/web/oss/package.json index b586042152..f0e6fa15e1 100644 --- a/web/oss/package.json +++ b/web/oss/package.json @@ -1,6 +1,6 @@ { "name": "@agenta/oss", - "version": "0.62.0", + "version": "0.48.0", "private": true, "engines": { "node": ">=18" @@ -13,6 +13,9 @@ "start": "next start", "lint": "next lint", "lint-fix": "next lint --fix", + "cypress:open": "cypress open", + "cypress:run": "cypress run", + "test": "cypress run", "format": "prettier --check .", "format-fix": "prettier --write .", "types:check": "tsc", @@ -33,78 +36,65 @@ "@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", - "@floating-ui/dom": "^1.7.2", - "@floating-ui/react": "^0.27.13", "@headlessui/react": "1.7.7", "@headlessui/tailwindcss": "^0.2.1", - "@lexical/code": "^0.35.0", - "@lexical/code-shiki": "^0.35.0", - "@lexical/hashtag": "^0.35.0", - "@lexical/history": "^0.35.0", - "@lexical/link": "^0.35.0", - "@lexical/list": "^0.35.0", - "@lexical/mark": "^0.35.0", - "@lexical/markdown": "^0.35.0", - "@lexical/overflow": "^0.35.0", - "@lexical/react": "^0.35.0", - "@lexical/rich-text": "^0.35.0", - "@lexical/selection": "^0.35.0", - "@lexical/table": "^0.35.0", - "@lexical/utils": "^0.35.0", + "@lexical/code": "^0.30.0", + "@lexical/hashtag": "^0.30.0", + "@lexical/history": "^0.30.0", + "@lexical/link": "^0.30.0", + "@lexical/list": "^0.30.0", + "@lexical/mark": "^0.30.0", + "@lexical/markdown": "^0.30.0", + "@lexical/overflow": "^0.30.0", + "@lexical/react": "^0.30.0", + "@lexical/rich-text": "^0.30.0", + "@lexical/selection": "^0.30.0", + "@lexical/table": "^0.30.0", + "@lexical/utils": "^0.30.0", "@monaco-editor/react": "^4.7.0-rc.0", - "@next/bundle-analyzer": "15.5.2", - "@phosphor-icons/react": "^2.1.10", + "@next/bundle-analyzer": "^15.2.3", + "@phosphor-icons/react": "^2.1.7", "@prettier/sync": "^0.5.2", "@scalar/openapi-parser": "^0.9.0", "@scalar/openapi-types": "^0.1.5", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", - "@tanstack/react-query": "^5.87.1", "@tremor/react": "^3.18.7", "@types/diff": "^5.0.9", "@types/js-beautify": "^1.14.0", "@types/js-yaml": "^4.0.9", - "@types/lodash": "^4.17.18", + "@types/lodash": "^4.14.201", "@types/papaparse": "^5.3.14", "@types/promise-retry": "^1.1.6", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", "@types/react-resizable": "^3.0.7", "@types/react-syntax-highlighter": "^15.5.7", - "@types/react-window": "^1.8.8", - "@types/uuid": "^10.0.0", + "@types/uuid": "^9.0.7", "ajv": "^8.17.1", - "antd": "^5.26.1", + "antd": "^5.24.1", "autoprefixer": "10.4.20", - "axios": "^1.12.2", - "blakejs": "^1.2.1", + "axios": "^1.7.7", "classnames": "^2.3.2", "clsx": "^2.1.1", "dayjs": "^1.11.10", "diff": "^5.2.0", - "dotenv": "^16.5.0", + "dotenv": "^16.3.1", "fast-deep-equal": "^3.1.3", "highlight.js": "^11.11.1", - "immer": "^10.1.3", - "jotai": "^2.13.1", - "jotai-devtools": "^0.12.0", - "jotai-eager": "^0.2.3", - "jotai-immer": "^0.4.1", - "jotai-tanstack-query": "^0.11.0", + "jotai": "^2.12.1", "js-beautify": "^1.14.8", "js-yaml": "^4.1.0", - "jsonrepair": "^3.13.0", - "lexical": "^0.35.0", + "lexical": "^0.30.0", "lodash": "^4.17.21", "lucide-react": "^0.475.0", - "next": "15.5.2", - "papaparse": "^5.5.3", - "postcss": "^8.5.6", + "next": "^15.2.3", + "papaparse": "^5.4.1", + "postcss": "^8.4.47", "postcss-antd-fixes": "^0.2.0", "posthog-js": "^1.223.3", "prismjs": "^1.30.0", "promise-retry": "^2.0.1", - "rc-virtual-list": "^3.19.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-error-boundary": "^4.0.11", @@ -112,30 +102,25 @@ "react-jss": "^10.10.0", "react-resizable": "^3.0.5", "react-syntax-highlighter": "^15.6.0", - "react-window": "^1.8.11", - "recharts": "^3.1.0", - "semver": "^7.7.2", - "shiki": "^3.12.2", - "stable-hash": "^0.0.6", + "semver": "^7.7.1", + "stable-hash": "^0.0.4", "supertokens-auth-react": "^0.47.0", "supertokens-node": "^21.0.0", "swc-loader": "^0.2.6", "swr": "^2.3.0", "swr-devtools": "^1.3.2", "tailwindcss": "^3.4.4", - "typescript": "5.8.3", + "typescript": "5.7.3", "use-animation-frame": "^0.2.1", "usehooks-ts": "^3.1.1", - "uuid": "^11.1.0", + "uuid": "^9.0.1", "uuidjs": "^5.1.0" }, "devDependencies": { - "@swc-jotai/debug-label": "^0.2.0", - "@swc-jotai/react-refresh": "^0.3.0", "@types/node": "^20.8.10", "@types/prismjs": "^1.26.5", - "@types/semver": "^7.7.0", - "node-mocks-http": "^1.17.2", + "@types/semver": "^7.5.8", + "node-mocks-http": "^1.12.2", "tailwind-scrollbar": "^3" } } diff --git a/web/oss/public/assets/Agenta-logo-full-dark-accent.png b/web/oss/public/assets/Agenta-logo-full-dark-accent.png deleted file mode 100644 index c14833dab1..0000000000 Binary files a/web/oss/public/assets/Agenta-logo-full-dark-accent.png and /dev/null differ diff --git a/web/oss/public/assets/Agenta-logo-full-light.png b/web/oss/public/assets/Agenta-logo-full-light.png deleted file mode 100644 index 4c9b31a813..0000000000 Binary files a/web/oss/public/assets/Agenta-logo-full-light.png and /dev/null differ diff --git a/web/oss/public/assets/dark-complete-transparent-CROPPED.png b/web/oss/public/assets/dark-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..7d134ac59a Binary files /dev/null and b/web/oss/public/assets/dark-complete-transparent-CROPPED.png differ diff --git a/web/oss/public/assets/dark-complete-transparent_white_logo.png b/web/oss/public/assets/dark-complete-transparent_white_logo.png new file mode 100644 index 0000000000..8685bbf981 Binary files /dev/null and b/web/oss/public/assets/dark-complete-transparent_white_logo.png differ diff --git a/web/oss/public/assets/dark-logo.svg b/web/oss/public/assets/dark-logo.svg new file mode 100644 index 0000000000..6cb8ef3330 --- /dev/null +++ b/web/oss/public/assets/dark-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="9eaf1304b2"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#9eaf1304b2)"><path fill="#00ff19" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/web/oss/public/assets/favicon.ico b/web/oss/public/assets/favicon.ico index dad02fe072..4dc8619b1d 100644 Binary files a/web/oss/public/assets/favicon.ico and b/web/oss/public/assets/favicon.ico differ diff --git a/web/oss/public/assets/light-complete-transparent-CROPPED.png b/web/oss/public/assets/light-complete-transparent-CROPPED.png new file mode 100644 index 0000000000..6be2e99e08 Binary files /dev/null and b/web/oss/public/assets/light-complete-transparent-CROPPED.png differ diff --git a/web/oss/public/assets/light-logo.svg b/web/oss/public/assets/light-logo.svg new file mode 100644 index 0000000000..9c795f8e88 --- /dev/null +++ b/web/oss/public/assets/light-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="74817b5f98"><path d="M 54.609375 48.53125 L 320.105469 48.53125 L 320.105469 326.667969 L 54.609375 326.667969 Z M 54.609375 48.53125 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#74817b5f98)"><path fill="#000000" d="M 287.316406 322.320312 L 287.316406 117.414062 L 316.925781 100.289062 L 316.925781 305.195312 Z M 57.789062 157.179688 L 252.144531 269.578125 C 252.390625 269.71875 252.664062 269.789062 252.9375 269.789062 C 253.214844 269.789062 253.488281 269.71875 253.734375 269.578125 C 254.226562 269.292969 254.527344 268.765625 254.527344 268.199219 L 254.539062 100.296875 L 284.140625 117.414062 L 284.140625 322.320312 L 57.789062 191.417969 Z M 236.542969 51.957031 L 315.335938 97.527344 L 285.730469 114.652344 L 253.746094 96.144531 L 237.339844 86.667969 C 236.84375 86.386719 236.242188 86.386719 235.75 86.667969 L 120.984375 153.039062 C 120.492188 153.324219 120.191406 153.851562 120.191406 154.417969 C 120.191406 154.988281 120.492188 155.511719 120.984375 155.800781 L 251.351562 231.191406 L 251.347656 265.441406 L 59.378906 154.417969 Z M 251.359375 119.234375 L 251.351562 227.511719 L 157.746094 173.378906 Z M 251.359375 98.457031 L 251.335938 115.570312 L 154.570312 171.539062 L 124.957031 154.417969 L 236.542969 89.886719 Z M 237.339844 48.742188 C 236.84375 48.460938 236.242188 48.460938 235.75 48.742188 L 55.40625 153.039062 C 54.914062 153.324219 54.609375 153.851562 54.609375 154.417969 L 54.609375 192.339844 C 54.609375 192.90625 54.914062 193.433594 55.40625 193.71875 L 284.933594 326.457031 C 285.179688 326.597656 285.453125 326.667969 285.730469 326.667969 C 286.003906 326.667969 286.277344 326.597656 286.523438 326.457031 L 319.3125 307.496094 C 319.804688 307.210938 320.105469 306.683594 320.105469 306.117188 L 320.105469 97.527344 C 320.105469 96.960938 319.804688 96.433594 319.3125 96.148438 L 237.339844 48.742188 " fill-opacity="1" fill-rule="nonzero"/></g></svg> \ No newline at end of file diff --git a/web/oss/src/ThemeContextBridge.tsx b/web/oss/src/ThemeContextBridge.tsx deleted file mode 100644 index d71c462866..0000000000 --- a/web/oss/src/ThemeContextBridge.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import {ReactNode} from "react" - -import {theme as antdTheme} from "antd" -import {ThemeProvider} from "react-jss" - -import {useAppTheme} from "@/oss/components/Layout/ThemeContextProvider" - -// Bridge the Ant Design theme tokens into the react-jss ThemeProvider so components rendered -// outside of Layout (e.g. global drawers) still receive the same token values. -const ThemeContextBridge = ({children}: {children: ReactNode}) => { - const {appTheme} = useAppTheme() - const {token} = antdTheme.useToken() - - return <ThemeProvider theme={{...token, isDark: appTheme === "dark"}}>{children}</ThemeProvider> -} - -export default ThemeContextBridge diff --git a/web/oss/src/assets/custom-resize-handle.css b/web/oss/src/assets/custom-resize-handle.css deleted file mode 100644 index c72529fe9b..0000000000 --- a/web/oss/src/assets/custom-resize-handle.css +++ /dev/null @@ -1,30 +0,0 @@ -.custom-resize-handle { - position: absolute; - right: -9px; - top: 50%; - width: 0px; - height: 50%; - cursor: col-resize; - z-index: 2; - transform: translateY(-50%); - border-radius: 2px; - background: transparent; - opacity: 0; - transition: opacity 0.15s; -} - -.custom-resize-handle:after { - content: ""; - position: absolute; - inset: 0; - margin: auto; - width: 3px; - height: 28px; - background: #d9d9d9; /* AntD table border color */ - border-radius: 2px; -} - -th:hover .custom-resize-handle, -th:focus .custom-resize-handle { - opacity: 1; -} diff --git a/web/oss/src/code_snippets/endpoints/fetch_config/curl.ts b/web/oss/src/code_snippets/endpoints/fetch_config/curl.ts index 7be07d836b..32c3bb6412 100644 --- a/web/oss/src/code_snippets/endpoints/fetch_config/curl.ts +++ b/web/oss/src/code_snippets/endpoints/fetch_config/curl.ts @@ -1,9 +1,10 @@ import {getEnv} from "@/oss/lib/helpers/dynamicEnv" -export default function cURLCode(appName: string, env_name: string, apiKey: string): string { - return `curl -L '${getEnv("NEXT_PUBLIC_AGENTA_API_URL")}/variants/configs/fetch' \\ +export default function cURLCode(appName: string, env_name: string): string { + return `# Add your API key when using cloud +curl -L '${getEnv("NEXT_PUBLIC_AGENTA_API_URL")}/api/variants/configs/fetch' \\ -H 'Content-Type: application/json' \\ --H "Authorization: ApiKey ${apiKey}" \\ +-H "Authorization: ApiKey x.xxxxxxxx" \\ -d '{ "environment_ref": { "slug": "${env_name}", diff --git a/web/oss/src/code_snippets/endpoints/fetch_config/python.ts b/web/oss/src/code_snippets/endpoints/fetch_config/python.ts index ff594c9c64..fc99ccb39e 100644 --- a/web/oss/src/code_snippets/endpoints/fetch_config/python.ts +++ b/web/oss/src/code_snippets/endpoints/fetch_config/python.ts @@ -1,11 +1,11 @@ import {getEnv} from "@/oss/lib/helpers/dynamicEnv" -export default function pythonCode(appName: string, env_name: string, apiKey: string): string { +export default function pythonCode(appName: string, env_name: string): string { return ` import os import agenta as ag -os.environ["AGENTA_API_KEY"] = "${apiKey}" # Add your API key here +os.environ["AGENTA_API_KEY"] = "x.xxxxxxxx" # Add you API key here, when using cloud os.environ["AGENTA_HOST"] = "${getEnv("NEXT_PUBLIC_AGENTA_API_URL")}" ag.init() diff --git a/web/oss/src/code_snippets/endpoints/fetch_config/typescript.ts b/web/oss/src/code_snippets/endpoints/fetch_config/typescript.ts index b6b134ce9d..78d1a3c576 100644 --- a/web/oss/src/code_snippets/endpoints/fetch_config/typescript.ts +++ b/web/oss/src/code_snippets/endpoints/fetch_config/typescript.ts @@ -1,12 +1,10 @@ import {js as beautify} from "js-beautify" -import {getEnv} from "@/oss/lib/helpers/dynamicEnv" - -export default function tsCode(appName: string, env_name: string, apiKey: string): string { +export default function tsCode(appName: string, env_name: string): string { const codeString = `import axios from 'axios'; const getConfig = async (appName: string, environmentSlug: string) => { - const baseUrl = '${getEnv("NEXT_PUBLIC_AGENTA_API_URL")}/variants/configs/fetch'; + const baseUrl = 'https://oss.agenta.ai/api/variants/configs/fetch'; try { const response = await axios.post(baseUrl, { @@ -23,7 +21,7 @@ const getConfig = async (appName: string, environmentSlug: string) => { }, { headers: { 'Content-Type': 'application/json', - 'Authorization': "ApiKey ${apiKey}", // Add your API key here + 'Authorization': "ApiKey x.xxxxxxxx", // Add your API key here, when using cloud }, }); @@ -33,7 +31,7 @@ const getConfig = async (appName: string, environmentSlug: string) => { } }; -getConfig('${appName}', '${env_name}').then(console.log).catch(console.error); +getConfig('demo', 'production').then(console.log).catch(console.error); ` const formattedCodeString = beautify(codeString) diff --git a/web/oss/src/code_snippets/endpoints/invoke_llm_app/curl.ts b/web/oss/src/code_snippets/endpoints/invoke_llm_app/curl.ts index 08341ba99f..7648c085e2 100644 --- a/web/oss/src/code_snippets/endpoints/invoke_llm_app/curl.ts +++ b/web/oss/src/code_snippets/endpoints/invoke_llm_app/curl.ts @@ -1,7 +1,8 @@ -export default function cURLCode(uri: string, params: string, apiKey: string): string { - return `curl -X POST "${uri}" \\ +export default function cURLCode(uri: string, params: string): string { + return `# Add your API key when using cloud +curl -X POST ${uri} \\ -H "Content-Type: application/json" \\ --H "Authorization: ApiKey ${apiKey}" \\ +-H "Authorization: ApiKey x.xxxxxxxx" \\ -d '${params}' ` } diff --git a/web/oss/src/code_snippets/endpoints/invoke_llm_app/python.ts b/web/oss/src/code_snippets/endpoints/invoke_llm_app/python.ts index 7ff8d067ee..a83a4dd050 100644 --- a/web/oss/src/code_snippets/endpoints/invoke_llm_app/python.ts +++ b/web/oss/src/code_snippets/endpoints/invoke_llm_app/python.ts @@ -1,4 +1,4 @@ -export default function pythonCode(uri: string, params: string, apiKey: string): string { +export default function pythonCode(uri: string, params: string): string { return `import requests import json @@ -6,7 +6,7 @@ url = "${uri}" params = ${params} headers = { "Content-Type": "application/json", - "Authorization": "ApiKey ${apiKey}", # Add your API key here + "Authorization": "ApiKey x.xxxxxxxx", # Add your API key here, when using cloud } response = requests.post(url, json=params, headers=headers) diff --git a/web/oss/src/code_snippets/endpoints/invoke_llm_app/typescript.ts b/web/oss/src/code_snippets/endpoints/invoke_llm_app/typescript.ts index 1bb4e9d6df..59b27f54d5 100644 --- a/web/oss/src/code_snippets/endpoints/invoke_llm_app/typescript.ts +++ b/web/oss/src/code_snippets/endpoints/invoke_llm_app/typescript.ts @@ -1,6 +1,6 @@ import {js as beautify} from "js-beautify" -export default function tsCode(uri: string, params: string, apiKey: string): string { +export default function tsCode(uri: string, params: string): string { const codeString = `import axios from 'axios'; const generate = async () => { @@ -8,7 +8,7 @@ const generate = async () => { const data = ${params}; const headers = { "Content-Type": "application/json", - "Authorization": "ApiKey ${apiKey}" // Add your API key here + "Authorization": "ApiKey x.xxxxxxxx" // Add your API key here, when using cloud }; const response = await axios.post(url, data, { headers }); diff --git a/web/oss/src/code_snippets/testsets/create_with_upload/typescript.ts b/web/oss/src/code_snippets/testsets/create_with_upload/typescript.ts index 25410d4ec9..59625debd8 100644 --- a/web/oss/src/code_snippets/testsets/create_with_upload/typescript.ts +++ b/web/oss/src/code_snippets/testsets/create_with_upload/typescript.ts @@ -8,8 +8,8 @@ export default function tsCode(uri: string): string { const FormData = require('form-data'); const url = '${uri}'; - const filePath = '/path/to/your/file.csv'; - const testsetName = 'your_testset_name'; + const filePath = './cypress/data/countries-genders.csv'; + const testsetName = 'tribalafa'; const formData = new FormData(); formData.append('file', fs.createReadStream(filePath)); diff --git a/web/oss/src/components/AlertPopup/AlertPopup.tsx b/web/oss/src/components/AlertPopup/AlertPopup.tsx index 7633b90fc8..600cb0cc37 100644 --- a/web/oss/src/components/AlertPopup/AlertPopup.tsx +++ b/web/oss/src/components/AlertPopup/AlertPopup.tsx @@ -1,13 +1,12 @@ import {ReactNode} from "react" import {ExclamationCircleOutlined} from "@ant-design/icons" -import {ModalFuncProps} from "antd" +import {Modal, ModalFuncProps} from "antd" import {HookAPI} from "antd/es/modal/useModal" +import {getAppValues} from "@/oss/contexts/app.context" import {globalErrorHandler} from "@/oss/lib/helpers/errorHandler" -import {modal} from "../AppMessageContext" - function handleCb(cb: AlertPopupProps["onOk"]) { if (typeof cb !== "function") return cb return function () { @@ -38,9 +37,10 @@ export default function AlertPopup({ type, ...ModalProps }: AlertPopupProps) { - const _modal = modal + const {modalInstance} = getAppValues() + const modal = modalInstance || Modal - return _modal[type || "confirm"]({ + return modal[type || "confirm"]({ title, content: message, okText, diff --git a/web/oss/src/components/AppGlobalWrappers/index.tsx b/web/oss/src/components/AppGlobalWrappers/index.tsx deleted file mode 100644 index b3c05b6536..0000000000 --- a/web/oss/src/components/AppGlobalWrappers/index.tsx +++ /dev/null @@ -1,189 +0,0 @@ -import {memo, useEffect} from "react" - -import {useAtomValue, useSetAtom} from "jotai" -import dynamic from "next/dynamic" -import Router from "next/router" - -import {navigationRequestAtom, type NavigationCommand} from "@/oss/state/appState" -import {urlQuerySyncAtom} from "@/oss/state/url/test" - -const TraceDrawer = dynamic( - () => import("@/oss/components/Playground/Components/Drawers/TraceDrawer/TraceDrawer"), - {ssr: false}, -) - -const EvalRunFocusDrawer = dynamic( - () => import("@/oss/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer"), - {ssr: false}, -) - -const SelectDeployVariantModalWrapper = dynamic( - () => import("@/oss/components/DeploymentsDashboard/modals/SelectDeployVariantModalWrapper"), - {ssr: false}, -) - -const DeploymentConfirmationModalWrapper = dynamic( - () => import("@/oss/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper"), - {ssr: false}, -) - -const DeploymentsDrawerWrapper = dynamic( - () => import("@/oss/components/DeploymentsDashboard/modals/DeploymentsDrawerWrapper"), - {ssr: false}, -) - -const DeleteAppModalWrapper = dynamic( - () => import("@/oss/components/pages/app-management/modals/DeleteAppModal"), - {ssr: false}, -) - -const EditAppModalWrapper = dynamic( - () => import("@/oss/components/pages/app-management/modals/EditAppModal"), - {ssr: false}, -) - -const VariantDrawerWrapper = dynamic( - () => import("@/oss/components/VariantsComponents/Drawers/VariantDrawer/VariantDrawerWrapper"), - {ssr: false}, -) - -const VariantComparisonModalWrapper = dynamic( - () => - import( - "@/oss/components/VariantsComponents/Modals/VariantComparisonModal/VariantComparisonModalWrapper" - ), - {ssr: false}, -) - -const DeleteEvaluationModalWrapper = dynamic( - () => import("@/oss/components/DeleteEvaluationModal/DeleteEvaluationModalWrapper"), - {ssr: false}, -) - -const DeployVariantModalWrapper = dynamic( - () => - import( - "@/oss/components/Playground/Components/Modals/DeployVariantModal/DeployVariantModalWrapper" - ), - {ssr: false}, -) - -const DeleteVariantModalWrapper = dynamic( - () => - import( - "@/oss/components/Playground/Components/Modals/DeleteVariantModal/DeleteVariantModalWrapper" - ), - {ssr: false}, -) - -const CustomWorkflowModalMount = dynamic( - () => import("@/oss/components/Modals/CustomWorkflowModalMount"), - {ssr: false}, -) - -const getHashFromAsPath = (asPath: string) => { - const hashIndex = asPath.indexOf("#") - if (hashIndex === -1) return undefined - return asPath.slice(hashIndex + 1) -} - -const executeNavigationCommand = async (command: NavigationCommand) => { - if (typeof window === "undefined") return - - const method = command.method ?? (command.type === "href" ? "push" : "replace") - const shallow = command.shallow ?? true - - if (process.env.NEXT_PUBLIC_APP_STATE_DEBUG === "true") { - console.debug("[nav] execute", command) - } - - if (command.type === "href") { - const action = method === "replace" ? Router.replace : Router.push - await action(command.href, undefined, {shallow}) - return - } - - const nextQuery: Record<string, any> = {...Router.query} - Object.entries(command.patch).forEach(([key, value]) => { - if (value === undefined) { - delete nextQuery[key] - return - } - if (Array.isArray(value)) { - if (value.length === 0) { - delete nextQuery[key] - return - } - nextQuery[key] = value - return - } - nextQuery[key] = value - }) - - const action = method === "replace" ? Router.replace : Router.push - const hash = command.preserveHash ? getHashFromAsPath(Router.asPath) : undefined - await action( - { - pathname: Router.pathname, - query: nextQuery, - ...(hash ? {hash} : {}), - }, - undefined, - {shallow}, - ) -} - -const NavigationCommandListener = () => { - const command = useAtomValue(navigationRequestAtom) - const resetNavigation = useSetAtom(navigationRequestAtom) - - useEffect(() => { - if (!command) return - - let cancelled = false - - const run = async () => { - try { - await executeNavigationCommand(command) - } catch (error) { - console.error("Navigation command failed:", error) - } finally { - if (!cancelled) { - resetNavigation(null) - } - } - } - - void run() - - return () => { - cancelled = true - } - }, [command, resetNavigation]) - - return null -} - -const AppGlobalWrappers = () => { - useAtomValue(urlQuerySyncAtom) - return ( - <> - <NavigationCommandListener /> - <TraceDrawer /> - <EvalRunFocusDrawer /> - <DeleteAppModalWrapper /> - <EditAppModalWrapper /> - <VariantDrawerWrapper /> - <VariantComparisonModalWrapper /> - <DeleteEvaluationModalWrapper /> - <DeployVariantModalWrapper /> - <DeleteVariantModalWrapper /> - <SelectDeployVariantModalWrapper /> - <DeploymentConfirmationModalWrapper /> - <DeploymentsDrawerWrapper /> - <CustomWorkflowModalMount /> - </> - ) -} - -export default memo(AppGlobalWrappers) diff --git a/web/oss/src/components/Avatar/Avatar.tsx b/web/oss/src/components/Avatar/Avatar.tsx index eed30ccb5b..9831534eab 100644 --- a/web/oss/src/components/Avatar/Avatar.tsx +++ b/web/oss/src/components/Avatar/Avatar.tsx @@ -1,5 +1,3 @@ -import React from "react" - import {Avatar as MainAvatar} from "antd" import {getColorPairFromStr} from "@/oss/lib/helpers/colors" @@ -26,4 +24,4 @@ const Avatar: React.FC<Props> = ({name, ...props}) => { ) } -export default React.memo(Avatar) +export default Avatar diff --git a/web/oss/src/components/Banners/OldAppDeprecationBanner/index.tsx b/web/oss/src/components/Banners/OldAppDeprecationBanner/index.tsx index 5af40489ca..5ae61b2c55 100644 --- a/web/oss/src/components/Banners/OldAppDeprecationBanner/index.tsx +++ b/web/oss/src/components/Banners/OldAppDeprecationBanner/index.tsx @@ -2,25 +2,22 @@ import {useMemo} from "react" import {Alert, Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" import Link from "next/link" import {useRouter} from "next/router" import semver from "semver" -import {currentAppAtom} from "@/oss/state/app" +import {useAppsData} from "@/oss/contexts/app.context" import packageJsonData from "../../../../package.json" import {DEPRECATION_VERSION} from "./assets/constants" import {CustomWorkflowBannerProps} from "./types" -import useURL from "@/oss/hooks/useURL" const {Text} = Typography const OldAppDeprecationBanner = ({children}: CustomWorkflowBannerProps) => { - const currentApp = useAtomValue(currentAppAtom) + const {currentApp} = useAppsData() const router = useRouter() - const {baseAppURL} = useURL() const isPlaygroundPage = useMemo( () => router.pathname.includes("/playground"), [router.pathname], @@ -33,7 +30,7 @@ const OldAppDeprecationBanner = ({children}: CustomWorkflowBannerProps) => { const getDeprecationMessage = () => { const migrationLink = ( <Link - href={baseAppURL} + href="/apps" className="font-medium !text-blue-600 hover:!text-blue-800 inline-block !underline underline-offset-1" > migrate to a new application diff --git a/web/oss/src/components/ChatInputs/ChatInputs.tsx b/web/oss/src/components/ChatInputs/ChatInputs.tsx index 53827fb496..3f60b1bcf4 100644 --- a/web/oss/src/components/ChatInputs/ChatInputs.tsx +++ b/web/oss/src/components/ChatInputs/ChatInputs.tsx @@ -1,6 +1,6 @@ import {useEffect, useRef, useState} from "react" -import {MinusOutlined, PlusOutlined, PictureOutlined} from "@ant-design/icons" +import {MinusOutlined, PlusOutlined} from "@ant-design/icons" import {Button, Input, Select, Space, Tooltip} from "antd" import cloneDeep from "lodash/cloneDeep" import {createUseStyles} from "react-jss" @@ -11,8 +11,6 @@ import {ChatMessage, ChatRole, JSSTheme} from "@/oss/lib/Types" import CopyButton from "../CopyButton/CopyButton" import {useAppTheme} from "../Layout/ThemeContextProvider" -import {getTextContent} from "../Playground/adapters/TurnMessageHeaderOptions" -import PromptImageUpload from "../Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload" const useStyles = createUseStyles((theme: JSSTheme) => ({ root: { @@ -109,20 +107,7 @@ const ChatInputs: React.FC<Props> = ({ const handleInputChange = (index: number, event: React.ChangeEvent<HTMLTextAreaElement>) => { const {value} = event.target const newMessages = [...messages] - const msg = newMessages[index] - - const existingContent = Array.isArray(msg.content) - ? msg.content - : msg.content - ? [{type: "text", text: msg.content}] - : [] - - const updatedContent = [ - {type: "text", text: value}, - ...existingContent.filter((part) => part.type !== "text"), - ] - - msg.content = updatedContent + newMessages[index].content = value updateMessages(newMessages) } @@ -136,51 +121,6 @@ const ChatInputs: React.FC<Props> = ({ updateMessages(newMessages) } - const updateImagePart = (msgIdx: number, imgIdx: number, newUrl: string) => { - const newMessages = [...messages] - const msg = newMessages[msgIdx] - - if (!Array.isArray(msg.content)) return - - let imageIdx = 0 - msg.content = msg.content.map((part) => { - if (part.type === "image_url") { - if (imageIdx === imgIdx) { - imageIdx++ - return { - ...part, - image_url: { - ...part.image_url, - url: newUrl, - }, - } - } - imageIdx++ - } - return part - }) - - updateMessages(newMessages) - } - - const handleRemoveImage = (msgIdx: number, imgIdx: number) => { - const newMessages = [...messages] - const msg = newMessages[msgIdx] - - if (!Array.isArray(msg.content)) return - - let imageIndex = -1 - msg.content = msg.content.filter((part) => { - if (part.type === "image_url") { - imageIndex++ - return imageIndex !== imgIdx - } - return true - }) - - updateMessages(newMessages) - } - useEffect(() => { onChangeRef.current = onChange }, [onChange]) @@ -191,154 +131,70 @@ const ChatInputs: React.FC<Props> = ({ const lastAssistantMsg = messages.filter((msg) => msg.role === ChatRole.Assistant) - const insertEmptyImagePart = (index: number) => { - const newMessages = [...messages] - const msg = newMessages[index] - - const existingContent = Array.isArray(msg.content) - ? msg.content - : msg.content - ? [{type: "text", text: msg.content}] - : [] - - msg.content = [ - ...existingContent, - { - type: "image_url", - image_url: { - url: "", - detail: "auto", - }, - }, - ] - - updateMessages(newMessages) - } - return ( <div className={classes.root}> - {messages.map((msg, ix) => { - const isErrorText = - typeof msg.content === "string" - ? msg.content.startsWith("❌") - : Array.isArray(msg.content) - ? msg.content[0]?.type === "text" && - msg.content[0]?.text?.startsWith("❌") - : false - - const imageParts = Array.isArray(msg.content) - ? msg.content.filter((part) => part.type === "image_url") - : [] - - return ( - <div className="flex flex-col gap-4" key={msg.id || msg.role + ix}> - <div className={classes.row}> - <Select - style={{width: 150}} - disabled={disableEditRole} - options={Object.keys(ChatRole).map((role) => ({ - label: role, - value: ChatRole[role as keyof typeof ChatRole], - }))} - value={msg.role} - onChange={(newRole) => handleRoleChange(ix, newRole)} + {messages.map((msg, ix) => ( + <div className={classes.row} key={msg.id || msg.role + msg.content + ix}> + <Select + style={{width: 150}} + disabled={disableEditRole} + options={Object.keys(ChatRole).map((role) => ({ + label: role, + value: ChatRole[role as keyof typeof ChatRole], + }))} + value={msg.role} + onChange={(newRole) => handleRoleChange(ix, newRole)} + /> + <div className="relative w-[100%]"> + <Input.TextArea + style={{ + maxWidth: "none", + background: msg.content.startsWith("❌") + ? appTheme === "dark" + ? "#490b0b" + : "#fff1f0" + : "", + color: msg.content.startsWith("❌") + ? appTheme === "dark" + ? "#ffffffd9" + : "#000000e0" + : "", + }} + disabled={disableEditContent} + autoSize={{maxRows}} + value={msg.content} + onChange={(e) => handleInputChange(ix, e)} + readOnly={readonly} + /> + {lastAssistantMsg[lastAssistantMsg.length - 1]?.id === msg.id && ( + <CopyButton + buttonText={null} + text={ + lastAssistantMsg.length + ? lastAssistantMsg[lastAssistantMsg.length - 1].content + : "" + } + disabled={ + isLoading || + !lastAssistantMsg[lastAssistantMsg.length - 1]?.content + } + icon={true} + className={classes.copyButton} /> - <div className="relative w-[100%]"> - <Input.TextArea - style={{ - maxWidth: "none", - background: isErrorText - ? appTheme === "dark" - ? "#490b0b" - : "#fff1f0" - : "", - color: isErrorText - ? appTheme === "dark" - ? "#ffffffd9" - : "#000000e0" - : "", - }} - disabled={disableEditContent} - autoSize={{maxRows}} - value={ - Array.isArray(msg.content) - ? msg.content.find((part) => part.type === "text") - ?.text || "" - : typeof msg.content === "string" - ? msg.content - : "" - } - onChange={(e) => handleInputChange(ix, e)} - readOnly={readonly} - /> - {lastAssistantMsg[lastAssistantMsg.length - 1]?.id === msg.id && ( - <CopyButton - buttonText={null} - text={ - lastAssistantMsg.length - ? getTextContent( - lastAssistantMsg[lastAssistantMsg.length - 1] - .content, - ) - : "" - } - disabled={ - isLoading || - !getTextContent( - lastAssistantMsg[lastAssistantMsg.length - 1] - .content, - ) - } - icon={true} - className={classes.copyButton} - /> - )} - </div> - {messages.length > 1 && !disableRemove && ( - <Tooltip title="Remove"> - <Button - shape="circle" - size="small" - icon={<MinusOutlined />} - onClick={() => handleDelete(ix)} - /> - </Tooltip> - )} - {!readonly && msg.role === ChatRole.User && ( - <Tooltip title="Add image"> - <Button - shape="circle" - size="small" - icon={<PictureOutlined />} - onClick={() => insertEmptyImagePart(ix)} - disabled={imageParts.length >= 5} - /> - </Tooltip> - )} - </div> - {msg.role === ChatRole.User && - imageParts.map((img, imgIdx) => ( - <PromptImageUpload - key={imgIdx} - handleUploadFileChange={(file) => - updateImagePart( - ix, - imgIdx, - file?.thumbUrl || file?.url || "", - ) - } - handleRemoveUploadFile={() => handleRemoveImage(ix, imgIdx)} - imageFile={{ - status: "done", - thumbUrl: img.image_url.url, - uid: img.image_url.url, - name: img.image_url.url, - }} - /> - ))} + )} </div> - ) - })} + {messages.length > 1 && !disableRemove && ( + <Tooltip title="Remove"> + <Button + shape="circle" + size="small" + icon={<MinusOutlined />} + onClick={() => handleDelete(ix)} + /> + </Tooltip> + )} + </div> + ))} <Space> {!disableAdd && ( diff --git a/web/oss/src/components/Common/ImagePreview.tsx b/web/oss/src/components/Common/ImagePreview.tsx deleted file mode 100644 index 029b0ffcb6..0000000000 --- a/web/oss/src/components/Common/ImagePreview.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import {useState} from "react" - -import {MagnifyingGlassPlus} from "@phosphor-icons/react" -import {Modal} from "antd" - -import ImageWithFallback from "@/oss/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/components/ImageWithFallback" - -interface ImagePreviewProps { - /** thumbnail & full preview source */ - src: string - /** alt text */ - alt?: string - /** square thumbnail size in px (default 48) */ - size?: number - /** optional className for thumbnail */ - className?: string - /** optional boolean to disable the preview */ - isValidPreview: boolean -} - -/** - * Small clickable image thumbnail that opens an Ant Design Modal with a larger preview. - * Extracted from PromptImageUpload for reuse in evaluation run views. - */ -const ImagePreview = ({ - src, - alt = "Preview", - size = 48, - className = "", - isValidPreview, -}: ImagePreviewProps) => { - const [open, setOpen] = useState(false) - - const isSafeImageSrc = (url: string) => /^https?:\/\/[^ "]+$/i.test(url) - - return ( - <> - <div - className={`relative group rounded overflow-hidden cursor-pointer flex-shrink-0 ${className}`} - style={{width: size, height: size}} - onClick={(e) => { - e.stopPropagation() - setOpen(true) - }} - > - <ImageWithFallback - src={src} - alt={alt} - className="w-full h-full object-cover group-hover:opacity-80 transition duration-200" - /> - <div className="absolute inset-0 bg-black bg-opacity-10 group-hover:bg-opacity-20 transition duration-200" /> - <div className="absolute inset-0 flex items-center justify-center text-white opacity-0 group-hover:opacity-100 transition duration-200"> - <MagnifyingGlassPlus size={16} weight="bold" /> - </div> - </div> - <Modal - open={open} - footer={null} - onCancel={() => setOpen(false)} - width="auto" - style={{ - body: {padding: 0, display: "flex", justifyContent: "center"}, - }} - > - {isValidPreview && isSafeImageSrc(src) && ( - <img src={src} alt={alt} style={{maxWidth: "80vw", maxHeight: "80vh"}} /> - )} - </Modal> - </> - ) -} - -export default ImagePreview diff --git a/web/oss/src/components/CustomWorkflowBanner/index.tsx b/web/oss/src/components/CustomWorkflowBanner/index.tsx index 3987e80523..cf199fc3e9 100644 --- a/web/oss/src/components/CustomWorkflowBanner/index.tsx +++ b/web/oss/src/components/CustomWorkflowBanner/index.tsx @@ -1,60 +1,139 @@ -import {PencilSimple} from "@phosphor-icons/react" -import {Alert, Button, Card, Space, Typography} from "antd" -import {useAtomValue} from "jotai" -import {useRouter} from "next/router" +import {useCallback, useEffect, useRef, useState} from "react" -import useCustomWorkflowConfig from "@/oss/components/pages/app-management/modals/CustomWorkflowModal/hooks/useCustomWorkflowConfig" -import {customWorkflowBannerVisibleAtom} from "@/oss/state/variant/atoms/appStatus" +import {ArrowClockwise, PencilSimple} from "@phosphor-icons/react" +import {Alert, Button, message, Space} from "antd" + +import {useAppsData} from "@/oss/contexts/app.context" +import {findCustomWorkflowPath} from "@/oss/lib/shared/variant" import {CustomWorkflowBannerProps} from "./types" const CustomWorkflowBanner = ({ - showInPlayground = false, - layout = "banner", + setIsCustomWorkflowModalOpen, + variant, }: CustomWorkflowBannerProps) => { - const showBanner = useAtomValue(customWorkflowBannerVisibleAtom) - const {openModal} = useCustomWorkflowConfig({configureWorkflow: true}) - const router = useRouter() - const isPlaygroundPath = - router.pathname.includes("/playground") || router.pathname.includes("/evaluations/results") - - if (showBanner && (showInPlayground || !isPlaygroundPath)) { - if (layout === "card") { - return ( - <main className="flex flex-col grow h-full overflow-hidden items-center justify-center"> - <Card className="max-w-[520px] w-[90%] text-center"> - <Typography.Title level={3} className="!mb-2"> - Unable to establish connection - </Typography.Title> - <Typography.Paragraph type="secondary" className="!mb-4"> - Agenta is unable to communicate with your server. Try refreshing or - re-configure your workflow URL. - </Typography.Paragraph> - <Space direction="horizontal" align="center"> - <Button icon={<PencilSimple size={14} />} onClick={() => openModal()}> - Configure - </Button> - </Space> - </Card> - </main> - ) + const {currentApp} = useAppsData() + const [isDown, setIsDown] = useState(false) + const controllerRef = useRef<AbortController | null>(null) + const pollingRef = useRef<NodeJS.Timeout | null>(null) + const [isRetryUrlHealthLoading, setIsRetryUrlHealthLoading] = useState(false) + const [countdown, setCountdown] = useState(5) + const [isConnectionRestored, setIsConnectionRestored] = useState(false) + + const checkWorkflowUrlHealth = useCallback( + async (shouldThrow = false) => { + if (controllerRef.current) { + controllerRef.current.abort() + } + + const controller = new AbortController() + controllerRef.current = controller + + try { + const {status} = (await findCustomWorkflowPath(variant?.uri || "", "/health")) || {} + if (!status) throw new Error("Unable to establish connection") + setIsConnectionRestored(true) + } catch (error: any) { + if (error.name !== "AbortError") { + setIsDown(true) + setIsConnectionRestored(false) + if (shouldThrow) { + throw error + } + } + } + }, + [variant?.uri], + ) + + const startPollingWorkflowUrl = useCallback(() => { + if (pollingRef.current) clearInterval(pollingRef.current) + + pollingRef.current = setInterval(() => { + checkWorkflowUrlHealth() + }, 60000) + }, [checkWorkflowUrlHealth]) + + useEffect(() => { + if (currentApp?.app_type !== "custom") return + + checkWorkflowUrlHealth() + startPollingWorkflowUrl() + + return () => { + if (pollingRef.current) clearInterval(pollingRef.current) + if (controllerRef.current) controllerRef.current.abort() + } + }, [currentApp?.app_type, checkWorkflowUrlHealth, startPollingWorkflowUrl]) + + useEffect(() => { + if (isConnectionRestored) { + setCountdown(5) + const timer = setInterval(() => { + setCountdown((prevCountdown) => { + if (prevCountdown <= 1) { + clearInterval(timer) + setIsDown(false) + return 0 + } + return prevCountdown - 1 + }) + }, 1000) + + return () => clearInterval(timer) + } + }, [isConnectionRestored]) + + const retryWorkflowStatus = async () => { + try { + setIsRetryUrlHealthLoading(true) + await checkWorkflowUrlHealth(true) + startPollingWorkflowUrl() + } catch (error) { + message.error("Failed to restore connection") + } finally { + setIsRetryUrlHealthLoading(false) } + } + if (currentApp?.app_type === "custom" && isDown) { return ( <Alert className="m-2" - message={"Unable to establish connection"} + message={ + isConnectionRestored ? "Connection restored" : "Unable to establish connection" + } description={ - "Agenta is unable to communicate with your server. Try refreshing or consider re-configuring your workflow URL." + isConnectionRestored + ? "" + : "Agenta is unable to communicate with your server. Try refreshing or consider re-configuring your workflow URL." } showIcon - type={"warning"} + type={isConnectionRestored ? "success" : "warning"} action={ - <Space direction="vertical"> - <Button icon={<PencilSimple size={14} />} onClick={() => openModal()}> - Configure + isConnectionRestored ? ( + <Button size="small" onClick={() => setIsDown(false)}> + Close (auto closes in {countdown}) </Button> - </Space> + ) : ( + <Space direction="vertical"> + <Button + icon={<ArrowClockwise size={14} />} + onClick={retryWorkflowStatus} + className="w-full" + type={isRetryUrlHealthLoading ? "dashed" : "primary"} + loading={isRetryUrlHealthLoading} + > + {isRetryUrlHealthLoading ? "Retrying" : "Retry"} + </Button> + <Button + icon={<PencilSimple size={14} />} + onClick={() => setIsCustomWorkflowModalOpen(true)} + > + Configure + </Button> + </Space> + ) } /> ) diff --git a/web/oss/src/components/CustomWorkflowBanner/types.d.ts b/web/oss/src/components/CustomWorkflowBanner/types.d.ts index c4da59a20c..cd42e1c61d 100644 --- a/web/oss/src/components/CustomWorkflowBanner/types.d.ts +++ b/web/oss/src/components/CustomWorkflowBanner/types.d.ts @@ -1,4 +1,8 @@ +import {Dispatch, SetStateAction} from "react" + +import {Variant} from "@/oss/lib/Types" + export interface CustomWorkflowBannerProps { - showInPlayground?: boolean - layout?: "banner" | "card" + setIsCustomWorkflowModalOpen: Dispatch<SetStateAction<boolean>> + variant: Variant | undefined } diff --git a/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModal.tsx b/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModal.tsx index 3631ee59eb..7819cc9795 100644 --- a/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModal.tsx +++ b/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModal.tsx @@ -1,14 +1,13 @@ -import EnhancedModal from "@agenta/oss/src/components/EnhancedUIs/Modal" import {DeleteOutlined} from "@ant-design/icons" -import {Typography} from "antd" +import {ModalProps, Typography} from "antd" -import {DeleteEvaluationModalProps} from "./types" +import EnhancedModal from "../EnhancedUIs/Modal" -const DeleteEvaluationModal = ({ - evaluationType, - isMultiple = false, - ...props -}: DeleteEvaluationModalProps) => { +interface DeleteAutoEvalModalProps extends ModalProps { + evaluationType: string +} + +const DeleteEvaluationModal = ({evaluationType, ...props}: DeleteAutoEvalModalProps) => { return ( <EnhancedModal {...props} @@ -25,29 +24,13 @@ const DeleteEvaluationModal = ({ <div className="flex flex-col gap-4"> <Typography.Text> - {isMultiple - ? `The selected ${evaluationType.split("|").length} evaluations will be permanently deleted.` - : `A deleted ${evaluationType} cannot be restored.`} + A deleted {evaluationType} cannot be restored. </Typography.Text> <div className="flex flex-col gap-1"> - <Typography.Text> - {isMultiple - ? "You are about to delete the following evaluations:" - : "You are about to delete:"} - </Typography.Text> - <Typography.Text - className={`text-sm font-medium ${ - isMultiple ? "max-h-40 overflow-y-auto" : "" - }`} - > - {isMultiple - ? evaluationType.split(" | ").map((item, index) => ( - <div key={index} className="py-1"> - • {item.trim()} - </div> - )) - : evaluationType} + <Typography.Text>You are about to delete:</Typography.Text> + <Typography.Text className="text-sm font-medium capitalize"> + {evaluationType} </Typography.Text> </div> </div> diff --git a/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModalWrapper.tsx b/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModalWrapper.tsx deleted file mode 100644 index 24461b4330..0000000000 --- a/web/oss/src/components/DeleteEvaluationModal/DeleteEvaluationModalWrapper.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import {useAtomValue, useSetAtom} from "jotai" - -import DeleteEvaluationModal from "@/oss/components/DeleteEvaluationModal/DeleteEvaluationModal" - -import { - closeDeleteEvaluationModalAtom, - deleteEvaluationModalAtom, -} from "./store/deleteEvaluationModalStore" - -const DeleteEvaluationModalWrapper = () => { - const state = useAtomValue(deleteEvaluationModalAtom) - const close = useSetAtom(closeDeleteEvaluationModalAtom) - - if (!state.open) return null - - return ( - <DeleteEvaluationModal - open={state.open} - onCancel={() => close()} - onOk={() => state.onOk?.()} - evaluationType={state.evaluationType || "-"} - /> - ) -} - -export default DeleteEvaluationModalWrapper diff --git a/web/oss/src/components/DeleteEvaluationModal/store/deleteEvaluationModalStore.ts b/web/oss/src/components/DeleteEvaluationModal/store/deleteEvaluationModalStore.ts deleted file mode 100644 index be6640fd53..0000000000 --- a/web/oss/src/components/DeleteEvaluationModal/store/deleteEvaluationModalStore.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {atom} from "jotai" - -interface DeleteEvaluationModalState { - open: boolean - evaluationType?: string - onOk?: () => void -} - -export const deleteEvaluationModalAtom = atom<DeleteEvaluationModalState>({ - open: false, -}) - -export const openDeleteEvaluationModalAtom = atom( - null, - (get, set, params: {evaluationType: string; onOk: () => void}) => { - set(deleteEvaluationModalAtom, { - open: true, - evaluationType: params.evaluationType, - onOk: params.onOk, - }) - }, -) - -export const closeDeleteEvaluationModalAtom = atom(null, (get, set) => { - set(deleteEvaluationModalAtom, {open: false}) -}) diff --git a/web/oss/src/components/DeleteEvaluationModal/types.ts b/web/oss/src/components/DeleteEvaluationModal/types.ts deleted file mode 100644 index 7acded39ee..0000000000 --- a/web/oss/src/components/DeleteEvaluationModal/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type {ModalProps} from "antd" - -export interface DeleteEvaluationModalProps extends ModalProps { - evaluationType: string - isMultiple?: boolean -} diff --git a/web/oss/src/components/DeploymentCard/EnvironmentCardRow.tsx b/web/oss/src/components/DeploymentCard/EnvironmentCardRow.tsx deleted file mode 100644 index 2119599b07..0000000000 --- a/web/oss/src/components/DeploymentCard/EnvironmentCardRow.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import clsx from "clsx" - -import type {Environment} from "@/oss/lib/Types" - -import DeploymentCardSkeleton, {DEPLOYMENT_SKELETON_ENVIRONMENTS} from "./skeleton" - -import DeploymentCard from "./index" - -interface EnvironmentCardRowProps { - environments?: Environment[] - isLoading: boolean - selectedEnvName?: string - onCardClick?: (environment: Environment) => void - className?: string -} - -const EnvironmentCardRow = ({ - environments, - isLoading, - selectedEnvName, - onCardClick, - className, -}: EnvironmentCardRowProps) => { - const dataset = environments ?? [] - - return ( - <div className={clsx("w-full flex gap-4", className)}> - {isLoading - ? DEPLOYMENT_SKELETON_ENVIRONMENTS.map((envName) => ( - <DeploymentCardSkeleton - key={envName} - envName={envName} - isSelected={selectedEnvName?.toLowerCase() === envName.toLowerCase()} - /> - )) - : dataset.map((env, index) => ( - <DeploymentCard - key={env.id ?? env.name ?? index} - env={env} - selectedEnv={selectedEnvName} - onClick={() => onCardClick?.(env)} - /> - ))} - </div> - ) -} - -export default EnvironmentCardRow diff --git a/web/oss/src/components/DeploymentCard/index.tsx b/web/oss/src/components/DeploymentCard/index.tsx index 57320a6ae3..3a14fb93a0 100644 --- a/web/oss/src/components/DeploymentCard/index.tsx +++ b/web/oss/src/components/DeploymentCard/index.tsx @@ -1,47 +1,56 @@ import type {ComponentProps} from "react" -import {useMemo} from "react" import {Card, Space, Tag, Typography} from "antd" -import {useAtomValue} from "jotai" +import {createUseStyles} from "react-jss" -import VariantNameCell from "@/oss/components/VariantNameCell" -import {Environment} from "@/oss/lib/Types" -import {deployedRevisionByEnvironmentAtomFamily} from "@/oss/state/variant/atoms/fetcher" +import {EnhancedObjectConfig} from "@/oss/lib/shared/variant/genericTransformer/types" +import {AgentaConfigPrompt, EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" +import {Environment, JSSTheme} from "@/oss/lib/Types" import EnvironmentTagLabel, {deploymentStatusColors} from "../EnvironmentTagLabel" +import Version from "../Playground/assets/Version" -import {useDeploymentCardStyles} from "./styles" +const useStyles = createUseStyles((theme: JSSTheme) => ({ + deploymentCard: { + cursor: "pointer", + width: "100%", + transition: "all 0.25s ease-in", + position: "relative", + "& .ant-card-body": { + padding: theme.paddingSM, + display: "flex", + flexDirection: "column", + gap: theme.paddingXS, + "&:before": { + display: "none", + }, + "& > span.ant-typography:first-of-type": { + textTransform: "capitalize", + }, + }, + "&:hover": { + boxShadow: theme.boxShadowTertiary, + borderColor: "var(--hover-border-color)", + }, + }, +})) type DeploymentCardProps = { + selectedDeployedVariant: EnhancedVariant<EnhancedObjectConfig<AgentaConfigPrompt>> | undefined env: Environment selectedEnv?: string } & ComponentProps<typeof Card> -const DeploymentCard = ({env, selectedEnv, ...props}: DeploymentCardProps) => { - const classes = useDeploymentCardStyles() +const DeploymentCard = ({ + selectedDeployedVariant, + env, + selectedEnv, + ...props +}: DeploymentCardProps) => { + const classes = useStyles() const getBorderColor = (envName: string) => - deploymentStatusColors[envName.toLowerCase()]?.textColor - - const envName = env?.name ?? "" - const revisionAtom = useMemo(() => deployedRevisionByEnvironmentAtomFamily(envName), [envName]) - const revision = useAtomValue(revisionAtom) - - const revisionId = revision?.id - - let lastModifiedText = "-" - if (revision) { - const ts = (revision as any)?.updatedAtTimestamp ?? (revision as any)?.createdAtTimestamp - if (typeof ts === "number") { - try { - lastModifiedText = new Date(ts).toLocaleString() - } catch { - lastModifiedText = String(ts) - } - } else { - lastModifiedText = (revision as any)?.updatedAt ?? (revision as any)?.createdAt ?? "-" - } - } + deploymentStatusColors[envName.toLowerCase()].textColor return ( <Card @@ -57,20 +66,21 @@ const DeploymentCard = ({env, selectedEnv, ...props}: DeploymentCardProps) => { <Space className="justify-between"> <Typography.Text>Variant</Typography.Text> - {revisionId ? ( - <VariantNameCell revisionId={revisionId} showBadges={false} showStable /> + {env.deployed_variant_name ? ( + <Space> + <Typography.Text>{env.deployed_variant_name}</Typography.Text> + <Version revision={env.revision || 0} /> + </Space> ) : ( <Tag onClick={(e) => e.stopPropagation()}>No deployment</Tag> )} </Space> <Space className="justify-between"> <Typography.Text>Last modified</Typography.Text> - <Typography.Text>{lastModifiedText}</Typography.Text> + <Typography.Text>{selectedDeployedVariant?.updatedAt || "-"}</Typography.Text> </Space> </Card> ) } export default DeploymentCard - -export {default as DeploymentCardSkeleton, DEPLOYMENT_SKELETON_ENVIRONMENTS} from "./skeleton" diff --git a/web/oss/src/components/DeploymentCard/skeleton.tsx b/web/oss/src/components/DeploymentCard/skeleton.tsx deleted file mode 100644 index f3fd17be24..0000000000 --- a/web/oss/src/components/DeploymentCard/skeleton.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import {Card, Skeleton, Space, Typography} from "antd" - -import EnvironmentTagLabel, {deploymentStatusColors} from "@/oss/components/EnvironmentTagLabel" - -import {useDeploymentCardStyles} from "./styles" - -export const DEPLOYMENT_SKELETON_ENVIRONMENTS = ["Development", "Staging", "Production"] - -interface DeploymentCardSkeletonProps { - envName: string - isSelected?: boolean -} - -const DeploymentCardSkeleton = ({envName, isSelected}: DeploymentCardSkeletonProps) => { - const classes = useDeploymentCardStyles() - const borderColor = deploymentStatusColors[envName.toLowerCase()]?.textColor - - return ( - <Card - className={classes.deploymentCard} - style={{ - borderColor: isSelected ? borderColor : undefined, - // @ts-ignore -- custom CSS variable consumed in styles - "--hover-border-color": borderColor, - }} - > - <EnvironmentTagLabel environment={envName} /> - - <Space className="justify-between"> - <Typography.Text>Variant</Typography.Text> - <Skeleton.Button active size="small" style={{width: 140}} shape="round" /> - </Space> - - <Space className="justify-between"> - <Typography.Text>Last modified</Typography.Text> - <Skeleton.Button active size="small" style={{width: 110}} shape="round" /> - </Space> - </Card> - ) -} - -export default DeploymentCardSkeleton diff --git a/web/oss/src/components/DeploymentCard/styles.ts b/web/oss/src/components/DeploymentCard/styles.ts deleted file mode 100644 index 52a0a5d802..0000000000 --- a/web/oss/src/components/DeploymentCard/styles.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {createUseStyles} from "react-jss" - -import {JSSTheme} from "@/oss/lib/Types" - -export const useDeploymentCardStyles = createUseStyles((theme: JSSTheme) => ({ - deploymentCard: { - cursor: "pointer", - width: "100%", - transition: "all 0.25s ease-in", - position: "relative", - "& .ant-card-body": { - padding: theme.paddingSM, - display: "flex", - flexDirection: "column", - gap: theme.paddingXS, - "&:before": { - display: "none", - }, - "& > span.ant-typography:first-of-type": { - textTransform: "capitalize", - }, - }, - "&:hover": { - boxShadow: theme.boxShadowTertiary, - borderColor: "var(--hover-border-color)", - }, - }, -})) diff --git a/web/oss/src/components/DeploymentsDashboard/assets/DeploymentDetails.tsx b/web/oss/src/components/DeploymentsDashboard/assets/DeploymentDetails.tsx index ee7c5fc120..e0b53dda44 100644 --- a/web/oss/src/components/DeploymentsDashboard/assets/DeploymentDetails.tsx +++ b/web/oss/src/components/DeploymentsDashboard/assets/DeploymentDetails.tsx @@ -13,7 +13,7 @@ interface DeploymentDetailsProps { const DeploymentDetails = ({revisionConfig, variant}: DeploymentDetailsProps) => { return ( <Tabs - destroyOnHidden + destroyInactiveTabPane defaultActiveKey={"variant"} items={[ { diff --git a/web/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsx b/web/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsx index d9e114b145..87fd1ffd55 100644 --- a/web/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsx +++ b/web/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsx @@ -1,10 +1,8 @@ -import {useCallback, useMemo, useState} from "react" +import {useMemo, useState} from "react" import {PythonOutlined} from "@ant-design/icons" -import {CloudArrowUp, FileCode, FileTs} from "@phosphor-icons/react" -import {Button, Spin, Tabs, Typography} from "antd" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" +import {FileCode, FileTs} from "@phosphor-icons/react" +import {Tabs} from "antd" import fetchConfigcURLCode from "@/oss/code_snippets/endpoints/fetch_config/curl" import fetchConfigpythonCode from "@/oss/code_snippets/endpoints/fetch_config/python" @@ -13,172 +11,103 @@ import invokeLlmAppcURLCode from "@/oss/code_snippets/endpoints/invoke_llm_app/c import invokeLlmApppythonCode from "@/oss/code_snippets/endpoints/invoke_llm_app/python" import invokeLlmApptsCode from "@/oss/code_snippets/endpoints/invoke_llm_app/typescript" import LanguageCodeBlock from "@/oss/components/pages/overview/deployments/DeploymentDrawer/assets/LanguageCodeBlock" +import useURI from "@/oss/components/pages/overview/deployments/DeploymentDrawer/hooks/useURI" +import {useAppsData} from "@/oss/contexts/app.context" import {useAppId} from "@/oss/hooks/useAppId" import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" import {DeploymentRevisions} from "@/oss/lib/Types" -import {createParams} from "@/oss/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/endpoints" -import {currentAppAtom, useURI} from "@/oss/state/app" -import {stablePromptVariablesAtomFamily} from "@/oss/state/newPlayground/core/prompts" -import {deployedRevisionByEnvironmentAtomFamily} from "@/oss/state/variant/atoms/fetcher" - -const ApiKeyInput = dynamic( - () => import("@/oss/components/pages/app-management/components/ApiKeyInput"), - {ssr: false}, -) +import {createParams} from "@/oss/pages/apps/[app_id]/endpoints" interface UseApiContentProps { variants: EnhancedVariant[] selectedEnvironment: DeploymentRevisions - revisionId?: string - handleOpenSelectDeployVariantModal: () => void } -const UseApiContent = ({ - selectedEnvironment, - revisionId, - handleOpenSelectDeployVariantModal, -}: UseApiContentProps) => { +const UseApiContent = ({selectedEnvironment, variants}: UseApiContentProps) => { const appId = useAppId() - const currentApp = useAtomValue(currentAppAtom) + const {currentApp} = useAppsData() const [selectedLang, setSelectedLang] = useState("python") - const [apiKeyValue, setApiKeyValue] = useState("") - - const hasDeployment = Boolean(selectedEnvironment?.deployed_app_variant_id) - const variantId = hasDeployment ? selectedEnvironment.deployed_app_variant_id : undefined - const {data: uri, isLoading: isUriQueryLoading} = useURI(appId, variantId) - const isLoading = Boolean(variantId) && isUriQueryLoading - const latestRevisionForVariant = useAtomValue( - deployedRevisionByEnvironmentAtomFamily(selectedEnvironment.name), - ) as any - const variableNames = useAtomValue( - stablePromptVariablesAtomFamily(revisionId || latestRevisionForVariant?.id || ""), - ) as string[] + const {data: uri} = useURI(appId, selectedEnvironment.deployed_app_variant_id || "") const params = useMemo(() => { - const synthesized = variableNames.map((name) => ({name, input: name === "messages"})) + const _variant: any = (variants || []).find( + (item) => + (item?.id || item?.variantId) === + selectedEnvironment?.deployed_app_variant_revision_id, + ) + const {inputParams, isChatVariant} = _variant || {} - return createParams( - synthesized, + const params = createParams( + inputParams, selectedEnvironment?.name || "none", "add_a_value", + isChatVariant, currentApp, ) - }, [variableNames, selectedEnvironment?.name, currentApp]) - - const invokeLlmUrl = uri ?? "" - - const invokeLlmAppCodeSnippet = useMemo( - () => ({ - python: invokeLlmApppythonCode(invokeLlmUrl, params, apiKeyValue || "x.xxxxxxxx"), - bash: invokeLlmAppcURLCode(invokeLlmUrl, params, apiKeyValue || "x.xxxxxxxx"), - typescript: invokeLlmApptsCode(invokeLlmUrl, params, apiKeyValue || "x.xxxxxxxx"), - }), - [apiKeyValue, invokeLlmUrl, params], - ) - const fetchConfigCodeSnippet = useMemo( - () => ({ - python: fetchConfigpythonCode( - currentApp?.app_name!, - selectedEnvironment?.name!, - apiKeyValue || "x.xxxxxxxx", - ), - bash: fetchConfigcURLCode( - currentApp?.app_name!, - selectedEnvironment?.name!, - apiKeyValue || "x.xxxxxxxx", - ), - typescript: fetchConfigtsCode( - currentApp?.app_name!, - selectedEnvironment?.name!, - apiKeyValue || "x.xxxxxxxx", - ), - }), - [apiKeyValue, currentApp?.app_name, selectedEnvironment?.name], - ) - - const renderTabChildren = useCallback(() => { - if (!hasDeployment) { - return ( - <div className="flex flex-col items-center gap-4 py-16 text-center"> - <div className="flex h-12 w-12 items-center justify-center rounded-full bg-primary-50"> - <CloudArrowUp size={24} className="text-primary-500" /> - </div> - <div className="flex flex-col gap-1"> - <Typography.Text className="text-base font-medium"> - No deployment yet - </Typography.Text> - <Typography.Text type="secondary"> - Deploy a variant to generate API credentials and client snippets for - this environment. - </Typography.Text> - </div> - <Button - type="primary" - icon={<CloudArrowUp size={16} />} - onClick={handleOpenSelectDeployVariantModal} - > - Deploy variant - </Button> - </div> - ) - } - - return ( - <div className="flex flex-col gap-6"> - <ApiKeyInput apiKeyValue={apiKeyValue} onApiKeyChange={setApiKeyValue} /> - <Spin spinning={isLoading}> - <LanguageCodeBlock - fetchConfigCodeSnippet={fetchConfigCodeSnippet} - invokeLlmAppCodeSnippet={invokeLlmAppCodeSnippet} - selectedLang={selectedLang} - handleOpenSelectDeployVariantModal={handleOpenSelectDeployVariantModal} - invokeLlmUrl={invokeLlmUrl} - /> - </Spin> - </div> - ) + return params }, [ - apiKeyValue, - fetchConfigCodeSnippet, - handleOpenSelectDeployVariantModal, - hasDeployment, - invokeLlmAppCodeSnippet, - invokeLlmUrl, - isLoading, - selectedLang, + variants, + currentApp, + selectedEnvironment?.deployed_app_variant_revision_id, + selectedEnvironment?.name, ]) - const tabItems = useMemo( - () => [ - { - key: "python", - label: "Python", - children: renderTabChildren(), - icon: <PythonOutlined />, - }, - { - key: "typescript", - label: "TypeScript", - children: renderTabChildren(), - icon: <FileTs size={14} />, - }, - { - key: "bash", - label: "cURL", - children: renderTabChildren(), - icon: <FileCode size={14} />, - }, - ], - [renderTabChildren], - ) + const invokeLlmAppCodeSnippet: Record<string, string> = { + python: invokeLlmApppythonCode(uri!, params), + bash: invokeLlmAppcURLCode(uri!, params), + typescript: invokeLlmApptsCode(uri!, params), + } + + const fetchConfigCodeSnippet: Record<string, string> = { + python: fetchConfigpythonCode(currentApp?.app_name!, selectedEnvironment?.name!), + bash: fetchConfigcURLCode(currentApp?.app_name!, selectedEnvironment?.name!), + typescript: fetchConfigtsCode(currentApp?.app_name!, selectedEnvironment?.name!), + } return ( <Tabs - destroyOnHidden + destroyInactiveTabPane defaultActiveKey={selectedLang} - items={tabItems} + items={[ + { + key: "python", + label: "Python", + children: ( + <LanguageCodeBlock + fetchConfigCodeSnippet={fetchConfigCodeSnippet} + invokeLlmAppCodeSnippet={invokeLlmAppCodeSnippet} + selectedLang={selectedLang} + /> + ), + icon: <PythonOutlined />, + }, + { + key: "typescript", + label: "TypeScript", + children: ( + <LanguageCodeBlock + fetchConfigCodeSnippet={fetchConfigCodeSnippet} + invokeLlmAppCodeSnippet={invokeLlmAppCodeSnippet} + selectedLang={selectedLang} + /> + ), + icon: <FileTs size={14} />, + }, + { + key: "bash", + label: "cURL", + children: ( + <LanguageCodeBlock + fetchConfigCodeSnippet={fetchConfigCodeSnippet} + invokeLlmAppCodeSnippet={invokeLlmAppCodeSnippet} + selectedLang={selectedLang} + /> + ), + icon: <FileCode size={14} />, + }, + ]} onChange={setSelectedLang} /> ) diff --git a/web/oss/src/components/DeploymentsDashboard/assets/VariantDetailsRenderer.tsx b/web/oss/src/components/DeploymentsDashboard/assets/VariantDetailsRenderer.tsx index 51bacd3612..c5bc436619 100644 --- a/web/oss/src/components/DeploymentsDashboard/assets/VariantDetailsRenderer.tsx +++ b/web/oss/src/components/DeploymentsDashboard/assets/VariantDetailsRenderer.tsx @@ -1,28 +1,15 @@ -import {Skeleton, Typography} from "antd" +import {Typography} from "antd" +import {DeploymentRevisionWithVariant} from ".." import VariantDetailsWithStatus from "../../VariantDetailsWithStatus" -import {DeploymentRevisionWithVariant} from "../atoms" -interface VariantDetailsRendererProps { - record: DeploymentRevisionWithVariant - isLoading?: boolean - showStable?: boolean -} - -const VariantDetailsRenderer = ({ - record, - isLoading = false, - ...props -}: VariantDetailsRendererProps) => { +const VariantDetailsRenderer = ({record}: {record: DeploymentRevisionWithVariant}) => { return record.variant ? ( <VariantDetailsWithStatus variantName={record.variant?.variantName || record.variant?.name || ""} revision={record.revision} variant={record.variant} - {...props} /> - ) : isLoading ? ( - <Skeleton.Button active size="small" style={{width: 200}} /> ) : ( <Typography.Text type="danger">This variant could not be found</Typography.Text> ) diff --git a/web/oss/src/components/DeploymentsDashboard/atoms/index.ts b/web/oss/src/components/DeploymentsDashboard/atoms/index.ts deleted file mode 100644 index 6a652a7e03..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/atoms/index.ts +++ /dev/null @@ -1,162 +0,0 @@ -import {type Key} from "react" - -import {atom} from "jotai" - -import {formatDay} from "@/oss/lib/helpers/dateTimeHelper" -import {EnhancedObjectConfig} from "@/oss/lib/shared/variant/genericTransformer/types" -import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" -import {AgentaConfigPrompt} from "@/oss/lib/shared/variant/transformer/types" -import {DeploymentRevision, DeploymentRevisions} from "@/oss/lib/Types" - -import {revisionListAtom} from "../../Playground/state/atoms" - -export type DeploymentRevisionWithVariant = DeploymentRevision & { - variant: EnhancedVariant<EnhancedObjectConfig<AgentaConfigPrompt>> | undefined - environment_revision: number -} - -// ============================================================================ -// BASE STATE ATOMS -// ============================================================================ - -/** - * Search term for filtering deployment revisions - */ -export const deploymentSearchAtom = atom("") - -/** - * Selected row keys in the deployment table - */ -export const selectedDeploymentRowKeysAtom = atom<Key[]>([]) - -/** - * Deployment note for publish operations - */ -export const deploymentNoteAtom = atom("") - -/** - * Selected revision row for details and operations - */ -export const selectedRevisionRowAtom = atom<DeploymentRevisionWithVariant | undefined>(undefined) - -/** - * Selected variant revision ID for revert operations - */ -export const selectedVariantRevisionIdToRevertAtom = atom("") - -/** - * Environment revisions data (synced from props) - */ -export const envRevisionsAtom = atom<DeploymentRevisions | undefined>(undefined) - -// ============================================================================ -// UI STATE ATOMS -// ============================================================================ - -/** - * Modal states for deployment dashboard - */ -export const deploymentModalsAtom = atom({ - isDeployVariantModalOpen: false, - isSelectDeployVariantModalOpen: false, - isRevertModalOpen: false, - isUseApiDrawerOpen: false, - isRevisionsDetailsDrawerOpen: false, -}) - -// ============================================================================ -// SELECTOR ATOMS (DERIVED STATE) -// ============================================================================ - -/** - * Processed deployment revisions with variants and formatting - */ -export const processedDeploymentRevisionsAtom = atom<DeploymentRevisionWithVariant[]>((get) => { - const variants = get(revisionListAtom) || [] - const envRevisions = get(envRevisionsAtom) - - if (!envRevisions?.revisions) { - return [] - } - - return envRevisions.revisions - .sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()) - .map((rev, index) => ({ - ...rev, - created_at: formatDay({date: rev.created_at}), - variant: variants.find((variant) => variant.id === rev.deployed_app_variant_revision), - environment_revision: envRevisions.revisions?.length - ? envRevisions.revisions.length - index - : 0, - })) -}) - -/** - * Filtered deployment revisions based on search term - */ -export const filteredDeploymentRevisionsAtom = atom<DeploymentRevisionWithVariant[]>((get) => { - const revisions = get(processedDeploymentRevisionsAtom) - const searchTerm = get(deploymentSearchAtom) - - if (!searchTerm) { - return revisions - } - - return revisions.filter( - (item) => - `v${item.revision}`.toLowerCase().includes(searchTerm.toLowerCase()) || - item.commit_message?.toLowerCase().includes(searchTerm.toLowerCase()), - ) -}) - -/** - * Selected variant for deployment (derived from selected row keys) - */ -export const selectedVariantToDeployAtom = atom((get) => { - const variants = get(revisionListAtom) || [] - const selectedKeys = get(selectedDeploymentRowKeysAtom) - return variants.find((variant) => variant.id === selectedKeys[0]) -}) - -/** - * Selected variant for revert (derived from revert selection) - */ -export const selectedVariantToRevertAtom = atom((get) => { - const variants = get(revisionListAtom) || [] - const selectedVariantRevisionId = get(selectedVariantRevisionIdToRevertAtom) - return variants.find((variant) => variant.id === selectedVariantRevisionId) -}) - -// ============================================================================ -// WRITE ATOMS (ACTIONS) -// ============================================================================ - -/** - * Action to update a specific modal state - */ -export const updateModalStateAtom = atom( - null, - (get, set, update: {modal: keyof typeof deploymentModalsAtom.init; isOpen: boolean}) => { - const currentState = get(deploymentModalsAtom) - set(deploymentModalsAtom, { - ...currentState, - [update.modal]: update.isOpen, - }) - }, -) - -/** - * Action to reset all UI state (useful after successful operations) - */ -export const resetDeploymentUIStateAtom = atom(null, (get, set) => { - set(deploymentNoteAtom, "") - set(selectedDeploymentRowKeysAtom, []) - set(selectedVariantRevisionIdToRevertAtom, "") - set(deploymentModalsAtom, { - isDeployVariantModalOpen: false, - isSelectDeployVariantModalOpen: false, - isRevertModalOpen: false, - isUseApiDrawerOpen: false, - isRevisionsDetailsDrawerOpen: false, - }) -}) diff --git a/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerDetails.tsx b/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerDetails.tsx deleted file mode 100644 index c4400953b6..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerDetails.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import {ArrowSquareOut} from "@phosphor-icons/react" -import {Button, Space, Tag, Typography} from "antd" -import {useAtomValue} from "jotai" -import {useRouter} from "next/router" -import {createUseStyles} from "react-jss" - -import { - filteredDeploymentRevisionsAtom, - selectedRevisionRowAtom, -} from "@/oss/components/DeploymentsDashboard/atoms" -import {useAppId} from "@/oss/hooks/useAppId" -import {buildRevisionsQueryParam} from "@/oss/lib/helpers/url" -import {JSSTheme} from "@/oss/lib/Types" -import {variantsLoadingAtom} from "@/oss/state/variant/atoms/fetcher" - -import VariantDetailsRenderer from "../../../assets/VariantDetailsRenderer" - -const useStyles = createUseStyles((theme: JSSTheme) => ({ - title: { - fontSize: theme.fontSizeHeading5, - fontWeight: theme.fontWeightMedium, - lineHeight: theme.lineHeightHeading5, - }, - subTitle: { - fontSize: theme.fontSize, - fontWeight: theme.fontWeightMedium, - lineHeight: theme.lineHeight, - }, -})) - -interface DrawerDetailsProps { - revisionId?: string -} - -const DrawerDetails = ({revisionId}: DrawerDetailsProps) => { - const classes = useStyles() - const router = useRouter() - const appId = useAppId() - const revisions = useAtomValue(filteredDeploymentRevisionsAtom) || [] - const selectedRevisionRow = useAtomValue(selectedRevisionRowAtom) - const variantsLoading = useAtomValue(variantsLoadingAtom) - const effectiveId = - revisionId || - selectedRevisionRow?.deployed_app_variant_revision || - selectedRevisionRow?.variant?.id - const record = revisions.find( - (r) => r.deployed_app_variant_revision === effectiveId || r.variant?.id === effectiveId, - ) - - if (!record) return null - - return ( - <div className={`w-[280px] overflow-auto flex flex-col gap-4 p-4`}> - <Typography.Text className={classes.title}>Details</Typography.Text> - - <div className="flex flex-col"> - <Typography.Text className={classes.subTitle}>Variant</Typography.Text> - - <Space className="w-full items-center justify-between"> - <VariantDetailsRenderer - record={record as any} - isLoading={Boolean(variantsLoading)} - /> - - {record.variant && ( - <Button - type="default" - onClick={() => - router.push({ - pathname: `/apps/${appId}/playground`, - query: { - revisions: buildRevisionsQueryParam([record.variant?.id]), - }, - }) - } - icon={<ArrowSquareOut size={16} />} - /> - )} - </Space> - </div> - - <div className="flex flex-col"> - <Typography.Text className={classes.subTitle}>Date modified</Typography.Text> - <Tag bordered={false} className="w-fit bg-[#0517290f]"> - {record?.created_at} - </Tag> - </div> - - <div className="flex flex-col"> - <Typography.Text className={classes.subTitle}>Modified by</Typography.Text> - <Tag bordered={false} className="w-fit bg-[#0517290f]"> - {record?.modified_by} - </Tag> - </div> - - {record?.commit_message && ( - <div className="flex flex-col"> - <Typography.Text className={classes.subTitle}>Notes</Typography.Text> - <Tag bordered={false} className="w-fit bg-[#0517290f]"> - {record?.commit_message} - </Tag> - </div> - )} - </div> - ) -} - -export default DrawerDetails diff --git a/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerTitle.tsx b/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerTitle.tsx deleted file mode 100644 index b05d6d8fef..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/components/Drawer/assets/DrawerTitle.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import {useAtomValue} from "jotai" -import {createUseStyles} from "react-jss" - -import {envRevisionsAtom} from "@/oss/components/DeploymentsDashboard/atoms" -import {JSSTheme} from "@/oss/lib/Types" - -const useStyles = createUseStyles((theme: JSSTheme) => ({ - title: { - fontSize: theme.fontSizeHeading5, - fontWeight: theme.fontWeightMedium, - lineHeight: theme.lineHeightHeading5, - }, -})) - -const DrawerTitle = () => { - const classes = useStyles() - const env = useAtomValue(envRevisionsAtom) - return <div className={`flex-1 ${classes.title}`}>{env?.name || ""}</div> -} - -export default DrawerTitle diff --git a/web/oss/src/components/DeploymentsDashboard/components/Drawer/index.tsx b/web/oss/src/components/DeploymentsDashboard/components/Drawer/index.tsx index 6d7a8fe3d1..8e8b83946b 100644 --- a/web/oss/src/components/DeploymentsDashboard/components/Drawer/index.tsx +++ b/web/oss/src/components/DeploymentsDashboard/components/Drawer/index.tsx @@ -1,37 +1,39 @@ import {ComponentProps, ReactNode, useState} from "react" import {CloseOutlined, FullscreenExitOutlined, FullscreenOutlined} from "@ant-design/icons" -import {Button, Divider, Drawer} from "antd" +import {ArrowSquareOut} from "@phosphor-icons/react" +import {Button, Divider, Drawer, Space, Tag, Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" +import {useRouter} from "next/router" import {createUseStyles} from "react-jss" -import {envRevisionsAtom} from "@/oss/components/DeploymentsDashboard/atoms" import EnhancedDrawer from "@/oss/components/EnhancedUIs/Drawer" -import {usePlaygroundNavigation} from "@/oss/hooks/usePlaygroundNavigation" +import {useAppId} from "@/oss/hooks/useAppId" import {JSSTheme} from "@/oss/lib/Types" -import {revisionListAtom} from "@/oss/state/variant/selectors/variant" -import UseApiContent from "../../assets/UseApiContent" - -import DrawerDetails from "./assets/DrawerDetails" -import DrawerTitle from "./assets/DrawerTitle" +import {DeploymentRevisionWithVariant} from "../.." +import VariantDetailsRenderer from "../../assets/VariantDetailsRenderer" type DeploymentsDrawerProps = { mainContent: ReactNode - // Prefer passing envName to render title efficiently; headerContent kept for backward-compat - envName?: string headerContent?: ReactNode - // Optional: pass a revision id to render details lazily - selectedRevisionId?: string expandable?: boolean initialWidth?: number mainContentClassName?: string - drawerVariantId?: string + selectedRevisionRow?: DeploymentRevisionWithVariant } & ComponentProps<typeof Drawer> const useStyles = createUseStyles((theme: JSSTheme) => ({ - // Title and subtitle styles moved to DrawerTitle/DrawerDetails components + title: { + fontSize: theme.fontSizeHeading5, + fontWeight: theme.fontWeightMedium, + lineHeight: theme.lineHeightHeading5, + }, + subTitle: { + fontSize: theme.fontSize, + fontWeight: theme.fontWeightMedium, + lineHeight: theme.lineHeight, + }, drawerContainer: { "& .ant-drawer-body": { padding: 0, @@ -39,147 +41,147 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ }, })) -interface DeploymentsDrawerTitleProps - extends Pick< - DeploymentsDrawerProps, - "onClose" | "expandable" | "initialWidth" | "selectedRevisionId" - > { - drawerWidth: number - setDrawerWidth: (width: number) => void - envName?: string - headerContent?: ReactNode - initialWidth?: number - mainContentClassName?: string - selectedRevisionId?: string - onClose?: (e: any) => void -} - -const DeploymentsDrawerTitle = ({ - drawerWidth, - initialWidth, - setDrawerWidth, - expandable, - onClose, -}: DeploymentsDrawerTitleProps) => { - return ( - <div className="flex items-center justify-between gap-3"> - <Button onClick={() => onClose?.({} as any)} type="text" icon={<CloseOutlined />} /> - - {expandable && ( - <Button - onClick={() => { - if (drawerWidth === initialWidth) { - setDrawerWidth(1920) - } else { - setDrawerWidth(initialWidth) - } - }} - type="text" - icon={ - drawerWidth === initialWidth ? ( - <FullscreenOutlined /> - ) : ( - <FullscreenExitOutlined /> - ) - } - /> - )} - - <div className="flex-1"> - <DrawerTitle>How to use API</DrawerTitle> - </div> - </div> - ) -} - -const DeploymentsDrawerContent = ({ - mainContentClassName, - selectedRevisionId, - drawerVariantId, -}: DeploymentsDrawerProps) => { - const variants = useAtomValue(revisionListAtom) || [] - const envRevisions = useAtomValue(envRevisionsAtom) - return ( - <div className="flex h-full"> - <div className={`flex-1 overflow-auto ${mainContentClassName}`}> - <div - className={clsx([ - "[&_.ant-tabs-nav]:sticky", - "[&_.ant-tabs-nav]:px-4", - "[&_.ant-tabs-nav]:-top-[25px]", - "[&_.ant-tabs-nav]:bg-white", - "[&_.ant-tabs-nav]:z-[1]", - "[&_.ant-tabs-nav]:m-0", - "[&_.ant-tabs-content-holder]:p-4", - "h-full", - "[&_.ant-tabs]:h-full", - "[&_.ant-tabs-content]:h-full", - "[&_.ant-tabs-tabpane]:h-full", - ])} - > - {envRevisions ? ( - <UseApiContent - handleOpenSelectDeployVariantModal={() => close()} - variants={variants} - revisionId={drawerVariantId} - selectedEnvironment={envRevisions} - /> - ) : ( - <div className="p-4"> - <div className="animate-pulse h-4 w-48 bg-gray-200 rounded mb-3" /> - <div className="animate-pulse h-4 w-72 bg-gray-200 rounded mb-2" /> - <div className="animate-pulse h-4 w-64 bg-gray-200 rounded" /> - </div> - )} - </div> - </div> - {drawerVariantId && ( - <> - <Divider type="vertical" className="h-full m-0" /> - <DrawerDetails revisionId={drawerVariantId} /> - </> - )} - </div> - ) -} - const DeploymentsDrawer = ({ mainContent, headerContent, expandable = true, initialWidth = 1200, mainContentClassName = "", - selectedRevisionId, - drawerVariantId, + selectedRevisionRow, ...props }: DeploymentsDrawerProps) => { + const appId = useAppId() + const router = useRouter() const classes = useStyles() const [drawerWidth, setDrawerWidth] = useState(initialWidth) - const {goToPlayground} = usePlaygroundNavigation() return ( <EnhancedDrawer closeIcon={null} - destroyOnHidden + destroyOnClose width={drawerWidth} className={classes.drawerContainer} title={ - <DeploymentsDrawerTitle - drawerWidth={drawerWidth} - setDrawerWidth={setDrawerWidth} - headerContent={headerContent} - expandable={expandable} - initialWidth={initialWidth} - mainContentClassName={mainContentClassName} - selectedRevisionId={selectedRevisionId} - {...props} - /> + <div className="flex items-center justify-between gap-3"> + <Button + onClick={() => props.onClose?.({} as any)} + type="text" + icon={<CloseOutlined />} + /> + + {expandable && ( + <Button + onClick={() => { + if (drawerWidth === initialWidth) { + setDrawerWidth(1920) + } else { + setDrawerWidth(initialWidth) + } + }} + type="text" + icon={ + drawerWidth === initialWidth ? ( + <FullscreenOutlined /> + ) : ( + <FullscreenExitOutlined /> + ) + } + /> + )} + + <div className={`flex-1 ${classes.title}`}>{headerContent}</div> + </div> } {...props} > - <DeploymentsDrawerContent drawerVariantId={drawerVariantId}> - {mainContent} - </DeploymentsDrawerContent> + <div className="flex h-full"> + <div className={`flex-1 overflow-auto ${mainContentClassName}`}> + <div + className={clsx([ + "[&_.ant-tabs-nav]:sticky", + "[&_.ant-tabs-nav]:px-4", + "[&_.ant-tabs-nav]:-top-[25px]", + "[&_.ant-tabs-nav]:bg-white", + "[&_.ant-tabs-nav]:z-[1]", + "[&_.ant-tabs-nav]:m-0", + "[&_.ant-tabs-content-holder]:p-4", + "h-full", + "[&_.ant-tabs]:h-full", + "[&_.ant-tabs-content]:h-full", + "[&_.ant-tabs-tabpane]:h-full", + ])} + > + {mainContent} + </div> + </div> + {selectedRevisionRow && ( + <> + <Divider type="vertical" className="h-full m-0" /> + <div className={`w-[280px] overflow-auto flex flex-col gap-4 p-4`}> + <Typography.Text className={classes.title}>Details</Typography.Text> + + <div className="flex flex-col"> + <Typography.Text className={classes.subTitle}> + Variant + </Typography.Text> + + <Space className="w-full items-center justify-between"> + <VariantDetailsRenderer record={selectedRevisionRow} /> + + {selectedRevisionRow.variant && ( + <Button + type="default" + onClick={() => + router.push({ + pathname: `/apps/${appId}/playground`, + query: { + revisions: JSON.stringify([ + selectedRevisionRow.variant?.id, + ]), + }, + }) + } + icon={<ArrowSquareOut size={16} />} + /> + )} + </Space> + </div> + + <div className="flex flex-col"> + <Typography.Text className={classes.subTitle}> + Date modified + </Typography.Text> + + <Tag bordered={false} className="w-fit bg-[#0517290f]"> + {selectedRevisionRow?.created_at} + </Tag> + </div> + + <div className="flex flex-col"> + <Typography.Text className={classes.subTitle}> + Modified by + </Typography.Text> + + <Tag bordered={false} className="w-fit bg-[#0517290f]"> + {selectedRevisionRow?.modified_by} + </Tag> + </div> + + {selectedRevisionRow?.commit_message && ( + <div className="flex flex-col"> + <Typography.Text className={classes.subTitle}> + Notes + </Typography.Text> + + <Tag bordered={false} className="w-fit bg-[#0517290f]"> + {selectedRevisionRow?.commit_message} + </Tag> + </div> + )} + </div> + </> + )} + </div> </EnhancedDrawer> ) } diff --git a/web/oss/src/components/DeploymentsDashboard/components/Modal/DeploymentConfirmationModal.tsx b/web/oss/src/components/DeploymentsDashboard/components/Modal/DeploymentConfirmationModal.tsx index 0785df64de..89a7bdd647 100644 --- a/web/oss/src/components/DeploymentsDashboard/components/Modal/DeploymentConfirmationModal.tsx +++ b/web/oss/src/components/DeploymentsDashboard/components/Modal/DeploymentConfirmationModal.tsx @@ -28,44 +28,6 @@ type DeploymentConfirmationModalProps = { actionType?: "deploy" | "revert" } & ComponentProps<typeof Modal> -const DeploymentConfirmationModalContent = ({ - variant, - note, - setNote, - isDeploy, - displayNote = true, - envName, - actionType = "deploy", -}: DeploymentConfirmationModalProps) => { - const confirmationText = - actionType === "deploy" - ? "Are you sure you want to deploy" - : "Are you sure you want to revert?" - return ( - <Space direction="vertical" size={16} className="w-full"> - <Space direction="vertical" size={4}> - <Typography.Text>{confirmationText}</Typography.Text> - - {variant && ( - <VariantDetailsWithStatus - variantName={variant?.variantName || variant?.name || ""} - revision={variant?.revision} - variant={variant} - className="font-medium" - /> - )} - </Space> - {displayNote && ( - <CommitNote - note={note || ""} - setNote={setNote || (() => {})} - text={`${isDeploy ? "Deploy" : "Revert"} message`} - /> - )} - </Space> - ) -} - const DeploymentConfirmationModal = ({ variant, note, @@ -78,6 +40,9 @@ const DeploymentConfirmationModal = ({ const classes = useStyles() const isDeploy = actionType === "deploy" const actionText = isDeploy ? "Deploy" : "Revert" + const confirmationText = isDeploy + ? "Are you sure you want to deploy" + : "Are you sure you want to revert?" return ( <EnhancedModal @@ -98,14 +63,27 @@ const DeploymentConfirmationModal = ({ width={520} {...props} > - <DeploymentConfirmationModalContent - variant={variant} - note={note} - setNote={setNote} - isDeploy={isDeploy} - envName={envName} - actionType={actionType} - /> + <Space direction="vertical" size={16} className="w-full"> + <Space direction="vertical" size={4}> + <Typography.Text>{confirmationText}</Typography.Text> + + {variant && ( + <VariantDetailsWithStatus + variantName={variant?.variantName || variant?.name || ""} + revision={variant?.revision} + variant={variant} + className="font-medium" + /> + )} + </Space> + {displayNote && ( + <CommitNote + note={note || ""} + setNote={setNote || (() => {})} + text={`${actionText} message`} + /> + )} + </Space> </EnhancedModal> ) } diff --git a/web/oss/src/components/DeploymentsDashboard/components/Table/assets/getDeploymentColumns.tsx b/web/oss/src/components/DeploymentsDashboard/components/Table/assets/getDeploymentColumns.tsx index 00c485603a..ab09e88ca6 100644 --- a/web/oss/src/components/DeploymentsDashboard/components/Table/assets/getDeploymentColumns.tsx +++ b/web/oss/src/components/DeploymentsDashboard/components/Table/assets/getDeploymentColumns.tsx @@ -2,23 +2,25 @@ import {MoreOutlined} from "@ant-design/icons" import {ArrowCounterClockwise, GearSix, Lightning, Note} from "@phosphor-icons/react" import {Dropdown, Button} from "antd" import {ColumnsType} from "antd/es/table" +import {NextRouter} from "next/router" import TruncatedTooltipTag from "@/oss/components/TruncatedTooltipTag" import {DeploymentRevisions} from "@/oss/lib/Types" +import {DeploymentRevisionWithVariant} from "../../.." import VariantDetailsRenderer from "../../../assets/VariantDetailsRenderer" -import {DeploymentRevisionWithVariant} from "../../../atoms" export const getColumns = ({ + handleFetchRevisionConfig, setSelectedRevisionRow, setIsRevertModalOpen, setSelectedVariantRevisionIdToRevert, handleAssignRevisionId, envRevisions, - onOpenInPlayground, - onOpenUseApi, - isVariantLoading, + router, + appId, }: { + handleFetchRevisionConfig: (revisionId: string) => Promise<void> setSelectedRevisionRow: React.Dispatch< React.SetStateAction<DeploymentRevisionWithVariant | undefined> > @@ -26,9 +28,8 @@ export const getColumns = ({ setSelectedVariantRevisionIdToRevert: React.Dispatch<React.SetStateAction<string>> handleAssignRevisionId: (record: DeploymentRevisionWithVariant) => void envRevisions: DeploymentRevisions | undefined - onOpenInPlayground: (revisionId?: string | null) => void - onOpenUseApi: () => void - isVariantLoading?: boolean + router: NextRouter + appId: string }): ColumnsType<DeploymentRevisionWithVariant> => { const columns: ColumnsType<DeploymentRevisionWithVariant> = [ { @@ -54,13 +55,7 @@ export const getColumns = ({ style: {minWidth: 280}, }), render: (_, record) => { - return ( - <VariantDetailsRenderer - record={record} - isLoading={Boolean(isVariantLoading)} - showStable - /> - ) + return <VariantDetailsRenderer record={record} /> }, }, { @@ -71,7 +66,6 @@ export const getColumns = ({ onHeaderCell: () => ({ style: {minWidth: 280}, }), - className: "overflow-hidden text-ellipsis whitespace-nowrap max-w-[280px]", render: (_, record) => { return record.commit_message ? ( <div onClick={(e) => e.stopPropagation()}> @@ -126,29 +120,23 @@ export const getColumns = ({ icon: <Note size={16} />, onClick: (e) => { e.domEvent.stopPropagation() + handleFetchRevisionConfig(record.id) setSelectedRevisionRow(record) handleAssignRevisionId(record) }, }, - { - key: "use_api", - label: "Use API", - icon: <Lightning size={16} />, - onClick: (e) => { - e.domEvent.stopPropagation() - onOpenUseApi({ - revisionId: record?.deployed_app_variant_revision, - deploymentRevisionId: record?.id, - }) - }, - }, { key: "view_variant", label: "Open in playground", icon: <Lightning size={16} />, onClick: (e) => { e.domEvent.stopPropagation() - onOpenInPlayground(record.variant?.id) + router.push({ + pathname: `/apps/${appId}/playground`, + query: { + revisions: JSON.stringify([record.variant?.id]), + }, + }) }, disabled: !record.variant, }, diff --git a/web/oss/src/components/DeploymentsDashboard/components/Table/index.tsx b/web/oss/src/components/DeploymentsDashboard/components/Table/index.tsx index 46f6de2d68..c674de8aef 100644 --- a/web/oss/src/components/DeploymentsDashboard/components/Table/index.tsx +++ b/web/oss/src/components/DeploymentsDashboard/components/Table/index.tsx @@ -2,20 +2,20 @@ import {useCallback, useMemo} from "react" import {CloudArrowUp} from "@phosphor-icons/react" import {Table, Typography} from "antd" -import {useAtomValue} from "jotai" import Image from "next/image" +import {useRouter} from "next/router" import EmptyComponent from "@/oss/components/EmptyComponent" -import {usePlaygroundNavigation} from "@/oss/hooks/usePlaygroundNavigation" -import {useQuery, useQueryParam} from "@/oss/hooks/useQuery" +import {useAppId} from "@/oss/hooks/useAppId" +import {useQueryParam} from "@/oss/hooks/useQuery" import {DeploymentRevisions} from "@/oss/lib/Types" -import {variantsLoadingAtom} from "@/oss/state/variant/atoms/fetcher" -import {DeploymentRevisionWithVariant} from "../../atoms" +import {DeploymentRevisionWithVariant} from "../.." import {getColumns} from "./assets/getDeploymentColumns" interface DeploymentTableProps { + handleFetchRevisionConfig: (revisionId: string) => Promise<void> setSelectedRevisionRow: React.Dispatch< React.SetStateAction<DeploymentRevisionWithVariant | undefined> > @@ -24,58 +24,48 @@ interface DeploymentTableProps { setSelectedVariantRevisionIdToRevert: React.Dispatch<React.SetStateAction<string>> envRevisions: DeploymentRevisions | undefined setIsSelectDeployVariantModalOpen: (value: React.SetStateAction<boolean>) => void - onOpenUseApi: () => void - isLoading?: boolean } const DeploymentTable = ({ - revisions, - envRevisions, - isLoading, + handleFetchRevisionConfig, setSelectedRevisionRow, setIsRevertModalOpen, + revisions, setSelectedVariantRevisionIdToRevert, + envRevisions, setIsSelectDeployVariantModalOpen, - onOpenUseApi, }: DeploymentTableProps) => { - const [, updateQuery] = useQuery() - const {goToPlayground} = usePlaygroundNavigation() - const variantsLoading = useAtomValue(variantsLoadingAtom) + const [_, setQueryRevision] = useQueryParam("revisions") + const router = useRouter() + const appId = useAppId() - const handleAssignRevisionId = useCallback( - (record: DeploymentRevisionWithVariant) => { - const targetId = record.deployed_app_variant_revision ?? record.variant.id - if (targetId) { - updateQuery({revisionId: targetId, drawerType: "deployment"}) - } else { - updateQuery({revisionId: undefined, drawerType: undefined}) - } - }, - [updateQuery], - ) + const handleAssignRevisionId = useCallback((record: DeploymentRevisionWithVariant) => { + setQueryRevision( + JSON.stringify([record.deployed_app_variant_revision ?? record.variant.id]), + ) + }, []) const initialColumns = useMemo( () => getColumns({ + handleFetchRevisionConfig, setSelectedRevisionRow, setIsRevertModalOpen, setSelectedVariantRevisionIdToRevert, handleAssignRevisionId, envRevisions, - onOpenInPlayground: goToPlayground, - onOpenUseApi, - isVariantLoading: isLoading || variantsLoading, + router, + appId, }), [ + handleFetchRevisionConfig, setSelectedRevisionRow, setIsRevertModalOpen, setSelectedVariantRevisionIdToRevert, revisions, envRevisions, - goToPlayground, - onOpenUseApi, - isLoading, - variantsLoading, + router, + appId, ], ) @@ -91,11 +81,11 @@ const DeploymentTable = ({ pageSize: 15, showSizeChanger: true, }} - loading={isLoading} onRow={(record) => ({ className: "variant-table-row", style: {cursor: "pointer"}, onClick: () => { + handleFetchRevisionConfig(record.id) setSelectedRevisionRow(record) setSelectedVariantRevisionIdToRevert(record.deployed_app_variant_revision) handleAssignRevisionId(record) diff --git a/web/oss/src/components/DeploymentsDashboard/index.tsx b/web/oss/src/components/DeploymentsDashboard/index.tsx index 2412f306c5..3743b9ccf4 100644 --- a/web/oss/src/components/DeploymentsDashboard/index.tsx +++ b/web/oss/src/components/DeploymentsDashboard/index.tsx @@ -1,29 +1,26 @@ -import {type FC, useEffect} from "react" +import {type FC, type Key, useMemo, useState} from "react" import {CloudArrowUp} from "@phosphor-icons/react" -import {Button, Flex, Input, Space, Typography} from "antd" -import {useAtom, useAtomValue, useSetAtom} from "jotai" +import {Button, Flex, Input, Space, Typography, message} from "antd" +import posthog from "posthog-js" import {createUseStyles} from "react-jss" -import {openDeploymentsDrawerAtom} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentDrawerStore" -import { - openDeploymentConfirmationModalAtom, - openSelectDeployVariantModalAtom, -} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentModalsStore" -import {DeploymentRevisions} from "@/oss/lib/Types" +import {useAppId} from "@/oss/hooks/useAppId" +import {useQueryParam} from "@/oss/hooks/useQuery" +import {formatDay} from "@/oss/lib/helpers/dateTimeHelper" +import {EnhancedObjectConfig} from "@/oss/lib/shared/variant/genericTransformer/types" +import {AgentaConfigPrompt, EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" +import {DeploymentRevision, DeploymentRevisionConfig, DeploymentRevisions} from "@/oss/lib/Types" import {JSSTheme} from "@/oss/lib/Types" -import {publishMutationAtom} from "@/oss/state/deployment/atoms/publish" - -import {revisionListAtom} from "../Playground/state/atoms" - -import { - deploymentSearchAtom, - selectedRevisionRowAtom, - selectedVariantRevisionIdToRevertAtom, - envRevisionsAtom, - filteredDeploymentRevisionsAtom, - selectedVariantToRevertAtom, -} from "./atoms" +import {createPublishRevision} from "@/oss/services/deployment/api" +import {fetchAllDeploymentRevisionConfig} from "@/oss/services/deploymentVersioning/api" + +import VariantDrawer from "../VariantsComponents/Drawers/VariantDrawer" + +import UseApiContent from "./assets/UseApiContent" +import DeploymentsDrawer from "./components/Drawer" +import DeploymentConfirmationModal from "./components/Modal/DeploymentConfirmationModal" +import SelectDeployVariantModal from "./components/Modal/SelectDeployVariantModal" import DeploymentTable from "./components/Table" const useStyles = createUseStyles((theme: JSSTheme) => ({ @@ -42,113 +39,266 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ interface DeploymentsDashboardProps { envRevisions: DeploymentRevisions | undefined - isLoading: boolean + variants: EnhancedVariant[] + deployedVariant: EnhancedVariant + handleFetchAllDeploymentRevisions: (envName: string) => Promise<void> +} + +export type DeploymentRevisionWithVariant = DeploymentRevision & { + variant: EnhancedVariant<EnhancedObjectConfig<AgentaConfigPrompt>> | undefined + environment_revision: number } const DeploymentsDashboard: FC<DeploymentsDashboardProps> = ({ envRevisions, - selectedEnvName, - isLoading, + variants, + deployedVariant, + handleFetchAllDeploymentRevisions, }) => { - const {mutateAsync: publish} = useAtomValue(publishMutationAtom) + const appId = useAppId() const classes = useStyles() - // Sync envRevisions prop with atom - const setEnvRevisions = useSetAtom(envRevisionsAtom) - useEffect(() => { - setEnvRevisions(envRevisions) - }, [envRevisions, setEnvRevisions]) + const [searchTerm, setSearchTerm] = useState("") + const [queryVariant, setQueryVariant] = useQueryParam("revisions") + + const [isUseApiDrawerOpen, setIsUseApiDrawerOpen] = useState(false) + const [_isRevisionsDetailsDrawerOpen, setIsRevisionsDetailsDrawerOpen] = useState(false) + const [selectedRowKeys, setSelectedRowKeys] = useState<Key[]>([]) + const [note, setNote] = useState("") + const [isDeployVariantModalOpen, setIsDeployVariantModalOpen] = useState(false) + const [isDeployVariantLoading, setIsDeployVariantLoading] = useState(false) + const [_revisionConfig, setRevisionConfig] = useState<DeploymentRevisionConfig | null>(null) + const [isSelectDeployVariantModalOpen, setIsSelectDeployVariantModalOpen] = useState(false) + const [selectedRevisionRow, setSelectedRevisionRow] = useState<DeploymentRevisionWithVariant>() - const variants = useAtomValue(revisionListAtom) || [] + const [isRevertModalOpen, setIsRevertModalOpen] = useState(false) + const [isRevertModalLoading, setIsRevertModalLoading] = useState(false) + const [selectedVariantRevisionIdToRevert, setSelectedVariantRevisionIdToRevert] = + useState<string>("") - // Optimized state management with atoms - const [searchTerm, setSearchTerm] = useAtom(deploymentSearchAtom) - // Keep some local state for now to avoid breaking existing functionality - const [selectedRevisionRow, setSelectedRevisionRow] = useAtom(selectedRevisionRowAtom) - const [selectedVariantRevisionIdToRevert, setSelectedVariantRevisionIdToRevert] = useAtom( - selectedVariantRevisionIdToRevertAtom, + const selectedVariantToDeploy = useMemo( + () => variants.find((variant) => variant.id === selectedRowKeys[0]), + [variants, selectedRowKeys], + ) + const selectedVariantToRevert = useMemo( + () => variants.find((variant) => variant.id === selectedVariantRevisionIdToRevert), + [variants, selectedVariantRevisionIdToRevert], ) - // Global modal openers - const openSelectDeployVariantModal = useSetAtom(openSelectDeployVariantModalAtom) - const openDeploymentConfirmationModal = useSetAtom(openDeploymentConfirmationModalAtom) - const openDeploymentsDrawer = useSetAtom(openDeploymentsDrawerAtom) + const revisions = useMemo( + () => + (envRevisions?.revisions || []) + .sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()) + .map((rev, index) => ({ + ...rev, + created_at: formatDay({date: rev.created_at}), + variant: variants.find( + (variant) => variant.id === rev.deployed_app_variant_revision, + ), + environment_revision: envRevisions?.revisions?.length + ? envRevisions?.revisions?.length - index + : 0, + })), + [envRevisions, variants], + ) + + const filteredRevisions = useMemo(() => { + if (!searchTerm) return revisions + + return revisions.filter( + (item) => + `v${item.revision}`.toLowerCase().includes(searchTerm.toLowerCase()) || + item.commit_message?.toLowerCase().includes(searchTerm.toLowerCase()), + ) + }, [searchTerm, revisions]) + + const handleFetchRevisionConfig = async (revisionId: string) => { + try { + const data = await fetchAllDeploymentRevisionConfig(revisionId) + setRevisionConfig(data) + setIsRevisionsDetailsDrawerOpen(true) + } catch (error) { + console.error("Failed to fetch revision config:", error) + } + } + + const handleDeployVariant = async () => { + const revisionId = selectedRowKeys[0] as string + try { + setIsDeployVariantLoading(true) + await createPublishRevision({ + note, + revision_id: revisionId, + environment_ref: envRevisions?.name || "", + }) + await handleFetchAllDeploymentRevisions(envRevisions?.name || "") - // Atom-based computed values - const selectedVariantToRevert = useAtomValue(selectedVariantToRevertAtom) - const revisions = useAtomValue(filteredDeploymentRevisionsAtom) + message.success(`Published ${deployedVariant?.variantName} to ${envRevisions?.name}`) + posthog?.capture?.("app_deployed", {app_id: appId, environment: envRevisions?.name}) + } catch (error) { + console.error("Error deploying variant:", error) + } finally { + setNote("") + setIsDeployVariantModalOpen(false) + setSelectedRowKeys([]) + setIsSelectDeployVariantModalOpen(false) + setIsDeployVariantLoading(false) + } + } - // Deep-link handling moved to DeploymentsDrawerWrapper + const handleRevertDeployment = async () => { + try { + setIsRevertModalLoading(true) + await createPublishRevision({ + note, + revision_id: selectedVariantRevisionIdToRevert, + environment_ref: envRevisions?.name || "", + }) + await handleFetchAllDeploymentRevisions(envRevisions?.name || "") + + posthog?.capture?.("app_deployment_reverted", { + app_id: appId, + environment: envRevisions?.name, + }) + message.success( + `Published ${selectedVariantToRevert?.variantName} to ${envRevisions?.name}`, + ) + } catch (error) { + console.error("Error reverting deployment:", error) + } finally { + setNote("") + setIsRevertModalOpen(false) + setIsRevertModalLoading(false) + setSelectedVariantRevisionIdToRevert("") + setIsRevisionsDetailsDrawerOpen(false) + } + } return ( - <Space direction="vertical" size={24}> - <Flex align="center" justify="space-between"> - <Typography.Text className={classes.title}> - {envRevisions?.name || selectedEnvName} - </Typography.Text> - <Space> - <Button - icon={<CloudArrowUp />} - onClick={() => - openSelectDeployVariantModal({variants, envRevisions: envRevisions}) - } - > - Deploy variant - </Button> - <Button - type="primary" - onClick={() => envRevisions && openDeploymentsDrawer({initialWidth: 720})} - > - Use API - </Button> - </Space> - </Flex> - - <div className="flex flex-col gap-2"> - <div> - <Input.Search - value={searchTerm} - onChange={(e) => setSearchTerm(e.target.value)} - placeholder="Search" - allowClear - className="w-[400px]" + <> + <Space direction="vertical" size={24}> + <Flex align="center" justify="space-between"> + <Typography.Text className={classes.title}> + {envRevisions?.name} + </Typography.Text> + <Space> + <Button + icon={<CloudArrowUp />} + onClick={() => setIsSelectDeployVariantModalOpen(true)} + > + Deploy variant + </Button> + <Button type="primary" onClick={() => setIsUseApiDrawerOpen(true)}> + Use API + </Button> + </Space> + </Flex> + + <div className="flex flex-col gap-2"> + <div> + <Input.Search + value={searchTerm} + onChange={(e) => setSearchTerm(e.target.value)} + placeholder="Search" + allowClear + className="w-[400px]" + /> + </div> + + <DeploymentTable + revisions={filteredRevisions} + setSelectedRevisionRow={setSelectedRevisionRow} + handleFetchRevisionConfig={handleFetchRevisionConfig} + setIsRevertModalOpen={setIsRevertModalOpen} + setSelectedVariantRevisionIdToRevert={setSelectedVariantRevisionIdToRevert} + envRevisions={envRevisions} + setIsSelectDeployVariantModalOpen={setIsSelectDeployVariantModalOpen} + setQueryVariant={setQueryVariant} /> </div> + </Space> - <DeploymentTable - revisions={revisions} - setSelectedRevisionRow={setSelectedRevisionRow} - setIsRevertModalOpen={(isOpen) => { - if (!isOpen) return - const envName = envRevisions?.name || "" - openDeploymentConfirmationModal({ - envName, - actionType: "revert", - variant: selectedVariantToRevert || undefined, - onConfirm: async (noteValue) => { - await publish({ - type: "revision", - note: noteValue, - revision_id: selectedVariantRevisionIdToRevert, - environment_ref: envName, - }) - }, - }) - }} - setSelectedVariantRevisionIdToRevert={setSelectedVariantRevisionIdToRevert} - envRevisions={envRevisions} - setIsSelectDeployVariantModalOpen={() => - openSelectDeployVariantModal({variants, envRevisions: envRevisions}) + {/* Use API Drawer */} + {envRevisions && ( + <DeploymentsDrawer + mainContent={ + <UseApiContent variants={variants} selectedEnvironment={envRevisions} /> + } + headerContent={ + <Typography.Text className={classes.subTitle}> + How to use API + </Typography.Text> } - onOpenUseApi={({revisionId} = {}) => { - if (envRevisions) { - openDeploymentsDrawer({initialWidth: 720, revisionId}) - } + open={isUseApiDrawerOpen} + onClose={() => setIsUseApiDrawerOpen(false)} + initialWidth={720} + /> + )} + + {/* Revisions Details Drawer */} + <VariantDrawer + variants={variants || []} + type="deployment" + open={!!queryVariant} + onClose={() => setQueryVariant("")} + revert={{ + isDisabled: + selectedRevisionRow?.deployed_app_variant_revision === + envRevisions?.deployed_app_variant_revision_id, + onClick: () => setIsRevertModalOpen(true), + isLoading: isRevertModalLoading, + }} + /> + + {/* Select Deploy Variant Modal */} + <SelectDeployVariantModal + variants={variants} + envRevisions={envRevisions} + setIsDeployVariantModalOpen={setIsDeployVariantModalOpen} + open={isSelectDeployVariantModalOpen} + onCancel={() => { + setSelectedRowKeys([]) + setIsSelectDeployVariantModalOpen(false) + }} + setSelectedRowKeys={setSelectedRowKeys} + selectedRowKeys={selectedRowKeys} + /> + + {/* Deploy Variant Modal */} + {selectedVariantToDeploy && ( + <DeploymentConfirmationModal + open={isDeployVariantModalOpen} + onCancel={() => { + setNote("") + setIsDeployVariantModalOpen(false) }} - isLoading={isLoading} + okButtonProps={{loading: isDeployVariantLoading}} + onOk={handleDeployVariant} + note={note} + setNote={setNote} + variant={selectedVariantToDeploy} + envName={envRevisions?.name || ""} /> - </div> - </Space> + )} + + {/* Revert Deployment Modal */} + <DeploymentConfirmationModal + open={isRevertModalOpen} + onCancel={() => { + setNote("") + setIsRevertModalOpen(false) + setSelectedVariantRevisionIdToRevert("") + }} + onOk={handleRevertDeployment} + okButtonProps={{loading: isRevertModalLoading}} + note={note} + setNote={setNote} + envName={envRevisions?.name || ""} + displayNote={false} + variant={selectedVariantToRevert} + actionType="revert" + /> + </> ) } diff --git a/web/oss/src/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper.tsx b/web/oss/src/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper.tsx deleted file mode 100644 index 0163908a19..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import {useAtomValue, useSetAtom} from "jotai" - -import DeploymentConfirmationModal from "@/oss/components/DeploymentsDashboard/components/Modal/DeploymentConfirmationModal" -import { - closeDeploymentConfirmationModalAtom, - confirmDeploymentAtom, - deploymentConfirmationStateAtom, - setDeploymentNoteAtom, -} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentModalsStore" - -const DeploymentConfirmationModalWrapper = () => { - const state = useAtomValue(deploymentConfirmationStateAtom) - const close = useSetAtom(closeDeploymentConfirmationModalAtom) - const confirm = useSetAtom(confirmDeploymentAtom) - const setNote = useSetAtom(setDeploymentNoteAtom) - - return ( - <DeploymentConfirmationModal - open={state.open} - onCancel={() => close()} - envName={state.envName} - actionType={state.actionType} - variant={state.variant} - note={state.note} - setNote={(n) => setNote(n)} - okButtonProps={{loading: state.okLoading}} - onOk={() => confirm()} - /> - ) -} - -export default DeploymentConfirmationModalWrapper diff --git a/web/oss/src/components/DeploymentsDashboard/modals/DeploymentsDrawerWrapper.tsx b/web/oss/src/components/DeploymentsDashboard/modals/DeploymentsDrawerWrapper.tsx deleted file mode 100644 index 96b1f34cb6..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/modals/DeploymentsDrawerWrapper.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import {useAtom, useSetAtom} from "jotai" -import dynamic from "next/dynamic" - -import DeploymentsDrawer from "@/oss/components/DeploymentsDashboard/components/Drawer" -import { - closeDeploymentsDrawerAtom, - deploymentsDrawerStateAtom, -} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentDrawerStore" - -const DeploymentsDrawerWrapper = () => { - const [state] = useAtom(deploymentsDrawerStateAtom) - const close = useSetAtom(closeDeploymentsDrawerAtom) - - return ( - <DeploymentsDrawer - open={state.open} - onClose={() => close()} - initialWidth={state.initialWidth} - drawerVariantId={state.revisionId} - selectedRevisionId={state.deploymentRevisionId} - envName={state.envName} - /> - ) -} - -export default dynamic(() => Promise.resolve(DeploymentsDrawerWrapper), {ssr: false}) diff --git a/web/oss/src/components/DeploymentsDashboard/modals/SelectDeployVariantModalWrapper.tsx b/web/oss/src/components/DeploymentsDashboard/modals/SelectDeployVariantModalWrapper.tsx deleted file mode 100644 index 2ac851fb69..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/modals/SelectDeployVariantModalWrapper.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import {useAtomValue, useSetAtom} from "jotai" - -import SelectDeployVariantModal from "@/oss/components/DeploymentsDashboard/components/Modal/SelectDeployVariantModal" -import { - closeSelectDeployVariantModalAtom, - selectDeployVariantStateAtom, - setSelectedRowKeysAtom, -} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentModalsStore" -import {openDeploymentConfirmationModalAtom} from "@/oss/components/DeploymentsDashboard/modals/store/deploymentModalsStore" -import {publishMutationAtom} from "@/oss/state/deployment/atoms/publish" - -const SelectDeployVariantModalWrapper = () => { - const state = useAtomValue(selectDeployVariantStateAtom) - const close = useSetAtom(closeSelectDeployVariantModalAtom) - const setKeys = useSetAtom(setSelectedRowKeysAtom) - const openConfirm = useSetAtom(openDeploymentConfirmationModalAtom) - const publishMutation = useAtomValue(publishMutationAtom) - - return ( - <SelectDeployVariantModal - open={state.open} - onCancel={() => close()} - variants={state.variants} - envRevisions={state.envRevisions} - setIsDeployVariantModalOpen={() => { - const selectedId = state.selectedRowKeys[0] - const variant = state.variants.find((v: any) => v.id === selectedId) - const envName = state.envRevisions?.name || "" - // Close selector and open confirmation modal - close() - openConfirm({ - variant, - envName, - actionType: "deploy", - onConfirm: async (noteValue) => { - const revisionId = selectedId as string - await publishMutation.mutateAsync({ - type: "revision", - revision_id: revisionId, - environment_ref: envName, - note: noteValue, - }) - }, - onSuccess: () => { - // no-op for now; publish mutation invalidates queries globally - }, - successMessage: `Deployment started for ${envName}`, - }) - }} - setSelectedRowKeys={(keys) => setKeys(keys as (string | number)[])} - selectedRowKeys={state.selectedRowKeys} - /> - ) -} - -export default SelectDeployVariantModalWrapper diff --git a/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentDrawerStore.ts b/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentDrawerStore.ts deleted file mode 100644 index 84d110418c..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentDrawerStore.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" - -// Drawer state is intentionally minimal; data is derived in the wrapper - -export interface DeploymentsDrawerState { - open: boolean - initialWidth: number - revisionId: string -} - -export const deploymentsDrawerStateAtom = atomWithImmer<DeploymentsDrawerState>({ - open: false, - revisionId: "", - initialWidth: 720, -}) - -export const openDeploymentsDrawerAtom = atom( - null, - ( - get, - set, - payload?: { - initialWidth?: number - revisionId?: string - }, - ) => { - set(deploymentsDrawerStateAtom, (draft) => { - draft.open = true - if (payload?.initialWidth) draft.initialWidth = payload.initialWidth - if (payload?.revisionId) draft.revisionId = payload.revisionId - }) - }, -) - -export const closeDeploymentsDrawerAtom = atom(null, (get, set) => { - set(deploymentsDrawerStateAtom, (draft) => { - draft.open = false - }) -}) diff --git a/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentModalsStore.ts b/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentModalsStore.ts deleted file mode 100644 index 90de423bb9..0000000000 --- a/web/oss/src/components/DeploymentsDashboard/modals/store/deploymentModalsStore.ts +++ /dev/null @@ -1,143 +0,0 @@ -import {message} from "antd" -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" - -import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" -import {DeploymentRevisions} from "@/oss/lib/Types" - -import {deploymentNoteAtom} from "../../atoms" - -// Select Deploy Variant Modal State -export interface SelectDeployVariantState { - open: boolean - variants: EnhancedVariant[] - envRevisions?: DeploymentRevisions - selectedRowKeys: (string | number)[] -} - -export const selectDeployVariantStateAtom = atomWithImmer<SelectDeployVariantState>({ - open: false, - variants: [], - envRevisions: undefined, - selectedRowKeys: [], -}) - -export const openSelectDeployVariantModalAtom = atom( - null, - (get, set, payload: {variants: EnhancedVariant[]; envRevisions?: DeploymentRevisions}) => { - set(selectDeployVariantStateAtom, (draft) => { - draft.open = true - draft.variants = payload.variants - draft.envRevisions = payload.envRevisions - draft.selectedRowKeys = [] - }) - }, -) - -export const closeSelectDeployVariantModalAtom = atom(null, (get, set) => { - set(selectDeployVariantStateAtom, (draft) => { - draft.open = false - }) -}) - -export const setSelectedRowKeysAtom = atom(null, (get, set, keys: (string | number)[]) => { - set(selectDeployVariantStateAtom, (draft) => { - draft.selectedRowKeys = keys - }) -}) - -// Deployment Confirmation Modal State -export interface DeploymentConfirmationState { - open: boolean - actionType: "deploy" | "revert" - variant?: EnhancedVariant - envName: string - note: string - onConfirm?: (note: string) => Promise<void> | void - onSuccess?: () => void - successMessage?: string - okLoading?: boolean -} - -export const deploymentConfirmationStateAtom = atomWithImmer<DeploymentConfirmationState>({ - open: false, - actionType: "deploy", - envName: "", - note: "", - okLoading: false, -}) - -export const openDeploymentConfirmationModalAtom = atom( - null, - ( - get, - set, - payload: { - variant?: EnhancedVariant - envName: string - actionType?: "deploy" | "revert" - onConfirm?: (note: string) => Promise<void> | void - onSuccess?: () => void - successMessage?: string - }, - ) => { - set(deploymentConfirmationStateAtom, (draft) => { - draft.open = true - draft.variant = payload.variant - draft.envName = payload.envName - draft.actionType = payload.actionType ?? "deploy" - draft.onConfirm = payload.onConfirm - draft.onSuccess = payload.onSuccess - draft.successMessage = payload.successMessage - draft.note = get(deploymentNoteAtom) - }) - }, -) - -export const closeDeploymentConfirmationModalAtom = atom(null, (get, set) => { - set(deploymentConfirmationStateAtom, (draft) => { - draft.open = false - draft.okLoading = false - draft.note = "" - }) - set(deploymentNoteAtom, "") -}) - -export const setDeploymentNoteAtom = atom( - (get) => get(deploymentConfirmationStateAtom).note, - (get, set, note: string) => { - set(deploymentConfirmationStateAtom, (draft) => { - draft.note = note - }) - set(deploymentNoteAtom, note) - }, -) - -export const confirmDeploymentAtom = atom(null, async (get, set) => { - const state = get(deploymentConfirmationStateAtom) - if (!state.onConfirm) { - set(deploymentConfirmationStateAtom, (draft) => { - draft.open = false - }) - return - } - try { - set(deploymentConfirmationStateAtom, (draft) => { - draft.okLoading = true - }) - await state.onConfirm(state.note) - const actionText = state.actionType === "revert" ? "Reverted" : "Deployed" - const envText = state.envName ? ` in ${state.envName}` : "" - message.success(state.successMessage || `${actionText}${envText} successfully`) - state.onSuccess?.() - set(deploymentConfirmationStateAtom, (draft) => { - draft.open = false - draft.note = "" - }) - set(deploymentNoteAtom, "") - } finally { - set(deploymentConfirmationStateAtom, (draft) => { - draft.okLoading = false - }) - } -}) diff --git a/web/oss/src/components/DynamicCodeBlock/CodeBlock.tsx b/web/oss/src/components/DynamicCodeBlock/CodeBlock.tsx index f6ad149f8e..ea9d078329 100644 --- a/web/oss/src/components/DynamicCodeBlock/CodeBlock.tsx +++ b/web/oss/src/components/DynamicCodeBlock/CodeBlock.tsx @@ -1,20 +1,11 @@ -import {FC, useEffect, useMemo} from "react" +import {FC} from "react" -import {CodeNode, CodeHighlightNode, $createCodeNode} from "@lexical/code" -import { - ShikiTokenizer, - registerCodeHighlighting, - loadCodeLanguage, - loadCodeTheme, - normalizeCodeLanguage, -} from "@lexical/code-shiki" -import {LexicalComposer} from "@lexical/react/LexicalComposer" -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {ContentEditable} from "@lexical/react/LexicalContentEditable" -import {LexicalErrorBoundary} from "@lexical/react/LexicalErrorBoundary" -import {RichTextPlugin} from "@lexical/react/LexicalRichTextPlugin" -import {EditorThemeClasses, $createTextNode, $getRoot} from "lexical" +import {Typography} from "antd" import {createUseStyles} from "react-jss" +import {Prism as SyntaxHighlighter} from "react-syntax-highlighter" +import {coy, darcula} from "react-syntax-highlighter/dist/cjs/styles/prism" + +import {useAppTheme} from "../Layout/ThemeContextProvider" interface CodeBlockProps { language: string @@ -22,118 +13,28 @@ interface CodeBlockProps { } const useStyles = createUseStyles({ - container: {margin: 0}, - editor: { - fontFamily: - "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace", - fontSize: 13, - lineHeight: 1.55, - padding: 12, - borderRadius: 6, - overflowX: "auto", - background: "#FAFAFA", - outline: "none", - whiteSpace: "pre", + container: { + margin: 0, }, }) -const onError = (error: Error) => { - console.error(error) -} - -const theme: EditorThemeClasses = { - code: "agenta-dynamic-code-block", -} - -// Normalize language ids using Lexical's helper -const LANGUAGE_FALLBACKS: Record<string, string> = { - code: "python", -} - -const resolveLexicalLanguage = (language: string): string => { - const normalized = (language || "").toLowerCase() - const fallback = LANGUAGE_FALLBACKS[normalized] ?? normalized - const resolved = normalizeCodeLanguage(fallback) - return resolved || "plaintext" -} - -const ShikiHighlightPlugin: FC<{langs: string[]; themeName: string}> = ({langs, themeName}) => { - const [editor] = useLexicalComposerContext() - - useEffect(() => { - let unregister = () => {} - let cancelled = false - - ;(async () => { - try { - // Ensure theme and language are loaded into the Shiki tokenizer - await loadCodeTheme(themeName, editor) - for (const l of langs) { - await loadCodeLanguage(l, editor) - } - if (cancelled) return - unregister = registerCodeHighlighting(editor, ShikiTokenizer) - } catch (e) { - console.error("Failed to initialize Shiki highlighter", e) - } - })() - - return () => { - cancelled = true - unregister() - } - }, [editor, langs, themeName]) - - return null -} - -const InitializeContentPlugin: FC<{language: string; value: string}> = ({language, value}) => { - const [editor] = useLexicalComposerContext() - - useEffect(() => { - editor.update(() => { - const root = $getRoot() - root.clear() - const codeNode = $createCodeNode(language) - codeNode.append($createTextNode(value)) - root.append(codeNode) - }) - }, [editor, language, value]) - - return null -} - const CodeBlock: FC<CodeBlockProps> = ({language, value}) => { - const classes = useStyles() - - const lexicalLanguage = useMemo(() => resolveLexicalLanguage(language), [language]) - - const editorConfig = useMemo( - () => ({ - namespace: "AgentaCodeBlock", - onError, - editable: false, // read-only to match previous behavior - theme, - nodes: [CodeNode, CodeHighlightNode], - }), - [], - ) - - const shikiTheme = "github-light" - const shikiLang = lexicalLanguage - const langs = useMemo(() => [shikiLang], [shikiLang]) + const {Paragraph} = Typography + const {appTheme} = useAppTheme() + const classes = useStyles() return ( <div className={classes.container}> - <LexicalComposer initialConfig={editorConfig}> - <RichTextPlugin - contentEditable={<ContentEditable className={classes.editor} />} - placeholder={null} - ErrorBoundary={LexicalErrorBoundary} - /> - <InitializeContentPlugin language={lexicalLanguage} value={value} /> - <ShikiHighlightPlugin langs={langs} themeName={shikiTheme} /> - </LexicalComposer> + <Paragraph> + <SyntaxHighlighter + language={language} + style={appTheme === "dark" ? darcula : coy} + showLineNumbers + wrapLongLines={false} + > + {value} + </SyntaxHighlighter> + </Paragraph> </div> ) } diff --git a/web/oss/src/components/Editor/DiffView.tsx b/web/oss/src/components/Editor/DiffView.tsx deleted file mode 100644 index 60bd32c50d..0000000000 --- a/web/oss/src/components/Editor/DiffView.tsx +++ /dev/null @@ -1,346 +0,0 @@ -/** - * @fileoverview DiffView - Reusable diff visualization component - * - * This component provides a complete solution for comparing JSON and YAML content - * with real-time diff computation, syntax highlighting, and error handling. - * - * ## Features: - * - Supports both JSON and YAML diff visualization - * - Real-time diff computation with debouncing - * - Error handling for invalid syntax - * - Customizable styling and behavior - * - Flexible input handling (strings or objects) - * - * ## Input Format Flexibility: - * The DiffView component accepts both strings and objects with automatic format handling: - * - * ### 1. String Input (JSON or YAML) - * Pass pre-formatted strings - language will be auto-detected if not specified: - * - * **Explicit Language:** - * ```tsx - * <DiffView - * language="json" - * original='{"name": "old-service", "version": "1.0.0"}' - * modified='{"name": "new-service", "version": "1.1.0"}' - * /> - * ``` - * - * **Auto-Detection:** - * ```tsx - * <DiffView - * original='{"name": "old-service"}' // Detected as JSON - * modified="name: new-service\nversion: 1.1.0" // Detected as YAML - * /> - * ``` - * - * ### 2. Object Input - * Pass JavaScript objects directly - they'll be converted to the target format: - * - * ```tsx - * const originalObj = {name: "old-service", version: "1.0.0"} - * const modifiedObj = {name: "new-service", version: "1.1.0"} - * - * <DiffView - * language="yaml" // Objects will be converted to YAML - * original={originalObj} - * modified={modifiedObj} - * /> - * ``` - * - * ### 3. Mixed Input Types - * You can even mix strings and objects: - * - * ```tsx - * <DiffView - * language="json" - * original='{"name": "old"}' // String input - * modified={{name: "new", version: "2.0"}} // Object input - * /> - * ``` - * - * ## Internal Processing: - * 1. Content is passed as strings to the DiffHighlightPlugin - * 2. Plugin parses strings back to objects for consistent formatting - * 3. Objects are re-serialized to target format (JSON/YAML) with proper indentation - * 4. Line-by-line diff is computed and highlighted - * - * ## Language Switching: - * When switching between JSON and YAML, ensure content is converted: - * - * ```tsx - * const convertContent = (content: string, fromLang: string, toLang: string) => { - * if (fromLang === toLang) return content - * - * try { - * if (fromLang === "json" && toLang === "yaml") { - * const parsed = JSON.parse(content) - * return yaml.dump(parsed, {indent: 2}) - * } else if (fromLang === "yaml" && toLang === "json") { - * const parsed = yaml.load(content) - * return JSON.stringify(parsed, null, 2) - * } - * } catch (error) { - * console.warn(`Conversion failed:`, error) - * return toLang === "json" ? "{}" : "" - * } - * return content - * } - * ``` - * - * ## Error Handling: - * - Invalid JSON/YAML syntax shows error messages - * - Parsing errors are caught and displayed to users - * - Graceful fallback to empty content on conversion errors - * - * @example Basic Usage - * ```tsx - * <DiffView - * language="json" - * original='{"name": "old"}' - * modified='{"name": "new"}' - * className="h-96 border rounded" - * debounceMs={500} - * showErrors={true} - * /> - * ``` - */ - -import React, {useState, useEffect} from "react" - -import yaml from "js-yaml" - -import EditorWrapper from "./Editor" -import DiffHighlightPlugin from "./plugins/code/plugins/DiffHighlightPlugin" - -/** - * Detect the language of a string content - */ -function detectLanguage(content: string): "json" | "yaml" { - const trimmed = content.trim() - - // Try JSON first (more strict) - try { - JSON.parse(trimmed) - return "json" - } catch { - // Not valid JSON, check for YAML indicators - if (trimmed.includes(":") && !trimmed.startsWith("{") && !trimmed.startsWith("[")) { - return "yaml" - } - // Default to JSON for ambiguous cases - return "json" - } -} - -/** - * Normalize content to string format - */ -function normalizeContent(content: string | any, targetLanguage: "json" | "yaml"): string { - // If already a string, return as-is - if (typeof content === "string") { - return content - } - - // Convert object to target format - if (targetLanguage === "yaml") { - return yaml.dump(content, {indent: 2}) - } else { - return JSON.stringify(content, null, 2) - } -} - -/** - * Convert content between formats when language changes - */ -function convertContent( - content: string, - fromLanguage: "json" | "yaml", - toLanguage: "json" | "yaml", -): string { - if (fromLanguage === toLanguage) { - return content - } - - try { - if (fromLanguage === "json" && toLanguage === "yaml") { - const parsed = JSON.parse(content) - return yaml.dump(parsed, {indent: 2}) - } else if (fromLanguage === "yaml" && toLanguage === "json") { - const parsed = yaml.load(content) - return JSON.stringify(parsed, null, 2) - } - } catch (error) { - console.warn(`Failed to convert content from ${fromLanguage} to ${toLanguage}:`, error) - // Return empty content of target format on conversion error - return toLanguage === "json" ? "{}" : "" - } - - return content -} - -/** - * Reusable DiffView component that handles diff computation and display - */ -export interface DiffViewProps { - /** Language for diff display - if not provided, will be inferred from content */ - language?: "json" | "yaml" - /** Original content - can be string (JSON/YAML) or JavaScript object */ - original: string | any - /** Modified content - can be string (JSON/YAML) or JavaScript object */ - modified: string | any - /** Additional CSS classes */ - className?: string - /** Debounce delay for diff computation in milliseconds */ - debounceMs?: number - /** Whether to show error messages */ - showErrors?: boolean - /** Enable folding of large unchanged sections */ - enableFolding?: boolean - /** Minimum number of consecutive context lines before folding */ - foldThreshold?: number - /** Show count of folded lines in fold indicators */ - showFoldedLineCount?: boolean - /** If true, compute diff only once on mount and never debounce or recompute */ - computeOnMountOnly?: boolean -} - -function computeProcessed( - languageProp: DiffViewProps["language"], - originalProp: DiffViewProps["original"], - modifiedProp: DiffViewProps["modified"], -) { - // Normalize content to strings - const originalStr = normalizeContent(originalProp, languageProp || "json") - const modifiedStr = normalizeContent(modifiedProp, languageProp || "json") - - // Determine final language - let finalLanguage: "json" | "yaml" - if (languageProp) { - finalLanguage = languageProp - } else { - const originalLang = detectLanguage(originalStr) - const modifiedLang = detectLanguage(modifiedStr) - finalLanguage = originalLang === "yaml" || modifiedLang === "yaml" ? "yaml" : "json" - } - - // Convert content to target language if needed - let processedOriginal = originalStr - let processedModified = modifiedStr - - if (typeof originalProp === "string" && languageProp) { - const detectedOriginal = detectLanguage(originalStr) - if (detectedOriginal !== finalLanguage) { - processedOriginal = convertContent(originalStr, detectedOriginal, finalLanguage) - } - } - - if (typeof modifiedProp === "string" && languageProp) { - const detectedModified = detectLanguage(modifiedStr) - if (detectedModified !== finalLanguage) { - processedModified = convertContent(modifiedStr, detectedModified, finalLanguage) - } - } - - return { - original: processedOriginal, - modified: processedModified, - language: finalLanguage, - } -} - -const DiffView: React.FC<DiffViewProps> = ({ - language, - original, - modified, - className = "", - debounceMs = 300, - showErrors = true, - enableFolding = false, - foldThreshold = 5, - showFoldedLineCount = true, - computeOnMountOnly = false, -}) => { - const [diffKey, setDiffKey] = useState(0) - const [error, setError] = useState<string | null>(null) - const [processedContent, setProcessedContent] = useState<{ - original: string - modified: string - language: "json" | "yaml" - }>(() => computeProcessed(language, original, modified)) - - // Process content and determine language - useEffect(() => { - if (computeOnMountOnly) return - try { - setError(null) - const next = computeProcessed(language, original, modified) - setProcessedContent(next) - } catch (parseError) { - if (showErrors) { - setError(`Failed to process content. Please check your syntax.`) - } - } - }, [ - original, - modified, - language, - showErrors, - enableFolding, - foldThreshold, - showFoldedLineCount, - computeOnMountOnly, - ]) - - // Trigger diff computation with debouncing for content, immediate for folding - useEffect(() => { - if (computeOnMountOnly) return - if (debounceMs && debounceMs > 0) { - const timeout = setTimeout(() => { - setDiffKey((prev) => prev + 1) - }, debounceMs) - return () => clearTimeout(timeout) - } - // No debounce: update immediately without timeouts - setDiffKey((prev) => prev + 1) - }, [processedContent, debounceMs, computeOnMountOnly]) - - // Trigger immediate diff computation when folding options change - useEffect(() => { - if (computeOnMountOnly) return - setDiffKey((prev) => prev + 1) - }, [enableFolding, foldThreshold, showFoldedLineCount, computeOnMountOnly]) - - return ( - <div className={className}> - {error && showErrors && ( - <div className="mb-2 p-2 bg-red-50 border border-red-200 rounded text-red-700 text-sm"> - {error} - </div> - )} - <EditorWrapper - key={diffKey} - initialValue="" - language={processedContent.language} - validationSchema={{}} - additionalCodePlugins={[ - <DiffHighlightPlugin - key="diff-highlight" - originalContent={processedContent.original} - modifiedContent={processedContent.modified} - language={processedContent.language} - enableFolding={enableFolding} - foldThreshold={foldThreshold} - showFoldedLineCount={showFoldedLineCount} - />, - ]} - className="w-full" - disabled={true} - codeOnly={true} - showToolbar={false} - /> - </div> - ) -} - -export default DiffView diff --git a/web/oss/src/components/Editor/Editor.tsx b/web/oss/src/components/Editor/Editor.tsx index 1e4d8548f1..5146f1c059 100644 --- a/web/oss/src/components/Editor/Editor.tsx +++ b/web/oss/src/components/Editor/Editor.tsx @@ -1,32 +1,18 @@ -import {forwardRef, useCallback, useEffect, useRef, ReactNode, memo, useState} from "react" +import {forwardRef, useCallback, useEffect, useRef, ReactNode, memo} from "react" -import {$isCodeNode} from "@lexical/code" -import {$convertFromMarkdownString, TRANSFORMERS} from "@lexical/markdown" +import {$convertFromMarkdownString, $convertToMarkdownString, TRANSFORMERS} from "@lexical/markdown" import {LexicalComposer} from "@lexical/react/LexicalComposer" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" import {mergeRegister} from "@lexical/utils" import clsx from "clsx" -import yaml from "js-yaml" -import { - COMMAND_PRIORITY_HIGH, - COMMAND_PRIORITY_LOW, - EditorState, - LexicalEditor, - createCommand, -} from "lexical" -import {$getRoot} from "lexical" +import {COMMAND_PRIORITY_LOW, EditorState, LexicalEditor, createCommand} from "lexical" import {v4 as uuidv4} from "uuid" -import FormView from "./form/FormView" import useEditorConfig from "./hooks/useEditorConfig" import {useEditorInvariant} from "./hooks/useEditorInvariant" import {useEditorResize} from "./hooks/useEditorResize" import EditorPlugins from "./plugins" -import {createHighlightedNodes, TOGGLE_FORM_VIEW} from "./plugins/code" -import {$isCodeBlockNode} from "./plugins/code/nodes/CodeBlockNode" import {$getEditorCodeAsString} from "./plugins/code/plugins/RealTimeValidationPlugin" -import {$convertToMarkdownStringCustom} from "./plugins/markdown/assets/transformers" -import {ON_CHANGE_COMMAND} from "./plugins/markdown/commands" import type {EditorProps} from "./types" export const ON_HYDRATE_FROM_REMOTE_CONTENT = createCommand<{ @@ -67,8 +53,6 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( singleLine = false, codeOnly = false, language, - templateFormat, - customRender, showToolbar = true, enableTokens = false, debug = false, @@ -79,14 +63,10 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( boundWidth = true, // New prop boundHeight, // New prop disabled = false, - tokens = [], - additionalCodePlugins = [], ...rest }: EditorProps, ref, ) => { - // EditorWrapper implementation - useEditorInvariant({ singleLine, enableResize, @@ -96,167 +76,41 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( language, }) - const [editor] = useLexicalComposerContext() - const handleUpdate = useCallback( (editorState: EditorState, _editor: LexicalEditor) => { - editor.dispatchCommand(ON_CHANGE_COMMAND, {editorState, _editor}) - }, - [editor], - ) - - useEffect(() => { - editor.registerCommand( - ON_CHANGE_COMMAND, - (payload: {editorState: EditorState; _editor: LexicalEditor}) => { - const {editorState, _editor} = payload - editorState.read(() => { - if (!_editor.isEditable()) return false - - if (codeOnly) { - const textContent = $getEditorCodeAsString(_editor) - const result = { - value: textContent, - textContent, - tokens: [], // You can extract tokens if needed - } - if (onChange) { - onChange(result) - } - } else { - const root = $getRoot() - const firstChild = root.getFirstChild() - let textContent: string - - if ( - $isCodeNode(firstChild) && - firstChild.getLanguage() === "markdown" - ) { - textContent = firstChild.getTextContent() - } else { - textContent = $convertToMarkdownStringCustom( - TRANSFORMERS, - undefined, - true, - ) - } + editorState.read(() => { + if (!_editor.isEditable()) return - const tokens: unknown[] = [] // Extract tokens if needed - - const result = { - value: "", // Omit this for now - textContent: textContent.replaceAll(/\\(.)/g, "$1"), - tokens, - } - - if (onChange) { - onChange(result) - } + if (codeOnly) { + const textContent = $getEditorCodeAsString(_editor) + const result = { + value: textContent, + textContent, + tokens: [], // You can extract tokens if needed } - }) - return true - }, - COMMAND_PRIORITY_HIGH, - ) - }, [editor]) + if (onChange) { + onChange(result) + } + } else { + const textContent = $convertToMarkdownString(TRANSFORMERS) + const tokens: unknown[] = [] // Extract tokens if needed - const [view, setView] = useState<"code" | "form">("code") - const [jsonValue, setJsonValue] = useState<Record<string, unknown>>({}) - const lastTextRef = useRef<string>("") + const result = { + value: "", // Omit this for now + textContent: textContent.replaceAll(/\\(.)/g, "$1"), + tokens, + } - // Keep underlying code block in sync when editing in Form view - useEffect(() => { - if (view !== "form") return - editor.update(() => { - const root = $getRoot() - const block = root.getChildren().find($isCodeBlockNode) - if (!block) return - const lang = (block as any).getLanguage?.() ?? "json" - const text = - lang === "json" - ? JSON.stringify(jsonValue, null, 2) - : yaml.dump(jsonValue, {indent: 2}) - block.clear() - createHighlightedNodes(text, lang).forEach((n) => block.append(n)) - }) - // propagate to consumer - const nextText = JSON.stringify(jsonValue, null, 2) - if (onChange && lastTextRef.current !== nextText) { - lastTextRef.current = nextText - onChange({ - textContent: nextText, - value: nextText, - tokens: [], + if (onChange) { + onChange(result) + } + } }) - } - }, [jsonValue, view]) + }, + [onChange], + ) - // Register toggle command - useEffect(() => { - return mergeRegister( - editor.registerCommand( - TOGGLE_FORM_VIEW, - () => { - setView((v) => (v === "code" ? "form" : "code")) - if (view === "code") { - editor.update(() => { - const root = $getRoot() - const block = root.getChildren().find($isCodeBlockNode) - if (!block) return - const lang = (block as any).getLanguage?.() ?? "json" - const codeLines = block - .getChildren() - .map((l: any) => l.getTextContent()) - .join("\n") - try { - let obj: any - if (lang === "json") { - obj = JSON.parse(codeLines) - } else { - try { - obj = yaml.load(codeLines) - } catch (e) { - // Fallback: YAML might actually be JSON - obj = JSON.parse(codeLines) - } - } - if (obj && typeof obj === "object") { - setJsonValue(obj as Record<string, unknown>) - } - } catch { - // keep previous state to avoid empty form - } - }) - } else { - // switching from form to code: serialize current jsonValue back into code block - editor.update(() => { - const root = $getRoot() - const block = root.getChildren().find($isCodeBlockNode) - if (!block) return - const lang = (block as any).getLanguage?.() ?? "json" - const newText = - lang === "json" - ? JSON.stringify(jsonValue, null, 2) - : yaml.dump(jsonValue, {indent: 2}) - const currentText = block - .getChildren() - .map((l: any) => l.getTextContent()) - .join("\n") - if (currentText === newText) { - return // no changes, keep existing nodes - } - block.clear() - createHighlightedNodes(newText, lang).forEach((n) => - block.append(n), - ) - }) - } - return true - }, - COMMAND_PRIORITY_LOW, - ), - ) - }, [editor, view]) + const [editor] = useLexicalComposerContext() const isInitRef = useRef(false) @@ -276,14 +130,7 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( ({hydrateWithRemoteContent}) => { if (editor.isEditable() && isInitRef.current) return false isInitRef.current = true - if (hydrateWithRemoteContent) { - $convertFromMarkdownString( - hydrateWithRemoteContent, - TRANSFORMERS, - undefined, - true, - ) - } + $convertFromMarkdownString(hydrateWithRemoteContent, TRANSFORMERS) return false }, COMMAND_PRIORITY_LOW, @@ -291,15 +138,10 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( ) }, [editor]) - const lastHydratedRef = useRef<string>("") - useEffect(() => { if (codeOnly) return - const next = initialValue || "" - if (lastHydratedRef.current === next) return - lastHydratedRef.current = next editor.dispatchCommand(ON_HYDRATE_FROM_REMOTE_CONTENT, { - hydrateWithRemoteContent: next, + hydrateWithRemoteContent: initialValue || "", parentId: "", }) }, [initialValue]) @@ -321,41 +163,19 @@ const EditorInner = forwardRef<HTMLDivElement, EditorProps>( : undefined } > - {view === "code" ? ( - <EditorPlugins - id={id} - autoFocus={autoFocus} - showToolbar={showToolbar} - singleLine={singleLine} - codeOnly={codeOnly} - enableTokens={enableTokens} - debug={debug} - language={language} - templateFormat={templateFormat} - placeholder={placeholder} - handleUpdate={handleUpdate} - initialValue={initialValue} - validationSchema={validationSchema} - tokens={tokens} - additionalCodePlugins={additionalCodePlugins} - /> - ) : ( - <FormView - value={jsonValue} - onChange={(v) => { - setJsonValue(v) - }} - customRender={customRender} - /> - )} - {/* <Button - size="small" - type="text" - className="absolute top-1 right-1 z-10" - onClick={() => editor.dispatchCommand(TOGGLE_FORM_VIEW, undefined)} - > - {view === "code" ? "Form" : "Code"} - </Button> */} + <EditorPlugins + autoFocus={autoFocus} + showToolbar={showToolbar} + singleLine={singleLine} + codeOnly={codeOnly} + enableTokens={enableTokens} + debug={debug} + language={language} + placeholder={placeholder} + handleUpdate={handleUpdate} + initialValue={initialValue} + validationSchema={validationSchema} + /> {/* {!singleLine && enableResize && <div className="resize-handle" />} */} </div> </div> @@ -424,7 +244,7 @@ export const EditorProvider = ({ <div className={clsx([ "agenta-rich-text-editor", - "min-h-[70px]", + "min-h-16", "w-full", "text-[#1C2C3D] relative flex flex-col rounded-lg", { @@ -448,8 +268,6 @@ const Editor = ({ singleLine = false, codeOnly = false, language, - templateFormat, - customRender, showToolbar = true, enableTokens = false, autoFocus = false, @@ -460,8 +278,6 @@ const Editor = ({ showBorder = true, validationSchema, noProvider = false, - tokens = [], - additionalCodePlugins = [], ...rest }: EditorProps) => { const {setContainerElm, dimensions: dimension} = useEditorResize({ @@ -473,27 +289,28 @@ const Editor = ({ }) return ( - <div className="agenta-editor-wrapper w-full relative" ref={setContainerElm}> + <div + className="agenta-editor-wrapper w-full relative" + ref={(el) => { + setContainerElm(el) + }} + > {noProvider ? ( <EditorInner dimensions={dimension} id={id} - customRender={customRender} initialValue={initialValue} onChange={onChange} placeholder={placeholder} singleLine={singleLine} codeOnly={codeOnly} language={language} - templateFormat={templateFormat} showToolbar={showToolbar} enableTokens={enableTokens} debug={debug} autoFocus={autoFocus} disabled={disabled} validationSchema={validationSchema} - tokens={tokens} - additionalCodePlugins={additionalCodePlugins} /> ) : ( <EditorProvider @@ -535,7 +352,6 @@ const Editor = ({ height: "auto", } } - customRender={customRender} id={id} initialValue={initialValue} onChange={onChange} @@ -543,15 +359,12 @@ const Editor = ({ singleLine={singleLine} codeOnly={codeOnly} language={language} - templateFormat={templateFormat} showToolbar={showToolbar} enableTokens={enableTokens} debug={debug} autoFocus={autoFocus} validationSchema={validationSchema} disabled={disabled} - tokens={tokens} - additionalCodePlugins={additionalCodePlugins} /> </EditorProvider> )} diff --git a/web/oss/src/components/Editor/assets/theme.ts b/web/oss/src/components/Editor/assets/theme.ts index 57ca3da746..3d255423d9 100644 --- a/web/oss/src/components/Editor/assets/theme.ts +++ b/web/oss/src/components/Editor/assets/theme.ts @@ -1,30 +1,5 @@ -import {EditorThemeClasses} from "lexical" - -export const theme: EditorThemeClasses = { +export const theme = { code: "editor-code", - quote: "editor-quote", - placeholder: "editor-placeholder", - paragraph: "editor-paragraph", - heading: { - h1: "editor-heading-h1", - h2: "editor-heading-h2", - h3: "editor-heading-h3", - h4: "editor-heading-h4", - h5: "editor-heading-h5", - h6: "editor-heading-h6", - }, - list: { - listitem: "editor-list-item", - listitemChecked: "editor-list-item-checked", - listitemUnchecked: "editor-list-item-unchecked", - nested: { - listitem: "editor-nested-list-item", - }, - ol: "editor-list-ol", - ul: "editor-list-ul", - }, - image: "editor-image", - link: "editor-link", codeHighlight: { atrule: "editor-tokenAttr", attr: "editor-tokenAttr", @@ -57,26 +32,4 @@ export const theme: EditorThemeClasses = { url: "editor-tokenOperator", variable: "editor-tokenVariable", }, - text: { - code: "editor-text-code", - }, - table: "editor-table", - tableAddColumns: "editor-tableAddColumns", - tableAddRows: "editor-tableAddRows", - tableAlignment: { - center: "editor-tableAlignmentCenter", - right: "editor-tableAlignmentRight", - }, - tableCell: "editor-tableCell", - tableCellActionButton: "editor-tableCellActionButton", - tableCellActionButtonContainer: "editor-tableCellActionButtonContainer", - tableCellHeader: "editor-tableCellHeader", - tableCellResizer: "editor-tableCellResizer", - tableCellSelected: "editor-tableCellSelected", - tableFrozenColumn: "editor-tableFrozenColumn", - tableFrozenRow: "editor-tableFrozenRow", - tableRowStriping: "editor-tableRowStriping", - tableScrollableWrapper: "editor-tableScrollableWrapper", - tableSelected: "editor-tableSelected", - tableSelection: "editor-tableSelection", } diff --git a/web/oss/src/components/Editor/commands/InitialContentCommand.ts b/web/oss/src/components/Editor/commands/InitialContentCommand.ts deleted file mode 100644 index 4ce004b605..0000000000 --- a/web/oss/src/components/Editor/commands/InitialContentCommand.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @fileoverview Custom Lexical command for handling initial content - * - * This command allows plugins to intercept and handle initial content processing - * before the default InsertInitialCodeBlockPlugin logic runs. - */ - -import {createCommand, LexicalCommand} from "lexical" - -import type {CodeLanguage} from "../plugins/code/types" - -export interface InitialContentPayload { - /** The initial content to be processed */ - content: string - /** The language for syntax highlighting */ - language: CodeLanguage - /** Whether this content should be handled by the default plugin */ - preventDefault: () => void - /** Whether default handling has been prevented */ - isDefaultPrevented: () => boolean - /** Optional: Original content for diff computation */ - originalContent?: string - /** Optional: Modified content for diff computation */ - modifiedContent?: string - /** Optional: Flag to indicate this is a diff request */ - isDiffRequest?: boolean -} - -/** - * Command dispatched when initial content needs to be processed - * Plugins can listen to this command to handle specific content types - */ -export const INITIAL_CONTENT_COMMAND: LexicalCommand<InitialContentPayload> = - createCommand("INITIAL_CONTENT_COMMAND") diff --git a/web/oss/src/components/Editor/form/FormView.module.css b/web/oss/src/components/Editor/form/FormView.module.css deleted file mode 100644 index af54cdc52a..0000000000 --- a/web/oss/src/components/Editor/form/FormView.module.css +++ /dev/null @@ -1,390 +0,0 @@ -.form-view { - :global(.ant-typography-edit-content) { - width: auto !important; - position: static !important; - display: inline-block !important; - vertical-align: baseline !important; - margin: 0px !important; - } - - /* editable textarea styling */ - :global(.ant-typography-edit-content input), - :global(.ant-typography-edit-content textarea) { - display: inline !important; - min-width: 0px !important; - width: fit-content !important; - position: static !important; - padding: 0 !important; - margin: 0 !important; - border: none !important; - outline: none !important; - box-shadow: none !important; - background: transparent !important; - font-size: 12px !important; - min-height: 0px !important; - font-weight: 600; - line-height: 20px !important; - height: auto !important; - resize: none; - field-sizing: content; - display: none; - } -} - -/* horizontal connector for each tree row */ -.tree-row { - position: relative; -} - -.tree-row { - &::before { - content: ""; - position: absolute; - left: -10px; - top: 50%; - transform: translateY(-50%); - width: 8px; - border-top: 1px dotted #c4c4c4; - } - - &:global(.array-item) { - border-left: none; - } - border-left: 1px dashed #e5e5e5; - - :global(.object-node) { - /* > .tree-row { - border-left: none; - } */ - > .tree-row:last-of-type { - /* &::before { - display: none; - } */ - /* border-left: none; */ - } - } - - span:only-of-type { - margin-left: 4px !important; - } - - &:global(.array-item) { - margin-left: 0px !important; - padding-left: 0px !important; - - > span:first-of-type { - display: none; - } - } - - span { - margin: 0px; - } - - &:global(.no-line) { - &::before { - display: none; - } - /* border-left: none; */ - } - - &:global(.primitive):before, - &:global(.object-key):before, - &:global(.array-key):before, - &:global(.array-item-wrapper):before { - left: 0px; - width: 8px; - border-top: 1px dotted red; - } - - .tree-row { - &::before { - content: ""; - position: absolute; - left: -10px; - top: 50%; - transform: translateY(-50%); - width: 8px; - border-top: 1px dotted #c4c4c4; - } - - &:global(.array-item) { - border-left: none; - } - border-left: 1px dashed #e5e5e5; - - :global(.object-node) { - /* > .tree-row { - border-left: none; - } */ - > .tree-row:last-of-type { - /* &::before { - display: none; - } */ - /* border-left: none; */ - } - } - - span:only-of-type { - margin-left: 4px !important; - } - - &:global(.array-item) { - margin-left: 0px !important; - padding-left: 0px !important; - - > span:first-of-type { - display: none; - } - } - - span { - margin: 0px; - } - - &:global(.no-line) { - &::before { - display: none; - } - /* border-left: none; */ - } - - &:global(.primitive):before, - &:global(.object-key):before, - &:global(.array-key):before, - &:global(.array-item-wrapper):before { - left: 0px; - width: 8px; - border-top: 1px dotted red; - } - &:global(.object-node):before, - &:global(.object-item-wrapper):before, - &:global(.array-node):before, - &:global(.array-item):before { - display: none; - } - - .node-header, - &:global(.array-key) { - min-height: 34px; - - margin-left: 10px; - - span:nth-child(2), - input { - margin-left: 4px; - } - } - } - - .row-wrapper { - position: relative; - } - - .row-wrapper:hover .add-inline, - .between-hover:hover .add-between, - .on-hover:hover .add-between { - opacity: 1; - } - - .add-inline { - position: relative; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; - } - - /* New class for inline header buttons */ - .add-inline-btn { - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - width: 14px; - height: 14px; - margin-left: 4px; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; - } - - /* .row-wrapper:hover .add-inline-btn, */ - .node-header:hover .add-inline-btn { - opacity: 1; - } - - /* existing class retains */ - .add-inline { - position: relative; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; - } - - .add-between { - position: relative; - display: flex; - align-items: center; - justify-content: center; - - width: 14px; - height: 14px; - left: -3px; - top: 0; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; - - span { - margin-left: 0 !important; - &:only-of-type { - margin-left: 0 !important; - } - } - } - - .on-hover { - pointer-events: none; - position: absolute; - top: 8px; - /* calc(50% - 8px); */ - width: 14px; - height: 14px; - /* left: 0px; */ - } - .between-hover { - pointer-events: none; - position: absolute; - top: -7px; - width: 14px; - height: 14px; - /* left: 0px; */ - } - - /* editable textarea styling */ - :global(.ant-typography-edit-content input), - :global(.ant-typography-edit-content textarea) { - display: inline !important; - min-width: 0px !important; - width: fit-content !important; - position: static !important; - padding: 0 !important; - margin: 0 !important; - border: none !important; - outline: none !important; - box-shadow: none !important; - background: transparent !important; - font-size: 12px !important; - min-height: 0px !important; - font-weight: 600; - line-height: 20px !important; - height: auto !important; - resize: none; - field-sizing: content; - display: none; - } - - .node-header, - &:global(.array-key) { - min-height: 34px; - - margin-left: 10px; - - span:nth-child(2), - input { - margin-left: 4px; - } - } -} - -.row-wrapper { - position: relative; -} - -.row-wrapper:hover .add-inline, -.between-hover:hover .add-between, -.on-hover:hover .add-between { - opacity: 1; -} - -.add-inline { - position: relative; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; -} - -/* New class for inline header buttons */ -.add-inline-btn { - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - width: 14px; - height: 14px; - margin-left: 4px; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; -} - -/* .row-wrapper:hover .add-inline-btn, */ -.node-header:hover .add-inline-btn { - opacity: 1; -} - -/* existing class retains */ -.add-inline { - position: relative; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; -} - -.add-between { - position: relative; - display: flex; - align-items: center; - justify-content: center; - - width: 14px; - height: 14px; - left: -3px; - top: 0; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s; - pointer-events: auto; - - span { - margin-left: 0 !important; - &:only-of-type { - margin-left: 0 !important; - } - } -} - -.on-hover { - pointer-events: none; - position: absolute; - top: 8px; - /* calc(50% - 8px); */ - width: 14px; - height: 14px; - /* left: 0px; */ -} -.between-hover { - pointer-events: none; - position: absolute; - top: -7px; - width: 14px; - height: 14px; - /* left: 0px; */ -} diff --git a/web/oss/src/components/Editor/form/FormView.tsx b/web/oss/src/components/Editor/form/FormView.tsx deleted file mode 100644 index 0d29fb37d5..0000000000 --- a/web/oss/src/components/Editor/form/FormView.tsx +++ /dev/null @@ -1,191 +0,0 @@ -import {FC, Fragment, useState, useEffect, useCallback} from "react" - -import {Form} from "antd" -import merge from "lodash/merge" - -import styles from "./FormView.module.css" -import {CustomRenderFn} from "./nodes/NodeTypes" -import renderNode from "./nodes/renderNode" -export interface FormViewProps { - value: Record<string, unknown> - onChange: (v: Record<string, unknown>) => void - customRender?: CustomRenderFn -} - -const isPlainObject = (obj: unknown): obj is Record<string, unknown> => - typeof obj === "object" && obj !== null && !Array.isArray(obj) - -const prepareInitialValues = (obj: unknown): unknown => { - if (Array.isArray(obj)) { - return obj.map((item) => prepareInitialValues(item)) - } - if (isPlainObject(obj)) { - const out: Record<string, unknown> = {} - Object.entries(obj).forEach(([k, v]) => { - if (isPlainObject(v)) { - out[k] = prepareInitialValues(v) // keep objects nested - } else if (Array.isArray(v)) { - out[k] = v.map((item) => prepareInitialValues(item)) - } else { - out[k] = v - } - }) - return out - } - return obj -} - -// Deep-clone helper using structuredClone when available -const deepClone = <T,>(obj: T): T => - typeof structuredClone === "function" ? structuredClone(obj) : JSON.parse(JSON.stringify(obj)) - -// Rename a key in a nested object based on path -const renameKey = ( - root: Record<string, unknown>, - path: (string | number)[], - newKey: string, -): Record<string, unknown> => { - if (path.length === 0) return root - const cloned = deepClone(root) - let cursor: any = cloned - for (let i = 0; i < path.length - 1; i++) { - const seg = path[i] - cursor = cursor[seg] - if (cursor === undefined) return cloned // path invalid - } - const last = path[path.length - 1] as string - if (typeof last !== "string") return cloned // arrays not renamable - const prevKeys = Object.keys(cursor) - const reordered: Record<string, unknown> = {} - Object.entries(cursor).forEach(([key, val]) => { - if (key === last) { - reordered[newKey] = val - } else { - reordered[key] = val - } - }) - // replace object with reordered keys - Object.keys(cursor).forEach((k) => delete cursor[k]) - Object.assign(cursor, reordered) - return cloned -} - -// handleRename will be defined inside component to access form instance - -const parseMaybeJsonDeep = (val: any): any => { - if (typeof val === "string") { - const trimmed = val.trim() - if ( - (trimmed.startsWith("{") && trimmed.endsWith("}")) || - (trimmed.startsWith("[") && trimmed.endsWith("]")) - ) { - try { - return JSON.parse(trimmed) - } catch { - return val - } - } - return val - } - if (Array.isArray(val)) return val.map(parseMaybeJsonDeep) - if (isPlainObject(val)) { - const result: Record<string, unknown> = {} - Object.entries(val).forEach(([k, v]) => { - result[k] = parseMaybeJsonDeep(v) - }) - return result - } - return val -} - -const FormView: FC<FormViewProps> = ({value, onChange, customRender}) => { - const [form] = Form.useForm() - const [formValuesRef, setFormValuesRef] = useState<Record<string, unknown>>({}) - const [collapsed, setCollapsed] = useState<Set<string>>(new Set()) - const toggleFold = useCallback((key: string) => { - setCollapsed((prev) => { - const next = new Set(prev) - if (next.has(key)) next.delete(key) - else next.add(key) - return next - }) - }, []) - - useEffect(() => { - const newValues = prepareInitialValues(value) as any - setFormValuesRef(newValues) - }, [value]) - - const handleValuesChange = useCallback( - (_: any, allValues: any) => { - const merged = merge(formValuesRef, allValues) - const parsed = parseMaybeJsonDeep(merged) - onChange(parsed) - }, - [setFormValuesRef, formValuesRef], - ) - - const handleRename = useCallback( - (path: (string | number)[], newKey: string) => { - const newValues = renameKey(formValuesRef, path, newKey) - onChange(newValues) - }, - [form, formValuesRef], - ) - - useEffect(() => { - form.setFieldsValue(formValuesRef) - }, [formValuesRef]) - - const boundHandleValuesChange = useCallback( - (path: (string | number)[], newValue: any) => { - const updatedRoot = structuredClone(formValuesRef) - - // walk to parent - const parent = path.slice(0, -1).reduce<any>((acc, key) => acc[key], updatedRoot) - const lastKey = path[path.length - 1] - if (parent !== undefined) { - ;(parent as any)[lastKey as any] = newValue - onChange(updatedRoot) - } - }, - [formValuesRef, onChange], - ) - - const boundHandleRename = useCallback( - (path: (string | number)[], newKey: string) => { - handleRename(path, newKey) - }, - [handleRename], - ) - - return formValuesRef ? ( - <div className={styles["form-view"]}> - <Form - form={form} - layout="vertical" - onValuesChange={handleValuesChange} - initialValues={formValuesRef} - > - {Object.entries(formValuesRef).map(([k, v]) => ( - <Fragment key={k}> - {renderNode({ - form, - path: [k], - k, - value: v, - depth: 0, - collapsed, - toggleFold, - onChange: boundHandleValuesChange, - customRender, - handleRename: boundHandleRename, - })} - </Fragment> - ))} - </Form> - </div> - ) : null -} - -export default FormView diff --git a/web/oss/src/components/Editor/form/nodes/ArrayNode.tsx b/web/oss/src/components/Editor/form/nodes/ArrayNode.tsx deleted file mode 100644 index 7ef364e485..0000000000 --- a/web/oss/src/components/Editor/form/nodes/ArrayNode.tsx +++ /dev/null @@ -1,289 +0,0 @@ -import {FC, useCallback} from "react" - -import {PlusOutlined, DeleteOutlined} from "@ant-design/icons" -import {Input} from "antd" -import {Dropdown, Menu} from "antd" -import clsx from "clsx" - -import styles from "../FormView.module.css" -import NodeHeader from "../shared/NodeHeader" -import TreeRow from "../shared/TreeRow" - -import {BaseNodeProps} from "./NodeTypes" -import renderNode from "./renderNode" - -interface ArrayNodeProps extends BaseNodeProps { - value: unknown[] -} - -const ArrayNodeComponent: FC<ArrayNodeProps> = (props) => { - const { - form, - path, - k, - value, - - collapsed, - toggleFold, - onChange, - handleRename, - customRender, - } = props - const pathKey = [...path].join(".") - - const removeItem = useCallback( - (idx: number) => { - const currentRoot = structuredClone( - form.getFieldsValue(true) as Record<string, unknown>, - ) - const arrTarget = path.reduce((acc: any, key) => acc[key], currentRoot) as unknown[] - if (!Array.isArray(arrTarget)) return - - arrTarget.splice(idx, 1) - - onChange(path, arrTarget) - }, - [form, path, value, onChange], - ) - - const addItemWithTypeAt = useCallback( - (index: number, type: "primitive" | "object" | "array") => { - const currentRoot = structuredClone( - form.getFieldsValue(true) as Record<string, unknown>, - ) - const arrTarget = path.reduce((acc: any, key) => acc[key], currentRoot) as unknown[] - if (!Array.isArray(arrTarget)) return - const newItem = type === "object" ? {} : type === "array" ? [] : "" - arrTarget.splice(index, 0, newItem) - onChange(path, arrTarget) - }, - [form, path, onChange], - ) - - const addItemWithType = (type: "primitive" | "object" | "array") => - addItemWithTypeAt(value.length, type) - - // const insertItemBefore = useCallback( - // (idx: number) => { - // const currentRoot = structuredClone( - // form.getFieldsValue(true) as Record<string, unknown>, - // ) - // const arrTarget = path.reduce((acc: any, key) => acc[key], currentRoot) as unknown[] - // if (!Array.isArray(arrTarget)) return - - // let newItem: any = "" - // if (arrTarget.length > 0) { - // const sample = arrTarget[0] - // if (Array.isArray(sample)) newItem = [] - // else if (typeof sample === "object" && sample !== null) newItem = {} - // else if (typeof sample === "object" && sample !== null) newItem = {} - // } - // arrTarget.splice(idx, 0, newItem) - // onChange(path, arrTarget) - // }, - // [form, path, onChange], - // ) - - return ( - <div className={clsx("array-node")}> - <NodeHeader - // depth={depth} - depth={1} - folded={collapsed.has(pathKey)} - onToggle={() => toggleFold(pathKey)} - className={clsx("array-key")} - > - <Input - defaultValue={k as string} - variant="borderless" - className="w-32 text-xs font-semibold p-0" - onBlur={(e) => { - const newKey = e.target.value.trim() - if (newKey && newKey !== k) { - handleRename(path, newKey) - } - }} - /> - </NodeHeader> - {!collapsed.has(pathKey) && ( - <> - <TreeRow depth={1} className={clsx("no-line flex", "ml-2")}> - <div className={clsx(styles["between-hover"])}> - <div className={styles["add-between"]}> - <Dropdown - overlay={ - <Menu - items={[ - { - key: "primitive", - label: "Primitive", - onClick: () => - addItemWithTypeAt(0, "primitive"), - }, - { - key: "object", - label: "Object { }", - onClick: () => addItemWithTypeAt(0, "object"), - }, - { - key: "array", - label: "Array [ ]", - onClick: () => addItemWithTypeAt(0, "array"), - }, - ]} - /> - } - trigger={["click"]} - > - <PlusOutlined className="!mx-0" /> - </Dropdown> - </div> - </div> - </TreeRow> - - {value.map((item, idx) => ( - <TreeRow - key={`array-child-${idx}`} - depth={1} - className={clsx("no-line flex", "ml-2")} - > - {idx >= 0 && ( - <div className={clsx(styles["between-hover"])}> - <div className={styles["add-between"]}> - <Dropdown - overlay={ - <Menu - items={[ - { - key: "primitive", - label: "Primitive", - onClick: () => - addItemWithTypeAt(idx, "primitive"), - }, - { - key: "object", - label: "Object { }", - onClick: () => - addItemWithTypeAt(idx, "object"), - }, - { - key: "array", - label: "Array [ ]", - onClick: () => - addItemWithTypeAt(idx, "array"), - }, - ]} - /> - } - trigger={["click"]} - > - <PlusOutlined className="!mx-0" /> - </Dropdown> - </div> - </div> - )} - - <div className={styles["on-hover"]}> - <div className={styles["add-between"]}> - <DeleteOutlined onClick={() => removeItem(idx)} /> - </div> - </div> - - <TreeRow depth={2} className={clsx("array-item-wrapper flex", "ml-2")}> - {renderNode({ - form, - path: [...path, idx], - k: idx, - value: item, - // depth: depth + 1, - depth: 3, - collapsed, - className: "array-item", - toggleFold, - onChange, - handleRename, - customRender, - })} - </TreeRow> - </TreeRow> - ))} - {/* Add to Bottom Button (disabled when empty) */} - {value.length > 0 && ( - <TreeRow depth={1} className={clsx("no-line flex", "ml-2")}> - <div className={clsx(styles["between-hover"])}> - <div className={styles["add-between"]}> - <Dropdown - overlay={ - <Menu - items={[ - { - key: "primitive", - label: "Primitive", - onClick: () => addItemWithType("primitive"), - }, - { - key: "object", - label: "Object { }", - onClick: () => addItemWithType("object"), - }, - { - key: "array", - label: "Array [ ]", - onClick: () => addItemWithType("array"), - }, - ]} - /> - } - trigger={["click"]} - > - <PlusOutlined className="!mx-0" /> - </Dropdown> - </div> - </div> - </TreeRow> - )} - - {value.length === 0 && ( - <TreeRow depth={1} className={clsx("no-line flex", "ml-2")}> - <div className={clsx(styles["between-hover"])}> - <div className={styles["add-between"]}> - <Dropdown - overlay={ - <Menu - items={[ - { - key: "primitive", - label: "Primitive", - onClick: () => - addItemWithTypeAt(0, "primitive"), - }, - { - key: "object", - label: "Object { }", - onClick: () => - addItemWithTypeAt(0, "object"), - }, - { - key: "array", - label: "Array [ ]", - onClick: () => - addItemWithTypeAt(0, "array"), - }, - ]} - /> - } - trigger={["click"]} - > - <PlusOutlined className="!mx-0" /> - </Dropdown> - </div> - </div> - </TreeRow> - )} - </> - )} - </div> - ) -} - -export default ArrayNodeComponent diff --git a/web/oss/src/components/Editor/form/nodes/NodeTypes.ts b/web/oss/src/components/Editor/form/nodes/NodeTypes.ts deleted file mode 100644 index c45e1b1d18..0000000000 --- a/web/oss/src/components/Editor/form/nodes/NodeTypes.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface CustomRenderHelpers { - setValue: (newValue: any) => void - renameKey: (newKey: string) => void - renderDefault: () => React.ReactNode -} - -export type CustomRenderFn = ( - path: (string | number)[], - key: string | number, - value: unknown, - helpers: CustomRenderHelpers, -) => React.ReactNode | null | undefined - -export interface BaseNodeProps { - form: any - path: (string | number)[] - /** key being rendered (string for object, number for array index) */ - k: string | number - value: unknown - depth: number - collapsed: Set<string> - toggleFold: (key: string) => void - /** Update the value at the provided path */ - onChange: (path: (string | number)[], newValue: unknown) => void - /** Rename key at provided path */ - handleRename: (path: (string | number)[], newKey: string) => void - customRender?: CustomRenderFn - className?: string -} diff --git a/web/oss/src/components/Editor/form/nodes/ObjectNode.tsx b/web/oss/src/components/Editor/form/nodes/ObjectNode.tsx deleted file mode 100644 index 6cfbaf16ab..0000000000 --- a/web/oss/src/components/Editor/form/nodes/ObjectNode.tsx +++ /dev/null @@ -1,223 +0,0 @@ -import {type FC, Fragment, useCallback} from "react" - -import {PlusOutlined, DeleteOutlined} from "@ant-design/icons" -import {Typography} from "antd" -import {Dropdown, Menu} from "antd" -import clsx from "clsx" - -import styles from "../FormView.module.css" -import NodeHeader from "../shared/NodeHeader" -import TreeRow from "../shared/TreeRow" - -import {BaseNodeProps} from "./NodeTypes" -import renderNode from "./renderNode" - -interface ObjectNodeProps extends BaseNodeProps { - value: Record<string, unknown> -} - -const {Text} = Typography - -const ObjectNodeComponent: FC<ObjectNodeProps> = (props) => { - const { - customRender, - form, - path, - k, - value, - depth, - collapsed, - toggleFold, - onChange, - handleRename, - } = props - const pathKey = path.join(".") - - const genUniqueKey = (obj: Record<string, unknown>): string => { - let base = "newKey" - let candidate = base - let counter = 1 - while (Object.prototype.hasOwnProperty.call(obj, candidate)) { - candidate = `${base}${counter++}` - } - return candidate - } - const addKeyWithType = useCallback( - (type: "primitive" | "object" | "array") => { - const currentRoot = form.getFieldsValue(true) as Record<string, unknown> - const objTarget = path.reduce<Record<string, unknown> | undefined>( - (acc: any, key) => (acc ? acc[key] : undefined), - currentRoot, - ) - if (!objTarget || typeof objTarget !== "object") return - const newKey = genUniqueKey(objTarget) - objTarget[newKey] = type === "object" ? {} : type === "array" ? [] : "" - form.setFieldsValue(currentRoot) - onChange(path, objTarget) - }, - [form, path, onChange], - ) - - const addKey = useCallback(() => { - addKeyWithType("primitive") - }, [addKeyWithType]) - - const removeKey = useCallback( - (keyToRemove: string) => { - const currentRoot = form.getFieldsValue(true) as Record<string, unknown> - const objTarget = path.reduce<Record<string, unknown> | undefined>( - (acc: any, key) => (acc ? acc[key] : undefined), - currentRoot, - ) - if (!objTarget || typeof objTarget !== "object") return - delete objTarget[keyToRemove] - form.setFieldsValue(currentRoot) - onChange(path, objTarget) - }, - [form, path, onChange], - ) - - const insertKeyBefore = useCallback( - (before: string) => { - const currentRoot = form.getFieldsValue(true) as Record<string, unknown> - const objTarget = path.reduce<Record<string, unknown> | undefined>( - (acc: any, key) => (acc ? acc[key] : undefined), - currentRoot, - ) - if (!objTarget || typeof objTarget !== "object") return - const entries = Object.entries(objTarget) - const idx = entries.findIndex(([key]) => key === before) - if (idx === -1) { - addKey() - return - } - const newKey = genUniqueKey(objTarget) - const newObj: Record<string, unknown> = {} - entries.forEach(([key, val], i) => { - if (i === idx) { - newObj[newKey] = "" - } - newObj[key] = val - }) - // replace whole object at path - if (path.length === 0) { - Object.assign(currentRoot, newObj) - } else { - const parent = path - .slice(0, -1) - .reduce<Record<string, unknown>>((acc: any, key) => acc[key], currentRoot) - parent[path[path.length - 1]] = newObj - } - // simpler set by path: assign - path.reduce((acc: any, key, idx, arr) => { - if (idx === arr.length - 1) { - acc[key] = newObj - } - return acc[key] - }, currentRoot) - form.setFieldsValue(currentRoot) - onChange(path, newObj) - }, - [form, path, onChange], - ) - - return ( - <div className={clsx("object-node")}> - <div className={styles["row-wrapper"]} style={{position: "relative"}}> - <NodeHeader - depth={1} - folded={collapsed.has(pathKey)} - onToggle={() => toggleFold(pathKey)} - className={clsx("object-key")} - > - <div className={clsx(styles["add-inline-btn"])}> - <Dropdown - overlay={ - <Menu - items={[ - { - key: "primitive", - label: "Primitive", - onClick: () => addKeyWithType("primitive"), - }, - { - key: "object", - label: "Object { }", - onClick: () => addKeyWithType("object"), - }, - { - key: "array", - label: "Array [ ]", - onClick: () => addKeyWithType("array"), - }, - ]} - /> - } - trigger={["click"]} - > - <PlusOutlined className={styles["add-inline-btn"]} /> - </Dropdown> - </div> - - <Text - className="text-xs font-semibold leading-5 mr-1" - editable={{ - icon: null, - triggerType: ["text"], - onChange: (newKey) => { - const trimmed = newKey.trim() - if (trimmed && trimmed !== k) { - handleRename(path, trimmed) - } - }, - }} - > - {k} - </Text> - </NodeHeader> - </div> - {!collapsed.has(pathKey) && - Object.entries(value).map(([childKey, childVal], idx, arr) => ( - <Fragment key={childKey}> - <div className={styles["row-wrapper"]} style={{position: "relative"}}> - {/* <DeleteOutlined className={styles['add-inline']} onClick={() => removeKey(childKey as string)} /> */} - <TreeRow depth={1} className={clsx("object-item-wrapper flex")}> - {renderNode({ - form, - path: [...path, childKey], - k: childKey, - value: childVal, - depth: depth + 1, - collapsed, - toggleFold, - onChange, - handleRename, - customRender, - })} - {idx >= 0 && ( - <div className={clsx(styles["between-hover"])}> - <div className={styles["add-between"]}> - <PlusOutlined - className="!mx-0" - onClick={() => insertKeyBefore(childKey)} - /> - </div> - </div> - )} - - <div className={styles["on-hover"]}> - <div className={styles["add-between"]}> - <DeleteOutlined - onClick={() => removeKey(childKey as string)} - /> - </div> - </div> - </TreeRow> - </div> - </Fragment> - ))} - </div> - ) -} - -export default ObjectNodeComponent diff --git a/web/oss/src/components/Editor/form/nodes/PrimitiveNode.tsx b/web/oss/src/components/Editor/form/nodes/PrimitiveNode.tsx deleted file mode 100644 index 0cf4daec4b..0000000000 --- a/web/oss/src/components/Editor/form/nodes/PrimitiveNode.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import {type FC, type ReactNode} from "react" - -import {Form, Input, InputNumber, Switch, Typography} from "antd" -import clsx from "clsx" - -import TreeRow from "../shared/TreeRow" - -import {BaseNodeProps} from "./NodeTypes" - -export interface PrimitiveNodeProps extends BaseNodeProps { - customRender?: any -} - -const {Text} = Typography - -const PrimitiveNodeComponent: FC<PrimitiveNodeProps> = ({ - className, - path, - k, - value, - depth, - handleRename, -}) => { - let input: ReactNode = <Input.TextArea rows={3} variant="borderless" autoSize /> - - if (typeof value === "number") - input = <InputNumber style={{width: "100%", textAlign: "right"}} variant="borderless" /> - else if (typeof value === "boolean") input = <Switch /> - else if (typeof value === "string") input = <Input variant="borderless" /> - - return ( - <TreeRow depth={depth} className={clsx("primitive", className)}> - {typeof k === "number" ? ( - <Text className="text-xs font-semibold leading-5 mr-1">{k}</Text> - ) : ( - <Text - className="text-xs font-semibold leading-5 mr-1" - editable={{ - icon: null, - triggerType: ["text"], - autoSize: true, - onChange: (newKey) => { - const trimmed = newKey.trim() - if (trimmed && trimmed !== k) { - handleRename(path, trimmed) - } - }, - }} - > - {k} - </Text> - )} - <Form.Item - name={path} - style={{flex: 1, marginBottom: 0, lineHeight: "20px"}} - valuePropName={typeof value === "boolean" ? "checked" : "value"} - > - {input} - </Form.Item> - </TreeRow> - ) -} - -export default PrimitiveNodeComponent diff --git a/web/oss/src/components/Editor/form/nodes/renderNode.tsx b/web/oss/src/components/Editor/form/nodes/renderNode.tsx deleted file mode 100644 index a94c0ee3b9..0000000000 --- a/web/oss/src/components/Editor/form/nodes/renderNode.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import {type ReactNode} from "react" - -import ArrayNode from "./ArrayNode" -import {CustomRenderFn} from "./NodeTypes" -import {BaseNodeProps} from "./NodeTypes" -import ObjectNode from "./ObjectNode" -import PrimitiveNode from "./PrimitiveNode" - -const renderNode = (props: BaseNodeProps): ReactNode => { - const {customRender, path, k, value, onChange, handleRename} = props as any as { - customRender?: CustomRenderFn - path: (string | number)[] - k: string | number - value: unknown - onChange: (path: (string | number)[], v: unknown) => void - handleRename: (p: (string | number)[], nk: string) => void - } - - const buildDefaultNode = (): ReactNode => { - if (Array.isArray(value)) { - return <ArrayNode {...props} value={value} /> - } - if (typeof value === "object" && value !== null) { - return <ObjectNode {...props} value={value as Record<string, unknown>} /> - } - return <PrimitiveNode {...props} value={value} /> - } - - if (customRender) { - const helpers = { - setValue: (newValue: unknown) => onChange(path, newValue), - renameKey: (newKey: string) => handleRename(path, newKey), - renderDefault: () => buildDefaultNode(), - } - const out = customRender(path, k, value, helpers) - if (out === null) return null - if (out !== undefined) return out - } - - if (Array.isArray(value)) { - return <ArrayNode {...props} value={value} /> - } - if (typeof value === "object" && value !== null) { - return <ObjectNode {...props} value={value as Record<string, unknown>} /> - } - return <PrimitiveNode {...props} value={value} /> -} - -export default renderNode diff --git a/web/oss/src/components/Editor/form/shared/NodeHeader.tsx b/web/oss/src/components/Editor/form/shared/NodeHeader.tsx deleted file mode 100644 index 1b9294ac92..0000000000 --- a/web/oss/src/components/Editor/form/shared/NodeHeader.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import {type FC, type ReactNode, createElement} from "react" - -import {RightOutlined, DownOutlined} from "@ant-design/icons" -import clsx from "clsx" - -import styles from "../FormView.module.css" - -import TreeRow from "./TreeRow" - -interface NodeHeaderProps { - depth: number - folded: boolean - onToggle: () => void - className?: string - children: ReactNode // the label / editable key element - extra?: ReactNode // any trailing buttons (e.g., add item) -} - -/** - * Reusable header for Array/Object nodes. - * Renders caret, label, and optional trailing actions. - * Tailwind handles typography; caller decides exact label node. - */ -const NodeHeader: FC<NodeHeaderProps> = ({depth, folded, onToggle, children, extra, className}) => ( - <TreeRow depth={depth} className={clsx(styles["node-header"], className)}> - {createElement(folded ? RightOutlined : DownOutlined, { - className: "text-[10px] mr-1 cursor-pointer", - onClick: onToggle, - })} - {children} - {extra && <span className="ml-1 flex items-center">{extra}</span>} - </TreeRow> -) - -export default NodeHeader diff --git a/web/oss/src/components/Editor/form/shared/TreeRow.tsx b/web/oss/src/components/Editor/form/shared/TreeRow.tsx deleted file mode 100644 index bcbb6eec8c..0000000000 --- a/web/oss/src/components/Editor/form/shared/TreeRow.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import {type FC, type ReactNode} from "react" - -import clsx from "clsx" - -import styles from "../FormView.module.css" - -/** - * Generic wrapper for each row in the JSON tree. - * Handles indentation (depth) and shared styling. - * Tailwind is used for flex layout; the dynamic indentation remains inline - * but it is centralised here so node components no longer contain inline styles. - */ -export interface TreeRowProps { - depth: number - className?: string - children: ReactNode -} - -const INDENT_PX = 10 // matches previous implementation - -const TreeRow: FC<TreeRowProps> = ({depth, className, children}) => ( - <div - style={{paddingLeft: depth ? depth * INDENT_PX : 0, marginLeft: depth ? 4 : 0}} - className={clsx(styles["tree-row"], "flex items-center mb-0.5", className)} - > - {children} - </div> -) - -export default TreeRow diff --git a/web/oss/src/components/Editor/hooks/useEditorConfig/index.ts b/web/oss/src/components/Editor/hooks/useEditorConfig/index.ts index cadaef76a4..af92617610 100644 --- a/web/oss/src/components/Editor/hooks/useEditorConfig/index.ts +++ b/web/oss/src/components/Editor/hooks/useEditorConfig/index.ts @@ -1,4 +1,4 @@ -import {useEffect, useState} from "react" +import {useEffect, useState, useRef} from "react" import {ComponentProps} from "react" import {LexicalComposer, InitialConfigType} from "@lexical/react/LexicalComposer" @@ -10,14 +10,6 @@ import {TokenNode} from "../../plugins/token/TokenNode" import type {EditorProps} from "../../types" type LexicalComposerProps = ComponentProps<typeof LexicalComposer> -// Cache built configs keyed by variant so subsequent editors receive the -// configuration synchronously without triggering the loading placeholder. -const CONFIG_CACHE = new Map<string, InitialConfigType>() -const CONFIG_PROMISE_CACHE = new Map<string, Promise<InitialConfigType>>() - -const buildCacheKey = (codeOnly: boolean, enableTokens: boolean): string => - `${codeOnly ? "code" : "rich"}|${enableTokens ? "tok" : "plain"}` - const useEditorConfig = ({ id, initialValue, @@ -29,17 +21,13 @@ const useEditorConfig = ({ EditorProps, "id" | "initialValue" | "disabled" | "codeOnly" | "enableTokens" | "initialEditorState" >): LexicalComposerProps["initialConfig"] | null => { - const cacheKey = buildCacheKey(codeOnly, enableTokens) - - // Return cached config immediately if we already have it - const [config, setConfig] = useState<InitialConfigType | null>( - CONFIG_CACHE.get(cacheKey) ?? null, - ) + const [config, setConfig] = useState<InitialConfigType | null>(null) + const configRef = useRef<InitialConfigType | null>(null) useEffect(() => { - if (CONFIG_CACHE.has(cacheKey)) return // already cached + const loadConfig = async () => { + if (configRef.current) return - const loadConfig = async (): Promise<InitialConfigType> => { const initialNodes: (KlassConstructor<typeof LexicalNode> | typeof LexicalNode)[] = [] if (codeOnly) { @@ -48,7 +36,6 @@ const useEditorConfig = ({ import("../../plugins/code/nodes/CodeHighlightNode"), import("../../plugins/code/nodes/CodeLineNode"), import("../../plugins/code/nodes/CodeBlockErrorIndicatorNode"), - import("../../plugins/code/nodes/CodeTabNode"), ]) initialNodes.push( @@ -57,7 +44,6 @@ const useEditorConfig = ({ initialNodesPromises[1].CodeHighlightNode, initialNodesPromises[2].CodeLineNode, initialNodesPromises[3].CodeBlockErrorIndicatorNode, - initialNodesPromises[4].CodeTabNode, ], ) } else { @@ -114,21 +100,12 @@ const useEditorConfig = ({ editable: !disabled, } - // Store in caches so any concurrent/race hook calls resolve instantly - CONFIG_CACHE.set(cacheKey, newConfig) - CONFIG_PROMISE_CACHE.delete(cacheKey) + configRef.current = newConfig setConfig(newConfig) - return newConfig } - // If another hook call is already loading this variant, reuse its promise - if (CONFIG_PROMISE_CACHE.has(cacheKey)) { - CONFIG_PROMISE_CACHE.get(cacheKey)!.then((cfg) => setConfig(cfg)) - return - } - const p = loadConfig() - CONFIG_PROMISE_CACHE.set(cacheKey, p) - }, [cacheKey, codeOnly, disabled, enableTokens, id, initialEditorState]) + loadConfig() + }, [codeOnly, disabled, enableTokens, id, initialEditorState, initialValue]) return config } diff --git a/web/oss/src/components/Editor/hooks/useEditorResize.ts b/web/oss/src/components/Editor/hooks/useEditorResize.ts index 5cc9c13e20..b573f3291d 100644 --- a/web/oss/src/components/Editor/hooks/useEditorResize.ts +++ b/web/oss/src/components/Editor/hooks/useEditorResize.ts @@ -1,4 +1,4 @@ -import {useCallback, useEffect, useRef, useState} from "react" +import {useEffect, useRef, useState} from "react" import type {EditorProps} from "../types" @@ -8,25 +8,17 @@ export function useEditorResize({ boundWidth, boundHeight, skipHandle, -}: Pick<EditorProps, "singleLine" | "enableResize" | "boundWidth" | "boundHeight"> & { - skipHandle?: boolean -}) { +}: Pick<EditorProps, "singleLine" | "enableResize" | "boundWidth" | "boundHeight">) { const containerRef = useRef<HTMLDivElement>(null) const isResizing = useRef(false) const [dimensions, setDimensions] = useState({width: 0, height: 0}) - const containerElmRef = useRef<HTMLDivElement | null>(null) - - // Use useCallback to prevent unnecessary re-renders and useRef to avoid state updates - const setContainerElmCallback = useCallback((el: HTMLDivElement | null) => { - containerElmRef.current = el - }, []) - + const [containerElm, setContainerElm] = useState(null) useEffect(() => { - if ((!containerRef.current && !containerElmRef.current) || singleLine || !enableResize) { + if ((!containerRef.current && !containerElm) || singleLine || !enableResize) { return } - const container = containerRef.current || containerElmRef.current + const container = containerRef.current || containerElm const handle = container.querySelector(".resize-handle") as HTMLElement if (!skipHandle && !handle) { return @@ -42,7 +34,7 @@ export function useEditorResize({ } const resize = (e: MouseEvent) => { - if (!isResizing.current || !container?.parentElement) return + if (!isResizing.current || !container.parentElement) return const parentRect = container.parentElement.getBoundingClientRect() let width = e.clientX - parentRect.left @@ -80,7 +72,15 @@ export function useEditorResize({ document.removeEventListener("mousemove", throttledResize) document.removeEventListener("mouseup", stopResize) } - }, [skipHandle, singleLine, enableResize, boundWidth, boundHeight]) - - return {containerRef, dimensions, setContainerElm: setContainerElmCallback} + }, [ + containerElm, + skipHandle, + singleLine, + enableResize, + boundWidth, + boundHeight, + containerRef.current, + ]) + + return {containerRef, dimensions, setContainerElm} } diff --git a/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIcon.tsx b/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIcon.tsx new file mode 100644 index 0000000000..6e74fa570a --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIcon.tsx @@ -0,0 +1,18 @@ +import styles from "./assets/CodeBlockErrorIndicator.module.css" + +/** + * A visual indicator component that displays a warning icon + * when there are validation errors in the code block. + * + * Renders a warning emoji (⚠️) with styling from CodeBlockErrorIndicator.module.css + * that positions it in the top-right corner of the code block. + * + * @returns React component displaying the error indicator + */ +export function CodeBlockErrorIcon() { + return ( + <div className={styles["code-block-error-indicator"]} title="Validation error"> + ⚠️ + </div> + ) +} diff --git a/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIndicator.tsx b/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIndicator.tsx index 1cc780c305..9d6e67c866 100644 --- a/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIndicator.tsx +++ b/web/oss/src/components/Editor/plugins/code/components/CodeBlockErrorIndicator.tsx @@ -7,15 +7,9 @@ export function CodeBlockErrorIndicator({errors}: {errors: string[]}) { return ( <span ref={ref} - className="absolute top-1 right-1 text-red-600 cursor-help text-xs select-none" + className="absolute top-1 right-1 text-red-600 cursor-help text-xs" onMouseEnter={() => setHovering(true)} onMouseLeave={() => setHovering(false)} - style={{ - userSelect: "none", - WebkitUserSelect: "none", - MozUserSelect: "none", - msUserSelect: "none", - }} > ⚠️ {hovering && ( diff --git a/web/oss/src/components/Editor/plugins/code/components/assets/BracketError.css b/web/oss/src/components/Editor/plugins/code/components/assets/BracketError.css deleted file mode 100644 index ba2b934fff..0000000000 --- a/web/oss/src/components/Editor/plugins/code/components/assets/BracketError.css +++ /dev/null @@ -1,58 +0,0 @@ -/* BracketError.css */ - -/* Bracket error styling for code lines - high specificity */ -.editor-code .editor-code-line.bracket-error, -.bracket-error { - background-color: rgba(255, 0, 0, 0.2) !important; - position: relative !important; -} - -/* Use ::after pseudo-element to avoid conflict with gutter's ::before */ -.editor-code .editor-code-line.bracket-error::after, -.bracket-error::after { - content: "" !important; - position: absolute !important; - right: 0 !important; - top: 0 !important; - bottom: 0 !important; - width: 4px !important; - background-color: #ff4444 !important; - z-index: 11 !important; - pointer-events: none !important; -} - -/* Removed ::before pseudo-element that was interfering with gutter */ -/* The warning icon was positioned at left: -20px which overlapped with line numbers */ - -/* Alternative styling - red underline */ -.bracket-error-underline { - border-bottom: 2px solid #ff4444 !important; - background-color: rgba(255, 0, 0, 0.05) !important; -} - -/* Subtle bracket error styling */ -.bracket-error-subtle { - box-shadow: inset 0 0 0 1px rgba(255, 68, 68, 0.3) !important; - background-color: rgba(255, 68, 68, 0.05) !important; -} - -/* Validation error styling for code lines - orange/amber theme */ -/* Only applies to actual schema validation errors, not syntax errors */ -/* Will be skipped if line has syntax errors to avoid interference */ -.editor-code .editor-code-line.validation-error { - background-color: rgba(255, 165, 0, 0.15) !important; - position: relative !important; -} - -/* Right border indicator for validation errors - only for line-level errors */ -.editor-code .editor-code-line.validation-error::after { - content: "" !important; - position: absolute !important; - right: 0 !important; - top: 0 !important; - bottom: 0 !important; - width: 4px !important; - background-color: #ff8c00 !important; - z-index: 11 !important; - pointer-events: none !important; -} diff --git a/web/oss/src/components/Editor/plugins/code/components/assets/CodeBlockErrorIndicator.module.css b/web/oss/src/components/Editor/plugins/code/components/assets/CodeBlockErrorIndicator.module.css index 917cdadf45..a1deca325b 100644 --- a/web/oss/src/components/Editor/plugins/code/components/assets/CodeBlockErrorIndicator.module.css +++ b/web/oss/src/components/Editor/plugins/code/components/assets/CodeBlockErrorIndicator.module.css @@ -4,25 +4,10 @@ right: 0.25rem; font-size: 1rem; z-index: 20; - color: #dc2626; + color: red; cursor: help; - background: rgba(254, 226, 226, 0.9); - border: 1px solid rgba(220, 38, 38, 0.3); - border-radius: 50%; - width: 20px; - height: 20px; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s ease; - backdrop-filter: blur(2px); -} - -.code-block-error-icon:hover { - background: rgba(254, 226, 226, 1); - border-color: rgba(220, 38, 38, 0.5); - transform: scale(1.1); - box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2); + z-index: 20; + background: orange; } .code-block-error-tooltip { @@ -32,20 +17,13 @@ background-color: #fff8f8; color: #d00000; border: 1px solid #faa; - border-radius: 6px; - padding: 0.75rem; + border-radius: 4px; + padding: 0.5rem; font-size: 0.875rem; white-space: pre-wrap; - max-width: 320px; - min-width: 200px; - box-shadow: - 0 8px 24px rgba(0, 0, 0, 0.15), - 0 4px 8px rgba(0, 0, 0, 0.1); - z-index: 9999; - backdrop-filter: blur(8px); - border: 1px solid rgba(220, 38, 38, 0.2); - font-weight: 500; - line-height: 1.4; + max-width: 300px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + z-index: 30; } .code-block-error-tooltip-inner { @@ -53,39 +31,3 @@ margin-top: 0.25rem; } } - -.editor-code-line, -.editor-code-highlight { - /* Validation error highlighting for individual tokens */ - &:global(.validation-error) { - /* Subtle background with gradient */ - background: linear-gradient( - 135deg, - rgba(220, 38, 38, 0.08) 0%, - rgba(220, 38, 38, 0.12) 100% - ); - - /* Enhanced wavy underline */ - border-bottom: 2px wavy #dc2626; - - /* Subtle text color adjustment */ - color: #b91c1c; - - /* Positioning for pseudo-elements */ - position: relative; - - /* Subtle border radius for modern look */ - border-radius: 2px; - } -} - -/* Subtle pulsing animation for unclosed blocks */ -@keyframes unclosed-block-pulse { - 0%, - 100% { - opacity: 1; - } - 50% { - opacity: 0.8; - } -} diff --git a/web/oss/src/components/Editor/plugins/code/components/assets/DiffCodeBlock.module.css b/web/oss/src/components/Editor/plugins/code/components/assets/DiffCodeBlock.module.css deleted file mode 100644 index d10a0f333c..0000000000 --- a/web/oss/src/components/Editor/plugins/code/components/assets/DiffCodeBlock.module.css +++ /dev/null @@ -1,86 +0,0 @@ -.editor-code-diff-line { - /* Diff highlighting styles */ - &:global(.diff-added) { - background-color: rgba(34, 197, 94, 0.1); - border-left: 3px solid #22c55e; - padding-left: 8px; - position: relative; - } - - &:global(.diff-added::before) { - content: "+"; - color: #22c55e; - font-weight: bold; - margin-right: 8px; - display: inline-block; - /* width: 16px; */ - position: absolute; - /* left: -20px; */ - /* top: 0; */ - line-height: inherit; - } - - &:global(.diff-removed) { - background-color: rgba(239, 68, 68, 0.1); - border-left: 3px solid #ef4444; - padding-left: 8px; - position: relative; - } - - &:global(.diff-removed::before) { - content: "-"; - color: #ef4444; - font-weight: bold; - margin-right: 8px; - display: inline-block; - /* width: 16px; */ - position: absolute; - /* left: -20px; */ - /* top: 0; */ - line-height: inherit; - } - - &:global(.diff-context) { - background-color: #f9f9fa; - border-left: 3px solid var(--editor-bg); - padding-left: 8px; - position: relative; - } - - &:global(.diff-fold) { - background-color: rgba(99, 102, 241, 0.08); - border-left: 3px solid #6366f1; - padding-left: 8px; - position: relative; - font-style: italic; - color: #6366f1; - text-align: center; - cursor: pointer; - user-select: none; - } - - /* Fold lines don't show line numbers - the fold message is self-explanatory */ - &:global(.diff-fold)::before { - content: "" !important; - display: none !important; - } - - /* Ensure no line number display for fold lines */ - &:global(.diff-fold[data-old-line-number])::before, - &:global(.diff-fold[data-new-line-number])::before { - content: "" !important; - display: none !important; - } - - /* Fold symbol - use ::after for the ellipsis */ - &:global(.diff-fold)::after { - content: "⋯" !important; - color: #6366f1; - font-weight: bold; - margin-right: 8px; - display: inline-block; - position: absolute; - left: 8px; - line-height: inherit; - } -} diff --git a/web/oss/src/components/Editor/plugins/code/components/test.json b/web/oss/src/components/Editor/plugins/code/components/test.json new file mode 100644 index 0000000000..28baa9b462 --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/components/test.json @@ -0,0 +1,3 @@ +{ + "long": "Adipisicing amet non occaecat aliquip sunt ut dolor. Eiusmod consequat eiusmod aliqua minim veniam ipsum fugiat dolor. Anim cillum proident nulla enim anim sunt pariatur dolore Lorem. Ipsum aliquip consectetur irure est. Mollit proident ex pariatur dolore nulla ullamco non eu proident. Est pariatur magna velit magna consequat ut ut commodo et reprehenderit aute esse dolor." +} \ No newline at end of file diff --git a/web/oss/src/components/Editor/plugins/code/index.tsx b/web/oss/src/components/Editor/plugins/code/index.tsx index ba7f7e1725..334486e49c 100644 --- a/web/oss/src/components/Editor/plugins/code/index.tsx +++ b/web/oss/src/components/Editor/plugins/code/index.tsx @@ -1,121 +1,58 @@ // Editor.tsx -import {Fragment, type ComponentProps, type FC, memo, useEffect, useRef} from "react" +import {memo, useEffect} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" import {mergeRegister} from "@lexical/utils" import isEqual from "fast-deep-equal" import {createStore, atom} from "jotai" -import yaml from "js-yaml" import JSON5 from "json5" import { $getRoot, + $createTabNode, COMMAND_PRIORITY_LOW, createCommand, BLUR_COMMAND, FOCUS_COMMAND, $setSelection, - LexicalNode, } from "lexical" -import {safeJson5Parse} from "@/oss/lib/helpers/utils" - -import {INITIAL_CONTENT_COMMAND, InitialContentPayload} from "../../commands/InitialContentCommand" - -export const store = createStore() +const store = createStore() import {$createCodeBlockNode, $isCodeBlockNode} from "./nodes/CodeBlockNode" import {$createCodeHighlightNode} from "./nodes/CodeHighlightNode" -import {$createCodeLineNode, CodeLineNode, $isCodeLineNode} from "./nodes/CodeLineNode" -import {$createCodeTabNode, $isCodeTabNode} from "./nodes/CodeTabNode" +import {$createCodeLineNode, CodeLineNode} from "./nodes/CodeLineNode" import {AutoCloseBracketsPlugin} from "./plugins/AutoCloseBracketsPlugin" import {AutoFormatAndValidateOnPastePlugin} from "./plugins/AutoFormatAndValidateOnPastePlugin" -import {ClosingBracketIndentationPlugin} from "./plugins/ClosingBracketIndentationPlugin" -import {GlobalErrorIndicatorPlugin} from "./plugins/GlobalErrorIndicatorPlugin" +import {CodeBlockFoldingPlugin} from "./plugins/CodeBlockFoldingPlugin" +import {EmptyNodeTransformPlugin} from "./plugins/EmptyNodeTransformPlugin" +import {HorizontalNavigationPlugin} from "./plugins/HorizontalNavigationPlugin" import {IndentationPlugin} from "./plugins/IndentationPlugin" -import {$getEditorCodeAsString} from "./plugins/RealTimeValidationPlugin" +import {$getEditorCodeAsString, RealTimeValidationPlugin} from "./plugins/RealTimeValidationPlugin" import {SyntaxHighlightPlugin} from "./plugins/SyntaxHighlightPlugin" -import VerticalNavigationPlugin from "./plugins/VerticalNavigationPlugin" +import {VerticalNavigationPlugin} from "./plugins/VerticalNavigationPlugin" import {tryParsePartialJson} from "./tryParsePartialJson" import {createLogger} from "./utils/createLogger" import {tokenizeCodeLine} from "./utils/tokenizer" -export const TOGGLE_FORM_VIEW = createCommand<void>("TOGGLE_FORM_VIEW") - export const ON_CHANGE_LANGUAGE = createCommand<{ language: string }>("ON_CHANGE_LANGUAGE") -export const editorStateAtom = atom({ +const editorStateAtom = atom({ focused: false, }) store.set(editorStateAtom, {focused: false}) -const log = createLogger("Code Editor", { - disabled: true, -}) - -/** - * Simple validation function for JSON tokens - */ -function getTokenValidation( - text: string, - tokenType: string, - language: string, -): {shouldHaveError: boolean; expectedMessage: string | null} { - // JSON syntax validation for unquoted property names - if (language === "json" && tokenType === "plain") { - // Check if this looks like a property name (not a value) - if ( - text !== "" && - !Number(text) && - text !== "true" && - text !== "false" && - text !== "null" - ) { - return { - shouldHaveError: true, - expectedMessage: "Property names must be wrapped in double quotes", - } - } - } - return {shouldHaveError: false, expectedMessage: null} -} - -/** - * Applies validation errors to code line nodes during initial content creation. - * Uses the unified ValidationManager for consistent validation. - * - * @param codeLineNodes The array of code line nodes to apply validation to. - * @param text The original text content. - * @param validationSchema The schema to validate against. - * @param editor The Lexical editor instance. - */ -function applyValidationToNodes( - codeLineNodes: CodeLineNode[], - text: string, - validationSchema: any, - editor?: any, -): void { - // Note: Validation is now handled automatically by the GlobalErrorIndicatorPlugin - // which listens to content changes and applies validation styling per editor instance. - // No need to manually trigger validation during initial content creation. -} - +const log = createLogger("Code Editor") /** * Creates an array of highlighted code line nodes from a given text and language. * * @param text The input text to highlight. * @param language The language to use for highlighting. - * @param validationSchema Optional schema for validation during node creation. * @returns An array of highlighted code line nodes. */ -export function createHighlightedNodes( - text: string, - language: "json" | "yaml", - validationSchema?: any, - editor?: any, -): CodeLineNode[] { +export function createHighlightedNodes(text: string, language: string): CodeLineNode[] { // For JSON, avoid splitting on \n inside string values if (language === "json") { try { @@ -136,30 +73,17 @@ export function createHighlightedNodes( const codeLine = $createCodeLineNode() let content = line while (content.startsWith(" ")) { - codeLine.append($createCodeTabNode()) + codeLine.append($createTabNode()) content = content.substring(2) } const tokens = tokenizeCodeLine(content, language) tokens.forEach((token) => { - const {shouldHaveError, expectedMessage} = getTokenValidation( - token.content.trim(), - token.type, - language, - ) - const highlightNode = $createCodeHighlightNode( - token.content, - token.type, - shouldHaveError, - expectedMessage, - ) + const highlightNode = $createCodeHighlightNode(token.content) + highlightNode.setHighlightType(token.type) codeLine.append(highlightNode) }) codeLineNodes.push(codeLine) }) - // Run validation if schema is provided - if (validationSchema && editor.isEditable()) { - applyValidationToNodes(codeLineNodes, text, validationSchema, editor) - } return codeLineNodes } catch (e) { // If invalid JSON, fallback to generic line splitting below @@ -172,32 +96,17 @@ export function createHighlightedNodes( const codeLine = $createCodeLineNode() let content = line while (content.startsWith(" ")) { - codeLine.append($createCodeTabNode()) + codeLine.append($createTabNode()) content = content.substring(2) } const tokens = tokenizeCodeLine(content, language) tokens.forEach((token) => { - const {shouldHaveError, expectedMessage} = getTokenValidation( - token.content.trim(), - token.type, - language, - ) - const highlightNode = $createCodeHighlightNode( - token.content, - token.type, - shouldHaveError, - expectedMessage, - ) + const highlightNode = $createCodeHighlightNode(token.content) + highlightNode.setHighlightType(token.type) codeLine.append(highlightNode) }) codeLineNodes.push(codeLine) }) - - // Run validation if schema is provided - if (validationSchema && editor.isEditable()) { - applyValidationToNodes(codeLineNodes, text, validationSchema, editor) - } - return codeLineNodes } /** @@ -209,275 +118,136 @@ export function createHighlightedNodes( * 3. Ensures the editor always has a valid code block to edit */ function InsertInitialCodeBlockPlugin({ - debug = false, + debug, initialValue, language = "json", validationSchema, - additionalCodePlugins = [], - editorId, }: { debug?: boolean initialValue: string language?: "json" | "yaml" validationSchema: any - additionalCodePlugins?: React.ReactNode[] - editorId: string }) { const [editor] = useLexicalComposerContext() // const isInitRef = useRef(false) - const prevInitialRef = useRef<string | undefined>(undefined) - useEffect(() => { - return mergeRegister( - editor.registerCommand( - INITIAL_CONTENT_COMMAND, - (payload) => { - // If another plugin handled the content, skip default processing - if (payload.isDefaultPrevented()) { - return false // Command not handled by this plugin - } - - // Default JSON/YAML processing - editor.update(() => { - const hasFocus = store.get(editorStateAtom)?.focused - const root = $getRoot() - let existingCodeBlock = root.getChildren().find($isCodeBlockNode) - - if (!existingCodeBlock) { - log("INITIAL VALUE CHANGED - CREATE NEW CODE BLOCK") - root.clear() - existingCodeBlock = $createCodeBlockNode(payload.language) - const line = $createCodeLineNode() - existingCodeBlock.append(line) + log("INITIAL VALUE CHANGED", {initialValue}) + editor.update( + () => { + const hasFocus = store.get(editorStateAtom)?.focused + const root = $getRoot() + let existingCodeBlock = root.getChildren().find($isCodeBlockNode) + + if (!existingCodeBlock) { + root.clear() + existingCodeBlock = $createCodeBlockNode(language) + const line = $createCodeLineNode() + const highlightNode = $createCodeHighlightNode("\u200B", "plain", false, null) + + line.append(highlightNode) + existingCodeBlock.append(line) + + root.append(existingCodeBlock) + } else if (hasFocus) { + return + } - root.append(existingCodeBlock) - line.selectStart() - } else if (hasFocus && editor.isEditable()) { - // Don't update if editor has focus and is editable (user is typing) - // But allow updates for read-only editors (like diff view) + // isInitRef.current = true + const currentTextValue = $getEditorCodeAsString() + root.getTextContent() + if (currentTextValue) { + try { + const currentObjectValue = JSON5.parse(currentTextValue) + const incomingObjectValue = + typeof initialValue === "string" + ? JSON5.parse(initialValue) + : initialValue + if (isEqual(currentObjectValue, incomingObjectValue)) { + log("DO NOT CLEAR AND RECONSTRUCT 1", {initialValue, currentTextValue}) return } - - // Default processing for JSON/YAML content - const currentTextValue = $getEditorCodeAsString() - log("INITIAL VALUE CHANGED - CURRENT TEXT VALUE", {currentTextValue}) - if (currentTextValue) { - try { - const currentObjectValue = JSON5.parse(currentTextValue) - const incomingObjectValue = - typeof payload.content === "string" - ? JSON5.parse(payload.content) - : payload.content - if (isEqual(currentObjectValue, incomingObjectValue)) { - log("DO NOT CLEAR AND RECONSTRUCT 1", { - content: payload.content, - currentTextValue, - }) - return - } - } catch (e) { - try { - const currentObject = tryParsePartialJson(currentTextValue) - const incomingObject = - typeof payload.content === "string" - ? JSON5.parse(payload.content) - : payload.content - - if (isEqual(currentObject, incomingObject)) { - log("DO NOT CLEAR AND RECONSTRUCT 2") - return - } else { - const trimmedIncoming = - typeof payload.content === "string" - ? payload.content.trim() - : JSON5.stringify(payload.content).trim() - - if (currentTextValue.trim() === trimmedIncoming) { - log("DO NOT CLEAR AND RECONSTRUCT 3") - return - } - } - } catch (e) { - log("there was an error parsing to json", { - e, - content: payload.content, - currentTextValue, - }) - } - } - } - - if (currentTextValue) { - editor.setEditable(false) - } - log("INITIAL VALUE CHANGED - CHANGE CONTENT", {currentTextValue}) - // TODO: Instead of clearing and re-adding, we should do a diff check and edit updated nodes only + } catch (e) { try { - // For JSON/YAML content, parse and format - const objectValue = - payload.language === "json" - ? JSON5.parse(payload.content) - : payload.content - let value: string - if (payload.language === "json") { - value = JSON.stringify(objectValue, null, 2) + const currentObject = tryParsePartialJson(currentTextValue) + const incomingObject = + typeof initialValue === "string" + ? JSON5.parse(initialValue) + : initialValue + + if (isEqual(currentObject, incomingObject)) { + log("DO NOT CLEAR AND RECONSTRUCT 2") + return } else { - try { - const obj = yaml.load(objectValue) - if (obj !== undefined) { - value = yaml.dump(obj as any, {indent: 2}) - } else { - value = objectValue - } - } catch { - // Try JSON as a fallback and then dump to YAML for consistent highlighting - try { - const obj = JSON5.parse(objectValue) - value = yaml.dump(obj as any, {indent: 2}) - } catch { - value = objectValue - } + const trimmedIncoming = + typeof initialValue === "string" + ? initialValue.trim() + : JSON5.stringify(initialValue).trim() + + if (currentTextValue.trim() === trimmedIncoming) { + log("DO NOT CLEAR AND RECONSTRUCT 3") + return } } - log(" Reconstructing code block due to prop change", { - language: payload.language, - value, - }) - - existingCodeBlock.clear() - log("CLEAR AND RECONSTRUCT", { - content: payload.content, + } catch (e) { + log("there was an error parsing to json", { + e, + initialValue, currentTextValue, }) - const highlightedNodes = createHighlightedNodes( - value, - payload.language, - validationSchema, - editor, - ) - highlightedNodes.forEach((node) => { - existingCodeBlock.append(node) - }) - - const hasFocus = store.get(editorStateAtom)?.focused - - if (!hasFocus) { - editor.setEditable(true) - $setSelection(null) - } - } catch (err) { - log("failed values", { - existingCodeBlock, - content: payload.content, - type: typeof payload.content, - err, - }) - - if (!editor.isEditable()) { - editor.setEditable(true) - } } - }) - - return true // Command handled - }, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand( - ON_CHANGE_LANGUAGE, - (payload) => { - const hasFocus = store.get(editorStateAtom)?.focused - // Temporarily disable editing if editor is not focused to avoid unwanted cursor jumps - if (!hasFocus) { - editor.setEditable(false) - } - const root = $getRoot() - const existingCodeBlock = root.getChildren().filter($isCodeBlockNode)[0] - const oldLanguage = existingCodeBlock.getLanguage() as "json" | "yaml" - const newLanguage = payload.language as "json" | "yaml" - log(" ON_CHANGE_LANGUAGE triggered", {oldLanguage, newLanguage}) - if (oldLanguage === newLanguage) { - existingCodeBlock.setLanguage(newLanguage) - return true } + } - // Extract current code string - const lines = existingCodeBlock.getChildren().map((line: LexicalNode) => { - if (!$isCodeLineNode(line)) return "" - return line - .getChildren() - .map((child: LexicalNode) => - $isCodeTabNode(child) ? " " : child.getTextContent(), - ) - .join("") + if (currentTextValue) { + editor.setEditable(false) + } + // TODO: Instead of clearing and re-adding, we should do a diff check and edit updated nodes only + try { + const objectValue = + typeof initialValue === "string" ? JSON5.parse(initialValue) : initialValue + const value = JSON.stringify(objectValue, null, 2) + existingCodeBlock.clear() + log("CLEAR AND RECONSTRUCT", {initialValue, currentTextValue}) + const highlightedNodes = createHighlightedNodes(value, language) + highlightedNodes.forEach((node) => { + existingCodeBlock.append(node) }) - const currentCode = lines.join("\n").trim() - - if (currentCode === "") { - log(" Empty code, skipping parsing and clearing code block") - - existingCodeBlock.clear() - existingCodeBlock.setLanguage(newLanguage) - - const emptyLine = $createCodeLineNode() - existingCodeBlock.append(emptyLine) - - if (!hasFocus) { - editor.setEditable(true) - $setSelection(null) - } - return true - } - log(" Extracted current code", {currentCode}) - - let obj: any = null - // Attempt to parse the existing code string - log(" Attempting to parse existing code", {oldLanguage}) - try { - if (oldLanguage === "json") { - obj = JSON5.parse(currentCode) - } else { - obj = yaml.load(currentCode) - } - } catch (err) { - console.error("Failed to parse old code during language switch", err) - existingCodeBlock.setLanguage(newLanguage) - return true - } - - log(" Parsed object from current code", {obj}) - let newText = "" - try { - if (newLanguage === "json") { - newText = JSON.stringify(obj, null, 2) - } else { - newText = yaml.dump(obj, {indent: 2}) - log(" Stringified object in new language", {newText}) - } - } catch (err) { - console.error("Failed to stringify new code during language switch", err) - existingCodeBlock.setLanguage(newLanguage) - return true - } - - existingCodeBlock.clear() - const newNodes = createHighlightedNodes( - newText, - newLanguage, - validationSchema, - editor, - ) - newNodes.forEach((n) => existingCodeBlock.append(n)) - existingCodeBlock.setLanguage(newLanguage) + const hasFocus = store.get(editorStateAtom)?.focused - // Re-enable editing and clear selection if the editor was not focused before the change if (!hasFocus) { editor.setEditable(true) $setSelection(null) } + } catch (err) { + log("failed values", { + existingCodeBlock, + initialValue, + type: typeof initialValue, + err, + }) + + if (!editor.isEditable()) { + editor.setEditable(true) + } + } + }, + { + skipTransforms: true, + }, + ) + }, [initialValue]) + + useEffect(() => { + return mergeRegister( + editor.registerCommand( + ON_CHANGE_LANGUAGE, + (payload) => { + const root = $getRoot() + const existingCodeBlock = root.getChildren().filter($isCodeBlockNode)[0] + existingCodeBlock.setLanguage(payload.language as "json" | "yaml") return true }, COMMAND_PRIORITY_LOW, @@ -501,55 +271,29 @@ function InsertInitialCodeBlockPlugin({ ) }, []) - useEffect(() => { - // For JSON/YAML content, use semantic comparison - if (prevInitialRef.current) { - if ( - isEqual( - safeJson5Parse(prevInitialRef.current as string), - safeJson5Parse(initialValue), - ) - ) { - return // no semantic change - } - } - - prevInitialRef.current = initialValue - - // Dispatch event to allow other plugins to handle the content - let defaultPrevented = false - const payload: InitialContentPayload = { - content: initialValue, - language, - preventDefault: () => { - defaultPrevented = true - }, - isDefaultPrevented: () => defaultPrevented, - } - - log("INITIAL VALUE CHANGED", {initialValue}) - editor.dispatchCommand(INITIAL_CONTENT_COMMAND, payload) - }, [initialValue, language]) - return ( <> <AutoFormatAndValidateOnPastePlugin /> <IndentationPlugin /> - <ClosingBracketIndentationPlugin /> <AutoCloseBracketsPlugin /> - <GlobalErrorIndicatorPlugin editorId={editorId} /> - <SyntaxHighlightPlugin editorId={editorId} schema={validationSchema} debug={debug} /> - {additionalCodePlugins?.map((plugin, index) => ( - <Fragment key={index}>{plugin}</Fragment> - ))} + <SyntaxHighlightPlugin /> + <EmptyNodeTransformPlugin /> + <HorizontalNavigationPlugin /> <VerticalNavigationPlugin /> + {validationSchema ? ( + <RealTimeValidationPlugin debug={debug} schema={validationSchema} /> + ) : null} + <CodeBlockFoldingPlugin /> </> ) } -type InsertInitialCodeBlockProps = ComponentProps<typeof InsertInitialCodeBlockPlugin> -const InsertInitialCodeBlockPluginWrapper: FC<InsertInitialCodeBlockProps> = (props) => { - return <InsertInitialCodeBlockPlugin {...props} /> +const InsertInitialCodeBlockPluginWrapper = (props) => { + return ( + <> + <InsertInitialCodeBlockPlugin {...props} /> + </> + ) } export default memo(InsertInitialCodeBlockPluginWrapper) diff --git a/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockErrorIndicatorNode.tsx b/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockErrorIndicatorNode.tsx index 01f3531640..432deb4e5e 100644 --- a/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockErrorIndicatorNode.tsx +++ b/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockErrorIndicatorNode.tsx @@ -38,10 +38,6 @@ export class CodeBlockErrorIndicatorNode extends DecoratorNode<JSX.Element> { return <CodeBlockErrorIndicator errors={this.__errors} /> } - isKeyboardSelectable(): boolean { - return false - } - isInline(): boolean { return false } diff --git a/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockNode.ts b/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockNode.ts index 21e08654a4..1a11c17905 100644 --- a/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockNode.ts +++ b/web/oss/src/components/Editor/plugins/code/nodes/CodeBlockNode.ts @@ -11,15 +11,13 @@ import {ElementNode, LexicalNode, SerializedElementNode, Spread, EditorConfig} from "lexical" -import type {CodeLanguage} from "../types" - /** * Represents the serialized form of a CodeBlockNode. * Extends SerializedElementNode with a language property. */ export type SerializedCodeBlockNode = Spread< { - language: CodeLanguage + language: "json" | "yaml" hasValidationError: boolean }, SerializedElementNode @@ -31,7 +29,7 @@ export type SerializedCodeBlockNode = Spread< */ export class CodeBlockNode extends ElementNode { /** The programming language for syntax highlighting */ - __language: CodeLanguage + __language: "json" | "yaml" __hasValidationError: boolean /** @@ -56,7 +54,7 @@ export class CodeBlockNode extends ElementNode { * @param language - The programming language for the code block (defaults to "json") * @param key - Optional unique identifier for the node */ - constructor(language: CodeLanguage = "json", hasValidationError?: boolean, key?: string) { + constructor(language: "json" | "yaml" = "json", hasValidationError?: boolean, key?: string) { super(key) this.__language = language this.__hasValidationError = hasValidationError ?? false @@ -76,6 +74,15 @@ export class CodeBlockNode extends ElementNode { code.setAttribute("tabindex", "0") code.setAttribute("data-lexical-editor", "true") + const hasError = this.__hasValidationError + + if (hasError) { + const badge = document.createElement("span") + badge.className = "code-block-error-icon" + badge.textContent = "⚠️" + code.appendChild(badge) + } + return code } @@ -113,11 +120,11 @@ export class CodeBlockNode extends ElementNode { return false } - getLanguage(): CodeLanguage { + getLanguage(): "json" | "yaml" { return this.getLatest().__language } - setLanguage(language: CodeLanguage) { + setLanguage(language: "json" | "yaml") { const writable = this.getWritable() writable.__language = language } @@ -141,7 +148,7 @@ export class CodeBlockNode extends ElementNode { * @returns A new CodeBlockNode instance */ export function $createCodeBlockNode( - language: CodeLanguage, + language: "json" | "yaml", hasValidationError?: boolean, ): CodeBlockNode { return new CodeBlockNode(language, hasValidationError) diff --git a/web/oss/src/components/Editor/plugins/code/nodes/CodeHighlightNode.ts b/web/oss/src/components/Editor/plugins/code/nodes/CodeHighlightNode.ts index c1451eadfb..f1544a0eda 100644 --- a/web/oss/src/components/Editor/plugins/code/nodes/CodeHighlightNode.ts +++ b/web/oss/src/components/Editor/plugins/code/nodes/CodeHighlightNode.ts @@ -7,9 +7,16 @@ * * @module CodeHighlightNode */ -import {TextNode, EditorConfig, LexicalNode, SerializedTextNode, Spread} from "lexical" +import { + TextNode, + EditorConfig, + LexicalNode, + DOMExportOutput, + SerializedTextNode, + Spread, + LexicalEditor, +} from "lexical" -import styles from "../components/assets/CodeBlockErrorIndicator.module.css" /** * Represents the serialized form of a CodeHighlightNode. * Extends SerializedTextNode with a highlightType property for syntax highlighting. @@ -56,13 +63,6 @@ export class CodeHighlightNode extends TextNode { ) } - /** - * Instance-level clone used by paste utilities. - */ - clone(): CodeHighlightNode { - return CodeHighlightNode.clone(this) - } - /** * Creates a new CodeHighlightNode instance. * @param text - The text content of the node @@ -93,19 +93,21 @@ export class CodeHighlightNode extends TextNode { const dom = super.createDOM(config) // Apply token class based on highlight type - dom.className = `${styles["editor-code-highlight"]} token token-${latest.__highlightType}` + dom.className = `editor-code-highlight token token-${latest.__highlightType}` // Ensure empty nodes have a minimum width for caret visibility if (latest.getTextContent() === "") { dom.classList.add("token-empty") + // Set a minimum width to ensure caret visibility + dom.style.minWidth = "1px" + dom.style.display = "inline-block" } // Add validation error styling if needed if (latest.hasValidationError()) { - dom.classList.add("validation-error", "has-tooltip") + dom.classList.add("token-error", "has-tooltip") if (latest.__validationMessage) { dom.setAttribute("data-tooltip", latest.__validationMessage) - dom.setAttribute("title", latest.__validationMessage) } } @@ -146,6 +148,15 @@ export class CodeHighlightNode extends TextNode { return super.updateDOM(prevNode as this, dom, config) } + /** + * Exports the node to a DOM representation for external use. + * @param editor - The Lexical editor instance + * @returns DOM export output + */ + exportDOM(editor: LexicalEditor): DOMExportOutput { + return super.exportDOM(editor) + } + exportJSON(): SerializedCodeHighlightNode { return { ...super.exportJSON(), @@ -166,15 +177,6 @@ export class CodeHighlightNode extends TextNode { ) } - // Prevent formatting (bold, underline, etc) - setFormat(format: number): this { - return this - } - - canHaveFormat(): boolean { - return false - } - setHighlightType(type: string): void { this.getWritable().__highlightType = type } @@ -200,7 +202,7 @@ export class CodeHighlightNode extends TextNode { } setValidationMessage(msg: string | null): void { - const writable = this.getWritable() + const writable = this.getWritable<CodeHighlightNode>() writable.__validationMessage = msg } } @@ -212,10 +214,10 @@ export class CodeHighlightNode extends TextNode { * @returns A new CodeHighlightNode instance */ export function $createCodeHighlightNode( - text = "", - highlightType = "plain", - hasValidationError = false, - validationMessage: string | null = null, + text: string, + highlightType: string, + hasValidationError: boolean, + validationMessage: string | null, key?: string, ): CodeHighlightNode { return new CodeHighlightNode(text, highlightType, hasValidationError, validationMessage, key) diff --git a/web/oss/src/components/Editor/plugins/code/nodes/CodeLineNode.ts b/web/oss/src/components/Editor/plugins/code/nodes/CodeLineNode.ts index 320bb974de..b41baad49a 100644 --- a/web/oss/src/components/Editor/plugins/code/nodes/CodeLineNode.ts +++ b/web/oss/src/components/Editor/plugins/code/nodes/CodeLineNode.ts @@ -8,21 +8,11 @@ * * @module CodeLineNode */ -import {ElementNode, LexicalNode, SerializedElementNode, Spread} from "lexical" - -import styles from "../components/assets/CodeBlockErrorIndicator.module.css" -import diffStyles from "../components/assets/DiffCodeBlock.module.css" -import {ErrorInfo, getValidationManager} from "../plugins/GlobalErrorIndicatorPlugin" -import {getCurrentEditorId} from "../plugins/SyntaxHighlightPlugin" - -/** - * Diff line types for code diff display - */ -export type DiffType = "added" | "removed" | "context" | "fold" | null +import {ElementNode, LexicalNode, SerializedElementNode, DOMExportOutput, Spread} from "lexical" /** * Represents the serialized form of a CodeLineNode. - * Extends SerializedElementNode with properties for code folding state and diff display. + * Extends SerializedElementNode with properties for code folding state. */ export type SerializedCodeLineNode = Spread< { @@ -32,14 +22,6 @@ export type SerializedCodeLineNode = Spread< isCollapsed?: boolean /** Whether this line is hidden due to parent folding */ isHidden?: boolean - /** Diff type for this line (added, removed, context, or null) */ - diffType?: DiffType - /** Original file line number (for diff display) */ - oldLineNumber?: number - /** New file line number (for diff display) */ - newLineNumber?: number - /** Validation errors for this line */ - validationErrors?: ErrorInfo[] }, SerializedElementNode > @@ -58,15 +40,7 @@ export class CodeLineNode extends ElementNode { __isHidden: boolean /** Whether this line is empty */ __isEmpty: boolean - /** Diff type for this line (added, removed, context, or null) */ - __diffType: DiffType - /** Original file line number (for diff display) */ - __oldLineNumber?: number - /** New file line number (for diff display) */ - __newLineNumber?: number - /** Validation errors for this line */ - __validationErrors: ErrorInfo[] - __index = 0 + __index: number /** * Returns the node type identifier. @@ -87,15 +61,9 @@ export class CodeLineNode extends ElementNode { node.__isFoldable, node.__isCollapsed, node.__isHidden, - node.__isEmpty ?? node.getTextContent().trim() === "", - node.__diffType, - node.__oldLineNumber, - node.__newLineNumber, + node.__isEmpty ?? + (node.getTextContent() === "\u200b" || node.getTextContent().trim() === ""), ) - - // Copy validation errors directly during cloning - clone.__validationErrors = [...node.__validationErrors] - return clone } @@ -103,171 +71,18 @@ export class CodeLineNode extends ElementNode { * Creates a new CodeLineNode instance. * @param key - Optional unique identifier for the node */ - clone(): CodeLineNode { - return CodeLineNode.clone(this) - } - constructor( key?: string, isFoldable = false, isCollapsed = false, isHidden = false, isEmpty = false, - diffType: DiffType = null, - oldLineNumber?: number, - newLineNumber?: number, ) { super(key) this.__isFoldable = isFoldable this.__isCollapsed = isCollapsed this.__isHidden = isHidden this.__isEmpty = isEmpty - this.__diffType = diffType - this.__oldLineNumber = oldLineNumber - this.__newLineNumber = newLineNumber - this.__validationErrors = [] - // Note: validationErrors can be set after construction via setValidationErrors() - } - - /** - * Gets the diff type for this line. - * @returns The diff type (added, removed, context, or null) - */ - getDiffType(): DiffType { - return this.getLatest().__diffType - } - - /** - * Sets the diff type for this line. - * @param diffType - The diff type to set - * @returns This node for chaining - */ - setDiffType(diffType: DiffType): this { - const writable = this.getWritable() - writable.__diffType = diffType - return writable - } - - /** - * Gets the old line number for this line. - * @returns The old line number or undefined - */ - getOldLineNumber(): number | undefined { - return this.getLatest().__oldLineNumber - } - - /** - * Sets the old line number for this line. - * @param lineNumber - The old line number to set - * @returns This node for chaining - */ - setOldLineNumber(lineNumber: number | undefined): this { - const writable = this.getWritable() - writable.__oldLineNumber = lineNumber - return writable - } - - /** - * Gets the new line number for this line. - * @returns The new line number or undefined - */ - getNewLineNumber(): number | undefined { - return this.getLatest().__newLineNumber - } - - /** - * Sets the new line number for this line. - * @param lineNumber - The new line number to set - * @returns This node for chaining - */ - setNewLineNumber(lineNumber: number | undefined): this { - const writable = this.getWritable() - writable.__newLineNumber = lineNumber - return writable - } - - /** - * Gets the validation errors for this line. - * Uses the unified ValidationManager as single source of truth. - * @returns Array of validation errors for this line - */ - getValidationErrors(): ErrorInfo[] { - try { - const editorId = getCurrentEditorId() - if (!editorId) { - // No active editor context; fall back to stored errors - return this.getLatest().__validationErrors - } - - const manager = getValidationManager(editorId) - if (!manager) { - // Manager not registered yet for this editor; fall back - return this.getLatest().__validationErrors - } - - const lineNumber = this.calculateActualLineNumber() - return manager.getErrorsForLine(lineNumber) - } catch (error) { - // Fallback to stored validation errors (for backward compatibility) - console.warn( - "Failed to retrieve ValidationManager from registry; using stored errors:", - error, - ) - return this.getLatest().__validationErrors - } - } - - /** - * Sets the validation errors for this line. - * @param errors - Array of validation errors to set - * @returns This node for chaining - */ - setValidationErrors(errors: ErrorInfo[]): this { - const writable = this.getWritable() - writable.__validationErrors = errors - return writable - } - - /** - * Gets the primary validation error for this line (first error). - * @returns The primary validation error or null if no errors - */ - getValidationError(): ErrorInfo | null { - const errors = this.getValidationErrors() - return errors.length > 0 ? errors[0] : null - } - - /** - * Calculates the actual line number by counting CodeLineNodes in the editor. - * This is more reliable than getIndexWithinParent() during node creation/editing. - * @returns The actual 1-based line number - */ - private calculateActualLineNumber(): number { - try { - const parent = this.getParent() - if (!parent) { - console.warn(`⚠️ Node ${this.__key} has no parent, defaulting to line 1`) - return 1 - } - - const children = parent.getChildren() - let lineNumber = 1 - - for (const child of children) { - if (child === this) { - return lineNumber - } - if (child.getType() === "code-line") { - lineNumber++ - } - } - - // console.warn(`⚠️ Node ${this.__key} not found in parent children, defaulting to line 1`) - return 1 - } catch (error) { - // console.error(`❌ Error calculating line number for node ${this.__key}:`, error) - return 1 - } } /** @@ -276,51 +91,41 @@ export class CodeLineNode extends ElementNode { * @returns HTMLElement representing the code line */ createDOM(): HTMLElement { - // called on initial render const latest = this.getLatest() const element = document.createElement("div") - element.classList.add( - "editor-code-line", - styles["editor-code-line"], - diffStyles["editor-code-diff-line"], - ) + element.classList.add("editor-code-line") element.setAttribute("data-lexical-node-key", this.__key) - - // Apply diff styling if diff type is set - if (latest.__diffType) { - element.classList.add(`diff-${latest.__diffType}`) - element.setAttribute("data-diff-type", latest.__diffType) - } - if (latest.__isHidden) { element.classList.add("folded") } - // Set line numbers for GitHub-style diff display (but not for fold lines) - if ((latest.__oldLineNumber || latest.__newLineNumber) && latest.__diffType !== "fold") { - const oldNum = latest.__oldLineNumber ? latest.__oldLineNumber.toString() : "" - const newNum = latest.__newLineNumber ? latest.__newLineNumber.toString() : "" - element.setAttribute("data-old-line-number", oldNum) - element.setAttribute("data-new-line-number", newNum) - - // CSS pseudo-elements handle the display formatting - // Just set the data attributes for CSS to use + if (latest.__isFoldable) { + const btn = document.createElement("button") + btn.className = "fold-toggle" + btn.textContent = this.__isCollapsed ? "▸" : "▾" + element.appendChild(btn) } - // Apply validation error styling if this line has errors - const validationError = latest.getValidationError() - if (validationError) { - element.classList.add("validation-error") - element.setAttribute("data-validation-error", validationError.message) - // Also apply inline styles for higher specificity - // element.style.backgroundColor = "rgba(255, 165, 0, 0.15)" - // element.style.borderRight = "4px solid #ff8c00" - // element.style.position = "relative" + if (latest.__index !== undefined && latest.__index > 0) { + element.setAttribute("data-gutter", latest.__index.toString()) + } else { + const foundIndex = latest.getIndexWithinParent() + if (foundIndex >= 0) { + element.setAttribute("data-gutter", (foundIndex + 1).toString()) + } else { + element.setAttribute("data-gutter", "") + } } - // Store line number on the element for use in event listener - const lineNumber = this.calculateActualLineNumber() - element.setAttribute("data-line-number", lineNumber.toString()) + if (latest.__isEmpty === undefined || latest.__isEmpty) { + element.classList.add("block") + element.classList.remove("flex") + // element.classList.toggle("bg-[red]", false) + } else { + element.classList.remove("block") + element.classList.add("flex") + // element.classList.toggle("bg-[red]", true) + } return element } @@ -343,110 +148,44 @@ export class CodeLineNode extends ElementNode { // Check for any state changes that require DOM updates const latest = this.getLatest() const latestContent = latest.getTextContent() - const isEmpty = latestContent.trim() === "" + const isEmpty = latestContent === "\u200b" || latestContent.trim() === "" const latestIndex = latest.getIndexWithinParent() + 1 - if (prevNode.__isHidden !== latest.__isHidden) { - if (latest.__isHidden) { - dom.classList.add("folded") - return true - } else { - dom.classList.remove("folded") - } - } - - // Handle diff type changes - if (prevNode.__diffType !== latest.__diffType) { - // Remove old diff classes - if (prevNode.__diffType) { - dom.classList.remove(`diff-${prevNode.__diffType}`) - dom.removeAttribute("data-diff-type") - } - // Add new diff classes - if (latest.__diffType) { - dom.classList.add(`diff-${latest.__diffType}`) - dom.setAttribute("data-diff-type", latest.__diffType) - } - } - - // Handle line number changes - if ( - prevNode.__oldLineNumber !== latest.__oldLineNumber || - prevNode.__newLineNumber !== latest.__newLineNumber - ) { - // Update line numbers for GitHub-style diff display - if (latest.__oldLineNumber || latest.__newLineNumber) { - const oldNum = latest.__oldLineNumber ? latest.__oldLineNumber.toString() : "" - const newNum = latest.__newLineNumber ? latest.__newLineNumber.toString() : "" - dom.setAttribute("data-old-line-number", oldNum) - dom.setAttribute("data-new-line-number", newNum) - } else { - // Remove line number attributes if no longer needed - dom.removeAttribute("data-old-line-number") - dom.removeAttribute("data-new-line-number") - // Note: Regular sequential line numbers are now handled by CSS counters - } - } - - // This ensures the validation error map lookup uses the correct line number - const currentLineNumber = this.calculateActualLineNumber() - const prevLineNumber = parseInt(dom.getAttribute("data-line-number") || "1") - if (currentLineNumber !== prevLineNumber) { - dom.setAttribute("data-line-number", currentLineNumber.toString()) - } - - // Check for validation errors changes - const prevValidationErrors = prevNode.getValidationErrors() - const currentValidationErrors = latest.getValidationErrors() - const validationErrorsChanged = - prevValidationErrors.length !== currentValidationErrors.length || - !prevValidationErrors.every( - (prevError, index) => - prevError.id === currentValidationErrors[index]?.id && - prevError.message === currentValidationErrors[index]?.message, - ) - - if (validationErrorsChanged) { - // Remove previous validation error styling - dom.classList.remove("validation-error") - dom.removeAttribute("data-validation-error") - dom.removeAttribute("title") - dom.style.backgroundColor = "" - dom.style.borderRight = "" - dom.style.position = "" - - // Apply new validation error styling if errors exist - if (currentValidationErrors.length > 0) { - const primaryError = currentValidationErrors[0] - dom.classList.add("validation-error") - dom.setAttribute("data-validation-error", primaryError.message) - - // Create debug tooltip with all errors - const debugInfo = [ - `🐛 VALIDATION ERRORS (${currentValidationErrors.length}):`, - ...currentValidationErrors.map( - (error, index) => `${index + 1}. [${error.type}] ${error.message}`, - ), - ].join("\n") - dom.setAttribute("title", debugInfo) - - // dom.style.backgroundColor = "rgba(255, 165, 0, 0.15)" - // dom.style.borderRight = "4px solid #ff8c00" - // dom.style.position = "relative" - } - - return true - } - if ( prevNode.__isFoldable !== latest.__isFoldable || prevNode.__isCollapsed !== latest.__isCollapsed || + prevNode.__isHidden !== latest.__isHidden || prevNode.__isEmpty !== isEmpty || prevNode.__index !== latestIndex ) { - // Note: updateDOM should only update DOM, not node state - // The __isEmpty and __index properties will be updated elsewhere - // during normal node lifecycle, not during DOM reconciliation + if (prevNode.__isEmpty !== isEmpty) { + this.getWritable().__isEmpty = isEmpty + } + if (prevNode.__index !== latestIndex) { + this.getWritable().__index = latestIndex + } + // Remove old button if it exists + const oldBtn = dom.querySelector(".fold-toggle") + if (oldBtn) { + oldBtn.remove() + } + + // Add new button if needed + if (latest.__isFoldable) { + const btn = document.createElement("button") + btn.className = "fold-toggle" + btn.textContent = latest.__isCollapsed ? "▸" : "▾" + btn.style.position = "absolute" + btn.style.left = "-1.5em" + btn.style.top = "0" + btn.style.cursor = "pointer" + btn.style.background = "none" + btn.style.border = "none" + btn.style.fontSize = "1em" + dom.appendChild(btn) + dom.style.position = "relative" + } + return true } @@ -486,7 +225,7 @@ export class CodeLineNode extends ElementNode { * @returns True if line is hidden, false otherwise */ isHidden(): boolean { - return this.getLatest().__isHidden + return this.__isHidden } /** @@ -509,7 +248,7 @@ export class CodeLineNode extends ElementNode { * @returns True if line is foldable, false otherwise */ isFoldable(): boolean { - return this.getLatest().__isFoldable + return this.__isFoldable } /** @@ -520,28 +259,21 @@ export class CodeLineNode extends ElementNode { * @returns True if line is collapsed, false otherwise */ isCollapsed(): boolean { - return this.getLatest().__isCollapsed + return this.__isCollapsed } - // /** - // * Exports this node to a DOM representation. - // * Creates a new DOM element with current folding state - // * and styling for external use. - // * - // * @returns Object containing the DOM element - // */ - // exportDOM(): DOMExportOutput { - // return { - // element: this.createDOM(), - // } - // } - - // importDOM(): void { - // this.setDiffType(null) - // this.setOldLineNumber(undefined) - // this.setNewLineNumber(undefined) - // this.setValidationErrors([]) - // } + /** + * Exports this node to a DOM representation. + * Creates a new DOM element with current folding state + * and styling for external use. + * + * @returns Object containing the DOM element + */ + exportDOM(): DOMExportOutput { + return { + element: this.createDOM(), + } + } /** * Serializes this node to JSON format. @@ -555,39 +287,45 @@ export class CodeLineNode extends ElementNode { ...super.exportJSON(), isFoldable: this.__isFoldable, isCollapsed: this.__isCollapsed, - isHidden: this.__isHidden, - diffType: this.__diffType, - validationErrors: this.__validationErrors, type: "code-line", version: 1, } } static importJSON(serializedNode: SerializedCodeLineNode): CodeLineNode { - const node = new CodeLineNode( - undefined, // key - serializedNode.isFoldable ?? false, - serializedNode.isCollapsed ?? false, - serializedNode.isHidden ?? false, - false, // isEmpty - will be calculated - serializedNode.diffType ?? null, - serializedNode.oldLineNumber, - serializedNode.newLineNumber, - ) - - // Set validation errors directly during deserialization - const validationErrors = serializedNode.validationErrors ?? [] - node.__validationErrors = validationErrors - + const node = new CodeLineNode() + node.__isFoldable = serializedNode.isFoldable ?? false + node.__isCollapsed = serializedNode.isCollapsed ?? false return node } + + // /** + // * Indicates this node is not an inline element. + // * CodeLineNodes are always block-level elements that + // * represent full lines of code. + // * + // * @returns Always false as code lines are block elements + // */ + // isInline(): false { + // return false + // } + + // /** + // * Indicates this node can contain no content. + // * Empty lines are valid in code blocks, representing + // * blank lines in the code. + // * + // * @returns Always true as code lines can be empty + // */ + // canBeEmpty(): boolean { + // return true + // } } /** * Helper function to create a new CodeLineNode. * @returns A new CodeLineNode instance */ - export function $createCodeLineNode(): CodeLineNode { return new CodeLineNode() } diff --git a/web/oss/src/components/Editor/plugins/code/nodes/CodeTabNode.ts b/web/oss/src/components/Editor/plugins/code/nodes/CodeTabNode.ts deleted file mode 100644 index 7b3824af72..0000000000 --- a/web/oss/src/components/Editor/plugins/code/nodes/CodeTabNode.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * CodeTabNode.ts - * - * This module defines a custom Lexical node type for code blocks in the editor. - * CodeTabNode represents a container for code content with specific language - * highlighting (JSON or YAML). It extends ElementNode from Lexical and provides - * DOM manipulation and serialization capabilities. - * - * @module CodeTabNode - */ - -import {LexicalNode, SerializedTextNode, Spread, EditorConfig, TabNode} from "lexical" - -/** - * Represents the serialized form of a CodeTabNode. - * Extends SerializedTextNode since CodeTabNode extends TabNode which extends TextNode. - */ -export type SerializedCodeTabNode = Spread<{}, SerializedTextNode> - -/** - * CodeTabNode class represents a code block in the editor. - * It manages the rendering and behavior of code content with specific language highlighting. - */ -export class CodeTabNode extends TabNode { - /** - * Returns the node type identifier. - * @returns The string identifier for this node type - */ - static getType(): string { - return "code-tab-block" - } - - /** - * Creates a copy of an existing CodeTabNode. - * @param node - The node to clone - * @returns A new CodeTabNode with the same properties - */ - static clone(node: CodeTabNode): CodeTabNode { - return new CodeTabNode(node.__key) - } - - /** - * Instance-level clone used by paste utilities. - */ - clone(): CodeTabNode { - return CodeTabNode.clone(this) - } - - /** - * Creates a new CodeTabNode instance. - * @param language - The programming language for the code block (defaults to "json") - * @param key - Optional unique identifier for the node - */ - constructor(key?: string) { - super(key) - } - - /** - * Creates the DOM element for this node. - * Sets up a code element with appropriate classes and attributes for syntax highlighting. - * @param config - Editor configuration - * @returns HTMLElement representing the code block - */ - createDOM(config: EditorConfig): HTMLElement { - // const code = document.createElement("code") - // code.classList.add("editor-code", `language-${this.__language}`, 'dark-theme') - // code.classList.add("editor-code", `language-${this.__language}`) - // code.setAttribute("data-language", this.__language) - // code.setAttribute("tabindex", "0") - // code.setAttribute("data-lexical-editor", "true") - - const dom = super.createDOM(config) - dom.classList.add("editor-code-tab") - return dom - } - - /** - * Determines if the DOM needs to be updated. - * Always returns false as the node is replaced entirely when changed. - * @returns false to indicate no incremental DOM updates - */ - updateDOM(prevNode: CodeTabNode, dom: HTMLElement, config: EditorConfig): boolean { - return super.updateDOM(prevNode as any, dom, config) - } - - /** - * Serializes the node for persistence. - * @returns Serialized representation of the code block - */ - exportJSON(): SerializedCodeTabNode { - return super.exportJSON() - } - - static importJSON(json: SerializedCodeTabNode): CodeTabNode { - return new CodeTabNode() - } - - isInline(): true { - return true - } -} - -/** - * Helper function to create a new CodeTabNode. - * @returns A new CodeTabNode instance - */ -export function $createCodeTabNode(): CodeTabNode { - return new CodeTabNode() -} - -/** - * Type guard to check if a node is a CodeTabNode. - * @param node - The node to check - * @returns True if the node is a CodeTabNode - */ -export function $isCodeTabNode(node: LexicalNode | null | undefined): node is CodeTabNode { - return node instanceof CodeTabNode -} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/AutoCloseBracketsPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/AutoCloseBracketsPlugin.tsx index b3145563a8..f74e9bb9ad 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/AutoCloseBracketsPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/AutoCloseBracketsPlugin.tsx @@ -12,7 +12,7 @@ * * @module AutoCloseBracketsPlugin */ -import {useEffect, useRef} from "react" +import {useEffect} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" import { @@ -22,14 +22,13 @@ import { $getNodeByKey, $setSelection, $createRangeSelection, + $isTabNode, COMMAND_PRIORITY_HIGH, - SELECTION_CHANGE_COMMAND, } from "lexical" import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeHighlightNode, $createCodeHighlightNode} from "../nodes/CodeHighlightNode" import {$isCodeLineNode} from "../nodes/CodeLineNode" -import {$isCodeTabNode} from "../nodes/CodeTabNode" import {createLogger} from "../utils/createLogger" /** Mapping of opening characters to their corresponding closing characters */ @@ -81,26 +80,15 @@ function isInsideString(text: string, offset: number): boolean { } const log = createLogger("AutoCloseBracketsPlugin", { - disabled: true, + disabled: false, }) -/** - * Interface for tracking auto-completion context - */ -interface AutoCloseContext { - nodeKey: string - offset: number - closingChar: string - openingChar: string -} - /** * React component that implements auto-closing behavior for brackets and quotes. * Integrates with Lexical editor to provide real-time bracket matching and indentation. * * Key features: * - Auto-closes matching characters - * - State-based tracking of auto-completion context * - Handles multiple cursor positions * - Prevents unwanted closings inside strings * - Maintains proper indentation @@ -111,24 +99,8 @@ interface AutoCloseContext { export function AutoCloseBracketsPlugin() { const [editor] = useLexicalComposerContext() - // Track the current auto-completion context - const autoCloseContextRef = useRef<AutoCloseContext | null>(null) - useEffect(() => { - // Clear auto-close context when selection changes - const unregisterSelectionChange = editor.registerCommand( - SELECTION_CHANGE_COMMAND, - () => { - // Clear context when selection changes (user moves cursor) - if (autoCloseContextRef.current) { - autoCloseContextRef.current = null - } - return false - }, - COMMAND_PRIORITY_HIGH, - ) - - const unregisterKeyDown = editor.registerCommand( + return editor.registerCommand( KEY_DOWN_COMMAND, (event: KeyboardEvent) => { log("KEY_DOWN_COMMAND 1", event.key) @@ -172,16 +144,16 @@ export function AutoCloseBracketsPlugin() { log("Active selection detected 4") // Get the updated selection after deletion const updatedSelection = $getSelection() - if (!$isRangeSelection(updatedSelection)) return false + if (!$isRangeSelection(updatedSelection)) return let anchorNode = updatedSelection.anchor.getNode() log("Active selection detected 5", anchorNode) if ( !$isCodeHighlightNode(anchorNode) && - !$isCodeTabNode(anchorNode) && + !$isTabNode(anchorNode) && !$isCodeLineNode(anchorNode) ) - return false + return const offset = updatedSelection.anchor.offset const text = anchorNode.getTextContent() @@ -234,7 +206,7 @@ export function AutoCloseBracketsPlugin() { "text", ) $setSelection(sel) - } else if ($isCodeTabNode(anchorNode)) { + } else if ($isTabNode(anchorNode)) { newText = newText.trim() const highlightNode = $createCodeHighlightNode( newText, @@ -270,7 +242,7 @@ export function AutoCloseBracketsPlugin() { let anchorNode = selection.anchor.getNode() let offset = selection.anchor.offset - if ($isCodeTabNode(anchorNode)) { + if ($isTabNode(anchorNode)) { const nextSibling = anchorNode.getNextSibling() if (!nextSibling) { $setSelection(null) @@ -278,7 +250,6 @@ export function AutoCloseBracketsPlugin() { anchorNode.insertAfter(highlightNode) anchorNode = highlightNode selection = anchorNode.selectStart() - if (!$isRangeSelection(selection)) return false $setSelection(selection) offset = selection.anchor.offset } else { @@ -293,7 +264,7 @@ export function AutoCloseBracketsPlugin() { // Ensure we're only handling text nodes or empty line nodes // This prevents auto-closing in non-code contexts if ( - !$isCodeTabNode(anchorNode) && + !$isTabNode(anchorNode) && !$isCodeHighlightNode(anchorNode) && !$isCodeLineNode(anchorNode) ) { @@ -326,6 +297,7 @@ export function AutoCloseBracketsPlugin() { log("KEY_DOWN_COMMAND 5") const language = blockNode.getLanguage() const text = anchorNode.getTextContent() + const charBefore = text[offset - 1] || "" const charAfter = text[offset] || "" const isStringQuote = key === '"' || key === "'" || key === "`" @@ -344,87 +316,29 @@ export function AutoCloseBracketsPlugin() { } /** - * VSCode-like smart quote handling: - * 1. If next char is same quote -> move cursor past it (skip over) - * 2. If we're at the end of a string -> move cursor past closing quote - * 3. If we're starting a new string -> auto-complete with pair - * 4. Prevent bracket auto-closing inside strings + * Handle string quotes with special cases: + * 1. Skip if next char is same quote (just move cursor) + * 2. Check quote balance to maintain valid string state + * 3. Prevent bracket auto-closing inside strings */ - // Check if we should skip over a closing character based on auto-close context - const context = autoCloseContextRef.current - if ( - context && - // context.nodeKey === anchorNode.getKey() && - // context.offset === offset && - context.closingChar === key - ) { - // We're in auto-close context and typing the closing character - // Skip over it instead of inserting - event.preventDefault() - const sel = $createRangeSelection() - sel.anchor.set(anchorNode.getKey(), offset + 1, "text") - sel.focus.set(anchorNode.getKey(), offset + 1, "text") - $setSelection(sel) - - // Clear the context since we've used it - autoCloseContextRef.current = null - log("[AutoClose] Skipped over closing character:", key) - return true - } else { - if ($isCodeHighlightNode(anchorNode)) { - // if this is a text bracket, and the node already is a text block with valid string opening - // and closing, do not autoclose this new bracket - const text = anchorNode.getTextContent() - const textFirst = text[0] - const textLast = text[text.length - 1] - if ( - isStringQuote && - ((textFirst === "'" && textLast === "'") || - (textFirst === '"' && textLast === '"')) - ) { - return false - } - } - } - - // Clear context on any other key press (breaks the auto-close chain) - if (context) { - log("[AutoClose] Key press broke auto-close context") - autoCloseContextRef.current = null - } - if (isStringQuote) { - // Check if we're inside a string context - const isCurrentlyInsideString = isInsideString(text, offset) - - // If we're inside a string and typing the same quote type, - // we might be trying to close the string - if (isCurrentlyInsideString) { - // Count unmatched quotes of this type before cursor - let quoteCount = 0 - let escaped = false - for (let i = 0; i < offset; i++) { - const char = text[i] - if (char === "\\" && !escaped) { - escaped = true - continue - } - if (char === key && !escaped) { - quoteCount++ - } - escaped = false - } - - // If odd number of quotes, we're likely closing a string - // Don't auto-complete, just insert the closing quote - if (quoteCount % 2 === 1) { - // Let the default behavior handle this (just insert the quote) - return false - } + // If next char is same quote, just move cursor past it + if (charAfter === key && charBefore !== key) { + event.preventDefault() + anchorNode.select(offset) + return true } - // Starting a new string - auto-complete with pair - // (This will be handled by the auto-close logic below) + // Count quotes before and after cursor + const quoteCountBefore = ( + text.slice(0, offset).match(new RegExp(`\\${key}`, "g")) || [] + ).length + const quoteCountAfter = ( + text.slice(offset).match(new RegExp(`\\${key}`, "g")) || [] + ).length + + // Don't auto-close if it would create invalid string state + if ((quoteCountBefore + quoteCountAfter) % 2 !== 0) return false } else if (BRACKETS.includes(key) && insideString) { // Don't auto-close brackets inside strings return false @@ -478,19 +392,7 @@ export function AutoCloseBracketsPlugin() { sel.anchor.set(updated.getKey(), offset + 1, "text") sel.focus.set(updated.getKey(), offset + 1, "text") $setSelection(sel) - - // Set auto-close context for the inserted pair - autoCloseContextRef.current = { - nodeKey: updated.getKey(), - offset: offset + 1, // Position after opening char, before closing char - closingChar: close, - openingChar: key, - } - - log("[AutoCloseBrackets] Set collapsed selection and auto-close context", { - offset: offset + 1, - closingChar: close, - }) + log("[AutoCloseBrackets] Set collapsed selection at offset +1") } else { log("[AutoCloseBrackets] Could not find updated node to select") } @@ -498,12 +400,6 @@ export function AutoCloseBracketsPlugin() { }, COMMAND_PRIORITY_HIGH, ) - - // Return cleanup function that unregisters both listeners - return () => { - unregisterSelectionChange() - unregisterKeyDown() - } }, [editor]) return null diff --git a/web/oss/src/components/Editor/plugins/code/plugins/AutoFormatAndValidateOnPastePlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/AutoFormatAndValidateOnPastePlugin.tsx index c342e0879e..8e09b833f5 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/AutoFormatAndValidateOnPastePlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/AutoFormatAndValidateOnPastePlugin.tsx @@ -2,7 +2,6 @@ import {useEffect} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import JSON5 from "json5" import { $getSelection, $isRangeSelection, @@ -14,7 +13,6 @@ import { import {$createCodeBlockNode, $isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeLineNode} from "../nodes/CodeLineNode" import {createLogger} from "../utils/createLogger" -import {calculateMultiLineIndentation, getIndentCount} from "../utils/indent" import {$insertLinesWithSelectionAndIndent} from "../utils/pasteUtils" const log = createLogger("AutoFormatAndValidateOnPastePlugin", { @@ -31,26 +29,18 @@ export function AutoFormatAndValidateOnPastePlugin() { const pastedText = event.clipboardData?.getData("text/plain") if (!pastedText) return false - // Utility functions for validation using JSON5 for more flexible parsing + // Utility functions for validation const isValidJson = (text: string) => { try { - JSON5.parse(text) + JSON.parse(text) return true } catch { return false } } - const parseJsonContent = (text: string) => { - try { - return JSON5.parse(text) - } catch { - return null - } - } - log("Paste detected", pastedText.substring(0, 50)) - log("[AutoFormatAndValidateOnPastePlugin] Raw Paste:", pastedText) + console.log("[AutoFormatAndValidateOnPastePlugin] Raw Paste:", pastedText) const language: "json" | "yaml" = pastedText.trim().startsWith("{") ? "json" : "yaml" @@ -58,11 +48,14 @@ export function AutoFormatAndValidateOnPastePlugin() { // Unify valid and invalid content handling event.preventDefault() event.stopPropagation() - log( + console.log( "[AutoFormatAndValidateOnPastePlugin] Prevented default paste, updating editor...", ) const selection = $getSelection() - log("[AutoFormatAndValidateOnPastePlugin] Selection before paste:", selection) + console.log( + "[AutoFormatAndValidateOnPastePlugin] Selection before paste:", + selection, + ) if (!$isRangeSelection(selection)) { log("Paste: Not a range selection", {selection}) return false @@ -71,7 +64,7 @@ export function AutoFormatAndValidateOnPastePlugin() { let currentLine = anchorNode.getParent() if (!currentLine) { log("Paste: No currentLine 0", {anchorNode}) - log( + console.log( "[AutoFormatAndValidateOnPastePlugin] No currentLine found for anchorNode:", anchorNode, ) @@ -143,26 +136,10 @@ export function AutoFormatAndValidateOnPastePlugin() { // Determine if content is valid and pretty-print if needed let lines: string[] if (language === "json" && isValidJson(pastedText)) { - // Pretty-print valid JSON with tab-based indentation using JSON5 + // Pretty-print valid JSON try { - const parsed = parseJsonContent(pastedText) - if (parsed !== null) { - // Use 2-space indentation first, then convert to tabs - const spacedJson = JSON.stringify(parsed, null, 2) - // Convert every 2 spaces at the beginning of lines to tabs - const tabbedJson = spacedJson.replace(/^( {2})+/gm, (match) => { - return "\t".repeat(match.length / 2) - }) - lines = tabbedJson.split("\n") - log("JSON5 formatting applied", { - original: pastedText, - formatted: tabbedJson, - lineCount: lines.length, - wasJSON5: true, - }) - } else { - lines = pastedText.split("\n") - } + const parsed = JSON.parse(pastedText) + lines = JSON.stringify(parsed, null, 2).split("\n") } catch { lines = pastedText.split("\n") } @@ -171,95 +148,14 @@ export function AutoFormatAndValidateOnPastePlugin() { lines = pastedText.split("\n") } - // Calculate proper indentation for each pasted line based on content and context - // This follows the same logic as the IndentationPlugin's Enter handler - - // Analyze cursor position to determine if we're pasting inline or at line start - const currentLineText = currentLine.getTextContent() - const baseIndentLevel = getIndentCount(currentLineText) - const anchorOffset = selection.anchor.offset - - // Check if there's content before the cursor (inline paste) - // We need to check the entire line content up to the cursor position, not just the anchor node - const allChildren = currentLine.getChildren() - let totalTextBeforeCursor = "" - - for (const child of allChildren) { - if (child.getKey() === anchorNode.getKey()) { - // Add the portion of the anchor node before the cursor - totalTextBeforeCursor += anchorNode.getTextContent().slice(0, anchorOffset) - break - } else { - // Add the entire content of nodes before the anchor - totalTextBeforeCursor += child.getTextContent() - } - } - - const hasContentBefore = !!currentLineText - // totalTextBeforeCursor.trim().length > 0 - - // Check if there's content after the cursor on the same line - const textAfterCursor = anchorNode.getTextContent().slice(anchorOffset) - const hasContentAfter = textAfterCursor.trim().length > 0 - - // Strip all leading whitespace from pasted lines first - const strippedLines = lines.map((line) => line.replace(/^\s+/, "")) - - // Calculate proper indentation levels for each line - const indentLevels = calculateMultiLineIndentation( - strippedLines, - baseIndentLevel, - language, - ) - - log("Paste: Cursor context analysis", { - anchorOffset, - totalTextBeforeCursor, - textAfterCursor, - hasContentBefore, - hasContentAfter, - currentLineText, - indentLevels, - baseIndentLevel, - currentLine, - }) - - // Apply calculated indentation to each line, with special handling for inline paste - const properlyIndentedLines = strippedLines.map((line, index) => { - let indentLevel = indentLevels[index] - - // Special case: if pasting inline (has content before cursor) and this is the first line, - // don't add any indentation since it continues the current line - - // Check if there's content before the cursor on the same line [for the first line] - // current `hasContentBefore` - // const _hasContentBefore = index === 0 ? totalTextBeforeCursor : false - if (index === 0 && !!totalTextBeforeCursor) { - // For inline paste, the first line should have NO leading whitespace at all - // This prevents $createNodeForLineWithTabs from creating tab nodes in the middle of content - return line - } - - const result = "\t".repeat(indentLevel) + line - return result - }) - - log("Paste: Lines with calculated indentation", { - originalLines: lines, - strippedLines, - indentLevels, - properlyIndentedLines, - baseIndentLevel, - language, - }) + log("Paste: Lines to insert", {lines, count: lines.length}) $insertLinesWithSelectionAndIndent({ - lines: properlyIndentedLines, + lines, anchorNode, anchorOffset: selection.anchor.offset, currentLine, parentBlock, - skipNormalization: true, }) return true diff --git a/web/oss/src/components/Editor/plugins/code/plugins/ClosingBracketIndentationPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/ClosingBracketIndentationPlugin.tsx deleted file mode 100644 index 335bd63efd..0000000000 --- a/web/oss/src/components/Editor/plugins/code/plugins/ClosingBracketIndentationPlugin.tsx +++ /dev/null @@ -1,216 +0,0 @@ -// plugins/ClosingBracketIndentationPlugin.tsx -import {useEffect} from "react" - -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {$getSelection, $isRangeSelection, COMMAND_PRIORITY_HIGH, KEY_DOWN_COMMAND} from "lexical" - -import {$isCodeBlockNode} from "../nodes/CodeBlockNode" -import {$isCodeLineNode} from "../nodes/CodeLineNode" -import {$createCodeTabNode, $isCodeTabNode} from "../nodes/CodeTabNode" -import {createLogger} from "../utils/createLogger" - -const log = createLogger("ClosingBracketIndentationPlugin", { - disabled: true, -}) - -export function ClosingBracketIndentationPlugin() { - const [editor] = useLexicalComposerContext() - - useEffect(() => { - const removeListener = editor.registerCommand( - KEY_DOWN_COMMAND, - (event: KeyboardEvent) => { - // Only handle closing brackets: }, ], ) - const closingBrackets = ["}", "]", ")"] - if (!closingBrackets.includes(event.key)) { - return false - } - - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed()) { - return false - } - - const anchorNode = selection.anchor.getNode() - let currentLine = anchorNode.getParent() - - // Find the current code line - if (!$isCodeLineNode(currentLine)) { - if ($isCodeBlockNode(currentLine)) { - const line = currentLine.getChildren().find($isCodeLineNode) - if (line) { - currentLine = line - } else { - return false - } - } else { - return false - } - } - - const parentBlock = currentLine.getParent() - if (!$isCodeBlockNode(parentBlock)) { - return false - } - - // Check if there's content before the cursor (inline closing bracket) - const currentLineChildren = currentLine.getChildren() - let hasContentBeforeCursor = false - let foundCursor = false - - for (const child of currentLineChildren) { - if (child.getKey() === anchorNode.getKey()) { - // Check if there's content before the cursor in this node - const textContent = child.getTextContent() - const cursorOffset = selection.anchor.offset - const textBeforeCursor = textContent.slice(0, cursorOffset) - if (textBeforeCursor.trim().length > 0) { - hasContentBeforeCursor = true - } - foundCursor = true - break - } else if (!foundCursor) { - // Check if this child (before cursor) has non-whitespace content - const textContent = child.getTextContent() - if (textContent.trim().length > 0) { - hasContentBeforeCursor = true - } - } - } - - log("Closing bracket detected", { - key: event.key, - currentLine: currentLine.getTextContent(), - hasContentBeforeCursor, - }) - - // If there's content before the cursor, this is an inline closing bracket - // Don't adjust indentation in this case - if (hasContentBeforeCursor) { - log("Inline closing bracket detected, skipping indentation adjustment") - return false - } - - // Get all lines in the code block - const allLines = parentBlock.getChildren().filter($isCodeLineNode) - const currentLineIndex = allLines.findIndex( - (line) => line.getKey() === currentLine.getKey(), - ) - - if (currentLineIndex === -1) { - return false - } - - // Find the matching opening bracket by scanning backwards - const matchingBrackets = { - "}": "{", - "]": "[", - ")": "(", - } - - const openingBracket = matchingBrackets[event.key as keyof typeof matchingBrackets] - let bracketCount = 0 - let matchingLineIndex = -1 - - // Scan backwards from current line to find matching opening bracket - for (let i = currentLineIndex - 1; i >= 0; i--) { - const lineText = allLines[i].getTextContent() - - // Count brackets in this line - for (const char of lineText) { - if (char === event.key) { - bracketCount++ - } else if (char === openingBracket) { - if (bracketCount === 0) { - matchingLineIndex = i - break - } - bracketCount-- - } - } - - if (matchingLineIndex !== -1) { - break - } - } - - if (matchingLineIndex === -1) { - log("No matching opening bracket found") - return false - } - - // Get the indentation level of the matching opening bracket line - const matchingLine = allLines[matchingLineIndex] - const matchingLineText = matchingLine.getTextContent() - const matchingIndentLevel = (matchingLineText.match(/^\t*/)?.[0] || "").length - - log("Found matching bracket", { - matchingLineIndex, - matchingLineText, - matchingIndentLevel, - }) - - // Remove excess tabs from the current line - const lineChildren = currentLine.getChildren() - const leadingTabs = [] - - for (const child of lineChildren) { - if ($isCodeTabNode(child)) { - leadingTabs.push(child) - } else { - break - } - } - - const currentIndentLevel = leadingTabs.length - - log("Current indentation", { - currentIndentLevel, - targetIndentLevel: matchingIndentLevel, - }) - - // Only adjust if indentation is wrong - if (currentIndentLevel !== matchingIndentLevel) { - // Remove excess tabs or add missing tabs - if (currentIndentLevel > matchingIndentLevel) { - // Remove excess tabs - const tabsToRemove = currentIndentLevel - matchingIndentLevel - for (let i = 0; i < tabsToRemove; i++) { - if (leadingTabs[i]) { - leadingTabs[i].remove() - } - } - } else { - // Add missing tabs - const tabsToAdd = matchingIndentLevel - currentIndentLevel - const firstNonTabChild = currentLineChildren.find( - (child) => !$isCodeTabNode(child), - ) - - for (let i = 0; i < tabsToAdd; i++) { - const tabNode = $createCodeTabNode() - if (firstNonTabChild) { - firstNonTabChild.insertBefore(tabNode) - } else { - currentLine.append(tabNode) - } - } - } - - log("Adjusted indentation", { - from: currentIndentLevel, - to: matchingIndentLevel, - }) - } - - // Let the normal character input proceed - return false - }, - COMMAND_PRIORITY_HIGH, - ) - - return () => removeListener() - }, [editor]) - - return null -} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/CodeBlockFoldingPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/CodeBlockFoldingPlugin.tsx new file mode 100644 index 0000000000..2c7f9495c4 --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/plugins/CodeBlockFoldingPlugin.tsx @@ -0,0 +1,319 @@ +/** + * CodeBlockFoldingPlugin.tsx + * + * This plugin implements code folding functionality in the editor. + * It allows users to collapse and expand code blocks based on indentation levels, + * providing better code organization and readability. + * + * Features: + * - Indentation-based code folding + * - Visual indicators for foldable regions + * - Maintains fold state during editing + * - Updates line visibility and gutter display + * + * @module CodeBlockFoldingPlugin + */ +import {useCallback, useEffect, useRef} from "react" + +import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" +import {$getRoot} from "lexical" + +import {$isCodeBlockNode, CodeBlockNode} from "../nodes/CodeBlockNode" +import {$isCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" +import {createLogger} from "../utils/createLogger" + +const log = createLogger("CodeBlockFoldingPlugin", { + disabled: true, +}) + +/** + * Handles click events on fold/unfold toggles. + * Manages the folding state of code blocks and updates the visibility + * of nested lines based on indentation. + * + * @param editor - The Lexical editor instance + * @param line - The CodeLineNode that was clicked + */ +function handleFoldClick(editor: any, line: CodeLineNode) { + log("Starting fold operation", { + lineKey: line.getKey(), + lineContent: line.getTextContent(), + currentState: line.isCollapsed(), + }) + + /** + * Update folding state in editor: + * 1. Toggle collapsed state of clicked line + * 2. Update line's internal state + * 3. Log state change for debugging + */ + editor.update(() => { + const isNowCollapsed = !line.isCollapsed() + line.setCollapsed(isNowCollapsed) + + log("Set collapsed state", { + isNowCollapsed, + lineKey: line.getKey(), + }) + + /** + * Prepare for nested line processing: + * 1. Get base line's indentation level + * 2. Find first nested line + * 3. Use regex to extract leading whitespace + */ + const text = line.getTextContent() + const baseIndent = text.match(/^\s*/)?.[0].length || 0 + let currentLine = line.getNextSibling() + + log("Starting to process nested lines", { + baseIndent, + baseText: text, + isNowCollapsed, + }) + + /** + * Update visual fold indicator: + * 1. Find line's DOM element + * 2. Locate fold toggle button + * 3. Update arrow direction based on state + * - ▸ for collapsed (right arrow) + * - ▾ for expanded (down arrow) + */ + const lineDom = editor.getElementByKey(line.getKey()) + if (lineDom) { + const btn = lineDom.querySelector(".fold-toggle") + if (btn) { + btn.textContent = isNowCollapsed ? "▸" : "▾" + } + } + + /** + * Process nested lines: + * 1. Track number of lines processed + * 2. Check each line's indentation + * 3. Stop at first line with same/less indent + * 4. Log processing details for debugging + */ + let processedLines = 0 + while (currentLine && $isCodeLineNode(currentLine)) { + const content = currentLine.getTextContent() + const currentIndent = content.match(/^\s*/)?.[0].length || 0 + + log("Processing line", { + lineKey: currentLine.getKey(), + content, + currentIndent, + baseIndent, + }) + + // Break at end of nested block + if (currentIndent <= baseIndent) { + log("Found end of nested block", { + currentIndent, + baseIndent, + }) + break + } + + /** + * Update line visibility: + * 1. Set hidden state based on fold state + * 2. Track number of processed lines + * 3. Move to next sibling for processing + */ + currentLine.setHidden(isNowCollapsed) + processedLines++ + + currentLine = currentLine.getNextSibling() + } + + /** + * Log operation completion: + * 1. Track total lines processed + * 2. Record final fold state + * 3. Provide debug info for verification + */ + log("Completed fold operation", { + processedLines, + finalState: isNowCollapsed, + }) + }) +} + +/** + * React component that implements code folding functionality. + * Integrates with Lexical editor to provide code folding features and + * manages the folding state of code blocks. + * + * Key features: + * - Detects foldable regions based on indentation + * - Updates fold indicators in real-time + * - Maintains fold state during edits + * - Synchronizes with gutter display + * + * @returns null - This is a behavior-only plugin + */ +export function CodeBlockFoldingPlugin() { + /** + * Plugin state initialization: + * 1. Get editor context for mutations + * 2. Track root element for event handling + * 3. Store click handler for cleanup + */ + const [editor] = useLexicalComposerContext() + const rootElementRef = useRef<HTMLElement | null>(null) + const clickHandlerRef = useRef<((e: MouseEvent) => void) | null>(null) + + /** + * Click event handler setup: + * 1. Memoize handler for performance + * 2. Extract target element info + * 3. Log click details for debugging + * 4. Process fold toggle clicks + */ + const handleClick = useCallback( + (e: MouseEvent) => { + const target = e.target as HTMLElement + log("[Fold] Click target:", { + className: target.className, + tagName: target.tagName, + textContent: target.textContent, + }) + + /** + * Fold toggle click processing: + * 1. Check if click was on fold button + * 2. Find parent line element + * 3. Log element search results + * 4. Handle fold state changes + */ + if (target.classList.contains("fold-toggle")) { + log("[Fold] Fold button clicked") + const lineElement = target.closest(".editor-code-line") + log("[Fold] Looking for line element:", { + found: !!lineElement, + parentElement: target.parentElement?.className, + }) + + if (!lineElement) { + console.warn("[Fold] Could not find parent line element") + return + } + + const key = lineElement.getAttribute("data-lexical-node-key") + log("[Fold] Line element attributes:", { + key, + className: lineElement.className, + attributes: Array.from(lineElement.attributes).map( + (attr) => `${attr.name}=${attr.value}`, + ), + }) + + if (!key) { + console.warn("[Fold] Line element missing node key") + return + } + + log("[Fold] Found line element", { + key, + content: lineElement.textContent, + }) + + editor.getEditorState().read(() => { + log("[Fold] Reading editor state") + const node = editor.getEditorState()._nodeMap.get(key) + log("[Fold] Found node:", { + exists: !!node, + type: node?.getType(), + isCodeLine: $isCodeLineNode(node), + key, + }) + + if ($isCodeLineNode(node)) { + handleFoldClick(editor, node) + } else { + console.warn("[Fold] Node is not a CodeLineNode", { + key, + nodeType: node?.getType(), + }) + } + }) + } + }, + [editor], + ) + + // Setup and cleanup click handler + useEffect(() => { + const removeClickListener = editor.registerRootListener( + (rootElement: null | HTMLElement) => { + // Clean up old listener + if (clickHandlerRef.current && rootElementRef.current) { + rootElementRef.current.removeEventListener("click", clickHandlerRef.current) + } + + // Set up new listener + if (rootElement) { + rootElementRef.current = rootElement + clickHandlerRef.current = handleClick + rootElement.addEventListener("click", handleClick) + } + }, + ) + + // Set up folding state + const removeMutationListener = editor.registerMutationListener(CodeBlockNode, () => { + log("[Fold] Mutation detected") + editor.update(() => { + const root = $getRoot() + const codeBlock = root.getFirstChild() + if (!$isCodeBlockNode(codeBlock)) { + log("[Fold] No code block found") + return + } + + const language = codeBlock.getLanguage() + log("[Fold] Processing code block", {language}) + + const codeLines = codeBlock.getChildren().filter($isCodeLineNode) + log("[Fold] Found code lines", {count: codeLines.length}) + + codeLines.forEach((line) => { + const text = line.getTextContent() + const shouldBeFoldable = + (language === "json" && text.trim().endsWith("{")) || + (language === "yaml" && /:\s*$/.test(text.trim())) + + log("[Fold] Processing line", { + text: text.trim(), + shouldBeFoldable, + currentlyFoldable: line.isFoldable(), + key: line.getKey(), + }) + + if (shouldBeFoldable !== line.isFoldable()) { + line.setFoldable(shouldBeFoldable) + log("[Fold] Updated line foldability", { + key: line.getKey(), + foldable: shouldBeFoldable, + }) + } + }) + }) + }) + + return () => { + // Clean up click listener + if (clickHandlerRef.current && rootElementRef.current) { + rootElementRef.current.removeEventListener("click", clickHandlerRef.current) + clickHandlerRef.current = null + rootElementRef.current = null + } + removeClickListener() + removeMutationListener() + } + }, [editor]) + + return null +} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/CodeFoldingPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/CodeFoldingPlugin.tsx deleted file mode 100644 index 1e5d46162f..0000000000 --- a/web/oss/src/components/Editor/plugins/code/plugins/CodeFoldingPlugin.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import {useEffect, useState, useCallback, useRef} from "react" - -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {LexicalEditor} from "lexical" - -import {$isCodeBlockNode} from "../nodes/CodeBlockNode" -import {$isCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" -import {createLogger} from "../utils/createLogger" -import {getIndentCount, isFoldableLine} from "../utils/indent" - -const log = createLogger("CodeFoldingPlugin", {disabled: true}) - -interface LineInfo { - key: string - top: number - height: number - collapsed: boolean - foldable: boolean -} - -/** - * Toggle the collapsed state for a line and hide/show subsequent siblings whose - * indentation is deeper than the clicked line. - */ -function toggleFold(editor: LexicalEditor, line: CodeLineNode) { - const isNowCollapsed = !line.isCollapsed() - line.setCollapsed(isNowCollapsed) - - const baseIndent = getIndentCount(line.getTextContent()) - let currentLine = line.getNextSibling() as CodeLineNode | null - - let processed = 0 - while (currentLine && $isCodeLineNode(currentLine)) { - const currIndent = getIndentCount(currentLine.getTextContent()) - if (currIndent <= baseIndent) break - currentLine.setHidden(isNowCollapsed) - processed += 1 - currentLine = currentLine.getNextSibling() as CodeLineNode | null - } - - log("toggleFold processed", {processed, baseIndent}) - - log("Toggled fold", {line: line.getKey(), collapsed: isNowCollapsed}) -} - -/** - * Combined folding UI + logic plugin. Renders gutter buttons and manages - * foldable metadata via a node transform. - */ -export function CodeFoldingPlugin() { - const [editor] = useLexicalComposerContext() - const [lines, setLines] = useState<LineInfo[]>([]) - const rootRef = useRef<HTMLElement | null>(null) - - /* -------------------------------------------------- */ - /* Node transform – mark lines foldable */ - /* -------------------------------------------------- */ - useEffect(() => { - return editor.registerNodeTransform(CodeLineNode, (line) => { - const parent = line.getParent() - if (!$isCodeBlockNode(parent)) return - const language = parent.getLanguage() - const text = line.getTextContent() - const foldable = isFoldableLine(text, language) - - if (foldable !== line.isFoldable()) { - log("[Transform] line", {key: line.getKey(), foldable}) - line.setFoldable(foldable) - } - // Ensure collapsed flag resets when not foldable - if (!foldable && line.isCollapsed()) { - line.setCollapsed(false) - } - }) - }, [editor]) - - /* -------------------------------------------------- */ - /* Update listener – compute gutter positions */ - /* -------------------------------------------------- */ - useEffect(() => { - return editor.registerUpdateListener(({editorState}) => { - editorState.read(() => { - const root = editor.getRootElement() - if (!root) return - if (!rootRef.current) rootRef.current = root - const domRoot = root as HTMLElement - const lineEls = domRoot.querySelectorAll<HTMLElement>("div.editor-code-line") - const next: LineInfo[] = [] - lineEls.forEach((el) => { - const key = el.getAttribute("data-lexical-node-key") || "" - const node = editorState._nodeMap.get(key) as CodeLineNode | undefined - if (!$isCodeLineNode(node)) return - const rect = el.getBoundingClientRect() - const top = rect.top + domRoot.scrollTop - domRoot.getBoundingClientRect().top - const height = rect.height - const language = - ($isCodeBlockNode(node.getParent()) && - (node.getParent() as any).getLanguage?.()) || - "json" - const text = node.getTextContent() - const foldable = isFoldableLine(text, language) - next.push({ - key, - top, - height, - collapsed: node.isCollapsed(), - foldable, - }) - }) - log("[Update] computed lines", next.length) - setLines(next) - }) - }) - }, [editor]) - - /* -------------------------------------------------- */ - /* Render gutter buttons */ - /* -------------------------------------------------- */ - const handleClick = useCallback( - (lineKey: string) => { - log("[Click] fold button", lineKey) - editor.update(() => { - const node = editor.getEditorState()._nodeMap.get(lineKey) as - | CodeLineNode - | undefined - if ($isCodeLineNode(node) && node.isFoldable()) { - toggleFold(editor, node) - } - }) - }, - [editor], - ) - - if (lines.length === 0) return null - - return ( - <div style={{position: "absolute", left: 0, top: 0}}> - {lines.map((line) => { - return ( - <button - key={line.key} - style={{ - position: "absolute", - left: "4px", - top: line.top + 8, - width: "min-content", - height: line.height, - background: "none", - border: "none", - cursor: line.foldable ? "pointer" : "default", - fontSize: "10px", - color: "#888", - zIndex: 1, - pointerEvents: line.foldable ? "auto" : "none", - display: "flex", - alignItems: "center", - justifyContent: "center", - padding: 0, - margin: 0, - }} - onClick={() => handleClick(line.key)} - > - {line.foldable ? (line.collapsed ? "▸" : "▾") : ""} - </button> - ) - })} - </div> - ) -} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/DiffHighlightPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/DiffHighlightPlugin.tsx deleted file mode 100644 index eea97df2b3..0000000000 --- a/web/oss/src/components/Editor/plugins/code/plugins/DiffHighlightPlugin.tsx +++ /dev/null @@ -1,398 +0,0 @@ -/** - * DiffHighlightPlugin.tsx - * - * This plugin provides diff highlighting functionality for code blocks with support - * for both JSON and YAML content. It processes original and modified content to - * generate and display unified diff format with proper syntax highlighting. - * - * ## Features: - * - Automatic detection of diff format lines - * - Support for unified diff format - * - JSON and YAML language support - * - Integration with existing syntax highlighting - * - Line-by-line diff state management - * - Real-time diff computation - * - * ## How It Works: - * - * ### 1. Content Processing - * When `originalContent` and `modifiedContent` are provided: - * - Content is parsed based on the `language` parameter ("json" | "yaml") - * - Objects are normalized and re-serialized for consistent formatting - * - Line-by-line diff is computed using the `computeDiff` utility - * - * ### 2. Diff Format - * The plugin generates GitHub-style diff format: - * ``` - * oldLineNum|newLineNum|type|content - * ``` - * Where: - * - `oldLineNum`: Line number in original content (empty for added lines) - * - `newLineNum`: Line number in modified content (empty for removed lines) - * - `type`: "added" | "removed" | "context" - * - `content`: The actual line content - * - * ### 3. Language Support - * **JSON Mode (`language="json"`):** - * - Parses content as JSON objects - * - Re-serializes with consistent 2-space indentation - * - Handles JSON syntax errors gracefully - * - * **YAML Mode (`language="yaml"`):** - * - Parses content as YAML objects using `js-yaml` - * - Re-serializes with consistent 2-space indentation - * - Handles YAML syntax errors gracefully - * - * ### 4. Visual Highlighting - * - Added lines: Green background with "+" indicator - * - Removed lines: Red background with "-" indicator - * - Context lines: Normal styling - * - Line numbers displayed for both old and new versions - * - * ## Usage Examples: - * - * ### Basic Usage - * ```tsx - * <DiffHighlightPlugin - * originalContent='{"name": "old"}' - * modifiedContent='{"name": "new"}' - * language="json" - * /> - * ``` - * - * ### YAML Diff - * ```tsx - * <DiffHighlightPlugin - * originalContent="name: old-service\nversion: 1.0.0" - * modifiedContent="name: new-service\nversion: 1.1.0" - * language="yaml" - * /> - * ``` - * - * ### Integration with EditorWrapper - * ```tsx - * <EditorWrapper - * additionalCodePlugins={[ - * <DiffHighlightPlugin - * originalContent={original} - * modifiedContent={modified} - * language={language} - * /> - * ]} - * /> - * ``` - * - * ## Error Handling: - * - Invalid JSON/YAML content is handled gracefully - * - Parsing errors don't crash the diff computation - * - Fallback to string-based diff for unparseable content - * - * @module DiffHighlightPlugin - */ - -import {useEffect} from "react" - -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import yaml from "js-yaml" -import JSON5 from "json5" -import {$createTextNode, $getRoot, COMMAND_PRIORITY_CRITICAL} from "lexical" - -import { - INITIAL_CONTENT_COMMAND, - InitialContentPayload, -} from "../../../commands/InitialContentCommand" -import {computeDiff, isContentIncomplete} from "../../../utils/diffUtils" -import {$createCodeBlockNode} from "../nodes/CodeBlockNode" -import {CodeBlockNode} from "../nodes/CodeBlockNode" -import {$createCodeLineNode} from "../nodes/CodeLineNode" -import {$isCodeLineNode, CodeLineNode, DiffType} from "../nodes/CodeLineNode" - -/** - * Parses a GitHub-style diff line and extracts line numbers and diff type - * @param lineContent - The text content in format "oldLineNum|newLineNum|type|content" - * @returns Parsed diff information or null if not a valid diff line - */ -function parseDiffLine(lineContent: string): { - oldLineNumber?: number - newLineNumber?: number - diffType: DiffType - content: string -} | null { - // Check if this is our new format: "oldLineNum|newLineNum|type|content" or fold format - const parts = lineContent.split("|") - // Parse diff line format - - if (parts.length >= 4) { - const [oldNumStr, newNumStr, type, ...contentParts] = parts - - if (type === "fold") { - // Special handling for fold lines: "startLine-endLine|startLine-endLine|fold|content|foldedLineCount" - const content = contentParts.slice(0, -1).join("|") // All but last part is content - const _foldedLineCount = parseInt(contentParts[contentParts.length - 1] || "0", 10) - - // For fold lines, we want to display the range as-is - // The oldNumStr and newNumStr are both "startLine-endLine" format - // We'll store the start and end as separate numbers for CSS display - const lineRange = oldNumStr.split("-") - const startLine = lineRange[0] ? parseInt(lineRange[0], 10) : undefined - const endLine = lineRange[1] ? parseInt(lineRange[1], 10) : undefined - - return { - oldLineNumber: startLine, - newLineNumber: endLine, - diffType: "fold" as DiffType, - content, - } - } else { - // Regular diff lines - const content = contentParts.join("|") // Rejoin in case content had pipes - - const oldLineNumber = - oldNumStr && oldNumStr.trim() !== "" ? parseInt(oldNumStr, 10) : undefined - const newLineNumber = - newNumStr && newNumStr.trim() !== "" ? parseInt(newNumStr, 10) : undefined - const diffType = type as DiffType - - return { - oldLineNumber, - newLineNumber, - diffType, - content, - } - } - } - - // Fallback to old format detection - const trimmed = lineContent.trim() - if (trimmed.startsWith("+") && !trimmed.startsWith("+++")) { - // For added lines, remove the + prefix but preserve indentation of the actual content - const contentWithoutPrefix = lineContent.replace(/^\s*\+/, "") - return {diffType: "added", content: contentWithoutPrefix} - } - if (trimmed.startsWith("-") && !trimmed.startsWith("---")) { - // For removed lines, remove the - prefix but preserve indentation of the actual content - const contentWithoutPrefix = lineContent.replace(/^\s*-/, "") - return {diffType: "removed", content: contentWithoutPrefix} - } - - // For context lines, preserve the original content with indentation - return {diffType: "context", content: lineContent} -} - -/** - * Checks if a code block contains diff content - * @param blockText - The full text content of the code block - * @returns True if the block appears to contain diff content - */ -function isDiffContent(blockText: string): boolean { - const lines = blockText.split("\n") - let diffLineCount = 0 - - for (const line of lines) { - const parsed = parseDiffLine(line) - // Check if it's a valid diff line (has diff type other than context or has line numbers) - if ( - parsed && - (parsed.diffType !== "context" || parsed.oldLineNumber || parsed.newLineNumber) - ) { - diffLineCount++ - } - } - - const ratio = diffLineCount / lines.length - const isDiff = diffLineCount > 0 && ratio > 0.1 // Lower threshold for GitHub-style format - - // Check if content appears to be diff format - - return isDiff -} - -/** - * DiffHighlightPlugin component - * Automatically detects and highlights diff content in code blocks - */ -export default function DiffHighlightPlugin({ - originalContent, - modifiedContent, - language = "json", - enableFolding = false, - foldThreshold = 5, - showFoldedLineCount = true, -}: { - originalContent?: string - modifiedContent?: string - language?: "json" | "yaml" - enableFolding?: boolean - foldThreshold?: number - showFoldedLineCount?: boolean -} = {}): null { - const [editor] = useLexicalComposerContext() - - useEffect(() => { - // Register command listener to handle initial content - const removeCommandListener = editor.registerCommand( - INITIAL_CONTENT_COMMAND, - (payload: InitialContentPayload) => { - // Check if this is a diff request with original and modified content - if (payload.isDiffRequest && payload.originalContent && payload.modifiedContent) { - // Prevent default handling by the InsertInitialCodeBlockPlugin - payload.preventDefault() - // Compute diff and handle editor hydration - editor.update(() => { - try { - // Check if content is incomplete - const originalIncomplete = isContentIncomplete( - payload.originalContent!, - payload.language, - ) - const modifiedIncomplete = isContentIncomplete( - payload.modifiedContent!, - payload.language, - ) - - if (originalIncomplete || modifiedIncomplete) { - // Don't compute diff for incomplete content - return - } - - // Parse content based on language - let originalData: any, modifiedData: any - - if (payload.language === "yaml") { - originalData = yaml.load(payload.originalContent!) - modifiedData = yaml.load(payload.modifiedContent!) - } else { - originalData = JSON5.parse(payload.originalContent!) - modifiedData = JSON5.parse(payload.modifiedContent!) - } - - const diffContent = computeDiff(originalData, modifiedData, { - language: payload.language, - enableFolding, - foldThreshold, - showFoldedLineCount, - }) - - // Check if diff contains only context lines (no actual changes) - const hasChanges = - diffContent.includes("|added|") || diffContent.includes("|removed|") - - if (!hasChanges && diffContent.trim()) { - // All lines are context - no actual differences, clear editor - const root = $getRoot() - root.clear() - return - } - - // Create code block with diff content - const root = $getRoot() - root.clear() - - const codeBlock = $createCodeBlockNode(payload.language) - const lines = diffContent.split("\n") - - lines.forEach((lineContent, index) => { - if (lineContent.trim() || index < lines.length - 1) { - const lineNode = $createCodeLineNode() - lineNode.append($createTextNode(lineContent)) - codeBlock.append(lineNode) - } - }) - - root.append(codeBlock) - } catch (parseError) { - // Handle parse errors - could set error state if needed - console.warn("DiffHighlightPlugin: Parse error", parseError) - } - }) - - return true // Command handled - } - return false // Let other plugins handle it - }, - COMMAND_PRIORITY_CRITICAL, - ) - // Register a transform that runs on CodeBlockNode changes - const removeTransform = editor.registerNodeTransform( - CodeBlockNode, - (codeBlockNode: CodeBlockNode) => { - const blockText = codeBlockNode.getTextContent() - // Process code block for diff highlighting - - // Check if this block contains diff content - if (!isDiffContent(blockText)) { - // Clear diff styling for non-diff content - // Clear any existing diff styling if this is no longer diff content - const codeLines = codeBlockNode.getChildren().filter($isCodeLineNode) - codeLines.forEach((line: CodeLineNode) => { - if (line.getDiffType() !== null) { - line.setDiffType(null) - } - }) - return - } - - // Process each line for diff highlighting - const codeLines = codeBlockNode.getChildren().filter($isCodeLineNode) - - codeLines.forEach((lineNode: CodeLineNode, index: number) => { - const lineContent = lineNode.getTextContent() - const parsed = parseDiffLine(lineContent) - // Process individual line for diff styling - - if (parsed) { - const currentDiffType = lineNode.getDiffType() - const currentOldLineNumber = lineNode.getOldLineNumber() - const currentNewLineNumber = lineNode.getNewLineNumber() - const currentContent = lineNode.getTextContent() - - // Update diff type if changed - if (parsed.diffType !== currentDiffType) { - lineNode.setDiffType(parsed.diffType) - } - - // Update line numbers if changed - if (parsed.oldLineNumber !== currentOldLineNumber) { - lineNode.setOldLineNumber(parsed.oldLineNumber) - } - - if (parsed.newLineNumber !== currentNewLineNumber) { - lineNode.setNewLineNumber(parsed.newLineNumber) - } - - // Update line content to remove diff formatting (preserve indentation) - const cleanContent = parsed.content - if (cleanContent !== currentContent) { - // Replace the line content with the cleaned content - lineNode.clear() - lineNode.append($createTextNode(cleanContent)) - } - } - }) - }, - ) - - return () => { - removeCommandListener() - removeTransform() - } - }, [editor]) - - // Dispatch diff computation command when original/modified content is provided - useEffect(() => { - if (originalContent && modifiedContent) { - const payload: InitialContentPayload = { - content: "test", // Not used for diff requests - language: language, // Use the language parameter - preventDefault: () => {}, - isDefaultPrevented: () => false, - originalContent, - modifiedContent, - isDiffRequest: true, - } - editor.dispatchCommand(INITIAL_CONTENT_COMMAND, payload) - } - }, [originalContent, modifiedContent, editor]) - - return null -} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/EmptyNodeTransformPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/EmptyNodeTransformPlugin.tsx new file mode 100644 index 0000000000..9d2015de36 --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/plugins/EmptyNodeTransformPlugin.tsx @@ -0,0 +1,402 @@ +/** + * EmptyNodeTransformPlugin.tsx + * + * This plugin ensures proper handling of empty CodeHighlightNodes and removes zero-width spaces. + * It also fixes invalid selections on TabNodes and other non-editable nodes. + * Additionally, it cleans up redundant nodes and merges adjacent CodeHighlightNodes when appropriate. + * It uses a selection change command to ensure compatibility with other plugins while maintaining + * proper caret visibility. + */ +import {useEffect} from "react" + +import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" +import { + $getSelection, + $isRangeSelection, + $createRangeSelection, + $setSelection, + $isTabNode, + LexicalNode, + RangeSelection, +} from "lexical" + +import {$isCodeHighlightNode} from "../nodes/CodeHighlightNode" +import {$isCodeLineNode} from "../nodes/CodeLineNode" +import {createLogger} from "../utils/createLogger" + +const PLUGIN_NAME = "EmptyNodeTransformPlugin" +const log = createLogger(PLUGIN_NAME, {disabled: true}) + +// Flag to prevent recursive cleanup operations +let isCleanupInProgress = false + +/** + * Plugin that ensures proper handling of nodes in code blocks by: + * 1. Removing zero-width spaces from nodes while preserving selection + * 2. Ensuring empty nodes are properly styled for caret visibility + * 3. Fixing invalid selections on TabNodes and other non-editable nodes + * 4. Moving selection to adjacent editable nodes when needed + * 5. Cleaning up redundant nodes (e.g., empty nodes after content nodes) + * 6. Merging adjacent CodeHighlightNodes with the same formatting + * + * Uses the selection change command to monitor and fix issues without disrupting other plugins. + */ +export function EmptyNodeTransformPlugin() { + const [editor] = useLexicalComposerContext() + + useEffect(() => { + // Register a listener for editor updates to clean up redundant nodes + const removeUpdateListener = editor.registerUpdateListener(({editorState}) => { + editorState.read(() => { + const selection = $getSelection() + if (!$isRangeSelection(selection) || isCleanupInProgress) { + return + } + + // Get the current node where the selection is + const anchorNode = selection.anchor.getNode() + + // Find all code line nodes in the editor and clean them up + const codeLines = anchorNode.getParents().filter($isCodeLineNode) + if (codeLines.length > 0) { + // Clean up the current code line + editor.update( + () => { + $cleanupRedundantNodes(anchorNode, selection) + }, + { + skipTransforms: true, + }, + ) + } + }) + }) + + // Register a command to handle selection changes + // const removeSelectionListener = editor.registerCommand( + // SELECTION_CHANGE_COMMAND, + // () => { + // log("SELECTION CHANGE COMMAND") + // const selection = $getSelection() + // if (!$isRangeSelection(selection)) { + // return false + // } + + // // Get the current node where the selection is + // const anchorNode = selection.anchor.getNode() + + // // Clean up redundant nodes in the current line + // // Only run if we're not already in a cleanup operation + // if (!isCleanupInProgress) { + // $cleanupRedundantNodes(anchorNode, selection) + // } + + // // Handle TabNode selection issue - but allow selections at offset 0 + // // This lets users navigate to tab nodes with left arrow key + // const currentNodeKey = anchorNode.getKey() + + // // Skip if we're in a cleanup or if we've just seen this tab node + // // This prevents interference with the HorizontalNavigationPlugin + // if ( + // $isTabNode(anchorNode) && + // selection.anchor.offset > 0 && + // !isCleanupInProgress && + // currentNodeKey !== lastTabNodeKey + // ) { + // // Remember this node to avoid processing it again immediately + // lastTabNodeKey = currentNodeKey + + // // Clear the lastTabNodeKey after a short delay + // setTimeout(() => { + // lastTabNodeKey = null + // }, 100) + // log("⚠️ Selection on TabNode detected", { + // nodeKey: anchorNode.getKey(), + // nodeType: anchorNode.getType(), + // offset: selection.anchor.offset, + // }) + + // // Find a suitable node to move selection to + // const parent = anchorNode.getParent() + // if ($isCodeLineNode(parent)) { + // // Try to find a CodeHighlightNode sibling + // const nextSibling = anchorNode.getNextSibling() + // const prevSibling = anchorNode.getPreviousSibling() + + // // Prefer next sibling, then previous, then create new if needed + // let targetNode = null + // let targetOffset = 0 + + // if (nextSibling && $isCodeHighlightNode(nextSibling)) { + // targetNode = nextSibling + // targetOffset = 0 // Beginning of next node + // } else if (prevSibling && $isCodeHighlightNode(prevSibling)) { + // targetNode = prevSibling + // targetOffset = prevSibling.getTextContentSize() // End of previous node + // } + + // if (targetNode) { + // log("🔄 Moving selection to adjacent CodeHighlightNode", { + // from: anchorNode.getKey(), + // to: targetNode.getKey(), + // offset: targetOffset, + // }) + + // // Create and set the new selection + // const newSelection = $createRangeSelection() + // newSelection.anchor.set(targetNode.getKey(), targetOffset, "text") + // newSelection.focus.set(targetNode.getKey(), targetOffset, "text") + // $setSelection(newSelection) + // return true + // } + // } + // } + + // // Only process CodeHighlightNodes for zero-width space removal + // if (!$isCodeHighlightNode(anchorNode)) { + // return false + // } + + // log("Selection in CodeHighlightNode:", { + // nodeKey: anchorNode.getKey(), + // text: anchorNode.getTextContent(), + // textLength: anchorNode.getTextContent().length, + // }) + + // // Check if the node contains zero-width spaces and remove them + // const text = anchorNode.getTextContent() + // if (text.includes("\u200B")) { + // log("Found zero-width space, removing it") + + // // Store current selection position + // const currentOffset = selection.anchor.offset + + // // Count zero-width spaces before the current position to adjust offset + // const zeroWidthSpacesBeforeCursor = ( + // text.substring(0, currentOffset).match(/\u200B/g) || [] + // ).length + + // // Remove zero-width spaces + // const writable = anchorNode.getWritable() + // const newText = text.replace(/\u200B/g, "") + // writable.setTextContent(newText) + + // // Calculate new offset (current offset minus removed zero-width spaces) + // const newOffset = Math.max(0, currentOffset - zeroWidthSpacesBeforeCursor) + + // // Create a new selection at the adjusted position + // const newSelection = $createRangeSelection() + // newSelection.anchor.set(anchorNode.getKey(), newOffset, "text") + // newSelection.focus.set(anchorNode.getKey(), newOffset, "text") + // $setSelection(newSelection) + + // log("After removing zero-width space:", { + // newText, + // originalOffset: currentOffset, + // newOffset, + // zeroWidthSpacesBeforeCursor, + // }) + + // // After removing zero-width spaces, the update listener will handle cleanup + // } + + // // If the node is empty, make sure it has the proper class + // // This is handled by the node's createDOM and updateDOM methods + // // but we ensure it's triggered by marking the node as dirty if needed + // if (anchorNode.getTextContent() === "") { + // log("Empty node detected, marking for re-render") + // // Force a re-render of the node to ensure proper styling + // anchorNode.getWritable() + // // No need to actually change anything, just accessing the writable + // // will mark the node as dirty and trigger a re-render + // } + + // return false + // }, + // COMMAND_PRIORITY_LOW, + // ) + + // Return cleanup function to remove listeners + return () => { + removeUpdateListener() + // removeSelectionListener() + } + }, [editor]) + + return null +} + +/** + * Cleans up redundant nodes in a code line and adjacent lines, such as: + * - Empty CodeHighlightNodes after content nodes + * - Adjacent CodeHighlightNodes that can be merged + * - Zero-width space nodes that are unnecessary + * - Removes highlight nodes with only zero-width chars when not the only non-tab node + * + * Uses a flag to prevent recursive invocation and limits the number of operations + * to avoid infinite loops. + * + * @param currentNode - The node where the selection is currently located + * @param selection - The current selection + */ +function $cleanupRedundantNodes(currentNode: LexicalNode, selection: RangeSelection) { + // Set flag to prevent recursive cleanup + isCleanupInProgress = true + + // Find the parent CodeLineNode to examine all its children + const codeLine = currentNode.getParents().find($isCodeLineNode) + if (!codeLine) { + isCleanupInProgress = false + return + } + + // Get the parent code block to find adjacent lines + const codeBlock = codeLine.getParent() + if (!codeBlock) { + isCleanupInProgress = false + return + } + + // Find the current line's index in the code block + const codeLines = codeBlock.getChildren() + const currentLineIndex = codeLines.findIndex((line) => line.getKey() === codeLine.getKey()) + + if (currentLineIndex === -1) { + isCleanupInProgress = false + return + } + + // Get previous and next lines if they exist + const prevLine = currentLineIndex > 0 ? codeLines[currentLineIndex - 1] : null + const nextLine = + currentLineIndex < codeLines.length - 1 ? codeLines[currentLineIndex + 1] : null + + // Process the current line first + $processLine(codeLine, selection) + + // Process previous and next lines if they exist + if (prevLine && $isCodeLineNode(prevLine)) { + $processLine(prevLine, selection) + } + + if (nextLine && $isCodeLineNode(nextLine)) { + $processLine(nextLine, selection) + } + + // Reset flag after cleanup is complete + isCleanupInProgress = false +} + +/** + * Process a single line to clean up redundant nodes + * @param codeLine - The CodeLineNode to process + * @param selection - The current selection + */ +function $processLine(codeLine: LexicalNode, selection: RangeSelection) { + const children = codeLine.getChildren() + if (children.length <= 1) { + return + } // Nothing to clean up + + // Store selection info for restoring later if needed + const selectionInfo = { + anchorKey: selection.anchor.key, + anchorOffset: selection.anchor.offset, + focusKey: selection.focus.key, + focusOffset: selection.focus.offset, + } + + const nodesMerged = false + let redundantNodesRemoved = false + + // Limit the number of operations to prevent infinite loops + const _MAX_OPERATIONS = 10 + let operationCount = 0 + + // Count non-tab nodes and content nodes (nodes with actual text content) + const nonTabNodes = children.filter((node) => !$isTabNode(node)) + const contentNodes = nonTabNodes.filter((node) => { + if (!$isCodeHighlightNode(node)) return true + const text = node.getTextContent() + return text !== "" && text !== "\u200B" && !text.match(/^\u200B+$/) + }) + + // First pass: identify and remove nodes with only zero-width spaces when not the only content node + if (contentNodes.length > 0) { + for (let i = children.length - 1; i >= 0; i--) { + const node = children[i] + + // Skip non-CodeHighlightNodes and tab nodes + if (!$isCodeHighlightNode(node) || $isTabNode(node)) continue + + const text = node.getTextContent() + + // Check if this node only contains zero-width spaces + if (text.match(/^\u200B+$/) || text === "") { + // Only remove if it's not the only non-tab node and not the current selection + if (nonTabNodes.length > 1 && node.getKey() !== selectionInfo.anchorKey) { + log("🧹 Removing node with only zero-width spaces", { + nodeKey: node.getKey(), + content: text, + nonTabNodesCount: nonTabNodes.length, + }) + + // Remove the node + node.remove() + redundantNodesRemoved = true + operationCount++ + } + } + } + } + + // Refresh children list after removals + const updatedChildren = codeLine.getChildren() + + // Second pass: identify and handle redundant zero-width space nodes + for (let i = 0; i < updatedChildren.length; i++) { + const node = updatedChildren[i] + + // Skip non-CodeHighlightNodes + if (!$isCodeHighlightNode(node)) continue + + const text = node.getTextContent() + + // Case 1: Check for redundant zero-width space nodes after content nodes + if (text === "\u200B" && i > 0) { + const prevNode = updatedChildren[i - 1] + if ($isCodeHighlightNode(prevNode) && prevNode.getTextContent() !== "\u200B") { + log("🧹 Removing redundant zero-width space node", { + nodeKey: node.getKey(), + prevNodeKey: prevNode.getKey(), + prevNodeContent: prevNode.getTextContent(), + }) + + // If selection is on this node, move it to the previous node + if (node.getKey() === selectionInfo.anchorKey) { + const prevNodeContent = prevNode.getTextContent() + const newSelection = $createRangeSelection() + newSelection.anchor.set(prevNode.getKey(), prevNodeContent.length, "text") + newSelection.focus.set(prevNode.getKey(), prevNodeContent.length, "text") + $setSelection(newSelection) + } + + // Remove the redundant node + node.remove() + redundantNodesRemoved = true + operationCount++ + continue + } + } + } + + if (nodesMerged || redundantNodesRemoved) { + log("🧹 Line cleanup completed", { + lineKey: codeLine.getKey(), + nodesMerged, + redundantNodesRemoved, + operationsPerformed: operationCount, + lineChildren: codeLine.getChildren().length, + }) + } +} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/GlobalErrorIndicatorPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/GlobalErrorIndicatorPlugin.tsx deleted file mode 100644 index 9efb57a58b..0000000000 --- a/web/oss/src/components/Editor/plugins/code/plugins/GlobalErrorIndicatorPlugin.tsx +++ /dev/null @@ -1,504 +0,0 @@ -import React, {useEffect, useRef, useState} from "react" - -import {useFloating, autoUpdate, offset, flip, shift} from "@floating-ui/react" -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {createPortal} from "react-dom" - -import {$getActiveLanguage} from "../utils/language" -import type {CodeLanguage} from "../types" -import {validateAll} from "../utils/validationUtils" - -import {$getEditorCodeAsString} from "./RealTimeValidationPlugin" -import {getValidationContext, setCurrentEditorId} from "./SyntaxHighlightPlugin" - -// Error info type for consistency -export interface ErrorInfo { - id: string - message: string - type: "syntax" | "validation" | "schema" | "bracket" | "structural" - line?: number - column?: number - severity?: "error" | "warning" | "info" -} - -// Registry of ValidationManager instances keyed by editorId -const validationManagerRegistry = new Map<string, ValidationManager>() - -export function registerValidationManager(editorId: string, manager: ValidationManager) { - if (!editorId) return - validationManagerRegistry.set(editorId, manager) -} - -export function getValidationManager(editorId: string): ValidationManager | null { - return validationManagerRegistry.get(editorId) ?? null -} - -export function unregisterValidationManager(editorId: string) { - if (!editorId) return - validationManagerRegistry.delete(editorId) -} - -// Global validation state - single source of truth -interface ValidationState { - errors: ErrorInfo[] - errorsByLine: Map<number, ErrorInfo[]> - lastValidatedContent: string - timestamp: number -} - -// Editor-specific validation manager - no longer singleton -class ValidationManager { - private state: ValidationState = { - errors: [], - errorsByLine: new Map(), - lastValidatedContent: "", - timestamp: 0, - } - private listeners = new Set<() => void>() - private editorContainerRef: React.RefObject<HTMLElement | null> - - constructor(editorContainerRef: React.RefObject<HTMLElement | null>) { - this.editorContainerRef = editorContainerRef - } - - // Run validation and update state - single source of truth - validateContent( - content: string, - schema?: any, - language: CodeLanguage = "json", - ): ValidationState { - // Skip if content hasn't changed - if (content === this.state.lastValidatedContent) { - return this.state - } - - // Run unified validation using validateAll with language support - const result = validateAll(content, schema, language) - - // Update state with new validation results - this.state = { - errors: result.allErrors, - errorsByLine: result.errorsByLine, - lastValidatedContent: content, - timestamp: Date.now(), - } - - // Notify all listeners of the validation state change - this.listeners.forEach((listener) => listener()) - - return this.state - } - - // Get current validation state - getState(): ValidationState { - return this.state - } - - // Subscribe to validation changes - subscribe(listener: () => void): () => void { - this.listeners.add(listener) - return () => this.listeners.delete(listener) - } - - private notifyListeners(): void { - this.listeners.forEach((listener) => listener()) - } - - // Get errors for a specific line - used by CodeLineNode - getErrorsForLine(lineNumber: number): ErrorInfo[] { - return this.state.errorsByLine.get(lineNumber) || [] - } - - // Apply validation styling to DOM elements - scoped to this editor instance - applyDOMStyling(): void { - const attemptStyling = (attempt = 1): void => { - // Get editor element scoped to this specific editor instance - const editorContainer = this.editorContainerRef.current - if (!editorContainer) { - return - } - - const editorElement = editorContainer.querySelector(".editor-code") as HTMLElement - if (!editorElement) { - return - } - - // Get all line elements - const allLines = editorElement.querySelectorAll(".editor-code-line") - // If no elements found and this is first attempt, retry after DOM is ready - if (allLines.length === 0 && attempt === 1) { - setTimeout(() => attemptStyling(2), 100) - return - } - - // CRITICAL FIX: Clear all existing validation styles first - this.clearAllValidationStyling() - - // Apply styling to lines that need it - this.state.errorsByLine.forEach((errors, lineNumber) => { - if (errors.length === 0) return - - // Try multiple selectors to find the line element - let lineElement = editorElement.querySelector(`[data-line-number="${lineNumber}"]`) - if (!lineElement) { - lineElement = editorElement.querySelector( - `.editor-code-line:nth-child(${lineNumber})`, - ) - } - - if (lineElement) { - const htmlElement = lineElement as HTMLElement - const primaryError = errors[0] - const currentErrorMessage = htmlElement.getAttribute("data-validation-error") - - // Only update if error message changed or element wasn't styled - if (currentErrorMessage !== primaryError.message) { - htmlElement.classList.add("validation-error") - htmlElement.setAttribute("data-validation-error", primaryError.message) - htmlElement.setAttribute( - "title", - `🔴 [${primaryError.type}] ${primaryError.message}`, - ) - // Add inline styles for immediate visual feedback - htmlElement.style.backgroundColor = "rgba(255, 165, 0, 0.15)" - htmlElement.style.borderRight = "4px solid #ff8c00" - htmlElement.style.position = "relative" - } - } - }) - } - - attemptStyling() - } - - // Clear all existing validation styling from DOM elements - clearAllValidationStyling(): void { - // Clear all validation styling from DOM - scoped to this editor only - const editorContainer = this.editorContainerRef.current - if (!editorContainer) return - - const allLines = editorContainer.querySelectorAll(".editor-code-line.validation-error") - allLines.forEach((lineElement) => { - const htmlElement = lineElement as HTMLElement - htmlElement.classList.remove("validation-error") - htmlElement.removeAttribute("data-validation-error") - htmlElement.removeAttribute("title") - // Reset inline styles - htmlElement.style.backgroundColor = "" - htmlElement.style.borderRight = "" - htmlElement.style.position = "" - }) - } - - // Force refresh of data-line-number attributes to match visual positions - refreshLineNumberAttributes(editorElement: HTMLElement): void { - const allLines = editorElement.querySelectorAll(".editor-code-line") - - allLines.forEach((lineElement, index) => { - const htmlElement = lineElement as HTMLElement - const visualLineNumber = index + 1 - const currentDataLineNumber = htmlElement.getAttribute("data-line-number") - - if (currentDataLineNumber !== visualLineNumber.toString()) { - htmlElement.setAttribute("data-line-number", visualLineNumber.toString()) - } - }) - } -} - -// Error indicator tooltip component -function ErrorTooltip({errors}: {errors: ErrorInfo[]}) { - // Group errors by message to avoid duplicates - const groupedErrors = errors.reduce( - (groups, error) => { - const key = `${error.type}:${error.message}` - if (!groups[key]) { - groups[key] = { - ...error, - lines: [], - } - } - if (error.line) { - groups[key].lines.push(error.line) - } - return groups - }, - {} as Record<string, ErrorInfo & {lines: number[]}>, - ) - - const uniqueErrors = Object.values(groupedErrors) - - return ( - <div className="bg-gray-900 text-white text-xs rounded-lg shadow-lg p-3 max-w-sm"> - <div className="font-semibold mb-2 text-[10px]"> - {uniqueErrors.length} Error{uniqueErrors.length !== 1 ? "s" : ""} - </div> - <div className="space-y-2 max-h-48 overflow-y-auto"> - {uniqueErrors.map((error, index) => { - const sortedLines = error.lines.sort((a, b) => a - b) - const lineDisplay = - sortedLines.length > 1 - ? `Lines ${Math.min(...sortedLines)}-${Math.max(...sortedLines)}` - : sortedLines.length === 1 - ? `Line ${sortedLines[0]}` - : "" - - return ( - <div - key={`${error.type}-${index}`} - className="border-l-2 border-red-400 pl-2" - > - <div className="flex items-center justify-between"> - <span className="text-red-300 font-medium capitalize text-[10px]"> - {error.type} - </span> - {lineDisplay && ( - <span className="text-gray-400 text-[9px]">{lineDisplay}</span> - )} - </div> - <div className="mt-1 text-gray-200 text-[10px]">{error.message}</div> - </div> - ) - })} - </div> - </div> - ) -} - -// Error indicator icon component -function ErrorIndicator({ - errorCount, - onMouseEnter, - onMouseLeave, -}: { - errorCount: number - onMouseEnter: (e: React.MouseEvent) => void - onMouseLeave: () => void -}) { - return ( - <div - className="absolute top-2 right-2 z-10 cursor-pointer" - onMouseEnter={onMouseEnter} - onMouseLeave={onMouseLeave} - > - <div className="relative"> - <div className="w-6 h-6 bg-red-500 rounded-full flex items-center justify-center text-white text-xs font-bold shadow-lg"> - ! - </div> - {errorCount > 1 && ( - <div className="absolute -top-1 -right-1 w-4 h-4 bg-red-600 rounded-full flex items-center justify-center text-white text-xs font-bold"> - {errorCount > 9 ? "9+" : errorCount} - </div> - )} - </div> - </div> - ) -} - -/** - * Global Error Indicator Plugin - * - * This plugin provides a unified validation system that: - * - Uses ValidationManager as single source of truth - * - Runs validateAll once per content change - * - Provides both global indicator and line highlighting - * - Maintains consistency between all validation displays - */ -export function GlobalErrorIndicatorPlugin({editorId}: {editorId: string}) { - const [editor] = useLexicalComposerContext() - const [showTooltip, setShowTooltip] = useState(false) - const [validationState, setValidationState] = useState<ValidationState>({ - errors: [], - errorsByLine: new Map(), - lastValidatedContent: "", - timestamp: 0, - }) - - const editorContainerRef = useRef<HTMLElement | null>(null) - const validationManager = useRef<ValidationManager | null>(null) - - // Floating UI for tooltip positioning - const {refs, floatingStyles} = useFloating({ - middleware: [offset(10), flip(), shift()], - whileElementsMounted: autoUpdate, - }) - - // Get validation context (schema) from global validation context - // This is set by SyntaxHighlightPlugin when it receives the schema prop - - useEffect(() => { - // Find editor container - const editorElement = editor.getRootElement() - - if (editorElement) { - // Try multiple container selectors - const possibleContainers = [ - ".agenta-editor-wrapper", - ".editor-container", - ".lexical-editor", - "[data-lexical-editor]", - ] - - let foundContainer = null - for (const selector of possibleContainers) { - foundContainer = editorElement.closest(selector) as HTMLElement - if (foundContainer) { - break - } - } - - if (!foundContainer) { - // Fallback: use the editor element's parent or the editor element itself - foundContainer = editorElement.parentElement || editorElement - } - - editorContainerRef.current = foundContainer - - // Initialize validation manager now that we have the container ref - if (!validationManager.current) { - validationManager.current = new ValidationManager(editorContainerRef) - // Set this editor as the current one for validation context - setCurrentEditorId(editorId) - // Register this manager so nodes can query it by editorId - registerValidationManager(editorId, validationManager.current) - } - } - - // Run initial validation on plugin load - const runInitialValidation = () => { - editor.read(() => { - const content = $getEditorCodeAsString(editor) - const language = $getActiveLanguage(editor) - - // Get validation context for this specific editor - const validationContext = getValidationContext(editorId) - - // Set current editor ID for validation context - setCurrentEditorId(editorId) - - // Use ValidationManager for unified validation - if (validationManager.current && validationContext.schema) { - const result = validationManager.current.validateContent( - content, - validationContext.schema, - language, - ) - - // Update validation state - setValidationState(result) - - // Apply DOM styling after validation - validationManager.current.applyDOMStyling() - } - }) - } - - // Run initial validation after a longer delay to ensure editor and schema are ready - const initialValidationTimeout = setTimeout(runInitialValidation, 500) - - // Also run validation when schema becomes available - const schemaCheckInterval = setInterval(() => { - const validationContext = getValidationContext() - if (validationContext.schema && validationManager.current) { - clearInterval(schemaCheckInterval) - runInitialValidation() - } - }, 100) - - // Register editor update listener for content changes - const unregisterUpdateListener = editor.registerUpdateListener( - ({editorState, prevEditorState, tags}) => { - // Skip if this update was triggered by validation or DOM updates - if (tags.has("validation-update") || tags.has("history-merge")) { - return - } - - // Skip if editor state hasn't changed - if (editorState === prevEditorState) { - return - } - - // Get current content - const currentContent = editorState.read(() => $getEditorCodeAsString(editor)) - const language = editorState.read(() => $getActiveLanguage(editor)) - - // Get validation context for this specific editor - const validationContext = getValidationContext(editorId) - - // Run validation immediately like the original implementation - if (validationManager.current && validationContext.schema) { - validationManager.current.validateContent( - currentContent, - validationContext.schema, - language, - ) - // Apply DOM styling after validation - validationManager.current.applyDOMStyling() - } - }, - ) - - // Subscribe to validation state changes if manager is available - let unsubscribe: (() => void) | null = null - if (validationManager.current) { - unsubscribe = validationManager.current.subscribe(() => { - setValidationState({...validationManager.current!.getState()}) - }) - } - - return () => { - clearTimeout(initialValidationTimeout) - clearInterval(schemaCheckInterval) - unregisterUpdateListener() - if (unsubscribe) { - unsubscribe() - } - // Unregister manager on cleanup - unregisterValidationManager(editorId) - } - }, [editor]) - - const handleMouseEnter = (e: React.MouseEvent) => { - refs.setReference(e.currentTarget as HTMLElement) - setShowTooltip(true) - } - - const handleMouseLeave = () => { - setShowTooltip(false) - } - - // Don't render if no errors or no container - if (validationState.errors.length === 0 || !editorContainerRef.current) { - return null - } - - // Calculate unique errors count (group by type and message to avoid duplicates) - const uniqueErrorsCount = Object.keys( - validationState.errors.reduce( - (groups, error) => { - const key = `${error.type}:${error.message}` - groups[key] = true - return groups - }, - {} as Record<string, boolean>, - ), - ).length - - return createPortal( - <> - <ErrorIndicator - errorCount={uniqueErrorsCount} - onMouseEnter={handleMouseEnter} - onMouseLeave={handleMouseLeave} - /> - {showTooltip && ( - <div ref={refs.setFloating} style={floatingStyles} className="z-50"> - <ErrorTooltip errors={validationState.errors} /> - </div> - )} - </>, - editorContainerRef.current, - ) -} - -export {ValidationManager} diff --git a/web/oss/src/components/Editor/plugins/code/plugins/HorizontalNavigationPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/HorizontalNavigationPlugin.tsx new file mode 100644 index 0000000000..6283779b40 --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/plugins/HorizontalNavigationPlugin.tsx @@ -0,0 +1,514 @@ +/** + * HorizontalNavigationPlugin.tsx + * + * This plugin improves horizontal navigation in code blocks by handling: + * 1. Skipping zero-width characters when navigating with arrow keys + * 2. Properly handling tab nodes and other decorator nodes + * 3. Ensuring smooth navigation between adjacent nodes + */ +import {useEffect} from "react" + +import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" +import { + $getSelection, + $isRangeSelection, + $createRangeSelection, + $setSelection, + COMMAND_PRIORITY_CRITICAL, + KEY_ARROW_LEFT_COMMAND, + KEY_ARROW_RIGHT_COMMAND, + $isTabNode, + MOVE_TO_START, + MOVE_TO_END, + KEY_DOWN_COMMAND, +} from "lexical" + +import {$isCodeHighlightNode} from "../nodes/CodeHighlightNode" +import {$isCodeLineNode} from "../nodes/CodeLineNode" +import {createLogger} from "../utils/createLogger" + +import {isSkippableToken, $findNextValidPosition} from "./horizontalNavigationUtils" + +const PLUGIN_NAME = "HorizontalNavigationPlugin" +const log = createLogger(PLUGIN_NAME, {disabled: false}) + +export function HorizontalNavigationPlugin() { + const [editor] = useLexicalComposerContext() + + useEffect(() => { + const moveStartHandler = editor.registerCommand( + MOVE_TO_START, + (event) => { + log("MOVE TO START", event) + const selection = $getSelection() + if (!$isRangeSelection(selection) || !selection.isCollapsed()) { + return false + } + const anchorNode = selection.anchor.getNode() + // Find containing code line + let lineNode = anchorNode + while (lineNode && !$isCodeLineNode(lineNode)) { + lineNode = lineNode.getParent() + } + if (!lineNode || !$isCodeLineNode(lineNode)) return false + const children = lineNode.getChildren() + // Find first non-tab child + let firstContentNode = null + const tabNodes = [] + for (const child of children) { + if ($isTabNode(child)) { + tabNodes.push(child) + } else { + firstContentNode = child + break + } + } + if (firstContentNode && typeof firstContentNode.getKey === "function") { + // Place caret at start of first content node + const sel = $createRangeSelection() + sel.anchor.set(firstContentNode.getKey(), 0, "text") + sel.focus.set(firstContentNode.getKey(), 0, "text") + $setSelection(sel) + return true + } else if (tabNodes.length > 0) { + // Only tabs: place caret at end of last tab + const lastTabNode = tabNodes[tabNodes.length - 1] + const sel = lastTabNode.selectEnd() + $setSelection(sel) + return true + } else { + // Empty line: select start of line node + const sel = lineNode.selectStart() + $setSelection(sel) + return true + } + }, + COMMAND_PRIORITY_CRITICAL, + ) + const moveEndHandler = editor.registerCommand( + MOVE_TO_END, + (event) => { + log("MOVE TO END", event) + const selection = $getSelection() + if (!$isRangeSelection(selection) || !selection.isCollapsed()) { + return false + } + const anchorNode = selection.anchor.getNode() + // Find containing code line + let lineNode = anchorNode + while (lineNode && !$isCodeLineNode(lineNode)) { + lineNode = lineNode.getParent() + } + if (!lineNode || !$isCodeLineNode(lineNode)) return false + const children = lineNode.getChildren() + // Find last non-tab child + let lastContentNode = null + const tabNodes = [] + for (let i = children.length - 1; i >= 0; i--) { + const child = children[i] + if ($isTabNode(child)) { + tabNodes.push(child) + } else if (!lastContentNode) { + lastContentNode = child + } + } + if (lastContentNode && typeof lastContentNode.getKey === "function") { + // Place caret at end of last content node + const sel = $createRangeSelection() + let endOffset = 0 + if (typeof lastContentNode.getTextContentSize === "function") { + endOffset = lastContentNode.getTextContentSize() + } else if (typeof lastContentNode.getTextContent === "function") { + endOffset = lastContentNode.getTextContent().length + } + sel.anchor.set(lastContentNode.getKey(), endOffset, "text") + sel.focus.set(lastContentNode.getKey(), endOffset, "text") + $setSelection(sel) + return true + } else if (tabNodes.length > 0) { + // Only tabs: place caret at end of last tab + const lastTabNode = tabNodes[0] // since we pushed from the end + const sel = lastTabNode.selectEnd() + $setSelection(sel) + return true + } else { + // Empty line: select start of line node + const sel = lineNode.selectStart() + $setSelection(sel) + return true + } + }, + COMMAND_PRIORITY_CRITICAL, + ) + const keyDownHandler = editor.registerCommand( + KEY_DOWN_COMMAND, + (event) => { + if (["ArrowRight", "ArrowLeft"].includes(event.key) && event.altKey) { + log("KEY_DOWN_COMMAND", event) + event.preventDefault() + // --- Alt+Arrow navigation logic --- + const selection = $getSelection() + if (!$isRangeSelection(selection)) return false + + // Use focus for direction (caret for collapsed, focus for selection) + const node = selection.focus.getNode() + let lineNode = node + while (lineNode && !$isCodeLineNode(lineNode)) { + lineNode = lineNode.getParent() + } + if (!lineNode || !$isCodeLineNode(lineNode)) return false + const children = lineNode.getChildren() + if (children.length === 0) return false + + // Find current token and offset + const tokenIdx = children.findIndex((child) => child.getKey() === node.getKey()) + const offset = selection.focus.offset + // Helper: is at start or end of token + const nodeTextLength = + typeof node.getTextContentSize === "function" + ? node.getTextContentSize() + : typeof node.getTextContent === "function" + ? node.getTextContent().length + : 0 + let isAtTokenStart = offset === 0 + let isAtTokenEnd = offset === nodeTextLength + + // Special handling for string tokens + let isStringToken = false + if ($isCodeHighlightNode(node)) { + const tokenType = + typeof node.getType === "function" ? node.getType() : undefined + const text = node.getTextContent() + isStringToken = + tokenType === "string" || + (text.startsWith('"') && text.endsWith('"')) || + (text.startsWith("'") && text.endsWith("'")) + if (isStringToken && text.length > 1) { + // If caret is just after opening quote, treat as start + if (offset === 1) isAtTokenStart = true + // If caret is just before closing quote, treat as end + if (offset === text.length - 1) isAtTokenEnd = true + } + } + + // Directional logic + let targetNode = node + let targetOffset = offset + let found = false + + if (event.key === "ArrowLeft") { + // Move to start of current token, or previous token + if (!isAtTokenStart) { + targetOffset = 0 + found = true + } else { + // Find previous non-skippable token + for (let i = tokenIdx - 1; i >= 0; i--) { + if (!isSkippableToken(children[i])) { + targetNode = children[i] + targetOffset = 0 + found = true + break + } + } + // If at start of line, try previous line + if (!found && tokenIdx === 0) { + const prevLine = lineNode.getPreviousSibling() + if ( + prevLine && + $isCodeLineNode(prevLine) && + prevLine.getChildren().length > 0 + ) { + const prevChildren = prevLine.getChildren() + let lastIdx = prevChildren.length - 1 + while ( + lastIdx >= 0 && + isSkippableToken(prevChildren[lastIdx]) + ) { + lastIdx-- + } + if (lastIdx >= 0) { + targetNode = prevChildren[lastIdx] + targetOffset = 0 + found = true + } + } + } + } + } else if (event.key === "ArrowRight") { + // Move to end of current token, or next token + if (!isAtTokenEnd) { + targetOffset = nodeTextLength + found = true + } else { + // Find next non-skippable token + for (let i = tokenIdx + 1; i < children.length; i++) { + if (!isSkippableToken(children[i])) { + targetNode = children[i] + targetOffset = 0 + found = true + break + } + } + // If at end of line, try next line + if (!found && tokenIdx === children.length - 1) { + const nextLine = lineNode.getNextSibling() + if ( + nextLine && + $isCodeLineNode(nextLine) && + nextLine.getChildren().length > 0 + ) { + const nextChildren = nextLine.getChildren() + let firstIdx = 0 + while ( + firstIdx < nextChildren.length && + isSkippableToken(nextChildren[firstIdx]) + ) { + firstIdx++ + } + if (firstIdx < nextChildren.length) { + targetNode = nextChildren[firstIdx] + targetOffset = 0 + found = true + } + } + } + } + } + + // Token-aware caret placement + if ($isCodeHighlightNode(targetNode)) { + const tokenType = + typeof targetNode.getType === "function" + ? targetNode.getType() + : undefined + const text = targetNode.getTextContent() + // If token is a string (by type or by quotes) + const isStringToken = + tokenType === "string" || + (text.startsWith('"') && text.endsWith('"')) || + (text.startsWith("'") && text.endsWith("'")) + if (isStringToken && text.length > 1) { + if (event.key === "ArrowLeft") { + // Place just after opening quote + targetOffset = 1 + } else if (event.key === "ArrowRight") { + // Place just before closing quote + targetOffset = text.length - 1 + if (targetOffset < 1) targetOffset = 1 + } + } else if (isStringToken && text.length === 1) { + // Only quote, place after + targetOffset = 1 + } + } + + // Set selection + const sel = $createRangeSelection() + sel.anchor.set(targetNode.getKey(), targetOffset, "text") + sel.focus.set(targetNode.getKey(), targetOffset, "text") + $setSelection(sel) + return true + } + return false + }, + COMMAND_PRIORITY_CRITICAL, + ) + + // LEFT ARROW + const removeLeftHandler = editor.registerCommand( + KEY_ARROW_LEFT_COMMAND, + (event) => { + event.preventDefault() + const selection = $getSelection() + if (!$isRangeSelection(selection)) { + return false + } + + if (event.shiftKey) { + const anchorNode = selection.focus.getNode() + const offset = selection.focus.offset + const newPosition = $findNextValidPosition(anchorNode, offset, "left") + + if (newPosition) { + // selection.focus.set(newPosition.node.getKey(), newPosition.offset, "text") + const newSelection = $createRangeSelection() + // return true + newSelection.anchor.set( + selection.anchor.getNode().getKey(), + selection.anchor.offset, + "text", + ) + newSelection.focus.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + $setSelection(newSelection) + log("Set new left selection position", { + nodeKey: newPosition.node.getKey(), + offset: newPosition.offset, + }) + } + return true + } else { + const anchorNode = selection.anchor.getNode() + const offset = selection.anchor.offset + log("Left arrow pressed", { + nodeKey: anchorNode.getKey(), + nodeType: anchorNode.getType(), + offset, + text: anchorNode.getTextContent(), + }) + const newPosition = $findNextValidPosition(anchorNode, offset, "left") + log("LEFT ARROW newPosition", newPosition) + if (newPosition) { + const newSelection = $createRangeSelection() + newSelection.anchor.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + newSelection.focus.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + $setSelection(newSelection) + log("Set new left position", { + nodeKey: newPosition.node.getKey(), + offset: newPosition.offset, + }) + + return true + } + } + + return false + }, + COMMAND_PRIORITY_CRITICAL, + ) + + // RIGHT ARROW + const removeRightHandler = editor.registerCommand( + KEY_ARROW_RIGHT_COMMAND, + (event) => { + log("Right arrow pressed", event) + event.preventDefault() + const selection = $getSelection() + if (!$isRangeSelection(selection)) { + return false + } + const anchorNode = selection.anchor.getNode() + const offset = selection.anchor.offset + log("Right arrow pressed", { + nodeKey: anchorNode.getKey(), + nodeType: anchorNode.getType(), + offset, + text: anchorNode.getTextContent(), + }) + + if (event.shiftKey) { + const anchorNode = selection.focus.getNode() + const offset = selection.focus.offset + const newPosition = $findNextValidPosition(anchorNode, offset, "right") + + if (newPosition) { + // selection.focus.set(newPosition.node.getKey(), newPosition.offset, "text") + const newSelection = $createRangeSelection() + // return true + newSelection.anchor.set( + selection.anchor.getNode().getKey(), + selection.anchor.offset, + "text", + ) + newSelection.focus.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + $setSelection(newSelection) + log("Set new right selection position", { + nodeKey: newPosition.node.getKey(), + offset: newPosition.offset, + }) + } + return true + } else { + const newPosition = $findNextValidPosition(anchorNode, offset, "right") + log("RIGHT ARROW newPosition", newPosition) + if (newPosition) { + // Validate node/offset before setting selection + let valid = true + if ( + typeof newPosition.offset !== "number" || + !newPosition.node || + typeof newPosition.node.getKey !== "function" + ) { + valid = false + } + // Additional: check if offset is in range for text nodes + if ($isCodeHighlightNode(newPosition.node)) { + const text = newPosition.node.getTextContent() + if (newPosition.offset < 0 || newPosition.offset > text.length) { + valid = false + } + } + log("About to set selection", { + valid, + nodeKey: newPosition.node.getKey(), + offset: newPosition.offset, + nodeType: newPosition.node.getType(), + }) + if (valid) { + $setSelection(null) + const newSelection = $createRangeSelection() + newSelection.anchor.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + newSelection.focus.set( + newPosition.node.getKey(), + newPosition.offset, + "text", + ) + $setSelection(newSelection) + // Extra: log the state immediately after + const sel = $getSelection() + log("Selection after set", { + anchorKey: sel?.anchor?.key, + anchorOffset: sel?.anchor?.offset, + focusKey: sel?.focus?.key, + focusOffset: sel?.focus?.offset, + type: sel?.type, + }) + log("Set new right position", { + nodeKey: newPosition.node.getKey(), + offset: newPosition.offset, + }) + event.preventDefault() + return true + } else { + log("Invalid navigation target", newPosition) + } + } + } + return false + }, + COMMAND_PRIORITY_CRITICAL, + ) + + return () => { + removeLeftHandler() + removeRightHandler() + moveStartHandler() + moveEndHandler() + keyDownHandler() + } + }, [editor]) + + return null +} + +export default HorizontalNavigationPlugin diff --git a/web/oss/src/components/Editor/plugins/code/plugins/IndentationPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/IndentationPlugin.tsx index aced5b30e2..fcad5b7f8d 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/IndentationPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/IndentationPlugin.tsx @@ -16,24 +16,22 @@ import {useEffect} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {$findMatchingParent, mergeRegister} from "@lexical/utils" +import {$findMatchingParent} from "@lexical/utils" import { $createRangeSelection, + $createTabNode, $getSelection, $isRangeSelection, + $isTabNode, $setSelection, COMMAND_PRIORITY_HIGH, KEY_DOWN_COMMAND, - KEY_TAB_COMMAND, LexicalNode, } from "lexical" -import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeHighlightNode, $createCodeHighlightNode} from "../nodes/CodeHighlightNode" import {$isCodeLineNode, $createCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" -import {$createCodeTabNode, $isCodeTabNode} from "../nodes/CodeTabNode" import {createLogger} from "../utils/createLogger" -import {getIndentCount} from "../utils/indent" const log = createLogger("IndentationPlugin", { disabled: true, @@ -56,349 +54,302 @@ export function IndentationPlugin() { const [editor] = useLexicalComposerContext() useEffect(() => { - return mergeRegister( - editor.registerCommand( - KEY_DOWN_COMMAND, - (event: KeyboardEvent) => { - if (event.key !== "Enter") return false - log("ENTER pressed", event.key) + return editor.registerCommand( + KEY_DOWN_COMMAND, + (event: KeyboardEvent) => { + log("ENTER pressed", event.key) + if (event.key !== "Enter") return false - const selection = $getSelection() - if (!$isRangeSelection(selection)) return false + const selection = $getSelection() + if (!$isRangeSelection(selection)) return false - event.preventDefault() + event.preventDefault() + log("ENTER pressed") - const anchor = selection.anchor - const anchorOffset = anchor.offset + const anchor = selection.anchor + const anchorOffset = anchor.offset + const anchorNode = anchor.getNode() - const anchorNode = anchor.getNode() + const lineNode = $findMatchingParent(anchorNode, $isCodeLineNode) + if (!lineNode) return - const lineNode = $findMatchingParent(anchorNode, $isCodeLineNode) - if (!lineNode) return false + const children = lineNode.getChildren() + const caretKey = anchorNode.getKey() - // Determine language from parent code block (json, yaml, etc.) - const blockNode = lineNode.getParent() - const language = $isCodeBlockNode(blockNode) - ? blockNode.getLanguage() - : undefined - if (!lineNode) return false + const beforeNodes: LexicalNode[] = [] + const afterNodes: LexicalNode[] = [] - const children = lineNode.getChildren() - const caretKey = anchorNode.getKey() + let seenCaret = false - const beforeNodes: LexicalNode[] = [] - const afterNodes: LexicalNode[] = [] - - let seenCaret = false - - for (const node of children) { - if (!$isCodeHighlightNode(node)) { - beforeNodes.push(node) - continue - } - - const text = node.getTextContent() - const length = text.length - const isCaretNode = node.getKey() === caretKey - - // Before cursor: collect nodes as-is - if (!seenCaret && !isCaretNode) { - beforeNodes.push(node) - continue - } - - // At cursor node: split content based on cursor position - if (isCaretNode) { - seenCaret = true - const type = node.getHighlightType() - - // Handle edge cases: - if (anchorOffset === 0) { - // Cursor at start: entire node goes after - afterNodes.push(node) - } else if (anchorOffset === length) { - // Cursor at end: entire node goes before - beforeNodes.push(node) - } else { - // Cursor in middle: split node content - // Preserve validation state from original node - const hasValidationError = node.hasValidationError() - const validationMessage = node.getValidationMessage() - - const before = $createCodeHighlightNode( - text.slice(0, anchorOffset), - type, - hasValidationError, - validationMessage, - ) - const after = $createCodeHighlightNode( - text.slice(anchorOffset), - type, - hasValidationError, - validationMessage, - ) - beforeNodes.push(before) - afterNodes.push(after) - log("✂️ Split highlight node", {before, after}) - } - continue - } - - // After cursor: collect remaining nodes - afterNodes.push(node) + for (const node of children) { + if (!$isCodeHighlightNode(node)) { + beforeNodes.push(node) + continue } - /** - * Analyze line content and structure: - * 1. Extract current indentation level - * 2. Join content before/after cursor - * 3. Detect if we're inside a brace pair - */ - // Get base indentation from the start of the line - const textLine = lineNode.getTextContent() - const indentCount = getIndentCount(textLine) - // const baseIndent = "\t".repeat(indentCount) - - // Join node content for analysis - const beforeText = beforeNodes.map((n) => n.getTextContent()).join("") - const afterText = afterNodes.map((n) => n.getTextContent()).join("") - - // Check if cursor is between opening and closing braces - const isBraced = - /[\[{(]\s*$/.test(beforeText.trim()) && /^[\]})]/.test(afterText.trim()) - - // Check if line ends with an opening brace - const endsWithOpeningBrace = - /[\[{(]\s*$/.test(beforeText.trim()) || - (language === "yaml" && - (/:\s*$/.test(beforeText.trim()) || /-\s*$/.test(beforeText.trim()))) - - log("🔎 Full highlight content", { - fullText: beforeText + afterText, - }) - log("🔪 Split parts", { - before: beforeText, - after: afterText, - }) - log("Line analysis", { - before: beforeText, - after: afterText, - indentCount, - isBraced, - }) - - // Update current line with beforeNodes - const writableLine = lineNode.getWritable() - // Remove all non-toggle children, keep existing decorator (fold toggle) - writableLine.getChildren().forEach((child) => { - child.remove() - }) - beforeNodes.forEach((n) => writableLine.append(n)) - - // Array to store new lines that will be inserted after the current line - // This includes the middle line for braced content and the trailing line - const linesToInsert: CodeLineNode[] = [] - - /** - * Creates a new line with proper indentation based on the current context - * - * @param extra - Additional indentation level to add (e.g. 1 for content inside braces) - * @returns A new CodeLineNode with the correct number of tab nodes - * - * The function: - * 1. Creates a new empty line - * 2. Adds base indentation from the current line - * 3. Adds any extra indentation for nested content - * 4. Uses CodeHighlightNode for tabs to maintain consistency - */ - const createIndentedLine = (extra: number) => { - const line = $createCodeLineNode() - // add fold toggle decorator - for (let i = 0; i < indentCount + extra; i++) { - const tabNode = $createCodeTabNode() - line.append(tabNode) - } - line.selectEnd() - return line - } + const text = node.getTextContent() + const length = text.length + const isCaretNode = node.getKey() === caretKey - // Handle special case for content inside braces (e.g. if, for, function blocks) - // When we detect content is braced: - // 1. Create an empty line with +1 indentation level - // 2. Add a zero-width space to ensure line is selectable - // 3. Insert this line before the trailing content - if (isBraced) { - const middle = createIndentedLine(1) - linesToInsert.push(middle) + // Before cursor: collect nodes as-is + if (!seenCaret && !isCaretNode) { + beforeNodes.push(node) + continue } - // Handle case where line ends with an opening brace but there's no matching closing brace - // This ensures proper indentation for JSON objects, arrays, and code blocks - else if (endsWithOpeningBrace) { - // Add extra indentation to the trailing line - const trailing = createIndentedLine(1) - - // If there was content after the cursor, move it to the new line - if (afterNodes.length > 0) { - afterNodes.forEach((n) => trailing.append(n)) - log("📎 Inserted trailing content with extra indent", { - trailingContent: trailing.getTextContent(), - }) - } - - // Insert all new lines after the current line - lineNode.insertAfter(trailing) - - // Find the empty CodeHighlightNode that was created in the trailing line - const emptyHighlightNode = trailing - .getChildren() - .find( - (node) => - $isCodeHighlightNode(node) && node.getTextContent() === "", - ) - - // Set selection to the empty CodeHighlightNode in the new line - if (emptyHighlightNode) { - $setSelection(emptyHighlightNode.selectStart()) - log("🎯 Set selection to empty highlight node", { - lineKey: trailing.getKey(), - nodeKey: emptyHighlightNode.getKey(), - }) + // At cursor node: split content based on cursor position + if (isCaretNode) { + seenCaret = true + const type = node.getHighlightType() + + // Handle edge cases: + if (anchorOffset === 0) { + // Cursor at start: entire node goes after + afterNodes.push(node) + } else if (anchorOffset === length) { + // Cursor at end: entire node goes before + beforeNodes.push(node) } else { - // Fallback: position after the last tab - const tabNodes = trailing.getChildren().filter($isCodeTabNode) - if (tabNodes.length > 0) { - const lastTab = tabNodes[tabNodes.length - 1] - $setSelection(lastTab.selectEnd()) - } else { - $setSelection(trailing.selectStart()) - } - log("🎯 Set selection to fallback position", { - lineKey: trailing.getKey(), - }) + // Cursor in middle: split node content + const before = $createCodeHighlightNode( + text.slice(0, anchorOffset), + type, + false, + null, + ) + const after = $createCodeHighlightNode( + text.slice(anchorOffset), + type, + false, + null, + ) + beforeNodes.push(before) + afterNodes.push(after) + log("✂️ Split highlight node", {before, after}) } - - return true + continue } - // Create the trailing line that will contain any content that was after the cursor - // This line maintains the same indentation level as the original line - const trailing = createIndentedLine(0) + // After cursor: collect remaining nodes + afterNodes.push(node) + } + + /** + * Analyze line content and structure: + * 1. Extract current indentation level + * 2. Join content before/after cursor + * 3. Detect if we're inside a brace pair + */ + // Get base indentation from the start of the line + const indentMatch = lineNode.getTextContent().match(/^\s*/) + const baseIndent = indentMatch ? indentMatch[0] : "" + const indentCount = (baseIndent.match(/\t/g) || []).length + + // Join node content for analysis + const beforeText = beforeNodes.map((n) => n.getTextContent()).join("") + const afterText = afterNodes.map((n) => n.getTextContent()).join("") + + // Check if cursor is between opening and closing braces + const isBraced = + /[\[{(]\s*$/.test(beforeText.trim()) && /^[\]})]/.test(afterText.trim()) + + // Check if line ends with an opening brace + const endsWithOpeningBrace = /[\[{(]\s*$/.test(beforeText.trim()) + + log("🔎 Full highlight content", { + fullText: beforeText + afterText, + }) + log("🔪 Split parts", { + before: beforeText, + after: afterText, + }) + log("Line analysis", { + before: beforeText, + after: afterText, + indentCount, + isBraced, + }) + + // Update current line with beforeNodes + const writableLine = lineNode.getWritable() + writableLine.clear() + beforeNodes.forEach((n) => writableLine.append(n)) + + // Array to store new lines that will be inserted after the current line + // This includes the middle line for braced content and the trailing line + const linesToInsert: CodeLineNode[] = [] + + /** + * Creates a new line with proper indentation based on the current context + * + * @param extra - Additional indentation level to add (e.g. 1 for content inside braces) + * @returns A new CodeLineNode with the correct number of tab nodes + * + * The function: + * 1. Creates a new empty line + * 2. Adds base indentation from the current line + * 3. Adds any extra indentation for nested content + * 4. Uses CodeHighlightNode for tabs to maintain consistency + */ + const createIndentedLine = (extra: number) => { + const line = $createCodeLineNode() + for (let i = 0; i < indentCount + extra; i++) { + line.append($createTabNode()) + } + // Add an empty CodeHighlightNode to ensure proper node type for text entry + // This prevents plain text nodes from being created when typing + line.append($createCodeHighlightNode("\u200b", "plain")) + return line + } + + // Handle special case for content inside braces (e.g. if, for, function blocks) + // When we detect content is braced: + // 1. Create an empty line with +1 indentation level + // 2. Add a zero-width space to ensure line is selectable + // 3. Insert this line before the trailing content + if (isBraced) { + const middle = createIndentedLine(1) + linesToInsert.push(middle) + } + + // Handle case where line ends with an opening brace but there's no matching closing brace + // This ensures proper indentation for JSON objects, arrays, and code blocks + else if (endsWithOpeningBrace) { + // Add extra indentation to the trailing line + const trailing = createIndentedLine(1) // If there was content after the cursor, move it to the new line if (afterNodes.length > 0) { afterNodes.forEach((n) => trailing.append(n)) - log("📎 Inserted trailing content", { - trailingContent: trailing.getTextContent(), - }) - } else { - // If no content, add an empty CodeHighlightNode to ensure line is selectable - // This will be properly styled by the CodeHighlightNode.createDOM method - // trailing.append($createCodeHighlightNode("arda", "plain", false, null)) - log("📎 Inserted new line content", { + log("📎 Inserted trailing content with extra indent", { trailingContent: trailing.getTextContent(), }) } - linesToInsert.push(trailing) // Insert all new lines after the current line - // We maintain a reference to the last inserted line to chain them correctly: - // currentLine -> middleLine (if braced) -> trailingLine - let insertAfter = lineNode - for (const line of linesToInsert) { - insertAfter.insertAfter(line) - insertAfter = line + lineNode.insertAfter(trailing) + + // Find the empty CodeHighlightNode that was created in the trailing line + const emptyHighlightNode = trailing + .getChildren() + .find((node) => $isCodeHighlightNode(node) && node.getTextContent() === "") + + // Set selection to the empty CodeHighlightNode in the new line + if (emptyHighlightNode) { + $setSelection(emptyHighlightNode.selectStart()) + log("🎯 Set selection to empty highlight node", { + lineKey: trailing.getKey(), + nodeKey: emptyHighlightNode.getKey(), + }) + } else { + // Fallback: position after the last tab + const tabNodes = trailing.getChildren().filter($isTabNode) + if (tabNodes.length > 0) { + const lastTab = tabNodes[tabNodes.length - 1] + $setSelection(lastTab.selectEnd()) + } else { + $setSelection(trailing.selectStart()) + } + log("🎯 Set selection to fallback position", { + lineKey: trailing.getKey(), + }) } - // Place the cursor in the appropriate position: - // - For braced content: on the empty middle line - // - Otherwise: on the trailing line with the moved content - const selectionTarget = isBraced ? linesToInsert[0] : trailing - - const targetChildren = selectionTarget.getChildren() - const firstContentNode = targetChildren.find((node) => !$isCodeTabNode(node)) - const lastTabNode = targetChildren.filter($isCodeTabNode).pop() - - log("Selection target analysis:", { - targetKey: selectionTarget.getKey(), - childrenCount: targetChildren.length, - hasContentNode: !!firstContentNode, - hasTabNodes: !!lastTabNode, - childTypes: targetChildren.map((c) => c.getType()), - }) + return true + } - // Create a new selection at the appropriate position - const sel = $createRangeSelection() + // Create the trailing line that will contain any content that was after the cursor + // This line maintains the same indentation level as the original line + const trailing = createIndentedLine(0) - if (firstContentNode) { - // Position at start of first content node - log("SELECTION CASE 1", { - firstContentNode, - selectionTarget, - nextSibling: firstContentNode.getNextSibling(), - }) - if (!firstContentNode.getNextSibling()) { - if ( - selection.anchor.offset + selection.focus.offset < - firstContentNode.getTextContentSize() - ) { - log("SELECTION CASE 1a") - $setSelection(firstContentNode.selectStart()) - } else { - log("SELECTION CASE 1b") - $setSelection(firstContentNode.selectEnd()) - } - } else { + // If there was content after the cursor, move it to the new line + if (afterNodes.length > 0) { + afterNodes.forEach((n) => trailing.append(n)) + log("📎 Inserted trailing content", { + trailingContent: trailing.getTextContent(), + }) + } else { + // If no content, add an empty CodeHighlightNode to ensure line is selectable + // This will be properly styled by the CodeHighlightNode.createDOM method + // trailing.append($createCodeHighlightNode("arda", "plain", false, null)) + log("📎 Inserted new line content", { + trailingContent: trailing.getTextContent(), + }) + // trailing.append($createTextNode("\u200b")) + // trailing.append($createCodeHighlightNode("\u200b", "plain", false, null)) + } + linesToInsert.push(trailing) + + // Insert all new lines after the current line + // We maintain a reference to the last inserted line to chain them correctly: + // currentLine -> middleLine (if braced) -> trailingLine + let insertAfter = lineNode + for (const line of linesToInsert) { + insertAfter.insertAfter(line) + insertAfter = line + } + + // Place the cursor in the appropriate position: + // - For braced content: on the empty middle line + // - Otherwise: on the trailing line with the moved content + const selectionTarget = isBraced ? linesToInsert[0] : trailing + + const targetChildren = selectionTarget.getChildren() + const firstContentNode = targetChildren.find((node) => !$isTabNode(node)) + const lastTabNode = targetChildren.filter($isTabNode).pop() + + log("Selection target analysis:", { + targetKey: selectionTarget.getKey(), + childrenCount: targetChildren.length, + hasContentNode: !!firstContentNode, + hasTabNodes: !!lastTabNode, + childTypes: targetChildren.map((c) => c.getType()), + }) + + // Create a new selection at the appropriate position + const sel = $createRangeSelection() + + if (firstContentNode) { + // Position at start of first content node + log("SELECTION CASE 1", { + firstContentNode, + selectionTarget, + nextSibling: firstContentNode.getNextSibling(), + }) + if (!firstContentNode.getNextSibling()) { + if ( + selection.anchor.offset + selection.focus.offset < + firstContentNode.getTextContentSize() + ) { + log("SELECTION CASE 1a") $setSelection(firstContentNode.selectStart()) + } else { + log("SELECTION CASE 1b") + $setSelection(firstContentNode.selectEnd()) } - } else if (lastTabNode) { - // Position after last tab node - $setSelection(lastTabNode.selectEnd()) } else { - // Position at start of line if no content or tabs - $setSelection(selectionTarget.selectStart()) - // $setSelection(sel) + $setSelection(firstContentNode.selectStart()) } - - // Set the selection explicitly + } else if (lastTabNode) { + // Position after last tab node + $setSelection(lastTabNode.selectEnd()) + } else { + // Position at start of line if no content or tabs + $setSelection(selectionTarget.selectStart()) // $setSelection(sel) + } - log("🎯 Set explicit selection to new line", { - lineKey: selectionTarget.getKey(), - selection: sel, - }) - - return true - }, - COMMAND_PRIORITY_HIGH, - ), - editor.registerCommand( - KEY_TAB_COMMAND, - () => { - const selection = $getSelection() - if (!$isRangeSelection(selection)) return false - const anchor = selection.anchor - const anchorNode = anchor.getNode() - - const lineNode = $findMatchingParent(anchorNode, $isCodeLineNode) - if (!lineNode) return false - - const selectionNodes = selection.getNodes() - - if (selectionNodes.length > 0 && $isCodeHighlightNode(selectionNodes[0])) { - // Insert spaces instead of tab character to maintain valid JSON format - // Use 2 spaces to match typical JSON formatting - selection.insertText(" ") - } else { - const newTab = $createCodeTabNode() + // Set the selection explicitly + // $setSelection(sel) - selection.insertNodes([newTab]) - } + log("🎯 Set explicit selection to new line", { + lineKey: selectionTarget.getKey(), + selection: sel, + }) - return true - }, - COMMAND_PRIORITY_HIGH, - ), + return true + }, + COMMAND_PRIORITY_HIGH, ) }, [editor]) diff --git a/web/oss/src/components/Editor/plugins/code/plugins/RealTimeValidationPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/RealTimeValidationPlugin.tsx index 66f9c04b12..c19b0e081b 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/RealTimeValidationPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/RealTimeValidationPlugin.tsx @@ -1,56 +1,75 @@ +import {useEffect, useRef, useState} from "react" + +import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" +import Ajv, {ErrorObject} from "ajv" +import yaml from "js-yaml" +import JSON5 from "json5" import {$getRoot, $isTabNode, LexicalEditor} from "lexical" +import isEqual from "lodash/isEqual" +import { + $createCodeBlockErrorIndicatorNode, + $isCodeBlockErrorIndicatorNode, +} from "../nodes/CodeBlockErrorIndicatorNode" import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeHighlightNode} from "../nodes/CodeHighlightNode" import {$isCodeLineNode} from "../nodes/CodeLineNode" +import {createLogger} from "../utils/createLogger" + +const log = createLogger("RealTimeValidationPlugin", {disabled: true}) + +const ajv = new Ajv() + +type ValidationError = ErrorObject<string, Record<string, any>, unknown> export function constructJsonFromSchema(schema: any, valueMap: Record<string, string>): any { if (!schema) return null if (schema.type === "object") { const obj: any = {} - // Use Object.keys to preserve property order instead of for...in - const propertyKeys = Object.keys(schema.properties || {}) - for (const key of propertyKeys) { - const propertySchema = schema.properties[key] - const isRequired = schema.required && schema.required.includes(key) - let initialValue = constructJsonFromSchema(propertySchema, valueMap) || valueMap[key] - - if (initialValue === null || initialValue === undefined) { - if (propertySchema.type === "string") { - initialValue = valueMap[key] || (isRequired ? key : "") // Use map value if available, else field name or empty string + for (const key in schema.properties) { + if (schema.properties.hasOwnProperty(key)) { + const propertySchema = schema.properties[key] + const isRequired = schema.required && schema.required.includes(key) + let initialValue = + constructJsonFromSchema(propertySchema, valueMap) || valueMap[key] + + if (initialValue === null || initialValue === undefined) { + if (propertySchema.type === "string") { + initialValue = valueMap[key] || (isRequired ? key : "") // Use map value if available, else field name or empty string + } else if ( + propertySchema.anyOf && + propertySchema.anyOf.some((item) => item.type === "string") + ) { + initialValue = valueMap[key] || (isRequired ? key : "") // Use map value if available, else field name or empty string + } else if (propertySchema.type === "number") { + initialValue = 0 + } else if (propertySchema.type === "boolean") { + initialValue = false + } else if ( + propertySchema.type === "object" || + propertySchema.anyOf?.[0].type === "object" + ) { + initialValue = {} // Provide an empty object + } else if (propertySchema.type === "array") { + if (propertySchema.items?.type === "string") { + initialValue = [] + } else { + initialValue = [] // Provide an empty array + } + } else { + initialValue = null // Default to null if unknown type + } } else if ( + initialValue === "" && propertySchema.anyOf && - propertySchema.anyOf.some((item: {type?: string}) => item.type === "string") + propertySchema.anyOf.some((item) => item.type === "null") ) { - initialValue = valueMap[key] || (isRequired ? key : "") // Use map value if available, else field name or empty string - } else if (propertySchema.type === "number") { - initialValue = 0 - } else if (propertySchema.type === "boolean") { - initialValue = false - } else if ( - propertySchema.type === "object" || - propertySchema.anyOf?.[0].type === "object" - ) { - initialValue = {} // Provide an empty object - } else if (propertySchema.type === "array") { - if (propertySchema.items?.type === "string") { - initialValue = [] - } else { - initialValue = [] // Provide an empty array - } - } else { - initialValue = null // Default to null if unknown type + initialValue = null } - } else if ( - initialValue === "" && - propertySchema.anyOf && - propertySchema.anyOf.some((item: {type?: string}) => item.type === "null") - ) { - initialValue = null - } - obj[key] = initialValue + obj[key] = initialValue + } } return obj } else if (schema.type === "array") { @@ -93,8 +112,7 @@ export function $getEditorCodeAsString(editor?: LexicalEditor): string { const parts: string[] = [] for (const child of line.getChildren()) { if ($isTabNode(child)) { - // Convert tabs to 2 spaces for YAML compatibility - parts.push(" ") + parts.push("\t") } else if ($isCodeHighlightNode(child)) { const text = child.getTextContent() if (text !== "\u200B") { @@ -107,7 +125,233 @@ export function $getEditorCodeAsString(editor?: LexicalEditor): string { } } - // For diff editor and YAML support, we need to preserve newlines - // Only remove zero-width spaces and trim end - return result.trimEnd() + return removeNewlinesAndTabs(result.trimEnd()) +} + +/** + * Determines the active language mode of the code block. + * Searches through root children to find the first CodeBlockNode + * and returns its language setting. + * + * @returns The current language mode ('json' or 'yaml') + */ +function $getActiveLanguage(): "json" | "yaml" { + const root = $getRoot() + for (const block of root.getChildren()) { + if ($isCodeBlockNode(block)) { + return block.getLanguage() as "json" | "yaml" + } + } + return "json" +} + +/** + * Plugin that provides real-time validation of JSON/YAML content. + * + * Key features: + * - Validates content against a predefined schema using Ajv + * - Handles both JSON and YAML formats + * - Updates validation state on editor changes + * - Highlights problematic tokens in the editor + * - Shows detailed error messages with locations + * + * The validation process: + * 1. Gets editor content as text + * 2. Parses as JSON/YAML + * 3. Validates against schema + * 4. Updates error state + * 5. Highlights error locations in editor + */ +export function RealTimeValidationPlugin({debug, schema}: {debug?: boolean; schema: any}) { + const [editor] = useLexicalComposerContext() + const [validationErrors, setValidationErrors] = useState<ValidationError[] | null>(null) + const validator = useRef(ajv.compile(schema)) + useEffect(() => { + return editor.registerUpdateListener(({editorState}) => { + editorState.read(() => { + const validate = validator.current + + const language = $getActiveLanguage() + const textContent = $getEditorCodeAsString(editor) + + log("💬 Text content to validate", {language, textContent}) + + // Variables to store parsed content and validation results + let parsed: unknown + let errorList: ValidationError[] = [] + + try { + // Parse content based on active language mode + parsed = language === "yaml" ? yaml.load(textContent) : JSON5.parse(textContent) + + // Validate parsed content against schema + const valid = validate(parsed) + if (!valid) { + errorList = validate.errors ?? [] + } + } catch (err) { + // If parsing fails, create a generic syntax error + // This happens when the content is not valid JSON/YAML + errorList = [ + { + keyword: "syntax", + message: "Invalid syntax", + instancePath: "", + schemaPath: "#/syntax", + params: {}, + }, + ] + } + + setValidationErrors((prevErrors) => { + const newVal = errorList.length > 0 ? errorList : null + if (!isEqual(prevErrors, newVal)) { + return newVal + } + + return prevErrors + }) + + // Set to store text snippets that should be highlighted as errors + const errorTexts = new Set<string>() + + for (const error of errorList) { + // Extract quoted values from error messages + // e.g. 'Expected string but got "number"' -> captures 'number' + const match = /"(.*?)"/.exec(error.message || "") + if (match) { + const unquoted = match[1] + errorTexts.add(unquoted) // Add without quotes + errorTexts.add(`"${unquoted}"`) // Add with quotes + } + + // Extract property names from error paths + // e.g. '/user/name' -> captures 'name' + const pathParts = error.instancePath?.split("/").filter(Boolean) + const lastPart = pathParts?.[pathParts.length - 1] + if (lastPart) { + errorTexts.add(lastPart) // Add without quotes + errorTexts.add(`"${lastPart}"`) // Add with quotes + } + + // Extract type names from error parameters + // e.g. {type: "string"} -> captures 'string' + if (typeof error.params?.type === "string") { + errorTexts.add(error.params.type) // Add without quotes + errorTexts.add(`"${error.params.type}"`) // Add with quotes + } + } + + log("ENTER UPDATE", {errorList, errorTexts}) + + // Start a mutable editor transaction to update validation UI + editor.update( + () => { + const root = $getRoot() + + // Process each code block to update error indicators + for (const block of root.getChildren()) { + if (!$isCodeBlockNode(block)) continue + + let blockHasError = false + + for (const line of block.getChildren()) { + if (!$isCodeLineNode(line)) continue + + for (const child of line.getChildren()) { + if (!$isCodeHighlightNode(child)) continue + // Check if this text node contains an error token + const text = child.getTextContent().trim() + let shouldHaveError = errorTexts.has(text) + + // Add JSON validation for strings not properly quoted + let expectedMessage = shouldHaveError + ? errorList.find((e) => e.message?.includes(text)) + ?.message ?? "Invalid" + : null + + // Custom JSON validation for string literals + if (!shouldHaveError && block.getLanguage() === "json") { + // Skip validation for punctuation tokens + const highlightType = child.getHighlightType() + const isPunctuation = highlightType === "punctuation" + const isOperataor = highlightType === "operator" + // If it's not punctuation, not a number, and not properly quoted, mark as error + if ( + !isPunctuation && + !isOperataor && + text !== "" && + !Number(text) && + text !== "true" && + text !== "false" && + text !== "null" && + (!text.startsWith('"') || !text.endsWith('"')) + ) { + shouldHaveError = true + expectedMessage = + "String must be wrapped in double quotes" + } + } + + // Get current validation message for comparison + const currentMessage = child.getValidationMessage() + if ( + child.hasValidationError() !== shouldHaveError || + currentMessage !== expectedMessage + ) { + child.setValidationError(shouldHaveError) + child.setValidationMessage(expectedMessage) + } + } + } + blockHasError = errorList.length > 0 + + // Manage error indicator node in code block + // This shows/hides the warning icon and updates error messages + const existingIndicator = block + .getChildren() + .find($isCodeBlockErrorIndicatorNode) + + // Collect all error messages to show in tooltip + const errorMessages: string[] = errorList.map( + (e) => e.message ?? "Unknown error", + ) + + // Update error indicator based on validation state: + // 1. If block has errors but no indicator -> create new one + // 2. If block has errors and indicator exists -> update messages if changed + // 3. If block has no errors but indicator exists -> remove it + if (blockHasError) { + if (!existingIndicator) { + block.append($createCodeBlockErrorIndicatorNode(errorMessages)) + } else if ( + $isCodeBlockErrorIndicatorNode(existingIndicator) && + JSON.stringify(existingIndicator.__errors) !== + JSON.stringify(errorMessages) + ) { + existingIndicator.getWritable().__errors = errorMessages + } + } else if (existingIndicator) { + existingIndicator.remove() + } + } + }, + { + skipTransforms: true, + }, + ) + }) + }) + }, [editor, schema]) + + return debug && validationErrors ? ( + <div className="validation-errors"> + {validationErrors.map((error, index) => ( + <div key={index}> + <strong>{error.keyword}</strong>: {error.message} + {error.instancePath && ` at ${error.instancePath}`} + </div> + ))} + </div> + ) : null } diff --git a/web/oss/src/components/Editor/plugins/code/plugins/SyntaxHighlightPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/SyntaxHighlightPlugin.tsx index 6b5eee19bd..38661546c5 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/SyntaxHighlightPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/SyntaxHighlightPlugin.tsx @@ -2,23 +2,19 @@ import {useEffect} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import Ajv, {ErrorObject} from "ajv" import { $getSelection, $isRangeSelection, $createRangeSelection, $setSelection, + $isTabNode, $isTextNode, TextNode, NodeKey, $getNodeByKey, RangeSelection, - $getRoot, - COMMAND_PRIORITY_LOW, } from "lexical" -import {INITIAL_CONTENT_COMMAND} from "../../../commands/InitialContentCommand" -import {store, editorStateAtom} from "../index" import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import { $createCodeHighlightNode, @@ -26,85 +22,14 @@ import { CodeHighlightNode, } from "../nodes/CodeHighlightNode" import {$isCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" -import {$isCodeTabNode} from "../nodes/CodeTabNode" import {createLogger} from "../utils/createLogger" import {getDiffRange} from "../utils/getDiffRange" import {isPluginLocked, lockPlugin, unlockPlugin} from "../utils/pluginLocks" import {tokenizeCodeLine} from "../utils/tokenizer" -type ValidationError = ErrorObject<string, Record<string, any>, unknown> - -// Editor-specific validation contexts - keyed by editor ID -const editorValidationContexts = new Map< - string, - { - editorId?: string - schema?: any - ajv?: Ajv - errorTexts?: Set<string> - errorList?: ValidationError[] - } ->() - -// Current active editor ID for validation context -let currentEditorId: string | null = null - -/** - * Get the current editor ID used for validation context - */ -export function getCurrentEditorId(): string | null { - return currentEditorId -} - -/** - * Set the current editor ID for validation context - */ -export function setCurrentEditorId(editorId: string) { - currentEditorId = editorId -} - -/** - * Get validation context for a specific editor or the current editor - */ -export function getValidationContext(editorId?: string) { - const targetEditorId = editorId || currentEditorId - if (!targetEditorId) { - return {} - } - return editorValidationContexts.get(targetEditorId) || {} -} - -/** - * Function to set validation context for a specific editor - */ -export function setValidationContext( - editorId: string, - context: { - schema?: any - ajv?: Ajv - errorTexts?: Set<string> - errorList?: ValidationError[] - }, -) { - if (!editorId) { - console.warn("⚠️ [SyntaxHighlightPlugin] No editor ID available for validation context") - return - } - - editorValidationContexts.set(editorId, context) -} - const PLUGIN_NAME = "SyntaxHighlightPlugin" const log = createLogger(PLUGIN_NAME, {disabled: true}) -/** - * Runs validation on a code line after syntax highlighting is complete. - * This function runs in the same Lexical transform as syntax highlighting, - * ensuring validation errors are applied to nodes in a single update cycle. - * - * @param lineNode - The code line node that was just highlighted - */ - /** * Updates a code line while preserving cursor position. * @@ -122,7 +47,7 @@ const log = createLogger(PLUGIN_NAME, {disabled: true}) */ function $updateAndRetainSelection( lineKey: NodeKey, - _selection: RangeSelection | undefined, + _selection: RangeSelection, fn: () => boolean, ): void { const lineNode = $getNodeByKey(lineKey) @@ -130,7 +55,7 @@ function $updateAndRetainSelection( if (!node || !$isCodeLineNode(node) || !node.isAttached()) return const selection = $getSelection() - if (!_selection || !$isRangeSelection(selection)) { + if (!$isRangeSelection(selection)) { fn() return } @@ -189,33 +114,9 @@ function $updateAndRetainSelection( * Uses a locking mechanism to prevent concurrent updates * and maintains a smooth editing experience. */ -interface SyntaxHighlightPluginProps { - editorId: string - schema?: any - debug?: boolean -} - -export function SyntaxHighlightPlugin({ - editorId, - schema, - debug = false, -}: SyntaxHighlightPluginProps) { +export function SyntaxHighlightPlugin() { const [editor] = useLexicalComposerContext() - useEffect(() => { - // Set this editor as the current one for validation context - setCurrentEditorId(editorId) - - if (schema) { - // Set schema for this specific editor - setValidationContext(editorId, { - schema, - errorTexts: new Set(), - errorList: [], - }) - } - }, [schema]) - useEffect(() => { /** * Transforms a code line by applying syntax highlighting. @@ -233,126 +134,65 @@ export function SyntaxHighlightPlugin({ * @param lineNode - The code line to transform */ const $transformLine = (lineNode: CodeLineNode) => { - const lineKey = lineNode.getKey() - const textContent = lineNode.getTextContent() - log(`🎨 [SyntaxHighlightPlugin] $transformLine called:`, { - lineKey, - textContent: textContent.substring(0, 50) + (textContent.length > 50 ? "..." : ""), - textLength: textContent.length, - }) - const parent = lineNode.getParent() - log(`🔍 [SyntaxHighlightPlugin] Checking conditions:`, { - lineKey, - hasParent: !!parent, - isCodeBlockParent: $isCodeBlockNode(parent), - isPluginLocked: isPluginLocked(PLUGIN_NAME), - }) - - if (!$isCodeBlockNode(parent)) { - log( - `⚠️ [SyntaxHighlightPlugin] Skipped line ${lineKey} - parent is not CodeBlockNode`, - ) - return - } + if (!$isCodeBlockNode(parent)) return if (isPluginLocked(PLUGIN_NAME)) { - log(`🔒 [SyntaxHighlightPlugin] Skipped line ${lineKey} - plugin locked`) + log("Skipped re-highlight (plugin locked)") return } const language = parent.getLanguage() const children = lineNode.getChildren() - log("🎨 [SyntaxHighlightPlugin] Transforming line", { - language, - }) // Extract pure text content, ignoring tab nodes // This ensures we only tokenize actual code content const text = children - .filter((child) => !$isCodeTabNode(child)) + .filter((child) => !$isTabNode(child)) .map((child) => child.getTextContent()) .join("") const tokens = tokenizeCodeLine(text, language) - log("🎨 [SyntaxHighlightPlugin] Tokens after tokenization", tokens) + log("Tokens after tokenization", tokens) // Get existing highlight nodes and their token information const highlightChildren = children.filter($isCodeHighlightNode) const existingTokens = highlightChildren.map((n) => ({ content: n.getTextContent(), type: n.getHighlightType(), - hasValidationError: n.hasValidationError(), - validationMessage: n.getValidationMessage(), })) // Check if new tokens match existing ones to avoid unnecessary updates // This optimization prevents re-rendering when content hasn't changed - // Now includes validation state comparison to detect validation context changes const tokenMatch = tokens.length === existingTokens.length && - tokens.every((t, i) => { - const existing = existingTokens[i] - if (!existing) return false - - return t.content === existing.content && t.type === existing.type - }) - log(`🔍 [SyntaxHighlightPlugin] Token comparison:`, { - lineKey, - tokenMatch, - newTokensLength: tokens.length, - existingTokensLength: existingTokens.length, - newTokens: tokens.map((t) => `${t.type}:${t.content}`).slice(0, 3), - existingTokens: existingTokens.map((t) => `${t.type}:${t.content}`).slice(0, 3), - }) - - // Validation will run inside the editor.update() transaction below - // to maintain proper undo/redo history - - if (tokenMatch) { - log( - `⏭️ [SyntaxHighlightPlugin] Tokens identical, skipping re-highlight but validation will run - line ${lineKey}`, + tokens.every( + (t, i) => + t.content === existingTokens[i]?.content && + t.type === existingTokens[i]?.type, ) - // Don't return early - let validation run in the main transform below - // This ensures validation runs even when tokens are identical + if (tokenMatch) { + log("Skipped re-highlight (tokens identical)") + return } lockPlugin(PLUGIN_NAME) - log("transforming line", lineNode) + // Start a mutable editor transaction to update highlighting editor.update( () => { - const selection = $getSelection() - if (!$isRangeSelection(selection)) return - $updateAndRetainSelection(lineNode.getKey(), selection.clone(), () => { + $updateAndRetainSelection(lineNode.getKey(), $getSelection()?.clone(), () => { // Separate tabs from highlight nodes // Tabs need to be preserved in their positions const current = lineNode.getChildren() - const tabs = current.filter($isCodeTabNode) + const tabs = current.filter($isTabNode) const highlights = current.filter($isCodeHighlightNode) - // Create new highlight nodes from tokens (pure syntax highlighting) - const newHighlights = tokens.map(({content, type}) => { - const node = $createCodeHighlightNode( - content, - type, - false, // No token-level validation - "", // No validation message - ) - - return node - }) - - // Always run validation first, regardless of highlighting changes - - // Skip highlighting updates if tokens are identical - if (tokenMatch) { - log( - `✅ [SyntaxHighlightPlugin] Validation completed, skipping highlight update for line ${lineKey}`, - ) - return false - } + // Create new highlight nodes from tokens + const newHighlights = tokens.map(({content, type}) => + $createCodeHighlightNode(content, type, false, null), + ) - // Calculate minimal set of changes needed for highlighting + // Calculate minimal set of changes needed // This optimizes the update by only replacing changed nodes const {from, to, nodesForReplacement} = getDiffRange( highlights, @@ -372,7 +212,6 @@ export function SyntaxHighlightPlugin({ }) lineNode.splice(from + tabs.length, to - from || 1, nodesForReplacement) - return true }) }, @@ -390,137 +229,20 @@ export function SyntaxHighlightPlugin({ // This ensures syntax highlighting updates when text content changes const unregisterText = editor.registerNodeTransform(TextNode, (node) => { const parent = node.getParent() - const nodeText = node.getTextContent() - log(`🔤 [SyntaxHighlightPlugin] TextNode transform triggered:`, { - nodeKey: node.getKey(), - nodeText: nodeText.substring(0, 30) + (nodeText.length > 30 ? "..." : ""), - textLength: nodeText.length, - parentType: parent?.getType(), - isCodeLineParent: $isCodeLineNode(parent), - }) - - if ($isCodeLineNode(parent)) { - // check if there's a tab node right after this node - const nextSibling = node.getNextSibling() - if ($isCodeTabNode(nextSibling)) { - const allTrailingTabs = node.getNextSiblings().filter($isCodeTabNode) - const allTrailingTabsContent = allTrailingTabs.map((tab) => - tab.getTextContent(), - ) - const newNode = $createCodeHighlightNode( - nodeText + allTrailingTabsContent.join(""), - "text", - false, - "", - ) - node.replace(newNode) - allTrailingTabs.forEach((tab) => tab.remove()) - } - $transformLine(parent) - } + if ($isCodeLineNode(parent)) $transformLine(parent) }) // Register transform for highlight nodes // This ensures consistent highlighting when nodes are modified const unregisterHighlight = editor.registerNodeTransform(CodeHighlightNode, (node) => { const parent = node.getParent() - log("🎨 CodeHighlightNode transform triggered", { - nodeText: node.getTextContent(), - nodeType: node.getHighlightType(), - parentType: parent?.getType(), - hasParent: !!parent, - }) - - if ($isCodeLineNode(parent)) { - $transformLine(parent) - } + log("registerNodeTransform", node) + if ($isCodeLineNode(parent)) $transformLine(parent) }) - // Note: Removed forced re-analysis event system to prevent editor corruption - - // Register mutation listener for bracket detection - // This catches node deletions that transforms miss - const unregisterMutationListener = editor.registerMutationListener( - CodeHighlightNode, - (mutatedNodes, {updateTags}) => { - log("🔬 CodeHighlightNode mutation detected", { - mutationCount: mutatedNodes.size, - updateTags: Array.from(updateTags), - }) - - // Skip validation during undo/redo operations to preserve history - if ( - updateTags.has("history-merge") || - updateTags.has("history-push") || - updateTags.size > 0 - ) { - log("⏭️ Skipping validation during history operation") - return - } - - // Check if any bracket-related nodes were mutated - let shouldAnalyzeBrackets = false - for (const [nodeKey, mutation] of mutatedNodes) { - log(` → Node ${nodeKey}: ${mutation}`) - - // If a node was destroyed, we need to re-analyze brackets - if (mutation === "destroyed") { - shouldAnalyzeBrackets = true - log("🚨 Node destroyed - triggering bracket re-analysis") - } - } - - // Trigger bracket analysis if needed - CONSERVATIVE approach - // if (shouldAnalyzeBrackets) { - // log("🔄 Scheduling conservative bracket re-analysis") - // // Just run validation directly - no need for full transform cycle - // editor.update(() => { - // // Find any code line and run validation only - // const root = $getRoot() - // const descendants = root.getAllTextNodes() - // for (const textNode of descendants) { - // const parent = textNode.getParent() - // if ($isCodeLineNode(parent)) { - // // Run validation directly - this will refresh bracket detection - - // return // Only validate one line to refresh cache - // } - // } - // }) - // } - }, - {skipInitialization: true}, // Don't trigger on initial load - ) - - // Listen for initial content command to run validation on initial load - const unregisterInitialContent = editor.registerCommand( - INITIAL_CONTENT_COMMAND, - (payload) => { - // Only run validation if this is truly initial content loading - // Skip if the editor is focused (user is actively typing) - const editorState = store.get(editorStateAtom) - if (editorState?.focused) { - log( - `⏭️ [SyntaxHighlightPlugin] Skipping initial validation - editor is focused (user typing)`, - ) - return false - } - - log(`🚀 [SyntaxHighlightPlugin] Initial content loaded, running validation`) - - return false // Don't prevent other handlers - }, - COMMAND_PRIORITY_LOW, - ) - - // Note: We don't need to listen to validation errors changes here - // The validation errors will be applied during the normal highlighting process - return () => { unregisterText() unregisterHighlight() - unregisterMutationListener() - unregisterInitialContent() } }, [editor]) diff --git a/web/oss/src/components/Editor/plugins/code/plugins/VerticalNavigationPlugin.tsx b/web/oss/src/components/Editor/plugins/code/plugins/VerticalNavigationPlugin.tsx index 336e3bc56e..2361702a0c 100644 --- a/web/oss/src/components/Editor/plugins/code/plugins/VerticalNavigationPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/code/plugins/VerticalNavigationPlugin.tsx @@ -4,9 +4,7 @@ * This plugin improves vertical navigation in code blocks by: * 1. Maintaining cursor horizontal position when moving between lines * 2. Handling Alt+Up/Down for line movement - * 3. Handling Cmd+Up/Down (macOS) for document navigation (jump to top/bottom) - * 4. Preventing selection from moving out of code blocks - * 5. Supporting Shift+Cmd+Up/Down for selection extension to document boundaries + * 3. Preventing selection from moving out of code blocks */ import {useEffect} from "react" @@ -16,7 +14,7 @@ import { $isRangeSelection, $createRangeSelection, $setSelection, - COMMAND_PRIORITY_HIGH, + COMMAND_PRIORITY_CRITICAL, KEY_ARROW_UP_COMMAND, KEY_ARROW_DOWN_COMMAND, KEY_DOWN_COMMAND, @@ -28,10 +26,9 @@ import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeLineNode} from "../nodes/CodeLineNode" import {createLogger} from "../utils/createLogger" import {$fixCodeBlockIndentation} from "../utils/indentationUtils" -import {getNodeAtOffset} from "../utils/navigation" const PLUGIN_NAME = "VerticalNavigationPlugin" -const log = createLogger(PLUGIN_NAME, {disabled: true}) +const log = createLogger(PLUGIN_NAME, {disabled: false}) /** * Handles line movement with Alt+Up/Down @@ -200,30 +197,6 @@ function $handleShiftLines( // Log indentation after fix logIndentationState("Indentation AFTER auto-fix", parent) - // Trigger validation after line movement to update error indicators - // This ensures that validation errors are repositioned to match the moved lines - const textContent = parent.getTextContent() - - if (textContent.length > 3) { - // Clean the text content by removing empty lines for validation - const originalLines = textContent.split("\n") - const cleanedLines: string[] = [] - const cleanedToOriginalLineMap = new Map<number, number>() - - originalLines.forEach((line: string, originalIndex: number) => { - if (line.trim() !== "") { - cleanedLines.push(line) - const cleanedLineNumber = cleanedLines.length - const originalLineNumber = originalIndex + 1 - cleanedToOriginalLineMap.set(cleanedLineNumber, originalLineNumber) - } - }) - - log( - `🔄 [VerticalNavigationPlugin] Line movement completed - validation will be handled automatically`, - ) - } - return shouldHandle } @@ -273,74 +246,21 @@ export function VerticalNavigationPlugin() { const currentLine = anchorNode.getParents().find($isCodeLineNode) if (!currentLine) return false - const getUnfoldedLine = (line: any, direction: "up" | "down") => { - if (!line) return null - const target = - direction === "up" ? line.getPreviousSibling() : line.getNextSibling() - - if (target && !target.isHidden()) return target - return getUnfoldedLine(target, direction) - } - const targetLine = isArrowUp - ? getUnfoldedLine(currentLine, "up") - : getUnfoldedLine(currentLine, "down") - - if (!targetLine || !$isCodeLineNode(targetLine)) return false - - // Handle Cmd+Arrow (metaKey) for document navigation (VSCode-like) - if (event.metaKey) { - log("🎮 Cmd+Arrow detected, handling document navigation") - event.preventDefault() - - // Find the code block containing the current line - const codeBlock = currentLine.getParents().find($isCodeBlockNode) - if (!codeBlock) return false - - // Get all lines in the code block - const allLines = codeBlock.getChildren().filter($isCodeLineNode) - if (allLines.length === 0) return false - - // Determine target line (first or last) - const targetLine = isArrowUp ? allLines[0] : allLines[allLines.length - 1] - if (!targetLine) return false - - // Position cursor at beginning or end of target line - const targetNodes = targetLine.getChildren() - if (targetNodes.length === 0) return false - - let targetNode, targetOffset - if (isArrowUp) { - // Go to beginning of first line - targetNode = targetNodes[0] - targetOffset = 0 - } else { - // Go to end of last line - const lastNode = targetNodes[targetNodes.length - 1] - targetNode = lastNode - targetOffset = lastNode.getTextContentSize() + ? currentLine.getPreviousSibling() + : currentLine.getNextSibling() + + if (!targetLine || !$isCodeLineNode(targetLine)) { + // If at the top/bottom of code block, prevent selection from moving out + if ( + (isArrowUp && !currentLine.getPreviousSibling()) || + (!isArrowUp && !currentLine.getNextSibling()) + ) { + log("🎮 At edge of code block, preventing default") + event.preventDefault() + return true } - - // Create and set the selection - const newSelection = $createRangeSelection() - if (event.shiftKey) { - // Extend selection from current position to target - newSelection.anchor.set(anchor.getNode().getKey(), anchor.offset, "text") - newSelection.focus.set(targetNode.getKey(), targetOffset, "text") - } else { - // Move cursor to target position - newSelection.anchor.set(targetNode.getKey(), targetOffset, "text") - newSelection.focus.set(targetNode.getKey(), targetOffset, "text") - } - - $setSelection(newSelection) - log("🎮 Document navigation completed", { - direction: isArrowUp ? "top" : "bottom", - targetNodeKey: targetNode.getKey(), - targetOffset, - shiftKey: event.shiftKey, - }) - return true + return false } // Handle Alt+Arrow for line movement @@ -382,16 +302,9 @@ export function VerticalNavigationPlugin() { }) // Get target line information - // const isTargetLineFolded = targetLine?.isCollapsed() - - // if (isTargetLineFolded) { - - // // editor.dispatchCommand(KEY_DOWN_COMMAND, event) - // // return true - // } - const targetLineContent = targetLine?.getTextContent() - const targetLineLength = targetLineContent?.length - const targetLineNodes = targetLine?.getChildren() + const targetLineContent = targetLine.getTextContent() + const targetLineLength = targetLineContent.length + const targetLineNodes = targetLine.getChildren() log("🎮 Target line info:", { targetLineLength, @@ -403,11 +316,21 @@ export function VerticalNavigationPlugin() { // If that's not possible, position at the end const targetOffset = Math.min(currentPositionInLine, targetLineLength) - // Resolve node + inner offset via helper (O(children) worst-case but no manual loop here) - const {node: targetNode, innerOffset: offsetInTargetNode} = getNodeAtOffset( - targetLine as any, - targetOffset, - ) + // Find the node and offset within that node for the target position + let accumulatedLength = 0 + let targetNode = targetLineNodes[targetLineNodes.length - 1] // Default to last node + let offsetInTargetNode = targetNode ? targetNode.getTextContentSize() : 0 + + for (const node of targetLineNodes) { + const nodeLength = node.getTextContentSize() + if (accumulatedLength + nodeLength >= targetOffset) { + // We found the node containing our target position + targetNode = node + offsetInTargetNode = targetOffset - accumulatedLength + break + } + accumulatedLength += nodeLength + } if (!targetNode) { log("🎮 No target node found") @@ -417,7 +340,7 @@ export function VerticalNavigationPlugin() { log("🎮 Setting selection to:", { targetNodeKey: targetNode.getKey(), offsetInTargetNode, - targetNodeType: targetNode!.getType(), + targetNodeType: targetNode.getType(), }) // Create and set the selection @@ -427,7 +350,7 @@ export function VerticalNavigationPlugin() { newSelection.anchor.set(anchor.getNode().getKey(), anchor.offset, "text") newSelection.focus.set(targetNode.getKey(), offsetInTargetNode, "text") } else { - newSelection.anchor.set(targetNode!.getKey(), offsetInTargetNode, "text") + newSelection.anchor.set(targetNode.getKey(), offsetInTargetNode, "text") newSelection.focus.set(targetNode.getKey(), offsetInTargetNode, "text") } $setSelection(newSelection) @@ -435,7 +358,7 @@ export function VerticalNavigationPlugin() { return false }, - COMMAND_PRIORITY_HIGH, + COMMAND_PRIORITY_CRITICAL, ) }, [editor]) diff --git a/web/oss/src/components/Editor/plugins/code/plugins/horizontalNavigationUtils.ts b/web/oss/src/components/Editor/plugins/code/plugins/horizontalNavigationUtils.ts new file mode 100644 index 0000000000..1d5eff005e --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/plugins/horizontalNavigationUtils.ts @@ -0,0 +1,359 @@ +import {LexicalNode, $createRangeSelection, $setSelection, $isTabNode} from "lexical" + +import {$isCodeHighlightNode} from "../nodes/CodeHighlightNode" +import {$isCodeLineNode} from "../nodes/CodeLineNode" +import {createLogger} from "../utils/createLogger" + +const log = createLogger("HorizontalNavigationPluginUtilities", {disabled: false}) + +/** + * Returns true if the given token is skippable (empty, whitespace, or zero-width). + */ +export function isSkippableToken(token: LexicalNode): boolean { + if ($isTabNode(token)) return false + if ($isCodeHighlightNode(token)) { + const text = token.getTextContent() + return text === "" || text === "\u200b" || /^\s+$/.test(text) + } + return false +} + +/** + * Moves the caret or selection to the specified token and offset. + * If shiftKey is true, expands selection from anchor. + */ +export function $moveCaretToToken( + anchorToken: LexicalNode, + focusToken: LexicalNode, + left: boolean, + shiftKey: boolean, + selection: any, // RangeSelection from lexical + overrideOffset?: number, +): boolean { + const sel = $createRangeSelection() + let focusOffset = 0 + if (overrideOffset !== undefined) { + focusOffset = overrideOffset + } else if (left) { + focusOffset = 0 + } else { + if (typeof focusToken.getTextContentSize === "function") { + focusOffset = focusToken.getTextContentSize() + } else if (typeof focusToken.getTextContent === "function") { + focusOffset = focusToken.getTextContent().length + } else { + focusOffset = 0 + } + } + if (shiftKey && selection && "anchor" in selection && selection.anchor) { + // Expand selection from anchor + sel.anchor.set( + (selection.anchor as any).getNode().getKey(), + (selection.anchor as any).offset, + "text", + ) + sel.focus.set(focusToken.getKey(), focusOffset, "text") + } else { + sel.anchor.set(focusToken.getKey(), focusOffset, "text") + sel.focus.set(focusToken.getKey(), focusOffset, "text") + } + $setSelection(sel) + return true +} +/** @deprecated renamed to {@link $moveCaretToToken} by @lexical/eslint-plugin rules-of-lexical */ +export const moveCaretToToken = $moveCaretToToken + +function isZeroWidthChar(char: string | undefined) { + return char === "\u200B" || char === undefined || char === "" +} + +function skipZeroWidth( + node: LexicalNode, + offset: number, + direction: "left" | "right", +): {node: LexicalNode; offset: number} | null { + log("skipZeroWidth initial", { + nodeType: node.getType(), + nodeKey: node.getKey(), + offset, + direction, + text: + typeof (node as any).getTextContent === "function" + ? (node as any).getTextContent() + : undefined, + charAtOffset: + typeof (node as any).getTextContent === "function" + ? (node as any).getTextContent()[offset] + : undefined, + }) + + // Handle TabNode atomically + if ($isTabNode(node)) { + if (direction === "right") { + const next = node.getNextSibling() + if (next && $isCodeHighlightNode(next)) { + const text = next.getTextContent() + let newOffset = 0 + // Skip zero-width and quotes + while ( + newOffset < text.length && + (isZeroWidthChar(text[newOffset]) || + text[newOffset] === '"' || + text[newOffset] === "'") + ) { + newOffset++ + } + // If still at 0 and there's something after, go to offset 1 + if (newOffset === 0 && text.length > 1) { + newOffset = 1 + } + return {node: next, offset: newOffset} + } + if (next) { + return skipZeroWidth(next, 0, direction) + } + const parentLine = node.getParent() + if ($isCodeLineNode(parentLine)) { + const nextLine = parentLine.getNextSibling() + if (nextLine && $isCodeLineNode(nextLine) && nextLine.getChildren().length > 0) { + const firstChild = nextLine.getChildren()[0] + if ($isCodeHighlightNode(firstChild)) { + const text = firstChild.getTextContent() + let newOffset = 0 + while ( + newOffset < text.length && + (isZeroWidthChar(text[newOffset]) || + text[newOffset] === '"' || + text[newOffset] === "'") + ) { + newOffset++ + } + if (newOffset === 0 && text.length > 1) { + newOffset = 1 + } + return {node: firstChild, offset: newOffset} + } + return skipZeroWidth(firstChild, 0, direction) + } + } + return null + } else { + const prev = node.getPreviousSibling() + if (prev) { + // Move to end of previous node, skipping trailing zero-width chars + if ($isCodeHighlightNode(prev)) { + const text = prev.getTextContent() + let newOffset = text.length + while (newOffset > 0 && isZeroWidthChar(text[newOffset - 1])) { + newOffset-- + } + return {node: prev, offset: newOffset} + } + return skipZeroWidth(prev, prev.getTextContentSize(), direction) + } + const parentLine = node.getParent() + if ($isCodeLineNode(parentLine)) { + const prevLine = parentLine.getPreviousSibling() + if (prevLine && $isCodeLineNode(prevLine) && prevLine.getChildren().length > 0) { + const lastChild = prevLine.getChildren()[prevLine.getChildren().length - 1] + if ($isCodeHighlightNode(lastChild)) { + const text = lastChild.getTextContent() + let newOffset = text.length + while (newOffset > 0 && isZeroWidthChar(text[newOffset - 1])) { + newOffset-- + } + return {node: lastChild, offset: newOffset} + } + return skipZeroWidth(lastChild, lastChild.getTextContentSize(), direction) + } + } + return null + } + } + + // Handle CodeHighlightNode + if ($isCodeHighlightNode(node)) { + const text = node.getTextContent() + if (direction === "left") { + if (offset > 0) { + let newOffset = offset - 1 + // Skip zero-width chars + while (newOffset > 0 && isZeroWidthChar(text[newOffset])) { + newOffset-- + } + return {node, offset: newOffset} + } else { + // At start, jump to previous sibling or previous line + const prev = node.getPreviousSibling() + if (prev && $isCodeHighlightNode(prev)) { + const prevText = prev.getTextContent() + let newOffset = prevText.length + // If last char is a quote, skip it to get a visual move + if (prevText[newOffset - 1] === '"' || prevText[newOffset - 1] === "'") { + newOffset-- + } + // If prev node's offset length and this node's offset 0 are visually the same, skip to offset length-1 + if (newOffset === prevText.length && prevText.length > 1) { + newOffset = prevText.length - 1 + } + return {node: prev, offset: newOffset} + } + if (prev) { + return skipZeroWidth(prev, prev.getTextContentSize(), direction) + } + const parentLine = node.getParent() + if ($isCodeLineNode(parentLine)) { + const prevLine = parentLine.getPreviousSibling() + if ( + prevLine && + $isCodeLineNode(prevLine) && + prevLine.getChildren().length > 0 + ) { + const lastChild = prevLine.getChildren()[prevLine.getChildren().length - 1] + if ($isCodeHighlightNode(lastChild)) { + const prevText = lastChild.getTextContent() + let newOffset = prevText.length + if ( + prevText[newOffset - 1] === '"' || + prevText[newOffset - 1] === "'" + ) { + newOffset-- + } + if (newOffset === prevText.length && prevText.length > 1) { + newOffset = prevText.length - 1 + } + return {node: lastChild, offset: newOffset} + } + return skipZeroWidth(lastChild, lastChild.getTextContentSize(), direction) + } + } + return null + } + } else { + if (offset < text.length) { + let newOffset = offset + 1 + // Skip zero-width chars + while (newOffset < text.length && isZeroWidthChar(text[newOffset])) { + newOffset++ + } + log("skipZeroWidth return x0", { + node, + offset: newOffset, + }) + return {node, offset: newOffset} + } else { + // At end, jump to next sibling or next line + const next = node.getNextSibling() + if (next && $isCodeHighlightNode(next)) { + const text = next.getTextContent() + let newOffset = 0 + // Skip zero-width and quotes + while ( + newOffset < text.length && + (isZeroWidthChar(text[newOffset]) || + text[newOffset] === '"' || + text[newOffset] === "'") + ) { + log("skipZeroWidth FOUND ZERO WIDTH CHAR -> MOVING", { + text, + node: next, + offset: newOffset, + isZeroWidth: isZeroWidthChar(text[newOffset]), + char: text[newOffset], + }) + newOffset++ + } + // Always increment offset by 1 when coming from previous node (right navigation) + if (newOffset === 0 && text.length > 0) { + newOffset = 1 + } + // Clamp to text length + if (newOffset > text.length) newOffset = text.length + log("skipZeroWidth return x1", { + text, + node: next, + offset: newOffset, + hasZeroWidth: text.indexOf("\u200b") !== -1, + }) + return {node: next, offset: newOffset} + } + if (next) { + log("skipZeroWidth return x2", { + node: next, + offset: 0, + }) + return skipZeroWidth(next, 0, direction) + } + const parentLine = node.getParent() + if ($isCodeLineNode(parentLine)) { + const nextLine = parentLine.getNextSibling() + if ( + nextLine && + $isCodeLineNode(nextLine) && + nextLine.getChildren().length > 0 + ) { + const firstChild = nextLine.getChildren()[0] + if ($isCodeHighlightNode(firstChild)) { + const text = firstChild.getTextContent() + let newOffset = 0 + while ( + newOffset < text.length && + (isZeroWidthChar(text[newOffset]) || + text[newOffset] === '"' || + text[newOffset] === "'") + ) { + newOffset++ + } + if (newOffset === 0 && text.length > 1) { + newOffset = 1 + } + log("skipZeroWidth return x3", { + firstChild, + newOffset, + }) + return {node: firstChild, offset: newOffset} + } + log("skipZeroWidth return x4", { + firstChild, + offset: 0, + }) + return skipZeroWidth(firstChild, 0, direction) + } + } + return null + } + } + } + + log("skipZeroWidth return 3", { + node, + offset, + }) + + // Fallback: return current + return {node, offset} +} + +/** + * Finds the next valid position for cursor placement + * Skips zero-width characters and handles special nodes + */ +export function $findNextValidPosition( + node: LexicalNode, + offset: number, + direction: "left" | "right", +): {node: LexicalNode; offset: number} | null { + log("$findNextValidPosition initial", { + nodeType: node.getType(), + nodeKey: node.getKey(), + offset, + direction, + text: + typeof (node as any).getTextContent === "function" + ? (node as any).getTextContent() + : undefined, + }) + + log("$findNextValidPosition return", {node, offset, direction}) + return skipZeroWidth(node, offset, direction) +} diff --git a/web/oss/src/components/Editor/plugins/code/tryParsePartialJson.ts b/web/oss/src/components/Editor/plugins/code/tryParsePartialJson.ts index 10854aea87..df8ade2a77 100644 --- a/web/oss/src/components/Editor/plugins/code/tryParsePartialJson.ts +++ b/web/oss/src/components/Editor/plugins/code/tryParsePartialJson.ts @@ -1,7 +1,5 @@ // Pure utility version for robust partial JSON parsing -import {jsonrepair} from "jsonrepair" - import {createLogger} from "./utils/createLogger" /** @@ -15,7 +13,7 @@ import {createLogger} from "./utils/createLogger" * - Ignores incomplete key-value pairs, missing colons, or values. * - Handles nested objects and arrays. * - Recovers from missing commas and trailing pairs. - * - Returns an object containing only valid pairs, or null if none found or input is invalid. + * - Returns an object containing only valid pairs, or null if none found. * * @param input - The JSON string or object to parse. If an object is given, it is returned as-is. * @returns An object containing all valid key-value pairs, or null if none are found or input is invalid. @@ -37,55 +35,12 @@ export function tryParsePartialJson(input: any): any | null { return null } - // Clean invisibles only. Use jsonrepair for tolerant fixes (quote delimiters, - // trailing commas, etc.) while preserving Unicode inside string contents. - const removeInvisibles = (str: string) => str.replace(/[\u200B-\u200D\uFEFF\u00A0]/g, "") - const cleanedInput = removeInvisibles(input) - - // FIRST: Try standard JSON.parse to preserve original key ordering - try { - const parsed = JSON.parse(cleanedInput.trim()) - log( - "[tryParsePartialJson] Successfully parsed with standard JSON.parse, preserving key order", - ) - return parsed - } catch (e) { - log("[tryParsePartialJson] Standard JSON.parse failed, trying common fixes:", e.message) - } - - // Try jsonrepair to broadly fix malformed JSON while preserving content - try { - const repaired = jsonrepair(cleanedInput.trim()) - const parsed = JSON.parse(repaired) - log("[tryParsePartialJson] Successfully parsed after jsonrepair") - return parsed - } catch (e) { - log("[tryParsePartialJson] jsonrepair parse failed, falling back to heuristics:", e.message) - } - - // SECOND: Try fixing common JSON issues before falling back to manual parsing - const commonFixes = [ - // Remove trailing commas (most common issue) - (str: string) => str.replace(/,\s*([}\]])/g, "$1"), - // Remove trailing comma at end of object/array - (str: string) => str.replace(/,\s*$/, ""), - // Fix missing quotes around keys (basic case) - (str: string) => str.replace(/(\w+)\s*:/g, '"$1":'), - ] - - for (const fix of commonFixes) { - try { - const fixedInput = fix(cleanedInput.trim()) - const parsed = JSON.parse(fixedInput) - log( - "[tryParsePartialJson] Successfully parsed after applying common fixes, preserving key order", - ) - return parsed - } catch (e) { - // Continue to next fix - log("[tryParsePartialJson] Fix attempt failed:", e.message) - } - } + // Clean invisible characters and normalize curly quotes to standard quotes + const cleanedInput = input + // Remove zero-width spaces, BOM, NBSP, etc. + .replace(/[\u200B-\u200D\uFEFF\u00A0]/g, "") + // Replace curly quotes with standard quotes + .replace(/[\u201C\u201D]/g, '"') // Remove outer braces if present for easier parsing, so we can focus on key-value pairs let body = cleanedInput.trim() diff --git a/web/oss/src/components/Editor/plugins/code/types.ts b/web/oss/src/components/Editor/plugins/code/types.ts deleted file mode 100644 index 9163c23460..0000000000 --- a/web/oss/src/components/Editor/plugins/code/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type CodeLanguage = "json" | "yaml" | "code" - -export const DEFAULT_CODE_LANGUAGE: CodeLanguage = "json" diff --git a/web/oss/src/components/Editor/plugins/code/utils/enhancedValidationContext.ts b/web/oss/src/components/Editor/plugins/code/utils/enhancedValidationContext.ts deleted file mode 100644 index 4c990cbadf..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/enhancedValidationContext.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Enhanced validation context implementation - */ - -import {MultiLineTrackerImpl} from "./multiLineTracker" -import { - EnhancedValidationContext, - ValidationError, - ValidationLevel, - StructuralError, - SyntaxError, - SchemaError, -} from "./validationTypes" - -export class EnhancedValidationContextImpl implements EnhancedValidationContext { - public structuralErrors = new Map<string, StructuralError[]>() - public syntaxErrors = new Map<string, SyntaxError[]>() - public schemaErrors = new Map<string, SchemaError[]>() - public multiLineTracker = new MultiLineTrackerImpl() - public errorTexts = new Set<string>() - public errorList: ValidationError[] = [] - - public lastStructuralValidation = 0 - public lastSyntaxValidation = 0 - public lastSchemaValidation = 0 - - getErrorsForToken(token: string): ValidationError[] { - const errors: ValidationError[] = [] - - // Priority 1: Structural errors (highest priority) - const structural = this.structuralErrors.get(token) - if (structural && structural.length > 0) { - errors.push(...structural) - } - - // Priority 2: Syntax errors (medium priority) - const syntax = this.syntaxErrors.get(token) - if (syntax && syntax.length > 0) { - errors.push(...syntax) - } - - // Priority 3: Schema errors (lowest priority) - const schema = this.schemaErrors.get(token) - if (schema && schema.length > 0) { - errors.push(...schema) - } - - return errors - } - - addError(error: ValidationError): void { - const token = error.token || "" - - switch (error.level) { - case "structural": - if (!this.structuralErrors.has(token)) { - this.structuralErrors.set(token, []) - } - this.structuralErrors.get(token)!.push(error as StructuralError) - this.lastStructuralValidation = Date.now() - break - - case "syntax": - if (!this.syntaxErrors.has(token)) { - this.syntaxErrors.set(token, []) - } - this.syntaxErrors.get(token)!.push(error as SyntaxError) - this.lastSyntaxValidation = Date.now() - break - - case "schema": - if (!this.schemaErrors.has(token)) { - this.schemaErrors.set(token, []) - } - this.schemaErrors.get(token)!.push(error as SchemaError) - this.lastSchemaValidation = Date.now() - break - } - - this.updateErrorTexts() - } - - removeErrorsForToken(token: string, level?: ValidationLevel): void { - if (!level) { - // Remove from all levels - this.structuralErrors.delete(token) - this.syntaxErrors.delete(token) - this.schemaErrors.delete(token) - } else { - switch (level) { - case "structural": - this.structuralErrors.delete(token) - break - case "syntax": - this.syntaxErrors.delete(token) - break - case "schema": - this.schemaErrors.delete(token) - break - } - } - - this.updateErrorTexts() - } - - clearErrors(level?: ValidationLevel): void { - if (!level) { - // Clear all levels - this.structuralErrors.clear() - this.syntaxErrors.clear() - this.schemaErrors.clear() - this.multiLineTracker.clear() - } else { - switch (level) { - case "structural": - this.structuralErrors.clear() - this.multiLineTracker.clear() - break - case "syntax": - this.syntaxErrors.clear() - break - case "schema": - this.schemaErrors.clear() - break - } - } - - this.updateErrorTexts() - } - - updateErrorTexts(): void { - this.errorTexts.clear() - this.errorList = [] - - // Collect all errors with priority - const allErrors: ValidationError[] = [] - - // Add structural errors (highest priority) - for (const errors of this.structuralErrors.values()) { - allErrors.push(...errors) - } - - // Add syntax errors (medium priority) - for (const errors of this.syntaxErrors.values()) { - allErrors.push(...errors) - } - - // Add schema errors (lowest priority) - for (const errors of this.schemaErrors.values()) { - allErrors.push(...errors) - } - - // Add multi-line structural errors - const multiLineErrors = this.multiLineTracker.getStructuralErrors() - allErrors.push(...multiLineErrors) - - // Update errorTexts and errorList - for (const error of allErrors) { - if (error.token) { - this.errorTexts.add(error.token) - - // Also add quoted/unquoted versions for better matching - if (error.token.startsWith('"') && error.token.endsWith('"')) { - // Add unquoted version - this.errorTexts.add(error.token.slice(1, -1)) - } else if (!error.token.startsWith('"')) { - // Add quoted version - this.errorTexts.add(`"${error.token}"`) - } - } - } - - this.errorList = allErrors - } - - /** - * Get the highest priority error for a token - */ - getPrimaryErrorForToken(token: string): ValidationError | null { - const errors = this.getErrorsForToken(token) - - // For syntax errors, don't check variations since we use context-specific keys - // Only check variations for schema errors which might legitimately apply to both forms - const schemaVariations = [ - token, - token.startsWith('"') && token.endsWith('"') ? token.slice(1, -1) : `"${token}"`, - ] - - for (const variation of schemaVariations) { - const variationErrors = this.getErrorsForToken(variation) - // Only add schema errors from variations, not syntax errors - const schemaErrors = variationErrors.filter((e) => e.level === "schema") - errors.push(...schemaErrors) - } - - if (errors.length === 0) return null - - // Return the highest priority error (structural > syntax > schema) - const structural = errors.find((e) => e.level === "structural") - if (structural) return structural - - const syntax = errors.find((e) => e.level === "syntax") - if (syntax) return syntax - - return errors[0] // Return first schema error - } - - /** - * Check if validation context has any errors - */ - hasErrors(): boolean { - return ( - this.structuralErrors.size > 0 || - this.syntaxErrors.size > 0 || - this.schemaErrors.size > 0 || - this.multiLineTracker.getStructuralErrors().length > 0 - ) - } - - /** - * Get summary of validation state - */ - getValidationSummary(): { - structuralCount: number - syntaxCount: number - schemaCount: number - multiLineCount: number - totalErrors: number - } { - const multiLineErrors = this.multiLineTracker.getStructuralErrors() - - return { - structuralCount: Array.from(this.structuralErrors.values()).reduce( - (sum, errors) => sum + errors.length, - 0, - ), - syntaxCount: Array.from(this.syntaxErrors.values()).reduce( - (sum, errors) => sum + errors.length, - 0, - ), - schemaCount: Array.from(this.schemaErrors.values()).reduce( - (sum, errors) => sum + errors.length, - 0, - ), - multiLineCount: multiLineErrors.length, - totalErrors: this.errorList.length, - } - } -} - -// Global enhanced validation context -let globalEnhancedValidationContext = new EnhancedValidationContextImpl() - -/** - * Get the global enhanced validation context - */ -export function getEnhancedValidationContext(): EnhancedValidationContext { - return globalEnhancedValidationContext -} - -/** - * Set the global enhanced validation context (for testing or reset) - */ -export function setEnhancedValidationContext(context: EnhancedValidationContext): void { - globalEnhancedValidationContext = context as EnhancedValidationContextImpl -} - -/** - * Reset the global enhanced validation context - */ -export function resetEnhancedValidationContext(): void { - globalEnhancedValidationContext = new EnhancedValidationContextImpl() -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/getDiffRange.ts b/web/oss/src/components/Editor/plugins/code/utils/getDiffRange.ts index 70ba6b1284..1b3c7d1a7d 100644 --- a/web/oss/src/components/Editor/plugins/code/utils/getDiffRange.ts +++ b/web/oss/src/components/Editor/plugins/code/utils/getDiffRange.ts @@ -8,8 +8,6 @@ import {CodeHighlightNode} from "../nodes/CodeHighlightNode" * Two nodes are considered equal if they have: * 1. The same text content * 2. The same highlight type (or both have no highlight type) - * 3. The same validation error state - * 4. The same validation message * * The optional chaining (?.) is used because highlight type may be undefined, * in which case we default to empty string for comparison. @@ -21,9 +19,7 @@ import {CodeHighlightNode} from "../nodes/CodeHighlightNode" export function isEqual(a: CodeHighlightNode, b: CodeHighlightNode): boolean { return ( a.getTextContent() === b.getTextContent() && - (a.getHighlightType?.() ?? "") === (b.getHighlightType?.() ?? "") && - a.hasValidationError() === b.hasValidationError() && - (a.getValidationMessage() ?? null) === (b.getValidationMessage() ?? null) + (a.getHighlightType?.() ?? "") === (b.getHighlightType?.() ?? "") ) } diff --git a/web/oss/src/components/Editor/plugins/code/utils/indent.ts b/web/oss/src/components/Editor/plugins/code/utils/indent.ts deleted file mode 100644 index 3818ec994c..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/indent.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Common indentation helpers shared across code-editor plugins. - */ - -/** - * Returns the number of leading whitespace characters in a line. - * Note: tabs count as 1 character (Lexical represents them as TabNodes anyway). - */ -export function getIndentCount(text: string): number { - return text.match(/^\s*/)?.[0].length || 0 -} - -/** - * Calculates the proper indentation level for a line based on its content and context. - * This extracts the core indentation logic from IndentationPlugin for reuse. - * - * @param lineText - The text content of the line to calculate indentation for - * @param previousLineText - The text content of the previous line (for context) - * @param baseIndentLevel - The base indentation level to start from - * @param language - The language mode ('json' or 'yaml') - * @returns The calculated indentation level (number of tabs) - */ -export function calculateLineIndentation( - lineText: string, - previousLineText: string, - baseIndentLevel: number, - language: "json" | "yaml" | "code", -): number { - const trimmedLine = lineText.trim() - const trimmedPrevious = previousLineText.trim() - - // Start with base indentation - let indentLevel = baseIndentLevel - - // Check if previous line ends with an opening brace/bracket - const prevEndsWithOpeningBrace = - /[\[{(]\s*$/.test(trimmedPrevious) || - (language === "yaml" && (/:\s*$/.test(trimmedPrevious) || /-\s*$/.test(trimmedPrevious))) - - // If previous line opens a block, increase indentation - if (prevEndsWithOpeningBrace) { - indentLevel += 1 - } - - // Check if current line closes a block - const currentLineClosesBlock = /^[\]})]/.test(trimmedLine) - - // If current line closes a block, decrease indentation - if (currentLineClosesBlock) { - indentLevel = Math.max(0, indentLevel - 1) - } - - return indentLevel -} - -/** - * Calculates proper indentation for multiple lines based on their content and context. - * This is used for paste operations to ensure pasted lines have correct indentation. - * - * @param lines - Array of line texts to calculate indentation for - * @param baseIndentLevel - The base indentation level (from the line being pasted into) - * @param language - The language mode ('json' or 'yaml') - * @returns Array of indentation levels (number of tabs) for each line - */ -export function calculateMultiLineIndentation( - lines: string[], - baseIndentLevel: number, - language: "json" | "yaml" | "code", -): number[] { - const indentLevels: number[] = [] - - for (let i = 0; i < lines.length; i++) { - const currentLine = lines[i] - const previousLine = i > 0 ? lines[i - 1] : "" - - const indentLevel = calculateLineIndentation( - currentLine, - previousLine, - i === 0 ? baseIndentLevel : indentLevels[i - 1], - language, - ) - - indentLevels.push(indentLevel) - } - - return indentLevels -} - -/** - * Simple heuristic to decide if a line is foldable for a given language. - * For JSON: line ending with "{". - * For YAML: line ending with ':' (allow trailing spaces). - */ -export function isFoldableLine(text: string, language: string): boolean { - const trimmed = text.trim() - if (language === "json" || language === "code") { - return trimmed.endsWith("{") - } - if (language === "yaml") { - return /:\s*$/.test(trimmed) - } - // Add more languages here if needed - return false -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/indentationUtils.ts b/web/oss/src/components/Editor/plugins/code/utils/indentationUtils.ts index b042f8055e..0fee67b8cc 100644 --- a/web/oss/src/components/Editor/plugins/code/utils/indentationUtils.ts +++ b/web/oss/src/components/Editor/plugins/code/utils/indentationUtils.ts @@ -1,6 +1,56 @@ +import {$createTabNode} from "lexical" + import {$isCodeBlockNode} from "../nodes/CodeBlockNode" import {$isCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" -import {$createCodeTabNode, $isCodeTabNode} from "../nodes/CodeTabNode" + +/** + * Normalizes pasted lines to the target indentation level. + * + * - Strips minimum indentation from all pasted lines (so their relative structure is preserved) + * - Prepends the given number of tabs to each line, so the pasted block is indented at the insertion context + * + * @param pastedLines The array of pasted lines (strings) + * @param baseIndentCount The indentation level (number of tabs) to prepend to each line + * @returns The array of lines with normalized indentation + */ +export function normalizePastedLinesIndentation( + pastedLines: string[], + baseIndentCount: number, +): string[] { + // Find min indentation (in tabs or spaces) across all non-empty lines + let minIndent = Infinity + for (const line of pastedLines) { + if (!line.trim()) continue + const match = line.match(/^(\s*)/) + if (match) { + // Count tabs as 1, 2 spaces as 1 tab (for mixed content) + const tabCount = (match[1].match(/\t/g) || []).length + const spaceCount = (match[1].match(/ /g) || []).length + const total = tabCount + Math.floor(spaceCount / 2) + if (total < minIndent) minIndent = total + } + } + if (!isFinite(minIndent)) minIndent = 0 + + // Remove minIndent from each line and prepend baseIndentCount tabs + return pastedLines.map((line) => { + if (!line.trim()) return "" + // Remove minIndent tabs/spaces + let l = line + let removed = 0 + while (removed < minIndent && l.startsWith("\t")) { + l = l.slice(1) + removed++ + } + while (removed < minIndent && l.startsWith(" ")) { + // two spaces + l = l.slice(2) + removed++ + } + // Prepend baseIndentCount tabs + return "\t".repeat(baseIndentCount) + l + }) +} /** * Analyzes and corrects the indentation of all lines in a code block node. @@ -22,7 +72,8 @@ export function $fixCodeBlockIndentation(codeBlock: any) { // Count current leading tab nodes let currentTabs = 0 for (const child of children) { - if ((child.getType && child.getType() === "tab") || $isCodeTabNode(child)) { + // $isTabNode is from lexical, but not always imported. Use type or class check if needed. + if (child.getType && child.getType() === "tab") { currentTabs++ } else { break @@ -40,7 +91,7 @@ export function $fixCodeBlockIndentation(codeBlock: any) { if (currentTabs < indentLevel) { // Add missing tabs at the start for (let t = 0; t < indentLevel - currentTabs; t++) { - const tabNode = $createCodeTabNode() + const tabNode = $createTabNode() // Always add as a child of the line const updatedChildren = line.getChildren() if (updatedChildren.length > 0) { @@ -63,54 +114,5 @@ export function $fixCodeBlockIndentation(codeBlock: any) { } } -/** - * Normalizes pasted lines to the target indentation level. - * - * - Strips minimum indentation from all pasted lines (so their relative structure is preserved) - * - Prepends the given number of tabs to each line, so the pasted block is indented at the insertion context - * - * @param pastedLines The array of pasted lines (strings) - * @param baseIndentCount The indentation level (number of tabs) to prepend to each line - * @returns The array of lines with normalized indentation - */ -export function normalizePastedLinesIndentation( - pastedLines: string[], - baseIndentCount: number, -): string[] { - // Find min indentation (in tabs or spaces) across all non-empty lines - let minIndent = Infinity - for (const line of pastedLines) { - if (!line.trim()) continue - const match = line.match(/^(\s*)/) - if (match) { - // Count tabs as 1, 2 spaces as 1 tab (for mixed content) - const tabCount = (match[1].match(/\t/g) || []).length - const spaceCount = (match[1].match(/ /g) || []).length - const total = tabCount + Math.floor(spaceCount / 2) - if (total < minIndent) minIndent = total - } - } - if (!isFinite(minIndent)) minIndent = 0 - - // Remove minIndent from each line and prepend baseIndentCount tabs - return pastedLines.map((line) => { - if (!line.trim()) return "" - // Remove minIndent tabs/spaces - let l = line - let removed = 0 - while (removed < minIndent && l.startsWith("\t")) { - l = l.slice(1) - removed++ - } - while (removed < minIndent && l.startsWith(" ")) { - // two spaces - l = l.slice(2) - removed++ - } - // Prepend baseIndentCount tabs - return "\t".repeat(baseIndentCount) + l - }) -} - /** @deprecated renamed to {@link $fixCodeBlockIndentation} by @lexical/eslint-plugin rules-of-lexical */ export const fixCodeBlockIndentation = $fixCodeBlockIndentation diff --git a/web/oss/src/components/Editor/plugins/code/utils/language.ts b/web/oss/src/components/Editor/plugins/code/utils/language.ts index 927438986b..9a136c2062 100644 --- a/web/oss/src/components/Editor/plugins/code/utils/language.ts +++ b/web/oss/src/components/Editor/plugins/code/utils/language.ts @@ -1,8 +1,6 @@ import {$getRoot, LexicalEditor} from "lexical" import {$isCodeBlockNode} from "../nodes/CodeBlockNode" -import type {CodeLanguage} from "../types" -import {DEFAULT_CODE_LANGUAGE} from "../types" /** * Determines the active language mode of the code editor. @@ -14,12 +12,12 @@ import {DEFAULT_CODE_LANGUAGE} from "../types" * @param editor - The Lexical editor instance to check * @returns The current language mode, defaults to 'json' if no code block found */ -export function $getActiveLanguage(editor: LexicalEditor): CodeLanguage { +export function $getActiveLanguage(editor: LexicalEditor): "json" | "yaml" { const root = $getRoot() for (const block of root.getChildren()) { if ($isCodeBlockNode(block)) { - return block.getLanguage() + return block.getLanguage() as "json" | "yaml" } } - return DEFAULT_CODE_LANGUAGE + return "json" } diff --git a/web/oss/src/components/Editor/plugins/code/utils/moveCaretToStart.ts b/web/oss/src/components/Editor/plugins/code/utils/moveCaretToStart.ts new file mode 100644 index 0000000000..26a73ebc8f --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/utils/moveCaretToStart.ts @@ -0,0 +1,66 @@ +/** + * Utility functions for managing cursor position in the code editor. + * These functions help maintain a consistent editing experience by + * controlling where the cursor (caret) is placed after operations. + */ + +import {$createRangeSelection, $isTabNode, $setSelection} from "lexical" + +import {CodeLineNode} from "../nodes/CodeLineNode" + +/** + * Moves the text cursor (caret) to the start of the first content node in a code line, + * with special handling for indentation and empty lines. + * + * This function is used to position the cursor in a sensible location after operations + * that might disrupt cursor position (like creating a new line). It: + * + * 1. Handles indentation by positioning the cursor after any tab nodes + * 2. Prioritizes positioning at the first content node + * 3. Creates a new range selection at the appropriate position + * 4. Sets the editor's selection to that position + * + * The function specifically: + * - Sets both anchor and focus points to the same position (no text selected) + * - Uses the 'text' type to ensure proper cursor behavior in the editor + * - Ensures caret visibility even in empty lines + * + * @param lineNode - The code line node to move the cursor within + */ +export function $moveCaretToStart(lineNode: CodeLineNode) { + const children = lineNode.getChildren() + + // Get all tab nodes (indentation) at the start of the line + const tabNodes = children.filter($isTabNode) + + // Find the first non-tab node (actual content) + const firstContentNode = children.find((node) => !$isTabNode(node)) + + console.log("moveCaretToStart:", { + childrenCount: children.length, + tabNodesCount: tabNodes.length, + hasContentNode: !!firstContentNode, + childrenTypes: children.map((c) => c.getType()), + }) + + // Case 1: We have content after tabs - position cursor at start of content + if (firstContentNode) { + const sel = $createRangeSelection() + sel.anchor.set(firstContentNode.getKey(), 0, "text") + sel.focus.set(firstContentNode.getKey(), 0, "text") + $setSelection(sel) + return + } + + // Case 2: We only have tab nodes - position cursor after the last tab + if (tabNodes.length > 0) { + const lastTabNode = tabNodes[tabNodes.length - 1] + const sel = lastTabNode.selectEnd() + $setSelection(sel) + return + } + + // Case 3: Empty line - position cursor at the line itself + const sel = lineNode.selectStart() + $setSelection(sel) +} diff --git a/web/oss/src/components/Editor/plugins/code/utils/multiLineTracker.ts b/web/oss/src/components/Editor/plugins/code/utils/multiLineTracker.ts deleted file mode 100644 index 4388e76869..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/multiLineTracker.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Multi-line structure tracker for detecting unclosed brackets, quotes, and other structures - */ - -import {BracketInfo, QuoteInfo, MultiLineTracker, StructuralError} from "./validationTypes" - -export class MultiLineTrackerImpl implements MultiLineTracker { - public openBrackets: BracketInfo[] = [] - public openQuotes: QuoteInfo[] = [] - - addBracket(bracket: BracketInfo): void { - this.openBrackets.push(bracket) - } - - removeBracket(type: "]" | "}" | ")"): BracketInfo | null { - const expectedOpening = type === "]" ? "[" : type === "}" ? "{" : "(" - - // Find the most recent matching opening bracket - for (let i = this.openBrackets.length - 1; i >= 0; i--) { - if (this.openBrackets[i].type === expectedOpening) { - return this.openBrackets.splice(i, 1)[0] - } - } - - return null - } - - addQuote(quote: QuoteInfo): void { - // Check if we're closing an existing quote of the same type - const existingIndex = this.openQuotes.findIndex((q) => q.type === quote.type) - - if (existingIndex !== -1) { - // Close the existing quote - this.openQuotes.splice(existingIndex, 1) - } else { - // Open a new quote - this.openQuotes.push(quote) - } - } - - removeQuote(type: '"' | "'"): QuoteInfo | null { - const index = this.openQuotes.findIndex((q) => q.type === type) - if (index !== -1) { - return this.openQuotes.splice(index, 1)[0] - } - return null - } - - getStructuralErrors(): StructuralError[] { - const errors: StructuralError[] = [] - const now = Date.now() - - // Generate errors for unclosed brackets - for (const bracket of this.openBrackets) { - const expectedClosing = bracket.type === "[" ? "]" : bracket.type === "{" ? "}" : ")" - const structureType = - bracket.type === "[" ? "array" : bracket.type === "{" ? "object" : "parentheses" - - errors.push({ - level: "structural", - type: bracket.type === "[" ? "unclosed_array" : "unclosed_object", - severity: "error", - message: `Unclosed ${structureType}`, - token: bracket.type, - line: bracket.line, - column: bracket.column, - openingChar: bracket.type, - expectedClosing, - openingLine: bracket.line, - openingColumn: bracket.column, - timestamp: now, - }) - } - - // Generate errors for unclosed quotes - for (const quote of this.openQuotes) { - errors.push({ - level: "structural", - type: "unclosed_quote", - severity: "error", - message: `Unclosed quote`, - token: quote.type, - line: quote.line, - column: quote.column, - openingChar: quote.type, - expectedClosing: quote.type, - openingLine: quote.line, - openingColumn: quote.column, - timestamp: now, - }) - } - - return errors - } - - clear(): void { - this.openBrackets = [] - this.openQuotes = [] - } -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/navigation.ts b/web/oss/src/components/Editor/plugins/code/utils/navigation.ts deleted file mode 100644 index 7a28dd3e67..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/navigation.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Navigation helpers shared among plugins. - */ - -import {$isTextNode, TextNode} from "lexical" - -import {CodeLineNode} from "../nodes/CodeLineNode" - -/** - * Given a CodeLineNode and a character offset counted across its children, - * returns the TextNode that contains the offset and the offset inside that - * node. Falls back to last text node if offset exceeds total length. - */ -export function getNodeAtOffset( - line: CodeLineNode, - offset: number, -): {node: TextNode | null; innerOffset: number} { - let acc = 0 - let lastText: TextNode | null = null - - for (const child of line.getChildren()) { - if (!$isTextNode(child)) continue - const len = child.getTextContentSize() - lastText = child - if (acc + len >= offset) { - return {node: child, innerOffset: offset - acc} - } - acc += len - } - // If not found return last text node - return {node: lastText, innerOffset: lastText ? lastText.getTextContentSize() : 0} -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.backup.ts b/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.backup.ts new file mode 100644 index 0000000000..42ad882d91 --- /dev/null +++ b/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.backup.ts @@ -0,0 +1,7 @@ +// BACKUP of pasteUtils.ts before re-implementation (2025-04-17) +// --------------------------------------------------------------- + +/* + * This is a backup of the previous implementation of $insertLinesWithSelectionAndIndent and all code in pasteUtils.ts. + * Restore this file if you need to recover the previous logic. + */ diff --git a/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.ts b/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.ts index 0ef838e064..9012283bb4 100644 --- a/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.ts +++ b/web/oss/src/components/Editor/plugins/code/utils/pasteUtils.ts @@ -1,9 +1,7 @@ -import {$createRangeSelection, $setSelection} from "lexical" +import {$createRangeSelection, $setSelection, $createTabNode} from "lexical" import {$createCodeHighlightNode} from "../nodes/CodeHighlightNode" -import {$createCodeLineNode, CodeLineNode} from "../nodes/CodeLineNode" -import {$createCodeTabNode} from "../nodes/CodeTabNode" -import type {CodeLanguage} from "../types" +import {$createCodeLineNode} from "../nodes/CodeLineNode" import {normalizePastedLinesIndentation} from "./indentationUtils" import {tokenizeCodeLine} from "./tokenizer" @@ -18,28 +16,39 @@ export function $insertLinesWithSelectionAndIndent({ anchorOffset, currentLine, parentBlock, - skipNormalization = false, }: { lines: string[] anchorNode: any anchorOffset: number currentLine: any parentBlock: any - skipNormalization?: boolean + beforeNodes: any[] + afterNodes: any[] + beforeContent: string + afterContent: string + followingLines: any[] + + insertIndex?: number | null }) { // 1. Find selection context and extract state if (!currentLine || !parentBlock) { console.error("[pasteUtils] Missing currentLine or parentBlock, aborting paste logic") return } - const allLines = parentBlock.getChildren() as CodeLineNode[] + const allLines = parentBlock.getChildren() + console.log("[pasteUtils] parent block", { + parentBlock, + currentLine, + allLinesLength: allLines.length, + allLines, + }) const lineIdx = allLines.findIndex((n: any) => n.getKey && n.getKey() === currentLine.getKey()) if (lineIdx === -1) { console.error("[pasteUtils] Could not find currentLine in parentBlock children") return } // Split lines - const _ = allLines.slice(0, lineIdx) + const linesBefore = allLines.slice(0, lineIdx) const linesAfter = allLines.slice(lineIdx + 1) // Split currentLine nodes const children = currentLine.getChildren() @@ -59,9 +68,7 @@ export function $insertLinesWithSelectionAndIndent({ baseIndentCount = tabCount + Math.floor(spaceCount / 2) } // --- Normalize pasted lines --- - if (!skipNormalization) { - lines = normalizePastedLinesIndentation(lines, baseIndentCount) - } + lines = normalizePastedLinesIndentation(lines, baseIndentCount) // Find anchorNode in currentLine children, split at anchorOffset for (const node of children) { @@ -77,12 +84,7 @@ export function $insertLinesWithSelectionAndIndent({ const beforeText = text.slice(0, anchorOffset) const afterText = text.slice(anchorOffset) if (beforeText) - beforeInLine[beforeInLine.length - 1] = $createCodeHighlightNode( - beforeText, - "plain", - false, - null, - ) + beforeInLine[beforeInLine.length - 1] = $createCodeHighlightNode(beforeText) if (afterText) { if (node && typeof node.clone === "function") { afterInLine.push(node.clone()) @@ -92,12 +94,7 @@ export function $insertLinesWithSelectionAndIndent({ } else { console.warn("[pasteUtils] Skipping undefined/null node in afterInLine") } - afterInLine[afterInLine.length - 1] = $createCodeHighlightNode( - afterText, - "plain", - false, - null, - ) + afterInLine[afterInLine.length - 1] = $createCodeHighlightNode(afterText) } } else if (anchorOffset === 0) { // All goes to afterInLine @@ -133,6 +130,17 @@ export function $insertLinesWithSelectionAndIndent({ } } } + // Log state + console.log("[pasteUtils] Function state", { + linesBefore: linesBefore.map((l) => l.getTextContent()), + nodesBeforeSelection: beforeInLine.map((n) => n.getTextContent()), + nodesAfterSelection: afterInLine.map((n) => n.getTextContent()), + trailingLines: linesAfter.map((l) => l.getTextContent()), + pastedLines: lines, + parentBlock, + currentLine, + // selection: selection.clone(), + }) // Clone trailing lines before removal const clonedTrailingLines = linesAfter.map((l) => (l.clone && l.clone()) || l) @@ -144,10 +152,24 @@ export function $insertLinesWithSelectionAndIndent({ // First line: nodesBeforeSelection + first pasted line if (lines.length > 0) { const firstLine = $createNodeForLineWithTabs(lines[0], parentBlock.getLanguage()) + console.log("[pasteUtils] First line", firstLine.getTextContent()) // Prepend beforeInLine nodes for (let i = beforeInLine.length - 1; i >= 0; i--) { + console.log( + "[pasteUtils] Inserting beforeInLine node", + beforeInLine[i].getTextContent(), + ) firstLine.getFirstChild()?.insertBefore(beforeInLine[i]) } + console.log("[pasteUtils] INSERT FIRST LINE!", { + insertIdx, + parentBlock, + children: parentBlock.getChildren(), + text: firstLine + .getChildren() + .map((n) => n.getTextContent()) + .join(""), + }) const lineBefore = parentBlock.getChildAtIndex(insertIdx - 1) if (lineBefore) { lineBefore.insertAfter(firstLine) @@ -157,18 +179,22 @@ export function $insertLinesWithSelectionAndIndent({ insertIdx++ let latestLine = firstLine + console.log("[pasteUtils] HERE", lines) if (lines.length === 1) { afterInLine.forEach((n) => { + console.log("[pasteUtils] Last pasted line", n.getTextContent()) firstLine.append(n) }) } else { // Middle lines for (let i = 1; i < lines.length; i++) { + console.log("[pasteUtils] HERE 2") const lineNode = $createNodeForLineWithTabs(lines[i], parentBlock.getLanguage()) // Last pasted line: append afterInLine nodes if (i === lines.length - 1 && afterInLine.length > 0) { afterInLine.forEach((n) => { + console.log("[pasteUtils] Last pasted line", n.getTextContent()) lineNode.append(n) }) } @@ -204,11 +230,23 @@ export function $insertLinesWithSelectionAndIndent({ newSelection.anchor.set(lastChild.getKey(), lastChild.getTextContentSize(), "text") newSelection.focus.set(lastChild.getKey(), lastChild.getTextContentSize(), "text") $setSelection(newSelection) + console.log("[pasteUtils] Restored selection at end of last inserted line", { + lastInserted, + lastChild, + }) } } + // LOG: Final state + console.log("[pasteUtils] $insertLinesWithSelectionAndIndent: complete", { + parentBlock, + parentBlockChildren: + parentBlock && + parentBlock.getChildren && + parentBlock.getChildren().map((n: any) => n.getTextContent && n.getTextContent()), + }) } -export function $createNodeForLineWithTabs(line: string, language: CodeLanguage) { +export function $createNodeForLineWithTabs(line: string, language: "json" | "yaml") { const codeLine = $createCodeLineNode() // Extract leading spaces/tabs const indentMatch = line.match(/^[ \t]+/) @@ -221,7 +259,7 @@ export function $createNodeForLineWithTabs(line: string, language: CodeLanguage) let i = 0 while (i < indent.length) { if (indent[i] === "\t") { - codeLine.append($createCodeTabNode()) + codeLine.append($createTabNode()) i += 1 } else if (indent[i] === " ") { // Count consecutive spaces @@ -229,12 +267,12 @@ export function $createNodeForLineWithTabs(line: string, language: CodeLanguage) while (indent[i + spaceCount] === " ") spaceCount++ const tabs = Math.floor(spaceCount / tabSize) for (let t = 0; t < tabs; t++) { - codeLine.append($createCodeTabNode()) + codeLine.append($createTabNode()) } i += tabs * tabSize // If any leftover spaces, append as plain for (; i < indent.length && indent[i] === " "; i++) { - codeLine.append($createCodeTabNode()) + codeLine.append($createTabNode()) } } } @@ -242,7 +280,7 @@ export function $createNodeForLineWithTabs(line: string, language: CodeLanguage) // Tokenize the rest of the line const tokens = tokenizeCodeLine(rest, language) tokens.forEach((token) => { - codeLine.append($createCodeHighlightNode(token.content, token.type, false, null)) + codeLine.append($createCodeHighlightNode(token.content, token.type)) }) return codeLine } diff --git a/web/oss/src/components/Editor/plugins/code/utils/structuralValidators.ts b/web/oss/src/components/Editor/plugins/code/utils/structuralValidators.ts deleted file mode 100644 index a25c40ebf4..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/structuralValidators.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Check if content appears to be incomplete (user is still typing) - */ -export function isContentIncomplete( - text: string, - language: "json" | "yaml" | "code" = "json", -): boolean { - const trimmed = text.trim() - - if (language === "json" || language === "code") { - // JSON incomplete patterns - return ( - trimmed.endsWith(":") || // "key": - trimmed.endsWith(",") || // trailing comma - trimmed.endsWith("[") || // opening array - trimmed.endsWith("{") || // opening object - trimmed.endsWith('"') || // unclosed string - /[{[]$/.test(trimmed) || // ends with opening bracket - /:\s*$/.test(trimmed) // colon with whitespace - ) - } else { - // YAML incomplete patterns - return ( - trimmed.endsWith(":") || // "key:" - trimmed.endsWith("-") || // list item dash - /:\s*$/.test(trimmed) || // colon with whitespace - /^\s*-\s*$/.test(trimmed) // dash with whitespace - ) - } -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/tokenizer.ts b/web/oss/src/components/Editor/plugins/code/utils/tokenizer.ts index c5426b6de6..9ee2a21075 100644 --- a/web/oss/src/components/Editor/plugins/code/utils/tokenizer.ts +++ b/web/oss/src/components/Editor/plugins/code/utils/tokenizer.ts @@ -2,12 +2,8 @@ import Prism from "prismjs" import "prismjs/components/prism-json" import "prismjs/components/prism-yaml" -import "prismjs/components/prism-python" -import "prismjs/components/prism-javascript" import type {Token as PrismToken} from "prismjs" -import type {CodeLanguage} from "../types" - /** * Represents a syntax token with content and type. * Used for syntax highlighting in the code editor. @@ -30,19 +26,8 @@ export interface Token { * @param language - The language to use for tokenization ('json' or 'yaml') * @returns Array of tokens with content and type */ -const LANGUAGE_GRAMMAR_MAP: Record<CodeLanguage, string> = { - json: "json", - yaml: "yaml", - code: "python", -} - -export function tokenizeCodeLine(line: string, language: CodeLanguage): Token[] { - const targetGrammar = LANGUAGE_GRAMMAR_MAP[language] - const grammar = - Prism.languages[targetGrammar] ?? - Prism.languages.javascript ?? - Prism.languages.clike ?? - null +export function tokenizeCodeLine(line: string, language: "json" | "yaml"): Token[] { + const grammar = Prism.languages[language] if (!grammar) return [{content: line, type: "plain"}] const rawTokens = Prism.tokenize(line, grammar) diff --git a/web/oss/src/components/Editor/plugins/code/utils/validationTypes.ts b/web/oss/src/components/Editor/plugins/code/utils/validationTypes.ts deleted file mode 100644 index 4dcae2f0a9..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/validationTypes.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Enhanced validation types for multi-layer validation system - */ - -export type ValidationLevel = "structural" | "syntax" | "schema" -export type ValidationSeverity = "error" | "warning" - -export interface BaseValidationError { - level: ValidationLevel - severity: ValidationSeverity - message: string - token?: string - line?: number - column?: number - timestamp: number -} - -export interface StructuralError extends BaseValidationError { - level: "structural" - type: - | "unclosed_bracket" - | "unclosed_quote" - | "unclosed_array" - | "unclosed_object" - | "invalid_structure" - openingChar?: string - expectedClosing?: string - openingLine?: number - openingColumn?: number -} - -export interface SyntaxError extends BaseValidationError { - level: "syntax" - type: "unquoted_property" | "invalid_value" | "trailing_comma" | "invalid_json" | "invalid_yaml" - suggestion?: string -} - -export interface SchemaError extends BaseValidationError { - level: "schema" - type: "required_property" | "additional_property" | "type_mismatch" | "enum_violation" - schemaPath?: string - instancePath?: string - params?: Record<string, any> -} - -export type ValidationError = StructuralError | SyntaxError | SchemaError - -export interface BracketInfo { - type: "[" | "{" | "(" - line: number - column: number - lineKey: string -} - -export interface QuoteInfo { - type: '"' | "'" - line: number - column: number - lineKey: string -} - -export interface MultiLineTracker { - openBrackets: BracketInfo[] - openQuotes: QuoteInfo[] - - addBracket(bracket: BracketInfo): void - removeBracket(type: "]" | "}" | ")"): BracketInfo | null - addQuote(quote: QuoteInfo): void - removeQuote(type: '"' | "'"): QuoteInfo | null - getStructuralErrors(): StructuralError[] - clear(): void -} - -export interface EnhancedValidationContext { - // Error storage by validation level - structuralErrors: Map<string, StructuralError[]> - syntaxErrors: Map<string, SyntaxError[]> - schemaErrors: Map<string, SchemaError[]> - - // Multi-line structure tracking - multiLineTracker: MultiLineTracker - - // Combined error state for highlighting - errorTexts: Set<string> - errorList: ValidationError[] - - // Performance tracking - lastStructuralValidation: number - lastSyntaxValidation: number - lastSchemaValidation: number - - // Utility methods - getErrorsForToken(token: string): ValidationError[] - addError(error: ValidationError): void - removeErrorsForToken(token: string, level?: ValidationLevel): void - clearErrors(level?: ValidationLevel): void - updateErrorTexts(): void -} diff --git a/web/oss/src/components/Editor/plugins/code/utils/validationUtils.ts b/web/oss/src/components/Editor/plugins/code/utils/validationUtils.ts deleted file mode 100644 index 81abe0a99e..0000000000 --- a/web/oss/src/components/Editor/plugins/code/utils/validationUtils.ts +++ /dev/null @@ -1,1222 +0,0 @@ -import yaml from "js-yaml" -import JSON5 from "json5" - -import type {CodeLanguage} from "../types" - -// Enhanced validation functions for irregular and chaotic input detection - -/** - * Detect text that appears before or after the main JSON block - */ -function detectTextOutsideJSON(textContent: string, lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - const trimmed = textContent.trim() - - if (!trimmed) return errors - - // Find the start and end of the main JSON structure - const jsonStart = Math.min( - trimmed.indexOf("{") === -1 ? Infinity : trimmed.indexOf("{"), - trimmed.indexOf("[") === -1 ? Infinity : trimmed.indexOf("["), - ) - const jsonEnd = Math.max(trimmed.lastIndexOf("}"), trimmed.lastIndexOf("]")) - - if (jsonStart === Infinity || jsonEnd === -1) { - return errors // No clear JSON structure found - } - - // Check for text before JSON - const beforeJSON = trimmed.substring(0, jsonStart).trim() - if (beforeJSON) { - errors.push({ - id: "text-before-json", - line: 1, - message: "Text found before JSON structure", - type: "structural", - severity: "error", - }) - } - - // Check for text after JSON - const afterJSON = trimmed.substring(jsonEnd + 1).trim() - if (afterJSON) { - // Find the line where the text after JSON appears - const afterJSONLine = lines.findIndex((line, index) => { - const cumulativeLength = lines.slice(0, index + 1).join("\n").length - return cumulativeLength > jsonEnd - }) - - errors.push({ - id: "text-after-json", - line: afterJSONLine > 0 ? afterJSONLine + 1 : lines.length, - message: "Text found after JSON structure", - type: "structural", - severity: "error", - }) - } - - return errors -} - -/** - * Detect content that doesn't appear to be JSON at all - */ -function detectNonJSONText(textContent: string, lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - const trimmed = textContent.trim() - - if (!trimmed) return errors - - // Check if content has any JSON-like structure - const hasJSONStructure = /[{}\[\]]/.test(trimmed) || /"[^"]*"\s*:/.test(trimmed) - - if (!hasJSONStructure) { - errors.push({ - id: "non-json-content", - line: 1, - message: "Content does not appear to be JSON", - type: "structural", - severity: "error", - }) - } - - return errors -} - -/** - * Detect multiple top-level JSON objects or arrays - */ -function detectMultipleJSONObjects(textContent: string): ErrorInfo[] { - const errors: ErrorInfo[] = [] - const trimmed = textContent.trim() - - if (!trimmed) return errors - - // Try to detect multiple JSON objects by looking for patterns like }\s*{ - const multipleObjectPattern = /}\s*{/g - const multipleArrayPattern = /]\s*\[/g - const objectThenArray = /}\s*\[/g - const arrayThenObject = /]\s*{/g - - if ( - multipleObjectPattern.test(trimmed) || - multipleArrayPattern.test(trimmed) || - objectThenArray.test(trimmed) || - arrayThenObject.test(trimmed) - ) { - errors.push({ - id: "multiple-json-objects", - line: 1, - message: "Multiple top-level JSON objects/arrays are not allowed", - type: "structural", - severity: "error", - }) - } - - return errors -} - -/** - * Detect invalid tokens that shouldn't appear in JSON - */ -function detectInvalidTokens(lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - const lineNumber = i + 1 - - // Skip empty lines - if (!line.trim()) continue - - // Check for HTML tags - if (/<[^>]+>/.test(line)) { - errors.push({ - id: `html-tags-${lineNumber}`, - line: lineNumber, - message: "HTML tags are not valid in JSON", - type: "syntax", - severity: "error", - }) - } - - // Check for JavaScript keywords - const jsKeywords = - /\b(function|var|let|const|if|else|for|while|return|class|extends|import|export)\b/ - if (jsKeywords.test(line)) { - errors.push({ - id: `js-keywords-${lineNumber}`, - line: lineNumber, - message: "JavaScript keywords are not valid in JSON", - type: "syntax", - severity: "error", - }) - } - - // Check for mathematical expressions - if (/\b\d+\s*[+\-*/=]\s*\d+/.test(line)) { - errors.push({ - id: `math-expressions-${lineNumber}`, - line: lineNumber, - message: "Mathematical expressions are not valid in JSON", - type: "syntax", - severity: "error", - }) - } - - // Check for binary/hex numbers - if (/\b0[bx][0-9a-fA-F]+\b/.test(line)) { - errors.push({ - id: `binary-hex-${lineNumber}`, - line: lineNumber, - message: "Binary/hex numbers are not valid in JSON", - type: "syntax", - severity: "error", - }) - } - - // Check for unquoted emojis/unicode (outside of strings) - const emojiRegex = - /[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u - - // Split line by quotes to separate quoted and unquoted parts - const parts = line.split('"') - for (let j = 0; j < parts.length; j += 2) { - // Even indices are outside quotes - const unquotedPart = parts[j] - if (emojiRegex.test(unquotedPart)) { - errors.push({ - id: `unquoted-emoji-${lineNumber}`, - line: lineNumber, - message: "Unquoted emoji/unicode characters are not valid in JSON", - type: "syntax", - severity: "error", - }) - break - } - } - } - - return errors -} - -/** - * Detect standalone values that should be part of an object or array - */ -function detectStandaloneValues(lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - for (let i = 0; i < lines.length; i++) { - const line = lines[i].trim() - const lineNumber = i + 1 - - // Skip empty lines, comments, and lines with structural characters - if (!line || line.startsWith("//") || /[{}\[\],:]/.test(line)) { - continue - } - - // Check if this looks like a standalone value (string, number, boolean) - if (/^("[^"]*"|\d+|true|false|null)\s*$/.test(line)) { - errors.push({ - id: `standalone-value-${lineNumber}`, - line: lineNumber, - message: "Standalone values must be part of an object or array", - type: "syntax", - severity: "error", - }) - } - } - - return errors -} - -export interface ErrorInfo { - id: string - line: number - message: string - type: "syntax" | "schema" | "bracket" | "structural" - severity: "error" | "warning" -} - -/** - * Main validation function - validates both JSON/YAML syntax and schema - * @param textContent - The content to validate - * @param schema - Optional schema for validation - * @param language - The language format ('json' or 'yaml') - * @param _editedLineContent - Unused parameter for compatibility - * @param cleanedToOriginalLineMap - Unused parameter for compatibility - */ -export function validateAll( - textContent: string, - schema?: any, - language: CodeLanguage = "json", - _editedLineContent?: string, - cleanedToOriginalLineMap?: Map<number, number>, -): { - allErrors: ErrorInfo[] - errorsByLine: Map<number, ErrorInfo[]> - structuralErrors: ErrorInfo[] - bracketErrors: ErrorInfo[] - schemaErrors: ErrorInfo[] -} { - const lines = textContent.split("\n") - const errors: ErrorInfo[] = [] - - // Handle empty input - if (!textContent || textContent.trim() === "") { - return { - allErrors: [], - errorsByLine: new Map(), - structuralErrors: [], - bracketErrors: [], - schemaErrors: [], - } - } - - if (language === "code") { - return { - allErrors: [], - errorsByLine: new Map(), - structuralErrors: [], - bracketErrors: [], - schemaErrors: [], - } - } - - // 1. Try native parsing first (fast path for valid content) - try { - if (language === "json") { - JSON.parse(textContent) - } else { - yaml.load(textContent) - } - // If we reach here, it's valid content - only run schema validation if needed - const schemaErrors = schema ? validateSchema(textContent, schema, lines, language) : [] - const errorsByLine = new Map<number, ErrorInfo[]>() - for (const error of schemaErrors) { - const lineErrors = errorsByLine.get(error.line) || [] - lineErrors.push(error) - errorsByLine.set(error.line, lineErrors) - } - return { - allErrors: schemaErrors, - errorsByLine, - structuralErrors: [], - bracketErrors: [], - schemaErrors, - } - } catch (nativeError) { - // Continue with detailed validation - } - - // 2. Language-specific validation for invalid content - let structuralErrors: ErrorInfo[] = [] - let bracketErrors: ErrorInfo[] = [] - - if (language === "json") { - // JSON-specific validation - - // Try JSON5 parsing to detect non-strict JSON - try { - JSON5.parse(textContent) - errors.push({ - id: "non-strict-json", - line: 1, - message: "Invalid JSON syntax - use strict JSON format", - type: "syntax", - severity: "error", - }) - } catch (json5Error) { - // Continue with enhanced validation for irregular input - } - - // Enhanced validation for irregular and chaotic input - errors.push(...detectTextOutsideJSON(textContent, lines)) - errors.push(...detectNonJSONText(textContent, lines)) - errors.push(...detectMultipleJSONObjects(textContent)) - errors.push(...detectInvalidTokens(lines)) - - // Original line-by-line validation for traditional JSON errors - errors.push(...detectStandaloneValues(lines)) - errors.push(...detectTrailingCommas(lines)) - errors.push(...detectUnclosedStrings(lines)) - - // Check for structural errors (malformed JSON5) - structuralErrors = validateStructure(textContent, lines) - errors.push(...structuralErrors) - - // Check for bracket/brace errors - bracketErrors = validateBrackets(textContent, lines) - errors.push(...bracketErrors) - } else { - // YAML-specific validation - errors.push(...detectYAMLSyntaxErrors(textContent, lines)) - } - - // 5. Check for schema errors (only if we have a schema) - const schemaErrors = schema ? validateSchema(textContent, schema, lines, language) : [] - errors.push(...schemaErrors) - - // Group errors by line - const errorsByLine = new Map<number, ErrorInfo[]>() - for (const error of errors) { - const lineErrors = errorsByLine.get(error.line) || [] - lineErrors.push(error) - errorsByLine.set(error.line, lineErrors) - } - - return { - allErrors: errors, - errorsByLine, - structuralErrors, - bracketErrors, - schemaErrors, - } -} - -/** - * Validate JSON5 structure - check for malformed key:value pairs - */ -function validateStructure(textContent: string, lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - // Always run structural validation for strict JSON compliance - // (even if JSON5 parsing succeeds, we want to enforce stricter rules) - let contextStack: string[] = [] // Track nesting context: 'object' or 'array' - let _hasParseError = false - - // Check if JSON5 parsing fails - try { - JSON5.parse(textContent) - } catch (parseError: any) { - _hasParseError = true - } - - // Analyze line by line for specific issues with context tracking - - for (let i = 0; i < lines.length; i++) { - const line = lines[i].trim() - const lineNumber = i + 1 - const nextLine = i + 1 < lines.length ? lines[i + 1].trim() : null - - // Skip empty lines and comments - if (!line || line.startsWith("//")) continue - - // Get context BEFORE updating the stack for this line - const currentContext = contextStack[contextStack.length - 1] || "object" - - // Check for malformed key:value patterns (context-aware) - - // Update context stack based on brackets AFTER getting the context - for (const char of line) { - if (char === "{") { - contextStack.push("object") - } else if (char === "[") { - contextStack.push("array") - } else if (char === "}" || char === "]") { - contextStack.pop() - } - } - const malformedResult = isMalformedPropertyInContext(line, currentContext) - if (malformedResult) { - if (typeof malformedResult === "object" && malformedResult.isWarning) { - // Handle warning case - - errors.push({ - id: `structural-warning-${lineNumber}`, - line: lineNumber, - message: malformedResult.message, - type: "syntax", - severity: "warning", - }) - } else { - // Handle error case (boolean true) - - errors.push({ - id: `structural-error-${lineNumber}`, - line: lineNumber, - message: getStructuralErrorMessage(line), - type: "syntax", - severity: "error", - }) - } - } - - // Check for missing comma: property ending followed by another property at the same level - if ( - (isCompleteProperty(line) || isPropertyEnding(line)) && - nextLine && - isPropertyStart(nextLine) && - !line.endsWith(",") && - !line.endsWith("{") && - !line.endsWith("[") - ) { - errors.push({ - id: `comma-error-${lineNumber}`, - line: lineNumber, - message: "Missing comma after property", - type: "syntax", - severity: "error", - }) - } - - // Check for missing comma: array element followed by another array element - if ( - isArrayElement(line) && - nextLine && - isArrayElement(nextLine) && - !line.endsWith(",") && - !line.endsWith("{") && - !line.endsWith("[") - ) { - errors.push({ - id: `comma-error-${lineNumber}`, - line: lineNumber, - message: "Missing comma after array element", - type: "syntax", - severity: "error", - }) - } - } - - return errors -} - -/** - * Detect trailing commas by looking ahead to see if there's another property after a comma - */ -function detectTrailingCommas(lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - for (let i = 0; i < lines.length; i++) { - const line = lines[i].trim() - const lineNumber = i + 1 - - // Check if this line ends with a comma - if (line.endsWith(",")) { - // Look ahead to find the next non-empty, non-comment line - let nextContentLine = "" - let nextLineIndex = i + 1 - - while (nextLineIndex < lines.length) { - const nextLine = lines[nextLineIndex].trim() - if (nextLine && !nextLine.startsWith("//")) { - nextContentLine = nextLine - break - } - nextLineIndex++ - } - - // If the next content line is a closing brace/bracket, this is a trailing comma - if (nextContentLine.startsWith("}") || nextContentLine.startsWith("]")) { - errors.push({ - id: `trailing-comma-${lineNumber}`, - line: lineNumber, - message: "Invalid JSON syntax - trailing comma not allowed", - type: "syntax", - severity: "error", - }) - } - } - } - - return errors -} - -/** - * Validate a line using JSON5 parser with strategic wrapping - * This replaces the custom tokenizer with a proper parser-based approach - */ -function validateLineWithParser( - line: string, - context: string, -): {valid: boolean; error?: string; warning?: string} { - // Skip empty lines and structural characters - const trimmedLine = line.trim() - if (!trimmedLine || /^[{}\[\],]*$/.test(trimmedLine)) { - return {valid: true} - } - - // Special handling for incomplete object/array properties - if (context === "object" && /^"[^"]+"\s*:\s*[{\[]\s*$/.test(trimmedLine)) { - return {valid: true} - } - - // Special handling for incomplete array elements that start objects/arrays - if (context === "array" && /^[{\[]\s*$/.test(trimmedLine)) { - return {valid: true} - } - - // Try different JSON wrapping strategies to validate the line - const testcases = [] - - if (context === "array") { - // For array elements, test as array items first - testcases.push( - {test: `[${trimmedLine}]`, description: "wrapped as array"}, - { - test: `[${trimmedLine.replace(/,\s*$/, "")}]`, - description: "wrapped as array without comma", - }, - {test: trimmedLine, description: "as-is"}, - ) - } else { - // For object context, test as object properties - testcases.push( - // Test as-is (for complete JSON fragments) - {test: trimmedLine, description: "as-is"}, - // Test as object property - {test: `{${trimmedLine}}`, description: "wrapped as object"}, - // Test as property value - {test: `{"key": ${trimmedLine}}`, description: "as property value"}, - // Test with trailing comma removed - {test: `{${trimmedLine.replace(/,\s*$/, "")}}`, description: "without trailing comma"}, - ) - } - - let lastError = "" - - for (const testcase of testcases) { - try { - // Use native JSON.parse for strict JSON validation - JSON.parse(testcase.test) - - // If we get here, the JSON is valid - // But we need to check for JSON5-specific issues that JSON.parse allows - const validationResult = validateStrictJSON(trimmedLine, context) - if (!validationResult.valid) { - return validationResult - } - - // If there's a warning, return it - if (validationResult.warning) { - return validationResult - } - - return {valid: true} - } catch (error: any) { - lastError = error.message - continue - } - } - - // If all testcases failed, analyze the error for better messaging - const enhancedError = enhanceErrorMessage(trimmedLine, lastError, context) - - return {valid: false, error: enhancedError} -} - -/** - * Validate strict JSON compliance (catch JSON5 features that JSON.parse might miss) - */ -function validateStrictJSON( - line: string, - context: string, -): {valid: boolean; error?: string; warning?: string} { - // Check for single quotes (invalid in JSON) - if (line.includes("'")) { - const singleQuoteMatch = line.match(/'([^']*)'/) - if (singleQuoteMatch) { - return { - valid: false, - error: `Invalid single-quoted string '${singleQuoteMatch[1]}' - JSON requires double quotes`, - } - } - } - - // Check for unquoted keys - const unquotedKeyMatch = line.match(/^\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*:/) - if (unquotedKeyMatch) { - return { - valid: false, - error: `Unquoted key "${unquotedKeyMatch[1]}" - keys must be quoted strings`, - } - } - - // Check for incomplete object properties (key without value) - if (context === "object" && /^\s*"[^"]*"\s*$/.test(line)) { - return { - valid: false, - error: "Incomplete property - missing colon and value", - } - } - - // Check for trailing commas in objects/arrays - if (/,\s*[}\]]/.test(line)) { - return { - valid: false, - error: "Trailing comma not allowed in JSON", - } - } - - // Check for empty string keys (warning) - if (/""\s*:/.test(line)) { - return { - valid: true, - warning: "Empty key name - consider using a meaningful key", - } - } - - // Check for standalone values in object context (invalid) - if (context === "object") { - const trimmed = line.trim() - // Check if it's a standalone value (number, string, boolean) without key:value format - if (/^(\d+|"[^"]*"|true|false|null)\s*,?$/.test(trimmed) && !/"[^"]*"\s*:/.test(trimmed)) { - return { - valid: false, - error: 'Standalone value in object - expected "key": value format', - } - } - } - - // Check for invalid JSON values - const invalidValues = ["undefined", "NaN", "Infinity", "-Infinity"] - for (const invalidValue of invalidValues) { - if (new RegExp(`\\b${invalidValue}\\b`).test(line)) { - return { - valid: false, - error: `Invalid JSON value "${invalidValue}" - not supported in JSON`, - } - } - } - - return {valid: true} -} - -/** - * Enhance error messages to be more user-friendly and specific - */ -function enhanceErrorMessage(line: string, originalError: string, context: string): string { - // Common error patterns and their enhanced messages - if (originalError.includes("Unexpected token")) { - if (line.includes("'")) { - return "Invalid single quotes - JSON requires double quotes for strings" - } - if (/^"[^"]*"\s*:/.test(line)) { - return "Unquoted key detected - keys must be quoted strings in JSON" - } - if (line.includes("undefined")) { - return 'Invalid value "undefined" - use null or a quoted string instead' - } - } - - if (originalError.includes("Unexpected end")) { - return "Incomplete JSON syntax - missing closing quote, bracket, or brace" - } - - if (originalError.includes("Expected")) { - if (context === "object") { - return 'Invalid object property syntax - expected "key": value format' - } else { - return "Invalid array element syntax" - } - } - - // Return a cleaned up version of the original error - return originalError - .replace(/^SyntaxError: /, "") - .replace(/in JSON at position \d+/, "") - .replace(/^\s+/, "") // Remove leading whitespace - .trim() -} - -/** - * Check if a line contains a malformed property (using parser-based validation) - */ -function isMalformedPropertyInContext( - line: string, - context: string, -): boolean | {isWarning: true; message: string} { - // Use the new parser-based validation - const result = validateLineWithParser(line, context) - - if (!result.valid) { - return true - } - - if (result.warning) { - return {isWarning: true, message: result.warning} - } - - return false -} - -/** - * Check if a line contains a malformed property (legacy - kept for compatibility) - */ -function _isMalformedProperty(line: string): boolean { - // Skip structural characters - if (line.match(/^[{}\[\],]*$/)) return false - - // Pattern 1: Missing comma (property followed by another property) - if (line.match(/^"[^"]*":\s*"[^"]*"$/) || line.match(/^"[^"]*":\s*\d+$/)) { - // This looks like a complete property, check if it needs a comma - // (This will be handled by comma detection logic) - return false - } - - // Pattern 2: Incomplete property - just a key without value - if (line.match(/^"[^"]*"$/)) { - return true - } - - // Pattern 3: Bare identifier (unquoted key) - if (line.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) { - return true - } - - // Pattern 4: Key with colon but no value (like "a":) - if (line.match(/^"[^"]*":\s*$/)) { - return true - } - - // Pattern 5: Key with empty value - if (line.match(/^"[^"]*":\s*""$/)) { - return true - } - - // Pattern 6: Key without colon or value - if (line.match(/^"[^"]*"\s*$/)) { - return true - } - - // Pattern 7: Standalone value at object level (not a property) - // This catches cases like "4", "4,", "hello", "hello," that appear outside arrays - if (line.match(/^\s*(\d+|"[^"]*"|true|false|null)\s*,?\s*$/)) { - return true - } - - return false -} - -/** - * Get appropriate error message for structural issues - */ -function getStructuralErrorMessage(line: string): string { - if (line.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) { - return "Invalid JSON syntax - keys must be quoted" - } - if (line.match(/^[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*.+$/)) { - return "Invalid JSON syntax - keys must be quoted" - } - if (line.match(/^[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*$/)) { - return "Invalid JSON syntax - keys must be quoted" - } - if (line.match(/^\d+\s*:.*$/)) { - return "Invalid JSON syntax - keys must be quoted" - } - if (line.match(/^"[^"]*":\s*$/)) { - return "Incomplete property - missing value after colon" - } - if (line.match(/^"[^"]*":\s*""$/)) { - return "Property has empty value - provide a valid value" - } - if (line.match(/^"[^"]*"$/)) { - return "Incomplete property - missing value" - } - if (line.match(/^\s*(\d+|"[^"]*"|true|false|null)\s*,?\s*$/)) { - return "Unexpected value - values must be part of a property or array" - } - if (line.match(/^\s*,\s*$/) || line.match(/^\s*[}\]]\s*,\s*$/)) { - return "Invalid JSON syntax - trailing comma not allowed" - } - return "Invalid JSON syntax - check property format" -} - -/** - * Check if a line contains a complete property (key: value) - */ -function isCompleteProperty(line: string): boolean { - // Match patterns like "key": "value", "key": 123, "key": true, etc. - return /^"[^"]*":\s*(.+)$/.test(line) -} - -/** - * Check if a line starts a new property (begins with a quoted key) - */ -function isPropertyStart(line: string): boolean { - return /^"[^"]*"/.test(line) -} - -/** - * Check if a line ends a property (closing bracket/brace from multi-line structure) - */ -function isPropertyEnding(line: string): boolean { - // Match lines that are just closing brackets/braces (possibly with whitespace) - return /^\s*[}\]]\s*$/.test(line) -} - -/** - * Check if a line contains an array element (number, string, boolean, etc.) - */ -function isArrayElement(line: string): boolean { - // Match lines that contain array elements: numbers, strings, booleans, null - // But exclude lines that start object properties or are just brackets - const trimmed = line.trim() - if (!trimmed || trimmed.startsWith("//")) return false - if (/^[{}\[\]]$/.test(trimmed)) return false // Just brackets - if (/^"[^"]*"\s*:/.test(trimmed)) return false // Object property - - // Match common array element patterns - return /^\s*(\d+|"[^"]*"|true|false|null|\{|\[)/.test(line) -} - -/** - * Validate bracket/brace matching - highlight entire unclosed block spans - */ -function validateBrackets(textContent: string, lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - const stack: {char: string; line: number}[] = [] - const openBrackets = ["{", "["] as const - const closeBrackets = ["}", "]"] as const - const pairs: Record<string, string> = {"{": "}", "[": "]"} - - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - const lineNumber = i + 1 - - for (const char of line) { - if (openBrackets.includes(char as "{" | "[")) { - stack.push({char, line: lineNumber}) - } else if (closeBrackets.includes(char as "}" | "]")) { - if (stack.length === 0) { - errors.push({ - id: `bracket-error-${lineNumber}`, - line: lineNumber, - message: `Unexpected closing ${char}`, - type: "bracket", - severity: "error", - }) - } else { - const last = stack.pop()! - const expectedChar = pairs[last.char] - if (expectedChar && expectedChar !== char) { - // Check if this closing bracket has a matching opening bracket in the stack - const hasMatchingOpen = stack.some((item) => pairs[item.char] === char) - - if (hasMatchingOpen) { - // This is a mismatch - push the bracket back for unclosed detection - stack.push(last) - } else { - // This is an unexpected closing bracket - don't add individual errors - // as they'll be covered by unclosed block highlighting - // errors.push({ - // id: `bracket-error-${lineNumber}`, - // line: lineNumber, - // message: `Unexpected closing ${char}`, - // type: "bracket", - // severity: "error", - // }) - stack.push(last) - } - } - } - } - } - } - - // Handle unclosed brackets - only highlight the innermost unclosed block - if (stack.length > 0) { - // Only report the last (innermost) unclosed bracket - const unclosed = stack[stack.length - 1] - - const startLine = unclosed.line - const endLine = findBlockEnd(lines, startLine - 1, unclosed.char) - - // Highlight only the lines that belong to the innermost unclosed block - for (let lineNum = startLine; lineNum <= endLine; lineNum++) { - errors.push({ - id: `unclosed-block-${lineNum}`, - line: lineNum, - message: `Unclosed ${unclosed.char} block started on line ${startLine}`, - type: "bracket", - severity: "error", - }) - } - } - - return errors -} - -/** - * Detect YAML-specific syntax errors - */ -function detectYAMLSyntaxErrors(textContent: string, lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - try { - // Try to parse with js-yaml to get detailed error information - yaml.load(textContent) - } catch (yamlError: any) { - // Extract line number from YAML error if available - let lineNumber = 1 - if (yamlError.mark && yamlError.mark.line !== undefined) { - lineNumber = yamlError.mark.line + 1 // js-yaml uses 0-based line numbers - } - - // Create a more user-friendly error message - let message = "Invalid YAML syntax" - if (yamlError.message) { - // Clean up the error message to be more user-friendly - message = yamlError.message - .replace(/at line \d+, column \d+:/, "") // Remove position info since we show it separately - .replace(/^\s+/, "") // Remove leading whitespace - .trim() - - // Make the message more user-friendly - if (message.includes("duplicated mapping key")) { - message = "Duplicate key found - YAML keys must be unique" - } else if (message.includes("bad indentation")) { - message = "Incorrect indentation - YAML requires consistent spacing" - } else if (message.includes("expected")) { - message = "Invalid YAML structure - check syntax and indentation" - } - } - - errors.push({ - id: `yaml-syntax-error-${lineNumber}`, - line: lineNumber, - message, - type: "syntax", - severity: "error", - }) - } - - return errors -} - -/** - * Detect unclosed strings in JSON content - */ -function detectUnclosedStrings(lines: string[]): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - const lineNumber = i + 1 - - // Check for unclosed string (improved detection) - if (line.includes('"')) { - // Count unescaped quotes - let quoteCount = 0 - let j = 0 - - while (j < line.length) { - if (line[j] === '"' && (j === 0 || line[j - 1] !== "\\")) { - quoteCount++ - } - j++ - } - - // If we have an odd number of quotes, string is unclosed - if (quoteCount % 2 === 1) { - errors.push({ - id: `unclosed-string-${lineNumber}`, - line: lineNumber, - message: "Unclosed string - missing closing quote", - type: "syntax", - severity: "error", - }) - } - } - } - - return errors -} - -/** - * Validate against JSON/YAML schema - */ -function validateSchema( - textContent: string, - schema: any, - lines: string[], - language: CodeLanguage = "json", -): ErrorInfo[] { - const errors: ErrorInfo[] = [] - - if (language === "code") { - return errors - } - - try { - // For schema validation, we'll use a simple approach: - // Always check for missing required properties regardless of JSON validity - - // Check for missing required properties - must be at root level - if (schema.required) { - try { - let parsedContent: any - if (language === "json") { - parsedContent = JSON5.parse(textContent) - } else { - parsedContent = yaml.load(textContent) - } - for (const requiredProp of schema.required) { - // Check if the required property exists at the root level - if (!(requiredProp in parsedContent)) { - errors.push({ - id: `schema-missing-${requiredProp}`, - line: 1, // Always highlight the opening brace - message: `Missing required property: "${requiredProp}"`, - type: "schema", - severity: "error", - }) - } else { - } - } - } catch (parseError) { - // When content is malformed, fall back to text-based validation - // This checks if the property exists anywhere in the text (less precise but more forgiving) - for (const requiredProp of schema.required) { - let propRegex: RegExp - if (language === "json") { - propRegex = new RegExp(`"${requiredProp}"\\s*:`, "i") - } else { - // YAML can use both quoted and unquoted keys - propRegex = new RegExp(`(^|\\s)${requiredProp}\\s*:`, "im") - } - - if (!propRegex.test(textContent)) { - errors.push({ - id: `schema-missing-${requiredProp}`, - line: 1, - message: `Missing required property: "${requiredProp}"`, - type: "schema", - severity: "error", - }) - } else { - } - } - } - } - - // Check for wrong value types by trying to parse the content - try { - let parsedContent: any - if (language === "json") { - parsedContent = JSON5.parse(textContent) - } else { - parsedContent = yaml.load(textContent) - } - - if (schema.properties) { - for (const [propName, propSchema] of Object.entries(schema.properties)) { - if (propName in parsedContent) { - const actualValue = parsedContent[propName] - const actualType = Array.isArray(actualValue) ? "array" : typeof actualValue - - // Handle different schema formats - let expectedTypes: string[] = [] - let isValidType = false - - if ((propSchema as any).type) { - // Direct type specification - expectedTypes = [(propSchema as any).type] - isValidType = expectedTypes.includes(actualType) - } else if ((propSchema as any).anyOf) { - // anyOf specification - check if actualType matches any of the allowed types - expectedTypes = (propSchema as any).anyOf - .filter((item: any) => item.type) - .map((item: any) => item.type) - isValidType = expectedTypes.includes(actualType) - } - - if (expectedTypes.length > 0 && !isValidType) { - const propertyLine = findPropertyLine(lines, propName, language) - const expectedTypesStr = - expectedTypes.length === 1 - ? expectedTypes[0] - : expectedTypes.join(" or ") - errors.push({ - id: `schema-type-${propName}`, - line: propertyLine > 0 ? propertyLine : 1, - message: `Property "${propName}" has wrong type: expected ${expectedTypesStr}, got ${actualType}`, - type: "schema", - severity: "error", - }) - } - } - } - } - } catch (parseError) { - // Skip type validation if content is malformed - } - - return errors - } catch (error) { - console.error("Schema validation error:", error) - return [] - } -} - -/** - * Find the line number where a property is defined - */ -function findPropertyLine( - lines: string[], - propertyName: string, - language: CodeLanguage = "json", -): number { - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - if (language === "json") { - // JSON uses quoted property names - if (line.includes(`"${propertyName}"`)) { - return i + 1 - } - } else if (language === "yaml") { - // YAML can use both quoted and unquoted property names - if (line.includes(`"${propertyName}"`) || line.includes(`${propertyName}:`)) { - return i + 1 - } - } - } - return 0 -} - -/** - * Find the end line of an unclosed block by looking for the next property at the same level - */ -function findBlockEnd(lines: string[], startIndex: number, openChar: string): number { - let depth = 1 - const closeChar = openChar === "{" ? "}" : "]" - - for (let i = startIndex + 1; i < lines.length; i++) { - const line = lines[i] - - // Count nested brackets to track depth - for (const char of line) { - if (char === openChar) { - depth++ - } else if (char === closeChar) { - depth-- - if (depth === 0) { - // Found the matching closing bracket - return i + 1 - } - } - } - - // If we encounter a property at the same level as the unclosed block, - // that's where the block should have ended - if (depth === 1 && /^\s*"[^"]*"\s*:/.test(line)) { - return i // End just before the next property - } - - // If we encounter a closing brace at depth 1 (same level as unclosed block), - // the unclosed block should end at the last non-empty line before this - if (depth === 1 && line.trim() === "}") { - // Find the last non-empty line before this closing brace - for (let j = i - 1; j >= startIndex; j--) { - if (lines[j].trim() !== "") { - return j + 1 - } - } - return i - } - } - - // If no clear end found, highlight to the end of content - return lines.length -} diff --git a/web/oss/src/components/Editor/plugins/index.tsx b/web/oss/src/components/Editor/plugins/index.tsx index 1bd7fd013c..bf25a35a73 100644 --- a/web/oss/src/components/Editor/plugins/index.tsx +++ b/web/oss/src/components/Editor/plugins/index.tsx @@ -8,18 +8,9 @@ import {OnChangePlugin} from "@lexical/react/LexicalOnChangePlugin" import {RichTextPlugin} from "@lexical/react/LexicalRichTextPlugin" import {Skeleton} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" -import {markdownViewAtom} from "../state/assets/atoms" import type {EditorPluginsProps} from "../types" -import MarkdownPlugin from "./markdown/markdownPlugin" - -const CodeFoldingPlugin = lazy(() => - import("./code/plugins/CodeFoldingPlugin").then((module) => ({ - default: module.CodeFoldingPlugin, - })), -) const TabIndentationPlugin = lazy(() => import("@lexical/react/LexicalTabIndentationPlugin").then((module) => ({ default: module.TabIndentationPlugin, @@ -41,25 +32,13 @@ const SingleLinePlugin = lazy(() => })), ) const CodeEditorPlugin = lazy(() => import("./code")) - const TokenPlugin = lazy(() => import("./token/TokenPlugin").then((module) => ({ default: module.TokenPlugin, })), ) -const AutoCloseTokenBracesPlugin = lazy(() => - import("./token/AutoCloseTokenBracesPlugin").then((module) => ({ - default: module.AutoCloseTokenBracesPlugin, - })), -) -const TokenTypeaheadPlugin = lazy(() => - import("./token/TokenTypeaheadPlugin").then((module) => ({ - default: module.TokenMenuPlugin, - })), -) const EditorPlugins = ({ - id, showToolbar, singleLine, codeOnly, @@ -71,12 +50,7 @@ const EditorPlugins = ({ handleUpdate, initialValue, validationSchema, - tokens, - templateFormat, - additionalCodePlugins = [], }: EditorPluginsProps) => { - const markdown = useAtomValue(markdownViewAtom(id)) - return ( <Suspense fallback={ @@ -90,18 +64,13 @@ const EditorPlugins = ({ <RichTextPlugin contentEditable={ <ContentEditable - className={clsx( - `editor-input relative outline-none min-h-[inherit] ${ - singleLine ? "single-line whitespace-nowrap overflow-x-auto" : "" - } ${codeOnly ? "code-only" : ""}`, - { - "markdown-view": markdown, - }, - )} + className={`editor-input relative outline-none min-h-[inherit] ${ + singleLine ? "single-line whitespace-nowrap overflow-x-auto" : "" + } ${codeOnly ? "code-only" : ""}`} /> } placeholder={ - <div className="editor-placeholder absolute pointer-events-none text-[#BDC7D1]"> + <div className="editor-placeholder absolute top-[4px] left-[1px] pointer-events-none text-[#BDC7D1]"> {placeholder} </div> } @@ -111,30 +80,20 @@ const EditorPlugins = ({ {autoFocus ? <AutoFocusPlugin /> : null} <OnChangePlugin onChange={handleUpdate} ignoreSelectionChange={true} /> {showToolbar && !singleLine && !codeOnly && <ToolbarPlugin />} - {enableTokens && ( - <> - <TokenPlugin templateFormat={templateFormat} /> - <AutoCloseTokenBracesPlugin /> - <TokenTypeaheadPlugin tokens={tokens || []} /> - </> - )} + {enableTokens && <TokenPlugin />} {singleLine && <SingleLinePlugin />} {codeOnly && ( <> - <CodeFoldingPlugin /> <CodeEditorPlugin - editorId={id} validationSchema={validationSchema} initialValue={initialValue} language={language} debug={debug} - additionalCodePlugins={additionalCodePlugins} /> <TabIndentationPlugin /> </> )} {debug && <DebugPlugin />} - {singleLine || codeOnly ? null : <MarkdownPlugin id={id} />} </Suspense> ) } diff --git a/web/oss/src/components/Editor/plugins/markdown/assets/transformers.ts b/web/oss/src/components/Editor/plugins/markdown/assets/transformers.ts deleted file mode 100644 index a9c4a7f2a4..0000000000 --- a/web/oss/src/components/Editor/plugins/markdown/assets/transformers.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { - CHECK_LIST, - ELEMENT_TRANSFORMERS, - MULTILINE_ELEMENT_TRANSFORMERS, - TEXT_FORMAT_TRANSFORMERS, - TEXT_MATCH_TRANSFORMERS, - Transformer, - ElementTransformer, - $convertFromMarkdownString, -} from "@lexical/markdown" -import {$convertToMarkdownString as originalConvert} from "@lexical/markdown" -import { - $createHorizontalRuleNode, - $isHorizontalRuleNode, - HorizontalRuleNode, -} from "@lexical/react/LexicalHorizontalRuleNode" -import { - $createTableCellNode, - $createTableNode, - $createTableRowNode, - $isTableCellNode, - $isTableNode, - $isTableRowNode, - TableCellHeaderStates, - TableCellNode, - TableNode, - TableRowNode, -} from "@lexical/table" -import {$isParagraphNode, $isTextNode, LexicalNode} from "lexical" - -export function $convertToMarkdownStringCustom( - transformers: Transformer[], - editor?: unknown, - selection?: unknown, -): string { - const markdown = originalConvert(transformers, editor, selection) - - return markdown.replace(/{{(.*?)}}/g, (_, content) => { - const unescapedContent = content.replace(/\\([\\`*{}\[\]()#+\-.!_>])/g, "$1") - return `{{${unescapedContent}}}` - }) -} - -export const HR: ElementTransformer = { - dependencies: [HorizontalRuleNode], - export: (node: LexicalNode) => { - return $isHorizontalRuleNode(node) ? "***" : null - }, - regExp: /^(---|\*\*\*|___)\s?$/, - replace: (parentNode, _1, _2, isImport) => { - const line = $createHorizontalRuleNode() - - // TODO: Get rid of isImport flag - if (isImport || parentNode.getNextSibling() != null) { - parentNode.replace(line) - } else { - parentNode.insertBefore(line) - } - - line.selectNext() - }, - type: "element", -} - -// Very primitive table setup -const TABLE_ROW_REG_EXP = /^(?:\|)(.+)(?:\|)\s?$/ -const TABLE_ROW_DIVIDER_REG_EXP = /^(\| ?:?-*:? ?)+\|\s?$/ - -export const TABLE: ElementTransformer = { - dependencies: [TableNode, TableRowNode, TableCellNode], - export: (node: LexicalNode) => { - if (!$isTableNode(node)) { - return null - } - - const output: string[] = [] - - for (const row of node.getChildren()) { - const rowOutput = [] - if (!$isTableRowNode(row)) { - continue - } - - let isHeaderRow = false - for (const cell of row.getChildren()) { - // It's TableCellNode so it's just to make flow happy - if ($isTableCellNode(cell)) { - rowOutput.push( - $convertToMarkdownStringCustom(PLAYGROUND_TRANSFORMERS, cell) - .replace(/\n/g, "\\n") - .trim(), - ) - if (cell.__headerState === TableCellHeaderStates.ROW) { - isHeaderRow = true - } - } - } - - output.push(`| ${rowOutput.join(" | ")} |`) - if (isHeaderRow) { - output.push(`| ${rowOutput.map((_) => "---").join(" | ")} |`) - } - } - - return output.join("\n") - }, - regExp: TABLE_ROW_REG_EXP, - replace: (parentNode, _1, match) => { - // Header row - if (TABLE_ROW_DIVIDER_REG_EXP.test(match[0])) { - const table = parentNode.getPreviousSibling() - if (!table || !$isTableNode(table)) { - return - } - - const rows = table.getChildren() - const lastRow = rows[rows.length - 1] - if (!lastRow || !$isTableRowNode(lastRow)) { - return - } - - // Add header state to row cells - lastRow.getChildren().forEach((cell) => { - if (!$isTableCellNode(cell)) { - return - } - cell.setHeaderStyles(TableCellHeaderStates.ROW, TableCellHeaderStates.ROW) - }) - - // Remove line - parentNode.remove() - return - } - - const matchCells = mapToTableCells(match[0]) - - if (matchCells == null) { - return - } - - const rows = [matchCells] - let sibling = parentNode.getPreviousSibling() - let maxCells = matchCells.length - - while (sibling) { - if (!$isParagraphNode(sibling)) { - break - } - - if (sibling.getChildrenSize() !== 1) { - break - } - - const firstChild = sibling.getFirstChild() - - if (!$isTextNode(firstChild)) { - break - } - - const cells = mapToTableCells(firstChild.getTextContent()) - - if (cells == null) { - break - } - - maxCells = Math.max(maxCells, cells.length) - rows.unshift(cells) - const previousSibling = sibling.getPreviousSibling() - sibling.remove() - sibling = previousSibling - } - - const table = $createTableNode() - - for (const cells of rows) { - const tableRow = $createTableRowNode() - table.append(tableRow) - - for (let i = 0; i < maxCells; i++) { - tableRow.append(i < cells.length ? cells[i] : $createTableCell("")) - } - } - - const previousSibling = parentNode.getPreviousSibling() - if ($isTableNode(previousSibling) && getTableColumnsSize(previousSibling) === maxCells) { - previousSibling.append(...table.getChildren()) - parentNode.remove() - } else { - parentNode.replace(table) - } - - table.selectEnd() - }, - type: "element", -} - -function getTableColumnsSize(table: TableNode) { - const row = table.getFirstChild() - return $isTableRowNode(row) ? row.getChildrenSize() : 0 -} - -const $createTableCell = (textContent: string): TableCellNode => { - textContent = textContent.replace(/\\n/g, "\n") - const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS) - $convertFromMarkdownString(textContent, PLAYGROUND_TRANSFORMERS, cell) - return cell -} - -const mapToTableCells = (textContent: string): TableCellNode[] | null => { - const match = textContent.match(TABLE_ROW_REG_EXP) - if (!match || !match[1]) { - return null - } - return match[1].split("|").map((text) => $createTableCell(text)) -} - -export const PLAYGROUND_TRANSFORMERS: Transformer[] = [ - HR, - TABLE, - CHECK_LIST, - ...ELEMENT_TRANSFORMERS, - ...MULTILINE_ELEMENT_TRANSFORMERS, - ...TEXT_FORMAT_TRANSFORMERS, - ...TEXT_MATCH_TRANSFORMERS, -] diff --git a/web/oss/src/components/Editor/plugins/markdown/commands/index.tsx b/web/oss/src/components/Editor/plugins/markdown/commands/index.tsx deleted file mode 100644 index 1a3944cc9f..0000000000 --- a/web/oss/src/components/Editor/plugins/markdown/commands/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -import {createCommand, LexicalCommand} from "lexical" - -export const TOGGLE_MARKDOWN_VIEW: LexicalCommand<void> = createCommand("TOGGLE_MARKDOWN_VIEW") -export const ON_CHANGE_COMMAND: LexicalCommand<void> = createCommand("ON_CHANGE_COMMAND") diff --git a/web/oss/src/components/Editor/plugins/markdown/markdownPlugin.tsx b/web/oss/src/components/Editor/plugins/markdown/markdownPlugin.tsx deleted file mode 100644 index be97f0d3f8..0000000000 --- a/web/oss/src/components/Editor/plugins/markdown/markdownPlugin.tsx +++ /dev/null @@ -1,187 +0,0 @@ -import {useEffect, useCallback} from "react" -import * as React from "react" -import type {JSX} from "react" - -import {$createCodeNode, $isCodeNode} from "@lexical/code" -import {$convertFromMarkdownString} from "@lexical/markdown" -import {AutoLinkPlugin, createLinkMatcherWithRegExp} from "@lexical/react/LexicalAutoLinkPlugin" -import {CheckListPlugin} from "@lexical/react/LexicalCheckListPlugin" -import {ClickableLinkPlugin} from "@lexical/react/LexicalClickableLinkPlugin" -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {HorizontalRulePlugin} from "@lexical/react/LexicalHorizontalRulePlugin" -import {LinkPlugin} from "@lexical/react/LexicalLinkPlugin" -import {ListPlugin} from "@lexical/react/LexicalListPlugin" -import {MarkdownShortcutPlugin} from "@lexical/react/LexicalMarkdownShortcutPlugin" -import {TabIndentationPlugin} from "@lexical/react/LexicalTabIndentationPlugin" -import {TablePlugin} from "@lexical/react/LexicalTablePlugin" -import {useAtom} from "jotai" -import { - $getRoot, - $createTextNode, - KEY_ENTER_COMMAND, - $getSelection, - $isRangeSelection, - COMMAND_PRIORITY_HIGH, -} from "lexical" - -import {markdownViewAtom} from "@/oss/components/Editor/state/assets/atoms" - -import {$convertToMarkdownStringCustom, PLAYGROUND_TRANSFORMERS} from "./assets/transformers" -import {TOGGLE_MARKDOWN_VIEW} from "./commands" - -const URL_REGEX = - /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)(?<![-.+():%])/ - -const EMAIL_REGEX = - /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/ - -const MATCHERS = [ - createLinkMatcherWithRegExp(URL_REGEX, (text) => { - return text.startsWith("http") ? text : `https://${text}` - }), - createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => { - return `mailto:${text}` - }), -] - -function LexicalAutoLinkPlugin(): JSX.Element { - return <AutoLinkPlugin matchers={MATCHERS} /> -} - -interface Props { - hasLinkAttributes?: boolean -} - -const urlRegExp = new RegExp( - /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/, -) -export function validateUrl(url: string): boolean { - // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://. - // Maybe show a dialog where they user can type the URL before inserting it. - return url === "https://" || urlRegExp.test(url) -} - -function LexicalLinkPlugin({hasLinkAttributes = false}: Props): JSX.Element { - return ( - <LinkPlugin - validateUrl={validateUrl} - attributes={ - hasLinkAttributes - ? { - rel: "noopener noreferrer", - target: "_blank", - } - : undefined - } - /> - ) -} - -const MarkdownPlugin = ({id}: {id: string}) => { - const [, setMarkdownView] = useAtom(markdownViewAtom(id)) - const [editor] = useLexicalComposerContext() - - const handleMarkdownToggle = useCallback(() => { - editor.update(() => { - const root = $getRoot() - const firstChild = root.getFirstChild() - if ($isCodeNode(firstChild) && firstChild.getLanguage() === "markdown") { - $convertFromMarkdownString( - firstChild.getTextContent(), - PLAYGROUND_TRANSFORMERS, - undefined, - true, - ) - setMarkdownView(false) - } else { - const markdown = $convertToMarkdownStringCustom( - PLAYGROUND_TRANSFORMERS, - undefined, - true, - ) - const codeNode = $createCodeNode("markdown") - codeNode.append($createTextNode(markdown)) - root.clear().append(codeNode) - codeNode.selectStart() - setMarkdownView(true) - } - }) - }, [editor, setMarkdownView]) - - useEffect(() => { - return editor.registerCommand( - TOGGLE_MARKDOWN_VIEW, - () => { - handleMarkdownToggle() - return true - }, - COMMAND_PRIORITY_HIGH, - ) - }, [editor, handleMarkdownToggle]) - - useEffect(() => { - return editor.registerCommand( - KEY_ENTER_COMMAND, - (event) => { - editor.update(() => { - const selection = $getSelection() - if (!$isRangeSelection(selection)) return false - - const anchorNode = selection.anchor.getNode() - const topNode = anchorNode.getTopLevelElementOrThrow() - - if ($isCodeNode(topNode) && topNode.getLanguage() === "markdown") { - event?.preventDefault() - selection.insertRawText("\n") - return true - } - }) - return true - }, - COMMAND_PRIORITY_HIGH, - ) - }, [editor]) - - useEffect(() => { - return editor.registerUpdateListener(({editorState}) => { - editorState.read(() => { - const root = $getRoot() - const children = root.getChildren() - const markdownCodeNode = children.find( - (node) => $isCodeNode(node) && node.getLanguage() === "markdown", - ) - - if (!markdownCodeNode) return - - const index = children.indexOf(markdownCodeNode) - const trailingNodes = children.slice(index + 1) - - if (trailingNodes.length > 0) { - editor.update(() => { - for (const node of trailingNodes) { - const content = node.getTextContent() - markdownCodeNode.append($createTextNode("\n" + content)) - node.remove() - } - }) - } - }) - }) - }, [editor]) - - return ( - <> - <MarkdownShortcutPlugin transformers={PLAYGROUND_TRANSFORMERS} /> - <ListPlugin /> - <CheckListPlugin /> - <TabIndentationPlugin /> - <LexicalAutoLinkPlugin /> - <ClickableLinkPlugin /> - <HorizontalRulePlugin /> - <TablePlugin /> - <LexicalLinkPlugin /> - </> - ) -} - -export default MarkdownPlugin diff --git a/web/oss/src/components/Editor/plugins/token/AutoCloseTokenBracesPlugin.tsx b/web/oss/src/components/Editor/plugins/token/AutoCloseTokenBracesPlugin.tsx deleted file mode 100644 index 85c4262b49..0000000000 --- a/web/oss/src/components/Editor/plugins/token/AutoCloseTokenBracesPlugin.tsx +++ /dev/null @@ -1,203 +0,0 @@ -import {useEffect} from "react" - -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import { - $getSelection, - $isRangeSelection, - KEY_DOWN_COMMAND, - KEY_BACKSPACE_COMMAND, - COMMAND_PRIORITY_NORMAL, - TextNode, - ElementNode, - $createTextNode, - $isElementNode, -} from "lexical" - -import {navigateCursor} from "./assets/selectionUtils" -import {$isTokenInputNode} from "./TokenInputNode" -import {$isTokenNode} from "./TokenNode" - -/** - * Plugin that auto inserts and removes curly brace pairs. - * - * - Typing `{` inserts `{}` and positions the cursor inside. - * - Typing `{` again inside an existing pair results in `{{}}`. - * - Pressing backspace when the cursor sits between `{` and `}` - * removes the pair in a single action. - */ -export function AutoCloseTokenBracesPlugin(): null { - const [editor] = useLexicalComposerContext() - - // Handle auto creating token pairs - useEffect(() => { - return editor.registerCommand( - KEY_DOWN_COMMAND, - (event: KeyboardEvent) => { - if (event.key !== "{") return false - - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed()) return false - - const anchor = selection.anchor - const node = anchor.getNode() - - // Handle case when editor is empty or at start of text node - if (!(node instanceof TextNode)) { - if ($isElementNode(node)) { - event.preventDefault() - - const newTextNode = $createTextNode("{}") - node.append(newTextNode) - - navigateCursor({nodeKey: newTextNode.getKey(), offset: 1}) - return true - } - return false - } - - const offset = anchor.offset - const text = node.getTextContent() - - event.preventDefault() - const newText = text.slice(0, offset) + "{}" + text.slice(offset) - node.setTextContent(newText) - - navigateCursor({nodeKey: node.getKey(), offset: offset + 1}) - return true - }, - COMMAND_PRIORITY_NORMAL, - ) - }, [editor]) - - // Handle auto removing token pairs when click backspace - useEffect(() => { - return editor.registerCommand( - KEY_BACKSPACE_COMMAND, - (event: KeyboardEvent) => { - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed()) return false - - const anchor = selection.anchor - const node = anchor.getNode() - if (!(node instanceof TextNode)) return false - - const offset = anchor.offset - const text = node.getTextContent() - if (offset === 0) return false - - const charBefore = text[offset - 1] - const charAfter = text[offset] - if (charBefore === "{" && charAfter === "}") { - event.preventDefault() - const newText = text.slice(0, offset - 1) + text.slice(offset + 1) - node.setTextContent(newText) - - navigateCursor({nodeKey: node.getKey(), offset: offset - 1}) - return true - } - - return false - }, - COMMAND_PRIORITY_NORMAL, - ) - }, [editor]) - - // Handle auto moving cursor to the end of token when arrow right/left is pressed - useEffect(() => { - return editor.registerCommand( - KEY_DOWN_COMMAND, - (event: KeyboardEvent) => { - // Only handle arrow keys - if (event.key !== "ArrowRight" && event.key !== "ArrowLeft" && event.key !== "}") - return false - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed()) return false - - const node = selection.anchor.getNode() - const isInsideToken = $isTokenNode(node) || $isTokenInputNode(node) - - if (isInsideToken) { - const text = node.getTextContent() - const cursorPosition = selection.anchor.offset - - // Handle right arrow at the end of token - if (event.key === "ArrowRight" && cursorPosition >= text.length - 2) { - event.preventDefault() - - // Move cursor to after the token - const nextSibling = node.getNextSibling() - if (nextSibling) { - const nextText = nextSibling.getTextContent() - - navigateCursor({nodeKey: nextSibling.getKey(), offset: 1}) - } else { - // If no next sibling, create a text node and move cursor there - const newTextNode = $createTextNode("") - node.insertAfter(newTextNode) - - navigateCursor({nodeKey: newTextNode.getKey(), offset: 0}) - } - return true - } - - // Handle left arrow at the start of token - if (event.key === "ArrowLeft" && cursorPosition <= 2) { - event.preventDefault() - - // Move cursor to before the token - const prevSibling = node.getPreviousSibling() - if (prevSibling) { - const prevText = prevSibling.getTextContent() - navigateCursor({nodeKey: prevSibling.getKey(), offset: prevText.length}) - } else { - // If no previous sibling, create a text node and move cursor there - const newTextNode = $createTextNode("") - node.insertBefore(newTextNode) - - navigateCursor({nodeKey: newTextNode.getKey(), offset: 0}) - } - return true - } - - // Handle '}' key press inside token - if (event.key === "}" && $isTokenNode(node)) { - event.preventDefault() - - let text = node.getTextContent() - const cursorPos = selection.anchor.offset - - // Check if we need to add a new closing brace - if (cursorPos === text.length) { - // At the end of the token, add a new '}' - node.setTextContent(text + "}") - navigateCursor({ - nodeKey: node.getKey(), - offset: cursorPos + 1, - }) - } else { - const nextBracePos = text.indexOf("}", cursorPos) - - if (nextBracePos !== -1) { - navigateCursor({ - nodeKey: node.getKey(), - offset: nextBracePos + 1, - }) - } else { - navigateCursor({ - nodeKey: node.getKey(), - offset: text.length, - }) - } - } - - return true - } - } - return false - }, - COMMAND_PRIORITY_NORMAL, - ) - }, [editor]) - - return null -} diff --git a/web/oss/src/components/Editor/plugins/token/TokenNode.ts b/web/oss/src/components/Editor/plugins/token/TokenNode.ts index 94083cee6f..c9acd7e080 100644 --- a/web/oss/src/components/Editor/plugins/token/TokenNode.ts +++ b/web/oss/src/components/Editor/plugins/token/TokenNode.ts @@ -21,23 +21,11 @@ export class TokenNode extends TextNode { createDOM(): HTMLElement { const dom = document.createElement("span") dom.classList.add("token-node") - const text = this.__text - dom.textContent = text - // Base styles + dom.textContent = this.__text + dom.style.backgroundColor = "#e2e8f0" + dom.style.color = "#1677FF" dom.style.padding = "0 4px" dom.style.borderRadius = "4px" - dom.style.backgroundColor = "#e2e8f0" - // Color by token type - if (text.startsWith("{#")) { - // Jinja comment -> grey - dom.style.color = "#6b7280" // gray-500 - } else if (text.startsWith("{%")) { - // Jinja block -> distinct color (purple) - dom.style.color = "#a855f7" // purple-500 - } else { - // Default variable token {{ }} - dom.style.color = "#1677FF" - } return dom } @@ -69,10 +57,7 @@ export class TokenNode extends TextNode { // Convert to regular text node if no longer valid token isValid(): boolean { - // Accept curly tokens and Jinja2 block/comment/variable tokens - return /^(\{\{[\s\S]*?\}\}|\{%-?[\s\S]*?-?%\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\})$/.test( - this.__text, - ) + return /^\{\{[^{}]+\}\}$/.test(this.__text) } remove(): void { diff --git a/web/oss/src/components/Editor/plugins/token/TokenPlugin.tsx b/web/oss/src/components/Editor/plugins/token/TokenPlugin.tsx index c7ab778882..5b331b4b58 100644 --- a/web/oss/src/components/Editor/plugins/token/TokenPlugin.tsx +++ b/web/oss/src/components/Editor/plugins/token/TokenPlugin.tsx @@ -2,34 +2,16 @@ import {useEffect, useCallback} from "react" import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" import {useLexicalTextEntity} from "@lexical/react/useLexicalTextEntity" -import {TextNode, $createTextNode, LexicalNode, $isRangeSelection, $getSelection} from "lexical" +import {TextNode, $createTextNode, LexicalNode, $isRangeSelection} from "lexical" -import {navigateCursor} from "./assets/selectionUtils" import {TokenInputNode, $createTokenInputNode, $isTokenInputNode} from "./TokenInputNode" import {TokenNode, $createTokenNode, $isTokenNode} from "./TokenNode" -type TemplateFormat = "curly" | "fstring" | "jinja2" - -function buildRegexes(templateFormat: TemplateFormat) { - if (templateFormat === "jinja2") { - // Match complete Jinja2 tokens: variables {{ }}, blocks {% %} (with optional - trim markers), comments {# #} - const full = /(\{\{[\s\S]*?\}\}|\{%-?[\s\S]*?-?%\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\})/ - // Match incomplete tokens at end of string: starts of any of the three - const input = /(\{\{[\s\S]*$|\{%-?[\s\S]*$|\{%[\s\S]*$|\{#[\s\S]*$)/ - // Exact match validator for token nodes (entire text content is one token) - const exact = /^(\{\{[\s\S]*?\}\}|\{%-?[\s\S]*?-?%\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\})$/ - return {FULL_TOKEN_REGEX: full, TOKEN_INPUT_REGEX: input, EXACT_TOKEN_REGEX: exact} - } - // Default: curly variable tokens only - const full = /\{\{[^{}]*\}\}/ - const input = /\{\{[^{}]*$/ - const exact = /^\{\{[^{}]*\}\}$/ - return {FULL_TOKEN_REGEX: full, TOKEN_INPUT_REGEX: input, EXACT_TOKEN_REGEX: exact} -} +const FULL_TOKEN_REGEX = /\{\{[^{}]+\}\}/ +const TOKEN_INPUT_REGEX = /\{\{[^{}]*\}?$/ -export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: TemplateFormat}): null { +export function TokenPlugin(): null { const [editor] = useLexicalComposerContext() - const {FULL_TOKEN_REGEX, TOKEN_INPUT_REGEX, EXACT_TOKEN_REGEX} = buildRegexes(templateFormat) useEffect(() => { if (!editor.hasNodes([TokenNode, TokenInputNode])) { @@ -43,7 +25,7 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa if ($isTokenNode(textNode)) { // Handle existing token nodes - if (!text || !EXACT_TOKEN_REGEX.test(text)) { + if (!text?.match(/^\{\{[^{}]+\}\}$/)) { const parent = textNode.getParent() if (!parent) return @@ -55,7 +37,7 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa if ($isTokenInputNode(textNode)) { // Handle existing token input nodes - if (text && EXACT_TOKEN_REGEX.test(text)) { + if (text?.match(/^\{\{[^{}]+\}\}$/)) { const tokenNode = $createTokenNode(text) textNode.replace(tokenNode) const spaceNode = $createTextNode(" ") @@ -75,6 +57,7 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa // Handle potential new tokens const tokenMatch = text?.match(FULL_TOKEN_REGEX) + const tokenInputMatch = text?.match(TOKEN_INPUT_REGEX) if (tokenMatch) { const [fullMatch] = tokenMatch @@ -100,25 +83,6 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa if (afterToken) { const afterNode = $createTextNode(afterToken) textNode.insertBefore(afterNode) - if (fullMatch === "{{}}") { - navigateCursor({nodeKey: tokenNode.getKey(), offset: 2}) - } else { - // Get the current selection before any transformations - const selection = $getSelection() - const cursorOffset = $isRangeSelection(selection) - ? selection.anchor.offset - : 0 - // Calculate the new cursor position based on where it was before - const tokenStart = text.indexOf(fullMatch) - const tokenEnd = tokenStart + fullMatch.length - - navigateCursor({ - nodeKey: afterNode.getKey(), - offset: Math.max(0, cursorOffset - tokenEnd), - }) - } - } else if (fullMatch === "{{}}") { - navigateCursor({nodeKey: tokenNode.getKey(), offset: 2}) } else { const spaceNode = $createTextNode(" ") tokenNode.insertAfter(spaceNode) @@ -134,6 +98,35 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa } textNode.remove() + } else if (tokenInputMatch) { + const [fullMatch] = tokenInputMatch + const startOffset = tokenInputMatch.index! + + // Split text into parts + const beforeToken = text.slice(0, startOffset) + const afterToken = text.slice(startOffset + fullMatch.length) + + // Create nodes + const parent = textNode.getParent() + if (!parent) return + + if (beforeToken) { + const beforeNode = $createTextNode(beforeToken) + textNode.insertBefore(beforeNode) + } + + const tokenInputNode = $createTokenInputNode(fullMatch) + textNode.insertBefore(tokenInputNode) + + if (afterToken) { + const afterNode = $createTextNode(afterToken) + tokenInputNode.insertAfter(afterNode) + } + + textNode.remove() + } else if (text.match(/^\{\{[^{}]*\}?$/)) { + const tokenInputNode = $createTokenInputNode(text) + textNode.replace(tokenInputNode) } } @@ -147,45 +140,39 @@ export function TokenPlugin({templateFormat = "curly"}: {templateFormat?: Templa unregisterTextNodeTransform() unregisterTokenInputNodeTransform() } - }, [editor, templateFormat]) + }, [editor]) - const getTokenMatch = useCallback( - (text: string) => { - const fullTokenMatch = FULL_TOKEN_REGEX.exec(text) + const getTokenMatch = useCallback((text: string) => { + const fullTokenMatch = FULL_TOKEN_REGEX.exec(text) - if (fullTokenMatch) { - const startOffset = fullTokenMatch.index - const endOffset = startOffset + fullTokenMatch[0].length + if (fullTokenMatch) { + const startOffset = fullTokenMatch.index + const endOffset = startOffset + fullTokenMatch[0].length - return { - end: endOffset, - start: startOffset, - } + return { + end: endOffset, + start: startOffset, } + } - return null - }, - [templateFormat], - ) + return null + }, []) - const getTokenInputMatch = useCallback( - (text: string) => { - const matchArr = TOKEN_INPUT_REGEX.exec(text) + const getTokenInputMatch = useCallback((text: string) => { + const matchArr = TOKEN_INPUT_REGEX.exec(text) - if (matchArr) { - const startOffset = matchArr.index - const endOffset = startOffset + matchArr[0].length + if (matchArr) { + const startOffset = matchArr.index + const endOffset = startOffset + matchArr[0].length - return { - end: endOffset, - start: startOffset, - } + return { + end: endOffset, + start: startOffset, } + } - return null - }, - [templateFormat], - ) + return null + }, []) const $createTokenNode_ = useCallback((textNode: TextNode) => { return $createTokenNode(textNode.getTextContent()) diff --git a/web/oss/src/components/Editor/plugins/token/TokenTypeaheadPlugin.tsx b/web/oss/src/components/Editor/plugins/token/TokenTypeaheadPlugin.tsx deleted file mode 100644 index f65518d4b3..0000000000 --- a/web/oss/src/components/Editor/plugins/token/TokenTypeaheadPlugin.tsx +++ /dev/null @@ -1,224 +0,0 @@ -import {useCallback, useEffect, useMemo, useRef, useState} from "react" - -import {autoUpdate, flip, offset, shift, useFloating} from "@floating-ui/react" -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import {$getNodeByKey, $getSelection, $isRangeSelection} from "lexical" -import {createPortal} from "react-dom" - -import {navigateCursor} from "./assets/selectionUtils" -import {$isTokenNode} from "./TokenNode" - -interface TokenMenuPluginProps { - tokens: string[] -} - -export function TokenMenuPlugin({tokens}: TokenMenuPluginProps) { - const [editor] = useLexicalComposerContext() - const [anchor, setAnchor] = useState<{element: HTMLElement; key: string} | null>(null) - const [selectedIndex, setSelectedIndex] = useState(0) - const [inputQuery, setInputQuery] = useState("") - const containerRef = useRef<HTMLDivElement>(null) - const selectedItemRef = useRef<HTMLDivElement>(null) - - // Floating UI setup - const {refs, floatingStyles} = useFloating({ - open: !!anchor, - placement: "bottom-start", - middleware: [ - offset(4), // 4px gap from reference element - flip(), // Flip to top if no space below - shift({padding: 8}), // Keep within viewport with 8px padding - ], - whileElementsMounted: autoUpdate, // Auto-update position on scroll/resize - }) - - // Update reference element when anchor changes - useEffect(() => { - if (anchor) { - refs.setReference(anchor.element) - } else { - refs.setReference(null) - } - }, [anchor, refs, editor]) - - const dynamicallyReadingTokens = useMemo(() => { - if (tokens.length) { - const uniqueTokens = new Set(tokens) - return Array.from(uniqueTokens).filter(Boolean) - } - - const tokenNodes = window.document.querySelectorAll(".token-node") - const _tokens = Array.from(tokenNodes).map((node) => - node.textContent?.replace("{{", "").replace("}}", ""), - ) - const uniqueTokens = new Set(_tokens) - return Array.from(uniqueTokens).filter(Boolean) - }, [tokens]) - - // Filter tokens based on current input - const filteredTokens = useMemo(() => { - const _tokens = dynamicallyReadingTokens - if (!inputQuery) { - return _tokens - } - - return _tokens.filter((token) => token?.includes(inputQuery) && token !== inputQuery) - }, [dynamicallyReadingTokens, inputQuery]) - - // Handle token selection - const selectOption = useCallback( - (token: string) => { - if (!anchor) return - - editor.update(() => { - const node = $getNodeByKey(anchor.key) - if ($isTokenNode(node)) { - node.setTextContent(`{{${token}}}`) - navigateCursor({ - nodeKey: node.getKey(), - offset: node.getTextContent().length, - }) - } - }) - - // Reset state - setAnchor(null) - setSelectedIndex(0) - setInputQuery("") - }, - [anchor, editor], - ) - - // Track token node changes - useEffect(() => { - return editor.registerUpdateListener(() => { - editor.getEditorState().read(() => { - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed()) { - setAnchor(null) - return - } - - const node = selection.anchor.getNode() - - if ($isTokenNode(node)) { - const text = node.getTextContent() - // Match the token content with or without cursor - const match = text.match(/^\{\{(.*?)\}\}$/) - - // Get cursor position relative to the node - const offset = selection.anchor.offset - - // If we have a match and the cursor is between the double braces - if (match && offset >= 2 && offset <= text.length - 2) { - const tokenContent = match[1] - setInputQuery(tokenContent) - const dom = editor.getElementByKey(node.getKey()) - if (dom) { - setAnchor({element: dom, key: node.getKey()}) - return - } - } - } - setAnchor(null) - setInputQuery("") - }) - }) - }, [editor]) - - // Handle clicks outside - useEffect(() => { - if (!anchor) return - - const handleClickOutside = (event: MouseEvent) => { - if (containerRef.current && !containerRef.current.contains(event.target as Node)) { - setAnchor(null) - } - } - - const timer = setTimeout(() => { - document.addEventListener("click", handleClickOutside, true) - }, 10) - - return () => { - clearTimeout(timer) - document.removeEventListener("click", handleClickOutside, true) - } - }, [anchor]) - - // Handle keyboard navigation - useEffect(() => { - if (!anchor) return - - const handleKeyDown = (e: KeyboardEvent) => { - if (!["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(e.key)) return - - e.preventDefault() - e.stopPropagation() - - const currentTokens = filteredTokens - if (!currentTokens.length) return - - switch (e.key) { - case "ArrowDown": - case "ArrowUp": - const newIndex = - e.key === "ArrowDown" - ? (selectedIndex + 1) % currentTokens.length - : (selectedIndex - 1 + currentTokens.length) % currentTokens.length - setSelectedIndex(newIndex) - requestAnimationFrame(() => { - selectedItemRef.current?.scrollIntoView({block: "nearest"}) - }) - break - - case "Enter": - if (currentTokens[selectedIndex]) { - selectOption(currentTokens[selectedIndex]) - } - break - - case "Escape": - setAnchor(null) - break - } - } - - document.addEventListener("keydown", handleKeyDown, true) - return () => document.removeEventListener("keydown", handleKeyDown, true) - }, [anchor, filteredTokens, selectedIndex, selectOption]) - - if (!anchor || !filteredTokens.length) return null - - return createPortal( - <div - ref={(node) => { - containerRef.current = node - refs.setFloating(node) - }} - className="bg-white border border-solid border-gray-100 rounded drop-shadow-xl max-h-[160px] w-[150px] overflow-y-auto outline-none" - style={{ - ...floatingStyles, - zIndex: 1050, - }} - > - {filteredTokens.map((token, index) => ( - <div - key={token} - ref={index === selectedIndex ? selectedItemRef : null} - onClick={(e) => { - e.preventDefault() - e.stopPropagation() - selectOption(token!) - }} - className={`px-2 py-1.5 cursor-pointer font-mono text-[10px] truncate ${ - index === selectedIndex ? "bg-blue-100 text-blue-800" : "hover:bg-gray-100" - }`} - > - {token} - </div> - ))} - </div>, - document.body, - ) -} diff --git a/web/oss/src/components/Editor/plugins/token/assets/selectionUtils.ts b/web/oss/src/components/Editor/plugins/token/assets/selectionUtils.ts deleted file mode 100644 index de29cba263..0000000000 --- a/web/oss/src/components/Editor/plugins/token/assets/selectionUtils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {$createRangeSelection, $setSelection, NodeKey} from "lexical" - -export const $navigateCursor = ({ - nodeKey, - offset, - type, -}: { - nodeKey: NodeKey - offset: number - type?: "text" | "element" -}) => { - const newSelection = $createRangeSelection() - newSelection.anchor.set(nodeKey, offset, type ?? "text") - newSelection.focus.set(nodeKey, offset, type ?? "text") - $setSelection(newSelection) -} -/** @deprecated renamed to {@link $navigateCursor} by @lexical/eslint-plugin rules-of-lexical */ -export const navigateCursor = $navigateCursor diff --git a/web/oss/src/components/Editor/state/assets/atoms.ts b/web/oss/src/components/Editor/state/assets/atoms.ts index db5c2fc9d8..b01e3e02a6 100644 --- a/web/oss/src/components/Editor/state/assets/atoms.ts +++ b/web/oss/src/components/Editor/state/assets/atoms.ts @@ -1,8 +1,4 @@ -import {atomFamily, atomWithStorage} from "jotai/utils" +import {atomWithStorage} from "jotai/utils" // Single atom instance that will be scoped by the provider export const editorStateAtom = atomWithStorage("editor-state", "") - -export const markdownViewAtom = atomFamily((id: string) => - atomWithStorage(`markdown-view-${id}`, false), -) diff --git a/web/oss/src/components/Editor/types.d.ts b/web/oss/src/components/Editor/types.d.ts index 73f55399a6..75e60199f3 100644 --- a/web/oss/src/components/Editor/types.d.ts +++ b/web/oss/src/components/Editor/types.d.ts @@ -1,7 +1,5 @@ import {EditorState, LexicalEditor} from "lexical" -import {CustomRenderFn} from "./form/nodes/NodeTypes" - export interface EditorContextType { editor: LexicalEditor | null config: any @@ -10,9 +8,8 @@ export interface EditorContextType { export interface EditorProviderProps extends React.HTMLProps<HTMLDivElement> { children: React.ReactNode dimensions?: { - width: number | string - maxWidth?: number | string - height: number | string + width: number + height: number } } @@ -26,46 +23,30 @@ export interface EditorProps extends React.HTMLProps<HTMLDivElement> { singleLine?: boolean autoFocus?: boolean codeOnly?: boolean - language?: "json" | "yaml" | "code" + language?: string showToolbar?: boolean enableTokens?: boolean - tokens?: string[] - /** Template format for prompt variable/tag highlighting */ - templateFormat?: "curly" | "fstring" | "jinja2" - noProvider?: boolean - /** Custom render function to override node rendering in Form view */ - customRender?: CustomRenderFn enableResize?: boolean boundWidth?: boolean boundHeight?: boolean debug?: boolean dimensions?: { - width: number | string - maxWidth?: number | string - height: number | string + width: number + height: number } showBorder?: boolean validationSchema?: unknown - /** Additional plugins to include in code editor */ - additionalCodePlugins?: React.ReactNode[] } export interface EditorPluginsProps { - id: string showToolbar: boolean singleLine: boolean codeOnly: boolean autoFocus?: boolean enableTokens: boolean debug: boolean - language?: "json" | "yaml" | "code" + language?: string placeholder?: string - /** Initial text value for the editor */ - initialValue: string validationSchema?: unknown - tokens?: string[] - templateFormat?: "curly" | "fstring" | "jinja2" handleUpdate: (editorState: EditorState, editor: LexicalEditor) => void - /** Additional plugins to include in code editor */ - additionalCodePlugins?: React.ReactNode[] } diff --git a/web/oss/src/components/Editor/utils/diffUtils.ts b/web/oss/src/components/Editor/utils/diffUtils.ts deleted file mode 100644 index 682520be98..0000000000 --- a/web/oss/src/components/Editor/utils/diffUtils.ts +++ /dev/null @@ -1,467 +0,0 @@ -import yaml from "js-yaml" - -/** - * Compute line-by-line diff using LCS-based algorithm - */ -function computeLineDiff(oldLines: string[], newLines: string[], contextLines: number): DiffLine[] { - const result: { - type: "context" | "added" | "removed" - content: string - oldLineNumber?: number - newLineNumber?: number - }[] = [] - - // Use LCS algorithm for proper diff computation - const lcs = longestCommonSubsequence(oldLines, newLines) - - let oldIndex = 0 - let newIndex = 0 - let lcsIndex = 0 - - while (oldIndex < oldLines.length || newIndex < newLines.length) { - if ( - lcsIndex < lcs.length && - oldIndex < oldLines.length && - newIndex < newLines.length && - oldLines[oldIndex] === lcs[lcsIndex] && - newLines[newIndex] === lcs[lcsIndex] - ) { - // Common line - show both line numbers - result.push({ - type: "context", - content: oldLines[oldIndex], - oldLineNumber: oldIndex + 1, - newLineNumber: newIndex + 1, - }) - oldIndex++ - newIndex++ - lcsIndex++ - } else if ( - oldIndex < oldLines.length && - (lcsIndex >= lcs.length || oldLines[oldIndex] !== lcs[lcsIndex]) - ) { - // Removed line - show only old line number - result.push({ - type: "removed", - content: oldLines[oldIndex], - oldLineNumber: oldIndex + 1, - }) - oldIndex++ - } else if (newIndex < newLines.length) { - // Added line - show only new line number - result.push({ - type: "added", - content: newLines[newIndex], - newLineNumber: newIndex + 1, - }) - newIndex++ - } - } - - return result -} - -/** - * Basic diff line type - */ -interface DiffLine { - type: "context" | "added" | "removed" - content: string - oldLineNumber?: number - newLineNumber?: number -} - -/** - * Extended diff line type with folding support - */ -interface ExtendedDiffLine { - type: "context" | "added" | "removed" | "fold" - content: string - oldLineNumber?: number - newLineNumber?: number - foldedLineCount?: number - startLine?: number - endLine?: number -} - -/** - * Apply folding logic to diff lines to focus on changes - * Large sections of unchanged content are collapsed into fold indicators - */ -function applyFolding( - diffLines: DiffLine[], - options: { - contextLines?: number - foldThreshold?: number - showFoldedLineCount?: boolean - } = {}, -): ExtendedDiffLine[] { - const {contextLines = 3, foldThreshold = 5, showFoldedLineCount = true} = options - const result: ExtendedDiffLine[] = [] - - let i = 0 - while (i < diffLines.length) { - const line = diffLines[i] - - if (line.type !== "context") { - // Non-context line (added/removed) - always show - result.push(line) - i++ - continue - } - - // Find consecutive context lines - let contextStart = i - let contextEnd = i - while (contextEnd < diffLines.length && diffLines[contextEnd].type === "context") { - contextEnd++ - } - - const contextLength = contextEnd - contextStart - - if (contextLength <= foldThreshold) { - // Short context block - show all lines - for (let j = contextStart; j < contextEnd; j++) { - result.push(diffLines[j]) - } - } else { - // Long context section - apply folding - const isAtStart = contextStart === 0 - const isAtEnd = contextEnd === diffLines.length - - if (isAtStart) { - // At the beginning - show last few lines before changes - const keepLines = Math.min(contextLines, contextLength) - const foldEnd = contextEnd - keepLines - - if (foldEnd > contextStart) { - // Add fold indicator - calculate actual folded line range - const firstFoldedLine = diffLines[contextStart] - const lastFoldedLine = diffLines[foldEnd - 1] - const startLineNum = - firstFoldedLine.oldLineNumber || firstFoldedLine.newLineNumber || 1 - const endLineNum = - lastFoldedLine.oldLineNumber || lastFoldedLine.newLineNumber || 1 - - // Debug: fold range calculation is working correctly - - result.push({ - type: "fold", - content: showFoldedLineCount - ? `... ${foldEnd - contextStart} unchanged lines ...` - : "...", - startLine: startLineNum, - endLine: endLineNum, - foldedLineCount: foldEnd - contextStart, - }) - } - - // Add remaining context lines - for (let j = foldEnd; j < contextEnd; j++) { - result.push(diffLines[j]) - } - } else if (isAtEnd) { - // At the end - show first few lines after changes - const keepLines = Math.min(contextLines, contextLength) - const foldStart = contextStart + keepLines - - // Add initial context lines - for (let j = contextStart; j < foldStart; j++) { - result.push(diffLines[j]) - } - - if (foldStart < contextEnd) { - // Add fold indicator - calculate actual folded line range - const firstFoldedLine = diffLines[foldStart] - const lastFoldedLine = diffLines[contextEnd - 1] - const startLineNum = - firstFoldedLine.oldLineNumber || firstFoldedLine.newLineNumber || 1 - const endLineNum = - lastFoldedLine.oldLineNumber || lastFoldedLine.newLineNumber || 1 - - // Debug: fold range calculation is working correctly - - result.push({ - type: "fold", - content: showFoldedLineCount - ? `... ${contextEnd - foldStart} unchanged lines ...` - : "...", - startLine: startLineNum, - endLine: endLineNum, - foldedLineCount: contextEnd - foldStart, - }) - } - } else { - // In the middle - show context around changes - // Only fold if we can actually save significant lines - const totalKeep = contextLines * 2 // Keep context lines before and after - if (contextLength <= totalKeep + 2) { - // Not enough lines to make folding worthwhile, keep all - for (let j = contextStart; j < contextEnd; j++) { - result.push(diffLines[j]) - } - } else { - // Enough lines to fold meaningfully - const keepBefore = contextLines - const keepAfter = contextLines - const foldStart = contextStart + keepBefore - const foldEnd = contextEnd - keepAfter - - // Add initial context lines - for (let j = contextStart; j < foldStart; j++) { - result.push(diffLines[j]) - } - - // Add fold indicator - calculate actual folded line range - const firstFoldedLine = diffLines[foldStart] - const lastFoldedLine = diffLines[foldEnd - 1] - const startLineNum = - firstFoldedLine.oldLineNumber || firstFoldedLine.newLineNumber || 1 - const endLineNum = - lastFoldedLine.oldLineNumber || lastFoldedLine.newLineNumber || 1 - - result.push({ - type: "fold", - content: showFoldedLineCount - ? `... ${foldEnd - foldStart} unchanged lines ...` - : "...", - startLine: startLineNum, - endLine: endLineNum, - foldedLineCount: foldEnd - foldStart, - }) - - // Add final context lines - for (let j = foldEnd; j < contextEnd; j++) { - result.push(diffLines[j]) - } - } - } - } - - i = contextEnd - } - - return result -} - -/** - * Compute diff between two objects and return GitHub-style diff format - * - * This function takes two JavaScript objects and computes a line-by-line diff - * in the specified format (JSON or YAML). The result is a unified diff format - * that can be parsed and displayed by the DiffHighlightPlugin. - * - * ## Input Handling: - * - Accepts any JavaScript objects/values as input - * - Serializes objects to strings based on the specified language - * - Handles nested objects, arrays, and primitive values - * - * ## Language Support: - * **JSON Mode:** - * - Uses `JSON.stringify(obj, null, 2)` for consistent formatting - * - 2-space indentation for readability - * - Proper JSON syntax with quotes and brackets - * - * **YAML Mode:** - * - Uses `yaml.dump(obj, {indent: 2})` for consistent formatting - * - 2-space indentation following YAML conventions - * - Clean YAML syntax without unnecessary quotes - * - * ## Output Format: - * Returns a string where each line follows the pattern: - * ``` - * oldLineNum|newLineNum|type|content - * ``` - * - `oldLineNum`: Line number in original (empty for added lines) - * - `newLineNum`: Line number in modified (empty for removed lines) - * - `type`: "added" | "removed" | "context" - * - `content`: The actual line content - * - * ## Usage Examples: - * - * ### JSON Diff - * ```typescript - * const original = {name: "old-service", version: "1.0.0"} - * const modified = {name: "new-service", version: "1.1.0"} - * - * const diff = computeDiff(original, modified, { - * language: "json", - * contextLines: 3 - * }) - * ``` - * - * ### YAML Diff - * ```typescript - * const original = {name: "old-service", config: {port: 8080}} - * const modified = {name: "new-service", config: {port: 9000}} - * - * const diff = computeDiff(original, modified, { - * language: "yaml", - * contextLines: 2 - * }) - * ``` - * - * @param original - The original object to compare from - * @param modified - The modified object to compare to - * @param options - Configuration options for diff computation - * @param options.language - Output format: "json" or "yaml" - * @param options.contextLines - Number of context lines around changes (default: 3) - * @returns Unified diff string in the specified format - */ -export function computeDiff( - original: any, - modified: any, - options: { - language: "json" | "yaml" - contextLines?: number - enableFolding?: boolean - foldThreshold?: number - showFoldedLineCount?: boolean - } = {language: "json"}, -): string { - const { - language, - contextLines = 3, - enableFolding = false, - foldThreshold = 10, - showFoldedLineCount = true, - } = options - - const oldStr = - language === "json" ? JSON.stringify(original, null, 2) : yaml.dump(original, {indent: 2}) - const newStr = - language === "json" ? JSON.stringify(modified, null, 2) : yaml.dump(modified, {indent: 2}) - - const oldLines = oldStr.split("\n") - const newLines = newStr.split("\n") - - // Compute line-by-line diff - let diffLines: DiffLine[] | ExtendedDiffLine[] = computeLineDiff( - oldLines, - newLines, - contextLines, - ) - - // Apply folding if enabled - if (enableFolding) { - diffLines = applyFolding(diffLines as DiffLine[], { - contextLines, - foldThreshold, - showFoldedLineCount, - }) - } - - // Convert to GitHub-style diff format with dual line numbers - const result = diffLines - .map((line) => { - if (line.type === "fold") { - // Special handling for fold lines - const foldLine = line as ExtendedDiffLine - const startLine = foldLine.startLine || "" - const endLine = foldLine.endLine || "" - // Format: "startLine-endLine|startLine-endLine|fold|content|foldedLineCount" - return `${startLine}-${endLine}|${startLine}-${endLine}|fold|${line.content}|${foldLine.foldedLineCount || 0}` - } else { - // Regular diff lines - const oldNum = line.oldLineNumber ? line.oldLineNumber.toString() : "" - const newNum = line.newLineNumber ? line.newLineNumber.toString() : "" - // Format: "oldLineNum|newLineNum|type|content" - return `${oldNum}|${newNum}|${line.type}|${line.content}` - } - }) - .join("\n") - - return result -} - -/** - * Helper function to detect if content is likely incomplete while typing - */ -export function isContentIncomplete(content: string, language: "json" | "yaml"): boolean { - const trimmed = content.trim() - - if (language === "json") { - const checks = { - trailingComma: trimmed.endsWith(","), - openObject: trimmed.endsWith("{"), - openArray: trimmed.endsWith("["), - trailingColon: trimmed.endsWith(":"), - emptyString: content.includes('""'), - colonAtEnd: /"\s*:\s*$/.test(content), - colonNewline: /"\s*:\s*\n/.test(content), - // Removed invalidValueStart - too restrictive and causes false positives - } - - return Object.values(checks).some(Boolean) - } else { - // YAML incomplete patterns - const lines = content.split("\n") - const hasIncompleteKey = lines.some((line, index) => { - const trimmedLine = line.trim() - // Check for key without value (not followed by colon or value) - if (trimmedLine && !trimmedLine.includes(":") && !trimmedLine.startsWith("-")) { - // Check if next line exists and starts a new key - const nextLine = lines[index + 1] - if (nextLine && nextLine.trim().includes(":")) { - return true // Key without value followed by another key - } - } - return false - }) - - // Check for the specific "multiline key" error pattern - const hasMultilineKeyError = - content.includes("testKey\ndependencies:") || - /^\s*[a-zA-Z_][a-zA-Z0-9_]*\s*\n\s*[a-zA-Z_][a-zA-Z0-9_]*:/m.test(content) - - return ( - trimmed.endsWith(":") || // Missing value after key - trimmed.endsWith("-") || // Incomplete list item - /:\s*$/.test(content) || // Key followed by colon at end - /:\s*\n\s*$/.test(content) || // Key followed by colon and newline - hasIncompleteKey || // Key without value followed by another key - hasMultilineKeyError // Multiline key error pattern - ) - } -} - -/** - * Simple LCS implementation for line diff - */ -function longestCommonSubsequence(a: string[], b: string[]): string[] { - const m = a.length - const n = b.length - const dp: number[][] = Array(m + 1) - .fill(null) - .map(() => Array(n + 1).fill(0)) - - // Build LCS table - for (let i = 1; i <= m; i++) { - for (let j = 1; j <= n; j++) { - if (a[i - 1] === b[j - 1]) { - dp[i][j] = dp[i - 1][j - 1] + 1 - } else { - dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]) - } - } - } - - // Reconstruct LCS - const lcs: string[] = [] - let i = m, - j = n - - while (i > 0 && j > 0) { - if (a[i - 1] === b[j - 1]) { - lcs.unshift(a[i - 1]) - i-- - j-- - } else if (dp[i - 1][j] > dp[i][j - 1]) { - i-- - } else { - j-- - } - } - - return lcs -} diff --git a/web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx b/web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx deleted file mode 100644 index 96daf023e8..0000000000 --- a/web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx +++ /dev/null @@ -1,315 +0,0 @@ -import {useCallback, useEffect, useMemo, useState} from "react" - -import {mergeRegister} from "@lexical/utils" -import { - BracketsCurly, - CaretDown, - CaretUp, - CaretUpDown, - Check, - Code, - Copy, - MarkdownLogo, - TextAa, -} from "@phosphor-icons/react" -import {Button, MenuProps} from "antd" -import clsx from "clsx" -import {$getRoot} from "lexical" -import dynamic from "next/dynamic" - -import {EditorProvider, useLexicalComposerContext} from "@/oss/components/Editor/Editor" -import {ON_CHANGE_LANGUAGE} from "@/oss/components/Editor/plugins/code" -import {$isCodeBlockNode} from "@/oss/components/Editor/plugins/code/nodes/CodeBlockNode" -import {TOGGLE_MARKDOWN_VIEW} from "@/oss/components/Editor/plugins/markdown/commands" -import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" -import SharedEditor from "@/oss/components/Playground/Components/SharedEditor" - -import {checkIsHTML, checkIsJSON, checkIsYAML, getDisplayedContent} from "../assets/helper" - -import {Format, SimpleSharedEditorProps} from "./types" - -const Dropdown = dynamic(() => import("antd").then((mod) => mod.Dropdown), {ssr: false}) - -const SimpleSharedEditorContent = ({ - headerClassName, - headerName, - isJSON, - isYAML, - isHTML, - isMinimizeVisible = true, - isFormatVisible = true, - isCopyVisible = true, - formatDropdownProps, - copyButtonProps, - minimizeButtonProps, - disableFormatItems, - showTextToMdOutside = false, - minimizedHeight = 68, - defaultMinimized = false, - ...props -}: SimpleSharedEditorProps) => { - const [minimized, setMinimized] = useState(() => Boolean(defaultMinimized)) - const [isCopied, setIsCopied] = useState(false) - const [language, setLanguage] = useState<Format>(() => - isJSON ? "json" : isYAML ? "yaml" : "text", - ) - - const [editor] = useLexicalComposerContext() - - useEffect(() => { - const unregister = mergeRegister( - editor.registerUpdateListener(({editorState}) => { - editorState.read(() => { - const codeBlock = $getRoot().getChildren().find($isCodeBlockNode) - if (codeBlock) { - const _language = codeBlock.getLanguage() - setLanguage((cur) => (cur === _language ? cur : _language)) - } - }) - }), - ) - return unregister - }, [editor]) - - // keep dropdown in sync with actual view - useEffect(() => { - if (isJSON) { - setLanguage("json") - editor.dispatchCommand(ON_CHANGE_LANGUAGE, {language: "json"}) - } else if (isYAML) { - setLanguage("yaml") - editor.dispatchCommand(ON_CHANGE_LANGUAGE, {language: "yaml"}) - } else if (isHTML) { - setLanguage("html") - editor.dispatchCommand(ON_CHANGE_LANGUAGE, {language: "html"}) - } else { - setLanguage("markdown") - } - }, [isJSON, isYAML, isHTML, editor]) - - const toText = useCallback(() => { - if (language === "text") return - editor.dispatchCommand(TOGGLE_MARKDOWN_VIEW, undefined) - setLanguage("text") - }, [editor, language]) - - const toMarkdown = useCallback(() => { - if (language === "markdown") return - editor.dispatchCommand(TOGGLE_MARKDOWN_VIEW, undefined) - setLanguage("markdown") - }, [editor, language]) - - const toJson = useCallback(() => { - if (language === "json") return - editor.dispatchCommand(ON_CHANGE_LANGUAGE, {language: "json"}) - setLanguage("json") - }, [editor, language]) - - const toYaml = useCallback(() => { - if (language === "yaml") return - editor.dispatchCommand(ON_CHANGE_LANGUAGE, {language: "yaml"}) - setLanguage("yaml") - }, [editor, language]) - - const onCopyText = useCallback(async () => { - const text = props.value || props.initialValue - let formattedText - try { - formattedText = getDisplayedContent(editor, language) - } catch (e) { - formattedText = text - console.log(e) - } - - if (text) { - setIsCopied(true) - - await navigator.clipboard.writeText(formattedText) - - setTimeout(() => { - setIsCopied(false) - }, 1000) - } - }, [props.value, props.initialValue, language, editor]) - - const menuItems: MenuProps["items"] = useMemo( - () => [ - { - key: "text", - icon: <TextAa size={14} />, - label: "Text", - onClick: toText, - disabled: isJSON || isYAML || isHTML || disableFormatItems?.text, - }, - { - key: "markdown", - icon: <MarkdownLogo size={14} />, - label: "Markdown", - onClick: toMarkdown, - disabled: isJSON || isYAML || isHTML || disableFormatItems?.markdown, - }, - { - key: "json", - icon: <BracketsCurly size={14} />, - label: "JSON", - onClick: toJson, - disabled: (!isJSON && !isYAML) || isHTML || disableFormatItems?.json, - }, - { - key: "yaml", - icon: <Code size={14} />, - label: "YAML", - onClick: toYaml, - disabled: (!isYAML && !isJSON) || isHTML || disableFormatItems?.yaml, - }, - ...(isHTML - ? [ - { - key: "html", - icon: <Code size={14} />, - label: "HTML", - disabled: (!isHTML && !isJSON && !isYAML) || disableFormatItems?.html, - }, - ] - : []), - ], - [isJSON, toText, toJson, toYaml, toMarkdown, disableFormatItems, isYAML, isHTML], - ) - - return ( - <SharedEditor - {...props} - editorProps={{ - ...props.editorProps, - codeOnly: isJSON || isYAML || isHTML || props.editorProps?.codeOnly, - ...(isJSON || isYAML || isHTML ? {language: language as "json" | "yaml"} : {}), - noProvider: true, - showToolbar: false, - enableTokens: false, - }} - style={{["--min-h" as any]: `${minimizedHeight}px`}} - className={clsx( - "transition-all duration-300 ease-in-out", - minimized - ? "[&_.agenta-editor-wrapper]:h-[var(--min-h)] [&_.agenta-editor-wrapper]:overflow-y-auto [&_.agenta-editor-wrapper]:!mb-0" - : "[&_.agenta-editor-wrapper]:h-fit", - props.className, - )} - header={ - <div - className={clsx([ - "w-full flex items-center justify-between", - {"mt-2": isJSON || isYAML || isHTML}, - headerClassName, - ])} - > - <span className="font-medium">{headerName}</span> - <div className="flex items-center gap-2"> - {isFormatVisible && ( - <Dropdown - {...formatDropdownProps} - placement="bottomRight" - trigger={["click"]} - overlayStyle={{width: 120}} - menu={{ - items: menuItems, - selectable: true, - selectedKeys: [language], - }} - > - <Button - className={clsx([ - "capitalize flex items-center gap-1", - {"!uppercase": isJSON || isYAML || isHTML}, - ])} - size="small" - type="text" - > - {language} <CaretUpDown size={14} /> - </Button> - </Dropdown> - )} - - {showTextToMdOutside && ( - <EnhancedButton - {...copyButtonProps} - icon={ - language === "text" ? ( - <MarkdownLogo size={14} /> - ) : ( - <TextAa size={14} /> - ) - } - type="text" - size="small" - onClick={() => (language === "text" ? toMarkdown() : toText())} - tooltipProps={{ - title: - language === "text" ? "Preview markdown" : "Preview text", - }} - /> - )} - - {isCopyVisible && ( - <EnhancedButton - {...copyButtonProps} - icon={isCopied ? <Check size={14} /> : <Copy size={14} />} - type="text" - size="small" - onClick={onCopyText} - tooltipProps={{title: isCopied ? "Copied" : "Copy"}} - /> - )} - - {isMinimizeVisible && ( - <EnhancedButton - {...minimizeButtonProps} - icon={minimized ? <CaretDown size={14} /> : <CaretUp size={14} />} - type="text" - size="small" - onClick={() => setMinimized((c) => !c)} - tooltipProps={{title: minimized ? "Maximize" : "Minimize"}} - /> - )} - </div> - </div> - } - /> - ) -} - -const SimpleSharedEditor = (props: SimpleSharedEditorProps) => { - const isJSON = useMemo(() => { - const value = props.initialValue || props.value - if (!value) return false - return checkIsJSON(typeof value === "string" ? value : JSON.stringify(value)) - }, [props.value, props.initialValue]) - - const isYAML = useMemo(() => { - const value = props.initialValue || props.value - if (!value) return false - return checkIsYAML(typeof value === "string" ? value : JSON.stringify(value)) - }, [props.value, props.initialValue]) - - const isHTML = useMemo(() => { - const value = props.initialValue || props.value - if (!value) return false - return checkIsHTML(typeof value === "string" ? value : JSON.stringify(value)) - }, [props.value, props.initialValue]) - - return ( - <EditorProvider - codeOnly={props.editorProps?.codeOnly || isJSON || isYAML || isHTML} - enableTokens={false} - showToolbar={false} - > - <SimpleSharedEditorContent - {...props} - isJSON={props.isJSON || isJSON} - isYAML={props.isYAML || isYAML} - isHTML={props.isHTML || isHTML} - /> - </EditorProvider> - ) -} -export default SimpleSharedEditor diff --git a/web/oss/src/components/EditorViews/SimpleSharedEditor/types.ts b/web/oss/src/components/EditorViews/SimpleSharedEditor/types.ts deleted file mode 100644 index fc354e4bdd..0000000000 --- a/web/oss/src/components/EditorViews/SimpleSharedEditor/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {DropdownProps} from "antd" - -import {SharedEditorProps} from "@/oss/components/Playground/Components/SharedEditor/types" - -import {TooltipButtonProps} from "../../Playground/assets/EnhancedButton" - -export interface SimpleSharedEditorProps extends SharedEditorProps { - headerClassName?: string - headerName?: string | React.ReactNode - isJSON?: boolean - isYAML?: boolean - isHTML?: boolean - isMinimizeVisible?: boolean - isFormatVisible?: boolean - isCopyVisible?: boolean - formatDropdownProps?: DropdownProps - copyButtonProps?: TooltipButtonProps - minimizeButtonProps?: TooltipButtonProps - disableFormatItems?: {text?: boolean; markdown?: boolean; json?: boolean; yaml?: boolean} - minimizedHeight?: number - showTextToMdOutside?: boolean - defaultMinimized?: boolean -} -export type Format = "text" | "json" | "yaml" | "markdown" | "html" diff --git a/web/oss/src/components/EditorViews/VirtualizedSharedEditors/index.tsx b/web/oss/src/components/EditorViews/VirtualizedSharedEditors/index.tsx deleted file mode 100644 index 3b154a574f..0000000000 --- a/web/oss/src/components/EditorViews/VirtualizedSharedEditors/index.tsx +++ /dev/null @@ -1,165 +0,0 @@ -// VirtualizedSharedEditors.tsx -import React, {memo, useCallback, useLayoutEffect, useRef, useState, useEffect} from "react" - -import {VariableSizeList as List} from "react-window" -import {useResizeObserver} from "usehooks-ts" - -interface Entry { - k: string - v: unknown -} - -interface Props { - entries: Entry[] - overscanCount?: number - estimatedRowHeight?: number - className?: string - renderRow: (entry: Entry) => React.ReactNode - /** Max viewport height you'd like to use; list will shrink if content is shorter */ - listHeight?: number -} - -const VirtualizedSharedEditors: React.FC<Props> = memo( - ({ - entries, - overscanCount = 2, - estimatedRowHeight = 120, - className, - renderRow, - listHeight = 500, - }) => { - const sizeMap = useRef(new Map<number, number>()) - const measuredTotalRef = useRef(0) // sum of measured rows - const measuredCountRef = useRef(0) // how many rows are measured - const listRef = useRef<List>(null) - - const getItemSize = useCallback( - (index: number) => sizeMap.current.get(index) ?? estimatedRowHeight, - [estimatedRowHeight], - ) - - const setItemSize = useCallback((index: number, size: number) => { - const prev = sizeMap.current.get(index) - if (prev === undefined) { - measuredCountRef.current += 1 - measuredTotalRef.current += size - } else if (prev !== size) { - measuredTotalRef.current += size - prev - } - if (prev !== size) { - sizeMap.current.set(index, size) - listRef.current?.resetAfterIndex(index) - } - }, []) - - // container width (and optional height if parent gives one) - const containerRef = useRef<HTMLDivElement | null>(null) - const [containerSize, setContainerSize] = useState({width: 0, height: 0}) - useResizeObserver({ - ref: containerRef, - onResize: (entry) => { - const {width, height} = entry.contentRect || {} - setContainerSize({width, height}) - }, - box: "content-box", - }) - - useLayoutEffect(() => { - listRef.current?.resetAfterIndex(0, true) - }, [containerSize.width, containerSize.height]) - - // reset caches if data length changes a lot - useEffect(() => { - sizeMap.current.clear() - measuredTotalRef.current = 0 - measuredCountRef.current = 0 - listRef.current?.resetAfterIndex(0, true) - }, [entries]) - - // callback-ref observer for each row (robust inside react-window) - const observersRef = useRef<Map<number, ResizeObserver>>(new Map()) - const attachMeasuredRef = useCallback( - (index: number) => (el: HTMLDivElement | null) => { - const prev = observersRef.current.get(index) - if (prev) { - prev.disconnect() - observersRef.current.delete(index) - } - if (!el) return - - const measure = () => { - const h = Math.max(0, Math.ceil(el.getBoundingClientRect().height)) + 1 - setItemSize(index, h) - } - measure() - - const ro = new ResizeObserver(measure) - ro.observe(el) - observersRef.current.set(index, ro) - }, - [setItemSize], - ) - useEffect( - () => () => { - observersRef.current.forEach((ro) => ro.disconnect()) - observersRef.current.clear() - }, - [], - ) - - const Row = useCallback( - ({index, style}: {index: number; style: React.CSSProperties}) => ( - <div style={{...style, overflow: "hidden"}}> - <div ref={attachMeasuredRef(index)} className="px-0 py-1"> - {renderRow(entries[index])} - </div> - </div> - ), - [entries, renderRow, attachMeasuredRef], - ) - - // ----- “max-height” behavior ----- - // Approx total content height = measured + estimate for unmeasured - const approxTotalHeight = - measuredTotalRef.current + - (entries.length - measuredCountRef.current) * estimatedRowHeight - - // viewport cap (never 0 to ensure rendering on first paint) - const viewportCap = Math.max(200, Number.isFinite(listHeight) ? (listHeight as number) : 0) - - // If content fits under the cap, skip virtualization: render plain stack that auto-sizes. - const fitsWithoutScroll = approxTotalHeight <= viewportCap + 1 - - if (fitsWithoutScroll) { - return ( - <div ref={containerRef} className={className}> - {entries.map((e, i) => ( - <div key={e.k ?? i} className="px-0 py-1"> - {renderRow(e)} - </div> - ))} - </div> - ) - } - - // Otherwise, virtualize with a fixed viewport height (the “max”) - return ( - <div ref={containerRef} className={className} style={{height: "100%"}}> - <List - ref={listRef} - height={viewportCap} - width={containerSize.width || "100%"} - itemCount={entries.length} - itemSize={getItemSize} - estimatedItemSize={estimatedRowHeight} - overscanCount={overscanCount} - itemKey={(i) => entries[i]?.k ?? i} - > - {Row as any} - </List> - </div> - ) - }, -) - -export default VirtualizedSharedEditors diff --git a/web/oss/src/components/EditorViews/assets/helper.ts b/web/oss/src/components/EditorViews/assets/helper.ts deleted file mode 100644 index 58cc9e35b1..0000000000 --- a/web/oss/src/components/EditorViews/assets/helper.ts +++ /dev/null @@ -1,197 +0,0 @@ -import {$isCodeNode} from "@lexical/code" -import {load as yamlLoad, dump as yamlDump, type DumpOptions} from "js-yaml" -import JSON5 from "json5" -import {$getRoot, LexicalEditor} from "lexical" - -import {$isCodeBlockNode} from "../../Editor/plugins/code/nodes/CodeBlockNode" -import { - $convertToMarkdownStringCustom, - PLAYGROUND_TRANSFORMERS, -} from "../../Editor/plugins/markdown/assets/transformers" -import {Format} from "../SimpleSharedEditor/types" - -/** Strip one pair of matching outer quotes if present */ -function stripOuterQuotes(s: string): string { - if (s.length >= 2) { - const q = s[0] - if ((q === '"' || q === "'") && s[s.length - 1] === q) return s.slice(1, -1) - } - return s -} - -/** Convert literal escapes like "\n" into real newlines if needed */ -function unescapeCommonEscapes(s: string): string { - // Only unescape if there are no real newlines but there ARE literal \n (common LLM output) - if (!/[\r\n]/.test(s) && /\\n/.test(s)) { - s = s.replace(/\\r\\n/g, "\n").replace(/\\n/g, "\n") - } - // Optional: tabs and quotes - s = s.replace(/\\t/g, "\t").replace(/\\"/g, '"').replace(/\\'/g, "'") - return s -} - -/** Unwrap a single fenced code block (```lang ... ``` or ~~~lang ... ~~~) */ -function unwrapFence(s: string): {lang?: string; text: string} | null { - const t = s.trim() - const re = /^(?:```|~~~)\s*([A-Za-z0-9+_.-]*)\s*\r?\n([\s\S]*?)\r?\n(?:```|~~~)\s*$/ - const m = t.match(re) - if (!m) return null - return {lang: m[1]?.toLowerCase() || undefined, text: m[2]} -} - -/** Optional: support YAML front-matter style --- ... --- */ -function unwrapFrontMatter(s: string): string | null { - const m = s.match(/^\s*---\s*\r?\n([\s\S]*?)\r?\n---\s*$/) - return m ? m[1] : null -} - -export function checkIsJSON(input: any): boolean { - if (!input || input === "{}" || input === "[]") return false - if (typeof input !== "string") return false - try { - const parsed = JSON5.parse(input) - return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) - } catch { - return false - } -} - -export function checkIsYAML(input: any): boolean { - if (!input || typeof input !== "string") return false - - // 1) Normalize - let s = stripOuterQuotes(input).trim() - s = unescapeCommonEscapes(s) - - // 2) If it cleanly parses as JSON object, treat as JSON (YAML is a superset) - try { - const asJson = JSON5.parse(s) - if (asJson && typeof asJson === "object") return false - } catch { - // not JSON → continue - } - - // 3) Unwrap fence or front-matter if present - const fenced = unwrapFence(s) - if (fenced) { - if (fenced.lang === "json") return false // explicitly JSON - s = fenced.text - } else { - const fm = unwrapFrontMatter(s) - if (fm) s = fm - } - - // 4) Guard for raw JSON-looking start - const c0 = s.trim()[0] - if (c0 === "{" || c0 === "[") return false - - // 5) Try YAML parse - try { - const parsed = yamlLoad(s) - - // Only count YAML *mappings* (plain objects) as "YAML" - const isPlainObject = - parsed !== null && - typeof parsed === "object" && - !Array.isArray(parsed) && - Object.prototype.toString.call(parsed) === "[object Object]" - - return isPlainObject && Object.keys(parsed).length > 0 // require at least one key - } catch { - return false - } -} - -/** Minimal check: does the string look like real HTML (not JSON/YAML/markdown)? */ -export function checkIsHTML(input: any): boolean { - if (typeof input !== "string") return false - - const s = input.trim() - if (!s || s.startsWith("{") || s.startsWith("[") || s.startsWith("---")) return false // quick guards - if (s.startsWith("```") || s.startsWith("~~~")) return false // fenced code blocks - - // Must contain angle brackets at all - if (s.indexOf("<") === -1 || s.indexOf(">") === -1) return false - - // Matches: <tag ...>...</tag> OR self-closing/void tags like <br>, <img />, <input> - const HTML_RE = - /<([a-z][a-z0-9-]*)\b[^>]*>([\s\S]*?)<\/\1\s*>|<(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr|li|div|body)\b[^>]*\/?>/i - - return HTML_RE.test(s) -} - -/** - * Parse a YAML-ish string (handles LLM-escaped newlines and fences) and - * return a formatted YAML string. If parsing fails, it throws. - */ -export function formatYAML(input: string, opts?: DumpOptions): string { - if (typeof input !== "string") return input - - // 1) normalize - let s = stripOuterQuotes(input).trim() - s = unescapeCommonEscapes(s) - - // 2) unwrap fences/front-matter if present - const fenced = unwrapFence(s) - if (fenced) s = fenced.text - else { - const fm = unwrapFrontMatter(s) - if (fm) s = fm - } - - // 3) parse as YAML (will also parse JSON since YAML is a superset) - const value = yamlLoad(s) - - // 4) dump back to nicely formatted YAML - return yamlDump(value, { - lineWidth: -1, // no hard wrapping - noRefs: true, // inline duplicates instead of anchors - ...(opts || {}), - }) -} - -export function getDisplayedContent(editor: LexicalEditor, language: Format): string { - return editor.getEditorState().read(() => { - const root = $getRoot() - - // JSON/YAML modes use a top-level CodeBlockNode - if (language === "json" || language === "yaml") { - const codeBlock = root.getChildren().find($isCodeBlockNode) - const text = codeBlock ? codeBlock.getTextContent() : "" - - if (language === "yaml") { - try { - return formatYAML(text) - } catch { - return text - } - } - - try { - // round-trip to stable JSON string - const obj = JSON.parse(text) - return JSON.stringify(obj, null, 2) - } catch { - return text - } - } - - // Markdown view: if the document is represented by a top-level Markdown CodeNode, - // return its raw text content (no ```markdown fences). Otherwise, fall back to - // converting the rich document to markdown. - if (language === "markdown") { - const markdownCodeNode = root - .getChildren() - .find((n) => $isCodeNode(n) && n.getLanguage && n.getLanguage() === "markdown") - - if (markdownCodeNode) { - return markdownCodeNode.getTextContent() - } - - return $convertToMarkdownStringCustom(PLAYGROUND_TRANSFORMERS, undefined, true) - } - - // Plain text: rich text content as text - return root.getTextContent() - }) -} diff --git a/web/oss/src/components/EnhancedUIs/Drawer/index.tsx b/web/oss/src/components/EnhancedUIs/Drawer/index.tsx index 8d199c648a..3cf7c9ffe7 100644 --- a/web/oss/src/components/EnhancedUIs/Drawer/index.tsx +++ b/web/oss/src/components/EnhancedUIs/Drawer/index.tsx @@ -1,12 +1,14 @@ import {useState, useEffect} from "react" -import {Drawer} from "antd" +import dynamic from "next/dynamic" import {EnhancedDrawerProps} from "./types" -const EnhancedDrawer = ({children, closeOnLayoutClick = true, ...props}: EnhancedDrawerProps) => { +const Drawer = dynamic(() => import("antd").then((mod) => mod.Drawer), {ssr: false}) + +const EnhancedDrawer = ({children, ...props}: EnhancedDrawerProps) => { const [shouldRender, setShouldRender] = useState(false) - const {open: isVisible, onClose} = props + const {open: isVisible} = props useEffect(() => { if (isVisible) { @@ -14,24 +16,6 @@ const EnhancedDrawer = ({children, closeOnLayoutClick = true, ...props}: Enhance } }, [isVisible]) - // Effect to close drawer when outside click - useEffect(() => { - if (!shouldRender) return - - function handleClickOutside(event: MouseEvent) { - if ((event.target as HTMLElement).closest(".variant-table-row")) { - return - } else if (closeOnLayoutClick && (event.target as HTMLElement).closest(".ant-layout")) { - onClose?.({} as any) - } - } - - document.addEventListener("click", handleClickOutside) - return () => { - document.removeEventListener("click", handleClickOutside) - } - }, [shouldRender, closeOnLayoutClick, onClose]) - const handleAfterClose = (open: boolean) => { props.afterOpenChange?.(open) if (!open) { @@ -42,7 +26,7 @@ const EnhancedDrawer = ({children, closeOnLayoutClick = true, ...props}: Enhance if (!shouldRender) return null return ( - <Drawer open={isVisible} afterOpenChange={handleAfterClose} destroyOnHidden {...props}> + <Drawer open={isVisible} afterOpenChange={handleAfterClose} destroyOnClose {...props}> {children} </Drawer> ) diff --git a/web/oss/src/components/EnhancedUIs/Drawer/types.d.ts b/web/oss/src/components/EnhancedUIs/Drawer/types.d.ts index 6db8c85c64..d369f4dda1 100644 --- a/web/oss/src/components/EnhancedUIs/Drawer/types.d.ts +++ b/web/oss/src/components/EnhancedUIs/Drawer/types.d.ts @@ -2,5 +2,4 @@ import {DrawerProps} from "antd" export interface EnhancedDrawerProps extends DrawerProps { children: React.ReactNode - closeOnLayoutClick?: boolean } diff --git a/web/oss/src/components/EnhancedUIs/Modal/index.tsx b/web/oss/src/components/EnhancedUIs/Modal/index.tsx index ff7163b7d7..c17f519a24 100644 --- a/web/oss/src/components/EnhancedUIs/Modal/index.tsx +++ b/web/oss/src/components/EnhancedUIs/Modal/index.tsx @@ -27,10 +27,10 @@ const EnhancedModal = ({children, ...props}: EnhancedModalProps) => { <Modal open={isVisible} afterClose={handleAfterClose} + style={{maxHeight: "95dvh", overflowY: "auto", borderRadius: 16, ...props.style}} centered - destroyOnHidden + destroyOnClose {...props} - style={{maxHeight: "95dvh", overflowY: "auto", borderRadius: 16, ...props.style}} > {children} </Modal> diff --git a/web/oss/src/components/EnhancedUIs/Table/README.md b/web/oss/src/components/EnhancedUIs/Table/README.md deleted file mode 100644 index 172077cd5d..0000000000 --- a/web/oss/src/components/EnhancedUIs/Table/README.md +++ /dev/null @@ -1,61 +0,0 @@ -## EnhancedTable - -A powerful table component extending Ant Design's Table with enhanced features like resizable columns, collapsible groups, and virtualization. - -## Props - -- `columns`: Array of `EnhancedColumnType` (required) -- `skeletonRowCount`: Number of skeleton rows to show when loading (default: 5) -- `addNotAvailableCell`: Show not available cell for empty values (default: true) -- `virtualized`: Enable virtualized rendering (default: false) -- `uniqueKey`: Unique identifier for persisting table state (required) -- All other Ant Design Table props are supported - -## Features - -- **Resizable Columns**: Drag to resize column widths -- **Collapsible Groups**: Collapse/expand column groups -- **Aggregated Data on Collapse**: Optionally render aggregated content when columns are collapsed -- **Skeleton Loading**: Built-in loading states -- **Virtualization**: Optimized rendering for large datasets -- **Persistent State**: Saves column widths and collapse on local-storage -- **Responsive**: Adapts to container size - -## Usage - -```tsx -import {EnhancedTable} from "./EnhancedUIs/Table" - -const columns = [ - { - title: "Name", - dataIndex: "name", - width: 200, - isSkeleton: false, - // Disable not-available cell just for this column (overrides table default) - addNotAvailableCell: false, - }, - { - title: "Details", - collapsible: true, - // Enable not-available cell for the group when collapsed (inherits table default otherwise) - addNotAvailableCell: true, - // Render a summary when collapsed - renderAggregatedData: ({record}) => `Age: ${record.age}, Address: ${record.address}`, - children: [ - {title: "Age", dataIndex: "age"}, - {title: "Address", dataIndex: "address"}, - ], - }, -] - -return ( - <EnhancedTable - columns={columns} - dataSource={data} - loading={isLoading} - uniqueKey="user-table" - virtualized={true} - /> -) -``` diff --git a/web/oss/src/components/EnhancedUIs/Table/assets/CustomCells.tsx b/web/oss/src/components/EnhancedUIs/Table/assets/CustomCells.tsx deleted file mode 100644 index 970d78731f..0000000000 --- a/web/oss/src/components/EnhancedUIs/Table/assets/CustomCells.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import {memo, useEffect, useState} from "react" - -import {Skeleton} from "antd" -import clsx from "clsx" -import {Resizable} from "react-resizable" - -export const ResizableTitle = memo((props: any) => { - const {onResize, width, minWidth, ...restProps} = props - - // Local live width to avoid forcing parent re-renders on every drag frame - const [liveWidth, setLiveWidth] = useState<number | undefined>(width) - - useEffect(() => { - setLiveWidth(width) - }, [width]) - - if (!width) { - return <th {...restProps} /> - } - return ( - <Resizable - width={liveWidth ?? width} - height={0} - handle={ - <span - className="react-resizable-handle custom-resize-handle" - onClick={(e) => e.stopPropagation()} - /> - } - onResize={(e: any, data: any) => { - setLiveWidth(data.size.width) - onResize && onResize(e, data) - }} - draggableOpts={{enableUserSelectHack: false}} - > - <th - {...restProps} - style={{ - ...restProps.style, - paddingRight: 8, - minWidth: 80, - width: (liveWidth ?? width) || 160, - }} - className={clsx([restProps.className, {"select-none": onResize}])} - > - <div style={{position: "relative", width: "100%", height: "100%"}}> - {restProps.children} - </div> - </th> - </Resizable> - ) -}) - -export const SkeletonCell = memo(() => ( - <div className="min-h-[32px] flex justify-center [&_*]:!min-w-full [&_*]:!w-full [&_*]:!max-w-full"> - <Skeleton.Input active style={{minHeight: 24, margin: 0, padding: 0}} /> - </div> -)) diff --git a/web/oss/src/components/EnhancedUIs/Table/index.tsx b/web/oss/src/components/EnhancedUIs/Table/index.tsx deleted file mode 100644 index 821f61183c..0000000000 --- a/web/oss/src/components/EnhancedUIs/Table/index.tsx +++ /dev/null @@ -1,300 +0,0 @@ -import {useMemo, useCallback, useRef, type RefObject, forwardRef, JSX} from "react" -import {DownOutlined} from "@ant-design/icons" -import {Table} from "antd" -import {ColumnsType} from "antd/es/table" -import clsx from "clsx" -import {useLocalStorage, useResizeObserver} from "usehooks-ts" - -import {ResizableTitle, SkeletonCell} from "./assets/CustomCells" -import {EnhancedTableProps, EnhancedColumnType} from "./types" - -const EnhancedTableInner = <RecordType extends {key?: React.Key; isSkeleton?: boolean}>( - { - columns, - dataSource, - loading, - skeletonRowCount = 5, - addNotAvailableCell = true, - virtualized = false, - showHorizontalScrollBar = false, - uniqueKey, - ...rest - }: EnhancedTableProps<RecordType>, - ref: React.ForwardedRef<any>, -) => { - const [columnWidths, setColumnWidths] = useLocalStorage<Record<string, number>>( - `${uniqueKey}-tableColumnWidths`, - {}, - ) - const [collapsed, setCollapsed] = useLocalStorage<Record<string, boolean>>( - `${uniqueKey}-tableColumnsCollapsed`, - {}, - ) - - // Container ref used to measure available space for optional virtualization - const containerRef = useRef<HTMLDivElement | null>(null) - const {height: containerHeight, width: containerWidth} = useResizeObserver({ - // Always pass the ref object; the hook handles `current` being null - ref: containerRef as RefObject<HTMLElement>, - box: "border-box", - }) - - // Toggle the collapse state for a column group - const toggleCollapse = useCallback((key: string) => { - setCollapsed((prev) => ({...prev, [key]: !prev[key]})) - }, []) - - // Resize handler for resizable columns - const handleResize = useCallback( - (colKey: string) => - (_: any, {size}: {size: {width: number}}) => { - // Enforce minimum width of 50px - const minWidth = 50 - const newWidth = Math.max(size.width, minWidth) - setColumnWidths((widths) => ({...widths, [colKey]: newWidth})) - }, - [], - ) - - // Recursively enhance the provided columns with resizable headers, collapsible - // groups and custom cell rendering logic - const applyFeatures = useCallback( - (cols: EnhancedColumnType<RecordType>[], path: string[] = []): ColumnsType<RecordType> => { - return cols.map((col, index) => { - const key = String(col.key ?? col.dataIndex ?? [...path, index].join("-")) - - const isCollapsed = !!col.collapsible && collapsed[key] - let children = col.children?.filter(Boolean) - - let width = columnWidths[key] ?? Math.max((col.width as number) ?? 160, 80) - - const baseRender = col.render - - // Enhanced cell renderer handling skeleton rows, not available. - const render = (value: any, record: RecordType, rowIndex: number) => { - if (record.isSkeleton) { - return <SkeletonCell /> - } - const content = baseRender ? baseRender(value, record, rowIndex) : value - if (addNotAvailableCell && !content) { - return <div className="not-available-table-cell" /> - } - - if (col.collapsible) { - return ( - <div - key={key} - aria-hidden={isCollapsed} - className={clsx( - "origin-left transition-[opacity,transform] duration-300 will-change-transform", - )} - tabIndex={isCollapsed ? -1 : undefined} - > - {content} - </div> - ) - } - - return content - } - - const rawTitle = typeof col.title === "function" ? col.title({}) : col.title - - const titleContent = <span className="whitespace-nowrap">{rawTitle}</span> - - const title = col.collapsible ? ( - <span - className="cursor-pointer flex items-center gap-1 whitespace-nowrap" - onClick={(e) => { - e.stopPropagation() - toggleCollapse(key) - }} - > - <DownOutlined - className={clsx("inline-block transition-transform duration-300", { - "-rotate-90": isCollapsed, - })} - /> - <span - className={clsx( - "inline-block origin-left transition-[opacity,transform] duration-300 will-change-transform", - isCollapsed ? "scale-x-95" : "scale-x-100", - )} - > - {titleContent} - </span> - </span> - ) : ( - titleContent - ) - - if (children && children.length > 0) { - children = applyFeatures(children, [...path, String(index)]) - return { - ...col, - key, - title, - children: - col.collapsible && isCollapsed - ? [] - : children.map((child) => ({ - ...child, - width, - onHeaderCell: () => ({ - ...child.onHeaderCell, - width, - onResize: handleResize(key), - }), - })), - width, - ellipsis: true, - onHeaderCell: () => ({ - ...col.onHeaderCell, - width, - onResize: handleResize(key), - }), - render: (value: any, record: RecordType, index: number) => { - if (isCollapsed) { - if (record.isSkeleton) return <SkeletonCell /> - return col.renderAggregatedData?.({ - isSkeleton: record.isSkeleton, - isCollapsed, - record, - }) - } - return render(value, record, index) - }, - } - } - - if (col.collapsible) { - const collapsedLeaf = collapsed[key] - return { - ...col, - key, - title, - width, - ellipsis: true, - onHeaderCell: () => ({ - ...col.onHeaderCell, - width, - onResize: handleResize(key), - }), - render: (value: any, record: RecordType, index: number) => { - if (collapsedLeaf) { - if (record.isSkeleton) return <SkeletonCell /> - return col.renderAggregatedData?.({ - isSkeleton: record.isSkeleton, - isCollapsed: true, - record, - }) - } - return render(value, record, index) - }, - onCell: (record: RecordType, rowIndex: number) => { - const base = col.onCell?.(record, rowIndex) || {} - return { - ...base, - style: {...base.style, minWidth: 0, width}, - } - }, - } - } - - return { - ...col, - key, - title, - width, - ellipsis: true, - onHeaderCell: () => ({ - ...col.onHeaderCell, - width, - onResize: handleResize(key), - }), - onCell: (record: RecordType, rowIndex: number) => { - const base = col.onCell?.(record, rowIndex) || {} - return { - ...base, - style: {...base.style, minWidth: 0, width}, - } - }, - render, - } - }) as unknown as ColumnsType<RecordType> - }, - [collapsed, columnWidths, handleResize, toggleCollapse, addNotAvailableCell], - ) - - const finalColumns = useMemo(() => applyFeatures(columns, []), [columns, applyFeatures]) - - // Temporary rows shown while loading - const skeletonData = useMemo( - () => - Array.from({length: skeletonRowCount}, (_, idx) => ({ - key: `skeleton-${idx}`, - isSkeleton: true, - })) as RecordType[], - [skeletonRowCount], - ) - const data = useMemo(() => { - if (loading) { - return skeletonData - } - return dataSource - }, [loading, dataSource, skeletonData]) - - const tableLoading = useMemo(() => { - if (data === skeletonData) return false - return loading - }, [loading, data, skeletonData]) - - const virtualizationActive = virtualized - - const table = ( - <Table - {...rest} - dataSource={data} - columns={finalColumns} - loading={tableLoading} - components={{ - ...rest.components, - header: { - cell: ResizableTitle, - }, - }} - className={clsx(rest.className, "enhanced-table", { - "[&_.ant-table-tbody-virtual]:!border-0 [&_.ant-table-tbody-virtual-scrollbar]:!h-0": - !showHorizontalScrollBar, - })} - ref={ref as any} - scroll={{x: rest.scroll?.x || "max-content", y: rest.scroll?.y || containerHeight}} - sticky={virtualizationActive || rest.sticky} - virtual={virtualizationActive} - tableLayout={virtualizationActive ? "fixed" : rest.tableLayout} - pagination={false} - bordered - /> - ) - - if (virtualized) { - return ( - <div ref={containerRef} className="relative w-full flex-1 min-h-0 overflow-hidden"> - {table} - </div> - ) - } - - return table -} - -const EnhancedTable = forwardRef(EnhancedTableInner) as < - RecordType extends { - key?: React.Key - isSkeleton?: boolean - }, ->( - props: EnhancedTableProps<RecordType> & {ref?: React.Ref<any>}, -) => JSX.Element - -export default EnhancedTable diff --git a/web/oss/src/components/EnhancedUIs/Table/types.ts b/web/oss/src/components/EnhancedUIs/Table/types.ts deleted file mode 100644 index f59a4d7bee..0000000000 --- a/web/oss/src/components/EnhancedUIs/Table/types.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {TableProps, ColumnType, ColumnGroupType} from "antd/es/table" -import {ReactNode} from "react" - -/** - * Props for the renderAggregatedData function - */ -export interface RenderAggregatedDataParams<RecordType = any> { - isSkeleton: boolean - isCollapsed: boolean - record: RecordType -} - -/** - * Enhanced column type that extends Ant Design's ColumnType with additional features - */ -export type EnhancedColumnType<RecordType = any> = Omit<ColumnType<RecordType>, "children"> & { - /** Nested columns for grouped headers */ - children?: EnhancedColumnType<RecordType>[] - - /** If true, this column group can be collapsed */ - collapsible?: boolean - - /** - * Whether to show the not-available cell for empty values on this column. - * Defaults to inheriting from table-level `addNotAvailableCell` (which defaults to true). - */ - addNotAvailableCell?: boolean - - /** Minimum width used when resizing */ - minWidth?: number - - /** Whether the column should be hidden by default in `EditColumns` */ - defaultHidden?: boolean - - key?: string - - /** - * Function to render aggregated data for the column. - * This will work when the column is collapsed. - */ - renderAggregatedData?: (params: RenderAggregatedDataParams<RecordType>) => ReactNode -} - -/** - * Type guard to check if a column is a column group - */ -export function isColumnGroup<RecordType>( - column: EnhancedColumnType<RecordType>, -): column is EnhancedColumnType<RecordType> & {children: EnhancedColumnType<RecordType>[]} { - return !!(column as any).children -} - -// Props for the `EnhancedTable` component -export interface EnhancedTableProps<RecordType> extends Omit<TableProps<RecordType>, "columns"> { - columns: EnhancedColumnType<RecordType>[] - /** Number of skeleton rows to show when loading and no data */ - skeletonRowCount?: number - /** Show not available cell for empty values. Defaults to true */ - addNotAvailableCell?: boolean - /** Enable virtualized rendering. Defaults to false */ - virtualized?: boolean - /** Unique key for the table */ - uniqueKey: string - /** Whether to show horizontal scrollbar */ - showHorizontalScrollBar?: boolean -} diff --git a/web/oss/src/components/ErrorState/index.tsx b/web/oss/src/components/ErrorState/index.tsx deleted file mode 100644 index 9c5b115455..0000000000 --- a/web/oss/src/components/ErrorState/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import {Result, Button} from "antd" -import type {FC} from "react" - -interface ErrorStateProps { - title?: string - subtitle?: string - status?: "error" | "warning" | "info" | "500" - onRetry?: () => void -} - -const ErrorState: FC<ErrorStateProps> = ({ - title = "Something went wrong", - subtitle = "Please try again", - status = "error", - onRetry, -}) => { - return ( - <Result - status={status} - title={title} - subTitle={subtitle} - extra={ - onRetry ? ( - <Button type="primary" onClick={onRetry} data-testid="error-retry"> - Retry - </Button> - ) : null - } - /> - ) -} - -export default ErrorState diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/AutoEvalRunSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/AutoEvalRunSkeleton.tsx deleted file mode 100644 index 06f82f0a14..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/AutoEvalRunSkeleton.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import {memo} from "react" - -import {useRouter} from "next/router" - -import EvalRunOverviewViewerSkeleton from "../../components/EvalRunOverviewViewer/assets/EvalRunOverviewViewerSkeleton" -import EvalRunHeaderSkeleton from "../components/EvalRunHeader/assets/EvalRunHeaderSkeleton" -import EvalRunPromptConfigViewerSkeleton from "../components/EvalRunPromptConfigViewer/assets/EvalRunPromptConfigViewerSkeleton" -import EvalRunTestcaseViewerSkeleton from "../components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton" - -const AutoEvalRunSkeleton = () => { - const router = useRouter() - const viewType = router.query.view as string - - return ( - <section className="flex flex-col w-full h-[calc(100vh-84px)] gap-2 overflow-auto"> - <EvalRunHeaderSkeleton /> - {viewType === "testcases" ? ( - <EvalRunTestcaseViewerSkeleton /> - ) : viewType === "prompt" ? ( - <EvalRunPromptConfigViewerSkeleton /> - ) : ( - <EvalRunOverviewViewerSkeleton className="px-6" /> - )} - </section> - ) -} - -export default memo(AutoEvalRunSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/EvalNameTag.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/EvalNameTag.tsx deleted file mode 100644 index 9c964e467b..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/EvalNameTag.tsx +++ /dev/null @@ -1,298 +0,0 @@ -import {useCallback, useMemo} from "react" - -import {Star, XCircle} from "@phosphor-icons/react" -import {Button, Popover, PopoverProps, Tag, TagProps, Tooltip} from "antd" -import clsx from "clsx" -import {useAtom} from "jotai" -import {useRouter} from "next/router" - -import TooltipWithCopyAction from "@/oss/components/TooltipWithCopyAction" -import UserAvatarTag from "@/oss/components/ui/UserAvatarTag" -import {EnrichedEvaluationRun} from "@/oss/lib/hooks/usePreviewEvaluations/types" - -import {urlStateAtom} from "../../state/urlState" - -import TagWithLink from "./TagWithLink" -import VariantTag from "./VariantTag" -import { - combineAppNameWithLabel, - deriveVariantAppName, - deriveVariantLabelParts, - getVariantDisplayMetadata, - normalizeId, - prettifyVariantLabel, -} from "./variantUtils" - -interface EvalNameTagProps extends TagProps { - run: EnrichedEvaluationRun - showClose?: boolean - showPin?: boolean - isBaseEval?: boolean - onlyShowBasePin?: boolean - popoverProps?: PopoverProps - allowVariantNavigation?: boolean - appContext?: { - appId?: string - appName?: string - variantName?: string - revisionLabel?: string - isOnlineEval?: boolean - } -} -const EvalNameTag = ({ - run, - showClose = false, - showPin = false, - isBaseEval = false, - onlyShowBasePin = false, - className, - popoverProps, - allowVariantNavigation = true, - appContext, - ...props -}: EvalNameTagProps) => { - const router = useRouter() - const normalizedRouteAppId = useMemo( - () => normalizeId(router.query.app_id as string | undefined), - [router.query.app_id], - ) - const [urlState, setUrlState] = useAtom(urlStateAtom) - - const onClose = useCallback( - async (runId: string) => { - const compareRunIds = urlState.compare || [] - const updatedRuns = compareRunIds.filter((id) => id !== runId) - - await router.replace( - { - pathname: router.pathname, - query: {...router.query, compare: updatedRuns}, - }, - undefined, - {shallow: true}, - ) - - setUrlState((draft) => { - draft.compare = updatedRuns.length > 0 ? updatedRuns : undefined - }) - }, - [urlState, router, setUrlState], - ) - - const onPin = useCallback(async () => { - const currentBaseId = router.query.evaluation_id?.toString() - const compareRunIds = urlState.compare || [] - const targetId = run.id - - if (!currentBaseId || targetId === currentBaseId) return - const targetIndex = compareRunIds.indexOf(targetId) - if (targetIndex === -1) return - - const updatedCompare = [...compareRunIds] - updatedCompare[targetIndex] = currentBaseId - - await router.replace( - { - pathname: router.pathname, - query: { - ...router.query, - evaluation_id: targetId, - compare: updatedCompare, - }, - }, - undefined, - {shallow: true}, - ) - setUrlState((draft) => { - draft.compare = updatedCompare - }) - }, [urlState, router, run?.id, setUrlState]) - - return ( - <Popover - {...popoverProps} - arrow - classNames={{body: "!p-0 shrink-0 w-[280px]"}} - mouseEnterDelay={0.3} - content={ - <section className="w-full"> - <div className="flex items-center justify-between p-3 border-0 border-b border-solid border-[#0517290F]"> - <span className="w-[75%] truncate text-nowrap">{run?.name}</span> - <div className="flex gap-1 shrink-0"> - {showPin && ( - <Tooltip title={isBaseEval ? "Base eval" : "Select as base eval"}> - <Button - size="small" - type="text" - icon={<Star size={14} className="mt-[1px]" />} - disabled={isBaseEval} - onClick={onPin} - /> - </Tooltip> - )} - {showClose && !isBaseEval && ( - <Tooltip title="Remove"> - <Button - size="small" - type="text" - danger - icon={<XCircle size={14} className="mt-[1px]" />} - onClick={() => onClose(run.id)} - /> - </Tooltip> - )} - </div> - </div> - <div className="p-3 flex flex-col gap-2"> - <div className="w-full flex items-center justify-between"> - <span>ID</span> - <TooltipWithCopyAction copyText={run?.id!} title="Copy ID"> - <Tag - bordered={false} - className="bg-[#0517290F] hover:bg-[#05172916]" - > - {run?.id - ? run?.id.split("-")[run?.id.split("-").length - 1] - : ""} - </Tag> - </TooltipWithCopyAction> - </div> - {appContext?.isOnlineEval ? null : ( - <div className="w-full flex items-center justify-between"> - <span>Testset</span> - <TagWithLink - name={run?.testsets?.[0]?.name} - href={run?.testsets?.[0]?.id} - className="[&_span]:truncate [&_span]:max-w-[150px]" - /> - </div> - )} - {appContext && appContext.appId ? ( - <div className="w-full flex items-start justify-between"> - <span>Application</span> - <TooltipWithCopyAction - copyText={appContext.appId} - title="Copy app ID" - className="max-w-[180px]" - > - <span className="truncate text-[#051729]"> - {appContext.appName || appContext.appId} - </span> - </TooltipWithCopyAction> - </div> - ) : null} - {run?.variants?.length || appContext?.variantName ? ( - <div className="w-full flex items-center justify-between"> - <span>Variant</span> - {run?.variants && run?.variants.length > 0 ? ( - (() => { - const variant: any = run?.variants[0] - const summary = getVariantDisplayMetadata(variant) - const {label: formattedLabel, revision: labelRevision} = - deriveVariantLabelParts({ - variant, - displayLabel: summary.label, - }) - const resolvedAppName = - deriveVariantAppName({ - variant, - fallbackAppName: - run?.appName || - (run as any)?.app_name || - (run as any)?.app?.name, - }) ?? run?.appName - - const prettyLabel = combineAppNameWithLabel( - resolvedAppName, - prettifyVariantLabel(formattedLabel) ?? formattedLabel, - ) - - const candidateRevisionId = - summary.revisionId || - normalizeId(variant?.id) || - normalizeId(variant?.variantId) - const candidateAppId = normalizeId( - variant?.appId || - (variant as any)?.app_id || - run?.appId || - (run as any)?.app_id, - ) - - const resolvedAppId = candidateAppId || normalizedRouteAppId - const blockedByRuntime = - Boolean(normalizedRouteAppId) && - resolvedAppId === normalizedRouteAppId && - summary.hasRuntime === false - - const canNavigate = - allowVariantNavigation && - Boolean(candidateRevisionId && resolvedAppId) && - summary.isHealthy !== false && - !blockedByRuntime - - return ( - <VariantTag - variantName={prettyLabel} - revision={labelRevision ?? variant?.revision} - id={candidateRevisionId} - disabled={!canNavigate} - enrichedRun={run} - variant={variant} - className="[&_span]:truncate [&_span]:max-w-[150px]" - /> - ) - })() - ) : ( - <span className="text-sm text-[#051729]"> - {appContext?.variantName} - {appContext?.revisionLabel - ? ` v${appContext.revisionLabel}` - : ""} - </span> - )} - </div> - ) : null} - <div className="w-full flex items-center justify-between"> - <span>Created on</span> - <span>{run?.createdAt}</span> - </div> - {!!run?.createdBy?.user?.username && ( - <div className="w-full flex items-center justify-between"> - <span>Created by</span> - <UserAvatarTag modifiedBy={run?.createdBy?.user?.username || ""} /> - </div> - )} - </div> - </section> - } - > - <Tag className={clsx("flex items-center gap-1 w-fit", className)} {...props}> - {showPin && ( - <Tooltip title={isBaseEval ? "Base eval" : "Select as base eval"}> - <Star - size={12} - onClick={onPin} - className={ - isBaseEval ? "cursor-default shrink-0" : "cursor-pointer shrink-0" - } - weight={isBaseEval ? "fill" : "regular"} - fillOpacity={isBaseEval ? 0.9 : 1} - /> - </Tooltip> - )} - <span className="truncate">{run?.name}</span> - {showClose && !isBaseEval && ( - <Tooltip title="Remove"> - <XCircle - className="cursor-pointer ml-0.5 shrink-0" - size={12} - onClick={() => onClose(run.id)} - /> - </Tooltip> - )} - </Tag> - </Popover> - ) -} - -export default EvalNameTag diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/TagWithLink.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/TagWithLink.tsx deleted file mode 100644 index 254c78476f..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/TagWithLink.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import {ArrowSquareOut} from "@phosphor-icons/react" -import {Tag, TagProps} from "antd" -import clsx from "clsx" -import {useRouter} from "next/router" - -interface TagWithLinkProps extends TagProps { - name: string - href: string - showIcon?: boolean -} -const TagWithLink = ({name, href, className, showIcon = true, ...props}: TagWithLinkProps) => { - const router = useRouter() - return ( - <Tag - bordered={false} - className={clsx( - "flex items-center gap-1 bg-[#0517290F] hover:bg-[#05172916] w-fit cursor-pointer group", - className, - )} - onClick={() => router.push(href)} - {...props} - > - <span>{name}</span> - {showIcon && ( - <ArrowSquareOut - size={14} - className="transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" - /> - )} - </Tag> - ) -} - -export default TagWithLink diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/VariantTag.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/VariantTag.tsx deleted file mode 100644 index 8d750d6527..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/VariantTag.tsx +++ /dev/null @@ -1,274 +0,0 @@ -import {useMemo} from "react" - -import {ArrowSquareOut} from "@phosphor-icons/react" -import {useQueryClient} from "@tanstack/react-query" -import {Skeleton, Tag} from "antd" -import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" -import {useRouter} from "next/router" - -import useURL from "@/oss/hooks/useURL" -import {buildRevisionsQueryParam} from "@/oss/lib/helpers/url" -import {runIndexFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import type {EnrichedEvaluationRun} from "@/oss/lib/hooks/usePreviewEvaluations/types" -import { - appDetailQueryAtomFamily, - currentAppContextAtom, - recentAppIdAtom, - routerAppIdAtom, -} from "@/oss/state/app" - -import { - combineAppNameWithLabel, - deriveVariantAppName, - deriveVariantLabelParts, - getVariantDisplayMetadata, - normalizeId, - normalizeLabel, -} from "./variantUtils" - -interface VariantTagProps { - variantName?: string - revision?: number | string - id?: string | null - className?: string - isLoading?: boolean - disabled?: boolean - isDeleted?: boolean - enrichedRun?: EnrichedEvaluationRun - variant?: any -} - -const VariantTag = ({ - variantName, - revision, - id, - className, - isLoading, - disabled = false, - isDeleted = false, - enrichedRun, - variant, -}: VariantTagProps) => { - const router = useRouter() - const queryClient = useQueryClient() - const setRouterAppId = useSetAtom(routerAppIdAtom) - const setRecentAppId = useSetAtom(recentAppIdAtom) - const routeAppId = normalizeId(router.query.app_id as string | undefined) - const {baseAppURL} = useURL() - const app = useAtomValue(appDetailQueryAtomFamily(enrichedRun?.appId || null)) - const variantsFromRun = useMemo(() => { - if (enrichedRun?.variants && Array.isArray(enrichedRun.variants)) { - return enrichedRun.variants as any[] - } - return [] - }, [enrichedRun]) - - const normalizedTargetId = useMemo(() => normalizeId(id), [id]) - const normalizedTargetName = useMemo(() => normalizeLabel(variantName), [variantName]) - - const variantFromRun = useMemo(() => { - if (!variantsFromRun.length) return undefined - - const match = variantsFromRun.find((candidate: any) => { - const candidateIds = [ - normalizeId(candidate?._revisionId), - normalizeId(candidate?.id), - normalizeId(candidate?.variantId), - normalizeId(candidate?.revisionId), - ].filter(Boolean) as string[] - - if (normalizedTargetId && candidateIds.includes(normalizedTargetId)) { - return true - } - - if (normalizedTargetName) { - const candidateNames = [ - normalizeLabel(candidate?.variantName), - normalizeLabel(candidate?.configName), - normalizeLabel(candidate?.name), - normalizeLabel(candidate?.variantId), - ].filter(Boolean) as string[] - if (candidateNames.includes(normalizedTargetName)) { - return true - } - } - - return false - }) - - return match ?? variantsFromRun[0] - }, [variantsFromRun, normalizedTargetId, normalizedTargetName]) - - const resolvedVariant = useMemo(() => { - if (variant) { - if (variantFromRun) { - return { - ...variantFromRun, - ...variant, - } - } - return variant - } - return variantFromRun - }, [variant, variantFromRun]) - - const baseLabel = - normalizeLabel(variantName) ?? - normalizeLabel(resolvedVariant?.variantName) ?? - normalizeLabel(resolvedVariant?.name) ?? - "Variant unavailable" - - const display = useMemo( - () => - getVariantDisplayMetadata(resolvedVariant, { - fallbackLabel: normalizedTargetName ?? baseLabel, - fallbackRevisionId: normalizedTargetId, - requireRuntime: false, - }), - [resolvedVariant, normalizedTargetName, baseLabel, normalizedTargetId], - ) - - const {label: preferredLabel, revision: labelRevision} = useMemo( - () => - deriveVariantLabelParts({ - variant: resolvedVariant, - displayLabel: display.label ?? baseLabel, - }), - [resolvedVariant, display.label, baseLabel], - ) - - const variantAppName = useMemo( - () => - deriveVariantAppName({ - variant: resolvedVariant, - fallbackAppName: - (resolvedVariant as any)?.appName ?? - (resolvedVariant as any)?.application?.name ?? - (resolvedVariant as any)?.baseName ?? - enrichedRun?.appName ?? - (enrichedRun as any)?.app_name ?? - (enrichedRun as any)?.app?.name, - }), - [resolvedVariant, enrichedRun], - ) - - const variantAppId = useMemo( - () => - normalizeId( - (resolvedVariant as any)?.appId ?? - (resolvedVariant as any)?.app_id ?? - (resolvedVariant as any)?.application?.id ?? - (resolvedVariant as any)?.application_id ?? - (resolvedVariant as any)?.application_ref?.id ?? - (resolvedVariant as any)?.applicationRef?.id, - ), - [resolvedVariant], - ) - - const runAppId = useMemo( - () => - normalizeId( - (enrichedRun as any)?.appId ?? - (enrichedRun as any)?.app_id ?? - (enrichedRun as any)?.app?.id ?? - (enrichedRun as any)?.application?.id, - ), - [enrichedRun], - ) - - const targetAppId = variantAppId || runAppId || routeAppId - const resolvedLabel = isDeleted - ? "Variant deleted" - : combineAppNameWithLabel(variantAppName, preferredLabel) - - const derivedRevisionId = display.revisionId - const selectedRevisionId = derivedRevisionId || normalizedTargetId - - const derivedRevision = useMemo(() => { - if (revision !== undefined && revision !== null && revision !== "") { - return revision - } - const candidate: any = resolvedVariant - const fromVariant = - candidate?.revision ?? - candidate?.revisionLabel ?? - candidate?.version ?? - candidate?._revision ?? - undefined - if ( - fromVariant !== undefined && - fromVariant !== null && - String(fromVariant).toString().trim() !== "" - ) { - return fromVariant - } - return labelRevision ?? "" - }, [resolvedVariant, revision, labelRevision]) - - const hasValidRevision = Boolean(selectedRevisionId || labelRevision) - const isRouteAppContext = Boolean(routeAppId) && targetAppId === routeAppId - const blockedByRuntime = isRouteAppContext && display.hasRuntime === false - - const canNavigate = - app?.data?.app_type !== "custom (sdk)" && - !isDeleted && - Boolean(targetAppId) && - hasValidRevision && - display.isHealthy !== false && - !blockedByRuntime - const effectiveDisabled = Boolean(disabled) || isDeleted || !canNavigate - - const hasRevision = - derivedRevision !== undefined && - derivedRevision !== null && - String(derivedRevision).toString().trim() !== "" - - return ( - <Tag - bordered={false} - className={clsx( - "flex items-center gap-2 bg-[#0517290F] hover:bg-[#05172916] w-fit", - effectiveDisabled ? "cursor-default" : "cursor-pointer group", - className, - )} - onClick={async () => { - if (effectiveDisabled || !selectedRevisionId || !targetAppId) return - setRouterAppId(targetAppId) - setRecentAppId(targetAppId) - - queryClient.removeQueries({queryKey: ["variants"]}) - queryClient.removeQueries({queryKey: ["appSpec"]}) - queryClient.removeQueries({queryKey: ["variantRevisions"]}) - - await router.push({ - pathname: `${baseAppURL}/${targetAppId}/playground`, - query: { - revisions: buildRevisionsQueryParam([selectedRevisionId]), - }, - }) - }} - > - <span> - {resolvedLabel} - {hasRevision ? ` v${derivedRevision}` : ""} - </span> - {!effectiveDisabled && ( - <ArrowSquareOut - size={14} - className="transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" - /> - )} - </Tag> - ) -} - -const VariantTagRouter = ({isLoading, ...props}: VariantTagProps) => { - if (isLoading) { - return <Skeleton.Input active className="!w-[90px] !h-[22px]" /> - } else { - return <VariantTag {...props} /> - } -} - -export default VariantTagRouter diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/types.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/types.ts deleted file mode 100644 index 4ea6eca05b..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface AutoEvalRunDetailsProps { - name: string - description: string - id: string - isLoading: boolean -} -export type ViewOptionsType = "overview" | "testcases" diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/utils.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/utils.ts deleted file mode 100644 index 4808772970..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/utils.ts +++ /dev/null @@ -1,52 +0,0 @@ -import {canonicalizeMetricKey, getMetricDisplayName} from "@/oss/lib/metricUtils" - -export const formatMetricName = (name: string) => { - const canonical = canonicalizeMetricKey(name) - - // Prefer rich labels for well-known invocation metrics - if (canonical.startsWith("attributes.ag.metrics.")) { - return getMetricDisplayName(canonical) - } - - if (canonical.startsWith("attributes.ag.")) { - const tail = canonical.split(".").pop() ?? canonical - return tail - .replace(/[_.-]/g, " ") - .replace(/\s+/g, " ") - .trim() - .replace(/\b\w/g, (c) => c.toUpperCase()) - } - - const formattedName = canonical - .replace(/[_.]/g, " ") - .replace(/([A-Z])/g, " $1") - .trim() - .toLocaleLowerCase() - - if (formattedName === "duration") return "Latency" - if (formattedName.includes("cost")) return "Cost" - return formattedName -} - -export const EVAL_TAG_COLOR = { - 1: "blue", - 2: "orange", - 3: "purple", - 4: "cyan", - 5: "lime", -} -export const EVAL_BG_COLOR = { - 1: "rgba(230, 244, 255, 0.5)", - 2: "rgba(255, 242, 232, 0.5)", - 3: "rgba(249, 240, 255, 0.5)", - 4: "rgba(230, 255, 251, 0.5)", - 5: "rgba(255, 255, 230, 0.5)", -} - -export const EVAL_COLOR = { - 1: "rgba(145, 202, 255, 1)", - 2: "rgba(255, 187, 150, 1)", - 3: "rgba(211, 173, 247, 1)", - 4: "rgba(135, 232, 222, 1)", - 5: "rgba(200, 240, 150, 1)", -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/variantUtils.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/variantUtils.ts deleted file mode 100644 index 4531649740..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/assets/variantUtils.ts +++ /dev/null @@ -1,170 +0,0 @@ -export const normalizeId = (value: unknown): string | undefined => { - if (value === undefined || value === null) return undefined - const stringValue = String(value) - if ( - stringValue.trim() === "" || - stringValue === "undefined" || - stringValue === "null" || - stringValue === "[object Object]" || - stringValue === "NaN" - ) { - return undefined - } - return stringValue -} - -export const normalizeLabel = (value: unknown): string | undefined => { - if (typeof value !== "string") return undefined - const trimmed = value.trim() - return trimmed.length > 0 ? trimmed : undefined -} - -export interface VariantDisplayOptions { - fallbackLabel?: string - fallbackRevisionId?: string - /** When true (default), navigation requires a runtime endpoint */ - requireRuntime?: boolean -} - -export interface VariantDisplayMetadata { - label: string - revisionId: string - isHealthy: boolean - hasRuntime: boolean - canNavigate: boolean -} - -export const getVariantDisplayMetadata = ( - variant: any, - {fallbackLabel, fallbackRevisionId, requireRuntime = true}: VariantDisplayOptions = {}, -): VariantDisplayMetadata => { - const label = - normalizeLabel(variant?.variantName) ?? - normalizeLabel(variant?.configName) ?? - normalizeLabel(variant?.name) ?? - normalizeLabel(variant?.variantId) ?? - normalizeLabel(fallbackLabel) ?? - "Variant unavailable" - - const revisionId = - normalizeId(variant?._revisionId) ?? - normalizeId(variant?.id) ?? - normalizeId(variant?.variantId) ?? - normalizeId(variant?.revisionId) ?? - normalizeId(fallbackRevisionId) ?? - "" - - const hasRuntime = Boolean( - variant?.uri || - variant?.uriObject?.runtimePrefix || - variant?.runtime?.uri || - variant?.runtime?.runtimePrefix, - ) - const isHealthy = variant?.appStatus !== false - - const canNavigate = Boolean(revisionId) && isHealthy && (requireRuntime ? hasRuntime : true) - - return { - label, - revisionId, - isHealthy, - hasRuntime, - canNavigate, - } -} - -const HEX_SEGMENT_REGEX = /^[0-9a-f]{8,}$/i - -export const prettifyVariantLabel = (label?: string): string | undefined => { - if (!label) return label - const parts = label.split("-") - if (parts.length <= 1) { - return label - } - - const last = parts[parts.length - 1] - if (HEX_SEGMENT_REGEX.test(last)) { - return parts.slice(0, -1).join("-") - } - - return label -} - -export const deriveVariantLabelParts = ({ - variant, - displayLabel, -}: { - variant?: any - displayLabel?: string -}): {label: string; revision?: string} => { - const normalizedVariantLabel = - normalizeLabel(variant?.variantName) ?? - normalizeLabel(variant?.configName) ?? - normalizeLabel(variant?.name) ?? - undefined - - const normalizedVariantId = normalizeLabel(variant?.variantId) - - const rawLabel = normalizedVariantLabel ?? normalizedVariantId ?? displayLabel ?? "Variant" - const trimmed = prettifyVariantLabel(rawLabel) ?? rawLabel - - const primaryRevision = - variant?.revision ?? - variant?.revisionLabel ?? - variant?.version ?? - variant?._revision ?? - undefined - - if ( - primaryRevision !== undefined && - primaryRevision !== null && - String(primaryRevision).toString().trim() !== "" - ) { - return {label: trimmed, revision: String(primaryRevision)} - } - - const segments = trimmed.split("-") - if (segments.length > 1) { - const last = segments[segments.length - 1] - if (/^\d+$/.test(last)) { - const base = segments.slice(0, -1).join("-") || segments.join("-") - return {label: base, revision: last} - } - } - - return {label: trimmed, revision: undefined} -} - -export const deriveVariantAppName = ({ - variant, - fallbackAppName, -}: { - variant?: any - fallbackAppName?: string -}): string | undefined => { - return ( - normalizeLabel(variant?.appName) ?? - normalizeLabel(variant?.application?.name) ?? - normalizeLabel(variant?.application?.appName) ?? - normalizeLabel(variant?.application_ref?.name) ?? - normalizeLabel(variant?.applicationRef?.name) ?? - normalizeLabel(fallbackAppName) - ) -} - -export const combineAppNameWithLabel = (appName: string | undefined, label?: string): string => { - const normalizedLabel = label?.trim() - const normalizedApp = normalizeLabel(appName) - - if (!normalizedLabel || normalizedLabel.length === 0) { - return normalizedApp ?? "Variant unavailable" - } - - if (!normalizedApp) { - return normalizedLabel - } - - return normalizedLabel.toLowerCase().startsWith(normalizedApp.toLowerCase()) - ? normalizedLabel - : `${normalizedApp} ${normalizedLabel}` -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunCompareMenu/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunCompareMenu/index.tsx deleted file mode 100644 index 0c85b4c5dd..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunCompareMenu/index.tsx +++ /dev/null @@ -1,272 +0,0 @@ -import {memo, useCallback, useEffect, useMemo, useRef, useState} from "react" - -import {Check, Plus} from "@phosphor-icons/react" -import {Button, ButtonProps, Input, Popover, PopoverProps, Typography, Tag, message} from "antd" -import clsx from "clsx" -import {useAtom, useAtomValue} from "jotai" -import {useRouter} from "next/router" -import {useLocalStorage} from "usehooks-ts" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import useFocusInput from "@/oss/hooks/useFocusInput" -import {EvaluationType} from "@/oss/lib/enums" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import usePreviewEvaluations from "@/oss/lib/hooks/usePreviewEvaluations" -import {EnrichedEvaluationRun} from "@/oss/lib/hooks/usePreviewEvaluations/types" - -import {urlStateAtom} from "../../../state/urlState" - -const filters = ["all", "success", "failed"] -const failedFilters = ["errors", "error", "failed", "failure"] - -const EvalRunCompareMenu = ({ - popoverProps, - buttonProps, - disabled = false, -}: { - popoverProps?: PopoverProps - buttonProps?: ButtonProps - disabled?: boolean -}) => { - const [isMenuOpen, setIsMenuOpen] = useState(false) - const [searchTerm, setSearchTerm] = useState("") - const [filter, setFilter] = useLocalStorage("eval-compare-popup-filter", "") - const {inputRef} = useFocusInput({isOpen: isMenuOpen}) - const router = useRouter() - const runId = useRunId() - // Use ref to track previous compareRunIds to avoid infinite loops - const prevCompareRunIdsRef = useRef<string[]>([]) - - // atoms - const evaluation = useAtomValue(evaluationRunStateFamily(runId!)) - const [urlState, setUrlState] = useAtom(urlStateAtom) - const enrichedRun = evaluation?.enrichedRun - const compareRunIds = urlState.compare || [] - - const derivedAppId = useMemo(() => { - return enrichedRun?.appId ?? enrichedRun?.variants?.[0]?.appId ?? undefined - }, [enrichedRun]) - - const {runs: projectRuns} = usePreviewEvaluations({ - skip: false, - types: [EvaluationType.auto_exact_match], - appId: "", - }) - - const {runs: appRuns} = usePreviewEvaluations({ - skip: false, - types: [EvaluationType.auto_exact_match], - appId: derivedAppId, - }) - - const runs = (projectRuns.length ? projectRuns : appRuns) as EnrichedEvaluationRun[] - - // Track compare ids locally to avoid redundant work; do not overwrite urlState - useEffect(() => { - const prevIds = prevCompareRunIdsRef.current - const currentIds = compareRunIds - const isDifferent = - prevIds.length !== currentIds.length || - prevIds.some((id, index) => id !== currentIds[index]) - - if (isDifferent) { - prevCompareRunIdsRef.current = [...compareRunIds] - } - }, [compareRunIds]) - - const resolveTestsetIds = useCallback((run?: EnrichedEvaluationRun | null) => { - if (!run) return new Set<string>() - const ids = new Set<string>() - ;(run.testsets ?? []).forEach((testset) => { - if (testset?.id) ids.add(testset.id) - }) - ;(run.data?.steps ?? []).forEach((step) => { - const id = step?.references?.testset?.id - if (id) ids.add(id) - }) - return ids - }, []) - - const evaluations = useMemo(() => { - const baseIds = resolveTestsetIds(enrichedRun) - const baseIdList = Array.from(baseIds) - - const matchedTestsetEvals = runs.filter((run) => { - if (!baseIds.size) return false - const runIds = resolveTestsetIds(run) - return baseIdList.some((id) => runIds.has(id)) - }) - - const evals = matchedTestsetEvals.filter((run) => run?.id !== enrichedRun?.id) - - const autoEvals = evals?.filter( - (run) => - run?.data?.steps.every( - (step) => step?.type !== "annotation" || step?.origin === "auto", - ) && !run?.flags?.is_live, - ) - - return autoEvals - }, [runs, enrichedRun, resolveTestsetIds]) - - const filteredEvals = useMemo(() => { - if (searchTerm.trim().length > 0) { - return evaluations.filter((e) => - e?.name.toLowerCase().includes(searchTerm.toLowerCase()), - ) - } - - if (filter === "success") { - return evaluations.filter((e) => e.status === filter) - } - - if (filter === "failed") { - return evaluations.filter((e) => failedFilters.includes(e.status)) - } - - return evaluations - }, [searchTerm, evaluations, filter]) - - const onMutateRun = useCallback( - async (runId: string) => { - if (compareRunIds.includes(runId)) { - const updatedRuns = compareRunIds.filter((id) => id !== runId) - await router.replace( - { - pathname: router.pathname, - query: {...router.query, compare: updatedRuns}, - }, - undefined, - {shallow: true}, - ) - setUrlState((draft) => { - draft.compare = updatedRuns.length > 0 ? updatedRuns : undefined - }) - } else { - if (compareRunIds.length === 4) { - message.info("You can only compare up to 5 runs") - return - } - await router.replace( - { - pathname: router.pathname, - query: {...router.query, compare: [...compareRunIds, runId]}, - }, - undefined, - {shallow: true}, - ) - setUrlState((draft) => { - draft.compare = [...compareRunIds, runId] - }) - } - }, - [compareRunIds], - ) - - return ( - <Popover - open={isMenuOpen} - onOpenChange={setIsMenuOpen} - classNames={{body: "!px-0 !py-2"}} - trigger={["click"]} - arrow={false} - content={ - <section className="flex flex-col gap-2 w-[400px]"> - <div className="flex flex-col gap-0.5 border-0 border-b border-solid border-[#EAEFF5]"> - <div className="flex items-center gap-2 justify-between px-2"> - <Typography.Text className="font-medium"> - Add evaluations using testset: - </Typography.Text> - <Tag bordered={false} className="bg-[#0517290F]"> - {enrichedRun?.testsets?.[0]?.name} - </Tag> - </div> - - <Input - ref={inputRef} - placeholder="Search" - variant="borderless" - className="rounded-none py-2" - value={searchTerm} - onChange={(e) => setSearchTerm(e.target.value)} - /> - </div> - - <div className="flex items-center gap-1 px-3"> - <span>Filters:</span> - - {filters.map((f) => ( - <Button - key={f} - size="small" - type={(filter || "all") === f ? "default" : "text"} - className="capitalize !py-0" - onClick={() => setFilter(f)} - > - {f} - </Button> - ))} - </div> - - {filteredEvals?.length > 0 ? ( - <div className="flex flex-col gap-0.5 px-1 max-h-[220px] overflow-y-scroll"> - {filteredEvals?.map((evaluation) => ( - <div - key={evaluation.id} - className={clsx([ - "flex flex-col items-center justify-between gap-1 px-2 py-1.5 rounded-md hover:bg-[#eaeff542] duration-200 cursor-pointer", - {"bg-[#eaeff550]": compareRunIds.includes(evaluation.id)}, - ])} - onClick={() => onMutateRun(evaluation.id)} - > - <div className="w-full flex items-center justify-between"> - <Typography.Text - className="w-[70%] truncate" - title={evaluation.name} - > - {evaluation.name} - </Typography.Text> - - <div className="flex items-center gap-2"> - <Typography.Text className="flex items-center gap-1 text-nowrap"> - {evaluation.variants?.[0]?.variantName || "-"} - <Tag bordered={false} className="bg-[#0517290F]"> - v{evaluation.variants?.[0]?.revision || "0"} - </Tag> - </Typography.Text> - {compareRunIds?.includes(evaluation.id) ? ( - <Check size={14} /> - ) : null} - </div> - </div> - <div className="w-full flex items-center justify-between"> - <Typography.Text - type="secondary" - className="w-[70%] truncate" - > - {evaluation.description || "No description"} - </Typography.Text> - <Typography.Text type="secondary" className="text-nowrap"> - {evaluation.createdAt} - </Typography.Text> - </div> - </div> - ))} - </div> - ) : ( - <div className="w-full flex items-center justify-center h-[100px]"> - <Typography.Text type="secondary">No evaluations found</Typography.Text> - </div> - )} - </section> - } - {...popoverProps} - > - <Button icon={<Plus size={14} />} {...buttonProps} disabled={disabled}> - Compare - </Button> - </Popover> - ) -} - -export default memo(EvalRunCompareMenu) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunOutput.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunOutput.tsx deleted file mode 100644 index e315d4b6ab..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunOutput.tsx +++ /dev/null @@ -1,181 +0,0 @@ -import {useMemo} from "react" - -import clsx from "clsx" -import {useAtomValue} from "jotai" - -import SimpleSharedEditor from "@/oss/components/EditorViews/SimpleSharedEditor" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {useInvocationResult} from "@/oss/lib/hooks/useInvocationResult" - -const parseMaybeJson = (value: unknown): any => { - if (typeof value !== "string") return value - try { - return JSON.parse(value) - } catch { - return value - } -} - -const isPlainObject = (value: unknown): value is Record<string, any> => { - return typeof value === "object" && value !== null && !Array.isArray(value) -} - -const KNOWN_OUTPUT_KEYS = [ - "outputs", - "output", - "response", - "choices", - "message", - "content", - "text", - "value", - "result", - "payload", - "data", -] - -const IGNORED_KEYS = ["inputs", "input", "prompt", "request", "parameter"] - -const extractString = (value: unknown, depth = 0): string | null => { - if (value == null || depth > 10) return null - - const parsed = parseMaybeJson(value) - - if (typeof parsed === "string") { - const trimmed = parsed.trim() - return trimmed.length ? trimmed : null - } - - if (Array.isArray(parsed)) { - for (const item of parsed) { - const candidate = extractString(item, depth + 1) - if (candidate) return candidate - } - return null - } - - if (!isPlainObject(parsed)) return null - - for (const key of KNOWN_OUTPUT_KEYS) { - if (Object.prototype.hasOwnProperty.call(parsed, key)) { - const candidate = extractString(parsed[key], depth + 1) - if (candidate) return candidate - } - } - - for (const [key, nested] of Object.entries(parsed)) { - if (IGNORED_KEYS.some((ignored) => key.toLowerCase().includes(ignored))) continue - const candidate = extractString(nested, depth + 1) - if (candidate) return candidate - } - - try { - const serialised = JSON.stringify(parsed, null, 2) - return serialised.trim().length ? serialised : null - } catch { - return null - } -} - -export const fallbackPrimitive = (value: unknown): string | null => { - if (value == null) return null - if (typeof value === "string") return value - try { - return JSON.stringify(value, null, 2) - } catch { - return String(value) - } -} - -export const resolveOnlineOutput = (sources: unknown[]): string | null => { - for (const source of sources) { - const candidate = extractString(source) - if (candidate && candidate.trim().length > 0) return candidate - } - return null -} - -const RunOutput = ({ - runId, - scenarioId, - stepKey, - showComparisons, -}: { - runId: string - scenarioId?: string - stepKey?: string - showComparisons?: boolean -}) => { - const evalType = useAtomValue(evalTypeAtom) - const { - value, - rawValue, - messageNodes: nodes, - hasError: err, - trace, - } = useInvocationResult({ - scenarioId, - stepKey, - editorType: "simple", - viewType: evalType === "online" ? "table" : "single", - runId, - }) - - const displayValue = useMemo(() => { - if (nodes) return undefined - - if (evalType === "online") { - const sources: unknown[] = [ - rawValue, - value, - trace?.data?.outputs, - trace?.data, - trace?.outputs, - trace?.response, - trace?.tree?.nodes, - trace?.nodes, - ] - - const extracted = resolveOnlineOutput(sources) - const fallback = fallbackPrimitive(value) ?? "N/A" - const result = extracted ?? fallback - - return result - } - - return fallbackPrimitive(value) ?? "N/A" - }, [evalType, nodes, rawValue, value, trace, runId, scenarioId, stepKey]) - - return ( - <div - className={clsx( - showComparisons - ? "!w-[480px] shrink-0 px-3 border-0 border-r border-solid border-white" - : "w-full", - "min-h-0", - )} - > - {nodes ? ( - nodes - ) : ( - <SimpleSharedEditor - key={`output-${scenarioId}-${runId}`} - handleChange={() => {}} - initialValue={displayValue} - syncWithInitialValueChanges - headerName="Output" - editorType="borderless" - state="readOnly" - disabled - readOnly - editorClassName="!text-xs" - error={err} - placeholder="N/A" - className="!w-[97.5%]" - /> - )} - </div> - ) -} - -export default RunOutput diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunTraceHeader.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunTraceHeader.tsx deleted file mode 100644 index fa1d76e0af..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/assets/RunTraceHeader.tsx +++ /dev/null @@ -1,317 +0,0 @@ -import {memo, useMemo} from "react" - -import {Typography, Tooltip} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" -import Link from "next/link" - -import EvalNameTag from "@/oss/components/EvalRunDetails/AutoEvalRun/assets/EvalNameTag" -import {EVAL_TAG_COLOR} from "@/oss/components/EvalRunDetails/AutoEvalRun/assets/utils" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {useRunId} from "@/oss/contexts/RunIdContext" -import useURL from "@/oss/hooks/useURL" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {useInvocationResult} from "@/oss/lib/hooks/useInvocationResult" - -const {Text} = Typography - -const GenerationResultUtils = dynamic( - () => - import( - "@/oss/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils" - ), - {ssr: false}, -) - -const RunTraceHeader = ({ - runId: rId, - scenarioId: scId, - stepKey, - anchorId, - showComparisons, -}: { - runId: string - scenarioId?: string - stepKey?: string - anchorId?: string - showComparisons?: boolean -}) => { - const baseRunId = useRunId() - const state = useAtomValue(evaluationRunStateFamily(rId)) - const enriched = state?.enrichedRun - const {buildUrl} = useURL() - const {trace: runTrace} = useInvocationResult({ - scenarioId: scId, - stepKey: stepKey, - editorType: "simple", - viewType: "single", - runId: rId, - }) - const evaluationType = useAtomValue(evalTypeAtom) - const isOnlineEval = evaluationType === "online" - - const {appSummary, appTooltip, appHref, context} = useMemo(() => { - const toStr = (value: unknown) => { - if (typeof value !== "string") return undefined - const trimmed = value.trim() - return trimmed.length ? trimmed : undefined - } - - const pickFirst = (...values: unknown[]) => { - for (const value of values) { - const str = toStr(value) - if (str) return str - } - return undefined - } - const computeFromRunIndex = () => { - const stepMeta = stepKey ? state?.runIndex?.steps?.[stepKey] : undefined - const refs = (stepMeta as any)?.refs || {} - const revisionRef = - refs?.applicationRevision || refs?.application_revision || refs?.revision || {} - const applicationRef = - refs?.application || - refs?.applicationRef || - refs?.application_ref || - (revisionRef as any)?.application || - {} - - const revisionId = pickFirst( - revisionRef?.id, - revisionRef?.variantId, - revisionRef?.revisionId, - ) - const variants = Array.isArray(enriched?.variants) - ? (enriched?.variants as unknown[] as Record<string, any>[]) - : [] - const matchedVariant = - (revisionId - ? variants.find((variant: Record<string, any>) => { - const candidates = [ - toStr(variant?.id), - toStr(variant?.variantId), - toStr(variant?._revisionId), - toStr(variant?.revisionId), - ].filter(Boolean) - return candidates.includes(revisionId) - }) - : undefined) || variants[0] - - const appName = pickFirst( - applicationRef?.name, - applicationRef?.slug, - matchedVariant?.appName, - matchedVariant?.application?.name, - enriched?.appName, - (enriched as any)?.app_name, - (enriched as any)?.app?.name, - ) - - const appId = pickFirst( - applicationRef?.id, - revisionRef?.applicationId, - matchedVariant?.appId, - matchedVariant?.application?.id, - enriched?.appId, - (enriched as any)?.app_id, - (enriched as any)?.app?.id, - ) - - const variantName = pickFirst( - revisionRef?.variantName, - revisionRef?.name, - matchedVariant?.variantName, - matchedVariant?.name, - ) - - const revisionLabel = pickFirst( - revisionRef?.revisionLabel, - revisionRef?.revision, - revisionRef?.version, - matchedVariant?.revision, - matchedVariant?.version, - ) - - return {appId, appName, variantName, revisionLabel} - } - - const computeFromTrace = () => { - if (!runTrace) return {} - - const collectedRefs: any[] = [] - const addRef = (ref: any, keyHint?: string) => { - if (!ref || typeof ref !== "object") return - const normalized = {...ref} - if (keyHint && !normalized.key) normalized.key = keyHint - if (keyHint && normalized.attributes && !normalized.attributes.key) { - normalized.attributes = {...normalized.attributes, key: keyHint} - } - collectedRefs.push(normalized) - } - - const pushRefs = (node: any) => { - if (!node || typeof node !== "object") return - - if (Array.isArray(node.references)) { - node.references.forEach((ref: any) => addRef(ref)) - } - - if (node.refs && typeof node.refs === "object") { - Object.entries(node.refs).forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((entry) => addRef(entry, key)) - } else { - addRef(value, key) - } - }) - } - - if (Array.isArray(node.nodes)) { - node.nodes.forEach(pushRefs) - } else if (node.nodes && typeof node.nodes === "object") { - Object.values(node.nodes).forEach(pushRefs) - } - - if (Array.isArray(node.children)) { - node.children.forEach(pushRefs) - } - } - - pushRefs(runTrace) - if (runTrace?.tree) pushRefs(runTrace.tree) - - const findRef = (...keys: string[]) => - collectedRefs.find((ref: any) => { - const refKey = pickFirst(ref?.attributes?.key, ref?.key) - return refKey ? keys.includes(refKey) : false - }) - - const appRef = findRef("application", "app") - const variantRef = findRef( - "application_revision", - "application_variant", - "variant", - "revision", - ) - - const appId = pickFirst( - appRef?.id, - appRef?.attributes?.id, - appRef?.attributes?.applicationId, - appRef?.attributes?.appId, - ) - const appName = pickFirst( - appRef?.attributes?.name, - appRef?.attributes?.label, - appRef?.attributes?.application?.name, - appRef?.slug, - appRef?.name, - ) - const variantName = pickFirst( - variantRef?.attributes?.name, - variantRef?.attributes?.variantName, - variantRef?.slug, - variantRef?.name, - ) - const revisionLabel = pickFirst( - variantRef?.attributes?.revision, - variantRef?.attributes?.version, - variantRef?.attributes?.label, - ) - - return {appId, appName, variantName, revisionLabel} - } - - const runIndexContext = computeFromRunIndex() - const traceContext = isOnlineEval ? computeFromTrace() : {} - const context = isOnlineEval - ? { - appId: traceContext.appId || runIndexContext.appId, - appName: traceContext.appName || runIndexContext.appName, - variantName: traceContext.variantName || runIndexContext.variantName, - revisionLabel: traceContext.revisionLabel || runIndexContext.revisionLabel, - } - : runIndexContext - - const resolvedAppId = context.appId - const resolvedAppName = context.appName - const resolvedVariantName = context.variantName - const resolvedRevisionLabel = context.revisionLabel - - const variantSummary = resolvedVariantName - ? `${resolvedVariantName}${resolvedRevisionLabel ? ` v${resolvedRevisionLabel}` : ""}` - : undefined - - const summaryBase = [resolvedAppName, variantSummary].filter(Boolean).join(" • ") - const display = - summaryBase || - resolvedAppName || - (resolvedAppId ? `App ${resolvedAppId.slice(-6)}` : "Application unavailable") - - const tooltipParts = [ - resolvedAppName ? `App: ${resolvedAppName}` : null, - resolvedAppId ? `ID: ${resolvedAppId}` : null, - resolvedVariantName ? `Variant: ${resolvedVariantName}` : null, - resolvedRevisionLabel ? `Revision: ${resolvedRevisionLabel}` : null, - ].filter(Boolean) as string[] - - const href = resolvedAppId ? buildUrl({appId: resolvedAppId, isAppUrl: true}) : undefined - - return { - appSummary: display, - appTooltip: tooltipParts.length ? tooltipParts.join(" · ") : undefined, - appHref: href, - context, - } - }, [buildUrl, enriched, isOnlineEval, runTrace, state?.runIndex?.steps, stepKey]) - - return ( - <div - className={clsx( - showComparisons ? "w-[480px] shrink-0" : "w-full", - "h-[40px] flex items-center justify-between px-3 border-0 border-r border-solid border-gray-200", - )} - id={anchorId} - > - <div className="flex items-center gap-3 min-w-0"> - {enriched ? ( - <EvalNameTag - run={enriched} - color={ - EVAL_TAG_COLOR?.[ - state?.colorIndex || - (state?.isBase ? 1 : undefined) || - state?.compareIndex || - 1 - ] - } - onlyShowBasePin - isBaseEval={enriched?.id === baseRunId} - className={clsx("max-w-[200px]", showComparisons ? "truncate" : "")} - appContext={{ - appId: context?.appId, - appName: context?.appName, - variantName: context?.variantName, - revisionLabel: context?.revisionLabel, - isOnlineEval, - }} - /> - ) : ( - <div className="h-[24.4px] w-[100px]" /> - )} - </div> - {runTrace ? ( - <GenerationResultUtils - className="flex-row-reverse shrink-0" - result={{response: {tree: {nodes: [runTrace]}}}} - showStatus={false} - /> - ) : ( - <div className="h-[24.4px] w-full" /> - )} - </div> - ) -} - -export default memo(RunTraceHeader) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/index.tsx deleted file mode 100644 index d274272ee9..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/index.tsx +++ /dev/null @@ -1,2319 +0,0 @@ -import {useCallback, useEffect, useMemo, useRef, useState} from "react" - -import SimpleSharedEditor from "@agenta/oss/src/components/EditorViews/SimpleSharedEditor" -import VirtualizedSharedEditors from "@agenta/oss/src/components/EditorViews/VirtualizedSharedEditors" -import {Collapse, CollapseProps, Tag, Tooltip} from "antd" -import clsx from "clsx" -import {atom, getDefaultStore, useAtomValue} from "jotai" -import {useRouter} from "next/router" - -import {renderChatMessages} from "@/oss/components/EvalRunDetails/assets/renderChatMessages" -import {STATUS_COLOR} from "@/oss/components/EvalRunDetails/components/EvalRunScenarioStatusTag/assets" -import { - GeneralAutoEvalMetricColumns, - GeneralHumanEvalMetricColumns, -} from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/constants" -import {titleCase} from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/flatDataSourceBuilder" -import ScenarioTraceSummary from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ScenarioTraceSummary" -import {comparisonRunsStepsAtom} from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useExpandableComparisonDataSource" -import {useCachedScenarioSteps} from "@/oss/components/EvalRunDetails/hooks/useCachedScenarioSteps" -import {useMetricStepError} from "@/oss/components/EvalRunDetails/hooks/useMetricStepError" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {focusScenarioAtom} from "@/oss/components/EvalRunDetails/state/focusScenarioAtom" -import {urlStateAtom} from "@/oss/components/EvalRunDetails/state/urlState" -import MetricDetailsPopover from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover" -import {formatMetricValue} from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils" -import {getStatusLabel} from "@/oss/lib/constants/statusLabels" -import { - evaluationRunStateFamily, - runMetricsStatsCacheFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {runScopedMetricDataFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {scenarioMetricSelectorFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import {useInvocationResult} from "@/oss/lib/hooks/useInvocationResult" -import { - canonicalizeMetricKey, - getMetricValueWithAliases, - inferMetricType, -} from "@/oss/lib/metricUtils" -import {EvaluationStatus} from "@/oss/lib/Types" -import {useAppState} from "@/oss/state/appState" - -import FocusDrawerContentSkeleton from "../Skeletons/FocusDrawerContentSkeleton" - -import RunOutput, {fallbackPrimitive, resolveOnlineOutput} from "./assets/RunOutput" -import RunTraceHeader from "./assets/RunTraceHeader" -import { - getFromAnnotationOutputs, - resolveEvaluatorMetricsMap, - SCENARIO_METRIC_ALIASES, - asEvaluatorArray, - extractEvaluatorSlug, - extractEvaluatorName, - findAnnotationStepKey, - collectSlugCandidates, - collectEvaluatorIdentifiers, - pickString, - buildDrawerMetricDefinition, -} from "./lib/helpers" - -const EMPTY_COMPARISON_RUN_IDS: string[] = [] - -type EvaluatorFailure = {status?: string; error?: string} | null - -const FOCUS_DRAWER_DEBUG = true - -const emptyScenarioMetricsAtom = atom<Record<string, any> | undefined>(undefined) -const emptyStatsAtom = atom<Record<string, any> | undefined>(undefined) -const emptyMetricDataAtom = atom<{value: any; distInfo?: any}>({ - value: undefined, - distInfo: undefined, -}) - -export interface DrawerMetricValueCellProps { - runId: string - scenarioId?: string - evaluatorSlug: string - metricName: string - metricKey?: string - fallbackKeys?: string[] - invocationStepKey?: string - scenarioStepsResult?: { - data?: UseEvaluationRunScenarioStepsFetcherResult - state?: ReturnType<typeof useCachedScenarioSteps>["state"] - hasResolved?: boolean - error?: unknown - } - context?: EvaluatorContext - suppressFailure?: boolean -} - -interface EvaluatorContext { - slugCandidates: string[] - annotationStepKey?: string - errorStep?: EvaluatorFailure -} - -export interface DrawerEvaluatorMetric { - id: string - displayName: string - metricKey?: string - fallbackKeys?: string[] -} - -const normalizeMetricPrimaryKey = (slug: string | undefined, rawKey: string): string => { - const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined - const trimmed = rawKey.trim() - if (!trimmed) return normalizedSlug ?? "" - if (normalizedSlug) { - const prefix = `${normalizedSlug}.` - if (trimmed.startsWith(prefix)) return trimmed - } - if (trimmed.includes(".")) return trimmed - return normalizedSlug ? `${normalizedSlug}.${trimmed}` : trimmed -} - -const INVOCATION_METRIC_PREFIX = "attributes.ag.metrics" -const INVOCATION_METRIC_SIGNATURE = `.attributes.ag.metrics` - -const isInvocationMetricKey = (key?: string): boolean => { - if (!key) return false - return key.startsWith(INVOCATION_METRIC_PREFIX) || key.includes(INVOCATION_METRIC_SIGNATURE) -} - -const filterInvocationMetricDefinitions = ( - metrics: DrawerEvaluatorMetric[], -): DrawerEvaluatorMetric[] => metrics.filter((metric) => !isInvocationMetricKey(metric.metricKey)) - -const stripOutputsPrefixes = (key: string): string => { - let result = key - const OUTPUT_PREFIX = "attributes.ag.data.outputs." - const METRIC_PREFIX = "attributes.ag.metrics." - while (result.startsWith(OUTPUT_PREFIX)) { - result = result.slice(OUTPUT_PREFIX.length) - } - while (result.startsWith(METRIC_PREFIX)) { - result = result.slice(METRIC_PREFIX.length) - } - return result -} - -const normalizeMetricKeyForSlug = (key: string | undefined, slug?: string): string => { - if (!key) return "" - let result = key.trim() - if (!result) return "" - if (slug && result.startsWith(`${slug}.`)) { - result = result.slice(slug.length + 1) - } - result = stripOutputsPrefixes(result) - return result -} - -const dedupeEvaluatorMetricDefinitions = ( - metrics: DrawerEvaluatorMetric[], - slug?: string, -): DrawerEvaluatorMetric[] => { - const map = new Map<string, DrawerEvaluatorMetric>() - metrics.forEach((metric) => { - const normalizedKey = normalizeMetricKeyForSlug(metric.metricKey ?? metric.id, slug) - const existing = map.get(normalizedKey) - if (!existing) { - map.set(normalizedKey, metric) - return - } - const fallbackKeys = new Set<string>([ - ...(existing.fallbackKeys || []), - ...(metric.fallbackKeys || []), - ]) - const preferred = - isInvocationMetricKey(existing.metricKey) && !isInvocationMetricKey(metric.metricKey) - ? metric - : existing - map.set(normalizedKey, { - ...preferred, - fallbackKeys: fallbackKeys.size ? Array.from(fallbackKeys) : preferred.fallbackKeys, - }) - }) - return Array.from(map.values()) -} - -const collectMetricFallbackKeys = ( - slug: string | undefined, - rawKey: string, - primaryKey: string, - meta: any, -): string[] => { - const set = new Set<string>() - const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined - const push = (value?: string) => { - if (!value) return - const trimmed = String(value).trim() - if (!trimmed) return - if (trimmed.includes(".") || !normalizedSlug) { - set.add(trimmed) - } else { - set.add(`${normalizedSlug}.${trimmed}`) - } - } - - push(rawKey) - - const aliases = Array.isArray(meta?.aliases) - ? meta?.aliases - : meta?.aliases - ? [meta.aliases] - : meta?.alias - ? [meta.alias] - : [] - aliases.forEach(push) - - const extraKeys = [ - meta?.metricKey, - meta?.metric_key, - meta?.key, - meta?.path, - meta?.fullKey, - meta?.full_key, - meta?.canonicalKey, - meta?.canonical_key, - meta?.statsKey, - meta?.stats_key, - meta?.metric, - ] - extraKeys.forEach(push) - - const fallbackKeys = Array.from(set).filter((value) => value !== rawKey && value !== primaryKey) - return fallbackKeys -} - -// const buildDrawerMetricDefinition = ( -// slug: string | undefined, -// rawKey: string, -// meta: any, -// ): DrawerEvaluatorMetric => { -// const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined -// const normalizedDisplayBase = -// normalizedSlug && rawKey.startsWith(`${normalizedSlug}.`) -// ? rawKey.slice(normalizedSlug.length + 1) -// : rawKey -// const normalizedDisplay = stripOutputsPrefixes(normalizedDisplayBase) -// const primaryKey = normalizeMetricPrimaryKey(slug, rawKey) -// const fallbackKeys = collectMetricFallbackKeys(slug, rawKey, primaryKey, meta) -// const id = canonicalizeMetricKey(primaryKey) || primaryKey - -// return { -// id, -// displayName: normalizedDisplay || primaryKey, -// metricKey: primaryKey, -// fallbackKeys: fallbackKeys.length ? fallbackKeys : undefined, -// } -// } - -const collectCandidateSteps = (data?: UseEvaluationRunScenarioStepsFetcherResult): any[] => { - if (!data) return [] - const buckets: any[] = [] - if (Array.isArray(data.annotationSteps)) buckets.push(...(data.annotationSteps as any[])) - if (Array.isArray(data.steps)) buckets.push(...(data.steps as any[])) - if (Array.isArray(data.invocationSteps)) buckets.push(...(data.invocationSteps as any[])) - return buckets -} - -// const collectSlugCandidates = ( -// data: UseEvaluationRunScenarioStepsFetcherResult | undefined, -// evaluatorSlug: string, -// ): string[] => { -// const set = new Set<string>() -// const push = (value?: string | null) => { -// if (!value) return -// const normalized = String(value).trim() -// if (!normalized) return -// set.add(normalized) -// } - -// push(evaluatorSlug) - -// const steps = collectCandidateSteps(data) -// steps.forEach((step) => { -// if (!step) return -// const ref: any = step?.references?.evaluator -// push(step?.stepKey as any) -// push(step?.stepkey as any) -// push(step?.step_key as any) -// push(ref?.slug) -// push(ref?.key) -// push(ref?.id) -// }) - -// return Array.from(set) -// } - -// const findAnnotationStepKey = ( -// data: UseEvaluationRunScenarioStepsFetcherResult | undefined, -// slugCandidates: string[], -// ): string | undefined => { -// if (!data) return undefined - -// const steps = collectCandidateSteps(data) -// if (!steps.length) return undefined - -// const loweredCandidates = slugCandidates -// .map((slug) => String(slug).toLowerCase()) -// .filter((slug) => slug.length > 0) - -// const matched = steps.find((step) => { -// if (!step) return false -// const possible: string[] = [ -// (step as any)?.stepKey, -// (step as any)?.stepkey, -// (step as any)?.step_key, -// (step as any)?.references?.evaluator?.slug, -// (step as any)?.references?.evaluator?.key, -// (step as any)?.references?.evaluator?.id, -// ] - -// return possible -// .filter(Boolean) -// .map((value) => String(value).toLowerCase()) -// .some((candidate) => loweredCandidates.includes(candidate)) -// }) - -// return ( -// (matched as any)?.stepKey ?? -// (matched as any)?.stepkey ?? -// (matched as any)?.step_key ?? -// undefined -// ) -// } - -const EvaluatorFailureDisplay = ({ - status, - error, - editorKey, -}: { - status?: string - error?: string - editorKey: string -}) => { - const tooltipContent = - typeof error === "string" && error.length - ? error - : "Evaluator returned an error for this metric." - - const tagColor = - status && Object.prototype.hasOwnProperty.call(STATUS_COLOR, status) - ? (STATUS_COLOR as Record<string, string>)[status] - : STATUS_COLOR[EvaluationStatus.ERROR] - - const isLongError = tooltipContent.length > 200 || /\n/.test(tooltipContent) - - return ( - <div className="flex w-full flex-col gap-2"> - <Tooltip - title={<span className="whitespace-pre-wrap">{tooltipContent}</span>} - classNames={{body: "max-w-[320px] max-h-[320px] overflow-y-auto"}} - > - <Tag color={tagColor} bordered={false}> - {getStatusLabel(status || EvaluationStatus.ERROR)} - </Tag> - </Tooltip> - {isLongError ? ( - <SimpleSharedEditor - key={editorKey} - handleChange={() => {}} - initialValue={tooltipContent} - editorType="borderless" - state="readOnly" - disabled - readOnly - editorClassName="!text-xs" - placeholder="N/A" - className="!w-[97.5%]" - /> - ) : ( - <div className="rounded-md bg-[#FEF3F2] px-3 py-2 text-xs text-[#A8071A]"> - {tooltipContent} - </div> - )} - </div> - ) -} - -const DrawerMetricValueCell = ({ - runId, - scenarioId, - evaluatorSlug, - metricName, - metricKey, - fallbackKeys, - invocationStepKey, - scenarioStepsResult, - context, - suppressFailure, -}: DrawerMetricValueCellProps) => { - const fallbackSlugCandidates = useMemo( - () => collectSlugCandidates(scenarioStepsResult?.data, evaluatorSlug), - [scenarioStepsResult?.data, evaluatorSlug], - ) - - const slugCandidates = context?.slugCandidates ?? fallbackSlugCandidates - - const fallbackAnnotationStepKey = useMemo(() => { - if (context?.annotationStepKey !== undefined) return undefined - return findAnnotationStepKey(scenarioStepsResult?.data, slugCandidates) - }, [context?.annotationStepKey, scenarioStepsResult?.data, slugCandidates]) - - const annotationStepKey = context?.annotationStepKey ?? fallbackAnnotationStepKey - - const stepSlug = invocationStepKey ?? undefined - - const normalizedPrimaryKey = useMemo(() => { - const trimmedMetricKey = typeof metricKey === "string" ? metricKey.trim() : "" - if (trimmedMetricKey.length > 0) { - return trimmedMetricKey.includes(".") - ? trimmedMetricKey - : `${evaluatorSlug}.${trimmedMetricKey}` - } - const trimmedMetricName = typeof metricName === "string" ? metricName.trim() : "" - if (trimmedMetricName.length === 0) { - return evaluatorSlug - } - if (trimmedMetricName.includes(".")) { - return trimmedMetricName - } - return `${evaluatorSlug}.${trimmedMetricName}` - }, [metricKey, metricName, evaluatorSlug]) - - const normalizedFallbackKeys = useMemo(() => { - if (!fallbackKeys || fallbackKeys.length === 0) return [] - return fallbackKeys - .map((key) => { - if (!key) return undefined - const trimmed = String(key).trim() - if (!trimmed) return undefined - return trimmed.includes(".") ? trimmed : `${evaluatorSlug}.${trimmed}` - }) - .filter(Boolean) as string[] - }, [fallbackKeys, evaluatorSlug]) - - const barePrimaryKey = useMemo(() => { - const prefix = `${evaluatorSlug}.` - return normalizedPrimaryKey.startsWith(prefix) - ? normalizedPrimaryKey.slice(prefix.length) - : normalizedPrimaryKey - }, [normalizedPrimaryKey, evaluatorSlug]) - - const canonicalPrimaryKey = useMemo( - () => canonicalizeMetricKey(normalizedPrimaryKey), - [normalizedPrimaryKey], - ) - const canonicalBareKey = useMemo(() => canonicalizeMetricKey(barePrimaryKey), [barePrimaryKey]) - - const hasScenarioId = - typeof scenarioId === "string" && - scenarioId.trim().length > 0 && - scenarioId !== "__missing__" - const safeScenarioId = hasScenarioId ? scenarioId : (`__missing__::${runId}` as string) - - const runScopedAtoms = useMemo(() => { - if (!hasScenarioId || !runId) { - return { - primary: emptyMetricDataAtom, - canonical: emptyMetricDataAtom, - bare: emptyMetricDataAtom, - canonicalBare: emptyMetricDataAtom, - } - } - - const args = { - runId, - scenarioId: scenarioId as string, - stepSlug, - } - - return { - primary: runScopedMetricDataFamily({...args, metricKey: normalizedPrimaryKey}), - canonical: runScopedMetricDataFamily({...args, metricKey: canonicalPrimaryKey}), - bare: runScopedMetricDataFamily({...args, metricKey: barePrimaryKey}), - canonicalBare: runScopedMetricDataFamily({...args, metricKey: canonicalBareKey}), - } - }, [ - barePrimaryKey, - canonicalBareKey, - canonicalPrimaryKey, - hasScenarioId, - normalizedPrimaryKey, - runId, - scenarioId, - stepSlug, - ]) - - const primaryMetricData = useAtomValue(runScopedAtoms.primary) - const canonicalMetricData = useAtomValue(runScopedAtoms.canonical) - const bareMetricData = useAtomValue(runScopedAtoms.bare) - const canonicalBareMetricData = useAtomValue(runScopedAtoms.canonicalBare) - - const runScopedStats = useAtomValue(runMetricsStatsCacheFamily(runId)) - - const runScopedResult = useMemo(() => { - const candidates = [ - {key: normalizedPrimaryKey, data: primaryMetricData}, - {key: canonicalPrimaryKey, data: canonicalMetricData}, - {key: barePrimaryKey, data: bareMetricData}, - {key: canonicalBareKey, data: canonicalBareMetricData}, - ] - - const resolved = candidates.find((entry) => entry.data?.value !== undefined) - if (resolved) { - return { - value: resolved.data?.value, - distInfo: resolved.data?.distInfo, - key: resolved.key, - } - } - return {value: undefined, distInfo: undefined, key: undefined} - }, [ - bareMetricData, - barePrimaryKey, - canonicalBareKey, - canonicalBareMetricData, - canonicalMetricData, - canonicalPrimaryKey, - normalizedPrimaryKey, - primaryMetricData, - ]) - - const providedErrorStep = context?.errorStep - - const {errorStep: computedErrorStep} = useMetricStepError({ - runId, - scenarioId, - metricKey: normalizedPrimaryKey, - slugCandidates, - stepKey: annotationStepKey, - scenarioStepsResult, - }) - - const errorStep = providedErrorStep ?? computedErrorStep - - const hasFailure = Boolean(errorStep?.status || errorStep?.error) - - const scenarioMetricsAtom = useMemo(() => { - if (!runId || !hasScenarioId) return emptyScenarioMetricsAtom - return scenarioMetricSelectorFamily({runId, scenarioId: safeScenarioId}) - }, [hasScenarioId, runId, safeScenarioId]) - const scenarioMetrics = useAtomValue(scenarioMetricsAtom) as Record<string, any> | undefined - - const runMetricsStatsAtom = useMemo(() => { - if (!runId) return emptyStatsAtom - return runMetricsStatsCacheFamily(runId) - }, [runId]) - const runMetricsStatsMap = useAtomValue(runMetricsStatsAtom) - - const buildCandidateKeys = useCallback( - (base: string): string[] => { - const candidates: string[] = [] - const push = (candidate?: string) => { - if (!candidate) return - if (candidates.includes(candidate)) return - candidates.push(candidate) - } - - push(base) - - const slug = stepSlug || base.split(".")[0] - const withoutSlug = - slug && base.startsWith(`${slug}.`) ? base.slice(slug.length + 1) : base - - if (slug) { - push(`${slug}.${withoutSlug}`) - push(`${slug}.attributes.ag.data.outputs.${withoutSlug}`) - push(`${slug}.attributes.ag.metrics.${withoutSlug}`) - push(`attributes.ag.data.outputs.${slug}.${withoutSlug}`) - push(`attributes.ag.metrics.${slug}.${withoutSlug}`) - } - - push(`attributes.ag.data.outputs.${withoutSlug}`) - push(`attributes.ag.metrics.${withoutSlug}`) - push(`attributes.ag.data.outputs.${base}`) - push(`attributes.ag.metrics.${base}`) - - return candidates - }, - [stepSlug], - ) - - const expandCandidateKeys = useCallback( - (base: string): string[] => { - const set = new Set<string>() - buildCandidateKeys(base).forEach((candidate) => set.add(candidate)) - if (stepSlug && !base.startsWith(`${stepSlug}.`)) { - buildCandidateKeys(`${stepSlug}.${base}`).forEach((candidate) => set.add(candidate)) - } - if (annotationStepKey && !base.startsWith(`${annotationStepKey}.`)) { - buildCandidateKeys(`${annotationStepKey}.${base}`).forEach((candidate) => - set.add(candidate), - ) - } - return Array.from(set) - }, - [annotationStepKey, buildCandidateKeys, stepSlug], - ) - - const baseCandidates = useMemo(() => { - const set = new Set<string>() - const push = (value?: string) => { - if (!value) return - const trimmed = String(value).trim() - if (!trimmed) return - set.add(trimmed) - } - - push(normalizedPrimaryKey) - push(canonicalPrimaryKey) - push(barePrimaryKey) - push(canonicalBareKey) - push(metricName) - if (metricName && metricName !== barePrimaryKey) { - push(canonicalizeMetricKey(metricName)) - } - normalizedFallbackKeys.forEach((key) => { - push(key) - push(canonicalizeMetricKey(key)) - const withoutSlug = key.startsWith(`${evaluatorSlug}.`) - ? key.slice(evaluatorSlug.length + 1) - : key - push(withoutSlug) - push(canonicalizeMetricKey(withoutSlug)) - }) - - return Array.from(set) - }, [ - normalizedPrimaryKey, - canonicalPrimaryKey, - barePrimaryKey, - canonicalBareKey, - metricName, - normalizedFallbackKeys, - evaluatorSlug, - ]) - - const expandedCandidates = useMemo(() => { - const set = new Set<string>() - baseCandidates.forEach((candidate) => { - expandCandidateKeys(candidate).forEach((expanded) => set.add(expanded)) - }) - return Array.from(set) - }, [baseCandidates, expandCandidateKeys]) - - const resolution = useMemo(() => { - if (runScopedResult.value !== undefined) { - return { - rawValue: runScopedResult.value as any, - matchedKey: runScopedResult.key, - distInfo: runScopedResult.distInfo, - } - } - - if (!scenarioMetrics || !expandedCandidates.length) { - return { - rawValue: undefined as any, - matchedKey: undefined as string | undefined, - distInfo: undefined, - } - } - - for (const candidate of expandedCandidates) { - const resolved = getMetricValueWithAliases(scenarioMetrics, candidate) - if (resolved !== undefined) { - return {rawValue: resolved, matchedKey: candidate, distInfo: undefined} - } - } - - const looseMatchKey = Object.keys(scenarioMetrics).find((key) => { - if (!key) return false - if (key === normalizedPrimaryKey) return true - if (key === canonicalPrimaryKey) return true - if (key.endsWith(`.${barePrimaryKey}`)) return true - if (metricName && key.endsWith(`.${metricName}`)) return true - if (metricName && key.includes(`${metricName}.`)) return true - if (evaluatorSlug && key.includes(`${evaluatorSlug}.${metricName}`)) return true - if (evaluatorSlug && key.includes(`${evaluatorSlug}.${barePrimaryKey}`)) return true - return false - }) - - if (looseMatchKey) { - const resolved = scenarioMetrics[looseMatchKey] - if (resolved !== undefined) { - return {rawValue: resolved, matchedKey: looseMatchKey, distInfo: undefined} - } - } - - return { - rawValue: undefined as any, - matchedKey: undefined as string | undefined, - distInfo: undefined, - } - }, [ - expandedCandidates, - normalizedPrimaryKey, - runId, - runScopedResult, - scenarioId, - scenarioMetrics, - evaluatorSlug, - ]) - - // Prefer run-scoped/metrics-map value; if it is missing or schema-like, fallback to annotation outputs - const annotationFallback = useMemo(() => { - const v = resolution.rawValue - const isSchemaLike = - v && - typeof v === "object" && - !Array.isArray(v) && - Object.keys(v as any).length <= 2 && - "type" in (v as any) - - const unusable = - v === undefined || - v === null || - (typeof v === "string" && !v.trim()) || - (typeof v === "number" && Number.isNaN(v)) || - isSchemaLike - - if (!unusable) return undefined - - return getFromAnnotationOutputs({ - scenarioStepsResult, - slugCandidates, - evaluatorSlug, - expandedCandidates, - }) - }, [ - resolution.rawValue, - scenarioStepsResult, - slugCandidates, - evaluatorSlug, - expandedCandidates, - ]) - - const rawValue = annotationFallback?.value ?? resolution.rawValue - const matchedKey = annotationFallback?.matchedKey ?? resolution.matchedKey - - const distInfo = useMemo(() => { - if (resolution.distInfo !== undefined) return resolution.distInfo - if (!runMetricsStatsMap) return undefined - - if (matchedKey) { - const direct = runMetricsStatsMap[matchedKey] - if (direct !== undefined) return direct - const canonical = canonicalizeMetricKey(matchedKey) - if (runMetricsStatsMap[canonical] !== undefined) return runMetricsStatsMap[canonical] - } - - for (const candidate of expandedCandidates) { - const direct = runMetricsStatsMap[candidate] - if (direct !== undefined) return direct - const canonical = canonicalizeMetricKey(candidate) - if (runMetricsStatsMap[canonical] !== undefined) return runMetricsStatsMap[canonical] - } - - return undefined - }, [expandedCandidates, matchedKey, resolution.distInfo, runMetricsStatsMap]) - - if (!hasScenarioId || !runId) { - return ( - <Tag className="bg-[#0517290F] hover:bg-[#05172916]" bordered={false}> - N/A - </Tag> - ) - } - - if (hasFailure) { - const tooltipContent = - typeof errorStep?.error === "string" && errorStep.error.length - ? errorStep.error - : "Evaluator returned an error for this metric." - - const tagColor = - errorStep?.status && - Object.prototype.hasOwnProperty.call(STATUS_COLOR, errorStep.status) - ? (STATUS_COLOR as Record<string, string>)[errorStep.status] - : STATUS_COLOR[EvaluationStatus.ERROR] - - const statusLabel = getStatusLabel(errorStep?.status || EvaluationStatus.ERROR) - - const statusTag = ( - <Tooltip - title={<span className="whitespace-pre-wrap">{tooltipContent}</span>} - classNames={{body: "max-w-[320px] max-h-[320px] overflow-y-auto"}} - > - <Tag color={tagColor} bordered={false} className="cursor-help"> - {statusLabel} - </Tag> - </Tooltip> - ) - - if (suppressFailure) { - return statusTag - } - - return ( - <EvaluatorFailureDisplay - status={errorStep?.status} - error={errorStep?.error} - editorKey={`error-${runId}-${scenarioId}-${evaluatorSlug}-${metricName}`} - /> - ) - } - - let normalizedValue: any = rawValue - - if ( - normalizedValue !== null && - typeof normalizedValue === "object" && - !Array.isArray(normalizedValue) - ) { - const normalizedObject = normalizedValue as Record<string, any> - if (Array.isArray(normalizedObject.frequency) && normalizedObject.frequency.length > 0) { - const entry = normalizedObject.frequency.reduce((max: any, current: any) => - (current?.count ?? 0) > (max?.count ?? 0) ? current : max, - ) - normalizedValue = entry?.value ?? entry - } else if (typeof normalizedObject.mean === "number") { - normalizedValue = normalizedObject.mean - } else if (typeof normalizedObject.score === "number") { - normalizedValue = normalizedObject.score - } else { - const primitive = Object.values(normalizedObject).find( - (v) => typeof v === "number" || typeof v === "string" || typeof v === "boolean", - ) - normalizedValue = primitive !== undefined ? primitive : JSON.stringify(normalizedObject) - } - } - - if ( - normalizedValue === undefined || - normalizedValue === null || - (typeof normalizedValue === "number" && Number.isNaN(normalizedValue)) || - (typeof normalizedValue === "string" && normalizedValue.trim() === "") - ) { - return ( - <Tag className="bg-[#0517290F] hover:bg-[#05172916]" bordered={false}> - N/A - </Tag> - ) - } - - const highlightValue = normalizedValue - - let display: string - if (typeof normalizedValue === "boolean") { - display = normalizedValue ? "true" : "false" - } else if (Array.isArray(normalizedValue)) { - display = JSON.stringify(normalizedValue) - } else if (typeof normalizedValue === "object") { - display = JSON.stringify(normalizedValue) - } else { - display = String(formatMetricValue(metricName, normalizedValue)) - } - - const isLongText = display.length > 180 || /\n/.test(display) - if (isLongText) { - const editorKey = `${runId}-${scenarioId}-${evaluatorSlug}-${metricName}` - return ( - <SimpleSharedEditor - headerName={metricName} - key={editorKey} - handleChange={() => {}} - initialValue={display} - editorType="borderless" - state="readOnly" - disabled - readOnly - editorClassName="!text-xs" - placeholder="N/A" - className="!w-[97.5%]" - /> - ) - } - - const hasDistribution = - distInfo && - typeof distInfo === "object" && - !Array.isArray(distInfo) && - Object.keys(distInfo).length > 0 - - const tagNode = ( - <Tag - className={clsx( - "max-w-full whitespace-normal break-words break-all bg-[#0517290F] hover:bg-[#05172916]", - {"cursor-pointer": Boolean(hasDistribution)}, - )} - bordered={false} - > - {display} - </Tag> - ) - - if (hasDistribution) { - const inferredType = inferMetricType(highlightValue) - return ( - <MetricDetailsPopover - metricKey={metricName} - extraDimensions={distInfo} - highlightValue={highlightValue} - hidePrimitiveTable - metricType={inferredType} - > - {tagNode} - </MetricDetailsPopover> - ) - } - - return tagNode -} - -interface EvaluatorContextOptions { - runId: string - scenarioId?: string - evaluatorSlug: string - scenarioStepsResult?: DrawerMetricValueCellProps["scenarioStepsResult"] -} - -const useEvaluatorContext = ({ - runId, - scenarioId, - evaluatorSlug, - scenarioStepsResult, -}: EvaluatorContextOptions): EvaluatorContext => { - const slugCandidates = useMemo( - () => collectSlugCandidates(scenarioStepsResult?.data, evaluatorSlug), - [scenarioStepsResult?.data, evaluatorSlug], - ) - - const annotationStepKey = useMemo( - () => findAnnotationStepKey(scenarioStepsResult?.data, slugCandidates), - [scenarioStepsResult?.data, slugCandidates], - ) - - const derivedMetricKey = - evaluatorSlug && evaluatorSlug.length > 0 ? `${evaluatorSlug}.__drawer__` : "__drawer__" - - const {errorStep} = useMetricStepError({ - runId, - scenarioId, - metricKey: derivedMetricKey, - slugCandidates, - stepKey: annotationStepKey, - scenarioStepsResult, - }) - - return useMemo( - () => ({ - slugCandidates, - annotationStepKey, - errorStep, - }), - [slugCandidates, annotationStepKey, errorStep], - ) -} - -interface EvaluatorRunMetricsProps { - runId: string - scenarioId?: string - evaluatorSlug: string - metrics: DrawerEvaluatorMetric[] - invocationStepKey?: string - scenarioStepsResult?: DrawerMetricValueCellProps["scenarioStepsResult"] - sectionId?: string - metricRowClassName?: string -} - -const EvaluatorRunMetrics = ({ - runId, - scenarioId, - evaluatorSlug, - metrics, - invocationStepKey, - scenarioStepsResult, - sectionId, - metricRowClassName = "flex flex-col items-start gap-2 mb-3", -}: EvaluatorRunMetricsProps) => { - const context = useEvaluatorContext({ - runId, - scenarioId, - evaluatorSlug, - scenarioStepsResult, - }) - - const hasFailure = Boolean(context.errorStep?.status || context.errorStep?.error) - - if (!metrics.length) { - return ( - <div className="flex w-full flex-col items-start gap-2" id={sectionId}> - {hasFailure ? ( - <EvaluatorFailureDisplay - status={context.errorStep?.status} - error={context.errorStep?.error} - editorKey={`evaluator-${runId}-${scenarioId ?? "unknown"}-${evaluatorSlug}`} - /> - ) : null} - <Tag className="bg-[#0517290F] hover:bg-[#05172916]" bordered={false}> - N/A - </Tag> - </div> - ) - } - - return ( - <div className="flex w-full flex-col items-start gap-2" id={sectionId}> - {hasFailure ? ( - <EvaluatorFailureDisplay - status={context.errorStep?.status} - error={context.errorStep?.error} - editorKey={`evaluator-${runId}-${scenarioId ?? "unknown"}-${evaluatorSlug}`} - /> - ) : null} - {metrics.map((metric) => ( - <div - key={`${runId}-${scenarioId ?? "unknown"}-${evaluatorSlug}-${metric.id}`} - className={metricRowClassName} - > - <span>{metric.displayName}</span> - <DrawerMetricValueCell - runId={runId} - scenarioId={scenarioId} - evaluatorSlug={evaluatorSlug} - metricName={metric.displayName} - metricKey={metric.metricKey} - fallbackKeys={metric.fallbackKeys} - invocationStepKey={invocationStepKey} - scenarioStepsResult={scenarioStepsResult} - context={context} - suppressFailure={hasFailure} - /> - </div> - ))} - </div> - ) -} - -interface ScenarioRunMetricsProps { - runId: string - scenarioId?: string - metrics: DrawerEvaluatorMetric[] - sectionId?: string - metricRowClassName?: string -} - -const ScenarioRunMetrics = ({ - runId, - scenarioId, - metrics, - sectionId, - metricRowClassName = "flex flex-col items-start gap-2 mb-3", -}: ScenarioRunMetricsProps) => { - if (!metrics.length) { - return ( - <div className="flex w-full flex-col items-start gap-2" id={sectionId}> - <Tag className="bg-[#0517290F] hover:bg-[#05172916]" bordered={false}> - N/A - </Tag> - </div> - ) - } - - return ( - <div className="flex w-full flex-col items-start gap-2" id={sectionId}> - {metrics.map((metric) => ( - <div - key={`${runId}-${scenarioId ?? "unknown"}-scenario-${metric.id}`} - className={metricRowClassName} - > - <span>{metric.displayName}</span> - <DrawerMetricValueCell - runId={runId} - scenarioId={scenarioId} - evaluatorSlug="__scenario__" - metricName={metric.displayName} - metricKey={metric.metricKey} - fallbackKeys={metric.fallbackKeys} - suppressFailure - /> - </div> - ))} - </div> - ) -} - -const FocusDrawerContent = () => { - const router = useRouter() - const appState = useAppState() - const evalType = useAtomValue(evalTypeAtom) - const isOnlineEval = evalType === "online" - - const [windowHight, setWindowHight] = useState(0) - const [activeKeys, setActiveKeys] = useState<(string | number)[]>([ - "input", - "output", - "evaluators", - ]) - - const {data: previewEvaluators} = useEvaluators({preview: true}) - const {data: projectEvaluators} = useEvaluators() - - // atoms - const focus = useAtomValue(focusScenarioAtom) - const urlState = useAtomValue(urlStateAtom) - const scenarioId = focus?.focusScenarioId as string - const runId = focus?.focusRunId as string - const rawCompareRunIds = Array.isArray(urlState?.compare) ? urlState.compare : [] - const compareRunIdsKey = rawCompareRunIds.join("|") - const evaluationRunData = useAtomValue(evaluationRunStateFamily(runId!)) - const comparisonRunIds = useMemo(() => { - if (!rawCompareRunIds.length) return EMPTY_COMPARISON_RUN_IDS - return rawCompareRunIds.slice() - }, [compareRunIdsKey]) - const rawBaseRunId = useMemo(() => { - const routerValue = router.query?.evaluation_id - if (Array.isArray(routerValue)) { - const firstRouterId = routerValue[0] - if (firstRouterId) return firstRouterId - } else if (typeof routerValue === "string" && routerValue.length > 0) { - return routerValue - } - - const appStateValue = appState.query?.evaluation_id - if (Array.isArray(appStateValue)) { - return appStateValue[0] ?? null - } - - return typeof appStateValue === "string" && appStateValue.length > 0 ? appStateValue : null - }, [appState.query?.evaluation_id, router.query?.evaluation_id]) - - const isBaseRun = useMemo(() => { - if (evaluationRunData?.isBase !== undefined) { - return Boolean(evaluationRunData.isBase) - } - return rawBaseRunId ? runId === rawBaseRunId : false - }, [evaluationRunData?.isBase, rawBaseRunId, runId]) - - const baseRunId = useMemo(() => { - if (evaluationRunData?.isBase) return runId - if (rawBaseRunId && typeof rawBaseRunId === "string") return rawBaseRunId - return runId - }, [evaluationRunData?.isBase, rawBaseRunId, runId]) - - const comparisonRunsStepsAtomInstance = useMemo( - () => comparisonRunsStepsAtom(comparisonRunIds), - [comparisonRunIds], - ) - const comparisonRunsSteps = useAtomValue(comparisonRunsStepsAtomInstance) - // // Derive whether to show comparison mode - const showComparisons = useMemo( - () => Boolean(isBaseRun && comparisonRunIds.length > 0), - [isBaseRun, comparisonRunIds], - ) - const { - data: scenarioStepsData, - state: stepState, - hasResolved: hasResolvedSteps, - error: scenarioStepsError, - } = useCachedScenarioSteps(runId, scenarioId) - - const hasScenarioSteps = - scenarioStepsData && typeof scenarioStepsData === "object" - ? Object.keys(scenarioStepsData).length > 0 - : false - - const enricedRun = evaluationRunData?.enrichedRun - - const annotationSteps = useMemo(() => { - const steps = (enricedRun?.data?.steps || []) as any[] - if (!Array.isArray(steps)) return [] - return steps.filter((step) => step?.type === "annotation") - }, [enricedRun?.data?.steps]) - const runIndex = evaluationRunData?.runIndex - const invocationStep = useMemo( - () => scenarioStepsData?.invocationSteps?.[0], - [scenarioStepsData], - ) - const rawInvocationStepKey = useMemo(() => { - if (!invocationStep) return undefined - return ( - invocationStep?.stepKey || - (invocationStep as any)?.stepkey || - (invocationStep as any)?.step_key || - undefined - ) - }, [invocationStep]) - const firstInvocationKey = useMemo(() => { - if (!runIndex?.invocationKeys || runIndex.invocationKeys.size === 0) return undefined - for (const key of runIndex.invocationKeys) { - if (typeof key === "string" && key.length > 0) return key - } - return undefined - }, [runIndex]) - const invocationStepKey = rawInvocationStepKey ?? firstInvocationKey - const resolvedScenarioId = invocationStep?.scenarioId ?? scenarioId - const { - trace, - value: outputValue, - rawValue: rawOutputValue, - messageNodes, - hasError, - } = useInvocationResult({ - scenarioId: resolvedScenarioId, - stepKey: invocationStepKey, - editorType: "simple", - viewType: "single", - runId, - }) - - const displayOutputValue = useMemo(() => { - if (messageNodes) return undefined - - if (evalType === "online") { - const sources: unknown[] = [ - rawOutputValue, - outputValue, - trace?.data?.outputs, - trace?.data, - trace?.outputs, - trace?.response, - trace?.tree?.nodes, - trace?.nodes, - ] - - const extracted = resolveOnlineOutput(sources) - const fallback = fallbackPrimitive(outputValue) ?? "N/A" - return extracted ?? fallback - } - - return fallbackPrimitive(outputValue) ?? "N/A" - }, [messageNodes, evalType, rawOutputValue, outputValue, trace]) - - const entries = useMemo(() => { - const normalizeValue = (value: unknown): string => { - if (value === null || value === undefined) return "" - if (typeof value === "string") return value - if (typeof value === "number" || typeof value === "boolean") return String(value) - try { - return JSON.stringify(value, null, 2) - } catch { - return String(value) - } - } - - const map = new Map<string, string>() - const pushRecord = (record?: Record<string, unknown> | null) => { - if (!record || typeof record !== "object") return - Object.entries(record).forEach(([key, value]) => { - if (!key || key === "testcase_dedup_id" || key === "testcaseId") return - const normalizedKey = titleCase(key) - if (map.has(normalizedKey)) return - map.set(normalizedKey, normalizeValue(value)) - }) - } - - const pushInputsFrom = (source: any, depth = 0) => { - if (!source || typeof source !== "object" || depth > 4) return - if (Array.isArray(source)) { - source.forEach((item) => pushInputsFrom(item, depth + 1)) - return - } - - Object.entries(source).forEach(([key, value]) => { - if (!value) return - const lower = key.toLowerCase() - if (lower.includes("input")) { - if (typeof value === "object") { - pushRecord(value as Record<string, unknown>) - } else if (lower === "inputs") { - map.set(titleCase(key), normalizeValue(value)) - } - return - } - if ( - lower.includes("request") || - lower.includes("parameter") || - lower.includes("payload") || - lower === "data" || - lower === "attributes" || - lower === "body" - ) { - pushInputsFrom(value, depth + 1) - } - }) - } - - const inputSteps = scenarioStepsData?.inputSteps - if (Array.isArray(inputSteps) && inputSteps.length > 0) { - inputSteps.forEach((inputCol) => { - const testcaseData = - inputCol?.testcase && typeof inputCol.testcase.data === "object" - ? (inputCol.testcase.data as Record<string, unknown>) - : null - if (testcaseData) { - pushRecord(testcaseData) - } else { - pushRecord(((inputCol as any)?.inputs ?? null) as Record<string, unknown>) - } - }) - } - - if (map.size === 0) { - if (invocationStep && typeof invocationStep === "object") { - pushInputsFrom(invocationStep) - const invocationParams = (invocationStep as any)?.invocationParameters - if (invocationParams && typeof invocationParams === "object") { - Object.values(invocationParams as Record<string, any>).forEach((param) => { - pushInputsFrom(param) - }) - } - const inlineParameters = (invocationStep as any)?.parameters - if (inlineParameters && typeof inlineParameters === "object") { - pushInputsFrom(inlineParameters) - } - } - - const traceSources: any[] = [] - if (invocationStep?.trace) traceSources.push(invocationStep.trace) - if (trace) traceSources.push(trace) - traceSources.forEach((source) => { - pushInputsFrom(source) - if (Array.isArray(source?.nodes)) - source.nodes.forEach((node: any) => pushInputsFrom(node)) - if (Array.isArray(source?.tree?.nodes)) - source.tree.nodes.forEach((node: any) => pushInputsFrom(node)) - }) - } - - if (map.size === 0 && trace) { - const fallback = - normalizeValue( - trace?.attributes?.ag?.data?.requestBody?.inputs ?? - trace?.attributes?.ag?.data?.inputs ?? - trace?.attributes?.inputs ?? - trace?.inputs ?? - trace?.data?.inputs, - ) || "" - if (fallback) { - map.set("Inputs", fallback) - } - } - - if (map.size === 0 && invocationStep) { - const fallback = - normalizeValue( - (invocationStep as any)?.inputs ?? - (invocationStep as any)?.parameters?.inputs ?? - (invocationStep as any)?.data ?? - (invocationStep as any)?.result, - ) || "" - if (fallback) { - map.set("Inputs", fallback) - } - } - - return Array.from(map.entries()).map(([k, v]) => ({k, v})) - }, [scenarioStepsData, invocationStep, trace]) - - const inputListHeight = useMemo(() => Math.max(windowHight - 120, 240), [windowHight]) - const hasEntryData = entries.length > 0 - const shouldShowTraceSummary = - isOnlineEval && Boolean(resolvedScenarioId) && Boolean(invocationStepKey) - const traceJson = useMemo(() => { - if (!trace) return null - try { - return JSON.stringify(trace, null, 2) - } catch { - return String(trace) - } - }, [trace]) - - const traceEditorKey = useMemo(() => { - const normalize = (value: unknown) => - typeof value === "string" && value.trim().length > 0 ? value : undefined - - const fromSource = (source: any): string | undefined => { - if (!source || typeof source !== "object") return undefined - return ( - normalize((source as any).trace_id) ?? - normalize((source as any).traceId) ?? - normalize((source as any).id) ?? - (typeof (source as any).span === "object" - ? (normalize((source as any).span?.trace_id) ?? - normalize((source as any).span?.traceId) ?? - normalize((source as any).span?.id)) - : undefined) - ) - } - - return ( - fromSource(trace) ?? - fromSource((invocationStep as any)?.trace) ?? - (scenarioId ? String(scenarioId) : undefined) ?? - "trace" - ) - }, [trace, invocationStep, scenarioId]) - - // Base testcase id to match comparison scenarios by content - const baseTestcaseId = useMemo(() => { - const inputSteps = scenarioStepsData?.inputSteps - const id = inputSteps?.[0]?.testcaseId - return id - }, [scenarioStepsData]) - - // Map of comparison runId -> matched scenarioId (by testcaseId) - const matchedComparisonScenarios = useMemo(() => { - if (!showComparisons || !baseTestcaseId) return [] as {runId: string; scenarioId?: string}[] - return comparisonRunIds.map((compRunId) => { - const compMap = - comparisonRunsSteps && typeof comparisonRunsSteps === "object" - ? ((comparisonRunsSteps as Record<string, any>)[compRunId] as any) || {} - : {} - let matchedScenarioId: string | undefined - for (const [scId, testcaseIds] of Object.entries<any>(compMap)) { - const first = Array.isArray(testcaseIds) ? testcaseIds[0] : undefined - if (first && first === baseTestcaseId) { - matchedScenarioId = scId - break - } - } - return {runId: compRunId, scenarioId: matchedScenarioId} - }) - }, [showComparisons, baseTestcaseId, comparisonRunsSteps, comparisonRunIds]) - - const evaluatorLookupByIdentifier = useMemo(() => { - const map = new Map<string, any>() - const register = (entry: any) => { - const identifiers = collectEvaluatorIdentifiers(entry) - if (!identifiers.length) return - identifiers.forEach((identifier) => { - if (!map.has(identifier)) { - map.set(identifier, entry) - } - }) - } - - asEvaluatorArray(previewEvaluators).forEach(register) - asEvaluatorArray(projectEvaluators).forEach(register) - return map - }, [previewEvaluators, projectEvaluators]) - - const evaluatorMetrics = useMemo(() => { - const rawEvaluators = enricedRun?.evaluators - const list = asEvaluatorArray(rawEvaluators) - return list.map((entry: any, idx: number) => { - const identifierSet = new Set<string>() - collectEvaluatorIdentifiers(entry).forEach((identifier) => - identifierSet.add(identifier), - ) - - let matchedFallback: any - for (const identifier of identifierSet) { - const candidate = evaluatorLookupByIdentifier.get(identifier) - if (candidate) { - matchedFallback = candidate - break - } - } - - if (matchedFallback) { - collectEvaluatorIdentifiers(matchedFallback).forEach((identifier) => - identifierSet.add(identifier), - ) - } - - const slug = extractEvaluatorSlug(entry) ?? extractEvaluatorSlug(matchedFallback) - const resolvedSlug = slug ?? `evaluator-${idx}` - if (resolvedSlug) identifierSet.add(resolvedSlug) - - const displayName = - extractEvaluatorName(entry) ?? - extractEvaluatorName(matchedFallback) ?? - resolvedSlug ?? - `Evaluator ${idx + 1}` - - const metrics = - resolveEvaluatorMetricsMap(entry) ?? - resolveEvaluatorMetricsMap(matchedFallback) ?? - {} - - const aliasSet = new Set<string>(identifierSet) - annotationSteps.forEach((step) => { - const stepEvaluatorSlug = pickString(step?.references?.evaluator?.slug) - const stepEvaluatorId = pickString(step?.references?.evaluator?.id) - const matches = - (stepEvaluatorSlug && identifierSet.has(stepEvaluatorSlug)) || - (stepEvaluatorId && identifierSet.has(stepEvaluatorId)) - if (!matches) return - const stepKey = pickString(step?.key) - if (stepKey) { - aliasSet.add(stepKey) - if (step.origin === "human") { - const parts = stepKey.split(".") - if (parts.length > 1) aliasSet.add(parts[1]) - } - } - if (stepEvaluatorSlug) aliasSet.add(stepEvaluatorSlug) - }) - - return { - name: displayName, - metrics, - slug: resolvedSlug, - aliases: Array.from(aliasSet), - } - }) - }, [annotationSteps, enricedRun?.evaluators, evaluatorLookupByIdentifier]) - - const focusRunMetricsStatsAtom = useMemo(() => { - if (!runId) return emptyStatsAtom - return runMetricsStatsCacheFamily(runId) - }, [runId]) - const focusRunMetricsStatsMap = useAtomValue(focusRunMetricsStatsAtom) - - const scenarioMetricDefinitions = useMemo(() => { - const columns = - evalType === "human" || evalType === "online" - ? GeneralHumanEvalMetricColumns - : GeneralAutoEvalMetricColumns - - const seen = new Set<string>() - - return columns - .map((column) => { - const rawKey = String(column.path || column.name || "").trim() - if (!rawKey) return undefined - const definition = buildDrawerMetricDefinition(undefined, rawKey, column) - if (isInvocationMetricKey(definition.metricKey)) { - return undefined - } - const fallback = new Set<string>(definition.fallbackKeys || []) - fallback.add(rawKey) - const canonical = canonicalizeMetricKey(rawKey) - if (canonical) fallback.add(canonical) - const aliasList = SCENARIO_METRIC_ALIASES[rawKey] || [] - aliasList.forEach((alias) => fallback.add(alias)) - if (canonical && SCENARIO_METRIC_ALIASES[canonical]) { - SCENARIO_METRIC_ALIASES[canonical].forEach((alias) => fallback.add(alias)) - } - if (typeof column.name === "string") { - fallback.add(column.name) - fallback.add(column.name.toLowerCase()) - fallback.add(column.name.replace(/\s+/g, "")) - } - - return { - ...definition, - displayName: column.name ?? definition.displayName, - metricKey: rawKey, - fallbackKeys: Array.from(fallback).filter(Boolean), - } - }) - .filter((metric): metric is DrawerEvaluatorMetric => { - if (!metric) return false - if (seen.has(metric.id)) return false - seen.add(metric.id) - return true - }) - }, [evalType]) - - const evaluatorAliasToSlug = useMemo(() => { - const map = new Map<string, string>() - evaluatorMetrics.forEach((entry) => { - const slug = entry?.slug - if (!slug) return - const aliases = new Set<string>(entry?.aliases || []) - aliases.add(slug) - aliases.forEach((alias) => { - const normalized = pickString(alias) - if (!normalized) return - if (!map.has(normalized)) { - map.set(normalized, slug) - } - }) - }) - return map - }, [evaluatorMetrics]) - - const aggregatedMetricKeys = useMemo(() => { - const sources = new Set<string>() - if (focusRunMetricsStatsMap && typeof focusRunMetricsStatsMap === "object") { - Object.keys(focusRunMetricsStatsMap).forEach((key) => { - const normalized = pickString(key) - if (normalized) sources.add(normalized) - }) - } - return sources - }, [focusRunMetricsStatsMap]) - - const inferredEvaluatorMetricDefinitions = useMemo(() => { - const map = new Map<string, DrawerEvaluatorMetric[]>() - if (!aggregatedMetricKeys.size || !evaluatorAliasToSlug.size) return map - - const recordDefinition = (slug: string, definition: DrawerEvaluatorMetric) => { - const existing = map.get(slug) - if (!existing) { - map.set(slug, [definition]) - return - } - if (!existing.some((entry) => entry.id === definition.id)) { - existing.push(definition) - } - } - - aggregatedMetricKeys.forEach((rawKey) => { - const canonical = canonicalizeMetricKey(rawKey) - if (!canonical || !canonical.includes(".")) return - if (canonical.startsWith("attributes.ag.metrics")) return - - const segments = canonical.split(".").filter(Boolean) - for (let idx = 0; idx < segments.length; idx += 1) { - const prefix = segments.slice(0, idx + 1).join(".") - const slug = evaluatorAliasToSlug.get(prefix) - if (!slug) continue - const metricSegments = segments.slice(idx + 1) - const metricName = metricSegments.join(".") - const baseKey = metricName && metricName.length ? `${slug}.${metricName}` : slug - const aliasCandidates = [canonical, rawKey].filter( - (candidate): candidate is string => Boolean(candidate && candidate !== baseKey), - ) - const definition = buildDrawerMetricDefinition(slug, baseKey, { - aliases: aliasCandidates.length ? aliasCandidates : undefined, - }) - recordDefinition(slug, definition) - break - } - }) - - return map - }, [aggregatedMetricKeys, evaluatorAliasToSlug]) - - const openAndScrollTo = useCallback((key: string) => { - // Ensure the related section is expanded when navigating via hash - setActiveKeys((prev) => { - const next = new Set(prev) - next.add(key) - if (key === "output" || key.startsWith("output-")) next.add("output") - return Array.from(next) - }) - - // wait for Collapse to render/expand, then scroll - const tryScroll = (attempt = 0) => { - const el = document.getElementById(`section-${key}`) - // element is visible when offsetParent is not null (after expand) - if (el && el.offsetParent !== null) { - el.scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"}) - } else if (attempt < 10) { - requestAnimationFrame(() => tryScroll(attempt + 1)) - } - } - requestAnimationFrame(() => tryScroll()) - }, []) - - const handleCollapseChange = useCallback((keys: string[]) => { - // Check if any dropdown is open by looking for the dropdown menu with the 'open' class - // This is for improving micro interactions - const openSelects = document.querySelectorAll( - ".ant-select-dropdown:not(.ant-select-dropdown-hidden)", - ) - const openDropdowns = document.querySelectorAll(".ant-dropdown:not(.ant-dropdown-hidden)") - if (openSelects.length > 0 || openDropdowns.length > 0) { - return - } - setActiveKeys(keys) - }, []) - - useEffect(() => { - setWindowHight(window.innerHeight) - }, [scenarioStepsData]) - - useEffect(() => { - const evaluatorSlugs = evaluatorMetrics - .map((evaluator) => pickString(evaluator.slug)) - .filter(Boolean) as string[] - if (!evaluatorSlugs.length) return - - setActiveKeys((prev) => { - const next = new Set(prev) - let changed = false - - evaluatorSlugs.forEach((slug) => { - if (!next.has(slug)) { - next.add(slug) - changed = true - } - }) - - return changed ? Array.from(next) : prev - }) - }, [evaluatorMetrics]) - - useEffect(() => { - const hash = appState.asPath?.split("#")[1]?.trim() - if (!hash) return - openAndScrollTo(hash) - }, [appState.asPath, openAndScrollTo]) - - // Sync horizontal scroll between the Collapse header (trace) and content box (output) - const isSyncingScroll = useRef(false) - useEffect(() => { - if (!showComparisons) return - - const traceEl = document.querySelector( - ".trace-scroll-container .ant-collapse-header", - ) as HTMLDivElement | null - const outputEl = document.querySelector( - ".output-scroll-container .ant-collapse-content-box", - ) as HTMLDivElement | null - const evalEl = document.querySelector( - ".evaluator-scroll-container .ant-collapse-content-box", - ) as HTMLDivElement | null - - if (!traceEl || !outputEl) return - - const sync = (from: HTMLDivElement) => { - const left = from.scrollLeft - if (outputEl && from !== outputEl) outputEl.scrollLeft = left - if (traceEl && from !== traceEl) traceEl.scrollLeft = left - if (evalEl && from !== evalEl) evalEl.scrollLeft = left - } - - const onTraceScroll = (e: any) => { - if (isSyncingScroll.current) return - isSyncingScroll.current = true - sync(e.currentTarget as HTMLDivElement) - requestAnimationFrame(() => (isSyncingScroll.current = false)) - } - const onOutputScroll = (e: any) => { - if (isSyncingScroll.current) return - isSyncingScroll.current = true - sync(e.currentTarget as HTMLDivElement) - requestAnimationFrame(() => (isSyncingScroll.current = false)) - } - const onEvalScroll = (e: any) => { - if (isSyncingScroll.current) return - isSyncingScroll.current = true - sync(e.currentTarget as HTMLDivElement) - requestAnimationFrame(() => (isSyncingScroll.current = false)) - } - - traceEl.addEventListener("scroll", onTraceScroll) - outputEl.addEventListener("scroll", onOutputScroll) - evalEl?.addEventListener("scroll", onEvalScroll) - - return () => { - traceEl.removeEventListener("scroll", onTraceScroll) - outputEl.removeEventListener("scroll", onOutputScroll) - evalEl?.removeEventListener("scroll", onEvalScroll) - } - }, [showComparisons, activeKeys]) - - const items: CollapseProps["items"] = useMemo(() => { - if (!scenarioStepsData || !scenarioId) return [] - - return [ - { - key: "input", - className: "!rounded-none [&_.ant-collapse-header]:!py-2", - label: ( - <span id="section-input" className="font-medium"> - Inputs - </span> - ), - children: ( - <div className="flex flex-col gap-4 min-h-0 h-fit scroll-mt-2"> - {hasEntryData ? ( - <div className="rounded-lg border border-slate-200 bg-white shadow-sm"> - <VirtualizedSharedEditors - entries={entries} - overscanCount={1} - estimatedRowHeight={120} - className="h-full" - listHeight={inputListHeight} - renderRow={(entry) => { - // Detect chat-shaped JSON like in CellComponents.tsx - let isChat = false - if (typeof entry.v === "string") { - try { - const parsed = JSON.parse(entry.v) - isChat = - Array.isArray(parsed) && - parsed.every( - (m: any) => "role" in m && "content" in m, - ) - } catch { - /* ignore */ - } - } - - if (isChat) { - const nodes = renderChatMessages({ - keyPrefix: `${scenarioId}-${entry.k}`, - rawJson: entry.v as string, - view: "single", - editorType: "simple", - }) - return ( - <div - key={`${entry.k}-${scenarioId}`} - className="flex flex-col gap-2 w-full" - > - {nodes} - </div> - ) - } - - return ( - <SimpleSharedEditor - key={`${entry.k}-${scenarioId}`} - handleChange={() => {}} - headerName={entry.k} - initialValue={String(entry.v)} - editorType="borderless" - state="readOnly" - placeholder="N/A" - disabled - readOnly - editorClassName="!text-xs" - className="!w-[97.5%]" - editorProps={{enableResize: true}} - /> - ) - }} - /> - </div> - ) : !shouldShowTraceSummary ? ( - <span className="text-gray-400">No inputs available</span> - ) : null} - </div> - ), - }, - { - key: "trace", - className: - "trace-scroll-container !rounded-none !px-0 [&_.ant-collapse-header]:!px-0 [&_.ant-collapse-header]:overflow-x-auto [&_.ant-collapse-header]:scroll-mr-2 sticky -top-[13px] z-10 bg-white [&_.ant-collapse-header::-webkit-scrollbar]:!w-0 [&_.ant-collapse-header::-webkit-scrollbar]:!h-0", - collapsible: "disabled", - disabled: true, - showArrow: false, - label: ( - <section - id="section-output" - className="shrink-0 h-[40px] px-1 flex items-center border-0 border-b border-t border-solid border-gray-200" - > - {showComparisons ? ( - <> - <RunTraceHeader - runId={baseRunId} - scenarioId={scenarioId} - stepKey={invocationStepKey} - anchorId={`section-output-${baseRunId}`} - showComparisons={showComparisons} - /> - {matchedComparisonScenarios.map( - ({runId: rId, scenarioId: scId}) => ( - <RunTraceHeader - key={`trace-${rId}`} - runId={rId} - scenarioId={scId} - stepKey={invocationStepKey} - anchorId={`section-output-${rId}`} - showComparisons={showComparisons} - /> - ), - )} - </> - ) : ( - <RunTraceHeader - runId={runId} - scenarioId={scenarioId} - stepKey={invocationStepKey} - showComparisons={showComparisons} - /> - )} - </section> - ), - }, - { - key: "output", - label: <span className="font-medium">Outputs</span>, - className: clsx([ - "output-scroll-container", - "!rounded-none !px-0 [&_.ant-collapse-header]:!py-2 [&_.ant-collapse-content-box]:overflow-x-auto [&_.ant-collapse-content-box]:scroll-mr-2 [&_.ant-collapse-content-box::-webkit-scrollbar]:!w-0 [&_.ant-collapse-content-box::-webkit-scrollbar]:!h-0", - {"[&_.ant-collapse-content-box]:!px-1": showComparisons}, - ]), - children: showComparisons ? ( - <div className="w-full shrink-0 flex items-start"> - <RunOutput - runId={baseRunId} - scenarioId={scenarioId} - stepKey={invocationStepKey} - showComparisons={showComparisons} - /> - {matchedComparisonScenarios.map(({runId: rId, scenarioId: scId}) => ( - <RunOutput - key={`output-${rId}`} - runId={rId} - scenarioId={scId} - stepKey={invocationStepKey} - showComparisons={showComparisons} - /> - ))} - </div> - ) : ( - <div className="min-h-0"> - {messageNodes ? ( - messageNodes - ) : ( - <SimpleSharedEditor - key={`output-${scenarioId}`} - handleChange={() => {}} - initialValue={displayOutputValue} - headerName="Output" - editorType="borderless" - state="readOnly" - disabled - readOnly - editorClassName="!text-xs" - error={hasError} - placeholder="N/A" - className="!w-[97.5%]" - /> - )} - </div> - ), - }, - ...(!showComparisons && scenarioMetricDefinitions.length && runId - ? [ - { - key: "metrics", - label: <span className="font-medium">Metrics</span>, - className: - "!rounded-none [&_.ant-collapse-header]:!py-2 [&_.ant-collapse-content-box]:!px-2", - children: ( - <ScenarioRunMetrics - runId={runId} - scenarioId={scenarioId} - metrics={scenarioMetricDefinitions} - sectionId="section-scenario-metrics" - metricRowClassName="flex flex-col items-start gap-1 mb-3 ml-2" - /> - ), - }, - ] - : []), - ...(showComparisons - ? [ - { - key: "evaluators", - label: null, - disabled: true, - showArrow: false, - className: - "evaluator-scroll-container !rounded-none [&_.ant-collapse-header]:!hidden [&_.ant-collapse-content-box]:overflow-x-auto [&_.ant-collapse-content-box]:!px-0 [&_.ant-collapse-content-box::-webkit-scrollbar]:!w-0 [&_.ant-collapse-content-box::-webkit-scrollbar]:!h-0", - children: (() => { - const runs = [ - {runId: baseRunId, scenarioId}, - ...matchedComparisonScenarios.map((m) => ({ - runId: m.runId, - scenarioId: m.scenarioId, - })), - ] - - // Helper: collect evaluator list for a run - const getRunEvaluators = (rId?: string | null) => { - if (!rId) { - return [] - } - const rState = getDefaultStore().get( - evaluationRunStateFamily(rId), - ) - const evaluators = rState?.enrichedRun?.evaluators || [] - return Array.isArray(evaluators) - ? evaluators - : (Object.values(evaluators) as any[]) - } - - // Build ordered set of evaluator slugs (base run first, then others) - const slugOrder = new Set<string>() - const slugName: Record<string, string> = {} - runs.forEach(({runId: rId}) => { - const list = getRunEvaluators(rId) - list.forEach((ev: any) => { - slugOrder.add(ev.slug) - if (!slugName[ev.slug]) slugName[ev.slug] = ev.name || ev.slug - }) - }) - - const baseScenarioStepsResult = { - data: scenarioStepsData, - state: stepState, - hasResolved: hasResolvedSteps, - error: scenarioStepsError, - } - - // Build the vertical list of evaluators with per-run metric columns - const orderedSlugs = Array.from(slugOrder) - - return ( - <div className="w-full flex flex-col"> - {scenarioMetricDefinitions.length ? ( - <div className="w-full" id="section-scenario-metrics"> - <div className="w-full shrink-0 flex items-stretch"> - <div className="w-[500px] shrink-0 font-medium px-3 h-[48px] border-0 border-b border-t border-solid border-gray-200 flex items-center sticky left-0 z-10 bg-white"> - <span className="">Scenario metrics</span> - </div> - {runs.slice(1).map((_, idx) => ( - <div - key={`scenario-ph-${idx}`} - className="w-[480px] shrink-0 h-[48px] border-0 border-b border-t border-solid border-gray-200" - /> - ))} - <div className="flex-1 min-w-0 h-[48px] border-0 border-b border-t border-solid border-gray-200" /> - </div> - <div className="w-full shrink-0 flex items-start"> - {runs.map(({runId: rId, scenarioId: scId}) => ( - <div - key={`scenario-metrics-${rId}`} - className="w-[480px] shrink-0 px-3 border-0 border-r border-solid border-white" - > - <ScenarioRunMetrics - runId={rId} - scenarioId={scId} - metrics={scenarioMetricDefinitions} - sectionId={ - rId === runId - ? "section-scenario-metrics" - : undefined - } - metricRowClassName="flex flex-col items-start gap-2 mb-3" - /> - </div> - ))} - </div> - </div> - ) : null} - {orderedSlugs.map((slug) => { - // Figure out which runs used this evaluator - const usedBy = new Set( - runs - .filter(({runId: rId, scenarioId: scId}) => { - if (!scId) return false - const list = getRunEvaluators(rId) - return list.some((e: any) => e.slug === slug) - }) - .map((r) => r.runId), - ) - - if (usedBy.size === 0) return null - - // Union of metric keys across participating runs only - const metricKeyOrder = new Map< - string, - DrawerEvaluatorMetric - >() - runs.forEach(({runId: rId}) => { - if (!usedBy.has(rId)) return - const list = getRunEvaluators(rId) - const ev = list.find((e: any) => e.slug === slug) - const metricsMeta = (ev?.metrics || {}) as Record< - string, - any - > - - Object.entries(metricsMeta).forEach( - ([rawKey, meta]) => { - const keyString = String(rawKey) - if (isInvocationMetricKey(keyString)) return - const definition = - buildDrawerMetricDefinition( - slug, - keyString, - meta, - ) - const mapKey = `${slug}::${definition.id}` - const existing = metricKeyOrder.get(mapKey) - if (!existing) { - metricKeyOrder.set(mapKey, definition) - } else { - const mergedFallback = new Set<string>([ - ...(existing.fallbackKeys || []), - ...(definition.fallbackKeys || []), - ]) - metricKeyOrder.set(mapKey, { - ...existing, - metricKey: - existing.metricKey ?? - definition.metricKey, - fallbackKeys: mergedFallback.size - ? Array.from(mergedFallback) - : undefined, - }) - } - }, - ) - }) - - const inferredDefs = - inferredEvaluatorMetricDefinitions.get(slug) || [] - inferredDefs.forEach((definition) => { - const mapKey = `${slug}::${definition.id}` - if (!metricKeyOrder.has(mapKey)) { - metricKeyOrder.set(mapKey, definition) - } - }) - - const metricDefs = dedupeEvaluatorMetricDefinitions( - filterInvocationMetricDefinitions( - Array.from(metricKeyOrder.values()), - ), - slug, - ) - if (!metricDefs.length) return null - const displayName = slugName[slug] || slug - - return ( - <div - key={slug} - className="w-full" - id={`section-${slug}`} - > - <div className="w-full shrink-0 flex items-stretch"> - <div className="w-[500px] shrink-0 font-medium px-3 h-[48px] border-0 border-b border-t border-solid border-gray-200 flex items-center sticky left-0 z-10 bg-white"> - <span className="">{displayName}</span> - </div> - {runs.slice(1).map((_, idx) => ( - <div - key={`ph-${slug}-${idx}`} - className="w-[480px] shrink-0 h-[48px] border-0 border-b border-t border-solid border-gray-200" - /> - ))} - <div className="flex-1 min-w-0 h-[48px] border-0 border-b border-t border-solid border-gray-200" /> - </div> - <div className="w-full shrink-0 flex items-start"> - {runs.map( - ({runId: rId, scenarioId: scId}) => { - const hasThis = usedBy.has(rId) - return ( - <div - key={`run-${slug}-${rId}`} - className="w-[480px] shrink-0 px-3 border-0 border-r border-solid border-white" - > - {hasThis ? ( - <EvaluatorRunMetrics - runId={rId} - scenarioId={scId} - evaluatorSlug={slug} - metrics={metricDefs} - invocationStepKey={ - invocationStepKey - } - scenarioStepsResult={ - rId === runId - ? baseScenarioStepsResult - : undefined - } - sectionId={ - rId === runId - ? `section-${slug}` - : undefined - } - metricRowClassName="flex flex-col items-start gap-2 mb-3" - /> - ) : ( - // Support structure to preserve column spacing - <div className="min-h-[1px]" /> - )} - </div> - ) - }, - )} - </div> - </div> - ) - })} - </div> - ) - })(), - }, - ] - : (evaluatorMetrics || []).map((evaluator, idx) => { - const metrics = evaluator.metrics - const isFirst = idx === 0 - const prevSlug = evaluatorMetrics?.[idx - 1]?.slug - const isPrevOpen = !!(prevSlug && activeKeys.includes(prevSlug)) - - const metricMap = new Map<string, DrawerEvaluatorMetric>() - Object.entries(metrics || {}).forEach(([rawKey, meta]) => { - const keyString = String(rawKey) - if (isInvocationMetricKey(keyString)) return - const definition = buildDrawerMetricDefinition( - evaluator.slug, - keyString, - meta, - ) - const mapKey = `${evaluator.slug}::${definition.id}` - const existing = metricMap.get(mapKey) - if (!existing) { - metricMap.set(mapKey, definition) - } else { - const mergedFallback = new Set<string>([ - ...(existing.fallbackKeys || []), - ...(definition.fallbackKeys || []), - ]) - metricMap.set(mapKey, { - ...existing, - metricKey: existing.metricKey ?? definition.metricKey, - fallbackKeys: mergedFallback.size - ? Array.from(mergedFallback) - : undefined, - }) - } - }) - - // Object.entries(metrics || {}).forEach(([rawKey, meta]) => { - // if (meta.properties) { - // Object.entries(meta.properties).forEach(([propKey, propMeta]) => { - // metricHelper(propMeta, `${rawKey}.${propKey}`) - // }) - // } else { - // metricHelper(meta, rawKey) - // } - // }) - const inferredDefs = - inferredEvaluatorMetricDefinitions.get(evaluator.slug) || [] - inferredDefs.forEach((definition) => { - const mapKey = `${evaluator.slug}::${definition.id}` - if (!metricMap.has(mapKey)) { - metricMap.set(mapKey, definition) - } - }) - const metricDefs = dedupeEvaluatorMetricDefinitions( - filterInvocationMetricDefinitions(Array.from(metricMap.values())), - evaluator.slug, - ) - if (!metricDefs.length) return null - - if (!evaluator) return null - return { - key: evaluator.slug, - label: ( - <span id={idx === 0 ? "evaluator" : ""} className="font-medium"> - {evaluator.name} - </span> - ), - className: clsx( - "[&_.ant-collapse-header]:border-0 [&_.ant-collapse-header]:border-solid [&_.ant-collapse-header]:border-gray-200", - "[&_.ant-collapse-header]:!rounded-none [&_.ant-collapse-header]:!py-[9px]", - "[&_.ant-collapse-header]:border-b", - { - // Top border for first item or when previous evaluator is open - "[&_.ant-collapse-header]:border-t": isFirst || isPrevOpen, - }, - ), - children: ( - <EvaluatorRunMetrics - runId={runId!} - scenarioId={scenarioId!} - evaluatorSlug={evaluator.slug} - metrics={metricDefs} - invocationStepKey={invocationStepKey} - scenarioStepsResult={{ - data: scenarioStepsData, - state: stepState, - hasResolved: hasResolvedSteps, - error: scenarioStepsError, - }} - sectionId={`section-${evaluator.slug}`} - metricRowClassName="flex flex-col items-start gap-1 mb-3 w-full" - /> - ), - } - })), - ] - }, [ - entries, - stepState, - windowHight, - rawOutputValue, - trace, - enricedRun?.name, - scenarioId, - activeKeys, - messageNodes, - hasError, - displayOutputValue, - comparisonRunIds, - showComparisons, - matchedComparisonScenarios, - baseRunId, - invocationStepKey, - invocationStep?.stepkey, - evaluatorMetrics, - inferredEvaluatorMetricDefinitions, - ]) - - if ((!scenarioStepsData && !hasResolvedSteps) || !enricedRun || !runId) { - return <FocusDrawerContentSkeleton /> - } - - return ( - <section className="h-full flex flex-col gap-2 scroll-smooth pb-2"> - <Collapse - ghost - activeKey={activeKeys} - onChange={handleCollapseChange} - expandIconPosition="end" - items={items} - className="h-full !rounded-none" - /> - </section> - ) -} - -export default FocusDrawerContent diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/lib/helpers.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/lib/helpers.ts deleted file mode 100644 index e043510fe5..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerContent/lib/helpers.ts +++ /dev/null @@ -1,415 +0,0 @@ -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {DrawerEvaluatorMetric, DrawerMetricValueCellProps} from ".." -import {canonicalizeMetricKey} from "@/oss/lib/metricUtils" -import {getMetricsFromEvaluator} from "@/oss/components/pages/observability/drawer/AnnotateDrawer/assets/transforms" - -export const SCENARIO_METRIC_ALIASES: Record<string, string[]> = { - "attributes.ag.metrics.costs.cumulative.total": ["totalCost", "costs.total", "cost"], - "attributes.ag.metrics.duration.cumulative": ["duration.total", "duration"], - "attributes.ag.metrics.tokens.cumulative.total": ["totalTokens", "tokens.total", "tokens"], - "attributes.ag.metrics.errors.cumulative": ["errors"], - totalCost: ["attributes.ag.metrics.costs.cumulative.total", "costs.total", "cost"], - "duration.total": ["attributes.ag.metrics.duration.cumulative", "duration"], - totalTokens: ["attributes.ag.metrics.tokens.cumulative.total", "tokens.total", "tokens"], - promptTokens: ["attributes.ag.metrics.tokens.cumulative.total", "tokens", "tokens.prompt"], - completionTokens: [ - "attributes.ag.metrics.tokens.cumulative.total", - "tokens", - "tokens.completion", - ], - errors: ["attributes.ag.metrics.errors.cumulative"], -} - -export const asEvaluatorArray = (input: any): any[] => { - if (!input) return [] - if (Array.isArray(input)) return input - if (typeof input === "object") return Object.values(input) - return [] -} - -export const pickString = (candidate: unknown): string | undefined => { - if (typeof candidate === "string") { - const trimmed = candidate.trim() - if (trimmed.length > 0) return trimmed - } - return undefined -} - -export const collectEvaluatorIdentifiers = (entry: any): string[] => { - if (!entry || typeof entry !== "object") return [] - const ids = new Set<string>() - ;[ - entry.slug, - entry.id, - entry.key, - entry.uid, - entry.evaluator_key, - entry?.data?.slug, - entry?.data?.id, - entry?.data?.key, - entry?.data?.evaluator_key, - entry?.meta?.slug, - entry?.meta?.id, - entry?.meta?.key, - entry?.flags?.slug, - entry?.flags?.id, - entry?.flags?.key, - entry?.flags?.evaluator_key, - entry?.references?.slug, - entry?.references?.id, - entry?.references?.key, - ].forEach((candidate) => { - const value = pickString(candidate) - if (value) ids.add(value) - }) - return Array.from(ids) -} - -export const extractEvaluatorSlug = (entry: any): string | undefined => { - if (!entry || typeof entry !== "object") return undefined - const candidates = collectEvaluatorIdentifiers(entry) - if (candidates.length) return candidates[0] - return undefined -} - -export const extractEvaluatorName = (entry: any): string | undefined => { - if (!entry || typeof entry !== "object") return undefined - const candidates = [ - entry?.name, - entry?.displayName, - entry?.display_name, - entry?.title, - entry?.label, - entry?.meta?.displayName, - entry?.meta?.display_name, - entry?.meta?.name, - entry?.flags?.display_name, - entry?.flags?.name, - entry?.data?.display_name, - entry?.data?.name, - ] - for (const candidate of candidates) { - const value = pickString(candidate) - if (value) return value - } - return undefined -} - -export const asRecord = (value: any): Record<string, any> | undefined => { - if (!value || typeof value !== "object" || Array.isArray(value)) return undefined - const entries = Object.entries(value) - if (!entries.length) return undefined - return value as Record<string, any> -} - -export const extractSchemaProperties = (entry: any): Record<string, any> | undefined => { - if (!entry || typeof entry !== "object") return undefined - const candidates = [ - entry?.data?.schemas?.outputs?.properties, - entry?.data?.schemas?.output?.properties, - entry?.data?.service?.format?.properties?.outputs?.properties, - entry?.data?.service?.properties?.outputs?.properties, - entry?.data?.output_schema?.properties, - entry?.data?.outputs_schema?.properties, - entry?.output_schema?.properties, - entry?.schema?.properties, - ] - for (const candidate of candidates) { - const record = asRecord(candidate) - if (record) return record - } - return undefined -} - -export const resolveEvaluatorMetricsMap = (entry: any): Record<string, any> | undefined => { - if (!entry || typeof entry !== "object") return undefined - const direct = asRecord(entry.metrics) - if (direct) return direct - - const schemaProps = extractSchemaProperties(entry) - if (schemaProps) return schemaProps - - const derived = asRecord(getMetricsFromEvaluator(entry as any)) - if (derived) return derived - - return undefined -} - -export const normalizeMetricPrimaryKey = (slug: string | undefined, rawKey: string): string => { - const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined - const trimmed = rawKey.trim() - if (!trimmed) return normalizedSlug ?? "" - if (normalizedSlug) { - const prefix = `${normalizedSlug}.` - if (trimmed.startsWith(prefix)) return trimmed - } - if (trimmed.includes(".")) return trimmed - return normalizedSlug ? `${normalizedSlug}.${trimmed}` : trimmed -} - -export const collectMetricFallbackKeys = ( - slug: string | undefined, - rawKey: string, - primaryKey: string, - meta: any, -): string[] => { - const set = new Set<string>() - const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined - const push = (value?: string) => { - if (!value) return - const trimmed = String(value).trim() - if (!trimmed) return - if (trimmed.includes(".") || !normalizedSlug) { - set.add(trimmed) - } else { - set.add(`${normalizedSlug}.${trimmed}`) - } - } - - push(rawKey) - - const aliases = Array.isArray(meta?.aliases) - ? meta?.aliases - : meta?.aliases - ? [meta.aliases] - : meta?.alias - ? [meta.alias] - : [] - aliases.forEach(push) - - const extraKeys = [ - meta?.metricKey, - meta?.metric_key, - meta?.key, - meta?.path, - meta?.fullKey, - meta?.full_key, - meta?.canonicalKey, - meta?.canonical_key, - meta?.statsKey, - meta?.stats_key, - meta?.metric, - ] - extraKeys.forEach(push) - - const fallbackKeys = Array.from(set).filter((value) => value !== rawKey && value !== primaryKey) - return fallbackKeys -} - -export const stripOutputsPrefixes = (key: string): string => { - let result = key - const OUTPUT_PREFIX = "attributes.ag.data.outputs." - const METRIC_PREFIX = "attributes.ag.metrics." - while (result.startsWith(OUTPUT_PREFIX)) { - result = result.slice(OUTPUT_PREFIX.length) - } - while (result.startsWith(METRIC_PREFIX)) { - result = result.slice(METRIC_PREFIX.length) - } - return result -} - -export const buildDrawerMetricDefinition = ( - slug: string | undefined, - rawKey: string, - meta: any, -): DrawerEvaluatorMetric => { - const normalizedSlug = slug && slug.trim().length > 0 ? slug.trim() : undefined - const normalizedDisplayBase = - normalizedSlug && rawKey.startsWith(`${normalizedSlug}.`) - ? rawKey.slice(normalizedSlug.length + 1) - : rawKey - const normalizedDisplay = stripOutputsPrefixes(normalizedDisplayBase) - const primaryKey = normalizeMetricPrimaryKey(slug, rawKey) - const fallbackKeys = collectMetricFallbackKeys(slug, rawKey, primaryKey, meta) - const id = canonicalizeMetricKey(primaryKey) || primaryKey - - return { - id, - displayName: normalizedDisplay || primaryKey, - metricKey: primaryKey, - fallbackKeys: fallbackKeys.length ? fallbackKeys : undefined, - } -} - -export const collectCandidateSteps = (data?: UseEvaluationRunScenarioStepsFetcherResult): any[] => { - if (!data) return [] - const buckets: any[] = [] - if (Array.isArray(data.annotationSteps)) buckets.push(...(data.annotationSteps as any[])) - if (Array.isArray(data.steps)) buckets.push(...(data.steps as any[])) - if (Array.isArray(data.invocationSteps)) buckets.push(...(data.invocationSteps as any[])) - return buckets -} - -export const collectSlugCandidates = ( - data: UseEvaluationRunScenarioStepsFetcherResult | undefined, - evaluatorSlug: string, -): string[] => { - const set = new Set<string>() - const push = (value?: string | null) => { - if (!value) return - const normalized = String(value).trim() - if (!normalized) return - set.add(normalized) - } - - push(evaluatorSlug) - - const steps = collectCandidateSteps(data) - steps.forEach((step) => { - if (!step) return - const ref: any = step?.references?.evaluator - push(step?.stepKey as any) - push(step?.stepkey as any) - push(step?.step_key as any) - push(ref?.slug) - push(ref?.key) - push(ref?.id) - }) - - return Array.from(set) -} - -export const findAnnotationStepKey = ( - data: UseEvaluationRunScenarioStepsFetcherResult | undefined, - slugCandidates: string[], -): string | undefined => { - if (!data) return undefined - - const steps = collectCandidateSteps(data) - if (!steps.length) return undefined - - const loweredCandidates = slugCandidates - .map((slug) => String(slug).toLowerCase()) - .filter((slug) => slug.length > 0) - - const matched = steps.find((step) => { - if (!step) return false - const possible: string[] = [ - (step as any)?.stepKey, - (step as any)?.stepkey, - (step as any)?.step_key, - (step as any)?.references?.evaluator?.slug, - (step as any)?.references?.evaluator?.key, - (step as any)?.references?.evaluator?.id, - ] - - return possible - .filter(Boolean) - .map((value) => String(value).toLowerCase()) - .some((candidate) => loweredCandidates.includes(candidate)) - }) - - return ( - (matched as any)?.stepKey ?? - (matched as any)?.stepkey ?? - (matched as any)?.step_key ?? - undefined - ) -} - -/** Return the best primitive/array value from annotationSteps[].annotation.data.outputs */ -export const getFromAnnotationOutputs = ({ - scenarioStepsResult, - slugCandidates, - evaluatorSlug, - expandedCandidates, -}: { - scenarioStepsResult?: DrawerMetricValueCellProps["scenarioStepsResult"] - slugCandidates: string[] - evaluatorSlug: string - expandedCandidates: string[] -}): {value: any; matchedKey?: string} | undefined => { - const data = scenarioStepsResult?.data - if (!data || !Array.isArray(data.annotationSteps)) return undefined - - // choose only annotation steps that belong to any of our slug candidates - const pool = new Set(slugCandidates.map((s) => String(s).toLowerCase())) - const steps = (data.annotationSteps as any[]).filter((s) => { - const sk = s?.stepKey ?? s?.stepkey ?? s?.step_key - const ref = s?.references?.evaluator - const ids = [sk, ref?.slug, ref?.key, ref?.id] - .filter(Boolean) - .map((x) => String(x).toLowerCase()) - return ids.some((id) => pool.has(id)) - }) - - if (!steps.length) return undefined - - // outputs pockets we’re allowed to read as fallback - const outputsOf = (s: any) => - [s?.annotation?.data?.outputs, s?.data?.outputs, s?.outputs].filter( - (o) => o && typeof o === "object", - ) as Record<string, any>[] - - const isPrimitive = (v: unknown) => - v === null || ["string", "number", "boolean"].includes(typeof v) - - const stripPfx = (k: string) => { - const PFX = [ - "attributes.ag.data.outputs.", - "ag.data.outputs.", - "outputs.", - `${evaluatorSlug}.`, - ] - for (const p of PFX) if (k.startsWith(p)) return k.slice(p.length) - return k - } - - const pathGet = (obj: any, path: string) => - path.split(".").reduce((acc, k) => (acc == null ? acc : acc[k]), obj) - - // 1) exact/bare path tries inside outputs - for (const s of steps) { - for (const outs of outputsOf(s)) { - for (const cand of expandedCandidates) { - const bare = stripPfx(cand) - for (const v of new Set<string>([stripPfx(cand), bare, `extra.${bare}`])) { - const val = pathGet(outs, v) - if (val !== undefined && (isPrimitive(val) || Array.isArray(val))) { - return {value: val, matchedKey: v} - } - } - } - } - } - - // 2) fuzzy DFS through outputs (skip schema objects like { type: ... }) - const canonical = (s?: string) => - typeof s === "string" ? s.toLowerCase().replace(/[^a-z0-9]+/g, "") : "" - - const terminals = new Set( - expandedCandidates.map((k) => stripPfx(k).split(".").pop()!).map(canonical), - ) - - const looksLikeSchema = (o: any) => - o && - typeof o === "object" && - !Array.isArray(o) && - Object.keys(o).length <= 2 && - "type" in o && - (Object.keys(o).length === 1 || "description" in o) - - const dfs = (obj: any, path: string[] = []): {value: any; matchedKey: string} | undefined => { - if (!obj || typeof obj !== "object") return - for (const [k, v] of Object.entries(obj)) { - const p = [...path, k] - if (isPrimitive(v) || Array.isArray(v)) { - const hit = terminals.has(canonical(k)) || terminals.has(canonical(p[p.length - 1])) - if (hit) return {value: v, matchedKey: p.join(".")} - } else if (!looksLikeSchema(v)) { - const h = dfs(v, p) - if (h) return h - } - } - } - - for (const s of steps) { - for (const outs of outputsOf(s)) { - const hit = dfs(outs) - if (hit) return hit - } - } - - return undefined -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerHeader/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerHeader/index.tsx deleted file mode 100644 index 5893c3b37b..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerHeader/index.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import {useCallback, useMemo, useState} from "react" - -import {CaretDown, CaretUp, Check, Copy} from "@phosphor-icons/react" -import {Button, Tag} from "antd" -import {atom, useAtomValue} from "jotai" - -import EvalRunScenarioNavigator from "@/oss/components/EvalRunDetails/components/EvalRunScenarioNavigator" -import {useCachedScenarioSteps} from "@/oss/components/EvalRunDetails/hooks/useCachedScenarioSteps" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {focusScenarioAtom} from "@/oss/components/EvalRunDetails/state/focusScenarioAtom" -import TooltipWithCopyAction from "@/oss/components/TooltipWithCopyAction" -import {scenariosFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {useAppNavigation} from "@/oss/state/appState" - -import FocusDrawerHeaderSkeleton from "../Skeletons/FocusDrawerHeaderSkeleton" - -const FocusDrawerHeader = () => { - const [isCopy, setIsCopy] = useState(false) - const focus = useAtomValue(focusScenarioAtom) - const evalType = useAtomValue(evalTypeAtom) - const navigation = useAppNavigation() - - const runId = focus?.focusRunId as string - const focusScenarioId = focus?.focusScenarioId as string - const isOnlineEval = evalType === "online" - const scenarioLabel = isOnlineEval ? "scenario" : "testcase" - - const handleScenarioChange = useCallback( - (nextScenarioId: string) => { - navigation.patchQuery( - { - focusScenarioId: nextScenarioId, - focusRunId: runId, - }, - {shallow: true}, - ) - }, - [navigation, runId], - ) - - const { - data: scenarioSteps, - state: stepState, - hasResolved, - } = useCachedScenarioSteps(runId, focusScenarioId) - - const emptyScenarioListAtom = useMemo(() => atom<any[]>([]), []) - const scenariosAtom = useMemo(() => { - if (!runId) return emptyScenarioListAtom - return scenariosFamily(runId) - }, [runId, emptyScenarioListAtom]) - const scenarios = useAtomValue(scenariosAtom) ?? [] - - const selectedScenario = useMemo( - () => scenarios.find((s) => s.id === focusScenarioId), - [scenarios, focusScenarioId], - ) - - const selectedScenarioIndex = useMemo(() => { - if (!selectedScenario) return null - if (typeof selectedScenario.scenarioIndex === "number") { - return selectedScenario.scenarioIndex - } - const derivedIndex = scenarios.findIndex((s) => s.id === selectedScenario.id) - return derivedIndex === -1 ? null : derivedIndex + 1 - }, [selectedScenario, scenarios]) - - const loadPrevVariant = useCallback(() => { - if (!selectedScenario) return - const currentIndex = (selectedScenarioIndex || 1) - 1 - const prevIndex = currentIndex - 1 - if (prevIndex < 0) return - const prevScenario = scenarios[prevIndex] - if (!prevScenario) return - handleScenarioChange(prevScenario.id) - }, [handleScenarioChange, selectedScenario, selectedScenarioIndex, scenarios]) - - const loadNextVariant = useCallback(() => { - if (!selectedScenario) return - const currentIndex = (selectedScenarioIndex || 1) - 1 - const nextIndex = currentIndex + 1 - const nextScenario = scenarios[nextIndex] - if (!nextScenario) return - handleScenarioChange(nextScenario.id) - }, [handleScenarioChange, selectedScenario, selectedScenarioIndex, scenarios]) - - const isDisablePrev = useMemo( - () => !selectedScenario || selectedScenarioIndex === 1, - [selectedScenario, selectedScenarioIndex], - ) - const isDisableNext = useMemo( - () => !selectedScenario || selectedScenarioIndex === scenarios.length, - [selectedScenario, selectedScenarioIndex, scenarios], - ) - - if (!hasResolved && stepState === "loading") { - return <FocusDrawerHeaderSkeleton /> - } - - return ( - <div className="flex items-center justify-between"> - <div className="flex items-center gap-2"> - <div className="flex items-center gap-1"> - <Button - icon={<CaretUp size={16} />} - size="small" - type="text" - onClick={loadPrevVariant} - disabled={isDisablePrev} - /> - <Button - icon={<CaretDown size={16} />} - size="small" - type="text" - onClick={loadNextVariant} - disabled={isDisableNext} - /> - </div> - {runId ? ( - <EvalRunScenarioNavigator - querySelectorName="focusScenarioId" - runId={runId} - activeId={selectedScenario?.id} - showStatus={false} - selectProps={{ - style: {minWidth: 130}, - className: "!py-0 !h-6", - size: "small", - placeholder: `Navigate in a ${scenarioLabel} ##`, - onSelect: (id) => handleScenarioChange(id), - classNames: {popup: {root: "!p-0 !min-w-[180px]"}}, - }} - showOnlySelect - /> - ) : null} - {scenarioSteps?.inputSteps?.map((input) => { - const rawIdentifier = - input?.testcaseId ?? (input as any)?.scenarioId ?? undefined - const identifier = - rawIdentifier === undefined || rawIdentifier === null - ? undefined - : String(rawIdentifier) - if (!identifier) return null - - return ( - <TooltipWithCopyAction - key={identifier} - copyText={identifier} - title={`Copy ${scenarioLabel} id`} - > - <Tag - bordered={false} - className="bg-[#0517290F] font-mono flex items-center gap-2" - onClick={() => { - setIsCopy(true) - setTimeout(() => { - setIsCopy(false) - }, 1500) - }} - > - {identifier} {isCopy ? <Check size={14} /> : <Copy size={14} />} - </Tag> - </TooltipWithCopyAction> - ) - })} - </div> - </div> - ) -} - -export default FocusDrawerHeader diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerSidePanel/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerSidePanel/index.tsx deleted file mode 100644 index e440c43f9e..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/FocusDrawerSidePanel/index.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import {Key, useCallback, useMemo} from "react" - -import {TreeStructure, Download, Sparkle, Speedometer} from "@phosphor-icons/react" -import {Tree, TreeDataNode} from "antd" -import deepEqual from "fast-deep-equal" -import {atom} from "jotai" -import {useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" -import {useRouter} from "next/router" - -import {focusScenarioAtom} from "@/oss/components/EvalRunDetails/state/focusScenarioAtom" -import {urlStateAtom} from "@/oss/components/EvalRunDetails/state/urlState" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import FocusDrawerSidePanelSkeleton from "../Skeletons/FocusDrawerSidePanelSkeleton" - -// Helper atom to read multiple run states given a list of runIds -const evaluationsRunFamily = atomFamily( - (runIds: string[]) => - atom((get) => { - return runIds.map((runId) => get(evaluationRunStateFamily(runId))) - }), - deepEqual, -) - -const FocusDrawerSidePanel = () => { - const router = useRouter() - const urlState = useAtomValue(urlStateAtom) - const focus = useAtomValue(focusScenarioAtom) - const compareRunIds = (urlState?.compare || []) as string[] - const focusRunId = focus?.focusRunId! - const focusRunState = useAtomValue(evaluationRunStateFamily(focusRunId)) - const baseRunId = useMemo(() => { - if (focusRunState?.isBase) return focusRunId - const routerValue = router.query?.evaluation_id - if (Array.isArray(routerValue)) { - return routerValue[0] ?? focusRunId - } - if (typeof routerValue === "string" && routerValue.length > 0) { - return routerValue - } - return focusRunId - }, [focusRunId, focusRunState?.isBase, router.query?.evaluation_id]) - const isComparison = Array.isArray(compareRunIds) && compareRunIds.length > 0 - const isBaseRun = focusRunState?.isBase ?? focusRunId === baseRunId - - // Read base run and all comparison run states - const runIds = useMemo(() => { - if (!isComparison) return [baseRunId] - if (!isBaseRun && isComparison) return [focusRunId] - - return [baseRunId, ...compareRunIds] - }, [baseRunId, compareRunIds, focusRunId, isBaseRun, isComparison]) - - const runs = useAtomValue(evaluationsRunFamily(runIds)) - - const baseEvaluation = useMemo( - () => runs.find((r) => r?.enrichedRun?.id === baseRunId), - [runs, baseRunId], - ) - const baseEvaluators = useMemo( - () => baseEvaluation?.enrichedRun?.evaluators || [], - [baseEvaluation], - ) - - // Build deduped evaluator list across all runs when in comparison mode - const dedupedEvaluators = useMemo(() => { - if (isBaseRun && !isComparison) return baseEvaluators - - const map = new Map<string, {slug: string; name: string}>() - runs?.forEach((r) => { - r?.enrichedRun?.evaluators?.forEach((e) => { - if (!map.has(e.slug)) map.set(e.slug, {slug: e.slug, name: e.name}) - }) - }) - return Array.from(map.values()) - }, [isComparison, runs, baseEvaluators, isBaseRun]) - - // Output children: evaluation names (base + comparisons) when in comparison mode - const outputChildren: TreeDataNode[] = useMemo(() => { - if (!isComparison || (!isBaseRun && isComparison)) return [] - return runs - .map((r) => r?.enrichedRun) - .filter(Boolean) - .map((enriched) => ({ - title: enriched!.name, - key: `output-${enriched!.id}`, - icon: <Sparkle size={14} className="text-[#13C2C2]" />, - })) as TreeDataNode[] - }, [isComparison, runs, isBaseRun]) - - const treeData: TreeDataNode[] = useMemo(() => { - if (!focusRunId) return [] - return [ - { - title: "Evaluation", - key: "evaluation", - icon: <TreeStructure size={14} className="text-[#758391]" />, - children: [ - { - title: "Input", - key: "input", - icon: <Download size={14} className="text-[#1677FF]" />, - }, - { - title: "Output", - key: "output", - icon: <Sparkle size={14} className="text-[#13C2C2]" />, - children: outputChildren, - }, - { - title: "Evaluator", - key: "evaluator", - icon: <Speedometer size={14} className="text-[#758391]" />, - children: - dedupedEvaluators?.map((e) => ({ - title: e.name ?? e.slug, - key: e.slug, - icon: <Speedometer size={14} className="text-[#758391]" />, - })) || [], - }, - ], - }, - ] - }, [dedupedEvaluators, outputChildren, focusRunId]) - - const onSelect = useCallback( - async (selectedKeys: Key[]) => { - try { - if (selectedKeys.length > 0) { - const key = selectedKeys[0].toString() - const currentHash = router.asPath.split("#")[1] - if (currentHash == key) return - await router.replace( - { - pathname: router.pathname, - query: router.query, - hash: key, - }, - undefined, - {scroll: false, shallow: true}, - ) - } - } catch (error) { - return "" - } - }, - [router], - ) - - if (!runs.length) { - return <FocusDrawerSidePanelSkeleton /> - } - - return ( - <div className="py-2 px-2"> - <Tree - showLine={true} - showIcon={true} - defaultExpandAll={true} - onSelect={onSelect} - treeData={treeData} - className="[&_.ant-tree-node-content-wrapper]:!flex [&_.ant-tree-node-content-wrapper]:!items-center [&_.ant-tree-node-content-wrapper]:!gap-1 [&_.ant-tree-iconEle]:!h-[20px] [&_.ant-tree-title]:text-nowrap" - /> - </div> - ) -} - -export default FocusDrawerSidePanel diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerContentSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerContentSkeleton.tsx deleted file mode 100644 index e79155bbc1..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerContentSkeleton.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" - -const FocusDrawerContentSkeleton = () => { - return ( - <div className="flex flex-col items-center gap-4 p-3"> - <div className="w-full flex items-center gap-2 py-2 justify-between"> - <Skeleton.Node active className="!w-20 !h-6" /> - <Skeleton.Node active className="!w-6 !h-6" /> - </div> - <Skeleton.Node active className="!w-full !h-[100px]" /> - <Skeleton.Node active className="!w-full !h-[100px]" /> - <Skeleton.Node active className="!w-full !h-[100px]" /> - - <div className="w-full flex items-center gap-2 py-2 justify-between"> - <Skeleton.Node active className="!w-24 !h-6" /> - <div className="flex items-center gap-2"> - <Skeleton.Node active className="!w-16 !h-6" /> - <Skeleton.Node active className="!w-16 !h-6" /> - <Skeleton.Node active className="!w-6 !h-6" /> - </div> - </div> - <div className="w-full flex items-center gap-2 py-2 justify-between"> - <Skeleton.Node active className="!w-20 !h-6" /> - <Skeleton.Node active className="!w-6 !h-6" /> - </div> - <Skeleton.Node active className="!w-full !h-[150px]" /> - </div> - ) -} - -export default memo(FocusDrawerContentSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerHeaderSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerHeaderSkeleton.tsx deleted file mode 100644 index 20912d5e76..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerHeaderSkeleton.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" - -const FocusDrawerHeaderSkeleton = () => { - return ( - <div className="flex items-center gap-2"> - <Skeleton.Node active className="!w-6 !h-6" /> - <Skeleton.Node active className="!w-6 !h-6" /> - <Skeleton.Node active className="!w-[100px] !h-6" /> - <Skeleton.Node active className="!w-[250px] !h-6" /> - </div> - ) -} - -export default memo(FocusDrawerHeaderSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerSidePanelSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerSidePanelSkeleton.tsx deleted file mode 100644 index 1c813e50aa..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/assets/Skeletons/FocusDrawerSidePanelSkeleton.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" - -const FocusDrawerSidePanelSkeleton = () => { - return ( - <div className="flex flex-col items-center gap-2 p-3"> - {Array.from({length: 8}).map((_, idx) => ( - <Skeleton.Node active key={idx} className="!w-full !h-5" /> - ))} - </div> - ) -} - -export default memo(FocusDrawerSidePanelSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/index.tsx deleted file mode 100644 index 187de30274..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunFocusDrawer/index.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import {memo, useCallback, useMemo} from "react" - -import {useAtomValue, useSetAtom} from "jotai" -import dynamic from "next/dynamic" - -import { - closeFocusDrawerAtom, - focusScenarioAtom, - isFocusDrawerOpenAtom, - resetFocusDrawerAtom, -} from "@/oss/components/EvalRunDetails/state/focusScenarioAtom" -import GenericDrawer from "@/oss/components/GenericDrawer" -import {RunIdProvider} from "@/oss/contexts/RunIdContext" -import {clearFocusDrawerQueryParams} from "@/oss/state/url/focusDrawer" - -const FocusDrawerHeader = dynamic(() => import("./assets/FocusDrawerHeader"), {ssr: false}) -const FocusDrawerContent = dynamic(() => import("./assets/FocusDrawerContent"), {ssr: false}) -const FocusDrawerSidePanel = dynamic(() => import("./assets/FocusDrawerSidePanel"), {ssr: false}) - -const EvalRunFocusDrawer = () => { - const isOpen = useAtomValue(isFocusDrawerOpenAtom) - const focus = useAtomValue(focusScenarioAtom) - const closeDrawer = useSetAtom(closeFocusDrawerAtom) - const resetDrawer = useSetAtom(resetFocusDrawerAtom) - - const focusRunId = focus?.focusRunId ?? null - - const handleClose = useCallback(() => { - closeDrawer(null) - }, [closeDrawer]) - - const handleAfterOpenChange = useCallback( - (nextOpen: boolean) => { - if (!nextOpen) { - resetDrawer(null) - clearFocusDrawerQueryParams() - } - }, - [resetDrawer], - ) - - const shouldRenderContent = useMemo( - () => Boolean(focusRunId && focus?.focusScenarioId), - [focusRunId, focus?.focusScenarioId], - ) - - if (!focusRunId) { - return null - } - - return ( - <RunIdProvider runId={focusRunId}> - <GenericDrawer - open={isOpen} - onClose={handleClose} - afterOpenChange={handleAfterOpenChange} - expandable - headerExtra={shouldRenderContent ? <FocusDrawerHeader /> : null} - mainContent={shouldRenderContent ? <FocusDrawerContent /> : null} - sideContent={shouldRenderContent ? <FocusDrawerSidePanel /> : null} - className="[&_.ant-drawer-body]:p-0" - sideContentDefaultSize={200} - /> - </RunIdProvider> - ) -} - -export default memo(EvalRunFocusDrawer) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/assets/EvalRunHeaderSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/assets/EvalRunHeaderSkeleton.tsx deleted file mode 100644 index 1ae2c1dea1..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/assets/EvalRunHeaderSkeleton.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" -import clsx from "clsx" - -const EvalRunHeaderSkeleton = ({className}: {className?: string}) => { - return ( - <div - className={clsx([ - "flex items-center justify-between py-2 px-6 sticky top-0 z-[11] bg-white border-0 border-b border-solid border-[#0517290F]", - className, - ])} - > - <Skeleton.Input active className="!w-[300px] !h-[28px]" /> - <Skeleton.Input active className="!h-[28px]" /> - </div> - ) -} - -export default memo(EvalRunHeaderSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/index.tsx deleted file mode 100644 index ec6227e62e..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunHeader/index.tsx +++ /dev/null @@ -1,297 +0,0 @@ -import {memo, useCallback, useEffect, useState} from "react" - -import {ReloadOutlined} from "@ant-design/icons" -import {Button, Tooltip} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" - -import {message} from "@/oss/components/AppMessageContext" -import {useRunId} from "@/oss/contexts/RunIdContext" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import useEvaluationRunData from "@/oss/lib/hooks/useEvaluationRunData" -import { - evalAtomStore, - evaluationRunStateFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {progressFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/progress" -import refreshLiveEvaluationRun from "@/oss/lib/hooks/useEvaluationRunData/refreshLiveRun" -import {startSimpleEvaluation, stopSimpleEvaluation} from "@/oss/services/onlineEvaluations/api" - -import EvalRunScenariosViewSelector from "../../../components/EvalRunScenariosViewSelector" -import {evalTypeAtom} from "../../../state/evalType" -import {runViewTypeAtom, urlStateAtom} from "../../../state/urlState" -import EvalRunCompareMenu from "../EvalRunCompareMenu" -import EvalRunSelectedEvaluations from "../EvalRunSelectedEvaluations" - -const AUTO_REFRESH_INTERVAL_MS = 120_000 - -const EvalRunHeader = ({className, name, id}: {className?: string; name: string; id: string}) => { - const store = evalAtomStore() - const viewType = useAtomValue(runViewTypeAtom, {store}) - const urlState = useAtomValue(urlStateAtom, {store}) - const evalType = useAtomValue(evalTypeAtom) - const baseRunId = useRunId() - const progress = useAtomValue(progressFamily(baseRunId!), {store}) - const state = useAtomValue(evaluationRunStateFamily(baseRunId!), {store}) as any - const enrichedRun = state?.enrichedRun - const updatedTs = - (enrichedRun as any)?.updatedAtTimestamp || (enrichedRun as any)?.createdAtTimestamp - const updatedMoment = updatedTs ? dayjs(updatedTs) : null - const lastUpdated = updatedMoment?.isValid() ? updatedMoment.fromNow() : undefined - const flags = ((enrichedRun as any)?.flags || {}) as { - isActive?: boolean - isClosed?: boolean - } - const runStatus = ((state?.rawRun as any)?.status || - (enrichedRun as any)?.status || - (enrichedRun as any)?.data?.status) as string | undefined - const normalizedRunStatus = runStatus - ? runStatus - .split("_") - .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) - .join(" ") - : undefined - const isActiveFlag = (flags as any).isActive ?? (flags as any).is_active - const isClosedFlag = (flags as any).isClosed ?? (flags as any).is_closed - const isActive = Boolean(isActiveFlag) - const isClosed = Boolean(isClosedFlag) - const baseStatusLabel = (() => { - if (!progress || progress.total === 0) return "Running" - if (progress.completed >= progress.total) return "Completed" - if (progress.inProgress > 0 || progress.pending > 0) return "Running" - return "Pending" - })() - const activeStatusLabel = (() => { - if (!normalizedRunStatus) return "Running" - const lower = normalizedRunStatus.toLowerCase() - const looksActive = ["run", "progress", "active"].some((token) => lower.includes(token)) - return looksActive ? normalizedRunStatus : "Running" - })() - - const statusLabel = - evalType === "online" - ? isClosed - ? "Closed" - : isActive - ? activeStatusLabel - : normalizedRunStatus && normalizedRunStatus !== "Running" - ? normalizedRunStatus - : progress?.completed - ? "Completed" - : "Stopped" - : baseStatusLabel - const {refetchEvaluation} = useEvaluationRunData( - baseRunId || null, - false, - baseRunId || undefined, - ) - const [action, setAction] = useState<"start" | "stop" | null>(null) - const [isRefreshing, setIsRefreshing] = useState(false) - const isProcessing = action !== null - const canStart = !isActive && !isClosed - const canStop = isActive - const onStop = useCallback(async () => { - if (!baseRunId) return - try { - setAction("stop") - await stopSimpleEvaluation(baseRunId) - message.success("Evaluation stopped") - refetchEvaluation?.() - } catch (e) { - message.error("Failed to stop evaluation") - } finally { - setAction(null) - } - }, [baseRunId, refetchEvaluation]) - const onStart = useCallback(async () => { - if (!baseRunId) return - try { - setAction("start") - await startSimpleEvaluation(baseRunId) - message.success("Evaluation started") - refetchEvaluation?.() - } catch (e) { - message.error("Failed to start evaluation") - } finally { - setAction(null) - } - }, [baseRunId, refetchEvaluation]) - const onRefresh = useCallback(async () => { - if (!baseRunId || !refetchEvaluation) return - const key = `live-run-refresh-${baseRunId}` - try { - setIsRefreshing(true) - message.loading({key, content: "Refreshing evaluation...", duration: 0}) - await refetchEvaluation({background: true}) - const {scenarioCount} = await refreshLiveEvaluationRun(baseRunId) - const suffix = - typeof scenarioCount === "number" && scenarioCount >= 0 - ? ` (${scenarioCount} scenarios)` - : "" - message.success({key, content: `Evaluation refreshed${suffix}`}) - } catch (error) { - console.error("[EvalRunHeader] Failed to refresh live evaluation run", error) - message.error({key, content: "Failed to refresh evaluation"}) - } finally { - setIsRefreshing(false) - } - }, [baseRunId, refetchEvaluation]) - - useEffect(() => { - if (evalType !== "online") return - if (!baseRunId || !refetchEvaluation) return - if (typeof window === "undefined") return - if (isClosed) return - - let cancelled = false - let timeoutId: number | null = null - let inFlight = false - - const shouldDefer = () => - typeof document !== "undefined" && document.visibilityState === "hidden" - - function schedule() { - if (cancelled) return - if (timeoutId) { - window.clearTimeout(timeoutId) - } - timeoutId = window.setTimeout(() => { - void runRefresh() - }, AUTO_REFRESH_INTERVAL_MS) - } - - async function runRefresh() { - if (cancelled) return - if (inFlight || isRefreshing || isProcessing) { - schedule() - return - } - if (shouldDefer()) { - schedule() - return - } - inFlight = true - try { - await refetchEvaluation({background: true}) - await refreshLiveEvaluationRun(baseRunId) - } catch (error) { - console.error("[EvalRunHeader] Auto refresh failed", error) - } finally { - inFlight = false - schedule() - } - } - - const handleVisibilityChange = () => { - if (cancelled) return - if (!shouldDefer()) { - if (timeoutId) { - window.clearTimeout(timeoutId) - } - void runRefresh() - } - } - - schedule() - - if (typeof document !== "undefined") { - document.addEventListener("visibilitychange", handleVisibilityChange) - } - - return () => { - cancelled = true - if (timeoutId) { - window.clearTimeout(timeoutId) - } - if (typeof document !== "undefined") { - document.removeEventListener("visibilitychange", handleVisibilityChange) - } - } - }, [baseRunId, evalType, isClosed, isProcessing, isRefreshing, refetchEvaluation]) - return ( - <div - className={clsx([ - "w-full", - "flex items-center justify-between gap-4 py-2 px-6 sticky top-0 z-[11] bg-white", - {"border-0 border-b border-solid border-[#0517290F]": viewType === "overview"}, - className, - ])} - > - <EvalRunScenariosViewSelector /> - {evalType !== "online" ? ( - <div className="flex items-center gap-4 min-w-0 shrink max-w-full"> - <div className="min-w-0 flex-1"> - {urlState.compare?.length > 0 && ( - <EvalRunSelectedEvaluations - runIds={urlState.compare || []} - baseRunId={baseRunId!} - /> - )} - </div> - - <EvalRunCompareMenu - buttonProps={{type: "primary"}} - popoverProps={{placement: "bottomRight"}} - /> - </div> - ) : null} - {evalType === "online" ? ( - <div className="flex w-full min-w-0 shrink items-center justify-end gap-3"> - <div className="flex min-w-0 items-center gap-3 text-[#475467]"> - <div className="flex items-center gap-1"> - <span - className={clsx( - "shrink-0 inline-block w-2 h-2 rounded-full", - statusLabel === "Running" - ? "bg-green-500" - : statusLabel === "Completed" || statusLabel === "Closed" - ? "bg-gray-400" - : statusLabel === "Stopped" - ? "bg-red-500" - : "bg-yellow-500", - )} - /> - <span className="shrink-0 whitespace-nowrap">{statusLabel}</span> - </div> - <div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-[#98A2B3]"> - {lastUpdated ? ( - <Tooltip title={updatedMoment?.format("DD MMM YYYY HH:mm") ?? ""}> - <span className="whitespace-nowrap">Updated {lastUpdated}</span> - </Tooltip> - ) : null} - </div> - </div> - <Button - icon={<ReloadOutlined />} - onClick={onRefresh} - loading={isRefreshing} - disabled={isRefreshing || isProcessing} - > - Refresh - </Button> - {canStop ? ( - <Button - danger - onClick={onStop} - loading={action === "stop"} - disabled={isProcessing || isRefreshing} - > - Stop evaluation - </Button> - ) : ( - <Button - type="primary" - onClick={onStart} - loading={action === "start"} - disabled={isProcessing || !canStart || isRefreshing} - > - Start evaluation - </Button> - )} - </div> - ) : null} - </div> - ) -} - -export default memo(EvalRunHeader) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/EvalRunPromptConfigViewerSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/EvalRunPromptConfigViewerSkeleton.tsx deleted file mode 100644 index 02f6b9f69a..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/EvalRunPromptConfigViewerSkeleton.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" -import clsx from "clsx" - -const EvalRunPromptConfigViewerSkeleton = ({className}: {className?: string}) => { - return ( - <div className={clsx(["w-full flex px-6", className])}> - <div className="w-full border border-solid border-[#0517290F] rounded overflow-hidden"> - <div className="w-full flex items-center justify-between border-0 border-b border-solid border-[#0517290F] px-4 py-3"> - <div className="flex items-center gap-2"> - <Skeleton.Button active size="small" style={{width: 90, height: 22}} /> - <Skeleton.Button active size="small" style={{width: 90, height: 22}} /> - </div> - <Skeleton.Button active size="small" style={{width: 22, height: 22}} /> - </div> - - <PromptConfigCardSkeleton /> - </div> - </div> - ) -} - -export default memo(EvalRunPromptConfigViewerSkeleton) - -export const PromptConfigCardSkeleton = memo(() => { - return ( - <div className="w-full"> - {/* Header */} - <div className="w-full flex items-center justify-between px-4 py-3 bg-gray-50"> - <Skeleton.Button active size="small" style={{width: 180, height: 22}} /> - <Skeleton.Button active size="small" style={{width: 100, height: 28}} /> - </div> - - {/* Prompt section */} - <div className="w-full px-4 py-3 flex flex-col gap-4"> - <Skeleton.Input active style={{width: "100%", height: 120}} /> - <Skeleton.Input active style={{width: "100%", height: 120}} /> - </div> - </div> - ) -}) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/PromptConfigCard.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/PromptConfigCard.tsx deleted file mode 100644 index 198d2542f6..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/assets/PromptConfigCard.tsx +++ /dev/null @@ -1,616 +0,0 @@ -import {memo, useEffect, useMemo, useRef, useState} from "react" - -import {Empty, Skeleton, Tag, Typography} from "antd" -import clsx from "clsx" -import {atom, getDefaultStore, useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" -import dynamic from "next/dynamic" -import {useRouter} from "next/router" - -import {PromptsSourceProvider} from "@/oss/components/Playground/context/PromptsSource" -import {EnrichedEvaluationRun} from "@/oss/lib/hooks/usePreviewEvaluations/types" -import type {EnhancedObjectConfig} from "@/oss/lib/shared/variant/genericTransformer/types" -import {fetchOpenApiSchemaJson} from "@/oss/lib/shared/variant/transformer" -import { - deriveCustomPropertiesFromSpec, - derivePromptsFromSpec, -} from "@/oss/lib/shared/variant/transformer/transformer" -import type {AgentaConfigPrompt} from "@/oss/lib/shared/variant/transformer/types" -import {projectScopedVariantsAtom} from "@/oss/state/projectVariantConfig" -import { - appSchemaAtom, - appUriInfoAtom, - getEnhancedRevisionById, -} from "@/oss/state/variant/atoms/fetcher" - -import EvalNameTag from "../../../assets/EvalNameTag" -import {EVAL_TAG_COLOR} from "../../../assets/utils" -import VariantTag from "../../../assets/VariantTag" -import { - combineAppNameWithLabel, - deriveVariantAppName, - deriveVariantLabelParts, - getVariantDisplayMetadata, - normalizeId, - prettifyVariantLabel, -} from "../../../assets/variantUtils" - -import {PromptConfigCardSkeleton} from "./EvalRunPromptConfigViewerSkeleton" - -const PlaygroundVariantConfigPrompt = dynamic( - () => import("@/oss/components/Playground/Components/PlaygroundVariantConfigPrompt"), - {ssr: false, loading: () => <PromptConfigCardSkeleton />}, -) -const PlaygroundVariantCustomProperties = dynamic( - () => import("@/oss/components/Playground/Components/PlaygroundVariantCustomProperties"), - {ssr: false, loading: () => <PromptConfigCardSkeleton />}, -) - -type ParametersShape = Record<string, any> | null | undefined - -type PromptNode = EnhancedObjectConfig<AgentaConfigPrompt> - -const deriveFromParametersSnapshot = (parameters: ParametersShape) => { - const ag = (parameters as any)?.ag_config ?? (parameters as any) ?? {} - const fallbackPrompts = Object.entries(ag) - .map(([name, cfg]: [string, any]) => { - if (!cfg || typeof cfg !== "object") return null - const messages = (cfg as any).messages - const llm_config = (cfg as any).llm_config || (cfg as any).llmConfig - if (!messages && !llm_config) return null - return { - __name: name, - messages, - llm_config, - } - }) - .filter(Boolean) as PromptNode[] - - return {prompts: fallbackPrompts, customProps: {}} -} - -const mergeParametersWithSnapshot = ( - baseParameters: ParametersShape, - snapshot: ParametersShape, -): ParametersShape => { - if (!snapshot || typeof snapshot !== "object") { - return baseParameters ?? undefined - } - - const base = baseParameters && typeof baseParameters === "object" ? baseParameters : {} - const merged: Record<string, any> = { - ...base, - ...snapshot, - } - - const baseAgConfig = - (base as any)?.ag_config ?? (base as any)?.agConfig ?? (base as any)?.parameters?.ag_config - const snapshotAgConfig = (snapshot as any)?.ag_config ?? (snapshot as any)?.agConfig - - if (snapshotAgConfig && typeof snapshotAgConfig === "object") { - const mergedAg = { - ...(baseAgConfig && typeof baseAgConfig === "object" ? baseAgConfig : {}), - ...snapshotAgConfig, - } - merged.ag_config = mergedAg - merged.agConfig = mergedAg - } else if (baseAgConfig && typeof baseAgConfig === "object") { - merged.ag_config = baseAgConfig - merged.agConfig = baseAgConfig - } - - return merged -} - -interface DeriveParams { - variantId: string - parameters: ParametersShape -} - -// Single source atom family that derives prompts and custom props -const derivedPromptsAtomFamily = atomFamily(({variantId, parameters}: DeriveParams) => - atom((get) => { - const normalizedVariantId = typeof variantId === "string" ? variantId.trim() : "" - - if (!normalizedVariantId) { - return deriveFromParametersSnapshot(parameters) - } - - const rev = getEnhancedRevisionById(get.bind(get) as any, normalizedVariantId) - - if (rev) { - try { - const spec = get(appSchemaAtom) - const routePath = get(appUriInfoAtom)?.routePath - - if (spec) { - const mergedParameters = mergeParametersWithSnapshot( - (rev as any).parameters, - parameters, - ) - const mergedVariant = { - ...(rev as any), - parameters: mergedParameters ?? (rev as any).parameters, - } - - const derivedPrompts = derivePromptsFromSpec( - mergedVariant as any, - spec as any, - routePath, - ) as PromptNode[] - const derivedCustomProps = deriveCustomPropertiesFromSpec( - mergedVariant as any, - spec as any, - routePath, - ) as Record<string, any> - - if (Array.isArray(derivedPrompts)) { - return {prompts: derivedPrompts, customProps: derivedCustomProps} - } - } - } catch (error) { - if (process.env.NODE_ENV !== "production") { - console.warn("[PromptConfig] Failed to derive prompts from spec", error) - } - } - } - - return deriveFromParametersSnapshot(parameters) - }), -) - -const PromptContentSkeleton = memo(({description}: {description: string}) => { - return ( - <div className="flex flex-col gap-4 px-4 py-4"> - <Skeleton.Input active style={{width: "100%", height: 120}} /> - <Skeleton.Input active style={{width: "100%", height: 120}} /> - <div className="flex justify-center py-2"> - <Typography.Text type="secondary">{description}</Typography.Text> - </div> - </div> - ) -}) - -const PromptConfigCard = ({ - variantId, - evaluation, - isComparison, - colorIndex, - isFirstPrompt, - isMiddlePrompt, - isLastPrompt, - totalRuns, -}: { - variantId: string - evaluation: EnrichedEvaluationRun - isComparison: boolean - colorIndex: number - isFirstPrompt: boolean - isMiddlePrompt: boolean - isLastPrompt: boolean - totalRuns: number -}) => { - const router = useRouter() - const normalizedVariantId = useMemo(() => (variantId ? String(variantId) : ""), [variantId]) - const jotaiStore = useMemo(() => getDefaultStore(), []) - const projectScopedVariants = useAtomValue(projectScopedVariantsAtom) - - const [fallbackPrompts, setFallbackPrompts] = useState<PromptNode[]>([]) - const [fallbackCustomProps, setFallbackCustomProps] = useState<Record<string, any>>({}) - const [fallbackTrigger, setFallbackTrigger] = useState(0) - const fallbackAttemptsRef = useRef(0) - - const variants = evaluation?.variants ?? [] - const selectedVariant = useMemo(() => { - if (!variants.length) return undefined - if (!normalizedVariantId) return variants[0] - - return ( - variants.find((variant) => { - const candidateIds = [ - (variant as any)?._revisionId, - (variant as any)?.id, - variant?.variantId, - ] - return candidateIds.some( - (candidate) => - candidate !== undefined && String(candidate) === normalizedVariantId, - ) - }) || undefined - ) - }, [variants, normalizedVariantId]) - - const projectScopedVariant = useMemo(() => { - if (!normalizedVariantId) return undefined - const scoped = projectScopedVariants?.revisionMap?.[normalizedVariantId] - return scoped && scoped.length > 0 ? scoped[0] : undefined - }, [normalizedVariantId, projectScopedVariants]) - - useEffect(() => { - setFallbackPrompts([]) - setFallbackCustomProps({}) - fallbackAttemptsRef.current = 0 - setFallbackTrigger(0) - }, [normalizedVariantId]) - - const variantForDisplay = selectedVariant ?? projectScopedVariant - - const fallbackVariantSource = useMemo(() => { - if (projectScopedVariant?.uri) return projectScopedVariant - if (selectedVariant?.uri) return selectedVariant - return projectScopedVariant ?? selectedVariant ?? null - }, [projectScopedVariant, selectedVariant]) - - const variantDisplay = useMemo( - () => - getVariantDisplayMetadata(variantForDisplay, { - fallbackLabel: normalizedVariantId || undefined, - fallbackRevisionId: normalizedVariantId || undefined, - requireRuntime: false, - }), - [variantForDisplay, normalizedVariantId], - ) - - const {label: formattedVariantLabel} = useMemo( - () => - deriveVariantLabelParts({ - variant: variantForDisplay, - displayLabel: variantDisplay.label, - }), - [variantForDisplay, variantDisplay.label], - ) - - const variantAppName = useMemo( - () => - deriveVariantAppName({ - variant: variantForDisplay, - fallbackAppName: - (evaluation as any)?.appName ?? - (evaluation as any)?.app_name ?? - (evaluation as any)?.app?.name ?? - undefined, - }), - [variantForDisplay, evaluation], - ) - - const variantLabel = combineAppNameWithLabel( - variantAppName, - prettifyVariantLabel(formattedVariantLabel) ?? formattedVariantLabel, - ) - - const revisionId = variantDisplay.revisionId || normalizedVariantId || "" - - const variantAppId = useMemo( - () => - normalizeId( - (variantForDisplay as any)?.appId ?? - (variantForDisplay as any)?.app_id ?? - (variantForDisplay as any)?.application?.id ?? - (variantForDisplay as any)?.application_id ?? - (variantForDisplay as any)?.application_ref?.id ?? - (variantForDisplay as any)?.applicationRef?.id, - ), - [variantForDisplay], - ) - - const evaluationAppId = useMemo( - () => - normalizeId( - (evaluation as any)?.appId ?? - (evaluation as any)?.app_id ?? - (evaluation as any)?.app?.id ?? - (evaluation as any)?.application?.id, - ), - [evaluation], - ) - - const normalizedRouteAppId = useMemo( - () => normalizeId(router.query?.app_id as string | undefined), - [router.query?.app_id], - ) - - const navigableAppId = variantAppId || evaluationAppId || normalizedRouteAppId - const isRouteAppContext = - Boolean(normalizedRouteAppId) && navigableAppId === normalizedRouteAppId - const blockedByRuntime = isRouteAppContext && variantDisplay.hasRuntime === false - - const canNavigateToVariant = Boolean( - revisionId && navigableAppId && variantDisplay.isHealthy !== false && !blockedByRuntime, - ) - - const parameters = useMemo(() => { - const map = (evaluation as any)?.parametersByRevisionId as - | Record<string, ParametersShape> - | undefined - - if (map) { - const candidateIds = [ - normalizedVariantId, - String((selectedVariant as any)?._revisionId ?? ""), - String((selectedVariant as any)?.id ?? ""), - String(selectedVariant?.variantId ?? ""), - ].filter( - (id) => - !!id && - id !== "undefined" && - id !== "null" && - id !== "[object Object]" && - id !== "NaN", - ) - - for (const id of candidateIds) { - if (map[id]) { - return map[id] - } - } - } - - const projectScopedParams = (projectScopedVariant as any)?.configParams - - return ( - (selectedVariant as any)?.parameters ?? - (selectedVariant as any)?.configParams ?? - projectScopedParams ?? - undefined - ) - }, [evaluation, normalizedVariantId, selectedVariant, projectScopedVariant]) - - const deriveParams = useMemo( - () => ({variantId: normalizedVariantId, parameters}), - [normalizedVariantId, parameters], - ) - - const {prompts, customProps} = useAtomValue(derivedPromptsAtomFamily(deriveParams), { - store: jotaiStore, - }) - - const basePrompts = prompts ?? [] - const promptsList = basePrompts.length ? basePrompts : fallbackPrompts - - const combinedCustomProps = useMemo(() => { - if (customProps && Object.keys(customProps).length > 0) return customProps - return fallbackCustomProps - }, [customProps, fallbackCustomProps]) - - const baseCustomPropsHasContent = useMemo(() => { - if (!customProps) return false - return Object.values(customProps).some((value) => { - if (value === null || value === undefined) return false - if (Array.isArray(value)) return value.length > 0 - if (typeof value === "object") return Object.keys(value).length > 0 - if (typeof value === "string") return value.trim().length > 0 - return true - }) - }, [customProps]) - - const combinedCustomPropsHasContent = useMemo(() => { - if (!combinedCustomProps) return false - return Object.values(combinedCustomProps).some((value) => { - if (value === null || value === undefined) return false - if (Array.isArray(value)) return value.length > 0 - if (typeof value === "object") return Object.keys(value).length > 0 - if (typeof value === "string") return value.trim().length > 0 - return true - }) - }, [combinedCustomProps]) - - const hasPrompts = promptsList.length > 0 - const hasContent = hasPrompts || combinedCustomPropsHasContent - const hasVariantsInRun = - (evaluation?.variants?.length ?? 0) > 0 || Boolean(projectScopedVariant) - const isVariantSelectable = Boolean(normalizedVariantId && variantForDisplay) - const showSkeleton = Boolean( - !variantForDisplay && normalizedVariantId && hasVariantsInRun && !parameters, - ) - const showPrompts = isVariantSelectable && hasContent - const emptyDescription = !isVariantSelectable - ? "Prompt configuration is unavailable because the source application or variant is no longer accessible." - : hasContent - ? "Prompt configuration isn't available because the original application is no longer accessible." - : "This evaluation does not include any prompt configuration data." - - const promptsMap = useMemo(() => { - if (!normalizedVariantId) return {} - return {[normalizedVariantId]: promptsList as PromptNode[] | undefined} - }, [normalizedVariantId, promptsList]) - - const fallbackCustomPropsPopulated = useMemo( - () => Object.keys(fallbackCustomProps).length > 0, - [fallbackCustomProps], - ) - - const shouldAttemptFallback = useMemo(() => { - if (!normalizedVariantId) return false - if (!fallbackVariantSource?.uri) return false - if (basePrompts.length > 0 || baseCustomPropsHasContent) return false - if (fallbackPrompts.length > 0 || fallbackCustomPropsPopulated) return false - return true - }, [ - normalizedVariantId, - fallbackVariantSource, - basePrompts.length, - baseCustomPropsHasContent, - fallbackPrompts.length, - fallbackCustomPropsPopulated, - ]) - - useEffect(() => { - if (!shouldAttemptFallback) return - - let isCancelled = false - let retryTimeout: ReturnType<typeof setTimeout> | undefined - - const snapshot = - (parameters && Object.keys(parameters as any).length > 0 - ? parameters - : (fallbackVariantSource as any)?.configParams) ?? {} - - const run = async () => { - try { - const {schema} = await fetchOpenApiSchemaJson(fallbackVariantSource!.uri as string) - if (!schema) { - throw new Error("Missing OpenAPI schema") - } - - const mergedParameters = mergeParametersWithSnapshot( - (fallbackVariantSource as any)?.parameters, - snapshot, - ) - - const fallbackVariant = { - ...fallbackVariantSource, - parameters: mergedParameters ?? snapshot, - } - - const derivedPrompts = derivePromptsFromSpec( - fallbackVariant as any, - schema as any, - ) as PromptNode[] - const derivedCustomProps = deriveCustomPropertiesFromSpec( - fallbackVariant as any, - schema as any, - ) as Record<string, any> - - if (isCancelled) return - - fallbackAttemptsRef.current = 0 - setFallbackPrompts(Array.isArray(derivedPrompts) ? derivedPrompts : []) - setFallbackCustomProps(derivedCustomProps ?? {}) - - if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") { - console.info("[PromptConfigCard] Fallback prompts derived", { - runId: evaluation?.id, - variantId: normalizedVariantId, - promptCount: derivedPrompts?.length ?? 0, - customPropsCount: Object.keys(derivedCustomProps ?? {}).length, - }) - } - } catch (error: any) { - if (isCancelled) return - const attempt = fallbackAttemptsRef.current + 1 - fallbackAttemptsRef.current = attempt - if (attempt <= 3) { - if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") { - console.warn("[PromptConfigCard] Fallback prompt fetch failed, retrying", { - runId: evaluation?.id, - variantId: normalizedVariantId, - attempt, - error, - }) - } - retryTimeout = setTimeout(() => { - setFallbackTrigger((prev) => prev + 1) - }, 500 * attempt) - } else if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") { - console.error("[PromptConfigCard] Fallback prompt fetch failed", { - runId: evaluation?.id, - variantId: normalizedVariantId, - attempt, - error, - }) - } - } - } - - run() - - return () => { - isCancelled = true - if (retryTimeout) clearTimeout(retryTimeout) - } - }, [ - shouldAttemptFallback, - fallbackTrigger, - normalizedVariantId, - fallbackVariantSource, - evaluation?.id, - parameters, - ]) - - const usingFallbackPrompts = basePrompts.length === 0 && fallbackPrompts.length > 0 - const usingFallbackCustomProps = !baseCustomPropsHasContent && fallbackCustomPropsPopulated - const parametersSource = - usingFallbackPrompts || usingFallbackCustomProps - ? "project-fallback" - : selectedVariant - ? "run" - : projectScopedVariant - ? "project-scoped" - : "none" - - return ( - <div - className={clsx([ - "flex flex-col border border-solid border-[#0517290F] w-full rounded h-fit", - {"!w-[500px] 2xl:!w-fit shrink-0": isComparison && totalRuns > 2}, - {"!rounded-r-none": isComparison && isFirstPrompt}, - {"!rounded-none": isComparison && isMiddlePrompt}, - {"!rounded-l-none": isComparison && isLastPrompt}, - ])} - > - <div className="h-[48px] flex items-center justify-between py-2 px-2 border-0 border-b border-solid border-[#EAEFF5]"> - <div className="w-[80%] flex items-center gap-2"> - {evaluation?.name ? ( - <EvalNameTag - color={EVAL_TAG_COLOR?.[colorIndex || 1]} - run={evaluation} - className={isComparison ? "!max-w-[60%]" : ""} - allowVariantNavigation={canNavigateToVariant} - /> - ) : null} - {variantForDisplay ? ( - <VariantTag - variantName={variantLabel} - revision={(variantForDisplay as any)?.revision} - id={revisionId || undefined} - disabled={!canNavigateToVariant} - enrichedRun={evaluation} - variant={variantForDisplay} - className="[&_span]:truncate [&_span]:max-w-[150px]" - /> - ) : ( - <Tag bordered={false} className="bg-[#0517290F] text-[#1C2C3D]"> - Variant unavailable - </Tag> - )} - </div> - </div> - - {showSkeleton ? ( - <PromptContentSkeleton description="Loading prompt configuration…" /> - ) : showPrompts ? ( - <PromptsSourceProvider promptsByRevision={promptsMap}> - <div className="flex flex-col w-full"> - {promptsList.map((prompt) => ( - <PlaygroundVariantConfigPrompt - key={`${normalizedVariantId}:${prompt.__id || prompt.__name}`} - variantId={normalizedVariantId} - promptId={String(prompt.__id || prompt.__name)} - viewOnly - /> - ))} - <PlaygroundVariantCustomProperties - variantId={normalizedVariantId} - initialOpen - viewOnly - customPropsRecord={combinedCustomProps} - /> - </div> - </PromptsSourceProvider> - ) : ( - <div className="flex items-center justify-center py-8 px-4"> - <Empty - description={ - <Typography.Text type="secondary" className="text-center"> - {emptyDescription} - </Typography.Text> - } - image={Empty.PRESENTED_IMAGE_SIMPLE} - /> - </div> - )} - </div> - ) -} - -export default memo(PromptConfigCard) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/index.tsx deleted file mode 100644 index 97c27cdbae..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunPromptConfigViewer/index.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import {memo, useEffect, useMemo, useRef} from "react" - -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {atom, useAtomValue, useSetAtom} from "jotai" -import {atomFamily} from "jotai/utils" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {projectIdAtom} from "@/oss/state/project/selectors/project" -import { - clearProjectVariantReferencesAtom, - prefetchProjectVariantConfigs, - setProjectVariantReferencesAtom, -} from "@/oss/state/projectVariantConfig" - -import {collectProjectVariantReferences} from "../../../../../lib/hooks/usePreviewEvaluations/projectVariantConfigs" -import {urlStateAtom} from "../../../state/urlState" - -import PromptConfigCard from "./assets/PromptConfigCard" - -// Helper atom to read multiple run states given a list of runIds -const evaluationsRunFamily = atomFamily( - (runIds: string[]) => - atom((get) => { - return runIds.map((runId) => get(evaluationRunStateFamily(runId))) - }), - deepEqual, -) - -const EvalRunPromptConfigViewer = () => { - const runId = useRunId() - const urlState = useAtomValue(urlStateAtom) - const compareRunIds = urlState?.compare - - // Read base run and all comparison run states - const runIds = useMemo(() => { - if (!compareRunIds?.length) return [runId!] - return [runId!, ...compareRunIds] - }, [runId, compareRunIds]) - - const runs = useAtomValue(evaluationsRunFamily(runIds)) - const renderableRuns = useMemo( - () => runs?.filter((run) => Boolean(run?.enrichedRun)) ?? [], - [runs], - ) - const projectId = useAtomValue(projectIdAtom) - const setProjectVariantReferences = useSetAtom(setProjectVariantReferencesAtom) - const clearProjectVariantReferences = useSetAtom(clearProjectVariantReferencesAtom) - - const projectVariantReferences = useMemo(() => { - if (!projectId || !renderableRuns.length) return [] - const enrichedRuns = renderableRuns - .map((run) => run.enrichedRun) - .filter((run): run is NonNullable<typeof run> => Boolean(run)) - return collectProjectVariantReferences(enrichedRuns, projectId) - }, [projectId, renderableRuns]) - const referencesSetRef = useRef(false) - - useEffect(() => { - if (!projectId || projectVariantReferences.length === 0) { - return - } - setProjectVariantReferences(projectVariantReferences) - prefetchProjectVariantConfigs(projectVariantReferences) - referencesSetRef.current = true - }, [ - projectId, - projectVariantReferences, - setProjectVariantReferences, - prefetchProjectVariantConfigs, - ]) - - useEffect( - () => () => { - if (referencesSetRef.current) { - clearProjectVariantReferences() - referencesSetRef.current = false - } - }, - [clearProjectVariantReferences], - ) - - return ( - <div className={clsx(["w-full flex px-6", {"overflow-x-auto": compareRunIds?.length > 0}])}> - {renderableRuns.map((run, idx) => { - const enriched = run.enrichedRun! - const variants = Array.isArray(enriched?.variants) ? enriched.variants : [] - - const primaryVariant = - variants.find((variant) => { - const revisionId = - (variant as any)?._revisionId ?? - (variant as any)?.id ?? - variant?.variantId - return Boolean(revisionId) - }) ?? variants[0] - - const variantRevisionId = - (primaryVariant as any)?._revisionId ?? - (primaryVariant as any)?.id ?? - primaryVariant?.variantId ?? - "" - - const reactKey = variantRevisionId || `${enriched.id || "run"}-${idx}` - - return ( - <PromptConfigCard - key={reactKey} - variantId={variantRevisionId} - evaluation={enriched} - isComparison={compareRunIds?.length > 0} - colorIndex={run.colorIndex || (run.isBase ? 1 : undefined) || 1} - isFirstPrompt={idx === 0} - isMiddlePrompt={idx > 0 && idx < renderableRuns.length - 1} - isLastPrompt={idx === renderableRuns.length - 1} - totalRuns={renderableRuns.length} - /> - ) - })} - </div> - ) -} - -export default memo(EvalRunPromptConfigViewer) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/EvalRunScoreTableSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/EvalRunScoreTableSkeleton.tsx deleted file mode 100644 index ee6c0d540b..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/EvalRunScoreTableSkeleton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" -import clsx from "clsx" - -const EvalRunScoreTableSkeleton = ({className}: {className?: string}) => { - return ( - <div className={clsx("w-full border border-solid border-[#0517290F] rounded", className)}> - <div className="flex flex-col h-[60px] justify-center px-3 py-2 gap-1 border-0 border-b border-solid border-[#EAEFF5]"> - <Skeleton.Input active className="!w-[220px] !h-[20px]" /> - <Skeleton.Input active className="!w-[320px] !h-[14px]" /> - </div> - <div className="p-2 w-full h-[calc(100%-60px)] flex gap-2 shrink-0"> - <Skeleton.Node active className="!w-full !h-[420px]" /> - <Skeleton.Node active className="!w-full !h-[420px]" /> - </div> - </div> - ) -} - -export default memo(EvalRunScoreTableSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/TraceMetrics.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/TraceMetrics.tsx deleted file mode 100644 index 06a6cb9d4a..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/TraceMetrics.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import {memo} from "react" - -import {Timer, Coins, PlusCircle} from "@phosphor-icons/react" -import {Space, Tooltip} from "antd" - -import {formatCurrency, formatLatency, formatTokenUsage} from "@/oss/lib/helpers/formatters" - -const TraceMetrics = ({latency, cost, tokens}: {latency: number; cost: number; tokens: number}) => { - return ( - <div className="flex items-center gap-2"> - <Space className="text-[#586673]"> - <Tooltip - title={`Latency: ${formatLatency(latency)}`} - mouseEnterDelay={0.25} - placement="bottom" - > - <div className="flex items-center gap-2 font-mono cursor-default hover:scale-[1.05] duration-200"> - <Timer /> - {formatLatency(latency)} - </div> - </Tooltip> - - <Tooltip - title={`Cost: ${formatCurrency(cost)}`} - mouseEnterDelay={0.25} - placement="bottom" - > - <div className="flex items-center gap-2 font-mono cursor-default hover:scale-[1.05] duration-200"> - <Coins /> - {formatCurrency(cost)} - </div> - </Tooltip> - - <Tooltip - title={`Tokens: ${formatTokenUsage(tokens)}`} - mouseEnterDelay={0.25} - placement="bottom" - > - <div className="flex items-center gap-2 font-mono cursor-default hover:scale-[1.05] duration-200"> - <PlusCircle /> - {formatTokenUsage(tokens)} - </div> - </Tooltip> - </Space> - </div> - ) -} - -export default memo(TraceMetrics) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/constants.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/constants.ts deleted file mode 100644 index f4947321b6..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/assets/constants.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {ColumnType} from "antd/es/table" - -export const FIXED_COLUMNS: ColumnType<any>[] = [ - { - title: "Metric", - dataIndex: "title", - key: "title", - minWidth: 120, - fixed: "left", - }, - { - title: "Label", - dataIndex: "label", - key: "label", - minWidth: 120, - }, -] diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/index.tsx deleted file mode 100644 index 3dcf2de1e9..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunScoreTable/index.tsx +++ /dev/null @@ -1,879 +0,0 @@ -import {isValidElement, cloneElement, memo, useCallback, useMemo, useEffect, useState} from "react" - -import {Table, Typography} from "antd" -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {atom, useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" -import dynamic from "next/dynamic" - -import {formatColumnTitle} from "@/oss/components/Filters/EditColumns/assets/helper" -import {formatMetricValue} from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils" -import FiltersPreview from "@/oss/components/pages/evaluations/onlineEvaluation/components/FiltersPreview" -import {useRunId} from "@/oss/contexts/RunIdContext" -import useURL from "@/oss/hooks/useURL" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import {formatLatency} from "@/oss/lib/helpers/formatters" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {runMetricStatsFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import { - BasicStats, - canonicalizeMetricKey, - getMetricDisplayName, - getMetricValueWithAliases, -} from "@/oss/lib/metricUtils" - -import { - retrieveQueryRevision, - type QueryFilteringPayload, -} from "../../../../../services/onlineEvaluations/api" -import { - collectMetricSchemasFromEvaluator, - deriveSchemaMetricType, -} from "../../../components/VirtualizedScenarioTable/assets/evaluatorSchemaUtils" -import RenameEvalButton from "../../../HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalButton" -import {urlStateAtom} from "../../../state/urlState" -import EvalNameTag from "../../assets/EvalNameTag" -import TagWithLink from "../../assets/TagWithLink" -import {EVAL_TAG_COLOR, EVAL_COLOR, EVAL_BG_COLOR} from "../../assets/utils" -import {formatMetricName} from "../../assets/utils" -import VariantTag from "../../assets/VariantTag" -import {getVariantDisplayMetadata} from "../../assets/variantUtils" -import type {EvaluatorMetricsSpiderChartProps} from "../EvaluatorMetircsSpiderChart/types" -import PlaceholderOverlay from "../shared/PlaceholderOverlay" -import SpiderChartPlaceholder from "../shared/SpiderChartPlaceholder" - -const EvaluatorMetricsSpiderChart = dynamic<EvaluatorMetricsSpiderChartProps>( - () => import("../EvaluatorMetircsSpiderChart"), - {ssr: false}, -) - -// Atom helpers to read multiple runs' state/metrics in one go -const runsStateFamily = atomFamily( - (runIds: string[]) => atom((get) => runIds.map((id) => get(evaluationRunStateFamily(id)))), - deepEqual, -) -const runsMetricsFamily = atomFamily( - (runIds: string[]) => - atom((get) => runIds.map((id) => ({id, metrics: get(runMetricStatsFamily({runId: id}))}))), - deepEqual, -) - -const INVOCATION_METRIC_KEYS = [ - "attributes.ag.metrics.costs.cumulative.total", - "attributes.ag.metrics.duration.cumulative", - "attributes.ag.metrics.tokens.cumulative.total", - "attributes.ag.metrics.errors.cumulative", -] as const - -const INVOCATION_METRIC_SET = new Set<string>(INVOCATION_METRIC_KEYS) - -const COST_METRIC_KEY = INVOCATION_METRIC_KEYS[0] -const DURATION_METRIC_KEY = INVOCATION_METRIC_KEYS[1] -const TOKEN_METRIC_KEY = INVOCATION_METRIC_KEYS[2] -const ERRORS_METRIC_KEY = INVOCATION_METRIC_KEYS[3] - -const INVOCATION_METRIC_COLUMNS: {key: string; label: string}[] = [ - {key: COST_METRIC_KEY, label: "Cost (Total)"}, - {key: DURATION_METRIC_KEY, label: "Duration (Total)"}, - {key: TOKEN_METRIC_KEY, label: "Tokens (Total)"}, - {key: ERRORS_METRIC_KEY, label: "Errors"}, -] - -const metricHasContent = (metric: Record<string, any> | undefined): boolean => { - if (!metric || typeof metric !== "object") return false - if (typeof metric.mean === "number" && Number.isFinite(metric.mean)) return true - if (typeof metric.count === "number" && metric.count > 0) return true - - const distribution: any[] | undefined = Array.isArray((metric as any).distribution) - ? (metric as any).distribution - : undefined - if (distribution && distribution.some((bin) => Number(bin?.count ?? 0) > 0)) return true - - const hist = Array.isArray((metric as any).hist) ? (metric as any).hist : undefined - if (hist && hist.some((bin) => Number(bin?.count ?? bin?.frequency ?? 0) > 0)) return true - - const freq = Array.isArray((metric as any).frequency) - ? (metric as any).frequency - : Array.isArray((metric as any).rank) - ? (metric as any).rank - : undefined - if (freq && freq.some((entry) => Number(entry?.count ?? entry?.frequency ?? 0) > 0)) return true - - const unique = (metric as any).unique - if (Array.isArray(unique) && unique.length > 0) { - return typeof metric.mean === "number" - } - - return false -} - -const EvalRunScoreTable = ({className, type}: {className?: string; type: "auto" | "online"}) => { - const baseRunId = useRunId() - const {projectURL} = useURL() - const urlState = useAtomValue(urlStateAtom) - const compareRunIds = (urlState?.compare || []).filter((id) => id && id !== baseRunId) - const allRunIds = useMemo(() => [baseRunId!, ...compareRunIds], [baseRunId, compareRunIds]) - - const isComparison = compareRunIds.length > 0 - - // Fetch all runs and their metrics - const runs = useAtomValue(runsStateFamily(allRunIds)) - const metricsByRun = useAtomValue(runsMetricsFamily(allRunIds)) - - const evaluatorsBySlug = useMemo(() => { - const map = new Map<string, any>() - const register = (entry: any, slug: string) => { - if (!entry || typeof entry !== "object") return - if (!slug || map.has(slug)) return - map.set(slug, entry) - } - - runs.forEach((state) => { - const annotationSteps = state?.enrichedRun?.data?.steps?.filter( - (step: any) => step?.type === "annotation", - ) - annotationSteps?.forEach((step: any) => { - const evaluatorId = step?.references?.evaluator?.id - if (!evaluatorId) return - const evaluator = (state?.enrichedRun?.evaluators || []).find( - (e: any) => e.id === evaluatorId, - ) - if (evaluator) { - const originalKey = typeof step?.key === "string" ? step.key : undefined - const parts = originalKey ? originalKey.split(".") : [] - const humanKey = parts.length > 1 ? parts[1] : originalKey - const resolvedKey = step.origin === "human" ? humanKey : originalKey - if (originalKey) { - register(evaluator, originalKey) - } - if (resolvedKey && resolvedKey !== originalKey) { - register(evaluator, resolvedKey) - } - } - }) - }) - - return Object.fromEntries(map.entries()) - }, [runs]) - - const schemaMetricDefinitionsBySlug = useMemo(() => { - const map: Record<string, {name: string; type?: string | string[]}[]> = {} - Object.entries(evaluatorsBySlug).forEach(([slug, evaluator]) => { - const definitions = collectMetricSchemasFromEvaluator(evaluator) - .map(({name, schema}) => { - const trimmed = (name || "").trim() - if (!trimmed) return null - return {name: trimmed, type: deriveSchemaMetricType(schema)} - }) - .filter(Boolean) as {name: string; type?: string | string[]}[] - - const existing = map[slug] ?? [] - const merged = new Map<string, {name: string; type?: string | string[]}>() - existing.forEach((definition) => merged.set(definition.name, definition)) - definitions.forEach((definition) => merged.set(definition.name, definition)) - map[slug] = Array.from(merged.values()) - }) - return map - }, [evaluatorsBySlug]) - - const evaluatorMetricKeysBySlug = useMemo(() => { - const map: Record<string, Set<string>> = {} - Object.entries(schemaMetricDefinitionsBySlug).forEach(([slug, definitions]) => { - const set = new Set<string>() - definitions.forEach(({name}) => { - const canonical = canonicalizeMetricKey(name) - set.add(name) - set.add(canonical) - const prefixed = `${slug}.${name}` - set.add(prefixed) - set.add(canonicalizeMetricKey(prefixed)) - }) - map[slug] = set - }) - return map - }, [schemaMetricDefinitionsBySlug]) - - // Convenience lookup maps - const evalById = useMemo(() => { - const map: Record<string, any> = {} - runs.forEach((r) => (map[r.enrichedRun?.id || r.id] = r)) - return map - }, [runs]) - - const metricsLookup = useMemo(() => { - const map: Record<string, Record<string, BasicStats>> = {} - - metricsByRun.forEach(({id, metrics}) => { - const source = (metrics || {}) as Record<string, BasicStats> - const normalized: Record<string, BasicStats> = {...source} - - Object.entries(source || {}).forEach(([rawKey, value]) => { - const canonical = canonicalizeMetricKey(rawKey) - if (canonical !== rawKey && normalized[canonical] === undefined) { - normalized[canonical] = value - } - }) - map[id] = normalized - }) - - return map - }, [metricsByRun]) - - const combinedMetricEntries = useMemo(() => { - const entries: { - fullKey: string - evaluatorSlug: string - metricKey: string - }[] = [] - const seen = new Set<string>() - - const pushEntry = (source: Record<string, any>) => { - Object.keys(source || {}).forEach((rawKey) => { - const canonical = canonicalizeMetricKey(rawKey) - if (INVOCATION_METRIC_SET.has(canonical)) return - if (!canonical.includes(".")) return - if (seen.has(canonical)) return - - const metric = - (getMetricValueWithAliases(source, canonical) as Record<string, any>) || - (source?.[rawKey] as Record<string, any>) - if (!metricHasContent(metric)) return - - const segments = canonical.split(".").filter(Boolean) - if (!segments.length) return - - const resolveSlugFromSegments = () => { - let slugCandidate = segments[0] - let idx = 1 - while (idx <= segments.length) { - if (evaluatorsBySlug[slugCandidate]) { - return {slug: slugCandidate, metricStartIdx: idx} - } - if (idx >= segments.length) break - slugCandidate = `${slugCandidate}.${segments[idx]}` - idx += 1 - } - if (segments.length > 1 && evaluatorsBySlug[segments[1]]) { - return {slug: segments[1], metricStartIdx: 2} - } - return null - } - - const resolved = resolveSlugFromSegments() - if (!resolved) return - const {slug, metricStartIdx} = resolved - - const evaluator = evaluatorsBySlug[slug] - if (!evaluator) return - - const metricKeySegments = segments.slice(metricStartIdx) - const metricKey = - metricKeySegments.length > 0 - ? metricKeySegments.join(".") - : (segments[metricStartIdx - 1] ?? slug) - - if (metricKey.startsWith("attributes.ag.metrics")) { - return - } - - const allowedKeys = evaluatorMetricKeysBySlug[slug] - if (allowedKeys && allowedKeys.size) { - const keySegments = metricKey.split(".").filter(Boolean) - const candidateKeys = new Set<string>([metricKey]) - keySegments.forEach((_, idx) => { - const prefix = keySegments.slice(0, idx + 1).join(".") - const suffix = keySegments.slice(idx).join(".") - if (prefix) candidateKeys.add(prefix) - if (suffix) candidateKeys.add(suffix) - const segment = keySegments[idx] - if (segment) candidateKeys.add(segment) - }) - const matchesDefinition = Array.from(candidateKeys).some((key) => - allowedKeys.has(key), - ) - if (!matchesDefinition) return - } - - entries.push({fullKey: canonical, evaluatorSlug: slug, metricKey}) - seen.add(canonical) - }) - } - - metricsByRun.forEach(({metrics}) => { - const source = (metrics || {}) as Record<string, any> - pushEntry(source) - }) - - return entries - }, [metricsByRun, evaluatorsBySlug, evaluatorMetricKeysBySlug]) - - const baseRunState = baseRunId ? evalById[baseRunId] : undefined - const hasBaseScenarios = - (typeof baseRunState?.statusMeta?.total === "number" && - baseRunState.statusMeta.total > 0) || - (Array.isArray(baseRunState?.scenarios) && baseRunState.scenarios.length > 0) - const shouldShowSpiderPlaceholder = !hasBaseScenarios - - const getFrequencyData = useCallback((metric: any, returnPercentage = true) => { - const trueEntry = (metric as any)?.frequency?.find((f: any) => f?.value === true) - const total = (metric as any)?.count ?? 0 - return returnPercentage - ? `${(((trueEntry?.count ?? 0) / total) * 100).toFixed(2)}%` - : ((trueEntry?.count ?? 0) / total) * 100 - }, []) - - const chartMetrics = useMemo(() => { - interface Axis { - name: string - maxScore: number - type: "binary" | "numeric" - value?: number - [k: string]: any - _key: string - } - - const axesByKey: Record<string, Axis> = {} - - combinedMetricEntries.forEach(({fullKey, evaluatorSlug, metricKey}) => { - const evaluator = evaluatorsBySlug[evaluatorSlug] - if (!evaluator) return - - const displayMetricName = metricKey - ? formatMetricName(metricKey) - : formatMetricName(fullKey) - const evaluatorLabel = evaluator?.name ?? formatColumnTitle(evaluatorSlug) - - const axis = - axesByKey[fullKey] || - (axesByKey[fullKey] = { - name: `${evaluatorLabel} - ${displayMetricName}`, - maxScore: 100, - type: "numeric", - _key: fullKey, - }) - - allRunIds.forEach((runId, runIdx) => { - const stats = metricsLookup[runId] || {} - const metric = getMetricValueWithAliases(stats, fullKey) - if (!metricHasContent(metric)) return - - const isBinary = Array.isArray((metric as any)?.frequency) - axis.type = isBinary ? "binary" : "numeric" - if (!isBinary) { - const mx = (metric as any)?.max - if (typeof mx === "number") { - axis.maxScore = Math.max(axis.maxScore, mx) - } - } else { - axis.maxScore = 100 - } - - const seriesKey = runIdx === 0 ? "value" : `value-${runIdx + 1}` - axis[seriesKey] = isBinary - ? getFrequencyData(metric, false) - : ((metric as any)?.mean ?? 0) - }) - }) - - let axes: Axis[] = Object.values(axesByKey) - - const evaluatorCount = axes.length - const addInvocationAxis = (metricKey: string, label?: string) => { - const axis: Axis = { - name: label ?? getMetricDisplayName(metricKey), - maxScore: 0, - type: "numeric", - _key: metricKey, - } - - allRunIds.forEach((runId, runIdx) => { - const metrics = metricsLookup[runId] - const metric = getMetricValueWithAliases(metrics || {}, metricKey) as any - if (!metric) return - const seriesKey = runIdx === 0 ? "value" : `value-${runIdx + 1}` - if (metric.mean !== undefined) { - axis[seriesKey] = metric.mean - axis.maxScore = Math.max(axis.maxScore, metric.mean) - } - }) - - if (axis.maxScore > 0) { - axes.push(axis) - } - } - - if (evaluatorCount < 3) { - INVOCATION_METRIC_COLUMNS.forEach(({key, label}) => addInvocationAxis(key, label)) - } - - if (axes.length > 0) { - allRunIds.forEach((_, runIdx) => { - const seriesKey = runIdx === 0 ? "value" : `value-${runIdx + 1}` - axes.forEach((a) => { - if (a[seriesKey] === undefined) a[seriesKey] = 0 - }) - }) - } - - return axes.map(({_key, ...rest}) => rest) - }, [allRunIds, combinedMetricEntries, evaluatorsBySlug, metricsLookup, getFrequencyData]) - - const spiderChartClassName = clsx([ - "min-h-[400px] h-[400px]", - {"w-[50%] !h-full": !isComparison}, - ]) - - const chartSeries = useMemo( - () => - allRunIds.map((id, idx) => { - const state = evalById[id] - const compareIdx = state?.compareIndex || idx + 1 - const colorIdx = state?.colorIndex || (state?.isBase ? 1 : undefined) || compareIdx - return { - key: idx === 0 ? "value" : `value-${idx + 1}`, - color: (EVAL_COLOR as any)[colorIdx] || "#3B82F6", - name: state?.enrichedRun?.name || `Eval ${compareIdx}`, - } - }), - [allRunIds, evalById], - ) - - const sortedEvaluatorMetricEntries = useMemo(() => { - const entries = [...combinedMetricEntries] - entries.sort((a, b) => - a.evaluatorSlug === b.evaluatorSlug - ? a.metricKey.localeCompare(b.metricKey) - : a.evaluatorSlug.localeCompare(b.evaluatorSlug), - ) - return entries - }, [combinedMetricEntries]) - - const dataSource = useMemo(() => { - // const baseEval = evalById[baseRunId!]?.enrichedRun - const rows: any[] = [] - - // Testsets row - if (type !== "online") { - const testsetRow: any = {key: "testsets", title: "Testsets", values: {}} - allRunIds.forEach((id) => { - if (baseRunId !== id) return - const enr = evalById[id]?.enrichedRun - const tags = (enr?.testsets || []).map((t: any) => ( - <TagWithLink key={t.id} name={t.name} href={`${projectURL}/testsets/${t.id}`} /> - )) - testsetRow.values[id] = tags.length ? tags[0] : "" - }) - rows.push(testsetRow) - } - - // Evaluations row - const evalsRow: any = {key: "evaluations", title: "Evaluations", values: {}} - allRunIds.forEach((id) => { - const state = evalById[id] - const enr = state?.enrichedRun - const colorIndex = - state?.colorIndex || (state?.isBase ? 1 : undefined) || state?.compareIndex || 1 - const color = EVAL_TAG_COLOR?.[colorIndex] - // evalsRow.values[id] = enr ? <EvalNameTag run={enr} color={color} /> : "" - evalsRow.values[id] = enr ? ( - <div className="group flex items-center justify-between gap-2 w-full"> - <EvalNameTag run={enr} color={color} /> - <span className="opacity-0 group-hover:opacity-100 transition-opacity"> - <RenameEvalButton - id={id} - name={enr?.name} - description={enr?.description} - runId={id} - type="text" - size="small" - /> - </span> - </div> - ) : ( - "" - ) - }) - rows.push(evalsRow) - - // date row - const dateRow: any = {key: "date", title: "Created at", values: {}} - allRunIds.forEach((id) => { - const state = evalById[id] - const enr = state?.enrichedRun - dateRow.values[id] = enr?.createdAt - }) - rows.push(dateRow) - - if (type === "online") { - const samplingRow: any = { - key: "sampling", - title: "Sampling rate", - values: {}, - } - allRunIds.forEach((id) => { - const state = evalById[id] - samplingRow.values[id] = <RunSamplingRate state={state} /> - }) - rows.push(samplingRow) - } - - // Variants row - if (type !== "online") { - const variantsRow: any = {key: "variants", title: "Variants", values: {}} - allRunIds.forEach((id) => { - const enr = evalById[id]?.enrichedRun - const v = enr?.variants?.[0] as any - if (!v) { - variantsRow.values[id] = <div className="not-available-table-cell">N/A</div> - return - } - const summary = getVariantDisplayMetadata(v) - variantsRow.values[id] = ( - <VariantTag - id={summary.revisionId} - variantName={summary.label} - revision={v?.revision} - disabled={!summary.canNavigate} - enrichedRun={enr} - variant={v} - /> - ) - }) - rows.push(variantsRow) - } - - // Filters / Queries row - if (type === "online") { - const filtersRow: any = {key: "filters", title: "Filters / Queries", values: {}} - allRunIds.forEach((id) => { - const state = evalById[id] - filtersRow.values[id] = <RunFiltersTags state={state} /> - }) - rows.push(filtersRow) - } - - // Metric rows (generic + evaluator) - const pushMetricRow = (key: string, labelNode: any) => { - const row: any = {key, title: labelNode, values: {}} - allRunIds.forEach((id) => { - const metric = getMetricValueWithAliases(metricsLookup[id] || {}, key) as - | BasicStats - | any - let value: any - - if (metric && (metric as any)?.mean !== undefined) { - const meanValue = (metric as any).mean - value = - key === DURATION_METRIC_KEY - ? formatLatency(meanValue) - : formatMetricValue(key, meanValue) - } else if ( - metric && - Array.isArray((metric as any)?.unique) && - typeof (metric as any)?.unique?.[0] === "boolean" - ) { - value = getFrequencyData(metric) - } - - row.values[id] = - value === undefined || value === null || value === "" ? ( - <div className="not-available-table-cell" /> - ) : ( - value - ) - }) - rows.push(row) - } - - INVOCATION_METRIC_COLUMNS.forEach(({key: canonicalKey, label}) => { - const baseMetric = getMetricValueWithAliases( - metricsLookup[baseRunId!] || {}, - canonicalKey, - ) as any - const hasMean = baseMetric && (baseMetric as any)?.mean !== undefined - const titleNode = ( - <div className="flex items-center gap-2"> - {label} - {/* {hasMean && <span className="text-[#586673]">(mean)</span>} */} - </div> - ) - pushMetricRow(canonicalKey, titleNode) - }) - - // Evaluator metrics grouped by evaluator slug - sortedEvaluatorMetricEntries.forEach(({evaluatorSlug: slug, metricKey, fullKey}) => { - const evaluator = evaluatorsBySlug[slug] - const baseMetric = getMetricValueWithAliases( - metricsLookup[baseRunId!] || {}, - fullKey, - ) as any - const metricPath = metricKey || fullKey - const labelSegment = metricPath.split(".").pop() || metricPath - const displayMetricName = formatColumnTitle(labelSegment) - const titleNode = ( - <div className="flex flex-col gap-0.5"> - <span className="text-[#586673]"> - {evaluator?.name ?? formatColumnTitle(slug)} - </span> - <div className="flex items-center gap-2"> - {displayMetricName} - {baseMetric && (baseMetric as any)?.mean !== undefined && ( - <span className="text-[#586673]">(mean)</span> - )} - </div> - </div> - ) - pushMetricRow(fullKey, titleNode) - }) - - return rows - }, [ - allRunIds, - baseRunId, - evalById, - evaluatorsBySlug, - getFrequencyData, - metricsLookup, - projectURL, - sortedEvaluatorMetricEntries, - type, - ]) - - return ( - <div className={clsx("border border-solid border-[#EAEFF5] rounded h-full", className)}> - <div className="py-2 px-3 flex flex-col justify-center h-[60px] border-0 border-b border-solid border-[#EAEFF5]"> - <Typography.Text className="font-medium">Evaluator Scores Overview</Typography.Text> - <Typography.Text className="text-[#758391]"> - Average evaluator score across evaluations - </Typography.Text> - </div> - - <div - className={clsx([ - "p-2 w-full flex gap-2 shrink-0", - {"flex-col": isComparison}, - {"h-[calc(100%-60px)]": !isComparison}, - ])} - > - <div - className={clsx([ - "overflow-y-auto", - {"w-[50%]": !isComparison}, - {"w-full": chartMetrics.length < 3}, - ])} - > - <Table - dataSource={dataSource} - columns={useMemo(() => { - // First column is the label/title - const cols: any[] = [ - { - title: "Metric", - dataIndex: "title", - key: "title", - minWidth: 120, - fixed: "left", - }, - ] - - // One value column per run (base + comparisons) - allRunIds.forEach((id, idx) => { - const state = evalById[id] - const compareIdx = state?.compareIndex || idx + 1 - const colorIdx = - state?.colorIndex || - (state?.isBase ? 1 : undefined) || - compareIdx - cols.push({ - title: idx === 0 ? "Label" : `Label_${idx + 1}`, - key: `label_${id}`, - render: (_: any, record: any) => { - // Merge "Testsets" row across all run columns - if (record?.key === "testsets") { - if (id === allRunIds[0]) { - return { - children: - record?.values?.[baseRunId] ?? - record?.values?.[id] ?? - "", - props: {colSpan: allRunIds.length}, - } - } - return {children: null, props: {colSpan: 0}} - } - const value = record?.values?.[id] - if (!value) return "-" - if (record?.key !== "evaluations") return value - - const runState = evalById[id] - const enriched = runState?.enrichedRun - const firstVariant: any = enriched?.variants?.[0] - const summary = getVariantDisplayMetadata(firstVariant) - - if (isValidElement(value)) { - return cloneElement(value as any, { - allowVariantNavigation: summary.canNavigate, - variantName: summary.label, - id: summary.revisionId || undefined, - }) - } - - return summary.label - }, - minWidth: 120, - onCell: (record: any) => ({ - style: - isComparison && record?.key !== "testsets" - ? {background: (EVAL_BG_COLOR as any)[colorIdx]} - : undefined, - }), - }) - }) - - return cols - }, [allRunIds, baseRunId, isComparison, evalById])} - pagination={false} - showHeader={false} - bordered - scroll={{x: "max-content"}} - rowKey={(r) => r.key} - /> - </div> - {shouldShowSpiderPlaceholder ? ( - <div - className={clsx( - "relative overflow-hidden rounded border border-dashed border-[#CBD5E1] bg-[#EEF2FF]/70", - spiderChartClassName, - )} - > - <SpiderChartPlaceholder className="pointer-events-none absolute inset-5 opacity-80" /> - <PlaceholderOverlay - evaluationType={type === "online" ? "online" : "auto"} - /> - </div> - ) : chartMetrics.length < 3 ? null : ( - <EvaluatorMetricsSpiderChart - className={clsx([ - "min-h-[400px] h-[400px]", - {"w-[50%] !h-full": !isComparison}, - ])} - metrics={chartMetrics} - series={chartSeries} - /> - )} - </div> - </div> - ) -} - -export default memo(EvalRunScoreTable) - -const queryRevisionCache = new Map<string, any>() - -function useRunQueryRevision(state: any) { - const runIndex = state?.runIndex - const enriched = state?.enrichedRun - const queryId: string | undefined = useMemo(() => { - // runIndex path - const stepsMeta = (runIndex?.steps || {}) as Record<string, any> - for (const meta of Object.values(stepsMeta)) { - const refs = (meta as any)?.refs || {} - const q = refs?.query || {} - const id = q?.id || refs?.queryId - if (typeof id === "string" && id.trim()) return id - } - // raw data path (like OnlineEvaluation table records) - const steps = (enriched as any)?.data?.steps - const inputStep = Array.isArray(steps) - ? steps.find((s: any) => s?.type === "input") - : undefined - const qRefs = inputStep?.references || {} - const rid = qRefs?.query?.id || qRefs?.queryId - return typeof rid === "string" && rid.trim() ? rid : undefined - }, [runIndex?.steps, enriched]) - - const [revision, setRevision] = useState<any>(() => { - if (!queryId) return undefined - return queryRevisionCache.get(queryId) - }) - useEffect(() => { - let mounted = true - ;(async () => { - try { - if (!queryId) { - if (mounted) setRevision(undefined) - return - } - if (queryRevisionCache.has(queryId)) { - if (mounted) setRevision(queryRevisionCache.get(queryId)) - return - } - const res = await retrieveQueryRevision({query_ref: {id: queryId}}) - const rev = res?.query_revision || null - queryRevisionCache.set(queryId, rev) - if (mounted) setRevision(rev) - } catch { - if (mounted) setRevision(null) - } - })() - return () => { - mounted = false - } - }, [queryId]) - - const {filtering, windowing} = (revision?.data ?? {}) as { - filtering?: QueryFilteringPayload - windowing?: {rate?: number; limit?: number; newest?: string; oldest?: string} - } - - return {filtering, windowing} -} - -function RunFiltersTags({state}: {state: any}) { - const {filtering, windowing} = useRunQueryRevision(state) - - const historicalRangeLabel = useMemo(() => { - const oldest = windowing?.oldest - const newest = windowing?.newest - if (!oldest || !newest) return undefined - const oldestDate = dayjs(oldest) - const newestDate = dayjs(newest) - if (!oldestDate.isValid() || !newestDate.isValid()) return undefined - const diffDays = Math.max(newestDate.diff(oldestDate, "day"), 0) - if (diffDays > 0 && diffDays <= 31) { - return `Historical: Last ${diffDays} day${diffDays === 1 ? "" : "s"}` - } - return `Historical: ${oldestDate.format("DD MMM YYYY")} – ${newestDate.format( - "DD MMM YYYY", - )}` - }, [windowing?.newest, windowing?.oldest]) - - const hasMeta = Boolean(windowing?.oldest && windowing?.newest && historicalRangeLabel) - - return ( - <div className="flex flex-col gap-2"> - <FiltersPreview filtering={filtering} compact /> - {hasMeta ? ( - <div className="flex flex-wrap gap-3 text-[11px] text-[#667085]"> - <span className="whitespace-nowrap">{historicalRangeLabel}</span> - </div> - ) : null} - </div> - ) -} - -function RunSamplingRate({state}: {state: any}) { - const {windowing} = useRunQueryRevision(state) - const ratePercent = useMemo(() => { - const r = typeof windowing?.rate === "number" ? windowing?.rate : undefined - if (r === undefined || Number.isNaN(r)) return undefined - const clamped = Math.max(0, Math.min(1, r)) - return Math.round(clamped * 100) - }, [windowing?.rate]) - - if (ratePercent === undefined) { - return <div className="not-available-table-cell">—</div> - } - return <span>{ratePercent}%</span> -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunSelectedEvaluations/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunSelectedEvaluations/index.tsx deleted file mode 100644 index bb6daeffaa..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunSelectedEvaluations/index.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import {memo, useMemo} from "react" - -import deepEqual from "fast-deep-equal" -import {atom, useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" - -import { - evalAtomStore, - evaluationRunStateFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import EvalNameTag from "../../assets/EvalNameTag" -import {EVAL_TAG_COLOR} from "../../assets/utils" - -const comparisonRunsAtom = atomFamily( - (runIds: string[]) => - atom((get) => { - return runIds.map((runId) => { - const state = get(evaluationRunStateFamily(runId)) - return { - runId, - run: state?.enrichedRun, - compareIndex: state?.compareIndex, - colorIndex: state?.colorIndex, - isBase: state?.isBase, - isComparison: state?.isComparison, - } - }) - }), - deepEqual, -) -const EvalRunSelectedEvaluations = ({runIds, baseRunId}: {runIds: string[]; baseRunId: string}) => { - // Build a stable, de-duplicated list so transient states (during swaps) don't render duplicates - const uniqueIds = useMemo(() => { - const list = [baseRunId, ...runIds] - const seen = new Set<string>() - return list.filter((id) => { - if (!id || seen.has(id)) return false - seen.add(id) - return true - }) - }, [baseRunId, runIds.join(",")]) - - const runs = useAtomValue(comparisonRunsAtom(uniqueIds), {store: evalAtomStore()}) - - return ( - <section className="flex items-center gap-2 min-w-0"> - <span className="shrink-0">Evaluations:</span> - <div className="relative min-w-0 flex-1"> - <div className="flex items-center gap-2 overflow-x-auto whitespace-nowrap pr-1 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!h-0"> - {runs - ?.filter((r) => Boolean(r?.run)) - .map((r) => { - const idx = r?.colorIndex ?? (r?.isBase ? 1 : undefined) - const color = idx ? (EVAL_TAG_COLOR as any)[idx] : undefined - return ( - <EvalNameTag - key={r?.run?.id || r?.runId} - run={r!.run!} - showClose - showPin - isBaseEval={r?.isBase} - color={color} - /> - ) - })} - </div> - {/* <div className="pointer-events-none absolute right-0 top-0 h-full w-6 bg-gradient-to-l from-white to-transparent" /> */} - </div> - </section> - ) -} - -export default memo(EvalRunSelectedEvaluations) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewUtilityOptions/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewUtilityOptions/index.tsx deleted file mode 100644 index c2a9ddeaf9..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewUtilityOptions/index.tsx +++ /dev/null @@ -1,413 +0,0 @@ -import {Dispatch, memo, SetStateAction, useCallback, useMemo, useState} from "react" - -import {message} from "antd" -import {ColumnsType} from "antd/es/table" -import {useAtomValue} from "jotai" -import {useRouter} from "next/router" - -import EditColumns from "@/oss/components/Filters/EditColumns" -import {useRunId} from "@/oss/contexts/RunIdContext" -import {convertToStringOrJson} from "@/oss/lib/helpers/utils" -import { - evalAtomStore, - evaluationEvaluatorsFamily, - evaluationRunStateFamily, - scenarioIdsFamily, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {scenarioMetricsMapFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" - -import EvalRunScenarioNavigator from "../../../components/EvalRunScenarioNavigator" -import SaveDataButton from "../../../components/SaveDataModal/assets/SaveDataButton" -import useExpandableComparisonDataSource from "../../../components/VirtualizedScenarioTable/hooks/useExpandableComparisonDataSource" -import {metricsFromEvaluatorsFamily} from "../../../components/VirtualizedScenarioTable/hooks/useTableDataSource" -import {urlStateAtom} from "../../../state/urlState" - -const EMPTY_ROWS: any[] = [] - -interface ScenarioCsvRow { - scenarioId?: string - record: Record<string, any> -} - -const extractPrimitiveMetricValue = (input: any): any => { - if (input === null || input === undefined) return input - if (typeof input !== "object") return input - if (Array.isArray(input)) { - for (const item of input) { - const value = extractPrimitiveMetricValue(item) - if (value !== undefined) return value - } - return undefined - } - if (typeof (input as any).mean !== "undefined") return (input as any).mean - if (typeof (input as any).value !== "undefined") return (input as any).value - if (Array.isArray((input as any).frequency) && (input as any).frequency.length) { - const sorted = [...(input as any).frequency].sort( - (a, b) => (b?.count ?? 0) - (a?.count ?? 0), - ) - const candidate = sorted.find((entry) => entry?.value !== undefined) - if (candidate) return candidate.value - } - if (Array.isArray((input as any).rank) && (input as any).rank.length) { - const candidate = (input as any).rank.find((entry: any) => entry?.value !== undefined) - if (candidate) return candidate.value - } - if (Array.isArray((input as any).unique) && (input as any).unique.length) { - return (input as any).unique.find((item: any) => item !== undefined) - } - for (const value of Object.values(input)) { - const extracted = extractPrimitiveMetricValue(value) - if (extracted !== undefined) return extracted - } - return undefined -} - -const parseAnnotationMetricKey = ( - key: string, -): null | {slug: string; metric: string; source: "direct" | "analytics"} => { - if (!key.includes(".")) return null - if (key.startsWith("attributes.ag.")) return null - const analyticsOutputMatch = key.match(/^([^\.]+)\.attributes\.ag\.data\.outputs\.(.+)$/) - if (analyticsOutputMatch) { - return {slug: analyticsOutputMatch[1], metric: analyticsOutputMatch[2], source: "analytics"} - } - const analyticsMetricMatch = key.match(/^([^\.]+)\.attributes\.ag\.metrics\.(.+)$/) - if (analyticsMetricMatch) { - return { - slug: analyticsMetricMatch[1], - metric: analyticsMetricMatch[2], - source: "analytics", - } - } - const [slug, ...rest] = key.split(".") - const metric = rest.join(".") - if (!slug || !metric) return null - return {slug, metric, source: "direct"} -} - -const EvalRunTestcaseViewUtilityOptions = ({ - columns, - setEditColumns, -}: { - columns: ColumnsType - setEditColumns: Dispatch<SetStateAction<string[]>> -}) => { - const runId = useRunId() - const router = useRouter() - // states for select dropdown - const [rows, setRows] = useState<any[]>(EMPTY_ROWS) - const evaluation = useAtomValue(evaluationRunStateFamily(runId)) - const urlState = useAtomValue(urlStateAtom) - // Determine runs to include: base + comparisons (unique, exclude base duplicates) - const compareRunIds = useMemo( - () => (urlState?.compare || []).filter(Boolean) as string[], - [urlState?.compare], - ) - const hasComparisons = compareRunIds.length > 0 - const allRunIds = Array.from(new Set([runId, ...compareRunIds.filter((id) => id !== runId)])) - const selectedScenarioId = router.query.scrollTo as string - - const {rawColumns: comparisonRawColumns} = useExpandableComparisonDataSource({ - baseRunId: runId, - comparisonRunIds: compareRunIds, - }) - - const csvDataFormat = useCallback(async () => { - const store = evalAtomStore() - - // Helper: build rows for a single run - const buildRowsForRun = async (rId: string): Promise<ScenarioCsvRow[]> => { - // 1) Scenario IDs and evaluator info for this run - const ids = store.get(scenarioIdsFamily(rId)) - const evaluatorsRaw = store.get(evaluationEvaluatorsFamily(rId)) || [] - const evaluatorList: any[] = Array.isArray(evaluatorsRaw) - ? (evaluatorsRaw as any[]) - : Object.values(evaluatorsRaw as any) - const evaluatorSlugs = evaluatorList.map((e: any) => e.slug) - const baseEvaluatorMap = new Map<string, any>() - evaluatorList.forEach((evaluator: any) => { - if (evaluator?.slug) baseEvaluatorMap.set(evaluator.slug, evaluator) - }) - - // 2) Resolve steps and metrics for this run - const [scenarioMetricsMap, ...allScenarios] = await Promise.all([ - store.get(scenarioMetricsMapFamily(rId)), - ...ids.map((id) => store.get(scenarioStepFamily({runId: rId, scenarioId: id}))), - ]) - - // Evaluation name for this run (for column 'name' when comparing) - const runState = store.get(evaluationRunStateFamily(rId)) - const evalName = runState?.enrichedRun?.name - - // 3) Build CSV-friendly rows for this run - const rowsForRun: ScenarioCsvRow[] = [] - - allScenarios.forEach((scenario) => { - if (!scenario) return - const sid = scenario.scenarioId || scenario.id || scenario.steps?.[0]?.scenarioId - const scenarioId = sid ? String(sid) : undefined - - const scenarioEvaluatorMap = new Map(baseEvaluatorMap) - const registerEvaluator = (candidate?: any) => { - if (!candidate?.slug) return - const existing = scenarioEvaluatorMap.get(candidate.slug) - if (existing && existing.name) return - scenarioEvaluatorMap.set(candidate.slug, {...existing, ...candidate}) - } - ;(scenario.steps || []).forEach((step: any) => { - registerEvaluator(step?.evaluator) - registerEvaluator(step?.annotation?.references?.evaluator) - }) - ;(scenario.annSteps || []).forEach((step: any) => { - registerEvaluator(step?.evaluator) - registerEvaluator(step?.annotation?.references?.evaluator) - }) - const resolveEvaluatorLabel = (slug?: string) => { - if (!slug) return undefined - const evaluator = scenarioEvaluatorMap.get(slug) - return evaluator?.name || evaluator?.displayName || evaluator?.slug || slug - } - - const primaryInput = scenario.inputSteps?.find((s: any) => s.inputs) || {} - const {inputs = {}, groundTruth = {}, status: inputStatus} = primaryInput as any - - const record: Record<string, any> = {} - - // When in comparison mode, include evaluation name - if (hasComparisons && evalName) { - record.name = evalName - } - - // 1. Add input - if (!Object.keys(groundTruth).length) { - Object.entries(primaryInput.testcase?.data || {}).forEach(([k, v]) => { - if (k === "testcase_dedup_id") return - record[`input.${k}`] = convertToStringOrJson(v) - }) - } else { - Object.entries(inputs || {}).forEach(([k, v]) => { - record[`input.${k}`] = convertToStringOrJson(v) - }) - } - - // 2. Add output - // Extract model output from the first invocation step that contains a trace - const invWithTrace = scenario.invocationSteps?.find((inv: any) => inv.trace) - - if (!invWithTrace) { - const invWithErr = scenario.invocationSteps?.find((inv: any) => inv.error) - if (invWithErr) { - record.output = convertToStringOrJson( - invWithErr.error?.stacktrace || invWithErr.error, - ) - } - } - - if (invWithTrace) { - const traceObj = invWithTrace?.trace - let traceOutput: any - if (Array.isArray(traceObj?.nodes)) { - traceOutput = traceObj.nodes[0]?.data?.outputs - } else if (Array.isArray(traceObj?.trees)) { - traceOutput = traceObj.trees[0]?.nodes?.[0]?.data?.outputs - } - - if (traceOutput) { - record.output = convertToStringOrJson(traceOutput) - } - } - - // 3. Add status - if (!invWithTrace) { - const _invWithTrace = scenario.invocationSteps?.find((inv: any) => inv.error) - record.status = _invWithTrace?.status ?? "unknown" - } else { - record.status = invWithTrace?.status ?? "unknown" - } - - // 4. Add annotation and metrics/errors - const annSteps = scenario.steps.filter((step) => - evaluatorSlugs.includes(step.stepKey), - ) - const steps = annSteps.length - ? annSteps - : scenario.invocationSteps?.filter((inv: any) => inv.error) - const annotation = scenarioMetricsMap?.[sid] - - // Prefill metric columns so compare-eval metrics are visible even if values missing yet - const evalMetricsDefs = store.get(metricsFromEvaluatorsFamily(rId)) as any - if (evalMetricsDefs && typeof evalMetricsDefs === "object") { - Object.entries(evalMetricsDefs).forEach(([slug, defs]: [string, any[]]) => { - const label = resolveEvaluatorLabel(slug) - if (!label) return - if (!Array.isArray(defs)) return - defs.forEach((metricDef) => { - Object.keys(metricDef || {}) - .filter((k) => k !== "evaluatorSlug") - .forEach((metricName) => { - const key = `${label}.${metricName}` - if (!(key in record)) record[key] = "" - }) - }) - }) - } - - if (steps?.some((step) => step.error) || invWithTrace?.error) { - const evalMetrics = store.get(metricsFromEvaluatorsFamily(rId)) - steps.forEach((step) => { - if (!step.error) return null - - const errorMessage = - step.error.stacktrace || step?.error?.message || step.error - Object.entries(evalMetrics || {}).forEach(([k, v]) => { - if (Array.isArray(v)) { - v.forEach((metric) => { - const {evaluatorSlug, ...rest} = metric - const label = - resolveEvaluatorLabel(evaluatorSlug) || - evaluatorSlug || - "unknown" - - Object.keys(rest || {}).forEach((metricKey) => { - record[`${label}.${metricKey}`] = - convertToStringOrJson(errorMessage) - }) - }) - } - }) - }) - } - - if (annotation) { - Object.entries(annotation || {}).forEach(([k, v]) => { - const parsed = parseAnnotationMetricKey(k) - if (!parsed) return - if (["error", "errors"].includes(parsed.metric)) return - const label = resolveEvaluatorLabel(parsed.slug) - if (!label) return - - const primitive = extractPrimitiveMetricValue(v) - if (primitive === undefined) return - - const recordKey = `${label}.${parsed.metric}` - const existingValue = record[recordKey] - if ( - parsed.source === "direct" && - existingValue !== undefined && - existingValue !== null && - existingValue !== "" - ) { - return - } - - record[recordKey] = - typeof primitive === "number" - ? Number.isFinite(primitive) && !Number.isInteger(primitive) - ? primitive.toFixed(3) - : primitive - : convertToStringOrJson(primitive) - }) - } - rowsForRun.push({record, scenarioId}) - }) - - return rowsForRun - } - - // Build data across all runs - const rowsByRun = new Map<string, ScenarioCsvRow[]>() - const lookupByRun = new Map<string, Map<string, ScenarioCsvRow>>() - - for (const rId of allRunIds) { - const rows = await buildRowsForRun(rId) - rowsByRun.set(rId, rows) - - const scenarioLookup = new Map<string, ScenarioCsvRow>() - rows.forEach((row) => { - if (row && row.scenarioId) { - scenarioLookup.set(row.scenarioId, row) - } - }) - lookupByRun.set(rId, scenarioLookup) - } - - if (!hasComparisons) { - const baseRows = rowsByRun.get(runId) || [] - return baseRows.map(({record}) => record) - } - - const orderedResults: Record<string, any>[] = [] - const baseRows = rowsByRun.get(runId) || [] - const uniqueCompareRunIds = Array.from( - new Set(compareRunIds.filter((id) => id && id !== runId)), - ) - - baseRows.forEach((baseRow, index) => { - if (!baseRow) return - orderedResults.push(baseRow.record) - - uniqueCompareRunIds.forEach((compareId) => { - const compareRows = rowsByRun.get(compareId) || [] - if (!compareRows.length) return - - const scenarioLookup = lookupByRun.get(compareId) - const matchedRow = - (baseRow.scenarioId && scenarioLookup?.get(baseRow.scenarioId)) || - compareRows[index] - - if (matchedRow) { - orderedResults.push(matchedRow.record) - } - }) - }) - - return orderedResults - }, [runId, evalAtomStore, allRunIds, compareRunIds, hasComparisons]) - - const onClickSaveData = useCallback(async () => { - try { - const data = await csvDataFormat() - setRows(data) - } catch (error) { - message.error("Failed to export results") - } - }, [csvDataFormat]) - - return ( - <div className="flex items-center justify-between gap-4 py-2 px-6"> - <div className="flex items-center gap-2"> - <span className="text-nowrap">Go to testcase:</span> - <EvalRunScenarioNavigator - querySelectorName="scrollTo" - activeId={selectedScenarioId} - selectProps={{style: {minWidth: 220}, placeholder: "Navigate in a scenario ##"}} - showOnlySelect - /> - </div> - <div className="flex items-center gap-2"> - <SaveDataButton - exportDataset - label="Export results" - onClick={onClickSaveData} - rows={rows} - name={evaluation?.enrichedRun?.name} - type="text" - /> - <EditColumns - columns={ - hasComparisons && comparisonRawColumns - ? (comparisonRawColumns as ColumnsType) - : (columns as ColumnsType) - } - uniqueKey="auto-eval-run-testcase-column" - onChange={(keys) => { - setEditColumns(keys) - }} - /> - </div> - </div> - ) -} - -export default memo(EvalRunTestcaseViewUtilityOptions) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton.tsx deleted file mode 100644 index 16d29a948c..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" - -export const EvalRunTestcaseTableSkeleton = memo( - ({rows = 8, cols = 5, rowHight = 60}: {rows?: number; cols?: number; rowHight?: number}) => { - return ( - <div className="overflow-hidden border border-solid border-[#0517290F] !rounded-lg"> - <table className="w-full border-collapse"> - <thead> - <tr> - {Array.from({length: cols}).map((_, colIndex) => ( - <th - key={colIndex} - className="border border-solid border-[#0517290F] px-3 py-2 text-left bg-gray-50" - > - <Skeleton.Input - active - style={{width: (80 * colIndex) / 1.5, height: 20}} - size="small" - /> - </th> - ))} - </tr> - </thead> - <tbody> - {Array.from({length: rows}).map((_, rowIndex) => ( - <tr key={rowIndex}> - {Array.from({length: cols}).map((_, colIndex) => ( - <td - key={colIndex} - className="border border-solid border-[#0517290F] px-3 py-2" - > - <Skeleton.Input - active - style={{ - width: (200 * colIndex) / 2, - height: rowHight, - }} - size="small" - /> - </td> - ))} - </tr> - ))} - </tbody> - </table> - </div> - ) - }, -) - -const EvalRunTestcaseViewerSkeleton = ({ - rows = 8, - cols = 5, - rowHight = 60, -}: { - rows?: number - cols?: number - rowHight?: number -}) => { - return ( - <div className="flex flex-col grow gap-2 pb-4 min-h-0 px-6"> - <div className="flex items-center justify-between"> - <Skeleton.Input active className="!w-[200px] !h-[28px]" /> - <div className="flex items-center gap-2"> - <Skeleton.Input active className="!h-[28px]" /> - <Skeleton.Input active className="!h-[28px]" /> - </div> - </div> - - <EvalRunTestcaseTableSkeleton rows={rows} cols={cols} rowHight={rowHight} /> - </div> - ) -} - -export default memo(EvalRunTestcaseViewerSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/index.tsx deleted file mode 100644 index 0508bfba38..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvalRunTestcaseViewer/index.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import {memo} from "react" - -import VirtualizedScenarioTable from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable" -import useTableDataSource from "@/oss/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useTableDataSource" - -import EvalRunTestcaseViewUtilityOptions from "../EvalRunTestcaseViewUtilityOptions" - -import EvalRunTestcaseViewerSkeleton from "./assets/EvalRunTestcaseViewerSkeleton" - -const EvalRunTestcaseViewer = () => { - const {antColumns, isLoadingSteps, setEditColumns, rawColumns} = useTableDataSource() - - if (isLoadingSteps) { - return <EvalRunTestcaseViewerSkeleton /> - } - - return ( - <div className="flex flex-col grow gap-1 min-h-0"> - <EvalRunTestcaseViewUtilityOptions - setEditColumns={setEditColumns} - columns={rawColumns} - /> - - <div className="grow flex flex-col gap-4 min-h-0 px-6"> - <VirtualizedScenarioTable /> - </div> - </div> - ) -} - -export default memo(EvalRunTestcaseViewer) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/index.tsx deleted file mode 100644 index 870d59a3b0..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/index.tsx +++ /dev/null @@ -1,223 +0,0 @@ -import {memo, useMemo} from "react" - -import {Typography} from "antd" -import clsx from "clsx" -import { - PolarAngleAxis, - PolarGrid, - PolarRadiusAxis, - Radar, - RadarChart, - ResponsiveContainer, - Tooltip, -} from "recharts" - -import {format3Sig} from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils" -import {formatCurrency, formatLatency} from "@/oss/lib/helpers/formatters" - -import {EVAL_COLOR} from "../../assets/utils" - -import {EvaluatorMetricsSpiderChartProps, MetricData, SeriesMeta} from "./types" - -const EvaluatorMetricsSpiderChart = ({ - className, - metrics = [], - maxScore = 100, - series = [{key: "value", color: EVAL_COLOR[1], name: "Eval 1"}], -}: EvaluatorMetricsSpiderChartProps) => { - // Build chart data with per-axis normalization to 0-100 so - // each axis can have its own maxScore while sharing a single radius scale. - const chartData: MetricData[] = useMemo(() => { - return metrics.map((m) => { - const axisMax = - typeof m.maxScore === "number" && isFinite(m.maxScore) && m.maxScore > 0 - ? m.maxScore - : maxScore - - const baseRaw = typeof m.value === "number" && isFinite(m.value) ? m.value : 0 - const baseNorm = Math.max(0, Math.min(100, (baseRaw / axisMax) * 100)) - - const obj: MetricData = { - subject: m.name, - value: baseNorm, - rawValue: baseRaw, - maxScore: axisMax, - type: m.type, - } - - // Add normalized values for additional series using same axis max - series.forEach((s) => { - const key = s.key - if (key === "value") return // already set - const raw = typeof m[key] === "number" && isFinite(m[key]) ? m[key] : 0 - const norm = Math.max(0, Math.min(100, (raw / axisMax) * 100)) - ;(obj as any)[key] = norm - }) - - return obj - }) - }, [metrics, maxScore, series]) - - if (metrics.length === 0) { - return ( - <div className={clsx("flex items-center justify-center", className)}> - <Typography.Text type="secondary">No metrics available</Typography.Text> - </div> - ) - } - - const LABEL_OFFSET = 12 // distance outside web - const NUDGE = 5 // small outward nudge - const RAD = Math.PI / 180 - - return ( - <div className={clsx("border border-solid border-[#EAEFF5] rounded", className)}> - <ResponsiveContainer width="100%" height="100%"> - <RadarChart - cx="52%" - cy={chartData.length < 4 ? "62%" : "50%"} - outerRadius={150} - data={chartData} - > - <PolarGrid stroke="#EAEFF5" /> - <PolarAngleAxis - dataKey="subject" - tick={(props: any) => { - const {cx, cy, radius, payload, index} = props - const label = (payload?.value ?? "") as string - - const angle = Number(payload?.coordinate ?? 0) - const r = (radius ?? 0) + LABEL_OFFSET - - const x = cx + r * Math.cos(-angle * RAD) - const y = cy + r * Math.sin(-angle * RAD) - - const cos = Math.cos(-angle * RAD) - const sin = Math.sin(-angle * RAD) - - const textAnchor = - Math.abs(cos) < 0.1 ? "middle" : cos > 0 ? "start" : "end" - - const nudgeX = cos * NUDGE - const nudgeY = sin * NUDGE - - // simple 2-line clamp to avoid spilling into chart - const clampLines = (s: string, max = 18) => { - const parts = s.includes(" - ") ? s.split(" - ") : [s] - if (parts.length >= 2) return parts.slice(0, 2) - const words = s.split(/\s+/) - let line1 = "" - let line2 = "" - for (const w of words) { - if ((line1 + " " + w).trim().length <= max) - line1 = (line1 + " " + w).trim() - else if ((line2 + " " + w).trim().length <= max) - line2 = (line2 + " " + w).trim() - else { - line2 = (line2 || w).slice(0, max - 1) + "…" - break - } - } - return line2 ? [line1, line2] : [line1] - } - - const lines = clampLines(label, 18) - - return ( - <g - transform={`translate(${x + nudgeX},${y + nudgeY})`} - pointerEvents="none" - > - <text - textAnchor={textAnchor} - dominantBaseline="middle" - fill="#4B5563" - fontSize={10} - style={{userSelect: "none"}} - > - {lines.map((ln, i) => ( - <tspan key={i} x={0} dy={i === 0 ? 0 : 12}> - {ln} - </tspan> - ))} - </text> - </g> - ) - }} - /> - <PolarRadiusAxis angle={30} domain={[0, 100]} axisLine={false} tick={false} /> - <Tooltip - labelStyle={{color: "#0F172A"}} - formatter={(val: any, name: any, payload: any) => { - try { - const d = payload?.payload as MetricData | undefined - if (!d) return [val, "Score"] - // val is normalized percentage for the active series - const pct = typeof val === "number" ? val : Number(val) - // Reconstruct raw from normalized and axis max (for numeric) - const rawFromPct = (pctNum: number) => - (pctNum / 100) * (d?.maxScore ?? 0) - - const color = - typeof payload?.color === "string" ? payload.color : "#0F172A" - const styledName = ( - <span style={{color, fontWeight: 600}}>{String(name)}</span> - ) - - if (d.type === "binary") { - const valueLabel = `${pct.toFixed(2)}% / 100%` - return [ - <span style={{color, fontWeight: 600}}>{valueLabel}</span>, - styledName, - ] - } - - // Numeric: format latency/costs specially when subject hints it - const raw = rawFromPct(pct) - const valueColor = {color, fontWeight: 600} - if (String(d?.subject).toLowerCase().includes("duration")) { - return [ - <span style={valueColor}> - {`${formatLatency(raw)} / ${formatLatency(d?.maxScore)}`} - </span>, - styledName, - ] - } - if (String(d?.subject).toLowerCase().includes("cost")) { - return [ - <span style={valueColor}> - {`${formatCurrency(raw)} / ${formatCurrency(d?.maxScore)}`} - </span>, - styledName, - ] - } - return [ - <span style={valueColor}>{`${format3Sig(raw)} / ${format3Sig( - d?.maxScore, - )}`}</span>, - styledName, - ] - } catch (error) { - return [String(val), String(name)] - } - }} - /> - {series.map((s: SeriesMeta, i: number) => ( - <Radar - key={s.key} - name={s.name ?? `Eval ${i + 1}`} - dataKey={s.key} - stroke={s.color} - fill={s.color} - fillOpacity={0.2} - dot={{fill: s.color, r: 4}} - isAnimationActive={false} - /> - ))} - </RadarChart> - </ResponsiveContainer> - </div> - ) -} - -export default memo(EvaluatorMetricsSpiderChart) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/types.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/types.ts deleted file mode 100644 index 6a485ee9bb..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetircsSpiderChart/types.ts +++ /dev/null @@ -1,31 +0,0 @@ -export interface MetricData { - subject: string - // Normalized values used for plotting (0-100) per series. - // Base series uses `value`; additional series use keys like `value-2`, `value-3`, ... - value?: number - [key: string]: any - // Raw value and axis-specific max for tooltip/labels (base series) - rawValue: number - maxScore: number - type?: "binary" | "numeric" -} - -export interface SeriesMeta { - key: string // e.g. "value", "value-2", ... - color: string - name?: string -} - -export interface EvaluatorMetricsSpiderChartProps { - className?: string - metrics: { - name: string - // Base value; additional series are passed via dynamic props (e.g., value-2) - value?: number - [key: string]: any - maxScore: number - type: "binary" | "numeric" - }[] - maxScore?: number - series?: SeriesMeta[] -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/TimeSeriesChart.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/TimeSeriesChart.tsx deleted file mode 100644 index 3fba471a38..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/TimeSeriesChart.tsx +++ /dev/null @@ -1,1105 +0,0 @@ -import {Fragment, memo, useMemo, useState, useEffect, useRef, type ReactNode} from "react" - -import {Card, Typography} from "antd" -import clsx from "clsx" -import { - Area, - CartesianGrid, - ComposedChart, - Line, - LineChart, - ResponsiveContainer, - Tooltip, - XAxis, - YAxis, -} from "recharts" - -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" - -import {formatMetricName} from "../../assets/utils" -import PlaceholderOverlay, {PlaceholderEvaluationType} from "../shared/PlaceholderOverlay" - -import {withAlpha, format3Sig, formatTimestamp} from "./assets/helpers" -import HistogramChart from "./assets/HistogramChart" -import LowerBand from "./assets/LowerBand" -import UpperBand from "./assets/UpperBand" - -// helpers moved to ./assets/helpers - -const PLACEHOLDER_TIME_START = Date.UTC(2025, 0, 1, 9, 0, 0) -const PLACEHOLDER_TIME_STEP = 60 * 60 * 1000 -export const PLACEHOLDER_LINE_COLOR = "#9EB8FF" -export const PLACEHOLDER_FILL_COLOR = "rgba(62, 124, 247, 0.12)" -export const PLACEHOLDER_TIME_SERIES = [ - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 0, value: 22}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 1, value: 32}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 2, value: 26}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 3, value: 38}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 4, value: 30}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 5, value: 42}, - {timestamp: PLACEHOLDER_TIME_START + PLACEHOLDER_TIME_STEP * 6, value: 34}, -] as const - -const X_AXIS_PADDING_RATIO = 0.035 -const X_AXIS_PADDING_MIN_MS = 60 * 1000 // 1 minute -const BOOLEAN_AXIS_PADDING = 2 -const BOOLEAN_AXIS_TICKS = [0, 25, 50, 75, 100] as const - -interface SeriesPoint { - timestamp: number - value: number - scenarioCount?: number - p25?: number - p50?: number - p75?: number - histogram?: {from: number; to: number; count: number}[] -} - -interface TimeSeries { - id: string - name: string - color: string - points: SeriesPoint[] -} - -const EvaluatorMetricsTimeSeriesChart = ({ - className, - name, - metricKey, - evaluator, - series, - isBoolean, - evaluationType = "online", - placeholderTitle, - placeholderDescription, -}: { - className?: string - name: string - metricKey?: string - evaluator?: EvaluatorDto - series: TimeSeries[] - isBoolean?: boolean - evaluationType?: PlaceholderEvaluationType - placeholderTitle?: ReactNode - placeholderDescription?: ReactNode -}) => { - useEffect(() => { - if (process.env.NODE_ENV === "development") { - try { - const _seriesCount = Array.isArray(series) ? series.length : 0 - const _summary = (series || []).map((s) => { - const pts = Array.isArray(s.points) ? s.points : [] - const count = pts.length - const timestamps = pts.slice(0, 10).map((p) => p.timestamp) - const allTs = pts.map((p) => p.timestamp) - const minTs = allTs.length ? Math.min(...allTs) : undefined - const maxTs = allTs.length ? Math.max(...allTs) : undefined - return { - id: s.id, - name: s.name, - points: count, - minTs, - maxTs, - sampleTs: timestamps, - } - }) - } catch {} - } - }, [series, metricKey, isBoolean, evaluationType]) - const hasData = series?.some((s) => s.points.length > 0) - const evaluatorLabel = evaluator?.name || evaluator?.slug || "this evaluator" - const overlayTitle = placeholderTitle ?? "Waiting for your traces" - const overlayDescription = - placeholderDescription ?? - `Generate traces with ${evaluatorLabel} to start collecting results.` - - const chartData = useMemo(() => { - const map = new Map<number, Record<string, any>>() - series.forEach((s) => { - s.points.forEach((pt) => { - const existing = map.get(pt.timestamp) ?? {timestamp: pt.timestamp} - existing[s.id] = pt.value - if (pt.scenarioCount !== undefined) { - existing[`${s.id}__count`] = pt.scenarioCount - } - if (pt.p25 !== undefined) { - existing[`${s.id}__p25`] = pt.p25 - } - if (pt.p75 !== undefined) { - existing[`${s.id}__p75`] = pt.p75 - } - if (pt.p50 !== undefined) { - existing[`${s.id}__p50`] = pt.p50 - } - // old band helpers removed; we will compute highlight areas in windowData - if (pt.histogram && pt.histogram.length) { - existing[`${s.id}__hist`] = pt.histogram - } - map.set(pt.timestamp, existing) - }) - }) - return Array.from(map.values()).sort( - (a, b) => (a.timestamp as number) - (b.timestamp as number), - ) - }, [series]) - - const tsExtent = useMemo(() => { - if (!chartData.length) return undefined as undefined | {min: number; max: number} - const values = chartData.map((d) => Number(d.timestamp)) - const min = Math.min(...values) - const max = Math.max(...values) - return {min, max} - }, [chartData]) - - // Controlled x-domain for zooming - const [xDomain, setXDomain] = useState<[number | "auto", number | "auto"]>(["auto", "auto"]) - - useEffect(() => { - // Reset on data change - setXDomain(["auto", "auto"]) - }, [tsExtent?.min, tsExtent?.max]) - - const clamp = (v: number, min: number, max: number) => Math.max(min, Math.min(max, v)) - const resolveRange = (): [number, number] | undefined => { - if (!tsExtent) return undefined - const min = xDomain[0] === "auto" ? tsExtent.min : (xDomain[0] as number) - const max = xDomain[1] === "auto" ? tsExtent.max : (xDomain[1] as number) - return [min, max] - } - - const containerRef = useRef<HTMLDivElement | null>(null) - const [isPanning, setIsPanning] = useState(false) - const [suppressTooltip, setSuppressTooltip] = useState(false) - const [panStartX, setPanStartX] = useState<number | null>(null) - const [panStartDomain, setPanStartDomain] = useState<[number, number] | null>(null) - const wheelAnchorRef = useRef<{ - center: number - ratio: number - timeoutId: ReturnType<typeof setTimeout> | null - } | null>(null) - const panRAF = useRef<number | null>(null) - const panTargetRef = useRef<[number, number] | null>(null) - const tooltipTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null) - - const handleMouseDown: React.MouseEventHandler<HTMLDivElement> = (e) => { - if (!tsExtent) return - setIsPanning(true) - setSuppressTooltip(true) - setPanStartX(e.clientX) - const range = resolveRange() || [tsExtent.min, tsExtent.max] - setPanStartDomain(range) - } - const handleMouseMove: React.MouseEventHandler<HTMLDivElement> = (e) => { - const rect = containerRef.current?.getBoundingClientRect() - if (!isPanning || !tsExtent || panStartX === null || !panStartDomain) return - e.preventDefault() - const plotWidth = Math.max(1, (rect?.width || 0) - chartMargin.left - chartMargin.right) - const dx = e.clientX - panStartX - const domainWidth = Math.max(panStartDomain[1] - panStartDomain[0], 1) - const speed = 1.6 // pan faster - const delta = (-dx / plotWidth) * domainWidth * speed - let nextMin = panStartDomain[0] + delta - let nextMax = panStartDomain[1] + delta - if (nextMin < tsExtent.min) { - const diff = tsExtent.min - nextMin - nextMin += diff - nextMax += diff - } - if (nextMax > tsExtent.max) { - const diff = nextMax - tsExtent.max - nextMin -= diff - nextMax -= diff - } - - panTargetRef.current = [nextMin, nextMax] - if (panRAF.current == null) { - panRAF.current = requestAnimationFrame(() => { - panRAF.current = null - const t = panTargetRef.current - if (t) setXDomain(t) - }) - } - } - const endPan = () => { - setIsPanning(false) - setPanStartX(null) - setPanStartDomain(null) - if (panRAF.current) { - cancelAnimationFrame(panRAF.current) - panRAF.current = null - } - panTargetRef.current = null - // release tooltip shortly after pan end - if (tooltipTimerRef.current) clearTimeout(tooltipTimerRef.current) - tooltipTimerRef.current = setTimeout(() => setSuppressTooltip(false), 120) - } - - // Native non-passive wheel listener to ensure preventDefault works across browsers - useEffect(() => { - const el = containerRef.current - if (!el) return - - const handler = (evt: WheelEvent) => { - if (!tsExtent || !chartData.length) return - // Only handle wheel for chart zoom when a modifier key is held - const withModifier = evt.shiftKey || evt.ctrlKey || evt.metaKey - if (!withModifier) { - // Let the event bubble to allow normal page scrolling - return - } - evt.preventDefault() - // suppress tooltip during wheel gesture - setSuppressTooltip(true) - if (tooltipTimerRef.current) clearTimeout(tooltipTimerRef.current) - - const rect = el.getBoundingClientRect() - const plotWidth = Math.max(1, rect.width - chartMargin.left - chartMargin.right) - const x = Math.max(0, Math.min(plotWidth, evt.clientX - rect.left - chartMargin.left)) - - const currentMin = xDomain[0] === "auto" ? tsExtent.min : (xDomain[0] as number) - const currentMax = xDomain[1] === "auto" ? tsExtent.max : (xDomain[1] as number) - - // Determine a stable anchor (data center + pixel ratio) for the whole wheel gesture - const ratio = Math.max(0, Math.min(1, x / plotWidth)) - let anchorCenter = wheelAnchorRef.current?.center - let anchorRatio = wheelAnchorRef.current?.ratio - if (anchorCenter == null || anchorRatio == null) { - anchorCenter = currentMin + ratio * (currentMax - currentMin) - anchorRatio = ratio - } - - const spanTotal = Math.max(tsExtent.max - tsExtent.min, 1) - const currentWidth = Math.max(currentMax - currentMin, 1) - const minWidth = spanTotal / 200 - const scrollOut = evt.deltaY > 0 - // Dead-zone at extremes to avoid jumpy behavior - const atMax = currentWidth >= spanTotal * 0.999 - const atMin = currentWidth <= minWidth * 1.001 - if ((scrollOut && atMax) || (!scrollOut && atMin)) { - // Don't change domain; just arm the idle timer to clear anchor and restore tooltip - if (wheelAnchorRef.current?.timeoutId) - clearTimeout(wheelAnchorRef.current.timeoutId) - const timeoutId = setTimeout(() => { - wheelAnchorRef.current = null - if (tooltipTimerRef.current) clearTimeout(tooltipTimerRef.current) - tooltipTimerRef.current = setTimeout(() => setSuppressTooltip(false), 80) - }, 120) - wheelAnchorRef.current = {center: anchorCenter, ratio: anchorRatio, timeoutId} - return - } - const rawFactor = scrollOut ? 1.25 : 0.8 - let newWidth = clamp(currentWidth * rawFactor, minWidth, spanTotal) - // Keep the anchor at the same pixel ratio by distributing width based on stored ratio - let nextMin = anchorCenter - anchorRatio * newWidth - let nextMax = nextMin + newWidth - let clamped = false - if (nextMin < tsExtent.min) { - nextMin = tsExtent.min - nextMax = nextMin + newWidth - clamped = true - } - if (nextMax > tsExtent.max) { - nextMax = tsExtent.max - nextMin = nextMax - newWidth - clamped = true - } - // If we had to clamp to boundaries, recompute anchorRatio so the cursor stays stable in subsequent ticks - if (clamped) { - anchorRatio = (anchorCenter - nextMin) / newWidth - // Bound [0,1] in case anchor is outside after clamp - anchorRatio = Math.max(0, Math.min(1, anchorRatio)) - } - - setXDomain([nextMin, nextMax]) - - // Reset anchor after idle time to start a new gesture on next wheel - if (wheelAnchorRef.current?.timeoutId) clearTimeout(wheelAnchorRef.current.timeoutId) - const timeoutId = setTimeout(() => { - // Clear anchor so the next wheel gesture re-anchors under the cursor - wheelAnchorRef.current = null - // allow tooltip again shortly after wheel settles - if (tooltipTimerRef.current) clearTimeout(tooltipTimerRef.current) - tooltipTimerRef.current = setTimeout(() => setSuppressTooltip(false), 80) - }, 180) - wheelAnchorRef.current = {center: anchorCenter, ratio: anchorRatio, timeoutId} - } - - el.addEventListener("wheel", handler, {passive: false}) - return () => { - el.removeEventListener("wheel", handler as any) - } - }, [chartData, tsExtent, xDomain]) - - // Cleanup any pending animation frame on unmount - useEffect(() => { - return () => { - if (panRAF.current) cancelAnimationFrame(panRAF.current) - if (tooltipTimerRef.current) clearTimeout(tooltipTimerRef.current) - } - }, []) - - // (Optional) Brush handler removed as the Brush component is not rendered currently - - const latestSummaries = useMemo(() => { - return series.map((s) => { - const latest = s.points.at(-1) - if (!latest) { - return { - name: s.name, - color: s.color, - value: "-", - } - } - - const formatted = isBoolean - ? `${Number(latest.value).toFixed(0)}%` - : format3Sig(latest.value) - return { - name: s.name, - color: s.color, - value: formatted, - } - }) - }, [series, isBoolean]) - - // Consistent chart margins to compute plot area sizes - const chartMargin = useMemo(() => ({top: 8, right: 12, bottom: 24, left: 48}), []) - - const domain = useMemo(() => { - if (isBoolean) return [0 - BOOLEAN_AXIS_PADDING, 100 + BOOLEAN_AXIS_PADDING] as const - const values = series.flatMap((s) => - s.points.flatMap((p) => - [p.value, p.p25, p.p50, p.p75].filter( - (val): val is number => typeof val === "number" && Number.isFinite(val), - ), - ), - ) - if (!values.length) return ["auto", "auto"] as const - const min = Math.min(...values) - const max = Math.max(...values) - if (min === max) { - const offset = Math.max(Math.abs(min) * 0.1, 1) - return [min - offset, max + offset] as const - } - const padding = (max - min) * 0.1 - return [min - padding, max + padding] as const - }, [series, isBoolean]) - - const xAxisDomain = useMemo(() => { - if (!tsExtent) return undefined - const rawMin = - xDomain[0] === "auto" || typeof xDomain[0] !== "number" ? tsExtent.min : xDomain[0] - const rawMax = - xDomain[1] === "auto" || typeof xDomain[1] !== "number" ? tsExtent.max : xDomain[1] - if (!Number.isFinite(rawMin) || !Number.isFinite(rawMax)) return undefined - const span = Math.max(rawMax - rawMin, 1) - const padding = Math.max(span * X_AXIS_PADDING_RATIO, X_AXIS_PADDING_MIN_MS) - const paddedMin = rawMin - padding - const paddedMax = rawMax + padding - return [paddedMin, paddedMax] as [number, number] - }, [tsExtent, xDomain]) - - const AxisTick = memo((props: any) => { - const {x, y, payload} = props || {} - const value = Number(payload?.value) - if (!Number.isFinite(value)) return null - const date = new Date(value) - const dateStr = date.toLocaleDateString([], { - year: "numeric", - month: "short", - day: "numeric", - }) - const timeStr = date.toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - hour12: false, - }) - return ( - <g transform={`translate(${x},${y})`}> - <text fill="#666" textAnchor="middle" dy={12}> - <tspan x={0} dy="0"> - {dateStr} - </tspan> - <tspan x={0} dy="12"> - {timeStr} - </tspan> - </text> - </g> - ) - }) - - const makeActiveDot = - (strokeColor: string, r = 3) => - (props: any) => { - const isEdge = !!props?.payload?.__edgeRow - if (isEdge) return <g /> - const {cx, cy} = props || {} - if (typeof cx !== "number" || typeof cy !== "number") return <g /> - return ( - <circle - cx={cx} - cy={cy} - r={r} - fill="#fff" - stroke={withAlpha(strokeColor, 0.6)} - strokeWidth={1} - /> - ) - } - - const ChartLegend = memo((props: any) => { - // Manual items mode: [{label, color}] — used when rendering outside the chart - if (Array.isArray(props?.items)) { - const items = props.items as {label: string; color: string}[] - if (!items.length) return null - return ( - <div - style={{ - marginTop: 8, - paddingBottom: 8, - display: "flex", - justifyContent: "center", - gap: 16, - fontSize: 12, - color: "#4b5563", - width: "100%", - }} - > - {items.map((it, idx) => ( - <div - key={`${it.label}-${idx}`} - style={{display: "flex", alignItems: "center", gap: 6}} - > - <span - style={{ - width: 8, - height: 8, - borderRadius: 999, - backgroundColor: it.color, - display: "inline-block", - }} - /> - <span>{it.label}</span> - </div> - ))} - </div> - ) - } - - // Fallback: Recharts payload mode (not used after moving legend outside) - const raw: any[] = Array.isArray(props?.payload) ? props.payload : [] - if (!raw.length) return null - const items = raw - .filter((it) => !!String(it?.value ?? "")) - .map((it) => ({ - label: String(it?.payload?.name ?? it?.value ?? ""), - color: String(it?.payload?.stroke || it?.payload?.fill || it?.color || "#888"), - })) - if (!items.length) return null - return <ChartLegend items={items} /> - }) - - // Augmented data: full wide dataset plus interpolated boundary rows at min/max - const windowData = useMemo(() => { - if (!chartData.length || !tsExtent) return chartData - const range = resolveRange() || [tsExtent.min, tsExtent.max] - const minNum = range[0] - const maxNum = range[1] - if (!Number.isFinite(minNum) || !Number.isFinite(maxNum) || maxNum <= minNum) - return chartData - - const rowMap = new Map<number, Record<string, number | string>>() - // only rows inside the current window - chartData.forEach((r: any) => { - const ts = Number(r.timestamp) - if (!Number.isFinite(ts) || ts < minNum || ts > maxNum) return - rowMap.set(Number(r.timestamp), {...r}) - }) - - const sorted = series.map((s) => ({ - id: s.id, - pts: [...s.points].sort((a, b) => a.timestamp - b.timestamp), - })) - - const addEdgeRow = (boundaryTs: number, side: "min" | "max") => { - let row = rowMap.get(boundaryTs) ?? {timestamp: boundaryTs} - ;(row as any).__edgeRow = true - let any = false - for (const s of sorted) { - const pts = s.pts - if (!pts.length) continue - // Binary search first index with timestamp >= boundaryTs - let lo = 0 - let hi = pts.length - 1 - let idx = pts.length - while (lo <= hi) { - const mid = (lo + hi) >> 1 - const t = pts[mid].timestamp - if (t >= boundaryTs) { - idx = mid - hi = mid - 1 - } else lo = mid + 1 - } - const next = pts[idx] - const prev = pts[idx - 1] - // Determine series range - const firstTs = pts[0]?.timestamp - const lastTs = pts[pts.length - 1]?.timestamp - if (!Number.isFinite(firstTs) || !Number.isFinite(lastTs)) continue - - // Only render at boundary if it lies within [firstTs, lastTs] - if (boundaryTs < firstTs || boundaryTs > lastTs) { - continue - } - - // Exact hit - if (next && next.timestamp === boundaryTs) { - ;(row as any)[s.id] = next.value - any = true - continue - } - if (prev && prev.timestamp === boundaryTs) { - ;(row as any)[s.id] = prev.value - any = true - continue - } - - // Interpolate between surrounding points when inside range - if (prev && next && next.timestamp !== prev.timestamp) { - if (prev.timestamp <= boundaryTs && boundaryTs <= next.timestamp) { - if (isBoolean) { - // Step-like: choose nearer neighbor within the segment - const pick = side === "min" ? prev : next - ;(row as any)[s.id] = pick.value - any = true - } else { - const ratio = - (boundaryTs - prev.timestamp) / (next.timestamp - prev.timestamp) - const val = prev.value + ratio * (next.value - prev.value) - ;(row as any)[s.id] = val - any = true - } - } - } - } - if (any) rowMap.set(boundaryTs, row) - } - - addEdgeRow(minNum, "min") - addEdgeRow(maxNum, "max") - - // Interpolate p25/p75 for rows that lack them so active dots appear consistently - const interpAt = ( - pts: {timestamp: number; value: number}[], - t: number, - ): number | undefined => { - if (!pts.length) return undefined - if (t <= pts[0].timestamp) return pts[0].value - if (t >= pts[pts.length - 1].timestamp) return pts[pts.length - 1].value - let lo = 0 - let hi = pts.length - 1 - while (lo <= hi) { - const mid = (lo + hi) >> 1 - const mt = pts[mid].timestamp - if (mt < t) lo = mid + 1 - else hi = mid - 1 - } - const next = pts[lo] - const prev = pts[lo - 1] - if (!prev || !next || next.timestamp === prev.timestamp) return undefined - const r = (t - prev.timestamp) / (next.timestamp - prev.timestamp) - return prev.value + r * (next.value - prev.value) - } - - for (const s of series) { - const p25Pts = s.points - .filter((p) => typeof p.p25 === "number") - .map((p) => ({timestamp: p.timestamp, value: p.p25 as number})) - .sort((a, b) => a.timestamp - b.timestamp) - const p75Pts = s.points - .filter((p) => typeof p.p75 === "number") - .map((p) => ({timestamp: p.timestamp, value: p.p75 as number})) - .sort((a, b) => a.timestamp - b.timestamp) - if (!p25Pts.length && !p75Pts.length) continue - - for (const [ts, row] of rowMap.entries()) { - if (typeof (row as any)[`${s.id}__p25`] !== "number" && p25Pts.length) { - const v = interpAt(p25Pts, ts) - if (typeof v === "number" && Number.isFinite(v)) { - ;(row as any)[`${s.id}__p25`] = v - } - } - if (typeof (row as any)[`${s.id}__p75`] !== "number" && p75Pts.length) { - const v = interpAt(p75Pts, ts) - if (typeof v === "number" && Number.isFinite(v)) { - ;(row as any)[`${s.id}__p75`] = v - } - } - - // Compute helpers - const mainVal = Number((row as any)[s.id]) - const p25Val = (row as any)[`${s.id}__p25`] - const p75Val = (row as any)[`${s.id}__p75`] - if (Number.isFinite(mainVal)) { - const NUM_SEGS = 30 - if (typeof p75Val === "number" && Number.isFinite(p75Val as number)) { - ;(row as any)[`${s.id}__upperBase`] = mainVal - const ud = Math.max(0, (p75Val as number) - mainVal) - const usz = ud / NUM_SEGS - for (let i = 0; i < NUM_SEGS; i++) { - ;(row as any)[`${s.id}__upperSeg${i}`] = usz - } - } - if (typeof p25Val === "number" && Number.isFinite(p25Val as number)) { - ;(row as any)[`${s.id}__lowerBase`] = p25Val as number - const ld = Math.max(0, mainVal - (p25Val as number)) - const lsz = ld / NUM_SEGS - for (let i = 0; i < NUM_SEGS; i++) { - ;(row as any)[`${s.id}__lowerSeg${i}`] = lsz - } - } - } - } - } - - return Array.from(rowMap.values()).sort((a, b) => Number(a.timestamp) - Number(b.timestamp)) - }, [chartData, xDomain, tsExtent, series, isBoolean]) - - return ( - <Card - title={ - <div className="flex justify-between items-center w-full h-[64px] p-0"> - <div className="flex flex-col gap-1"> - <Typography.Text className="font-medium text-sm capitalize"> - {evaluator?.name ?? formatMetricName(metricKey || name)} - </Typography.Text> - <Typography.Text className="capitalize font-normal" type="secondary"> - {name} - </Typography.Text> - </div> - <div className="flex items-center gap-3 pr-2"> - {latestSummaries.length ? ( - <div className="hidden md:flex items-center gap-4 text-xs text-[#344054]"> - {latestSummaries.map((item) => ( - <div key={item.name} className="flex items-center gap-1"> - <span - className="inline-block w-2 h-2 rounded-full" - style={{backgroundColor: item.color}} - /> - <span className="font-medium">{item.name}:</span> - <span>{item.value}</span> - </div> - ))} - </div> - ) : null} - </div> - </div> - } - className={clsx("rounded !p-0 overflow-hidden", className)} - classNames={{title: "!py-0 !px-4", header: "!p-0", body: "!p-0"}} - > - <div - ref={containerRef} - className={clsx( - "pt-4 pb-2 px-4 h-[280px] select-none", - isPanning ? "cursor-grabbing" : "cursor-grab", - )} - style={{touchAction: "pan-y", overscrollBehavior: "auto"}} - onMouseDown={handleMouseDown} - onMouseMove={handleMouseMove} - onMouseUp={endPan} - onMouseLeave={endPan} - onDoubleClick={() => { - setXDomain(["auto", "auto"]) - // Also clear any previous wheel anchor so next zoom re-anchors at cursor - wheelAnchorRef.current = null - }} - > - <div className="relative h-full"> - {hasData ? ( - <ResponsiveContainer width="100%" height="100%"> - <ComposedChart - key={(xAxisDomain || xDomain).toString()} - data={windowData as any} - margin={chartMargin} - > - <CartesianGrid strokeDasharray="3 2" stroke="#05172933" /> - <XAxis - dataKey="timestamp" - type="number" - scale="time" - domain={(xAxisDomain || (xDomain as any)) as any} - allowDataOverflow - tick={<AxisTick />} - tickMargin={20} - minTickGap={16} - height={40} - /> - <YAxis - domain={domain as any} - ticks={isBoolean ? [...BOOLEAN_AXIS_TICKS] : undefined} - tick={{fill: "#666"}} - tickMargin={8} - tickFormatter={(value) => - isBoolean - ? `${Number(value).toFixed(0)}%` - : format3Sig(value) - } - padding={{top: 8, bottom: 8}} - width={chartMargin.left} - /> - <Tooltip - content={({active, label, payload}) => { - if (suppressTooltip) return null - if (!active || !payload || !payload.length) return null - const rows = (payload as any[]).filter((row: any) => { - const key = String(row?.dataKey || "") - // Exclude helper series for highlight areas and redundant percentile lines - if (!key) return false - if (key.endsWith("__upperBase")) return false - if (key.endsWith("__lowerBase")) return false - if (key.includes("__upperSeg")) return false - if (key.includes("__lowerSeg")) return false - // Remove separate percentile lines (we show range below the main row) - if (key.endsWith("__p25")) return false - if (key.endsWith("__p75")) return false - return true - }) - return ( - <div className="bg-white border border-[#e5e7eb] rounded-lg p-3 text-xs text-[#111827] shadow-lg"> - <div className="mb-2 font-semibold text-[12px]"> - {formatTimestamp(Number(label))} - </div> - <div className="flex flex-col gap-1"> - {rows.map((row) => { - const name = row.name - const color = row.color - const dataKey = row.dataKey as string - const valueNum = Number(row.value) - const countRaw = - row.payload?.[`${dataKey}__count`] - const count = - typeof countRaw === "number" - ? Number.isInteger(countRaw) - ? countRaw - : Number(countRaw.toFixed(2)) - : countRaw - const p25 = row.payload?.[`${dataKey}__p25`] - const p75 = row.payload?.[`${dataKey}__p75`] - const formatValue = (val?: number) => { - if (val == null) return undefined - if (isBoolean) { - const normalized = - Math.abs(val) <= 1 - ? val * 100 - : val - return `${Number(normalized).toFixed(0)}%` - } - return format3Sig(val) - } - const formattedValue = formatValue(valueNum) - const formattedP25 = formatValue(p25) - const formattedP75 = formatValue(p75) - const histogram = row.payload?.[ - `${dataKey}__hist` - ] as { - from: number - to: number - count: number - }[] - const formatAxisValue = (val: number) => { - if (isBoolean) { - const normalized = - Math.abs(val) <= 1 - ? val * 100 - : val - return `${Number(normalized).toFixed(0)}%` - } - return format3Sig(val) - } - const histogramData = Array.isArray( - histogram, - ) - ? histogram - .map((bin) => { - const from = Number(bin?.from) - const to = Number(bin?.to) - const count = Number( - bin?.count, - ) - if ( - !Number.isFinite(from) || - !Number.isFinite(to) || - !Number.isFinite(count) - ) - return null - return { - label: `${formatAxisValue( - from, - )} – ${formatAxisValue(to)}`, - value: count, - } - }) - .filter( - ( - item, - ): item is { - label: string - value: number - } => item !== null, - ) - : [] - return ( - <div key={dataKey} className="py-1"> - <div className="flex items-center justify-between gap-3"> - <div className="flex items-center gap-2 min-w-0"> - <span - className="inline-block w-2.5 h-2.5 rounded-full" - style={{ - backgroundColor: - color, - }} - /> - <span className="font-medium truncate"> - {name} - </span> - {count != null ? ( - <span className="text-[#6b7280]"> - • {count} scenarios - </span> - ) : null} - </div> - <div - style={{ - fontVariantNumeric: - "tabular-nums", - }} - > - {formattedValue} - </div> - </div> - {formattedP25 || formattedP75 ? ( - <div className="pl-5 text-[#4b5563]"> - P25: {formattedP25 ?? "-"} - {formattedP75 ? ( - <span>{` / P75: ${formattedP75}`}</span> - ) : null} - </div> - ) : null} - {histogramData.length ? ( - <div className="mt-2 border-t border-[#e5e7eb] pt-2"> - <div className="w-[260px] h-[96px]"> - <HistogramChart - data={histogramData} - xKey="label" - yKey="value" - tooltipLabel="count" - yDomain={[ - 0, - "dataMax", - ]} - containerProps={{ - width: 260, - height: 96, - }} - barProps={{ - fill: color, - isAnimationActive: true, - animationBegin: 0, - animationDuration: 180, - animationEasing: - "ease-out", - }} - chartProps={{}} - xAxisProps={{ - tick: { - fontSize: 10, - }, - }} - yAxisProps={{ - tick: { - fontSize: 10, - }, - }} - /> - </div> - </div> - ) : null} - </div> - ) - })} - </div> - </div> - ) - }} - /> - {/* <Brush - dataKey="timestamp" - height={20} - travellerWidth={8} - stroke="#CBD5E1" - onChange={onBrushChange as any} - /> */} - {series.map((s) => { - const hasRange = s.points.some( - (pt) => - typeof pt.p25 === "number" && - typeof pt.p75 === "number", - ) - - return ( - <Fragment key={s.id}> - {hasRange ? ( - <> - <LowerBand id={s.id} color={s.color} /> - <UpperBand id={s.id} color={s.color} /> - <Line - type="monotone" - dataKey={`${s.id}__p25`} - name={`${s.name} P25`} - stroke={withAlpha(s.color, 0.1)} - strokeWidth={1} - dot={false} - activeDot={makeActiveDot(s.color, 3)} - strokeDasharray="2 2" - connectNulls - isAnimationActive={false} - legendType="none" - /> - <Line - type="monotone" - dataKey={`${s.id}__p75`} - name={`${s.name} P75`} - stroke={withAlpha(s.color, 0.1)} - strokeWidth={1} - dot={false} - activeDot={makeActiveDot(s.color, 3)} - strokeDasharray="2 2" - connectNulls - isAnimationActive={false} - legendType="none" - /> - </> - ) : null} - <Line - type="monotone" - dataKey={s.id} - name={s.name} - stroke={s.color} - strokeWidth={2} - dot={{r: 2}} - activeDot={makeActiveDot(s.color, 4)} - connectNulls - isAnimationActive={false} - /> - </Fragment> - ) - })} - </ComposedChart> - </ResponsiveContainer> - ) : ( - <ResponsiveContainer width="100%" height="100%"> - <LineChart - data={PLACEHOLDER_TIME_SERIES as any} - margin={{top: 16, right: 24, bottom: 24, left: 32}} - > - <CartesianGrid - stroke={PLACEHOLDER_LINE_COLOR} - strokeOpacity={0.15} - strokeDasharray="5 5" - /> - <XAxis - dataKey="timestamp" - type="number" - domain={["dataMin", "dataMax"]} - scale="time" - tickFormatter={(value) => { - const date = new Date(value) - return date.toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - }) - }} - tick={{fill: "#94A3B8", fontSize: 11}} - axisLine={{stroke: "rgba(148, 163, 184, 0.35)"}} - tickMargin={12} - /> - <YAxis - domain={[0, 50]} - tick={{fill: "#94A3B8", fontSize: 11}} - axisLine={{stroke: "rgba(148, 163, 184, 0.35)"}} - tickMargin={12} - /> - <defs> - <linearGradient - id="tsPlaceholderFill" - x1="0" - y1="0" - x2="0" - y2="1" - > - <stop - offset="0%" - stopColor={PLACEHOLDER_LINE_COLOR} - stopOpacity={0.35} - /> - <stop - offset="55%" - stopColor={PLACEHOLDER_LINE_COLOR} - stopOpacity={0.12} - /> - <stop - offset="100%" - stopColor={PLACEHOLDER_LINE_COLOR} - stopOpacity={0.01} - /> - </linearGradient> - </defs> - <Tooltip content={() => null} /> - <Area - type="monotone" - dataKey="value" - stroke="none" - fill="url(#tsPlaceholderFill)" - isAnimationActive={false} - /> - <Line - type="monotone" - dataKey="value" - stroke={PLACEHOLDER_LINE_COLOR} - strokeWidth={2} - dot={false} - isAnimationActive={false} - /> - </LineChart> - </ResponsiveContainer> - )} - {!hasData ? ( - <PlaceholderOverlay - evaluationType={evaluationType} - title={overlayTitle} - description={overlayDescription} - /> - ) : null} - </div> - </div> - {(() => { - const items = series.flatMap((s) => { - const base = [{label: s.name, color: s.color}] - const hasRange = s.points.some( - (pt) => typeof pt.p25 === "number" && typeof pt.p75 === "number", - ) - if (!hasRange) return base - return [ - ...base, - {label: `${s.name} P25`, color: withAlpha(s.color, 0.1)}, - {label: `${s.name} P75`, color: withAlpha(s.color, 0.1)}, - ] - }) - return <ChartLegend items={items} /> - })()} - </Card> - ) -} - -export default memo(EvaluatorMetricsTimeSeriesChart) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/BarChart.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/BarChart.tsx deleted file mode 100644 index 50ae382b24..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/BarChart.tsx +++ /dev/null @@ -1,286 +0,0 @@ -import {memo, useMemo} from "react" - -import { - Bar, - CartesianGrid, - Cell, - BarChart as RechartsBarChart, - ResponsiveContainer, - Tooltip, - TooltipProps, - XAxis, - YAxis, -} from "recharts" - -type ChartDatum = Record<string, string | number | boolean | undefined> - -interface BarChartProps { - data: readonly ChartDatum[] - xKey: string - yKey: string - /** optional key in data row that carries the color (e.g. 'color') */ - colorKey?: string - - /** Axis / chart tuning */ - yDomain?: [number | "auto" | "dataMin", number | "auto" | "dataMax"] - xAxisProps?: Partial<React.ComponentProps<typeof XAxis>> - yAxisProps?: Partial<React.ComponentProps<typeof YAxis>> - cartesianGridProps?: Partial<React.ComponentProps<typeof CartesianGrid>> - chartProps?: Partial<React.ComponentProps<typeof RechartsBarChart>> - containerProps?: Partial<React.ComponentProps<typeof ResponsiveContainer>> - - /** Bar sizing & spacing */ - barSize?: number // if omitted, width is auto-calculated from gaps - barGap?: number | string // e.g. 16 or '30%' - barCategoryGap?: number | string // e.g. 24 or '30%' - - /** Tooltip label for Y value. Pass falsy to hide Tooltip. */ - tooltipLabel?: string - tooltipFormatter?: (value: number, row: ChartDatum) => string - - /** Per-bar <Cell/> overrides */ - getCellProps?: (row: ChartDatum, index: number) => Partial<React.ComponentProps<typeof Cell>> - - /** Direct pass-through to <Bar/> */ - barProps?: Partial<React.ComponentProps<typeof Bar>> - - className?: string -} - -const BarChart = ({ - data, - xKey, - yKey, - colorKey, - yDomain = ["auto", "auto"], - xAxisProps, - yAxisProps, - cartesianGridProps, - chartProps, - containerProps, - // Use percentage-based gaps by default for consistent spacing across datasets - barSize, - barGap = "10%", - barCategoryGap = "30%", - tooltipLabel = "Value", - tooltipFormatter, - getCellProps, - barProps, - className, -}: BarChartProps) => { - const chartBarSize = !barSize ? undefined : barSize - const yAxisWidth = typeof yAxisProps?.width === "number" ? yAxisProps.width : 58 - const { - interval: xAxisInterval, - height: xAxisHeight, - tickWidth: xAxisTickWidthProp, - ...restXAxisProps - } = xAxisProps ?? {} - - const labelBasedTickWidth = useMemo(() => { - const longestLabelLength = data.reduce((max, row) => { - const rawLabel = row?.[xKey] - - if (typeof rawLabel === "string" || typeof rawLabel === "number") { - return Math.max(max, String(rawLabel).length) - } - - return max - }, 0) - - // Invert the relationship: longer labels get smaller width, shorter labels get more width - const maxPossibleWidth = 100 - const minPossibleWidth = 60 - const baseWidth = Math.max(1, longestLabelLength) // Ensure we don't divide by zero - const invertedWidth = (1 / baseWidth) * 1000 // Scale factor to get reasonable numbers - - return Math.min(maxPossibleWidth, Math.max(minPossibleWidth, invertedWidth)) - }, [data, xKey]) - - const xAxisTickWidth = xAxisTickWidthProp ?? labelBasedTickWidth - - return ( - <ResponsiveContainer - width="100%" - height="100%" - className="recharts-chart-container" - {...containerProps} - > - <RechartsBarChart - data={data as any} - barSize={chartBarSize} - barGap={barGap} - barCategoryGap={barCategoryGap} - {...chartProps} - > - <XAxis - dataKey={xKey} - tickLine={false} - allowDataOverflow={false} - interval={xAxisInterval ?? 0} - tick={({x, y, payload}) => ( - <foreignObject - x={x - xAxisTickWidth / 2} - y={y - 2} // Center vertically - width={xAxisTickWidth} - height={20} // Sufficient height for one line - > - <div - style={{ - width: "100%", - whiteSpace: "nowrap", - overflow: "hidden", - textOverflow: "ellipsis", - fontSize: "10px", - color: "#666", - }} - > - {payload?.value} - </div> - </foreignObject> - )} - height={xAxisHeight ?? 24} - {...restXAxisProps} - /> - <YAxis - domain={yDomain as any} - tickLine={{stroke: "#05172933"}} - tick={{fill: "#666"}} - tickMargin={8} - width={yAxisWidth} - {...yAxisProps} - /> - <CartesianGrid - strokeDasharray="3 2" - horizontal - vertical={false} - stroke="#05172933" - {...cartesianGridProps} - /> - - {tooltipLabel ? ( - <Tooltip - cursor={false} - content={({active, payload, label}: TooltipProps<number, string>) => { - if (!active || !payload?.length) return null - - const rows = payload.filter((p) => p?.value != null) - if (!rows.length) return null - - return ( - <div - style={{ - backgroundColor: "#FFFFFF", - border: "1px solid #E2E8F0", - borderRadius: 6, - boxShadow: "0 4px 12px rgba(15, 23, 42, 0.08)", - padding: "8px 12px", - minWidth: 160, - }} - > - {/* <div - style={{ - // fontWeight: 600, - color: "#0F172A", - marginBottom: 6, - }} - > - {label} - </div> */} - {rows.map((entry, idx) => { - const rawRow = entry?.payload as ChartDatum - const barColor = - (colorKey && typeof rawRow?.[colorKey] === "string" - ? (rawRow[colorKey] as string) - : undefined) || - entry?.color || - "#3B82F6" - const entryLabel = (() => { - const rawLabel = rawRow?.[xKey] - if ( - typeof rawLabel === "string" || - typeof rawLabel === "number" - ) - return String(rawLabel) - - return entry?.name || tooltipLabel - })() - const formattedValue = - typeof entry?.value === "number" - ? (tooltipFormatter?.(entry.value, rawRow) ?? - String(entry.value)) - : String(entry?.value ?? "") - return ( - <div - key={idx} - style={{ - display: "flex", - alignItems: "center", - justifyContent: "space-between", - gap: 12, - marginBottom: idx === rows.length - 1 ? 0 : 6, - fontSize: 12, - color: "#475569", - }} - > - <div - style={{ - display: "flex", - alignItems: "center", - gap: 8, - }} - > - <span - style={{ - width: 8, - height: 8, - borderRadius: "9999px", - backgroundColor: barColor, - }} - /> - <span style={{color: "#0F172A"}}> - {entryLabel} - </span> - </div> - <span style={{fontWeight: 600, color: "#0F172A"}}> - {formattedValue} - </span> - </div> - ) - })} - </div> - ) - }} - /> - ) : null} - - <Bar - dataKey={yKey} - name={tooltipLabel ?? "Value"} - fill="#3B82F6" - radius={[4, 4, 0, 0]} - barSize={chartBarSize} - maxBarSize={100} - fillOpacity={barProps?.fillOpacity ?? 0.6} - {...barProps} - > - {data.map((row, i) => { - const fill = - colorKey && typeof row[colorKey] === "string" - ? (row[colorKey] as string) - : undefined - return ( - <Cell - key={`cell-${i}`} - fill={fill} - {...(getCellProps?.(row, i) ?? {})} - /> - ) - })} - </Bar> - </RechartsBarChart> - </ResponsiveContainer> - ) -} - -export default memo(BarChart) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/EvaluatorMetricsChartSkeleton.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/EvaluatorMetricsChartSkeleton.tsx deleted file mode 100644 index 833b8e674e..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/EvaluatorMetricsChartSkeleton.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import {memo} from "react" - -import {Skeleton} from "antd" -import clsx from "clsx" - -const EvaluatorMetricsChartSkeleton = ({className}: {className?: string}) => { - return ( - <div className={clsx("w-full border border-solid border-[#0517290F] rounded", className)}> - <div className="flex items-center justify-between h-[60px] px-3 py-2 gap-1 border-0 border-b border-solid border-[#EAEFF5]"> - <Skeleton.Input active className="!w-[140px] !h-[20px]" /> - <Skeleton.Input active className="!w-[180px] !h-[24px]" /> - </div> - <div className="p-2 w-full h-[calc(100%-60px)]"> - <Skeleton.Node active className="!w-full !h-[300px]" /> - </div> - </div> - ) -} - -export default memo(EvaluatorMetricsChartSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/HistogramChart.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/HistogramChart.tsx deleted file mode 100644 index e8046c92da..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/HistogramChart.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import {memo} from "react" - -import { - BarChart as RechartsBarChart, - Bar, - XAxis, - YAxis, - ResponsiveContainer, - Tooltip, - CartesianGrid, - Cell, -} from "recharts" - -type ChartDatum = Record<string, string | number | boolean | undefined> - -interface HistogramChartProps { - data: readonly ChartDatum[] - xKey: string - yKey: string - /** optional key in data row that carries the color (e.g. 'color') */ - colorKey?: string - - /** Axis / chart tuning */ - yDomain?: [number | "auto" | "dataMin", number | "auto" | "dataMax"] - xAxisProps?: Partial<React.ComponentProps<typeof XAxis>> - yAxisProps?: Partial<React.ComponentProps<typeof YAxis>> - cartesianGridProps?: Partial<React.ComponentProps<typeof CartesianGrid>> - chartProps?: Partial<React.ComponentProps<typeof RechartsBarChart>> - containerProps?: Partial<React.ComponentProps<typeof ResponsiveContainer>> - - /** Bar sizing & spacing */ - barSize?: number // if omitted, width is auto-calculated from gaps - barGap?: number | string // e.g. 16 or '30%' - barCategoryGap?: number | string // e.g. 24 or '30%' - - /** Tooltip label for Y value. Pass falsy to hide Tooltip. */ - tooltipLabel?: string - - /** Per-bar <Cell/> overrides */ - getCellProps?: (row: ChartDatum, index: number) => Partial<React.ComponentProps<typeof Cell>> - - /** Direct pass-through to <Bar/> */ - barProps?: Partial<React.ComponentProps<typeof Bar>> - - className?: string -} - -const HistogramChart = ({ - data, - xKey, - yKey, - colorKey, - yDomain = ["auto", "auto"], - xAxisProps, - yAxisProps, - cartesianGridProps, - chartProps, - containerProps, - // Use percentage-based gaps by default for consistent spacing across datasets - barSize, - barGap = "10%", - barCategoryGap = "30%", - tooltipLabel = "Value", - getCellProps, - barProps, - className, -}: HistogramChartProps) => { - const chartBarSize = !barSize ? undefined : barSize - const yAxisWidth = typeof yAxisProps?.width === "number" ? yAxisProps.width : 48 - - return ( - <ResponsiveContainer - width="100%" - height="100%" - className="recharts-chart-container" - {...containerProps} - > - <RechartsBarChart - data={data as any} - barSize={chartBarSize} - barGap={barGap} - barCategoryGap={barCategoryGap} - {...chartProps} - > - <XAxis - dataKey={xKey} - tickLine={false} - tick={{fill: "#666"}} - height={20} - {...xAxisProps} - /> - <YAxis - domain={yDomain as any} - tickLine={{stroke: "#05172933"}} - tick={{fill: "#666"}} - tickMargin={8} - width={yAxisWidth} - {...yAxisProps} - /> - <CartesianGrid - strokeDasharray="3 2" - horizontal - vertical={false} - stroke="#05172933" - {...cartesianGridProps} - /> - - {tooltipLabel ? ( - <Tooltip - formatter={(v: any) => [v as number, tooltipLabel]} - cursor={false} - contentStyle={{ - backgroundColor: "white", - border: "1px solid #d9d9d9", - borderRadius: "4px", - padding: "4px 8px", - }} - /> - ) : null} - - <Bar - dataKey={yKey} - name={tooltipLabel ?? "Value"} - fill="#3B82F6" - radius={[4, 4, 0, 0]} - barSize={chartBarSize} - maxBarSize={100} - {...barProps} - > - {data.map((row, i) => { - const fill = - colorKey && typeof row[colorKey] === "string" - ? (row[colorKey] as string) - : undefined - return ( - <Cell - key={`cell-${i}`} - fill={fill} - {...(getCellProps?.(row, i) ?? {})} - /> - ) - })} - </Bar> - </RechartsBarChart> - </ResponsiveContainer> - ) -} - -export default memo(HistogramChart) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/LowerBand.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/LowerBand.tsx deleted file mode 100644 index 29b039c640..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/LowerBand.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import {memo} from "react" - -import {Area} from "recharts" - -function LowerBand({id, color}: {id: string; color: string}) { - // Generate gradient strips - more strips = smoother gradient - const numStrips = 30 - const gradientFalloff = 1.8 // Controls how quickly the gradient fades - const maxOpacity = 0.5 // Maximum opacity at the main line - - // Parse color if it's in hex format, otherwise use rgba - const getColorWithOpacity = (opacity: number) => { - // If color is already rgba, extract RGB values - // Otherwise assume it's hex and convert - if (color.startsWith("rgba")) { - const match = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/) - if (match) { - return `rgba(${match[1]}, ${match[2]}, ${match[3]}, ${opacity})` - } - } - // For hex colors like "#f44336" - const hex = color.replace("#", "") - const r = parseInt(hex.substring(0, 2), 16) - const g = parseInt(hex.substring(2, 4), 16) - const b = parseInt(hex.substring(4, 6), 16) - return `rgba(${r}, ${g}, ${b}, ${opacity})` - } - - return ( - <> - {/* Baseline at lower boundary */} - <Area - type="monotone" - dataKey={`${id}__lowerBase`} - stackId={`${id}__lower`} - stroke="none" - fill="transparent" - dot={false} - activeDot={false} - connectNulls - isAnimationActive={false} - legendType="none" - /> - - {/* Generate gradient strips from boundary to main line */} - {Array.from({length: numStrips}).map((_, i) => { - // Calculate opacity: starts transparent at boundary (i=0), - // increases toward main line (i=numStrips-1) - const ratio = i / (numStrips - 1) - const opacity = Math.pow(ratio, gradientFalloff) * maxOpacity - - return ( - <Area - key={`${id}__lowerSeg${i}`} - type="monotone" - dataKey={`${id}__lowerSeg${i}`} - stackId={`${id}__lower`} - stroke="none" - fill={getColorWithOpacity(opacity)} - connectNulls - isAnimationActive={false} - legendType="none" - /> - ) - })} - </> - ) -} - -export default memo(LowerBand) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/UpperBand.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/UpperBand.tsx deleted file mode 100644 index 0ccf00e510..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/UpperBand.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import {memo} from "react" - -import {Area} from "recharts" - -function UpperBand({id, color}: {id: string; color: string}) { - // Generate gradient strips - more strips = smoother gradient - const numStrips = 30 - const gradientFalloff = 1.8 // Controls how quickly the gradient fades - const maxOpacity = 0.5 // Maximum opacity at the main line - - // Parse color if it's in hex format, otherwise use rgba - const getColorWithOpacity = (opacity: number) => { - // If color is already rgba, extract RGB values - // Otherwise assume it's hex and convert - if (color.startsWith("rgba")) { - const match = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/) - if (match) { - return `rgba(${match[1]}, ${match[2]}, ${match[3]}, ${opacity})` - } - } - // For hex colors like "#2196f3" - const hex = color.replace("#", "") - const r = parseInt(hex.substring(0, 2), 16) - const g = parseInt(hex.substring(2, 4), 16) - const b = parseInt(hex.substring(4, 6), 16) - return `rgba(${r}, ${g}, ${b}, ${opacity})` - } - - return ( - <> - {/* Baseline at main line */} - <Area - type="monotone" - dataKey={`${id}__upperBase`} - stackId={`${id}__upper`} - stroke="none" - fill="transparent" - dot={false} - activeDot={false} - connectNulls - isAnimationActive={false} - legendType="none" - /> - - {/* Generate gradient strips from main line to boundary */} - {Array.from({length: numStrips}).map((_, i) => { - // Calculate opacity: starts strong at main line (i=0), - // fades toward boundary (i=numStrips-1) - const ratio = i / (numStrips - 1) - const opacity = Math.pow(1 - ratio, gradientFalloff) * maxOpacity - - return ( - <Area - key={`${id}__upperSeg${i}`} - type="monotone" - dataKey={`${id}__upperSeg${i}`} - stackId={`${id}__upper`} - stroke="none" - fill={getColorWithOpacity(opacity)} - connectNulls - isAnimationActive={false} - legendType="none" - /> - ) - })} - </> - ) -} - -export default memo(UpperBand) diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/helpers.ts b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/helpers.ts deleted file mode 100644 index 3622fbe691..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/assets/helpers.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const withAlpha = (color: string, alpha: number) => { - if (color.startsWith("#")) { - const hex = color.slice(1) - const normalized = - hex.length === 3 - ? hex - .split("") - .map((ch) => ch + ch) - .join("") - : hex - const int = Number.parseInt(normalized, 16) - if (!Number.isNaN(int)) { - const r = (int >> 16) & 255 - const g = (int >> 8) & 255 - const b = int & 255 - return `rgba(${r}, ${g}, ${b}, ${alpha})` - } - } - return color -} - -export const format3Sig = (n: number) => { - if (!Number.isFinite(n)) return String(n) - const abs = Math.abs(n) - if (abs !== 0 && (abs < 0.001 || abs >= 1000)) return n.toExponential(2) - const s = n.toPrecision(3) - return String(Number(s)) -} - -export const formatTimestamp = (value: number) => { - if (!Number.isFinite(value)) return "" - const date = new Date(value) - if (Number.isNaN(date.getTime())) return "" - return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` -} diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/index.tsx deleted file mode 100644 index a78b3d9d54..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/EvaluatorMetricsChart/index.tsx +++ /dev/null @@ -1,336 +0,0 @@ -import {useCallback, useMemo, useState, type ReactNode} from "react" - -import {Card, Radio, Typography} from "antd" -import clsx from "clsx" - -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" - -import {EVAL_BG_COLOR} from "../../assets/utils" -import BarChartPlaceholder from "../shared/BarChartPlaceholder" -import PlaceholderOverlay, {PlaceholderEvaluationType} from "../shared/PlaceholderOverlay" - -import BarChart from "./assets/BarChart" -import HistogramChart from "./assets/HistogramChart" - -/* ---------------- helpers ---------------- */ - -const format3Sig = (n: number) => { - if (!Number.isFinite(n)) return String(n) - const abs = Math.abs(n) - if (abs !== 0 && (abs < 0.001 || abs >= 1000)) return n.toExponential(2) - const s = n.toPrecision(3) - return String(Number(s)) -} - -interface BooleanMetric { - rank: {value: boolean; count: number}[] - count: number - unique: boolean[] - frequency: {value: boolean; count: number}[] -} - -/** Boolean metric → two-bars histogram */ -export function toBooleanHistogramRows( - metric: BooleanMetric, - opts?: {trueLabel?: string; falseLabel?: string; trueColor?: string; falseColor?: string}, -) { - const source = metric.frequency?.length ? metric.frequency : metric.rank - const map = new Map<boolean, number>(source.map((f) => [f.value, f.count])) - const t = map.get(true) ?? 0 - const f = map.get(false) ?? 0 - return [ - {x: opts?.trueLabel ?? "true", y: t, color: opts?.trueColor ?? "#22c55e"}, - {x: opts?.falseLabel ?? "false", y: f, color: opts?.falseColor ?? "#ef4444"}, - ] as const -} - -interface EvaluatorMetric { - count: number - sum: number - mean: number - min: number - max: number - range: number - distribution: {value: number; count: number}[] - percentiles: Record<string, number> - iqrs: Record<string, number> - binSize: number -} - -/** - * Numeric metric → XY rows from distribution, ignoring binSize. - * X is just the formatted starting value; Y is count. - * This gives a categorical X axis that still preserves the shape. - */ -export function toXYRowsFromDistributionNoBin( - metric: EvaluatorMetric, - opts?: {color?: string; digits?: number}, -) { - const rows = [...(metric.distribution ?? [])] - .sort((a, b) => a.value - b.value) - .map((d) => ({ - x: format3Sig(opts?.digits != null ? Number(d.value.toFixed(opts.digits)) : d.value), - y: d.count, - color: opts?.color ?? "rgba(145, 202, 255, 0.7)", - })) - - return rows -} - -/** Fallback: if no distribution is present, plot a single bar at the mean (x label = value) */ -export function toSingleMeanRow(metric: EvaluatorMetric, opts?: {color?: string; digits?: number}) { - const y = typeof metric.mean === "number" ? metric.mean : 0 - const x = format3Sig(opts?.digits != null ? Number(y.toFixed(opts.digits)) : y) - return [{x, y, color: opts?.color ?? "rgba(145, 202, 255, 0.7)"}] as const -} - -const items = ["average", "histogram", "total"] - -/* ---------------- page component ---------------- */ - -const EvaluatorMetricsChart = ({ - className, - name, - metricKey, - metric, - evaluator, - isCompare, - averageRows, - summaryRows, - evaluationType = "auto", - hasMetricData = false, - placeholderTitle, - placeholderDescription, -}: { - className?: string - name: string - metricKey?: string - metric: Record<string, any> - evaluator?: EvaluatorDto - isCompare?: boolean - averageRows?: readonly {x: string; y: number; color?: string}[] - summaryRows?: readonly {x: string; y: number; color?: string}[] - evaluationType?: PlaceholderEvaluationType - hasMetricData?: boolean - placeholderTitle?: ReactNode - placeholderDescription?: ReactNode -}) => { - const [selectedItem, setSelectedItem] = useState(items[0]) - const isBooleanMetric = !!metric?.unique?.length - const hasDistribution = Array.isArray(metric?.distribution) && metric.distribution.length > 0 - const isNumeric = typeof metric?.mean === "number" || hasDistribution - - // Big summary number - const chartSummeryValue = useMemo(() => { - if (isBooleanMetric) { - const trueEntry = metric?.frequency?.find((f: any) => f?.value === true) - const total = metric?.count ?? 0 - const pct = total ? ((trueEntry?.count ?? 0) / total) * 100 : 0 - return `${pct.toFixed(2)}%` - } - if (typeof metric?.mean === "number") return format3Sig(metric.mean) - return "" - }, [metric, isBooleanMetric]) - - // Summary for compare mode: one value per evaluation with +/- delta vs base - const compareSummaries = useMemo(() => { - // Use only evaluations that actually have this evaluator's metric (averageRows already filtered) - if (!isCompare || !averageRows?.length) - return [] as {value: string; delta?: string; color: string}[] - - const base = averageRows?.[0]?.y ?? 0 - const isPct = isBooleanMetric - return averageRows.map((r, i) => { - const color = (r as any)?.color || (EVAL_BG_COLOR as any)[i + 1] || "#3B82F6" - const valNum = Number(r.y || 0) - const value = isPct ? `${valNum.toFixed(2)}%` : format3Sig(valNum) - if (i === 0) return {value, delta: "-", color} - // percent difference vs base (avoid divide by zero) - const deltaPct = base ? ((valNum - base) / Math.abs(base)) * 100 : 0 - const sign = deltaPct > 0 ? "+" : "" - const delta = `${sign}${deltaPct.toFixed(0)}%` - return {value, delta, color} - }) - }, [isCompare, averageRows, isBooleanMetric]) - - // Shape data: - // - Boolean: two bars true/false - // - Numeric: distribution → (x = formatted start value, y = count) - // - Fallback numeric: single bar at mean (x = value, y = mean) - const chartData = useMemo(() => { - if (isBooleanMetric) { - return toBooleanHistogramRows(metric as BooleanMetric, { - trueLabel: "true", - falseLabel: "false", - trueColor: "rgba(145, 202, 255, 0.7)", - falseColor: "rgba(145, 202, 255, 0.7)", - }) - } - if (hasDistribution) { - return toXYRowsFromDistributionNoBin(metric as EvaluatorMetric, { - color: "rgba(145, 202, 255, 0.7)", - digits: 3, - }) - } - if (isNumeric) { - return toSingleMeanRow(metric as EvaluatorMetric, { - color: "rgba(145, 202, 255, 0.7)", - digits: 3, - }) - } - return [] - }, [metric, isBooleanMetric, hasDistribution, isNumeric]) - - const showHistogram = !isCompare || selectedItem === "histogram" - - const formatYAxisTick = useCallback( - (value: number) => { - if (typeof value !== "number" || Number.isNaN(value)) return "" - - const formatToThreeDecimals = (num: number) => { - if (num === 0) return "0" - const abs = Math.abs(num) - if (abs < 0.001) return num.toExponential(2) - return Number(num.toFixed(3)).toString() - } - - if (isBooleanMetric) { - return `${formatToThreeDecimals(value)}%` - } - - return formatToThreeDecimals(value) - }, - [isBooleanMetric], - ) - - const hasSummaryRows = summaryRows?.some((row) => Number.isFinite(row.y)) ?? false - const showPlaceholder = chartData.length === 0 && !hasSummaryRows && !hasMetricData - const evaluatorLabel = evaluator?.name || evaluator?.slug || "this evaluator" - const defaultPlaceholderTitle = - evaluationType === "online" ? "Waiting for your traces" : "Waiting for evaluation runs" - const defaultPlaceholderDescription = - evaluationType === "online" - ? `Generate traces with ${evaluatorLabel} to start collecting results.` - : `Annotate your scenarios with ${evaluatorLabel} to start seeing distribution data.` - const overlayTitle = placeholderTitle ?? defaultPlaceholderTitle - const overlayDescription = placeholderDescription ?? defaultPlaceholderDescription - - return ( - <Card - title={ - <div className="flex justify-between items-center w-full h-[64px] p-0"> - <div className="flex flex-col gap-1"> - <Typography.Text className="font-medium text-sm capitalize"> - {evaluatorLabel} - </Typography.Text> - <Typography.Text className="capitalize font-normal" type="secondary"> - {name} - </Typography.Text> - </div> - </div> - } - className={clsx("rounded !p-0 overflow-hidden", className)} - classNames={{title: "!py-0 !px-4", header: "!p-0", body: "!p-0"}} - > - {showPlaceholder ? ( - <div className="relative min-h-[260px] overflow-hidden rounded bg-[#F8FAFC]"> - <BarChartPlaceholder className="opacity-60" /> - <PlaceholderOverlay - evaluationType={evaluationType} - title={overlayTitle} - description={overlayDescription} - className="px-8" - /> - </div> - ) : ( - <div className="flex flex-col justify-center items-center"> - {isCompare ? ( - <div className="border-0 border-b border-solid border-[#EAEFF5] w-full flex items-center justify-evenly h-[80px] px-4"> - {compareSummaries.map((s, idx) => ( - <div - key={idx} - className="flex flex-col items-center justify-center" - > - <Typography.Text - style={{color: s.color}} - className="text-xl font-medium" - > - {s.value} - </Typography.Text> - <Typography.Text - className={ - idx === 0 - ? "text-[#758391]" - : s.delta?.startsWith("+") - ? "text-green-600" - : s.delta?.startsWith("-") - ? "text-red-500" - : "text-[#758391]" - } - > - {s.delta} - </Typography.Text> - </div> - ))} - </div> - ) : ( - <div className="border-0 border-b border-solid border-[#EAEFF5] w-full flex items-center justify-center h-[65px]"> - <Typography.Text className="text-xl font-medium text-[#4096FF]"> - {chartSummeryValue} - </Typography.Text> - </div> - )} - - <div className="w-full h-full flex flex-col p-4"> - <div className="w-full flex items-center h-full gap-2 px-4"> - <Typography.Text - className="font-normal -rotate-90 w-[20px] text-nowrap" - type="secondary" - > - {showHistogram ? "Frequency" : "Avg score"} - </Typography.Text> - <div className="flex-1 h-[400px]"> - {showHistogram ? ( - <HistogramChart - data={chartData as any} - xKey="x" - yKey="y" - colorKey="color" - tooltipLabel={name} - yDomain={[0, 1]} - barGap={0} - barCategoryGap={chartData.length < 4 ? "30%" : "10%"} - barProps={{radius: [8, 8, 0, 0]}} - /> - ) : ( - <BarChart - data={(averageRows as any) || []} - xKey="x" - yKey="y" - colorKey="color" - tooltipLabel={name} - yDomain={[0, "dataMax"]} - tooltipFormatter={(value) => formatYAxisTick(value)} - yAxisProps={{tickFormatter: formatYAxisTick}} - barCategoryGap={ - (averageRows?.length ?? 0) < 4 ? "30%" : "10%" - } - barProps={{radius: [8, 8, 0, 0]}} - /> - )} - </div> - </div> - <Typography.Text - className="capitalize font-normal text-center mx-auto" - type="secondary" - > - {name} - </Typography.Text> - </div> - </div> - )} - </Card> - ) -} - -export default EvaluatorMetricsChart diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/BarChartPlaceholder.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/BarChartPlaceholder.tsx deleted file mode 100644 index 84d548358c..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/BarChartPlaceholder.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import {memo} from "react" - -import clsx from "clsx" -import {Bar, BarChart, CartesianGrid, ResponsiveContainer, XAxis, YAxis} from "recharts" - -const PLACEHOLDER_DATA = [ - {label: "A", value: 12}, - {label: "B", value: 28}, - {label: "C", value: 20}, - {label: "D", value: 36}, -] as const - -const BarChartPlaceholder = memo(({className}: {className?: string}) => ( - <div className={clsx("pointer-events-none absolute inset-0", className)}> - <ResponsiveContainer width="100%" height="100%"> - <BarChart - data={PLACEHOLDER_DATA as any} - margin={{top: 24, right: 24, left: 24, bottom: 16}} - > - <CartesianGrid stroke="#EAEFF5" strokeDasharray="4 4" /> - <XAxis dataKey="label" tick={false} axisLine={false} /> - <YAxis tick={false} axisLine={false} /> - <Bar dataKey="value" fill="rgba(102, 156, 250, 0.35)" radius={[6, 6, 0, 0]} /> - </BarChart> - </ResponsiveContainer> - </div> -)) - -BarChartPlaceholder.displayName = "BarChartPlaceholder" - -export default BarChartPlaceholder diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/PlaceholderOverlay.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/PlaceholderOverlay.tsx deleted file mode 100644 index a995dc755f..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/PlaceholderOverlay.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import {ReactNode} from "react" - -import clsx from "clsx" - -export type PlaceholderEvaluationType = "online" | "auto" | "human" - -interface PlaceholderOverlayProps { - className?: string - evaluationType?: PlaceholderEvaluationType - title?: ReactNode - description?: ReactNode - children?: ReactNode -} - -const DEFAULT_COPY: Record<PlaceholderEvaluationType, {title: string; description: string}> = { - online: { - title: "Waiting for your traces", - description: "Generate traces to start collecting results.", - }, - auto: { - title: "Waiting for evaluation runs", - description: "Run your prompt against testcases to start collecting metrics.", - }, - human: { - title: "Waiting for evaluation runs", - description: "Run your prompt against testcases to start collecting metrics.", - }, -} - -const PlaceholderOverlay = ({ - className, - evaluationType = "online", - title, - description, - children, -}: PlaceholderOverlayProps) => { - const copy = DEFAULT_COPY[evaluationType] ?? DEFAULT_COPY.online - const resolvedTitle = title ?? copy.title - const resolvedDescription = description ?? copy.description - - return ( - <div - className={clsx( - "pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2 rounded bg-white/30 px-6 text-center text-[#1D2939] backdrop-blur-sm", - className, - )} - > - {children ?? ( - <> - <span className="text-sm font-medium">{resolvedTitle}</span> - <span className="text-xs text-[#667085]">{resolvedDescription}</span> - </> - )} - </div> - ) -} - -export default PlaceholderOverlay diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/SpiderChartPlaceholder.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/SpiderChartPlaceholder.tsx deleted file mode 100644 index dface270b4..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/components/shared/SpiderChartPlaceholder.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import {memo} from "react" - -import { - PolarAngleAxis, - PolarGrid, - PolarRadiusAxis, - Radar, - RadarChart, - ResponsiveContainer, -} from "recharts" - -const SPIDER_PLACEHOLDER_POINTS: readonly {subject: string; value: number}[] = [ - {subject: "Evaluator quality", value: 58}, - {subject: "Latency", value: 36}, - {subject: "Tokens", value: 64}, - {subject: "Cost", value: 48}, - {subject: "Stability", value: 72}, -] as const - -const SpiderChartPlaceholder = memo(({className}: {className?: string}) => ( - <div className={className}> - <ResponsiveContainer width="100%" height="100%"> - <RadarChart cx="50%" cy="50%" outerRadius="70%" data={SPIDER_PLACEHOLDER_POINTS}> - <PolarGrid stroke="#EAEFF5" /> - <PolarAngleAxis dataKey="subject" tick={false} /> - <PolarRadiusAxis domain={[0, 100]} axisLine={false} tick={false} /> - <Radar - dataKey="value" - stroke="#9EB8FF" - fill="#3B82F6" - fillOpacity={0.15} - isAnimationActive={false} - /> - </RadarChart> - </ResponsiveContainer> - </div> -)) - -SpiderChartPlaceholder.displayName = "SpiderChartPlaceholder" - -export default SpiderChartPlaceholder diff --git a/web/oss/src/components/EvalRunDetails/AutoEvalRun/index.tsx b/web/oss/src/components/EvalRunDetails/AutoEvalRun/index.tsx deleted file mode 100644 index 3a42100598..0000000000 --- a/web/oss/src/components/EvalRunDetails/AutoEvalRun/index.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" -import dynamic from "next/dynamic" - -import {runViewTypeAtom} from "../state/urlState" - -import AutoEvalRunSkeleton from "./assets/AutoEvalRunSkeleton" -import {AutoEvalRunDetailsProps} from "./assets/types" -import EvalRunHeader from "./components/EvalRunHeader" - -const EvalRunOverviewViewer = dynamic(() => import("../components/EvalRunOverviewViewer"), { - ssr: false, -}) -const EvalRunPromptConfigViewer = dynamic(() => import("./components/EvalRunPromptConfigViewer"), { - ssr: false, -}) -const EvalRunTestcaseViewer = dynamic(() => import("./components/EvalRunTestcaseViewer"), { - ssr: false, -}) - -const viewTypeAtom = selectAtom(runViewTypeAtom, (v) => v, deepEqual) -const AutoEvalRunDetails = ({name, description, id, isLoading}: AutoEvalRunDetailsProps) => { - const viewType = useAtomValue(viewTypeAtom) - - if (isLoading) { - return <AutoEvalRunSkeleton /> - } - - return ( - <section - className={clsx([ - "flex flex-col w-full !h-[calc(100vh-84px)] gap-2 overflow-auto", - {"!overflow-hidden": viewType === "testcases"}, - ])} - > - <EvalRunHeader name={name} id={id} /> - - {viewType === "overview" ? ( - <EvalRunOverviewViewer type="auto" /> - ) : viewType === "testcases" ? ( - <EvalRunTestcaseViewer /> - ) : viewType === "prompt" ? ( - <EvalRunPromptConfigViewer /> - ) : null} - </section> - ) -} - -export default AutoEvalRunDetails diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/annotationUtils.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/annotationUtils.ts deleted file mode 100644 index cacaffc627..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/annotationUtils.ts +++ /dev/null @@ -1,383 +0,0 @@ -import axios from "@/oss/lib/api/assets/axiosConfig" -import {getAgentaApiUrl} from "@/oss/lib/helpers/api" -import {uuidToSpanId, uuidToTraceId} from "@/oss/lib/hooks/useAnnotations/assets/helpers" -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import { - evaluationEvaluatorsFamily, - evaluationRunStateFamily, - evalAtomStore, - scenarioStepFamily, - revalidateScenarioForRun, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {triggerMetricsFetch} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {IAnnotationStep, IStepResponse} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" -import {EvaluationStatus} from "@/oss/lib/Types" -import {getJWT} from "@/oss/services/api" -import {updateScenarioStatusRemote} from "@/oss/services/evaluations/workerUtils" -import {createScenarioMetrics} from "@/oss/services/runMetrics/api" -import {getProjectValues} from "@/oss/state/project" - -import {setOptimisticStepData} from "./optimisticUtils" -import {collectStepsAndMetrics} from "./stepsMetricsUtils" -/** - * Retrieve the scenario object (if present) for the given id. - * Updated for multi-run support with runId parameter. - */ -export const getScenario = (scenarioId: string, runId: string) => { - // Use run-scoped atoms for multi-run support - return ( - evalAtomStore() - .get(evaluationRunStateFamily(runId)) - ?.scenarios?.find((s: any) => s.id === scenarioId) || null - ) -} - -/** - * Retrieve the evaluators associated with the current evaluation run. - * Updated for multi-run support with runId parameter. - */ -export const getEvaluators = (runId: string) => { - return evalAtomStore().get(evaluationEvaluatorsFamily(runId)) -} - -/** - * Lazily load step data for a scenario via the jotai family. - * Updated for multi-run support with runId parameter. - */ -export const getStepData = async (scenarioId: string, runId?: string) => { - if (runId) { - // Use run-scoped atoms for multi-run support - return await evalAtomStore().get(scenarioStepFamily({scenarioId, runId})) - } -} - -/** - * Utility that checks the `requiredMetrics` object returned by payload generation. - * If any metric is missing it will call the provided formatter and returns `false`. Otherwise returns `true`. - */ -export const validateRequiredMetrics = ( - requiredMetrics: Record<string, unknown>, - formatErrorMessages: (requiredMetrics: Record<string, any>) => void, -): boolean => { - const hasMissing = Object.keys(requiredMetrics || {}).length > 0 - if (hasMissing) { - formatErrorMessages(requiredMetrics) - } - return !hasMissing -} - -// ---------------------------------- -// Backend synchronisation utilities -// ---------------------------------- - -interface PushStepsAndMetricsParams { - patchStepsFull: any[] - stepsToCreate?: any[] - metricEntries: {scenarioId: string; data: Record<string, number>}[] - projectId: string - runId: string -} - -export const pushStepsAndMetrics = async ({ - patchStepsFull, - stepsToCreate = [], - metricEntries, - projectId, - runId, -}: PushStepsAndMetricsParams) => { - // Normalize payloads to results schema - const normalizePatch = (items: any[]) => - items.map((it) => { - const out: Record<string, any> = { - id: it.id, - status: it.status, - trace_id: it.trace_id ?? it.traceId, - span_id: it.span_id ?? it.spanId, - references: it.references, - } - const stepKey = it.step_key ?? it.stepKey - if (stepKey) out.step_key = stepKey - return out - }) - - const normalizeCreate = (items: any[]) => - items.map((it) => { - const out: Record<string, any> = { - status: it.status, - step_key: it.step_key ?? it.stepKey ?? it.key, - trace_id: it.trace_id ?? it.traceId, - span_id: it.span_id ?? it.spanId, - scenario_id: it.scenario_id ?? it.scenarioId, - run_id: it.run_id ?? it.runId, - references: it.references, - } - const testcaseId = it.testcase_id ?? it.testcaseId - if (testcaseId) out.testcase_id = testcaseId - return out - }) - - if (patchStepsFull.length) { - await axios.patch(`/preview/evaluations/results/?project_id=${projectId}`, { - results: normalizePatch(patchStepsFull), - }) - } - if (stepsToCreate.length) { - await axios.post(`/preview/evaluations/results/?project_id=${projectId}`, { - results: normalizeCreate(stepsToCreate), - }) - } - if (metricEntries.length) { - const jwt = await getJWT() - if (jwt) { - await createScenarioMetrics(getAgentaApiUrl(), jwt, runId, metricEntries, projectId) - } - } -} - -/** - * Triggers revalidation for a single scenario and cleans up optimistic overrides once fresh data arrives. - */ -/** - * Partitions Promise.allSettled results into successful responses and builds evaluator status map - */ -export const partitionAnnotationResults = ( - annotationResults: PromiseSettledResult<any>[], - payload: any[], -): {annotationResponses: any[]; evaluatorStatuses: Record<string, string>} => { - const fulfilled = annotationResults.filter( - (r): r is PromiseFulfilledResult<any> => r.status === "fulfilled", - ) - const annotationResponses = fulfilled.map((f) => f.value) - const evaluatorStatuses: Record<string, string> = {} - annotationResults.forEach((result, idx) => { - const slug = payload[idx]?.annotation?.references?.evaluator?.slug - if (!slug) return - evaluatorStatuses[slug] = - result.status === "fulfilled" ? EvaluationStatus.SUCCESS : EvaluationStatus.FAILURE - }) - return {annotationResponses, evaluatorStatuses} -} - -/** - * Returns true if metrics are missing and the caller should abort. - */ -export const abortIfMissingMetrics = ( - requiredMetrics: Record<string, unknown> | undefined, - formatErrorMessages: (metrics: any) => void, -): boolean => { - if (requiredMetrics && Object.keys(requiredMetrics).length > 0) { - formatErrorMessages(requiredMetrics) - return true - } - return false -} - -/** - * Handles backend sync and scenario status updates after annotation succeeds - */ -export const startOptimisticAnnotation = async ( - scenarioId: string, - step: IAnnotationStep, - apiUrl: string, - jwt: string, - projectId: string, - runId?: string, -) => { - setOptimisticStepData( - scenarioId, - [ - { - ...structuredClone(step), - status: "annotating", - }, - ], - runId, - ) - updateScenarioStatusRemote(apiUrl, jwt, scenarioId, EvaluationStatus.RUNNING, projectId, runId) -} - -/** - * Build common annotation context (evaluators, trace ids, testset ids, etc.) - */ -export const buildAnnotationContext = async ({ - scenarioId, - stepKey, - runId, -}: { - scenarioId: string - stepKey: string - runId: string -}) => { - const evaluators = getEvaluators(runId) - const testsets = evalAtomStore().get(evaluationRunStateFamily(runId))?.enrichedRun?.testsets - const stepData = await getStepData(scenarioId, runId) - const jwt = await getJWT() - const {projectId} = getProjectValues() - - const invocationStep = stepData?.invocationSteps?.find((s: any) => s.stepKey === stepKey) - if (!invocationStep) return null - - const traceTree = (invocationStep as any)?.trace - if (!traceTree) return null - - const node = traceTree.nodes?.[0] - if (!node) return null - - const traceSpanIds = { - spanId: uuidToSpanId(node.node.id) as string, - traceId: uuidToTraceId(node.root.id) as string, - } - - const testcaseId = invocationStep.testcaseId - const testsetId = testsets?.find((s: any) => s.data?.testcase_ids?.includes(testcaseId))?.id - - return { - evaluators, - jwt, - projectId, - stepData, - traceSpanIds, - testsetId, - testcaseId, - invocationStep, - traceTree, - apiUrl: getAgentaApiUrl(), - } -} - -export const processAnnotationError = async ( - scenarioId: string, - err: unknown, - annotationSteps: IAnnotationStep[], - apiUrl: string, - jwt: string, - projectId: string, - runId: string, - setErrorMessages: (msgs: string[]) => void, -) => { - setErrorMessages([(err as Error).message]) - setOptimisticStepData( - scenarioId, - annotationSteps.map((st) => ({ - ...structuredClone(st), - status: EvaluationStatus.ERROR, - })), - ) - // await updateScenarioStatus(scenario, finalStatus) - updateScenarioStatusRemote(apiUrl, jwt, scenarioId, EvaluationStatus.ERROR, projectId, runId) -} - -export const finalizeAnnotationSuccess = async ({ - annotationSteps, - mode, - annotationResponses, - evaluatorStatuses, - stepData, - stepKey, - scenarioId, - runId, - projectId, - scenario, - jwt, - apiUrl, - evaluators, - setErrorMessages, -}: { - annotationSteps: IAnnotationStep[] - mode: "create" | "update" - annotationResponses: any[] - evaluatorStatuses: Record<string, string> - stepData: any - stepKey: string - scenarioId: string - runId: string - projectId: string - jwt: string - apiUrl: string - scenario: any - evaluators: EvaluatorDto[] - setErrorMessages: (val: any[]) => void -}) => { - if (!annotationResponses.length) return - - const {stepsToCreate, patchStepsFull, metricEntries} = collectStepsAndMetrics({ - mode, - annotationResponses, - stepData, - stepKey, - evaluatorStatuses, - scenarioId, - runId, - evaluators, - }) - - await pushStepsAndMetrics({ - patchStepsFull, - stepsToCreate, - metricEntries, - projectId, - runId, - }) - - await updateScenarioStatusRemote( - apiUrl, - jwt, - scenarioId, - EvaluationStatus.SUCCESS, - projectId, - runId, - ) - await triggerScenarioRevalidation( - runId, - scenarioId, - annotationSteps.map((st) => ({ - ...structuredClone(st), - status: "revalidating", - })), - ) - - // Trigger metrics refresh when scenario completes (success or failure) - if (runId) { - triggerMetricsFetch(runId) - } - - // Note: Metrics will be automatically refreshed by store-level subscription - console.log(`[finalizeAnnotationSuccess] Annotation finalized for runId: ${runId}`) - - setErrorMessages([]) -} - -export const triggerScenarioRevalidation = async ( - runId: string, - scenarioId: string, - updatedSteps?: IStepResponse[], -) => { - try { - await revalidateScenarioForRun(runId, scenarioId, evalAtomStore(), updatedSteps) - } catch (err) { - console.error("Failed to revalidate scenario", err) - } -} - -/** Return all annotationSteps that match any item in the payload */ -export const findAnnotationStepsFromPayload = ( - annotationSteps: IAnnotationStep[] = [], - payload: {annotation: AnnotationDto}[], -) => { - if (!annotationSteps.length || !payload.length) return [] - - return annotationSteps.filter((step) => - payload.some(({annotation}) => { - const evaluatorSlug = annotation.references?.evaluator?.slug - const linkKeys = annotation.links ? Object.keys(annotation.links) : [] - if (!evaluatorSlug || !linkKeys.length) return false - - // backend guarantees first (and usually only) link key is the invocation key - const invocationKey = linkKeys[0] // e.g. "default-2cd951533447" - const expectedStepKey = `${invocationKey}.${evaluatorSlug}` - - return step.stepKey === expectedStepKey - }), - ) -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/helpers.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/helpers.ts deleted file mode 100644 index 03fc0cfeda..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/helpers.ts +++ /dev/null @@ -1,252 +0,0 @@ -import { - generateAnnotationPayloadData, - generateNewAnnotationPayloadData, -} from "@agenta/oss/src/components/pages/observability/drawer/AnnotateDrawer/assets/transforms" - -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import {createAnnotation, updateAnnotation} from "@/oss/services/annotations/api" - -import { - getScenario, - buildAnnotationContext, - partitionAnnotationResults, - abortIfMissingMetrics, - finalizeAnnotationSuccess, - startOptimisticAnnotation, - processAnnotationError, - findAnnotationStepsFromPayload, -} from "./annotationUtils" - -export const handleAnnotate = async ({ - runId, - scenarioId, - updatedMetrics, - formatErrorMessages, - setErrorMessages, - projectId, - stepKey, -}: { - runId: string - scenarioId: string - updatedMetrics: Record<string, any> - formatErrorMessages: (requiredMetrics: Record<string, any>) => void - setErrorMessages: (errorMessages: string[]) => void - projectId: string - stepKey: string -}) => { - console.log("handleAnnotate") - const ctx = await buildAnnotationContext({scenarioId, stepKey, runId}) - if (!ctx) return - const {evaluators, stepData, traceSpanIds, testsetId, testcaseId, traceTree, jwt, apiUrl} = ctx - - if (!traceTree) { - if (process.env.NODE_ENV !== "production") { - console.debug("No trace found on invocation step", scenarioId) - } - return - } - - const node = traceTree.nodes?.[0] - - if (!node) { - if (process.env.NODE_ENV !== "production") { - console.debug("No trace node found for scenario", scenarioId) - } - return - } - - const params = { - updatedMetrics, - selectedEvaluators: evaluators.map((e) => e.slug), - evaluators, - traceSpanIds, - testsetId, - testcaseId, - } - - const {payload, requiredMetrics} = generateNewAnnotationPayloadData({ - ...params, - invocationStepKey: stepKey, - testsetId, - testcaseId, - }) - - if (abortIfMissingMetrics(requiredMetrics, formatErrorMessages)) return - if (!payload.length) return - - const annotationSteps = findAnnotationStepsFromPayload(stepData?.annotationSteps, payload) - - if (!annotationSteps.length) { - console.error("No annotation steps matched payload", {scenarioId, payload}) - throw new Error("Annotation step(s) not found") - } - - try { - // optimistic update for each matched step - annotationSteps.forEach((st) => { - startOptimisticAnnotation(scenarioId, st, apiUrl, jwt, projectId, runId) - }) - - const annotationResults = await Promise.allSettled( - payload.map((evaluatorPayload) => createAnnotation(evaluatorPayload)), - ) - const {annotationResponses, evaluatorStatuses} = partitionAnnotationResults( - annotationResults, - payload, - ) - - await finalizeAnnotationSuccess({ - mode: "create", - annotationResponses, - evaluatorStatuses, - stepData, - stepKey, - scenarioId, - runId, - projectId, - scenario: getScenario(scenarioId, runId), - setErrorMessages, - annotationSteps, - jwt, - apiUrl, - evaluators, - }) - } catch (err) { - await processAnnotationError( - scenarioId, - err, - annotationSteps, - apiUrl, - jwt || "", - projectId, - runId, - setErrorMessages, - ) - } -} - -export const handleUpdateAnnotate = async ({ - runId, - scenarioId, - updatedMetrics, - formatErrorMessages, - setErrorMessages, - projectId, - stepKey, -}: { - runId: string - scenarioId: string - updatedMetrics: Record<string, any> - formatErrorMessages: (requiredMetrics: Record<string, any>) => void - setErrorMessages: (errorMessages: string[]) => void - projectId: string - stepKey: string -}) => { - console.log("handleUpdateAnnotate") - const ctx = await buildAnnotationContext({scenarioId, stepKey, runId}) - if (!ctx) return - const {evaluators, stepData, jwt, apiUrl} = ctx - - const allAnnotations = stepData?.annotationSteps - ?.map((s) => s.annotation) - .filter(Boolean) as AnnotationDto[] - - // Only use the new canonical payload generator - const params = { - updatedMetrics, - selectedEvaluators: evaluators.map((e) => e.slug), - evaluators, - annotations: allAnnotations, - } - const {payload, requiredMetrics} = generateAnnotationPayloadData({ - ...params, - invocationStepKey: stepKey, - }) - - if (abortIfMissingMetrics(requiredMetrics, formatErrorMessages)) return - if (!payload.length) return - - const scenario = getScenario(scenarioId, runId) - const annotationSteps = findAnnotationStepsFromPayload( - stepData?.annotationSteps, - payload - .map((p) => { - const annotation = allAnnotations.find( - (a) => a.span_id === p.span_id && a.trace_id === p.trace_id, - ) - return { - annotation, - } - }) - .filter(Boolean) as {annotation: AnnotationDto}[], - ) - - if (!annotationSteps.length) { - console.error("No annotation steps matched payload", {scenarioId, payload}) - throw new Error("Annotation step(s) not found") - } - - try { - // 1. enabling annotating state - annotationSteps.forEach((st) => { - startOptimisticAnnotation(scenarioId, st, apiUrl, jwt, projectId, runId) - }) - - // 2. updating annotations - const annotationResults = await Promise.allSettled( - payload.map((annotation) => { - const {trace_id, span_id, ...rest} = annotation - return updateAnnotation({ - payload: rest, - traceId: trace_id || "", - spanId: span_id || "", - }) - }), - ) - const {annotationResponses, evaluatorStatuses} = partitionAnnotationResults( - annotationResults, - payload, - ) - - // 3. Optimistic update: mark as revalidating - await finalizeAnnotationSuccess({ - mode: "update", - annotationResponses, - evaluatorStatuses, - stepData, - stepKey, - scenarioId, - runId, - projectId, - scenario, - setErrorMessages, - annotationSteps, - jwt, - apiUrl, - evaluators, - }) - setErrorMessages([]) - } catch (err) { - await processAnnotationError( - scenarioId, - err, - annotationSteps, - apiUrl, - jwt || "", - projectId, - runId, - setErrorMessages, - ) - } -} - -export const statusColorMap: Record<string, string> = { - pending: "text-[#758391]", - incomplete: "text-[#758391]", - running: "text-[#758391]", - done: "text-green-600", - success: "text-green-600", - failed: "text-red-500", - error: "text-red-500", - cancelled: "text-yellow-500", -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/optimisticUtils.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/optimisticUtils.ts deleted file mode 100644 index 361a3db1bc..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/optimisticUtils.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Import run-scoped version for multi-run support -import { - scenarioStepLocalFamily, - evalAtomStore, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {IStepResponse} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" - -/** - * Merge partial step data into the optimistic cache so components can render - * interim worker results immediately while awaiting server revalidation. - */ -export const setOptimisticStepData = async ( - scenarioId: string, - updatedSteps: IStepResponse[], - runId?: string, -) => { - // Write into per-scenario atom to avoid cloning the entire cache map - // Skip if no runId provided since run-scoped atoms require it - if (!runId) { - console.warn("[setOptimisticStepData] No runId provided, skipping optimistic update") - return - } - - evalAtomStore().set(scenarioStepLocalFamily({runId, scenarioId}), (draft: any) => { - if (!draft) return - - updatedSteps.forEach((updatedStep) => { - const targetStep = - draft.invocationSteps?.find((s: any) => s.stepKey === updatedStep.stepKey) || - draft.inputSteps?.find((s: any) => s.stepKey === updatedStep.stepKey) || - draft.annotationSteps?.find((s: any) => s.stepKey === updatedStep.stepKey) - - if (!targetStep) return - - Object.entries(updatedStep).forEach(([k, v]) => { - // @ts-ignore – dynamic merge - targetStep[k] = v as any - }) - }) - }) -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/runnableSelectors.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/runnableSelectors.ts deleted file mode 100644 index b2a6dc5c6c..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/runnableSelectors.ts +++ /dev/null @@ -1,64 +0,0 @@ -import deepEqual from "fast-deep-equal" -import {atom} from "jotai" -import {selectAtom, loadable, atomFamily} from "jotai/utils" - -import { - scenariosFamily, - scenarioStatusAtomFamily, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -/** - * IDs of scenarios that are currently runnable (i.e. have invocation parameters - * and are not in a final/running UI state). - */ -// 1. Combine the needed state into a single base atom -// helper shallow array equality -const shallowArrayEqual = <T>(a: T[], b: T[]) => - a.length === b.length && a.every((v, i) => v === b[i]) - -// A scenario is considered runnable when: -// 1. Its overall status is not in a terminal / running state, AND -// 2. Its step data has been fetched (Loadable state === "hasData"), AND -// 3. At least one invocationStep still contains `invocationParameters` (i.e. not yet executed) -// Per-scenario memoised check – avoids re-running heavy logic for all 1000 scenarios -export const scenarioIsRunnableFamily = atomFamily( - (params: {scenarioId: string; runId: string}) => - atom((get) => { - const {status} = get(scenarioStatusAtomFamily(params)) - if (["running", "done", "success", "revalidating"].includes(status)) return false - const loadableStep = get(loadable(scenarioStepFamily(params))) - if (loadableStep.state !== "hasData") return false - const invSteps: any[] = loadableStep.data?.invocationSteps ?? [] - return invSteps.some((st) => !!st.invocationParameters) - }), - deepEqual, -) - -export const runnableScenarioIdsFamily = atomFamily((runId: string) => { - return atom((get) => { - const scenarios = get(scenariosFamily(runId)) - return scenarios - .filter((scenario: any) => - get(scenarioIsRunnableFamily({scenarioId: scenario.id, runId})), - ) - .map((s: any) => s.id) - }) -}, deepEqual) - -/* memoised view that won’t re-emit if the array is the same */ -export const runnableScenarioIdsMemoFamily = atomFamily((runId: string) => { - return selectAtom(runnableScenarioIdsFamily(runId), (ids) => ids, shallowArrayEqual) -}, deepEqual) - -// Boolean flag: true if at least one scenario is runnable. Uses early exit to avoid building arrays -export const hasRunnableScenarioFamily = atomFamily((runId: string) => { - return atom((get) => { - const scenarios = get(scenariosFamily(runId)) - for (const scenario of scenarios) { - if (get(scenarioIsRunnableFamily({scenarioId: (scenario as any).id, runId}))) - return true - } - return false - }) -}, deepEqual) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/stepsMetricsUtils.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/stepsMetricsUtils.ts deleted file mode 100644 index 1859d83d92..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/stepsMetricsUtils.ts +++ /dev/null @@ -1,180 +0,0 @@ -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" -import {EvaluationStatus} from "@/oss/lib/Types" -import {computeRunMetrics} from "@/oss/services/runMetrics/api" - -export interface StepsAndMetricsResult { - stepsToCreate: any[] - patchStepsFull: any[] - metricEntries: {scenarioId: string; data: Record<string, any>}[] -} - -interface CollectParams { - mode: "create" | "update" - annotationResponses: any[] - stepData: any - stepKey: string - evaluatorStatuses?: Record<string, string> - scenarioId: string - runId: string - evaluators: EvaluatorDto[] -} - -/** - * Consolidated logic used by both handleAnnotate (create) and handleUpdateAnnotate (update) - * to build arrays for step PATCH/POST and metric creation. - */ -export const collectStepsAndMetrics = ({ - mode, - annotationResponses, - stepData, - stepKey, - evaluatorStatuses = {}, - scenarioId, - runId, - evaluators, -}: CollectParams): StepsAndMetricsResult => { - const patchStepsFull: any[] = [] - const stepsToCreate: any[] = [] - const nestedMetrics: Record<string, Record<string, any>> = {} - - // Filter annotation steps belonging to the selected invocation step - const stepAnnotationSteps = (stepData.annotationSteps || []).filter((ann: any) => - (ann.stepKey ?? "").startsWith(`${stepKey}.`), - ) - - if (mode === "create") { - // Track existing keys to avoid duplicates - const existingStepKeys = new Set(stepAnnotationSteps.map((s: any) => s.stepKey)) - - annotationResponses.forEach((resp: any) => { - const ann = resp?.data?.annotation - if (!ann) return - const slug = ann.references?.evaluator?.slug - const evaluatorKey = `${stepKey}.${slug}` - const status = evaluatorStatuses[slug] || EvaluationStatus.SUCCESS - - const evaluator = evaluators.find((e) => e.slug === slug) - if (!evaluator) return - - const metricSchema = evaluator?.data.service.format.properties.outputs.properties - // Add to creation list if not already existing - if (!existingStepKeys.has(evaluatorKey)) { - stepsToCreate.push({ - status, - step_key: evaluatorKey, - span_id: ann.span_id, - trace_id: ann.trace_id, - scenario_id: scenarioId, - run_id: runId, - }) - } - - // Collect metric outputs into nested structure keyed by invocation+evaluator - const outputs = ann.data?.outputs || {} - const fullKey = slug ? `${stepKey}.${slug}` : stepKey - const computed = computeRunMetrics([{data: outputs}]) - - if (!nestedMetrics[fullKey]) nestedMetrics[fullKey] = {} - Object.entries(computed).forEach(([k, v]) => { - const stat = structuredClone(v) - const schema = metricSchema[k] - if (schema?.type === "boolean") { - stat.value = stat.unique?.[0] - } else if (schema?.type === "array") { - stat.value = stat.unique - } else if (schema?.type === "string") { - stat.value = stat.unique - } else if ("anyOf" in schema) { - stat.value = stat.unique.length > 1 ? stat.unique : stat.unique[0] - } - // else if (schema?.type === "number") { - // stat.value = stat.mean - // } - if ("distribution" in stat) delete stat.distribution - if ("percentiles" in stat) delete stat.percentiles - if ("iqrs" in stat) delete stat.iqrs - if ("frequency" in stat) delete stat.frequency - if ("rank" in stat) delete stat.rank - if ("unique" in stat) delete stat.unique - if ("binSize" in stat) delete stat.binSize - - nestedMetrics[fullKey][k] = stat - }) - }) - - // Build patch list by aligning responses to existing steps - stepAnnotationSteps.forEach((ann: any) => { - const linkedResponse = annotationResponses.find((r) => { - const annKey = `${stepKey}.${r?.data?.annotation?.references?.evaluator?.slug}` - return annKey === ann.stepKey - }) - if (linkedResponse) { - const status = - evaluatorStatuses[ann.stepKey.split(".")[1]] || EvaluationStatus.SUCCESS - patchStepsFull.push({ - ...ann, - status, - trace_id: linkedResponse.data.annotation.trace_id, - span_id: linkedResponse.data.annotation.span_id, - }) - } else { - patchStepsFull.push(ann) - } - }) - } else { - // UPDATE flow: only patch existing steps, no creations - stepAnnotationSteps.forEach((ann: any) => { - const linkedResponse = annotationResponses.find( - (r) => - r?.data?.annotation?.span_id === ann.annotation?.span_id && - r?.data?.annotation?.trace_id === ann.annotation?.trace_id, - ) - if (!linkedResponse) return - - const slug = ann.stepKey.split(".")[1] - const evaluator = evaluators.find((e) => e.slug === slug) - if (!evaluator) return - - const metricSchema = evaluator?.data.service.format.properties.outputs.properties - - patchStepsFull.push({ - ...ann, - trace_id: linkedResponse?.data?.annotation?.trace_id, - span_id: linkedResponse?.data?.annotation?.span_id, - }) - - const outputs = linkedResponse?.data?.annotation?.data?.outputs || {} - const computed = computeRunMetrics([{data: outputs}]) - - const fullKey = `${stepKey}.${slug}` - if (!nestedMetrics[fullKey]) nestedMetrics[fullKey] = {} - Object.entries(computed).forEach(([k, v]) => { - const stat = structuredClone(v) - if (metricSchema?.[k]?.type === "boolean") { - stat.value = v.unique?.[0] - } else if (metricSchema?.[k]?.type === "array") { - stat.value = stat.unique - } else if (metricSchema?.[k]?.type === "string") { - stat.value = stat.unique - } else if ("anyOf" in metricSchema[k]) { - stat.value = stat.unique?.length > 1 ? stat.unique : stat.unique[0] - } - - if ("distribution" in stat) delete stat.distribution - if ("percentiles" in stat) delete stat.percentiles - if ("iqrs" in stat) delete stat.iqrs - if ("frequency" in stat) delete stat.frequency - if ("rank" in stat) delete stat.rank - if ("unique" in stat) delete stat.unique - nestedMetrics[fullKey][k] = stat - }) - }) - } - - const metricEntries: {scenarioId: string; data: Record<string, any>}[] = [] - if (Object.keys(nestedMetrics).length > 0) { - metricEntries.push({scenarioId, data: nestedMetrics}) - } - - return {stepsToCreate, patchStepsFull, metricEntries} -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/types.ts deleted file mode 100644 index a48a4840bd..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/assets/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface EvalRunProps { - id: string - name: string - description?: string - runId?: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/index.tsx deleted file mode 100644 index dc2ec556ce..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/index.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import {useState, useCallback, memo} from "react" - -import {Button} from "antd" -import {useAtomValue} from "jotai" - -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import {scenarioUiFlagsFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/progress" -import {getProjectValues} from "@/oss/state/project" - -import {buildAnnotationContext} from "../../assets/annotationUtils" -import {handleAnnotate, handleUpdateAnnotate} from "../../assets/helpers" - -import {AnnotateScenarioButtonProps} from "./types" - -const AnnotateScenarioButton = ({ - runId, - scenarioId, - stepKey, - updatedMetrics, - formatErrorMessages, - setErrorMessages, - disabled = false, - label = "Annotate", - isAnnotated = false, - onAnnotate: propsOnAnnotate, - className, -}: AnnotateScenarioButtonProps) => { - const [annotating, setAnnotating] = useState(false) - const uiFlags = useAtomValue(scenarioUiFlagsFamily({scenarioId, runId})) - const isLoading = annotating || uiFlags.isAnnotating || uiFlags.isRevalidating - - const onAnnotate = useCallback(async () => { - try { - setAnnotating(true) - - const ctx = await buildAnnotationContext({scenarioId, stepKey, runId}) - if (!ctx) return - const {evaluators, stepData} = ctx - const annotations = stepData?.annotationSteps - ?.map((s) => s.annotation) - .filter(Boolean) as AnnotationDto[] - - const annEvalSlugs = annotations - .map((a) => a.references?.evaluator?.slug) - .filter(Boolean) as string[] - const selectedEval = evaluators - .map((e) => e.slug) - .filter((evaluator) => !annEvalSlugs.includes(evaluator)) - - if (selectedEval.length > 0) { - await handleAnnotate({ - runId, - scenarioId, - updatedMetrics, - formatErrorMessages, - setErrorMessages, - projectId: getProjectValues().projectId, - stepKey, - }) - } - - if (annotations.length > 0) { - await handleUpdateAnnotate({ - runId, - scenarioId, - updatedMetrics, - formatErrorMessages, - setErrorMessages, - projectId: getProjectValues().projectId, - stepKey, - }) - } - } catch (error) { - console.error("Failed to annotate scenario", error) - } finally { - propsOnAnnotate?.() - setAnnotating(false) - } - }, [runId, scenarioId, stepKey, updatedMetrics, formatErrorMessages, setErrorMessages]) - - return ( - <Button - type="primary" - loading={isLoading} - disabled={disabled || isLoading} - onClick={onAnnotate} - className={className} - > - {label} - </Button> - ) -} - -export default memo(AnnotateScenarioButton) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/types.ts deleted file mode 100644 index f42a66b324..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/AnnotateScenarioButton/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface AnnotateScenarioButtonProps { - runId: string - scenarioId: string - stepKey: string - updatedMetrics: Record<string, any> - disabled?: boolean - label?: string - className?: string - isAnnotated?: boolean // check if annotations are already present - - formatErrorMessages: (requiredMetrics: Record<string, any>) => void - setErrorMessages: (errorMessages: string[]) => void - onAnnotate?: () => void -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalResultsView/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalResultsView/index.tsx deleted file mode 100644 index 0573c776de..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalResultsView/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import {memo} from "react" - -import EvalRunOverviewViewer from "../../../components/EvalRunOverviewViewer" - -/** - * Displays run-level evaluation results grouped by evaluator. - * Uses selectAtom to subscribe only to the evaluator *list shape* (slug array) so the - * parent component re-renders only when evaluators are added/removed – any metric changes - * are handled inside each card. - */ -const EvalResultsView = ({runId}: {runId: string}) => { - return ( - <section className="overflow-y-auto flex flex-col gap-4"> - <EvalRunOverviewViewer /> - </section> - ) -} - -export default memo(EvalResultsView) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunBatchActions.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunBatchActions.tsx deleted file mode 100644 index 44314a935f..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunBatchActions.tsx +++ /dev/null @@ -1,236 +0,0 @@ -import {memo, useCallback, useState} from "react" - -import RunButton from "@agenta/oss/src/components/Playground/assets/RunButton" -import {getDefaultStore, useAtomValue} from "jotai" -import {loadable} from "jotai/utils" - -// agenta hooks & utils -import {useRunId} from "@/oss/contexts/RunIdContext" -import {convertToStringOrJson} from "@/oss/lib/helpers/utils" -import {useEvalScenarioQueue} from "@/oss/lib/hooks/useEvalScenarioQueue" -import { - scenarioStepFamily, - scenariosFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {scenarioMetricsMapFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" - -import SaveDataButton from "../../components/SaveDataModal/assets/SaveDataButton" -import {hasRunnableScenarioFamily} from "../assets/runnableSelectors" - -import InstructionButton from "./Modals/InstructionModal/assets/InstructionButton" - -const EMPTY_ROWS: any[] = [] - -/** - * This component renders a bar of buttons above the scenario table. - * It includes a button to run all scenarios, a button to export results, - * a button to save the testset, a button to refresh the page, and a button - * to open the instruction modal. - * - * @returns A JSX element containing a bar of buttons. - */ -// derived atom: keeps only the length (count) of runnable scenarios to minimise re-renders - -const EvalRunBatchActions = ({name}: {name: string}) => { - const [rows, setRows] = useState<any[]>(EMPTY_ROWS) - const runId = useRunId() - - const {enqueueScenario} = useEvalScenarioQueue({concurrency: 5, runId}) - - // Lightweight subscription: only track the count of runnable scenarios - use global store - const hasRunnable = useAtomValue(hasRunnableScenarioFamily(runId)) - const isRunAllDisabled = !hasRunnable - - const handleRunAll = useCallback(async () => { - if (!runId) return - - try { - const store = getDefaultStore() - - // Get all scenarios for this run (same as single run approach) - const scenarios = store.get(scenariosFamily(runId)) - console.log(`[EvalRunBatchActions] Found ${scenarios.length} total scenarios`) - - if (scenarios.length === 0) { - console.warn("[EvalRunBatchActions] No scenarios found") - return - } - - let enqueuedCount = 0 - - // For each scenario, get its step data using the same approach as RunEvalScenarioButton - for (const scenario of scenarios) { - const scenarioId = scenario.id - - try { - // Use the same loadable approach as RunEvalScenarioButton - const stepLoadableAtom = loadable(scenarioStepFamily({scenarioId, runId})) - const stepLoadable = store.get(stepLoadableAtom) - - if (stepLoadable.state !== "hasData" || !stepLoadable.data) { - console.log( - `[EvalRunBatchActions] Scenario ${scenarioId} - step data not ready (state: ${stepLoadable.state})`, - ) - continue - } - - const invocationSteps = stepLoadable.data.invocationSteps || [] - console.log( - `[EvalRunBatchActions] Scenario ${scenarioId} has ${invocationSteps.length} invocation steps`, - ) - - // Find the first step with invocation parameters (same logic as RunEvalScenarioButton) - const targetStep = invocationSteps.find((s: any) => s.invocationParameters) - - if (targetStep && targetStep.invocationParameters) { - // Check if step is not already running or successful - const isRunning = invocationSteps.some((s: any) => s.status === "running") - const isSuccess = (targetStep as any).status === "success" - - if (!isRunning && !isSuccess) { - console.log( - `[EvalRunBatchActions] Enqueuing scenario ${scenarioId}, step ${targetStep.stepKey}`, - ) - enqueueScenario(scenarioId, targetStep.stepKey) - enqueuedCount++ - } else { - console.log( - `[EvalRunBatchActions] Skipping scenario ${scenarioId} - already running or successful`, - ) - } - } else { - console.log( - `[EvalRunBatchActions] Skipping scenario ${scenarioId} - no invocation parameters`, - ) - } - } catch (error) { - console.error( - `[EvalRunBatchActions] Error processing scenario ${scenarioId}:`, - error, - ) - } - } - - console.log( - `[EvalRunBatchActions] Run all completed, enqueued ${enqueuedCount} scenarios`, - ) - - // Note: Metrics will be automatically fetched by store-level subscription - if (enqueuedCount > 0) { - console.log( - `[EvalRunBatchActions] Enqueued ${enqueuedCount} scenarios for runId: ${runId}`, - ) - } - } catch (error) { - console.error("[EvalRunBatchActions] Error in handleRunAll:", error) - } - }, [runId, enqueueScenario]) - - const csvDataFormat = useCallback(async () => { - if (!runId) return [] - - // 1. Gather the scenario IDs present in the current evaluation (sync) - const store = getDefaultStore() - const scenarios = store.get(scenariosFamily(runId)) - const ids = scenarios.map((s: any) => s.id) - - // 2. Resolve (possibly async) scenario step data for each id - const [scenarioMetricsMap, ...allScenarios] = await Promise.all([ - store.get(scenarioMetricsMapFamily(runId)), - ...ids.map((id) => store.get(scenarioStepFamily({runId, scenarioId: id}))), - ]) - - // 3. Build the CSV-friendly records - const data = allScenarios.map((scenario) => { - if (!scenario) return {} - const sid = scenario.steps?.[0]?.scenarioId - - const primaryInput = scenario.inputSteps?.find((s: any) => s.inputs) || {} - const {inputs = {}, groundTruth = {}, status: inputStatus} = primaryInput as any - - const record: Record<string, any> = {} - - // Add inputs - Object.entries(inputs).forEach(([k, v]) => { - record[k] = convertToStringOrJson(v) - }) - - // Add ground truths - Object.entries(groundTruth).forEach(([k, v]) => { - record[k] = convertToStringOrJson(v) - }) - - // Add annotation metrics/notes per evaluator slug - scenario.annotationSteps?.forEach((annStep: any) => { - const evaluatorSlug = (annStep.stepKey as string)?.split(".")[1] - if (!evaluatorSlug) return - - // 1. summarize metrics from scenarioMetricsMap for this scenario by slug prefix - const summarized: Record<string, any> = {} - // const sid = - // scenario.scenarioId || (scenario as any).scenario_id || (scenario as any).id - const scenarioMetrics = scenarioMetricsMap?.[String(sid)] || {} - Object.entries(scenarioMetrics).forEach(([fullKey, stats]) => { - if (fullKey.startsWith(`${evaluatorSlug}.`)) { - const metricKey = fullKey.slice(evaluatorSlug.length + 1) - summarized[metricKey] = stats - } - }) - - if (Object.keys(summarized).length) { - record[evaluatorSlug] = convertToStringOrJson({...summarized}) - } - }) - - // Extract model output from the first invocation step that contains a trace - const invWithTrace = scenario.invocationSteps?.find((inv: any) => inv.trace) - const traceObj = invWithTrace?.trace - let traceOutput: any - if (Array.isArray(traceObj?.nodes)) { - traceOutput = traceObj.nodes[0]?.data?.outputs - } else if (Array.isArray(traceObj?.trees)) { - traceOutput = traceObj.trees[0]?.nodes?.[0]?.data?.outputs - } - - if (traceOutput) { - record.output = convertToStringOrJson(traceOutput) - } - - record.status = inputStatus ?? "unknown" - return record - }) - - return data - }, [runId]) - - const onClickSaveData = useCallback(async () => { - const data = await csvDataFormat() - setRows(data) - }, [csvDataFormat]) - - return ( - <div className="flex flex-wrap gap-1"> - <RunButton - isRunAll - type="primary" - size="middle" - onClick={handleRunAll} - disabled={isRunAllDisabled} - /> - - <SaveDataButton - exportDataset - label="Export results" - onClick={onClickSaveData} - rows={rows} - name={name} - /> - - <SaveDataButton label="Save testset" onClick={onClickSaveData} rows={rows} /> - - <InstructionButton /> - </div> - ) -} - -export default memo(EvalRunBatchActions) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunName/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunName/index.tsx deleted file mode 100644 index 96bdcb6d14..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunName/index.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import {memo} from "react" - -import {Typography} from "antd" -import {useAtomValue} from "jotai" - -import {urlStateAtom} from "../../../state/urlState" -import {EvalRunProps} from "../../assets/types" -import RenameEvalButton from "../Modals/RenameEvalModal/assets/RenameEvalButton" - -const EvalRunName = (props: EvalRunProps) => { - const {id, name, description, runId} = props || {} - const urlState = useAtomValue(urlStateAtom) - - // Check if we're in comparison mode - const isComparisonMode = Boolean(urlState.compare && urlState.compare.length > 0) - - if (isComparisonMode) { - return ( - <div className="mb-4 w-full"> - <div className="flex items-center justify-between mb-2 w-full"> - <div className="flex items-center gap-2"> - <Typography.Title level={4} className="!mb-0 !mt-0"> - Evaluation Run Comparison - </Typography.Title> - </div> - </div> - {description && ( - <Typography.Text type="secondary" ellipsis={{tooltip: description}}> - {description} - </Typography.Text> - )} - </div> - ) - } - - return ( - <div className="flex flex-col gap-1"> - <div className="flex items-center justify-between"> - <div className="flex items-center gap-2 group relative"> - <Typography.Title level={4} className="!font-medium !m-0"> - {name} - </Typography.Title> - <RenameEvalButton - id={id} - name={name} - description={description} - runId={runId} - type="text" - size="small" - className="opacity-0 group-hover:opacity-100 transition-opacity" - tabIndex={0} - aria-label="Edit run name and description" - style={{padding: 0, minWidth: 24, height: 24, lineHeight: 1}} - /> - </div> - </div> - {description && ( - <Typography.Paragraph - type="secondary" - className="!m-0" - ellipsis={{ - rows: 3, - tooltip: { - title: description, - styles: { - root: {maxWidth: 500}, - }, - }, - }} - > - {description} - </Typography.Paragraph> - )} - </div> - ) -} - -export default memo(EvalRunName) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/index.tsx deleted file mode 100644 index b1783d41bb..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/index.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import {memo} from "react" - -import clsx from "clsx" -import {useAtomValue} from "jotai" - -import {runViewTypeAtom} from "../../../state/urlState" -import EvalRunScenarioCard from "../EvalRunScenarioCard" -import ScenarioAnnotationPanel from "../ScenarioAnnotationPanel" - -import {EvalRunScenarioProps} from "./types" - -const EvalRunScenario = ({scenarioId, runId, className}: EvalRunScenarioProps) => { - const viewType = useAtomValue(runViewTypeAtom) - - return ( - <div - className={clsx([ - className, - { - "flex flex-row gap-8 items-start self-stretch": viewType === "focus", - "flex flex-col gap-2 self-stretch [&_>_.ant-card]:grow": viewType !== "focus", - }, - ])} - > - <div - className={clsx([ - "scenario-annotate-panel", - { - "w-[400px] shrink-0 relative rounded-lg overflow-hidden": - viewType === "focus", - }, - ])} - > - {viewType !== "focus" ? ( - <EvalRunScenarioCard scenarioId={scenarioId} runId={runId} /> - ) : null} - <ScenarioAnnotationPanel - runId={runId} - scenarioId={scenarioId} - classNames={ - viewType === "focus" - ? { - body: "!p-0 [&_.ant-btn]:mx-3 [&_.ant-btn]:mb-3 [&_.ant-btn]:mt-1", - } - : undefined - } - /> - </div> - </div> - ) -} - -export default memo(EvalRunScenario) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/types.ts deleted file mode 100644 index 26a7b69ed4..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenario/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface EvalRunScenarioProps { - scenarioId: string - runId: string - className?: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/EvalRunScenarioCardBody.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/EvalRunScenarioCardBody.tsx deleted file mode 100644 index 39f4f2208b..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/EvalRunScenarioCardBody.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import {FC, memo, useCallback, useMemo} from "react" - -import {Typography} from "antd" -import {atom, useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" - -import { - loadableScenarioStepFamily, - bulkStepsCacheFamily, - getCurrentRunId, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import {renderSkeleton} from "./assets/utils" -import InvocationRun from "./InvocationRun" - -interface EvalRunScenarioCardBodyProps { - scenarioId: string - runId?: string -} - -const EvalRunScenarioCardBody: FC<EvalRunScenarioCardBodyProps> = ({scenarioId, runId}) => { - // Get effective runId - use provided runId or fallback to current run context - const effectiveRunId = useMemo(() => { - if (runId) return runId - try { - return getCurrentRunId() - } catch (error) { - return "" - } - }, [runId]) - - /* --- atoms & data --- */ - // Unified data access that prioritizes bulk cache over individual scenario atoms - // This ensures we get data from whichever source is available - const invocationSteps = useAtomValue( - useMemo( - () => - atom((get) => { - // First try bulk cache (populated by worker) - const bulkCache = get(bulkStepsCacheFamily(effectiveRunId)) - const bulkData = bulkCache?.get(scenarioId) - if ( - bulkCache && - bulkData?.state === "hasData" && - bulkData.data?.invocationSteps - ) { - return bulkData.data.invocationSteps as any[] - } - - // Fallback to individual scenario atom - const loadable = get( - loadableScenarioStepFamily({scenarioId, runId: effectiveRunId}), - ) - if (loadable.state === "hasData" && loadable.data?.invocationSteps) { - return loadable.data.invocationSteps as any[] - } - - return [] - }), - [scenarioId, effectiveRunId], - ), - ) - - // Use the same atom for load state as we use for data to ensure consistency - // This prevents blocking UI when we have optimistically updated data - const loadState = useAtomValue( - useMemo( - () => - selectAtom(loadableScenarioStepFamily({scenarioId, runId: effectiveRunId}), (l) => { - return l.state - }), - [scenarioId, effectiveRunId], - ), - ) - - /* --- render content --- */ - const renderRuns = useCallback(() => { - if (!invocationSteps.length) return null - - return invocationSteps.map((invStep: any) => ( - <InvocationRun - key={invStep.id} - invStep={invStep} - scenarioId={scenarioId} - runId={effectiveRunId} - /> - )) - }, [scenarioId, invocationSteps, effectiveRunId]) - - /* --- loading / error states --- */ - // Determine if we truly have no cached data for this scenario yet - const hasCachedSteps = useAtomValue( - useMemo( - () => - selectAtom( - loadableScenarioStepFamily({scenarioId, runId: effectiveRunId}), - (l) => l.state === "hasData" && l.data !== undefined, - ), - [scenarioId, effectiveRunId], - ), - ) - - // Check scenario status to determine if we're in execution/revalidation state - const scenarioStatus = useAtomValue( - useMemo( - () => - selectAtom(loadableScenarioStepFamily({scenarioId, runId: effectiveRunId}), (l) => { - if (l.state !== "hasData" || !l.data) return null - const invSteps = l.data.invocationSteps || [] - const annSteps = l.data.annotationSteps || [] - const inputSteps = l.data.inputSteps || [] - - // Check if any step is running or revalidating - const isRunning = [...invSteps, ...annSteps, ...inputSteps].some( - (s: any) => s.status === "running" || s.status === "revalidating", - ) - - return isRunning ? "active" : "idle" - }), - [scenarioId, effectiveRunId], - ), - ) - - // Only show loading skeleton when we're actually fetching data from server AND have no cached data - // Don't show loading during scenario execution ("running") or revalidation ("revalidating") - const isInitialLoading = - loadState === "loading" && - !hasCachedSteps && - invocationSteps.length === 0 && - scenarioStatus !== "active" - - if (isInitialLoading) { - return renderSkeleton() - } - if (loadState === "hasError") { - return <Typography.Text type="danger">Failed to load scenario data.</Typography.Text> - } - - if (!invocationSteps.length) return null - - return <div className="flex flex-col gap-6 w-full">{renderRuns()}</div> -} - -export default memo(EvalRunScenarioCardBody) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationInputs.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationInputs.tsx deleted file mode 100644 index cfc9d6333e..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationInputs.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import {memo} from "react" - -import JSON5 from "json5" - -import TextControl from "@/oss/components/Playground/Components/PlaygroundVariantPropertyControl/assets/TextControl" -import SharedEditor from "@/oss/components/Playground/Components/SharedEditor" -import useEvalRunScenarioData from "@/oss/lib/hooks/useEvaluationRunData/useEvalRunScenarioData" - -import {renderChatMessages} from "../../../assets/renderChatMessages" - -interface InvocationInputsProps { - scenarioId: string - testcaseId: string | undefined - runId?: string -} - -const InvocationInputs = ({scenarioId, testcaseId, runId}: InvocationInputsProps) => { - const data = useEvalRunScenarioData(scenarioId, runId) - // Prefer the inputStep directly enriched with `inputs` field (added during bulk/enrichment) - const inputStep = - data?.inputSteps?.find((s) => s.testcaseId === testcaseId) ?? - data?.steps?.find((s) => s.testcaseId === testcaseId && s.inputs) - const inputs = inputStep?.inputs ?? {} - const groundTruth = (inputStep as any)?.groundTruth ?? {} - - // Merge inputs and groundTruth, giving preference to explicit inputs if duplicate keys - const displayInputs = {...groundTruth, ...inputs} - - if (!displayInputs || Object.keys(displayInputs).length === 0) return null - - // Separate inputs into primitives, JSON objects/arrays, and chat messages - const primitiveEntries: [string, string][] = [] - const jsonEntries: [string, any][] = [] - const chatEntries: [string, string][] = [] - - Object.entries(displayInputs).forEach(([k, _v]) => { - // If already an object/array, treat as JSON directly - if (_v && typeof _v === "object") { - jsonEntries.push([k, _v]) - return - } - // Strings may encode JSON or chat messages - if (typeof _v === "string") { - try { - const parsed = JSON5.parse(_v) - if ( - parsed && - Array.isArray(parsed) && - parsed.every( - (m: any) => m && typeof m === "object" && "role" in m && "content" in m, - ) - ) { - chatEntries.push([k, _v]) - } else if (parsed && typeof parsed === "object") { - jsonEntries.push([k, parsed]) - } else { - primitiveEntries.push([k, _v]) - } - } catch { - primitiveEntries.push([k, _v]) - } - return - } - // Fallback to primitive string rendering - primitiveEntries.push([k, String(_v)]) - }) - - const renderPrimitive = ([k, v]: [string, string]) => ( - <section key={k} className="w-full flex flex-col gap-2"> - <TextControl - metadata={{title: k}} - value={v} - handleChange={() => {}} - disabled - state="readOnly" - className="!text-xs" - /> - </section> - ) - - // Render complex chat message inputs using shared util - const renderComplex = ([k, v]: [string, string]) => - renderChatMessages({keyPrefix: k, rawJson: v, view: "single"}) - - const renderJson = ([k, obj]: [string, any]) => ( - <section key={k} className="w-full flex flex-col gap-2"> - <SharedEditor - initialValue={obj} - state="readOnly" - disabled - editorType="borderless" - editorProps={{codeOnly: true}} - className="!text-xs" - /> - </section> - ) - - return ( - <div className="flex flex-col gap-2"> - {/* Render primitives first */} - {primitiveEntries.map(renderPrimitive)} - {/* Then structured JSON objects/arrays */} - {jsonEntries.map(renderJson)} - {/* Then complex chat/message inputs */} - {chatEntries.flatMap(renderComplex)} - </div> - ) -} - -export default memo(InvocationInputs) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationResponse.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationResponse.tsx deleted file mode 100644 index 76520ea9ee..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationResponse.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import {memo} from "react" - -import {Typography} from "antd" -import JSON5 from "json5" - -import GenerationResultUtils from "@/oss/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils" -import SimpleDropdownSelect from "@/oss/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleDropdownSelect" -import SharedEditor from "@/oss/components/Playground/Components/SharedEditor" -import {useInvocationResult} from "@/oss/lib/hooks/useInvocationResult" - -import RunEvalScenarioButton from "../RunEvalScenarioButton" - -import {InvocationResponseProps} from "./types" - -const InvocationResponse = ({scenarioId, stepKey, runId}: InvocationResponseProps) => { - const {status, trace, value, messageNodes} = useInvocationResult({scenarioId, stepKey, runId}) - const editorKey = trace?.trace_id ?? trace?.id ?? `${scenarioId}-${stepKey}-${runId}` - - return ( - <section className="w-full flex flex-col gap-2"> - <div className="flex items-center gap-2"> - <Typography.Title level={4} className="!font-medium !m-0"> - Model Response - </Typography.Title> - <RunEvalScenarioButton stepKey={stepKey} scenarioId={scenarioId} runId={runId} /> - </div> - - {messageNodes ? ( - messageNodes - ) : typeof value === "object" && value && "role" in value && "content" in value ? ( - <SharedEditor - key={editorKey} - state="readOnly" - header={ - <div className="w-full flex items-center justify-between"> - <SimpleDropdownSelect - value={(value as any).role} - options={[ - {label: "user", value: "user"}, - {label: "assistant", value: "assistant"}, - {label: "system", value: "system"}, - {label: "function", value: "function"}, - {label: "tool", value: "tool"}, - ]} - onChange={() => {}} - disabled - /> - </div> - } - initialValue={(value as any).content} - editorClassName="!text-xs" - disabled - error={!!trace?.exception} - /> - ) : typeof value === "string" ? ( - (() => { - try { - const parsed = JSON5.parse(value) - if (parsed && typeof parsed === "object") { - const pretty = JSON.stringify(parsed, null, 2) - return ( - <SharedEditor - key={`${editorKey}-json`} - handleChange={() => {}} - initialValue={pretty} - editorType="border" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true, codeOnly: true}} - error={!!trace?.exception} - /> - ) - } - - return ( - <SharedEditor - key={`${editorKey}-string`} - handleChange={() => {}} - initialValue={value} - editorType="border" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true}} - error={!!trace?.exception} - /> - ) - } catch { - return ( - <SharedEditor - key={`${editorKey}-error`} - handleChange={() => {}} - initialValue={value} - editorType="border" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true}} - error={!!trace?.exception} - /> - ) - } - })() - ) : typeof value === "object" ? ( - <SharedEditor - key={`${editorKey}-object`} - handleChange={() => {}} - initialValue={(() => { - try { - return JSON.stringify(value, null, 2) - } catch { - return String(value) - } - })()} - editorType="border" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true, codeOnly: true}} - error={!!trace?.exception} - /> - ) : ( - <SharedEditor - key={`${editorKey}-unknown`} - handleChange={() => {}} - initialValue={status?.error ? String(status.error) : (value ?? status?.result)} - editorType="border" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true}} - error={!!trace?.exception} - /> - )} - {trace ? ( - <GenerationResultUtils - result={{ - response: { - tree: { - nodes: [trace], - }, - }, - }} - /> - ) : null} - </section> - ) -} - -export default memo(InvocationResponse) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationRun.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationRun.tsx deleted file mode 100644 index d04cee9eaf..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/InvocationRun.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import {memo} from "react" - -import InvocationInputs from "./InvocationInputs" -import InvocationResponse from "./InvocationResponse" -import {InvocationRunProps} from "./types" - -const InvocationRun = ({invStep, scenarioId, runId}: InvocationRunProps) => { - return ( - <div className="flex flex-col gap-6 w-full text-sm"> - <InvocationInputs - scenarioId={scenarioId} - testcaseId={invStep.testcaseId} - runId={runId} - /> - <InvocationResponse scenarioId={scenarioId} stepKey={invStep.stepKey} runId={runId} /> - </div> - ) -} - -export default memo(InvocationRun) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/KeyValue.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/KeyValue.tsx deleted file mode 100644 index 9b13e9e97c..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/KeyValue.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import {memo} from "react" - -import {Typography} from "antd" - -import {KeyValueProps} from "../types" - -const KeyValue = ({label, value, ...rest}: KeyValueProps) => { - const renderVal = () => { - if (value == null || value === "") { - return <span className="text-gray-400 italic">N/A</span> - } - if (typeof value === "object") { - const entries = Object.entries(value as Record<string, any>) - if (entries.length > 1) { - return ( - <ul className="list-none m-0 p-0"> - {entries.map(([k, v]) => { - if (process.env.NODE_ENV !== "production") { - console.debug("k - v", k, v) - } - return ( - <li key={k} className="pl-0 flex items-center"> - <Typography.Text strong className="!text-sm mr-2"> - {k}: - </Typography.Text> - <Typography.Text className="!text-sm"> - {typeof v === "object" ? JSON.stringify(v) : String(v)} - </Typography.Text> - </li> - ) - })} - </ul> - ) - } - const singleVal = entries[0][1] - return typeof singleVal === "object" ? JSON.stringify(singleVal) : String(singleVal) - } - return String(value) - } - - return ( - <> - <div className="flex w-full items-start"> - <Typography.Text - strong - className="min-w-[110px] text-right pr-2 !text-sm" - {...rest} - > - {label}: - </Typography.Text> - <Typography.Text className="flex-1 break-all !text-sm"> - {renderVal()} - </Typography.Text> - </div> - </> - ) -} - -export default memo(KeyValue) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/utils.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/utils.tsx deleted file mode 100644 index 35bd0cce84..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/assets/utils.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import {Skeleton} from "antd" - -export function renderSkeleton() { - return ( - <div className="flex flex-col gap-4 w-full"> - <Skeleton active title={false} paragraph={{rows: 4}} /> - </div> - ) -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/index.tsx deleted file mode 100644 index 57558062c8..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/index.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import {memo, useMemo} from "react" - -import {Card} from "antd" -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" - -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {EvaluationRunState} from "@/oss/lib/hooks/useEvaluationRunData/types" - -import EvalRunScenarioCardTitle from "../EvalRunScenarioCardTitle" -import RunEvalScenarioButton from "../RunEvalScenarioButton" - -import EvalRunScenarioCardBody from "./EvalRunScenarioCardBody" -import {EvalRunScenarioCardProps} from "./types" - -/** - * Component that renders a card view for a specific evaluation run scenario. - * Depending on the `viewType`, it can display the scenario in a card format - * or a full-width format. Utilizes data from Jotai atoms to display scenario - * details, including loading state and error handling. - * - * @param {string} scenarioId - The unique identifier for the scenario to be displayed. - * @param {ViewType} [viewType="list"] - Determines the layout of the scenario display, - * either as a "list" (card format) or "single" (full-width). - */ -const EvalRunScenarioCard = ({scenarioId, runId, viewType = "list"}: EvalRunScenarioCardProps) => { - /* scenario index for card title */ - // Read from the same global store that writes are going to - const scenarioIndex = useAtomValue( - useMemo( - () => - selectAtom( - evaluationRunStateFamily(runId), // Use run-scoped atom with runId - (state: EvaluationRunState) => - state.scenarios?.find((s) => s.id === scenarioId)?.scenarioIndex, - deepEqual, - ), - [scenarioId, runId], // Include runId in dependencies - ), - ) - - if (scenarioIndex === undefined) return null - - return viewType === "list" ? ( - <Card - title={ - <EvalRunScenarioCardTitle - scenarioId={scenarioId} - runId={runId} - scenarioIndex={scenarioIndex} - /> - } - style={{width: 400}} - className="self-stretch" - actions={[<RunEvalScenarioButton scenarioId={scenarioId} key="run" />]} - > - <EvalRunScenarioCardBody scenarioId={scenarioId} runId={runId} /> - </Card> - ) : ( - <div className="flex flex-col gap-4 w-full"> - <EvalRunScenarioCardBody scenarioId={scenarioId} runId={runId} /> - </div> - ) -} - -export default memo(EvalRunScenarioCard) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/types.ts deleted file mode 100644 index 559d89c211..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCard/types.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {ComponentProps} from "react" - -import {Typography} from "antd" - -export type ViewType = "list" | "focus" - -export interface EvalRunScenarioCardProps { - scenarioId: string - runId: string - viewType?: ViewType -} - -export interface KeyValueProps { - label: string - value: any - type?: ComponentProps<typeof Typography.Text>["type"] -} - -export interface InvocationResponseProps { - scenarioId: string - stepKey: string - runId?: string -} - -export interface InvocationRunProps { - invStep: any - scenarioId: string - runId?: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/index.tsx deleted file mode 100644 index 2b4c1db711..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/index.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import {memo} from "react" - -import {Typography} from "antd" - -import EvalRunScenarioStatusTag from "../../../components/EvalRunScenarioStatusTag" - -import {EvalRunScenarioCardTitleProps} from "./types" - -const EvalRunScenarioCardTitle = ({ - scenarioIndex, - scenarioId, - runId, -}: EvalRunScenarioCardTitleProps) => { - return ( - <div className="flex items-center justify-between"> - <Typography.Text className="!text-base">Testcase #{scenarioIndex}</Typography.Text> - <EvalRunScenarioStatusTag scenarioId={scenarioId} runId={runId} /> - </div> - ) -} - -export default memo(EvalRunScenarioCardTitle) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/types.ts deleted file mode 100644 index de91d7ca09..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCardTitle/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface EvalRunScenarioCardTitleProps { - scenarioIndex: number - scenarioId: string - runId: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/EvalRunScenarioCards.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/EvalRunScenarioCards.tsx deleted file mode 100644 index 663fd86726..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/EvalRunScenarioCards.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import {memo, RefObject, useRef} from "react" - -import {Typography} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import {FixedSizeList as List} from "react-window" -import {useResizeObserver} from "usehooks-ts" - -import {displayedScenarioIdsFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import EvalRunScenario from "../EvalRunScenario" -import ScenarioLoadingIndicator from "../ScenarioLoadingIndicator/ScenarioLoadingIndicator" - -import {ITEM_GAP, ITEM_SIZE, ITEM_WIDTH} from "./assets/constants" - -/** - * Horizontal scroll list of `EvalRunScenario` cards with a shared loading indicator. - * Extracted clean version after refactor. No duplicated legacy code. - */ -const EvalRunScenarioCards = ({runId}: {runId: string}) => { - const scenarioIds = useAtomValue(displayedScenarioIdsFamily(runId)) || [] - - const containerRef = useRef<HTMLDivElement | null>(null) - const {width = 0, height = 0} = useResizeObserver({ - ref: containerRef as RefObject<HTMLDivElement>, - box: "border-box", - }) - - return ( - <div - className={clsx( - "grow flex flex-col gap-4 min-h-0 w-full h-full", - "[&_.ant-spin-container]:h-full", - )} - > - <div className="flex items-center gap-4"> - <Typography.Title level={4} className="shrink-0 !m-0"> - All Scenarios - </Typography.Title> - <ScenarioLoadingIndicator runId={runId} /> - </div> - - <div ref={containerRef} className="w-full h-full"> - {width > 0 && height > 0 && ( - <List - layout="horizontal" - itemCount={scenarioIds.length} - itemSize={ITEM_SIZE} - height={height} - width={width} - itemKey={(index) => scenarioIds[index]} - > - {({index, style}) => ( - <div - style={{ - ...style, - width: ITEM_WIDTH, - marginRight: index === scenarioIds.length - 1 ? 0 : ITEM_GAP, - }} - > - <EvalRunScenario scenarioId={scenarioIds[index]} runId={runId} /> - </div> - )} - </List> - )} - </div> - </div> - ) -} - -export default memo(EvalRunScenarioCards) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/assets/constants.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/assets/constants.ts deleted file mode 100644 index de7b942a52..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioCards/assets/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const ITEM_WIDTH = 400 -export const ITEM_GAP = 16 -export const ITEM_SIZE = ITEM_WIDTH + ITEM_GAP diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioFilters.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioFilters.tsx deleted file mode 100644 index a934157a00..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/EvalRunScenarioFilters.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import {memo, useCallback} from "react" - -import {Segmented} from "antd" -import {useSetAtom, useAtomValue} from "jotai" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import { - totalCountFamily, - evalScenarioFilterAtom, - pendingCountFamily, - unannotatedCountFamily, - failedCountFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -const EvalRunScenarioFilters = () => { - const runId = useRunId() - - // Read from the same global store that writes are going to - const setFilterAtom = useSetAtom(evalScenarioFilterAtom) - const filter = useAtomValue(evalScenarioFilterAtom) - const totalCount = useAtomValue(totalCountFamily(runId)) - const pendingCount = useAtomValue(pendingCountFamily(runId)) - const unannotatedCount = useAtomValue(unannotatedCountFamily(runId)) - const failedCount = useAtomValue(failedCountFamily(runId)) - - const handleChange = useCallback((val: string) => { - setFilterAtom(val as any) - }, []) - - return ( - <Segmented - size="small" - rootClassName="evaluation-filters !my-0" - options={[ - {label: `All (${totalCount})`, value: "all"}, - {label: `Pending (${pendingCount})`, value: "pending"}, - {label: `Unannotated (${unannotatedCount})`, value: "unannotated"}, - {label: `Failed (${failedCount})`, value: "failed"}, - ]} - value={filter} - onChange={handleChange} - /> - ) -} - -export default memo(EvalRunScenarioFilters) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/assets/InstructionButton.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/assets/InstructionButton.tsx deleted file mode 100644 index 6b7698d0dd..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/assets/InstructionButton.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import {cloneElement, isValidElement, useState} from "react" - -import {Question} from "@phosphor-icons/react" -import dynamic from "next/dynamic" - -import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" - -const InstructionModal = dynamic(() => import("../index"), {ssr: false}) - -const InstructionButton = ({ - icon = true, - children, - label, - ...props -}: { - icon?: boolean - children?: React.ReactNode - label?: string -}) => { - const [isModalOpen, setIsModalOpen] = useState(false) - - return ( - <> - {isValidElement(children) ? ( - cloneElement( - children as React.ReactElement<{ - onClick: () => void - }>, - { - onClick: () => { - setIsModalOpen(true) - }, - }, - ) - ) : ( - <EnhancedButton - type="default" - icon={icon && <Question size={14} />} - onClick={() => setIsModalOpen(true)} - tooltipProps={icon && !label ? {title: "Instructions"} : {}} - label={label} - {...props} - /> - )} - - <InstructionModal open={isModalOpen} onCancel={() => setIsModalOpen(false)} /> - </> - ) -} - -export default InstructionButton diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/index.tsx deleted file mode 100644 index 8fb398eca4..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/InstructionModal/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import {Play} from "@phosphor-icons/react" -import {Modal} from "antd" -import {useRouter} from "next/router" - -import {InstructionModalProps} from "../types" - -const InstructionModal = ({...props}: InstructionModalProps) => { - const router = useRouter() - const isAbTesting = router.pathname.includes("a_b_testing") - - return ( - <Modal title="Instructions" centered {...props} footer={null}> - <ol className="flex flex-col gap-2 py-2 px-5"> - <li> - Use the buttons <b>Next</b> and <b>Prev</b> or the arrow keys{" "} - <code>{`Left (<)`}</code> and <code>{`Right (>)`}</code> to navigate between - scenarios. - </li> - <li> - Click the <b>Run</b> <Play size={14} className="-mb-0.5" /> button or press{" "} - <code>{`Meta+Enter (⌘+↵)`}</code> or <code>{`Ctrl+Enter`}</code> to run the - scenario. - </li> - {isAbTesting && ( - <li> - <b>Vote</b> by either clicking the evaluation buttons at the right sidebar - or pressing the key <code>a</code> for 1st Variant, <code>b</code> for 2nd - Variant and <code>x</code> if both are bad. - </li> - )} - <li>Annotate the scenario</li> - </ol> - </Modal> - ) -} - -export default InstructionModal diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalButton.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalButton.tsx deleted file mode 100644 index 2db2a20630..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalButton.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import {cloneElement, isValidElement, memo, useState} from "react" - -import {EditOutlined} from "@ant-design/icons" -import dynamic from "next/dynamic" - -import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" - -import {RenameEvalButtonProps} from "../../types" - -const RenameEvalModal = dynamic(() => import(".."), {ssr: false}) - -const RenameEvalButton = ({ - id, - name, - description, - runId, - icon = true, - children, - label, - ...props -}: RenameEvalButtonProps) => { - const [isModalOpen, setIsModalOpen] = useState(false) - - return ( - <> - {isValidElement(children) ? ( - cloneElement( - children as React.ReactElement<{ - onClick: () => void - }>, - { - onClick: () => { - setIsModalOpen(true) - }, - }, - ) - ) : ( - <EnhancedButton - type="default" - icon={icon && <EditOutlined size={14} />} - onClick={() => setIsModalOpen(true)} - tooltipProps={icon && !label ? {title: "Rename the eval run"} : {}} - label={label} - {...props} - /> - )} - - <RenameEvalModal - id={id} - name={name} - description={description} - runId={runId} - open={isModalOpen} - onCancel={() => setIsModalOpen(false)} - /> - </> - ) -} - -export default memo(RenameEvalButton) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalModalContent.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalModalContent.tsx deleted file mode 100644 index 2b7a9b5eac..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/assets/RenameEvalModalContent.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import {Input, Typography} from "antd" - -import {RenameEvalModalContentProps} from "../../types" - -const RenameEvalModalContent = ({ - loading, - error, - editName, - setEditName, - editDescription, - setEditDescription, -}: RenameEvalModalContentProps) => { - return ( - <section className="flex flex-col gap-2 my-4"> - <Input - value={editName} - onChange={(e) => setEditName(e.target.value)} - maxLength={100} - placeholder="Run name" - disabled={loading} - /> - <Input.TextArea - value={editDescription} - onChange={(e) => setEditDescription(e.target.value)} - rows={3} - maxLength={500} - placeholder="Description (optional)" - disabled={loading} - /> - {error && <Typography.Text type="danger">{error}</Typography.Text>} - </section> - ) -} - -export default RenameEvalModalContent diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/index.tsx deleted file mode 100644 index 86e81c461e..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/RenameEvalModal/index.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import {useCallback, useMemo, useState} from "react" - -import {message} from "antd" -import {useSWRConfig} from "swr" - -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" -import {useRunId} from "@/oss/contexts/RunIdContext" -import axios from "@/oss/lib/api/assets/axiosConfig" -import { - evalAtomStore, - evaluationRunStateFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import {RenameEvalModalProps} from "../types" - -import RenameEvalModalContent from "./assets/RenameEvalModalContent" - -const RenameEvalModal = ({ - id, - name, - description, - runId, - onCancel, - afterClose, - ...modalProps -}: RenameEvalModalProps) => { - const {mutate} = useSWRConfig() - const contextRunId = useRunId() // Get runId from context - const effectiveRunId = runId || contextRunId // Use prop runId if available, otherwise context - const [editName, setEditName] = useState(name) - const [editDescription, setEditDescription] = useState(description || "") - const [loading, setLoading] = useState(false) - const [error, setError] = useState<string | null>(null) - - const onAfterClose = useCallback(() => { - setEditName(name) - setEditDescription(description || "") - setError(null) - afterClose?.() - }, [name, description, afterClose]) - - const handleSave = useCallback(async () => { - setLoading(true) - setError(null) - - // Use run-scoped atom with effectiveRunId (from prop or context) - const state = evalAtomStore().get(evaluationRunStateFamily(effectiveRunId)) - - try { - const response = await axios.patch(`/preview/evaluations/runs/${id}`, { - run: { - ...state.rawRun, - id, - name: editName, - description: editDescription, - }, - }) - - const updatedCount = response?.data?.count - if (typeof updatedCount === "number" && updatedCount <= 0) { - message.error("Failed to update evaluation run.") - onCancel?.({} as any) - return - } - - await mutate( - (key: string) => key.includes("/preview/evaluations/runs/") || key.includes(id), - undefined, - true, - ) - - message.success("Evaluation run updated") - onCancel?.({} as any) - } catch (err: any) { - setError(err?.message || "Failed to update run") - } finally { - setLoading(false) - } - }, [id, editName, editDescription, mutate, effectiveRunId, name, onCancel]) - - const isDisabled = useMemo(() => { - return ( - editName?.trim?.() === name?.trim?.() && - editDescription?.trim?.() === description?.trim?.() - ) - }, [editName, editDescription, name, description]) - - return ( - <EnhancedModal - title="Rename" - onOk={handleSave} - confirmLoading={loading} - okText="Save" - afterClose={onAfterClose} - onCancel={onCancel} - okButtonProps={{disabled: isDisabled}} - {...modalProps} - > - <RenameEvalModalContent - loading={loading} - error={error} - editName={editName} - setEditName={setEditName} - editDescription={editDescription} - setEditDescription={setEditDescription} - /> - </EnhancedModal> - ) -} - -export default RenameEvalModal diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/types.d.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/types.d.ts deleted file mode 100644 index a453b392e1..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/Modals/types.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import {Dispatch, SetStateAction, ReactNode} from "react" - -import {ModalProps, ButtonProps} from "antd" - -export interface InstructionModalProps extends ModalProps {} - -export interface RenameEvalModalProps extends ModalProps { - id: string - name: string - description?: string - runId?: string -} - -export interface RenameEvalModalContentProps { - loading?: boolean - error: string | null - editName: string - setEditName: Dispatch<SetStateAction<string>> - editDescription: string - setEditDescription: Dispatch<SetStateAction<string>> -} - -export interface RenameEvalButtonProps extends ButtonProps { - id: string - name: string - description?: string - runId?: string - icon?: boolean - children?: ReactNode - label?: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/index.tsx deleted file mode 100644 index 248ca7da4a..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/index.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import {memo, useMemo, useCallback} from "react" - -import RunButton from "@agenta/oss/src/components/Playground/assets/RunButton" -import {Tooltip} from "antd" -import {useAtomValue} from "jotai" -import {loadable} from "jotai/utils" - -// Use EE run-scoped versions for multi-run support -import {useEvalScenarioQueue} from "@/oss/lib/hooks/useEvalScenarioQueue" -import { - getCurrentRunId, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import {RunEvalScenarioButtonProps} from "./types" - -const RunEvalScenarioButton = memo( - ({scenarioId, stepKey, label = "Run Scenario", runId}: RunEvalScenarioButtonProps) => { - // Use effective runId with fallback using useMemo - const effectiveRunId = useMemo(() => { - if (runId) return runId - try { - return getCurrentRunId() - } catch (error) { - console.warn("[RunEvalScenarioButton] No run ID available:", error) - return "" - } - }, [runId]) - - const {enqueueScenario} = useEvalScenarioQueue({concurrency: 5, runId: effectiveRunId}) - - // Derive invocationParameters via scenario step loadable (run-scoped) - use global store - const stepLoadable = useAtomValue( - loadable(scenarioStepFamily({scenarioId, runId: effectiveRunId})), - ) - - // derive running flag directly from run-scoped scenario step data - const isRunning = useMemo(() => { - if (stepLoadable.state !== "hasData" || !stepLoadable.data) return false - const data = stepLoadable.data - return ( - data?.invocationSteps?.some((s: any) => s.status === "running") || - data?.annotationSteps?.some((s: any) => s.status === "running") || - data?.inputSteps?.some((s: any) => s.status === "running") - ) - }, [stepLoadable]) - - // Extract invocation steps (if any) - const invocationSteps = - stepLoadable.state === "hasData" ? stepLoadable.data?.invocationSteps || [] : [] - - // Determine target step - const targetStep = stepKey - ? invocationSteps.find((s) => s.stepKey === stepKey) - : invocationSteps.find((s) => s.invocationParameters) - - const autoStepKey = targetStep?.stepKey - const invocationParameters = targetStep?.invocationParameters - const invocationStepStatus = targetStep?.status - - const handleClick = useCallback(() => { - if (invocationParameters) { - enqueueScenario(scenarioId, autoStepKey) - } - }, [enqueueScenario, scenarioId, autoStepKey, invocationParameters]) - - const button = useMemo( - () => ( - <RunButton - onClick={handleClick} - disabled={ - isRunning || invocationStepStatus === "success" || !invocationParameters - } - loading={isRunning} - type="default" - label={label} - /> - ), - [handleClick, isRunning, invocationStepStatus, invocationParameters, label], - ) - - return ( - <div className="flex items-center gap-2 mx-2"> - {invocationParameters ? ( - <Tooltip - className="pre-wrap" - title={ - <div className="whitespace-pre"> - {JSON.stringify(invocationParameters, null, 2)} - </div> - } - > - {button} - </Tooltip> - ) : ( - button - )} - </div> - ) - }, -) - -export default RunEvalScenarioButton diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/types.ts deleted file mode 100644 index a523a32155..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/RunEvalScenarioButton/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RunEvalScenarioButtonProps { - scenarioId: string - label?: string - stepKey?: string - runId?: string // Optional for multi-run support -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/index.tsx deleted file mode 100644 index c706820839..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/index.tsx +++ /dev/null @@ -1,298 +0,0 @@ -import {FC, memo, useCallback, useMemo, useRef, useState} from "react" - -import {Card, Typography} from "antd" -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {selectAtom, loadable} from "jotai/utils" -import dynamic from "next/dynamic" - -import { - getInitialMetricsFromAnnotations, - getInitialSelectedEvalMetrics, -} from "@/oss/components/pages/observability/drawer/AnnotateDrawer/assets/transforms" -import {UpdatedMetricsType} from "@/oss/components/pages/observability/drawer/AnnotateDrawer/assets/types" -import {isAnnotationCreatedByCurrentUser} from "@/oss/components/pages/observability/drawer/AnnotateDrawer/assets/utils" -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import { - getCurrentRunId, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" - -import AnnotateScenarioButton from "../AnnotateScenarioButton" -import RunEvalScenarioButton from "../RunEvalScenarioButton" - -import {ScenarioAnnotationPanelProps} from "./types" - -const Annotate = dynamic( - () => - import( - "@agenta/oss/src/components/pages/observability/drawer/AnnotateDrawer/assets/Annotate" - ), - {ssr: false}, -) - -const EmptyArray: any[] = [] - -const ScenarioAnnotationPanelAnnotation = memo( - ({ - onAnnotate, - runId, - scenarioId, - buttonClassName, - invStep, - annotationsByStep, - evaluators, - }: ScenarioAnnotationPanelProps) => { - const [errorMessages, setErrorMessages] = useState<string[]>(EmptyArray as string[]) - - // TODO: move this to a shared utils file - const formatErrorMessages = useCallback((requiredMetrics: Record<string, any>) => { - const errorMessages: string[] = [] - - for (const [key, data] of Object.entries(requiredMetrics || {})) { - errorMessages.push( - `Value ${data?.value === "" ? "empty string" : data?.value} is not assignable to type ${data?.type} in ${key}`, - ) - } - setErrorMessages(errorMessages) - }, []) - - const [updatedMetrics, setUpdatedMetrics] = useState<UpdatedMetricsType>({}) - - // helper to compute per-step annotation & evaluator lists - const buildAnnotateData = useCallback( - (stepKey: string) => { - const _steps = annotationsByStep?.[stepKey] || [] - const _annotations = _steps - .map((s) => s.annotation) - .filter(Boolean) as AnnotationDto[] - const annotationEvaluatorSlugs = _annotations - .map((annotation) => annotation?.references?.evaluator?.slug) - .filter(Boolean) - - return { - annotations: _annotations, - evaluatorSlugs: - evaluators - ?.map((e) => e.slug) - .filter((slug) => !annotationEvaluatorSlugs.includes(slug)) || [], - evaluators: - evaluators?.filter((e) => !annotationEvaluatorSlugs.includes(e.slug)) || [], - } - }, - [annotationsByStep, evaluators], - ) - - const {_annotations, isAnnotated, isCreatedByCurrentUser, selectedEvaluators} = - useMemo(() => { - const annotateData = buildAnnotateData(invStep.stepKey) - - const _annotations = annotateData.annotations - const selectedEvaluators = annotateData.evaluatorSlugs - - const isAnnotated = _annotations.length > 0 - const isCreatedByCurrentUser = _annotations.length - ? _annotations.some((ann) => isAnnotationCreatedByCurrentUser(ann)) - : true - - return { - isAnnotated, - isCreatedByCurrentUser, - selectedEvaluators, - _annotations, - } - }, [invStep.stepKey, buildAnnotateData, evaluators]) - - const isChangedMetricData = useMemo(() => { - const annotateData = buildAnnotateData(invStep.stepKey) - - const initialAnnotationMetrics = getInitialMetricsFromAnnotations({ - annotations: annotateData.annotations, - evaluators, - }) - const annotationSlugs = annotateData.annotations - .map((ann) => ann.references?.evaluator?.slug) - .filter(Boolean) - - // Filter updatedMetrics to only include user existing annotations - const filteredUpdatedMetrics = Object.fromEntries( - Object.entries(updatedMetrics).filter(([slug]) => annotationSlugs.includes(slug)), - ) - - if ( - Object.keys(filteredUpdatedMetrics).length === 0 && - filteredUpdatedMetrics.constructor === Object - ) { - return true - } - return deepEqual(filteredUpdatedMetrics, initialAnnotationMetrics) - }, [updatedMetrics, evaluators, invStep.stepKey]) - - const isChangedSelectedEvalMetrics = useMemo(() => { - const annotateData = buildAnnotateData(invStep.stepKey) - const selectedEvaluators = annotateData.evaluatorSlugs - - const initialSelectedEvalMetrics = getInitialSelectedEvalMetrics({ - evaluators: annotateData.evaluators, - selectedEvaluators, - }) - - const filteredUpdatedMetrics = Object.fromEntries( - Object.entries(updatedMetrics).filter(([slug]) => - selectedEvaluators.includes(slug), - ), - ) - - if ( - Object.keys(filteredUpdatedMetrics).length === 0 && - filteredUpdatedMetrics.constructor === Object - ) { - return true - } - - return deepEqual(filteredUpdatedMetrics, initialSelectedEvalMetrics) - }, [updatedMetrics, updatedMetrics, evaluators, invStep.stepKey]) - - return ( - <div className="flex flex-col"> - <Annotate - annotations={_annotations} - updatedMetrics={updatedMetrics} - setUpdatedMetrics={setUpdatedMetrics} - selectedEvaluators={selectedEvaluators} - errorMessage={errorMessages} - disabled={!isCreatedByCurrentUser} - /> - <AnnotateScenarioButton - runId={runId} - scenarioId={scenarioId} - stepKey={invStep.stepKey} - updatedMetrics={updatedMetrics} - formatErrorMessages={formatErrorMessages} - setErrorMessages={setErrorMessages} - isAnnotated={isAnnotated} - disabled={ - (isChangedMetricData && isChangedSelectedEvalMetrics) || - !isCreatedByCurrentUser - } - className={buttonClassName} - onAnnotate={onAnnotate} - /> - </div> - ) - }, -) - -const ScenarioAnnotationPanel: FC<ScenarioAnnotationPanelProps> = ({ - runId, - scenarioId, - className, - classNames, - buttonClassName, - onAnnotate, -}) => { - // Use effective runId with fallback using useMemo - const effectiveRunId = useMemo(() => { - if (runId) return runId - try { - return getCurrentRunId() - } catch (error) { - console.warn("[ScenarioAnnotationPanel] No run ID available:", error) - return "" - } - }, [runId]) - - // Get evaluators from run-scoped state instead of global atom - const evaluatorsSelector = useCallback((state: any) => { - return state?.enrichedRun?.evaluators ? Object.values(state.enrichedRun.evaluators) : [] - }, []) - - const evaluatorsAtom = useMemo( - () => selectAtom(evaluationRunStateFamily(effectiveRunId), evaluatorsSelector, deepEqual), - [effectiveRunId, evaluatorsSelector], - ) - const evaluators = useAtomValue(evaluatorsAtom) - - // Loadable step data for this scenario (always eager) - now run-scoped - // Read from the same global store that writes are going to - const stepDataLoadable = useAtomValue( - loadable(scenarioStepFamily({scenarioId, runId: effectiveRunId})), - ) - - // Preserve last known data so we can still show tool-tips / fields while revalidating - const prevDataRef = useRef<UseEvaluationRunScenarioStepsFetcherResult | undefined>(undefined) - - let stepData: UseEvaluationRunScenarioStepsFetcherResult | undefined = undefined - if (stepDataLoadable.state === "hasData") { - stepData = stepDataLoadable.data - prevDataRef.current = stepDataLoadable.data - } else if (stepDataLoadable.state === "loading") { - stepData = prevDataRef.current - } - - // Memoize field slices for best performance (multi-step) - const _invocationSteps = useMemo(() => stepData?.invocationSteps ?? [], [stepData]) - // Build annotations per step key - const annotationsByStep = useMemo(() => { - if (!stepData) return {} - - type AnnStep = (typeof stepData.steps)[number] - const map: Record<string, AnnStep[]> = {} - if (!stepData?.steps || !_invocationSteps.length) return map - - // Pre-compute all annotation steps once (annotation step = has invocation key prefix) - const allAnnSteps = (stepData.steps || []).filter((s) => - _invocationSteps.some((invStep) => (s.stepKey ?? "").startsWith(`${invStep.stepKey}.`)), - ) - _invocationSteps.forEach(({stepKey}) => { - const anns = allAnnSteps.filter((s) => (s.stepKey ?? "").startsWith(`${stepKey}.`)) - map[stepKey] = anns - }) - return map - }, [stepData?.steps, _invocationSteps]) - - const hasAnyTrace = useMemo(() => _invocationSteps.some((s) => s.traceId), [_invocationSteps]) - - return ( - <Card className={className} classNames={classNames}> - <div className="flex flex-col gap-6"> - {_invocationSteps.map((invStep) => { - return ( - <ScenarioAnnotationPanelAnnotation - buttonClassName={buttonClassName} - key={invStep.id} - invStep={invStep} - annotationsByStep={annotationsByStep} - evaluators={evaluators} - runId={runId} - scenarioId={scenarioId} - onAnnotate={onAnnotate} - /> - ) - })} - </div> - {!hasAnyTrace ? ( - <div - className={clsx( - "absolute top-0 left-0 right-0 bottom-0", - "backdrop-blur-md bg-[#051729] bg-opacity-10 z-10", - "flex flex-col gap-2 items-center justify-center", - )} - > - <Typography>To annotate, please generate output</Typography> - <RunEvalScenarioButton - scenarioId={scenarioId} - stepKey={_invocationSteps[0]?.stepKey} - runId={effectiveRunId} - key="run-button" - /> - </div> - ) : null} - </Card> - ) -} - -export default ScenarioAnnotationPanel diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/types.ts deleted file mode 100644 index 510a28fad2..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioAnnotationPanel/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {CardProps} from "antd" - -import {IStepResponse} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" - -export interface ScenarioAnnotationPanelProps { - runId: string - scenarioId: string - className?: string - classNames?: CardProps["classNames"] - buttonClassName?: string - invStep?: IStepResponse - annotationsByStep?: Record<string, IStepResponse[]> - evaluators?: EvaluatorDto[] - onAnnotate?: () => void -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/ScenarioLoadingIndicator.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/ScenarioLoadingIndicator.tsx deleted file mode 100644 index 395d7e4fee..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/ScenarioLoadingIndicator.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import {memo} from "react" - -import {Progress} from "antd" -import {useAtomValue} from "jotai" - -import {scenarioStepProgressFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import {conicColors} from "./assets/constants" - -const ScenarioLoadingIndicator = ({runId}: {runId: string}) => { - const scenarioStepProgress = useAtomValue(scenarioStepProgressFamily(runId)) - - return scenarioStepProgress.loadingStep === "scenario-steps" ? ( - <Progress - className="[&_.ant-progress-text]:hidden" - percent={scenarioStepProgress.percent ?? undefined} - size="small" - strokeColor={conicColors} - /> - ) : null -} - -export default memo(ScenarioLoadingIndicator) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/assets/constants.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/assets/constants.ts deleted file mode 100644 index bc4a530f64..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/ScenarioLoadingIndicator/assets/constants.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type {ProgressProps} from "antd" - -export const conicColors: ProgressProps["strokeColor"] = { - "0%": "#87d068", - "50%": "#ffe58f", - "100%": "#ffccc7", -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/index.tsx deleted file mode 100644 index 14f3e4d9ac..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/index.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import {memo, useEffect} from "react" - -import {Button, Space, Typography} from "antd" -import clsx from "clsx" -import {useAtom, useAtomValue} from "jotai" -import {loadable} from "jotai/utils" -import {useRouter} from "next/router" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import { - displayedScenarioIdsFamily, - scenariosFamily, - scenarioStepProgressFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import EvalRunScenarioNavigator from "../../../components/EvalRunScenarioNavigator" -import {urlStateAtom} from "../../../state/urlState" -import EvalRunScenarioCard from "../EvalRunScenarioCard" -import ScenarioAnnotationPanel from "../ScenarioAnnotationPanel" -import ScenarioLoadingIndicator from "../ScenarioLoadingIndicator/ScenarioLoadingIndicator" - -import {SingleScenarioViewerProps} from "./types" - -const SingleScenarioViewer = ({runId}: SingleScenarioViewerProps) => { - // Use run-scoped atoms with the provided runId - const effectiveRunId = useRunId() || runId - - // Read from the same global store that writes are going to - const scenariosLoadable = useAtomValue(loadable(scenariosFamily(effectiveRunId))) - const scenarioIdsFromFamily = useAtomValue(displayedScenarioIdsFamily(effectiveRunId)) - - // Fallback: if displayedScenarioIdsFamily is empty but scenariosLoadable has data, use that - const scenarioIds = - scenarioIdsFromFamily?.length > 0 - ? scenarioIdsFromFamily - : scenariosLoadable.state === "hasData" - ? scenariosLoadable.data?.map((s) => s.id) || [] - : [] - const scenarioStepProgress = useAtomValue(scenarioStepProgressFamily(effectiveRunId)) - - // Access URL state atom - const router = useRouter() - const [urlState, setUrlState] = useAtom(urlStateAtom) - - // Prefer URL query first, then atom, then fallback - const activeId = - (router.query.scenarioId as string | undefined) ?? urlState.scenarioId ?? scenarioIds[0] - - // Ensure URL/atom always reference a scenario visible in current list - // Ensure URL/atom correctness - useEffect(() => { - if (scenarioIds.length === 0) return - - const currentScenarioId = - (router.query.scenarioId as string | undefined) ?? urlState.scenarioId - - if (!currentScenarioId || !scenarioIds.includes(currentScenarioId)) { - // Default to the first scenario for this run when no valid selection/deep-link. - setUrlState((draft) => { - draft.scenarioId = scenarioIds[0] - }) - return - } - }, [scenarioIds, router.query.scenarioId, urlState.scenarioId, setUrlState]) - - if (scenariosLoadable.state !== "hasData") { - const step = scenarioStepProgress.loadingStep as string | undefined - if (step === "eval-run" || step === "scenarios") { - return ( - <Space align="center" className="justify-center w-full py-8"> - <Button type="text" loading /> - <Typography.Text type="secondary"> - {step === "eval-run" - ? "Loading evaluation run details..." - : "Loading scenarios..."} - </Typography.Text> - </Space> - ) - } - if (step === "scenario-steps" || step === "metrics") { - return <ScenarioLoadingIndicator runId={effectiveRunId} /> - } - } - - if (scenarioIds?.length === 0) { - return <Typography.Text type="secondary">No scenarios to display.</Typography.Text> - } - - if (!activeId) { - return <Typography.Text type="secondary">Loading scenario...</Typography.Text> - } - if (!activeId || scenariosLoadable.state !== "hasData") { - return <Typography.Text type="secondary">Loading scenario...</Typography.Text> - } - - return ( - <section className="relative flex min-h-0 w-full h-full overflow-y-auto"> - <div className="absolute top-0 left-0 w-full grow min-h-full flex gap-4"> - <div className="min-h-full h-full flex flex-col gap-4 grow sticky top-0 z-10"> - <EvalRunScenarioNavigator - activeId={activeId} - className="sticky top-0 z-10 bg-white pb-1" - /> - <EvalRunScenarioCard viewType="focus" scenarioId={activeId} runId={runId} /> - </div> - - <div className="flex flex-row gap-8 items-start self-stretch min-h-full h-full sticky top-0 z-10"> - <div - className={clsx([ - "scenario-annotate-panel", - "w-[400px] shrink-0 rounded-lg overflow-hidden min-h-full h-full", - ])} - > - <ScenarioAnnotationPanel - runId={runId} - scenarioId={activeId} - classNames={{ - body: "!p-0 [&_.ant-btn]:mx-3 [&_.ant-btn]:mb-3 [&_.ant-btn]:mt-1", - }} - /> - </div> - </div> - </div> - </section> - ) -} - -export default memo(SingleScenarioViewer) diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/types.ts b/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/types.ts deleted file mode 100644 index 00ad8b0171..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/components/SingleScenarioViewer/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface SingleScenarioViewerProps { - runId: string -} diff --git a/web/oss/src/components/EvalRunDetails/HumanEvalRun/index.tsx b/web/oss/src/components/EvalRunDetails/HumanEvalRun/index.tsx deleted file mode 100644 index 7bfe48d108..0000000000 --- a/web/oss/src/components/EvalRunDetails/HumanEvalRun/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import {memo} from "react" - -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" -import dynamic from "next/dynamic" - -import EvalRunScenariosViewSelector from "../components/EvalRunScenariosViewSelector" -import VirtualizedScenarioTable from "../components/VirtualizedScenarioTable" -import {runViewTypeAtom} from "../state/urlState" - -import {EvalRunProps} from "./assets/types" -import EvalRunBatchActions from "./components/EvalRunBatchActions" -import EvalRunName from "./components/EvalRunName" -import EvalRunScenarioCards from "./components/EvalRunScenarioCards/EvalRunScenarioCards" -import EvalRunScenarioFilters from "./components/EvalRunScenarioFilters" -import SingleScenarioViewer from "./components/SingleScenarioViewer" - -const EvalResultsView = dynamic(() => import("./components/EvalResultsView"), {ssr: false}) - -const viewTypeAtom = selectAtom(runViewTypeAtom, (v) => v, deepEqual) - -const EvalRunDetails = ({name, description, id}: EvalRunProps) => { - const viewType = useAtomValue(viewTypeAtom) - return ( - <div className="flex flex-col grow gap-6 pb-4 min-h-0"> - <section className="w-full flex items-start justify-between gap-4"> - <div className="flex flex-col gap-4 shrink self-center"> - <EvalRunName id={id} name={name} description={description} /> - <EvalRunBatchActions name={name} /> - </div> - </section> - - <section className="w-full flex items-center justify-between flex-wrap gap-4"> - {viewType !== "results" ? <EvalRunScenarioFilters /> : <div></div>} - <EvalRunScenariosViewSelector /> - </section> - - <div className="grow flex flex-col gap-4 min-h-0"> - {viewType === "focus" ? ( - <SingleScenarioViewer runId={id} /> - ) : viewType === "table" ? ( - <VirtualizedScenarioTable /> - ) : viewType === "results" ? ( - <EvalResultsView runId={id} /> - ) : ( - <EvalRunScenarioCards runId={id} /> - )} - </div> - </div> - ) -} - -export default memo(EvalRunDetails) diff --git a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/OnlineUrlSync.tsx b/web/oss/src/components/EvalRunDetails/OnlineEvalRun/OnlineUrlSync.tsx deleted file mode 100644 index 1dfcd7eec3..0000000000 --- a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/OnlineUrlSync.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import {useEffect} from "react" - -import {useAtom} from "jotai" -import {useRouter} from "next/router" - -import {evalAtomStore} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/store" - -import {EvalRunUrlState, urlStateAtom} from "../state/urlState" - -const OnlineUrlSync = () => { - const router = useRouter() - const store = evalAtomStore() - const [urlState, setUrlState] = useAtom(urlStateAtom, {store}) - - // Router -> Atom only (no Atom -> Router) to avoid loops - useEffect(() => { - if (!router.isReady) return - const {view, scenarioId, compare} = router.query - const queryView = Array.isArray(view) ? view[0] : (view as string | undefined) - const v = (queryView as EvalRunUrlState["view"]) ?? "scenarios" - - // Parse compare parameter - can be a single string or array of strings - let compareIds: string[] | undefined - if (compare) { - if (Array.isArray(compare)) { - compareIds = compare.filter((id) => typeof id === "string" && id.length > 0) - } else if (typeof compare === "string" && compare.length > 0) { - compareIds = compare.includes(",") - ? compare - .split(",") - .map((id) => id.trim()) - .filter(Boolean) - : [compare] - } - } - - const nextScenarioId = v === "focus" ? (scenarioId as string | undefined) : undefined - - // Guard: skip if no change - const sameView = urlState.view === v - const sameScenario = (urlState.scenarioId || undefined) === (nextScenarioId || undefined) - const currCompareKey = (urlState.compare || []).join(",") - const nextCompareKey = (compareIds || []).join(",") - if (sameView && sameScenario && currCompareKey === nextCompareKey) return - - setUrlState({ - view: v, - scenarioId: nextScenarioId, - compare: compareIds, - }) - }, [router.isReady, router.query.view, router.query.scenarioId, router.query.compare]) - - return null -} - -export default OnlineUrlSync diff --git a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/ConfigurationViewer/index.tsx b/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/ConfigurationViewer/index.tsx deleted file mode 100644 index be13360780..0000000000 --- a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/ConfigurationViewer/index.tsx +++ /dev/null @@ -1,577 +0,0 @@ -import {memo, useEffect, useMemo, useState} from "react" - -import {Collapse, Form, Segmented, Tag, Typography} from "antd" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" - -import { - retrieveQueryRevision, - type QueryConditionPayload, - type QueryFilteringPayload, -} from "../../../../../services/onlineEvaluations/api" -import EvaluatorDetailsPreview from "../../../../pages/evaluations/onlineEvaluation/components/EvaluatorDetailsPreview" -import FiltersPreview from "../../../../pages/evaluations/onlineEvaluation/components/FiltersPreview" -import ReadOnlyBox from "../../../../pages/evaluations/onlineEvaluation/components/ReadOnlyBox" -import {EVALUATOR_CATEGORY_LABEL_MAP} from "../../../../pages/evaluations/onlineEvaluation/constants" -import {useEvaluatorDetails} from "../../../../pages/evaluations/onlineEvaluation/hooks/useEvaluatorDetails" -import {useEvaluatorTypeFromConfigs} from "../../../../pages/evaluations/onlineEvaluation/hooks/useEvaluatorTypeFromConfigs" -import {useEvaluatorTypeMeta} from "../../../../pages/evaluations/onlineEvaluation/hooks/useEvaluatorTypeMeta" - -const {Text} = Typography -const JsonEditor = dynamic(() => import("@/oss/components/Editor/Editor"), {ssr: false}) - -const resolveTimestamp = ( - ...values: Array<string | number | null | undefined> -): string | number | null => { - for (const value of values) { - if (value === undefined || value === null || value === "") continue - const parsed = dayjs(value) - if (parsed.isValid()) return value - } - return null -} - -function toStringValue(v: unknown): string { - if (v === null || v === undefined) return "" - if (typeof v === "string") return v - if (typeof v === "number" || typeof v === "boolean") return String(v) - try { - return JSON.stringify(v) - } catch { - return String(v) - } -} - -function isFiltering(node: any): node is QueryFilteringPayload { - return node && typeof node === "object" && Array.isArray((node as any).conditions) -} - -function isCondition(node: any): node is QueryConditionPayload { - return node && typeof node === "object" && typeof (node as any).field === "string" -} - -function flattenConditions( - node?: QueryFilteringPayload | QueryConditionPayload | null, -): QueryConditionPayload[] { - if (!node) return [] - if (isCondition(node)) return [node] - if (isFiltering(node)) { - const result: QueryConditionPayload[] = [] - for (const child of node.conditions || []) { - if (isFiltering(child)) result.push(...flattenConditions(child)) - else if (isCondition(child)) result.push(child) - } - return result - } - return [] -} - -const toArray = (value: any): any[] => { - if (!value) return [] - if (Array.isArray(value)) return value - if (typeof value === "object") return Object.values(value) - return [] -} - -const pickString = (candidate: unknown): string | undefined => { - if (typeof candidate === "string") { - const trimmed = candidate.trim() - if (trimmed.length) return trimmed - } - return undefined -} - -const collectEvaluatorIdentifiers = (entry: any): string[] => { - if (!entry || typeof entry !== "object") return [] - const ids = new Set<string>() - ;[ - entry?.id, - entry?.slug, - entry?.key, - entry?.uid, - entry?.meta?.evaluator_key, - entry?.flags?.evaluator_key, - entry?.data?.id, - entry?.data?.slug, - entry?.data?.key, - entry?.data?.evaluator_key, - ].forEach((candidate) => { - const value = pickString(candidate) - if (value) ids.add(value) - }) - return Array.from(ids) -} - -const mergePlainObjects = (primary: any, fallback: any): any => { - if (primary === undefined || primary === null) return fallback - if (fallback === undefined || fallback === null) return primary - - const primaryIsObject = typeof primary === "object" && !Array.isArray(primary) - const fallbackIsObject = typeof fallback === "object" && !Array.isArray(fallback) - - if (primaryIsObject && fallbackIsObject) { - const result: Record<string, any> = {...fallback} - Object.entries(primary).forEach(([key, value]) => { - result[key] = mergePlainObjects(value, (fallback as Record<string, any>)[key]) - }) - return result - } - - return primary -} - -const mergeEvaluatorRecords = (runEvaluator?: any, catalogEvaluator?: any): any => { - if (!runEvaluator) return catalogEvaluator - if (!catalogEvaluator) return runEvaluator - - const merged: Record<string, any> = { - ...catalogEvaluator, - ...runEvaluator, - } - - merged.data = mergePlainObjects(runEvaluator.data, catalogEvaluator.data) - merged.settings_values = mergePlainObjects( - runEvaluator.settings_values, - catalogEvaluator.settings_values, - ) - merged.metrics = runEvaluator.metrics ?? catalogEvaluator.metrics - - return merged -} - -const ConfigurationViewer = () => { - const runId = useRunId() - const state = useAtomValue(evaluationRunStateFamily(runId!)) as any - const enrichedRun = state?.enrichedRun - const runIndex = state?.runIndex - - // Try to find a query reference in steps metadata - const queryRef = useMemo(() => { - const steps: Record<string, any> = runIndex?.steps || {} - for (const meta of Object.values(steps)) { - const refs = (meta as any)?.refs || {} - if (refs?.query?.id) return {id: refs.query.id} - if (refs?.query_revision?.id) return {revisionId: refs.query_revision.id} - } - return undefined - }, [runIndex?.steps]) - - const {data: previewEvaluators} = useEvaluators({preview: true, queries: {is_human: false}}) - const {data: projectEvaluators} = useEvaluators() - - const [revision, setRevision] = useState<any>() - const [isQueryLoading, setIsQueryLoading] = useState(false) - useEffect(() => { - let mounted = true - ;(async () => { - try { - setIsQueryLoading(true) - if (!queryRef?.id) { - if (mounted) setRevision(undefined) - return - } - const res = await retrieveQueryRevision({query_ref: {id: queryRef.id}}) - if (mounted) setRevision(res?.query_revision || null) - } catch { - if (mounted) setRevision(null) - } finally { - if (mounted) setIsQueryLoading(false) - } - })() - return () => { - mounted = false - } - }, [queryRef?.id]) - - const {filtering, windowing} = (revision?.data ?? {}) as { - filtering?: QueryFilteringPayload - windowing?: {rate?: number; limit?: number; newest?: string; oldest?: string} - } - - const ratePercent = useMemo(() => { - const r = typeof windowing?.rate === "number" ? windowing?.rate : undefined - if (r === undefined || Number.isNaN(r)) return undefined - const clamped = Math.max(0, Math.min(1, r)) - return Math.round(clamped * 100) - }, [windowing?.rate]) - const evaluationTags = useMemo(() => { - const source = (enrichedRun as any)?.tags ?? (enrichedRun as any)?.meta?.tags - if (!source) return [] - if (Array.isArray(source)) { - return source.filter(Boolean).map((value) => String(value)) - } - if (typeof source === "object") { - return Object.entries(source) - .map(([key, value]) => { - if (value === true || value === null || value === undefined || value === "") { - return key - } - return `${key}: ${toStringValue(value)}` - }) - .filter(Boolean) - } - return [] - }, [enrichedRun]) - - const queryCreatedAt = useMemo( - () => - resolveTimestamp( - (revision as any)?.created_at, - (revision as any)?.createdAt, - (revision as any)?.createdAtTimestamp, - (revision?.meta as any)?.created_at, - (revision?.meta as any)?.createdAt, - ), - [revision], - ) - - const queryUpdatedAt = useMemo( - () => - resolveTimestamp( - (revision as any)?.updated_at, - (revision as any)?.updatedAt, - (revision as any)?.updatedAtTimestamp, - (revision?.meta as any)?.updated_at, - (revision?.meta as any)?.updatedAt, - ), - [revision], - ) - - const runCreatedAt = useMemo( - () => - resolveTimestamp( - queryCreatedAt, - (enrichedRun as any)?.created_at, - (enrichedRun as any)?.createdAt, - (enrichedRun as any)?.createdAtTimestamp, - (state?.rawRun as any)?.created_at, - (state?.rawRun as any)?.createdAt, - (state?.rawRun as any)?.createdAtTimestamp, - ), - [queryCreatedAt, enrichedRun, state?.rawRun], - ) - - const runUpdatedAt = useMemo( - () => - resolveTimestamp( - queryUpdatedAt, - (enrichedRun as any)?.updated_at, - (enrichedRun as any)?.updatedAt, - (enrichedRun as any)?.updatedAtTimestamp, - (state?.rawRun as any)?.updated_at, - (state?.rawRun as any)?.updatedAt, - (state?.rawRun as any)?.updatedAtTimestamp, - ), - [queryUpdatedAt, enrichedRun, state?.rawRun], - ) - - const historicalRangeLabel = useMemo(() => { - if (!windowing?.oldest || !windowing?.newest) { - if (!runCreatedAt) return "Live traffic" - const created = dayjs(runCreatedAt) - return created.isValid() - ? `Live traffic since ${created.format("DD MMM YYYY")}` - : "Live traffic" - } - - const oldestDate = dayjs(windowing.oldest) - const newestDate = dayjs(windowing.newest) - if (oldestDate.isValid() && newestDate.isValid()) { - const diffDays = Math.max(newestDate.diff(oldestDate, "day"), 0) - if (diffDays > 0 && diffDays <= 31) { - return `Historical window: Last ${diffDays} day${diffDays === 1 ? "" : "s"}` - } - return `Historical window: ${oldestDate.format("DD MMM YYYY")} – ${newestDate.format( - "DD MMM YYYY", - )}` - } - return "Historical window" - }, [windowing?.oldest, windowing?.newest, runCreatedAt]) - - // Resolve evaluator for details from runIndex - const evaluatorFromRun = useMemo(() => { - return ((enrichedRun as any)?.evaluators?.[0] as any) ?? undefined - }, [enrichedRun]) - - const evaluatorCatalogMatch = useMemo(() => { - if (!evaluatorFromRun) return undefined - const identifiers = collectEvaluatorIdentifiers(evaluatorFromRun).map((id) => - id.toLowerCase(), - ) - if (!identifiers.length) return undefined - - const locateMatch = (list: any[]): any | undefined => { - for (const candidate of list) { - const candidateIds = collectEvaluatorIdentifiers(candidate).map((id) => - id.toLowerCase(), - ) - if (!candidateIds.length) continue - if (candidateIds.some((id) => identifiers.includes(id))) { - return candidate - } - } - return undefined - } - - const previewList = toArray(previewEvaluators) - const projectList = toArray(projectEvaluators) - - return locateMatch(previewList) ?? locateMatch(projectList) - }, [evaluatorFromRun, previewEvaluators, projectEvaluators]) - - const resolvedEvaluator = useMemo( - () => mergeEvaluatorRecords(evaluatorFromRun, evaluatorCatalogMatch), - [evaluatorFromRun, evaluatorCatalogMatch], - ) - - const evaluatorTypeLookup = useMemo(() => { - const m = new Map<string, {slug: string; label: string}>() - Object.entries(EVALUATOR_CATEGORY_LABEL_MAP).forEach(([slug, label]) => { - m.set(slug, {slug, label: label as string}) - }) - return m - }, []) - const evaluatorDetails = useEvaluatorDetails({ - evaluator: resolvedEvaluator as any, - evaluatorTypeLookup, - }) - - const {typeLabel, typeColor, fallbackColors} = useEvaluatorTypeMeta({ - details: evaluatorDetails as any, - evaluatorRef: null, - matchedPreviewEvaluator: null, - enrichedRun: null, - selectedEvaluatorConfig: null, - }) - - // Prefer config-derived label/color when available - const {label: cfgLabel, color: cfgColor} = useEvaluatorTypeFromConfigs({ - evaluator: resolvedEvaluator, - }) - const finalTypeLabel = cfgLabel ?? typeLabel - const finalTypeColor = cfgColor ?? typeColor - const finalFallbackColors = cfgColor ? undefined : fallbackColors - const finalShowType = Boolean(finalTypeLabel) - - // Placeholder: tags currently disabled; keep logic scaffold for future enablement - const showTagsSection = false - const [evaluatorView, setEvaluatorView] = useState<"details" | "json">("details") - const evaluatorJson = useMemo(() => { - if (!resolvedEvaluator) return "" - const seen = new WeakSet() - try { - return JSON.stringify( - resolvedEvaluator, - (_key, value) => { - if (typeof value === "object" && value !== null) { - if (seen.has(value)) return "[Circular]" - seen.add(value) - } - if (typeof value === "function") return undefined - return value - }, - 2, - ) - } catch { - return "" - } - }, [resolvedEvaluator]) - const hasEvaluatorJson = evaluatorJson.trim().length > 0 - const evaluatorJsonKey = useMemo(() => { - const prefix = resolvedEvaluator?.id ?? evaluatorFromRun?.id ?? "unknown" - if (!hasEvaluatorJson) return `${prefix}-empty` - const sample = evaluatorJson.slice(0, 32) - return `${prefix}-${sample.length}-${sample}` - }, [resolvedEvaluator?.id, evaluatorFromRun?.id, evaluatorJson, hasEvaluatorJson]) - - return ( - <div className="w-full h-full overflow-auto px-6 bg-zinc-1 pt-2"> - {/* Top: evaluation info tag */} - - {/* Panels */} - <div className="bg-white rounded-md border-1 border-solid border-[#0517290F] [&_.ant-collapse-header]:!px-4"> - <Collapse - bordered={false} - defaultActiveKey={["general", "configuration", "evaluator"]} - className="!rounded-none [&_.ant-collapse-header]:!py-2 [&_.ant-collapse-header]:!px-2 [&_.ant-collapse-content-box]:bg-white [&_.ant-collapse-content-box]:!px-2" - > - <Collapse.Panel - header={<span>General</span>} - key="general" - style={{marginBottom: 8, padding: 0}} - className="!border-b-0" - > - <div className="p-4"> - <Form layout="vertical" requiredMark={false}> - <div className="grid grid-cols-1 gap-3 md:grid-cols-2"> - <Form.Item label="Name" style={{marginBottom: 12}}> - <ReadOnlyBox>{enrichedRun?.name || "—"}</ReadOnlyBox> - </Form.Item> - <Form.Item label="Created" style={{marginBottom: 12}}> - <ReadOnlyBox> - {runCreatedAt - ? dayjs(runCreatedAt).format("DD MMM YYYY HH:mm") - : "—"} - </ReadOnlyBox> - </Form.Item> - </div> - - <div className="grid grid-cols-1 gap-3 md:grid-cols-2"> - <Form.Item label="Description" style={{marginBottom: 12}}> - <ReadOnlyBox> - {enrichedRun?.description - ? String(enrichedRun.description) - : "—"} - </ReadOnlyBox> - </Form.Item> - <Form.Item label="Updated" style={{marginBottom: 12}}> - <ReadOnlyBox> - {runUpdatedAt - ? dayjs(runUpdatedAt).format("DD MMM YYYY HH:mm") - : "—"} - </ReadOnlyBox> - </Form.Item> - </div> - - {showTagsSection ? ( - <Form.Item label="Tags" style={{marginBottom: 12}}> - {evaluationTags.length ? ( - <div className="flex flex-wrap gap-1"> - {evaluationTags.map((tagValue, index) => ( - <Tag - key={`${tagValue}-${index}`} - className="!m-0" - > - {tagValue} - </Tag> - ))} - </div> - ) : ( - <Text type="secondary">No tags</Text> - )} - </Form.Item> - ) : null} - </Form> - </div> - </Collapse.Panel> - <Collapse.Panel - header={<span>Configuration</span>} - key="configuration" - style={{marginBottom: 8, padding: 0}} - className="!border-b-0" - > - <div className="p-4"> - <Form layout="vertical" requiredMark={false}> - <div className="grid grid-cols-1 gap-3 lg:grid-cols-[minmax(0,3fr)_minmax(0,1fr)]"> - <div className="min-w-0"> - <Form.Item label="" style={{marginBottom: 0}}> - <FiltersPreview filtering={filtering} /> - </Form.Item> - </div> - <div className="min-w-0"> - <Form.Item label="Sampling rate" style={{marginBottom: 0}}> - <ReadOnlyBox className="w-full max-w-[200px]"> - {ratePercent !== undefined - ? `${ratePercent}%` - : "—"} - </ReadOnlyBox> - </Form.Item> - </div> - </div> - <div className="mt-4 flex flex-wrap items-center justify-between gap-3"> - <div className="flex items-center gap-2 opacity-60"> - <Tag className="!m-0" bordered> - Run on historical data - </Tag> - </div> - <Text type="secondary">{historicalRangeLabel}</Text> - </div> - </Form> - </div> - </Collapse.Panel> - - <Collapse.Panel - header={ - <div className="flex w-full items-center justify-between gap-2 pr-1"> - <span>Evaluator</span> - <div - onClick={(event) => { - event.stopPropagation() - }} - > - <Segmented - options={[ - {label: "Details", value: "details"}, - {label: "JSON", value: "json"}, - ]} - value={evaluatorView} - onChange={(val) => - setEvaluatorView(val as "details" | "json") - } - /> - </div> - </div> - } - key="evaluator" - > - <div className="p-4"> - <Form layout="vertical" requiredMark={false}> - <Form.Item label="Evaluator" style={{marginBottom: 12}}> - <ReadOnlyBox> - <div className="flex items-center gap-2"> - <span> - {resolvedEvaluator?.name || - evaluatorFromRun?.name || - "—"} - </span> - {resolvedEvaluator?.version || - evaluatorFromRun?.version ? ( - <Tag className="!m-0"> - V - {resolvedEvaluator?.version ?? - evaluatorFromRun?.version} - </Tag> - ) : null} - </div> - </ReadOnlyBox> - </Form.Item> - {evaluatorView === "details" ? ( - <EvaluatorDetailsPreview - details={evaluatorDetails as any} - typeLabel={finalTypeLabel} - typeColor={finalTypeColor} - fallbackColors={finalFallbackColors} - showType={finalShowType} - /> - ) : hasEvaluatorJson ? ( - <div className="rounded-md border border-solid border-[#E4E7EC] bg-[#F8FAFC]"> - <JsonEditor - key={evaluatorJsonKey} - initialValue={evaluatorJson} - language="json" - codeOnly - showToolbar={false} - disabled - enableResize={false} - boundWidth - dimensions={{width: "100%", height: 280}} - /> - </div> - ) : ( - <ReadOnlyBox>No evaluator configuration available</ReadOnlyBox> - )} - </Form> - </div> - </Collapse.Panel> - </Collapse> - </div> - </div> - ) -} - -export default memo(ConfigurationViewer) diff --git a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/TracesViewer/index.tsx b/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/TracesViewer/index.tsx deleted file mode 100644 index 2ada026d04..0000000000 --- a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/components/TracesViewer/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import {memo} from "react" - -import {useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -const TracesViewer = () => { - const runId = useRunId() - // const runState = useAtomValue( - // selectAtom(evaluationRunStateFamily(runId!), (v) => ({ - // enrichedRun: v.enrichedRun, - // runIndex: v.runIndex, - // })), - // ) as any - - // const steps = (runState?.runIndex?.steps && Object.values(runState.runIndex.steps)) || [] - - // if (!steps.length) { - // return ( - // <div className="w-full h-full flex items-center justify-center text-[#475467] text-sm"> - // No traces available yet. - // </div> - // ) - // } - - return ( - <div className="w-full h-full overflow-auto px-6"> - {/* <div className="flex flex-col gap-2"> - {steps.map((s: any, idx: number) => ( - <div key={idx} className="border rounded-md p-3"> - <div className="text-xs text-[#667085]">{s?.type || "step"}</div> - <div className="text-sm break-words whitespace-pre-wrap"> - {JSON.stringify(s, null, 2)} - </div> - </div> - ))} - </div> */} - </div> - ) -} - -export default memo(TracesViewer) diff --git a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/index.tsx b/web/oss/src/components/EvalRunDetails/OnlineEvalRun/index.tsx deleted file mode 100644 index b8fbf46677..0000000000 --- a/web/oss/src/components/EvalRunDetails/OnlineEvalRun/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {selectAtom} from "jotai/utils" -import dynamic from "next/dynamic" - -import {evalAtomStore} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import EvalRunHeader from "../AutoEvalRun/components/EvalRunHeader" -import EvalRunOverviewViewer from "../components/EvalRunOverviewViewer" -import VirtualizedScenarioTable from "../components/VirtualizedScenarioTable" -import {runViewTypeAtom} from "../state/urlState" - -import ConfigurationViewer from "./components/ConfigurationViewer" - -export interface OnlineEvalRunDetailsProps { - name: string - description: string - id: string - isLoading?: boolean -} - -const viewTypeAtom = selectAtom(runViewTypeAtom, (v) => v, deepEqual) -const OnlineEvalRunDetails = ({name, id, isLoading}: OnlineEvalRunDetailsProps) => { - const store = evalAtomStore() - const viewType = useAtomValue(viewTypeAtom, {store}) - - // No special skeleton for now; render minimal shell if loading - if (isLoading) { - return ( - <section className="flex flex-col w-full h-[calc(100vh-84px)] gap-2 overflow-auto"> - <EvalRunHeader name={name} id={id} /> - </section> - ) - } - - return ( - <section - className={clsx([ - "flex flex-col w-full h-[calc(100vh-84px)] gap-2 overflow-auto overflow-x-hidden max-w-full", - {"!overflow-hidden": viewType === "results"}, - ])} - > - <EvalRunHeader name={name} id={id} /> - - {viewType === "overview" ? ( - <EvalRunOverviewViewer type="online" /> - ) : viewType === "results" ? ( - <VirtualizedScenarioTable /> - ) : viewType === "configuration" ? ( - <ConfigurationViewer /> - ) : null} - </section> - ) -} - -export default OnlineEvalRunDetails diff --git a/web/oss/src/components/EvalRunDetails/UrlSync.tsx b/web/oss/src/components/EvalRunDetails/UrlSync.tsx deleted file mode 100644 index a17cc175e9..0000000000 --- a/web/oss/src/components/EvalRunDetails/UrlSync.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import {useEffect, useRef} from "react" - -import {useAtom, useAtomValue} from "jotai" -import {useRouter} from "next/router" - -import {EvalRunUrlState, runViewTypeAtom, urlStateAtom} from "./state/urlState" - -const UrlSync = ({evalType}: {evalType: "auto" | "human" | "online" | "custom"}) => { - const router = useRouter() - - // Use global store for all atom reads/writes to ensure consistency - const [urlState, setUrlState] = useAtom(urlStateAtom) - - // Track the last applied router->atom key to avoid re-applying the same state - const lastAppliedKeyRef = useRef<string | null>(null) - const initializedRef = useRef<boolean>(false) - const viewType = useAtomValue(runViewTypeAtom) - - // Router -> Atom (sync whenever relevant query params change) - useEffect(() => { - if (!router.isReady) return - const {view, scenarioId, compare} = router.query - const queryView = Array.isArray(view) ? view[0] : (view as string | undefined) - const fallbackView = - evalType === "online" ? "results" : evalType === "human" ? "focus" : "testcases" - const v = queryView ?? fallbackView - - // Parse compare parameter - can be a single string or array of strings - let compareIds: string[] | undefined - if (compare) { - if (Array.isArray(compare)) { - compareIds = compare.filter((id) => typeof id === "string" && id.length > 0) - } else if (typeof compare === "string" && compare.length > 0) { - // Handle comma-separated string or single ID - compareIds = compare.includes(",") - ? compare - .split(",") - .map((id) => id.trim()) - .filter(Boolean) - : [compare] - } - } - - const nextScenarioId = v === "focus" ? (scenarioId as string | undefined) : undefined - const nextKey = `${v}|${nextScenarioId || ""}|${(compareIds || []).join(",")}` - const curr = urlState - const sameView = curr.view === (v as EvalRunUrlState["view"]) - const sameScenario = (curr.scenarioId || undefined) === (nextScenarioId || undefined) - const currCompareKey = (curr.compare || []).join(",") - const nextCompareKey = (compareIds || []).join(",") - const sameCompare = currCompareKey === nextCompareKey - - if (lastAppliedKeyRef.current === nextKey && sameView && sameScenario && sameCompare) return - - setUrlState({ - view: v as EvalRunUrlState["view"], - scenarioId: nextScenarioId, - compare: compareIds, - }) - lastAppliedKeyRef.current = nextKey - initializedRef.current = true - }, [router.isReady, evalType, router.query.view, router.query.scenarioId, router.query.compare]) - - // Atom -> Router - const lastReplacedKeyRef = useRef<string | null>(null) - useEffect(() => { - if (!router.isReady) return - if (urlState.view === undefined) return // wait until atom populated - if (evalType === "online") return - // Early guard: if router already matches atom state, do nothing - const rView = (router.query.view as string) || "" - const rScenario = (router.query.scenarioId as string) || "" - const rCompare = Array.isArray(router.query.compare) - ? router.query.compare.join(",") - : (router.query.compare as string) || "" - const aView = urlState.view || "" - const aScenario = urlState.view === "focus" ? urlState.scenarioId || "" : "" - const aCompare = (urlState.compare || []).join(",") - if (rView === aView && rScenario === aScenario && rCompare === aCompare) { - return - } - // Build nextQuery starting from current router.query so that dynamic route params (app_id, evaluation_id, etc.) are preserved - const nextQuery: Record<string, any> = {...router.query} - // Apply view from atom - if (urlState.view) nextQuery.view = urlState.view - - // Handle scenarioId depending on view - if (urlState.view === "focus") { - if (urlState.scenarioId !== undefined) { - // atom resolved - if (urlState.scenarioId) nextQuery.scenarioId = urlState.scenarioId - else delete nextQuery.scenarioId - } else if ("scenarioId" in router.query) { - // keep existing router scenarioId until atom resolves - nextQuery.scenarioId = router.query.scenarioId as string - } - } else { - // non-scenario view – ensure scenarioId is gone - delete nextQuery.scenarioId - } - - // Handle compare parameter - if (urlState.compare && urlState.compare.length > 0) { - // Convert array to comma-separated string for URL - nextQuery.compare = urlState.compare.join(",") - } else { - delete nextQuery.compare - } - - // remove empty/undefined values - Object.keys(nextQuery).forEach((k) => { - if (nextQuery[k] === undefined || nextQuery[k] === "") { - delete nextQuery[k] - } - }) - - let mustReplace = false - // strip scenarioId for non-scenario views - if (urlState.view !== "focus") { - if ("scenarioId" in nextQuery) delete nextQuery.scenarioId - } - // Need replace if router still has scenarioId but nextQuery doesn't - if ("scenarioId" in router.query && !("scenarioId" in nextQuery)) { - mustReplace = true - } - // detect difference including removed keys (normalize arrays to strings for compare) - const normalize = (q: Record<string, any>) => { - const copy: Record<string, any> = {} - for (const k of Object.keys(q)) { - const val = q[k] - if (Array.isArray(val)) copy[k] = val.join(",") - else copy[k] = val - } - return copy - } - const currNorm = normalize(router.query as any) - const nextNorm = normalize(nextQuery) - const allKeys = new Set([...Object.keys(currNorm), ...Object.keys(nextNorm)]) - let hasDiff = mustReplace - if (!hasDiff) { - for (const k of allKeys) { - if (currNorm[k] !== nextNorm[k]) { - hasDiff = true - break - } - } - } - // Fast-path guard: if router already equals desired key, skip replace - const routerKey = `${(router.query.view as string) || ""}|${(router.query.scenarioId as string) || ""}|${ - (typeof router.query.compare === "string" - ? router.query.compare - : Array.isArray(router.query.compare) - ? router.query.compare?.join(",") - : "") || "" - }` - const desiredKey = `${nextQuery.view || ""}|${nextQuery.scenarioId || ""}|${(nextQuery.compare as string) || ""}` - if (routerKey === desiredKey) { - lastReplacedKeyRef.current = desiredKey - return - } - - if (hasDiff && lastReplacedKeyRef.current !== desiredKey) { - router.replace( - { - pathname: router.pathname, - query: nextQuery, - }, - undefined, - {shallow: !mustReplace}, - ) - lastReplacedKeyRef.current = desiredKey - } - }, [urlState]) - - return null -} - -export default UrlSync diff --git a/web/oss/src/components/EvalRunDetails/assets/renderChatMessages.tsx b/web/oss/src/components/EvalRunDetails/assets/renderChatMessages.tsx deleted file mode 100644 index d75c1f975d..0000000000 --- a/web/oss/src/components/EvalRunDetails/assets/renderChatMessages.tsx +++ /dev/null @@ -1,177 +0,0 @@ -import {ReactNode} from "react" - -import clsx from "clsx" -import dynamic from "next/dynamic" - -import ImagePreview from "@/oss/components/Common/ImagePreview" -import SimpleSharedEditor from "@/oss/components/EditorViews/SimpleSharedEditor" -import SimpleDropdownSelect from "@/oss/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleDropdownSelect" -import SharedEditor from "@/oss/components/Playground/Components/SharedEditor" - -const Tooltip = dynamic(() => import("antd").then((mod) => mod.Tooltip), {ssr: false}) - -/** - * Renders an array of chat messages (OpenAI format) as readonly SharedEditor blocks. - * Returns an array of <section> nodes so callers can embed them directly in their JSX. - */ -export function renderChatMessages({ - keyPrefix, - rawJson, - view, - editorType = "shared", -}: { - keyPrefix: string - rawJson: string - view?: "table" | "single" - editorType?: "simple" | "shared" | "normal" -}): ReactNode[] { - let messages: {role: string; content: any}[] = [] - try { - messages = JSON.parse(rawJson) - if (!Array.isArray(messages)) - return [<span key={`${keyPrefix}-invalid`}>{String(rawJson)}</span>] - } catch { - return [<span key={`${keyPrefix}-invalid`}>{String(rawJson)}</span>] - } - - if (view === "table") { - return messages.map((msg, i) => { - const textContent = Array.isArray(msg.content) - ? msg.content.find((content) => content.type === "text")?.text - : msg.content - const images = Array.isArray(msg.content) - ? msg.content.filter((content) => content.type === "image_url") - : [] - const showDivider = i < messages.length - 1 - - return ( - <section - key={`${keyPrefix}-${i}`} - className="w-full flex flex-col gap-2 text-xs text-gray-700" - > - <span className="capitalize text-[11px] text-gray-500">{msg.role}</span> - {textContent ? ( - <pre className="whitespace-pre-wrap break-words">{textContent}</pre> - ) : null} - {images.length ? ( - <div className="flex flex-wrap gap-2"> - {images.map((imageContent: any, index: number) => ( - <ImagePreview - key={`msg-image-${index}`} - src={imageContent.image_url.url} - alt="Preview" - size={48} - /> - ))} - </div> - ) : null} - {showDivider ? ( - <div className="h-px w-full bg-slate-200/90 dark:bg-slate-700/60 rounded-full" /> - ) : null} - </section> - ) - }) - } - - return messages.map((msg, i) => { - const textContent = Array.isArray(msg.content) - ? msg.content.find((content) => content.type === "text")?.text - : msg.content - const images = Array.isArray(msg.content) - ? msg.content.filter((content) => content.type === "image_url") - : [] - const showDivider = i < messages.length - 1 - - return ( - <section - key={`${keyPrefix}-${i}`} - className={clsx([ - "w-full flex flex-col gap-2", - {"[&_.agenta-shared-editor]:!p-0": view === "table"}, - ])} - > - {editorType === "simple" ? ( - <SimpleSharedEditor - key={`${keyPrefix}-${i}`} - handleChange={() => {}} - headerName={msg.role} - headerClassName="capitalize" - initialValue={textContent} - editorType="borderless" - state="readOnly" - placeholder="N/A" - disabled - readOnly - editorClassName="!text-xs" - className="!w-[97.5%]" - editorProps={{enableResize: true}} - footer={ - <div className="w-full"> - {images.map((imageContent: any, index: number) => ( - <ImagePreview - key={`msg-image-${index}`} - src={imageContent.image_url.url} - alt="Preview" - size={48} - /> - ))} - </div> - } - /> - ) : editorType === "normal" ? ( - <div className="w-full flex flex-col gap-2"> - <span className="capitalize">{msg.role}</span> - {textContent} - </div> - ) : ( - <SharedEditor - state={view === "single" ? "readOnly" : "default"} - header={ - view === "table" ? ( - <Tooltip title={`Message role: ${msg.role}`} className="w-fit"> - <span className="capitalize italic">{msg.role}</span> - </Tooltip> - ) : ( - <div className="w-full flex items-center justify-between"> - <SimpleDropdownSelect - value={msg.role} - options={[ - {label: "user", value: "user"}, - {label: "assistant", value: "assistant"}, - {label: "system", value: "system"}, - {label: "function", value: "function"}, - {label: "tool", value: "tool"}, - ]} - onChange={() => {}} - disabled - /> - </div> - ) - } - initialValue={textContent} - className="hover:!border-[transparent]" - editorClassName="!text-xs" - editorProps={{enableResize: true}} - disabled - footer={ - <div className="w-full"> - {images.map((imageContent: any, index: number) => ( - <ImagePreview - key={`msg-image-${index}`} - src={imageContent.image_url.url} - alt="Preview" - size={48} - /> - ))} - </div> - } - /> - )} - - {showDivider ? ( - <div className="h-px w-full bg-slate-200/90 dark:bg-slate-700/60 rounded-full" /> - ) : null} - </section> - ) - }) -} diff --git a/web/oss/src/components/EvalRunDetails/components/ComparisonDataFetcher.tsx b/web/oss/src/components/EvalRunDetails/components/ComparisonDataFetcher.tsx deleted file mode 100644 index 33758831fc..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/ComparisonDataFetcher.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import {memo, useEffect, useRef} from "react" - -import {useAtomValue} from "jotai" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import useEvaluationRunData from "@/oss/lib/hooks/useEvaluationRunData" - -import { - evalAtomStore, - evaluationRunStateFamily, - initializeRun, -} from "../../../lib/hooks/useEvaluationRunData/assets/atoms" -import {urlStateAtom} from "../state/urlState" - -const COLOR_SEQUENCE = [1, 2, 3, 4, 5] - -/** - * Individual comparison run data fetcher component - * Mounts the same data fetching logic as EvaluationPageData for a specific comparison run - */ -const ComparisonRunDataFetcher = memo(({runId}: {runId: string}) => { - // Initialize run-scoped atoms and subscriptions when runId is available - useEffect(() => { - if (runId) { - initializeRun(runId) - } - }, [runId]) - - // Use the same data fetching hook as the main evaluation page - // This will trigger all the same atom subscriptions and data loading - useEvaluationRunData(runId, true, runId) - - // This component doesn't render anything - it just triggers data fetching - return null -}) - -ComparisonRunDataFetcher.displayName = "ComparisonRunDataFetcher" - -/** - * Main comparison data fetcher that mounts individual fetchers for each comparison run - * This leverages the existing EvaluationPageData pattern without reimplementing anything - */ -export const ComparisonDataFetcher = memo(() => { - const runColorRegistryRef = useRef(new Map<string, number>()) - - const urlState = useAtomValue(urlStateAtom) - const comparisonRunIds = urlState.compare || [] - const baseRunId = useRunId() - const prevCompareIdsRef = useRef<string[]>([]) - const store = evalAtomStore() - - // Keep run flags in sync with compare list - useEffect(() => { - const ensureColorIndex = (runId: string | undefined) => { - if (!runId) return undefined - const registry = runColorRegistryRef.current - if (registry.has(runId)) return registry.get(runId) - - const used = new Set(registry.values()) - const available = COLOR_SEQUENCE.find((idx) => !used.has(idx)) - const nextIndex = available ?? (registry.size % COLOR_SEQUENCE.length) + 1 - registry.set(runId, nextIndex) - return nextIndex - } - - if (!baseRunId) return - - // Base run is always index 1 and not a comparison - store.set(evaluationRunStateFamily(baseRunId), (draft: any) => { - draft.isBase = true - draft.isComparison = false - draft.compareIndex = 1 - draft.colorIndex = draft.colorIndex ?? ensureColorIndex(baseRunId) - }) - - // Reset flags for runs removed from compare - const prev = prevCompareIdsRef.current - const removed = prev.filter((id) => !comparisonRunIds.includes(id)) - removed.forEach((id) => { - // Never reset flags for the current base run even if it was - // temporarily present in the previous compare list during swaps - if (id === baseRunId) return - store.set(evaluationRunStateFamily(id), (draft: any) => { - draft.isBase = false - draft.isComparison = false - draft.compareIndex = undefined - draft.colorIndex = draft.colorIndex ?? ensureColorIndex(id) - }) - }) - - // Set flags and compareIndex for current compare list - // Skip the base run if it appears in the comparison list temporarily during routing swaps - comparisonRunIds.forEach((id, idx) => { - if (id === baseRunId) return - store.set(evaluationRunStateFamily(id), (draft: any) => { - draft.isBase = false - draft.isComparison = true - draft.compareIndex = idx + 2 // start from 2 for comparisons - draft.colorIndex = draft.colorIndex ?? ensureColorIndex(id) - }) - }) - - // Save for next diff - prevCompareIdsRef.current = [...comparisonRunIds] - }, [baseRunId, comparisonRunIds.join(",")]) - - // Mount a data fetcher component for each comparison run - // This will trigger the same initialization and data loading as the main run - return ( - <> - {comparisonRunIds.map((runId) => ( - <ComparisonRunDataFetcher key={runId} runId={runId} /> - ))} - </> - ) -}) - -ComparisonDataFetcher.displayName = "ComparisonDataFetcher" diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/assets/EvalRunOverviewViewerSkeleton.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/assets/EvalRunOverviewViewerSkeleton.tsx deleted file mode 100644 index 000dd3c312..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/assets/EvalRunOverviewViewerSkeleton.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import {memo} from "react" - -import clsx from "clsx" - -import EvalRunScoreTableSkeleton from "../../../AutoEvalRun/components/EvalRunScoreTable/assets/EvalRunScoreTableSkeleton" -import EvaluatorMetricsChartSkeleton from "../../../AutoEvalRun/components/EvaluatorMetricsChart/assets/EvaluatorMetricsChartSkeleton" - -const EvalRunOverviewViewerSkeleton = ({className}: {className?: string}) => { - return ( - <> - <div className={clsx("px-6 w-full h-full", className)}> - <EvalRunScoreTableSkeleton /> - </div> - - <div className={clsx("w-full flex flex-wrap gap-2", className)}> - {Array.from({length: 3}).map((_, index) => ( - <EvaluatorMetricsChartSkeleton - key={index} - className="w-[calc(50%-0.3rem)] xl:w-[calc(33.33%-0.34rem)] 2xl:w-[calc(25%-0.39rem)]" - /> - ))} - </div> - </> - ) -} - -export default memo(EvalRunOverviewViewerSkeleton) diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/index.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/index.tsx deleted file mode 100644 index 7e9d39745d..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunOverviewViewer/index.tsx +++ /dev/null @@ -1,1241 +0,0 @@ -import {memo, useCallback, useMemo} from "react" - -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {atom, useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" -import {Area, CartesianGrid, Line, LineChart, ResponsiveContainer, XAxis, YAxis} from "recharts" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import { - evaluationEvaluatorsFamily, - evaluationRunStateFamily, - loadingStateAtom, - loadingStateFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import { - runMetricStatsFamily, - runMetricsFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import {canonicalizeMetricKey, getMetricValueWithAliases} from "@/oss/lib/metricUtils" - -import {formatMetricName} from "../../AutoEvalRun/assets/utils" -import {EVAL_COLOR} from "../../AutoEvalRun/assets/utils" -import EvalRunScoreTable from "../../AutoEvalRun/components/EvalRunScoreTable" -import EvaluatorMetricsChart from "../../AutoEvalRun/components/EvaluatorMetricsChart" -import EvaluatorMetricsTimeSeriesChart, { - PLACEHOLDER_LINE_COLOR, - PLACEHOLDER_TIME_SERIES, -} from "../../AutoEvalRun/components/EvaluatorMetricsChart/TimeSeriesChart" -import PlaceholderOverlay, { - PlaceholderEvaluationType, -} from "../../AutoEvalRun/components/shared/PlaceholderOverlay" -import SpiderChartPlaceholder from "../../AutoEvalRun/components/shared/SpiderChartPlaceholder" -import {evalTypeAtom} from "../../state/evalType" -import {urlStateAtom} from "../../state/urlState" -import { - collectEvaluatorIdentifiers, - collectMetricSchemasFromEvaluator, - deriveSchemaMetricType, - mergeEvaluatorRecords, - pickString, - toArray, -} from "../VirtualizedScenarioTable/assets/evaluatorSchemaUtils" - -import EvalRunOverviewViewerSkeleton from "./assets/EvalRunOverviewViewerSkeleton" - -const PlaceholderTimeSeriesBackdrop = () => ( - <ResponsiveContainer width="100%" height="100%"> - <LineChart - data={PLACEHOLDER_TIME_SERIES as any} - margin={{top: 16, right: 24, bottom: 24, left: 32}} - > - <CartesianGrid - stroke={PLACEHOLDER_LINE_COLOR} - strokeOpacity={0.18} - strokeDasharray="5 5" - /> - <XAxis - dataKey="timestamp" - type="number" - domain={["dataMin", "dataMax"]} - scale="time" - tick={{fill: "#94A3B8", fontSize: 11}} - axisLine={{stroke: "rgba(148, 163, 184, 0.35)"}} - tickFormatter={(value: number) => { - const date = new Date(value) - return date.toLocaleTimeString([], {hour: "2-digit", minute: "2-digit"}) - }} - /> - <YAxis - domain={[0, 60]} - tick={{fill: "#94A3B8", fontSize: 11}} - axisLine={{stroke: "rgba(148, 163, 184, 0.35)"}} - /> - <defs> - <linearGradient id="placeholderTimeSeriesFill" x1="0" y1="0" x2="0" y2="1"> - <stop offset="0%" stopColor={PLACEHOLDER_LINE_COLOR} stopOpacity={0.35} /> - <stop offset="55%" stopColor={PLACEHOLDER_LINE_COLOR} stopOpacity={0.12} /> - <stop offset="100%" stopColor={PLACEHOLDER_LINE_COLOR} stopOpacity={0.01} /> - </linearGradient> - </defs> - <Area - type="monotone" - dataKey="value" - stroke="none" - fill="url(#placeholderTimeSeriesFill)" - isAnimationActive={false} - /> - <Line - type="monotone" - dataKey="value" - stroke={PLACEHOLDER_LINE_COLOR} - strokeWidth={2} - dot={false} - isAnimationActive={false} - /> - </LineChart> - </ResponsiveContainer> -) - -// Only evaluator metrics (slug-prefixed) should render in overview charts; skip invocation metrics. -const INVOCATION_METRIC_PREFIX = "attributes.ag." - -const toFiniteNumber = (value: unknown): number | undefined => - typeof value === "number" && Number.isFinite(value) ? value : undefined - -const getStatusCount = (meta: Record<string, any> | undefined, keys: string[]): number => { - if (!meta) return 0 - const seen = new Set<string>() - let total = 0 - keys.forEach((rawKey) => { - const key = typeof rawKey === "string" ? rawKey.trim() : "" - if (!key || seen.has(key)) return - const direct = toFiniteNumber(meta[key]) - if (direct !== undefined) { - total += direct - seen.add(key) - return - } - const summary = (meta?.statusSummary ?? {}) as Record<string, unknown> - const summaryValue = toFiniteNumber(summary[key]) - if (summaryValue !== undefined) { - total += summaryValue - seen.add(key) - } - }) - return total -} - -const extractTimeSeriesValue = (rawValue: any): {value: number; isBoolean: boolean} | null => { - if (rawValue === null || rawValue === undefined) return null - - if (typeof rawValue === "number" && Number.isFinite(rawValue)) { - return {value: rawValue, isBoolean: false} - } - if (typeof rawValue === "boolean") { - return {value: rawValue ? 100 : 0, isBoolean: true} - } - - if (Array.isArray(rawValue) && rawValue.length) { - const numericValues = rawValue.filter((entry) => typeof entry === "number") - if (numericValues.length) { - const sum = numericValues.reduce((acc, num) => acc + num, 0) - return {value: sum / numericValues.length, isBoolean: false} - } - } - - if (rawValue && typeof rawValue === "object") { - if (typeof rawValue.mean === "number" && Number.isFinite(rawValue.mean)) { - return {value: rawValue.mean, isBoolean: false} - } - if (typeof rawValue.value === "number" && Number.isFinite(rawValue.value)) { - return {value: rawValue.value, isBoolean: false} - } - - const frequency = Array.isArray((rawValue as any).frequency) - ? (rawValue as any).frequency - : Array.isArray((rawValue as any).rank) - ? (rawValue as any).rank - : Array.isArray((rawValue as any).freq) - ? (rawValue as any).freq - : undefined - - const uniqueArr = Array.isArray((rawValue as any).unique) - ? (rawValue as any).unique - : Array.isArray((rawValue as any).uniq) - ? (rawValue as any).uniq - : undefined - - if (uniqueArr || frequency) { - const counts = frequency?.map((entry) => entry?.count ?? entry?.frequency ?? 0) ?? [] - const total = - typeof rawValue.count === "number" - ? rawValue.count - : counts.reduce((acc, v) => acc + v, 0) - - if (total > 0 && frequency) { - const trueEntry = frequency.find((entry) => entry?.value === true) - const trueCount = trueEntry ? (trueEntry.count ?? trueEntry.frequency ?? 0) : 0 - const pct = (trueCount / total) * 100 - const clamped = Math.max(0, Math.min(100, pct)) - return {value: clamped, isBoolean: true} - } - } - - if (Array.isArray(rawValue.distribution) && rawValue.distribution.length) { - const totalCount = rawValue.distribution.reduce( - (acc: number, entry: any) => acc + (entry?.count ?? 0), - 0, - ) - if (totalCount > 0) { - const sum = rawValue.distribution.reduce( - (acc: number, entry: any) => acc + (entry?.value ?? 0) * (entry?.count ?? 0), - 0, - ) - return {value: sum / totalCount, isBoolean: false} - } - } - } - - return null -} - -// Lightweight readers (mirrors what ScoreTable does) to fetch multiple runs' state/metrics -const runsStateFamily = atomFamily( - (runIds: string[]) => atom((get) => runIds.map((id) => get(evaluationRunStateFamily(id)))), - deepEqual, -) -const runsMetricsFamily = atomFamily( - (runIds: string[]) => - atom((get) => runIds.map((id) => ({id, metrics: get(runMetricStatsFamily({runId: id}))}))), - deepEqual, -) -const runsRawMetricsFamily = atomFamily( - (runIds: string[]) => - atom((get) => runIds.map((id) => ({id, metrics: get(runMetricsFamily(id))}))), - deepEqual, -) - -const EvalRunOverviewViewer = ({type = "auto"}: {type: "auto" | "online"}) => { - const runId = useRunId() - const urlState = useAtomValue(urlStateAtom) - const evalType = useAtomValue(evalTypeAtom) - const compareRunIds = urlState.compare - const isCompare = !!compareRunIds?.length - - const metrics = useAtomValue(runMetricStatsFamily({runId})) - const evaluators = useAtomValue(evaluationEvaluatorsFamily(runId)) - const loadingState = useAtomValue(loadingStateAtom) - const loadingStateFamilyData = useAtomValue(loadingStateFamily(runId)) - const allRunIds = useMemo( - () => [runId!, ...(compareRunIds || []).filter((id) => id && id !== runId)], - [runId, compareRunIds], - ) - const runs = useAtomValue(runsStateFamily(allRunIds)) - const metricsByRun = useAtomValue(runsMetricsFamily(allRunIds)) - const rawMetricsByRun = useAtomValue(runsRawMetricsFamily(allRunIds)) - - const evaluatorsBySlug = useMemo(() => { - const map = new Map<string, any>() - const register = (entry: any, slug: string) => { - if (!entry || typeof entry !== "object") return - - if (!slug || map.has(slug)) return - map.set(slug, entry) - } - - runs.forEach((state) => { - const annotationSteps = state?.enrichedRun?.data?.steps?.filter( - (step) => step.type === "annotation", - ) - annotationSteps?.forEach((step) => { - toArray( - state?.enrichedRun?.evaluators?.filter( - (evaluator) => evaluator.id === step.references?.evaluator?.id, - ), - ).forEach((evaluator) => { - if (!evaluator) return - const originalKey = typeof step?.key === "string" ? step.key : undefined - const registerKey = (key?: string) => { - if (!key) return - register(evaluator, key) - } - registerKey(originalKey) - if (step.origin === "human" && originalKey) { - const parts = originalKey.split(".") - if (parts.length > 1) { - registerKey(parts[1]) - } - } - }) - }) - }) - - return Object.fromEntries(map.entries()) - }, [runs, evaluators]) - - const schemaMetricDefinitionsBySlug = useMemo(() => { - const map: Record<string, {name: string; type?: string | string[]}[]> = {} - Object.entries(evaluatorsBySlug).forEach(([slug, evaluator]) => { - const definitions = collectMetricSchemasFromEvaluator(evaluator) - .map(({name, schema}) => { - const trimmed = (name || "").trim() - if (!trimmed) return null - return {name: trimmed, type: deriveSchemaMetricType(schema)} - }) - .filter(Boolean) as {name: string; type?: string | string[]}[] - - const existing = map[slug] ?? [] - const merged = new Map<string, {name: string; type?: string | string[]}>() - existing.forEach((definition) => merged.set(definition.name, definition)) - definitions.forEach((definition) => merged.set(definition.name, definition)) - map[slug] = Array.from(merged.values()) - }) - return map - }, [evaluatorsBySlug]) - - const evaluatorMetricKeysBySlug = useMemo(() => { - const map: Record<string, Set<string>> = {} - Object.entries(schemaMetricDefinitionsBySlug).forEach(([slug, definitions]) => { - const set = new Set<string>() - definitions.forEach(({name}) => { - const canonical = canonicalizeMetricKey(name) - set.add(name) - set.add(canonical) - const prefixed = `${slug}.${name}` - set.add(prefixed) - set.add(canonicalizeMetricKey(prefixed)) - }) - map[slug] = set - }) - return map - }, [schemaMetricDefinitionsBySlug]) - - const schemaMetricNamesBySlug = useMemo(() => { - const map: Record<string, string[]> = {} - Object.entries(schemaMetricDefinitionsBySlug).forEach(([slug, definitions]) => { - const names = Array.from( - new Set( - definitions - .map((definition) => definition.name.trim()) - .filter((name) => name.length > 0), - ), - ) - if (map[slug]) { - const merged = new Set([...map[slug], ...names]) - map[slug] = Array.from(merged) - } else { - map[slug] = names - } - }) - return map - }, [schemaMetricDefinitionsBySlug]) - - const metricHasContent = (metric: Record<string, any> | undefined): boolean => { - if (!metric || typeof metric !== "object") return false - if (typeof metric.mean === "number" && Number.isFinite(metric.mean)) return true - if (typeof metric.count === "number" && metric.count > 0) return true - - const distribution: any[] | undefined = Array.isArray((metric as any).distribution) - ? (metric as any).distribution - : undefined - if (distribution && distribution.some((bin) => Number(bin?.count ?? 0) > 0)) return true - - const hist = Array.isArray((metric as any).hist) ? (metric as any).hist : undefined - if (hist && hist.some((bin) => Number(bin?.count ?? bin?.frequency ?? 0) > 0)) return true - - const freq = Array.isArray((metric as any).frequency) - ? (metric as any).frequency - : Array.isArray((metric as any).rank) - ? (metric as any).rank - : undefined - if (freq && freq.some((entry) => Number(entry?.count ?? entry?.frequency ?? 0) > 0)) - return true - - const unique = (metric as any).unique - if (Array.isArray(unique) && unique.length > 0) { - // if we have unique values but no counts, treat as data only if mean exists - return typeof metric.mean === "number" - } - - return false - } - - const combinedMetricEntries = useMemo(() => { - const entries: { - fullKey: string - evaluatorSlug: string - metricKey: string - metric: Record<string, any> - }[] = [] - const seen = new Set<string>() - - const pushEntry = (rawKey: string, source: Record<string, any>) => { - const canonical = canonicalizeMetricKey(rawKey) - if (canonical.startsWith(INVOCATION_METRIC_PREFIX)) return - if (!canonical.includes(".")) return - if (seen.has(canonical)) return - - const metric = - (getMetricValueWithAliases(source, canonical) as Record<string, any>) || - (source?.[rawKey] as Record<string, any>) - if (!metricHasContent(metric)) return - - const segments = canonical.split(".").filter(Boolean) - if (!segments.length) return - - const resolveSlugFromSegments = (): {slug: string; metricStartIdx: number} | null => { - let slugCandidate = segments[0] - let idx = 1 - while (idx <= segments.length) { - if (evaluatorsBySlug[slugCandidate]) { - return {slug: slugCandidate, metricStartIdx: idx} - } - if (idx >= segments.length) break - slugCandidate = `${slugCandidate}.${segments[idx]}` - idx += 1 - } - if (segments.length > 1 && evaluatorsBySlug[segments[1]]) { - return {slug: segments[1], metricStartIdx: 2} - } - return null - } - - const resolved = resolveSlugFromSegments() - if (!resolved) return - const {slug, metricStartIdx} = resolved - - const metricKeySegments = segments.slice(metricStartIdx) - const metricKey = - metricKeySegments.length > 0 - ? metricKeySegments.join(".") - : segments[metricStartIdx - 1] - - const evaluator = evaluatorsBySlug[slug] - if (!evaluator) { - return - } - - if (metricKey.startsWith("attributes.ag.metrics")) { - return - } - - const allowedKeys = evaluatorMetricKeysBySlug[slug] - if (allowedKeys && allowedKeys.size > 0) { - const segments = metricKey.split(".").filter(Boolean) - const candidateKeys = new Set<string>([metricKey]) - segments.forEach((_, idx) => { - const prefix = segments.slice(0, idx + 1).join(".") - const suffix = segments.slice(idx).join(".") - if (prefix) candidateKeys.add(prefix) - if (suffix) candidateKeys.add(suffix) - const segment = segments[idx] - if (segment) candidateKeys.add(segment) - }) - const matchesDefinition = Array.from(candidateKeys).some((key) => - allowedKeys.has(key), - ) - if (!matchesDefinition) return - } - - entries.push({fullKey: canonical, evaluatorSlug: slug, metricKey, metric}) - seen.add(canonical) - } - - const baseMetrics = (metrics || {}) as Record<string, any> - Object.keys(baseMetrics).forEach((fullKey) => { - pushEntry(fullKey, baseMetrics) - }) - - metricsByRun.forEach(({metrics: runMetrics}) => { - const scoped = (runMetrics || {}) as Record<string, any> - Object.keys(scoped).forEach((fullKey) => { - pushEntry(fullKey, scoped) - }) - }) - - return entries - }, [metrics, metricsByRun, evaluatorsBySlug, evaluatorMetricKeysBySlug]) - - const evalById = useMemo(() => { - const map: Record<string, any> = {} - runs.forEach((r) => (map[r.enrichedRun?.id || r.id] = r)) - return map - }, [runs]) - - const metricsLookup = useMemo(() => { - const map: Record<string, Record<string, any>> = {} - metricsByRun.forEach(({id, metrics}) => { - const source = (metrics || {}) as Record<string, any> - const normalized: Record<string, any> = {...source} - Object.keys(source || {}).forEach((rawKey) => { - const canonical = canonicalizeMetricKey(rawKey) - if (canonical !== rawKey && normalized[canonical] === undefined) { - normalized[canonical] = source[rawKey] - } - }) - map[id] = normalized - }) - return map - }, [metricsByRun]) - - const rawMetricsLookup = useMemo(() => { - const map: Record<string, any[]> = {} - rawMetricsByRun.forEach(({id, metrics}) => { - map[id] = Array.isArray(metrics) ? metrics : [] - }) - return map - }, [rawMetricsByRun]) - - const hasMetrics = combinedMetricEntries.length > 0 - const isRefreshingMetrics = loadingStateFamilyData.isRefreshingMetrics - const shouldShowMetricsSkeleton = - loadingState.isLoadingMetrics || - (loadingStateFamilyData.isLoadingMetrics && (!isRefreshingMetrics || !hasMetrics)) - const evaluatorList = Object.values(evaluatorsBySlug) - const resolvedEvalType: PlaceholderEvaluationType = - evalType === "online" ? "online" : evalType === "human" ? "human" : "auto" - - const evaluatorKeysWithMetrics = useMemo(() => { - const set = new Set<string>() - combinedMetricEntries.forEach(({evaluatorSlug}) => { - if (evaluatorSlug) set.add(evaluatorSlug) - }) - return set - }, [combinedMetricEntries]) - - const placeholderEvaluators = useMemo(() => { - return Object.entries(evaluatorsBySlug).filter(([slug, evaluator]) => { - return !evaluatorKeysWithMetrics.has(slug) - }) - }, [evaluatorList, evaluatorKeysWithMetrics]) - - const statusInsights = useMemo(() => { - let runsWithAnyOutcome = 0 - let runsWithSuccess = 0 - let hasAnyError = false - - runs.forEach((state) => { - if (!state) return - - const meta = (state.statusMeta ?? {}) as Record<string, any> - const total = getStatusCount(meta, ["total"]) - const completed = getStatusCount(meta, ["completed"]) - const successCount = getStatusCount(meta, ["success"]) - const errorCount = getStatusCount(meta, ["error"]) + getStatusCount(meta, ["failed"]) - const cancelledCount = getStatusCount(meta, ["cancelled", "canceled"]) - const normalizedStatus = String( - (state.enrichedRun as any)?.status ?? (state.rawRun as any)?.status ?? "", - ).toLowerCase() - const runMarkedError = - normalizedStatus === "error" || - normalizedStatus === "failed" || - normalizedStatus === "failure" - - const encounteredError = - errorCount > 0 || - runMarkedError || - !!state?.isError?.run || - !!state?.isError?.metrics || - !!state?.isError?.scenarios - - const hasOutcome = - total > 0 || - completed > 0 || - successCount > 0 || - errorCount > 0 || - cancelledCount > 0 || - runMarkedError || - !!state?.isError?.run || - !!state?.isError?.metrics || - !!state?.isError?.scenarios || - Array.isArray(state?.scenarios) - - if (hasOutcome) { - runsWithAnyOutcome += 1 - } - - if (encounteredError) { - hasAnyError = true - } - - if (successCount > 0) { - runsWithSuccess += 1 - } - }) - - return {runsWithAnyOutcome, runsWithSuccess, hasAnyError} - }, [runs]) - - const {runsWithAnyOutcome, runsWithSuccess, hasAnyError} = statusInsights - const shouldShowErrorCopy = runsWithAnyOutcome > 0 && hasAnyError && runsWithSuccess === 0 - - const buildPlaceholderCopy = useCallback( - ( - context: "timeSeries" | "chart" | "empty", - options?: {metricName?: string; evaluatorLabel?: string}, - ) => { - const rawMetricName = options?.metricName?.trim() - const metricName = rawMetricName && rawMetricName.length ? rawMetricName : undefined - const rawEvaluatorLabel = options?.evaluatorLabel?.trim() - const evaluatorLabel = - rawEvaluatorLabel && rawEvaluatorLabel.length ? rawEvaluatorLabel : undefined - const evaluatorDisplay = evaluatorLabel ?? "this evaluator" - - if (shouldShowErrorCopy) { - if (context === "timeSeries") { - const traceLabel = metricName ? `${metricName} traces` : "traces" - return { - title: `${metricName ?? "Metric"} traces unavailable`, - description: `All executions ended in errors${ - evaluatorLabel ? ` for ${evaluatorDisplay}` : "" - }. Resolve the failures and rerun to see ${traceLabel}.`, - } - } - if (context === "chart") { - const resultLabel = metricName ? `${metricName} results` : "metric results" - return { - title: `${metricName ?? "Metric"} results unavailable`, - description: `All scenarios ended in errors${ - evaluatorLabel ? ` for ${evaluatorDisplay}` : "" - }. Resolve the failures and rerun to see ${resultLabel}.`, - } - } - return { - title: - resolvedEvalType === "online" - ? "Traces ended in error" - : "Evaluations ended in error", - description: `Every run finished with errors. Resolve the issues and rerun to see ${ - resolvedEvalType === "online" ? "new traces" : "metrics" - }.`, - } - } - - if (context === "timeSeries") { - const traceLabel = metricName ?? "metric" - const resultLabel = metricName ? `${metricName} results` : "results" - return { - title: `Waiting for ${traceLabel} traces`, - description: `Generate traces with ${evaluatorDisplay} to start collecting ${resultLabel}.`, - } - } - - if (context === "chart") { - const metricLabel = metricName ?? "metric" - const distributionLabel = metricName - ? `${metricName} distribution data` - : "distribution data" - return { - title: `Waiting for ${metricLabel} results`, - description: `Annotate your scenarios with ${evaluatorDisplay} to start seeing ${distributionLabel}.`, - } - } - - return { - title: - resolvedEvalType === "online" - ? "Waiting for your traces" - : "Waiting for evaluation runs", - description: - resolvedEvalType === "online" - ? "Generate traces to start collecting results." - : "Run your prompt against testcases to start collecting metrics.", - } - }, - [resolvedEvalType, shouldShowErrorCopy], - ) - - const scaffoldItems = useMemo(() => { - if (hasMetrics) return [] - if (!evaluatorList.length) - return [ - { - id: "placeholder", - label: "Awaiting evaluators", - }, - ] - return evaluatorList.map((ev: any, idx: number) => ({ - id: ev?.slug || `evaluator-${idx}`, - label: ev?.name || ev?.slug || "Evaluator", - })) - }, [hasMetrics, evaluatorList]) - - const getEvaluatorLabel = (ev: any) => ev?.name || ev?.slug || "this evaluator" - - const placeholderCards = useMemo(() => { - if (!placeholderEvaluators.length) return [] - - return placeholderEvaluators.flatMap((evaluator, idx) => { - const evaluatorKey = evaluator?.slug || evaluator?.id || `placeholder-${idx}` - const label = getEvaluatorLabel(evaluator) - const slug = evaluator?.slug - const metricKeys = slug ? (schemaMetricNamesBySlug[slug] ?? []) : [] - const uniqueMetricKeys = metricKeys.length - ? Array.from(new Set(metricKeys)) - : ["__metrics_pending__"] - - return uniqueMetricKeys.map((metricKey, metricIdx) => { - const formattedName = - metricKey === "__metrics_pending__" - ? "Metrics pending" - : formatMetricName(metricKey) - const copy = - type === "online" - ? buildPlaceholderCopy("timeSeries", { - metricName: formattedName, - evaluatorLabel: label, - }) - : buildPlaceholderCopy("chart", { - metricName: formattedName, - evaluatorLabel: label, - }) - if (type === "online") { - return ( - <EvaluatorMetricsTimeSeriesChart - key={`placeholder-online-${evaluatorKey}-${metricKey}-${metricIdx}`} - className="w-full" - name={formattedName} - metricKey={metricKey === "__metrics_pending__" ? undefined : metricKey} - evaluator={evaluator as any} - isBoolean={false} - evaluationType="online" - series={[]} - placeholderTitle={copy.title} - placeholderDescription={copy.description} - /> - ) - } - return ( - <EvaluatorMetricsChart - key={`placeholder-${evaluatorKey}-${metricKey}-${metricIdx}`} - className="w-[calc(50%-0.3rem)] 2xl:w-[calc(33.33%-0.34rem)]" - name={formattedName} - metricKey={metricKey === "__metrics_pending__" ? undefined : metricKey} - metric={{}} - evaluator={evaluator as any} - isCompare={false} - averageRows={[]} - summaryRows={[]} - evaluationType={resolvedEvalType} - hasMetricData={false} - placeholderTitle={copy.title} - placeholderDescription={copy.description} - /> - ) - }) - }) - }, [ - buildPlaceholderCopy, - getEvaluatorLabel, - placeholderEvaluators, - resolvedEvalType, - schemaMetricNamesBySlug, - type, - ]) - - const emptyPlaceholder = useMemo(() => { - const copy = buildPlaceholderCopy("empty") - return ( - <div className="relative w-full overflow-hidden rounded-lg border border-dashed border-[#D0D5DD] bg-white"> - <div className="absolute inset-0 opacity-60"> - {resolvedEvalType === "online" ? ( - <PlaceholderTimeSeriesBackdrop /> - ) : ( - <SpiderChartPlaceholder className="h-full w-full" /> - )} - </div> - <PlaceholderOverlay className="px-8" evaluationType={resolvedEvalType}> - <div className="flex max-w-xl flex-col items-center gap-3 text-center"> - <span className="text-sm font-medium text-[#1D2939]">{copy.title}</span> - <span className="text-xs text-[#667085]">{copy.description}</span> - {scaffoldItems.length ? ( - <div className="flex flex-wrap justify-center gap-2 text-xs text-[#475467]"> - {scaffoldItems.map(({id, label}) => ( - <span - key={`metric-pill-${id}`} - className="rounded-full bg-[#EEF2FF] px-3 py-1 text-[#344054]" - > - {label} - </span> - ))} - </div> - ) : null} - </div> - </PlaceholderOverlay> - </div> - ) - }, [buildPlaceholderCopy, resolvedEvalType, scaffoldItems]) - - if (shouldShowMetricsSkeleton) { - return ( - <EvalRunOverviewViewerSkeleton - className={clsx({"px-6": evalType === "auto" || evalType === "custom"})} - /> - ) - } - - return ( - <> - <div className="px-6"> - <EvalRunScoreTable type={type} /> - </div> - - <div className="px-6 w-full flex flex-wrap gap-2"> - {hasMetrics ? ( - <> - {combinedMetricEntries - .filter( - (entry) => - entry.metric?.type !== "string" && - entry.metric?.type !== "json", - ) - .map(({fullKey, metric, evaluatorSlug, metricKey}, idx) => { - if (!metric || !Object.keys(metric || {}).length) return null - - const isBooleanMetric = - Array.isArray(metric?.unique) && metric.unique.length > 0 - const chartWidthClass = - type === "online" - ? "w-full" - : "w-[calc(50%-0.3rem)] 2xl:w-[calc(33.33%-0.34rem)]" - - if (type === "online") { - const resolveEntryTimestamp = (entry: any): number | null => { - const rawTs = entry?.timestamp ?? null - if (typeof rawTs === "number") { - return Number.isFinite(rawTs) ? rawTs : null - } - if (typeof rawTs === "string" && rawTs.length) { - const parsed = new Date(rawTs).getTime() - return Number.isFinite(parsed) ? parsed : null - } - if (rawTs instanceof Date) { - const time = rawTs.getTime() - return Number.isFinite(time) ? time : null - } - return null - } - - const timeSeries = allRunIds - .map((id, i) => { - const state = evalById[id] - const compareIdx = state?.compareIndex || i + 1 - const entries = rawMetricsLookup[id] || [] - if (!entries.length) return null - const timestampedEntries = entries.filter( - (entry: any) => - resolveEntryTimestamp(entry) !== null, - ) - if (!timestampedEntries.length) return null - - const points = timestampedEntries - .map((entry: any) => { - const ts = resolveEntryTimestamp(entry) - if (ts == null) return null - - const source = entry?.data || {} - const isPlainObject = ( - v: unknown, - ): v is Record<string, any> => - !!v && - typeof v === "object" && - !Array.isArray(v) - - const groupFlat: Record<string, any> = {} - Object.entries(source || {}).forEach( - ([groupKey, groupVal]) => { - if (isPlainObject(groupVal)) { - Object.entries(groupVal).forEach( - ([innerKey, innerVal]) => { - groupFlat[ - `${groupKey}.${innerKey}` - ] = innerVal - }, - ) - } - }, - ) - - let rawValue = getMetricValueWithAliases( - source, - fullKey, - ) - - if (rawValue === undefined) { - const matchKey = Object.keys( - groupFlat, - ).find( - (k) => - k === fullKey || - k.endsWith(`.${fullKey}`), - ) - if (matchKey) rawValue = groupFlat[matchKey] - } - if (rawValue === undefined) return null - - const resolved = - extractTimeSeriesValue(rawValue) - - if (!resolved) return null - const {value, isBoolean: valueIsBoolean} = - resolved - - const percentiles = (() => { - if ( - !rawValue || - typeof rawValue !== "object" - ) - return {} - const pcts = (rawValue as any).pcts - if (!pcts || typeof pcts !== "object") - return {} - const read = (key: string) => { - const v = (pcts as Record<string, any>)[ - key - ] - return typeof v === "number" && - Number.isFinite(v) - ? v - : undefined - } - return { - p25: read("p25") ?? read("P25"), - p50: read("p50") ?? read("P50"), - p75: read("p75") ?? read("P75"), - } - })() - - const scenarioCount = (() => { - let resolved: number | undefined - if ( - rawValue && - typeof rawValue === "object" - ) { - const countValue = (rawValue as any) - .count - const numericCount = Number(countValue) - if ( - Number.isFinite(numericCount) && - numericCount >= 0 - ) { - resolved = numericCount - } else { - const freq = Array.isArray( - (rawValue as any).frequency, - ) - ? (rawValue as any).frequency - : Array.isArray( - (rawValue as any).rank, - ) - ? (rawValue as any).rank - : undefined - if (freq) { - const total = freq.reduce( - (acc: number, item: any) => - acc + - Number( - item?.count ?? - item?.frequency ?? - 0, - ), - 0, - ) - if ( - Number.isFinite(total) && - total > 0 - ) { - resolved = total - } - } - } - } - if (resolved === undefined) { - const entryCount = Number(entry?.count) - if ( - Number.isFinite(entryCount) && - entryCount >= 0 - ) { - resolved = entryCount - } - } - if ( - resolved === undefined && - Array.isArray(entry?.scenario_ids) - ) { - resolved = entry.scenario_ids.length - } - if ( - resolved === undefined && - Array.isArray(entry?.scenarioIds) - ) { - resolved = entry.scenarioIds.length - } - return resolved - })() - - const histogram = (() => { - if ( - !rawValue || - typeof rawValue !== "object" - ) - return - const hist = (rawValue as any).hist - if (!Array.isArray(hist)) return - const bins = hist - .map((bin: any) => { - const interval = Array.isArray( - bin?.interval, - ) - ? bin.interval - : [] - const from = Number(interval?.[0]) - const to = Number(interval?.[1]) - let count = Number( - bin?.count ?? bin?.frequency, - ) - if ( - !Number.isFinite(from) || - !Number.isFinite(to) || - !Number.isFinite(count) - ) - return null - if ( - scenarioCount !== undefined && - scenarioCount > 1 && - count > 0 && - count <= 1 - ) { - count *= scenarioCount - } - return {from, to, count} - }) - .filter( - ( - bin, - ): bin is { - from: number - to: number - count: number - } => bin !== null, - ) - return bins.length ? bins : undefined - })() - - return { - timestamp: ts, - value, - isBoolean: valueIsBoolean, - scenarioCount, - p25: percentiles.p25, - p50: percentiles.p50, - p75: percentiles.p75, - histogram, - } - }) - .filter( - ( - point, - ): point is { - timestamp: number - value: number - isBoolean?: boolean - scenarioCount?: number - p25?: number - p50?: number - p75?: number - histogram?: { - from: number - to: number - count: number - }[] - } => point !== null, - ) - .sort((a, b) => a.timestamp - b.timestamp) - - if (!points.length) return null - - const containsBoolean = points.some((p) => p.isBoolean) - - return { - id, - name: - state?.enrichedRun?.name || - `Eval ${compareIdx}`, - color: (EVAL_COLOR as any)[compareIdx] || "#3B82F6", - points, - isBoolean: containsBoolean, - } - }) - .filter(Boolean) as { - id: string - name: string - color: string - points: { - timestamp: number - value: number - isBoolean?: boolean - scenarioCount?: number - p25?: number - p50?: number - p75?: number - histogram?: {from: number; to: number; count: number}[] - }[] - isBoolean?: boolean - }[] - - const isSeriesBoolean = - isBooleanMetric || - timeSeries.some((series) => series.isBoolean) - - if (timeSeries.length) { - const placeholderCopy = shouldShowErrorCopy - ? buildPlaceholderCopy("timeSeries", { - metricName: formatMetricName(metricKey), - evaluatorLabel: getEvaluatorLabel( - evaluatorsBySlug[evaluatorSlug], - ), - }) - : undefined - return ( - <EvaluatorMetricsTimeSeriesChart - key={`${metricKey}-${idx}`} - className={chartWidthClass} - name={formatMetricName(metricKey)} - metricKey={metricKey} - evaluator={evaluatorsBySlug[evaluatorSlug]} - isBoolean={isSeriesBoolean} - evaluationType={ - evalType === "online" - ? "online" - : evalType === "human" - ? "human" - : "auto" - } - series={timeSeries.map((series) => ({ - id: series.id, - name: series.name, - color: series.color, - points: series.points.map( - ({ - timestamp, - value, - scenarioCount, - p25, - p50, - p75, - histogram, - }) => ({ - timestamp, - value, - scenarioCount, - p25, - p50, - p75, - histogram, - }), - ), - }))} - placeholderTitle={placeholderCopy?.title} - placeholderDescription={ - placeholderCopy?.description - } - /> - ) - } - // fall through to histogram fallback when no time series data - } - - // Build comparison rows for this evaluator metric - const rowsWithMeta = isCompare - ? allRunIds.map((id, i) => { - const state = evalById[id] - const compareIdx = state?.compareIndex || i + 1 - const stats = metricsLookup[id] || {} - const m: any = getMetricValueWithAliases(stats, fullKey) - const hasMetric = !!m - let y = 0 - if (hasMetric) { - if (Array.isArray(m?.unique)) { - const trueEntry = ( - m?.frequency || - m?.rank || - [] - )?.find((f: any) => f?.value === true) - const total = m?.count ?? 0 - y = total - ? ((trueEntry?.count ?? 0) / total) * 100 - : 0 - } else if (typeof m?.mean === "number") { - y = m.mean - } - } - return { - id, - x: state?.enrichedRun?.name || `Eval ${compareIdx}`, - y, - hasMetric, - color: (EVAL_COLOR as any)[compareIdx] || "#3B82F6", - } - }) - : undefined - - const averageRows = rowsWithMeta - ?.filter((r) => r.hasMetric) - .map(({x, y, color}) => ({x, y, color})) - const summaryRows = rowsWithMeta?.map(({x, y, color}) => ({ - x, - y, - color, - })) - const hasMetricData = - rowsWithMeta?.some((row) => row.hasMetric) ?? false - - const placeholderCopy = shouldShowErrorCopy - ? buildPlaceholderCopy("chart", { - metricName: formatMetricName(metricKey), - evaluatorLabel: getEvaluatorLabel( - evaluatorsBySlug[evaluatorSlug], - ), - }) - : undefined - - return ( - <EvaluatorMetricsChart - key={`${metricKey}-${idx}`} - className={chartWidthClass} - name={formatMetricName(metricKey)} - metricKey={metricKey} - metric={metric} - evaluator={evaluatorsBySlug[evaluatorSlug]} - isCompare={isCompare} - averageRows={averageRows} - summaryRows={summaryRows} - evaluationType={ - evalType === "online" - ? "online" - : evalType === "human" - ? "human" - : "auto" - } - hasMetricData={hasMetricData} - placeholderTitle={placeholderCopy?.title} - placeholderDescription={placeholderCopy?.description} - /> - ) - })} - {placeholderCards.length ? placeholderCards : null} - </> - ) : placeholderCards.length ? ( - placeholderCards - ) : ( - emptyPlaceholder - )} - </div> - </> - ) -} - -export default memo(EvalRunOverviewViewer) diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioNavigator/index.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioNavigator/index.tsx deleted file mode 100644 index 108fdf7c04..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioNavigator/index.tsx +++ /dev/null @@ -1,308 +0,0 @@ -import {memo, ReactNode, useCallback, useEffect, useMemo, useState} from "react" - -import {message} from "@agenta/oss/src/components/AppMessageContext" -import {LeftOutlined, RightOutlined} from "@ant-design/icons" -import {Button, Input, Select, SelectProps} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import {loadable} from "jotai/utils" -import {useRouter} from "next/router" - -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {useRunId} from "@/oss/contexts/RunIdContext" -import useFocusInput from "@/oss/hooks/useFocusInput" -import {useEvalScenarioQueue} from "@/oss/lib/hooks/useEvalScenarioQueue" -import { - evalAtomStore, - // evaluationScenariosDisplayAtom, - getCurrentRunId, - scenarioStatusAtomFamily, - scenarioStatusFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import { - scenariosFamily, - displayedScenarioIdsFamily, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedScenarios" - -import {statusColorMap} from "../../HumanEvalRun/assets/helpers" -import EvalRunScenarioStatusTag from "../EvalRunScenarioStatusTag" - -const EvalRunScenarioNavigator = ({ - activeId, - className, - showOnlySelect = false, - querySelectorName = "scenarioId", - selectProps, - showStatus = true, - runId: propRunId, -}: { - activeId: string - className?: string - showOnlySelect?: boolean - querySelectorName?: string - selectProps?: SelectProps - showStatus?: boolean - runId?: string -}) => { - const router = useRouter() - const runId = useRunId() - const evalType = useAtomValue(evalTypeAtom) - const isOnlineEval = evalType === "online" - const labelPrefix = isOnlineEval ? "Scenario" : "Testcase" - - // Get effective runId - use provided runId or fallback to current run context - const effectiveRunId = useMemo(() => { - if (propRunId) return propRunId - if (runId) return runId - try { - return getCurrentRunId() - } catch (error) { - return "" - } - }, [runId, propRunId]) - - // Get full scenario objects so we can access stable scenarioIndex - // Read from the same global store that writes are going to - const allScenarios = useAtomValue(scenariosFamily(effectiveRunId)) ?? [] - - // Get filtered scenario IDs from the displayedScenarioIdsFamily atom - const filteredScenarioIds = useAtomValue(displayedScenarioIdsFamily(effectiveRunId)) ?? [] - - // states for select dropdown - const [searchTerm, setSearchTerm] = useState("") - const [isOpenSelect, setIsOpenSelect] = useState(false) - const {inputRef} = useFocusInput({isOpen: isOpenSelect}) - - // When user selects a scenario, update the URL - const handleSelect = useCallback( - (newId: string) => { - if (router.query[querySelectorName] !== newId) { - router.replace( - { - pathname: router.pathname, - query: {...router.query, [querySelectorName]: newId}, - }, - undefined, - {shallow: false}, - ) - } - }, - [router, querySelectorName], - ) - - // Create a map for quick lookup of scenario objects by ID - const scenarioMap = useMemo(() => { - const map = new Map() - allScenarios.forEach((scenario) => { - map.set(scenario.id || scenario._id, scenario) - }) - return map - }, [allScenarios]) - - // Get filtered scenarios with search term applied - const _scenarios = useMemo(() => { - const list = filteredScenarioIds - .map((id) => scenarioMap.get(id)) - .filter((scenario) => scenario) // Remove any undefined scenarios - .filter((scenario) => - scenario.scenarioIndex - ? scenario.scenarioIndex.toString().includes(searchTerm) - : true, - ) - - return list - }, [searchTerm, filteredScenarioIds, scenarioMap]) - - const scenarioIds = _scenarios.map((s) => s.id || s._id) - - const handlePrevNext = useCallback( - (direction: -1 | 1) => { - if (!activeId) return - const idx = scenarioIds.indexOf(activeId) - const newIdx = idx + direction - if (newIdx < 0 || newIdx >= scenarioIds.length) return - handleSelect(scenarioIds[newIdx]) - }, - [activeId, scenarioIds, handleSelect], - ) - - const prevDisabled = scenarioIds.indexOf(activeId) <= 0 - const nextDisabled = scenarioIds.indexOf(activeId) >= scenarioIds.length - 1 - - // Keyboard shortcuts: Left/Right for navigation, Meta+Enter/Ctrl+Enter for Run - const {enqueueScenario} = useEvalScenarioQueue({concurrency: 5}) - const status = useAtomValue( - useMemo( - () => scenarioStatusAtomFamily({scenarioId: activeId, runId: effectiveRunId}), - [activeId, effectiveRunId], - ), - ) as any - const rawStatus = status?.status - const isRunning = ["running", "EVALUATION_STARTED"].includes(rawStatus as string) - const isDone = [ - "done", - "success", - "EVALUATION_FINISHED", - "EVALUATION_FINISHED_WITH_ERRORS", - ].includes(rawStatus as string) - - useEffect(() => { - if (showOnlySelect) return - const onKeyDown = (e: KeyboardEvent) => { - if (e.target && (e.target as HTMLElement).tagName === "INPUT") return // don't hijack input fields - if (e.key === "ArrowLeft" && !prevDisabled) { - handlePrevNext(-1) - e.preventDefault() - } else if (e.key === "ArrowRight" && !nextDisabled) { - handlePrevNext(1) - e.preventDefault() - } else if ((e.metaKey || e.ctrlKey) && e.key === "Enter") { - // Access invocationParameters inline from atom store - const stepLoadable = evalAtomStore().get( - loadable(scenarioStepFamily({runId: effectiveRunId, scenarioId: activeId})), - ) - const hasInvocationParams = - stepLoadable.state === "hasData" && - stepLoadable.data?.invocationSteps?.some((st: any) => st.invocationParameters) - if (!isRunning && !isDone && hasInvocationParams && activeId) { - enqueueScenario(activeId) - } else if (!hasInvocationParams) { - message.success("This scenario has already been ran before") - } - } - } - window.addEventListener("keydown", onKeyDown) - return () => window.removeEventListener("keydown", onKeyDown) - }, [ - handlePrevNext, - prevDisabled, - nextDisabled, - activeId, - isRunning, - isDone, - enqueueScenario, - showOnlySelect, - ]) - - return ( - <section className={clsx("w-full flex items-center justify-between gap-2", className)}> - {!showOnlySelect && ( - <Button - icon={<LeftOutlined />} - onClick={() => handlePrevNext(-1)} - disabled={prevDisabled} - onKeyDown={(e) => { - if (e.key === "ArrowLeft") { - handlePrevNext(-1) - } - }} - > - Prev - </Button> - )} - <div className="relative"> - <Select - open={isOpenSelect} - onOpenChange={(open) => { - setIsOpenSelect(open) - setSearchTerm("") - }} - value={activeId} - style={{minWidth: 250}} - onChange={(value) => handleSelect(value as string)} - optionLabelProp="label" - classNames={{popup: {root: "!p-0"}}} - popupRender={(menu: ReactNode) => ( - <div className="flex flex-col gap-1"> - <div className="flex items-center justify-between border-0 border-b border-solid border-[#f0f0f0] pr-1"> - <Input - ref={inputRef} - placeholder="Number" - variant="borderless" - className="rounded-none py-2" - value={searchTerm} - onChange={(e) => setSearchTerm(e.target.value)} - /> - <Button - disabled={!searchTerm} - onClick={() => { - handleSelect( - _scenarios.find( - (s) => s.scenarioIndex === Number(searchTerm), - )?.id as string, - ) - setIsOpenSelect(false) - }} - > - Go - </Button> - </div> - - <div className="px-1 pb-1">{menu}</div> - </div> - )} - {...selectProps} - > - {_scenarios.map((scenario) => { - const {id, scenarioIndex} = scenario as any - - // non-hook read; never suspends - const loadableStatus = evalAtomStore().get( - loadable(scenarioStatusFamily({scenarioId: id, runId: effectiveRunId})), - ) - const scenStatus = - loadableStatus.state === "hasData" - ? loadableStatus.data - : {status: "pending", label: "Pending"} - - const colorClass = statusColorMap[scenStatus.status] - const labelIndex = scenarioIndex ?? scenarioIds.indexOf(id) + 1 - - return ( - <Select.Option - key={id} - value={id} - label={`${labelPrefix}: ${labelIndex}`} - > - <div className="flex items-center justify-between w-full"> - <span> - {labelPrefix} {labelIndex} - </span> - <span className={clsx(colorClass)}>{scenStatus.status}</span> - </div> - </Select.Option> - ) - })} - </Select> - - {activeId && showStatus ? ( - <EvalRunScenarioStatusTag - scenarioId={activeId} - className="absolute right-8 top-1" - showAsTag={false} - runId={effectiveRunId} - /> - ) : null} - </div> - - {!showOnlySelect && ( - <Button - icon={<RightOutlined />} - iconPosition="end" - onClick={() => handlePrevNext(1)} - disabled={nextDisabled} - onKeyDown={(e) => { - if (e.key === "ArrowRight") { - handlePrevNext(1) - } - }} - > - Next - </Button> - )} - </section> - ) -} - -export default memo(EvalRunScenarioNavigator) diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/assets/index.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/assets/index.tsx deleted file mode 100644 index 2b87a19431..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/assets/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -export const STATUS_COLOR: Record<string, string> = { - success: "success", - done: "success", - failure: "error", - failed: "error", - EVALUATION_FAILED: "error", - EVALUATION_FINISHED_WITH_ERRORS: "warning", - cancelled: "warning", - EVALUATION_AGGREGATION_FAILED: "warning", - pending: "default", - EVALUATION_INITIALIZED: "default", - running: "blue", - incomplete: "blue", - EVALUATION_STARTED: "blue", - revalidating: "purple", -} - -export const STATUS_COLOR_TEXT: Record<string, string> = { - success: "text-green-600", - done: "text-green-600", - failure: "text-red-500", - failed: "text-red-500", - EVALUATION_FAILED: "text-red-500", - EVALUATION_FINISHED_WITH_ERRORS: "text-orange-500", - cancelled: "text-yellow-500", - EVALUATION_AGGREGATION_FAILED: "text-orange-500", - pending: "text-gray-400", - EVALUATION_INITIALIZED: "text-gray-400", - running: "text-blue-500", - EVALUATION_STARTED: "text-blue-500", - revalidating: "text-purple-500", -} diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/index.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/index.tsx deleted file mode 100644 index 365c6cbe47..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunScenarioStatusTag/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import {memo, useMemo} from "react" - -import {Tag} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import {loadable} from "jotai/utils" - -import {getStatusLabel} from "@/oss/lib/constants/statusLabels" -import {scenarioStatusFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" - -import {STATUS_COLOR, STATUS_COLOR_TEXT} from "./assets" -/** - * Component to display the status of an evaluation scenario as a Tag. - * - * Retrieves the optimistic scenario overrides for the given scenarioId, - * and uses them to show transient UI-only states like "annotating" or - * "revalidating" if the backend has not yet been updated. - * - * @param scenarioId The ID of the scenario to display the status for. - * @returns A Tag component displaying the status of the scenario. - */ -interface EvalRunScenarioStatusTagProps { - scenarioId: string - runId: string - className?: string - showAsTag?: boolean -} - -const EvalRunScenarioStatusTag = ({ - scenarioId, - runId, - className, - showAsTag = true, -}: EvalRunScenarioStatusTagProps) => { - /** - * Loadable atom wrapping scenarioStatusFamily, which provides the most - * up-to-date status for the given scenarioId. This can be either a status - * that is being optimistically updated, or the latest status update from - * the backend. - * - * @type {import("jotai/utils").Loadable<ScenarioStatusMap | null>} - */ - const statusLoadable = useAtomValue( - useMemo(() => loadable(scenarioStatusFamily({scenarioId, runId})), [scenarioId, runId]), - ) - const scenarioStatus = statusLoadable.state === "hasData" ? statusLoadable.data : undefined - const status = (scenarioStatus?.status as string) || "pending" - const label = getStatusLabel(status) - - return showAsTag ? ( - <Tag className={className} color={STATUS_COLOR[status]}> - {label} - </Tag> - ) : ( - <span className={clsx(STATUS_COLOR_TEXT[status] ?? "text-blue-500", className)}> - {label} - </span> - ) -} - -export default memo(EvalRunScenarioStatusTag) diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/assets/constants.ts b/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/assets/constants.ts deleted file mode 100644 index d24203d677..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/assets/constants.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Feature flag to toggle prototype card (list) view -export const ENABLE_CARD_VIEW = process.env.NEXT_PUBLIC_ENABLE_EVAL_CARD_VIEW === "true" - -export const VIEW_HUMAN_OPTIONS = (() => { - const base = [ - {label: "Focus view", value: "focus"}, - {label: "Table view", value: "table"}, - {label: "Results view", value: "results"}, - ] - if (ENABLE_CARD_VIEW) { - base.splice(1, 0, {label: "Card view", value: "list"}) - } - return base -})() - -export const VIEW_AUTO_OPTIONS = [ - {label: "Overview", value: "overview"}, - {label: "Testcases", value: "testcases"}, - {label: "Prompt configuration", value: "prompt"}, -] - -export const VIEW_ONLINE_OPTIONS = [ - {label: "Overview", value: "overview"}, - {label: "Results", value: "results"}, - {label: "Configuration", value: "configuration"}, -] diff --git a/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/index.tsx b/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/index.tsx deleted file mode 100644 index 8f34b80915..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/EvalRunScenariosViewSelector/index.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import {memo, useTransition} from "react" - -import {Radio} from "antd" -import {useAtomValue} from "jotai" -import {useRouter} from "next/router" - -import {evalTypeAtom} from "../../state/evalType" -import {runViewTypeAtom} from "../../state/urlState" - -import { - ENABLE_CARD_VIEW, - VIEW_HUMAN_OPTIONS, - VIEW_AUTO_OPTIONS, - VIEW_ONLINE_OPTIONS, -} from "./assets/constants" - -const EvalRunScenariosViewSelector = () => { - const evalType = useAtomValue(evalTypeAtom) - // Read from the same global store that writes are going to - const viewType = useAtomValue(runViewTypeAtom) - const [_isPending, startTransition] = useTransition() - - const router = useRouter() - - // Sync local atom from urlStateAtom changes - return ( - <div className="flex items-center gap-2 shrink-0"> - <Radio.Group - onChange={(e) => { - const v = e.target.value as - | "focus" - | "list" - | "table" - | "overview" - | "testcases" - | "prompt" - | "results" - | "configuration" - startTransition(() => { - // Update router query so UrlSync can mirror it into atoms - const nextQuery: Record<string, any> = {...router.query, view: v} - if (v !== "focus") { - delete nextQuery.scenarioId - } - router.replace({pathname: router.pathname, query: nextQuery}, undefined, { - shallow: true, - }) - }) - }} - defaultValue={evalType === "online" ? "results" : "focus"} - value={ENABLE_CARD_VIEW ? viewType : viewType === "list" ? "focus" : viewType} - > - {(evalType === "human" - ? VIEW_HUMAN_OPTIONS - : evalType === "online" - ? VIEW_ONLINE_OPTIONS - : VIEW_AUTO_OPTIONS - ).map((option) => ( - <Radio.Button - key={option.value} - value={option.value} - disabled={option.disabled} - > - {option.label} - </Radio.Button> - ))} - </Radio.Group> - </div> - ) -} - -export default memo(EvalRunScenariosViewSelector) diff --git a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataButton.tsx b/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataButton.tsx deleted file mode 100644 index d7b20242eb..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataButton.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import {cloneElement, isValidElement, memo, MouseEvent, useState} from "react" - -import {ArrowSquareOut, Database} from "@phosphor-icons/react" -import dynamic from "next/dynamic" - -import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" - -import {SaveDataButtonProps} from "./types" - -const SaveDataModal = dynamic(() => import(".."), {ssr: false}) - -const SaveDataButton = ({ - name, - rows, - exportDataset = false, - icon = true, - children, - label, - onClick, - ...props -}: SaveDataButtonProps) => { - const [isModalOpen, setIsModalOpen] = useState(false) - - return ( - <> - {isValidElement(children) ? ( - cloneElement( - children as React.ReactElement<{ - onClick: (e: MouseEvent<HTMLElement>) => void - }>, - { - onClick: (e) => { - onClick?.(e) - setIsModalOpen(true) - }, - }, - ) - ) : ( - <EnhancedButton - type="default" - icon={ - icon && - (exportDataset ? <ArrowSquareOut size={14} /> : <Database size={14} />) - } - onClick={async (e) => { - await onClick?.(e) - setIsModalOpen(true) - }} - label={label} - {...props} - /> - )} - - <SaveDataModal - name={name} - rows={rows} - exportDataset={exportDataset} - open={isModalOpen && !!rows.length} - onCancel={() => setIsModalOpen(false)} - /> - </> - ) -} - -export default memo(SaveDataButton) diff --git a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataModalContent.tsx b/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataModalContent.tsx deleted file mode 100644 index c3d8d8730c..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/SaveDataModalContent.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import {useMemo} from "react" - -import {Input, Select, Typography} from "antd" - -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" -import useFocusInput from "@/oss/hooks/useFocusInput" - -import {SaveDataModalContentProps} from "./types" - -const SaveDataModalContent = ({ - rows, - rowKeys, - exportDataset, - name, - setName, - isOpen, - selectedColumns, - setSelectedColumns, -}: SaveDataModalContentProps) => { - const {inputRef} = useFocusInput({isOpen}) - - const columns = useMemo(() => { - if (selectedColumns.length === 0) { - return [{title: "-", dataIndex: "-"}] - } - return selectedColumns.map((key) => ({ - title: key, - dataIndex: key, - width: 150, - ellipsis: true, - })) - }, [selectedColumns]) - - const options = useMemo(() => { - return rowKeys.map((key) => ({label: key, value: key})) - }, [rowKeys]) - - return ( - <section className="flex flex-col gap-4 my-5"> - <div className="flex flex-col gap-1"> - <Typography.Text type="secondary"> - {exportDataset ? "File name" : "Testset name"} - </Typography.Text> - <Input - ref={inputRef} - placeholder="Name" - onChange={(e) => setName(e.target.value)} - value={name} - /> - </div> - - <div className="flex flex-col gap-1"> - <Typography.Text type="secondary">Columns</Typography.Text> - <Select - mode="multiple" - allowClear - style={{width: "100%"}} - placeholder="Please select" - defaultValue={rowKeys} - value={selectedColumns} - onChange={setSelectedColumns} - options={options} - /> - </div> - - <div className="flex flex-col gap-1"> - <Typography.Text type="secondary">Preview</Typography.Text> - <EnhancedTable - dataSource={rows.slice(0, rows.length > 3 ? 3 : rows.length)} - columns={columns} - size="small" - bordered - pagination={false} - scroll={{x: "max-content"}} - virtualized - /> - </div> - </section> - ) -} - -export default SaveDataModalContent diff --git a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/types.ts b/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/types.ts deleted file mode 100644 index c68d8a5cbc..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/assets/types.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {ModalProps} from "antd" - -import {TooltipButtonProps} from "@/oss/components/Playground/assets/EnhancedButton" -import {EvaluationFlow, EvaluationScenario} from "@/oss/lib/Types" - -export interface EvaluationRow extends EvaluationScenario, Record<string, string> { - evaluationFlow: EvaluationFlow -} - -export interface SaveDataModalProps extends ModalProps { - rows: EvaluationRow[] - exportDataset?: boolean - name?: string -} - -export interface SaveDataModalContentProps { - rows: EvaluationRow[] - rowKeys: string[] - exportDataset?: boolean - name: string - setName: React.Dispatch<React.SetStateAction<string>> - isOpen: boolean - selectedColumns: string[] - setSelectedColumns: React.Dispatch<React.SetStateAction<string[]>> -} - -export interface SaveDataButtonProps extends TooltipButtonProps { - rows: EvaluationRow[] - exportDataset?: boolean - name?: string - icon?: boolean - children?: React.ReactNode - label?: string -} diff --git a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/index.tsx b/web/oss/src/components/EvalRunDetails/components/SaveDataModal/index.tsx deleted file mode 100644 index b3c13a3c81..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/SaveDataModal/index.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import {useCallback, useEffect, useState} from "react" - -import {message} from "antd" -import dynamic from "next/dynamic" - -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" -import {convertToCsv, downloadCsv} from "@/oss/lib/helpers/fileManipulations" -import {createNewTestset} from "@/oss/services/testsets/api" - -import {SaveDataModalProps} from "./assets/types" - -const SaveDataModalContent = dynamic(() => import("./assets/SaveDataModalContent"), {ssr: false}) - -const SaveDataModal = ({rows, exportDataset = false, name, ...props}: SaveDataModalProps) => { - const [submitLoading, setSubmitLoading] = useState(false) - const [_name, setName] = useState(name || "") - const [selectedColumns, setSelectedColumns] = useState<string[]>([]) - - const getKeys = useCallback(() => { - const keys = new Set<string>() - rows.forEach((row) => { - Object.keys(row).forEach((key) => keys.add(key)) - }) - return Array.from(keys) - }, [rows]) - - useEffect(() => { - setName(name || "") - setSelectedColumns(getKeys()) - }, [rows, name]) - - const reset = useCallback(() => { - setName("") - setSelectedColumns([]) - setSubmitLoading(false) - }, []) - - const onClose = useCallback(() => { - reset() - props.onCancel?.({} as any) - }, [props]) - - const onSaveTestset = useCallback(async () => { - try { - setSubmitLoading(true) - - const filteredRows = rows.map((row) => { - const filteredRow: any = {} - Object.keys(row).forEach((key) => { - if (selectedColumns.includes(key)) { - filteredRow[key] = row[key] - } - }) - return filteredRow - }) - - await createNewTestset(_name, filteredRows) - - message.success("Testset created successfully!") - onClose() - } catch (error) { - console.error("Error creating testset:", error) - message.error("Failed to create testset. Please try again!") - } finally { - setSubmitLoading(false) - } - }, [rows, _name, selectedColumns, onClose]) - - const onExportResults = useCallback(async () => { - try { - setSubmitLoading(true) - const filteredRows = rows.map((row) => { - const filteredRow: any = {} - Object.keys(row).forEach((key) => { - if (selectedColumns.includes(key)) { - filteredRow[key] = row[key] - } - }) - return filteredRow - }) - - const csvData = convertToCsv(filteredRows, selectedColumns) - downloadCsv(csvData, _name) - message.success("Results exported successfully!") - onClose() - } catch (error) { - console.error("Error exporting results:", error) - message.error("Error exporting results") - } finally { - setSubmitLoading(false) - } - }, [rows, selectedColumns, onClose, _name]) - - return ( - <EnhancedModal - title={exportDataset ? "Export Results" : "Add new testset"} - okText={exportDataset ? "Export" : "Create"} - onOk={exportDataset ? onExportResults : onSaveTestset} - confirmLoading={submitLoading} - okButtonProps={{disabled: !_name || !selectedColumns.length}} - onCancel={onClose} - afterClose={reset} - {...props} - > - <SaveDataModalContent - rows={rows} - rowKeys={getKeys()} - name={_name} - setName={setName} - isOpen={props.open as boolean} - selectedColumns={selectedColumns} - setSelectedColumns={setSelectedColumns} - exportDataset={exportDataset} - /> - </EnhancedModal> - ) -} - -export default SaveDataModal diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ComparisonScenarioTable.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ComparisonScenarioTable.tsx deleted file mode 100644 index d2907fe44a..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ComparisonScenarioTable.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import {RefObject, useEffect, useMemo} from "react" - -import {DownOutlined} from "@ant-design/icons" -import clsx from "clsx" -import {atom, useAtom, useAtomValue} from "jotai" -import {useResizeObserver} from "usehooks-ts" - -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" -import {useRunId} from "@/oss/contexts/RunIdContext" - -import {EVAL_BG_COLOR} from "../../AutoEvalRun/assets/utils" -import {EvalRunTestcaseTableSkeleton} from "../../AutoEvalRun/components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton" -import {urlStateAtom} from "../../state/urlState" - -import useExpandableComparisonDataSource from "./hooks/useExpandableComparisonDataSource" -import useScrollToScenario from "./hooks/useScrollToScenario" - -export const expendedRowAtom = atom<Record<string, boolean>>({}) - -const ComparisonTable = () => { - const baseRunId = useRunId() - const urlState = useAtomValue(urlStateAtom) - const [expendedRows, setExpendedRows] = useAtom(expendedRowAtom) - const comparisonRunIds = urlState.compare || [] - - // Use the new expandable comparison data source - const { - antColumns: columns, - rows: dataSource, - loading, - } = useExpandableComparisonDataSource({ - baseRunId, - comparisonRunIds, - }) - - const expandedRowKeys = useMemo( - () => Object.keys(expendedRows).filter((key) => expendedRows[key]), - [expendedRows], - ) - - useEffect(() => { - if (!dataSource?.length) return - - setExpendedRows((prev) => { - const next = {...prev} - let changed = false - const availableKeys = new Set<string>() - - dataSource.forEach((row: any) => { - if (!row?.key) return - availableKeys.add(row.key) - - if (row.children?.length && prev[row.key] === undefined) { - next[row.key] = true - changed = true - } - }) - - Object.keys(next).forEach((key) => { - if (!availableKeys.has(key)) { - delete next[key] - changed = true - } - }) - - return changed ? next : prev - }) - }, [dataSource]) - - const {tableContainerRef, tableInstance} = useScrollToScenario({ - dataSource, - expandedRowKeys, - }) - - const {height: scrollY} = useResizeObserver({ - ref: tableContainerRef as RefObject<HTMLElement>, - box: "border-box", - }) - - if (!baseRunId || !comparisonRunIds.length) { - return ( - <div className="p-4"> - <div className="text-center text-gray-500">Please select runs to compare</div> - </div> - ) - } - - if (loading || !EnhancedTable) { - return <EvalRunTestcaseTableSkeleton /> - } - - return ( - <div className="h-full flex flex-col min-h-0"> - <div ref={tableContainerRef} className="flex-1 overflow-hidden min-h-0"> - <EnhancedTable - ref={tableInstance} - uniqueKey="scenario-table" - columns={columns} - dataSource={dataSource} - scroll={{x: "max-content", y: scrollY - 45}} - size="small" - virtualized - rowKey={(record: any) => record.key || record.scenarioId} - className="comparison-table agenta-scenario-table" - addNotAvailableCell={false} - skeletonRowCount={0} - loading={false} - tableLayout="fixed" - onRow={(record) => ({ - style: - (record?.colorIndex ?? record?.compareIndex) - ? { - background: - EVAL_BG_COLOR[record.colorIndex || record.compareIndex], - } - : undefined, - onClick: (event) => { - const target = event.target as HTMLElement - const isFirstCell = target.closest(".scenario-index-row-cell") - - if (isFirstCell && record.children?.length > 0) { - const isExpanded = expendedRows[record.key] - if (isExpanded) { - setExpendedRows((prev) => ({ - ...prev, - [record.key]: false, - })) - } else { - setExpendedRows((prev) => ({ - ...prev, - [record.key]: true, - })) - } - } - }, - })} - expandable={{ - expandedRowKeys, - rowExpandable: (record: any) => record.children?.length > 0, - expandRowByClick: false, - expandedRowOffset: 1, - showExpandColumn: true, // Hide default expand column since we have custom one - indentSize: 0, - expandIcon: ({expanded, record, ...rest}) => { - if (!columns.find((col) => col.key === "#")?.key) return null - const showIndex = !record.isComparison - return ( - <div className="w-full h-full flex items-start gap-2 cursor-pointer bg-[#fafafa] p-2 scenario-index-row-cell"> - {showIndex && <span>{record.scenarioIndex}</span>} - {record.children?.length > 0 ? ( - <div className="w-5 h-5 rounded-sm bg-white flex items-center justify-center"> - <DownOutlined - className={clsx( - "inline-block transition-transform duration-300", - { - "-rotate-90": !expanded, - }, - )} - /> - </div> - ) : null} - </div> - ) - }, - }} - /> - </div> - </div> - ) -} - -export default ComparisonTable diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ScenarioTable.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ScenarioTable.tsx deleted file mode 100644 index 1291ddaaec..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/ScenarioTable.tsx +++ /dev/null @@ -1,257 +0,0 @@ -import {memo, useCallback, useEffect, useMemo, useState} from "react" - -import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" -import {useResizeObserver} from "usehooks-ts" - -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import QueryFiltersSummaryCard from "@/oss/components/pages/evaluations/onlineEvaluation/components/QueryFiltersSummaryCard" -import {useRunId} from "@/oss/contexts/RunIdContext" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import { - evalAtomStore, - evaluationRunStateFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {useAppNavigation, useAppState} from "@/oss/state/appState" - -import { - retrieveQueryRevision, - type QueryFilteringPayload, - type QueryWindowingPayload, -} from "../../../../services/onlineEvaluations/api" -import {EvalRunTestcaseTableSkeleton} from "../../AutoEvalRun/components/EvalRunTestcaseViewer/assets/EvalRunTestcaseViewerSkeleton" - -import useScrollToScenario from "./hooks/useScrollToScenario" -import useTableDataSource from "./hooks/useTableDataSource" -import type {TableRow} from "./types" - -const VirtualizedScenarioTableAnnotateDrawer = dynamic( - () => import("./assets/VirtualizedScenarioTableAnnotateDrawer"), - {ssr: false}, -) - -const ScenarioTable = ({runId: propRunId}: {runId?: string}) => { - // Data sources - use prop runId if provided, otherwise fall back to context - const contextRunId = useRunId() - const runId = propRunId || contextRunId - const {antColumns, rows, isLoadingSteps} = useTableDataSource() - const hasRows = rows.length > 0 - const store = evalAtomStore() - const evaluationState = useAtomValue(evaluationRunStateFamily(runId!), {store}) as any - const evalType = useAtomValue(evalTypeAtom) - const navigation = useAppNavigation() - const appState = useAppState() - - const runIndex = evaluationState?.runIndex - const queryRef = useMemo(() => { - const steps: Record<string, any> = runIndex?.steps || {} - for (const meta of Object.values(steps)) { - const refs = (meta as any)?.refs || {} - if (refs?.query?.id) return {id: refs.query.id} - if (refs?.query_revision?.id) return {revisionId: refs.query_revision.id} - } - return undefined - }, [runIndex?.steps]) - - const [filtering, setFiltering] = useState<QueryFilteringPayload | null | undefined>(undefined) - const [windowing, setWindowing] = useState<QueryWindowingPayload | null | undefined>(undefined) - const [filtersLoading, setFiltersLoading] = useState<boolean>(false) - const [queryCreatedAt, setQueryCreatedAt] = useState<string | number | null>(null) - - const resolveTimestamp = ( - ...values: (string | number | null | undefined)[] - ): string | number | null => { - for (const value of values) { - if (!value) continue - const parsed = dayjs(value) - if (parsed.isValid()) return value - } - return null - } - - useEffect(() => { - let mounted = true - ;(async () => { - try { - setFiltersLoading(true) - if (!queryRef?.id) { - if (mounted) setFiltering(null) - if (mounted) setWindowing(null) - if (mounted) setQueryCreatedAt(null) - if (mounted) setFiltersLoading(false) - return - } - const res = await retrieveQueryRevision({query_ref: {id: queryRef.id}}) - if (mounted) { - const data = (res?.query_revision?.data as any) ?? {} - setFiltering(data?.filtering ?? null) - setWindowing(data?.windowing ?? null) - setQueryCreatedAt( - resolveTimestamp( - (res?.query_revision as any)?.created_at, - (res?.query_revision as any)?.createdAt, - (res?.query_revision as any)?.createdAtTimestamp, - (res?.query_revision?.meta as any)?.created_at, - (res?.query_revision?.meta as any)?.createdAt, - ), - ) - } - } catch { - if (mounted) { - setFiltering(null) - setWindowing(null) - setQueryCreatedAt(null) - } - } finally { - if (mounted) setFiltersLoading(false) - } - })() - return () => { - mounted = false - } - }, [queryRef?.id]) - - const runCreatedAt = useMemo( - () => - resolveTimestamp( - queryCreatedAt, - (evaluationState?.rawRun as any)?.created_at, - (evaluationState?.rawRun as any)?.createdAt, - (evaluationState?.rawRun as any)?.createdAtTimestamp, - (evaluationState?.enrichedRun as any)?.created_at, - (evaluationState?.enrichedRun as any)?.createdAt, - (evaluationState?.enrichedRun as any)?.createdAtTimestamp, - ), - [queryCreatedAt, evaluationState], - ) - - const {tableContainerRef, tableInstance} = useScrollToScenario({ - dataSource: rows, - }) - - const {height: scrollY} = useResizeObserver({ - ref: tableContainerRef, - box: "border-box", - }) - - const emptyTableContent = useMemo(() => { - const isOnline = evalType === "online" - return ( - <div className="flex w-full flex-col items-center justify-center gap-6 py-10 px-6 text-center"> - <div className="flex flex-col gap-2 max-w-xl text-[#475467]"> - <span className="text-base font-semibold text-[#1D2939]"> - {isOnline ? "No traces captured yet" : "No scenarios found"} - </span> - {isOnline && ( - <span className="text-sm text-[#98A2B3]"> - No traces matched the current query yet. This view updates automatically - as new requests match your filters. - </span> - )} - </div> - {isOnline && ( - <div className="w-full max-w-lg"> - <QueryFiltersSummaryCard - filtering={filtering ?? null} - windowing={windowing ?? null} - loading={filtersLoading} - createdAt={runCreatedAt} - /> - </div> - )} - </div> - ) - }, [evalType, filtering, filtersLoading, runCreatedAt, windowing]) - - const tableScrollY = useMemo(() => { - if (!scrollY) return undefined - const computed = scrollY - 45 - return Number.isFinite(computed) && computed > 0 ? computed : undefined - }, [scrollY]) - - const handleRowFocus = useCallback( - (record: TableRow, event: React.MouseEvent) => { - if (evalType !== "auto" && evalType !== "online" && evalType !== "custom") return - - // Ignore clicks originating from interactive elements inside the row - const interactiveTarget = (event.target as HTMLElement | null)?.closest( - "button, a, [role='button'], .ant-btn", - ) - if (interactiveTarget) return - - const scenarioId = record?.scenarioId || record?.key - const targetRunId = (record as any)?.runId || runId - if (!scenarioId || !targetRunId) return - - const currentScenario = appState.query?.focusScenarioId - const currentRun = appState.query?.focusRunId - const scenarioMatches = Array.isArray(currentScenario) - ? currentScenario[0] === scenarioId - : currentScenario === scenarioId - const runMatches = Array.isArray(currentRun) - ? currentRun[0] === targetRunId - : currentRun === targetRunId - - if (scenarioMatches && runMatches) return - - navigation.patchQuery( - { - focusScenarioId: scenarioId, - focusRunId: targetRunId, - }, - {shallow: true}, - ) - }, - [appState.query?.focusRunId, appState.query?.focusScenarioId, evalType, navigation, runId], - ) - - if (isLoadingSteps && !hasRows) { - return <EvalRunTestcaseTableSkeleton /> - } - - return ( - <div ref={tableContainerRef} className="grow flex flex-col w-full min-h-0"> - <div - className={clsx([ - "relative w-full flex-1 min-h-0", - { - "px-6": evalType === "online", - }, - ])} - > - <EnhancedTable - uniqueKey="scenario-table" - columns={antColumns as any} - dataSource={rows} - scroll={{x: "max-content", y: scrollY - 45}} - size="small" - virtualized - rowKey={(record: any) => record.key || record.scenarioId} - className="agenta-scenario-table" - rowClassName={(record: any) => - clsx( - "scenario-row", - record?.temporalGroupIndex % 2 === 0 ? "bg-slate-50" : "bg-white", - record?.isTemporalGroupStart && - "border-t border-slate-200 first:border-t-0", - ) - } - tableLayout="fixed" - skeletonRowCount={0} - loading={false} - locale={{emptyText: emptyTableContent}} - ref={tableInstance} - onRow={(record: any) => ({ - onClick: (event) => handleRowFocus(record, event), - })} - /> - - <VirtualizedScenarioTableAnnotateDrawer runId={runId} /> - </div> - </div> - ) -} - -export default memo(ScenarioTable) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ActionCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ActionCell.tsx deleted file mode 100644 index 94f333a72e..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ActionCell.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import {memo, useCallback} from "react" - -import {Button, Spin} from "antd" -import {getDefaultStore} from "jotai" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import {virtualScenarioTableAnnotateDrawerAtom} from "@/oss/lib/atoms/virtualTable" - -// Use EE run-scoped versions for multi-run support -import { - hasScenarioStepData, - useScenarioStepSnapshot, -} from "../../../../../lib/hooks/useEvaluationRunData/useScenarioStepSnapshot" -import RunEvalScenarioButton from "../../../HumanEvalRun/components/RunEvalScenarioButton" - -import {CellWrapper} from "./CellComponents" - -/** - * Shared action-cell renderer for the Scenario tables (OSS & EE). - * Shows either a "Run" button (if scenario hasn't been executed) or an "Annotate" action. - */ -const ActionCell = ({scenarioId, runId: propRunId}: {scenarioId: string; runId?: string}) => { - const store = getDefaultStore() - const contextRunId = useRunId() - const effectiveRunId = propRunId || contextRunId - - const {data: stepData} = useScenarioStepSnapshot(scenarioId, effectiveRunId) - - const openAnnotateDrawer = useCallback(() => { - store.set(virtualScenarioTableAnnotateDrawerAtom, { - open: true, - scenarioId, - runId: effectiveRunId, // Include runId for multi-run support - }) - }, [scenarioId, effectiveRunId, store]) - - if (!effectiveRunId || !hasScenarioStepData(stepData)) { - return ( - <CellWrapper className="justify-center"> - <Spin size="small" /> - </CellWrapper> - ) - } - - const invocationArr: any[] = stepData?.invocationSteps || [] - - const allSuccess = - invocationArr.length > 0 && invocationArr.every((s) => s.status === "success") - - // first step that still has parameters to run - const firstStepKey = invocationArr.find((s: any) => s.invocationParameters)?.stepKey - - if (!allSuccess) { - return ( - <CellWrapper className="justify-center"> - <RunEvalScenarioButton - scenarioId={scenarioId} - stepKey={firstStepKey} - label="Run" - runId={effectiveRunId} - /> - </CellWrapper> - ) - } - - return ( - <CellWrapper className="justify-center"> - <Button size="small" onClick={openAnnotateDrawer}> - Annotate - </Button> - </CellWrapper> - ) -} - -export default memo(ActionCell) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/CellComponents.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/CellComponents.tsx deleted file mode 100644 index fa0aef82a1..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/CellComponents.tsx +++ /dev/null @@ -1,892 +0,0 @@ -import {HTMLProps, ReactNode, memo, useMemo} from "react" - -import {ArrowsOut} from "@phosphor-icons/react" -import {Skeleton} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" - -import TooltipButton from "@/oss/components/Playground/assets/EnhancedButton" -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import {useOptionalRunId, useRunId} from "@/oss/contexts/RunIdContext" -import {useInvocationResult} from "@/oss/lib/hooks/useInvocationResult" -import {resolvePath} from "@/oss/lib/evalRunner/pureEnrichment" -import {useAppNavigation, useAppState} from "@/oss/state/appState" - -import { - hasScenarioStepData, - useScenarioStepSnapshot, -} from "../../../../../lib/hooks/useEvaluationRunData/useScenarioStepSnapshot" -import {renderChatMessages} from "../../../assets/renderChatMessages" -import {evalTypeAtom} from "../../../state/evalType" -import {TableRow} from "../types" - -import {titleCase} from "./flatDataSourceBuilder" -const GenerationResultUtils = dynamic( - () => - import( - "@agenta/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils" - ), - {ssr: false, loading: () => <div className="h-[24.4px] w-full" />}, -) -const WRAPPER_KEYS = new Set([ - "inputs", - "input", - "data", - "result", - "attribute", - "attributes", - "payload", - "request", - "requestBody", - "body", - "value", -]) - -const tryParseJson = (value: any) => { - if (typeof value !== "string") return value - try { - return JSON.parse(value) - } catch { - return value - } -} - -const unwrapForDisplay = (value: any, preferredKeys: string[] = []): any => { - if (value == null) return value - const normalized = tryParseJson(value) - if (normalized !== value) return unwrapForDisplay(normalized, preferredKeys) - if (Array.isArray(value)) return value - if (typeof value !== "object") return value - if (Array.isArray(value)) return value - if (typeof value !== "object") return value - - for (const key of preferredKeys) { - if (value && Object.prototype.hasOwnProperty.call(value, key)) { - return unwrapForDisplay(value[key], preferredKeys) - } - } - - const entries = Object.entries(value ?? {}) - if (entries.length === 1) { - const [key, nested] = entries[0] - if (WRAPPER_KEYS.has(key)) { - return unwrapForDisplay(nested, preferredKeys) - } - } - return value -} - -const formatPrimitiveValue = (value: any): string => { - if (value == null) return "" - if (typeof value === "string") return value - if (typeof value === "number" || typeof value === "boolean") return String(value) - if (Array.isArray(value)) { - return value - .map((item) => formatPrimitiveValue(unwrapForDisplay(item))) - .filter(Boolean) - .join("\n") - } - if (typeof value === "object") { - return Object.entries(value) - .map(([key, nested]) => { - const formatted = formatPrimitiveValue(unwrapForDisplay(nested)) - if (!formatted) return "" - return `${titleCase(key)}: ${formatted}` - }) - .filter(Boolean) - .join("\n") - } - return String(value) -} - -const stringifyOnlineValue = (value: any, depth = 0): string => { - const unwrapped = unwrapForDisplay(value) - if (unwrapped == null) return "" - if (typeof unwrapped === "string") return unwrapped - if (typeof unwrapped === "number" || typeof unwrapped === "boolean") return String(unwrapped) - if (Array.isArray(unwrapped)) { - return unwrapped - .map((item) => stringifyOnlineValue(item, depth)) - .filter(Boolean) - .join(depth === 0 ? "\n" : ", ") - } - if (typeof unwrapped === "object") { - const entries = Object.entries(unwrapped) - if (!entries.length) return "" - return entries - .map(([key, nested]) => { - const rendered = stringifyOnlineValue(nested, depth + 1) - if (!rendered) return "" - return depth === 0 ? rendered : `${titleCase(key)}: ${rendered}` - }) - .filter(Boolean) - .join(depth === 0 ? "\n" : ", ") - } - return String(unwrapped) -} - -const isChatMessage = (entry: any) => - entry && typeof entry === "object" && "role" in entry && "content" in entry - -const buildOnlineInputItems = ( - value: any, -): {label?: string; value?: string; chat?: ReactNode[]}[] => { - const unwrapped = unwrapForDisplay(value, ["inputs", "input", "data", "requestBody", "body"]) - if (unwrapped == null) return [] - if (Array.isArray(unwrapped) && unwrapped.every(isChatMessage)) { - return [ - { - label: "Messages", - chat: renderChatMessages({ - keyPrefix: "input", - rawJson: JSON.stringify(unwrapped), - view: "table", - }), - }, - ] - } - if (typeof unwrapped !== "object" || Array.isArray(unwrapped)) { - const valueStr = stringifyOnlineValue(unwrapped, 0) - return valueStr ? [{value: valueStr}] : [] - } - - return Object.entries(unwrapped) - .map(([key, nested]) => { - if (isChatMessage(nested)) { - return { - label: titleCase(key), - chat: renderChatMessages({ - keyPrefix: `input-${key}`, - rawJson: JSON.stringify([nested]), - view: "table", - }), - } - } - if (Array.isArray(nested) && nested.every(isChatMessage)) { - return { - label: titleCase(key), - chat: renderChatMessages({ - keyPrefix: `input-${key}`, - rawJson: JSON.stringify(nested), - view: "table", - }), - } - } - const rendered = stringifyOnlineValue(nested, 0) - if (!rendered) return null - const label = titleCase(key) - const sanitized = rendered.startsWith(`${label}: `) - ? rendered.slice(label.length + 2) - : rendered - return {label, value: sanitized} - }) - .filter(Boolean) as {label?: string; value?: string; chat?: ReactNode[]}[] -} - -const buildOnlineOutput = ( - rawValue: any, - fallback: any, - keyPrefix: string, -): {text?: string; chat?: ReactNode[]} => { - const candidates = [rawValue, fallback] - for (const candidate of candidates) { - if (candidate == null) continue - const parsed = unwrapForDisplay(candidate, ["outputs", "output", "response", "text"]) - if (Array.isArray(parsed) && parsed.every(isChatMessage)) { - return { - chat: renderChatMessages({ - keyPrefix, - rawJson: JSON.stringify(parsed), - view: "table", - }), - } - } - if (parsed && typeof parsed === "object" && isChatMessage(parsed)) { - return { - chat: renderChatMessages({ - keyPrefix, - rawJson: JSON.stringify([parsed]), - view: "table", - }), - } - } - const formatted = formatPrimitiveValue(parsed) - if (formatted) { - return {text: formatted} - } - } - return {text: formatPrimitiveValue(fallback)} -} - -export const CellWrapper = memo( - ({children, className, style, ...rest}: HTMLProps<HTMLDivElement>) => { - return ( - <div - className={clsx([ - "w-full h-full", - "flex items-start", - "bg-inherit", - "overflow-hidden", - "group", - className, - ])} - style={style} - {...rest} - > - {children} - </div> - ) - }, -) - -export const InputCell = memo( - ({ - scenarioId, - inputKey, - stepKey, - showEditor = true, - disableExpand = false, - runId, - }: { - scenarioId: string - inputKey: string - stepKey?: string - showEditor?: boolean - disableExpand?: boolean - runId?: string - }) => { - const evalType = useAtomValue(evalTypeAtom) - - // Use effective runId with proper fallback logic - const contextRunId = useRunId() - const effectiveRunId = useMemo(() => runId ?? contextRunId ?? null, [runId, contextRunId]) - - const {data: stepData} = useScenarioStepSnapshot(scenarioId, effectiveRunId) - const hasStepData = hasScenarioStepData(stepData) - const enrichedArr = hasStepData ? (stepData?.inputSteps ?? []) : [] - let targetStep = stepKey ? enrichedArr.find((s) => s.stepKey === stepKey) : undefined - if (!targetStep) targetStep = enrichedArr[0] - const invocationStep = hasStepData ? stepData?.invocationSteps?.[0] : undefined - - let val: any - if (hasStepData && targetStep && (targetStep as any).inputs) { - let _inputs = {} - try { - const {testcase_dedup_id, ...rest} = targetStep.testcase.data - _inputs = {...(targetStep as any).inputs, ...rest} - } catch (e) { - _inputs = {} - } - - const inputs = {..._inputs} - const groundTruth = (targetStep as any).groundTruth ?? {} - // Merge like InvocationInputs: groundTruth first, then inputs override duplicates - const merged = {...groundTruth, ...inputs} - const path = inputKey.startsWith("data.") ? inputKey.slice(5) : inputKey - val = resolvePath(merged, path) - } - - if (val === undefined && hasStepData && invocationStep) { - const evResult = - resolvePath(invocationStep?.inputs, inputKey) ?? - resolvePath(invocationStep?.data, inputKey) ?? - resolvePath(invocationStep?.result, inputKey) - if (evResult !== undefined) val = evResult - } - - if (val === undefined && invocationStep?.trace) { - const tryTrace = resolvePath(invocationStep.trace, inputKey) - if (tryTrace !== undefined) val = tryTrace - } - - // Use shared util for complex chat messages, otherwise primitive display - let isChat = false - let reactNodes: React.ReactNode[] | undefined - if (typeof val === "string") { - try { - const parsed = JSON.parse(val) - isChat = - Array.isArray(parsed) && parsed.every((m: any) => "role" in m && "content" in m) - } catch { - /* ignore */ - } - } - if (isChat) { - reactNodes = renderChatMessages({ - keyPrefix: `${scenarioId}-${inputKey}`, - rawJson: val as string, - view: "table", - }) - } - - const isOnlineEval = evalType === "online" - const onlineInputItems = useMemo(() => { - if (!hasStepData || !isOnlineEval || reactNodes) return [] - - const candidateValues: any[] = [val] - if (invocationStep) { - candidateValues.push( - invocationStep?.trace?.data?.inputs, - invocationStep?.trace?.data?.inputs?.inputs, - invocationStep?.trace?.inputs, - invocationStep?.inputs, - invocationStep?.data?.inputs, - invocationStep?.data, - ) - } - if (targetStep) { - candidateValues.push((targetStep as any).inputs, (targetStep as any).groundTruth) - } - - for (const candidate of candidateValues) { - if (!candidate) continue - const items = buildOnlineInputItems(candidate) - if (items.length) return items - } - - return [] - }, [hasStepData, isOnlineEval, reactNodes, val, invocationStep, targetStep]) - const showOnlineLabels = showEditor !== false - - if (!hasStepData) { - return ( - <CellWrapper> - <span className="text-gray-400">—</span> - </CellWrapper> - ) - } - - return ( - <CellWrapper> - <Expandable - disableExpand={disableExpand} - expandKey={scenarioId} - className={clsx([ - "bg-transparent [&_.cell-expand-container]:!bg-transparent", - "[&_.agenta-shared-editor]:hover:!border-transparent", - { - "[&_.agenta-shared-editor]:p-0": !reactNodes, - }, - ])} - > - {reactNodes ? ( - <div className="flex flex-col gap-2 w-full">{reactNodes}</div> - ) : isOnlineEval ? ( - onlineInputItems.length ? ( - <div className="flex flex-col gap-2 w-full leading-5 text-gray-700"> - {onlineInputItems.map((item, index) => ( - <div - key={`${scenarioId}-${inputKey}-${index}`} - className="flex flex-col gap-0.5 whitespace-pre-line" - > - {showOnlineLabels && item.label ? ( - <span className="font-medium text-gray-500"> - {item.label} - </span> - ) : null} - {item.chat ? ( - <div className="flex flex-col gap-2">{item.chat}</div> - ) : ( - <span>{item.value}</span> - )} - </div> - ))} - </div> - ) : ( - <span className="text-gray-400">N/A</span> - ) - ) : val != null && val !== "" && !showEditor ? ( - <div>{String(val)}</div> - ) : val != null && val !== "" ? ( - <SharedEditor - className="!bg-transparent !border-none !shadow-none" - handleChange={() => {}} - initialValue={String(val)} - editorType="borderless" - placeholder="Click the 'Run' icon to get variant output" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true}} - /> - ) : ( - <span>N/A</span> - )} - </Expandable> - </CellWrapper> - ) - }, -) - -export const InputSummaryCell = memo( - ({scenarioId, runId}: {scenarioId: string; runId?: string}) => { - const contextRunId = useRunId() - const evalType = useAtomValue(evalTypeAtom) - const effectiveRunId = useMemo(() => runId ?? contextRunId ?? null, [runId, contextRunId]) - - const {data: stepData} = useScenarioStepSnapshot(scenarioId, effectiveRunId) - - if (!hasScenarioStepData(stepData)) { - return ( - <CellWrapper> - <span className="text-gray-400">—</span> - </CellWrapper> - ) - } - - const inputSteps = stepData?.inputSteps ?? [] - - const combined = new Map<string, any>() - const structured: Record<string, any> = {} - - const deepMerge = (target: Record<string, any>, source?: Record<string, any>) => { - if (!source || typeof source !== "object") return target - Object.entries(source).forEach(([key, rawValue]) => { - // Prevent prototype pollution by excluding dangerous keys - if (key === "__proto__" || key === "constructor" || key === "prototype") return - const parsed = tryParseJson(rawValue) - const value = parsed - if (value && typeof value === "object" && !Array.isArray(value)) { - target[key] = deepMerge((target[key] ||= {}), value as Record<string, any>) - } else { - target[key] = value - } - }) - return target - } - - const flattenInto = (value: any, path: string[] = []) => { - if (value == null) return - const parsed = tryParseJson(value) - if (parsed !== value) { - flattenInto(parsed, path) - return - } - if (Array.isArray(value)) { - const keyPath = path.join(".") - if ( - value.length && - value.every( - (entry) => - entry && - typeof entry === "object" && - "role" in entry && - "content" in entry, - ) - ) { - if (!combined.has(keyPath || "messages")) { - combined.set(keyPath || "messages", value) - } - return - } - - if (value.length && value.every((entry) => typeof entry !== "object")) { - const joined = value.map((entry) => String(entry)).join(", ") - if (keyPath && !combined.has(keyPath)) { - combined.set(keyPath, joined) - } - return - } - - value.forEach((entry, index) => flattenInto(entry, [...path, String(index)])) - return - } - if (typeof value === "object") { - Object.entries(value).forEach(([key, nested]) => { - flattenInto(nested, [...path, key]) - }) - return - } - if (!path.length) return - const keyPath = path.join(".") - if (!combined.has(keyPath)) { - combined.set(keyPath, value) - } - } - - const mergeCandidate = (source?: Record<string, any>) => { - if (!source || typeof source !== "object") return - flattenInto(source) - deepMerge(structured, source) - } - - inputSteps.forEach((step: any) => { - mergeCandidate(step?.groundTruth) - mergeCandidate(step?.inputs) - try { - const {testcase_dedup_id, ...rest} = step?.testcase?.data ?? {} - mergeCandidate(rest) - } catch { - /* ignore */ - } - }) - - const invocationStep = stepData?.invocationSteps?.[0] - - if (invocationStep) { - mergeCandidate(invocationStep?.inputs) - const invocationParams = invocationStep?.invocationParameters - if (invocationParams && typeof invocationParams === "object") { - Object.values(invocationParams).forEach((param: any) => { - mergeCandidate(param?.requestBody?.inputs) - mergeCandidate(param?.inputs) - mergeCandidate(param?.agConfig?.inputs) - }) - } - - const collectTraceInputs = (node: any) => { - if (!node || typeof node !== "object") return - if (node.inputs && typeof node.inputs === "object") mergeCandidate(node.inputs) - if (node.data && typeof node.data === "object") { - if (node.data.inputs && typeof node.data.inputs === "object") { - mergeCandidate(node.data.inputs) - } - } - const children = ([] as any[]) - .concat(node?.nodes || []) - .concat(node?.children || []) - .concat(node?.events || []) - children.forEach(collectTraceInputs) - } - - if (invocationStep?.trace) { - collectTraceInputs(invocationStep.trace) - if (invocationStep.trace?.tree) collectTraceInputs(invocationStep.trace.tree) - } - } - - if (!combined.size) { - return ( - <CellWrapper> - <span className="text-gray-400">—</span> - </CellWrapper> - ) - } - - const buildOnlineItems = () => { - const items: {label: string; value?: string; chat?: ReactNode[]}[] = [] - for (const [path, value] of combined.entries()) { - const segments = path.split(".").filter(Boolean) - while (segments.length && WRAPPER_KEYS.has(segments[0])) { - segments.shift() - } - if (!segments.length) continue - const label = titleCase(segments[segments.length - 1]) - - if (Array.isArray(value) && value.every(isChatMessage)) { - const nodes = renderChatMessages({ - keyPrefix: `${scenarioId}-${label}`, - rawJson: JSON.stringify(value), - view: "table", - }) - items.push({label, chat: nodes}) - continue - } - - if (isChatMessage(value)) { - const nodes = renderChatMessages({ - keyPrefix: `${scenarioId}-${label}`, - rawJson: JSON.stringify([value]), - view: "table", - }) - items.push({label, chat: nodes}) - continue - } - - const rendered = stringifyOnlineValue(value, 0) - if (!rendered) continue - const sanitized = rendered.startsWith(`${label}: `) - ? rendered.slice(label.length + 2) - : rendered - items.push({label, value: sanitized}) - } - return items - } - - if (evalType === "online") { - const items = buildOnlineItems() - if (!items.length) { - return ( - <CellWrapper> - <span className="text-gray-400">—</span> - </CellWrapper> - ) - } - - return ( - <CellWrapper> - <Expandable - expandKey={`${scenarioId}-inputs-summary`} - className="[&_.agenta-shared-editor]:hover:!border-transparent [&_.agenta-shared-editor]:!p-0" - > - <div className="flex flex-col gap-2 w-full leading-5 text-gray-700 whitespace-pre-line"> - {items.map(({label, value, chat}) => ( - <div key={`${scenarioId}-${label}`} className="flex flex-col gap-1"> - <span className="font-semibold text-gray-500">{label}</span> - {chat ? ( - <div className="flex flex-col gap-2">{chat}</div> - ) : ( - <span>{value}</span> - )} - </div> - ))} - </div> - </Expandable> - </CellWrapper> - ) - } - - const serialized = (() => { - try { - return JSON.stringify(structured, null, 2) - } catch { - return String(structured) - } - })() - - return ( - <CellWrapper> - <Expandable - expandKey={`${scenarioId}-inputs-summary`} - className="[&_.agenta-shared-editor]:hover:!border-transparent [&_.agenta-shared-editor]:!p-0" - > - <SharedEditor - className="!bg-transparent !border-none !shadow-none" - handleChange={() => {}} - initialValue={serialized} - editorType="borderless" - disabled - editorClassName="!text-xs" - editorProps={{enableResize: true}} - /> - </Expandable> - </CellWrapper> - ) - }, -) - -// Dynamic invocation result cell for run-index driven columns -export const InvocationResultCellSkeleton = memo(() => { - return ( - <CellWrapper className="flex flex-col !items-start justify-between gap-2 text-wrap"></CellWrapper> - ) -}) - -export const InvocationResultCell = memo( - ({ - scenarioId, - stepKey, - path, - isSkeleton, - runId, - record, - }: { - isSkeleton: boolean - scenarioId: string - stepKey: string - path: string - runId?: string // Optional for multi-run support - record?: TableRow - }) => { - const evalType = useAtomValue(evalTypeAtom) - const {trace, value, rawValue, messageNodes, hasError} = useInvocationResult({ - scenarioId, - stepKey, - runId, - viewType: "table", - }) - const navigation = useAppNavigation() - const appState = useAppState() - const contextRunId = useOptionalRunId() - const enableFocusDrawer = - evalType === "auto" || evalType === "online" || evalType === "custom" - - const handleOpenFocus = () => { - const targetRunId = runId ?? contextRunId ?? null - if (!targetRunId) { - console.warn("[InvocationResultCell] Missing runId while opening focus view", { - scenarioId, - }) - return - } - - const currentScenarioValue = appState.query?.focusScenarioId - const currentRunValue = appState.query?.focusRunId - const scenarioMatches = Array.isArray(currentScenarioValue) - ? currentScenarioValue[0] === scenarioId - : currentScenarioValue === scenarioId - const runMatches = Array.isArray(currentRunValue) - ? currentRunValue[0] === targetRunId - : currentRunValue === targetRunId - - if (!scenarioMatches || !runMatches) { - navigation.patchQuery( - { - focusScenarioId: scenarioId, - focusRunId: targetRunId, - }, - {shallow: true}, - ) - } - } - - const isOnlineEval = evalType === "online" - const onlineOutput = useMemo(() => { - if (!isOnlineEval) return {text: undefined, chat: undefined} - if (messageNodes) return {text: undefined, chat: messageNodes} - return buildOnlineOutput(rawValue, value, `${scenarioId}-output`) - }, [isOnlineEval, messageNodes, rawValue, value, scenarioId]) - - const formattedPrimitive = useMemo(() => { - if (value === null || value === undefined) return "" - if (typeof value === "string") { - try { - const parsed = JSON.parse(value) - if (parsed && typeof parsed === "object") { - return JSON.stringify(parsed, null, 2) - } - } catch { - /* ignore parse errors */ - } - return value - } - if (typeof value === "object") { - try { - return JSON.stringify(value, null, 2) - } catch { - return String(value) - } - } - return String(value) - }, [value]) - - return ( - <CellWrapper className="flex flex-col !items-start justify-between gap-2 text-wrap"> - {!isSkeleton && enableFocusDrawer ? ( - <TooltipButton - icon={<ArrowsOut size={14} className="ml-[1px] mt-[1px]" />} - size="small" - className="absolute top-2 right-2 z-[2] hidden group-hover:block" - onClick={handleOpenFocus} - tooltipProps={{title: "Focus view"}} - /> - ) : null} - {isSkeleton ? ( - <> - <div className="h-[70px] w-full m-3"></div> - <div className="h-[24.4px] w-full" /> - </> - ) : messageNodes ? ( - <> - {/* <ScenarioTraceSummary - scenarioId={scenarioId} - stepKey={summaryStepKey} - runId={runId} - trace={trace} - status={status} - className="w-full" - /> */} - <Expandable - className="[&_.agenta-shared-editor]:hover:!border-transparent" - expandKey={scenarioId} - buttonProps={{ - className: enableFocusDrawer ? "!right-7" : "top-0", - }} - > - <div className="flex flex-col gap-2 w-full">{messageNodes}</div> - </Expandable> - </> - ) : onlineOutput.chat?.length ? ( - <> - <Expandable - className="[&_.agenta-shared-editor]:hover:!border-transparent [&_.agenta-shared-editor]:!p-0" - expandKey={scenarioId} - buttonProps={{ - className: enableFocusDrawer ? "!right-7" : "top-0", - }} - > - <div className="flex flex-col gap-2 w-full">{onlineOutput.chat}</div> - </Expandable> - </> - ) : onlineOutput.text ? ( - <> - <Expandable - className="[&_.agenta-shared-editor]:hover:!border-transparent [&_.agenta-shared-editor]:!p-0" - expandKey={scenarioId} - buttonProps={{ - className: enableFocusDrawer ? "!right-7" : "top-0", - }} - > - <div className="w-full h-max whitespace-pre-line text-gray-700"> - {onlineOutput.text} - </div> - </Expandable> - </> - ) : ( - <> - {/* <ScenarioTraceSummary - scenarioId={scenarioId} - stepKey={summaryStepKey} - runId={runId} - trace={trace} - status={status} - className="w-full" - /> */} - <Expandable - className="[&_.agenta-shared-editor]:hover:!border-transparent [&_.agenta-shared-editor]:!p-0" - expandKey={scenarioId} - buttonProps={{ - className: enableFocusDrawer ? "!right-7" : "top-0", - }} - > - <div className="w-full h-max"> - {formattedPrimitive ? ( - <pre - className={clsx( - "whitespace-pre-wrap break-words text-xs", - hasError ? "text-red-500" : "text-gray-700", - )} - > - {formattedPrimitive} - </pre> - ) : null} - </div> - </Expandable> - </> - )} - {trace ? ( - <div className="flex gap-2"> - <GenerationResultUtils - showStatus={false} - result={{ - response: { - tree: { - nodes: [trace], - }, - }, - }} - /> - {/* <StatusCell scenarioId={scenarioId} result={record?.result} runId={runId} /> */} - </div> - ) : ( - <div className="h-[24.4px] w-full" /> - )} - </CellWrapper> - ) - }, -) - -export const SkeletonCell = () => { - return ( - <CellWrapper className="min-h-[32px] [&_*]:!min-w-full [&_*]:!w-full [&_*]:!max-w-full justify-center"> - <Skeleton.Input - active - style={{ - minHeight: 24, - margin: 0, - padding: 0, - }} - /> - </CellWrapper> - ) -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ComparisonModeToggle.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ComparisonModeToggle.tsx deleted file mode 100644 index fbd54285eb..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ComparisonModeToggle.tsx +++ /dev/null @@ -1,237 +0,0 @@ -import React, {memo, useEffect, useMemo, useRef, useState} from "react" - -import {CloseOutlined, PlusOutlined, SwapOutlined} from "@ant-design/icons" -import {Button, Modal, Select, Space, Tag, Tooltip} from "antd" -import {useAtom} from "jotai" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import usePreviewEvaluations from "@/oss/lib/hooks/usePreviewEvaluations" - -import {urlStateAtom} from "../../../state/urlState" - -interface AvailableRun { - id: string - name: string - createdAt: string - status: string -} - -const ComparisonModeToggle = () => { - const [urlState, setUrlState] = useAtom(urlStateAtom) - const [isModalOpen, setIsModalOpen] = useState(false) - const [selectedRuns, setSelectedRuns] = useState<string[]>([]) - - const currentRunId = useRunId() - const isComparisonMode = Boolean(urlState.compare && urlState.compare.length > 0) - const compareRunIds = urlState.compare || [] - - // Fetch all evaluation runs for comparison - const {runs: allRuns, swrData} = usePreviewEvaluations() - - // Transform runs for the selector and filter out the current run - const availableRuns = useMemo(() => { - if (!allRuns) return [] - - return allRuns - .filter((run) => run.id !== currentRunId) - .map((run) => ({ - id: run.id, - name: run.name || `Run ${run.id.slice(0, 8)}`, - createdAt: new Date(run.createdAt).toLocaleDateString(), - status: run.status, - })) - .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()) - }, [allRuns, currentRunId]) - - // Get current run info for display - const currentRun = useMemo(() => { - if (!allRuns) return null - return allRuns.find((run) => run.id === currentRunId) - }, [allRuns, currentRunId]) - - // Use ref to track previous compareRunIds to avoid infinite loops - const prevCompareRunIdsRef = useRef<string[]>([]) - - // Sync selectedRuns with URL state when it changes - useEffect(() => { - const prevIds = prevCompareRunIdsRef.current - const currentIds = compareRunIds - - // Check if arrays are different - const isDifferent = - prevIds.length !== currentIds.length || - prevIds.some((id, index) => id !== currentIds[index]) - - if (isDifferent) { - setSelectedRuns(compareRunIds) - prevCompareRunIdsRef.current = [...compareRunIds] - } - }, [compareRunIds]) - - const handleEnableComparison = () => { - setSelectedRuns(compareRunIds) - setIsModalOpen(true) - } - - const handleDisableComparison = () => { - setUrlState((draft) => { - draft.compare = undefined - }) - } - - const handleApplyComparison = () => { - setUrlState((draft) => { - draft.compare = selectedRuns.length > 0 ? selectedRuns : undefined - }) - setIsModalOpen(false) - } - - const handleRemoveRun = (runIdToRemove: string) => { - const updatedRuns = compareRunIds.filter((id) => id !== runIdToRemove) - setUrlState((draft) => { - draft.compare = updatedRuns.length > 0 ? updatedRuns : undefined - }) - } - - return ( - <> - <Space> - {!isComparisonMode ? ( - <Button icon={<SwapOutlined />} onClick={handleEnableComparison} type="default"> - Compare Runs - </Button> - ) : ( - <Space> - <div className="flex items-center gap-2"> - {/* <span className="text-sm font-medium">Comparing with:</span> */} - {compareRunIds.map((runId) => { - const run = availableRuns.find((r) => r.id === runId) - return ( - <Tag - key={runId} - closable - onClose={() => handleRemoveRun(runId)} - color="blue" - > - {run?.name || runId} - </Tag> - ) - })} - </div> - <Button - icon={<PlusOutlined />} - onClick={handleEnableComparison} - type="dashed" - > - Add Run - </Button> - <Button icon={<CloseOutlined />} onClick={handleDisableComparison} danger> - Exit Comparison - </Button> - </Space> - )} - </Space> - - <Modal - title="Select Runs to Compare" - open={isModalOpen} - onOk={handleApplyComparison} - onCancel={() => setIsModalOpen(false)} - width={600} - okText="Apply Comparison" - cancelText="Cancel" - > - <div className="space-y-4"> - <div className="p-3 bg-blue-50 rounded-lg"> - <div className="flex items-center gap-2"> - <Tag color="green">Base Run</Tag> - <span className="font-medium"> - {currentRun?.name || `Current Run (${currentRunId?.slice(0, 8)})`} - </span> - </div> - <div className="text-sm text-gray-600 mt-1"> - This is the base run that other runs will be compared against. - </div> - </div> - - <div> - <label className="block text-sm font-medium mb-2"> - Select runs to compare with the base run: - </label> - <Select - mode="multiple" - placeholder={ - swrData.isLoading ? "Loading runs..." : "Select runs to compare" - } - value={selectedRuns} - onChange={setSelectedRuns} - className="w-full" - maxTagCount={3} - optionLabelProp="label" - loading={swrData.isLoading} - disabled={swrData.isLoading || availableRuns.length === 0} - notFoundContent={swrData.isLoading ? "Loading..." : "No runs available"} - > - {availableRuns.map((run) => ( - <Select.Option key={run.id} value={run.id} label={run.name}> - <div className="flex justify-between items-center"> - <span className="font-medium">{run.name}</span> - <div className="flex items-center gap-2"> - <Tag - color={ - run.status === "completed" ? "green" : "orange" - } - > - {run.status} - </Tag> - <span className="text-xs text-gray-500"> - {run.createdAt} - </span> - </div> - </div> - <div className="text-xs text-gray-400"> - {run.id.slice(0, 8)}... - </div> - </Select.Option> - ))} - </Select> - </div> - - {selectedRuns.length > 0 && ( - <div className="p-3 bg-gray-50 rounded-lg"> - <div className="text-sm font-medium mb-2">Comparison Preview:</div> - <div className="space-y-1"> - <div className="flex items-center gap-2"> - <Tag color="green">Base</Tag> - <span className="text-sm"> - {currentRun?.name || `Current Run`} - </span> - </div> - {selectedRuns.map((runId) => { - const run = availableRuns.find( - (r: AvailableRun) => r.id === runId, - ) - return ( - <div key={runId} className="flex items-center gap-2"> - <Tag color="blue">Compare</Tag> - <span className="text-sm">{run?.name}</span> - </div> - ) - })} - </div> - </div> - )} - - <div className="text-xs text-gray-500"> - <Tooltip title="Comparison mode shows metrics side-by-side for easy performance analysis"> - 💡 Tip: Use comparison mode to analyze performance differences between - runs - </Tooltip> - </div> - </div> - </Modal> - </> - ) -} - -export default memo(ComparisonModeToggle) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedAnnotationValueCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedAnnotationValueCell.tsx deleted file mode 100644 index b5c575f01c..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedAnnotationValueCell.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import {memo, useMemo} from "react" - -import {useCachedScenarioSteps} from "@/oss/components/EvalRunDetails/hooks/useCachedScenarioSteps" -import LabelValuePill from "@/oss/components/ui/LabelValuePill" -import {useOptionalRunId} from "@/oss/contexts/RunIdContext" - -import {CellWrapper} from "../CellComponents" - -import {CollapsedAnnotationValueCellProps} from "./types" - -function buildCollapsedValues(data: any, keys: string[]) { - const annotations: any[] = [] - - if (Array.isArray(data?.annotationSteps) && data.annotationSteps.length) { - annotations.push(...data.annotationSteps.map((st: any) => st.annotation).filter(Boolean)) - } - if (data?.annotations?.length) { - annotations.push(...data.annotations) - } - if (data?.annotation) { - annotations.push(data.annotation) - } - - // Deduplicate by span_id+trace_id to avoid duplicates if same ann appears in multiple arrays - const unique = new Map<string, any>() - annotations.forEach((ann) => { - if (!ann) return - const key = `${ann.trace_id || ""}_${ann.span_id || Math.random()}` - if (!unique.has(key)) unique.set(key, ann) - }) - - const out: Record<string, any> = {} - keys.forEach((fieldPath) => { - for (const ann of unique.values()) { - let val = fieldPath - .split(".") - .reduce((acc: any, k: string) => (acc ? acc[k] : undefined), ann) - - if (val === undefined && fieldPath.startsWith("data.outputs.")) { - const suffix = fieldPath.slice("data.outputs.".length) - val = ann?.data?.outputs?.metrics?.[suffix] ?? ann?.data?.outputs?.extra?.[suffix] - } - if (val !== undefined) { - out[fieldPath] = val - break // stop at first found value - } - } - }) - return out -} - -const CollapsedAnnotationValueCell = memo<CollapsedAnnotationValueCellProps>( - ({scenarioId, runId, childrenDefs}) => { - const contextRunId = useOptionalRunId() - const effectiveRunId = runId ?? contextRunId ?? null - - const keyPaths = useMemo( - () => childrenDefs.map((c) => c.path || c.dataIndex || c.key) as string[], - [childrenDefs], - ) - - if (!scenarioId || !effectiveRunId) { - return ( - <CellWrapper> - <span className="text-gray-500">–</span> - </CellWrapper> - ) - } - - const {data: scenarioSteps} = useCachedScenarioSteps(effectiveRunId, scenarioId) - - const collapsedValues = useMemo(() => { - if (!scenarioSteps) return {} - return buildCollapsedValues(scenarioSteps, keyPaths) - }, [scenarioSteps, keyPaths]) - - if (!Object.keys(collapsedValues).length) { - return ( - <CellWrapper> - <span className="text-gray-500">–</span> - </CellWrapper> - ) - } - - return ( - <CellWrapper> - <div className="flex flex-col items-start gap-1 max-w-[450px] overflow-x-auto [&::-webkit-scrollbar]:!w-0"> - {Object.entries(collapsedValues).map(([name, val]) => ( - <LabelValuePill - key={name} - label={name.split(".").pop() || name} - value={String(val)} - className="!min-w-0 [&_div:first-child]:!min-w-0 [&_div:first-child]:w-fit" - /> - ))} - </div> - </CellWrapper> - ) - }, -) - -export default CollapsedAnnotationValueCell diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricValueCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricValueCell.tsx deleted file mode 100644 index 4653a6b1d9..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricValueCell.tsx +++ /dev/null @@ -1,410 +0,0 @@ -import {memo, useMemo, type ReactNode} from "react" - -import {useAtomValue} from "jotai" - -import {formatColumnTitle} from "@/oss/components/Filters/EditColumns/assets/helper" -import {formatMetricValue} from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils" -import LabelValuePill from "@/oss/components/ui/LabelValuePill" -import {useOptionalRunId} from "@/oss/contexts/RunIdContext" -import { - SchemaMetricType, - canonicalizeMetricKey, - extractPrimitive, - getMetricValueWithAliases, - summarizeMetric, -} from "@/oss/lib/metricUtils" - -import {scenarioMetricSelectorFamily} from "../../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {TableColumn} from "../../types" -import {evaluatorFailuresMapFamily} from "../atoms/evaluatorFailures" -import {CellWrapper} from "../CellComponents" - -import {EvaluatorFailureCell} from "./MetricCell" - -export interface CollapsedMetricValueCellProps { - scenarioId: string - evaluatorSlug?: string - runId?: string - childrenDefs?: TableColumn[] -} - -interface PillEntry { - label: string - value: string -} - -const includesBooleanType = (metricType?: SchemaMetricType): boolean => { - if (!metricType) return false - return Array.isArray(metricType) ? metricType.includes("boolean") : metricType === "boolean" -} - -const flattenColumns = (columns?: TableColumn[]): TableColumn[] => { - if (!columns?.length) return [] - const queue = [...columns] - const leaves: TableColumn[] = [] - - while (queue.length) { - const column = queue.shift() - if (!column) continue - if (column.children && column.children.length) { - queue.push(...column.children) - } else { - leaves.push(column) - } - } - - return leaves -} - -const toBooleanString = (value: unknown): string | undefined => { - if (typeof value === "boolean") return value ? "true" : "false" - if (typeof value === "number") { - if (value === 1) return "true" - if (value === 0) return "false" - } - if (typeof value === "string") { - const trimmed = value.trim().toLowerCase() - if (trimmed === "true" || trimmed === "false") return trimmed - if (trimmed === "1") return "true" - if (trimmed === "0") return "false" - } - return undefined -} - -const extractBooleanFromStats = (value: any): string | undefined => { - if (!value || typeof value !== "object") return undefined - const candidates: unknown[] = [] - if (Array.isArray(value.rank) && value.rank.length) { - candidates.push(value.rank[0]?.value) - } - if (Array.isArray(value.frequency) && value.frequency.length) { - candidates.push(value.frequency[0]?.value) - } - if ("mean" in value) candidates.push(value.mean) - if ("sum" in value) candidates.push(value.sum) - if ("value" in value) candidates.push((value as any).value) - - for (const candidate of candidates) { - const boolString = toBooleanString(candidate) - if (boolString) return boolString - } - return undefined -} - -const resolveBooleanDisplay = ({ - summarized, - rawValue, - metricType, -}: { - summarized: unknown - rawValue: unknown - metricType?: SchemaMetricType -}): string | undefined => { - const preferBoolean = includesBooleanType(metricType) - if (preferBoolean) { - const summaryBool = toBooleanString(summarized) - if (summaryBool) return summaryBool - const rawBool = - toBooleanString(rawValue) || - (typeof rawValue === "object" ? extractBooleanFromStats(rawValue) : undefined) - if (rawBool) return rawBool - } else { - const rawBool = - toBooleanString(rawValue) || - (typeof rawValue === "object" ? extractBooleanFromStats(rawValue) : undefined) - if (rawBool) return rawBool - const summaryBool = toBooleanString(summarized) - if (summaryBool) return summaryBool - } - return undefined -} - -const summariseMetricValue = (value: unknown, metricType?: SchemaMetricType) => { - if (value === null || value === undefined) return undefined - - if (typeof value === "object" && !Array.isArray(value)) { - const summary = summarizeMetric(value as any, metricType) - if (summary !== undefined) return summary - - const primitive = extractPrimitive(value) - if (primitive !== undefined) return primitive - } - - return value -} - -const buildCandidateKeys = (column: TableColumn, evaluatorSlug?: string): string[] => { - const keys = new Set<string>() - const addKey = (key?: string) => { - if (!key) return - if (!keys.has(key)) keys.add(key) - const canonical = canonicalizeMetricKey(key) - if (canonical !== key && !keys.has(canonical)) { - keys.add(canonical) - } - } - - addKey(column.path) - addKey(column.fallbackPath) - if (typeof column.key === "string") addKey(column.key) - - if (column.path?.includes(".")) { - const tail = column.path.split(".").pop() - if (tail) addKey(tail) - } - - if (evaluatorSlug) { - const ensurePrefixed = (raw?: string) => { - if (!raw) return - if (raw.startsWith(`${evaluatorSlug}.`)) { - addKey(raw) - } else { - addKey(`${evaluatorSlug}.${raw}`) - } - } - - ensurePrefixed(column.path) - ensurePrefixed(column.fallbackPath) - if (typeof column.key === "string") ensurePrefixed(column.key) - } - - return Array.from(keys).filter(Boolean) -} - -const buildLabel = (column: TableColumn) => { - const raw = - (typeof column.title === "string" && column.title.trim()) || - (typeof column.name === "string" && column.name.trim()) || - column.path?.split(".").pop() || - (typeof column.key === "string" ? column.key : "") || - "" - - const base = raw || "Metric" - return /\s/.test(base) || base.includes("(") ? base : formatColumnTitle(base) -} - -const buildCollapsedPills = ({ - rowMetrics, - childrenDefs, - evaluatorSlug, -}: { - rowMetrics: Record<string, any> - childrenDefs?: TableColumn[] - evaluatorSlug?: string -}): PillEntry[] => { - if (!rowMetrics || typeof rowMetrics !== "object") return [] - - const leaves = flattenColumns(childrenDefs) - if (!leaves.length) return [] - - const seenLabels = new Set<string>() - const result: PillEntry[] = [] - - leaves.forEach((column) => { - const candidateKeys = buildCandidateKeys(column, evaluatorSlug) - let rawValue: unknown - let resolvedKey: string | undefined - - for (const key of candidateKeys) { - if (!key) continue - if (rowMetrics[key] !== undefined) { - rawValue = rowMetrics[key] - resolvedKey = key - break - } - const alias = getMetricValueWithAliases(rowMetrics, key) - if (alias !== undefined) { - rawValue = alias - resolvedKey = key - break - } - } - - if (rawValue === undefined) return - - const summarized = summariseMetricValue(rawValue, column.metricType) - if (summarized === undefined || summarized === null) return - - const canonicalKey = canonicalizeMetricKey(resolvedKey ?? column.path ?? column.key ?? "") - const label = buildLabel(column) - if (!label.trim() || seenLabels.has(label)) return - const booleanDisplay = resolveBooleanDisplay({ - summarized, - rawValue, - metricType: column.metricType, - }) - - const value = - booleanDisplay ?? - (typeof summarized === "number" - ? formatMetricValue(canonicalKey, summarized) - : String(summarized)) - - seenLabels.add(label) - result.push({label, value}) - }) - - return result -} - -interface BaseCellProps extends CollapsedMetricValueCellProps { - emptyState: ReactNode -} - -const CollapsedMetricValueCellContent = ({ - scenarioId, - evaluatorSlug, - runId, - childrenDefs, - emptyState, -}: Required<BaseCellProps>) => { - const rowMetrics = useAtomValue(scenarioMetricSelectorFamily({runId, scenarioId})) || {} - const evaluatorFailuresMap = useAtomValue(evaluatorFailuresMapFamily(runId)) - - const candidateSlugs = useMemo(() => { - const set = new Set<string>() - const addCandidate = (value?: string | null) => { - if (!value || typeof value !== "string") return - const trimmed = value.trim() - if (!trimmed) return - if (!set.has(trimmed)) set.add(trimmed) - - const dotParts = trimmed.split(".") - dotParts.forEach((part) => { - const segment = part.trim() - if (segment && !set.has(segment)) { - set.add(segment) - } - }) - } - - addCandidate(evaluatorSlug) - childrenDefs?.forEach((col) => { - addCandidate(col.stepKey) - if (col.stepKeyByRunId && typeof col.stepKeyByRunId === "object") { - Object.values(col.stepKeyByRunId).forEach((stepKey) => addCandidate(stepKey)) - } - addCandidate(col.path) - addCandidate(col.fallbackPath) - if (typeof col.key === "string") addCandidate(col.key) - if (typeof col.name === "string") addCandidate(col.name) - }) - - return Array.from(set) - }, [childrenDefs, evaluatorSlug]) - - const pillEntries = useMemo( - () => - buildCollapsedPills({ - rowMetrics, - childrenDefs, - evaluatorSlug, - }), - [rowMetrics, childrenDefs, evaluatorSlug], - ) - - const failure = useMemo(() => { - if (!candidateSlugs.length) return undefined - const failures = evaluatorFailuresMap?.get(scenarioId) - if (!failures) return undefined - - for (const slug of candidateSlugs) { - if (failures[slug]) { - return failures[slug] - } - } - - const entries = Object.entries(failures) - const substringMatch = entries.find(([failureSlug]) => - candidateSlugs.some((candidate) => { - if (!candidate || candidate.length < 3) return false - return candidate.includes(failureSlug) || failureSlug.includes(candidate) - }), - ) - if (substringMatch) return substringMatch[1] - - const normalize = (value: string) => value.replace(/[^\w]/g, "").toLowerCase() - const normalizedCandidates = candidateSlugs.map(normalize) - const normalizedMatch = entries.find(([failureSlug]) => - normalizedCandidates.includes(normalize(failureSlug)), - ) - return normalizedMatch?.[1] - }, [candidateSlugs, evaluatorFailuresMap, scenarioId]) - - if (failure) { - return <EvaluatorFailureCell status={failure.status} error={failure.error} /> - } - - if (!pillEntries.length) { - return ( - <CellWrapper> - {typeof emptyState === "string" ? ( - <span className="text-gray-500">{emptyState}</span> - ) : ( - emptyState - )} - </CellWrapper> - ) - } - - return ( - <CellWrapper> - <div className="flex flex-col items-start gap-1 max-w-[450px] overflow-x-auto [&::-webkit-scrollbar]:!w-0"> - {pillEntries.map(({label, value}) => ( - <LabelValuePill - key={`${label}-${value}`} - label={label} - value={value} - className="!min-w-0 [&_div:first-child]:!min-w-0 [&_div:first-child]:w-fit" - /> - ))} - </div> - </CellWrapper> - ) -} - -const BaseCollapsedMetricValueCell = ({ - scenarioId, - evaluatorSlug, - runId, - childrenDefs, - emptyState, -}: BaseCellProps) => { - const contextRunId = useOptionalRunId() - const effectiveRunId = runId ?? contextRunId ?? null - - if (!scenarioId || !effectiveRunId) { - return ( - <CellWrapper> - {typeof emptyState === "string" ? ( - <span className="text-gray-500">{emptyState}</span> - ) : ( - emptyState - )} - </CellWrapper> - ) - } - - return ( - <CollapsedMetricValueCellContent - scenarioId={scenarioId} - evaluatorSlug={evaluatorSlug} - runId={effectiveRunId} - childrenDefs={childrenDefs} - emptyState={emptyState} - /> - ) -} - -const CollapsedMetricValueCell = memo<CollapsedMetricValueCellProps>((props) => ( - <BaseCollapsedMetricValueCell {...props} emptyState="–" /> -)) - -export const AutoEvalCollapsedMetricValueCell = memo<CollapsedMetricValueCellProps>((props) => ( - <BaseCollapsedMetricValueCell - {...props} - emptyState={<div className="not-available-table-cell" />} - /> -)) - -export default CollapsedMetricValueCell diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricsCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricsCell.tsx deleted file mode 100644 index ceb5dd2df9..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/CollapsedMetricsCell.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import {memo} from "react" - -import {useAtomValue} from "jotai" - -import {scenarioMetricsMapFamily} from "../../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {CellWrapper} from "../CellComponents" - -export interface CollapsedMetricsCellProps { - scenarioId: string - evaluatorSlug?: string // undefined → include all evaluators -} - -const CollapsedMetricsCell = memo<CollapsedMetricsCellProps>(({scenarioId, evaluatorSlug}) => { - const rowMetrics = useAtomValue(scenarioMetricsMapFamily(scenarioId)) || {} - - const filtered: Record<string, any> = {} - Object.entries(rowMetrics).forEach(([k, v]) => { - if (!evaluatorSlug) { - filtered[k] = v - } else if (k.startsWith(`${evaluatorSlug}.`)) { - filtered[k.slice(evaluatorSlug.length + 1)] = v - } - }) - - return ( - <CellWrapper> - <pre className="whitespace-pre-wrap text-xs"> - {Object.keys(filtered).length ? JSON.stringify(filtered) : ""} - </pre> - </CellWrapper> - ) -}) - -export default CollapsedMetricsCell diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/MetricCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/MetricCell.tsx deleted file mode 100644 index 28268c68eb..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/MetricCell.tsx +++ /dev/null @@ -1,527 +0,0 @@ -import {type ReactNode, memo, useCallback, useMemo} from "react" - -import {Tag, Tooltip} from "antd" -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {useAtomValue} from "jotai" -import {loadable, selectAtom} from "jotai/utils" - -import {useCachedScenarioSteps} from "@/oss/components/EvalRunDetails/hooks/useCachedScenarioSteps" -import {useMetricStepError} from "@/oss/components/EvalRunDetails/hooks/useMetricStepError" -import {urlStateAtom} from "@/oss/components/EvalRunDetails/state/urlState" -import MetricDetailsPopover from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover" // adjust path if necessary -import {formatMetricValue} from "@/oss/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils" // same util used elsewhere -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import {getStatusLabel} from "@/oss/lib/constants/statusLabels" -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import { - evaluationRunStateFamily, - getCurrentRunId, - scenarioStepFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {scenarioMetricsMapFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {runScopedMetricDataFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {EvaluationStatus} from "@/oss/lib/Types" - -import {STATUS_COLOR_TEXT} from "../../../EvalRunScenarioStatusTag/assets" -import {CellWrapper} from "../CellComponents" // CellWrapper is default export? need to check. - -import {resolveAnnotationMetricValue, resolveStepFailure} from "./helpers" -import {AnnotationValueCellProps, MetricCellProps, MetricValueCellProps} from "./types" - -/* - * MetricCell – common renderer for metric columns (scenario-level or evaluator-level). - * Props: - * - metricKey: base metric name (without evaluator slug) - * - fullKey: full metric path as used in maps (e.g. "evaluator.slug.score") - * - value: value for current scenario row - * - distInfo: pre-computed distribution / stats for popover (optional) - * - metricType: primitive type from evaluator schema ("number", "boolean", "array", etc.) - */ - -const MetricCell = memo<MetricCellProps>( - ({ - hidePrimitiveTable = true, - scenarioId, - metricKey, - fullKey, - value, - distInfo, - metricType, - isComparisonMode, - }) => { - if (value === undefined || value === null) { - if (isComparisonMode) { - return ( - <CellWrapper> - <div className="not-available-table-cell" /> - </CellWrapper> - ) - } - return null - } - - if (typeof value === "object" && Object.keys(value || {}).length === 0) { - if (isComparisonMode) { - return ( - <CellWrapper> - <div className="not-available-table-cell" /> - </CellWrapper> - ) - } - return null - } - - const frequency = value?.frequency || value?.freq - - if (frequency && frequency?.length > 0) { - const mostFrequent = frequency.reduce((max, current) => - current.count > max.count ? current : max, - ).value - value = mostFrequent - } - - // Non-numeric arrays rendered as Tag list - let formatted: ReactNode = formatMetricValue(metricKey, value) - if (metricType === "boolean" && Array.isArray(value as any)) { - const trueEntry = (distInfo as any).frequency.find((f: any) => f.value === true) - const total = (distInfo as any).count ?? 0 - if (total) { - return ( - <div className="flex w-full gap-4"> - <div className="flex flex-col text-xs leading-snug w-full grow"> - <div className="flex flex-col w-full gap-1"> - <div className="flex justify-between text-xs gap-2"> - <span className="text-[#95DE64] font-medium">true</span> - <span className="text-[#97A4B0] font-medium">false</span> - </div> - <div className="h-2 bg-gray-200 rounded-full overflow-hidden"> - <div className="flex h-full"> - <div - className="h-full bg-[#95DE64]" - style={{ - width: `${((trueEntry?.count ?? 0) / total) * 100}%`, - }} - /> - <div - className="h-full bg-[#97A4B0] text-xs" - style={{ - width: `${((total - (trueEntry?.count ?? 0)) / total) * 100}%`, - }} - /> - </div> - </div> - </div> - </div> - <div className="self-stretch flex items-center justify-center"> - {(((trueEntry?.count ?? 0) / total) * 100).toFixed(2)} - </div> - </div> - ) - } - } - - if (metricType === "array" || Array.isArray(value)) { - const values = Array.isArray(value) ? value : [value] - // const Component = metricType === "string" ? "span" : Tag - formatted = - metricType === "string" ? ( - <div className="list-disc"> - {values.map((it: any) => ( - <li key={String(it)} className="capitalize"> - {String(it)} - </li> - ))} - </div> - ) : ( - <div className="flex flex-col"> - {values.map((it: any) => ( - <Tag key={String(it)} className="capitalize"> - {String(it)} - </Tag> - ))} - </div> - ) - } else if (typeof value === "object") { - // Extract primitive when wrapped in an object (e.g. { score, value, ... }) - if ("score" in value) value = (value as any).score - else { - const prim = Object.values(value || {}).find( - (v) => typeof v === "number" || typeof v === "string", - ) - value = prim !== undefined ? prim : JSON.stringify(value) - } - } - - // Boolean metrics – show raw value - if (metricType === "boolean") { - formatted = String(value) - } - - // 1) Detect string by the actual value, not by metricType - const isPlainString = typeof value === "string" - - // 2) When string, render as a wrapped block (no popover) - if (isPlainString) { - return ( - <CellWrapper> - <div className="max-w-full whitespace-pre-wrap break-words break-all"> - {value as string} - </div> - </CellWrapper> - ) - } - - // 3) Only show popover for non-strings - if (distInfo && !isPlainString) { - return ( - <CellWrapper> - <MetricDetailsPopover - metricKey={metricKey} - extraDimensions={distInfo} - highlightValue={value} - hidePrimitiveTable={hidePrimitiveTable} - metricType={metricType} - > - <span className="cursor-pointer underline underline-offset-2"> - {formatted} - </span> - </MetricDetailsPopover> - </CellWrapper> - ) - } - - return ( - <CellWrapper> - <Expandable expandKey={`${scenarioId}-${metricKey}-${fullKey}`}> - {formatted} - </Expandable> - </CellWrapper> - ) - }, -) - -// --- Wrapper cell that fetches the value from atoms ---------------------- - -export const MetricValueCell = memo<MetricValueCellProps>( - ({scenarioId, metricKey, fallbackKey, fullKey, metricType, evalType, runId, stepKey}) => { - const param = useMemo( - () => ({runId, scenarioId, metricKey}), - [runId, scenarioId, metricKey], - ) - - const fallbackParam = useMemo( - () => - fallbackKey && fallbackKey !== metricKey - ? ({runId, scenarioId, metricKey: fallbackKey} as const) - : param, - [fallbackKey, metricKey, param, runId, scenarioId], - ) - - const urlState = useAtomValue(urlStateAtom) - const isComparisonMode = Boolean(urlState.compare && urlState.compare.length > 0) - - let value, distInfo - const result = useAtomValue(runScopedMetricDataFamily(param as any)) - const fallbackResult = useAtomValue(runScopedMetricDataFamily(fallbackParam as any)) - - value = result.value - distInfo = result.distInfo - - if ((value === undefined || value === null) && fallbackResult) { - value = fallbackResult.value - distInfo = distInfo ?? fallbackResult.distInfo - } - const {errorStep} = useMetricStepError({ - runId, - scenarioId, - metricKey, - fallbackKey, - fullKey, - stepKey, - }) - - // TODO: create a separate component for error - if (errorStep?.status || errorStep?.error) { - const tooltipContent = - errorStep?.error || "Evaluator returned an error for this metric." - return ( - <Tooltip - title={<span className="whitespace-pre-wrap">{tooltipContent}</span>} - classNames={{body: "max-w-[200px] max-h-[300px] overflow-y-auto"}} - > - <span - className={clsx( - STATUS_COLOR_TEXT[errorStep?.status], - "text-wrap cursor-help", - )} - > - {getStatusLabel(errorStep?.status || EvaluationStatus.ERROR)} - </span> - </Tooltip> - ) - } - - return ( - <MetricCell - scenarioId={scenarioId} - metricKey={metricKey} - fullKey={fullKey} - value={value} - distInfo={distInfo} - metricType={metricType} - isComparisonMode={isComparisonMode} - /> - ) - }, -) - -export const EvaluatorFailureCell = ({status, error}: EvaluatorFailure) => { - const tooltipContent = error || "Evaluator returned an error for this metric." - const normalizedStatus = status || EvaluationStatus.ERROR - const statusClass = STATUS_COLOR_TEXT[normalizedStatus] || "text-red-500" - - return ( - <CellWrapper> - <Tooltip - title={<span className="whitespace-pre-wrap">{String(tooltipContent)}</span>} - classNames={{body: "max-w-[200px] max-h-[300px] overflow-y-auto"}} - > - <span className={clsx(statusClass, "text-wrap cursor-help")}> - {getStatusLabel(normalizedStatus)} - </span> - </Tooltip> - </CellWrapper> - ) -} - -// --- Annotation value cell ----------------------------------------------- -// It's a hot fix until we fix the backend issue for annotation metrics -// In the backend the metrics endpoint is not returning all the type of annotation metrics -export const AnnotationValueCell = memo<AnnotationValueCellProps>( - ({ - scenarioId, - stepKey, - name, - fieldPath, - metricKey, - metricType, - fullKey, - distInfo: propsDistInfo, - runId, - }) => { - // Use effective runId with fallback using useMemo - const effectiveRunId = useMemo(() => { - if (runId) return runId - try { - return getCurrentRunId() - } catch (error) { - return "" - } - }, [runId]) - // Get evaluators from run-scoped state instead of global atom - const evaluatorsSelector = useCallback((state: any) => { - return state?.enrichedRun?.evaluators ? Object.values(state.enrichedRun.evaluators) : [] - }, []) - const evaluatorsAtom = useMemo( - () => - selectAtom(evaluationRunStateFamily(effectiveRunId), evaluatorsSelector, deepEqual), - [effectiveRunId, evaluatorsSelector], - ) - const evaluators = useAtomValue(evaluatorsAtom) - const {data: stepData, hasResolved: hasAnnotationSteps} = useCachedScenarioSteps( - effectiveRunId, - scenarioId, - ) - - // Memoize annotation steps for best performance (multi-step) - const _annotationSteps = useMemo( - () => - (stepData?.annotationSteps ?? - []) as UseEvaluationRunScenarioStepsFetcherResult["annotationSteps"], - [stepData], - ) - - // Build annotations per step key / slug - const annotationsByStep = useMemo(() => { - type AnnStep = UseEvaluationRunScenarioStepsFetcherResult["annotationSteps"][number] - const map: Record<string, AnnStep[]> = {} - if (!_annotationSteps.length) return map - - _annotationSteps.forEach((step) => { - const annotation = step.annotation - const fullKey = step.stepKey ?? (step as any).key - const evaluatorSlug = annotation?.references?.evaluator?.slug - const linkKeys = annotation?.links ? Object.keys(annotation.links) : [] - - const possibleKeys = new Set<string>() - linkKeys.forEach((key) => { - if (key) possibleKeys.add(key) - }) - if (fullKey) { - possibleKeys.add(fullKey) - const invocationKey = fullKey.includes(".") ? fullKey.split(".")[0] : fullKey - if (invocationKey) possibleKeys.add(invocationKey) - } - if (evaluatorSlug) { - possibleKeys.add(evaluatorSlug) - } - - if (!possibleKeys.size) { - possibleKeys.add("__default__") - } - - possibleKeys.forEach((key) => { - if (!map[key]) map[key] = [] - map[key].push(step) - }) - }) - return map - }, [_annotationSteps]) - const buildAnnotateData = useCallback( - (lookupKey?: string) => { - const fallbackSteps = _annotationSteps || [] - const _steps = (lookupKey && annotationsByStep?.[lookupKey]) || fallbackSteps - const _annotations = _steps - .map((s) => s.annotation) - .filter(Boolean) as AnnotationDto[] - const annotationEvaluatorSlugs = _annotations - .map((annotation) => annotation?.references?.evaluator?.slug) - .filter(Boolean) - - return { - annotations: _annotations, - evaluatorSlugs: - evaluators - ?.map((e) => e.slug) - .filter((slug) => !annotationEvaluatorSlugs.includes(slug)) || [], - evaluators: - evaluators?.filter((e) => !annotationEvaluatorSlugs.includes(e.slug)) || [], - } - }, - [annotationsByStep, evaluators, _annotationSteps], - ) - const annotationKeys = useMemo( - () => Object.keys(annotationsByStep).filter((key) => key !== "__default__"), - [annotationsByStep], - ) - const resolvedAnnotationKey = useMemo(() => { - if (!annotationKeys.length) { - return annotationsByStep.__default__ ? "__default__" : undefined - } - - if (stepKey && stepKey !== "metric") { - if (annotationsByStep[stepKey]) return stepKey - - const suffixMatch = annotationKeys.find((key) => key.endsWith(stepKey)) - if (suffixMatch) return suffixMatch - } - - const slugCandidates = [metricKey, name, fieldPath] - .map((candidate) => candidate?.split(".")[0]) - .filter((slug): slug is string => Boolean(slug)) - - for (const slug of slugCandidates) { - const slugMatch = annotationKeys.find( - (key) => key === slug || key.endsWith(`.${slug}`), - ) - if (slugMatch) return slugMatch - } - - if (annotationsByStep.__default__) { - return "__default__" - } - - return annotationKeys[0] - }, [annotationKeys, annotationsByStep, fieldPath, metricKey, name, stepKey]) - const annotationsForStep = useMemo(() => { - const annotateData = buildAnnotateData(resolvedAnnotationKey) - return annotateData.annotations - }, [buildAnnotateData, resolvedAnnotationKey]) - - const failureInfo = useMemo(() => { - if (!stepData && !hasAnnotationSteps) return null - if (!stepData) return null - const slugHints = [ - resolvedAnnotationKey, - ...annotationsForStep.map( - (ann) => ann?.references?.evaluator?.slug || ann?.references?.evaluator?.key, - ), - ] - .flat() - .filter((slug): slug is string => Boolean(slug)) - - const uniqueSlugs = Array.from(new Set(slugHints)) - - const failure = resolveStepFailure({ - data: stepData, - scenarioId, - slugCandidates: uniqueSlugs, - stepKey, - debug: { - metricKey: metricKey ?? fieldPath ?? "", - runId: effectiveRunId, - }, - }) - - return failure - }, [ - annotationsForStep, - effectiveRunId, - fieldPath, - metricKey, - resolvedAnnotationKey, - scenarioId, - stepData, - stepKey, - ]) - - const metricVal = useMemo( - () => - resolveAnnotationMetricValue({ - annotations: annotationsForStep, - fieldPath, - metricKey, - name, - }), - [annotationsForStep, fieldPath, metricKey, name], - ) - const distInfo = propsDistInfo - - if (failureInfo?.status || failureInfo?.error) { - const tooltipContent = - failureInfo?.error || "Evaluator returned an error for this annotation." - return ( - <CellWrapper> - <Tooltip - title={tooltipContent} - classNames={{body: "max-w-[200px] max-h-[300px] overflow-y-auto"}} - > - <span - className={clsx( - STATUS_COLOR_TEXT[failureInfo?.status], - "text-wrap cursor-help", - )} - > - {getStatusLabel(failureInfo?.status || EvaluationStatus.ERROR)} - </span> - </Tooltip> - </CellWrapper> - ) - } - - return ( - <MetricCell - scenarioId={scenarioId} - metricKey={metricKey} - fullKey={fullKey ?? fieldPath} - value={metricVal} - distInfo={distInfo} - metricType={metricType} - /> - ) - }, -) - -export default MetricCell diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/helpers.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/helpers.ts deleted file mode 100644 index 2c7c3f1230..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/helpers.ts +++ /dev/null @@ -1,299 +0,0 @@ -import {AnnotationDto} from "@/oss/lib/hooks/useAnnotations/types" -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {EvaluationStatus} from "@/oss/lib/Types" - -interface ScenarioStep { - stepKey?: string - status?: string - error?: unknown - scenarioId?: string - references?: { - evaluator?: {slug?: string; key?: string} - application?: {slug?: string} - } -} - -const FAILURE_STATUS_SET = new Set( - [ - EvaluationStatus.FAILURE, - EvaluationStatus.FAILED, - EvaluationStatus.ERROR, - EvaluationStatus.ERRORS, - EvaluationStatus.AGGREGATION_FAILED, - EvaluationStatus.FINISHED_WITH_ERRORS, - ].map((status) => String(status).toLowerCase()), -) - -const normalizeStatus = (status?: string): string => { - if (!status) return "" - return String(status).toLowerCase() -} - -export const hasFailureStatus = (status?: string): boolean => { - return FAILURE_STATUS_SET.has(normalizeStatus(status)) -} - -export const resolveErrorMessage = (error: unknown): string | undefined => { - if (!error) return undefined - if (typeof error === "string") return error - - if (error instanceof Error) { - return error.stack || error.message - } - - if (typeof error === "object" && error !== null) { - const err = error as Record<string, unknown> - const code = - typeof err.code === "number" - ? err.code - : typeof err.statusCode === "number" - ? err.statusCode - : undefined - const message = - typeof err.message === "string" - ? err.message - : typeof err.detail === "string" - ? err.detail - : undefined - const typeLink = typeof err.type === "string" ? err.type : undefined - const stacktrace = - typeof err.stacktrace === "string" - ? err.stacktrace - : typeof err.stack === "string" - ? err.stack - : undefined - - if (code || message || typeLink || stacktrace) { - const lines: string[] = [] - if (code || message) { - lines.push(`(${code ?? ""}) ${message ?? "Evaluator returned an error."}`.trim()) - } - if (typeLink) { - lines.push("", "For more information, please follow this link:", typeLink) - } - if (stacktrace) { - lines.push("", "Stacktrace:", stacktrace) - } - return lines.join("\n").trim() - } - - try { - return JSON.stringify(error) - } catch { - return String(error) - } - } - - return String(error) -} - -const matchesSlug = (step: ScenarioStep | undefined, slug: string): boolean => { - if (!step || !slug) return false - const candidates = [slug] - const dashed = slug.replace(/\./g, "-") - if (dashed !== slug) candidates.push(dashed) - const underscored = slug.replace(/\./g, "_") - if (underscored !== slug) candidates.push(underscored) - - const stepIdentifiers = [ - step.stepKey, - step.references?.evaluator?.slug, - step.references?.evaluator?.key, - step.references?.application?.slug, - ] - for (const identifier of stepIdentifiers) { - if (!identifier) continue - const normalized = String(identifier).toLowerCase() - const matched = candidates.some((candidate) => { - const lowered = candidate.toLowerCase() - return ( - normalized === lowered || - normalized.endsWith(`.${lowered}`) || - normalized.endsWith(`-${lowered}`) || - normalized.endsWith(`_${lowered}`) - ) - }) - if (matched) return true - } - - return false -} - -const collectScenarioSteps = ( - data?: UseEvaluationRunScenarioStepsFetcherResult, -): ScenarioStep[] => { - if (!data) return [] - const buckets: ScenarioStep[] = [] - if (Array.isArray(data.steps)) buckets.push(...(data.steps as ScenarioStep[])) - if (Array.isArray(data.annotationSteps)) - buckets.push(...(data.annotationSteps as ScenarioStep[])) - if (Array.isArray(data.invocationSteps)) - buckets.push(...(data.invocationSteps as ScenarioStep[])) - return buckets -} - -export const resolveStepFailure = ({ - data, - scenarioId, - slugCandidates, - stepKey, - debug, -}: { - data?: UseEvaluationRunScenarioStepsFetcherResult - scenarioId: string - slugCandidates?: string[] - stepKey?: string - debug?: {metricKey: string; runId: string} -}): {status?: string; error?: string} | null => { - if (!data) return null - const steps = collectScenarioSteps(data) - const failureCandidates = steps.filter((step) => hasFailureStatus(step?.status)) - - let failingStep: ScenarioStep | undefined - - if (stepKey) { - failingStep = failureCandidates.find((step) => step.stepKey === stepKey) - } - - if (!failingStep && slugCandidates?.length) { - for (const candidateSlug of slugCandidates) { - if (!candidateSlug) continue - const match = failureCandidates.find((step) => matchesSlug(step, candidateSlug)) - if (match) { - failingStep = match - - break - } - } - } - - if (failingStep) { - return { - status: failingStep.status, - error: resolveErrorMessage(failingStep.error), - } - } - - const fallbackInvocation = (data.invocationSteps || []).find( - (step) => step?.scenarioId === scenarioId && hasFailureStatus(step?.status), - ) - - if (fallbackInvocation) { - return { - status: fallbackInvocation.status, - error: resolveErrorMessage(fallbackInvocation.error), - } - } - - return null -} - -const OUTPUTS_PREFIX = "data.outputs." -const OUTPUT_SECTION_KEYS = ["metrics", "notes", "extra"] as const - -const getNestedValue = (source: any, path?: string): any => { - if (!source || !path) return undefined - const segments = path.split(".").filter(Boolean) - if (!segments.length) return undefined - return segments.reduce<any>((acc, segment) => { - if (acc === undefined || acc === null) return undefined - return acc[segment] - }, source) -} - -const normalizeOutputsPath = (path?: string): string | undefined => { - if (!path) return undefined - if (path.startsWith(OUTPUTS_PREFIX)) { - return path.slice(OUTPUTS_PREFIX.length) - } - if (path.startsWith("outputs.")) { - return path.slice("outputs.".length) - } - return path -} - -export const resolveAnnotationMetricValue = ({ - annotations, - fieldPath, - metricKey, - name, -}: { - annotations: AnnotationDto[] - fieldPath?: string - metricKey?: string - name?: string -}) => { - if (!annotations?.length) return undefined - - const fieldSegments = fieldPath?.split(".").filter(Boolean) ?? [] - - const annotationsBySlug = new Map<string, AnnotationDto>() - annotations.forEach((ann) => { - const slug = ann?.references?.evaluator?.slug - if (slug) annotationsBySlug.set(slug, ann) - }) - - const slugIndex = fieldSegments.findIndex((segment) => annotationsBySlug.has(segment)) - const slug = slugIndex >= 0 ? fieldSegments[slugIndex] : undefined - const remainderSegments = slugIndex >= 0 ? fieldSegments.slice(slugIndex + 1) : fieldSegments - const remainderPath = remainderSegments.length ? remainderSegments.join(".") : undefined - - const keyCandidates = Array.from( - new Set( - [metricKey, name, remainderSegments.at(-1), fieldSegments.at(-1)] - .filter((key): key is string => Boolean(key)) - .map((key) => key), - ), - ) - - const outputPathCandidates = Array.from( - new Set( - [ - normalizeOutputsPath(fieldPath), - normalizeOutputsPath(remainderPath), - ...keyCandidates.flatMap((key) => - OUTPUT_SECTION_KEYS.map((section) => `${section}.${key}`), - ), - ].filter((path): path is string => Boolean(path)), - ), - ) - - const rootPathCandidates = Array.from( - new Set([fieldPath, remainderPath, ...keyCandidates].filter(Boolean) as string[]), - ) - - const prioritizedAnnotations = (() => { - if (slug) { - const matched = annotationsBySlug.get(slug) - if (matched) return [matched] - } - - const matchedByKey = annotations.filter((ann) => { - const outputs = ann?.data?.outputs - if (!outputs) return false - return keyCandidates.some((key) => - OUTPUT_SECTION_KEYS.some( - (section) => getNestedValue(outputs[section], key) !== undefined, - ), - ) - }) - - if (matchedByKey.length) return matchedByKey - return annotations - })() - - for (const ann of prioritizedAnnotations) { - const outputs = ann?.data?.outputs ?? {} - for (const path of outputPathCandidates) { - const val = getNestedValue(outputs, path) - if (val !== undefined) return val - } - - for (const path of rootPathCandidates) { - const val = getNestedValue(ann, path) - if (val !== undefined) return val - } - } - - return undefined -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/types.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/types.ts deleted file mode 100644 index 3b5f7eea48..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/MetricCell/types.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {BasicStats, SchemaMetricType} from "@/oss/lib/metricUtils" - -import {TableColumn} from "../types" - -export interface MetricCellProps { - scenarioId: string - metricKey: string - fullKey?: string - value: any - distInfo?: Record<string, BasicStats> | Promise<Record<string, BasicStats>> - metricType?: SchemaMetricType - isComparisonMode?: boolean -} - -export interface MetricValueCellProps { - scenarioId: string - metricKey: string - fallbackKey?: string - fullKey?: string - distInfo?: Record<string, BasicStats> | Promise<Record<string, BasicStats>> - metricType?: SchemaMetricType - evalType?: "auto" | "human" - runId?: string - stepKey?: string -} - -export interface AnnotationValueCellProps { - scenarioId: string - fieldPath: string // e.g. "data.outputs.isGood" - metricKey: string - fullKey?: string - distInfo?: Record<string, BasicStats> | Promise<Record<string, BasicStats>> - metricType?: SchemaMetricType - stepKey?: string - name?: string - runId?: string -} - -export interface CollapsedAnnotationValueCellProps { - scenarioId: string - childrenDefs: TableColumn[] - runId?: string -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ScenarioTraceSummary.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ScenarioTraceSummary.tsx deleted file mode 100644 index 79d949f293..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/ScenarioTraceSummary.tsx +++ /dev/null @@ -1,307 +0,0 @@ -import {memo, useMemo} from "react" - -import {Clock} from "@phosphor-icons/react" -import clsx from "clsx" - -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import useEvalRunScenarioData from "@/oss/lib/hooks/useEvaluationRunData/useEvalRunScenarioData" - -import {titleCase} from "./flatDataSourceBuilder" -import TraceMetrics from "../../../AutoEvalRun/components/EvalRunScoreTable/assets/TraceMetrics" - -type InvocationParamsEntry = - | { - requestBody?: { - ag_config?: { - prompt?: { - messages?: Array<{role?: string; content?: string}> - template_format?: string - input_keys?: string[] - llm_config?: { - model?: string - } - } - } - inputs?: Record<string, unknown> - } - } - | null - | undefined - -const getNestedValue = (root: any, path: string): any => { - return path.split(".").reduce((acc, key) => { - if (acc && typeof acc === "object") { - return acc[key] - } - return undefined - }, root as any) -} - -const takeFirstNumber = (values: Array<number | string | undefined | null>): number | undefined => { - for (const value of values) { - if (typeof value === "number" && !Number.isNaN(value)) return value - if (typeof value === "string") { - const parsed = Number(value) - if (!Number.isNaN(parsed)) return parsed - } - } - return undefined -} - -const normaliseText = (value: unknown): string => { - if (value === null || value === undefined) return "" - if (typeof value === "string") return value - if (typeof value === "number" || typeof value === "boolean") return String(value) - try { - return JSON.stringify(value, null, 2) - } catch (error) { - return String(value) - } -} - -const ScenarioTraceSummary = ({ - scenarioId, - stepKey, - runId, - trace, - status, - className, -}: { - scenarioId: string - stepKey: string - runId?: string - trace?: any - status?: {status?: string} - className?: string -}) => { - const scenarioData = useEvalRunScenarioData(scenarioId, runId) - - const invocationStep = useMemo(() => { - const steps = scenarioData?.invocationSteps ?? [] - if (!steps.length) return undefined - if (!stepKey) return steps[0] - return steps.find((step) => step.stepKey === stepKey) ?? steps[0] - }, [scenarioData?.invocationSteps, stepKey]) - - const invocationParams = useMemo<InvocationParamsEntry>(() => { - const stepKeyEntry = invocationStep?.stepKey - const scopedParams = - invocationStep?.invocationParameters ?? scenarioData?.invocationParameters - if (stepKeyEntry && scopedParams && stepKeyEntry in scopedParams) { - return scopedParams[stepKeyEntry] - } - if (scopedParams) { - const firstEntry = Object.values(scopedParams).find(Boolean) - if (firstEntry) return firstEntry as InvocationParamsEntry - } - return undefined - }, [ - invocationStep?.invocationParameters, - invocationStep?.stepKey, - scenarioData?.invocationParameters, - ]) - - const promptMessages = useMemo(() => { - const messages = invocationParams?.requestBody?.ag_config?.prompt?.messages - if (!Array.isArray(messages)) return [] - return messages.filter((msg) => !!msg && normaliseText(msg.content).trim().length > 0) - }, [invocationParams]) - - const promptText = useMemo(() => { - if (!promptMessages.length) return "" - return promptMessages - .map((msg) => { - const role = msg.role ? titleCase(msg.role) : "Message" - const content = normaliseText(msg.content) - return `${role}\n${content}` - }) - .join("\n\n") - }, [promptMessages]) - - const inputEntries = useMemo(() => { - const entries: Array<{key: string; value: string}> = [] - const inputs = invocationParams?.requestBody?.inputs - if (inputs && typeof inputs === "object") { - Object.entries(inputs).forEach(([key, value]) => { - const textValue = normaliseText(value).trim() - entries.push({ - key, - value: textValue.length > 0 ? textValue : "—", - }) - }) - } - return entries - }, [invocationParams]) - - const modelName = - invocationParams?.requestBody?.ag_config?.prompt?.llm_config?.model || - getNestedValue(trace, "otel.attributes.llm.request.model") || - getNestedValue(trace, "otel.attributes.llm.model") || - getNestedValue(trace, "otel.attributes.model") - - const templateFormat = invocationParams?.requestBody?.ag_config?.prompt?.template_format - - const startedAt = - invocationStep?.createdAt || - invocationStep?.timestamp || - getNestedValue(trace, "time.start") - - const latencySeconds = takeFirstNumber([ - getNestedValue(trace, "metrics.duration.cumulative"), - getNestedValue(trace, "metrics.duration.total"), - getNestedValue(trace, "metrics.duration"), - typeof invocationStep?.interval === "number" ? invocationStep.interval / 1000 : undefined, - (() => { - const start = getNestedValue(trace, "time.start") - const end = getNestedValue(trace, "time.end") - if (start && end) { - const delta = dayjs(end).diff(dayjs(start), "second", true) - return Number.isFinite(delta) ? delta : undefined - } - return undefined - })(), - ]) - - const totalCost = takeFirstNumber([ - getNestedValue(trace, "metrics.costs.cumulative.total"), - getNestedValue(trace, "metrics.cost.total"), - getNestedValue(trace, "metrics.cost"), - getNestedValue(trace, "data.metrics.costs.cumulative.total"), - getNestedValue(trace, "data.costs.cumulative.total"), - getNestedValue(trace, "attributes.ag.metrics.costs.cumulative.total"), - getNestedValue(trace, "otel.attributes.ag.metrics.costs.cumulative.total"), - ]) - - const totalTokens = takeFirstNumber([ - getNestedValue(trace, "metrics.tokens.cumulative.total"), - getNestedValue(trace, "metrics.tokens.total"), - getNestedValue(trace, "metrics.tokens"), - getNestedValue(trace, "data.metrics.tokens.cumulative.total"), - getNestedValue(trace, "attributes.ag.metrics.tokens.cumulative.total"), - getNestedValue(trace, "otel.attributes.ag.metrics.tokens.cumulative.total"), - ]) - - const statusLabel = useMemo(() => { - const raw = status?.status || invocationStep?.status - if (!raw) return undefined - return titleCase(raw.replace(/_/g, " ")) - }, [status?.status, invocationStep?.status]) - - const hasMetrics = [latencySeconds, totalCost, totalTokens].some( - (value) => typeof value === "number" && !Number.isNaN(value), - ) - - const hasAnyDetails = - Boolean(trace) || - Boolean(statusLabel) || - Boolean(modelName) || - Boolean(templateFormat) || - Boolean(startedAt) || - hasMetrics || - promptText.length > 0 || - inputEntries.length > 0 - - if (!hasAnyDetails) return null - - const formattedStartedAt = startedAt ? dayjs(startedAt).format("MMM D, YYYY HH:mm:ss") : null - - return ( - <div - className={clsx( - "flex w-full flex-col gap-2 rounded-md border border-gray-200 bg-white/70 p-3 text-xs text-gray-600 shadow-[0_1px_3px_rgba(15,23,42,0.05)]", - className, - )} - > - {(statusLabel || modelName || templateFormat) && ( - <div className="flex flex-wrap items-center gap-2"> - {statusLabel ? ( - <span className="inline-flex items-center gap-1 rounded-full border border-gray-200 bg-gray-50 px-2 py-1 text-[11px] font-semibold text-gray-600"> - Status - <span className="font-medium text-gray-900">{statusLabel}</span> - </span> - ) : null} - {modelName ? ( - <span className="inline-flex items-center gap-1 rounded-full border border-gray-200 bg-gray-50 px-2 py-1 text-[11px] font-semibold text-gray-600"> - Model - <span className="font-medium text-gray-900">{modelName}</span> - </span> - ) : null} - {templateFormat ? ( - <span className="inline-flex items-center gap-1 rounded-full border border-gray-200 bg-gray-50 px-2 py-1 text-[11px] font-semibold text-gray-600"> - Template - <span className="font-medium uppercase text-gray-900"> - {templateFormat} - </span> - </span> - ) : null} - </div> - )} - - {(formattedStartedAt || hasMetrics) && ( - <div className="flex flex-wrap items-center gap-3 text-[11px] text-gray-500"> - {formattedStartedAt ? ( - <span className="inline-flex items-center gap-1 font-medium"> - <Clock size={12} /> - {formattedStartedAt} - </span> - ) : null} - {hasMetrics ? ( - <TraceMetrics - latency={latencySeconds ?? 0} - cost={totalCost ?? 0} - tokens={totalTokens ?? 0} - /> - ) : null} - </div> - )} - {!hasMetrics && !formattedStartedAt && trace ? ( - <span className="text-[11px] text-gray-500"> - Trace captured. Use focus view to inspect the full execution. - </span> - ) : null} - - {inputEntries.length > 0 ? ( - <div className="flex flex-col gap-1"> - <span className="text-[11px] font-semibold uppercase tracking-wide text-gray-500"> - Inputs - </span> - <Expandable expandKey={`${scenarioId}-${stepKey}-trace-inputs`}> - <div className="flex flex-wrap gap-1.5"> - {inputEntries.map((entry) => ( - <span - key={`${entry.key}-${entry.value}`} - className="max-w-[240px] truncate rounded border border-gray-200 bg-white px-2 py-1 text-[11px] font-medium text-gray-700" - title={`${entry.key}: ${entry.value}`} - > - <span className="mr-1 uppercase tracking-wide text-gray-400"> - {entry.key} - </span> - <span className="text-gray-800">{entry.value}</span> - </span> - ))} - </div> - </Expandable> - </div> - ) : null} - - {promptText ? ( - <div className="flex flex-col gap-1"> - <span className="text-[11px] font-semibold uppercase tracking-wide text-gray-500"> - Prompt - </span> - <Expandable - expandKey={`${scenarioId}-${stepKey}-trace-prompt`} - className="[&_pre]:!text-xs" - > - <pre className="whitespace-pre-wrap rounded border border-gray-200 bg-gray-50 px-2 py-2 text-left text-[12px] text-gray-800"> - {promptText} - </pre> - </Expandable> - </div> - ) : null} - </div> - ) -} - -export default memo(ScenarioTraceSummary) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/StatusCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/StatusCell.tsx deleted file mode 100644 index c93ed1d64f..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/StatusCell.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import {memo} from "react" - -import {useRunId} from "@/oss/contexts/RunIdContext" - -import EvalRunScenarioStatusTag from "../../EvalRunScenarioStatusTag" - -import {CellWrapper} from "./CellComponents" - -interface Props { - scenarioId: string - result?: string - runId?: string -} - -/** - * Lightweight status cell for Scenario rows. - * Displays coloured status tag and optional result snippet. - */ -const StatusCell = ({scenarioId, runId: propRunId}: Props) => { - const contextRunId = useRunId() - const effectiveRunId = propRunId || contextRunId - - return ( - <CellWrapper className="gap-2"> - <EvalRunScenarioStatusTag scenarioId={scenarioId} runId={effectiveRunId} /> - </CellWrapper> - ) -} - -export default memo(StatusCell) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/TimestampCell.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/TimestampCell.tsx deleted file mode 100644 index 360cdded82..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/TimestampCell.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import {memo, useMemo} from "react" - -import {atom, useAtomValue} from "jotai" - -import {useRunId} from "@/oss/contexts/RunIdContext" -import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" -import {evaluationRunStateFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {evalAtomStore} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/store" -import { - hasScenarioStepData, - useScenarioStepSnapshot, -} from "@/oss/lib/hooks/useEvaluationRunData/useScenarioStepSnapshot" - -import {CellWrapper} from "./CellComponents" - -const TimestampCell = ({ - scenarioId, - runId: propRunId, - timestamp: providedTimestamp, - isGroupStart = true, -}: { - scenarioId: string - runId?: string - timestamp?: string | null - isGroupStart?: boolean -}) => { - const store = evalAtomStore() - const contextRunId = useRunId() - const effectiveRunId = useMemo( - () => propRunId ?? contextRunId ?? null, - [propRunId, contextRunId], - ) - - const stepSnapshot = useScenarioStepSnapshot(scenarioId, effectiveRunId) - - const runStateAtom = useMemo( - () => (effectiveRunId ? evaluationRunStateFamily(effectiveRunId) : atom(() => undefined)), - [effectiveRunId], - ) - const runState = useAtomValue(runStateAtom, {store}) as any - - let timestamp: string | undefined | null = providedTimestamp ?? undefined - if (!timestamp && hasScenarioStepData(stepSnapshot.data)) { - const invocation = stepSnapshot.data?.invocationSteps?.[0] - const fallback = invocation ?? stepSnapshot.data?.inputSteps?.[0] - timestamp = - (invocation?.timestamp as string | undefined) || - (invocation?.createdAt as string | undefined) || - (fallback?.timestamp as string | undefined) || - (fallback?.createdAt as string | undefined) - } - - if (!timestamp && runState) { - const scenario = - Array.isArray(runState?.scenarios) && - runState.scenarios.find((sc: any) => sc.id === scenarioId || sc._id === scenarioId) - timestamp = - (scenario?.timestamp as string | undefined) || - (scenario?.createdAt as string | undefined) || - timestamp - if (!timestamp) { - const timeMeta = runState?.statusMeta?.timestamps?.[scenarioId] - const transitionMeta = runState?.statusMeta?.transitions?.[scenarioId] - const candidate = - (timeMeta?.startedAt as any) ?? - (timeMeta?.endedAt as any) ?? - (Array.isArray(transitionMeta) && transitionMeta[0]?.timestamp) - if (candidate != null) { - timestamp = String(candidate) - } - } - } - - const normalizeToDayjs = (value: string | number | undefined) => { - if (value == null) return null - if (typeof value === "string") { - const parsed = dayjs(value) - if (parsed.isValid()) return parsed - const numeric = Number(value) - if (!Number.isNaN(numeric)) { - const ms = numeric > 1e12 ? numeric : numeric * 1000 - const parsedNumeric = dayjs(ms) - return parsedNumeric.isValid() ? parsedNumeric : null - } - return null - } - if (typeof value === "number") { - const ms = value > 1e12 ? value : value * 1000 - const parsed = dayjs(ms) - return parsed.isValid() ? parsed : null - } - return null - } - - const parsedTimestamp = normalizeToDayjs(timestamp || undefined) - const formatted = parsedTimestamp?.isValid() - ? parsedTimestamp.format("MMM D, YYYY HH:mm:ss") - : undefined - - if ( - !formatted && - process.env.NODE_ENV !== "production" && - typeof window !== "undefined" && - effectiveRunId - ) { - console.debug("[OnlineEval][TimestampCell] Missing timestamp", { - runId: effectiveRunId, - scenarioId, - raw: timestamp, - stepState: stepSnapshot.state, - }) - } - - return ( - <CellWrapper className="text-gray-600"> - {formatted ? ( - <span className={isGroupStart ? "font-medium" : "text-gray-400"}>{formatted}</span> - ) : ( - <span className="text-gray-400">—</span> - )} - </CellWrapper> - ) -} - -export default memo(TimestampCell) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/VirtualizedScenarioTableAnnotateDrawer.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/VirtualizedScenarioTableAnnotateDrawer.tsx deleted file mode 100644 index caac5fb614..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/VirtualizedScenarioTableAnnotateDrawer.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import {memo, useCallback} from "react" - -import {DrawerProps} from "antd" -import clsx from "clsx" -import {getDefaultStore, useAtomValue} from "jotai" - -import EnhancedDrawer from "@/oss/components/EnhancedUIs/Drawer" -import {virtualScenarioTableAnnotateDrawerAtom} from "@/oss/lib/atoms/virtualTable" - -import ScenarioAnnotationPanel from "../../../HumanEvalRun/components/ScenarioAnnotationPanel" - -interface VirtualizedScenarioTableAnnotateDrawerProps extends DrawerProps { - runId?: string -} -const VirtualizedScenarioTableAnnotateDrawer = ({ - runId: propRunId, - ...props -}: VirtualizedScenarioTableAnnotateDrawerProps) => { - const store = getDefaultStore() - - // Annotate drawer state (global, per-run) - const annotateDrawer = useAtomValue(virtualScenarioTableAnnotateDrawerAtom) - const setAnnotateDrawer = store.set - - const scenarioId = annotateDrawer.scenarioId - // Use runId from atom state if available, fallback to prop - const runId = annotateDrawer.runId || propRunId - - const closeDrawer = useCallback(() => { - setAnnotateDrawer( - virtualScenarioTableAnnotateDrawerAtom, - // @ts-ignore - (prev) => { - return { - ...prev, - open: false, - } - }, - ) - }, []) - - return ( - <EnhancedDrawer - title="Annotate scenario" - width={400} - classNames={{body: "!p-0"}} - onClose={closeDrawer} - open={annotateDrawer.open} - {...props} - > - <div - className={clsx([ - "flex flex-row gap-8 items-start self-stretch", - "[&_.ant-card]:!rounded-none [&_.scenario-annotate-panel]:!rounded-none", - ])} - > - <div - className={clsx([ - "scenario-annotate-panel", - "w-[400px] shrink-0 relative rounded-lg overflow-hidden", - ])} - > - {scenarioId && runId && ( - <ScenarioAnnotationPanel - scenarioId={scenarioId} - runId={runId} - buttonClassName="fixed top-[10px] right-2 z-50" - classNames={{ - body: "!p-0 [&_.ant-btn]:mx-3 [&_.ant-btn]:mb-3 [&_.ant-btn]:mt-1", - }} - onAnnotate={closeDrawer} - /> - )} - </div> - </div> - </EnhancedDrawer> - ) -} - -export default memo(VirtualizedScenarioTableAnnotateDrawer) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/atoms/evaluatorFailures.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/atoms/evaluatorFailures.ts deleted file mode 100644 index 0c11d76b85..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/atoms/evaluatorFailures.ts +++ /dev/null @@ -1,70 +0,0 @@ -import deepEqual from "fast-deep-equal" -import {atom} from "jotai" -import {atomFamily} from "jotai/utils" - -import { - displayedScenarioIdsFamily, - loadableScenarioStepFamily, - scenarioStepLocalFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedScenarios" - -import {EvaluatorFailure, hasFailureStatus, resolveErrorMessage} from "../MetricCell/helpers" - -export type EvaluatorFailureMap = Map<string, Record<string, EvaluatorFailure>> - -export const evaluatorFailuresMapFamily = atomFamily( - (runId: string) => - atom((get) => { - const scenarioIds = get(displayedScenarioIdsFamily(runId)) ?? [] - const result: EvaluatorFailureMap = new Map() - - scenarioIds.forEach((scenarioId) => { - const loadable = get(loadableScenarioStepFamily({runId, scenarioId})) - let data = loadable.state === "hasData" ? loadable.data : undefined - if (!data) { - const local = get(scenarioStepLocalFamily({runId, scenarioId})) - if (local && Object.keys(local).length > 0) { - data = local - } - } - if (!data) return - - const failures: Record<string, EvaluatorFailure> = {} - const handleStep = (step: any) => { - if (!step) return - const slugCandidate = - step?.annotation?.references?.evaluator?.slug ?? - step?.references?.evaluator?.slug ?? - step?.references?.application?.slug ?? - step?.stepKey?.split?.(".")?.[0] - if (!slugCandidate || failures[slugCandidate]) return - if (hasFailureStatus(step?.status)) { - failures[slugCandidate] = { - status: step?.status, - error: resolveErrorMessage(step?.error), - } - } - } - - const annotationSteps = Array.isArray(data.annotationSteps) - ? data.annotationSteps - : [] - annotationSteps.forEach(handleStep) - - const invocationSteps = Array.isArray(data.invocationSteps) - ? data.invocationSteps - : [] - invocationSteps.forEach(handleStep) - - const generalSteps = Array.isArray(data.steps) ? data.steps : [] - generalSteps.forEach(handleStep) - - if (Object.keys(failures).length) { - result.set(scenarioId, failures) - } - }) - - return result - }), - deepEqual, -) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/constants.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/constants.ts deleted file mode 100644 index 9726bb3410..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/constants.ts +++ /dev/null @@ -1,78 +0,0 @@ -// Centralized column widths for easy reuse -export const COLUMN_WIDTHS = { - input: 400, - groundTruth: 460, - response: 400, - action: 140, - metric: 100, - padding: 100, -} as const - -// Table layout constants -export const TABLE_LAYOUT = { - rowHeight: 54, // approximate height of one table row (px) -} as const - -export const SKELETON_ROW_COUNT = 5 - -export const GeneralHumanEvalMetricColumns = [ - { - name: "totalCost", - kind: "metric", - path: "totalCost", - stepKey: "metric", - metricType: "number", - }, - { - name: "Total Duration", - kind: "metric", - path: "duration.total", - stepKey: "metric", - metricType: "number", - }, - { - name: "totalTokens", - kind: "metric", - path: "totalTokens", - stepKey: "metric", - metricType: "number", - }, - { - name: "errors", - kind: "metric", - path: "errors", - stepKey: "metric", - metricType: "number", - }, -] - -export const GeneralAutoEvalMetricColumns = [ - { - name: "Cost (Total)", - kind: "metric", - path: "attributes.ag.metrics.costs.cumulative.total", - stepKey: "metric", - metricType: "number", - }, - { - name: "Duration (Total)", - kind: "metric", - path: "attributes.ag.metrics.duration.cumulative", - stepKey: "metric", - metricType: "number", - }, - { - name: "Tokens (Total)", - kind: "metric", - path: "attributes.ag.metrics.tokens.cumulative.total", - stepKey: "metric", - metricType: "number", - }, - { - name: "Errors", - kind: "metric", - path: "attributes.ag.metrics.errors.cumulative", - stepKey: "metric", - metricType: "number", - }, -] diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/dataSourceBuilder.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/dataSourceBuilder.ts deleted file mode 100644 index 19b7f47efd..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/dataSourceBuilder.ts +++ /dev/null @@ -1,820 +0,0 @@ -import groupBy from "lodash/groupBy" - -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {formatColumnTitle} from "@/oss/components/Filters/EditColumns/assets/helper" -import { - evalAtomStore, - evaluationEvaluatorsFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import type { - ColumnDef, - RunIndex, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/helpers/buildRunIndex" -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" -import {BasicStats, canonicalizeMetricKey} from "@/oss/lib/metricUtils" -import {buildSkeletonRows} from "@/oss/lib/tableUtils" - -import {TableRow} from "../types" - -import {GeneralAutoEvalMetricColumns, GeneralHumanEvalMetricColumns} from "./constants" -import {createEvaluatorNameResolver} from "./evaluatorNameUtils" - -const pickString = (value: unknown): string | undefined => { - if (typeof value !== "string") return undefined - const trimmed = value.trim() - return trimmed.length ? trimmed : undefined -} - -const resolvePreferredSlug = ( - slug: string | undefined, - revisionSlugByEvaluatorSlug?: Map<string, string>, -): string | undefined => { - if (!slug) return undefined - return revisionSlugByEvaluatorSlug?.get(slug) ?? slug -} - -const buildBaseSlugByRevisionSlug = ( - revisionSlugByEvaluatorSlug?: Map<string, string>, -): Map<string, string> => { - const map = new Map<string, string>() - revisionSlugByEvaluatorSlug?.forEach((revision, base) => { - if (revision) { - map.set(revision, base) - } - }) - return map -} - -const resolveSlugFromStepMeta = ( - meta: RunIndex["steps"][string] | undefined, - revisionSlugByEvaluatorSlug?: Map<string, string>, -): string | undefined => { - if (!meta) return undefined - const refs: any = meta?.refs ?? {} - const baseSlug = - pickString(meta?.key) ?? - pickString(refs?.evaluator?.slug) ?? - pickString(refs?.evaluator_variant?.slug) ?? - pickString(refs?.evaluatorRevision?.slug) ?? - pickString(meta.key) - return resolvePreferredSlug(baseSlug, revisionSlugByEvaluatorSlug) -} - -const buildMetricDefsLookup = ( - metricsByEvaluator: Record<string, any[]>, - revisionSlugByEvaluatorSlug?: Map<string, string>, -) => { - const baseSlugByRevisionSlug = new Map<string, string>() - revisionSlugByEvaluatorSlug?.forEach((revision, base) => { - if (revision) baseSlugByRevisionSlug.set(revision, base) - }) - - return (slug: string | undefined): any[] => { - if (!slug) return [] - const direct = metricsByEvaluator[slug] - if (Array.isArray(direct) && direct.length) return direct - const base = baseSlugByRevisionSlug.get(slug) - if (base) { - const baseDefs = metricsByEvaluator[base] - if (Array.isArray(baseDefs) && baseDefs.length) return baseDefs - } - return [] - } -} - -const OUTPUT_PREFIX = "attributes.ag.data.outputs." -const OUTPUT_PREFIX_LOWER = OUTPUT_PREFIX.toLowerCase() - -const normalizeEvaluatorMetricName = (name?: string): string | undefined => { - if (typeof name !== "string") return undefined - const trimmed = name.trim() - if (!trimmed) return undefined - const lower = trimmed.toLowerCase() - if (lower.startsWith(OUTPUT_PREFIX_LOWER)) { - const tail = trimmed.slice(OUTPUT_PREFIX.length) - return tail ? `outputs.${tail}` : "outputs" - } - return trimmed -} - -const inferMetricTypeFromStats = (stats: BasicStats | undefined): string | undefined => { - if (!stats) return undefined - if (typeof (stats as any).mean === "number" || typeof (stats as any).sum === "number") { - return "number" - } - if (Array.isArray((stats as any).frequency)) { - const values = (stats as any).frequency.map((entry: any) => entry?.value) - const uniqueTypes = new Set(values.map((value) => typeof value)) - if (uniqueTypes.size === 1) { - const [only] = Array.from(uniqueTypes) - if (only === "boolean") return "boolean" - if (only === "string") return "string" - } - } - return undefined -} - -const inferMetricsFromStatsForSlug = ( - slug: string, - statsMap: Record<string, BasicStats> | undefined, - relatedSlugs: string[] = [], -): any[] => { - if (!slug || !statsMap) return [] - const candidates = new Set<string>([slug, ...relatedSlugs].filter(Boolean) as string[]) - const derived = new Map<string, {metricType?: string}>() - - const recordMetric = (name: string | undefined, stats: BasicStats | undefined) => { - if (!name) return - const normalizedName = normalizeEvaluatorMetricName(name) ?? name - if (!normalizedName) return - const existing = derived.get(normalizedName) ?? {} - if (!existing.metricType) { - const inferred = inferMetricTypeFromStats(stats) - if (inferred) existing.metricType = inferred - } - derived.set(normalizedName, existing) - } - - Object.entries(statsMap).forEach(([rawKey, stats]) => { - if (typeof rawKey !== "string") return - for (const candidate of candidates) { - const prefix = `${candidate}.` - if (rawKey.startsWith(prefix)) { - const metricName = rawKey.slice(prefix.length) - if (metricName && !metricName.includes("attributes.ag.metrics")) { - if (metricName.startsWith(OUTPUT_PREFIX)) { - const tail = metricName.slice(OUTPUT_PREFIX.length) - if (tail) { - recordMetric(`${tail}`, stats) - } - } - } - return - } - } - - if (rawKey.startsWith(OUTPUT_PREFIX)) { - const tail = rawKey.slice(OUTPUT_PREFIX.length) - if (!tail) return - recordMetric(`outputs.${tail}`, stats) - } - }) - - return Array.from(derived.entries()).map(([key, meta]) => ({[key]: meta})) -} - -const AUTO_INVOCATION_METRIC_SUFFIXES = GeneralAutoEvalMetricColumns.map((col) => col.path) -const AUTO_INVOCATION_METRIC_CANONICAL_SET = new Set( - AUTO_INVOCATION_METRIC_SUFFIXES.map((path) => canonicalizeMetricKey(path)), -) - -const matchesGeneralInvocationMetric = (path?: string): boolean => { - if (!path) return false - if (AUTO_INVOCATION_METRIC_SUFFIXES.some((suffix) => path.endsWith(suffix))) { - return true - } - const segments = path.split(".") - for (let i = 0; i < segments.length; i += 1) { - const candidate = segments.slice(i).join(".") - if (AUTO_INVOCATION_METRIC_CANONICAL_SET.has(canonicalizeMetricKey(candidate))) { - return true - } - } - return AUTO_INVOCATION_METRIC_CANONICAL_SET.has(canonicalizeMetricKey(path)) -} - -/** - * Build the data source (rows) for the virtualised scenario table. - * This logic was previously inline inside the table component; moving it here means - * the component can stay tidy while we have a single canonical place that knows: - * • which scenarios belong to the run - * • what their execution / annotation status is - * • how to present skeleton rows while data is still loading - */ - -export function buildScenarioTableRows({ - scenarioIds, - allScenariosLoaded, - skeletonCount = 20, - runId, - scenarioMetaById, -}: { - scenarioIds: string[] - allScenariosLoaded: boolean - skeletonCount?: number - runId: string - scenarioMetaById?: Map<string, {timestamp?: string; createdAt?: string}> -}): TableRow[] { - if (!allScenariosLoaded) { - // Render placeholder skeleton rows (fixed count) so the table height is stable - return buildSkeletonRows(skeletonCount).map((r, idx) => ({ - ...r, - scenarioIndex: idx + 1, - })) - } - - let previousGroupKey: string | undefined - let temporalGroupIndex = -1 - - return scenarioIds.map((id, idx) => { - const meta = scenarioMetaById?.get(id) - const timestamp = meta?.timestamp || meta?.createdAt || null - const groupKey = timestamp ?? "__no_timestamp__" - const isGroupStart = groupKey !== previousGroupKey - if (isGroupStart) { - temporalGroupIndex += 1 - previousGroupKey = groupKey - } - - return { - key: id, - scenarioId: id, - scenarioIndex: idx + 1, - runId, - timestamp, - temporalGroupKey: groupKey, - temporalGroupIndex, - isTemporalGroupStart: isGroupStart, - } - }) -} - -/** - * Build raw ColumnDef list for scenario table. - */ -export function buildScenarioTableData({ - runIndex, - metricsFromEvaluators, - metrics, - runId, - evaluators, - evaluatorNameBySlug, - revisionSlugByEvaluatorSlug, -}: { - runIndex: RunIndex | null | undefined - metricsFromEvaluators: Record<string, any> - metrics: Record<string, BasicStats> - runId: string - evaluators: EvaluatorDto[] - evaluatorNameBySlug?: Record<string, string> - revisionSlugByEvaluatorSlug?: Map<string, string> -}): (ColumnDef & {values?: Record<string, any>})[] { - const baseColumnDefs: ColumnDef[] = runIndex ? Object.values(runIndex.columnsByStep).flat() : [] - const evalType = evalAtomStore().get(evalTypeAtom) - const isHumanLikeEval = evalType === "human" - // || evalType === "online" - const resolveEvaluatorName = createEvaluatorNameResolver(evaluatorNameBySlug) - const metricStatsMap = (metrics || {}) as Record<string, BasicStats | undefined> - const slugToStepKeyMap = new Map<string, string>() - Object.entries(runIndex?.steps || {}).forEach(([key, meta]) => { - const slug = resolveSlugFromStepMeta(meta, revisionSlugByEvaluatorSlug) - if (slug && !slugToStepKeyMap.has(slug)) { - slugToStepKeyMap.set(slug, key) - } - }) - const baseSlugByRevisionSlug = buildBaseSlugByRevisionSlug(revisionSlugByEvaluatorSlug) - const evaluatorSlugSet = new Set( - (evaluators || []) - .map((e) => (typeof e?.slug === "string" ? e.slug : undefined)) - .filter((slug): slug is string => Boolean(slug)), - ) - - const columnsInput = baseColumnDefs.filter( - (col) => col.kind === "input" && col.name !== "testcase_dedup_id", - ) - const columnsInvocation = baseColumnDefs.filter((col) => col.kind === "invocation") - - if (!columnsInput.length && isHumanLikeEval && columnsInvocation.length) { - columnsInput.push({ - name: "Inputs", - kind: "input", - path: "__fallback_input__", - stepKey: columnsInvocation[0]?.stepKey ?? "__fallback_input__", - key: "__fallback_input__", - } as ColumnDef) - } - - // Further group metrics by evaluator when evaluators info present - const evaluatorMetricGroups: any[] = [] - const invocationMetricGroups: any[] = [] - const rawMetricsByEvaluator: Record<string, any[]> = - metricsFromEvaluators && typeof metricsFromEvaluators === "object" - ? (metricsFromEvaluators as Record<string, any[]>) - : {} - - const normalizedMetricsByEvaluator: Record<string, any[]> = {} - const registerMetricDefinitions = (targetSlug: string, defs: any[]) => { - if (!targetSlug || !Array.isArray(defs)) return - if (!normalizedMetricsByEvaluator[targetSlug]) { - normalizedMetricsByEvaluator[targetSlug] = [] - } - defs.forEach((definition) => { - if (!definition || typeof definition !== "object") return - const normalizedDefinition: Record<string, any> = {} - Object.entries(definition).forEach(([key, value]) => { - if (!key) return - const normalizedKey = normalizeEvaluatorMetricName(key) ?? key - normalizedDefinition[normalizedKey] = value - }) - if (Object.keys(normalizedDefinition).length) { - normalizedMetricsByEvaluator[targetSlug].push(normalizedDefinition) - } - }) - } - Object.entries(rawMetricsByEvaluator).forEach(([slug, defs]) => { - if (!Array.isArray(defs)) return - const preferred = resolvePreferredSlug(slug, revisionSlugByEvaluatorSlug) ?? slug - registerMetricDefinitions(preferred, defs) - }) - - const getMetricDefinitionsForSlug = buildMetricDefsLookup( - normalizedMetricsByEvaluator, - revisionSlugByEvaluatorSlug, - ) - - // Evaluator Metric Columns - if (metricsFromEvaluators && isHumanLikeEval) { - const annotationData = baseColumnDefs.filter((def) => def.kind === "annotation") - const columnsByEvaluator: Record<string, ColumnDef[]> = {} - - annotationData.forEach((data) => { - const stepMeta = runIndex?.steps?.[data.stepKey] - const slug = stepMeta?.key.split(".")[1] - if (!slug) return - ;(columnsByEvaluator[slug] ||= []).push(data) - }) - - const evaluatorSlugs = new Set<string>() - Object.keys(columnsByEvaluator).forEach((slug) => { - const d = columnsByEvaluator[slug] - evaluatorSlugs.add(slug) - }) - - evaluatorSlugs.forEach((slug) => { - if (!slug) return - const slugColumns = columnsByEvaluator[slug] || [] - const baseSlugForRevision = baseSlugByRevisionSlug.get(slug) - const evaluator = - evaluators?.find((e) => e.slug === slug) || - evaluators?.find( - (e) => resolvePreferredSlug(e.slug, revisionSlugByEvaluatorSlug) === slug, - ) - const evaluatorLabel = resolveEvaluatorName(slug) - - const metricDefsForSlug = getMetricDefinitionsForSlug(slug) - const inferredMetricDefs = - metricDefsForSlug.length > 0 - ? metricDefsForSlug - : inferMetricsFromStatsForSlug( - slug, - metrics?.[slug] as Record<string, BasicStats>, - baseSlugForRevision ? [baseSlugForRevision] : [], - ) - const resolvedMetricDefs = - inferredMetricDefs && inferredMetricDefs.length - ? inferredMetricDefs - : inferMetricsFromStatsForSlug( - slug, - metricStatsMap, - baseSlugForRevision ? [baseSlugForRevision] : [], - ) - - const resolveMetricType = (metricName: string) => { - const entry = resolvedMetricDefs.find((definition: Record<string, any>) => { - if (!definition || typeof definition !== "object") return false - return Object.prototype.hasOwnProperty.call(definition, metricName) - }) - if (!entry) return undefined - return entry[metricName]?.metricType - } - - let children = - slugColumns.map((data) => { - const rawName = - data.name?.startsWith(`${slug}.`) && data.name.length > slug.length + 1 - ? data.name.slice(slug.length + 1) - : data.name - const metricName = normalizeEvaluatorMetricName(rawName) ?? rawName - const normalizedLabel = (metricName || rawName || "").toLowerCase() - if (normalizedLabel === "outputs" || normalizedLabel === "metrics") { - return undefined - } - const formattedMetricName = formatColumnTitle(metricName || data.name || "") - const primaryKey = metricName - ? `${slug}.attributes.ag.data.outputs.${metricName}` - : data.name || data.path - return { - ...data, - name: metricName || data.name, - title: formattedMetricName, - kind: "annotation" as const, - // kind: "metric" as const, - path: primaryKey, - stepKey: data.stepKey, - fallbackPath: data.path && data.path !== primaryKey ? data.path : undefined, - metricType: resolveMetricType(metricName || data.name || ""), - } - }) || ([].filter(Boolean) as ColumnDef[]) - - if (!children.length && resolvedMetricDefs.length) { - const seen = new Set<string>() - const fallbackStepKey = slugColumns[0]?.stepKey || slugToStepKeyMap.get(slug) - children = resolvedMetricDefs - .map((definition: Record<string, any>) => { - const metricName = Object.keys(definition || {})[0] - if (!metricName || seen.has(metricName)) return undefined - seen.add(metricName) - const formattedMetricName = formatColumnTitle(metricName) - return { - name: metricName, - title: formattedMetricName, - kind: "annotation" as const, - // kind: "metric" as const, - key: `${slug}.${metricName}`, - path: `${slug}.${metricName}`, - fallbackPath: `${slug}.${metricName}`, - stepKey: fallbackStepKey ?? "metric", - metricType: definition?.[metricName]?.metricType, - } - }) - .filter(Boolean) as ColumnDef[] - } - - if (!children.length) return - - evaluatorMetricGroups.push({ - title: evaluator?.name || evaluatorLabel, - key: `metrics_${slug}`, - children, - }) - }) - } - - if (metricsFromEvaluators && ["auto", "online", "custom"].includes(evalType)) { - const annotationData = baseColumnDefs.filter((def) => def.kind === "annotation") - - const stepSlugByKey = new Map<string, string>() - Object.entries(runIndex?.steps || {}).forEach(([key, meta]) => { - if (meta.kind === "annotation") { - const slug = resolveSlugFromStepMeta(meta, revisionSlugByEvaluatorSlug) - if (slug) { - stepSlugByKey.set(key, slug) - } - } - }) - - const annotationColumnsBySlug: Record<string, ColumnDef[]> = {} - annotationData.forEach((column) => { - const slug = column.stepKey ? stepSlugByKey.get(column.stepKey) : undefined - if (!slug) return - ;(annotationColumnsBySlug[slug] ||= []).push(column) - }) - - const gatherMetricDefinitions = (key: string): any[] => { - const defs = getMetricDefinitionsForSlug(key) - if (defs.length) return defs - const alias = stepSlugByKey.get(key) - if (alias && alias !== key) { - return getMetricDefinitionsForSlug(alias) - } - return [] - } - - const sourceKeys = new Set<string>() - Array.from(stepSlugByKey.keys()).forEach((key) => { - sourceKeys.add(key) - const slugFromKey = resolvePreferredSlug( - stepSlugByKey.get(key) || key, - revisionSlugByEvaluatorSlug, - ) - if (slugFromKey) sourceKeys.add(slugFromKey) - }) - const evaluatorGroupsBySlug = new Map< - string, - {title: string; key: string; children: ColumnDef[]; seen: Set<string>} - >() - - const getChildIdentity = (child: ColumnDef): string | undefined => - (typeof child.key === "string" && child.key.length ? child.key : undefined) ?? - (typeof child.path === "string" && child.path.length ? child.path : undefined) ?? - (typeof child.name === "string" && child.name.length ? child.name : undefined) - - const appendChildrenToGroup = (slug: string, title: string, children: ColumnDef[]) => { - if (!children.length) return - const groupKey = `metrics_${slug}_evaluators` - const existing = evaluatorGroupsBySlug.get(groupKey) - if (!existing) { - const seen = new Set<string>() - const deduped: ColumnDef[] = [] - children.forEach((child) => { - const identity = getChildIdentity(child) - if (!identity || seen.has(identity)) return - seen.add(identity) - deduped.push(child) - }) - if (!deduped.length) return - evaluatorGroupsBySlug.set(groupKey, { - title, - key: groupKey, - children: deduped, - seen, - }) - return - } - children.forEach((child) => { - const identity = getChildIdentity(child) - if (!identity || existing.seen.has(identity)) return - existing.seen.add(identity) - existing.children.push(child) - }) - } - - sourceKeys.forEach((rawKey) => { - const slug = resolvePreferredSlug( - stepSlugByKey.get(rawKey) || rawKey, - revisionSlugByEvaluatorSlug, - ) - if (!slug) return - - const stepData = runIndex?.steps?.[rawKey] - - const baseSlugForRevision = baseSlugByRevisionSlug.get(slug) - const evaluator = evaluators?.find((e) => e.id === stepData?.refs?.evaluator?.id) - const evaluatorLabel = resolveEvaluatorName(slug) - const metricDefsPrimary = gatherMetricDefinitions(rawKey) - let metricDefsForKey = - metricDefsPrimary && metricDefsPrimary.length - ? metricDefsPrimary - : gatherMetricDefinitions(slug) - if (!metricDefsForKey || !metricDefsForKey.length) { - const relatedSlugs = new Set<string>() - if (typeof rawKey === "string" && rawKey.length) relatedSlugs.add(rawKey) - const alias = stepSlugByKey.get(rawKey) - if (alias && alias !== slug) relatedSlugs.add(alias) - if (baseSlugForRevision) relatedSlugs.add(baseSlugForRevision) - metricDefsForKey = inferMetricsFromStatsForSlug( - slug, - metricStatsMap, - Array.from(relatedSlugs), - ) - } - - const normalizedRawKey = resolvePreferredSlug( - stepSlugByKey.get(rawKey) || rawKey, - revisionSlugByEvaluatorSlug, - ) - const columnsForKey = [ - ...(annotationColumnsBySlug[slug] || []), - ...(normalizedRawKey && normalizedRawKey !== slug - ? annotationColumnsBySlug[normalizedRawKey] || [] - : []), - ] - const hasMetricDefs = - normalizedMetricsByEvaluator[slug]?.length || - (normalizedRawKey && normalizedMetricsByEvaluator[normalizedRawKey]?.length) || - (metricDefsForKey?.length ?? 0) > 0 - - if (!columnsForKey.length && !hasMetricDefs && !metricDefsForKey?.length) { - return - } - - const seen = new Set<string>() - const children: ColumnDef[] = [] - const pushChild = (child?: ColumnDef) => { - if (!child) return - const key = child.key || child.path || child.name - if (!key) return - if (seen.has(key)) return - seen.add(key) - children.push(child) - } - - const appendMetricDefs = (definitions: Record<string, any>[]) => { - definitions.forEach((definition: Record<string, any>) => { - const originalName = Object.keys(definition || {})[0] - const metricName = normalizeEvaluatorMetricName(originalName) ?? originalName - const metricType = definition?.[metricName]?.metricType - if (!metricName) return - if (metricType === "object") return - const canonicalKey = `${slug}.${metricName}` - if (seen.has(canonicalKey)) return - const candidatesForSkip = [ - canonicalKey, - metricName, - `attributes.ag.data.outputs.${metricName}`, - ] - if ( - candidatesForSkip.some((candidate) => - matchesGeneralInvocationMetric(candidate), - ) - ) { - return - } - const formattedName = formatColumnTitle(metricName) - - pushChild({ - name: metricName, - title: formattedName, - kind: "annotation" as const, - key: canonicalKey, - path: `${rawKey}.${OUTPUT_PREFIX}${metricName}`, - stepKey: rawKey ?? "metric", - metricType, - }) - }) - } - - if (metricDefsForKey.length) { - appendMetricDefs(metricDefsForKey) - } - - if (!children.length) return - - appendChildrenToGroup(slug, evaluator?.name || evaluatorLabel, children) - }) - - evaluatorGroupsBySlug.forEach(({seen: _seen, ...group}) => { - evaluatorMetricGroups.push(group) - }) - } - const genericMetricsGroup = { - title: "Metrics", - key: "__metrics_group__", - children: - evalType === "human" ? GeneralHumanEvalMetricColumns : GeneralAutoEvalMetricColumns, - } - - let metaStart: ColumnDef[] = [ - {name: "#", kind: "meta" as any, path: "scenarioIndex", stepKey: "meta"}, - ] - - if (evalType === "online") { - metaStart.push({ - name: "Timestamp", - kind: "meta" as any, - path: "timestamp", - key: "timestamp", - stepKey: "meta", - }) - } - - const metaEnd: ColumnDef[] = - evalType === "human" - ? [{name: "Action", kind: "meta" as any, path: "action", stepKey: "meta"}] - : [] - - const columnsCore = [...columnsInput, ...columnsInvocation, ...evaluatorMetricGroups] - if (genericMetricsGroup) columnsCore.push(genericMetricsGroup as any) - const columns = [...metaStart, ...columnsCore, ...metaEnd] - - return columns -} - -/** - * Build columns for comparison mode showing multiple runs side-by-side - */ -export function buildComparisonTableColumns({ - baseRunId, - comparisonRunIds, - baseRunIndex, - comparisonRunIndexes, - metricsFromEvaluators, - evaluatorNameBySlug, -}: { - baseRunId: string - comparisonRunIds: string[] - baseRunIndex: RunIndex | null | undefined - comparisonRunIndexes: Record<string, RunIndex | null | undefined> - metricsFromEvaluators: Record<string, Record<string, any>> - evaluatorNameBySlug?: Record<string, string> -}): (ColumnDef & {values?: Record<string, any>})[] { - if (!baseRunIndex) return [] - - const allRunIds = [baseRunId, ...comparisonRunIds] - const evalType = evalAtomStore().get(evalTypeAtom) - const resolveEvaluatorName = createEvaluatorNameResolver(evaluatorNameBySlug) - - // Start with meta columns - const metaColumns: ColumnDef[] = [ - {name: "#", kind: "meta" as any, path: "scenarioIndex", stepKey: "meta"}, - ] - - // Get base column definitions (inputs, outputs, etc.) - const baseColumnDefs: ColumnDef[] = Object.values(baseRunIndex.columnsByStep).flat() - const inputOutputColumns = baseColumnDefs - .filter((col) => col.kind !== "annotation" && col.kind !== "metric") - .filter((col) => col.name !== "testcase_dedup_id") - - // For comparison mode, we want to show inputs once, then outputs/metrics for each run - const inputColumns = inputOutputColumns.filter((col) => col.stepKey === "input") - - // Create run-specific output columns - const runSpecificColumns: any[] = [] - - allRunIds.forEach((runId, index) => { - const isBase = index === 0 - const runLabel = isBase ? "Base" : `Run ${index}` - const runShort = runId.slice(0, 8) - - // Output columns for this run - const outputColumns = inputOutputColumns - .filter((col) => col.stepKey === "output") - .map((col) => ({ - ...col, - name: `${col.name} (${runLabel})`, - title: `${col.name} (${runShort})`, - runId, - isComparison: !isBase, - })) - - // Metric columns for this run - if (metricsFromEvaluators && evalType !== "auto") { - const annotationData = baseColumnDefs.filter((def) => def.kind === "annotation") - const groupedAnnotationData = groupBy(annotationData, (data) => { - return data.name.split(".")[0] - }) - - for (const [evaluatorSlug, annotations] of Object.entries(groupedAnnotationData)) { - const evaluatorLabel = resolveEvaluatorName(evaluatorSlug) - const metricGroup = { - title: `${evaluatorLabel} (${runLabel})`, - key: `metrics_${evaluatorSlug}_${runId}`, - runId, - isComparison: !isBase, - children: annotations.map((data) => { - const [, metricName] = data.name.split(".") - return { - ...data, - name: metricName, - title: `${metricName} (${runShort})`, - kind: "metric", - path: data.name, - stepKey: "metric", - runId, - isComparison: !isBase, - metricType: metricsFromEvaluators[evaluatorSlug]?.find( - (x) => metricName in x, - )?.[metricName]?.metricType, - } - }), - } - runSpecificColumns.push(metricGroup) - } - } - - runSpecificColumns.push(...outputColumns) - }) - - const actionColumns: ColumnDef[] = [ - {name: "Action", kind: "meta" as any, path: "action", stepKey: "meta"}, - ] - - return [...metaColumns, ...inputColumns, ...runSpecificColumns, ...actionColumns] -} - -/** - * Build rows for comparison mode with data from multiple runs - */ -export function buildComparisonTableRows({ - scenarioIds, - baseRunId, - comparisonRunIds, - allScenariosLoaded, - skeletonCount = 20, -}: { - scenarioIds: string[] - baseRunId: string - comparisonRunIds: string[] - allScenariosLoaded: boolean - skeletonCount?: number -}): TableRow[] { - if (!allScenariosLoaded) { - return buildSkeletonRows(skeletonCount).map((r, idx) => ({ - ...r, - scenarioIndex: idx + 1, - })) - } - - return scenarioIds.map((scenarioId, idx) => { - const row: TableRow = { - key: scenarioId, - scenarioIndex: idx + 1, - scenarioId, - baseRunId, - comparisonRunIds, - } - - // Add run-specific data placeholders - // The actual data will be populated by the table cells using atoms - const allRunIds = [baseRunId, ...comparisonRunIds] - allRunIds.forEach((runId) => { - row[`${runId}_data`] = { - runId, - scenarioId, - // Cell components will use atoms to get actual data - } - }) - - return row - }) -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorNameUtils.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorNameUtils.ts deleted file mode 100644 index cbf2e51414..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorNameUtils.ts +++ /dev/null @@ -1,86 +0,0 @@ -const toIterable = (input: any): any[] => { - if (!input) return [] - if (Array.isArray(input)) return input - if (typeof input === "object") return Object.values(input) - return [] -} - -const pickString = (candidate: unknown): string | undefined => { - if (typeof candidate === "string") { - const trimmed = candidate.trim() - if (trimmed.length) return trimmed - } - return undefined -} - -const extractSlug = (entry: any): string | undefined => { - return ( - pickString(entry?.slug) ?? - pickString(entry?.key) ?? - pickString(entry?.id) ?? - pickString(entry?.meta?.slug) ?? - pickString(entry?.flags?.slug) - ) -} - -const extractName = (entry: any): string | undefined => { - const candidates = [ - entry?.name, - entry?.displayName, - entry?.display_name, - entry?.title, - entry?.meta?.displayName, - entry?.meta?.display_name, - entry?.meta?.name, - entry?.flags?.display_name, - entry?.flags?.name, - entry?.data?.display_name, - ] - for (const candidate of candidates) { - const resolved = pickString(candidate) - if (resolved) return resolved - } - return undefined -} - -export const buildEvaluatorNameMap = ( - ...sources: Array<Iterable<any> | Record<string, any> | null | undefined> -): Record<string, string> => { - const map = new Map<string, string>() - const register = (entry: any) => { - if (!entry) return - const slug = extractSlug(entry) - if (!slug || map.has(slug)) return - const name = extractName(entry) - if (name) { - map.set(slug, name) - } - } - sources.forEach((source) => { - toIterable(source).forEach(register) - }) - return Object.fromEntries(map.entries()) -} - -export const createEvaluatorNameResolver = ( - namesBySlug?: Record<string, string>, -): ((slug?: string | null) => string) => { - const resolvedNames = namesBySlug ?? {} - const fallback = new Map<string, string>() - let unnamedCounter = 1 - - return (rawSlug?: string | null) => { - const slug = pickString(rawSlug) - if (slug) { - const mapped = pickString(resolvedNames[slug]) - if (mapped) return mapped - if (fallback.has(slug)) return fallback.get(slug) as string - const label = `Evaluator ${unnamedCounter++}` - fallback.set(slug, label) - return label - } - - const genericLabel = `Evaluator ${unnamedCounter++}` - return genericLabel - } -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorSchemaUtils.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorSchemaUtils.ts deleted file mode 100644 index 795cc9373b..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/evaluatorSchemaUtils.ts +++ /dev/null @@ -1,159 +0,0 @@ -export const toArray = (value: any): any[] => { - if (!value) return [] - if (Array.isArray(value)) return value - if (typeof value === "object") return Object.values(value) - return [] -} - -export const pickString = (candidate: unknown): string | undefined => { - if (typeof candidate === "string") { - const trimmed = candidate.trim() - if (trimmed.length > 0) return trimmed - } - return undefined -} - -export const collectEvaluatorIdentifiers = (entry: any): string[] => { - if (!entry || typeof entry !== "object") return [] - const ids = new Set<string>() - ;[ - entry?.slug, - entry?.id, - entry?.key, - entry?.uid, - entry?.meta?.evaluator_key, - entry?.flags?.evaluator_key, - entry?.data?.slug, - entry?.data?.id, - entry?.data?.key, - entry?.data?.evaluator_key, - ].forEach((candidate) => { - const value = pickString(candidate) - if (value) ids.add(value.toLowerCase()) - }) - return Array.from(ids) -} - -const mergePlainObjects = (primary: any, fallback: any): any => { - if (primary === undefined || primary === null) return fallback - if (fallback === undefined || fallback === null) return primary - - const primaryIsObject = typeof primary === "object" && !Array.isArray(primary) - const fallbackIsObject = typeof fallback === "object" && !Array.isArray(fallback) - - if (primaryIsObject && fallbackIsObject) { - const result: Record<string, any> = {...fallback} - Object.entries(primary).forEach(([key, value]) => { - result[key] = mergePlainObjects(value, (fallback as Record<string, any>)[key]) - }) - return result - } - - return primary -} - -export const mergeEvaluatorRecords = (runEvaluator?: any, catalogEvaluator?: any): any => { - if (!runEvaluator) return catalogEvaluator - if (!catalogEvaluator) return runEvaluator - - const merged: Record<string, any> = { - ...catalogEvaluator, - ...runEvaluator, - } - - merged.data = mergePlainObjects(runEvaluator?.data, catalogEvaluator?.data) - merged.settings_values = mergePlainObjects( - runEvaluator?.settings_values, - catalogEvaluator?.settings_values, - ) - merged.metrics = mergePlainObjects(runEvaluator?.metrics, catalogEvaluator?.metrics) - - return merged -} - -export const collectMetricSchemasFromEvaluator = ( - evaluator: any, -): Array<{name: string; schema: any}> => { - if (!evaluator || typeof evaluator !== "object") return [] - const map = new Map<string, any>() - const register = (obj: any) => { - if (!obj || typeof obj !== "object") return - Object.entries(obj).forEach(([key, schema]) => { - if (!map.has(key)) { - map.set(key, schema) - } - }) - } - - register(evaluator?.metrics) - register(evaluator?.data?.schemas?.outputs?.properties) - register(evaluator?.data?.service?.format?.properties?.outputs?.properties) - register(evaluator?.data?.service?.configuration?.format?.properties?.outputs?.properties) - register(evaluator?.data?.configuration?.format?.properties?.outputs?.properties) - register(evaluator?.data?.service?.format?.outputs?.properties) - register(evaluator?.data?.service?.configuration?.outputs?.properties) - register(evaluator?.data?.configuration?.outputs?.properties) - - return Array.from(map.entries()).map(([name, schema]) => ({name, schema})) -} - -export const deriveSchemaMetricType = (schema: any): string | string[] | undefined => { - if (!schema || typeof schema !== "object") return undefined - const normalizeType = (value: unknown) => { - if (!value) return undefined - if (Array.isArray(value)) { - const types = value - .map((entry) => - typeof entry === "string" - ? entry.toLowerCase() - : typeof entry?.type === "string" - ? entry.type.toLowerCase() - : undefined, - ) - .filter(Boolean) as string[] - if (types.length) return Array.from(new Set(types)) - return undefined - } - if (typeof value === "string") { - return value.toLowerCase() - } - if (typeof value === "object" && value !== null) { - return normalizeType((value as Record<string, unknown>).type) - } - return undefined - } - - const primaryType = normalizeType(schema.type) - if (primaryType) return primaryType - - const compositeKeys: Array<"anyOf" | "oneOf" | "allOf"> = ["anyOf", "oneOf", "allOf"] - for (const key of compositeKeys) { - if (Array.isArray(schema[key])) { - const set = new Set<string>() - schema[key].forEach((node: any) => { - const type = deriveSchemaMetricType(node) - if (!type) return - if (Array.isArray(type)) type.forEach((entry) => set.add(entry)) - else set.add(type) - }) - if (set.size) { - const arr = Array.from(set) - return arr.length === 1 ? arr[0] : arr - } - } - } - - if (Array.isArray(schema.enum) && schema.enum.length) { - if (schema.enum.every((value: unknown) => typeof value === "boolean")) return "boolean" - if (schema.enum.every((value: unknown) => typeof value === "number")) return "number" - if (schema.enum.every((value: unknown) => typeof value === "string")) return "string" - } - - if (schema.items) { - const itemType = deriveSchemaMetricType(schema.items) - if (itemType) return itemType - return "array" - } - - return undefined -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/flatDataSourceBuilder.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/flatDataSourceBuilder.ts deleted file mode 100644 index a9bd65fcb0..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/flatDataSourceBuilder.ts +++ /dev/null @@ -1,8 +0,0 @@ -// ---------------- Helpers ------------------ -export const titleCase = (str: string) => - String(str || "") - .replace(/([a-z0-9])([A-Z])/g, "$1 $2") - .replace(/_/g, " ") - .replace(/\s+/g, " ") - .trim() - .replace(/^[a-z]|\s[a-z]/g, (m) => m.toUpperCase()) diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/types.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/types.ts deleted file mode 100644 index 916a7e4cf8..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/types.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {SchemaMetricType} from "@/oss/lib/metricUtils" - -export interface BaseColumn { - name: string - title: string - key: string - kind: string - path: string - fallbackPath?: string - stepKey: string - stepKeyByRunId?: Record<string, string | undefined> - metricType: SchemaMetricType - children?: TableColumn[] -} - -export interface TableColumn extends BaseColumn { - children?: TableColumn[] -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/utils.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/utils.tsx deleted file mode 100644 index c2843b89de..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/assets/utils.tsx +++ /dev/null @@ -1,811 +0,0 @@ -import clsx from "clsx" - -import {EnhancedColumnType} from "@/oss/components/EnhancedUIs/Table/types" -import {evalTypeAtom} from "@/oss/components/EvalRunDetails/state/evalType" -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import {evalAtomStore} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {getMetricConfig} from "@/oss/lib/metrics/utils" -import {buildMetricSorter} from "@/oss/lib/metricSorter" -import {extractPrimitive, isSortableMetricType} from "@/oss/lib/metricUtils" - -import { - runMetricsStatsCacheFamily, - runScopedMetricDataFamily, - scenarioMetricValueFamily, -} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {EVAL_BG_COLOR} from "../../../AutoEvalRun/assets/utils" -import type {TableRow} from "../types" - -import ActionCell from "./ActionCell" -import type {EvaluatorFailureMap} from "./atoms/evaluatorFailures" -import { - CellWrapper, - InputCell, - InputSummaryCell, - InvocationResultCell, - SkeletonCell, -} from "./CellComponents" -import {COLUMN_WIDTHS} from "./constants" -import {titleCase} from "./flatDataSourceBuilder" -import CollapsedAnnotationValueCell from "./MetricCell/CollapsedAnnotationValueCell" -import CollapsedMetricValueCell, { - AutoEvalCollapsedMetricValueCell, -} from "./MetricCell/CollapsedMetricValueCell" -import {AnnotationValueCell, EvaluatorFailureCell, MetricValueCell} from "./MetricCell/MetricCell" -import TimestampCell from "./TimestampCell" -import {BaseColumn, TableColumn} from "./types" - -// ---------------- Helpers to detect/normalize annotation-like metric paths ---------------- -const OUT_PREFIX = "attributes.ag.data.outputs." -const IN_PREFIX = "attributes.ag.data.inputs." - -/** A “metric” column that actually points inside the annotation payload. */ -const isAnnotationLikeMetricPath = (p?: string) => - typeof p === "string" && (p.includes(OUT_PREFIX) || p.includes(IN_PREFIX)) - -/** Strip the run-scoped prefix to the field path used by AnnotationValueCell helpers. */ -const toAnnotationFieldPath = (p: string) => - p.includes(OUT_PREFIX) - ? p.slice(OUT_PREFIX.length) - : p.includes(IN_PREFIX) - ? p.slice(IN_PREFIX.length) - : p -// ------------------------------------------------------------------------------------------ - -// Helper to compare metric/annotation primitives across scenarios (used for sorting metrics) -function scenarioMetricPrimitive(recordKey: string, column: any, runId: string) { - const st = evalAtomStore() - let raw: any = column.values?.[recordKey] - if (raw === undefined) { - const metricKey = column.path || column.key || column.name || "" - const fallbackKey = column.fallbackPath - if (column.kind === "metric") { - const stepSlug = - column.stepKey && column.stepKey.includes(".") - ? column.stepKey.split(".")[1] - : undefined - raw = st.get( - scenarioMetricValueFamily({ - runId, - scenarioId: recordKey, - metricKey, - stepSlug, - }) as any, - ) - if ((raw === undefined || raw === null) && fallbackKey && fallbackKey !== metricKey) { - raw = st.get( - scenarioMetricValueFamily({ - runId, - scenarioId: recordKey, - metricKey: fallbackKey, - stepSlug, - }) as any, - ) - } - } else { - const stepSlug = - column.stepKey && column.stepKey.includes(".") - ? column.stepKey.split(".")[1] - : undefined - raw = st.get( - runScopedMetricDataFamily({ - scenarioId: recordKey, - stepSlug, - metricKey, - runId, - }) as any, - )?.value - if ((raw === undefined || raw === null) && fallbackKey && fallbackKey !== metricKey) { - raw = st.get( - runScopedMetricDataFamily({ - scenarioId: recordKey, - stepSlug, - metricKey: fallbackKey, - runId, - }) as any, - )?.value - } - } - } - return extractPrimitive(raw) -} - -function scenarioMetricSorter(column: any, runId: string) { - return buildMetricSorter<TableRow>((row) => - scenarioMetricPrimitive(row.key as string, column, runId), - ) -} - -/** - * Transforms a list of scenario metrics into a map of scenarioId -> metrics, merging - * nested metrics under `outputs` into the same level. - */ -export const getScenarioMetricsMap = ({scenarioMetrics}: {scenarioMetrics: any[]}) => { - const map: Record<string, Record<string, any>> = {} - const _metrics = scenarioMetrics || [] - - _metrics.forEach((m: any) => { - const sid = m.scenarioId - if (!sid) return - - const data: Record<string, any> = - m && typeof m === "object" && m.data && typeof m.data === "object" ? {...m.data} : {} - - if (data.outputs && typeof data.outputs === "object") { - Object.assign(data, data.outputs) - delete data.outputs - } - - if (!map[sid]) map[sid] = {} - Object.assign(map[sid], data) - }) - - return map -} - -// ---------------- Column adapter ------------------ -const generateColumnTitle = (col: BaseColumn) => { - if (col.kind === "metric") { - if (typeof col.title === "string" && col.title.trim().length > 0) { - return col.title - } - if (typeof col.path === "string") { - return getMetricConfig(col.path).label - } - } - if (col.kind === "invocation") return titleCase(col.name) - if (col.kind === "annotation") return titleCase(col.name) - return titleCase(col.title ?? col.name) -} - -const generateColumnWidth = (col: BaseColumn) => { - if (col.kind === "meta") return 80 - if (col.kind === "input") return COLUMN_WIDTHS.input - if (col.kind === "metric") return COLUMN_WIDTHS.metric - if (col.kind === "annotation") return COLUMN_WIDTHS.metric - if (col.kind === "invocation") return COLUMN_WIDTHS.response - return 20 -} - -const orderRank = (def: EnhancedColumnType<TableRow>): number => { - if (def.key === "#") return 0 - if (def.key === "timestamp") return 1 - if (def.key === "inputs_group") return 2 - if (def.key === "outputs" || def.key === "output") return 3 - if (def.key === "Status") return 4 - if (def.key === "annotation" || def.key?.includes("metrics")) return 5 - if (def.key?.includes("evaluators")) return 6 - if (def.key === "__metrics_group__") return 7 - if (def.key === "errors") return 9 // ensure errors column stays at the end of metrics group - return 8 -} - -const normalizeEvaluatorSlug = (slug?: string) => - slug ? slug.replace(/[\s._-]+/g, "").toLowerCase() : "" - -const resolveEvaluatorFailure = ( - map: EvaluatorFailureMap | undefined, - scenarioId: string, - slug?: string, -) => { - if (!map || !slug) return undefined - const failures = map.get(scenarioId) - if (!failures) return undefined - if (failures[slug]) return failures[slug] - const target = normalizeEvaluatorSlug(slug) - if (!target) return undefined - const entry = Object.entries(failures).find( - ([candidateSlug]) => normalizeEvaluatorSlug(candidateSlug) === target, - ) - return entry?.[1] -} - -export function buildAntdColumns( - cols: TableColumn[], - runId: string, - options: { - evaluatorFailuresMap?: EvaluatorFailureMap - expendedRows?: Record<string, boolean> - } = {}, -): EnhancedColumnType<TableRow>[] { - const evaluatorFailuresMap = options?.evaluatorFailuresMap - const expendedRows = options?.expendedRows - const resolveStepKeyForRun = (column: TableColumn, targetRunId: string) => { - return column.stepKeyByRunId?.[targetRunId] ?? column.stepKey - } - const distMap = runId ? evalAtomStore().get(runMetricsStatsCacheFamily(runId)) : {} - const evalType = evalAtomStore().get(evalTypeAtom) - - const resolveComparisonBackground = (record?: TableRow) => { - const compareIndex = (record as any)?.compareIndex - if (compareIndex === undefined || compareIndex === null) return undefined - const key = String(compareIndex) - const color = - (EVAL_BG_COLOR as Record<string, string>)[key] ?? - (typeof compareIndex === "number" - ? (EVAL_BG_COLOR as Record<number, string>)[compareIndex] - : undefined) - if (color) { - return {backgroundColor: color} - } - return undefined - } - - const temporalCellClasses = (record?: TableRow) => { - if (!record) return "" - if ((record as any)?.compareIndex) return "" - const bgClass = - typeof record.temporalGroupIndex === "number" && record.temporalGroupIndex % 2 === 0 - ? "bg-slate-50" - : "bg-white" - const borderClass = record.isTemporalGroupStart - ? "border-t border-slate-200 first:border-t-0" - : "" - return clsx(bgClass, borderClass) - } - - const temporalContentPadding = (record?: TableRow) => - record?.isTemporalGroupStart ? "pt-3" : "pt-1" - - // Count how many input/output columns we have - const inputColumns = cols.filter((col) => col.kind === "input") - const outputColumns = cols.filter((col) => col.kind === "invocation") - - return cols - .map((c: TableColumn): EnhancedColumnType<TableRow> | null => { - const editLabel = generateColumnTitle(c) - const common = { - metricType: c.metricType ?? c.kind, - title: editLabel, - key: c.key ?? c.name, - minWidth: generateColumnWidth(c), - width: generateColumnWidth(c), - __editLabel: editLabel, - } - - // Sorting: - // - keep sorting for true numeric/boolean/string metrics - // - disable sorting for annotation-like metric paths (their values come from annotations, not metrics atoms) - const sortable = - (c.kind === "metric" || c.kind === "annotation") && - !isAnnotationLikeMetricPath(c.path) && - isSortableMetricType(c.metricType) - - const sorter = sortable ? scenarioMetricSorter(c, runId) : undefined - - if (c.children) { - // drop empty wrapper groups - if ((!c.title && !c.name) || c.kind === "metrics_group") { - return { - ...common, - __editLabel: editLabel, - children: buildAntdColumns(c.children, runId, options), - } as EnhancedColumnType<TableRow> - } - if (c.key === "__metrics_group__" || c.key?.startsWith("metrics_")) { - return { - title: ( - <span className="flex items-center gap-1 whitespace-nowrap"> - {c.key === "__metrics_group__" ? "Metrics" : (c.title ?? "")} - </span> - ), - dataIndex: c.key, - collapsible: true, - key: c.key, - __editLabel: editLabel, - renderAggregatedData: ({record}) => { - const hasAnnotation = - Array.isArray(c.children) && - c.children.some((ch: any) => ch.kind === "annotation") - const evaluatorSlug = - c.key === "__metrics_group__" - ? undefined - : c.name || - c.key.replace(/^metrics_/, "").replace(/_evaluators/, "") - const scenarioId = (record as any).scenarioId || (record as any).key - const failure = resolveEvaluatorFailure( - evaluatorFailuresMap, - scenarioId, - evaluatorSlug, - ) - if (failure) { - return ( - <EvaluatorFailureCell - status={failure.status} - error={failure.error} - /> - ) - } - if (hasAnnotation) { - return ( - <CollapsedAnnotationValueCell - scenarioId={scenarioId} - runId={(record as any).runId || runId} - childrenDefs={c.children!} - /> - ) - } - return evalType === "auto" || evalType === "custom" ? ( - <AutoEvalCollapsedMetricValueCell - scenarioId={scenarioId} - runId={(record as any).runId || runId} - evaluatorSlug={evaluatorSlug} - childrenDefs={c.children} - /> - ) : ( - <CollapsedMetricValueCell - scenarioId={scenarioId} - runId={(record as any).runId || runId} - evaluatorSlug={evaluatorSlug} - childrenDefs={c.children} - /> - ) - }, - children: buildAntdColumns(c.children, runId, options), - } - } - - return { - ...common, - __editLabel: editLabel, - title: titleCase(c.title ?? c.name), - key: c.key ?? c.name, - children: buildAntdColumns(c.children, runId, options), - } as EnhancedColumnType<TableRow> - } - - if (c.kind === "meta") { - switch (c.path) { - case "scenarioIndex": - return { - ...common, - fixed: "left", - width: 50, - minWidth: 50, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - showBorder - ? "!p-0" - : record?.children?.length || record?.isComparison - ? "!p-0" - : undefined, - ), - style: resolveComparisonBackground(record), - } - }, - render: (_: any, record: TableRow) => ( - <CellWrapper - className={clsx( - record.isTemporalGroupStart - ? "font-semibold text-gray-700" - : "text-gray-500", - )} - > - {record.scenarioIndex} - </CellWrapper> - ), - } - case "timestamp": - return { - ...common, - width: 200, - minWidth: 180, - render: (_: any, record: TableRow) => { - const effectiveRunId = (record as any).runId || runId - return ( - <TimestampCell - scenarioId={record.scenarioId || record.key} - runId={effectiveRunId} - timestamp={record.timestamp} - isGroupStart={record.isTemporalGroupStart} - /> - ) - }, - } - case "action": - if (evalType === "auto" || evalType === "custom") return null - return { - ...common, - fixed: "right", - width: 120, - minWidth: 120, - render: (_: any, record: TableRow) => { - const effectiveRunId = (record as any).runId || runId - return ( - <ActionCell - scenarioId={record.scenarioId || record.key} - runId={effectiveRunId} - /> - ) - }, - } - default: - return {...common, dataIndex: c.path} - } - } - - if (c.kind === "input") { - const isFallbackInput = c.path === "__fallback_input__" - if (isFallbackInput) { - return { - ...common, - title: ( - <span className="flex items-center gap-1 whitespace-nowrap"> - Inputs - </span> - ), - key: "inputs_group", - addNotAvailableCell: false, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - ), - style: resolveComparisonBackground(record), - } - }, - render: (_: any, record: TableRow) => { - if (record.isComparison) return "" - const effectiveRunId = (record as any).runId || runId - const scenarioId = record.scenarioId || record.key - return ( - <InputSummaryCell scenarioId={scenarioId} runId={effectiveRunId} /> - ) - }, - } - } - - const isFirstInput = inputColumns.length > 0 && inputColumns[0] === c - if (!isFirstInput) return null - - return { - title: ( - <span className="flex items-center gap-1 whitespace-nowrap">Inputs</span> - ), - dataIndex: "inputs_group", - key: "inputs_group", - align: "left", - collapsible: true, - addNotAvailableCell: false, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - ), - style: resolveComparisonBackground(record), - } - }, - renderAggregatedData: ({record, isCollapsed}) => { - if (record.isComparison) return null - const effectiveRunId = (record as any).runId || runId - const scenarioId = record.scenarioId || record.key - const shouldShowPrefix = evalType !== "online" - return ( - <div - className={clsx( - "flex flex-col gap-2 group", - temporalContentPadding(record), - )} - > - <Expandable - expandKey={record.key} - disableExpand={!isCollapsed} - className="bg-transparent [&_.cell-expand-container]:!bg-transparent" - > - {inputColumns.map((inputCol) => ( - <div - key={inputCol.key} - className={clsx( - "text-wrap", - record.isTemporalGroupStart && shouldShowPrefix - ? "text-gray-700" - : "text-gray-500", - )} - > - {shouldShowPrefix ? ( - <span className="font-medium"> - {titleCase(inputCol.name!)}: - </span> - ) : null} - <div className="bg-transparent"> - <InputCell - scenarioId={scenarioId} - stepKey={resolveStepKeyForRun( - inputCol, - effectiveRunId, - )} - inputKey={inputCol.path} - showEditor={ - shouldShowPrefix ? false : undefined - } - disableExpand={isCollapsed} - /> - </div> - </div> - ))} - </Expandable> - </div> - ) - }, - children: inputColumns.map((inputCol, idx) => ({ - title: titleCase(inputCol.name!), - key: `${inputCol.name}-input-${idx}`, - addNotAvailableCell: false, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - ), - style: resolveComparisonBackground(record), - } - }, - render: (_: any, record: TableRow) => { - if (record.isComparison) return "" - const shouldShowPrefix = evalType !== "online" - const effectiveRunId = (record as any).runId || runId - const scenarioId = record.scenarioId || record.key - return ( - <InputCell - scenarioId={scenarioId} - stepKey={resolveStepKeyForRun(inputCol, effectiveRunId)} - inputKey={inputCol.path} - showEditor={shouldShowPrefix ? false : undefined} - /> - ) - }, - })), - } - } - - if (c.kind === "invocation") { - const createOutputColumnDef = ( - outputCol: TableColumn, - idx: number, - totalOutputs: number, - ) => { - const isOnlineEval = evalType === "online" - const isAutoEval = evalType === "auto" || evalType === "custom" - const useSingleColumnLayout = isOnlineEval || (isAutoEval && totalOutputs <= 1) - const outputKey = outputCol.name || outputCol.path || `output-${idx}` - const columnTitle = useSingleColumnLayout - ? "Output" - : titleCase(outputKey || `Output ${idx + 1}`) - const editLabelForOutput = useSingleColumnLayout - ? "Output" - : generateColumnTitle(outputCol) - return { - metricType: outputCol.metricType ?? outputCol.kind, - title: columnTitle, - key: useSingleColumnLayout - ? "output" - : (outputCol.key ?? `${outputKey}-output-${idx}`), - minWidth: generateColumnWidth(outputCol), - width: generateColumnWidth(outputCol), - __editLabel: editLabelForOutput, - addNotAvailableCell: false, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - ), - } - }, - render: (_: any, record: TableRow) => { - const effectiveRunId = (record as any).runId || runId - const scenarioId = record.scenarioId || record.key - return ( - <InvocationResultCell - scenarioId={scenarioId} - stepKey={resolveStepKeyForRun(outputCol, effectiveRunId)} - path={outputCol.path} - runId={effectiveRunId} - record={record} - isSkeleton={record.isSkeleton || false} - /> - ) - }, - } as EnhancedColumnType<TableRow> - } - - if ( - evalType === "online" || - ((evalType === "auto" || evalType === "custom") && outputColumns.length <= 1) - ) { - const outputIndex = Math.max(outputColumns.indexOf(c), 0) - return createOutputColumnDef(c, outputIndex, outputColumns.length) - } - - const isFirstOutput = outputColumns.length > 0 && outputColumns[0] === c - if (!isFirstOutput) return null - - return { - title: ( - <span className="flex items-center gap-1 whitespace-nowrap">Outputs</span> - ), - dataIndex: "outputs", - key: "outputs", - align: "left", - collapsible: true, - addNotAvailableCell: false, - onCell: (record) => { - const showBorder = - expendedRows?.[record.key] || - (record?.isComparison && !record.isLastRow) - return { - className: clsx( - temporalCellClasses(record), - showBorder && "!border-b-0", - ), - style: resolveComparisonBackground(record), - } - }, - renderAggregatedData: ({record}) => { - return ( - <CellWrapper - className={clsx( - "text-gray-500 italic text-xs", - temporalContentPadding(record), - )} - > - <span>Expand the Outputs group to inspect invocation results.</span> - </CellWrapper> - ) - }, - children: outputColumns.map((outputCol, idx) => - createOutputColumnDef(outputCol, idx, outputColumns.length), - ), - } - } - - // --------- Leaf cells ---------- - return { - ...common, - sorter, - render: (_unused: any, record: TableRow) => { - const effectiveRunId = (record as any).runId || runId - - switch (c.kind) { - case "input": { - const inputStepKey = resolveStepKeyForRun(c, effectiveRunId) - return ( - <InputCell - scenarioId={record.scenarioId || record.key} - stepKey={inputStepKey} - inputKey={c.path} - runId={effectiveRunId} - /> - ) - } - case "invocation": { - const invocationStepKey = resolveStepKeyForRun(c, effectiveRunId) - return ( - <InvocationResultCell - isSkeleton={record.isSkeleton} - scenarioId={record.scenarioId || record.key} - stepKey={invocationStepKey} - path={c.path} - runId={effectiveRunId} - record={record} - /> - ) - } - case "annotation": { - const annotationStepKey = resolveStepKeyForRun(c, effectiveRunId) - return ( - <AnnotationValueCell - scenarioId={record.scenarioId || record.key} - fieldPath={c.path} - metricKey={c.name} - metricType={c.metricType} - fullKey={c.path} - distInfo={distMap[c.path]} - stepKey={annotationStepKey} - name={c.name} - runId={effectiveRunId} - /> - ) - } - case "metric": { - // If this “metric” is actually pointing inside annotations, render via AnnotationValueCell - // if (isAnnotationLikeMetricPath(c.path)) { - // const annotationStepKey = resolveStepKeyForRun(c, effectiveRunId) - // const fieldPath = toAnnotationFieldPath(c.path) - // return ( - // <AnnotationValueCell - // scenarioId={record.scenarioId || record.key} - // fieldPath={fieldPath} - // metricKey={c.name} - // metricType={c.metricType} - // fullKey={c.path} - // distInfo={distMap[c.path]} - // stepKey={annotationStepKey} - // name={c.name} - // runId={effectiveRunId} - // /> - // ) - // } - - const scenarioId = record.scenarioId || record.key - const evaluatorSlug = (c as any).evaluatorSlug as string | undefined - const groupIndex = (c as any).evaluatorColumnIndex ?? 0 - const groupCount = (c as any).evaluatorColumnCount ?? 1 - const failure = resolveEvaluatorFailure( - evaluatorFailuresMap, - scenarioId, - evaluatorSlug, - ) - - if (failure) { - if (groupIndex === 0) { - return { - children: ( - <EvaluatorFailureCell - status={failure.status} - error={failure.error} - /> - ), - props: {colSpan: Math.max(groupCount, 1)}, - } - } - return {children: null, props: {colSpan: 0}} - } - - return ( - <MetricValueCell - scenarioId={scenarioId} - metricKey={c.path} - fallbackKey={c.fallbackPath} - fullKey={c.path} - distInfo={ - distMap[c.path] ?? - (c.fallbackPath ? distMap[c.fallbackPath] : undefined) - } - metricType={c.metricType} - runId={effectiveRunId} - evalType={evalType!} - stepKey={resolveStepKeyForRun(c, effectiveRunId)} - /> - ) - } - default: - return record.isSkeleton ? ( - <SkeletonCell /> - ) : ( - (c.values?.[record.scenarioId || record.key] ?? "") - ) - } - }, - } - }) - .filter(Boolean) - .sort((a, b) => { - if (!a || !b) return 0 - const r = orderRank(a) - orderRank(b) - if (r !== 0) return r - const aName = "title" in a && a.title ? String(a.title) : a.key - const bName = "title" in b && b.title ? String(b.title) : b.key - return aName?.localeCompare(bName) - }) as EnhancedColumnType<TableRow>[] -} diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useExpandableComparisonDataSource.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useExpandableComparisonDataSource.tsx deleted file mode 100644 index 6af6d7d86e..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useExpandableComparisonDataSource.tsx +++ /dev/null @@ -1,637 +0,0 @@ -import {useEffect, useMemo, useState} from "react" - -import deepEqual from "fast-deep-equal" -import {atom, getDefaultStore, useAtomValue} from "jotai" -import {atomFamily} from "jotai/utils" - -import {filterColumns} from "@/oss/components/Filters/EditColumns/assets/helper" -import useEvaluatorConfigs from "@/oss/lib/hooks/useEvaluatorConfigs" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import {fetchEvaluatorById} from "@/oss/services/evaluators" -import { - evaluationRunStateFamily, - runIndexFamily, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import type {RunIndex} from "@/oss/lib/hooks/useEvaluationRunData/assets/helpers/buildRunIndex" - -import { - displayedScenarioIdsFamily, - scenarioStepsFamily, -} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedScenarios" -import {buildScenarioTableData} from "../assets/dataSourceBuilder" -import {buildEvaluatorNameMap} from "../assets/evaluatorNameUtils" -import { - collectEvaluatorIdentifiers, - collectMetricSchemasFromEvaluator, - deriveSchemaMetricType, - mergeEvaluatorRecords, - pickString, - toArray, -} from "../assets/evaluatorSchemaUtils" -import type {TableColumn} from "../assets/types" -import {buildAntdColumns} from "../assets/utils" -import {expendedRowAtom} from "../ComparisonScenarioTable" - -import {editColumnsFamily} from "./useTableDataSource" - -export interface GroupedScenario { - key: string - scenarioId: string - testcaseId: string - inputs: any - outputs: any - runId: string - comparedScenarios: { - id: string - inputSteps: string - inputs: any - outputs: any - runId: string - colorIndex?: number - }[] -} - -interface UseExpandableComparisonDataSourceProps { - baseRunId: string - comparisonRunIds: string[] -} - -const testcaseForScenarios = atomFamily( - (runId: string) => - atom((get) => { - const scenarioSteps = get(scenarioStepsFamily(runId)) - const allScenarioIds = Object.keys(scenarioSteps) - const allSteps = allScenarioIds.reduce((acc, scenarioId) => { - const scenarioTestcaseIds = scenarioSteps[scenarioId]?.data?.inputSteps?.map( - (s) => s?.testcaseId, - ) - acc[scenarioId] = scenarioTestcaseIds - return acc - }, {}) - return allSteps - }), - deepEqual, -) -export const comparisonRunsStepsAtom = atomFamily( - (runIds: string[]) => - atom((get) => { - const steps = runIds.reduce((acc, runId) => { - const scenarioSteps = get(scenarioStepsFamily(runId)) - - const allStepIds = Object.keys(scenarioSteps) - const allSteps = allStepIds.map((stepId) => ({ - id: stepId, - ...scenarioSteps[stepId], - })) - const allStepsData = allSteps.reduce((acc, step) => { - if (step.state === "hasData") { - acc[step.id] = step?.data?.inputSteps?.map((s) => s?.testcaseId) - } - return acc - }, {}) - - acc[runId] = allStepsData - return acc - }, {}) - return steps - }), - deepEqual, -) - -export const comparisonRunIndexesAtom = atomFamily( - (runIds: string[]) => - atom((get) => - runIds.reduce<Record<string, RunIndex | null | undefined>>((acc, runId) => { - acc[runId] = get(runIndexFamily(runId)) - return acc - }, {}), - ), - deepEqual, -) - -const comparisonRunsEvaluatorsAtom = atomFamily( - (runIds: string[]) => - atom((get) => { - const evaluators = new Set() - runIds.forEach((runId) => { - const evals = get(evaluationRunStateFamily(runId)) - const enrichRun = evals?.enrichedRun - if (enrichRun) { - enrichRun.evaluators?.forEach((e) => evaluators.add(e)) - } - }) - - return Array.from(evaluators) - }), - deepEqual, -) - -const metricsFromEvaluatorsFamily = atomFamily( - (runIds: string[]) => - atom((get) => { - // Build a map of evaluatorSlug -> unique metrics - const result: Record<string, any[]> = {} - const seenMetricBySlug: Record<string, Set<string>> = {} - - runIds.forEach((runId) => { - const state = get(evaluationRunStateFamily(runId)) - const evaluators = state?.enrichedRun?.evaluators - ? Object.values(state.enrichedRun.evaluators) - : [] - - evaluators.forEach((ev: any) => { - const slug = ev?.slug - if (!slug) return - - if (!seenMetricBySlug[slug]) { - seenMetricBySlug[slug] = new Set<string>() - } - - if (ev?.metrics && typeof ev.metrics === "object") { - Object.entries(ev.metrics).forEach( - ([metricName, metricInfo]: [string, any]) => { - if (seenMetricBySlug[slug].has(metricName)) return - seenMetricBySlug[slug].add(metricName) - - if (!result[slug]) result[slug] = [] - result[slug].push({ - [metricName]: { - metricType: metricInfo?.type || "unknown", - }, - evaluatorSlug: slug, - }) - }, - ) - } - }) - }) - - return result - }), - deepEqual, -) - -const useExpandableComparisonDataSource = ({ - baseRunId, - comparisonRunIds, -}: UseExpandableComparisonDataSourceProps) => { - const store = getDefaultStore() - // const fetchMultipleRuns = useSetAtom(multiRunDataFetcherAtom) - - const comparisonRunsSteps = useAtomValue(comparisonRunsStepsAtom(comparisonRunIds)) - const baseTestcases = useAtomValue(testcaseForScenarios(baseRunId)) - const comparisonRunIndexes = useAtomValue(comparisonRunIndexesAtom(comparisonRunIds)) - - const comparisonRunsEvaluators = useAtomValue(comparisonRunsEvaluatorsAtom(comparisonRunIds)) - - const metricsFromEvaluators = useAtomValue( - metricsFromEvaluatorsFamily([baseRunId, ...comparisonRunIds]), - ) - - // Match scenarios by content rather than IDs - const matchedScenarios = useMemo(() => { - const matches: Record<string, any[]> = {} - - // For each base scenario, find matching scenarios in comparison runs - Object.entries(baseTestcases as Record<string, any>).forEach( - ([baseScenarioId, baseSteps]) => { - const baseTestcaseData = baseSteps?.[0] - if (!baseTestcaseData) return - - const comparedScenarios: any[] = [] - - // Search through all comparison runs - Object.entries(comparisonRunsSteps as Record<string, any>).forEach( - ([compRunId, compScenarios]) => { - Object.entries(compScenarios as Record<string, any>).forEach( - ([compScenarioId, compSteps]) => { - const compTestcaseData = compSteps?.[0] - if (!compTestcaseData) return - - const inputsMatch = baseTestcaseData === compTestcaseData - - if (inputsMatch) { - // Derive compareIndex for this run from state or fallback to order in comparisonRunIds - const compState = store.get(evaluationRunStateFamily(compRunId)) - const compareIndex = - compState?.compareIndex ?? - (comparisonRunIds.includes(compRunId) - ? comparisonRunIds.indexOf(compRunId) + 2 - : undefined) - const colorIndex = - compState?.colorIndex ?? - (comparisonRunIds.includes(compRunId) - ? comparisonRunIds.indexOf(compRunId) + 2 - : undefined) - comparedScenarios.push({ - matchedTestcaseId: compTestcaseData, - runId: compRunId, - scenarioId: compScenarioId, - compareIndex, - colorIndex, - }) - } - }, - ) - }, - ) - - matches[baseScenarioId] = comparedScenarios - }, - ) - - return matches - }, [baseTestcases, comparisonRunsSteps, comparisonRunIds.join(","), store]) - - // Build columns using EXACT same approach as regular table (useTableDataSource) - const runIndex = useAtomValue(runIndexFamily(baseRunId)) - const evaluationRunState = useAtomValue(evaluationRunStateFamily(baseRunId)) - const expendedRows = useAtomValue(expendedRowAtom) - const evaluators = evaluationRunState?.enrichedRun?.evaluators || [] - const baseAppId = - evaluationRunState?.enrichedRun?.appId ?? - evaluationRunState?.enrichedRun?.app_id ?? - evaluationRunState?.enrichedRun?.app?.id ?? - evaluationRunState?.enrichedRun?.application?.id ?? - null - const baseEvaluators = Array.isArray(evaluators) ? evaluators : Object.values(evaluators) - const [fetchedEvaluatorsById, setFetchedEvaluatorsById] = useState<Record<string, any>>({}) - const allEvaluators = useMemo(() => { - const bySlug = new Map<string, any>() - ;[ - ...comparisonRunsEvaluators, - ...baseEvaluators, - ...Object.values(fetchedEvaluatorsById), - ].forEach((ev: any) => { - if (ev?.slug && !bySlug.has(ev.slug)) bySlug.set(ev.slug, ev) - }) - return Array.from(bySlug.values()) - }, [comparisonRunsEvaluators, baseEvaluators, fetchedEvaluatorsById]) - const {data: previewEvaluators} = useEvaluators({preview: true}) - const {data: projectEvaluators} = useEvaluators() - const {data: evaluatorConfigs} = useEvaluatorConfigs({appId: baseAppId}) - const evaluatorConfigsForNames = useMemo( - () => - (evaluatorConfigs ?? []).map((config) => ({ - ...config, - slug: config?.id, - })), - [evaluatorConfigs], - ) - const evaluatorNameBySlug = useMemo( - () => - buildEvaluatorNameMap( - allEvaluators, - previewEvaluators, - projectEvaluators, - evaluatorConfigsForNames, - Object.values(fetchedEvaluatorsById), - ), - [ - allEvaluators, - previewEvaluators, - projectEvaluators, - evaluatorConfigsForNames, - fetchedEvaluatorsById, - ], - ) - - const evaluatorIdsAcrossRunIndexes = useMemo(() => { - const ids = new Set<string>() - const collect = (index: RunIndex | null | undefined) => { - const steps = index?.steps ?? {} - Object.values(steps).forEach((meta: any) => { - const id = - typeof meta?.refs?.evaluator?.id === "string" - ? meta.refs.evaluator.id - : undefined - if (id) ids.add(id) - }) - } - collect(runIndex) - Object.values(comparisonRunIndexes || {}).forEach(collect) - return ids - }, [runIndex, comparisonRunIndexes]) - - const catalogEvaluatorsByIdentifier = useMemo(() => { - const map = new Map<string, any>() - const register = (entry: any) => { - if (!entry) return - collectEvaluatorIdentifiers(entry).forEach((identifier) => { - if (!map.has(identifier)) { - map.set(identifier, entry) - } - }) - } - toArray(previewEvaluators).forEach(register) - toArray(projectEvaluators).forEach(register) - Object.values(fetchedEvaluatorsById || {}).forEach(register) - return map - }, [previewEvaluators, projectEvaluators, fetchedEvaluatorsById]) - - const resolvedMetricsFromEvaluators = useMemo(() => { - const result: Record<string, any[]> = {} - const appendDefinition = ( - slug: string | undefined, - metricName: string | undefined, - metricType?: string | string[], - ) => { - if (!slug) return - const name = metricName?.trim() - if (!name) return - - const list = (result[slug] ||= []) - const existing = list.find((definition: Record<string, any>) => - Object.prototype.hasOwnProperty.call(definition, name), - ) - if (existing) { - existing[name] = { - ...existing[name], - metricType: existing[name]?.metricType ?? metricType, - } - return - } - list.push({ - [name]: {metricType}, - }) - } - - const registerEvaluator = (entry: any) => { - if (!entry || typeof entry !== "object") return - const slug = pickString(entry.slug) - if (!slug) return - const schemas = collectMetricSchemasFromEvaluator(entry) - schemas.forEach(({name, schema}) => { - appendDefinition(slug, name, deriveSchemaMetricType(schema)) - }) - } - - allEvaluators.forEach((evaluator: any) => { - const identifiers = collectEvaluatorIdentifiers(evaluator) - let catalogMatch: any - for (const identifier of identifiers) { - const matched = catalogEvaluatorsByIdentifier.get(identifier) - if (matched) { - catalogMatch = matched - break - } - } - const merged = mergeEvaluatorRecords(evaluator, catalogMatch) - registerEvaluator(merged) - }) - - Object.entries(metricsFromEvaluators || {}).forEach(([slug, definitions]) => { - const entries = Array.isArray(definitions) ? definitions : [definitions] - entries.forEach((definition) => { - if (!definition || typeof definition !== "object") return - Object.entries(definition).forEach(([metricName, meta]) => { - if (metricName === "evaluatorSlug") return - appendDefinition(slug, metricName, (meta as any)?.metricType) - }) - }) - }) - - return result - }, [allEvaluators, catalogEvaluatorsByIdentifier, metricsFromEvaluators]) - - useEffect(() => { - const knownIds = new Set<string>() - ;[ - ...(allEvaluators || []), - ...(previewEvaluators || []), - ...(projectEvaluators || []), - ...(Object.values(fetchedEvaluatorsById) || []), - ].forEach((ev: any) => { - const id = typeof ev?.id === "string" ? ev.id : undefined - if (id) knownIds.add(id) - }) - - const missingIds = Array.from(evaluatorIdsAcrossRunIndexes).filter( - (id) => !knownIds.has(id), - ) - if (!missingIds.length) return - - let cancelled = false - ;(async () => { - const results = await Promise.allSettled( - missingIds.map(async (id) => { - try { - const evaluator = await fetchEvaluatorById(id) - return {id, evaluator} - } catch (error) { - console.warn( - "[useExpandableComparisonDataSource] Failed to fetch evaluator by id", - JSON.stringify({id, error: (error as Error)?.message}), - ) - return {id, evaluator: null} - } - }), - ) - if (cancelled) return - setFetchedEvaluatorsById((prev) => { - const next = {...prev} - results.forEach((result) => { - if (result.status !== "fulfilled") return - const {id, evaluator} = result.value - if (evaluator && !next[id]) { - next[id] = evaluator - } - }) - return next - }) - })() - - return () => { - cancelled = true - } - }, [ - evaluatorIdsAcrossRunIndexes, - allEvaluators, - previewEvaluators, - projectEvaluators, - fetchedEvaluatorsById, - ]) - const revisionSlugMap = useMemo(() => { - const map = new Map<string, string>() - Object.values(runIndex?.steps ?? {}).forEach((meta: any) => { - if (!meta || meta.kind !== "annotation") return - const baseSlug = - typeof meta?.refs?.evaluator?.slug === "string" - ? meta.refs.evaluator.slug - : undefined - const revisionSlug = - typeof meta?.refs?.evaluatorRevision?.slug === "string" - ? meta.refs.evaluatorRevision.slug - : undefined - if (baseSlug && revisionSlug && baseSlug !== revisionSlug && !map.has(baseSlug)) { - map.set(baseSlug, revisionSlug) - } - }) - return map - }, [runIndex]) - - const rawColumns = useMemo( - () => - buildScenarioTableData({ - runIndex, - metricsFromEvaluators: resolvedMetricsFromEvaluators, - runId: baseRunId, - evaluators: allEvaluators, - evaluatorNameBySlug, - revisionSlugByEvaluatorSlug: revisionSlugMap, - }), - [ - runIndex, - resolvedMetricsFromEvaluators, - allEvaluators, - evaluatorNameBySlug, - revisionSlugMap, - expendedRows, - ], - ) - - const columnsWithRunSpecificSteps = useMemo(() => { - if (!rawColumns) return [] as TableColumn[] - - const allRunIndexes: Record<string, RunIndex | null | undefined> = { - [baseRunId]: runIndex, - ...(comparisonRunIndexes || {}), - } - - const cache = new Map<string, any[]>() - - const getColumnsForRun = (runId: string) => { - if (cache.has(runId)) return cache.get(runId)! - const idx = allRunIndexes[runId] - const cols = idx ? Object.values(idx.columnsByStep || {}).flat() : [] - cache.set(runId, cols) - return cols - } - - const matchStepKey = (runId: string, column: any): string | undefined => { - if (runId === baseRunId && column.stepKey) return column.stepKey - const candidates = getColumnsForRun(runId) - const match = candidates.find((candidate) => { - if (candidate.kind !== column.kind) return false - if (column.path && candidate.path) { - return candidate.path === column.path - } - if (column.name && candidate.name) { - return candidate.name === column.name - } - return false - }) - return match?.stepKey - } - - const attach = (columns: any[]): any[] => - columns.map((column) => { - const children = column.children ? attach(column.children) : undefined - const shouldAttachStepKey = - column.kind === "input" || - column.kind === "invocation" || - column.kind === "annotation" - - if (!shouldAttachStepKey) { - return children ? {...column, children} : column - } - - const stepKeyByRunId = Object.keys(allRunIndexes).reduce< - Record<string, string | undefined> - >((acc, runId) => { - const mapped = matchStepKey(runId, column) - if (mapped) acc[runId] = mapped - return acc - }, {}) - - if (column.stepKey && !stepKeyByRunId[baseRunId]) { - stepKeyByRunId[baseRunId] = column.stepKey - } - - if (!Object.keys(stepKeyByRunId).length) { - return children ? {...column, children} : column - } - - const enriched = { - ...column, - stepKeyByRunId, - } - if (children) enriched.children = children - return enriched - }) - - return attach(rawColumns as any[]) as TableColumn[] - }, [rawColumns, baseRunId, runIndex, comparisonRunIndexes]) - - // Build Ant Design columns using the same function as regular table - const baseAntColumns = useMemo( - () => - buildAntdColumns(columnsWithRunSpecificSteps as TableColumn[], baseRunId, { - expendedRows, - }), - [columnsWithRunSpecificSteps, baseRunId, expendedRows], - ) - - const hiddenColumns = useAtomValue(editColumnsFamily(baseRunId)) - - const antColumns = useMemo( - () => filterColumns(baseAntColumns, hiddenColumns), - [baseAntColumns, hiddenColumns], - ) - - // For backward compatibility, also provide basic columns - const columns = baseAntColumns - - // No longer need expandedRowRender - using children approach instead - const expandedRowRender = undefined - - const loading = false - - // Build rows with actual scenario data - use the SAME approach as regular table - const scenarioIds = useAtomValue(displayedScenarioIdsFamily(baseRunId)) || [] - - const rows = useMemo(() => { - const builtRows = scenarioIds.map((scenarioId, idx) => { - // Get matched comparison scenarios for this base scenario - const comparedScenarios = matchedScenarios[scenarioId] || [] - const baseState = store.get(evaluationRunStateFamily(baseRunId)) - const baseColorIndex = baseState?.colorIndex ?? 1 - - // Create base row structure - const baseRow = { - key: scenarioId, - scenarioIndex: idx + 1, - runId: baseRunId, // This row represents the base run - compareIndex: 1, - colorIndex: baseColorIndex, - // Add children for comparison scenarios - children: comparedScenarios.map((compScenario, compIdx) => ({ - key: `${scenarioId}-comp-${compScenario.runId}-${compIdx}`, - scenarioIndex: idx + 1, // Same scenario index as parent - runId: compScenario.runId, // Use comparison run ID - scenarioId: compScenario.scenarioId, // Use comparison scenario ID - isComparison: true, // Flag to identify comparison rows - isLastRow: compIdx === comparedScenarios.length - 1, - compareIndex: compScenario.compareIndex, - colorIndex: compScenario.colorIndex ?? compScenario.compareIndex, - })), - } - - return baseRow - }) - - return builtRows - }, [scenarioIds, matchedScenarios, baseRunId, store]) - - return { - antColumns, - columns, - rawColumns: baseAntColumns, - rows, - expandedRowRender, - loading, - totalColumnWidth: 0, // TODO: Calculate if needed - } -} - -export default useExpandableComparisonDataSource diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useScrollToScenario.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useScrollToScenario.ts deleted file mode 100644 index f901299ad8..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useScrollToScenario.ts +++ /dev/null @@ -1,88 +0,0 @@ -import {RefObject, useEffect, useMemo, useRef} from "react" - -import {useRouter} from "next/router" - -import {TableRow} from "../types" - -type TableRowWithChildren = TableRow & { - scenarioId?: string - children?: TableRowWithChildren[] -} - -const useScrollToScenario = ({ - dataSource, - expandedRowKeys = [], -}: { - dataSource: TableRowWithChildren[] - expandedRowKeys?: string[] -}) => { - const router = useRouter() - const tableContainerRef = useRef<HTMLDivElement | null>(null) - const tableInstance = useRef<any>(null) - - const selectedScenarioId = router.query.scrollTo as string - - const flattenedRowKeys = useMemo(() => { - const keys: string[] = [] - const expandedSet = new Set((expandedRowKeys || []).map((key) => String(key))) - - const traverse = (rows: TableRowWithChildren[] = []) => { - rows.forEach((row) => { - const rowKey = (row?.key ?? row?.scenarioId) as string | undefined - if (!rowKey) return - - keys.push(rowKey) - - const isExpanded = expandedSet.has(rowKey) - if (!isExpanded) { - return - } - - if (Array.isArray(row.children) && row.children.length > 0) { - traverse(row.children) - } - }) - } - - traverse(dataSource) - - return keys - }, [dataSource, expandedRowKeys]) - - // Scroll to the specified row when user selects a scenario in auto eval - useEffect(() => { - if (!router.isReady) return - if (!tableInstance.current || !selectedScenarioId) return - // Get the row index from the flattened dataSource including expanded rows - const rowIndex = flattenedRowKeys.findIndex((key) => key === selectedScenarioId) - if (rowIndex === -1) return - // Use Ant Design's scrollTo method for virtualized tables when available - if (typeof tableInstance.current?.scrollTo === "function") { - tableInstance.current.scrollTo({ - index: rowIndex, - behavior: "smooth", - }) - } - - const rowElement = tableContainerRef.current?.querySelector( - `[data-row-key="${selectedScenarioId}"]`, - ) as HTMLElement | null - - // Fallback to native DOM scrolling when virtualization instance is unavailable - if (typeof tableInstance.current?.scrollTo !== "function") { - rowElement?.scrollIntoView({behavior: "smooth", block: "center"}) - } - - // Add highlight effect - if (rowElement) { - rowElement.classList.add("highlight-row") - setTimeout(() => { - rowElement.classList.remove("highlight-row") - }, 2000) - } - }, [selectedScenarioId, flattenedRowKeys, router.isReady]) - - return {tableContainerRef, tableInstance} -} - -export default useScrollToScenario diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useTableDataSource.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useTableDataSource.ts deleted file mode 100644 index f5628bae0e..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/hooks/useTableDataSource.ts +++ /dev/null @@ -1,426 +0,0 @@ -import {useEffect, useMemo, useState} from "react" - -import deepEqual from "fast-deep-equal" -import {atom, useAtom, useAtomValue} from "jotai" -import {atomFamily, selectAtom} from "jotai/utils" -import {Loadable} from "jotai/vanilla/utils/loadable" -import groupBy from "lodash/groupBy" - -import {filterColumns} from "@/oss/components/Filters/EditColumns/assets/helper" -import {useRunId} from "@/oss/contexts/RunIdContext" -import {ColumnDef} from "@/oss/lib/hooks/useEvaluationRunData/assets/helpers/buildRunIndex" -import useEvaluatorConfigs from "@/oss/lib/hooks/useEvaluatorConfigs" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import {fetchEvaluatorById} from "@/oss/services/evaluators" - -import { - evaluationRunStateFamily, - loadingStateFamily, - runIndexFamily, -} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedAtoms" -// import {scenarioMetricsMapFamily} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import {runMetricsStatsCacheFamily} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedMetrics" -import { - displayedScenarioIdsFamily, - loadableScenarioStepFamily, -} from "../../../../../lib/hooks/useEvaluationRunData/assets/atoms/runScopedScenarios" -import {evaluatorFailuresMapFamily} from "../assets/atoms/evaluatorFailures" -import {buildScenarioTableData, buildScenarioTableRows} from "../assets/dataSourceBuilder" -import {buildEvaluatorNameMap} from "../assets/evaluatorNameUtils" -import { - collectEvaluatorIdentifiers, - collectMetricSchemasFromEvaluator, - deriveSchemaMetricType, - mergeEvaluatorRecords, - pickString, - toArray, -} from "../assets/evaluatorSchemaUtils" -import {buildAntdColumns} from "../assets/utils" - -const EMPTY_SCENARIOS: any[] = [] -const EMPTY_METRICS_MAP: Record<string, any[]> = {} - -export const editColumnsFamily = atomFamily((runId: string) => atom<string[]>([]), deepEqual) - -export const allScenariosLoadedFamily = atomFamily( - (runId: string) => - atom((get) => { - const runState = get(evaluationRunStateFamily(runId)) - const loadingState = get(loadingStateFamily(runId)) - const scenarios = runState?.scenarios - if (loadingState?.isLoadingScenarios) return false - return Array.isArray(scenarios) - }), - deepEqual, -) - -// Run-scoped metrics from evaluators atom family -export const metricsFromEvaluatorsFamily = atomFamily( - (runId: string) => - selectAtom( - evaluationRunStateFamily(runId), - (state) => { - const evs = state?.enrichedRun?.evaluators - ? Object.values(state.enrichedRun.evaluators) - : [] - if (!evs || !Array.isArray(evs)) { - return {} - } - return groupBy( - evs.reduce((acc: any[], ev: any) => { - return [ - ...acc, - ...Object.entries(ev.metrics || {}).map( - ([metricName, metricInfo]: [string, any]) => { - return { - [metricName]: { - metricType: metricInfo.type, - }, - evaluatorSlug: ev.slug, - } - }, - ), - ] - }, []), - (def: any) => { - return def.evaluatorSlug - }, - ) - }, - deepEqual, - ), - deepEqual, -) - -const firstScenarioLoadableFamily = atomFamily( - (runId: string) => - atom((get) => { - const ids = get(displayedScenarioIdsFamily(runId)) || EMPTY_SCENARIOS - if (!ids.length) { - return {state: "hasValue", data: undefined} as Loadable< - UseEvaluationRunScenarioStepsFetcherResult | undefined - > - } - return get(loadableScenarioStepFamily({runId, scenarioId: ids[0]})) - }), - deepEqual, -) - -const useTableDataSource = () => { - const runId = useRunId() - - // states - const [editColumns, setEditColumns] = useAtom(editColumnsFamily(runId)) - - // Read from the same global store that writes are going to - const scenarioIds = useAtomValue(displayedScenarioIdsFamily(runId)) || EMPTY_SCENARIOS - const allScenariosLoaded = useAtomValue(allScenariosLoadedFamily(runId)) - - // const metricDistributions = useAtomValue(runMetricsStatsAtom) - const runIndex = useAtomValue(runIndexFamily(runId)) - const metricsFromEvaluators = - useAtomValue(metricsFromEvaluatorsFamily(runId)) || EMPTY_METRICS_MAP - const metricStatsMap = useAtomValue(runMetricsStatsCacheFamily(runId)) || {} - // temporary implementation to implement loading state for auto eval - const firstScenarioLoadable = useAtomValue(firstScenarioLoadableFamily(runId)) - const loadableState = firstScenarioLoadable?.state - const evaluationRunState = useAtomValue(evaluationRunStateFamily(runId)) - const runAppId = - evaluationRunState?.enrichedRun?.appId ?? - evaluationRunState?.enrichedRun?.app_id ?? - evaluationRunState?.enrichedRun?.app?.id ?? - evaluationRunState?.enrichedRun?.application?.id ?? - null - const rawEvaluators = evaluationRunState?.enrichedRun?.evaluators - const runEvaluators = useMemo( - () => - Array.isArray(rawEvaluators) - ? rawEvaluators - : rawEvaluators - ? Object.values(rawEvaluators) - : [], - [rawEvaluators], - ) - const revisionSlugByEvaluatorSlug = useMemo(() => { - const map = new Map<string, string>() - const steps = runIndex?.steps ?? {} - Object.values(steps).forEach((meta: any) => { - if (!meta || meta.kind !== "annotation") return - const baseSlug = pickString(meta?.refs?.evaluator?.slug) - const revisionSlug = pickString(meta?.refs?.evaluatorRevision?.slug) - if (baseSlug && revisionSlug && baseSlug !== revisionSlug) { - if (!map.has(baseSlug)) { - map.set(baseSlug, revisionSlug) - } - } - }) - return map - }, [runIndex]) - const evaluatorFailuresMap = useAtomValue(evaluatorFailuresMapFamily(runId)) - const {data: previewEvaluators} = useEvaluators({preview: true}) - const {data: projectEvaluators} = useEvaluators() - const [fetchedEvaluatorsById, setFetchedEvaluatorsById] = useState<Record<string, any>>({}) - const {data: evaluatorConfigs} = useEvaluatorConfigs({appId: runAppId}) - const evaluatorConfigsForNames = useMemo( - () => - (evaluatorConfigs ?? []).map((config) => ({ - ...config, - slug: config?.id, - })), - [evaluatorConfigs], - ) - const evaluatorNameBySlug = useMemo( - () => - buildEvaluatorNameMap( - runEvaluators, - previewEvaluators, - projectEvaluators, - evaluatorConfigsForNames, - Object.values(fetchedEvaluatorsById), - ), - [ - runEvaluators, - previewEvaluators, - projectEvaluators, - evaluatorConfigsForNames, - fetchedEvaluatorsById, - ], - ) - - const catalogEvaluatorsByIdentifier = useMemo(() => { - const map = new Map<string, any>() - const register = (entry: any) => { - if (!entry) return - collectEvaluatorIdentifiers(entry).forEach((identifier) => { - if (!map.has(identifier)) { - map.set(identifier, entry) - } - }) - } - toArray(previewEvaluators).forEach(register) - toArray(projectEvaluators).forEach(register) - Object.values(fetchedEvaluatorsById || {}).forEach(register) - return map - }, [previewEvaluators, projectEvaluators, fetchedEvaluatorsById]) - - const resolvedMetricsFromEvaluators = useMemo(() => { - const result: Record<string, any[]> = {} - const appendDefinition = ( - slug: string | undefined, - metricName: string | undefined, - metricType?: string | string[], - ) => { - if (!slug) return - const name = metricName?.trim() - if (!name) return - - const list = (result[slug] ||= []) - const existing = list.find((definition: Record<string, any>) => - Object.prototype.hasOwnProperty.call(definition, name), - ) - if (existing) { - existing[name] = { - ...existing[name], - metricType: existing[name]?.metricType ?? metricType, - } - return - } - list.push({ - [name]: {metricType}, - }) - } - - const registerEvaluator = (entry: any) => { - if (!entry || typeof entry !== "object") return - const slug = pickString(entry.slug) - if (!slug) return - const schemas = collectMetricSchemasFromEvaluator(entry) - schemas.forEach(({name, schema}) => { - appendDefinition(slug, name, deriveSchemaMetricType(schema)) - }) - } - - runEvaluators.forEach((evaluator: any) => { - const identifiers = collectEvaluatorIdentifiers(evaluator) - let catalogMatch: any - for (const identifier of identifiers) { - const matched = catalogEvaluatorsByIdentifier.get(identifier) - if (matched) { - catalogMatch = matched - break - } - } - const merged = mergeEvaluatorRecords(evaluator, catalogMatch) - registerEvaluator(merged) - }) - - Object.entries(metricsFromEvaluators || {}).forEach(([slug, definitions]) => { - const entries = Array.isArray(definitions) ? definitions : [definitions] - entries.forEach((definition) => { - if (!definition || typeof definition !== "object") return - Object.entries(definition).forEach(([metricName, meta]) => { - if (metricName === "evaluatorSlug") return - appendDefinition(slug, metricName, (meta as any)?.metricType) - }) - }) - }) - - return result - }, [ - catalogEvaluatorsByIdentifier, - metricsFromEvaluators, - runEvaluators, - revisionSlugByEvaluatorSlug, - ]) - - const evaluatorIdsFromRunIndex = useMemo(() => { - const ids = new Set<string>() - const steps = runIndex?.steps ?? {} - Object.values(steps).forEach((meta: any) => { - const id = - typeof meta?.refs?.evaluator?.id === "string" ? meta.refs.evaluator.id : undefined - if (id) ids.add(id) - }) - return ids - }, [runIndex]) - - useEffect(() => { - const knownIds = new Set<string>() - ;[ - ...(runEvaluators || []), - ...(previewEvaluators || []), - ...(projectEvaluators || []), - ...(Object.values(fetchedEvaluatorsById) || []), - ].forEach((ev: any) => { - const id = typeof ev?.id === "string" ? ev.id : undefined - if (id) knownIds.add(id) - }) - - const missingIds = Array.from(evaluatorIdsFromRunIndex).filter((id) => !knownIds.has(id)) - if (!missingIds.length) return - - let cancelled = false - ;(async () => { - const results = await Promise.allSettled( - missingIds.map(async (id) => { - try { - const evaluator = await fetchEvaluatorById(id) - return {id, evaluator} - } catch (error) { - console.warn( - "[useTableDataSource] Failed to fetch evaluator by id", - JSON.stringify({id, error: (error as Error)?.message}), - ) - return {id, evaluator: null} - } - }), - ) - if (cancelled) return - setFetchedEvaluatorsById((prev) => { - const next = {...prev} - results.forEach((result) => { - if (result.status !== "fulfilled") return - const {id, evaluator} = result.value - if (evaluator && !next[id]) { - next[id] = evaluator - } - }) - return next - }) - })() - - return () => { - cancelled = true - } - }, [ - evaluatorIdsFromRunIndex, - runEvaluators, - previewEvaluators, - projectEvaluators, - fetchedEvaluatorsById, - ]) - - const scenarioMetaById = useMemo(() => { - const map = new Map<string, {timestamp?: string; createdAt?: string}>() - const scenarios = evaluationRunState?.scenarios || [] - scenarios.forEach((sc: any) => { - const identifier = sc?.id || sc?._id - if (!identifier) return - map.set(identifier, { - timestamp: sc?.timestamp || sc?.createdAt || sc?.created_at, - createdAt: sc?.createdAt || sc?.created_at, - }) - }) - return map - }, [evaluationRunState?.scenarios]) - - const isLoadingSteps = useMemo(() => { - if (!scenarioIds || scenarioIds.length === 0) return false - return loadableState === "loading" || !allScenariosLoaded - }, [scenarioIds, loadableState, allScenariosLoaded]) - - const rows = useMemo(() => { - return buildScenarioTableRows({ - scenarioIds, - allScenariosLoaded, - runId, - scenarioMetaById, - }) - }, [scenarioIds, allScenariosLoaded, scenarioMetaById, runId]) - - // New alternative data source built via shared helper - const builtColumns: ColumnDef[] = useMemo( - () => - buildScenarioTableData({ - runIndex, - runId, - metricsFromEvaluators: resolvedMetricsFromEvaluators, - metrics: metricStatsMap, - evaluators: runEvaluators, - evaluatorNameBySlug, - revisionSlugByEvaluatorSlug, - }), - [ - runIndex, - runId, - resolvedMetricsFromEvaluators, - metricStatsMap, - runEvaluators, - evaluatorNameBySlug, - revisionSlugByEvaluatorSlug, - ], - ) - - // Build Ant Design columns and make them resizable - const antColumns = useMemo(() => { - return buildAntdColumns(builtColumns, runId, {evaluatorFailuresMap}) - }, [builtColumns, runId, evaluatorFailuresMap]) - - const visibleColumns = useMemo( - () => filterColumns(antColumns, editColumns), - [antColumns, editColumns], - ) - - const totalColumnWidth = useMemo(() => { - const calc = (cols: any[]): number => - cols.reduce((sum, col) => { - if (col?.children && col?.children.length) { - return sum + calc(col?.children) - } - return sum + (col?.width ?? col?.minWidth ?? 100) - }, 0) - return calc(antColumns) - }, [antColumns]) - - return { - rawColumns: antColumns, - antColumns: visibleColumns, - rows, - totalColumnWidth, - isLoadingSteps, - editColumns, - setEditColumns, - } -} - -export default useTableDataSource diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/index.tsx b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/index.tsx deleted file mode 100644 index 19db92e1fa..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import {memo} from "react" - -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" - -import {urlStateAtom} from "../../state/urlState" - -import ScenarioTable from "./ScenarioTable" - -const ComparisonTable = dynamic(() => import("./ComparisonScenarioTable"), {ssr: false}) - -const VirtualizedScenarioTable = () => { - const urlState = useAtomValue(urlStateAtom) - const isComparisonMode = Boolean(urlState.compare && urlState.compare.length > 0) - - if (isComparisonMode) { - return <ComparisonTable /> - } - - return <ScenarioTable /> -} - -export default VirtualizedScenarioTable diff --git a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/types.ts b/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/types.ts deleted file mode 100644 index 393826b5db..0000000000 --- a/web/oss/src/components/EvalRunDetails/components/VirtualizedScenarioTable/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {ColumnsType} from "antd/es/table" - -export interface TableRow { - key: string // scenarioId - scenarioIndex: number - status?: string - result?: string - baseRunId?: string - runId?: string - scenarioId?: string - /** - * For skeleton rows shown while data is loading. - */ - isSkeleton?: boolean - timestamp?: string | null - temporalGroupKey?: string - temporalGroupIndex?: number - isTemporalGroupStart?: boolean -} - -export interface VirtualizedScenarioTableProps { - columns?: ColumnsType - dataSource?: TableRow[] - totalColumnWidth?: number -} diff --git a/web/oss/src/components/EvalRunDetails/hooks/useCachedScenarioSteps.ts b/web/oss/src/components/EvalRunDetails/hooks/useCachedScenarioSteps.ts deleted file mode 100644 index 3e8693d4a3..0000000000 --- a/web/oss/src/components/EvalRunDetails/hooks/useCachedScenarioSteps.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {useEffect, useMemo} from "react" - -import {useAtomValue} from "jotai" -import {loadable} from "jotai/utils" - -import {scenarioStepFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms/runScopedScenarios" -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" - -type ScenarioStepLoadableState = ReturnType< - typeof loadable<ReturnType<typeof scenarioStepFamily>> ->["state"] - -const scenarioStepsCache = new Map<string, UseEvaluationRunScenarioStepsFetcherResult>() -const resolvedKeys = new Set<string>() - -export const useCachedScenarioSteps = ( - runId?: string | null, - scenarioId?: string | null, -): { - data?: UseEvaluationRunScenarioStepsFetcherResult - state: ScenarioStepLoadableState - hasResolved: boolean - error?: unknown -} => { - const key = runId && scenarioId ? `${runId}::${scenarioId}` : null - - const loadableAtom = useMemo(() => { - if (!runId || !scenarioId) return null - return loadable( - scenarioStepFamily({ - runId, - scenarioId, - }), - ) - }, [runId, scenarioId]) - - const stepLoadable = loadableAtom - ? (useAtomValue(loadableAtom) as { - state: ScenarioStepLoadableState - data?: UseEvaluationRunScenarioStepsFetcherResult - }) - : undefined - - useEffect(() => { - if (!key || !stepLoadable) return - if (stepLoadable.state === "hasData" && stepLoadable.data) { - scenarioStepsCache.set(key, stepLoadable.data) - resolvedKeys.add(key) - } - }, [key, stepLoadable]) - - const cached = key ? scenarioStepsCache.get(key) : undefined - const data = - stepLoadable?.state === "hasData" && stepLoadable.data - ? stepLoadable.data - : cached !== undefined - ? cached - : undefined - - const state = - stepLoadable?.state ?? (key ? (resolvedKeys.has(key) ? "stale" : "loading") : "loading") - const hasResolved = key ? resolvedKeys.has(key) : false - const error = stepLoadable?.state === "hasError" ? stepLoadable.error : undefined - - return {data, state, hasResolved, error} -} diff --git a/web/oss/src/components/EvalRunDetails/hooks/useMetricStepError.ts b/web/oss/src/components/EvalRunDetails/hooks/useMetricStepError.ts deleted file mode 100644 index 460be125d1..0000000000 --- a/web/oss/src/components/EvalRunDetails/hooks/useMetricStepError.ts +++ /dev/null @@ -1,120 +0,0 @@ -import {useMemo} from "react" - -import {UseEvaluationRunScenarioStepsFetcherResult} from "@/oss/lib/hooks/useEvaluationRunScenarioSteps/types" -import {EvaluationStatus} from "@/oss/lib/Types" - -import {useCachedScenarioSteps} from "./useCachedScenarioSteps" - -import { - resolveErrorMessage, - resolveStepFailure, -} from "../components/VirtualizedScenarioTable/assets/MetricCell/helpers" - -type ScenarioStepsResult = { - data?: UseEvaluationRunScenarioStepsFetcherResult - state?: ReturnType<typeof useCachedScenarioSteps>["state"] - hasResolved?: boolean - error?: unknown -} - -interface UseMetricStepErrorOptions { - runId?: string | null - scenarioId?: string | null - metricKey: string - fallbackKey?: string - fullKey?: string - stepKey?: string - slugCandidates?: string[] - scenarioStepsResult?: ScenarioStepsResult -} - -export const useMetricStepError = ({ - runId, - scenarioId, - metricKey, - fallbackKey, - fullKey, - stepKey, - slugCandidates, - scenarioStepsResult, -}: UseMetricStepErrorOptions) => { - const shouldFetch = Boolean(runId && scenarioId) - - const fallbackResult = useCachedScenarioSteps( - shouldFetch ? (runId ?? undefined) : undefined, - shouldFetch ? (scenarioId ?? undefined) : undefined, - ) - - const effectiveResult = scenarioStepsResult ?? fallbackResult - - const {data, state, hasResolved, error} = effectiveResult - - const errorStep = useMemo(() => { - if (!shouldFetch) return null - - if (!data && !hasResolved) return null - - if (state === "hasError") { - return { - status: EvaluationStatus.ERROR, - error: resolveErrorMessage(error), - } - } - - if (!data) return null - - const defaultSlugCandidates = (() => { - const derived: string[] = [] - const [baseSlug] = metricKey.split(".") - if (baseSlug) derived.push(baseSlug) - - const fallbackSlug = fallbackKey?.split(".")?.[0] - if (fallbackSlug && !derived.includes(fallbackSlug)) { - derived.push(fallbackSlug) - } - const fullSlug = fullKey?.split(".")?.[0] - if (fullSlug && !derived.includes(fullSlug)) { - derived.push(fullSlug) - } - return derived - })() - - const combinedSlugCandidates = (() => { - const set = new Set<string>() - defaultSlugCandidates.forEach((slug) => slug && set.add(slug)) - slugCandidates?.forEach((slug) => slug && set.add(slug)) - return Array.from(set) - })() - - const failure = resolveStepFailure({ - data, - scenarioId: scenarioId ?? "", - slugCandidates: combinedSlugCandidates, - stepKey, - debug: {metricKey, runId}, - }) - - return failure - }, [ - shouldFetch, - data, - hasResolved, - state, - error, - metricKey, - fallbackKey, - fullKey, - slugCandidates, - stepKey, - scenarioId, - runId, - ]) - - return { - errorStep, - scenarioSteps: data, - scenarioStepsState: state, - hasResolvedScenarioSteps: hasResolved, - scenarioStepsError: error, - } -} diff --git a/web/oss/src/components/EvalRunDetails/index.tsx b/web/oss/src/components/EvalRunDetails/index.tsx deleted file mode 100644 index 0e7d748c61..0000000000 --- a/web/oss/src/components/EvalRunDetails/index.tsx +++ /dev/null @@ -1,339 +0,0 @@ -import {memo, useCallback, useEffect} from "react" - -import {Spin, Typography} from "antd" -import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {getDefaultStore, useAtom, useAtomValue, useSetAtom} from "jotai" -import {selectAtom} from "jotai/utils" -import {useRouter} from "next/router" - -import ErrorState from "@/oss/components/ErrorState" -import EvalRunDetails from "@/oss/components/EvalRunDetails/HumanEvalRun" -import SingleModelEvaluationTable from "@/oss/components/EvaluationTable/SingleModelEvaluationTable" -import {RunIdProvider} from "@/oss/contexts/RunIdContext" -import {appendBreadcrumbAtom, breadcrumbAtom, setBreadcrumbsAtom} from "@/oss/lib/atoms/breadcrumb" -import {isUuid} from "@/oss/lib/helpers/utils" -import useEvaluationRunData from "@/oss/lib/hooks/useEvaluationRunData" -import { - evaluationRunStateFamily, - initializeRun, -} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {_EvaluationScenario, Evaluation} from "@/oss/lib/Types" -import {abortAll} from "@/oss/lib/utils/abortControllers" - -import EvaluationScenarios from "../pages/evaluations/evaluationScenarios/EvaluationScenarios" - -import AutoEvalRunDetails from "./AutoEvalRun" -import {ComparisonDataFetcher} from "./components/ComparisonDataFetcher" -import OnlineEvalRunDetails from "./OnlineEvalRun" -import OnlineUrlSync from "./OnlineEvalRun/OnlineUrlSync" -import {evalTypeAtom, setEvalTypeAtom} from "./state/evalType" -import UrlSync from "./UrlSync" - -const EvaluationPageData = memo( - ({children, runId}: {children?: React.ReactNode; runId?: string}) => { - const router = useRouter() - - // Abort any in-flight data requests when navigating away - useEffect(() => { - if (runId) { - initializeRun(runId) - } - }, [runId]) - - // Abort any in-flight data requests when navigating away - useEffect(() => { - return () => { - abortAll() - } - }, [router.pathname]) - - useEvaluationRunData(runId || null, true, runId) - return runId ? children : null - }, -) - -const LegacyEvaluationPage = ({id: evaluationTableId}: {id: string}) => { - const evalType = useAtomValue(evalTypeAtom) - - const {legacyEvaluationSWR, legacyScenariosSWR} = useEvaluationRunData( - evaluationTableId || null, - true, - ) - - if (legacyEvaluationSWR.isLoading || legacyScenariosSWR.isLoading) { - return ( - <div className="w-full h-[calc(100dvh-70px)] flex items-center justify-center"> - <div className="flex gap-2 items-center justify-center"> - <Spin spinning={true} /> - <Typography.Text className="text-[16px] leading-[18px] font-[600]"> - Loading... - </Typography.Text> - </div> - </div> - ) - } - - const data = legacyEvaluationSWR.data - - return data ? ( - evalType === "auto" || evalType === "custom" ? ( - <EvaluationScenarios scenarios={legacyScenariosSWR.data as _EvaluationScenario[]} /> - ) : evalType === "human" ? ( - <SingleModelEvaluationTable - evaluationScenarios={legacyScenariosSWR.data as any[]} - evaluation={data as Evaluation} - isLoading={legacyEvaluationSWR.isLoading || legacyScenariosSWR.isLoading} - /> - ) : null - ) : null -} - -const PreviewEvaluationPage = memo( - ({ - evalType, - name, - description, - id, - }: { - evalType: "auto" | "human" | "online" | "custom" - name: string - description: string - id: string - }) => { - return evalType === "auto" || evalType === "custom" ? ( - <AutoEvalRunDetails name={name} description={description} id={id} isLoading={false} /> - ) : evalType === "online" ? ( - <OnlineEvalRunDetails name={name} description={description} id={id} /> - ) : ( - <EvalRunDetails description={description} name={name} id={id} /> - ) - }, -) - -const LoadingState = ({ - evalType, - name, - description, - id, -}: { - evalType: "auto" | "human" | "online" | "custom" - name: string - description: string - id: string -}) => { - return evalType === "auto" || evalType === "custom" ? ( - <AutoEvalRunDetails name={name} description={description} id={id} isLoading /> - ) : evalType === "online" ? ( - <OnlineEvalRunDetails name={name} description={description} id={id} isLoading /> - ) : ( - <div className="w-full h-[calc(100dvh-70px)] flex items-center justify-center"> - <div className="flex gap-2 items-center justify-center"> - <Spin spinning={true} /> - <Typography.Text className="text-[16px] leading-[18px] font-[600]"> - Loading... - </Typography.Text> - </div> - </div> - ) -} - -const EvaluationPage = memo( - ({evalType, runId}: {evalType: "auto" | "human" | "online" | "custom"; runId: string}) => { - const rootStore = getDefaultStore() - const breadcrumbs = useAtomValue(breadcrumbAtom, {store: rootStore}) - const appendBreadcrumb = useSetAtom(appendBreadcrumbAtom, {store: rootStore}) - - const router = useRouter() - - const {isPreview, name, description, id} = useAtomValue( - selectAtom( - evaluationRunStateFamily(runId!), - useCallback((v) => { - return { - isPreview: v.isPreview, - name: v.enrichedRun?.name, - description: v.enrichedRun?.description, - id: v.enrichedRun?.id, - } - }, []), - deepEqual, - ), - ) - - useEffect(() => { - // Try loaded name first; fallback to name in URL (when present as /results/:id/:name). - const base = (typeof window !== "undefined" ? window.location.pathname : "") || "" - const segs = base.split("/").filter(Boolean) - const resultsIdx = segs.findIndex((s) => s === "results") - const urlName = - resultsIdx !== -1 && segs[resultsIdx + 2] && !isUuid(segs[resultsIdx + 2]) - ? segs[resultsIdx + 2] - : undefined - - const label = name || urlName - if (!id || !label) return - - const existing = (breadcrumbs && (breadcrumbs["eval-detail"] as any)) || null - const currentLabel: string | undefined = existing?.label - if (currentLabel === label) return - - appendBreadcrumb({ - "eval-detail": { - label, - value: id as string, - }, - }) - }, [appendBreadcrumb, breadcrumbs, id, name]) - - useEffect(() => { - const base = (typeof window !== "undefined" ? window.location.pathname : "") || "" - const segs = base.split("/").filter(Boolean) - const desiredLabel = - evalType === "online" - ? "online evaluation" - : evalType === "human" - ? "human annotation" - : evalType === "custom" - ? "custom evaluation" - : "auto evaluation" - - const appsIdx = segs.findIndex((s) => s === "apps") - if (appsIdx !== -1) { - const appId = segs[appsIdx + 1] - if (!appId) return - const evaluationsHref = `/${segs.slice(0, appsIdx + 2).join("/")}/evaluations` - - const current = (rootStore.get(breadcrumbAtom) as any) || {} - const appPage = current["appPage"] as any - const needsHref = - !appPage || !appPage.href || !appPage.href.endsWith("/evaluations") - const needsLabel = !appPage || appPage.label !== desiredLabel - if (!needsHref && !needsLabel) return - - rootStore.set(appendBreadcrumbAtom, { - appPage: { - ...(appPage || {}), - label: desiredLabel, - href: evaluationsHref, - }, - }) - return - } - - const evaluationsIdx = segs.findIndex((s) => s === "evaluations") - if (evaluationsIdx === -1) return - const evaluationsHref = `/${segs.slice(0, evaluationsIdx + 1).join("/")}` - - const current = (rootStore.get(breadcrumbAtom) as any) || {} - const projectPage = current["projectPage"] as any - const needsHref = !projectPage || projectPage.href !== evaluationsHref - const needsLabel = !projectPage || projectPage.label !== desiredLabel - if (!needsHref && !needsLabel) return - - rootStore.set(appendBreadcrumbAtom, { - projectPage: { - ...(projectPage || {}), - label: desiredLabel, - href: evaluationsHref, - }, - }) - }, [rootStore, appendBreadcrumb, evalType]) - - // Clean up eval-detail crumb when leaving the page to avoid stale breadcrumbs - useEffect(() => { - return () => { - const current = (rootStore.get(breadcrumbAtom) as any) || {} - if (current["eval-detail"]) { - const {"eval-detail": _omit, ...rest} = current - rootStore.set(setBreadcrumbsAtom, rest) - } - } - }, [rootStore]) - - const hasPreviewData = Boolean(id) - - if (isPreview && !hasPreviewData) { - return ( - <ErrorState - title="Evaluation data unavailable" - subtitle="We couldn't load this evaluation run. Please try again later or relaunch the evaluation." - status="warning" - onRetry={() => router.reload()} - /> - ) - } - - return ( - <div - className={clsx([ - "evaluationContainer human-eval grow", - {"flex flex-col min-h-0": isPreview}, - ])} - > - {/** TODO: improve the component state specially AutoEvalRunDetails */} - {isPreview === undefined ? ( - <LoadingState - evalType={evalType} - name={(name as string) || ""} - description={(description as string) || ""} - id={runId} - /> - ) : isPreview && id ? ( - <> - {evalType === "online" ? ( - <OnlineUrlSync /> - ) : ( - <UrlSync evalType={evalType} /> - )} - <PreviewEvaluationPage - evalType={evalType} - name={(name as string) || ""} - description={(description as string) || ""} - id={runId} - /> - </> - ) : ( - <LegacyEvaluationPage id={id} /> - )} - </div> - ) - }, -) - -const EvalRunDetailsPage = memo( - ({evalType: propsEvalType}: {evalType: "auto" | "human" | "online" | "custom"}) => { - const router = useRouter() - const runIdParam = router.query.evaluation_id - const runId = - typeof runIdParam === "string" - ? runIdParam - : Array.isArray(runIdParam) - ? runIdParam[0] - : null - const setEvalType = useSetAtom(setEvalTypeAtom) - const evalType = useAtomValue(evalTypeAtom) - - useEffect(() => { - setEvalType(propsEvalType) - - return () => { - setEvalType(null) - } - }, [propsEvalType]) - - return ( - <RunIdProvider runId={runId}> - {evalType && runId ? ( - <> - <EvaluationPageData runId={runId} /> - <EvaluationPage evalType={evalType} runId={runId} /> - <ComparisonDataFetcher /> - </> - ) : null} - </RunIdProvider> - ) - }, -) - -export default memo(EvalRunDetailsPage) diff --git a/web/oss/src/components/EvalRunDetails/state/evalType.ts b/web/oss/src/components/EvalRunDetails/state/evalType.ts deleted file mode 100644 index 306b919b73..0000000000 --- a/web/oss/src/components/EvalRunDetails/state/evalType.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {atom} from "jotai" - -// This atom is used to store the evaluation type for the current evaluation run. -// It is used to determine which evaluation page to render. -export const evalTypeAtom = atom<"auto" | "human" | "online" | "custom" | null>(null) - -export const setEvalTypeAtom = atom( - null, - (get, set, update: "auto" | "human" | "online" | "custom" | null) => { - set(evalTypeAtom, update) - }, -) diff --git a/web/oss/src/components/EvalRunDetails/state/focusScenarioAtom.ts b/web/oss/src/components/EvalRunDetails/state/focusScenarioAtom.ts deleted file mode 100644 index 3940d1afea..0000000000 --- a/web/oss/src/components/EvalRunDetails/state/focusScenarioAtom.ts +++ /dev/null @@ -1,89 +0,0 @@ -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" - -export interface FocusTarget { - focusRunId: string | null - focusScenarioId: string | null -} - -interface FocusDrawerState extends FocusTarget { - open: boolean - isClosing: boolean -} - -export const initialFocusDrawerState: FocusDrawerState = { - open: false, - isClosing: false, - focusRunId: null, - focusScenarioId: null, -} - -export const focusDrawerAtom = atomWithImmer<FocusDrawerState>(initialFocusDrawerState) - -export const focusScenarioAtom = atom<FocusTarget | null>((get) => { - const {focusRunId, focusScenarioId} = get(focusDrawerAtom) - if (!focusScenarioId) return null - return {focusRunId, focusScenarioId} -}) - -export const isFocusDrawerOpenAtom = atom((get) => get(focusDrawerAtom).open) - -export const focusDrawerTargetAtom = atom<FocusTarget>((get) => { - const {focusRunId, focusScenarioId} = get(focusDrawerAtom) - return {focusRunId, focusScenarioId} -}) - -export const setFocusDrawerTargetAtom = atom(null, (_get, set, target: FocusTarget) => { - set(focusDrawerAtom, (draft) => { - if ( - draft.focusRunId === target.focusRunId && - draft.focusScenarioId === target.focusScenarioId - ) { - return - } - draft.focusRunId = target.focusRunId - draft.focusScenarioId = target.focusScenarioId - }) -}) - -export const openFocusDrawerAtom = atom(null, (_get, set, target: FocusTarget) => { - set(focusDrawerAtom, (draft) => { - const sameTarget = - draft.focusRunId === target.focusRunId && - draft.focusScenarioId === target.focusScenarioId && - draft.open - draft.open = true - draft.isClosing = false - if (!sameTarget) { - draft.focusRunId = target.focusRunId - draft.focusScenarioId = target.focusScenarioId - } - }) -}) - -export const closeFocusDrawerAtom = atom(null, (_get, set) => { - set(focusDrawerAtom, (draft) => { - if (!draft.open && !draft.focusScenarioId && !draft.focusRunId) { - return - } - draft.open = false - draft.isClosing = true - }) -}) - -export const resetFocusDrawerAtom = atom(null, (_get, set) => { - set(focusDrawerAtom, () => ({...initialFocusDrawerState})) -}) - -export const applyFocusDrawerStateAtom = atom( - null, - (_get, set, payload: Partial<FocusDrawerState>) => { - set(focusDrawerAtom, (draft) => { - const next = {...draft, ...payload} - draft.open = Boolean(next.open) - draft.isClosing = Boolean(next.isClosing) - draft.focusRunId = next.focusRunId ?? null - draft.focusScenarioId = next.focusScenarioId ?? null - }) - }, -) diff --git a/web/oss/src/components/EvalRunDetails/state/urlState.ts b/web/oss/src/components/EvalRunDetails/state/urlState.ts deleted file mode 100644 index aa4697994a..0000000000 --- a/web/oss/src/components/EvalRunDetails/state/urlState.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" - -import {evalTypeAtom} from "./evalType" - -export interface EvalRunUrlState { - view?: - | "list" - | "table" - | "focus" - | "results" - | "overview" - | "testcases" - | "prompt" - | "results" - | "configuration" - scenarioId?: string - compare?: string[] // Array of run IDs to compare against the base run -} - -// Holds the subset of query params we care about for EvalRunDetails page -export const urlStateAtom = atomWithImmer<EvalRunUrlState>({}) - -type HumanEvalViewTypes = "focus" | "list" | "table" | "results" -type AutoEvalViewTypes = "overview" | "testcases" | "prompt" -type OnlineEvalViewTypes = "overview" | "results" | "configuration" - -// Derived UI atom: maps the URL state and eval type to a concrete view -export const runViewTypeAtom = atom<HumanEvalViewTypes | AutoEvalViewTypes | OnlineEvalViewTypes>( - (get) => { - const evalType = get(evalTypeAtom) - const view = get(urlStateAtom).view - - const humanViews: HumanEvalViewTypes[] = ["focus", "list", "table", "results"] - // Put "testcases" first so it becomes the default for auto evaluations - const autoViews: AutoEvalViewTypes[] = ["testcases", "overview", "prompt"] - - if (evalType === "auto" || evalType === "custom") { - // default and validation for auto eval - const v = (view as AutoEvalViewTypes | undefined) ?? autoViews[0] - return autoViews.includes(v) ? v : autoViews[0] - } - - if (evalType === "online") { - const onlineViews: OnlineEvalViewTypes[] = ["results", "overview", "configuration"] - const v = (view as OnlineEvalViewTypes | undefined) ?? onlineViews[0] - return onlineViews.includes(v) ? v : onlineViews[0] - } - - // default and validation for human eval - const v = (view as HumanEvalViewTypes | undefined) ?? humanViews[0] - return humanViews.includes(v) ? v : humanViews[0] - }, -) diff --git a/web/oss/src/components/EvaluationTable/ABTestingEvaluationTable.tsx b/web/oss/src/components/EvaluationTable/ABTestingEvaluationTable.tsx index 58c05677ba..edfac3e74e 100644 --- a/web/oss/src/components/EvaluationTable/ABTestingEvaluationTable.tsx +++ b/web/oss/src/components/EvaluationTable/ABTestingEvaluationTable.tsx @@ -1,14 +1,25 @@ // @ts-nocheck -import {useState, useEffect, useCallback, useMemo, useRef} from "react" +import {useState, useEffect, useCallback, useMemo} from "react" -import SecondaryButton from "@agenta/oss/src/components/SecondaryButton/SecondaryButton" -import {Button, Card, Col, Input, Radio, Row, Space, Statistic, Table, message} from "antd" +import { + Button, + Card, + Col, + Input, + Radio, + Row, + Space, + Statistic, + Table, + Typography, + message, +} from "antd" import type {ColumnType} from "antd/es/table" -import {getDefaultStore, useAtomValue} from "jotai" import debounce from "lodash/debounce" import {useRouter} from "next/router" -import {useQueryParamState} from "@/oss/state/appState" +import {useAppsData} from "@/oss/contexts/app.context" +import {useQueryParam} from "@/oss/hooks/useQuery" import {EvaluationFlow} from "@/oss/lib/enums" import {exportABTestingEvaluationData} from "@/oss/lib/helpers/evaluate" import {isBaseResponse, isFuncResponse} from "@/oss/lib/helpers/playgroundResp" @@ -20,34 +31,25 @@ import { getStringOrJson, } from "@/oss/lib/helpers/utils" import {variantNameWithRev} from "@/oss/lib/helpers/variantHelper" -import useStatelessVariants from "@/oss/lib/hooks/useStatelessVariants" import {getAllMetadata} from "@/oss/lib/hooks/useStatelessVariants/state" -import {extractInputKeysFromSchema} from "@/oss/lib/shared/variant/inputHelpers" -import {getRequestSchema} from "@/oss/lib/shared/variant/openapiUtils" -import {derivePromptsFromSpec} from "@/oss/lib/shared/variant/transformer/transformer" +import {useVariants} from "@/oss/lib/hooks/useVariants" import {transformToRequestBody} from "@/oss/lib/shared/variant/transformer/transformToRequestBody" import type {BaseResponse, EvaluationScenario, KeyValuePair, Variant} from "@/oss/lib/Types" import {callVariant} from "@/oss/services/api" import {updateEvaluationScenario, updateEvaluation} from "@/oss/services/human-evaluations/api" import {useEvaluationResults} from "@/oss/services/human-evaluations/hooks/useEvaluationResults" -import {customPropertiesByRevisionAtomFamily} from "@/oss/state/newPlayground/core/customProperties" -import { - stablePromptVariablesAtomFamily, - transformedPromptsAtomFamily, -} from "@/oss/state/newPlayground/core/prompts" -import {variantFlagsAtomFamily} from "@/oss/state/newPlayground/core/variantFlags" -import {appUriInfoAtom, appSchemaAtom} from "@/oss/state/variant/atoms/fetcher" import EvaluationCardView from "../Evaluations/EvaluationCardView" import {VARIANT_COLORS} from "../Evaluations/EvaluationCardView/assets/styles" import EvaluationVotePanel from "../Evaluations/EvaluationCardView/EvaluationVotePanel" import VariantAlphabet from "../Evaluations/EvaluationCardView/VariantAlphabet" +import SecondaryButton from "../SecondaryButton/SecondaryButton" import {useABTestingEvaluationTableStyles} from "./assets/styles" import ParamsFormWithRun from "./components/ParamsFormWithRun" import type {ABTestingEvaluationTableProps, ABTestingEvaluationTableRow} from "./types" -// Note: Avoid Typography.Title to prevent EllipsisMeasure/ResizeObserver loops +const {Title} = Typography /** * @@ -64,60 +66,21 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ const classes = useABTestingEvaluationTableStyles() const router = useRouter() const appId = router.query.app_id as string - const uriObject = useAtomValue(appUriInfoAtom) - const store = getDefaultStore() const evalVariants = [...evaluation.variants] + const {currentApp} = useAppsData() - const {variants: data, isLoading: isVariantsLoading} = useStatelessVariants() - - // // Select the correct variant revisions for this evaluation - const variantData = useMemo(() => { - const allVariantData = data || [] - if (!allVariantData.length) return [] - - return evaluation.variants.map((evVariant, idx) => { - const revisionId = evaluation.variant_revision_ids?.[idx] - const revisionNumber = evaluation.revisions?.[idx] - - // 1. Try to find by exact revision id - let selected = allVariantData.find((v) => v.id === revisionId) - - // 2. Try by variantId & revision number - if (!selected && revisionNumber !== undefined) { - selected = allVariantData.find( - (v) => v.variantId === evVariant.variantId && v.revision === revisionNumber, - ) - } - - // 3. Fallback – latest revision for that variant - if (!selected) { - selected = allVariantData.find( - (v) => v.variantId === evVariant.variantId && v.isLatestRevision, - ) - } + const {data, isLoading: isVariantsLoading} = useVariants(currentApp)( + { + appId: appId, + }, + evalVariants, + ) - return selected || evVariant - }) - }, [data, evaluation.variants, evaluation.variant_revision_ids, evaluation.revisions]) + const variantData = data?.variants || [] const [rows, setRows] = useState<ABTestingEvaluationTableRow[]>([]) const [, setEvaluationStatus] = useState<EvaluationFlow>(evaluation.status) - const [viewModeParam, setViewModeParam] = useQueryParamState("viewMode") - const viewMode = useMemo(() => { - if (Array.isArray(viewModeParam)) { - return viewModeParam[0] ?? "card" - } - if (typeof viewModeParam === "string" && viewModeParam) { - return viewModeParam - } - return "card" - }, [viewModeParam]) - const setViewMode = useCallback( - (nextMode: string) => { - setViewModeParam(nextMode, {method: "replace", shallow: true}) - }, - [setViewModeParam], - ) + const [viewMode, setViewMode] = useQueryParam("viewMode", "card") const {data: evaluationResults, mutate} = useEvaluationResults({ evaluationId: evaluation.id, onSuccess: () => { @@ -128,101 +91,41 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ }, }) - const {numOfRows, flagVotes, positiveVotes, appVariant1Votes, appVariant2Votes} = - useMemo(() => { - const votesData = evaluationResults?.votes_data || {} - const variantsVotesData = votesData.variants_votes_data || {} - - const [variant1, variant2] = evaluation.variants || [] - - return { - numOfRows: votesData.nb_of_rows || 0, - flagVotes: votesData.flag_votes?.number_of_votes || 0, - positiveVotes: votesData.positive_votes?.number_of_votes || 0, - appVariant1Votes: variantsVotesData?.[variant1?.variantId]?.number_of_votes || 0, - appVariant2Votes: variantsVotesData?.[variant2?.variantId]?.number_of_votes || 0, - } - }, [evaluationResults, evaluation.variants]) + const num_of_rows = evaluationResults?.votes_data.nb_of_rows || 0 + const flag_votes = evaluationResults?.votes_data.flag_votes?.number_of_votes || 0 + const positive_votes = evaluationResults?.votes_data.positive_votes.number_of_votes || 0 + const appVariant1 = + evaluationResults?.votes_data?.variants_votes_data?.[evaluation.variants[0]?.variantId] + ?.number_of_votes || 0 + const appVariant2 = + evaluationResults?.votes_data?.variants_votes_data?.[evaluation.variants[1]?.variantId] + ?.number_of_votes || 0 const depouncedUpdateEvaluationScenario = useCallback( debounce((data: Partial<EvaluationScenario>, scenarioId) => { updateEvaluationScenarioData(scenarioId, data) }, 800), - [], + [evaluationScenarios], ) useEffect(() => { if (evaluationScenarios) { - setRows(() => { + setRows((prevRows) => { const obj = [...evaluationScenarios] - const spec = store.get(appSchemaAtom) as any - const routePath = uriObject?.routePath - - obj.forEach((item, rowIndex) => { - // Map outputs into row shape for table columns - item.outputs.forEach((op) => (item[op.variant_id] = op.variant_output)) - - try { - // Build a stable input name set from variants (schema for custom, stable prompts otherwise) - const names = new Set<string>() - ;(variantData || []).forEach((v: any) => { - const rid = v?.id - if (!rid) return - const flags = store.get( - variantFlagsAtomFamily({revisionId: rid}), - ) as any - if (flags?.isCustom && spec) { - extractInputKeysFromSchema(spec as any, routePath).forEach((k) => - names.add(k), - ) - } else { - const vars = store.get( - stablePromptVariablesAtomFamily(rid), - ) as string[] - ;(vars || []).forEach((k) => names.add(k)) - } - }) - - const chatCol = evaluation?.testset?.testsetChatColumn || "" - const reserved = new Set(["correct_answer", chatCol]) - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - - const existing = new Set( - (Array.isArray(item.inputs) ? item.inputs : []) - .map((ip: any) => ip?.input_name) - .filter(Boolean), - ) - - const nextInputs = Array.isArray(item.inputs) ? [...item.inputs] : [] - Array.from(names) - .filter((k) => typeof k === "string" && k && !reserved.has(k)) - .forEach((k) => { - if (!existing.has(k)) { - nextInputs.push({ - input_name: k, - input_value: (testRow as any)?.[k] ?? "", - }) - } - }) - item.inputs = nextInputs - } catch { - // best-effort prepopulation only - } - }) - + obj.forEach((item) => + item.outputs.forEach((op) => (item[op.variant_id] = op.variant_output)), + ) return obj }) } - }, [evaluationScenarios, variantData, uriObject?.routePath, evaluation?.testset?.csvdata]) + }, [evaluationScenarios]) const handleInputChange = useCallback( (e: React.ChangeEvent<HTMLTextAreaElement>, id: string, inputIndex: number) => { setRows((oldRows) => { const rowIndex = oldRows.findIndex((row) => row.id === id) - const newRows = [...oldRows] - if (newRows[rowIndex] && newRows[rowIndex].inputs?.[inputIndex]) { - newRows[rowIndex].inputs[inputIndex].input_value = e.target.value - } + const newRows = [...rows] + newRows[rowIndex].inputs[inputIndex].input_value = e.target.value return newRows }) }, @@ -240,26 +143,6 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ [], ) - // Upsert a single input value into a row by scenario id - const upsertRowInput = useCallback((rowId: string, name: string, value: any) => { - setRows((old) => { - const idx = old.findIndex((r) => r.id === rowId) - if (idx === -1) return old - const next = [...old] - const row = {...next[idx]} - const inputs = Array.isArray(row.inputs) ? [...row.inputs] : [] - const pos = inputs.findIndex((ip) => ip.input_name === name) - if (pos === -1) { - inputs.push({input_name: name, input_value: value}) - } else if (inputs[pos]?.input_value !== value) { - inputs[pos] = {...inputs[pos], input_value: value} - } - row.inputs = inputs - next[idx] = row as any - return next - }) - }, []) - const updateEvaluationScenarioData = useCallback( async (id: string, data: Partial<EvaluationScenario>, showNotification = true) => { await updateEvaluationScenario( @@ -275,26 +158,22 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ evaluation.evaluationType, ) .then(() => { - setRows((prev) => { - const next = [...prev] - const idx = next.findIndex((r) => r.id === id) - if (idx >= 0) { - Object.keys(data).forEach((key) => { - // @ts-ignore - next[idx][key] = data[key as keyof EvaluationScenario] as any - }) - } - return next + Object.keys(data).forEach((key) => { + setRowValue( + evaluationScenarios.findIndex((item) => item.id === id), + key, + data[key as keyof EvaluationScenario], + ) }) if (showNotification) message.success("Evaluation Updated!") }) .catch(console.error) }, - [evaluation.evaluationType, evaluation.id], + [evaluation.evaluationType, evaluation.id, evaluationScenarios, setRowValue], ) const handleVoteClick = useCallback( - async (id: string, vote: string) => { + (id: string, vote: string) => { const rowIndex = rows.findIndex((row) => row.id === id) const evaluation_scenario_id = rows[rowIndex]?.id @@ -308,35 +187,23 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ })), inputs: rows[rowIndex].inputs, } - await updateEvaluationScenarioData(evaluation_scenario_id, data) - await mutate() + updateEvaluationScenarioData(evaluation_scenario_id, data) } }, [rows, setRowValue, updateEvaluationScenarioData, evalVariants], ) - // Keep stable refs to callback handlers to avoid re-creating table columns - // Initialize with no-ops to avoid TDZ when functions are declared below - const runEvaluationRef = useRef< - (id: string, count?: number, showNotification?: boolean) => void - >(() => {}) - const handleInputChangeRef = useRef< - (e: React.ChangeEvent<HTMLTextAreaElement>, id: string, inputIndex: number) => void - >(() => {}) - const handleVoteClickRef = useRef<(id: string, vote: string) => void>(() => {}) - // // Note: assign .current values after handlers are defined (see below) - const runEvaluation = useCallback( async (id: string, count = 1, showNotification = true) => { - const _variantData = variantData + const _variantData = data?.variants || [] const rowIndex = rows.findIndex((row) => row.id === id) - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - - // Derive request schema once - const spec = store.get(appSchemaAtom) as any - const routePath = uriObject?.routePath - const requestSchema: any = spec ? getRequestSchema(spec as any, {routePath}) : undefined - const hasMessagesProp = Boolean(requestSchema?.properties?.messages) + const inputParamsDict = rows[rowIndex].inputs.reduce( + (acc: Record<string, any>, item) => { + acc[item.input_name] = item.input_value + return acc + }, + {}, + ) const outputs = rows[rowIndex].outputs.reduce( (acc, op) => ({...acc, [op.variant_id]: op.variant_output}), @@ -347,152 +214,29 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ evalVariants.map(async (variant: Variant, idx: number) => { setRowValue(rowIndex, variant.variantId, "loading...") - const isChatTestset = !!evaluation?.testset?.testsetChatColumn - - const rawMessages = isChatTestset - ? testsetRowToChatMessages(evaluation.testset.csvdata[rowIndex], false) - : [] - - const sanitizedMessages = rawMessages.map((msg) => { - if (!Array.isArray(msg.content)) return msg - return { - ...msg, - content: msg.content.filter((part) => { - return part.type !== "image_url" || part.image_url.url.trim() !== "" - }), - } - }) - try { - // Build stable optional parameters using atom-based prompts (stable params) - const revisionId = _variantData?.[idx]?.id as string | undefined - const flags = revisionId - ? (store.get(variantFlagsAtomFamily({revisionId})) as any) - : undefined - const isCustom = Boolean(flags?.isCustom) - // Determine effective input keys per variant - const schemaKeys = spec - ? extractInputKeysFromSchema(spec as any, routePath) - : [] - const stableFromParams: string[] = (() => { - try { - const params = (_variantData[idx] as any)?.parameters - const ag = params?.ag_config ?? params ?? {} - const s = new Set<string>() - Object.values(ag || {}).forEach((cfg: any) => { - const arr = cfg?.input_keys - if (Array.isArray(arr)) { - arr.forEach((k) => { - if (typeof k === "string" && k) s.add(k) - }) - } - }) - return Array.from(s) - } catch { - return [] - } - })() - - console.log("stableFromParams", stableFromParams) - // Also include stable variables derived from saved prompts (handles cases where input_keys are not explicitly listed) - const stableFromPrompts: string[] = revisionId - ? (store.get(stablePromptVariablesAtomFamily(revisionId)) as string[]) - : [] - const effectiveKeys = isCustom - ? schemaKeys - : Array.from( - new Set([ - ...(stableFromParams || []), - ...(stableFromPrompts || []), - ]), - ).filter((k) => typeof k === "string" && k && k !== "chat") - - // Build input params strictly from effective keys using testcase (with row overrides) - let inputParamsDict: Record<string, any> = {} - if (Array.isArray(effectiveKeys) && effectiveKeys.length > 0) { - effectiveKeys.forEach((key) => { - const fromRowInput = rows[rowIndex]?.inputs?.find( - (ip) => ip.input_name === key, - )?.input_value - const fromTestcase = (testRow as any)?.[key] - if (fromRowInput !== undefined) inputParamsDict[key] = fromRowInput - else if (fromTestcase !== undefined) - inputParamsDict[key] = fromTestcase - }) - } else { - // Fallback: preserve previous behavior if keys unavailable - inputParamsDict = rows[rowIndex].inputs.reduce( - (acc: Record<string, any>, item) => { - acc[item.input_name] = item.input_value - return acc - }, - {}, - ) - } - // Fallback: if chat testset, hydrate from test row keys as needed - if (isChatTestset) { - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - const reserved = new Set([ - "correct_answer", - evaluation?.testset?.testsetChatColumn || "", - ]) - Object.keys(testRow) - .filter((k) => !reserved.has(k)) - .forEach((k) => { - if (!(k in inputParamsDict)) - inputParamsDict[k] = (testRow as any)[k] - }) - } - - const stableOptional = revisionId - ? store.get( - transformedPromptsAtomFamily({ - revisionId, - useStableParams: true, - }), - ) - : undefined - - const optionalParameters = - stableOptional || - (_variantData[idx]?.parameters + const result = await callVariant( + inputParamsDict, + (data?.variants || [])[idx].inputParams!, + (data?.variants || [])[idx].parameters ? transformToRequestBody({ - variant: _variantData[idx], + variant: (data?.variants || [])[idx], allMetadata: getAllMetadata(), - prompts: - spec && _variantData[idx] - ? derivePromptsFromSpec( - _variantData[idx] as any, - spec as any, - uriObject?.routePath, - ) || [] - : [], - // Keep request shape aligned with OpenAPI schema - isChat: hasMessagesProp, - isCustom, - customProperties: undefined, }) - : (_variantData[idx]?.promptOptParams as any)) - // For new arch, variable inputs must live under requestBody.inputs - // Mark them as non-"input" so callVariant places them under "inputs" - const synthesizedParamDef = Object.keys(inputParamsDict).map((name) => ({ - name, - input: false, - })) as any - - const result = await callVariant( - inputParamsDict, - synthesizedParamDef, - optionalParameters, + : (data?.variants || [])[idx].promptOptParams!, appId || "", - _variantData[idx].baseId || "", - sanitizedMessages, + variant.baseId || "", + (data?.variants || [])[idx].isChatVariant + ? testsetRowToChatMessages( + evaluation.testset.csvdata[rowIndex], + false, + ) + : [], undefined, true, - !!_variantData[idx]._parentVariant, // isNewVariant (new arch if parent exists) - isCustom, - uriObject, - _variantData[idx].variantId, + !!(data?.variants || [])[idx].parameters, // isNewVariant + (data?.variants || [])[idx].isCustom, + (data?.variants || [])[idx].uriObject, ) let res: BaseResponse | undefined @@ -548,7 +292,7 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ ) }, [ - variantData, + data?.variants, rows, evalVariants, updateEvaluationScenarioData, @@ -558,13 +302,6 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ ], ) - // Now that handlers are declared, update stable refs - useEffect(() => { - runEvaluationRef.current = runEvaluation - handleInputChangeRef.current = handleInputChange - handleVoteClickRef.current = handleVoteClick - }, [runEvaluation, handleInputChange, handleVoteClick]) - const runAllEvaluations = useCallback(async () => { setEvaluationStatus(EvaluationFlow.EVALUATION_STARTED) batchExecute(rows.map((row) => () => runEvaluation(row.id!, rows.length - 1, false))) @@ -602,22 +339,19 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ dataIndex: columnKey, key: columnKey, width: "20%", - render: (text: any, record: ABTestingEvaluationTableRow) => { - const value = - text || - record?.[columnKey] || - record.outputs?.find((o: any) => o.variant_id === columnKey) - ?.variant_output || - "" - return ( - <div className="max-w-[350px] max-h-[350px] overflow-y-auto"> - {value} - </div> - ) + render: (text: any, record: ABTestingEvaluationTableRow, rowIndex: number) => { + if (text) return text + if (record.outputs && record.outputs.length > 0) { + const outputValue = record.outputs.find( + (output: any) => output.variant_id === columnKey, + )?.variant_output + return <div>{outputValue}</div> + } + return "" }, } }), - [evalVariants, evaluation.revisions], + [evalVariants], ) const columns = useMemo(() => { @@ -627,7 +361,7 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ title: ( <div className={classes.inputTestContainer}> <div> - <span> Inputs (Testset: </span> + <span> Inputs (Test set: </span> <span className={classes.inputTest}>{evaluation.testset.name}</span> <span> )</span> </div> @@ -641,8 +375,14 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ evaluation={evaluation} record={record} rowIndex={rowIndex} - onRun={() => runEvaluationRef.current(record.id!)} - onParamChange={(name, value) => upsertRowInput(record.id!, name, value)} + onRun={() => runEvaluation(record.id!)} + onParamChange={(name, value) => + handleInputChange( + {target: {value}} as any, + record.id, + record?.inputs.findIndex((ip) => ip.input_name === name), + ) + } variantData={variantData} isLoading={isVariantsLoading} /> @@ -690,7 +430,7 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ type="comparison" value={record.vote || ""} variants={evalVariants} - onChange={(vote) => handleVoteClickRef.current(record.id, vote)} + onChange={(vote) => handleVoteClick(record.id, vote)} loading={record.vote === "loading"} vertical key={record.id} @@ -724,23 +464,21 @@ const ABTestingEvaluationTable: React.FC<ABTestingEvaluationTableProps> = ({ }, }, ] - }, [ - isVariantsLoading, - evaluation.testset.name, - classes.inputTestContainer, - classes.inputTest, - dynamicColumns, - evalVariants, - ]) + }, [runEvaluation, isVariantsLoading, rows]) return ( <div> - <h2 style={{fontSize: 24, margin: 0}}>{EvaluationTypeLabels.human_a_b_testing}</h2> + <Title level={2}>{EvaluationTypeLabels.human_a_b_testing}
- = ({ - + @@ -775,21 +513,21 @@ const ABTestingEvaluationTable: React.FC = ({ title={`${ evaluation.variants[1]?.variantName || "" } is better:`} - value={`${appVariant2Votes} out of ${numOfRows}`} + value={`${appVariant2} out of ${num_of_rows}`} className={classes.stat} /> diff --git a/web/oss/src/components/EvaluationTable/SingleModelEvaluationTable.tsx b/web/oss/src/components/EvaluationTable/SingleModelEvaluationTable.tsx index 2bac4883a9..aefab92c05 100644 --- a/web/oss/src/components/EvaluationTable/SingleModelEvaluationTable.tsx +++ b/web/oss/src/components/EvaluationTable/SingleModelEvaluationTable.tsx @@ -1,5 +1,5 @@ // @ts-nocheck -import {useCallback, useEffect, useState, useMemo} from "react" +import {useCallback, useEffect, useState} from "react" import { Button, @@ -15,12 +15,11 @@ import { message, } from "antd" import type {ColumnType} from "antd/es/table" -import {getDefaultStore, useAtomValue} from "jotai" import debounce from "lodash/debounce" import {useRouter} from "next/router" -import SaveTestsetModal from "@/oss/components/SaveTestsetModal/SaveTestsetModal" -import SecondaryButton from "@/oss/components/SecondaryButton/SecondaryButton" +import {useAppsData} from "@/oss/contexts/app.context" +import {useQueryParam} from "@/oss/hooks/useQuery" import {EvaluationFlow} from "@/oss/lib/enums" import {exportSingleModelEvaluationData} from "@/oss/lib/helpers/evaluate" import {isBaseResponse, isFuncResponse} from "@/oss/lib/helpers/playgroundResp" @@ -32,26 +31,17 @@ import { getStringOrJson, } from "@/oss/lib/helpers/utils" import {variantNameWithRev} from "@/oss/lib/helpers/variantHelper" -import useStatelessVariants from "@/oss/lib/hooks/useStatelessVariants" import {getAllMetadata} from "@/oss/lib/hooks/useStatelessVariants/state" -import {extractInputKeysFromSchema} from "@/oss/lib/shared/variant/inputHelpers" -import {getRequestSchema} from "@/oss/lib/shared/variant/openapiUtils" -import {derivePromptsFromSpec} from "@/oss/lib/shared/variant/transformer/transformer" +import {useVariants} from "@/oss/lib/hooks/useVariants" import {transformToRequestBody} from "@/oss/lib/shared/variant/transformer/transformToRequestBody" import type {BaseResponse, EvaluationScenario, KeyValuePair, Variant} from "@/oss/lib/Types" import {callVariant} from "@/oss/services/api" import {updateEvaluation, updateEvaluationScenario} from "@/oss/services/human-evaluations/api" -import {useQueryParamState} from "@/oss/state/appState" -import {customPropertiesByRevisionAtomFamily} from "@/oss/state/newPlayground/core/customProperties" -import { - stablePromptVariablesAtomFamily, - transformedPromptsAtomFamily, -} from "@/oss/state/newPlayground/core/prompts" -import {variantFlagsAtomFamily} from "@/oss/state/newPlayground/core/variantFlags" -import {appUriInfoAtom, appSchemaAtom} from "@/oss/state/variant/atoms/fetcher" import EvaluationCardView from "../Evaluations/EvaluationCardView" import EvaluationVotePanel from "../Evaluations/EvaluationCardView/EvaluationVotePanel" +import SaveTestsetModal from "../SaveTestsetModal/SaveTestsetModal" +import SecondaryButton from "../SecondaryButton/SecondaryButton" import {useSingleModelEvaluationTableStyles} from "./assets/styles" import ParamsFormWithRun from "./components/ParamsFormWithRun" @@ -74,60 +64,21 @@ const SingleModelEvaluationTable: React.FC = ({ const classes = useSingleModelEvaluationTableStyles() const router = useRouter() const appId = router.query.app_id as string - const uriObject = useAtomValue(appUriInfoAtom) - const store = getDefaultStore() const variants = evaluation.variants + const {currentApp} = useAppsData() - const {variants: data, isLoading: isVariantsLoading} = useStatelessVariants() - - // Select the correct variant revisions for this evaluation - const variantData = useMemo(() => { - const allVariantData = data || [] - if (!allVariantData.length) return [] - - return evaluation.variants.map((evVariant, idx) => { - const revisionId = evaluation.variant_revision_ids?.[idx] - const revisionNumber = evaluation.revisions?.[idx] - - // 1. Try to find by exact revision id - let selected = allVariantData.find((v) => v.id === revisionId) - - // 2. Try by variantId & revision number - if (!selected && revisionNumber !== undefined) { - selected = allVariantData.find( - (v) => v.variantId === evVariant.variantId && v.revision === revisionNumber, - ) - } - - // 3. Fallback – latest revision for that variant - if (!selected) { - selected = allVariantData.find( - (v) => v.variantId === evVariant.variantId && v.isLatestRevision, - ) - } + const {data, isLoading: isVariantsLoading} = useVariants(currentApp)( + { + appId: appId, + }, + variants, + ) - return selected || evVariant - }) - }, [data, evaluation.variants, evaluation.variant_revision_ids, evaluation.revisions]) + const variantData = data?.variants || [] const [rows, setRows] = useState([]) const [evaluationStatus, setEvaluationStatus] = useState(evaluation.status) - const [viewModeParam, setViewModeParam] = useQueryParamState("viewMode") - const viewMode = useMemo(() => { - if (Array.isArray(viewModeParam)) { - return viewModeParam[0] ?? "card" - } - if (typeof viewModeParam === "string" && viewModeParam) { - return viewModeParam - } - return "card" - }, [viewModeParam]) - const setViewMode = useCallback( - (nextMode: string) => { - setViewModeParam(nextMode, {method: "replace", shallow: true}) - }, - [setViewModeParam], - ) + const [viewMode, setViewMode] = useQueryParam("viewMode", "card") const [accuracy, setAccuracy] = useState(0) const [isTestsetModalOpen, setIsTestsetModalOpen] = useState(false) @@ -141,59 +92,12 @@ const SingleModelEvaluationTable: React.FC = ({ useEffect(() => { if (evaluationScenarios) { const obj = [...evaluationScenarios] - const spec = store.get(appSchemaAtom) as any - const routePath = uriObject?.routePath - - obj.forEach((item, rowIndex) => { - // Map outputs into row shape for table columns - item.outputs.forEach((op) => (item[op.variant_id] = op.variant_output)) - - try { - const names = new Set() - ;(variantData || []).forEach((v: any) => { - const rid = v?.id - if (!rid) return - const flags = store.get(variantFlagsAtomFamily({revisionId: rid})) as any - if (flags?.isCustom && spec) { - extractInputKeysFromSchema(spec as any, routePath).forEach((k) => - names.add(k), - ) - } else { - const vars = store.get(stablePromptVariablesAtomFamily(rid)) as string[] - ;(vars || []).forEach((k) => names.add(k)) - } - }) - - const chatCol = evaluation?.testset?.testsetChatColumn || "" - const reserved = new Set(["correct_answer", chatCol]) - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - - const existing = new Set( - (Array.isArray(item.inputs) ? item.inputs : []) - .map((ip: any) => ip?.input_name) - .filter(Boolean), - ) - - const nextInputs = Array.isArray(item.inputs) ? [...item.inputs] : [] - Array.from(names) - .filter((k) => typeof k === "string" && k && !reserved.has(k)) - .forEach((k) => { - if (!existing.has(k)) { - nextInputs.push({ - input_name: k, - input_value: (testRow as any)?.[k] ?? "", - }) - } - }) - item.inputs = nextInputs - } catch { - // best-effort only - } - }) - + obj.forEach((item) => + item.outputs.forEach((op) => (item[op.variant_id] = op.variant_output)), + ) setRows(obj) } - }, [evaluationScenarios, variantData]) + }, [evaluationScenarios]) useEffect(() => { const filtered = rows.filter((row) => typeof row.score === "number" && !isNaN(row.score)) @@ -293,63 +197,10 @@ const SingleModelEvaluationTable: React.FC = ({ const runEvaluation = async (id: string, count = 1, showNotification = true) => { const rowIndex = rows.findIndex((row) => row.id === id) - // Build input params from stable effective keys: schema keys for custom; stable prompt variables/parameters for non-custom - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - const spec = store.get(appSchemaAtom) as any - const routePath = uriObject?.routePath - const requestSchema: any = spec ? getRequestSchema(spec as any, {routePath}) : undefined - const hasMessagesProp = Boolean(requestSchema?.properties?.messages) - - const effectiveKeysForVariant = (idx: number): string[] => { - const v = variantData?.[idx] as any - const rid = v?.id - const flags = rid ? (store.get(variantFlagsAtomFamily({revisionId: rid})) as any) : null - const isCustom = Boolean(flags?.isCustom) - if (isCustom) { - return spec ? extractInputKeysFromSchema(spec as any, routePath) : [] - } - // Union of saved parameters input_keys and stable prompt variables - const fromParams: string[] = (() => { - try { - const params = v?.parameters - const ag = params?.ag_config ?? params ?? {} - const s = new Set() - Object.values(ag || {}).forEach((cfg: any) => { - const arr = cfg?.input_keys - if (Array.isArray(arr)) - arr.forEach((k) => typeof k === "string" && s.add(k)) - }) - return Array.from(s) - } catch { - return [] - } - })() - const fromPrompts: string[] = rid - ? (store.get(stablePromptVariablesAtomFamily(rid)) as string[]) || [] - : [] - return Array.from(new Set([...(fromParams || []), ...(fromPrompts || [])])).filter( - (k) => k && k !== (evaluation?.testset?.testsetChatColumn || ""), - ) - } - - let inputParamsDict: Record = {} - const keys = effectiveKeysForVariant(0) // single model uses one variant for inputs shape - if (Array.isArray(keys) && keys.length > 0) { - keys.forEach((key) => { - const fromScenario = rows[rowIndex]?.inputs?.find( - (ip) => ip.input_name === key, - )?.input_value - const fromTestcase = (testRow as any)?.[key] - if (fromScenario !== undefined) inputParamsDict[key] = fromScenario - else if (fromTestcase !== undefined) inputParamsDict[key] = fromTestcase - }) - } else { - // Fallback to backend-provided inputs - inputParamsDict = rows[rowIndex].inputs.reduce((acc: Record, item) => { - acc[item.input_name] = item.input_value - return acc - }, {}) - } + const inputParamsDict = rows[rowIndex].inputs.reduce((acc: Record, item) => { + acc[item.input_name] = item.input_value + return acc + }, {}) const outputs = rows[rowIndex].outputs.reduce( (acc, op) => ({...acc, [op.variant_id]: op.variant_output}), @@ -358,103 +209,26 @@ const SingleModelEvaluationTable: React.FC = ({ await Promise.all( variants.map(async (variant: Variant, idx: number) => { setRowValue(rowIndex, variant.variantId, "loading...") - - const isChatTestset = !!evaluation?.testset?.testsetChatColumn - const rawMessages = isChatTestset - ? testsetRowToChatMessages(evaluation.testset.csvdata[rowIndex], false) - : [] - - const sanitizedMessages = rawMessages.map((msg) => { - if (!Array.isArray(msg.content)) return msg - return { - ...msg, - content: msg.content.filter((part) => { - return part.type !== "image_url" || part.image_url.url.trim() !== "" - }), - } - }) - try { - const revisionId = variantData?.[idx]?.id as string | undefined - const flags = revisionId - ? (store.get(variantFlagsAtomFamily({revisionId})) as any) - : undefined - const isCustom = Boolean(flags?.isCustom) - // Recompute effective keys for this variant index - const vKeys = effectiveKeysForVariant(idx) - if (Array.isArray(vKeys) && vKeys.length > 0) { - vKeys.forEach((key) => { - if (!(key in inputParamsDict)) { - const v = (testRow as any)?.[key] - if (v !== undefined) inputParamsDict[key] = v - } - }) - } - if (isChatTestset) { - const testRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - const reserved = new Set([ - "correct_answer", - evaluation?.testset?.testsetChatColumn || "", - ]) - Object.keys(testRow) - .filter((k) => !reserved.has(k)) - .forEach((k) => { - if (!(k in inputParamsDict)) - inputParamsDict[k] = (testRow as any)[k] - }) - } - - // Prefer stable transformed parameters (saved revision + schema) - const stableOptional = revisionId - ? store.get( - transformedPromptsAtomFamily({ - revisionId, - useStableParams: true, - }), - ) - : undefined - const optionalParameters = - stableOptional || - (variantData[idx]?.parameters + const result = await callVariant( + inputParamsDict, + variantData[idx].inputParams!, + variantData[idx].parameters ? transformToRequestBody({ variant: variantData[idx], allMetadata: getAllMetadata(), - prompts: - spec && variantData[idx] - ? derivePromptsFromSpec( - variantData[idx] as any, - spec as any, - uriObject?.routePath, - ) || [] - : [], - // Keep request shape aligned with OpenAPI schema - isChat: hasMessagesProp, - isCustom, - // stableOptional already includes custom props; fallback path keeps schema-aligned custom props - customProperties: undefined, }) - : (variantData[idx]?.promptOptParams as any)) - - // For new arch, variable inputs must live under requestBody.inputs - // Mark them as non-"input" so callVariant places them under "inputs" - const synthesizedParamDef = Object.keys(inputParamsDict).map((name) => ({ - name, - input: false, - })) as any - - const result = await callVariant( - inputParamsDict, - synthesizedParamDef, - optionalParameters, + : variantData[idx].promptOptParams!, appId || "", - variantData[idx].baseId || "", - sanitizedMessages, + variants[idx].baseId || "", + variantData[idx].isChatVariant + ? testsetRowToChatMessages(evaluation.testset.csvdata[rowIndex], false) + : [], undefined, true, !!variantData[idx]._parentVariant, // isNewVariant - isCustom, - uriObject, - variantData[idx].variantId, + variantData[idx].isCustom, + variantData[idx].uriObject, ) let res: BaseResponse | undefined @@ -539,17 +313,14 @@ const SingleModelEvaluationTable: React.FC = ({ key: columnKey, width: "25%", render: (text: any, record: SingleModelEvaluationRow, rowIndex: number) => { - let outputValue = text - if (!outputValue && record.outputs && record.outputs.length > 0) { - outputValue = record.outputs.find( + if (text) return text + if (record.outputs && record.outputs.length > 0) { + const outputValue = record.outputs.find( (output: any) => output.variant_id === columnKey, )?.variant_output + return
{outputValue}
} - return ( -
- {outputValue} -
- ) + return "" }, } }, @@ -561,7 +332,7 @@ const SingleModelEvaluationTable: React.FC = ({ title: (
- Inputs (Testset: + Inputs (Test set: {evaluation.testset.name} )
@@ -676,7 +447,12 @@ const SingleModelEvaluationTable: React.FC = ({ - = ({ size="large" onClick={() => setIsTestsetModalOpen(true)} disabled={false} + data-cy="single-model-save-testset-button" > Save Testset @@ -733,7 +510,7 @@ const SingleModelEvaluationTable: React.FC = ({ open={isTestsetModalOpen} onCancel={() => setIsTestsetModalOpen(false)} onSuccess={(testsetName: string) => { - message.success(`Row added to the "${testsetName}" testset!`) + message.success(`Row added to the "${testsetName}" test set!`) setIsTestsetModalOpen(false) }} rows={rows} diff --git a/web/oss/src/components/EvaluationTable/components/ParamsFormWithRun.tsx b/web/oss/src/components/EvaluationTable/components/ParamsFormWithRun.tsx index 9857286493..624e0a4ccf 100644 --- a/web/oss/src/components/EvaluationTable/components/ParamsFormWithRun.tsx +++ b/web/oss/src/components/EvaluationTable/components/ParamsFormWithRun.tsx @@ -1,17 +1,10 @@ // @ts-nocheck -import {useMemo} from "react" - import {CaretRightOutlined} from "@ant-design/icons" import {Button, Form} from "antd" -import {atom, useAtomValue} from "jotai" import ParamsForm from "@/oss/components/ParamsForm" import {useLegacyVariants} from "@/oss/lib/hooks/useLegacyVariant" import type {Evaluation} from "@/oss/lib/Types" -import {inputParamsAtomFamily} from "@/oss/state/newPlayground/core/inputParams" -import {stablePromptVariablesAtomFamily} from "@/oss/state/newPlayground/core/prompts" -import {variantFlagsAtomFamily} from "@/oss/state/newPlayground/core/variantFlags" -import {appUriInfoAtom} from "@/oss/state/variant/atoms/fetcher" import {useSingleModelEvaluationTableStyles} from "../assets/styles" import type {SingleModelEvaluationRow} from "../types" @@ -42,97 +35,28 @@ const ParamsFormWithRun = ({ }) => { const classes = useSingleModelEvaluationTableStyles() const [form] = Form.useForm() - const selectedVariant = variantData?.[0] - const routePath = useAtomValue(appUriInfoAtom)?.routePath - const hasRevision = Boolean(selectedVariant && (selectedVariant as any).id) - // Memoize the atom-family selector only when we have a proper revision and route - const inputParamsSelector = useMemo( - () => - (hasRevision && routePath - ? inputParamsAtomFamily({variant: selectedVariant as any, routePath}) - : atom([])) as any, - [hasRevision ? (selectedVariant as any).id : undefined, routePath], - ) - const baseInputParams = useAtomValue(inputParamsSelector) as any[] - // Stable variables derived from saved prompts (spec + saved parameters; no live mutations) - const stableVariableNames = useAtomValue( - selectedVariant?.id - ? (stablePromptVariablesAtomFamily((selectedVariant as any).id) as any) - : atom([]), - ) as string[] - const flags = useAtomValue( - selectedVariant?.id - ? (variantFlagsAtomFamily({revisionId: (selectedVariant as any).id}) as any) - : atom({}), - ) as any - - // Build input params similar to EvaluationCardView with robust fallbacks - const testsetRow = evaluation?.testset?.csvdata?.[rowIndex] || {} - const chatCol = evaluation?.testset?.testsetChatColumn - const reservedKeys = new Set(["correct_answer", chatCol || ""]) as Set - - const derivedInputParams = useMemo((): any[] => { - const haveSchema = Array.isArray(baseInputParams) && baseInputParams.length > 0 - let source: any[] - if (haveSchema) { - source = baseInputParams - } else if (Array.isArray(record?.inputs) && record.inputs.length > 0) { - source = record.inputs - .filter((ip: any) => (chatCol ? ip.input_name !== chatCol : true)) - .map((ip: any) => ({name: ip.input_name, type: "string"})) - } else { - source = Object.keys(testsetRow) - .filter((k) => !reservedKeys.has(k)) - .map((k) => ({name: k, type: "string"})) - } - // Filter to stable variables only for non-custom apps - if ( - !flags?.isCustom && - Array.isArray(stableVariableNames) && - stableVariableNames.length > 0 - ) { - const allow = new Set( - stableVariableNames.filter((name) => (chatCol ? name !== chatCol : true)), - ) - source = (source || []).filter((p: any) => allow.has(p?.name)) - } - - return (source || []).map((item: any) => ({ - ...item, - value: - record?.inputs?.find((ip: any) => ip.input_name === item.name)?.input_value ?? - (testsetRow as any)?.[item.name] ?? - "", - })) - }, [baseInputParams, record?.inputs, testsetRow, chatCol, stableVariableNames, flags?.isCustom]) + const inputParams = variantData[0]?.inputParams return isLoading ? null : (
-
- {evaluation.testset.testsetChatColumn && ( -
- {evaluation.testset.csvdata[rowIndex][ - evaluation.testset.testsetChatColumn - ] || " - "} -
- )} - {derivedInputParams && derivedInputParams.length > 0 ? ( - { - // Ensure local row inputs are updated before invoking run - Object.entries(values || {}).forEach(([k, v]) => - onParamChange(k as string, v), - ) - onRun() - }} - key={`${record.id}-${rowIndex}`} - form={form} - /> - ) : null} -
+ {evaluation.testset.testsetChatColumn ? ( + evaluation.testset.csvdata[rowIndex][evaluation.testset.testsetChatColumn] || " - " + ) : inputParams ? ( + ({ + ...item, + value: record.inputs.find((ip) => ip.input_name === item.name) + ?.input_value, + })) || [] + } + onFinish={onRun} + form={form} + /> + ) : null} +
-

+ Evaluation: {scenarioIndex + 1}/{evaluationScenarios.length} -

+ - +
diff --git a/web/oss/src/components/Evaluators/assets/cells/EvaluatorTagsCell.tsx b/web/oss/src/components/Evaluators/assets/cells/EvaluatorTagsCell.tsx deleted file mode 100644 index b2f0dddcae..0000000000 --- a/web/oss/src/components/Evaluators/assets/cells/EvaluatorTagsCell.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import {memo} from "react" - -import {Tag} from "antd" - -const EvaluatorTagsCell = memo(({tags}: {tags: string[]}) => { - if (!tags?.length) return null - - return ( -
- {tags.map((tag) => ( - - {tag} - - ))} -
- ) -}) - -export default EvaluatorTagsCell diff --git a/web/oss/src/components/Evaluators/assets/cells/EvaluatorTypePill.tsx b/web/oss/src/components/Evaluators/assets/cells/EvaluatorTypePill.tsx deleted file mode 100644 index 727ca05926..0000000000 --- a/web/oss/src/components/Evaluators/assets/cells/EvaluatorTypePill.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import {memo, useMemo, type CSSProperties} from "react" - -import {Tag} from "antd" - -import {EvaluatorTypeBadge} from "../types" - -const hexToRgb = (hex?: string) => { - if (!hex) return null - let sanitized = hex.replace("#", "") - if (sanitized.length === 3) { - sanitized = sanitized - .split("") - .map((char) => char + char) - .join("") - } - if (sanitized.length !== 6) return null - - const intVal = Number.parseInt(sanitized, 16) - if (Number.isNaN(intVal)) return null - - return { - r: (intVal >> 16) & 255, - g: (intVal >> 8) & 255, - b: intVal & 255, - } -} - -const EvaluatorTypePill = memo(({badge}: {badge: EvaluatorTypeBadge}) => { - const baseHex = badge.colorHex - const computedStyle = useMemo(() => { - const rgb = hexToRgb(baseHex) - if (!rgb) return undefined - - return { - backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.12)`, - borderColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.32)`, - color: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.88)`, - } satisfies CSSProperties - }, [baseHex]) - - return ( - - {badge.label} - - ) -}) - -export default EvaluatorTypePill diff --git a/web/oss/src/components/Evaluators/assets/cells/TableDropdownMenu/index.tsx b/web/oss/src/components/Evaluators/assets/cells/TableDropdownMenu/index.tsx deleted file mode 100644 index 767e44bd5e..0000000000 --- a/web/oss/src/components/Evaluators/assets/cells/TableDropdownMenu/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import {memo, useMemo} from "react" - -import {MoreOutlined} from "@ant-design/icons" -import {GearSix, PencilSimpleLine, Trash} from "@phosphor-icons/react" -import {Button, Dropdown, MenuProps} from "antd" - -import {TableDropdownMenuProps} from "./types" - -const TableDropdownMenu = ({ - record, - category, - onEdit, - onConfigure, - onDelete, -}: TableDropdownMenuProps) => { - const items = useMemo(() => { - const menuItems: MenuProps["items"] = [] - - menuItems.push({ - key: "edit", - label: "Edit evaluator", - icon: , - onClick: (event) => { - event.domEvent.stopPropagation() - category === "human" ? onEdit?.(record) : onConfigure?.(record) - }, - }) - - if (menuItems.length) { - menuItems.push({type: "divider"}) - } - - menuItems.push({ - key: "delete", - label: "Delete", - icon: , - danger: true, - onClick: (event) => { - event.domEvent.stopPropagation() - onDelete(record) - }, - }) - - return menuItems - }, [category, record]) - - return ( - - - } - /> - ) - } - - if (existingConfig && (!editEvalEditValues || !editMode)) { - return - } - - const setCurrent: React.Dispatch> = () => { - navigateBack() - } - - const handleOnCancel = () => { - navigateBack() - } - - return ( - - ) -} - -export default ConfigureEvaluatorPage diff --git a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/assets/DeleteEvaluatorsModalContent/index.tsx b/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/assets/DeleteEvaluatorsModalContent/index.tsx deleted file mode 100644 index 7243d815d8..0000000000 --- a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/assets/DeleteEvaluatorsModalContent/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import {memo, useMemo} from "react" - -import {Typography} from "antd" - -interface DeleteEvaluatorsModalContentProps { - selectedCount: number - selectedNames: string[] -} - -const DeleteEvaluatorsModalContent = ({ - selectedCount, - selectedNames, -}: DeleteEvaluatorsModalContentProps) => { - const previewNames = useMemo(() => selectedNames.slice(0, 3), [selectedNames]) - const remaining = Math.max(selectedCount - previewNames.length, 0) - - return ( -
- - {selectedCount === 1 - ? "Are you sure you want to delete this evaluator?" - : "Are you sure you want to delete the selected evaluators?"} - - - {previewNames.length > 0 && ( -
    - {previewNames.map((name) => ( -
  • {name}
  • - ))} - {remaining > 0 &&
  • and {remaining} more…
  • } -
- )} -
- ) -} - -export default memo(DeleteEvaluatorsModalContent) diff --git a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/index.tsx b/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/index.tsx deleted file mode 100644 index 97c33bf066..0000000000 --- a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/index.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import {memo} from "react" - -import dynamic from "next/dynamic" - -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" - -import {DeleteEvaluatorsModalProps} from "./types" - -const DeleteEvaluatorsModalContent = dynamic( - () => import("./assets/DeleteEvaluatorsModalContent"), - {ssr: false}, -) - -const DeleteEvaluatorsModal = ({ - selectedCount, - selectedNames, - confirmLoading = false, - onConfirm, - open, - onCancel, - okButtonProps, - ...modalProps -}: DeleteEvaluatorsModalProps) => { - return ( - - - - ) -} - -export default memo(DeleteEvaluatorsModal) diff --git a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/types.ts b/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/types.ts deleted file mode 100644 index 3a2c1205f3..0000000000 --- a/web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {EnhancedModalProps} from "@/oss/components/EnhancedUIs/Modal/types" - -export interface DeleteEvaluatorsModalProps extends Omit { - selectedCount: number - selectedNames: string[] - confirmLoading?: boolean - onConfirm: () => void -} diff --git a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/assets/SelectEvaluatorModalContent/index.tsx b/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/assets/SelectEvaluatorModalContent/index.tsx deleted file mode 100644 index a6085b8529..0000000000 --- a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/assets/SelectEvaluatorModalContent/index.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import {memo, useCallback, useMemo, useState} from "react" - -import {ArrowRight} from "@phosphor-icons/react" -import type {TabsProps} from "antd" -import {Empty, Skeleton, Tabs, Tag, Typography, message} from "antd" -import clsx from "clsx" -import {useRouter} from "next/router" - -import type {EvaluatorPreview} from "@/oss/components/Evaluators/assets/types" -import useURL from "@/oss/hooks/useURL" -import {getEvaluatorTags} from "@/oss/lib/helpers/evaluate" -import {capitalize} from "@/oss/lib/helpers/utils" -import useFetchEvaluatorsData from "@/oss/lib/hooks/useFetchEvaluatorsData" -import type {Evaluator} from "@/oss/lib/Types" - -const DEFAULT_TAB_KEY = "all" - -const TAG_CLASSNAME_MAP: Record = { - rag: "bg-sky-100 text-sky-700", - classifiers: "bg-orange-100 text-orange-700", - similarity: "bg-blue-100 text-blue-700", - ai_llm: "bg-violet-100 text-violet-700", - functional: "bg-amber-100 text-amber-700", -} - -const ENABLED_EVALUATORS = [ - "auto_exact_match", - "auto_contains_json", - "auto_similarity_match", - "auto_semantic_similarity", - "auto_regex_test", - "field_match_test", - "auto_json_diff", - "auto_ai_critique", - "auto_custom_code_run", - "auto_webhook_test", - "auto_starts_with", - "auto_ends_with", - "auto_contains", - "auto_contains_any", - "auto_contains_all", - "auto_levenshtein_distance", - "rag_faithfulness", - "rag_context_relevancy", -] - -const getEvaluatorTagValues = (item: EvaluatorPreview | Evaluator) => { - const registry = new Set() - // Prefer explicit evaluator tags when available and fall back to metadata tags - const primaryTags = Array.isArray((item as Evaluator).tags) ? (item as Evaluator).tags : [] - - primaryTags.filter(Boolean).forEach((tag) => { - registry.add(String(tag).toLowerCase()) - }) - - const rawTags = [ - ...(Array.isArray((item.flags as any)?.tags) ? (item.flags as any).tags : []), - ...(Array.isArray((item.meta as any)?.tags) ? (item.meta as any).tags : []), - ].filter(Boolean) - - rawTags.forEach((tag) => registry.add(String(tag).toLowerCase())) - - return Array.from(registry) -} - -const SelectEvaluatorModalContent = () => { - const {projectURL} = useURL() - const router = useRouter() - const {evaluatorsSwr, isLoadingEvaluators} = useFetchEvaluatorsData() - const [activeTab, setActiveTab] = useState(DEFAULT_TAB_KEY) - const evaluators = evaluatorsSwr.data || [] - const baseTags = useMemo(() => getEvaluatorTags(), []) - - const availableTags = useMemo(() => { - const normalized = new Map() - baseTags.forEach((tag) => { - normalized.set(tag.value, tag.label) - }) - - evaluators.forEach((item) => { - getEvaluatorTagValues(item).forEach((tag) => { - if (!normalized.has(tag)) { - normalized.set(tag, capitalize(tag.replace(/[_-]+/g, " "))) - } - }) - }) - - return normalized - }, [baseTags, evaluators]) - - const tabItems = useMemo(() => { - const items: TabsProps["items"] = [{key: DEFAULT_TAB_KEY, label: "All templates"}] - - availableTags.forEach((label, value) => { - items!.push({key: value, label}) - }) - - return items - }, [availableTags]) - - const filteredEvaluators = useMemo(() => { - const enabled_evaluators = evaluators.filter((item) => { - return ENABLED_EVALUATORS.includes(item.key) - }) - - if (activeTab === DEFAULT_TAB_KEY) { - return enabled_evaluators - } - - return enabled_evaluators.filter((item) => { - const tags = getEvaluatorTagValues(item) - return tags.includes(activeTab) - }) - }, [activeTab, evaluators]) - - const handleTabChange = useCallback((key: string) => { - setActiveTab(key) - }, []) - - const handleTemplateSelect = useCallback( - async (template: EvaluatorPreview | Evaluator) => { - const evaluatorId = (template as any)?.key - if (!evaluatorId) { - message.error("Unable to open evaluator template") - return - } - - await router.push(`${projectURL}/evaluators/configure/${evaluatorId}`) - }, - [router, projectURL], - ) - - const renderContent = () => { - if (isLoadingEvaluators) { - return ( -
- {Array.from({length: 5}).map((_, index) => ( - - ))} -
- ) - } - - if (!filteredEvaluators.length) { - return ( -
- -
- ) - } - - return ( -
- {filteredEvaluators.map((item) => { - const primaryTag = getEvaluatorTagValues(item)[0] - const tagClassnames = primaryTag - ? TAG_CLASSNAME_MAP[primaryTag] || "bg-slate-100 text-slate-700" - : "bg-slate-100 text-slate-700" - - return ( -
handleTemplateSelect(item)} - className={clsx( - "border-0 border-b border-solid border-gray-200 min-h-[72px] flex flex-col justify-center gap-3 py-3 px-4 cursor-pointer group", - )} - > -
- - {item.name} - - -
- {item.description} -
- ) - })} -
- ) - } - - return ( -
-
- - Select evaluator type - - - Choose base template for your evaluator - -
- - -
{renderContent()}
-
- ) -} - -export default memo(SelectEvaluatorModalContent) diff --git a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/index.tsx b/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/index.tsx deleted file mode 100644 index 858de0e46e..0000000000 --- a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import {memo} from "react" - -import dynamic from "next/dynamic" - -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" - -import {SelectEvaluatorModalProps} from "./types" -const SelectEvaluatorModalContent = dynamic(() => import("./assets/SelectEvaluatorModalContent"), { - ssr: false, -}) - -const SelectEvaluatorModal = ({open, onCancel, ...modalProps}: SelectEvaluatorModalProps) => { - return ( - - - - ) -} - -export default memo(SelectEvaluatorModal) diff --git a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/types.ts b/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/types.ts deleted file mode 100644 index 29b0bbbc32..0000000000 --- a/web/oss/src/components/Evaluators/components/SelectEvaluatorModal/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -import {EnhancedModalProps} from "@/oss/components/EnhancedUIs/Modal/types" - -export interface SelectEvaluatorModalProps extends EnhancedModalProps {} diff --git a/web/oss/src/components/Evaluators/hooks/useEvaluatorsRegistryData.ts b/web/oss/src/components/Evaluators/hooks/useEvaluatorsRegistryData.ts deleted file mode 100644 index 3aa171dc76..0000000000 --- a/web/oss/src/components/Evaluators/hooks/useEvaluatorsRegistryData.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {useCallback, useMemo} from "react" - -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import useFetchEvaluatorsData from "@/oss/lib/hooks/useFetchEvaluatorsData" -import {Evaluator, EvaluatorConfig} from "@/oss/lib/Types" - -import {EvaluatorCategory, EvaluatorPreview, EvaluatorRegistryRow} from "../assets/types" -import { - sortEvaluatorRowsByCreatedAtDesc, - transformEvaluatorConfigsToRows, - transformEvaluatorsToRows, -} from "../assets/utils" - -const HUMAN_QUERY = Object.freeze({is_human: true}) - -const useEvaluatorsRegistryData = (category: EvaluatorCategory) => { - const { - evaluatorsSwr: baseEvaluatorsSwr, - evaluatorConfigsSwr, - isLoadingEvaluators, - refetchAll: refetchEvaluatorResources, - } = useFetchEvaluatorsData() - - const humanEvaluatorsSwr = useEvaluators({ - preview: true, - queries: HUMAN_QUERY, - }) - - const rows = useMemo(() => { - let unsortedRows: EvaluatorRegistryRow[] - - if (category === "human") { - const humanEvaluators = (humanEvaluatorsSwr.data || []) as EvaluatorPreview[] - unsortedRows = transformEvaluatorsToRows(humanEvaluators, "human") - } else { - const evaluatorConfigs = (evaluatorConfigsSwr.data || []) as EvaluatorConfig[] - const baseEvaluators = (baseEvaluatorsSwr.data || []) as Evaluator[] - - unsortedRows = transformEvaluatorConfigsToRows( - evaluatorConfigs, - category, - baseEvaluators, - ) - } - - return sortEvaluatorRowsByCreatedAtDesc(unsortedRows) - }, [category, baseEvaluatorsSwr.data, evaluatorConfigsSwr.data, humanEvaluatorsSwr.data]) - - const isLoading = useMemo( - () => - category === "human" - ? humanEvaluatorsSwr.isLoading - : evaluatorConfigsSwr.isLoading || isLoadingEvaluators, - [isLoadingEvaluators, evaluatorConfigsSwr.isLoading, humanEvaluatorsSwr.isLoading], - ) - - const refetchAll = useCallback(async () => { - await Promise.all( - [refetchEvaluatorResources(), humanEvaluatorsSwr.mutate?.()].filter(Boolean), - ) - }, [refetchEvaluatorResources, humanEvaluatorsSwr.mutate]) - - return {rows, isLoading, refetchAll} -} - -export default useEvaluatorsRegistryData diff --git a/web/oss/src/components/Evaluators/index.tsx b/web/oss/src/components/Evaluators/index.tsx deleted file mode 100644 index e1062ad107..0000000000 --- a/web/oss/src/components/Evaluators/index.tsx +++ /dev/null @@ -1,374 +0,0 @@ -import {memo, useCallback, useEffect, useMemo, useState, type ChangeEvent, type Key} from "react" - -import {DeleteOutlined, PlusOutlined} from "@ant-design/icons" -import {Button, Input, Tabs, Typography} from "antd" -import dynamic from "next/dynamic" -import {useRouter} from "next/router" -import {useLocalStorage} from "usehooks-ts" - -import {message} from "@/oss/components/AppMessageContext" -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" -import {AnnotateDrawerSteps} from "@/oss/components/pages/observability/drawer/AnnotateDrawer/assets/enum" -import {useQueryParam} from "@/oss/hooks/useQuery" -import useURL from "@/oss/hooks/useURL" -import {checkIfResourceValidForDeletion} from "@/oss/lib/helpers/evaluate" -import {useBreadcrumbsEffect} from "@/oss/lib/hooks/useBreadcrumbs" -import {deleteEvaluatorConfig} from "@/oss/services/evaluations/api" -import {deleteHumanEvaluator} from "@/oss/services/evaluators" -import {useProjectData} from "@/oss/state/project/hooks" - -import { - DEFAULT_EVALUATOR_TAB, - EVALUATOR_TABLE_STORAGE_PREFIX, - EVALUATOR_TABS, -} from "./assets/constants" -import getColumns from "./assets/getColumns" -import {EvaluatorCategory, EvaluatorRegistryRow} from "./assets/types" -import DeleteEvaluatorsModal from "./components/DeleteEvaluatorsModal" -import SelectEvaluatorModal from "./components/SelectEvaluatorModal" -import useEvaluatorsRegistryData from "./hooks/useEvaluatorsRegistryData" - -const AnnotateDrawer = dynamic( - () => import("@/oss/components/pages/observability/drawer/AnnotateDrawer"), - {ssr: false}, -) - -const isValidEvaluatorTab = (value: string): value is EvaluatorCategory => { - return EVALUATOR_TABS.some(({key}) => key === value) -} - -const EvaluatorsRegistry = ({scope = "project"}: {scope?: "project" | "app"}) => { - const {projectId} = useProjectData() - const router = useRouter() - const {projectURL} = useURL() - const storageKey = useMemo( - () => `${EVALUATOR_TABLE_STORAGE_PREFIX}-${scope}-${projectId || "global"}-tab`, - [projectId, scope], - ) - const [activeTab, setActiveTab] = useLocalStorage( - storageKey, - DEFAULT_EVALUATOR_TAB, - ) - const [tabState, setTabState] = useQueryParam("tab", activeTab) - - useEffect(() => { - if (isValidEvaluatorTab(tabState)) { - if (tabState !== activeTab) { - setActiveTab(tabState) - } - return - } - - const fallbackTab = isValidEvaluatorTab(activeTab) ? activeTab : DEFAULT_EVALUATOR_TAB - - if (activeTab !== fallbackTab) { - setActiveTab(fallbackTab) - } - - if (tabState !== fallbackTab) { - setTabState(fallbackTab) - } - }, [tabState, activeTab]) - - // states - const [searchTerm, setSearchTerm] = useState("") - const [selectedRowKeys, setSelectedRowKeys] = useState([]) - const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false) - const [isDeleting, setIsDeleting] = useState(false) - const [isSelectEvaluatorModalOpen, setIsSelectEvaluatorModalOpen] = useState(false) - const [isAnnotateDrawerOpen, setIsAnnotateDrawerOpen] = useState(false) - const [drawerMode, setDrawerMode] = useState<"create" | "edit">("create") - const [evaluatorToEdit, setEvaluatorToEdit] = useState(null) - - const {rows, isLoading, refetchAll} = useEvaluatorsRegistryData(activeTab) - - const rowsById = useMemo(() => { - return new Map(rows.map((row) => [row.id, row])) - }, [rows]) - - useEffect(() => { - setSelectedRowKeys((prev) => { - const validKeys = prev.filter((key) => rowsById.has(String(key))) - return validKeys.length === prev.length ? prev : validKeys - }) - }, [rowsById]) - - const filteredRows = useMemo(() => { - if (!searchTerm) return rows - - return rows.filter((row) => { - const haystack = [ - row.name, - row.slug, - row.typeBadge.label, - row.versionLabel, - row.modifiedBy, - ...row.tags, - ] - .filter(Boolean) - .join(" ") - .toLowerCase() - - return haystack.includes(searchTerm.trim().toLowerCase()) - }) - }, [rows, searchTerm]) - - const selectedRows = useMemo( - () => selectedRowKeys.map((key) => rowsById.get(String(key))).filter(Boolean), - [selectedRowKeys, rowsById], - ) as EvaluatorRegistryRow[] - - const selectedNames = useMemo(() => selectedRows.map((row) => row.name), [selectedRows]) - - const onTabChange = useCallback( - (value: EvaluatorCategory) => { - setActiveTab(value) - setSelectedRowKeys([]) - setTabState(value) - }, - [setActiveTab, setTabState], - ) - - const onSearch = useCallback((event: ChangeEvent) => { - setSearchTerm(event.target.value) - }, []) - - const handleOpenHumanDrawer = useCallback(() => { - setDrawerMode("create") - setEvaluatorToEdit(null) - setIsAnnotateDrawerOpen(true) - }, []) - - const handleOpenCreateModal = useCallback(() => { - if (activeTab === "human") { - handleOpenHumanDrawer() - return - } - setIsSelectEvaluatorModalOpen(true) - }, [activeTab, handleOpenHumanDrawer]) - - const handleCloseSelectModal = useCallback(() => { - setIsSelectEvaluatorModalOpen(false) - }, []) - - const closeAnnotateDrawer = useCallback(() => { - setIsAnnotateDrawerOpen(false) - setEvaluatorToEdit(null) - setDrawerMode("create") - }, []) - - const onSavedEvaluator = useCallback( - async (_slug?: string) => { - try { - await refetchAll() - } catch (error) { - console.error(error) - } finally { - closeAnnotateDrawer() - } - }, - [refetchAll, closeAnnotateDrawer], - ) - - const openDrawerForRecord = useCallback( - (record: EvaluatorRegistryRow) => { - if (activeTab !== "human") return - setDrawerMode("edit") - setEvaluatorToEdit(record.raw) - setIsAnnotateDrawerOpen(true) - }, - [activeTab], - ) - - const handleNavigateToConfigure = useCallback( - async (record: EvaluatorRegistryRow) => { - const raw = record.raw as EvaluatorRegistryRow["raw"] & {kind?: string} - const isConfig = raw && raw.kind === "config" - const targetId = isConfig ? record.id : (record.slug as string) - - await router.push(`${projectURL}/evaluators/configure/${encodeURIComponent(targetId)}`) - }, - [projectURL, router], - ) - - const createEvaluatorDrawerProps = useMemo( - () => ({ - mode: drawerMode, - evaluator: drawerMode === "edit" ? evaluatorToEdit || undefined : undefined, - onSuccess: onSavedEvaluator, - skipPostCreateStepChange: drawerMode === "create", - }), - [drawerMode, evaluatorToEdit, onSavedEvaluator], - ) - - const handleConfirmDelete = useCallback(async () => { - if (!selectedRows.length) return - const ids = selectedRows.map((row) => row.id).filter(Boolean) as string[] - if (!ids.length) return - - try { - setIsDeleting(true) - - if (activeTab === "human") { - await Promise.all(ids.map((id) => deleteHumanEvaluator(id))) - } else { - const canDelete = await checkIfResourceValidForDeletion({ - resourceType: "evaluator_config", - resourceIds: ids, - }) - if (!canDelete) return - - await Promise.all(ids.map((id) => deleteEvaluatorConfig(id))) - } - - message.success( - ids.length === 1 ? "Evaluator deleted" : `${ids.length} evaluators deleted`, - ) - - setSelectedRowKeys([]) - await refetchAll() - } catch (error) { - console.error(error) - message.error("Failed to delete evaluators") - } finally { - setIsDeleting(false) - setIsDeleteModalOpen(false) - } - }, [selectedRows, refetchAll, activeTab]) - - const handleRowDelete = useCallback( - (record: EvaluatorRegistryRow) => { - if (!record?.id) return - setSelectedRowKeys([record.id]) - setIsDeleteModalOpen(true) - }, - [setIsDeleteModalOpen, setSelectedRowKeys], - ) - - const tableColumns = useMemo( - () => - getColumns({ - category: activeTab, - onEdit: openDrawerForRecord, - onConfigure: handleNavigateToConfigure, - onDelete: handleRowDelete, - }), - [activeTab], - ) - - const activeTabLabel = useMemo(() => { - return EVALUATOR_TABS.find((tab) => tab.key === activeTab)?.label || "Evaluators" - }, [activeTab]) - - useEffect(() => { - setSelectedRowKeys([]) - }, [activeTab]) - - const breadcrumbKey = scope === "project" ? "projectPage" : "appPage" - - useBreadcrumbsEffect( - { - breadcrumbs: {[breadcrumbKey]: {label: activeTabLabel}}, - type: "append", - condition: true, - }, - [breadcrumbKey, activeTabLabel], - ) - - const isDeleteDisabled = selectedRowKeys.length === 0 - - return ( -
- Evaluators - -
- onTabChange(key as EvaluatorCategory)} - /> -
-
- - - -
- -
- record.id} - rowSelection={{ - type: "checkbox", - columnWidth: 48, - fixed: "left", - selectedRowKeys, - onChange: (keys) => setSelectedRowKeys(keys as Key[]), - }} - tableLayout="fixed" - virtualized - className="flex-1" - onRow={(record) => ({ - className: "cursor-pointer", - onClick: () => { - activeTab === "human" - ? openDrawerForRecord(record) - : handleNavigateToConfigure(record) - }, - })} - /> -
- - { - setIsDeleteModalOpen(false) - setSelectedRowKeys([]) - }} - onConfirm={handleConfirmDelete} - confirmLoading={isDeleting} - selectedCount={selectedRowKeys.length} - selectedNames={selectedNames} - /> - - - - -
- ) -} - -export default memo(EvaluatorsRegistry) diff --git a/web/oss/src/components/Filters/EditColumns.tsx b/web/oss/src/components/Filters/EditColumns.tsx new file mode 100644 index 0000000000..8e7fc1ddaa --- /dev/null +++ b/web/oss/src/components/Filters/EditColumns.tsx @@ -0,0 +1,111 @@ +import {useState} from "react" + +import {Columns} from "@phosphor-icons/react" +import type {MenuProps} from "antd" +import {Button, Checkbox, Dropdown, Space} from "antd" +import {ColumnsType} from "antd/es/table" +import {createUseStyles} from "react-jss" + +const useStyles = createUseStyles((theme) => ({ + dropdownMenu: { + "&>.ant-dropdown-menu-item": { + "& .anticon-check": { + display: "none", + }, + }, + "&>.ant-dropdown-menu-item-selected": { + "&:not(:hover)": { + backgroundColor: "transparent !important", + }, + "& .anticon-check": { + display: "inline-flex !important", + }, + }, + }, + button: { + display: "flex", + alignItems: "center", + }, +})) + +interface EditColumnsProps { + isOpen: boolean + handleOpenChange: (open: boolean) => void + selectedKeys: string[] + columns: ColumnsType + onChange: (key: string) => void + excludes?: string[] // Array of column keys to exclude + buttonText?: string +} + +const EditColumns: React.FC = ({ + isOpen, + handleOpenChange, + selectedKeys, + columns, + onChange, + excludes = [], + buttonText = "Edit Columns", +}) => { + const classes = useStyles() + const [open, setOpen] = useState(isOpen) + + const handleDropdownChange = (newOpen: boolean) => { + setOpen(newOpen) + if (!newOpen) handleOpenChange(newOpen) + } + + const generateEditItems = (): MenuProps["items"] => { + return columns + .filter((col) => !excludes.includes(col.key as string)) + .flatMap((col) => [ + { + key: col.key as React.Key, + label: ( + e.stopPropagation()}> + onChange(col.key as string)} + /> + {col.title as string} + + ), + }, + ...(("children" in col && + col.children?.map((child) => ({ + key: child.key as React.Key, + label: ( + e.stopPropagation()}> + onChange(child.key as string)} + /> + {(child.title || child.key) as string} + + ), + }))) || + []), + ]) + } + + return ( + + + + ) +} + +export default EditColumns diff --git a/web/oss/src/components/Filters/EditColumns/assets/helper.ts b/web/oss/src/components/Filters/EditColumns/assets/helper.ts deleted file mode 100644 index 511eabc8f6..0000000000 --- a/web/oss/src/components/Filters/EditColumns/assets/helper.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {ColumnsType} from "antd/es/table" - -export const filterColumns = (cols: ColumnsType, hidden: string[]): ColumnsType => { - return cols - .map((col) => { - const key = col.key != null ? String(col.key) : undefined - if (key && hidden.includes(key)) return null - - if ("children" in col && col.children) { - const children = filterColumns(col.children, hidden) - - if (!children.length) { - // Drop parent column when all descendants are hidden to avoid rendering entire records - // as fallback cell content in Ant Table. - return null - } - - return { - ...col, - children, - } - } - - return col - }) - .filter(Boolean) as ColumnsType -} - -export const formatColumnTitle = (text: string) => { - return text - .replace(/_/g, " ") - .replace(/([a-z])([A-Z])/g, "$1 $2") - .replace(/\b\w/g, (c) => c) -} diff --git a/web/oss/src/components/Filters/EditColumns/assets/types.ts b/web/oss/src/components/Filters/EditColumns/assets/types.ts deleted file mode 100644 index 2ccdd36664..0000000000 --- a/web/oss/src/components/Filters/EditColumns/assets/types.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {ButtonProps, PopoverProps} from "antd" -import {ColumnsType} from "antd/es/table" - -export interface EditColumnsProps { - columns: ColumnsType - uniqueKey: string - onChange?: (hidden: string[]) => void - excludes?: string[] - buttonText?: string - popoverProps?: PopoverProps - buttonProps?: ButtonProps -} diff --git a/web/oss/src/components/Filters/EditColumns/index.tsx b/web/oss/src/components/Filters/EditColumns/index.tsx deleted file mode 100644 index 857814582b..0000000000 --- a/web/oss/src/components/Filters/EditColumns/index.tsx +++ /dev/null @@ -1,190 +0,0 @@ -import {useCallback, useEffect, useMemo, useState} from "react" - -import {Columns} from "@phosphor-icons/react" -import {Button, Checkbox, Popover, Space} from "antd" -import {ColumnGroupType, ColumnsType, ColumnType} from "antd/es/table" -import {useLocalStorage} from "usehooks-ts" - -import {formatColumnTitle} from "./assets/helper" -import {EditColumnsProps} from "./assets/types" - -const collectColumnByKey = (columns: ColumnsType, key: string): any | null => { - try { - for (const col of columns) { - if (String(col.key) === key) return col - if ("children" in col && col.children) { - const found = collectColumnByKey(col.children, key) - if (found) return found - } - } - return null - } catch (error) { - return null - } -} - -const collectKeys = (cols: ColumnsType): string[] => { - try { - const res: string[] = [] - cols?.forEach((c) => { - if (c.key) res.push(String(c.key)) - if ("children" in c && c.children && Array.isArray(c.children)) { - res.push(...collectKeys(c.children)) - } - }) - return res - } catch (error) { - return [] - } -} - -const getSafeName = (col: ColumnGroupType | ColumnType) => { - try { - if ((col as any).__editLabel && typeof (col as any).__editLabel === "string") { - return (col as any).__editLabel - } - if ("title" in col && typeof col.title === "string") return col.title - if ("dataIndex" in col && typeof col.dataIndex === "string") return col.dataIndex - if ("key" in col && typeof col.key === "string") return col.key - return "" - } catch (error) { - return "" - } -} - -const EditColumns = ({ - uniqueKey, - excludes = [], - columns, - onChange, - buttonText = "Edit columns", - popoverProps, - buttonProps, -}: EditColumnsProps) => { - const defaultHidden = useMemo(() => { - const keys: string[] = [] - const traverse = (cols: ColumnsType) => { - cols.forEach((col) => { - if (excludes.includes(String(col.key))) return - if ((col as any).defaultHidden) { - keys.push(String(col.key)) - } - if ("children" in col && col.children) { - traverse(col.children) - } - }) - } - traverse(columns) - return keys - }, [columns, excludes]) - - const [hiddenCols, setHiddenCols] = useLocalStorage( - `${uniqueKey}-tableColumnsHidden`, - defaultHidden, - ) - const [open, setOpen] = useState(false) - - // Apply defaultHidden ONLY if there is no saved value yet. - useEffect(() => { - if (!hiddenCols.length && defaultHidden.length > 0) { - setHiddenCols(defaultHidden) - } - }, [defaultHidden]) - - useEffect(() => { - try { - onChange?.(hiddenCols) - } catch (err) { - console.error(err) - } - }, [hiddenCols]) - - const toggleColumn = useCallback( - (key: string) => { - try { - const col = collectColumnByKey(columns, key) - let keys = [key] - if (col && "children" in col && Array.isArray(col.children)) { - // include the parent + all descendant keys - keys = [key, ...collectKeys(col.children)] - } - setHiddenCols((prev) => { - let next = [...prev] - keys.forEach((k) => { - if (next.includes(k)) next = next.filter((x) => x !== k) - else next.push(k) - }) - return next - }) - } catch (error) { - console.error(error) - } - }, - [columns, setHiddenCols], - ) - - const buildItems = useCallback( - (cols: ColumnsType, level = 0): {key: string; label: React.ReactNode}[] => { - try { - return cols - .filter(Boolean) - .filter((col) => !excludes.includes(String(col.key))) - .flatMap((col) => { - if (col.key === "key" || typeof col.key !== "string") return [] - const key = String(col.key) - const safeName = getSafeName(col) - const item = { - key, - label: ( - - - {formatColumnTitle(safeName)} - - ), - } - const children = - "children" in col && col.children - ? buildItems(col.children, level + 1) - : [] - return [item, ...children!] - }) - } catch (err) { - return [] - } - }, - [hiddenCols, excludes], - ) - - return ( - - {buildItems(columns).map((item) => ( -
{ - toggleColumn(String(item.key)) - }} - className="px-2 py-1.5 hover:bg-gray-100 cursor-pointer flex items-center rounded-lg select-none" - > - {item.label} -
- ))} -
- } - > - - - ) -} - -export default EditColumns diff --git a/web/oss/src/components/Filters/Filters.tsx b/web/oss/src/components/Filters/Filters.tsx index 2e3995f643..bf5c9013df 100644 --- a/web/oss/src/components/Filters/Filters.tsx +++ b/web/oss/src/components/Filters/Filters.tsx @@ -1,268 +1,44 @@ import {useMemo, useState} from "react" -import {ArrowClockwiseIcon, CaretDown, Funnel, Plus, Trash} from "@phosphor-icons/react" -import { - Button, - Divider, - Input, - Popover, - Select, - Space, - Typography, - Dropdown, - MenuProps, - TreeSelect, -} from "antd" -import type {TreeSelectProps} from "antd" +import {ArrowCounterClockwise, CaretDown, Funnel, Plus, Trash} from "@phosphor-icons/react" +import {Button, Divider, Input, Popover, Select, Space, Typography, ButtonProps} from "antd" import isEqual from "lodash/isEqual" +import {createUseStyles} from "react-jss" -import { - fieldConfigByOptionKey, - FieldConfig, -} from "@/oss/components/pages/observability/assets/filters/fieldAdapter" -import { - getOperator, - valueShapeFor, -} from "@/oss/components/pages/observability/assets/filters/operatorRegistry" -import {planInputs} from "@/oss/components/pages/observability/assets/filters/rulesEngine" -import { - normalizeFilter, - toUIValue, -} from "@/oss/components/pages/observability/assets/filters/valueCodec" import useLazyEffect from "@/oss/hooks/useLazyEffect" -import useEvaluators from "@/oss/lib/hooks/useEvaluators" -import {EvaluatorPreviewDto} from "@/oss/lib/hooks/useEvaluators/types" -import {Filter, FilterConditions} from "@/oss/lib/Types" +import {Filter, JSSTheme} from "@/oss/lib/Types" -import { - NUM_OPS, - STRING_EQU_AND_CONTAINS_OPS, - STRING_EQU_OPS, -} from "../pages/observability/assets/utils" import CustomAntdBadge from "../ui/CustomAntdBadge" -import {useStyles} from "./assets/styles" -import { - buildCustomTreeNode, - collectOptionValues, - collectTreeKeys, - createEmptyFilter, - CUSTOM_FIELD_VALUE, - effectiveFieldForRow, - getGroupDefaultValue, - getOptionKey, - isBooleanLike, - isNumberLike, - mapToTreeData, - noopTreeExpand, - normalizeAttributeSearch, - operatorOptionsFromIds, - valueToPathLabel, -} from "./helpers/utils" -import { - FilterMenuNode, - FilterLeaf, - FilterGroup, - SelectOption, - Props, - FilterItem, - FieldMenuItem, - RowValidation, -} from "./types" - -type AnnotationFeedbackValueType = "string" | "number" | "boolean" - -interface AnnotationFeedbackCondition { - field?: string | string[] - operator?: FilterConditions - value?: string | number | boolean - valueType?: AnnotationFeedbackValueType -} - -interface AnnotationFilterValue { - evaluator?: string - feedback?: AnnotationFeedbackCondition -} - -interface AnnotationFeedbackOption { - label: string - value: string - evaluatorSlug: string - evaluatorLabel: string - type: AnnotationFeedbackValueType -} - -const ALL_FEEDBACK_OPERATOR_OPTIONS = [...STRING_EQU_AND_CONTAINS_OPS, ...NUM_OPS] - -const ALL_FEEDBACK_OPERATOR_VALUES = new Set(ALL_FEEDBACK_OPERATOR_OPTIONS.map((opt) => opt.value)) - -const NUMERIC_FEEDBACK_OPERATOR_VALUES = new Set(NUM_OPS.map((opt) => opt.value)) - -// Collapse multiple "any evaluator" annotation rows that differ only by feedback.key -// back into a single UI row with feedback.field: string[] -const collapseAnnotationAnyEvaluatorRowsFromProps = ( - items: FilterItem[], - getField: (uiKey?: string) => FieldConfig | undefined, -): FilterItem[] => { - type GroupKey = string - const groups = new Map() - const order: GroupKey[] = [] - - const makeKey = (it: FilterItem, ann: any) => { - // Build a key that ignores feedback.field but includes everything else - const uiKey = it.selectedField || it.field || "" - const base = { - uiKey, - isCustomField: it.isCustomField, - baseField: it.baseField, - key: it.key ?? "", - operator: it.operator ?? "", - // Feedback parts that must match to be considered the same group - fbOperator: ann?.feedback?.operator ?? "", - fbValueType: ann?.feedback?.valueType ?? "string", - fbValue: ann?.feedback?.value ?? "", - evaluator: ann?.evaluator ?? undefined, // must be undefined for “any evaluator” - } - return JSON.stringify(base) - } - - const resultPush = (key: GroupKey, item: FilterItem) => { - if (!groups.has(key)) { - groups.set(key, item) - order.push(key) - } - } - - for (const it of items) { - const uiKey = it.selectedField || it.field || "" - const baseFieldCfg = getField(uiKey) - const field = effectiveFieldForRow(baseFieldCfg, it) - - const ann = extractAnnotationValue(it.value) - const isAnnotation = field?.baseField?.includes("annotation") ?? false - const anyEvaluator = isAnnotation && ann && !ann.evaluator - const fbField = ann?.feedback?.field - - // Only collapse when it’s “any evaluator” and the feedback field is a single key - if (anyEvaluator && typeof fbField === "string" && fbField) { - const key = makeKey(it, ann) - const existing = groups.get(key) - if (!existing) { - // First in group → convert feedback.field into array - const clone: FilterItem = JSON.parse(JSON.stringify(it)) - const cAnn = extractAnnotationValue(clone.value)! - cAnn.feedback = {...(cAnn.feedback ?? {}), field: [fbField]} - clone.value = [cAnn] - resultPush(key, clone) - } else { - // Append to array (dedupe) - const eAnn = extractAnnotationValue(existing.value)! - const arr = Array.isArray(eAnn.feedback?.field) - ? (eAnn.feedback!.field as string[]) - : [] - if (!arr.includes(fbField)) arr.push(fbField) - eAnn.feedback = {...(eAnn.feedback ?? {}), field: arr} - existing.value = [eAnn] - } - } else { - // Pass-through rows that aren’t “any evaluator” singles - const passthroughKey = `__pt__${Math.random().toString(36).slice(2)}` - resultPush(passthroughKey, it) - } - } - - return order.map((k) => groups.get(k)!) -} - -const extractAnnotationValue = (raw: FilterItem["value"]): AnnotationFilterValue | undefined => { - if (!Array.isArray(raw) || raw.length === 0) return undefined - const candidate = raw[0] - if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return undefined - const annotation = candidate as AnnotationFilterValue - const next: AnnotationFilterValue = {} - if ("evaluator" in annotation) next.evaluator = annotation.evaluator - if (annotation.feedback && typeof annotation.feedback === "object") - next.feedback = {...annotation.feedback} - return Object.keys(next).length > 0 ? next : undefined -} - -const EMPTY_DISABLED_OPTIONS = new Set() - -const buildFieldMenuItems = ( - nodes: FilterMenuNode[], - onSelect: (value: string, displayLabel?: string) => void, - parentKey = "root", - ancestors: FilterGroup[] = [], - submenuPopupClassName?: string, - disabledOptionKeys: Set = EMPTY_DISABLED_OPTIONS, -): MenuProps["items"] => { - const items: MenuProps["items"] = [] - nodes.forEach((node, index) => { - if (node.kind === "group") { - const group = node as FilterGroup - const groupKey = `group:${parentKey}:${index}` - const defaultValue = getGroupDefaultValue(group) - const isDefaultDisabled = defaultValue ? disabledOptionKeys.has(defaultValue) : false - items.push({ - key: groupKey, - label: ( -
- {group.icon ? : null} - {group.label} -
- ), - children: buildFieldMenuItems( - group.children, - onSelect, - groupKey, - [...ancestors, group], - submenuPopupClassName, - disabledOptionKeys, - ), - onTitleClick: defaultValue - ? ({domEvent}: {domEvent: MouseEvent}) => { - if (isDefaultDisabled) { - domEvent.preventDefault() - domEvent.stopPropagation() - return - } - domEvent.preventDefault() - domEvent.stopPropagation() - onSelect( - defaultValue, - group.titleClickDisplayLabel ?? group.leafDisplayLabel, - ) - } - : undefined, - // popupClassName: submenuPopupClassName, - classNames: { - popup: { - root: submenuPopupClassName, - }, - }, - } as FieldMenuItem) - } else { - const leaf = node as FilterLeaf - const optionKey = getOptionKey(leaf) - items.push({ - key: optionKey, - label: ( -
- {leaf.icon ? : null} - {leaf.label} -
- ), - disabled: disabledOptionKeys.has(optionKey), - } as FieldMenuItem) - } - }) - return items +const useStyles = createUseStyles((theme: JSSTheme) => ({ + popover: { + "& .ant-popover-inner": { + width: "650px !important", + padding: `0px ${theme.paddingXS}px ${theme.paddingXS}px ${theme.padding}px`, + }, + }, + filterHeading: { + fontSize: theme.fontSizeHeading5, + lineHeight: theme.lineHeightHeading5, + fontWeight: theme.fontWeightMedium, + }, + filterContainer: { + padding: 8, + display: "flex", + flexDirection: "column", + alignItems: "start", + borderRadius: theme.borderRadius, + backgroundColor: "#f5f7fa", + marginTop: 8, + }, +})) + +interface Props { + filterData?: Filter[] + columns: {value: string; label: string; type?: string}[] + onApplyFilter: (filters: Filter[]) => void + onClearFilter: (filters: Filter[]) => void + buttonProps?: ButtonProps } const Filters: React.FC = ({ @@ -273,510 +49,100 @@ const Filters: React.FC = ({ buttonProps, }) => { const classes = useStyles() + const emptyFilter = [{key: "", operator: "", value: "", isPermanent: false}] as Filter[] - const {data: evaluatorPreviews} = useEvaluators({preview: true}) - - const annotationEvaluatorOptions = useMemo( - () => - (evaluatorPreviews ?? []).map((evaluator) => ({ - label: evaluator.name || evaluator.slug, - value: evaluator.slug, - })), - [evaluatorPreviews], - ) - - const deriveFeedbackValueType = (schema: any): AnnotationFeedbackValueType => { - const type = schema?.type - if (type === "number" || type === "integer") return "number" - if (type === "boolean") return "boolean" - if (type === "array") { - const itemType = schema?.items?.type - if (itemType === "number" || itemType === "integer") return "number" - if (itemType === "boolean") return "boolean" - } - return "string" - } - - const annotationFeedbackOptions = useMemo(() => { - if (!evaluatorPreviews) return [] as AnnotationFeedbackOption[] - const options: AnnotationFeedbackOption[] = [] - evaluatorPreviews.forEach((evaluator: EvaluatorPreviewDto) => { - const metrics = evaluator.metrics ?? {} - Object.entries(metrics).forEach(([key, schema]) => { - const typedSchema = schema as any - options.push({ - label: typedSchema?.title ?? key, - value: key, - evaluatorSlug: evaluator.slug, - evaluatorLabel: evaluator.name || evaluator.slug, - type: deriveFeedbackValueType(typedSchema), - }) - }) - }) - return options - }, [evaluatorPreviews]) - - // Dedupe feedback options by feedback key across evaluators - const dedupeFeedbackOptions = (options: AnnotationFeedbackOption[]) => { - const byKey = new Map() - for (const opt of options) { - if (!byKey.has(opt.value)) byKey.set(opt.value, opt) - } - return Array.from(byKey.values()) - } - - const fieldMap = useMemo(() => fieldConfigByOptionKey(columns), [columns]) - const getField = (uiKey?: string): FieldConfig | undefined => - uiKey ? fieldMap.get(uiKey) : undefined - - const mapFilterData = (data: Filter[]): FilterItem[] => - data.map((item) => { - const byOptionKey = getField(item.field) - const field = - byOptionKey ?? - (() => { - if (item.key) { - for (const fc of fieldMap.values()) if (fc.queryKey === item.key) return fc - } - const matches: FieldConfig[] = [] - for (const fc of fieldMap.values()) - if (fc.baseField === item.field || (item.key && fc.baseField === item.key)) - matches.push(fc) - if (matches.length > 1) { - const valuesArray = Array.isArray(item.value) - ? item.value - : item.value == null - ? [] - : [item.value] - for (const candidate of matches) { - if (!candidate.referenceProperty) continue - const hasMatch = valuesArray.some( - (entry) => - entry && - typeof entry === "object" && - candidate.referenceProperty! in entry, - ) - if (hasMatch) return candidate - } - } - return matches[0] - })() - - if (field) { - const pre = field.toUI ? field.toUI(item.value) : item.value - const shape = item.operator - ? valueShapeFor(item.operator as any, field.type) - : "single" - const valueUI = toUIValue(pre, shape) - return { - ...item, - field: field.optionKey, - key: item.key ?? "", - selectedField: field.optionKey, - fieldType: field.type, - isCustomField: false, - baseField: field.baseField, - selectedLabel: field.label, - value: valueUI, - customValueType: field.optionKey === "custom" ? "string" : undefined, - } - } - const customKey = item.key || item.field || "" - return { - ...item, - field: customKey, - key: customKey, - selectedField: customKey ? CUSTOM_FIELD_VALUE : undefined, - fieldType: undefined, - isCustomField: Boolean(customKey), - baseField: item.field, - selectedLabel: undefined, - } - }) - - const sanitizeFilterItems = (items: FilterItem[]): Filter[] => - items.map( - ({ - field, - key, - operator, - value, - isPermanent, - baseField, - selectedField, - customValueType, - }) => { - const fc = getField(selectedField || field || "") - if (!fc) { - const raw: Filter = {field, key, operator, value} - return isPermanent ? {...raw, isPermanent} : raw - } - - const isException = - fc.baseField === "events" && - (operator === "exists" || operator === "not_exists") - - let valueToSend = value - if (fc.optionKey === "custom") { - const vt = customValueType ?? "string" - const effType = vt === "number" ? "number" : "string" - const shape = operator - ? valueShapeFor(operator as any, effType as any) - : "single" - - const toBool = (raw: unknown) => { - const s = String(Array.isArray(raw) ? raw[0] : raw) - .trim() - .toLowerCase() - return s === "true" ? true : s === "false" ? false : undefined - } - const toNum = (raw: unknown) => { - const n = Number(Array.isArray(raw) ? raw[0] : (raw as any)) - return Number.isFinite(n) ? n : undefined - } - - if (vt === "number") { - if (shape === "list") { - const arr = Array.isArray(value) ? value : [value] - valueToSend = arr - .map((v) => Number(v)) - .filter((n) => Number.isFinite(n)) - } else if (shape === "range") { - const arr = Array.isArray(value) ? value : [] - const a = Number(arr[0]), - b = Number(arr[1]) - valueToSend = - Number.isFinite(a) && Number.isFinite(b) ? [a, b] : undefined - } else { - valueToSend = toNum(value) - } - } else if (vt === "boolean") { - if (shape === "list") { - const arr = Array.isArray(value) ? value : [value] - const mapped = arr.map((v) => { - const s = String(v).trim().toLowerCase() - return s === "true" ? true : s === "false" ? false : undefined - }) - valueToSend = mapped.filter((v) => v !== undefined) - if ((valueToSend as unknown[]).length === 0) valueToSend = undefined - } else { - valueToSend = toBool(value) - } - } else { - if (shape === "list") { - valueToSend = Array.isArray(value) ? value : [value].filter(Boolean) - } else if (shape === "range") { - valueToSend = Array.isArray(value) ? value : value - } else { - valueToSend = Array.isArray(value) ? (value[0] ?? "") : (value ?? "") - } - } - } - - if (isException) valueToSend = fc.defaultValue ?? valueToSend - - const keyForFilter = key && key !== "" ? key : fc.queryKey - const filterForNormalization: Filter = { - field: fc.baseField, - operator, - value: valueToSend, - } - if (keyForFilter) filterForNormalization.key = keyForFilter - const normalized = normalizeFilter(filterForNormalization, { - fieldType: - fc.optionKey === "custom" - ? customValueType === "number" - ? "number" - : "string" - : fc.type, - opId: operator, - toExternal: fc.toExternal, - }) - return isPermanent ? {...normalized, isPermanent} : normalized - }, - ) - - const [filter, setFilter] = useState(() => - !filterData?.length ? [createEmptyFilter()] : mapFilterData(filterData), + const [filter, setFilter] = useState(() => + !filterData?.length ? emptyFilter : filterData, ) - const [activeFieldDropdown, setActiveFieldDropdown] = useState(null) const [isFilterOpen, setIsFilterOpen] = useState(false) - const [keySearchTerms, setKeySearchTerms] = useState>({}) - - const sanitizedFilters = useMemo(() => { - return sanitizeFilterItems( - filter.filter(({field, operator, isPermanent, isCustomField}) => { - if (isPermanent) return true - if (!operator) return false - if (isCustomField) return !!field - return !!field - }), - ) - }, [filter]) useLazyEffect(() => { if (filterData && filterData.length > 0) { - const mapped = mapFilterData(filterData) - // NEW: collapse expanded any-evaluator annotation rows back into one UI row - const collapsed = collapseAnnotationAnyEvaluatorRowsFromProps(mapped, getField) - setFilter(collapsed) + setFilter(filterData) } else { - setFilter([]) + setFilter(emptyFilter) } - }, [filterData, columns]) - - const handleFieldSelection = (uiValue: string, idx: number, selectedLabel?: string) => { - setFilter((prev) => { - const next = [...prev] - const current = {...next[idx]} - if (uiValue === CUSTOM_FIELD_VALUE) { - Object.assign(current, { - selectedField: undefined, - field: "", - key: "", - operator: "", - value: "", - fieldType: undefined, - isCustomField: true, - baseField: undefined, - selectedLabel: undefined, - customValueType: undefined, - }) - } else { - const field = getField(uiValue)! - current.selectedField = field.optionKey - current.field = field.optionKey - current.key = field.keyInput?.kind === "none" ? (field.queryKey ?? "") : "" - current.operator = field.operatorIds[0] ?? "" - const effType = field.optionKey === "custom" ? "string" : field.type - const shape = current.operator - ? valueShapeFor(current.operator as any, effType as any) - : "single" - let defaultValue = toUIValue(field.defaultValue, shape) - if ( - shape === "list" && - current.operator && - planInputs(field, current.operator as any).valueAs === "text" && - (defaultValue == null || - (Array.isArray(defaultValue) && defaultValue.length === 0)) - ) { - defaultValue = "" - } - current.value = defaultValue - current.fieldType = field.type - current.isCustomField = false - current.baseField = field.baseField - current.selectedLabel = selectedLabel ?? field.label - current.customValueType = field.optionKey === "custom" ? "string" : undefined - } - next[idx] = current - return next - }) - setKeySearchTerms((prev) => { - if (!(idx in prev)) return prev - const next = {...prev} - delete next[idx] - return next - }) - setActiveFieldDropdown(null) - } + }, [filterData]) + + const operators = [ + {type: "string", value: "contains", label: "contains"}, + {type: "string", value: "matches", label: "matches"}, + {type: "string", value: "like", label: "like"}, + {type: "string", value: "startswith", label: "startswith"}, + {type: "string", value: "endswith", label: "endswith"}, + {type: "exists", value: "exists", label: "exists"}, + {type: "exists", value: "not_exists", label: "not exists"}, + {type: "exists", value: "in", label: "in"}, + {type: "exists", value: "is", label: "is"}, + {type: "exists", value: "is_not", label: "is not"}, + {type: "number", value: "eq", label: "="}, + {type: "number", value: "neq", label: "!="}, + {type: "number", value: "gt", label: ">"}, + {type: "number", value: "lt", label: "<"}, + {type: "number", value: "gte", label: ">="}, + {type: "number", value: "lte", label: "<="}, + {type: "number", value: "btwn", label: "between"}, + ] + + const filteredColumns = useMemo( + () => columns.filter((col) => !filter.some((item) => item.key === col.value)), + [columns, filter], + ) const onFilterChange = ({ columnName, value, idx, }: { - columnName: keyof FilterItem + columnName: keyof Omit value: any idx: number }) => { - setFilter((prev) => { - const next = [...prev] - const current = {...next[idx]} - const field = getField(current.selectedField || current.field || "") - - if (columnName === "operator" && field) { - const effType = - field.optionKey === "custom" - ? current.customValueType === "number" - ? "number" - : "string" - : field.type - const shape = valueShapeFor(value as any, effType as any) - current.value = toUIValue(current.value, shape) - current.operator = value - next[idx] = current - return next - } - - next[idx] = {...current, [columnName]: value} - return next + setFilter((prevFilters) => { + const newFilters = [...prevFilters] + newFilters[idx] = {...newFilters[idx], [columnName]: value} + return newFilters }) - if (columnName === "key") { - setKeySearchTerms((prev) => { - if (!(idx in prev)) return prev - const next = {...prev} - delete next[idx] - return next - }) - } } - const rowValidations: RowValidation[] = filter.map((item) => { - if (item.isPermanent) return {isValid: true} - - const uiKey = item.selectedField || item.field || "" - const baseFieldCfg = getField(uiKey) - const field = effectiveFieldForRow(baseFieldCfg, item) - - if (!field) return {isValid: false} - - const operatorValue = - item.operator || (field.operatorIds.length === 1 ? field.operatorIds[0] : "") - if (!operatorValue) return {isValid: false} - - const needsKey = !!field.keyInput && field.keyInput.kind !== "none" - if (needsKey && (!item.key || item.key === "")) return {isValid: false} - - const hidesValue = - getOperator(operatorValue as any).hidesValue || field.valueInput?.kind === "none" - if (hidesValue) return {isValid: true} - - const effType = - field.optionKey === "custom" - ? item.customValueType === "number" - ? "number" - : "string" - : field.type - const wantsBooleanValidation = - field.optionKey === "custom" && item.customValueType === "boolean" - const wantsNumberValidation = effType === "number" - - const shape = valueShapeFor(operatorValue as any, effType as any) - const value = item.value - - if (shape === "range") { - let parsed: unknown[] | null = null - if (Array.isArray(value)) parsed = value - else if (typeof value === "string") { - const trimmed = value.trim() - if (!trimmed) return {isValid: false} - try { - const json = JSON.parse(value) - if (Array.isArray(json)) parsed = json - } catch { - parsed = null - } - } else if (value == null) { - return {isValid: false} - } - - if (!parsed || parsed.length !== 2) { - return {isValid: false, valueInvalid: true} - } - - if (wantsNumberValidation && parsed.some((entry) => !isNumberLike(entry))) { - return {isValid: false, valueInvalid: true} - } - - return {isValid: true} - } - - if (shape === "list") { - if (Array.isArray(value)) { - if (value.length === 0) return {isValid: false} - if (wantsBooleanValidation && value.some((entry) => !isBooleanLike(entry))) - return {isValid: false, valueInvalid: true} - if (wantsNumberValidation && value.some((entry) => !isNumberLike(entry))) - return {isValid: false, valueInvalid: true} - return {isValid: true} - } - - const trimmed = String(value ?? "").trim() - if (!trimmed) return {isValid: false} - return {isValid: true} - } - - const normalized = Array.isArray(value) ? value[0] : value - if (normalized == null) return {isValid: false} - const asString = typeof normalized === "string" ? normalized.trim() : String(normalized) - if (!asString) return {isValid: false} - - if (wantsBooleanValidation && !isBooleanLike(normalized)) - return {isValid: false, valueInvalid: true} - - if (wantsNumberValidation && !isNumberLike(normalized)) - return {isValid: false, valueInvalid: true} - - return {isValid: true} - }) - - const isApplyDisabled = rowValidations.some(({isValid}) => !isValid) - - const onDeleteFilter = (index: number) => - setFilter((prev) => prev.filter((_, idx) => idx !== index)) - const clearFilter = () => { - const kept = filter.filter((f) => f.isPermanent) - const sanitizedKept = sanitizeFilterItems(kept) - if (!isEqual(sanitizedKept, filterData)) onClearFilter(sanitizedKept) - setActiveFieldDropdown(null) - setFilter(kept.length ? kept : []) + const onDeleteFilter = (index: number) => { + setFilter(filter.filter((_, idx) => idx !== index)) } - const getFilterOptionKey = (item: FilterItem) => - item.selectedField || - (typeof item.field === "string" && item.field ? item.field : undefined) || - item.baseField || - "" - - const annotationDisabledOptions = useMemo(() => new Set(["has_annotation"]), []) + const addNestedFilter = () => { + setFilter([...filter, {key: "", operator: "", value: "", isPermanent: false}]) + } - const hasAnnotationIndices = useMemo( - () => - filter.reduce((acc, current, index) => { - if (getFilterOptionKey(current) === "has_annotation") acc.push(index) - return acc - }, []), - [filter], - ) + const clearFilter = () => { + const clearedFilters = filter.filter((f) => f.isPermanent) - // Explode "any evaluator + multi feedback" rows into multiple rows so the backend can treat each feedback separately - const explodeAnnotationAnyEvaluatorRows = (items: FilterItem[]): FilterItem[] => { - const out: FilterItem[] = [] - for (const it of items) { - const ann = extractAnnotationValue(it.value) - const fields = ann?.feedback?.field - if (!ann?.evaluator && Array.isArray(fields) && fields.length > 1) { - for (const key of fields) { - const clone: FilterItem = JSON.parse(JSON.stringify(it)) - const cAnn = extractAnnotationValue(clone.value)! - cAnn.feedback = {...(cAnn.feedback ?? {}), field: key} - clone.value = [cAnn] - out.push(clone) - } - } else { - out.push(it) - } + if (!isEqual(clearedFilters, filterData)) { + onClearFilter(clearedFilters) } - return out + setFilter(!clearedFilters.length ? emptyFilter : clearedFilters) } const applyFilter = () => { - const expanded = explodeAnnotationAnyEvaluatorRows(filter) - const out = sanitizeFilterItems(expanded) - if (!isEqual(out, filterData)) onApplyFilter(out) - setActiveFieldDropdown(null) + const sanitizedFilters = filter.filter(({key, operator}) => key && operator) + + if (!isEqual(sanitizedFilters, filterData)) { + onApplyFilter(sanitizedFilters) + } setIsFilterOpen(false) } - const getWithinPopover = (trigger: HTMLElement | null) => - (trigger && (trigger.closest(".ant-popover") as HTMLElement)) || document.body - - const dropdownPanelStyle = { - maxWidth: "calc(100vw - 32px)", - maxHeight: "60vh", - overflow: "auto", - } as const + const mapColumnLabel = useMemo( + () => + columns.reduce( + (acc, col) => { + acc[col.value] = col.label + return acc + }, + {} as Record, + ), + [columns], + ) + const getColumnLabelFromValue = (key: string) => mapColumnLabel[key] || key return ( = ({ trigger="click" overlayClassName={classes.popover} arrow={false} - onOpenChange={(open) => { - setIsFilterOpen(open) - if (!open) setActiveFieldDropdown(null) - }} + onOpenChange={() => setIsFilterOpen(false)} open={isFilterOpen} placement="bottomLeft" - autoAdjustOverflow - styles={{body: {maxHeight: "70vh"}, root: {maxWidth: "100vw"}}} - destroyOnHidden content={
-
- Filter +
+ Filter
+
{filter.map((item, idx) => { - const uiKey = item.selectedField || item.field || "" - const baseFieldCfg = getField(uiKey) - const field = effectiveFieldForRow(baseFieldCfg, item) - - const isAnnotationFieldSelected = - field?.baseField?.includes("annotation") ?? false - - const operatorOptions = field - ? (field.operatorOptions ?? - operatorOptionsFromIds(field.operatorIds)) - : [] - - const singleOperator = operatorOptions.length === 1 - const operatorValue = - item.operator || - (singleOperator ? operatorOptions[0]?.value : undefined) - - const plan = - field && operatorValue - ? planInputs(field, operatorValue as any) - : undefined - const showKey = Boolean(plan?.needsKey) - const showValue = Boolean(plan?.showValue) - const valueAs = plan?.valueAs - const valueOptions = plan?.valueOptions - const keyPlaceholder = plan?.placeholders?.key ?? "Key" - const valuePlaceholder = plan?.placeholders?.value ?? "Value" - - const rawValue = Array.isArray(item.value) ? "" : (item.value as any) - const displayValue = (field as any)?.valueDisplayText || rawValue - const validation = rowValidations[idx] ?? {isValid: true} - const valueHasError = Boolean(validation.valueInvalid) - - const annotationValue = extractAnnotationValue(item.value) - - const disableHasAnnotationForRow = hasAnnotationIndices.some( - (annotationIdx) => annotationIdx !== idx, - ) - const disabledFieldOptionsForMenu = disableHasAnnotationForRow - ? annotationDisabledOptions - : undefined - - const setAnnotationValue = ( - updater: ( - prev: AnnotationFilterValue | undefined, - ) => AnnotationFilterValue | undefined, - ) => { - const next = updater( - annotationValue ? {...annotationValue} : undefined, - ) - if (!next || Object.keys(next).length === 0) { - onFilterChange({columnName: "value", value: [], idx}) - return - } - - const valueToStore: AnnotationFilterValue = {...next} - if (valueToStore.feedback) { - const cleanedFeedback = {...valueToStore.feedback} - if (cleanedFeedback.valueType === undefined) - cleanedFeedback.valueType = "string" - valueToStore.feedback = cleanedFeedback - } - - onFilterChange({columnName: "value", value: [valueToStore], idx}) - } - - const currentFeedback = annotationValue?.feedback - - // Build available feedback options - const availableFeedbackOptions = (() => { - if (annotationValue?.evaluator) { - const filtered = annotationFeedbackOptions.filter( - (option) => - option.evaluatorSlug === annotationValue.evaluator, - ) - // Keep currently selected key if it exists and is not part of filtered - const selectedKey = Array.isArray(currentFeedback?.field) - ? currentFeedback?.field[0] - : currentFeedback?.field - const selected = selectedKey - ? annotationFeedbackOptions.find( - (option) => option.value === selectedKey, - ) - : undefined - if ( - selected && - !filtered.some((o) => o.value === selected.value) - ) - return [selected, ...filtered] - return filtered - } - // No evaluator. Show deduped feedback names across all evaluators - return dedupeFeedbackOptions(annotationFeedbackOptions) - })() - - // Pick a type from the first selected key if present - const selectedFeedbackKey = Array.isArray(currentFeedback?.field) - ? currentFeedback?.field[0] - : currentFeedback?.field - const selectedFeedbackOption = selectedFeedbackKey - ? availableFeedbackOptions.find( - (option) => option.value === selectedFeedbackKey, - ) - : undefined - - const feedbackValueType = - currentFeedback?.valueType ?? - selectedFeedbackOption?.type ?? - "string" - - const isEvaluatorActive = annotationValue - ? "evaluator" in annotationValue - : false - const isFeedbackActive = annotationValue - ? "feedback" in annotationValue - : false - - const feedbackOperatorOptions = ALL_FEEDBACK_OPERATOR_OPTIONS - - const coerceNumericFeedbackValue = ( - input: unknown, - ): string | number | undefined => { - if (typeof input === "number") - return Number.isFinite(input) ? input : undefined - if (typeof input === "string") { - const trimmed = input.trim() - if (!trimmed) return "" - const numericPattern = /^-?(?:\d+|\d*\.\d+)$/ - return numericPattern.test(trimmed) ? Number(trimmed) : input - } - return undefined - } - - const parseFeedbackArrayInput = (input: string): any[] | undefined => { - const trimmed = input.trim() - if (!trimmed.startsWith("[") || !trimmed.endsWith("]")) - return undefined - try { - const parsed = JSON.parse(trimmed) - return Array.isArray(parsed) ? parsed : undefined - } catch { - return undefined - } - } - - const ensureFeedbackOperator = ( - type: AnnotationFeedbackValueType, - current?: FilterConditions, - ): FilterConditions => { - if (current && ALL_FEEDBACK_OPERATOR_VALUES.has(current)) - return current - if (type === "number") { - return NUM_OPS[0]?.value ?? "" - } - return STRING_EQU_OPS[0]?.value ?? "" - } - - const handleEvaluatorChange = (value?: string) => { - setAnnotationValue((prev) => { - const base: AnnotationFilterValue = {...(prev ?? {})} - - if (!value) { - // Removing evaluator. Keep feedback as is. Now it means across any evaluator - delete base.evaluator - return Object.keys(base).length ? base : undefined - } - - base.evaluator = value - - if (base.feedback?.field) { - const allowed = new Set( - annotationFeedbackOptions - .filter((o) => o.evaluatorSlug === value) - .map((o) => o.value), - ) - if (Array.isArray(base.feedback.field)) { - const kept = base.feedback.field.filter((k) => - allowed.has(k), - ) - base.feedback.field = kept[0] ?? undefined - } else if ( - base.feedback.field && - !allowed.has(base.feedback.field) - ) { - base.feedback.field = undefined - } - } - - return base - }) - } - - const handleFeedbackFieldChange = (value: string | string[]) => { - setAnnotationValue((prev) => { - const base: AnnotationFilterValue = {...(prev ?? {})} - const feedback = {...(base.feedback ?? {})} - - const nextField: string | string[] = annotationValue?.evaluator - ? Array.isArray(value) - ? value[0] - : value - : value - - const sampleKey = Array.isArray(nextField) - ? nextField[0] - : nextField - const option = availableFeedbackOptions.find( - (opt) => opt.value === sampleKey, - ) - const nextType = option - ? option.type - : (feedback.valueType ?? "string") - - feedback.field = nextField - feedback.valueType = nextType - feedback.operator = ensureFeedbackOperator( - nextType, - feedback.operator, - ) - feedback.value = nextType === "boolean" ? true : "" - - base.feedback = feedback - return base - }) - } - - const handleFeedbackOperatorChange = (operator: FilterConditions) => { - setAnnotationValue((prev) => { - const base: AnnotationFilterValue = {...(prev ?? {})} - const feedback = {...(base.feedback ?? {}), operator} - - if (NUMERIC_FEEDBACK_OPERATOR_VALUES.has(operator)) { - feedback.valueType = "number" - const currentValue = feedback.value - const coerced = coerceNumericFeedbackValue(currentValue) - feedback.value = coerced === undefined ? "" : coerced - } - - base.feedback = feedback - return base - }) - } - - const handleFeedbackTypeChange = ( - type: AnnotationFeedbackValueType, - ) => { - setAnnotationValue((prev) => { - const base: AnnotationFilterValue = {...(prev ?? {})} - const feedback = {...(base.feedback ?? {})} - feedback.valueType = type - feedback.operator = ensureFeedbackOperator( - type, - feedback.operator, - ) - feedback.value = type === "boolean" ? true : "" - base.feedback = feedback - return base - }) - } - - const handleFeedbackValueChange = (raw: string | number | boolean) => { - setAnnotationValue((prev) => { - const base: AnnotationFilterValue = {...(prev ?? {})} - const fb = {...(base.feedback ?? {})} - - const type = fb.valueType ?? "string" - let value: any = raw as any - - if (typeof raw === "string") { - const parsedArray = parseFeedbackArrayInput(raw) - if (parsedArray !== undefined) { - value = parsedArray - } - } - - if (!Array.isArray(value)) { - if (type === "number") { - if (typeof raw === "number") { - value = Number.isFinite(raw) ? raw : fb.value - } else { - const coerced = coerceNumericFeedbackValue(raw) - value = coerced === undefined ? "" : coerced - } - } else if (type === "boolean") { - if (typeof raw === "boolean") { - value = raw - } else { - const s = String(raw).trim().toLowerCase() - value = - s === "true" - ? true - : s === "false" - ? false - : undefined - } - } else if (typeof raw === "string") { - value = raw - } else { - value = String(raw) - } - } - - base.feedback = {...fb, value} - return base - }) - } - - const removeEvaluator = () => { - setAnnotationValue((prev) => { - if (!prev?.feedback) { - onDeleteFilter(idx) - return undefined - } - const next = {...(prev ?? {})} - delete next.evaluator - return Object.keys(next).length ? next : undefined - }) - } - - const removeFeedback = () => { - setAnnotationValue((prev) => { - if (!prev?.feedback) return prev - - if (!prev.evaluator) { - onDeleteFilter(idx) - return undefined - } - const next = {...(prev ?? {})} - delete next.feedback - return Object.keys(next).length ? next : undefined - }) - } - - const feedbackValueRaw = (() => { - const raw = currentFeedback?.value - if (Array.isArray(raw)) { - try { - return JSON.stringify(raw) - } catch { - return "" - } - } - if (raw && typeof raw === "object") { - try { - return JSON.stringify(raw) - } catch { - return "" - } - } - if (raw === undefined || raw === null) return "" - if (typeof raw === "string") return raw - if (typeof raw === "number") return String(raw) - if (typeof raw === "boolean") return raw ? "true" : "false" - return "" - })() - - const renderAddFeedbackButton = () => ( - - ) - - const feedbackFieldValueForSelect: string | string[] | undefined = - (() => { - const f = currentFeedback?.field - if (Array.isArray(f)) return f - return f ?? undefined - })() - - const feedbackOptionsForSelect = availableFeedbackOptions.map( - (option) => ({ - label: annotationValue?.evaluator ? option.label : option.label, - value: option.value, - }), + const selectedColumn = columns.find((col) => col.value === item.key) + const filteredOperators = operators.filter( + (operator) => operator.type === selectedColumn?.type, ) return ( - - + +

{idx === 0 ? "Where" : "And"} - +

- -
- - setActiveFieldDropdown(open ? idx : null) + + !label.value ? "Condition" : label.label } - menu={{ - items: buildFieldMenuItems( - columns, - (value, labelFromGroup) => - handleFieldSelection( - value, - idx, - labelFromGroup, - ), - "root", - [], - classes.fieldDropdownSubmenu, - disabledFieldOptionsForMenu ?? - EMPTY_DISABLED_OPTIONS, - ), - onClick: ({key}) => - handleFieldSelection(String(key), idx), - }} - getPopupContainer={(t) => getWithinPopover(t)} - > - - - - {showKey && - (field!.keyInput!.kind === "select" ? ( - (() => { - const options = field!.keyInput! - .options as SelectOption[] - const optionValues = - collectOptionValues(options) - const currentSearch = - keySearchTerms[idx] ?? "" - const normalizedSearch = - normalizeAttributeSearch(currentSearch) - const additionalNodes: NonNullable< - TreeSelectProps["treeData"] - > = [] - const keyValue = - item.key === undefined || - item.key === null - ? undefined - : String(item.key) - if ( - normalizedSearch && - !optionValues.has( - normalizedSearch.value, - ) - ) { - additionalNodes.push( - buildCustomTreeNode( - normalizedSearch.value, - normalizedSearch.pathLabel, - ), - ) - } - if ( - keyValue && - !optionValues.has(keyValue) && - !additionalNodes.some( - (node) => node.value === keyValue, - ) - ) { - additionalNodes.push( - buildCustomTreeNode( - keyValue, - valueToPathLabel(keyValue), - ), - ) - } - const baseTreeData = mapToTreeData(options) - const treeData = - additionalNodes.length > 0 - ? [ - ...additionalNodes, - ...baseTreeData, - ] - : baseTreeData - const expandedKeys = - collectTreeKeys(treeData) - return ( - - getWithinPopover(t) - } - value={ - item.key && item.key !== "" - ? (item.key as - | string - | number) - : undefined - } - onChange={(v) => - onFilterChange({ - columnName: "key", - value: v == null ? "" : v, - idx, - }) - } - onSearch={(searchValue) => - setKeySearchTerms((prev) => { - const trimmed = - searchValue.trim() - if (!trimmed) { - if (!(idx in prev)) - return prev - const next = {...prev} - delete next[idx] - return next - } - return { - ...prev, - [idx]: trimmed, - } - }) - } - onDropdownVisibleChange={(open) => { - if (!open) { - setKeySearchTerms( - (prev) => { - if (!(idx in prev)) - return prev - const next = { - ...prev, - } - delete next[idx] - return next - }, - ) - } - }} - placeholder={keyPlaceholder} - showSearch - treeNodeFilterProp="title" - treeDefaultExpandAll - treeExpandedKeys={expandedKeys} - onTreeExpand={noopTreeExpand} - treeLine={{showLeafIcon: false}} - disabled={item.isPermanent} - filterTreeNode={(input, node) => { - const title = - typeof node?.title === - "string" - ? node.title - : String( - node?.title ?? "", - ) - const value = String( - node?.value ?? "", - ) - const pathLabel = - typeof (node as any) - ?.pathLabel === "string" - ? ((node as any) - .pathLabel as string) - : "" - const search = input - .trim() - .toLowerCase() - return ( - title - .toLowerCase() - .includes(search) || - value - .toLowerCase() - .includes(search) || - pathLabel - .toLowerCase() - .includes(search) - ) - }} - /> - ) - })() - ) : ( - - onFilterChange({ - columnName: "key", - value: e.target.value, - idx, - }) - } - disabled={item.isPermanent} - /> - ))} - - {isAnnotationFieldSelected && ( - - That - - )} - - {!singleOperator && ( - - handleEvaluatorChange(value) - } - allowClear - suffixIcon={} - optionFilterProp="label" - getPopupContainer={(t) => - getWithinPopover(t) - } - styles={{ - popup: { - root: { - ...(dropdownPanelStyle || - {}), - }, - }, - }} - /> - -
- ) : ( - - - {!isFeedbackActive && - renderAddFeedbackButton()} - - ) - ) : !showValue ? ( - - ) : valueAs === "tags" ? ( - - onFilterChange({ - columnName: "value", - value: v, - idx, - }) - } - placeholder={valuePlaceholder} - suffixIcon={} - popupMatchSelectWidth - disabled={item.isPermanent} - status={valueHasError ? "error" : undefined} - getPopupContainer={(t) => getWithinPopover(t)} - styles={{ - popup: { - root: { - ...(dropdownPanelStyle || {}), - }, - }, - }} - /> - ) : valueAs === "range" ? ( - - onFilterChange({ - columnName: "value", - value: e.target.value, - idx, - }) - } - disabled={item.isPermanent} - className="flex-1 min-w-[160px] w-full" - status={valueHasError ? "error" : undefined} - /> - ) : ( - - onFilterChange({ - columnName: "value", - value: e.target.value, - idx, - }) - } - disabled={item.isPermanent} - className="flex-1 min-w-[160px] w-full" - status={valueHasError ? "error" : undefined} - /> - )} - - {field?.optionKey === "custom" && ( - { - handleFeedbackFieldChange( - val as string | string[], - ) - }} - suffixIcon={} - optionFilterProp="label" - getPopupContainer={(t) => - getWithinPopover(t) - } - styles={{ - popup: { - root: { - ...(dropdownPanelStyle || {}), - }, - }, - }} - /> - } - getPopupContainer={(t) => - getWithinPopover(t) - } - styles={{ - popup: { - root: { - ...(dropdownPanelStyle || - {}), - }, - }, - }} - /> - ) : ( - - handleFeedbackValueChange( - e.target.value, - ) - } - /> - )} - + onFilterChange({ + columnName: "value", + value: e.target.value, + idx, + }) + } + /> + + )} + {filter.length > 1 && ( +
-
- -
- - + + - - - - +
} @@ -1858,13 +282,7 @@ const Filters: React.FC = ({ {...buttonProps} > Filters - {sanitizedFilters.filter(({field, operator}) => field && operator).length > 0 && ( - field && operator).length - } - /> - )} + {filter.length > 0 && }
) diff --git a/web/oss/src/components/Filters/Sort.tsx b/web/oss/src/components/Filters/Sort.tsx index b11a0eba5b..df76d6c66f 100644 --- a/web/oss/src/components/Filters/Sort.tsx +++ b/web/oss/src/components/Filters/Sort.tsx @@ -211,7 +211,7 @@ const Sort: React.FC = ({onSortApply, defaultSortValue}) => { <> -
+
Start and end time diff --git a/web/oss/src/components/Filters/assets/styles.ts b/web/oss/src/components/Filters/assets/styles.ts deleted file mode 100644 index 16d7baf2ef..0000000000 --- a/web/oss/src/components/Filters/assets/styles.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {JSSTheme} from "@/oss/lib/Types" -import {createUseStyles} from "react-jss" - -export const useStyles = createUseStyles((theme: JSSTheme) => ({ - popover: { - "&.ant-popover": { - maxWidth: "100vw", - }, - "& .ant-popover-inner": { - width: "clamp(320px, 60vw, 700px)", - maxWidth: "calc(100vw - 24px)", - maxHeight: "min(70vh, 640px)", - padding: 0, - }, - }, - fieldDropdownSubmenu: { - "& .ant-dropdown-menu": { - width: "100%", - maxWidth: "min(560px, calc(100vw - 32px))", - maxHeight: "60vh", - overflow: "auto", - }, - }, - filterHeading: { - display: "flex", - alignItems: "center", - justifyContent: "space-between", - padding: `${theme.paddingXS}px ${theme.paddingXS}px ${theme.paddingXS}px ${theme.padding}px`, - gap: theme.marginSM, - "& .ant-typography": { - fontSize: theme.fontSizeHeading5, - lineHeight: theme.lineHeightHeading5, - fontWeight: theme.fontWeightMedium, - }, - }, - filterContainer: { - display: "flex", - gap: theme.marginXS, - flexDirection: "column", - padding: theme.paddingXS, - }, -})) diff --git a/web/oss/src/components/Filters/helpers/utils.ts b/web/oss/src/components/Filters/helpers/utils.ts deleted file mode 100644 index 55b2f110d9..0000000000 --- a/web/oss/src/components/Filters/helpers/utils.ts +++ /dev/null @@ -1,205 +0,0 @@ -import {TreeSelectProps} from "antd" -import { - CustomValueType, - FilterGroup, - FilterLeaf, - FilterMenuNode, - RowValidation, - SelectOption, -} from "../types" -import { - getOperator, - valueShapeFor, -} from "@/oss/components/pages/observability/assets/filters/operatorRegistry" -import {FilterItem} from "../types" -import {Filter, FilterConditions} from "@/oss/lib/Types" -import {FieldConfig} from "../../pages/observability/assets/filters/fieldAdapter" -import {normalizeFilter, toUIValue} from "../../pages/observability/assets/filters/valueCodec" - -export const CUSTOM_FIELD_VALUE = "__custom__" - -export const createEmptyFilter = (): FilterItem => ({ - field: "", - key: "", - operator: "", - value: "", - isPermanent: false, - selectedField: undefined, - fieldType: undefined, - isCustomField: false, - baseField: undefined, - selectedLabel: undefined, -}) - -export const toStringValue = (value: SelectOption["value"]) => - typeof value === "string" || typeof value === "number" ? String(value) : undefined - -export const collectOptionValues = ( - options: SelectOption[] | undefined, - acc: Set = new Set(), -): Set => { - if (!options) return acc - options.forEach((option) => { - const rawValue = option.value ?? option.label - const stringified = toStringValue(rawValue) - if (stringified && (option.value !== undefined || option.selectable)) { - acc.add(stringified) - } - if (Array.isArray(option.children) && option.children.length) { - collectOptionValues(option.children as SelectOption[], acc) - } - }) - return acc -} - -export const valueToPathLabel = (value: string | number): string => { - const stringValue = String(value) - return stringValue.startsWith("attributes.") - ? stringValue.slice("attributes.".length) - : stringValue -} - -export const mapToTreeData = ( - options: SelectOption[] | undefined, - searchTerm?: string, -): NonNullable => - (options ?? []).map((option) => { - const children = - option.children && option.children.length > 0 - ? mapToTreeData(option.children as SelectOption[], searchTerm) - : undefined - const rawValue = option.value ?? option.label - const explicitPathLabel = (option as any).pathLabel - const pathLabel = - typeof explicitPathLabel === "string" - ? explicitPathLabel - : typeof rawValue === "string" || typeof rawValue === "number" - ? valueToPathLabel(rawValue) - : option.label - const normalizedValue = - typeof rawValue === "string" || typeof rawValue === "number" ? rawValue : option.label - return { - title: option.label, - value: normalizedValue, - key: String(normalizedValue), - selectable: option.selectable ?? option.value !== undefined, - children, - pathLabel, - } - }) - -export const buildCustomTreeNode = (value: string, pathLabel: string) => ({ - title: pathLabel, - value, - key: `custom:${value}`, - selectable: true, - pathLabel, -}) - -export const collectTreeKeys = ( - nodes: NonNullable, - acc: string[] = [], -): string[] => { - nodes.forEach((node) => { - if (node.key !== undefined) { - acc.push(String(node.key)) - } - if (Array.isArray(node.children) && node.children.length) { - collectTreeKeys(node.children as NonNullable, acc) - } - }) - return acc -} - -export const noopTreeExpand: TreeSelectProps["onTreeExpand"] = () => {} - -export const normalizeAttributeSearch = (value: string | undefined) => { - const trimmed = value?.trim() - if (!trimmed) return undefined - if (trimmed.startsWith("attributes.")) { - return {value: trimmed, pathLabel: valueToPathLabel(trimmed)} - } - if (trimmed.startsWith("ag.")) { - return {value: `attributes.${trimmed}`, pathLabel: trimmed} - } - return {value: trimmed, pathLabel: trimmed} -} - -export const isNumberLike = (value: unknown): boolean => { - if (typeof value === "number") return Number.isFinite(value) - if (typeof value === "string") { - const trimmed = value.trim() - if (!trimmed) return false - return !Number.isNaN(Number(trimmed)) - } - return false -} - -export const isBooleanLike = (value: unknown): boolean => { - if (typeof value === "boolean") return true - if (typeof value === "string") { - const normalized = value.trim().toLowerCase() - return normalized === "true" || normalized === "false" - } - return false -} - -export const getOptionKey = (leaf: FilterLeaf) => leaf.optionKey ?? leaf.value - -export const findFirstLeafValue = (nodes: FilterMenuNode[]): string | undefined => { - for (const child of nodes) { - if (child.kind === "leaf") return getOptionKey(child as FilterLeaf) - const nested = findFirstLeafValue((child as FilterGroup).children) - if (nested) return nested - } - return undefined -} -export const hasLeafWithValue = (nodes: FilterMenuNode[], v: string): boolean => - nodes.some((n) => - n.kind === "leaf" - ? getOptionKey(n as FilterLeaf) === v - : hasLeafWithValue((n as FilterGroup).children, v), - ) -export const getGroupDefaultValue = (group: FilterGroup): string | undefined => - group.defaultValue && hasLeafWithValue(group.children, group.defaultValue) - ? group.defaultValue - : findFirstLeafValue(group.children) - -export const customOperatorIdsForType = (t: CustomValueType): FilterConditions[] => - t === "number" - ? ["eq", "neq", "gt", "lt", "gte", "lte"] - : t === "boolean" - ? ["is", "is_not"] - : ["is", "is_not", "contains", "startswith", "endswith", "in", "not_in"] - -export const operatorOptionsFromIds = (ids: FilterConditions[]) => - ids.map((id) => { - const op = getOperator(id as any)! - if (!op) return {value: id, label: id} - return {value: op.id, label: op.label} - }) - -export const effectiveFieldForRow = ( - field: FieldConfig | undefined, - row: FilterItem, -): FieldConfig | undefined => { - if (!field) return undefined - if (field.optionKey !== "custom") return field - const t = row.customValueType ?? "string" - return { - ...field, - type: t === "number" ? "number" : "string", - operatorIds: customOperatorIdsForType(t), - operatorOptions: operatorOptionsFromIds(customOperatorIdsForType(t)), - valueInput: - t === "boolean" - ? { - kind: "select", - options: [ - {label: "true", value: "true"}, - {label: "false", value: "false"}, - ], - } - : field.valueInput, - } -} diff --git a/web/oss/src/components/Filters/types.d.ts b/web/oss/src/components/Filters/types.d.ts deleted file mode 100644 index eca0173cf6..0000000000 --- a/web/oss/src/components/Filters/types.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type {ComponentType} from "react" - -import type {IconProps} from "@phosphor-icons/react" - -export interface Props { - filterData?: Filter[] - columns: FilterMenuNode[] - onApplyFilter: (filters: Filter[]) => void - onClearFilter: (filters: Filter[]) => void - buttonProps?: ButtonProps -} - -export type CustomValueType = "string" | "number" | "boolean" - -export type FilterItem = Filter & { - selectedField?: string - fieldType?: "string" | "number" | "exists" - isCustomField?: boolean - baseField?: string - selectedLabel?: string - customValueType?: CustomValueType -} - -export type RowValidation = { - isValid: boolean - valueInvalid?: boolean -} - -export type FieldMenuItem = Required["items"][number] - -export interface ColumnOption { - value: string - label: string - type?: string - icon?: ComponentType - children?: ColumnOption[] -} - -export interface ColumnGroup { - field: string - label: string - options: ColumnOption[] -} - -export type IconType = ComponentType<{size?: number}> - -type InputKind = "text" | "select" | "none" - -export type SelectOption = { - label: string - value: string | number - selectable?: boolean - children?: SelectOption[] - pathLabel?: string -} - -type InputConfig = - | {kind: "text"; placeholder?: string} - | { - kind: "select" - options?: SelectOption[] - placeholder?: string - usesAttributeKeyTree?: boolean - treePath?: string - } - | {kind: "none"; display?: string} - -export type FilterLeaf = { - kind: "leaf" - field: string - value: string - label: string - type: "string" | "number" | "exists" - icon?: IconType - operatorOptions?: Array<{value: any; label: string}> - defaultValue?: Filter["value"] - keyInput?: InputConfig - valueInput?: InputConfig - disableValueInput?: boolean - valueDisplayText?: string - displayLabel?: string - optionKey?: string - queryKey?: string - referenceCategory?: string - referenceProperty?: string -} - -export interface FilterGroup { - kind: "group" - label: string - children: Array - icon?: IconType - defaultValue?: string - titleClickDisplayLabel?: string - leafDisplayLabel?: string -} -export type FilterMenuNode = FilterLeaf | FilterGroup diff --git a/web/oss/src/components/GenericDrawer/index.tsx b/web/oss/src/components/GenericDrawer/index.tsx index 4bb5f0705a..7de8c31405 100644 --- a/web/oss/src/components/GenericDrawer/index.tsx +++ b/web/oss/src/components/GenericDrawer/index.tsx @@ -7,19 +7,14 @@ import EnhancedDrawer from "../EnhancedUIs/Drawer" import {GenericDrawerProps} from "./types" -const GenericDrawer = ({ - sideContentDefaultSize = 320, - mainContentDefaultSize = 640, - extraContentDefaultSize = 320, - ...props -}: GenericDrawerProps) => { +const GenericDrawer = ({...props}: GenericDrawerProps) => { const initialWidth = props.initialWidth || 1200 const [drawerWidth, setDrawerWidth] = useState(initialWidth) return ( @@ -56,15 +51,13 @@ const GenericDrawer = ({ > {props.sideContent && ( - + {props.sideContent} )} - - {props.mainContent} - + {props.mainContent} {props.extraContent && ( - + {props.extraContent} )} diff --git a/web/oss/src/components/GenericDrawer/types.d.ts b/web/oss/src/components/GenericDrawer/types.d.ts index 0714149ace..39450f4359 100644 --- a/web/oss/src/components/GenericDrawer/types.d.ts +++ b/web/oss/src/components/GenericDrawer/types.d.ts @@ -10,7 +10,4 @@ export interface GenericDrawerProps extends DrawerProps { sideContent?: ReactNode initialWidth?: number externalKey?: string - sideContentDefaultSize?: number - mainContentDefaultSize?: number - extraContentDefaultSize?: number } diff --git a/web/oss/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx b/web/oss/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx index 4487a67cf7..1c1f00e69a 100644 --- a/web/oss/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx +++ b/web/oss/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx @@ -1,28 +1,26 @@ // @ts-nocheck import {useEffect, useMemo, useState} from "react" -import VariantDetailsWithStatus from "@agenta/oss/src/components/VariantDetailsWithStatus" import {CaretDown, Play} from "@phosphor-icons/react" import {Button, Col, Dropdown, MenuProps, Modal, Row, Spin, message} from "antd" -import {getDefaultStore} from "jotai" import isEqual from "lodash/isEqual" import dynamic from "next/dynamic" import {useRouter} from "next/router" import EvaluationErrorModal from "@/oss/components/Evaluations/EvaluationErrorModal" import {useAppTheme} from "@/oss/components/Layout/ThemeContextProvider" -import useURL from "@/oss/hooks/useURL" +import {useAppsData} from "@/oss/contexts/app.context" import {PERMISSION_ERR_MSG} from "@/oss/lib/api/assets/axiosConfig" import {EvaluationType} from "@/oss/lib/enums" import {getErrorMessage} from "@/oss/lib/helpers/errorHandler" import {isDemo} from "@/oss/lib/helpers/utils" import {getAllVariantParameters, groupVariantsByParent} from "@/oss/lib/helpers/variantHelper" -import useStatelessVariants from "@/oss/lib/hooks/useStatelessVariants" -import type {GenericObject, Parameter, StyleProps, Variant} from "@/oss/lib/Types" +import {useVariants} from "@/oss/lib/hooks/useVariants" +import type {GenericObject, Parameter, Variant, StyleProps} from "@/oss/lib/Types" import {createNewEvaluation} from "@/oss/services/human-evaluations/api" -// import {currentAppAtom} from "@/oss/state/app" -import {promptVariablesAtomFamily} from "@/oss/state/newPlayground/core/prompts" -import {useTestsetsData} from "@/oss/state/testset" +import {useLoadTestsetsList} from "@/oss/services/testsets/api" + +import VariantDetailsWithStatus from "../VariantDetailsWithStatus" import {useStyles} from "./assets/styles" import type {HumanEvaluationModalProps} from "./types" @@ -32,23 +30,21 @@ const ShareEvaluationModal = dynamic( {ssr: false}, ) -const store = getDefaultStore() - const HumanEvaluationModal = ({ isEvalModalOpen, setIsEvalModalOpen, evaluationType, }: HumanEvaluationModalProps) => { const router = useRouter() - const {appURL} = useURL() const {appTheme} = useAppTheme() + const {currentApp} = useAppsData() const [isError, setIsError] = useState(false) const classes = useStyles({themeMode: appTheme} as StyleProps) - const {projectURL} = useURL() + const [selectedTestset, setSelectedTestset] = useState<{ _id?: string name: string - }>({name: "Select a Testset"}) + }>({name: "Select a Test set"}) const [testsetsList, setTestsetsList] = useState([]) const [selectedVariants, setSelectedVariants] = useState( @@ -59,7 +55,7 @@ const HumanEvaluationModal = ({ const appId = router.query.app_id?.toString() || "" - const {testsets, isError: isTestsetsLoadingError} = useTestsetsData() + const {testsets, isTestsetsLoadingError} = useLoadTestsetsList() const [variantsInputs, setVariantsInputs] = useState>({}) @@ -67,38 +63,48 @@ const HumanEvaluationModal = ({ const [shareModalOpen, setShareModalOpen] = useState(false) - const { - variants: data, - isLoading: areAppVariantsLoading, - specMap, - uriMap, - } = useStatelessVariants() + const {data, isLoading: areAppVariantsLoading} = useVariants(currentApp)({ + appId: currentApp?.app_id, + }) - const variants = useMemo(() => groupVariantsByParent(data || [], true), [data]) + const variants = useMemo(() => groupVariantsByParent(data?.variants || [], true), [data]) useEffect(() => { if (variants.length > 0) { const fetchAndSetSchema = async () => { try { + const isNewVariant = true let results: { variantName: string inputs: string[] }[] - // Prefer deriving inputs from OpenAPI schema exposed by useStatelessVariants - results = variants.map((_variant) => { - const variant = _variant.revisions.sort( - (a, b) => b.updatedAtTimestamp - a.updatedAtTimestamp, - )[0] - const vId = variant.variantId || variant.id - const inputs = store.get(promptVariablesAtomFamily(vId)) - return { - variantName: variant.variantName, - inputs, - } - }) - - // Fallback: if some variants have no inputs from schema, try server-side parameters API - if (results.some((r) => (r.inputs || []).length === 0)) { + + const isCustom = variants.some((v) => v.isCustom) + + if (isCustom) { + results = variants.map((_variant) => { + const variant = _variant.revisions.sort( + (a, b) => b.updatedAtTimestamp - a.updatedAtTimestamp, + )[0] + return { + variantName: variant.variantName, + inputs: (variant.inputParams || []).map( + (ip) => ip.name || ip.title, + ), + } + }) + } else if (isNewVariant) { + results = variants.map((_variant) => { + const variant = _variant.revisions.sort( + (a, b) => b.updatedAtTimestamp - a.updatedAtTimestamp, + )[0] + return { + variantName: variant.variantName, + inputs: (variant.inputParams || []).map((input) => input.name), + } + }) + } else { + // Map the variants to an array of promises const promises = variants.map((variant) => getAllVariantParameters(appId, variant).then((data) => ({ variantName: variant.variantName, @@ -107,18 +113,9 @@ const HumanEvaluationModal = ({ [], })), ) - const fallback = await Promise.all(promises) - // Merge fallback only where empty - const map = Object.fromEntries( - fallback.map((f) => [f.variantName, f.inputs]), - ) as Record - results = results.map((r) => ({ - variantName: r.variantName, - inputs: - r.inputs && r.inputs.length > 0 - ? r.inputs - : map[r.variantName] || [], - })) + + // Wait for all promises to complete and collect results + results = await Promise.all(promises) } // Reduce the results into the desired newVariantsInputs object structure @@ -161,7 +158,7 @@ const HumanEvaluationModal = ({ return { label: ( <> -
{testset.name}
+
{testset.name}
), key: `${testset.name}-${testset._id}`, @@ -214,10 +211,15 @@ const HumanEvaluationModal = ({ const label = variant.variantName if (!selectedVariantsNames.includes(label)) { + const isLatest = variant.revisions.some((revision) => revision.isLatestRevision) + variant.isLatestRevision = isLatest filteredVariants.push({ label: ( <> -
+
{ const selectedVariant = selectedVariants[0] // 1. We check all data is provided - if (selectedTestset === undefined || selectedTestset.name === "Select a Testset") { + if (selectedTestset === undefined || selectedTestset.name === "Select a Test set") { message.error("Please select a Testset") return } else if (selectedVariant?.variantName === "Select a variant") { @@ -268,15 +270,11 @@ const HumanEvaluationModal = ({ return } - const inputs = store.get( - promptVariablesAtomFamily(selectedVariant.variantId || selectedVariant.id), - ) - // 2. We create a new app evaluation const evaluationTableId = await createNewEvaluation({ variant_ids: selectedVariants.map((variant) => variant.variantId || variant.id), appId, - inputs, + inputs: variantsInputs[selectedVariant.variantName], evaluationType: EvaluationType[evaluationType as keyof typeof EvaluationType], evaluationTypeSettings: {}, llmAppPromptTemplate: "", @@ -286,8 +284,8 @@ const HumanEvaluationModal = ({ if (err.message !== PERMISSION_ERR_MSG) { setError({ message: getErrorMessage(err), - btnText: "Go to Testsets", - endpoint: `${projectURL}/testsets`, + btnText: "Go to Test sets", + endpoint: `/testsets`, }) } }) @@ -300,9 +298,9 @@ const HumanEvaluationModal = ({ // setVariants(selectedVariants) if (evaluationType === EvaluationType.human_a_b_testing) { - router.push(`${appURL}/evaluations/human_a_b_testing/${evaluationTableId}`) + router.push(`/apps/${appId}/evaluations/human_a_b_testing/${evaluationTableId}`) } else if (evaluationType === EvaluationType.single_model_test) { - router.push(`${appURL}/evaluations/single_model_test/${evaluationTableId}`) + router.push(`/apps/${appId}/evaluations/single_model_test/${evaluationTableId}`) } } @@ -313,7 +311,7 @@ const HumanEvaluationModal = ({ onCancel={() => { setIsEvalModalOpen(false) - setSelectedTestset({name: "Select a Testset"}) + setSelectedTestset({name: "Select a Test set"}) setSelectedVariants(new Array(1).fill({variantName: "Select a variant"})) }} title="New Evaluation" @@ -327,7 +325,10 @@ const HumanEvaluationModal = ({

Which testset you want to use?

- @@ -460,6 +451,7 @@ const AbTestingEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) icon={} className={classes.button} onClick={() => setIsEvalModalOpen(true)} + data-cy="new-human-eval-modal-button" > Start new evaluation @@ -503,14 +495,15 @@ const AbTestingEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) className="ph-no-capture" columns={columns} dataSource={evaluationsList} - loading={fetchingEvaluations} scroll={{x: true}} bordered pagination={false} onRow={(record) => ({ style: {cursor: "pointer"}, onClick: () => - router.push(`${appURL}/evaluations/human_a_b_testing/${record.key}`), + router.push( + `/apps/${appId}/evaluations/human_a_b_testing/${record.key}`, + ), })} /> diff --git a/web/oss/src/components/HumanEvaluations/SingleModelEvaluation.tsx b/web/oss/src/components/HumanEvaluations/SingleModelEvaluation.tsx index b43f394e99..8278227635 100644 --- a/web/oss/src/components/HumanEvaluations/SingleModelEvaluation.tsx +++ b/web/oss/src/components/HumanEvaluations/SingleModelEvaluation.tsx @@ -1,178 +1,383 @@ -import {memo, useMemo, useCallback, useState, type Key} from "react" +import {useEffect, useState, type Key} from "react" +import {MoreOutlined, PlusOutlined} from "@ant-design/icons" +import {Database, Export, GearSix, Note, Plus, Rocket, Trash} from "@phosphor-icons/react" +import {Button, Dropdown, message, Space, Spin, Statistic, Table, Typography} from "antd" import {ColumnsType} from "antd/es/table" -import clsx from "clsx" import {useRouter} from "next/router" +import {createUseStyles} from "react-jss" -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" -import {useAppId} from "@/oss/hooks/useAppId" -import useURL from "@/oss/hooks/useURL" +import DeleteEvaluationModal from "@/oss/components/DeleteEvaluationModal/DeleteEvaluationModal" +import HumanEvaluationModal from "@/oss/components/HumanEvaluationModal/HumanEvaluationModal" +import {getAppValues} from "@/oss/contexts/app.context" import {EvaluationType} from "@/oss/lib/enums" -import {buildRevisionsQueryParam} from "@/oss/lib/helpers/url" -import useEvaluations from "@/oss/lib/hooks/useEvaluations" -import useRunMetricsMap from "@/oss/lib/hooks/useRunMetricsMap" -import {useAppsData} from "@/oss/state/app" - +import {formatDate24} from "@/oss/lib/helpers/dateTimeHelper" +import {calculateAvgScore} from "@/oss/lib/helpers/evaluate" +import {convertToCsv, downloadCsv} from "@/oss/lib/helpers/fileManipulations" +import {variantNameWithRev} from "@/oss/lib/helpers/variantHelper" import { - buildAppScopedUrl, - buildEvaluationNavigationUrl, - extractEvaluationAppId, -} from "../pages/evaluations/utils" - -import SingleModelEvaluationHeader from "./assets/SingleModelEvaluationHeader" -import {useStyles} from "./assets/styles" -import {getColumns} from "./assets/utils" -import {EvaluationRow} from "./types" - -interface SingleModelEvaluationProps { - viewType: "evaluation" | "overview" - scope?: "app" | "project" -} + fromEvaluationResponseToEvaluation, + singleModelTestEvaluationTransformer, +} from "@/oss/lib/transformers" +import {Evaluation, JSSTheme, SingleModelEvaluationListTableDataType} from "@/oss/lib/Types" +import { + deleteEvaluations, + fetchAllLoadEvaluations, + fetchEvaluationResults, +} from "@/oss/services/human-evaluations/api" + +import VariantDetailsWithStatus from "../VariantDetailsWithStatus" + +const {Title} = Typography + +const useStyles = createUseStyles((theme: JSSTheme) => ({ + container: { + display: "flex", + flexDirection: "column", + gap: theme.paddingXS, + "& > div h1.ant-typography": { + fontSize: theme.fontSize, + }, + }, + stat: { + lineHeight: theme.lineHeight, + "& .ant-statistic-content-value": { + fontSize: theme.fontSize, + color: theme.colorPrimary, + }, + "& .ant-statistic-content-suffix": { + fontSize: theme.fontSize, + color: theme.colorPrimary, + }, + }, + button: { + display: "flex", + alignItems: "center", + }, +})) -const SingleModelEvaluation = ({viewType, scope = "app"}: SingleModelEvaluationProps) => { +const SingleModelEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) => { const classes = useStyles() const router = useRouter() - const {appURL, projectURL, baseAppURL} = useURL() - const routeAppId = useAppId() - const activeAppId = scope === "app" ? routeAppId || undefined : undefined - const {apps: availableApps = []} = useAppsData() + const appId = router.query.app_id as string - const [selectedEvalRecord, setSelectedEvalRecord] = useState() + const [evaluationsList, setEvaluationsList] = useState< + SingleModelEvaluationListTableDataType[] + >([]) + const [fetchingEvaluations, setFetchingEvaluations] = useState(false) + const [isEvalModalOpen, setIsEvalModalOpen] = useState(false) + const [selectedEvalRecord, setSelectedEvalRecord] = + useState() const [isDeleteEvalModalOpen, setIsDeleteEvalModalOpen] = useState(false) + const [isDeleteEvalMultipleModalOpen, setIsDeleteEvalMultipleModalOpen] = useState(false) const [selectedRowKeys, setSelectedRowKeys] = useState([]) - const {mergedEvaluations, isLoadingPreview, isLoadingLegacy} = useEvaluations({ - withPreview: true, - types: [EvaluationType.single_model_test], - evalType: "human", - appId: activeAppId, - }) + useEffect(() => { + if (!appId) return - const runIds = useMemo( - () => mergedEvaluations.map((e) => ("id" in e ? e.id : e.key)), - [mergedEvaluations], - ) - const evaluatorSlugs = useMemo(() => { - const evaSlugs = new Set() - mergedEvaluations.forEach((e) => { - e?.data.steps?.forEach((step) => { - if (step.type === "annotation") { - evaSlugs.add(step.key) - } - }) - }) - return evaSlugs - }, [mergedEvaluations]) - - const {data: runMetricsMap} = useRunMetricsMap(runIds, evaluatorSlugs) - - const knownAppIds = useMemo(() => { - return new Set( - (availableApps as {app_id?: string}[]) - .map((app) => app?.app_id) - .filter(Boolean) as string[], - ) - }, [availableApps]) - - const resolveAppId = useCallback( - (record: EvaluationRow): string | undefined => { - const candidate = extractEvaluationAppId(record) || activeAppId - if (!candidate) return undefined - if (scope === "project" && !knownAppIds.has(candidate)) return undefined - return candidate - }, - [activeAppId, knownAppIds, scope], - ) + const fetchEvaluations = async () => { + try { + setFetchingEvaluations(true) + const evals: Evaluation[] = (await fetchAllLoadEvaluations(appId)).map( + fromEvaluationResponseToEvaluation, + ) + const results = await Promise.all(evals.map((e) => fetchEvaluationResults(e.id))) + const newEvals = results.map((result, ix) => { + const item = evals[ix] + if ([EvaluationType.single_model_test].includes(item.evaluationType)) { + return singleModelTestEvaluationTransformer({item, result}) + } + }) - const isRecordNavigable = useCallback( - (record: EvaluationRow): boolean => { - const evaluationId = "id" in record ? record.id : record.key - const recordAppId = resolveAppId(record) - return Boolean(evaluationId && recordAppId) + const newEvalResults = newEvals + .filter((evaluation) => evaluation !== undefined) + .filter( + (item: any) => + item.resultsData !== undefined || + !(Object.keys(item.scoresData || {}).length === 0) || + item.avgScore !== undefined, + ) + .sort( + (a, b) => + new Date(b?.createdAt ?? 0).getTime() - + new Date(a?.createdAt ?? 0).getTime(), + ) + + setEvaluationsList( + viewType === "overview" ? newEvalResults.slice(0, 5) : (newEvalResults as any), + ) + } catch (error) { + console.error(error) + } finally { + setFetchingEvaluations(false) + } + } + + fetchEvaluations() + }, [appId]) + + const rowSelection = { + onChange: (selectedRowKeys: Key[]) => { + setSelectedRowKeys(selectedRowKeys) }, - [resolveAppId], - ) + } + + const handleDeleteMultipleEvaluations = async () => { + const evaluationsIds = selectedRowKeys.map((key) => key.toString()) + try { + setFetchingEvaluations(true) + await deleteEvaluations(evaluationsIds) + setEvaluationsList((prevEvaluationsList) => + prevEvaluationsList.filter( + (evaluation) => !evaluationsIds.includes(evaluation.key), + ), + ) + setSelectedRowKeys([]) + message.success("Evaluations Deleted") + } catch (error) { + console.error(error) + } finally { + setFetchingEvaluations(false) + } + } - const rowSelection = useMemo(() => { - return { - onChange: (selectedRowKeys: Key[]) => { - setSelectedRowKeys(selectedRowKeys) + const handleNavigation = (variantName: string, revisionNum: string) => { + router.push(`/apps/${appId}/playground?variant=${variantName}&revision=${revisionNum}`) + } + + const handleDeleteEvaluation = async (record: SingleModelEvaluationListTableDataType) => { + try { + setFetchingEvaluations(true) + await deleteEvaluations([record.key]) + setEvaluationsList((prevEvaluationsList) => + prevEvaluationsList.filter((evaluation) => ![record.key].includes(evaluation.key)), + ) + message.success("Evaluation Deleted") + } catch (error) { + console.error(error) + } finally { + setFetchingEvaluations(false) + } + } + + const columns: ColumnsType = [ + { + title: "Variant", + dataIndex: "variants", + key: "variants", + onHeaderCell: () => ({ + style: {minWidth: 160}, + }), + render: (value, record: SingleModelEvaluationListTableDataType) => { + return ( + + ) }, - getCheckboxProps: (record: EvaluationRow) => ({ - disabled: !isRecordNavigable(record), + }, + { + title: "Test set", + dataIndex: "testsetName", + key: "testsetName", + onHeaderCell: () => ({ + style: {minWidth: 160}, }), - } - }, [isRecordNavigable]) - - const handleNavigation = useCallback( - ({revisionId, appId: recordAppId}: {revisionId: string; appId?: string}) => { - const targetAppId = recordAppId || activeAppId - if (!targetAppId) return - - router.push({ - pathname: buildAppScopedUrl(baseAppURL, targetAppId, "/playground"), - query: { - revisions: buildRevisionsQueryParam([revisionId]), - }, - }) + render: (_, record) => { + return {record.testset.name} + }, }, - [router, baseAppURL, activeAppId], - ) + { + title: "Average score", + dataIndex: "averageScore", + key: "averageScore", + onHeaderCell: () => ({ + style: {minWidth: 160}, + }), + render: (_, record) => { + const score = calculateAvgScore(record) + return ( + + + + ) + }, + }, + { + title: "Created on", + dataIndex: "createdAt", + key: "createdAt", + onHeaderCell: () => ({ + style: {minWidth: 160}, + }), + }, + { + title: , + key: "key", + width: 56, + fixed: "right", + align: "center", + render: (_, record) => { + return ( + , + onClick: (e) => { + e.domEvent.stopPropagation() + router.push( + `/apps/${appId}/evaluations/single_model_test/${record.key}`, + ) + }, + }, + { + key: "variant", + label: "View variant", + icon: , + onClick: (e) => { + e.domEvent.stopPropagation() + handleNavigation( + record.variants[0].variantName, + record.revisions[0], + ) + }, + }, + { + key: "view_testset", + label: "View test set", + icon: , + onClick: (e) => { + e.domEvent.stopPropagation() + router.push(`/testsets/${record.testset._id}`) + }, + }, + {type: "divider"}, + { + key: "delete_eval", + label: "Delete", + icon: , + danger: true, + onClick: (e) => { + e.domEvent.stopPropagation() + setSelectedEvalRecord(record) + setIsDeleteEvalModalOpen(true) + }, + }, + ], + }} + > + + + + +
+ ) : ( +
+ -
- + + + +
+ )} + + + { - return record.id || record.key - }} - className={clsx("ph-no-capture", "grow min-h-0", "eval-runs-table")} - showHorizontalScrollBar={true} + className="ph-no-capture" columns={columns} - dataSource={dataSource} - virtualized - loading={isLoadingPreview || isLoadingLegacy} - uniqueKey="human-annotation" - onRow={(record) => { - const evaluationId = "id" in record ? record.id : record.key - const recordAppId = resolveAppId(record) - const isNavigable = isRecordNavigable(record) + dataSource={evaluationsList} + scroll={{x: true}} + bordered + pagination={false} + onRow={(record) => ({ + style: {cursor: "pointer"}, + onClick: () => + router.push( + `/apps/${appId}/evaluations/single_model_test/${record.key}`, + ), + })} + /> + - return { - className: isNavigable ? undefined : "cursor-not-allowed opacity-60", - style: {cursor: isNavigable ? "pointer" : "not-allowed"}, - onClick: () => { - if (!isNavigable || !recordAppId || !evaluationId) return - - const pathname = buildEvaluationNavigationUrl({ - scope, - baseAppURL, - projectURL, - appId: recordAppId, - path: `/evaluations/single_model_test/${evaluationId}`, - }) - - if (scope === "project") { - router.push({ - pathname, - query: recordAppId ? {app_id: recordAppId} : undefined, - }) - } else { - router.push(pathname) - } - }, - } + + + {selectedEvalRecord && ( + setIsDeleteEvalModalOpen(false)} + onOk={async () => { + await handleDeleteEvaluation(selectedEvalRecord) + setIsDeleteEvalModalOpen(false) + }} + evaluationType={"single model evaluation"} + /> + )} + {isDeleteEvalMultipleModalOpen && ( + setIsDeleteEvalMultipleModalOpen(false)} + onOk={async () => { + await handleDeleteMultipleEvaluations() + setIsDeleteEvalMultipleModalOpen(false) }} + evaluationType={"single model evaluation"} /> - + )} ) } -export default memo(SingleModelEvaluation) +export default SingleModelEvaluation diff --git a/web/oss/src/components/HumanEvaluations/assets/EvaluationStatusCell.tsx b/web/oss/src/components/HumanEvaluations/assets/EvaluationStatusCell.tsx deleted file mode 100644 index 876836ef43..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/EvaluationStatusCell.tsx +++ /dev/null @@ -1,189 +0,0 @@ -import {memo, useEffect, useMemo, useRef} from "react" - -import {InfoCircleOutlined} from "@ant-design/icons" -import {GlobalToken, Tag, Tooltip, theme} from "antd" -import {useAtom, useAtomValue} from "jotai" -import {mutate} from "swr" - -import {EvaluationType} from "@/oss/lib/enums" -import useEvaluationRunScenarios, { - getEvaluationRunScenariosKey, -} from "@/oss/lib/hooks/useEvaluationRunScenarios" -import useEvaluations from "@/oss/lib/hooks/useEvaluations" -import {resourceStatusQueryFamily} from "@/oss/lib/hooks/usePreviewRunningEvaluations" -import {tempEvaluationAtom} from "@/oss/lib/hooks/usePreviewRunningEvaluations/states/runningEvalAtom" -import {EvaluationStatus} from "@/oss/lib/Types" - -import {statusMapper} from "../../pages/evaluations/cellRenderers/cellRenderers" - -import {extractEvaluationStatus} from "./utils" - -const EvaluationStatusCell = ({ - runId, - status, - evalType, - preferProvidedStatus = false, - statusOverride, -}: { - runId: string - status?: EvaluationStatus - evalType?: "auto" | "human" | "custom" - preferProvidedStatus?: boolean - statusOverride?: ( - status: EvaluationStatus, - token: GlobalToken, - baseStatus?: { - label: string - color: string - tooltip?: string - }, - ) => { - label: string - color: string - tooltip?: string - } -}) => { - const swrData = useEvaluationRunScenarios(runId, undefined, { - syncAtom: false, - revalidateOnMount: true, - }) - const {token} = theme.useToken() - const {refetch} = useEvaluations({ - withPreview: true, - types: - evalType === "auto" || evalType === "custom" - ? [EvaluationType.automatic, EvaluationType.auto_exact_match] - : [EvaluationType.human, EvaluationType.single_model_test], - evalType, - }) - const runningEvaluations = useAtomValue( - resourceStatusQueryFamily(evalType === "auto" || evalType === "custom" ? runId : ""), - ) - const [tempEvaluation, setTempEvaluation] = useAtom(tempEvaluationAtom) - const handledCompletionRef = useRef>(new Set()) - const lastMutatedStatusRef = useRef<{runId?: string; status?: EvaluationStatus | null} | null>( - null, - ) - - // Force refetch once when component mounts (useful when returning from details page) - useEffect(() => { - if (!runId) return - - const key = getEvaluationRunScenariosKey(runId) - if (!key) return - - const status = runningEvaluations.data?.run?.status ?? null - const hasChanged = - !lastMutatedStatusRef.current || - lastMutatedStatusRef.current.runId !== runId || - lastMutatedStatusRef.current.status !== status - - if (!hasChanged) return - - lastMutatedStatusRef.current = {runId, status} - - mutate(`${key}-false`) - }, [runId, runningEvaluations.data?.run?.status]) - - // refresh the eval after a completed run - useEffect(() => { - if (evalType !== "auto" && evalType !== "custom") return - - const runIdToCheck = runningEvaluations.data?.run?.id - const runStatus = runningEvaluations.data?.run?.status - - if (!runIdToCheck || !runStatus) return - - const isTrackedTempEvaluation = tempEvaluation.some( - (evaluation) => evaluation.id === runIdToCheck, - ) - - if (!isTrackedTempEvaluation) { - handledCompletionRef.current.delete(runIdToCheck) - return - } - - const isTerminalStatus = ![ - EvaluationStatus.PENDING, - EvaluationStatus.RUNNING, - EvaluationStatus.CANCELLED, - EvaluationStatus.INITIALIZED, - ].includes(runStatus) - - if (!isTerminalStatus) { - handledCompletionRef.current.delete(runIdToCheck) - return - } - - const hasHandledCompletion = handledCompletionRef.current.has(runIdToCheck) - - if (hasHandledCompletion) return - - handledCompletionRef.current.add(runIdToCheck) - - setTempEvaluation((prev) => prev.filter((evaluation) => evaluation.id !== runIdToCheck)) - refetch() - }, [ - evalType, - refetch, - runningEvaluations.data?.run?.id, - runningEvaluations.data?.run?.status, - setTempEvaluation, - tempEvaluation, - ]) - - const {runStatus, scenarios} = useMemo(() => { - return extractEvaluationStatus(swrData.data?.scenarios || [], status, evalType) - }, [status, token, swrData.data?.scenarios, evalType]) - - const completedStatuses = [EvaluationStatus.SUCCESS] - const {completedCount, totalCount} = useMemo(() => { - return { - completedCount: scenarios.filter((s) => - completedStatuses.includes(s.status as EvaluationStatus), - ).length, - totalCount: scenarios.length, - } - }, [scenarios]) - - const _status = useMemo(() => { - if (preferProvidedStatus || (evalType !== "auto" && evalType !== "custom")) return runStatus - return runningEvaluations.data?.run?.status || runStatus - }, [preferProvidedStatus, evalType, runningEvaluations.data?.run?.status, runStatus]) - - const statusInfo = useMemo(() => { - const baseStatus = statusMapper(token)(_status as EvaluationStatus | "stopped" | "closed") - if (!statusOverride) return baseStatus - - const overrideStatus = statusOverride(_status as EvaluationStatus, token, baseStatus) - if (!overrideStatus) return baseStatus - - return { - ...baseStatus, - ...overrideStatus, - label: overrideStatus.label ?? baseStatus.label, - color: overrideStatus.color ?? baseStatus.color, - tooltip: !["Running", "Success"].includes(baseStatus.label) ? baseStatus.label : null, - } - }, [_status, statusOverride, token]) - - return ( -
- - {statusInfo.label} - - -
- {`${completedCount}`} - {` / `} - {`${totalCount}`} -
-
-
- ) -} - -export default memo(EvaluationStatusCell) diff --git a/web/oss/src/components/HumanEvaluations/assets/LegacyEvalResultCell.tsx b/web/oss/src/components/HumanEvaluations/assets/LegacyEvalResultCell.tsx deleted file mode 100644 index 3dda59ca5b..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/LegacyEvalResultCell.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import {memo} from "react" - -import {Tag, Typography, Space} from "antd" - -import {getTypedValue} from "@/oss/lib/helpers/evaluate" - -import EvaluationErrorPopover from "../../pages/evaluations/EvaluationErrorProps/EvaluationErrorPopover" - -export const LegacyEvalResultCell = memo(({matchingResults}: {matchingResults: any}) => { - return ( - - {matchingResults?.map((result, index) => - result?.result?.error ? ( - - ) : ( - {getTypedValue(result?.result)} - ), - )} - - ) -}) - -export const LegacyEvalResultCellTitle = memo(({evaluator}: {evaluator: any}) => { - return ( -
- {evaluator?.name} - - {evaluator?.evaluator?.name} - -
- ) -}) diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartAxis.tsx b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartAxis.tsx deleted file mode 100644 index b548672a5c..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartAxis.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import {FC} from "react" - -import {format3Sig} from "./utils" - -interface ChartAxisProps { - svgWidth: number - svgHeight: number - plotWidth: number - plotHeight: number - margin: {top: number; right: number; bottom: number; left: number} - xLabels: (string | number)[] - yTicks?: number[] // for numeric axes - yLabels?: (string | number)[] // for categorical axes - xScale: (idx: number) => number - yScale: (value: number) => number - yLabelScale?: (idx: number) => number // for categorical axes -} - -export const ChartAxis: FC = ({ - svgWidth, - svgHeight, - plotWidth, - plotHeight, - margin, - xLabels, - yTicks, - yLabels, - xScale, - yScale, - yLabelScale, -}) => ( - - {/* X Axis Line */} - - {/* X Axis Labels */} - {xLabels.map((label, idx) => ( - - {label} - - ))} - {/* Y Axis Line */} - - {/* Y Axis Labels */} - {yLabels && yLabelScale - ? yLabels.map((label, idx) => ( - - {label} - - )) - : yTicks?.map((tick) => ( - - {format3Sig(tick)} - - ))} - -) diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartFrame.tsx b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartFrame.tsx deleted file mode 100644 index 18bdb0fb4a..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ChartFrame.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import {type FC, type ReactNode, RefObject, useRef} from "react" - -import {useResizeObserver} from "usehooks-ts" - -export interface ChartFrameProps { - minWidth?: number - minHeight?: number - maxWidth?: number | string - maxHeight?: number | string - margin?: {top: number; right: number; bottom: number; left: number} - children: (frame: { - svgWidth: number - svgHeight: number - plotWidth: number - plotHeight: number - margin: {top: number; right: number; bottom: number; left: number} - }) => ReactNode -} - -const DEFAULT_MARGIN = {top: 8, right: 16, left: 40, bottom: 32} -const DEFAULT_MIN_WIDTH = 200 -const DEFAULT_MIN_HEIGHT = 120 - -const ChartFrame: FC = ({ - minWidth = DEFAULT_MIN_WIDTH, - minHeight = DEFAULT_MIN_HEIGHT, - maxWidth, - maxHeight, - margin = DEFAULT_MARGIN, - children, -}) => { - const containerRef = useRef(null) - const {width: chartWidth = 280, height: chartHeight = 120} = useResizeObserver({ - ref: containerRef as RefObject, - box: "border-box", - }) - const svgWidth = Math.max(chartWidth, minWidth) - const svgHeight = Math.max(chartHeight, minHeight) - const plotWidth = svgWidth - margin.left - margin.right - const plotHeight = svgHeight - margin.top - margin.bottom - - return ( -
- {children({ - svgWidth, - svgHeight, - plotWidth, - plotHeight, - margin, - })} -
- ) -} - -export default ChartFrame diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveFrequencyChart.tsx b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveFrequencyChart.tsx deleted file mode 100644 index bdc77ae83a..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveFrequencyChart.tsx +++ /dev/null @@ -1,463 +0,0 @@ -import {type FC, memo, useCallback, useState} from "react" - -import clsx from "clsx" - -import {ChartAxis} from "./ChartAxis" -import ChartFrame from "./ChartFrame" -import {getYTicks} from "./chartUtils" - -interface FrequencyDatum { - label: string | number - count: number -} - -interface ResponsiveFrequencyChartProps { - data: FrequencyDatum[] - highlightValues?: (string | number)[] - labelWidth?: number - direction?: "horizontal" | "vertical" - /** Optional: color for bars (also used for highlight when provided) */ - barColor?: string - /** Optional: disable gradient and use solid bars */ - disableGradient?: boolean - dynamicMargin?: Partial<{top: number; right: number; bottom: number; left: number}> -} - -// Resolve fills based on props (keep defaults when not provided) -const DEFAULTS = { - greenSolid: "#95DE64", - blueSolid: "#69B1FF", - graySolid: "#97A4B0", -} - -const CUSTOM_GRADIENT_ID = "barGradientCustom" - -/** - * ResponsiveFrequencyChart renders a vertical bar chart for categorical/frequency data. - * Bars to highlight are inferred automatically from highlightValues (if provided). - */ -const ResponsiveFrequencyChart: FC = memo( - ({ - data, - highlightValues = [], - labelWidth, - direction = "horizontal", - barColor, - disableGradient = false, - dynamicMargin: dynamicPropsMargin, - }) => { - const isVertical = direction === "vertical" - const xMax = Math.max(...data.map((d) => d.count), 1) - const yCount = data.length - const xTicks = getYTicks(xMax) - const yLabels = data.map((d) => d.label) - - // Tooltip state - const [hoveredBar, setHoveredBar] = useState(null) - const [mousePos, setMousePos] = useState<{x: number; y: number} | null>(null) - - // Dynamically calculate margins based on orientation - const defaultMargin = {top: 16, right: 16, bottom: 32, left: 40} - let dynamicMargin = defaultMargin - if (isVertical) { - const longestBottomLabel = yLabels.reduce( - (max: number, label) => Math.max(max, String(label).length), - 0, - ) - const bottomMargin = Math.max(32, Math.min(120, longestBottomLabel * 7 + 16)) - const longestCountLabel = xTicks.reduce( - (max: number, tick) => Math.max(max, String(tick).length), - 0, - ) - const leftMargin = Math.max(40, Math.min(120, longestCountLabel * 7 + 16)) - dynamicMargin = { - ...defaultMargin, - left: leftMargin, - bottom: bottomMargin, - ...dynamicPropsMargin, - } - } else { - const longestLabelLength = yLabels.reduce( - (max: number, label) => Math.max(max, String(label).length), - 0, - ) - const dynamicLeftMargin = Math.max(40, Math.min(120, longestLabelLength * 7 + 16)) - dynamicMargin = {...defaultMargin, left: dynamicLeftMargin, ...dynamicPropsMargin} - } - - // Calculate maxCount and maxCountOccurrences once - const countMap = data.map((d) => d.count) - const maxCount = Math.max(...countMap) - const maxCountOccurrences = countMap.filter((count) => count === maxCount).length - // Store maxCount for later use in rendering - const uniqueMaxCount = maxCountOccurrences === 1 ? maxCount : null - - // Compute highlighted bar indices from highlightValues - const computedHighlightBarIndices = - highlightValues.length > 0 - ? data - .map((d, i) => - highlightValues.some((hv) => String(hv) === String(d.label)) ? i : -1, - ) - .filter((i) => i !== -1) - : [] - - return ( - - {({svgWidth, svgHeight, plotWidth, plotHeight, margin}) => { - // Scales for both orientations - const yLabelScaleHorizontal = (idx: number) => - (idx + 0.5) * (plotHeight / yCount) - const barHeightHorizontal = plotHeight / yCount - 6 - const xScaleHorizontal = (count: number) => (count / xMax) * plotWidth - - const xLabelScaleVertical = (idx: number) => (idx + 0.5) * (plotWidth / yCount) - const barWidthVertical = plotWidth / yCount - 6 - const yScaleVertical = (value: number) => ((xMax - value) / xMax) * plotHeight - - const getFill = useCallback( - (isHighlighted: boolean, d: FrequencyDatum): string => { - // If user supplies barColor, it overrides category colors: - if (barColor) { - // highlighted also uses barColor (solid), mirroring prior component behavior - if (isHighlighted) return barColor - return disableGradient ? barColor : `url(#${CUSTOM_GRADIENT_ID})` - } - // Default behavior (no barColor override) - if (isHighlighted) return DEFAULTS.greenSolid - if (disableGradient) { - // Solid fallbacks - if (d.label === "true") return DEFAULTS.greenSolid - if (uniqueMaxCount !== null && d.count === uniqueMaxCount) - return DEFAULTS.blueSolid - return DEFAULTS.graySolid - } - // Gradient fallbacks - if (d.label === "true") return "url(#barGradientGreen)" - if (uniqueMaxCount !== null && d.count === uniqueMaxCount) - return "url(#barGradientBlue)" - return "url(#barGradientGray)" - }, - [barColor], - ) - - return ( - <> - - {/* Bar gradient defs */} - - {/* If a custom barColor is provided and gradient is enabled, use a single custom gradient */} - {!disableGradient && barColor && ( - - - - - )} - - {/* Otherwise keep the existing three gradients (when gradient is enabled) */} - {!disableGradient && !barColor && ( - <> - {/* Gradient for "true" state */} - - - - - - {/* Gradient for default/false state */} - - - - - - {/* Gradient for most-count (unique max) */} - - - - - - )} - - - {/* Grid and highlight lines */} - {isVertical ? ( - - {xTicks.map((tick) => ( - - ))} - {highlightValues.map((val, i) => { - const idx = data.findIndex( - (d) => - typeof d.label === "number" && d.label === val, - ) - if (idx === -1) return null - return ( - - ) - })} - - ) : ( - - {xTicks.map((tick) => ( - - ))} - {highlightValues.map((val, i) => { - const idx = data.findIndex( - (d) => - typeof d.label === "number" && d.label === val, - ) - if (idx === -1) return null - return ( - - ) - })} - - )} - - {/* Bars */} - - {data.map((d, idx) => { - const isHighlighted = - computedHighlightBarIndices.includes(idx) - const isMaxUnique = - uniqueMaxCount !== null && d.count === uniqueMaxCount - - if (isVertical) { - const barX = - margin.left + - xLabelScaleVertical(idx) - - barWidthVertical / 2 - const barHeight = plotHeight - yScaleVertical(d.count) - return ( - { - setHoveredBar(idx) - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseMove={(e) => { - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseLeave={() => { - setHoveredBar(null) - setMousePos(null) - }} - /> - ) - } - - return ( - { - setHoveredBar(idx) - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseMove={(e) => { - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseLeave={() => { - setHoveredBar(null) - setMousePos(null) - }} - /> - ) - })} - - - {/* Axes */} - {isVertical ? ( - xLabelScaleVertical(idx)} - yScale={yScaleVertical} - /> - ) : ( - xScaleHorizontal(xTicks[idx])} - yScale={() => 0} - /> - )} - - - {/* Tooltip rendered outside SVG, absolutely positioned */} - {hoveredBar !== null && data[hoveredBar] && mousePos && ( -
- {/* Caret */} -
-
- Label: - {String(data[hoveredBar].label)} -
-
- Count: - {data[hoveredBar].count} -
-
- )} - - ) - }} - - ) - }, -) - -export default ResponsiveFrequencyChart diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx deleted file mode 100644 index 55594d96d4..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx +++ /dev/null @@ -1,634 +0,0 @@ -import {FC, memo, useState} from "react" - -import type {ChartDatum} from "../types" - -import {ChartAxis} from "./ChartAxis" -import ChartFrame from "./ChartFrame" -import {format3Sig} from "./utils" - -interface ResponsiveMetricChartProps { - chartData: ChartDatum[] - extraDimensions: Record - highlightValue?: number - labelWidth?: number - direction?: "horizontal" | "vertical" - dynamicMargin?: Partial<{top: number; right: number; bottom: number; left: number}> - /** Optional: color for bars (also used for highlight). Default keeps current blue. */ - barColor?: string - /** Optional: when true, disables gradient and uses a solid color for bars. */ - disableGradient?: boolean -} - -const DEFAULT_PRIMARY = "#69B1FF" - -/** - * ResponsiveMetricChart is a functional component that renders a responsive histogram - * visualization using SVG. This chart displays data as bars with optional highlighted - * bins, reference lines, and tooltips for detailed information. The chart adapts to - * its container's size and provides scale functions for accurately positioning elements. - */ -/** - * ResponsiveMetricChart is a functional component that renders a responsive histogram - * visualization using SVG. This chart displays data as bars with optional highlighted - * bins, reference lines, and tooltips for detailed information. The chart adapts to - * its container's size and provides scale functions for accurately positioning elements. - * - * The highlighted bin is automatically inferred from highlightValue (if provided). - */ -const ResponsiveMetricChart: FC = memo( - ({ - chartData, - extraDimensions, - highlightValue, - labelWidth, - direction = "horizontal", - dynamicMargin: dynamicPropsMargin, - barColor, - disableGradient = false, - }) => { - const binSize = extraDimensions.binSize || 1 - const yMin = Math.min(...(chartData.map((d) => d.edge) as number[])) - const yMax = Math.max(...(chartData.map((d) => d.edge) as number[])) + binSize - const xMax = Math.max(...chartData.map((d) => d.value)) - - // Y axis: bin midpoints - const yTicks: number[] = chartData.map((d) => (d.edge ?? 0) + binSize / 2) - // X axis: value ticks - const xTicks: number[] = [] - const xTickCount = Math.min(4, xMax) - for (let i = 0; i <= xTickCount; i++) { - xTicks.push((i / xTickCount) * xMax) - } - - const clipPathId = `clip-histogram-${Math.random().toString(36).substr(2, 9)}` - // Tooltip state - const [hoveredBin, setHoveredBin] = useState(null) - const [mousePos, setMousePos] = useState<{x: number; y: number} | null>(null) - - // Compute highlighted bin index from highlightValue - let computedHighlightBinIndex: number | null = null - if (typeof highlightValue === "number" && chartData.length > 0) { - const roundTo = (n: number, digits: number) => { - const factor = Math.pow(10, digits) - return Math.round(n * factor) / factor - } - const DECIMALS = 6 - computedHighlightBinIndex = chartData.findIndex((d, i) => { - const binStart = d.edge ?? 0 - const binEnd = (d.edge ?? 0) + binSize - if (i === chartData.length - 1) { - // Last bin: inclusive of upper edge, round both values for robust comparison - const closeEnough = Math.abs(highlightValue - binEnd) < Math.pow(10, -DECIMALS) - return ( - roundTo(highlightValue, DECIMALS) >= roundTo(binStart, DECIMALS) && - (roundTo(highlightValue, DECIMALS) <= roundTo(binEnd, DECIMALS) || - closeEnough) - ) - } - // Other bins: upper edge exclusive, round for robust comparison - return ( - roundTo(highlightValue, DECIMALS) >= roundTo(binStart, DECIMALS) && - roundTo(highlightValue, DECIMALS) < roundTo(binEnd, DECIMALS) - ) - }) - if (computedHighlightBinIndex === -1) computedHighlightBinIndex = null - } - - // Dynamically calculate left margin for long y-labels - const yLabelsFormatted = yTicks.map(format3Sig) - const defaultMargin = {top: 16, right: 16, bottom: 32, left: 40} - let dynamicMargin = defaultMargin - if (direction === "horizontal") { - const longestLabelLength = yLabelsFormatted.reduce( - (max, label) => Math.max(max, String(label).length), - 0, - ) - const dynamicLeftMargin = Math.max(40, Math.min(120, longestLabelLength * 7 + 16)) - dynamicMargin = {...defaultMargin, left: dynamicLeftMargin} - } else { - const yAxisLabels = xTicks.map(format3Sig) - const longestLeft = yAxisLabels.reduce( - (max, label) => Math.max(max, String(label).length), - 0, - ) - const dynamicLeftMargin = Math.max(40, Math.min(120, longestLeft * 7 + 16)) - const xAxisLabels = yTicks.map(format3Sig) - const longestBottom = xAxisLabels.reduce( - (max, label) => Math.max(max, String(label).length), - 0, - ) - const dynamicBottomMargin = Math.max(32, Math.min(120, longestBottom * 7 + 16)) - dynamicMargin = { - ...defaultMargin, - left: dynamicLeftMargin, - bottom: dynamicBottomMargin, - ...dynamicPropsMargin, - } - } - - // NEW: resolve fills (keep defaults) - const baseSolid = barColor || DEFAULT_PRIMARY - const baseFill = disableGradient ? baseSolid : "url(#barGradientBlue)" - const highlightFill = barColor || DEFAULT_PRIMARY - - return ( -
- - {({svgWidth, svgHeight, plotWidth, plotHeight, margin}) => { - // Scales for both orientations - const xScaleHorizontal = (value: number) => (value / xMax) * plotWidth - const yScaleHorizontal = (value: number) => - ((yMax - value) / (yMax - yMin)) * plotHeight - - const xScaleVertical = (value: number) => - ((value - yMin) / (yMax - yMin)) * plotWidth - const yScaleVertical = (value: number) => - ((xMax - value) / xMax) * plotHeight - - const isVertical = direction === "vertical" - const xScale = isVertical ? xScaleVertical : xScaleHorizontal - const yScale = isVertical ? yScaleVertical : yScaleHorizontal - - return ( - <> - - {/* Bar gradient (use barColor if provided) */} - - {!disableGradient && ( - - - - - )} - - - {/* Bin size overlay */} - {typeof extraDimensions.binSize === "number" && ( - - bin {format3Sig(extraDimensions.binSize)} - - )} - - {/* Grid lines */} - - {(isVertical ? xTicks : yTicks).map((tick) => ( - - ))} - - - {/* Histogram bars */} - - {chartData.map((d, idx) => { - const isHighlighted = idx === computedHighlightBinIndex - if (isVertical) { - const barLeft = - margin.left + xScaleVertical(d.edge as number) - const barRight = - margin.left + xScaleVertical(d.edge + binSize) - const barWidth = Math.abs(barRight - barLeft) - const barHeight = - plotHeight - yScaleVertical(d.value) - return ( - - - { - setHoveredBin(idx) - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: - e.clientX - - (svgRect?.left ?? 0), - y: - e.clientY - - (svgRect?.top ?? 0), - }) - }} - onMouseMove={(e) => { - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: - e.clientX - - (svgRect?.left ?? 0), - y: - e.clientY - - (svgRect?.top ?? 0), - }) - }} - onMouseLeave={() => { - setHoveredBin(null) - setMousePos(null) - }} - /> - - ) - } - - const barTop = - margin.top + yScaleHorizontal(d.edge + binSize) - const barBottom = - margin.top + yScaleHorizontal(d.edge as number) - const barHeight = Math.abs(barBottom - barTop) - const rawBarWidth = xScaleHorizontal(d.value) - const barWidth = Math.min(rawBarWidth, plotWidth) - return ( - - - { - setHoveredBin(idx) - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseMove={(e) => { - const svgRect = ( - e.target as SVGRectElement - ).ownerSVGElement?.getBoundingClientRect() - setMousePos({ - x: e.clientX - (svgRect?.left ?? 0), - y: e.clientY - (svgRect?.top ?? 0), - }) - }} - onMouseLeave={() => { - setHoveredBin(null) - setMousePos(null) - }} - /> - - ) - })} - - - {/* Reference lines */} - {typeof extraDimensions.mean === "number" && - (isVertical ? ( - - - - {`μ=${format3Sig(extraDimensions.mean)}`} - - - ) : ( - - - - {`μ=${format3Sig(extraDimensions.mean)}`} - - - ))} - - {typeof highlightValue === "number" && - highlightValue !== extraDimensions.mean && - (isVertical ? ( - - - - {format3Sig(highlightValue)} - - - {format3Sig(highlightValue)} - - - ) : ( - - - - {format3Sig(highlightValue)} - - - {format3Sig(highlightValue)} - - - ))} - - {/* Y-axis */} - - - - - {/* X/Y Axes */} - {/* - y-axis: categorical labels (formatted bin midpoints) - const yLabels = yTicks.map(format3Sig) - const yLabelScale = (idx: number) => ((yTicks.length - idx - 0.5) * (plotHeight / yTicks.length)) - */} - - isVertical - ? xScaleVertical(yTicks[idx]) - : xScaleHorizontal(xTicks[idx]) - } - yScale={isVertical ? yScaleVertical : yScaleHorizontal} - yLabels={isVertical ? undefined : yTicks.map(format3Sig)} - yLabelScale={ - isVertical - ? undefined - : (idx: number) => - (yTicks.length - idx - 0.5) * - (plotHeight / yTicks.length) - } - /> - - - {/* Tooltip outside SVG */} - {hoveredBin !== null && - chartData[hoveredBin] && - mousePos && - (() => { - const total = chartData.reduce((sum, d) => sum + d.value, 0) - const count = chartData[hoveredBin].value - const percent = total > 0 ? (count / total) * 100 : 0 - const isHighlighted = - hoveredBin === computedHighlightBinIndex - return ( -
- {/* Caret */} -
-
- Range: - - {format3Sig( - chartData[hoveredBin].edge as number, - )} - – - {format3Sig( - chartData[hoveredBin].edge + binSize, - )} - - {isHighlighted && ( - - Highlighted - - )} -
-
- Count:{" "} - {count} - - ({percent.toFixed(1)}%) - -
-
- ) - })()} - - ) - }} - -
- ) - }, -) - -export default ResponsiveMetricChart diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/chartUtils.ts b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/chartUtils.ts deleted file mode 100644 index de84ed5fbd..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/chartUtils.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Shared chart utility functions for both histogram and frequency charts - -export function getYTicks(yMax: number, nTicks = 3): number[] { - // Returns evenly spaced ticks from 0 to yMax - if (yMax === 0) return [0] - const step = yMax / (nTicks - 1) - return Array.from( - {length: nTicks}, - (_, i) => Math.round((i * step + Number.EPSILON) * 1000) / 1000, - ) -} diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils.ts b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils.ts deleted file mode 100644 index 2cd4ffbc56..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/assets/utils.ts +++ /dev/null @@ -1,195 +0,0 @@ -import {ChartDatum, MetricFormatter} from "../types" - -/** - * Transforms the input data into an array of ChartDatum objects for chart rendering. - * - If `extra.distribution` is an array of numbers, returns them as ChartDatum with indices as names. - * - If `extra.distribution` is an array of objects, filters and maps them to ChartDatum based on `count` or `value`. - * - If `extra.percentiles` is an object, converts its entries to ChartDatum. - * - If `extra.iqrs` is an object, converts its entries to ChartDatum. - * - * @param {Record} extra - The input data containing distribution, percentiles, or iqrs. - * @returns {ChartDatum[]} An array of ChartDatum objects for use in charts. - */ -export const buildChartData = (extra: Record): ChartDatum[] => { - // distribution could be array of objects or numbers - // 1️⃣ Numeric histogram or object counts ------------------------------------ - if (Array.isArray(extra.distribution)) { - let data: ChartDatum[] = [] - if (extra.distribution.every((d) => typeof d === "number")) { - // If binSize & min are provided, label bins as ranges e.g. "0–0.1" - if (typeof extra.binSize === "number" && typeof extra.min === "number") { - data = extra.distribution.map((v: number, idx: number) => { - const minNum = Number(extra.min) - const start = minNum + idx * extra.binSize - const end = start + extra.binSize - return { - name: `${format3Sig(start)}–${format3Sig(end)}`, - value: v, - edge: start, // Changed from end to start - } - }) - } else { - data = extra.distribution.map((v: number, idx: number) => ({ - name: String(idx), - value: v, - })) - } - } else if (extra.distribution.every((d) => typeof d === "object" && d != null)) { - if (extra.distribution.every((d: any) => typeof d.value === "number")) { - // If binSize & min are provided, label bins as ranges e.g. "0–0.1" - if (typeof extra.binSize === "number" && typeof extra.min === "number") { - data = extra.distribution.map((d: any, idx: number) => { - const minNum = Number(extra.min) - const start = minNum + idx * extra.binSize - const end = start + extra.binSize - - return { - name: `${format3Sig(start)}–${format3Sig(end)}`, - value: d.count ?? d.value ?? 0, - edge: start, - } - }) - } else { - data = extra.distribution.map((d: any) => ({ - name: String(d.value), - value: d.count ?? d.value ?? 0, - })) - } - } else { - data = extra.distribution - .filter((d: any) => (d.count ?? d.value ?? 0) > 0) - .map((d: any, idx: number) => ({ - name: - typeof d.value === "number" - ? Number(d.value).toPrecision(3) - : String(idx), - value: Number(d.count ?? d.value ?? 0), - })) - } - } - // If we only have a single point, add a zero baseline to avoid Recharts/decimal.js errors - if (data.length === 1) { - data = [{name: "", value: 0}, ...data] - } - return data - } - - // 2️⃣ Categorical metrics: use frequency (all labels) falling back to rank --- - const catArray = Array.isArray(extra.frequency) - ? extra.frequency - : Array.isArray(extra.rank) - ? extra.rank - : null - if (Array.isArray(catArray)) { - const sorted = [...catArray].sort((a: any, b: any) => (b.count ?? 0) - (a.count ?? 0)) - return sorted.map((d: any) => ({name: String(d.value), value: Number(d.count ?? 0)})) - } - - // 3️⃣ Percentiles / IQRs ---------------------------------------------------- - if (extra.percentiles && typeof extra.percentiles === "object") { - return Object.entries(extra.percentiles).map(([k, v]) => ({name: k, value: Number(v)})) - } - if (extra.iqrs && typeof extra.iqrs === "object") { - return Object.entries(extra.iqrs).map(([k, v]) => ({name: k, value: Number(v)})) - } - return [] -} - -/** - * Registry mapping metric keys (full string match or RegExp string) to a formatter. - * Extend this map according to your metric naming conventions. - */ -export const METRIC_FORMATTERS: Record = { - // currency-like costs - cost: {prefix: "$", decimals: 6}, - costs: {prefix: "$", decimals: 6}, - price: {prefix: "$", decimals: 4}, - totalCost: {prefix: "$", decimals: 4}, - "attributes.ag.metrics.costs.cumulative.total": {prefix: "$", decimals: 4}, - // latency - latency: {decimals: 2, suffix: "s", multiplier: 0.001}, - duration: {decimals: 2, suffix: "s", multiplier: 0.001}, - "duration.total": {decimals: 2, suffix: "s", multiplier: 0.001}, - "attributes.ag.metrics.duration.cumulative": {decimals: 2, suffix: "s", multiplier: 0.001}, - "attributes.ag.metrics.tokens.cumulative.total": {decimals: 0}, - "attributes.ag.metrics.errors.cumulative": {decimals: 0}, - - // percentages - accuracy: {suffix: "%", decimals: 2}, - recall: {suffix: "%", decimals: 2}, - precision: {suffix: "%", decimals: 2}, -} - -export const format3Sig = (num: number | string): string => { - if (typeof num !== "number") return String(num) - if (!Number.isFinite(num)) return String(num) - - const abs = Math.abs(num) - if (abs === 0) return "0" - - const exponent = Math.floor(Math.log10(abs)) - - // Use scientific notation if exponent >= 10 or <= -10 - if (exponent >= 10 || exponent <= -10) { - return num.toExponential(2) - } - - // Use fixed-point notation with 3 significant digits - const decimals = Math.max(0, 2 - exponent) - const fixed = num.toFixed(decimals) - - // Strip trailing zeros and possible trailing decimal point - return fixed.replace(/\.?0+$/, "") -} - -/** - * Format a metric value using the mapping above. - * Falls back to the raw value when the metric has no formatter or value is non-numeric. - */ -export function formatMetricValue(metricKey: string, value: unknown): string { - if (value == null) { - return "" - } - - if (Array.isArray(value)) { - return value.map((v) => formatMetricValue(metricKey, v)).join(", ") - } - - if (typeof value === "boolean") { - return value ? "true" : "false" - } - - if (typeof value === "object") { - try { - return JSON.stringify(value, null, 2) - } catch (error) { - return String(value) - } - } - - if (typeof value !== "string" && typeof value !== "number") { - return String(value) - } - - const fmt = METRIC_FORMATTERS[metricKey] || { - decimals: 2, - } - - if (fmt?.format) { - return fmt.format(value) - } - - if (typeof value !== "number") { - const numericValue = Number(value) - if (Number.isNaN(numericValue)) { - return String(value) - } - const adjusted = fmt.multiplier ? numericValue * fmt.multiplier : numericValue - const rounded = Number.isFinite(adjusted) ? format3Sig(adjusted) : format3Sig(value) - return `${fmt.prefix ?? ""}${rounded}${fmt.suffix ?? ""}` - } - - const adjusted = fmt.multiplier ? value * fmt.multiplier : value - const rounded = Number.isFinite(adjusted) ? format3Sig(adjusted) : format3Sig(value) - return `${fmt.prefix ?? ""}${rounded}${fmt.suffix ?? ""}` -} diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/index.tsx b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/index.tsx deleted file mode 100644 index 32870ec074..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/index.tsx +++ /dev/null @@ -1,385 +0,0 @@ -import {memo, useCallback, useMemo, useState, type FC} from "react" - -import {Popover, Tag, Space} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" - -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import {runMetricsStatsCacheFamily} from "@/oss/lib/hooks/useEvaluationRunData/assets/atoms" -import {EvaluatorDto} from "@/oss/lib/hooks/useEvaluators/types" -import {extractPrimitive, inferMetricType} from "@/oss/lib/metricUtils" - -import ResponsiveFrequencyChart from "./assets/ResponsiveFrequencyChart" -import ResponsiveMetricChart from "./assets/ResponsiveMetricChart" -import {buildChartData, format3Sig, formatMetricValue} from "./assets/utils" -import {MetricDetailsPopoverProps} from "./types" - -/** - * MetricDetailsPopover is a React functional component that provides a detailed view - * of metric information within a popover. It displays both a tabular representation - * of primitive metric entries and a chart visualization based on the provided metric - * data. The component determines the appropriate chart type dynamically and supports - * categorical and continuous data representations. - * - * Props: - * - metricKey: The key associated with the metric being displayed. - * - extraDimensions: Additional dimensions or metadata for the metric. - * - highlightValue: Optional value for highlighting in the chart. - * - hidePrimitiveTable: Boolean flag to toggle the visibility of the primitive table. - * - children: ReactNode elements to be rendered inside the popover trigger. - */ -const MetricDetailsPopover: FC = memo( - ({ - metricKey, - metricType, - extraDimensions, - highlightValue, - hidePrimitiveTable, - children, - className, - }) => { - const [open, setOpen] = useState(false) - const handleOpenChange = useCallback((v: boolean) => setOpen(v), []) - - const extraEntries = useMemo(() => Object.entries(extraDimensions), [extraDimensions]) - - const chartData = useMemo( - () => (open ? buildChartData(extraDimensions) : []), - [open, extraDimensions], - ) - - // Dynamically compute the pixel width required for Y-axis labels - const labelWidth = useMemo(() => { - if (!chartData.length) return 0 - const canvas = document.createElement("canvas") - const ctx = canvas.getContext("2d") - if (!ctx) return 0 - ctx.font = "10px Inter, sans-serif" // must match tick font - const max = Math.max(...chartData.map((d) => ctx.measureText(String(d.name)).width)) - return Math.ceil(max) + 8 // + padding - }, [chartData]) - - const primitiveEntries = useMemo(() => { - if (!open || hidePrimitiveTable) return [] - // const order = ["mean", "std", "min", "max", "count", "total", "binSize"] - const order = ["mean", "std", "min", "max", "count", "sum", "binSize", "unique", "rank"] - const allowed = new Set(order) - const _primitiveEntries = extraEntries - .filter(([k]) => allowed.has(k as string)) - .sort(([a], [b]) => { - const ia = order.indexOf(a as string) - const ib = order.indexOf(b as string) - const sa = ia === -1 ? Number.POSITIVE_INFINITY : ia - const sb = ib === -1 ? Number.POSITIVE_INFINITY : ib - - return sa - sb || (a as string).localeCompare(b as string) - }) - return _primitiveEntries - }, [open, hidePrimitiveTable, extraEntries]) - - const tableNode = useMemo(() => { - if (!primitiveEntries.length) return null - - return ( -
- - {primitiveEntries.map(([k, v]) => ( - - - - - ))} - -
{k} - {(() => { - if (Array.isArray(v)) { - const limit = 5 - if (k === "unique") { - const items = (v as any[]).slice(0, limit) - return ( -
- {items.map((itm, idx) => ( - - {String(itm)} - - ))} - {v.length > limit && ( - - … - - )} -
- ) - } - if ((k === "rank" || k === "frequency") && v.length) { - const items = (v as any[]).slice(0, limit) - return ( -
- {items.map((o: any, idx) => ( - {`${o.value} (${o.count})`} - ))} - {v.length > limit && ( - - … - - )} -
- ) - } - } - return formatMetricValue(metricKey, v as any) - })()} -
- ) - }, [primitiveEntries, metricKey]) - - // Chart type logic - const isCategoricalChart = - Array.isArray(extraDimensions.distribution) || - Array.isArray(extraDimensions.rank) || - Array.isArray(extraDimensions.frequency) - const hasEdge = - chartData.length > 0 && Object.prototype.hasOwnProperty.call(chartData[0], "edge") - - const frequencyData = useMemo(() => { - // Only build for categorical/frequency charts without edge - if (isCategoricalChart && !hasEdge) { - // buildChartData returns [{ name, value }] but ResponsiveFrequencyChart expects [{ label, count }] - return buildChartData(extraDimensions).map((d) => ({ - label: d.name, - count: d.value, - })) - } - return [] - }, [extraDimensions, isCategoricalChart, hasEdge]) - - const chartNode = useMemo(() => { - if (!open) return null - // Histogram (hasEdge): use ResponsiveMetricChart - if (chartData.length > 0 && isCategoricalChart && hasEdge) { - return ( - - ) - } - // Frequency/categorical: use ResponsiveFrequencyChart - if (frequencyData.length > 0 && isCategoricalChart && !hasEdge) { - return ( - - ) - } - // No valid chart type available - return null - }, [chartData, isCategoricalChart, hasEdge, labelWidth, highlightValue, extraDimensions]) - - const content = useMemo( - () => ( -
- {tableNode} - {chartNode} -
- ), - [tableNode, chartNode], - ) - if (!extraEntries.length || metricType === "string") { - return <>{children} - } - - return ( -
- - {children} - -
- ) - }, -) - -MetricDetailsPopover.displayName = "MetricDetailsPopover" - -/** - * A wrapper component around MetricDetailsPopover that: - * - fetches run metrics using useEvaluationRunMetrics - * - computes a summary of the metric - * - passes the extra dimensions to the MetricDetailsPopover - * - conditionally renders the MetricDetailsPopover if the metric is not null - * - * @param scenarioId - the scenario ID - * @param runId - the run ID - * @param evaluatorSlug - the evaluator slug - * @param evaluatorMetricKey - the metric key - * @param hidePrimitiveTable - whether to hide the primitive table - * @param metricType - the type of the metric (optional) - */ -export const MetricDetailsPopoverWrapper = memo( - ({ - scenarioId, - runId, - evaluatorSlug, - evaluatorMetricKey, - hidePrimitiveTable = false, - metricType, - className, - statsOverride, - debug, - evaluator, - }: { - scenarioId?: string | null - runId: string - evaluatorSlug: string - evaluatorMetricKey: string - hidePrimitiveTable?: boolean - metricType?: string - evaluator?: EvaluatorDto - className?: string - statsOverride?: Record - debug?: boolean - }) => { - const metricKey = useMemo( - () => `${evaluatorSlug}.${evaluatorMetricKey}`, - [evaluatorSlug, evaluatorMetricKey], - ) - - // Use run-scoped stats cache instead of global cache - const runStatsCache = useAtomValue(runMetricsStatsCacheFamily(runId)) - const stats = statsOverride ?? runStatsCache?.[metricKey] - - const rawPrimitive = useMemo(() => extractPrimitive(stats), [stats]) - - const explicitTypeFromEvaluator = useMemo(() => { - return ( - evaluator?.metrics?.[evaluatorMetricKey]?.type || - evaluator?.metrics?.[evaluatorMetricKey]?.anyOf - ) - // as SchemaMetricType | undefined - }, [evaluator, evaluatorMetricKey]) - const resolvedMetricType = useMemo( - () => explicitTypeFromEvaluator ?? inferMetricType(rawPrimitive, metricType), - [explicitTypeFromEvaluator, rawPrimitive, metricType], - ) - - const summary = useMemo(() => { - if (!stats) return "N/A" - if (resolvedMetricType === "string" || resolvedMetricType === "object") { - return "N/A" - } - // Numeric metrics → mean - if (typeof (stats as any).mean === "number") { - return format3Sig(Number((stats as any).mean)) - } - // Boolean metrics → proportion of `true` - if (resolvedMetricType === "boolean" && Array.isArray((stats as any).frequency)) { - const trueEntry = (stats as any).frequency.find((f: any) => f.value === true) - const total = (stats as any).count ?? 0 - if (total) { - return ( -
-
-
-
- true - false -
-
-
-
-
-
-
-
-
-
- {(((trueEntry?.count ?? 0) / total) * 100).toFixed(2)}% -
-
- ) - } - } - // Array metrics → show top 3 items - if (resolvedMetricType === "array" || resolvedMetricType === undefined) { - const items = - Array.isArray((stats as any).rank) && (stats as any).rank.length - ? (stats as any).rank - : Array.isArray((stats as any).unique) - ? (stats as any).unique.map((v: any) => ({value: v, count: undefined})) - : [] - const topItems = items.slice(0, 3) - return ( - - {topItems.map((it: any) => ( - - {String(it.value)} - {it.count !== undefined ? ` (${it.count})` : ""} - - ))} - - ) - } - // Categorical metrics → top rank - if (Array.isArray((stats as any).rank) && (stats as any).rank.length) { - const top = (stats as any).rank[0] - return `${top.value} (${top.count})` - } - if (Array.isArray((stats as any).unique) && (stats as any).unique.length) { - return `${(stats as any).unique.length} unique` - } - if (typeof (stats as any).count === "number") { - return (stats as any).count - } - return "–" - }, [stats, resolvedMetricType]) - - return stats ? ( - - {summary} - - ) : ( - "N/A" - ) - }, -) - -export default MetricDetailsPopover diff --git a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/types.ts b/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/types.ts deleted file mode 100644 index ae12092aad..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/MetricDetailsPopover/types.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type {ReactNode} from "react" - -export interface MetricDetailsPopoverProps { - metricKey: string - primaryLabel?: string - primaryValue?: number | string - extraDimensions: Record - /** Value to highlight (bin/bar will be inferred from this value) */ - highlightValue?: number | string | boolean | Array - /** Hide primitives key‒value table; useful for lightweight popovers */ - hidePrimitiveTable?: boolean - /** Force using edge-axis (for debugging) */ - hasEdge?: boolean - className?: string - children: ReactNode -} - -// helper to transform objects to chart data -export interface ChartDatum { - name: string | number - value: number - edge?: number -} - -export interface MetricFormatter { - /** String to prepend before the numeric value, e.g. "$" */ - prefix?: string - /** String to append after the numeric value, e.g. "%" */ - suffix?: string - /** Number of decimal places to round to. If undefined, value is not rounded */ - decimals?: number - /** Multiplier to apply before formatting */ - multiplier?: number - /** Optional custom formatter receives numeric value and returns formatted string */ - format?: (value: number | string) => string -} diff --git a/web/oss/src/components/HumanEvaluations/assets/SingleModelEvaluationHeader/index.tsx b/web/oss/src/components/HumanEvaluations/assets/SingleModelEvaluationHeader/index.tsx deleted file mode 100644 index d1d125c012..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/SingleModelEvaluationHeader/index.tsx +++ /dev/null @@ -1,328 +0,0 @@ -import {useCallback, useEffect, useMemo, useState, memo} from "react" - -import {Export, Plus, Trash} from "@phosphor-icons/react" -import {Button, message, Space, Typography} from "antd" -import clsx from "clsx" -import dynamic from "next/dynamic" -import Link from "next/link" -import {useSWRConfig} from "swr" - -import {statusMapper} from "@/oss/components/pages/evaluations/cellRenderers/cellRenderers" -import useURL from "@/oss/hooks/useURL" -import {EvaluationType} from "@/oss/lib/enums" -import {calculateAvgScore} from "@/oss/lib/helpers/evaluate" -import {convertToCsv, downloadCsv} from "@/oss/lib/helpers/fileManipulations" -import {getEvaluationRunScenariosKey} from "@/oss/lib/hooks/useEvaluationRunScenarios" -import useEvaluations from "@/oss/lib/hooks/useEvaluations" -import {summarizeMetric} from "@/oss/lib/metricUtils" -import {EvaluationStatus} from "@/oss/lib/Types" -import {getAppValues} from "@/oss/state/app" - -import {SingleModelEvaluationHeaderProps} from "../../types" -import {EvaluationRow} from "../../types" -import {useStyles} from "../styles" -import {extractEvaluationStatus, getMetricSummaryValue} from "../utils" - -const NewEvaluationModal = dynamic(() => import("../../../pages/evaluations/NewEvaluation"), { - ssr: false, -}) -const DeleteEvaluationModal = dynamic( - () => import("@/oss/components/DeleteEvaluationModal/DeleteEvaluationModal"), - {ssr: false}, -) - -const SingleModelEvaluationHeader = ({ - viewType, - selectedRowKeys, - mergedEvaluations, - runMetricsMap, - setSelectedRowKeys, - isDeleteEvalModalOpen, - setIsDeleteEvalModalOpen, - selectedEvalRecord, - setSelectedEvalRecord, - scope, - projectURL, - activeAppId, - extractAppId, -}: SingleModelEvaluationHeaderProps) => { - const classes = useStyles() - const {appURL} = useURL() - const {cache} = useSWRConfig() - const {refetch, handleDeleteEvaluations: deleteEvaluations} = useEvaluations({ - withPreview: true, - types: [EvaluationType.single_model_test], - appId: activeAppId, - }) - - const [isEvalModalOpen, setIsEvalModalOpen] = useState(false) - const [isDeletingEvaluations, setIsDeletingEvaluations] = useState(false) - const [isScrolled, setIsScrolled] = useState(false) - - useEffect(() => { - if (viewType === "overview") return - - const handleScroll = () => { - setIsScrolled(window.scrollY > 180) - } - - window.addEventListener("scroll", handleScroll) - - return () => { - window.removeEventListener("scroll", handleScroll) - } - }, [viewType]) - - const selectedEvaluations = useMemo(() => { - return selectedEvalRecord - ? (() => { - const found = mergedEvaluations.find( - (e) => ("id" in e ? e.id : e.key) === selectedEvalRecord?.id, - ) - return found && "name" in found ? found.name : (found?.key ?? "") - })() - : mergedEvaluations - .filter((e) => selectedRowKeys.includes("id" in e ? e.id : e.key)) - .map((e) => ("name" in e ? e.name : e.key)) - .join(" | ") - }, [selectedEvalRecord, selectedRowKeys]) - - const handleDelete = useCallback( - async (ids: string[]) => { - setIsDeletingEvaluations(true) - try { - await deleteEvaluations(ids) - message.success( - ids.length > 1 ? `${ids.length} Evaluations Deleted` : "Evaluation Deleted", - ) - } catch (err) { - message.error("Failed to delete evaluations") - console.error(err) - } finally { - setIsDeletingEvaluations(false) - setIsDeleteEvalModalOpen(false) - setSelectedRowKeys([]) - } - }, - [deleteEvaluations], - ) - - const runStatus = useCallback( - (runId: string, status: EvaluationStatus, isLegacyEval: boolean) => { - if (isLegacyEval) { - const statusLabel = statusMapper({} as any)(status as EvaluationStatus) - .label as EvaluationStatus - return statusLabel - } - - const key = `${getEvaluationRunScenariosKey(runId)}-false` - const cachedData = cache.get(key) - const scenarios = cachedData?.data?.scenarios - - const {runStatus: _status} = extractEvaluationStatus(scenarios, status) - return _status == "success" ? "completed" : _status - }, - [cache], - ) - - const onExport = useCallback(() => { - const exportEvals = mergedEvaluations.filter((e) => - selectedRowKeys.some((selected) => selected === ("id" in e ? e.id : e.key)), - ) - - try { - if (exportEvals.length) { - const {currentApp} = getAppValues() - const filenameBase = - currentApp?.app_name || - (scope === "project" ? "all_applications" : "evaluations") - const filename = `${filenameBase.replace(/\s+/g, "_")}_human_annotation.csv` - - const rows = exportEvals.map((item) => { - const id = "id" in item ? item.id : item.key - const metrics = runMetricsMap?.[id] - const applicationName = (item as any)?.variants?.[0]?.appName || "-" - const applicationId = extractAppId(item as EvaluationRow) || "-" - - // Note: all the 'in' conditions here are for legacy eval - const row: Record = { - Name: "name" in item ? item.name : item.key, - Variant: `${item.variants?.[0]?.variantName} v${"revisions" in item ? item.revisions?.[0] : item.variants?.[0]?.revision}`, - Testset: - "testset" in item - ? item.testset.name - : (item.testsets?.[0]?.name ?? ""), - Status: - runStatus(id, item.status, item.status.includes("EVALUATION")) || "", - // legacy eval - ...("resultsData" in item - ? {"Average score": `${calculateAvgScore(item) || 0}%`} - : {}), - ...((item as any).createdBy?.user?.username - ? {"Created by": (item as any).createdBy?.user?.username} - : {}), - "Created on": item.createdAt, - } - - if (scope === "project") { - row.Application = applicationName - row["Application ID"] = applicationId - } - - // Track metric keys consumed by evaluator loop so we don't duplicate - const consumedKeys = new Set() - - if ("evaluators" in item && Array.isArray(item.evaluators)) { - item.evaluators.forEach((ev: any) => { - const metricDefs = - ev.data?.service?.format?.properties?.outputs?.properties || {} - Object.entries(metricDefs).forEach( - ([metricKey, def]: [string, any]) => { - const fullKey = `${ev.slug}.${metricKey}` - consumedKeys.add(fullKey) - const stat = metrics?.[fullKey] - const value = summarizeMetric(stat, def?.type) - row[`${ev.name} ${metricKey}`] = - value !== undefined && value !== null ? value : "N/A" - }, - ) - }) - } - - if (metrics) { - Object.entries(metrics).forEach(([metricKey, stat]) => { - if (consumedKeys.has(metricKey)) return - const value = summarizeMetric(stat as any) - row[metricKey] = value !== undefined && value !== null ? value : "N/A" - }) - } - - return row - }) - - const headerSet = new Set() - rows.forEach((r) => Object.keys(r).forEach((h) => headerSet.add(h))) - const headers = Array.from(headerSet) - - const csvData = convertToCsv(rows, headers) - downloadCsv(csvData, filename) - setSelectedRowKeys([]) - } - } catch (error) { - message.error("Failed to export results. Please try again later") - } - }, [mergedEvaluations, selectedRowKeys, runMetricsMap, scope, extractAppId]) - - return ( - <> - {viewType === "overview" ? ( -
- - Human Annotation - - {(() => { - const href = - scope === "app" - ? appURL - ? `${appURL}/evaluations?selectedEvaluation=human_annotation` - : undefined - : `${projectURL}/evaluations?selectedEvaluation=human_annotation` - - if (!href) return null - - return ( - - ) - })()} - - - {(scope === "app" && activeAppId) || scope === "project" ? ( - - ) : null} -
- ) : ( -
- {(scope === "app" && activeAppId) || scope === "project" ? ( - - ) : null} - - - - - -
- )} - - {((scope === "app" && activeAppId) || scope === "project") && ( - { - setIsEvalModalOpen(false) - }} - onSuccess={() => { - setIsEvalModalOpen(false) - refetch() - }} - preview={true} - evaluationType={"human"} - /> - )} - - { - setIsDeleteEvalModalOpen(false) - setSelectedEvalRecord(undefined) - }} - onOk={async () => { - const idsToDelete = selectedEvalRecord - ? [selectedEvalRecord.id] - : selectedRowKeys.map((key) => key?.toString()) - await handleDelete(idsToDelete.filter(Boolean)) - }} - evaluationType={selectedEvaluations} - isMultiple={!selectedEvalRecord && selectedRowKeys.length > 0} - /> - - ) -} - -export default memo(SingleModelEvaluationHeader) diff --git a/web/oss/src/components/HumanEvaluations/assets/TableDropdownMenu/index.tsx b/web/oss/src/components/HumanEvaluations/assets/TableDropdownMenu/index.tsx deleted file mode 100644 index 9312f7e771..0000000000 --- a/web/oss/src/components/HumanEvaluations/assets/TableDropdownMenu/index.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import {memo, useMemo} from "react" - -import {MoreOutlined} from "@ant-design/icons" -import {Database, Note, Rocket, Trash} from "@phosphor-icons/react" -import {Dropdown, Button, MenuProps} from "antd" -import {useRouter} from "next/router" - -import {EvaluationStatus} from "@/oss/lib/Types" - -import { - buildAppScopedUrl, - buildEvaluationNavigationUrl, - extractPrimaryInvocation, -} from "../../../pages/evaluations/utils" - -import {TableDropdownMenuProps} from "./types" - -const TableDropdownMenu = ({ - record, - evalType, - setSelectedEvalRecord, - setIsDeleteEvalModalOpen, - onVariantNavigation, - baseAppURL, - extractAppId, - scope, - projectURL, - resolveAppId, - disableVariantAction = false, -}: TableDropdownMenuProps) => { - const router = useRouter() - const primaryInvocation = extractPrimaryInvocation(record) - const resolvedAppId = resolveAppId ? resolveAppId(record) : undefined - const targetAppId = resolvedAppId || primaryInvocation?.appId || extractAppId(record) - const variantId = primaryInvocation?.revisionId || record.variants?.[0]?.id - - const items: MenuProps["items"] = useMemo( - () => [ - { - key: "details", - label: "Open details", - icon: , - disabled: - [ - EvaluationStatus.PENDING, - EvaluationStatus.RUNNING, - EvaluationStatus.CANCELLED, - EvaluationStatus.INITIALIZED, - ].includes(record.status) || !targetAppId, - onClick: (e) => { - e.domEvent.stopPropagation() - if ( - (evalType === "auto" || evalType === "custom") && - ![ - EvaluationStatus.PENDING, - EvaluationStatus.RUNNING, - EvaluationStatus.CANCELLED, - EvaluationStatus.INITIALIZED, - ].includes(record.status) && - targetAppId - ) { - const evaluationId = "id" in record ? record.id : record.key - const suffix = - evalType === "auto" || evalType === "custom" - ? `/evaluations/results/${evaluationId}` - : `/evaluations/single_model_test/${evaluationId}` - const pathname = buildEvaluationNavigationUrl({ - scope, - baseAppURL, - projectURL, - appId: targetAppId, - path: suffix, - }) - - if (scope === "project") { - router.push({ - pathname, - query: targetAppId ? {app_id: targetAppId} : undefined, - }) - } else { - router.push(pathname) - } - } - }, - }, - { - key: "variant", - label: "View variant", - icon: , - disabled: disableVariantAction || !variantId || !targetAppId, - onClick: (e) => { - e.domEvent.stopPropagation() - if (disableVariantAction || !variantId) return - onVariantNavigation({revisionId: variantId, appId: targetAppId || undefined}) - }, - }, - { - key: "view_testset", - label: "View testset", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - router.push(`${projectURL}/testsets/${record.testsets?.[0]?.id}`) - }, - }, - {type: "divider"}, - { - key: "delete_eval", - label: "Delete", - icon: , - danger: true, - onClick: (e) => { - e.domEvent.stopPropagation() - setSelectedEvalRecord(record) - setIsDeleteEvalModalOpen(true) - }, - }, - ], - [ - setSelectedEvalRecord, - setIsDeleteEvalModalOpen, - record, - onVariantNavigation, - evalType, - targetAppId, - baseAppURL, - variantId, - projectURL, - primaryInvocation, - scope, - ], - ) - return ( - - +
+ ) + } return ( - }> - {typeof window === "undefined" ? null : isAuthRoute ? ( - - - {children} - {contextHolder} - - - ) : ( - - - {children} - {contextHolder} - - + <> + {typeof window === "undefined" ? null : ( + + {isAuthRoute ? ( + + + {children} + {contextHolder} + + + ) : ( + +
+ {children} + {contextHolder} +
+
+ )} +
)} -
+ ) } -export default App +export default memo(App) diff --git a/web/oss/src/components/Layout/SidebarIsland.tsx b/web/oss/src/components/Layout/SidebarIsland.tsx deleted file mode 100644 index c73ec9e1c6..0000000000 --- a/web/oss/src/components/Layout/SidebarIsland.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import {memo} from "react" - -import Sidebar from "../Sidebar/Sidebar" -interface SidebarIslandProps { - showSettingsView: boolean - lastPath: string | null -} - -// Pure, memo-wrapped island so updates inside Layout don’t re-render it unless its props change -export const SidebarIsland = memo(function SidebarIsland(props: SidebarIslandProps) { - return -}) diff --git a/web/oss/src/components/Layout/assets/Breadcrumbs.tsx b/web/oss/src/components/Layout/assets/Breadcrumbs.tsx index 6ed32597f8..ebccd3ba74 100644 --- a/web/oss/src/components/Layout/assets/Breadcrumbs.tsx +++ b/web/oss/src/components/Layout/assets/Breadcrumbs.tsx @@ -1,131 +1,68 @@ import {memo, useMemo} from "react" -import {Sidebar} from "@phosphor-icons/react" +import {Lightning} from "@phosphor-icons/react" import {Breadcrumb, Typography} from "antd" -import clsx from "clsx" -import {useAtom, useAtomValue} from "jotai" import Link from "next/link" - -import {breadcrumbAtom, type BreadcrumbAtom} from "@/oss/lib/atoms/breadcrumb" -import {sidebarCollapsedAtom} from "@/oss/lib/atoms/sidebar" -import {getUniquePartOfId, isUuid} from "@/oss/lib/helpers/utils" -import {useAppState} from "@/oss/state/appState" +import {useRouter} from "next/router" import packageJsonData from "../../../../package.json" -import EnhancedButton from "../../Playground/assets/EnhancedButton" -import TooltipWithCopyAction from "../../TooltipWithCopyAction" import {useStyles, type StyleProps} from "./styles" -const breadcrumbItemsGenerator = (breadcrumbs: BreadcrumbAtom): {title: React.ReactNode}[] => { - if (!breadcrumbs) return [] +const {Text} = Typography + +export const BreadcrumbRoot = memo(() => ( +
+ + Apps +
+)) + +export const BreadcrumbContainer = memo( + ({appTheme, appName}: {appTheme: string; appName: string}) => { + const classes = useStyles({themeMode: appTheme} as StyleProps) + const router = useRouter() - return Object.values(breadcrumbs).map((item) => { - const title = item.href ? ( - - - {item.icon} - {item.label} - - - ) : item.value && isUuid(item.value) ? ( - - {item.icon} - - - {isUuid(item.label) ? getUniquePartOfId(item.label) : item.label} - - - - ) : ( - - {item.icon} - {item.label} - + const pathSegments = useMemo( + () => router.asPath.split("?")[0].split("/").filter(Boolean), + [router.asPath], ) + const isSelectedApp = pathSegments[0] === "apps" && !!pathSegments[1] - return { - title, - ...(item.menu && { - menu: { - items: breadcrumbItemsGenerator(item.menu), - className: "!w-full [&_.ant-dropdown-menu-title-content]:!truncate", - }, - }), - } - }) -} + const breadcrumbItems = useMemo(() => { + const items: {title: React.ReactNode; className?: string}[] = [] -const BreadcrumbContainer = memo(({appTheme}: {appTheme: string}) => { - const classes = useStyles({themeMode: appTheme} as StyleProps) - const breadcrumbs = useAtomValue(breadcrumbAtom) - const [collapsed, setCollapsed] = useAtom(sidebarCollapsedAtom) - const appState = useAppState() - const breadcrumbItems = useMemo( - () => breadcrumbItemsGenerator(breadcrumbs || {}), - [breadcrumbs], - ) + if (isSelectedApp) { + items.push({title: }) + } - return ( -
-
- - } - onClick={() => setCollapsed(!collapsed)} - tooltipProps={{ - title: "Toggle sidebar", - mouseEnterDelay: 1, - }} - /> -
- -
-
+ if (isSelectedApp && appName) { + items.push({title: appName}) + } -
- agenta v{packageJsonData.version} -
-
- ) -}) + let displaySegments: string[] = [] + if (isSelectedApp) { + displaySegments = pathSegments.slice(2) + } else { + displaySegments = pathSegments + } -export default memo(BreadcrumbContainer) + if (displaySegments.length > 0) { + const formatted = displaySegments.map((seg) => seg.replace(/_/g, "-")).join(" / ") + + items.push({title: formatted, className: "capitalize"}) + } + + return items + }, [pathSegments, appName]) + + return ( +
+ +
+ agenta v{packageJsonData.version} +
+
+ ) + }, +) diff --git a/web/oss/src/components/Layout/assets/styles.ts b/web/oss/src/components/Layout/assets/styles.ts index 5ecaaad993..1a26fda2c0 100644 --- a/web/oss/src/components/Layout/assets/styles.ts +++ b/web/oss/src/components/Layout/assets/styles.ts @@ -16,12 +16,10 @@ export const useStyles = createUseStyles((theme: JSSTheme) => ({ }), content: ({footerHeight}: StyleProps) => ({ height: `calc(100% - ${footerHeight ?? 0}px)`, - paddingTop: "24px", paddingLeft: "1.5rem", paddingRight: "1.5rem", marginBottom: `calc(2rem + ${footerHeight ?? 0}px)`, flex: 1, - gap: 16, }), breadcrumbContainer: { display: "flex", @@ -81,7 +79,6 @@ export const useStyles = createUseStyles((theme: JSSTheme) => ({ minHeight: "100vh", alignItems: "center", justifyContent: "center", - gap: 16, "& .ant-typography:nth-of-type(1)": { fontSize: 24, fontWeight: 600, diff --git a/web/oss/src/components/Layout/assets/utils.ts b/web/oss/src/components/Layout/assets/utils.ts deleted file mode 100644 index 86d2b3c106..0000000000 --- a/web/oss/src/components/Layout/assets/utils.ts +++ /dev/null @@ -1 +0,0 @@ -export {buildBreadcrumbSegments as generateSegmentsForBreadcrumb} from "@/oss/lib/helpers/buildBreadcrumbs" diff --git a/web/oss/src/components/Logo/Logo.tsx b/web/oss/src/components/Logo/Logo.tsx index 1c3b6447d5..ddb1c133f9 100644 --- a/web/oss/src/components/Logo/Logo.tsx +++ b/web/oss/src/components/Logo/Logo.tsx @@ -5,8 +5,8 @@ import Image from "next/image" import {useAppTheme} from "../Layout/ThemeContextProvider" const LOGOS = { - dark: "/assets/Agenta-logo-full-dark-accent.png", - light: "/assets/Agenta-logo-full-light.png", + dark: "/assets/dark-complete-transparent-CROPPED.png", + light: "/assets/light-complete-transparent-CROPPED.png", } const Logo: React.FC> & {isOnlyIconLogo?: boolean}> = ( diff --git a/web/oss/src/components/Modals/CustomWorkflowModalMount.tsx b/web/oss/src/components/Modals/CustomWorkflowModalMount.tsx deleted file mode 100644 index f6d1551a46..0000000000 --- a/web/oss/src/components/Modals/CustomWorkflowModalMount.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import {useAtomValue} from "jotai" - -import CustomWorkflowModal from "@/oss/components/pages/app-management/modals/CustomWorkflowModal" -import {customWorkflowModalPropsAtom} from "@/oss/state/customWorkflow/modalAtoms" - -const CustomWorkflowModalMount = () => { - const props = useAtomValue(customWorkflowModalPropsAtom) - return -} - -export default CustomWorkflowModalMount diff --git a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerContent.tsx b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerContent.tsx index e5ab50f477..f8c6109434 100644 --- a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerContent.tsx +++ b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerContent.tsx @@ -1,14 +1,14 @@ -import React, {useEffect, useMemo, useState} from "react" +import {useEffect, useMemo, useState} from "react" import {Plus, WarningCircle} from "@phosphor-icons/react" -import {Button, Form, Input, Typography} from "antd" +import {Button, Form, Typography} from "antd" import {useWatch} from "antd/lib/form/Form" import SelectLLMProvider from "@/oss/components/SelectLLMProvider" import {useVaultSecret} from "@/oss/hooks/useVaultSecret" import {LlmProvider} from "@/oss/lib/helpers/llmProviders" import {isAppNameInputValid} from "@/oss/lib/helpers/utils" -import {PROVIDER_KINDS, PROVIDER_LABELS, SecretDTOProvider} from "@/oss/lib/Types" +import {SecretDTOProvider} from "@/oss/lib/Types" import LabelInput from "../../../assets/LabelInput" @@ -18,82 +18,6 @@ import {ConfigureProviderDrawerContentProps} from "./types" const {Text} = Typography -/** - * Optional render metadata you can attach to each PROVIDER_FIELDS item. - * Example: - * { - * key: "vertexCredentials", - * label: "Vertex Credentials (JSON)", - * model: ["vertex_ai"], - * attributes: { kind: "json", rows: 10, monospace: true, strict: true } - * } - */ -type FieldAttributes = - | {kind: "text"; inputType?: "text" | "password" | "url"} - | {kind: "textarea"; rows?: number; monospace?: boolean} - | {kind: "json"; rows?: number; monospace?: boolean; strict?: boolean} - -type FieldWithAttributes = { - attributes?: FieldAttributes - key: string - label: string - placeholder?: string - required?: boolean - model?: string[] - note?: string -} - -/** Render control based on field.attributes */ -const renderControl = (field: FieldWithAttributes, isRequired?: boolean) => { - const a = field.attributes - - if (!a || a.kind === "text") { - // Keep your existing single-line input - return ( - - ) - } - - if (a.kind === "textarea") { - return ( -
- - {field.label} - {isRequired ? * : null} - - -
- ) - } - - // a.kind === "json" - return ( -
- - {field.label} - {isRequired ? * : null} - - -
- ) -} - const ConfigureProviderDrawerContent = ({ form, onClose, @@ -103,34 +27,17 @@ const ConfigureProviderDrawerContent = ({ const {handleModifyCustomVaultSecret} = useVaultSecret() const standardProviders = useMemo(() => [...Object.values(SecretDTOProvider)], []) - const customProviders = useMemo(() => ["azure", "bedrock", "vertex_ai", "custom"], []) + const customProviders = useMemo(() => ["azure", "bedrock", "custom"], []) const validProviders = useMemo( () => [...customProviders, ...standardProviders], [standardProviders, customProviders], ) - - const providerValue = useWatch("provider", form) || "" - const normalizedProviderKind = useMemo(() => { - if (!providerValue || typeof providerValue !== "string") { - return "" - } - - const trimmedValue = providerValue.trim() - const lowerCaseValue = trimmedValue.toLowerCase() - - return PROVIDER_KINDS[trimmedValue] ?? PROVIDER_KINDS[lowerCaseValue] ?? lowerCaseValue - }, [providerValue]) - - const shouldFilter = validProviders.includes(normalizedProviderKind) + const providerValue = useWatch("provider", form)?.toLowerCase() || "" + const shouldFilter = validProviders.includes(providerValue) useEffect(() => { if (selectedProvider) { - form.setFieldsValue({ - ...selectedProvider, - provider: selectedProvider.provider - ? (PROVIDER_LABELS[selectedProvider.provider] ?? selectedProvider.provider) - : selectedProvider.provider, - }) + form.setFieldsValue(selectedProvider) } else { form.resetFields() } @@ -183,9 +90,7 @@ const ConfigureProviderDrawerContent = ({ )}
- - Provider * - + Provider @@ -193,65 +98,47 @@ const ConfigureProviderDrawerContent = ({ {PROVIDER_FIELDS.filter((field) => { if (shouldFilter) { - return !field.model || field.model.includes(normalizedProviderKind) + return !field.model || field.model.includes(providerValue) } - return true - }).map((rawField) => { - const field = rawField as FieldWithAttributes - const isJson = field.attributes?.kind === "json" - const isRequired = - field.key === "apiBaseUrl" ? false : !shouldFilter ? !!field.required : true - return ( - - ( + <> + - {renderControl(field, isRequired)} - - - {field.note && ( - {field.note} - )} - - ) - })} + } + : {}), + }, + ]} + > + + + {field.note && {field.note}} + + ))} {(fields, {add, remove}) => ( @@ -266,7 +153,6 @@ const ConfigureProviderDrawerContent = ({ Add
- {fields.length === 0 ? ( No custom models configured ) : ( diff --git a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerTitle.tsx b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerTitle.tsx index 4d5f5985b8..ac73d25902 100644 --- a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerTitle.tsx +++ b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/ConfigureProviderDrawerTitle.tsx @@ -1,6 +1,6 @@ import {memo} from "react" -import {LinkSimple} from "@phosphor-icons/react" +import {Play} from "@phosphor-icons/react" import {Button, Typography} from "antd" const ConfigureProviderDrawerTitle = () => { @@ -8,11 +8,9 @@ const ConfigureProviderDrawerTitle = () => {
Configure provider diff --git a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/constants.ts b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/constants.ts index 3cefde32b0..0b46bf9b9a 100644 --- a/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/constants.ts +++ b/web/oss/src/components/ModelRegistry/Drawers/ConfigureProviderDrawer/assets/constants.ts @@ -8,14 +8,8 @@ export const PROVIDER_FIELDS: { note?: string required?: boolean model?: string[] - attributes?: Record }[] = [ - { - key: "name", - label: "Name", - placeholder: "Enter unique name", - required: true, - }, + {key: "name", label: "Name", placeholder: "Enter unique name", required: true}, { key: "apiKey", label: "API key", @@ -27,9 +21,9 @@ export const PROVIDER_FIELDS: { { key: "apiBaseUrl", label: "API base URL", - placeholder: "Enter API base URL", - note: "Include version (e.g. /v1) in the base URL (e.g. https://api.openai.com/v1)", - model: ["azure", "vertex_ai", "custom"], + placeholder: "https://api.openai.com/v1", + note: "Include /v1 in the base URL (e.g. https://api.openai.com/v1)", + model: ["azure", "custom"], required: false, }, { @@ -39,41 +33,10 @@ export const PROVIDER_FIELDS: { model: ["azure"], required: false, }, - { - key: "region", - label: "AWS region", - placeholder: "Enter AWS region", - model: ["bedrock", "sagemaker"], - required: false, - }, - { - key: "vertexProject", - label: "Vertex project", - placeholder: "Enter Vertex project", - model: ["vertex_ai"], - required: false, - }, - { - key: "vertexLocation", - label: "Vertex location", - placeholder: "Enter Vertex location", - model: ["vertex_ai"], - required: false, - }, - { - key: "vertexCredentials", - label: "Vertex credentials", - placeholder: "Enter Vertex credentials", - note: "This secret will be encrypted in transit and at rest.", - model: ["vertex_ai"], - required: false, - attributes: {kind: "json", rows: 10, monospace: true, strict: true}, - }, { key: "accessKeyId", label: "Access key ID", placeholder: "Enter access key ID", - note: "This secret will be encrypted in transit and at rest.", model: ["bedrock", "sagemaker"], required: false, }, @@ -81,7 +44,13 @@ export const PROVIDER_FIELDS: { key: "accessKey", label: "Secret Access Key", placeholder: "Enter secret access key", - note: "This secret will be encrypted in transit and at rest.", + model: ["bedrock", "sagemaker"], + required: false, + }, + { + key: "region", + label: "AWS region", + placeholder: "Enter aws region", model: ["bedrock", "sagemaker"], required: false, }, @@ -89,7 +58,6 @@ export const PROVIDER_FIELDS: { key: "sessionToken", label: "Session token", placeholder: "Enter session token", - note: "This secret will be encrypted in transit and at rest.", model: [], required: false, }, diff --git a/web/oss/src/components/ModelRegistry/assets/LabelInput/index.tsx b/web/oss/src/components/ModelRegistry/assets/LabelInput/index.tsx index f91345db15..78e15c7347 100644 --- a/web/oss/src/components/ModelRegistry/assets/LabelInput/index.tsx +++ b/web/oss/src/components/ModelRegistry/assets/LabelInput/index.tsx @@ -1,5 +1,3 @@ -import {memo} from "react" - import {Input} from "antd" import {TextAreaProps} from "antd/es/input" import clsx from "clsx" @@ -15,12 +13,7 @@ const LabelInput = ({label, className, multiLine = false, ...props}: LabelInputP variant="borderless" className={clsx("px-0 rounded-none", className)} autoSize={{minRows: 1}} - style={{ - overflowY: "hidden", - overflowX: "hidden", - maxHeight: "none", - resize: "none", - }} + style={{overflow: "hidden", maxHeight: "none", resize: "none"}} {...(props as TextAreaProps)} /> ) : ( @@ -34,4 +27,4 @@ const LabelInput = ({label, className, multiLine = false, ...props}: LabelInputP ) } -export default memo(LabelInput) +export default LabelInput diff --git a/web/oss/src/components/NoMobilePageWrapper/NoMobilePageWrapper.tsx b/web/oss/src/components/NoMobilePageWrapper/NoMobilePageWrapper.tsx index 31c3b067a3..87d04d3fa1 100644 --- a/web/oss/src/components/NoMobilePageWrapper/NoMobilePageWrapper.tsx +++ b/web/oss/src/components/NoMobilePageWrapper/NoMobilePageWrapper.tsx @@ -1,5 +1,6 @@ import {type PropsWithChildren, useState, useCallback} from "react" +import {Transition} from "@headlessui/react" import {Typography, Button, theme} from "antd" import clsx from "clsx" import {useRouter} from "next/router" @@ -29,11 +30,8 @@ const NoMobilePageWrapper: React.FC = ({children}) => { (bounds: DOMRectReadOnly) => { setShouldDisplay(() => { if (dismissed) return false // keep hidden if already dismissed by the user - const pathSegments = pathname.split("/").filter(Boolean) - const isMobileUnoptimizedRoute = MOBILE_UNOPTIMIZED_APP_ROUTES.some((route) => - pathSegments.includes(route), - ) - if (!isMobileUnoptimizedRoute) return false + if (!MOBILE_UNOPTIMIZED_APP_ROUTES.some((route) => pathname.startsWith(route))) + return false return bounds.width < token.screenMD }) @@ -47,14 +45,24 @@ const NoMobilePageWrapper: React.FC = ({children}) => { setDismissed(true) } - return shouldDisplay ? ( -
Agenta works better in larger laptop or desktop screens. @@ -62,8 +70,8 @@ const NoMobilePageWrapper: React.FC = ({children}) => { -
- ) : null + + ) } export default NoMobilePageWrapper diff --git a/web/oss/src/components/NoMobilePageWrapper/assets/constants.ts b/web/oss/src/components/NoMobilePageWrapper/assets/constants.ts index 12baf6c21a..058d997c1f 100644 --- a/web/oss/src/components/NoMobilePageWrapper/assets/constants.ts +++ b/web/oss/src/components/NoMobilePageWrapper/assets/constants.ts @@ -1,9 +1,9 @@ -// Route segments where the component should be displayed +// List of routes where the component should be displayed export const MOBILE_UNOPTIMIZED_APP_ROUTES = [ - "apps", - "observability", - "settings", - "testsets", - "evaluations", - "workspaces", + "/apps", + "/observability", + "/settings", + "/testsets", + "/evaluations", + "/workspaces", ] diff --git a/web/oss/src/components/NoResultsFound/NoResultsFound.tsx b/web/oss/src/components/NoResultsFound/NoResultsFound.tsx index f740e7e239..daa05bc5c0 100644 --- a/web/oss/src/components/NoResultsFound/NoResultsFound.tsx +++ b/web/oss/src/components/NoResultsFound/NoResultsFound.tsx @@ -1,4 +1,4 @@ -import {Button, Typography} from "antd" +import {Typography} from "antd" import Image from "next/image" import {createUseStyles} from "react-jss" @@ -22,32 +22,15 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ }, })) -const NoResultsFound = ({ - className, - title, - description, - primaryActionLabel = "Create your first evaluator", - onPrimaryAction, -}: { - className?: string - title?: string - description?: string - primaryActionLabel?: string - onPrimaryAction?: () => void -}) => { +const NoResultsFound = ({className}: {className?: string}) => { const classes = useStyles() return (
not-found - {!title ? "No Results found" : title} + No Results found - {!description ? "No results match the search criteria." : description} + No results match the search criteria. - {onPrimaryAction ? ( - - ) : null}
) } diff --git a/web/oss/src/components/ParamsForm/index.tsx b/web/oss/src/components/ParamsForm/index.tsx index c2e71b8721..280cd2eab0 100644 --- a/web/oss/src/components/ParamsForm/index.tsx +++ b/web/oss/src/components/ParamsForm/index.tsx @@ -65,16 +65,13 @@ const ParamsForm: React.FC = ({ const imgHeight = imageSize === "small" ? 90 : 120 const chat = inputParams.find((param) => param.name === "chat")?.value - const inputParamsToRender = isChatVariant - ? inputParams.filter((p) => p.name !== "chat") - : inputParams return isChatVariant ? ( <>
{/*@ts-ignore*/} {(_, formInstance) => { - return inputParamsToRender.map((param, index) => { + return inputParams.map((param, index) => { const type = param.type === "file_url" ? "url" @@ -110,6 +107,7 @@ const ParamsForm: React.FC = ({ {type === "number" && ( = ({ {type === "string" && ( = ({ {/*@ts-ignore*/} {(_, formInstance) => { - return inputParamsToRender.map((param, index) => { + return inputParams.map((param, index) => { const type = param.type === "file_url" ? "url" @@ -211,6 +210,7 @@ const ParamsForm: React.FC = ({ {type === "number" && ( = ({ {type === "string" && ( void - onCancel: () => void - onAddMessage: () => void -} - -const ControlsBar: React.FC = ({isRunning, onRun, onCancel, onAddMessage}) => { - return ( -
- {!isRunning ? ( - - ) : ( - - )} - -
- ) -} - -export default ControlsBar diff --git a/web/oss/src/components/Playground/Components/ChatCommon/LastTurnFooterControls.tsx b/web/oss/src/components/Playground/Components/ChatCommon/LastTurnFooterControls.tsx deleted file mode 100644 index eec4f36cb6..0000000000 --- a/web/oss/src/components/Playground/Components/ChatCommon/LastTurnFooterControls.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React, {useMemo} from "react" - -import clsx from "clsx" -import {useAtomValue} from "jotai" - -import AddButton from "@/oss/components/Playground/assets/AddButton" -import RunButton from "@/oss/components/Playground/assets/RunButton" -import {isAnyRunningForLogicalAtomFamily} from "@/oss/state/newPlayground/chat/view" - -interface Props { - logicalId: string - onRun: () => void - onCancelAll: () => void - onAddMessage: () => void - className?: string -} - -const LastTurnFooterControls: React.FC = ({ - logicalId, - onRun, - onCancelAll, - onAddMessage, - className, -}) => { - const isAnyRunning = useAtomValue( - useMemo(() => isAnyRunningForLogicalAtomFamily(logicalId), [logicalId]), - ) as boolean - - return ( -
- {!isAnyRunning ? ( - - ) : ( - - )} - -
- ) -} - -export default LastTurnFooterControls diff --git a/web/oss/src/components/Playground/Components/ChatCommon/MessageEditor.tsx b/web/oss/src/components/Playground/Components/ChatCommon/MessageEditor.tsx deleted file mode 100644 index 0f5745294e..0000000000 --- a/web/oss/src/components/Playground/Components/ChatCommon/MessageEditor.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import React, {useMemo} from "react" - -import clsx from "clsx" - -import {EditorProvider} from "@/oss/components/Editor/Editor" -import SimpleDropdownSelect from "@/oss/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleDropdownSelect" -import SharedEditor from "@/oss/components/Playground/Components/SharedEditor" - -interface MessageEditorProps { - role: string - text: string - disabled?: boolean - className?: string - editorClassName?: string - headerClassName?: string - placeholder?: string - onChangeRole?: (v: string) => void - onChangeText?: (v: string) => void - headerRight?: React.ReactNode - footer?: React.ReactNode - noProvider?: boolean - roleOptions?: {label: string; value: string}[] - enableTokens?: boolean -} - -const MessageEditor: React.FC = ({ - id, - role, - text, - disabled, - className, - editorClassName, - headerClassName, - footerClassName, - placeholder, - onChangeRole, - onChangeText, - headerRight, - headerBottom, - footer, - isJSON, - isTool, - noProvider, - roleOptions, - enableTokens, - ...props -}) => { - // TODO: REPLACE WITH METADATA SELECTOR - const selectOptions = useMemo( - () => - roleOptions ?? [ - {label: "user", value: "user"}, - {label: "assistant", value: "assistant"}, - {label: "system", value: "system"}, - {label: "tool", value: "tool"}, - ], - [roleOptions], - ) - - return ( - -
- onChangeRole?.(v)} - disabled={disabled} - className="message-user-select" - /> - {headerRight} -
- {headerBottom} -
- } - editorType="border" - initialValue={text} - handleChange={(v: string) => onChangeText?.(v)} - editorClassName={editorClassName} - placeholder={placeholder} - disabled={disabled} - className={clsx("relative flex flex-col gap-1 rounded-[theme(spacing.2)]", className)} - footer={footer} - {...props} - editorProps={{ - codeOnly: isJSON, - // disabled: isTool, - noProvider: true, - enableTokens: Boolean(enableTokens), - // tokens: variables, - showToolbar: false, - }} - noProvider={true} - /> - ) -} - -const MessageEditorWrapper = ({isJSON, ...props}) => { - return ( - - - - ) -} - -export default MessageEditorWrapper diff --git a/web/oss/src/components/Playground/Components/Drawers/TestsetDrawer/index.tsx b/web/oss/src/components/Playground/Components/Drawers/TestsetDrawer/index.tsx index ce4e5ac75e..1a252cfc94 100644 --- a/web/oss/src/components/Playground/Components/Drawers/TestsetDrawer/index.tsx +++ b/web/oss/src/components/Playground/Components/Drawers/TestsetDrawer/index.tsx @@ -9,7 +9,6 @@ import {getResponseLazy} from "@/oss/lib/hooks/useStatelessVariants/state" import EnhancedButton from "../../../assets/EnhancedButton" import {TestsetDrawerButtonProps} from "./types" - const TestsetDrawer = dynamic( () => import("@/oss/components/pages/observability/drawer/TestsetDrawer/TestsetDrawer"), ) @@ -45,12 +44,8 @@ const TestsetDrawerButton = ({ const extractedData = traces ?.map((result, idx) => { return { - data: - (result?.response?.tree?.nodes?.[0]?.data as Record) || - result?.response?.data, - key: - (result?.response?.tree?.nodes?.[0]?.node?.id as string) || - result?.response?.span_id, + data: result?.response?.tree?.nodes?.[0]?.data as Record, + key: result?.response?.tree?.nodes?.[0]?.node?.id as string, id: idx + 1, } }) @@ -59,34 +54,6 @@ const TestsetDrawerButton = ({ return extractedData }, [resultHashes, results, isTestsetDrawerOpen]) - // Count of valid result hashes (may include failed ones; see validResultsCount for success only) - // const isResults = useMemo(() => resultHashes?.filter(Boolean)?.length, [resultHashes]) - // Count only successful results (those that have response data) - const validResultsCount = useMemo(() => { - // Direct results prop (rare path) - if (results) { - const arr = Array.isArray(results) ? results : [results] - return arr.filter((r: any) => { - const data = - (r?.response?.tree?.nodes?.[0]?.data as Record) || - r?.response?.data - return Boolean(data) - }).length - } - - // Hash-based results (common path) - const hashes = Array.isArray(resultHashes) ? resultHashes : [resultHashes] - return hashes - .map((h) => (h ? getResponseLazy(h) : null)) - .filter(Boolean) - .filter((r: any) => { - const data = - (r?.response?.tree?.nodes?.[0]?.data as Record) || - r?.response?.data - return Boolean(data) - }).length - }, [results, resultHashes]) - return ( <> {isValidElement(children) ? ( @@ -96,7 +63,6 @@ const TestsetDrawerButton = ({ }>, { onClick: () => { - if (validResultsCount <= 0) return onClickTestsetDrawer?.(messageId) setIsTestsetDrawerOpen(true) }, @@ -104,18 +70,13 @@ const TestsetDrawerButton = ({ ) ) : ( } - // Enable only when there is at least one successful generation - disabled={validResultsCount <= 0 || props.disabled} - tooltipProps={{ - title: validResultsCount <= 0 ? "No successful generations to add" : "", - }} onClick={() => { onClickTestsetDrawer?.(messageId) setIsTestsetDrawerOpen(true) }} + {...props} /> )} diff --git a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/TraceDrawer.tsx b/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/TraceDrawer.tsx deleted file mode 100644 index c677d0bf80..0000000000 --- a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/TraceDrawer.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import {useCallback, useEffect, useRef, useState} from "react" - -import {CloseOutlined, FullscreenExitOutlined, FullscreenOutlined} from "@ant-design/icons" -import {Button, Splitter, Spin} from "antd" -import {useAtomValue, useSetAtom} from "jotai" -import dynamic from "next/dynamic" - -import EnhancedDrawer from "@/oss/components/EnhancedUIs/Drawer" -import useTraceDrawer from "@/oss/components/pages/observability/drawer/hooks/useTraceDrawer" -import TraceSidePanel from "@/oss/components/pages/observability/drawer/TraceSidePanel" -import {useObservability} from "@/oss/state/newObservability" -import {useQueryParamState} from "@/oss/state/appState" -import {clearTraceParamAtom} from "@/oss/state/url" - -import { - isDrawerOpenAtom, - closeTraceDrawerAtom, - setTraceDrawerActiveSpanAtom, - setTraceDrawerTraceAtom, -} from "./store/traceDrawerStore" - -const TraceContent = dynamic( - () => import("@/oss/components/pages/observability/drawer/TraceContent"), -) -const TraceHeader = dynamic(() => import("@/oss/components/pages/observability/drawer/TraceHeader")) -const TraceTree = dynamic(() => import("@/oss/components/pages/observability/drawer/TraceTree")) - -const TraceDrawer = () => { - const open = useAtomValue(isDrawerOpenAtom) - const closeDrawer = useSetAtom(closeTraceDrawerAtom) - const clearTraceParam = useSetAtom(clearTraceParamAtom) - const [selected, setSelected] = useState("") - const {traces, activeSpanId, getTraceById, traceResponse, error, isLoading, traceId} = - useTraceDrawer() - const initialWidth = 1200 - const [drawerWidth, setDrawerWidth] = useState(initialWidth) - - const [isAnnotationsSectionOpen, setIsAnnotationsSectionOpen] = useState(true) - const { - traceTabs, - filters, - sort, - limit, - setSelectedTraceId: setGlobalSelectedTraceId, - setSelectedNode: setGlobalSelectedNode, - } = useObservability() - const setActiveSpan = useSetAtom(setTraceDrawerActiveSpanAtom) - const setTraceDrawerTrace = useSetAtom(setTraceDrawerTraceAtom) - const [, setTraceQueryParam] = useQueryParamState("trace") - const [, setSpanQueryParam] = useQueryParamState("span") - - // Initialize selection when drawer payload changes - const lastPayloadActiveIdRef = useRef(undefined) - - useEffect(() => { - const incomingId = activeSpanId || traces[0]?.span_id || "" - if (!incomingId) { - setSelected("") - lastPayloadActiveIdRef.current = undefined - return - } - - const hasChanged = lastPayloadActiveIdRef.current !== incomingId - lastPayloadActiveIdRef.current = incomingId - - if (hasChanged || !selected) { - setSelected(incomingId) - } - }, [activeSpanId, traces, selected]) - - // If current selection is not found in the latest traces (e.g., user clicked a different row), re-anchor - useEffect(() => { - if (selected && traces.length > 0) { - const exists = getTraceById(selected) - if (!exists) { - setSelected(activeSpanId || traces[0]?.span_id || "") - } - } - }, [selected, traces, activeSpanId, getTraceById]) - - useEffect(() => { - if (selected) { - setActiveSpan(selected) - setSpanQueryParam(selected, {shallow: true}) - } else { - setSpanQueryParam(undefined, {shallow: true}) - } - }, [selected, setActiveSpan, setSpanQueryParam]) - - // Keep component mounted; EnhancedDrawer handles destroyOnHidden. We gate heavy work via memos. - - const activeId = selected || traces[0]?.span_id || "" - const activeTrace = getTraceById(activeId) - - const handleAfterOpenChange = useCallback( - (isOpen: boolean) => { - if (!isOpen) { - clearTraceParam() - setSpanQueryParam(undefined, {shallow: true}) - } - }, - [clearTraceParam, setSpanQueryParam], - ) - - const header = ( -
-
- ) - - return ( - -
- -
- - - - - - - - {isAnnotationsSectionOpen && ( - - - - )} - -
-
-
-
- ) -} - -export default TraceDrawer diff --git a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/index.tsx b/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/index.tsx index 188aca2a00..90ece97bce 100644 --- a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/index.tsx +++ b/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/index.tsx @@ -1,15 +1,29 @@ -import {cloneElement, isValidElement, useCallback, useMemo} from "react" +import {cloneElement, isValidElement, useEffect, useMemo, useState} from "react" import {TreeView} from "@phosphor-icons/react" import {Button} from "antd" import clsx from "clsx" -import {useSetAtom} from "jotai" +import dynamic from "next/dynamic" + +import TraceSidePanel from "@/oss/components/pages/observability/drawer/TraceSidePanel" +import { + buildNodeTree, + getNodeById, + observabilityTransformer, +} from "@/oss/lib/helpers/observability_helpers" +import useAnnotations from "@/oss/lib/hooks/useAnnotations" +import {attachAnnotationsToTraces} from "@/oss/lib/hooks/useAnnotations/assets/helpers" +import {_AgentaRootsResponse, AgentaNodeDTO} from "@/oss/services/observability/types" -import {useQueryParamState} from "@/oss/state/appState" - -import {openTraceDrawerAtom, setTraceDrawerActiveSpanAtom} from "./store/traceDrawerStore" import {TraceDrawerButtonProps} from "./types" +const GenericDrawer = dynamic(() => import("@/oss/components/GenericDrawer")) +const TraceContent = dynamic( + () => import("@/oss/components/pages/observability/drawer/TraceContent"), +) +const TraceHeader = dynamic(() => import("@/oss/components/pages/observability/drawer/TraceHeader")) +const TraceTree = dynamic(() => import("@/oss/components/pages/observability/drawer/TraceTree")) + const TraceDrawerButton = ({ label, icon = true, @@ -17,135 +31,117 @@ const TraceDrawerButton = ({ result, ...props }: TraceDrawerButtonProps) => { - const setActiveSpan = useSetAtom(setTraceDrawerActiveSpanAtom) - const openTraceDrawer = useSetAtom(openTraceDrawerAtom) - const [, setTraceQueryParam] = useQueryParamState("trace") - const [, setSpanQueryParam] = useQueryParamState("span") - - const traceId = useMemo(() => { - const directTraceId = - result?.response?.trace_id || result?.metadata?.rawError?.detail?.trace_id - if (directTraceId) return directTraceId - - const responseTrace = (result as any)?.response?.trace - if (responseTrace?.trace_id) return responseTrace.trace_id - - const nodes = (result as any)?.response?.tree?.nodes - const extractTraceId = (value: any): string | null => { - if (!value) return null - if (Array.isArray(value)) { - for (const entry of value) { - const found = extractTraceId(entry) - if (found) return found - } - return null - } - if (typeof value === "object") { - return ( - value.trace_id || - value.span_id || - value?.node?.trace_id || - value?.node?.id || - null - ) - } - return null - } - - if (!nodes) return undefined - if (Array.isArray(nodes)) { - return extractTraceId(nodes) - } - - for (const value of Object.values(nodes)) { - const found = extractTraceId(value) - if (found) return found - } - - return undefined - }, [result]) - - const handleOpen = useCallback(() => { - if (!traceId) return - - const deriveActiveSpan = (): string | null => { - const nodes = (result as any)?.response?.tree?.nodes - if (!nodes) return null - - const pickSpan = (node: any) => node?.span_id || node?.trace_id || null - - if (Array.isArray(nodes)) { - return pickSpan(nodes[0]) - } - - const first = Object.values(nodes)[0] - if (Array.isArray(first)) { - return pickSpan(first[0]) - } - - return pickSpan(first) + const [selected, setSelected] = useState("") + const [isTraceDrawerOpen, setIsTraceDrawerOpen] = useState(false) + const traceSpans = result?.response?.tree + const {data: annotations} = useAnnotations() + + const [isAnnotationsSectionOpen, setIsAnnotationsSectionOpen] = useState(true) + + const traces = useMemo(() => { + if (traceSpans) { + const rawTraces = traceSpans.nodes + .flatMap((node) => buildNodeTree(node as AgentaNodeDTO)) + .flatMap((item: any) => observabilityTransformer(item)) + return attachAnnotationsToTraces(rawTraces, annotations || []) } + return [] + }, [traceSpans, annotations]) + + const activeTrace = useMemo( + () => + traces + ? traces[0] ?? null + : result?.error + ? ({ + exception: result?.metadata?.rawError, + node: {name: "Exception"}, + status: {code: "ERROR"}, + } as _AgentaRootsResponse) + : null, + [traces], + ) - const nextActiveSpan = deriveActiveSpan() - openTraceDrawer({traceId, activeSpanId: nextActiveSpan}) - setActiveSpan(nextActiveSpan) - setTraceQueryParam(traceId, {shallow: true}) - if (nextActiveSpan) { - setSpanQueryParam(nextActiveSpan, {shallow: true}) - } else { - setSpanQueryParam(undefined, {shallow: true}) + useEffect(() => { + if (!selected) { + setSelected(activeTrace?.node.id ?? "") } - }, [traceId, result, openTraceDrawer, setActiveSpan, setTraceQueryParam, setSpanQueryParam]) - - const hasTrace = useMemo(() => { - const nodes = (result as any)?.response?.tree?.nodes - const hasNodes = (() => { - if (!nodes) return false - if (Array.isArray(nodes)) { - return nodes.length > 0 - } - if (typeof nodes === "object") { - return Object.values(nodes).some((value) => { - if (!value) return false - if (Array.isArray(value)) { - return value.length > 0 - } - if (typeof value === "object") { - return Object.keys(value).length > 0 - } - return false - }) - } - return false - })() + }, [activeTrace, selected]) - return hasNodes || Boolean(result?.response?.trace) || Boolean(result?.error) - }, [result]) + const selectedItem = useMemo( + () => (traces?.length ? getNodeById(traces, selected) : null), + [selected, traces], + ) return ( <> {isValidElement(children) ? ( cloneElement( - children as React.ReactElement<{onClick: () => void; loading?: boolean}>, + children as React.ReactElement<{ + onClick: () => void + }>, { - onClick: handleOpen, + onClick: () => { + setIsTraceDrawerOpen(true) + }, }, ) ) : ( )} + + {isTraceDrawerOpen && ( + setIsTraceDrawerOpen(false)} + expandable + headerExtra={ + !!activeTrace && !!traces ? ( + setIsTraceDrawerOpen(false)} + activeTraceIndex={0} + setIsAnnotationsSectionOpen={setIsAnnotationsSectionOpen} + isAnnotationsSectionOpen={isAnnotationsSectionOpen} + /> + ) : null + } + mainContent={ + activeTrace ? ( + + ) : null + } + sideContent={ + activeTrace ? ( + + ) : null + } + extraContent={ + isAnnotationsSectionOpen && + selectedItem && + } + externalKey={`extraContent-${isAnnotationsSectionOpen}`} + className="[&_.ant-drawer-body]:p-0" + /> + )} ) } export default TraceDrawerButton -export {default as TraceDrawer} from "./TraceDrawer" diff --git a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/atoms.ts b/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/atoms.ts deleted file mode 100644 index 6b9589aa21..0000000000 --- a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/atoms.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {atom} from "jotai" - -import {TestResult} from "@/oss/lib/shared/variant/transformer/types" - -export interface TraceDrawerState { - open: boolean - result: TestResult | null -} - -export const traceDrawerAtom = atom({open: false, result: null}) diff --git a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/traceDrawerStore.ts b/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/traceDrawerStore.ts deleted file mode 100644 index eb5017aa80..0000000000 --- a/web/oss/src/components/Playground/Components/Drawers/TraceDrawer/store/traceDrawerStore.ts +++ /dev/null @@ -1,76 +0,0 @@ -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" -import {atomWithQuery} from "jotai-tanstack-query" - -import {fetchPreviewTrace} from "@/oss/services/tracing/api" - -export interface TraceDrawerState { - open: boolean - traceId: string | null - activeSpanId: string | null -} - -export const initialTraceDrawerState: TraceDrawerState = { - open: false, - traceId: null, - activeSpanId: null, -} - -export const traceDrawerAtom = atomWithImmer(initialTraceDrawerState) - -export const isDrawerOpenAtom = atom((get) => get(traceDrawerAtom).open) -export const traceDrawerTraceIdAtom = atom((get) => get(traceDrawerAtom).traceId) -export const traceDrawerActiveSpanIdAtom = atom((get) => get(traceDrawerAtom).activeSpanId) - -export const resetTraceDrawerAtom = atom(null, (_get, set) => { - set(traceDrawerAtom, initialTraceDrawerState) -}) - -export const closeTraceDrawerAtom = atom(null, (_get, set) => { - set(traceDrawerAtom, (draft) => { - draft.open = false - }) -}) - -export const openTraceDrawerAtom = atom( - null, - (_get, set, payload: {traceId: string; activeSpanId?: string | null}) => { - set(traceDrawerAtom, (draft) => { - draft.open = true - draft.traceId = payload.traceId - draft.activeSpanId = payload.activeSpanId ?? null - }) - }, -) - -export const setTraceDrawerActiveSpanAtom = atom(null, (_get, set, activeSpanId: string | null) => { - set(traceDrawerAtom, (draft) => { - draft.activeSpanId = activeSpanId - }) -}) - -export const setTraceDrawerTraceAtom = atom( - null, - (_get, set, payload: {traceId: string; activeSpanId?: string | null}) => { - set(traceDrawerAtom, (draft) => { - draft.traceId = payload.traceId - if (payload.activeSpanId !== undefined) { - draft.activeSpanId = payload.activeSpanId - } - }) - }, -) - -export const traceDrawerQueryAtom = atomWithQuery((get) => { - const traceId = get(traceDrawerTraceIdAtom) - - return { - queryKey: ["trace-drawer", traceId ?? "none"], - enabled: Boolean(traceId), - refetchOnWindowFocus: false, - queryFn: async () => { - if (!traceId) return null - return fetchPreviewTrace(traceId) - }, - } -}) diff --git a/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantConfigSkeleton.tsx b/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantConfigSkeleton.tsx deleted file mode 100644 index c981533eb3..0000000000 --- a/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantConfigSkeleton.tsx +++ /dev/null @@ -1,32 +0,0 @@ -interface ComparisonVariantConfigSkeletonProps { - count?: number - isComparisonView?: boolean -} - -const ComparisonVariantConfigSkeleton = ({ - count = 2, - isComparisonView = false, -}: ComparisonVariantConfigSkeletonProps) => { - return Array.from({length: count}).map((_, index) => ( -
-
-
-
-
-
-
-
-
-
-
- )) -} - -export default ComparisonVariantConfigSkeleton diff --git a/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantNavigationSkeleton.tsx b/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantNavigationSkeleton.tsx deleted file mode 100644 index 7586c1880f..0000000000 --- a/web/oss/src/components/Playground/Components/MainLayout/assets/ComparisonVariantNavigationSkeleton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -const ComparisonVariantNavigationSkeleton = () => { - return ( -
-
-
- {[1, 2, 3].map((index) => ( -
-
-
-
-
- ))} -
-
- ) -} - -export default ComparisonVariantNavigationSkeleton diff --git a/web/oss/src/components/Playground/Components/MainLayout/assets/GenerationPanelSkeleton.tsx b/web/oss/src/components/Playground/Components/MainLayout/assets/GenerationPanelSkeleton.tsx deleted file mode 100644 index 779b06a1d4..0000000000 --- a/web/oss/src/components/Playground/Components/MainLayout/assets/GenerationPanelSkeleton.tsx +++ /dev/null @@ -1,19 +0,0 @@ -const GenerationPanelSkeleton = () => { - return ( -
-
-
-
-
-
-
-
-
-
-
-
-
- ) -} - -export default GenerationPanelSkeleton diff --git a/web/oss/src/components/Playground/Components/MainLayout/index.tsx b/web/oss/src/components/Playground/Components/MainLayout/index.tsx index 123d3d2711..e35cd5185b 100644 --- a/web/oss/src/components/Playground/Components/MainLayout/index.tsx +++ b/web/oss/src/components/Playground/Components/MainLayout/index.tsx @@ -1,99 +1,55 @@ -import React from "react" -import {memo, useCallback, useEffect, useRef} from "react" +import {useCallback, useEffect, useRef, useState} from "react" -import {Typography, Button, Splitter} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" +import dynamic from "next/dynamic" +import useAnimationFrame from "use-animation-frame" -import {generationInputRowIdsAtom} from "@/oss/components/Playground/state/atoms/generationProperties" -import {chatTurnIdsAtom} from "@/oss/state/generation/entities" -import {appStatusAtom} from "@/oss/state/variant/atoms/appStatus" -import {appStatusLoadingAtom} from "@/oss/state/variant/atoms/fetcher" - -import {usePlaygroundScrollSync} from "../../hooks/usePlaygroundScrollSync" -import {displayedVariantsAtom, isComparisonViewAtom, appChatModeAtom} from "../../state/atoms" +import usePlayground from "../../hooks/usePlayground" import {GenerationComparisonOutput} from "../PlaygroundGenerationComparisonView" import PlaygroundComparisonGenerationInputHeader from "../PlaygroundGenerationComparisonView/assets/GenerationComparisonInputHeader/index." import GenerationComparisonOutputHeader from "../PlaygroundGenerationComparisonView/assets/GenerationComparisonOutputHeader" import GenerationComparisonHeader from "../PlaygroundGenerationComparisonView/GenerationComparisonHeader" -import PlaygroundGenerations from "../PlaygroundGenerations" -import PromptComparisonVariantNavigation from "../PlaygroundPromptComparisonView/PromptComparisonVariantNavigation" -import PlaygroundVariantConfig from "../PlaygroundVariantConfig" import type {BaseContainerProps} from "../types" -import ComparisonVariantConfigSkeleton from "./assets/ComparisonVariantConfigSkeleton" -import ComparisonVariantNavigationSkeleton from "./assets/ComparisonVariantNavigationSkeleton" -import GenerationPanelSkeleton from "./assets/GenerationPanelSkeleton" - -interface MainLayoutProps extends BaseContainerProps { - isLoading?: boolean -} - -const SplitterPanel = Splitter.Panel - -const GenerationComparisonRenderer = memo(() => { - // Variables rows (inputs) and logical chat turn ids - const rowIds = useAtomValue(generationInputRowIdsAtom) - const turnIds = useAtomValue(chatTurnIdsAtom) - const isChat = useAtomValue(appChatModeAtom) - - if (isChat === undefined) return null - - const sourceIds = isChat ? turnIds : rowIds - - return (sourceIds || []).map((rowId, rowIndex) => ( -
-
- -
-
- )) +const PromptComparisonVariantNavigation = dynamic( + () => import("../PlaygroundPromptComparisonView/PromptComparisonVariantNavigation"), + {ssr: false}, +) +const PlaygroundVariantConfig = dynamic(() => import("../PlaygroundVariantConfig"), {ssr: false}) +const PlaygroundGenerations = dynamic(() => import("../PlaygroundGenerations"), { + ssr: false, }) +const Splitter = dynamic(() => import("antd").then((mod) => mod.Splitter), {ssr: false}) +const SplitterPanel = dynamic(() => import("antd").then((mod) => mod.Splitter.Panel), {ssr: false}) -const PlaygroundMainView = ({className, isLoading = false, ...divProps}: MainLayoutProps) => { - const isComparisonView = useAtomValue(isComparisonViewAtom) - const displayedVariants = useAtomValue(displayedVariantsAtom) - - const appStatus = useAtomValue(appStatusAtom) - const appStatusLoading = useAtomValue(appStatusLoadingAtom) +const PlaygroundMainView = ({className, ...divProps}: BaseContainerProps) => { + const { + rowIds, + isComparisonView, + visibleVariants: displayedVariants, + } = usePlayground({ + stateSelector: (state) => { + const isChat = state.variants?.[0]?.isChat + const isComparisonView = state.selected.length > 1 + let rowIds = [] as string[] - const hasDisplayedVariantIds = displayedVariants && displayedVariants.length > 0 + if (isChat) { + const messageRows = state.generationData.messages.value || [] + rowIds = messageRows.map((message) => message.__id).filter(Boolean) + } else { + const inputs = state.generationData.inputs.value || [] + rowIds = inputs.map((input) => input.__id) + } - // Only show skeleton when we don't have variant IDs yet (very early loading) - // Once we have IDs, render the components and let them handle their own loading - const shouldShowVariantConfigSkeleton = - appStatusLoading || (isLoading && !hasDisplayedVariantIds) - const shouldShowGenerationSkeleton = appStatusLoading || (isLoading && !hasDisplayedVariantIds) - const notReachable = !appStatusLoading && !appStatus - const variantRefs = useRef<(HTMLDivElement | null)[]>([]) - const {setConfigPanelRef, setGenerationPanelRef} = usePlaygroundScrollSync({ - enabled: isComparisonView, + return { + rowIds, + isComparisonView, + visibleVariants: state.selected, + } + }, }) - useEffect(() => { - if (process.env.NODE_ENV !== "production") { - console.info("[PlaygroundMainView] state", { - displayedVariants, - isComparisonView, - shouldShowVariantConfigSkeleton, - shouldShowGenerationSkeleton, - appStatus, - appStatusLoading, - }) - } - }, [ - displayedVariants, - isComparisonView, - shouldShowVariantConfigSkeleton, - shouldShowGenerationSkeleton, - appStatus, - appStatusLoading, - ]) + const variantRefs = useRef<(HTMLDivElement | null)[]>([]) const handleScroll = useCallback( (index: number) => { @@ -106,17 +62,80 @@ const PlaygroundMainView = ({className, isLoading = false, ...divProps}: MainLay [variantRefs], ) - return notReachable ? ( -
-
- Something went wrong - - Playground is unable to communicate with the service - - -
-
- ) : ( + /** + * Scroll Sync Login + * to be extracted to a custom hook once it is refined and tested + */ + + const [configPanelRef, setConfigPanelRef] = useState(null) + const [generationPanelRef, setGenerationPanelRef] = useState(null) + const scrollingRef = useRef<{ + scrolling: HTMLElement + target: HTMLElement + } | null>(null) + + useAnimationFrame(({time}) => { + const isScrolling = scrollingRef.current + + if (!isScrolling || !configPanelRef) return + + const {scrolling, target} = isScrolling + + if (scrolling && target) { + target.scrollLeft = scrolling.scrollLeft + } + }) + + useEffect(() => { + const configPanel = configPanelRef + + const scrollHandle = (e: Event) => { + if (scrollingRef.current) return + if (!isComparisonView) return + + const elm = e.target as HTMLElement + + const scrolling = elm.isSameNode(configPanel) ? configPanel : generationPanelRef + + if (!scrolling) return + + const target = scrolling!.isSameNode(configPanel) ? generationPanelRef : configPanel + + if (!target) return + + scrollingRef.current = { + scrolling, + target, + } + } + const scrollEndHandle = () => { + scrollingRef.current = null + } + + if (configPanel) { + configPanel.addEventListener("scroll", scrollHandle) + configPanel.addEventListener("scrollend", scrollEndHandle) + } + + if (generationPanelRef) { + generationPanelRef.addEventListener("scroll", scrollHandle) + generationPanelRef.addEventListener("scrollend", scrollEndHandle) + } + + return () => { + if (configPanel) { + configPanel.removeEventListener("scroll", scrollHandle) + configPanel.removeEventListener("scroll", scrollEndHandle) + } + + if (generationPanelRef) { + generationPanelRef.removeEventListener("scroll", scrollHandle) + generationPanelRef.removeEventListener("scroll", scrollEndHandle) + } + } + }, [isComparisonView, configPanelRef, generationPanelRef]) + + return (
- {isComparisonView && - (shouldShowVariantConfigSkeleton ? ( - - ) : ( - - ))} - {shouldShowVariantConfigSkeleton ? ( - - ) : ( - (displayedVariants || []).map((variant, index) => { - // Handle both object and string cases for displayedVariants - const variantId = - typeof variant === "string" ? variant : variant?.id - - return ( -
{ - variantRefs.current[index] = el - }} - > - -
- ) - }) )} + {(displayedVariants || []).map((variantId, index) => { + return ( +
{ + variantRefs.current[index] = el + }} + > + +
+ ) + })} @@ -195,6 +200,7 @@ const PlaygroundMainView = ({className, isLoading = false, ...divProps}: MainLay key={`${isComparisonView ? "comparison" : "single"}-splitter-panel-runs`} > {isComparisonView && } +
) : null} - {/* ATOM-LEVEL OPTIMIZATION: Generation components using focused atom subscriptions - Comparison view: Uses rowIds from generationRowIdsAtom (chat/input rows) - Single view: Uses displayedVariants for individual variant generations */} - {shouldShowGenerationSkeleton ? ( - - ) : isComparisonView ? ( - - ) : ( - (displayedVariants || []).map((variantId) => { - // return null - return ( - - ) - }) - )} + {/* This component renders Output components based on the view type. + If the view is 'comparison', it uses generationData to render the component. + In 'single' view, it uses the variant id to render the component. */} + {isComparisonView + ? ((rowIds as string[]) || []).map((rowId, rowIndex) => { + return ( +
+ {/*
*/} + +
+ ) + }) + : (displayedVariants || []).map((variantId) => { + return ( + + ) + })}
@@ -247,4 +258,4 @@ const PlaygroundMainView = ({className, isLoading = false, ...divProps}: MainLay ) } -export default memo(PlaygroundMainView) +export default PlaygroundMainView diff --git a/web/oss/src/components/Playground/Components/Menus/PlaygroundCreateNewVariant/assets/CreateNewVariantList.tsx b/web/oss/src/components/Playground/Components/Menus/PlaygroundCreateNewVariant/assets/CreateNewVariantList.tsx index 5bf128075a..44184d2829 100644 --- a/web/oss/src/components/Playground/Components/Menus/PlaygroundCreateNewVariant/assets/CreateNewVariantList.tsx +++ b/web/oss/src/components/Playground/Components/Menus/PlaygroundCreateNewVariant/assets/CreateNewVariantList.tsx @@ -3,13 +3,9 @@ import {useState, useMemo, useCallback} from "react" import {Check} from "@phosphor-icons/react" import {Button, Input} from "antd" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" import {useDebounceValue} from "usehooks-ts" -import { - toggleVariantDisplayMutationAtom, - variantListDisplayFilteredAtomFamily, -} from "../../../../state/atoms" +import usePlayground from "../../../../hooks/usePlayground" import NewVariantButton from "../../../Modals/CreateVariantModal/assets/NewVariantButton" import {useStyles} from "./styles" @@ -27,19 +23,22 @@ const CreateNewVariantList = ({ const [debouncedQuery] = useDebounceValue(query, 300) - // Use filtered display list from atoms - const variantsDisplay = useAtomValue(variantListDisplayFilteredAtomFamily(debouncedQuery)) - const toggleVariantDisplay = useSetAtom(toggleVariantDisplayMutationAtom) + const {variantsList, toggleVariantDisplay} = usePlayground({ + stateSelector: (state) => ({ + variantsList: state.variants.map((variant) => ({ + variantId: variant.id, + variantName: variant.variantName, + })), + }), + }) - const variantsList = useMemo(() => { - return (variantsDisplay || []).map((v: any) => ({ - variantId: v.id, - variantName: v.name, - })) - }, [variantsDisplay]) - - // Atom already filters; keep memoized mapped list only - const filteredVariants = variantsList + // Memoized filtered variants + const filteredVariants = useMemo(() => { + if (!debouncedQuery) return variantsList + return variantsList.filter((variant) => + variant.variantName.toLowerCase().includes(debouncedQuery), + ) + }, [variantsList, debouncedQuery]) const handleSearch = useCallback((e: React.ChangeEvent) => { const value = e.target.value diff --git a/web/oss/src/components/Playground/Components/Menus/PlaygroundGenerationVariableMenu/index.tsx b/web/oss/src/components/Playground/Components/Menus/PlaygroundGenerationVariableMenu/index.tsx index c4796a79c3..0b0c418134 100644 --- a/web/oss/src/components/Playground/Components/Menus/PlaygroundGenerationVariableMenu/index.tsx +++ b/web/oss/src/components/Playground/Components/Menus/PlaygroundGenerationVariableMenu/index.tsx @@ -13,11 +13,6 @@ const PlaygroundGenerationVariableMenu: React.FC { - const isResults = useMemo( - () => (Array.isArray(resultHash) ? resultHash : [resultHash])?.filter(Boolean)?.length, - [resultHash], - ) - const items: MenuProps["items"] = useMemo( () => [ { @@ -30,16 +25,15 @@ const PlaygroundGenerationVariableMenu: React.FC -
Add to testset
+
Add to test set
), icon: , - disabled: !isResults, onClick: (e) => { e.domEvent.stopPropagation() }, diff --git a/web/oss/src/components/Playground/Components/Menus/PlaygroundVariantHeaderMenu/index.tsx b/web/oss/src/components/Playground/Components/Menus/PlaygroundVariantHeaderMenu/index.tsx index c7073012ab..5ee73db332 100644 --- a/web/oss/src/components/Playground/Components/Menus/PlaygroundVariantHeaderMenu/index.tsx +++ b/web/oss/src/components/Playground/Components/Menus/PlaygroundVariantHeaderMenu/index.tsx @@ -2,18 +2,11 @@ import {useCallback, useMemo} from "react" import {MoreOutlined} from "@ant-design/icons" import {ArrowCounterClockwise, Copy, PencilSimple, Trash} from "@phosphor-icons/react" -import {Button, Dropdown, MenuProps, message} from "antd" -import {useAtomValue, useSetAtom} from "jotai" +import {Button, Dropdown, MenuProps} from "antd" -import {selectedVariantsAtom} from "@/oss/components/Playground/state/atoms" -import {parametersOverrideAtomFamily} from "@/oss/components/Playground/state/atoms" -import {clearLocalCustomPropsForRevisionAtomFamily} from "@/oss/state/newPlayground/core/customProperties" -import { - clearLocalPromptsForRevisionAtomFamily, - clearLocalTransformedPromptsForRevisionAtomFamily, -} from "@/oss/state/newPlayground/core/prompts" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" -import {removeVariantFromSelectionMutationAtom} from "../../../state/atoms/variantCrudMutations" import DeleteVariantButton from "../../Modals/DeleteVariantModal/assets/DeleteVariantButton" import {PlaygroundVariantHeaderMenuProps} from "./types" @@ -22,43 +15,31 @@ const PlaygroundVariantHeaderMenu: React.FC = variantId, ...props }) => { - const selectedVariants = useAtomValue(selectedVariantsAtom) - const removeVariantFromSelection = useSetAtom(removeVariantFromSelectionMutationAtom) - - const closePanelDisabled = useMemo(() => { - return selectedVariants.length === 1 && selectedVariants.includes(variantId) - }, [selectedVariants, variantId]) + const {mutate, closePanelDisabled} = usePlayground({ + stateSelector: useCallback( + (state: PlaygroundStateData) => { + return { + closePanelDisabled: + state.selected.length === 1 && state.selected.includes(variantId), + } + }, + [variantId], + ), + }) const handleClosePanel = useCallback(() => { - removeVariantFromSelection(variantId) - }, [removeVariantFromSelection, variantId]) - - const clearPrompts = useSetAtom(clearLocalPromptsForRevisionAtomFamily(variantId || "") as any) - const clearTransformed = useSetAtom( - clearLocalTransformedPromptsForRevisionAtomFamily(variantId || "") as any, - ) - const clearCustomProps = useSetAtom( - clearLocalCustomPropsForRevisionAtomFamily(variantId || "") as any, - ) - const setParamsOverride = useSetAtom(parametersOverrideAtomFamily(variantId || "") as any) + mutate((clonedState) => { + if (!clonedState) return clonedState + const previousSelected = [...clonedState.selected] + previousSelected.splice( + previousSelected.findIndex((id) => id === variantId), + 1, + ) - const handleDiscardDraft: NonNullable = (e) => { - e?.domEvent?.stopPropagation() - if (!variantId) return - try { - clearPrompts() - clearCustomProps() - clearTransformed() - setParamsOverride(null) - // Prune dynamically added variables and re-add current ones based on prompts - - message.success("Draft changes discarded") - } catch (err) { - message.error("Failed to discard draft changes") - - console.error(err) - } - } + clonedState.selected = previousSelected + return clonedState + }) + }, [variantId]) const items: MenuProps["items"] = useMemo( () => [ @@ -81,13 +62,6 @@ const PlaygroundVariantHeaderMenu: React.FC = }, }, {type: "divider"}, - { - key: "revert", - label: "Revert Changes", - icon: , - onClick: handleDiscardDraft, - disabled: !variantId, - }, { key: "clone", label: "Clone", @@ -126,7 +100,7 @@ const PlaygroundVariantHeaderMenu: React.FC = }, }, ], - [handleClosePanel, closePanelDisabled, variantId, handleDiscardDraft], + [handleClosePanel, closePanelDisabled, variantId], ) return ( diff --git a/web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx b/web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx index 82e2ebd88a..aa32e27f91 100644 --- a/web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx +++ b/web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx @@ -3,58 +3,101 @@ import {useCallback, useMemo, useState} from "react" import {ArrowsLeftRight} from "@phosphor-icons/react" import {TreeSelect, Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" +import groupBy from "lodash/groupBy" +import uniqBy from "lodash/uniqBy" import VariantDetailsWithStatus from "@/oss/components/VariantDetailsWithStatus" import EnvironmentStatus from "@/oss/components/VariantDetailsWithStatus/components/EnvironmentStatus" +import {CamelCaseEnvironment} from "@/oss/lib/Types" import AddButton from "../../../assets/AddButton" -import {variantOptionsAtomFamily} from "../../../state/atoms/optionsSelectors" +import usePlayground from "../../../hooks/usePlayground" +import {PlaygroundStateData} from "../../../hooks/usePlayground/types" import TreeSelectItemRenderer from "./assets/TreeSelectItemRenderer" import {SelectVariantProps} from "./types" -const SelectVariant = ({value, showAsCompare = false, ...props}: SelectVariantProps) => { +const SelectVariant = ({showAsCompare = false, ...props}: SelectVariantProps) => { const [searchTerm, setSearchTerm] = useState("") + const {revisionParents} = usePlayground({ + stateSelector: useCallback((state: PlaygroundStateData) => { + const parents = groupBy(state.availableRevisions || [], "variantId") - // Use optimized selector atom with deep equality checks - const variantOptionsAtom = useMemo(() => variantOptionsAtomFamily(searchTerm), [searchTerm]) - const baseOptions = useAtomValue(variantOptionsAtom) + return { + revisionParents: parents, + } + }, []), + }) - // Create final options with JSX titles (since JSX can't be in atoms) const variantOptions = useMemo(() => { - return baseOptions.map((option) => ({ - ...option, - title: ( -
- - {option.variantName} - - -
- ), - children: option.children.map((child) => ({ - ...child, + const options = Object.values(revisionParents).map((variantRevisions) => { + const deployedIn = uniqBy( + variantRevisions.reduce((acc, rev) => { + return [...acc, ...(rev.deployedIn || [])] + }, [] as CamelCaseEnvironment[]) as CamelCaseEnvironment[], + (env) => env.name, + ) + + return { title: ( -
- + + {variantRevisions[0].variantName} + +
), - })), - })) - }, [baseOptions]) + selectable: false, + label: variantRevisions[0].variantName, + value: variantRevisions[0].variantId, + children: variantRevisions + .sort((a, b) => b.createdAtTimestamp - a.createdAtTimestamp) + .map((revision) => { + return { + title: ( +
+ +
+ ), + label: revision.variantName, + revisionNumber: revision.revisionNumber, + value: revision.id, + } + }), + } + }) + + if (searchTerm) { + const lower = searchTerm.toLowerCase() + + return options + .map((opt) => { + const parentMatches = opt.label.toLowerCase().includes(lower) + const children = parentMatches + ? opt.children + : opt.children.filter((child) => + child.revisionNumber.toString().includes(lower), + ) + + return {...opt, children} + }) + .filter((opt) => opt.label.toLowerCase().includes(lower) || opt.children.length > 0) + } + + return options + }, [revisionParents, searchTerm]) const [isOpenCompareSelect, setIsOpenCompareSelect] = useState(false) const [isOpenSelect, setIsOpenSelect] = useState(false) @@ -70,40 +113,28 @@ const SelectVariant = ({value, showAsCompare = false, ...props}: SelectVariantPr
v.id)} - value={value} open={isOpenCompareSelect} - classNames={{ - popup: { - root: clsx([ - "!w-[280px] pt-0", - "[&_.ant-select-tree-checkbox]:hidden", - "[&_.ant-select-tree-treenode-checkbox-checked>.ant-select-tree-node-content-wrapper]:bg-[#F5F7FA]", - "[&_.ant-select-tree-node-content-wrapper]:!pl-1", - "[&_.ant-select-tree-switcher]:!mx-0 [&_.ant-select-tree-switcher]:!me-0", - "[&_.ant-select-tree-treenode-active]:!bg-transparent", - "[&_.ant-select-tree-switcher-noop]:!hidden", - "[&_.ant-select-tree-treenode-leaf_.ant-select-tree-node-content-wrapper]:!pl-0", - "&_span.ant-select-tree-node-content-wrapper]:w-[calc(100%-24px)]", - "[&_.ant-select-tree-node-content-wrapper]:!pl-2 [&_.ant-select-tree-node-content-wrapper]:flex [&_.ant-select-tree-node-content-wrapper]:items-center [&_.ant-select-tree-node-content-wrapper]:!justify-between [&_.ant-select-tree-node-content-wrapper]:!rounded-md", - "[&_.ant-select-tree-switcher]:flex [&_.ant-select-tree-switcher]:items-center [&_.ant-select-tree-switcher]:justify-center", - "[&_.ant-select-tree-title]:w-full", - ]), - }, - }} - onOpenChange={(isOpen) => setIsOpenCompareSelect(isOpen)} + onDropdownVisibleChange={(isOpen) => setIsOpenCompareSelect(isOpen)} + popupClassName={clsx([ + "!w-[280px] pt-0", + "[&_.ant-select-tree-checkbox]:hidden", + "[&_.ant-select-tree-treenode-checkbox-checked>.ant-select-tree-node-content-wrapper]:bg-[#F5F7FA]", + "[&_.ant-select-tree-node-content-wrapper]:!pl-1", + "[&_.ant-select-tree-switcher]:!mx-0 [&_.ant-select-tree-switcher]:!me-0", + "[&_.ant-select-tree-treenode-active]:!bg-transparent", + "[&_.ant-select-tree-switcher-noop]:!hidden", + "[&_.ant-select-tree-treenode-leaf_.ant-select-tree-node-content-wrapper]:!pl-0", + "[&_span.ant-select-tree-node-content-wrapper]:w-[calc(100%-24px)]", + "[&_.ant-select-tree-node-content-wrapper]:!pl-2 [&_.ant-select-tree-node-content-wrapper]:flex [&_.ant-select-tree-node-content-wrapper]:items-center [&_.ant-select-tree-node-content-wrapper]:!justify-between [&_.ant-select-tree-node-content-wrapper]:!rounded-md", + "[&_.ant-select-tree-switcher]:flex [&_.ant-select-tree-switcher]:items-center [&_.ant-select-tree-switcher]:justify-center", + "[&_.ant-select-tree-title]:w-full", + ])} className="w-full opacity-0 relative z-[2]" - styles={{ - popup: { - root: {maxHeight: 400, overflow: "auto"}, - }, - }} + dropdownStyle={{maxHeight: 400, overflow: "auto"}} size="small" treeData={variantOptions} - // fieldNames={{value: "value", label: "label", children: "children"}} - // treeData={[]} tagRender={() =>
} - popupRender={(menu) => ( + dropdownRender={(menu) => (
) : ( - <> - setIsOpenSelect(isOpen)} - style={{width: 120}} - styles={{popup: {root: {maxHeight: 400, overflow: "auto"}}}} - size="small" - placeholder="Select variant" - treeData={variantOptions} - treeNodeLabelProp="label" - popupRender={(menu) => ( - - )} - treeDefaultExpandAll - treeExpandAction="click" - classNames={{ - popup: { - root: clsx([ - "!w-[280px] pt-0", - "[&_.ant-select-tree-switcher-noop]:!hidden", - "[&_.ant-select-tree-node-content-wrapper]:!pl-1", - "[&_.ant-select-tree-treenode-leaf_.ant-select-tree-node-content-wrapper]:!pl-0", - "[&_span.ant-select-tree-node-content-wrapper]:w-[calc(100%-24px)]", - "[&_.ant-select-tree-switcher]:!me-0", - "[&_.ant-select-tree-node-content-wrapper]:!pl-2 [&_.ant-select-tree-node-content-wrapper]:flex [&_.ant-select-tree-node-content-wrapper]:items-center [&_.ant-select-tree-node-content-wrapper]:!justify-between [&_.ant-select-tree-node-content-wrapper]:!rounded-md", - "[&_.ant-select-tree-switcher]:flex [&_.ant-select-tree-switcher]:items-center [&_.ant-select-tree-switcher]:justify-center", - "[&_.ant-select-tree-title]:w-full", - ]), - }, - }} - /> - {/* null */} - + setIsOpenSelect(isOpen)} + style={{width: 120}} + dropdownStyle={{maxHeight: 400, overflow: "auto"}} + size="small" + placeholder="Select variant" + treeData={variantOptions} + treeNodeLabelProp="label" + dropdownRender={(menu) => ( + + )} + treeDefaultExpandAll + treeExpandAction="click" + popupClassName={clsx([ + "!w-[280px] pt-0", + "[&_.ant-select-tree-switcher-noop]:!hidden", + "[&_.ant-select-tree-node-content-wrapper]:!pl-1", + "[&_.ant-select-tree-treenode-leaf_.ant-select-tree-node-content-wrapper]:!pl-0", + "[&_span.ant-select-tree-node-content-wrapper]:w-[calc(100%-24px)]", + "[&_.ant-select-tree-switcher]:!me-0", + "[&_.ant-select-tree-node-content-wrapper]:!pl-2 [&_.ant-select-tree-node-content-wrapper]:flex [&_.ant-select-tree-node-content-wrapper]:items-center [&_.ant-select-tree-node-content-wrapper]:!justify-between [&_.ant-select-tree-node-content-wrapper]:!rounded-md", + "[&_.ant-select-tree-switcher]:flex [&_.ant-select-tree-switcher]:items-center [&_.ant-select-tree-switcher]:justify-center", + "[&_.ant-select-tree-title]:w-full", + ])} + /> )} ) diff --git a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx index 3c79487967..4a97059b86 100644 --- a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx @@ -1,12 +1,9 @@ -import {cloneElement, isValidElement, useEffect, useState} from "react" +import {cloneElement, isValidElement, useState} from "react" import {FloppyDiskBack} from "@phosphor-icons/react" import {Button} from "antd" -import {useAtomValue} from "jotai" import dynamic from "next/dynamic" -import {variantIsDirtyAtomFamily} from "@/oss/components/Playground/state/atoms" - import {CommitVariantChangesButtonProps} from "../types" const CommitVariantChangesModal = dynamic(() => import("../.."), {ssr: false}) @@ -20,7 +17,6 @@ const CommitVariantChangesButton = ({ ...props }: CommitVariantChangesButtonProps) => { const [isDeployModalOpen, setIsDeployModalOpen] = useState(false) - const disabled = !useAtomValue(variantIsDirtyAtomFamily(variantId || "")) return ( <> @@ -40,20 +36,21 @@ const CommitVariantChangesButton = ({ type="text" icon={icon && } onClick={() => setIsDeployModalOpen(true)} - disabled={disabled} {...props} > {label} )} - setIsDeployModalOpen(false)} - variantId={variantId} - onSuccess={onSuccess} - commitType={commitType} - /> + {variantId ? ( + setIsDeployModalOpen(false)} + variantId={variantId} + onSuccess={onSuccess} + commitType={commitType} + /> + ) : null} ) } diff --git a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesModalContent/index.tsx b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesModalContent/index.tsx index 7114bd1f7d..205026da52 100644 --- a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesModalContent/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesModalContent/index.tsx @@ -1,17 +1,12 @@ -import {useCallback, useEffect, useRef} from "react" +import {useCallback} from "react" import {ArrowRight} from "@phosphor-icons/react" -import {Checkbox, Input, Radio, RadioChangeEvent, Select, Tooltip, Typography} from "antd" -import {useAtomValue} from "jotai" +import {Input, Radio, RadioChangeEvent, Typography} from "antd" -import DiffView from "@/oss/components/Editor/DiffView" import CommitNote from "@/oss/components/Playground/assets/CommitNote" import Version from "@/oss/components/Playground/assets/Version" -import EnvironmentTagLabel, {deploymentStatusColors} from "@/oss/components/EnvironmentTagLabel" -import {variantByRevisionIdAtomFamily} from "@/oss/components/Playground/state/atoms" -import {newestRevisionForVariantIdAtomFamily} from "@/oss/components/Playground/state/atoms" -import {parametersOverrideAtomFamily} from "@/oss/components/Playground/state/atoms" -import {transformedPromptsAtomFamily} from "@/oss/state/newPlayground/core/prompts" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" import {CommitVariantChangesModalContentProps} from "../types" @@ -23,221 +18,68 @@ const CommitVariantChangesModalContent = ({ setNote, selectedCommitType, setSelectedCommitType, - commitType, - shouldDeploy, - onToggleDeploy, - selectedEnvironment, - onSelectEnvironment, - isDeploymentPending, }: CommitVariantChangesModalContentProps) => { - // Get variant metadata and derived prompts (prefers local cache, falls back to spec) - const variant = useAtomValue(variantByRevisionIdAtomFamily(variantId)) as any - // const prompts = useAtomValue(promptsAtomFamily(variantId)) || [] - - // Guard against undefined variant during commit invalidation (after hooks) - if (!variant) { - return ( -
-
- Loading variant data... -
-
- ) - } - - // Extract values from the variant object (safe now) - const variantName = variant.variantName - const revision = variant.revision - // Determine target revision based on the latest revision number for this variant, not the base - const latestRevisionForVariant = useAtomValue( - newestRevisionForVariantIdAtomFamily(variant?.variantId || ""), - ) as any - const targetRevision = Number(latestRevisionForVariant?.revision ?? 0) + 1 - - // Compose a minimal EnhancedVariant-like object using current prompts - // const composedVariant = { - // ...variant, - // prompts, - // } as any - // Read both sources: prompt-derived params and any JSON override from the editor - const derivedAgConfig = useAtomValue(transformedPromptsAtomFamily(variantId))?.ag_config - const jsonOverride = useAtomValue(parametersOverrideAtomFamily(variantId)) - const params = commitType === "parameters" && jsonOverride ? jsonOverride : derivedAgConfig - // const params = - // transformToRequestBody({variant: composedVariant})?.ag_config - const oldParams = variant.parameters - - const onChange = useCallback( - (e: RadioChangeEvent) => { - setSelectedCommitType({...selectedCommitType, type: e.target.value}) - }, - [selectedCommitType, setSelectedCommitType], - ) - - // Snapshot diff content using refs (no re-renders, computed on first mount) - const initialOriginalRef = useRef(null) - const initialModifiedRef = useRef(null) - - // Reset refs when the target variant changes - useEffect(() => { - initialOriginalRef.current = null - initialModifiedRef.current = null - }, [variantId]) - - // Compute snapshot lazily on first render after mount - if (variant && initialOriginalRef.current === null && initialModifiedRef.current === null) { - try { - initialOriginalRef.current = JSON.stringify(variant.parameters) - // Use the same transformed local prompts ag_config that drives dirty-state - if (params !== undefined) { - initialModifiedRef.current = JSON.stringify(params) + const {variantName, revision, targetRevision} = usePlayground({ + variantId, + hookId: "CommitVariantChangesModal", + variantSelector: useCallback((variant: EnhancedVariant) => { + return { + variantName: variant.variantName, + revision: variant.revision as number, + targetRevision: variant._parentVariant.revision + 1, } - } catch { - // Keep refs null; we will fall back to live values below - } - } + }, []), + }) - const environmentOptions = ( - Object.keys(deploymentStatusColors) as Array - ).map((env) => ({ - value: env, - label: , - })) - - // Ensure DiffView gets strings even when params are undefined - const originalForDiff = initialOriginalRef.current ?? JSON.stringify(oldParams ?? {}) - const modifiedForDiff = initialModifiedRef.current ?? JSON.stringify(params ?? oldParams ?? {}) + const onChange = (e: RadioChangeEvent) => { + setSelectedCommitType({...selectedCommitType, type: e.target.value}) + } return ( -
-
-
- - How would you like to save the changes? - -
-
- - - As a new version - - - - - -
- {variantName} -
- - - -
-
-
- -
- - - As a new variant - - - - - -
- - setSelectedCommitType((prev) => { - const prevType = prev?.type - const guaranteedType: "version" | "variant" = - prevType === "version" || prevType === "variant" - ? prevType - : "variant" - return { - type: guaranteedType, - name: e.target.value, - } - }) - } - suffix={} - /> -
-
-
-
- -
-
- onToggleDeploy(event.target.checked)} - disabled={isDeploymentPending} - > - - Deploy after commit - - - - - - + setSelectedCommitType({...selectedCommitType, name: e.target.value}) + } /> +
-
-
+
+ + + ) } diff --git a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/types.d.ts b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/types.d.ts index 76e5bf9854..0555ee5b90 100644 --- a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/types.d.ts +++ b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/types.d.ts @@ -29,10 +29,4 @@ export interface CommitVariantChangesModalContentProps { setNote: React.Dispatch> selectedCommitType: SelectedCommitType | null setSelectedCommitType: React.Dispatch> - commitType?: CommitType - shouldDeploy: boolean - onToggleDeploy: (value: boolean) => void - selectedEnvironment: string | null - onSelectEnvironment: (value: string | null) => void - isDeploymentPending: boolean } diff --git a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx index 9f267b2bb4..3498d7321f 100644 --- a/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/index.tsx @@ -1,21 +1,12 @@ -import {type ReactElement, useCallback, useEffect, useMemo, useState} from "react" +import {useCallback, useState} from "react" import {FloppyDiskBack} from "@phosphor-icons/react" -import {message} from "antd" -import {useAtomValue, useSetAtom} from "jotai" import dynamic from "next/dynamic" -import {Resizable} from "react-resizable" import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" -import { - revisionListAtom, - saveVariantMutationAtom, - selectedVariantsAtom, - variantByRevisionIdAtomFamily, -} from "@/oss/components/Playground/state/atoms" - -import {createVariantMutationAtom} from "../../../state/atoms/variantCrudMutations" -import {publishMutationAtom} from "@/oss/state/deployment/atoms/publish" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {getAllRevisionsLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" import {CommitVariantChangesModalProps, SelectedCommitType} from "./assets/types" const CommitVariantChangesModalContent = dynamic( @@ -29,335 +20,93 @@ const CommitVariantChangesModal: React.FC = ({ commitType, ...props }) => { - const {onCancel, ...modalProps} = props - // Get variant metadata from revision list - const revisions = useAtomValue(revisionListAtom) - const variant = revisions?.find((rev: any) => rev.id === variantId) - - // Extract values from variant - const variantName = variant?.variantName - - // Get mutation functions - const saveVariant = useSetAtom(saveVariantMutationAtom) - const createVariant = useSetAtom(createVariantMutationAtom) - const {isPending: isPublishing, mutateAsync: publish} = useAtomValue(publishMutationAtom) - - // Track loading state for mutations - const [isMutating, setIsMutating] = useState(false) - // Defer closing the modal until the UI actually swaps to target - const [waitForRevisionId, setWaitForRevisionId] = useState(undefined) - const [waitForVariantId, setWaitForVariantId] = useState(undefined) + const {saveVariant, addVariant, baseRevisionId, isMutating, variantName} = usePlayground({ + variantId, + hookId: "CommitVariantChangesModal", + variantSelector: useCallback( + (variant: EnhancedVariant) => { + return { + isMutating: variant.__isMutating, + variantName: variant.variantName, + baseRevisionId: variant.id, + } + }, + [variantId], + ), + }) const [selectedCommitType, setSelectedCommitType] = useState({ type: "version", }) const [note, setNote] = useState("") - const [shouldDeploy, setShouldDeploy] = useState(false) - const [selectedEnvironment, setSelectedEnvironment] = useState(null) - const [modalSize, setModalSize] = useState({width: 960, height: 640}) - const [viewport, setViewport] = useState({width: 0, height: 0}) const onClose = useCallback(() => { - onCancel?.({} as any) + props.onCancel?.({} as any) setSelectedCommitType({ type: "version", }) setNote("") - setShouldDeploy(false) - setSelectedEnvironment(null) - }, [onCancel]) - - // Observe current selected revision(s) to know when swap completes - const selectedRevisionIds = useAtomValue(selectedVariantsAtom) - const currentSelectedRevisionId = selectedRevisionIds?.[0] || "" - const currentSelectedVariant = useAtomValue( - variantByRevisionIdAtomFamily(currentSelectedRevisionId), - ) - - // Track viewport to clamp the resizable modal - useEffect(() => { - if (typeof window === "undefined") return - const updateViewport = () => - setViewport({width: window.innerWidth, height: window.innerHeight}) - updateViewport() - window.addEventListener("resize", updateViewport) - return () => window.removeEventListener("resize", updateViewport) }, []) - const computedMaxWidth = useMemo(() => { - if (!viewport.width) return 960 - return Math.min(Math.max(viewport.width - 48, 480), 1200) - }, [viewport.width]) - - const computedMaxHeight = useMemo(() => { - if (!viewport.height) return 640 - return Math.min(Math.max(viewport.height - 160, 400), 900) - }, [viewport.height]) - - const minConstraints = useMemo(() => { - return [Math.min(720, computedMaxWidth), Math.min(480, computedMaxHeight)] as [ - number, - number, - ] - }, [computedMaxWidth, computedMaxHeight]) - - const maxConstraints = useMemo(() => { - return [computedMaxWidth, computedMaxHeight] as [number, number] - }, [computedMaxWidth, computedMaxHeight]) - - useEffect(() => { - if (!viewport.width || !viewport.height) return - setModalSize((previous) => ({ - width: Math.min(Math.max(previous.width, minConstraints[0]), computedMaxWidth), - height: Math.min(Math.max(previous.height, minConstraints[1]), computedMaxHeight), - })) - }, [viewport, minConstraints, computedMaxWidth, computedMaxHeight]) - - // Close when the swap we wait for is satisfied - useEffect(() => { - if (waitForRevisionId && selectedRevisionIds?.includes(waitForRevisionId)) { - setIsMutating(false) - onClose() - setWaitForRevisionId(undefined) - } else if ( - waitForVariantId && - currentSelectedVariant?._parentVariant?.id && - currentSelectedVariant?._parentVariant?.id === waitForVariantId - ) { - setIsMutating(false) - onClose() - setWaitForVariantId(undefined) - } - }, [ - selectedRevisionIds, - currentSelectedVariant?._parentVariant?.id, - waitForRevisionId, - waitForVariantId, - onClose, - ]) - - const handleDeployAfterCommit = useCallback( - async (resultVariant?: any) => { - if (!shouldDeploy || !selectedEnvironment) { - return - } - - try { - const variantLike = resultVariant || currentSelectedVariant || {} - const variantIdForDeployment = - variantLike?.variant_id || - variantLike?.variantId || - variantLike?._parentVariant || - variant?.variantId || - currentSelectedVariant?._parentVariant || - currentSelectedVariant?.variantId - - const revisionIdForDeployment = - resultVariant?.id || - resultVariant?.revision_id || - waitForRevisionId || - waitForVariantId || - currentSelectedVariant?.id || - variantId - - if (!variantIdForDeployment) { - message.error("Unable to deploy because the variant identifier is missing.") - return - } - - await publish({ - type: "variant", - variant_id: variantIdForDeployment, - revision_id: revisionIdForDeployment ?? undefined, - environment_name: selectedEnvironment, - note, - }) - - message.success(`Deployment to ${selectedEnvironment} started`) - } catch (error) { - console.error("Failed to deploy after commit", error) - message.error("Failed to deploy to the selected environment.") - } - }, - [ - shouldDeploy, - selectedEnvironment, - publish, - note, - currentSelectedVariant, - variant, - waitForRevisionId, - waitForVariantId, - variantId, - ], - ) - const onSaveVariantChanges = useCallback(async () => { - try { - setIsMutating(true) - - if (selectedCommitType?.type === "version") { - const result = await saveVariant?.({ - variantId, - note, - commitType, - }) - - if (result?.success) { - // Reset commit-ready state after successful commit - onSuccess?.({ - revisionId: result.variant?.id, - variantId: result.variant?.variantId, - }) + if (selectedCommitType?.type === "version") { + await saveVariant?.(note, commitType, (variant) => { + onSuccess?.({revisionId: variant?._revisionId}) + }) + } else if (selectedCommitType?.type === "variant" && selectedCommitType?.name) { + addVariant?.({ + note, + commitType, + baseVariantName: variantName, + newVariantName: selectedCommitType?.name as string, + callback: (variant, state) => { + state.selected = [ + ...state.selected.filter((id) => id !== baseRevisionId), + variant.id, + ] + + const originalBaseVariant = getAllRevisionsLazy().find( + (v) => v.id === baseRevisionId, + ) as EnhancedVariant + + const newVariants = [...state.variants] + newVariants.splice( + newVariants.findIndex((v) => v.id === baseRevisionId), + 1, + originalBaseVariant, + ) - await handleDeployAfterCommit(result.variant) - - // Wait for the selected revision to reflect the new revision id - if (result.variant?.id) { - setWaitForRevisionId(result.variant.id) - } - } - } else if (selectedCommitType?.type === "variant" && selectedCommitType?.name) { - const result = await createVariant?.({ - revisionId: variantId, - baseVariantName: variantName || "", - newVariantName: selectedCommitType?.name as string, - note, - callback: (newVariant, state) => { - // For new variant creation, switch to display ONLY the newly created variant - // This is different from revision creation where we stay on the same variant - state.selected = [newVariant.id] - state.variants = [newVariant.id] - }, - }) - - if (result?.success) { - // For variant creation, we get a variant object back, not a revision - // The variant creation atom handles finding the matching revision and updating the URL - // We just need to pass the variant ID to the onSuccess callback - const newVariantId = result.variant?.variant_id - - // The onSuccess callback doesn't need a revisionId for variant creation - // since the variant creation atom handles the UI switch via URL update onSuccess?.({ - revisionId: undefined, // Will be determined by variant creation atom - variantId: newVariantId, + revisionId: variant?._revisionId, + variantId: variant._parentVariant.variantId, }) - await handleDeployAfterCommit(result.variant) + state.variants = newVariants - // Wait for the selected revision to belong to the newly created variant id - if (newVariantId) { - setWaitForVariantId(newVariantId) - } - } - } - } catch (error) { - console.error("Failed to commit variant changes:", error) - message.error("We couldn't save your changes. Please try again.") - } finally { - // Only close immediately if we're not waiting for the UI to reflect the swap - // (Keep isMutating true while waiting to prevent interactions) - if (!waitForRevisionId && !waitForVariantId) { - setIsMutating(false) - onClose() - } + return state + }, + }) } - }, [ - selectedCommitType, - saveVariant, - createVariant, - note, - variantName, - onSuccess, - variantId, - commitType, - handleDeployAfterCommit, - waitForRevisionId, - waitForVariantId, - onClose, - ]) - - const isOkDisabled = - !selectedCommitType?.type || - (selectedCommitType?.type === "variant" && !selectedCommitType?.name) || - (shouldDeploy && !selectedEnvironment) - - const modalRender = useCallback( - (modalNode: ReactElement) => ( - - setModalSize({width: data.size.width, height: data.size.height}) - } - handle={ - event.stopPropagation()} - /> - } - resizeHandles={["se"]} - handleSize={[18, 18]} - draggableOpts={{enableUserSelectHack: false}} - > -
- {modalNode} -
-
- ), - [modalSize, minConstraints, maxConstraints], - ) - const isDeploymentPending = isMutating || (shouldDeploy && isPublishing) + onClose() + }, [selectedCommitType, baseRevisionId, saveVariant, addVariant, note]) return ( , - disabled: isOkDisabled, + disabled: + !selectedCommitType?.type || + (selectedCommitType?.type == "variant" && !selectedCommitType?.name), }} classNames={{footer: "flex items-center justify-end"}} - width={modalSize.width} - style={{ - maxWidth: maxConstraints[0], - }} - styles={{ - content: { - display: "flex", - flexDirection: "column", - height: "100%", - maxHeight: maxConstraints[1], - }, - body: { - display: "flex", - flexDirection: "column", - flex: 1, - minHeight: 0, - overflow: "auto", - }, - footer: { - display: "flex", - justifyContent: "flex-end", - gap: 8, - flexShrink: 0, - position: "sticky", - bottom: 0, - background: "#fff", - }, - }} - modalRender={modalRender} - {...modalProps} + afterClose={() => onClose()} + {...props} > = ({ setNote={setNote} setSelectedCommitType={setSelectedCommitType} selectedCommitType={selectedCommitType} - commitType={commitType} - shouldDeploy={shouldDeploy} - onToggleDeploy={setShouldDeploy} - selectedEnvironment={selectedEnvironment} - onSelectEnvironment={setSelectedEnvironment} - isDeploymentPending={isDeploymentPending} /> ) diff --git a/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/CreateVariantModalContent/index.tsx b/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/CreateVariantModalContent/index.tsx index fbe57c8a0c..91b638ef44 100644 --- a/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/CreateVariantModalContent/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/CreateVariantModalContent/index.tsx @@ -67,7 +67,11 @@ const CreateVariantModalContent = ({ onChange={handleTemplateVariantChange} options={variants?.map((variant) => ({ value: variant.variantName, - label:
{variant.variantName}
, + label: ( +
+ {variant.variantName} +
+ ), }))} /> @@ -85,7 +89,10 @@ const CreateVariantModalContent = ({ } help={nameExists ? "Variant name already exists" : ""} > - +
diff --git a/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsx b/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsx index 44b1d2f3f9..ceadd4fe0e 100644 --- a/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsx @@ -1,18 +1,13 @@ -import {type FC, useState, useCallback, useMemo} from "react" +import {type FC, useState, useCallback} from "react" -import {useAtomValue, useSetAtom} from "jotai" import groupBy from "lodash/groupBy" import dynamic from "next/dynamic" import {message} from "@/oss/components/AppMessageContext" import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" -import { - revisionListAtom, - selectedVariantsAtom, - setDisplayedVariantsMutationAtom, -} from "@/oss/components/Playground/state/atoms" -import {createVariantMutationAtom} from "../../../state/atoms/variantCrudMutations" +import usePlayground from "../../../hooks/usePlayground" +import {PlaygroundStateData} from "../../../hooks/usePlayground/types" import {CreateVariantModalProps} from "./types" @@ -30,79 +25,56 @@ const CreateVariantModal: FC = ({ const [newVariantName, setNewVariantName] = useState("") const [baseVariantName, setBaseVariantName] = useState("default") const [note, setNote] = useState("") - const [isSubmitting, setIsSubmitting] = useState(false) - const revisions = useAtomValue(revisionListAtom) - const createVariant = useSetAtom(createVariantMutationAtom) - const currentSelectedVariants = useAtomValue(selectedVariantsAtom) - const setDisplayedVariants = useSetAtom(setDisplayedVariantsMutationAtom) + const {addVariant, baseVariant, variantOptions} = usePlayground({ + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const parents = groupBy(state.availableRevisions, "variantId") + const baseVariant = (state.availableRevisions || []).find( + (variant) => variant.variantName === baseVariantName, + ) - const {baseVariant, variantOptions} = useMemo(() => { - const parents = groupBy(revisions, "variantId") - const baseVariant = revisions.find((variant) => variant.variantName === baseVariantName) - - return { - baseVariant: { - id: baseVariant?.variantId, - variantName: baseVariant?.variantName, - }, - variantOptions: Object.values(parents).map((variantRevisions) => { - const rev = variantRevisions[0] return { - id: rev.id, - variantName: rev.variantName, + baseVariant: { + id: baseVariant?.variantId, + variantName: baseVariant?.variantName, + }, + variantOptions: Object.values(parents).map((variantRevisions) => { + const rev = variantRevisions[0] + return { + id: rev.id, + variantName: rev.variantName, + } + }), } - }), - } - }, [revisions, baseVariantName]) + }, + [baseVariantName], + ), + }) // Validate and create new variants based on selected template - const addNewVariant = useCallback(async () => { + const addNewVariant = useCallback(() => { if (!baseVariant || !baseVariant.variantName) { message.error("Template variant not found. Please choose a valid variant.") return } - try { - setIsSubmitting(true) - const result = await createVariant({ - baseVariantName: baseVariant.variantName, - newVariantName: newVariantName, - note: note, - callback: (variant, state) => { - if (isCompareMode) { - // Add new variant to existing selection (comparison mode) - state.selected = [...currentSelectedVariants, variant.id] - } else { - // Replace current selection with new variant (single mode) - state.selected = [variant.id] - } - }, - }) - - if (!result || !result.success) { - const errMsg = result?.error || "Failed to create variant" - message.error(errMsg) - return - } - - // Close modal on success (now that UI can render the new variant) - propsSetIsModalOpen(false) - message.success(`Variant "${newVariantName}" created successfully`) - } catch (error) { - message.error(`Failed to create variant: ${error.message}`) - } finally { - setIsSubmitting(false) - } - }, [ - isCompareMode, - baseVariant, - createVariant, - newVariantName, - note, - currentSelectedVariants, - setDisplayedVariants, - propsSetIsModalOpen, - ]) + addVariant?.({ + baseVariantName: baseVariant.variantName, + newVariantName: newVariantName, + note: note, + callback: (variant, state) => { + if (isCompareMode) { + state.selected = [...state.selected, variant.id] + state.variants = [...state.variants, variant] + } else { + // remove existing variant + + state.selected = [variant.id] + state.variants = [variant] + } + }, + }) + }, [isCompareMode, baseVariant, addVariant, newVariantName]) const setIsModalOpen = useCallback( (value: boolean) => { @@ -125,15 +97,13 @@ const CreateVariantModal: FC = ({ open={isModalOpen} onOk={() => { if (isInputValid) { + setIsModalOpen(false) addNewVariant() } }} okText="Confirm" onCancel={() => setIsModalOpen(false)} - okButtonProps={{ - disabled: !isInputValid || !baseVariantName || isSubmitting, - loading: isSubmitting, - }} // Disable OK button if input is not valid + okButtonProps={{disabled: !isInputValid || !baseVariantName}} // Disable OK button if input is not valid > void -} - -const DeleteVariantContent = ({variantId, onClose}: Props) => { - // Focused atom family to avoid subscribing to a large list - const variant = useAtomValue(variantByRevisionIdAtomFamily(variantId)) as any - const deleteVariant = useSetAtom(deleteVariantMutationAtom) - - const [checking, setChecking] = useState(true) - const [canDelete, setCanDelete] = useState(null) - - // Derive parent variant id from revision to resolve display name - const parentVariantId = (variant?._parentVariant ?? variant?.variantId) as string | undefined - const parentDisplayName = useAtomValue( - parentVariantDisplayNameAtomFamily(parentVariantId || ""), - ) - - const {variantName, isMutating} = useMemo(() => { - return { - variantName: (parentDisplayName as string) || "-", - isMutating: (variant as any)?.__isMutating || false, - } - }, [parentDisplayName, variant]) - - // On mount, verify if resource is eligible for deletion - useEffect(() => { - let mounted = true - ;(async () => { - try { - const ok = await checkIfResourceValidForDeletion({ - resourceType: "variant", - resourceIds: [variantId], - }) - if (mounted) setCanDelete(ok) - } catch (e) { - if (mounted) setCanDelete(false) - } finally { - if (mounted) setChecking(false) - } - })() - return () => { - mounted = false - } - }, [variantId]) - - const onDeleteVariant = useCallback(async () => { - try { - const res = (await deleteVariant({variantId})) as any - if (res?.success) { - onClose() - } else { - console.error("Failed to delete variant:", res?.error || "unknown error") - } - } catch (error) { - console.error("Failed to delete variant:", error) - } - }, [deleteVariant, variantId, onClose]) - - // Loading state during pre-check - if (checking) { - return ( -
- - Checking if this variant can be deleted… -
- ) - } - - // Blocked state if not deletable - if (canDelete === false) { - return ( -
- This variant cannot be deleted because it is currently in use. -
- -
-
- ) - } - - // Ready state - return ( -
-
-
- You are about to delete: - -
- This action is not reversible. Deleting the revision will also -
- -
- - -
-
- ) -} - -export default DeleteVariantContent diff --git a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/DeleteVariantModalWrapper.tsx b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/DeleteVariantModalWrapper.tsx deleted file mode 100644 index 2c6d872c02..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/DeleteVariantModalWrapper.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import {useAtomValue, useSetAtom} from "jotai" - -import { - closeDeleteVariantModalAtom, - deleteVariantModalOpenAtom, - deleteVariantModalVariantIdAtom, -} from "./store/deleteVariantModalStore" - -import DeleteVariantModal from "." - -const DeleteVariantModalWrapper = () => { - const open = useAtomValue(deleteVariantModalOpenAtom) - const variantId = useAtomValue(deleteVariantModalVariantIdAtom) - const close = useSetAtom(closeDeleteVariantModalAtom) - - if (!variantId) return null - - return close()} variantId={variantId} /> -} - -export default DeleteVariantModalWrapper diff --git a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/assets/DeleteVariantButton/index.tsx b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/assets/DeleteVariantButton/index.tsx index 3e19699b2d..29946007f3 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/assets/DeleteVariantButton/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/assets/DeleteVariantButton/index.tsx @@ -1,12 +1,11 @@ -import {cloneElement, isValidElement} from "react" +import {cloneElement, isValidElement, useState} from "react" import {Trash} from "@phosphor-icons/react" import {Button} from "antd" -import {useSetAtom} from "jotai" - -import {openDeleteVariantModalAtom} from "../../store/deleteVariantModalStore" +import dynamic from "next/dynamic" import {DeleteVariantButtonProps} from "./types" +const DeleteVariantModal = dynamic(() => import("../.."), {ssr: false}) const DeleteVariantButton = ({ variantId, @@ -15,7 +14,8 @@ const DeleteVariantButton = ({ children, ...props }: DeleteVariantButtonProps) => { - const openDeleteModal = useSetAtom(openDeleteVariantModalAtom) + const [isDeleteVariantModalOpen, setIsDeleteVariantModalOpen] = useState(false) + return ( <> {isValidElement(children) ? ( @@ -24,19 +24,29 @@ const DeleteVariantButton = ({ onClick: () => void }>, { - onClick: () => openDeleteModal(variantId), + onClick: () => { + setIsDeleteVariantModalOpen(true) + }, }, ) ) : ( )} + + {isDeleteVariantModalOpen && ( + setIsDeleteVariantModalOpen(false)} + variantId={variantId} + /> + )} ) } diff --git a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/index.tsx b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/index.tsx index 22798f376f..89f88b3e03 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/index.tsx @@ -1,19 +1,73 @@ -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" +import {useCallback} from "react" -import DeleteVariantContent from "./Content" +import {Trash} from "@phosphor-icons/react" +import {Modal, Typography} from "antd" + +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {findVariantById} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" + +import {useStyles} from "./styles" import {DeleteVariantModalProps} from "./types" -type EnhancedProps = Omit, "children"> -type Props = EnhancedProps & DeleteVariantModalProps +const {Text} = Typography + +const DeleteVariantModal: React.FC = ({variantId, ...props}) => { + const classes = useStyles() + const {deleteVariant, isMutating, viewType, variantName, setSelectedVariant, _variantIds} = + usePlayground({ + variantId, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variant = findVariantById(state, variantId) + const _variantIds = state.variants.map((variant) => variant.id) + + return { + isMutating: variant?.__isMutating, + variantName: variant?.variantName, + _variantIds, + } + }, + [variantId], + ), + }) + + const onClose = useCallback(() => { + props.onCancel?.({} as any) + }, []) + + const onDeleteVariant = useCallback(() => { + const itemIndex = _variantIds?.findIndex((id) => id === variantId) as number + if (itemIndex === -1) return + + deleteVariant?.().then(() => { + onClose() + }) + }, [deleteVariant, _variantIds, viewType, setSelectedVariant]) -const DeleteVariantModal = ({variantId, ...props}: Props) => { return ( - - props.onCancel?.({} as any)} - /> - + }} + classNames={{footer: "flex items-center justify-end"}} + {...props} + > +
+ This action is not reversible. Deleting the variant will also + +
+ You are about to delete: + + {variantName} +
+
+
) } diff --git a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/store/deleteVariantModalStore.ts b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/store/deleteVariantModalStore.ts deleted file mode 100644 index edbadda87f..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/store/deleteVariantModalStore.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {atom} from "jotai" - -interface DeleteVariantModalState { - open: boolean - variantId?: string -} - -export const deleteVariantModalAtom = atom({open: false}) - -export const openDeleteVariantModalAtom = atom(null, (get, set, variantId: string) => { - set(deleteVariantModalAtom, {open: true, variantId}) -}) - -export const closeDeleteVariantModalAtom = atom(null, (get, set) => { - set(deleteVariantModalAtom, {open: false, variantId: undefined}) -}) - -export const deleteVariantModalOpenAtom = atom((get) => get(deleteVariantModalAtom).open) -export const deleteVariantModalVariantIdAtom = atom((get) => get(deleteVariantModalAtom).variantId) diff --git a/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/styles.ts b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/styles.ts new file mode 100644 index 0000000000..9674d82c02 --- /dev/null +++ b/web/oss/src/components/Playground/Components/Modals/DeleteVariantModal/styles.ts @@ -0,0 +1,11 @@ +import {createUseStyles} from "react-jss" + +import {JSSTheme} from "@/oss/lib/Types" + +export const useStyles = createUseStyles((theme: JSSTheme) => ({ + heading: { + fontSize: theme.fontSizeLG, + lineHeight: theme.lineHeightLG, + fontWeight: theme.fontWeightMedium, + }, +})) diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/DeployVariantModalWrapper.tsx b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/DeployVariantModalWrapper.tsx deleted file mode 100644 index 81a5573038..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/DeployVariantModalWrapper.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import {useAtomValue, useSetAtom} from "jotai" - -import {closeDeployVariantModalAtom, deployVariantModalAtom} from "./store/deployVariantModalStore" - -import DeployVariantModal from "./index" - -const DeployVariantModalWrapper = () => { - const state = useAtomValue(deployVariantModalAtom) - const close = useSetAtom(closeDeployVariantModalAtom) - - return ( - close()} - parentVariantId={state.parentVariantId} - revisionId={state.revisionId} - variantName={state.variantName} - revision={state.revision} - mutate={state.mutate} - /> - ) -} - -export default DeployVariantModalWrapper diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantButton/index.tsx b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantButton/index.tsx index 66a3083005..80e80b8d49 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantButton/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantButton/index.tsx @@ -1,11 +1,12 @@ -import {cloneElement, isValidElement, useMemo, useState} from "react" +import {cloneElement, isValidElement, useCallback, useState} from "react" import {CloudArrowUp} from "@phosphor-icons/react" -import {useAtomValue} from "jotai" import dynamic from "next/dynamic" import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" -import {variantByRevisionIdAtomFamily} from "@/oss/components/Playground/state/atoms" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {PlaygroundStateData} from "@/oss/lib/hooks/useStatelessVariants/types" +import {findRevisionDeployment} from "@/oss/lib/shared/variant/utils" import {useEnvironments} from "@/oss/services/deployment/hooks/useEnvironments" import {DeployVariantButtonProps} from "./types" @@ -26,23 +27,74 @@ const DeployVariantButton = ({ mutate: mutateEnv, isEnvironmentsLoading, } = useEnvironments() + const { + environments, + variantName, + revision, + mutate: mutatePlayground, + } = usePlayground({ + variantId: revisionId || variantId, + hookId: "DeployVariantModal", + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variant = state.availableRevisions?.find((rev) => rev.id === revisionId) + return { + variantName: variant?.variantName || "", + revision: variant?.revisionNumber || "", + _revisionId: variant?.id || "", + environments: _environments.map((env) => { + const deployedAppRevisionId = env.deployed_app_variant_revision_id + const revision = state.availableRevisions?.find( + (rev) => rev.id === deployedAppRevisionId, + ) + return { + ...env, + revision: revision, + } + }), + } + }, + [_environments, variantId, revisionId], + ), + }) + + const onSuccess = useCallback(async () => { + const newEnvironmentsData = await mutateEnv() // refetch environments or chain using .then + + mutatePlayground((state) => { + const newEnv = newEnvironmentsData.map((env) => ({ + name: env.name, + appId: env.app_id, + deployedAppVariantId: env.deployed_app_variant_id, + deployedVariantName: env.deployed_variant_name, + deployedAppVariantRevisionId: env.deployed_app_variant_revision_id, + revision: env.revision, + })) - // Focused read for the specific revision's metadata - const variant = useAtomValue(variantByRevisionIdAtomFamily(revisionId)) as any + // map available revisions and update each of them using the new environments data + if (state.availableRevisions && state.availableRevisions.length > 0) { + state.availableRevisions?.forEach((availableRevision) => { + if (availableRevision) { + availableRevision.deployedIn = findRevisionDeployment( + availableRevision.id, + newEnv, + ) + } + }) + } - const {environments, variantName, revision} = useMemo(() => { - return { - variantName: variant?.variantName || "", - revision: (variant as any)?.revisionNumber ?? (variant as any)?.revision ?? "", - environments: _environments, - } - }, [variant, _environments]) + // update already mounted data in state.revisions + if (state.variants && state.variants.length > 0) { + state.variants?.forEach((revision) => { + if (revision) { + revision.deployedIn = findRevisionDeployment(revision.id, newEnv) + } + }) + } - const onSuccess = async () => { - // Just refetch environments - the revisionListAtom will automatically update - // when the deployment state changes through SWR revalidation - await mutateEnv() - } + return state + }) + }, []) return ( <> diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/index.tsx b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/index.tsx index 89dbd4c557..91b5a00445 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/index.tsx @@ -1,24 +1,27 @@ import {useMemo} from "react" -import {Typography, Table} from "antd" +import {Typography, Table, Tag} from "antd" import {ColumnsType} from "antd/es/table" -import {useAtom, useAtomValue} from "jotai" import EnvironmentTagLabel from "@/oss/components/EnvironmentTagLabel" import CommitNote from "@/oss/components/Playground/assets/CommitNote" import Version from "@/oss/components/Playground/assets/Version" -import VariantNameCell from "@/oss/components/VariantNameCell" -import {deployNoteAtom, deploySelectedEnvAtom} from "../../store/deployVariantModalStore" +import {ExtendedEnvironment} from "../../types" -import {deployModalEnvironmentsTableAtom, type DeployModalEnvRow} from "./tableDataAtom" +import {DeployVariantModalContentProps} from "./types" -const DeployVariantModalContent = ({variantName, revision, isLoading}: any) => { - const data = useAtomValue(deployModalEnvironmentsTableAtom) - const [selectedEnvName, setSelectedEnvName] = useAtom(deploySelectedEnvAtom) - const [note, setNote] = useAtom(deployNoteAtom) - - const columns: ColumnsType = useMemo( +const DeployVariantModalContent = ({ + selectedEnvName, + setSelectedEnvName, + variantName, + revision, + environments, + isLoading, + note, + setNote, +}: DeployVariantModalContentProps) => { + const columns: ColumnsType = useMemo( () => [ { title: "Environment", @@ -38,15 +41,27 @@ const DeployVariantModalContent = ({variantName, revision, isLoading}: any) => { onHeaderCell: () => ({ style: {minWidth: 160}, }), - render: (_, record) => ( - - ), + render: (_, record) => { + return record.deployed_variant_name ? ( +
+ {record.revision ? ( +
+ {record.revision.name}{" "} + +
+ ) : ( + + No deployment + + )} +
+ ) : ( + "-" + ) + }, }, ], - [], + [environments], ) return ( @@ -68,7 +83,7 @@ const DeployVariantModalContent = ({variantName, revision, isLoading}: any) => { loading={isLoading} className={`ph-no-capture`} columns={columns} - dataSource={data as any} + dataSource={environments} rowKey="name" pagination={false} bordered diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/tableDataAtom.ts b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/tableDataAtom.ts deleted file mode 100644 index f45b6953fe..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/assets/DeployVariantModalContent/tableDataAtom.ts +++ /dev/null @@ -1,33 +0,0 @@ -import deepEqual from "fast-deep-equal" -import {selectAtom} from "jotai/utils" - -import {environmentsLoadableAtom} from "@/oss/state/environment/atoms/fetcher" - -// Row shape strictly needed by the table -export interface DeployModalEnvRow { - name: string - deployedAppVariantRevisionId?: string | null -} - -const PLACEHOLDER_ROWS: DeployModalEnvRow[] = [{name: "dev"}, {name: "stage"}, {name: "prod"}] - -// Lean selector for the Deploy Variant modal table -// - Only exposes fields used by the table -// - Bakes in placeholders when environments are loading or empty -export const deployModalEnvironmentsTableAtom = selectAtom( - environmentsLoadableAtom, - (loadable: any) => { - const isLoading = loadable?.isLoading ?? loadable?.isFetching - const envs = loadable?.data ?? null - - if (isLoading || !Array.isArray(envs) || envs.length === 0) { - return PLACEHOLDER_ROWS - } - - return (envs as any[]).map((e) => ({ - name: e?.name, - deployedAppVariantRevisionId: e?.deployedAppVariantRevisionId ?? null, - })) as DeployModalEnvRow[] - }, - deepEqual, -) diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/index.tsx b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/index.tsx index b420d947fe..eb9a5b98dd 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/index.tsx @@ -1,21 +1,14 @@ -import {useCallback, useEffect} from "react" +import {useCallback, useState} from "react" import {Rocket} from "@phosphor-icons/react" -import {useAtomValue, useSetAtom} from "jotai" import dynamic from "next/dynamic" import router from "next/router" import {message} from "@/oss/components/AppMessageContext" import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" import {usePostHogAg} from "@/oss/lib/helpers/analytics/hooks/usePostHogAg" -import {publishMutationAtom} from "@/oss/state/deployment/atoms/publish" +import {createPublishVariant, createPublishRevision} from "@/oss/services/deployment/api" -import { - deploySelectedEnvAtom, - deployResetAtom, - deploySubmitAtom, - deployVariantModalAtom, -} from "./store/deployVariantModalStore" import {DeployVariantModalProps} from "./types" const DeployVariantModalContent = dynamic(() => import("./assets/DeployVariantModalContent"), { @@ -23,8 +16,8 @@ const DeployVariantModalContent = dynamic(() => import("./assets/DeployVariantMo }) const DeployVariantModal = ({ - parentVariantId, variantId, + environments, revisionId, variantName, revision, @@ -33,61 +26,54 @@ const DeployVariantModal = ({ ...props }: DeployVariantModalProps) => { const posthog = usePostHogAg() - const selectedEnvName = useAtomValue(deploySelectedEnvAtom) - const resetDeploy = useSetAtom(deployResetAtom) - const submitDeploy = useSetAtom(deploySubmitAtom) - const setModalState = useSetAtom(deployVariantModalAtom) - const {isPending: isLoading} = useAtomValue(publishMutationAtom) - const appId = router.query.app_id as string + const [selectedEnvName, setSelectedEnvName] = useState([]) + const [note, setNote] = useState("") + const [isLoading, setIsLoading] = useState(false) - // Ensure Jotai store has the necessary identifiers when this modal is used directly - useEffect(() => { - const next = { - parentVariantId: parentVariantId ?? variantId ?? null, - revisionId: revisionId ?? null, - variantName, - revision, - mutate, - } - setModalState((prev) => ({...prev, ...next})) - }, [parentVariantId, variantId, revisionId, variantName, revision, mutate, setModalState]) + const appId = router.query.app_id as string const onClose = useCallback(() => { props.onCancel?.({} as any) - resetDeploy() - }, [resetDeploy, props]) + setSelectedEnvName([]) + setNote("") + }, []) const deployVariants = useCallback(async () => { - // Ensure latest props are in the store before submitting - const next = { - parentVariantId: parentVariantId ?? variantId ?? null, - revisionId: revisionId ?? null, - variantName, - revision, - mutate, - } - console.debug("[DeployModal] pre-submit sync", next) - setModalState((prev) => ({...prev, ...next})) + const selectEnv = selectedEnvName[0] + try { + setIsLoading(true) + + if (variantId) { + await createPublishVariant({ + note, + variant_id: variantId, + environment_name: selectEnv, + }) + } else { + await createPublishRevision({ + note, + revision_id: revisionId, + environment_ref: selectEnv, + }) + } + + onClose() + mutate?.() - const result = await submitDeploy({ - parentVariantId: next.parentVariantId, - revisionId: next.revisionId, - }) - if (!result?.ok) { - if (result?.error) message.error(result.error) - return + message.success(`Published ${variantName} to ${selectEnv}`) + posthog?.capture?.("app_deployed", {app_id: appId, environment: selectEnv}) + } catch (error) { + message.error("Failed to deploy variants. Please try again") + } finally { + setIsLoading(false) } - const env = result.env as string - onClose() - message.success(`Published ${variantName} to ${env}`) - posthog?.capture?.("app_deployed", {app_id: appId, environment: env}) - }, [submitDeploy, onClose, variantName, appId, posthog]) + }, [createPublishVariant, revision, revisionId, variantId, selectedEnvName, note]) return ( ) diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/store/deployVariantModalStore.ts b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/store/deployVariantModalStore.ts deleted file mode 100644 index 2fac20a87e..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/store/deployVariantModalStore.ts +++ /dev/null @@ -1,129 +0,0 @@ -import {atom} from "jotai" -import {atomWithImmer} from "jotai-immer" - -import {publishMutationAtom} from "@/oss/state/deployment/atoms/publish" - -interface DeployVariantModalState { - open: boolean - parentVariantId?: string | null - revisionId?: string | null - variantName?: string - revision?: number | string - mutate?: () => void -} - -export const deployVariantModalAtom = atomWithImmer({ - open: false, -}) - -export const openDeployVariantModalAtom = atom( - null, - ( - get, - set, - params: { - parentVariantId?: string | null - revisionId?: string | null - variantName: string - revision: number | string - mutate?: () => void - }, - ) => { - console.debug("[DeployModal] open", params) - set(deployVariantModalAtom, (draft) => { - draft.open = true - if ("parentVariantId" in params) draft.parentVariantId = params.parentVariantId ?? null - if ("revisionId" in params) draft.revisionId = params.revisionId ?? null - if ("variantName" in params) draft.variantName = params.variantName - if ("revision" in params) draft.revision = params.revision - if ("mutate" in params) draft.mutate = params.mutate - }) - }, -) - -export const closeDeployVariantModalAtom = atom(null, (get, set) => { - set(deployVariantModalAtom, (draft) => { - draft.open = false - }) -}) - -// Local modal state managed via atoms -export const deploySelectedEnvAtom = atom([]) -export const deployNoteAtom = atom("") - -export const deployResetAtom = atom(null, (get, set) => { - set(deploySelectedEnvAtom, []) - set(deployNoteAtom, "") -}) - -// Async submit action. Optional overrides allow providing ids directly. -// Returns { ok: boolean, env?: string, error?: string } -export const deploySubmitAtom = atom( - null, - async (get, set, overrides?: {parentVariantId?: string | null; revisionId?: string | null}) => { - const baseState = get(deployVariantModalAtom) - const state = { - ...baseState, - parentVariantId: overrides?.parentVariantId ?? baseState.parentVariantId ?? null, - revisionId: overrides?.revisionId ?? baseState.revisionId ?? null, - } - const selectedEnvName = get(deploySelectedEnvAtom) - const note = get(deployNoteAtom) - const {mutateAsync: publish} = get(publishMutationAtom) - - // Debug current state before proceeding - console.debug("[DeployModal] submit:start", { - state, - overrides, - selectedEnvName, - note, - }) - - const env = selectedEnvName[0] - if (!env) { - console.debug("[DeployModal] submit:fail", {reason: "no_env_selected"}) - return {ok: false, error: "No environment selected"} - } - if (!state.parentVariantId && !state.revisionId) { - console.debug("[DeployModal] submit:fail", { - reason: "missing_ids", - parentVariantId: state.parentVariantId, - revisionId: state.revisionId, - }) - return {ok: false, error: "Missing revision to deploy."} - } - - console.debug("[DeployModal] submit:overrides", overrides) - - try { - console.debug("[DeployModal] submit:publish", { - mode: state.parentVariantId ? "variant" : "revision", - parentVariantId: state.parentVariantId, - revisionId: state.revisionId, - env, - }) - await publish( - state.parentVariantId - ? { - type: "variant" as const, - variant_id: state.parentVariantId, - environment_name: env, - note, - revision_id: state.revisionId || undefined, - } - : { - type: "revision" as const, - revision_id: state.revisionId as string, - environment_ref: env, - note, - }, - ) - // success; keep state for UI to clear/close - console.debug("[DeployModal] submit:success", {env}) - return {ok: true, env} - } catch (e: any) { - console.debug("[DeployModal] submit:error", {error: e}) - return {ok: false, error: e?.message || "Failed to deploy"} - } - }, -) diff --git a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.ts b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.ts index a3390f5f01..f98d5f209a 100644 --- a/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.ts +++ b/web/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.ts @@ -10,12 +10,9 @@ export interface ExtendedEnvironment extends Environment { } } export interface DeployVariantModalProps extends ModalProps { - /** When deploying a whole variant (not a specific revision). Synonym: variantId. */ - parentVariantId?: string - /** Optional alias supported by DeployVariantButton */ variantId?: string revisionId?: string - environments?: ExtendedEnvironment[] + environments: ExtendedEnvironment[] variantName: string revision: number | string isLoading?: boolean diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/index.tsx b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/index.tsx index 107927e88f..7dbd8584aa 100644 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/index.tsx @@ -2,11 +2,20 @@ import {cloneElement, isValidElement, SetStateAction, useCallback, useState} fro import {Database} from "@phosphor-icons/react" import {Button} from "antd" -import {useAtomValue, useSetAtom} from "jotai" import dynamic from "next/dynamic" -import {appChatModeAtom} from "@/oss/components/Playground/state/atoms" -import {loadTestsetNormalizedMutationAtom} from "@/oss/components/Playground/state/atoms/mutations/testset/loadNormalized" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {findVariantById} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import {createMessageFromSchema} from "@/oss/components/Playground/hooks/usePlayground/assets/messageHelpers" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import {safeParse} from "@/oss/lib/helpers/utils" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import type { + ArrayMetadata, + Enhanced, + ObjectMetadata, +} from "@/oss/lib/shared/variant/genericTransformer/types" +import {createInputRow} from "@/oss/lib/shared/variant/inputHelpers" import {LoadTestsetButtonProps} from "./types" @@ -19,35 +28,115 @@ const LoadTestsetButton = ({ variantId, ...props }: LoadTestsetButtonProps) => { - const loadTestsetData = useSetAtom(loadTestsetNormalizedMutationAtom) - const isChat = useAtomValue(appChatModeAtom) ?? false + const {mutate, isChat, inputKeys} = usePlayground({ + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const _variantId = variantId || state.selected[0] + const variant = findVariantById(state, _variantId) + const inputKeys = (variant?.prompts || []).flatMap((prompt) => { + const keys = prompt.inputKeys.value.map((key) => key.value) + return keys + }) + + return {isChat: state.variants[0]?.isChat, inputKeys: inputKeys} + }, + [variantId], + ), + }) const [isTestsetModalOpen, setIsTestsetModalOpen] = useState(false) const [testsetData, setTestsetData] = useState | null>(null) const wrappedSetTestsetData = useCallback( (d: SetStateAction | null>) => { - // Only call the mutation if we have valid testset data - if (d && Array.isArray(d) && d.length > 0) { - // Use the new mutation atom to load testset data - loadTestsetData({ - testsetData: d, - isChatVariant: isChat, - regenerateVariableIds: true, - }) - } else if (d && !Array.isArray(d)) { - // Handle single testset item - loadTestsetData({ - testsetData: [d], - isChatVariant: isChat, - regenerateVariableIds: true, - }) - } + const data = Array.isArray(d) ? d : [d] + + mutate( + (clonedState) => { + if (!clonedState) return clonedState + + if (isChat) { + const messageRow = clonedState.generationData.messages.value[0] + + if (!messageRow) return clonedState + + data.forEach((row) => { + const chatMessages = safeParse(row.messages) + + const _metadata = getMetadataLazy( + messageRow.history.__metadata, + ) + const messageMetadata = _metadata?.itemMetadata as ObjectMetadata + + if (!messageMetadata) return + + const newMessages = chatMessages?.map( + (chat: {role: string; content: string}) => { + return createMessageFromSchema(messageMetadata, { + role: chat?.role, + content: chat?.content, + }) + }, + ) + + messageRow.history.value = [...newMessages] + + const generationMetadata = clonedState.generationData.inputs.__metadata + const parentMetadata = + getMetadataLazy>(generationMetadata) + const inputMetadata = parentMetadata?.itemMetadata + + if (!inputMetadata) return clonedState + + const _inputKeys = Object.keys(inputMetadata.properties) + const newRow = createInputRow(_inputKeys, inputMetadata) + + for (const key of _inputKeys as (keyof typeof newRow)[]) { + const newRowProperty = newRow[key] as Enhanced + newRowProperty.value = row[key] + } + + clonedState.generationData.inputs.value = [newRow] + }) + + return clonedState + } else { + // access the existing generation metadata to pull correct keys from testset rows + const generationMetadata = clonedState.generationData.inputs.__metadata + + // loop through the testset rows and create new generation rows from them + const newGenerationRows = data.map((row) => { + const parentMetadata = + getMetadataLazy>(generationMetadata) + const metadata = parentMetadata?.itemMetadata + + if (!metadata) return null + + const inputKeys = Object.keys(metadata.properties) + const newRow = createInputRow(inputKeys, metadata) + + // set the values of the new generation row inputs to the values of the testset row + for (const key of inputKeys as (keyof typeof newRow)[]) { + const newRowProperty = newRow[key] as Enhanced + newRowProperty.value = row[key] + } + + return newRow + }) + + clonedState.generationData.inputs.value = newGenerationRows.filter( + (row) => !!row, + ) + + return clonedState + } + }, + {revalidate: false}, + ) - // Update local state for the modal setTestsetData(d) }, - [loadTestsetData, isChat], + [inputKeys, isChat, mutate], ) return ( diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/types.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/types.d.ts similarity index 100% rename from web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/types.ts rename to web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetButton/types.d.ts diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalContent/index.tsx b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalContent/index.tsx deleted file mode 100644 index fe1d9ac5e3..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalContent/index.tsx +++ /dev/null @@ -1,460 +0,0 @@ -import dynamic from "next/dynamic" - -import {Expandable} from "@/oss/components/Tables/ExpandableCell" -import {getStringOrJson} from "@/oss/lib/helpers/utils" -import {Testset, testset} from "@/oss/lib/Types" -import {fetchTestset} from "@/oss/services/testsets/api" -import {useTestsetsData} from "@/oss/state/testset" -import {urlAtom} from "@/oss/state/url" -import {appUriInfoAtom} from "@/oss/state/variant/atoms/fetcher" -import {useQueryClient} from "@tanstack/react-query" -import {Checkbox, Divider, Input, Menu, Tooltip, Typography} from "antd" -import {ColumnsType} from "antd/es/table" -import {useAtomValue} from "jotai" -import {memo, useCallback, useEffect, useMemo, useState} from "react" -import {useRouter} from "next/router" -import clsx from "clsx" -import {useTestsetInputsAnalysis} from "../../hooks/useTestsetInputsAnalysis" -import {LoadTestsetModalContentProps} from "../types" -import EnhancedTable from "@/oss/components/EnhancedUIs/Table" - -const NoResultsFound = dynamic(() => import("@/oss/components/NoResultsFound/NoResultsFound"), { - ssr: false, -}) - -const LoadTestsetModalContent = ({ - modalProps, - selectedTestset, - setSelectedTestset, - testsetCsvData, - selectedRowKeys, - setSelectedRowKeys, - isLoadingTestset, - isChat, -}: LoadTestsetModalContentProps) => { - const {testsets, columnsByTestsetId, isLoading} = useTestsetsData({enabled: modalProps.open}) - const queryClient = useQueryClient() - const router = useRouter() - - const [searchTerm, setSearchTerm] = useState("") - const appUriInfo = useAtomValue(appUriInfoAtom) - const routePath = appUriInfo?.routePath - const urlState = useAtomValue(urlAtom) - - // High-level analysis of inputs vs testset columns, including schema + dynamic variables - const {expectedInputVariables, hasCompatibilityIssue} = useTestsetInputsAnalysis({ - routePath, - testsetCsvData, - }) - - const normalizedExpectedVariables = useMemo( - () => - expectedInputVariables - .map((variable) => (typeof variable === "string" ? variable.trim() : "")) - .filter(Boolean), - [expectedInputVariables], - ) - - const testsetMatchInfo = useMemo(() => { - return testsets.reduce( - (acc, ts) => { - const id = ts?._id - if (!id) return acc - - const columns = columnsByTestsetId?.[id] - if (!Array.isArray(columns) || columns.length === 0) { - acc[id] = {score: 0, hasColumns: false} - return acc - } - - const normalizedColumns = new Set( - columns - .map((column) => (typeof column === "string" ? column.trim() : undefined)) - .filter(Boolean) as string[], - ) - - if (normalizedColumns.size === 0) { - acc[id] = {score: 0, hasColumns: false} - return acc - } - - const score = normalizedExpectedVariables.reduce((count, variable) => { - if (!variable) return count - return normalizedColumns.has(variable) ? count + 1 : count - }, 0) - - acc[id] = {score, hasColumns: true} - return acc - }, - {} as Record, - ) - }, [columnsByTestsetId, normalizedExpectedVariables, testsets]) - - const compatibilityByTestset = useMemo(() => { - return testsets.reduce( - (acc, ts) => { - const id = ts?._id - if (!id) return acc - - const rawColumns = columnsByTestsetId?.[id] - const columnsKnown = Array.isArray(rawColumns) - const trimmedColumns = columnsKnown - ? (rawColumns as string[]) - .map((column) => (typeof column === "string" ? column.trim() : "")) - .filter(Boolean) - : [] - const columnsLower = new Set(trimmedColumns.map((column) => column.toLowerCase())) - - const missingExpected = columnsKnown - ? normalizedExpectedVariables.filter( - (variable) => !columnsLower.has(variable.toLowerCase()), - ) - : [] - - const matched = columnsKnown - ? normalizedExpectedVariables.filter((variable) => - columnsLower.has(variable.toLowerCase()), - ) - : [] - - acc[id] = { - columns: trimmedColumns, - missingExpected, - matched, - columnsKnown, - hasWarning: columnsKnown && missingExpected.length > 0, - } - - return acc - }, - {} as Record< - string, - { - columns: string[] - missingExpected: string[] - matched: string[] - columnsKnown: boolean - hasWarning: boolean - } - >, - ) - }, [columnsByTestsetId, normalizedExpectedVariables, testsets]) - - const bestMatchingTestset = useMemo(() => { - if (!testsets.length) return {id: "", score: -1} - - if (normalizedExpectedVariables.length === 0) { - const firstId = testsets[0]?._id || "" - return {id: firstId, score: 0} - } - - let bestId = "" - let bestScore = 0 - - testsets.forEach((ts) => { - const id = ts?._id - if (!id) return - const info = testsetMatchInfo[id] - if (!info?.hasColumns) return - if (info.score > bestScore) { - bestScore = info.score - bestId = id - } - }) - - if (bestScore > 0 && bestId) { - return {id: bestId, score: bestScore} - } - - return {id: "", score: 0} - }, [normalizedExpectedVariables.length, testsetMatchInfo, testsets]) - - const {id: bestMatchingTestsetId, score: bestMatchingScore} = bestMatchingTestset - - const handleCreateTestset = useCallback(() => { - router.push(`${urlState.projectURL}/testsets`) - }, [router, urlState?.projectURL]) - - useEffect(() => { - if (!modalProps.open || !testsets.length) return - - setSelectedTestset((prev) => { - const prevExists = prev && testsets.some((ts) => ts?._id === prev) - if (prevExists) { - return prev - } - - if (!normalizedExpectedVariables.length) { - return testsets[0]?._id || "" - } - - return bestMatchingTestsetId || testsets[0]?._id || "" - }) - }, [bestMatchingTestsetId, modalProps.open, normalizedExpectedVariables.length, testsets]) - - const filteredTestset = useMemo(() => { - if (!searchTerm) return testsets - return testsets.filter((item: testset) => - item.name.toLowerCase().includes(searchTerm.toLowerCase()), - ) - }, [searchTerm, testsets]) - - // Prefetch CSV data for the first N visible testsets to populate column cache - useEffect(() => { - if (!modalProps.open) return - - const BATCH = 8 - const list = (filteredTestset.length ? filteredTestset : testsets).slice(0, BATCH) - list.forEach((ts: any) => { - if (!ts?._id) return - queryClient.prefetchQuery({ - queryKey: ["testsetCsvData", ts._id], - queryFn: async () => { - const data = await fetchTestset(ts._id) - return data.csvdata ?? [] - }, - staleTime: 1000 * 60 * 2, - }) - }) - }, [modalProps.open, testsets, filteredTestset]) - - const selectionWarningMessage = useMemo(() => { - if (!hasCompatibilityIssue || !selectedTestset) return undefined - - const variantList = normalizedExpectedVariables.length - ? normalizedExpectedVariables.join(", ") - : "—" - - return `The testset has no CSV columns matching the expected variables {{${variantList}}}` - }, [hasCompatibilityIssue, normalizedExpectedVariables, selectedTestset]) - - const rowSelection = useMemo( - () => ({ - selectedRowKeys, - onChange: (keys: React.Key[]) => { - setSelectedRowKeys(keys) - }, - columnTitle: ( - - - 0 && - selectedRowKeys.length < testsetCsvData.length - } - checked={ - testsetCsvData.length > 0 && - selectedRowKeys.length === testsetCsvData.length - } - onChange={() => { - const allKeys = testsetCsvData.map((_, idx) => idx) - if (selectedRowKeys.length === allKeys.length) { - setSelectedRowKeys([]) - } else if (isChat) { - setSelectedRowKeys(allKeys.slice(0, 1)) - } else { - setSelectedRowKeys(allKeys) - } - }} - /> - - - ), - }), - [isChat, selectedRowKeys, selectionWarningMessage, setSelectedRowKeys, testsetCsvData], - ) - - const columnDef = useMemo(() => { - if (!testsetCsvData.length) { - return [ - {title: "-", width: 300}, - {title: "-", width: 300}, - ] - } - - const columns: ColumnsType = [] - - if (testsetCsvData.length > 0) { - const keys = Object.keys(testsetCsvData[0]).filter((key) => key !== "testcase_dedup_id") - - columns.push( - ...keys.map((key, index) => ({ - title: key, - dataIndex: key, - key: index, - width: 300, - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - onCell: () => ({ - title: selectionWarningMessage, - }), - render: (_: any, record: any) => { - const display = getStringOrJson(record[key]) - const content = ( - - {display} - - ) - return selectionWarningMessage ? ( - {content} - ) : ( - content - ) - }, - })), - ) - } - - return columns - }, [selectionWarningMessage, testsetCsvData]) - - const dataSource = useMemo(() => { - if (!testsetCsvData.length) return [] - return testsetCsvData.map((data, index) => ({...data, id: index})) - }, [testsetCsvData]) - - const menuItems = useMemo(() => { - if (!filteredTestset.length) return [] - - const items = filteredTestset.map((ts: testset) => { - const diagnostics = compatibilityByTestset[ts._id] - const columnsKnown = diagnostics?.columnsKnown ?? false - const hasWarning = diagnostics?.hasWarning ?? false - - const tooltip = - !columnsKnown && normalizedExpectedVariables.length - ? "Analyzing columns..." - : hasWarning && diagnostics?.missingExpected.length - ? `This testset has no CSV columns matching the expected variables` - : undefined - - return { - key: ts._id, - label: ( - - - {ts.name} - - - ), - __diag: { - id: ts._id, - name: ts.name, - columnsKnown, - columns: diagnostics?.columns ?? [], - expected: normalizedExpectedVariables, - missing: diagnostics?.missingExpected ?? [], - hasWarning, - }, - } - }) - - try { - console.table( - items.map((it: any) => ({ - id: it.__diag.id, - name: it.__diag.name, - columnsKnown: it.__diag.columnsKnown, - columns: it.__diag.columns?.join(", ") || "", - expected: it.__diag.expected?.join(", ") || "", - missing: it.__diag.missing?.join(", ") || "", - hasWarning: it.__diag.hasWarning, - })), - ) - } catch {} - - return items - }, [compatibilityByTestset, filteredTestset, normalizedExpectedVariables]) - - const onChangeTestset = useCallback(({key}: any) => { - setSelectedRowKeys([]) - setSelectedTestset(key) - }, []) - - const menuSelectedKeys = selectedTestset ? [selectedTestset] : [] - - if (!testsets.length && !testsetCsvData.length && !isLoadingTestset && !isLoading) - return ( - - ) - - return ( -
-
- setSearchTerm(e.target.value)} - /> - - - - -
- - - -
-
- - Select a testcase - -
- - ({ - className: "cursor-pointer", - title: selectionWarningMessage, - onClick: () => { - if (rowIndex === undefined) return - if (selectedRowKeys.includes(rowIndex)) { - setSelectedRowKeys( - selectedRowKeys.filter((row) => row !== rowIndex), - ) - } else if (isChat) { - setSelectedRowKeys([rowIndex]) - } else { - setSelectedRowKeys([...selectedRowKeys, rowIndex]) - } - }, - })} - /> -
-
- ) -} - -export default memo(LoadTestsetModalContent) diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalFooter/index.tsx b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalFooter/index.tsx deleted file mode 100644 index 152a91f9cd..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/LoadTestsetModalFooter/index.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import {appUriInfoAtom} from "@/oss/state/variant/atoms/fetcher" -import {Play} from "@phosphor-icons/react" -import {Button, Tooltip} from "antd" -import {useAtomValue} from "jotai" -import {memo, useCallback, useMemo} from "react" -import {useTestsetInputsAnalysis} from "../../hooks/useTestsetInputsAnalysis" -import {LoadTestsetModalFooterProps} from "../types" - -const LoadTestsetModalFooter = ({ - onClose, - isLoadingTestset, - selectedRowKeys, - testsetCsvData, - setTestsetData, -}: LoadTestsetModalFooterProps) => { - const appUriInfo = useAtomValue(appUriInfoAtom) - const routePath = appUriInfo?.routePath - - // High-level analysis of inputs vs testset columns, including schema + dynamic variables - const {expectedInputVariables, hasCompatibilityIssue} = useTestsetInputsAnalysis({ - routePath, - testsetCsvData, - }) - - const loadWarningMessage = useMemo(() => { - if (!hasCompatibilityIssue) return undefined - const variantList = expectedInputVariables.length ? expectedInputVariables.join(", ") : "—" - - return `The testset has no CSV columns matching the expected variables {{${variantList}}}. Loading may fail unless the variables align.` - }, [expectedInputVariables, hasCompatibilityIssue]) - - const loadTestset = useCallback(() => { - const selectedTestcase = testsetCsvData.filter((_, index) => - selectedRowKeys.includes(index), - ) - if (selectedTestcase) { - setTestsetData(selectedTestcase) - onClose() - } - }, [onClose, selectedRowKeys, setTestsetData, testsetCsvData]) - - return ( -
- - - {/* Wrap disabled button with span so tooltip triggers on hover */} - - - - -
- ) -} - -export default memo(LoadTestsetModalFooter) diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/testsetCsvData.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/testsetCsvData.ts deleted file mode 100644 index 41e8ec8923..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/testsetCsvData.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {atomFamily} from "jotai/utils" -import {atomWithQuery} from "jotai-tanstack-query" - -import {Testset} from "@/oss/lib/Types" -import {fetchTestset} from "@/oss/services/testsets/api" - -export interface TestsetCsvParams { - testsetId?: string - enabled?: boolean -} - -/** - * Atom family to fetch CSV data for a given testset ID. - * Returns the raw csvdata array from the testset response. - */ -export const testsetCsvDataQueryAtomFamily = atomFamily((params: TestsetCsvParams) => - atomWithQuery((get) => { - const {testsetId, enabled = true} = params || {} - return { - queryKey: ["testsetCsvData", testsetId], - queryFn: async () => { - if (!testsetId) return [] - const data = await fetchTestset(testsetId) - return data.csvdata || [] - }, - enabled: !!testsetId && enabled, - staleTime: 1000 * 60 * 2, // 2 minutes - refetchOnWindowFocus: false, - refetchOnReconnect: true, - } - }), -) diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/types.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/types.ts deleted file mode 100644 index d527c0b05f..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/assets/types.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {Testset} from "@/oss/lib/Types" -import {ModalProps} from "antd" - -export interface LoadTestsetModalProps extends ModalProps { - setTestsetData: React.Dispatch[] | null>> - testsetData: Record | null - isChat?: boolean -} - -export interface LoadTestsetModalContentProps { - modalProps: LoadTestsetModalProps - selectedTestset: string - setSelectedTestset: React.Dispatch> - testsetCsvData: Testset["csvdata"] - selectedRowKeys: React.Key[] - setSelectedRowKeys: React.Dispatch> - isLoadingTestset: boolean - isChat: boolean -} - -export interface LoadTestsetModalFooterProps { - onClose: () => void - isLoadingTestset: boolean - selectedRowKeys: React.Key[] - testsetCsvData: Testset["csvdata"] - setTestsetData: React.Dispatch[] | null>> -} diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useInputsVsColumns.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useInputsVsColumns.ts deleted file mode 100644 index 95274fc57d..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useInputsVsColumns.ts +++ /dev/null @@ -1,111 +0,0 @@ -import {useMemo} from "react" - -import {Testset} from "@/oss/lib/Types" - -export interface InputsVsColumnsResult { - availableCsvColumns: string[] - csvColumnMap: Map - matchingVariables: string[] - missingExpectedVariables: string[] - unexpectedCsvColumns: string[] - datasetLoaded: boolean - shouldBlockLoad: boolean - matchingVariableSet: Set - hasCompatibilityIssue: boolean - disabledReason?: string -} - -/** - * Reusable hook to compare required input variables against available CSV columns - * and provide derived helpers for UI state and messaging. - */ -export function useInputsVsColumns( - expectedInputVariables: string[], - testsetCsvData: Testset["csvdata"], -): InputsVsColumnsResult { - const availableCsvColumns = useMemo(() => { - if (!testsetCsvData.length) return [] as string[] - const firstRow = testsetCsvData[0] || ({} as Record) - return Object.keys(firstRow) - }, [testsetCsvData]) - - const csvColumnMap = useMemo(() => { - return availableCsvColumns.reduce((acc, column) => { - if (!column) return acc - const trimmed = String(column).trim() - if (!trimmed) return acc - if (!acc.has(trimmed)) { - acc.set(trimmed, trimmed) - } - return acc - }, new Map()) - }, [availableCsvColumns]) - - const matchingVariables = useMemo( - () => - expectedInputVariables.filter((variable) => { - if (typeof variable !== "string") return false - const trimmed = variable.trim() - if (!trimmed) return false - return csvColumnMap.has(trimmed) - }), - [csvColumnMap, expectedInputVariables], - ) - - const missingExpectedVariables = useMemo( - () => - expectedInputVariables.filter((variable) => { - if (typeof variable !== "string") return false - const trimmed = variable.trim() - if (!trimmed) return false - return !csvColumnMap.has(trimmed) - }), - [csvColumnMap, expectedInputVariables], - ) - - const unexpectedCsvColumns = useMemo(() => { - if (!availableCsvColumns.length) return [] - const expectedSet = new Set( - expectedInputVariables - .map((variable) => - typeof variable === "string" ? variable.trim().toLowerCase() : "", - ) - .filter(Boolean), - ) - if (!expectedSet.size) return [] - return availableCsvColumns.filter((column) => { - const trimmed = typeof column === "string" ? column.trim().toLowerCase() : "" - if (!trimmed) return false - return !expectedSet.has(trimmed) - }) - }, [availableCsvColumns, expectedInputVariables]) - - const datasetLoaded = testsetCsvData.length > 0 - - const shouldBlockLoad = - datasetLoaded && expectedInputVariables.length > 0 && matchingVariables.length === 0 - - const hasCompatibilityIssue = datasetLoaded && missingExpectedVariables.length > 0 - - const matchingVariableSet = useMemo(() => new Set(matchingVariables), [matchingVariables]) - - const disabledReason = useMemo(() => { - if (!hasCompatibilityIssue) return undefined - if (!expectedInputVariables.length) return undefined - if (!missingExpectedVariables.length) return undefined - return `Variant inputs missing in testset: ${missingExpectedVariables.join(", ")}` - }, [expectedInputVariables.length, hasCompatibilityIssue, missingExpectedVariables]) - - return { - availableCsvColumns, - csvColumnMap, - matchingVariables, - missingExpectedVariables, - unexpectedCsvColumns, - datasetLoaded, - shouldBlockLoad, - matchingVariableSet, - hasCompatibilityIssue, - disabledReason, - } -} diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useTestsetInputsAnalysis.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useTestsetInputsAnalysis.ts deleted file mode 100644 index 90ef68c1fe..0000000000 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/hooks/useTestsetInputsAnalysis.ts +++ /dev/null @@ -1,154 +0,0 @@ -import {useMemo} from "react" - -import {useAtomValue} from "jotai" - -import { - displayedVariantsVariablesAtom, - schemaInputKeysAtom, -} from "@/oss/components/Playground/state/atoms/variants" -import {Testset} from "@/oss/lib/Types" -import {requestSchemaMetaAtomFamily} from "@/oss/state/newPlayground/core/requestSchemaMeta" - -import {useInputsVsColumns} from "./useInputsVsColumns" - -export interface UseTestsetInputsAnalysisParams { - // Optional: pass routePath to fetch schema meta via atom - routePath?: string - // Explicit overrides to decouple from atoms when desired - displayedVariablesOverride?: string[] - schemaInputKeysOverride?: string[] - requestSchemaMetaOverride?: {inputKeys?: string[]; required?: string[]} - // The dataset to analyze - testsetCsvData: Testset["csvdata"] -} - -export interface UseTestsetInputsAnalysisResult { - normalizedDynamicVariables: string[] - schemaVariableCandidates: string[] - expectedInputVariables: string[] - shouldBlockLoad: boolean - matchingVariableSet: Set - matchingVariables: string[] - missingExpectedVariables: string[] - unexpectedCsvColumns: string[] - availableCsvColumns: string[] - hasCompatibilityIssue: boolean - disabledReason?: string -} - -/** - * High-level hook that can operate in two modes: - * 1) Controlled mode: receive explicit schema/vars via overrides (no atom reads) - * 2) Atom-backed mode: provide routePath and it will read from atoms - */ -export function useTestsetInputsAnalysis( - params: UseTestsetInputsAnalysisParams, -): UseTestsetInputsAnalysisResult { - const { - routePath, - displayedVariablesOverride, - schemaInputKeysOverride, - requestSchemaMetaOverride, - testsetCsvData, - } = params - - // Resolve dynamic variables - const displayedVariablesFromAtoms = useAtomValue(displayedVariantsVariablesAtom) - const displayedVariables = displayedVariablesOverride ?? displayedVariablesFromAtoms - - // Resolve schema keys - const schemaInputKeysFromAtoms = useAtomValue(schemaInputKeysAtom) - const schemaInputKeys = schemaInputKeysOverride ?? schemaInputKeysFromAtoms - - // Resolve schema meta - const requestSchemaMetaFromAtom = useAtomValue( - useMemo(() => requestSchemaMetaAtomFamily({variant: {} as any, routePath}), [routePath]), - ) - const requestSchemaMeta = requestSchemaMetaOverride ?? requestSchemaMetaFromAtom - - // Normalize dynamic variables - const normalizedDynamicVariables = useMemo( - () => - (displayedVariables || []) - .map((v) => (typeof v === "string" ? v.trim() : "")) - .filter(Boolean), - [displayedVariables], - ) - - // Build candidate keys from schema + dynamic vars - const schemaVariableCandidates = useMemo(() => { - const meta = requestSchemaMeta || {inputKeys: [], required: []} - const primaryKeys = [...(meta.inputKeys || []), ...(meta.required || [])] - const fallbackKeys = schemaInputKeys || [] - const result = new Map() - - const addValue = (value: string) => { - if (!value) return - const normalized = value.toLowerCase() - if (!result.has(normalized)) { - result.set(normalized, value) - } - } - - const addDynamicInputs = () => { - if (!normalizedDynamicVariables.length) return - normalizedDynamicVariables.forEach((variable) => addValue(variable)) - } - - const handleKey = (rawKey: string) => { - const key = typeof rawKey === "string" ? rawKey.trim() : "" - if (!key) return - if (key === "inputs") { - addDynamicInputs() - return - } - addValue(key) - } - - primaryKeys.forEach(handleKey) - - if (result.size === 0) { - fallbackKeys.forEach(handleKey) - } else { - fallbackKeys.forEach((key) => { - if (!key) return - handleKey(key) - }) - } - - addDynamicInputs() - - return Array.from(result.values()) - }, [normalizedDynamicVariables, requestSchemaMeta, schemaInputKeys]) - - const expectedInputVariables = useMemo( - () => - Array.from(new Map(schemaVariableCandidates.map((v) => [v.toLowerCase(), v])).values()), - [schemaVariableCandidates], - ) - - const { - shouldBlockLoad, - matchingVariableSet, - matchingVariables, - missingExpectedVariables, - unexpectedCsvColumns, - availableCsvColumns, - hasCompatibilityIssue, - disabledReason, - } = useInputsVsColumns(expectedInputVariables, testsetCsvData) - - return { - normalizedDynamicVariables, - schemaVariableCandidates, - expectedInputVariables, - shouldBlockLoad, - matchingVariables, - matchingVariableSet, - missingExpectedVariables, - unexpectedCsvColumns, - availableCsvColumns, - hasCompatibilityIssue, - disabledReason, - } -} diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/index.tsx b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/index.tsx index 6dcf295686..5ad5e61887 100644 --- a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/index.tsx +++ b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/index.tsx @@ -1,20 +1,16 @@ -import {useCallback, useMemo, useState} from "react" +import {useCallback, useEffect, useMemo, useState} from "react" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" +import {Play} from "@phosphor-icons/react" +import {Divider, Input, Menu, Modal, Table, Typography} from "antd" +import {ColumnsType} from "antd/es/table" -import EnhancedModal from "@/oss/components/EnhancedUIs/Modal" -import {Testset} from "@/oss/lib/Types" +import NoResultsFound from "@/oss/components/NoResultsFound/NoResultsFound" +import {getStringOrJson} from "@/oss/lib/helpers/utils" +import {TestSet, testset} from "@/oss/lib/Types" +import {fetchTestset, useLoadTestsetsList} from "@/oss/services/testsets/api" -import {testsetCsvDataQueryAtomFamily} from "./assets/testsetCsvData" -import {LoadTestsetModalProps} from "./assets/types" - -const LoadTestsetModalFooter = dynamic(() => import("./assets/LoadTestsetModalFooter"), { - ssr: false, -}) -const LoadTestsetModalContent = dynamic(() => import("./assets/LoadTestsetModalContent"), { - ssr: false, -}) +import {useStyles} from "./styles" +import {LoadTestsetModalProps} from "./types" const LoadTestsetModal: React.FC = ({ testsetData, @@ -22,68 +18,186 @@ const LoadTestsetModal: React.FC = ({ isChat = false, ...props }) => { - const {onCancel, afterClose, ...modalProps} = props + const classes = useStyles() + const {testsets} = useLoadTestsetsList() + const [isLoadingTestset, setIsLoadingTestset] = useState(false) const [selectedTestset, setSelectedTestset] = useState("") + const [testsetCsvData, setTestsetCsvData] = useState([]) const [selectedRowKeys, setSelectedRowKeys] = useState([]) + const [searchTerm, setSearchTerm] = useState("") - // Fetch testset CSV data via atomWithQuery - const testsetCsvQuery = useAtomValue( - useMemo( - () => - testsetCsvDataQueryAtomFamily({ - testsetId: selectedTestset, - enabled: modalProps.open && !!selectedTestset, - }), - [selectedTestset, modalProps.open], - ), + const testsetFetcher = useCallback( + async (testsetId: string) => { + try { + setIsLoadingTestset(true) + const data = await fetchTestset(testsetId) + setTestsetCsvData(data.csvdata) + } catch (error) { + console.error(error) + } finally { + setIsLoadingTestset(false) + } + }, + [fetchTestset, setTestsetCsvData], ) - const testsetCsvData: Testset["csvdata"] = useMemo( - () => ((testsetCsvQuery as any)?.data as Testset["csvdata"]) || [], - [testsetCsvQuery], - ) - const isLoadingTestset = useMemo( - () => !!(testsetCsvQuery as any)?.isLoading || !!(testsetCsvQuery as any)?.isPending, - [testsetCsvQuery], + useEffect(() => { + if (props.open && testsets.length > 0) { + const testsetId = selectedTestset || testsets[0]?._id + setSelectedTestset(testsetId) + testsetFetcher(testsetId) + } + }, [testsets, props.open]) + + const filteredTestset = useMemo(() => { + if (!searchTerm) return testsets + return testsets.filter((item: testset) => + item.name.toLowerCase().includes(searchTerm.toLowerCase()), + ) + }, [searchTerm, testsets]) + + const rowSelection = useMemo( + () => ({ + selectedRowKeys, + onChange: (keys: React.Key[]) => { + setSelectedRowKeys(keys) + }, + }), + [selectedRowKeys], ) const onClose = useCallback(() => { - onCancel?.({} as any) + props.onCancel?.({} as any) setSelectedRowKeys([]) }, []) + const loadTestset = useCallback(() => { + const selectedTestCase = testsetCsvData.filter((_, index) => + selectedRowKeys.includes(index), + ) + if (selectedTestCase) { + setTestsetData(selectedTestCase) + onClose() + } + }, [selectedRowKeys]) + + const onChangeTestset = useCallback( + ({key}: any) => { + setSelectedRowKeys([]) + testsetFetcher(key) + setSelectedTestset(key) + }, + [testsetFetcher], + ) + + const columnDef = useMemo(() => { + const columns: ColumnsType = [] + + if (testsetCsvData.length > 0) { + const keys = Object.keys(testsetCsvData[0]) + + columns.push( + ...keys.map((key, index) => ({ + title: key, + dataIndex: key, + key: index, + width: 300, + onHeaderCell: () => ({ + style: {minWidth: 160}, + }), + render: (_: any, record: any) => { + const display = getStringOrJson(record[key]) + return
{display}
+ }, + })), + ) + } + + return columns + }, [testsetCsvData]) + return ( - { - setSelectedRowKeys([]) - afterClose?.() + className={classes.container} + afterClose={() => setSelectedRowKeys([])} + title="Load test set" + okText="Load test set" + okButtonProps={{ + icon: , + iconPosition: "end", + disabled: !selectedRowKeys.length, + onClick: loadTestset, + loading: isLoadingTestset, }} - title="Load testset" - footer={ - - } - onCancel={onClose} - {...modalProps} + {...props} > - - + {!testsets.length ? ( + + ) : ( +
+
+ setSearchTerm(e.target.value)} + /> + + + + ({ + key: testset._id, + label: testset.name, + }))} + onSelect={onChangeTestset} + defaultSelectedKeys={[selectedTestset]} + selectedKeys={[selectedTestset]} + className={classes.menu} + /> +
+ + + +
+ + Select a testcase + + + ({...data, id: index}))} + columns={columnDef} + className="flex-1" + bordered + rowKey={"id"} + pagination={false} + scroll={{y: 500, x: "max-content"}} + onRow={(_, rowIndex) => ({ + className: "cursor-pointer", + onClick: () => { + if (rowIndex !== undefined) { + if (selectedRowKeys.includes(rowIndex)) { + setSelectedRowKeys( + selectedRowKeys.filter((row) => row !== rowIndex), + ) + } else { + if (isChat) { + setSelectedRowKeys([rowIndex]) + } else { + setSelectedRowKeys([...selectedRowKeys, rowIndex]) + } + } + } + }, + })} + /> + + + )} + ) } diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/styles.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/styles.ts new file mode 100644 index 0000000000..5814c5fe7c --- /dev/null +++ b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/styles.ts @@ -0,0 +1,28 @@ +import {createUseStyles} from "react-jss" + +import {JSSTheme} from "@/oss/lib/Types" + +export const useStyles = createUseStyles((theme: JSSTheme) => ({ + container: { + "& .ant-modal-body": { + height: 600, + overflowY: "auto", + }, + }, + subTitle: { + fontSize: theme.fontSizeLG, + lineHeight: theme.lineHeightLG, + fontWeight: theme.fontWeightMedium, + }, + sidebar: { + display: "flex", + flexDirection: "column", + gap: theme.padding, + width: 200, + }, + menu: { + height: 500, + overflowY: "auto", + borderInlineEnd: `0px !important`, + }, +})) diff --git a/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/types.d.ts b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/types.d.ts new file mode 100644 index 0000000000..22f210d729 --- /dev/null +++ b/web/oss/src/components/Playground/Components/Modals/LoadTestsetModal/types.d.ts @@ -0,0 +1,7 @@ +import {ModalProps} from "antd" + +export interface LoadTestsetModalProps extends ModalProps { + setTestsetData: React.Dispatch[] | null>> + testsetData: Record | null + isChat?: boolean +} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/index.tsx index 119ef5f66e..345a6e2770 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/index.tsx @@ -1,81 +1,139 @@ -import {useMemo} from "react" +import {useCallback, useMemo} from "react" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" - -import TurnMessageAdapter from "@/oss/components/Playground/adapters/TurnMessageAdapter" -// Shared placeholder for empty state -import {usePlaygroundLayout} from "@/oss/components/Playground/hooks/usePlaygroundLayout" -import {displayedVariantsAtom} from "@/oss/components/Playground/state/atoms" -import { - generationInputRowIdsAtom, - resolvedGenerationResultAtomFamily, -} from "@/oss/components/Playground/state/atoms/generationProperties" -// import {inputRowIdsWithPropertiesCompatAtom} from "@/oss/state/generation/compat" -import {generationRowIdsAtom} from "@/oss/components/Playground/state/atoms/generationProperties" -import {generationLogicalTurnIdsAtom} from "@/oss/state/generation/compat" -import {chatTurnsByIdAtom, runStatusByRowRevisionAtom} from "@/oss/state/generation/entities" -import { - addChatTurnAtom, - runChatTurnAtom, - cancelChatTurnAtom, -} from "@/oss/state/newPlayground/chat/actions" -import { - sessionTurnIdForVariantAtomFamily, - isCellRunningAtomFamily, -} from "@/oss/state/newPlayground/chat/view" - -import LastTurnFooterControls from "../../ChatCommon/LastTurnFooterControls" -import GenerationChatTurnNormalized from "../../PlaygroundGenerations/assets/GenerationChatTurnNormalized" + +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {findPropertyInObject} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" + +import {ObjectMetadata} from "../../../../../lib/shared/variant/genericTransformer/types" +import GenerationChatRow, { + GenerationChatRowOutput, +} from "../../PlaygroundGenerations/assets/GenerationChatRow" import GenerationCompletionRow from "../../PlaygroundGenerations/assets/GenerationCompletionRow" +import GenerationOutputText from "../../PlaygroundGenerations/assets/GenerationOutputText" import {GenerationComparisonChatOutputProps, GenerationComparisonChatOutputCellProps} from "./types" -// No local schema plumbing; PromptMessageConfig derives structure internally - const GenerationComparisonChatOutputCell = ({ variantId, - turnId, + historyId, + rowId, variantIndex, isFirstRow, + isLastRow, }: GenerationComparisonChatOutputCellProps) => { - const inputRowIds = useAtomValue(generationInputRowIdsAtom) - // Use the same list the renderer uses to decide "last" row - const allRowIds = useAtomValue(generationRowIdsAtom) as string[] - const isLastTurn = (allRowIds || [])[Math.max(0, (allRowIds || []).length - 1)] === turnId - - const displayedVariantIds = useAtomValue(displayedVariantsAtom) - const addTurn = useSetAtom(addChatTurnAtom) - const runTurn = useSetAtom(runChatTurnAtom) - const cancelTurn = useSetAtom(cancelChatTurnAtom) - const turnsById = useAtomValue(chatTurnsByIdAtom) as Record - const userMessageId = useMemo( - () => (turnsById?.[turnId] as any)?.userMessage?.__id as string | undefined, - [turnsById, turnId], - ) - const runStatusMap = useAtomValue(runStatusByRowRevisionAtom) as Record - const resultHashes = useMemo(() => { - try { - const hashes = (displayedVariantIds || []).map((revId: string) => { - const entry = runStatusMap?.[`${turnId}:${revId}`] - return entry?.resultHash as string | undefined + const {rerunChatOutput, messages, messageRow, inputRowIds, mutate} = usePlayground({ + variantId, + registerToWebWorker: true, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRows = state.generationData.inputs.value || [] + + const historyMessage = findPropertyInObject(state, historyId) + const messageRow = findPropertyInObject(state.generationData.messages.value, rowId) + + const runs = !historyMessage?.__runs?.[variantId] + ? undefined + : historyMessage?.__runs?.[variantId] + ? historyMessage?.__runs?.[variantId].messages + ? historyMessage?.__runs?.[variantId].messages.map((message) => ({ + ...message, + __result: historyMessage.__runs[variantId].__result, + __isRunning: historyMessage.__runs[variantId].__isRunning, + })) + : [ + { + ...historyMessage.__runs[variantId].message, + __result: historyMessage.__runs[variantId].__result, + __isRunning: historyMessage.__runs[variantId].__isRunning, + }, + ] + : undefined + + const inputRowIds = (inputRows || []) + .filter((inputRow) => { + return ( + Object.keys( + (getMetadataLazy(inputRow.__metadata) as ObjectMetadata) + ?.properties, + ).length > 0 + ) + }) + .map((inputRow) => inputRow.__id) + + return { + messages: runs, + messageRow, + inputRowIds, + } + }, + [rowId, variantId, historyId], + ), + }) + + const handleDeleteMessage = useCallback( + (messageId: string) => { + mutate((clonedState) => { + if (!clonedState) return clonedState + + if (!variantId) { + const row = clonedState.generationData.messages.value.find( + (v) => v.__id === rowId, + ) + if (!row) return clonedState + + const isInput = row.history.value.findIndex((m) => m.__id === messageId) + if (isInput !== -1) { + row.history.value.splice(isInput, 1) + } else { + row.history.value.findIndex((m) => { + return m.__runs?.[variantId]?.message?.__id === messageId + }) + } + } else if (variantId) { + const row = clonedState.generationData.messages.value.find( + (v) => v.__id === rowId, + ) + if (!row) return clonedState + const isInput = row.history.value.findIndex((m) => { + return m.__runs?.[variantId]?.message?.__id === messageId + }) + if (isInput !== -1) { + delete row.history.value[isInput].__runs?.[variantId] + } + } }) - return hashes.filter((h): h is string => typeof h === "string" && h.length > 0) - } catch { - return [] as string[] - } - }, [runStatusMap, displayedVariantIds, turnId]) + }, + [variantId], + ) + + const canRerunMessage = useMemo(() => { + const isRunning = messages?.some((message) => message.__isRunning) + const hasResult = messages?.some((message) => !!message.__result) + + return !isRunning && hasResult + // !message?.__isRunning && !!message?.__result + }, [variantId, messages]) + + const rerunMessage = useCallback( + (messageId: string) => { + rerunChatOutput?.(messageId, variantId) + }, + [variantId], + ) return ( <>
{variantIndex === 0 && ( -
+
{isFirstRow && inputRowIds.map((inputRowId) => { @@ -89,35 +147,21 @@ const GenerationComparisonChatOutputCell = ({ })}
-
- runTurn({turnId, messageId: userMessageId})} - resultHashes={resultHashes} - messageOptionProps={{ - hideAddToTestset: true, - }} +
+ - {isLastTurn ? ( - runTurn({turnId: turnId})} - onCancelAll={() => cancelTurn({turnId: turnId})} - onAddMessage={() => addTurn()} - className="p-3" - /> - ) : null}
)} @@ -132,21 +176,39 @@ const GenerationComparisonChatOutputCell = ({ ])} >
- + {messages && messages.length ? ( + messages.map((message) => ( + + )) + ) : ( +
+ +
+ )}
@@ -154,24 +216,26 @@ const GenerationComparisonChatOutputCell = ({ } const GenerationComparisonChatOutput = ({ - turnId, + rowId, + historyId, + isLastRow, isFirstRow, }: GenerationComparisonChatOutputProps) => { - const {displayedVariants} = usePlaygroundLayout() + const {displayedVariants} = usePlayground() return (
- {(displayedVariants || []).map((variantId, variantIndex) => { - return ( - - ) - })} + {(displayedVariants || []).map((variantId, variantIndex) => ( + + ))}
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/types.d.ts index 3e03b7697a..25232446f1 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonChatOutput/types.d.ts @@ -1,14 +1,16 @@ export interface GenerationComparisonChatOutputCellProps { variantId: string - turnId: string + rowId: string + historyId: string variantIndex?: number isFirstRow?: boolean isLastRow?: boolean } export interface GenerationComparisonChatOutputProps { + historyId: string className?: string - turnId: string + rowId: string isLastRow?: boolean isFirstRow?: boolean } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonCompletionOutput/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonCompletionOutput/index.tsx index 1ad431b284..7170231d73 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonCompletionOutput/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonCompletionOutput/index.tsx @@ -1,40 +1,71 @@ -import {useMemo} from "react" +import {useCallback, useMemo} from "react" import clsx from "clsx" -import {useAtomValue} from "jotai" +import JSON5 from "json5" +import dynamic from "next/dynamic" -import {generationResultAtomFamily} from "@/oss/components/Playground/state/atoms" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import TooltipWithCopyAction from "@/oss/components/TooltipWithCopyAction" import {getResponseLazy} from "@/oss/lib/hooks/useStatelessVariants/state" -import TypingIndicator from "../../../assets/TypingIndicator" +import {findPropertyInObject} from "../../../hooks/usePlayground/assets/helpers" import GenerationCompletion from "../../PlaygroundGenerations/assets/GenerationCompletion" -import ErrorPanel from "../../PlaygroundGenerations/assets/GenerationCompletionRow/ErrorPanel" -import GenerationResponsePanel from "../../PlaygroundGenerations/assets/GenerationCompletionRow/GenerationResponsePanel" -import { - RunningPlaceholder, - ClickRunPlaceholder, -} from "../../PlaygroundGenerations/assets/ResultPlaceholder" +import GenerationOutputText from "../../PlaygroundGenerations/assets/GenerationOutputText" +import SharedEditor from "../../SharedEditor" -import type {GenerationComparisonCompletionOutputProps} from "./types" +import {GenerationComparisonCompletionOutputProps} from "./types" +const GenerationResultUtils = dynamic( + () => import("../../PlaygroundGenerations/assets/GenerationResultUtils"), + {ssr: false}, +) + +const handleChange = () => undefined const GenerationComparisonCompletionOutput = ({ rowId, + focusDisable = false, variantId, variantIndex, isLastRow, + registerToWebWorker, }: GenerationComparisonCompletionOutputProps) => { - const { - resultHash, - isRunning, - result: inlineResult, - } = useAtomValue( - useMemo(() => generationResultAtomFamily({variantId, rowId}), [variantId, rowId]), - ) as any + const {resultHash, isRunning} = usePlayground({ + registerToWebWorker: registerToWebWorker ?? true, + variantId, + rowId, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRow = findPropertyInObject(state, rowId) + const variantRun = inputRow?.__runs?.[variantId] + return { + resultHash: variantRun?.__result, + isRunning: variantRun?.__isRunning, + } + }, + [rowId, variantId], + ), + }) - const result = useMemo( - () => inlineResult ?? getResponseLazy(resultHash), - [inlineResult, resultHash], - ) + const result = useMemo(() => { + return getResponseLazy(resultHash) + }, [resultHash]) + + const responseData = result?.response?.data + const value = + typeof responseData === "string" + ? responseData + : typeof responseData === "object" && responseData.hasOwnProperty("content") + ? responseData.content + : "" + + let isJSON = false + try { + JSON.parse(value) + isJSON = true + } catch (e) { + isJSON = false + } return ( <> @@ -46,34 +77,127 @@ const GenerationComparisonCompletionOutput = ({ "shrink-0", ])} > -
- -
+ {variantIndex === 0 && ( +
+ +
+ )}
) : null}
-
- {isRunning ? ( - - ) : result ? ( - result.error ? ( - - ) : ( - - ) - ) : ( - - )} +
+
+
+ {isRunning ? ( + + ) : !result ? ( + + ) : result.error ? ( + + } + /> + ) : result.response ? ( + Array.isArray(result.response?.data) ? ( + result.response.data.map((message, index) => { + let _json = false + try { + const parsed = JSON5.parse(message.content) + parsed.function.arguments = JSON5.parse( + parsed.function.arguments, + ) + const displayValue = { + arguments: parsed.function.arguments, + } + _json = true + + return ( + + + {parsed.function.name} + + + {parsed.id} + +
+ } + disabled + editorClassName="min-h-4 [&_p:first-child]:!mt-0" + footer={ + + } + className="mt-2 [&:first-child]:!mt-0" + handleChange={handleChange} + /> + ) + } catch (e) { + console.log("RENDER MSG ITEM ERROR!", message, e) + return
errored
+ } + }) + ) : ( + + } + /> + ) + ) : null} +
+
diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx index 31912c542f..3dcab23043 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx @@ -1,22 +1,12 @@ -import {memo, useCallback, useEffect, useMemo} from "react" +import {memo, useCallback} from "react" import {Button, Tooltip, Typography} from "antd" import clsx from "clsx" -import {atom, useAtom, useAtomValue, useSetAtom} from "jotai" - -import {inputRowIdsWithPropertiesCompatAtom} from "@/oss/state/generation/compat" -import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" -import {triggerWebWorkerTestAtom} from "@/oss/state/newPlayground/mutations/webWorkerIntegration" import RunButton from "../../../assets/RunButton" -import { - appChatModeAtom, - generationHeaderDataAtomFamily, - displayedVariantsAtom, - cancelTestsMutationAtom, - canRunAllChatComparisonAtom, -} from "../../../state/atoms" -import {clearAllRunsMutationAtom} from "../../../state/atoms/utilityMutations" +import usePlayground from "../../../hooks/usePlayground" +import {clearRuns} from "../../../hooks/usePlayground/assets/generationHelpers" +import {PlaygroundStateData} from "../../../hooks/usePlayground/types" import TestsetDrawerButton from "../../Drawers/TestsetDrawer" import LoadTestsetButton from "../../Modals/LoadTestsetModal/assets/LoadTestsetButton" @@ -26,63 +16,59 @@ import type {GenerationComparisonHeaderProps} from "./types" const GenerationComparisonHeader = ({className}: GenerationComparisonHeaderProps) => { const classes = useStyles() - // Use atom-based state management - const displayedVariantIds = useAtomValue(displayedVariantsAtom) || [] - const [inputRowIds] = useAtom(inputRowIdsWithPropertiesCompatAtom) - const clearAllRuns = useSetAtom(clearAllRunsMutationAtom) - const isChatVariant = useAtomValue(appChatModeAtom) ?? false - const triggerTest = useSetAtom(triggerWebWorkerTestAtom) - const runAllChat = useSetAtom(runAllChatAtom) - const cancelTests = useSetAtom(cancelTestsMutationAtom) - const canRunAllChat = useAtomValue(canRunAllChatComparisonAtom) - - const headerDataAtom = useMemo( - () => - atom((get) => { - if (isChatVariant) return {resultHashes: [], isRunning: false} - const vids = (get(displayedVariantsAtom) || []) as string[] - const status = get( - // Reuse generationHeaderData per variant and fold - atom((g) => vids.map((id) => g(generationHeaderDataAtomFamily(id)))), - ) as {resultHashes: string[]; isRunning: boolean}[] - const resultHashes = status.flatMap((d) => d.resultHashes || []) - const isRunning = status.some((d) => d.isRunning) - return {resultHashes: resultHashes.filter(Boolean), isRunning} - }), - [isChatVariant], - ) - const {resultHashes, isRunning} = useAtomValue(headerDataAtom) - - // Create a runTests function that runs all available input rows - const runTests = useCallback(() => { - if (isChatVariant) { - if (canRunAllChat) runAllChat() - return - } - ;(inputRowIds as string[]).forEach((rid) => { - ;(displayedVariantIds as string[]).forEach((vid) => { - triggerTest({rowId: rid, variantId: vid} as any) - }) - }) - }, [triggerTest, isChatVariant, inputRowIds, displayedVariantIds, runAllChat, canRunAllChat]) + const {resultHashes, isRunning, runTests, mutate} = usePlayground({ + stateSelector: useCallback((state: PlaygroundStateData) => { + const variants = state.variants.filter((variant) => state.selected.includes(variant.id)) + const resultHashes: any[] = [] + let isRunning - const clearGeneration = useCallback(() => { - clearAllRuns() - }, [clearAllRuns]) - - useEffect(() => { - const listener = (e: KeyboardEvent) => { - if ((e.metaKey || e.ctrlKey) && e.key === "Enter") { - e.preventDefault() - e.stopPropagation() - if (!isRunning && (!isChatVariant || canRunAllChat)) runTests?.() + if (variants[0].isChat) { + const messageRows = state.generationData.messages.value + + messageRows.forEach((dataItem) => { + if (dataItem.history && Array.isArray(dataItem.history.value)) { + dataItem.history.value.forEach((historyItem) => { + if (historyItem.__runs) { + const runs = Object.values(historyItem.__runs) + for (const runData of runs) { + isRunning = runs.some((runData) => runData?.__isRunning) + resultHashes.push(runData?.__result) + } + } + }) + } + }) + + return {resultHashes: resultHashes.filter(Boolean), isRunning: isRunning || false} + } else { + const inputRows = state.generationData.inputs.value + + inputRows.forEach((dataItem) => { + if (dataItem.__runs) { + const runs = Object.values(dataItem.__runs || {}) + for (const runData of runs) { + isRunning = runs.some((runData) => runData?.__isRunning) + + resultHashes.push(runData?.__result) + } + } + }) + + return {resultHashes: resultHashes.filter(Boolean), isRunning: isRunning || false} } - } - document.addEventListener("keydown", listener, true) - return () => { - document.removeEventListener("keydown", listener, true) - } - }, [runTests, isRunning]) + }, []), + }) + + const clearGeneration = useCallback(() => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + clearRuns(clonedState) + return clonedState + }, + {revalidate: false}, + ) + }, []) return (
- - - {!isRunning ? ( - - runTests?.()} - /> - - ) : ( - cancelTests({})} className="flex" /> - )} + + + runTests?.()} />
) diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/assets/GenerationComparisonOutputHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/assets/GenerationComparisonOutputHeader/index.tsx index eb3fb4d768..38dedcca3f 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/assets/GenerationComparisonOutputHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/assets/GenerationComparisonOutputHeader/index.tsx @@ -1,11 +1,11 @@ -import {memo, useMemo} from "react" +import {memo, useCallback} from "react" import {Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" import Version from "@/oss/components/Playground/assets/Version" -import {revisionListAtom} from "@/oss/components/Playground/state/atoms" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" import {useStyles} from "../styles" @@ -15,16 +15,15 @@ const GenerationComparisonOutputHeader: React.FC { - // Use atom-based state management - const revisions = useAtomValue(revisionListAtom) - - const {variantName, revision} = useMemo(() => { - const variant = (revisions || []).find((rev) => rev.id === variantId) - return { - variantName: variant?.variantName, - revision: variant?.revision, - } - }, [revisions, variantId]) + const {variantName, revision} = usePlayground({ + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variant = state.variants.find((variant) => variant.id === variantId) + return {variantName: variant?.variantName, revision: variant?.revision} + }, + [variantId], + ), + }) const classes = useStyles() return ( diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/index.tsx index a0a0ccb0b4..881ee58233 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/index.tsx @@ -1,48 +1,49 @@ -import {useMemo} from "react" +import {useCallback} from "react" import clsx from "clsx" -import {useAtomValue} from "jotai" -import {usePlaygroundLayout} from "../../hooks/usePlaygroundLayout" -import {appChatModeAtom} from "../../state/atoms" +import usePlayground from "../../hooks/usePlayground" +import {findPropertyInObject} from "../../hooks/usePlayground/assets/helpers" +import type {PlaygroundStateData} from "../../hooks/usePlayground/types" +import {GenerationChatRow} from "../../state/types" import GenerationComparisonChatOutput from "./GenerationComparisonChatOutput" import GenerationComparisonCompletionOutput from "./GenerationComparisonCompletionOutput" -const GenerationComparisonOutput = ({ - rowId, - isLastRow, - isFirstRow, -}: { - rowId: string - isLastRow?: boolean - isFirstRow?: boolean -}) => { - // Use atom-based state management - const {displayedVariants} = usePlaygroundLayout() - const isChatVariant = useAtomValue(appChatModeAtom) - const isChat = isChatVariant +const GenerationComparisonOutput = ({rowId, isLastRow}: {rowId: string; isLastRow?: boolean}) => { + const {isChat, displayedVariants, chatHistory} = usePlayground({ + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const chatRow = findPropertyInObject(state, rowId) as GenerationChatRow + const chatHistory = chatRow?.history?.value?.map((item) => item.__id) + return {isChat: state.variants[0]?.isChat, chatHistory} + }, + [rowId], + ), + }) - return isChatVariant === undefined ? null : ( + return (
- {isChat ? ( - - ) : ( - displayedVariants?.map((variantId, variantIndex) => ( - - )) - )} + {isChat + ? (chatHistory || []).map((chatId, historyIndex) => ( + + )) + : displayedVariants?.map((variantId, variantIndex) => ( + + ))}
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChat/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChat/index.tsx index 455262c296..ab896224be 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChat/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChat/index.tsx @@ -1,37 +1,91 @@ +import {useCallback} from "react" + import {Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" -import {atom} from "jotai" -import {useSetAtom} from "jotai" -import LastTurnFooterControls from "@/oss/components/Playground/Components/ChatCommon/LastTurnFooterControls" -import {isComparisonViewAtom} from "@/oss/components/Playground/state/atoms" -import { - generationInputRowIdsAtom, - generationRowIdsAtom, -} from "@/oss/components/Playground/state/atoms/generationProperties" -import { - addChatTurnAtom, - runChatTurnAtom, - cancelChatTurnAtom, -} from "@/oss/state/newPlayground/chat/actions" -import {promptsAtomFamily} from "@/oss/state/newPlayground/core/prompts" +import {autoScrollToBottom} from "@/oss/components/Playground/assets/utilities/utilityFunctions" +import type {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import useLazyEffect from "@/oss/hooks/useLazyEffect" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {ObjectMetadata} from "@/oss/lib/shared/variant/genericTransformer/types" +import usePlayground from "../../../../hooks/usePlayground" import PromptMessageConfig from "../../../PromptMessageConfig" -import GenerationChatTurnNormalized from "../GenerationChatTurnNormalized" +import GenerationChatRow from "../GenerationChatRow" import GenerationCompletionRow from "../GenerationCompletionRow" import type {GenerationChatProps} from "./types" const GenerationChat = ({variantId, viewAs}: GenerationChatProps) => { - const isComparisonView = useAtomValue(isComparisonViewAtom) - // Completion-style variable inputs for chat use normalized input rows with a derived fallback - const inputRowIds = useAtomValue(generationInputRowIdsAtom) as string[] - const turnIds = useAtomValue(generationRowIdsAtom) + const {inputRowIds, messageRowIds, viewType, historyIds, configMessageIds} = usePlayground({ + variantId, + hookId: "PlaygroundConfigVariantPrompts", + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRows = state.generationData.inputs.value || [] + const messageRows = state.generationData.messages.value || [] + const configMessages = ( + state.variants.find((v) => v.id === variantId)?.prompts || [] + ).flatMap((variant) => { + return variant.messages.value + }) + + const historyIds = state.generationData.messages.value.reduce( + (acc, messageRow) => { + return { + ...acc, + [messageRow.__id]: messageRow.history.value.reduce( + (acc, historyItem) => { + const copyItem = structuredClone(historyItem) + delete copyItem.__runs + return [ + ...acc, + copyItem?.__id, + variantId + ? historyItem.__runs?.[variantId]?.__isRunning + ? `isRunning-${copyItem?.__id}` + : historyItem.__runs?.[variantId]?.__id + : undefined, + ].filter(Boolean) as string[] + }, + [] as string[], + ), + } + }, + {} as Record, + ) + + return { + inputRowIds: (inputRows || []) + .filter((inputRow) => { + return ( + Object.keys( + (getMetadataLazy(inputRow.__metadata) as ObjectMetadata) + ?.properties, + ).length > 0 + ) + }) + .map((inputRow) => inputRow.__id), + messageRowIds: (messageRows || []) + .map((messageRow) => { + return messageRow.__id + }) + .filter(Boolean) as string[], + configMessageIds: configMessages.map((message) => message.__id), + historyIds, + } + }, + [variantId], + ), + }) + const isComparisonView = viewType === "comparison" + + useLazyEffect(() => { + if (isComparisonView) return - // Config messages (read-only, single view only) - const prompts = useAtomValue(variantId ? promptsAtomFamily(variantId) : atom([])) as any[] - const configMessages = (prompts || []).flatMap((p: any) => p?.messages?.value || []) + const timer = autoScrollToBottom() + return timer + }, [messageRowIds]) return (
@@ -41,22 +95,23 @@ const GenerationChat = ({variantId, viewAs}: GenerationChatProps) => { * meaning when there's */} {!!variantId && - inputRowIds.map((inputRowId) => ( - - ))} + inputRowIds.map((inputRowId) => { + return ( + + ) + })} - {/* Chat turns */} + {/* Prompt chats */}
{ ])} >
- {!isComparisonView && ( -
- Chat -
- )} + {!isComparisonView && Chat}
- {!isComparisonView && - (configMessages || []).map((m: any) => { - const contentStr = Array.isArray(m?.content?.value) - ? m.content.value - .map((p: any) => p?.text?.value || p?.text || "") - .join(" ") - : m?.content?.value || "" + {!isComparisonView + ? configMessageIds.map((messageId) => ( + + )) + : null} + {messageRowIds.map((messageRow) => { + return historyIds[messageRow].map((historyId, index) => { return ( - ) - })} - {turnIds.map((turnId) => ( - - ))} - {turnIds.length > 0 ? ( - - ) : null} + }) + })}
@@ -110,25 +156,4 @@ const GenerationChat = ({variantId, viewAs}: GenerationChatProps) => { ) } -const FooterControlsSingle = ({ - variantId, - lastLogicalId, -}: { - variantId: string - lastLogicalId: string -}) => { - const addTurn = useSetAtom(addChatTurnAtom) - const runTurn = useSetAtom(runChatTurnAtom) - const cancelTurn = useSetAtom(cancelChatTurnAtom) - return ( - runTurn({turnId: lastLogicalId, variantId})} - onCancelAll={() => cancelTurn({turnId: lastLogicalId, variantId})} - onAddMessage={() => addTurn()} - className="p-3" - /> - ) -} - export default GenerationChat diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/index.tsx new file mode 100644 index 0000000000..114e53f22b --- /dev/null +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/index.tsx @@ -0,0 +1,408 @@ +import {useCallback, useMemo} from "react" + +import clsx from "clsx" +import dynamic from "next/dynamic" + +import AddButton from "@/oss/components/Playground/assets/AddButton" +import RunButton from "@/oss/components/Playground/assets/RunButton" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import { + findPropertyInObject, + findVariantById, +} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import {createMessageFromSchema} from "@/oss/components/Playground/hooks/usePlayground/assets/messageHelpers" +import type {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import {GenerationChatHistoryItem} from "@/oss/components/Playground/state/types" +import {getMetadataLazy, getResponseLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {MessageWithRuns} from "@/oss/lib/hooks/useStatelessVariants/state/types" +import { + ArrayMetadata, + Enhanced, + ObjectMetadata, +} from "@/oss/lib/shared/variant/genericTransformer/types" + +import TextControl from "../../../PlaygroundVariantPropertyControl/assets/TextControl" +import PromptMessageConfig from "../../../PromptMessageConfig" + +import type {GenerationChatRowProps} from "./types" + +const GenerationResultUtils = dynamic(() => import("../GenerationResultUtils"), {ssr: false}) + +export const GenerationChatRowOutput = ({ + variantId, + message, + disabled = false, + rowId, + deleteMessage, + rerunMessage, + resultHash, + isRunning: propsIsRunning, + isMessageDeletable, + placeholder, + messageProps, + className, +}: GenerationChatRowProps) => { + const {viewType} = usePlayground({ + variantId, + rowId, + registerToWebWorker: true, + }) + const isComparisonView = viewType === "comparison" + const result = useMemo(() => { + return getResponseLazy(resultHash) + }, [resultHash]) + + const messageResult = useMemo(() => { + if (message?.__result) { + return getResponseLazy(message.__result) + } + + return undefined + }, [message?.__result]) + + return propsIsRunning ? ( +
+ +
+ ) : message.__hidden ? null : ( +
+ + +
+ ) : null + } + state={messageResult?.error ? "readOnly" : "filled"} + /> + + ) +} + +const GenerationChatRow = ({ + withControls, + historyId, + variantId, + messageId, + rowId, + viewAs, + isMessageDeletable, + messageProps, + isRunning, +}: GenerationChatRowProps) => { + const { + historyItem, + historyItems, + disableRun, + messageRow, + viewType, + displayedVariants, + runTests, + cancelRunTests, + mutate, + rerunChatOutput, + } = usePlayground({ + variantId, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variant = findVariantById(state, variantId as string) + + if (messageId) { + return { + history: [findPropertyInObject(variant, messageId)], + } + } else { + const messageRow = (state.generationData.messages.value || []).find( + (inputRow) => { + return inputRow.__id === rowId + }, + ) + const messageHistory = messageRow?.history?.value || [] + const historyItem = findPropertyInObject( + messageHistory, + historyId || "", + ) as Enhanced + + const historyMessage = historyItem?.message + const historyMessages = historyItem?.messages + + const historyItems = + historyMessages && historyMessages.length > 0 + ? historyMessages.map((m) => ({ + ...historyItem, + ...m, + })) + : [ + { + ...historyItem, + ...historyMessage, + }, + ] + + const lastMessage = historyItems[historyItems.length - 1] + const lastMessageResult = getResponseLazy(lastMessage?.__result) + const disableRun = withControls && lastMessageResult?.error + + return { + messageRow, + historyItem: { + ...historyItem, + ...historyMessage, + }, + disableRun, + historyItems: historyItems, + history: messageHistory + .map((historyItem) => { + return !historyItem.__runs + ? historyItem + : variantId && historyItem.__runs[variantId] + ? { + ...historyItem.__runs[variantId].message, + __result: historyItem.__runs[variantId].__result, + __isRunning: historyItem.__runs[variantId].__isRunning, + } + : undefined + }) + .filter(Boolean), + } + } + }, + [withControls, variantId, messageId, rowId, historyId], + ), + }) + + const deleteMessage = useCallback((messageId: string) => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + + if (!variantId) { + const row = clonedState.generationData.messages.value.find( + (v) => v.__id === rowId, + ) + if (row) { + const isInput = row.history.value.findIndex((m) => m.__id === messageId) + if (isInput !== -1) { + row.history.value.splice(isInput, 1) + } + } + } else if (variantId) { + const row = clonedState.generationData.messages.value.find( + (v) => v.__id === rowId, + ) + if (row) { + const isInput = row.history.value.findIndex((m) => { + return m.__id === messageId + }) + if (isInput !== -1) { + row.history.value.splice(isInput, 1) + } else { + const isRunIndex = row.history.value.findIndex((m) => { + return m.__runs?.[variantId]?.message?.__id === messageId + }) + if (isRunIndex !== -1) { + delete row.history.value[isRunIndex].__runs?.[variantId] + } else { + const runIndex = row.history.value.findIndex((m) => { + return (m.__runs?.[variantId]?.messages || []).find( + (m) => m.__id === messageId, + ) + }) + + if (runIndex >= 0) { + const subRunIndex = ( + row.history.value[runIndex].__runs?.[variantId].messages || + [] + ).findIndex((m) => { + return m.__id === messageId + }) + + if (subRunIndex >= 0) { + row.history.value[runIndex].__runs[variantId].messages = + row.history.value[runIndex].__runs?.[ + variantId + ].messages?.filter((m) => m.__id !== messageId) + } + } + } + } + } + } + }, + {revalidate: false}, + ) + }, []) + + const addNewMessageToRowHistory = useCallback(() => { + mutate((clonedState) => { + if (!clonedState) return clonedState + + const messageRow = clonedState.generationData.messages.value.find((inputRow) => { + return inputRow.__id === rowId + }) + + if (!messageRow) return clonedState + + const _metadata = getMetadataLazy(messageRow.history.__metadata) + + const itemMetadata = _metadata?.itemMetadata as ObjectMetadata + const emptyMessage = createMessageFromSchema(itemMetadata, { + role: "user", + }) + + if (emptyMessage) { + messageRow.history.value.push(emptyMessage as GenerationChatHistoryItem) + } + + return clonedState + }) + }, [mutate, rowId]) + + const rerunMessage = useCallback( + (messageId: string) => { + rerunChatOutput?.(messageId) + }, + [rerunChatOutput], + ) + + return ( + <> +
+ {(historyItems || []).map((_historyItem) => { + const canRerun = () => { + if (_historyItem?.role?.value && _historyItem?.role?.value === "tool") { + return false + } + + if ( + viewType === "comparison" && + !variantId && + !!historyItem?.content?.value && + !!historyItem?.role?.value + ) { + const areAllRunning = Object.values(historyItem?.__runs || {}).every( + (run) => run?.__isRunning, + ) + const gotAllResponses = (displayedVariants || []).every((variantId) => { + return !!historyItem?.__runs?.[variantId]?.__result + }) + return !areAllRunning && gotAllResponses + } else if (viewType === "single" && !!variantId && !!historyItem) { + if (!historyItem?.__runs && !historyItem?.message) { + // this is an input row + const isRunning = Object.values(historyItem?.__runs || {}).every( + (run) => run?.__isRunning, + ) + return !isRunning + } else { + // this is a chat row + const isRunning = historyItem?.__isRunning + return !isRunning + } + } + return undefined + } + + return ( + + ) + })} +
+ {withControls ? ( +
+ {!!historyItem?.__isRunning || isRunning ? ( + cancelRunTests?.()} + size="small" + className="flex" + disabled={Boolean(disableRun)} + /> + ) : ( + runTests?.()} + className="flex" + /> + )} + +
+ ) : null} + + ) +} + +export default GenerationChatRow diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/types.d.ts new file mode 100644 index 0000000000..aadc2abbd9 --- /dev/null +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatRow/types.d.ts @@ -0,0 +1,22 @@ +import type {TestResult} from "@/oss/components/Playground/assets/utilities/transformer/types" + +import {PromptMessageConfigProps} from "../../../PromptMessageConfig/types" + +export interface GenerationChatRowProps { + variantId?: string + disabled?: boolean + rowId?: string + resultHash?: TestResult | string | null + historyId?: string + placeholder?: string + withControls?: boolean + messageId?: string + viewAs?: "input" | "output" + isRunning?: boolean + message?: GenerationChatHistoryItem + result?: TestResult + isMessageDeletable?: boolean + messageProps?: Partial + deleteMessage?: (messageId: string) => void + rerunMessage?: (messageId: string) => void +} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatTurnNormalized/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatTurnNormalized/index.tsx deleted file mode 100644 index 8217746705..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationChatTurnNormalized/index.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import {useCallback, useMemo} from "react" - -// antd imports not needed here -import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" -import dynamic from "next/dynamic" - -import TurnMessageAdapter from "@/oss/components/Playground/adapters/TurnMessageAdapter" -import TypingIndicator from "@/oss/components/Playground/assets/TypingIndicator" -import ControlsBar from "@/oss/components/Playground/Components/ChatCommon/ControlsBar" -import {ClickRunPlaceholder} from "@/oss/components/Playground/Components/PlaygroundGenerations/assets/ResultPlaceholder" -import {useAssistantDisplayValue} from "@/oss/components/Playground/hooks/chat/useAssistant" -import useEffectiveRevisionId from "@/oss/components/Playground/hooks/chat/useEffectiveRevisionId" -import useHasAssistantContent from "@/oss/components/Playground/hooks/chat/useHasAssistantContent" -import {displayedVariantsAtom} from "@/oss/components/Playground/state/atoms" -import {resolvedGenerationResultAtomFamily} from "@/oss/components/Playground/state/atoms/generationProperties" -import {assistantMessageAtomFamily, chatTurnAtomFamily} from "@/oss/state/generation/selectors" -import { - addChatTurnAtom, - runChatTurnAtom, - cancelChatTurnAtom, -} from "@/oss/state/newPlayground/chat/actions" - -interface Props { - turnId: string - variantId?: string - withControls?: boolean - className?: string -} - -const GenerationResultUtils = dynamic(() => import("../GenerationResultUtils"), {ssr: false}) - -const GenerationChatTurnNormalized = ({ - turnId, - variantId, - withControls, - className, - hideUserMessage = false, - messageProps, -}: Props) => { - const displayedVariantIds = useAtomValue(displayedVariantsAtom) - const setAddTurn = useSetAtom(addChatTurnAtom) - const runTurn = useSetAtom(runChatTurnAtom) - const cancelTurn = useSetAtom(cancelChatTurnAtom) - - const effectiveRevisionId = useEffectiveRevisionId(variantId, displayedVariantIds as any) - const resolvedTurnId = turnId - - // Run status and result for this turn + revision via normalized atoms - const genResultAtom = useMemo( - () => - resolvedGenerationResultAtomFamily({ - variantId: variantId as string, - rowId: (resolvedTurnId || turnId) as string, - }), - [variantId, resolvedTurnId, turnId], - ) - const {isRunning, result: inlineResult} = useAtomValue(genResultAtom) as any - const result = inlineResult - - const onRun = useCallback(() => { - runTurn({turnId, variantId: variantId as string | undefined}) - }, [runTurn, turnId, variantId, effectiveRevisionId, resolvedTurnId]) - - const onCancel = useCallback(() => { - if (!resolvedTurnId) return - cancelTurn({ - turnId: resolvedTurnId || turnId, - variantId: effectiveRevisionId as string | undefined, - }) - }, [cancelTurn, resolvedTurnId, turnId, effectiveRevisionId]) - - const sessionRowId = useMemo( - () => - (resolvedTurnId || - (variantId && turnId ? `turn-${variantId}-${turnId}` : turnId)) as string, - [resolvedTurnId, variantId, turnId], - ) - - const assistantMsg = useAtomValue( - useMemo( - () => - assistantMessageAtomFamily({ - turnId: sessionRowId, - revisionId: variantId as string, - }), - [sessionRowId, variantId], - ), - ) as any - - const displayAssistantValue = useAssistantDisplayValue(assistantMsg, result) - - const turnState = useAtomValue(useMemo(() => chatTurnAtomFamily(sessionRowId), [sessionRowId])) - - const toolMessages = useMemo(() => { - if (!variantId) return [] as any[] - const responses = turnState?.toolResponsesByRevision?.[variantId] - return Array.isArray(responses) ? responses : [] - }, [turnState, variantId]) - - const hasAssistantContent = useHasAssistantContent( - assistantMsg as any, - displayAssistantValue, - toolMessages.length > 0, - ) - - return ( -
- {!hideUserMessage ? ( - - ) : null} - {withControls ? ( - setAddTurn()} - /> - ) : null} - {isRunning && !hasAssistantContent ? ( - // While running, suppress any previous assistant message/error to avoid stale content - - ) : hasAssistantContent ? ( - <> - : null} - messageProps={messageProps} - /> - {variantId - ? toolMessages.map((_, index) => ( - - )) - : null} - - ) : ( - - )} -
- ) -} - -export default GenerationChatTurnNormalized diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx index 2a84088951..d55a76d29f 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx @@ -1,13 +1,15 @@ -import React, {useCallback} from "react" +import {useCallback} from "react" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" import AddButton from "@/oss/components/Playground/assets/AddButton" -import {usePlaygroundLayout} from "@/oss/components/Playground/hooks/usePlaygroundLayout" -import {generationInputRowIdsAtom} from "@/oss/components/Playground/state/atoms/generationProperties" -import {generateId} from "@/oss/lib/shared/variant/stringUtils" -import {inputRowIdsAtom} from "@/oss/state/generation/entities" +import {componentLogger} from "@/oss/components/Playground/assets/utilities/componentLogger" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {findPropertyInObject} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import type {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {ArrayMetadata, ObjectMetadata} from "@/oss/lib/shared/variant/genericTransformer/types" +import {createInputRow} from "@/oss/lib/shared/variant/inputHelpers" import GenerationCompletionRow from "../GenerationCompletionRow" @@ -20,34 +22,59 @@ const GenerationCompletion = ({ rowId, withControls, }: GenerationCompletionProps) => { - const {isComparisonView} = usePlaygroundLayout() - const viewType = isComparisonView ? "comparison" : "single" + const {inputRowId, mutate, viewType, inputRowIds} = usePlayground({ + variantId, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRowId = findPropertyInObject(state, rowId as string) + const inputRows = state.generationData.inputs.value || [] - // Use derived row IDs: returns normalized ids; for completion with none, exposes a virtual default id - const inputRowIds = useAtomValue(generationInputRowIdsAtom) as string[] - const inputRowId = inputRowIds[0] || null + return { + inputRowId: inputRowId?.__id, + inputRowIds: inputRows?.map((row) => row?.__id), + } + }, + [rowId], + ), + }) - // EFFICIENT MUTATION: Use dedicated mutation atom instead of complex useCallback logic - const addNewInputRow = useSetAtom(inputRowIdsAtom) - const handleAddNewRow = useCallback(() => { - addNewInputRow((prev) => [...prev, `row-${generateId()}`]) - }, [addNewInputRow]) + const addNewInputRow = useCallback(() => { + mutate((clonedState) => { + if (!clonedState) return clonedState + + const _metadata = getMetadataLazy( + clonedState?.generationData.inputs.__metadata, + ) + + const itemMetadata = _metadata?.itemMetadata as ObjectMetadata + + if (!itemMetadata) return clonedState + + const inputKeys = Object.keys(itemMetadata.properties) + const newRow = createInputRow(inputKeys, itemMetadata) + + clonedState.generationData.inputs.value.push(newRow) + + return clonedState + }) + }, [mutate]) + + componentLogger("GenerationTestView", inputRowId) - // Ensure is handled at MainLayout level to avoid write-on-render here return (
{viewType === "comparison" ? ( ) : ( - (inputRowIds || []).map((rowIdItem) => ( + (inputRowIds || []).map((row) => ( )) @@ -60,7 +87,7 @@ const GenerationCompletion = ({ {"mb-10": viewType !== "comparison"}, ])} > - +
) : null} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/DefaultView.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/DefaultView.tsx deleted file mode 100644 index 091ec205aa..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/DefaultView.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import {useMemo} from "react" - -import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" - -import VariableControlAdapter from "@/oss/components/Playground/adapters/VariableControlAdapter" -import RunButton from "@/oss/components/Playground/assets/RunButton" -import {variableIdsUnifiedAtomFamily} from "@/oss/state/newPlayground/generation/selectors" - -const GenerationVariableOptions = dynamic(() => import("../GenerationVariableOptions"), { - ssr: false, -}) - -interface Props { - rowId: string - variantId?: string - isChat: boolean - viewType: "single" | "comparison" - view?: string - disabled?: boolean - inputOnly?: boolean - resultHash: string | null - runRow: () => void - cancelRow: () => void - isBusy: boolean -} - -const DefaultView = ({ - rowId, - variantId, - isChat, - viewType, - view, - disabled, - inputOnly, - resultHash, - runRow, - cancelRow, - isBusy, -}: Props) => { - const variableIds = useAtomValue( - useMemo( - () => variableIdsUnifiedAtomFamily({rowId, revisionId: variantId || ""}), - [rowId, variantId], - ), - ) as string[] - - return ( - <> -
-
-
- {variableIds.map((variableId) => ( -
- - - {!inputOnly && ( - - )} -
- ))} - - {!inputOnly && variableIds.length === 0 ? ( - - ) : null} -
-
-
- - {!inputOnly ? ( -
- {isBusy ? ( - - ) : ( - - )} -
- ) : null} - - ) -} - -export default DefaultView diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/ErrorPanel.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/ErrorPanel.tsx deleted file mode 100644 index b6e676064c..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/ErrorPanel.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import dynamic from "next/dynamic" - -import SharedEditor from "../../../SharedEditor" - -const GenerationResultUtils = dynamic(() => import("../GenerationResultUtils"), {ssr: false}) - -export default function ErrorPanel({result}: {result: any}) { - const errorText = - typeof result?.error === "string" ? result.error : String(result?.error ?? "Error") - return ( - } - handleChange={() => undefined} - /> - ) -} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/GenerationResponsePanel.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/GenerationResponsePanel.tsx deleted file mode 100644 index 3b54e0547f..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/GenerationResponsePanel.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import {useMemo} from "react" - -import dynamic from "next/dynamic" - -import ToolCallView from "@/oss/components/Playground/Components/ToolCallView" -import {deriveToolViewModelFromResult} from "@/oss/state/newPlayground/chat/parsers" - -import SharedEditor from "../../../SharedEditor" - -const GenerationResultUtils = dynamic(() => import("../GenerationResultUtils"), {ssr: false}) - -interface Props { - result: any -} - -export default function GenerationResponsePanel({result}: Props) { - const {toolData, isJSON, displayValue} = useMemo( - () => deriveToolViewModelFromResult(result), - [result], - ) - - if (toolData) { - return ( - } - /> - ) - } - - return ( - } - handleChange={() => undefined} - /> - ) -} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx deleted file mode 100644 index e750dd22dc..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import {useMemo} from "react" - -import {Typography} from "antd" -import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" - -import VariableControlAdapter from "@/oss/components/Playground/adapters/VariableControlAdapter" -import RunButton from "@/oss/components/Playground/assets/RunButton" -import TypingIndicator from "@/oss/components/Playground/assets/TypingIndicator" -import {variableIdsUnifiedAtomFamily} from "@/oss/state/newPlayground/generation/selectors" - -import {RunningPlaceholder, ClickRunPlaceholder} from "../ResultPlaceholder" - -import ErrorPanel from "./ErrorPanel" -import GenerationResponsePanel from "./GenerationResponsePanel" - -const GenerationVariableOptions = dynamic(() => import("../GenerationVariableOptions"), { - ssr: false, -}) - -interface Props { - rowId: string - variantId: string - isChat: boolean - isBusy: boolean - isRunning: boolean - inputOnly?: boolean - result: any - resultHash: string | null - runRow: () => void - cancelRow: () => void - containerClassName?: string -} - -const SingleView = ({ - rowId, - variantId, - isChat, - isBusy, - isRunning, - inputOnly, - result, - resultHash, - runRow, - cancelRow, - containerClassName, -}: Props) => { - const variableIds = useAtomValue( - useMemo( - () => variableIdsUnifiedAtomFamily({rowId, revisionId: variantId}), - [rowId, variantId], - ), - ) as string[] - - return ( -
0}, - containerClassName, - ])} - > -
- {variableIds.length > 0 && ( - <> -
- - Variables - -
-
- {variableIds.map((id) => { - return ( -
- -
- ) - })} -
- - )} - {!inputOnly && variableIds.length === 0 ? ( -
- -
- ) : null} - - {!inputOnly && ( - - )} -
- {!inputOnly ? ( -
-
- {!isBusy ? ( - - ) : ( - - )} -
- -
- {isBusy ? ( - - ) : !result ? ( - - ) : result.error ? ( - - ) : result.response ? ( - - ) : null} -
-
- ) : null} -
- ) -} - -export default SingleView diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx index c2a2e38c52..e9a26eb15b 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx @@ -1,27 +1,34 @@ import {useCallback, useMemo} from "react" -import {atom, useAtomValue, useSetAtom} from "jotai" - -import {loadingByRowRevisionAtomFamily} from "@/oss/state/newPlayground/generation/runtime" -import {triggerWebWorkerTestAtom} from "@/oss/state/newPlayground/mutations/webWorkerIntegration" - -import {usePlaygroundLayout} from "../../../../hooks/usePlaygroundLayout" -import { - appChatModeAtom, - cancelTestsMutationAtom, - displayedVariantsAtom, -} from "../../../../state/atoms" -import { - resolvedGenerationResultAtomFamily, - generationRunStatusAtomFamily, -} from "../../../../state/atoms/generationProperties" - -import DefaultView from "./DefaultView" -import SingleView from "./SingleView" +import {Typography} from "antd" +import clsx from "clsx" +import JSON5 from "json5" +import dynamic from "next/dynamic" + +import RunButton from "@/oss/components/Playground/assets/RunButton" +import {autoScrollToBottom} from "@/oss/components/Playground/assets/utilities/utilityFunctions" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" +import TooltipWithCopyAction from "@/oss/components/TooltipWithCopyAction" +import useLazyEffect from "@/oss/hooks/useLazyEffect" +import {getResponseLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {getEnhancedProperties} from "@/oss/lib/shared/variant" + +import usePlayground from "../../../../hooks/usePlayground" +import PlaygroundVariantPropertyControl from "../../../PlaygroundVariantPropertyControl" +import SharedEditor from "../../../SharedEditor" +import GenerationOutputText from "../GenerationOutputText" + import {useStyles} from "./styles" import type {GenerationCompletionRowProps} from "./types" -// Keep dynamic imports local to presentational components +const GenerationResultUtils = dynamic(() => import("../GenerationResultUtils"), { + ssr: false, +}) +const GenerationVariableOptions = dynamic(() => import("../GenerationVariableOptions"), { + ssr: false, +}) + +const handleChange = () => undefined const GenerationCompletionRow = ({ variantId, @@ -30,108 +37,328 @@ const GenerationCompletionRow = ({ inputOnly, view, disabled, - forceSingle, ...props }: GenerationCompletionRowProps) => { const classes = useStyles() + const {resultHash, variableIds, isRunning, viewType, isChat, runTests, cancelRunTests} = + usePlayground({ + variantId, + rowId, + registerToWebWorker: true, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRow = state.generationData.inputs.value.find((inputRow) => { + return inputRow.__id === rowId + }) - const isChat = useAtomValue(appChatModeAtom) - - // Only subscribe to generation result atoms in completion mode - const generationResultAtom = useMemo( - () => (!isChat ? resolvedGenerationResultAtomFamily({variantId, rowId}) : null), - [isChat, variantId, rowId], - ) as any - - const resultState = - !isChat && generationResultAtom ? (useAtomValue(generationResultAtom) as any) : ({} as any) - const resultHash = resultState?.resultHash as string | null - const isRunning = Boolean(resultState?.isRunning) - const resultFromAtom = resultState?.result - - const displayedVariantIds = useAtomValue(displayedVariantsAtom) - const isBusy = useAtomValue( - useMemo( - () => - atom((get) => { - if (isChat) return false - if (variantId) { - const {isRunning: variantRunning} = get( - generationRunStatusAtomFamily({variantId, rowId}), - ) - const variantLoading = get( - loadingByRowRevisionAtomFamily({rowId, revisionId: variantId}), - ) - return Boolean(variantRunning || variantLoading) + const variables = getEnhancedProperties(inputRow) + const variableIds = variables.map((p) => p.__id) + + const resultHash = variantId ? inputRow?.__runs?.[variantId]?.__result : null + const isRunning = variantId ? inputRow?.__runs?.[variantId]?.__isRunning : false + return { + isChat: state.variants[0]?.isChat, + variableIds, + resultHash, + isRunning, + inputText: variables?.[0]?.value, // Temporary implementation } + }, + [rowId, variantId], + ), + }) - const ids = Array.isArray(displayedVariantIds) ? displayedVariantIds : [] - return ids.some((vid) => { - const {isRunning: variantRunning} = get( - generationRunStatusAtomFamily({variantId: vid, rowId}), - ) - const variantLoading = get( - loadingByRowRevisionAtomFamily({rowId, revisionId: vid}), - ) - return Boolean(variantRunning || variantLoading) - }) - }), - [displayedVariantIds, isChat, rowId, variantId], - ), - ) - const {isComparisonView} = usePlaygroundLayout() - const viewType = isComparisonView ? "comparison" : "single" - const triggerTest = useSetAtom(triggerWebWorkerTestAtom) - const cancelTests = useSetAtom(cancelTestsMutationAtom) + useLazyEffect(() => { + const timer = autoScrollToBottom() + return timer + }, [resultHash]) - const result = !isChat ? resultFromAtom : undefined + const result = useMemo(() => { + return getResponseLazy(resultHash) + }, [resultHash]) const runRow = useCallback(async () => { - // In comparison view with no explicit variantId, trigger for all displayed variants - if (!variantId && Array.isArray(displayedVariantIds) && displayedVariantIds.length > 0) { - displayedVariantIds.forEach((vid) => { - triggerTest({rowId, variantId: vid} as any) - }) - return - } - // Single view or explicit variant run - triggerTest({rowId, variantId: variantId as string}) - }, [triggerTest, rowId, variantId, displayedVariantIds]) + runTests?.(rowId, viewType === "single" ? variantId : undefined) + }, [runTests, variantId, rowId, viewType]) const cancelRow = useCallback(async () => { - const variantIds = viewType === "single" && variantId ? [variantId] : displayedVariantIds - await cancelTests({rowId, variantIds, reason: "user_cancelled"} as any) - }, [cancelTests, displayedVariantIds, variantId, viewType, rowId]) - - // Single view content - return forceSingle || (viewType === "single" && view !== "focus" && variantId) ? ( - - ) : ( - + cancelRunTests?.(rowId, viewType === "single" ? variantId : undefined) + }, [cancelRunTests, variantId, rowId, viewType]) + + if (viewType === "single" && view !== "focus" && variantId) { + const responseData = result?.response?.data + let value = + typeof responseData === "string" + ? responseData + : typeof responseData === "object" && responseData.hasOwnProperty("content") + ? responseData.content + : "" + + let isJSON = false + try { + const parsed = JSON5.parse(value) + isJSON = true + value = JSON.stringify(parsed, null, 2) + } catch (e) { + isJSON = false + } + + return ( +
0}, + classes.container, + ])} + {...props} + > +
+ {variableIds.length > 0 && ( + <> +
+ + Variables + +
+
+ {variableIds.map((variableId) => { + return ( + + ) + })} +
+ + {!inputOnly && ( + + )} + + )} +
+ + {!inputOnly && ( +
+
+ {!isRunning ? ( + + ) : ( + + )} +
+
+ {isRunning ? ( + + ) : !result ? ( + + ) : result.error ? ( + + } + handleChange={handleChange} + /> + ) : result.response ? ( + Array.isArray(result.response?.data) ? ( + result.response.data.map((message, index) => { + let _json = false + try { + const parsed = JSON5.parse(message.content) + parsed.function.arguments = JSON5.parse( + parsed.function.arguments, + ) + const displayValue = { + arguments: parsed.function.arguments, + } + _json = true + + return ( + + + {parsed.function.name} + + + {parsed.id} + +
+ } + disabled + editorClassName="min-h-4 [&_p:first-child]:!mt-0" + footer={ + + } + handleChange={handleChange} + /> + ) + } catch (e) { + console.log("RENDER MSG ITEM ERROR!", message, e) + return
errored
+ } + }) + ) : ( + + } + handleChange={handleChange} + /> + ) + ) : null} +
+ + {/**This is used in when we don't have variables to display */} + {variableIds.length === 0 ? ( + + ) : ( +
+ )} +
+ )} +
+ ) + } + + return ( + <> +
+
+
+ {variableIds.map((variableId) => { + return ( +
+ + + {!inputOnly && ( + + )} +
+ ) + })} +
+
+
+ + {!inputOnly ? ( +
+ {!isRunning ? ( + + ) : ( + + )} +
+ ) : null} + ) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx index a0d7b6d6e2..b65c2f2eb1 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx @@ -1,20 +1,14 @@ -import {useCallback, useEffect, useMemo} from "react" +import {useCallback} from "react" import {Button, Tooltip, Typography} from "antd" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" -import {appTypeAtom} from "@/oss/components/Playground/state/atoms/app" -import { - generationInputRowIdsAtom, - generationRowIdsAtom, -} from "@/oss/components/Playground/state/atoms/generationProperties" -import {clearAllRunsMutationAtom} from "@/oss/components/Playground/state/atoms/utilityMutations" -import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {findVariantById} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" import RunButton from "../../../../assets/RunButton" -import {usePlaygroundAtoms} from "../../../../hooks/usePlaygroundAtoms" -import {generationHeaderDataAtomFamily, triggerWebWorkerTestAtom} from "../../../../state/atoms" +import {clearRuns} from "../../../../hooks/usePlayground/assets/generationHelpers" +import type {PlaygroundStateData} from "../../../../hooks/usePlayground/types" import TestsetDrawerButton from "../../../Drawers/TestsetDrawer" import LoadTestsetButton from "../../../Modals/LoadTestsetModal/assets/LoadTestsetButton" @@ -23,96 +17,99 @@ import type {GenerationHeaderProps} from "./types" const GenerationHeader = ({variantId}: GenerationHeaderProps) => { const classes = useStyles() - - // ATOM-LEVEL OPTIMIZATION: Use focused atom for generation header data - // Memoize the atom to prevent infinite re-renders - const generationHeaderAtom = useMemo( - () => generationHeaderDataAtomFamily(variantId), - [variantId], - ) - const {resultHashes, isRunning} = useAtomValue(generationHeaderAtom) - - // Use optimized playground atoms for mutations - const playgroundAtoms = usePlaygroundAtoms() - const clearGeneration = useSetAtom(clearAllRunsMutationAtom) - - const triggerTest = useSetAtom(triggerWebWorkerTestAtom) - const runAllChat = useSetAtom(runAllChatAtom) - const appType = useAtomValue(appTypeAtom) - const completionRowIds = useAtomValue(generationInputRowIdsAtom) as string[] - - const runTests = useCallback(() => { - if (appType === "chat") runAllChat() - else { - // Run for all completion rows: iterate input row ids and trigger tests - for (const rid of completionRowIds || []) { - triggerTest({rowId: rid, variantId}) - } - } - }, [appType, runAllChat, completionRowIds, triggerTest, variantId]) - - useEffect(() => { - const listener = (e: KeyboardEvent) => { - if ((e.metaKey || e.ctrlKey) && e.key === "Enter") { - e.preventDefault() - e.stopPropagation() - if (!isRunning) runTests() - } - } - document.addEventListener("keydown", listener, true) - return () => { - document.removeEventListener("keydown", listener, true) - } - }, [runTests, isRunning]) + const {resultHashes, isRunning, mutate, runTests, cancelRunTests} = usePlayground({ + variantId, + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variant = findVariantById(state, variantId) + + if (variant?.isChat) { + const messageRows = state.generationData.messages.value + + const resultHashes = messageRows + .flatMap((message) => { + const historyArray = message.history.value + return historyArray.map( + (history) => history.__runs?.[variantId]?.__result, + ) + }) + .filter(Boolean) + + const isRunning = messageRows.some((inputRow) => + inputRow.history.value.some((history) => + variantId ? history.__runs?.[variantId]?.__isRunning : false, + ), + ) + return {resultHashes, isRunning} + } else { + const inputRows = state.generationData.inputs.value + + const resultHashes = (inputRows || []).map((inputRow) => + variantId ? inputRow?.__runs?.[variantId]?.__result : null, + ) + + const isRunning = (inputRows || []).some((inputRow) => + variantId ? inputRow?.__runs?.[variantId]?.__isRunning : false, + ) + + return {resultHashes, isRunning} + } + }, + [variantId], + ), + }) + + const clearGeneration = useCallback(() => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + clearRuns(clonedState) + return clonedState + }, + {revalidate: false}, + ) + }, [mutate]) return ( -
-
- - Generations - - -
- - - - - - - + Generations + + +
+ + + + + + + + + {!isRunning ? ( + runTests?.()} disabled={isRunning} - resultHashes={resultHashes} /> - - {!isRunning ? ( - - runTests()} - disabled={isRunning} - /> - - ) : ( - playgroundAtoms.cancelRunTests?.()} - className="flex" - /> - )} -
+ ) : ( + cancelRunTests?.()} className="flex" /> + )}
-
+
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/index.tsx new file mode 100644 index 0000000000..e769bfc570 --- /dev/null +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/index.tsx @@ -0,0 +1,24 @@ +import {Typography} from "antd" +import clsx from "clsx" + +import {GenerationOutputTextProps} from "./types" + +const GenerationOutputText: React.FC = ({ + text, + type, + isPlaceholder = false, + className, + ...props +}) => { + return ( + + {text} + + ) +} + +export default GenerationOutputText diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/types.d.ts new file mode 100644 index 0000000000..c5731591cf --- /dev/null +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationOutputText/types.d.ts @@ -0,0 +1,8 @@ +import {Typography} from "antd" + +const {Text} = Typography + +export interface GenerationOutputTextProps extends React.ComponentProps { + text: string + isPlaceholder?: boolean +} diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/index.tsx index 9805def9b7..c04c684015 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/index.tsx @@ -7,23 +7,20 @@ import clsx from "clsx" import StatusRenderer from "@/oss/components/pages/observability/components/StatusRenderer" import ResultTag from "@/oss/components/ResultTag/ResultTag" import {formatCurrency, formatLatency, formatTokenUsage} from "@/oss/lib/helpers/formatters" -import {StatusCode} from "@/oss/services/tracing/types" +import {NodeStatusCode, NodeStatusDTO} from "@/oss/services/observability/types" import TraceDrawerButton from "../../../Drawers/TraceDrawer" import {GenerationResultUtilsProps} from "./types" -const GenerationResultUtils: React.FC = ({ - className, - showStatus = true, - result, -}) => { +const GenerationResultUtils: React.FC = ({className, result}) => { const tree = result?.response?.tree - const node = tree?.nodes?.[0] - const metricAcc = node?.metrics?.acc - const metricUnit = node?.metrics?.unit - const metric = metricAcc || metricUnit - const status = result?.error ? StatusCode.STATUS_CODE_ERROR : (node?.status as StatusCode) + const metric = tree?.nodes?.[0]?.metrics?.acc + const status = result?.error + ? { + code: NodeStatusCode.ERROR, + } + : (tree?.nodes?.[0]?.status as NodeStatusDTO) const durations = metric?.duration?.total const tokens = metric?.tokens?.total const costs = metric?.costs?.total @@ -41,39 +38,35 @@ const GenerationResultUtils: React.FC = ({ return (
- + - {showStatus && } + - {durations ? ( - - {formattedLatency} - - ) : null} + + {formattedLatency} + - {tokens || costs ? ( - - {formattedTokens} / {formattedCosts} -
- } - popoverContent={ - - -
{formattedPrompts}
-
Prompt tokens
-
- -
{formattedCompletions}
-
Completion tokens
-
+ + {formattedTokens} / {formattedCosts} + + } + popoverContent={ + + +
{formattedPrompts}
+
Prompt tokens
- } - /> - ) : null} + +
{formattedCompletions}
+
Completion tokens
+
+
+ } + /> ) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/types.d.ts index 4d648c7710..8259579779 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationResultUtils/types.d.ts @@ -3,5 +3,4 @@ import {TestResult} from "@/oss/components/Playground/assets/utilities/transform export interface GenerationResultUtilsProps { className?: string result: TestResult | null | undefined - showStatus?: boolean } diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationVariableOptions/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationVariableOptions/index.tsx index 2794232374..a80ca0906c 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationVariableOptions/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationVariableOptions/index.tsx @@ -1,60 +1,110 @@ -import {useMemo} from "react" +import {useCallback} from "react" import {Copy, MinusCircle} from "@phosphor-icons/react" import {Button} from "antd" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" -import {deleteGenerationInputRowMutationAtom} from "@/oss/components/Playground/state/atoms/mutations/input/deleteInputRow" -import {duplicateGenerationInputRowMutationAtom} from "@/oss/components/Playground/state/atoms/mutations/input/duplicateInputRow" -import {inputRowIdsAtom, inputRowsByIdFamilyAtom} from "@/oss/state/generation/entities" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {getEnhancedProperties} from "@/oss/lib/shared/variant" +import type {ArrayMetadata, ObjectMetadata} from "@/oss/lib/shared/variant/genericTransformer/types" +import {createInputRow} from "@/oss/lib/shared/variant/inputHelpers" -import {usePlaygroundLayout} from "../../../../hooks/usePlaygroundLayout" +import usePlayground from "../../../../hooks/usePlayground" +import {PlaygroundStateData} from "../../../../hooks/usePlayground/types" import PlaygroundGenerationVariableMenu from "../../../Menus/PlaygroundGenerationVariableMenu" import type {GenerationVariableOptionsProps} from "./types" const GenerationVariableOptions: React.FC = ({ rowId, + variantId, className, resultHash, variableId, }) => { - const inputRowIds = useAtomValue(inputRowIdsAtom) - const rowState = useAtomValue(useMemo(() => inputRowsByIdFamilyAtom(rowId), [rowId])) as any - const variableValue = useMemo(() => { - try { - const node = (rowState?.variables || []).find((n: any) => n?.__id === variableId) - const v = node ? (node?.content?.value ?? node?.value) : "" - return typeof v === "string" ? v : String(v ?? "") - } catch { - return "" - } - }, [rowState, variableId]) - const {isComparisonView} = usePlaygroundLayout() - - // EFFICIENT MUTATIONS: Use dedicated mutation atoms instead of complex useCallback logic - const deleteInputRow = useSetAtom(deleteGenerationInputRowMutationAtom) - const duplicateInputRow = useSetAtom(duplicateGenerationInputRowMutationAtom) - - // Derive inputRows length from inputRowIds for safety check - const inputRowsLength = inputRowIds?.length || 0 - const viewType = isComparisonView ? "comparison" : "single" + const {mutate, viewType, inputRows, variable} = usePlayground({ + variantId, + hookId: "GenerationVariableOptions", + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const inputRows = state.generationData.inputs.value || [] + const inputRow = inputRows.find((inputRow) => { + return inputRow.__id === rowId + }) + const variables = getEnhancedProperties(inputRow) + const variable = variables.find((p) => p.__id === variableId) + + return {inputRows, variable} + }, + [rowId, variableId], + ), + }) + + const deleteInputRow = useCallback(() => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + + const generationRows = clonedState.generationData.inputs.value + clonedState.generationData.inputs.value = generationRows.filter( + (row) => row.__id !== rowId, + ) + + return clonedState + }, + {revalidate: false}, + ) + }, []) + + const duplicateInputRow = useCallback(() => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + + const _metadata = getMetadataLazy( + clonedState?.generationData.inputs.__metadata, + ) + const itemMetadata = _metadata?.itemMetadata as ObjectMetadata + + if (!itemMetadata) return clonedState + + const inputKeys = Object.keys( + itemMetadata.properties, + ) as (keyof typeof existingRow)[] + const newRow = createInputRow(inputKeys, itemMetadata) + + const existingRow = clonedState?.generationData.inputs.value.find( + (row) => row.__id === rowId, + ) + + if (existingRow) { + inputKeys.forEach((key) => { + if (existingRow[key] !== undefined) { + newRow[key] = structuredClone(existingRow[key]) + } + }) + } + + clonedState.generationData.inputs.value.push(newRow) + + return clonedState + }, + {revalidate: false}, + ) + }, []) return (
+ />
Average Latency - {avgLatency} + {calculateAverageLatency("duration")}
Average Cost - {avgTokens} / {avgCost} + {calculateAverageLatency("tokens")} /{" "} + {calculateAverageLatency("costs")}
diff --git a/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/assets/VariantNavigationCard/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/assets/VariantNavigationCard/types.d.ts index 60475bfb8d..14445031dc 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/assets/VariantNavigationCard/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/assets/VariantNavigationCard/types.d.ts @@ -1,6 +1,6 @@ export interface VariantNavigationCardProps { id: string className?: string - revisionId: string + variantId: string handleScrollClick: () => void } diff --git a/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/index.tsx index a76445ef24..e7fd177a39 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundPromptComparisonView/PromptComparisonVariantNavigation/index.tsx @@ -5,12 +5,8 @@ import {restrictToParentElement} from "@dnd-kit/modifiers" import {arrayMove, SortableContext, verticalListSortingStrategy} from "@dnd-kit/sortable" import {Typography} from "antd" import clsx from "clsx" -import {useAtomValue} from "jotai" -import {writePlaygroundSelectionToQuery} from "@/oss/state/url/playground" - -import {usePlaygroundLayout} from "../../../hooks/usePlaygroundLayout" -import {selectedVariantsAtom} from "../../../state/atoms" +import usePlayground from "../../../hooks/usePlayground" import VariantNavigationCard from "./assets/VariantNavigationCard" import type {PromptComparisonVariantNavigationProps} from "./types" @@ -20,8 +16,7 @@ const PromptComparisonVariantNavigation = ({ handleScroll, ...props }: PromptComparisonVariantNavigationProps) => { - const {displayedVariants} = usePlaygroundLayout() - const selectedVariants = useAtomValue(selectedVariantsAtom) + const {displayedVariants, setDisplayedVariants} = usePlayground() const sensors = useSensors( useSensor(PointerSensor, { @@ -38,21 +33,14 @@ const PromptComparisonVariantNavigation = ({ const {active, over} = event if (over?.id && active.id && active.id !== over?.id) { - // Get current revision IDs from selectedVariants (which is a string array) - const currentRevisionIds = selectedVariants || [] - - const oldIndex = currentRevisionIds.indexOf(active.id) - const newIndex = currentRevisionIds.indexOf(over.id) - - if (oldIndex !== -1 && newIndex !== -1) { - // Reorder the array - const reorderedRevisions = arrayMove(currentRevisionIds, oldIndex, newIndex) + const oldIndex = displayedVariants!.indexOf(active.id) + const newIndex = displayedVariants!.indexOf(over.id) - void writePlaygroundSelectionToQuery(reorderedRevisions) - } + const newArray = arrayMove(displayedVariants!, oldIndex, newIndex) + setDisplayedVariants?.(newArray) } }, - [selectedVariants], + [displayedVariants], ) return ( @@ -69,17 +57,19 @@ const PromptComparisonVariantNavigation = ({ modifiers={[restrictToParentElement]} > - {displayedVariants?.map((variantId, idx) => ( - handleScroll(idx)} - /> - ))} + {displayedVariants?.map((variantId, idx) => { + return ( + handleScroll(idx)} + /> + ) + })} diff --git a/web/oss/src/components/Playground/Components/PlaygroundTool/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundTool/index.tsx index 7287135a11..4b66432e19 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundTool/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundTool/index.tsx @@ -1,321 +1,218 @@ -import React, {useCallback, useEffect, useMemo, useRef, useState} from "react" +import {useCallback, useEffect, useMemo, useState} from "react" import {Input, Tooltip} from "antd" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" import JSON5 from "json5" -import {v4 as uuidv4} from "uuid" import {EditorProvider} from "@/oss/components/Editor/Editor" -import {variantByRevisionIdAtomFamily} from "@/oss/components/Playground/state/atoms" -import {promptsAtomFamily} from "@/oss/state/newPlayground/core/prompts" -import {appUriInfoAtom} from "@/oss/state/variant/atoms/fetcher" +import usePlayground from "../../hooks/usePlayground" +import { + findParentOfPropertyInObject, + findVariantById, +} from "../../hooks/usePlayground/assets/helpers" import PlaygroundVariantPropertyControlWrapper from "../PlaygroundVariantPropertyControl/assets/PlaygroundVariantPropertyControlWrapper" import PromptMessageContentOptions from "../PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions" import SharedEditor from "../SharedEditor" import {TOOL_SCHEMA} from "./assets" -export type ToolFunction = { - name?: string - description?: string - [k: string]: any -} - -export type ToolObj = { - function?: ToolFunction - [k: string]: any -} | null - -export interface PlaygroundToolProps { - value: unknown - disabled?: boolean - variantId: string - baseProperty?: {__id?: string} & Record - editorProps?: { - handleChange?: (obj: ToolObj) => void - } -} - -function safeStringify(obj: any): string { - try { - return JSON.stringify(obj, null, 2) - } catch { - return "" - } -} - -// stable stringify - sorts keys so deep equals is reliable -function stableStringify(input: any): string { - const seen = new WeakSet() - function sortKeys(value: any): any { - if (value && typeof value === "object") { - if (seen.has(value)) return null // guard against cycles - seen.add(value) - if (Array.isArray(value)) return value.map(sortKeys) - const out: Record = {} - Object.keys(value) - .sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)) - .forEach((k) => { - out[k] = sortKeys(value[k]) - }) - return out +const PlaygroundTool = ({value, disabled, variantId, baseProperty, ...editorProps}) => { + const [minimized, setMinimized] = useState(false) + const [toolString, setToolString] = useState(() => { + try { + return typeof value === "string" ? value : JSON5.stringify(value) + } catch (e) { + return null } - return value - } - try { - return JSON.stringify(sortKeys(input)) - } catch { - return "" - } -} - -function deepEqual(a: any, b: any): boolean { - return stableStringify(a) === stableStringify(b) -} - -function toToolObj(value: unknown): ToolObj { - try { - if (typeof value === "string") return value ? (JSON5.parse(value) as ToolObj) : {} - if (value && typeof value === "object") return value as ToolObj - return {} - } catch { - // Keep last known good - return {} - } -} - -/** - * Manages the tool JSON editor state and parsed object snapshot. - * - Emits onChange only when the canonical object actually changes (deep compare) - * - Reacts to external prop changes to `initialValue` - */ -function useToolState( - initialValue: unknown, - isReadOnly: boolean, - onChange?: (obj: ToolObj) => void, -) { - const [toolObj, setToolObj] = useState(() => toToolObj(initialValue)) - const [editorText, setEditorText] = useState(() => safeStringify(toolObj ?? {})) - const [editorValid, setEditorValid] = useState(true) - - // Last sent payload to avoid duplicate onChange calls - const lastSentSerializedRef = useRef(stableStringify(toolObj)) - - // Emit to parent when canonical state changes - useEffect(() => { - if (isReadOnly || !onChange) return - const current = stableStringify(toolObj) - if (current !== lastSentSerializedRef.current) { - lastSentSerializedRef.current = current - onChange(toolObj) + }) + const [functionName, setFunctionName] = useState(() => { + try { + return typeof value === "string" + ? JSON5.parse(value)?.function?.name + : value?.function?.name + } catch (err) { + return null + } + }) + const [functionDescription, setFunctionDescription] = useState(() => { + try { + return typeof value === "string" + ? JSON5.parse(value)?.function?.description + : value?.function?.description + } catch (err) { + return null + } + }) + + const parsed = useMemo(() => { + if (!toolString) return null + try { + return JSON5.parse(toolString) + } catch (e) { + return null } - }, [toolObj, onChange, isReadOnly]) + }, [toolString]) - // React to external initialValue changes - const lastPropValueRef = useRef(stableStringify(toToolObj(initialValue))) useEffect(() => { - const nextParsed = toToolObj(initialValue) - const nextSerialized = stableStringify(nextParsed) - if (nextSerialized !== lastPropValueRef.current) { - lastPropValueRef.current = nextSerialized - setToolObj(nextParsed) - setEditorText(safeStringify(nextParsed ?? {})) - setEditorValid(true) + if (!toolString) { + return } - }, [initialValue]) - const onEditorChange = useCallback( - (text: string) => { - if (isReadOnly) return - setEditorText(text) - try { - const parsed = text ? (JSON5.parse(text) as ToolObj) : {} - setEditorValid(true) - setToolObj((prev) => (deepEqual(prev, parsed) ? prev : parsed)) - } catch { - setEditorValid(false) + try { + const toolObj = JSON5.parse(toolString) + if (toolObj && toolObj.function) { + toolObj.function.name = functionName } - }, - [isReadOnly], - ) - - return { - toolObj, - editorText, - editorValid, - onEditorChange, - } -} + setToolString(JSON.stringify(toolObj)) + } catch (err) { + console.error(err) + } + }, [functionName]) -/** - * Header component - isolated to avoid re-creating callbacks unnecessarily - */ -function ToolHeader(props: { - idForActions: string - name: string - desc: string - editorValid: boolean - isReadOnly: boolean - minimized: boolean - onToggleMinimize: () => void - onDelete?: () => void -}) { - const {name, desc, editorValid, isReadOnly, minimized, onToggleMinimize, onDelete} = props + useEffect(() => { + if (!toolString) { + return + } - return ( -
-
-
- - - + try { + const toolObj = JSON5.parse(toolString) + if (toolObj && toolObj.function) { + toolObj.function.description = functionDescription + } - - - -
-
+ setToolString(JSON.stringify(toolObj)) + } catch (err) { + console.error(err) + } + }, [functionDescription]) - { + try { + const parsedTool = JSON5.parse(toolString) + editorProps?.handleChange?.(parsedTool) + setFunctionName((currentName) => { + if (currentName !== parsedTool?.function?.name) { + return parsedTool?.function?.name } - hideMarkdownToggle={true} - /> -
- ) -} - -const PlaygroundTool: React.FC = ({ - value, - disabled, - variantId, - baseProperty, - editorProps, -}) => { - const editorIdRef = useRef(uuidv4()) - const isReadOnly = Boolean(disabled) - const [minimized, setMinimized] = useState(false) + return currentName + }) + setFunctionDescription((currentDescription) => { + if (currentDescription !== parsedTool?.function?.description) { + return parsedTool?.function?.description + } + return currentDescription + }) + } catch (e) { + if (!toolString) { + setFunctionName(null) + setFunctionDescription(null) + } + } + }, [toolString]) - const {toolObj, editorText, editorValid, onEditorChange} = useToolState( - value, - isReadOnly, - editorProps?.handleChange, - ) + const {mutate} = usePlayground() + const deleteMessage = useCallback(() => { + mutate((draftState) => { + const variant = findVariantById(draftState, variantId) - useAtomValue(variantByRevisionIdAtomFamily(variantId)) - const appUriInfo = useAtomValue(appUriInfoAtom) - const setPrompts = useSetAtom( - useMemo(() => promptsAtomFamily(variantId), [variantId, appUriInfo?.routePath]), - ) + const x = findParentOfPropertyInObject(variant, baseProperty.__id) + if (x) { + x.value = x.value.filter((v) => v.__id !== baseProperty.__id) + } - const deleteMessage = useCallback(() => { - if (isReadOnly) return - const id = baseProperty?.__id - if (!id) { - console.warn("Cannot delete tool - missing tool property ID") - return - } - setPrompts((prevPrompts: any[] = []) => { - return prevPrompts.map((prompt: any) => { - const toolsArr = prompt?.llmConfig?.tools?.value - if (Array.isArray(toolsArr)) { - const updatedTools = toolsArr.filter((tool: any) => tool.__id !== id) - if (updatedTools.length !== toolsArr.length) { - return { - ...prompt, - llmConfig: { - ...prompt.llmConfig, - tools: { - ...prompt.llmConfig?.tools, - value: updatedTools, - }, - }, - } - } - } - return prompt - }) + return draftState }) - }, [isReadOnly, baseProperty?.__id, setPrompts]) + }, [variantId, baseProperty.id]) return ( - _div]:!w-auto [&_>_div]:!grow !my-0", - {"[_.agenta-shared-editor]:w-full": isReadOnly}, - )} - > + { - if (isReadOnly) return - onEditorChange(e) + setToolString(e) }} - syncWithInitialValueChanges editorType="border" className={clsx([ "mt-2", - minimized - ? "[&_.agenta-editor-wrapper]:h-[calc(8px+calc(3*19.88px))] [&_.agenta-editor-wrapper]:overflow-y-auto [&_.agenta-editor-wrapper]:!mb-0" - : "[&_.agenta-editor-wrapper]:h-fit", + { + "[&_.agenta-editor-wrapper]:h-[calc(8px+calc(3*19.88px))] [&_.agenta-editor-wrapper]:overflow-y-auto [&_.agenta-editor-wrapper]:!mb-0": + minimized, + "[&_.agenta-editor-wrapper]:h-fit": !minimized, + }, ])} - state={isReadOnly ? "readOnly" : "filled"} + state="filled" header={ - setMinimized((v) => !v)} - onDelete={deleteMessage} - /> +
+
+
+ + { + setFunctionName(e.target.value) + }} + /> + + + { + setFunctionDescription(e.target.value) + }} + /> + +
+
+ + { + setMinimized((current) => !current) + }, + }} + /> +
} />
diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/Editors.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/Editors.tsx deleted file mode 100644 index 7b7f3dcadd..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/Editors.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import {useEffect, memo} from "react" - -import {Spin} from "antd" -import clsx from "clsx" - -import {useVariantPrompts} from "@/oss/components/Playground/hooks/useVariantPrompts" - -import PlaygroundVariantConfigPrompt from "../../PlaygroundVariantConfigPrompt" -import PlaygroundVariantCustomProperties from "../../PlaygroundVariantCustomProperties" - -const PlaygroundVariantConfigEditors = ({ - variantId, - className, - ...divProps -}: { - variantId: string - className?: string -}) => { - const {promptIds, variantExists, debug} = useVariantPrompts(variantId) - - useEffect(() => { - if (process.env.NODE_ENV !== "production") { - console.info("[PlaygroundVariantConfigEditors]", { - variantId, - promptCount: promptIds.length, - variantExists, - debug, - }) - } - }, [variantId, promptIds.length, variantExists, debug]) - - if (!variantExists) { - return ( -
- - variantId: {variantId} -
- ) - } - - return ( -
- {promptIds.map((promptId) => ( - - ))} - -
- ) -} - -export default memo(PlaygroundVariantConfigEditors) diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx index 90f5655715..f9704743ef 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx @@ -1,17 +1,13 @@ -import {useCallback, useMemo} from "react" +import {useCallback} from "react" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" import dynamic from "next/dynamic" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" +import {PlaygroundStateData} from "@/oss/components/Playground/hooks/usePlayground/types" import VariantDetailsWithStatus from "@/oss/components/VariantDetailsWithStatus" -import { - enhancedRevisionByIdAtomFamily, - revisionDeploymentAtomFamily, -} from "@/oss/state/variant/atoms/fetcher" +import {atomStore, allRevisionsAtom} from "@/oss/lib/hooks/useStatelessVariants/state" -// import {baselineVariantAtomFamily} from "../../../state/atoms/dirtyState" -import {switchVariantAtom} from "../../../state/atoms/urlSync" import SelectVariant from "../../Menus/SelectVariant" import CommitVariantChangesButton from "../../Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton" import DeployVariantButton from "../../Modals/DeployVariantModal/assets/DeployVariantButton" @@ -27,109 +23,103 @@ const PlaygroundVariantHeaderMenu = dynamic( const PlaygroundVariantConfigHeader = ({ variantId, className, - embedded, - variantNameOverride, - revisionOverride, ...divProps -}: PlaygroundVariantConfigHeaderProps & {embedded?: boolean}) => { +}: PlaygroundVariantConfigHeaderProps) => { const classes = useStyles() + const {deployedIn, isLatestRevision, variantRevision, isDirty, mutate, _variantId} = + usePlayground({ + variantId, + hookId: "PlaygroundVariantConfigHeader", + stateSelector: useCallback( + (state: PlaygroundStateData) => { + const variants = state.variants + const variant = variants.find((v) => v.id === variantId) + const isDirty = state.dirtyStates?.[variantId] - // Read baseline revision directly from the source of truth (revisionListAtom) - const baseline = useAtomValue(enhancedRevisionByIdAtomFamily(variantId || "")) - const deployment = useAtomValue( - revisionDeploymentAtomFamily((baseline?.id as string) || ""), - ) as any - - // Extract revision display data with fallbacks for embedded usage - const _variantId = baseline?.id ?? variantId - const variantRevision = revisionOverride ?? baseline?.revision ?? null - const displayName = - variantNameOverride ?? - (baseline as any)?.variantName ?? - (baseline as any)?.name ?? - _variantId - const isLatestRevision = baseline?.isLatestRevision - // Keep the full deployment objects so downstream components (e.g., EnvironmentStatus) - // can access env.name and other fields. - const deployedIn = Array.isArray(deployment) ? (deployment as any[]) : [] - - // Stable minimal variant shape for presentational children - const variantMin = useMemo( - () => ({ - id: (_variantId as string) || "", - deployedIn, - isLatestRevision: isLatestRevision ?? false, - }), - [_variantId, deployedIn, isLatestRevision], - ) - - // Use the reusable switchVariant atom - const switchVariant = useSetAtom(switchVariantAtom) + return { + isDirty, + _variantId: variant?.id, + variantRevision: variant?.revision, + deployedIn: variant?.deployedIn, + isLatestRevision: variant?.isLatestRevision, + } + }, + [variantId], + ), + }) - const handleSwitchVariant = useCallback( + const switchVariant = useCallback( (newVariantId: string) => { - switchVariant({ - currentVariantId: variantId || "", - newVariantId, + // Get all revisions from atom store + const allRevisions = atomStore.get(allRevisionsAtom) || [] + + mutate((clonedState) => { + if (!clonedState) return clonedState + + // Update selected variants array by replacing the current variant with the new one + const previousSelected = [...clonedState.selected] + previousSelected.splice( + previousSelected.findIndex((id) => id === variantId), + 1, + newVariantId, + ) + clonedState.selected = previousSelected + + // Find the new variant in the atom store + const revisionToAdd = allRevisions.find( + (rev: {id: string}) => rev.id === newVariantId, + ) + + // Add the new variant to the variants array if it's not already there + if (revisionToAdd && !clonedState.variants.some((v) => v.id === newVariantId)) { + clonedState.variants = [...clonedState.variants, revisionToAdd] + console.log("Added variant from atom store in switchVariant:", newVariantId) + } + + return clonedState }) }, - [switchVariant, variantId], + [mutate, variantId], ) return (
- {!embedded && ( - handleSwitchVariant?.(value)} - value={_variantId} - /> - )} - {embedded && !baseline ? ( -
- {displayName as any} - {variantRevision !== null && variantRevision !== undefined && ( - - rev {String(variantRevision)} - - )} -
- ) : ( - - )} + switchVariant?.(value)} value={_variantId} /> + +
+
+ + + + +
- {!embedded && ( -
- - - - - -
- )}
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/types.d.ts index 2cdc072dc9..9df21c6ca2 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/types.d.ts @@ -2,7 +2,4 @@ import {BaseContainerProps} from "../../types" export interface PlaygroundVariantConfigHeaderProps extends BaseContainerProps { variantId: string - embedded?: boolean - variantNameOverride?: string - revisionOverride?: number | string | null } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/index.tsx index d8781e9abf..5e019501de 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfig/index.tsx @@ -1,10 +1,13 @@ -"use client" - -import {memo} from "react" +import {useCallback, memo} from "react" import clsx from "clsx" -import PlaygroundVariantConfigEditors from "./assets/Editors" +import type {EnhancedVariant} from "../../../../lib/shared/variant/transformer/types" +import {componentLogger} from "../../assets/utilities/componentLogger" +import usePlayground from "../../hooks/usePlayground" +import PlaygroundVariantConfigPrompt from "../PlaygroundVariantConfigPrompt" +import PlaygroundVariantCustomProperties from "../PlaygroundVariantCustomProperties" + import PlaygroundVariantConfigHeader from "./assets/PlaygroundVariantConfigHeader" import type {VariantConfigComponentProps} from "./types" @@ -23,13 +26,22 @@ import type {VariantConfigComponentProps} from "./types" * ``` */ -const PlaygroundVariantConfig: React.FC< - VariantConfigComponentProps & { - embedded?: boolean - variantNameOverride?: string - revisionOverride?: number | string | null - } -> = ({variantId, className, embedded, variantNameOverride, revisionOverride, ...divProps}) => { +const PlaygroundVariantConfig: React.FC = ({ + variantId, + className, + ...divProps +}) => { + const {promptIds = []} = usePlayground({ + variantId, + hookId: "PlaygroundConfigVariantPrompts", + variantSelector: useCallback((variant: EnhancedVariant) => { + const promptIds = (variant?.prompts || [])?.map((prompt) => prompt.__id) ?? [] + return {promptIds} + }, []), + }) + + componentLogger("PlaygroundVariantConfig", variantId, promptIds) + return (
- + {promptIds.map((promptId) => ( + + ))} + -
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ActionsOutputRenderer.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ActionsOutputRenderer.tsx deleted file mode 100644 index 7be4ee6f2f..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ActionsOutputRenderer.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, {useMemo} from "react" - -import clsx from "clsx" -import {useSetAtom} from "jotai" - -import {getPromptById, getLLMConfig} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" - -import AddButton from "../../../assets/AddButton" -import { - addPromptMessageMutationAtomFamily, - addPromptToolMutationAtomFamily, -} from "../../../state/atoms/promptMutations" -import PlaygroundVariantPropertyControl from "../../PlaygroundVariantPropertyControl" -import TemplateFormatSelector from "./TemplateFormatSelector" - -interface Props { - variantId: string - compoundKey: string - viewOnly?: boolean -} - -const ActionsOutputRenderer: React.FC = ({variantId, compoundKey, viewOnly}) => { - const addNewMessage = useSetAtom(addPromptMessageMutationAtomFamily(compoundKey)) - const addNewTool = useSetAtom(addPromptToolMutationAtomFamily(compoundKey)) - const [, promptId] = compoundKey.split(":", 2) - const prompts = usePromptsSource(variantId) - - const responseFormatInfo = useMemo(() => { - const item = getPromptById(prompts, promptId) - const llm = getLLMConfig(item) - const enhancedId = llm?.responseFormat?.__id || llm?.response_format?.__id - const raw = llm?.response_format || llm?.responseFormat - return {enhancedId, raw} - }, [prompts, promptId]) - const responseFormatId = responseFormatInfo.enhancedId as string | undefined - return ( -
_div]:!w-full": viewOnly, - })} - > - {!viewOnly && ( - <> - - - - )} -
- {responseFormatId ? ( - - ) : ( - // Fallback for immutable/raw params (no property id) - - {(() => { - const t = (responseFormatInfo.raw || {})?.type - if (!t || t === "text") return "Default (text)" - if (t === "json_object") return "JSON mode" - if (t === "json_schema") return "JSON schema" - return String(t) - })()} - - )} -
- -
- ) -} - -export default ActionsOutputRenderer diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/MessagesRenderer.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/MessagesRenderer.tsx deleted file mode 100644 index 996f65476b..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/MessagesRenderer.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import React, {useCallback, useMemo} from "react" - -import {Tag} from "antd" -import deepEqual from "fast-deep-equal" -import {useSetAtom} from "jotai" - -import {getPromptById, getArrayVal} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" - -import {deletePromptMessageMutationAtomFamily} from "../../../state/atoms/promptMutations" -import PromptMessageConfig from "../../PromptMessageConfig" -import SharedEditor from "../../SharedEditor" - -interface Props { - variantId: string - compoundKey: string - promptId: string - viewOnly?: boolean -} - -const MessagesRenderer: React.FC = ({promptId, variantId, compoundKey, viewOnly}) => { - const prompts = usePromptsSource(variantId) - const {messageIds, rawMessages} = useMemo(() => { - const item = getPromptById(prompts, promptId) - const arr = getArrayVal(item?.messages) - const ids = arr.map((m: any) => m?.__id).filter(Boolean) - return {messageIds: ids, rawMessages: arr} - }, [prompts, promptId, compoundKey]) - - const deleteMessageSetter = useSetAtom(deletePromptMessageMutationAtomFamily(compoundKey)) - const deleteMessage = useCallback( - (messageId: string) => deleteMessageSetter({messageId}), - [deleteMessageSetter], - ) - return ( - <> - {messageIds && messageIds.length > 0 - ? messageIds.map((messageId: string) => { - return ( - 1} - viewOnly={viewOnly} - /> - ) - }) - : // Fallback for immutable/raw prompts without property ids - (rawMessages || []).map((m: any, idx: number) => { - const role = m?.role || m?.role?.value || "user" - const content = m?.content?.value ?? m?.content - const text = Array.isArray(content) - ? content - .map( - (p: any) => - p?.text?.value || p?.text || p?.image_url?.url || "", - ) - .filter(Boolean) - .join("\n\n") - : typeof content === "string" - ? content - : JSON.stringify(content ?? "", null, 2) - - return ( -
-
- - {role} - -
- -
- ) - })} - - ) -} - -export default MessagesRenderer diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseContent.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseContent.tsx index e41e190959..384b2ff7b2 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseContent.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseContent.tsx @@ -1,23 +1,23 @@ -import {useEffect, useMemo} from "react" +import {useCallback} from "react" import {Alert} from "antd" import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {useAtomValue, useSetAtom} from "jotai" -import {selectAtom} from "jotai/utils" +import {v4 as uuidv4} from "uuid" -import {currentAppContextAtom} from "@/oss/state/app/selectors/app" -import { - promptsAtomFamily, - promptVariablesByPromptAtomFamily, -} from "@/oss/state/newPlayground/core/prompts" +import {findVariantById} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" +import {ArrayMetadata} from "@/oss/lib/shared/variant/genericTransformer/types" +import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" +import {createObjectFromMetadata} from "../../../../../lib/shared/variant/genericTransformer/helpers/arrays" +import AddButton from "../../../assets/AddButton" +import {hashMetadata} from "../../../assets/hash" +import {componentLogger} from "../../../assets/utilities/componentLogger" +import usePlayground from "../../../hooks/usePlayground" +import PlaygroundVariantPropertyControl from "../../PlaygroundVariantPropertyControl" +import PromptMessageConfig from "../../PromptMessageConfig" import type {PromptCollapseContentProps} from "../types" -import ActionsOutputRenderer from "./ActionsOutputRenderer" -import MessagesRenderer from "./MessagesRenderer" -import ToolsRenderer from "./ToolsRenderer" - /** * PlaygroundVariantConfigPromptCollapseContent renders the configuration interface * for a single prompt's messages. @@ -30,50 +30,203 @@ import ToolsRenderer from "./ToolsRenderer" * @component */ -const isCustomAtom = selectAtom(currentAppContextAtom, (ctx) => ctx.appType === "custom", deepEqual) const PlaygroundVariantConfigPromptCollapseContent: React.FC = ({ variantId, promptId, className, - viewOnly, ...props }) => { - // Minimal subscriptions by stable key `${revisionId}:${promptId}` - const compoundKey = `${variantId}:${promptId}` - - // Seed local prompts cache once to avoid first-edit race between derived and local state - const seedPrompts = useSetAtom(promptsAtomFamily(variantId)) - useEffect(() => { - seedPrompts((draft: any) => draft) - // run once per variantId mount - }, [variantId]) - - const promptVars = useAtomValue( - useMemo( - () => promptVariablesByPromptAtomFamily({revisionId: variantId, promptId}), - [variantId, promptId], + const { + responseFormatId, + promptName, + isCustom, + inputKeys, + messageIds, + toolIds, + mutateVariant, + hasVariable, + mutate, + } = usePlayground({ + variantId, + hookId: "PlaygroundConfigVariantPrompts", + variantSelector: useCallback( + (variant: EnhancedVariant) => { + const prompt = (variant.prompts || []).find((p) => p.__id === promptId) + const messages = prompt?.messages + + if (!messages) { + return {messageIds: []} + } + + return { + messageIds: messages.value.map((message) => message.__id), + inputKeys: prompt.inputKeys.value || [], + hasVariable: prompt.inputKeys.value.length > 0, + isCustom: variant.isCustom, + responseFormatId: prompt.llmConfig?.responseFormat?.__id, + responseFormat: prompt.llmConfig?.responseFormat?.value?.type, + promptName: prompt.__name, + toolIds: (prompt.llmConfig?.tools?.value || []).map((tool) => tool.__id), + } + }, + [promptId], ), - ) as string[] - const hasVariable = (promptVars?.length || 0) > 0 - const isCustom = useAtomValue(isCustomAtom) + }) + + const addNewTool = useCallback(() => { + if (!mutateVariant) return + + mutateVariant((draft) => { + const variantPrompt = draft.prompts?.find((p) => p.__id === promptId) + if (!variantPrompt?.llmConfig?.tools.value) { + variantPrompt.llmConfig.tools.value = [] + } + + variantPrompt?.llmConfig?.tools.value.push({ + __id: uuidv4(), + __metadata: hashMetadata({ + type: "object", + name: "ToolConfiguration", + description: "Tool configuration", + properties: { + type: { + type: "string", + description: "Type of the tool", + }, + name: { + type: "string", + description: "Name of the tool", + }, + description: { + type: "string", + description: "Description of the tool", + }, + parameters: { + type: "object", + properties: { + type: { + type: "string", + enum: ["object", "function"], + }, + }, + }, + }, + required: ["name", "description", "parameters"], + }), + value: { + type: "function", + function: { + name: "get_weather", + description: "Get current temperature for a given location.", + parameters: { + type: "object", + properties: { + location: { + type: "string", + description: "City and country e.g. Bogotá, Colombia", + }, + }, + required: ["location"], + additionalProperties: false, + }, + }, + }, + }) + + return draft + }) + }, [mutateVariant, promptId]) + const addNewMessage = useCallback(() => { + if (!mutateVariant) return + + mutateVariant((draft) => { + const variantPrompt = draft.prompts?.find((p) => p.__id === promptId) + const messages = variantPrompt?.messages.value + const parentMetadata = getMetadataLazy( + variantPrompt?.messages.__metadata, + ) + const metadata = parentMetadata?.itemMetadata + + if (variantPrompt && messages && metadata) { + const newMessage = createObjectFromMetadata(metadata) as (typeof messages)[number] + if (newMessage) { + messages.push(newMessage) + } + } + + return draft + }) + }, [mutateVariant, promptId]) + + const deleteMessage = useCallback( + (messageId: string) => { + if (!mutateVariant) return + + mutate( + (clonedState) => { + if (!clonedState) return clonedState + + const variant = findVariantById(clonedState, variantId) + + if (!variant) return clonedState + + const variantPrompt = variant.prompts?.find((p) => p.__id === promptId) + const messages = variantPrompt?.messages.value + + if (variantPrompt && messages) { + // Filter out the message with the specified ID + variantPrompt.messages.value = messages.filter( + (message) => message.__id !== messageId, + ) + } + + return clonedState + }, + {revalidate: false}, + ) + }, + [mutateVariant, promptId], + ) + + componentLogger( + "PlaygroundVariantConfigPromptCollapseContent", + variantId, + messageIds, + inputKeys, + ) return (
- - - - {!isCustom && !hasVariable && !viewOnly && ( + {messageIds?.map((messageId) => ( + + ))} + {(toolIds || [])?.map((toolId) => ( +
+ +
+ ))} + + {!isCustom && !hasVariable && ( - Insert a {"{{variable}}"} in your - template to create an input. + Insert a {"{{ variable }}"} in + your template to create an input. } type="info" @@ -81,11 +234,19 @@ const PlaygroundVariantConfigPromptCollapseContent: React.FC )} - +
+ + + {responseFormatId ? ( +
+ +
+ ) : null} +
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseHeader.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseHeader.tsx index a77843b1da..b931e6ed48 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseHeader.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/PlaygroundVariantConfigPromptCollapseHeader.tsx @@ -1,12 +1,11 @@ -import {useMemo} from "react" +import {useCallback} from "react" import {Typography} from "antd" import clsx from "clsx" import dynamic from "next/dynamic" -import {getPromptById} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" - +import {EnhancedVariant} from "../../../../../lib/shared/variant/transformer/types" +import usePlayground from "../../../hooks/usePlayground" import type {PromptCollapseHeaderProps} from "../types" const {Text} = Typography @@ -36,22 +35,19 @@ const PlaygroundVariantConfigPromptCollapseHeader: React.FC { - const prompts = usePromptsSource(variantId) - const promptName = useMemo(() => { - const item = getPromptById(prompts, promptId) - return (item?.__name as string | undefined) ?? "Prompt" - }, [prompts, promptId]) + const {promptName} = usePlayground({ + variantId, + variantSelector: useCallback((variant: EnhancedVariant) => { + const prompt = variant?.prompts?.find((p) => p.__id === promptId) + return {promptName: prompt?.__name} + }, []), + }) return (
- {promptName || "Prompt"} - + {promptName || "Prompt"} +
) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/TemplateFormatSelector.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/TemplateFormatSelector.tsx deleted file mode 100644 index 16c140bfb6..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/TemplateFormatSelector.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import {useMemo} from "react" - -import {useAtom} from "jotai" - -import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" -import type { - BaseOption, - OptionGroup, - SelectOptions, - StringMetadata, -} from "@/oss/lib/shared/variant/genericTransformer/types" -import { - promptTemplateFormatAtomFamily, - type PromptTemplateFormat, -} from "@/oss/components/Playground/state/atoms" -import SimpleDropdownSelect from "../../PlaygroundVariantPropertyControl/assets/SimpleDropdownSelect" -import clsx from "clsx" - -interface TemplateFormatSelectorProps { - variantId: string - disabled?: boolean -} - -type TemplateOption = { - value: PromptTemplateFormat - label: string -} - -const FALLBACK_OPTIONS: TemplateOption[] = [ - {value: "curly", label: "curly"}, - // {value: "fstring", label: "fstring"}, - {value: "jinja2", label: "jinja2"}, -] - -const DEFAULT_LABEL = "Prompt syntax" - -const getTemplateFormatNode = (prompt: any): any => { - if (!prompt || typeof prompt !== "object") return undefined - return ( - prompt.templateFormat ?? - prompt.template_format ?? - prompt?.prompt?.templateFormat ?? - prompt?.prompt?.template_format - ) -} - -const isOptionGroupArray = (options: SelectOptions): options is OptionGroup[] => { - return ( - Array.isArray(options) && - options.length > 0 && - typeof options[0] === "object" && - options[0] !== null && - "options" in (options[0] as OptionGroup) - ) -} - -const normalizeOptions = (options?: SelectOptions): TemplateOption[] => { - if (!options) return [] - if (!Array.isArray(options)) return [] - - if (isOptionGroupArray(options)) { - return ( - options - .flatMap( - (group) => - (group.options || []) - .map((option) => { - const rawValue = option?.value ?? option?.label - if (!rawValue) return null - const value = String(rawValue) as PromptTemplateFormat - const label = option?.label ?? String(option.value ?? "") - return {value, label} - }) - .filter(Boolean) as TemplateOption[], - ) - // hard block fstring for grouped options too - .filter((opt) => opt.value !== "fstring") - ) - } - - return ( - (options as BaseOption[]) - // hard block fstring for flat options - .filter((option) => option.value !== "fstring") - .map((option) => { - const rawValue = option?.value ?? option?.label - if (!rawValue) return null - const value = String(rawValue) as PromptTemplateFormat - const label = option?.label ?? String(option.value ?? "") - return {value, label} - }) - .filter(Boolean) as TemplateOption[] - ) -} - -const TemplateFormatSelector: React.FC = ({ - variantId, - disabled = false, -}) => { - const templateAtom = useMemo(() => promptTemplateFormatAtomFamily(variantId), [variantId]) - const [format, setFormat] = useAtom(templateAtom) - const prompts = usePromptsSource(variantId) - - const {options, label} = useMemo(() => { - let metadata: StringMetadata | null = null - - for (const prompt of prompts || []) { - const node = getTemplateFormatNode(prompt) - if (node && typeof node === "object" && "__metadata" in node) { - const candidate = getMetadataLazy(node.__metadata) - if (candidate) { - metadata = candidate - if (candidate.options && candidate.options.length > 0) { - break - } - } - } - } - - const normalized = normalizeOptions(metadata?.options) - return { - options: normalized.length > 0 ? normalized : FALLBACK_OPTIONS, - label: DEFAULT_LABEL, - } - }, [prompts]) - - const dropdownOptions = useMemo( - () => - options.map((option) => ({ - key: option.value, - value: option.value, - label: option.label, - })), - [options], - ) - - const currentOption = useMemo( - () => options.find((option) => option.value === format), - [options, format], - ) - - const displayValue = useMemo(() => { - const optionLabel = currentOption?.label || format - return `${label}: ${optionLabel}` - }, [currentOption?.label, format, label]) - - return ( - setFormat(nextValue as PromptTemplateFormat)} - placeholder={label} - className={clsx( - "mt-2 border border-[#bdc7d1] h-[24px]", - "transition-all duration-200 ease-in-out", - "hover:!bg-transparent hover:!border-[#394857]", - disabled && "opacity-50 cursor-not-allowed", - )} - description={label} - withTooltip={false} - disabled={disabled} - /> - ) -} - -export default TemplateFormatSelector diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ToolsRenderer.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ToolsRenderer.tsx deleted file mode 100644 index 1ed98a6e82..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/assets/ToolsRenderer.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React, {useMemo} from "react" - -import deepEqual from "fast-deep-equal" - -import {getPromptById, getArrayVal} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" - -import PlaygroundVariantPropertyControl from "../../PlaygroundVariantPropertyControl" - -interface Props { - variantId: string - compoundKey: string - viewOnly?: boolean -} - -const ToolsRenderer: React.FC = ({variantId, compoundKey, viewOnly}) => { - const [, promptId] = compoundKey.split(":", 2) - - const prompts = usePromptsSource(variantId) - const toolIds = useMemo(() => { - const item = getPromptById(prompts, promptId) - const llm = (item?.llmConfig ?? item?.llm_config) as any - const tools = getArrayVal(llm?.tools) - return tools.map((t: any) => t?.__id).filter(Boolean) - }, [prompts, promptId]) - - return ( - <> - {(toolIds || [])?.map((toolId) => ( -
- -
- ))} - - ) -} - -export default ToolsRenderer diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/index.tsx index f82e51d6ca..6b5ff63718 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/index.tsx @@ -3,6 +3,8 @@ import {useMemo, useRef} from "react" import {Collapse} from "antd" import clsx from "clsx" +import {componentLogger} from "../../assets/utilities/componentLogger" + import PlaygroundVariantConfigPromptCollapseContent from "./assets/PlaygroundVariantConfigPromptCollapseContent" import PlaygroundVariantConfigPromptCollapseHeader from "./assets/PlaygroundVariantConfigPromptCollapseHeader" import {useStyles} from "./styles" @@ -31,12 +33,12 @@ const PlaygroundVariantConfigPrompt: React.FC { const defaultActiveKey = useRef(["1"]) const classes = useStyles() + componentLogger("PlaygroundVariantConfigPrompt", variantId, promptId) + const items = useMemo( () => [ { @@ -50,7 +52,6 @@ const PlaygroundVariantConfigPrompt: React.FC ), @@ -58,12 +59,11 @@ const PlaygroundVariantConfigPrompt: React.FC ), }, ], - [variantId, promptId, viewOnly], + [variantId, promptId], ) return ( @@ -73,7 +73,6 @@ const PlaygroundVariantConfigPrompt: React.FC ) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/types.d.ts index e31ee27bec..61a7ab8b25 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantConfigPrompt/types.d.ts @@ -8,8 +8,6 @@ export interface PlaygroundVariantConfigPromptComponentProps extends CollapsePro variantId: string /** Unique identifier for the prompt being configured */ promptId: string - /** Whether the prompt is mutable or view only */ - viewOnly?: boolean } /** @@ -19,8 +17,6 @@ export interface PromptCollapseContentProps extends BaseContainerProps { /** ID of the variant being configured */ variantId: EnhancedVariant["id"] promptId: string - /** Whether the prompt is mutable or view only */ - viewOnly?: boolean } /** @@ -31,6 +27,4 @@ export interface PromptCollapseHeaderProps extends BaseContainerProps { variantId: string /** ID of the prompt being configured */ promptId: string - /** Whether the prompt is mutable or view only */ - viewOnly?: boolean } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantCustomProperties/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantCustomProperties/index.tsx index 7991526ae3..9195d62f8d 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantCustomProperties/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantCustomProperties/index.tsx @@ -1,20 +1,12 @@ -import {memo, useCallback, useEffect, useMemo} from "react" +import {useCallback, memo, useMemo} from "react" import {Collapse, Typography} from "antd" import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {atom, getDefaultStore, useAtomValue, useSetAtom} from "jotai" -import {selectAtom} from "jotai/utils" -import {getMetadataLazy, metadataAtom} from "@/oss/lib/hooks/useStatelessVariants/state" -import { - customPropertiesByRevisionAtomFamily, - customPropertyIdsByRevisionAtomFamily, -} from "@/oss/state/newPlayground/core/customProperties" - -import {parameterUpdateMutationAtom} from "../../state/atoms/propertyMutations" +import type {EnhancedVariant} from "../../../../lib/shared/variant/transformer/types" +import usePlayground from "../../hooks/usePlayground" import {useStyles} from "../PlaygroundVariantConfigPrompt/styles" -import {renderMap} from "../PlaygroundVariantPropertyControl/assets/helpers" +import PlaygroundVariantPropertyControl from "../PlaygroundVariantPropertyControl" import type {PlaygroundVariantCustomPropertiesProps} from "./types" @@ -35,94 +27,19 @@ import type {PlaygroundVariantCustomPropertiesProps} from "./types" const {Text} = Typography -const PlaygroundVariantCustomProperty = memo( - ({variantId, viewOnly, id, customPropsRecord}: PlaygroundVariantCustomPropertyProps) => { - const propertyAtom = useMemo(() => { - return customPropsRecord - ? atom(() => customPropsRecord[id]) - : selectAtom( - customPropertiesByRevisionAtomFamily(variantId), - (state) => state[id], - deepEqual, - ) - }, [variantId, id, customPropsRecord]) - const customProperty = useAtomValue(propertyAtom) - const updateParam = useSetAtom(parameterUpdateMutationAtom) - - const propertyMetadataAtom = useMemo(() => { - return selectAtom(metadataAtom, (state) => state[customProperty?.__metadata], deepEqual) - }, [customProperty]) - - const meta = useAtomValue(propertyMetadataAtom, { - store: getDefaultStore(), - }) - - const type: string | undefined = (meta && (meta as any).type) || undefined - const renderer = type ? (renderMap as any)[type as keyof typeof renderMap] : undefined - - const handleChange = useCallback( - (newValue: any, _arg?: any, subPropertyId?: string) => { - const pid = subPropertyId || (customProperty as any)?.__id - if (process.env.NODE_ENV === "development") { - console.debug("[CustomProps][Mut][UI]", { - variantId, - propertyId: pid, - newValue, - }) - } - updateParam({ - event: newValue, - propertyId: pid, - variantId, - }) - }, - [variantId, updateParam], - ) - - if (!customProperty) { - return null - } - - if (renderer) { - const key = - (customProperty?.__test || (customProperty as any))?.__id || - String(meta?.title || Math.random()) - return ( -
- {renderer({ - withTooltip: true, - metadata: meta, - key: customProperty?.__test, - value: (customProperty as any)?.value, - disabled: viewOnly, - propertyId: (customProperty as any)?.__id, - variantId, - handleChange: handleChange, - })} -
- ) - } - return Unknown type - }, -) - const PlaygroundVariantCustomProperties: React.FC = ({ variantId, className, initialOpen, - viewOnly = false, - customPropsRecord: providedCustomProps, }) => { const classes = useStyles() - const updateParam = useSetAtom(parameterUpdateMutationAtom) - - // Derive custom properties from spec + saved params using new selector - const atomCustomPropertyIds = useAtomValue(customPropertyIdsByRevisionAtomFamily(variantId)) - const customPropertyIds = useMemo(() => { - return providedCustomProps ? Object.keys(providedCustomProps) : atomCustomPropertyIds - }, [providedCustomProps, atomCustomPropertyIds]) - - const hasCustomProperties = customPropertyIds.length > 0 + const {customProperties, hasCustomProperties} = usePlayground({ + variantId, + variantSelector: useCallback((variant: EnhancedVariant) => { + const customProperties = Object.values(variant?.customProperties || {}) + return {customProperties, hasCustomProperties: Object.keys(customProperties).length > 0} + }, []), + }) const items = useMemo(() => { return hasCustomProperties @@ -154,14 +71,13 @@ const PlaygroundVariantCustomProperties: React.FC - {customPropertyIds.map((customPropertyId) => { + {customProperties.map((customProperty) => { return ( - ) })} @@ -170,15 +86,7 @@ const PlaygroundVariantCustomProperties: React.FC> } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/ModelConfigModal.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/ModelConfigModal.tsx index 5e92bfc085..86a664e8eb 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/ModelConfigModal.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/ModelConfigModal.tsx @@ -1,8 +1,5 @@ import {memo, useCallback, type MouseEvent} from "react" -import {getLLMConfig, getPromptById} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" - import PlaygroundVariantPropertyControl from "../../PlaygroundVariantPropertyControl" import type {PlaygroundVariantModelConfigModalProps, ModelConfigModalContentProps} from "../types" @@ -43,93 +40,21 @@ const ModalContent: React.FC = ({ const ModelConfigModal: React.FC = ({ variantId, propertyIds, - disabled, - promptId, }) => { const preventClickBubble = useCallback((e: MouseEvent) => { e.preventDefault() e.stopPropagation() }, []) - // Always compute raw llm_config as a safety net (for provider-driven renders) - const prompts = usePromptsSource(variantId) - const llm = getLLMConfig(getPromptById(prompts, String(promptId))) || {} - const pickVal = (v: any) => - typeof v === "object" && v && "value" in (v as any) ? (v as any).value : v - const rows: [string, any][] = [] - - // Include common knobs explicitly (shown in Playground modal) - const KNOBS = [ - "temperature", - "topP", - "presencePenalty", - "frequencyPenalty", - "maxTokens", - "stream", - // keep others if present - ] as const - KNOBS.forEach((k) => { - const val = pickVal((llm as any)?.[k as any]) - if (val !== undefined && val !== null) rows.push([String(k), val]) - }) - - // Response format summary - const rf = (llm as any)?.response_format || (llm as any)?.responseFormat - if (rf) { - const t = typeof rf === "object" && rf ? rf.type || pickVal((rf as any).type) : String(rf) - let label = "text" - if (t === "json_object") label = "json_object" - else if (t === "json_schema") label = "json_schema" - else if (t && typeof t === "string") label = t - rows.push(["responseFormat", label]) - } - - // Fallback: include any other primitive knob not starting with __ and not complex objects - Object.entries(llm).forEach(([k, v]) => { - if (k.startsWith("__")) return - if (["tools", "toolChoice", "responseFormat", "model"].includes(k)) return - const val = pickVal(v) - if (typeof val !== "object" && val !== undefined && val !== null) { - if (!rows.find(([kk]) => kk === k)) rows.push([k, val]) - } - }) - - // If no enhanced property ids are available, show a clean read-only list - if (!propertyIds || propertyIds.length === 0) { - return ( - - {rows.length > 0 ? ( -
- {rows.map(([k, v]) => ( -
- {String(k)} - {String(v)} -
- ))} -
- ) : ( -
- No model configuration properties available -
- )} -
- ) - } - - // Render actual model controls (disabled only affects interaction, not visibility) return ( - {(propertyIds || []).map((propertyId, idx) => { + {propertyIds.map((propertyId) => { return ( ) })} diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/PlaygroundVariantModelConfigTitle.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/PlaygroundVariantModelConfigTitle.tsx index 2268435677..6a64297513 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/PlaygroundVariantModelConfigTitle.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/assets/PlaygroundVariantModelConfigTitle.tsx @@ -23,7 +23,6 @@ import type {PlaygroundVariantModelConfigTitleProps} from "../types" const PlaygroundVariantModelConfigTitle: React.FC = ({ handleReset, className, - disabled, ...props }) => { return ( @@ -35,9 +34,7 @@ const PlaygroundVariantModelConfigTitle: React.FC Model Parameters - + ) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/index.tsx index 6b2c84e2e7..b1e158a0c9 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/index.tsx @@ -1,18 +1,18 @@ -import {memo, useState, useCallback, useMemo} from "react" +import {memo, useState, useCallback} from "react" import {CaretDown} from "@phosphor-icons/react" import {Button, Popover} from "antd" -import {getPromptById, getLLMConfig} from "@/oss/components/Playground/context/promptShape" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" import {getEnhancedProperties} from "@/oss/lib/shared/variant" +import type {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" + +import {componentLogger} from "../../assets/utilities/componentLogger" +import usePlayground from "../../hooks/usePlayground" import ModelConfigModal from "./assets/ModelConfigModal" import PlaygroundVariantModelConfigTitle from "./assets/PlaygroundVariantModelConfigTitle" import type {PlaygroundVariantModelConfigProps} from "./types" -// Deprecated local selector: replaced by direct computation from unified prompts source - /** * PlaygroundVariantModelConfig Component * @@ -38,92 +38,98 @@ const PlaygroundVariantModelConfig: React.FC variantId, promptId, className, - viewOnly, ...popoverProps // Collect remaining props for Popover }) => { - // Compute model config from unified prompts source (provider-aware) - const prompts = usePromptsSource(variantId) - const {propertyIds, modelPropertyId, resolvedModelName} = useMemo(() => { - const prompt = getPromptById(prompts, promptId) - const llm = getLLMConfig(prompt) || {} - const properties = - getEnhancedProperties(llm, ["tools", "toolChoice", "responseFormat", "stream"]) || [] - const ids = properties.map((p: any) => p?.__id).filter(Boolean) - - // Prefer enhanced model value; fallback to raw string - const name = - (llm?.model && - (llm.model.value ?? (typeof llm.model === "string" ? llm.model : undefined))) || - undefined - - return { - propertyIds: ids, - modelPropertyId: llm?.model?.__id, - resolvedModelName: name, - } - }, [prompts, promptId]) - - // Reset no-op for now (mutation removed). Kept to avoid UI breakage. + const variantSelector = useCallback( + (variant: EnhancedVariant) => { + const prompt = (variant.prompts || []).find((p) => p.__id === promptId) + const llmConfig = prompt?.llmConfig + + const properties = + getEnhancedProperties(llmConfig, [ + "tools", + "toolChoice", + "responseFormat", + "stream", + ]) || [] + + return { + propertyIds: properties.map((p) => p.__id), + modelName: llmConfig?.model?.value, + } + }, + [promptId], + ) + + const {propertyIds, modelName, mutateVariant} = usePlayground({ + variantId, + hookId: "PlaygroundVariantModelConfig", + variantSelector, + }) // Local state for modal visibility const [isModalOpen, setIsModalOpen] = useState(false) - // Keep click noop to let Popover's onOpenChange manage visibility + componentLogger("PlaygroundVariantModelConfig", variantId, promptId, propertyIds, modelName) + const handleModalOpen = useCallback((e?: React.MouseEvent): void => { e?.preventDefault() e?.stopPropagation() }, []) - const handleResetDefaults = useCallback(() => { - if (!variantId || !promptId || !propertyIds || propertyIds.length === 0) { - console.warn("[RESET-SIMPLE] ⚠️ Missing required parameters for reset") - return - } - }, [variantId, promptId, propertyIds]) + const handleResetDefaults = useCallback(async () => { + mutateVariant?.((variant) => { + const prompt = variant?.prompts.find((p) => p.__id === promptId) + const llmConfig = prompt?.llmConfig + // @ts-ignore + const params = + variant.parameters?.agConfig || variant.parameters?.ag_config || variant.parameters + + const resetModelName = params?.prompt.llm_config?.model //TODO: Check this @ardaerzin - const displayModel = resolvedModelName ?? "Choose a model" - const canOpen = (propertyIds?.length || 0) > 0 + if (!llmConfig) return variant + + const {model, ...restOfConfig} = llmConfig + + const properties = + getEnhancedProperties(restOfConfig, [ + "tools", + "toolChoice", + "responseFormat", + "stream", + ]) || [] + + properties.forEach((property) => { + property.value = null + }) + + if (model.value !== resetModelName) { + llmConfig.model.value = resetModelName + } + + return variant + }) + }, [variantId]) return ( { - if (viewOnly) { - setIsModalOpen(false) - return - } - setIsModalOpen(open) - } - : undefined - } - classNames={{ - root: "w-full max-w-[300px]", - }} - destroyOnHidden + open={isModalOpen} + onOpenChange={setIsModalOpen} + overlayClassName="w-full max-w-[300px]" trigger={["click"]} placement="bottomRight" arrow={false} - title={ - - } + title={} content={ - + isModalOpen ? ( + + ) : null } className={className} > - ) diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/types.d.ts index c8fced62fc..c13d94ab80 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantModelConfig/types.d.ts @@ -18,9 +18,6 @@ export interface PlaygroundVariantModelConfigModalProps extends BaseContainerPro variantId: EnhancedVariant["id"] /** List of configurable model properties */ propertyIds: string[] - disabled?: boolean - /** Optional: prompt id for read-only fallback rendering */ - promptId?: EnhancedVariant["prompts"][number]["id"] | string } /** @@ -50,8 +47,6 @@ export interface PlaygroundVariantModelConfigProps extends PopoverProps { variantId: EnhancedVariant["id"] /** ID of the prompt being configured */ promptId: EnhancedVariant["prompts"][number]["id"] - /** Whether the component is in view-only mode or in mutable mode */ - viewOnly?: boolean } export interface PlaygroundVariantModelConfigTitleProps extends BaseContainerProps { diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/MultiSelectControl/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/MultiSelectControl/index.tsx index 2f9a4cffd4..dddf36fe69 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/MultiSelectControl/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/MultiSelectControl/index.tsx @@ -96,7 +96,7 @@ const SelectControl = ({ placeholder={mode === "multiple" ? "Select multiple" : "Select one"} {...rest} /> - {value?.length && allowClear ? ( + {value?.length || allowClear ? ( - ) : null} - - )} - {!isReadOnly ? ( - { - setModalState(false) - }} - classNames={{ - content: "max-h-[80dvh] overflow-hidden flex flex-col", - body: "flex flex-col grow shrink-1 overflow-y-auto", - }} - onOk={saveChanges} + + {correctedStructuredOutput?.name ? ( + ) : null} + { + setModalState(false) + setStructuredOutputState(schema || structuredOutputState) + }} + classNames={{ + content: "max-h-[80dvh] overflow-hidden flex flex-col", + body: "flex flex-col grow shrink-1 overflow-y-auto", + }} + onOk={saveChanges} + > + + Define the JSON schema for the structured output of the prompt:{" "} + {promptName || "no name"} + + +
+ +
+
+
+
) } -const PlaygroundOutputControlWrapper = (props: { - className?: string - children: React.ReactNode - withTooltip: boolean - promptName: string - metadata: CompoundMetadata - handleChange: (v: any, event?: any, propertyId?: string | undefined) => void - value: any -}) => { +const PlaygroundOutputControlWrapper = (props: {className?: string; children: React.ReactNode}) => { return ( - + ) diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PlaygroundVariantPropertyControlWrapper.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PlaygroundVariantPropertyControlWrapper.tsx index 629fa395c5..c6ab809fdb 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PlaygroundVariantPropertyControlWrapper.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PlaygroundVariantPropertyControlWrapper.tsx @@ -5,7 +5,6 @@ import clsx from "clsx" const PlaygroundVariantPropertyControlWrapper = ({ className, children, - viewOnly, ...props }: HTMLProps) => { return ( diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/components/ImageWithFallback.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/components/ImageWithFallback.tsx deleted file mode 100644 index 67708851d5..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/components/ImageWithFallback.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import {useState, useEffect} from "react" - -import {ImageBroken} from "@phosphor-icons/react" - -interface ImageWithFallbackProps extends React.ImgHTMLAttributes { - fallback?: React.ReactNode -} - -const ImageWithFallback = ({src, alt, fallback, ...props}: ImageWithFallbackProps) => { - const [hasError, setHasError] = useState(false) - - useEffect(() => { - setHasError(false) - }, [src]) - - if (!src || hasError) { - return fallback ?? - } - - return {alt} setHasError(true)} {...props} /> -} - -export default ImageWithFallback diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/helpers.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/helpers.ts deleted file mode 100644 index 8e8f9e8566..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/helpers.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const isValidImageUrl = (value: string): boolean => { - try { - const isHttp = value.startsWith("http://") || value.startsWith("https://") - const isDataUrl = /^data:image\/(png|jpeg|webp|gif);base64,/.test(value) - return isHttp || isDataUrl - } catch { - return false - } -} diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/styles.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/styles.ts deleted file mode 100644 index 40895139d7..0000000000 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/assets/styles.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {createUseStyles} from "react-jss" - -import {JSSTheme} from "@/oss/lib/Types" - -export const useStyles = createUseStyles((theme: JSSTheme) => ({ - uploadDragger: { - width: "100%", - border: "1px dashed #BDC7D1", - display: "flex", - alignItems: "center", - gap: 16, - "& .ant-upload-drag": { - background: "transparent", - border: "none", - }, - "& .ant-upload-btn": { - padding: "0 !important", - }, - }, -})) diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/index.tsx index a56362a635..24debf7d3c 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/index.tsx @@ -1,227 +1,25 @@ -import {useEffect, useRef, useState} from "react" +import {Image, Trash} from "@phosphor-icons/react" +import {Button, Typography, Upload} from "antd" -import {LoadingOutlined, MinusCircleOutlined} from "@ant-design/icons" -import {Image as ImageIcon} from "@phosphor-icons/react" -import {Button, Input, Progress, Spin, Typography, Upload} from "antd" -import clsx from "clsx" - -import ImagePreview from "@/oss/components/Common/ImagePreview" -import {generateId} from "@/oss/lib/shared/variant/stringUtils" - -import {isValidImageUrl} from "./assets/helpers" -import {useStyles} from "./assets/styles" import {PromptImageUploadProps} from "./types" -const {Dragger} = Upload - -const MAX_SIZE = 750 * 1024 -const ALLOWED_TYPES = ["image/jpeg", "image/png", "image/webp", "image/gif"] - -const PromptImageUpload = ({ - disabled, - handleRemoveUploadFile, - handleUploadFileChange, - imageFile, -}: PromptImageUploadProps) => { - const classes = useStyles() - const uploadRef = useRef(null) - - const [urlInput, setUrlInput] = useState("") - const [error, setError] = useState("") - const [isValidPreview, setIsValidPreview] = useState(false) - const status = error ? "error" : imageFile?.status || "" - - const triggerUpload = (e: React.MouseEvent) => { - e.stopPropagation() - uploadRef.current?.click() - } - - const validateUrlInput = (val: string) => { - if (!val) { - setError("") - setIsValidPreview(false) - return - } - - if (!isValidImageUrl(val)) { - setError("Invalid URL format.") - setIsValidPreview(false) - return - } - - const img = new Image() - img.src = val - - img.onload = () => { - setError("") - setIsValidPreview(true) - - handleUploadFileChange({ - uid: `url-${generateId()}`, - name: val, - status: "done", - url: val, - thumbUrl: val, - originFileObj: undefined, - type: "external/url", - }) - } - - img.onerror = () => { - setIsValidPreview(false) - setError("Preview failed due to CORS or invalid image URL.") - } - } - - useEffect(() => { - if (imageFile?.thumbUrl && !urlInput && !isValidPreview) { - setUrlInput(imageFile.thumbUrl) - } - }, [imageFile?.thumbUrl]) - - useEffect(() => { - validateUrlInput(urlInput) - }, [urlInput]) - - const handleFile = (file: File) => { - if (!ALLOWED_TYPES.includes(file.type)) { - setError("Unsupported image format. Use JPEG, PNG, WebP, or GIF.") - return - } - - if (file.size > MAX_SIZE) { - setError("Image size must be less than 750KB.") - return - } - - const reader = new FileReader() - reader.onload = () => { - const previewUrl = URL.createObjectURL(file) - - handleUploadFileChange({ - uid: generateId(), - name: file.name, - status: "done", - originFileObj: file as any, - base64: reader.result, - thumbUrl: previewUrl, - type: file.type, - size: file.size, - }) - - setUrlInput(reader.result as string) - setError("") - } - reader.onerror = () => setError("Failed to read file.") - reader.readAsDataURL(file) - } - - const handleFileInputChange = (e: React.ChangeEvent) => { - const file = e.target.files?.[0] - if (file) handleFile(file) - } - - const handleBeforeUpload = (file: File) => { - handleFile(file) - return false - } - - const renderUnified = () => { - const isUploading = status === "uploading" - - return ( -
- {isUploading ? ( - } /> - ) : isValidPreview ? ( - - ) : ( - - )} - -
- - Drag an image here or{" "} - - - - {!isUploading && ( - { - setUrlInput(e.target.value) - setError("") - }} - type="url" - /> - )} - - {isUploading && ( - - )} - - {error && ( - {error} - )} -
-
- ) - } - +const PromptImageUpload = ({...props}: PromptImageUploadProps) => { return ( - <> - - - -
- {renderUnified()} -
+ ) } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/types.d.ts index f50dbeda02..b9e1bf2798 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptImageUpload/types.d.ts @@ -1,8 +1,3 @@ -import {type UploadFile} from "antd" +import {UploadProps} from "antd" -export interface PromptImageUploadProps { - disabled?: boolean - handleUploadFileChange: (file: UploadFile | null) => void - handleRemoveUploadFile: () => void - imageFile?: UploadFile -} +export interface PromptImageUploadProps extends UploadProps {} diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions.tsx index d6b739386a..82e7fccabf 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions.tsx @@ -1,36 +1,17 @@ import {useCallback, memo, useState} from "react" -import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext" -import { - MinusCircle, - Copy, - Check, - ArrowClockwise, - CaretDown, - CaretUp, - Image as PhImage, - MarkdownLogoIcon, - TextAa, -} from "@phosphor-icons/react" +import {MinusCircle, Copy, Check, ArrowClockwise, CaretDown, CaretUp} from "@phosphor-icons/react" import clsx from "clsx" -import {useAtom, useAtomValue} from "jotai" -import {TOGGLE_MARKDOWN_VIEW} from "@/oss/components/Editor/plugins/markdown/commands" -import {markdownViewAtom} from "@/oss/components/Editor/state/assets/atoms" -import {getTextContent} from "@/oss/components/Playground/adapters/TurnMessageHeaderOptions" import EnhancedButton from "@/oss/components/Playground/assets/EnhancedButton" -import {usePromptsSource} from "@/oss/components/Playground/context/PromptsSource" -import {findPropertyInObject} from "@/oss/components/Playground/hooks/usePlayground/assets/helpers" -import {appChatModeAtom} from "@/oss/components/Playground/state/atoms" +import usePlayground from "@/oss/components/Playground/hooks/usePlayground" import TestsetDrawerButton from "../../../../Drawers/TestsetDrawer" import type {PromptMessageContentOptionsProps} from "./types" const PromptMessageContentOptions = ({ - id, messageId, - variantId, className, propertyId, isMessageDeletable, @@ -39,26 +20,14 @@ const PromptMessageContentOptions = ({ minimized, children, resultHashes, - allowFileUpload, - uploadCount, - viewOnly, - hideMarkdownToggle, }: PromptMessageContentOptionsProps) => { - const [editor] = useLexicalComposerContext() - const [markdownView] = useAtom(markdownViewAtom(id)) - - const prompts = usePromptsSource(variantId) || [] - const message = findPropertyInObject(prompts, propertyId) - - const isChat = useAtomValue(appChatModeAtom) ?? false - - const {deleteMessage, rerunMessage, minimize, onClickTestsetDrawer, handleAddUploadSlot} = - actions || {} + const {propertyGetter} = usePlayground() + const {deleteMessage, rerunMessage, minimize, onClickTestsetDrawer} = actions || {} const [isCopied, setIsCopied] = useState(false) const onCopyText = useCallback(() => { - const text = getTextContent(message?.value) + const text = propertyGetter?.(propertyId)?.value if (text) { setIsCopied(true) @@ -67,7 +36,7 @@ const PromptMessageContentOptions = ({ setIsCopied(false) }, 1000) } - }, [message]) + }, [propertyId]) return (
@@ -75,17 +44,14 @@ const PromptMessageContentOptions = ({ } type="text" - onClick={() => { - rerunMessage?.(messageId) - }} - disabled={!resultHashes || resultHashes.length === 0} + onClick={() => rerunMessage?.(messageId)} tooltipProps={{title: "Re-run"}} /> ) : null} {resultHashes && resultHashes?.length > 0 ? ( ) : null} - {isChat && allowFileUpload ? ( - } - type="text" - onClick={() => handleAddUploadSlot?.()} - tooltipProps={{title: "Upload Image"}} - disabled={uploadCount !== undefined && uploadCount >= 5} - /> - ) : null} - : } type="text" @@ -110,36 +66,20 @@ const PromptMessageContentOptions = ({ tooltipProps={{title: isCopied ? "Copied" : "Copy"}} /> - {!hideMarkdownToggle && ( - : } - type="text" - onClick={() => editor.dispatchCommand(TOGGLE_MARKDOWN_VIEW, undefined)} - tooltipProps={{ - title: !markdownView ? "Preview text" : "Preview markdown", - }} - /> - )} - - {!viewOnly && ( - } - type="text" - onClick={() => { - console.log("delete message", messageId) - deleteMessage?.(messageId) - }} - disabled={!isMessageDeletable} - tooltipProps={{title: "Remove"}} - /> - )} + } + type="text" + onClick={() => deleteMessage?.(messageId)} + disabled={isMessageDeletable} + tooltipProps={{title: "Remove"}} + /> : } + icon={minimized ? : } type="text" onClick={() => minimize?.(messageId)} - disabled={disabled} - tooltipProps={{title: minimized ? "Minimize" : "Maximize"}} + disabled={isMessageDeletable} + tooltipProps={{title: "Minimize"}} /> {children} diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/types.d.ts index dbf0ea3075..6182797453 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/types.d.ts @@ -12,13 +12,7 @@ export interface PromptMessageContentOptionsProps { rerunMessage?: (messageId: string) => void onClickTestsetDrawer?: (messageId?: string) => void minimize?: (messageId?: string) => void - handleAddUploadSlot?: () => void } resultHashes?: (TestResult | string | null | undefined)[] children?: React.ReactNode - allowFileUpload?: boolean - uploadCount?: number - hideMarkdownToggle?: boolean - /** Whether the component is in view-only mode or in mutable mode */ - viewOnly?: boolean } diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleInput/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleInput/index.tsx index 425f2bad69..7445217a44 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleInput/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/SimpleInput/index.tsx @@ -1,4 +1,4 @@ -import {ChangeEvent, memo, useCallback} from "react" +import {ChangeEvent, useCallback} from "react" import {Input} from "antd" @@ -29,12 +29,19 @@ const SimpleInput = ({ const [localValue, setLocalValue] = useDebounceInput(value, onChange, 300, "") const handleLocalValueChange = useCallback( - (event: ChangeEvent) => { - setLocalValue(event.target.value) + (value: ChangeEvent) => { + setLocalValue(value.target.value) }, [setLocalValue], ) + const change = useCallback( + (value: string) => { + onChange(value) + }, + [onChange], + ) + if (as === "SimpleInputWithLabel") { return ( { - const {isComparisonView} = usePlaygroundLayout() - const viewType = isComparisonView ? "comparison" : "single" + const {viewType} = usePlayground() if (viewType === "single" && view !== "focus") { return ( diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/helpers.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/helpers.tsx index f85644a375..1c316f3589 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/helpers.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/assets/helpers.tsx @@ -4,8 +4,6 @@ import dynamic from "next/dynamic" import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" import {EnhancedConfigValue} from "@/oss/lib/shared/variant/genericTransformer/types" -import {findPropertyInObject} from "../../../hooks/usePlayground/assets/helpers" - import PlaygroundTool from "../../PlaygroundTool" import {ArrayItemValue, RenderFunctions} from "../types" @@ -22,81 +20,18 @@ import TextControl from "./TextControl" const SelectLLMProvider = dynamic(() => import("@/oss/components/SelectLLMProvider"), {ssr: false}) -const derivePlainValue = (node: any): any => { - if (node === null || node === undefined) return node - if (Array.isArray(node)) { - return node.map((item) => derivePlainValue(item)) - } - - if (typeof node !== "object") { - return node - } - - const rawValue = (node as any).value - - if (Array.isArray(rawValue)) { - return rawValue.map((item: any) => derivePlainValue(item)) - } - - const plainChildren: Record = {} - for (const [key, value] of Object.entries(node)) { - if (key === "value" || key.startsWith("__")) continue - plainChildren[key] = derivePlainValue(value) - } - - if (Object.keys(plainChildren).length > 0) { - return plainChildren - } - - if (rawValue !== undefined) { - return rawValue - } - - return node -} - -const cloneEnhanced = (value: T): T => { - if (typeof structuredClone === "function") { - return structuredClone(value) - } - - return JSON.parse(JSON.stringify(value)) -} - const updateArrayItem = ( array: EnhancedConfigValue[], id: string, newValue: any, - handleChange: (v: any, event?: any, propertyId?: string) => void, - targetPropertyId?: string, + handleChange: (v: any) => void, ) => { const newArray = [...array] const index = array.findIndex((v) => v.__id === id) - if (index === -1) return - - if (targetPropertyId) { - const itemClone = cloneEnhanced(newArray[index]) - const targetNode = findPropertyInObject(itemClone, targetPropertyId) - - if (targetNode && typeof targetNode === "object") { - if ("content" in targetNode && targetNode.content && "value" in targetNode.content) { - ;(targetNode.content as any).value = newValue - } else if ("value" in targetNode) { - ;(targetNode as any).value = newValue - } - - if ("value" in itemClone) { - ;(itemClone as any).value = derivePlainValue(itemClone) - } - - newArray[index] = itemClone - handleChange({value: newArray}, undefined, targetPropertyId) - return - } + if (index !== -1) { + newArray[index] = {...newArray[index], value: newValue} + handleChange({value: newArray}) } - - newArray[index] = {...newArray[index], value: newValue} - handleChange({value: newArray}) } export const renderMap: RenderFunctions = { @@ -184,7 +119,7 @@ export const renderMap: RenderFunctions = { if (as === "SimpleDropdownSelect") { return ( { - const {disabled, withTooltip, metadata, value, handleChange} = props + array: ({disabled, withTooltip, metadata, value, handleChange}) => { if (!Array.isArray(value?.value)) { return null } @@ -363,30 +297,6 @@ export const renderMap: RenderFunctions = { })}
) - case "object": - return ( -
- {renderMap.object({ - ...props, - metadata, - value: item.value, - baseProperty: item, - handleChange: ( - newValue: any, - event?: any, - targetPropertyId?: string, - ) => { - updateArrayItem( - value.value, - item.__id, - newValue, - handleChange, - targetPropertyId, - ) - }, - })} -
- ) default: return null } @@ -400,24 +310,9 @@ export const renderMap: RenderFunctions = { const objectProperties = metadata.properties const withTooltip = props.withTooltip const baseProperty = props.baseProperty - if (metadata.name === "ToolConfiguration") { - const {handleChange, editorProps, variantId, baseProperty, disabled, value} = - props as any - return ( - - ) - } - - return ( + return metadata.name === "ToolConfiguration" ? ( + + ) : (
{withTooltip ? ( diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/index.tsx index 7c1681f0af..41b65eb3f2 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/index.tsx @@ -1,32 +1,22 @@ import {memo, useMemo} from "react" import {Typography} from "antd" -import deepEqual from "fast-deep-equal" -import {atom, useAtomValue, useSetAtom} from "jotai" -import { - getMetadataLazy, - metadataSelectorFamily, - metadataAtom, -} from "@/oss/lib/hooks/useStatelessVariants/state" -import {customPropertiesByRevisionAtomFamily} from "@/oss/state/newPlayground/core/customProperties" -import {promptsAtomFamily} from "@/oss/state/newPlayground/core/prompts" -import {getEnhancedRevisionById} from "@/oss/state/variant/atoms/fetcher" +import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" -import {usePromptsSource} from "../../context/PromptsSource" -import {findPropertyInObject, findPropertyById} from "../../hooks/usePlayground/assets/helpers" -import { - // updateGenerationDataPropertyMutationAtom, - promptPropertyAtomFamily, -} from "../../state/atoms" +import type { + Enhanced, + EnhancedObjectConfig, +} from "../../../../lib/shared/variant/genericTransformer/types" +import type {EnhancedVariant} from "../../../../lib/shared/variant/transformer/types" +import {componentLogger} from "../../assets/utilities/componentLogger" +import usePlayground from "../../hooks/usePlayground" +import {findPropertyInObject} from "../../hooks/usePlayground/assets/helpers" +import {findPropertyById} from "../../hooks/usePlayground/middlewares/playgroundVariantMiddleware" import {renderMap} from "./assets/helpers" import type {PlaygroundVariantPropertyControlProps} from "./types" -const nullValueAtom = atom(null) -const nullMetadataAtom = atom(null) -const noopWriteAtom = atom(null, () => {}) - // TODO: RENAME TO PlaygroundPropertyControl const PlaygroundVariantPropertyControl = ({ propertyId, @@ -35,7 +25,6 @@ const PlaygroundVariantPropertyControl = ({ as, view, rowId, - messageId, withTooltip, value: propsValue, disabled, @@ -43,263 +32,120 @@ const PlaygroundVariantPropertyControl = ({ placeholder, ...rest }: PlaygroundVariantPropertyControlProps): React.ReactElement | null => { - // Get the actual variant ID - const actualVariantId = useMemo( - () => (typeof variantId === "object" ? (variantId as any).id : variantId), - [variantId], - ) - - // ATOM-LEVEL: compute selector atoms (stable via useMemo), no conditional hooks - const propertyValueAtom = useMemo(() => { - if (!propertyId) return nullValueAtom - // Prompt-only: find property in prompts or custom properties for the given revision - return atom((get) => { - const revIdForPrompts = actualVariantId - if (revIdForPrompts) { - const prompts = get(promptsAtomFamily(revIdForPrompts)) - const list = (prompts as any[]) || [] - const property = - findPropertyInObject(list, propertyId) || - findPropertyById(list as any, propertyId) - if (property) { - return { - value: (property as any)?.content?.value || (property as any)?.value, - source: "variant" as const, - property, - } as any - } - - // Fallback: try custom properties derived from OpenAPI spec - const variant = getEnhancedRevisionById(get as any, revIdForPrompts) - if (variant) { - const customProps = get(customPropertiesByRevisionAtomFamily(revIdForPrompts)) - const values = Object.values(customProps || {}) as any[] - const node = values.find((n) => n?.__id === propertyId) - if (node) { - return { - value: (node as any)?.content?.value ?? (node as any)?.value, - source: "variant", - property: node, - } as any - } - } - } - return null as any - }) - }, [actualVariantId, propertyId]) - - const propertyMetadataAtom = useMemo(() => { - if (!propertyId) return nullMetadataAtom - return atom((get) => { - const resolveMetadata = (metaRef: any) => { - if (!metaRef) return null - if (typeof metaRef === "string") { - return (get(metadataSelectorFamily(metaRef)) as any) || getMetadataLazy(metaRef) - } - return metaRef - } - - const revIdForPrompts = actualVariantId - if (revIdForPrompts) { - const prompts = get(promptsAtomFamily(revIdForPrompts)) - const list = (prompts as any[]) || [] - const metadataMap = get(metadataAtom) as Record - const property = - findPropertyInObject(list, propertyId) || - findPropertyById(list as any, propertyId) - const propertyMetadata = resolveMetadata(property?.__metadata) - if (propertyMetadata) return propertyMetadata - if (property?.__metadata) { - const meta = metadataMap?.[property.__metadata] - return meta ?? getMetadataLazy(property.__metadata) - } - - // Fallback: custom properties metadata - const variant = getEnhancedRevisionById(get as any, revIdForPrompts) - if (variant) { - const customProps = get(customPropertiesByRevisionAtomFamily(revIdForPrompts)) - const values = Object.values(customProps || {}) as any[] - const node = values.find((n) => n?.__id === propertyId) - const customMetadata = resolveMetadata(node?.__metadata) - if (customMetadata) return customMetadata - if (node?.__metadata) { - const meta = metadataMap?.[node.__metadata] - return meta ?? getMetadataLazy(node.__metadata) - } - } - } - // Synthesize minimal metadata for string inputs when nothing found - return {type: "string", title: propertyId} as any - }) - }, [actualVariantId, propertyId]) - - // Subscribe to unified property data (handles both variant and generation data) - let propertyData = useAtomValue(propertyValueAtom) - let propertyMetadata = useAtomValue(propertyMetadataAtom) - - // Prompts-only write facade for variant updates - const variantPromptWriteAtom = useMemo(() => { - if (!actualVariantId || !propertyId) return noopWriteAtom - return promptPropertyAtomFamily({revisionId: actualVariantId, propertyId}) - }, [actualVariantId, propertyId]) - const setVariantPromptValue = useSetAtom(variantPromptWriteAtom) - - // Provider-aware fallback: if atom lookup misses but provider prompts have the node, synthesize data - const providerPrompts = usePromptsSource(actualVariantId || "") - let providerNode: any = null - if (!propertyData && Array.isArray(providerPrompts) && providerPrompts.length > 0) { - const node = findPropertyInObject(providerPrompts, propertyId) - if (node) { - providerNode = node - propertyData = { - value: (node as any)?.content?.value ?? (node as any)?.value, - source: "variant", - property: node, - } as any - } - } - - if (providerNode && providerNode.__metadata) { - const providerMetadata = getMetadataLazy(providerNode.__metadata) - if (providerMetadata) { - propertyMetadata = providerMetadata - } - } - - const property = useMemo(() => { - if (!propertyData && propertyMetadata) { - return { - __metadata: propertyMetadata, - value: propsValue, - handleChange: (next: any) => { - setVariantPromptValue(next) - }, - } - } - if (!propertyData || !propertyMetadata) return null - - const {value, source} = propertyData - - const handler = (newValue: any, _: any, targetPropertyId?: string) => { - // No-op guard: skip if value hasn't changed to avoid redundant atom writes - - let _value = newValue - // if newValue is instance of change event, then get the value properly - const extractEventValue = (input: any) => { - if (!input || typeof input !== "object") return undefined - const target = (input as any).target ?? (input as any).currentTarget - const candidate = target && typeof target === "object" ? target : null - if (candidate && "value" in candidate) return (candidate as any).value - if ("nativeEvent" in (input as any)) { - const nativeTarget = (input as any)?.nativeEvent?.target - if (nativeTarget && typeof nativeTarget === "object" && "value" in nativeTarget) - return (nativeTarget as any).value - } - return undefined - } - - if (typeof Event !== "undefined" && newValue instanceof Event) { - _value = (newValue as any).target?.value + componentLogger("PlaygroundVariantPropertyControl", variantId, propertyId) + + const { + mutate, + handleParamUpdate: updateVariantProperty, + baseProperty, + } = usePlayground({ + hookId: "PlaygroundVariantPropertyControl", + stateSelector: (state) => { + const object = rowId + ? state.generationData.inputs.value.find((v) => v.__id === rowId) || + (state.generationData.messages.value || []).find((v) => v.__id === rowId) + : variantId + ? state.variants.find((v) => v.id === variantId) + : null + + if (!object) { + return {} } else { - const syntheticVal = extractEventValue(newValue) - if (syntheticVal !== undefined) { - _value = syntheticVal - } + const property = rowId + ? (findPropertyInObject(object, propertyId) as EnhancedObjectConfig) + : (findPropertyById( + object as EnhancedVariant, + propertyId, + ) as EnhancedObjectConfig) + return {baseProperty: property} } + }, + }) - const currentVal = value - const isSame = - typeof _value === "object" && _value !== null - ? deepEqual(_value, currentVal) - : _value === currentVal - - if (isSame) return - - if (source === "variant" && actualVariantId) { - // Use prompts-only facade to route writes through the centralized mutation - setVariantPromptValue(_value) - } - } + const property = useMemo(() => { + if (!baseProperty) return null + + const {__metadata, value} = baseProperty + + const handler = rowId + ? (e: any) => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + const val = + e !== null && e !== undefined + ? typeof e === "object" && "target" in e + ? e.target.value + : e + : null + + const generationData = structuredClone(clonedState.generationData) + const object = + generationData.inputs.value.find((v) => v.__id === rowId) || + generationData.messages.value.find((v) => v.__id === rowId) + + if (!object) { + return clonedState + } + + const property = findPropertyInObject(object, propertyId) as Enhanced + + if (!property) return clonedState + + property.value = val + + clonedState.generationData = generationData + + return clonedState + }, + { + revalidate: false, + }, + ) + } + : (newValue: any, _: any, propertyId?: string) => { + updateVariantProperty?.(newValue, propertyId || baseProperty.__id, variantId) + } return { - __metadata: propertyMetadata && propertyMetadata, // already precomputed metadata + __metadata: getMetadataLazy(__metadata), value, handleChange: handler, } - }, [ - propertyData, - propertyMetadata, - propertyId, - rowId, - actualVariantId, - messageId, - propsValue, - setVariantPromptValue, - ]) - - // Defensive programming: Handle revoked proxy for entire property object - const {metadata, value, handleChange} = useMemo(() => { - try { - if (!property) { - return {metadata: null, value: null, handleChange: null} - } - return { - metadata: property.__metadata, - value: property.value, - handleChange: property.handleChange, - } - } catch (error) { - console.error( - "[PlaygroundVariantPropertyControl] Error accessing property (revoked proxy)", - error, - ) - return {metadata: null, value: null, handleChange: null} - } - }, [property]) + }, [baseProperty, mutate, propertyId, rowId, updateVariantProperty, variantId]) if (!property) { return null } - // Early return if no metadata - if (!metadata) { - return Unable to find metadata for property - } - - const metadataType: string | undefined = (() => { - try { - return (metadata as any)?.type - } catch { - return undefined - } - })() + const {__metadata: metadata, value, handleChange} = property - if (!metadataType) { - return No property type found + if (!metadata) { + return unable to find metadata for property } - const renderer = renderMap[metadataType as keyof typeof renderMap] as + const renderer = renderMap[metadata.type as keyof typeof renderMap] as | ((props: any) => React.ReactElement) | undefined if (renderer) { return renderer({ withTooltip, metadata: metadata, - value: propsValue ?? value, + value, handleChange, as, className, view, placeholder, disabled, - propertyId: (propertyData as any)?.property?.__id || propertyId, + propertyId: baseProperty?.__id, variantId: variantId, - baseProperty: (propertyData as any)?.property, + baseProperty: baseProperty, ...rest, }) } - return Unknown type: {metadataType} + return Unknown type: {metadata.type} } export default memo(PlaygroundVariantPropertyControl) diff --git a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/types.d.ts b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/types.d.ts index f2b82611d9..45d69d25ba 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/types.d.ts +++ b/web/oss/src/components/Playground/Components/PlaygroundVariantPropertyControl/types.d.ts @@ -23,8 +23,6 @@ export interface PlaygroundVariantPropertyControlProps extends BaseContainerProp rowId?: string /** Unique identifier for the property */ propertyId: string - /** Message ID for chat message-specific updates */ - messageId?: string /** Optional rendering variant for the control */ as?: "SimpleDropdownSelect" | "PromptMessageContent" | "SimpleInput" view?: string diff --git a/web/oss/src/components/Playground/Components/PromptMessageConfig/index.tsx b/web/oss/src/components/Playground/Components/PromptMessageConfig/index.tsx index b0e3d3fc58..4636c17928 100644 --- a/web/oss/src/components/Playground/Components/PromptMessageConfig/index.tsx +++ b/web/oss/src/components/Playground/Components/PromptMessageConfig/index.tsx @@ -1,33 +1,40 @@ -import {useMemo, useCallback, useState, useEffect, useRef} from "react" +import {useMemo, useCallback, useState, useEffect} from "react" import {mergeRegister} from "@lexical/utils" import clsx from "clsx" -import deepEqual from "fast-deep-equal" -import {atom, useSetAtom} from "jotai" +import JSON5 from "json5" import {$getRoot} from "lexical" -import {v4 as uuidv4} from "uuid" +import dynamic from "next/dynamic" import {useLexicalComposerContext, EditorProvider} from "@/oss/components/Editor/Editor" import {$isCodeBlockNode} from "@/oss/components/Editor/plugins/code/nodes/CodeBlockNode" -import PromptMessageHeader from "@/oss/components/Playground/Components/Shared/PromptMessageHeader" -import {useMessageContentHandlers} from "@/oss/components/Playground/hooks/useMessageContentHandlers" -import {useMessageContentProps} from "@/oss/components/Playground/hooks/useMessageContentProps" -import {getMetadataLazy} from "@/oss/lib/hooks/useStatelessVariants/state" -import {ChatRole} from "@/oss/lib/Types" +import {tryParsePartialJson} from "@/oss/components/Editor/plugins/code/tryParsePartialJson" +import TooltipWithCopyAction from "@/oss/components/TooltipWithCopyAction" +import {getMetadataLazy, getResponseLazy} from "@/oss/lib/hooks/useStatelessVariants/state" -import {usePromptMessageConfig} from "../../hooks/usePromptMessageConfig" import { - // updateGenerationDataPropertyMutationAtom, - promptPropertyAtomFamily, - promptTemplateFormatAtomFamily, -} from "../../state/atoms" -import {useAtomValue} from "jotai" -import {updateVariantPropertyEnhancedMutationAtom} from "../../state/atoms/propertyMutations" + Enhanced, + EnhancedObjectConfig, +} from "../../../../lib/shared/variant/genericTransformer/types" +import {EnhancedVariant} from "../../../../lib/shared/variant/transformer/types" +import {componentLogger} from "../../assets/utilities/componentLogger" +import usePlayground from "../../hooks/usePlayground" +import {findPropertyInObject, findVariantById} from "../../hooks/usePlayground/assets/helpers" +import {constructChatHistory} from "../../hooks/usePlayground/assets/messageHelpers" +import {findPropertyById} from "../../hooks/usePlayground/middlewares/playgroundVariantMiddleware" +import {PlaygroundStateData} from "../../hooks/usePlayground/types" +import PlaygroundVariantPropertyControl from "../PlaygroundVariantPropertyControl" import SharedEditor from "../SharedEditor" import type {PromptMessageConfigProps} from "./types" -// Content options moved into PromptMessageHeader; dynamic import removed +const PromptMessageContentOptions = dynamic( + () => + import( + "../PlaygroundVariantPropertyControl/assets/PromptMessageContent/assets/PromptMessageContentOptions" + ), + {ssr: false}, +) /** * PromptMessageConfig Component @@ -43,7 +50,6 @@ import type {PromptMessageConfigProps} from "./types" * @param props.variantId - Unique identifier for the variant being configured */ const PromptMessageConfig = ({ - id, isFunction, variantId, messageId, @@ -63,208 +69,197 @@ const PromptMessageConfig = ({ footerClassName, editorProps, isJSON, - isTool, - message: messageProp, - viewOnly, ...props }: PromptMessageConfigProps) => { - const editorIdRef = useRef(id || uuidv4()) - // Allow null to represent an empty upload slot - // const [uploadedFileItems, setUploadedFileItems] = useState<(UploadFile | null)[]>([]) + const [_messageId, _setMessageId] = useState("") const [minimized, setMinimized] = useState(false) - - // Use optimized hook for chat detection and message data - const { - isChat: _isChat, - message: optimizedMessage, - variables: optimizedVariables, - } = usePromptMessageConfig({ + const {message} = usePlayground({ variantId, - messageId, - rowId, - }) - - // Prefer live message from generation entities to reflect mutations immediately - // Prompt-only message resolution - const message = (optimizedMessage as any) ?? (messageProp as any) - // Get optimized mutation functions - const updateVariantProperty = useSetAtom(updateVariantPropertyEnhancedMutationAtom) - // const updateGenerationDataProperty = useSetAtom(updateGenerationDataPropertyMutationAtom) - - // Facade write setup for content property (prompts-only). Fallback to noop when unavailable. - const noopWriteAtom = useMemo(() => atom(null, () => {}), []) - const revisionId = useMemo(() => { - return variantId && typeof variantId === "object" - ? (variantId as any).id - : (variantId as any) - }, [variantId]) - - // content write facade is defined after baseContentProperty to use the correct property id - - // Essential property extraction for message rendering via shared hook - const {baseProperty, baseImageProperties, baseContentProperty} = useMessageContentProps( - message as any, - ) - - const contentPromptWriteAtom = useMemo(() => { - const contentId = (baseContentProperty as any)?.__id - if (revisionId && contentId) { - return promptPropertyAtomFamily({ - revisionId, - propertyId: contentId, - }) - } - return noopWriteAtom - }, [revisionId, (baseContentProperty as any)?.__id, noopWriteAtom]) - const setContentPromptValue = useSetAtom(contentPromptWriteAtom) - - // Facade write setup for base text property (prompts-only) - const baseTextPromptWriteAtom = useMemo(() => { - const textId = (baseProperty as any)?.__id - if (revisionId && textId) { - return promptPropertyAtomFamily({ - revisionId, - propertyId: textId, - }) - } - return noopWriteAtom - }, [revisionId, (baseProperty as any)?.__id, noopWriteAtom]) - const setBaseTextPromptValue = useSetAtom(baseTextPromptWriteAtom) - - // Use optimized variables data (already retrieved above) - const variables = optimizedVariables - - // Template format for token highlighting (curly | fstring | jinja2) - const templateFormat = useAtomValue( - useMemo(() => promptTemplateFormatAtomFamily(revisionId), [revisionId]), - ) - - const getProperty = useCallback( - (property: any) => { - if (!property) return null - - const {__metadata, value} = property - - // Smart handler with rowId-based routing (same logic as PlaygroundVariantPropertyControl) - const handler = (e: any) => { - const val = - e !== null && e !== undefined - ? typeof e === "object" && "target" in e - ? e.target.value - : e - : null - - const propertyId = property.__id - if (!propertyId) return - - // No-op guard: avoid redundant mutations that can cause render loops. - const currentVal = property?.value - const isSame = - typeof val === "object" && val !== null - ? deepEqual(val, currentVal) - : val === currentVal - if (!isTool && isSame) { - return - } - - // Prompt-only mutations (variant-scoped) - if (variantId) { - // Prefer prompts-only facade when possible - if ((baseProperty as any)?.__id && propertyId === (baseProperty as any).__id) { - setBaseTextPromptValue(val) - } else if ( - (baseContentProperty as any)?.__id && - propertyId === (baseContentProperty as any).__id - ) { - setContentPromptValue(val) - } else { - updateVariantProperty?.({ - variantId, - propertyId, - value: val, - }) + hookId: "PromptMessageConfig", + stateSelector: useCallback( + (state: PlaygroundStateData) => { + if (!rowId) { + const variant = findVariantById(state, variantId) + if (!variant) return {message: undefined} + + for (const prompt of variant.prompts || []) { + const message = prompt.messages?.value.find((msg) => msg.__id === messageId) + if (message) { + return { + message: { + role: message.role.__id, + content: message.content.__id, + name: message.name?.__id, + toolCalls: message.toolCalls?.__id, + toolCallId: message.toolCallId?.__id, + }, + } + } } + return {message: undefined} } else { - console.warn( - "⚠️ [PROMPT MESSAGE CONFIG] Prompt-only component missing variantId", - { - variantId, - rowId, - propertyId, + const object = + state.generationData.inputs.value.find((v) => v.__id === rowId) || + state.generationData.messages.value.find((v) => v.__id === rowId) + + let message = findPropertyInObject(object, messageId) + + message = message?.value || message + + if (!message) return {message: undefined} + return { + message: { + role: message.role.__id, + content: message.content.__id, + toolCalls: message.toolCalls?.__id, + name: message.name?.__id, + toolCallId: message.toolCallId?.__id, }, - ) + } } - } + }, + [messageId, rowId, variantId], + ), + }) - return { - __metadata: getMetadataLazy(__metadata), - __id: property.__id, - value: isTool ? property : value, - handleChange: handler, + const { + mutate, + handleParamUpdate: updateVariantProperty, + baseProperty, + isTool, + messageRow, + } = usePlayground({ + hookId: "PlaygroundVariantPropertyControl", + stateSelector: (state) => { + const object = rowId + ? state.generationData.inputs.value.find((v) => v.__id === rowId) || + (state.generationData.messages.value || []).find((v) => v.__id === rowId) + : variantId + ? state.variants.find((v) => v.id === variantId) + : null + + const messageRow = state.generationData.messages.value.find( + (messageId) => messageId.__id === rowId, + ) + + if (!object) { + return {} + } else { + const toolCalls = + findPropertyById(object as EnhancedVariant, message?.toolCalls) || + findPropertyInObject(state, message?.toolCalls) + + const isTool = !!toolCalls?.value && toolCalls.value.length > 0 + + const property = rowId + ? (findPropertyInObject( + object, + isTool ? toolCalls.value[0].__id : message?.content, + ) as EnhancedObjectConfig) + : (findPropertyById( + object as EnhancedVariant, + isTool ? toolCalls.value[0].__id : message?.content, + ) as EnhancedObjectConfig) + + return {baseProperty: property, isTool, messageRow} } }, - [ - isTool, - rowId, - updateVariantProperty, - // updateGenerationDataProperty, - variantId, - (baseProperty as any)?.__id, - (baseContentProperty as any)?.__id, - setBaseTextPromptValue, - setContentPromptValue, - ], - ) + }) const property = useMemo(() => { - const result = getProperty(baseProperty) - return result - }, [baseProperty, getProperty]) - - const imageProperties = useMemo(() => { - return baseImageProperties?.map(getProperty) - }, [baseImageProperties, getProperty]) - - const contentProperty = useMemo(() => { - return getProperty(baseContentProperty) - }, [baseContentProperty, getProperty]) - - // Defensive programming: Handle revoked proxy for property object - let metadata: any - let value: any - let handleChange: any - - try { - const safeProperty: any = property || {} - metadata = safeProperty.__metadata - value = safeProperty.value - handleChange = safeProperty.handleChange - } catch (error) { - console.error("❌ [PromptMessageConfig] Error accessing property:", error) - metadata = undefined - value = undefined - handleChange = undefined - } + if (!baseProperty) return null + + const {__metadata, value} = baseProperty + + const handler = isTool + ? (e: any) => { + mutate((clonedState) => { + const message = findPropertyById( + clonedState.variants.find((v) => v.id === variantId) as EnhancedVariant, + baseProperty.__id, + ) + if (!message) return clonedState + try { + const _obj = typeof e === "string" ? JSON.parse(e) : e + } catch (error) { + const _obj = tryParsePartialJson(e) + } + }) + } + : rowId + ? (e: any) => { + mutate( + (clonedState) => { + if (!clonedState) return clonedState + const val = + e !== null && e !== undefined + ? typeof e === "object" && "target" in e + ? e.target.value + : e + : null + + const generationData = structuredClone(clonedState.generationData) + const object = + generationData.inputs.value.find((v) => v.__id === rowId) || + generationData.messages.value.find((v) => v.__id === rowId) + + if (!object) { + return clonedState + } + + const property = findPropertyInObject( + object, + message?.content, + ) as Enhanced + + if (!property) return clonedState + + property.value = val + + clonedState.generationData = generationData + + return clonedState + }, + { + revalidate: false, + }, + ) + } + : (newValue: any) => { + updateVariantProperty?.(newValue, baseProperty.__id, variantId) + } - const {computeDisplayValue} = useMessageContentHandlers() - const _value = useMemo( - () => - computeDisplayValue({ - propsInitialValue, - value, - isFunction: Boolean(isFunction), - isTool: Boolean(isTool), - contentProperty: contentProperty as any, - }), - [computeDisplayValue, propsInitialValue, value, isFunction, isTool, contentProperty], - ) + return { + __metadata: getMetadataLazy(__metadata), + value: isTool ? baseProperty : value, + handleChange: handler, + } + }, [isTool, baseProperty, mutate, message?.content, rowId, updateVariantProperty, variantId]) + + const {__metadata: metadata, value, handleChange} = property || {} + + const _value = useMemo(() => { + if (isFunction) { + return propsInitialValue || value + } else if (isTool) { + let _val = propsInitialValue || value + let args = _val?.function?.arguments + if (typeof args === "string") { + args = JSON5.parse(args) + _val = args + } + return JSON5.stringify(_val, null, 2) + } else { + return propsInitialValue || value + } + }, [propsInitialValue, value, isFunction, isTool]) // Try to access the Lexical editor instance from context // This will work if this component is a child of LexicalComposer const [editor] = useLexicalComposerContext() const [_language, _setLanguage] = useState("json") useEffect(() => { - const unregister = mergeRegister( + return mergeRegister( editor.registerUpdateListener(({editorState}) => { editorState.read(() => { const root = $getRoot() @@ -279,60 +274,232 @@ const PromptMessageConfig = ({ }) }), ) - return unregister }, [editor]) - // toolInfo no longer needed after header extraction + + const _resultHashes = useMemo(() => { + if (!messageRow?.history?.value) return [] + + if (_messageId) { + const chatHistory = constructChatHistory({ + messageRow, + messageId: _messageId, + variantId, + includeResults: true, + }) + + return chatHistory?.map((history: any) => history?.result).filter(Boolean) || [] + } + + const results = + messageRow?.history.value + .map((history) => history.__runs?.[variantId]?.__result) + .filter(Boolean) || [] + + return results + }, [_messageId]) + + const onClickTestsetDrawer = useCallback(() => { + _setMessageId(messageId) + }, [messageId]) + const toolInfo = useMemo(() => { + if (!message || !isTool) return null + const _value = propsInitialValue || value + const parsed = typeof _value === "string" ? JSON5.parse(_value) : _value + return parsed + }, [propsInitialValue, message, value, isTool]) const _placeholder = useMemo(() => { return isFunction ? "Enter function output" : placeholder }, [isFunction, placeholder]) + if (!property) { + return null + } + if (!message) { return null } + componentLogger("PromptMessageConfig", variantId, messageId, message) return ( setMinimized((c) => !c), - }} - /> + isFunction ? ( +
+
+ + {!disabled && ( + { + setMinimized((current) => !current) + }, + }} + /> + )} +
+
+ + + {/* test + {message.name} */} + {/* */} + {/* */} + {/* + {value?.id} + */} +
+
+ ) : isTool ? ( +
+
+ + {!disabled && ( + { + setMinimized((current) => !current) + }, + }} + > + {/*
+ return +
{children} } return ( @@ -28,7 +27,7 @@ const ResizableTitle: React.FC = (props) => { onResize={onResize} draggableOpts={{enableUserSelectHack: false}} > - {children} ) } diff --git a/web/oss/src/components/SaveTestsetModal/SaveTestsetModal.tsx b/web/oss/src/components/SaveTestsetModal/SaveTestsetModal.tsx index 9182bd8bb7..9d38bd1fbc 100644 --- a/web/oss/src/components/SaveTestsetModal/SaveTestsetModal.tsx +++ b/web/oss/src/components/SaveTestsetModal/SaveTestsetModal.tsx @@ -1,12 +1,20 @@ -import {useCallback, useState} from "react" +import {useEffect, useState} from "react" -import EnhancedModal from "@agenta/oss/src/components/EnhancedUIs/Modal" -import {Input, message} from "antd" +import {Form, Input, Modal} from "antd" -import useFocusInput from "@/oss/hooks/useFocusInput" +import {EvaluationFlow} from "@/oss/lib/enums" +import {Evaluation, EvaluationScenario} from "@/oss/lib/Types" import {createNewTestset} from "@/oss/services/testsets/api" -import {SaveTestsetModalProps} from "./types" +type EvaluationRow = EvaluationScenario & { + evaluationFlow: EvaluationFlow +} & Record + +type SaveTestsetModalProps = { + evaluation: Evaluation + rows: EvaluationRow[] + onSuccess: (testsetName: string) => void +} & React.ComponentProps const SaveTestsetModal: React.FC = ({ evaluation, @@ -14,72 +22,59 @@ const SaveTestsetModal: React.FC = ({ onSuccess, ...props }) => { + const [form] = Form.useForm() const [submitLoading, setSubmitLoading] = useState(false) - const [testsetName, setTestsetName] = useState("") - const {inputRef} = useFocusInput({isOpen: props.open as boolean}) - - const onClose = useCallback(() => { - setTestsetName("") - setSubmitLoading(false) - props.onCancel?.({} as any) - }, [props]) - const handleSave = useCallback(() => { - try { - setSubmitLoading(true) + useEffect(() => { + form.resetFields() + }, [props.open]) - const newRows = rows.map((row, index) => { - if (evaluation.testset.testsetChatColumn) { - return { - chat: evaluation.testset.csvdata[index].chat, - correct_answer: row.correctAnswer, - annotation: row.note, - } - } + const handleSave = (values: {testset_name: string}) => { + setSubmitLoading(true) + const newRows = rows.map((row, index) => { + if (evaluation.testset.testsetChatColumn) { return { - [row.inputs[0].input_name]: row.inputs[0].input_value, + chat: evaluation.testset.csvdata[index].chat, correct_answer: row.correctAnswer, annotation: row.note, } - }) + } + return { + [row.inputs[0].input_name]: row.inputs[0].input_value, + correct_answer: row.correctAnswer, + annotation: row.note, + } + }) - createNewTestset(testsetName, newRows) - .then(() => onSuccess?.(testsetName)) - .catch(console.error) - .finally(() => { - setSubmitLoading(false) - }) - } catch (error) { - console.error("Error creating testset:", error) - message.error("Failed to create testset. Please try again!") - } finally { - setSubmitLoading(false) - } - }, [rows, evaluation, testsetName, onSuccess]) + createNewTestset(values.testset_name, newRows) + .then(() => onSuccess(values.testset_name)) + .catch(console.error) + .finally(() => { + setSubmitLoading(false) + }) + } return ( - { - if (open) { - inputRef.current?.input?.focus() - } - }} + - setTestsetName(e.target.value)} - value={testsetName} - className="my-3" - /> - + + + + + + ) } diff --git a/web/oss/src/components/SaveTestsetModal/types.d.ts b/web/oss/src/components/SaveTestsetModal/types.d.ts deleted file mode 100644 index 83a6a6bcf0..0000000000 --- a/web/oss/src/components/SaveTestsetModal/types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {ModalProps} from "antd" - -import {Evaluation, EvaluationFlow, EvaluationScenario} from "@/oss/lib/Types" - -export interface EvaluationRow extends EvaluationScenario, Record { - evaluationFlow: EvaluationFlow -} - -export interface SaveTestsetModalProps extends ModalProps { - evaluation: Evaluation - rows: EvaluationRow[] - onSuccess: (testsetName: string) => void -} diff --git a/web/oss/src/components/SelectLLMProvider/index.tsx b/web/oss/src/components/SelectLLMProvider/index.tsx index e324c8e02b..9bf255966c 100644 --- a/web/oss/src/components/SelectLLMProvider/index.tsx +++ b/web/oss/src/components/SelectLLMProvider/index.tsx @@ -7,7 +7,7 @@ import clsx from "clsx" import useLazyEffect from "@/oss/hooks/useLazyEffect" import {useVaultSecret} from "@/oss/hooks/useVaultSecret" import {capitalize} from "@/oss/lib/helpers/utils" -import {SecretDTOProvider, PROVIDER_LABELS} from "@/oss/lib/Types" +import {SecretDTOProvider} from "@/oss/lib/Types" import LLMIcons from "../LLMIcons" import Anthropic from "../LLMIcons/assets/Anthropic" @@ -50,34 +50,19 @@ const SelectLLMProvider = ({ const icons = useMemo(() => [OpenAi, Gemini, Anthropic, Mistral, Together], []) const extendedProviders = useMemo( - () => [ - ...Object.values(SecretDTOProvider), - "vertex_ai", - "bedrock", - // "sagemaker", - "azure", - "custom", - ], + () => [...Object.values(SecretDTOProvider), "bedrock", "azure", "custom"], [], ) - const labeledProviders = useMemo( - () => - extendedProviders.map((provider) => ({ - key: provider, - label: PROVIDER_LABELS[provider] ?? provider, - })), - [extendedProviders], - ) - const providers = useMemo( () => - labeledProviders.map(({key, label}) => ({ - label, - options: [label], - value: key, - })), - [labeledProviders], + extendedProviders.map((provider) => { + return { + label: capitalize(provider), + options: [capitalize(provider)], + } + }), + [extendedProviders], ) const filteredProviders = useMemo(() => { @@ -121,7 +106,7 @@ const SelectLLMProvider = ({ showSearch={false} open={open} value={props.value || null} - onOpenChange={(visible) => setOpen(visible)} + onDropdownVisibleChange={(visible) => setOpen(visible)} placeholder="Select a provider" style={{width: "100%"}} className={clsx([ @@ -176,7 +161,7 @@ const SelectLLMProvider = ({ > {/* Map out filtered groups and their options */} {filteredProviders.map((group, idx) => { - const GroupIcon = group.label ? LLMIcons[group.label] : null + const GroupIcon = group.label ? LLMIcons[group.label.toLowerCase()] : null return showGroup ? ( ) : ( group.options?.map((option: string) => { - const Icon = LLMIcons[option] + const Icon = LLMIcons[option.toLowerCase()] return (